Skip to content

Commit 128e995

Browse files
committed
Merge branch 'master' of https://github.com/wix/react-native-ui-lib into release
2 parents 9b28382 + 7df9240 commit 128e995

File tree

85 files changed

+9812
-275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+9812
-275
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ dist
6666
dist-ts
6767
package-lock.json
6868
docs/components/**
69-
scripts/token.js
7069

7170
# Ruby / CocoaPods
7271
/ios/Pods/

Gemfile.lock

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,26 +72,28 @@ GEM
7272
nap (1.1.0)
7373
netrc (0.11.0)
7474
public_suffix (4.0.7)
75-
rexml (3.2.5)
75+
rexml (3.3.6)
76+
strscan
7677
ruby-macho (2.5.1)
78+
strscan (3.1.0)
7779
typhoeus (1.4.0)
7880
ethon (>= 0.9.0)
7981
tzinfo (2.0.6)
8082
concurrent-ruby (~> 1.0)
81-
xcodeproj (1.22.0)
83+
xcodeproj (1.25.0)
8284
CFPropertyList (>= 2.3.3, < 4.0)
8385
atomos (~> 0.1.3)
8486
claide (>= 1.0.2, < 2.0)
8587
colored2 (~> 3.1)
8688
nanaimo (~> 0.3.0)
87-
rexml (~> 3.2.4)
89+
rexml (>= 3.3.2, < 4.0)
8890
zeitwerk (2.6.11)
8991

9092
PLATFORMS
9193
ruby
9294

9395
DEPENDENCIES
94-
cocoapods (~> 1.11, >= 1.11.3)
96+
cocoapods (>= 1.11.3)
9597

9698
RUBY VERSION
9799
ruby 2.7.6p219

demo/src/screens/ExampleScreenPresenter.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ export function renderSliderOption(title: string,
169169
</Text>
170170
<View row centerV>
171171
<Slider
172+
migrate
172173
testID={key}
173174
value={initial}
174175
containerStyle={{flex: 1}}

demo/src/screens/MainScreen.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
44
import {StyleSheet, FlatList, SectionList, ScrollView} from 'react-native';
55
import {ViewPropTypes} from 'deprecated-react-native-prop-types';
66
import {Navigation} from 'react-native-navigation';
7-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
87
import {
98
Assets,
109
Colors,
@@ -462,4 +461,4 @@ const styles = StyleSheet.create({
462461
searchResultsContainer: {paddingTop: 20}
463462
});
464463

465-
export default gestureHandlerRootHOC(MainScreen);
464+
export default MainScreen;

demo/src/screens/componentScreens/ColorSwatchScreen.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,26 @@ export default class ColorSwatchScreen extends Component {
6060

6161
return (
6262
<ScrollView>
63-
<View flex center useSafeArea>
63+
<View flex center paddingT-s5>
6464
<Text margin-5 text60>
6565
Single ColorSwatch
6666
</Text>
67-
<View row>
67+
<View row spread gap-15>
6868
<View>
6969
<ColorSwatch selected={selected} onPress={this.onPress}/>
7070
</View>
71-
<View>
72-
<ColorSwatch color={Colors.$backgroundMajorLight}/>
73-
<Text text90R>Disabled</Text>
74-
</View>
7571
<View>
7672
<ColorSwatch unavailable onPress={this.unavailableOnPress} color={Colors.yellow10}/>
7773
<Text text90R>Unavailable</Text>
7874
</View>
75+
<View>
76+
<ColorSwatch transparent/>
77+
<Text text90R>Transparent</Text>
78+
</View>
79+
<View center>
80+
<ColorSwatch style={{borderRadius: 0}} transparent/>
81+
<Text text90R>Square</Text>
82+
</View>
7983
</View>
8084

8185
<Text marginT-20 text60>

demo/src/screens/componentScreens/ConversationListScreen.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ import _ from 'lodash';
22
import PropTypes from 'prop-types';
33
import React, {Component, PureComponent} from 'react';
44
import {StyleSheet, Alert, FlatList} from 'react-native';
5-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
65
import {Colors, ListItem, Text, Avatar, AvatarHelper, Drawer, Button} from 'react-native-ui-lib'; //eslint-disable-line
76
import conversations from '../../data/conversations';
87

9-
108
const collectionsIcon = require('../../assets/icons/collections.png');
119
const starIcon = require('../../assets/icons/star.png');
1210
const shareIcon = require('../../assets/icons/share.png');
@@ -47,7 +45,7 @@ class ConversationListScreen extends Component {
4745
icon: collectionsIcon,
4846
background: Colors.blue30,
4947
onPress: () => Alert.alert(`Archive button pressed for item #${item.name}`)
50-
},
48+
}
5149
];
5250
const leftButton = {
5351
text: 'Read',
@@ -94,19 +92,19 @@ class ConversationListScreen extends Component {
9492

9593
addRef = (ref, index) => {
9694
this.refArray[index] = ref;
97-
}
95+
};
9896

9997
onEndReached = () => {
10098
this.getNewItems();
101-
}
99+
};
102100

103101
onSwipeableWillOpen = (props) => {
104102
this.closeLast(props.index);
105-
}
103+
};
106104

107105
renderItem = ({item, index}) => {
108-
return <ContactItem item={item} index={index} addRef={this.addRef} onSwipeableWillOpen={this.onSwipeableWillOpen}/>
109-
}
106+
return <ContactItem item={item} index={index} addRef={this.addRef} onSwipeableWillOpen={this.onSwipeableWillOpen}/>;
107+
};
110108

111109
keyExtractor = (item, index) => `${item.name}-${index}`;
112110

@@ -128,7 +126,7 @@ class ContactItem extends PureComponent {
128126
index: PropTypes.number,
129127
addRef: PropTypes.func,
130128
onSwipeableWillOpen: PropTypes.func
131-
}
129+
};
132130

133131
render() {
134132
const {item, index, addRef, onSwipeableWillOpen} = this.props;
@@ -192,4 +190,4 @@ const styles = StyleSheet.create({
192190
}
193191
});
194192

195-
export default gestureHandlerRootHOC(ConversationListScreen);
193+
export default ConversationListScreen;

demo/src/screens/componentScreens/DrawerScreen.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, {Component} from 'react';
22
import {StyleSheet, ScrollView, LayoutAnimation} from 'react-native';
33
import {Assets, Colors, Typography, View, Drawer, Text, Button, Avatar, Badge, DrawerProps} from 'react-native-ui-lib';
4-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
54
import conversations from '../../data/conversations';
65

76
import {renderBooleanOption, renderSliderOption, renderColorOption} from '../ExampleScreenPresenter';
@@ -325,4 +324,4 @@ const styles = StyleSheet.create({
325324
}
326325
});
327326

328-
export default gestureHandlerRootHOC(DrawerScreen);
327+
export default DrawerScreen;

demo/src/screens/componentScreens/IconScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const IconScreen = () => {
3838
</View>
3939

4040
{renderBooleanOption('Custom Size', 'customSize', {spread: false, state: customSize, setState: setCustomSize})}
41-
<Slider maximumValue={100} value={24} step={1} onValueChange={setSize}/>
41+
<Slider migrate maximumValue={100} value={24} step={1} onValueChange={setSize}/>
4242
<Text marginB-50 marginT-s2>
4343
Custom size: {size}
4444
</Text>
@@ -48,7 +48,7 @@ const IconScreen = () => {
4848
state: customBadgeSize,
4949
setState: setCustomBadgeSize
5050
})}
51-
<Slider maximumValue={100} value={20} step={1} onValueChange={setBadgeSize}/>
51+
<Slider migrate maximumValue={100} value={20} step={1} onValueChange={setBadgeSize}/>
5252
<Text marginB-50 marginT-s2>
5353
Custom badge size: {badgeSize}
5454
</Text>

demo/src/screens/componentScreens/NumberInputScreen.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, {useState, useCallback, useRef, useMemo} from 'react';
22
import {StyleSheet, TouchableWithoutFeedback, Keyboard as RNKeyboard} from 'react-native';
3-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
43
import {
54
Text,
65
Spacings,
@@ -200,7 +199,7 @@ const NumberInputScreen = () => {
200199
);
201200
};
202201

203-
export default gestureHandlerRootHOC(NumberInputScreen);
202+
export default NumberInputScreen;
204203

205204
const styles = StyleSheet.create({
206205
containerStyle: {

demo/src/screens/componentScreens/PickerScreen.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import _ from 'lodash';
22
import React, {Component} from 'react';
3-
import {ScrollView} from 'react-native-gesture-handler';
3+
import {ScrollView} from 'react-native';
44
import {
5-
View,
5+
Assets,
66
Colors,
7-
Icon,
7+
Typography,
88
Incubator,
9+
View,
910
Text,
10-
Picker,
11+
Button,
12+
Icon,
1113
Avatar,
12-
Assets,
14+
Picker,
1315
PanningProvider,
14-
Typography,
1516
PickerProps,
1617
RenderCustomModalProps,
17-
PickerMethods,
18-
Button
18+
PickerMethods
1919
} from 'react-native-ui-lib'; //eslint-disable-line
2020
import contactsData from '../../data/conversations';
2121
import {longOptions} from './PickerScreenLongOptions';

demo/src/screens/componentScreens/SortableListScreen.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ const SortableListScreen = () => {
114114
<SortableList
115115
flexMigration
116116
data={items}
117+
// itemProps={{backgroundColor: 'transparent'}}
117118
renderItem={renderItem}
118119
keyExtractor={keyExtractor}
119120
onOrderChange={onOrderChange}

0 commit comments

Comments
 (0)