@utilitywarehouse/hearth-react-native 0.18.0 → 0.19.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 (127) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-lint.log +21 -18
  3. package/CHANGELOG.md +102 -0
  4. package/build/components/Banner/Banner.d.ts +1 -1
  5. package/build/components/Banner/Banner.js +24 -4
  6. package/build/components/Banner/Banner.props.d.ts +1 -6
  7. package/build/components/Box/Box.props.d.ts +5 -2
  8. package/build/components/Button/Button.d.ts +2 -0
  9. package/build/components/Button/ButtonGroupRoot.d.ts +5 -1
  10. package/build/components/Button/ButtonGroupRoot.js +3 -3
  11. package/build/components/Card/Card.context.d.ts +1 -1
  12. package/build/components/Card/Card.props.d.ts +2 -0
  13. package/build/components/Card/CardContent.js +3 -3
  14. package/build/components/Card/CardRoot.d.ts +1 -1
  15. package/build/components/Card/CardRoot.js +14 -4
  16. package/build/components/Checkbox/CheckboxGroupTextContent.js +1 -1
  17. package/build/components/Checkbox/CheckboxTextContent.js +1 -1
  18. package/build/components/Container/Container.d.ts +1 -1
  19. package/build/components/Container/Container.js +3 -3
  20. package/build/components/Container/Container.props.d.ts +5 -0
  21. package/build/components/Divider/Divider.d.ts +1 -1
  22. package/build/components/Divider/Divider.js +19 -19
  23. package/build/components/Divider/Divider.props.d.ts +6 -0
  24. package/build/components/ExpandableCard/ExpandableCardExpandedContent.js +1 -1
  25. package/build/components/Flex/Flex.d.ts +1 -1
  26. package/build/components/Flex/Flex.js +3 -3
  27. package/build/components/Flex/Flex.props.d.ts +5 -0
  28. package/build/components/Grid/Grid.d.ts +1 -1
  29. package/build/components/Grid/Grid.js +4 -4
  30. package/build/components/Grid/Grid.props.d.ts +5 -0
  31. package/build/components/Modal/Modal.js +14 -4
  32. package/build/components/Radio/RadioGroupTextContent.js +1 -1
  33. package/build/components/Radio/RadioTextContent.js +1 -1
  34. package/build/components/Toast/Toast.context.d.ts +2 -4
  35. package/build/components/Toast/Toast.context.js +14 -2
  36. package/build/components/Toast/Toast.props.d.ts +4 -0
  37. package/build/components/Toast/ToastItem.js +2 -1
  38. package/build/components/VerificationInput/VerificationInput.d.ts +2 -5
  39. package/build/components/VerificationInput/VerificationInput.js +20 -7
  40. package/build/components/VerificationInput/VerificationInput.props.d.ts +10 -0
  41. package/build/components/VerificationInput/index.d.ts +1 -1
  42. package/build/components/VerificationInput/useVerificationInput.d.ts +1 -0
  43. package/build/components/VerificationInput/useVerificationInput.js +24 -9
  44. package/build/core/themes.d.ts +4 -4
  45. package/build/core/themes.js +1 -1
  46. package/build/types/values.d.ts +1 -1
  47. package/docs/components/AllComponents.web.tsx +9 -9
  48. package/docs/layout-components.docs.mdx +3 -3
  49. package/package.json +4 -4
  50. package/src/components/Alert/Alert.stories.tsx +1 -1
  51. package/src/components/Avatar/Avatar.stories.tsx +4 -5
  52. package/src/components/Badge/Badge.stories.tsx +3 -3
  53. package/src/components/Banner/Banner.docs.mdx +1 -1
  54. package/src/components/Banner/Banner.props.ts +13 -20
  55. package/src/components/Banner/Banner.stories.tsx +83 -15
  56. package/src/components/Banner/Banner.tsx +27 -3
  57. package/src/components/Box/Box.props.ts +11 -4
  58. package/src/components/Button/Button.docs.mdx +2 -2
  59. package/src/components/Button/Button.stories.tsx +4 -4
  60. package/src/components/Button/ButtonGroupRoot.tsx +8 -3
  61. package/src/components/Card/Card.context.ts +1 -1
  62. package/src/components/Card/Card.docs.mdx +1 -1
  63. package/src/components/Card/Card.props.ts +2 -0
  64. package/src/components/Card/Card.stories.tsx +9 -9
  65. package/src/components/Card/CardAction/CardAction.stories.tsx +2 -2
  66. package/src/components/Card/CardContent.tsx +3 -3
  67. package/src/components/Card/CardRoot.tsx +15 -5
  68. package/src/components/Checkbox/CheckboxGroupTextContent.tsx +2 -2
  69. package/src/components/Checkbox/CheckboxTextContent.tsx +1 -1
  70. package/src/components/Container/Container.docs.mdx +2 -2
  71. package/src/components/Container/Container.props.ts +5 -0
  72. package/src/components/Container/Container.stories.tsx +2 -2
  73. package/src/components/Container/Container.tsx +3 -3
  74. package/src/components/CurrencyInput/CurrencyInput.docs.mdx +1 -1
  75. package/src/components/CurrencyInput/CurrencyInput.stories.tsx +2 -2
  76. package/src/components/DateInput/DateInput.stories.tsx +3 -3
  77. package/src/components/DatePickerInput/DatePickerInput.stories.tsx +1 -1
  78. package/src/components/DescriptionList/DescriptionList.stories.tsx +1 -1
  79. package/src/components/Divider/Divider.docs.mdx +6 -6
  80. package/src/components/Divider/Divider.props.ts +6 -0
  81. package/src/components/Divider/Divider.tsx +19 -18
  82. package/src/components/ExpandableCard/ExpandableCardExpandedContent.tsx +1 -1
  83. package/src/components/Flex/Flex.docs.mdx +3 -3
  84. package/src/components/Flex/Flex.props.ts +5 -0
  85. package/src/components/Flex/Flex.stories.tsx +2 -2
  86. package/src/components/Flex/Flex.tsx +4 -3
  87. package/src/components/FormField/FormField.docs.mdx +1 -1
  88. package/src/components/FormField/FormField.stories.tsx +1 -1
  89. package/src/components/Grid/Grid.docs.mdx +5 -5
  90. package/src/components/Grid/Grid.props.ts +6 -0
  91. package/src/components/Grid/Grid.stories.tsx +8 -8
  92. package/src/components/Grid/Grid.tsx +4 -3
  93. package/src/components/HighlightBanner/HighlightBanner.docs.mdx +1 -1
  94. package/src/components/HighlightBanner/HighlightBanner.stories.tsx +2 -2
  95. package/src/components/Icon/Icon.docs.mdx +3 -3
  96. package/src/components/IconButton/IconButton.stories.tsx +5 -5
  97. package/src/components/IconContainer/IconContainer.docs.mdx +1 -1
  98. package/src/components/IconContainer/IconContainer.stories.tsx +3 -3
  99. package/src/components/IndicatorIconButton/IndicatorIconButton.stories.tsx +17 -9
  100. package/src/components/InlineLink/InlineLink.stories.tsx +2 -2
  101. package/src/components/Input/Input.stories.tsx +4 -4
  102. package/src/components/List/List.stories.tsx +1 -1
  103. package/src/components/Modal/Modal.tsx +18 -4
  104. package/src/components/PillGroup/PillGroup.stories.tsx +7 -7
  105. package/src/components/ProgressStepper/ProgressStepper.stories.tsx +7 -8
  106. package/src/components/Radio/Radio.stories.tsx +1 -1
  107. package/src/components/Radio/RadioGroup.stories.tsx +1 -1
  108. package/src/components/Radio/RadioGroupTextContent.tsx +2 -2
  109. package/src/components/Radio/RadioTextContent.tsx +1 -1
  110. package/src/components/SectionHeader/SectionHeader.stories.tsx +1 -1
  111. package/src/components/Switch/Switch.docs.mdx +8 -8
  112. package/src/components/Switch/Switch.stories.tsx +2 -2
  113. package/src/components/Tabs/Tabs.stories.tsx +1 -1
  114. package/src/components/Textarea/Textarea.docs.mdx +3 -3
  115. package/src/components/Toast/Toast.context.tsx +24 -3
  116. package/src/components/Toast/Toast.props.ts +5 -0
  117. package/src/components/Toast/Toast.stories.tsx +29 -0
  118. package/src/components/Toast/ToastItem.tsx +4 -1
  119. package/src/components/UnstyledIconButton/UnstyledIconButton.stories.tsx +5 -5
  120. package/src/components/VerificationInput/VerificationInput.docs.mdx +31 -8
  121. package/src/components/VerificationInput/VerificationInput.props.ts +11 -0
  122. package/src/components/VerificationInput/VerificationInput.stories.tsx +79 -3
  123. package/src/components/VerificationInput/VerificationInput.tsx +94 -62
  124. package/src/components/VerificationInput/index.ts +4 -2
  125. package/src/components/VerificationInput/useVerificationInput.ts +26 -10
  126. package/src/core/themes.ts +1 -1
  127. package/src/types/values.ts +1 -1
@@ -9,7 +9,8 @@ const Flex = ({
9
9
  align = 'flex-start',
10
10
  justify = 'flex-start',
11
11
  wrap = 'nowrap',
12
- space = 'md',
12
+ spacing = 'md',
13
+ space,
13
14
  ...rest
14
15
  }: FlexProps) => {
15
16
  const propStyle: ViewStyle = {
@@ -19,7 +20,7 @@ const Flex = ({
19
20
  flexWrap: wrap,
20
21
  };
21
22
 
22
- styles.useVariants({ space });
23
+ styles.useVariants({ spacing: space ?? spacing });
23
24
 
24
25
  return (
25
26
  <View style={[propStyle, styles.flex, style]} {...rest}>
@@ -34,7 +35,7 @@ const styles = StyleSheet.create(theme => ({
34
35
  flex: {
35
36
  display: 'flex',
36
37
  variants: {
37
- space: theme.globalStyle.variants.space,
38
+ spacing: theme.globalStyle.variants.spacing,
38
39
  },
39
40
  },
40
41
  }));
@@ -313,7 +313,7 @@ const MyComponent = () => {
313
313
  <FormField validationStatus="invalid">
314
314
  <Checkbox alignItems="flex-start">
315
315
  <CheckboxIndicator />
316
- <Flex direction="column" space="xs">
316
+ <Flex direction="column" spacing="xs">
317
317
  <CheckboxLabel nested={false}>I accept the terms and conditions</CheckboxLabel>
318
318
  <FormFieldHelper>
319
319
  <FormFieldHelperText>Read and accept the terms and conditions</FormFieldHelperText>
@@ -87,7 +87,7 @@ export const Playground: Story = {
87
87
  export const Variants: Story = {
88
88
  render: () => {
89
89
  return (
90
- <Flex direction="column" space="lg">
90
+ <Flex direction="column" spacing="lg">
91
91
  <VariantTitle title="Default">
92
92
  <FormField label="Label">
93
93
  <Input />
@@ -25,7 +25,7 @@ The Grid component helps you create responsive grid layouts with configurable co
25
25
 
26
26
  <UsageWrap>
27
27
  <Center>
28
- <Grid columns={2} space="md" width={300}>
28
+ <Grid columns={2} spacing="md" width={300}>
29
29
  <Box backgroundColor="green400" height={100} padding="200">
30
30
  <BodyText color="white">Item 1</BodyText>
31
31
  </Box>
@@ -46,7 +46,7 @@ The Grid component helps you create responsive grid layouts with configurable co
46
46
  import { Grid, Box, BodyText } from '@utilitywarehouse/hearth-react-native';
47
47
 
48
48
  const MyComponent = () => (
49
- <Grid columns={2} space="md" width={300}>
49
+ <Grid columns={2} spacing="md" width={300}>
50
50
  <Box backgroundColor="green400" height={100} padding="200">
51
51
  <BodyText color="white">Item 1</BodyText>
52
52
  </Box>
@@ -76,7 +76,7 @@ The Grid component supports responsive column layouts based on screen size break
76
76
  md: 3,
77
77
  lg: 4,
78
78
  }}
79
- space="md"
79
+ spacing="md"
80
80
  width="100%"
81
81
  >
82
82
  <Box backgroundColor="green400" height={100} padding="200">
@@ -106,7 +106,7 @@ const MyComponent = () => (
106
106
  md: 3,
107
107
  lg: 4,
108
108
  }}
109
- space="md"
109
+ spacing="md"
110
110
  width="100%"
111
111
  >
112
112
  <Box backgroundColor="green400" height={100} padding="200">
@@ -176,7 +176,7 @@ The Grid component extends all the props from the [View component](https://react
176
176
  | Name | Type | Default | Description |
177
177
  | ---------------- | ------------------------------------------------------------------ | ------- | ------------------------------------------------------------- |
178
178
  | `columns` | `number` or `GridColumns` | 2 | Number of columns or responsive object with breakpoint values |
179
- | `space` | `'none' \| '2xs' \| 'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl'` | - | Spacing between grid items (both rows and columns) |
179
+ | `spacing` | `'none' \| '2xs' \| 'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl'` | - | Spacing between grid items (both rows and columns) |
180
180
  | `columnGap` | `number` | - | Gap between columns (overrides spacing if provided) |
181
181
  | `rowGap` | `number` | - | Gap between rows (overrides spacing if provided) |
182
182
  | `containerStyle` | `StyleProp\<ViewStyle\>` | - | Style for the grid container |
@@ -17,6 +17,12 @@ export interface GridProps extends ViewProps {
17
17
  /**
18
18
  * Spacing between grid items (applies to both rows and columns)
19
19
  */
20
+ spacing?: SpacingValues;
21
+
22
+ /**
23
+ * Spacing between grid items (applies to both rows and columns)
24
+ * @deprecated Use `spacing` instead. The `space` prop will be removed in a future release.
25
+ */
20
26
  space?: SpacingValues;
21
27
 
22
28
  /**
@@ -13,7 +13,7 @@ const meta = {
13
13
  control: 'object',
14
14
  description: 'Number of columns or responsive object with breakpoints',
15
15
  },
16
- space: {
16
+ spacing: {
17
17
  options: ['none', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl'],
18
18
  control: 'radio',
19
19
  description: 'Responsive spacing between grid items (applied to both rows and columns).',
@@ -33,7 +33,7 @@ const meta = {
33
33
  },
34
34
  args: {
35
35
  columns: 2,
36
- space: 'md',
36
+ spacing: 'md',
37
37
  },
38
38
  } satisfies Meta<typeof Grid>;
39
39
 
@@ -69,7 +69,7 @@ export const Playground: Story = {
69
69
  controls: {
70
70
  include: [
71
71
  'columns',
72
- 'space',
72
+ 'spacing',
73
73
  'gap',
74
74
  'columnGap',
75
75
  'rowGap',
@@ -81,7 +81,7 @@ export const Playground: Story = {
81
81
  },
82
82
  args: {
83
83
  columns: 2,
84
- space: 'md',
84
+ spacing: 'md',
85
85
  },
86
86
  render: args => (
87
87
  <Grid {...args} style={{ width: 400 }}>
@@ -98,7 +98,7 @@ export const Playground: Story = {
98
98
  export const ThreeColumns: Story = {
99
99
  args: {
100
100
  columns: 3,
101
- space: 'md',
101
+ spacing: 'md',
102
102
  },
103
103
  render: args => (
104
104
  <Grid {...args} style={{ width: 500 }}>
@@ -124,7 +124,7 @@ export const ResponsiveColumns: Story = {
124
124
  lg: 4,
125
125
  xl: 5,
126
126
  },
127
- space: 'md',
127
+ spacing: 'md',
128
128
  },
129
129
  render: args => (
130
130
  <Grid {...args} style={{ width: '100%' }}>
@@ -145,7 +145,7 @@ export const ResponsiveColumns: Story = {
145
145
  export const DifferentSizes: Story = {
146
146
  args: {
147
147
  columns: 3,
148
- space: 'sm',
148
+ spacing: 'sm',
149
149
  },
150
150
  render: args => (
151
151
  <Grid {...args} style={{ width: 500 }}>
@@ -178,7 +178,7 @@ export const CustomGaps: Story = {
178
178
  export const WithContent: Story = {
179
179
  args: {
180
180
  columns: 2,
181
- space: 'md',
181
+ spacing: 'md',
182
182
  },
183
183
  render: args => (
184
184
  <Grid {...args} style={{ width: 400 }}>
@@ -9,6 +9,7 @@ const Grid = ({
9
9
  containerStyle,
10
10
  itemStyle,
11
11
  rowStyle,
12
+ spacing,
12
13
  space,
13
14
  children,
14
15
  ...props
@@ -19,7 +20,7 @@ const Grid = ({
19
20
  const { width } = useWindowDimensions();
20
21
  const { gap, columnGap, rowGap } = { ...remainingProps, ...computedStyles };
21
22
 
22
- styles.useVariants({ space });
23
+ styles.useVariants({ spacing: space ?? spacing });
23
24
 
24
25
  const getColumnsForWidth = useMemo(() => {
25
26
  // If columns is a number, use that number
@@ -124,14 +125,14 @@ const styles = StyleSheet.create(theme => ({
124
125
  rowsContainer: {
125
126
  width: '100%',
126
127
  variants: {
127
- space: theme.globalStyle.variants.space,
128
+ spacing: theme.globalStyle.variants.spacing,
128
129
  },
129
130
  },
130
131
  row: {
131
132
  flexDirection: 'row',
132
133
  width: '100%',
133
134
  variants: {
134
- space: theme.globalStyle.variants.space,
135
+ spacing: theme.globalStyle.variants.spacing,
135
136
  },
136
137
  },
137
138
  item: {
@@ -83,7 +83,7 @@ const MyComponent = () => (
83
83
  | button | `ReactElement` | Optional Button component displayed below description | `-` |
84
84
  | variant | `'emphasis' \| 'subtle'` | Visual style variant with strong or subtle borders | `'emphasis'` |
85
85
 
86
- The component also accepts all standard Card props except `noPadding`, `colorScheme`, `space`, `gap`, `rowGap`, `columnGap`, `flexDirection`, `flexWrap`, `alignItems`, and `justifyContent`.
86
+ The component also accepts all standard Card props except `noPadding`, `colorScheme`, `spacing`, `gap`, `rowGap`, `columnGap`, `flexDirection`, `flexWrap`, `alignItems`, and `justifyContent`.
87
87
 
88
88
  ### `HighlightBannerImage` Props
89
89
 
@@ -103,7 +103,7 @@ export const ColorVariants: Story = {
103
103
  render: args => {
104
104
  return (
105
105
  <View style={{ width: 400 }}>
106
- <Flex space="lg" direction="column" align="stretch">
106
+ <Flex spacing="lg" direction="column" align="stretch">
107
107
  <HighlightBanner
108
108
  {...args}
109
109
  heading="Energy Blue"
@@ -237,7 +237,7 @@ export const SubtleCard: Story = {
237
237
  export const DifferentImages: Story = {
238
238
  render: args => {
239
239
  return (
240
- <Flex space="lg" direction="column">
240
+ <Flex spacing="lg" direction="column">
241
241
  <View style={{ width: 400 }}>
242
242
  <HighlightBanner
243
243
  {...args}
@@ -38,7 +38,7 @@ The following example shows how to use the icons directly from the `@utilityware
38
38
 
39
39
  <UsageWrap>
40
40
  <Center>
41
- <Flex space="lg" direction="row" alignItems="center">
41
+ <Flex spacing="lg" direction="row" alignItems="center">
42
42
  <ElectricityMediumIcon color={lightTheme.color.energyBlue['700']} />
43
43
  <MobileMediumIcon color={lightTheme.color.mobileRose['700']} />
44
44
  <BroadbandMediumIcon color={lightTheme.color.broadbandGreen['700']} />
@@ -59,7 +59,7 @@ import {
59
59
  const MyComponent = () => {
60
60
  const { color } = useTheme();
61
61
  return (
62
- <Flex space="lg" direction="row" alignItems="center">
62
+ <Flex spacing="lg" direction="row" alignItems="center">
63
63
  <ElectricityMediumIcon color={color.energyBlue['700']} />
64
64
  <MobileMediumIcon color={color.mobileRose['700']} />
65
65
  <BroadbandMediumIcon color={color.broadbandGreen['700']} />
@@ -82,7 +82,7 @@ import {
82
82
 
83
83
  const MyComponent = () => {
84
84
  return (
85
- <Flex space="lg" direction="row" alignItems="center">
85
+ <Flex spacing="lg" direction="row" alignItems="center">
86
86
  <Icon as={ElectricityMediumIcon} color="energyBlue700" />
87
87
  <Icon as={MobileMediumIcon} color="mobileRose700" />
88
88
  <Icon as={BroadbandMediumIcon} color="broadbandGreen700" />
@@ -94,7 +94,7 @@ export const Variants: Story = {
94
94
  // @ts-expect-error - This is a playground
95
95
  const icon = _icon === 'none' ? undefined : Icons[_icon];
96
96
  return (
97
- <ButtonGroup flexDirection="column" space="md">
97
+ <ButtonGroup flexDirection="column" spacing="md">
98
98
  <>
99
99
  {args.colorScheme === 'highlight' && (
100
100
  <VariantTitle title="Emphasis" invert={args.inverted}>
@@ -137,9 +137,9 @@ export const KitchenSink: Story = {
137
137
  const schemes: Array<ColorScheme> = ['highlight', 'destructive', 'affirmative', 'functional'];
138
138
  const variants: Array<Variant> = ['emphasis', 'solid', 'outline', 'ghost'];
139
139
  return (
140
- <Flex direction="row" space="lg" wrap="wrap">
140
+ <Flex direction="row" spacing="lg" wrap="wrap">
141
141
  {schemes.map(scheme => (
142
- <Flex direction="column" space="lg" key={scheme}>
142
+ <Flex direction="column" spacing="lg" key={scheme}>
143
143
  {variants
144
144
  .filter(variant => {
145
145
  if (inverted) {
@@ -166,7 +166,7 @@ export const KitchenSink: Story = {
166
166
  {scheme} - {variant}
167
167
  </DetailText>
168
168
  </Box>
169
- <Flex direction="column" space="lg">
169
+ <Flex direction="column" spacing="lg">
170
170
  <VariantTitle title="Default" invert={inverted}>
171
171
  {/* @ts-expect-error - story loop types don't match */}
172
172
  <IconButton
@@ -224,7 +224,7 @@ export const KitchenSink: Story = {
224
224
  export const ServiceIconButtons: Story = {
225
225
  render: () => {
226
226
  return (
227
- <ButtonGroup space="md">
227
+ <ButtonGroup spacing="md">
228
228
  <IconButton
229
229
  icon={ElectricityMediumIcon}
230
230
  backgroundColor="energyBlue200"
@@ -36,7 +36,7 @@ Wrap an icon with the `IconContainer` to apply sizing + background styles withou
36
36
 
37
37
  <UsageWrap>
38
38
  <Center>
39
- <Flex direction="row" space="lg" alignItems="center">
39
+ <Flex direction="row" spacing="lg" alignItems="center">
40
40
  <IconContainer icon={ElectricityMediumIcon} size="md" variant="emphasis" color="energy" />
41
41
  <IconContainer icon={BroadbandMediumIcon} size="md" variant="emphasis" color="broadband" />
42
42
  <IconContainer icon={MobileMediumIcon} size="md" variant="emphasis" color="mobile" />
@@ -92,11 +92,11 @@ export const KitchenSink: Story = {
92
92
  'pig' | 'energy' | 'broadband' | 'mobile' | 'insurance' | 'cashback' | 'highlight'
93
93
  > = ['pig', 'energy', 'broadband', 'mobile', 'insurance', 'cashback', 'highlight'];
94
94
  return (
95
- <Flex direction="column" space="lg">
95
+ <Flex direction="column" spacing="lg">
96
96
  {sizes.map(size => (
97
97
  <Box key={size} gap="300">
98
98
  <VariantTitle title={`Size: ${size.toUpperCase()} / Subtle`}> </VariantTitle>
99
- <Flex direction="row" wrap="wrap" space="md">
99
+ <Flex direction="row" wrap="wrap" spacing="md">
100
100
  {colors.map(color => (
101
101
  <IconContainer
102
102
  key={`${size}-subtle-${color}`}
@@ -108,7 +108,7 @@ export const KitchenSink: Story = {
108
108
  ))}
109
109
  </Flex>
110
110
  <VariantTitle title={`Size: ${size.toUpperCase()} / Emphasis`}> </VariantTitle>
111
- <Flex direction="row" wrap="wrap" space="md">
111
+ <Flex direction="row" wrap="wrap" spacing="md">
112
112
  {colors.map(
113
113
  color =>
114
114
  color !== 'highlight' && (
@@ -2,9 +2,9 @@ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import * as Icons from '@utilitywarehouse/hearth-react-native-icons';
3
3
  import { ComponentType } from 'react';
4
4
  import { VariantTitle } from '../../../docs/components';
5
+ import { useTheme } from '../../hooks';
5
6
  import { Box } from '../Box';
6
7
  import { Flex } from '../Flex';
7
- import { useTheme } from '../../hooks';
8
8
  import IndicatorIconButton from './IndicatorIconButton';
9
9
 
10
10
  const meta = {
@@ -57,8 +57,8 @@ export const Variants: Story = {
57
57
  render: args => {
58
58
  const icon = typeof args.icon === 'string' ? Icons[args.icon as keyof typeof Icons] : args.icon;
59
59
  return (
60
- <Flex direction="column" space="xl">
61
- <Flex direction="row" space="lg">
60
+ <Flex direction="column" spacing="xl">
61
+ <Flex direction="row" spacing="lg">
62
62
  <Box>
63
63
  <VariantTitle title="Without Indicator" invert={args.inverted}>
64
64
  <IndicatorIconButton {...args} icon={icon} indicator={false} />
@@ -70,7 +70,7 @@ export const Variants: Story = {
70
70
  </VariantTitle>
71
71
  </Box>
72
72
  </Flex>
73
- <Flex direction="row" space="lg">
73
+ <Flex direction="row" spacing="lg">
74
74
  <Box style={{ backgroundColor: 'purple', padding: 10, borderRadius: 8 }}>
75
75
  <VariantTitle title="Inverted" invert={!args.inverted}>
76
76
  <IndicatorIconButton {...args} icon={icon} inverted={true} />
@@ -88,13 +88,21 @@ export const Colourful: Story = {
88
88
  const theme = useTheme();
89
89
 
90
90
  return (
91
- <Flex direction="column" space="xl">
92
- <Flex direction="row" space="lg">
91
+ <Flex direction="column" spacing="xl">
92
+ <Flex direction="row" spacing="lg">
93
93
  <Box>
94
- <IndicatorIconButton {...args} icon={icon} iconStyle={{ color: theme.color.energyBlue[500] }} />
94
+ <IndicatorIconButton
95
+ {...args}
96
+ icon={icon}
97
+ iconStyle={{ color: theme.color.energyBlue[500] }}
98
+ />
95
99
  </Box>
96
100
  <Box>
97
- <IndicatorIconButton {...args} icon={icon} iconStyle={{ color: theme.color.cashbackLilac[500] }} />
101
+ <IndicatorIconButton
102
+ {...args}
103
+ icon={icon}
104
+ iconStyle={{ color: theme.color.cashbackLilac[500] }}
105
+ />
98
106
  </Box>
99
107
  </Flex>
100
108
  </Flex>
@@ -105,7 +113,7 @@ export const Colourful: Story = {
105
113
  export const WithAccessibilityLabel: Story = {
106
114
  render: args => {
107
115
  return (
108
- <Flex direction="column" space="xl">
116
+ <Flex direction="column" spacing="xl">
109
117
  <Box>
110
118
  <VariantTitle title="Notification label" invert={args.inverted}>
111
119
  <IndicatorIconButton
@@ -1,5 +1,5 @@
1
- import { InlineLink } from '.';
2
1
  import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { InlineLink } from '.';
3
3
  import { BodyText } from '../BodyText';
4
4
  import { Flex } from '../Flex';
5
5
  import { List } from '../List';
@@ -55,7 +55,7 @@ export const Playground: Story = {};
55
55
  export const Variants: Story = {
56
56
  render: ({ children }) => {
57
57
  return (
58
- <Flex direction="column" space="sm">
58
+ <Flex direction="column" spacing="sm">
59
59
  <List></List>
60
60
  <BodyText>
61
61
  This is the body text style, and it contains an{' '}
@@ -107,7 +107,7 @@ export const Variants: Story = {
107
107
  setClearableSearchValue('');
108
108
  };
109
109
  return (
110
- <Flex direction="column" space="lg">
110
+ <Flex direction="column" spacing="lg">
111
111
  <VariantTitle title="Default">
112
112
  <Input />
113
113
  </VariantTitle>
@@ -202,7 +202,7 @@ export const RefTest: Story = {
202
202
  };
203
203
 
204
204
  return (
205
- <Flex direction="column" space="lg">
205
+ <Flex direction="column" spacing="lg">
206
206
  <VariantTitle title="Ref Test">
207
207
  <Input
208
208
  ref={inputRef}
@@ -211,8 +211,8 @@ export const RefTest: Story = {
211
211
  />
212
212
  </VariantTitle>
213
213
  <VariantTitle title="Status">
214
- <Flex direction="column" space="sm">
215
- <Flex direction="row" space="sm">
214
+ <Flex direction="column" spacing="sm">
215
+ <Flex direction="row" spacing="sm">
216
216
  <Button onPress={handleFocus}>Focus Input</Button>
217
217
  <Button onPress={handleBlur}>Blur Input</Button>
218
218
  <Button onPress={handleClear}>Clear Input</Button>
@@ -408,7 +408,7 @@ export const KitchenSink: Story = {
408
408
  { text: 'List Item 3', helperText: 'Supporting Text 3' },
409
409
  ];
410
410
  return (
411
- <Flex space="sm" direction="column" style={{ width: '100%' }}>
411
+ <Flex spacing="sm" direction="column" style={{ width: '100%' }}>
412
412
  <VariantTitle title="List with title and supporting text">
413
413
  <List heading="List Heading" helperText="Supporting Text">
414
414
  {list.map((item, index) => (
@@ -328,21 +328,35 @@ const styles = StyleSheet.create((theme, rt) => ({
328
328
  variants: {
329
329
  bothButtons: {
330
330
  true: {
331
- paddingBottom: 166 + rt.insets.bottom - theme.components.modal.padding,
331
+ paddingBottom:
332
+ 166 +
333
+ rt.insets.bottom -
334
+ theme.components.modal.padding +
335
+ theme.components.bottomSheet.padding,
332
336
  },
333
337
  false: {
334
- paddingBottom: 102 + rt.insets.bottom - theme.components.modal.padding,
338
+ paddingBottom:
339
+ 102 +
340
+ rt.insets.bottom -
341
+ theme.components.modal.padding +
342
+ theme.components.bottomSheet.padding,
335
343
  },
336
344
  },
337
345
  noButtons: {
338
346
  true: {
339
- paddingBottom: rt.insets.bottom + theme.components.modal.padding,
347
+ paddingBottom:
348
+ rt.insets.bottom +
349
+ theme.components.modal.padding +
350
+ theme.components.bottomSheet.padding,
340
351
  },
341
352
  },
342
353
  stickyFooter: {
343
354
  true: {},
344
355
  false: {
345
- paddingBottom: rt.insets.bottom + theme.components.modal.padding,
356
+ paddingBottom:
357
+ rt.insets.bottom +
358
+ theme.components.modal.padding +
359
+ theme.components.bottomSheet.padding,
346
360
  },
347
361
  },
348
362
  },
@@ -54,30 +54,30 @@ export const PillStates: Story = {
54
54
  const selectedValue = '2';
55
55
 
56
56
  return (
57
- <Flex space="xl" direction="column" align="center">
57
+ <Flex spacing="xl" direction="column" align="center">
58
58
  <VariantTitle title="Unselected">
59
- <Flex direction="row" space="sm">
59
+ <Flex direction="row" spacing="sm">
60
60
  <PillGroup value={selectedValue} onChange={() => {}}>
61
61
  <Pill value="1" label="Label" />
62
62
  </PillGroup>
63
63
  </Flex>
64
64
  </VariantTitle>
65
65
  <VariantTitle title="Selected">
66
- <Flex direction="row" space="sm">
66
+ <Flex direction="row" spacing="sm">
67
67
  <PillGroup value={selectedValue} onChange={() => {}}>
68
68
  <Pill value="2" label="Label" />
69
69
  </PillGroup>
70
70
  </Flex>
71
71
  </VariantTitle>
72
72
  <VariantTitle title="With Icon - Unselected">
73
- <Flex direction="row" space="sm">
73
+ <Flex direction="row" spacing="sm">
74
74
  <PillGroup value={selectedValue} onChange={() => {}}>
75
75
  <Pill value="1" label="New" icon={HeartMediumIcon} />
76
76
  </PillGroup>
77
77
  </Flex>
78
78
  </VariantTitle>
79
79
  <VariantTitle title="With Icon - Selected">
80
- <Flex direction="row" space="sm">
80
+ <Flex direction="row" spacing="sm">
81
81
  <PillGroup value={selectedValue} onChange={() => {}}>
82
82
  <Pill value="2" label="New" icon={HeartMediumIcon} />
83
83
  </PillGroup>
@@ -101,7 +101,7 @@ export const WrapBehavior: Story = {
101
101
  const [value2, setValue2] = useState<string>('7');
102
102
 
103
103
  return (
104
- <Flex space="xl" direction="column" align="center">
104
+ <Flex spacing="xl" direction="column" align="center">
105
105
  <VariantTitle title="Wrap: False">
106
106
  <PillGroup wrap={false} value={value1} onChange={setValue1}>
107
107
  <Pill value="1" label="New" />
@@ -139,7 +139,7 @@ export const Multiple: Story = {
139
139
  const [selectedCategories, setSelectedCategories] = useState<string[]>(['new', 'read']);
140
140
 
141
141
  return (
142
- <Flex space="lg" direction="column" align="center" style={{ maxWidth: 400 }}>
142
+ <Flex spacing="lg" direction="column" align="center" style={{ maxWidth: 400 }}>
143
143
  <PillGroup wrap={true} multiple value={selectedCategories} onChange={setSelectedCategories}>
144
144
  <Pill value="unread" label="Unread" />
145
145
  <Pill value="new" label="New" icon={HeartMediumIcon} />
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import { Meta, StoryObj } from '@storybook/react-vite';
3
- import { ProgressStepper, ProgressStep } from '.';
2
+ import { ProgressStep, ProgressStepper } from '.';
4
3
  import { VariantTitle } from '../../../docs/components';
5
4
  import { BodyText } from '../BodyText';
6
5
  import { Flex } from '../Flex';
@@ -20,20 +19,20 @@ type Story = StoryObj<typeof meta>;
20
19
  export const Playground: Story = {
21
20
  args: {
22
21
  children: (
23
- <Flex space="xl" direction="column" align="center" style={{ flex: 1, minWidth: 200 }}>
22
+ <Flex spacing="xl" direction="column" align="center" style={{ flex: 1, minWidth: 200 }}>
24
23
  <ProgressStepper>
25
24
  <ProgressStep id={'1'} status="complete" />
26
25
  <ProgressStep id={'2'} status="complete" />
27
26
  <ProgressStep id={'3'} status="active" />
28
27
  <ProgressStep id={'4'} status="incomplete" />
29
28
  </ProgressStepper>
30
- <Flex direction="row" space="lg" style={{ width: '100%' }}>
29
+ <Flex direction="row" spacing="lg" style={{ width: '100%' }}>
31
30
  <ProgressStep id={'1'} status="complete" />
32
31
  </Flex>
33
- <Flex direction="row" space="lg" style={{ width: '100%' }}>
32
+ <Flex direction="row" spacing="lg" style={{ width: '100%' }}>
34
33
  <ProgressStep id={'3'} status="active" />
35
34
  </Flex>
36
- <Flex direction="row" space="lg" style={{ width: '100%' }}>
35
+ <Flex direction="row" spacing="lg" style={{ width: '100%' }}>
37
36
  <ProgressStep id={'5'} status="incomplete" />
38
37
  </Flex>
39
38
  </Flex>
@@ -50,7 +49,7 @@ export const StepStatuses: Story = {
50
49
  },
51
50
  render: props => {
52
51
  return (
53
- <Flex space="xl" direction="column" align="center">
52
+ <Flex spacing="xl" direction="column" align="center">
54
53
  <VariantTitle title="All Uncompleted Steps">
55
54
  <ProgressStepper {...props}>
56
55
  <ProgressStep id={'1'} status="incomplete" />
@@ -91,7 +90,7 @@ export const BasicExample: Story = {
91
90
  },
92
91
  render: props => {
93
92
  return (
94
- <Flex space="lg" direction="column" align="center">
93
+ <Flex spacing="lg" direction="column" align="center">
95
94
  <Heading size="md">Progress Stepper</Heading>
96
95
  <BodyText>Shows progress through multi-step processes</BodyText>
97
96
  <ProgressStepper {...props}>
@@ -147,7 +147,7 @@ export const Variants: Story = {
147
147
  render: ({ value: _, children: __, label: ___, disabled: _____, onChange: ______, ...args }) => {
148
148
  const [value, setValue] = useState('Option 1');
149
149
  return (
150
- <Flex space="lg">
150
+ <Flex spacing="lg">
151
151
  <VariantTitle title="Default">
152
152
  <RadioGroup
153
153
  aria-label="Radio Group"
@@ -96,7 +96,7 @@ export const WithGrid: Story = {
96
96
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
97
97
  render: ({ value: _, ...args }) => (
98
98
  <RadioGroup {...args}>
99
- <Grid columns={2} space="md">
99
+ <Grid columns={2} spacing="md">
100
100
  <Radio aria-label="Label 1" label="Option 1" value="Option 1" nativeID="Radio-1" />
101
101
  <Radio
102
102
  aria-label="Label 2 (with added option)"
@@ -1,9 +1,9 @@
1
- import FlexProps from '../Flex/Flex.props';
2
1
  import { Flex } from '../Flex';
2
+ import FlexProps from '../Flex/Flex.props';
3
3
 
4
4
  const RadioGroupTextContent = ({ children, ...props }: FlexProps) => {
5
5
  return (
6
- <Flex direction="column" space="none" {...props}>
6
+ <Flex direction="column" spacing="none" {...props}>
7
7
  {children}
8
8
  </Flex>
9
9
  );