unicorn-demo-app 7.44.0-snapshot.7249 → 7.45.0-snapshot.7253
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 +2 -2
- package/src/index.js +3 -19
- package/src/screens/MenuStructure.js +13 -22
- package/src/screens/__tests__/__snapshots__/TextFieldScreen.spec.js.snap +96 -30
- package/src/screens/componentScreens/ActionSheetScreen.tsx +0 -2
- package/src/screens/componentScreens/AnimatedImageScreen.js +2 -2
- package/src/screens/componentScreens/CarouselVerticalScreen.tsx +2 -2
- package/src/screens/componentScreens/DateTimePickerScreen.tsx +0 -5
- package/src/screens/{incubatorScreens/IncubatorDialogScreen.tsx → componentScreens/DialogScreen.tsx} +6 -6
- package/src/screens/{incubatorScreens → componentScreens}/PanViewScreen.tsx +4 -5
- package/src/screens/componentScreens/PickerScreen.tsx +4 -5
- package/src/screens/componentScreens/SortableListScreen.tsx +1 -1
- package/src/screens/componentScreens/StackAggregatorScreen.tsx +1 -1
- package/src/screens/componentScreens/TabControllerScreen/tab3.tsx +1 -1
- package/src/screens/componentScreens/WheelPickerScreen.tsx +3 -3
- package/src/screens/componentScreens/index.js +1 -4
- package/src/screens/incubatorScreens/IncubatorExpandableOverlayScreen.tsx +0 -1
- package/src/screens/incubatorScreens/index.js +0 -2
- package/src/screens/nativeComponentScreens/HighlightOverlayViewScreen.js +4 -1
- package/src/screens/nativeComponentScreens/SafeAreaSpacerViewScreen.tsx +1 -0
- package/src/screens/componentScreens/DialogScreen.js +0 -343
- package/src/screens/componentScreens/PanDismissibleScreen.tsx +0 -112
- package/src/screens/componentScreens/PanListenerScreen.tsx +0 -63
- package/src/screens/componentScreens/PanResponderScreen.tsx +0 -99
- package/src/screens/componentScreens/SharedTransitionScreen.js +0 -143
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unicorn-demo-app",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.45.0-snapshot.7253",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"author": "Ethan Sharabi <ethan.shar@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^18.2.0",
|
|
26
|
-
"react-native": "^0.
|
|
26
|
+
"react-native": "^0.76.9",
|
|
27
27
|
"react-native-ui-lib": "*",
|
|
28
28
|
"semver": "^5.5.0"
|
|
29
29
|
}
|
package/src/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {I18nManager} from 'react-native';
|
|
2
2
|
import {navigationData as menuStructure} from './screens/MenuStructure';
|
|
3
3
|
import {loadDemoConfigurations} from './configurations';
|
|
4
4
|
|
|
5
|
-
UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true); // eslint-disable-line
|
|
6
5
|
I18nManager.allowRTL(true);
|
|
7
6
|
|
|
8
7
|
module.exports = {
|
|
@@ -87,15 +86,6 @@ module.exports = {
|
|
|
87
86
|
get PageControlScreen() {
|
|
88
87
|
return require('./screens/componentScreens/PageControlScreen').default;
|
|
89
88
|
},
|
|
90
|
-
get PanDismissibleScreen() {
|
|
91
|
-
return require('./screens/componentScreens/PanDismissibleScreen').default;
|
|
92
|
-
},
|
|
93
|
-
get PanListenerScreen() {
|
|
94
|
-
return require('./screens/componentScreens/PanListenerScreen').default;
|
|
95
|
-
},
|
|
96
|
-
get PanResponderScreen() {
|
|
97
|
-
return require('./screens/componentScreens/PanResponderScreen').default;
|
|
98
|
-
},
|
|
99
89
|
get PickerScreen() {
|
|
100
90
|
return require('./screens/componentScreens/PickerScreen').default;
|
|
101
91
|
},
|
|
@@ -108,9 +98,6 @@ module.exports = {
|
|
|
108
98
|
get SegmentedControlScreen() {
|
|
109
99
|
return require('./screens/componentScreens/SegmentedControlScreen').default;
|
|
110
100
|
},
|
|
111
|
-
get SharedTransitionScreen() {
|
|
112
|
-
return require('./screens/componentScreens/SharedTransitionScreen').default;
|
|
113
|
-
},
|
|
114
101
|
get SkeletonViewScreen() {
|
|
115
102
|
return require('./screens/componentScreens/SkeletonViewScreen').default;
|
|
116
103
|
},
|
|
@@ -244,16 +231,13 @@ module.exports = {
|
|
|
244
231
|
get SortableGridList() {
|
|
245
232
|
return require('./screens/componentScreens/SortableGridListScreen').default;
|
|
246
233
|
},
|
|
247
|
-
// Incubator
|
|
248
234
|
get PanViewScreen() {
|
|
249
|
-
return require('./screens/
|
|
235
|
+
return require('./screens/componentScreens/PanViewScreen').default;
|
|
250
236
|
},
|
|
237
|
+
// Incubator
|
|
251
238
|
get IncubatorSlider() {
|
|
252
239
|
return require('./screens/incubatorScreens/IncubatorSliderScreen').default;
|
|
253
240
|
},
|
|
254
|
-
get IncubatorDialog() {
|
|
255
|
-
return require('./screens/incubatorScreens/IncubatorDialogScreen').default;
|
|
256
|
-
},
|
|
257
241
|
get IncubatorToast() {
|
|
258
242
|
return require('./screens/incubatorScreens/IncubatorToastScreen').default;
|
|
259
243
|
},
|
|
@@ -39,11 +39,6 @@ export const navigationData = {
|
|
|
39
39
|
{title: 'ProgressBar', tags: 'progress bar animated', screen: 'unicorn.animations.ProgressBarScreen'},
|
|
40
40
|
{title: 'ScrollBar', tags: 'scroll bar gradient', screen: 'unicorn.components.ScrollBarScreen'},
|
|
41
41
|
{title: 'SearchInputScreen', tags: 'search input', screen: 'unicorn.components.SearchInputScreen'},
|
|
42
|
-
{
|
|
43
|
-
title: 'Shared Transition',
|
|
44
|
-
tags: 'shared transition element',
|
|
45
|
-
screen: 'unicorn.components.SharedTransitionScreen'
|
|
46
|
-
},
|
|
47
42
|
{title: 'Stack Aggregator', tags: 'stack aggregator', screen: 'unicorn.components.StackAggregatorScreen'},
|
|
48
43
|
{title: 'Marquee', tags: 'sliding text', screen: 'unicorn.components.MarqueeScreen'}
|
|
49
44
|
]
|
|
@@ -86,7 +81,7 @@ export const navigationData = {
|
|
|
86
81
|
screens: [
|
|
87
82
|
{title: 'Action Sheet', tags: 'action sheet cross-platform', screen: 'unicorn.components.ActionSheetScreen'},
|
|
88
83
|
{title: 'Dialog', tags: 'dialog modal popup alert', screen: 'unicorn.components.DialogScreen'},
|
|
89
|
-
{title: 'Feature Highlight', tags: 'feature overlay', screen: 'unicorn.components.FeatureHighlightScreen'},
|
|
84
|
+
{title: 'Feature Highlight', tags: 'native feature overlay', screen: 'unicorn.components.FeatureHighlightScreen'},
|
|
90
85
|
{title: 'Floating Button', tags: 'floating button', screen: 'unicorn.components.FloatingButtonScreen'},
|
|
91
86
|
{title: 'Hint', tags: 'hints tooltip', screen: 'unicorn.components.HintsScreen'},
|
|
92
87
|
{title: 'Toast', tags: 'toast top bottom snackbar', screen: 'unicorn.components.ToastsScreen'}
|
|
@@ -122,10 +117,10 @@ export const navigationData = {
|
|
|
122
117
|
{title: 'LoadingScreen', tags: 'loading screen', screen: 'unicorn.screens.LoadingScreen'},
|
|
123
118
|
{title: 'Modal', tags: 'modal topbar screen', screen: 'unicorn.screens.ModalScreen'},
|
|
124
119
|
{title: 'StateScreen', tags: 'empty state screen', screen: 'unicorn.screens.EmptyStateScreen'},
|
|
125
|
-
{title: 'TabController', tags: 'tabbar controller
|
|
120
|
+
{title: 'TabController', tags: 'tabbar controller', screen: 'unicorn.components.TabControllerScreen'},
|
|
126
121
|
{
|
|
127
122
|
title: 'TabControllerWithStickyHeader',
|
|
128
|
-
tags: 'tabbar controller
|
|
123
|
+
tags: 'tabbar controller sticky header',
|
|
129
124
|
screen: 'unicorn.components.TabControllerWithStickyHeaderScreen'
|
|
130
125
|
},
|
|
131
126
|
{title: 'Timeline', tags: 'timeline', screen: 'unicorn.components.TimelineScreen'},
|
|
@@ -153,28 +148,28 @@ export const navigationData = {
|
|
|
153
148
|
screens: [
|
|
154
149
|
{
|
|
155
150
|
title: 'KeyboardAwareScrollView',
|
|
156
|
-
tags: 'KeyboardAwareScrollView',
|
|
151
|
+
tags: 'native KeyboardAwareScrollView',
|
|
157
152
|
screen: 'unicorn.components.KeyboardAwareScrollViewScreen'
|
|
158
153
|
},
|
|
159
154
|
{
|
|
160
155
|
title: 'Dynamic Fonts',
|
|
161
|
-
tags: 'dynamic fonts load download',
|
|
156
|
+
tags: 'native dynamic fonts load download',
|
|
162
157
|
screen: 'unicorn.nativeComponents.DynamicFontsScreen'
|
|
163
158
|
},
|
|
164
159
|
{
|
|
165
160
|
title: 'Highlight Overlay',
|
|
166
|
-
tags: 'native overlay',
|
|
161
|
+
tags: 'native native overlay',
|
|
167
162
|
screen: 'unicorn.nativeComponents.HighlightOverlayViewScreen'
|
|
168
163
|
},
|
|
169
164
|
{title: 'SafeArea Spacer', tags: 'native safe area', screen: 'unicorn.nativeComponents.SafeAreaSpacerViewScreen'},
|
|
170
165
|
{
|
|
171
166
|
title: 'KeyboardTracking (iOS)',
|
|
172
|
-
tags: 'KeyboardTracking',
|
|
167
|
+
tags: 'native KeyboardTracking',
|
|
173
168
|
screen: 'unicorn.nativeComponents.KeyboardTrackingViewScreen'
|
|
174
169
|
},
|
|
175
170
|
{
|
|
176
171
|
title: 'KeyboardAccessoryView',
|
|
177
|
-
tags: 'KeyboardInput',
|
|
172
|
+
tags: 'native KeyboardInput',
|
|
178
173
|
screen: 'unicorn.nativeComponents.KeyboardAccessoryViewScreen'
|
|
179
174
|
}
|
|
180
175
|
]
|
|
@@ -183,16 +178,14 @@ export const navigationData = {
|
|
|
183
178
|
title: 'Animations & Gestures',
|
|
184
179
|
screens: [
|
|
185
180
|
{title: 'Animated Image', tags: 'animated image', screen: 'unicorn.components.AnimatedImageScreen'},
|
|
181
|
+
{title: 'Card Scanner', tags: 'card scanner process', screen: 'unicorn.animations.CardScannerScreen'},
|
|
186
182
|
{title: 'Haptic feedback', tags: 'haptic feedback', screen: 'unicorn.components.HapticScreen'},
|
|
183
|
+
{title: 'PanView', tags: 'pan swipe drag', screen: 'unicorn.components.PanViewScreen'},
|
|
187
184
|
{
|
|
188
185
|
title: 'ProgressiveImage',
|
|
189
186
|
tags: 'progressive image cover overlay',
|
|
190
187
|
screen: 'unicorn.components.ProgressiveImageScreen'
|
|
191
|
-
}
|
|
192
|
-
{title: 'Card Scanner', tags: 'card scanner process', screen: 'unicorn.animations.CardScannerScreen'},
|
|
193
|
-
{title: 'Pan Dismissible', tags: 'pan swipe drag dismiss', screen: 'unicorn.components.PanDismissibleScreen'},
|
|
194
|
-
{title: 'Pan Listener', tags: 'pan swipe drag listener', screen: 'unicorn.components.PanListenerScreen'},
|
|
195
|
-
{title: 'Pan Responder', tags: 'pan swipe drag responder', screen: 'unicorn.components.PanResponderScreen'}
|
|
188
|
+
}
|
|
196
189
|
]
|
|
197
190
|
},
|
|
198
191
|
Incubator: {
|
|
@@ -200,15 +193,13 @@ export const navigationData = {
|
|
|
200
193
|
screens: [
|
|
201
194
|
{title: 'Calendar', tags: 'calendar', screen: 'unicorn.components.IncubatorCalendarScreen'},
|
|
202
195
|
{title: 'ChipsInput', tags: 'chips input', screen: 'unicorn.components.ChipsInputScreen'},
|
|
203
|
-
{title: 'Native TouchableOpacity', tags: 'touchable
|
|
204
|
-
{title: 'Dialog (New)', tags: 'dialog modal popup alert', screen: 'unicorn.incubator.IncubatorDialogScreen'},
|
|
196
|
+
{title: 'Native TouchableOpacity', tags: 'native touchable', screen: 'unicorn.incubator.TouchableOpacityScreen'},
|
|
205
197
|
{title: 'Toast (New)', tags: 'toast', screen: 'unicorn.components.IncubatorToastScreen'},
|
|
206
198
|
{
|
|
207
199
|
title: 'ExpandableOverlay',
|
|
208
200
|
tags: 'text field expandable input picker',
|
|
209
201
|
screen: 'unicorn.components.IncubatorExpandableOverlayScreen'
|
|
210
|
-
}
|
|
211
|
-
{title: 'PanView', tags: 'pan swipe drag', screen: 'unicorn.incubator.PanViewScreen'}
|
|
202
|
+
}
|
|
212
203
|
]
|
|
213
204
|
},
|
|
214
205
|
Inspirations: {
|
|
@@ -1522,16 +1522,38 @@ exports[`TextField Screen renders screen 1`] = `
|
|
|
1522
1522
|
numberOfLines={1}
|
|
1523
1523
|
onLayout={[Function]}
|
|
1524
1524
|
style={
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1525
|
+
[
|
|
1526
|
+
{
|
|
1527
|
+
"backgroundColor": "transparent",
|
|
1528
|
+
"color": "#20303C",
|
|
1529
|
+
"writingDirection": "ltr",
|
|
1530
|
+
},
|
|
1531
|
+
undefined,
|
|
1532
|
+
{
|
|
1533
|
+
"color": "#6E7881",
|
|
1534
|
+
},
|
|
1535
|
+
undefined,
|
|
1536
|
+
undefined,
|
|
1537
|
+
{},
|
|
1538
|
+
undefined,
|
|
1539
|
+
undefined,
|
|
1540
|
+
undefined,
|
|
1541
|
+
[
|
|
1542
|
+
{},
|
|
1543
|
+
[
|
|
1544
|
+
{},
|
|
1545
|
+
{
|
|
1546
|
+
"fontFamily": "System",
|
|
1547
|
+
"fontSize": 16,
|
|
1548
|
+
"fontWeight": "400",
|
|
1549
|
+
"lineHeight": 24,
|
|
1550
|
+
},
|
|
1551
|
+
],
|
|
1552
|
+
{
|
|
1553
|
+
"opacity": 0,
|
|
1554
|
+
},
|
|
1555
|
+
],
|
|
1556
|
+
]
|
|
1535
1557
|
}
|
|
1536
1558
|
testID="undefined.floatingPlaceholder"
|
|
1537
1559
|
>
|
|
@@ -2118,16 +2140,38 @@ exports[`TextField Screen renders screen 1`] = `
|
|
|
2118
2140
|
numberOfLines={1}
|
|
2119
2141
|
onLayout={[Function]}
|
|
2120
2142
|
style={
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2143
|
+
[
|
|
2144
|
+
{
|
|
2145
|
+
"backgroundColor": "transparent",
|
|
2146
|
+
"color": "#20303C",
|
|
2147
|
+
"writingDirection": "ltr",
|
|
2148
|
+
},
|
|
2149
|
+
undefined,
|
|
2150
|
+
{
|
|
2151
|
+
"color": "#20303C",
|
|
2152
|
+
},
|
|
2153
|
+
undefined,
|
|
2154
|
+
undefined,
|
|
2155
|
+
{},
|
|
2156
|
+
undefined,
|
|
2157
|
+
undefined,
|
|
2158
|
+
undefined,
|
|
2159
|
+
[
|
|
2160
|
+
{},
|
|
2161
|
+
[
|
|
2162
|
+
{},
|
|
2163
|
+
{
|
|
2164
|
+
"fontFamily": "System",
|
|
2165
|
+
"fontSize": 16,
|
|
2166
|
+
"fontWeight": "400",
|
|
2167
|
+
"lineHeight": 24,
|
|
2168
|
+
},
|
|
2169
|
+
],
|
|
2170
|
+
{
|
|
2171
|
+
"opacity": 0,
|
|
2172
|
+
},
|
|
2173
|
+
],
|
|
2174
|
+
]
|
|
2131
2175
|
}
|
|
2132
2176
|
testID="undefined.floatingPlaceholder"
|
|
2133
2177
|
>
|
|
@@ -2433,16 +2477,38 @@ exports[`TextField Screen renders screen 1`] = `
|
|
|
2433
2477
|
numberOfLines={1}
|
|
2434
2478
|
onLayout={[Function]}
|
|
2435
2479
|
style={
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2480
|
+
[
|
|
2481
|
+
{
|
|
2482
|
+
"backgroundColor": "transparent",
|
|
2483
|
+
"color": "#20303C",
|
|
2484
|
+
"writingDirection": "ltr",
|
|
2485
|
+
},
|
|
2486
|
+
undefined,
|
|
2487
|
+
{
|
|
2488
|
+
"color": "#20303C",
|
|
2489
|
+
},
|
|
2490
|
+
undefined,
|
|
2491
|
+
undefined,
|
|
2492
|
+
{},
|
|
2493
|
+
undefined,
|
|
2494
|
+
undefined,
|
|
2495
|
+
undefined,
|
|
2496
|
+
[
|
|
2497
|
+
{},
|
|
2498
|
+
[
|
|
2499
|
+
{},
|
|
2500
|
+
{
|
|
2501
|
+
"fontFamily": "System",
|
|
2502
|
+
"fontSize": 16,
|
|
2503
|
+
"fontWeight": "400",
|
|
2504
|
+
"lineHeight": 24,
|
|
2505
|
+
},
|
|
2506
|
+
],
|
|
2507
|
+
{
|
|
2508
|
+
"opacity": 0,
|
|
2509
|
+
},
|
|
2510
|
+
],
|
|
2511
|
+
]
|
|
2446
2512
|
}
|
|
2447
2513
|
testID="undefined.floatingPlaceholder"
|
|
2448
2514
|
>
|
|
@@ -64,7 +64,6 @@ export default class ActionSheetScreen extends Component {
|
|
|
64
64
|
cancelButtonIndex={3}
|
|
65
65
|
destructiveButtonIndex={0}
|
|
66
66
|
useNativeIOS={false}
|
|
67
|
-
migrateDialog
|
|
68
67
|
options={[
|
|
69
68
|
{label: 'option 1', onPress: () => this.pickOption('option 1')},
|
|
70
69
|
{label: 'option 2', onPress: () => this.pickOption('option 2')},
|
|
@@ -80,7 +79,6 @@ export default class ActionSheetScreen extends Component {
|
|
|
80
79
|
message={'Message of action sheet'}
|
|
81
80
|
cancelButtonIndex={3}
|
|
82
81
|
destructiveButtonIndex={0}
|
|
83
|
-
migrateDialog
|
|
84
82
|
options={[
|
|
85
83
|
{label: 'option 1', onPress: () => this.pickOption('option 1'), iconSource: collectionsIcon},
|
|
86
84
|
{label: 'option 2', onPress: () => this.pickOption('option 2'), iconSource: shareIcon},
|
|
@@ -4,8 +4,8 @@ import _ from 'lodash';
|
|
|
4
4
|
import {AnimatedImage, Colors} from 'react-native-ui-lib'; //eslint-disable-line
|
|
5
5
|
|
|
6
6
|
const SampleImages = [
|
|
7
|
-
'https://
|
|
8
|
-
'https://
|
|
7
|
+
'https://images.pexels.com/photos/2529146/pexels-photo-2529146.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500',
|
|
8
|
+
'https://images.pexels.com/photos/2529158/pexels-photo-2529158.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500'
|
|
9
9
|
];
|
|
10
10
|
|
|
11
11
|
export default class AnimatedImageScreen extends Component {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Carousel, Constants, Text, View, Colors} from 'react-native-ui-lib';
|
|
2
2
|
import React, {Component} from 'react';
|
|
3
|
-
import {StyleSheet, Animated
|
|
3
|
+
import {StyleSheet, Animated} from 'react-native';
|
|
4
4
|
import _ from 'lodash';
|
|
5
5
|
import {renderBooleanOption, renderSliderOption} from '../ExampleScreenPresenter';
|
|
6
6
|
|
|
@@ -58,7 +58,7 @@ class CarouselVerticalScreen extends Component<{}, State> {
|
|
|
58
58
|
return (
|
|
59
59
|
<View absT>
|
|
60
60
|
{_.times(numberOfPagesShown, page => (
|
|
61
|
-
<Text key={page} h1 animated style={[styles.animatedPageCounter, animatedStyles[page]]
|
|
61
|
+
<Text key={page} h1 animated style={[styles.animatedPageCounter, animatedStyles[page]]}>
|
|
62
62
|
{page}
|
|
63
63
|
</Text>
|
|
64
64
|
))}
|
|
@@ -62,7 +62,6 @@ export default class DateTimePickerScreen extends Component<{}, State> {
|
|
|
62
62
|
<View padding-page>
|
|
63
63
|
<Text text40>Date Time Picker</Text>
|
|
64
64
|
<DateTimePicker
|
|
65
|
-
migrateDialog
|
|
66
65
|
containerStyle={{marginVertical: 20}}
|
|
67
66
|
label={'Date'}
|
|
68
67
|
placeholder={'Select a date'}
|
|
@@ -72,7 +71,6 @@ export default class DateTimePickerScreen extends Component<{}, State> {
|
|
|
72
71
|
// value={new Date('October 13, 2014')}
|
|
73
72
|
/>
|
|
74
73
|
<DateTimePicker
|
|
75
|
-
migrateDialog
|
|
76
74
|
mode={'time'}
|
|
77
75
|
label={'Time'}
|
|
78
76
|
placeholder={'Select time'}
|
|
@@ -83,14 +81,12 @@ export default class DateTimePickerScreen extends Component<{}, State> {
|
|
|
83
81
|
Disabled
|
|
84
82
|
</Text>
|
|
85
83
|
<DateTimePicker
|
|
86
|
-
migrateDialog
|
|
87
84
|
containerStyle={{marginBottom: 20}}
|
|
88
85
|
editable={false}
|
|
89
86
|
label={'Date'}
|
|
90
87
|
placeholder={'Select a date'}
|
|
91
88
|
/>
|
|
92
89
|
<DateTimePicker
|
|
93
|
-
migrateDialog
|
|
94
90
|
editable={false}
|
|
95
91
|
mode={'time'}
|
|
96
92
|
label={'Time'}
|
|
@@ -111,7 +107,6 @@ export default class DateTimePickerScreen extends Component<{}, State> {
|
|
|
111
107
|
</View>
|
|
112
108
|
</View>
|
|
113
109
|
<DateTimePicker
|
|
114
|
-
migrateDialog
|
|
115
110
|
containerStyle={{marginVertical: 20}}
|
|
116
111
|
renderInput={this.renderCustomInput}
|
|
117
112
|
mode={mode}
|
package/src/screens/{incubatorScreens/IncubatorDialogScreen.tsx → componentScreens/DialogScreen.tsx}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
2
|
import {StyleSheet} from 'react-native';
|
|
3
3
|
import {FlatList} from 'react-native-gesture-handler';
|
|
4
|
-
import {View, Text, Card, Button,
|
|
4
|
+
import {View, Text, Card, Button, Dialog, DialogHeaderProps, Colors, Spacings, ModalProps} from 'react-native-ui-lib';
|
|
5
5
|
|
|
6
6
|
interface Item {
|
|
7
7
|
value: string;
|
|
@@ -31,10 +31,10 @@ const colors: Item[] = [
|
|
|
31
31
|
{value: Colors.yellow70, label: 'Yellow70'}
|
|
32
32
|
];
|
|
33
33
|
|
|
34
|
-
export default class
|
|
34
|
+
export default class DialogScreen extends Component {
|
|
35
35
|
state = {visible: false};
|
|
36
36
|
modalProps: ModalProps = {supportedOrientations: ['portrait', 'landscape']};
|
|
37
|
-
headerProps:
|
|
37
|
+
headerProps: DialogHeaderProps = {title: 'Title (swipe here)'};
|
|
38
38
|
|
|
39
39
|
renderVerticalItem = ({item}: {item: Item}) => {
|
|
40
40
|
return (
|
|
@@ -67,13 +67,13 @@ export default class IncubatorDialogScreen extends Component {
|
|
|
67
67
|
<View bg-$backgroundNeutralLight flex padding-20>
|
|
68
68
|
<Card height={100} center padding-20>
|
|
69
69
|
<Text $textDefault text50>
|
|
70
|
-
|
|
70
|
+
DialogScreen
|
|
71
71
|
</Text>
|
|
72
72
|
</Card>
|
|
73
73
|
<View flex center>
|
|
74
74
|
<Button marginV-s5 label="Open Dialog" onPress={this.openDialog}/>
|
|
75
75
|
</View>
|
|
76
|
-
<
|
|
76
|
+
<Dialog
|
|
77
77
|
useSafeArea
|
|
78
78
|
visible={visible}
|
|
79
79
|
onDismiss={this.onDismiss}
|
|
@@ -89,7 +89,7 @@ export default class IncubatorDialogScreen extends Component {
|
|
|
89
89
|
renderItem={this.renderVerticalItem}
|
|
90
90
|
keyExtractor={this.keyExtractor}
|
|
91
91
|
/>
|
|
92
|
-
</
|
|
92
|
+
</Dialog>
|
|
93
93
|
</View>
|
|
94
94
|
);
|
|
95
95
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, {Component} from 'react';
|
|
2
2
|
import {StyleSheet, ScrollView} from 'react-native';
|
|
3
|
-
import {FlatList} from 'react-native-gesture-handler';
|
|
3
|
+
import {FlatList, GestureHandlerRootView} from 'react-native-gesture-handler';
|
|
4
4
|
import {
|
|
5
5
|
Assets,
|
|
6
6
|
View,
|
|
7
7
|
Text,
|
|
8
8
|
Colors,
|
|
9
|
-
|
|
9
|
+
PanView,
|
|
10
10
|
Card,
|
|
11
11
|
Constants,
|
|
12
12
|
Modal,
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
Icon,
|
|
15
15
|
TouchableOpacity
|
|
16
16
|
} from 'react-native-ui-lib';
|
|
17
|
-
const {PanView} = Incubator;
|
|
18
17
|
|
|
19
18
|
interface Item {
|
|
20
19
|
value: string;
|
|
@@ -147,7 +146,7 @@ class PanViewScreen extends Component {
|
|
|
147
146
|
render() {
|
|
148
147
|
const {showToast, showDialog} = this.state;
|
|
149
148
|
return (
|
|
150
|
-
<
|
|
149
|
+
<GestureHandlerRootView style={styles.root}>
|
|
151
150
|
<View marginL-page height={50} centerV>
|
|
152
151
|
<Text text50>New Pan View</Text>
|
|
153
152
|
</View>
|
|
@@ -163,7 +162,7 @@ class PanViewScreen extends Component {
|
|
|
163
162
|
</ScrollView>
|
|
164
163
|
{showToast && this.renderToast()}
|
|
165
164
|
{showDialog && this.renderDialog()}
|
|
166
|
-
</
|
|
165
|
+
</GestureHandlerRootView>
|
|
167
166
|
);
|
|
168
167
|
}
|
|
169
168
|
}
|
|
@@ -5,14 +5,13 @@ import {
|
|
|
5
5
|
Assets,
|
|
6
6
|
Colors,
|
|
7
7
|
Typography,
|
|
8
|
-
|
|
8
|
+
Dialog,
|
|
9
9
|
View,
|
|
10
10
|
Text,
|
|
11
11
|
Button,
|
|
12
12
|
Icon,
|
|
13
13
|
Avatar,
|
|
14
14
|
Picker,
|
|
15
|
-
PanningProvider,
|
|
16
15
|
PickerProps,
|
|
17
16
|
RenderCustomModalProps,
|
|
18
17
|
PickerMethods,
|
|
@@ -130,7 +129,7 @@ export default class PickerScreen extends Component {
|
|
|
130
129
|
renderDialog: PickerProps['renderOverlay'] = (modalProps: RenderCustomModalProps) => {
|
|
131
130
|
const {visible, children, toggleModal, onDone} = modalProps;
|
|
132
131
|
return (
|
|
133
|
-
<
|
|
132
|
+
<Dialog
|
|
134
133
|
visible={visible}
|
|
135
134
|
onDismiss={() => {
|
|
136
135
|
onDone();
|
|
@@ -141,11 +140,11 @@ export default class PickerScreen extends Component {
|
|
|
141
140
|
bottom
|
|
142
141
|
useSafeArea
|
|
143
142
|
containerStyle={{backgroundColor: Colors.$backgroundDefault}}
|
|
144
|
-
direction={
|
|
143
|
+
direction={Dialog.directions.DOWN}
|
|
145
144
|
headerProps={{title: 'Custom modal'}}
|
|
146
145
|
>
|
|
147
146
|
<ScrollView>{children}</ScrollView>
|
|
148
|
-
</
|
|
147
|
+
</Dialog>
|
|
149
148
|
);
|
|
150
149
|
};
|
|
151
150
|
|
|
@@ -129,7 +129,7 @@ export default SortableListScreen;
|
|
|
129
129
|
const styles = StyleSheet.create({
|
|
130
130
|
itemContainer: {
|
|
131
131
|
height: 52,
|
|
132
|
-
|
|
132
|
+
borderBottomColor: Colors.$outlineDefault,
|
|
133
133
|
borderBottomWidth: 1
|
|
134
134
|
},
|
|
135
135
|
selectedItemContainer: {
|
|
@@ -68,7 +68,7 @@ export default class StackAggregatorScreen extends Component {
|
|
|
68
68
|
containerStyle={{marginTop: 12}}
|
|
69
69
|
onItemPress={this.onItemPress}
|
|
70
70
|
collapsed={false}
|
|
71
|
-
|
|
71
|
+
backgroundColor={Colors.red70}
|
|
72
72
|
// itemBorderRadius={10}
|
|
73
73
|
// buttonProps={{color: Colors.green30, labelStyle: {...Typography.text80, fontWeight: '500'}}}
|
|
74
74
|
>
|
|
@@ -62,7 +62,7 @@ class Tab2 extends Component {
|
|
|
62
62
|
<Avatar
|
|
63
63
|
size={50}
|
|
64
64
|
source={{
|
|
65
|
-
uri: 'https://
|
|
65
|
+
uri: 'https://images.pexels.com/photos/2529159/pexels-photo-2529159.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500'
|
|
66
66
|
}}
|
|
67
67
|
/>
|
|
68
68
|
<Text text40 marginL-20>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import React, {useCallback, useState} from 'react';
|
|
3
|
-
import {View, Text,
|
|
3
|
+
import {View, Text, Dialog, WheelPicker, WheelPickerAlign, Colors, Typography, Button} from 'react-native-ui-lib';
|
|
4
4
|
|
|
5
5
|
const monthItems = _.map([
|
|
6
6
|
'January',
|
|
@@ -88,7 +88,7 @@ export default () => {
|
|
|
88
88
|
<View center marginT-40>
|
|
89
89
|
<Text h3 marginB-20>Days</Text>
|
|
90
90
|
<Button size={Button.sizes.small} label={'Pick Days'} onPress={onPickDaysPress}/>
|
|
91
|
-
<
|
|
91
|
+
<Dialog
|
|
92
92
|
width={'90%'}
|
|
93
93
|
bottom
|
|
94
94
|
visible={showDialog}
|
|
@@ -96,7 +96,7 @@ export default () => {
|
|
|
96
96
|
headerProps={{showKnob: false, showDivider: false}}
|
|
97
97
|
>
|
|
98
98
|
<WheelPicker initialValue={5} label={'Days'} items={dayItems}/>
|
|
99
|
-
</
|
|
99
|
+
</Dialog>
|
|
100
100
|
</View>
|
|
101
101
|
</View>
|
|
102
102
|
);
|
|
@@ -32,10 +32,8 @@ export function registerScreens(registrar) {
|
|
|
32
32
|
registrar('unicorn.components.MarqueeScreen', () => require('./MarqueeScreen').default);
|
|
33
33
|
registrar('unicorn.components.NumberInputScreen', () => require('./NumberInputScreen').default);
|
|
34
34
|
registrar('unicorn.components.OverlaysScreen', () => require('./OverlaysScreen').default);
|
|
35
|
+
registrar('unicorn.components.PanViewScreen', () => require('./PanViewScreen').default);
|
|
35
36
|
registrar('unicorn.components.PageControlScreen', () => require('./PageControlScreen').default);
|
|
36
|
-
registrar('unicorn.components.PanDismissibleScreen', () => require('./PanDismissibleScreen').default);
|
|
37
|
-
registrar('unicorn.components.PanListenerScreen', () => require('./PanListenerScreen').default);
|
|
38
|
-
registrar('unicorn.components.PanResponderScreen', () => require('./PanResponderScreen').default);
|
|
39
37
|
registrar('unicorn.components.PickerScreen', () => require('./PickerScreen').default);
|
|
40
38
|
registrar('unicorn.animations.ProgressBarScreen', () => require('../componentScreens/ProgressBarScreen').default);
|
|
41
39
|
registrar('unicorn.components.ProgressiveImageScreen', () => require('./ProgressiveImageScreen').default);
|
|
@@ -44,7 +42,6 @@ export function registerScreens(registrar) {
|
|
|
44
42
|
registrar('unicorn.components.SectionsWheelPickerScreen', () => require('./SectionsWheelPickerScreen').default);
|
|
45
43
|
registrar('unicorn.components.SearchInputScreen', () => require('./SearchInputScreen').default);
|
|
46
44
|
registrar('unicorn.components.SegmentedControlScreen', () => require('./SegmentedControlScreen').default);
|
|
47
|
-
registrar('unicorn.components.SharedTransitionScreen', () => require('./SharedTransitionScreen').default);
|
|
48
45
|
registrar('unicorn.components.SkeletonViewScreen', () => require('./SkeletonViewScreen').default);
|
|
49
46
|
registrar('unicorn.components.SliderScreen', () => require('./SliderScreen').default);
|
|
50
47
|
registrar('unicorn.components.SortableGridListScreen', () => require('./SortableGridListScreen').default);
|
|
@@ -112,7 +112,6 @@ export default class TextFieldScreen extends Component {
|
|
|
112
112
|
useDialog
|
|
113
113
|
expandableContent={this.renderPickerContent()}
|
|
114
114
|
dialogProps={{bottom: true, onDismiss: () => console.warn('Dialog is dismissed')}}
|
|
115
|
-
migrateDialog
|
|
116
115
|
>
|
|
117
116
|
{this.renderColorRow(selectedColor)}
|
|
118
117
|
</Incubator.ExpandableOverlay>
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
export function registerScreens(registrar) {
|
|
2
2
|
registrar('unicorn.components.IncubatorCalendarScreen', () => require('./IncubatorCalendarScreen').default);
|
|
3
3
|
registrar('unicorn.incubator.TouchableOpacityScreen', () => require('./TouchableOpacityScreen').default);
|
|
4
|
-
registrar('unicorn.incubator.IncubatorDialogScreen', () => require('./IncubatorDialogScreen').default);
|
|
5
4
|
registrar('unicorn.components.IncubatorExpandableOverlayScreen', () => require('./IncubatorExpandableOverlayScreen').default);
|
|
6
5
|
registrar('unicorn.components.IncubatorToastScreen', () => require('./IncubatorToastScreen').default);
|
|
7
|
-
registrar('unicorn.incubator.PanViewScreen', () => require('./PanViewScreen').default);
|
|
8
6
|
registrar('unicorn.components.IncubatorSliderScreen', () => require('./IncubatorSliderScreen').default);
|
|
9
7
|
}
|
|
@@ -16,7 +16,10 @@ export default class HighlightOverlayViewScreen extends PureComponent {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
componentDidMount() {
|
|
19
|
-
|
|
19
|
+
// setting timeout to allow Android's transition animation to complete
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
this.setState({showFTE: true});
|
|
22
|
+
}, 1000);
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
onRefUpdated(ref) {
|