@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
|
@@ -82,6 +82,7 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
|
|
|
82
82
|
themeFontSize="small"
|
|
83
83
|
themeFontWeight="regular"
|
|
84
84
|
themeIntent="body"
|
|
85
|
+
themeTypeface="neutral"
|
|
85
86
|
themeVariant="filled"
|
|
86
87
|
>
|
|
87
88
|
*
|
|
@@ -108,6 +109,7 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
|
|
|
108
109
|
themeFontSize="small"
|
|
109
110
|
themeFontWeight="regular"
|
|
110
111
|
themeIntent="body"
|
|
112
|
+
themeTypeface="neutral"
|
|
111
113
|
themeVariant="filled"
|
|
112
114
|
>
|
|
113
115
|
Amount (AUD)
|
|
@@ -221,6 +223,7 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
|
|
|
221
223
|
themeFontSize="small"
|
|
222
224
|
themeFontWeight="regular"
|
|
223
225
|
themeIntent="body"
|
|
226
|
+
themeTypeface="neutral"
|
|
224
227
|
themeVariant="filled"
|
|
225
228
|
>
|
|
226
229
|
4
|
|
@@ -249,6 +252,7 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
|
|
|
249
252
|
themeFontSize="medium"
|
|
250
253
|
themeFontWeight="regular"
|
|
251
254
|
themeIntent="body"
|
|
255
|
+
themeTypeface="neutral"
|
|
252
256
|
>
|
|
253
257
|
This is helper text
|
|
254
258
|
</Text>
|
|
@@ -338,6 +342,7 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
|
|
|
338
342
|
themeFontSize="small"
|
|
339
343
|
themeFontWeight="regular"
|
|
340
344
|
themeIntent="body"
|
|
345
|
+
themeTypeface="neutral"
|
|
341
346
|
themeVariant="filled"
|
|
342
347
|
>
|
|
343
348
|
*
|
|
@@ -364,6 +369,7 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
|
|
|
364
369
|
themeFontSize="small"
|
|
365
370
|
themeFontWeight="regular"
|
|
366
371
|
themeIntent="body"
|
|
372
|
+
themeTypeface="neutral"
|
|
367
373
|
themeVariant="filled"
|
|
368
374
|
>
|
|
369
375
|
Amount (AUD)
|
|
@@ -478,6 +484,7 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
|
|
|
478
484
|
themeFontSize="small"
|
|
479
485
|
themeFontWeight="regular"
|
|
480
486
|
themeIntent="body"
|
|
487
|
+
themeTypeface="neutral"
|
|
481
488
|
themeVariant="filled"
|
|
482
489
|
>
|
|
483
490
|
4
|
|
@@ -506,6 +513,7 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
|
|
|
506
513
|
themeFontSize="medium"
|
|
507
514
|
themeFontWeight="regular"
|
|
508
515
|
themeIntent="body"
|
|
516
|
+
themeTypeface="neutral"
|
|
509
517
|
>
|
|
510
518
|
This is helper text
|
|
511
519
|
</Text>
|
|
@@ -596,6 +604,7 @@ exports[`TextInput disabled renders correctly 1`] = `
|
|
|
596
604
|
themeFontSize="small"
|
|
597
605
|
themeFontWeight="regular"
|
|
598
606
|
themeIntent="body"
|
|
607
|
+
themeTypeface="neutral"
|
|
599
608
|
themeVariant="disabled"
|
|
600
609
|
>
|
|
601
610
|
*
|
|
@@ -622,6 +631,7 @@ exports[`TextInput disabled renders correctly 1`] = `
|
|
|
622
631
|
themeFontSize="small"
|
|
623
632
|
themeFontWeight="regular"
|
|
624
633
|
themeIntent="body"
|
|
634
|
+
themeTypeface="neutral"
|
|
625
635
|
themeVariant="disabled"
|
|
626
636
|
>
|
|
627
637
|
Amount (AUD)
|
|
@@ -809,6 +819,7 @@ exports[`TextInput error renders correctly 1`] = `
|
|
|
809
819
|
themeFontSize="medium"
|
|
810
820
|
themeFontWeight="regular"
|
|
811
821
|
themeIntent="body"
|
|
822
|
+
themeTypeface="neutral"
|
|
812
823
|
themeVariant="error"
|
|
813
824
|
>
|
|
814
825
|
*
|
|
@@ -839,6 +850,7 @@ exports[`TextInput error renders correctly 1`] = `
|
|
|
839
850
|
themeFontSize="medium"
|
|
840
851
|
themeFontWeight="regular"
|
|
841
852
|
themeIntent="body"
|
|
853
|
+
themeTypeface="neutral"
|
|
842
854
|
themeVariant="error"
|
|
843
855
|
>
|
|
844
856
|
Amount (AUD)
|
|
@@ -947,6 +959,7 @@ exports[`TextInput error renders correctly 1`] = `
|
|
|
947
959
|
themeFontSize="medium"
|
|
948
960
|
themeFontWeight="regular"
|
|
949
961
|
themeIntent="body"
|
|
962
|
+
themeTypeface="neutral"
|
|
950
963
|
>
|
|
951
964
|
This field is required
|
|
952
965
|
</Text>
|
|
@@ -1039,6 +1052,7 @@ exports[`TextInput filled renders correctly 1`] = `
|
|
|
1039
1052
|
themeFontSize="small"
|
|
1040
1053
|
themeFontWeight="regular"
|
|
1041
1054
|
themeIntent="body"
|
|
1055
|
+
themeTypeface="neutral"
|
|
1042
1056
|
themeVariant="filled"
|
|
1043
1057
|
>
|
|
1044
1058
|
Amount (AUD)
|
|
@@ -1256,6 +1270,7 @@ exports[`TextInput helper text renders correctly 1`] = `
|
|
|
1256
1270
|
themeFontSize="medium"
|
|
1257
1271
|
themeFontWeight="regular"
|
|
1258
1272
|
themeIntent="body"
|
|
1273
|
+
themeTypeface="neutral"
|
|
1259
1274
|
themeVariant="default"
|
|
1260
1275
|
>
|
|
1261
1276
|
*
|
|
@@ -1286,6 +1301,7 @@ exports[`TextInput helper text renders correctly 1`] = `
|
|
|
1286
1301
|
themeFontSize="medium"
|
|
1287
1302
|
themeFontWeight="regular"
|
|
1288
1303
|
themeIntent="body"
|
|
1304
|
+
themeTypeface="neutral"
|
|
1289
1305
|
themeVariant="default"
|
|
1290
1306
|
>
|
|
1291
1307
|
Amount (AUD)
|
|
@@ -1362,6 +1378,7 @@ exports[`TextInput helper text renders correctly 1`] = `
|
|
|
1362
1378
|
themeFontSize="medium"
|
|
1363
1379
|
themeFontWeight="regular"
|
|
1364
1380
|
themeIntent="body"
|
|
1381
|
+
themeTypeface="neutral"
|
|
1365
1382
|
>
|
|
1366
1383
|
This is helper text
|
|
1367
1384
|
</Text>
|
|
@@ -1489,6 +1506,7 @@ exports[`TextInput idle renders correctly 1`] = `
|
|
|
1489
1506
|
themeFontSize="medium"
|
|
1490
1507
|
themeFontWeight="regular"
|
|
1491
1508
|
themeIntent="body"
|
|
1509
|
+
themeTypeface="neutral"
|
|
1492
1510
|
themeVariant="default"
|
|
1493
1511
|
>
|
|
1494
1512
|
Amount (AUD)
|
|
@@ -1676,6 +1694,7 @@ exports[`TextInput idle with suffix and prefix are React Element renders correct
|
|
|
1676
1694
|
themeFontSize="medium"
|
|
1677
1695
|
themeFontWeight="regular"
|
|
1678
1696
|
themeIntent="body"
|
|
1697
|
+
themeTypeface="neutral"
|
|
1679
1698
|
themeVariant="default"
|
|
1680
1699
|
>
|
|
1681
1700
|
*
|
|
@@ -1706,6 +1725,7 @@ exports[`TextInput idle with suffix and prefix are React Element renders correct
|
|
|
1706
1725
|
themeFontSize="medium"
|
|
1707
1726
|
themeFontWeight="regular"
|
|
1708
1727
|
themeIntent="body"
|
|
1728
|
+
themeTypeface="neutral"
|
|
1709
1729
|
themeVariant="default"
|
|
1710
1730
|
>
|
|
1711
1731
|
Amount (AUD)
|
|
@@ -2021,6 +2041,7 @@ exports[`TextInput max length renders correctly 1`] = `
|
|
|
2021
2041
|
themeFontSize="small"
|
|
2022
2042
|
themeFontWeight="regular"
|
|
2023
2043
|
themeIntent="body"
|
|
2044
|
+
themeTypeface="neutral"
|
|
2024
2045
|
themeVariant="error"
|
|
2025
2046
|
>
|
|
2026
2047
|
*
|
|
@@ -2047,6 +2068,7 @@ exports[`TextInput max length renders correctly 1`] = `
|
|
|
2047
2068
|
themeFontSize="small"
|
|
2048
2069
|
themeFontWeight="regular"
|
|
2049
2070
|
themeIntent="body"
|
|
2071
|
+
themeTypeface="neutral"
|
|
2050
2072
|
themeVariant="error"
|
|
2051
2073
|
>
|
|
2052
2074
|
Shout out
|
|
@@ -2172,6 +2194,7 @@ exports[`TextInput max length renders correctly 1`] = `
|
|
|
2172
2194
|
themeFontSize="medium"
|
|
2173
2195
|
themeFontWeight="regular"
|
|
2174
2196
|
themeIntent="body"
|
|
2197
|
+
themeTypeface="neutral"
|
|
2175
2198
|
>
|
|
2176
2199
|
must not exceed character limit
|
|
2177
2200
|
</Text>
|
|
@@ -2203,6 +2226,7 @@ exports[`TextInput max length renders correctly 1`] = `
|
|
|
2203
2226
|
themeFontSize="small"
|
|
2204
2227
|
themeFontWeight="regular"
|
|
2205
2228
|
themeIntent="body"
|
|
2229
|
+
themeTypeface="neutral"
|
|
2206
2230
|
themeVariant="error"
|
|
2207
2231
|
>
|
|
2208
2232
|
18
|
|
@@ -2327,6 +2351,7 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
|
|
|
2327
2351
|
themeFontSize="medium"
|
|
2328
2352
|
themeFontWeight="regular"
|
|
2329
2353
|
themeIntent="body"
|
|
2354
|
+
themeTypeface="neutral"
|
|
2330
2355
|
themeVariant="default"
|
|
2331
2356
|
>
|
|
2332
2357
|
*
|
|
@@ -2357,6 +2382,7 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
|
|
|
2357
2382
|
themeFontSize="medium"
|
|
2358
2383
|
themeFontWeight="regular"
|
|
2359
2384
|
themeIntent="body"
|
|
2385
|
+
themeTypeface="neutral"
|
|
2360
2386
|
themeVariant="default"
|
|
2361
2387
|
>
|
|
2362
2388
|
Amount (AUD)
|
|
@@ -2433,6 +2459,7 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
|
|
|
2433
2459
|
themeFontSize="medium"
|
|
2434
2460
|
themeFontWeight="regular"
|
|
2435
2461
|
themeIntent="body"
|
|
2462
|
+
themeTypeface="neutral"
|
|
2436
2463
|
>
|
|
2437
2464
|
This is helper text
|
|
2438
2465
|
</Text>
|
|
@@ -2522,6 +2549,7 @@ exports[`TextInput readonly renders correctly 1`] = `
|
|
|
2522
2549
|
themeFontSize="small"
|
|
2523
2550
|
themeFontWeight="regular"
|
|
2524
2551
|
themeIntent="body"
|
|
2552
|
+
themeTypeface="neutral"
|
|
2525
2553
|
themeVariant="readonly"
|
|
2526
2554
|
>
|
|
2527
2555
|
*
|
|
@@ -2548,6 +2576,7 @@ exports[`TextInput readonly renders correctly 1`] = `
|
|
|
2548
2576
|
themeFontSize="small"
|
|
2549
2577
|
themeFontWeight="regular"
|
|
2550
2578
|
themeIntent="body"
|
|
2579
|
+
themeTypeface="neutral"
|
|
2551
2580
|
themeVariant="readonly"
|
|
2552
2581
|
>
|
|
2553
2582
|
Amount (AUD)
|
|
@@ -2765,6 +2794,7 @@ exports[`TextInput required renders correctly 1`] = `
|
|
|
2765
2794
|
themeFontSize="medium"
|
|
2766
2795
|
themeFontWeight="regular"
|
|
2767
2796
|
themeIntent="body"
|
|
2797
|
+
themeTypeface="neutral"
|
|
2768
2798
|
themeVariant="default"
|
|
2769
2799
|
>
|
|
2770
2800
|
*
|
|
@@ -2795,6 +2825,7 @@ exports[`TextInput required renders correctly 1`] = `
|
|
|
2795
2825
|
themeFontSize="medium"
|
|
2796
2826
|
themeFontWeight="regular"
|
|
2797
2827
|
themeIntent="body"
|
|
2828
|
+
themeTypeface="neutral"
|
|
2798
2829
|
themeVariant="default"
|
|
2799
2830
|
>
|
|
2800
2831
|
Amount (AUD)
|
|
@@ -103,6 +103,7 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
103
103
|
themeFontSize="small"
|
|
104
104
|
themeFontWeight="regular"
|
|
105
105
|
themeIntent="body"
|
|
106
|
+
themeTypeface="neutral"
|
|
106
107
|
themeVariant="filled"
|
|
107
108
|
>
|
|
108
109
|
Break time
|
|
@@ -365,6 +366,7 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
365
366
|
themeFontSize="large"
|
|
366
367
|
themeFontWeight="semi-bold"
|
|
367
368
|
themeIntent="body"
|
|
369
|
+
themeTypeface="neutral"
|
|
368
370
|
>
|
|
369
371
|
Break time
|
|
370
372
|
</Text>
|
|
@@ -516,6 +518,7 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
516
518
|
themeFontSize="large"
|
|
517
519
|
themeFontWeight="semi-bold"
|
|
518
520
|
themeIntent="primary"
|
|
521
|
+
themeTypeface="neutral"
|
|
519
522
|
>
|
|
520
523
|
Confirm
|
|
521
524
|
</Text>
|
|
@@ -98,6 +98,7 @@ exports[`Toast Icon render custom icon correctly 1`] = `
|
|
|
98
98
|
themeFontSize="medium"
|
|
99
99
|
themeFontWeight="regular"
|
|
100
100
|
themeIntent="body"
|
|
101
|
+
themeTypeface="neutral"
|
|
101
102
|
>
|
|
102
103
|
Content
|
|
103
104
|
</Text>
|
|
@@ -204,6 +205,7 @@ exports[`Toast renders correctly when intent is error 1`] = `
|
|
|
204
205
|
themeFontSize="medium"
|
|
205
206
|
themeFontWeight="regular"
|
|
206
207
|
themeIntent="body"
|
|
208
|
+
themeTypeface="neutral"
|
|
207
209
|
>
|
|
208
210
|
Toast Content
|
|
209
211
|
</Text>
|
|
@@ -246,6 +248,7 @@ exports[`Toast renders correctly when intent is error 1`] = `
|
|
|
246
248
|
themeFontSize="medium"
|
|
247
249
|
themeFontWeight="semi-bold"
|
|
248
250
|
themeIntent="body"
|
|
251
|
+
themeTypeface="neutral"
|
|
249
252
|
>
|
|
250
253
|
Action
|
|
251
254
|
</Text>
|
|
@@ -351,6 +354,7 @@ exports[`Toast renders correctly when intent is info 1`] = `
|
|
|
351
354
|
themeFontSize="medium"
|
|
352
355
|
themeFontWeight="regular"
|
|
353
356
|
themeIntent="body"
|
|
357
|
+
themeTypeface="neutral"
|
|
354
358
|
>
|
|
355
359
|
Toast Content
|
|
356
360
|
</Text>
|
|
@@ -393,6 +397,7 @@ exports[`Toast renders correctly when intent is info 1`] = `
|
|
|
393
397
|
themeFontSize="medium"
|
|
394
398
|
themeFontWeight="semi-bold"
|
|
395
399
|
themeIntent="body"
|
|
400
|
+
themeTypeface="neutral"
|
|
396
401
|
>
|
|
397
402
|
Action
|
|
398
403
|
</Text>
|
|
@@ -471,6 +476,7 @@ exports[`Toast renders correctly when intent is notification 1`] = `
|
|
|
471
476
|
themeFontSize="medium"
|
|
472
477
|
themeFontWeight="regular"
|
|
473
478
|
themeIntent="body"
|
|
479
|
+
themeTypeface="neutral"
|
|
474
480
|
>
|
|
475
481
|
Toast Content
|
|
476
482
|
</Text>
|
|
@@ -513,6 +519,7 @@ exports[`Toast renders correctly when intent is notification 1`] = `
|
|
|
513
519
|
themeFontSize="medium"
|
|
514
520
|
themeFontWeight="semi-bold"
|
|
515
521
|
themeIntent="body"
|
|
522
|
+
themeTypeface="neutral"
|
|
516
523
|
>
|
|
517
524
|
Action
|
|
518
525
|
</Text>
|
|
@@ -591,6 +598,7 @@ exports[`Toast renders correctly when intent is snackbar 1`] = `
|
|
|
591
598
|
themeFontSize="medium"
|
|
592
599
|
themeFontWeight="regular"
|
|
593
600
|
themeIntent="inverted"
|
|
601
|
+
themeTypeface="neutral"
|
|
594
602
|
>
|
|
595
603
|
Toast Content
|
|
596
604
|
</Text>
|
|
@@ -633,6 +641,7 @@ exports[`Toast renders correctly when intent is snackbar 1`] = `
|
|
|
633
641
|
themeFontSize="medium"
|
|
634
642
|
themeFontWeight="semi-bold"
|
|
635
643
|
themeIntent="inverted"
|
|
644
|
+
themeTypeface="neutral"
|
|
636
645
|
>
|
|
637
646
|
Action
|
|
638
647
|
</Text>
|
|
@@ -738,6 +747,7 @@ exports[`Toast renders correctly when intent is success 1`] = `
|
|
|
738
747
|
themeFontSize="medium"
|
|
739
748
|
themeFontWeight="regular"
|
|
740
749
|
themeIntent="body"
|
|
750
|
+
themeTypeface="neutral"
|
|
741
751
|
>
|
|
742
752
|
Toast Content
|
|
743
753
|
</Text>
|
|
@@ -780,6 +790,7 @@ exports[`Toast renders correctly when intent is success 1`] = `
|
|
|
780
790
|
themeFontSize="medium"
|
|
781
791
|
themeFontWeight="semi-bold"
|
|
782
792
|
themeIntent="body"
|
|
793
|
+
themeTypeface="neutral"
|
|
783
794
|
>
|
|
784
795
|
Action
|
|
785
796
|
</Text>
|
|
@@ -885,6 +896,7 @@ exports[`Toast renders correctly when intent is warning 1`] = `
|
|
|
885
896
|
themeFontSize="medium"
|
|
886
897
|
themeFontWeight="regular"
|
|
887
898
|
themeIntent="body"
|
|
899
|
+
themeTypeface="neutral"
|
|
888
900
|
>
|
|
889
901
|
Toast Content
|
|
890
902
|
</Text>
|
|
@@ -927,6 +939,7 @@ exports[`Toast renders correctly when intent is warning 1`] = `
|
|
|
927
939
|
themeFontSize="medium"
|
|
928
940
|
themeFontWeight="semi-bold"
|
|
929
941
|
themeIntent="body"
|
|
942
|
+
themeTypeface="neutral"
|
|
930
943
|
>
|
|
931
944
|
Action
|
|
932
945
|
</Text>
|
|
@@ -67,6 +67,7 @@ exports[`ToolbarGroup renders correctly with when align is center 1`] = `
|
|
|
67
67
|
themeFontSize="small"
|
|
68
68
|
themeFontWeight="semi-bold"
|
|
69
69
|
themeIntent="primary"
|
|
70
|
+
themeTypeface="neutral"
|
|
70
71
|
>
|
|
71
72
|
Discard
|
|
72
73
|
</Text>
|
|
@@ -123,6 +124,7 @@ exports[`ToolbarGroup renders correctly with when align is center 1`] = `
|
|
|
123
124
|
themeFontSize="small"
|
|
124
125
|
themeFontWeight="semi-bold"
|
|
125
126
|
themeIntent="primary"
|
|
127
|
+
themeTypeface="neutral"
|
|
126
128
|
>
|
|
127
129
|
Print
|
|
128
130
|
</Text>
|
|
@@ -197,6 +199,7 @@ exports[`ToolbarGroup renders correctly with when align is left 1`] = `
|
|
|
197
199
|
themeFontSize="small"
|
|
198
200
|
themeFontWeight="semi-bold"
|
|
199
201
|
themeIntent="primary"
|
|
202
|
+
themeTypeface="neutral"
|
|
200
203
|
>
|
|
201
204
|
Discard
|
|
202
205
|
</Text>
|
|
@@ -253,6 +256,7 @@ exports[`ToolbarGroup renders correctly with when align is left 1`] = `
|
|
|
253
256
|
themeFontSize="small"
|
|
254
257
|
themeFontWeight="semi-bold"
|
|
255
258
|
themeIntent="primary"
|
|
259
|
+
themeTypeface="neutral"
|
|
256
260
|
>
|
|
257
261
|
Print
|
|
258
262
|
</Text>
|
|
@@ -327,6 +331,7 @@ exports[`ToolbarGroup renders correctly with when align is right 1`] = `
|
|
|
327
331
|
themeFontSize="small"
|
|
328
332
|
themeFontWeight="semi-bold"
|
|
329
333
|
themeIntent="primary"
|
|
334
|
+
themeTypeface="neutral"
|
|
330
335
|
>
|
|
331
336
|
Discard
|
|
332
337
|
</Text>
|
|
@@ -383,6 +388,7 @@ exports[`ToolbarGroup renders correctly with when align is right 1`] = `
|
|
|
383
388
|
themeFontSize="small"
|
|
384
389
|
themeFontWeight="semi-bold"
|
|
385
390
|
themeIntent="primary"
|
|
391
|
+
themeTypeface="neutral"
|
|
386
392
|
>
|
|
387
393
|
Print
|
|
388
394
|
</Text>
|
|
@@ -53,6 +53,7 @@ exports[`ToolbarItems renders correctly when disabled 1`] = `
|
|
|
53
53
|
themeFontSize="small"
|
|
54
54
|
themeFontWeight="semi-bold"
|
|
55
55
|
themeIntent="subdued"
|
|
56
|
+
themeTypeface="neutral"
|
|
56
57
|
>
|
|
57
58
|
Action
|
|
58
59
|
</Text>
|
|
@@ -112,6 +113,7 @@ exports[`ToolbarItems renders correctly when intent is danger 1`] = `
|
|
|
112
113
|
themeFontSize="small"
|
|
113
114
|
themeFontWeight="semi-bold"
|
|
114
115
|
themeIntent="danger"
|
|
116
|
+
themeTypeface="neutral"
|
|
115
117
|
>
|
|
116
118
|
Action
|
|
117
119
|
</Text>
|
|
@@ -171,6 +173,7 @@ exports[`ToolbarItems renders correctly when intent is info 1`] = `
|
|
|
171
173
|
themeFontSize="small"
|
|
172
174
|
themeFontWeight="semi-bold"
|
|
173
175
|
themeIntent="info"
|
|
176
|
+
themeTypeface="neutral"
|
|
174
177
|
>
|
|
175
178
|
Action
|
|
176
179
|
</Text>
|
|
@@ -230,6 +233,7 @@ exports[`ToolbarItems renders correctly when intent is primary 1`] = `
|
|
|
230
233
|
themeFontSize="small"
|
|
231
234
|
themeFontWeight="semi-bold"
|
|
232
235
|
themeIntent="primary"
|
|
236
|
+
themeTypeface="neutral"
|
|
233
237
|
>
|
|
234
238
|
Action
|
|
235
239
|
</Text>
|
|
@@ -289,6 +293,7 @@ exports[`ToolbarItems renders correctly when intent is success 1`] = `
|
|
|
289
293
|
themeFontSize="small"
|
|
290
294
|
themeFontWeight="semi-bold"
|
|
291
295
|
themeIntent="success"
|
|
296
|
+
themeTypeface="neutral"
|
|
292
297
|
>
|
|
293
298
|
Action
|
|
294
299
|
</Text>
|
|
@@ -348,6 +353,7 @@ exports[`ToolbarItems renders correctly when intent is warning 1`] = `
|
|
|
348
353
|
themeFontSize="small"
|
|
349
354
|
themeFontWeight="semi-bold"
|
|
350
355
|
themeIntent="warning"
|
|
356
|
+
themeTypeface="neutral"
|
|
351
357
|
>
|
|
352
358
|
Action
|
|
353
359
|
</Text>
|
|
@@ -26,7 +26,8 @@ const StyledText = styled(Text)<{
|
|
|
26
26
|
| 'warning'
|
|
27
27
|
| 'danger'
|
|
28
28
|
| 'inverted';
|
|
29
|
-
|
|
29
|
+
themeTypeface: 'neutral' | 'playful';
|
|
30
|
+
}>(({ themeFontSize, themeFontWeight, themeIntent, themeTypeface, theme }) => {
|
|
30
31
|
const sizeStyles = {
|
|
31
32
|
fontSize: theme.__hd__.typography.fontSizes[themeFontSize],
|
|
32
33
|
lineHeight: theme.__hd__.typography.lineHeights[themeFontSize],
|
|
@@ -35,7 +36,10 @@ const StyledText = styled(Text)<{
|
|
|
35
36
|
|
|
36
37
|
return {
|
|
37
38
|
...sizeStyles,
|
|
38
|
-
fontFamily:
|
|
39
|
+
fontFamily:
|
|
40
|
+
theme.__hd__.typography.fonts[themeTypeface][
|
|
41
|
+
FONTWEIGHT_MAP[themeFontWeight]
|
|
42
|
+
],
|
|
39
43
|
color: theme.__hd__.typography.colors[themeIntent],
|
|
40
44
|
};
|
|
41
45
|
});
|
|
@@ -17,6 +17,7 @@ describe('StyledText', () => {
|
|
|
17
17
|
themeFontSize={fontSize}
|
|
18
18
|
themeFontWeight="regular"
|
|
19
19
|
themeIntent="body"
|
|
20
|
+
themeTypeface="neutral"
|
|
20
21
|
>
|
|
21
22
|
This is a test
|
|
22
23
|
</StyledText>
|
|
@@ -36,6 +37,7 @@ describe('StyledText', () => {
|
|
|
36
37
|
themeFontSize="medium"
|
|
37
38
|
themeFontWeight={fontWeight}
|
|
38
39
|
themeIntent="body"
|
|
40
|
+
themeTypeface="neutral"
|
|
39
41
|
>
|
|
40
42
|
This is a test
|
|
41
43
|
</StyledText>
|
|
@@ -60,6 +62,26 @@ describe('StyledText', () => {
|
|
|
60
62
|
themeFontSize="medium"
|
|
61
63
|
themeFontWeight="regular"
|
|
62
64
|
themeIntent={intent}
|
|
65
|
+
themeTypeface="neutral"
|
|
66
|
+
>
|
|
67
|
+
This is a test
|
|
68
|
+
</StyledText>
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
expect(toJSON()).toMatchSnapshot();
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it.each`
|
|
75
|
+
typeface
|
|
76
|
+
${'neutral'}
|
|
77
|
+
${'playful'}
|
|
78
|
+
`('has $typeface typeface style', ({ typeface }) => {
|
|
79
|
+
const { toJSON } = renderWithTheme(
|
|
80
|
+
<StyledText
|
|
81
|
+
themeFontSize="medium"
|
|
82
|
+
themeFontWeight="regular"
|
|
83
|
+
themeIntent="body"
|
|
84
|
+
themeTypeface={typeface}
|
|
63
85
|
>
|
|
64
86
|
This is a test
|
|
65
87
|
</StyledText>
|