@hero-design/rn 8.52.1 → 8.52.2-rc2.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.
Files changed (177) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +20 -0
  3. package/es/index.js +397 -687
  4. package/lib/index.js +395 -686
  5. package/package.json +7 -7
  6. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +0 -4
  7. package/src/components/Accordion/__tests__/__snapshots__/StyledAccordion.spec.tsx.snap +0 -2
  8. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  9. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +0 -7
  10. package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  11. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +0 -2
  12. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  13. package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +0 -3
  14. package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  15. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +0 -6
  16. package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +0 -2
  17. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +32 -21
  18. package/src/components/BottomSheet/index.tsx +1 -1
  19. package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +0 -21
  20. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +0 -10
  21. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +0 -10
  22. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  23. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +0 -16
  24. package/src/components/Button/__tests__/__snapshots__/IconButton.spec.tsx.snap +0 -1
  25. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +0 -32
  26. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +0 -5
  27. package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +0 -7
  28. package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +0 -5
  29. package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +0 -1
  30. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +0 -6
  31. package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +0 -2
  32. package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +0 -4
  33. package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +0 -1
  34. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +1 -803
  35. package/src/components/Carousel/__tests__/index.spec.tsx +37 -47
  36. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +0 -8
  37. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +0 -6
  38. package/src/components/Checkbox/index.tsx +1 -13
  39. package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +0 -12
  40. package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +0 -2
  41. package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  42. package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +0 -1
  43. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  44. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +0 -15
  45. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +0 -1
  46. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +0 -1
  47. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +309 -329
  48. package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +0 -12
  49. package/src/components/Drawer/DragableDrawer/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  50. package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  51. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  52. package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
  53. package/src/components/Error/index.tsx +3 -20
  54. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  55. package/src/components/FAB/ActionGroup/index.tsx +1 -14
  56. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +0 -2
  57. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +0 -3
  58. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  59. package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  60. package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
  61. package/src/components/Image/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
  62. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +0 -2
  63. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +0 -4
  64. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +0 -4
  65. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +0 -9
  66. package/src/components/Modal/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  67. package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  68. package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +0 -5
  69. package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
  70. package/src/components/Portal/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  71. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +0 -5
  72. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +0 -2
  73. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +0 -1
  74. package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  75. package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  76. package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +0 -1
  77. package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +0 -1
  78. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +0 -2
  79. package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +0 -4
  80. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +0 -6
  81. package/src/components/SectionHeading/__tests__/index.spec.tsx +0 -1
  82. package/src/components/SectionHeading/index.tsx +32 -57
  83. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +0 -1
  84. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +0 -4
  85. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +128 -42
  86. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +0 -1
  87. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +0 -4
  88. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +96 -35
  89. package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +0 -7
  90. package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  91. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +0 -1
  92. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +0 -24
  93. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  94. package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
  95. package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +0 -3
  96. package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  97. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +0 -4
  98. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  99. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +0 -5
  100. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  101. package/src/components/Tabs/__tests__/SceneView.spec.tsx +1 -1
  102. package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +0 -4
  103. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +0 -3
  104. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +0 -1
  105. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +0 -2
  106. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  107. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +0 -10
  108. package/src/components/Tag/index.tsx +0 -12
  109. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +0 -21
  110. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +0 -17
  111. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +0 -2
  112. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +309 -330
  113. package/src/components/Toast/StyledToast.tsx +7 -9
  114. package/src/components/Toast/Toast.tsx +1 -4
  115. package/src/components/Toast/ToastContainer.tsx +2 -6
  116. package/src/components/Toast/ToastContext.ts +2 -5
  117. package/src/components/Toast/ToastProvider.tsx +2 -19
  118. package/src/components/Toast/__tests__/ToastContainer.spec.tsx +12 -15
  119. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +0 -7
  120. package/src/components/Toast/__tests__/__snapshots__/ToastContainer.spec.tsx.snap +6 -14
  121. package/src/components/Toast/types.ts +1 -5
  122. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +0 -3
  123. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +0 -8
  124. package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +0 -16
  125. package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +0 -19
  126. package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +0 -10
  127. package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +0 -13
  128. package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +0 -8
  129. package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +0 -11
  130. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +0 -20
  131. package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +0 -20
  132. package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +0 -23
  133. package/src/index.ts +0 -2
  134. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +0 -102
  135. package/src/theme/components/badge.ts +1 -28
  136. package/src/theme/components/button.ts +0 -24
  137. package/src/theme/components/carousel.ts +1 -28
  138. package/src/theme/components/empty.ts +1 -23
  139. package/src/theme/components/error.ts +1 -32
  140. package/src/theme/components/fab.ts +2 -13
  141. package/src/theme/components/pinInput.ts +0 -32
  142. package/src/theme/components/success.ts +1 -23
  143. package/src/theme/components/tag.ts +1 -28
  144. package/src/theme/components/textInput.ts +0 -5
  145. package/src/theme/getTheme.ts +18 -21
  146. package/src/types.ts +0 -2
  147. package/types/components/Checkbox/index.d.ts +1 -6
  148. package/types/components/Error/index.d.ts +3 -9
  149. package/types/components/FAB/ActionGroup/index.d.ts +0 -5
  150. package/types/components/SectionHeading/index.d.ts +1 -11
  151. package/types/components/Tag/index.d.ts +1 -6
  152. package/types/components/Toast/StyledToast.d.ts +0 -2
  153. package/types/components/Toast/ToastContext.d.ts +2 -2
  154. package/types/components/Toast/ToastProvider.d.ts +1 -1
  155. package/types/components/Toast/index.d.ts +1 -1
  156. package/types/components/Toast/types.d.ts +1 -5
  157. package/types/index.d.ts +1 -2
  158. package/types/theme/components/badge.d.ts +0 -24
  159. package/types/theme/components/button.d.ts +0 -20
  160. package/types/theme/components/carousel.d.ts +0 -24
  161. package/types/theme/components/empty.d.ts +0 -19
  162. package/types/theme/components/error.d.ts +0 -27
  163. package/types/theme/components/fab.d.ts +8 -19
  164. package/types/theme/components/pinInput.d.ts +0 -27
  165. package/types/theme/components/success.d.ts +0 -19
  166. package/types/theme/components/tag.d.ts +0 -24
  167. package/types/theme/components/textInput.d.ts +0 -5
  168. package/types/theme/getTheme.d.ts +18 -20
  169. package/types/types.d.ts +1 -2
  170. package/src/components/BottomNavigation/StyledBottomNavigation.tsx +0 -60
  171. package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +0 -413
  172. package/src/components/BottomNavigation/__tests__/index.spec.tsx +0 -97
  173. package/src/components/BottomNavigation/index.tsx +0 -166
  174. package/src/theme/components/bottomNavigation.ts +0 -27
  175. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -52
  176. package/types/components/BottomNavigation/index.d.ts +0 -45
  177. package/types/theme/components/bottomNavigation.d.ts +0 -23
@@ -61,25 +61,14 @@ const getFABTheme = (theme: GlobalTheme) => {
61
61
 
62
62
  return {
63
63
  radii,
64
- fonts,
65
- fontSizes,
66
64
  colors,
67
65
  sizes,
66
+ fonts,
67
+ fontSizes,
68
68
  lineHeights,
69
69
  shadows,
70
70
  space,
71
71
  };
72
72
  };
73
- type GetFABThemeReturnType = ReturnType<typeof getFABTheme>;
74
- export interface FABThemeType extends GetFABThemeReturnType {
75
- /**
76
- * @deprecated will be removed in v9
77
- * */
78
- fonts: GetFABThemeReturnType['fonts'];
79
- /**
80
- * @deprecated will be removed in v9
81
- * */
82
- fontSizes: GetFABThemeReturnType['fontSizes'];
83
- }
84
73
 
85
74
  export default getFABTheme;
@@ -13,20 +13,6 @@ const getPinInputTheme = (theme: GlobalTheme) => {
13
13
  disabled: theme.colors.disabledOnDefaultGlobalSurface,
14
14
  };
15
15
 
16
- const fonts = {
17
- cellText: theme.fonts.neutral.semiBold,
18
- errorMessage: theme.fonts.neutral.regular,
19
- };
20
-
21
- const fontSizes = {
22
- cellText: theme.fontSizes.xxxxlarge,
23
- errorMessage: theme.fontSizes.small,
24
- };
25
- const lineHeights = {
26
- cellText: theme.lineHeights.xxxxlarge,
27
- errorMessage: theme.fontSizes.small,
28
- };
29
-
30
16
  const sizes = {
31
17
  cellWidth: theme.sizes.xxlarge,
32
18
  cellHeight: theme.sizes.xxxlarge,
@@ -45,29 +31,11 @@ const getPinInputTheme = (theme: GlobalTheme) => {
45
31
 
46
32
  return {
47
33
  borderWidths,
48
- lineHeights,
49
34
  colors,
50
- fonts,
51
- fontSizes,
52
35
  sizes,
53
36
  space,
54
37
  radii,
55
38
  };
56
39
  };
57
- type GetPinInputThemeReturnType = ReturnType<typeof getPinInputTheme>;
58
- export interface PinInputThemeType extends GetPinInputThemeReturnType {
59
- /**
60
- * @deprecated will be removed in v9
61
- * */
62
- fonts: GetPinInputThemeReturnType['fonts'];
63
- /**
64
- * @deprecated will be removed in v9
65
- * */
66
- fontSizes: GetPinInputThemeReturnType['fontSizes'];
67
- /**
68
- * @deprecated will be removed in v9
69
- * */
70
- lineHeights: GetPinInputThemeReturnType['lineHeights'];
71
- }
72
40
 
73
41
  export default getPinInputTheme;
@@ -24,29 +24,7 @@ const getSuccessTheme = (theme: GlobalTheme) => {
24
24
  inPageBackground: theme.colors.neutralGlobalSurface,
25
25
  };
26
26
 
27
- const fontSizes = {
28
- title: theme.fontSizes.xxxlarge,
29
- description: theme.fontSizes.xlarge,
30
- };
31
-
32
- const fonts = {
33
- title: theme.fonts.playful.semiBold,
34
- description: theme.fonts.playful.regular,
35
- };
36
-
37
- return { fontSizes, colors, sizes, space, fonts };
27
+ return { colors, sizes, space };
38
28
  };
39
29
 
40
- type GetSuccessThemeReturnType = ReturnType<typeof getSuccessTheme>;
41
- export interface SuccessThemeType extends GetSuccessThemeReturnType {
42
- /**
43
- * @deprecated will be removed in v9
44
- * */
45
- fonts: GetSuccessThemeReturnType['fonts'];
46
- /**
47
- * @deprecated will be removed in v9
48
- * */
49
- fontSizes: GetSuccessThemeReturnType['fontSizes'];
50
- }
51
-
52
30
  export default getSuccessTheme;
@@ -21,17 +21,6 @@ const getTagTheme = (theme: GlobalTheme) => {
21
21
  text: theme.colors.onDefaultGlobalSurface,
22
22
  };
23
23
 
24
- const fonts = {
25
- default: theme.fonts.neutral.semiBold,
26
- };
27
-
28
- const fontSizes = {
29
- default: theme.fontSizes.small,
30
- };
31
- const lineHeights = {
32
- default: theme.lineHeights.small,
33
- };
34
-
35
24
  const space = {
36
25
  horizontalPadding: theme.space.small,
37
26
  verticalPadding: theme.space.xsmall,
@@ -41,23 +30,7 @@ const getTagTheme = (theme: GlobalTheme) => {
41
30
  default: theme.radii.base,
42
31
  };
43
32
 
44
- return { borderWidths, colors, fonts, fontSizes, space, radii, lineHeights };
33
+ return { borderWidths, colors, space, radii };
45
34
  };
46
35
 
47
- type GetTagThemeReturnType = ReturnType<typeof getTagTheme>;
48
- export interface TagThemeType extends GetTagThemeReturnType {
49
- /**
50
- * @deprecated will be removed in v9
51
- * */
52
- fonts: GetTagThemeReturnType['fonts'];
53
- /**
54
- * @deprecated will be removed in v9
55
- * */
56
- fontSizes: GetTagThemeReturnType['fontSizes'];
57
- /**
58
- * @deprecated will be removed in v9
59
- * */
60
- lineHeights: GetTagThemeReturnType['lineHeights'];
61
- }
62
-
63
36
  export default getTagTheme;
@@ -64,11 +64,6 @@ const getTextInputTheme = (theme: GlobalTheme) => {
64
64
 
65
65
  const fontSizes = {
66
66
  text: theme.fontSizes.large,
67
- labelInsideTextInput: theme.fontSizes.large,
68
- error: theme.fontSizes.small,
69
- maxLength: theme.fontSizes.small,
70
- asteriskLabel: theme.fontSizes.large,
71
- topLabel: theme.fontSizes.small,
72
67
  };
73
68
 
74
69
  const borderWidths = {
@@ -4,13 +4,12 @@ import getAccordionTheme from './components/accordion';
4
4
  import getAlertTheme from './components/alert';
5
5
  import getAttachmentTheme from './components/attachment';
6
6
  import getAvatarTheme from './components/avatar';
7
- import getBadgeTheme, { BadgeThemeType } from './components/badge';
8
- import getBottomNavigationTheme from './components/bottomNavigation';
7
+ import getBadgeTheme from './components/badge';
9
8
  import getBottomSheetTheme from './components/bottomSheet';
10
- import getButtonTheme, { ButtonThemeType } from './components/button';
9
+ import getButtonTheme from './components/button';
11
10
  import getCalendarTheme from './components/calendar';
12
11
  import getCardTheme from './components/card';
13
- import getCarouselTheme, { CarouselThemeType } from './components/carousel';
12
+ import getCarouselTheme from './components/carousel';
14
13
  import getCardCarouselTheme from './components/cardCarousel';
15
14
  import getCheckboxTheme from './components/checkbox';
16
15
  import getChipTheme from './components/chip';
@@ -18,14 +17,14 @@ import getContentNavigatorTheme from './components/contentNavigator';
18
17
  import getDatePickerTheme from './components/datePicker';
19
18
  import getDividerTheme from './components/divider';
20
19
  import getDrawerTheme from './components/drawer';
21
- import getEmptyTheme, { EmptyThemeType } from './components/empty';
22
- import getErrorTheme, { ErrorThemeType } from './components/error';
23
- import getFABTheme, { FABThemeType } from './components/fab';
20
+ import getEmptyTheme from './components/empty';
21
+ import getErrorTheme from './components/error';
22
+ import getFABTheme from './components/fab';
24
23
  import getIconTheme from './components/icon';
25
24
  import getImageTheme from './components/image';
26
25
  import getListTheme from './components/list';
27
26
  import getPageControlTheme from './components/pageControl';
28
- import getPinInputTheme, { PinInputThemeType } from './components/pinInput';
27
+ import getPinInputTheme from './components/pinInput';
29
28
  import getProgressTheme from './components/progress';
30
29
  import getRadioTheme from './components/radio';
31
30
  import getRateTheme from './components/rate';
@@ -36,11 +35,11 @@ import getSelectTheme from './components/select';
36
35
  import getSkeletonTheme from './components/skeleton';
37
36
  import getSliderTheme from './components/slider';
38
37
  import getSpinnerTheme from './components/spinner';
39
- import getSuccessTheme, { SuccessThemeType } from './components/success';
38
+ import getSuccessTheme from './components/success';
40
39
  import getSwipeableTheme from './components/swipeable';
41
40
  import getSwitchTheme from './components/switch';
42
41
  import getTabsTheme from './components/tabs';
43
- import getTagTheme, { TagThemeType } from './components/tag';
42
+ import getTagTheme from './components/tag';
44
43
  import getTextInputTheme from './components/textInput';
45
44
  import getTimePickerTheme from './components/timePicker';
46
45
  import getToastTheme from './components/toast';
@@ -55,13 +54,12 @@ type Theme = GlobalTheme & {
55
54
  alert: ReturnType<typeof getAlertTheme>;
56
55
  attachment: ReturnType<typeof getAttachmentTheme>;
57
56
  avatar: ReturnType<typeof getAvatarTheme>;
58
- badge: BadgeThemeType;
59
- bottomNavigation: ReturnType<typeof getBottomNavigationTheme>;
57
+ badge: ReturnType<typeof getBadgeTheme>;
60
58
  bottomSheet: ReturnType<typeof getBottomSheetTheme>;
61
- button: ButtonThemeType;
59
+ button: ReturnType<typeof getButtonTheme>;
62
60
  calendar: ReturnType<typeof getCalendarTheme>;
63
61
  card: ReturnType<typeof getCardTheme>;
64
- carousel: CarouselThemeType;
62
+ carousel: ReturnType<typeof getCarouselTheme>;
65
63
  cardCarousel: ReturnType<typeof getCardCarouselTheme>;
66
64
  checkbox: ReturnType<typeof getCheckboxTheme>;
67
65
  chip: ReturnType<typeof getChipTheme>;
@@ -69,14 +67,14 @@ type Theme = GlobalTheme & {
69
67
  datePicker: ReturnType<typeof getDatePickerTheme>;
70
68
  divider: ReturnType<typeof getDividerTheme>;
71
69
  drawer: ReturnType<typeof getDrawerTheme>;
72
- empty: EmptyThemeType;
73
- error: ErrorThemeType;
74
- fab: FABThemeType;
70
+ empty: ReturnType<typeof getEmptyTheme>;
71
+ error: ReturnType<typeof getErrorTheme>;
72
+ fab: ReturnType<typeof getFABTheme>;
75
73
  icon: ReturnType<typeof getIconTheme>;
76
74
  image: ReturnType<typeof getImageTheme>;
77
75
  list: ReturnType<typeof getListTheme>;
78
76
  pageControl: ReturnType<typeof getPageControlTheme>;
79
- pinInput: PinInputThemeType;
77
+ pinInput: ReturnType<typeof getPinInputTheme>;
80
78
  progress: ReturnType<typeof getProgressTheme>;
81
79
  radio: ReturnType<typeof getRadioTheme>;
82
80
  rate: ReturnType<typeof getRateTheme>;
@@ -87,11 +85,11 @@ type Theme = GlobalTheme & {
87
85
  skeleton: ReturnType<typeof getSkeletonTheme>;
88
86
  slider: ReturnType<typeof getSliderTheme>;
89
87
  spinner: ReturnType<typeof getSpinnerTheme>;
90
- success: SuccessThemeType;
88
+ success: ReturnType<typeof getSuccessTheme>;
91
89
  swipeable: ReturnType<typeof getSwipeableTheme>;
92
90
  switch: ReturnType<typeof getSwitchTheme>;
93
91
  tabs: ReturnType<typeof getTabsTheme>;
94
- tag: TagThemeType;
92
+ tag: ReturnType<typeof getTagTheme>;
95
93
  textInput: ReturnType<typeof getTextInputTheme>;
96
94
  timePicker: ReturnType<typeof getTimePickerTheme>;
97
95
  toast: ReturnType<typeof getToastTheme>;
@@ -113,7 +111,6 @@ const getTheme = (
113
111
  attachment: getAttachmentTheme(globalTheme),
114
112
  avatar: getAvatarTheme(globalTheme),
115
113
  badge: getBadgeTheme(globalTheme),
116
- bottomNavigation: getBottomNavigationTheme(globalTheme),
117
114
  bottomSheet: getBottomSheetTheme(globalTheme),
118
115
  button: getButtonTheme(globalTheme),
119
116
  calendar: getCalendarTheme(globalTheme),
package/src/types.ts CHANGED
@@ -1,4 +1,3 @@
1
- import type { BottomNavigationTabType } from './components/BottomNavigation';
2
1
  import type { IconName } from './components/Icon';
3
2
  import type { SingleSelectProps, MultiSelectProps } from './components/Select';
4
3
  import type { TabType } from './components/Tabs';
@@ -19,7 +18,6 @@ import { FABHandles } from './components/FAB/FAB';
19
18
  import { ActionGroupHandles } from './components/FAB/ActionGroup';
20
19
 
21
20
  export type {
22
- BottomNavigationTabType,
23
21
  IconName,
24
22
  SingleSelectProps,
25
23
  MultiSelectProps,
@@ -9,11 +9,6 @@ export interface CheckboxProps {
9
9
  * Checkbox's description.
10
10
  */
11
11
  description?: string;
12
- /**
13
- * @deprecated This prop will be removed in the next major release. Checkboxes will always have border.
14
- * Whether the border is shown.
15
- */
16
- withBorder?: boolean;
17
12
  /**
18
13
  * Whether the switch is disabled
19
14
  */
@@ -40,5 +35,5 @@ type getStateType = {
40
35
  readonly: boolean;
41
36
  };
42
37
  export declare const getThemeState: ({ disabled, readonly }: getStateType) => "default" | "disabled" | "readonly";
43
- declare const Checkbox: ({ checked, description, withBorder, disabled, onPress, style, testID, readonly, }: CheckboxProps) => React.JSX.Element;
38
+ declare const Checkbox: ({ checked, description, disabled, onPress, style, testID, readonly, }: CheckboxProps) => React.JSX.Element;
44
39
  export default Checkbox;
@@ -1,14 +1,8 @@
1
1
  import { ReactElement } from 'react';
2
- import type { ImageSourcePropType, ViewProps, ImageProps as RNImageProps } from 'react-native';
3
- import { ErrorVariant } from './StyledError';
2
+ import type { ImageSourcePropType, ImageProps as RNImageProps, ViewProps } from 'react-native';
4
3
  import { ImageProps } from '../Image/index';
4
+ import { ErrorVariant } from './StyledError';
5
5
  interface ErrorProps extends ViewProps {
6
- /**
7
- * @deprecated use conditional rendering instead
8
- *
9
- * Visibility of the error
10
- */
11
- visible?: boolean;
12
6
  /**
13
7
  * Variant of the error
14
8
  */
@@ -52,5 +46,5 @@ interface ErrorProps extends ViewProps {
52
46
  * @param {ErrorProps}
53
47
  * @return {*} {ReactElement}
54
48
  */
55
- declare const Error: ({ visible, variant, title, description, image, testID, ctaText, onCtaPress, secondaryCtaText, onSecondaryCtaPress, ...nativeProps }: ErrorProps) => ReactElement;
49
+ declare const Error: ({ variant, title, description, image, testID, ctaText, onCtaPress, secondaryCtaText, onSecondaryCtaPress, ...nativeProps }: ErrorProps) => ReactElement;
56
50
  export default Error;
@@ -8,11 +8,6 @@ export type ActionGroupHandles = {
8
8
  hideFAB: () => void;
9
9
  };
10
10
  export interface ActionGroupProps {
11
- /**
12
- * @deprecated headerTitle will be removed in the next major release.
13
- * Title of the action group header.
14
- */
15
- headerTitle?: string;
16
11
  /**
17
12
  * This function is called on pressing the FAB button.
18
13
  * */
@@ -14,16 +14,6 @@ export interface SectionHeadingProps extends ViewProps {
14
14
  * Right corner content
15
15
  */
16
16
  rightChildren?: ReactElement;
17
- /**
18
- * @deprecated fontSize will be removed in the next major release.
19
- * Size of the text.
20
- */
21
- fontSize?: 'small' | 'medium' | 'large' | 'xlarge';
22
- /**
23
- * @deprecated fontWeight will be removed in the next major release.
24
- * Heading's font-weight.
25
- */
26
- fontWeight?: 'light' | 'regular' | 'semi-bold';
27
17
  /**
28
18
  * Visual intent color to apply to text.
29
19
  */
@@ -41,5 +31,5 @@ export interface SectionHeadingProps extends ViewProps {
41
31
  */
42
32
  size?: 'small' | 'medium';
43
33
  }
44
- declare const SectionHeading: ({ icon, text, rightChildren, fontSize, intent, fontWeight, size, style, testID, }: SectionHeadingProps) => ReactElement;
34
+ declare const SectionHeading: ({ icon, text, rightChildren, intent, size, style, testID, }: SectionHeadingProps) => ReactElement;
45
35
  export default SectionHeading;
@@ -9,11 +9,6 @@ interface TagProps extends ViewProps {
9
9
  * Visual intent color to apply to Tag.
10
10
  */
11
11
  intent?: 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
12
- /**
13
- * @deprecated Tag variant prop is deprecated and will be removed in the next major release. Please remove it.
14
- * Tag variant.
15
- */
16
- variant?: 'filled' | 'outlined';
17
12
  /**
18
13
  * Additional style.
19
14
  */
@@ -23,5 +18,5 @@ interface TagProps extends ViewProps {
23
18
  */
24
19
  testID?: string;
25
20
  }
26
- declare const Tag: ({ content, variant, intent, style, testID, ...nativeProps }: TagProps) => JSX.Element;
21
+ declare const Tag: ({ content, intent, style, testID, ...nativeProps }: TagProps) => JSX.Element;
27
22
  export default Tag;
@@ -5,8 +5,6 @@ import { IntentType } from './types';
5
5
  declare const ToastContainerWrapper: import("@emotion/native").StyledComponent<ViewProps & {
6
6
  theme?: import("@emotion/react").Theme | undefined;
7
7
  as?: import("react").ElementType<any> | undefined;
8
- } & {
9
- position: 'top' | 'bottom';
10
8
  }, {}, {
11
9
  ref?: import("react").Ref<View> | undefined;
12
10
  }>;
@@ -1,12 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import type { ToastContainerProps, ToastProps } from './types';
3
3
  export type ToastControllerContextType = {
4
- show: (props: Omit<ToastProps, 'position'>) => string;
4
+ show: (props: ToastProps) => string;
5
5
  hide: (id: string) => void;
6
6
  clearAll: () => void;
7
7
  };
8
8
  export declare const ToastContext: import("react").Context<ToastControllerContextType>;
9
- export type ToastConfigContextType = Pick<ToastContainerProps, 'position' | 'displayType'>;
9
+ export type ToastConfigContextType = Pick<ToastContainerProps, 'displayType'>;
10
10
  export declare const ToastConfigContext: import("react").Context<ToastConfigContextType>;
11
11
  export declare const useToastConfig: () => ToastConfigContextType;
12
12
  export declare const useToast: () => ToastControllerContextType;
@@ -7,5 +7,5 @@ type ToastProviderProps = {
7
7
  */
8
8
  children?: ReactNode;
9
9
  } & ToastContainerProps;
10
- declare const ToastProvider: ({ children, displayType, position: _position, }: ToastProviderProps) => React.JSX.Element;
10
+ declare const ToastProvider: ({ children, displayType, }: ToastProviderProps) => React.JSX.Element;
11
11
  export default ToastProvider;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  declare const Toast: {
3
- Provider: ({ children, displayType, position: _position, }: {
3
+ Provider: ({ children, displayType, }: {
4
4
  children?: import("react").ReactNode;
5
5
  } & import("./types").ToastContainerProps) => import("react").JSX.Element;
6
6
  Container: import("react").ForwardRefExoticComponent<import("./types").ToastContainerProps & import("react").RefAttributes<import("./ToastContext").ToastControllerContextType>>;
@@ -57,10 +57,6 @@ export interface ToastContainerProps {
57
57
  * Displays multiple toasts at a time or one by one.
58
58
  */
59
59
  displayType?: 'single' | 'stack';
60
- /**
61
- * Position that the toast message will appear on the screen.
62
- */
63
- position?: 'top' | 'bottom';
64
60
  /**
65
61
  * Additional style for toasts container.
66
62
  */
@@ -68,5 +64,5 @@ export interface ToastContainerProps {
68
64
  }
69
65
  export type ToastItemProps = {
70
66
  id: string;
71
- props: Omit<ToastProps, 'position'>;
67
+ props: ToastProps;
72
68
  };
package/types/index.d.ts CHANGED
@@ -5,7 +5,6 @@ import Alert from './components/Alert';
5
5
  import Attachment from './components/Attachment';
6
6
  import Avatar, { useAvatarColors } from './components/Avatar';
7
7
  import Badge from './components/Badge';
8
- import BottomNavigation from './components/BottomNavigation';
9
8
  import BottomSheet from './components/BottomSheet';
10
9
  import Box from './components/Box';
11
10
  import Button from './components/Button';
@@ -49,5 +48,5 @@ import RefreshControl from './components/RefreshControl';
49
48
  import RichTextEditor from './components/RichTextEditor';
50
49
  import PageControl from './components/PageControl';
51
50
  import Portal from './components/Portal';
52
- export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, withTheme, swagSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, Accordion, Alert, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Carousel, Chip, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, Error, FAB, Icon, Image, HeroDesignProvider, List, PinInput, Progress, Portal, PageControl, Skeleton, Slider, Spinner, Swipeable, Radio, SectionHeading, Select, Success, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, Rate, RefreshControl, RichTextEditor, };
51
+ export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, withTheme, swagSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, Accordion, Alert, Attachment, Avatar, useAvatarColors, Badge, BottomSheet, Box, Button, Calendar, Card, Carousel, Chip, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, Error, FAB, Icon, Image, HeroDesignProvider, List, PinInput, Progress, Portal, PageControl, Skeleton, Slider, Spinner, Swipeable, Radio, SectionHeading, Select, Success, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, Rate, RefreshControl, RichTextEditor, };
53
52
  export * from './types';
@@ -9,12 +9,6 @@ declare const getBadgeTheme: (theme: GlobalTheme) => {
9
9
  archived: string;
10
10
  text: string;
11
11
  };
12
- fonts: {
13
- default: string;
14
- };
15
- fontSizes: {
16
- default: number;
17
- };
18
12
  sizes: {
19
13
  height: number;
20
14
  minWidth: number;
@@ -26,23 +20,5 @@ declare const getBadgeTheme: (theme: GlobalTheme) => {
26
20
  statusPositionTop: number;
27
21
  statusPositionRight: number;
28
22
  };
29
- lineHeights: {
30
- default: number;
31
- };
32
23
  };
33
- type GetBadgeThemeReturnType = ReturnType<typeof getBadgeTheme>;
34
- export interface BadgeThemeType extends GetBadgeThemeReturnType {
35
- /**
36
- * @deprecated will be removed in v9
37
- * */
38
- fonts: GetBadgeThemeReturnType['fonts'];
39
- /**
40
- * @deprecated will be removed in v9
41
- * */
42
- fontSizes: GetBadgeThemeReturnType['fontSizes'];
43
- /**
44
- * @deprecated will be removed in v9
45
- * */
46
- lineHeights: GetBadgeThemeReturnType['lineHeights'];
47
- }
48
24
  export default getBadgeTheme;
@@ -6,15 +6,6 @@ declare const getButtonTheme: (theme: GlobalTheme) => {
6
6
  borderWidth: {
7
7
  default: number;
8
8
  };
9
- fonts: {
10
- default: string;
11
- utility: string;
12
- };
13
- fontSize: {
14
- default: number;
15
- utility: number;
16
- textVariant: number;
17
- };
18
9
  sizes: {
19
10
  iconSize: number;
20
11
  };
@@ -53,15 +44,4 @@ declare const getButtonTheme: (theme: GlobalTheme) => {
53
44
  utilityPadding: number;
54
45
  };
55
46
  };
56
- type GetButtonThemeReturnType = ReturnType<typeof getButtonTheme>;
57
- export interface ButtonThemeType extends GetButtonThemeReturnType {
58
- /**
59
- * @deprecated will be removed in v9
60
- * */
61
- fonts: GetButtonThemeReturnType['fonts'];
62
- /**
63
- * @deprecated will be removed in v9
64
- * */
65
- fontSize: GetButtonThemeReturnType['fontSize'];
66
- }
67
47
  export default getButtonTheme;
@@ -9,29 +9,5 @@ declare const getCarouselTheme: (theme: GlobalTheme) => {
9
9
  pageControlPaddingVertical: number;
10
10
  pageControlWrapperHeight: number;
11
11
  };
12
- fonts: {
13
- heading: string;
14
- };
15
- fontSizes: {
16
- heading: number;
17
- };
18
- lineHeights: {
19
- heading: number;
20
- };
21
12
  };
22
- type GetCarouselThemeReturnType = ReturnType<typeof getCarouselTheme>;
23
- export interface CarouselThemeType extends GetCarouselThemeReturnType {
24
- /**
25
- * @deprecated will be removed in v9
26
- * */
27
- fonts: GetCarouselThemeReturnType['fonts'];
28
- /**
29
- * @deprecated will be removed in v9
30
- * */
31
- fontSizes: GetCarouselThemeReturnType['fontSizes'];
32
- /**
33
- * @deprecated will be removed in v9
34
- * */
35
- lineHeights: GetCarouselThemeReturnType['lineHeights'];
36
- }
37
13
  export default getCarouselTheme;
@@ -1,9 +1,5 @@
1
1
  import type { GlobalTheme } from '../global';
2
2
  declare const getEmptyTheme: (theme: GlobalTheme) => {
3
- fontSizes: {
4
- title: number;
5
- description: number;
6
- };
7
3
  colors: {
8
4
  text: string;
9
5
  invertedText: string;
@@ -18,20 +14,5 @@ declare const getEmptyTheme: (theme: GlobalTheme) => {
18
14
  imageMargin: number;
19
15
  wrapperPadding: number;
20
16
  };
21
- fonts: {
22
- title: string;
23
- description: string;
24
- };
25
17
  };
26
- type GetEmptyThemeReturnType = ReturnType<typeof getEmptyTheme>;
27
- export interface EmptyThemeType extends GetEmptyThemeReturnType {
28
- /**
29
- * @deprecated will be removed in v9
30
- * */
31
- fonts: GetEmptyThemeReturnType['fonts'];
32
- /**
33
- * @deprecated will be removed in v9
34
- * */
35
- fontSizes: GetEmptyThemeReturnType['fontSizes'];
36
- }
37
18
  export default getEmptyTheme;
@@ -1,9 +1,5 @@
1
1
  import type { GlobalTheme } from '../global';
2
2
  declare const getErrorTheme: (theme: GlobalTheme) => {
3
- fontSizes: {
4
- title: number;
5
- description: number;
6
- };
7
3
  colors: {
8
4
  title: string;
9
5
  description: string;
@@ -24,28 +20,5 @@ declare const getErrorTheme: (theme: GlobalTheme) => {
24
20
  padding: number;
25
21
  };
26
22
  };
27
- fonts: {
28
- title: string;
29
- description: string;
30
- };
31
- lineHeight: {
32
- title: number;
33
- description: number;
34
- };
35
23
  };
36
- type GetErrorThemeReturnType = ReturnType<typeof getErrorTheme>;
37
- export interface ErrorThemeType extends GetErrorThemeReturnType {
38
- /**
39
- * @deprecated will be removed in v9
40
- * */
41
- fonts: GetErrorThemeReturnType['fonts'];
42
- /**
43
- * @deprecated will be removed in v9
44
- * */
45
- fontSizes: GetErrorThemeReturnType['fontSizes'];
46
- /**
47
- * @deprecated will be removed in v9
48
- * */
49
- lineHeight: GetErrorThemeReturnType['lineHeight'];
50
- }
51
24
  export default getErrorTheme;