@storybook/react-native 6.5.4 → 6.5.5-alpha.1
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/dist/hooks.d.ts +6 -5
- package/dist/hooks.js +24 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/preview/View.d.ts +2 -3
- package/dist/preview/View.js +7 -34
- package/dist/preview/components/OnDeviceUI/OnDeviceUI.d.ts +1 -1
- package/dist/preview/components/OnDeviceUI/OnDeviceUI.js +9 -24
- package/dist/preview/components/OnDeviceUI/Panel.d.ts +1 -1
- package/dist/preview/components/OnDeviceUI/Panel.js +2 -1
- package/dist/preview/components/OnDeviceUI/absolute-positioned-keyboard-aware-view.d.ts +1 -1
- package/dist/preview/components/OnDeviceUI/absolute-positioned-keyboard-aware-view.js +3 -3
- package/dist/preview/components/OnDeviceUI/addons/Addons.d.ts +1 -1
- package/dist/preview/components/OnDeviceUI/addons/Addons.js +4 -7
- package/dist/preview/components/OnDeviceUI/addons/AddonsSkeleton.js +7 -16
- package/dist/preview/components/OnDeviceUI/addons/List.d.ts +1 -1
- package/dist/preview/components/OnDeviceUI/addons/List.js +6 -5
- package/dist/preview/components/OnDeviceUI/addons/Wrapper.d.ts +1 -1
- package/dist/preview/components/OnDeviceUI/addons/Wrapper.js +3 -3
- package/dist/preview/components/OnDeviceUI/navigation/Navigation.d.ts +1 -1
- package/dist/preview/components/OnDeviceUI/navigation/Navigation.js +4 -8
- package/dist/preview/components/OnDeviceUI/navigation/NavigationBar.d.ts +1 -1
- package/dist/preview/components/OnDeviceUI/navigation/NavigationBar.js +2 -4
- package/dist/preview/components/OnDeviceUI/navigation/NavigationButton.d.ts +2 -3
- package/dist/preview/components/OnDeviceUI/navigation/NavigationButton.js +4 -10
- package/dist/preview/components/Shared/icons.d.ts +22 -4
- package/dist/preview/components/Shared/icons.js +12 -5
- package/dist/preview/components/Shared/layout.d.ts +15 -1
- package/dist/preview/components/Shared/layout.js +4 -24
- package/dist/preview/components/Shared/tabs.d.ts +2 -2
- package/dist/preview/components/Shared/tabs.js +6 -7
- package/dist/preview/components/StoryListView/StoryListView.d.ts +1 -1
- package/dist/preview/components/StoryListView/StoryListView.js +54 -59
- package/dist/preview/components/StoryListView/getNestedStories.d.ts +10 -0
- package/dist/preview/components/StoryListView/getNestedStories.js +95 -0
- package/dist/preview/components/StoryListView/getNestedStories.test.d.ts +1 -0
- package/dist/preview/components/StoryListView/getNestedStories.test.js +237 -0
- package/dist/preview/components/StoryView/StoryView.d.ts +1 -1
- package/dist/preview/components/StoryView/StoryView.js +3 -3
- package/dist/preview/start.js +2 -2
- package/package.json +10 -6
- package/dist/preview/components/Shared/theme.d.ts +0 -189
- package/dist/preview/components/Shared/theme.js +0 -321
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.darkTheme = exports.theme = void 0;
|
|
4
|
-
var tokens = {
|
|
5
|
-
spacing1: 4,
|
|
6
|
-
spacing2: 8,
|
|
7
|
-
spacing3: 12,
|
|
8
|
-
spacing4: 16,
|
|
9
|
-
spacing5: 20,
|
|
10
|
-
spacing6: 24,
|
|
11
|
-
fontSize: {
|
|
12
|
-
small: 12,
|
|
13
|
-
smaller: 14,
|
|
14
|
-
normal: 16,
|
|
15
|
-
},
|
|
16
|
-
color: {
|
|
17
|
-
navy: '#001a23',
|
|
18
|
-
black: '#000',
|
|
19
|
-
offBlack: '#222',
|
|
20
|
-
white: '#ffffff',
|
|
21
|
-
grey200: '#dee2e3',
|
|
22
|
-
grey700: '#859499',
|
|
23
|
-
grey800: '#575757',
|
|
24
|
-
red500: '#ff4400',
|
|
25
|
-
blue100: '#f6f9fc',
|
|
26
|
-
blue200: '#e0eaf5',
|
|
27
|
-
blue250: '#dcebf9',
|
|
28
|
-
blue300: '#b2cbe6',
|
|
29
|
-
blue400: '#a3c1e0',
|
|
30
|
-
blue600: '#1ea7fd',
|
|
31
|
-
green500: '#66bf3c',
|
|
32
|
-
},
|
|
33
|
-
borderRadius: {
|
|
34
|
-
small: 4,
|
|
35
|
-
medium: 6,
|
|
36
|
-
large: 8,
|
|
37
|
-
round: 100,
|
|
38
|
-
},
|
|
39
|
-
borderWidthNormal: 1,
|
|
40
|
-
elevation: {
|
|
41
|
-
floating: {
|
|
42
|
-
shadowColor: '#000000',
|
|
43
|
-
shadowOpacity: 0.2,
|
|
44
|
-
shadowOffset: { width: 0, height: 0 },
|
|
45
|
-
shadowRadius: 16,
|
|
46
|
-
elevation: 10,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
var text = {
|
|
51
|
-
primaryColor: tokens.color.navy,
|
|
52
|
-
secondaryColor: tokens.color.grey700,
|
|
53
|
-
linkColor: '#0000ff',
|
|
54
|
-
};
|
|
55
|
-
var textOnDark = {
|
|
56
|
-
primaryColor: tokens.color.white,
|
|
57
|
-
secondaryColor: tokens.color.grey200,
|
|
58
|
-
linkColor: tokens.color.blue600,
|
|
59
|
-
};
|
|
60
|
-
exports.theme = {
|
|
61
|
-
tokens: tokens,
|
|
62
|
-
text: text,
|
|
63
|
-
backgroundColor: tokens.color.white,
|
|
64
|
-
preview: {
|
|
65
|
-
containerBackgroundColor: tokens.color.white,
|
|
66
|
-
backgroundColor: tokens.color.white,
|
|
67
|
-
},
|
|
68
|
-
navigation: {
|
|
69
|
-
backgroundColor: tokens.color.white,
|
|
70
|
-
borderColor: tokens.color.grey200,
|
|
71
|
-
borderWidth: tokens.borderWidthNormal,
|
|
72
|
-
visibilityBorderRadius: tokens.borderRadius.small,
|
|
73
|
-
visibilityInnerBorderColor: tokens.color.grey700,
|
|
74
|
-
visibilityOuterBorderColor: tokens.color.white,
|
|
75
|
-
},
|
|
76
|
-
panel: {
|
|
77
|
-
backgroundColor: tokens.color.blue100,
|
|
78
|
-
borderWidth: tokens.borderWidthNormal,
|
|
79
|
-
borderColor: tokens.color.blue200,
|
|
80
|
-
paddingVertical: 0,
|
|
81
|
-
paddingHorizontal: tokens.spacing2,
|
|
82
|
-
},
|
|
83
|
-
storyList: {
|
|
84
|
-
fontSize: tokens.fontSize.normal,
|
|
85
|
-
headerPaddingHorizontal: tokens.spacing2,
|
|
86
|
-
headerPaddingVertical: tokens.spacing2,
|
|
87
|
-
headerTextColor: text.primaryColor,
|
|
88
|
-
headerFontWeight: '500',
|
|
89
|
-
storyPaddingHorizontal: tokens.spacing2,
|
|
90
|
-
storyPaddingVertical: tokens.spacing1 * 1.5,
|
|
91
|
-
storyIndent: tokens.spacing6,
|
|
92
|
-
storyTextColor: text.primaryColor,
|
|
93
|
-
storyFontWeight: '400',
|
|
94
|
-
storySelectedBackgroundColor: tokens.color.blue600,
|
|
95
|
-
storySelectedTextColor: tokens.color.white,
|
|
96
|
-
storySelectedFontWeight: '700',
|
|
97
|
-
sectionSpacing: tokens.spacing2,
|
|
98
|
-
sectionActiveBackgroundColor: tokens.color.blue200,
|
|
99
|
-
sectionBorderRadius: tokens.borderRadius.medium,
|
|
100
|
-
search: {
|
|
101
|
-
fontSize: tokens.fontSize.normal,
|
|
102
|
-
textColor: text.primaryColor,
|
|
103
|
-
placeholderTextColor: text.secondaryColor,
|
|
104
|
-
borderRadius: tokens.borderRadius.round,
|
|
105
|
-
borderColor: tokens.color.blue400,
|
|
106
|
-
borderWidth: tokens.borderWidthNormal,
|
|
107
|
-
backgroundColor: tokens.color.white,
|
|
108
|
-
paddingVertical: tokens.spacing2,
|
|
109
|
-
paddingHorizontal: tokens.spacing3,
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
button: {
|
|
113
|
-
fontSize: tokens.fontSize.smaller,
|
|
114
|
-
fontWeight: '600',
|
|
115
|
-
paddingVertical: tokens.spacing2,
|
|
116
|
-
paddingHorizontal: tokens.spacing5,
|
|
117
|
-
primary: {
|
|
118
|
-
textColor: text.primaryColor,
|
|
119
|
-
backgroundColor: tokens.color.blue250,
|
|
120
|
-
borderColor: tokens.color.blue300,
|
|
121
|
-
borderWidth: tokens.borderWidthNormal,
|
|
122
|
-
borderRadius: tokens.borderRadius.medium,
|
|
123
|
-
},
|
|
124
|
-
secondary: {
|
|
125
|
-
textColor: text.primaryColor,
|
|
126
|
-
backgroundColor: 'transparent',
|
|
127
|
-
borderColor: tokens.color.blue300,
|
|
128
|
-
borderWidth: tokens.borderWidthNormal,
|
|
129
|
-
borderRadius: tokens.borderRadius.medium,
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
tabs: {
|
|
133
|
-
fontSize: tokens.fontSize.small,
|
|
134
|
-
fontWeight: '500',
|
|
135
|
-
paddingVertical: tokens.spacing2,
|
|
136
|
-
paddingHorizontal: tokens.spacing2 * 1.25,
|
|
137
|
-
borderWidth: tokens.borderWidthNormal,
|
|
138
|
-
borderRadius: tokens.borderRadius.round,
|
|
139
|
-
activeBorderColor: tokens.color.blue300,
|
|
140
|
-
activeBackgroundColor: tokens.color.blue250,
|
|
141
|
-
activeTextColor: text.primaryColor,
|
|
142
|
-
inactiveBorderColor: 'transparent',
|
|
143
|
-
inactiveBackgroundColor: 'transparent',
|
|
144
|
-
inactiveTextColor: text.secondaryColor,
|
|
145
|
-
},
|
|
146
|
-
inputs: {
|
|
147
|
-
errorTextColor: tokens.color.red500,
|
|
148
|
-
labelFontSize: tokens.fontSize.smaller,
|
|
149
|
-
labelTextColor: text.primaryColor,
|
|
150
|
-
text: {
|
|
151
|
-
fontSize: tokens.fontSize.smaller,
|
|
152
|
-
textColor: text.primaryColor,
|
|
153
|
-
borderWidth: tokens.borderWidthNormal,
|
|
154
|
-
borderColor: tokens.color.blue400,
|
|
155
|
-
backgroundColor: tokens.color.white,
|
|
156
|
-
borderRadius: tokens.borderRadius.medium,
|
|
157
|
-
paddingVertical: tokens.spacing1 * 1.5,
|
|
158
|
-
paddingHorizontal: tokens.spacing1 * 1.5,
|
|
159
|
-
},
|
|
160
|
-
radio: {
|
|
161
|
-
fontSize: tokens.fontSize.smaller,
|
|
162
|
-
height: 20,
|
|
163
|
-
borderWidth: tokens.borderWidthNormal,
|
|
164
|
-
borderColor: tokens.color.blue400,
|
|
165
|
-
backgroundColor: tokens.color.white,
|
|
166
|
-
paddingVertical: 3,
|
|
167
|
-
paddingHorizontal: 3,
|
|
168
|
-
activeBackgroundColor: tokens.color.green500,
|
|
169
|
-
itemSpacing: tokens.spacing1,
|
|
170
|
-
labelSpacing: tokens.spacing2,
|
|
171
|
-
},
|
|
172
|
-
swatch: {
|
|
173
|
-
fontSize: tokens.fontSize.smaller,
|
|
174
|
-
height: 40,
|
|
175
|
-
borderWidth: tokens.borderWidthNormal,
|
|
176
|
-
borderColor: tokens.color.blue400,
|
|
177
|
-
backgroundColor: tokens.color.white,
|
|
178
|
-
outerBorderRadius: tokens.borderRadius.medium,
|
|
179
|
-
innerBorderRadius: tokens.borderRadius.small,
|
|
180
|
-
paddingVertical: tokens.spacing1,
|
|
181
|
-
paddingHorizontal: tokens.spacing1,
|
|
182
|
-
nameTextWeight: '600',
|
|
183
|
-
},
|
|
184
|
-
slider: {
|
|
185
|
-
fontSize: tokens.fontSize.smaller,
|
|
186
|
-
labelTextColor: text.secondaryColor,
|
|
187
|
-
valueTextColor: text.primaryColor,
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
};
|
|
191
|
-
exports.darkTheme = {
|
|
192
|
-
tokens: tokens,
|
|
193
|
-
text: textOnDark,
|
|
194
|
-
backgroundColor: tokens.color.offBlack,
|
|
195
|
-
preview: {
|
|
196
|
-
containerBackgroundColor: tokens.color.black,
|
|
197
|
-
backgroundColor: tokens.color.offBlack,
|
|
198
|
-
},
|
|
199
|
-
navigation: {
|
|
200
|
-
backgroundColor: tokens.color.offBlack,
|
|
201
|
-
borderColor: tokens.color.grey800,
|
|
202
|
-
borderWidth: tokens.borderWidthNormal,
|
|
203
|
-
visibilityBorderRadius: tokens.borderRadius.small,
|
|
204
|
-
visibilityInnerBorderColor: tokens.color.navy,
|
|
205
|
-
visibilityOuterBorderColor: tokens.color.navy,
|
|
206
|
-
},
|
|
207
|
-
panel: {
|
|
208
|
-
backgroundColor: tokens.color.offBlack,
|
|
209
|
-
borderWidth: tokens.borderWidthNormal,
|
|
210
|
-
borderColor: tokens.color.grey800,
|
|
211
|
-
paddingVertical: 0,
|
|
212
|
-
paddingHorizontal: tokens.spacing2,
|
|
213
|
-
},
|
|
214
|
-
storyList: {
|
|
215
|
-
fontSize: tokens.fontSize.normal,
|
|
216
|
-
headerPaddingHorizontal: tokens.spacing2,
|
|
217
|
-
headerPaddingVertical: tokens.spacing2,
|
|
218
|
-
headerTextColor: textOnDark.primaryColor,
|
|
219
|
-
headerFontWeight: '500',
|
|
220
|
-
storyPaddingHorizontal: tokens.spacing2,
|
|
221
|
-
storyPaddingVertical: tokens.spacing1 * 1.5,
|
|
222
|
-
storyIndent: tokens.spacing6,
|
|
223
|
-
storyTextColor: textOnDark.primaryColor,
|
|
224
|
-
storyFontWeight: '400',
|
|
225
|
-
storySelectedBackgroundColor: tokens.color.navy,
|
|
226
|
-
storySelectedTextColor: tokens.color.white,
|
|
227
|
-
storySelectedFontWeight: '700',
|
|
228
|
-
sectionSpacing: tokens.spacing2,
|
|
229
|
-
sectionActiveBackgroundColor: tokens.color.grey800,
|
|
230
|
-
sectionBorderRadius: tokens.borderRadius.medium,
|
|
231
|
-
search: {
|
|
232
|
-
fontSize: tokens.fontSize.normal,
|
|
233
|
-
textColor: textOnDark.primaryColor,
|
|
234
|
-
placeholderTextColor: textOnDark.secondaryColor,
|
|
235
|
-
borderRadius: tokens.borderRadius.round,
|
|
236
|
-
borderColor: tokens.color.grey800,
|
|
237
|
-
borderWidth: tokens.borderWidthNormal,
|
|
238
|
-
backgroundColor: tokens.color.grey800,
|
|
239
|
-
paddingVertical: tokens.spacing2,
|
|
240
|
-
paddingHorizontal: tokens.spacing3,
|
|
241
|
-
},
|
|
242
|
-
},
|
|
243
|
-
button: {
|
|
244
|
-
fontSize: tokens.fontSize.smaller,
|
|
245
|
-
fontWeight: '600',
|
|
246
|
-
paddingVertical: tokens.spacing2,
|
|
247
|
-
paddingHorizontal: tokens.spacing5,
|
|
248
|
-
primary: {
|
|
249
|
-
textColor: textOnDark.primaryColor,
|
|
250
|
-
backgroundColor: tokens.color.black,
|
|
251
|
-
borderColor: tokens.color.blue300,
|
|
252
|
-
borderWidth: tokens.borderWidthNormal,
|
|
253
|
-
borderRadius: tokens.borderRadius.medium,
|
|
254
|
-
},
|
|
255
|
-
secondary: {
|
|
256
|
-
textColor: textOnDark.primaryColor,
|
|
257
|
-
backgroundColor: 'transparent',
|
|
258
|
-
borderColor: tokens.color.blue300,
|
|
259
|
-
borderWidth: tokens.borderWidthNormal,
|
|
260
|
-
borderRadius: tokens.borderRadius.medium,
|
|
261
|
-
},
|
|
262
|
-
},
|
|
263
|
-
tabs: {
|
|
264
|
-
fontSize: tokens.fontSize.small,
|
|
265
|
-
fontWeight: '500',
|
|
266
|
-
paddingVertical: tokens.spacing2,
|
|
267
|
-
paddingHorizontal: tokens.spacing2 * 1.25,
|
|
268
|
-
borderWidth: tokens.borderWidthNormal,
|
|
269
|
-
borderRadius: tokens.borderRadius.round,
|
|
270
|
-
activeBorderColor: tokens.color.blue300,
|
|
271
|
-
activeBackgroundColor: tokens.color.navy,
|
|
272
|
-
activeTextColor: textOnDark.primaryColor,
|
|
273
|
-
inactiveBorderColor: 'transparent',
|
|
274
|
-
inactiveBackgroundColor: 'transparent',
|
|
275
|
-
inactiveTextColor: textOnDark.secondaryColor,
|
|
276
|
-
},
|
|
277
|
-
inputs: {
|
|
278
|
-
errorTextColor: tokens.color.red500,
|
|
279
|
-
labelFontSize: tokens.fontSize.smaller,
|
|
280
|
-
labelTextColor: textOnDark.primaryColor,
|
|
281
|
-
text: {
|
|
282
|
-
fontSize: tokens.fontSize.smaller,
|
|
283
|
-
textColor: textOnDark.primaryColor,
|
|
284
|
-
borderWidth: tokens.borderWidthNormal,
|
|
285
|
-
borderColor: tokens.color.blue400,
|
|
286
|
-
backgroundColor: tokens.color.black,
|
|
287
|
-
borderRadius: tokens.borderRadius.medium,
|
|
288
|
-
paddingVertical: tokens.spacing1 * 1.5,
|
|
289
|
-
paddingHorizontal: tokens.spacing1 * 1.5,
|
|
290
|
-
},
|
|
291
|
-
radio: {
|
|
292
|
-
fontSize: tokens.fontSize.smaller,
|
|
293
|
-
height: 20,
|
|
294
|
-
borderWidth: tokens.borderWidthNormal,
|
|
295
|
-
borderColor: tokens.color.blue400,
|
|
296
|
-
backgroundColor: tokens.color.black,
|
|
297
|
-
paddingVertical: 3,
|
|
298
|
-
paddingHorizontal: 3,
|
|
299
|
-
activeBackgroundColor: tokens.color.green500,
|
|
300
|
-
itemSpacing: tokens.spacing1,
|
|
301
|
-
labelSpacing: tokens.spacing2,
|
|
302
|
-
},
|
|
303
|
-
swatch: {
|
|
304
|
-
fontSize: tokens.fontSize.smaller,
|
|
305
|
-
height: 40,
|
|
306
|
-
borderWidth: tokens.borderWidthNormal,
|
|
307
|
-
borderColor: tokens.color.blue400,
|
|
308
|
-
backgroundColor: tokens.color.navy,
|
|
309
|
-
outerBorderRadius: tokens.borderRadius.medium,
|
|
310
|
-
innerBorderRadius: tokens.borderRadius.small,
|
|
311
|
-
paddingVertical: tokens.spacing1,
|
|
312
|
-
paddingHorizontal: tokens.spacing1,
|
|
313
|
-
nameTextWeight: '600',
|
|
314
|
-
},
|
|
315
|
-
slider: {
|
|
316
|
-
fontSize: tokens.fontSize.smaller,
|
|
317
|
-
labelTextColor: textOnDark.secondaryColor,
|
|
318
|
-
valueTextColor: textOnDark.primaryColor,
|
|
319
|
-
},
|
|
320
|
-
},
|
|
321
|
-
};
|