@hero-design/rn 8.2.0 → 8.2.2
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/.turbo/turbo-build.log +9 -9
- package/es/index.js +4246 -4084
- package/lib/index.js +4245 -4083
- package/package.json +6 -6
- package/src/components/BottomSheet/BottomSheetContext.ts +11 -0
- package/src/components/BottomSheet/ScrollView.tsx +57 -0
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +9 -24
- package/src/components/BottomSheet/__tests__/index.spec.tsx +17 -0
- package/src/components/BottomSheet/index.tsx +21 -8
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -24
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/PinInput/index.tsx +1 -0
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +2 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +6 -72
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +6 -36
- package/src/components/TextInput/StyledTextInput.tsx +2 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +6 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +19 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +2 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +2 -24
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +4 -0
- package/src/theme/components/textInput.ts +6 -1
- package/types/components/BottomSheet/BottomSheetContext.d.ts +5 -0
- package/types/components/BottomSheet/ScrollView.d.ts +3 -0
- package/types/components/BottomSheet/index.d.ts +5 -3
- package/types/theme/components/textInput.d.ts +4 -0
|
@@ -181,6 +181,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant default 1`] =
|
|
|
181
181
|
"alignItems": "center",
|
|
182
182
|
"color": "#001f23",
|
|
183
183
|
"fontSize": 14,
|
|
184
|
+
"lineHeight": 18,
|
|
184
185
|
"textAlignVertical": "center",
|
|
185
186
|
},
|
|
186
187
|
undefined,
|
|
@@ -214,6 +215,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant disabled 1`] =
|
|
|
214
215
|
"alignItems": "center",
|
|
215
216
|
"color": "#bfc1c5",
|
|
216
217
|
"fontSize": 14,
|
|
218
|
+
"lineHeight": 18,
|
|
217
219
|
"textAlignVertical": "center",
|
|
218
220
|
},
|
|
219
221
|
undefined,
|
|
@@ -247,6 +249,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant error 1`] = `
|
|
|
247
249
|
"alignItems": "center",
|
|
248
250
|
"color": "#001f23",
|
|
249
251
|
"fontSize": 14,
|
|
252
|
+
"lineHeight": 18,
|
|
250
253
|
"textAlignVertical": "center",
|
|
251
254
|
},
|
|
252
255
|
undefined,
|
|
@@ -280,6 +283,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant filled 1`] = `
|
|
|
280
283
|
"alignItems": "center",
|
|
281
284
|
"color": "#001f23",
|
|
282
285
|
"fontSize": 14,
|
|
286
|
+
"lineHeight": 18,
|
|
283
287
|
"textAlignVertical": "center",
|
|
284
288
|
},
|
|
285
289
|
undefined,
|
|
@@ -313,6 +317,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant readonly 1`] =
|
|
|
313
317
|
"alignItems": "center",
|
|
314
318
|
"color": "#808f91",
|
|
315
319
|
"fontSize": 14,
|
|
320
|
+
"lineHeight": 18,
|
|
316
321
|
"textAlignVertical": "center",
|
|
317
322
|
},
|
|
318
323
|
undefined,
|
|
@@ -870,6 +875,7 @@ exports[`StyledTextInput renders correctly 1`] = `
|
|
|
870
875
|
"alignSelf": "stretch",
|
|
871
876
|
"flexGrow": 2,
|
|
872
877
|
"fontSize": 14,
|
|
878
|
+
"lineHeight": 18,
|
|
873
879
|
"marginHorizontal": 8,
|
|
874
880
|
"paddingVertical": 0,
|
|
875
881
|
"textAlignVertical": "center",
|
|
@@ -163,6 +163,7 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
|
|
|
163
163
|
"alignSelf": "stretch",
|
|
164
164
|
"flexGrow": 2,
|
|
165
165
|
"fontSize": 14,
|
|
166
|
+
"lineHeight": 18,
|
|
166
167
|
"marginHorizontal": 8,
|
|
167
168
|
"paddingVertical": 0,
|
|
168
169
|
"textAlignVertical": "center",
|
|
@@ -424,6 +425,7 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
|
|
|
424
425
|
"alignSelf": "stretch",
|
|
425
426
|
"flexGrow": 2,
|
|
426
427
|
"fontSize": 14,
|
|
428
|
+
"lineHeight": 18,
|
|
427
429
|
"marginHorizontal": 8,
|
|
428
430
|
"paddingVertical": 0,
|
|
429
431
|
"textAlignVertical": "center",
|
|
@@ -670,6 +672,7 @@ exports[`TextInput disabled renders correctly 1`] = `
|
|
|
670
672
|
"alignSelf": "stretch",
|
|
671
673
|
"flexGrow": 2,
|
|
672
674
|
"fontSize": 14,
|
|
675
|
+
"lineHeight": 18,
|
|
673
676
|
"marginHorizontal": 8,
|
|
674
677
|
"paddingVertical": 0,
|
|
675
678
|
"textAlignVertical": "center",
|
|
@@ -843,6 +846,7 @@ exports[`TextInput error renders correctly 1`] = `
|
|
|
843
846
|
"alignItems": "center",
|
|
844
847
|
"color": "#001f23",
|
|
845
848
|
"fontSize": 14,
|
|
849
|
+
"lineHeight": 18,
|
|
846
850
|
"textAlignVertical": "center",
|
|
847
851
|
},
|
|
848
852
|
undefined,
|
|
@@ -876,6 +880,7 @@ exports[`TextInput error renders correctly 1`] = `
|
|
|
876
880
|
"alignSelf": "stretch",
|
|
877
881
|
"flexGrow": 2,
|
|
878
882
|
"fontSize": 14,
|
|
883
|
+
"lineHeight": 18,
|
|
879
884
|
"marginHorizontal": 8,
|
|
880
885
|
"paddingVertical": 0,
|
|
881
886
|
"textAlignVertical": "center",
|
|
@@ -1108,6 +1113,7 @@ exports[`TextInput filled renders correctly 1`] = `
|
|
|
1108
1113
|
"alignSelf": "stretch",
|
|
1109
1114
|
"flexGrow": 2,
|
|
1110
1115
|
"fontSize": 14,
|
|
1116
|
+
"lineHeight": 18,
|
|
1111
1117
|
"marginHorizontal": 8,
|
|
1112
1118
|
"paddingVertical": 0,
|
|
1113
1119
|
"textAlignVertical": "center",
|
|
@@ -1296,6 +1302,7 @@ exports[`TextInput helper text renders correctly 1`] = `
|
|
|
1296
1302
|
"alignItems": "center",
|
|
1297
1303
|
"color": "#001f23",
|
|
1298
1304
|
"fontSize": 14,
|
|
1305
|
+
"lineHeight": 18,
|
|
1299
1306
|
"textAlignVertical": "center",
|
|
1300
1307
|
},
|
|
1301
1308
|
undefined,
|
|
@@ -1329,6 +1336,7 @@ exports[`TextInput helper text renders correctly 1`] = `
|
|
|
1329
1336
|
"alignSelf": "stretch",
|
|
1330
1337
|
"flexGrow": 2,
|
|
1331
1338
|
"fontSize": 14,
|
|
1339
|
+
"lineHeight": 18,
|
|
1332
1340
|
"marginHorizontal": 8,
|
|
1333
1341
|
"paddingVertical": 0,
|
|
1334
1342
|
"textAlignVertical": "center",
|
|
@@ -1502,6 +1510,7 @@ exports[`TextInput idle renders correctly 1`] = `
|
|
|
1502
1510
|
"alignItems": "center",
|
|
1503
1511
|
"color": "#001f23",
|
|
1504
1512
|
"fontSize": 14,
|
|
1513
|
+
"lineHeight": 18,
|
|
1505
1514
|
"textAlignVertical": "center",
|
|
1506
1515
|
},
|
|
1507
1516
|
undefined,
|
|
@@ -1535,6 +1544,7 @@ exports[`TextInput idle renders correctly 1`] = `
|
|
|
1535
1544
|
"alignSelf": "stretch",
|
|
1536
1545
|
"flexGrow": 2,
|
|
1537
1546
|
"fontSize": 14,
|
|
1547
|
+
"lineHeight": 18,
|
|
1538
1548
|
"marginHorizontal": 8,
|
|
1539
1549
|
"paddingVertical": 0,
|
|
1540
1550
|
"textAlignVertical": "center",
|
|
@@ -1722,6 +1732,7 @@ exports[`TextInput idle with suffix and prefix are React Element renders correct
|
|
|
1722
1732
|
"alignItems": "center",
|
|
1723
1733
|
"color": "#001f23",
|
|
1724
1734
|
"fontSize": 14,
|
|
1735
|
+
"lineHeight": 18,
|
|
1725
1736
|
"textAlignVertical": "center",
|
|
1726
1737
|
},
|
|
1727
1738
|
undefined,
|
|
@@ -1755,6 +1766,7 @@ exports[`TextInput idle with suffix and prefix are React Element renders correct
|
|
|
1755
1766
|
"alignSelf": "stretch",
|
|
1756
1767
|
"flexGrow": 2,
|
|
1757
1768
|
"fontSize": 14,
|
|
1769
|
+
"lineHeight": 18,
|
|
1758
1770
|
"marginHorizontal": 8,
|
|
1759
1771
|
"paddingVertical": 0,
|
|
1760
1772
|
"textAlignVertical": "center",
|
|
@@ -1900,6 +1912,7 @@ exports[`TextInput loading renders correctly 1`] = `
|
|
|
1900
1912
|
"alignSelf": "stretch",
|
|
1901
1913
|
"flexGrow": 2,
|
|
1902
1914
|
"fontSize": 14,
|
|
1915
|
+
"lineHeight": 18,
|
|
1903
1916
|
"marginHorizontal": 8,
|
|
1904
1917
|
"paddingVertical": 0,
|
|
1905
1918
|
"textAlignVertical": "center",
|
|
@@ -2114,6 +2127,7 @@ exports[`TextInput max length renders correctly 1`] = `
|
|
|
2114
2127
|
"alignSelf": "stretch",
|
|
2115
2128
|
"flexGrow": 2,
|
|
2116
2129
|
"fontSize": 14,
|
|
2130
|
+
"lineHeight": 18,
|
|
2117
2131
|
"marginHorizontal": 8,
|
|
2118
2132
|
"paddingVertical": 0,
|
|
2119
2133
|
"textAlignVertical": "center",
|
|
@@ -2380,6 +2394,7 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
|
|
|
2380
2394
|
"alignItems": "center",
|
|
2381
2395
|
"color": "#001f23",
|
|
2382
2396
|
"fontSize": 14,
|
|
2397
|
+
"lineHeight": 18,
|
|
2383
2398
|
"textAlignVertical": "center",
|
|
2384
2399
|
},
|
|
2385
2400
|
undefined,
|
|
@@ -2413,6 +2428,7 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
|
|
|
2413
2428
|
"alignSelf": "stretch",
|
|
2414
2429
|
"flexGrow": 2,
|
|
2415
2430
|
"fontSize": 14,
|
|
2431
|
+
"lineHeight": 18,
|
|
2416
2432
|
"marginHorizontal": 8,
|
|
2417
2433
|
"paddingVertical": 0,
|
|
2418
2434
|
"textAlignVertical": "center",
|
|
@@ -2637,6 +2653,7 @@ exports[`TextInput readonly renders correctly 1`] = `
|
|
|
2637
2653
|
"alignSelf": "stretch",
|
|
2638
2654
|
"flexGrow": 2,
|
|
2639
2655
|
"fontSize": 14,
|
|
2656
|
+
"lineHeight": 18,
|
|
2640
2657
|
"marginHorizontal": 8,
|
|
2641
2658
|
"paddingVertical": 0,
|
|
2642
2659
|
"textAlignVertical": "center",
|
|
@@ -2825,6 +2842,7 @@ exports[`TextInput required renders correctly 1`] = `
|
|
|
2825
2842
|
"alignItems": "center",
|
|
2826
2843
|
"color": "#001f23",
|
|
2827
2844
|
"fontSize": 14,
|
|
2845
|
+
"lineHeight": 18,
|
|
2828
2846
|
"textAlignVertical": "center",
|
|
2829
2847
|
},
|
|
2830
2848
|
undefined,
|
|
@@ -2858,6 +2876,7 @@ exports[`TextInput required renders correctly 1`] = `
|
|
|
2858
2876
|
"alignSelf": "stretch",
|
|
2859
2877
|
"flexGrow": 2,
|
|
2860
2878
|
"fontSize": 14,
|
|
2879
|
+
"lineHeight": 18,
|
|
2861
2880
|
"marginHorizontal": 8,
|
|
2862
2881
|
"paddingVertical": 0,
|
|
2863
2882
|
"textAlignVertical": "center",
|
|
@@ -146,6 +146,7 @@ exports[`TimePickerAndroid renders correct with hide suffix 1`] = `
|
|
|
146
146
|
"alignSelf": "stretch",
|
|
147
147
|
"flexGrow": 2,
|
|
148
148
|
"fontSize": 14,
|
|
149
|
+
"lineHeight": 18,
|
|
149
150
|
"marginHorizontal": 8,
|
|
150
151
|
"paddingVertical": 0,
|
|
151
152
|
"textAlignVertical": "center",
|
|
@@ -358,6 +359,7 @@ exports[`TimePickerAndroid renders correctly 1`] = `
|
|
|
358
359
|
"alignSelf": "stretch",
|
|
359
360
|
"flexGrow": 2,
|
|
360
361
|
"fontSize": 14,
|
|
362
|
+
"lineHeight": 18,
|
|
361
363
|
"marginHorizontal": 8,
|
|
362
364
|
"paddingVertical": 0,
|
|
363
365
|
"textAlignVertical": "center",
|
|
@@ -146,6 +146,7 @@ exports[`TimePickerIOS renders correct with hide suffix 1`] = `
|
|
|
146
146
|
"alignSelf": "stretch",
|
|
147
147
|
"flexGrow": 2,
|
|
148
148
|
"fontSize": 14,
|
|
149
|
+
"lineHeight": 18,
|
|
149
150
|
"marginHorizontal": 8,
|
|
150
151
|
"paddingVertical": 0,
|
|
151
152
|
"textAlignVertical": "center",
|
|
@@ -358,6 +359,7 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
358
359
|
"alignSelf": "stretch",
|
|
359
360
|
"flexGrow": 2,
|
|
360
361
|
"fontSize": 14,
|
|
362
|
+
"lineHeight": 18,
|
|
361
363
|
"marginHorizontal": 8,
|
|
362
364
|
"paddingVertical": 0,
|
|
363
365
|
"textAlignVertical": "center",
|
|
@@ -639,18 +641,6 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
639
641
|
</View>
|
|
640
642
|
</View>
|
|
641
643
|
</View>
|
|
642
|
-
<View
|
|
643
|
-
style={
|
|
644
|
-
Array [
|
|
645
|
-
Object {
|
|
646
|
-
"borderBottomColor": "#e8e9ea",
|
|
647
|
-
"borderBottomWidth": 1,
|
|
648
|
-
"maxWidth": "100%",
|
|
649
|
-
},
|
|
650
|
-
undefined,
|
|
651
|
-
]
|
|
652
|
-
}
|
|
653
|
-
/>
|
|
654
644
|
<View
|
|
655
645
|
style={
|
|
656
646
|
Array [
|
|
@@ -675,18 +665,6 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
675
665
|
/>
|
|
676
666
|
</View>
|
|
677
667
|
<View>
|
|
678
|
-
<View
|
|
679
|
-
style={
|
|
680
|
-
Array [
|
|
681
|
-
Object {
|
|
682
|
-
"borderBottomColor": "#e8e9ea",
|
|
683
|
-
"borderBottomWidth": 1,
|
|
684
|
-
"maxWidth": "100%",
|
|
685
|
-
},
|
|
686
|
-
undefined,
|
|
687
|
-
]
|
|
688
|
-
}
|
|
689
|
-
/>
|
|
690
668
|
<View
|
|
691
669
|
style={
|
|
692
670
|
Array [
|
|
@@ -64,6 +64,11 @@ const getTextInputTheme = (theme: GlobalTheme) => {
|
|
|
64
64
|
asteriskLabel: theme.fontSizes.medium,
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
+
const lineHeights = {
|
|
68
|
+
text: theme.lineHeights.xsmall,
|
|
69
|
+
labelInsideTextInput: theme.lineHeights.xsmall,
|
|
70
|
+
};
|
|
71
|
+
|
|
67
72
|
const borderWidths = {
|
|
68
73
|
container: {
|
|
69
74
|
normal: theme.borderWidths.base,
|
|
@@ -75,7 +80,7 @@ const getTextInputTheme = (theme: GlobalTheme) => {
|
|
|
75
80
|
container: theme.radii.medium,
|
|
76
81
|
};
|
|
77
82
|
|
|
78
|
-
return { colors, space, fontSizes, borderWidths, radii };
|
|
83
|
+
return { colors, space, fontSizes, borderWidths, radii, lineHeights };
|
|
79
84
|
};
|
|
80
85
|
|
|
81
86
|
export default getTextInputTheme;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { KeyboardAvoidingViewProps } from 'react-native';
|
|
2
1
|
import type { ReactElement, ReactNode } from 'react';
|
|
3
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { KeyboardAvoidingViewProps } from 'react-native';
|
|
4
4
|
interface BottomSheetProps {
|
|
5
5
|
/**
|
|
6
6
|
* Bottom sheet open state.
|
|
@@ -60,5 +60,7 @@ interface BottomSheetProps {
|
|
|
60
60
|
* */
|
|
61
61
|
keyboardAvoidingViewProps?: KeyboardAvoidingViewProps;
|
|
62
62
|
}
|
|
63
|
-
declare const
|
|
64
|
-
|
|
63
|
+
declare const _default: (({ open, header, footer, children, onAnimationEnd, onOpen, onRequestClose, onDismiss, showCloseButton, hasBackdrop, showDivider, style, testID, keyboardAvoidingViewProps, }: BottomSheetProps) => JSX.Element) & {
|
|
64
|
+
ScrollView: ({ scrollEventThrottle, ...props }: import("react-native").ScrollViewProps) => JSX.Element;
|
|
65
|
+
};
|
|
66
|
+
export default _default;
|