@ledgerhq/lumen-ui-rnative 0.1.58 → 0.1.59

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 (189) hide show
  1. package/dist/module/lib/Components/animations/Pulse/Pulse.stories.js +9 -0
  2. package/dist/module/lib/Components/animations/Pulse/Pulse.stories.js.map +1 -1
  3. package/dist/module/lib/Components/animations/Spin/Spin.stories.js +3 -0
  4. package/dist/module/lib/Components/animations/Spin/Spin.stories.js.map +1 -1
  5. package/dist/module/lib/Components/core/AddressInput/AddressInput.figma.js +4 -0
  6. package/dist/module/lib/Components/core/AddressInput/AddressInput.figma.js.map +1 -1
  7. package/dist/module/lib/Components/core/AddressInput/AddressInput.js +18 -6
  8. package/dist/module/lib/Components/core/AddressInput/AddressInput.js.map +1 -1
  9. package/dist/module/lib/Components/core/AddressInput/AddressInput.mdx +26 -1
  10. package/dist/module/lib/Components/core/AddressInput/AddressInput.stories.js +30 -0
  11. package/dist/module/lib/Components/core/AddressInput/AddressInput.stories.js.map +1 -1
  12. package/dist/module/lib/Components/core/AmountDisplay/AmountDisplay.stories.js +6 -0
  13. package/dist/module/lib/Components/core/AmountDisplay/AmountDisplay.stories.js.map +1 -1
  14. package/dist/module/lib/Components/core/AmountInput/AmountInput.stories.js +64 -44
  15. package/dist/module/lib/Components/core/AmountInput/AmountInput.stories.js.map +1 -1
  16. package/dist/module/lib/Components/core/Banner/Banner.stories.js.map +1 -1
  17. package/dist/module/lib/Components/core/Button/Button.stories.js +21 -0
  18. package/dist/module/lib/Components/core/Button/Button.stories.js.map +1 -1
  19. package/dist/module/lib/Components/core/Card/Card.js +15 -10
  20. package/dist/module/lib/Components/core/Card/Card.js.map +1 -1
  21. package/dist/module/lib/Components/core/Card/Card.stories.js +19 -2
  22. package/dist/module/lib/Components/core/Card/Card.stories.js.map +1 -1
  23. package/dist/module/lib/Components/core/Card/Card.test.js +8 -3
  24. package/dist/module/lib/Components/core/Card/Card.test.js.map +1 -1
  25. package/dist/module/lib/Components/core/CardButton/CardButton.stories.js +15 -0
  26. package/dist/module/lib/Components/core/CardButton/CardButton.stories.js.map +1 -1
  27. package/dist/module/lib/Components/core/Checkbox/Checkbox.stories.js.map +1 -1
  28. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js +13 -0
  29. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js.map +1 -1
  30. package/dist/module/lib/Components/core/DescriptionItem/DescriptionItem.stories.js +11 -0
  31. package/dist/module/lib/Components/core/DescriptionItem/DescriptionItem.stories.js.map +1 -1
  32. package/dist/module/lib/Components/core/Divider/Divider.stories.js.map +1 -1
  33. package/dist/module/lib/Components/core/IconButton/IconButton.stories.js +10 -0
  34. package/dist/module/lib/Components/core/IconButton/IconButton.stories.js.map +1 -1
  35. package/dist/module/lib/Components/core/InteractiveIcon/InteractiveIcon.stories.js +12 -0
  36. package/dist/module/lib/Components/core/InteractiveIcon/InteractiveIcon.stories.js.map +1 -1
  37. package/dist/module/lib/Components/core/Link/Link.stories.js.map +1 -1
  38. package/dist/module/lib/Components/core/ListItem/ListItem.stories.js +21 -3
  39. package/dist/module/lib/Components/core/ListItem/ListItem.stories.js.map +1 -1
  40. package/dist/module/lib/Components/core/MediaBanner/MediaBanner.stories.js +18 -1
  41. package/dist/module/lib/Components/core/MediaBanner/MediaBanner.stories.js.map +1 -1
  42. package/dist/module/lib/Components/core/MediaButton/MediaButton.stories.js +9 -0
  43. package/dist/module/lib/Components/core/MediaButton/MediaButton.stories.js.map +1 -1
  44. package/dist/module/lib/Components/core/MediaCard/MediaCard.stories.js +13 -0
  45. package/dist/module/lib/Components/core/MediaCard/MediaCard.stories.js.map +1 -1
  46. package/dist/module/lib/Components/core/MediaTag/MediaTag.stories.js +13 -0
  47. package/dist/module/lib/Components/core/MediaTag/MediaTag.stories.js.map +1 -1
  48. package/dist/module/lib/Components/core/NavBar/NavBar.stories.js.map +1 -1
  49. package/dist/module/lib/Components/core/OptionList/OptionList.stories.js +52 -0
  50. package/dist/module/lib/Components/core/OptionList/OptionList.stories.js.map +1 -1
  51. package/dist/module/lib/Components/core/SearchInput/SearchInput.stories.js.map +1 -1
  52. package/dist/module/lib/Components/core/SectionHeader/SectionHeader.stories.js.map +1 -1
  53. package/dist/module/lib/Components/core/Skeleton/Skeleton.stories.js.map +1 -1
  54. package/dist/module/lib/Components/core/Spinner/Spinner.stories.js.map +1 -1
  55. package/dist/module/lib/Components/core/Spot/Spot.stories.js +20 -0
  56. package/dist/module/lib/Components/core/Spot/Spot.stories.js.map +1 -1
  57. package/dist/module/lib/Components/core/Stepper/Stepper.stories.js +4 -0
  58. package/dist/module/lib/Components/core/Stepper/Stepper.stories.js.map +1 -1
  59. package/dist/module/lib/Components/core/Subheader/Subheader.stories.js.map +1 -1
  60. package/dist/module/lib/Components/core/Switch/Switch.stories.js.map +1 -1
  61. package/dist/module/lib/Components/core/Tag/Tag.stories.js +12 -0
  62. package/dist/module/lib/Components/core/Tag/Tag.stories.js.map +1 -1
  63. package/dist/module/lib/Components/core/TextInput/TextInput.figma.js +4 -0
  64. package/dist/module/lib/Components/core/TextInput/TextInput.figma.js.map +1 -1
  65. package/dist/module/lib/Components/core/TextInput/TextInput.mdx +25 -0
  66. package/dist/module/lib/Components/core/TextInput/TextInput.stories.js +29 -0
  67. package/dist/module/lib/Components/core/TextInput/TextInput.stories.js.map +1 -1
  68. package/dist/module/lib/Components/core/TextInput/TextInput.test.js +125 -2
  69. package/dist/module/lib/Components/core/TextInput/TextInput.test.js.map +1 -1
  70. package/dist/module/lib/Components/core/Tile/Tile.stories.js +23 -1
  71. package/dist/module/lib/Components/core/Tile/Tile.stories.js.map +1 -1
  72. package/dist/module/lib/Components/core/TileButton/TileButton.stories.js +24 -0
  73. package/dist/module/lib/Components/core/TileButton/TileButton.stories.js.map +1 -1
  74. package/dist/module/lib/Components/core/Tooltip/Tooltip.stories.js +12 -0
  75. package/dist/module/lib/Components/core/Tooltip/Tooltip.stories.js.map +1 -1
  76. package/dist/module/lib/Components/core/Trend/Trend.stories.js +9 -0
  77. package/dist/module/lib/Components/core/Trend/Trend.stories.js.map +1 -1
  78. package/dist/module/lib/Components/internal/BaseInput/BaseInput.js +114 -201
  79. package/dist/module/lib/Components/internal/BaseInput/BaseInput.js.map +1 -1
  80. package/dist/module/lib/Components/internal/BaseInput/BaseInputCounter.js +32 -0
  81. package/dist/module/lib/Components/internal/BaseInput/BaseInputCounter.js.map +1 -0
  82. package/dist/module/lib/Components/internal/BaseInput/BaseInputHelperText.js +60 -0
  83. package/dist/module/lib/Components/internal/BaseInput/BaseInputHelperText.js.map +1 -0
  84. package/dist/module/lib/Components/internal/BaseInput/BaseInputLabel.js +126 -0
  85. package/dist/module/lib/Components/internal/BaseInput/BaseInputLabel.js.map +1 -0
  86. package/dist/module/lib/Components/internal/BaseInput/multilineLayout.js +34 -0
  87. package/dist/module/lib/Components/internal/BaseInput/multilineLayout.js.map +1 -0
  88. package/dist/module/lib/Components/internal/BaseInput/useBaseInputValue/useBaseInputValue.js +46 -0
  89. package/dist/module/lib/Components/internal/BaseInput/useBaseInputValue/useBaseInputValue.js.map +1 -0
  90. package/dist/module/lib/Components/internal/BaseInput/useBaseInputValue/useBaseInputValue.test.js +111 -0
  91. package/dist/module/lib/Components/internal/BaseInput/useBaseInputValue/useBaseInputValue.test.js.map +1 -0
  92. package/dist/module/lib/Components/primitives/Box/Box.stories.js.map +1 -1
  93. package/dist/module/lib/Components/primitives/Gradient/LinearGradient/LinearGradient.stories.js +14 -0
  94. package/dist/module/lib/Components/primitives/Gradient/LinearGradient/LinearGradient.stories.js.map +1 -1
  95. package/dist/module/lib/Components/primitives/Gradient/RadialGradient/RadialGradient.stories.js +8 -0
  96. package/dist/module/lib/Components/primitives/Gradient/RadialGradient/RadialGradient.stories.js.map +1 -1
  97. package/dist/module/lib/Components/primitives/Pressable/Pressable.stories.js.map +1 -1
  98. package/dist/module/lib/Components/primitives/Text/Text.stories.js.map +1 -1
  99. package/dist/module/lib/Components/symbols/Icon/Icon.stories.js.map +1 -1
  100. package/dist/typescript/src/lib/Components/core/AddressInput/AddressInput.d.ts +1 -1
  101. package/dist/typescript/src/lib/Components/core/AddressInput/AddressInput.d.ts.map +1 -1
  102. package/dist/typescript/src/lib/Components/core/Card/Card.d.ts.map +1 -1
  103. package/dist/typescript/src/lib/Components/core/SearchInput/types.d.ts +1 -1
  104. package/dist/typescript/src/lib/Components/core/SearchInput/types.d.ts.map +1 -1
  105. package/dist/typescript/src/lib/Components/internal/BaseInput/BaseInput.d.ts +1 -1
  106. package/dist/typescript/src/lib/Components/internal/BaseInput/BaseInput.d.ts.map +1 -1
  107. package/dist/typescript/src/lib/Components/internal/BaseInput/BaseInputCounter.d.ts +8 -0
  108. package/dist/typescript/src/lib/Components/internal/BaseInput/BaseInputCounter.d.ts.map +1 -0
  109. package/dist/typescript/src/lib/Components/internal/BaseInput/BaseInputHelperText.d.ts +8 -0
  110. package/dist/typescript/src/lib/Components/internal/BaseInput/BaseInputHelperText.d.ts.map +1 -0
  111. package/dist/typescript/src/lib/Components/internal/BaseInput/BaseInputLabel.d.ts +8 -0
  112. package/dist/typescript/src/lib/Components/internal/BaseInput/BaseInputLabel.d.ts.map +1 -0
  113. package/dist/typescript/src/lib/Components/internal/BaseInput/multilineLayout.d.ts +27 -0
  114. package/dist/typescript/src/lib/Components/internal/BaseInput/multilineLayout.d.ts.map +1 -0
  115. package/dist/typescript/src/lib/Components/internal/BaseInput/types.d.ts +48 -1
  116. package/dist/typescript/src/lib/Components/internal/BaseInput/types.d.ts.map +1 -1
  117. package/dist/typescript/src/lib/Components/internal/BaseInput/useBaseInputValue/useBaseInputValue.d.ts +27 -0
  118. package/dist/typescript/src/lib/Components/internal/BaseInput/useBaseInputValue/useBaseInputValue.d.ts.map +1 -0
  119. package/package.json +2 -2
  120. package/src/lib/Components/animations/Pulse/Pulse.stories.tsx +7 -2
  121. package/src/lib/Components/animations/Spin/Spin.stories.tsx +5 -2
  122. package/src/lib/Components/core/AddressInput/AddressInput.figma.tsx +4 -0
  123. package/src/lib/Components/core/AddressInput/AddressInput.mdx +26 -1
  124. package/src/lib/Components/core/AddressInput/AddressInput.stories.tsx +30 -2
  125. package/src/lib/Components/core/AddressInput/AddressInput.tsx +24 -8
  126. package/src/lib/Components/core/AmountDisplay/AmountDisplay.stories.tsx +8 -2
  127. package/src/lib/Components/core/AmountInput/AmountInput.stories.tsx +33 -13
  128. package/src/lib/Components/core/Avatar/Avatar.stories.tsx +1 -1
  129. package/src/lib/Components/core/AvatarButton/AvatarButton.stories.tsx +1 -1
  130. package/src/lib/Components/core/Banner/Banner.stories.tsx +2 -2
  131. package/src/lib/Components/core/Button/Button.stories.tsx +23 -2
  132. package/src/lib/Components/core/Card/Card.stories.tsx +19 -2
  133. package/src/lib/Components/core/Card/Card.test.tsx +10 -3
  134. package/src/lib/Components/core/Card/Card.tsx +20 -9
  135. package/src/lib/Components/core/CardButton/CardButton.stories.tsx +17 -2
  136. package/src/lib/Components/core/Checkbox/Checkbox.stories.tsx +3 -3
  137. package/src/lib/Components/core/ContentBanner/ContentBanner.stories.tsx +15 -2
  138. package/src/lib/Components/core/DescriptionItem/DescriptionItem.stories.tsx +13 -2
  139. package/src/lib/Components/core/Divider/Divider.stories.tsx +2 -2
  140. package/src/lib/Components/core/DotCount/DotCount.stories.tsx +1 -1
  141. package/src/lib/Components/core/DotIcon/DotIcon.stories.tsx +1 -1
  142. package/src/lib/Components/core/DotIndicator/DotIndicator.stories.tsx +1 -1
  143. package/src/lib/Components/core/DotSymbol/DotSymbol.stories.tsx +1 -1
  144. package/src/lib/Components/core/IconButton/IconButton.stories.tsx +12 -2
  145. package/src/lib/Components/core/InteractiveIcon/InteractiveIcon.stories.tsx +14 -2
  146. package/src/lib/Components/core/Link/Link.stories.tsx +2 -2
  147. package/src/lib/Components/core/ListItem/ListItem.stories.tsx +18 -0
  148. package/src/lib/Components/core/MediaBanner/MediaBanner.stories.tsx +19 -2
  149. package/src/lib/Components/core/MediaButton/MediaButton.stories.tsx +11 -2
  150. package/src/lib/Components/core/MediaCard/MediaCard.stories.tsx +13 -0
  151. package/src/lib/Components/core/MediaImage/MediaImage.stories.tsx +1 -1
  152. package/src/lib/Components/core/MediaTag/MediaTag.stories.tsx +15 -2
  153. package/src/lib/Components/core/NavBar/NavBar.stories.tsx +2 -2
  154. package/src/lib/Components/core/OptionList/OptionList.stories.tsx +52 -0
  155. package/src/lib/Components/core/PageIndicator/PageIndicator.stories.tsx +1 -1
  156. package/src/lib/Components/core/SearchInput/SearchInput.stories.tsx +2 -2
  157. package/src/lib/Components/core/SearchInput/types.ts +4 -1
  158. package/src/lib/Components/core/SectionHeader/SectionHeader.stories.tsx +2 -2
  159. package/src/lib/Components/core/SegmentedControl/SegmentedControl.stories.tsx +1 -1
  160. package/src/lib/Components/core/Skeleton/Skeleton.stories.tsx +2 -2
  161. package/src/lib/Components/core/Spinner/Spinner.stories.tsx +2 -2
  162. package/src/lib/Components/core/Spot/Spot.stories.tsx +22 -2
  163. package/src/lib/Components/core/Stepper/Stepper.stories.tsx +6 -2
  164. package/src/lib/Components/core/Subheader/Subheader.stories.tsx +2 -2
  165. package/src/lib/Components/core/Switch/Switch.stories.tsx +3 -3
  166. package/src/lib/Components/core/TabBar/TabBar.stories.tsx +1 -1
  167. package/src/lib/Components/core/Tag/Tag.stories.tsx +14 -2
  168. package/src/lib/Components/core/TextInput/TextInput.figma.tsx +4 -0
  169. package/src/lib/Components/core/TextInput/TextInput.mdx +25 -0
  170. package/src/lib/Components/core/TextInput/TextInput.stories.tsx +29 -2
  171. package/src/lib/Components/core/TextInput/TextInput.test.tsx +129 -2
  172. package/src/lib/Components/core/Tile/Tile.stories.tsx +24 -2
  173. package/src/lib/Components/core/TileButton/TileButton.stories.tsx +26 -2
  174. package/src/lib/Components/core/Tooltip/Tooltip.stories.tsx +14 -2
  175. package/src/lib/Components/core/Trend/Trend.stories.tsx +11 -2
  176. package/src/lib/Components/internal/BaseInput/BaseInput.tsx +123 -242
  177. package/src/lib/Components/internal/BaseInput/BaseInputCounter.tsx +35 -0
  178. package/src/lib/Components/internal/BaseInput/BaseInputHelperText.tsx +57 -0
  179. package/src/lib/Components/internal/BaseInput/BaseInputLabel.tsx +137 -0
  180. package/src/lib/Components/internal/BaseInput/multilineLayout.ts +49 -0
  181. package/src/lib/Components/internal/BaseInput/types.ts +49 -1
  182. package/src/lib/Components/internal/BaseInput/useBaseInputValue/useBaseInputValue.test.ts +110 -0
  183. package/src/lib/Components/internal/BaseInput/useBaseInputValue/useBaseInputValue.ts +72 -0
  184. package/src/lib/Components/primitives/Box/Box.stories.tsx +2 -2
  185. package/src/lib/Components/primitives/Gradient/LinearGradient/LinearGradient.stories.tsx +6 -2
  186. package/src/lib/Components/primitives/Gradient/RadialGradient/RadialGradient.stories.tsx +5 -2
  187. package/src/lib/Components/primitives/Pressable/Pressable.stories.tsx +2 -2
  188. package/src/lib/Components/primitives/Text/Text.stories.tsx +2 -2
  189. package/src/lib/Components/symbols/Icon/Icon.stories.tsx +2 -2
@@ -4,7 +4,7 @@ import { Box, Text } from '../../primitives';
4
4
  import { Plus, Settings } from '../../symbols';
5
5
  import { Button } from './Button';
6
6
 
7
- const meta: Meta<typeof Button> = {
7
+ const meta = {
8
8
  component: Button,
9
9
  id: 'rnative-button',
10
10
  title: 'Core/Button',
@@ -32,7 +32,7 @@ const meta: Meta<typeof Button> = {
32
32
  },
33
33
  },
34
34
  },
35
- };
35
+ } satisfies Meta<typeof Button>;
36
36
 
37
37
  export default meta;
38
38
  type Story = StoryObj<typeof Button>;
@@ -76,6 +76,9 @@ export const Loading: Story = {
76
76
  };
77
77
 
78
78
  export const AppearanceShowcase: Story = {
79
+ args: {
80
+ children: null,
81
+ },
79
82
  render: () => {
80
83
  const appearances: { name: string; appearance: ButtonAppearance }[] = [
81
84
  { name: 'Accent', appearance: 'accent' },
@@ -99,6 +102,9 @@ export const AppearanceShowcase: Story = {
99
102
  };
100
103
 
101
104
  export const ContentTypesShowcase: Story = {
105
+ args: {
106
+ children: null,
107
+ },
102
108
  render: () => (
103
109
  <Box lx={{ flexDirection: 'row', alignItems: 'center', gap: 's4' }}>
104
110
  <Button appearance='base'>Text Only</Button>
@@ -110,6 +116,9 @@ export const ContentTypesShowcase: Story = {
110
116
  };
111
117
 
112
118
  export const SizesShowcase: Story = {
119
+ args: {
120
+ children: null,
121
+ },
113
122
  render: () => (
114
123
  <Box lx={{ flexDirection: 'row', alignItems: 'center', gap: 's4' }}>
115
124
  <Button appearance='base' size='sm'>
@@ -126,6 +135,9 @@ export const SizesShowcase: Story = {
126
135
  };
127
136
 
128
137
  export const StatesShowcase: Story = {
138
+ args: {
139
+ children: null,
140
+ },
129
141
  render: () => (
130
142
  <Box lx={{ flexDirection: 'row', alignItems: 'center', gap: 's4' }}>
131
143
  <Button appearance='base'>Default</Button>
@@ -143,6 +155,9 @@ export const StatesShowcase: Story = {
143
155
  };
144
156
 
145
157
  export const ResponsiveLayout: Story = {
158
+ args: {
159
+ children: null,
160
+ },
146
161
  render: () => (
147
162
  <Box
148
163
  lx={{
@@ -162,6 +177,9 @@ export const ResponsiveLayout: Story = {
162
177
  };
163
178
 
164
179
  export const LabelTruncate: Story = {
180
+ args: {
181
+ children: null,
182
+ },
165
183
  render: () => (
166
184
  <Box>
167
185
  <Text typography='body4SemiBold' lx={{ color: 'muted' }}>
@@ -178,6 +196,9 @@ export const LabelTruncate: Story = {
178
196
  };
179
197
 
180
198
  export const InteractiveLoadingStates: Story = {
199
+ args: {
200
+ children: null,
201
+ },
181
202
  render: () => {
182
203
  const [states, setStates] = useState<
183
204
  Record<'text' | 'withIcon' | 'iconOnly', 'idle' | 'loading' | 'red'>
@@ -19,7 +19,7 @@ import {
19
19
  CardFooterActions,
20
20
  } from './Card';
21
21
 
22
- const meta: Meta<typeof Card> = {
22
+ const meta = {
23
23
  component: Card,
24
24
  id: 'rnative-card',
25
25
  title: 'Core/Card',
@@ -59,7 +59,7 @@ const meta: Meta<typeof Card> = {
59
59
  description: 'The function to be called when the card is pressed',
60
60
  },
61
61
  },
62
- };
62
+ } satisfies Meta<typeof Card>;
63
63
 
64
64
  export default meta;
65
65
  type Story = StoryObj<typeof Card>;
@@ -67,6 +67,7 @@ type Story = StoryObj<typeof Card>;
67
67
  export const Base: Story = {
68
68
  args: {
69
69
  lx: { width: 's320' },
70
+ children: null,
70
71
  },
71
72
  render: (args) => (
72
73
  <Card {...args}>
@@ -121,6 +122,9 @@ export const Base: Story = {
121
122
  };
122
123
 
123
124
  export const StatesShowcase: Story = {
125
+ args: {
126
+ children: null,
127
+ },
124
128
  render: (args) => (
125
129
  <Box lx={{ flexDirection: 'column', gap: 's16' }}>
126
130
  <Card {...args} lx={{ width: 's320' }}>
@@ -244,6 +248,9 @@ export const StatesShowcase: Story = {
244
248
  };
245
249
 
246
250
  export const FooterAppearance: Story = {
251
+ args: {
252
+ children: null,
253
+ },
247
254
  render: () => (
248
255
  <Box lx={{ flexDirection: 'column', gap: 's16' }}>
249
256
  <Card type='info' lx={{ width: 's320' }}>
@@ -291,6 +298,7 @@ export const DisabledWithSpot: Story = {
291
298
  args: {
292
299
  lx: { width: 's320' },
293
300
  disabled: true,
301
+ children: null,
294
302
  },
295
303
  render: (args) => (
296
304
  <Card {...args}>
@@ -317,6 +325,9 @@ export const DisabledWithSpot: Story = {
317
325
  };
318
326
 
319
327
  export const ExpandableShowcase: Story = {
328
+ args: {
329
+ children: null,
330
+ },
320
331
  render: () => {
321
332
  const [expanded, setExpanded] = useState(false);
322
333
 
@@ -363,6 +374,9 @@ export const ExpandableShowcase: Story = {
363
374
  };
364
375
 
365
376
  export const LayoutShowcase: Story = {
377
+ args: {
378
+ children: null,
379
+ },
366
380
  render: (args) => (
367
381
  <Box
368
382
  lx={{
@@ -468,6 +482,9 @@ export const LayoutShowcase: Story = {
468
482
  };
469
483
 
470
484
  export const CompositionsShowcase: Story = {
485
+ args: {
486
+ children: null,
487
+ },
471
488
  render: () => {
472
489
  const [expanded, setExpanded] = useState(false);
473
490
 
@@ -99,14 +99,21 @@ describe('Card', () => {
99
99
  });
100
100
 
101
101
  describe('outlined', () => {
102
- it('renders without error when outlined', () => {
102
+ it('draws the selection outline as an absolutely positioned overlay', () => {
103
103
  renderCard({ outlined: true });
104
- expect(screen.getByTestId('card')).toBeTruthy();
104
+
105
+ const outline = screen.getByTestId('card-outline');
106
+ expect(outline.props.style).toMatchObject({
107
+ position: 'absolute',
108
+ borderWidth: 2,
109
+ });
105
110
  });
106
111
 
107
- it('renders without error when not outlined', () => {
112
+ it('does not draw an outline by default', () => {
108
113
  renderCard({ outlined: false });
114
+
109
115
  expect(screen.getByTestId('card')).toBeTruthy();
116
+ expect(screen.queryByTestId('card-outline')).toBeNull();
110
117
  });
111
118
  });
112
119
 
@@ -89,12 +89,10 @@ const [CardContentAlignProvider, useCardContentAlignContext] =
89
89
  });
90
90
 
91
91
  const useCardStyles = ({
92
- outlined,
93
92
  pressed,
94
93
  disabled,
95
94
  interactive,
96
95
  }: {
97
- outlined: boolean;
98
96
  pressed: boolean;
99
97
  disabled: boolean;
100
98
  interactive: boolean;
@@ -109,18 +107,20 @@ const useCardStyles = ({
109
107
  borderRadius: t.borderRadius.lg,
110
108
  backgroundColor: t.colors.bg.surface,
111
109
  },
112
- outlined && {
113
- borderWidth: t.borderWidth.s2,
114
- borderColor: t.colors.border.active,
115
- },
116
110
  interactive &&
117
111
  pressed &&
118
112
  !disabled && {
119
113
  backgroundColor: t.colors.bg.surfacePressed,
120
114
  },
121
115
  ]),
116
+ outline: {
117
+ ...StyleSheet.absoluteFillObject,
118
+ borderRadius: t.borderRadius.lg,
119
+ borderWidth: t.borderWidth.s2,
120
+ borderColor: t.colors.border.active,
121
+ },
122
122
  }),
123
- [outlined, pressed, disabled, interactive],
123
+ [pressed, disabled, interactive],
124
124
  );
125
125
  };
126
126
 
@@ -227,8 +227,19 @@ const CardInner = ({
227
227
  interactive: boolean;
228
228
  children: ReactNode;
229
229
  }) => {
230
- const styles = useCardStyles({ outlined, pressed, disabled, interactive });
231
- return <View style={styles.container}>{children}</View>;
230
+ const styles = useCardStyles({ pressed, disabled, interactive });
231
+ return (
232
+ <View style={styles.container}>
233
+ {children}
234
+ {outlined && (
235
+ <View
236
+ testID='card-outline'
237
+ style={styles.outline}
238
+ pointerEvents='none'
239
+ />
240
+ )}
241
+ </View>
242
+ );
232
243
  };
233
244
 
234
245
  const useHeaderStyles = ({ pressed }: { pressed: boolean }) => {
@@ -3,7 +3,7 @@ import { Box, Text } from '../../primitives';
3
3
  import { Settings, Plus, Coins, CreditCard, Bank } from '../../symbols';
4
4
  import { CardButton } from './CardButton';
5
5
 
6
- const meta: Meta<typeof CardButton> = {
6
+ const meta = {
7
7
  component: CardButton,
8
8
  id: 'rnative-cardbutton',
9
9
  title: 'Core/CardButton',
@@ -49,7 +49,7 @@ const meta: Meta<typeof CardButton> = {
49
49
  description: 'Whether the card button is disabled',
50
50
  },
51
51
  },
52
- };
52
+ } satisfies Meta<typeof CardButton>;
53
53
 
54
54
  export default meta;
55
55
  type Story = StoryObj<typeof CardButton>;
@@ -162,6 +162,9 @@ export const FullFeatures: Story = {
162
162
  };
163
163
 
164
164
  export const NaturalWidth: Story = {
165
+ args: {
166
+ title: 'Basic Card Button',
167
+ },
165
168
  render: () => (
166
169
  <Box lx={{ backgroundColor: 'mutedPressed', padding: 's16' }}>
167
170
  <Text
@@ -195,6 +198,9 @@ export const NaturalWidth: Story = {
195
198
  };
196
199
 
197
200
  export const AppearanceShowcase: Story = {
201
+ args: {
202
+ title: 'Basic Card Button',
203
+ },
198
204
  render: () => {
199
205
  const appearances: {
200
206
  name: string;
@@ -228,6 +234,9 @@ export const AppearanceShowcase: Story = {
228
234
  };
229
235
 
230
236
  export const ContentVariations: Story = {
237
+ args: {
238
+ title: 'Basic Card Button',
239
+ },
231
240
  render: () => (
232
241
  <Box
233
242
  lx={{
@@ -268,6 +277,9 @@ export const ContentVariations: Story = {
268
277
  };
269
278
 
270
279
  export const StatesShowcase: Story = {
280
+ args: {
281
+ title: 'Basic Card Button',
282
+ },
271
283
  render: () => (
272
284
  <Box
273
285
  lx={{
@@ -308,6 +320,9 @@ export const StatesShowcase: Story = {
308
320
  };
309
321
 
310
322
  export const ResponsiveLayout: Story = {
323
+ args: {
324
+ title: 'Basic Card Button',
325
+ },
311
326
  render: () => (
312
327
  <Box
313
328
  lx={{
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
2
2
  import { Box, Text } from '../../primitives';
3
3
  import { Checkbox } from './Checkbox';
4
4
 
5
- const meta: Meta<typeof Checkbox> = {
5
+ const meta = {
6
6
  id: 'rnative-checkbox',
7
7
  title: 'Core/Checkbox',
8
8
  component: Checkbox,
@@ -41,10 +41,10 @@ const meta: Meta<typeof Checkbox> = {
41
41
  description: 'The label text of the checkbox',
42
42
  },
43
43
  },
44
- };
44
+ } satisfies Meta<typeof Checkbox>;
45
45
 
46
46
  export default meta;
47
- type Story = StoryObj<typeof meta>;
47
+ type Story = StoryObj<typeof Checkbox>;
48
48
 
49
49
  /**
50
50
  * The base checkbox in its normal state.
@@ -12,7 +12,7 @@ import {
12
12
  ContentBannerTitle,
13
13
  } from './ContentBanner';
14
14
 
15
- const meta: Meta<typeof ContentBanner> = {
15
+ const meta = {
16
16
  component: ContentBanner,
17
17
  id: 'rnative-contentbanner',
18
18
  title: 'Core/ContentBanner',
@@ -42,13 +42,14 @@ const meta: Meta<typeof ContentBanner> = {
42
42
  description: 'Accessibility label for the close button',
43
43
  },
44
44
  },
45
- };
45
+ } satisfies Meta<typeof ContentBanner>;
46
46
 
47
47
  export default meta;
48
48
  type Story = StoryObj<typeof ContentBanner>;
49
49
 
50
50
  export const Base: Story = {
51
51
  args: {
52
+ children: null,
52
53
  closeAccessibilityLabel: 'Close content banner',
53
54
  },
54
55
  render: (args) => (
@@ -84,6 +85,9 @@ export const Base: Story = {
84
85
  };
85
86
 
86
87
  export const WithClose: Story = {
88
+ args: {
89
+ children: null,
90
+ },
87
91
  render: () => {
88
92
  const [visible, setVisible] = useState(true);
89
93
 
@@ -119,6 +123,9 @@ export const WithClose: Story = {
119
123
  };
120
124
 
121
125
  export const ContentVariationsShowcase: Story = {
126
+ args: {
127
+ children: null,
128
+ },
122
129
  render: () => (
123
130
  <Box
124
131
  lx={{
@@ -173,6 +180,9 @@ export const ContentVariationsShowcase: Story = {
173
180
  };
174
181
 
175
182
  export const WithStepper: Story = {
183
+ args: {
184
+ children: null,
185
+ },
176
186
  render: () => (
177
187
  <Box lx={{ maxWidth: 's400' }}>
178
188
  <ContentBanner onClose={() => console.log('close')}>
@@ -189,6 +199,9 @@ export const WithStepper: Story = {
189
199
  };
190
200
 
191
201
  export const ResponsiveLayout: Story = {
202
+ args: {
203
+ children: null,
204
+ },
192
205
  render: () => (
193
206
  <Box
194
207
  lx={{
@@ -12,7 +12,7 @@ import {
12
12
  DescriptionItemValue,
13
13
  } from './DescriptionItem';
14
14
 
15
- const meta: Meta<typeof DescriptionItem> = {
15
+ const meta = {
16
16
  component: DescriptionItem,
17
17
  id: 'rnative-descriptionitem',
18
18
  title: 'Core/DescriptionItem',
@@ -40,13 +40,14 @@ const meta: Meta<typeof DescriptionItem> = {
40
40
  </Box>
41
41
  ),
42
42
  ],
43
- };
43
+ } satisfies Meta<typeof DescriptionItem>;
44
44
 
45
45
  export default meta;
46
46
  type Story = StoryObj<typeof DescriptionItem>;
47
47
 
48
48
  export const Base: Story = {
49
49
  args: {
50
+ children: null,
50
51
  size: 'md',
51
52
  },
52
53
  render: (args) => (
@@ -63,6 +64,7 @@ export const Base: Story = {
63
64
 
64
65
  export const SizeShowcase: Story = {
65
66
  args: {
67
+ children: null,
66
68
  size: 'md',
67
69
  },
68
70
  render: () => (
@@ -107,6 +109,9 @@ export const SizeShowcase: Story = {
107
109
  };
108
110
 
109
111
  export const TrailingVariants: Story = {
112
+ args: {
113
+ children: null,
114
+ },
110
115
  render: () => (
111
116
  <Box lx={{ gap: 's16' }}>
112
117
  <DescriptionItem>
@@ -141,6 +146,9 @@ export const TrailingVariants: Story = {
141
146
  };
142
147
 
143
148
  export const WithInfoIcon: Story = {
149
+ args: {
150
+ children: null,
151
+ },
144
152
  render: () => (
145
153
  <Box lx={{ gap: 's16' }}>
146
154
  <DescriptionItem>
@@ -189,6 +197,9 @@ export const WithInfoIcon: Story = {
189
197
  };
190
198
 
191
199
  export const PriorityShowcase: Story = {
200
+ args: {
201
+ children: null,
202
+ },
192
203
  render: () => (
193
204
  <Box lx={{ gap: 's16' }}>
194
205
  <DescriptionItem priority='end'>
@@ -3,14 +3,14 @@ import { Box } from '../../primitives/Box';
3
3
  import { Text } from '../../primitives/Text';
4
4
  import { Divider } from './Divider';
5
5
 
6
- const meta: Meta<typeof Divider> = {
6
+ const meta = {
7
7
  component: Divider,
8
8
  id: 'rnative-divider',
9
9
  title: 'Core/Divider',
10
10
  parameters: {
11
11
  actions: { disable: true },
12
12
  },
13
- };
13
+ } satisfies Meta<typeof Divider>;
14
14
 
15
15
  export default meta;
16
16
  type Story = StoryObj<typeof Divider>;
@@ -40,7 +40,7 @@ const meta = {
40
40
  } satisfies Meta<typeof DotCount>;
41
41
 
42
42
  export default meta;
43
- type Story = StoryObj<typeof meta>;
43
+ type Story = StoryObj<typeof DotCount>;
44
44
 
45
45
  export const Base: Story = {
46
46
  args: {
@@ -21,7 +21,7 @@ const meta = {
21
21
  } satisfies Meta<typeof DotIcon>;
22
22
 
23
23
  export default meta;
24
- type Story = StoryObj<typeof meta>;
24
+ type Story = StoryObj<typeof DotIcon>;
25
25
 
26
26
  const parentSrc = 'https://crypto-icons.ledger.com/ADA.png';
27
27
 
@@ -33,7 +33,7 @@ const meta = {
33
33
  } satisfies Meta<typeof DotIndicator>;
34
34
 
35
35
  export default meta;
36
- type Story = StoryObj<typeof meta>;
36
+ type Story = StoryObj<typeof DotIndicator>;
37
37
 
38
38
  export const Base: Story = {
39
39
  args: {
@@ -21,7 +21,7 @@ const meta = {
21
21
  } satisfies Meta<typeof DotSymbol>;
22
22
 
23
23
  export default meta;
24
- type Story = StoryObj<typeof meta>;
24
+ type Story = StoryObj<typeof DotSymbol>;
25
25
 
26
26
  const parentSrc = 'https://crypto-icons.ledger.com/ADA.png';
27
27
  const dotSrc = 'https://crypto-icons.ledger.com/BTC.png';
@@ -11,7 +11,7 @@ const iconMap = {
11
11
  Close,
12
12
  } as const;
13
13
 
14
- const meta: Meta<typeof IconButton> = {
14
+ const meta = {
15
15
  id: 'rnative-iconbutton',
16
16
  title: 'Core/IconButton',
17
17
  component: IconButton,
@@ -53,7 +53,7 @@ const meta: Meta<typeof IconButton> = {
53
53
  control: 'boolean',
54
54
  },
55
55
  },
56
- };
56
+ } satisfies Meta<typeof IconButton>;
57
57
 
58
58
  export default meta;
59
59
  type Story = StoryObj<typeof IconButton>;
@@ -68,6 +68,10 @@ export const Base: Story = {
68
68
  };
69
69
 
70
70
  export const AppearanceShowcase: Story = {
71
+ args: {
72
+ accessibilityLabel: 'Settings',
73
+ icon: Settings,
74
+ },
71
75
  render: () => (
72
76
  <Box lx={{ flexDirection: 'row', gap: 's8' }}>
73
77
  <IconButton accessibilityLabel='Add' icon={Plus} appearance='accent' />
@@ -89,6 +93,10 @@ export const AppearanceShowcase: Story = {
89
93
  };
90
94
 
91
95
  export const SizesShowcase: Story = {
96
+ args: {
97
+ accessibilityLabel: 'Settings',
98
+ icon: Settings,
99
+ },
92
100
  render: () => (
93
101
  <Box lx={{ flexDirection: 'row', alignItems: 'center', gap: 's8' }}>
94
102
  <IconButton
@@ -117,6 +125,8 @@ export const SizesShowcase: Story = {
117
125
 
118
126
  export const StatesShowcase: Story = {
119
127
  args: {
128
+ accessibilityLabel: 'Settings',
129
+ icon: Settings,
120
130
  appearance: 'base',
121
131
  },
122
132
  render: ({ appearance }) => (
@@ -8,7 +8,7 @@ import {
8
8
  } from '../../symbols';
9
9
  import { InteractiveIcon } from './InteractiveIcon';
10
10
 
11
- const meta: Meta<typeof InteractiveIcon> = {
11
+ const meta = {
12
12
  component: InteractiveIcon,
13
13
  id: 'rnative-interactiveicon',
14
14
  title: 'Core/InteractiveIcon',
@@ -32,7 +32,7 @@ const meta: Meta<typeof InteractiveIcon> = {
32
32
  },
33
33
  },
34
34
  },
35
- };
35
+ } satisfies Meta<typeof InteractiveIcon>;
36
36
 
37
37
  export default meta;
38
38
  type Story = StoryObj<typeof InteractiveIcon>;
@@ -72,6 +72,10 @@ export const Stroked: Story = {
72
72
  };
73
73
 
74
74
  export const IconTypeShowcase: Story = {
75
+ args: {
76
+ iconType: 'filled',
77
+ icon: DeleteCircleFill,
78
+ },
75
79
  render: () => {
76
80
  return (
77
81
  <Box lx={{ flexDirection: 'row', gap: 's16', padding: 's8' }}>
@@ -101,6 +105,10 @@ export const IconTypeShowcase: Story = {
101
105
  };
102
106
 
103
107
  export const SizesShowcase: Story = {
108
+ args: {
109
+ iconType: 'filled',
110
+ icon: DeleteCircleFill,
111
+ },
104
112
  render: () => {
105
113
  const iconSizes = [16, 20, 24, 40] as const;
106
114
  return (
@@ -132,6 +140,10 @@ export const SizesShowcase: Story = {
132
140
  };
133
141
 
134
142
  export const StatesShowcase: Story = {
143
+ args: {
144
+ iconType: 'filled',
145
+ icon: DeleteCircleFill,
146
+ },
135
147
  render: () => {
136
148
  return (
137
149
  <Box
@@ -3,7 +3,7 @@ import { Box, Text } from '../../primitives';
3
3
  import { Settings, Information, ArrowRight } from '../../symbols';
4
4
  import { Link } from './Link';
5
5
 
6
- const meta: Meta<typeof Link> = {
6
+ const meta = {
7
7
  component: Link,
8
8
  id: 'rnative-link',
9
9
  title: 'Core/Link',
@@ -51,7 +51,7 @@ const meta: Meta<typeof Link> = {
51
51
  description: 'The content to be displayed inside the link',
52
52
  },
53
53
  },
54
- };
54
+ } satisfies Meta<typeof Link>;
55
55
 
56
56
  export default meta;
57
57
  type Story = StoryObj<typeof Link>;