@utilitywarehouse/hearth-react-native 0.35.7 → 0.35.9
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/SKILL.md +129 -3
- package/build/components/Accordion/Accordion.figma.d.ts +15 -0
- package/build/components/Accordion/Accordion.figma.js +20 -0
- package/build/components/Accordion/AccordionItem.figma.d.ts +17 -0
- package/build/components/Accordion/AccordionItem.figma.js +26 -0
- package/build/components/Accordion/AccordionTrigger.js +1 -1
- package/build/components/Alert/Alert.figma.d.ts +33 -0
- package/build/components/Alert/Alert.figma.js +40 -0
- package/build/components/Avatar/Avatar.figma.d.ts +16 -0
- package/build/components/Avatar/Avatar.figma.js +29 -0
- package/build/components/Badge/Badge.figma.d.ts +21 -0
- package/build/components/Badge/Badge.figma.js +47 -0
- package/build/components/Banner/Banner.figma.d.ts +26 -0
- package/build/components/Banner/Banner.figma.js +47 -0
- package/build/components/Banner/BannerIllustration.figma.d.ts +11 -0
- package/build/components/Banner/BannerIllustration.figma.js +13 -0
- package/build/components/BottomSheet/BottomSheetModal.figma.d.ts +11 -0
- package/build/components/BottomSheet/BottomSheetModal.figma.js +11 -0
- package/build/components/Button/Button.figma.d.ts +38 -0
- package/build/components/Button/Button.figma.js +84 -0
- package/build/components/Card/Card.figma.d.ts +16 -0
- package/build/components/Card/Card.figma.js +49 -0
- package/build/components/Card/CardAction/CardAction.figma.d.ts +35 -0
- package/build/components/Card/CardAction/CardAction.figma.js +104 -0
- package/build/components/Card/CardAction/CardActionRoot.js +4 -0
- package/build/components/Card/CardRoot.js +5 -1
- package/build/components/Carousel/Carousel.figma.d.ts +17 -0
- package/build/components/Carousel/Carousel.figma.js +18 -0
- package/build/components/Checkbox/Checkbox.figma.d.ts +22 -0
- package/build/components/Checkbox/Checkbox.figma.js +29 -0
- package/build/components/Checkbox/CheckboxGroup.figma.d.ts +26 -0
- package/build/components/Checkbox/CheckboxGroup.figma.js +46 -0
- package/build/components/Checkbox/CheckboxImage.figma.d.ts +11 -0
- package/build/components/Checkbox/CheckboxImage.figma.js +10 -0
- package/build/components/Checkbox/CheckboxTileRoot.figma.d.ts +20 -0
- package/build/components/Checkbox/CheckboxTileRoot.figma.js +22 -0
- package/build/components/Combobox/Combobox.figma.d.ts +23 -0
- package/build/components/Combobox/Combobox.figma.js +69 -0
- package/build/components/CurrencyInput/CurrencyInput.figma.d.ts +31 -0
- package/build/components/CurrencyInput/CurrencyInput.figma.js +51 -0
- package/build/components/DateInput/DateInput.figma.d.ts +41 -0
- package/build/components/DateInput/DateInput.figma.js +87 -0
- package/build/components/DatePicker/DatePicker.figma.d.ts +25 -0
- package/build/components/DatePicker/DatePicker.figma.js +23 -0
- package/build/components/DatePicker/DatePickerDay.js +3 -3
- package/build/components/DatePickerInput/DatePickerInput.figma.d.ts +25 -0
- package/build/components/DatePickerInput/DatePickerInput.figma.js +52 -0
- package/build/components/DescriptionList/DescriptionList.figma.d.ts +26 -0
- package/build/components/DescriptionList/DescriptionList.figma.js +59 -0
- package/build/components/DescriptionList/DescriptionListItem.figma.d.ts +22 -0
- package/build/components/DescriptionList/DescriptionListItem.figma.js +42 -0
- package/build/components/Divider/Divider.figma.d.ts +13 -0
- package/build/components/Divider/Divider.figma.js +14 -0
- package/build/components/ExpandableCard/ExpandableCard.figma.d.ts +28 -0
- package/build/components/ExpandableCard/ExpandableCard.figma.js +52 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.figma.d.ts +23 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.figma.js +55 -0
- package/build/components/ExpandableCard/ExpandableCardTriggerRoot.js +4 -0
- package/build/components/FormField/FormField.figma.d.ts +15 -0
- package/build/components/FormField/FormField.figma.js +27 -0
- package/build/components/Helper/HelperText.figma.d.ts +13 -0
- package/build/components/Helper/HelperText.figma.js +12 -0
- package/build/components/HighlightBanner/HighlightBanner.figma.d.ts +19 -0
- package/build/components/HighlightBanner/HighlightBanner.figma.js +45 -0
- package/build/components/IconButton/IconButton.figma.d.ts +22 -0
- package/build/components/IconButton/IconButton.figma.js +47 -0
- package/build/components/IconContainer/IconContainer.figma.d.ts +20 -0
- package/build/components/IconContainer/IconContainer.figma.js +43 -0
- package/build/components/IndicatorIconButton/IndicatorIconButton.figma.d.ts +17 -0
- package/build/components/IndicatorIconButton/IndicatorIconButton.figma.js +23 -0
- package/build/components/InlineLink/InlineLink.d.ts +1 -1
- package/build/components/InlineLink/InlineLink.js +7 -2
- package/build/components/InlineLink/InlineLink.props.d.ts +2 -0
- package/build/components/InlineLink/InlineLinkRoot.d.ts +1 -1
- package/build/components/InlineLink/InlineLinkRoot.js +8 -3
- package/build/components/Input/Input.figma.d.ts +28 -0
- package/build/components/Input/Input.figma.js +67 -0
- package/build/components/Input/Input_1.figma.d.ts +22 -0
- package/build/components/Input/Input_1.figma.js +54 -0
- package/build/components/Input/Input_2.figma.d.ts +17 -0
- package/build/components/Input/Input_2.figma.js +34 -0
- package/build/components/Label/Label.figma.d.ts +14 -0
- package/build/components/Label/Label.figma.js +19 -0
- package/build/components/Link/Link.d.ts +1 -1
- package/build/components/Link/Link.figma.d.ts +27 -0
- package/build/components/Link/Link.figma.js +45 -0
- package/build/components/Link/Link.js +7 -2
- package/build/components/Link/Link.props.d.ts +2 -0
- package/build/components/Link/LinkRoot.d.ts +1 -1
- package/build/components/Link/LinkRoot.js +8 -3
- package/build/components/List/List.figma.d.ts +21 -0
- package/build/components/List/List.figma.js +49 -0
- package/build/components/List/ListAction/ListAction.figma.d.ts +15 -0
- package/build/components/List/ListAction/ListAction.figma.js +17 -0
- package/build/components/List/ListAction/ListAction.js +1 -0
- package/build/components/List/ListItem/ListItem.figma.d.ts +33 -0
- package/build/components/List/ListItem/ListItem.figma.js +83 -0
- package/build/components/List/ListItem/ListItemHelperText.d.ts +1 -1
- package/build/components/List/ListItem/ListItemHelperText.js +2 -8
- package/build/components/List/ListItem/ListItemLeadingContent.figma.d.ts +14 -0
- package/build/components/List/ListItem/ListItemLeadingContent.figma.js +17 -0
- package/build/components/List/ListItem/ListItemRoot.js +1 -0
- package/build/components/List/ListItem/ListItemTrailingContent.figma.d.ts +13 -0
- package/build/components/List/ListItem/ListItemTrailingContent.figma.js +14 -0
- package/build/components/Menu/Menu.figma.d.ts +14 -0
- package/build/components/Menu/Menu.figma.js +33 -0
- package/build/components/Menu/MenuItem.figma.d.ts +29 -0
- package/build/components/Menu/MenuItem.figma.js +45 -0
- package/build/components/Modal/Modal.figma.d.ts +24 -0
- package/build/components/Modal/Modal.figma.js +64 -0
- package/build/components/NavModal/NavModal.figma.d.ts +19 -0
- package/build/components/NavModal/NavModal.figma.js +42 -0
- package/build/components/Pagination/Pagination.figma.d.ts +16 -0
- package/build/components/Pagination/Pagination.figma.js +20 -0
- package/build/components/PillGroup/Pill.figma.d.ts +17 -0
- package/build/components/PillGroup/Pill.figma.js +21 -0
- package/build/components/PillGroup/PillGroup.figma.d.ts +13 -0
- package/build/components/PillGroup/PillGroup.figma.js +18 -0
- package/build/components/ProgressBar/ProgressBar.circular.figma.d.ts +16 -0
- package/build/components/ProgressBar/ProgressBar.circular.figma.js +35 -0
- package/build/components/ProgressBar/ProgressBar.figma.d.ts +15 -0
- package/build/components/ProgressBar/ProgressBar.figma.js +31 -0
- package/build/components/ProgressStepper/ProgressStep.figma.d.ts +15 -0
- package/build/components/ProgressStepper/ProgressStep.figma.js +17 -0
- package/build/components/ProgressStepper/ProgressStepper.figma.d.ts +13 -0
- package/build/components/ProgressStepper/ProgressStepper.figma.js +14 -0
- package/build/components/Radio/Radio.figma.d.ts +15 -0
- package/build/components/Radio/Radio.figma.js +17 -0
- package/build/components/Radio/RadioGroup.figma.d.ts +19 -0
- package/build/components/Radio/RadioGroup.figma.js +45 -0
- package/build/components/Radio/RadioImage.figma.d.ts +11 -0
- package/build/components/Radio/RadioImage.figma.js +10 -0
- package/build/components/Radio/RadioTile.figma.d.ts +16 -0
- package/build/components/Radio/RadioTile.figma.js +23 -0
- package/build/components/RadioCard/RadioCard.figma.d.ts +16 -0
- package/build/components/RadioCard/RadioCard.figma.js +22 -0
- package/build/components/RadioCard/RadioCardIndicator.js +0 -3
- package/build/components/RadioCard/RadioCardRoot.js +3 -3
- package/build/components/Rating/Rating.figma.d.ts +12 -0
- package/build/components/Rating/Rating.figma.js +18 -0
- package/build/components/Roundel/Roundel.figma.d.ts +13 -0
- package/build/components/Roundel/Roundel.figma.js +15 -0
- package/build/components/SectionHeader/SectionHeader.figma.d.ts +21 -0
- package/build/components/SectionHeader/SectionHeader.figma.js +50 -0
- package/build/components/SegmentedControl/SegmentedControl.figma.d.ts +16 -0
- package/build/components/SegmentedControl/SegmentedControl.figma.js +20 -0
- package/build/components/SegmentedControl/SegmentedControlOption.figma.d.ts +17 -0
- package/build/components/SegmentedControl/SegmentedControlOption.figma.js +23 -0
- package/build/components/SegmentedControl/SegmentedControlOption.js +3 -0
- package/build/components/Select/Select.figma.d.ts +24 -0
- package/build/components/Select/Select.figma.js +65 -0
- package/build/components/Select/SelectOption.figma.d.ts +15 -0
- package/build/components/Select/SelectOption.figma.js +27 -0
- package/build/components/Spinner/Spinner.figma.d.ts +13 -0
- package/build/components/Spinner/Spinner.figma.js +16 -0
- package/build/components/Spinner/Spinner.js +1 -1
- package/build/components/Spinner/Spinner.web.js +1 -1
- package/build/components/StepperInput/StepperInput.figma.d.ts +25 -0
- package/build/components/StepperInput/StepperInput.figma.js +32 -0
- package/build/components/Switch/Switch.figma.d.ts +15 -0
- package/build/components/Switch/Switch.figma.js +18 -0
- package/build/components/Switch/Switch.js +25 -1
- package/build/components/Switch/Switch.web.js +25 -1
- package/build/components/Table/Table.figma.d.ts +14 -0
- package/build/components/Table/Table.figma.js +38 -0
- package/build/components/Table/TableHeaderCell.figma.d.ts +15 -0
- package/build/components/Table/TableHeaderCell.figma.js +31 -0
- package/build/components/Tabs/Tab.figma.d.ts +14 -0
- package/build/components/Tabs/Tab.figma.js +14 -0
- package/build/components/Tabs/Tab.js +6 -6
- package/build/components/Tabs/Tabs.figma.d.ts +14 -0
- package/build/components/Tabs/Tabs.figma.js +21 -0
- package/build/components/Textarea/Textarea.figma.d.ts +27 -0
- package/build/components/Textarea/Textarea.figma.js +53 -0
- package/build/components/TimePicker/TimePicker.figma.d.ts +16 -0
- package/build/components/TimePicker/TimePicker.figma.js +30 -0
- package/build/components/TimePickerInput/TimePickerInput.figma.d.ts +29 -0
- package/build/components/TimePickerInput/TimePickerInput.figma.js +53 -0
- package/build/components/Timeline/Timeline.figma.d.ts +14 -0
- package/build/components/Timeline/Timeline.figma.js +23 -0
- package/build/components/Timeline/TimelineItemProgress.figma.d.ts +16 -0
- package/build/components/Timeline/TimelineItemProgress.figma.js +30 -0
- package/build/components/Timeline/TimelineItemStatic.figma.d.ts +16 -0
- package/build/components/Timeline/TimelineItemStatic.figma.js +30 -0
- package/build/components/Toast/ToastItem.figma.d.ts +20 -0
- package/build/components/Toast/ToastItem.figma.js +42 -0
- package/build/components/ToggleButton/ToggleButtonRoot.js +1 -1
- package/build/components/ToggleButtonCard/ToggleButtonCard.figma.d.ts +14 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.figma.js +28 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardRoot.js +16 -8
- package/build/components/UnstyledIconButton/UnstyledIconButton.figma.d.ts +21 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.figma.js +32 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonRoot.js +1 -1
- package/build/components/VerificationInput/VerificationInput.figma.d.ts +19 -0
- package/build/components/VerificationInput/VerificationInput.figma.js +22 -0
- package/build/components/index.d.ts +1 -0
- package/build/components/index.js +1 -0
- package/build/core/themes.d.ts +16 -16
- package/package.json +5 -4
- package/public/llms/components/list.md +6 -11
- package/public/llms/docs/{ai-tooling.md → ai-toolkit.md} +29 -7
- package/public/llms/docs/introduction.md +1 -1
- package/public/llms.txt +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=2161-1311&t=3uUSBVdxldgG5uz3-4
|
|
2
|
+
// source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Input/Input.tsx
|
|
3
|
+
// component=Input
|
|
4
|
+
import figma from 'figma';
|
|
5
|
+
const loading = figma.selectedInstance.getEnum('State', {
|
|
6
|
+
Loading: true,
|
|
7
|
+
});
|
|
8
|
+
const placeholder = figma.selectedInstance.getEnum('State', {
|
|
9
|
+
Placeholder: figma.selectedInstance.getString('Value'),
|
|
10
|
+
});
|
|
11
|
+
const value = figma.selectedInstance.getEnum('State', {
|
|
12
|
+
Filled: figma.selectedInstance.getString('Value'),
|
|
13
|
+
});
|
|
14
|
+
const label = figma.selectedInstance.getBoolean('Label?', {
|
|
15
|
+
true: figma.selectedInstance.getString('Label'),
|
|
16
|
+
});
|
|
17
|
+
const helperText = figma.selectedInstance.getBoolean('Helper text?', {
|
|
18
|
+
true: figma.selectedInstance.getString('Helper text'),
|
|
19
|
+
});
|
|
20
|
+
export default {
|
|
21
|
+
id: 'Input',
|
|
22
|
+
imports: ["import { Input } from '@utilitywarehouse/hearth-react-native';"],
|
|
23
|
+
example: figma.code `<Input type="search"${figma.helpers.react.renderProp('loading', loading)}${figma.helpers.react.renderProp('placeholder', placeholder)}${figma.helpers.react.renderProp('value', value)}${figma.helpers.react.renderProp('label', label)}${figma.helpers.react.renderProp('helperText', helperText)}/>`,
|
|
24
|
+
metadata: {
|
|
25
|
+
nestable: true,
|
|
26
|
+
props: {
|
|
27
|
+
loading,
|
|
28
|
+
placeholder,
|
|
29
|
+
value,
|
|
30
|
+
label,
|
|
31
|
+
helperText,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
imports: string[];
|
|
5
|
+
example: figma.TemplateStringResult;
|
|
6
|
+
metadata: {
|
|
7
|
+
nestable: boolean;
|
|
8
|
+
props: {
|
|
9
|
+
label: string;
|
|
10
|
+
optional: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=8145%3A617
|
|
2
|
+
// source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Label/Label.tsx
|
|
3
|
+
// component=Label
|
|
4
|
+
import figma from 'figma';
|
|
5
|
+
const instance = figma.selectedInstance;
|
|
6
|
+
const label = instance.getString('Label');
|
|
7
|
+
const optional = instance.getBoolean('Optional?');
|
|
8
|
+
export default {
|
|
9
|
+
id: 'label',
|
|
10
|
+
imports: ['import { Label } from "@utilitywarehouse/hearth-react-native";'],
|
|
11
|
+
example: figma.code `<Label>${figma.helpers.react.renderChildren(label)}${optional ? ' (optional)' : ''}</Label>`,
|
|
12
|
+
metadata: {
|
|
13
|
+
nestable: true,
|
|
14
|
+
props: {
|
|
15
|
+
label,
|
|
16
|
+
optional,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LinkProps } from './Link.props';
|
|
2
2
|
export declare const LinkText: import("react").ForwardRefExoticComponent<import("react-native/types").TextProps & import("react").RefAttributes<import("react-native/types").TextProps>>;
|
|
3
3
|
declare const Link: {
|
|
4
|
-
({ children, icon, disabled, target, iconPosition, showIcon, textStyle, iconStyle, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
({ children, icon, disabled, target, rel, iconPosition, showIcon, textStyle, iconStyle, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
export default Link;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
imports: string[];
|
|
5
|
+
example: figma.TemplateStringResult;
|
|
6
|
+
metadata: {
|
|
7
|
+
nestable: boolean;
|
|
8
|
+
props: {
|
|
9
|
+
iconRight: boolean;
|
|
10
|
+
iconLeft: boolean;
|
|
11
|
+
inverted: figma.EnumOptionsValues<{
|
|
12
|
+
True: boolean;
|
|
13
|
+
False: boolean;
|
|
14
|
+
}> | undefined;
|
|
15
|
+
text: string;
|
|
16
|
+
showIcon: boolean;
|
|
17
|
+
iconPosition: string | undefined;
|
|
18
|
+
iconRightName: string | undefined;
|
|
19
|
+
iconLeftName: string | undefined;
|
|
20
|
+
icon: {
|
|
21
|
+
$value: string;
|
|
22
|
+
$type: "react-component";
|
|
23
|
+
} | undefined;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=163%3A562
|
|
2
|
+
// source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Link/Link.tsx
|
|
3
|
+
// component=Link
|
|
4
|
+
import figma from 'figma';
|
|
5
|
+
const iconRight = figma.selectedInstance.getBoolean('Icon right?');
|
|
6
|
+
const iconLeft = figma.selectedInstance.getBoolean('Icon left?');
|
|
7
|
+
const inverted = figma.selectedInstance.getEnum('Inverted?', {
|
|
8
|
+
True: true,
|
|
9
|
+
False: false,
|
|
10
|
+
});
|
|
11
|
+
const text = figma.selectedInstance.getString('Text');
|
|
12
|
+
const showIcon = iconRight || iconLeft;
|
|
13
|
+
const iconPosition = iconRight ? 'right' : iconLeft ? 'left' : undefined;
|
|
14
|
+
const iconRightName = figma.selectedInstance.getInstanceSwap('Icon right-20')?.executeTemplate()
|
|
15
|
+
.metadata?.props?.componentName;
|
|
16
|
+
const iconLeftName = figma.selectedInstance.getInstanceSwap('Icon left-20')?.executeTemplate()
|
|
17
|
+
.metadata?.props?.componentName;
|
|
18
|
+
const iconName = showIcon ? (iconRight ? iconRightName : iconLeftName) : undefined;
|
|
19
|
+
const icon = iconName ? figma.helpers.react.reactComponent(iconName) : undefined;
|
|
20
|
+
export default {
|
|
21
|
+
id: 'Link',
|
|
22
|
+
imports: [
|
|
23
|
+
"import { Link } from '@utilitywarehouse/hearth-react-native';",
|
|
24
|
+
...(iconName
|
|
25
|
+
? [`import { ${iconName} } from '@utilitywarehouse/hearth-react-native-icons';`]
|
|
26
|
+
: []),
|
|
27
|
+
],
|
|
28
|
+
example: figma.code `<Link${figma.helpers.react.renderProp('inverted', inverted)}${figma.helpers.react.renderProp('showIcon', showIcon)}${figma.helpers.react.renderProp('iconPosition', iconPosition)}${figma.helpers.react.renderProp('icon', icon)}>
|
|
29
|
+
${figma.helpers.react.renderChildren(text)}
|
|
30
|
+
</Link>`,
|
|
31
|
+
metadata: {
|
|
32
|
+
nestable: true,
|
|
33
|
+
props: {
|
|
34
|
+
iconRight,
|
|
35
|
+
iconLeft,
|
|
36
|
+
inverted,
|
|
37
|
+
text,
|
|
38
|
+
showIcon,
|
|
39
|
+
iconPosition,
|
|
40
|
+
iconRightName,
|
|
41
|
+
iconLeftName,
|
|
42
|
+
icon,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
@@ -10,9 +10,14 @@ const LinkComponent = createLink({
|
|
|
10
10
|
});
|
|
11
11
|
export const LinkText = LinkComponent.Text;
|
|
12
12
|
LinkText.displayName = 'LinkText';
|
|
13
|
-
const Link = ({ children, icon = ChevronRightSmallIcon, disabled = false, target = '_self', iconPosition = 'right', showIcon = true, textStyle, iconStyle, ...props }) => {
|
|
13
|
+
const Link = ({ children, icon = ChevronRightSmallIcon, disabled = false, target = '_self', rel, iconPosition = 'right', showIcon = true, textStyle, iconStyle, ...props }) => {
|
|
14
14
|
const LinkAny = LinkComponent;
|
|
15
|
-
|
|
15
|
+
// `@gluestack-ui/link`'s `useLink` only ever applies `target`/`rel` via a ref
|
|
16
|
+
// mutation during render, before the ref is attached at commit - it never
|
|
17
|
+
// takes effect. Pass them through explicitly instead; LinkRoot forwards them
|
|
18
|
+
// to the underlying Pressable as `hrefAttrs`, which is how react-native-web
|
|
19
|
+
// actually applies them to the rendered `<a>`.
|
|
20
|
+
return (_jsxs(LinkAny, { ...props, target: target, rel: rel ?? (target === '_blank' ? 'noopener noreferrer' : undefined), isDisabled: disabled, isExternal: target === '_blank', children: [showIcon && icon && iconPosition === 'left' ? (_jsx(LinkIcon, { as: icon, style: iconStyle })) : null, _jsx(LinkText, { style: textStyle, children: children }), showIcon && icon && iconPosition === 'right' ? (_jsx(LinkIcon, { as: icon, style: iconStyle })) : null] }));
|
|
16
21
|
};
|
|
17
22
|
Link.displayName = 'Link';
|
|
18
23
|
export default Link;
|
|
@@ -5,6 +5,8 @@ export interface LinkProps extends Omit<PressableProps, 'children'> {
|
|
|
5
5
|
children: TextProps['children'];
|
|
6
6
|
href?: string;
|
|
7
7
|
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
8
|
+
/** Defaults to `noopener noreferrer` when `target` is `_blank`. */
|
|
9
|
+
rel?: string;
|
|
8
10
|
inverted?: boolean;
|
|
9
11
|
disabled?: boolean;
|
|
10
12
|
icon?: ComponentType;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
-
import { Pressable } from 'react-native';
|
|
3
|
+
import { Platform, Pressable } from 'react-native';
|
|
4
4
|
import { StyleSheet } from 'react-native-unistyles';
|
|
5
5
|
import { LinkContext } from './Link.context';
|
|
6
|
-
const LinkRoot = ({ children, inverted = false, states, ...props }) => {
|
|
6
|
+
const LinkRoot = ({ children, inverted = false, states, target, rel, ...props }) => {
|
|
7
7
|
const { active, disabled = false } = states || {};
|
|
8
8
|
styles.useVariants({ disabled, inverted, active });
|
|
9
9
|
const value = useMemo(() => ({ inverted, disabled, active }), [inverted, disabled, active]);
|
|
10
|
-
|
|
10
|
+
// react-native-web only applies `target`/`rel` to the rendered `<a>` via
|
|
11
|
+
// `hrefAttrs` - passing them as bare props is a no-op. Not typed on
|
|
12
|
+
// `PressableProps`, hence the spread rather than a named JSX attribute.
|
|
13
|
+
// Web-only prop, so it's gated to avoid an unknown-prop warning on native.
|
|
14
|
+
const hrefAttrsProp = Platform.OS === 'web' && (target || rel) ? { hrefAttrs: { target, rel } } : {};
|
|
15
|
+
return (_jsx(LinkContext.Provider, { value: value, children: _jsx(Pressable, { ...props, ...hrefAttrsProp, style: [styles.container, props.style], children: children }) }));
|
|
11
16
|
};
|
|
12
17
|
LinkRoot.displayName = 'LinkRoot';
|
|
13
18
|
const styles = StyleSheet.create(theme => ({
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
imports: string[];
|
|
5
|
+
example: figma.TemplateStringResult;
|
|
6
|
+
metadata: {
|
|
7
|
+
nestable: boolean;
|
|
8
|
+
props: {
|
|
9
|
+
container: string | undefined;
|
|
10
|
+
sectionHeader: {
|
|
11
|
+
heading: string | undefined;
|
|
12
|
+
helperText: string | undefined;
|
|
13
|
+
trailingContent: {
|
|
14
|
+
headerTrailingContent: figma.ResultSection[] | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
};
|
|
17
|
+
listContainer: figma.ResultSection[][];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=2437%3A621
|
|
2
|
+
// source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/List/List.tsx
|
|
3
|
+
// component=List
|
|
4
|
+
import figma from 'figma';
|
|
5
|
+
const container = figma.selectedInstance.getEnum('Container', {
|
|
6
|
+
'Subtle White': 'subtleWhite',
|
|
7
|
+
'Emphasis White': 'emphasisWhite',
|
|
8
|
+
'Subtle Warm White': 'subtleWarmWhite',
|
|
9
|
+
'Emphasis Warm White': 'emphasisWarmWhite',
|
|
10
|
+
});
|
|
11
|
+
const sectionHeader = figma.selectedInstance.getBoolean('Section header?', {
|
|
12
|
+
true: (function () {
|
|
13
|
+
const nestedLayer0 = figma.selectedInstance.findInstance('Section Header');
|
|
14
|
+
return {
|
|
15
|
+
heading: nestedLayer0.type !== 'ERROR' ? nestedLayer0.getString('Heading') : undefined,
|
|
16
|
+
helperText: nestedLayer0.type !== 'ERROR'
|
|
17
|
+
? nestedLayer0.getBoolean('Helper text?', {
|
|
18
|
+
true: nestedLayer0.getString('Helper text'),
|
|
19
|
+
})
|
|
20
|
+
: undefined,
|
|
21
|
+
trailingContent: nestedLayer0.type !== 'ERROR'
|
|
22
|
+
? nestedLayer0.getBoolean('Trailing content?', {
|
|
23
|
+
true: (function () {
|
|
24
|
+
const nestedLayer1 = figma.selectedInstance.findInstance('Trailing content');
|
|
25
|
+
return {
|
|
26
|
+
headerTrailingContent: nestedLayer1.type !== 'ERROR'
|
|
27
|
+
? nestedLayer1.getInstanceSwap('Variant')?.executeTemplate().example
|
|
28
|
+
: undefined,
|
|
29
|
+
};
|
|
30
|
+
})(),
|
|
31
|
+
})
|
|
32
|
+
: undefined,
|
|
33
|
+
};
|
|
34
|
+
})(),
|
|
35
|
+
});
|
|
36
|
+
const listContainer = figma.selectedInstance
|
|
37
|
+
.getSlot('List Container')
|
|
38
|
+
?.connectedInstances.map(i => i.executeTemplate().example) ?? [];
|
|
39
|
+
export default {
|
|
40
|
+
id: 'List',
|
|
41
|
+
imports: ["import { List } from '@utilitywarehouse/hearth-react-native';"],
|
|
42
|
+
example: figma.code `<List${figma.helpers.react.renderProp('container', container)}${figma.helpers.react.renderProp('heading', sectionHeader?.heading)}${figma.helpers.react.renderProp('helperText', sectionHeader?.helperText)}${figma.helpers.react.renderProp('headerTrailingContent', sectionHeader?.trailingContent?.headerTrailingContent)}>
|
|
43
|
+
${figma.helpers.react.renderChildren(listContainer.flat())}
|
|
44
|
+
</List>`,
|
|
45
|
+
metadata: {
|
|
46
|
+
nestable: true,
|
|
47
|
+
props: { container, sectionHeader, listContainer },
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
imports: string[];
|
|
5
|
+
example: figma.TemplateStringResult;
|
|
6
|
+
metadata: {
|
|
7
|
+
nestable: boolean;
|
|
8
|
+
props: {
|
|
9
|
+
heading: string;
|
|
10
|
+
disabled: boolean | undefined;
|
|
11
|
+
loading: boolean | undefined;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=9661%3A5128
|
|
2
|
+
// source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/List/ListAction/ListAction.tsx
|
|
3
|
+
// component=ListAction
|
|
4
|
+
import figma from 'figma';
|
|
5
|
+
const heading = figma.selectedInstance.getString('Action heading');
|
|
6
|
+
const disabled = figma.selectedInstance.getEnum('State', {
|
|
7
|
+
Disabled: true,
|
|
8
|
+
});
|
|
9
|
+
const loading = figma.selectedInstance.getEnum('State', {
|
|
10
|
+
Loading: true,
|
|
11
|
+
});
|
|
12
|
+
export default {
|
|
13
|
+
id: 'ListAction',
|
|
14
|
+
imports: ["import { ListAction } from '@utilitywarehouse/hearth-react-native';"],
|
|
15
|
+
example: figma.code `<ListAction${figma.helpers.react.renderProp('heading', heading)}${figma.helpers.react.renderProp('disabled', disabled)}${figma.helpers.react.renderProp('loading', loading)}/>`,
|
|
16
|
+
metadata: { nestable: true, props: { heading, disabled, loading } },
|
|
17
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
imports: string[];
|
|
5
|
+
example: figma.TemplateStringResult;
|
|
6
|
+
metadata: {
|
|
7
|
+
nestable: boolean;
|
|
8
|
+
props: {
|
|
9
|
+
loading: boolean | undefined;
|
|
10
|
+
disabled: boolean | undefined;
|
|
11
|
+
leadingContent: {
|
|
12
|
+
variant: figma.EnumOptionsValues<{
|
|
13
|
+
Icon: figma.ResultSection[] | undefined;
|
|
14
|
+
'Icon Container': figma.ResultSection[] | undefined;
|
|
15
|
+
Avatar: figma.ResultSection[] | undefined;
|
|
16
|
+
Indicator: figma.ResultSection[] | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
trailingContent: {
|
|
20
|
+
variant: figma.EnumOptionsValues<{
|
|
21
|
+
Link: figma.ResultSection[] | undefined;
|
|
22
|
+
Button: figma.ResultSection[] | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
heading: string;
|
|
26
|
+
helperText: string;
|
|
27
|
+
badge: figma.ResultSection[] | undefined;
|
|
28
|
+
numericValue: string;
|
|
29
|
+
customContent: figma.ResultSection[][] | undefined;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=2421%3A1628
|
|
2
|
+
// source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/List/ListItem/ListItem.tsx
|
|
3
|
+
// component=ListItem
|
|
4
|
+
import figma from 'figma';
|
|
5
|
+
const loading = figma.selectedInstance.getEnum('State', {
|
|
6
|
+
Loading: true,
|
|
7
|
+
});
|
|
8
|
+
const disabled = figma.selectedInstance.getEnum('State', {
|
|
9
|
+
Disabled: true,
|
|
10
|
+
});
|
|
11
|
+
// findLayers() returns a union that includes TextHandle, which has no executeTemplate() —
|
|
12
|
+
// guard on the INSTANCE type before calling it.
|
|
13
|
+
function executeFirstInstanceTemplate(layers) {
|
|
14
|
+
const layer = layers[0];
|
|
15
|
+
return layer && layer.type === 'INSTANCE' ? layer.executeTemplate().example : undefined;
|
|
16
|
+
}
|
|
17
|
+
const leadingContent = figma.selectedInstance.getBoolean('Leading content?', {
|
|
18
|
+
true: (function () {
|
|
19
|
+
const nestedLayer3 = figma.selectedInstance.findInstance('Leading content');
|
|
20
|
+
return {
|
|
21
|
+
variant: nestedLayer3.type !== 'ERROR'
|
|
22
|
+
? nestedLayer3.getEnum('Variant', {
|
|
23
|
+
Icon: nestedLayer3.getInstanceSwap('Icon-24')?.executeTemplate().example,
|
|
24
|
+
'Icon Container': executeFirstInstanceTemplate(nestedLayer3.findLayers(n => n.type === 'INSTANCE' && n.name === 'Icon Container')),
|
|
25
|
+
Avatar: executeFirstInstanceTemplate(nestedLayer3.findLayers(n => n.type === 'INSTANCE' && n.name === 'Avatar')),
|
|
26
|
+
Indicator: executeFirstInstanceTemplate(nestedLayer3.findLayers(n => n.type === 'INSTANCE' && n.name === 'Indicator')),
|
|
27
|
+
})
|
|
28
|
+
: undefined,
|
|
29
|
+
};
|
|
30
|
+
})(),
|
|
31
|
+
});
|
|
32
|
+
const trailingContent = figma.selectedInstance.getBoolean('Trailing Content?', {
|
|
33
|
+
true: (function () {
|
|
34
|
+
const nestedLayer4 = figma.selectedInstance.findInstance('Trailing content');
|
|
35
|
+
return {
|
|
36
|
+
variant: nestedLayer4.type !== 'ERROR'
|
|
37
|
+
? nestedLayer4.getEnum('Variant', {
|
|
38
|
+
Link: executeFirstInstanceTemplate(nestedLayer4.findLayers(n => n.type === 'INSTANCE' && n.name === 'Link')),
|
|
39
|
+
Button: executeFirstInstanceTemplate(nestedLayer4.findLayers(n => n.type === 'INSTANCE' && n.name === 'Button')),
|
|
40
|
+
})
|
|
41
|
+
: undefined,
|
|
42
|
+
};
|
|
43
|
+
})(),
|
|
44
|
+
});
|
|
45
|
+
const heading = figma.selectedInstance.getString('List heading');
|
|
46
|
+
const helperText = figma.selectedInstance.getBoolean('Helper text?', {
|
|
47
|
+
true: figma.selectedInstance.getString('Helper text'),
|
|
48
|
+
});
|
|
49
|
+
const showBadge = figma.selectedInstance.getBoolean('Badge?');
|
|
50
|
+
const badgeInstance = figma.selectedInstance.findInstance('Badge');
|
|
51
|
+
const badge = showBadge && badgeInstance.type !== 'ERROR' ? badgeInstance.executeTemplate().example : undefined;
|
|
52
|
+
const numericValue = figma.selectedInstance.getBoolean('Numerical value?', {
|
|
53
|
+
true: figma.selectedInstance.getString('Numerical value'),
|
|
54
|
+
});
|
|
55
|
+
// "Slot" is a genuine slot property, only populated for the 'Custom' variant.
|
|
56
|
+
const customContent = figma.selectedInstance.getEnum('Variant', {
|
|
57
|
+
Custom: figma.selectedInstance
|
|
58
|
+
.getSlot('Slot')
|
|
59
|
+
?.connectedInstances.map(i => i.executeTemplate().example) ?? [],
|
|
60
|
+
});
|
|
61
|
+
export default {
|
|
62
|
+
id: 'ListItem',
|
|
63
|
+
imports: ["import { ListItem } from '@utilitywarehouse/hearth-react-native';"],
|
|
64
|
+
example: customContent
|
|
65
|
+
? figma.code `<ListItem${figma.helpers.react.renderProp('loading', loading)}${figma.helpers.react.renderProp('disabled', disabled)}>
|
|
66
|
+
${figma.helpers.react.renderChildren(customContent.flat())}
|
|
67
|
+
</ListItem>`
|
|
68
|
+
: figma.code `<ListItem${figma.helpers.react.renderProp('heading', heading)}${figma.helpers.react.renderProp('helperText', helperText)}${figma.helpers.react.renderProp('badge', badge)}${figma.helpers.react.renderProp('numericValue', numericValue)}${figma.helpers.react.renderProp('loading', loading)}${figma.helpers.react.renderProp('disabled', disabled)}${figma.helpers.react.renderProp('leadingContent', leadingContent?.variant)}${figma.helpers.react.renderProp('trailingContent', trailingContent?.variant)}/>`,
|
|
69
|
+
metadata: {
|
|
70
|
+
nestable: true,
|
|
71
|
+
props: {
|
|
72
|
+
loading,
|
|
73
|
+
disabled,
|
|
74
|
+
leadingContent,
|
|
75
|
+
trailingContent,
|
|
76
|
+
heading,
|
|
77
|
+
helperText,
|
|
78
|
+
badge,
|
|
79
|
+
numericValue,
|
|
80
|
+
customContent,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BodyTextProps } from '../../BodyText';
|
|
2
2
|
declare const ListItemHelperText: {
|
|
3
|
-
({ children,
|
|
3
|
+
({ children, ...props }: BodyTextProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
export default ListItemHelperText;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { StyleSheet } from 'react-native-unistyles';
|
|
3
2
|
import { BodyText } from '../../BodyText';
|
|
4
|
-
const ListItemHelperText = ({ children,
|
|
5
|
-
return (_jsx(BodyText, { size: "md",
|
|
3
|
+
const ListItemHelperText = ({ children, ...props }) => {
|
|
4
|
+
return (_jsx(BodyText, { size: "md", color: "secondary", ...props, children: children }));
|
|
6
5
|
};
|
|
7
6
|
ListItemHelperText.displayName = 'ListItemHelperText';
|
|
8
|
-
const styles = StyleSheet.create(theme => ({
|
|
9
|
-
text: {
|
|
10
|
-
color: theme.color.text.secondary,
|
|
11
|
-
},
|
|
12
|
-
}));
|
|
13
7
|
export default ListItemHelperText;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
imports: string[];
|
|
5
|
+
example: figma.TemplateStringResult;
|
|
6
|
+
metadata: {
|
|
7
|
+
nestable: boolean;
|
|
8
|
+
props: {
|
|
9
|
+
variant: string | undefined;
|
|
10
|
+
icon: figma.InstanceHandle | figma.ErrorHandle | undefined;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=6732%3A5792
|
|
2
|
+
// source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/List/ListItem/ListItemLeadingContent.tsx
|
|
3
|
+
// component=ListItemLeadingContent
|
|
4
|
+
import figma from 'figma';
|
|
5
|
+
const variant = figma.selectedInstance.getEnum('Variant', {
|
|
6
|
+
Icon: 'icon',
|
|
7
|
+
'Icon Container': 'iconContainer',
|
|
8
|
+
Avatar: 'avatar',
|
|
9
|
+
Indicator: 'indicator',
|
|
10
|
+
});
|
|
11
|
+
const icon = figma.selectedInstance.getInstanceSwap('Icon-24');
|
|
12
|
+
export default {
|
|
13
|
+
id: 'ListItemLeadingContent',
|
|
14
|
+
imports: ["import { ListItemLeadingContent } from '@utilitywarehouse/hearth-react-native';"],
|
|
15
|
+
example: figma.code `<ListItemLeadingContent${figma.helpers.react.renderProp('variant', variant)} />`,
|
|
16
|
+
metadata: { nestable: true, props: { variant, icon } },
|
|
17
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=9852%3A9858
|
|
2
|
+
// source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/List/ListItem/ListItemTrailingContent.tsx
|
|
3
|
+
// component=ListItemTrailingContent
|
|
4
|
+
import figma from 'figma';
|
|
5
|
+
const variant = figma.selectedInstance.getEnum('Variant', {
|
|
6
|
+
Link: 'link',
|
|
7
|
+
Button: 'button',
|
|
8
|
+
});
|
|
9
|
+
export default {
|
|
10
|
+
id: 'ListItemTrailingContent',
|
|
11
|
+
imports: ["import { ListItemTrailingContent } from '@utilitywarehouse/hearth-react-native';"],
|
|
12
|
+
example: figma.code `<ListItemTrailingContent${figma.helpers.react.renderProp('variant', variant)} />`,
|
|
13
|
+
metadata: { nestable: true, props: { variant } },
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
imports: string[];
|
|
5
|
+
example: figma.TemplateStringResult;
|
|
6
|
+
metadata: {
|
|
7
|
+
props: {
|
|
8
|
+
heading: string;
|
|
9
|
+
showHandle: boolean;
|
|
10
|
+
menuItems: figma.ResultSection[][];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=3263%3A18832
|
|
2
|
+
// source=https://github.com/utilitywarehouse/hearth/blob/main/packages/react-native/src/components/Menu/Menu.tsx
|
|
3
|
+
// component=Menu
|
|
4
|
+
import figma from 'figma';
|
|
5
|
+
const heading = figma.selectedInstance.getBoolean('Heading?', {
|
|
6
|
+
true: figma.selectedInstance.getString('Heading'),
|
|
7
|
+
});
|
|
8
|
+
const showHandle = figma.selectedInstance.getBoolean('Grabber?', {
|
|
9
|
+
true: true,
|
|
10
|
+
});
|
|
11
|
+
const menuItemLayers = figma.selectedInstance.findConnectedInstances(n => n.hasCodeConnect());
|
|
12
|
+
const menuItems = menuItemLayers.map(layer => layer.executeTemplate().example) ?? [];
|
|
13
|
+
export default {
|
|
14
|
+
id: 'Menu',
|
|
15
|
+
imports: [
|
|
16
|
+
"import { Button, Menu, MenuTrigger } from '@utilitywarehouse/hearth-react-native';",
|
|
17
|
+
"import { useRef } from 'react';",
|
|
18
|
+
],
|
|
19
|
+
example: figma.code `function Example() {
|
|
20
|
+
const menuRef = useRef(null);
|
|
21
|
+
return (<>
|
|
22
|
+
<MenuTrigger onPress={() => menuRef.current?.present()}>
|
|
23
|
+
<Button>Open Menu</Button>
|
|
24
|
+
</MenuTrigger>
|
|
25
|
+
<Menu ref={menuRef}${figma.helpers.react.renderProp('heading', heading)}${figma.helpers.react.renderProp('showHandle', showHandle)}>
|
|
26
|
+
${figma.helpers.react.renderChildren(menuItems.flat())}
|
|
27
|
+
</Menu>
|
|
28
|
+
</>);
|
|
29
|
+
}`,
|
|
30
|
+
metadata: {
|
|
31
|
+
props: { heading, showHandle, menuItems },
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
imports: string[];
|
|
5
|
+
example: figma.TemplateStringResult;
|
|
6
|
+
metadata: {
|
|
7
|
+
props: {
|
|
8
|
+
text: string;
|
|
9
|
+
icon: {
|
|
10
|
+
$value: string;
|
|
11
|
+
$type: "react-component";
|
|
12
|
+
} | undefined;
|
|
13
|
+
iconPosition: string;
|
|
14
|
+
colorScheme: figma.EnumOptionsValues<{
|
|
15
|
+
Destructive: string;
|
|
16
|
+
Functional: undefined;
|
|
17
|
+
}>;
|
|
18
|
+
disabled: figma.EnumOptionsValues<{
|
|
19
|
+
Disabled: boolean;
|
|
20
|
+
Default: undefined;
|
|
21
|
+
Hover: undefined;
|
|
22
|
+
Active: undefined;
|
|
23
|
+
Focus: undefined;
|
|
24
|
+
}>;
|
|
25
|
+
};
|
|
26
|
+
nestable: boolean;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default _default;
|