@utilitywarehouse/hearth-react-native 0.35.7 → 0.35.9

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 (203) hide show
  1. package/SKILL.md +129 -3
  2. package/build/components/Accordion/Accordion.figma.d.ts +15 -0
  3. package/build/components/Accordion/Accordion.figma.js +20 -0
  4. package/build/components/Accordion/AccordionItem.figma.d.ts +17 -0
  5. package/build/components/Accordion/AccordionItem.figma.js +26 -0
  6. package/build/components/Accordion/AccordionTrigger.js +1 -1
  7. package/build/components/Alert/Alert.figma.d.ts +33 -0
  8. package/build/components/Alert/Alert.figma.js +40 -0
  9. package/build/components/Avatar/Avatar.figma.d.ts +16 -0
  10. package/build/components/Avatar/Avatar.figma.js +29 -0
  11. package/build/components/Badge/Badge.figma.d.ts +21 -0
  12. package/build/components/Badge/Badge.figma.js +47 -0
  13. package/build/components/Banner/Banner.figma.d.ts +26 -0
  14. package/build/components/Banner/Banner.figma.js +47 -0
  15. package/build/components/Banner/BannerIllustration.figma.d.ts +11 -0
  16. package/build/components/Banner/BannerIllustration.figma.js +13 -0
  17. package/build/components/BottomSheet/BottomSheetModal.figma.d.ts +11 -0
  18. package/build/components/BottomSheet/BottomSheetModal.figma.js +11 -0
  19. package/build/components/Button/Button.figma.d.ts +38 -0
  20. package/build/components/Button/Button.figma.js +84 -0
  21. package/build/components/Card/Card.figma.d.ts +16 -0
  22. package/build/components/Card/Card.figma.js +49 -0
  23. package/build/components/Card/CardAction/CardAction.figma.d.ts +35 -0
  24. package/build/components/Card/CardAction/CardAction.figma.js +104 -0
  25. package/build/components/Card/CardAction/CardActionRoot.js +4 -0
  26. package/build/components/Card/CardRoot.js +5 -1
  27. package/build/components/Carousel/Carousel.figma.d.ts +17 -0
  28. package/build/components/Carousel/Carousel.figma.js +18 -0
  29. package/build/components/Checkbox/Checkbox.figma.d.ts +22 -0
  30. package/build/components/Checkbox/Checkbox.figma.js +29 -0
  31. package/build/components/Checkbox/CheckboxGroup.figma.d.ts +26 -0
  32. package/build/components/Checkbox/CheckboxGroup.figma.js +46 -0
  33. package/build/components/Checkbox/CheckboxImage.figma.d.ts +11 -0
  34. package/build/components/Checkbox/CheckboxImage.figma.js +10 -0
  35. package/build/components/Checkbox/CheckboxTileRoot.figma.d.ts +20 -0
  36. package/build/components/Checkbox/CheckboxTileRoot.figma.js +22 -0
  37. package/build/components/Combobox/Combobox.figma.d.ts +23 -0
  38. package/build/components/Combobox/Combobox.figma.js +69 -0
  39. package/build/components/CurrencyInput/CurrencyInput.figma.d.ts +31 -0
  40. package/build/components/CurrencyInput/CurrencyInput.figma.js +51 -0
  41. package/build/components/DateInput/DateInput.figma.d.ts +41 -0
  42. package/build/components/DateInput/DateInput.figma.js +87 -0
  43. package/build/components/DatePicker/DatePicker.figma.d.ts +25 -0
  44. package/build/components/DatePicker/DatePicker.figma.js +23 -0
  45. package/build/components/DatePicker/DatePickerDay.js +3 -3
  46. package/build/components/DatePickerInput/DatePickerInput.figma.d.ts +25 -0
  47. package/build/components/DatePickerInput/DatePickerInput.figma.js +52 -0
  48. package/build/components/DescriptionList/DescriptionList.figma.d.ts +26 -0
  49. package/build/components/DescriptionList/DescriptionList.figma.js +59 -0
  50. package/build/components/DescriptionList/DescriptionListItem.figma.d.ts +22 -0
  51. package/build/components/DescriptionList/DescriptionListItem.figma.js +42 -0
  52. package/build/components/Divider/Divider.figma.d.ts +13 -0
  53. package/build/components/Divider/Divider.figma.js +14 -0
  54. package/build/components/ExpandableCard/ExpandableCard.figma.d.ts +28 -0
  55. package/build/components/ExpandableCard/ExpandableCard.figma.js +52 -0
  56. package/build/components/ExpandableCard/ExpandableCardGroup.figma.d.ts +23 -0
  57. package/build/components/ExpandableCard/ExpandableCardGroup.figma.js +55 -0
  58. package/build/components/ExpandableCard/ExpandableCardTriggerRoot.js +4 -0
  59. package/build/components/FormField/FormField.figma.d.ts +15 -0
  60. package/build/components/FormField/FormField.figma.js +27 -0
  61. package/build/components/Helper/HelperText.figma.d.ts +13 -0
  62. package/build/components/Helper/HelperText.figma.js +12 -0
  63. package/build/components/HighlightBanner/HighlightBanner.figma.d.ts +19 -0
  64. package/build/components/HighlightBanner/HighlightBanner.figma.js +45 -0
  65. package/build/components/IconButton/IconButton.figma.d.ts +22 -0
  66. package/build/components/IconButton/IconButton.figma.js +47 -0
  67. package/build/components/IconContainer/IconContainer.figma.d.ts +20 -0
  68. package/build/components/IconContainer/IconContainer.figma.js +43 -0
  69. package/build/components/IndicatorIconButton/IndicatorIconButton.figma.d.ts +17 -0
  70. package/build/components/IndicatorIconButton/IndicatorIconButton.figma.js +23 -0
  71. package/build/components/InlineLink/InlineLink.d.ts +1 -1
  72. package/build/components/InlineLink/InlineLink.js +7 -2
  73. package/build/components/InlineLink/InlineLink.props.d.ts +2 -0
  74. package/build/components/InlineLink/InlineLinkRoot.d.ts +1 -1
  75. package/build/components/InlineLink/InlineLinkRoot.js +8 -3
  76. package/build/components/Input/Input.figma.d.ts +28 -0
  77. package/build/components/Input/Input.figma.js +67 -0
  78. package/build/components/Input/Input_1.figma.d.ts +22 -0
  79. package/build/components/Input/Input_1.figma.js +54 -0
  80. package/build/components/Input/Input_2.figma.d.ts +17 -0
  81. package/build/components/Input/Input_2.figma.js +34 -0
  82. package/build/components/Label/Label.figma.d.ts +14 -0
  83. package/build/components/Label/Label.figma.js +19 -0
  84. package/build/components/Link/Link.d.ts +1 -1
  85. package/build/components/Link/Link.figma.d.ts +27 -0
  86. package/build/components/Link/Link.figma.js +45 -0
  87. package/build/components/Link/Link.js +7 -2
  88. package/build/components/Link/Link.props.d.ts +2 -0
  89. package/build/components/Link/LinkRoot.d.ts +1 -1
  90. package/build/components/Link/LinkRoot.js +8 -3
  91. package/build/components/List/List.figma.d.ts +21 -0
  92. package/build/components/List/List.figma.js +49 -0
  93. package/build/components/List/ListAction/ListAction.figma.d.ts +15 -0
  94. package/build/components/List/ListAction/ListAction.figma.js +17 -0
  95. package/build/components/List/ListAction/ListAction.js +1 -0
  96. package/build/components/List/ListItem/ListItem.figma.d.ts +33 -0
  97. package/build/components/List/ListItem/ListItem.figma.js +83 -0
  98. package/build/components/List/ListItem/ListItemHelperText.d.ts +1 -1
  99. package/build/components/List/ListItem/ListItemHelperText.js +2 -8
  100. package/build/components/List/ListItem/ListItemLeadingContent.figma.d.ts +14 -0
  101. package/build/components/List/ListItem/ListItemLeadingContent.figma.js +17 -0
  102. package/build/components/List/ListItem/ListItemRoot.js +1 -0
  103. package/build/components/List/ListItem/ListItemTrailingContent.figma.d.ts +13 -0
  104. package/build/components/List/ListItem/ListItemTrailingContent.figma.js +14 -0
  105. package/build/components/Menu/Menu.figma.d.ts +14 -0
  106. package/build/components/Menu/Menu.figma.js +33 -0
  107. package/build/components/Menu/MenuItem.figma.d.ts +29 -0
  108. package/build/components/Menu/MenuItem.figma.js +45 -0
  109. package/build/components/Modal/Modal.figma.d.ts +24 -0
  110. package/build/components/Modal/Modal.figma.js +64 -0
  111. package/build/components/NavModal/NavModal.figma.d.ts +19 -0
  112. package/build/components/NavModal/NavModal.figma.js +42 -0
  113. package/build/components/Pagination/Pagination.figma.d.ts +16 -0
  114. package/build/components/Pagination/Pagination.figma.js +20 -0
  115. package/build/components/PillGroup/Pill.figma.d.ts +17 -0
  116. package/build/components/PillGroup/Pill.figma.js +21 -0
  117. package/build/components/PillGroup/PillGroup.figma.d.ts +13 -0
  118. package/build/components/PillGroup/PillGroup.figma.js +18 -0
  119. package/build/components/ProgressBar/ProgressBar.circular.figma.d.ts +16 -0
  120. package/build/components/ProgressBar/ProgressBar.circular.figma.js +35 -0
  121. package/build/components/ProgressBar/ProgressBar.figma.d.ts +15 -0
  122. package/build/components/ProgressBar/ProgressBar.figma.js +31 -0
  123. package/build/components/ProgressStepper/ProgressStep.figma.d.ts +15 -0
  124. package/build/components/ProgressStepper/ProgressStep.figma.js +17 -0
  125. package/build/components/ProgressStepper/ProgressStepper.figma.d.ts +13 -0
  126. package/build/components/ProgressStepper/ProgressStepper.figma.js +14 -0
  127. package/build/components/Radio/Radio.figma.d.ts +15 -0
  128. package/build/components/Radio/Radio.figma.js +17 -0
  129. package/build/components/Radio/RadioGroup.figma.d.ts +19 -0
  130. package/build/components/Radio/RadioGroup.figma.js +45 -0
  131. package/build/components/Radio/RadioImage.figma.d.ts +11 -0
  132. package/build/components/Radio/RadioImage.figma.js +10 -0
  133. package/build/components/Radio/RadioTile.figma.d.ts +16 -0
  134. package/build/components/Radio/RadioTile.figma.js +23 -0
  135. package/build/components/RadioCard/RadioCard.figma.d.ts +16 -0
  136. package/build/components/RadioCard/RadioCard.figma.js +22 -0
  137. package/build/components/RadioCard/RadioCardIndicator.js +0 -3
  138. package/build/components/RadioCard/RadioCardRoot.js +3 -3
  139. package/build/components/Rating/Rating.figma.d.ts +12 -0
  140. package/build/components/Rating/Rating.figma.js +18 -0
  141. package/build/components/Roundel/Roundel.figma.d.ts +13 -0
  142. package/build/components/Roundel/Roundel.figma.js +15 -0
  143. package/build/components/SectionHeader/SectionHeader.figma.d.ts +21 -0
  144. package/build/components/SectionHeader/SectionHeader.figma.js +50 -0
  145. package/build/components/SegmentedControl/SegmentedControl.figma.d.ts +16 -0
  146. package/build/components/SegmentedControl/SegmentedControl.figma.js +20 -0
  147. package/build/components/SegmentedControl/SegmentedControlOption.figma.d.ts +17 -0
  148. package/build/components/SegmentedControl/SegmentedControlOption.figma.js +23 -0
  149. package/build/components/SegmentedControl/SegmentedControlOption.js +3 -0
  150. package/build/components/Select/Select.figma.d.ts +24 -0
  151. package/build/components/Select/Select.figma.js +65 -0
  152. package/build/components/Select/SelectOption.figma.d.ts +15 -0
  153. package/build/components/Select/SelectOption.figma.js +27 -0
  154. package/build/components/Spinner/Spinner.figma.d.ts +13 -0
  155. package/build/components/Spinner/Spinner.figma.js +16 -0
  156. package/build/components/Spinner/Spinner.js +1 -1
  157. package/build/components/Spinner/Spinner.web.js +1 -1
  158. package/build/components/StepperInput/StepperInput.figma.d.ts +25 -0
  159. package/build/components/StepperInput/StepperInput.figma.js +32 -0
  160. package/build/components/Switch/Switch.figma.d.ts +15 -0
  161. package/build/components/Switch/Switch.figma.js +18 -0
  162. package/build/components/Switch/Switch.js +25 -1
  163. package/build/components/Switch/Switch.web.js +25 -1
  164. package/build/components/Table/Table.figma.d.ts +14 -0
  165. package/build/components/Table/Table.figma.js +38 -0
  166. package/build/components/Table/TableHeaderCell.figma.d.ts +15 -0
  167. package/build/components/Table/TableHeaderCell.figma.js +31 -0
  168. package/build/components/Tabs/Tab.figma.d.ts +14 -0
  169. package/build/components/Tabs/Tab.figma.js +14 -0
  170. package/build/components/Tabs/Tab.js +6 -6
  171. package/build/components/Tabs/Tabs.figma.d.ts +14 -0
  172. package/build/components/Tabs/Tabs.figma.js +21 -0
  173. package/build/components/Textarea/Textarea.figma.d.ts +27 -0
  174. package/build/components/Textarea/Textarea.figma.js +53 -0
  175. package/build/components/TimePicker/TimePicker.figma.d.ts +16 -0
  176. package/build/components/TimePicker/TimePicker.figma.js +30 -0
  177. package/build/components/TimePickerInput/TimePickerInput.figma.d.ts +29 -0
  178. package/build/components/TimePickerInput/TimePickerInput.figma.js +53 -0
  179. package/build/components/Timeline/Timeline.figma.d.ts +14 -0
  180. package/build/components/Timeline/Timeline.figma.js +23 -0
  181. package/build/components/Timeline/TimelineItemProgress.figma.d.ts +16 -0
  182. package/build/components/Timeline/TimelineItemProgress.figma.js +30 -0
  183. package/build/components/Timeline/TimelineItemStatic.figma.d.ts +16 -0
  184. package/build/components/Timeline/TimelineItemStatic.figma.js +30 -0
  185. package/build/components/Toast/ToastItem.figma.d.ts +20 -0
  186. package/build/components/Toast/ToastItem.figma.js +42 -0
  187. package/build/components/ToggleButton/ToggleButtonRoot.js +1 -1
  188. package/build/components/ToggleButtonCard/ToggleButtonCard.figma.d.ts +14 -0
  189. package/build/components/ToggleButtonCard/ToggleButtonCard.figma.js +28 -0
  190. package/build/components/ToggleButtonCard/ToggleButtonCardRoot.js +16 -8
  191. package/build/components/UnstyledIconButton/UnstyledIconButton.figma.d.ts +21 -0
  192. package/build/components/UnstyledIconButton/UnstyledIconButton.figma.js +32 -0
  193. package/build/components/UnstyledIconButton/UnstyledIconButtonRoot.js +1 -1
  194. package/build/components/VerificationInput/VerificationInput.figma.d.ts +19 -0
  195. package/build/components/VerificationInput/VerificationInput.figma.js +22 -0
  196. package/build/components/index.d.ts +1 -0
  197. package/build/components/index.js +1 -0
  198. package/build/core/themes.d.ts +16 -16
  199. package/package.json +5 -4
  200. package/public/llms/components/list.md +6 -11
  201. package/public/llms/docs/{ai-tooling.md → ai-toolkit.md} +29 -7
  202. package/public/llms/docs/introduction.md +1 -1
  203. package/public/llms.txt +1 -1
@@ -0,0 +1,55 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=7222-7221&m=dev
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/ExpandableCard/ExpandableCardGroup.tsx
3
+ // component=ExpandableCardGroup
4
+ import figma from 'figma';
5
+ const sectionHeader = figma.selectedInstance.getBoolean('Section header?', {
6
+ true: (function () {
7
+ const nestedLayer0 = figma.selectedInstance.findInstance('Section Header');
8
+ return {
9
+ heading: nestedLayer0.type !== 'ERROR' ? nestedLayer0.getString('Heading') : undefined,
10
+ helperText: nestedLayer0.type !== 'ERROR'
11
+ ? nestedLayer0.getBoolean('Helper text?', {
12
+ true: nestedLayer0.getString('Helper text'),
13
+ })
14
+ : undefined,
15
+ trailingContent: nestedLayer0.type !== 'ERROR'
16
+ ? nestedLayer0.getBoolean('Trailing content?', {
17
+ true: (function () {
18
+ const nestedLayer1 = figma.selectedInstance.findInstance('Trailing content');
19
+ return {
20
+ headerTrailingContent: nestedLayer1.type !== 'ERROR'
21
+ ? nestedLayer1.getInstanceSwap('Variant')?.executeTemplate().example
22
+ : undefined,
23
+ };
24
+ })(),
25
+ })
26
+ : undefined,
27
+ invalidText: nestedLayer0.type !== 'ERROR'
28
+ ? nestedLayer0.getEnum('State', {
29
+ Invalid: (function () {
30
+ const nestedLayer2 = figma.selectedInstance.findInstance('Validation Text');
31
+ return {
32
+ invalidText: nestedLayer2.type !== 'ERROR' ? nestedLayer2.getString('Text') : undefined,
33
+ };
34
+ })(),
35
+ })
36
+ : undefined,
37
+ };
38
+ })(),
39
+ });
40
+ const cardLayers = figma.selectedInstance.findConnectedInstances(n => n.hasCodeConnect());
41
+ const cards = cardLayers.map(layer => layer.executeTemplate().example) ?? [];
42
+ export default {
43
+ id: 'ExpandableCardGroup',
44
+ imports: ["import { ExpandableCardGroup } from '@utilitywarehouse/hearth-react-native';"],
45
+ example: figma.code `<ExpandableCardGroup${figma.helpers.react.renderProp('heading', sectionHeader?.heading)}${figma.helpers.react.renderProp('helperText', sectionHeader?.helperText)}${figma.helpers.react.renderProp('headerTrailingContent', sectionHeader?.trailingContent?.headerTrailingContent)}${figma.helpers.react.renderProp('invalidText', sectionHeader?.invalidText?.invalidText)}>
46
+ ${figma.helpers.react.renderChildren(cards.flat())}
47
+ </ExpandableCardGroup>`,
48
+ metadata: {
49
+ nestable: true,
50
+ props: {
51
+ sectionHeader,
52
+ cards,
53
+ },
54
+ },
55
+ };
@@ -56,6 +56,10 @@ const styles = StyleSheet.create(theme => ({
56
56
  },
57
57
  false: {
58
58
  _web: {
59
+ '_focus-visible': {
60
+ ...theme.helpers.focusVisible,
61
+ outlineOffset: -theme.space[100],
62
+ },
59
63
  _hover: {
60
64
  backgroundColor: theme.color.interactive.neutral.surface.subtle.hover,
61
65
  },
@@ -0,0 +1,15 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ metadata: {
7
+ nestable: boolean;
8
+ props: {
9
+ label: any;
10
+ required: boolean;
11
+ helperText: any;
12
+ };
13
+ };
14
+ };
15
+ export default _default;
@@ -0,0 +1,27 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=8364%3A1546
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/FormField/FormField.tsx
3
+ // component=FormField
4
+ import figma from 'figma';
5
+ const instance = figma.selectedInstance;
6
+ const labelInstance = instance.findInstance('Label');
7
+ // @ts-expect-error - findInstance returns ErrorHandle | InstanceHandle, but we know it will be InstanceHandle in practice
8
+ const label = labelInstance?.getString('Label');
9
+ // @ts-expect-error - findInstance returns ErrorHandle | InstanceHandle, but we know it will be InstanceHandle in practice
10
+ const required = !labelInstance?.getBoolean('Optional?');
11
+ const showHelperText = instance.getBoolean('Helper text?');
12
+ const helperTextInstance = instance.findInstance('Helper Text');
13
+ // @ts-expect-error - findInstance returns ErrorHandle | InstanceHandle, but we know it will be InstanceHandle in practice
14
+ const helperText = showHelperText ? helperTextInstance?.getString('Helper text') : undefined;
15
+ export default {
16
+ id: 'formfield',
17
+ imports: ['import { FormField } from "@utilitywarehouse/hearth-react-native";'],
18
+ example: figma.code `<FormField${figma.helpers.react.renderProp('label', label)}${figma.helpers.react.renderProp('required', required)}${figma.helpers.react.renderProp('helperText', helperText)} />`,
19
+ metadata: {
20
+ nestable: true,
21
+ props: {
22
+ label,
23
+ required,
24
+ helperText,
25
+ },
26
+ },
27
+ };
@@ -0,0 +1,13 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ metadata: {
7
+ nestable: boolean;
8
+ props: {
9
+ helperText: string;
10
+ };
11
+ };
12
+ };
13
+ export default _default;
@@ -0,0 +1,12 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=8364%3A1538
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Helper/HelperText.tsx
3
+ // component=HelperText
4
+ import figma from 'figma';
5
+ const instance = figma.selectedInstance;
6
+ const helperText = instance.getString('Helper text');
7
+ export default {
8
+ id: 'helper-text',
9
+ imports: ['import { HelperText } from "@utilitywarehouse/hearth-react-native";'],
10
+ example: figma.code `<HelperText>${figma.helpers.react.renderChildren(helperText)}</HelperText>`,
11
+ metadata: { nestable: true, props: { helperText } },
12
+ };
@@ -0,0 +1,19 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ metadata: {
7
+ nestable: boolean;
8
+ props: {
9
+ heading: string;
10
+ description: string;
11
+ showImage: boolean;
12
+ image: string | figma.ResultSection[];
13
+ headingColor: string | undefined;
14
+ link: figma.ResultSection[] | undefined;
15
+ button: figma.ResultSection[] | undefined;
16
+ };
17
+ };
18
+ };
19
+ export default _default;
@@ -0,0 +1,45 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=8306-4665&t=3uUSBVdxldgG5uz3-4
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/HighlightBanner/HighlightBanner.tsx
3
+ // component=HighlightBanner
4
+ import figma from 'figma';
5
+ const heading = figma.selectedInstance.getString('Heading');
6
+ const description = figma.selectedInstance.getString('Description');
7
+ const showImage = figma.selectedInstance.getBoolean('Image?');
8
+ const imageSlot = figma.selectedInstance.getSlot('Image');
9
+ const image = showImage && imageSlot?.connectedInstances[0]
10
+ ? imageSlot.connectedInstances[0].executeTemplate().example
11
+ : '';
12
+ const headingColor = figma.selectedInstance.getEnum('Heading color', {
13
+ Highlight: 'highlight',
14
+ Pig: 'pig',
15
+ Energy: 'energy',
16
+ Broadband: 'broadband',
17
+ Insurance: 'insurance',
18
+ Cashback: 'cashback',
19
+ Mobile: 'mobile',
20
+ });
21
+ const showLink = figma.selectedInstance.getBoolean('Link?');
22
+ const linkInstance = figma.selectedInstance.findInstance('Link');
23
+ const link = showLink && linkInstance.type !== 'ERROR' ? linkInstance.executeTemplate().example : undefined;
24
+ const showButton = figma.selectedInstance.getBoolean('Button?');
25
+ const buttonInstance = figma.selectedInstance.findInstance('Button');
26
+ const button = showButton && buttonInstance.type !== 'ERROR'
27
+ ? buttonInstance.executeTemplate().example
28
+ : undefined;
29
+ export default {
30
+ id: 'HighlightBanner',
31
+ imports: ["import { HighlightBanner } from '@utilitywarehouse/hearth-react-native';"],
32
+ example: figma.code `<HighlightBanner${figma.helpers.react.renderProp('heading', heading)}${figma.helpers.react.renderProp('description', description)}${figma.helpers.react.renderProp('image', image)}${figma.helpers.react.renderProp('headingColor', headingColor)}${figma.helpers.react.renderProp('link', link)}${figma.helpers.react.renderProp('button', button)} />`,
33
+ metadata: {
34
+ nestable: true,
35
+ props: {
36
+ heading,
37
+ description,
38
+ showImage,
39
+ image,
40
+ headingColor,
41
+ link,
42
+ button,
43
+ },
44
+ },
45
+ };
@@ -0,0 +1,22 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ metadata: {
7
+ nestable: boolean;
8
+ props: {
9
+ disabled: boolean | undefined;
10
+ size: string | undefined;
11
+ colorScheme: string | undefined;
12
+ loading: boolean | undefined;
13
+ icon: {
14
+ $value: string;
15
+ $type: "react-component";
16
+ } | undefined;
17
+ variant: string | undefined;
18
+ inverted: boolean;
19
+ };
20
+ };
21
+ };
22
+ export default _default;
@@ -0,0 +1,47 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=90%3A1455
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/IconButton/IconButton.tsx
3
+ // component=IconButton
4
+ import figma from 'figma';
5
+ const disabled = figma.selectedInstance.getEnum('State', {
6
+ Disabled: true,
7
+ });
8
+ const size = figma.selectedInstance.getEnum('Size', {
9
+ 'SM-32': 'sm',
10
+ 'MD-48': 'md',
11
+ });
12
+ const colorScheme = figma.selectedInstance.getEnum('Color Scheme', {
13
+ Affirmative: 'affirmative',
14
+ Destructive: 'destructive',
15
+ Functional: 'functional',
16
+ Highlight: 'highlight',
17
+ });
18
+ const loading = figma.selectedInstance.getEnum('State', {
19
+ Loading: true,
20
+ });
21
+ const iconName = (size === 'sm'
22
+ ? figma.selectedInstance.getInstanceSwap('Icon-20')?.executeTemplate().metadata?.props
23
+ ?.componentName
24
+ : figma.selectedInstance.getInstanceSwap('Icon-24')?.executeTemplate().metadata?.props
25
+ ?.componentName);
26
+ const icon = iconName ? figma.helpers.react.reactComponent(iconName) : undefined;
27
+ const variant = figma.selectedInstance.getEnum('Variant', {
28
+ Emphasis: 'emphasis',
29
+ Solid: 'solid',
30
+ Outline: 'outline',
31
+ Ghost: 'ghost',
32
+ });
33
+ const inverted = figma.selectedInstance.getBoolean('Inverted?');
34
+ export default {
35
+ id: 'IconButton',
36
+ imports: [
37
+ "import { IconButton } from '@utilitywarehouse/hearth-react-native';",
38
+ ...(iconName
39
+ ? [`import { ${iconName} } from '@utilitywarehouse/hearth-react-native-icons';`]
40
+ : []),
41
+ ],
42
+ example: figma.code `<IconButton${figma.helpers.react.renderProp('disabled', disabled)}${figma.helpers.react.renderProp('size', size)}${figma.helpers.react.renderProp('variant', variant)}${figma.helpers.react.renderProp('inverted', inverted)}${figma.helpers.react.renderProp('colorScheme', colorScheme)}${figma.helpers.react.renderProp('loading', loading)}${figma.helpers.react.renderProp('icon', icon)}/>`,
43
+ metadata: {
44
+ nestable: true,
45
+ props: { disabled, size, colorScheme, loading, icon, variant, inverted },
46
+ },
47
+ };
@@ -0,0 +1,20 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ metadata: {
7
+ nestable: boolean;
8
+ props: {
9
+ size: string | undefined;
10
+ radiusNone: boolean;
11
+ variant: string | undefined;
12
+ color: string | undefined;
13
+ icon: {
14
+ $value: string;
15
+ $type: "react-component";
16
+ } | undefined;
17
+ };
18
+ };
19
+ };
20
+ export default _default;
@@ -0,0 +1,43 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=5462%3A9728
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/IconContainer/IconContainer.tsx
3
+ // component=IconContainer
4
+ import figma from 'figma';
5
+ const size = figma.selectedInstance.getEnum('Size', {
6
+ 'SM-32': 'sm',
7
+ 'MD-48': 'md',
8
+ 'LG-64': 'lg',
9
+ });
10
+ const radiusNone = figma.selectedInstance.getBoolean('Radius None?');
11
+ const variant = figma.selectedInstance.getEnum('Variant', {
12
+ Subtle: 'subtle',
13
+ Emphasis: 'emphasis',
14
+ });
15
+ const color = figma.selectedInstance.getEnum('Color', {
16
+ Pig: 'pig',
17
+ Energy: 'energy',
18
+ Broadband: 'broadband',
19
+ Mobile: 'mobile',
20
+ Insurance: 'insurance',
21
+ Cashback: 'cashback',
22
+ Highlight: 'highlight',
23
+ });
24
+ const iconName = (size === 'sm'
25
+ ? figma.selectedInstance.getInstanceSwap('Icon-20')?.executeTemplate().metadata?.props
26
+ ?.componentName
27
+ : figma.selectedInstance.getInstanceSwap('Icon-24')?.executeTemplate().metadata?.props
28
+ ?.componentName);
29
+ const icon = iconName ? figma.helpers.react.reactComponent(iconName) : undefined;
30
+ export default {
31
+ id: 'icon-container',
32
+ imports: [
33
+ "import { IconContainer } from '@utilitywarehouse/hearth-react-native';",
34
+ ...(iconName
35
+ ? [`import { ${iconName} } from '@utilitywarehouse/hearth-react-native-icons';`]
36
+ : []),
37
+ ],
38
+ example: figma.code `<IconContainer${figma.helpers.react.renderProp('icon', icon)}${figma.helpers.react.renderProp('size', size)}${figma.helpers.react.renderProp('radiusNone', radiusNone)}${figma.helpers.react.renderProp('variant', variant)}${figma.helpers.react.renderProp('color', color)}/>`,
39
+ metadata: {
40
+ nestable: true,
41
+ props: { size, radiusNone, variant, color, icon },
42
+ },
43
+ };
@@ -0,0 +1,17 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ metadata: {
7
+ nestable: boolean;
8
+ props: {
9
+ indicator: boolean;
10
+ icon: {
11
+ $value: string;
12
+ $type: "react-component";
13
+ } | undefined;
14
+ };
15
+ };
16
+ };
17
+ export default _default;
@@ -0,0 +1,23 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=6778-10672&t=3uUSBVdxldgG5uz3-4
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/IndicatorIconButton/IndicatorIconButton.tsx
3
+ // component=IndicatorIconButton
4
+ import figma from 'figma';
5
+ const indicator = figma.selectedInstance.getBoolean('Indicator?');
6
+ const iconName = (function () {
7
+ const nestedLayer0 = figma.selectedInstance.findInstance('Icon Button/Unstyled');
8
+ return nestedLayer0.type !== 'ERROR'
9
+ ? nestedLayer0.getInstanceSwap('Icon-24')?.executeTemplate().metadata?.props?.componentName
10
+ : undefined;
11
+ })();
12
+ const icon = iconName ? figma.helpers.react.reactComponent(iconName) : undefined;
13
+ export default {
14
+ id: 'IndicatorIconButton',
15
+ imports: [
16
+ "import { IndicatorIconButton } from '@utilitywarehouse/hearth-react-native';",
17
+ ...(iconName
18
+ ? [`import { ${iconName} } from '@utilitywarehouse/hearth-react-native-icons';`]
19
+ : []),
20
+ ],
21
+ example: figma.code `<IndicatorIconButton${figma.helpers.react.renderProp('icon', icon)}${figma.helpers.react.renderProp('indicator', indicator)} />`,
22
+ metadata: { nestable: true, props: { indicator, icon } },
23
+ };
@@ -1,6 +1,6 @@
1
1
  import type { InlineLinkProps } from './InlineLink.props';
2
2
  declare const InlineLink: {
3
- ({ children, disabled, target, ...props }: InlineLinkProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ children, disabled, target, rel, ...props }: InlineLinkProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  export default InlineLink;
@@ -5,9 +5,14 @@ const InlineLinkComponent = createLink({
5
5
  Root: InlineLinkRoot,
6
6
  Text: () => null,
7
7
  });
8
- const InlineLink = ({ children, disabled = false, target = '_self', ...props }) => {
8
+ const InlineLink = ({ children, disabled = false, target = '_self', rel, ...props }) => {
9
9
  const InlineLinkAny = InlineLinkComponent;
10
- return (_jsx(InlineLinkAny, { ...props, isDisabled: disabled, isExternal: target === '_blank', children: children }));
10
+ // `@gluestack-ui/link`'s `useLink` only ever applies `target`/`rel` via a ref
11
+ // mutation during render, before the ref is attached at commit - it never
12
+ // takes effect. Pass them through explicitly instead; InlineLinkRoot forwards
13
+ // them to the underlying Text as `hrefAttrs`, which is how react-native-web
14
+ // actually applies them to the rendered `<a>`.
15
+ return (_jsx(InlineLinkAny, { ...props, target: target, rel: rel ?? (target === '_blank' ? 'noopener noreferrer' : undefined), isDisabled: disabled, isExternal: target === '_blank', children: children }));
11
16
  };
12
17
  InlineLink.displayName = 'InlineLink';
13
18
  export default InlineLink;
@@ -2,6 +2,8 @@ import { TextProps } from 'react-native';
2
2
  export interface InlineLinkProps extends TextProps {
3
3
  href?: string;
4
4
  target?: '_blank' | '_self' | '_parent' | '_top';
5
+ /** Defaults to `noopener noreferrer` when `target` is `_blank`. */
6
+ rel?: string;
5
7
  inverted?: boolean;
6
8
  disabled?: boolean;
7
9
  }
@@ -1,6 +1,6 @@
1
1
  import InlineLinkProps from './InlineLink.props';
2
2
  declare const InlineLinkRoot: {
3
- ({ children, inverted, states, ...props }: InlineLinkProps & {
3
+ ({ children, inverted, states, target, rel, ...props }: InlineLinkProps & {
4
4
  states?: {
5
5
  active?: boolean;
6
6
  disabled?: boolean;
@@ -1,13 +1,18 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
- import { Text } from 'react-native';
3
+ import { Platform, Text } from 'react-native';
4
4
  import { StyleSheet } from 'react-native-unistyles';
5
5
  import { InlineLinkContext } from './InlineLink.context';
6
- const InlineLinkRoot = ({ children, inverted = false, states, ...props }) => {
6
+ const InlineLinkRoot = ({ children, inverted = false, states, target, rel, ...props }) => {
7
7
  const { active, disabled = false } = states || {};
8
8
  styles.useVariants({ disabled, inverted, active });
9
9
  const value = useMemo(() => ({ inverted, disabled, active }), [inverted, disabled, active]);
10
- return (_jsx(InlineLinkContext.Provider, { value: value, children: _jsx(Text, { ...props, style: [styles.container, props.style], children: children }) }));
10
+ // react-native-web only applies `target`/`rel` to the rendered `<a>` via
11
+ // `hrefAttrs` - passing them as bare props is a no-op. Not typed on
12
+ // `TextProps`, hence the spread rather than a named JSX attribute.
13
+ // Web-only prop, so it's gated to avoid an unknown-prop warning on native.
14
+ const hrefAttrsProp = Platform.OS === 'web' && (target || rel) ? { hrefAttrs: { target, rel } } : {};
15
+ return (_jsx(InlineLinkContext.Provider, { value: value, children: _jsx(Text, { ...props, ...hrefAttrsProp, style: [styles.container, props.style], children: children }) }));
11
16
  };
12
17
  InlineLinkRoot.displayName = 'InlineLinkRoot';
13
18
  const styles = StyleSheet.create(theme => ({
@@ -0,0 +1,28 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ metadata: {
7
+ nestable: boolean;
8
+ props: {
9
+ required: figma.EnumOptionsValues<{
10
+ true: boolean;
11
+ false: boolean;
12
+ }>;
13
+ prefix: string;
14
+ suffix: string;
15
+ disabled: boolean | undefined;
16
+ readonly: boolean | undefined;
17
+ placeholder: string | undefined;
18
+ value: string | undefined;
19
+ label: string;
20
+ labelVariant: string | undefined;
21
+ helperText: string;
22
+ validationStatus: string | undefined;
23
+ invalidText: string | undefined;
24
+ validText: string | undefined;
25
+ };
26
+ };
27
+ };
28
+ export default _default;
@@ -0,0 +1,67 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=2685%3A7021
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Input/Input.tsx
3
+ // component=Input
4
+ import figma from 'figma';
5
+ const required = figma.selectedInstance.getBoolean('Optional?', {
6
+ true: false,
7
+ false: true,
8
+ });
9
+ const prefix = figma.selectedInstance.getBoolean('Prefix?', {
10
+ true: figma.selectedInstance.getString('Prefix'),
11
+ });
12
+ const suffix = figma.selectedInstance.getBoolean('Suffix?', {
13
+ true: figma.selectedInstance.getString('Suffix'),
14
+ });
15
+ const disabled = figma.selectedInstance.getEnum('State', {
16
+ Disabled: true,
17
+ });
18
+ const readonly = figma.selectedInstance.getEnum('State', {
19
+ 'Read-only': true,
20
+ });
21
+ const placeholder = figma.selectedInstance.getEnum('Value type', {
22
+ Placeholder: figma.selectedInstance.getString('Value'),
23
+ });
24
+ const value = figma.selectedInstance.getEnum('Value type', {
25
+ Filled: figma.selectedInstance.getString('Value'),
26
+ });
27
+ const label = figma.selectedInstance.getString('Label');
28
+ const labelVariant = figma.selectedInstance.getEnum('Label variant', {
29
+ Body: 'body',
30
+ Heading: 'heading',
31
+ });
32
+ const helperText = figma.selectedInstance.getBoolean('Helper text?', {
33
+ true: figma.selectedInstance.getString('Helper text'),
34
+ });
35
+ const validationStatus = figma.selectedInstance.getEnum('State', {
36
+ Invalid: 'invalid',
37
+ Valid: 'valid',
38
+ });
39
+ const invalidText = figma.selectedInstance.getEnum('State', {
40
+ Invalid: figma.selectedInstance.getString('Validation'),
41
+ });
42
+ const validText = figma.selectedInstance.getEnum('State', {
43
+ Valid: figma.selectedInstance.getString('Validation'),
44
+ });
45
+ export default {
46
+ id: 'Input',
47
+ imports: ["import { Input } from '@utilitywarehouse/hearth-react-native';"],
48
+ example: figma.code `<Input${figma.helpers.react.renderProp('disabled', disabled)}${figma.helpers.react.renderProp('readonly', readonly)}${figma.helpers.react.renderProp('placeholder', placeholder)}${figma.helpers.react.renderProp('value', value)}${figma.helpers.react.renderProp('label', label)}${figma.helpers.react.renderProp('labelVariant', labelVariant)}${figma.helpers.react.renderProp('helperText', helperText)}${figma.helpers.react.renderProp('required', required)}${figma.helpers.react.renderProp('prefix', prefix)}${figma.helpers.react.renderProp('suffix', suffix)}${figma.helpers.react.renderProp('validationStatus', validationStatus)}${figma.helpers.react.renderProp('invalidText', invalidText)}${figma.helpers.react.renderProp('validText', validText)}/>`,
49
+ metadata: {
50
+ nestable: true,
51
+ props: {
52
+ required,
53
+ prefix,
54
+ suffix,
55
+ disabled,
56
+ readonly,
57
+ placeholder,
58
+ value,
59
+ label,
60
+ labelVariant,
61
+ helperText,
62
+ validationStatus,
63
+ invalidText,
64
+ validText,
65
+ },
66
+ },
67
+ };
@@ -0,0 +1,22 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ metadata: {
7
+ nestable: boolean;
8
+ props: {
9
+ disabled: boolean | undefined;
10
+ readonly: boolean | undefined;
11
+ placeholder: string | undefined;
12
+ value: string | undefined;
13
+ label: string;
14
+ labelVariant: string | undefined;
15
+ helperText: string;
16
+ validationStatus: string | undefined;
17
+ invalidText: string | undefined;
18
+ validText: string | undefined;
19
+ };
20
+ };
21
+ };
22
+ export default _default;
@@ -0,0 +1,54 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=2251-10106&t=3uUSBVdxldgG5uz3-4
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Input/Input.tsx
3
+ // component=Input
4
+ import figma from 'figma';
5
+ const disabled = figma.selectedInstance.getEnum('State', {
6
+ Disabled: true,
7
+ });
8
+ const readonly = figma.selectedInstance.getEnum('State', {
9
+ 'Read-only': true,
10
+ });
11
+ const placeholder = figma.selectedInstance.getEnum('Value type', {
12
+ Placeholder: figma.selectedInstance.getString('Value'),
13
+ });
14
+ const value = figma.selectedInstance.getEnum('Value type', {
15
+ Filled: figma.selectedInstance.getString('Password'),
16
+ });
17
+ const label = figma.selectedInstance.getString('Label');
18
+ const labelVariant = figma.selectedInstance.getEnum('Label variant', {
19
+ Body: 'body',
20
+ Heading: 'heading',
21
+ });
22
+ const helperText = figma.selectedInstance.getBoolean('Helper text?', {
23
+ true: figma.selectedInstance.getString('Helper text'),
24
+ });
25
+ const validationStatus = figma.selectedInstance.getEnum('State', {
26
+ Invalid: 'invalid',
27
+ Valid: 'valid',
28
+ });
29
+ const invalidText = figma.selectedInstance.getEnum('State', {
30
+ Invalid: figma.selectedInstance.getString('Validation'),
31
+ });
32
+ const validText = figma.selectedInstance.getEnum('State', {
33
+ Valid: figma.selectedInstance.getString('Validation'),
34
+ });
35
+ export default {
36
+ id: 'Input',
37
+ imports: ["import { Input } from '@utilitywarehouse/hearth-react-native';"],
38
+ example: figma.code `<Input type="password"${figma.helpers.react.renderProp('disabled', disabled)}${figma.helpers.react.renderProp('readonly', readonly)}${figma.helpers.react.renderProp('placeholder', placeholder)}${figma.helpers.react.renderProp('value', value)}${figma.helpers.react.renderProp('label', label)}${figma.helpers.react.renderProp('labelVariant', labelVariant)}${figma.helpers.react.renderProp('helperText', helperText)}${figma.helpers.react.renderProp('validationStatus', validationStatus)}${figma.helpers.react.renderProp('invalidText', invalidText)}${figma.helpers.react.renderProp('validText', validText)}/>`,
39
+ metadata: {
40
+ nestable: true,
41
+ props: {
42
+ disabled,
43
+ readonly,
44
+ placeholder,
45
+ value,
46
+ label,
47
+ labelVariant,
48
+ helperText,
49
+ validationStatus,
50
+ invalidText,
51
+ validText,
52
+ },
53
+ },
54
+ };
@@ -0,0 +1,17 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ metadata: {
7
+ nestable: boolean;
8
+ props: {
9
+ loading: boolean | undefined;
10
+ placeholder: string | undefined;
11
+ value: string | undefined;
12
+ label: string;
13
+ helperText: string;
14
+ };
15
+ };
16
+ };
17
+ export default _default;