unicorn-demo-app 7.43.0-snapshot.7091 → 7.43.0-snapshot.7142
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/scripts/releaseDemo.js +8 -1
- package/src/index.js +19 -3
- package/src/screens/MenuStructure.js +13 -4
- package/src/screens/__tests__/__snapshots__/TextFieldScreen.spec.js.snap +30 -96
- package/src/screens/componentScreens/ActionSheetScreen.tsx +2 -0
- package/src/screens/componentScreens/AnimatedImageScreen.js +2 -2
- package/src/screens/componentScreens/CarouselVerticalScreen.tsx +2 -2
- package/src/screens/componentScreens/DateTimePickerScreen.tsx +5 -0
- package/src/screens/componentScreens/DialogScreen.js +343 -0
- package/src/screens/componentScreens/PanDismissibleScreen.tsx +112 -0
- package/src/screens/componentScreens/PanListenerScreen.tsx +63 -0
- package/src/screens/componentScreens/PanResponderScreen.tsx +99 -0
- package/src/screens/componentScreens/PickerScreen.tsx +5 -4
- package/src/screens/componentScreens/SharedTransitionScreen.js +143 -0
- 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 +4 -1
- package/src/screens/{componentScreens/DialogScreen.tsx → incubatorScreens/IncubatorDialogScreen.tsx} +6 -6
- package/src/screens/incubatorScreens/IncubatorExpandableOverlayScreen.tsx +1 -0
- package/src/screens/{componentScreens → incubatorScreens}/PanViewScreen.tsx +5 -4
- package/src/screens/incubatorScreens/index.js +2 -0
- package/src/screens/nativeComponentScreens/HighlightOverlayViewScreen.js +1 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unicorn-demo-app",
|
|
3
|
-
"version": "7.43.0-snapshot.
|
|
3
|
+
"version": "7.43.0-snapshot.7142",
|
|
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.71.2",
|
|
27
27
|
"react-native-ui-lib": "*",
|
|
28
28
|
"semver": "^5.5.0"
|
|
29
29
|
}
|
package/scripts/releaseDemo.js
CHANGED
|
@@ -17,8 +17,11 @@ const VERSION_INC = 'patch';
|
|
|
17
17
|
|
|
18
18
|
function run() {
|
|
19
19
|
if (!validateEnv()) {
|
|
20
|
+
console.log('Do not release demo');
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
23
|
+
|
|
24
|
+
console.log('Release demo');
|
|
22
25
|
createNpmRc();
|
|
23
26
|
versionTagAndPublish();
|
|
24
27
|
}
|
|
@@ -27,7 +30,11 @@ function validateEnv() {
|
|
|
27
30
|
if (!process.env.CI) {
|
|
28
31
|
throw new Error('releasing is only available from CI');
|
|
29
32
|
}
|
|
30
|
-
return
|
|
33
|
+
return (
|
|
34
|
+
process.env.BUILDKITE_BRANCH === 'master' ||
|
|
35
|
+
process.env.BUILDKITE_BRANCH === 'release' ||
|
|
36
|
+
process.env.BUILDKITE_MESSAGE === 'snapshot'
|
|
37
|
+
);
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
function createNpmRc() {
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {I18nManager} from 'react-native';
|
|
1
|
+
import {UIManager, 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
|
|
5
6
|
I18nManager.allowRTL(true);
|
|
6
7
|
|
|
7
8
|
module.exports = {
|
|
@@ -86,6 +87,15 @@ module.exports = {
|
|
|
86
87
|
get PageControlScreen() {
|
|
87
88
|
return require('./screens/componentScreens/PageControlScreen').default;
|
|
88
89
|
},
|
|
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
|
+
},
|
|
89
99
|
get PickerScreen() {
|
|
90
100
|
return require('./screens/componentScreens/PickerScreen').default;
|
|
91
101
|
},
|
|
@@ -98,6 +108,9 @@ module.exports = {
|
|
|
98
108
|
get SegmentedControlScreen() {
|
|
99
109
|
return require('./screens/componentScreens/SegmentedControlScreen').default;
|
|
100
110
|
},
|
|
111
|
+
get SharedTransitionScreen() {
|
|
112
|
+
return require('./screens/componentScreens/SharedTransitionScreen').default;
|
|
113
|
+
},
|
|
101
114
|
get SkeletonViewScreen() {
|
|
102
115
|
return require('./screens/componentScreens/SkeletonViewScreen').default;
|
|
103
116
|
},
|
|
@@ -231,13 +244,16 @@ module.exports = {
|
|
|
231
244
|
get SortableGridList() {
|
|
232
245
|
return require('./screens/componentScreens/SortableGridListScreen').default;
|
|
233
246
|
},
|
|
247
|
+
// Incubator
|
|
234
248
|
get PanViewScreen() {
|
|
235
|
-
return require('./screens/
|
|
249
|
+
return require('./screens/incubatorScreens/PanViewScreen').default;
|
|
236
250
|
},
|
|
237
|
-
// Incubator
|
|
238
251
|
get IncubatorSlider() {
|
|
239
252
|
return require('./screens/incubatorScreens/IncubatorSliderScreen').default;
|
|
240
253
|
},
|
|
254
|
+
get IncubatorDialog() {
|
|
255
|
+
return require('./screens/incubatorScreens/IncubatorDialogScreen').default;
|
|
256
|
+
},
|
|
241
257
|
get IncubatorToast() {
|
|
242
258
|
return require('./screens/incubatorScreens/IncubatorToastScreen').default;
|
|
243
259
|
},
|
|
@@ -39,6 +39,11 @@ 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
|
+
},
|
|
42
47
|
{title: 'Stack Aggregator', tags: 'stack aggregator', screen: 'unicorn.components.StackAggregatorScreen'},
|
|
43
48
|
{title: 'Marquee', tags: 'sliding text', screen: 'unicorn.components.MarqueeScreen'}
|
|
44
49
|
]
|
|
@@ -178,14 +183,16 @@ export const navigationData = {
|
|
|
178
183
|
title: 'Animations & Gestures',
|
|
179
184
|
screens: [
|
|
180
185
|
{title: 'Animated Image', tags: 'animated image', screen: 'unicorn.components.AnimatedImageScreen'},
|
|
181
|
-
{title: 'Card Scanner', tags: 'card scanner process', screen: 'unicorn.animations.CardScannerScreen'},
|
|
182
186
|
{title: 'Haptic feedback', tags: 'haptic feedback', screen: 'unicorn.components.HapticScreen'},
|
|
183
|
-
{title: 'PanView', tags: 'pan swipe drag', screen: 'unicorn.components.PanViewScreen'},
|
|
184
187
|
{
|
|
185
188
|
title: 'ProgressiveImage',
|
|
186
189
|
tags: 'progressive image cover overlay',
|
|
187
190
|
screen: 'unicorn.components.ProgressiveImageScreen'
|
|
188
|
-
}
|
|
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'}
|
|
189
196
|
]
|
|
190
197
|
},
|
|
191
198
|
Incubator: {
|
|
@@ -194,12 +201,14 @@ export const navigationData = {
|
|
|
194
201
|
{title: 'Calendar', tags: 'calendar', screen: 'unicorn.components.IncubatorCalendarScreen'},
|
|
195
202
|
{title: 'ChipsInput', tags: 'chips input', screen: 'unicorn.components.ChipsInputScreen'},
|
|
196
203
|
{title: 'Native TouchableOpacity', tags: 'touchable native', screen: 'unicorn.incubator.TouchableOpacityScreen'},
|
|
204
|
+
{title: 'Dialog (New)', tags: 'dialog modal popup alert', screen: 'unicorn.incubator.IncubatorDialogScreen'},
|
|
197
205
|
{title: 'Toast (New)', tags: 'toast', screen: 'unicorn.components.IncubatorToastScreen'},
|
|
198
206
|
{
|
|
199
207
|
title: 'ExpandableOverlay',
|
|
200
208
|
tags: 'text field expandable input picker',
|
|
201
209
|
screen: 'unicorn.components.IncubatorExpandableOverlayScreen'
|
|
202
|
-
}
|
|
210
|
+
},
|
|
211
|
+
{title: 'PanView', tags: 'pan swipe drag', screen: 'unicorn.incubator.PanViewScreen'}
|
|
203
212
|
]
|
|
204
213
|
},
|
|
205
214
|
Inspirations: {
|
|
@@ -1522,38 +1522,16 @@ 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
|
-
|
|
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
|
-
]
|
|
1525
|
+
{
|
|
1526
|
+
"backgroundColor": "transparent",
|
|
1527
|
+
"color": "#6E7881",
|
|
1528
|
+
"fontFamily": "System",
|
|
1529
|
+
"fontSize": 16,
|
|
1530
|
+
"fontWeight": "400",
|
|
1531
|
+
"lineHeight": 24,
|
|
1532
|
+
"opacity": 0,
|
|
1533
|
+
"writingDirection": "ltr",
|
|
1534
|
+
}
|
|
1557
1535
|
}
|
|
1558
1536
|
testID="undefined.floatingPlaceholder"
|
|
1559
1537
|
>
|
|
@@ -2140,38 +2118,16 @@ exports[`TextField Screen renders screen 1`] = `
|
|
|
2140
2118
|
numberOfLines={1}
|
|
2141
2119
|
onLayout={[Function]}
|
|
2142
2120
|
style={
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
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
|
-
]
|
|
2121
|
+
{
|
|
2122
|
+
"backgroundColor": "transparent",
|
|
2123
|
+
"color": "#20303C",
|
|
2124
|
+
"fontFamily": "System",
|
|
2125
|
+
"fontSize": 16,
|
|
2126
|
+
"fontWeight": "400",
|
|
2127
|
+
"lineHeight": 24,
|
|
2128
|
+
"opacity": 0,
|
|
2129
|
+
"writingDirection": "ltr",
|
|
2130
|
+
}
|
|
2175
2131
|
}
|
|
2176
2132
|
testID="undefined.floatingPlaceholder"
|
|
2177
2133
|
>
|
|
@@ -2477,38 +2433,16 @@ exports[`TextField Screen renders screen 1`] = `
|
|
|
2477
2433
|
numberOfLines={1}
|
|
2478
2434
|
onLayout={[Function]}
|
|
2479
2435
|
style={
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
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
|
-
]
|
|
2436
|
+
{
|
|
2437
|
+
"backgroundColor": "transparent",
|
|
2438
|
+
"color": "#20303C",
|
|
2439
|
+
"fontFamily": "System",
|
|
2440
|
+
"fontSize": 16,
|
|
2441
|
+
"fontWeight": "400",
|
|
2442
|
+
"lineHeight": 24,
|
|
2443
|
+
"opacity": 0,
|
|
2444
|
+
"writingDirection": "ltr",
|
|
2445
|
+
}
|
|
2512
2446
|
}
|
|
2513
2447
|
testID="undefined.floatingPlaceholder"
|
|
2514
2448
|
>
|
|
@@ -64,6 +64,7 @@ export default class ActionSheetScreen extends Component {
|
|
|
64
64
|
cancelButtonIndex={3}
|
|
65
65
|
destructiveButtonIndex={0}
|
|
66
66
|
useNativeIOS={false}
|
|
67
|
+
migrateDialog
|
|
67
68
|
options={[
|
|
68
69
|
{label: 'option 1', onPress: () => this.pickOption('option 1')},
|
|
69
70
|
{label: 'option 2', onPress: () => this.pickOption('option 2')},
|
|
@@ -79,6 +80,7 @@ export default class ActionSheetScreen extends Component {
|
|
|
79
80
|
message={'Message of action sheet'}
|
|
80
81
|
cancelButtonIndex={3}
|
|
81
82
|
destructiveButtonIndex={0}
|
|
83
|
+
migrateDialog
|
|
82
84
|
options={[
|
|
83
85
|
{label: 'option 1', onPress: () => this.pickOption('option 1'), iconSource: collectionsIcon},
|
|
84
86
|
{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://static.pexels.com/photos/50721/pencils-crayons-colourful-rainbow-50721.jpeg',
|
|
8
|
+
'https://static.pexels.com/photos/60628/flower-garden-blue-sky-hokkaido-japan-60628.jpeg'
|
|
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} from 'react-native';
|
|
3
|
+
import {StyleSheet, Animated, TextStyle} 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]] as TextStyle}>
|
|
62
62
|
{page}
|
|
63
63
|
</Text>
|
|
64
64
|
))}
|
|
@@ -62,6 +62,7 @@ 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
|
|
65
66
|
containerStyle={{marginVertical: 20}}
|
|
66
67
|
label={'Date'}
|
|
67
68
|
placeholder={'Select a date'}
|
|
@@ -71,6 +72,7 @@ export default class DateTimePickerScreen extends Component<{}, State> {
|
|
|
71
72
|
// value={new Date('October 13, 2014')}
|
|
72
73
|
/>
|
|
73
74
|
<DateTimePicker
|
|
75
|
+
migrateDialog
|
|
74
76
|
mode={'time'}
|
|
75
77
|
label={'Time'}
|
|
76
78
|
placeholder={'Select time'}
|
|
@@ -81,12 +83,14 @@ export default class DateTimePickerScreen extends Component<{}, State> {
|
|
|
81
83
|
Disabled
|
|
82
84
|
</Text>
|
|
83
85
|
<DateTimePicker
|
|
86
|
+
migrateDialog
|
|
84
87
|
containerStyle={{marginBottom: 20}}
|
|
85
88
|
editable={false}
|
|
86
89
|
label={'Date'}
|
|
87
90
|
placeholder={'Select a date'}
|
|
88
91
|
/>
|
|
89
92
|
<DateTimePicker
|
|
93
|
+
migrateDialog
|
|
90
94
|
editable={false}
|
|
91
95
|
mode={'time'}
|
|
92
96
|
label={'Time'}
|
|
@@ -107,6 +111,7 @@ export default class DateTimePickerScreen extends Component<{}, State> {
|
|
|
107
111
|
</View>
|
|
108
112
|
</View>
|
|
109
113
|
<DateTimePicker
|
|
114
|
+
migrateDialog
|
|
110
115
|
containerStyle={{marginVertical: 20}}
|
|
111
116
|
renderInput={this.renderCustomInput}
|
|
112
117
|
mode={mode}
|