@utilitywarehouse/hearth-react-native 0.4.2 → 0.6.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 (207) hide show
  1. package/.storybook/main.ts +21 -1
  2. package/.turbo/turbo-build.log +1 -1
  3. package/.turbo/turbo-lint.log +1 -1
  4. package/CHANGELOG.md +52 -0
  5. package/build/components/Alert/AlertTitle.js +6 -6
  6. package/build/components/Badge/Badge.js +3 -3
  7. package/build/components/Badge/Badge.props.d.ts +1 -0
  8. package/build/components/Button/ButtonRoot.js +4 -0
  9. package/build/components/Button/ButtonText.js +2 -2
  10. package/build/components/Card/CardRoot.js +1 -1
  11. package/build/components/Carousel/Carousel.context.d.ts +4 -0
  12. package/build/components/Carousel/Carousel.context.js +4 -0
  13. package/build/components/Carousel/Carousel.d.ts +6 -0
  14. package/build/components/Carousel/Carousel.js +278 -0
  15. package/build/components/Carousel/Carousel.props.d.ts +65 -0
  16. package/build/components/Carousel/Carousel.props.js +1 -0
  17. package/build/components/Carousel/CarouselControlItem.d.ts +24 -0
  18. package/build/components/Carousel/CarouselControlItem.js +64 -0
  19. package/build/components/Carousel/CarouselControls.d.ts +4 -0
  20. package/build/components/Carousel/CarouselControls.js +74 -0
  21. package/build/components/Carousel/CarouselItem.d.ts +6 -0
  22. package/build/components/Carousel/CarouselItem.js +38 -0
  23. package/build/components/Carousel/index.d.ts +5 -0
  24. package/build/components/Carousel/index.js +5 -0
  25. package/build/components/Container/Container.d.ts +6 -0
  26. package/build/components/Container/Container.js +40 -0
  27. package/build/components/Container/Container.props.d.ts +85 -0
  28. package/build/components/Container/Container.props.js +1 -0
  29. package/build/components/Container/index.d.ts +2 -0
  30. package/build/components/Container/index.js +1 -0
  31. package/build/components/DescriptionList/DescriptionList.d.ts +1 -1
  32. package/build/components/DescriptionList/DescriptionList.js +2 -2
  33. package/build/components/DescriptionList/DescriptionList.props.d.ts +1 -8
  34. package/build/components/DescriptionList/DescriptionListItem.d.ts +1 -1
  35. package/build/components/DescriptionList/DescriptionListItem.js +4 -3
  36. package/build/components/DescriptionList/DescriptionListItem.props.d.ts +3 -8
  37. package/build/components/IndicatorIconButton/IndicatorIconButton.d.ts +6 -0
  38. package/build/components/IndicatorIconButton/IndicatorIconButton.js +26 -0
  39. package/build/components/IndicatorIconButton/IndicatorIconButton.props.d.ts +8 -0
  40. package/build/components/IndicatorIconButton/IndicatorIconButton.props.js +1 -0
  41. package/build/components/IndicatorIconButton/index.d.ts +2 -0
  42. package/build/components/IndicatorIconButton/index.js +1 -0
  43. package/build/components/Link/LinkText.js +3 -3
  44. package/build/components/List/List.context.d.ts +0 -2
  45. package/build/components/List/List.d.ts +1 -1
  46. package/build/components/List/List.js +5 -5
  47. package/build/components/List/List.props.d.ts +1 -9
  48. package/build/components/List/ListAction/ListAction.d.ts +18 -0
  49. package/build/components/List/ListAction/ListAction.js +103 -0
  50. package/build/components/List/ListAction/ListAction.props.d.ts +8 -0
  51. package/build/components/List/ListAction/ListAction.props.js +1 -0
  52. package/build/components/List/ListAction/ListActionContent.d.ts +6 -0
  53. package/build/components/List/ListAction/ListActionContent.js +14 -0
  54. package/build/components/List/ListAction/ListActionText.d.ts +6 -0
  55. package/build/components/List/ListAction/ListActionText.js +7 -0
  56. package/build/components/List/ListAction/ListActionTrailingContent.d.ts +6 -0
  57. package/build/components/List/ListAction/ListActionTrailingContent.js +5 -0
  58. package/build/components/List/ListAction/ListActionTrailingIcon.d.ts +9 -0
  59. package/build/components/List/ListAction/ListActionTrailingIcon.js +18 -0
  60. package/build/components/List/ListAction/index.d.ts +6 -0
  61. package/build/components/List/ListAction/index.js +5 -0
  62. package/build/components/List/ListItem/ListItem.context.d.ts +1 -1
  63. package/build/components/List/ListItem/ListItem.props.d.ts +9 -5
  64. package/build/components/List/ListItem/ListItemRoot.d.ts +1 -1
  65. package/build/components/List/ListItem/ListItemRoot.js +10 -12
  66. package/build/components/List/ListItem/index.d.ts +4 -4
  67. package/build/components/List/ListItem/index.js +3 -3
  68. package/build/components/List/index.d.ts +1 -0
  69. package/build/components/List/index.js +1 -0
  70. package/build/components/ProgressStepper/ProgressStep.d.ts +10 -0
  71. package/build/components/ProgressStepper/ProgressStep.js +100 -0
  72. package/build/components/ProgressStepper/ProgressStepper.d.ts +6 -0
  73. package/build/components/ProgressStepper/ProgressStepper.js +22 -0
  74. package/build/components/ProgressStepper/ProgressStepper.props.d.ts +22 -0
  75. package/build/components/ProgressStepper/ProgressStepper.props.js +1 -0
  76. package/build/components/ProgressStepper/ProgressStepperRoot.d.ts +6 -0
  77. package/build/components/ProgressStepper/ProgressStepperRoot.js +16 -0
  78. package/build/components/ProgressStepper/index.d.ts +3 -0
  79. package/build/components/ProgressStepper/index.js +2 -0
  80. package/build/components/SectionHeader/SectionHeader.d.ts +1 -1
  81. package/build/components/SectionHeader/SectionHeader.js +6 -3
  82. package/build/components/SectionHeader/SectionHeader.props.d.ts +9 -16
  83. package/build/components/SectionHeader/SectionHeaderTrailingContent.d.ts +6 -0
  84. package/build/components/SectionHeader/SectionHeaderTrailingContent.js +13 -0
  85. package/build/components/SectionHeader/index.d.ts +1 -0
  86. package/build/components/SectionHeader/index.js +1 -0
  87. package/build/components/Tabs/Tab.js +2 -2
  88. package/build/components/ThemedImage/ThemedImage.d.ts +12 -0
  89. package/build/components/ThemedImage/ThemedImage.js +27 -0
  90. package/build/components/ThemedImage/ThemedImage.props.d.ts +13 -0
  91. package/build/components/ThemedImage/ThemedImage.props.js +1 -0
  92. package/build/components/ThemedImage/index.d.ts +2 -0
  93. package/build/components/ThemedImage/index.js +1 -0
  94. package/build/components/ToggleButton/ToggleButtonText.js +2 -2
  95. package/build/components/UnstyledIconButton/UnstyledIconButton.props.d.ts +4 -1
  96. package/build/components/index.d.ts +5 -0
  97. package/build/components/index.js +5 -0
  98. package/build/core/themes.d.ts +12 -24
  99. package/build/hooks/useStyleProps.js +1 -1
  100. package/build/tokens/components/dark/button.d.ts +1 -1
  101. package/build/tokens/components/dark/button.js +1 -1
  102. package/build/tokens/components/dark/dialog.d.ts +1 -0
  103. package/build/tokens/components/dark/dialog.js +1 -0
  104. package/build/tokens/components/dark/illustrations.d.ts +1 -0
  105. package/build/tokens/components/dark/illustrations.js +1 -0
  106. package/build/tokens/components/dark/toast.d.ts +4 -1
  107. package/build/tokens/components/dark/toast.js +4 -1
  108. package/build/tokens/components/light/button.d.ts +1 -1
  109. package/build/tokens/components/light/button.js +1 -1
  110. package/build/tokens/components/light/dialog.d.ts +1 -0
  111. package/build/tokens/components/light/dialog.js +1 -0
  112. package/build/tokens/components/light/illustrations.d.ts +1 -0
  113. package/build/tokens/components/light/illustrations.js +1 -0
  114. package/build/tokens/components/light/toast.d.ts +4 -1
  115. package/build/tokens/components/light/toast.js +4 -1
  116. package/build/tokens/layout.d.ts +6 -12
  117. package/build/tokens/layout.js +3 -6
  118. package/docs/components/AllComponents.web.tsx +122 -5
  119. package/docs/components/BadgeList.tsx +20 -56
  120. package/docs/components/SwitchList.tsx +4 -8
  121. package/docs/getting-started.mdx +30 -14
  122. package/docs/introduction.mdx +1 -1
  123. package/docs/layout-components.docs.mdx +30 -0
  124. package/package.json +6 -4
  125. package/src/components/Alert/AlertTitle.tsx +7 -7
  126. package/src/components/Badge/Badge.props.ts +1 -0
  127. package/src/components/Badge/Badge.tsx +3 -2
  128. package/src/components/Button/ButtonRoot.tsx +4 -0
  129. package/src/components/Button/ButtonText.tsx +3 -3
  130. package/src/components/Card/CardRoot.tsx +2 -0
  131. package/src/components/Carousel/Carousel.context.tsx +8 -0
  132. package/src/components/Carousel/Carousel.docs.mdx +389 -0
  133. package/src/components/Carousel/Carousel.props.ts +89 -0
  134. package/src/components/Carousel/Carousel.stories.tsx +317 -0
  135. package/src/components/Carousel/Carousel.tsx +444 -0
  136. package/src/components/Carousel/CarouselControlItem.tsx +87 -0
  137. package/src/components/Carousel/CarouselControls.tsx +150 -0
  138. package/src/components/Carousel/CarouselItem.tsx +68 -0
  139. package/src/components/Carousel/index.ts +6 -0
  140. package/src/components/Container/Container.docs.mdx +168 -0
  141. package/src/components/Container/Container.props.ts +89 -0
  142. package/src/components/Container/Container.stories.tsx +274 -0
  143. package/src/components/Container/Container.tsx +52 -0
  144. package/src/components/Container/index.tsx +2 -0
  145. package/src/components/DescriptionList/DescriptionList.docs.mdx +24 -27
  146. package/src/components/DescriptionList/DescriptionList.props.ts +1 -8
  147. package/src/components/DescriptionList/DescriptionList.stories.tsx +13 -19
  148. package/src/components/DescriptionList/DescriptionList.tsx +2 -14
  149. package/src/components/DescriptionList/DescriptionListItem.props.ts +3 -8
  150. package/src/components/DescriptionList/DescriptionListItem.tsx +13 -21
  151. package/src/components/IndicatorIconButton/IndicatorIconButton.docs.mdx +85 -0
  152. package/src/components/IndicatorIconButton/IndicatorIconButton.props.ts +12 -0
  153. package/src/components/IndicatorIconButton/IndicatorIconButton.stories.tsx +142 -0
  154. package/src/components/IndicatorIconButton/IndicatorIconButton.tsx +36 -0
  155. package/src/components/IndicatorIconButton/index.tsx +2 -0
  156. package/src/components/Link/LinkText.tsx +4 -4
  157. package/src/components/List/List.context.ts +0 -1
  158. package/src/components/List/List.docs.mdx +376 -179
  159. package/src/components/List/List.props.ts +1 -9
  160. package/src/components/List/List.stories.tsx +289 -38
  161. package/src/components/List/List.tsx +5 -26
  162. package/src/components/List/ListAction/ListAction.props.ts +10 -0
  163. package/src/components/List/ListAction/ListAction.tsx +133 -0
  164. package/src/components/List/ListAction/ListActionContent.tsx +21 -0
  165. package/src/components/List/ListAction/ListActionText.tsx +14 -0
  166. package/src/components/List/ListAction/ListActionTrailingContent.tsx +9 -0
  167. package/src/components/List/ListAction/ListActionTrailingIcon.tsx +32 -0
  168. package/src/components/List/ListAction/index.ts +6 -0
  169. package/src/components/List/ListItem/ListItem.context.ts +1 -1
  170. package/src/components/List/ListItem/ListItem.props.ts +9 -5
  171. package/src/components/List/ListItem/ListItemRoot.tsx +18 -14
  172. package/src/components/List/ListItem/index.ts +4 -4
  173. package/src/components/List/index.ts +1 -0
  174. package/src/components/ProgressStepper/ProgressStep.tsx +134 -0
  175. package/src/components/ProgressStepper/ProgressStepper.docs.mdx +87 -0
  176. package/src/components/ProgressStepper/ProgressStepper.props.ts +27 -0
  177. package/src/components/ProgressStepper/ProgressStepper.stories.tsx +108 -0
  178. package/src/components/ProgressStepper/ProgressStepper.tsx +26 -0
  179. package/src/components/ProgressStepper/ProgressStepperRoot.tsx +32 -0
  180. package/src/components/ProgressStepper/index.ts +3 -0
  181. package/src/components/SectionHeader/SectionHeader.props.ts +9 -16
  182. package/src/components/SectionHeader/SectionHeader.stories.tsx +28 -18
  183. package/src/components/SectionHeader/SectionHeader.tsx +18 -19
  184. package/src/components/SectionHeader/SectionHeaderTrailingContent.tsx +20 -0
  185. package/src/components/SectionHeader/Sectionheader.docs.mdx +9 -24
  186. package/src/components/SectionHeader/index.ts +1 -0
  187. package/src/components/Switch/Switch.docs.mdx +0 -4
  188. package/src/components/Tabs/Tab.tsx +4 -2
  189. package/src/components/ThemedImage/ThemedImage.docs.mdx +208 -0
  190. package/src/components/ThemedImage/ThemedImage.props.ts +15 -0
  191. package/src/components/ThemedImage/ThemedImage.stories.tsx +175 -0
  192. package/src/components/ThemedImage/ThemedImage.tsx +34 -0
  193. package/src/components/ThemedImage/index.tsx +2 -0
  194. package/src/components/ToggleButton/ToggleButtonText.tsx +3 -3
  195. package/src/components/UnstyledIconButton/UnstyledIconButton.props.ts +2 -1
  196. package/src/components/index.ts +5 -0
  197. package/src/hooks/useStyleProps.ts +1 -1
  198. package/src/tokens/components/dark/button.ts +1 -1
  199. package/src/tokens/components/dark/dialog.ts +1 -0
  200. package/src/tokens/components/dark/illustrations.ts +1 -0
  201. package/src/tokens/components/dark/toast.ts +4 -1
  202. package/src/tokens/components/light/button.ts +1 -1
  203. package/src/tokens/components/light/dialog.ts +1 -0
  204. package/src/tokens/components/light/illustrations.ts +1 -0
  205. package/src/tokens/components/light/toast.ts +4 -1
  206. package/src/tokens/layout.ts +3 -6
  207. package/src/vite-env.d.ts +6 -0
@@ -7,8 +7,8 @@ export declare const mobile: {
7
7
  readonly minWidth: 320;
8
8
  };
9
9
  readonly container: {
10
+ readonly margin: 16;
10
11
  readonly paddingBottom: 32;
11
- readonly paddingHorizontal: 16;
12
12
  readonly paddingTop: 24;
13
13
  readonly width: 360;
14
14
  };
@@ -17,7 +17,6 @@ export declare const mobile: {
17
17
  readonly columnWidth: 64;
18
18
  readonly gridSize: 8;
19
19
  readonly gutter: 16;
20
- readonly margin: 16;
21
20
  };
22
21
  readonly spacing: {
23
22
  readonly '2xl': 28;
@@ -36,8 +35,8 @@ export declare const tablet: {
36
35
  readonly minWidth: 740;
37
36
  };
38
37
  readonly container: {
38
+ readonly margin: 32;
39
39
  readonly paddingBottom: 32;
40
- readonly paddingHorizontal: 32;
41
40
  readonly paddingTop: 24;
42
41
  readonly width: 744;
43
42
  };
@@ -46,7 +45,6 @@ export declare const tablet: {
46
45
  readonly columnWidth: 64;
47
46
  readonly gridSize: 8;
48
47
  readonly gutter: 24;
49
- readonly margin: 32;
50
48
  };
51
49
  readonly spacing: {
52
50
  readonly '2xl': 28;
@@ -65,8 +63,8 @@ export declare const desktop: {
65
63
  readonly minWidth: 992;
66
64
  };
67
65
  readonly container: {
66
+ readonly margin: 32;
68
67
  readonly paddingBottom: 48;
69
- readonly paddingHorizontal: 32;
70
68
  readonly paddingTop: 32;
71
69
  readonly width: 1096;
72
70
  };
@@ -75,7 +73,6 @@ export declare const desktop: {
75
73
  readonly columnWidth: 64;
76
74
  readonly gridSize: 8;
77
75
  readonly gutter: 24;
78
- readonly margin: 32;
79
76
  };
80
77
  readonly spacing: {
81
78
  readonly '2xl': 40;
@@ -95,8 +92,8 @@ declare const layout: {
95
92
  readonly minWidth: 320;
96
93
  };
97
94
  readonly container: {
95
+ readonly margin: 16;
98
96
  readonly paddingBottom: 32;
99
- readonly paddingHorizontal: 16;
100
97
  readonly paddingTop: 24;
101
98
  readonly width: 360;
102
99
  };
@@ -105,7 +102,6 @@ declare const layout: {
105
102
  readonly columnWidth: 64;
106
103
  readonly gridSize: 8;
107
104
  readonly gutter: 16;
108
- readonly margin: 16;
109
105
  };
110
106
  readonly spacing: {
111
107
  readonly '2xl': 28;
@@ -124,8 +120,8 @@ declare const layout: {
124
120
  readonly minWidth: 740;
125
121
  };
126
122
  readonly container: {
123
+ readonly margin: 32;
127
124
  readonly paddingBottom: 32;
128
- readonly paddingHorizontal: 32;
129
125
  readonly paddingTop: 24;
130
126
  readonly width: 744;
131
127
  };
@@ -134,7 +130,6 @@ declare const layout: {
134
130
  readonly columnWidth: 64;
135
131
  readonly gridSize: 8;
136
132
  readonly gutter: 24;
137
- readonly margin: 32;
138
133
  };
139
134
  readonly spacing: {
140
135
  readonly '2xl': 28;
@@ -153,8 +148,8 @@ declare const layout: {
153
148
  readonly minWidth: 992;
154
149
  };
155
150
  readonly container: {
151
+ readonly margin: 32;
156
152
  readonly paddingBottom: 48;
157
- readonly paddingHorizontal: 32;
158
153
  readonly paddingTop: 32;
159
154
  readonly width: 1096;
160
155
  };
@@ -163,7 +158,6 @@ declare const layout: {
163
158
  readonly columnWidth: 64;
164
159
  readonly gridSize: 8;
165
160
  readonly gutter: 24;
166
- readonly margin: 32;
167
161
  };
168
162
  readonly spacing: {
169
163
  readonly '2xl': 40;
@@ -7,8 +7,8 @@ export const mobile = {
7
7
  minWidth: 320,
8
8
  },
9
9
  container: {
10
+ margin: 16,
10
11
  paddingBottom: 32,
11
- paddingHorizontal: 16,
12
12
  paddingTop: 24,
13
13
  width: 360,
14
14
  },
@@ -17,7 +17,6 @@ export const mobile = {
17
17
  columnWidth: 64,
18
18
  gridSize: 8,
19
19
  gutter: 16,
20
- margin: 16,
21
20
  },
22
21
  spacing: {
23
22
  '2xl': 28,
@@ -36,8 +35,8 @@ export const tablet = {
36
35
  minWidth: 740,
37
36
  },
38
37
  container: {
38
+ margin: 32,
39
39
  paddingBottom: 32,
40
- paddingHorizontal: 32,
41
40
  paddingTop: 24,
42
41
  width: 744,
43
42
  },
@@ -46,7 +45,6 @@ export const tablet = {
46
45
  columnWidth: 64,
47
46
  gridSize: 8,
48
47
  gutter: 24,
49
- margin: 32,
50
48
  },
51
49
  spacing: {
52
50
  '2xl': 28,
@@ -65,8 +63,8 @@ export const desktop = {
65
63
  minWidth: 992,
66
64
  },
67
65
  container: {
66
+ margin: 32,
68
67
  paddingBottom: 48,
69
- paddingHorizontal: 32,
70
68
  paddingTop: 32,
71
69
  width: 1096,
72
70
  },
@@ -75,7 +73,6 @@ export const desktop = {
75
73
  columnWidth: 64,
76
74
  gridSize: 8,
77
75
  gutter: 24,
78
- margin: 32,
79
76
  },
80
77
  spacing: {
81
78
  '2xl': 40,
@@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
2
2
 
3
3
  import { BottomSheetModalMethods } from '@gorhom/bottom-sheet/lib/typescript/types';
4
4
  import {
5
+ BellMediumIcon,
5
6
  BroadbandMediumIcon,
6
7
  CashbackCardMediumIcon,
7
8
  ChevronRightMediumIcon,
@@ -9,6 +10,10 @@ import {
9
10
  InsuranceMediumIcon,
10
11
  MobileMediumIcon,
11
12
  } from '@utilitywarehouse/hearth-react-native-icons';
13
+ // @ts-ignore
14
+ import SpotBillingDark from '@utilitywarehouse/hearth-svg-assets/lib/spot-billing-dark.svg';
15
+ // @ts-ignore
16
+ import SpotBillingLight from '@utilitywarehouse/hearth-svg-assets/lib/spot-billing-light.svg';
12
17
  import { Pressable, ScrollView, View, ViewProps } from 'react-native';
13
18
  import { StyleSheet } from 'react-native-unistyles';
14
19
  import {
@@ -24,8 +29,11 @@ import {
24
29
  Box,
25
30
  Button,
26
31
  Card,
32
+ Carousel,
33
+ CarouselItem,
27
34
  Center,
28
35
  Checkbox,
36
+ Container,
29
37
  CurrencyInput,
30
38
  DatePicker,
31
39
  DatePickerInput,
@@ -41,6 +49,7 @@ import {
41
49
  Icon,
42
50
  IconButton,
43
51
  IconContainer,
52
+ IndicatorIconButton,
44
53
  InlineLink,
45
54
  Input,
46
55
  LI,
@@ -49,6 +58,8 @@ import {
49
58
  ListItem,
50
59
  Modal,
51
60
  OL,
61
+ ProgressStep,
62
+ ProgressStepper,
52
63
  Radio,
53
64
  RadioCard,
54
65
  RadioCardGroup,
@@ -63,6 +74,7 @@ import {
63
74
  Tabs,
64
75
  TabsList,
65
76
  Textarea,
77
+ ThemedImage,
66
78
  ToggleButtonCard,
67
79
  ToggleButtonCardGroup,
68
80
  UL,
@@ -148,7 +160,7 @@ const AllComponents: React.FC = () => {
148
160
  return (
149
161
  <div className="sb-unstyled">
150
162
  <ScrollView contentContainerStyle={styles.container}>
151
- <Flex direction="row" wrap="wrap" space="md">
163
+ <Flex direction="row" wrap="wrap" space="md" style={styles.grid}>
152
164
  <ComponentWrapper name="Accordion" link="/?path=/docs/components-accordion--docs">
153
165
  <Center flex={1} p="200">
154
166
  <Accordion type="single">
@@ -214,12 +226,63 @@ const AllComponents: React.FC = () => {
214
226
  </ComponentWrapper>
215
227
  <ComponentWrapper name="Card" link="/?path=/docs/components-card--docs">
216
228
  <Center flex={1}>
217
- <Card colorScheme="white">
229
+ <Card colorScheme="neutralStrong">
218
230
  <Heading>I am a card</Heading>
219
231
  <BodyText>And do card stuff.</BodyText>
220
232
  </Card>
221
233
  </Center>
222
234
  </ComponentWrapper>
235
+ <ComponentWrapper name="Carousel" link="/?path=/docs/components-carousel--docs">
236
+ <Center flex={1}>
237
+ <Carousel itemWidth={150} centered width={150}>
238
+ <CarouselItem>
239
+ <Box
240
+ backgroundColor="blue700"
241
+ width={150}
242
+ height={100}
243
+ px="100"
244
+ borderRadius="md"
245
+ >
246
+ <Center flex={1}>
247
+ <BodyText color="white" textAlign="center">
248
+ I'm a carousel item
249
+ </BodyText>
250
+ </Center>
251
+ </Box>
252
+ </CarouselItem>
253
+ <CarouselItem>
254
+ <Box
255
+ backgroundColor="purple700"
256
+ width={150}
257
+ height={100}
258
+ px="100"
259
+ borderRadius="md"
260
+ >
261
+ <Center flex={1}>
262
+ <BodyText color="white" textAlign="center">
263
+ I'm another carousel item
264
+ </BodyText>
265
+ </Center>
266
+ </Box>
267
+ </CarouselItem>
268
+ <CarouselItem>
269
+ <Box
270
+ backgroundColor="green700"
271
+ width={150}
272
+ height={100}
273
+ px="100"
274
+ borderRadius="md"
275
+ >
276
+ <Center flex={1}>
277
+ <BodyText color="white" textAlign="center">
278
+ I'm also a carousel item
279
+ </BodyText>
280
+ </Center>
281
+ </Box>
282
+ </CarouselItem>
283
+ </Carousel>
284
+ </Center>
285
+ </ComponentWrapper>
223
286
  <ComponentWrapper name="Center" link="/?path=/docs/primitives-center--docs">
224
287
  <Center flex={1}>
225
288
  <Center backgroundColor="red400" padding="300" width={200} height={100}>
@@ -237,6 +300,13 @@ const AllComponents: React.FC = () => {
237
300
  </View>
238
301
  </Center>
239
302
  </ComponentWrapper>
303
+ <ComponentWrapper name="Container" link="/?path=/docs/primitives-container--docs">
304
+ <Container space="md" backgroundColor="backgroundSecondary">
305
+ <Box h={20} bg="blue300" />
306
+ <Box h={20} bg="blue400" />
307
+ <Box h={20} bg="blue500" />
308
+ </Container>
309
+ </ComponentWrapper>
240
310
  <ComponentWrapper name="Currency Input" link="/?path=/docs/forms-currency-input--docs">
241
311
  <Center flex={1} padding="200">
242
312
  <CurrencyInput />
@@ -330,6 +400,14 @@ const AllComponents: React.FC = () => {
330
400
  <Heading>This is a Heading</Heading>
331
401
  </Center>
332
402
  </ComponentWrapper>
403
+ <ComponentWrapper
404
+ name="Indicator Icon Button"
405
+ link="/?path=/docs/components-indicator-icon-button--docs"
406
+ >
407
+ <Center flex={1}>
408
+ <IndicatorIconButton icon={BellMediumIcon} onPress={() => null} indicator={true} />
409
+ </Center>
410
+ </ComponentWrapper>
333
411
  <ComponentWrapper name="Icon Button" link="/?path=/docs/components-icon-button--docs">
334
412
  <Center flex={1}>
335
413
  <IconButton icon={ChevronRightMediumIcon} size="md" onPress={() => null} />
@@ -410,8 +488,8 @@ const AllComponents: React.FC = () => {
410
488
  <ComponentWrapper name="List" link="/?path=/docs/components-list--docs">
411
489
  <Center flex={1} p="300">
412
490
  <List>
413
- <ListItem text="List Item 1" divider onPress={() => console.log('item pressed')} />
414
- <ListItem text="List Item 2" onPress={() => console.log('item pressed')} />
491
+ <ListItem heading="List Item 1" onPress={() => console.log('item pressed')} />
492
+ <ListItem heading="List Item 2" onPress={() => console.log('item pressed')} />
415
493
  </List>
416
494
  </Center>
417
495
  </ComponentWrapper>
@@ -445,6 +523,19 @@ const AllComponents: React.FC = () => {
445
523
  </OL>
446
524
  </Center>
447
525
  </ComponentWrapper>
526
+ <ComponentWrapper
527
+ name="Progress Stepper"
528
+ link="/?path=/docs/components-progress-stepper--docs"
529
+ >
530
+ <Center flex={1} px="300">
531
+ <ProgressStepper>
532
+ <ProgressStep id="customer-data" state="complete" />
533
+ <ProgressStep id="shipping-data" state="complete" />
534
+ <ProgressStep id="payment-data" state="active" />
535
+ <ProgressStep id="summary" state="incomplete" />
536
+ </ProgressStepper>
537
+ </Center>
538
+ </ComponentWrapper>
448
539
  <ComponentWrapper name="Radio" link="/?path=/docs/forms-radio--docs">
449
540
  <Center flex={1}>
450
541
  <RadioGroup>
@@ -469,7 +560,11 @@ const AllComponents: React.FC = () => {
469
560
  link="/?path=/docs/components-section-header--docs"
470
561
  >
471
562
  <Center flex={1} p="300">
472
- <SectionHeader heading="Heading" helperText="Supporting text" linkText="More" />
563
+ <SectionHeader
564
+ heading="Heading"
565
+ helperText="Supporting text"
566
+ trailingContent={<Link href="#">More</Link>}
567
+ />
473
568
  </Center>
474
569
  </ComponentWrapper>
475
570
  <ComponentWrapper name="Select" link="/?path=/docs/forms-select--docs">
@@ -535,6 +630,17 @@ const AllComponents: React.FC = () => {
535
630
  <Textarea numberOfLines={3} placeholder="This is a textarea" />
536
631
  </Center>
537
632
  </ComponentWrapper>
633
+ <ComponentWrapper
634
+ name="Themed Image"
635
+ link="/?path=/docs/utility-components-themed-image--docs"
636
+ >
637
+ <Center flex={1} p="300">
638
+ <ThemedImage
639
+ light={<SpotBillingLight width={160} height={160} />}
640
+ dark={<SpotBillingDark width={160} height={160} />}
641
+ />
642
+ </Center>
643
+ </ComponentWrapper>
538
644
  <ComponentWrapper
539
645
  name="Toggle Button Card"
540
646
  link="/?path=/docs/components-toggle-button-card--docs"
@@ -576,6 +682,17 @@ const AllComponents: React.FC = () => {
576
682
 
577
683
  const styles = StyleSheet.create(theme => ({
578
684
  container: {},
685
+ grid: {
686
+ _web: {
687
+ display: 'grid',
688
+ gridTemplateColumns: {
689
+ xs: '1fr',
690
+ md: 'repeat(3, 1fr)',
691
+ lg: 'repeat(auto-fit, minmax(300px, 1fr))',
692
+ },
693
+ gap: theme.space['200'],
694
+ },
695
+ },
579
696
  component: {
580
697
  borderColor: theme.color.warmWhite[300],
581
698
  borderWidth: theme.borderWidth['1'],
@@ -1,64 +1,28 @@
1
- import {
2
- Badge,
3
- BadgeText,
4
- Box,
5
- Flex,
6
- List,
7
- ListItem,
8
- ListItemContent,
9
- ListItemHelperText,
10
- ListItemIcon,
11
- ListItemLeadingContent,
12
- ListItemText,
13
- ListItemTrailingContent,
14
- ListItemTrailingIcon,
15
- } from '../../src';
1
+ import { IconContainer, List, ListItem } from '../../src';
16
2
 
17
- import {
18
- ChevronRightMediumIcon,
19
- ElectricityMediumIcon,
20
- GasMediumIcon,
21
- } from '@utilitywarehouse/hearth-react-native-icons';
3
+ import { ElectricityMediumIcon, GasMediumIcon } from '@utilitywarehouse/hearth-react-native-icons';
22
4
 
23
5
  const BadgeList = () => {
24
6
  return (
25
7
  <List>
26
- <ListItem onPress={() => console.log('pressed')} divider>
27
- <ListItemLeadingContent>
28
- <Box padding="300" borderRadius="lg" bg="energyBlue300">
29
- <ListItemIcon as={ElectricityMediumIcon} color="energyBlue600" />
30
- </Box>
31
- </ListItemLeadingContent>
32
- <ListItemContent>
33
- <ListItemText>Electricity</ListItemText>
34
- <Badge colorScheme="info">
35
- <BadgeText>Text</BadgeText>
36
- </Badge>
37
- <ListItemHelperText>Last reading 23/03/24</ListItemHelperText>
38
- </ListItemContent>
39
- <ListItemTrailingContent>
40
- <ListItemTrailingIcon as={ChevronRightMediumIcon} />
41
- </ListItemTrailingContent>
42
- </ListItem>
43
- <ListItem onPress={() => console.log('pressed')} divider={false}>
44
- <ListItemLeadingContent>
45
- <Box padding="300" borderRadius="lg" bg="energyBlue300">
46
- <ListItemIcon as={GasMediumIcon} color="energyBlue600" />
47
- </Box>
48
- </ListItemLeadingContent>
49
- <ListItemContent>
50
- <Flex direction="row" style={{ justifyContent: 'space-between' }}>
51
- <ListItemText>Gas</ListItemText>
52
- <Badge colorScheme="positive">
53
- <BadgeText>Smart meter</BadgeText>
54
- </Badge>
55
- </Flex>
56
- <ListItemHelperText>Last reading 23/03/24</ListItemHelperText>
57
- </ListItemContent>
58
- <ListItemTrailingContent>
59
- <ListItemTrailingIcon as={ChevronRightMediumIcon} />
60
- </ListItemTrailingContent>
61
- </ListItem>
8
+ <ListItem
9
+ heading="Electricity"
10
+ helperText="Last reading 23/03/24"
11
+ onPress={() => console.log('pressed')}
12
+ leadingContent={
13
+ <IconContainer icon={ElectricityMediumIcon} size="md" variant="emphasis" color="energy" />
14
+ }
15
+ badge={{ text: 'Text' }}
16
+ />
17
+ <ListItem
18
+ heading="Gas"
19
+ helperText="Last reading 23/03/24"
20
+ onPress={() => console.log('pressed')}
21
+ leadingContent={
22
+ <IconContainer icon={GasMediumIcon} size="md" variant="emphasis" color="energy" />
23
+ }
24
+ badge={{ text: 'Smart Meter' }}
25
+ />
62
26
  </List>
63
27
  );
64
28
  };
@@ -16,9 +16,8 @@ const SwitchList = () => {
16
16
  return (
17
17
  <List container="subtleWhite">
18
18
  <ListItem
19
- text="Notifications"
19
+ heading="Notifications"
20
20
  helperText="Allow notifications"
21
- divider
22
21
  leadingContent={<ListItemIcon as={BellMediumIcon} />}
23
22
  trailingContent={
24
23
  <Switch value={notifications} onValueChange={setNotifications} size="small" />
@@ -26,25 +25,22 @@ const SwitchList = () => {
26
25
  onPress={() => setNotifications(!notifications)}
27
26
  />
28
27
  <ListItem
29
- text="Secure ID"
28
+ heading="Secure ID"
30
29
  helperText="Use secure ID"
31
- divider
32
30
  leadingContent={<ListItemIcon as={LockMediumIcon} />}
33
31
  trailingContent={<Switch value={secureId} onValueChange={setSecureId} size="small" />}
34
32
  onPress={() => setSecureId(!secureId)}
35
33
  />
36
34
  <ListItem
37
- text="Location"
35
+ heading="Location"
38
36
  helperText="Allow location"
39
- divider
40
37
  leadingContent={<ListItemIcon as={LocationMediumIcon} />}
41
38
  trailingContent={<Switch value={location} onValueChange={setLocation} size="small" />}
42
39
  onPress={() => setLocation(!location)}
43
40
  />
44
41
  <ListItem
45
- text="Dark mode"
42
+ heading="Dark mode"
46
43
  helperText="Enable dark mode"
47
- divider
48
44
  leadingContent={<ListItemIcon as={EyeMediumIcon} />}
49
45
  trailingContent={<Switch value={darkMode} onValueChange={setDarkMode} size="small" />}
50
46
  onPress={() => setDarkMode(!darkMode)}
@@ -8,6 +8,7 @@ import { BackToTopButton, NextPrevPage } from './components';
8
8
 
9
9
  You can just start using the components from the `@utilitywarehouse/hearth-react-native` package.
10
10
  Although there are a few components that require a `BottomSheetModalProvider` to be wrapped around your app.
11
+ You should also make sure you're app is wrapped in a `GestureHandlerRootView` from `react-native-gesture-handler`.
11
12
 
12
13
  ```tsx
13
14
  import {
@@ -16,14 +17,17 @@ import {
16
17
  BodyText,
17
18
  BottomSheetModalProvider,
18
19
  } from '@utilitywarehouse/hearth-react-native';
20
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
19
21
 
20
22
  const App: React.FC = () => (
21
- <BottomSheetModalProvider>
22
- <Box p="200">
23
- <Alert variant="info" text="Welcome to Hearth React Native!" />
24
- <BodyText>Start building your app with Hearth React Native components.</BodyText>
25
- </Box>
26
- </BottomSheetModalProvider>
23
+ <GestureHandlerRootView>
24
+ <BottomSheetModalProvider>
25
+ <Box p="200">
26
+ <Alert colorScheme="positive" text="Welcome to Hearth React Native!" />
27
+ <BodyText>Start building your app with Hearth React Native components.</BodyText>
28
+ </Box>
29
+ </BottomSheetModalProvider>
30
+ </GestureHandlerRootView>
27
31
  );
28
32
  ```
29
33
 
@@ -33,19 +37,31 @@ By default the light colour mode is enabled. If you want to enable dark mode, yo
33
37
  use the `useColorMode` hook to toggle between light and dark modes.
34
38
 
35
39
  ```tsx
36
- import { useColorMode, Box, Alert, BodyText, Button } from '@utilitywarehouse/hearth-react-native';
40
+ import {
41
+ useColorMode,
42
+ Box,
43
+ Alert,
44
+ BodyText,
45
+ Button,
46
+ BottomSheetModalProvider,
47
+ } from '@utilitywarehouse/hearth-react-native';
48
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
37
49
 
38
50
  const App: React.FC = () => {
39
51
  const [colorMode, setColorMode] = useColorMode();
40
52
 
41
53
  return (
42
- <Box p="200">
43
- <Alert variant="info" text="Welcome to Hearth React Native!" />
44
- <BodyText>Start building your app with Hearth React Native components.</BodyText>
45
- <Button onPress={() => setColorMode(colorMode === 'light' ? 'dark' : 'light')}>
46
- Toggle Color Mode
47
- </Button>
48
- </Box>
54
+ <GestureHandlerRootView>
55
+ <BottomSheetModalProvider>
56
+ <Box p="200">
57
+ <Alert colorScheme="positive" text="Welcome to Hearth React Native!" />
58
+ <BodyText>Start building your app with Hearth React Native components.</BodyText>
59
+ <Button onPress={() => setColorMode(colorMode === 'light' ? 'dark' : 'light')}>
60
+ Toggle Color Mode
61
+ </Button>
62
+ </Box>
63
+ </BottomSheetModalProvider>
64
+ </GestureHandlerRootView>
49
65
  );
50
66
  };
51
67
  ```
@@ -42,7 +42,7 @@ npm install @utilitywarehouse/hearth-react-native
42
42
  To install the peer dependencies, you can run the following command:
43
43
 
44
44
  ```console
45
- npm install react-native-unistyles react-native-edge-to-edge react-native-nitro-modules@0.28.1 @gorhom/bottom-sheet react-native-svg react-native-reanimated react-native-worklets react-native-gesture-handler @utilitywarehouse/hearth-react-native-icons
45
+ npm install react-native-unistyles react-native-edge-to-edge react-native-nitro-modules @gorhom/bottom-sheet react-native-svg react-native-reanimated react-native-worklets react-native-gesture-handler @utilitywarehouse/hearth-react-native-icons
46
46
  ```
47
47
 
48
48
  For more information on how to install and configure `react-native-svg`, `react-native-gesture-handler` and `react-native-reanimated`,
@@ -1,5 +1,6 @@
1
1
  import { ArgTypes, Canvas, Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as BoxStories from '../src/components/Box/Box.stories';
3
+ import * as ContainerStories from '../src/components/Container/Container.stories';
3
4
  import * as FlexStories from '../src/components/Flex/Flex.stories';
4
5
  import * as GridStories from '../src/components/Grid/Grid.stories';
5
6
  import { BackToTopButton, NextPrevPage } from './components';
@@ -15,6 +16,7 @@ upon our design tokens, and providing styling options which make it easier to
15
16
  apply design decisions coherently.
16
17
 
17
18
  - [Box](#box)
19
+ - [Container](#container)
18
20
  - [Flex](#flex)
19
21
  - [Grid](#grid)
20
22
 
@@ -36,6 +38,34 @@ elements within `Flex` and `Grid` containers.
36
38
  </Box>
37
39
  ```
38
40
 
41
+ ## Container
42
+
43
+ <Canvas of={ContainerStories.Playground} sourceState="none" />
44
+
45
+ `Container` is a specialised layout component that provides consistent page-level
46
+ spacing using the design system's responsive layout tokens. It automatically applies
47
+ appropriate margin and padding based on the current breakpoint, making it ideal for
48
+ wrapping page content or major sections.
49
+
50
+ ```tsx
51
+ <Container space="lg">
52
+ <Box>{...}</Box>
53
+ <Box>{...}</Box>
54
+ </Container>
55
+ ```
56
+
57
+ When you need custom spacing, you can override the defaults while maintaining
58
+ the convenience of the component:
59
+
60
+ ```tsx
61
+ <Container
62
+ marginHorizontal="none"
63
+ space="xl"
64
+ >
65
+ {...}
66
+ </Container>
67
+ ```
68
+
39
69
  ## Flex
40
70
 
41
71
  <Canvas of={FlexStories.Playground} sourceState="none" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utilitywarehouse/hearth-react-native",
3
- "version": "0.4.2",
3
+ "version": "0.6.0",
4
4
  "description": "Utility Warehouse React Native UI library",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -52,15 +52,17 @@
52
52
  "storybook": "^9.1.6",
53
53
  "typescript": "^5.7.3",
54
54
  "vite": "^7.1.3",
55
+ "vite-plugin-svgr": "^4.5.0",
55
56
  "vitest": "^3.2.4",
56
- "@utilitywarehouse/hearth-react-icons": "^0.5.0",
57
57
  "@utilitywarehouse/hearth-fonts": "^0.0.4",
58
- "@utilitywarehouse/hearth-react-native-icons": "^0.5.0",
58
+ "@utilitywarehouse/hearth-react-icons": "^0.7.0",
59
+ "@utilitywarehouse/hearth-react-native-icons": "^0.7.0",
60
+ "@utilitywarehouse/hearth-svg-assets": "^0.2.0",
59
61
  "@utilitywarehouse/hearth-tokens": "^0.1.3"
60
62
  },
61
63
  "peerDependencies": {
62
64
  "@gorhom/bottom-sheet": "^5.0.0",
63
- "@utilitywarehouse/hearth-react-native-icons": "0.4.0",
65
+ "@utilitywarehouse/hearth-react-native-icons": "0.6.0",
64
66
  "react": ">=17 || ^18.0.0 || ^19.0.0",
65
67
  "react-native": ">=0.77",
66
68
  "react-native-gesture-handler": "^2.22.0",