@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
@@ -0,0 +1,21 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=6464%3A8744
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Tabs/Tabs.tsx
3
+ // component=Tabs
4
+ import figma from 'figma';
5
+ const size = figma.selectedInstance.getEnum('Size', {
6
+ 'MD-56': 'md',
7
+ 'LG-64': 'lg',
8
+ });
9
+ const tabs = figma.properties.children(['Tab item']);
10
+ export default {
11
+ id: 'Tabs',
12
+ imports: ["import { TabPanel, Tabs, TabsList } from '@utilitywarehouse/hearth-react-native';"],
13
+ example: figma.code `<Tabs${figma.helpers.react.renderProp('size', size)}>
14
+ <TabsList>${figma.helpers.react.renderChildren(tabs)}</TabsList>
15
+ {/* Example TabPanel content, make sure they match the value of your Tab items */}
16
+ <TabPanel value="account">Account content</TabPanel>
17
+ <TabPanel value="billing">Billing content</TabPanel>
18
+ <TabPanel value="usage">Usage content</TabPanel>
19
+ </Tabs>`,
20
+ metadata: { nestable: true, props: { size, tabs } },
21
+ };
@@ -0,0 +1,27 @@
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
+ required: figma.EnumOptionsValues<{
20
+ true: boolean;
21
+ false: boolean;
22
+ }>;
23
+ focused: boolean | undefined;
24
+ };
25
+ };
26
+ };
27
+ export default _default;
@@ -0,0 +1,53 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=2356:5180
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Textarea/Textarea.tsx
3
+ // component=Textarea
4
+ import figma from 'figma';
5
+ const instance = figma.selectedInstance;
6
+ const disabled = instance.getEnum('State', { Disabled: true });
7
+ const readonly = instance.getEnum('State', { 'Read-only': true });
8
+ const placeholder = instance.getEnum('Value type', {
9
+ Placeholder: instance.getString('Value'),
10
+ });
11
+ const value = instance.getEnum('Value type', { Filled: instance.getString('Value') });
12
+ const label = instance.getString('Label');
13
+ const labelVariant = instance.getEnum('Label variant', { Body: 'body', Heading: 'heading' });
14
+ const helperText = instance.getBoolean('Helper text?', {
15
+ true: instance.getString('Helper text'),
16
+ });
17
+ const validationStatus = instance.getEnum('State', {
18
+ Invalid: 'invalid',
19
+ Valid: 'valid',
20
+ });
21
+ const invalidText = instance.getEnum('State', {
22
+ Invalid: instance.getString('Validation'),
23
+ });
24
+ const validText = instance.getEnum('State', {
25
+ Valid: instance.getString('Validation'),
26
+ });
27
+ const required = instance.getBoolean('Optional?', {
28
+ true: false,
29
+ false: true,
30
+ });
31
+ const focused = instance.getEnum('Focus?', { True: true });
32
+ export default {
33
+ id: 'textarea',
34
+ imports: ['import { Textarea } from "@utilitywarehouse/hearth-react-native";'],
35
+ example: figma.code `<Textarea${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)}${figma.helpers.react.renderProp('required', required)}${figma.helpers.react.renderProp('focused', focused)} />`,
36
+ metadata: {
37
+ nestable: true,
38
+ props: {
39
+ disabled,
40
+ readonly,
41
+ placeholder,
42
+ value,
43
+ label,
44
+ labelVariant,
45
+ helperText,
46
+ validationStatus,
47
+ invalidText,
48
+ validText,
49
+ required,
50
+ focused,
51
+ },
52
+ },
53
+ };
@@ -0,0 +1,16 @@
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
+ hideFooter: figma.EnumOptionsValues<{
10
+ true: boolean;
11
+ false: boolean;
12
+ }>;
13
+ };
14
+ };
15
+ };
16
+ export default _default;
@@ -0,0 +1,30 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=10334-16770&t=Jg2fPJPQNzOyspmQ-4
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/TimePicker/TimePicker.tsx
3
+ // component=TimePicker
4
+ import figma from 'figma';
5
+ const hideFooter = figma.selectedInstance.getBoolean('Footer?', {
6
+ true: false,
7
+ false: true,
8
+ });
9
+ export default {
10
+ id: 'time-picker',
11
+ imports: [
12
+ "import { useRef, useState } from 'react';",
13
+ "import { BottomSheetModalProvider, Button, TimePicker } from '@utilitywarehouse/hearth-react-native';",
14
+ "import type { DateType } from '@utilitywarehouse/hearth-react-native';",
15
+ ],
16
+ example: figma.code `const pickerRef = useRef(null);
17
+ const [time, setTime] = useState<DateType>();
18
+
19
+ <BottomSheetModalProvider>
20
+ <Button onPress={() => pickerRef.current?.present()}>Choose time</Button>
21
+ <TimePicker
22
+ ref={pickerRef}
23
+ date={time}
24
+ onChange={({ date }) => setTime(date)}
25
+ onCancel={() => setTime(undefined)}
26
+ use12Hours={false}${figma.helpers.react.renderProp('hideFooter', hideFooter)}
27
+ />
28
+ </BottomSheetModalProvider>`,
29
+ metadata: { nestable: true, props: { hideFooter } },
30
+ };
@@ -0,0 +1,29 @@
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
+ validationStatus: figma.EnumOptionsValues<{
11
+ Default: undefined;
12
+ Valid: string;
13
+ Invalid: string;
14
+ }>;
15
+ readonly: boolean | undefined;
16
+ label: string;
17
+ validText: string | undefined;
18
+ invalidText: string | undefined;
19
+ placeholder: string | undefined;
20
+ value: string | undefined;
21
+ helperText: figma.EnumOptionsValues<{
22
+ true: string;
23
+ false: undefined;
24
+ }>;
25
+ focused: boolean | undefined;
26
+ };
27
+ };
28
+ };
29
+ export default _default;
@@ -0,0 +1,53 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=10334-6212&t=Jg2fPJPQNzOyspmQ-4
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/TimePickerInput/TimePickerInput.tsx
3
+ // component=TimePickerInput
4
+ import figma from 'figma';
5
+ const disabled = figma.selectedInstance.getEnum('Variant', {
6
+ Disabled: true,
7
+ });
8
+ const validationStatus = figma.selectedInstance.getEnum('Variant', {
9
+ Default: undefined,
10
+ Valid: 'valid',
11
+ Invalid: 'invalid',
12
+ });
13
+ const readonly = figma.selectedInstance.getEnum('Variant', {
14
+ 'Read-only': true,
15
+ });
16
+ const label = figma.selectedInstance.getString('Label');
17
+ const validText = figma.selectedInstance.getEnum('Variant', {
18
+ Valid: figma.selectedInstance.getString('Validation'),
19
+ });
20
+ const invalidText = figma.selectedInstance.getEnum('Variant', {
21
+ Invalid: figma.selectedInstance.getString('Validation'),
22
+ });
23
+ const placeholder = figma.selectedInstance.getEnum('Value type', {
24
+ Placeholder: figma.selectedInstance.getString('Value'),
25
+ });
26
+ const value = figma.selectedInstance.getEnum('Value type', {
27
+ Filled: figma.selectedInstance.getString('Value'),
28
+ });
29
+ const helperText = figma.selectedInstance.getBoolean('Helper text?', {
30
+ true: figma.selectedInstance.getString('Helper text'),
31
+ false: undefined,
32
+ });
33
+ const focused = figma.selectedInstance.getEnum('Focus?', { Yes: true });
34
+ export default {
35
+ id: 'TimePickerInput',
36
+ imports: ["import { TimePickerInput } from '@utilitywarehouse/hearth-react-native';"],
37
+ example: figma.code `<TimePickerInput${figma.helpers.react.renderProp('disabled', disabled)}${figma.helpers.react.renderProp('validationStatus', validationStatus)}${figma.helpers.react.renderProp('readonly', readonly)}${figma.helpers.react.renderProp('label', label)}${figma.helpers.react.renderProp('validText', validText)}${figma.helpers.react.renderProp('invalidText', invalidText)}${figma.helpers.react.renderProp('placeholder', placeholder)}${figma.helpers.react.renderProp('value', value)}${figma.helpers.react.renderProp('helperText', helperText)}${figma.helpers.react.renderProp('focused', focused)}/>`,
38
+ metadata: {
39
+ nestable: true,
40
+ props: {
41
+ disabled,
42
+ validationStatus,
43
+ readonly,
44
+ label,
45
+ validText,
46
+ invalidText,
47
+ placeholder,
48
+ value,
49
+ helperText,
50
+ focused,
51
+ },
52
+ },
53
+ };
@@ -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
+ variant: string | undefined;
10
+ items: figma.ResultSection[][];
11
+ };
12
+ };
13
+ };
14
+ export default _default;
@@ -0,0 +1,23 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=10592-5483&t=pZwKJYFo1y1QRQD1-4
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Timeline/Timeline.tsx
3
+ // component=Timeline
4
+ import figma from 'figma';
5
+ const variant = figma.selectedInstance.getEnum('Variant', {
6
+ Progress: 'progress',
7
+ Static: 'static',
8
+ });
9
+ const itemLayers = figma.selectedInstance
10
+ .findLayers(n => n.type === 'INSTANCE')
11
+ .filter((layer) => layer.type === 'INSTANCE');
12
+ const items = itemLayers
13
+ .filter(layer => layer.hasCodeConnect())
14
+ .map(layer => layer.executeTemplate().example);
15
+ export default {
16
+ id: 'Timeline',
17
+ imports: ['import { Timeline } from "@utilitywarehouse/hearth-react-native";'],
18
+ example: figma.code `<Timeline${figma.helpers.react.renderProp('variant', variant)}>${figma.helpers.react.renderChildren(items.flat())}</Timeline>`,
19
+ metadata: {
20
+ nestable: true,
21
+ props: { variant, items },
22
+ },
23
+ };
@@ -0,0 +1,16 @@
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
+ helperText: string;
11
+ state: string | undefined;
12
+ customContent: figma.ResultSection[][];
13
+ };
14
+ };
15
+ };
16
+ export default _default;
@@ -0,0 +1,30 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=10562-2810&t=pZwKJYFo1y1QRQD1-4
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Timeline/TimelineItem.tsx
3
+ // component=TimelineItem
4
+ import figma from 'figma';
5
+ const label = figma.selectedInstance.getString('Label');
6
+ const helperText = figma.selectedInstance.getBoolean('Helper text?', {
7
+ true: figma.selectedInstance.getString('Helper text'),
8
+ });
9
+ const state = figma.selectedInstance.getEnum('State', {
10
+ Complete: 'complete',
11
+ Active: 'active',
12
+ Incomplete: 'incomplete',
13
+ });
14
+ const slot = figma.selectedInstance.getSlot('Slot');
15
+ const customContentInstance = figma.selectedInstance.getBoolean('Custom content?', {
16
+ true: figma.selectedInstance.getInstanceSwap('Custom content')?.executeTemplate().example,
17
+ });
18
+ const customContent = [
19
+ ...(slot?.connectedInstances.map(i => i.executeTemplate().example) ?? []),
20
+ ...(customContentInstance ? [customContentInstance] : []),
21
+ ];
22
+ export default {
23
+ id: 'TimelineItem',
24
+ imports: ['import { TimelineItem } from "@utilitywarehouse/hearth-react-native";'],
25
+ example: figma.code `<TimelineItem variant="progress" position="middle"${figma.helpers.react.renderProp('label', label)}${figma.helpers.react.renderProp('helperText', helperText)}${figma.helpers.react.renderProp('state', state)}>${figma.helpers.react.renderChildren(customContent.flat())}</TimelineItem>`,
26
+ metadata: {
27
+ nestable: true,
28
+ props: { label, helperText, state, customContent },
29
+ },
30
+ };
@@ -0,0 +1,16 @@
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
+ helperText: string;
11
+ position: string | undefined;
12
+ customContent: figma.ResultSection[][];
13
+ };
14
+ };
15
+ };
16
+ export default _default;
@@ -0,0 +1,30 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=10592-5189&t=pZwKJYFo1y1QRQD1-4
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Timeline/TimelineItem.tsx
3
+ // component=TimelineItem
4
+ import figma from 'figma';
5
+ const label = figma.selectedInstance.getString('Label');
6
+ const helperText = figma.selectedInstance.getBoolean('Helper text?', {
7
+ true: figma.selectedInstance.getString('Helper text'),
8
+ });
9
+ const position = figma.selectedInstance.getEnum('Variant', {
10
+ Start: 'start',
11
+ Middle: 'middle',
12
+ End: 'end',
13
+ });
14
+ const slot = figma.selectedInstance.getSlot('Slot');
15
+ const customContentInstance = figma.selectedInstance.getBoolean('Custom content?', {
16
+ true: figma.selectedInstance.getInstanceSwap('Custom content')?.executeTemplate().example,
17
+ });
18
+ const customContent = [
19
+ ...(slot?.connectedInstances.map(i => i.executeTemplate().example) ?? []),
20
+ ...(customContentInstance ? [customContentInstance] : []),
21
+ ];
22
+ export default {
23
+ id: 'TimelineItem',
24
+ imports: ['import { TimelineItem } from "@utilitywarehouse/hearth-react-native";'],
25
+ example: figma.code `<TimelineItem variant="static"${figma.helpers.react.renderProp('position', position)}${figma.helpers.react.renderProp('label', label)}${figma.helpers.react.renderProp('helperText', helperText)}>${figma.helpers.react.renderChildren(customContent.flat())}</TimelineItem>`,
26
+ metadata: {
27
+ nestable: true,
28
+ props: { label, helperText, position, customContent },
29
+ },
30
+ };
@@ -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
+ text: string;
10
+ hasIcon: boolean;
11
+ icon: figma.EnumOptionsValues<{
12
+ true: figma.ResultSection[] | undefined;
13
+ false: string;
14
+ }>;
15
+ hasLink: boolean;
16
+ hasDismiss: boolean;
17
+ };
18
+ };
19
+ };
20
+ export default _default;
@@ -0,0 +1,42 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=7072%3A913
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Toast/ToastItem.tsx
3
+ // component=ToastItem
4
+ import figma from 'figma';
5
+ const instance = figma.selectedInstance;
6
+ const text = instance.getString('Text');
7
+ const hasIcon = instance.getBoolean('Icon?');
8
+ const icon = instance.getBoolean('Icon?', {
9
+ true: instance.getInstanceSwap('Icon-24')?.executeTemplate().example,
10
+ false: '',
11
+ });
12
+ const hasLink = instance.getBoolean('Link?');
13
+ const hasDismiss = instance.getBoolean('Dismiss?');
14
+ export default {
15
+ id: 'toast-item',
16
+ imports: [
17
+ "import { ToastItem } from '@utilitywarehouse/hearth-react-native';",
18
+ "import type { ToastInstance } from '@utilitywarehouse/hearth-react-native';",
19
+ ],
20
+ example: figma.code `<ToastItem
21
+ toast={{
22
+ id: 'toast-1',
23
+ text: '${text || 'Toast notification'}',
24
+ ${hasIcon ? figma.code `icon: ${icon},` : ''}
25
+ ${hasLink ? "actionText: 'Action'," : ''}
26
+ showDismissIcon: ${hasDismiss},
27
+ dismissOnPress: false,
28
+ duration: 6000,
29
+ }}
30
+ onClose={() => {}}
31
+ />`,
32
+ metadata: {
33
+ nestable: true,
34
+ props: {
35
+ text,
36
+ hasIcon,
37
+ icon,
38
+ hasLink,
39
+ hasDismiss,
40
+ },
41
+ },
42
+ };
@@ -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 | undefined;
10
+ contentItems: figma.ResultSection[][];
11
+ };
12
+ };
13
+ };
14
+ export default _default;
@@ -0,0 +1,28 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=2164-727&t=Uq6QfQcygdNGv5lM-4
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/ToggleButtonCard/ToggleButtonCard.tsx
3
+ // component=ToggleButtonCard
4
+ import figma from 'figma';
5
+ const instance = figma.selectedInstance;
6
+ // Get label from the nested Toggle Button instance
7
+ const label = (function () {
8
+ const nestedToggleButton = instance.findInstance('Toggle Button');
9
+ if (nestedToggleButton?.type !== 'ERROR') {
10
+ return nestedToggleButton.getString('Label');
11
+ }
12
+ return undefined;
13
+ })();
14
+ // Content is a SLOT property
15
+ const contentSlot = instance.getSlot('Content');
16
+ const contentItems = contentSlot?.connectedInstances.map(i => i.executeTemplate().example) ?? [];
17
+ export default {
18
+ id: 'ToggleButtonCard',
19
+ imports: ["import { ToggleButtonCard } from '@utilitywarehouse/hearth-react-native';"],
20
+ example: figma.code `// This should be wrapped in a ToggleButtonCardGroup, see docs
21
+ <ToggleButtonCard${figma.helpers.react.renderProp('label', label)} value="someValue">
22
+ ${contentItems.flat()}
23
+ </ToggleButtonCard>`,
24
+ metadata: {
25
+ nestable: true,
26
+ props: { label, contentItems },
27
+ },
28
+ };
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useMemo } from 'react';
3
- import { Pressable, View } from 'react-native';
2
+ import { useMemo, useRef } from 'react';
3
+ import { Platform, Pressable, View } from 'react-native';
4
4
  import { StyleSheet } from 'react-native-unistyles';
5
5
  import ToggleButton from '../ToggleButton/ToggleButton';
6
6
  import { ToggleButtonCardContext } from './ToggleButtonCard.context';
7
7
  const ToggleButtonCardRoot = ({ children, style, label, states, onPress, ...props }) => {
8
8
  const { checked, active } = states ?? {};
9
+ const containerRef = useRef(null);
9
10
  const value = useMemo(() => ({
10
11
  checked,
11
12
  active,
@@ -14,10 +15,22 @@ const ToggleButtonCardRoot = ({ children, style, label, states, onPress, ...prop
14
15
  selected: checked,
15
16
  });
16
17
  const handlePress = (e) => {
18
+ // gluestack's Radio selection state on web is driven by the hidden native
19
+ // <input type="radio"> receiving a real click (label-forwarding). The
20
+ // ToggleButton nested inside is itself an interactive element, so browsers
21
+ // don't forward the click to that hidden input. Click it directly instead.
22
+ if (Platform.OS === 'web') {
23
+ const node = containerRef.current;
24
+ const input = node?.querySelector?.('input[type="radio"]');
25
+ if (input && !input.checked) {
26
+ input.click();
27
+ return;
28
+ }
29
+ }
17
30
  onPress?.(e);
18
31
  props.onChange?.(!checked);
19
32
  };
20
- return (_jsx(ToggleButtonCardContext.Provider, { value: value, children: _jsxs(Pressable, { ...props, onPress: onPress, style: [styles.container, style], children: [children, _jsx(View, { style: styles.buttonContainer, children: _jsx(ToggleButton, { text: label, toggled: checked, onPress: handlePress, style: styles.button }) })] }) }));
33
+ return (_jsx(ToggleButtonCardContext.Provider, { value: value, children: _jsxs(Pressable, { ...props, ref: containerRef, onPress: onPress, style: [styles.container, style], children: [children, _jsx(View, { style: styles.buttonContainer, children: _jsx(ToggleButton, { text: label, toggled: checked, onPress: handlePress, style: styles.button }) })] }) }));
21
34
  };
22
35
  ToggleButtonCardRoot.displayName = 'ToggleButtonCardRoot';
23
36
  const styles = StyleSheet.create(theme => ({
@@ -0,0 +1,21 @@
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
+ state: string | undefined;
11
+ disabled: boolean;
12
+ loading: boolean;
13
+ inverted: boolean;
14
+ icon: {
15
+ $value: string;
16
+ $type: "react-component";
17
+ } | undefined;
18
+ };
19
+ };
20
+ };
21
+ export default _default;
@@ -0,0 +1,32 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=2926%3A2430
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/UnstyledIconButton/UnstyledIconButton.tsx
3
+ // component=UnstyledIconButton
4
+ import figma from 'figma';
5
+ const instance = figma.selectedInstance;
6
+ const size = instance.getEnum('Size', { 'SM-20': 'sm', 'MD-24': 'md' });
7
+ const state = instance.getEnum('State', {
8
+ Default: 'default',
9
+ Hover: 'hover',
10
+ Active: 'active',
11
+ Focus: 'focus',
12
+ Disabled: 'disabled',
13
+ Loading: 'loading',
14
+ });
15
+ const disabled = state === 'disabled';
16
+ const loading = state === 'loading';
17
+ const inverted = instance.getBoolean('Inverted?');
18
+ const iconName = (size === 'sm'
19
+ ? instance.getInstanceSwap('Icon-20')?.executeTemplate().metadata?.props?.componentName
20
+ : instance.getInstanceSwap('Icon-24')?.executeTemplate().metadata?.props?.componentName);
21
+ const icon = iconName ? figma.helpers.react.reactComponent(iconName) : undefined;
22
+ export default {
23
+ id: 'unstyled-icon-button',
24
+ imports: [
25
+ 'import { UnstyledIconButton } from "@utilitywarehouse/hearth-react-native";',
26
+ ...(iconName
27
+ ? [`import { ${iconName} } from '@utilitywarehouse/hearth-react-native-icons';`]
28
+ : []),
29
+ ],
30
+ example: figma.code `<UnstyledIconButton${figma.helpers.react.renderProp('size', size)}${figma.helpers.react.renderProp('disabled', disabled)}${figma.helpers.react.renderProp('loading', loading)}${figma.helpers.react.renderProp('inverted', inverted)}${figma.helpers.react.renderProp('icon', icon)} />`,
31
+ metadata: { nestable: true, props: { size, state, disabled, loading, inverted, icon } },
32
+ };
@@ -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
+ validationStatus: string | undefined;
10
+ valueType: string | undefined;
11
+ label: string;
12
+ labelVariant: string | undefined;
13
+ value: string;
14
+ helperText: string;
15
+ invalidText: string;
16
+ };
17
+ };
18
+ };
19
+ export default _default;
@@ -0,0 +1,22 @@
1
+ // url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=4049-3615
2
+ // source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/VerificationInput/VerificationInput.tsx
3
+ // component=VerificationInput
4
+ import figma from 'figma';
5
+ const instance = figma.selectedInstance;
6
+ const validationStatus = instance.getEnum('State', { Default: 'initial', Invalid: 'invalid' });
7
+ const valueType = instance.getEnum('Value type', { Empty: '', Filled: 'filled' });
8
+ const label = instance.getString('Label');
9
+ const labelVariant = instance.getEnum('Label variant', { Body: 'body', Heading: 'heading' });
10
+ const value = valueType === 'filled' ? instance.getString('Value 1') : '';
11
+ const showHelperText = instance.getBoolean('Helper text?');
12
+ const helperText = showHelperText ? instance.getString('Helper text') : '';
13
+ const invalidText = validationStatus === 'invalid' ? instance.getString('Validation') : '';
14
+ export default {
15
+ id: 'verification-input',
16
+ imports: ['import { VerificationInput } from "@utilitywarehouse/hearth-react-native";'],
17
+ example: figma.code `<VerificationInput${figma.helpers.react.renderProp('label', label)}${figma.helpers.react.renderProp('labelVariant', labelVariant)}${figma.helpers.react.renderProp('validationStatus', validationStatus)}${figma.helpers.react.renderProp('value', value)}${figma.helpers.react.renderProp('helperText', helperText)}${figma.helpers.react.renderProp('invalidText', invalidText)} />`,
18
+ metadata: {
19
+ nestable: true,
20
+ props: { validationStatus, valueType, label, labelVariant, value, helperText, invalidText },
21
+ },
22
+ };
@@ -65,6 +65,7 @@ export * from './TimePicker';
65
65
  export * from './TimePickerInput';
66
66
  export * from './Toast';
67
67
  export * from './ToggleButtonCard';
68
+ export * from './UnstyledIconButton';
68
69
  export * from './VerificationInput';
69
70
  export { FlatList, Image, KeyboardAvoidingView, ScrollView, SectionList, View } from 'react-native';
70
71
  export { Pressable } from 'react-native';
@@ -66,6 +66,7 @@ export * from './TimePicker';
66
66
  export * from './TimePickerInput';
67
67
  export * from './Toast';
68
68
  export * from './ToggleButtonCard';
69
+ export * from './UnstyledIconButton';
69
70
  export * from './VerificationInput';
70
71
  export { FlatList, Image, KeyboardAvoidingView, ScrollView, SectionList, View } from 'react-native';
71
72
  export { Pressable } from 'react-native';
@@ -282,7 +282,7 @@ export interface IconColorProps {
282
282
  * Common text styling props shared across text components (BodyText, Heading, DetailText).
283
283
  * Includes margin utility props, simplified semantic text color, and standard text style props.
284
284
  */
285
- export interface CommonTextProps extends RNTextProps, MarginProps {
285
+ export interface CommonTextProps extends RNTextProps, MarginProps, Pick<FlexLayoutProps, 'flexShrink'> {
286
286
  /** Whether to truncate text with an ellipsis. */
287
287
  truncated?: boolean;
288
288
  /** Whether to show strikethrough text. */