@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
@@ -4,6 +4,7 @@ import { Button } from '../Button';
4
4
  import { Flex } from '../Flex';
5
5
  import { Link } from '../Link';
6
6
  import HighlightBanner from './HighlightBanner';
7
+ import HighlightBannerImage from './HighlightBannerImage';
7
8
 
8
9
  const meta = {
9
10
  title: 'Stories / HighlightBanner',
@@ -49,11 +50,13 @@ const meta = {
49
50
  heading: 'Featured Content',
50
51
  headingColor: 'highlight',
51
52
  description: 'This is a description of the featured content that appears below the image.',
52
- image: {
53
- source: {
54
- uri: 'https://images.unsplash.com/photo-1506126613408-eca07ce68773?w=800&q=80',
55
- },
56
- },
53
+ image: (
54
+ <HighlightBannerImage
55
+ source={{
56
+ uri: 'https://images.unsplash.com/photo-1506126613408-eca07ce68773?w=800&q=80',
57
+ }}
58
+ />
59
+ ),
57
60
  },
58
61
  } satisfies Meta<typeof HighlightBanner>;
59
62
 
@@ -105,11 +108,13 @@ export const ColorVariants: Story = {
105
108
  {...args}
106
109
  heading="Energy Blue"
107
110
  headingColor="energy"
108
- image={{
109
- source: {
110
- uri: 'https://images.unsplash.com/photo-1473186578172-c141e6798cf4?w=800&q=80',
111
- },
112
- }}
111
+ image={
112
+ <HighlightBannerImage
113
+ source={{
114
+ uri: 'https://images.unsplash.com/photo-1473186578172-c141e6798cf4?w=800&q=80',
115
+ }}
116
+ />
117
+ }
113
118
  description="Featured content with energy blue heading"
114
119
  link={<Link onPress={() => console.log('pressed')}>Learn more</Link>}
115
120
  />
@@ -117,22 +122,26 @@ export const ColorVariants: Story = {
117
122
  {...args}
118
123
  heading="Broadband Green"
119
124
  headingColor="broadband"
120
- image={{
121
- source: {
122
- uri: 'https://images.unsplash.com/photo-1501594907352-04cda38ebc29?w=800&q=80',
123
- },
124
- }}
125
+ image={
126
+ <HighlightBannerImage
127
+ source={{
128
+ uri: 'https://images.unsplash.com/photo-1501594907352-04cda38ebc29?w=800&q=80',
129
+ }}
130
+ />
131
+ }
125
132
  description="Featured content with broadband green heading"
126
133
  />
127
134
  <HighlightBanner
128
135
  {...args}
129
136
  heading="Insurance Orange"
130
137
  headingColor="insurance"
131
- image={{
132
- source: {
133
- uri: 'https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=800&q=80',
134
- },
135
- }}
138
+ image={
139
+ <HighlightBannerImage
140
+ source={{
141
+ uri: 'https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=800&q=80',
142
+ }}
143
+ />
144
+ }
136
145
  description="Featured content with insurance orange heading"
137
146
  button={<Button onPress={() => console.log('pressed')}>Get Started</Button>}
138
147
  />
@@ -140,11 +149,13 @@ export const ColorVariants: Story = {
140
149
  {...args}
141
150
  heading="Cashback Lilac"
142
151
  headingColor="cashback"
143
- image={{
144
- source: {
145
- uri: 'https://images.unsplash.com/photo-1506748686214-e9df14d4d9d0?w=800&q=80',
146
- },
147
- }}
152
+ image={
153
+ <HighlightBannerImage
154
+ source={{
155
+ uri: 'https://images.unsplash.com/photo-1506748686214-e9df14d4d9d0?w=800&q=80',
156
+ }}
157
+ />
158
+ }
148
159
  description="Featured content with cashback lilac heading"
149
160
  button={<Button onPress={() => console.log('pressed')}>Get Started</Button>}
150
161
  />
@@ -152,11 +163,13 @@ export const ColorVariants: Story = {
152
163
  {...args}
153
164
  heading="Pig Pink"
154
165
  headingColor="pig"
155
- image={{
156
- source: {
157
- uri: 'https://images.unsplash.com/photo-1494526585095-c41746248156?w=800&q=80',
158
- },
159
- }}
166
+ image={
167
+ <HighlightBannerImage
168
+ source={{
169
+ uri: 'https://images.unsplash.com/photo-1494526585095-c41746248156?w=800&q=80',
170
+ }}
171
+ />
172
+ }
160
173
  description="Featured content with pig pink heading"
161
174
  link={<Link onPress={() => console.log('pressed')}>Learn more</Link>}
162
175
  />
@@ -164,22 +177,26 @@ export const ColorVariants: Story = {
164
177
  {...args}
165
178
  heading="Mobile Rose"
166
179
  headingColor="mobile"
167
- image={{
168
- source: {
169
- uri: 'https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?w=800&q=80',
170
- },
171
- }}
180
+ image={
181
+ <HighlightBannerImage
182
+ source={{
183
+ uri: 'https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?w=800&q=80',
184
+ }}
185
+ />
186
+ }
172
187
  description="Featured content with mobile rose heading"
173
188
  />
174
189
  <HighlightBanner
175
190
  {...args}
176
191
  heading="Highlight Yellow"
177
192
  headingColor="highlight"
178
- image={{
179
- source: {
180
- uri: 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?w=800&q=80',
181
- },
182
- }}
193
+ image={
194
+ <HighlightBannerImage
195
+ source={{
196
+ uri: 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?w=800&q=80',
197
+ }}
198
+ />
199
+ }
183
200
  description="Featured content with highlight yellow heading"
184
201
  />
185
202
  </Flex>
@@ -226,11 +243,13 @@ export const DifferentImages: Story = {
226
243
  {...args}
227
244
  heading="Nature Landscape"
228
245
  headingColor="broadband"
229
- image={{
230
- source: {
231
- uri: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&q=80',
232
- },
233
- }}
246
+ image={
247
+ <HighlightBannerImage
248
+ source={{
249
+ uri: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&q=80',
250
+ }}
251
+ />
252
+ }
234
253
  description="Beautiful mountain landscape with clear blue sky"
235
254
  link={<Link onPress={() => console.log('pressed')}>View gallery</Link>}
236
255
  />
@@ -240,11 +259,13 @@ export const DifferentImages: Story = {
240
259
  {...args}
241
260
  heading="Urban Architecture"
242
261
  headingColor="highlight"
243
- image={{
244
- source: {
245
- uri: 'https://images.unsplash.com/photo-1480714378408-67cf0d13bc1b?w=800&q=80',
246
- },
247
- }}
262
+ image={
263
+ <HighlightBannerImage
264
+ source={{
265
+ uri: 'https://images.unsplash.com/photo-1480714378408-67cf0d13bc1b?w=800&q=80',
266
+ }}
267
+ />
268
+ }
248
269
  description="Modern city buildings and urban design"
249
270
  button={<Button onPress={() => console.log('pressed')}>Explore Cities</Button>}
250
271
  />
@@ -254,11 +275,13 @@ export const DifferentImages: Story = {
254
275
  {...args}
255
276
  heading="Ocean Waves"
256
277
  headingColor="energy"
257
- image={{
258
- source: {
259
- uri: 'https://images.unsplash.com/photo-1505142468610-359e7d316be0?w=800&q=80',
260
- },
261
- }}
278
+ image={
279
+ <HighlightBannerImage
280
+ source={{
281
+ uri: 'https://images.unsplash.com/photo-1505142468610-359e7d316be0?w=800&q=80',
282
+ }}
283
+ />
284
+ }
262
285
  description="Stunning ocean views and coastal beauty"
263
286
  />
264
287
  </View>
@@ -275,11 +298,13 @@ export const LongContent: Story = {
275
298
  {...args}
276
299
  heading="Extended Information Card"
277
300
  headingColor="energy"
278
- image={{
279
- source: {
280
- uri: 'https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=800&q=80',
281
- },
282
- }}
301
+ image={
302
+ <HighlightBannerImage
303
+ source={{
304
+ uri: 'https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=800&q=80',
305
+ }}
306
+ />
307
+ }
283
308
  description="This is a much longer description that demonstrates how the component handles extended text content. It includes multiple sentences and provides more detailed information about the featured content, ensuring the layout remains clean and readable even with more text."
284
309
  button={<Button onPress={() => console.log('pressed')}>Read Full Article</Button>}
285
310
  />
@@ -1,4 +1,4 @@
1
- import { Image, View } from 'react-native';
1
+ import { View } from 'react-native';
2
2
  import { StyleSheet } from 'react-native-unistyles';
3
3
  import { BodyText } from '../BodyText';
4
4
  import { Card } from '../Card';
@@ -26,11 +26,7 @@ const HighlightBanner = ({
26
26
  {heading}
27
27
  </BodyText>
28
28
  </View>
29
- {!!image && (
30
- <View style={styles.imageContainer(imageContainerHeight)}>
31
- <Image resizeMode="cover" {...image} style={[styles.image, image?.style]} />
32
- </View>
33
- )}
29
+ {!!image && <View style={styles.imageContainer(imageContainerHeight)}>{image}</View>}
34
30
  <View style={styles.footer}>
35
31
  <BodyText size="md" textAlign="center">
36
32
  {description}
@@ -99,10 +95,7 @@ const styles = StyleSheet.create(theme => ({
99
95
  width: '100%',
100
96
  height,
101
97
  }),
102
- image: {
103
- width: '100%',
104
- height: '100%',
105
- },
98
+
106
99
  footer: {
107
100
  padding: theme.components.banner.highlight.padding,
108
101
  gap: theme.components.banner.highlight.content.gap,
@@ -0,0 +1,20 @@
1
+ import { Image, ImageProps } from 'react-native';
2
+ import { StyleSheet } from 'react-native-unistyles';
3
+ import { isThemedImageProps } from '../../utils';
4
+ import { ThemedImage, ThemedImageProps } from '../ThemedImage';
5
+
6
+ const HighlightBannerImage = (props: ImageProps | ThemedImageProps) => {
7
+ if (isThemedImageProps(props)) {
8
+ return <ThemedImage {...props} style={[styles.image, props.style]} />;
9
+ }
10
+ return <Image resizeMode="cover" {...props} style={[styles.image, props.style]} />;
11
+ };
12
+
13
+ const styles = StyleSheet.create({
14
+ image: {
15
+ width: '100%',
16
+ height: '100%',
17
+ },
18
+ });
19
+
20
+ export default HighlightBannerImage;
@@ -1,2 +1,3 @@
1
1
  export { default as HighlightBanner } from './HighlightBanner';
2
2
  export type { default as HighlightBannerProps } from './HighlightBanner.props';
3
+ export { default as HighlightBannerImage } from './HighlightBannerImage';
@@ -1,161 +1,55 @@
1
- //
2
- // import { IconButton } from './';
3
- // import figma from '@figma/code-connect';
4
-
5
- // const props = {
6
- // iconxsmall: figma.instance('icon x-small'),
7
- // icon: figma.instance('icon'),
8
- // colorScheme: figma.enum('colorScheme', {
9
- // cyan: 'cyan',
10
- // red: 'red',
11
- // green: 'green',
12
- // gold: 'gold',
13
- // grey: 'functional',
14
- // }),
15
- // size: figma.enum('size', {
16
- // 'medium - 48': 'medium',
17
- // 'small - 32': 'small',
18
- // 'x-small - 24': 'x-small',
19
- // }),
20
- // disabled: figma.enum('state', {
21
- // disabled: true,
22
- // }),
23
- // loading: figma.enum('state', {
24
- // loading: true,
25
- // }),
26
- // inverted: figma.boolean('inverted'),
27
- // };
28
-
29
- // // Solid Button
30
- // figma.connect(
31
- // IconButton,
32
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6678-6454&m=dev',
33
- // {
34
- // props,
35
-
36
- // example: ({ inverted, icon, colorScheme, size, disabled, loading }) => (
37
- // <IconButton
38
- // variant="solid"
39
- // colorScheme={colorScheme}
40
- // size={size}
41
- // onPress={() => console.log('buttonPressed')}
42
- // disabled={disabled}
43
- // icon={icon}
44
- // loading={loading}
45
- // inverted={inverted}
46
- // />
47
- // ),
48
- // }
49
- // );
50
-
51
- // figma.connect(
52
- // IconButton,
53
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6678-6454&m=dev',
54
- // {
55
- // props,
56
- // variant: {
57
- // size: 'x-small - 24',
58
- // },
59
- // example: ({ inverted, iconxsmall, colorScheme, size, disabled, loading }) => (
60
- // <IconButton
61
- // variant="solid"
62
- // colorScheme={colorScheme}
63
- // size={size}
64
- // onPress={() => console.log('buttonPressed')}
65
- // disabled={disabled}
66
- // icon={iconxsmall}
67
- // loading={loading}
68
- // inverted={inverted}
69
- // />
70
- // ),
71
- // }
72
- // );
73
-
74
- // // Outline Button
75
-
76
- // figma.connect(
77
- // IconButton,
78
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6679-7713&m=dev',
79
- // {
80
- // props,
81
- // example: ({ inverted, icon, colorScheme, size, disabled, loading }) => (
82
- // <IconButton
83
- // variant="outline"
84
- // colorScheme={colorScheme}
85
- // size={size}
86
- // onPress={() => console.log('buttonPressed')}
87
- // disabled={disabled}
88
- // icon={icon}
89
- // loading={loading}
90
- // inverted={inverted}
91
- // />
92
- // ),
93
- // }
94
- // );
95
-
96
- // figma.connect(
97
- // IconButton,
98
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6679-7713&m=dev',
99
- // {
100
- // props,
101
- // variant: {
102
- // size: 'x-small - 24',
103
- // },
104
- // example: ({ inverted, iconxsmall, colorScheme, size, disabled, loading }) => (
105
- // <IconButton
106
- // variant="outline"
107
- // colorScheme={colorScheme}
108
- // size={size}
109
- // onPress={() => console.log('buttonPressed')}
110
- // disabled={disabled}
111
- // icon={iconxsmall}
112
- // loading={loading}
113
- // inverted={inverted}
114
- // />
115
- // ),
116
- // }
117
- // );
118
-
119
- // // Ghost Button
120
- // figma.connect(
121
- // IconButton,
122
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6682-8623&m=dev',
123
- // {
124
- // props,
125
- // example: ({ inverted, icon, colorScheme, size, disabled, loading }) => (
126
- // <IconButton
127
- // variant="ghost"
128
- // colorScheme={colorScheme}
129
- // size={size}
130
- // onPress={() => console.log('buttonPressed')}
131
- // disabled={disabled}
132
- // icon={icon}
133
- // loading={loading}
134
- // inverted={inverted}
135
- // />
136
- // ),
137
- // }
138
- // );
139
-
140
- // figma.connect(
141
- // IconButton,
142
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6682-8623&m=dev',
143
- // {
144
- // props,
145
- // variant: {
146
- // size: 'x-small - 24',
147
- // },
148
- // example: ({ inverted, iconxsmall, colorScheme, size, disabled, loading }) => (
149
- // <IconButton
150
- // variant="ghost"
151
- // colorScheme={colorScheme}
152
- // size={size}
153
- // onPress={() => console.log('buttonPressed')}
154
- // disabled={disabled}
155
- // icon={iconxsmall}
156
- // loading={loading}
157
- // inverted={inverted}
158
- // />
159
- // ),
160
- // }
161
- // );
1
+ import figma from '@figma/code-connect';
2
+ import IconButton from './IconButton';
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(IconButton, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=90%3A1455', {
12
+ props: {
13
+ // These props were automatically mapped based on your linked code:
14
+ disabled: figma.enum('State', {
15
+ Disabled: true,
16
+ }),
17
+ size: figma.enum('Size', {
18
+ 'SM-32': 'sm',
19
+ 'MD-48': 'md',
20
+ }),
21
+ loading: figma.enum('State', {
22
+ Loading: true,
23
+ }),
24
+ focusable: figma.enum('State', {
25
+ Focus: true,
26
+ }),
27
+ 'aria-disabled': figma.enum('State', {
28
+ Disabled: true,
29
+ }),
30
+ colorScheme: figma.enum('Color Scheme', {
31
+ Affirmative: 'affirmative',
32
+ Destructive: 'destructive',
33
+ }),
34
+ // No matching props could be found for these Figma properties:
35
+ // "icon24": figma.instance('Icon-24'),
36
+ // "icon20": figma.instance('Icon-20'),
37
+ // "variant": figma.enum('Variant', {
38
+ // "Emphasis": "emphasis",
39
+ // "Solid": "solid",
40
+ // "Outline": "outline",
41
+ // "Ghost": "ghost"
42
+ // }),
43
+ // "inverted": figma.boolean('Inverted?')
44
+ },
45
+ example: props => (
46
+ <IconButton
47
+ disabled={props.disabled}
48
+ size={props.size}
49
+ icon={null}
50
+ loading={props.loading}
51
+ focusable={props.focusable}
52
+ colorScheme={props.colorScheme}
53
+ />
54
+ ),
55
+ });
@@ -0,0 +1,50 @@
1
+ import figma from '@figma/code-connect';
2
+ import IconContainer from './IconContainer';
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
+ IconContainer,
13
+ 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=5462%3A9728',
14
+ {
15
+ props: {
16
+ // These props were automatically mapped based on your linked code:
17
+ size: figma.enum('Size', {
18
+ 'SM-32': 'sm',
19
+ 'MD-48': 'md',
20
+ 'LG-64': 'lg',
21
+ }),
22
+ radiusNone: figma.boolean('Radius None?'),
23
+ variant: figma.enum('Variant', {
24
+ Subtle: 'subtle',
25
+ Emphasis: 'emphasis',
26
+ }),
27
+ color: figma.enum('Color', {
28
+ Pig: 'pig',
29
+ Energy: 'energy',
30
+ Broadband: 'broadband',
31
+ Mobile: 'mobile',
32
+ Insurance: 'insurance',
33
+ Cashback: 'cashback',
34
+ Highlight: 'highlight',
35
+ }),
36
+ // No matching props could be found for these Figma properties:
37
+ // "icon20": figma.instance('Icon-20'),
38
+ // "icon24": figma.instance('Icon-24')
39
+ },
40
+ example: props => (
41
+ <IconContainer
42
+ icon={null}
43
+ size={props.size}
44
+ radiusNone={props.radiusNone}
45
+ variant={props.variant}
46
+ color={props.color}
47
+ />
48
+ ),
49
+ }
50
+ );
@@ -0,0 +1,33 @@
1
+ import React from "react"
2
+ import InlineLink from "./InlineLink"
3
+ import figma from "@figma/code-connect"
4
+
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
+ */
11
+
12
+ figma.connect(
13
+ InlineLink,
14
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=7051%3A25641",
15
+ {
16
+ props: {
17
+ // These props were automatically mapped based on your linked code:
18
+ inverted: figma.boolean("Inverted?"),
19
+ disabled: figma.enum("State", {
20
+ Active: true,
21
+ }),
22
+ // No matching props could be found for these Figma properties:
23
+ // "iconLeft": figma.boolean('Icon left?'),
24
+ // "iconRight": figma.boolean('Icon right?'),
25
+ // "iconRight": figma.instance('Icon Right'),
26
+ // "iconLeft": figma.instance('Icon Left'),
27
+ // "text": figma.string('Text')
28
+ },
29
+ example: (props) => (
30
+ <InlineLink inverted={props.inverted} disabled={props.disabled} />
31
+ ),
32
+ },
33
+ )