unicorn-demo-app 6.31.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +3 -12
  3. package/src/screens/MenuStructure.js +7 -11
  4. package/src/screens/componentScreens/ChipScreen.tsx +2 -60
  5. package/src/screens/componentScreens/ChipsInputScreen.tsx +47 -163
  6. package/src/screens/componentScreens/PickerScreen.tsx +13 -50
  7. package/src/screens/componentScreens/SectionsWheelPickerScreen.tsx +3 -4
  8. package/src/screens/componentScreens/TabControllerScreen/index.tsx +2 -3
  9. package/src/screens/{incubatorScreens/IncubatorTextFieldScreen.tsx → componentScreens/TextFieldScreen.tsx} +5 -4
  10. package/src/screens/{incubatorScreens → componentScreens}/WheelPickerScreen.tsx +8 -8
  11. package/src/screens/componentScreens/index.js +2 -1
  12. package/src/screens/foundationScreens/ShadowsScreen.js +26 -29
  13. package/src/screens/incubatorScreens/index.js +0 -3
  14. package/src/screens/nativeComponentScreens/index.js +0 -1
  15. package/src/screens/componentScreens/TextFieldScreen/BasicTextFieldScreen.js +0 -120
  16. package/src/screens/componentScreens/TextFieldScreen/CustomInputsScreen.js +0 -48
  17. package/src/screens/componentScreens/TextFieldScreen/InputValidationsScreen.js +0 -102
  18. package/src/screens/componentScreens/TextFieldScreen/InputsScreen.js +0 -324
  19. package/src/screens/componentScreens/TextFieldScreen/index.js +0 -46
  20. package/src/screens/componentScreens/WheelPickerDialogScreen.js +0 -54
  21. package/src/screens/incubatorScreens/IncubatorChipsInputScreen.tsx +0 -60
  22. package/src/screens/nativeComponentScreens/WheelPickerViewScreen.js +0 -49
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unicorn-demo-app",
3
- "version": "6.31.0",
3
+ "version": "7.0.0",
4
4
  "main": "src/index.js",
5
5
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
6
6
  "license": "MIT",
package/src/index.js CHANGED
@@ -130,18 +130,15 @@ module.exports = {
130
130
  return require('./screens/componentScreens/TextScreen').default;
131
131
  },
132
132
  // TODO: fix Expo issues (navigation) before un-commenting
133
- // get TextFieldScreen() {
134
- // return require('./screens/componentScreens/TextFieldScreen').default;
135
- // },
133
+ get TextFieldScreen() {
134
+ return require('./screens/componentScreens/TextFieldScreen').default;
135
+ },
136
136
  get TourScreen() {
137
137
  return require('./screens/componentScreens/TourScreen').default;
138
138
  },
139
139
  get FeatureHighlightScreen() {
140
140
  return require('./screens/componentScreens/FeatureHighlightScreen').default;
141
141
  },
142
- get WheelPickerDialogScreen() {
143
- return require('./screens/componentScreens/WheelPickerDialogScreen').default;
144
- },
145
142
  get SliderScreen() {
146
143
  return require('./screens/componentScreens/SliderScreen').default;
147
144
  },
@@ -173,9 +170,6 @@ module.exports = {
173
170
  get SafeAreaSpacerViewScreen() {
174
171
  return require('./screens/nativeComponentScreens/SafeAreaSpacerViewScreen').default;
175
172
  },
176
- get WheelPickerViewScreen() {
177
- return require('./screens/nativeComponentScreens/WheelPickerViewScreen').default;
178
- },
179
173
  // Full Screen components
180
174
  get EmptyStateScreen() {
181
175
  return require('./screens/componentScreens/EmptyStateScreen').default;
@@ -221,9 +215,6 @@ module.exports = {
221
215
  return require('./screens/componentScreens/ProgressBarScreen').default;
222
216
  },
223
217
  // Incubator
224
- get IncubatorTextFieldScreen() {
225
- return require('./screens/incubatorScreens/IncubatorTextFieldScreen').default;
226
- },
227
218
  get PanViewScreen() {
228
219
  return require('./screens/incubatorScreens/PanViewScreen').default;
229
220
  },
@@ -43,7 +43,6 @@ export const navigationData = {
43
43
  screen: 'unicorn.components.SharedTransitionScreen'
44
44
  },
45
45
  {title: 'Stack Aggregator', tags: 'stack aggregator', screen: 'unicorn.components.StackAggregatorScreen'},
46
- {title: 'Wheel Picker Dialog', tags: 'wheel picker dialog', screen: 'unicorn.components.WheelPickerDialogScreen'},
47
46
  {title: 'Marquee', tags: 'sliding text', screen: 'unicorn.components.MarqueeScreen'}
48
47
  ]
49
48
  },
@@ -71,8 +70,12 @@ export const navigationData = {
71
70
  {title: 'Stepper', tags: 'stepper form', screen: 'unicorn.components.StepperScreen'},
72
71
  {title: 'Slider', tags: 'slider', screen: 'unicorn.components.SliderScreen'},
73
72
  {title: 'Switch', tags: 'switch toggle', screen: 'unicorn.components.SwitchScreen'},
74
- {title: 'ChipsInput', tags: 'chips tags input form', screen: 'unicorn.components.ChipsInputScreen'},
75
- {title: 'Masked Inputs', tags: 'text input form mask', screen: 'unicorn.components.MaskedInputScreen'}
73
+ {title: 'Masked Inputs', tags: 'text input form mask', screen: 'unicorn.components.MaskedInputScreen'},
74
+ {
75
+ title: 'WheelPicker',
76
+ tags: 'wheel picker spinner',
77
+ screen: 'unicorn.components.WheelPickerScreen'
78
+ }
76
79
  ]
77
80
  },
78
81
  Overlays: {
@@ -141,7 +144,6 @@ export const navigationData = {
141
144
  tags: 'native overlay',
142
145
  screen: 'unicorn.nativeComponents.HighlightOverlayViewScreen'
143
146
  },
144
- {title: 'Wheel Picker', tags: 'wheel picker', screen: 'unicorn.nativeComponents.WheelPickerViewScreen'},
145
147
  {title: 'SafeArea Spacer', tags: 'native safe area', screen: 'unicorn.nativeComponents.SafeAreaSpacerViewScreen'},
146
148
  {
147
149
  title: 'KeyboardTracking (iOS)',
@@ -175,21 +177,15 @@ export const navigationData = {
175
177
  title: 'Incubator (Experimental)',
176
178
  screens: [
177
179
  {title: 'Calendar', tags: 'calendar', screen: 'unicorn.components.IncubatorCalendarScreen'},
178
- {title: 'ChipsInput (New)', tags: 'chips input', screen: 'unicorn.components.IncubatorChipsInputScreen'},
180
+ {title: 'ChipsInput', tags: 'chips input', screen: 'unicorn.components.ChipsInputScreen'},
179
181
  {title: 'Native TouchableOpacity', tags: 'touchable native', screen: 'unicorn.incubator.TouchableOpacityScreen'},
180
182
  {title: 'Dialog (New)', tags: 'dialog modal popup alert', screen: 'unicorn.incubator.IncubatorDialogScreen'},
181
- {title: 'TextField (New)', tags: 'text field input', screen: 'unicorn.components.IncubatorTextFieldScreen'},
182
183
  {title: 'Toast (New)', tags: 'toast', screen: 'unicorn.components.IncubatorToastScreen'},
183
184
  {
184
185
  title: 'ExpandableOverlay',
185
186
  tags: 'text field expandable input picker',
186
187
  screen: 'unicorn.components.IncubatorExpandableOverlayScreen'
187
188
  },
188
- {
189
- title: 'WheelPicker (Incubator)',
190
- tags: 'wheel picker spinner experimental',
191
- screen: 'unicorn.incubator.WheelPickerScreen'
192
- },
193
189
  {title: 'Pan View', tags: 'pan swipe drag', screen: 'unicorn.incubator.PanViewScreen'}
194
190
  ]
195
191
  },
@@ -1,7 +1,6 @@
1
- import _ from 'lodash';
2
1
  import React, {Component} from 'react';
3
2
  import {Alert} from 'react-native';
4
- import {Chip, Colors, Spacings, Text, Typography, View, Incubator, WheelPickerDialog, Image} from 'react-native-ui-lib';
3
+ import {Chip, Colors, Spacings, Text, Typography, View, Image} from 'react-native-ui-lib';
5
4
 
6
5
  const avatarImage = {
7
6
  uri: 'https://randomuser.me/api/portraits/women/24.jpg'
@@ -20,64 +19,9 @@ export default class ChipScreen extends Component {
20
19
  ];
21
20
 
22
21
  state = {
23
- showDialog: false,
24
22
  selectedValue: this.colors[2].label
25
23
  };
26
24
 
27
- toggleDialog = (showDialog: boolean) => {
28
- this.setState({showDialog});
29
- };
30
-
31
- openDialog = () => {
32
- this.toggleDialog(true);
33
- };
34
-
35
- closeDialog = () => {
36
- this.toggleDialog(false);
37
- };
38
-
39
- onSelect = (itemValue: string) => {
40
- const values = _.filter(this.colors, {value: itemValue});
41
- if (values.length > 0) {
42
- this.setState({selectedValue: values[0].label});
43
- }
44
- this.closeDialog();
45
- };
46
-
47
- renderItem = ({item: color}) => {
48
- return (
49
- <Text text50 margin-20 color={color.value}>
50
- {color.label}
51
- </Text>
52
- );
53
- };
54
-
55
- renderContent = () => {
56
- const {selectedValue} = this.state;
57
-
58
- return (
59
- <WheelPickerDialog
60
- items={this.colors}
61
- selectedValue={selectedValue}
62
- onSelect={this.onSelect}
63
- onCancel={this.closeDialog}
64
- wheelPickerProps={{
65
- style: {width: 200}
66
- }}
67
- />
68
- );
69
- };
70
-
71
- renderPickerDialog = () => {
72
- const {showDialog} = this.state;
73
-
74
- return (
75
- <Incubator.Dialog visible={showDialog} useSafeArea bottom onDismiss={this.closeDialog}>
76
- {this.renderContent()}
77
- </Incubator.Dialog>
78
- );
79
- };
80
-
81
25
  renderExample = (text: string, chip: JSX.Element) => {
82
26
  return (
83
27
  <View row spread marginB-12>
@@ -90,7 +34,6 @@ export default class ChipScreen extends Component {
90
34
  render() {
91
35
  return (
92
36
  <View style={{padding: 20}}>
93
- {this.renderPickerDialog()}
94
37
  <Text marginB-20 text40 $textDefault>
95
38
  Chip
96
39
  </Text>
@@ -120,12 +63,11 @@ export default class ChipScreen extends Component {
120
63
  iconStyle={{width: 24, height: 24}}
121
64
  iconProps={{tintColor: Colors.$iconDefault}}
122
65
  />)}
123
- {this.renderExample('Right icon + onPress + dynamic label',
66
+ {this.renderExample('Right icon',
124
67
  <Chip
125
68
  label={this.state.selectedValue}
126
69
  rightIconSource={chevron}
127
70
  iconStyle={{margin: 8}}
128
- onPress={this.openDialog}
129
71
  />)}
130
72
  {this.renderExample('Label + Avatar', <Chip label={'Chip'} avatarProps={{source: avatarImage, size: 20}}/>)}
131
73
  {this.renderExample('Label + Counter',
@@ -1,176 +1,60 @@
1
1
  import React, {Component} from 'react';
2
- import {StyleSheet, ScrollView} from 'react-native';
3
- import {View, Colors, Text, Typography, ChipsInput, ChipsInputChipProps} from 'react-native-ui-lib'; // eslint-disable-line
2
+ import {View, Text, Card, TextField, Button, Colors, ChipsInput} from 'react-native-ui-lib'; //eslint-disable-line
3
+ import _ from 'lodash';
4
4
 
5
- interface State {
6
- chips: Array<ChipsInputChipProps>;
7
- namesChips: Array<ChipsInputChipProps>;
8
- nonRemovalChips: Array<ChipsInputChipProps>;
9
- customChips: Array<string>;
10
- tags: Array<string | any>;
11
- tags2: Array<string>;
12
- tags3: Array<string>;
13
- }
14
-
15
- export default class ChipsInputScreen extends Component<{}, State> {
16
- // @ts-ignore
17
- customChipsInput = React.createRef<ChipsInput>();
18
-
19
- constructor(props: any) {
20
- super(props);
21
-
22
- this.state = {
23
- chips: [{label: 'Falcon 9'}, {label: 'Enterprise'}, {label: 'Challenger', borderRadius: 0}, {label: 'Coca Cola', invalid: true}],
24
- namesChips: [{label: 'Amit'}, {label: 'Ethan', invalid: true}],
25
- nonRemovalChips: [{label: 'Non'}, {label: 'Removable'}, {label: 'Tags'}],
26
- customChips: ['Chips', 'Input'],
27
- tags: [{label: 'Amit'}, {label: 'Ethan', invalid: true}],
28
- tags2: ['Non', 'Removable', 'Tags'],
29
- tags3: ['Change', 'Typography']
30
- };
31
- }
32
-
33
- onTagPress = (tagIndex: number, markedTagIndex: number) => {
34
- this.customChipsInput.current?.markTagIndex(tagIndex === markedTagIndex ? undefined : tagIndex);
5
+ export default class ChipsInputScreen extends Component {
6
+ state = {
7
+ chips: [{label: 'one'}, {label: 'two'}],
8
+ chips2: []
35
9
  };
36
10
 
37
- renderCustomTag(tag: any, _: number, shouldMarkToRemove: boolean) {
38
- return (
39
- <View style={[styles.customTag, shouldMarkToRemove && {backgroundColor: Colors.purple70}]}>
40
- <Text white>{tag.label}</Text>
41
- </View>
42
- );
43
- }
44
-
45
- renderLeftElement = () => {
11
+ render() {
46
12
  return (
47
- <View center height={40} marginR-s2 style={{alignItems: 'flex-start'}}>
48
- <Text grey30 text70M>
49
- To:
13
+ <View flex padding-20>
14
+ <Text h1 marginB-s4>
15
+ ChipsInput
50
16
  </Text>
51
- </View>
52
- );
53
- };
54
-
55
- renderSearchTypeInput = () => {
56
- return (
57
- <>
58
- <Text marginB-10 text60>Search Type</Text>
59
- <View bg-grey60>
60
- <ChipsInput
61
- placeholder={'Enter Tags'}
62
- chips={this.state.chips}
63
- leftElement={this.renderLeftElement()}
64
- hideUnderline
65
- maxHeight={100}
66
- />
67
- </View>
68
- </>
69
- );
70
- };
71
-
72
- renderFormTypeInput = () => {
73
- return (
74
- <View marginT-40>
75
- <Text marginB-10 text60>Form Type</Text>
76
17
  <ChipsInput
77
- placeholder={'Enter Tags'}
78
- title={'Mendy'}
18
+ placeholder="Enter chips"
19
+ defaultChipProps={{
20
+ backgroundColor: Colors.$backgroundPrimaryHeavy,
21
+ labelStyle: {color: Colors.$textDefaultLight},
22
+ containerStyle: {borderWidth: 0},
23
+ dismissColor: Colors.$iconDefaultLight
24
+ }}
25
+ invalidChipProps={{
26
+ dismissColor: Colors.$iconDanger,
27
+ labelStyle: {color: Colors.$textDanger},
28
+ backgroundColor: Colors.$backgroundDefault,
29
+ containerStyle: {borderColor: Colors.$outlineDanger}
30
+ }}
79
31
  chips={this.state.chips}
80
- maxLength={4}
32
+ leadingAccessory={<Text>TO: </Text>}
33
+ onChange={newChips => {
34
+ _.flow(newChips => _.groupBy(newChips, 'label'),
35
+ newChips =>
36
+ _.forEach(newChips, group => {
37
+ if (group.length === 1) {
38
+ delete group[0].invalid;
39
+ } else {
40
+ group[group.length - 1].invalid = true;
41
+ }
42
+ }),
43
+ _.values,
44
+ _.flatten)(newChips);
45
+
46
+ this.setState({chips: newChips});
47
+ }}
81
48
  />
82
- </View>
83
- );
84
- };
85
-
86
- onCreateTag = (value: string) => {
87
- return {label: value};
88
- }
89
-
90
- render() {
91
- return (
92
- <ScrollView keyboardShouldPersistTaps="never">
93
- <View style={styles.container}>
94
- <Text text40 marginB-20>
95
- ChipsInput
96
- </Text>
97
-
98
49
 
99
- {this.renderSearchTypeInput()}
100
-
101
- {this.renderFormTypeInput()}
102
-
103
- <ChipsInput
104
- containerStyle={styles.bottomMargin}
105
- placeholder="Enter Tags"
106
- chips={this.state.namesChips}
107
- validationErrorMessage="error validation message"
108
- />
109
-
110
- <ChipsInput
111
- containerStyle={styles.bottomMargin}
112
- placeholder="Editing disabled"
113
- chips={this.state.nonRemovalChips}
114
- disableTagRemoval
115
- disableTagAdding
116
- />
117
-
118
- <Text text50 marginV-20>Old Usage</Text>
119
- <ChipsInput
120
- containerStyle={styles.bottomMargin}
121
- placeholder="Enter Tags"
122
- tags={this.state.tags}
123
- validationErrorMessage="error validation message"
124
- />
125
-
126
- <ChipsInput
127
- containerStyle={styles.bottomMargin}
128
- placeholder="Editing disabled"
129
- tags={this.state.tags2}
130
- disableTagRemoval
131
- disableTagAdding
132
- />
133
- <ChipsInput
134
- ref={this.customChipsInput}
135
- containerStyle={styles.bottomMargin}
136
- placeholder="With custom tags"
137
- tags={this.state.tags}
138
- renderTag={this.renderCustomTag}
139
- onCreateTag={this.onCreateTag}
140
- onTagPress={this.onTagPress}
141
- inputStyle={styles.customInput}
142
- />
143
- <ChipsInput
144
- text60
145
- containerStyle={styles.bottomMargin}
146
- placeholder="Enter Tags"
147
- tags={this.state.tags3}
148
- />
149
-
150
- </View>
151
- </ScrollView>
50
+ <ChipsInput
51
+ label="Max 3 chips"
52
+ placeholder="Enter chips..."
53
+ chips={this.state.chips2}
54
+ onChange={newChips => this.setState({chips2: newChips})}
55
+ maxChips={3}
56
+ />
57
+ </View>
152
58
  );
153
59
  }
154
60
  }
155
-
156
- const styles = StyleSheet.create({
157
- container: {
158
- flex: 1,
159
- padding: 15
160
- },
161
- customInput: {
162
- ...Typography.text60,
163
- color: Colors.blue30
164
- },
165
- bottomMargin: {
166
- marginBottom: 25
167
- },
168
- customTag: {
169
- backgroundColor: Colors.purple30,
170
- paddingVertical: 2,
171
- paddingHorizontal: 8,
172
- borderRadius: 3,
173
- marginRight: 10,
174
- marginBottom: 10
175
- }
176
- });
@@ -51,11 +51,11 @@ export default class PickerScreen extends Component {
51
51
  itemsCount: 1,
52
52
  // language: {value: 'java', label: 'Java'},
53
53
  language: undefined,
54
- language2: options[2].value, // for migrated picker example
54
+ language2: options[2].value,
55
55
  languages: [],
56
56
  nativePickerValue: 'java',
57
57
  customModalValues: [],
58
- filter: filters[0],
58
+ filter: filters[0].value,
59
59
  scheme: schemes[0].value,
60
60
  contact: 0
61
61
  };
@@ -102,10 +102,9 @@ export default class PickerScreen extends Component {
102
102
  searchPlaceholder={'Search a language'}
103
103
  searchStyle={{color: Colors.blue30, placeholderTextColor: Colors.grey50}}
104
104
  // onSearchChange={value => console.warn('value', value)}
105
- migrateTextField
106
105
  >
107
106
  {_.map(longOptions, option => (
108
- <Picker.Item key={option.value} value={option} label={''} disabled={option.disabled}/>
107
+ <Picker.Item key={option.value} value={option.value} label={option.label} disabled={option.disabled}/>
109
108
  ))}
110
109
  </Picker>
111
110
 
@@ -116,21 +115,20 @@ export default class PickerScreen extends Component {
116
115
  mode={Picker.modes.MULTI}
117
116
  selectionLimit={3}
118
117
  trailingAccessory={dropdownIcon}
119
- migrateTextField
120
118
  >
121
119
  {_.map(options, option => (
122
- <Picker.Item key={option.value} value={option} label={''} disabled={option.disabled}/>
120
+ <Picker.Item key={option.value} value={option.value} label={option.label} disabled={option.disabled}/>
123
121
  ))}
124
122
  </Picker>
125
123
 
126
124
  <Picker
127
- title="Wheel Picker"
125
+ label="Wheel Picker"
128
126
  placeholder="Pick a Language"
129
- useNativePicker
127
+ useWheelPicker
130
128
  // useWheelPicker
131
129
  value={this.state.nativePickerValue}
132
130
  onChange={nativePickerValue => this.setState({nativePickerValue})}
133
- rightIconSource={dropdown}
131
+ trailingAccessory={<Icon source={dropdown}/>}
134
132
  // containerStyle={{marginTop: 20}}
135
133
  // renderPicker={() => {
136
134
  // return (
@@ -139,13 +137,6 @@ export default class PickerScreen extends Component {
139
137
  // </View>
140
138
  // );
141
139
  // }}
142
- // renderNativePicker={props => {
143
- // return (
144
- // <View flex bg-red50>
145
- // <Text>CUSTOM NATIVE PICKER</Text>
146
- // </View>
147
- // );
148
- // }}
149
140
  // topBarProps={{doneLabel: 'YES', cancelLabel: 'NO'}}
150
141
  >
151
142
  {_.map(options, option => (
@@ -160,13 +151,12 @@ export default class PickerScreen extends Component {
160
151
  onChange={items => this.setState({customModalValues: items})}
161
152
  mode={Picker.modes.MULTI}
162
153
  trailingAccessory={dropdownIcon}
163
- migrateTextField
164
154
  renderCustomModal={this.renderDialog}
165
155
  >
166
156
  {_.map(options, option => (
167
157
  <Picker.Item
168
158
  key={option.value}
169
- value={option}
159
+ value={option.value}
170
160
  label={option.label}
171
161
  labelStyle={Typography.text65}
172
162
  disabled={option.disabled}
@@ -196,19 +186,15 @@ export default class PickerScreen extends Component {
196
186
  }}
197
187
  >
198
188
  {_.map(filters, filter => (
199
- <Picker.Item key={filter.value} value={filter} label={''}/>
189
+ <Picker.Item key={filter.value} value={filter.value} label={filter.label}/>
200
190
  ))}
201
191
  </Picker>
202
192
 
203
- <Text text60 marginT-s5 $textDefault>
204
- Migrated Pickers
205
- </Text>
206
-
207
193
  <Text marginT-20 marginB-10 text70 $textDefault>
208
194
  Custom Picker Items:
209
195
  </Text>
210
196
  <Picker
211
- migrate
197
+ ref={this.picker}
212
198
  value={this.state.contact}
213
199
  onChange={contact => {
214
200
  this.setState({contact});
@@ -268,27 +254,6 @@ export default class PickerScreen extends Component {
268
254
  ))}
269
255
  </Picker>
270
256
 
271
- <Picker
272
- migrate
273
- ref={this.picker}
274
- migrateTextField
275
- label="Language"
276
- placeholder="Favorite Language"
277
- value={this.state.language2}
278
- onChange={value => this.setState({language2: value})}
279
- topBarProps={{title: 'Languages'}}
280
- showSearch
281
- searchPlaceholder={'Search a language'}
282
- searchStyle={{color: Colors.blue30, placeholderTextColor: Colors.grey50}}
283
- marginT-s4
284
- enableErrors={false}
285
- // mode={Picker.modes.MULTI}
286
- // useNativePicker
287
- >
288
- {_.map(options, option => (
289
- <Picker.Item key={option.value} value={option.value} label={option.label} disabled={option.disabled}/>
290
- ))}
291
- </Picker>
292
257
  <Button
293
258
  label="Open Picker Manually"
294
259
  link
@@ -299,11 +264,11 @@ export default class PickerScreen extends Component {
299
264
  <Text text60 marginT-s5>
300
265
  Different Field Types
301
266
  </Text>
302
- <Text text80 marginB-s5>(Form/Filter/Settings)</Text>
267
+ <Text text80 marginB-s5>
268
+ (Form/Filter/Settings)
269
+ </Text>
303
270
 
304
271
  <Picker
305
- migrate
306
- migrateTextField
307
272
  value={this.state.filter}
308
273
  onChange={value => this.setState({filter: value})}
309
274
  placeholder="Filter posts"
@@ -316,8 +281,6 @@ export default class PickerScreen extends Component {
316
281
  </Picker>
317
282
 
318
283
  <Picker
319
- migrate
320
- migrateTextField
321
284
  value={this.state.scheme}
322
285
  onChange={value => this.setState({scheme: value})}
323
286
  label="Color Scheme"
@@ -7,14 +7,13 @@ import {
7
7
  SectionsWheelPicker,
8
8
  SegmentedControl,
9
9
  Button,
10
- Incubator,
10
+ WheelPicker,
11
+ WheelPickerProps,
11
12
  Constants,
12
13
  Switch,
13
14
  Colors
14
15
  } from 'react-native-ui-lib';
15
16
 
16
- const {WheelPicker} = Incubator;
17
-
18
17
  const DAYS = _.times(10, i => i);
19
18
  const HOURS = _.times(24, i => i);
20
19
  const MINUTES = _.times(60, i => i);
@@ -75,7 +74,7 @@ const SectionsWheelPickerScreen = () => {
75
74
  setSelectedMinutes(0);
76
75
  }, []);
77
76
 
78
- const sections: Incubator.WheelPickerProps[] = useMemo(() => {
77
+ const sections: WheelPickerProps[] = useMemo(() => {
79
78
  return [
80
79
  {
81
80
  items: getItems(DAYS),
@@ -1,3 +1,4 @@
1
+ import _ from 'lodash';
1
2
  import React, {Component} from 'react';
2
3
  import {ActivityIndicator, StyleSheet} from 'react-native';
3
4
  import {
@@ -11,7 +12,6 @@ import {
11
12
  TabControllerImperativeMethods
12
13
  } from 'react-native-ui-lib';
13
14
  import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
14
- import _ from 'lodash';
15
15
 
16
16
  import Tab1 from './tab1';
17
17
  import Tab2 from './tab2';
@@ -162,14 +162,13 @@ class TabControllerScreen extends Component<{}, State> {
162
162
  }
163
163
 
164
164
  render() {
165
- const {key, initialIndex, /* selectedIndex, */ asCarousel, centerSelected, fewItems, items} = this.state;
165
+ const {key, initialIndex, asCarousel, centerSelected, fewItems, items} = this.state;
166
166
  return (
167
167
  <View flex bg-$backgroundDefault>
168
168
  <TabController
169
169
  key={key}
170
170
  ref={this.tabController}
171
171
  asCarousel={asCarousel}
172
- // selectedIndex={selectedIndex}
173
172
  initialIndex={initialIndex}
174
173
  onChangeIndex={this.onChangeIndex}
175
174
  items={items}
@@ -1,8 +1,7 @@
1
1
  import _ from 'lodash';
2
2
  import React, {Component} from 'react';
3
3
  import {TextInput, StyleSheet, ScrollView, ActivityIndicator} from 'react-native';
4
- import {Assets, Colors, Spacings, Typography, View, Text, Button, Keyboard, Incubator} from 'react-native-ui-lib'; //eslint-disable-line
5
- const {TextField} = Incubator;
4
+ import {Assets, Colors, Spacings, Typography, View, Text, Button, Keyboard, TextField, TextFieldMethods} from 'react-native-ui-lib'; //eslint-disable-line
6
5
  const {KeyboardAwareInsetsView} = Keyboard;
7
6
 
8
7
  const priceFormatter = Intl.NumberFormat('en-US');
@@ -10,14 +9,15 @@ const priceFormatter = Intl.NumberFormat('en-US');
10
9
  export default class TextFieldScreen extends Component {
11
10
  input = React.createRef<TextInput>();
12
11
  input2 = React.createRef<TextInput>();
13
- inputWithValidation = React.createRef<TextInput>();
12
+ inputWithValidation = React.createRef<TextFieldMethods>();
14
13
  state = {
15
14
  errorPosition: TextField.validationMessagePositions.TOP,
16
15
  shouldDisable: false,
17
16
  isReadonly: false,
18
17
  value: 'Initial Value',
19
18
  searching: false,
20
- preset: 'withUnderline'
19
+ preset: 'withUnderline',
20
+ price: ''
21
21
  };
22
22
 
23
23
  componentDidMount() {
@@ -162,6 +162,7 @@ export default class TextFieldScreen extends Component {
162
162
 
163
163
  <View row top marginT-s4>
164
164
  <TextField
165
+ // @ts-expect-error
165
166
  ref={this.inputWithValidation}
166
167
  placeholder="Enter full name"
167
168
  validate="required"