@hero-design/rn 7.19.0 → 7.20.1

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 (183) hide show
  1. package/.eslintrc.json +6 -1
  2. package/.turbo/turbo-build.log +2 -2
  3. package/es/index.js +612 -242
  4. package/lib/index.js +612 -241
  5. package/package.json +4 -4
  6. package/src/components/Alert/StyledAlert.tsx +5 -5
  7. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +140 -19
  8. package/src/components/Alert/__tests__/index.spec.tsx +21 -0
  9. package/src/components/Alert/index.tsx +13 -6
  10. package/src/components/Avatar/StyledAvatar.tsx +2 -1
  11. package/src/components/Avatar/index.tsx +2 -1
  12. package/src/components/Box/StyledBox.tsx +54 -0
  13. package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +605 -0
  14. package/src/components/Box/__tests__/helpers.spec.ts +14 -0
  15. package/src/components/Box/__tests__/index.spec.tsx +155 -0
  16. package/src/components/Box/config.ts +201 -0
  17. package/src/components/Box/helpers.ts +10 -0
  18. package/src/components/Box/index.tsx +13 -0
  19. package/src/components/Box/types.ts +38 -0
  20. package/src/components/Calendar/__tests__/index.spec.tsx +13 -17
  21. package/src/components/Card/DataCard/StyledDataCard.tsx +8 -2
  22. package/src/components/Card/DataCard/__tests__/StyledDataCard.spec.tsx +1 -0
  23. package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +16 -0
  24. package/src/components/Card/DataCard/index.tsx +1 -1
  25. package/src/components/Card/StyledCard.tsx +12 -19
  26. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +147 -0
  27. package/src/components/Card/__tests__/index.spec.tsx +18 -0
  28. package/src/components/Card/index.tsx +6 -1
  29. package/src/components/Drawer/DragableDrawer/helpers.ts +3 -4
  30. package/src/components/FAB/ActionGroup/index.tsx +6 -8
  31. package/src/components/RichTextEditor/EditorToolbar.tsx +19 -18
  32. package/src/components/RichTextEditor/RichTextEditor.tsx +7 -2
  33. package/src/components/RichTextEditor/StyledRichTextEditor.ts +0 -2
  34. package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +11 -12
  35. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +2 -10
  36. package/src/components/RichTextEditor/constants.ts +0 -11
  37. package/src/components/RichTextEditor/index.tsx +0 -3
  38. package/src/components/RichTextEditor/types.ts +9 -0
  39. package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
  40. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  41. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +22 -20
  42. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  43. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +22 -20
  44. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  45. package/src/components/Spinner/AnimatedSpinner.tsx +7 -7
  46. package/src/components/Spinner/StyledSpinner.tsx +24 -19
  47. package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +1 -1
  48. package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +32 -16
  49. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +14 -12
  50. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +273 -31
  51. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +14 -12
  52. package/src/components/Spinner/index.tsx +10 -2
  53. package/src/components/Tabs/ScrollableTabs.tsx +9 -4
  54. package/src/components/Tabs/StyledScrollableTabs.tsx +6 -5
  55. package/src/components/Tabs/StyledTabs.tsx +6 -0
  56. package/src/components/Tabs/TabWithBadge.tsx +68 -0
  57. package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +13 -0
  58. package/src/components/Tabs/__tests__/TabWithBadge.spec.tsx +48 -0
  59. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +205 -43
  60. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +165 -0
  61. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +135 -34
  62. package/src/components/Tabs/__tests__/index.spec.tsx +12 -0
  63. package/src/components/Tabs/index.tsx +11 -4
  64. package/src/components/Tag/StyledTag.tsx +1 -11
  65. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +4 -4
  66. package/src/components/Tag/index.tsx +2 -2
  67. package/src/components/TextInput/__tests__/index.spec.tsx +10 -14
  68. package/src/components/Toast/StyledToast.tsx +13 -7
  69. package/src/components/Toast/Toast.tsx +34 -9
  70. package/src/components/Toast/ToastProvider.tsx +15 -12
  71. package/src/components/Toast/__tests__/Toast.spec.tsx +17 -0
  72. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +299 -19
  73. package/src/components/Toast/types.ts +15 -1
  74. package/src/components/Typography/Text/StyledText.tsx +7 -1
  75. package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +1 -0
  76. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +22 -0
  77. package/src/components/Typography/Text/index.tsx +7 -1
  78. package/src/index.ts +2 -0
  79. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +76 -23
  80. package/src/theme/components/.eslintrc.json +10 -0
  81. package/src/theme/components/alert.ts +5 -1
  82. package/src/theme/components/avatar.ts +2 -0
  83. package/src/theme/components/card.ts +6 -7
  84. package/src/theme/components/sectionHeading.ts +1 -1
  85. package/src/theme/components/spinner.ts +19 -7
  86. package/src/theme/components/tabs.ts +3 -2
  87. package/src/theme/components/tag.ts +13 -13
  88. package/src/theme/components/toast.ts +17 -3
  89. package/src/theme/components/typography.ts +2 -0
  90. package/src/theme/global/colors/swag.ts +23 -0
  91. package/src/theme/global/colors/types.ts +23 -0
  92. package/src/theme/global/colors/work.ts +5 -0
  93. package/src/types.ts +0 -2
  94. package/tsconfig.json +4 -15
  95. package/types/components/Accordion/StyledAccordion.d.ts +14 -14
  96. package/types/components/Alert/StyledAlert.d.ts +16 -16
  97. package/types/components/Alert/index.d.ts +1 -1
  98. package/types/components/Avatar/StyledAvatar.d.ts +16 -16
  99. package/types/components/Avatar/index.d.ts +2 -2
  100. package/types/components/Badge/StyledBadge.d.ts +7 -7
  101. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +21 -21
  102. package/types/components/BottomSheet/Header.d.ts +1 -1
  103. package/types/components/BottomSheet/StyledBottomSheet.d.ts +19 -19
  104. package/types/components/Box/StyledBox.d.ts +15 -0
  105. package/types/components/Box/__tests__/helpers.spec.d.ts +1 -0
  106. package/types/components/Box/__tests__/index.spec.d.ts +1 -0
  107. package/types/components/Box/config.d.ts +170 -0
  108. package/types/components/Box/helpers.d.ts +1 -0
  109. package/types/components/Box/index.d.ts +5 -0
  110. package/types/components/Box/types.d.ts +31 -0
  111. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +7 -7
  112. package/types/components/Button/StyledButton.d.ts +16 -16
  113. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +8 -8
  114. package/types/components/Calendar/StyledCalendar.d.ts +25 -25
  115. package/types/components/Calendar/helpers.d.ts +2 -2
  116. package/types/components/Card/DataCard/StyledDataCard.d.ts +7 -7
  117. package/types/components/Card/DataCard/index.d.ts +1 -1
  118. package/types/components/Card/StyledCard.d.ts +7 -6
  119. package/types/components/Card/index.d.ts +5 -1
  120. package/types/components/Checkbox/StyledCheckbox.d.ts +10 -10
  121. package/types/components/Collapse/StyledCollapse.d.ts +8 -8
  122. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +5 -5
  123. package/types/components/DatePicker/StyledDatePicker.d.ts +3 -3
  124. package/types/components/Divider/StyledDivider.d.ts +5 -5
  125. package/types/components/Drawer/StyledDrawer.d.ts +19 -19
  126. package/types/components/Empty/StyledEmpty.d.ts +12 -12
  127. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +11 -11
  128. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +7 -7
  129. package/types/components/FAB/StyledFAB.d.ts +8 -8
  130. package/types/components/Icon/HeroIcon/index.d.ts +3 -3
  131. package/types/components/List/StyledBasicListItem.d.ts +14 -14
  132. package/types/components/List/StyledListItem.d.ts +23 -23
  133. package/types/components/PinInput/StyledPinInput.d.ts +30 -30
  134. package/types/components/Progress/StyledProgressBar.d.ts +5 -5
  135. package/types/components/Progress/StyledProgressCircle.d.ts +18 -18
  136. package/types/components/Radio/StyledRadio.d.ts +9 -9
  137. package/types/components/RichTextEditor/EditorToolbar.d.ts +2 -2
  138. package/types/components/RichTextEditor/MentionList.d.ts +1 -1
  139. package/types/components/RichTextEditor/RichTextEditor.d.ts +4 -0
  140. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +6 -6
  141. package/types/components/RichTextEditor/StyledToolbar.d.ts +9 -9
  142. package/types/components/RichTextEditor/constants.d.ts +0 -10
  143. package/types/components/RichTextEditor/index.d.ts +2 -4
  144. package/types/components/RichTextEditor/types.d.ts +1 -0
  145. package/types/components/SectionHeading/StyledHeading.d.ts +9 -9
  146. package/types/components/Select/MultiSelect/Option.d.ts +1 -1
  147. package/types/components/Select/SingleSelect/Option.d.ts +1 -1
  148. package/types/components/Select/StyledSelect.d.ts +11 -11
  149. package/types/components/Select/helpers.d.ts +1 -1
  150. package/types/components/Spinner/AnimatedSpinner.d.ts +3 -1
  151. package/types/components/Spinner/StyledSpinner.d.ts +14 -12
  152. package/types/components/Spinner/index.d.ts +5 -1
  153. package/types/components/Switch/StyledSwitch.d.ts +5 -5
  154. package/types/components/Tabs/StyledScrollableTabs.d.ts +24 -22
  155. package/types/components/Tabs/StyledTabs.d.ts +26 -20
  156. package/types/components/Tabs/TabWithBadge.d.ts +17 -0
  157. package/types/components/Tabs/__tests__/TabWithBadge.spec.d.ts +1 -0
  158. package/types/components/Tabs/index.d.ts +3 -1
  159. package/types/components/Tag/StyledTag.d.ts +6 -6
  160. package/types/components/Tag/index.d.ts +1 -1
  161. package/types/components/TextInput/StyledTextInput.d.ts +44 -44
  162. package/types/components/TextInput/index.d.ts +5 -5
  163. package/types/components/TimePicker/StyledTimePicker.d.ts +3 -3
  164. package/types/components/Toast/StyledToast.d.ts +19 -18
  165. package/types/components/Toast/types.d.ts +2 -1
  166. package/types/components/Toolbar/StyledToolbar.d.ts +9 -9
  167. package/types/components/Typography/Text/StyledText.d.ts +4 -4
  168. package/types/components/Typography/Text/index.d.ts +1 -1
  169. package/types/index.d.ts +2 -1
  170. package/types/testHelpers/renderWithTheme.d.ts +1 -1
  171. package/types/theme/ThemeSwitcher.d.ts +1 -1
  172. package/types/theme/components/alert.d.ts +5 -1
  173. package/types/theme/components/avatar.d.ts +2 -0
  174. package/types/theme/components/card.d.ts +6 -7
  175. package/types/theme/components/spinner.d.ts +17 -5
  176. package/types/theme/components/tabs.d.ts +1 -0
  177. package/types/theme/components/tag.d.ts +2 -2
  178. package/types/theme/components/toast.d.ts +18 -2
  179. package/types/theme/components/typography.d.ts +2 -0
  180. package/types/theme/global/colors/types.d.ts +17 -0
  181. package/types/theme/global/index.d.ts +17 -0
  182. package/types/types.d.ts +1 -2
  183. package/types/utils/hooks.d.ts +1 -1
@@ -20,7 +20,7 @@ interface AlertProps {
20
20
  /**
21
21
  * Visual intent color to apply to alert.
22
22
  */
23
- intent?: 'success' | 'info' | 'warning' | 'error';
23
+ intent?: 'success' | 'info' | 'warning' | 'error' | 'notification';
24
24
  /**
25
25
  * Closing callback. When onClose is available, an X button will be rendered on the right side of alert. The callback will be called when user clicks on X button.
26
26
  */
@@ -1,45 +1,45 @@
1
1
  import { View, Image, TouchableOpacity, Text } from 'react-native';
2
- declare type ThemeSize = 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge' | 'xxxxlarge';
2
+ declare type ThemeSize = 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge' | 'xxxxlarge' | 'xxxxxlarge';
3
3
  declare type ThemeIntent = 'primary' | 'info' | 'danger' | 'success' | 'warning';
4
4
  declare const StyledPressable: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
5
- theme?: import("@emotion/react").Theme | undefined;
6
- as?: import("react").ElementType<any> | undefined;
5
+ theme?: import("@emotion/react").Theme;
6
+ as?: import("react").ElementType<any>;
7
7
  } & {
8
8
  themeSize: ThemeSize;
9
9
  themeIntent: ThemeIntent;
10
10
  }, {}, {
11
- ref?: import("react").Ref<TouchableOpacity> | undefined;
11
+ ref?: import("react").Ref<TouchableOpacity>;
12
12
  }>;
13
13
  declare const StyledView: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
14
- theme?: import("@emotion/react").Theme | undefined;
15
- as?: import("react").ElementType<any> | undefined;
14
+ theme?: import("@emotion/react").Theme;
15
+ as?: import("react").ElementType<any>;
16
16
  } & {
17
17
  themeSize: ThemeSize;
18
18
  themeIntent: ThemeIntent;
19
19
  }, {}, {
20
- ref?: import("react").Ref<View> | undefined;
20
+ ref?: import("react").Ref<View>;
21
21
  }>;
22
22
  declare const StyledTextWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
23
- theme?: import("@emotion/react").Theme | undefined;
24
- as?: import("react").ElementType<any> | undefined;
23
+ theme?: import("@emotion/react").Theme;
24
+ as?: import("react").ElementType<any>;
25
25
  }, {}, {
26
- ref?: import("react").Ref<View> | undefined;
26
+ ref?: import("react").Ref<View>;
27
27
  }>;
28
28
  declare const StyledText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
29
- theme?: import("@emotion/react").Theme | undefined;
30
- as?: import("react").ElementType<any> | undefined;
29
+ theme?: import("@emotion/react").Theme;
30
+ as?: import("react").ElementType<any>;
31
31
  } & {
32
32
  themeSize: ThemeSize;
33
33
  themeIntent: ThemeIntent;
34
34
  }, {}, {
35
- ref?: import("react").Ref<Text> | undefined;
35
+ ref?: import("react").Ref<Text>;
36
36
  }>;
37
37
  declare const StyledImage: import("@emotion/native").StyledComponent<import("react-native").ImageProps & {
38
- theme?: import("@emotion/react").Theme | undefined;
39
- as?: import("react").ElementType<any> | undefined;
38
+ theme?: import("@emotion/react").Theme;
39
+ as?: import("react").ElementType<any>;
40
40
  } & {
41
41
  themeSize: ThemeSize;
42
42
  }, {}, {
43
- ref?: import("react").Ref<Image> | undefined;
43
+ ref?: import("react").Ref<Image>;
44
44
  }>;
45
45
  export { StyledPressable, StyledView, StyledImage, StyledTextWrapper, StyledText, };
@@ -11,7 +11,7 @@ interface AvatarProps extends ViewProps {
11
11
  */
12
12
  intent?: 'primary' | 'info' | 'danger' | 'success' | 'warning';
13
13
  /** Size of the avatar. */
14
- size?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge' | 'xxxxlarge';
14
+ size?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge' | 'xxxxlarge' | 'xxxxxlarge';
15
15
  /**
16
16
  * Additional style.
17
17
  */
@@ -21,5 +21,5 @@ interface AvatarProps extends ViewProps {
21
21
  */
22
22
  testID?: string;
23
23
  }
24
- declare const Avatar: ({ onPress, source, testID, style, title, size, intent, }: AvatarProps) => JSX.Element | null;
24
+ declare const Avatar: ({ onPress, source, testID, style, title, size, intent, }: AvatarProps) => JSX.Element;
25
25
  export default Avatar;
@@ -4,23 +4,23 @@ declare type ThemePadding = 'narrowContent' | 'wideContent';
4
4
  declare const StyledView: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
5
5
  children?: import("react").ReactNode;
6
6
  } & {
7
- theme?: import("@emotion/react").Theme | undefined;
8
- as?: import("react").ElementType<any> | undefined;
7
+ theme?: import("@emotion/react").Theme;
8
+ as?: import("react").ElementType<any>;
9
9
  } & {
10
10
  themeIntent: ThemeIntent;
11
11
  themePadding: ThemePadding;
12
12
  }, {}, {}>;
13
13
  declare const StyledText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
14
- theme?: import("@emotion/react").Theme | undefined;
15
- as?: import("react").ElementType<any> | undefined;
14
+ theme?: import("@emotion/react").Theme;
15
+ as?: import("react").ElementType<any>;
16
16
  }, {}, {
17
- ref?: import("react").Ref<Text> | undefined;
17
+ ref?: import("react").Ref<Text>;
18
18
  }>;
19
19
  declare const StyledStatus: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
20
20
  children?: import("react").ReactNode;
21
21
  } & {
22
- theme?: import("@emotion/react").Theme | undefined;
23
- as?: import("react").ElementType<any> | undefined;
22
+ theme?: import("@emotion/react").Theme;
23
+ as?: import("react").ElementType<any>;
24
24
  } & {
25
25
  themeIntent: ThemeIntent;
26
26
  }, {}, {}>;
@@ -1,27 +1,27 @@
1
1
  import { View } from 'react-native';
2
2
  declare const BottomNavigationTab: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
3
+ theme?: import("@emotion/react").Theme;
4
+ as?: import("react").ElementType<any>;
5
5
  } & {
6
- themeVisibility?: boolean | undefined;
6
+ themeVisibility?: boolean;
7
7
  }, {}, {
8
- ref?: import("react").Ref<View> | undefined;
8
+ ref?: import("react").Ref<View>;
9
9
  }>;
10
10
  declare const BottomNavigationContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
11
- theme?: import("@emotion/react").Theme | undefined;
12
- as?: import("react").ElementType<any> | undefined;
11
+ theme?: import("@emotion/react").Theme;
12
+ as?: import("react").ElementType<any>;
13
13
  }, {}, {
14
- ref?: import("react").Ref<View> | undefined;
14
+ ref?: import("react").Ref<View>;
15
15
  }>;
16
16
  declare const ContentWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
17
- theme?: import("@emotion/react").Theme | undefined;
18
- as?: import("react").ElementType<any> | undefined;
17
+ theme?: import("@emotion/react").Theme;
18
+ as?: import("react").ElementType<any>;
19
19
  }, {}, {
20
- ref?: import("react").Ref<View> | undefined;
20
+ ref?: import("react").Ref<View>;
21
21
  }>;
22
22
  declare const BottomBarWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
23
- theme?: import("@emotion/react").Theme | undefined;
24
- as?: import("react").ElementType<any> | undefined;
23
+ theme?: import("@emotion/react").Theme;
24
+ as?: import("react").ElementType<any>;
25
25
  } & {
26
26
  themeInsets: {
27
27
  top: number;
@@ -30,22 +30,22 @@ declare const BottomBarWrapper: import("@emotion/native").StyledComponent<import
30
30
  left: number;
31
31
  };
32
32
  }, {}, {
33
- ref?: import("react").Ref<View> | undefined;
33
+ ref?: import("react").Ref<View>;
34
34
  }>;
35
35
  declare const BottomBar: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
36
- theme?: import("@emotion/react").Theme | undefined;
37
- as?: import("react").ElementType<any> | undefined;
36
+ theme?: import("@emotion/react").Theme;
37
+ as?: import("react").ElementType<any>;
38
38
  }, {}, {
39
- ref?: import("react").Ref<View> | undefined;
39
+ ref?: import("react").Ref<View>;
40
40
  }>;
41
41
  declare const BottomBarItem: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
42
- theme?: import("@emotion/react").Theme | undefined;
43
- as?: import("react").ElementType<any> | undefined;
42
+ theme?: import("@emotion/react").Theme;
43
+ as?: import("react").ElementType<any>;
44
44
  }, {}, {
45
- ref?: import("react").Ref<View> | undefined;
45
+ ref?: import("react").Ref<View>;
46
46
  }>;
47
47
  declare const StyledBottomBarText: import("@emotion/native").StyledComponent<import("../Typography/Text").TextProps & {
48
- theme?: import("@emotion/react").Theme | undefined;
49
- as?: import("react").ElementType<any> | undefined;
48
+ theme?: import("@emotion/react").Theme;
49
+ as?: import("react").ElementType<any>;
50
50
  }, {}, {}>;
51
51
  export { BottomBar, BottomBarItem, BottomNavigationTab, BottomNavigationContainer, BottomBarWrapper, ContentWrapper, StyledBottomBarText, };
@@ -2,7 +2,7 @@ import type { ReactElement } from 'react';
2
2
  declare const Header: ({ content, showDivider, onRequestClose, showCloseButton, }: {
3
3
  content: string | ReactElement;
4
4
  showDivider: boolean;
5
- onRequestClose?: (() => void) | undefined;
5
+ onRequestClose?: () => void;
6
6
  showCloseButton: boolean;
7
7
  }) => JSX.Element;
8
8
  export default Header;
@@ -1,45 +1,45 @@
1
1
  import { Animated, SafeAreaView, View } from 'react-native';
2
2
  import type { ViewProps } from 'react-native';
3
3
  declare const StyledWrapper: import("@emotion/native").StyledComponent<ViewProps & {
4
- theme?: import("@emotion/react").Theme | undefined;
5
- as?: import("react").ElementType<any> | undefined;
4
+ theme?: import("@emotion/react").Theme;
5
+ as?: import("react").ElementType<any>;
6
6
  }, {}, {
7
- ref?: import("react").Ref<View> | undefined;
7
+ ref?: import("react").Ref<View>;
8
8
  }>;
9
9
  declare const StyledBottomSheet: import("@emotion/native").StyledComponent<Animated.AnimatedProps<ViewProps & import("react").RefAttributes<SafeAreaView>> & {
10
10
  children?: import("react").ReactNode;
11
11
  } & {
12
- theme?: import("@emotion/react").Theme | undefined;
13
- as?: import("react").ElementType<any> | undefined;
12
+ theme?: import("@emotion/react").Theme;
13
+ as?: import("react").ElementType<any>;
14
14
  }, {}, {}>;
15
15
  declare const StyledBackdrop: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").PressableProps & import("react").RefAttributes<View>> & {
16
16
  children?: import("react").ReactNode;
17
17
  } & {
18
- theme?: import("@emotion/react").Theme | undefined;
19
- as?: import("react").ElementType<any> | undefined;
18
+ theme?: import("@emotion/react").Theme;
19
+ as?: import("react").ElementType<any>;
20
20
  }, {}, {}>;
21
21
  declare const StyledHeaderWrapper: import("@emotion/native").StyledComponent<ViewProps & {
22
- theme?: import("@emotion/react").Theme | undefined;
23
- as?: import("react").ElementType<any> | undefined;
22
+ theme?: import("@emotion/react").Theme;
23
+ as?: import("react").ElementType<any>;
24
24
  }, {}, {
25
- ref?: import("react").Ref<View> | undefined;
25
+ ref?: import("react").Ref<View>;
26
26
  }>;
27
27
  declare const StyledHeader: import("@emotion/native").StyledComponent<ViewProps & {
28
- theme?: import("@emotion/react").Theme | undefined;
29
- as?: import("react").ElementType<any> | undefined;
28
+ theme?: import("@emotion/react").Theme;
29
+ as?: import("react").ElementType<any>;
30
30
  }, {}, {
31
- ref?: import("react").Ref<View> | undefined;
31
+ ref?: import("react").Ref<View>;
32
32
  }>;
33
33
  declare const StyledFooter: import("@emotion/native").StyledComponent<ViewProps & {
34
- theme?: import("@emotion/react").Theme | undefined;
35
- as?: import("react").ElementType<any> | undefined;
34
+ theme?: import("@emotion/react").Theme;
35
+ as?: import("react").ElementType<any>;
36
36
  }, {}, {
37
- ref?: import("react").Ref<View> | undefined;
37
+ ref?: import("react").Ref<View>;
38
38
  }>;
39
39
  declare const StyledIconWrapper: import("@emotion/native").StyledComponent<ViewProps & {
40
- theme?: import("@emotion/react").Theme | undefined;
41
- as?: import("react").ElementType<any> | undefined;
40
+ theme?: import("@emotion/react").Theme;
41
+ as?: import("react").ElementType<any>;
42
42
  }, {}, {
43
- ref?: import("react").Ref<View> | undefined;
43
+ ref?: import("react").Ref<View>;
44
44
  }>;
45
45
  export { StyledWrapper, StyledHeaderWrapper, StyledHeader, StyledFooter, StyledIconWrapper, StyledBottomSheet, StyledBackdrop, };
@@ -0,0 +1,15 @@
1
+ import { Theme } from '@emotion/react';
2
+ import { View } from 'react-native';
3
+ import { StyleProps } from './types';
4
+ export declare const getThemeValue: (theme: Theme, key: keyof StyleProps, props: StyleProps) => {
5
+ [x: string]: string;
6
+ } | {
7
+ [x: string]: number;
8
+ };
9
+ declare const StyledBox: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
10
+ theme?: Theme;
11
+ as?: import("react").ElementType<any>;
12
+ } & StyleProps, {}, {
13
+ ref?: import("react").Ref<View>;
14
+ }>;
15
+ export { StyledBox };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,170 @@
1
+ declare const config: {
2
+ readonly borderWidth: {
3
+ readonly property: "borderWidth";
4
+ readonly scale: "borderWidths";
5
+ };
6
+ readonly borderBottomWidth: {
7
+ readonly property: "borderBottomWidth";
8
+ readonly scale: "borderWidths";
9
+ };
10
+ readonly borderTopWidth: {
11
+ readonly property: "borderTopWidth";
12
+ readonly scale: "borderWidths";
13
+ };
14
+ readonly borderLeftWidth: {
15
+ readonly property: "borderLeftWidth";
16
+ readonly scale: "borderWidths";
17
+ };
18
+ readonly borderRightWidth: {
19
+ readonly property: "borderRightWidth";
20
+ readonly scale: "borderWidths";
21
+ };
22
+ readonly borderBottomEndRadius: {
23
+ readonly property: "borderBottomEndRadius";
24
+ readonly scale: "radii";
25
+ };
26
+ readonly borderBottomLeftRadius: {
27
+ readonly property: "borderBottomLeftRadius";
28
+ readonly scale: "radii";
29
+ };
30
+ readonly borderBottomRightRadius: {
31
+ readonly property: "borderBottomRightRadius";
32
+ readonly scale: "radii";
33
+ };
34
+ readonly borderBottomStartRadius: {
35
+ readonly property: "borderBottomStartRadius";
36
+ readonly scale: "radii";
37
+ };
38
+ readonly borderTopEndRadius: {
39
+ readonly property: "borderTopEndRadius";
40
+ readonly scale: "radii";
41
+ };
42
+ readonly borderTopLeftRadius: {
43
+ readonly property: "borderTopLeftRadius";
44
+ readonly scale: "radii";
45
+ };
46
+ readonly borderTopRightRadius: {
47
+ readonly property: "borderTopRightRadius";
48
+ readonly scale: "radii";
49
+ };
50
+ readonly borderTopStartRadius: {
51
+ readonly property: "borderTopStartRadius";
52
+ readonly scale: "radii";
53
+ };
54
+ readonly borderRadius: {
55
+ readonly property: "borderRadius";
56
+ readonly scale: "radii";
57
+ };
58
+ readonly margin: {
59
+ readonly property: "margin";
60
+ readonly scale: "space";
61
+ };
62
+ readonly marginBottom: {
63
+ readonly property: "marginBottom";
64
+ readonly scale: "space";
65
+ };
66
+ readonly marginEnd: {
67
+ readonly property: "marginEnd";
68
+ readonly scale: "space";
69
+ };
70
+ readonly marginHorizontal: {
71
+ readonly property: "marginHorizontal";
72
+ readonly scale: "space";
73
+ };
74
+ readonly marginLeft: {
75
+ readonly property: "marginLeft";
76
+ readonly scale: "space";
77
+ };
78
+ readonly marginRight: {
79
+ readonly property: "marginRight";
80
+ readonly scale: "space";
81
+ };
82
+ readonly marginStart: {
83
+ readonly property: "marginStart";
84
+ readonly scale: "space";
85
+ };
86
+ readonly marginTop: {
87
+ readonly property: "marginTop";
88
+ readonly scale: "space";
89
+ };
90
+ readonly marginVertical: {
91
+ readonly property: "marginVertical";
92
+ readonly scale: "space";
93
+ };
94
+ readonly padding: {
95
+ readonly property: "padding";
96
+ readonly scale: "space";
97
+ };
98
+ readonly paddingBottom: {
99
+ readonly property: "paddingBottom";
100
+ readonly scale: "space";
101
+ };
102
+ readonly paddingEnd: {
103
+ readonly property: "paddingEnd";
104
+ readonly scale: "space";
105
+ };
106
+ readonly paddingHorizontal: {
107
+ readonly property: "paddingHorizontal";
108
+ readonly scale: "space";
109
+ };
110
+ readonly paddingLeft: {
111
+ readonly property: "paddingLeft";
112
+ readonly scale: "space";
113
+ };
114
+ readonly paddingRight: {
115
+ readonly property: "paddingRight";
116
+ readonly scale: "space";
117
+ };
118
+ readonly paddingStart: {
119
+ readonly property: "paddingStart";
120
+ readonly scale: "space";
121
+ };
122
+ readonly paddingTop: {
123
+ readonly property: "paddingTop";
124
+ readonly scale: "space";
125
+ };
126
+ readonly paddingVertical: {
127
+ readonly property: "paddingVertical";
128
+ readonly scale: "space";
129
+ };
130
+ readonly backgroundColor: {
131
+ readonly property: "backgroundColor";
132
+ readonly scale: "colors";
133
+ };
134
+ readonly bgColor: {
135
+ readonly property: "backgroundColor";
136
+ readonly scale: "colors";
137
+ };
138
+ readonly borderColor: {
139
+ readonly property: "borderColor";
140
+ readonly scale: "colors";
141
+ };
142
+ readonly borderTopColor: {
143
+ readonly property: "borderTopColor";
144
+ readonly scale: "colors";
145
+ };
146
+ readonly borderBottomColor: {
147
+ readonly property: "borderBottomColor";
148
+ readonly scale: "colors";
149
+ };
150
+ readonly borderStartColor: {
151
+ readonly property: "borderStartColor";
152
+ readonly scale: "colors";
153
+ };
154
+ readonly borderEndColor: {
155
+ readonly property: "borderEndColor";
156
+ readonly scale: "colors";
157
+ };
158
+ readonly borderLeftColor: {
159
+ readonly property: "borderLeftColor";
160
+ readonly scale: "colors";
161
+ };
162
+ readonly borderRightColor: {
163
+ readonly property: "borderRightColor";
164
+ readonly scale: "colors";
165
+ };
166
+ };
167
+ export declare const flexPropsKey: readonly ["alignContent", "alignItems", "alignSelf", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "justifyContent"];
168
+ export declare type ConfigType = typeof config;
169
+ export declare type FlexPropsKeyType = typeof flexPropsKey[number];
170
+ export default config;
@@ -0,0 +1 @@
1
+ export declare const pick: (keys: Array<string>, props: Record<string, any>) => {};
@@ -0,0 +1,5 @@
1
+ import type { BoxViewProps, FlexStyleProps, StyleProps } from './types';
2
+ export interface BoxProps extends StyleProps, FlexStyleProps, BoxViewProps {
3
+ }
4
+ declare const Box: ({ children, style, testID, ...otherProps }: BoxProps) => JSX.Element;
5
+ export default Box;
@@ -0,0 +1,31 @@
1
+ import { StyleProp, ViewStyle, ViewProps } from 'react-native';
2
+ import { SystemPalette } from '../../theme/global';
3
+ import { BorderWidths, Radii } from '../../theme/global/borders';
4
+ import { Space } from '../../theme/global/space';
5
+ import { ConfigType, FlexPropsKeyType } from './config';
6
+ export interface ThemeScale {
7
+ colors: keyof SystemPalette;
8
+ space: keyof Space;
9
+ radii: keyof Radii;
10
+ borderWidths: keyof BorderWidths;
11
+ }
12
+ declare type ConfigKeyType = keyof ConfigType;
13
+ export declare type StyleProps = {
14
+ [key in ConfigKeyType]?: ThemeScale[ConfigType[key]['scale']];
15
+ };
16
+ export declare type FlexStyleProps = Pick<Omit<ViewStyle, keyof StyleProps>, FlexPropsKeyType>;
17
+ export interface BoxViewProps extends ViewProps {
18
+ /**
19
+ * Box's content.
20
+ */
21
+ children?: React.ReactNode;
22
+ /**
23
+ * Addtional styles.
24
+ */
25
+ style?: StyleProp<ViewStyle>;
26
+ /**
27
+ * Testing id of the component.
28
+ */
29
+ testID?: string;
30
+ }
31
+ export {};
@@ -3,18 +3,18 @@ import type { ViewProps } from 'react-native';
3
3
  import type { Theme } from '@emotion/react';
4
4
  declare type ThemeVariant = 'basic-transparent' | 'filled-primary' | 'filled-secondary' | 'filled-danger' | 'outlined-primary' | 'outlined-secondary' | 'outlined-danger' | 'text-primary' | 'text-secondary' | 'text-danger';
5
5
  declare const StyledLoadingIndicatorWrapper: import("@emotion/native").StyledComponent<ViewProps & {
6
- theme?: Theme | undefined;
7
- as?: import("react").ElementType<any> | undefined;
6
+ theme?: Theme;
7
+ as?: import("react").ElementType<any>;
8
8
  }, {}, {
9
- ref?: import("react").Ref<View> | undefined;
9
+ ref?: import("react").Ref<View>;
10
10
  }>;
11
11
  declare const StyledLoadingDot: import("@emotion/native").StyledComponent<ViewProps & {
12
- theme?: Theme | undefined;
13
- as?: import("react").ElementType<any> | undefined;
12
+ theme?: Theme;
13
+ as?: import("react").ElementType<any>;
14
14
  } & {
15
- size?: number | undefined;
15
+ size?: number;
16
16
  themeVariant: ThemeVariant;
17
17
  }, {}, {
18
- ref?: import("react").Ref<View> | undefined;
18
+ ref?: import("react").Ref<View>;
19
19
  }>;
20
20
  export { StyledLoadingIndicatorWrapper, StyledLoadingDot };
@@ -3,37 +3,37 @@ import type { Theme } from '@emotion/react';
3
3
  declare type Intent = 'primary' | 'secondary' | 'danger';
4
4
  declare type ThemeVariant = 'basic-transparent' | 'filled-primary' | 'filled-secondary' | 'filled-danger' | 'outlined-primary' | 'outlined-secondary' | 'outlined-danger' | 'text-primary' | 'text-secondary' | 'text-danger';
5
5
  declare const StyledButtonContainer: import("@emotion/native").StyledComponent<import("react-native").TouchableHighlightProps & {
6
- theme?: Theme | undefined;
7
- as?: import("react").ElementType<any> | undefined;
6
+ theme?: Theme;
7
+ as?: import("react").ElementType<any>;
8
8
  } & {
9
- disabled?: boolean | undefined;
10
- pressed?: boolean | undefined;
9
+ disabled?: boolean;
10
+ pressed?: boolean;
11
11
  themeVariant: ThemeVariant;
12
12
  }, {}, {
13
- ref?: import("react").Ref<TouchableHighlight> | undefined;
13
+ ref?: import("react").Ref<TouchableHighlight>;
14
14
  }>;
15
15
  declare const StyledButtonText: import("@emotion/native").StyledComponent<import("../Typography/Text").TextProps & {
16
- theme?: Theme | undefined;
17
- as?: import("react").ElementType<any> | undefined;
16
+ theme?: Theme;
17
+ as?: import("react").ElementType<any>;
18
18
  } & {
19
- disabled?: boolean | undefined;
20
- pressed?: boolean | undefined;
19
+ disabled?: boolean;
20
+ pressed?: boolean;
21
21
  themeVariant: ThemeVariant;
22
22
  }, {}, {}>;
23
23
  declare const StyledButtonIconWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
24
- theme?: Theme | undefined;
25
- as?: import("react").ElementType<any> | undefined;
24
+ theme?: Theme;
25
+ as?: import("react").ElementType<any>;
26
26
  } & {
27
27
  themePosition: 'left' | 'right';
28
28
  }, {}, {
29
- ref?: import("react").Ref<View> | undefined;
29
+ ref?: import("react").Ref<View>;
30
30
  }>;
31
31
  declare const StyledButtonIcon: import("@emotion/native").StyledComponent<import("../Icon").IconProps & {
32
- theme?: Theme | undefined;
33
- as?: import("react").ElementType<any> | undefined;
32
+ theme?: Theme;
33
+ as?: import("react").ElementType<any>;
34
34
  } & {
35
- disabled?: boolean | undefined;
36
- pressed?: boolean | undefined;
35
+ disabled?: boolean;
36
+ pressed?: boolean;
37
37
  themeVariant: ThemeVariant;
38
38
  }, {}, {}>;
39
39
  export { StyledButtonContainer, StyledButtonText, StyledButtonIconWrapper, StyledButtonIcon, };
@@ -1,17 +1,17 @@
1
1
  import { View, TouchableOpacity } from 'react-native';
2
2
  export declare const ButtonContainer: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
3
+ theme?: import("@emotion/react").Theme;
4
+ as?: import("react").ElementType<any>;
5
5
  }, {}, {
6
- ref?: import("react").Ref<TouchableOpacity> | undefined;
6
+ ref?: import("react").Ref<TouchableOpacity>;
7
7
  }>;
8
8
  export declare const IconWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
9
- theme?: import("@emotion/react").Theme | undefined;
10
- as?: import("react").ElementType<any> | undefined;
9
+ theme?: import("@emotion/react").Theme;
10
+ as?: import("react").ElementType<any>;
11
11
  }, {}, {
12
- ref?: import("react").Ref<View> | undefined;
12
+ ref?: import("react").Ref<View>;
13
13
  }>;
14
14
  export declare const ButtonText: import("@emotion/native").StyledComponent<import("../../Typography/Text").TextProps & {
15
- theme?: import("@emotion/react").Theme | undefined;
16
- as?: import("react").ElementType<any> | undefined;
15
+ theme?: import("@emotion/react").Theme;
16
+ as?: import("react").ElementType<any>;
17
17
  }, {}, {}>;