@utilitywarehouse/hearth-react-native 0.18.0 → 0.19.1

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 (147) hide show
  1. package/.storybook/preview.tsx +1 -0
  2. package/.turbo/turbo-build.log +1 -1
  3. package/.turbo/turbo-lint.log +24 -21
  4. package/CHANGELOG.md +128 -0
  5. package/build/components/Banner/Banner.d.ts +1 -1
  6. package/build/components/Banner/Banner.js +24 -4
  7. package/build/components/Banner/Banner.props.d.ts +1 -6
  8. package/build/components/Box/Box.props.d.ts +5 -2
  9. package/build/components/Button/Button.d.ts +2 -0
  10. package/build/components/Button/ButtonGroupRoot.d.ts +5 -1
  11. package/build/components/Button/ButtonGroupRoot.js +3 -3
  12. package/build/components/Card/Card.context.d.ts +1 -1
  13. package/build/components/Card/Card.props.d.ts +2 -0
  14. package/build/components/Card/CardContent.js +3 -3
  15. package/build/components/Card/CardRoot.d.ts +1 -1
  16. package/build/components/Card/CardRoot.js +14 -4
  17. package/build/components/Checkbox/CheckboxGroupTextContent.js +1 -1
  18. package/build/components/Checkbox/CheckboxTextContent.js +1 -1
  19. package/build/components/Container/Container.d.ts +1 -1
  20. package/build/components/Container/Container.js +3 -3
  21. package/build/components/Container/Container.props.d.ts +5 -0
  22. package/build/components/Divider/Divider.d.ts +1 -1
  23. package/build/components/Divider/Divider.js +19 -19
  24. package/build/components/Divider/Divider.props.d.ts +6 -0
  25. package/build/components/ExpandableCard/ExpandableCardExpandedContent.js +1 -1
  26. package/build/components/Flex/Flex.d.ts +1 -1
  27. package/build/components/Flex/Flex.js +3 -3
  28. package/build/components/Flex/Flex.props.d.ts +5 -0
  29. package/build/components/Grid/Grid.d.ts +1 -1
  30. package/build/components/Grid/Grid.js +4 -4
  31. package/build/components/Grid/Grid.props.d.ts +5 -0
  32. package/build/components/Menu/Menu.d.ts +1 -1
  33. package/build/components/Menu/Menu.js +2 -2
  34. package/build/components/Menu/Menu.props.d.ts +2 -6
  35. package/build/components/Modal/Modal.d.ts +1 -1
  36. package/build/components/Modal/Modal.js +16 -6
  37. package/build/components/Modal/Modal.props.d.ts +1 -0
  38. package/build/components/Modal/Modal.web.d.ts +1 -1
  39. package/build/components/Modal/Modal.web.js +2 -2
  40. package/build/components/Radio/RadioGroupTextContent.js +1 -1
  41. package/build/components/Radio/RadioTextContent.js +1 -1
  42. package/build/components/Toast/Toast.context.d.ts +2 -4
  43. package/build/components/Toast/Toast.context.js +14 -2
  44. package/build/components/Toast/Toast.props.d.ts +4 -0
  45. package/build/components/Toast/ToastItem.js +5 -2
  46. package/build/components/VerificationInput/VerificationInput.d.ts +2 -5
  47. package/build/components/VerificationInput/VerificationInput.js +20 -7
  48. package/build/components/VerificationInput/VerificationInput.props.d.ts +10 -0
  49. package/build/components/VerificationInput/index.d.ts +1 -1
  50. package/build/components/VerificationInput/useVerificationInput.d.ts +1 -0
  51. package/build/components/VerificationInput/useVerificationInput.js +24 -9
  52. package/build/core/themes.d.ts +4 -4
  53. package/build/core/themes.js +1 -1
  54. package/build/types/values.d.ts +1 -1
  55. package/docs/changelog.mdx +687 -0
  56. package/docs/components/AllComponents.web.tsx +9 -9
  57. package/docs/layout-components.docs.mdx +3 -3
  58. package/package.json +7 -7
  59. package/scripts/copyChangelog.js +50 -0
  60. package/src/components/Alert/Alert.stories.tsx +1 -1
  61. package/src/components/Avatar/Avatar.stories.tsx +4 -5
  62. package/src/components/Badge/Badge.stories.tsx +3 -3
  63. package/src/components/Banner/Banner.docs.mdx +1 -1
  64. package/src/components/Banner/Banner.props.ts +13 -20
  65. package/src/components/Banner/Banner.stories.tsx +83 -15
  66. package/src/components/Banner/Banner.tsx +27 -3
  67. package/src/components/Box/Box.props.ts +11 -4
  68. package/src/components/Button/Button.docs.mdx +2 -2
  69. package/src/components/Button/Button.stories.tsx +4 -4
  70. package/src/components/Button/ButtonGroupRoot.tsx +8 -3
  71. package/src/components/Card/Card.context.ts +1 -1
  72. package/src/components/Card/Card.docs.mdx +1 -1
  73. package/src/components/Card/Card.props.ts +2 -0
  74. package/src/components/Card/Card.stories.tsx +9 -9
  75. package/src/components/Card/CardAction/CardAction.stories.tsx +2 -2
  76. package/src/components/Card/CardContent.tsx +3 -3
  77. package/src/components/Card/CardRoot.tsx +15 -5
  78. package/src/components/Checkbox/CheckboxGroupTextContent.tsx +2 -2
  79. package/src/components/Checkbox/CheckboxTextContent.tsx +1 -1
  80. package/src/components/Container/Container.docs.mdx +2 -2
  81. package/src/components/Container/Container.props.ts +5 -0
  82. package/src/components/Container/Container.stories.tsx +2 -2
  83. package/src/components/Container/Container.tsx +3 -3
  84. package/src/components/CurrencyInput/CurrencyInput.docs.mdx +1 -1
  85. package/src/components/CurrencyInput/CurrencyInput.stories.tsx +2 -2
  86. package/src/components/DateInput/DateInput.stories.tsx +3 -3
  87. package/src/components/DatePickerInput/DatePickerInput.stories.tsx +1 -1
  88. package/src/components/DescriptionList/DescriptionList.stories.tsx +1 -1
  89. package/src/components/Divider/Divider.docs.mdx +6 -6
  90. package/src/components/Divider/Divider.props.ts +6 -0
  91. package/src/components/Divider/Divider.tsx +19 -18
  92. package/src/components/ExpandableCard/ExpandableCardExpandedContent.tsx +1 -1
  93. package/src/components/Flex/Flex.docs.mdx +3 -3
  94. package/src/components/Flex/Flex.props.ts +5 -0
  95. package/src/components/Flex/Flex.stories.tsx +2 -2
  96. package/src/components/Flex/Flex.tsx +4 -3
  97. package/src/components/FormField/FormField.docs.mdx +1 -1
  98. package/src/components/FormField/FormField.stories.tsx +1 -1
  99. package/src/components/Grid/Grid.docs.mdx +5 -5
  100. package/src/components/Grid/Grid.props.ts +6 -0
  101. package/src/components/Grid/Grid.stories.tsx +8 -8
  102. package/src/components/Grid/Grid.tsx +4 -3
  103. package/src/components/HighlightBanner/HighlightBanner.docs.mdx +1 -1
  104. package/src/components/HighlightBanner/HighlightBanner.stories.tsx +2 -2
  105. package/src/components/Icon/Icon.docs.mdx +3 -3
  106. package/src/components/IconButton/IconButton.stories.tsx +5 -5
  107. package/src/components/IconContainer/IconContainer.docs.mdx +1 -1
  108. package/src/components/IconContainer/IconContainer.stories.tsx +3 -3
  109. package/src/components/IndicatorIconButton/IndicatorIconButton.stories.tsx +17 -9
  110. package/src/components/InlineLink/InlineLink.stories.tsx +2 -2
  111. package/src/components/Input/Input.stories.tsx +4 -4
  112. package/src/components/List/List.stories.tsx +1 -1
  113. package/src/components/Menu/Menu.docs.mdx +8 -5
  114. package/src/components/Menu/Menu.figma.tsx +27 -27
  115. package/src/components/Menu/Menu.props.ts +2 -6
  116. package/src/components/Menu/Menu.tsx +3 -6
  117. package/src/components/Menu/MenuItem.figma.tsx +26 -18
  118. package/src/components/Modal/Modal.docs.mdx +22 -21
  119. package/src/components/Modal/Modal.figma.tsx +58 -47
  120. package/src/components/Modal/Modal.props.ts +1 -0
  121. package/src/components/Modal/Modal.stories.tsx +4 -0
  122. package/src/components/Modal/Modal.tsx +20 -5
  123. package/src/components/Modal/Modal.web.tsx +2 -1
  124. package/src/components/PillGroup/PillGroup.stories.tsx +7 -7
  125. package/src/components/ProgressStepper/ProgressStepper.stories.tsx +7 -8
  126. package/src/components/Radio/Radio.stories.tsx +1 -1
  127. package/src/components/Radio/RadioGroup.stories.tsx +1 -1
  128. package/src/components/Radio/RadioGroupTextContent.tsx +2 -2
  129. package/src/components/Radio/RadioTextContent.tsx +1 -1
  130. package/src/components/SectionHeader/SectionHeader.stories.tsx +1 -1
  131. package/src/components/Switch/Switch.docs.mdx +8 -8
  132. package/src/components/Switch/Switch.stories.tsx +2 -2
  133. package/src/components/Tabs/Tabs.stories.tsx +1 -1
  134. package/src/components/Textarea/Textarea.docs.mdx +3 -3
  135. package/src/components/Toast/Toast.context.tsx +24 -3
  136. package/src/components/Toast/Toast.props.ts +5 -0
  137. package/src/components/Toast/Toast.stories.tsx +29 -0
  138. package/src/components/Toast/ToastItem.tsx +7 -2
  139. package/src/components/UnstyledIconButton/UnstyledIconButton.stories.tsx +5 -5
  140. package/src/components/VerificationInput/VerificationInput.docs.mdx +31 -8
  141. package/src/components/VerificationInput/VerificationInput.props.ts +11 -0
  142. package/src/components/VerificationInput/VerificationInput.stories.tsx +79 -3
  143. package/src/components/VerificationInput/VerificationInput.tsx +94 -62
  144. package/src/components/VerificationInput/index.ts +4 -2
  145. package/src/components/VerificationInput/useVerificationInput.ts +26 -10
  146. package/src/core/themes.ts +1 -1
  147. package/src/types/values.ts +1 -1
@@ -68,6 +68,7 @@ const preview = {
68
68
  order: [
69
69
  'Introduction',
70
70
  'Getting Started',
71
+ 'Changelog',
71
72
  'Styling',
72
73
  'Theme Tokens',
73
74
  'Hooks',
@@ -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.1 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.1 lint /home/runner/work/hearth/hearth/packages/react-native
3
3
  > TIMING=1 eslint .
4
4
 
5
5
 
@@ -31,11 +31,11 @@
31
31
  78:8 warning React Hook useEffect has a missing dependency: 'formFieldContext'. Either include it or remove the dependency array react-hooks/exhaustive-deps
32
32
 
33
33
  /home/runner/work/hearth/hearth/packages/react-native/src/components/Modal/Modal.tsx
34
- 72:6 warning React Hook useCallback has an unnecessary dependency: 'Platform.OS'. Either exclude it or remove the dependency array. Outer scope values like 'Platform.OS' aren't valid dependencies because mutating them doesn't re-render the component react-hooks/exhaustive-deps
35
- 268:5 warning React Hook useCallback has a missing dependency: 'footer'. Either include it or remove the dependency array react-hooks/exhaustive-deps
34
+ 73:6 warning React Hook useCallback has an unnecessary dependency: 'Platform.OS'. Either exclude it or remove the dependency array. Outer scope values like 'Platform.OS' aren't valid dependencies because mutating them doesn't re-render the component react-hooks/exhaustive-deps
35
+ 269:5 warning React Hook useCallback has a missing dependency: 'footer'. Either include it or remove the dependency array react-hooks/exhaustive-deps
36
36
 
37
37
  /home/runner/work/hearth/hearth/packages/react-native/src/components/Modal/Modal.web.tsx
38
- 65:6 warning React Hook useCallback has an unnecessary dependency: 'Platform.OS'. Either exclude it or remove the dependency array. Outer scope values like 'Platform.OS' aren't valid dependencies because mutating them doesn't re-render the component react-hooks/exhaustive-deps
38
+ 66:6 warning React Hook useCallback has an unnecessary dependency: 'Platform.OS'. Either exclude it or remove the dependency array. Outer scope values like 'Platform.OS' aren't valid dependencies because mutating them doesn't re-render the component react-hooks/exhaustive-deps
39
39
 
40
40
  /home/runner/work/hearth/hearth/packages/react-native/src/components/PillGroup/PillGroup.tsx
41
41
  17:9 warning The 'normalizedValue' conditional could make the dependencies of useMemo Hook (at line 33) change on every render. Move it inside the useMemo callback. Alternatively, wrap the initialization of 'normalizedValue' in its own useMemo() Hook react-hooks/exhaustive-deps
@@ -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 | 1514.844 | 61.6%
64
+ no-global-assign | 96.121 | 3.9%
65
+ react-hooks/rules-of-hooks | 93.488 | 3.8%
66
+ react-hooks/exhaustive-deps | 87.951 | 3.6%
67
+ no-unexpected-multiline | 50.126 | 2.0%
68
+ @typescript-eslint/triple-slash-reference | 46.928 | 1.9%
69
+ @typescript-eslint/ban-ts-comment | 41.120 | 1.7%
70
+ no-misleading-character-class | 40.149 | 1.6%
71
+ @typescript-eslint/no-unnecessary-type-constraint | 31.744 | 1.3%
72
+ no-loss-of-precision | 31.510 | 1.3%
package/CHANGELOG.md CHANGED
@@ -1,5 +1,133 @@
1
1
  # @utilitywarehouse/hearth-react-native
2
2
 
3
+ ## 0.19.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#886](https://github.com/utilitywarehouse/hearth/pull/886) [`7a948de`](https://github.com/utilitywarehouse/hearth/commit/7a948dea0d15ce7ca34e4d405e86984213c96196) Thanks [@jordmccord](https://github.com/jordmccord)! - 💅 [ENHANCEMENT]: Add `loadingHeading` prop to `Modal` component
8
+
9
+ The `Modal` component now supports a `loadingHeading` prop to customize the heading text displayed during loading states. If not provided, it defaults to 'Loading...'.
10
+
11
+ **Components affected**:
12
+ - `Modal`
13
+
14
+ **Developer changes**:
15
+
16
+ No changes required. To customize the loading heading text, use the new `loadingHeading` prop:
17
+
18
+ ```tsx
19
+ <Modal
20
+ loading={isLoading}
21
+ loadingHeading="Processing your request..."
22
+ heading="Confirm Action"
23
+ description="Please wait while we process your request"
24
+ />
25
+ ```
26
+
27
+ - [#888](https://github.com/utilitywarehouse/hearth/pull/888) [`9b3e172`](https://github.com/utilitywarehouse/hearth/commit/9b3e172f9964026f4f3ba140731432ac63550256) Thanks [@jordmccord](https://github.com/jordmccord)! - 🐛 [FIX]: Align `Toast` icon and dismiss button to the top
28
+
29
+ ## 0.19.0
30
+
31
+ ### Minor Changes
32
+
33
+ - [#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`
34
+
35
+ `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.
36
+
37
+ **Components affected**:
38
+ - `ToastProvider`
39
+
40
+ **Developer changes**:
41
+
42
+ No changes required. To disable safe-area inset padding (while preserving the base bottom padding), set `safeAreaPadding` to `false`:
43
+
44
+ ```tsx
45
+ <ToastProvider safeAreaPadding={false}>{children}</ToastProvider>
46
+ ```
47
+
48
+ - [`da893ff`](https://github.com/utilitywarehouse/hearth/commit/da893ff8a9d576a6ca69021737056c7289f8c6aa) Thanks [@jordmccord](https://github.com/jordmccord)! - 💅 [ENHANCEMENT]: Unify spacing prop naming across layout components
49
+
50
+ 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.
51
+
52
+ **Components affected**:
53
+ - `Box`
54
+ - `ButtonGroup`
55
+ - `Card`
56
+ - `Container`
57
+ - `Divider`
58
+ - `Flex`
59
+ - `Grid`
60
+
61
+ **Developer changes**:
62
+
63
+ 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:
64
+
65
+ ```diff
66
+ - <Flex space="md">
67
+ + <Flex spacing="md">
68
+ <Box>...</Box>
69
+ <Box>...</Box>
70
+ </Flex>
71
+ ```
72
+
73
+ ```diff
74
+ - <Grid columns={2} space="lg">
75
+ + <Grid columns={2} spacing="lg">
76
+ <Box>...</Box>
77
+ <Box>...</Box>
78
+ </Grid>
79
+ ```
80
+
81
+ ```diff
82
+ - <Container space="xl">
83
+ + <Container spacing="xl">
84
+ <Box>...</Box>
85
+ </Container>
86
+ ```
87
+
88
+ The deprecated `space` prop will be removed in a future major version release.
89
+
90
+ - [#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`
91
+
92
+ `VerificationInput` now supports an `autoFocus` prop to control whether the first slot should focus on mount.
93
+ Default is `false` to avoid unexpected focus when the component is used.
94
+
95
+ **Developer changes**:
96
+
97
+ ```tsx
98
+ <VerificationInput autoFocus={false} />
99
+ ```
100
+
101
+ - [#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
102
+
103
+ `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.
104
+
105
+ **Developer changes**:
106
+
107
+ If you want to control focus programmatically, pass a ref:
108
+
109
+ ```tsx
110
+ import { useRef } from 'react';
111
+ import {
112
+ VerificationInput,
113
+ type VerificationInputHandle,
114
+ } from '@utilitywarehouse/hearth-react-native';
115
+
116
+ const inputRef = useRef<VerificationInputHandle>(null);
117
+
118
+ <VerificationInput ref={inputRef} onChangeText={setCode} />;
119
+ ```
120
+
121
+ ### Patch Changes
122
+
123
+ - [#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.
124
+
125
+ - [#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
126
+
127
+ - [#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
128
+
129
+ - [#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
130
+
3
131
  ## 0.18.0
4
132
 
5
133
  ### 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;