@hero-design/rn 8.110.0 → 8.111.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 +3 -3
- package/CHANGELOG.md +18 -0
- package/assets/fonts/BeVietnamPro-BoldItalic.ttf +0 -0
- package/assets/fonts/BeVietnamPro-LightItalic.ttf +0 -0
- package/assets/fonts/BeVietnamPro-RegularItalic.ttf +0 -0
- package/assets/fonts/BeVietnamPro-SemiBoldItalic.ttf +0 -0
- package/assets/fonts/Saiga-LightItalic.otf +0 -0
- package/assets/fonts/Saiga-MediumItalic.otf +0 -0
- package/assets/fonts/Saiga-RegularItalic.otf +0 -0
- package/es/index.js +86 -40
- package/lib/index.js +86 -40
- package/package.json +7 -7
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +48 -24
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +72 -36
- package/src/components/Accordion/index.tsx +6 -1
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +13 -0
- package/src/components/Alert/index.tsx +10 -2
- package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +70 -0
- package/src/components/AppCue/__tests__/__snapshots__/StyledAppCue.tsx.snap +121 -97
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +2 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +31 -0
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +1 -0
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +8 -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 +8 -3
- package/src/components/Button/Button.tsx +10 -4
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +51 -18
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +13 -0
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRangeConnector.spec.tsx.snap +5 -0
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -0
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +8 -0
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +16 -0
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +20 -0
- package/src/components/Chart/ColumnChart/__tests__/__snapshots__/index.spec.tsx.snap +49 -0
- package/src/components/Chart/Line/__tests__/__snapshots__/index.spec.tsx.snap +60 -0
- package/src/components/Chart/shared/__tests__/__snapshots__/ChartFrame.spec.tsx.snap +62 -0
- package/src/components/Chart/shared/__tests__/__snapshots__/ChartHeader.spec.tsx.snap +2 -0
- package/src/components/Chart/shared/__tests__/__snapshots__/EmptyState.spec.tsx.snap +2 -0
- package/src/components/Chart/shared/__tests__/__snapshots__/XAxis.spec.tsx.snap +12 -0
- package/src/components/Chart/shared/__tests__/__snapshots__/YAxis.spec.tsx.snap +36 -0
- package/src/components/Checkbox/__tests__/__snapshots__/DefaultCheckBox.spec.tsx.snap +4 -0
- package/src/components/Checkbox/__tests__/__snapshots__/InlineCheckBox.spec.tsx.snap +6 -0
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +19 -0
- package/src/components/Chip/index.tsx +15 -8
- package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +8 -5
- package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +20 -12
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +3 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +6 -0
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +13 -9
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
- package/src/components/FAB/Pair/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +2 -0
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/FilterTrigger/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
- package/src/components/FloatingIsland/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
- package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +13 -0
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +4 -0
- package/src/components/Modal/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +5 -0
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/PinInput/index.tsx +6 -1
- package/src/components/Portal/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +3 -0
- package/src/components/Radio/RadioGroup.tsx +6 -1
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +4 -0
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +10 -0
- package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +84 -48
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -0
- package/src/components/Search/SearchOneLine.tsx +6 -0
- package/src/components/Search/SearchTwoLine.tsx +6 -1
- package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +2 -0
- package/src/components/Search/__tests__/__snapshots__/SearchSuffixIcon.spec.tsx.snap +1 -0
- package/src/components/Search/__tests__/__snapshots__/SearchTwoLine.spec.tsx.snap +4 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +7 -0
- package/src/components/SegmentedControl/__tests__/__snapshots__/SegmentedItem.spec.tsx.snap +1 -0
- package/src/components/SegmentedControl/__tests__/__snapshots__/index.spec.tsx.snap +3 -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 +57 -3
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +24 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +45 -3
- package/src/components/StatusScreens/Empty/__tests__/__snapshots__/index.spec.tsx.snap +8 -0
- package/src/components/StatusScreens/Error/__tests__/__snapshots__/index.spec.tsx.snap +13 -0
- package/src/components/StatusScreens/Success/__tests__/__snapshots__/index.spec.tsx.snap +16 -0
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +3 -0
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +2 -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/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +9 -6
- package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +3 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +219 -138
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +102 -62
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +1 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +18 -0
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +10 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +7 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +40 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +3 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +5 -0
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +13 -0
- package/src/components/Toolbar/ToolbarGroup.tsx +18 -4
- package/src/components/Toolbar/__tests__/ToolbarGroup.spec.tsx +34 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +9 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +7 -0
- package/src/components/Typography/Body/StyledBody.tsx +24 -19
- package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +229 -0
- package/src/components/Typography/Body/__tests__/index.spec.tsx +19 -0
- package/src/components/Typography/Body/index.tsx +8 -2
- package/src/components/Typography/Caption/StyledCaption.tsx +15 -8
- package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +219 -0
- package/src/components/Typography/Caption/__tests__/index.spec.tsx +19 -0
- package/src/components/Typography/Caption/index.tsx +18 -10
- package/src/components/Typography/Label/StyledLabel.tsx +16 -6
- package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +8 -0
- package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +126 -0
- package/src/components/Typography/Label/__tests__/index.spec.tsx +12 -0
- package/src/components/Typography/Label/index.tsx +17 -9
- package/src/components/Typography/Title/StyledTitle.tsx +22 -8
- package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +441 -0
- package/src/components/Typography/Title/__tests__/index.spec.tsx +23 -0
- package/src/components/Typography/Title/index.tsx +8 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +24 -10
- package/src/theme/components/typography.ts +12 -10
- package/src/theme/global/typography.ts +9 -0
- package/stats/8.110.1/rn-stats.html +4844 -0
- package/stats/8.111.0/rn-stats.html +4844 -0
- package/types/components/Accordion/index.d.ts +5 -1
- package/types/components/Alert/index.d.ts +8 -2
- package/types/components/Button/Button.d.ts +8 -4
- package/types/components/Chip/index.d.ts +12 -3
- package/types/components/PinInput/index.d.ts +4 -0
- package/types/components/Radio/RadioGroup.d.ts +5 -1
- package/types/components/Radio/index.d.ts +1 -1
- package/types/components/Search/SearchOneLine.d.ts +4 -0
- package/types/components/Search/SearchTwoLine.d.ts +4 -0
- package/types/components/TextInput/StyledTextInput.d.ts +1 -1
- package/types/components/Toolbar/ToolbarGroup.d.ts +11 -3
- package/types/components/Toolbar/index.d.ts +1 -1
- package/types/components/Typography/Body/StyledBody.d.ts +1 -0
- package/types/components/Typography/Body/index.d.ts +6 -2
- package/types/components/Typography/Caption/StyledCaption.d.ts +1 -0
- package/types/components/Typography/Caption/index.d.ts +5 -1
- package/types/components/Typography/Label/StyledLabel.d.ts +1 -0
- package/types/components/Typography/Label/index.d.ts +5 -1
- package/types/components/Typography/Title/StyledTitle.d.ts +1 -0
- package/types/components/Typography/Title/index.d.ts +6 -2
- package/types/theme/components/typography.d.ts +12 -10
- package/types/theme/global/typography.d.ts +3 -0
|
@@ -23,6 +23,7 @@ exports[`Title has archived intent style 1`] = `
|
|
|
23
23
|
]
|
|
24
24
|
}
|
|
25
25
|
themeIntent="archived"
|
|
26
|
+
themeIsItalic={false}
|
|
26
27
|
themeLevel="h1"
|
|
27
28
|
themeTypeface="neutral"
|
|
28
29
|
>
|
|
@@ -74,6 +75,7 @@ exports[`Title has body intent style 1`] = `
|
|
|
74
75
|
]
|
|
75
76
|
}
|
|
76
77
|
themeIntent="body"
|
|
78
|
+
themeIsItalic={false}
|
|
77
79
|
themeLevel="h1"
|
|
78
80
|
themeTypeface="neutral"
|
|
79
81
|
>
|
|
@@ -125,6 +127,7 @@ exports[`Title has danger intent style 1`] = `
|
|
|
125
127
|
]
|
|
126
128
|
}
|
|
127
129
|
themeIntent="danger"
|
|
130
|
+
themeIsItalic={false}
|
|
128
131
|
themeLevel="h1"
|
|
129
132
|
themeTypeface="neutral"
|
|
130
133
|
>
|
|
@@ -176,6 +179,7 @@ exports[`Title has disabled intent style 1`] = `
|
|
|
176
179
|
]
|
|
177
180
|
}
|
|
178
181
|
themeIntent="disabled"
|
|
182
|
+
themeIsItalic={false}
|
|
179
183
|
themeLevel="h1"
|
|
180
184
|
themeTypeface="neutral"
|
|
181
185
|
>
|
|
@@ -227,6 +231,7 @@ exports[`Title has h1 level and neutral typeface style 1`] = `
|
|
|
227
231
|
]
|
|
228
232
|
}
|
|
229
233
|
themeIntent="body"
|
|
234
|
+
themeIsItalic={false}
|
|
230
235
|
themeLevel="h1"
|
|
231
236
|
themeTypeface="neutral"
|
|
232
237
|
>
|
|
@@ -278,6 +283,7 @@ exports[`Title has h1 level and playful typeface style 1`] = `
|
|
|
278
283
|
]
|
|
279
284
|
}
|
|
280
285
|
themeIntent="body"
|
|
286
|
+
themeIsItalic={false}
|
|
281
287
|
themeLevel="h1"
|
|
282
288
|
themeTypeface="playful"
|
|
283
289
|
>
|
|
@@ -329,6 +335,7 @@ exports[`Title has h2 level and neutral typeface style 1`] = `
|
|
|
329
335
|
]
|
|
330
336
|
}
|
|
331
337
|
themeIntent="body"
|
|
338
|
+
themeIsItalic={false}
|
|
332
339
|
themeLevel="h2"
|
|
333
340
|
themeTypeface="neutral"
|
|
334
341
|
>
|
|
@@ -380,6 +387,7 @@ exports[`Title has h2 level and playful typeface style 1`] = `
|
|
|
380
387
|
]
|
|
381
388
|
}
|
|
382
389
|
themeIntent="body"
|
|
390
|
+
themeIsItalic={false}
|
|
383
391
|
themeLevel="h2"
|
|
384
392
|
themeTypeface="playful"
|
|
385
393
|
>
|
|
@@ -431,6 +439,7 @@ exports[`Title has h3 level and neutral typeface style 1`] = `
|
|
|
431
439
|
]
|
|
432
440
|
}
|
|
433
441
|
themeIntent="body"
|
|
442
|
+
themeIsItalic={false}
|
|
434
443
|
themeLevel="h3"
|
|
435
444
|
themeTypeface="neutral"
|
|
436
445
|
>
|
|
@@ -482,6 +491,7 @@ exports[`Title has h3 level and playful typeface style 1`] = `
|
|
|
482
491
|
]
|
|
483
492
|
}
|
|
484
493
|
themeIntent="body"
|
|
494
|
+
themeIsItalic={false}
|
|
485
495
|
themeLevel="h3"
|
|
486
496
|
themeTypeface="playful"
|
|
487
497
|
>
|
|
@@ -533,6 +543,7 @@ exports[`Title has h4 level and neutral typeface style 1`] = `
|
|
|
533
543
|
]
|
|
534
544
|
}
|
|
535
545
|
themeIntent="body"
|
|
546
|
+
themeIsItalic={false}
|
|
536
547
|
themeLevel="h4"
|
|
537
548
|
themeTypeface="neutral"
|
|
538
549
|
>
|
|
@@ -584,6 +595,7 @@ exports[`Title has h4 level and playful typeface style 1`] = `
|
|
|
584
595
|
]
|
|
585
596
|
}
|
|
586
597
|
themeIntent="body"
|
|
598
|
+
themeIsItalic={false}
|
|
587
599
|
themeLevel="h4"
|
|
588
600
|
themeTypeface="playful"
|
|
589
601
|
>
|
|
@@ -635,6 +647,7 @@ exports[`Title has h5 level and neutral typeface style 1`] = `
|
|
|
635
647
|
]
|
|
636
648
|
}
|
|
637
649
|
themeIntent="body"
|
|
650
|
+
themeIsItalic={false}
|
|
638
651
|
themeLevel="h5"
|
|
639
652
|
themeTypeface="neutral"
|
|
640
653
|
>
|
|
@@ -686,6 +699,7 @@ exports[`Title has h5 level and playful typeface style 1`] = `
|
|
|
686
699
|
]
|
|
687
700
|
}
|
|
688
701
|
themeIntent="body"
|
|
702
|
+
themeIsItalic={false}
|
|
689
703
|
themeLevel="h5"
|
|
690
704
|
themeTypeface="playful"
|
|
691
705
|
>
|
|
@@ -737,6 +751,7 @@ exports[`Title has h6 level and neutral typeface style 1`] = `
|
|
|
737
751
|
]
|
|
738
752
|
}
|
|
739
753
|
themeIntent="body"
|
|
754
|
+
themeIsItalic={false}
|
|
740
755
|
themeLevel="h6"
|
|
741
756
|
themeTypeface="neutral"
|
|
742
757
|
>
|
|
@@ -788,6 +803,7 @@ exports[`Title has h6 level and playful typeface style 1`] = `
|
|
|
788
803
|
]
|
|
789
804
|
}
|
|
790
805
|
themeIntent="body"
|
|
806
|
+
themeIsItalic={false}
|
|
791
807
|
themeLevel="h6"
|
|
792
808
|
themeTypeface="playful"
|
|
793
809
|
>
|
|
@@ -839,6 +855,7 @@ exports[`Title has inactive intent style 1`] = `
|
|
|
839
855
|
]
|
|
840
856
|
}
|
|
841
857
|
themeIntent="inactive"
|
|
858
|
+
themeIsItalic={false}
|
|
842
859
|
themeLevel="h1"
|
|
843
860
|
themeTypeface="neutral"
|
|
844
861
|
>
|
|
@@ -890,6 +907,7 @@ exports[`Title has info intent style 1`] = `
|
|
|
890
907
|
]
|
|
891
908
|
}
|
|
892
909
|
themeIntent="info"
|
|
910
|
+
themeIsItalic={false}
|
|
893
911
|
themeLevel="h1"
|
|
894
912
|
themeTypeface="neutral"
|
|
895
913
|
>
|
|
@@ -941,6 +959,7 @@ exports[`Title has inverted intent style 1`] = `
|
|
|
941
959
|
]
|
|
942
960
|
}
|
|
943
961
|
themeIntent="inverted"
|
|
962
|
+
themeIsItalic={false}
|
|
944
963
|
themeLevel="h1"
|
|
945
964
|
themeTypeface="neutral"
|
|
946
965
|
>
|
|
@@ -992,6 +1011,7 @@ exports[`Title has muted intent style 1`] = `
|
|
|
992
1011
|
]
|
|
993
1012
|
}
|
|
994
1013
|
themeIntent="muted"
|
|
1014
|
+
themeIsItalic={false}
|
|
995
1015
|
themeLevel="h1"
|
|
996
1016
|
themeTypeface="neutral"
|
|
997
1017
|
>
|
|
@@ -1043,6 +1063,7 @@ exports[`Title has primary intent style 1`] = `
|
|
|
1043
1063
|
]
|
|
1044
1064
|
}
|
|
1045
1065
|
themeIntent="primary"
|
|
1066
|
+
themeIsItalic={false}
|
|
1046
1067
|
themeLevel="h1"
|
|
1047
1068
|
themeTypeface="neutral"
|
|
1048
1069
|
>
|
|
@@ -1094,6 +1115,7 @@ exports[`Title has secondary intent style 1`] = `
|
|
|
1094
1115
|
]
|
|
1095
1116
|
}
|
|
1096
1117
|
themeIntent="secondary"
|
|
1118
|
+
themeIsItalic={false}
|
|
1097
1119
|
themeLevel="h1"
|
|
1098
1120
|
themeTypeface="neutral"
|
|
1099
1121
|
>
|
|
@@ -1145,6 +1167,7 @@ exports[`Title has subdued intent style 1`] = `
|
|
|
1145
1167
|
]
|
|
1146
1168
|
}
|
|
1147
1169
|
themeIntent="subdued"
|
|
1170
|
+
themeIsItalic={false}
|
|
1148
1171
|
themeLevel="h1"
|
|
1149
1172
|
themeTypeface="neutral"
|
|
1150
1173
|
>
|
|
@@ -1196,6 +1219,7 @@ exports[`Title has success intent style 1`] = `
|
|
|
1196
1219
|
]
|
|
1197
1220
|
}
|
|
1198
1221
|
themeIntent="success"
|
|
1222
|
+
themeIsItalic={false}
|
|
1199
1223
|
themeLevel="h1"
|
|
1200
1224
|
themeTypeface="neutral"
|
|
1201
1225
|
>
|
|
@@ -1247,6 +1271,7 @@ exports[`Title has warning intent style 1`] = `
|
|
|
1247
1271
|
]
|
|
1248
1272
|
}
|
|
1249
1273
|
themeIntent="warning"
|
|
1274
|
+
themeIsItalic={false}
|
|
1250
1275
|
themeLevel="h1"
|
|
1251
1276
|
themeTypeface="neutral"
|
|
1252
1277
|
>
|
|
@@ -1274,3 +1299,419 @@ exports[`Title has warning intent style 1`] = `
|
|
|
1274
1299
|
/>
|
|
1275
1300
|
</View>
|
|
1276
1301
|
`;
|
|
1302
|
+
|
|
1303
|
+
exports[`Title renders fontStyle=italic with h1 level and neutral typeface 1`] = `
|
|
1304
|
+
<View
|
|
1305
|
+
style={
|
|
1306
|
+
{
|
|
1307
|
+
"flex": 1,
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
>
|
|
1311
|
+
<Text
|
|
1312
|
+
allowFontScaling={false}
|
|
1313
|
+
style={
|
|
1314
|
+
[
|
|
1315
|
+
{
|
|
1316
|
+
"color": "#001f23",
|
|
1317
|
+
"fontFamily": "BeVietnamPro-RegularItalic",
|
|
1318
|
+
"fontSize": 42,
|
|
1319
|
+
"letterSpacing": 0,
|
|
1320
|
+
"lineHeight": 50,
|
|
1321
|
+
},
|
|
1322
|
+
undefined,
|
|
1323
|
+
]
|
|
1324
|
+
}
|
|
1325
|
+
themeIntent="body"
|
|
1326
|
+
themeIsItalic={true}
|
|
1327
|
+
themeLevel="h1"
|
|
1328
|
+
themeTypeface="neutral"
|
|
1329
|
+
>
|
|
1330
|
+
This is text with fontStyle
|
|
1331
|
+
</Text>
|
|
1332
|
+
<View
|
|
1333
|
+
pointerEvents="box-none"
|
|
1334
|
+
position="bottom"
|
|
1335
|
+
style={
|
|
1336
|
+
[
|
|
1337
|
+
{
|
|
1338
|
+
"bottom": 0,
|
|
1339
|
+
"elevation": 9999,
|
|
1340
|
+
"flexDirection": "column-reverse",
|
|
1341
|
+
"left": 0,
|
|
1342
|
+
"paddingHorizontal": 24,
|
|
1343
|
+
"paddingVertical": 16,
|
|
1344
|
+
"position": "absolute",
|
|
1345
|
+
"right": 0,
|
|
1346
|
+
"top": 0,
|
|
1347
|
+
},
|
|
1348
|
+
undefined,
|
|
1349
|
+
]
|
|
1350
|
+
}
|
|
1351
|
+
/>
|
|
1352
|
+
</View>
|
|
1353
|
+
`;
|
|
1354
|
+
|
|
1355
|
+
exports[`Title renders fontStyle=italic with h1 level and playful typeface 1`] = `
|
|
1356
|
+
<View
|
|
1357
|
+
style={
|
|
1358
|
+
{
|
|
1359
|
+
"flex": 1,
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
>
|
|
1363
|
+
<Text
|
|
1364
|
+
allowFontScaling={false}
|
|
1365
|
+
style={
|
|
1366
|
+
[
|
|
1367
|
+
{
|
|
1368
|
+
"color": "#001f23",
|
|
1369
|
+
"fontFamily": "Saiga-MediumItalic",
|
|
1370
|
+
"fontSize": 36,
|
|
1371
|
+
"letterSpacing": 1.5,
|
|
1372
|
+
"lineHeight": 44,
|
|
1373
|
+
},
|
|
1374
|
+
undefined,
|
|
1375
|
+
]
|
|
1376
|
+
}
|
|
1377
|
+
themeIntent="body"
|
|
1378
|
+
themeIsItalic={true}
|
|
1379
|
+
themeLevel="h1"
|
|
1380
|
+
themeTypeface="playful"
|
|
1381
|
+
>
|
|
1382
|
+
This is text with fontStyle
|
|
1383
|
+
</Text>
|
|
1384
|
+
<View
|
|
1385
|
+
pointerEvents="box-none"
|
|
1386
|
+
position="bottom"
|
|
1387
|
+
style={
|
|
1388
|
+
[
|
|
1389
|
+
{
|
|
1390
|
+
"bottom": 0,
|
|
1391
|
+
"elevation": 9999,
|
|
1392
|
+
"flexDirection": "column-reverse",
|
|
1393
|
+
"left": 0,
|
|
1394
|
+
"paddingHorizontal": 24,
|
|
1395
|
+
"paddingVertical": 16,
|
|
1396
|
+
"position": "absolute",
|
|
1397
|
+
"right": 0,
|
|
1398
|
+
"top": 0,
|
|
1399
|
+
},
|
|
1400
|
+
undefined,
|
|
1401
|
+
]
|
|
1402
|
+
}
|
|
1403
|
+
/>
|
|
1404
|
+
</View>
|
|
1405
|
+
`;
|
|
1406
|
+
|
|
1407
|
+
exports[`Title renders fontStyle=italic with h3 level and neutral typeface 1`] = `
|
|
1408
|
+
<View
|
|
1409
|
+
style={
|
|
1410
|
+
{
|
|
1411
|
+
"flex": 1,
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
>
|
|
1415
|
+
<Text
|
|
1416
|
+
allowFontScaling={false}
|
|
1417
|
+
style={
|
|
1418
|
+
[
|
|
1419
|
+
{
|
|
1420
|
+
"color": "#001f23",
|
|
1421
|
+
"fontFamily": "BeVietnamPro-SemiBoldItalic",
|
|
1422
|
+
"fontSize": 28,
|
|
1423
|
+
"letterSpacing": 0.24,
|
|
1424
|
+
"lineHeight": 36,
|
|
1425
|
+
},
|
|
1426
|
+
undefined,
|
|
1427
|
+
]
|
|
1428
|
+
}
|
|
1429
|
+
themeIntent="body"
|
|
1430
|
+
themeIsItalic={true}
|
|
1431
|
+
themeLevel="h3"
|
|
1432
|
+
themeTypeface="neutral"
|
|
1433
|
+
>
|
|
1434
|
+
This is text with fontStyle
|
|
1435
|
+
</Text>
|
|
1436
|
+
<View
|
|
1437
|
+
pointerEvents="box-none"
|
|
1438
|
+
position="bottom"
|
|
1439
|
+
style={
|
|
1440
|
+
[
|
|
1441
|
+
{
|
|
1442
|
+
"bottom": 0,
|
|
1443
|
+
"elevation": 9999,
|
|
1444
|
+
"flexDirection": "column-reverse",
|
|
1445
|
+
"left": 0,
|
|
1446
|
+
"paddingHorizontal": 24,
|
|
1447
|
+
"paddingVertical": 16,
|
|
1448
|
+
"position": "absolute",
|
|
1449
|
+
"right": 0,
|
|
1450
|
+
"top": 0,
|
|
1451
|
+
},
|
|
1452
|
+
undefined,
|
|
1453
|
+
]
|
|
1454
|
+
}
|
|
1455
|
+
/>
|
|
1456
|
+
</View>
|
|
1457
|
+
`;
|
|
1458
|
+
|
|
1459
|
+
exports[`Title renders fontStyle=italic with h3 level and playful typeface 1`] = `
|
|
1460
|
+
<View
|
|
1461
|
+
style={
|
|
1462
|
+
{
|
|
1463
|
+
"flex": 1,
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
>
|
|
1467
|
+
<Text
|
|
1468
|
+
allowFontScaling={false}
|
|
1469
|
+
style={
|
|
1470
|
+
[
|
|
1471
|
+
{
|
|
1472
|
+
"color": "#001f23",
|
|
1473
|
+
"fontFamily": "Saiga-MediumItalic",
|
|
1474
|
+
"fontSize": 28,
|
|
1475
|
+
"letterSpacing": 0.24,
|
|
1476
|
+
"lineHeight": 36,
|
|
1477
|
+
},
|
|
1478
|
+
undefined,
|
|
1479
|
+
]
|
|
1480
|
+
}
|
|
1481
|
+
themeIntent="body"
|
|
1482
|
+
themeIsItalic={true}
|
|
1483
|
+
themeLevel="h3"
|
|
1484
|
+
themeTypeface="playful"
|
|
1485
|
+
>
|
|
1486
|
+
This is text with fontStyle
|
|
1487
|
+
</Text>
|
|
1488
|
+
<View
|
|
1489
|
+
pointerEvents="box-none"
|
|
1490
|
+
position="bottom"
|
|
1491
|
+
style={
|
|
1492
|
+
[
|
|
1493
|
+
{
|
|
1494
|
+
"bottom": 0,
|
|
1495
|
+
"elevation": 9999,
|
|
1496
|
+
"flexDirection": "column-reverse",
|
|
1497
|
+
"left": 0,
|
|
1498
|
+
"paddingHorizontal": 24,
|
|
1499
|
+
"paddingVertical": 16,
|
|
1500
|
+
"position": "absolute",
|
|
1501
|
+
"right": 0,
|
|
1502
|
+
"top": 0,
|
|
1503
|
+
},
|
|
1504
|
+
undefined,
|
|
1505
|
+
]
|
|
1506
|
+
}
|
|
1507
|
+
/>
|
|
1508
|
+
</View>
|
|
1509
|
+
`;
|
|
1510
|
+
|
|
1511
|
+
exports[`Title renders fontStyle=normal with h1 level and neutral typeface 1`] = `
|
|
1512
|
+
<View
|
|
1513
|
+
style={
|
|
1514
|
+
{
|
|
1515
|
+
"flex": 1,
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
>
|
|
1519
|
+
<Text
|
|
1520
|
+
allowFontScaling={false}
|
|
1521
|
+
style={
|
|
1522
|
+
[
|
|
1523
|
+
{
|
|
1524
|
+
"color": "#001f23",
|
|
1525
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
1526
|
+
"fontSize": 42,
|
|
1527
|
+
"letterSpacing": 0,
|
|
1528
|
+
"lineHeight": 50,
|
|
1529
|
+
},
|
|
1530
|
+
undefined,
|
|
1531
|
+
]
|
|
1532
|
+
}
|
|
1533
|
+
themeIntent="body"
|
|
1534
|
+
themeIsItalic={false}
|
|
1535
|
+
themeLevel="h1"
|
|
1536
|
+
themeTypeface="neutral"
|
|
1537
|
+
>
|
|
1538
|
+
This is text with fontStyle
|
|
1539
|
+
</Text>
|
|
1540
|
+
<View
|
|
1541
|
+
pointerEvents="box-none"
|
|
1542
|
+
position="bottom"
|
|
1543
|
+
style={
|
|
1544
|
+
[
|
|
1545
|
+
{
|
|
1546
|
+
"bottom": 0,
|
|
1547
|
+
"elevation": 9999,
|
|
1548
|
+
"flexDirection": "column-reverse",
|
|
1549
|
+
"left": 0,
|
|
1550
|
+
"paddingHorizontal": 24,
|
|
1551
|
+
"paddingVertical": 16,
|
|
1552
|
+
"position": "absolute",
|
|
1553
|
+
"right": 0,
|
|
1554
|
+
"top": 0,
|
|
1555
|
+
},
|
|
1556
|
+
undefined,
|
|
1557
|
+
]
|
|
1558
|
+
}
|
|
1559
|
+
/>
|
|
1560
|
+
</View>
|
|
1561
|
+
`;
|
|
1562
|
+
|
|
1563
|
+
exports[`Title renders fontStyle=normal with h1 level and playful typeface 1`] = `
|
|
1564
|
+
<View
|
|
1565
|
+
style={
|
|
1566
|
+
{
|
|
1567
|
+
"flex": 1,
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
>
|
|
1571
|
+
<Text
|
|
1572
|
+
allowFontScaling={false}
|
|
1573
|
+
style={
|
|
1574
|
+
[
|
|
1575
|
+
{
|
|
1576
|
+
"color": "#001f23",
|
|
1577
|
+
"fontFamily": "Saiga-Medium",
|
|
1578
|
+
"fontSize": 36,
|
|
1579
|
+
"letterSpacing": 1.5,
|
|
1580
|
+
"lineHeight": 44,
|
|
1581
|
+
},
|
|
1582
|
+
undefined,
|
|
1583
|
+
]
|
|
1584
|
+
}
|
|
1585
|
+
themeIntent="body"
|
|
1586
|
+
themeIsItalic={false}
|
|
1587
|
+
themeLevel="h1"
|
|
1588
|
+
themeTypeface="playful"
|
|
1589
|
+
>
|
|
1590
|
+
This is text with fontStyle
|
|
1591
|
+
</Text>
|
|
1592
|
+
<View
|
|
1593
|
+
pointerEvents="box-none"
|
|
1594
|
+
position="bottom"
|
|
1595
|
+
style={
|
|
1596
|
+
[
|
|
1597
|
+
{
|
|
1598
|
+
"bottom": 0,
|
|
1599
|
+
"elevation": 9999,
|
|
1600
|
+
"flexDirection": "column-reverse",
|
|
1601
|
+
"left": 0,
|
|
1602
|
+
"paddingHorizontal": 24,
|
|
1603
|
+
"paddingVertical": 16,
|
|
1604
|
+
"position": "absolute",
|
|
1605
|
+
"right": 0,
|
|
1606
|
+
"top": 0,
|
|
1607
|
+
},
|
|
1608
|
+
undefined,
|
|
1609
|
+
]
|
|
1610
|
+
}
|
|
1611
|
+
/>
|
|
1612
|
+
</View>
|
|
1613
|
+
`;
|
|
1614
|
+
|
|
1615
|
+
exports[`Title renders fontStyle=normal with h3 level and neutral typeface 1`] = `
|
|
1616
|
+
<View
|
|
1617
|
+
style={
|
|
1618
|
+
{
|
|
1619
|
+
"flex": 1,
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
>
|
|
1623
|
+
<Text
|
|
1624
|
+
allowFontScaling={false}
|
|
1625
|
+
style={
|
|
1626
|
+
[
|
|
1627
|
+
{
|
|
1628
|
+
"color": "#001f23",
|
|
1629
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
1630
|
+
"fontSize": 28,
|
|
1631
|
+
"letterSpacing": 0.24,
|
|
1632
|
+
"lineHeight": 36,
|
|
1633
|
+
},
|
|
1634
|
+
undefined,
|
|
1635
|
+
]
|
|
1636
|
+
}
|
|
1637
|
+
themeIntent="body"
|
|
1638
|
+
themeIsItalic={false}
|
|
1639
|
+
themeLevel="h3"
|
|
1640
|
+
themeTypeface="neutral"
|
|
1641
|
+
>
|
|
1642
|
+
This is text with fontStyle
|
|
1643
|
+
</Text>
|
|
1644
|
+
<View
|
|
1645
|
+
pointerEvents="box-none"
|
|
1646
|
+
position="bottom"
|
|
1647
|
+
style={
|
|
1648
|
+
[
|
|
1649
|
+
{
|
|
1650
|
+
"bottom": 0,
|
|
1651
|
+
"elevation": 9999,
|
|
1652
|
+
"flexDirection": "column-reverse",
|
|
1653
|
+
"left": 0,
|
|
1654
|
+
"paddingHorizontal": 24,
|
|
1655
|
+
"paddingVertical": 16,
|
|
1656
|
+
"position": "absolute",
|
|
1657
|
+
"right": 0,
|
|
1658
|
+
"top": 0,
|
|
1659
|
+
},
|
|
1660
|
+
undefined,
|
|
1661
|
+
]
|
|
1662
|
+
}
|
|
1663
|
+
/>
|
|
1664
|
+
</View>
|
|
1665
|
+
`;
|
|
1666
|
+
|
|
1667
|
+
exports[`Title renders fontStyle=normal with h3 level and playful typeface 1`] = `
|
|
1668
|
+
<View
|
|
1669
|
+
style={
|
|
1670
|
+
{
|
|
1671
|
+
"flex": 1,
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
>
|
|
1675
|
+
<Text
|
|
1676
|
+
allowFontScaling={false}
|
|
1677
|
+
style={
|
|
1678
|
+
[
|
|
1679
|
+
{
|
|
1680
|
+
"color": "#001f23",
|
|
1681
|
+
"fontFamily": "Saiga-Medium",
|
|
1682
|
+
"fontSize": 28,
|
|
1683
|
+
"letterSpacing": 0.24,
|
|
1684
|
+
"lineHeight": 36,
|
|
1685
|
+
},
|
|
1686
|
+
undefined,
|
|
1687
|
+
]
|
|
1688
|
+
}
|
|
1689
|
+
themeIntent="body"
|
|
1690
|
+
themeIsItalic={false}
|
|
1691
|
+
themeLevel="h3"
|
|
1692
|
+
themeTypeface="playful"
|
|
1693
|
+
>
|
|
1694
|
+
This is text with fontStyle
|
|
1695
|
+
</Text>
|
|
1696
|
+
<View
|
|
1697
|
+
pointerEvents="box-none"
|
|
1698
|
+
position="bottom"
|
|
1699
|
+
style={
|
|
1700
|
+
[
|
|
1701
|
+
{
|
|
1702
|
+
"bottom": 0,
|
|
1703
|
+
"elevation": 9999,
|
|
1704
|
+
"flexDirection": "column-reverse",
|
|
1705
|
+
"left": 0,
|
|
1706
|
+
"paddingHorizontal": 24,
|
|
1707
|
+
"paddingVertical": 16,
|
|
1708
|
+
"position": "absolute",
|
|
1709
|
+
"right": 0,
|
|
1710
|
+
"top": 0,
|
|
1711
|
+
},
|
|
1712
|
+
undefined,
|
|
1713
|
+
]
|
|
1714
|
+
}
|
|
1715
|
+
/>
|
|
1716
|
+
</View>
|
|
1717
|
+
`;
|
|
@@ -54,4 +54,27 @@ describe('Title', () => {
|
|
|
54
54
|
|
|
55
55
|
expect(toJSON()).toMatchSnapshot();
|
|
56
56
|
});
|
|
57
|
+
|
|
58
|
+
it.each`
|
|
59
|
+
fontStyle | level | typeface
|
|
60
|
+
${'normal'} | ${'h1'} | ${'neutral'}
|
|
61
|
+
${'italic'} | ${'h1'} | ${'neutral'}
|
|
62
|
+
${'normal'} | ${'h3'} | ${'neutral'}
|
|
63
|
+
${'italic'} | ${'h3'} | ${'neutral'}
|
|
64
|
+
${'normal'} | ${'h1'} | ${'playful'}
|
|
65
|
+
${'italic'} | ${'h1'} | ${'playful'}
|
|
66
|
+
${'normal'} | ${'h3'} | ${'playful'}
|
|
67
|
+
${'italic'} | ${'h3'} | ${'playful'}
|
|
68
|
+
`(
|
|
69
|
+
'renders fontStyle=$fontStyle with $level level and $typeface typeface',
|
|
70
|
+
({ fontStyle, level, typeface }) => {
|
|
71
|
+
const { toJSON } = renderWithTheme(
|
|
72
|
+
<Title fontStyle={fontStyle} level={level} typeface={typeface}>
|
|
73
|
+
This is text with fontStyle
|
|
74
|
+
</Title>
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
expect(toJSON()).toMatchSnapshot();
|
|
78
|
+
}
|
|
79
|
+
);
|
|
57
80
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import type {
|
|
4
4
|
TextProps as NativeTextProps,
|
|
5
5
|
StyleProp,
|
|
6
6
|
TextStyle,
|
|
7
7
|
} from 'react-native';
|
|
8
|
-
import { StyledTitle } from './StyledTitle';
|
|
9
8
|
import type { TypographyIntent } from '../types';
|
|
9
|
+
import { StyledTitle } from './StyledTitle';
|
|
10
10
|
|
|
11
11
|
export interface TitleProps extends NativeTextProps {
|
|
12
12
|
/**
|
|
@@ -36,6 +36,10 @@ export interface TitleProps extends NativeTextProps {
|
|
|
36
36
|
* The level of Title including h1, h2, h3, h4, h5 and h6.
|
|
37
37
|
*/
|
|
38
38
|
level?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
39
|
+
/**
|
|
40
|
+
* Font style to apply to the text.
|
|
41
|
+
*/
|
|
42
|
+
fontStyle?: 'normal' | 'italic';
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
const Title = ({
|
|
@@ -44,6 +48,7 @@ const Title = ({
|
|
|
44
48
|
allowFontScaling = false,
|
|
45
49
|
level = 'h1',
|
|
46
50
|
typeface = 'neutral',
|
|
51
|
+
fontStyle = 'normal',
|
|
47
52
|
...nativeProps
|
|
48
53
|
}: TitleProps) => (
|
|
49
54
|
<StyledTitle
|
|
@@ -51,6 +56,7 @@ const Title = ({
|
|
|
51
56
|
themeLevel={level}
|
|
52
57
|
themeTypeface={typeface}
|
|
53
58
|
themeIntent={intent}
|
|
59
|
+
themeIsItalic={fontStyle === 'italic'}
|
|
54
60
|
allowFontScaling={allowFontScaling}
|
|
55
61
|
>
|
|
56
62
|
{children}
|