@hero-design/rn 7.25.1 → 7.26.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 +9 -9
- package/assets/fonts/BeVietnamPro-Bold.ttf +0 -0
- package/assets/fonts/{be-vietnam-pro-light.ttf → BeVietnamPro-Light.ttf} +0 -0
- package/assets/fonts/{be-vietnam-pro-regular.ttf → BeVietnamPro-Regular.ttf} +0 -0
- package/assets/fonts/{be-vietnam-pro-semibold.ttf → BeVietnamPro-SemiBold.ttf} +0 -0
- package/assets/fonts/RebondGrotesque-Light.otf +0 -0
- package/assets/fonts/RebondGrotesque-Regular.otf +0 -0
- package/assets/fonts/RebondGrotesque-SemiBold.otf +0 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +9150 -12295
- package/jest.config.js +6 -2
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +9150 -12294
- package/package.json +4 -4
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -0
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +11 -0
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Avatar/{index.tsx → Avatar.tsx} +33 -18
- package/src/components/Avatar/AvatarStack/StyledAvatarStack.tsx +29 -0
- package/src/components/Avatar/AvatarStack/__tests__/StyledAvatarStack.spec.tsx +33 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +80 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +552 -0
- package/src/components/Avatar/AvatarStack/__tests__/index.spec.tsx +59 -0
- package/src/components/Avatar/AvatarStack/index.tsx +61 -0
- package/src/components/Avatar/AvatarStack/utils.ts +22 -0
- package/src/components/Avatar/StyledAvatar.tsx +6 -25
- package/src/components/Avatar/__tests__/StyledAvatar.spec.tsx +3 -19
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -24
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +118 -20
- package/src/components/Avatar/__tests__/index.spec.tsx +25 -8
- package/src/components/Avatar/index.ts +6 -0
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +1 -0
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +11 -0
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +1 -1
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +1 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +3 -0
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -0
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +11 -0
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +54 -31
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +5 -1
- package/src/components/Progress/ProgressBar.tsx +19 -2
- package/src/components/Progress/ProgressCircle.tsx +30 -9
- package/src/components/Progress/StyledProgressBar.tsx +14 -7
- package/src/components/Progress/StyledProgressCircle.tsx +35 -24
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +337 -30
- package/src/components/Progress/__tests__/index.spec.js +15 -0
- package/src/components/Progress/constants.ts +16 -0
- package/src/components/Progress/types.ts +7 -1
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +2 -0
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +3 -0
- package/src/components/RichTextEditor/RichTextEditor.tsx +1 -1
- package/src/components/RichTextEditor/__mocks__/heroEditorApp.ts +2 -0
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +36 -25
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +8 -4
- package/src/components/RichTextEditor/heroEditorApp.ts +3 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +22 -0
- package/src/components/Select/MultiSelect/index.tsx +35 -13
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +46 -0
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +1 -0
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +3 -0
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +2 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +22 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +31 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +3 -0
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +13 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +6 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +6 -0
- package/src/components/Typography/Text/StyledText.tsx +6 -2
- package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +22 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +63 -0
- package/src/components/Typography/Text/index.tsx +8 -0
- package/src/index.ts +2 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +84 -21
- package/src/theme/components/avatar.ts +29 -5
- package/src/theme/components/badge.ts +1 -1
- package/src/theme/components/button.ts +2 -2
- package/src/theme/components/empty.ts +2 -2
- package/src/theme/components/fab.ts +3 -3
- package/src/theme/components/pinInput.ts +2 -2
- package/src/theme/components/progress.ts +37 -9
- package/src/theme/components/tag.ts +1 -1
- package/src/theme/components/typography.ts +1 -7
- package/src/theme/global/colors/global.ts +12 -3
- package/src/theme/global/colors/types.ts +5 -0
- package/src/theme/global/scale.ts +6 -2
- package/src/theme/global/typography.ts +23 -5
- package/types/components/Avatar/Avatar.d.ts +33 -0
- package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +17 -0
- package/types/components/Avatar/AvatarStack/index.d.ts +23 -0
- package/types/components/Avatar/AvatarStack/utils.d.ts +4 -0
- package/types/components/Avatar/StyledAvatar.d.ts +2 -12
- package/types/components/Avatar/index.d.ts +6 -25
- 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/Progress/ProgressBar.d.ts +1 -1
- package/types/components/Progress/ProgressCircle.d.ts +4 -2
- package/types/components/Progress/StyledProgressBar.d.ts +2 -0
- package/types/components/Progress/StyledProgressCircle.d.ts +2 -0
- package/types/components/Progress/constants.d.ts +15 -0
- package/types/components/Progress/index.d.ts +1 -1
- package/types/components/Progress/types.d.ts +1 -1
- package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +2 -0
- package/types/components/RichTextEditor/heroEditorApp.d.ts +2 -0
- package/types/components/Select/MultiSelect/index.d.ts +4 -1
- package/types/components/Typography/Text/StyledText.d.ts +1 -0
- package/types/components/Typography/Text/index.d.ts +7 -1
- package/types/index.d.ts +2 -2
- package/types/theme/components/avatar.d.ts +4 -2
- package/types/theme/components/progress.d.ts +30 -9
- package/types/theme/components/typography.d.ts +1 -5
- package/types/theme/global/colors/types.d.ts +5 -0
- package/types/theme/global/index.d.ts +5 -0
- package/types/theme/global/scale.d.ts +4 -1
- package/types/theme/global/typography.d.ts +9 -2
|
@@ -14,6 +14,7 @@ exports[`Progress.Bar renders correctly 1`] = `
|
|
|
14
14
|
]
|
|
15
15
|
}
|
|
16
16
|
testID="progress-bar"
|
|
17
|
+
themeIntent="primary"
|
|
17
18
|
>
|
|
18
19
|
<View
|
|
19
20
|
collapsable={false}
|
|
@@ -52,6 +53,7 @@ exports[`Progress.Bar renders correctly with intent 1`] = `
|
|
|
52
53
|
]
|
|
53
54
|
}
|
|
54
55
|
testID="progress-bar"
|
|
56
|
+
themeIntent="success"
|
|
55
57
|
>
|
|
56
58
|
<View
|
|
57
59
|
collapsable={false}
|
|
@@ -76,6 +78,299 @@ exports[`Progress.Bar renders correctly with intent 1`] = `
|
|
|
76
78
|
</View>
|
|
77
79
|
`;
|
|
78
80
|
|
|
81
|
+
exports[`Progress.Circle allows to custom value renderer 1`] = `
|
|
82
|
+
<View
|
|
83
|
+
testID="progress-circle"
|
|
84
|
+
>
|
|
85
|
+
<View
|
|
86
|
+
style={
|
|
87
|
+
Array [
|
|
88
|
+
Object {
|
|
89
|
+
"borderRadius": 999,
|
|
90
|
+
"flexDirection": "row",
|
|
91
|
+
},
|
|
92
|
+
undefined,
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
>
|
|
96
|
+
<View>
|
|
97
|
+
<View
|
|
98
|
+
style={
|
|
99
|
+
Array [
|
|
100
|
+
Object {
|
|
101
|
+
"height": 72,
|
|
102
|
+
"overflow": "hidden",
|
|
103
|
+
"width": 36,
|
|
104
|
+
},
|
|
105
|
+
undefined,
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
>
|
|
109
|
+
<View
|
|
110
|
+
style={
|
|
111
|
+
Array [
|
|
112
|
+
Object {
|
|
113
|
+
"borderColor": "#017d6d",
|
|
114
|
+
"borderRadius": 999,
|
|
115
|
+
"borderWidth": 4,
|
|
116
|
+
"height": 72,
|
|
117
|
+
"width": 72,
|
|
118
|
+
},
|
|
119
|
+
undefined,
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
themeIntent="success"
|
|
123
|
+
/>
|
|
124
|
+
</View>
|
|
125
|
+
<View
|
|
126
|
+
collapsable={false}
|
|
127
|
+
nativeID="animatedComponent"
|
|
128
|
+
style={
|
|
129
|
+
Object {
|
|
130
|
+
"bottom": 0,
|
|
131
|
+
"left": 0,
|
|
132
|
+
"position": "absolute",
|
|
133
|
+
"right": 0,
|
|
134
|
+
"top": 0,
|
|
135
|
+
"transform": Array [
|
|
136
|
+
Object {
|
|
137
|
+
"translateX": 18,
|
|
138
|
+
},
|
|
139
|
+
Object {
|
|
140
|
+
"rotate": "0deg",
|
|
141
|
+
},
|
|
142
|
+
Object {
|
|
143
|
+
"translateX": -18,
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
>
|
|
149
|
+
<View
|
|
150
|
+
style={
|
|
151
|
+
Array [
|
|
152
|
+
Object {
|
|
153
|
+
"height": 72,
|
|
154
|
+
"overflow": "hidden",
|
|
155
|
+
"width": 36,
|
|
156
|
+
},
|
|
157
|
+
undefined,
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
>
|
|
161
|
+
<View
|
|
162
|
+
style={
|
|
163
|
+
Array [
|
|
164
|
+
Object {
|
|
165
|
+
"borderColor": "#e8e9ea",
|
|
166
|
+
"borderRadius": 999,
|
|
167
|
+
"borderWidth": 4,
|
|
168
|
+
"height": 72,
|
|
169
|
+
"width": 72,
|
|
170
|
+
},
|
|
171
|
+
undefined,
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
themeIntent="success"
|
|
175
|
+
/>
|
|
176
|
+
</View>
|
|
177
|
+
</View>
|
|
178
|
+
</View>
|
|
179
|
+
<View
|
|
180
|
+
style={
|
|
181
|
+
Object {
|
|
182
|
+
"marginLeft": -0.1,
|
|
183
|
+
"transform": Array [
|
|
184
|
+
Object {
|
|
185
|
+
"rotate": "180deg",
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
"zIndex": 1,
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
>
|
|
192
|
+
<View
|
|
193
|
+
style={
|
|
194
|
+
Array [
|
|
195
|
+
Object {
|
|
196
|
+
"height": 72,
|
|
197
|
+
"overflow": "hidden",
|
|
198
|
+
"width": 36,
|
|
199
|
+
},
|
|
200
|
+
undefined,
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
>
|
|
204
|
+
<View
|
|
205
|
+
style={
|
|
206
|
+
Array [
|
|
207
|
+
Object {
|
|
208
|
+
"borderColor": "#017d6d",
|
|
209
|
+
"borderRadius": 999,
|
|
210
|
+
"borderWidth": 4,
|
|
211
|
+
"height": 72,
|
|
212
|
+
"width": 72,
|
|
213
|
+
},
|
|
214
|
+
undefined,
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
themeIntent="success"
|
|
218
|
+
/>
|
|
219
|
+
</View>
|
|
220
|
+
<View
|
|
221
|
+
collapsable={false}
|
|
222
|
+
nativeID="animatedComponent"
|
|
223
|
+
style={
|
|
224
|
+
Object {
|
|
225
|
+
"bottom": 0,
|
|
226
|
+
"left": 0,
|
|
227
|
+
"opacity": 1,
|
|
228
|
+
"position": "absolute",
|
|
229
|
+
"right": 0,
|
|
230
|
+
"top": 0,
|
|
231
|
+
"transform": Array [
|
|
232
|
+
Object {
|
|
233
|
+
"translateX": 18,
|
|
234
|
+
},
|
|
235
|
+
Object {
|
|
236
|
+
"rotate": "0deg",
|
|
237
|
+
},
|
|
238
|
+
Object {
|
|
239
|
+
"translateX": -18,
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
>
|
|
245
|
+
<View
|
|
246
|
+
style={
|
|
247
|
+
Array [
|
|
248
|
+
Object {
|
|
249
|
+
"height": 72,
|
|
250
|
+
"overflow": "hidden",
|
|
251
|
+
"width": 36,
|
|
252
|
+
},
|
|
253
|
+
undefined,
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
>
|
|
257
|
+
<View
|
|
258
|
+
style={
|
|
259
|
+
Array [
|
|
260
|
+
Object {
|
|
261
|
+
"borderColor": "#e8e9ea",
|
|
262
|
+
"borderRadius": 999,
|
|
263
|
+
"borderWidth": 4,
|
|
264
|
+
"height": 72,
|
|
265
|
+
"width": 72,
|
|
266
|
+
},
|
|
267
|
+
undefined,
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
themeIntent="success"
|
|
271
|
+
/>
|
|
272
|
+
</View>
|
|
273
|
+
</View>
|
|
274
|
+
</View>
|
|
275
|
+
<View
|
|
276
|
+
style={
|
|
277
|
+
Array [
|
|
278
|
+
Object {
|
|
279
|
+
"backgroundColor": "#017d6d",
|
|
280
|
+
"borderRadius": 999,
|
|
281
|
+
"height": 4,
|
|
282
|
+
"left": 34,
|
|
283
|
+
"position": "absolute",
|
|
284
|
+
"top": 0,
|
|
285
|
+
"width": 4,
|
|
286
|
+
"zIndex": 2,
|
|
287
|
+
},
|
|
288
|
+
undefined,
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
themeIntent="success"
|
|
292
|
+
/>
|
|
293
|
+
<View
|
|
294
|
+
collapsable={false}
|
|
295
|
+
nativeID="animatedComponent"
|
|
296
|
+
style={
|
|
297
|
+
Object {
|
|
298
|
+
"bottom": 0,
|
|
299
|
+
"left": 0,
|
|
300
|
+
"position": "absolute",
|
|
301
|
+
"right": 0,
|
|
302
|
+
"top": 0,
|
|
303
|
+
"transform": Array [
|
|
304
|
+
Object {
|
|
305
|
+
"rotate": "0deg",
|
|
306
|
+
},
|
|
307
|
+
],
|
|
308
|
+
"zIndex": 2,
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
>
|
|
312
|
+
<View
|
|
313
|
+
style={
|
|
314
|
+
Array [
|
|
315
|
+
Object {
|
|
316
|
+
"backgroundColor": "#017d6d",
|
|
317
|
+
"borderRadius": 999,
|
|
318
|
+
"height": 4,
|
|
319
|
+
"left": 34,
|
|
320
|
+
"position": "absolute",
|
|
321
|
+
"top": 0,
|
|
322
|
+
"width": 4,
|
|
323
|
+
"zIndex": 2,
|
|
324
|
+
},
|
|
325
|
+
undefined,
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
themeIntent="success"
|
|
329
|
+
/>
|
|
330
|
+
</View>
|
|
331
|
+
<View
|
|
332
|
+
style={
|
|
333
|
+
Array [
|
|
334
|
+
Object {
|
|
335
|
+
"alignItems": "center",
|
|
336
|
+
"borderRadius": 999,
|
|
337
|
+
"height": 64,
|
|
338
|
+
"justifyContent": "center",
|
|
339
|
+
"left": 4,
|
|
340
|
+
"position": "absolute",
|
|
341
|
+
"top": 4,
|
|
342
|
+
"width": 64,
|
|
343
|
+
"zIndex": 3,
|
|
344
|
+
},
|
|
345
|
+
undefined,
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
>
|
|
349
|
+
<Text
|
|
350
|
+
style={
|
|
351
|
+
Array [
|
|
352
|
+
Object {
|
|
353
|
+
"color": "#001f23",
|
|
354
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
355
|
+
"fontSize": 16,
|
|
356
|
+
"letterSpacing": 0.48,
|
|
357
|
+
"lineHeight": 24,
|
|
358
|
+
},
|
|
359
|
+
undefined,
|
|
360
|
+
]
|
|
361
|
+
}
|
|
362
|
+
themeFontSize="large"
|
|
363
|
+
themeFontWeight="regular"
|
|
364
|
+
themeIntent="body"
|
|
365
|
+
themeTypeface="neutral"
|
|
366
|
+
>
|
|
367
|
+
175
|
|
368
|
+
</Text>
|
|
369
|
+
</View>
|
|
370
|
+
</View>
|
|
371
|
+
</View>
|
|
372
|
+
`;
|
|
373
|
+
|
|
79
374
|
exports[`Progress.Circle renders correctly 1`] = `
|
|
80
375
|
<View
|
|
81
376
|
testID="progress-circle"
|
|
@@ -108,8 +403,9 @@ exports[`Progress.Circle renders correctly 1`] = `
|
|
|
108
403
|
style={
|
|
109
404
|
Array [
|
|
110
405
|
Object {
|
|
111
|
-
"
|
|
406
|
+
"borderColor": "#401960",
|
|
112
407
|
"borderRadius": 999,
|
|
408
|
+
"borderWidth": 4,
|
|
113
409
|
"height": 72,
|
|
114
410
|
"width": 72,
|
|
115
411
|
},
|
|
@@ -159,14 +455,16 @@ exports[`Progress.Circle renders correctly 1`] = `
|
|
|
159
455
|
style={
|
|
160
456
|
Array [
|
|
161
457
|
Object {
|
|
162
|
-
"
|
|
458
|
+
"borderColor": "#e8e9ea",
|
|
163
459
|
"borderRadius": 999,
|
|
460
|
+
"borderWidth": 4,
|
|
164
461
|
"height": 72,
|
|
165
462
|
"width": 72,
|
|
166
463
|
},
|
|
167
464
|
undefined,
|
|
168
465
|
]
|
|
169
466
|
}
|
|
467
|
+
themeIntent="primary"
|
|
170
468
|
/>
|
|
171
469
|
</View>
|
|
172
470
|
</View>
|
|
@@ -200,8 +498,9 @@ exports[`Progress.Circle renders correctly 1`] = `
|
|
|
200
498
|
style={
|
|
201
499
|
Array [
|
|
202
500
|
Object {
|
|
203
|
-
"
|
|
501
|
+
"borderColor": "#401960",
|
|
204
502
|
"borderRadius": 999,
|
|
503
|
+
"borderWidth": 4,
|
|
205
504
|
"height": 72,
|
|
206
505
|
"width": 72,
|
|
207
506
|
},
|
|
@@ -252,14 +551,16 @@ exports[`Progress.Circle renders correctly 1`] = `
|
|
|
252
551
|
style={
|
|
253
552
|
Array [
|
|
254
553
|
Object {
|
|
255
|
-
"
|
|
554
|
+
"borderColor": "#e8e9ea",
|
|
256
555
|
"borderRadius": 999,
|
|
556
|
+
"borderWidth": 4,
|
|
257
557
|
"height": 72,
|
|
258
558
|
"width": 72,
|
|
259
559
|
},
|
|
260
560
|
undefined,
|
|
261
561
|
]
|
|
262
562
|
}
|
|
563
|
+
themeIntent="primary"
|
|
263
564
|
/>
|
|
264
565
|
</View>
|
|
265
566
|
</View>
|
|
@@ -270,11 +571,11 @@ exports[`Progress.Circle renders correctly 1`] = `
|
|
|
270
571
|
Object {
|
|
271
572
|
"backgroundColor": "#401960",
|
|
272
573
|
"borderRadius": 999,
|
|
273
|
-
"height":
|
|
274
|
-
"left":
|
|
574
|
+
"height": 4,
|
|
575
|
+
"left": 34,
|
|
275
576
|
"position": "absolute",
|
|
276
577
|
"top": 0,
|
|
277
|
-
"width":
|
|
578
|
+
"width": 4,
|
|
278
579
|
"zIndex": 2,
|
|
279
580
|
},
|
|
280
581
|
undefined,
|
|
@@ -307,11 +608,11 @@ exports[`Progress.Circle renders correctly 1`] = `
|
|
|
307
608
|
Object {
|
|
308
609
|
"backgroundColor": "#401960",
|
|
309
610
|
"borderRadius": 999,
|
|
310
|
-
"height":
|
|
311
|
-
"left":
|
|
611
|
+
"height": 4,
|
|
612
|
+
"left": 34,
|
|
312
613
|
"position": "absolute",
|
|
313
614
|
"top": 0,
|
|
314
|
-
"width":
|
|
615
|
+
"width": 4,
|
|
315
616
|
"zIndex": 2,
|
|
316
617
|
},
|
|
317
618
|
undefined,
|
|
@@ -325,14 +626,13 @@ exports[`Progress.Circle renders correctly 1`] = `
|
|
|
325
626
|
Array [
|
|
326
627
|
Object {
|
|
327
628
|
"alignItems": "center",
|
|
328
|
-
"backgroundColor": "#ffffff",
|
|
329
629
|
"borderRadius": 999,
|
|
330
|
-
"height":
|
|
630
|
+
"height": 64,
|
|
331
631
|
"justifyContent": "center",
|
|
332
|
-
"left":
|
|
632
|
+
"left": 4,
|
|
333
633
|
"position": "absolute",
|
|
334
|
-
"top":
|
|
335
|
-
"width":
|
|
634
|
+
"top": 4,
|
|
635
|
+
"width": 64,
|
|
336
636
|
"zIndex": 3,
|
|
337
637
|
},
|
|
338
638
|
undefined,
|
|
@@ -355,6 +655,7 @@ exports[`Progress.Circle renders correctly 1`] = `
|
|
|
355
655
|
themeFontSize="large"
|
|
356
656
|
themeFontWeight="regular"
|
|
357
657
|
themeIntent="body"
|
|
658
|
+
themeTypeface="neutral"
|
|
358
659
|
>
|
|
359
660
|
25%
|
|
360
661
|
</Text>
|
|
@@ -395,8 +696,9 @@ exports[`Progress.Circle renders correctly with intent 1`] = `
|
|
|
395
696
|
style={
|
|
396
697
|
Array [
|
|
397
698
|
Object {
|
|
398
|
-
"
|
|
699
|
+
"borderColor": "#017d6d",
|
|
399
700
|
"borderRadius": 999,
|
|
701
|
+
"borderWidth": 4,
|
|
400
702
|
"height": 72,
|
|
401
703
|
"width": 72,
|
|
402
704
|
},
|
|
@@ -446,14 +748,16 @@ exports[`Progress.Circle renders correctly with intent 1`] = `
|
|
|
446
748
|
style={
|
|
447
749
|
Array [
|
|
448
750
|
Object {
|
|
449
|
-
"
|
|
751
|
+
"borderColor": "#e8e9ea",
|
|
450
752
|
"borderRadius": 999,
|
|
753
|
+
"borderWidth": 4,
|
|
451
754
|
"height": 72,
|
|
452
755
|
"width": 72,
|
|
453
756
|
},
|
|
454
757
|
undefined,
|
|
455
758
|
]
|
|
456
759
|
}
|
|
760
|
+
themeIntent="success"
|
|
457
761
|
/>
|
|
458
762
|
</View>
|
|
459
763
|
</View>
|
|
@@ -487,8 +791,9 @@ exports[`Progress.Circle renders correctly with intent 1`] = `
|
|
|
487
791
|
style={
|
|
488
792
|
Array [
|
|
489
793
|
Object {
|
|
490
|
-
"
|
|
794
|
+
"borderColor": "#017d6d",
|
|
491
795
|
"borderRadius": 999,
|
|
796
|
+
"borderWidth": 4,
|
|
492
797
|
"height": 72,
|
|
493
798
|
"width": 72,
|
|
494
799
|
},
|
|
@@ -539,14 +844,16 @@ exports[`Progress.Circle renders correctly with intent 1`] = `
|
|
|
539
844
|
style={
|
|
540
845
|
Array [
|
|
541
846
|
Object {
|
|
542
|
-
"
|
|
847
|
+
"borderColor": "#e8e9ea",
|
|
543
848
|
"borderRadius": 999,
|
|
849
|
+
"borderWidth": 4,
|
|
544
850
|
"height": 72,
|
|
545
851
|
"width": 72,
|
|
546
852
|
},
|
|
547
853
|
undefined,
|
|
548
854
|
]
|
|
549
855
|
}
|
|
856
|
+
themeIntent="success"
|
|
550
857
|
/>
|
|
551
858
|
</View>
|
|
552
859
|
</View>
|
|
@@ -557,11 +864,11 @@ exports[`Progress.Circle renders correctly with intent 1`] = `
|
|
|
557
864
|
Object {
|
|
558
865
|
"backgroundColor": "#017d6d",
|
|
559
866
|
"borderRadius": 999,
|
|
560
|
-
"height":
|
|
561
|
-
"left":
|
|
867
|
+
"height": 4,
|
|
868
|
+
"left": 34,
|
|
562
869
|
"position": "absolute",
|
|
563
870
|
"top": 0,
|
|
564
|
-
"width":
|
|
871
|
+
"width": 4,
|
|
565
872
|
"zIndex": 2,
|
|
566
873
|
},
|
|
567
874
|
undefined,
|
|
@@ -594,11 +901,11 @@ exports[`Progress.Circle renders correctly with intent 1`] = `
|
|
|
594
901
|
Object {
|
|
595
902
|
"backgroundColor": "#017d6d",
|
|
596
903
|
"borderRadius": 999,
|
|
597
|
-
"height":
|
|
598
|
-
"left":
|
|
904
|
+
"height": 4,
|
|
905
|
+
"left": 34,
|
|
599
906
|
"position": "absolute",
|
|
600
907
|
"top": 0,
|
|
601
|
-
"width":
|
|
908
|
+
"width": 4,
|
|
602
909
|
"zIndex": 2,
|
|
603
910
|
},
|
|
604
911
|
undefined,
|
|
@@ -612,14 +919,13 @@ exports[`Progress.Circle renders correctly with intent 1`] = `
|
|
|
612
919
|
Array [
|
|
613
920
|
Object {
|
|
614
921
|
"alignItems": "center",
|
|
615
|
-
"backgroundColor": "#ffffff",
|
|
616
922
|
"borderRadius": 999,
|
|
617
|
-
"height":
|
|
923
|
+
"height": 64,
|
|
618
924
|
"justifyContent": "center",
|
|
619
|
-
"left":
|
|
925
|
+
"left": 4,
|
|
620
926
|
"position": "absolute",
|
|
621
|
-
"top":
|
|
622
|
-
"width":
|
|
927
|
+
"top": 4,
|
|
928
|
+
"width": 64,
|
|
623
929
|
"zIndex": 3,
|
|
624
930
|
},
|
|
625
931
|
undefined,
|
|
@@ -642,6 +948,7 @@ exports[`Progress.Circle renders correctly with intent 1`] = `
|
|
|
642
948
|
themeFontSize="large"
|
|
643
949
|
themeFontWeight="regular"
|
|
644
950
|
themeIntent="body"
|
|
951
|
+
themeTypeface="neutral"
|
|
645
952
|
>
|
|
646
953
|
75%
|
|
647
954
|
</Text>
|
|
@@ -23,6 +23,21 @@ describe('Progress.Circle', () => {
|
|
|
23
23
|
expect(getByText('75%')).toBeDefined();
|
|
24
24
|
expect(toJSON()).toMatchSnapshot();
|
|
25
25
|
});
|
|
26
|
+
|
|
27
|
+
it('allows to custom value renderer', () => {
|
|
28
|
+
const { toJSON, getByText, queryAllByTestId } = renderWithTheme(
|
|
29
|
+
<Progress.Circle
|
|
30
|
+
testID="progress-circle"
|
|
31
|
+
intent="success"
|
|
32
|
+
value={75}
|
|
33
|
+
renderValue={(value) => value + 100}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
expect(queryAllByTestId('progress-circle')).toHaveLength(1);
|
|
38
|
+
expect(getByText('175')).toBeDefined();
|
|
39
|
+
expect(toJSON()).toMatchSnapshot();
|
|
40
|
+
});
|
|
26
41
|
});
|
|
27
42
|
|
|
28
43
|
describe('Progress.Bar', () => {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const THEME_INTENT_MAP = {
|
|
2
|
+
primary: 'primary',
|
|
3
|
+
success: 'success',
|
|
4
|
+
warning: 'warning',
|
|
5
|
+
danger: 'danger',
|
|
6
|
+
info: 'info',
|
|
7
|
+
archived: 'archived',
|
|
8
|
+
'primary-inverted': 'primaryInverted',
|
|
9
|
+
'success-inverted': 'successInverted',
|
|
10
|
+
'warning-inverted': 'warningInverted',
|
|
11
|
+
'danger-inverted': 'dangerInverted',
|
|
12
|
+
'info-inverted': 'infoInverted',
|
|
13
|
+
'archived-inverted': 'archivedInverted',
|
|
14
|
+
} as const;
|
|
15
|
+
|
|
16
|
+
export { THEME_INTENT_MAP };
|
|
@@ -50,6 +50,7 @@ exports[`rendering renders correctly when checked 1`] = `
|
|
|
50
50
|
themeFontSize="large"
|
|
51
51
|
themeFontWeight="regular"
|
|
52
52
|
themeIntent="body"
|
|
53
|
+
themeTypeface="neutral"
|
|
53
54
|
>
|
|
54
55
|
Option A
|
|
55
56
|
</Text>
|
|
@@ -149,6 +150,7 @@ exports[`rendering renders correctly when not checked 1`] = `
|
|
|
149
150
|
themeFontSize="large"
|
|
150
151
|
themeFontWeight="regular"
|
|
151
152
|
themeIntent="body"
|
|
153
|
+
themeTypeface="neutral"
|
|
152
154
|
>
|
|
153
155
|
Option A
|
|
154
156
|
</Text>
|
|
@@ -51,6 +51,7 @@ exports[`rendering renders correctly 1`] = `
|
|
|
51
51
|
themeFontSize="large"
|
|
52
52
|
themeFontWeight="regular"
|
|
53
53
|
themeIntent="body"
|
|
54
|
+
themeTypeface="neutral"
|
|
54
55
|
>
|
|
55
56
|
Everything
|
|
56
57
|
</Text>
|
|
@@ -142,6 +143,7 @@ exports[`rendering renders correctly 1`] = `
|
|
|
142
143
|
themeFontSize="large"
|
|
143
144
|
themeFontWeight="regular"
|
|
144
145
|
themeIntent="body"
|
|
146
|
+
themeTypeface="neutral"
|
|
145
147
|
>
|
|
146
148
|
Direct mentions only
|
|
147
149
|
</Text>
|
|
@@ -233,6 +235,7 @@ exports[`rendering renders correctly 1`] = `
|
|
|
233
235
|
themeFontSize="large"
|
|
234
236
|
themeFontWeight="regular"
|
|
235
237
|
themeIntent="body"
|
|
238
|
+
themeTypeface="neutral"
|
|
236
239
|
>
|
|
237
240
|
Nothing
|
|
238
241
|
</Text>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useTheme } from '@emotion/react';
|
|
2
2
|
import { isEmptyContent } from 'hero-editor';
|
|
3
|
-
import * as heroEditorApp from 'hero-editor/dist/app.js';
|
|
4
3
|
import React, {
|
|
5
4
|
forwardRef,
|
|
6
5
|
useCallback,
|
|
@@ -15,6 +14,7 @@ import { Keyboard, TouchableWithoutFeedback } from 'react-native';
|
|
|
15
14
|
import { WebView } from 'react-native-webview';
|
|
16
15
|
import type { ComponentType, ReactElement, Ref } from 'react';
|
|
17
16
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
17
|
+
import heroEditorApp from './heroEditorApp';
|
|
18
18
|
import { isAndroid } from '../../utils/helpers';
|
|
19
19
|
import Icon from '../Icon';
|
|
20
20
|
import {
|