@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.
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-lint.log +1 -1
- package/CHANGELOG.md +22 -0
- package/build/components/Accordion/AccordionTrigger.js +1 -1
- package/build/components/BodyText/index.d.ts +1 -0
- package/build/components/Checkbox/CheckboxGroup.context.d.ts +2 -0
- package/build/components/Checkbox/CheckboxGroup.js +5 -5
- package/build/components/Checkbox/CheckboxIndicator.js +3 -3
- package/build/components/Checkbox/CheckboxTextContent.js +0 -1
- package/build/components/Checkbox/CheckboxTileRoot.js +9 -1
- package/build/components/DatePicker/DatePickerDay.js +3 -3
- package/build/components/FormField/FormField.d.ts +5 -5
- package/build/components/List/List.context.d.ts +2 -0
- package/build/components/List/List.context.js +2 -0
- package/build/components/List/List.js +19 -15
- package/build/components/List/ListAction/ListAction.js +3 -2
- package/build/components/List/ListAction/ListAction.props.d.ts +0 -1
- package/build/components/List/ListItem/ListItem.props.d.ts +4 -1
- package/build/components/List/ListItem/ListItemHeading.d.ts +13 -0
- package/build/components/List/ListItem/ListItemHeading.js +12 -0
- package/build/components/List/ListItem/ListItemHelperText.d.ts +2 -2
- package/build/components/List/ListItem/ListItemRoot.d.ts +1 -1
- package/build/components/List/ListItem/ListItemRoot.js +7 -6
- package/build/components/List/ListItem/index.d.ts +1 -1
- package/build/components/List/ListItem/index.js +1 -1
- package/build/components/PillGroup/Pill.js +2 -2
- package/build/components/Radio/RadioGroup.context.d.ts +2 -0
- package/build/components/Radio/RadioGroup.js +1 -1
- package/build/components/Radio/RadioIndicator.js +3 -3
- package/build/components/Radio/RadioTextContent.js +0 -1
- package/build/components/Radio/RadioTileRoot.js +9 -1
- package/build/components/RadioCard/RadioCardIndicator.js +3 -3
- package/build/components/RadioCard/RadioCardRoot.js +3 -3
- package/build/components/Tabs/Tab.js +5 -5
- package/build/components/ToggleButton/ToggleButtonRoot.js +2 -2
- package/build/components/ToggleButtonCard/ToggleButtonCardRoot.js +3 -3
- package/build/components/UnstyledIconButton/UnstyledIconButtonRoot.js +1 -1
- package/build/components/VerificationInput/VerificationInput.d.ts +6 -0
- package/build/components/VerificationInput/VerificationInput.js +35 -0
- package/build/components/VerificationInput/VerificationInput.props.d.ts +49 -0
- package/build/components/VerificationInput/VerificationInput.props.js +1 -0
- package/build/components/VerificationInput/VerificationInputSlot.d.ts +9 -0
- package/build/components/VerificationInput/VerificationInputSlot.js +72 -0
- package/build/components/VerificationInput/index.d.ts +4 -0
- package/build/components/VerificationInput/index.js +3 -0
- package/build/components/VerificationInput/useVerificationInput.d.ts +14 -0
- package/build/components/VerificationInput/useVerificationInput.js +58 -0
- package/build/components/index.d.ts +1 -0
- package/build/components/index.js +1 -0
- package/docs/components/AllComponents.web.tsx +9 -0
- package/package.json +10 -11
- package/src/components/Accordion/Accordion.figma.tsx +23 -0
- package/src/components/Accordion/AccordionItemRoot.figma.tsx +47 -0
- package/src/components/Accordion/AccordionTrigger.tsx +1 -1
- package/src/components/Alert/Alert.figma.tsx +47 -0
- package/src/components/Avatar/Avatar.figma.tsx +33 -0
- package/src/components/Badge/Badge.figma.tsx +48 -24
- package/src/components/Banner/Banner.figma.tsx +15 -0
- package/src/components/Banner/BannerIllustration.figma.tsx +30 -0
- package/src/components/BodyText/index.ts +1 -0
- package/src/components/BottomSheet/BottomSheetModal.figma.tsx +20 -0
- package/src/components/Button/Button.figma.tsx +60 -229
- package/src/components/Card/Card.figma.tsx +43 -71
- package/src/components/Card/CardAction/CardAction.figma.tsx +44 -0
- package/src/components/Card/CardAction/CardAction.stories.tsx +1 -1
- package/src/components/Carousel/Carousel.figma.tsx +19 -0
- package/src/components/Checkbox/Checkbox.figma.tsx +26 -41
- package/src/components/Checkbox/CheckboxGroup.context.ts +1 -0
- package/src/components/Checkbox/CheckboxGroup.figma.tsx +20 -0
- package/src/components/Checkbox/CheckboxGroup.tsx +7 -8
- package/src/components/Checkbox/CheckboxImage.figma.tsx +27 -0
- package/src/components/Checkbox/CheckboxIndicator.tsx +3 -3
- package/src/components/Checkbox/CheckboxTextContent.tsx +0 -1
- package/src/components/Checkbox/CheckboxTileRoot.figma.tsx +32 -0
- package/src/components/Checkbox/CheckboxTileRoot.tsx +9 -1
- package/src/components/CurrencyInput/CurrencyInput.figma.tsx +56 -0
- package/src/components/DateInput/DateInput.figma.tsx +75 -0
- package/src/components/DatePicker/DatePickerCalendar.figma.tsx +34 -0
- package/src/components/DatePicker/DatePickerDay.tsx +3 -3
- package/src/components/DatePickerInput/DatePickerInput.figma.tsx +62 -0
- package/src/components/DescriptionList/DescriptionList.figma.tsx +23 -0
- package/src/components/Divider/Divider.figma.tsx +23 -18
- package/src/components/ExpandableCard/ExpandableCard.figma.tsx +54 -0
- package/src/components/ExpandableCard/ExpandableCardGroup.figma.tsx +23 -0
- package/src/components/FormField/FormField.figma.tsx +23 -0
- package/src/components/Helper/HelperText.figma.tsx +23 -0
- package/src/components/IconButton/IconButton.figma.tsx +55 -161
- package/src/components/IconContainer/IconContainer.figma.tsx +50 -0
- package/src/components/InlineLink/InlineLink.figma.tsx +33 -0
- package/src/components/Input/Input.figma.tsx +52 -110
- package/src/components/Label/Label.figma.tsx +24 -0
- package/src/components/Link/Link.figma.tsx +42 -0
- package/src/components/List/List.context.ts +4 -0
- package/src/components/List/List.docs.mdx +30 -24
- package/src/components/List/List.figma.tsx +29 -108
- package/src/components/List/List.stories.tsx +26 -1
- package/src/components/List/List.tsx +26 -19
- package/src/components/List/ListAction/ListAction.figma.tsx +29 -0
- package/src/components/List/ListAction/ListAction.props.ts +0 -1
- package/src/components/List/ListAction/ListAction.tsx +3 -2
- package/src/components/List/ListItem/ListItem.figma.tsx +40 -220
- package/src/components/List/ListItem/ListItem.props.ts +4 -1
- package/src/components/List/ListItem/ListItemHeading.tsx +20 -0
- package/src/components/List/ListItem/ListItemHelperText.tsx +2 -3
- package/src/components/List/ListItem/ListItemLeadingContent.figma.tsx +29 -0
- package/src/components/List/ListItem/ListItemRoot.tsx +11 -6
- package/src/components/List/ListItem/ListItemTrailingContent.figma.tsx +27 -0
- package/src/components/List/ListItem/index.ts +1 -1
- package/src/components/Menu/Menu.figma.tsx +30 -0
- package/src/components/Menu/MenuItem.figma.tsx +31 -0
- package/src/components/Modal/Modal.docs.mdx +23 -20
- package/src/components/Modal/Modal.figma.tsx +56 -0
- package/src/components/PillGroup/Pill.figma.tsx +25 -0
- package/src/components/PillGroup/Pill.tsx +3 -3
- package/src/components/PillGroup/PillGroup.figma.tsx +21 -0
- package/src/components/ProgressStepper/ProgressStep.figma.tsx +30 -0
- package/src/components/ProgressStepper/ProgressStepper.figma.tsx +20 -0
- package/src/components/Radio/Radio.figma.tsx +22 -42
- package/src/components/Radio/Radio.stories.tsx +24 -0
- package/src/components/Radio/RadioGroup.context.ts +1 -0
- package/src/components/Radio/RadioGroup.figma.tsx +54 -0
- package/src/components/Radio/RadioGroup.tsx +2 -2
- package/src/components/Radio/RadioImage.figma.tsx +27 -0
- package/src/components/Radio/RadioIndicator.tsx +3 -3
- package/src/components/Radio/RadioTextContent.tsx +0 -1
- package/src/components/Radio/RadioTileRoot.figma.tsx +31 -0
- package/src/components/Radio/RadioTileRoot.tsx +9 -1
- package/src/components/RadioCard/RadioCardIndicator.tsx +3 -3
- package/src/components/RadioCard/RadioCardRoot.tsx +3 -3
- package/src/components/SectionHeader/SectionHeader.figma.tsx +30 -16
- package/src/components/Select/Select.figma.tsx +55 -0
- package/src/components/Select/SelectOption.figma.tsx +36 -0
- package/src/components/Spinner/Spinner.figma.tsx +20 -12
- package/src/components/Switch/Switch.figma.tsx +31 -23
- package/src/components/Tabs/Tab.tsx +5 -5
- package/src/components/Tabs/Tabs.figma.tsx +29 -0
- package/src/components/ThemedImage/ThemedImage.stories.tsx +1 -1
- package/src/components/Toast/ToastItem.figma.tsx +22 -0
- package/src/components/ToggleButton/ToggleButtonRoot.tsx +2 -2
- package/src/components/ToggleButtonCard/ToggleButtonCardRoot.tsx +3 -3
- package/src/components/UnstyledIconButton/UnstyledIconButton.figma.tsx +49 -0
- package/src/components/UnstyledIconButton/UnstyledIconButtonRoot.tsx +1 -1
- package/src/components/VerificationInput/VerificationInput.docs.mdx +68 -0
- package/src/components/VerificationInput/VerificationInput.props.ts +52 -0
- package/src/components/VerificationInput/VerificationInput.stories.tsx +140 -0
- package/src/components/VerificationInput/VerificationInput.tsx +89 -0
- package/src/components/VerificationInput/VerificationInputSlot.tsx +94 -0
- package/src/components/VerificationInput/index.ts +5 -0
- package/src/components/VerificationInput/useVerificationInput.ts +72 -0
- package/src/components/index.ts +1 -0
- package/build/components/List/ListItem/ListItemText.d.ts +0 -6
- package/build/components/List/ListItem/ListItemText.js +0 -7
- package/src/components/Checkbox/CheckboxIndicator.figma.tsx +0 -19
- package/src/components/List/ListItem/ListItemText.tsx +0 -14
- package/src/components/Radio/RadioIndicator.figma.tsx +0 -21
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import BottomSheetModal from "./BottomSheetModal"
|
|
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
|
+
BottomSheetModal,
|
|
15
|
+
"https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=4084%3A33378",
|
|
16
|
+
{
|
|
17
|
+
props: {},
|
|
18
|
+
example: (props) => <BottomSheetModal />,
|
|
19
|
+
},
|
|
20
|
+
)
|
|
@@ -1,229 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
// inverted={inverted}
|
|
62
|
-
// disabled={disabled}
|
|
63
|
-
// loading={loading}
|
|
64
|
-
// iconPosition={iconPosition}
|
|
65
|
-
// icon={icon}
|
|
66
|
-
// >
|
|
67
|
-
// {text}
|
|
68
|
-
// </Button>
|
|
69
|
-
// ),
|
|
70
|
-
// }
|
|
71
|
-
// );
|
|
72
|
-
|
|
73
|
-
// figma.connect(
|
|
74
|
-
// Button,
|
|
75
|
-
// 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7249-3682&m=dev',
|
|
76
|
-
// {
|
|
77
|
-
// props,
|
|
78
|
-
// links: [
|
|
79
|
-
// {
|
|
80
|
-
// name: 'Documentation',
|
|
81
|
-
// url: 'https://uw-native-ui.vercel.app/?path=/docs/native-ui-components-button--docs',
|
|
82
|
-
// },
|
|
83
|
-
// ],
|
|
84
|
-
// variant: {
|
|
85
|
-
// 'Icon Right?': true,
|
|
86
|
-
// 'Icon Left?': true,
|
|
87
|
-
// },
|
|
88
|
-
// example: ({ text, inverted, disabled, colorScheme, size, iconLeft, iconRight }) => (
|
|
89
|
-
// <Button
|
|
90
|
-
// variant="solid"
|
|
91
|
-
// onPress={() => console.log('button pressed')}
|
|
92
|
-
// colorScheme={colorScheme}
|
|
93
|
-
// size={size}
|
|
94
|
-
// inverted={inverted}
|
|
95
|
-
// disabled={disabled}
|
|
96
|
-
// >
|
|
97
|
-
// <ButtonIcon as={iconLeft} />
|
|
98
|
-
// <ButtonText>{text}</ButtonText>
|
|
99
|
-
// <ButtonIcon as={iconRight} />
|
|
100
|
-
// </Button>
|
|
101
|
-
// ),
|
|
102
|
-
// }
|
|
103
|
-
// );
|
|
104
|
-
|
|
105
|
-
// // Outline Button
|
|
106
|
-
|
|
107
|
-
// figma.connect(
|
|
108
|
-
// Button,
|
|
109
|
-
// 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7250-1321&m=dev',
|
|
110
|
-
// {
|
|
111
|
-
// props,
|
|
112
|
-
// links: [
|
|
113
|
-
// {
|
|
114
|
-
// name: 'Documentation',
|
|
115
|
-
// url: 'https://uw-native-ui.vercel.app/?path=/docs/native-ui-components-button--docs',
|
|
116
|
-
// },
|
|
117
|
-
// ],
|
|
118
|
-
// example: ({ text, inverted, disabled, loading, colorScheme, size, icon, iconPosition }) => (
|
|
119
|
-
// <Button
|
|
120
|
-
// variant="outline"
|
|
121
|
-
// onPress={() => console.log('button pressed')}
|
|
122
|
-
// colorScheme={colorScheme}
|
|
123
|
-
// size={size}
|
|
124
|
-
// inverted={inverted}
|
|
125
|
-
// disabled={disabled}
|
|
126
|
-
// loading={loading}
|
|
127
|
-
// iconPosition={iconPosition}
|
|
128
|
-
// icon={icon}
|
|
129
|
-
// >
|
|
130
|
-
// {text}
|
|
131
|
-
// </Button>
|
|
132
|
-
// ),
|
|
133
|
-
// }
|
|
134
|
-
// );
|
|
135
|
-
|
|
136
|
-
// figma.connect(
|
|
137
|
-
// Button,
|
|
138
|
-
// 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7249-3682&m=dev',
|
|
139
|
-
// {
|
|
140
|
-
// props,
|
|
141
|
-
// links: [
|
|
142
|
-
// {
|
|
143
|
-
// name: 'Documentation',
|
|
144
|
-
// url: 'https://uw-native-ui.vercel.app/?path=/docs/native-ui-components-button--docs',
|
|
145
|
-
// },
|
|
146
|
-
// ],
|
|
147
|
-
// variant: {
|
|
148
|
-
// 'Icon Right?': true,
|
|
149
|
-
// 'Icon Left?': true,
|
|
150
|
-
// },
|
|
151
|
-
// example: ({ text, inverted, disabled, colorScheme, size, iconLeft, iconRight }) => (
|
|
152
|
-
// <Button
|
|
153
|
-
// variant="outline"
|
|
154
|
-
// onPress={() => console.log('button pressed')}
|
|
155
|
-
// colorScheme={colorScheme}
|
|
156
|
-
// size={size}
|
|
157
|
-
// inverted={inverted}
|
|
158
|
-
// disabled={disabled}
|
|
159
|
-
// >
|
|
160
|
-
// <ButtonIcon as={iconLeft} />
|
|
161
|
-
// <ButtonText>{text}</ButtonText>
|
|
162
|
-
// <ButtonIcon as={iconRight} />
|
|
163
|
-
// </Button>
|
|
164
|
-
// ),
|
|
165
|
-
// }
|
|
166
|
-
// );
|
|
167
|
-
|
|
168
|
-
// // Ghost button
|
|
169
|
-
|
|
170
|
-
// figma.connect(
|
|
171
|
-
// Button,
|
|
172
|
-
// 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7250-2103&m=dev',
|
|
173
|
-
// {
|
|
174
|
-
// props,
|
|
175
|
-
// links: [
|
|
176
|
-
// {
|
|
177
|
-
// name: 'Documentation',
|
|
178
|
-
// url: 'https://uw-native-ui.vercel.app/?path=/docs/native-ui-components-button--docs',
|
|
179
|
-
// },
|
|
180
|
-
// ],
|
|
181
|
-
// example: ({ text, inverted, disabled, loading, colorScheme, size, icon, iconPosition }) => (
|
|
182
|
-
// <Button
|
|
183
|
-
// variant="ghost"
|
|
184
|
-
// onPress={() => console.log('button pressed')}
|
|
185
|
-
// colorScheme={colorScheme}
|
|
186
|
-
// size={size}
|
|
187
|
-
// inverted={inverted}
|
|
188
|
-
// disabled={disabled}
|
|
189
|
-
// loading={loading}
|
|
190
|
-
// iconPosition={iconPosition}
|
|
191
|
-
// icon={icon}
|
|
192
|
-
// >
|
|
193
|
-
// {text}
|
|
194
|
-
// </Button>
|
|
195
|
-
// ),
|
|
196
|
-
// }
|
|
197
|
-
// );
|
|
198
|
-
|
|
199
|
-
// figma.connect(
|
|
200
|
-
// Button,
|
|
201
|
-
// 'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=7249-3682&m=dev',
|
|
202
|
-
// {
|
|
203
|
-
// props,
|
|
204
|
-
// links: [
|
|
205
|
-
// {
|
|
206
|
-
// name: 'Documentation',
|
|
207
|
-
// url: 'https://uw-native-ui.vercel.app/?path=/docs/native-ui-components-button--docs',
|
|
208
|
-
// },
|
|
209
|
-
// ],
|
|
210
|
-
// variant: {
|
|
211
|
-
// 'Icon Right?': true,
|
|
212
|
-
// 'Icon Left?': true,
|
|
213
|
-
// },
|
|
214
|
-
// example: ({ text, inverted, disabled, colorScheme, size, iconLeft, iconRight }) => (
|
|
215
|
-
// <Button
|
|
216
|
-
// variant="ghost"
|
|
217
|
-
// onPress={() => console.log('button pressed')}
|
|
218
|
-
// colorScheme={colorScheme}
|
|
219
|
-
// size={size}
|
|
220
|
-
// inverted={inverted}
|
|
221
|
-
// disabled={disabled}
|
|
222
|
-
// >
|
|
223
|
-
// <ButtonIcon as={iconLeft} />
|
|
224
|
-
// <ButtonText>{text}</ButtonText>
|
|
225
|
-
// <ButtonIcon as={iconRight} />
|
|
226
|
-
// </Button>
|
|
227
|
-
// ),
|
|
228
|
-
// }
|
|
229
|
-
// );
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import Button from './Button';
|
|
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(Button, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=90%3A432', {
|
|
12
|
+
props: {
|
|
13
|
+
// These props were automatically mapped based on your linked code:
|
|
14
|
+
focusable: figma.enum('State', {
|
|
15
|
+
Focus: true,
|
|
16
|
+
}),
|
|
17
|
+
'aria-disabled': figma.enum('State', {
|
|
18
|
+
Disabled: true,
|
|
19
|
+
}),
|
|
20
|
+
disabled: figma.enum('State', {
|
|
21
|
+
Disabled: true,
|
|
22
|
+
}),
|
|
23
|
+
size: figma.enum('Size', {
|
|
24
|
+
'SM-32': 'sm',
|
|
25
|
+
'MD-48': 'md',
|
|
26
|
+
}),
|
|
27
|
+
paddingNone: figma.boolean('Padding None?'),
|
|
28
|
+
colorScheme: figma.enum('Color Scheme', {
|
|
29
|
+
Affirmative: 'affirmative',
|
|
30
|
+
Destructive: 'destructive',
|
|
31
|
+
}),
|
|
32
|
+
loading: figma.enum('State', {
|
|
33
|
+
Loading: true,
|
|
34
|
+
}),
|
|
35
|
+
// No matching props could be found for these Figma properties:
|
|
36
|
+
// "text": figma.string('Text'),
|
|
37
|
+
// "showIconLeft": figma.boolean('Show icon left?'),
|
|
38
|
+
// "showIconRight": figma.boolean('Show icon right?'),
|
|
39
|
+
// "iconLeft20": figma.instance('Icon left-20'),
|
|
40
|
+
// "iconRight20": figma.instance('Icon right-20'),
|
|
41
|
+
// "ghostText": figma.string('Ghost Text'),
|
|
42
|
+
// "variant": figma.enum('Variant', {
|
|
43
|
+
// "Emphasis": "emphasis",
|
|
44
|
+
// "Solid": "solid",
|
|
45
|
+
// "Outline": "outline",
|
|
46
|
+
// "Ghost": "ghost"
|
|
47
|
+
// }),
|
|
48
|
+
// "inverted": figma.boolean('Inverted?')
|
|
49
|
+
},
|
|
50
|
+
example: props => (
|
|
51
|
+
<Button
|
|
52
|
+
focusable={props.focusable}
|
|
53
|
+
disabled={props.disabled}
|
|
54
|
+
size={props.size}
|
|
55
|
+
paddingNone={props.paddingNone}
|
|
56
|
+
colorScheme={props.colorScheme}
|
|
57
|
+
loading={props.loading}
|
|
58
|
+
/>
|
|
59
|
+
),
|
|
60
|
+
});
|
|
@@ -1,73 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from "react"
|
|
2
|
+
import Card from "./Card"
|
|
3
|
+
import figma from "@figma/code-connect"
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
// dashed: 'dashed',
|
|
12
|
-
// elevated: 'elevated',
|
|
13
|
-
// outline: 'outline',
|
|
14
|
-
// filled: 'filled',
|
|
15
|
-
// }),
|
|
16
|
-
// padding: figma.enum('padding', {
|
|
17
|
-
// large: 'large',
|
|
18
|
-
// medium: 'medium',
|
|
19
|
-
// small: 'small',
|
|
20
|
-
// none: 'none',
|
|
21
|
-
// }),
|
|
22
|
-
// colorScheme: figma.enum('colorScheme', {
|
|
23
|
-
// base: 'base',
|
|
24
|
-
// grey: 'grey',
|
|
25
|
-
// purple: 'purple',
|
|
26
|
-
// }),
|
|
27
|
-
// surface: figma.enum('surface', {
|
|
28
|
-
// base: 'base',
|
|
29
|
-
// purple: 'purple',
|
|
30
|
-
// }),
|
|
31
|
-
// children: figma.instance('content'),
|
|
32
|
-
// },
|
|
33
|
-
// example: ({ children, ...props }) => <Card {...props}>{children}</Card>,
|
|
34
|
-
// }
|
|
35
|
-
// );
|
|
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
|
+
*/
|
|
36
11
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
// ),
|
|
72
|
-
// }
|
|
73
|
-
// );
|
|
12
|
+
figma.connect(
|
|
13
|
+
Card,
|
|
14
|
+
"https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=2160%3A11",
|
|
15
|
+
{
|
|
16
|
+
props: {
|
|
17
|
+
// These props were automatically mapped based on your linked code:
|
|
18
|
+
variant: figma.enum("Variant", {
|
|
19
|
+
Emphasis: "emphasis",
|
|
20
|
+
Subtle: "subtle",
|
|
21
|
+
}),
|
|
22
|
+
colorScheme: figma.enum("Color Scheme", {
|
|
23
|
+
"Neutral Strong": "neutralStrong",
|
|
24
|
+
"Neutral Subtle": "neutralSubtle",
|
|
25
|
+
Brand: "brand",
|
|
26
|
+
Energy: "energy",
|
|
27
|
+
Broadband: "broadband",
|
|
28
|
+
Mobile: "mobile",
|
|
29
|
+
Insurance: "insurance",
|
|
30
|
+
Cashback: "cashback",
|
|
31
|
+
Pig: "pig",
|
|
32
|
+
}),
|
|
33
|
+
noPadding: figma.boolean("Padding None?"),
|
|
34
|
+
// No matching props could be found for these Figma properties:
|
|
35
|
+
// "content": figma.instance('Content')
|
|
36
|
+
},
|
|
37
|
+
example: (props) => (
|
|
38
|
+
<Card
|
|
39
|
+
variant={props.variant}
|
|
40
|
+
colorScheme={props.colorScheme}
|
|
41
|
+
noPadding={props.noPadding}
|
|
42
|
+
/>
|
|
43
|
+
),
|
|
44
|
+
},
|
|
45
|
+
)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import CardAction from './CardAction';
|
|
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
|
+
CardAction,
|
|
13
|
+
'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=8154%3A4346',
|
|
14
|
+
{
|
|
15
|
+
props: {
|
|
16
|
+
// These props were automatically mapped based on your linked code:
|
|
17
|
+
loading: figma.enum('State', {
|
|
18
|
+
Loading: true,
|
|
19
|
+
}),
|
|
20
|
+
disabled: figma.enum('State', {
|
|
21
|
+
Disabled: true,
|
|
22
|
+
}),
|
|
23
|
+
'aria-disabled': figma.enum('State', {
|
|
24
|
+
Disabled: true,
|
|
25
|
+
}),
|
|
26
|
+
// No matching props could be found for these Figma properties:
|
|
27
|
+
// "listHeading": figma.string('List heading'),
|
|
28
|
+
// "helperText": figma.boolean('Helper text?'),
|
|
29
|
+
// "helperText": figma.string('Helper text'),
|
|
30
|
+
// "iconContainer": figma.boolean('Icon container?'),
|
|
31
|
+
// "trailingIcon20": figma.instance('Trailing icon-20'),
|
|
32
|
+
// "leadingIcon": figma.boolean('Leading Icon?'),
|
|
33
|
+
// "leadingIcon24": figma.instance('Leading icon-24'),
|
|
34
|
+
// "badgeRight": figma.boolean('Badge right?'),
|
|
35
|
+
// "badgeBottom": figma.boolean('Badge bottom?'),
|
|
36
|
+
// "badgeMiddle": figma.boolean('Badge middle?'),
|
|
37
|
+
// "size": figma.enum('Size', {
|
|
38
|
+
// "Default": "default",
|
|
39
|
+
// "Large": "large"
|
|
40
|
+
// })
|
|
41
|
+
},
|
|
42
|
+
example: props => <CardAction loading={props.loading} disabled={props.disabled} />,
|
|
43
|
+
}
|
|
44
|
+
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-native';
|
|
2
2
|
import * as Icons from '@utilitywarehouse/hearth-react-native-icons';
|
|
3
3
|
import { ElectricityMediumIcon, GasMediumIcon } from '@utilitywarehouse/hearth-react-native-icons';
|
|
4
4
|
import { View } from 'react-native';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import Carousel from './Carousel';
|
|
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(Carousel, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=5191%3A3220', {
|
|
12
|
+
props: {
|
|
13
|
+
// These props were automatically mapped based on your linked code:
|
|
14
|
+
inverted: figma.boolean('Inverted?'),
|
|
15
|
+
// No matching props could be found for these Figma properties:
|
|
16
|
+
// "arrows": figma.boolean('Arrows?')
|
|
17
|
+
},
|
|
18
|
+
example: props => <Carousel width={null} inverted={props.inverted} />,
|
|
19
|
+
});
|
|
@@ -1,44 +1,29 @@
|
|
|
1
|
-
import { Checkbox } from './';
|
|
2
1
|
import figma from '@figma/code-connect';
|
|
2
|
+
import { Checkbox } from './Checkbox';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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
|
+
});
|
|
@@ -4,6 +4,7 @@ export const CheckboxGroupContext = 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 useCheckboxGroupContext = () => useContext(CheckboxGroupContext);
|
|
@@ -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
|
+
)
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
1
|
import React, { useMemo } from 'react';
|
|
3
|
-
import { CheckboxGroup as CheckboxGroupComponent } from './Checkbox';
|
|
4
|
-
import CheckboxGroupProps from './CheckboxGroup.props';
|
|
5
|
-
import { CheckboxGroupContext } from './CheckboxGroup.context';
|
|
6
2
|
import { View } from 'react-native';
|
|
7
3
|
import { StyleSheet } from 'react-native-unistyles';
|
|
8
|
-
import CheckboxGroupTextContent from './CheckboxGroupTextContent';
|
|
9
|
-
import { Label } from '../Label';
|
|
10
4
|
import { Helper } from '../Helper';
|
|
5
|
+
import { Label } from '../Label';
|
|
6
|
+
import { CheckboxGroup as CheckboxGroupComponent } from './Checkbox';
|
|
7
|
+
import { CheckboxGroupContext } from './CheckboxGroup.context';
|
|
8
|
+
import CheckboxGroupProps from './CheckboxGroup.props';
|
|
9
|
+
import CheckboxGroupTextContent from './CheckboxGroupTextContent';
|
|
11
10
|
|
|
12
11
|
const CheckboxGroup = ({
|
|
13
12
|
children,
|
|
@@ -26,8 +25,8 @@ const CheckboxGroup = ({
|
|
|
26
25
|
...props
|
|
27
26
|
}: CheckboxGroupProps) => {
|
|
28
27
|
const value = useMemo(
|
|
29
|
-
() => ({ disabled, validationStatus, type }),
|
|
30
|
-
[disabled, validationStatus, type]
|
|
28
|
+
() => ({ disabled, validationStatus, type, direction }),
|
|
29
|
+
[disabled, validationStatus, type, direction]
|
|
31
30
|
);
|
|
32
31
|
const showHeader = !!label || !!helperText || !!invalidText || !!validText;
|
|
33
32
|
const childrenArray = React.Children.toArray(children as any);
|