@hero-design/rn 7.22.1 → 7.22.3

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 (128) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/es/index.js +309 -284
  3. package/lib/index.js +309 -284
  4. package/package.json +4 -4
  5. package/src/components/Accordion/AccordionItem.tsx +1 -1
  6. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -8
  7. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
  8. package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -3
  9. package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  10. package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  11. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +2 -2
  12. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  13. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +24 -24
  14. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +6 -6
  15. package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +3 -3
  16. package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  17. package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +1 -1
  18. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  19. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +2 -2
  20. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +5 -5
  21. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  22. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +4 -18
  23. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +5 -19
  24. package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  25. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
  26. package/src/components/Icon/HeroIcon/index.tsx +2 -0
  27. package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  28. package/src/components/Icon/index.tsx +1 -0
  29. package/src/components/List/StyledBasicListItem.tsx +1 -0
  30. package/src/components/List/__tests__/BasicListItem.spec.tsx +37 -13
  31. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +163 -2
  32. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +12 -12
  33. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +6 -2
  34. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +4 -4
  35. package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +6 -6
  36. package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +21 -21
  37. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +5 -5
  38. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +3 -1
  39. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +4 -1
  40. package/src/components/RichTextEditor/RichTextEditor.tsx +1 -3
  41. package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +1 -1
  42. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +10 -38
  43. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  44. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -1
  45. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +25 -9
  46. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +66 -108
  47. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -1
  48. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +24 -8
  49. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +57 -99
  50. package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +1 -1
  51. package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  52. package/src/components/Spinner/StyledSpinner.tsx +8 -4
  53. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +8 -4
  54. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +32 -16
  55. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +8 -4
  56. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +3 -3
  57. package/src/components/Tabs/ScrollableTabs.tsx +2 -5
  58. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +1 -1
  59. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +1 -1
  60. package/src/components/TextInput/StyledTextInput.tsx +11 -16
  61. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +3 -3
  62. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +28 -46
  63. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +67 -249
  64. package/src/components/TextInput/index.tsx +27 -27
  65. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +4 -18
  66. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +5 -19
  67. package/src/components/Toast/ToastProvider.tsx +2 -4
  68. package/src/components/Toast/__tests__/index.spec.tsx +138 -0
  69. package/src/components/Toolbar/ToolbarItem.tsx +1 -1
  70. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -12
  71. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +6 -6
  72. package/src/components/Typography/Text/StyledText.tsx +1 -0
  73. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +3 -3
  74. package/src/components/Typography/Text/index.tsx +1 -0
  75. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +93 -84
  76. package/src/theme/components/accordion.ts +1 -1
  77. package/src/theme/components/alert.ts +4 -4
  78. package/src/theme/components/avatar.ts +2 -2
  79. package/src/theme/components/badge.ts +6 -6
  80. package/src/theme/components/bottomNavigation.ts +2 -2
  81. package/src/theme/components/bottomSheet.ts +3 -3
  82. package/src/theme/components/button.ts +20 -20
  83. package/src/theme/components/calendar.ts +4 -4
  84. package/src/theme/components/card.ts +5 -5
  85. package/src/theme/components/checkbox.ts +1 -1
  86. package/src/theme/components/divider.ts +1 -1
  87. package/src/theme/components/drawer.ts +4 -4
  88. package/src/theme/components/empty.ts +3 -4
  89. package/src/theme/components/fab.ts +7 -7
  90. package/src/theme/components/icon.ts +4 -3
  91. package/src/theme/components/list.ts +8 -6
  92. package/src/theme/components/pinInput.ts +4 -4
  93. package/src/theme/components/progress.ts +3 -3
  94. package/src/theme/components/richTextEditor.ts +3 -3
  95. package/src/theme/components/sectionHeading.ts +1 -1
  96. package/src/theme/components/select.ts +1 -1
  97. package/src/theme/components/slider.ts +3 -3
  98. package/src/theme/components/spinner.ts +1 -4
  99. package/src/theme/components/switch.ts +7 -7
  100. package/src/theme/components/tabs.ts +5 -5
  101. package/src/theme/components/tag.ts +12 -12
  102. package/src/theme/components/textInput.ts +38 -38
  103. package/src/theme/components/toast.ts +6 -6
  104. package/src/theme/components/toolbar.ts +3 -2
  105. package/src/theme/components/typography.ts +4 -3
  106. package/src/theme/global/colors/global.ts +32 -0
  107. package/src/theme/global/colors/legacySystemPalette.ts +53 -0
  108. package/src/theme/global/colors/swag.ts +21 -34
  109. package/src/theme/global/colors/types.ts +46 -26
  110. package/src/theme/global/colors/work.ts +10 -9
  111. package/types/components/Icon/HeroIcon/index.d.ts +1 -1
  112. package/types/components/Icon/index.d.ts +1 -1
  113. package/types/components/TextInput/StyledTextInput.d.ts +3 -9
  114. package/types/components/TextInput/index.d.ts +4 -4
  115. package/types/components/Toast/__tests__/index.spec.d.ts +1 -0
  116. package/types/components/Toolbar/ToolbarItem.d.ts +1 -1
  117. package/types/components/Typography/Text/StyledText.d.ts +1 -1
  118. package/types/components/Typography/Text/index.d.ts +1 -1
  119. package/types/theme/components/empty.d.ts +0 -1
  120. package/types/theme/components/icon.d.ts +1 -0
  121. package/types/theme/components/list.d.ts +1 -0
  122. package/types/theme/components/spinner.d.ts +1 -4
  123. package/types/theme/components/toolbar.d.ts +1 -0
  124. package/types/theme/components/typography.d.ts +1 -0
  125. package/types/theme/global/colors/global.d.ts +3 -0
  126. package/types/theme/global/colors/legacySystemPalette.d.ts +3 -0
  127. package/types/theme/global/colors/types.d.ts +41 -20
  128. package/types/theme/global/index.d.ts +28 -19
@@ -1,5 +1,5 @@
1
1
  declare type ThemeSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
2
- declare type ThemeIntent = 'text' | 'primary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
2
+ declare type ThemeIntent = 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
3
3
  declare const StyledHeroIcon: import("@emotion/native").StyledComponent<import("react-native-vector-icons/Icon").IconProps & {
4
4
  theme?: import("@emotion/react").Theme;
5
5
  as?: import("react").ElementType<any>;
@@ -9,7 +9,7 @@ export interface IconProps {
9
9
  /**
10
10
  * Intent of the Icon.
11
11
  */
12
- intent?: 'text' | 'primary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
12
+ intent?: 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
13
13
  /**
14
14
  * Size of the Icon.
15
15
  */
@@ -3,6 +3,8 @@ export declare type Variant = 'default' | 'filled' | 'focused' | 'disabled' | 'r
3
3
  declare const StyledContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
4
4
  theme?: import("@emotion/react").Theme;
5
5
  as?: import("react").ElementType<any>;
6
+ } & {
7
+ themeVariant: Variant;
6
8
  }, {}, {
7
9
  ref?: import("react").Ref<View>;
8
10
  }>;
@@ -68,14 +70,6 @@ declare const StyledTextInput: import("@emotion/native").StyledComponent<import(
68
70
  }, {}, {
69
71
  ref?: import("react").Ref<TextInput>;
70
72
  }>;
71
- declare const StyledBorderBackDrop: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
72
- theme?: import("@emotion/react").Theme;
73
- as?: import("react").ElementType<any>;
74
- } & {
75
- themeVariant: Variant;
76
- }, {}, {
77
- ref?: import("react").Ref<View>;
78
- }>;
79
73
  declare const StyledTextInputContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
80
74
  theme?: import("@emotion/react").Theme;
81
75
  as?: import("react").ElementType<any>;
@@ -100,4 +94,4 @@ declare const StyledErrorAndMaxLengthContainer: import("@emotion/native").Styled
100
94
  }, {}, {
101
95
  ref?: import("react").Ref<View>;
102
96
  }>;
103
- export { StyledTextInputContainer, StyledLabel, StyledLabelContainer, StyledAsteriskLabel, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer, StyledBorderBackDrop, StyledErrorAndMaxLengthContainer, };
97
+ export { StyledTextInputContainer, StyledLabel, StyledLabelContainer, StyledAsteriskLabel, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer, StyledErrorAndMaxLengthContainer, };
@@ -1,7 +1,7 @@
1
- import React from "react";
2
- import type { TextInputProps as NativeTextInputProps, StyleProp, ViewStyle, TextStyle } from "react-native";
3
- import type { Variant } from "./StyledTextInput";
4
- import type { IconName } from "../Icon";
1
+ import React from 'react';
2
+ import type { TextInputProps as NativeTextInputProps, StyleProp, ViewStyle, TextStyle } from 'react-native';
3
+ import type { Variant } from './StyledTextInput';
4
+ import type { IconName } from '../Icon';
5
5
  export interface TextInputProps extends NativeTextInputProps {
6
6
  /**
7
7
  * Field label.
@@ -0,0 +1 @@
1
+ export {};
@@ -3,7 +3,7 @@ export interface ToolbarItemProps {
3
3
  /**
4
4
  * Visual intent of the toolbar item.
5
5
  */
6
- intent?: 'primary' | 'info' | 'success' | 'danger' | 'warning';
6
+ intent?: 'primary' | 'secondary' | 'info' | 'success' | 'danger' | 'warning';
7
7
  /**
8
8
  * Icon of the toolbar item.
9
9
  */
@@ -5,7 +5,7 @@ declare const StyledText: import("@emotion/native").StyledComponent<import("reac
5
5
  } & {
6
6
  themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge';
7
7
  themeFontWeight: 'light' | 'regular' | 'semi-bold';
8
- themeIntent: 'body' | 'subdued' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
8
+ themeIntent: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
9
9
  }, {}, {
10
10
  ref?: import("react").Ref<Text>;
11
11
  }>;
@@ -16,7 +16,7 @@ export interface TextProps extends NativeTextProps {
16
16
  /**
17
17
  * Visual intent color to apply to the text.
18
18
  */
19
- intent?: 'body' | 'subdued' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
19
+ intent?: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
20
20
  /**
21
21
  * Additional style.
22
22
  */
@@ -8,7 +8,6 @@ declare const getEmptyTheme: (theme: GlobalTheme) => {
8
8
  text: string;
9
9
  invertedText: string;
10
10
  subduedText: string;
11
- illustrationBackground: string;
12
11
  };
13
12
  sizes: {
14
13
  image: number;
@@ -3,6 +3,7 @@ declare const getIconTheme: (theme: GlobalTheme) => {
3
3
  colors: {
4
4
  text: string;
5
5
  primary: string;
6
+ secondary: string;
6
7
  info: string;
7
8
  danger: string;
8
9
  success: string;
@@ -20,6 +20,7 @@ declare const getListTheme: (theme: GlobalTheme) => {
20
20
  };
21
21
  radii: {
22
22
  card: number;
23
+ basicItem: number;
23
24
  cardShadow: number;
24
25
  leadingStatus: number;
25
26
  };
@@ -1,10 +1,7 @@
1
1
  import type { GlobalTheme } from '../global';
2
2
  declare const getSpinnerTheme: (theme: GlobalTheme) => {
3
3
  colors: {
4
- dot1: string;
5
- dot2: string;
6
- dot3: string;
7
- dot4: string;
4
+ dot: string;
8
5
  };
9
6
  space: {
10
7
  spinnerDot: {
@@ -4,6 +4,7 @@ declare const getToolbarTheme: (theme: GlobalTheme) => {
4
4
  background: string;
5
5
  border: string;
6
6
  primary: string;
7
+ secondary: string;
7
8
  info: string;
8
9
  success: string;
9
10
  danger: string;
@@ -4,6 +4,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
4
4
  body: string;
5
5
  subdued: string;
6
6
  primary: string;
7
+ secondary: string;
7
8
  info: string;
8
9
  danger: string;
9
10
  warning: string;
@@ -0,0 +1,3 @@
1
+ import type { GlobalSystemPalette } from './types';
2
+ declare const globalPalette: GlobalSystemPalette;
3
+ export default globalPalette;
@@ -0,0 +1,3 @@
1
+ import type { LegacySystemPalette } from './types';
2
+ declare const legacySystemPalette: LegacySystemPalette;
3
+ export default legacySystemPalette;
@@ -1,4 +1,43 @@
1
- export declare type SystemPalette = {
1
+ export declare type GlobalSystemPalette = {
2
+ globalPrimary: string;
3
+ mutedGlobalPrimary: string;
4
+ onGlobalPrimary: string;
5
+ globalSecondary: string;
6
+ globalPrimaryOutline: string;
7
+ globalSecondaryOutline: string;
8
+ defaultGlobalSurface: string;
9
+ onDefaultGlobalSurface: string;
10
+ neutralGlobalSurface: string;
11
+ disabledOnDefaultGlobalSurface: string;
12
+ error: string;
13
+ errorSurface: string;
14
+ onErrorSurface: string;
15
+ warning: string;
16
+ warningSurface: string;
17
+ onWarningSurface: string;
18
+ success: string;
19
+ successSurface: string;
20
+ onSuccessSurface: string;
21
+ info: string;
22
+ infoSurface: string;
23
+ onInfoSurface: string;
24
+ archived: string;
25
+ archivedSurface: string;
26
+ onArchivedSurface: string;
27
+ };
28
+ export declare type BrandSystemPalette = {
29
+ primary: string;
30
+ mutedPrimary: string;
31
+ onPrimary: string;
32
+ secondary: string;
33
+ highlightedSecondarySurface: string;
34
+ onSecondary: string;
35
+ mutedSecondary: string;
36
+ disabledSecondary: string;
37
+ highlightedSurface: string;
38
+ lightHighlightedSurface: string;
39
+ };
40
+ export declare type LegacySystemPalette = {
2
41
  globalPrimary: string;
3
42
  globalPrimaryLight: string;
4
43
  globalPrimaryBackground: string;
@@ -42,23 +81,5 @@ export declare type SystemPalette = {
42
81
  black: string;
43
82
  inactiveBackground: string;
44
83
  shadow: string;
45
- __alpha__globalPrimary: string;
46
- __alpha__globalSecondary1: string;
47
- __alpha__globalSecondary4: string;
48
- __alpha__globalNeutral3: string;
49
- __alpha__globalLabel1: string;
50
- __alpha__globalLabel2: string;
51
- __alpha__globalLabel3: string;
52
- __alpha__globalLabel4: string;
53
- __alpha__globalLabel5: string;
54
- __alpha__globalLabel6: string;
55
- __alpha__globalLabel7: string;
56
- __alpha__globalLabel8: string;
57
- __alpha__globalLabel9: string;
58
- __alpha__primary1: string;
59
- __alpha__primary2: string;
60
- __alpha__secondary1: string;
61
- __alpha__secondary2: string;
62
- __alpha__secondary3: string;
63
- __alpha__secondary4: string;
64
84
  };
85
+ export declare type SystemPalette = LegacySystemPalette & GlobalSystemPalette & BrandSystemPalette;
@@ -48,25 +48,34 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
48
48
  black: string;
49
49
  inactiveBackground: string;
50
50
  shadow: string;
51
- __alpha__globalPrimary: string;
52
- __alpha__globalSecondary1: string;
53
- __alpha__globalSecondary4: string;
54
- __alpha__globalNeutral3: string;
55
- __alpha__globalLabel1: string;
56
- __alpha__globalLabel2: string;
57
- __alpha__globalLabel3: string;
58
- __alpha__globalLabel4: string;
59
- __alpha__globalLabel5: string;
60
- __alpha__globalLabel6: string;
61
- __alpha__globalLabel7: string;
62
- __alpha__globalLabel8: string;
63
- __alpha__globalLabel9: string;
64
- __alpha__primary1: string;
65
- __alpha__primary2: string;
66
- __alpha__secondary1: string;
67
- __alpha__secondary2: string;
68
- __alpha__secondary3: string;
69
- __alpha__secondary4: string;
51
+ mutedGlobalPrimary: string;
52
+ onGlobalPrimary: string;
53
+ globalSecondary: string;
54
+ globalPrimaryOutline: string;
55
+ globalSecondaryOutline: string;
56
+ defaultGlobalSurface: string;
57
+ onDefaultGlobalSurface: string;
58
+ neutralGlobalSurface: string;
59
+ disabledOnDefaultGlobalSurface: string;
60
+ error: string;
61
+ errorSurface: string;
62
+ onErrorSurface: string;
63
+ warningSurface: string;
64
+ onWarningSurface: string;
65
+ successSurface: string;
66
+ onSuccessSurface: string;
67
+ infoSurface: string;
68
+ onInfoSurface: string;
69
+ archivedSurface: string;
70
+ onArchivedSurface: string;
71
+ mutedPrimary: string;
72
+ onPrimary: string;
73
+ highlightedSecondarySurface: string;
74
+ onSecondary: string;
75
+ mutedSecondary: string;
76
+ disabledSecondary: string;
77
+ highlightedSurface: string;
78
+ lightHighlightedSurface: string;
70
79
  };
71
80
  fonts: import("./typography").Fonts;
72
81
  fontSizes: import("./typography").FontSizes;