@webiny/admin-ui 6.4.5 → 6.6.0-alpha.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/Accordion/Accordion.d.ts +7 -6
- package/Accordion/components/AccordionItem.d.ts +7 -6
- package/Accordion/components/AccordionItemAction.d.ts +7 -6
- package/Accordion/components/AccordionItemIcon.d.ts +7 -6
- package/Accordion/components/AccordionItemSeparator.d.ts +7 -6
- package/Alert/Alert.d.ts +21 -19
- package/AutoComplete/AutoComplete.d.ts +7 -6
- package/AutoComplete/primitives/AutoCompletePrimitive.d.ts +7 -6
- package/Avatar/Avatar.d.ts +9 -8
- package/Avatar/components/AvatarFallback.d.ts +7 -6
- package/Avatar/components/AvatarImage.d.ts +7 -6
- package/Button/Button.d.ts +10 -9
- package/Button/CopyButton.d.ts +7 -6
- package/Button/IconButton.d.ts +10 -9
- package/Calendar/Calendar.d.ts +7 -6
- package/Card/Card.d.ts +8 -22
- package/Card/components/CancelAction.d.ts +8 -6
- package/Card/components/CardContent.d.ts +6 -6
- package/Card/components/CardTitle.d.ts +2 -2
- package/Card/components/ConfirmAction.d.ts +8 -6
- package/Card/components/Icon.d.ts +7 -6
- package/Checkbox/Checkbox.d.ts +7 -6
- package/Checkbox/primitives/CheckboxPrimitive.d.ts +17 -12
- package/CheckboxGroup/CheckboxGroup.d.ts +7 -6
- package/CheckboxGroup/primitives/CheckboxGroupPrimitive.d.ts +20 -12
- package/CodeEditor/CodeEditor.d.ts +7 -6
- package/CodeEditor/CodeEditorPrimitive.d.ts +7 -6
- package/ColorPicker/ColorPicker.d.ts +7 -6
- package/ColorPicker/primitives/ColorPickerPrimitive.d.ts +7 -6
- package/Command/Command.d.ts +10 -8
- package/DataList/DataListModal.d.ts +6 -3
- package/DataTable/DataTable.d.ts +7 -6
- package/DatePicker/DatePicker.d.ts +7 -6
- package/DatePicker/primitives/DatePickerPrimitive.d.ts +7 -6
- package/Dialog/Dialog.d.ts +8 -22
- package/Dialog/components/CancelAction.d.ts +8 -6
- package/Dialog/components/ConfirmAction.d.ts +8 -6
- package/Dialog/components/DialogContent.d.ts +1 -1
- package/Dialog/components/DialogFooter.d.ts +1 -1
- package/Dialog/components/DialogTitle.d.ts +1 -1
- package/Dialog/components/Icon.d.ts +7 -6
- package/Drawer/Drawer.d.ts +8 -22
- package/Drawer/Drawer.stories.js +1 -0
- package/Drawer/Drawer.stories.js.map +1 -1
- package/Drawer/components/CancelButton.d.ts +8 -6
- package/Drawer/components/ConfirmButton.d.ts +8 -6
- package/Drawer/components/DrawerContent.d.ts +1 -1
- package/Drawer/components/Icon.d.ts +7 -6
- package/DropdownMenu/components/DropdownMenuItem.d.ts +3 -2
- package/DropdownMenu/components/DropdownMenuItem.js +9 -2
- package/DropdownMenu/components/DropdownMenuItem.js.map +1 -1
- package/DropdownMenu/components/DropdownMenuLink.d.ts +9 -8
- package/DropdownMenu/components/DropdownMenuSeparator.d.ts +7 -6
- package/EditableTitle/EditableTitle.d.ts +7 -6
- package/EmptyState/EmptyState.d.ts +43 -0
- package/EmptyState/EmptyState.js +93 -0
- package/EmptyState/EmptyState.js.map +1 -0
- package/EmptyState/EmptyState.stories.d.ts +13 -0
- package/EmptyState/EmptyState.stories.js +136 -0
- package/EmptyState/EmptyState.stories.js.map +1 -0
- package/EmptyState/illustrations/ContentIllustration.d.ts +2 -0
- package/EmptyState/illustrations/ContentIllustration.js +100 -0
- package/EmptyState/illustrations/ContentIllustration.js.map +1 -0
- package/EmptyState/illustrations/LayoutIllustration.d.ts +2 -0
- package/EmptyState/illustrations/LayoutIllustration.js +93 -0
- package/EmptyState/illustrations/LayoutIllustration.js.map +1 -0
- package/EmptyState/illustrations/ListingIllustration.d.ts +2 -0
- package/EmptyState/illustrations/ListingIllustration.js +92 -0
- package/EmptyState/illustrations/ListingIllustration.js.map +1 -0
- package/EmptyState/illustrations/SelectIllustration.d.ts +2 -0
- package/EmptyState/illustrations/SelectIllustration.js +100 -0
- package/EmptyState/illustrations/SelectIllustration.js.map +1 -0
- package/EmptyState/illustrations/TableIllustration.d.ts +2 -0
- package/EmptyState/illustrations/TableIllustration.js +233 -0
- package/EmptyState/illustrations/TableIllustration.js.map +1 -0
- package/EmptyState/illustrations/UploadIllustration.d.ts +2 -0
- package/EmptyState/illustrations/UploadIllustration.js +77 -0
- package/EmptyState/illustrations/UploadIllustration.js.map +1 -0
- package/EmptyState/illustrations/index.d.ts +6 -0
- package/EmptyState/illustrations/index.js +6 -0
- package/EmptyState/index.d.ts +1 -0
- package/EmptyState/index.js +1 -0
- package/FilePicker/FilePicker.d.ts +7 -6
- package/FilePicker/primitives/FilePickerPrimitive.d.ts +8 -7
- package/FilePicker/primitives/components/Trigger.d.ts +1 -1
- package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.d.ts +7 -6
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.d.ts +7 -6
- package/FilePicker/primitives/components/previews/TextOnlyPreview/TextOnlyPreview.d.ts +7 -6
- package/FilePicker/primitives/components/previews/variants.d.ts +1 -1
- package/FillViewport/FillViewport.d.ts +21 -18
- package/FormComponent/Description.d.ts +7 -6
- package/FormComponent/ErrorMessage.d.ts +7 -6
- package/FormComponent/Label.d.ts +7 -6
- package/FormComponent/Note.d.ts +7 -6
- package/Grid/Grid.d.ts +24 -22
- package/HeaderBar/HeaderBar.d.ts +7 -6
- package/Heading/Heading.d.ts +8 -7
- package/Icon/Icon.d.ts +9 -8
- package/IconPicker/IconPicker.d.ts +7 -6
- package/IconPicker/primitives/IconPickerPrimitive.d.ts +1 -1
- package/IconPicker/primitives/components/IconPickerTrigger.d.ts +1 -1
- package/Input/Input.d.ts +7 -6
- package/Input/InputPrimitive.d.ts +9 -8
- package/Label/Label.d.ts +8 -7
- package/Label/components/LabelValue.d.ts +1 -1
- package/Link/Link.d.ts +2 -2
- package/List/List.d.ts +8 -7
- package/List/components/ListItem.d.ts +7 -6
- package/List/components/ListItemAction.d.ts +7 -6
- package/List/components/ListItemHandle.d.ts +7 -6
- package/List/components/ListItemIcon.d.ts +7 -6
- package/List/components/ListItemSeparator.d.ts +7 -6
- package/Loader/Loader.d.ts +9 -8
- package/Loader/OverlayLoader.d.ts +7 -6
- package/MultiAutoComplete/MultiAutoComplete.d.ts +7 -6
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.d.ts +7 -6
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenterWithFreeInput.d.ts +3 -3
- package/MultiAutoComplete/primitives/useMultiAutoComplete.d.ts +3 -3
- package/MultiFilePicker/MultiFilePicker.d.ts +7 -6
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.d.ts +7 -6
- package/MultiSelect/MultiSelect.d.ts +7 -6
- package/MultiSelect/primitives/MultiSelectPrimitive.d.ts +10 -6
- package/Popover/Popover.d.ts +7 -6
- package/Popover/primitives/PopoverPrimitive.d.ts +7 -7
- package/ProgressBar/ProgressBar.d.ts +7 -6
- package/RadioGroup/RadioGroup.d.ts +7 -6
- package/RadioGroup/primitives/Radio.d.ts +7 -6
- package/RadioGroup/primitives/RadioGroupPrimitive.d.ts +5 -1
- package/RangeSlider/RangeSlider.d.ts +7 -6
- package/SegmentedControl/SegmentedControl.d.ts +8 -7
- package/SegmentedControl/SegmentedControlTabs.d.ts +5 -2
- package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +1 -1
- package/Select/Select.d.ts +7 -6
- package/Select/primitives/components/SelectTrigger.d.ts +2 -2
- package/Separator/Separator.d.ts +9 -8
- package/Sidebar/Sidebar.d.ts +7 -6
- package/Sidebar/components/SidebarIcon.d.ts +7 -6
- package/Sidebar/components/SidebarProvider.d.ts +4 -4
- package/Sidebar/components/items/SidebarMenuGroup.d.ts +9 -8
- package/Sidebar/components/items/SidebarMenuItem.d.ts +11 -10
- package/Sidebar/components/items/SidebarMenuItemIcon.d.ts +7 -6
- package/Sidebar/components/items/SidebarMenuLink.d.ts +11 -10
- package/Sidebar/components/items/SidebarMenuProvider.d.ts +4 -4
- package/Sidebar/components/items/SidebarMenuRootItem.d.ts +9 -7
- package/Skeleton/Skeleton.d.ts +9 -7
- package/Skeleton/Skeleton.js +10 -4
- package/Skeleton/Skeleton.js.map +1 -1
- package/Skeleton/Skeleton.stories.d.ts +2 -0
- package/Skeleton/Skeleton.stories.js +28 -2
- package/Skeleton/Skeleton.stories.js.map +1 -1
- package/Slider/Slider.d.ts +7 -6
- package/SteppedProgress/SteppedProgress.d.ts +7 -6
- package/SteppedProgress/SteppedProgressItem.d.ts +7 -6
- package/Switch/Switch.d.ts +7 -6
- package/Switch/primitives/SwitchPrimitive.d.ts +10 -6
- package/Table/Table.d.ts +12 -10
- package/Table/components/Direction.d.ts +1 -1
- package/Tabs/Tabs.d.ts +8 -6
- package/Tabs/Tabs.js +5 -2
- package/Tabs/Tabs.js.map +1 -1
- package/Tabs/components/Content.d.ts +1 -1
- package/Tabs/components/List.d.ts +2 -2
- package/Tabs/components/Tab.d.ts +7 -6
- package/Tabs/components/Trigger.d.ts +3 -2
- package/Tabs/components/Trigger.js +8 -3
- package/Tabs/components/Trigger.js.map +1 -1
- package/Tag/Tag.d.ts +8 -7
- package/Tags/Tags.d.ts +7 -6
- package/Tags/primitives/TagsPrimitive.d.ts +7 -6
- package/Text/Text.d.ts +8 -7
- package/Textarea/Textarea.d.ts +7 -6
- package/Textarea/TextareaPrimitive.d.ts +9 -8
- package/Toast/Toast.d.ts +7 -6
- package/Toast/components/ToastActions.d.ts +7 -6
- package/Toast/components/ToastDescription.d.ts +7 -6
- package/Toast/components/ToastTitle.d.ts +7 -6
- package/Toggle/Toggle.d.ts +7 -6
- package/Toggle/primitives/TogglePrimitive.d.ts +13 -9
- package/ToggleGroup/ToggleGroup.d.ts +7 -6
- package/ToggleGroup/primitives/ToggleGroupPrimitive.d.ts +13 -9
- package/Tooltip/Tooltip.d.ts +7 -6
- package/Tree/Tree.d.ts +7 -6
- package/Tree/components/Item.d.ts +7 -6
- package/Tree/components/ItemCollapseTrigger.d.ts +7 -6
- package/Tree/components/ItemContent.d.ts +8 -6
- package/Tree/components/ItemDragHandle.d.ts +7 -6
- package/Tree/components/ItemIcon.d.ts +7 -6
- package/Tree/components/ItemPlaceholder.d.ts +7 -6
- package/Tree/components/ItemSubIndentation.d.ts +7 -6
- package/Widget/Widget.d.ts +8 -22
- package/Widget/components/Icon.d.ts +7 -6
- package/Widget/components/WidgetAction.d.ts +8 -6
- package/Widget/components/WidgetContent.d.ts +5 -5
- package/exports/admin/ui.d.ts +1 -0
- package/exports/admin/ui.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +24 -24
- package/theme.css +13 -1
- package/utils.js +52 -34
- package/utils.js.map +1 -1
package/Skeleton/Skeleton.d.ts
CHANGED
|
@@ -2,25 +2,27 @@ import React from "react";
|
|
|
2
2
|
import { type VariantProps } from "../utils.js";
|
|
3
3
|
declare const skeletonVariants: (props?: ({
|
|
4
4
|
type?: "area" | "text" | "thumbnail" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "3xl" | "lg" | "md" | "sm" | "xl" | "xs" | "xxl" | null | undefined;
|
|
6
|
+
shade?: "dark" | "light" | null | undefined;
|
|
6
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
8
|
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof skeletonVariants> {
|
|
8
9
|
}
|
|
9
|
-
declare const
|
|
10
|
-
|
|
10
|
+
declare const DecoratableSkeleton: ({ size, type, shade, className, ...props }: SkeletonProps) => React.JSX.Element;
|
|
11
|
+
declare const Skeleton: typeof DecoratableSkeleton & {
|
|
12
|
+
original: typeof DecoratableSkeleton;
|
|
11
13
|
originalName: string;
|
|
12
14
|
displayName: string;
|
|
13
15
|
} & {
|
|
14
|
-
original:
|
|
15
|
-
original:
|
|
16
|
+
original: typeof DecoratableSkeleton & {
|
|
17
|
+
original: typeof DecoratableSkeleton;
|
|
16
18
|
originalName: string;
|
|
17
19
|
displayName: string;
|
|
18
20
|
};
|
|
19
21
|
originalName: string;
|
|
20
22
|
displayName: string;
|
|
21
23
|
} & {
|
|
22
|
-
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<
|
|
23
|
-
original:
|
|
24
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableSkeleton & {
|
|
25
|
+
original: typeof DecoratableSkeleton;
|
|
24
26
|
originalName: string;
|
|
25
27
|
displayName: string;
|
|
26
28
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Skeleton/Skeleton.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import react from "react";
|
|
2
2
|
import { cn, cva, makeDecoratable } from "../utils.js";
|
|
3
|
-
const skeletonVariants = cva("
|
|
3
|
+
const skeletonVariants = cva("rounded-sm", {
|
|
4
4
|
variants: {
|
|
5
5
|
type: {
|
|
6
6
|
text: "w-full",
|
|
@@ -15,6 +15,10 @@ const skeletonVariants = cva("animate-skeleton-pulse rounded-sm", {
|
|
|
15
15
|
xl: "h-xl",
|
|
16
16
|
xxl: "h-[40px]",
|
|
17
17
|
"3xl": "h-xxl"
|
|
18
|
+
},
|
|
19
|
+
shade: {
|
|
20
|
+
dark: "animate-skeleton-pulse",
|
|
21
|
+
light: "animate-skeleton-pulse-light"
|
|
18
22
|
}
|
|
19
23
|
},
|
|
20
24
|
compoundVariants: [
|
|
@@ -31,13 +35,15 @@ const skeletonVariants = cva("animate-skeleton-pulse rounded-sm", {
|
|
|
31
35
|
],
|
|
32
36
|
defaultVariants: {
|
|
33
37
|
type: "area",
|
|
34
|
-
size: "lg"
|
|
38
|
+
size: "lg",
|
|
39
|
+
shade: "dark"
|
|
35
40
|
}
|
|
36
41
|
});
|
|
37
|
-
const DecoratableSkeleton = ({ size, type, className, ...props })=>/*#__PURE__*/ react.createElement("div", {
|
|
42
|
+
const DecoratableSkeleton = ({ size, type, shade, className, ...props })=>/*#__PURE__*/ react.createElement("div", {
|
|
38
43
|
className: cn(skeletonVariants({
|
|
39
44
|
size,
|
|
40
|
-
type
|
|
45
|
+
type,
|
|
46
|
+
shade
|
|
41
47
|
}), className),
|
|
42
48
|
...props
|
|
43
49
|
});
|
package/Skeleton/Skeleton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton/Skeleton.js","sources":["../../src/Skeleton/Skeleton.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn, cva, type VariantProps, makeDecoratable } from \"~/utils.js\";\n\nconst skeletonVariants = cva(\"
|
|
1
|
+
{"version":3,"file":"Skeleton/Skeleton.js","sources":["../../src/Skeleton/Skeleton.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn, cva, type VariantProps, makeDecoratable } from \"~/utils.js\";\n\nconst skeletonVariants = cva(\"rounded-sm\", {\n variants: {\n type: {\n text: \"w-full\",\n thumbnail: \"aspect-square\",\n area: \"size-full\"\n },\n size: {\n xs: \"h-sm\",\n sm: \"h-sm-extra\",\n md: \"h-md\",\n lg: \"h-lg\",\n xl: \"h-xl\",\n xxl: \"h-[40px]\",\n \"3xl\": \"h-xxl\"\n },\n shade: {\n dark: \"animate-skeleton-pulse\",\n light: \"animate-skeleton-pulse-light\"\n }\n },\n compoundVariants: [\n // The following compound variants are not supported by the current version of the design system.\n {\n type: \"thumbnail\",\n size: \"xs\",\n class: \"hidden!\"\n },\n {\n type: \"text\",\n size: \"3xl\",\n class: \"hidden!\"\n }\n ],\n defaultVariants: {\n type: \"area\",\n size: \"lg\",\n shade: \"dark\"\n }\n});\n\ninterface SkeletonProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof skeletonVariants> {}\n\nconst DecoratableSkeleton = ({ size, type, shade, className, ...props }: SkeletonProps) => {\n return <div className={cn(skeletonVariants({ size, type, shade }), className)} {...props} />;\n};\n\nconst Skeleton = makeDecoratable(\"Skeleton\", DecoratableSkeleton);\n\nexport { Skeleton, type SkeletonProps };\n"],"names":["skeletonVariants","cva","DecoratableSkeleton","size","type","shade","className","props","cn","Skeleton","makeDecoratable"],"mappings":";;AAGA,MAAMA,mBAAmBC,IAAI,cAAc;IACvC,UAAU;QACN,MAAM;YACF,MAAM;YACN,WAAW;YACX,MAAM;QACV;QACA,MAAM;YACF,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,KAAK;YACL,OAAO;QACX;QACA,OAAO;YACH,MAAM;YACN,OAAO;QACX;IACJ;IACA,kBAAkB;QAEd;YACI,MAAM;YACN,MAAM;YACN,OAAO;QACX;QACA;YACI,MAAM;YACN,MAAM;YACN,OAAO;QACX;KACH;IACD,iBAAiB;QACb,MAAM;QACN,MAAM;QACN,OAAO;IACX;AACJ;AAKA,MAAMC,sBAAsB,CAAC,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAEC,SAAS,EAAE,GAAGC,OAAsB,GAC3E,WAAP,GAAO,oBAAC;QAAI,WAAWC,GAAGR,iBAAiB;YAAEG;YAAMC;YAAMC;QAAM,IAAIC;QAAa,GAAGC,KAAK;;AAG5F,MAAME,WAAWC,gBAAgB,YAAYR"}
|
|
@@ -15,4 +15,6 @@ export declare const Large: Story;
|
|
|
15
15
|
export declare const ExtraLarge: Story;
|
|
16
16
|
export declare const DoubleExtraLarge: Story;
|
|
17
17
|
export declare const TripleExtraLarge: Story;
|
|
18
|
+
export declare const Dark: Story;
|
|
19
|
+
export declare const Light: Story;
|
|
18
20
|
export declare const Documentation: Story;
|
|
@@ -26,6 +26,13 @@ const meta = {
|
|
|
26
26
|
"xxl",
|
|
27
27
|
"3xl"
|
|
28
28
|
]
|
|
29
|
+
},
|
|
30
|
+
shade: {
|
|
31
|
+
control: "select",
|
|
32
|
+
options: [
|
|
33
|
+
"dark",
|
|
34
|
+
"light"
|
|
35
|
+
]
|
|
29
36
|
}
|
|
30
37
|
}
|
|
31
38
|
};
|
|
@@ -98,10 +105,21 @@ const TripleExtraLarge = {
|
|
|
98
105
|
size: "3xl"
|
|
99
106
|
}
|
|
100
107
|
};
|
|
108
|
+
const Dark = {
|
|
109
|
+
args: {
|
|
110
|
+
shade: "dark"
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const Light = {
|
|
114
|
+
args: {
|
|
115
|
+
shade: "light"
|
|
116
|
+
}
|
|
117
|
+
};
|
|
101
118
|
const Documentation = {
|
|
102
119
|
args: {
|
|
103
120
|
type: "area",
|
|
104
|
-
size: "lg"
|
|
121
|
+
size: "lg",
|
|
122
|
+
shade: "dark"
|
|
105
123
|
},
|
|
106
124
|
argTypes: {
|
|
107
125
|
type: {
|
|
@@ -125,10 +143,18 @@ const Documentation = {
|
|
|
125
143
|
"xxl",
|
|
126
144
|
"3xl"
|
|
127
145
|
]
|
|
146
|
+
},
|
|
147
|
+
shade: {
|
|
148
|
+
control: "select",
|
|
149
|
+
description: "The shade of the skeleton",
|
|
150
|
+
options: [
|
|
151
|
+
"dark",
|
|
152
|
+
"light"
|
|
153
|
+
]
|
|
128
154
|
}
|
|
129
155
|
}
|
|
130
156
|
};
|
|
131
157
|
export default Skeleton_stories;
|
|
132
|
-
export { Area, Default, Documentation, DoubleExtraLarge, ExtraLarge, ExtraSmall, Large, Medium, MultipleAreas, Small, Text, Thumbnail, TripleExtraLarge };
|
|
158
|
+
export { Area, Dark, Default, Documentation, DoubleExtraLarge, ExtraLarge, ExtraSmall, Large, Light, Medium, MultipleAreas, Small, Text, Thumbnail, TripleExtraLarge };
|
|
133
159
|
|
|
134
160
|
//# sourceMappingURL=Skeleton.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton/Skeleton.stories.js","sources":["../../src/Skeleton/Skeleton.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Skeleton } from \"./Skeleton.js\";\n\nconst meta: Meta<typeof Skeleton> = {\n title: \"Components/Skeleton\",\n component: Skeleton,\n parameters: {\n layout: \"padded\"\n },\n argTypes: {\n type: {\n control: \"select\",\n options: [\"text\", \"thumbnail\", \"area\"]\n },\n size: {\n control: \"select\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\", \"3xl\"]\n }\n }\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof Skeleton>;\n\nexport const Default: Story = {};\n\nexport const Text: Story = {\n args: {\n type: \"text\"\n }\n};\n\nexport const Thumbnail: Story = {\n args: {\n type: \"thumbnail\"\n }\n};\n\nexport const Area: Story = {\n args: {\n type: \"area\",\n className: \"w-1/2 h-32\"\n }\n};\n\nexport const MultipleAreas: Story = {\n render: () => (\n <div className=\"flex gap-md\">\n <div className=\"flex flex-col gap-md\">\n <Skeleton type=\"area\" className={\"w-32 h-32\"} />\n <Skeleton type=\"area\" className={\"w-32 h-32\"} />\n </div>\n <div>\n <Skeleton type=\"area\" className=\"w-32 h-full\" />\n </div>\n </div>\n )\n};\n\nexport const ExtraSmall: Story = {\n args: {\n size: \"xs\"\n }\n};\n\nexport const Small: Story = {\n args: {\n size: \"sm\"\n }\n};\n\nexport const Medium: Story = {\n args: {\n size: \"md\"\n }\n};\n\nexport const Large: Story = {\n args: {\n size: \"lg\"\n }\n};\n\nexport const ExtraLarge: Story = {\n args: {\n size: \"xl\"\n }\n};\n\nexport const DoubleExtraLarge: Story = {\n args: {\n size: \"xxl\"\n }\n};\n\nexport const TripleExtraLarge: Story = {\n args: {\n size: \"3xl\"\n }\n};\n\nexport const Documentation: Story = {\n args: {\n type: \"area\",\n size: \"lg\"\n },\n argTypes: {\n type: {\n control: \"select\",\n description: \"The type of skeleton to display\",\n options: [\"text\", \"thumbnail\", \"area\"]\n },\n size: {\n control: \"select\",\n description: \"The size of the skeleton\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\", \"3xl\"]\n }\n }\n};\n"],"names":["meta","Skeleton","Default","Text","Thumbnail","Area","MultipleAreas","ExtraSmall","Small","Medium","Large","ExtraLarge","DoubleExtraLarge","TripleExtraLarge","Documentation"],"mappings":";;AAIA,MAAMA,OAA8B;IAChC,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,UAAU;QACN,MAAM;YACF,SAAS;YACT,SAAS;gBAAC;gBAAQ;gBAAa;aAAO;QAC1C;QACA,MAAM;YACF,SAAS;YACT,SAAS;gBAAC;gBAAM;gBAAM;gBAAM;gBAAM;gBAAM;gBAAO;aAAM;QACzD;IACJ;AACJ;AAEA,yBAAeD;AAIR,MAAME,UAAiB,CAAC;AAExB,MAAMC,OAAc;IACvB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,YAAmB;IAC5B,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,OAAc;IACvB,MAAM;QACF,MAAM;QACN,WAAW;IACf;AACJ;AAEO,MAAMC,gBAAuB;IAChC,QAAQ,kBACJ,oBAAC;YAAI,WAAU;yBACX,oBAAC;YAAI,WAAU;yBACX,oBAACL,UAAQA;YAAC,MAAK;YAAO,WAAW;0BACjC,oBAACA,UAAQA;YAAC,MAAK;YAAO,WAAW;2BAErC,oBAAC,2BACG,oBAACA,UAAQA;YAAC,MAAK;YAAO,WAAU;;AAIhD;AAEO,MAAMM,aAAoB;IAC7B,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,QAAe;IACxB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,SAAgB;IACzB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,QAAe;IACxB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,aAAoB;IAC7B,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,mBAA0B;IACnC,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,mBAA0B;IACnC,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,gBAAuB;IAChC,MAAM;QACF,MAAM;QACN,MAAM;
|
|
1
|
+
{"version":3,"file":"Skeleton/Skeleton.stories.js","sources":["../../src/Skeleton/Skeleton.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Skeleton } from \"./Skeleton.js\";\n\nconst meta: Meta<typeof Skeleton> = {\n title: \"Components/Skeleton\",\n component: Skeleton,\n parameters: {\n layout: \"padded\"\n },\n argTypes: {\n type: {\n control: \"select\",\n options: [\"text\", \"thumbnail\", \"area\"]\n },\n size: {\n control: \"select\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\", \"3xl\"]\n },\n shade: {\n control: \"select\",\n options: [\"dark\", \"light\"]\n }\n }\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof Skeleton>;\n\nexport const Default: Story = {};\n\nexport const Text: Story = {\n args: {\n type: \"text\"\n }\n};\n\nexport const Thumbnail: Story = {\n args: {\n type: \"thumbnail\"\n }\n};\n\nexport const Area: Story = {\n args: {\n type: \"area\",\n className: \"w-1/2 h-32\"\n }\n};\n\nexport const MultipleAreas: Story = {\n render: () => (\n <div className=\"flex gap-md\">\n <div className=\"flex flex-col gap-md\">\n <Skeleton type=\"area\" className={\"w-32 h-32\"} />\n <Skeleton type=\"area\" className={\"w-32 h-32\"} />\n </div>\n <div>\n <Skeleton type=\"area\" className=\"w-32 h-full\" />\n </div>\n </div>\n )\n};\n\nexport const ExtraSmall: Story = {\n args: {\n size: \"xs\"\n }\n};\n\nexport const Small: Story = {\n args: {\n size: \"sm\"\n }\n};\n\nexport const Medium: Story = {\n args: {\n size: \"md\"\n }\n};\n\nexport const Large: Story = {\n args: {\n size: \"lg\"\n }\n};\n\nexport const ExtraLarge: Story = {\n args: {\n size: \"xl\"\n }\n};\n\nexport const DoubleExtraLarge: Story = {\n args: {\n size: \"xxl\"\n }\n};\n\nexport const TripleExtraLarge: Story = {\n args: {\n size: \"3xl\"\n }\n};\n\nexport const Dark: Story = {\n args: {\n shade: \"dark\"\n }\n};\n\nexport const Light: Story = {\n args: {\n shade: \"light\"\n }\n};\n\nexport const Documentation: Story = {\n args: {\n type: \"area\",\n size: \"lg\",\n shade: \"dark\"\n },\n argTypes: {\n type: {\n control: \"select\",\n description: \"The type of skeleton to display\",\n options: [\"text\", \"thumbnail\", \"area\"]\n },\n size: {\n control: \"select\",\n description: \"The size of the skeleton\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\", \"3xl\"]\n },\n shade: {\n control: \"select\",\n description: \"The shade of the skeleton\",\n options: [\"dark\", \"light\"]\n }\n }\n};\n"],"names":["meta","Skeleton","Default","Text","Thumbnail","Area","MultipleAreas","ExtraSmall","Small","Medium","Large","ExtraLarge","DoubleExtraLarge","TripleExtraLarge","Dark","Light","Documentation"],"mappings":";;AAIA,MAAMA,OAA8B;IAChC,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,UAAU;QACN,MAAM;YACF,SAAS;YACT,SAAS;gBAAC;gBAAQ;gBAAa;aAAO;QAC1C;QACA,MAAM;YACF,SAAS;YACT,SAAS;gBAAC;gBAAM;gBAAM;gBAAM;gBAAM;gBAAM;gBAAO;aAAM;QACzD;QACA,OAAO;YACH,SAAS;YACT,SAAS;gBAAC;gBAAQ;aAAQ;QAC9B;IACJ;AACJ;AAEA,yBAAeD;AAIR,MAAME,UAAiB,CAAC;AAExB,MAAMC,OAAc;IACvB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,YAAmB;IAC5B,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,OAAc;IACvB,MAAM;QACF,MAAM;QACN,WAAW;IACf;AACJ;AAEO,MAAMC,gBAAuB;IAChC,QAAQ,kBACJ,oBAAC;YAAI,WAAU;yBACX,oBAAC;YAAI,WAAU;yBACX,oBAACL,UAAQA;YAAC,MAAK;YAAO,WAAW;0BACjC,oBAACA,UAAQA;YAAC,MAAK;YAAO,WAAW;2BAErC,oBAAC,2BACG,oBAACA,UAAQA;YAAC,MAAK;YAAO,WAAU;;AAIhD;AAEO,MAAMM,aAAoB;IAC7B,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,QAAe;IACxB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,SAAgB;IACzB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,QAAe;IACxB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,aAAoB;IAC7B,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,mBAA0B;IACnC,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,mBAA0B;IACnC,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,OAAc;IACvB,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,QAAe;IACxB,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,gBAAuB;IAChC,MAAM;QACF,MAAM;QACN,MAAM;QACN,OAAO;IACX;IACA,UAAU;QACN,MAAM;YACF,SAAS;YACT,aAAa;YACb,SAAS;gBAAC;gBAAQ;gBAAa;aAAO;QAC1C;QACA,MAAM;YACF,SAAS;YACT,aAAa;YACb,SAAS;gBAAC;gBAAM;gBAAM;gBAAM;gBAAM;gBAAM;gBAAO;aAAM;QACzD;QACA,OAAO;YACH,SAAS;YACT,aAAa;YACb,SAAS;gBAAC;gBAAQ;aAAQ;QAC9B;IACJ;AACJ"}
|
package/Slider/Slider.d.ts
CHANGED
|
@@ -7,21 +7,22 @@ import type { FormComponentProps } from "../FormComponent/index.js";
|
|
|
7
7
|
type SliderProps = FormComponentProps & SliderPrimitiveProps & {
|
|
8
8
|
labelPosition?: "top" | "side";
|
|
9
9
|
};
|
|
10
|
-
declare const
|
|
11
|
-
|
|
10
|
+
declare const DecoratableSlider: ({ description, note, hint, validation, labelPosition, ...props }: SliderProps) => React.JSX.Element;
|
|
11
|
+
declare const Slider: typeof DecoratableSlider & {
|
|
12
|
+
original: typeof DecoratableSlider;
|
|
12
13
|
originalName: string;
|
|
13
14
|
displayName: string;
|
|
14
15
|
} & {
|
|
15
|
-
original:
|
|
16
|
-
original:
|
|
16
|
+
original: typeof DecoratableSlider & {
|
|
17
|
+
original: typeof DecoratableSlider;
|
|
17
18
|
originalName: string;
|
|
18
19
|
displayName: string;
|
|
19
20
|
};
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
} & {
|
|
23
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
24
|
-
original:
|
|
24
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableSlider & {
|
|
25
|
+
original: typeof DecoratableSlider;
|
|
25
26
|
originalName: string;
|
|
26
27
|
displayName: string;
|
|
27
28
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -3,21 +3,22 @@ import type { ProgressItemParams } from "./domains/index.js";
|
|
|
3
3
|
interface SteppedProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
items: ProgressItemParams[];
|
|
5
5
|
}
|
|
6
|
-
declare const
|
|
7
|
-
|
|
6
|
+
declare const DecoratableSteppedProgress: ({ items, ...props }: SteppedProgressProps) => React.JSX.Element;
|
|
7
|
+
declare const SteppedProgress: typeof DecoratableSteppedProgress & {
|
|
8
|
+
original: typeof DecoratableSteppedProgress;
|
|
8
9
|
originalName: string;
|
|
9
10
|
displayName: string;
|
|
10
11
|
} & {
|
|
11
|
-
original:
|
|
12
|
-
original:
|
|
12
|
+
original: typeof DecoratableSteppedProgress & {
|
|
13
|
+
original: typeof DecoratableSteppedProgress;
|
|
13
14
|
originalName: string;
|
|
14
15
|
displayName: string;
|
|
15
16
|
};
|
|
16
17
|
originalName: string;
|
|
17
18
|
displayName: string;
|
|
18
19
|
} & {
|
|
19
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
20
|
-
original:
|
|
20
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableSteppedProgress & {
|
|
21
|
+
original: typeof DecoratableSteppedProgress;
|
|
21
22
|
originalName: string;
|
|
22
23
|
displayName: string;
|
|
23
24
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type ProgressItemFormatted } from "./domains/index.js";
|
|
3
3
|
type SteppedProgressItemProps = React.HTMLAttributes<HTMLDivElement> & ProgressItemFormatted;
|
|
4
|
-
declare const
|
|
5
|
-
|
|
4
|
+
declare const DecoratableSteppedProgressItem: ({ label, state, errored, disabled, className, ...props }: SteppedProgressItemProps) => React.JSX.Element;
|
|
5
|
+
declare const SteppedProgressItem: typeof DecoratableSteppedProgressItem & {
|
|
6
|
+
original: typeof DecoratableSteppedProgressItem;
|
|
6
7
|
originalName: string;
|
|
7
8
|
displayName: string;
|
|
8
9
|
} & {
|
|
9
|
-
original:
|
|
10
|
-
original:
|
|
10
|
+
original: typeof DecoratableSteppedProgressItem & {
|
|
11
|
+
original: typeof DecoratableSteppedProgressItem;
|
|
11
12
|
originalName: string;
|
|
12
13
|
displayName: string;
|
|
13
14
|
};
|
|
14
15
|
originalName: string;
|
|
15
16
|
displayName: string;
|
|
16
17
|
} & {
|
|
17
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
18
|
-
original:
|
|
18
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableSteppedProgressItem & {
|
|
19
|
+
original: typeof DecoratableSteppedProgressItem;
|
|
19
20
|
originalName: string;
|
|
20
21
|
displayName: string;
|
|
21
22
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Switch/Switch.d.ts
CHANGED
|
@@ -2,21 +2,22 @@ import React from "react";
|
|
|
2
2
|
import type { SwitchPrimitiveProps } from "./primitives/index.js";
|
|
3
3
|
import type { FormComponentProps } from "../FormComponent/index.js";
|
|
4
4
|
type SwitchProps = SwitchPrimitiveProps & FormComponentProps;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const DecoratableSwitch: ({ note, validation, ...props }: SwitchProps) => React.JSX.Element;
|
|
6
|
+
declare const Switch: typeof DecoratableSwitch & {
|
|
7
|
+
original: typeof DecoratableSwitch;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof DecoratableSwitch & {
|
|
12
|
+
original: typeof DecoratableSwitch;
|
|
12
13
|
originalName: string;
|
|
13
14
|
displayName: string;
|
|
14
15
|
};
|
|
15
16
|
originalName: string;
|
|
16
17
|
displayName: string;
|
|
17
18
|
} & {
|
|
18
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
19
|
-
original:
|
|
19
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableSwitch & {
|
|
20
|
+
original: typeof DecoratableSwitch;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -14,21 +14,25 @@ type SwitchPrimitiveProps = Omit<SwitchPrimitives.SwitchProps, "defaultChecked"
|
|
|
14
14
|
type SwitchPrimitivVm = {
|
|
15
15
|
item?: SwitchItemFormatted;
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Switch
|
|
19
|
+
*/
|
|
20
|
+
declare const DecoratableSwitchPrimitive: (props: SwitchPrimitiveProps) => React.JSX.Element | null;
|
|
21
|
+
declare const SwitchPrimitive: typeof DecoratableSwitchPrimitive & {
|
|
22
|
+
original: typeof DecoratableSwitchPrimitive;
|
|
19
23
|
originalName: string;
|
|
20
24
|
displayName: string;
|
|
21
25
|
} & {
|
|
22
|
-
original:
|
|
23
|
-
original:
|
|
26
|
+
original: typeof DecoratableSwitchPrimitive & {
|
|
27
|
+
original: typeof DecoratableSwitchPrimitive;
|
|
24
28
|
originalName: string;
|
|
25
29
|
displayName: string;
|
|
26
30
|
};
|
|
27
31
|
originalName: string;
|
|
28
32
|
displayName: string;
|
|
29
33
|
} & {
|
|
30
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
31
|
-
original:
|
|
34
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableSwitchPrimitive & {
|
|
35
|
+
original: typeof DecoratableSwitchPrimitive;
|
|
32
36
|
originalName: string;
|
|
33
37
|
displayName: string;
|
|
34
38
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Table/Table.d.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "../utils.js";
|
|
3
|
+
import { Body, Caption, Cell, Direction, Footer, Head, Header, Resizer, Row } from "../Table/components/index.js";
|
|
3
4
|
declare const tableVariants: (props?: ({
|
|
4
5
|
bordered?: boolean | null | undefined;
|
|
5
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
7
|
interface TableProps extends React.HTMLAttributes<HTMLTableElement>, VariantProps<typeof tableVariants> {
|
|
7
8
|
sticky?: boolean;
|
|
8
9
|
}
|
|
9
|
-
declare const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
declare const BaseTable: ({ className, bordered, sticky, ...props }: TableProps) => React.JSX.Element;
|
|
11
|
+
declare const Table: typeof BaseTable & {
|
|
12
|
+
Body: typeof Body;
|
|
13
|
+
Caption: typeof Caption;
|
|
14
|
+
Cell: typeof Cell;
|
|
15
|
+
Direction: typeof Direction;
|
|
16
|
+
Footer: typeof Footer;
|
|
17
|
+
Head: typeof Head;
|
|
18
|
+
Header: typeof Header;
|
|
19
|
+
Resizer: typeof Resizer;
|
|
20
|
+
Row: typeof Row;
|
|
19
21
|
};
|
|
20
22
|
export { Table, type TableProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type VariantProps } from "../../utils.js";
|
|
3
3
|
declare const directionVariants: (props?: ({
|
|
4
|
-
direction?: "
|
|
4
|
+
direction?: "asc" | "desc" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
interface DirectionProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof directionVariants> {
|
|
7
7
|
}
|
package/Tabs/Tabs.d.ts
CHANGED
|
@@ -7,22 +7,24 @@ interface TabsProps extends Omit<TabsPrimitive.TabsProps, "children"> {
|
|
|
7
7
|
size?: VariantProps<typeof tabListVariants>["size"];
|
|
8
8
|
spacing?: VariantProps<typeof tabListVariants>["spacing"];
|
|
9
9
|
separator?: VariantProps<typeof tabListVariants>["separator"];
|
|
10
|
+
loading?: boolean;
|
|
10
11
|
}
|
|
11
|
-
declare const
|
|
12
|
-
|
|
12
|
+
declare const DecoratableTabs: ({ defaultValue: initialValue, size, spacing, separator, loading, tabs: tabComponents, ...props }: TabsProps) => React.JSX.Element;
|
|
13
|
+
declare const Tabs: typeof DecoratableTabs & {
|
|
14
|
+
original: typeof DecoratableTabs;
|
|
13
15
|
originalName: string;
|
|
14
16
|
displayName: string;
|
|
15
17
|
} & {
|
|
16
|
-
original:
|
|
17
|
-
original:
|
|
18
|
+
original: typeof DecoratableTabs & {
|
|
19
|
+
original: typeof DecoratableTabs;
|
|
18
20
|
originalName: string;
|
|
19
21
|
displayName: string;
|
|
20
22
|
};
|
|
21
23
|
originalName: string;
|
|
22
24
|
displayName: string;
|
|
23
25
|
} & {
|
|
24
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
25
|
-
original:
|
|
26
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableTabs & {
|
|
27
|
+
original: typeof DecoratableTabs;
|
|
26
28
|
originalName: string;
|
|
27
29
|
displayName: string;
|
|
28
30
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Tabs/Tabs.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Tabs } from "radix-ui";
|
|
|
3
3
|
import { makeDecoratable, withStaticProps } from "../utils.js";
|
|
4
4
|
import { Content, List, Tab, TabsContext, Trigger } from "./components/index.js";
|
|
5
5
|
const Root = Tabs.Root;
|
|
6
|
-
const DecoratableTabs = ({ defaultValue: initialValue, size, spacing, separator, tabs: tabComponents, ...props })=>{
|
|
6
|
+
const DecoratableTabs = ({ defaultValue: initialValue, size, spacing, separator, loading, tabs: tabComponents, ...props })=>{
|
|
7
7
|
const [tabs, setTabs] = useState([]);
|
|
8
8
|
const defaultValue = useMemo(()=>initialValue || tabComponents.find((tab)=>!tab.props.disabled && false !== tab.props.visible)?.props.value, [
|
|
9
9
|
initialValue,
|
|
@@ -19,6 +19,7 @@ const DecoratableTabs = ({ defaultValue: initialValue, size, spacing, separator,
|
|
|
19
19
|
disabled: tab.disabled,
|
|
20
20
|
icon: tab.icon,
|
|
21
21
|
key: tab.id,
|
|
22
|
+
loading: loading,
|
|
22
23
|
size: size,
|
|
23
24
|
text: tab.trigger,
|
|
24
25
|
value: tab.value,
|
|
@@ -26,7 +27,9 @@ const DecoratableTabs = ({ defaultValue: initialValue, size, spacing, separator,
|
|
|
26
27
|
}))), [
|
|
27
28
|
tabs,
|
|
28
29
|
size,
|
|
29
|
-
spacing
|
|
30
|
+
spacing,
|
|
31
|
+
separator,
|
|
32
|
+
loading
|
|
30
33
|
]);
|
|
31
34
|
const contents = useMemo(()=>tabs.map((tab)=>/*#__PURE__*/ react.createElement(Content, {
|
|
32
35
|
key: tab.id,
|
package/Tabs/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs/Tabs.js","sources":["../../src/Tabs/Tabs.tsx"],"sourcesContent":["import React, { useMemo, useState } from \"react\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport { makeDecoratable, type VariantProps, withStaticProps } from \"~/utils.js\";\nimport type { ITabsContext, TabItem, TabProps, tabListVariants } from \"./components/index.js\";\nimport { Content, List, Tab, TabsContext, Trigger } from \"./components/index.js\";\n\nconst Root = TabsPrimitive.Root;\n\ninterface TabsProps extends Omit<TabsPrimitive.TabsProps, \"children\"> {\n tabs: React.ReactElement<TabProps>[];\n size?: VariantProps<typeof tabListVariants>[\"size\"];\n spacing?: VariantProps<typeof tabListVariants>[\"spacing\"];\n separator?: VariantProps<typeof tabListVariants>[\"separator\"];\n}\n\nconst DecoratableTabs = ({\n defaultValue: initialValue,\n size,\n spacing,\n separator,\n tabs: tabComponents,\n ...props\n}: TabsProps) => {\n const [tabs, setTabs] = useState<TabItem[]>([]);\n\n const defaultValue = useMemo(() => {\n return (\n initialValue ||\n tabComponents.find(tab => !tab.props.disabled && tab.props.visible !== false)?.props\n .value\n );\n }, [initialValue, tabComponents]);\n\n const triggers = useMemo(\n () => (\n <List\n key={tabs.map(tab => tab.id).join(\";\")}\n size={size}\n spacing={spacing}\n separator={separator}\n >\n {tabs.map(tab => (\n <Trigger\n data-testid={tab[\"data-testid\"]}\n disabled={tab.disabled}\n icon={tab.icon}\n key={tab.id}\n size={size}\n text={tab.trigger}\n value={tab.value}\n visible={tab.visible}\n />\n ))}\n </List>\n ),\n [tabs, size, spacing]\n );\n\n const contents = useMemo(\n () =>\n tabs.map(tab => (\n <Content\n key={tab.id}\n value={tab.value}\n content={tab.content}\n spacing={tab.spacing ?? spacing}\n className={tab.className}\n />\n )),\n [tabs, spacing]\n );\n\n const context: ITabsContext = useMemo(\n () => ({\n addTab(props) {\n setTabs(tabs => {\n const existingIndex = tabs.findIndex(tab => tab.value === props.value);\n if (existingIndex > -1) {\n return [\n ...tabs.slice(0, existingIndex),\n props,\n ...tabs.slice(existingIndex + 1)\n ];\n }\n return [...tabs, props];\n });\n },\n removeTab(id) {\n setTabs(tabs => tabs.filter(tab => tab.id !== id));\n }\n }),\n [setTabs]\n );\n\n return (\n <Root {...props} defaultValue={defaultValue}>\n {triggers}\n {contents}\n <TabsContext.Provider value={context}>{tabComponents}</TabsContext.Provider>\n </Root>\n );\n};\n\nconst BaseTabs = makeDecoratable(\"Tabs\", DecoratableTabs);\n\nconst Tabs = withStaticProps(BaseTabs, {\n Tab\n});\n\nexport { Tabs, type TabsProps };\n"],"names":["Root","TabsPrimitive","DecoratableTabs","initialValue","size","spacing","separator","tabComponents","props","tabs","setTabs","useState","defaultValue","useMemo","tab","triggers","List","Trigger","contents","Content","context","existingIndex","id","TabsContext","BaseTabs","makeDecoratable","Tabs","withStaticProps","Tab"],"mappings":";;;;AAMA,MAAMA,OAAOC,KAAAA,IAAkB;
|
|
1
|
+
{"version":3,"file":"Tabs/Tabs.js","sources":["../../src/Tabs/Tabs.tsx"],"sourcesContent":["import React, { useMemo, useState } from \"react\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport { makeDecoratable, type VariantProps, withStaticProps } from \"~/utils.js\";\nimport type { ITabsContext, TabItem, TabProps, tabListVariants } from \"./components/index.js\";\nimport { Content, List, Tab, TabsContext, Trigger } from \"./components/index.js\";\n\nconst Root = TabsPrimitive.Root;\n\ninterface TabsProps extends Omit<TabsPrimitive.TabsProps, \"children\"> {\n tabs: React.ReactElement<TabProps>[];\n size?: VariantProps<typeof tabListVariants>[\"size\"];\n spacing?: VariantProps<typeof tabListVariants>[\"spacing\"];\n separator?: VariantProps<typeof tabListVariants>[\"separator\"];\n loading?: boolean;\n}\n\nconst DecoratableTabs = ({\n defaultValue: initialValue,\n size,\n spacing,\n separator,\n loading,\n tabs: tabComponents,\n ...props\n}: TabsProps) => {\n const [tabs, setTabs] = useState<TabItem[]>([]);\n\n const defaultValue = useMemo(() => {\n return (\n initialValue ||\n tabComponents.find(tab => !tab.props.disabled && tab.props.visible !== false)?.props\n .value\n );\n }, [initialValue, tabComponents]);\n\n const triggers = useMemo(\n () => (\n <List\n key={tabs.map(tab => tab.id).join(\";\")}\n size={size}\n spacing={spacing}\n separator={separator}\n >\n {tabs.map(tab => (\n <Trigger\n data-testid={tab[\"data-testid\"]}\n disabled={tab.disabled}\n icon={tab.icon}\n key={tab.id}\n loading={loading}\n size={size}\n text={tab.trigger}\n value={tab.value}\n visible={tab.visible}\n />\n ))}\n </List>\n ),\n [tabs, size, spacing, separator, loading]\n );\n\n const contents = useMemo(\n () =>\n tabs.map(tab => (\n <Content\n key={tab.id}\n value={tab.value}\n content={tab.content}\n spacing={tab.spacing ?? spacing}\n className={tab.className}\n />\n )),\n [tabs, spacing]\n );\n\n const context: ITabsContext = useMemo(\n () => ({\n addTab(props) {\n setTabs(tabs => {\n const existingIndex = tabs.findIndex(tab => tab.value === props.value);\n if (existingIndex > -1) {\n return [\n ...tabs.slice(0, existingIndex),\n props,\n ...tabs.slice(existingIndex + 1)\n ];\n }\n return [...tabs, props];\n });\n },\n removeTab(id) {\n setTabs(tabs => tabs.filter(tab => tab.id !== id));\n }\n }),\n [setTabs]\n );\n\n return (\n <Root {...props} defaultValue={defaultValue}>\n {triggers}\n {contents}\n <TabsContext.Provider value={context}>{tabComponents}</TabsContext.Provider>\n </Root>\n );\n};\n\nconst BaseTabs = makeDecoratable(\"Tabs\", DecoratableTabs);\n\nconst Tabs = withStaticProps(BaseTabs, {\n Tab\n});\n\nexport { Tabs, type TabsProps };\n"],"names":["Root","TabsPrimitive","DecoratableTabs","initialValue","size","spacing","separator","loading","tabComponents","props","tabs","setTabs","useState","defaultValue","useMemo","tab","triggers","List","Trigger","contents","Content","context","existingIndex","id","TabsContext","BaseTabs","makeDecoratable","Tabs","withStaticProps","Tab"],"mappings":";;;;AAMA,MAAMA,OAAOC,KAAAA,IAAkB;AAU/B,MAAMC,kBAAkB,CAAC,EACrB,cAAcC,YAAY,EAC1BC,IAAI,EACJC,OAAO,EACPC,SAAS,EACTC,OAAO,EACP,MAAMC,aAAa,EACnB,GAAGC,OACK;IACR,MAAM,CAACC,MAAMC,QAAQ,GAAGC,SAAoB,EAAE;IAE9C,MAAMC,eAAeC,QAAQ,IAErBX,gBACAK,cAAc,IAAI,CAACO,CAAAA,MAAO,CAACA,IAAI,KAAK,CAAC,QAAQ,IAAIA,AAAsB,UAAtBA,IAAI,KAAK,CAAC,OAAO,GAAa,MAC1E,OAEV;QAACZ;QAAcK;KAAc;IAEhC,MAAMQ,WAAWF,QACb,kBACI,oBAACG,MAAIA;YACD,KAAKP,KAAK,GAAG,CAACK,CAAAA,MAAOA,IAAI,EAAE,EAAE,IAAI,CAAC;YAClC,MAAMX;YACN,SAASC;YACT,WAAWC;WAEVI,KAAK,GAAG,CAACK,CAAAA,MAAAA,WAAAA,GACN,oBAACG,SAAOA;gBACJ,eAAaH,GAAG,CAAC,cAAc;gBAC/B,UAAUA,IAAI,QAAQ;gBACtB,MAAMA,IAAI,IAAI;gBACd,KAAKA,IAAI,EAAE;gBACX,SAASR;gBACT,MAAMH;gBACN,MAAMW,IAAI,OAAO;gBACjB,OAAOA,IAAI,KAAK;gBAChB,SAASA,IAAI,OAAO;kBAKpC;QAACL;QAAMN;QAAMC;QAASC;QAAWC;KAAQ;IAG7C,MAAMY,WAAWL,QACb,IACIJ,KAAK,GAAG,CAACK,CAAAA,MAAAA,WAAAA,GACL,oBAACK,SAAOA;gBACJ,KAAKL,IAAI,EAAE;gBACX,OAAOA,IAAI,KAAK;gBAChB,SAASA,IAAI,OAAO;gBACpB,SAASA,IAAI,OAAO,IAAIV;gBACxB,WAAWU,IAAI,SAAS;iBAGpC;QAACL;QAAML;KAAQ;IAGnB,MAAMgB,UAAwBP,QAC1B,IAAO;YACH,QAAOL,KAAK;gBACRE,QAAQD,CAAAA;oBACJ,MAAMY,gBAAgBZ,KAAK,SAAS,CAACK,CAAAA,MAAOA,IAAI,KAAK,KAAKN,MAAM,KAAK;oBACrE,IAAIa,gBAAgB,IAChB,OAAO;2BACAZ,KAAK,KAAK,CAAC,GAAGY;wBACjBb;2BACGC,KAAK,KAAK,CAACY,gBAAgB;qBACjC;oBAEL,OAAO;2BAAIZ;wBAAMD;qBAAM;gBAC3B;YACJ;YACA,WAAUc,EAAE;gBACRZ,QAAQD,CAAAA,OAAQA,KAAK,MAAM,CAACK,CAAAA,MAAOA,IAAI,EAAE,KAAKQ;YAClD;QACJ,IACA;QAACZ;KAAQ;IAGb,OAAO,WAAP,GACI,oBAACX,MAAIA;QAAE,GAAGS,KAAK;QAAE,cAAcI;OAC1BG,UACAG,UAAAA,WAAAA,GACD,oBAACK,YAAY,QAAQ;QAAC,OAAOH;OAAUb;AAGnD;AAEA,MAAMiB,WAAWC,gBAAgB,QAAQxB;AAEzC,MAAMyB,YAAOC,gBAAgBH,UAAU;IACnCI,KAAGA;AACP"}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
3
3
|
import { type VariantProps } from "../../utils.js";
|
|
4
4
|
declare const tabContentVariants: (props?: ({
|
|
5
|
-
spacing?: "
|
|
5
|
+
spacing?: "lg" | "md" | "sm" | "xl" | "xs" | "xxl" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
type ContentProps = Omit<TabsPrimitive.TabsContentProps, "children" | "content"> & VariantProps<typeof tabContentVariants> & {
|
|
8
8
|
content: React.ReactNode;
|
|
@@ -2,8 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
3
3
|
import { type VariantProps } from "../../utils.js";
|
|
4
4
|
declare const tabListVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
6
|
-
spacing?: "
|
|
5
|
+
size?: "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
6
|
+
spacing?: "lg" | "md" | "sm" | "xl" | "xs" | "xxl" | null | undefined;
|
|
7
7
|
separator?: boolean | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
type ListProps = TabsPrimitive.TabsListProps & VariantProps<typeof tabListVariants>;
|
package/Tabs/components/Tab.d.ts
CHANGED
|
@@ -14,21 +14,22 @@ interface TabProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"
|
|
|
14
14
|
interface TabItem extends TabProps {
|
|
15
15
|
id: string;
|
|
16
16
|
}
|
|
17
|
-
declare const
|
|
18
|
-
|
|
17
|
+
declare const DecoratableTab: (props: TabProps) => null;
|
|
18
|
+
declare const Tab: typeof DecoratableTab & {
|
|
19
|
+
original: typeof DecoratableTab;
|
|
19
20
|
originalName: string;
|
|
20
21
|
displayName: string;
|
|
21
22
|
} & {
|
|
22
|
-
original:
|
|
23
|
-
original:
|
|
23
|
+
original: typeof DecoratableTab & {
|
|
24
|
+
original: typeof DecoratableTab;
|
|
24
25
|
originalName: string;
|
|
25
26
|
displayName: string;
|
|
26
27
|
};
|
|
27
28
|
originalName: string;
|
|
28
29
|
displayName: string;
|
|
29
30
|
} & {
|
|
30
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
31
|
-
original:
|
|
31
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableTab & {
|
|
32
|
+
original: typeof DecoratableTab;
|
|
32
33
|
originalName: string;
|
|
33
34
|
displayName: string;
|
|
34
35
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -2,13 +2,14 @@ import * as React from "react";
|
|
|
2
2
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
3
3
|
import { type VariantProps } from "../../utils.js";
|
|
4
4
|
declare const tabTriggerVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
6
6
|
visible?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
type TriggerProps = Omit<TabsPrimitive.TabsTriggerProps, "children"> & VariantProps<typeof tabTriggerVariants> & {
|
|
9
9
|
text: React.ReactNode;
|
|
10
10
|
icon?: React.ReactElement;
|
|
11
|
+
loading?: boolean;
|
|
11
12
|
"data-testid"?: string;
|
|
12
13
|
};
|
|
13
|
-
declare const Trigger: ({ className, size, icon, text, visible, ...props }: TriggerProps) => React.JSX.Element;
|
|
14
|
+
declare const Trigger: ({ className, size, icon, text, visible, loading, ...props }: TriggerProps) => React.JSX.Element;
|
|
14
15
|
export { Trigger, type TriggerProps };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Tabs } from "radix-ui";
|
|
2
2
|
import { cn, cva } from "../../utils.js";
|
|
3
3
|
import { Icon } from "../../Icon/index.js";
|
|
4
|
+
import { Skeleton } from "../../Skeleton/index.js";
|
|
4
5
|
import * as __rspack_external_react from "react";
|
|
5
6
|
const tabTriggerVariants = cva([
|
|
6
7
|
"group inline-flex items-center justify-center whitespace-nowrap outline-none transition-all",
|
|
@@ -41,7 +42,7 @@ const innerTabTriggerVariants = cva([
|
|
|
41
42
|
size: "sm"
|
|
42
43
|
}
|
|
43
44
|
});
|
|
44
|
-
const Trigger = ({ className, size, icon, text, visible, ...props })=>/*#__PURE__*/ __rspack_external_react.createElement(Tabs.Trigger, {
|
|
45
|
+
const Trigger = ({ className, size, icon, text, visible, loading, ...props })=>/*#__PURE__*/ __rspack_external_react.createElement(Tabs.Trigger, {
|
|
45
46
|
className: cn(tabTriggerVariants({
|
|
46
47
|
size,
|
|
47
48
|
visible
|
|
@@ -51,12 +52,16 @@ const Trigger = ({ className, size, icon, text, visible, ...props })=>/*#__PURE_
|
|
|
51
52
|
className: cn(innerTabTriggerVariants({
|
|
52
53
|
size
|
|
53
54
|
}))
|
|
54
|
-
},
|
|
55
|
+
}, loading ? /*#__PURE__*/ __rspack_external_react.createElement(Skeleton, {
|
|
56
|
+
type: "text",
|
|
57
|
+
size: "md",
|
|
58
|
+
className: "w-[64px]"
|
|
59
|
+
}) : /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external_react.Fragment, null, icon && /*#__PURE__*/ __rspack_external_react.createElement(Icon, {
|
|
55
60
|
icon: icon,
|
|
56
61
|
size: "sm",
|
|
57
62
|
label: String(text),
|
|
58
63
|
color: "neutral-light"
|
|
59
|
-
}), text));
|
|
64
|
+
}), text)));
|
|
60
65
|
export { Trigger };
|
|
61
66
|
|
|
62
67
|
//# sourceMappingURL=Trigger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs/components/Trigger.js","sources":["../../../src/Tabs/components/Trigger.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\nimport { Icon } from \"~/Icon/index.js\";\n\nconst tabTriggerVariants = cva(\n [\n \"group inline-flex items-center justify-center whitespace-nowrap outline-none transition-all\",\n \"text-neutral-strong hover:text-neutral-primary\",\n \"border-b-md border-transparent border-solid\",\n \"data-[state=active]:border-accent-default data-[state=active]:text-neutral-primary\",\n \"disabled:pointer-events-none disabled:text-neutral-disabled! disabled:fill-neutral-disabled! disabled:border-transparent!\"\n ],\n {\n variants: {\n size: {\n sm: \"text-sm h-[40px]\",\n md: \"text-md h-xxl\",\n lg: \"text-lg h-[56px]\",\n xl: \"text-xl h-3xl\"\n },\n visible: {\n false: \"hidden\"\n }\n },\n defaultVariants: {\n size: \"sm\"\n }\n }\n);\n\nconst innerTabTriggerVariants = cva(\n [\n \"inline-flex items-center justify-start gap-xs\",\n \"group-hover:bg-neutral-dimmed\",\n \"group-focus-visible:ring-lg group-focus-visible:ring-primary-dimmed\"\n ],\n {\n variants: {\n size: {\n sm: \"rounded-sm p-xs\",\n md: \"rounded-sm px-xs py-xs-plus\",\n lg: \"rounded-sm px-xs-plus py-sm-plus\",\n xl: \"rounded-lg px-sm py-sm-plus\"\n }\n },\n defaultVariants: {\n size: \"sm\"\n }\n }\n);\n\ntype TriggerProps = Omit<TabsPrimitive.TabsTriggerProps, \"children\"> &\n VariantProps<typeof tabTriggerVariants> & {\n text: React.ReactNode;\n icon?: React.ReactElement;\n \"data-testid\"?: string;\n };\n\nconst Trigger = ({ className, size, icon, text, visible, ...props }: TriggerProps) => (\n <TabsPrimitive.Trigger\n className={cn(tabTriggerVariants({ size, visible }), className)}\n {...props}\n >\n <div className={cn(innerTabTriggerVariants({ size }))}>\n {icon && <Icon
|
|
1
|
+
{"version":3,"file":"Tabs/components/Trigger.js","sources":["../../../src/Tabs/components/Trigger.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\nimport { Icon } from \"~/Icon/index.js\";\nimport { Skeleton } from \"~/Skeleton/index.js\";\n\nconst tabTriggerVariants = cva(\n [\n \"group inline-flex items-center justify-center whitespace-nowrap outline-none transition-all\",\n \"text-neutral-strong hover:text-neutral-primary\",\n \"border-b-md border-transparent border-solid\",\n \"data-[state=active]:border-accent-default data-[state=active]:text-neutral-primary\",\n \"disabled:pointer-events-none disabled:text-neutral-disabled! disabled:fill-neutral-disabled! disabled:border-transparent!\"\n ],\n {\n variants: {\n size: {\n sm: \"text-sm h-[40px]\",\n md: \"text-md h-xxl\",\n lg: \"text-lg h-[56px]\",\n xl: \"text-xl h-3xl\"\n },\n visible: {\n false: \"hidden\"\n }\n },\n defaultVariants: {\n size: \"sm\"\n }\n }\n);\n\nconst innerTabTriggerVariants = cva(\n [\n \"inline-flex items-center justify-start gap-xs\",\n \"group-hover:bg-neutral-dimmed\",\n \"group-focus-visible:ring-lg group-focus-visible:ring-primary-dimmed\"\n ],\n {\n variants: {\n size: {\n sm: \"rounded-sm p-xs\",\n md: \"rounded-sm px-xs py-xs-plus\",\n lg: \"rounded-sm px-xs-plus py-sm-plus\",\n xl: \"rounded-lg px-sm py-sm-plus\"\n }\n },\n defaultVariants: {\n size: \"sm\"\n }\n }\n);\n\ntype TriggerProps = Omit<TabsPrimitive.TabsTriggerProps, \"children\"> &\n VariantProps<typeof tabTriggerVariants> & {\n text: React.ReactNode;\n icon?: React.ReactElement;\n loading?: boolean;\n \"data-testid\"?: string;\n };\n\nconst Trigger = ({ className, size, icon, text, visible, loading, ...props }: TriggerProps) => (\n <TabsPrimitive.Trigger\n className={cn(tabTriggerVariants({ size, visible }), className)}\n {...props}\n >\n <div className={cn(innerTabTriggerVariants({ size }))}>\n {loading ? (\n <Skeleton type={\"text\"} size={\"md\"} className={\"w-[64px]\"} />\n ) : (\n <>\n {icon && (\n <Icon\n icon={icon}\n size={\"sm\"}\n label={String(text)}\n color={\"neutral-light\"}\n />\n )}\n {text}\n </>\n )}\n </div>\n </TabsPrimitive.Trigger>\n);\n\nexport { Trigger, type TriggerProps };\n"],"names":["tabTriggerVariants","cva","innerTabTriggerVariants","Trigger","className","size","icon","text","visible","loading","props","TabsPrimitive","cn","Skeleton","Icon","String"],"mappings":";;;;;AAMA,MAAMA,qBAAqBC,IACvB;IACI;IACA;IACA;IACA;IACA;CACH,EACD;IACI,UAAU;QACN,MAAM;YACF,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;QACR;QACA,SAAS;YACL,OAAO;QACX;IACJ;IACA,iBAAiB;QACb,MAAM;IACV;AACJ;AAGJ,MAAMC,0BAA0BD,IAC5B;IACI;IACA;IACA;CACH,EACD;IACI,UAAU;QACN,MAAM;YACF,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;QACR;IACJ;IACA,iBAAiB;QACb,MAAM;IACV;AACJ;AAWJ,MAAME,UAAU,CAAC,EAAEC,SAAS,EAAEC,IAAI,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAE,GAAGC,OAAqB,iBACtF,sCAACC,KAAAA,OAAqB;QAClB,WAAWC,GAAGZ,mBAAmB;YAAEK;YAAMG;QAAQ,IAAIJ;QACpD,GAAGM,KAAK;qBAET,sCAAC;QAAI,WAAWE,GAAGV,wBAAwB;YAAEG;QAAK;OAC7CI,UAAU,WAAVA,GACG,sCAACI,UAAQA;QAAC,MAAM;QAAQ,MAAM;QAAM,WAAW;uBAE/C,8EACKP,QAAQ,WAARA,GACG,sCAACQ,MAAIA;QACD,MAAMR;QACN,MAAM;QACN,OAAOS,OAAOR;QACd,OAAO;QAGdA"}
|