@hero-design/rn 7.22.0 → 7.22.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 +2 -2
- package/es/index.js +62 -62
- package/lib/index.js +61 -61
- package/package.json +4 -4
- 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/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +4 -18
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +180 -177
- package/src/components/List/StyledBasicListItem.tsx +1 -0
- package/src/components/List/__tests__/BasicListItem.spec.tsx +37 -13
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +162 -1
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +6 -2
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -2
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +3 -1
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +4 -1
- package/src/components/RichTextEditor/RichTextEditor.tsx +1 -3
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +8 -36
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +17 -5
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +4712 -4669
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +16 -4
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +4285 -4242
- package/src/components/TextInput/StyledTextInput.tsx +11 -16
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +3 -3
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +18 -36
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +55 -237
- package/src/components/TextInput/index.tsx +27 -27
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +4 -18
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +180 -177
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +4 -2
- package/src/theme/components/list.ts +5 -2
- package/src/theme/global/colors/swag.ts +1 -0
- package/src/theme/global/colors/types.ts +1 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +8 -2
- package/types/components/BottomSheet/index.d.ts +6 -1
- package/types/components/TextInput/StyledTextInput.d.ts +3 -9
- package/types/components/TextInput/index.d.ts +4 -4
- package/types/theme/components/list.d.ts +1 -0
- package/types/theme/global/colors/types.d.ts +1 -0
- package/types/theme/global/index.d.ts +1 -0
|
@@ -10,9 +10,19 @@ export type Variant =
|
|
|
10
10
|
| 'readonly'
|
|
11
11
|
| 'error';
|
|
12
12
|
|
|
13
|
-
const StyledContainer = styled(View)
|
|
13
|
+
const StyledContainer = styled(View)<{
|
|
14
|
+
themeVariant: Variant;
|
|
15
|
+
}>(({ theme, themeVariant }) => ({
|
|
14
16
|
width: '100%',
|
|
15
17
|
marginVertical: theme.__hd__.textInput.space.containerMarginVertical,
|
|
18
|
+
borderWidth:
|
|
19
|
+
themeVariant === 'focused'
|
|
20
|
+
? theme.__hd__.textInput.borderWidths.container.focused
|
|
21
|
+
: theme.__hd__.textInput.borderWidths.container.normal,
|
|
22
|
+
borderRadius: theme.__hd__.textInput.radii.container,
|
|
23
|
+
borderColor:
|
|
24
|
+
theme.__hd__.textInput.colors.borders[themeVariant] ??
|
|
25
|
+
theme.__hd__.textInput.colors.borders.default,
|
|
16
26
|
}));
|
|
17
27
|
|
|
18
28
|
const StyledLabelContainer = styled(View)(({ theme }) => ({
|
|
@@ -97,20 +107,6 @@ const StyledTextInput = styled(TextInput)(({ theme }) => ({
|
|
|
97
107
|
marginHorizontal: theme.__hd__.textInput.space.inputHorizontalMargin,
|
|
98
108
|
}));
|
|
99
109
|
|
|
100
|
-
const StyledBorderBackDrop = styled(View)<{
|
|
101
|
-
themeVariant: Variant;
|
|
102
|
-
}>(({ theme, themeVariant }) => ({
|
|
103
|
-
...StyleSheet.absoluteFillObject,
|
|
104
|
-
borderWidth:
|
|
105
|
-
themeVariant === 'focused'
|
|
106
|
-
? theme.__hd__.textInput.borderWidths.container.focused
|
|
107
|
-
: theme.__hd__.textInput.borderWidths.container.normal,
|
|
108
|
-
borderRadius: theme.__hd__.textInput.radii.container,
|
|
109
|
-
borderColor:
|
|
110
|
-
theme.__hd__.textInput.colors.borders[themeVariant] ??
|
|
111
|
-
theme.__hd__.textInput.colors.borders.default,
|
|
112
|
-
}));
|
|
113
|
-
|
|
114
110
|
const StyledTextInputContainer = styled(View)(({ theme }) => ({
|
|
115
111
|
flexDirection: 'row',
|
|
116
112
|
alignItems: 'center',
|
|
@@ -151,6 +147,5 @@ export {
|
|
|
151
147
|
StyledTextInputAndLabelContainer,
|
|
152
148
|
StyledLabelContainerInsideTextInput,
|
|
153
149
|
StyledErrorAndHelpTextContainer,
|
|
154
|
-
StyledBorderBackDrop,
|
|
155
150
|
StyledErrorAndMaxLengthContainer,
|
|
156
151
|
};
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
StyledAsteriskLabel,
|
|
11
11
|
StyledLabelContainer,
|
|
12
12
|
StyledLabelInsideTextInput,
|
|
13
|
-
|
|
13
|
+
StyledContainer,
|
|
14
14
|
} from '../StyledTextInput';
|
|
15
15
|
|
|
16
16
|
describe('Label', () => {
|
|
@@ -133,7 +133,7 @@ describe('StyledHelperText', () => {
|
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
-
describe('
|
|
136
|
+
describe('StyledContainer', () => {
|
|
137
137
|
it.each`
|
|
138
138
|
themeVariant
|
|
139
139
|
${'default'}
|
|
@@ -146,7 +146,7 @@ describe('StyledBorderBackDrop', () => {
|
|
|
146
146
|
'renders correctly with themeVariant $themeVariant',
|
|
147
147
|
({ themeVariant }): void => {
|
|
148
148
|
const { toJSON } = renderWithTheme(
|
|
149
|
-
<
|
|
149
|
+
<StyledContainer themeVariant={themeVariant} />
|
|
150
150
|
);
|
|
151
151
|
|
|
152
152
|
expect(toJSON()).toMatchSnapshot();
|
|
@@ -547,7 +547,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant readonly 1`] =
|
|
|
547
547
|
</Text>
|
|
548
548
|
`;
|
|
549
549
|
|
|
550
|
-
exports[`
|
|
550
|
+
exports[`StyledContainer renders correctly with themeVariant default 1`] = `
|
|
551
551
|
<View
|
|
552
552
|
style={
|
|
553
553
|
Array [
|
|
@@ -555,11 +555,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant default 1`] =
|
|
|
555
555
|
"borderColor": "#001f23",
|
|
556
556
|
"borderRadius": 8,
|
|
557
557
|
"borderWidth": 1,
|
|
558
|
-
"
|
|
559
|
-
"
|
|
560
|
-
"position": "absolute",
|
|
561
|
-
"right": 0,
|
|
562
|
-
"top": 0,
|
|
558
|
+
"marginVertical": 8,
|
|
559
|
+
"width": "100%",
|
|
563
560
|
},
|
|
564
561
|
undefined,
|
|
565
562
|
]
|
|
@@ -568,7 +565,7 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant default 1`] =
|
|
|
568
565
|
/>
|
|
569
566
|
`;
|
|
570
567
|
|
|
571
|
-
exports[`
|
|
568
|
+
exports[`StyledContainer renders correctly with themeVariant disabled 1`] = `
|
|
572
569
|
<View
|
|
573
570
|
style={
|
|
574
571
|
Array [
|
|
@@ -576,11 +573,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant disabled 1`] =
|
|
|
576
573
|
"borderColor": "#bfc1c5",
|
|
577
574
|
"borderRadius": 8,
|
|
578
575
|
"borderWidth": 1,
|
|
579
|
-
"
|
|
580
|
-
"
|
|
581
|
-
"position": "absolute",
|
|
582
|
-
"right": 0,
|
|
583
|
-
"top": 0,
|
|
576
|
+
"marginVertical": 8,
|
|
577
|
+
"width": "100%",
|
|
584
578
|
},
|
|
585
579
|
undefined,
|
|
586
580
|
]
|
|
@@ -589,7 +583,7 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant disabled 1`] =
|
|
|
589
583
|
/>
|
|
590
584
|
`;
|
|
591
585
|
|
|
592
|
-
exports[`
|
|
586
|
+
exports[`StyledContainer renders correctly with themeVariant error 1`] = `
|
|
593
587
|
<View
|
|
594
588
|
style={
|
|
595
589
|
Array [
|
|
@@ -597,11 +591,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant error 1`] = `
|
|
|
597
591
|
"borderColor": "#de350b",
|
|
598
592
|
"borderRadius": 8,
|
|
599
593
|
"borderWidth": 1,
|
|
600
|
-
"
|
|
601
|
-
"
|
|
602
|
-
"position": "absolute",
|
|
603
|
-
"right": 0,
|
|
604
|
-
"top": 0,
|
|
594
|
+
"marginVertical": 8,
|
|
595
|
+
"width": "100%",
|
|
605
596
|
},
|
|
606
597
|
undefined,
|
|
607
598
|
]
|
|
@@ -610,7 +601,7 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant error 1`] = `
|
|
|
610
601
|
/>
|
|
611
602
|
`;
|
|
612
603
|
|
|
613
|
-
exports[`
|
|
604
|
+
exports[`StyledContainer renders correctly with themeVariant filled 1`] = `
|
|
614
605
|
<View
|
|
615
606
|
style={
|
|
616
607
|
Array [
|
|
@@ -618,11 +609,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant filled 1`] = `
|
|
|
618
609
|
"borderColor": "#001f23",
|
|
619
610
|
"borderRadius": 8,
|
|
620
611
|
"borderWidth": 1,
|
|
621
|
-
"
|
|
622
|
-
"
|
|
623
|
-
"position": "absolute",
|
|
624
|
-
"right": 0,
|
|
625
|
-
"top": 0,
|
|
612
|
+
"marginVertical": 8,
|
|
613
|
+
"width": "100%",
|
|
626
614
|
},
|
|
627
615
|
undefined,
|
|
628
616
|
]
|
|
@@ -631,7 +619,7 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant filled 1`] = `
|
|
|
631
619
|
/>
|
|
632
620
|
`;
|
|
633
621
|
|
|
634
|
-
exports[`
|
|
622
|
+
exports[`StyledContainer renders correctly with themeVariant focused 1`] = `
|
|
635
623
|
<View
|
|
636
624
|
style={
|
|
637
625
|
Array [
|
|
@@ -639,11 +627,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant focused 1`] =
|
|
|
639
627
|
"borderColor": "#001f23",
|
|
640
628
|
"borderRadius": 8,
|
|
641
629
|
"borderWidth": 2,
|
|
642
|
-
"
|
|
643
|
-
"
|
|
644
|
-
"position": "absolute",
|
|
645
|
-
"right": 0,
|
|
646
|
-
"top": 0,
|
|
630
|
+
"marginVertical": 8,
|
|
631
|
+
"width": "100%",
|
|
647
632
|
},
|
|
648
633
|
undefined,
|
|
649
634
|
]
|
|
@@ -652,7 +637,7 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant focused 1`] =
|
|
|
652
637
|
/>
|
|
653
638
|
`;
|
|
654
639
|
|
|
655
|
-
exports[`
|
|
640
|
+
exports[`StyledContainer renders correctly with themeVariant readonly 1`] = `
|
|
656
641
|
<View
|
|
657
642
|
style={
|
|
658
643
|
Array [
|
|
@@ -660,11 +645,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant readonly 1`] =
|
|
|
660
645
|
"borderColor": "#808f91",
|
|
661
646
|
"borderRadius": 8,
|
|
662
647
|
"borderWidth": 1,
|
|
663
|
-
"
|
|
664
|
-
"
|
|
665
|
-
"position": "absolute",
|
|
666
|
-
"right": 0,
|
|
667
|
-
"top": 0,
|
|
648
|
+
"marginVertical": 8,
|
|
649
|
+
"width": "100%",
|
|
668
650
|
},
|
|
669
651
|
undefined,
|
|
670
652
|
]
|