@utilitywarehouse/hearth-react-native 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-lint.log +1 -1
  3. package/CHANGELOG.md +16 -0
  4. package/build/components/Accordion/AccordionTrigger.js +1 -1
  5. package/build/components/Banner/Banner.context.d.ts +7 -0
  6. package/build/components/Banner/Banner.context.js +8 -0
  7. package/build/components/Banner/Banner.js +10 -40
  8. package/build/components/Banner/Banner.props.d.ts +3 -5
  9. package/build/components/Banner/BannerIllustration.d.ts +4 -0
  10. package/build/components/Banner/BannerIllustration.js +53 -0
  11. package/build/components/Banner/BannerImage.d.ts +4 -0
  12. package/build/components/Banner/BannerImage.js +53 -0
  13. package/build/components/Banner/index.d.ts +2 -0
  14. package/build/components/Banner/index.js +2 -0
  15. package/build/components/Card/CardAction/CardAction.props.d.ts +2 -3
  16. package/build/components/Card/CardAction/CardActionRoot.js +1 -2
  17. package/build/components/Checkbox/Checkbox.js +1 -2
  18. package/build/components/Checkbox/Checkbox.props.d.ts +3 -3
  19. package/build/components/Checkbox/CheckboxImage.d.ts +2 -1
  20. package/build/components/Checkbox/CheckboxImage.js +8 -1
  21. package/build/components/Checkbox/CheckboxIndicator.js +3 -3
  22. package/build/components/DatePicker/DatePickerDay.js +3 -3
  23. package/build/components/ExpandableCard/ExpandableCard.props.d.ts +1 -2
  24. package/build/components/ExpandableCard/ExpandableCardTrigger.props.d.ts +4 -5
  25. package/build/components/ExpandableCard/ExpandableCardTriggerRoot.js +1 -14
  26. package/build/components/HighlightBanner/HighlightBanner.js +2 -6
  27. package/build/components/HighlightBanner/HighlightBanner.props.d.ts +2 -3
  28. package/build/components/HighlightBanner/HighlightBannerImage.d.ts +4 -0
  29. package/build/components/HighlightBanner/HighlightBannerImage.js +18 -0
  30. package/build/components/HighlightBanner/index.d.ts +1 -0
  31. package/build/components/HighlightBanner/index.js +1 -0
  32. package/build/components/Input/Input.d.ts +5 -7
  33. package/build/components/Input/Input.js +11 -4
  34. package/build/components/Input/InputField.d.ts +4 -7
  35. package/build/components/Input/InputField.js +6 -5
  36. package/build/components/List/ListItem/ListItem.props.d.ts +2 -2
  37. package/build/components/List/ListItem/ListItemRoot.js +1 -2
  38. package/build/components/Modal/Modal.js +2 -6
  39. package/build/components/Modal/Modal.props.d.ts +3 -2
  40. package/build/components/Modal/Modal.web.js +2 -6
  41. package/build/components/Modal/ModalImage.d.ts +4 -0
  42. package/build/components/Modal/ModalImage.js +18 -0
  43. package/build/components/Modal/index.d.ts +1 -0
  44. package/build/components/Modal/index.js +1 -0
  45. package/build/components/PillGroup/Pill.js +2 -2
  46. package/build/components/Radio/Radio.js +1 -2
  47. package/build/components/Radio/Radio.props.d.ts +3 -3
  48. package/build/components/Radio/RadioImage.d.ts +2 -1
  49. package/build/components/Radio/RadioImage.js +8 -1
  50. package/build/components/Radio/RadioIndicator.js +3 -3
  51. package/build/components/RadioCard/RadioCardIndicator.js +3 -3
  52. package/build/components/RadioCard/RadioCardRoot.js +3 -3
  53. package/build/components/Tabs/Tab.js +5 -5
  54. package/build/components/ToggleButton/ToggleButtonRoot.js +2 -2
  55. package/build/components/ToggleButtonCard/ToggleButtonCardRoot.js +3 -3
  56. package/build/components/UnstyledIconButton/UnstyledIconButtonRoot.js +1 -1
  57. package/build/components/VerificationInput/VerificationInput.d.ts +6 -0
  58. package/build/components/VerificationInput/VerificationInput.js +35 -0
  59. package/build/components/VerificationInput/VerificationInput.props.d.ts +49 -0
  60. package/build/components/VerificationInput/VerificationInput.props.js +1 -0
  61. package/build/components/VerificationInput/VerificationInputSlot.d.ts +9 -0
  62. package/build/components/VerificationInput/VerificationInputSlot.js +72 -0
  63. package/build/components/VerificationInput/index.d.ts +4 -0
  64. package/build/components/VerificationInput/index.js +3 -0
  65. package/build/components/VerificationInput/useVerificationInput.d.ts +14 -0
  66. package/build/components/VerificationInput/useVerificationInput.js +58 -0
  67. package/build/components/index.d.ts +1 -0
  68. package/build/components/index.js +1 -0
  69. package/build/utils/index.d.ts +2 -1
  70. package/build/utils/index.js +2 -1
  71. package/build/utils/isThemedImageProps.d.ts +4 -0
  72. package/build/utils/isThemedImageProps.js +4 -0
  73. package/docs/components/AllComponents.web.tsx +9 -0
  74. package/package.json +11 -12
  75. package/src/components/Accordion/Accordion.figma.tsx +23 -0
  76. package/src/components/Accordion/AccordionItemRoot.figma.tsx +47 -0
  77. package/src/components/Accordion/AccordionTrigger.tsx +1 -1
  78. package/src/components/Alert/Alert.figma.tsx +47 -0
  79. package/src/components/Avatar/Avatar.figma.tsx +33 -0
  80. package/src/components/Badge/Badge.figma.tsx +48 -24
  81. package/src/components/Banner/Banner.context.ts +11 -0
  82. package/src/components/Banner/Banner.docs.mdx +55 -37
  83. package/src/components/Banner/Banner.figma.tsx +15 -0
  84. package/src/components/Banner/Banner.props.ts +3 -5
  85. package/src/components/Banner/Banner.stories.tsx +86 -57
  86. package/src/components/Banner/Banner.tsx +24 -67
  87. package/src/components/Banner/BannerIllustration.figma.tsx +30 -0
  88. package/src/components/Banner/BannerIllustration.tsx +63 -0
  89. package/src/components/Banner/BannerImage.tsx +63 -0
  90. package/src/components/Banner/index.ts +2 -0
  91. package/src/components/BottomSheet/BottomSheetModal.figma.tsx +20 -0
  92. package/src/components/Button/Button.figma.tsx +60 -229
  93. package/src/components/Card/Card.docs.mdx +4 -4
  94. package/src/components/Card/Card.figma.tsx +43 -71
  95. package/src/components/Card/CardAction/CardAction.figma.tsx +44 -0
  96. package/src/components/Card/CardAction/CardAction.props.ts +2 -3
  97. package/src/components/Card/CardAction/CardAction.stories.tsx +5 -4
  98. package/src/components/Card/CardAction/CardActionRoot.tsx +4 -5
  99. package/src/components/Carousel/Carousel.figma.tsx +19 -0
  100. package/src/components/Checkbox/Checkbox.docs.mdx +23 -4
  101. package/src/components/Checkbox/Checkbox.figma.tsx +26 -41
  102. package/src/components/Checkbox/Checkbox.props.ts +3 -3
  103. package/src/components/Checkbox/Checkbox.stories.tsx +14 -8
  104. package/src/components/Checkbox/Checkbox.tsx +1 -2
  105. package/src/components/Checkbox/CheckboxGroup.figma.tsx +20 -0
  106. package/src/components/Checkbox/CheckboxImage.figma.tsx +27 -0
  107. package/src/components/Checkbox/CheckboxImage.tsx +8 -3
  108. package/src/components/Checkbox/CheckboxIndicator.tsx +3 -3
  109. package/src/components/Checkbox/CheckboxTileRoot.figma.tsx +32 -0
  110. package/src/components/CurrencyInput/CurrencyInput.figma.tsx +56 -0
  111. package/src/components/DateInput/DateInput.figma.tsx +75 -0
  112. package/src/components/DatePicker/DatePickerCalendar.figma.tsx +34 -0
  113. package/src/components/DatePicker/DatePickerDay.tsx +3 -3
  114. package/src/components/DatePickerInput/DatePickerInput.figma.tsx +62 -0
  115. package/src/components/DescriptionList/DescriptionList.figma.tsx +23 -0
  116. package/src/components/Divider/Divider.figma.tsx +23 -18
  117. package/src/components/ExpandableCard/ExpandableCard.docs.mdx +2 -2
  118. package/src/components/ExpandableCard/ExpandableCard.figma.tsx +54 -0
  119. package/src/components/ExpandableCard/ExpandableCard.props.ts +1 -2
  120. package/src/components/ExpandableCard/ExpandableCard.stories.tsx +3 -3
  121. package/src/components/ExpandableCard/ExpandableCardGroup.figma.tsx +23 -0
  122. package/src/components/ExpandableCard/ExpandableCardTrigger.props.ts +4 -5
  123. package/src/components/ExpandableCard/ExpandableCardTriggerRoot.tsx +2 -17
  124. package/src/components/FormField/FormField.figma.tsx +23 -0
  125. package/src/components/Helper/HelperText.figma.tsx +23 -0
  126. package/src/components/HighlightBanner/HighlightBanner.docs.mdx +73 -42
  127. package/src/components/HighlightBanner/HighlightBanner.props.ts +2 -3
  128. package/src/components/HighlightBanner/HighlightBanner.stories.tsx +85 -60
  129. package/src/components/HighlightBanner/HighlightBanner.tsx +3 -10
  130. package/src/components/HighlightBanner/HighlightBannerImage.tsx +20 -0
  131. package/src/components/HighlightBanner/index.ts +1 -0
  132. package/src/components/IconButton/IconButton.figma.tsx +55 -161
  133. package/src/components/IconContainer/IconContainer.figma.tsx +50 -0
  134. package/src/components/InlineLink/InlineLink.figma.tsx +33 -0
  135. package/src/components/Input/Input.figma.tsx +52 -110
  136. package/src/components/Input/Input.stories.tsx +76 -3
  137. package/src/components/Input/Input.tsx +110 -98
  138. package/src/components/Input/InputField.tsx +27 -26
  139. package/src/components/Label/Label.figma.tsx +24 -0
  140. package/src/components/Link/Link.figma.tsx +42 -0
  141. package/src/components/List/List.docs.mdx +15 -9
  142. package/src/components/List/List.figma.tsx +29 -108
  143. package/src/components/List/List.stories.tsx +2 -2
  144. package/src/components/List/ListAction/ListAction.figma.tsx +29 -0
  145. package/src/components/List/ListItem/ListItem.figma.tsx +40 -220
  146. package/src/components/List/ListItem/ListItem.props.ts +2 -2
  147. package/src/components/List/ListItem/ListItemLeadingContent.figma.tsx +29 -0
  148. package/src/components/List/ListItem/ListItemRoot.tsx +2 -3
  149. package/src/components/List/ListItem/ListItemTrailingContent.figma.tsx +27 -0
  150. package/src/components/Menu/Menu.figma.tsx +30 -0
  151. package/src/components/Menu/MenuItem.figma.tsx +31 -0
  152. package/src/components/Modal/Modal.docs.mdx +16 -4
  153. package/src/components/Modal/Modal.figma.tsx +56 -0
  154. package/src/components/Modal/Modal.props.ts +3 -2
  155. package/src/components/Modal/Modal.stories.tsx +2 -5
  156. package/src/components/Modal/Modal.tsx +2 -6
  157. package/src/components/Modal/Modal.web.tsx +2 -6
  158. package/src/components/Modal/ModalImage.tsx +20 -0
  159. package/src/components/Modal/index.ts +1 -0
  160. package/src/components/PillGroup/Pill.figma.tsx +25 -0
  161. package/src/components/PillGroup/Pill.tsx +3 -3
  162. package/src/components/PillGroup/PillGroup.figma.tsx +21 -0
  163. package/src/components/PillGroup/PillGroup.stories.tsx +1 -1
  164. package/src/components/ProgressStepper/ProgressStep.figma.tsx +30 -0
  165. package/src/components/ProgressStepper/ProgressStepper.figma.tsx +20 -0
  166. package/src/components/Radio/Radio.docs.mdx +21 -8
  167. package/src/components/Radio/Radio.figma.tsx +22 -42
  168. package/src/components/Radio/Radio.props.ts +3 -3
  169. package/src/components/Radio/Radio.stories.tsx +15 -11
  170. package/src/components/Radio/Radio.tsx +1 -2
  171. package/src/components/Radio/RadioGroup.figma.tsx +54 -0
  172. package/src/components/Radio/RadioImage.figma.tsx +27 -0
  173. package/src/components/Radio/RadioImage.tsx +8 -3
  174. package/src/components/Radio/RadioIndicator.tsx +3 -3
  175. package/src/components/Radio/RadioTileRoot.figma.tsx +31 -0
  176. package/src/components/RadioCard/RadioCardIndicator.tsx +3 -3
  177. package/src/components/RadioCard/RadioCardRoot.tsx +3 -3
  178. package/src/components/SectionHeader/SectionHeader.figma.tsx +30 -16
  179. package/src/components/Select/Select.figma.tsx +55 -0
  180. package/src/components/Select/SelectOption.figma.tsx +36 -0
  181. package/src/components/Spinner/Spinner.figma.tsx +20 -12
  182. package/src/components/Switch/Switch.figma.tsx +31 -23
  183. package/src/components/Tabs/Tab.tsx +5 -5
  184. package/src/components/Tabs/Tabs.figma.tsx +29 -0
  185. package/src/components/ThemedImage/ThemedImage.stories.tsx +1 -1
  186. package/src/components/Toast/ToastItem.figma.tsx +22 -0
  187. package/src/components/ToggleButton/ToggleButtonRoot.tsx +2 -2
  188. package/src/components/ToggleButtonCard/ToggleButtonCardRoot.tsx +3 -3
  189. package/src/components/UnstyledIconButton/UnstyledIconButton.figma.tsx +49 -0
  190. package/src/components/UnstyledIconButton/UnstyledIconButtonRoot.tsx +1 -1
  191. package/src/components/VerificationInput/VerificationInput.docs.mdx +68 -0
  192. package/src/components/VerificationInput/VerificationInput.props.ts +52 -0
  193. package/src/components/VerificationInput/VerificationInput.stories.tsx +140 -0
  194. package/src/components/VerificationInput/VerificationInput.tsx +89 -0
  195. package/src/components/VerificationInput/VerificationInputSlot.tsx +94 -0
  196. package/src/components/VerificationInput/index.ts +5 -0
  197. package/src/components/VerificationInput/useVerificationInput.ts +72 -0
  198. package/src/components/index.ts +1 -0
  199. package/src/utils/index.ts +2 -1
  200. package/src/utils/isThemedImageProps.ts +8 -0
  201. package/src/components/Checkbox/CheckboxIndicator.figma.tsx +0 -19
  202. package/src/components/Radio/RadioIndicator.figma.tsx +0 -21
@@ -1,44 +1,29 @@
1
- import { Checkbox } from './';
2
1
  import figma from '@figma/code-connect';
2
+ import { Checkbox } from './Checkbox';
3
3
 
4
- const props = {
5
- isDisabled: figma.boolean('isDisabled'),
6
- invalid: figma.boolean('invalid'),
7
- label: figma.nestedProps('Label', {
8
- text: figma.string('Label Text'),
9
- }),
10
- helperText: figma.nestedProps('Helper Text', {
11
- text: figma.string('Text'),
12
- }),
13
- invalidText: figma.boolean('invalid', {
14
- true: figma.nestedProps('Helper Text', {
15
- text: figma.string('Text'),
16
- showIcon: figma.boolean('showIcon?'),
17
- }),
18
- false: {
19
- text: undefined,
20
- showIcon: undefined,
21
- },
22
- }),
23
- };
24
-
25
- figma.connect(
26
- Checkbox,
27
- 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=5623-561&m=dev',
28
- {
29
- props,
30
- example: ({ isDisabled, label, helperText, invalidText }) => (
31
- <Checkbox
32
- value="some-value"
33
- onChange={(isChecked: boolean) => console.log(isChecked)}
34
- disabled={isDisabled}
35
- label={label.text}
36
- helperText={helperText.text}
37
- invalidText={invalidText.text}
38
- showValidationIcon={invalidText.showIcon}
39
- />
40
- ),
41
- }
42
- );
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
+ */
43
10
 
44
- // TODO: Add variants with helperText when it's implemented
11
+ figma.connect(Checkbox, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=3087%3A7316', {
12
+ props: {
13
+ // These props were automatically mapped based on your linked code:
14
+ disabled: figma.enum('State', {
15
+ Disabled: true,
16
+ }),
17
+ checked: figma.boolean('Checked?'),
18
+ 'aria-disabled': figma.enum('State', {
19
+ Disabled: true,
20
+ }),
21
+ // No matching props could be found for these Figma properties:
22
+ // "label": figma.string('Label'),
23
+ // "helperText": figma.string('Helper text'),
24
+ // "helperText": figma.boolean('Helper text?'),
25
+ // "validationText": figma.string('Validation text'),
26
+ // "image": figma.boolean('Image?')
27
+ },
28
+ example: props => <Checkbox disabled={props.disabled} checked={props.checked} />,
29
+ });
@@ -1,5 +1,5 @@
1
- import type { ComponentType } from 'react';
2
- import type { ImageProps, PressableProps, ViewProps } from 'react-native';
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ import type { PressableProps, ViewProps } from 'react-native';
3
3
 
4
4
  type CheckboxBaseProps = {
5
5
  onChange?: (isSelected: boolean) => void;
@@ -37,7 +37,7 @@ type CheckboxWithoutChildrenProps = {
37
37
  invalidText?: string;
38
38
  validText?: string;
39
39
  showValidationIcon?: boolean;
40
- image?: ImageProps;
40
+ image?: ReactNode;
41
41
  } & CheckboxBaseProps;
42
42
 
43
43
  type CheckboxProps = CheckboxWithChildrenProps | CheckboxWithoutChildrenProps;
@@ -1,7 +1,7 @@
1
- import { Meta, StoryObj } from '@storybook/react-vite';
1
+ import { Meta, StoryObj } from '@storybook/react-native';
2
2
  import React, { useEffect } from 'react';
3
3
  import { ImageSourcePropType } from 'react-native';
4
- import { Checkbox, CheckboxGroup } from '.';
4
+ import { Checkbox, CheckboxGroup, CheckboxImage } from '.';
5
5
  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';
@@ -106,7 +106,12 @@ export const WithImage: Story = {
106
106
  {...args}
107
107
  value="visa"
108
108
  label="Visa"
109
- image={{ source: bankLogo1 as ImageSourcePropType, style: { width: 40, height: 24 } }}
109
+ image={
110
+ <CheckboxImage
111
+ source={bankLogo1 as ImageSourcePropType}
112
+ style={{ width: 40, height: 24 }}
113
+ />
114
+ }
110
115
  />
111
116
  <Checkbox
112
117
  aria-label="Mastercard"
@@ -117,11 +122,12 @@ export const WithImage: Story = {
117
122
  {...args}
118
123
  value="mastercard"
119
124
  label="Mastercard"
120
- image={{
121
- source: bankLogo as ImageSourcePropType,
122
- style: { width: 40, height: 24 },
123
- resizeMode: 'contain',
124
- }}
125
+ image={
126
+ <CheckboxImage
127
+ source={bankLogo as ImageSourcePropType}
128
+ style={{ width: 40, height: 24, resizeMode: 'contain' }}
129
+ />
130
+ }
125
131
  />
126
132
  </CheckboxGroup>
127
133
  ),
@@ -5,7 +5,6 @@ import CheckboxProps from './Checkbox.props';
5
5
  import { useCheckboxGroupContext } from './CheckboxGroup.context';
6
6
  import StyledCheckboxGroup from './CheckboxGroupRoot';
7
7
  import StyledCheckboxIcon from './CheckboxIcon';
8
- import CheckboxImage from './CheckboxImage';
9
8
  import StyledCheckboxIndicator from './CheckboxIndicator';
10
9
  import StyledCheckboxLabel from './CheckboxLabel';
11
10
  import StyledCheckbox from './CheckboxRoot';
@@ -57,7 +56,7 @@ const Checkbox = ({
57
56
  <CheckboxIndicator>
58
57
  <CheckboxIcon />
59
58
  </CheckboxIndicator>
60
- {image ? <CheckboxImage {...image} /> : null}
59
+ {image ? image : null}
61
60
  <CheckboxTextContent>
62
61
  {!!label && <CheckboxLabel>{label}</CheckboxLabel>}
63
62
  {!!helperText && <Helper disabled={disabled} icon={helperIcon} text={helperText} />}
@@ -0,0 +1,20 @@
1
+ import React from "react"
2
+ import CheckboxGroup from "./CheckboxGroup"
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
+ CheckboxGroup,
15
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=3141%3A4275",
16
+ {
17
+ props: {},
18
+ example: (props) => <CheckboxGroup />,
19
+ },
20
+ )
@@ -0,0 +1,27 @@
1
+ import React from "react"
2
+ import CheckboxImage from "./CheckboxImage"
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
+ CheckboxImage,
15
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=7428%3A3207",
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) => <CheckboxImage />,
26
+ },
27
+ )
@@ -1,8 +1,13 @@
1
1
  import { Image, ImageProps } from 'react-native';
2
+ import { isThemedImageProps } from '../../utils';
3
+ import { ThemedImage, ThemedImageProps } from '../ThemedImage';
2
4
 
3
- const CheckboxImage = ({ source, style, ...props }: ImageProps) => (
4
- <Image source={source} style={style} {...props} />
5
- );
5
+ const CheckboxImage = ({ ...props }: ImageProps | ThemedImageProps) => {
6
+ if (isThemedImageProps(props)) {
7
+ return <ThemedImage {...props} />;
8
+ }
9
+ return <Image {...props} />;
10
+ };
6
11
 
7
12
  CheckboxImage.displayName = 'CheckboxImage';
8
13
 
@@ -35,9 +35,9 @@ const styles = StyleSheet.create(theme => ({
35
35
  _hover: {
36
36
  outlineColor: theme.components.checkbox.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.checkbox.outlineColorActive,
43
43
  },
@@ -0,0 +1,32 @@
1
+ import React from "react"
2
+ import CheckboxTileRoot from "./CheckboxTileRoot"
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
+ CheckboxTileRoot,
15
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=4961%3A23797",
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
+ // "Invalid": "invalid",
26
+ // "Focus": "focus"
27
+ // }),
28
+ // "checked": figma.boolean('Checked?')
29
+ },
30
+ example: (props) => <CheckboxTileRoot />,
31
+ },
32
+ )
@@ -0,0 +1,56 @@
1
+ import React from "react"
2
+ import CurrencyInput from "./CurrencyInput"
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
+ CurrencyInput,
14
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=2161%3A1336",
15
+ {
16
+ props: {
17
+ // These props were automatically mapped based on your linked code:
18
+ focused: figma.boolean("Focus?"),
19
+ placeholder: figma.string("Label"),
20
+ autoFocus: figma.boolean("Focus?"),
21
+ defaultValue: figma.string("Value"),
22
+ value: figma.string("Value"),
23
+ focusable: figma.boolean("Focus?"),
24
+ hasTVPreferredFocus: figma.boolean("Focus?"),
25
+ // No matching props could be found for these Figma properties:
26
+ // "validation": figma.string('Validation'),
27
+ // "helperText": figma.string('Helper text'),
28
+ // "label": figma.string('Label'),
29
+ // "value": figma.string('Value'),
30
+ // "helperText": figma.boolean('Helper text?'),
31
+ // "state": figma.enum('State', {
32
+ // "Default": "default",
33
+ // "Invalid": "invalid"
34
+ // }),
35
+ // "valueType": figma.enum('Value type', {
36
+ // "Placeholder": "placeholder",
37
+ // "Filled": "filled"
38
+ // }),
39
+ // "labelVariant": figma.enum('Label variant', {
40
+ // "Body": "body",
41
+ // "Heading": "heading"
42
+ // })
43
+ },
44
+ example: (props) => (
45
+ <CurrencyInput
46
+ focused={props.focused}
47
+ placeholder={props.placeholder}
48
+ autoFocus={props.autoFocus}
49
+ defaultValue={props.defaultValue}
50
+ value={props.value}
51
+ focusable={props.focusable}
52
+ hasTVPreferredFocus={props.hasTVPreferredFocus}
53
+ />
54
+ ),
55
+ },
56
+ )
@@ -0,0 +1,75 @@
1
+ import React from "react"
2
+ import DateInput from "./DateInput"
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
+ DateInput,
14
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=2277%3A14708",
15
+ {
16
+ props: {
17
+ // These props were automatically mapped based on your linked code:
18
+ hideDay: figma.boolean("Day?"),
19
+ hideMonth: figma.boolean("Month?"),
20
+ monthPlaceholder: figma.string("Month value"),
21
+ yearPlaceholder: figma.string("Year value"),
22
+ dayValue: figma.string("Day value"),
23
+ monthValue: figma.string("Month value"),
24
+ yearValue: figma.string("Year value"),
25
+ disabled: figma.enum("State", {
26
+ Disabled: true,
27
+ }),
28
+ readonly: figma.enum("State", {
29
+ "Read-only": true,
30
+ }),
31
+ label: figma.string("Label"),
32
+ helperText: figma.string("Helper text"),
33
+ validText: figma.string("Validation"),
34
+ invalidText: figma.string("Helper text"),
35
+ // No matching props could be found for these Figma properties:
36
+ // "helperText": figma.boolean('Helper text?'),
37
+ // "label": figma.string('Label'),
38
+ // "validation": figma.string('Validation'),
39
+ // "helperText": figma.string('Helper text'),
40
+ // "dayValue": figma.string('Day value'),
41
+ // "day": figma.boolean('Day?'),
42
+ // "month": figma.boolean('Month?'),
43
+ // "monthValue": figma.string('Month value'),
44
+ // "yearValue": figma.string('Year value'),
45
+ // "optional": figma.boolean('Optional?'),
46
+ // "valueType": figma.enum('Value type', {
47
+ // "Empty": "empty",
48
+ // "Placeholder": "placeholder",
49
+ // "Filled": "filled"
50
+ // }),
51
+ // "focus": figma.boolean('Focus?'),
52
+ // "labelVariant": figma.enum('Label variant', {
53
+ // "Body": "body",
54
+ // "Heading": "heading"
55
+ // })
56
+ },
57
+ example: (props) => (
58
+ <DateInput
59
+ hideDay={props.hideDay}
60
+ hideMonth={props.hideMonth}
61
+ monthPlaceholder={props.monthPlaceholder}
62
+ yearPlaceholder={props.yearPlaceholder}
63
+ dayValue={props.dayValue}
64
+ monthValue={props.monthValue}
65
+ yearValue={props.yearValue}
66
+ disabled={props.disabled}
67
+ readonly={props.readonly}
68
+ label={props.label}
69
+ helperText={props.helperText}
70
+ validText={props.validText}
71
+ invalidText={props.invalidText}
72
+ />
73
+ ),
74
+ },
75
+ )
@@ -0,0 +1,34 @@
1
+ import React from "react"
2
+ import DatePickerCalendar from "./DatePickerCalendar"
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
+ DatePickerCalendar,
15
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=3797%3A6383",
16
+ {
17
+ props: {
18
+ // No matching props could be found for these Figma properties:
19
+ // "grabber": figma.boolean('Grabber?'),
20
+ // "header": figma.boolean('Header?'),
21
+ // "footer": figma.boolean('Footer?'),
22
+ // "deviceType": figma.enum('Device type', {
23
+ // "Desktop": "desktop",
24
+ // "Mobile": "mobile"
25
+ // }),
26
+ // "type": figma.enum('Type', {
27
+ // "Day": "day",
28
+ // "Month": "month",
29
+ // "Year": "year"
30
+ // })
31
+ },
32
+ example: (props) => <DatePickerCalendar />,
33
+ },
34
+ )
@@ -189,9 +189,9 @@ const styles = StyleSheet.create(theme => ({
189
189
  },
190
190
  ],
191
191
  _web: {
192
- '_focus-visible': {
193
- ...theme.helpers.focusVisible,
194
- },
192
+ // '_focus-visible': {
193
+ // ...theme.helpers.focusVisible,
194
+ // },
195
195
  _active: {
196
196
  backgroundColor: theme.color.interactive.functional.surface.subtle.active,
197
197
  },
@@ -0,0 +1,62 @@
1
+ import figma from '@figma/code-connect';
2
+ import DatePickerInput from './DatePickerInput';
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
+ DatePickerInput,
13
+ 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=3917%3A7057',
14
+ {
15
+ props: {
16
+ // These props were automatically mapped based on your linked code:
17
+ disabled: figma.enum('Variant', {
18
+ Disabled: true,
19
+ }),
20
+ readonly: figma.enum('Variant', {
21
+ 'Read-only': true,
22
+ }),
23
+ focused: figma.boolean('Focus?'),
24
+ placeholder: figma.string('Label'),
25
+ autoFocus: figma.boolean('Focus?'),
26
+ defaultValue: figma.string('Value'),
27
+ readOnly: figma.enum('Variant', {
28
+ 'Read-only': true,
29
+ }),
30
+ focusable: figma.boolean('Focus?'),
31
+ hasTVPreferredFocus: figma.boolean('Focus?'),
32
+ 'aria-disabled': figma.enum('Variant', {
33
+ Disabled: true,
34
+ }),
35
+ // No matching props could be found for these Figma properties:
36
+ // "helperText": figma.boolean('Helper text?'),
37
+ // "label": figma.string('Label'),
38
+ // "validation": figma.string('Validation'),
39
+ // "helperText": figma.string('Helper text'),
40
+ // "value": figma.string('Value'),
41
+ // "icon": figma.boolean('Icon?'),
42
+ // "calendar": figma.boolean('Calendar?'),
43
+ // "valueType": figma.enum('Value type', {
44
+ // "Empty": "empty",
45
+ // "Placeholder": "placeholder",
46
+ // "Filled": "filled"
47
+ // })
48
+ },
49
+ example: props => (
50
+ <DatePickerInput
51
+ disabled={props.disabled}
52
+ readonly={props.readonly}
53
+ focused={props.focused}
54
+ placeholder={props.placeholder}
55
+ autoFocus={props.autoFocus}
56
+ defaultValue={props.defaultValue}
57
+ readOnly={props.readOnly}
58
+ focusable={props.focusable}
59
+ />
60
+ ),
61
+ }
62
+ );
@@ -0,0 +1,23 @@
1
+ import React from "react"
2
+ import DescriptionList from "./DescriptionList"
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
+ DescriptionList,
15
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=7247%3A4636",
16
+ {
17
+ props: {
18
+ // No matching props could be found for these Figma properties:
19
+ // "sectionHeader": figma.boolean('Section header?')
20
+ },
21
+ example: (props) => <DescriptionList />,
22
+ },
23
+ )
@@ -1,20 +1,25 @@
1
- //
2
- // import { Divider } from './';
3
- // import figma from '@figma/code-connect';
1
+ import React from "react"
2
+ import Divider from "./Divider"
3
+ import figma from "@figma/code-connect"
4
4
 
5
- // /**
6
- // * -- This file was auto-generated by Code Connect --
7
- // * `props` includes a mapping from Figma properties and variants to
8
- // * suggested values. You should update this to match the props of your
9
- // * code component, and update the `example` function to return the
10
- // * code example you'd like to see in Figma
11
- // */
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
+ */
12
11
 
13
- // figma.connect(
14
- // Divider,
15
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=8951-448&t=AlTwUg7LBLngn5z6-4',
16
- // {
17
- // props: {},
18
- // example: () => <Divider />,
19
- // }
20
- // );
12
+ figma.connect(
13
+ Divider,
14
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=2421%3A1687",
15
+ {
16
+ props: {
17
+ // These props were automatically mapped based on your linked code:
18
+ orientation: figma.enum("Orientation", {
19
+ Horizontal: "horizontal",
20
+ Vertical: "vertical",
21
+ }),
22
+ },
23
+ example: (props) => <Divider orientation={props.orientation} />,
24
+ },
25
+ )
@@ -64,7 +64,7 @@ const MyComponent = () => (
64
64
  | `helperText` | `string` | - | Optional helper text displayed below the heading |
65
65
  | `leadingIcon` | `ComponentType` | - | Leading icon component (automatically wrapped) |
66
66
  | `leadingContent` | `ReactNode` | - | Leading content (icon or custom element) |
67
- | `badge` | `BadgeProps` | - | Badge to display |
67
+ | `badge` | `ReactNode` | - | Badge to display |
68
68
  | `badgePosition` | `'top' \| 'bottom'` | `'bottom'` | Badge position |
69
69
  | `numericValue` | `string \| number` | - | Numeric value to display on the right |
70
70
  | `expandedContent` | `ReactNode` | - | The content to show when expanded |
@@ -152,7 +152,7 @@ const MyComponent = () => (
152
152
  <ExpandableCard
153
153
  heading="New Feature"
154
154
  helperText="Check out what's new"
155
- badge={{ text: 'New', colorScheme: 'cyan' }}
155
+ badge={<Badge text="New" colorScheme="cyan" />}
156
156
  expandedContent={<BodyText>We've added new features to improve your experience.</BodyText>}
157
157
  />
158
158
  ```
@@ -0,0 +1,54 @@
1
+ import React from "react"
2
+ import ExpandableCard from "./ExpandableCard"
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
+ ExpandableCard,
14
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=7222%3A5935",
15
+ {
16
+ props: {
17
+ // These props were automatically mapped based on your linked code:
18
+ expanded: figma.boolean("Expand?"),
19
+ heading: figma.string("Heading"),
20
+ helperText: figma.string("Helper text"),
21
+ expandedContent: figma.enum("Expand?", {
22
+ False: false,
23
+ True: true,
24
+ }),
25
+ disabled: figma.enum("State", {
26
+ Active: true,
27
+ }),
28
+ collapsable: figma.boolean("Expand?"),
29
+ focusable: figma.enum("State", {
30
+ Focus: true,
31
+ }),
32
+ // No matching props could be found for these Figma properties:
33
+ // "customContent": figma.instance('Custom content'),
34
+ // "heading": figma.string('Heading'),
35
+ // "helperText": figma.string('Helper text'),
36
+ // "helperText": figma.boolean('Helper text?'),
37
+ // "numericalValue": figma.boolean('Numerical value?'),
38
+ // "numericalValue": figma.string('Numerical value'),
39
+ // "leadingContent": figma.boolean('Leading content?'),
40
+ // "badge": figma.boolean('Badge?')
41
+ },
42
+ example: (props) => (
43
+ <ExpandableCard
44
+ expanded={props.expanded}
45
+ heading={props.heading}
46
+ helperText={props.helperText}
47
+ expandedContent={props.expandedContent}
48
+ disabled={props.disabled}
49
+ collapsable={props.collapsable}
50
+ focusable={props.focusable}
51
+ />
52
+ ),
53
+ },
54
+ )