@hero-design/rn 8.43.1 → 8.44.0
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 +1 -1
- package/CHANGELOG.md +10 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +366 -359
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +366 -359
- package/package.json +1 -1
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +564 -452
- package/src/components/Accordion/__tests__/__snapshots__/StyledAccordion.spec.tsx.snap +76 -20
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +790 -706
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +848 -652
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +170 -142
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +138 -82
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +745 -689
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +157 -73
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +273 -189
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +391 -223
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +119 -63
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +306 -278
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +317 -233
- package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +1042 -454
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +400 -120
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +1090 -810
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +196 -140
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +1666 -1218
- package/src/components/Button/__tests__/__snapshots__/IconButton.spec.tsx.snap +70 -42
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +1623 -727
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +555 -415
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +265 -69
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +205 -65
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +36 -8
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +292 -124
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +486 -430
- package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +196 -84
- package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +41 -13
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +1720 -1636
- package/src/components/Carousel/__tests__/index.spec.tsx +7 -6
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +400 -176
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +574 -406
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +1170 -834
- package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +73 -17
- package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +94 -38
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +37 -9
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +421 -337
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +586 -502
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +200 -172
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +192 -164
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +471 -443
- package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +464 -128
- package/src/components/Drawer/DragableDrawer/__tests__/__snapshots__/index.spec.tsx.snap +97 -69
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +327 -243
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +169 -113
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +323 -213
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +845 -789
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +98 -42
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +197 -113
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +290 -206
- package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +45 -17
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +2 -0
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +158 -46
- package/src/components/Image/__tests__/__snapshots__/index.spec.tsx.snap +164 -52
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +242 -186
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +761 -649
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +268 -156
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +473 -221
- package/src/components/Modal/__tests__/__snapshots__/index.spec.tsx.snap +60 -8
- package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +83 -55
- package/src/components/PinInput/__tests__/StyledPinInput.spec.tsx +9 -4
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +293 -153
- package/src/components/PinInput/__tests__/__snapshots__/StyledPinInput.spec.tsx.snap +15 -48
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +809 -697
- package/src/components/Portal/__tests__/PortalHost.spec.tsx +12 -14
- package/src/components/Portal/__tests__/__snapshots__/index.spec.tsx.snap +43 -15
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +743 -603
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +188 -132
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +256 -228
- package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +864 -780
- package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +128 -44
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +5 -2
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +3 -3
- package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +406 -378
- package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +64 -36
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +371 -315
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +158 -46
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +394 -226
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +93 -65
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +2402 -2290
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +180 -24
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +7 -6
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +73 -45
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +2309 -2197
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +150 -20
- package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +490 -294
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +117 -33
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +105 -77
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +1308 -636
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +121 -93
- package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +323 -213
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +210 -126
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +58 -30
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +226 -114
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +145 -117
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +202 -62
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +132 -76
- package/src/components/Tabs/__tests__/SceneView.spec.tsx +7 -7
- package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +206 -94
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +2214 -2130
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +523 -495
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +121 -65
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +1637 -1553
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +554 -274
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +1542 -646
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +3177 -2701
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +390 -334
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +662 -606
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +871 -675
- package/src/components/Toast/__tests__/__snapshots__/ToastContainer.spec.tsx.snap +180 -68
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +582 -498
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +683 -459
- package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +704 -256
- package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +855 -323
- package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +430 -150
- package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +572 -208
- package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +328 -104
- package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +462 -154
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +900 -340
- package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +880 -320
- package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +1035 -391
- package/src/testHelpers/renderWithTheme.tsx +2 -2
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +1 -1
|
@@ -2,94 +2,234 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`StyledKnot renders correct style 1`] = `
|
|
4
4
|
<View
|
|
5
|
-
collapsable={false}
|
|
6
5
|
style={
|
|
7
6
|
{
|
|
8
|
-
"
|
|
9
|
-
"borderRadius": 999,
|
|
10
|
-
"height": 16,
|
|
11
|
-
"width": 16,
|
|
7
|
+
"flex": 1,
|
|
12
8
|
}
|
|
13
9
|
}
|
|
14
|
-
|
|
10
|
+
>
|
|
11
|
+
<View
|
|
12
|
+
collapsable={false}
|
|
13
|
+
style={
|
|
14
|
+
{
|
|
15
|
+
"backgroundColor": "#ffffff",
|
|
16
|
+
"borderRadius": 999,
|
|
17
|
+
"height": 16,
|
|
18
|
+
"width": 16,
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/>
|
|
22
|
+
<View
|
|
23
|
+
pointerEvents="box-none"
|
|
24
|
+
position="bottom"
|
|
25
|
+
style={
|
|
26
|
+
[
|
|
27
|
+
{
|
|
28
|
+
"bottom": 0,
|
|
29
|
+
"elevation": 9999,
|
|
30
|
+
"flexDirection": "column-reverse",
|
|
31
|
+
"left": 0,
|
|
32
|
+
"paddingHorizontal": 24,
|
|
33
|
+
"paddingVertical": 16,
|
|
34
|
+
"position": "absolute",
|
|
35
|
+
"right": 0,
|
|
36
|
+
"top": 0,
|
|
37
|
+
},
|
|
38
|
+
undefined,
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
/>
|
|
42
|
+
</View>
|
|
15
43
|
`;
|
|
16
44
|
|
|
17
45
|
exports[`StyledWrapper renders correct style with variant checked 1`] = `
|
|
18
46
|
<View
|
|
19
47
|
style={
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"borderRadius": 999,
|
|
24
|
-
"display": "flex",
|
|
25
|
-
"height": 24,
|
|
26
|
-
"justifyContent": "center",
|
|
27
|
-
"paddingHorizontal": 4,
|
|
28
|
-
"width": 48,
|
|
29
|
-
},
|
|
30
|
-
undefined,
|
|
31
|
-
]
|
|
48
|
+
{
|
|
49
|
+
"flex": 1,
|
|
50
|
+
}
|
|
32
51
|
}
|
|
33
|
-
|
|
34
|
-
|
|
52
|
+
>
|
|
53
|
+
<View
|
|
54
|
+
style={
|
|
55
|
+
[
|
|
56
|
+
{
|
|
57
|
+
"backgroundColor": "#401960",
|
|
58
|
+
"borderRadius": 999,
|
|
59
|
+
"display": "flex",
|
|
60
|
+
"height": 24,
|
|
61
|
+
"justifyContent": "center",
|
|
62
|
+
"paddingHorizontal": 4,
|
|
63
|
+
"width": 48,
|
|
64
|
+
},
|
|
65
|
+
undefined,
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
themeVariant="checked"
|
|
69
|
+
/>
|
|
70
|
+
<View
|
|
71
|
+
pointerEvents="box-none"
|
|
72
|
+
position="bottom"
|
|
73
|
+
style={
|
|
74
|
+
[
|
|
75
|
+
{
|
|
76
|
+
"bottom": 0,
|
|
77
|
+
"elevation": 9999,
|
|
78
|
+
"flexDirection": "column-reverse",
|
|
79
|
+
"left": 0,
|
|
80
|
+
"paddingHorizontal": 24,
|
|
81
|
+
"paddingVertical": 16,
|
|
82
|
+
"position": "absolute",
|
|
83
|
+
"right": 0,
|
|
84
|
+
"top": 0,
|
|
85
|
+
},
|
|
86
|
+
undefined,
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
/>
|
|
90
|
+
</View>
|
|
35
91
|
`;
|
|
36
92
|
|
|
37
93
|
exports[`StyledWrapper renders correct style with variant disabled-checked 1`] = `
|
|
38
94
|
<View
|
|
39
95
|
style={
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"borderRadius": 999,
|
|
44
|
-
"display": "flex",
|
|
45
|
-
"height": 24,
|
|
46
|
-
"justifyContent": "center",
|
|
47
|
-
"paddingHorizontal": 4,
|
|
48
|
-
"width": 48,
|
|
49
|
-
},
|
|
50
|
-
undefined,
|
|
51
|
-
]
|
|
96
|
+
{
|
|
97
|
+
"flex": 1,
|
|
98
|
+
}
|
|
52
99
|
}
|
|
53
|
-
|
|
54
|
-
|
|
100
|
+
>
|
|
101
|
+
<View
|
|
102
|
+
style={
|
|
103
|
+
[
|
|
104
|
+
{
|
|
105
|
+
"backgroundColor": "#ece8ef",
|
|
106
|
+
"borderRadius": 999,
|
|
107
|
+
"display": "flex",
|
|
108
|
+
"height": 24,
|
|
109
|
+
"justifyContent": "center",
|
|
110
|
+
"paddingHorizontal": 4,
|
|
111
|
+
"width": 48,
|
|
112
|
+
},
|
|
113
|
+
undefined,
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
themeVariant="disabled-checked"
|
|
117
|
+
/>
|
|
118
|
+
<View
|
|
119
|
+
pointerEvents="box-none"
|
|
120
|
+
position="bottom"
|
|
121
|
+
style={
|
|
122
|
+
[
|
|
123
|
+
{
|
|
124
|
+
"bottom": 0,
|
|
125
|
+
"elevation": 9999,
|
|
126
|
+
"flexDirection": "column-reverse",
|
|
127
|
+
"left": 0,
|
|
128
|
+
"paddingHorizontal": 24,
|
|
129
|
+
"paddingVertical": 16,
|
|
130
|
+
"position": "absolute",
|
|
131
|
+
"right": 0,
|
|
132
|
+
"top": 0,
|
|
133
|
+
},
|
|
134
|
+
undefined,
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
/>
|
|
138
|
+
</View>
|
|
55
139
|
`;
|
|
56
140
|
|
|
57
141
|
exports[`StyledWrapper renders correct style with variant disabled-unchecked 1`] = `
|
|
58
142
|
<View
|
|
59
143
|
style={
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"borderRadius": 999,
|
|
64
|
-
"display": "flex",
|
|
65
|
-
"height": 24,
|
|
66
|
-
"justifyContent": "center",
|
|
67
|
-
"paddingHorizontal": 4,
|
|
68
|
-
"width": 48,
|
|
69
|
-
},
|
|
70
|
-
undefined,
|
|
71
|
-
]
|
|
144
|
+
{
|
|
145
|
+
"flex": 1,
|
|
146
|
+
}
|
|
72
147
|
}
|
|
73
|
-
|
|
74
|
-
|
|
148
|
+
>
|
|
149
|
+
<View
|
|
150
|
+
style={
|
|
151
|
+
[
|
|
152
|
+
{
|
|
153
|
+
"backgroundColor": "#bfc1c5",
|
|
154
|
+
"borderRadius": 999,
|
|
155
|
+
"display": "flex",
|
|
156
|
+
"height": 24,
|
|
157
|
+
"justifyContent": "center",
|
|
158
|
+
"paddingHorizontal": 4,
|
|
159
|
+
"width": 48,
|
|
160
|
+
},
|
|
161
|
+
undefined,
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
themeVariant="disabled-unchecked"
|
|
165
|
+
/>
|
|
166
|
+
<View
|
|
167
|
+
pointerEvents="box-none"
|
|
168
|
+
position="bottom"
|
|
169
|
+
style={
|
|
170
|
+
[
|
|
171
|
+
{
|
|
172
|
+
"bottom": 0,
|
|
173
|
+
"elevation": 9999,
|
|
174
|
+
"flexDirection": "column-reverse",
|
|
175
|
+
"left": 0,
|
|
176
|
+
"paddingHorizontal": 24,
|
|
177
|
+
"paddingVertical": 16,
|
|
178
|
+
"position": "absolute",
|
|
179
|
+
"right": 0,
|
|
180
|
+
"top": 0,
|
|
181
|
+
},
|
|
182
|
+
undefined,
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
/>
|
|
186
|
+
</View>
|
|
75
187
|
`;
|
|
76
188
|
|
|
77
189
|
exports[`StyledWrapper renders correct style with variant unchecked 1`] = `
|
|
78
190
|
<View
|
|
79
191
|
style={
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"borderRadius": 999,
|
|
84
|
-
"display": "flex",
|
|
85
|
-
"height": 24,
|
|
86
|
-
"justifyContent": "center",
|
|
87
|
-
"paddingHorizontal": 4,
|
|
88
|
-
"width": 48,
|
|
89
|
-
},
|
|
90
|
-
undefined,
|
|
91
|
-
]
|
|
192
|
+
{
|
|
193
|
+
"flex": 1,
|
|
194
|
+
}
|
|
92
195
|
}
|
|
93
|
-
|
|
94
|
-
|
|
196
|
+
>
|
|
197
|
+
<View
|
|
198
|
+
style={
|
|
199
|
+
[
|
|
200
|
+
{
|
|
201
|
+
"backgroundColor": "#808f91",
|
|
202
|
+
"borderRadius": 999,
|
|
203
|
+
"display": "flex",
|
|
204
|
+
"height": 24,
|
|
205
|
+
"justifyContent": "center",
|
|
206
|
+
"paddingHorizontal": 4,
|
|
207
|
+
"width": 48,
|
|
208
|
+
},
|
|
209
|
+
undefined,
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
themeVariant="unchecked"
|
|
213
|
+
/>
|
|
214
|
+
<View
|
|
215
|
+
pointerEvents="box-none"
|
|
216
|
+
position="bottom"
|
|
217
|
+
style={
|
|
218
|
+
[
|
|
219
|
+
{
|
|
220
|
+
"bottom": 0,
|
|
221
|
+
"elevation": 9999,
|
|
222
|
+
"flexDirection": "column-reverse",
|
|
223
|
+
"left": 0,
|
|
224
|
+
"paddingHorizontal": 24,
|
|
225
|
+
"paddingVertical": 16,
|
|
226
|
+
"position": "absolute",
|
|
227
|
+
"right": 0,
|
|
228
|
+
"top": 0,
|
|
229
|
+
},
|
|
230
|
+
undefined,
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
/>
|
|
234
|
+
</View>
|
|
95
235
|
`;
|
|
@@ -2,104 +2,160 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Switch renders correctly 1`] = `
|
|
4
4
|
<View
|
|
5
|
-
|
|
5
|
+
style={
|
|
6
6
|
{
|
|
7
|
-
"
|
|
8
|
-
"checked": undefined,
|
|
9
|
-
"disabled": false,
|
|
10
|
-
"expanded": undefined,
|
|
11
|
-
"selected": undefined,
|
|
7
|
+
"flex": 1,
|
|
12
8
|
}
|
|
13
9
|
}
|
|
14
|
-
accessible={true}
|
|
15
|
-
focusable={false}
|
|
16
|
-
onClick={[Function]}
|
|
17
|
-
onResponderGrant={[Function]}
|
|
18
|
-
onResponderMove={[Function]}
|
|
19
|
-
onResponderRelease={[Function]}
|
|
20
|
-
onResponderTerminate={[Function]}
|
|
21
|
-
onResponderTerminationRequest={[Function]}
|
|
22
|
-
onStartShouldSetResponder={[Function]}
|
|
23
|
-
style={
|
|
24
|
-
[
|
|
25
|
-
{
|
|
26
|
-
"backgroundColor": "#808f91",
|
|
27
|
-
"borderRadius": 999,
|
|
28
|
-
"display": "flex",
|
|
29
|
-
"height": 24,
|
|
30
|
-
"justifyContent": "center",
|
|
31
|
-
"paddingHorizontal": 4,
|
|
32
|
-
"width": 48,
|
|
33
|
-
},
|
|
34
|
-
undefined,
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
testID="switch"
|
|
38
|
-
themeVariant="unchecked"
|
|
39
10
|
>
|
|
40
11
|
<View
|
|
41
|
-
|
|
42
|
-
style={
|
|
12
|
+
accessibilityState={
|
|
43
13
|
{
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
14
|
+
"busy": undefined,
|
|
15
|
+
"checked": undefined,
|
|
16
|
+
"disabled": false,
|
|
17
|
+
"expanded": undefined,
|
|
18
|
+
"selected": undefined,
|
|
49
19
|
}
|
|
50
20
|
}
|
|
21
|
+
accessible={true}
|
|
22
|
+
focusable={false}
|
|
23
|
+
onClick={[Function]}
|
|
24
|
+
onResponderGrant={[Function]}
|
|
25
|
+
onResponderMove={[Function]}
|
|
26
|
+
onResponderRelease={[Function]}
|
|
27
|
+
onResponderTerminate={[Function]}
|
|
28
|
+
onResponderTerminationRequest={[Function]}
|
|
29
|
+
onStartShouldSetResponder={[Function]}
|
|
30
|
+
style={
|
|
31
|
+
[
|
|
32
|
+
{
|
|
33
|
+
"backgroundColor": "#808f91",
|
|
34
|
+
"borderRadius": 999,
|
|
35
|
+
"display": "flex",
|
|
36
|
+
"height": 24,
|
|
37
|
+
"justifyContent": "center",
|
|
38
|
+
"paddingHorizontal": 4,
|
|
39
|
+
"width": 48,
|
|
40
|
+
},
|
|
41
|
+
undefined,
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
testID="switch"
|
|
45
|
+
themeVariant="unchecked"
|
|
46
|
+
>
|
|
47
|
+
<View
|
|
48
|
+
collapsable={false}
|
|
49
|
+
style={
|
|
50
|
+
{
|
|
51
|
+
"backgroundColor": "#ffffff",
|
|
52
|
+
"borderRadius": 999,
|
|
53
|
+
"height": 16,
|
|
54
|
+
"left": 0,
|
|
55
|
+
"width": 16,
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/>
|
|
59
|
+
</View>
|
|
60
|
+
<View
|
|
61
|
+
pointerEvents="box-none"
|
|
62
|
+
position="bottom"
|
|
63
|
+
style={
|
|
64
|
+
[
|
|
65
|
+
{
|
|
66
|
+
"bottom": 0,
|
|
67
|
+
"elevation": 9999,
|
|
68
|
+
"flexDirection": "column-reverse",
|
|
69
|
+
"left": 0,
|
|
70
|
+
"paddingHorizontal": 24,
|
|
71
|
+
"paddingVertical": 16,
|
|
72
|
+
"position": "absolute",
|
|
73
|
+
"right": 0,
|
|
74
|
+
"top": 0,
|
|
75
|
+
},
|
|
76
|
+
undefined,
|
|
77
|
+
]
|
|
78
|
+
}
|
|
51
79
|
/>
|
|
52
80
|
</View>
|
|
53
81
|
`;
|
|
54
82
|
|
|
55
83
|
exports[`Switch trigger press function correctly 1`] = `
|
|
56
84
|
<View
|
|
57
|
-
|
|
85
|
+
style={
|
|
58
86
|
{
|
|
59
|
-
"
|
|
60
|
-
"checked": undefined,
|
|
61
|
-
"disabled": false,
|
|
62
|
-
"expanded": undefined,
|
|
63
|
-
"selected": undefined,
|
|
87
|
+
"flex": 1,
|
|
64
88
|
}
|
|
65
89
|
}
|
|
66
|
-
accessible={true}
|
|
67
|
-
focusable={true}
|
|
68
|
-
onClick={[Function]}
|
|
69
|
-
onResponderGrant={[Function]}
|
|
70
|
-
onResponderMove={[Function]}
|
|
71
|
-
onResponderRelease={[Function]}
|
|
72
|
-
onResponderTerminate={[Function]}
|
|
73
|
-
onResponderTerminationRequest={[Function]}
|
|
74
|
-
onStartShouldSetResponder={[Function]}
|
|
75
|
-
style={
|
|
76
|
-
[
|
|
77
|
-
{
|
|
78
|
-
"backgroundColor": "#808f91",
|
|
79
|
-
"borderRadius": 999,
|
|
80
|
-
"display": "flex",
|
|
81
|
-
"height": 24,
|
|
82
|
-
"justifyContent": "center",
|
|
83
|
-
"paddingHorizontal": 4,
|
|
84
|
-
"width": 48,
|
|
85
|
-
},
|
|
86
|
-
undefined,
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
testID="switch"
|
|
90
|
-
themeVariant="unchecked"
|
|
91
90
|
>
|
|
92
91
|
<View
|
|
93
|
-
|
|
94
|
-
style={
|
|
92
|
+
accessibilityState={
|
|
95
93
|
{
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
94
|
+
"busy": undefined,
|
|
95
|
+
"checked": undefined,
|
|
96
|
+
"disabled": false,
|
|
97
|
+
"expanded": undefined,
|
|
98
|
+
"selected": undefined,
|
|
101
99
|
}
|
|
102
100
|
}
|
|
101
|
+
accessible={true}
|
|
102
|
+
focusable={true}
|
|
103
|
+
onClick={[Function]}
|
|
104
|
+
onResponderGrant={[Function]}
|
|
105
|
+
onResponderMove={[Function]}
|
|
106
|
+
onResponderRelease={[Function]}
|
|
107
|
+
onResponderTerminate={[Function]}
|
|
108
|
+
onResponderTerminationRequest={[Function]}
|
|
109
|
+
onStartShouldSetResponder={[Function]}
|
|
110
|
+
style={
|
|
111
|
+
[
|
|
112
|
+
{
|
|
113
|
+
"backgroundColor": "#808f91",
|
|
114
|
+
"borderRadius": 999,
|
|
115
|
+
"display": "flex",
|
|
116
|
+
"height": 24,
|
|
117
|
+
"justifyContent": "center",
|
|
118
|
+
"paddingHorizontal": 4,
|
|
119
|
+
"width": 48,
|
|
120
|
+
},
|
|
121
|
+
undefined,
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
testID="switch"
|
|
125
|
+
themeVariant="unchecked"
|
|
126
|
+
>
|
|
127
|
+
<View
|
|
128
|
+
collapsable={false}
|
|
129
|
+
style={
|
|
130
|
+
{
|
|
131
|
+
"backgroundColor": "#ffffff",
|
|
132
|
+
"borderRadius": 999,
|
|
133
|
+
"height": 16,
|
|
134
|
+
"left": 0,
|
|
135
|
+
"width": 16,
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/>
|
|
139
|
+
</View>
|
|
140
|
+
<View
|
|
141
|
+
pointerEvents="box-none"
|
|
142
|
+
position="bottom"
|
|
143
|
+
style={
|
|
144
|
+
[
|
|
145
|
+
{
|
|
146
|
+
"bottom": 0,
|
|
147
|
+
"elevation": 9999,
|
|
148
|
+
"flexDirection": "column-reverse",
|
|
149
|
+
"left": 0,
|
|
150
|
+
"paddingHorizontal": 24,
|
|
151
|
+
"paddingVertical": 16,
|
|
152
|
+
"position": "absolute",
|
|
153
|
+
"right": 0,
|
|
154
|
+
"top": 0,
|
|
155
|
+
},
|
|
156
|
+
undefined,
|
|
157
|
+
]
|
|
158
|
+
}
|
|
103
159
|
/>
|
|
104
160
|
</View>
|
|
105
161
|
`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { theme } from '../../../index';
|
|
3
3
|
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
4
|
-
import
|
|
4
|
+
import HeroDesignProvider from '../../HeroDesignProvider';
|
|
5
5
|
import Typography from '../../Typography';
|
|
6
|
-
import
|
|
6
|
+
import ScenceView from '../SceneView';
|
|
7
7
|
|
|
8
8
|
describe('ScenceView', () => {
|
|
9
9
|
describe('lazy', () => {
|
|
@@ -24,7 +24,7 @@ describe('ScenceView', () => {
|
|
|
24
24
|
expect(getByText('Scene 1')).toBeDefined();
|
|
25
25
|
|
|
26
26
|
rerender(
|
|
27
|
-
<
|
|
27
|
+
<HeroDesignProvider theme={theme}>
|
|
28
28
|
<ScenceView
|
|
29
29
|
testID="scene-view"
|
|
30
30
|
index={0}
|
|
@@ -34,7 +34,7 @@ describe('ScenceView', () => {
|
|
|
34
34
|
>
|
|
35
35
|
<Typography.Body variant="small">Scene 1</Typography.Body>
|
|
36
36
|
</ScenceView>
|
|
37
|
-
</
|
|
37
|
+
</HeroDesignProvider>
|
|
38
38
|
);
|
|
39
39
|
expect(toJSON()).toMatchSnapshot();
|
|
40
40
|
expect(queryByText('Scene 1')).toBeDefined();
|
|
@@ -57,7 +57,7 @@ describe('ScenceView', () => {
|
|
|
57
57
|
expect(queryByText('Scene 1')).toBeNull();
|
|
58
58
|
|
|
59
59
|
rerender(
|
|
60
|
-
<
|
|
60
|
+
<HeroDesignProvider theme={theme}>
|
|
61
61
|
<ScenceView
|
|
62
62
|
testID="scene-view"
|
|
63
63
|
index={2}
|
|
@@ -67,7 +67,7 @@ describe('ScenceView', () => {
|
|
|
67
67
|
>
|
|
68
68
|
<Typography.Body variant="small">Scene 1</Typography.Body>
|
|
69
69
|
</ScenceView>
|
|
70
|
-
</
|
|
70
|
+
</HeroDesignProvider>
|
|
71
71
|
);
|
|
72
72
|
expect(toJSON()).toMatchSnapshot();
|
|
73
73
|
expect(queryByText('Scene 1')).toBeDefined();
|