@utilitywarehouse/hearth-react-native 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-lint.log +1 -1
  3. package/CHANGELOG.md +22 -0
  4. package/build/components/Accordion/AccordionTrigger.js +1 -1
  5. package/build/components/BodyText/index.d.ts +1 -0
  6. package/build/components/Checkbox/CheckboxGroup.context.d.ts +2 -0
  7. package/build/components/Checkbox/CheckboxGroup.js +5 -5
  8. package/build/components/Checkbox/CheckboxIndicator.js +3 -3
  9. package/build/components/Checkbox/CheckboxTextContent.js +0 -1
  10. package/build/components/Checkbox/CheckboxTileRoot.js +9 -1
  11. package/build/components/DatePicker/DatePickerDay.js +3 -3
  12. package/build/components/FormField/FormField.d.ts +5 -5
  13. package/build/components/List/List.context.d.ts +2 -0
  14. package/build/components/List/List.context.js +2 -0
  15. package/build/components/List/List.js +19 -15
  16. package/build/components/List/ListAction/ListAction.js +3 -2
  17. package/build/components/List/ListAction/ListAction.props.d.ts +0 -1
  18. package/build/components/List/ListItem/ListItem.props.d.ts +4 -1
  19. package/build/components/List/ListItem/ListItemHeading.d.ts +13 -0
  20. package/build/components/List/ListItem/ListItemHeading.js +12 -0
  21. package/build/components/List/ListItem/ListItemHelperText.d.ts +2 -2
  22. package/build/components/List/ListItem/ListItemRoot.d.ts +1 -1
  23. package/build/components/List/ListItem/ListItemRoot.js +7 -6
  24. package/build/components/List/ListItem/index.d.ts +1 -1
  25. package/build/components/List/ListItem/index.js +1 -1
  26. package/build/components/PillGroup/Pill.js +2 -2
  27. package/build/components/Radio/RadioGroup.context.d.ts +2 -0
  28. package/build/components/Radio/RadioGroup.js +1 -1
  29. package/build/components/Radio/RadioIndicator.js +3 -3
  30. package/build/components/Radio/RadioTextContent.js +0 -1
  31. package/build/components/Radio/RadioTileRoot.js +9 -1
  32. package/build/components/RadioCard/RadioCardIndicator.js +3 -3
  33. package/build/components/RadioCard/RadioCardRoot.js +3 -3
  34. package/build/components/Tabs/Tab.js +5 -5
  35. package/build/components/ToggleButton/ToggleButtonRoot.js +2 -2
  36. package/build/components/ToggleButtonCard/ToggleButtonCardRoot.js +3 -3
  37. package/build/components/UnstyledIconButton/UnstyledIconButtonRoot.js +1 -1
  38. package/build/components/VerificationInput/VerificationInput.d.ts +6 -0
  39. package/build/components/VerificationInput/VerificationInput.js +35 -0
  40. package/build/components/VerificationInput/VerificationInput.props.d.ts +49 -0
  41. package/build/components/VerificationInput/VerificationInput.props.js +1 -0
  42. package/build/components/VerificationInput/VerificationInputSlot.d.ts +9 -0
  43. package/build/components/VerificationInput/VerificationInputSlot.js +72 -0
  44. package/build/components/VerificationInput/index.d.ts +4 -0
  45. package/build/components/VerificationInput/index.js +3 -0
  46. package/build/components/VerificationInput/useVerificationInput.d.ts +14 -0
  47. package/build/components/VerificationInput/useVerificationInput.js +58 -0
  48. package/build/components/index.d.ts +1 -0
  49. package/build/components/index.js +1 -0
  50. package/docs/components/AllComponents.web.tsx +9 -0
  51. package/package.json +10 -11
  52. package/src/components/Accordion/Accordion.figma.tsx +23 -0
  53. package/src/components/Accordion/AccordionItemRoot.figma.tsx +47 -0
  54. package/src/components/Accordion/AccordionTrigger.tsx +1 -1
  55. package/src/components/Alert/Alert.figma.tsx +47 -0
  56. package/src/components/Avatar/Avatar.figma.tsx +33 -0
  57. package/src/components/Badge/Badge.figma.tsx +48 -24
  58. package/src/components/Banner/Banner.figma.tsx +15 -0
  59. package/src/components/Banner/BannerIllustration.figma.tsx +30 -0
  60. package/src/components/BodyText/index.ts +1 -0
  61. package/src/components/BottomSheet/BottomSheetModal.figma.tsx +20 -0
  62. package/src/components/Button/Button.figma.tsx +60 -229
  63. package/src/components/Card/Card.figma.tsx +43 -71
  64. package/src/components/Card/CardAction/CardAction.figma.tsx +44 -0
  65. package/src/components/Card/CardAction/CardAction.stories.tsx +1 -1
  66. package/src/components/Carousel/Carousel.figma.tsx +19 -0
  67. package/src/components/Checkbox/Checkbox.figma.tsx +26 -41
  68. package/src/components/Checkbox/CheckboxGroup.context.ts +1 -0
  69. package/src/components/Checkbox/CheckboxGroup.figma.tsx +20 -0
  70. package/src/components/Checkbox/CheckboxGroup.tsx +7 -8
  71. package/src/components/Checkbox/CheckboxImage.figma.tsx +27 -0
  72. package/src/components/Checkbox/CheckboxIndicator.tsx +3 -3
  73. package/src/components/Checkbox/CheckboxTextContent.tsx +0 -1
  74. package/src/components/Checkbox/CheckboxTileRoot.figma.tsx +32 -0
  75. package/src/components/Checkbox/CheckboxTileRoot.tsx +9 -1
  76. package/src/components/CurrencyInput/CurrencyInput.figma.tsx +56 -0
  77. package/src/components/DateInput/DateInput.figma.tsx +75 -0
  78. package/src/components/DatePicker/DatePickerCalendar.figma.tsx +34 -0
  79. package/src/components/DatePicker/DatePickerDay.tsx +3 -3
  80. package/src/components/DatePickerInput/DatePickerInput.figma.tsx +62 -0
  81. package/src/components/DescriptionList/DescriptionList.figma.tsx +23 -0
  82. package/src/components/Divider/Divider.figma.tsx +23 -18
  83. package/src/components/ExpandableCard/ExpandableCard.figma.tsx +54 -0
  84. package/src/components/ExpandableCard/ExpandableCardGroup.figma.tsx +23 -0
  85. package/src/components/FormField/FormField.figma.tsx +23 -0
  86. package/src/components/Helper/HelperText.figma.tsx +23 -0
  87. package/src/components/IconButton/IconButton.figma.tsx +55 -161
  88. package/src/components/IconContainer/IconContainer.figma.tsx +50 -0
  89. package/src/components/InlineLink/InlineLink.figma.tsx +33 -0
  90. package/src/components/Input/Input.figma.tsx +52 -110
  91. package/src/components/Label/Label.figma.tsx +24 -0
  92. package/src/components/Link/Link.figma.tsx +42 -0
  93. package/src/components/List/List.context.ts +4 -0
  94. package/src/components/List/List.docs.mdx +30 -24
  95. package/src/components/List/List.figma.tsx +29 -108
  96. package/src/components/List/List.stories.tsx +26 -1
  97. package/src/components/List/List.tsx +26 -19
  98. package/src/components/List/ListAction/ListAction.figma.tsx +29 -0
  99. package/src/components/List/ListAction/ListAction.props.ts +0 -1
  100. package/src/components/List/ListAction/ListAction.tsx +3 -2
  101. package/src/components/List/ListItem/ListItem.figma.tsx +40 -220
  102. package/src/components/List/ListItem/ListItem.props.ts +4 -1
  103. package/src/components/List/ListItem/ListItemHeading.tsx +20 -0
  104. package/src/components/List/ListItem/ListItemHelperText.tsx +2 -3
  105. package/src/components/List/ListItem/ListItemLeadingContent.figma.tsx +29 -0
  106. package/src/components/List/ListItem/ListItemRoot.tsx +11 -6
  107. package/src/components/List/ListItem/ListItemTrailingContent.figma.tsx +27 -0
  108. package/src/components/List/ListItem/index.ts +1 -1
  109. package/src/components/Menu/Menu.figma.tsx +30 -0
  110. package/src/components/Menu/MenuItem.figma.tsx +31 -0
  111. package/src/components/Modal/Modal.docs.mdx +23 -20
  112. package/src/components/Modal/Modal.figma.tsx +56 -0
  113. package/src/components/PillGroup/Pill.figma.tsx +25 -0
  114. package/src/components/PillGroup/Pill.tsx +3 -3
  115. package/src/components/PillGroup/PillGroup.figma.tsx +21 -0
  116. package/src/components/ProgressStepper/ProgressStep.figma.tsx +30 -0
  117. package/src/components/ProgressStepper/ProgressStepper.figma.tsx +20 -0
  118. package/src/components/Radio/Radio.figma.tsx +22 -42
  119. package/src/components/Radio/Radio.stories.tsx +24 -0
  120. package/src/components/Radio/RadioGroup.context.ts +1 -0
  121. package/src/components/Radio/RadioGroup.figma.tsx +54 -0
  122. package/src/components/Radio/RadioGroup.tsx +2 -2
  123. package/src/components/Radio/RadioImage.figma.tsx +27 -0
  124. package/src/components/Radio/RadioIndicator.tsx +3 -3
  125. package/src/components/Radio/RadioTextContent.tsx +0 -1
  126. package/src/components/Radio/RadioTileRoot.figma.tsx +31 -0
  127. package/src/components/Radio/RadioTileRoot.tsx +9 -1
  128. package/src/components/RadioCard/RadioCardIndicator.tsx +3 -3
  129. package/src/components/RadioCard/RadioCardRoot.tsx +3 -3
  130. package/src/components/SectionHeader/SectionHeader.figma.tsx +30 -16
  131. package/src/components/Select/Select.figma.tsx +55 -0
  132. package/src/components/Select/SelectOption.figma.tsx +36 -0
  133. package/src/components/Spinner/Spinner.figma.tsx +20 -12
  134. package/src/components/Switch/Switch.figma.tsx +31 -23
  135. package/src/components/Tabs/Tab.tsx +5 -5
  136. package/src/components/Tabs/Tabs.figma.tsx +29 -0
  137. package/src/components/ThemedImage/ThemedImage.stories.tsx +1 -1
  138. package/src/components/Toast/ToastItem.figma.tsx +22 -0
  139. package/src/components/ToggleButton/ToggleButtonRoot.tsx +2 -2
  140. package/src/components/ToggleButtonCard/ToggleButtonCardRoot.tsx +3 -3
  141. package/src/components/UnstyledIconButton/UnstyledIconButton.figma.tsx +49 -0
  142. package/src/components/UnstyledIconButton/UnstyledIconButtonRoot.tsx +1 -1
  143. package/src/components/VerificationInput/VerificationInput.docs.mdx +68 -0
  144. package/src/components/VerificationInput/VerificationInput.props.ts +52 -0
  145. package/src/components/VerificationInput/VerificationInput.stories.tsx +140 -0
  146. package/src/components/VerificationInput/VerificationInput.tsx +89 -0
  147. package/src/components/VerificationInput/VerificationInputSlot.tsx +94 -0
  148. package/src/components/VerificationInput/index.ts +5 -0
  149. package/src/components/VerificationInput/useVerificationInput.ts +72 -0
  150. package/src/components/index.ts +1 -0
  151. package/build/components/List/ListItem/ListItemText.d.ts +0 -6
  152. package/build/components/List/ListItem/ListItemText.js +0 -7
  153. package/src/components/Checkbox/CheckboxIndicator.figma.tsx +0 -19
  154. package/src/components/List/ListItem/ListItemText.tsx +0 -14
  155. package/src/components/Radio/RadioIndicator.figma.tsx +0 -21
@@ -1,10 +1,10 @@
1
1
  import { createPressable } from '@gluestack-ui/pressable';
2
2
  import { Pressable } from 'react-native';
3
3
  import { StyleSheet } from 'react-native-unistyles';
4
- import { Icon } from '../Icon';
5
4
  import { BodyText } from '../BodyText';
6
- import { usePillGroupContext } from './PillGroup.context';
5
+ import { Icon } from '../Icon';
7
6
  import type { PillProps } from './Pill.props';
7
+ import { usePillGroupContext } from './PillGroup.context';
8
8
 
9
9
  const PillRoot = ({
10
10
  value,
@@ -61,7 +61,7 @@ const styles = StyleSheet.create(theme => ({
61
61
  _hover: {
62
62
  backgroundColor: theme.color.interactive.neutral.surface.subtle.hover,
63
63
  },
64
- '_focus-visible': theme.helpers.focusVisible,
64
+ // '_focus-visible': theme.helpers.focusVisible,
65
65
  },
66
66
  variants: {
67
67
  active: {
@@ -0,0 +1,21 @@
1
+ import figma from '@figma/code-connect';
2
+ import { PillGroup } from './PillGroup';
3
+
4
+ /**
5
+ * -- This file was auto-generated by Code Connect --
6
+ * `props` includes a mapping from your code props to Figma properties.
7
+ * You should check this is correct, and update the `example` function
8
+ * to return the code example you'd like to see in Figma
9
+ */
10
+
11
+ figma.connect(
12
+ PillGroup,
13
+ 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=4348%3A15988',
14
+ {
15
+ props: {
16
+ // These props were automatically mapped based on your linked code:
17
+ wrap: figma.boolean('Wrap?'),
18
+ },
19
+ example: props => <PillGroup value={null} wrap={props.wrap} />,
20
+ }
21
+ );
@@ -0,0 +1,30 @@
1
+ import figma from '@figma/code-connect';
2
+ import ProgressStep from './ProgressStep';
3
+
4
+ /**
5
+ * -- This file was auto-generated by Code Connect --
6
+ * `props` includes a mapping from your code props to Figma properties.
7
+ * You should check this is correct, and update the `example` function
8
+ * to return the code example you'd like to see in Figma
9
+ */
10
+
11
+ figma.connect(
12
+ ProgressStep,
13
+ 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=6056%3A1987',
14
+ {
15
+ props: {
16
+ // These props were automatically mapped based on your linked code:
17
+ status: figma.enum('State', {
18
+ Complete: 'complete',
19
+ Active: 'active',
20
+ Incomplete: 'incomplete',
21
+ }),
22
+ // No matching props could be found for these Figma properties:
23
+ // "label": figma.string('Label'),
24
+ // "label": figma.boolean('Label?'),
25
+ // "stepNumber": figma.string('Step number'),
26
+ // "interactive": figma.boolean('Interactive?')
27
+ },
28
+ example: props => <ProgressStep id={null} status={props.status} />,
29
+ }
30
+ );
@@ -0,0 +1,20 @@
1
+ import React from "react"
2
+ import ProgressStepper from "./ProgressStepper"
3
+ import figma from "@figma/code-connect"
4
+
5
+ /**
6
+ * -- This file was auto-generated by Code Connect --
7
+ * None of your props could be automatically mapped to Figma properties.
8
+ * You should update the `props` object to include a mapping from your
9
+ * code props to Figma properties, and update the `example` function to
10
+ * return the code example you'd like to see in Figma
11
+ */
12
+
13
+ figma.connect(
14
+ ProgressStepper,
15
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=6056%3A2000",
16
+ {
17
+ props: {},
18
+ example: (props) => <ProgressStepper />,
19
+ },
20
+ )
@@ -1,45 +1,25 @@
1
1
  import figma from '@figma/code-connect';
2
- import { Radio, RadioGroup } from './';
2
+ import Radio from './Radio';
3
3
 
4
- const value = 'some-value';
5
- const setValue = (value: string) => console.log(value);
4
+ /**
5
+ * -- This file was auto-generated by Code Connect --
6
+ * None of your props could be automatically mapped to Figma properties.
7
+ * You should update the `props` object to include a mapping from your
8
+ * code props to Figma properties, and update the `example` function to
9
+ * return the code example you'd like to see in Figma
10
+ */
6
11
 
7
- figma.connect(
8
- Radio,
9
- 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=5626-1463&m=dev',
10
- {
11
- props: {
12
- disabled: figma.boolean('disabled'),
13
- label: figma.nestedProps('Label', {
14
- text: figma.string('Label Text'),
15
- }),
16
- helperText: figma.nestedProps('Helper Text', {
17
- text: figma.string('Text'),
18
- }),
19
- invalidText: figma.boolean('invalid', {
20
- true: figma.nestedProps('Helper Text', {
21
- text: figma.string('Text'),
22
- showIcon: figma.boolean('showIcon?'),
23
- }),
24
- false: {
25
- text: undefined,
26
- showIcon: undefined,
27
- },
28
- }),
29
- },
30
- example: ({ disabled, label, helperText, invalidText }) => (
31
- <RadioGroup value={value} onChange={setValue}>
32
- <Radio
33
- value="someValue"
34
- disabled={disabled}
35
- label={label.text}
36
- helperText={helperText.text}
37
- invalidText={invalidText.text}
38
- showValidationIcon={invalidText.showIcon}
39
- />
40
- </RadioGroup>
41
- ),
42
- }
43
- );
44
-
45
- // TODO: Add variants with helperText when it's implemented
12
+ figma.connect(Radio, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=7428%3A12685', {
13
+ props: {
14
+ // No matching props could be found for these Figma properties:
15
+ // "helperText": figma.boolean('Helper text?'),
16
+ // "helperText": figma.string('Helper text'),
17
+ // "label": figma.string('Label'),
18
+ // "image": figma.boolean('Image?'),
19
+ // "state": figma.enum('State', {
20
+ // "Default": "default"
21
+ // }),
22
+ // "checked": figma.boolean('Checked?')
23
+ },
24
+ example: props => <Radio value={null} />,
25
+ });
@@ -6,6 +6,7 @@ import bankLogo from '../../../docs/assets/bank-logo.png';
6
6
  import bankLogo1 from '../../../docs/assets/bank-logo1.png';
7
7
  import { VariantTitle } from '../../../docs/components';
8
8
  import { Flex } from '../Flex';
9
+ import { FormField } from '../FormField';
9
10
 
10
11
  const meta = {
11
12
  title: 'Stories / Radio',
@@ -206,3 +207,26 @@ export const Variants: Story = {
206
207
  );
207
208
  },
208
209
  };
210
+
211
+ export const WithFormFieldExample: Story = () => (
212
+ <>
213
+ <FormField
214
+ label="Account type"
215
+ helperText="Is this account used for personal or business purposes?"
216
+ >
217
+ <RadioGroup type="tile">
218
+ <Radio label="Personal" value="Personal" />
219
+ <Radio label="Business" value="Business" />
220
+ </RadioGroup>
221
+ </FormField>
222
+ <RadioGroup
223
+ direction="row"
224
+ label="Account type"
225
+ helperText="Is this account used for personal or business purposes?"
226
+ type="tile"
227
+ >
228
+ <Radio label="Personal" value="Personal" />
229
+ <Radio label="Business" value="Business" />
230
+ </RadioGroup>
231
+ </>
232
+ );
@@ -4,6 +4,7 @@ export const RadioGroupContext = createContext<{
4
4
  disabled?: boolean;
5
5
  validationStatus?: 'valid' | 'invalid' | 'initial';
6
6
  type?: 'default' | 'tile';
7
+ direction?: 'column' | 'row';
7
8
  }>({});
8
9
 
9
10
  export const useRadioGroupContext = () => useContext(RadioGroupContext);
@@ -0,0 +1,54 @@
1
+ import React from "react"
2
+ import RadioGroup from "./RadioGroup"
3
+ import figma from "@figma/code-connect"
4
+
5
+ /**
6
+ * -- This file was auto-generated by Code Connect --
7
+ * `props` includes a mapping from your code props to Figma properties.
8
+ * You should check this is correct, and update the `example` function
9
+ * to return the code example you'd like to see in Figma
10
+ */
11
+
12
+ figma.connect(
13
+ RadioGroup,
14
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=3138%3A13254",
15
+ {
16
+ props: {
17
+ // These props were automatically mapped based on your linked code:
18
+ label: figma.string("Group label"),
19
+ helperText: figma.string("Helper text"),
20
+ invalidText: figma.string("Helper text"),
21
+ validText: figma.string("Validation text"),
22
+ direction: figma.enum("Direction", {
23
+ Row: "row",
24
+ Column: "column",
25
+ }),
26
+ // No matching props could be found for these Figma properties:
27
+ // "groupLabel": figma.string('Group label'),
28
+ // "helperText": figma.boolean('Helper text?'),
29
+ // "helperText": figma.string('Helper text'),
30
+ // "validationText": figma.string('Validation text'),
31
+ // "state": figma.enum('State', {
32
+ // "Default": "default",
33
+ // "Invalid": "invalid"
34
+ // }),
35
+ // "labelVariant": figma.enum('Label variant', {
36
+ // "Body": "body",
37
+ // "Heading": "heading"
38
+ // }),
39
+ // "content": figma.enum('Content', {
40
+ // "Radio": "radio",
41
+ // "Radio Tile": "radio-tile"
42
+ // })
43
+ },
44
+ example: (props) => (
45
+ <RadioGroup
46
+ label={props.label}
47
+ helperText={props.helperText}
48
+ invalidText={props.invalidText}
49
+ validText={props.validText}
50
+ direction={props.direction}
51
+ />
52
+ ),
53
+ },
54
+ )
@@ -25,8 +25,8 @@ const RadioGroup = ({
25
25
  ...props
26
26
  }: RadioGroupProps) => {
27
27
  const value = useMemo(
28
- () => ({ disabled, validationStatus, type }),
29
- [disabled, validationStatus, type]
28
+ () => ({ disabled, validationStatus, type, direction }),
29
+ [disabled, validationStatus, type, direction]
30
30
  );
31
31
  const showHeader = !!label || !!helperText || !!invalidText || !!validText;
32
32
  const childrenArray = React.Children.toArray(children as any);
@@ -0,0 +1,27 @@
1
+ import React from "react"
2
+ import RadioImage from "./RadioImage"
3
+ import figma from "@figma/code-connect"
4
+
5
+ /**
6
+ * -- This file was auto-generated by Code Connect --
7
+ * None of your props could be automatically mapped to Figma properties.
8
+ * You should update the `props` object to include a mapping from your
9
+ * code props to Figma properties, and update the `example` function to
10
+ * return the code example you'd like to see in Figma
11
+ */
12
+
13
+ figma.connect(
14
+ RadioImage,
15
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=7428%3A8535",
16
+ {
17
+ props: {
18
+ // No matching props could be found for these Figma properties:
19
+ // "customContent": figma.instance('Custom content'),
20
+ // "variant": figma.enum('Variant', {
21
+ // "Bank logo": "bank-logo",
22
+ // "Custom": "custom"
23
+ // })
24
+ },
25
+ example: (props) => <RadioImage />,
26
+ },
27
+ )
@@ -35,9 +35,9 @@ const styles = StyleSheet.create(theme => ({
35
35
  _hover: {
36
36
  outlineColor: theme.components.radio.outlineColorHover,
37
37
  },
38
- '_focus-within': {
39
- ...theme.helpers.focusVisible,
40
- },
38
+ // '_focus-within': {
39
+ // ...theme.helpers.focusVisible,
40
+ // },
41
41
  _active: {
42
42
  outlineColor: theme.components.radio.outlineColorActive,
43
43
  },
@@ -12,7 +12,6 @@ const RadioTextContent = ({ children, style, ...props }: FlexProps) => {
12
12
 
13
13
  const styles = StyleSheet.create({
14
14
  content: {
15
- flex: 1,
16
15
  flexShrink: 1,
17
16
  },
18
17
  });
@@ -0,0 +1,31 @@
1
+ import React from "react"
2
+ import RadioTileRoot from "./RadioTileRoot"
3
+ import figma from "@figma/code-connect"
4
+
5
+ /**
6
+ * -- This file was auto-generated by Code Connect --
7
+ * None of your props could be automatically mapped to Figma properties.
8
+ * You should update the `props` object to include a mapping from your
9
+ * code props to Figma properties, and update the `example` function to
10
+ * return the code example you'd like to see in Figma
11
+ */
12
+
13
+ figma.connect(
14
+ RadioTileRoot,
15
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=3138%3A13222",
16
+ {
17
+ props: {
18
+ // No matching props could be found for these Figma properties:
19
+ // "helperText": figma.boolean('Helper text?'),
20
+ // "helperText": figma.string('Helper text'),
21
+ // "label": figma.string('Label'),
22
+ // "image": figma.boolean('Image?'),
23
+ // "state": figma.enum('State', {
24
+ // "Default": "default",
25
+ // "Focus": "focus"
26
+ // }),
27
+ // "checked": figma.boolean('Checked?')
28
+ },
29
+ example: (props) => <RadioTileRoot />,
30
+ },
31
+ )
@@ -1,11 +1,14 @@
1
1
  import { View, ViewProps } from 'react-native';
2
2
  import { StyleSheet } from 'react-native-unistyles';
3
3
  import { useRadioContext } from './Radio.context';
4
+ import { useRadioGroupContext } from './RadioGroup.context';
4
5
 
5
6
  const RadioTileRoot = ({ children }: { children: ViewProps['children'] }) => {
7
+ const { direction } = useRadioGroupContext();
6
8
  const { checked } = useRadioContext();
7
9
  styles.useVariants({
8
10
  checked,
11
+ direction,
9
12
  });
10
13
  return <View style={styles.container}>{children}</View>;
11
14
  };
@@ -14,7 +17,6 @@ const styles = StyleSheet.create(theme => ({
14
17
  container: {
15
18
  flexDirection: 'row',
16
19
  justifyContent: 'flex-start',
17
- flex: 1,
18
20
  alignSelf: 'stretch',
19
21
  gap: theme.components.radio.gap,
20
22
  padding: theme.components.radio.tile.padding,
@@ -30,6 +32,12 @@ const styles = StyleSheet.create(theme => ({
30
32
  margin: -theme.components.radio.tile.borderWidthSelected / 2,
31
33
  },
32
34
  },
35
+ direction: {
36
+ row: {},
37
+ column: {
38
+ flex: 1,
39
+ },
40
+ },
33
41
  },
34
42
  },
35
43
  }));
@@ -35,9 +35,9 @@ const styles = StyleSheet.create(theme => ({
35
35
  _hover: {
36
36
  outlineColor: theme.components.radio.outlineColorHover,
37
37
  },
38
- '_focus-within': {
39
- ...theme.helpers.focusVisible,
40
- },
38
+ // '_focus-within': {
39
+ // ...theme.helpers.focusVisible,
40
+ // },
41
41
  _active: {
42
42
  outlineColor: theme.components.radio.outlineColorActive,
43
43
  },
@@ -75,9 +75,9 @@ const styles = StyleSheet.create(theme => ({
75
75
  },
76
76
  },
77
77
  _web: {
78
- '_focus-visible': {
79
- ...theme.helpers.focusVisible,
80
- },
78
+ // '_focus-visible': {
79
+ // ...theme.helpers.focusVisible,
80
+ // },
81
81
  },
82
82
  },
83
83
  }));
@@ -1,17 +1,31 @@
1
- //
2
- // import { SectionHeader } from './';
3
- // import figma from '@figma/code-connect';
1
+ import React from "react"
2
+ import SectionHeader from "./SectionHeader"
3
+ import figma from "@figma/code-connect"
4
4
 
5
- // figma.connect(
6
- // SectionHeader,
7
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=4763-8266&t=q4qCzh74a2av1MqM-4',
8
- // {
9
- // props: {
10
- // helperText: figma.string('Supporting text'),
11
- // text: figma.string('heading'),
12
- // },
13
- // example: ({ helperText, text }) => (
14
- // <SectionHeader text={text} helperText={helperText} />
15
- // ),
16
- // }
17
- // );
5
+ /**
6
+ * -- This file was auto-generated by Code Connect --
7
+ * None of your props could be automatically mapped to Figma properties.
8
+ * You should update the `props` object to include a mapping from your
9
+ * code props to Figma properties, and update the `example` function to
10
+ * return the code example you'd like to see in Figma
11
+ */
12
+
13
+ figma.connect(
14
+ SectionHeader,
15
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=9092%3A3352",
16
+ {
17
+ props: {
18
+ // No matching props could be found for these Figma properties:
19
+ // "trailingContent": figma.boolean('Trailing content?'),
20
+ // "helperText": figma.boolean('Helper text?'),
21
+ // "helperText": figma.string('Helper text'),
22
+ // "heading": figma.string('Heading'),
23
+ // "badge": figma.boolean('Badge?'),
24
+ // "state": figma.enum('State', {
25
+ // "Invalid": "invalid",
26
+ // "Default": "default"
27
+ // })
28
+ },
29
+ example: (props) => <SectionHeader />,
30
+ },
31
+ )
@@ -0,0 +1,55 @@
1
+ import figma from '@figma/code-connect';
2
+ import Select from './Select';
3
+
4
+ /**
5
+ * -- This file was auto-generated by Code Connect --
6
+ * `props` includes a mapping from your code props to Figma properties.
7
+ * You should check this is correct, and update the `example` function
8
+ * to return the code example you'd like to see in Figma
9
+ */
10
+
11
+ figma.connect(Select, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=3224%3A995', {
12
+ props: {
13
+ // These props were automatically mapped based on your linked code:
14
+ label: figma.string('Label'),
15
+ placeholder: figma.string('Label'),
16
+ disabled: figma.enum('Variant', {
17
+ Disabled: true,
18
+ }),
19
+ emptyText: figma.string('Helper text'),
20
+ readonly: figma.enum('Variant', {
21
+ 'Read-only': true,
22
+ }),
23
+ collapsable: figma.boolean('Dropdown?'),
24
+ focusable: figma.boolean('Focus?'),
25
+ hasTVPreferredFocus: figma.boolean('Focus?'),
26
+ 'aria-disabled': figma.enum('Variant', {
27
+ Disabled: true,
28
+ }),
29
+ // No matching props could be found for these Figma properties:
30
+ // "helperText": figma.boolean('Helper text?'),
31
+ // "label": figma.string('Label'),
32
+ // "validation": figma.string('Validation'),
33
+ // "helperText": figma.string('Helper text'),
34
+ // "value": figma.string('Value'),
35
+ // "dropdown": figma.boolean('Dropdown?'),
36
+ // "optional": figma.boolean('Optional?'),
37
+ // "valueType": figma.enum('Value type', {
38
+ // "Empty": "empty",
39
+ // "Placeholder": "placeholder",
40
+ // "Selected": "selected"
41
+ // })
42
+ },
43
+ example: props => (
44
+ <Select
45
+ label={props.label}
46
+ placeholder={props.placeholder}
47
+ disabled={props.disabled}
48
+ emptyText={props.emptyText}
49
+ readonly={props.readonly}
50
+ collapsable={props.collapsable}
51
+ focusable={props.focusable}
52
+ hasTVPreferredFocus={props.hasTVPreferredFocus}
53
+ />
54
+ ),
55
+ });
@@ -0,0 +1,36 @@
1
+ import figma from '@figma/code-connect';
2
+ import SelectOption from './SelectOption';
3
+
4
+ /**
5
+ * -- This file was auto-generated by Code Connect --
6
+ * `props` includes a mapping from your code props to Figma properties.
7
+ * You should check this is correct, and update the `example` function
8
+ * to return the code example you'd like to see in Figma
9
+ */
10
+
11
+ figma.connect(
12
+ SelectOption,
13
+ 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=4340%3A1252',
14
+ {
15
+ props: {
16
+ // These props were automatically mapped based on your linked code:
17
+ label: figma.string('Label'),
18
+ selected: figma.boolean('Selected?'),
19
+ disabled: figma.enum('State', {
20
+ Active: true,
21
+ }),
22
+ // No matching props could be found for these Figma properties:
23
+ // "label": figma.string('Label'),
24
+ // "icon": figma.boolean('Icon?'),
25
+ // "icon20": figma.instance('Icon-20')
26
+ },
27
+ example: props => (
28
+ <SelectOption
29
+ label={props.label}
30
+ value={null}
31
+ selected={props.selected}
32
+ disabled={props.disabled}
33
+ />
34
+ ),
35
+ }
36
+ );
@@ -1,19 +1,27 @@
1
- import figma from '@figma/code-connect';
2
- import { color } from '@utilitywarehouse/hearth-tokens/js';
3
- import { Spinner } from './';
1
+ import React from "react"
2
+ import Spinner from "./Spinner"
3
+ import figma from "@figma/code-connect"
4
+
5
+ /**
6
+ * -- This file was auto-generated by Code Connect --
7
+ * `props` includes a mapping from your code props to Figma properties.
8
+ * You should check this is correct, and update the `example` function
9
+ * to return the code example you'd like to see in Figma
10
+ */
4
11
 
5
12
  figma.connect(
6
13
  Spinner,
7
- 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components?node-id=61-195&t=j6vWFfxRVLbnAYhY-4',
14
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=61%3A195",
8
15
  {
9
16
  props: {
10
- size: figma.enum('Size', {
11
- 'XS-20': 'xs',
12
- 'SM-24': 'sm',
13
- 'MD-32': 'md',
14
- 'LG-44': 'lg',
17
+ // These props were automatically mapped based on your linked code:
18
+ size: figma.enum("Size", {
19
+ "XS-20": "xs",
20
+ "SM-24": "sm",
21
+ "MD-32": "md",
22
+ "LG-44": "lg",
15
23
  }),
16
24
  },
17
- example: ({ size }) => <Spinner size={size} color={color.purple['700']} />,
18
- }
19
- );
25
+ example: (props) => <Spinner size={props.size} />,
26
+ },
27
+ )