unicorn-demo-app 7.30.0 → 7.31.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.
- package/package.json +1 -1
- package/src/screens/ExampleScreenPresenter.tsx +1 -0
- package/src/screens/MainScreen.js +1 -2
- package/src/screens/componentScreens/ColorSwatchScreen.tsx +10 -6
- package/src/screens/componentScreens/ConversationListScreen.js +8 -10
- package/src/screens/componentScreens/DrawerScreen.tsx +1 -2
- package/src/screens/componentScreens/IconScreen.tsx +2 -2
- package/src/screens/componentScreens/NumberInputScreen.tsx +1 -2
- package/src/screens/componentScreens/PickerScreen.tsx +8 -8
- package/src/screens/componentScreens/SortableListScreen.tsx +1 -0
- package/src/screens/componentScreens/StepperScreen.tsx +84 -55
- package/src/screens/componentScreens/TabControllerScreen/index.tsx +1 -2
- package/src/screens/componentScreens/index.js +6 -10
- package/src/screens/incubatorScreens/IncubatorToastScreen.tsx +1 -2
- package/src/screens/incubatorScreens/PanViewScreen.tsx +3 -3
- package/src/screens/incubatorScreens/index.js +2 -5
- package/src/screens/index.js +1 -3
- package/src/screens/realExamples/Pinterest/index.tsx +1 -1
- package/src/screens/realExamples/index.js +2 -6
package/package.json
CHANGED
|
@@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import {StyleSheet, FlatList, SectionList, ScrollView} from 'react-native';
|
|
5
5
|
import {ViewPropTypes} from 'deprecated-react-native-prop-types';
|
|
6
6
|
import {Navigation} from 'react-native-navigation';
|
|
7
|
-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
|
|
8
7
|
import {
|
|
9
8
|
Assets,
|
|
10
9
|
Colors,
|
|
@@ -462,4 +461,4 @@ const styles = StyleSheet.create({
|
|
|
462
461
|
searchResultsContainer: {paddingTop: 20}
|
|
463
462
|
});
|
|
464
463
|
|
|
465
|
-
export default
|
|
464
|
+
export default MainScreen;
|
|
@@ -60,22 +60,26 @@ export default class ColorSwatchScreen extends Component {
|
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
62
|
<ScrollView>
|
|
63
|
-
<View flex center
|
|
63
|
+
<View flex center paddingT-s5>
|
|
64
64
|
<Text margin-5 text60>
|
|
65
65
|
Single ColorSwatch
|
|
66
66
|
</Text>
|
|
67
|
-
<View row>
|
|
67
|
+
<View row spread gap-15>
|
|
68
68
|
<View>
|
|
69
69
|
<ColorSwatch selected={selected} onPress={this.onPress}/>
|
|
70
70
|
</View>
|
|
71
|
-
<View>
|
|
72
|
-
<ColorSwatch color={Colors.$backgroundMajorLight}/>
|
|
73
|
-
<Text text90R>Disabled</Text>
|
|
74
|
-
</View>
|
|
75
71
|
<View>
|
|
76
72
|
<ColorSwatch unavailable onPress={this.unavailableOnPress} color={Colors.yellow10}/>
|
|
77
73
|
<Text text90R>Unavailable</Text>
|
|
78
74
|
</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>
|
|
79
83
|
</View>
|
|
80
84
|
|
|
81
85
|
<Text marginT-20 text60>
|
|
@@ -2,11 +2,9 @@ import _ from 'lodash';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React, {Component, PureComponent} from 'react';
|
|
4
4
|
import {StyleSheet, Alert, FlatList} from 'react-native';
|
|
5
|
-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
|
|
6
5
|
import {Colors, ListItem, Text, Avatar, AvatarHelper, Drawer, Button} from 'react-native-ui-lib'; //eslint-disable-line
|
|
7
6
|
import conversations from '../../data/conversations';
|
|
8
7
|
|
|
9
|
-
|
|
10
8
|
const collectionsIcon = require('../../assets/icons/collections.png');
|
|
11
9
|
const starIcon = require('../../assets/icons/star.png');
|
|
12
10
|
const shareIcon = require('../../assets/icons/share.png');
|
|
@@ -47,7 +45,7 @@ class ConversationListScreen extends Component {
|
|
|
47
45
|
icon: collectionsIcon,
|
|
48
46
|
background: Colors.blue30,
|
|
49
47
|
onPress: () => Alert.alert(`Archive button pressed for item #${item.name}`)
|
|
50
|
-
}
|
|
48
|
+
}
|
|
51
49
|
];
|
|
52
50
|
const leftButton = {
|
|
53
51
|
text: 'Read',
|
|
@@ -94,19 +92,19 @@ class ConversationListScreen extends Component {
|
|
|
94
92
|
|
|
95
93
|
addRef = (ref, index) => {
|
|
96
94
|
this.refArray[index] = ref;
|
|
97
|
-
}
|
|
95
|
+
};
|
|
98
96
|
|
|
99
97
|
onEndReached = () => {
|
|
100
98
|
this.getNewItems();
|
|
101
|
-
}
|
|
99
|
+
};
|
|
102
100
|
|
|
103
101
|
onSwipeableWillOpen = (props) => {
|
|
104
102
|
this.closeLast(props.index);
|
|
105
|
-
}
|
|
103
|
+
};
|
|
106
104
|
|
|
107
105
|
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
|
+
};
|
|
110
108
|
|
|
111
109
|
keyExtractor = (item, index) => `${item.name}-${index}`;
|
|
112
110
|
|
|
@@ -128,7 +126,7 @@ class ContactItem extends PureComponent {
|
|
|
128
126
|
index: PropTypes.number,
|
|
129
127
|
addRef: PropTypes.func,
|
|
130
128
|
onSwipeableWillOpen: PropTypes.func
|
|
131
|
-
}
|
|
129
|
+
};
|
|
132
130
|
|
|
133
131
|
render() {
|
|
134
132
|
const {item, index, addRef, onSwipeableWillOpen} = this.props;
|
|
@@ -192,4 +190,4 @@ const styles = StyleSheet.create({
|
|
|
192
190
|
}
|
|
193
191
|
});
|
|
194
192
|
|
|
195
|
-
export default
|
|
193
|
+
export default ConversationListScreen;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
2
|
import {StyleSheet, ScrollView, LayoutAnimation} from 'react-native';
|
|
3
3
|
import {Assets, Colors, Typography, View, Drawer, Text, Button, Avatar, Badge, DrawerProps} from 'react-native-ui-lib';
|
|
4
|
-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
|
|
5
4
|
import conversations from '../../data/conversations';
|
|
6
5
|
|
|
7
6
|
import {renderBooleanOption, renderSliderOption, renderColorOption} from '../ExampleScreenPresenter';
|
|
@@ -325,4 +324,4 @@ const styles = StyleSheet.create({
|
|
|
325
324
|
}
|
|
326
325
|
});
|
|
327
326
|
|
|
328
|
-
export default
|
|
327
|
+
export default DrawerScreen;
|
|
@@ -38,7 +38,7 @@ const IconScreen = () => {
|
|
|
38
38
|
</View>
|
|
39
39
|
|
|
40
40
|
{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}/>
|
|
42
42
|
<Text marginB-50 marginT-s2>
|
|
43
43
|
Custom size: {size}
|
|
44
44
|
</Text>
|
|
@@ -48,7 +48,7 @@ const IconScreen = () => {
|
|
|
48
48
|
state: customBadgeSize,
|
|
49
49
|
setState: setCustomBadgeSize
|
|
50
50
|
})}
|
|
51
|
-
<Slider maximumValue={100} value={20} step={1} onValueChange={setBadgeSize}/>
|
|
51
|
+
<Slider migrate maximumValue={100} value={20} step={1} onValueChange={setBadgeSize}/>
|
|
52
52
|
<Text marginB-50 marginT-s2>
|
|
53
53
|
Custom badge size: {badgeSize}
|
|
54
54
|
</Text>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, {useState, useCallback, useRef, useMemo} from 'react';
|
|
2
2
|
import {StyleSheet, TouchableWithoutFeedback, Keyboard as RNKeyboard} from 'react-native';
|
|
3
|
-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
|
|
4
3
|
import {
|
|
5
4
|
Text,
|
|
6
5
|
Spacings,
|
|
@@ -200,7 +199,7 @@ const NumberInputScreen = () => {
|
|
|
200
199
|
);
|
|
201
200
|
};
|
|
202
201
|
|
|
203
|
-
export default
|
|
202
|
+
export default NumberInputScreen;
|
|
204
203
|
|
|
205
204
|
const styles = StyleSheet.create({
|
|
206
205
|
containerStyle: {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import React, {Component} from 'react';
|
|
3
|
-
import {ScrollView} from 'react-native
|
|
3
|
+
import {ScrollView} from 'react-native';
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
Assets,
|
|
6
6
|
Colors,
|
|
7
|
-
|
|
7
|
+
Typography,
|
|
8
8
|
Incubator,
|
|
9
|
+
View,
|
|
9
10
|
Text,
|
|
10
|
-
|
|
11
|
+
Button,
|
|
12
|
+
Icon,
|
|
11
13
|
Avatar,
|
|
12
|
-
|
|
14
|
+
Picker,
|
|
13
15
|
PanningProvider,
|
|
14
|
-
Typography,
|
|
15
16
|
PickerProps,
|
|
16
17
|
RenderCustomModalProps,
|
|
17
|
-
PickerMethods
|
|
18
|
-
Button
|
|
18
|
+
PickerMethods
|
|
19
19
|
} from 'react-native-ui-lib'; //eslint-disable-line
|
|
20
20
|
import contactsData from '../../data/conversations';
|
|
21
21
|
import {longOptions} from './PickerScreenLongOptions';
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {ScrollView} from 'react-native';
|
|
3
|
+
import {View, Text, Stepper, type StepperType, Image} from 'react-native-ui-lib'; //eslint-disable-line
|
|
4
|
+
import {renderMultipleSegmentOptions} from '../ExampleScreenPresenter';
|
|
5
|
+
|
|
6
|
+
const IMAGE_URL =
|
|
7
|
+
'https://images.pexels.com/photos/2529148/pexels-photo-2529148.jpeg?auto=compress&cs=tinysrgb&w=600&&dpr=1';
|
|
3
8
|
|
|
4
9
|
export default class StepperScreen extends Component {
|
|
5
10
|
state = {
|
|
6
|
-
stepperValue: 1
|
|
11
|
+
stepperValue: 1,
|
|
12
|
+
stepperType: 'default' as StepperType
|
|
7
13
|
};
|
|
8
14
|
|
|
9
15
|
stepperProps = {
|
|
@@ -17,73 +23,96 @@ export default class StepperScreen extends Component {
|
|
|
17
23
|
};
|
|
18
24
|
|
|
19
25
|
render() {
|
|
20
|
-
const {stepperValue} = this.state;
|
|
26
|
+
const {stepperValue, stepperType} = this.state;
|
|
21
27
|
|
|
22
28
|
return (
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
<ScrollView>
|
|
30
|
+
<View padding-page>
|
|
31
|
+
<Text text40 $textDefault>
|
|
32
|
+
Stepper
|
|
33
|
+
</Text>
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</Text>
|
|
33
|
-
<Stepper/>
|
|
34
|
-
</View>
|
|
35
|
+
{renderMultipleSegmentOptions.call(this, 'Stepper Type', 'stepperType', [
|
|
36
|
+
{label: 'Default', value: 'default'},
|
|
37
|
+
{label: 'Floating', value: 'floating'}
|
|
38
|
+
])}
|
|
35
39
|
|
|
36
|
-
<View
|
|
37
|
-
<Text text70 $textDefault>
|
|
38
|
-
Disabled
|
|
39
|
-
</Text>
|
|
40
|
-
<Stepper disabled/>
|
|
41
|
-
</View>
|
|
42
|
-
|
|
43
|
-
<View row spread marginT-30>
|
|
44
|
-
<Text text70 $textDefault>
|
|
45
|
-
Step (0.5)
|
|
46
|
-
</Text>
|
|
47
|
-
<Stepper step={0.5}/>
|
|
48
|
-
</View>
|
|
49
|
-
|
|
50
|
-
<View row spread marginT-30>
|
|
51
|
-
<Text text70 $textDefault>
|
|
52
|
-
Small
|
|
53
|
-
</Text>
|
|
54
|
-
<Stepper small/>
|
|
55
|
-
</View>
|
|
56
|
-
|
|
57
|
-
<View marginT-30>
|
|
40
|
+
<View centerV marginT-s3>
|
|
58
41
|
<View row spread centerV>
|
|
59
42
|
<Text text70 $textDefault>
|
|
60
|
-
|
|
43
|
+
Default
|
|
61
44
|
</Text>
|
|
62
|
-
<Stepper
|
|
63
|
-
onValueChange={this.onValueChange}
|
|
64
|
-
maxValue={this.stepperProps.maxValue}
|
|
65
|
-
minValue={this.stepperProps.minValue}
|
|
66
|
-
value={stepperValue}
|
|
67
|
-
testID={'Stepper1'}
|
|
68
|
-
/>
|
|
45
|
+
<Stepper type={stepperType}/>
|
|
69
46
|
</View>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<Text $textDefault marginT-3>
|
|
75
|
-
Initial value: {this.stepperProps.value}
|
|
47
|
+
|
|
48
|
+
<View row spread centerV marginT-30>
|
|
49
|
+
<Text text70 $textDefault>
|
|
50
|
+
Disabled
|
|
76
51
|
</Text>
|
|
77
|
-
<
|
|
78
|
-
|
|
52
|
+
<Stepper disabled type={stepperType}/>
|
|
53
|
+
</View>
|
|
54
|
+
|
|
55
|
+
<View row spread marginT-30>
|
|
56
|
+
<Text text70 $textDefault>
|
|
57
|
+
Step (0.5)
|
|
79
58
|
</Text>
|
|
80
|
-
<
|
|
81
|
-
|
|
59
|
+
<Stepper step={0.5} type={stepperType}/>
|
|
60
|
+
</View>
|
|
61
|
+
|
|
62
|
+
<View row spread marginT-30>
|
|
63
|
+
<Text text70 $textDefault>
|
|
64
|
+
Small
|
|
82
65
|
</Text>
|
|
66
|
+
<Stepper small type={stepperType}/>
|
|
67
|
+
</View>
|
|
68
|
+
|
|
69
|
+
<View marginT-30>
|
|
70
|
+
<View row spread centerV>
|
|
71
|
+
<Text text70 $textDefault>
|
|
72
|
+
Custom
|
|
73
|
+
</Text>
|
|
74
|
+
<Stepper
|
|
75
|
+
type={stepperType}
|
|
76
|
+
onValueChange={this.onValueChange}
|
|
77
|
+
maxValue={this.stepperProps.maxValue}
|
|
78
|
+
minValue={this.stepperProps.minValue}
|
|
79
|
+
value={stepperValue}
|
|
80
|
+
testID={'Stepper1'}
|
|
81
|
+
/>
|
|
82
|
+
</View>
|
|
83
|
+
<View padding-5>
|
|
84
|
+
<Text text80M $textDefault>
|
|
85
|
+
Stepper value: {stepperValue}
|
|
86
|
+
</Text>
|
|
87
|
+
<Text $textDefault marginT-3>
|
|
88
|
+
Initial value: {this.stepperProps.value}
|
|
89
|
+
</Text>
|
|
90
|
+
<Text $textDefault marginT-3>
|
|
91
|
+
Min value: {this.stepperProps.minValue}
|
|
92
|
+
</Text>
|
|
93
|
+
<Text $textDefault marginT-3>
|
|
94
|
+
Max value: {this.stepperProps.maxValue}
|
|
95
|
+
</Text>
|
|
96
|
+
</View>
|
|
83
97
|
</View>
|
|
84
98
|
</View>
|
|
99
|
+
|
|
100
|
+
<View marginT-s5 centerH>
|
|
101
|
+
<Text text70BO marginB-s2>
|
|
102
|
+
Floating Stepper
|
|
103
|
+
</Text>
|
|
104
|
+
<Image
|
|
105
|
+
source={{uri: IMAGE_URL}}
|
|
106
|
+
style={{width: 200, height: 200, borderRadius: 8, overflow: 'hidden'}}
|
|
107
|
+
customOverlayContent={
|
|
108
|
+
<View style={{position: 'absolute', top: 8, right: 8}}>
|
|
109
|
+
<Stepper type="floating"/>
|
|
110
|
+
</View>
|
|
111
|
+
}
|
|
112
|
+
/>
|
|
113
|
+
</View>
|
|
85
114
|
</View>
|
|
86
|
-
</
|
|
115
|
+
</ScrollView>
|
|
87
116
|
);
|
|
88
117
|
}
|
|
89
118
|
}
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
TabControllerItemProps,
|
|
12
12
|
TabControllerImperativeMethods
|
|
13
13
|
} from 'react-native-ui-lib';
|
|
14
|
-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
|
|
15
14
|
|
|
16
15
|
import Tab1 from './tab1';
|
|
17
16
|
import Tab2 from './tab2';
|
|
@@ -224,7 +223,7 @@ class TabControllerScreen extends Component<{}, State> {
|
|
|
224
223
|
}
|
|
225
224
|
}
|
|
226
225
|
|
|
227
|
-
export default
|
|
226
|
+
export default TabControllerScreen;
|
|
228
227
|
|
|
229
228
|
const styles = StyleSheet.create({
|
|
230
229
|
labelStyle: {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
|
|
2
|
-
|
|
3
1
|
export function registerScreens(registrar) {
|
|
4
|
-
|
|
5
2
|
registrar('unicorn.components.ActionSheetScreen', () => require('./ActionSheetScreen').default);
|
|
6
3
|
registrar('unicorn.components.ActionBarScreen', () => require('./ActionBarScreen').default);
|
|
7
4
|
registrar('unicorn.components.AvatarsScreen', () => require('./AvatarsScreen').default);
|
|
@@ -15,7 +12,7 @@ export function registerScreens(registrar) {
|
|
|
15
12
|
registrar('unicorn.components.CheckboxScreen', () => require('./CheckboxScreen').default);
|
|
16
13
|
registrar('unicorn.components.ChipScreen', () => require('./ChipScreen').default);
|
|
17
14
|
registrar('unicorn.components.ChipsInputScreen', () => require('./ChipsInputScreen').default);
|
|
18
|
-
registrar('unicorn.components.ColorPickerScreen', () =>
|
|
15
|
+
registrar('unicorn.components.ColorPickerScreen', () => require('./ColorPickerScreen').default);
|
|
19
16
|
registrar('unicorn.components.ColorSwatchScreen', () => require('./ColorSwatchScreen').default);
|
|
20
17
|
registrar('unicorn.components.ConnectionStatusBar', () => require('./ConnectionStatusBarScreen').default);
|
|
21
18
|
registrar('unicorn.components.DateTimePickerScreen', () => require('./DateTimePickerScreen').default);
|
|
@@ -28,7 +25,7 @@ export function registerScreens(registrar) {
|
|
|
28
25
|
registrar('unicorn.components.IconScreen', () => require('./IconScreen').default);
|
|
29
26
|
registrar('unicorn.components.ImageScreen', () => require('./ImageScreen').default);
|
|
30
27
|
registrar('unicorn.components.GridListScreen', () => require('./GridListScreen').default);
|
|
31
|
-
registrar('unicorn.components.GridViewScreen', () =>
|
|
28
|
+
registrar('unicorn.components.GridViewScreen', () => require('./GridViewScreen').default);
|
|
32
29
|
registrar('unicorn.components.KeyboardAwareScrollViewScreen', () => require('./KeyboardAwareScrollViewScreen').default);
|
|
33
30
|
registrar('unicorn.components.MaskedInputScreen', () => require('./MaskedInputScreen').default);
|
|
34
31
|
registrar('unicorn.components.MarqueeScreen', () => require('./MarqueeScreen').default);
|
|
@@ -38,12 +35,12 @@ export function registerScreens(registrar) {
|
|
|
38
35
|
registrar('unicorn.components.PanDismissibleScreen', () => require('./PanDismissibleScreen').default);
|
|
39
36
|
registrar('unicorn.components.PanListenerScreen', () => require('./PanListenerScreen').default);
|
|
40
37
|
registrar('unicorn.components.PanResponderScreen', () => require('./PanResponderScreen').default);
|
|
41
|
-
registrar('unicorn.components.PickerScreen', () =>
|
|
38
|
+
registrar('unicorn.components.PickerScreen', () => require('./PickerScreen').default);
|
|
42
39
|
registrar('unicorn.animations.ProgressBarScreen', () => require('../componentScreens/ProgressBarScreen').default);
|
|
43
40
|
registrar('unicorn.components.ProgressiveImageScreen', () => require('./ProgressiveImageScreen').default);
|
|
44
41
|
registrar('unicorn.components.RadioButtonScreen', () => require('./RadioButtonScreen').default);
|
|
45
42
|
registrar('unicorn.components.ScrollBarScreen', () => require('./ScrollBarScreen').default);
|
|
46
|
-
registrar('unicorn.components.SectionsWheelPickerScreen', () =>
|
|
43
|
+
registrar('unicorn.components.SectionsWheelPickerScreen', () => require('./SectionsWheelPickerScreen').default);
|
|
47
44
|
registrar('unicorn.components.SegmentedControlScreen', () => require('./SegmentedControlScreen').default);
|
|
48
45
|
registrar('unicorn.components.SharedTransitionScreen', () => require('./SharedTransitionScreen').default);
|
|
49
46
|
registrar('unicorn.components.SkeletonViewScreen', () => require('./SkeletonViewScreen').default);
|
|
@@ -55,7 +52,7 @@ export function registerScreens(registrar) {
|
|
|
55
52
|
registrar('unicorn.components.StepperScreen', () => require('./StepperScreen').default);
|
|
56
53
|
registrar('unicorn.components.SwitchScreen', () => require('./SwitchScreen').default);
|
|
57
54
|
registrar('unicorn.components.TabControllerScreen', () => require('./TabControllerScreen').default);
|
|
58
|
-
registrar('unicorn.components.TabControllerWithStickyHeaderScreen', () =>
|
|
55
|
+
registrar('unicorn.components.TabControllerWithStickyHeaderScreen', () => require('./TabControllerWithStickyHeaderScreen').default);
|
|
59
56
|
registrar('unicorn.components.TextFieldScreen', () => require('./TextFieldScreen').default);
|
|
60
57
|
registrar('unicorn.components.TextScreen', () => require('./TextScreen').default);
|
|
61
58
|
registrar('unicorn.components.ToastsScreen', () => require('./ToastsScreen').default);
|
|
@@ -63,7 +60,7 @@ export function registerScreens(registrar) {
|
|
|
63
60
|
registrar('unicorn.components.TourScreen', () => require('./TourScreen').default);
|
|
64
61
|
registrar('unicorn.components.ViewScreen', () => require('./ViewScreen').default);
|
|
65
62
|
registrar('unicorn.components.WizardScreen', () => require('./WizardScreen').default);
|
|
66
|
-
registrar('unicorn.components.WheelPickerScreen', () =>
|
|
63
|
+
registrar('unicorn.components.WheelPickerScreen', () => require('./WheelPickerScreen').default);
|
|
67
64
|
// List Components
|
|
68
65
|
registrar('unicorn.lists.BasicListScreen', () => require('./BasicListScreen').default);
|
|
69
66
|
registrar('unicorn.lists.ContactsListScreen', () => require('./ContactsListScreen').default);
|
|
@@ -78,4 +75,3 @@ export function registerScreens(registrar) {
|
|
|
78
75
|
registrar('unicorn.components.WithScrollEnablerScreen', () => require('./WithScrollEnablerScreen').default);
|
|
79
76
|
registrar('unicorn.components.WithScrollReachedScreen', () => require('./WithScrollReachedScreen').default);
|
|
80
77
|
}
|
|
81
|
-
|
|
@@ -2,7 +2,6 @@ import React, {Component} from 'react';
|
|
|
2
2
|
import {ScrollView, StyleSheet} from 'react-native';
|
|
3
3
|
import {Assets, Colors, View, Button, Text, Incubator} from 'react-native-ui-lib';
|
|
4
4
|
import {renderMultipleSegmentOptions, renderBooleanOption, renderRadioGroup} from '../ExampleScreenPresenter';
|
|
5
|
-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
|
|
6
5
|
|
|
7
6
|
const {Toast} = Incubator;
|
|
8
7
|
|
|
@@ -180,7 +179,7 @@ class ToastsScreen extends Component {
|
|
|
180
179
|
}
|
|
181
180
|
}
|
|
182
181
|
|
|
183
|
-
export default
|
|
182
|
+
export default ToastsScreen;
|
|
184
183
|
|
|
185
184
|
const styles = StyleSheet.create({
|
|
186
185
|
scrollView: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
2
|
import {StyleSheet, ScrollView} from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import {FlatList} from 'react-native-gesture-handler';
|
|
4
4
|
import {
|
|
5
5
|
Assets,
|
|
6
6
|
View,
|
|
@@ -147,7 +147,7 @@ class PanViewScreen extends Component {
|
|
|
147
147
|
render() {
|
|
148
148
|
const {showToast, showDialog} = this.state;
|
|
149
149
|
return (
|
|
150
|
-
<
|
|
150
|
+
<View style={styles.root}>
|
|
151
151
|
<View marginL-page height={50} centerV>
|
|
152
152
|
<Text text50>New Pan View</Text>
|
|
153
153
|
</View>
|
|
@@ -163,7 +163,7 @@ class PanViewScreen extends Component {
|
|
|
163
163
|
</ScrollView>
|
|
164
164
|
{showToast && this.renderToast()}
|
|
165
165
|
{showDialog && this.renderDialog()}
|
|
166
|
-
</
|
|
166
|
+
</View>
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
|
|
2
|
-
|
|
3
1
|
export function registerScreens(registrar) {
|
|
4
2
|
registrar('unicorn.components.IncubatorCalendarScreen', () => require('./IncubatorCalendarScreen').default);
|
|
5
|
-
registrar('unicorn.incubator.TouchableOpacityScreen', () =>
|
|
6
|
-
gestureHandlerRootHOC(require('./TouchableOpacityScreen').default));
|
|
3
|
+
registrar('unicorn.incubator.TouchableOpacityScreen', () => require('./TouchableOpacityScreen').default);
|
|
7
4
|
registrar('unicorn.incubator.IncubatorDialogScreen', () => require('./IncubatorDialogScreen').default);
|
|
8
5
|
registrar('unicorn.components.IncubatorExpandableOverlayScreen', () => require('./IncubatorExpandableOverlayScreen').default);
|
|
9
6
|
registrar('unicorn.components.IncubatorToastScreen', () => require('./IncubatorToastScreen').default);
|
|
10
7
|
registrar('unicorn.incubator.PanViewScreen', () => require('./PanViewScreen').default);
|
|
11
|
-
registrar('unicorn.components.IncubatorSliderScreen', () =>
|
|
8
|
+
registrar('unicorn.components.IncubatorSliderScreen', () => require('./IncubatorSliderScreen').default);
|
|
12
9
|
}
|
package/src/screens/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
|
|
2
|
-
|
|
3
1
|
export function registerScreens(registrar) {
|
|
4
2
|
// load demo app presets
|
|
5
3
|
require('../configurations').loadDemoConfigurations();
|
|
@@ -11,7 +9,7 @@ export function registerScreens(registrar) {
|
|
|
11
9
|
require('./incubatorScreens').registerScreens(registrar);
|
|
12
10
|
|
|
13
11
|
registrar('unicorn.MainScreen', () => require('./MainScreen').default);
|
|
14
|
-
registrar('unicorn.PlaygroundScreen', () =>
|
|
12
|
+
registrar('unicorn.PlaygroundScreen', () => require('./PlaygroundScreen').default);
|
|
15
13
|
registrar('unicorn.Settings', () => require('./SettingsScreen').default);
|
|
16
14
|
|
|
17
15
|
}
|
|
@@ -93,7 +93,7 @@ class Pinterest extends Component<{}, State> {
|
|
|
93
93
|
activeScale={0.98}
|
|
94
94
|
activeOpacity={1}
|
|
95
95
|
>
|
|
96
|
-
<Image style={[styles.image, {aspectRatio: image
|
|
96
|
+
<Image style={[styles.image, {aspectRatio: image?.aspectRatio}]} source={{uri: image.uri}} width={COLUMN_SIZE}/>
|
|
97
97
|
<View absF bottom right pointerEvents="none" padding-s2>
|
|
98
98
|
<Button
|
|
99
99
|
iconSource={Assets.icons.demo.plus}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
|
|
2
|
-
|
|
3
1
|
export function registerScreens(registrar) {
|
|
4
2
|
registrar('unicorn.examples.AppleMusic', () => require('./AppleMusic').default);
|
|
5
|
-
registrar('unicorn.examples.Pinterest', () =>
|
|
6
|
-
|
|
7
|
-
registrar('unicorn.examples.ListActionsScreen',
|
|
8
|
-
() => require('./ListActions/ListActionsScreen').default);
|
|
3
|
+
registrar('unicorn.examples.Pinterest', () => require('./Pinterest').default);
|
|
4
|
+
registrar('unicorn.examples.ListActionsScreen', () => require('./ListActions/ListActionsScreen').default);
|
|
9
5
|
registrar('unicorn.examples.ProductPage', () => require('./ProductPage').default);
|
|
10
6
|
registrar('unicorn.examples.Twitter', () => require('./Twitter').default);
|
|
11
7
|
}
|