@hero-design/rn 7.21.0 → 7.22.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/.eslintrc.js +11 -0
- package/.turbo/turbo-build.log +9 -9
- package/babel.config.js +1 -1
- package/es/index.js +377 -263
- package/lib/index.js +380 -266
- package/package.json +7 -15
- package/src/components/BottomNavigation/__tests__/index.spec.tsx +1 -1
- package/src/components/BottomNavigation/index.tsx +3 -3
- package/src/components/BottomSheet/StyledBottomSheet.tsx +10 -0
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +326 -292
- package/src/components/BottomSheet/index.tsx +46 -26
- package/src/components/Box/helpers.ts +1 -1
- package/src/components/Calendar/index.tsx +9 -9
- package/src/components/Collapse/index.tsx +1 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +176 -159
- package/src/components/Drawer/DragableDrawer/helpers.ts +7 -3
- package/src/components/FAB/ActionGroup/index.tsx +1 -1
- package/src/components/Icon/HeroIcon/selection.json +7029 -1
- package/src/components/PinInput/index.tsx +1 -1
- package/src/components/RichTextEditor/EditorToolbar.tsx +3 -3
- package/src/components/RichTextEditor/RichTextEditor.tsx +5 -5
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +2 -2
- package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +1 -1
- package/src/components/Select/MultiSelect/OptionList.tsx +1 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +4691 -4606
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +1 -1
- package/src/components/Select/MultiSelect/index.tsx +3 -3
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +4245 -4160
- package/src/components/Select/SingleSelect/index.tsx +3 -3
- package/src/components/Select/helpers.tsx +4 -4
- package/src/components/Slider/index.tsx +1 -1
- package/src/components/Switch/SelectorSwitch/Option.tsx +67 -0
- package/src/components/Switch/SelectorSwitch/StyledSelectorSwitch.tsx +25 -0
- package/src/components/Switch/SelectorSwitch/__tests__/Option.spec.tsx +61 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +195 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +121 -0
- package/src/components/Switch/SelectorSwitch/__tests__/index.spec.tsx +62 -0
- package/src/components/Switch/SelectorSwitch/index.tsx +60 -0
- package/src/components/Switch/index.tsx +4 -1
- package/src/components/Tabs/ScrollableTabs.tsx +12 -5
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +1 -1
- package/src/components/Tabs/__tests__/index.spec.tsx +1 -1
- package/src/components/Tabs/index.tsx +13 -6
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +3 -1
- package/src/components/TextInput/__tests__/index.spec.tsx +114 -112
- package/src/components/TextInput/index.tsx +29 -30
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +176 -159
- package/src/components/Toast/ToastContainer.tsx +6 -6
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +14 -12
- package/src/theme/components/switch.ts +14 -18
- package/testUtils/setup.tsx +1 -1
- package/tsconfig.json +1 -1
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +8 -2
- package/types/components/BottomSheet/index.d.ts +6 -1
- package/types/components/Slider/index.d.ts +1 -1
- package/types/components/Switch/SelectorSwitch/Option.d.ts +10 -0
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +19 -0
- package/types/components/Switch/SelectorSwitch/__tests__/Option.spec.d.ts +1 -0
- package/types/components/Switch/SelectorSwitch/__tests__/index.spec.d.ts +1 -0
- package/types/components/Switch/SelectorSwitch/index.d.ts +37 -0
- package/types/components/Switch/index.d.ts +5 -3
- package/types/components/Tabs/ScrollableTabs.d.ts +1 -1
- package/types/components/Tabs/index.d.ts +2 -2
- package/types/components/TextInput/index.d.ts +4 -4
- package/types/theme/components/switch.d.ts +14 -12
- package/.eslintrc.json +0 -62
- package/.prettierrc.json +0 -8
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { StyleSheet } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
3
|
import type {
|
|
4
4
|
TextInputProps as NativeTextInputProps,
|
|
5
5
|
StyleProp,
|
|
6
6
|
ViewStyle,
|
|
7
7
|
TextStyle,
|
|
8
|
-
} from
|
|
8
|
+
} from "react-native";
|
|
9
9
|
import {
|
|
10
10
|
StyledTextInputContainer,
|
|
11
11
|
StyledLabel,
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
StyledErrorAndHelpTextContainer,
|
|
25
25
|
StyledBorderBackDrop,
|
|
26
26
|
StyledErrorAndMaxLengthContainer,
|
|
27
|
-
} from
|
|
28
|
-
import Icon from
|
|
29
|
-
import { useTheme } from
|
|
30
|
-
import type { Variant } from
|
|
31
|
-
import type { IconName } from
|
|
27
|
+
} from "./StyledTextInput";
|
|
28
|
+
import Icon from "../Icon";
|
|
29
|
+
import { useTheme } from "../../theme";
|
|
30
|
+
import type { Variant } from "./StyledTextInput";
|
|
31
|
+
import type { IconName } from "../Icon";
|
|
32
32
|
|
|
33
33
|
export interface TextInputProps extends NativeTextInputProps {
|
|
34
34
|
/**
|
|
@@ -114,21 +114,21 @@ export const getVariant = ({
|
|
|
114
114
|
isEmptyValue?: boolean;
|
|
115
115
|
}): Variant => {
|
|
116
116
|
if (disabled) {
|
|
117
|
-
return
|
|
117
|
+
return "disabled";
|
|
118
118
|
}
|
|
119
119
|
if (error) {
|
|
120
|
-
return
|
|
120
|
+
return "error";
|
|
121
121
|
}
|
|
122
122
|
if (!editable || loading) {
|
|
123
|
-
return
|
|
123
|
+
return "readonly";
|
|
124
124
|
}
|
|
125
125
|
if (isFocused) {
|
|
126
|
-
return
|
|
126
|
+
return "focused";
|
|
127
127
|
}
|
|
128
128
|
if (!isEmptyValue) {
|
|
129
|
-
return
|
|
129
|
+
return "filled";
|
|
130
130
|
}
|
|
131
|
-
return
|
|
131
|
+
return "default";
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
const TextInput = ({
|
|
@@ -151,9 +151,9 @@ const TextInput = ({
|
|
|
151
151
|
renderInputValue,
|
|
152
152
|
...nativeProps
|
|
153
153
|
}: TextInputProps): JSX.Element => {
|
|
154
|
-
const displayText = (value !== undefined ? value : defaultValue) ??
|
|
154
|
+
const displayText = (value !== undefined ? value : defaultValue) ?? "";
|
|
155
155
|
const isEmptyValue = displayText.length === 0;
|
|
156
|
-
const actualSuffix = loading ?
|
|
156
|
+
const actualSuffix = loading ? "loading" : suffix;
|
|
157
157
|
|
|
158
158
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
159
159
|
|
|
@@ -175,41 +175,40 @@ const TextInput = ({
|
|
|
175
175
|
{ color: theme.__hd__.textInput.colors.text },
|
|
176
176
|
textStyle,
|
|
177
177
|
]),
|
|
178
|
-
testID:
|
|
178
|
+
testID: "text-input",
|
|
179
179
|
accessibilityState: {
|
|
180
|
-
disabled: variant ===
|
|
180
|
+
disabled: variant === "disabled" || variant === "readonly",
|
|
181
181
|
},
|
|
182
182
|
// @ts-ignore
|
|
183
183
|
accessibilityLabelledBy,
|
|
184
184
|
...nativeProps,
|
|
185
|
-
onFocus: event => {
|
|
185
|
+
onFocus: (event) => {
|
|
186
186
|
setIsFocused(true);
|
|
187
187
|
nativeProps.onFocus?.(event);
|
|
188
188
|
},
|
|
189
|
-
onBlur: event => {
|
|
189
|
+
onBlur: (event) => {
|
|
190
190
|
setIsFocused(false);
|
|
191
191
|
nativeProps.onBlur?.(event);
|
|
192
192
|
},
|
|
193
193
|
editable,
|
|
194
194
|
maxLength,
|
|
195
195
|
value,
|
|
196
|
-
onChangeText: text => {
|
|
196
|
+
onChangeText: (text) => {
|
|
197
197
|
nativeProps.onChangeText?.(text);
|
|
198
198
|
},
|
|
199
199
|
defaultValue,
|
|
200
|
-
placeholder: variant ===
|
|
200
|
+
placeholder: variant === "focused" ? nativeProps.placeholder : undefined,
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
return (
|
|
204
204
|
<StyledContainer
|
|
205
|
-
style={style}
|
|
206
205
|
pointerEvents={
|
|
207
|
-
variant ===
|
|
206
|
+
variant === "disabled" || variant === "readonly" ? "none" : "auto"
|
|
208
207
|
}
|
|
209
208
|
testID={testID}
|
|
210
209
|
>
|
|
211
210
|
<StyledTextInputContainer>
|
|
212
|
-
<StyledBorderBackDrop themeVariant={variant} />
|
|
211
|
+
<StyledBorderBackDrop themeVariant={variant} style={style} />
|
|
213
212
|
{(isFocused || (label && !isEmptyValue)) && (
|
|
214
213
|
<StyledLabelContainer pointerEvents="none">
|
|
215
214
|
{required && (
|
|
@@ -229,9 +228,9 @@ const TextInput = ({
|
|
|
229
228
|
)}
|
|
230
229
|
</StyledLabelContainer>
|
|
231
230
|
)}
|
|
232
|
-
{typeof prefix ===
|
|
231
|
+
{typeof prefix === "string" ? (
|
|
233
232
|
<Icon
|
|
234
|
-
intent={variant ===
|
|
233
|
+
intent={variant === "disabled" ? "disabled-text" : "text"}
|
|
235
234
|
testID="input-prefix"
|
|
236
235
|
icon={prefix}
|
|
237
236
|
size="xsmall"
|
|
@@ -265,12 +264,12 @@ const TextInput = ({
|
|
|
265
264
|
<StyledTextInput {...nativeInputProps} />
|
|
266
265
|
)}
|
|
267
266
|
</StyledTextInputAndLabelContainer>
|
|
268
|
-
{typeof actualSuffix ===
|
|
267
|
+
{typeof actualSuffix === "string" ? (
|
|
269
268
|
<Icon
|
|
270
|
-
intent={variant ===
|
|
269
|
+
intent={variant === "disabled" ? "disabled-text" : "text"}
|
|
271
270
|
testID="input-suffix"
|
|
272
271
|
icon={actualSuffix}
|
|
273
|
-
spin={actualSuffix ===
|
|
272
|
+
spin={actualSuffix === "loading"}
|
|
274
273
|
size="xsmall"
|
|
275
274
|
/>
|
|
276
275
|
) : (
|
|
@@ -277,166 +277,146 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
/>
|
|
280
|
-
<
|
|
281
|
-
collapsable={false}
|
|
282
|
-
emulateUnlessSupported={true}
|
|
283
|
-
nativeID="animatedComponent"
|
|
280
|
+
<View
|
|
284
281
|
onLayout={[Function]}
|
|
285
282
|
style={
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
"borderTopLeftRadius": 16,
|
|
289
|
-
"borderTopRightRadius": 16,
|
|
290
|
-
"elevation": 10,
|
|
291
|
-
"maxHeight": "94%",
|
|
292
|
-
"shadowColor": "#001f23",
|
|
293
|
-
"shadowOffset": Object {
|
|
294
|
-
"height": 3,
|
|
295
|
-
"width": 0,
|
|
296
|
-
},
|
|
297
|
-
"shadowOpacity": 0.27,
|
|
298
|
-
"shadowRadius": 4.65,
|
|
299
|
-
"transform": Array [
|
|
300
|
-
Object {
|
|
301
|
-
"scaleY": 0,
|
|
302
|
-
},
|
|
283
|
+
Array [
|
|
284
|
+
Array [
|
|
303
285
|
Object {
|
|
304
|
-
"
|
|
286
|
+
"flex": 1,
|
|
287
|
+
"flexDirection": "column-reverse",
|
|
305
288
|
},
|
|
289
|
+
undefined,
|
|
306
290
|
],
|
|
307
|
-
|
|
308
|
-
|
|
291
|
+
Object {
|
|
292
|
+
"paddingBottom": 0,
|
|
293
|
+
},
|
|
294
|
+
]
|
|
309
295
|
}
|
|
310
296
|
>
|
|
311
|
-
<
|
|
297
|
+
<RCTSafeAreaView
|
|
298
|
+
collapsable={false}
|
|
299
|
+
emulateUnlessSupported={true}
|
|
300
|
+
nativeID="animatedComponent"
|
|
312
301
|
style={
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
302
|
+
Object {
|
|
303
|
+
"backgroundColor": "#ffffff",
|
|
304
|
+
"borderTopLeftRadius": 16,
|
|
305
|
+
"borderTopRightRadius": 16,
|
|
306
|
+
"elevation": 10,
|
|
307
|
+
"maxHeight": "94%",
|
|
308
|
+
"shadowColor": "#001f23",
|
|
309
|
+
"shadowOffset": Object {
|
|
310
|
+
"height": 3,
|
|
311
|
+
"width": 0,
|
|
318
312
|
},
|
|
319
|
-
|
|
320
|
-
|
|
313
|
+
"shadowOpacity": 0.27,
|
|
314
|
+
"shadowRadius": 4.65,
|
|
315
|
+
"transform": Array [
|
|
316
|
+
Object {
|
|
317
|
+
"scaleY": 1,
|
|
318
|
+
},
|
|
319
|
+
Object {
|
|
320
|
+
"translateY": 0,
|
|
321
|
+
},
|
|
322
|
+
],
|
|
323
|
+
"width": "100%",
|
|
324
|
+
}
|
|
321
325
|
}
|
|
322
326
|
>
|
|
323
327
|
<View
|
|
324
328
|
style={
|
|
325
329
|
Array [
|
|
326
330
|
Object {
|
|
327
|
-
"
|
|
328
|
-
"
|
|
331
|
+
"flexDirection": "row",
|
|
332
|
+
"paddingHorizontal": 16,
|
|
333
|
+
"paddingVertical": 8,
|
|
329
334
|
},
|
|
330
335
|
undefined,
|
|
331
336
|
]
|
|
332
337
|
}
|
|
333
338
|
>
|
|
334
|
-
<
|
|
339
|
+
<View
|
|
335
340
|
style={
|
|
336
341
|
Array [
|
|
337
342
|
Object {
|
|
338
|
-
"
|
|
339
|
-
"
|
|
340
|
-
"fontSize": 16,
|
|
341
|
-
"letterSpacing": 0.48,
|
|
342
|
-
"lineHeight": 24,
|
|
343
|
+
"flex": 1,
|
|
344
|
+
"justifyContent": "center",
|
|
343
345
|
},
|
|
344
346
|
undefined,
|
|
345
347
|
]
|
|
346
348
|
}
|
|
347
|
-
themeFontSize="large"
|
|
348
|
-
themeFontWeight="semi-bold"
|
|
349
|
-
themeIntent="body"
|
|
350
|
-
>
|
|
351
|
-
Break time
|
|
352
|
-
</Text>
|
|
353
|
-
</View>
|
|
354
|
-
<View
|
|
355
|
-
style={
|
|
356
|
-
Array [
|
|
357
|
-
Object {
|
|
358
|
-
"alignItems": "center",
|
|
359
|
-
"height": 48,
|
|
360
|
-
"justifyContent": "center",
|
|
361
|
-
"marginLeft": 12,
|
|
362
|
-
"width": 48,
|
|
363
|
-
},
|
|
364
|
-
undefined,
|
|
365
|
-
]
|
|
366
|
-
}
|
|
367
|
-
>
|
|
368
|
-
<View
|
|
369
|
-
accessible={true}
|
|
370
|
-
collapsable={false}
|
|
371
|
-
focusable={true}
|
|
372
|
-
nativeID="animatedComponent"
|
|
373
|
-
onClick={[Function]}
|
|
374
|
-
onResponderGrant={[Function]}
|
|
375
|
-
onResponderMove={[Function]}
|
|
376
|
-
onResponderRelease={[Function]}
|
|
377
|
-
onResponderTerminate={[Function]}
|
|
378
|
-
onResponderTerminationRequest={[Function]}
|
|
379
|
-
onStartShouldSetResponder={[Function]}
|
|
380
|
-
style={
|
|
381
|
-
Object {
|
|
382
|
-
"opacity": 1,
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
testID="bottom-sheet-close-icon"
|
|
386
349
|
>
|
|
387
|
-
<
|
|
388
|
-
name="cancel"
|
|
350
|
+
<Text
|
|
389
351
|
style={
|
|
390
352
|
Array [
|
|
391
353
|
Object {
|
|
392
354
|
"color": "#001f23",
|
|
393
|
-
"
|
|
355
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
356
|
+
"fontSize": 16,
|
|
357
|
+
"letterSpacing": 0.48,
|
|
358
|
+
"lineHeight": 24,
|
|
394
359
|
},
|
|
395
360
|
undefined,
|
|
396
361
|
]
|
|
397
362
|
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
363
|
+
themeFontSize="large"
|
|
364
|
+
themeFontWeight="semi-bold"
|
|
365
|
+
themeIntent="body"
|
|
366
|
+
>
|
|
367
|
+
Break time
|
|
368
|
+
</Text>
|
|
401
369
|
</View>
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
/>
|
|
416
|
-
<View
|
|
417
|
-
style={
|
|
418
|
-
Array [
|
|
419
|
-
Object {
|
|
420
|
-
"height": 176,
|
|
421
|
-
},
|
|
422
|
-
undefined,
|
|
423
|
-
]
|
|
424
|
-
}
|
|
425
|
-
>
|
|
426
|
-
<Picker
|
|
427
|
-
display="spinner"
|
|
428
|
-
mode="time"
|
|
429
|
-
onChange={[Function]}
|
|
430
|
-
style={
|
|
431
|
-
Object {
|
|
432
|
-
"flex": 1,
|
|
370
|
+
<View
|
|
371
|
+
style={
|
|
372
|
+
Array [
|
|
373
|
+
Object {
|
|
374
|
+
"alignItems": "center",
|
|
375
|
+
"height": 48,
|
|
376
|
+
"justifyContent": "center",
|
|
377
|
+
"marginLeft": 12,
|
|
378
|
+
"width": 48,
|
|
379
|
+
},
|
|
380
|
+
undefined,
|
|
381
|
+
]
|
|
433
382
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
383
|
+
>
|
|
384
|
+
<View
|
|
385
|
+
accessible={true}
|
|
386
|
+
collapsable={false}
|
|
387
|
+
focusable={true}
|
|
388
|
+
nativeID="animatedComponent"
|
|
389
|
+
onClick={[Function]}
|
|
390
|
+
onResponderGrant={[Function]}
|
|
391
|
+
onResponderMove={[Function]}
|
|
392
|
+
onResponderRelease={[Function]}
|
|
393
|
+
onResponderTerminate={[Function]}
|
|
394
|
+
onResponderTerminationRequest={[Function]}
|
|
395
|
+
onStartShouldSetResponder={[Function]}
|
|
396
|
+
style={
|
|
397
|
+
Object {
|
|
398
|
+
"opacity": 1,
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
testID="bottom-sheet-close-icon"
|
|
402
|
+
>
|
|
403
|
+
<HeroIcon
|
|
404
|
+
name="cancel"
|
|
405
|
+
style={
|
|
406
|
+
Array [
|
|
407
|
+
Object {
|
|
408
|
+
"color": "#001f23",
|
|
409
|
+
"fontSize": 20,
|
|
410
|
+
},
|
|
411
|
+
undefined,
|
|
412
|
+
]
|
|
413
|
+
}
|
|
414
|
+
themeIntent="text"
|
|
415
|
+
themeSize="small"
|
|
416
|
+
/>
|
|
417
|
+
</View>
|
|
418
|
+
</View>
|
|
419
|
+
</View>
|
|
440
420
|
<View
|
|
441
421
|
style={
|
|
442
422
|
Array [
|
|
@@ -453,58 +433,95 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
453
433
|
style={
|
|
454
434
|
Array [
|
|
455
435
|
Object {
|
|
456
|
-
"
|
|
457
|
-
"flexDirection": "row",
|
|
458
|
-
"justifyContent": "flex-end",
|
|
459
|
-
"minHeight": 64,
|
|
460
|
-
"paddingHorizontal": 12,
|
|
461
|
-
"paddingVertical": 8,
|
|
436
|
+
"height": 176,
|
|
462
437
|
},
|
|
463
438
|
undefined,
|
|
464
439
|
]
|
|
465
440
|
}
|
|
466
441
|
>
|
|
467
|
-
<
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
nativeID="animatedComponent"
|
|
472
|
-
onClick={[Function]}
|
|
473
|
-
onResponderGrant={[Function]}
|
|
474
|
-
onResponderMove={[Function]}
|
|
475
|
-
onResponderRelease={[Function]}
|
|
476
|
-
onResponderTerminate={[Function]}
|
|
477
|
-
onResponderTerminationRequest={[Function]}
|
|
478
|
-
onStartShouldSetResponder={[Function]}
|
|
442
|
+
<Picker
|
|
443
|
+
display="spinner"
|
|
444
|
+
mode="time"
|
|
445
|
+
onChange={[Function]}
|
|
479
446
|
style={
|
|
480
447
|
Object {
|
|
481
|
-
"
|
|
448
|
+
"flex": 1,
|
|
482
449
|
}
|
|
483
450
|
}
|
|
451
|
+
testID="timePickerIOS"
|
|
452
|
+
value={1995-12-17T03:24:00.000Z}
|
|
453
|
+
/>
|
|
454
|
+
</View>
|
|
455
|
+
<View>
|
|
456
|
+
<View
|
|
457
|
+
style={
|
|
458
|
+
Array [
|
|
459
|
+
Object {
|
|
460
|
+
"borderBottomColor": "#e8e9ea",
|
|
461
|
+
"borderBottomWidth": 1,
|
|
462
|
+
"maxWidth": "100%",
|
|
463
|
+
},
|
|
464
|
+
undefined,
|
|
465
|
+
]
|
|
466
|
+
}
|
|
467
|
+
/>
|
|
468
|
+
<View
|
|
469
|
+
style={
|
|
470
|
+
Array [
|
|
471
|
+
Object {
|
|
472
|
+
"alignItems": "center",
|
|
473
|
+
"flexDirection": "row",
|
|
474
|
+
"justifyContent": "flex-end",
|
|
475
|
+
"minHeight": 64,
|
|
476
|
+
"paddingHorizontal": 12,
|
|
477
|
+
"paddingVertical": 8,
|
|
478
|
+
},
|
|
479
|
+
undefined,
|
|
480
|
+
]
|
|
481
|
+
}
|
|
484
482
|
>
|
|
485
|
-
<
|
|
483
|
+
<View
|
|
484
|
+
accessible={true}
|
|
485
|
+
collapsable={false}
|
|
486
|
+
focusable={true}
|
|
487
|
+
nativeID="animatedComponent"
|
|
488
|
+
onClick={[Function]}
|
|
489
|
+
onResponderGrant={[Function]}
|
|
490
|
+
onResponderMove={[Function]}
|
|
491
|
+
onResponderRelease={[Function]}
|
|
492
|
+
onResponderTerminate={[Function]}
|
|
493
|
+
onResponderTerminationRequest={[Function]}
|
|
494
|
+
onStartShouldSetResponder={[Function]}
|
|
486
495
|
style={
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
491
|
-
"fontSize": 16,
|
|
492
|
-
"letterSpacing": 0.48,
|
|
493
|
-
"lineHeight": 24,
|
|
494
|
-
},
|
|
495
|
-
undefined,
|
|
496
|
-
]
|
|
496
|
+
Object {
|
|
497
|
+
"opacity": 1,
|
|
498
|
+
}
|
|
497
499
|
}
|
|
498
|
-
themeFontSize="large"
|
|
499
|
-
themeFontWeight="semi-bold"
|
|
500
|
-
themeIntent="primary"
|
|
501
500
|
>
|
|
502
|
-
|
|
503
|
-
|
|
501
|
+
<Text
|
|
502
|
+
style={
|
|
503
|
+
Array [
|
|
504
|
+
Object {
|
|
505
|
+
"color": "#8505a2",
|
|
506
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
507
|
+
"fontSize": 16,
|
|
508
|
+
"letterSpacing": 0.48,
|
|
509
|
+
"lineHeight": 24,
|
|
510
|
+
},
|
|
511
|
+
undefined,
|
|
512
|
+
]
|
|
513
|
+
}
|
|
514
|
+
themeFontSize="large"
|
|
515
|
+
themeFontWeight="semi-bold"
|
|
516
|
+
themeIntent="primary"
|
|
517
|
+
>
|
|
518
|
+
Confirm
|
|
519
|
+
</Text>
|
|
520
|
+
</View>
|
|
504
521
|
</View>
|
|
505
522
|
</View>
|
|
506
|
-
</
|
|
507
|
-
</
|
|
523
|
+
</RCTSafeAreaView>
|
|
524
|
+
</View>
|
|
508
525
|
</View>
|
|
509
526
|
</View>
|
|
510
527
|
</View>
|
|
@@ -28,7 +28,7 @@ const SingleToastDisplay = ({
|
|
|
28
28
|
key={toast.id}
|
|
29
29
|
style={{ marginBottom: theme.space.small }}
|
|
30
30
|
onDismiss={() => {
|
|
31
|
-
setToastList(state => state.filter(item => item.id !== toast.id));
|
|
31
|
+
setToastList((state) => state.filter((item) => item.id !== toast.id));
|
|
32
32
|
toast.props.onDismiss?.();
|
|
33
33
|
}}
|
|
34
34
|
/>
|
|
@@ -43,17 +43,17 @@ const ToastContainer = React.forwardRef<
|
|
|
43
43
|
const [toastList, setToastList] = useState<ToastItemProps[]>([]);
|
|
44
44
|
|
|
45
45
|
useImperativeHandle(ref, () => ({
|
|
46
|
-
show: props => {
|
|
46
|
+
show: (props) => {
|
|
47
47
|
const item = {
|
|
48
48
|
id: generateID(),
|
|
49
49
|
props,
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
setToastList(state => [item, ...state]);
|
|
52
|
+
setToastList((state) => [item, ...state]);
|
|
53
53
|
return item.id;
|
|
54
54
|
},
|
|
55
|
-
hide: id => {
|
|
56
|
-
setToastList(state => state.filter(item => item.id !== id));
|
|
55
|
+
hide: (id) => {
|
|
56
|
+
setToastList((state) => state.filter((item) => item.id !== id));
|
|
57
57
|
},
|
|
58
58
|
clearAll: () => {
|
|
59
59
|
setToastList([]);
|
|
@@ -75,7 +75,7 @@ const ToastContainer = React.forwardRef<
|
|
|
75
75
|
key={id}
|
|
76
76
|
style={{ marginBottom: theme.space.small }}
|
|
77
77
|
onDismiss={() => {
|
|
78
|
-
setToastList(state => state.filter(item => item.id !== id));
|
|
78
|
+
setToastList((state) => state.filter((item) => item.id !== id));
|
|
79
79
|
props.onDismiss?.();
|
|
80
80
|
}}
|
|
81
81
|
/>
|
|
@@ -621,20 +621,26 @@ Object {
|
|
|
621
621
|
"disabled-unchecked": "#ccced1",
|
|
622
622
|
"unchecked": "#808f91",
|
|
623
623
|
},
|
|
624
|
+
"selector": Object {
|
|
625
|
+
"background": "#f6f6f7",
|
|
626
|
+
"textBackground": "#401960",
|
|
627
|
+
},
|
|
624
628
|
"thumb": "#ffffff",
|
|
625
629
|
},
|
|
626
|
-
"heights": Object {
|
|
627
|
-
"medium": 28.799999999999997,
|
|
628
|
-
"small": 24,
|
|
629
|
-
},
|
|
630
630
|
"radii": Object {
|
|
631
631
|
"rounded": 999,
|
|
632
|
+
"selector": Object {
|
|
633
|
+
"default": 999,
|
|
634
|
+
},
|
|
632
635
|
},
|
|
633
636
|
"sizes": Object {
|
|
634
637
|
"heights": Object {
|
|
635
638
|
"medium": 32,
|
|
636
639
|
"small": 24,
|
|
637
640
|
},
|
|
641
|
+
"selector": Object {
|
|
642
|
+
"height": 56,
|
|
643
|
+
},
|
|
638
644
|
"thumbs": Object {
|
|
639
645
|
"medium": 24,
|
|
640
646
|
"small": 16,
|
|
@@ -646,16 +652,12 @@ Object {
|
|
|
646
652
|
},
|
|
647
653
|
"spaces": Object {
|
|
648
654
|
"medium": 4,
|
|
655
|
+
"selector": Object {
|
|
656
|
+
"iconPadding": 16,
|
|
657
|
+
"wrapperPadding": 4,
|
|
658
|
+
},
|
|
649
659
|
"small": 4,
|
|
650
660
|
},
|
|
651
|
-
"thumbSizes": Object {
|
|
652
|
-
"medium": 20.8,
|
|
653
|
-
"small": 16,
|
|
654
|
-
},
|
|
655
|
-
"widths": Object {
|
|
656
|
-
"medium": 56,
|
|
657
|
-
"small": 48,
|
|
658
|
-
},
|
|
659
661
|
},
|
|
660
662
|
"tabs": Object {
|
|
661
663
|
"borderWidths": Object {
|