@utilitywarehouse/hearth-react-native 0.20.0 → 0.21.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 (123) hide show
  1. package/.storybook/manager.ts +1 -0
  2. package/.storybook/preview.tsx +1 -0
  3. package/.turbo/turbo-build.log +1 -1
  4. package/.turbo/turbo-lint.log +13 -13
  5. package/CHANGELOG.md +249 -0
  6. package/build/components/BodyText/BodyText.js +12 -5
  7. package/build/components/BodyText/BodyText.props.d.ts +5 -19
  8. package/build/components/Box/Box.js +23 -3
  9. package/build/components/Box/Box.props.d.ts +3 -95
  10. package/build/components/Card/Card.props.d.ts +2 -5
  11. package/build/components/Container/Container.props.d.ts +2 -78
  12. package/build/components/DateInput/DateInput.d.ts +1 -1
  13. package/build/components/DateInput/DateInput.js +2 -2
  14. package/build/components/DateInput/DateInput.props.d.ts +15 -1
  15. package/build/components/DateInput/DateInputSegment.d.ts +1 -1
  16. package/build/components/DateInput/DateInputSegment.js +2 -2
  17. package/build/components/DetailText/DetailText.js +14 -13
  18. package/build/components/DetailText/DetailText.props.d.ts +4 -17
  19. package/build/components/Flex/Flex.js +3 -1
  20. package/build/components/Flex/Flex.props.d.ts +2 -2
  21. package/build/components/Heading/Heading.js +34 -13
  22. package/build/components/Heading/Heading.props.d.ts +4 -18
  23. package/build/core/themes.d.ts +188 -8
  24. package/build/core/themes.js +18 -2
  25. package/build/hooks/useStyleProps.js +22 -5
  26. package/build/tokens/color.d.ts +4 -0
  27. package/build/tokens/color.js +2 -0
  28. package/build/tokens/components/dark/modal.d.ts +6 -0
  29. package/build/tokens/components/dark/modal.js +6 -0
  30. package/build/tokens/components/dark/navigation.d.ts +1 -0
  31. package/build/tokens/components/dark/navigation.js +1 -0
  32. package/build/tokens/components/light/modal.d.ts +6 -0
  33. package/build/tokens/components/light/modal.js +6 -0
  34. package/build/tokens/components/light/navigation.d.ts +1 -0
  35. package/build/tokens/components/light/navigation.js +1 -0
  36. package/build/tokens/components/light/skeleton.d.ts +1 -1
  37. package/build/tokens/components/light/skeleton.js +1 -1
  38. package/build/tokens/font.d.ts +2 -0
  39. package/build/tokens/font.js +2 -0
  40. package/build/tokens/line-height.d.ts +2 -0
  41. package/build/tokens/line-height.js +2 -0
  42. package/build/tokens/primitive.d.ts +4 -0
  43. package/build/tokens/primitive.js +4 -0
  44. package/build/tokens/semantic-dark.d.ts +1 -0
  45. package/build/tokens/semantic-dark.js +1 -0
  46. package/build/tokens/semantic-light.d.ts +1 -0
  47. package/build/tokens/semantic-light.js +1 -0
  48. package/build/tokens/typography.d.ts +30 -0
  49. package/build/tokens/typography.js +15 -0
  50. package/build/types/index.d.ts +4 -2
  51. package/build/types/index.js +4 -2
  52. package/build/types/semanticColorValues.d.ts +22 -0
  53. package/build/types/semanticColorValues.js +1 -0
  54. package/build/types/utilityProps.d.ts +326 -0
  55. package/build/types/utilityProps.js +1 -0
  56. package/build/types/values.d.ts +4 -3
  57. package/build/utils/coloursAsArray.d.ts +4 -0
  58. package/build/utils/coloursAsArray.js +5 -0
  59. package/build/utils/index.d.ts +1 -1
  60. package/build/utils/index.js +1 -1
  61. package/build/utils/styleUtils.d.ts +26 -2
  62. package/build/utils/styleUtils.js +42 -13
  63. package/build/utils/themeValueHelpers.d.ts +13 -0
  64. package/build/utils/themeValueHelpers.js +29 -0
  65. package/docs/changelog.mdx +74 -2
  66. package/docs/components/AllComponents.web.tsx +23 -24
  67. package/docs/components/UsageWrap.tsx +2 -2
  68. package/docs/introduction.mdx +0 -7
  69. package/package.json +5 -3
  70. package/src/components/BodyText/BodyText.props.ts +5 -19
  71. package/src/components/BodyText/BodyText.stories.tsx +2 -1
  72. package/src/components/BodyText/BodyText.tsx +17 -6
  73. package/src/components/Box/Box.docs.mdx +5 -4
  74. package/src/components/Box/Box.props.ts +3 -231
  75. package/src/components/Box/Box.stories.tsx +2 -2
  76. package/src/components/Box/Box.tsx +38 -9
  77. package/src/components/Button/Button.docs.mdx +46 -1
  78. package/src/components/Card/Card.docs.mdx +1 -1
  79. package/src/components/Card/Card.props.ts +2 -5
  80. package/src/components/Card/Card.stories.tsx +54 -23
  81. package/src/components/Carousel/Carousel.docs.mdx +49 -44
  82. package/src/components/Center/Center.docs.mdx +6 -4
  83. package/src/components/Container/Container.docs.mdx +13 -8
  84. package/src/components/Container/Container.props.ts +9 -80
  85. package/src/components/Container/Container.stories.tsx +81 -65
  86. package/src/components/DateInput/DateInput.docs.mdx +43 -0
  87. package/src/components/DateInput/DateInput.props.ts +15 -1
  88. package/src/components/DateInput/DateInput.stories.tsx +37 -2
  89. package/src/components/DateInput/DateInput.tsx +6 -0
  90. package/src/components/DateInput/DateInputSegment.tsx +2 -0
  91. package/src/components/DetailText/DetailText.props.ts +4 -17
  92. package/src/components/DetailText/DetailText.stories.tsx +2 -3
  93. package/src/components/DetailText/DetailText.tsx +16 -17
  94. package/src/components/Flex/Flex.props.ts +2 -2
  95. package/src/components/Flex/Flex.stories.tsx +1 -1
  96. package/src/components/Flex/Flex.tsx +4 -1
  97. package/src/components/Grid/Grid.docs.mdx +53 -49
  98. package/src/components/Heading/Heading.props.ts +4 -18
  99. package/src/components/Heading/Heading.stories.tsx +2 -1
  100. package/src/components/Heading/Heading.tsx +40 -18
  101. package/src/components/Toast/ToastItem.figma.tsx +1 -8
  102. package/src/core/themes.ts +19 -2
  103. package/src/hooks/useStyleProps.ts +40 -5
  104. package/src/tokens/color.ts +2 -0
  105. package/src/tokens/components/dark/modal.ts +6 -0
  106. package/src/tokens/components/dark/navigation.ts +1 -0
  107. package/src/tokens/components/light/modal.ts +6 -0
  108. package/src/tokens/components/light/navigation.ts +1 -0
  109. package/src/tokens/components/light/skeleton.ts +1 -1
  110. package/src/tokens/font.ts +2 -0
  111. package/src/tokens/line-height.ts +2 -0
  112. package/src/tokens/primitive.ts +4 -0
  113. package/src/tokens/semantic-dark.ts +1 -0
  114. package/src/tokens/semantic-light.ts +1 -0
  115. package/src/tokens/typography.ts +15 -0
  116. package/src/types/index.ts +4 -2
  117. package/src/types/semanticColorValues.ts +26 -0
  118. package/src/types/utilityProps.ts +410 -0
  119. package/src/types/values.ts +4 -7
  120. package/src/utils/coloursAsArray.ts +6 -0
  121. package/src/utils/index.ts +8 -1
  122. package/src/utils/styleUtils.ts +45 -14
  123. package/src/utils/themeValueHelpers.ts +38 -0
@@ -1,228 +1,6 @@
1
1
  import React from 'react';
2
- import type { ViewProps, ViewStyle } from 'react-native';
3
- import type {
4
- BorderRadiusValue,
5
- BordeWidthValue,
6
- ColorValue,
7
- OpacityValue,
8
- SpaceValue,
9
- SpacingValues,
10
- } from '../../types';
11
-
12
- export type OmittedStyles = Omit<
13
- ViewStyle,
14
- | 'backgroundColor'
15
- | 'borderBlockColor'
16
- | 'borderBlockEndColor'
17
- | 'borderBlockStartColor'
18
- | 'borderBottomColor'
19
- | 'borderBottomEndRadius'
20
- | 'borderBottomLeftRadius'
21
- | 'borderBottomRightRadius'
22
- | 'borderBottomStartRadius'
23
- | 'borderBottomWidth'
24
- | 'borderColor'
25
- | 'borderEndColor'
26
- | 'borderEndEndRadius'
27
- | 'borderEndStartRadius'
28
- | 'borderEndWidth'
29
- | 'borderLeftColor'
30
- | 'borderLeftWidth'
31
- | 'borderRadius'
32
- | 'borderRightColor'
33
- | 'borderRightWidth'
34
- | 'borderStartColor'
35
- | 'borderStartEndRadius'
36
- | 'borderStartStartRadius'
37
- | 'borderStartWidth'
38
- | 'borderTopColor'
39
- | 'borderTopEndRadius'
40
- | 'borderTopLeftRadius'
41
- | 'borderTopRightRadius'
42
- | 'borderTopStartRadius'
43
- | 'borderTopWidth'
44
- | 'borderWidth'
45
- | 'bottom'
46
- | 'columnGap'
47
- | 'end'
48
- | 'gap'
49
- | 'height'
50
- | 'left'
51
- | 'margin'
52
- | 'marginBottom'
53
- | 'marginEnd'
54
- | 'marginHorizontal'
55
- | 'marginLeft'
56
- | 'marginRight'
57
- | 'marginStart'
58
- | 'marginTop'
59
- | 'marginVertical'
60
- | 'maxHeight'
61
- | 'maxWidth'
62
- | 'minHeight'
63
- | 'minWidth'
64
- | 'opacity'
65
- | 'outlineColor'
66
- | 'padding'
67
- | 'paddingBottom'
68
- | 'paddingEnd'
69
- | 'paddingHorizontal'
70
- | 'paddingLeft'
71
- | 'paddingRight'
72
- | 'paddingStart'
73
- | 'paddingTop'
74
- | 'paddingVertical'
75
- | 'right'
76
- | 'rowGap'
77
- | 'shadowColor'
78
- | 'start'
79
- | 'top'
80
- | 'width'
81
- // deprecated
82
- | 'rotation'
83
- | 'scaleX'
84
- | 'scaleY'
85
- | 'transformMatrix'
86
- | 'translateX'
87
- | 'translateY'
88
- >;
89
-
90
- export type OtherBoxViewStyles = Pick<
91
- OmittedStyles,
92
- // List of other styles to include
93
- | 'alignContent'
94
- | 'alignItems'
95
- | 'alignSelf'
96
- | 'aspectRatio'
97
- | 'backfaceVisibility'
98
- | 'borderCurve'
99
- | 'borderStyle'
100
- | 'cursor'
101
- | 'direction'
102
- | 'display'
103
- | 'elevation'
104
- | 'flex'
105
- | 'flexBasis'
106
- | 'flexDirection'
107
- | 'flexGrow'
108
- | 'flexShrink'
109
- | 'flexWrap'
110
- | 'justifyContent'
111
- | 'boxShadow'
112
- | 'outlineOffset'
113
- | 'outlineStyle'
114
- | 'outlineWidth'
115
- | 'overflow'
116
- | 'pointerEvents'
117
- | 'position'
118
- | 'shadowOffset'
119
- | 'shadowOpacity'
120
- | 'shadowRadius'
121
- | 'transform'
122
- | 'transformOrigin'
123
- | 'zIndex'
124
- >;
125
-
126
- export interface BoxStyleMappingValues {
127
- // Style Mapping
128
- // - Colors
129
- bg?: ColorValue;
130
- bgColor?: ColorValue;
131
- // - Space
132
- h?: SpaceValue;
133
- w?: SpaceValue;
134
- p?: SpaceValue;
135
- px?: SpaceValue;
136
- py?: SpaceValue;
137
- pt?: SpaceValue;
138
- pb?: SpaceValue;
139
- pr?: SpaceValue;
140
- pl?: SpaceValue;
141
- m?: SpaceValue;
142
- mx?: SpaceValue;
143
- my?: SpaceValue;
144
- mt?: SpaceValue;
145
- mb?: SpaceValue;
146
- mr?: SpaceValue;
147
- ml?: SpaceValue;
148
- // - Radii
149
- rounded?: BorderRadiusValue;
150
- }
151
-
152
- export interface ThemedBoxViewStyleProps {
153
- // - Space
154
- top?: SpaceValue;
155
- bottom?: SpaceValue;
156
- left?: SpaceValue;
157
- right?: SpaceValue;
158
- padding?: SpaceValue;
159
- paddingHorizontal?: SpaceValue;
160
- paddingVertical?: SpaceValue;
161
- paddingTop?: SpaceValue;
162
- paddingBottom?: SpaceValue;
163
- paddingLeft?: SpaceValue;
164
- paddingRight?: SpaceValue;
165
- paddingEnd?: SpaceValue;
166
- paddingStart?: SpaceValue;
167
- margin?: SpaceValue;
168
- marginHorizontal?: SpaceValue;
169
- marginVertical?: SpaceValue;
170
- marginTop?: SpaceValue;
171
- marginBottom?: SpaceValue;
172
- marginLeft?: SpaceValue;
173
- marginRight?: SpaceValue;
174
- marginEnd?: SpaceValue;
175
- marginStart?: SpaceValue;
176
- columnGap?: SpaceValue;
177
- gap?: SpaceValue;
178
- rowGap?: SpaceValue;
179
- height?: SpaceValue;
180
- width?: SpaceValue;
181
- minHeight?: SpaceValue;
182
- minWidth?: SpaceValue;
183
- maxWidth?: SpaceValue;
184
- maxHeight?: SpaceValue;
185
- start?: SpaceValue;
186
- end?: SpaceValue;
187
- // - Colors
188
- backgroundColor?: ColorValue;
189
- borderColor?: ColorValue;
190
- borderBottomColor?: ColorValue;
191
- borderLeftColor?: ColorValue;
192
- borderRightColor?: ColorValue;
193
- borderTopColor?: ColorValue;
194
- borderBlockColor?: ColorValue;
195
- borderBlockEndColor?: ColorValue;
196
- borderBlockStartColor?: ColorValue;
197
- borderEndColor?: ColorValue;
198
- borderStartColor?: ColorValue;
199
- outlineColor?: ColorValue;
200
- shadowColor?: ColorValue;
201
- // - Radii
202
- borderRadius?: BorderRadiusValue;
203
- borderBottomEndRadius?: BorderRadiusValue;
204
- borderBottomLeftRadius?: BorderRadiusValue;
205
- borderBottomRightRadius?: BorderRadiusValue;
206
- borderBottomStartRadius?: BorderRadiusValue;
207
- borderTopEndRadius?: BorderRadiusValue;
208
- borderTopLeftRadius?: BorderRadiusValue;
209
- borderTopRightRadius?: BorderRadiusValue;
210
- borderTopStartRadius?: BorderRadiusValue;
211
- borderEndEndRadius?: BorderRadiusValue;
212
- borderEndStartRadius?: BorderRadiusValue;
213
- borderStartEndRadius?: BorderRadiusValue;
214
- borderStartStartRadius?: BorderRadiusValue;
215
- // - Opacity
216
- opacity?: OpacityValue;
217
- // - Border Width
218
- borderBottomWidth?: BordeWidthValue;
219
- borderEndWidth?: BordeWidthValue;
220
- borderLeftWidth?: BordeWidthValue;
221
- borderRightWidth?: BordeWidthValue;
222
- borderStartWidth?: BordeWidthValue;
223
- borderTopWidth?: BordeWidthValue;
224
- borderWidth?: BordeWidthValue;
225
- }
2
+ import type { ViewProps } from 'react-native';
3
+ import type { AllUtilityProps, SpacingValues } from '../../types';
226
4
 
227
5
  interface CustomBoxProps {
228
6
  // Custom props
@@ -230,12 +8,6 @@ interface CustomBoxProps {
230
8
  spacing?: SpacingValues;
231
9
  }
232
10
 
233
- export interface BoxProps
234
- extends
235
- BoxStyleMappingValues,
236
- ThemedBoxViewStyleProps,
237
- OtherBoxViewStyles,
238
- ViewProps,
239
- CustomBoxProps {}
11
+ export interface BoxProps extends AllUtilityProps, ViewProps, CustomBoxProps {}
240
12
 
241
13
  export default BoxProps;
@@ -2,11 +2,11 @@ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { primitive } from '@utilitywarehouse/hearth-tokens/js';
3
3
  import { InputType } from 'storybook/internal/types';
4
4
  import { Box } from '.';
5
- import { coloursAsArray } from '../../utils';
5
+ import { backgroundColorKeys } from '../../utils/coloursAsArray';
6
6
  import { BodyText } from '../BodyText';
7
7
 
8
8
  const backgroundColor: InputType = {
9
- options: coloursAsArray(),
9
+ options: backgroundColorKeys,
10
10
  control: 'select',
11
11
  description: 'Background color of the box.',
12
12
  };
@@ -1,14 +1,16 @@
1
-
2
1
  import React, { useMemo } from 'react';
3
2
  import { View, ViewStyle } from 'react-native';
4
3
  import { StyleSheet } from 'react-native-unistyles';
5
- import type BoxProps from './Box.props';
6
4
  import {
7
5
  propStyleMapping,
8
- resolveThemeValue,
6
+ resolveThemeKey,
7
+ resolveThemeValueWithFallback,
8
+ semanticPropMapping,
9
+ themeStyleFallbackMapping,
9
10
  themeStyleMapping,
10
11
  viewStyleProps,
11
12
  } from '../../utils';
13
+ import type BoxProps from './Box.props';
12
14
 
13
15
  // --- Box component definition ---
14
16
  const BoxComponent = ({ as, style, children, ...props }: BoxProps) => {
@@ -18,6 +20,7 @@ const BoxComponent = ({ as, style, children, ...props }: BoxProps) => {
18
20
  Object.entries(props).forEach(([propName, propValue]) => {
19
21
  if (propValue === undefined) return;
20
22
 
23
+ if (semanticPropMapping[propName]) return;
21
24
  if (propStyleMapping[propName] || viewStyleProps.has(propName)) {
22
25
  return;
23
26
  }
@@ -44,6 +47,22 @@ const styles = StyleSheet.create(theme => ({
44
47
  Object.entries(props).forEach(([propName, propValue]) => {
45
48
  if (propValue === undefined) return;
46
49
 
50
+ // Check for semantic prop mappings first (e.g., iconColor, color)
51
+ const semanticMapping = semanticPropMapping[propName];
52
+ if (semanticMapping) {
53
+ const { styleProp, themeKey } = semanticMapping;
54
+ const themeMapping = resolveThemeKey(theme, themeKey);
55
+ const fallbackKey = themeStyleFallbackMapping[themeKey];
56
+ const fallbackMapping = fallbackKey ? resolveThemeKey(theme, fallbackKey) : undefined;
57
+
58
+ computedStyles[styleProp] = resolveThemeValueWithFallback(
59
+ propValue,
60
+ themeMapping,
61
+ fallbackMapping
62
+ );
63
+ return;
64
+ }
65
+
47
66
  let stylePropName: keyof ViewStyle | undefined;
48
67
 
49
68
  // Handle shorthand props
@@ -58,12 +77,22 @@ const styles = StyleSheet.create(theme => ({
58
77
  if (!stylePropName) return;
59
78
 
60
79
  // Resolve theme value if needed
61
- const themeKey: keyof typeof theme | undefined = themeStyleMapping[
62
- stylePropName
63
- ] as keyof typeof theme;
64
-
65
- if (themeKey && theme[themeKey]) {
66
- computedStyles[stylePropName] = resolveThemeValue(propValue, theme[themeKey]);
80
+ const themeKey = themeStyleMapping[stylePropName as string];
81
+
82
+ if (themeKey) {
83
+ const themeObj = resolveThemeKey(theme, themeKey);
84
+ const fallbackKey = themeStyleFallbackMapping[themeKey];
85
+ const fallbackMapping = fallbackKey ? resolveThemeKey(theme, fallbackKey) : undefined;
86
+
87
+ if (themeObj) {
88
+ computedStyles[stylePropName] = resolveThemeValueWithFallback(
89
+ propValue,
90
+ themeObj,
91
+ fallbackMapping
92
+ );
93
+ } else {
94
+ computedStyles[stylePropName] = propValue;
95
+ }
67
96
  } else {
68
97
  computedStyles[stylePropName] = propValue;
69
98
  }
@@ -1,6 +1,17 @@
1
1
  import { Canvas, Controls, Meta, Story } from '@storybook/addon-docs/blocks';
2
2
  import { AddSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
3
- import { Box, Button, ButtonGroup, ButtonIcon, ButtonSpinner, ButtonText, Center } from '../../';
3
+ import {
4
+ Box,
5
+ Button,
6
+ ButtonGroup,
7
+ ButtonIcon,
8
+ ButtonSpinner,
9
+ ButtonText,
10
+ Card,
11
+ Center,
12
+ DetailText,
13
+ Flex,
14
+ } from '../../';
4
15
  import { BackToTopButton, UsageWrap, ViewFigmaButton } from '../../../docs/components';
5
16
  import * as Stories from './Button.stories';
6
17
 
@@ -26,6 +37,7 @@ The `Button` component is used to trigger an action or event, such as submitting
26
37
  - [`ButtonSpinner`](#buttonspinner)
27
38
  - [Examples](#examples)
28
39
  - [Padding None](#padding-none)
40
+ - [Full width button](#full-width-button)
29
41
 
30
42
  ## Playground
31
43
 
@@ -286,3 +298,36 @@ const MyComponent = () => {
286
298
  );
287
299
  };
288
300
  ```
301
+
302
+ ### Full width button
303
+
304
+ Use layout components, like `Box` or `Flex`, to define your UI layouts, which can also be responsive.
305
+
306
+ <UsageWrap>
307
+ <Box spacing="md">
308
+ <Flex align="stretch">
309
+ <Button>Full width button</Button>
310
+ </Flex>
311
+
312
+ <Card>
313
+ <DetailText size="xl">Button inside a Card component</DetailText>
314
+ <Box width="100%" paddingTop="md">
315
+ <Button>Refetch</Button>
316
+ </Box>
317
+ </Card>
318
+ </Box>
319
+ </UsageWrap>
320
+
321
+ ```tsx
322
+ <Flex align="stretch">
323
+ <Button>Full width button</Button>
324
+ </Flex>
325
+
326
+ // Card example
327
+ <Card>
328
+ <DetailText size="xl">Button inside a Card component</DetailText>
329
+ <Box width="100%" paddingTop="md">
330
+ <Button>Refetch</Button>
331
+ </Box>
332
+ </Card>
333
+ ```
@@ -70,7 +70,7 @@ const MyComponent = () => (
70
70
  | selected | `boolean` | Whether the card is selected. | `false` |
71
71
  | onPress | `() => void` | Callback function to be called. | `-` |
72
72
  | disabled | `boolean` | Whether the card is disabled. | `false` |
73
- | space | `'none' \| '2xs' \| 'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl'` | The space between the content. | `none` |
73
+ | spacing | `'none' \| '2xs' \| 'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl'` | The space between the content. | `none` |
74
74
  | alignItems | `'flex-start' \| 'flex-end' \| `<br />`'center' \| 'stretch' \| 'baseline'` | The align items of the flex container. | `flex-start` |
75
75
  | justifyContent | `'flex-start' \| 'flex-end' \| 'center' \| 'space-between' \| `<br />` 'space-around' \| 'space-evenly'` | The justify content of the flex container. | `flex-start` |
76
76
  | flexWrap | `'wrap' \| 'nowrap' \| 'wrap-reverse'` | The wrap of the flex container. | `nowrap` |
@@ -1,7 +1,7 @@
1
1
  import { PressableProps, ViewStyle } from 'react-native';
2
- import { SpaceValue, SpacingValues } from '../../types';
2
+ import { GapProps, MarginProps, SpacingValues } from '../../types';
3
3
 
4
- interface CardProps extends PressableProps {
4
+ interface CardProps extends PressableProps, MarginProps, GapProps {
5
5
  variant?: 'emphasis' | 'subtle';
6
6
  colorScheme?:
7
7
  | 'neutralStrong'
@@ -31,9 +31,6 @@ interface CardProps extends PressableProps {
31
31
  justifyContent?: ViewStyle['justifyContent'];
32
32
  flexDirection?: ViewStyle['flexDirection'];
33
33
  flexWrap?: ViewStyle['flexWrap'];
34
- gap?: SpaceValue;
35
- rowGap?: SpaceValue;
36
- columnGap?: SpaceValue;
37
34
  }
38
35
 
39
36
  export default CardProps;
@@ -77,29 +77,60 @@ export const Playground: Story = {
77
77
  export const WithActions: Story = {
78
78
  render: ({ children, ...props }) => {
79
79
  return (
80
- <Card {...props} flexDirection="column" alignItems="stretch" spacing="md" variant="emphasis">
81
- <BodyText>{children as string}</BodyText>
82
- <CardActions>
83
- <CardAction
84
- onPress={() => console.log('Card action pressed')}
85
- heading="Card Action Head"
86
- helperText="Some helper text"
87
- leadingIcon={BellMediumIcon}
88
- />
89
- <CardAction
90
- onPress={() => console.log('Card action pressed')}
91
- heading="Card Action Head"
92
- leadingIcon={BellMediumIcon}
93
- />
94
- <CardAction
95
- onPress={() => console.log('Card action pressed')}
96
- heading="Card Action Head"
97
- helperText="Testing"
98
- leadingIcon={BellMediumIcon}
99
- iconContainer={false}
100
- />
101
- </CardActions>
102
- </Card>
80
+ <Flex gap="400">
81
+ <Card
82
+ {...props}
83
+ flexDirection="column"
84
+ alignItems="stretch"
85
+ spacing="md"
86
+ variant="emphasis"
87
+ >
88
+ <BodyText>{children as string}</BodyText>
89
+ <CardActions>
90
+ <CardAction
91
+ onPress={() => console.log('Card action pressed')}
92
+ heading="Card Action Head"
93
+ helperText="Some helper text"
94
+ leadingIcon={BellMediumIcon}
95
+ />
96
+ <CardAction
97
+ onPress={() => console.log('Card action pressed')}
98
+ heading="Card Action Head"
99
+ leadingIcon={BellMediumIcon}
100
+ />
101
+ <CardAction
102
+ onPress={() => console.log('Card action pressed')}
103
+ heading="Card Action Head"
104
+ helperText="Testing"
105
+ leadingIcon={BellMediumIcon}
106
+ iconContainer={false}
107
+ />
108
+ </CardActions>
109
+ </Card>
110
+ <Card {...props} flexDirection="column" alignItems="stretch" spacing="md" variant="subtle">
111
+ <BodyText>{children as string}</BodyText>
112
+ <CardActions>
113
+ <CardAction
114
+ onPress={() => console.log('Card action pressed')}
115
+ heading="Card Action Head"
116
+ helperText="Some helper text"
117
+ leadingIcon={BellMediumIcon}
118
+ />
119
+ <CardAction
120
+ onPress={() => console.log('Card action pressed')}
121
+ heading="Card Action Head"
122
+ leadingIcon={BellMediumIcon}
123
+ />
124
+ <CardAction
125
+ onPress={() => console.log('Card action pressed')}
126
+ heading="Card Action Head"
127
+ helperText="Testing"
128
+ leadingIcon={BellMediumIcon}
129
+ iconContainer={false}
130
+ />
131
+ </CardActions>
132
+ </Card>
133
+ </Flex>
103
134
  );
104
135
  },
105
136
  };