@hero-design/rn 8.33.1 → 8.34.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/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +868 -655
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +871 -656
- package/package.json +8 -7
- package/rollup.config.js +1 -0
- package/src/components/Accordion/AccordionItem.tsx +1 -3
- package/src/components/Accordion/__tests__/AccordionItem.spec.tsx +5 -5
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +26 -34
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +36 -48
- package/src/components/Accordion/__tests__/index.spec.tsx +2 -2
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +26 -39
- package/src/components/Alert/__tests__/index.spec.tsx +8 -2
- package/src/components/Alert/index.tsx +2 -2
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
- package/src/components/Attachment/index.tsx +3 -1
- package/src/components/Badge/StyledBadge.tsx +1 -4
- package/src/components/Badge/__tests__/Status.spec.tsx +1 -1
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +18 -48
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +2 -3
- package/src/components/BottomNavigation/StyledBottomNavigation.tsx +1 -1
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +4 -12
- package/src/components/BottomNavigation/index.tsx +0 -1
- package/src/components/BottomSheet/Header.tsx +1 -3
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
- package/src/components/Button/Button.tsx +34 -11
- package/src/components/Button/StyledButton.tsx +45 -38
- package/src/components/Button/UtilityButton/StyledUtilityButton.tsx +2 -4
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +8 -14
- package/src/components/Button/__tests__/StyledButton.spec.tsx +12 -6
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +66 -90
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +56 -86
- package/src/components/Calendar/CalendarRowItem.tsx +5 -2
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +10 -15
- package/src/components/Calendar/index.tsx +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +12 -18
- package/src/components/Card/__tests__/index.spec.tsx +1 -1
- package/src/components/Carousel/CardCarousel.tsx +2 -0
- package/src/components/Carousel/CarouselItem.tsx +4 -4
- package/src/components/Carousel/StyledCarousel.tsx +1 -4
- package/src/components/Carousel/__tests__/CardCarousel.spec.tsx +18 -18
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +24 -20
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +99 -165
- package/src/components/Checkbox/StyledCheckbox.tsx +1 -1
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +8 -12
- package/src/components/Checkbox/index.tsx +1 -1
- package/src/components/ContentNavigator/StyledContentNavigator.tsx +1 -6
- package/src/components/ContentNavigator/__tests__/StyledContentNavigator.spec.tsx +1 -9
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +0 -29
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +124 -17
- package/src/components/ContentNavigator/__tests__/index.spec.tsx +16 -0
- package/src/components/ContentNavigator/index.tsx +30 -9
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +12 -18
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +4 -6
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +4 -6
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +13 -18
- package/src/components/Empty/StyledEmpty.tsx +2 -6
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +22 -36
- package/src/components/Empty/index.tsx +4 -2
- package/src/components/Error/StyledError.tsx +2 -8
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +44 -76
- package/src/components/Error/index.tsx +6 -2
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +1 -4
- package/src/components/FAB/ActionGroup/StyledActionItem.tsx +1 -5
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +54 -116
- package/src/components/FAB/ActionGroup/index.tsx +1 -1
- package/src/components/FAB/StyledFAB.tsx +1 -4
- package/src/components/FAB/__tests__/StyledFAB.spec.tsx +1 -1
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +2 -3
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +4 -8
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +2 -0
- package/src/components/List/BasicListItem.tsx +2 -6
- package/src/components/List/ListItem.tsx +3 -5
- package/src/components/List/__tests__/ListItem.spec.tsx +4 -4
- package/src/components/List/__tests__/StyledBasicListItem.spec.tsx +3 -1
- package/src/components/List/__tests__/StyledListItem.spec.tsx +3 -1
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +4 -10
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +23 -37
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +8 -12
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +8 -12
- package/src/components/Modal/ModalContentWrapper.tsx +112 -0
- package/src/components/Modal/ModalPresenter/ModalPresenter.tsx +135 -0
- package/src/components/Modal/ModalPresenter/index.tsx +9 -0
- package/src/components/Modal/ModalProvider.tsx +8 -0
- package/src/components/Modal/__tests__/ModalContentWrapper.spec.tsx +25 -0
- package/src/components/Modal/__tests__/ModalPresenter.spec.tsx +57 -0
- package/src/components/Modal/__tests__/__snapshots__/ModalContentWrapper.spec.tsx.snap +35 -0
- package/src/components/Modal/__tests__/__snapshots__/ModalPresenter.spec.tsx.snap +55 -0
- package/src/components/Modal/__tests__/index.spec.tsx +50 -0
- package/src/components/Modal/index.tsx +121 -0
- package/src/components/PageControl/index.tsx +0 -1
- package/src/components/PinInput/PinCell.tsx +3 -1
- package/src/components/PinInput/StyledPinInput.tsx +2 -7
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +25 -45
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +18 -34
- package/src/components/PinInput/index.tsx +2 -0
- package/src/components/Progress/ProgressCircle.tsx +1 -3
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +3 -6
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +2 -4
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +3 -6
- package/src/components/RichTextEditor/RichTextEditor.tsx +7 -11
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +16 -24
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
- package/src/components/SectionHeading/__tests__/index.spec.tsx +3 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -2
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +12 -24
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +86 -130
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +6 -10
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -2
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +12 -24
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +49 -79
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +5 -9
- package/src/components/Success/StyledSuccess.tsx +2 -6
- package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +40 -64
- package/src/components/Success/index.tsx +3 -1
- package/src/components/Swipeable/__tests__/SwipeableAction.spec.tsx +2 -2
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +6 -9
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
- package/src/components/Swipeable/__tests__/index.spec.tsx +6 -4
- package/src/components/Switch/SelectorSwitch/Option.tsx +1 -1
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +1 -2
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -2
- package/src/components/Tabs/ScrollableTabsHeader.tsx +3 -3
- package/src/components/Tabs/__tests__/SceneView.spec.tsx +4 -4
- package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +6 -9
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +33 -60
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +7 -13
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +3 -8
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +45 -81
- package/src/components/Tabs/index.tsx +3 -3
- package/src/components/Tag/StyledTag.tsx +1 -4
- package/src/components/Tag/__tests__/Tag.spec.tsx +5 -1
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +47 -93
- package/src/components/Tag/index.tsx +5 -1
- package/src/components/TextInput/StyledTextInput.tsx +8 -16
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +72 -134
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +145 -257
- package/src/components/TextInput/index.tsx +2 -3
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +12 -23
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +21 -35
- package/src/components/Toast/Toast.tsx +6 -5
- package/src/components/Toast/ToastContainer.tsx +2 -0
- package/src/components/Toast/__tests__/Toast.spec.tsx +5 -1
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +26 -39
- package/src/components/Toolbar/StyledToolbar.tsx +1 -1
- package/src/components/Toolbar/ToolbarItem.tsx +4 -6
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -18
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +14 -21
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +4 -0
- package/src/theme/components/badge.ts +15 -0
- package/src/theme/components/button.ts +16 -0
- package/src/theme/components/carousel.ts +15 -0
- package/src/theme/components/empty.ts +12 -0
- package/src/theme/components/error.ts +16 -0
- package/src/theme/components/fab.ts +11 -0
- package/src/theme/components/pinInput.ts +15 -0
- package/src/theme/components/success.ts +12 -0
- package/src/theme/components/tag.ts +16 -0
- package/src/theme/components/textInput.ts +1 -0
- package/src/theme/getTheme.ts +18 -18
- package/testUtils/setup.tsx +24 -0
- package/types/components/Badge/StyledBadge.d.ts +1 -1
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +1 -1
- package/types/components/Button/StyledButton.d.ts +12 -5
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +1 -1
- package/types/components/Carousel/StyledCarousel.d.ts +1 -1
- package/types/components/Checkbox/StyledCheckbox.d.ts +1 -1
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +1 -5
- package/types/components/Empty/StyledEmpty.d.ts +2 -2
- package/types/components/Error/StyledError.d.ts +2 -2
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +2 -2
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +1 -1
- package/types/components/FAB/StyledFAB.d.ts +1 -1
- 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
- package/types/components/Modal/ModalContentWrapper.d.ts +16 -0
- package/types/components/Modal/ModalPresenter/ModalPresenter.d.ts +34 -0
- package/types/components/Modal/ModalPresenter/index.d.ts +3 -0
- package/types/components/Modal/ModalProvider.d.ts +5 -0
- package/types/components/Modal/index.d.ts +33 -0
- package/types/components/PinInput/StyledPinInput.d.ts +2 -2
- package/types/components/RichTextEditor/RichTextEditor.d.ts +2 -2
- package/types/components/Success/StyledSuccess.d.ts +2 -2
- package/types/components/Tag/StyledTag.d.ts +1 -1
- package/types/components/TextInput/StyledTextInput.d.ts +7 -10
- package/types/components/Toolbar/StyledToolbar.d.ts +1 -1
- package/types/index.d.ts +2 -1
- package/types/theme/components/badge.d.ts +15 -0
- package/types/theme/components/button.d.ts +14 -0
- package/types/theme/components/carousel.d.ts +15 -0
- package/types/theme/components/empty.d.ts +11 -0
- package/types/theme/components/error.d.ts +15 -0
- package/types/theme/components/fab.d.ts +11 -0
- package/types/theme/components/pinInput.d.ts +15 -0
- package/types/theme/components/success.d.ts +11 -0
- package/types/theme/components/tag.d.ts +15 -0
- package/types/theme/components/textInput.d.ts +1 -0
- package/types/theme/getTheme.d.ts +18 -18
|
@@ -24,18 +24,15 @@ exports[`Tag renders correctly when variant is filled and intent is danger 1`] =
|
|
|
24
24
|
Array [
|
|
25
25
|
Object {
|
|
26
26
|
"color": "#001f23",
|
|
27
|
-
"fontFamily": "BeVietnamPro-
|
|
28
|
-
"fontSize":
|
|
29
|
-
"letterSpacing": 0.
|
|
30
|
-
"lineHeight":
|
|
27
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
28
|
+
"fontSize": 12,
|
|
29
|
+
"letterSpacing": 0.24,
|
|
30
|
+
"lineHeight": 16,
|
|
31
31
|
},
|
|
32
32
|
Array [
|
|
33
33
|
Object {
|
|
34
34
|
"color": "#de350b",
|
|
35
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
36
|
-
"fontSize": 12,
|
|
37
35
|
"includeFontPadding": false,
|
|
38
|
-
"lineHeight": 16,
|
|
39
36
|
"textAlign": "center",
|
|
40
37
|
"textAlignVertical": "center",
|
|
41
38
|
},
|
|
@@ -43,10 +40,8 @@ exports[`Tag renders correctly when variant is filled and intent is danger 1`] =
|
|
|
43
40
|
],
|
|
44
41
|
]
|
|
45
42
|
}
|
|
46
|
-
|
|
47
|
-
themeFontWeight="regular"
|
|
43
|
+
themeFontWeight="semi-bold"
|
|
48
44
|
themeIntent="body"
|
|
49
|
-
themeTypeface="neutral"
|
|
50
45
|
themeVariant="filled"
|
|
51
46
|
>
|
|
52
47
|
DANGER
|
|
@@ -78,18 +73,15 @@ exports[`Tag renders correctly when variant is filled and intent is info 1`] = `
|
|
|
78
73
|
Array [
|
|
79
74
|
Object {
|
|
80
75
|
"color": "#001f23",
|
|
81
|
-
"fontFamily": "BeVietnamPro-
|
|
82
|
-
"fontSize":
|
|
83
|
-
"letterSpacing": 0.
|
|
84
|
-
"lineHeight":
|
|
76
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
77
|
+
"fontSize": 12,
|
|
78
|
+
"letterSpacing": 0.24,
|
|
79
|
+
"lineHeight": 16,
|
|
85
80
|
},
|
|
86
81
|
Array [
|
|
87
82
|
Object {
|
|
88
83
|
"color": "#4568fb",
|
|
89
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
90
|
-
"fontSize": 12,
|
|
91
84
|
"includeFontPadding": false,
|
|
92
|
-
"lineHeight": 16,
|
|
93
85
|
"textAlign": "center",
|
|
94
86
|
"textAlignVertical": "center",
|
|
95
87
|
},
|
|
@@ -97,10 +89,8 @@ exports[`Tag renders correctly when variant is filled and intent is info 1`] = `
|
|
|
97
89
|
],
|
|
98
90
|
]
|
|
99
91
|
}
|
|
100
|
-
|
|
101
|
-
themeFontWeight="regular"
|
|
92
|
+
themeFontWeight="semi-bold"
|
|
102
93
|
themeIntent="body"
|
|
103
|
-
themeTypeface="neutral"
|
|
104
94
|
themeVariant="filled"
|
|
105
95
|
>
|
|
106
96
|
INFO
|
|
@@ -132,18 +122,15 @@ exports[`Tag renders correctly when variant is filled and intent is primary 1`]
|
|
|
132
122
|
Array [
|
|
133
123
|
Object {
|
|
134
124
|
"color": "#001f23",
|
|
135
|
-
"fontFamily": "BeVietnamPro-
|
|
136
|
-
"fontSize":
|
|
137
|
-
"letterSpacing": 0.
|
|
138
|
-
"lineHeight":
|
|
125
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
126
|
+
"fontSize": 12,
|
|
127
|
+
"letterSpacing": 0.24,
|
|
128
|
+
"lineHeight": 16,
|
|
139
129
|
},
|
|
140
130
|
Array [
|
|
141
131
|
Object {
|
|
142
132
|
"color": "#001f23",
|
|
143
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
144
|
-
"fontSize": 12,
|
|
145
133
|
"includeFontPadding": false,
|
|
146
|
-
"lineHeight": 16,
|
|
147
134
|
"textAlign": "center",
|
|
148
135
|
"textAlignVertical": "center",
|
|
149
136
|
},
|
|
@@ -151,10 +138,8 @@ exports[`Tag renders correctly when variant is filled and intent is primary 1`]
|
|
|
151
138
|
],
|
|
152
139
|
]
|
|
153
140
|
}
|
|
154
|
-
|
|
155
|
-
themeFontWeight="regular"
|
|
141
|
+
themeFontWeight="semi-bold"
|
|
156
142
|
themeIntent="body"
|
|
157
|
-
themeTypeface="neutral"
|
|
158
143
|
themeVariant="filled"
|
|
159
144
|
>
|
|
160
145
|
PRIMARY
|
|
@@ -186,18 +171,15 @@ exports[`Tag renders correctly when variant is filled and intent is warning 1`]
|
|
|
186
171
|
Array [
|
|
187
172
|
Object {
|
|
188
173
|
"color": "#001f23",
|
|
189
|
-
"fontFamily": "BeVietnamPro-
|
|
190
|
-
"fontSize":
|
|
191
|
-
"letterSpacing": 0.
|
|
192
|
-
"lineHeight":
|
|
174
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
175
|
+
"fontSize": 12,
|
|
176
|
+
"letterSpacing": 0.24,
|
|
177
|
+
"lineHeight": 16,
|
|
193
178
|
},
|
|
194
179
|
Array [
|
|
195
180
|
Object {
|
|
196
181
|
"color": "#ffa234",
|
|
197
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
198
|
-
"fontSize": 12,
|
|
199
182
|
"includeFontPadding": false,
|
|
200
|
-
"lineHeight": 16,
|
|
201
183
|
"textAlign": "center",
|
|
202
184
|
"textAlignVertical": "center",
|
|
203
185
|
},
|
|
@@ -205,10 +187,8 @@ exports[`Tag renders correctly when variant is filled and intent is warning 1`]
|
|
|
205
187
|
],
|
|
206
188
|
]
|
|
207
189
|
}
|
|
208
|
-
|
|
209
|
-
themeFontWeight="regular"
|
|
190
|
+
themeFontWeight="semi-bold"
|
|
210
191
|
themeIntent="body"
|
|
211
|
-
themeTypeface="neutral"
|
|
212
192
|
themeVariant="filled"
|
|
213
193
|
>
|
|
214
194
|
WARNING
|
|
@@ -240,18 +220,15 @@ exports[`Tag renders correctly when variant is outlined and intent is danger 1`]
|
|
|
240
220
|
Array [
|
|
241
221
|
Object {
|
|
242
222
|
"color": "#001f23",
|
|
243
|
-
"fontFamily": "BeVietnamPro-
|
|
244
|
-
"fontSize":
|
|
245
|
-
"letterSpacing": 0.
|
|
246
|
-
"lineHeight":
|
|
223
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
224
|
+
"fontSize": 12,
|
|
225
|
+
"letterSpacing": 0.24,
|
|
226
|
+
"lineHeight": 16,
|
|
247
227
|
},
|
|
248
228
|
Array [
|
|
249
229
|
Object {
|
|
250
230
|
"color": "#de350b",
|
|
251
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
252
|
-
"fontSize": 12,
|
|
253
231
|
"includeFontPadding": false,
|
|
254
|
-
"lineHeight": 16,
|
|
255
232
|
"textAlign": "center",
|
|
256
233
|
"textAlignVertical": "center",
|
|
257
234
|
},
|
|
@@ -259,10 +236,8 @@ exports[`Tag renders correctly when variant is outlined and intent is danger 1`]
|
|
|
259
236
|
],
|
|
260
237
|
]
|
|
261
238
|
}
|
|
262
|
-
|
|
263
|
-
themeFontWeight="regular"
|
|
239
|
+
themeFontWeight="semi-bold"
|
|
264
240
|
themeIntent="body"
|
|
265
|
-
themeTypeface="neutral"
|
|
266
241
|
themeVariant="outlined"
|
|
267
242
|
>
|
|
268
243
|
DANGER
|
|
@@ -294,18 +269,15 @@ exports[`Tag renders correctly when variant is outlined and intent is info 1`] =
|
|
|
294
269
|
Array [
|
|
295
270
|
Object {
|
|
296
271
|
"color": "#001f23",
|
|
297
|
-
"fontFamily": "BeVietnamPro-
|
|
298
|
-
"fontSize":
|
|
299
|
-
"letterSpacing": 0.
|
|
300
|
-
"lineHeight":
|
|
272
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
273
|
+
"fontSize": 12,
|
|
274
|
+
"letterSpacing": 0.24,
|
|
275
|
+
"lineHeight": 16,
|
|
301
276
|
},
|
|
302
277
|
Array [
|
|
303
278
|
Object {
|
|
304
279
|
"color": "#4568fb",
|
|
305
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
306
|
-
"fontSize": 12,
|
|
307
280
|
"includeFontPadding": false,
|
|
308
|
-
"lineHeight": 16,
|
|
309
281
|
"textAlign": "center",
|
|
310
282
|
"textAlignVertical": "center",
|
|
311
283
|
},
|
|
@@ -313,10 +285,8 @@ exports[`Tag renders correctly when variant is outlined and intent is info 1`] =
|
|
|
313
285
|
],
|
|
314
286
|
]
|
|
315
287
|
}
|
|
316
|
-
|
|
317
|
-
themeFontWeight="regular"
|
|
288
|
+
themeFontWeight="semi-bold"
|
|
318
289
|
themeIntent="body"
|
|
319
|
-
themeTypeface="neutral"
|
|
320
290
|
themeVariant="outlined"
|
|
321
291
|
>
|
|
322
292
|
INFO
|
|
@@ -348,18 +318,15 @@ exports[`Tag renders correctly when variant is outlined and intent is primary 1`
|
|
|
348
318
|
Array [
|
|
349
319
|
Object {
|
|
350
320
|
"color": "#001f23",
|
|
351
|
-
"fontFamily": "BeVietnamPro-
|
|
352
|
-
"fontSize":
|
|
353
|
-
"letterSpacing": 0.
|
|
354
|
-
"lineHeight":
|
|
321
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
322
|
+
"fontSize": 12,
|
|
323
|
+
"letterSpacing": 0.24,
|
|
324
|
+
"lineHeight": 16,
|
|
355
325
|
},
|
|
356
326
|
Array [
|
|
357
327
|
Object {
|
|
358
328
|
"color": "#001f23",
|
|
359
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
360
|
-
"fontSize": 12,
|
|
361
329
|
"includeFontPadding": false,
|
|
362
|
-
"lineHeight": 16,
|
|
363
330
|
"textAlign": "center",
|
|
364
331
|
"textAlignVertical": "center",
|
|
365
332
|
},
|
|
@@ -367,10 +334,8 @@ exports[`Tag renders correctly when variant is outlined and intent is primary 1`
|
|
|
367
334
|
],
|
|
368
335
|
]
|
|
369
336
|
}
|
|
370
|
-
|
|
371
|
-
themeFontWeight="regular"
|
|
337
|
+
themeFontWeight="semi-bold"
|
|
372
338
|
themeIntent="body"
|
|
373
|
-
themeTypeface="neutral"
|
|
374
339
|
themeVariant="outlined"
|
|
375
340
|
>
|
|
376
341
|
PRIMARY
|
|
@@ -402,18 +367,15 @@ exports[`Tag renders correctly when variant is outlined and intent is success 1`
|
|
|
402
367
|
Array [
|
|
403
368
|
Object {
|
|
404
369
|
"color": "#001f23",
|
|
405
|
-
"fontFamily": "BeVietnamPro-
|
|
406
|
-
"fontSize":
|
|
407
|
-
"letterSpacing": 0.
|
|
408
|
-
"lineHeight":
|
|
370
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
371
|
+
"fontSize": 12,
|
|
372
|
+
"letterSpacing": 0.24,
|
|
373
|
+
"lineHeight": 16,
|
|
409
374
|
},
|
|
410
375
|
Array [
|
|
411
376
|
Object {
|
|
412
377
|
"color": "#017d6d",
|
|
413
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
414
|
-
"fontSize": 12,
|
|
415
378
|
"includeFontPadding": false,
|
|
416
|
-
"lineHeight": 16,
|
|
417
379
|
"textAlign": "center",
|
|
418
380
|
"textAlignVertical": "center",
|
|
419
381
|
},
|
|
@@ -421,10 +383,8 @@ exports[`Tag renders correctly when variant is outlined and intent is success 1`
|
|
|
421
383
|
],
|
|
422
384
|
]
|
|
423
385
|
}
|
|
424
|
-
|
|
425
|
-
themeFontWeight="regular"
|
|
386
|
+
themeFontWeight="semi-bold"
|
|
426
387
|
themeIntent="body"
|
|
427
|
-
themeTypeface="neutral"
|
|
428
388
|
themeVariant="outlined"
|
|
429
389
|
>
|
|
430
390
|
SUCCESS
|
|
@@ -456,18 +416,15 @@ exports[`Tag renders correctly when variant is outlined and intent is warning 1`
|
|
|
456
416
|
Array [
|
|
457
417
|
Object {
|
|
458
418
|
"color": "#001f23",
|
|
459
|
-
"fontFamily": "BeVietnamPro-
|
|
460
|
-
"fontSize":
|
|
461
|
-
"letterSpacing": 0.
|
|
462
|
-
"lineHeight":
|
|
419
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
420
|
+
"fontSize": 12,
|
|
421
|
+
"letterSpacing": 0.24,
|
|
422
|
+
"lineHeight": 16,
|
|
463
423
|
},
|
|
464
424
|
Array [
|
|
465
425
|
Object {
|
|
466
426
|
"color": "#ffa234",
|
|
467
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
468
|
-
"fontSize": 12,
|
|
469
427
|
"includeFontPadding": false,
|
|
470
|
-
"lineHeight": 16,
|
|
471
428
|
"textAlign": "center",
|
|
472
429
|
"textAlignVertical": "center",
|
|
473
430
|
},
|
|
@@ -475,10 +432,8 @@ exports[`Tag renders correctly when variant is outlined and intent is warning 1`
|
|
|
475
432
|
],
|
|
476
433
|
]
|
|
477
434
|
}
|
|
478
|
-
|
|
479
|
-
themeFontWeight="regular"
|
|
435
|
+
themeFontWeight="semi-bold"
|
|
480
436
|
themeIntent="body"
|
|
481
|
-
themeTypeface="neutral"
|
|
482
437
|
themeVariant="outlined"
|
|
483
438
|
>
|
|
484
439
|
WARNING
|
|
@@ -512,16 +467,15 @@ exports[`Tag renders correctly with custom content 1`] = `
|
|
|
512
467
|
"color": "#001f23",
|
|
513
468
|
"fontFamily": "BeVietnamPro-Regular",
|
|
514
469
|
"fontSize": 14,
|
|
515
|
-
"letterSpacing": 0.
|
|
470
|
+
"letterSpacing": 0.48,
|
|
516
471
|
"lineHeight": 22,
|
|
517
472
|
},
|
|
518
473
|
undefined,
|
|
519
474
|
]
|
|
520
475
|
}
|
|
521
|
-
themeFontSize="medium"
|
|
522
|
-
themeFontWeight="regular"
|
|
523
476
|
themeIntent="body"
|
|
524
477
|
themeTypeface="neutral"
|
|
478
|
+
themeVariant="small"
|
|
525
479
|
>
|
|
526
480
|
Custom Content
|
|
527
481
|
</Text>
|
|
@@ -42,7 +42,11 @@ const Tag = ({
|
|
|
42
42
|
testID={testID}
|
|
43
43
|
>
|
|
44
44
|
{typeof content === 'string' ? (
|
|
45
|
-
<StyledText
|
|
45
|
+
<StyledText
|
|
46
|
+
themeIntent={intent}
|
|
47
|
+
themeVariant={variant}
|
|
48
|
+
fontWeight="semi-bold"
|
|
49
|
+
>
|
|
46
50
|
{content}
|
|
47
51
|
</StyledText>
|
|
48
52
|
) : (
|
|
@@ -19,19 +19,17 @@ const StyledLabelContainer = styled(View)(({ theme }) => ({
|
|
|
19
19
|
zIndex: 1,
|
|
20
20
|
paddingHorizontal: theme.__hd__.textInput.space.labelHorizontalPadding,
|
|
21
21
|
}));
|
|
22
|
-
const StyledLabel = styled(Typography.
|
|
22
|
+
const StyledLabel = styled(Typography.Caption)<{
|
|
23
23
|
themeState: State;
|
|
24
24
|
}>(({ theme, themeState }) => ({
|
|
25
25
|
color: theme.__hd__.textInput.colors.labels[themeState],
|
|
26
|
-
fontSize: theme.__hd__.textInput.fontSizes.topLabel,
|
|
27
26
|
lineHeight: theme.__hd__.textInput.lineHeights.topLabel,
|
|
28
27
|
}));
|
|
29
28
|
|
|
30
|
-
const StyledAsteriskLabel = styled(Typography.
|
|
29
|
+
const StyledAsteriskLabel = styled(Typography.Caption)<{
|
|
31
30
|
themeState: State;
|
|
32
31
|
}>(({ theme, themeState }) => ({
|
|
33
32
|
color: theme.__hd__.textInput.colors.asterisks[themeState],
|
|
34
|
-
fontSize: theme.__hd__.textInput.fontSizes.topLabel,
|
|
35
33
|
lineHeight: theme.__hd__.textInput.lineHeights.topLabel,
|
|
36
34
|
}));
|
|
37
35
|
|
|
@@ -44,22 +42,20 @@ const StyledLabelContainerInsideTextInput = styled(View)<{
|
|
|
44
42
|
...StyleSheet.absoluteFillObject,
|
|
45
43
|
}));
|
|
46
44
|
|
|
47
|
-
const StyledLabelInsideTextInput = styled(Typography.
|
|
45
|
+
const StyledLabelInsideTextInput = styled(Typography.Body)<{
|
|
48
46
|
themeState: State;
|
|
49
47
|
}>(({ theme, themeState }) => ({
|
|
50
48
|
textAlignVertical: 'center',
|
|
51
49
|
alignContent: 'center',
|
|
52
|
-
fontSize: theme.__hd__.textInput.fontSizes.labelInsideTextInput,
|
|
53
50
|
alignItems: 'center',
|
|
54
51
|
color: theme.__hd__.textInput.colors.labelsInsideTextInput[themeState],
|
|
55
52
|
marginTop: theme.__hd__.textInput.space.labelInsideTextInputMarginTop,
|
|
56
53
|
}));
|
|
57
54
|
|
|
58
|
-
const StyledAsteriskLabelInsideTextInput = styled(Typography.
|
|
55
|
+
const StyledAsteriskLabelInsideTextInput = styled(Typography.Body)<{
|
|
59
56
|
themeState: State;
|
|
60
57
|
}>(({ theme, themeState }) => ({
|
|
61
58
|
color: theme.__hd__.textInput.colors.asterisks[themeState],
|
|
62
|
-
fontSize: theme.__hd__.textInput.fontSizes.asteriskLabel,
|
|
63
59
|
}));
|
|
64
60
|
|
|
65
61
|
const StyledErrorContainer = styled(View)(({ theme }) => ({
|
|
@@ -70,17 +66,15 @@ const StyledErrorContainer = styled(View)(({ theme }) => ({
|
|
|
70
66
|
flexGrow: 4,
|
|
71
67
|
}));
|
|
72
68
|
|
|
73
|
-
const StyledError = styled(Typography.
|
|
69
|
+
const StyledError = styled(Typography.Caption)(({ theme }) => ({
|
|
74
70
|
color: theme.__hd__.textInput.colors.error,
|
|
75
|
-
fontSize: theme.__hd__.textInput.fontSizes.error,
|
|
76
71
|
marginLeft: theme.__hd__.textInput.space.errorMarginLeft,
|
|
77
72
|
}));
|
|
78
73
|
|
|
79
|
-
const StyledMaxLengthMessage = styled(Typography.
|
|
74
|
+
const StyledMaxLengthMessage = styled(Typography.Caption)<{
|
|
80
75
|
themeState: State;
|
|
81
76
|
}>(({ theme, themeState }) => ({
|
|
82
77
|
color: theme.__hd__.textInput.colors.maxLengthLabels[themeState],
|
|
83
|
-
fontSize: theme.__hd__.textInput.fontSizes.maxLength,
|
|
84
78
|
marginRight: theme.__hd__.textInput.space.maxLengthLabelMarginLeft,
|
|
85
79
|
alignSelf: 'flex-end',
|
|
86
80
|
flex: 1,
|
|
@@ -88,10 +82,7 @@ const StyledMaxLengthMessage = styled(Typography.Text)<{
|
|
|
88
82
|
textAlign: 'right',
|
|
89
83
|
}));
|
|
90
84
|
|
|
91
|
-
const StyledHelperText =
|
|
92
|
-
fontSize: theme.__hd__.textInput.fontSizes.error,
|
|
93
|
-
}));
|
|
94
|
-
|
|
85
|
+
const StyledHelperText = Typography.Caption;
|
|
95
86
|
const StyledTextInput = styled(TextInput)<{ themeVariant: Variant }>(
|
|
96
87
|
({ theme, themeVariant }) => ({
|
|
97
88
|
textAlignVertical: themeVariant === 'text' ? 'center' : 'top',
|
|
@@ -143,6 +134,7 @@ const StyledErrorAndHelpTextContainer = styled(View)(({ theme }) => ({
|
|
|
143
134
|
paddingLeft:
|
|
144
135
|
theme.__hd__.textInput.space.errorAndHelpTextContainerPaddingLeft,
|
|
145
136
|
minHeight: theme.__hd__.textInput.sizes.errorAndHelpTextContainerHeight,
|
|
137
|
+
paddingTop: theme.__hd__.textInput.space.errorAndHelpTextContainerPaddingTop,
|
|
146
138
|
}));
|
|
147
139
|
|
|
148
140
|
const StyledErrorAndMaxLengthContainer = styled(View)(() => ({
|