@utilitywarehouse/hearth-react-native 0.35.6 → 0.35.8

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 (187) 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/Alert/Alert.figma.d.ts +33 -0
  7. package/build/components/Alert/Alert.figma.js +40 -0
  8. package/build/components/Avatar/Avatar.figma.d.ts +16 -0
  9. package/build/components/Avatar/Avatar.figma.js +29 -0
  10. package/build/components/Badge/Badge.figma.d.ts +21 -0
  11. package/build/components/Badge/Badge.figma.js +47 -0
  12. package/build/components/Banner/Banner.figma.d.ts +26 -0
  13. package/build/components/Banner/Banner.figma.js +47 -0
  14. package/build/components/Banner/BannerIllustration.figma.d.ts +11 -0
  15. package/build/components/Banner/BannerIllustration.figma.js +13 -0
  16. package/build/components/BottomSheet/BottomSheetModal.figma.d.ts +11 -0
  17. package/build/components/BottomSheet/BottomSheetModal.figma.js +11 -0
  18. package/build/components/Button/Button.figma.d.ts +38 -0
  19. package/build/components/Button/Button.figma.js +84 -0
  20. package/build/components/Card/Card.figma.d.ts +16 -0
  21. package/build/components/Card/Card.figma.js +49 -0
  22. package/build/components/Card/CardAction/CardAction.figma.d.ts +35 -0
  23. package/build/components/Card/CardAction/CardAction.figma.js +104 -0
  24. package/build/components/Carousel/Carousel.figma.d.ts +17 -0
  25. package/build/components/Carousel/Carousel.figma.js +18 -0
  26. package/build/components/Checkbox/Checkbox.figma.d.ts +22 -0
  27. package/build/components/Checkbox/Checkbox.figma.js +29 -0
  28. package/build/components/Checkbox/CheckboxGroup.figma.d.ts +26 -0
  29. package/build/components/Checkbox/CheckboxGroup.figma.js +46 -0
  30. package/build/components/Checkbox/CheckboxImage.figma.d.ts +11 -0
  31. package/build/components/Checkbox/CheckboxImage.figma.js +10 -0
  32. package/build/components/Checkbox/CheckboxTileRoot.figma.d.ts +20 -0
  33. package/build/components/Checkbox/CheckboxTileRoot.figma.js +22 -0
  34. package/build/components/Combobox/Combobox.figma.d.ts +23 -0
  35. package/build/components/Combobox/Combobox.figma.js +69 -0
  36. package/build/components/CurrencyInput/CurrencyInput.figma.d.ts +31 -0
  37. package/build/components/CurrencyInput/CurrencyInput.figma.js +51 -0
  38. package/build/components/DateInput/DateInput.figma.d.ts +41 -0
  39. package/build/components/DateInput/DateInput.figma.js +87 -0
  40. package/build/components/DatePicker/DatePicker.figma.d.ts +25 -0
  41. package/build/components/DatePicker/DatePicker.figma.js +23 -0
  42. package/build/components/DatePickerInput/DatePickerInput.figma.d.ts +25 -0
  43. package/build/components/DatePickerInput/DatePickerInput.figma.js +52 -0
  44. package/build/components/DescriptionList/DescriptionList.figma.d.ts +26 -0
  45. package/build/components/DescriptionList/DescriptionList.figma.js +59 -0
  46. package/build/components/DescriptionList/DescriptionListItem.figma.d.ts +22 -0
  47. package/build/components/DescriptionList/DescriptionListItem.figma.js +42 -0
  48. package/build/components/Divider/Divider.figma.d.ts +13 -0
  49. package/build/components/Divider/Divider.figma.js +14 -0
  50. package/build/components/ExpandableCard/ExpandableCard.figma.d.ts +28 -0
  51. package/build/components/ExpandableCard/ExpandableCard.figma.js +52 -0
  52. package/build/components/ExpandableCard/ExpandableCardGroup.figma.d.ts +23 -0
  53. package/build/components/ExpandableCard/ExpandableCardGroup.figma.js +55 -0
  54. package/build/components/Flex/Flex.props.d.ts +2 -2
  55. package/build/components/FormField/FormField.figma.d.ts +15 -0
  56. package/build/components/FormField/FormField.figma.js +27 -0
  57. package/build/components/Helper/HelperText.figma.d.ts +13 -0
  58. package/build/components/Helper/HelperText.figma.js +12 -0
  59. package/build/components/HighlightBanner/HighlightBanner.figma.d.ts +19 -0
  60. package/build/components/HighlightBanner/HighlightBanner.figma.js +45 -0
  61. package/build/components/IconButton/IconButton.figma.d.ts +22 -0
  62. package/build/components/IconButton/IconButton.figma.js +47 -0
  63. package/build/components/IconContainer/IconContainer.figma.d.ts +20 -0
  64. package/build/components/IconContainer/IconContainer.figma.js +43 -0
  65. package/build/components/IndicatorIconButton/IndicatorIconButton.figma.d.ts +17 -0
  66. package/build/components/IndicatorIconButton/IndicatorIconButton.figma.js +23 -0
  67. package/build/components/InlineLink/InlineLink.d.ts +1 -1
  68. package/build/components/InlineLink/InlineLink.js +7 -2
  69. package/build/components/InlineLink/InlineLink.props.d.ts +2 -0
  70. package/build/components/InlineLink/InlineLinkRoot.d.ts +1 -1
  71. package/build/components/InlineLink/InlineLinkRoot.js +8 -3
  72. package/build/components/Input/Input.figma.d.ts +28 -0
  73. package/build/components/Input/Input.figma.js +67 -0
  74. package/build/components/Input/Input_1.figma.d.ts +22 -0
  75. package/build/components/Input/Input_1.figma.js +54 -0
  76. package/build/components/Input/Input_2.figma.d.ts +17 -0
  77. package/build/components/Input/Input_2.figma.js +34 -0
  78. package/build/components/Label/Label.figma.d.ts +14 -0
  79. package/build/components/Label/Label.figma.js +19 -0
  80. package/build/components/Link/Link.d.ts +1 -1
  81. package/build/components/Link/Link.figma.d.ts +27 -0
  82. package/build/components/Link/Link.figma.js +45 -0
  83. package/build/components/Link/Link.js +7 -2
  84. package/build/components/Link/Link.props.d.ts +2 -0
  85. package/build/components/Link/LinkRoot.d.ts +1 -1
  86. package/build/components/Link/LinkRoot.js +8 -3
  87. package/build/components/List/List.figma.d.ts +21 -0
  88. package/build/components/List/List.figma.js +49 -0
  89. package/build/components/List/ListAction/ListAction.figma.d.ts +15 -0
  90. package/build/components/List/ListAction/ListAction.figma.js +17 -0
  91. package/build/components/List/ListItem/ListItem.figma.d.ts +33 -0
  92. package/build/components/List/ListItem/ListItem.figma.js +83 -0
  93. package/build/components/List/ListItem/ListItemLeadingContent.figma.d.ts +14 -0
  94. package/build/components/List/ListItem/ListItemLeadingContent.figma.js +17 -0
  95. package/build/components/List/ListItem/ListItemTrailingContent.figma.d.ts +13 -0
  96. package/build/components/List/ListItem/ListItemTrailingContent.figma.js +14 -0
  97. package/build/components/Menu/Menu.figma.d.ts +14 -0
  98. package/build/components/Menu/Menu.figma.js +33 -0
  99. package/build/components/Menu/MenuItem.figma.d.ts +29 -0
  100. package/build/components/Menu/MenuItem.figma.js +45 -0
  101. package/build/components/Modal/Modal.figma.d.ts +24 -0
  102. package/build/components/Modal/Modal.figma.js +64 -0
  103. package/build/components/NavModal/NavModal.figma.d.ts +19 -0
  104. package/build/components/NavModal/NavModal.figma.js +42 -0
  105. package/build/components/Pagination/Pagination.figma.d.ts +16 -0
  106. package/build/components/Pagination/Pagination.figma.js +20 -0
  107. package/build/components/PillGroup/Pill.figma.d.ts +17 -0
  108. package/build/components/PillGroup/Pill.figma.js +21 -0
  109. package/build/components/PillGroup/PillGroup.figma.d.ts +13 -0
  110. package/build/components/PillGroup/PillGroup.figma.js +18 -0
  111. package/build/components/ProgressBar/ProgressBar.circular.figma.d.ts +16 -0
  112. package/build/components/ProgressBar/ProgressBar.circular.figma.js +35 -0
  113. package/build/components/ProgressBar/ProgressBar.figma.d.ts +15 -0
  114. package/build/components/ProgressBar/ProgressBar.figma.js +31 -0
  115. package/build/components/ProgressStepper/ProgressStep.figma.d.ts +15 -0
  116. package/build/components/ProgressStepper/ProgressStep.figma.js +17 -0
  117. package/build/components/ProgressStepper/ProgressStepper.figma.d.ts +13 -0
  118. package/build/components/ProgressStepper/ProgressStepper.figma.js +14 -0
  119. package/build/components/Radio/Radio.figma.d.ts +15 -0
  120. package/build/components/Radio/Radio.figma.js +17 -0
  121. package/build/components/Radio/RadioGroup.figma.d.ts +19 -0
  122. package/build/components/Radio/RadioGroup.figma.js +45 -0
  123. package/build/components/Radio/RadioImage.figma.d.ts +11 -0
  124. package/build/components/Radio/RadioImage.figma.js +10 -0
  125. package/build/components/Radio/RadioTile.figma.d.ts +16 -0
  126. package/build/components/Radio/RadioTile.figma.js +23 -0
  127. package/build/components/RadioCard/RadioCard.figma.d.ts +16 -0
  128. package/build/components/RadioCard/RadioCard.figma.js +22 -0
  129. package/build/components/Rating/Rating.figma.d.ts +12 -0
  130. package/build/components/Rating/Rating.figma.js +18 -0
  131. package/build/components/Roundel/Roundel.figma.d.ts +13 -0
  132. package/build/components/Roundel/Roundel.figma.js +15 -0
  133. package/build/components/SectionHeader/SectionHeader.figma.d.ts +21 -0
  134. package/build/components/SectionHeader/SectionHeader.figma.js +50 -0
  135. package/build/components/SegmentedControl/SegmentedControl.figma.d.ts +16 -0
  136. package/build/components/SegmentedControl/SegmentedControl.figma.js +20 -0
  137. package/build/components/SegmentedControl/SegmentedControlOption.figma.d.ts +17 -0
  138. package/build/components/SegmentedControl/SegmentedControlOption.figma.js +23 -0
  139. package/build/components/Select/Select.figma.d.ts +24 -0
  140. package/build/components/Select/Select.figma.js +65 -0
  141. package/build/components/Select/SelectOption.figma.d.ts +15 -0
  142. package/build/components/Select/SelectOption.figma.js +27 -0
  143. package/build/components/Spinner/Spinner.figma.d.ts +13 -0
  144. package/build/components/Spinner/Spinner.figma.js +16 -0
  145. package/build/components/Spinner/Spinner.js +1 -1
  146. package/build/components/Spinner/Spinner.web.js +1 -1
  147. package/build/components/StepperInput/StepperInput.figma.d.ts +25 -0
  148. package/build/components/StepperInput/StepperInput.figma.js +32 -0
  149. package/build/components/Switch/Switch.figma.d.ts +15 -0
  150. package/build/components/Switch/Switch.figma.js +18 -0
  151. package/build/components/Table/Table.figma.d.ts +14 -0
  152. package/build/components/Table/Table.figma.js +38 -0
  153. package/build/components/Table/TableHeaderCell.figma.d.ts +15 -0
  154. package/build/components/Table/TableHeaderCell.figma.js +31 -0
  155. package/build/components/Tabs/Tab.figma.d.ts +14 -0
  156. package/build/components/Tabs/Tab.figma.js +14 -0
  157. package/build/components/Tabs/Tab.js +1 -1
  158. package/build/components/Tabs/Tabs.figma.d.ts +14 -0
  159. package/build/components/Tabs/Tabs.figma.js +21 -0
  160. package/build/components/Textarea/Textarea.figma.d.ts +27 -0
  161. package/build/components/Textarea/Textarea.figma.js +53 -0
  162. package/build/components/TimePicker/TimePicker.figma.d.ts +16 -0
  163. package/build/components/TimePicker/TimePicker.figma.js +30 -0
  164. package/build/components/TimePickerInput/TimePickerInput.figma.d.ts +29 -0
  165. package/build/components/TimePickerInput/TimePickerInput.figma.js +53 -0
  166. package/build/components/Timeline/Timeline.figma.d.ts +14 -0
  167. package/build/components/Timeline/Timeline.figma.js +23 -0
  168. package/build/components/Timeline/TimelineItemProgress.figma.d.ts +16 -0
  169. package/build/components/Timeline/TimelineItemProgress.figma.js +30 -0
  170. package/build/components/Timeline/TimelineItemStatic.figma.d.ts +16 -0
  171. package/build/components/Timeline/TimelineItemStatic.figma.js +30 -0
  172. package/build/components/Toast/ToastItem.figma.d.ts +20 -0
  173. package/build/components/Toast/ToastItem.figma.js +42 -0
  174. package/build/components/ToggleButtonCard/ToggleButtonCard.figma.d.ts +14 -0
  175. package/build/components/ToggleButtonCard/ToggleButtonCard.figma.js +28 -0
  176. package/build/components/ToggleButtonCard/ToggleButtonCardRoot.js +16 -3
  177. package/build/components/UnstyledIconButton/UnstyledIconButton.figma.d.ts +21 -0
  178. package/build/components/UnstyledIconButton/UnstyledIconButton.figma.js +32 -0
  179. package/build/components/VerificationInput/VerificationInput.figma.d.ts +19 -0
  180. package/build/components/VerificationInput/VerificationInput.figma.js +22 -0
  181. package/build/components/index.d.ts +1 -0
  182. package/build/components/index.js +1 -0
  183. package/build/types/utilityProps.d.ts +1 -1
  184. package/package.json +5 -4
  185. package/public/llms/components/list.md +6 -11
  186. package/public/llms/docs/ai-tooling.md +27 -5
  187. package/public/llms/docs/introduction.md +1 -1
@@ -1,6 +1,6 @@
1
1
  import type { FlexAlignType, ViewProps, ViewStyle } from 'react-native';
2
- import { DisplayProps, FlexLayoutProps, GapProps, MarginProps, PaddingProps, SpacingValues } from '../../types';
3
- interface FlexProps extends ViewProps, MarginProps, PaddingProps, FlexLayoutProps, GapProps, Omit<DisplayProps, 'direction'> {
2
+ import { DisplayProps, FlexLayoutProps, GapProps, MarginProps, PaddingProps, SizeProps, SpacingValues } from '../../types';
3
+ interface FlexProps extends ViewProps, MarginProps, PaddingProps, FlexLayoutProps, GapProps, Pick<SizeProps, 'width'>, Omit<DisplayProps, 'direction'> {
4
4
  direction?: ViewStyle['flexDirection'];
5
5
  align?: FlexAlignType;
6
6
  justify?: ViewStyle['justifyContent'];
@@ -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;
@@ -0,0 +1,34 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=2161-1311&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 loading = figma.selectedInstance.getEnum('State', {
6
+ Loading: true,
7
+ });
8
+ const placeholder = figma.selectedInstance.getEnum('State', {
9
+ Placeholder: figma.selectedInstance.getString('Value'),
10
+ });
11
+ const value = figma.selectedInstance.getEnum('State', {
12
+ Filled: figma.selectedInstance.getString('Value'),
13
+ });
14
+ const label = figma.selectedInstance.getBoolean('Label?', {
15
+ true: figma.selectedInstance.getString('Label'),
16
+ });
17
+ const helperText = figma.selectedInstance.getBoolean('Helper text?', {
18
+ true: figma.selectedInstance.getString('Helper text'),
19
+ });
20
+ export default {
21
+ id: 'Input',
22
+ imports: ["import { Input } from '@utilitywarehouse/hearth-react-native';"],
23
+ example: figma.code `<Input type="search"${figma.helpers.react.renderProp('loading', loading)}${figma.helpers.react.renderProp('placeholder', placeholder)}${figma.helpers.react.renderProp('value', value)}${figma.helpers.react.renderProp('label', label)}${figma.helpers.react.renderProp('helperText', helperText)}/>`,
24
+ metadata: {
25
+ nestable: true,
26
+ props: {
27
+ loading,
28
+ placeholder,
29
+ value,
30
+ label,
31
+ helperText,
32
+ },
33
+ },
34
+ };
@@ -0,0 +1,14 @@
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: string;
10
+ optional: boolean;
11
+ };
12
+ };
13
+ };
14
+ export default _default;