@utilitywarehouse/hearth-react-native 0.11.0 → 0.13.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 (202) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-lint.log +1 -1
  3. package/CHANGELOG.md +16 -0
  4. package/build/components/Accordion/AccordionTrigger.js +1 -1
  5. package/build/components/Banner/Banner.context.d.ts +7 -0
  6. package/build/components/Banner/Banner.context.js +8 -0
  7. package/build/components/Banner/Banner.js +10 -40
  8. package/build/components/Banner/Banner.props.d.ts +3 -5
  9. package/build/components/Banner/BannerIllustration.d.ts +4 -0
  10. package/build/components/Banner/BannerIllustration.js +53 -0
  11. package/build/components/Banner/BannerImage.d.ts +4 -0
  12. package/build/components/Banner/BannerImage.js +53 -0
  13. package/build/components/Banner/index.d.ts +2 -0
  14. package/build/components/Banner/index.js +2 -0
  15. package/build/components/Card/CardAction/CardAction.props.d.ts +2 -3
  16. package/build/components/Card/CardAction/CardActionRoot.js +1 -2
  17. package/build/components/Checkbox/Checkbox.js +1 -2
  18. package/build/components/Checkbox/Checkbox.props.d.ts +3 -3
  19. package/build/components/Checkbox/CheckboxImage.d.ts +2 -1
  20. package/build/components/Checkbox/CheckboxImage.js +8 -1
  21. package/build/components/Checkbox/CheckboxIndicator.js +3 -3
  22. package/build/components/DatePicker/DatePickerDay.js +3 -3
  23. package/build/components/ExpandableCard/ExpandableCard.props.d.ts +1 -2
  24. package/build/components/ExpandableCard/ExpandableCardTrigger.props.d.ts +4 -5
  25. package/build/components/ExpandableCard/ExpandableCardTriggerRoot.js +1 -14
  26. package/build/components/HighlightBanner/HighlightBanner.js +2 -6
  27. package/build/components/HighlightBanner/HighlightBanner.props.d.ts +2 -3
  28. package/build/components/HighlightBanner/HighlightBannerImage.d.ts +4 -0
  29. package/build/components/HighlightBanner/HighlightBannerImage.js +18 -0
  30. package/build/components/HighlightBanner/index.d.ts +1 -0
  31. package/build/components/HighlightBanner/index.js +1 -0
  32. package/build/components/Input/Input.d.ts +5 -7
  33. package/build/components/Input/Input.js +11 -4
  34. package/build/components/Input/InputField.d.ts +4 -7
  35. package/build/components/Input/InputField.js +6 -5
  36. package/build/components/List/ListItem/ListItem.props.d.ts +2 -2
  37. package/build/components/List/ListItem/ListItemRoot.js +1 -2
  38. package/build/components/Modal/Modal.js +2 -6
  39. package/build/components/Modal/Modal.props.d.ts +3 -2
  40. package/build/components/Modal/Modal.web.js +2 -6
  41. package/build/components/Modal/ModalImage.d.ts +4 -0
  42. package/build/components/Modal/ModalImage.js +18 -0
  43. package/build/components/Modal/index.d.ts +1 -0
  44. package/build/components/Modal/index.js +1 -0
  45. package/build/components/PillGroup/Pill.js +2 -2
  46. package/build/components/Radio/Radio.js +1 -2
  47. package/build/components/Radio/Radio.props.d.ts +3 -3
  48. package/build/components/Radio/RadioImage.d.ts +2 -1
  49. package/build/components/Radio/RadioImage.js +8 -1
  50. package/build/components/Radio/RadioIndicator.js +3 -3
  51. package/build/components/RadioCard/RadioCardIndicator.js +3 -3
  52. package/build/components/RadioCard/RadioCardRoot.js +3 -3
  53. package/build/components/Tabs/Tab.js +5 -5
  54. package/build/components/ToggleButton/ToggleButtonRoot.js +2 -2
  55. package/build/components/ToggleButtonCard/ToggleButtonCardRoot.js +3 -3
  56. package/build/components/UnstyledIconButton/UnstyledIconButtonRoot.js +1 -1
  57. package/build/components/VerificationInput/VerificationInput.d.ts +6 -0
  58. package/build/components/VerificationInput/VerificationInput.js +35 -0
  59. package/build/components/VerificationInput/VerificationInput.props.d.ts +49 -0
  60. package/build/components/VerificationInput/VerificationInput.props.js +1 -0
  61. package/build/components/VerificationInput/VerificationInputSlot.d.ts +9 -0
  62. package/build/components/VerificationInput/VerificationInputSlot.js +72 -0
  63. package/build/components/VerificationInput/index.d.ts +4 -0
  64. package/build/components/VerificationInput/index.js +3 -0
  65. package/build/components/VerificationInput/useVerificationInput.d.ts +14 -0
  66. package/build/components/VerificationInput/useVerificationInput.js +58 -0
  67. package/build/components/index.d.ts +1 -0
  68. package/build/components/index.js +1 -0
  69. package/build/utils/index.d.ts +2 -1
  70. package/build/utils/index.js +2 -1
  71. package/build/utils/isThemedImageProps.d.ts +4 -0
  72. package/build/utils/isThemedImageProps.js +4 -0
  73. package/docs/components/AllComponents.web.tsx +9 -0
  74. package/package.json +11 -12
  75. package/src/components/Accordion/Accordion.figma.tsx +23 -0
  76. package/src/components/Accordion/AccordionItemRoot.figma.tsx +47 -0
  77. package/src/components/Accordion/AccordionTrigger.tsx +1 -1
  78. package/src/components/Alert/Alert.figma.tsx +47 -0
  79. package/src/components/Avatar/Avatar.figma.tsx +33 -0
  80. package/src/components/Badge/Badge.figma.tsx +48 -24
  81. package/src/components/Banner/Banner.context.ts +11 -0
  82. package/src/components/Banner/Banner.docs.mdx +55 -37
  83. package/src/components/Banner/Banner.figma.tsx +15 -0
  84. package/src/components/Banner/Banner.props.ts +3 -5
  85. package/src/components/Banner/Banner.stories.tsx +86 -57
  86. package/src/components/Banner/Banner.tsx +24 -67
  87. package/src/components/Banner/BannerIllustration.figma.tsx +30 -0
  88. package/src/components/Banner/BannerIllustration.tsx +63 -0
  89. package/src/components/Banner/BannerImage.tsx +63 -0
  90. package/src/components/Banner/index.ts +2 -0
  91. package/src/components/BottomSheet/BottomSheetModal.figma.tsx +20 -0
  92. package/src/components/Button/Button.figma.tsx +60 -229
  93. package/src/components/Card/Card.docs.mdx +4 -4
  94. package/src/components/Card/Card.figma.tsx +43 -71
  95. package/src/components/Card/CardAction/CardAction.figma.tsx +44 -0
  96. package/src/components/Card/CardAction/CardAction.props.ts +2 -3
  97. package/src/components/Card/CardAction/CardAction.stories.tsx +5 -4
  98. package/src/components/Card/CardAction/CardActionRoot.tsx +4 -5
  99. package/src/components/Carousel/Carousel.figma.tsx +19 -0
  100. package/src/components/Checkbox/Checkbox.docs.mdx +23 -4
  101. package/src/components/Checkbox/Checkbox.figma.tsx +26 -41
  102. package/src/components/Checkbox/Checkbox.props.ts +3 -3
  103. package/src/components/Checkbox/Checkbox.stories.tsx +14 -8
  104. package/src/components/Checkbox/Checkbox.tsx +1 -2
  105. package/src/components/Checkbox/CheckboxGroup.figma.tsx +20 -0
  106. package/src/components/Checkbox/CheckboxImage.figma.tsx +27 -0
  107. package/src/components/Checkbox/CheckboxImage.tsx +8 -3
  108. package/src/components/Checkbox/CheckboxIndicator.tsx +3 -3
  109. package/src/components/Checkbox/CheckboxTileRoot.figma.tsx +32 -0
  110. package/src/components/CurrencyInput/CurrencyInput.figma.tsx +56 -0
  111. package/src/components/DateInput/DateInput.figma.tsx +75 -0
  112. package/src/components/DatePicker/DatePickerCalendar.figma.tsx +34 -0
  113. package/src/components/DatePicker/DatePickerDay.tsx +3 -3
  114. package/src/components/DatePickerInput/DatePickerInput.figma.tsx +62 -0
  115. package/src/components/DescriptionList/DescriptionList.figma.tsx +23 -0
  116. package/src/components/Divider/Divider.figma.tsx +23 -18
  117. package/src/components/ExpandableCard/ExpandableCard.docs.mdx +2 -2
  118. package/src/components/ExpandableCard/ExpandableCard.figma.tsx +54 -0
  119. package/src/components/ExpandableCard/ExpandableCard.props.ts +1 -2
  120. package/src/components/ExpandableCard/ExpandableCard.stories.tsx +3 -3
  121. package/src/components/ExpandableCard/ExpandableCardGroup.figma.tsx +23 -0
  122. package/src/components/ExpandableCard/ExpandableCardTrigger.props.ts +4 -5
  123. package/src/components/ExpandableCard/ExpandableCardTriggerRoot.tsx +2 -17
  124. package/src/components/FormField/FormField.figma.tsx +23 -0
  125. package/src/components/Helper/HelperText.figma.tsx +23 -0
  126. package/src/components/HighlightBanner/HighlightBanner.docs.mdx +73 -42
  127. package/src/components/HighlightBanner/HighlightBanner.props.ts +2 -3
  128. package/src/components/HighlightBanner/HighlightBanner.stories.tsx +85 -60
  129. package/src/components/HighlightBanner/HighlightBanner.tsx +3 -10
  130. package/src/components/HighlightBanner/HighlightBannerImage.tsx +20 -0
  131. package/src/components/HighlightBanner/index.ts +1 -0
  132. package/src/components/IconButton/IconButton.figma.tsx +55 -161
  133. package/src/components/IconContainer/IconContainer.figma.tsx +50 -0
  134. package/src/components/InlineLink/InlineLink.figma.tsx +33 -0
  135. package/src/components/Input/Input.figma.tsx +52 -110
  136. package/src/components/Input/Input.stories.tsx +76 -3
  137. package/src/components/Input/Input.tsx +110 -98
  138. package/src/components/Input/InputField.tsx +27 -26
  139. package/src/components/Label/Label.figma.tsx +24 -0
  140. package/src/components/Link/Link.figma.tsx +42 -0
  141. package/src/components/List/List.docs.mdx +15 -9
  142. package/src/components/List/List.figma.tsx +29 -108
  143. package/src/components/List/List.stories.tsx +2 -2
  144. package/src/components/List/ListAction/ListAction.figma.tsx +29 -0
  145. package/src/components/List/ListItem/ListItem.figma.tsx +40 -220
  146. package/src/components/List/ListItem/ListItem.props.ts +2 -2
  147. package/src/components/List/ListItem/ListItemLeadingContent.figma.tsx +29 -0
  148. package/src/components/List/ListItem/ListItemRoot.tsx +2 -3
  149. package/src/components/List/ListItem/ListItemTrailingContent.figma.tsx +27 -0
  150. package/src/components/Menu/Menu.figma.tsx +30 -0
  151. package/src/components/Menu/MenuItem.figma.tsx +31 -0
  152. package/src/components/Modal/Modal.docs.mdx +16 -4
  153. package/src/components/Modal/Modal.figma.tsx +56 -0
  154. package/src/components/Modal/Modal.props.ts +3 -2
  155. package/src/components/Modal/Modal.stories.tsx +2 -5
  156. package/src/components/Modal/Modal.tsx +2 -6
  157. package/src/components/Modal/Modal.web.tsx +2 -6
  158. package/src/components/Modal/ModalImage.tsx +20 -0
  159. package/src/components/Modal/index.ts +1 -0
  160. package/src/components/PillGroup/Pill.figma.tsx +25 -0
  161. package/src/components/PillGroup/Pill.tsx +3 -3
  162. package/src/components/PillGroup/PillGroup.figma.tsx +21 -0
  163. package/src/components/PillGroup/PillGroup.stories.tsx +1 -1
  164. package/src/components/ProgressStepper/ProgressStep.figma.tsx +30 -0
  165. package/src/components/ProgressStepper/ProgressStepper.figma.tsx +20 -0
  166. package/src/components/Radio/Radio.docs.mdx +21 -8
  167. package/src/components/Radio/Radio.figma.tsx +22 -42
  168. package/src/components/Radio/Radio.props.ts +3 -3
  169. package/src/components/Radio/Radio.stories.tsx +15 -11
  170. package/src/components/Radio/Radio.tsx +1 -2
  171. package/src/components/Radio/RadioGroup.figma.tsx +54 -0
  172. package/src/components/Radio/RadioImage.figma.tsx +27 -0
  173. package/src/components/Radio/RadioImage.tsx +8 -3
  174. package/src/components/Radio/RadioIndicator.tsx +3 -3
  175. package/src/components/Radio/RadioTileRoot.figma.tsx +31 -0
  176. package/src/components/RadioCard/RadioCardIndicator.tsx +3 -3
  177. package/src/components/RadioCard/RadioCardRoot.tsx +3 -3
  178. package/src/components/SectionHeader/SectionHeader.figma.tsx +30 -16
  179. package/src/components/Select/Select.figma.tsx +55 -0
  180. package/src/components/Select/SelectOption.figma.tsx +36 -0
  181. package/src/components/Spinner/Spinner.figma.tsx +20 -12
  182. package/src/components/Switch/Switch.figma.tsx +31 -23
  183. package/src/components/Tabs/Tab.tsx +5 -5
  184. package/src/components/Tabs/Tabs.figma.tsx +29 -0
  185. package/src/components/ThemedImage/ThemedImage.stories.tsx +1 -1
  186. package/src/components/Toast/ToastItem.figma.tsx +22 -0
  187. package/src/components/ToggleButton/ToggleButtonRoot.tsx +2 -2
  188. package/src/components/ToggleButtonCard/ToggleButtonCardRoot.tsx +3 -3
  189. package/src/components/UnstyledIconButton/UnstyledIconButton.figma.tsx +49 -0
  190. package/src/components/UnstyledIconButton/UnstyledIconButtonRoot.tsx +1 -1
  191. package/src/components/VerificationInput/VerificationInput.docs.mdx +68 -0
  192. package/src/components/VerificationInput/VerificationInput.props.ts +52 -0
  193. package/src/components/VerificationInput/VerificationInput.stories.tsx +140 -0
  194. package/src/components/VerificationInput/VerificationInput.tsx +89 -0
  195. package/src/components/VerificationInput/VerificationInputSlot.tsx +94 -0
  196. package/src/components/VerificationInput/index.ts +5 -0
  197. package/src/components/VerificationInput/useVerificationInput.ts +72 -0
  198. package/src/components/index.ts +1 -0
  199. package/src/utils/index.ts +2 -1
  200. package/src/utils/isThemedImageProps.ts +8 -0
  201. package/src/components/Checkbox/CheckboxIndicator.figma.tsx +0 -19
  202. package/src/components/Radio/RadioIndicator.figma.tsx +0 -21
@@ -1,229 +1,60 @@
1
- //
2
- // import { Button, ButtonIcon, ButtonText } from './';
3
- // import figma from '@figma/code-connect';
4
-
5
- // const props = {
6
- // iconPosition: figma.boolean('Icon Left?', {
7
- // true: 'left',
8
- // false: figma.boolean('Icon Right?', {
9
- // true: 'right',
10
- // false: undefined,
11
- // }),
12
- // }),
13
- // icon: figma.boolean('Icon Right?', {
14
- // true: figma.instance('Icon Right'),
15
- // false: figma.boolean('Icon Left?', {
16
- // true: figma.instance('Icon Left'),
17
- // false: undefined,
18
- // }),
19
- // }),
20
- // iconRight: figma.instance('Icon Right'),
21
- // iconLeft: figma.instance('Icon Left'),
22
- // text: figma.string('Text'),
23
- // colorScheme: figma.enum('colorScheme', {
24
- // cyan: 'cyan',
25
- // green: 'green',
26
- // red: 'red',
27
- // }),
28
- // size: figma.enum('size', {
29
- // 'medium - 48 (default)': 'medium',
30
- // 'large - 56': 'large',
31
- // 'small - 32': 'small',
32
- // }),
33
- // disabled: figma.enum('state', {
34
- // disabled: true,
35
- // }),
36
- // loading: figma.enum('state', {
37
- // loading: true,
38
- // }),
39
- // inverted: figma.boolean('inverted'),
40
- // };
41
-
42
- // // Solid Button
43
-
44
- // figma.connect(
45
- // Button,
46
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7249-3682&m=dev',
47
- // {
48
- // props,
49
- // links: [
50
- // {
51
- // name: 'Documentation',
52
- // url: 'https://uw-native-ui.vercel.app/?path=/docs/native-ui-components-button--docs',
53
- // },
54
- // ],
55
- // example: ({ text, inverted, disabled, loading, colorScheme, size, icon, iconPosition }) => (
56
- // <Button
57
- // variant="solid"
58
- // onPress={() => console.log('button pressed')}
59
- // colorScheme={colorScheme}
60
- // size={size}
61
- // inverted={inverted}
62
- // disabled={disabled}
63
- // loading={loading}
64
- // iconPosition={iconPosition}
65
- // icon={icon}
66
- // >
67
- // {text}
68
- // </Button>
69
- // ),
70
- // }
71
- // );
72
-
73
- // figma.connect(
74
- // Button,
75
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7249-3682&m=dev',
76
- // {
77
- // props,
78
- // links: [
79
- // {
80
- // name: 'Documentation',
81
- // url: 'https://uw-native-ui.vercel.app/?path=/docs/native-ui-components-button--docs',
82
- // },
83
- // ],
84
- // variant: {
85
- // 'Icon Right?': true,
86
- // 'Icon Left?': true,
87
- // },
88
- // example: ({ text, inverted, disabled, colorScheme, size, iconLeft, iconRight }) => (
89
- // <Button
90
- // variant="solid"
91
- // onPress={() => console.log('button pressed')}
92
- // colorScheme={colorScheme}
93
- // size={size}
94
- // inverted={inverted}
95
- // disabled={disabled}
96
- // >
97
- // <ButtonIcon as={iconLeft} />
98
- // <ButtonText>{text}</ButtonText>
99
- // <ButtonIcon as={iconRight} />
100
- // </Button>
101
- // ),
102
- // }
103
- // );
104
-
105
- // // Outline Button
106
-
107
- // figma.connect(
108
- // Button,
109
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7250-1321&m=dev',
110
- // {
111
- // props,
112
- // links: [
113
- // {
114
- // name: 'Documentation',
115
- // url: 'https://uw-native-ui.vercel.app/?path=/docs/native-ui-components-button--docs',
116
- // },
117
- // ],
118
- // example: ({ text, inverted, disabled, loading, colorScheme, size, icon, iconPosition }) => (
119
- // <Button
120
- // variant="outline"
121
- // onPress={() => console.log('button pressed')}
122
- // colorScheme={colorScheme}
123
- // size={size}
124
- // inverted={inverted}
125
- // disabled={disabled}
126
- // loading={loading}
127
- // iconPosition={iconPosition}
128
- // icon={icon}
129
- // >
130
- // {text}
131
- // </Button>
132
- // ),
133
- // }
134
- // );
135
-
136
- // figma.connect(
137
- // Button,
138
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7249-3682&m=dev',
139
- // {
140
- // props,
141
- // links: [
142
- // {
143
- // name: 'Documentation',
144
- // url: 'https://uw-native-ui.vercel.app/?path=/docs/native-ui-components-button--docs',
145
- // },
146
- // ],
147
- // variant: {
148
- // 'Icon Right?': true,
149
- // 'Icon Left?': true,
150
- // },
151
- // example: ({ text, inverted, disabled, colorScheme, size, iconLeft, iconRight }) => (
152
- // <Button
153
- // variant="outline"
154
- // onPress={() => console.log('button pressed')}
155
- // colorScheme={colorScheme}
156
- // size={size}
157
- // inverted={inverted}
158
- // disabled={disabled}
159
- // >
160
- // <ButtonIcon as={iconLeft} />
161
- // <ButtonText>{text}</ButtonText>
162
- // <ButtonIcon as={iconRight} />
163
- // </Button>
164
- // ),
165
- // }
166
- // );
167
-
168
- // // Ghost button
169
-
170
- // figma.connect(
171
- // Button,
172
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7250-2103&m=dev',
173
- // {
174
- // props,
175
- // links: [
176
- // {
177
- // name: 'Documentation',
178
- // url: 'https://uw-native-ui.vercel.app/?path=/docs/native-ui-components-button--docs',
179
- // },
180
- // ],
181
- // example: ({ text, inverted, disabled, loading, colorScheme, size, icon, iconPosition }) => (
182
- // <Button
183
- // variant="ghost"
184
- // onPress={() => console.log('button pressed')}
185
- // colorScheme={colorScheme}
186
- // size={size}
187
- // inverted={inverted}
188
- // disabled={disabled}
189
- // loading={loading}
190
- // iconPosition={iconPosition}
191
- // icon={icon}
192
- // >
193
- // {text}
194
- // </Button>
195
- // ),
196
- // }
197
- // );
198
-
199
- // figma.connect(
200
- // Button,
201
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7249-3682&m=dev',
202
- // {
203
- // props,
204
- // links: [
205
- // {
206
- // name: 'Documentation',
207
- // url: 'https://uw-native-ui.vercel.app/?path=/docs/native-ui-components-button--docs',
208
- // },
209
- // ],
210
- // variant: {
211
- // 'Icon Right?': true,
212
- // 'Icon Left?': true,
213
- // },
214
- // example: ({ text, inverted, disabled, colorScheme, size, iconLeft, iconRight }) => (
215
- // <Button
216
- // variant="ghost"
217
- // onPress={() => console.log('button pressed')}
218
- // colorScheme={colorScheme}
219
- // size={size}
220
- // inverted={inverted}
221
- // disabled={disabled}
222
- // >
223
- // <ButtonIcon as={iconLeft} />
224
- // <ButtonText>{text}</ButtonText>
225
- // <ButtonIcon as={iconRight} />
226
- // </Button>
227
- // ),
228
- // }
229
- // );
1
+ import figma from '@figma/code-connect';
2
+ import Button from './Button';
3
+
4
+ /**
5
+ * -- This file was auto-generated by Code Connect --
6
+ * `props` includes a mapping from your code props to Figma properties.
7
+ * You should check this is correct, and update the `example` function
8
+ * to return the code example you'd like to see in Figma
9
+ */
10
+
11
+ figma.connect(Button, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=90%3A432', {
12
+ props: {
13
+ // These props were automatically mapped based on your linked code:
14
+ focusable: figma.enum('State', {
15
+ Focus: true,
16
+ }),
17
+ 'aria-disabled': figma.enum('State', {
18
+ Disabled: true,
19
+ }),
20
+ disabled: figma.enum('State', {
21
+ Disabled: true,
22
+ }),
23
+ size: figma.enum('Size', {
24
+ 'SM-32': 'sm',
25
+ 'MD-48': 'md',
26
+ }),
27
+ paddingNone: figma.boolean('Padding None?'),
28
+ colorScheme: figma.enum('Color Scheme', {
29
+ Affirmative: 'affirmative',
30
+ Destructive: 'destructive',
31
+ }),
32
+ loading: figma.enum('State', {
33
+ Loading: true,
34
+ }),
35
+ // No matching props could be found for these Figma properties:
36
+ // "text": figma.string('Text'),
37
+ // "showIconLeft": figma.boolean('Show icon left?'),
38
+ // "showIconRight": figma.boolean('Show icon right?'),
39
+ // "iconLeft20": figma.instance('Icon left-20'),
40
+ // "iconRight20": figma.instance('Icon right-20'),
41
+ // "ghostText": figma.string('Ghost Text'),
42
+ // "variant": figma.enum('Variant', {
43
+ // "Emphasis": "emphasis",
44
+ // "Solid": "solid",
45
+ // "Outline": "outline",
46
+ // "Ghost": "ghost"
47
+ // }),
48
+ // "inverted": figma.boolean('Inverted?')
49
+ },
50
+ example: props => (
51
+ <Button
52
+ focusable={props.focusable}
53
+ disabled={props.disabled}
54
+ size={props.size}
55
+ paddingNone={props.paddingNone}
56
+ colorScheme={props.colorScheme}
57
+ loading={props.loading}
58
+ />
59
+ ),
60
+ });
@@ -209,7 +209,7 @@ const MyComponent = () => (
209
209
  The badge can be positioned in three different locations:
210
210
 
211
211
  ```tsx
212
- import { Card, CardAction } from '@utilitywarehouse/hearth-react-native';
212
+ import { Card, CardAction, Badge } from '@utilitywarehouse/hearth-react-native';
213
213
 
214
214
  const MyComponent = () => (
215
215
  <>
@@ -218,7 +218,7 @@ const MyComponent = () => (
218
218
  <CardAction
219
219
  heading="Action"
220
220
  helperText="Helper text"
221
- badge={{ text: 'New' }}
221
+ badge={<Badge text="New" />}
222
222
  badgePosition="bottom"
223
223
  onPress={() => console.log('pressed')}
224
224
  />
@@ -229,7 +229,7 @@ const MyComponent = () => (
229
229
  <CardAction
230
230
  heading="Action"
231
231
  helperText="Helper text"
232
- badge={{ text: 'New' }}
232
+ badge={<Badge text="New" />}
233
233
  badgePosition="middle"
234
234
  onPress={() => console.log('pressed')}
235
235
  />
@@ -240,7 +240,7 @@ const MyComponent = () => (
240
240
  <CardAction
241
241
  heading="Action"
242
242
  helperText="Helper text"
243
- badge={{ text: 'New' }}
243
+ badge={<Badge text="New" />}
244
244
  badgePosition="right"
245
245
  onPress={() => console.log('pressed')}
246
246
  />
@@ -1,73 +1,45 @@
1
- //
2
- // import { Card } from './';
3
- // import figma from '@figma/code-connect';
1
+ import React from "react"
2
+ import Card from "./Card"
3
+ import figma from "@figma/code-connect"
4
4
 
5
- // figma.connect(
6
- // Card,
7
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=9344-2255&t=mJTJZaLNKo4fj5Wm-4',
8
- // {
9
- // props: {
10
- // variant: figma.enum('variant', {
11
- // dashed: 'dashed',
12
- // elevated: 'elevated',
13
- // outline: 'outline',
14
- // filled: 'filled',
15
- // }),
16
- // padding: figma.enum('padding', {
17
- // large: 'large',
18
- // medium: 'medium',
19
- // small: 'small',
20
- // none: 'none',
21
- // }),
22
- // colorScheme: figma.enum('colorScheme', {
23
- // base: 'base',
24
- // grey: 'grey',
25
- // purple: 'purple',
26
- // }),
27
- // surface: figma.enum('surface', {
28
- // base: 'base',
29
- // purple: 'purple',
30
- // }),
31
- // children: figma.instance('content'),
32
- // },
33
- // example: ({ children, ...props }) => <Card {...props}>{children}</Card>,
34
- // }
35
- // );
5
+ /**
6
+ * -- This file was auto-generated by Code Connect --
7
+ * `props` includes a mapping from your code props to Figma properties.
8
+ * You should check this is correct, and update the `example` function
9
+ * to return the code example you'd like to see in Figma
10
+ */
36
11
 
37
- // // Nested Card
38
-
39
- // figma.connect(
40
- // Card,
41
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=9444-8408&t=mJTJZaLNKo4fj5Wm-4',
42
- // {
43
- // props: {
44
- // variant: figma.enum('variant', {
45
- // dashed: 'dashed',
46
- // elevated: 'elevated',
47
- // outline: 'outline',
48
- // filled: 'filled',
49
- // }),
50
- // padding: figma.enum('padding', {
51
- // large: 'large',
52
- // medium: 'medium',
53
- // small: 'small',
54
- // none: 'none',
55
- // }),
56
- // colorScheme: figma.enum('colorScheme', {
57
- // base: 'base',
58
- // grey: 'grey',
59
- // purple: 'purple',
60
- // }),
61
- // surface: figma.enum('surface', {
62
- // base: 'base',
63
- // purple: 'purple',
64
- // }),
65
- // children: figma.instance('content'),
66
- // },
67
- // example: ({ children, ...props }) => (
68
- // <Card {...props} nested>
69
- // {children}
70
- // </Card>
71
- // ),
72
- // }
73
- // );
12
+ figma.connect(
13
+ Card,
14
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=2160%3A11",
15
+ {
16
+ props: {
17
+ // These props were automatically mapped based on your linked code:
18
+ variant: figma.enum("Variant", {
19
+ Emphasis: "emphasis",
20
+ Subtle: "subtle",
21
+ }),
22
+ colorScheme: figma.enum("Color Scheme", {
23
+ "Neutral Strong": "neutralStrong",
24
+ "Neutral Subtle": "neutralSubtle",
25
+ Brand: "brand",
26
+ Energy: "energy",
27
+ Broadband: "broadband",
28
+ Mobile: "mobile",
29
+ Insurance: "insurance",
30
+ Cashback: "cashback",
31
+ Pig: "pig",
32
+ }),
33
+ noPadding: figma.boolean("Padding None?"),
34
+ // No matching props could be found for these Figma properties:
35
+ // "content": figma.instance('Content')
36
+ },
37
+ example: (props) => (
38
+ <Card
39
+ variant={props.variant}
40
+ colorScheme={props.colorScheme}
41
+ noPadding={props.noPadding}
42
+ />
43
+ ),
44
+ },
45
+ )
@@ -0,0 +1,44 @@
1
+ import figma from '@figma/code-connect';
2
+ import CardAction from './CardAction';
3
+
4
+ /**
5
+ * -- This file was auto-generated by Code Connect --
6
+ * `props` includes a mapping from your code props to Figma properties.
7
+ * You should check this is correct, and update the `example` function
8
+ * to return the code example you'd like to see in Figma
9
+ */
10
+
11
+ figma.connect(
12
+ CardAction,
13
+ 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=8154%3A4346',
14
+ {
15
+ props: {
16
+ // These props were automatically mapped based on your linked code:
17
+ loading: figma.enum('State', {
18
+ Loading: true,
19
+ }),
20
+ disabled: figma.enum('State', {
21
+ Disabled: true,
22
+ }),
23
+ 'aria-disabled': figma.enum('State', {
24
+ Disabled: true,
25
+ }),
26
+ // No matching props could be found for these Figma properties:
27
+ // "listHeading": figma.string('List heading'),
28
+ // "helperText": figma.boolean('Helper text?'),
29
+ // "helperText": figma.string('Helper text'),
30
+ // "iconContainer": figma.boolean('Icon container?'),
31
+ // "trailingIcon20": figma.instance('Trailing icon-20'),
32
+ // "leadingIcon": figma.boolean('Leading Icon?'),
33
+ // "leadingIcon24": figma.instance('Leading icon-24'),
34
+ // "badgeRight": figma.boolean('Badge right?'),
35
+ // "badgeBottom": figma.boolean('Badge bottom?'),
36
+ // "badgeMiddle": figma.boolean('Badge middle?'),
37
+ // "size": figma.enum('Size', {
38
+ // "Default": "default",
39
+ // "Large": "large"
40
+ // })
41
+ },
42
+ example: props => <CardAction loading={props.loading} disabled={props.disabled} />,
43
+ }
44
+ );
@@ -1,6 +1,5 @@
1
- import { ComponentType } from 'react';
1
+ import { ComponentType, ReactNode } from 'react';
2
2
  import type { PressableProps, ViewProps } from 'react-native';
3
- import BadgeProps from '../../Badge/Badge.props';
4
3
  import { IconContainerProps } from '../../IconContainer';
5
4
 
6
5
  interface CardActionBaseProps extends Omit<PressableProps, 'children'> {
@@ -12,7 +11,7 @@ interface CardActionBaseProps extends Omit<PressableProps, 'children'> {
12
11
  interface CardActionContentProps {
13
12
  heading: string;
14
13
  helperText?: string;
15
- badge?: BadgeProps;
14
+ badge?: ReactNode;
16
15
  badgePosition?: 'bottom' | 'middle' | 'right' | 'top';
17
16
  iconContainer?: boolean;
18
17
  iconContainerVariant?: IconContainerProps['variant'];
@@ -1,7 +1,8 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-native';
2
2
  import * as Icons from '@utilitywarehouse/hearth-react-native-icons';
3
3
  import { ElectricityMediumIcon, GasMediumIcon } from '@utilitywarehouse/hearth-react-native-icons';
4
4
  import { View } from 'react-native';
5
+ import { Badge } from '../../Badge';
5
6
  import { Flex } from '../../Flex';
6
7
  import Card from '../Card';
7
8
  import CardAction from './CardAction';
@@ -169,7 +170,7 @@ export const WithBadge: Story = {
169
170
  heading="Badge at bottom"
170
171
  helperText="Badge positioned below text"
171
172
  leadingIcon={ElectricityMediumIcon}
172
- badge={{ text: 'New' }}
173
+ badge={<Badge text="New" />}
173
174
  badgePosition="bottom"
174
175
  onPress={() => console.log('pressed')}
175
176
  />
@@ -179,7 +180,7 @@ export const WithBadge: Story = {
179
180
  heading="Badge at middle"
180
181
  helperText="Badge positioned between heading and helper text"
181
182
  leadingIcon={ElectricityMediumIcon}
182
- badge={{ text: 'New' }}
183
+ badge={<Badge text="New" />}
183
184
  badgePosition="middle"
184
185
  onPress={() => console.log('pressed')}
185
186
  />
@@ -189,7 +190,7 @@ export const WithBadge: Story = {
189
190
  heading="Badge at right"
190
191
  helperText="Badge positioned on the right side"
191
192
  leadingIcon={ElectricityMediumIcon}
192
- badge={{ text: 'New' }}
193
+ badge={<Badge text="New" />}
193
194
  badgePosition="right"
194
195
  onPress={() => console.log('pressed')}
195
196
  />
@@ -2,7 +2,6 @@ import { ChevronRightSmallIcon } from '@utilitywarehouse/hearth-react-native-ico
2
2
  import { useMemo } from 'react';
3
3
  import { Pressable, View, ViewStyle } from 'react-native';
4
4
  import { StyleSheet } from 'react-native-unistyles';
5
- import { Badge } from '../../Badge';
6
5
  import { IconContainer } from '../../IconContainer';
7
6
  import { Skeleton } from '../../Skeleton';
8
7
  import { useCardContext } from '../Card.context';
@@ -124,14 +123,14 @@ const CardActionRoot = ({
124
123
  </CardActionLeadingContent>
125
124
  ) : null}
126
125
  <CardActionContent>
127
- {badgePosition === 'top' && badge ? <Badge {...badge} /> : null}
126
+ {badgePosition === 'top' && badge ? badge : null}
128
127
  <CardActionText>{heading}</CardActionText>
129
- {badgePosition === 'middle' && badge ? <Badge {...badge} /> : null}
128
+ {badgePosition === 'middle' && badge ? badge : null}
130
129
  {helperText ? <CardActionHelperText>{helperText}</CardActionHelperText> : null}
131
- {badgePosition === 'bottom' && badge ? <Badge {...badge} /> : null}
130
+ {badgePosition === 'bottom' && badge ? badge : null}
132
131
  </CardActionContent>
133
132
  {badgePosition === 'right' && badge ? (
134
- <Badge {...badge} style={[badge.style, styles.alignCenter]} />
133
+ <View style={styles.alignCenter}>{badge}</View>
135
134
  ) : null}
136
135
  {trailingContent ? (
137
136
  <CardActionTrailingContent>{trailingContent}</CardActionTrailingContent>
@@ -0,0 +1,19 @@
1
+ import figma from '@figma/code-connect';
2
+ import Carousel from './Carousel';
3
+
4
+ /**
5
+ * -- This file was auto-generated by Code Connect --
6
+ * `props` includes a mapping from your code props to Figma properties.
7
+ * You should check this is correct, and update the `example` function
8
+ * to return the code example you'd like to see in Figma
9
+ */
10
+
11
+ figma.connect(Carousel, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=5191%3A3220', {
12
+ props: {
13
+ // These props were automatically mapped based on your linked code:
14
+ inverted: figma.boolean('Inverted?'),
15
+ // No matching props could be found for these Figma properties:
16
+ // "arrows": figma.boolean('Arrows?')
17
+ },
18
+ example: props => <Carousel width={null} inverted={props.inverted} />,
19
+ });
@@ -91,7 +91,7 @@ const MyComponent = () => {
91
91
  | `validText` | `string` | - | The valid text to be displayed below the checkbox. |
92
92
  | `showValidationIcon` | `boolean` | `true` | Whether to show the validation icon. |
93
93
  | `type` | `'default' \| 'tile'` | `default` | The type of the checkbox. |
94
- | `image` | `ImageProps` | - | The image to be displayed next to the label. |
94
+ | `image` | `ReactNode` | - | The image to be displayed next to the label. |
95
95
 
96
96
  ## Components
97
97
 
@@ -210,6 +210,15 @@ const MyComponent = () => {
210
210
 
211
211
  ### `CheckboxImage`
212
212
 
213
+ | Property | Type | Description |
214
+ | --------- | --------------------- | ------------------------------------------------------------------------ |
215
+ | `source` | `ImageSourcePropType` | The source of the image to display |
216
+ | `light` | `ImageSourcePropType` | The source of the image to display in light mode (use instead of source) |
217
+ | `dark` | `ImageSourcePropType` | The source of the image to display in dark mode (use instead of source) |
218
+ | `...rest` | `ImageProps` | Additional props to pass to the underlying Image component |
219
+
220
+ For more details about the ThemedImage component used internally, refer to the [`ThemedImage` documentation](/docs/utility-components-themed-image--docs).
221
+
213
222
  The `CheckboxImage` component is used to display an image next to the checkbox label. It inherits all the properties of React Native's `Image` component.
214
223
 
215
224
  ## Variants
@@ -336,7 +345,7 @@ The `CheckboxImage` component is used to display an image next to the checkbox l
336
345
  <Canvas of={Stories.WithImage} />
337
346
 
338
347
  ```tsx
339
- import { Checkbox } from '@utilitywarehouse/native-ui';
348
+ import { Checkbox, CheckboxImage } from '@utilitywarehouse/hearth-react-native';
340
349
  import visaLogo from '../../../assets/visa.png';
341
350
  import mastercardLogo from '../../../assets/mastercard.png';
342
351
 
@@ -347,13 +356,23 @@ const MyComponent = () => {
347
356
  value="visa"
348
357
  aria-label="Visa"
349
358
  label="Visa"
350
- image={{ source: visaLogo, style: { width: 40, height: 24, resizeMode: 'contain' } }}
359
+ image={
360
+ <CheckboxImage
361
+ source={visaLogo}
362
+ style={{ width: 40, height: 24, resizeMode: 'contain' }}
363
+ />
364
+ }
351
365
  />
352
366
  <Checkbox
353
367
  value="mastercard"
354
368
  aria-label="Mastercard"
355
369
  label="Mastercard"
356
- image={{ source: mastercardLogo, style: { width: 40, height: 24, resizeMode: 'contain' } }}
370
+ image={
371
+ <CheckboxImage
372
+ source={mastercardLogo}
373
+ style={{ width: 40, height: 24, resizeMode: 'contain' }}
374
+ />
375
+ }
357
376
  />
358
377
  </CheckboxGroup>
359
378
  );