@utilitywarehouse/hearth-react-native 0.5.0 → 0.7.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 (213) hide show
  1. package/.storybook/main.ts +33 -7
  2. package/.turbo/turbo-build.log +1 -1
  3. package/.turbo/turbo-lint.log +1 -1
  4. package/CHANGELOG.md +14 -0
  5. package/build/components/BottomSheet/BottomSheetBackdrop.js +2 -2
  6. package/build/components/BottomSheet/BottomSheetFlatList.js +2 -2
  7. package/build/components/BottomSheet/BottomSheetHandle.js +2 -2
  8. package/build/components/Button/ButtonIcon.js +2 -1
  9. package/build/components/Button/ButtonRoot.js +2 -6
  10. package/build/components/Button/ButtonText.js +4 -1
  11. package/build/components/Card/Card.context.d.ts +7 -0
  12. package/build/components/Card/CardAction/CardAction.context.d.ts +9 -0
  13. package/build/components/Card/{CardAction.context.js → CardAction/CardAction.context.js} +7 -1
  14. package/build/components/Card/CardAction/CardAction.d.ts +18 -0
  15. package/build/components/Card/CardAction/CardAction.js +7 -0
  16. package/build/components/Card/CardAction/CardAction.props.d.ts +63 -0
  17. package/build/components/Card/CardAction/CardAction.props.js +1 -0
  18. package/build/components/Card/CardAction/CardActionContent.d.ts +6 -0
  19. package/build/components/Card/CardAction/CardActionContent.js +13 -0
  20. package/build/components/Card/CardAction/CardActionHelperText.d.ts +6 -0
  21. package/build/components/Card/CardAction/CardActionHelperText.js +13 -0
  22. package/build/components/Card/CardAction/CardActionIcon.d.ts +9 -0
  23. package/build/components/Card/CardAction/CardActionIcon.js +19 -0
  24. package/build/components/Card/CardAction/CardActionLeadingContent.d.ts +6 -0
  25. package/build/components/Card/CardAction/CardActionLeadingContent.js +5 -0
  26. package/build/components/Card/CardAction/CardActionRoot.d.ts +12 -0
  27. package/build/components/Card/CardAction/CardActionRoot.js +155 -0
  28. package/build/components/Card/CardAction/CardActionText.d.ts +6 -0
  29. package/build/components/Card/CardAction/CardActionText.js +9 -0
  30. package/build/components/Card/CardAction/CardActionTrailingContent.d.ts +6 -0
  31. package/build/components/Card/CardAction/CardActionTrailingContent.js +5 -0
  32. package/build/components/Card/CardAction/CardActionTrailingIcon.d.ts +9 -0
  33. package/build/components/Card/CardAction/CardActionTrailingIcon.js +19 -0
  34. package/build/components/Card/CardAction/index.d.ts +10 -0
  35. package/build/components/Card/CardAction/index.js +9 -0
  36. package/build/components/Card/CardContent.d.ts +6 -0
  37. package/build/components/Card/CardContent.js +33 -0
  38. package/build/components/Card/CardPressHandler.context.d.ts +6 -0
  39. package/build/components/Card/CardPressHandler.context.js +6 -0
  40. package/build/components/Card/{CardAction.d.ts → CardPressHandler.d.ts} +3 -3
  41. package/build/components/Card/CardPressHandler.js +13 -0
  42. package/build/components/Card/CardRoot.js +103 -11
  43. package/build/components/Card/index.d.ts +3 -2
  44. package/build/components/Card/index.js +3 -2
  45. package/build/components/Checkbox/CheckboxIcon.js +2 -1
  46. package/build/components/Container/Container.d.ts +6 -0
  47. package/build/components/Container/Container.js +40 -0
  48. package/build/components/Container/Container.props.d.ts +85 -0
  49. package/build/components/Container/Container.props.js +1 -0
  50. package/build/components/Container/index.d.ts +2 -0
  51. package/build/components/Container/index.js +1 -0
  52. package/build/components/CurrencyInput/CurrencyInput.js +1 -1
  53. package/build/components/Helper/HelperIcon.js +2 -1
  54. package/build/components/Icon/Icon.d.ts +2 -6
  55. package/build/components/IconButton/IconButtonIcon.js +2 -1
  56. package/build/components/IconContainer/IconContainer.d.ts +4 -3
  57. package/build/components/IconContainer/IconContainer.js +3 -3
  58. package/build/components/Input/InputField.js +4 -2
  59. package/build/components/Input/InputIcon.js +2 -1
  60. package/build/components/Link/LinkIcon.js +3 -2
  61. package/build/components/List/ListAction/ListActionTrailingIcon.js +2 -1
  62. package/build/components/List/ListItem/ListItemIcon.js +2 -1
  63. package/build/components/List/ListItem/ListItemTrailingIcon.js +2 -3
  64. package/build/components/ProgressStepper/ProgressStep.d.ts +1 -1
  65. package/build/components/ProgressStepper/ProgressStep.js +6 -6
  66. package/build/components/ProgressStepper/ProgressStepper.props.d.ts +3 -3
  67. package/build/components/ProgressStepper/index.d.ts +1 -1
  68. package/build/components/Radio/RadioIcon.js +7 -2
  69. package/build/components/RadioCard/RadioCardIcon.js +3 -2
  70. package/build/components/Spinner/Spinner.js +2 -0
  71. package/build/components/Spinner/Spinner.web.js +2 -0
  72. package/build/components/Switch/Switch.js +5 -3
  73. package/build/components/Switch/Switch.web.js +1 -0
  74. package/build/components/Tabs/TabsList.js +6 -1
  75. package/build/components/Textarea/TextareaField.js +1 -1
  76. package/build/components/ThemedImage/ThemedImage.d.ts +12 -0
  77. package/build/components/ThemedImage/ThemedImage.js +27 -0
  78. package/build/components/ThemedImage/ThemedImage.props.d.ts +13 -0
  79. package/build/components/ThemedImage/ThemedImage.props.js +1 -0
  80. package/build/components/ThemedImage/index.d.ts +2 -0
  81. package/build/components/ThemedImage/index.js +1 -0
  82. package/build/components/ToggleButton/ToggleButtonIcon.js +2 -1
  83. package/build/components/ToggleButton/ToggleButtonRoot.js +2 -2
  84. package/build/components/UnstyledIconButton/UnstyledIconButtonIcon.js +2 -1
  85. package/build/components/index.d.ts +3 -1
  86. package/build/components/index.js +3 -1
  87. package/build/core/index.d.ts +3 -3
  88. package/build/core/index.js +3 -3
  89. package/build/core/themes.d.ts +24 -12
  90. package/build/hooks/useColorMode.d.ts +1 -1
  91. package/build/hooks/useColorMode.js +7 -8
  92. package/build/hooks/useStyleProps.js +1 -1
  93. package/build/tokens/components/dark/banner.d.ts +19 -0
  94. package/build/tokens/components/dark/banner.js +19 -0
  95. package/build/tokens/components/dark/card-action.d.ts +11 -0
  96. package/build/tokens/components/dark/card-action.js +10 -0
  97. package/build/tokens/components/dark/card-content.d.ts +25 -0
  98. package/build/tokens/components/dark/card-content.js +24 -0
  99. package/build/tokens/components/dark/drawer.d.ts +29 -0
  100. package/build/tokens/components/dark/drawer.js +28 -0
  101. package/build/tokens/components/dark/illustrations.d.ts +0 -1
  102. package/build/tokens/components/dark/illustrations.js +0 -1
  103. package/build/tokens/components/dark/index.d.ts +3 -0
  104. package/build/tokens/components/dark/index.js +3 -0
  105. package/build/tokens/components/light/banner.d.ts +19 -0
  106. package/build/tokens/components/light/banner.js +19 -0
  107. package/build/tokens/components/light/card-action.d.ts +11 -0
  108. package/build/tokens/components/light/card-action.js +10 -0
  109. package/build/tokens/components/light/card-content.d.ts +25 -0
  110. package/build/tokens/components/light/card-content.js +24 -0
  111. package/build/tokens/components/light/drawer.d.ts +29 -0
  112. package/build/tokens/components/light/drawer.js +28 -0
  113. package/build/tokens/components/light/illustrations.d.ts +0 -1
  114. package/build/tokens/components/light/illustrations.js +0 -1
  115. package/build/tokens/components/light/index.d.ts +3 -0
  116. package/build/tokens/components/light/index.js +3 -0
  117. package/build/tokens/layout.d.ts +6 -6
  118. package/build/tokens/layout.js +3 -3
  119. package/build/tokens/typography.d.ts +6 -0
  120. package/build/tokens/typography.js +3 -0
  121. package/docs/components/AllComponents.web.tsx +38 -3
  122. package/docs/components/NextPrevPage.tsx +5 -5
  123. package/docs/components/VariantTitle.tsx +17 -7
  124. package/docs/layout-components.docs.mdx +30 -0
  125. package/package.json +18 -14
  126. package/src/components/BottomSheet/BottomSheetBackdrop.tsx +2 -2
  127. package/src/components/BottomSheet/BottomSheetFlatList.tsx +2 -3
  128. package/src/components/BottomSheet/BottomSheetHandle.tsx +1 -1
  129. package/src/components/Button/ButtonIcon.tsx +2 -1
  130. package/src/components/Button/ButtonRoot.tsx +2 -6
  131. package/src/components/Button/ButtonText.tsx +4 -1
  132. package/src/components/Card/Card.context.ts +7 -0
  133. package/src/components/Card/Card.docs.mdx +212 -14
  134. package/src/components/Card/Card.stories.tsx +50 -3
  135. package/src/components/Card/CardAction/CardAction.context.ts +22 -0
  136. package/src/components/Card/CardAction/CardAction.props.ts +87 -0
  137. package/src/components/Card/CardAction/CardAction.stories.tsx +265 -0
  138. package/src/components/Card/CardAction/CardAction.tsx +10 -0
  139. package/src/components/Card/CardAction/CardActionContent.tsx +20 -0
  140. package/src/components/Card/CardAction/CardActionHelperText.tsx +21 -0
  141. package/src/components/Card/CardAction/CardActionIcon.tsx +32 -0
  142. package/src/components/Card/CardAction/CardActionLeadingContent.tsx +9 -0
  143. package/src/components/Card/CardAction/CardActionRoot.tsx +258 -0
  144. package/src/components/Card/CardAction/CardActionText.tsx +17 -0
  145. package/src/components/Card/CardAction/CardActionTrailingContent.tsx +9 -0
  146. package/src/components/Card/CardAction/CardActionTrailingIcon.tsx +32 -0
  147. package/src/components/Card/CardAction/index.ts +10 -0
  148. package/src/components/Card/CardContent.tsx +40 -0
  149. package/src/components/Card/CardPressHandler.context.ts +12 -0
  150. package/src/components/Card/CardPressHandler.tsx +20 -0
  151. package/src/components/Card/CardRoot.tsx +128 -13
  152. package/src/components/Card/index.ts +3 -2
  153. package/src/components/Checkbox/CheckboxIcon.tsx +2 -1
  154. package/src/components/Container/Container.docs.mdx +168 -0
  155. package/src/components/Container/Container.props.ts +89 -0
  156. package/src/components/Container/Container.stories.tsx +274 -0
  157. package/src/components/Container/Container.tsx +52 -0
  158. package/src/components/Container/index.tsx +2 -0
  159. package/src/components/CurrencyInput/CurrencyInput.tsx +1 -1
  160. package/src/components/Helper/HelperIcon.tsx +2 -1
  161. package/src/components/Icon/Icon.tsx +4 -3
  162. package/src/components/IconButton/IconButtonIcon.tsx +2 -1
  163. package/src/components/IconContainer/IconContainer.tsx +17 -19
  164. package/src/components/Input/InputField.tsx +2 -1
  165. package/src/components/Input/InputIcon.tsx +2 -1
  166. package/src/components/Link/LinkIcon.tsx +3 -2
  167. package/src/components/List/ListAction/ListActionTrailingIcon.tsx +2 -1
  168. package/src/components/List/ListItem/ListItemIcon.tsx +2 -1
  169. package/src/components/List/ListItem/ListItemTrailingIcon.tsx +2 -3
  170. package/src/components/ProgressStepper/ProgressStep.tsx +8 -8
  171. package/src/components/ProgressStepper/ProgressStepper.docs.mdx +11 -11
  172. package/src/components/ProgressStepper/ProgressStepper.props.ts +3 -3
  173. package/src/components/ProgressStepper/ProgressStepper.stories.tsx +27 -27
  174. package/src/components/ProgressStepper/index.ts +1 -1
  175. package/src/components/Radio/RadioIcon.tsx +8 -3
  176. package/src/components/RadioCard/RadioCardIcon.tsx +4 -3
  177. package/src/components/Spinner/Spinner.tsx +2 -0
  178. package/src/components/Spinner/Spinner.web.tsx +2 -0
  179. package/src/components/Switch/Switch.tsx +10 -5
  180. package/src/components/Switch/Switch.web.tsx +5 -0
  181. package/src/components/Tabs/TabsList.tsx +2 -0
  182. package/src/components/Textarea/TextareaField.tsx +1 -1
  183. package/src/components/ThemedImage/ThemedImage.docs.mdx +208 -0
  184. package/src/components/ThemedImage/ThemedImage.props.ts +15 -0
  185. package/src/components/ThemedImage/ThemedImage.stories.tsx +175 -0
  186. package/src/components/ThemedImage/ThemedImage.tsx +34 -0
  187. package/src/components/ThemedImage/index.tsx +2 -0
  188. package/src/components/ToggleButton/ToggleButtonIcon.tsx +2 -1
  189. package/src/components/ToggleButton/ToggleButtonRoot.tsx +2 -2
  190. package/src/components/UnstyledIconButton/UnstyledIconButtonIcon.tsx +2 -1
  191. package/src/components/index.ts +3 -9
  192. package/src/core/index.ts +14 -11
  193. package/src/hooks/useColorMode.ts +9 -12
  194. package/src/hooks/useStyleProps.ts +1 -1
  195. package/src/tokens/components/dark/banner.ts +19 -0
  196. package/src/tokens/components/dark/card-action.ts +11 -0
  197. package/src/tokens/components/dark/card-content.ts +25 -0
  198. package/src/tokens/components/dark/drawer.ts +29 -0
  199. package/src/tokens/components/dark/illustrations.ts +0 -1
  200. package/src/tokens/components/dark/index.ts +3 -0
  201. package/src/tokens/components/light/banner.ts +19 -0
  202. package/src/tokens/components/light/card-action.ts +11 -0
  203. package/src/tokens/components/light/card-content.ts +25 -0
  204. package/src/tokens/components/light/drawer.ts +29 -0
  205. package/src/tokens/components/light/illustrations.ts +0 -1
  206. package/src/tokens/components/light/index.ts +3 -0
  207. package/src/tokens/layout.ts +3 -3
  208. package/src/tokens/typography.ts +3 -0
  209. package/src/vite-env.d.ts +6 -0
  210. package/build/components/Card/CardAction.context.d.ts +0 -6
  211. package/build/components/Card/CardAction.js +0 -13
  212. package/src/components/Card/CardAction.context.ts +0 -12
  213. package/src/components/Card/CardAction.tsx +0 -18
@@ -0,0 +1,34 @@
1
+ import { isValidElement } from 'react';
2
+ import { Image } from 'react-native';
3
+ import useColorMode from '../../hooks/useColorMode';
4
+ import type ThemedImageProps from './ThemedImage.props';
5
+
6
+ /**
7
+ * ThemedImage component that displays different images or components based on the current theme
8
+ * @param light - Image source or SVG component to display in light mode
9
+ * @param dark - Image source or SVG component to display in dark mode
10
+ * @param ...rest - All other Image props including width/height for SVG components
11
+ */
12
+ const ThemedImage = ({ light, dark, ...props }: ThemedImageProps) => {
13
+ const [colorMode] = useColorMode();
14
+
15
+ const source = colorMode === 'light' ? light : dark;
16
+
17
+ // If the source is a React element (like an SVG component), render it directly
18
+ if (isValidElement(source)) {
19
+ return source;
20
+ }
21
+
22
+ // If the source is a component type (function/class), instantiate it with props
23
+ if (typeof source === 'function') {
24
+ const Source = source as React.ComponentType<any>;
25
+ return <Source {...props} />;
26
+ }
27
+
28
+ // Otherwise, render as a regular Image with the source
29
+ return <Image source={source} {...props} />;
30
+ };
31
+
32
+ ThemedImage.displayName = 'ThemedImage';
33
+
34
+ export default ThemedImage;
@@ -0,0 +1,2 @@
1
+ export { default as ThemedImage } from './ThemedImage';
2
+ export type { default as ThemedImageProps } from './ThemedImage.props';
@@ -19,7 +19,8 @@ const ButtonIcon = ({
19
19
  {...props}
20
20
  style={
21
21
  Platform.OS === 'web'
22
- ? StyleSheet.compose(styles.icon as StyleProp<ViewStyle>, props.style)
22
+ ? // @ts-ignore
23
+ { ...(styles.icon as StyleProp<ViewStyle>), ...props.style }
23
24
  : [styles.icon as StyleProp<ViewStyle>, props.style]
24
25
  }
25
26
  >
@@ -1,6 +1,6 @@
1
1
  import { GestureResponderEvent, Pressable, ViewStyle } from 'react-native';
2
2
  import { StyleSheet } from 'react-native-unistyles';
3
- import { useCardActionContext } from '../Card';
3
+ import { useCardPressHandlerContext } from '../Card';
4
4
  import type { ToggleButtonProps } from './ToggleButton.props';
5
5
 
6
6
  const ButtonRoot = ({
@@ -12,7 +12,7 @@ const ButtonRoot = ({
12
12
  ...props
13
13
  }: ToggleButtonProps & { states?: { active?: boolean; disabled?: boolean } }) => {
14
14
  const { active } = states || {};
15
- const { pressed } = useCardActionContext();
15
+ const { pressed } = useCardPressHandlerContext();
16
16
 
17
17
  styles.useVariants({
18
18
  toggled,
@@ -12,7 +12,8 @@ const UnstyledIconButtonIcon = ({ children, ...props }: IconProps) => {
12
12
  {...props}
13
13
  style={
14
14
  Platform.OS === 'web'
15
- ? StyleSheet.compose(styles.icon as StyleProp<ViewStyle>, props.style)
15
+ ? // @ts-ignore
16
+ { ...(styles.icon as StyleProp<ViewStyle>), ...props.style }
16
17
  : [styles.icon as ViewStyle, props.style]
17
18
  }
18
19
  >
@@ -10,6 +10,7 @@ export * from './Card';
10
10
  export * from './Carousel';
11
11
  export * from './Center';
12
12
  export * from './Checkbox';
13
+ export * from './Container';
13
14
  export * from './CurrencyInput';
14
15
  export * from './DatePicker';
15
16
  export * from './DatePickerInput';
@@ -42,17 +43,10 @@ export * from './Spinner';
42
43
  export * from './Switch';
43
44
  export * from './Tabs';
44
45
  export * from './Textarea';
46
+ export * from './ThemedImage';
45
47
  export * from './ToggleButtonCard';
46
48
 
47
- export {
48
- FlatList,
49
- Image,
50
- KeyboardAvoidingView,
51
- ScrollView,
52
- SectionList,
53
- StatusBar,
54
- View,
55
- } from 'react-native';
49
+ export { FlatList, Image, KeyboardAvoidingView, ScrollView, SectionList, View } from 'react-native';
56
50
 
57
51
  export { Pressable } from 'react-native';
58
52
 
package/src/core/index.ts CHANGED
@@ -1,27 +1,30 @@
1
1
  import { StyleSheet } from 'react-native-unistyles';
2
- import { themes } from './themes';
3
2
  import { breakpoints } from './breakpoints';
4
- export * from './themes';
5
- export * from './breakpoints';
3
+ import { themes } from './themes';
6
4
  export {
7
- StyleSheet,
8
- UnistylesRuntime,
9
- withUnistyles,
10
- Hide,
5
+ createUnistylesElement,
11
6
  Display,
12
- ScopedTheme,
13
- mq,
14
7
  getServerUnistyles,
15
- useUnistyles,
8
+ Hide,
16
9
  hydrateServerUnistyles,
17
- useServerUnistyles,
10
+ mq,
11
+ NavigationBar,
18
12
  resetServerUnistyles,
13
+ ScopedTheme,
14
+ StatusBar,
15
+ StyleSheet,
16
+ UnistylesRuntime,
17
+ useServerUnistyles,
18
+ useUnistyles,
19
+ withUnistyles,
19
20
  } from 'react-native-unistyles';
20
21
  export type {
21
22
  UnistylesBreakpoints,
22
23
  UnistylesThemes,
23
24
  UnistylesVariants,
24
25
  } from 'react-native-unistyles';
26
+ export * from './breakpoints';
27
+ export * from './themes';
25
28
 
26
29
  StyleSheet.configure({
27
30
  breakpoints,
@@ -1,21 +1,18 @@
1
- import { useEffect, useState } from 'react';
1
+ import { useCallback } from 'react';
2
2
  import { UnistylesRuntime, useUnistyles } from 'react-native-unistyles';
3
3
 
4
4
  const useColorMode = () => {
5
- const {
6
- theme: { colorMode: themeColorMode },
7
- } = useUnistyles();
5
+ const { theme } = useUnistyles();
8
6
 
9
- const [colorMode, setColorMode] = useState<'light' | 'dark'>(
10
- UnistylesRuntime.themeName as 'light' | 'dark'
7
+ const setColorModeWrapper = useCallback(
8
+ (mode: 'light' | 'dark') => {
9
+ if (mode === theme.colorMode) return;
10
+ UnistylesRuntime.setTheme(mode);
11
+ },
12
+ [theme.colorMode]
11
13
  );
12
14
 
13
- useEffect(() => {
14
- if (colorMode === themeColorMode) return;
15
- setColorMode(themeColorMode);
16
- }, [themeColorMode, colorMode]);
17
-
18
- return [colorMode, setColorMode] as const;
15
+ return [theme.colorMode, setColorModeWrapper] as const;
19
16
  };
20
17
 
21
18
  export default useColorMode;
@@ -1,7 +1,7 @@
1
1
  import { useMemo } from 'react';
2
2
  import { ViewStyle } from 'react-native';
3
- import useTheme from './useTheme';
4
3
  import { propStyleMapping, resolveThemeValue, themeStyleMapping, viewStyleProps } from '../utils';
4
+ import useTheme from './useTheme';
5
5
 
6
6
  /**
7
7
  * Type for the return value from useStyleProps
@@ -31,4 +31,23 @@ export default {
31
31
  padding: 16,
32
32
  },
33
33
  imageContainerBorderColor: '#ebebeb',
34
+ banner: {
35
+ illustration: {
36
+ lg: {
37
+ width: 100,
38
+ },
39
+ md: {
40
+ width: 80,
41
+ },
42
+ sm: {
43
+ width: 60,
44
+ },
45
+ xl: {
46
+ width: 120,
47
+ },
48
+ xs: {
49
+ width: 40,
50
+ },
51
+ },
52
+ },
34
53
  } as const;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+
5
+ export default {
6
+ content: {
7
+ gap: 12,
8
+ paddingHorizontal: 16,
9
+ paddingVertical: 12,
10
+ },
11
+ } as const;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+
5
+ export default {
6
+ banner: {
7
+ illustration: {
8
+ lg: {
9
+ width: 100,
10
+ },
11
+ md: {
12
+ width: 80,
13
+ },
14
+ sm: {
15
+ width: 60,
16
+ },
17
+ xl: {
18
+ width: 120,
19
+ },
20
+ xs: {
21
+ width: 40,
22
+ },
23
+ },
24
+ },
25
+ } as const;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+
5
+ export default {
6
+ footer: {
7
+ horizontal: {
8
+ gap: 16,
9
+ },
10
+ padding: 24,
11
+ vertical: {
12
+ gap: 8,
13
+ },
14
+ },
15
+ gap: 20,
16
+ heading: {
17
+ gap: 8,
18
+ },
19
+ width: 360,
20
+ mobile: {
21
+ padding: 16,
22
+ },
23
+ tablet: {
24
+ padding: 24,
25
+ },
26
+ desktop: {
27
+ padding: 24,
28
+ },
29
+ } as const;
@@ -4,5 +4,4 @@
4
4
 
5
5
  export default {
6
6
  colorMode: 'dark',
7
- mode: 'dark',
8
7
  } as const;
@@ -12,12 +12,15 @@ export { default as bottomSheet } from './bottom-sheet';
12
12
  export { default as breadcrumb } from './breadcrumb';
13
13
  export { default as button } from './button';
14
14
  export { default as card } from './card';
15
+ export { default as cardAction } from './card-action';
16
+ export { default as cardContent } from './card-content';
15
17
  export { default as carouselControl } from './carousel-control';
16
18
  export { default as checkbox } from './checkbox';
17
19
  export { default as datePicker } from './date-picker';
18
20
  export { default as descriptionList } from './description-list';
19
21
  export { default as dialog } from './dialog';
20
22
  export { default as divider } from './divider';
23
+ export { default as drawer } from './drawer';
21
24
  export { default as expandableCard } from './expandable-card';
22
25
  export { default as formField } from './form-field';
23
26
  export { default as iconButton } from './icon-button';
@@ -31,4 +31,23 @@ export default {
31
31
  padding: 16,
32
32
  },
33
33
  imageContainerBorderColor: '#101010',
34
+ banner: {
35
+ illustration: {
36
+ lg: {
37
+ width: 100,
38
+ },
39
+ md: {
40
+ width: 80,
41
+ },
42
+ sm: {
43
+ width: 60,
44
+ },
45
+ xl: {
46
+ width: 120,
47
+ },
48
+ xs: {
49
+ width: 40,
50
+ },
51
+ },
52
+ },
34
53
  } as const;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+
5
+ export default {
6
+ content: {
7
+ gap: 12,
8
+ paddingHorizontal: 16,
9
+ paddingVertical: 12,
10
+ },
11
+ } as const;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+
5
+ export default {
6
+ banner: {
7
+ illustration: {
8
+ lg: {
9
+ width: 100,
10
+ },
11
+ md: {
12
+ width: 80,
13
+ },
14
+ sm: {
15
+ width: 60,
16
+ },
17
+ xl: {
18
+ width: 120,
19
+ },
20
+ xs: {
21
+ width: 40,
22
+ },
23
+ },
24
+ },
25
+ } as const;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+
5
+ export default {
6
+ footer: {
7
+ horizontal: {
8
+ gap: 16,
9
+ },
10
+ padding: 24,
11
+ vertical: {
12
+ gap: 8,
13
+ },
14
+ },
15
+ gap: 20,
16
+ heading: {
17
+ gap: 8,
18
+ },
19
+ width: 360,
20
+ mobile: {
21
+ padding: 16,
22
+ },
23
+ tablet: {
24
+ padding: 24,
25
+ },
26
+ desktop: {
27
+ padding: 24,
28
+ },
29
+ } as const;
@@ -4,5 +4,4 @@
4
4
 
5
5
  export default {
6
6
  colorMode: 'light',
7
- mode: 'light',
8
7
  } as const;
@@ -12,12 +12,15 @@ export { default as bottomSheet } from './bottom-sheet';
12
12
  export { default as breadcrumb } from './breadcrumb';
13
13
  export { default as button } from './button';
14
14
  export { default as card } from './card';
15
+ export { default as cardAction } from './card-action';
16
+ export { default as cardContent } from './card-content';
15
17
  export { default as carouselControl } from './carousel-control';
16
18
  export { default as checkbox } from './checkbox';
17
19
  export { default as datePicker } from './date-picker';
18
20
  export { default as descriptionList } from './description-list';
19
21
  export { default as dialog } from './dialog';
20
22
  export { default as divider } from './divider';
23
+ export { default as drawer } from './drawer';
21
24
  export { default as expandableCard } from './expandable-card';
22
25
  export { default as formField } from './form-field';
23
26
  export { default as iconButton } from './icon-button';
@@ -8,7 +8,7 @@ export const mobile = {
8
8
  minWidth: 320,
9
9
  },
10
10
  container: {
11
- margin: 16,
11
+ marginHorizontal: 16,
12
12
  paddingBottom: 32,
13
13
  paddingTop: 24,
14
14
  width: 360,
@@ -37,7 +37,7 @@ export const tablet = {
37
37
  minWidth: 740,
38
38
  },
39
39
  container: {
40
- margin: 32,
40
+ marginHorizontal: 32,
41
41
  paddingBottom: 32,
42
42
  paddingTop: 24,
43
43
  width: 744,
@@ -66,7 +66,7 @@ export const desktop = {
66
66
  minWidth: 992,
67
67
  },
68
68
  container: {
69
- margin: 32,
69
+ marginHorizontal: 32,
70
70
  paddingBottom: 48,
71
71
  paddingTop: 32,
72
72
  width: 1096,
@@ -86,6 +86,7 @@ export const mobile = {
86
86
  lineHeight: 36,
87
87
  },
88
88
  },
89
+ listSpacing: 16,
89
90
  } as const;
90
91
 
91
92
  export const tablet = {
@@ -172,6 +173,7 @@ export const tablet = {
172
173
  lineHeight: 36,
173
174
  },
174
175
  },
176
+ listSpacing: 16,
175
177
  } as const;
176
178
 
177
179
  export const desktop = {
@@ -258,6 +260,7 @@ export const desktop = {
258
260
  lineHeight: 48,
259
261
  },
260
262
  },
263
+ listSpacing: 16,
261
264
  } as const;
262
265
 
263
266
  const typography = { mobile, tablet, desktop } as const;
package/src/vite-env.d.ts CHANGED
@@ -4,3 +4,9 @@ declare module '*.png' {
4
4
  const value: any;
5
5
  export default value;
6
6
  }
7
+ declare module '*.svg' {
8
+ import React from 'react';
9
+ import { SvgProps } from 'react-native-svg';
10
+ const content: React.FC<SvgProps>;
11
+ export default content;
12
+ }
@@ -1,6 +0,0 @@
1
- interface CardActionContextProps {
2
- pressed?: boolean;
3
- }
4
- export declare const CardActionContext: import("react").Context<CardActionContextProps>;
5
- export declare const useCardActionContext: () => CardActionContextProps;
6
- export {};
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useMemo } from 'react';
3
- import { CardActionContext } from './CardAction.context';
4
- import { useCardContext } from './Card.context';
5
- const CardAction = ({ children }) => {
6
- const { pressed } = useCardContext();
7
- const context = useMemo(() => ({
8
- pressed,
9
- }), [pressed]);
10
- return _jsx(CardActionContext.Provider, { value: context, children: children });
11
- };
12
- CardAction.displayName = 'CardAction';
13
- export default CardAction;
@@ -1,12 +0,0 @@
1
- import { createContext, useContext } from 'react';
2
-
3
- interface CardActionContextProps {
4
- pressed?: boolean;
5
- }
6
-
7
- export const CardActionContext = createContext<CardActionContextProps>({});
8
-
9
- export const useCardActionContext = (): CardActionContextProps => {
10
- const context = useContext(CardActionContext);
11
- return context;
12
- };
@@ -1,18 +0,0 @@
1
- import { PropsWithChildren, useMemo } from 'react';
2
- import { CardActionContext } from './CardAction.context';
3
- import { useCardContext } from './Card.context';
4
-
5
- const CardAction = ({ children }: PropsWithChildren<{ actionToInherit?: string }>) => {
6
- const { pressed } = useCardContext();
7
- const context = useMemo(
8
- () => ({
9
- pressed,
10
- }),
11
- [pressed]
12
- );
13
- return <CardActionContext.Provider value={context}>{children}</CardActionContext.Provider>;
14
- };
15
-
16
- CardAction.displayName = 'CardAction';
17
-
18
- export default CardAction;