@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,161 +1,55 @@
1
- //
2
- // import { IconButton } from './';
3
- // import figma from '@figma/code-connect';
4
-
5
- // const props = {
6
- // iconxsmall: figma.instance('icon x-small'),
7
- // icon: figma.instance('icon'),
8
- // colorScheme: figma.enum('colorScheme', {
9
- // cyan: 'cyan',
10
- // red: 'red',
11
- // green: 'green',
12
- // gold: 'gold',
13
- // grey: 'functional',
14
- // }),
15
- // size: figma.enum('size', {
16
- // 'medium - 48': 'medium',
17
- // 'small - 32': 'small',
18
- // 'x-small - 24': 'x-small',
19
- // }),
20
- // disabled: figma.enum('state', {
21
- // disabled: true,
22
- // }),
23
- // loading: figma.enum('state', {
24
- // loading: true,
25
- // }),
26
- // inverted: figma.boolean('inverted'),
27
- // };
28
-
29
- // // Solid Button
30
- // figma.connect(
31
- // IconButton,
32
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6678-6454&m=dev',
33
- // {
34
- // props,
35
-
36
- // example: ({ inverted, icon, colorScheme, size, disabled, loading }) => (
37
- // <IconButton
38
- // variant="solid"
39
- // colorScheme={colorScheme}
40
- // size={size}
41
- // onPress={() => console.log('buttonPressed')}
42
- // disabled={disabled}
43
- // icon={icon}
44
- // loading={loading}
45
- // inverted={inverted}
46
- // />
47
- // ),
48
- // }
49
- // );
50
-
51
- // figma.connect(
52
- // IconButton,
53
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6678-6454&m=dev',
54
- // {
55
- // props,
56
- // variant: {
57
- // size: 'x-small - 24',
58
- // },
59
- // example: ({ inverted, iconxsmall, colorScheme, size, disabled, loading }) => (
60
- // <IconButton
61
- // variant="solid"
62
- // colorScheme={colorScheme}
63
- // size={size}
64
- // onPress={() => console.log('buttonPressed')}
65
- // disabled={disabled}
66
- // icon={iconxsmall}
67
- // loading={loading}
68
- // inverted={inverted}
69
- // />
70
- // ),
71
- // }
72
- // );
73
-
74
- // // Outline Button
75
-
76
- // figma.connect(
77
- // IconButton,
78
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6679-7713&m=dev',
79
- // {
80
- // props,
81
- // example: ({ inverted, icon, colorScheme, size, disabled, loading }) => (
82
- // <IconButton
83
- // variant="outline"
84
- // colorScheme={colorScheme}
85
- // size={size}
86
- // onPress={() => console.log('buttonPressed')}
87
- // disabled={disabled}
88
- // icon={icon}
89
- // loading={loading}
90
- // inverted={inverted}
91
- // />
92
- // ),
93
- // }
94
- // );
95
-
96
- // figma.connect(
97
- // IconButton,
98
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6679-7713&m=dev',
99
- // {
100
- // props,
101
- // variant: {
102
- // size: 'x-small - 24',
103
- // },
104
- // example: ({ inverted, iconxsmall, colorScheme, size, disabled, loading }) => (
105
- // <IconButton
106
- // variant="outline"
107
- // colorScheme={colorScheme}
108
- // size={size}
109
- // onPress={() => console.log('buttonPressed')}
110
- // disabled={disabled}
111
- // icon={iconxsmall}
112
- // loading={loading}
113
- // inverted={inverted}
114
- // />
115
- // ),
116
- // }
117
- // );
118
-
119
- // // Ghost Button
120
- // figma.connect(
121
- // IconButton,
122
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6682-8623&m=dev',
123
- // {
124
- // props,
125
- // example: ({ inverted, icon, colorScheme, size, disabled, loading }) => (
126
- // <IconButton
127
- // variant="ghost"
128
- // colorScheme={colorScheme}
129
- // size={size}
130
- // onPress={() => console.log('buttonPressed')}
131
- // disabled={disabled}
132
- // icon={icon}
133
- // loading={loading}
134
- // inverted={inverted}
135
- // />
136
- // ),
137
- // }
138
- // );
139
-
140
- // figma.connect(
141
- // IconButton,
142
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6682-8623&m=dev',
143
- // {
144
- // props,
145
- // variant: {
146
- // size: 'x-small - 24',
147
- // },
148
- // example: ({ inverted, iconxsmall, colorScheme, size, disabled, loading }) => (
149
- // <IconButton
150
- // variant="ghost"
151
- // colorScheme={colorScheme}
152
- // size={size}
153
- // onPress={() => console.log('buttonPressed')}
154
- // disabled={disabled}
155
- // icon={iconxsmall}
156
- // loading={loading}
157
- // inverted={inverted}
158
- // />
159
- // ),
160
- // }
161
- // );
1
+ import figma from '@figma/code-connect';
2
+ import IconButton from './IconButton';
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(IconButton, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=90%3A1455', {
12
+ props: {
13
+ // These props were automatically mapped based on your linked code:
14
+ disabled: figma.enum('State', {
15
+ Disabled: true,
16
+ }),
17
+ size: figma.enum('Size', {
18
+ 'SM-32': 'sm',
19
+ 'MD-48': 'md',
20
+ }),
21
+ loading: figma.enum('State', {
22
+ Loading: true,
23
+ }),
24
+ focusable: figma.enum('State', {
25
+ Focus: true,
26
+ }),
27
+ 'aria-disabled': figma.enum('State', {
28
+ Disabled: true,
29
+ }),
30
+ colorScheme: figma.enum('Color Scheme', {
31
+ Affirmative: 'affirmative',
32
+ Destructive: 'destructive',
33
+ }),
34
+ // No matching props could be found for these Figma properties:
35
+ // "icon24": figma.instance('Icon-24'),
36
+ // "icon20": figma.instance('Icon-20'),
37
+ // "variant": figma.enum('Variant', {
38
+ // "Emphasis": "emphasis",
39
+ // "Solid": "solid",
40
+ // "Outline": "outline",
41
+ // "Ghost": "ghost"
42
+ // }),
43
+ // "inverted": figma.boolean('Inverted?')
44
+ },
45
+ example: props => (
46
+ <IconButton
47
+ disabled={props.disabled}
48
+ size={props.size}
49
+ icon={null}
50
+ loading={props.loading}
51
+ focusable={props.focusable}
52
+ colorScheme={props.colorScheme}
53
+ />
54
+ ),
55
+ });
@@ -0,0 +1,50 @@
1
+ import figma from '@figma/code-connect';
2
+ import IconContainer from './IconContainer';
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
+ IconContainer,
13
+ 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=5462%3A9728',
14
+ {
15
+ props: {
16
+ // These props were automatically mapped based on your linked code:
17
+ size: figma.enum('Size', {
18
+ 'SM-32': 'sm',
19
+ 'MD-48': 'md',
20
+ 'LG-64': 'lg',
21
+ }),
22
+ radiusNone: figma.boolean('Radius None?'),
23
+ variant: figma.enum('Variant', {
24
+ Subtle: 'subtle',
25
+ Emphasis: 'emphasis',
26
+ }),
27
+ color: figma.enum('Color', {
28
+ Pig: 'pig',
29
+ Energy: 'energy',
30
+ Broadband: 'broadband',
31
+ Mobile: 'mobile',
32
+ Insurance: 'insurance',
33
+ Cashback: 'cashback',
34
+ Highlight: 'highlight',
35
+ }),
36
+ // No matching props could be found for these Figma properties:
37
+ // "icon20": figma.instance('Icon-20'),
38
+ // "icon24": figma.instance('Icon-24')
39
+ },
40
+ example: props => (
41
+ <IconContainer
42
+ icon={null}
43
+ size={props.size}
44
+ radiusNone={props.radiusNone}
45
+ variant={props.variant}
46
+ color={props.color}
47
+ />
48
+ ),
49
+ }
50
+ );
@@ -0,0 +1,33 @@
1
+ import React from "react"
2
+ import InlineLink from "./InlineLink"
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
+ InlineLink,
14
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=7051%3A25641",
15
+ {
16
+ props: {
17
+ // These props were automatically mapped based on your linked code:
18
+ inverted: figma.boolean("Inverted?"),
19
+ disabled: figma.enum("State", {
20
+ Active: true,
21
+ }),
22
+ // No matching props could be found for these Figma properties:
23
+ // "iconLeft": figma.boolean('Icon left?'),
24
+ // "iconRight": figma.boolean('Icon right?'),
25
+ // "iconRight": figma.instance('Icon Right'),
26
+ // "iconLeft": figma.instance('Icon Left'),
27
+ // "text": figma.string('Text')
28
+ },
29
+ example: (props) => (
30
+ <InlineLink inverted={props.inverted} disabled={props.disabled} />
31
+ ),
32
+ },
33
+ )
@@ -1,115 +1,57 @@
1
- // import { Input } from './';
2
- // import figma from '@figma/code-connect';
3
- // import { EyeMediumIcon } from '@utilitywarehouse/hearth-react-native-icons';
1
+ import figma from '@figma/code-connect';
2
+ import Input from './Input';
4
3
 
5
4
  /**
6
5
  * -- 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
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
11
9
  */
12
10
 
13
- // figma.connect(
14
- // Input,
15
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=6990-3022&m=dev',
16
- // {
17
- // props: {
18
- // state: figma.enum('state', {
19
- // initial: 'initial',
20
- // focus: 'focus',
21
- // filled: 'filled',
22
- // }),
23
- // placeholder: figma.boolean('placeholder', {
24
- // true: figma.nestedProps('.Parts/Input value', {
25
- // text: figma.string('Text'),
26
- // }),
27
- // false: { text: undefined },
28
- // }),
29
- // validationStatus: figma.enum('validationStatus', {
30
- // initial: undefined,
31
- // invalid: 'invalid',
32
- // valid: 'valid',
33
- // }),
34
- // disabled: figma.boolean('disabled'),
35
- // readOnly: figma.boolean('readOnly'),
36
- // iconLeft: figma.boolean('Icon Left?', {
37
- // true: figma.nestedProps('.Parts/Content Left', {
38
- // icon: figma.instance('Icon'),
39
- // }),
40
- // false: {
41
- // icon: undefined,
42
- // },
43
- // }),
44
- // value: figma.nestedProps('.Parts/Input value', {
45
- // text: figma.boolean('placeholder', {
46
- // true: undefined,
47
- // false: figma.string('Text'),
48
- // }),
49
- // }),
50
- // },
51
- // example: props => (
52
- // <Input
53
- // validationStatus={props.validationStatus}
54
- // placeholder={props.placeholder.text}
55
- // readonly={props.readOnly}
56
- // value={props.value.text}
57
- // disabled={props.disabled}
58
- // leadingIcon={props.iconLeft.icon}
59
- // />
60
- // ),
61
- // }
62
- // );
63
-
64
- // // Password Input
65
- // figma.connect(
66
- // Input,
67
- // 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7928-5958&m=dev',
68
- // {
69
- // props: {
70
- // state: figma.enum('state', {
71
- // initial: 'initial',
72
- // focus: 'focus',
73
- // filled: 'filled',
74
- // }),
75
- // placeholder: figma.boolean('placeholder', {
76
- // true: figma.nestedProps('.Parts/Input value', {
77
- // text: figma.string('Text'),
78
- // }),
79
- // false: { text: undefined },
80
- // }),
81
- // validationStatus: figma.enum('validationStatus', {
82
- // initial: undefined,
83
- // invalid: 'invalid',
84
- // valid: 'valid',
85
- // }),
86
- // disabled: figma.boolean('disabled'),
87
- // readOnly: figma.boolean('readOnly'),
88
- // iconLeft: figma.boolean('Icon Left?', {
89
- // true: figma.nestedProps('.Parts/Content Left', {
90
- // icon: figma.instance('Icon'),
91
- // }),
92
- // false: {
93
- // icon: undefined,
94
- // },
95
- // }),
96
- // value: figma.nestedProps('.Parts/Input value', {
97
- // text: figma.boolean('placeholder', {
98
- // true: undefined,
99
- // false: figma.string('Text'),
100
- // }),
101
- // }),
102
- // },
103
- // example: props => (
104
- // <Input
105
- // validationStatus={props.validationStatus}
106
- // placeholder={props.placeholder.text}
107
- // readonly={props.readOnly}
108
- // value={props.value.text}
109
- // disabled={props.disabled}
110
- // leadingIcon={props.iconLeft.icon}
111
- // trailingIcon={EyeMediumIcon}
112
- // />
113
- // ),
114
- // }
115
- // );
11
+ figma.connect(Input, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=2685%3A7021', {
12
+ props: {
13
+ // These props were automatically mapped based on your linked code:
14
+ disabled: figma.enum('State', {
15
+ Disabled: true,
16
+ }),
17
+ readonly: figma.enum('State', {
18
+ 'Read-only': true,
19
+ }),
20
+ focused: figma.boolean('Focus?'),
21
+ placeholder: figma.string('Suffix'),
22
+ focusable: figma.boolean('Focus?'),
23
+ hasTVPreferredFocus: figma.boolean('Focus?'),
24
+ 'aria-disabled': figma.enum('State', {
25
+ Disabled: true,
26
+ }),
27
+ // No matching props could be found for these Figma properties:
28
+ // "helperText": figma.boolean('Helper text?'),
29
+ // "label": figma.string('Label'),
30
+ // "validation": figma.string('Validation'),
31
+ // "helperText": figma.string('Helper text'),
32
+ // "value": figma.string('Value'),
33
+ // "suffix": figma.boolean('Suffix?'),
34
+ // "prefix": figma.boolean('Prefix?'),
35
+ // "prefix": figma.string('Prefix'),
36
+ // "suffix": figma.string('Suffix'),
37
+ // "optional": figma.boolean('Optional?'),
38
+ // "valueType": figma.enum('Value type', {
39
+ // "Empty": "empty",
40
+ // "Placeholder": "placeholder",
41
+ // "Filled": "filled"
42
+ // }),
43
+ // "labelVariant": figma.enum('Label variant', {
44
+ // "Body": "body",
45
+ // "Heading": "heading"
46
+ // })
47
+ },
48
+ example: props => (
49
+ <Input
50
+ disabled={props.disabled}
51
+ readonly={props.readonly}
52
+ focused={props.focused}
53
+ placeholder={props.placeholder}
54
+ focusable={props.focusable}
55
+ />
56
+ ),
57
+ });
@@ -0,0 +1,24 @@
1
+ import React from "react"
2
+ import Label from "./Label"
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
+ Label,
15
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=8145%3A617",
16
+ {
17
+ props: {
18
+ // No matching props could be found for these Figma properties:
19
+ // "label": figma.string('Label'),
20
+ // "optional": figma.boolean('Optional?')
21
+ },
22
+ example: (props) => <Label />,
23
+ },
24
+ )
@@ -0,0 +1,42 @@
1
+ import React from "react"
2
+ import Link from "./Link"
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
+ Link,
14
+ "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=163%3A562",
15
+ {
16
+ props: {
17
+ // These props were automatically mapped based on your linked code:
18
+ inverted: figma.boolean("Inverted?"),
19
+ disabled: figma.enum("State", {
20
+ Active: true,
21
+ }),
22
+ showIcon: figma.boolean("Icon right?"),
23
+ focusable: figma.enum("State", {
24
+ Focus: true,
25
+ }),
26
+ // No matching props could be found for these Figma properties:
27
+ // "iconLeft": figma.boolean('Icon left?'),
28
+ // "iconRight": figma.boolean('Icon right?'),
29
+ // "iconRight20": figma.instance('Icon right-20'),
30
+ // "iconLeft20": figma.instance('Icon left-20'),
31
+ // "text": figma.string('Text')
32
+ },
33
+ example: (props) => (
34
+ <Link
35
+ inverted={props.inverted}
36
+ disabled={props.disabled}
37
+ showIcon={props.showIcon}
38
+ focusable={props.focusable}
39
+ />
40
+ ),
41
+ },
42
+ )
@@ -12,3 +12,7 @@ export const useListContext = () => {
12
12
 
13
13
  return context;
14
14
  };
15
+
16
+ export const ListFirstItemContext = createContext<boolean>(false);
17
+
18
+ export const useListFirstItemContext = () => useContext(ListFirstItemContext);