@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
@@ -1,4 +1,4 @@
1
1
 
2
- > @utilitywarehouse/hearth-react-native@0.18.0 build /home/runner/work/hearth/hearth/packages/react-native
2
+ > @utilitywarehouse/hearth-react-native@0.19.0 build /home/runner/work/hearth/hearth/packages/react-native
3
3
  > tsc
4
4
 
@@ -1,5 +1,5 @@
1
1
 
2
- > @utilitywarehouse/hearth-react-native@0.18.0 lint /home/runner/work/hearth/hearth/packages/react-native
2
+ > @utilitywarehouse/hearth-react-native@0.19.0 lint /home/runner/work/hearth/hearth/packages/react-native
3
3
  > TIMING=1 eslint .
4
4
 
5
5
 
@@ -50,20 +50,23 @@
50
50
  45:6 warning React Hook useEffect has a missing dependency: 'formFieldContext'. Either include it or remove the dependency array react-hooks/exhaustive-deps
51
51
 
52
52
  /home/runner/work/hearth/hearth/packages/react-native/src/components/Toast/Toast.context.tsx
53
- 9:14 warning Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
54
- 94:14 warning Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
55
-
56
- ✖ 24 problems (0 errors, 24 warnings)
57
-
58
- Rule | Time (ms) | Relative
59
- :---------------------------------|----------:|--------:
60
- @typescript-eslint/no-unused-vars | 1538.884 | 63.7%
61
- no-global-assign | 88.035 | 3.6%
62
- react-hooks/exhaustive-deps | 86.501 | 3.6%
63
- react-hooks/rules-of-hooks | 67.331 | 2.8%
64
- no-misleading-character-class | 48.025 | 2.0%
65
- no-unexpected-multiline | 45.795 | 1.9%
66
- no-loss-of-precision | 34.916 | 1.4%
67
- @typescript-eslint/ban-ts-comment | 33.872 | 1.4%
68
- no-regex-spaces | 31.659 | 1.3%
69
- no-fallthrough | 31.350 | 1.3%
53
+ 14:14 warning Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
54
+ 106:14 warning Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components
55
+
56
+ /home/runner/work/hearth/hearth/packages/react-native/src/components/VerificationInput/VerificationInput.tsx
57
+ 58:7 warning React Hook useImperativeHandle has a missing dependency: 'inputRefs'. Either include it or remove the dependency array react-hooks/exhaustive-deps
58
+
59
+ ✖ 25 problems (0 errors, 25 warnings)
60
+
61
+ Rule | Time (ms) | Relative
62
+ :------------------------------------------|----------:|--------:
63
+ @typescript-eslint/no-unused-vars | 1284.680 | 57.7%
64
+ react-hooks/exhaustive-deps | 121.666 | 5.5%
65
+ react-hooks/rules-of-hooks | 80.650 | 3.6%
66
+ no-global-assign | 65.650 | 2.9%
67
+ @typescript-eslint/ban-ts-comment | 55.037 | 2.5%
68
+ no-regex-spaces | 46.626 | 2.1%
69
+ no-loss-of-precision | 42.743 | 1.9%
70
+ no-misleading-character-class | 41.075 | 1.8%
71
+ no-unexpected-multiline | 38.229 | 1.7%
72
+ @typescript-eslint/no-unsafe-function-type | 27.456 | 1.2%
package/CHANGELOG.md CHANGED
@@ -1,5 +1,107 @@
1
1
  # @utilitywarehouse/hearth-react-native
2
2
 
3
+ ## 0.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#882](https://github.com/utilitywarehouse/hearth/pull/882) [`7e5338c`](https://github.com/utilitywarehouse/hearth/commit/7e5338c75bf051897a5384fe4ce0f65533b7e1a7) Thanks [@jordmccord](https://github.com/jordmccord)! - 💅 [ENHANCEMENT]: Add `safeAreaPadding` option to `ToastProvider`
8
+
9
+ `ToastProvider` now supports an optional `safeAreaPadding` prop to control whether toasts respect safe-area inset padding. This can be useful when you want to disable additional safe-area inset space while keeping the base toast padding.
10
+
11
+ **Components affected**:
12
+ - `ToastProvider`
13
+
14
+ **Developer changes**:
15
+
16
+ No changes required. To disable safe-area inset padding (while preserving the base bottom padding), set `safeAreaPadding` to `false`:
17
+
18
+ ```tsx
19
+ <ToastProvider safeAreaPadding={false}>{children}</ToastProvider>
20
+ ```
21
+
22
+ - [`da893ff`](https://github.com/utilitywarehouse/hearth/commit/da893ff8a9d576a6ca69021737056c7289f8c6aa) Thanks [@jordmccord](https://github.com/jordmccord)! - 💅 [ENHANCEMENT]: Unify spacing prop naming across layout components
23
+
24
+ The `space` prop has been renamed to `spacing` across all layout components for improved consistency and clarity. The `space` prop is now deprecated but will continue to work alongside the new `spacing` prop to maintain backward compatibility.
25
+
26
+ **Components affected**:
27
+ - `Box`
28
+ - `ButtonGroup`
29
+ - `Card`
30
+ - `Container`
31
+ - `Divider`
32
+ - `Flex`
33
+ - `Grid`
34
+
35
+ **Developer changes**:
36
+
37
+ No immediate changes are required. The `space` prop will continue to work as before. However, we recommend migrating to the `spacing` prop at your convenience:
38
+
39
+ ```diff
40
+ - <Flex space="md">
41
+ + <Flex spacing="md">
42
+ <Box>...</Box>
43
+ <Box>...</Box>
44
+ </Flex>
45
+ ```
46
+
47
+ ```diff
48
+ - <Grid columns={2} space="lg">
49
+ + <Grid columns={2} spacing="lg">
50
+ <Box>...</Box>
51
+ <Box>...</Box>
52
+ </Grid>
53
+ ```
54
+
55
+ ```diff
56
+ - <Container space="xl">
57
+ + <Container spacing="xl">
58
+ <Box>...</Box>
59
+ </Container>
60
+ ```
61
+
62
+ The deprecated `space` prop will be removed in a future major version release.
63
+
64
+ - [#877](https://github.com/utilitywarehouse/hearth/pull/877) [`2cdf3a2`](https://github.com/utilitywarehouse/hearth/commit/2cdf3a2f4251b24f34c260f3f5da39f8c330fff5) Thanks [@jordmccord](https://github.com/jordmccord)! - 🌟 [FEATURE]: Add `autoFocus` prop to `VerificationInput`
65
+
66
+ `VerificationInput` now supports an `autoFocus` prop to control whether the first slot should focus on mount.
67
+ Default is `false` to avoid unexpected focus when the component is used.
68
+
69
+ **Developer changes**:
70
+
71
+ ```tsx
72
+ <VerificationInput autoFocus={false} />
73
+ ```
74
+
75
+ - [#877](https://github.com/utilitywarehouse/hearth/pull/877) [`2cdf3a2`](https://github.com/utilitywarehouse/hearth/commit/2cdf3a2f4251b24f34c260f3f5da39f8c330fff5) Thanks [@jordmccord](https://github.com/jordmccord)! - 🌟 [FEATURE]: Add `VerificationInput` ref methods and improve rapid input handling
76
+
77
+ `VerificationInput` now forwards a ref with `focus`, `blur`, `clear`, and `focusIndex` helpers. Input updates also use the latest value to avoid dropped digits when typing quickly.
78
+
79
+ **Developer changes**:
80
+
81
+ If you want to control focus programmatically, pass a ref:
82
+
83
+ ```tsx
84
+ import { useRef } from 'react';
85
+ import {
86
+ VerificationInput,
87
+ type VerificationInputHandle,
88
+ } from '@utilitywarehouse/hearth-react-native';
89
+
90
+ const inputRef = useRef<VerificationInputHandle>(null);
91
+
92
+ <VerificationInput ref={inputRef} onChangeText={setCode} />;
93
+ ```
94
+
95
+ ### Patch Changes
96
+
97
+ - [#880](https://github.com/utilitywarehouse/hearth/pull/880) [`a52bb03`](https://github.com/utilitywarehouse/hearth/commit/a52bb03352dd8b83c9cfd3311aaa390e96e75662) Thanks [@jordmccord](https://github.com/jordmccord)! - 🐛 [FIX]: Remove the unsupported `colorScheme` prop from `Banner` types so the API matches the `Card` component.
98
+
99
+ - [#879](https://github.com/utilitywarehouse/hearth/pull/879) [`383b686`](https://github.com/utilitywarehouse/hearth/commit/383b6860c1b68da139f10a67cd001dd884143df0) Thanks [@jordmccord](https://github.com/jordmccord)! - 🐛 [FIX]: Make `Banner` button full width in vertical layout
100
+
101
+ - [#878](https://github.com/utilitywarehouse/hearth/pull/878) [`b31b8c3`](https://github.com/utilitywarehouse/hearth/commit/b31b8c3d37d4d1ec3df2f187ec18d00b3e663b49) Thanks [@jordmccord](https://github.com/jordmccord)! - 🐛 [FIX]: Fix `Modal` bottom padding
102
+
103
+ - [#881](https://github.com/utilitywarehouse/hearth/pull/881) [`5681b8f`](https://github.com/utilitywarehouse/hearth/commit/5681b8fd4bcc73ad532229018049f959f06f77ec) Thanks [@jordmccord](https://github.com/jordmccord)! - 📦 [DEPS]: Bump `@utilitywarehouse/hearth-react-native-icons` peerDependency to 0.8.0
104
+
3
105
  ## 0.18.0
4
106
 
5
107
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  import type BannerProps from './Banner.props';
2
2
  declare const Banner: {
3
- ({ icon, iconContainerVariant, iconContainerSize, iconContainerColor, illustration, image, heading, description, direction, link, button, onPress, onClose, variant, colorScheme: _, style, ...props }: BannerProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ icon, iconContainerVariant, iconContainerSize, iconContainerColor, illustration, image, heading, description, direction, link, button, onPress, onClose, variant, style, ...props }: BannerProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  export default Banner;
@@ -9,9 +9,7 @@ import { Heading } from '../Heading';
9
9
  import { IconContainer } from '../IconContainer';
10
10
  import { UnstyledIconButton } from '../UnstyledIconButton';
11
11
  import BannerContext from './Banner.context';
12
- const Banner = ({ icon, iconContainerVariant = 'subtle', iconContainerSize = 'md', iconContainerColor = 'pig', illustration, image, heading, description, direction = 'horizontal', link, button, onPress, onClose, variant = 'subtle',
13
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
14
- colorScheme: _, style, ...props }) => {
12
+ const Banner = ({ icon, iconContainerVariant = 'subtle', iconContainerSize = 'md', iconContainerColor = 'pig', illustration, image, heading, description, direction = 'horizontal', link, button, onPress, onClose, variant = 'subtle', style, ...props }) => {
15
13
  const hasIllustration = Boolean(illustration);
16
14
  styles.useVariants({ direction, hasIllustration });
17
15
  const context = useMemo(() => ({
@@ -34,7 +32,7 @@ colorScheme: _, style, ...props }) => {
34
32
  return _jsx(View, { style: styles.action, children: link });
35
33
  }
36
34
  if (button) {
37
- return _jsx(View, { style: styles.action, children: button });
35
+ return (_jsx(View, { style: [styles.action, styles.buttonWrap], children: _jsx(View, { style: styles.buttonInner, children: button }) }));
38
36
  }
39
37
  return null;
40
38
  };
@@ -152,6 +150,28 @@ const styles = StyleSheet.create(theme => ({
152
150
  action: {
153
151
  alignSelf: 'flex-start',
154
152
  },
153
+ buttonWrap: {
154
+ variants: {
155
+ direction: {
156
+ horizontal: {},
157
+ vertical: {
158
+ flexDirection: 'row',
159
+ justifyContent: 'center',
160
+ alignItems: 'stretch',
161
+ },
162
+ },
163
+ },
164
+ },
165
+ buttonInner: {
166
+ variants: {
167
+ direction: {
168
+ horizontal: {},
169
+ vertical: {
170
+ flex: 1,
171
+ },
172
+ },
173
+ },
174
+ },
155
175
  chevron: {
156
176
  alignSelf: 'center',
157
177
  },
@@ -1,7 +1,7 @@
1
1
  import type { ComponentType, ReactElement, ReactNode } from 'react';
2
2
  import type CardProps from '../Card/Card.props';
3
3
  export type BannerDirection = 'horizontal' | 'vertical';
4
- export interface BannerProps extends Omit<CardProps, 'noPadding' | 'variant' | 'colorScheme' | 'space' | 'gap' | 'rowGap' | 'columnGap' | 'flexDirection' | 'flexWrap' | 'alignItems' | 'justifyContent'> {
4
+ export interface BannerProps extends Omit<CardProps, 'noPadding' | 'variant' | 'space' | 'gap' | 'rowGap' | 'columnGap' | 'flexDirection' | 'flexWrap' | 'alignItems' | 'justifyContent'> {
5
5
  /**
6
6
  * Icon component to display in the banner
7
7
  * Mutually exclusive with image
@@ -66,10 +66,5 @@ export interface BannerProps extends Omit<CardProps, 'noPadding' | 'variant' | '
66
66
  * @default 'subtle'
67
67
  */
68
68
  variant?: 'subtle' | 'emphasis';
69
- /**
70
- * Color scheme for the banner
71
- * @default 'pig'
72
- */
73
- colorScheme?: 'pig' | 'energy' | 'broadband' | 'mobile' | 'insurance' | 'cashback' | 'highlight';
74
69
  }
75
70
  export default BannerProps;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { ViewProps, ViewStyle } from 'react-native';
3
- import type { BorderRadiusValue, BordeWidthValue, ColorValue, OpacityValue, SpaceValue } from '../../types';
3
+ import type { BorderRadiusValue, BordeWidthValue, ColorValue, OpacityValue, SpaceValue, SpacingValues } from '../../types';
4
4
  export type OmittedStyles = Omit<ViewStyle, 'backgroundColor' | 'borderBlockColor' | 'borderBlockEndColor' | 'borderBlockStartColor' | 'borderBottomColor' | 'borderBottomEndRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius' | 'borderBottomStartRadius' | 'borderBottomWidth' | 'borderColor' | 'borderEndColor' | 'borderEndEndRadius' | 'borderEndStartRadius' | 'borderEndWidth' | 'borderLeftColor' | 'borderLeftWidth' | 'borderRadius' | 'borderRightColor' | 'borderRightWidth' | 'borderStartColor' | 'borderStartEndRadius' | 'borderStartStartRadius' | 'borderStartWidth' | 'borderTopColor' | 'borderTopEndRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderTopStartRadius' | 'borderTopWidth' | 'borderWidth' | 'bottom' | 'columnGap' | 'end' | 'gap' | 'height' | 'left' | 'margin' | 'marginBottom' | 'marginEnd' | 'marginHorizontal' | 'marginLeft' | 'marginRight' | 'marginStart' | 'marginTop' | 'marginVertical' | 'maxHeight' | 'maxWidth' | 'minHeight' | 'minWidth' | 'opacity' | 'outlineColor' | 'padding' | 'paddingBottom' | 'paddingEnd' | 'paddingHorizontal' | 'paddingLeft' | 'paddingRight' | 'paddingStart' | 'paddingTop' | 'paddingVertical' | 'right' | 'rowGap' | 'shadowColor' | 'start' | 'top' | 'width' | 'rotation' | 'scaleX' | 'scaleY' | 'transformMatrix' | 'translateX' | 'translateY'>;
5
5
  export type OtherBoxViewStyles = Pick<OmittedStyles, 'alignContent' | 'alignItems' | 'alignSelf' | 'aspectRatio' | 'backfaceVisibility' | 'borderCurve' | 'borderStyle' | 'cursor' | 'direction' | 'display' | 'elevation' | 'flex' | 'flexBasis' | 'flexDirection' | 'flexGrow' | 'flexShrink' | 'flexWrap' | 'justifyContent' | 'boxShadow' | 'outlineOffset' | 'outlineStyle' | 'outlineWidth' | 'overflow' | 'pointerEvents' | 'position' | 'shadowOffset' | 'shadowOpacity' | 'shadowRadius' | 'transform' | 'transformOrigin' | 'zIndex'>;
6
6
  export interface BoxStyleMappingValues {
@@ -93,7 +93,10 @@ export interface ThemedBoxViewStyleProps {
93
93
  borderTopWidth?: BordeWidthValue;
94
94
  borderWidth?: BordeWidthValue;
95
95
  }
96
- export interface BoxProps extends BoxStyleMappingValues, ThemedBoxViewStyleProps, OtherBoxViewStyles, ViewProps {
96
+ interface CustomBoxProps {
97
97
  as?: React.ElementType;
98
+ spacing?: SpacingValues;
99
+ }
100
+ export interface BoxProps extends BoxStyleMappingValues, ThemedBoxViewStyleProps, OtherBoxViewStyles, ViewProps, CustomBoxProps {
98
101
  }
99
102
  export default BoxProps;
@@ -7,11 +7,13 @@ export declare const ButtonGroupComponent: import("react").ForwardRefExoticCompo
7
7
  reversed?: boolean;
8
8
  attached?: boolean;
9
9
  space?: import("../../types").SpacingValues;
10
+ spacing?: import("../../types").SpacingValues;
10
11
  }> & import("react-native").ViewProps & {
11
12
  flexDirection?: import("react-native").ViewStyle["flexDirection"];
12
13
  reversed?: boolean;
13
14
  attached?: boolean;
14
15
  space?: import("../../types").SpacingValues;
16
+ spacing?: import("../../types").SpacingValues;
15
17
  } & import("@gluestack-ui/button/lib/typescript/types").IButtonGroupProps>;
16
18
  declare const Button: {
17
19
  ({ children, disabled, pressed, text, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,15 @@
1
1
  import { type ViewProps, type ViewStyle } from 'react-native';
2
2
  import { SpacingValues } from '../../types';
3
3
  declare const ButtonGroupRoot: {
4
- ({ children, attached, flexDirection, reversed, space, ...props }: ViewProps & {
4
+ ({ children, attached, flexDirection, reversed, spacing, space, ...props }: ViewProps & {
5
5
  flexDirection?: ViewStyle["flexDirection"];
6
6
  reversed?: boolean;
7
7
  attached?: boolean;
8
+ /**
9
+ * @deprecated Use `spacing` instead. The `space` prop will be removed in a future release
10
+ */
8
11
  space?: SpacingValues;
12
+ spacing?: SpacingValues;
9
13
  }): import("react/jsx-runtime").JSX.Element;
10
14
  displayName: string;
11
15
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { View } from 'react-native';
3
3
  import { StyleSheet } from 'react-native-unistyles';
4
- const ButtonGroupRoot = ({ children, attached = false, flexDirection = 'row', reversed = false, space = 'md', ...props }) => {
4
+ const ButtonGroupRoot = ({ children, attached = false, flexDirection = 'row', reversed = false, spacing = 'md', space, ...props }) => {
5
5
  let direction = flexDirection;
6
6
  if (reversed) {
7
7
  if (flexDirection === 'row')
@@ -15,7 +15,7 @@ const ButtonGroupRoot = ({ children, attached = false, flexDirection = 'row', re
15
15
  }
16
16
  styles.useVariants({
17
17
  attached,
18
- space,
18
+ spacing: space ?? spacing,
19
19
  });
20
20
  return (_jsx(View, { ...props, style: [styles.text, styles.extraStyles(direction), props.style], children: children }));
21
21
  };
@@ -23,7 +23,7 @@ ButtonGroupRoot.displayName = 'ButtonGroupRoot';
23
23
  const styles = StyleSheet.create(theme => ({
24
24
  text: {
25
25
  variants: {
26
- space: {
26
+ spacing: {
27
27
  none: {
28
28
  gap: theme.layout.mobile.spacing.none,
29
29
  },
@@ -5,7 +5,7 @@ interface CardContextProps {
5
5
  hasActions?: boolean;
6
6
  hasContent?: boolean;
7
7
  hasOnlyActions?: boolean;
8
- space?: CardProps['space'];
8
+ spacing?: CardProps['spacing'];
9
9
  variant?: CardProps['variant'];
10
10
  }
11
11
  export declare const CardContext: import("react").Context<CardContextProps>;
@@ -6,6 +6,8 @@ interface CardProps extends PressableProps {
6
6
  shadowColor?: 'functional' | 'brand' | 'energy' | 'broadband' | 'mobile' | 'insurance' | 'cashback' | 'pig';
7
7
  noPadding?: boolean;
8
8
  disabled?: boolean;
9
+ spacing?: SpacingValues;
10
+ /** @deprecated Use `spacing` instead. The `gap` prop will be removed in a future release. */
9
11
  space?: SpacingValues;
10
12
  alignItems?: ViewStyle['alignItems'];
11
13
  justifyContent?: ViewStyle['justifyContent'];
@@ -3,10 +3,10 @@ import { View } from 'react-native';
3
3
  import { StyleSheet } from 'react-native-unistyles';
4
4
  import { useCardContext } from './Card.context';
5
5
  const CardContent = ({ children, style, ...props }) => {
6
- const { noPadding, space } = useCardContext();
6
+ const { noPadding, spacing } = useCardContext();
7
7
  styles.useVariants({
8
8
  noPadding,
9
- space,
9
+ spacing,
10
10
  });
11
11
  return (_jsx(View, { style: [styles.container, style], ...props, children: children }));
12
12
  };
@@ -14,7 +14,7 @@ CardContent.displayName = 'CardContent';
14
14
  const styles = StyleSheet.create(theme => ({
15
15
  container: {
16
16
  variants: {
17
- space: theme.globalStyle.variants.space,
17
+ spacing: theme.globalStyle.variants.spacing,
18
18
  noPadding: {
19
19
  true: {
20
20
  padding: theme.components.card.mobile.paddingNone,
@@ -1,6 +1,6 @@
1
1
  import CardProps from './Card.props';
2
2
  declare const Card: {
3
- ({ children, variant, colorScheme, shadowColor, noPadding, style, states, space, disabled, onPress, ...rest }: CardProps & {
3
+ ({ children, variant, colorScheme, shadowColor, noPadding, style, states, spacing, space, disabled, onPress, ...rest }: CardProps & {
4
4
  states?: {
5
5
  active?: boolean;
6
6
  disabled?: boolean;
@@ -7,7 +7,7 @@ import { CardContext } from './Card.context';
7
7
  import CardActions from './CardActions';
8
8
  import CardContent from './CardContent';
9
9
  import { checkForComponentType, collectChildActionHandlers, extractCardActions, filterChildren, hasOnlyPotentialActions, } from './helpers';
10
- const Card = ({ children, variant = 'subtle', colorScheme = 'neutralStrong', shadowColor, noPadding = false, style, states, space, disabled = false, onPress, ...rest }) => {
10
+ const Card = ({ children, variant = 'subtle', colorScheme = 'neutralStrong', shadowColor, noPadding = false, style, states, spacing, space, disabled = false, onPress, ...rest }) => {
11
11
  const { active } = states || { active: false };
12
12
  const childActionHandlers = collectChildActionHandlers(children);
13
13
  const hasActions = checkForComponentType(children, CardActions);
@@ -31,9 +31,19 @@ const Card = ({ children, variant = 'subtle', colorScheme = 'neutralStrong', sha
31
31
  hasActions,
32
32
  hasContent,
33
33
  hasOnlyActions,
34
+ spacing: space ?? spacing,
35
+ variant,
36
+ }), [
37
+ showPressed,
38
+ active,
39
+ hasActions,
40
+ hasContent,
41
+ hasOnlyActions,
42
+ noPadding,
34
43
  space,
44
+ spacing,
35
45
  variant,
36
- }), [showPressed, active, hasActions, hasContent, hasOnlyActions, noPadding, space, variant]);
46
+ ]);
37
47
  styles.useVariants({
38
48
  variant,
39
49
  colorScheme,
@@ -41,7 +51,7 @@ const Card = ({ children, variant = 'subtle', colorScheme = 'neutralStrong', sha
41
51
  active,
42
52
  showPressed,
43
53
  disabled,
44
- space: hasActions || hasContent || hasOnlyActions ? 'none' : space,
54
+ spacing: hasActions || hasContent || hasOnlyActions ? 'none' : spacing,
45
55
  shadowColor,
46
56
  });
47
57
  const renderChildren = () => {
@@ -63,7 +73,7 @@ const styles = StyleSheet.create(theme => ({
63
73
  alignItems: 'flex-start',
64
74
  borderRadius: theme.components.card.borderRadius,
65
75
  variants: {
66
- space: theme.globalStyle.variants.space,
76
+ spacing: theme.globalStyle.variants.spacing,
67
77
  variant: {
68
78
  subtle: {
69
79
  borderWidth: theme.components.card.neutral.subtle.borderWidth,
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Flex } from '../Flex';
3
3
  const CheckboxGroupTextContent = ({ children, ...props }) => {
4
- return (_jsx(Flex, { direction: "column", space: "none", ...props, children: children }));
4
+ return (_jsx(Flex, { direction: "column", spacing: "none", ...props, children: children }));
5
5
  };
6
6
  CheckboxGroupTextContent.displayName = 'CheckboxGroupTextContent';
7
7
  export default CheckboxGroupTextContent;
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { StyleSheet } from 'react-native-unistyles';
3
3
  import { Flex } from '../Flex';
4
4
  const CheckboxTextContent = ({ children, style, ...props }) => {
5
- return (_jsx(Flex, { style: [styles.content, style], direction: "column", space: "none", ...props, children: children }));
5
+ return (_jsx(Flex, { style: [styles.content, style], direction: "column", spacing: "none", ...props, children: children }));
6
6
  };
7
7
  const styles = StyleSheet.create({
8
8
  content: {
@@ -1,6 +1,6 @@
1
1
  import type ContainerProps from './Container.props';
2
2
  declare const Container: {
3
- ({ style, children, space, ...props }: ContainerProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ style, children, spacing, space, ...props }: ContainerProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  export default Container;
@@ -2,9 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { View } from 'react-native';
3
3
  import { StyleSheet } from 'react-native-unistyles';
4
4
  import { useStyleProps } from '../../hooks';
5
- const Container = ({ style, children, space = 'md', ...props }) => {
5
+ const Container = ({ style, children, spacing = 'md', space, ...props }) => {
6
6
  const { computedStyles, remainingProps } = useStyleProps(props);
7
- styles.useVariants({ space });
7
+ styles.useVariants({ spacing: space ?? spacing });
8
8
  return (_jsx(View, { style: [styles.container(computedStyles), style], ...remainingProps, children: children }));
9
9
  };
10
10
  Container.displayName = 'Container';
@@ -33,7 +33,7 @@ const styles = StyleSheet.create(theme => ({
33
33
  : undefined,
34
34
  ...extra,
35
35
  variants: {
36
- space: theme.globalStyle.variants.space,
36
+ spacing: theme.globalStyle.variants.spacing,
37
37
  },
38
38
  }),
39
39
  }));
@@ -71,8 +71,13 @@ interface ContainerProps extends ViewProps {
71
71
  mb?: SpaceValue;
72
72
  ml?: SpaceValue;
73
73
  mr?: SpaceValue;
74
+ /**
75
+ * The spacing between child elements (gap).
76
+ */
77
+ spacing?: SpacingValues;
74
78
  /**
75
79
  * The space between child elements (gap).
80
+ * @deprecated Use `spacing` instead. The `space` prop will be removed in a future release.
76
81
  */
77
82
  space?: SpacingValues;
78
83
  /**
@@ -1,6 +1,6 @@
1
1
  import type DividerProps from './Divider.props';
2
2
  declare const Divider: {
3
- ({ orientation, color, space, height, width, flexItem, ...props }: DividerProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ orientation, color, spacing, space, height, width, flexItem, ...props }: DividerProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  export default Divider;