@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,274 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Container } from '.';
3
+ import { lightTheme } from '../../core/themes';
4
+ import { BodyText } from '../BodyText';
5
+ import { Box } from '../Box';
6
+
7
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
8
+ const meta = {
9
+ title: 'Stories / Container',
10
+ component: Container,
11
+ parameters: {
12
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
13
+ layout: 'fullscreen',
14
+ },
15
+ // More on argTypes: https://storybook.js.org/docs/api/argtypes
16
+ argTypes: {
17
+ padding: {
18
+ options: Object.keys(lightTheme.space),
19
+ control: 'select',
20
+ description: 'The padding of the container.',
21
+ },
22
+ p: {
23
+ options: Object.keys(lightTheme.space),
24
+ control: 'select',
25
+ description: 'The padding of the container.',
26
+ },
27
+ paddingHorizontal: {
28
+ options: Object.keys(lightTheme.space),
29
+ control: 'select',
30
+ description: 'The horizontal padding of the container.',
31
+ },
32
+ px: {
33
+ options: Object.keys(lightTheme.space),
34
+ control: 'select',
35
+ description: 'The horizontal padding of the container.',
36
+ },
37
+ paddingVertical: {
38
+ options: Object.keys(lightTheme.space),
39
+ control: 'select',
40
+ description: 'The vertical padding of the container.',
41
+ },
42
+ py: {
43
+ options: Object.keys(lightTheme.space),
44
+ control: 'select',
45
+ description: 'The vertical padding of the container.',
46
+ },
47
+ paddingTop: {
48
+ options: Object.keys(lightTheme.space),
49
+ control: 'select',
50
+ description: 'The top padding of the container.',
51
+ },
52
+ pt: {
53
+ options: Object.keys(lightTheme.space),
54
+ control: 'select',
55
+ description: 'The top padding of the container.',
56
+ },
57
+ paddingBottom: {
58
+ options: Object.keys(lightTheme.space),
59
+ control: 'select',
60
+ description: 'The bottom padding of the container.',
61
+ },
62
+ pb: {
63
+ options: Object.keys(lightTheme.space),
64
+ control: 'select',
65
+ description: 'The bottom padding of the container.',
66
+ },
67
+ paddingLeft: {
68
+ options: Object.keys(lightTheme.space),
69
+ control: 'select',
70
+ description: 'The left padding of the container.',
71
+ },
72
+ pl: {
73
+ options: Object.keys(lightTheme.space),
74
+ control: 'select',
75
+ description: 'The left padding of the container.',
76
+ },
77
+ paddingRight: {
78
+ options: Object.keys(lightTheme.space),
79
+ control: 'select',
80
+ description: 'The right padding of the container.',
81
+ },
82
+ pr: {
83
+ options: Object.keys(lightTheme.space),
84
+ control: 'select',
85
+ description: 'The right padding of the container.',
86
+ },
87
+ margin: {
88
+ options: Object.keys(lightTheme.space),
89
+ control: 'select',
90
+ description: 'The margin of the container.',
91
+ },
92
+ m: {
93
+ options: Object.keys(lightTheme.space),
94
+ control: 'select',
95
+ description: 'The margin of the container.',
96
+ },
97
+ marginHorizontal: {
98
+ options: Object.keys(lightTheme.space),
99
+ control: 'select',
100
+ description: 'The horizontal margin of the container.',
101
+ },
102
+ mx: {
103
+ options: Object.keys(lightTheme.space),
104
+ control: 'select',
105
+ description: 'The horizontal margin of the container.',
106
+ },
107
+ marginVertical: {
108
+ options: Object.keys(lightTheme.space),
109
+ control: 'select',
110
+ description: 'The vertical margin of the container.',
111
+ },
112
+ my: {
113
+ options: Object.keys(lightTheme.space),
114
+ control: 'select',
115
+ description: 'The vertical margin of the container.',
116
+ },
117
+ marginTop: {
118
+ options: Object.keys(lightTheme.space),
119
+ control: 'select',
120
+ description: 'The top margin of the container.',
121
+ },
122
+ mt: {
123
+ options: Object.keys(lightTheme.space),
124
+ control: 'select',
125
+ description: 'The top margin of the container.',
126
+ },
127
+ marginBottom: {
128
+ options: Object.keys(lightTheme.space),
129
+ control: 'select',
130
+ description: 'The bottom margin of the container.',
131
+ },
132
+ mb: {
133
+ options: Object.keys(lightTheme.space),
134
+ control: 'select',
135
+ description: 'The bottom margin of the container.',
136
+ },
137
+ marginLeft: {
138
+ options: Object.keys(lightTheme.space),
139
+ control: 'select',
140
+ description: 'The left margin of the container.',
141
+ },
142
+ ml: {
143
+ options: Object.keys(lightTheme.space),
144
+ control: 'select',
145
+ description: 'The left margin of the container.',
146
+ },
147
+ marginRight: {
148
+ options: Object.keys(lightTheme.space),
149
+ control: 'select',
150
+ description: 'The right margin of the container.',
151
+ },
152
+ mr: {
153
+ options: Object.keys(lightTheme.space),
154
+ control: 'select',
155
+ description: 'The right margin of the container.',
156
+ },
157
+ space: {
158
+ options: ['none', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl'],
159
+ control: 'radio',
160
+ description: 'The space between child elements (gap).',
161
+ },
162
+ gap: {
163
+ options: Object.keys(lightTheme.space),
164
+ control: 'select',
165
+ description: 'The space between child elements.',
166
+ },
167
+ backgroundColor: {
168
+ options: ['backgroundBrand', 'backgroundPrimary', 'backgroundSecondary', 'transparent'],
169
+ control: 'select',
170
+ description: 'The background color of the container.',
171
+ },
172
+ bg: {
173
+ options: ['backgroundBrand', 'backgroundPrimary', 'backgroundSecondary', 'transparent'],
174
+ control: 'select',
175
+ description: 'The background color of the container.',
176
+ },
177
+ },
178
+ // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
179
+ args: {
180
+ space: 'md',
181
+ },
182
+ } satisfies Meta<typeof Container>;
183
+
184
+ export default meta;
185
+ type Story = StoryObj<typeof meta>;
186
+
187
+ export const Playground: Story = {
188
+ render: args => (
189
+ <Box backgroundColor="red100">
190
+ <Container {...args} backgroundColor="backgroundSecondary">
191
+ <Box bg="blue400" p="200" borderRadius="md">
192
+ <BodyText>Container content 1</BodyText>
193
+ </Box>
194
+ <Box bg="purple400" p="200" borderRadius="md">
195
+ <BodyText>Container content 2</BodyText>
196
+ </Box>
197
+ <Box bg="piggyPink400" p="200" borderRadius="md">
198
+ <BodyText>Container content 3</BodyText>
199
+ </Box>
200
+ </Container>
201
+ </Box>
202
+ ),
203
+ };
204
+
205
+ export const WithPadding: Story = {
206
+ args: {
207
+ padding: '300',
208
+ },
209
+ render: args => (
210
+ <Box backgroundColor="red100">
211
+ <Container {...args} backgroundColor="backgroundSecondary">
212
+ <Box bg="blue400" p="200" borderRadius="md">
213
+ <BodyText>Container with padding</BodyText>
214
+ </Box>
215
+ </Container>
216
+ </Box>
217
+ ),
218
+ };
219
+
220
+ export const WithMargin: Story = {
221
+ args: {
222
+ margin: '300',
223
+ },
224
+ render: args => (
225
+ <Box backgroundColor="red100">
226
+ <Container {...args} backgroundColor="backgroundSecondary">
227
+ <Box bg="blue400" p="200" borderRadius="md">
228
+ <BodyText>Container with margin</BodyText>
229
+ </Box>
230
+ </Container>
231
+ </Box>
232
+ ),
233
+ };
234
+
235
+ export const WithCustomSpacing: Story = {
236
+ args: {
237
+ space: 'xl',
238
+ paddingHorizontal: '200',
239
+ paddingVertical: '300',
240
+ },
241
+ render: args => (
242
+ <Box backgroundColor="red100">
243
+ <Container {...args} backgroundColor="backgroundSecondary">
244
+ <Box bg="blue400" p="200" borderRadius="md">
245
+ <BodyText>Item 1</BodyText>
246
+ </Box>
247
+ <Box bg="purple400" p="200" borderRadius="md">
248
+ <BodyText>Item 2</BodyText>
249
+ </Box>
250
+ <Box bg="piggyPink400" p="200" borderRadius="md">
251
+ <BodyText>Item 3</BodyText>
252
+ </Box>
253
+ <Box bg="orange400" p="200" borderRadius="md">
254
+ <BodyText>Item 4</BodyText>
255
+ </Box>
256
+ </Container>
257
+ </Box>
258
+ ),
259
+ };
260
+
261
+ export const LayoutTokens: Story = {
262
+ render: () => (
263
+ <Box backgroundColor="red100">
264
+ <Container backgroundColor="backgroundSecondary">
265
+ <Box bg="blue100" p="200" borderRadius="md">
266
+ <BodyText>
267
+ This Container uses the responsive layout tokens from the design system. It will
268
+ automatically adjust margin and padding based on the current breakpoint.
269
+ </BodyText>
270
+ </Box>
271
+ </Container>
272
+ </Box>
273
+ ),
274
+ };
@@ -0,0 +1,52 @@
1
+ import { View } from 'react-native';
2
+ import { StyleSheet } from 'react-native-unistyles';
3
+ import { useStyleProps } from '../../hooks';
4
+ import type ContainerProps from './Container.props';
5
+
6
+ const Container = ({ style, children, space = 'md', ...props }: ContainerProps) => {
7
+ const { computedStyles, remainingProps } = useStyleProps(props);
8
+
9
+ styles.useVariants({ space });
10
+ return (
11
+ <View style={[styles.container(computedStyles), style]} {...remainingProps}>
12
+ {children}
13
+ </View>
14
+ );
15
+ };
16
+
17
+ Container.displayName = 'Container';
18
+
19
+ const styles = StyleSheet.create(theme => ({
20
+ container: extra => ({
21
+ paddingTop:
22
+ typeof extra.padding === 'undefined' && typeof extra.paddingVertical === 'undefined'
23
+ ? {
24
+ base: theme.layout.mobile.container.paddingTop,
25
+ md: theme.layout.tablet.container.paddingTop,
26
+ lg: theme.layout.desktop.container.paddingTop,
27
+ }
28
+ : undefined,
29
+ paddingBottom:
30
+ typeof extra.padding === 'undefined' && typeof extra.paddingVertical === 'undefined'
31
+ ? {
32
+ base: theme.layout.mobile.container.paddingBottom,
33
+ md: theme.layout.tablet.container.paddingBottom,
34
+ lg: theme.layout.desktop.container.paddingBottom,
35
+ }
36
+ : undefined,
37
+ marginHorizontal:
38
+ typeof extra.margin === 'undefined' && typeof extra.marginHorizontal === 'undefined'
39
+ ? {
40
+ base: theme.layout.mobile.container.marginHorizontal,
41
+ md: theme.layout.tablet.container.marginHorizontal,
42
+ lg: theme.layout.desktop.container.marginHorizontal,
43
+ }
44
+ : undefined,
45
+ ...extra,
46
+ variants: {
47
+ space: theme.globalStyle.variants.space,
48
+ },
49
+ }),
50
+ }));
51
+
52
+ export default Container;
@@ -0,0 +1,2 @@
1
+ export { default as Container } from './Container';
2
+ export type { default as ContainerProps } from './Container.props';
@@ -82,7 +82,7 @@ const styles = StyleSheet.create(theme => ({
82
82
  input: {
83
83
  fontSize: theme.typography.mobile.detailText['4xl'].fontSize,
84
84
  fontFamily: theme.typography.mobile.detailText.fontFamily,
85
- fontWeight: theme.typography.mobile.detailText.fontWeight,
85
+ fontWeight: `${theme.typography.mobile.detailText.fontWeight}`,
86
86
  paddingTop: 0,
87
87
  paddingBottom: 0,
88
88
  paddingLeft: 0,
@@ -12,7 +12,8 @@ const HelperIcon = (props: IconProps) => {
12
12
  <Icon
13
13
  style={
14
14
  Platform.OS === 'web'
15
- ? StyleSheet.compose(styles.icon as StyleProp<ViewStyle>, props.style)
15
+ ? // @ts-expect-error - style prop type issue
16
+ { ...(styles.icon as StyleProp<ViewStyle>), ...props.style }
16
17
  : ([styles.icon as StyleProp<ViewStyle>, props.style] as any)
17
18
  }
18
19
  {...props}
@@ -1,4 +1,5 @@
1
1
  import { createIcon } from '@gluestack-ui/icon';
2
+ import type React from 'react';
2
3
  import { useMemo } from 'react';
3
4
  import { Svg } from 'react-native-svg';
4
5
  import { withUnistyles } from 'react-native-unistyles';
@@ -44,8 +45,8 @@ const PrimitiveIcon = withUnistyles(
44
45
 
45
46
  PrimitiveIcon.displayName = 'PrimitiveIcon';
46
47
 
47
- export const Icon = createIcon({
48
- Root: PrimitiveIcon,
49
- });
48
+ export const Icon: React.ForwardRefExoticComponent<IconProps> = createIcon({
49
+ Root: PrimitiveIcon as any,
50
+ }) as React.ForwardRefExoticComponent<IconProps>;
50
51
 
51
52
  export default Icon;
@@ -18,7 +18,8 @@ const IconButtonIcon = (props: IconProps) => {
18
18
  {...props}
19
19
  style={
20
20
  Platform.OS === 'web'
21
- ? StyleSheet.compose(styles.icon as StyleProp<ViewStyle>, props.style)
21
+ ? // @ts-expect-error - style prop type issue
22
+ { ...(styles.icon as StyleProp<ViewStyle>), ...props.style }
22
23
  : [styles.icon as ViewStyle, props.style]
23
24
  }
24
25
  >
@@ -1,27 +1,25 @@
1
1
  import { View } from 'react-native';
2
- import { StyleSheet, withUnistyles } from 'react-native-unistyles';
2
+ import { StyleSheet } from 'react-native-unistyles';
3
3
  import { Icon } from '../Icon';
4
4
  import type IconContainerProps from './IconContainer.props';
5
5
 
6
- const IconContainer = withUnistyles(
7
- ({
8
- icon: IconComp,
9
- size = 'md',
10
- radiusNone = false,
11
- variant = 'subtle',
12
- color = 'pig',
13
- style,
14
- ...props
15
- }: IconContainerProps) => {
16
- styles.useVariants({ size, radiusNone, variant, color });
6
+ const IconContainer = ({
7
+ icon: IconComp,
8
+ size = 'md',
9
+ radiusNone = false,
10
+ variant = 'subtle',
11
+ color = 'pig',
12
+ style,
13
+ ...props
14
+ }: IconContainerProps) => {
15
+ styles.useVariants({ size, radiusNone, variant, color });
17
16
 
18
- return (
19
- <View style={[styles.container, style]} {...props}>
20
- {IconComp ? <Icon as={IconComp} style={styles.icon} /> : null}
21
- </View>
22
- );
23
- }
24
- );
17
+ return (
18
+ <View style={[styles.container, style]} {...props}>
19
+ {IconComp ? <Icon as={IconComp} style={styles.icon} /> : null}
20
+ </View>
21
+ );
22
+ };
25
23
 
26
24
  IconContainer.displayName = 'IconContainer';
27
25
 
@@ -15,6 +15,7 @@ const InputField = ({
15
15
 
16
16
  if (inBottomSheet) {
17
17
  return (
18
+ // @ts-expect-error - BottomSheetTextInput type issue
18
19
  <BottomSheetTextInput
19
20
  placeholderTextColor={color.text.secondary}
20
21
  selectionColor={color.purple[700]}
@@ -52,7 +53,7 @@ const styles = StyleSheet.create(theme => ({
52
53
  color: theme.color.text.primary,
53
54
  fontSize: theme.typography.mobile.bodyText.md.fontSize,
54
55
  fontFamily: theme.typography.mobile.bodyText.fontFamily,
55
- fontWeight: theme.typography.mobile.bodyText.fontWeight,
56
+ fontWeight: `${theme.typography.mobile.bodyText.fontWeight}`,
56
57
  borderWidth: 0,
57
58
  variants: {
58
59
  focused: {
@@ -9,7 +9,8 @@ const InputIcon = ({ children, ...props }: IconProps & { as?: ComponentType }) =
9
9
  {...props}
10
10
  style={
11
11
  Platform.OS === 'web'
12
- ? StyleSheet.compose(styles.icon as StyleProp<ViewStyle>, props.style)
12
+ ? // @ts-expect-error - style prop type issue
13
+ { ...(styles.icon as StyleProp<ViewStyle>), ...props.style }
13
14
  : ([styles.icon as StyleProp<ViewStyle>, props.style] as any)
14
15
  }
15
16
  >
@@ -1,8 +1,8 @@
1
1
  import { Platform, type StyleProp, type ViewStyle } from 'react-native';
2
- import { useLinkContext } from './Link.context';
3
2
  import { StyleSheet } from 'react-native-unistyles';
4
3
  import { Icon } from '../Icon';
5
4
  import IconProps from '../Icon/Icon.props';
5
+ import { useLinkContext } from './Link.context';
6
6
 
7
7
  const LinkIcon = ({ children, ...props }: IconProps) => {
8
8
  const { active, inverted, disabled } = useLinkContext();
@@ -13,7 +13,8 @@ const LinkIcon = ({ children, ...props }: IconProps) => {
13
13
  {...props}
14
14
  style={
15
15
  Platform.OS === 'web'
16
- ? StyleSheet.compose(styles.icon as StyleProp<ViewStyle>, props.style)
16
+ ? // @ts-expect-error - style prop type issue
17
+ { ...(styles.icon as StyleProp<ViewStyle>), ...props.style }
17
18
  : [styles.icon as StyleProp<ViewStyle>, props.style]
18
19
  }
19
20
  >
@@ -10,7 +10,8 @@ const ListActionTrailingIcon = ({ children, ...props }: IconProps & { as?: Compo
10
10
  {...props}
11
11
  style={
12
12
  Platform.OS === 'web'
13
- ? StyleSheet.compose(styles.icon as StyleProp<ViewStyle>, props.style)
13
+ ? // @ts-expect-error - style prop type issue
14
+ { ...(styles.icon as StyleProp<ViewStyle>), ...props.style }
14
15
  : ([styles.icon as StyleProp<ViewStyle>, props.style] as any)
15
16
  }
16
17
  >
@@ -9,7 +9,8 @@ const ListItemIcon = ({ children, ...props }: IconProps & { as?: ComponentType }
9
9
  {...props}
10
10
  style={
11
11
  Platform.OS === 'web'
12
- ? StyleSheet.compose(styles.icon as StyleProp<ViewStyle>, props.style)
12
+ ? // @ts-expect-error - style prop type issue
13
+ { ...(styles.icon as StyleProp<ViewStyle>), ...props.style }
13
14
  : ([styles.icon as StyleProp<ViewStyle>, props.style] as any)
14
15
  }
15
16
  >
@@ -10,7 +10,8 @@ const ListItemTrailingIcon = ({ children, ...props }: IconProps & { as?: Compone
10
10
  {...props}
11
11
  style={
12
12
  Platform.OS === 'web'
13
- ? StyleSheet.compose(styles.icon as StyleProp<ViewStyle>, props.style)
13
+ ? // @ts-expect-error - style prop type issue
14
+ { ...(styles.icon as StyleProp<ViewStyle>), ...props.style }
14
15
  : ([styles.icon as StyleProp<ViewStyle>, props.style] as any)
15
16
  }
16
17
  >
@@ -24,8 +25,6 @@ ListItemTrailingIcon.displayName = 'ListItemTrailingIcon';
24
25
  const styles = StyleSheet.create(theme => ({
25
26
  icon: {
26
27
  color: theme.color.icon.primary,
27
- width: 24,
28
- height: 24,
29
28
  },
30
29
  }));
31
30
 
@@ -11,8 +11,8 @@ interface ProgressStepInternalProps extends ProgressStepProps {
11
11
  isLast?: boolean;
12
12
  }
13
13
 
14
- const ProgressStep = ({ state, index = 0, isLast = false, ...rest }: ProgressStepInternalProps) => {
15
- styles.useVariants({ state, isLast });
14
+ const ProgressStep = ({ status, index = 0, isLast = false, ...rest }: ProgressStepInternalProps) => {
15
+ styles.useVariants({ status, isLast });
16
16
 
17
17
  const renderStepNumber = () => {
18
18
  return (
@@ -26,13 +26,13 @@ const ProgressStep = ({ state, index = 0, isLast = false, ...rest }: ProgressSte
26
26
  <View
27
27
  style={styles.container}
28
28
  accessible
29
- aria-label={`Step ${index + 1}, ${rest.id}, ${state}`}
29
+ aria-label={`Step ${index + 1}, ${rest.id}, ${status}`}
30
30
  {...rest}
31
31
  >
32
32
  <View style={styles.step}>
33
- {state === 'complete' ? (
33
+ {status === 'complete' ? (
34
34
  <Icon as={TickSmallIcon} width={20} height={20} style={styles.text} />
35
- ) : state === 'active' ? (
35
+ ) : status === 'active' ? (
36
36
  <View style={styles.inner}>{renderStepNumber()}</View>
37
37
  ) : (
38
38
  renderStepNumber()
@@ -70,7 +70,7 @@ const styles = StyleSheet.create(theme => ({
70
70
  alignItems: 'center',
71
71
  justifyContent: 'center',
72
72
  variants: {
73
- state: {
73
+ status: {
74
74
  complete: {
75
75
  backgroundColor: theme.color.surface.brand.default,
76
76
  },
@@ -97,7 +97,7 @@ const styles = StyleSheet.create(theme => ({
97
97
  },
98
98
  text: {
99
99
  variants: {
100
- state: {
100
+ status: {
101
101
  complete: {
102
102
  color: theme.color.text.inverted,
103
103
  },
@@ -116,7 +116,7 @@ const styles = StyleSheet.create(theme => ({
116
116
  flex: 1,
117
117
  height: theme.components.progressStepper.bar.height,
118
118
  variants: {
119
- state: {
119
+ status: {
120
120
  complete: {
121
121
  backgroundColor: theme.components.progressStepper.bar.complete.backgroundColor,
122
122
  },
@@ -15,7 +15,7 @@ A form helper component that displays a series of dots connected by lines, showi
15
15
  - [Usage](#usage)
16
16
  - [Examples](#examples)
17
17
  - [API](#api)
18
- - [Step States](#step-states-1)
18
+ - [Step Statuses](#step-statuses-1)
19
19
  - [Accessibility](#accessibility)
20
20
  - [Best Practices](#best-practices)
21
21
 
@@ -29,11 +29,11 @@ The `ProgressStepper` component uses a compound component pattern, making it eas
29
29
  import { ProgressStepper, ProgressStep } from '@hearth/react-native';
30
30
 
31
31
  <ProgressStepper>
32
- <ProgressStep id={"1"} state="complete" />
33
- <ProgressStep id={"2"} state="complete" />
34
- <ProgressStep id={"3"} state="active" />
35
- <ProgressStep id={"4"} state="incomplete" />
36
- <ProgressStep id={"5"} state="incomplete" />
32
+ <ProgressStep id={"1"} status="complete" />
33
+ <ProgressStep id={"2"} status="complete" />
34
+ <ProgressStep id={"3"} status="active" />
35
+ <ProgressStep id={"4"} status="incomplete" />
36
+ <ProgressStep id={"5"} status="incomplete" />
37
37
  </ProgressStepper>
38
38
  ```
39
39
 
@@ -43,11 +43,11 @@ import { ProgressStepper, ProgressStep } from '@hearth/react-native';
43
43
 
44
44
  <Canvas of={ProgressStepperStories.Playground} />
45
45
 
46
- ### Step States
46
+ ### Step Statuses
47
47
 
48
- See how different step states are visualized:
48
+ See how different step statuses are visualized:
49
49
 
50
- <Canvas of={ProgressStepperStories.StepStates} />
50
+ <Canvas of={ProgressStepperStories.StepStatuses} />
51
51
 
52
52
  ### Basic
53
53
 
@@ -66,9 +66,9 @@ See how different step states are visualized:
66
66
  | Prop | Type | Default | Description |
67
67
  |------|------|---------|-------------|
68
68
  | `id` | `string` | Required | Unique identifier for the step |
69
- | `state` | `'complete' \| 'active' \| 'incomplete'` | Required | Current state of the step |
69
+ | `status` | `'complete' \| 'active' \| 'incomplete'` | Required | Current status of the step |
70
70
 
71
- ## Step States
71
+ ## Step Statuses
72
72
 
73
73
  - **complete**: Step has been finished, shows a checkmark icon
74
74
  - **active**: Current step, shows a number with highlighted background
@@ -1,6 +1,6 @@
1
1
  import { ViewProps } from 'react-native';
2
2
 
3
- export type StepState = 'complete' | 'active' | 'incomplete';
3
+ export type StepStatus = 'complete' | 'active' | 'incomplete';
4
4
 
5
5
  export interface ProgressStepperProps extends ViewProps {
6
6
  /**
@@ -15,9 +15,9 @@ export interface ProgressStepProps extends ViewProps {
15
15
  */
16
16
  id: string;
17
17
  /**
18
- * Current state of the step
18
+ * Current status of the step
19
19
  */
20
- state: StepState;
20
+ status: StepStatus;
21
21
  }
22
22
 
23
23
  export interface ProgressStepperRootProps extends ViewProps {