@moduix/solid-tailwind 1.0.0 → 1.1.1
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/dist/components/accordion/Accordion.js +19 -13
- package/dist/components/accordion/Accordion.jsx +7 -7
- package/dist/components/alert/Alert.js +19 -13
- package/dist/components/alert/Alert.jsx +7 -7
- package/dist/components/angle-slider/AngleSlider.d.ts +2 -6
- package/dist/components/angle-slider/AngleSlider.js +21 -16
- package/dist/components/angle-slider/AngleSlider.jsx +10 -11
- package/dist/components/avatar/Avatar.js +10 -7
- package/dist/components/avatar/Avatar.jsx +6 -6
- package/dist/components/bleed/Bleed.js +1 -1
- package/dist/components/bleed/Bleed.jsx +1 -1
- package/dist/components/button/Button.js +1 -6
- package/dist/components/button/Button.jsx +2 -4
- package/dist/components/card/Card.js +54 -44
- package/dist/components/card/Card.jsx +12 -12
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/Carousel.js +32 -23
- package/dist/components/carousel/Carousel.jsx +12 -13
- package/dist/components/checkbox/Checkbox.js +16 -14
- package/dist/components/checkbox/Checkbox.jsx +6 -6
- package/dist/components/clipboard/Clipboard.js +28 -17
- package/dist/components/clipboard/Clipboard.jsx +12 -11
- package/dist/components/collapsible/Collapsible.js +16 -11
- package/dist/components/collapsible/Collapsible.jsx +6 -6
- package/dist/components/color-picker/ColorPicker.js +69 -48
- package/dist/components/color-picker/ColorPicker.jsx +28 -28
- package/dist/components/combobox/Combobox.js +44 -31
- package/dist/components/combobox/Combobox.jsx +18 -18
- package/dist/components/command-palette/CommandPalette.js +72 -53
- package/dist/components/command-palette/CommandPalette.jsx +29 -32
- package/dist/components/container/Container.js +5 -5
- package/dist/components/container/Container.jsx +5 -5
- package/dist/components/date-input/DateInput.js +18 -12
- package/dist/components/date-input/DateInput.jsx +7 -7
- package/dist/components/date-picker/DatePicker.js +73 -51
- package/dist/components/date-picker/DatePicker.jsx +29 -29
- package/dist/components/dialog/Dialog.js +30 -20
- package/dist/components/dialog/Dialog.jsx +10 -10
- package/dist/components/drawer/Drawer.js +45 -30
- package/dist/components/drawer/Drawer.jsx +15 -15
- package/dist/components/editable/Editable.js +24 -17
- package/dist/components/editable/Editable.jsx +10 -10
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/empty/Empty.jsx +1 -1
- package/dist/components/file-upload/FileUpload.js +39 -28
- package/dist/components/file-upload/FileUpload.jsx +17 -17
- package/dist/components/floating-panel/FloatingPanel.js +35 -23
- package/dist/components/floating-panel/FloatingPanel.jsx +12 -12
- package/dist/components/hover-card/HoverCard.js +16 -11
- package/dist/components/hover-card/HoverCard.jsx +6 -6
- package/dist/components/image-cropper/ImageCropper.js +21 -14
- package/dist/components/image-cropper/ImageCropper.jsx +7 -7
- package/dist/components/input-group/InputGroup.js +3 -2
- package/dist/components/input-group/InputGroup.jsx +3 -2
- package/dist/components/json-tree-view/JsonTreeView.js +1 -1
- package/dist/components/json-tree-view/JsonTreeView.jsx +1 -1
- package/dist/components/lightbox/Lightbox.d.ts +1 -0
- package/dist/components/lightbox/Lightbox.js +41 -27
- package/dist/components/lightbox/Lightbox.jsx +13 -12
- package/dist/components/listbox/Listbox.js +48 -32
- package/dist/components/listbox/Listbox.jsx +17 -17
- package/dist/components/marquee/Marquee.js +18 -12
- package/dist/components/marquee/Marquee.jsx +9 -9
- package/dist/components/menu/Menu.js +66 -44
- package/dist/components/menu/Menu.jsx +28 -28
- package/dist/components/navigation-menu/NavigationMenu.js +36 -24
- package/dist/components/navigation-menu/NavigationMenu.jsx +12 -12
- package/dist/components/number-input/NumberInput.js +19 -14
- package/dist/components/number-input/NumberInput.jsx +9 -9
- package/dist/components/pagination/Pagination.js +10 -9
- package/dist/components/pagination/Pagination.jsx +8 -8
- package/dist/components/password-input/PasswordInput.js +16 -11
- package/dist/components/password-input/PasswordInput.jsx +6 -6
- package/dist/components/pin-input/PinInput.js +15 -10
- package/dist/components/pin-input/PinInput.jsx +6 -6
- package/dist/components/popover/Popover.js +37 -25
- package/dist/components/popover/Popover.jsx +13 -13
- package/dist/components/progress-circular/ProgressCircular.js +18 -13
- package/dist/components/progress-circular/ProgressCircular.jsx +8 -8
- package/dist/components/progress-linear/ProgressLinear.js +17 -12
- package/dist/components/progress-linear/ProgressLinear.jsx +7 -7
- package/dist/components/qr-code/QrCode.js +8 -7
- package/dist/components/qr-code/QrCode.jsx +6 -6
- package/dist/components/rating-group/RatingGroup.js +15 -10
- package/dist/components/rating-group/RatingGroup.jsx +6 -6
- package/dist/components/segment-group/SegmentGroup.js +17 -12
- package/dist/components/segment-group/SegmentGroup.jsx +7 -7
- package/dist/components/select/Select.js +50 -35
- package/dist/components/select/Select.jsx +20 -20
- package/dist/components/sidebar/Sidebar.js +72 -43
- package/dist/components/sidebar/Sidebar.jsx +34 -27
- package/dist/components/signature-pad/SignaturePad.js +16 -12
- package/dist/components/signature-pad/SignaturePad.jsx +8 -8
- package/dist/components/slider/Slider.js +29 -20
- package/dist/components/slider/Slider.jsx +11 -11
- package/dist/components/split-button/SplitButton.d.ts +4 -3
- package/dist/components/split-button/SplitButton.js +20 -9
- package/dist/components/split-button/SplitButton.jsx +13 -7
- package/dist/components/splitter/Splitter.js +13 -9
- package/dist/components/splitter/Splitter.jsx +5 -5
- package/dist/components/steps/Steps.js +34 -23
- package/dist/components/steps/Steps.jsx +12 -12
- package/dist/components/swap/Swap.js +9 -6
- package/dist/components/swap/Swap.jsx +3 -3
- package/dist/components/switch/Switch.js +9 -7
- package/dist/components/switch/Switch.jsx +5 -5
- package/dist/components/tabs/Tabs.js +18 -12
- package/dist/components/tabs/Tabs.jsx +6 -6
- package/dist/components/tags-input/TagsInput.js +28 -20
- package/dist/components/tags-input/TagsInput.jsx +12 -12
- package/dist/components/timer/Timer.js +21 -14
- package/dist/components/timer/Timer.jsx +7 -7
- package/dist/components/toast/Toast.js +11 -9
- package/dist/components/toast/Toast.jsx +7 -7
- package/dist/components/toc/Toc.js +31 -20
- package/dist/components/toc/Toc.jsx +10 -10
- package/dist/components/tooltip/Tooltip.js +13 -9
- package/dist/components/tooltip/Tooltip.jsx +5 -5
- package/dist/components/tour/Tour.js +38 -26
- package/dist/components/tour/Tour.jsx +13 -13
- package/dist/components/tree-view/TreeView.js +39 -28
- package/dist/components/tree-view/TreeView.jsx +17 -17
- package/dist/styles/animations.css +8 -8
- package/package.json +10 -11
|
@@ -3,7 +3,7 @@ import { ark } from "@ark-ui/solid/factory";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { splitProps } from "solid-js";
|
|
5
5
|
import { cn } from "../../internal/cn.js";
|
|
6
|
-
const bleedVariants = cva('
|
|
6
|
+
const bleedVariants = cva('', {
|
|
7
7
|
variants: {
|
|
8
8
|
inline: {
|
|
9
9
|
none: null,
|
|
@@ -2,7 +2,7 @@ import { ark } from "@ark-ui/solid/factory";
|
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
import { cn } from "../../internal/cn.jsx";
|
|
5
|
-
const bleedVariants = cva('
|
|
5
|
+
const bleedVariants = cva('', {
|
|
6
6
|
variants: {
|
|
7
7
|
inline: {
|
|
8
8
|
none: null,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { createComponent, memo, mergeProps } from "solid-js/web";
|
|
2
|
-
import { useFocusVisible } from "@ark-ui/solid";
|
|
3
2
|
import { ark } from "@ark-ui/solid/factory";
|
|
4
3
|
import { cva } from "class-variance-authority";
|
|
5
4
|
import { splitProps } from "solid-js";
|
|
6
5
|
import { cn } from "../../internal/cn.js";
|
|
7
|
-
const buttonVariants = cva("inline-flex cursor-pointer items-center justify-center gap-2 rounded-md border text-sm font-medium no-underline outline-0 appearance-none transition-[background-color,border-color,color,opacity,transform] duration-200 ease-in-out select-none whitespace-nowrap data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 data-loading:cursor-progress motion-reduce:transition-none motion-safe:[&:not([data-variant='link']):active]:translate-y-px
|
|
6
|
+
const buttonVariants = cva("inline-flex cursor-pointer items-center justify-center gap-2 rounded-md border text-sm font-medium no-underline outline-0 appearance-none transition-[background-color,border-color,color,opacity,transform] duration-200 ease-in-out select-none whitespace-nowrap data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 data-loading:cursor-progress motion-reduce:transition-none motion-safe:[&:not([data-variant='link']):active]:translate-y-px focus-visible:-outline-offset-1 focus-visible:outline-2 focus-visible:outline-ring [&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0", {
|
|
8
7
|
variants: {
|
|
9
8
|
variant: {
|
|
10
9
|
default: 'border-primary bg-primary text-primary-foreground hover:bg-[color-mix(in_srgb,var(--color-primary)_88%,black)]',
|
|
@@ -39,7 +38,6 @@ const buttonVariants = cva("inline-flex cursor-pointer items-center justify-cent
|
|
|
39
38
|
});
|
|
40
39
|
const ArkButton = ark.button;
|
|
41
40
|
function ButtonRoot(props) {
|
|
42
|
-
const focusVisible = useFocusVisible();
|
|
43
41
|
const [local, others] = splitProps(props, [
|
|
44
42
|
'asChild',
|
|
45
43
|
'class',
|
|
@@ -104,9 +102,6 @@ function ButtonRoot(props) {
|
|
|
104
102
|
get ["data-disabled"] () {
|
|
105
103
|
return isDisabled() ? '' : void 0;
|
|
106
104
|
},
|
|
107
|
-
get ["data-focus-visible"] () {
|
|
108
|
-
return focusVisible() ? '' : void 0;
|
|
109
|
-
},
|
|
110
105
|
get ["data-loading"] () {
|
|
111
106
|
return local.loading ? '' : void 0;
|
|
112
107
|
},
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { useFocusVisible } from "@ark-ui/solid";
|
|
2
1
|
import { ark } from "@ark-ui/solid/factory";
|
|
3
2
|
import { cva } from "class-variance-authority";
|
|
4
3
|
import { splitProps } from "solid-js";
|
|
5
4
|
import { cn } from "../../internal/cn.jsx";
|
|
6
|
-
const buttonVariants = cva("inline-flex cursor-pointer items-center justify-center gap-2 rounded-md border text-sm font-medium no-underline outline-0 appearance-none transition-[background-color,border-color,color,opacity,transform] duration-200 ease-in-out select-none whitespace-nowrap data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 data-loading:cursor-progress motion-reduce:transition-none motion-safe:[&:not([data-variant='link']):active]:translate-y-px
|
|
5
|
+
const buttonVariants = cva("inline-flex cursor-pointer items-center justify-center gap-2 rounded-md border text-sm font-medium no-underline outline-0 appearance-none transition-[background-color,border-color,color,opacity,transform] duration-200 ease-in-out select-none whitespace-nowrap data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 data-loading:cursor-progress motion-reduce:transition-none motion-safe:[&:not([data-variant='link']):active]:translate-y-px focus-visible:-outline-offset-1 focus-visible:outline-2 focus-visible:outline-ring [&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0", {
|
|
7
6
|
variants: {
|
|
8
7
|
variant: {
|
|
9
8
|
default: 'border-primary bg-primary text-primary-foreground hover:bg-[color-mix(in_srgb,var(--color-primary)_88%,black)]',
|
|
@@ -38,7 +37,6 @@ const buttonVariants = cva("inline-flex cursor-pointer items-center justify-cent
|
|
|
38
37
|
});
|
|
39
38
|
const ArkButton = ark.button;
|
|
40
39
|
function ButtonRoot(props) {
|
|
41
|
-
const focusVisible = useFocusVisible();
|
|
42
40
|
const [local, others] = splitProps(props, [
|
|
43
41
|
'asChild',
|
|
44
42
|
'class',
|
|
@@ -64,7 +62,7 @@ function ButtonRoot(props) {
|
|
|
64
62
|
}
|
|
65
63
|
local.onClickCapture?.(event);
|
|
66
64
|
};
|
|
67
|
-
return <ArkButton asChild={local.asChild} {...others} type={local.asChild ? local.type : local.type ?? 'button'} disabled={local.asChild ? void 0 : isDisabled()} aria-busy={local.loading ? true : local['aria-busy']} aria-disabled={isDisabled() ? true : local['aria-disabled']} oncapture:click={handleClickCapture} onClick={local.onClick} data-scope={local['data-scope'] ?? 'button'} data-part={local['data-part'] ?? 'root'} data-slot={local['data-slot'] ?? 'button-root'} data-variant={local.variant ?? 'default'} data-size={local.size ?? 'md'} data-disabled={isDisabled() ? '' : void 0} data-
|
|
65
|
+
return <ArkButton asChild={local.asChild} {...others} type={local.asChild ? local.type : local.type ?? 'button'} disabled={local.asChild ? void 0 : isDisabled()} aria-busy={local.loading ? true : local['aria-busy']} aria-disabled={isDisabled() ? true : local['aria-disabled']} oncapture:click={handleClickCapture} onClick={local.onClick} data-scope={local['data-scope'] ?? 'button'} data-part={local['data-part'] ?? 'root'} data-slot={local['data-slot'] ?? 'button-root'} data-variant={local.variant ?? 'default'} data-size={local.size ?? 'md'} data-disabled={isDisabled() ? '' : void 0} data-loading={local.loading ? '' : void 0} class={cn(buttonVariants({
|
|
68
66
|
variant: local.variant,
|
|
69
67
|
size: local.size
|
|
70
68
|
}), local.class)}/>;
|
|
@@ -3,7 +3,7 @@ import { ark } from "@ark-ui/solid/factory";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { splitProps } from "solid-js";
|
|
5
5
|
import { cn } from "../../internal/cn.js";
|
|
6
|
-
const cardRootVariants = cva('group/card relative flex w-full min-w-0 flex-col rounded-lg text-card-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring has-[>[data-slot=card-background]]:isolate [&:has(>[data-slot=card-background])>*:not([data-slot=card-background])]:z-1 [&:has([data-slot=card-link])_:is(a,button,input,select,textarea,[role=button],[role=checkbox],[role=menuitem],[role=switch],[tabindex]:not([tabindex=-1])):not([data-slot=card-link])]:relative [&:has([data-slot=card-link])_:is(a,button,input,select,textarea,[role=button],[role=checkbox],[role=menuitem],[role=switch],[tabindex]:not([tabindex=-1])):not([data-slot=card-link])]:z-1', {
|
|
6
|
+
const cardRootVariants = cva('group/card relative flex w-full min-w-0 flex-col rounded-lg text-card-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring has-[>[data-slot=card-background]]:isolate [&:has(>[data-slot=card-background])>*:not([data-slot=card-background])]:z-1 [&:has([data-slot=card-link])_:is(a,button,input,select,textarea,summary,audio[controls],video[controls],iframe,[contenteditable=true],[role=button],[role=checkbox],[role=menuitem],[role=switch],[tabindex]:not([tabindex=-1])):not([data-slot=card-link])]:relative [&:has([data-slot=card-link])_:is(a,button,input,select,textarea,summary,audio[controls],video[controls],iframe,[contenteditable=true],[role=button],[role=checkbox],[role=menuitem],[role=switch],[tabindex]:not([tabindex=-1])):not([data-slot=card-link])]:z-1', {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
9
|
elevated: 'border-0 bg-card shadow-md',
|
|
@@ -26,21 +26,22 @@ function CardRoot(props) {
|
|
|
26
26
|
get asChild () {
|
|
27
27
|
return local.asChild;
|
|
28
28
|
},
|
|
29
|
+
get ["class"] () {
|
|
30
|
+
return cn(cardRootVariants({
|
|
31
|
+
variant: local.variant
|
|
32
|
+
}), local.class);
|
|
33
|
+
}
|
|
34
|
+
}, others, {
|
|
29
35
|
"data-scope": "card",
|
|
30
36
|
"data-part": "root",
|
|
31
|
-
"data-slot": "card-root",
|
|
32
37
|
get ["data-size"] () {
|
|
33
38
|
return local.size ?? 'md';
|
|
34
39
|
},
|
|
35
40
|
get ["data-variant"] () {
|
|
36
41
|
return local.variant ?? 'outline';
|
|
37
42
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
variant: local.variant
|
|
41
|
-
}), local.class);
|
|
42
|
-
}
|
|
43
|
-
}, others));
|
|
43
|
+
"data-slot": "card-root"
|
|
44
|
+
}));
|
|
44
45
|
}
|
|
45
46
|
function CardHeader(props) {
|
|
46
47
|
const [local, others] = splitProps(props, [
|
|
@@ -51,13 +52,14 @@ function CardHeader(props) {
|
|
|
51
52
|
get asChild () {
|
|
52
53
|
return local.asChild;
|
|
53
54
|
},
|
|
54
|
-
"data-scope": "card",
|
|
55
|
-
"data-part": "header",
|
|
56
|
-
"data-slot": "card-header",
|
|
57
55
|
get ["class"] () {
|
|
58
56
|
return cn('grid min-w-0 grid-cols-[minmax(0,1fr)_auto] gap-x-2 gap-y-1 px-6 pt-6 group-data-[size=lg]/card:px-8 group-data-[size=lg]/card:pt-8 group-data-[size=sm]/card:px-4 group-data-[size=sm]/card:pt-4', local.class);
|
|
59
57
|
}
|
|
60
|
-
}, others
|
|
58
|
+
}, others, {
|
|
59
|
+
"data-scope": "card",
|
|
60
|
+
"data-part": "header",
|
|
61
|
+
"data-slot": "card-header"
|
|
62
|
+
}));
|
|
61
63
|
}
|
|
62
64
|
function CardBody(props) {
|
|
63
65
|
const [local, others] = splitProps(props, [
|
|
@@ -68,13 +70,14 @@ function CardBody(props) {
|
|
|
68
70
|
get asChild () {
|
|
69
71
|
return local.asChild;
|
|
70
72
|
},
|
|
71
|
-
"data-scope": "card",
|
|
72
|
-
"data-part": "body",
|
|
73
|
-
"data-slot": "card-body",
|
|
74
73
|
get ["class"] () {
|
|
75
74
|
return cn('min-w-0 px-6 pt-4 pb-6 text-sm wrap-anywhere text-muted-foreground group-data-[size=lg]/card:px-8 group-data-[size=lg]/card:pb-8 group-data-[size=sm]/card:px-4 group-data-[size=sm]/card:pb-4 first:pt-6 group-data-[size=lg]/card:first:pt-8 group-data-[size=sm]/card:first:pt-4', local.class);
|
|
76
75
|
}
|
|
77
|
-
}, others
|
|
76
|
+
}, others, {
|
|
77
|
+
"data-scope": "card",
|
|
78
|
+
"data-part": "body",
|
|
79
|
+
"data-slot": "card-body"
|
|
80
|
+
}));
|
|
78
81
|
}
|
|
79
82
|
function CardMedia(props) {
|
|
80
83
|
const [local, others] = splitProps(props, [
|
|
@@ -85,13 +88,14 @@ function CardMedia(props) {
|
|
|
85
88
|
get asChild () {
|
|
86
89
|
return local.asChild;
|
|
87
90
|
},
|
|
88
|
-
"data-scope": "card",
|
|
89
|
-
"data-part": "media",
|
|
90
|
-
"data-slot": "card-media",
|
|
91
91
|
get ["class"] () {
|
|
92
92
|
return cn('min-w-0 overflow-hidden rounded-ss-[inherit] rounded-se-[inherit] [&>:is(img,picture,video,canvas,svg,iframe)]:w-full [&>picture]:block [&>picture>img]:w-full', local.class);
|
|
93
93
|
}
|
|
94
|
-
}, others
|
|
94
|
+
}, others, {
|
|
95
|
+
"data-scope": "card",
|
|
96
|
+
"data-part": "media",
|
|
97
|
+
"data-slot": "card-media"
|
|
98
|
+
}));
|
|
95
99
|
}
|
|
96
100
|
function CardBackground(props) {
|
|
97
101
|
const [local, others] = splitProps(props, [
|
|
@@ -102,13 +106,14 @@ function CardBackground(props) {
|
|
|
102
106
|
get asChild () {
|
|
103
107
|
return local.asChild;
|
|
104
108
|
},
|
|
105
|
-
"data-scope": "card",
|
|
106
|
-
"data-part": "background",
|
|
107
|
-
"data-slot": "card-background",
|
|
108
109
|
get ["class"] () {
|
|
109
110
|
return cn('absolute inset-0 z-0 overflow-hidden rounded-[inherit] [&>:is(img,picture,video,canvas,svg,iframe)]:size-full [&>:is(img,picture,video,canvas,svg,iframe)]:object-cover [&>picture]:block [&>picture>img]:size-full [&>picture>img]:object-cover', local.class);
|
|
110
111
|
}
|
|
111
|
-
}, others
|
|
112
|
+
}, others, {
|
|
113
|
+
"data-scope": "card",
|
|
114
|
+
"data-part": "background",
|
|
115
|
+
"data-slot": "card-background"
|
|
116
|
+
}));
|
|
112
117
|
}
|
|
113
118
|
function CardFooter(props) {
|
|
114
119
|
const [local, others] = splitProps(props, [
|
|
@@ -119,13 +124,14 @@ function CardFooter(props) {
|
|
|
119
124
|
get asChild () {
|
|
120
125
|
return local.asChild;
|
|
121
126
|
},
|
|
122
|
-
"data-scope": "card",
|
|
123
|
-
"data-part": "footer",
|
|
124
|
-
"data-slot": "card-footer",
|
|
125
127
|
get ["class"] () {
|
|
126
128
|
return cn('flex min-w-0 flex-wrap items-center gap-2 px-6 pb-6 group-data-[size=lg]/card:px-8 group-data-[size=lg]/card:pb-8 group-data-[size=sm]/card:px-4 group-data-[size=sm]/card:pb-4', local.class);
|
|
127
129
|
}
|
|
128
|
-
}, others
|
|
130
|
+
}, others, {
|
|
131
|
+
"data-scope": "card",
|
|
132
|
+
"data-part": "footer",
|
|
133
|
+
"data-slot": "card-footer"
|
|
134
|
+
}));
|
|
129
135
|
}
|
|
130
136
|
function CardTitle(props) {
|
|
131
137
|
const [local, others] = splitProps(props, [
|
|
@@ -136,13 +142,14 @@ function CardTitle(props) {
|
|
|
136
142
|
get asChild () {
|
|
137
143
|
return local.asChild;
|
|
138
144
|
},
|
|
139
|
-
"data-scope": "card",
|
|
140
|
-
"data-part": "title",
|
|
141
|
-
"data-slot": "card-title",
|
|
142
145
|
get ["class"] () {
|
|
143
146
|
return cn('col-start-1 min-w-0 text-lg font-semibold wrap-anywhere group-data-[size=lg]/card:text-xl group-data-[size=sm]/card:text-md', local.class);
|
|
144
147
|
}
|
|
145
|
-
}, others
|
|
148
|
+
}, others, {
|
|
149
|
+
"data-scope": "card",
|
|
150
|
+
"data-part": "title",
|
|
151
|
+
"data-slot": "card-title"
|
|
152
|
+
}));
|
|
146
153
|
}
|
|
147
154
|
function CardDescription(props) {
|
|
148
155
|
const [local, others] = splitProps(props, [
|
|
@@ -153,13 +160,14 @@ function CardDescription(props) {
|
|
|
153
160
|
get asChild () {
|
|
154
161
|
return local.asChild;
|
|
155
162
|
},
|
|
156
|
-
"data-scope": "card",
|
|
157
|
-
"data-part": "description",
|
|
158
|
-
"data-slot": "card-description",
|
|
159
163
|
get ["class"] () {
|
|
160
164
|
return cn('col-start-1 min-w-0 text-sm wrap-anywhere text-muted-foreground', local.class);
|
|
161
165
|
}
|
|
162
|
-
}, others
|
|
166
|
+
}, others, {
|
|
167
|
+
"data-scope": "card",
|
|
168
|
+
"data-part": "description",
|
|
169
|
+
"data-slot": "card-description"
|
|
170
|
+
}));
|
|
163
171
|
}
|
|
164
172
|
function CardAction(props) {
|
|
165
173
|
const [local, others] = splitProps(props, [
|
|
@@ -170,13 +178,14 @@ function CardAction(props) {
|
|
|
170
178
|
get asChild () {
|
|
171
179
|
return local.asChild;
|
|
172
180
|
},
|
|
173
|
-
"data-scope": "card",
|
|
174
|
-
"data-part": "action",
|
|
175
|
-
"data-slot": "card-action",
|
|
176
181
|
get ["class"] () {
|
|
177
182
|
return cn('relative z-1 col-start-2 row-span-2 row-start-1 inline-flex items-start justify-end gap-2 justify-self-end', local.class);
|
|
178
183
|
}
|
|
179
|
-
}, others
|
|
184
|
+
}, others, {
|
|
185
|
+
"data-scope": "card",
|
|
186
|
+
"data-part": "action",
|
|
187
|
+
"data-slot": "card-action"
|
|
188
|
+
}));
|
|
180
189
|
}
|
|
181
190
|
function CardLink(props) {
|
|
182
191
|
const [local, others] = splitProps(props, [
|
|
@@ -187,13 +196,14 @@ function CardLink(props) {
|
|
|
187
196
|
get asChild () {
|
|
188
197
|
return local.asChild;
|
|
189
198
|
},
|
|
190
|
-
"data-scope": "card",
|
|
191
|
-
"data-part": "link",
|
|
192
|
-
"data-slot": "card-link",
|
|
193
199
|
get ["class"] () {
|
|
194
200
|
return cn('static text-inherit no-underline after:absolute after:inset-0 after:z-0 after:rounded-lg focus-visible:outline-0 focus-visible:after:outline-2 focus-visible:after:outline-offset-1 focus-visible:after:outline-ring', local.class);
|
|
195
201
|
}
|
|
196
|
-
}, others
|
|
202
|
+
}, others, {
|
|
203
|
+
"data-scope": "card",
|
|
204
|
+
"data-part": "link",
|
|
205
|
+
"data-slot": "card-link"
|
|
206
|
+
}));
|
|
197
207
|
}
|
|
198
208
|
const Card = Object.assign(CardRoot, {
|
|
199
209
|
Root: CardRoot,
|
|
@@ -2,7 +2,7 @@ import { ark } from "@ark-ui/solid/factory";
|
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
import { cn } from "../../internal/cn.jsx";
|
|
5
|
-
const cardRootVariants = cva('group/card relative flex w-full min-w-0 flex-col rounded-lg text-card-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring has-[>[data-slot=card-background]]:isolate [&:has(>[data-slot=card-background])>*:not([data-slot=card-background])]:z-1 [&:has([data-slot=card-link])_:is(a,button,input,select,textarea,[role=button],[role=checkbox],[role=menuitem],[role=switch],[tabindex]:not([tabindex=-1])):not([data-slot=card-link])]:relative [&:has([data-slot=card-link])_:is(a,button,input,select,textarea,[role=button],[role=checkbox],[role=menuitem],[role=switch],[tabindex]:not([tabindex=-1])):not([data-slot=card-link])]:z-1', {
|
|
5
|
+
const cardRootVariants = cva('group/card relative flex w-full min-w-0 flex-col rounded-lg text-card-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring has-[>[data-slot=card-background]]:isolate [&:has(>[data-slot=card-background])>*:not([data-slot=card-background])]:z-1 [&:has([data-slot=card-link])_:is(a,button,input,select,textarea,summary,audio[controls],video[controls],iframe,[contenteditable=true],[role=button],[role=checkbox],[role=menuitem],[role=switch],[tabindex]:not([tabindex=-1])):not([data-slot=card-link])]:relative [&:has([data-slot=card-link])_:is(a,button,input,select,textarea,summary,audio[controls],video[controls],iframe,[contenteditable=true],[role=button],[role=checkbox],[role=menuitem],[role=switch],[tabindex]:not([tabindex=-1])):not([data-slot=card-link])]:z-1', {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
elevated: 'border-0 bg-card shadow-md',
|
|
@@ -21,72 +21,72 @@ function CardRoot(props) {
|
|
|
21
21
|
'size',
|
|
22
22
|
'variant'
|
|
23
23
|
]);
|
|
24
|
-
return <ark.div asChild={local.asChild}
|
|
24
|
+
return <ark.div asChild={local.asChild} class={cn(cardRootVariants({
|
|
25
25
|
variant: local.variant
|
|
26
|
-
}), local.class)} {...others}/>;
|
|
26
|
+
}), local.class)} {...others} data-scope="card" data-part="root" data-size={local.size ?? 'md'} data-variant={local.variant ?? 'outline'} data-slot="card-root"/>;
|
|
27
27
|
}
|
|
28
28
|
function CardHeader(props) {
|
|
29
29
|
const [local, others] = splitProps(props, [
|
|
30
30
|
'asChild',
|
|
31
31
|
'class'
|
|
32
32
|
]);
|
|
33
|
-
return <ark.div asChild={local.asChild}
|
|
33
|
+
return <ark.div asChild={local.asChild} class={cn('grid min-w-0 grid-cols-[minmax(0,1fr)_auto] gap-x-2 gap-y-1 px-6 pt-6 group-data-[size=lg]/card:px-8 group-data-[size=lg]/card:pt-8 group-data-[size=sm]/card:px-4 group-data-[size=sm]/card:pt-4', local.class)} {...others} data-scope="card" data-part="header" data-slot="card-header"/>;
|
|
34
34
|
}
|
|
35
35
|
function CardBody(props) {
|
|
36
36
|
const [local, others] = splitProps(props, [
|
|
37
37
|
'asChild',
|
|
38
38
|
'class'
|
|
39
39
|
]);
|
|
40
|
-
return <ark.div asChild={local.asChild}
|
|
40
|
+
return <ark.div asChild={local.asChild} class={cn('min-w-0 px-6 pt-4 pb-6 text-sm wrap-anywhere text-muted-foreground group-data-[size=lg]/card:px-8 group-data-[size=lg]/card:pb-8 group-data-[size=sm]/card:px-4 group-data-[size=sm]/card:pb-4 first:pt-6 group-data-[size=lg]/card:first:pt-8 group-data-[size=sm]/card:first:pt-4', local.class)} {...others} data-scope="card" data-part="body" data-slot="card-body"/>;
|
|
41
41
|
}
|
|
42
42
|
function CardMedia(props) {
|
|
43
43
|
const [local, others] = splitProps(props, [
|
|
44
44
|
'asChild',
|
|
45
45
|
'class'
|
|
46
46
|
]);
|
|
47
|
-
return <ark.div asChild={local.asChild}
|
|
47
|
+
return <ark.div asChild={local.asChild} class={cn('min-w-0 overflow-hidden rounded-ss-[inherit] rounded-se-[inherit] [&>:is(img,picture,video,canvas,svg,iframe)]:w-full [&>picture]:block [&>picture>img]:w-full', local.class)} {...others} data-scope="card" data-part="media" data-slot="card-media"/>;
|
|
48
48
|
}
|
|
49
49
|
function CardBackground(props) {
|
|
50
50
|
const [local, others] = splitProps(props, [
|
|
51
51
|
'asChild',
|
|
52
52
|
'class'
|
|
53
53
|
]);
|
|
54
|
-
return <ark.div asChild={local.asChild}
|
|
54
|
+
return <ark.div asChild={local.asChild} class={cn('absolute inset-0 z-0 overflow-hidden rounded-[inherit] [&>:is(img,picture,video,canvas,svg,iframe)]:size-full [&>:is(img,picture,video,canvas,svg,iframe)]:object-cover [&>picture]:block [&>picture>img]:size-full [&>picture>img]:object-cover', local.class)} {...others} data-scope="card" data-part="background" data-slot="card-background"/>;
|
|
55
55
|
}
|
|
56
56
|
function CardFooter(props) {
|
|
57
57
|
const [local, others] = splitProps(props, [
|
|
58
58
|
'asChild',
|
|
59
59
|
'class'
|
|
60
60
|
]);
|
|
61
|
-
return <ark.div asChild={local.asChild}
|
|
61
|
+
return <ark.div asChild={local.asChild} class={cn('flex min-w-0 flex-wrap items-center gap-2 px-6 pb-6 group-data-[size=lg]/card:px-8 group-data-[size=lg]/card:pb-8 group-data-[size=sm]/card:px-4 group-data-[size=sm]/card:pb-4', local.class)} {...others} data-scope="card" data-part="footer" data-slot="card-footer"/>;
|
|
62
62
|
}
|
|
63
63
|
function CardTitle(props) {
|
|
64
64
|
const [local, others] = splitProps(props, [
|
|
65
65
|
'asChild',
|
|
66
66
|
'class'
|
|
67
67
|
]);
|
|
68
|
-
return <ark.h3 asChild={local.asChild}
|
|
68
|
+
return <ark.h3 asChild={local.asChild} class={cn('col-start-1 min-w-0 text-lg font-semibold wrap-anywhere group-data-[size=lg]/card:text-xl group-data-[size=sm]/card:text-md', local.class)} {...others} data-scope="card" data-part="title" data-slot="card-title"/>;
|
|
69
69
|
}
|
|
70
70
|
function CardDescription(props) {
|
|
71
71
|
const [local, others] = splitProps(props, [
|
|
72
72
|
'asChild',
|
|
73
73
|
'class'
|
|
74
74
|
]);
|
|
75
|
-
return <ark.p asChild={local.asChild}
|
|
75
|
+
return <ark.p asChild={local.asChild} class={cn('col-start-1 min-w-0 text-sm wrap-anywhere text-muted-foreground', local.class)} {...others} data-scope="card" data-part="description" data-slot="card-description"/>;
|
|
76
76
|
}
|
|
77
77
|
function CardAction(props) {
|
|
78
78
|
const [local, others] = splitProps(props, [
|
|
79
79
|
'asChild',
|
|
80
80
|
'class'
|
|
81
81
|
]);
|
|
82
|
-
return <ark.div asChild={local.asChild}
|
|
82
|
+
return <ark.div asChild={local.asChild} class={cn('relative z-1 col-start-2 row-span-2 row-start-1 inline-flex items-start justify-end gap-2 justify-self-end', local.class)} {...others} data-scope="card" data-part="action" data-slot="card-action"/>;
|
|
83
83
|
}
|
|
84
84
|
function CardLink(props) {
|
|
85
85
|
const [local, others] = splitProps(props, [
|
|
86
86
|
'asChild',
|
|
87
87
|
'class'
|
|
88
88
|
]);
|
|
89
|
-
return <ark.a asChild={local.asChild}
|
|
89
|
+
return <ark.a asChild={local.asChild} class={cn('static text-inherit no-underline after:absolute after:inset-0 after:z-0 after:rounded-lg focus-visible:outline-0 focus-visible:after:outline-2 focus-visible:after:outline-offset-1 focus-visible:after:outline-ring', local.class)} {...others} data-scope="card" data-part="link" data-slot="card-link"/>;
|
|
90
90
|
}
|
|
91
91
|
const Card = Object.assign(CardRoot, {
|
|
92
92
|
Root: CardRoot,
|
|
@@ -9,7 +9,7 @@ declare function CarouselPrevTrigger(props: ComponentProps<typeof CarouselPrimit
|
|
|
9
9
|
declare function CarouselNextTrigger(props: ComponentProps<typeof CarouselPrimitive.NextTrigger>): import("solid-js").JSX.Element;
|
|
10
10
|
declare function CarouselIndicatorGroup(props: ComponentProps<typeof CarouselPrimitive.IndicatorGroup>): import("solid-js").JSX.Element;
|
|
11
11
|
declare function CarouselIndicator(props: ComponentProps<typeof CarouselPrimitive.Indicator>): import("solid-js").JSX.Element;
|
|
12
|
-
type CarouselIndicatorsProps = ComponentProps<typeof CarouselPrimitive.IndicatorGroup> & {
|
|
12
|
+
type CarouselIndicatorsProps = Omit<ComponentProps<typeof CarouselPrimitive.IndicatorGroup>, 'asChild' | 'children'> & {
|
|
13
13
|
indicatorClassName?: string;
|
|
14
14
|
};
|
|
15
15
|
declare function CarouselIndicators(props: CarouselIndicatorsProps): import("solid-js").JSX.Element;
|
|
@@ -9,55 +9,60 @@ function CarouselRoot(props) {
|
|
|
9
9
|
'class'
|
|
10
10
|
]);
|
|
11
11
|
return createComponent(Carousel.Root, mergeProps({
|
|
12
|
-
"data-slot": "carousel-root",
|
|
13
12
|
get ["class"] () {
|
|
14
13
|
return cn('group/carousel flex w-full min-w-0 flex-col gap-3 data-[orientation=vertical]:h-96 data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch', local.class);
|
|
15
14
|
}
|
|
16
|
-
}, others
|
|
15
|
+
}, others, {
|
|
16
|
+
"data-slot": "carousel-root"
|
|
17
|
+
}));
|
|
17
18
|
}
|
|
18
19
|
function CarouselRootProvider(props) {
|
|
19
20
|
const [local, others] = splitProps(props, [
|
|
20
21
|
'class'
|
|
21
22
|
]);
|
|
22
23
|
return createComponent(Carousel.RootProvider, mergeProps({
|
|
23
|
-
"data-slot": "carousel-root-provider",
|
|
24
24
|
get ["class"] () {
|
|
25
25
|
return cn('group/carousel flex w-full min-w-0 flex-col gap-3 data-[orientation=vertical]:h-96 data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch', local.class);
|
|
26
26
|
}
|
|
27
|
-
}, others
|
|
27
|
+
}, others, {
|
|
28
|
+
"data-slot": "carousel-root-provider"
|
|
29
|
+
}));
|
|
28
30
|
}
|
|
29
31
|
function CarouselControl(props) {
|
|
30
32
|
const [local, others] = splitProps(props, [
|
|
31
33
|
'class'
|
|
32
34
|
]);
|
|
33
35
|
return createComponent(Carousel.Control, mergeProps({
|
|
34
|
-
"data-slot": "carousel-control",
|
|
35
36
|
get ["class"] () {
|
|
36
37
|
return cn('flex min-w-0 items-center gap-3 data-[orientation=vertical]:flex-col data-[orientation=vertical]:justify-between', local.class);
|
|
37
38
|
}
|
|
38
|
-
}, others
|
|
39
|
+
}, others, {
|
|
40
|
+
"data-slot": "carousel-control"
|
|
41
|
+
}));
|
|
39
42
|
}
|
|
40
43
|
function CarouselItemGroup(props) {
|
|
41
44
|
const [local, others] = splitProps(props, [
|
|
42
45
|
'class'
|
|
43
46
|
]);
|
|
44
47
|
return createComponent(Carousel.ItemGroup, mergeProps({
|
|
45
|
-
"data-slot": "carousel-item-group",
|
|
46
48
|
get ["class"] () {
|
|
47
49
|
return cn('flex min-h-0 min-w-0 flex-1 [scrollbar-width:none] overscroll-x-contain overscroll-y-auto scroll-smooth rounded-xl outline-0 focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring data-dragging:cursor-grabbing data-dragging:select-none data-[orientation=vertical]:h-full data-[orientation=vertical]:overscroll-x-auto data-[orientation=vertical]:overscroll-y-contain motion-reduce:scroll-auto [&::-webkit-scrollbar]:hidden', local.class);
|
|
48
50
|
}
|
|
49
|
-
}, others
|
|
51
|
+
}, others, {
|
|
52
|
+
"data-slot": "carousel-item-group"
|
|
53
|
+
}));
|
|
50
54
|
}
|
|
51
55
|
function CarouselItem(props) {
|
|
52
56
|
const [local, others] = splitProps(props, [
|
|
53
57
|
'class'
|
|
54
58
|
]);
|
|
55
59
|
return createComponent(Carousel.Item, mergeProps({
|
|
56
|
-
"data-slot": "carousel-item",
|
|
57
60
|
get ["class"] () {
|
|
58
61
|
return cn('box-border min-h-0 min-w-0', local.class);
|
|
59
62
|
}
|
|
60
|
-
}, others
|
|
63
|
+
}, others, {
|
|
64
|
+
"data-slot": "carousel-item"
|
|
65
|
+
}));
|
|
61
66
|
}
|
|
62
67
|
function CarouselPrevTrigger(props) {
|
|
63
68
|
const [local, others] = splitProps(props, [
|
|
@@ -70,11 +75,11 @@ function CarouselPrevTrigger(props) {
|
|
|
70
75
|
get asChild () {
|
|
71
76
|
return local.asChild;
|
|
72
77
|
},
|
|
73
|
-
"data-slot": "carousel-prev-trigger",
|
|
74
78
|
get ["class"] () {
|
|
75
79
|
return cn('focus-visible:outline-offset-0.5 inline-flex size-control-md shrink-0 cursor-pointer items-center justify-center rounded-full border border-border bg-card text-foreground shadow-sm outline-0 transition-[background-color,border-color,color,box-shadow,transform] duration-150 ease-in-out focus-visible:outline-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-pressed:border-foreground data-pressed:bg-accent data-pressed:text-accent-foreground motion-reduce:transition-none [&_svg]:size-4 [&:not(:disabled):not([data-disabled]):hover]:border-foreground [&:not(:disabled):not([data-disabled]):hover]:bg-accent [&:not(:disabled):not([data-disabled]):hover]:text-accent-foreground [&:not(:disabled):not([data-disabled]):hover]:shadow-md', local.class);
|
|
76
80
|
}
|
|
77
81
|
}, others, {
|
|
82
|
+
"data-slot": "carousel-prev-trigger",
|
|
78
83
|
get children () {
|
|
79
84
|
return resolvedChildren() ?? (()=>{
|
|
80
85
|
var _el$ = _tmpl$();
|
|
@@ -97,11 +102,11 @@ function CarouselNextTrigger(props) {
|
|
|
97
102
|
get asChild () {
|
|
98
103
|
return local.asChild;
|
|
99
104
|
},
|
|
100
|
-
"data-slot": "carousel-next-trigger",
|
|
101
105
|
get ["class"] () {
|
|
102
106
|
return cn('focus-visible:outline-offset-0.5 inline-flex size-control-md shrink-0 cursor-pointer items-center justify-center rounded-full border border-border bg-card text-foreground shadow-sm outline-0 transition-[background-color,border-color,color,box-shadow,transform] duration-150 ease-in-out focus-visible:outline-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-pressed:border-foreground data-pressed:bg-accent data-pressed:text-accent-foreground motion-reduce:transition-none [&_svg]:size-4 [&:not(:disabled):not([data-disabled]):hover]:border-foreground [&:not(:disabled):not([data-disabled]):hover]:bg-accent [&:not(:disabled):not([data-disabled]):hover]:text-accent-foreground [&:not(:disabled):not([data-disabled]):hover]:shadow-md', local.class);
|
|
103
107
|
}
|
|
104
108
|
}, others, {
|
|
109
|
+
"data-slot": "carousel-next-trigger",
|
|
105
110
|
get children () {
|
|
106
111
|
return resolvedChildren() ?? (()=>{
|
|
107
112
|
var _el$2 = _tmpl$();
|
|
@@ -118,27 +123,28 @@ function CarouselIndicatorGroup(props) {
|
|
|
118
123
|
'class'
|
|
119
124
|
]);
|
|
120
125
|
return createComponent(Carousel.IndicatorGroup, mergeProps({
|
|
121
|
-
"data-slot": "carousel-indicator-group",
|
|
122
126
|
get ["class"] () {
|
|
123
127
|
return cn('flex items-center justify-center gap-2 data-[orientation=vertical]:flex-col', local.class);
|
|
124
128
|
}
|
|
125
|
-
}, others
|
|
129
|
+
}, others, {
|
|
130
|
+
"data-slot": "carousel-indicator-group"
|
|
131
|
+
}));
|
|
126
132
|
}
|
|
127
133
|
function CarouselIndicator(props) {
|
|
128
134
|
const [local, others] = splitProps(props, [
|
|
129
135
|
'class'
|
|
130
136
|
]);
|
|
131
137
|
return createComponent(Carousel.Indicator, mergeProps({
|
|
132
|
-
"data-slot": "carousel-indicator",
|
|
133
138
|
get ["class"] () {
|
|
134
139
|
return cn('focus-visible:outline-offset-0.5 size-2 cursor-pointer rounded-full border-0 bg-muted p-0 opacity-90 transition-[width,height,background-color,opacity] duration-150 focus-visible:outline-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 data-current:w-6 data-current:bg-primary data-current:opacity-100 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-not-allowed data-readonly:opacity-50 data-[orientation=vertical]:data-current:h-6 data-[orientation=vertical]:data-current:w-2 motion-reduce:transition-none forced-colors:bg-[ButtonText] forced-colors:data-current:bg-[Highlight] [&:not(:disabled):not([data-disabled]):not([data-readonly]):not([data-current]):hover]:bg-muted-foreground', local.class);
|
|
135
140
|
}
|
|
136
|
-
}, others
|
|
141
|
+
}, others, {
|
|
142
|
+
"data-slot": "carousel-indicator"
|
|
143
|
+
}));
|
|
137
144
|
}
|
|
138
145
|
function CarouselIndicators(props) {
|
|
139
146
|
const [local, others] = splitProps(props, [
|
|
140
147
|
'class',
|
|
141
|
-
'children',
|
|
142
148
|
'indicatorClassName'
|
|
143
149
|
]);
|
|
144
150
|
return createComponent(Carousel.Context, {
|
|
@@ -170,34 +176,37 @@ function CarouselAutoplayTrigger(props) {
|
|
|
170
176
|
'class'
|
|
171
177
|
]);
|
|
172
178
|
return createComponent(Carousel.AutoplayTrigger, mergeProps({
|
|
173
|
-
"data-slot": "carousel-autoplay-trigger",
|
|
174
179
|
get ["class"] () {
|
|
175
180
|
return cn('focus-visible:outline-offset-0.5 inline-flex size-control-md min-w-12 shrink-0 cursor-pointer items-center justify-center rounded-full border border-border bg-card text-foreground shadow-sm outline-0 transition-[background-color,border-color,color,box-shadow,transform] duration-150 ease-in-out focus-visible:outline-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-pressed:border-foreground data-pressed:bg-accent data-pressed:text-accent-foreground motion-reduce:transition-none [&_svg]:size-4 [&:not(:disabled):not([data-disabled]):hover]:border-foreground [&:not(:disabled):not([data-disabled]):hover]:bg-accent [&:not(:disabled):not([data-disabled]):hover]:text-accent-foreground [&:not(:disabled):not([data-disabled]):hover]:shadow-md', local.class);
|
|
176
181
|
}
|
|
177
|
-
}, others
|
|
182
|
+
}, others, {
|
|
183
|
+
"data-slot": "carousel-autoplay-trigger"
|
|
184
|
+
}));
|
|
178
185
|
}
|
|
179
186
|
function CarouselAutoplayIndicator(props) {
|
|
180
187
|
const [local, others] = splitProps(props, [
|
|
181
188
|
'class'
|
|
182
189
|
]);
|
|
183
190
|
return createComponent(Carousel.AutoplayIndicator, mergeProps({
|
|
184
|
-
"data-slot": "carousel-autoplay-indicator",
|
|
185
191
|
get ["class"] () {
|
|
186
192
|
return cn('inline-flex min-w-4 items-center justify-center text-xs font-medium uppercase', local.class);
|
|
187
193
|
}
|
|
188
|
-
}, others
|
|
194
|
+
}, others, {
|
|
195
|
+
"data-slot": "carousel-autoplay-indicator"
|
|
196
|
+
}));
|
|
189
197
|
}
|
|
190
198
|
function CarouselProgressText(props) {
|
|
191
199
|
const [local, others] = splitProps(props, [
|
|
192
200
|
'class'
|
|
193
201
|
]);
|
|
194
202
|
return createComponent(Carousel.ProgressText, mergeProps({
|
|
195
|
-
"data-slot": "carousel-progress-text",
|
|
196
203
|
dir: "ltr",
|
|
197
204
|
get ["class"] () {
|
|
198
205
|
return cn('text-sm text-muted-foreground tabular-nums [unicode-bidi:isolate]', local.class);
|
|
199
206
|
}
|
|
200
|
-
}, others
|
|
207
|
+
}, others, {
|
|
208
|
+
"data-slot": "carousel-progress-text"
|
|
209
|
+
}));
|
|
201
210
|
}
|
|
202
211
|
const Carousel_Carousel = Object.assign(CarouselRoot, {
|
|
203
212
|
Root: CarouselRoot,
|