@moduix/solid-tailwind 1.0.0 → 1.1.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/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 +71 -52
- package/dist/components/command-palette/CommandPalette.jsx +28 -31
- 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 +1 -1
|
@@ -6,31 +6,31 @@ function CarouselRoot(props) {
|
|
|
6
6
|
const [local, others] = splitProps(props, [
|
|
7
7
|
'class'
|
|
8
8
|
]);
|
|
9
|
-
return <Carousel.Root
|
|
9
|
+
return <Carousel.Root class={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)} {...others} data-slot="carousel-root"/>;
|
|
10
10
|
}
|
|
11
11
|
function CarouselRootProvider(props) {
|
|
12
12
|
const [local, others] = splitProps(props, [
|
|
13
13
|
'class'
|
|
14
14
|
]);
|
|
15
|
-
return <Carousel.RootProvider
|
|
15
|
+
return <Carousel.RootProvider class={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)} {...others} data-slot="carousel-root-provider"/>;
|
|
16
16
|
}
|
|
17
17
|
function CarouselControl(props) {
|
|
18
18
|
const [local, others] = splitProps(props, [
|
|
19
19
|
'class'
|
|
20
20
|
]);
|
|
21
|
-
return <Carousel.Control
|
|
21
|
+
return <Carousel.Control class={cn('flex min-w-0 items-center gap-3 data-[orientation=vertical]:flex-col data-[orientation=vertical]:justify-between', local.class)} {...others} data-slot="carousel-control"/>;
|
|
22
22
|
}
|
|
23
23
|
function CarouselItemGroup(props) {
|
|
24
24
|
const [local, others] = splitProps(props, [
|
|
25
25
|
'class'
|
|
26
26
|
]);
|
|
27
|
-
return <Carousel.ItemGroup
|
|
27
|
+
return <Carousel.ItemGroup class={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)} {...others} data-slot="carousel-item-group"/>;
|
|
28
28
|
}
|
|
29
29
|
function CarouselItem(props) {
|
|
30
30
|
const [local, others] = splitProps(props, [
|
|
31
31
|
'class'
|
|
32
32
|
]);
|
|
33
|
-
return <Carousel.Item
|
|
33
|
+
return <Carousel.Item class={cn('box-border min-h-0 min-w-0', local.class)} {...others} data-slot="carousel-item"/>;
|
|
34
34
|
}
|
|
35
35
|
function CarouselPrevTrigger(props) {
|
|
36
36
|
const [local, others] = splitProps(props, [
|
|
@@ -39,7 +39,7 @@ function CarouselPrevTrigger(props) {
|
|
|
39
39
|
'class'
|
|
40
40
|
]);
|
|
41
41
|
const resolvedChildren = children(()=>local.children);
|
|
42
|
-
return <Carousel.PrevTrigger asChild={local.asChild}
|
|
42
|
+
return <Carousel.PrevTrigger asChild={local.asChild} class={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)} {...others} data-slot="carousel-prev-trigger">
|
|
43
43
|
{resolvedChildren() ?? <span class="inline-flex items-center justify-center">
|
|
44
44
|
<ChevronLeftIcon class="group-data-[orientation=vertical]/carousel:rotate-90 group-data-[orientation=horizontal]/carousel:rtl:rotate-180"/>
|
|
45
45
|
</span>}
|
|
@@ -52,7 +52,7 @@ function CarouselNextTrigger(props) {
|
|
|
52
52
|
'class'
|
|
53
53
|
]);
|
|
54
54
|
const resolvedChildren = children(()=>local.children);
|
|
55
|
-
return <Carousel.NextTrigger asChild={local.asChild}
|
|
55
|
+
return <Carousel.NextTrigger asChild={local.asChild} class={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)} {...others} data-slot="carousel-next-trigger">
|
|
56
56
|
{resolvedChildren() ?? <span class="inline-flex items-center justify-center">
|
|
57
57
|
<ChevronRightIcon class="group-data-[orientation=vertical]/carousel:rotate-90 group-data-[orientation=horizontal]/carousel:rtl:rotate-180"/>
|
|
58
58
|
</span>}
|
|
@@ -62,18 +62,17 @@ function CarouselIndicatorGroup(props) {
|
|
|
62
62
|
const [local, others] = splitProps(props, [
|
|
63
63
|
'class'
|
|
64
64
|
]);
|
|
65
|
-
return <Carousel.IndicatorGroup
|
|
65
|
+
return <Carousel.IndicatorGroup class={cn('flex items-center justify-center gap-2 data-[orientation=vertical]:flex-col', local.class)} {...others} data-slot="carousel-indicator-group"/>;
|
|
66
66
|
}
|
|
67
67
|
function CarouselIndicator(props) {
|
|
68
68
|
const [local, others] = splitProps(props, [
|
|
69
69
|
'class'
|
|
70
70
|
]);
|
|
71
|
-
return <Carousel.Indicator
|
|
71
|
+
return <Carousel.Indicator class={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)} {...others} data-slot="carousel-indicator"/>;
|
|
72
72
|
}
|
|
73
73
|
function CarouselIndicators(props) {
|
|
74
74
|
const [local, others] = splitProps(props, [
|
|
75
75
|
'class',
|
|
76
|
-
'children',
|
|
77
76
|
'indicatorClassName'
|
|
78
77
|
]);
|
|
79
78
|
return <Carousel.Context>
|
|
@@ -88,19 +87,19 @@ function CarouselAutoplayTrigger(props) {
|
|
|
88
87
|
const [local, others] = splitProps(props, [
|
|
89
88
|
'class'
|
|
90
89
|
]);
|
|
91
|
-
return <Carousel.AutoplayTrigger
|
|
90
|
+
return <Carousel.AutoplayTrigger class={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)} {...others} data-slot="carousel-autoplay-trigger"/>;
|
|
92
91
|
}
|
|
93
92
|
function CarouselAutoplayIndicator(props) {
|
|
94
93
|
const [local, others] = splitProps(props, [
|
|
95
94
|
'class'
|
|
96
95
|
]);
|
|
97
|
-
return <Carousel.AutoplayIndicator
|
|
96
|
+
return <Carousel.AutoplayIndicator class={cn('inline-flex min-w-4 items-center justify-center text-xs font-medium uppercase', local.class)} {...others} data-slot="carousel-autoplay-indicator"/>;
|
|
98
97
|
}
|
|
99
98
|
function CarouselProgressText(props) {
|
|
100
99
|
const [local, others] = splitProps(props, [
|
|
101
100
|
'class'
|
|
102
101
|
]);
|
|
103
|
-
return <Carousel.ProgressText
|
|
102
|
+
return <Carousel.ProgressText dir="ltr" class={cn('text-sm text-muted-foreground tabular-nums [unicode-bidi:isolate]', local.class)} {...others} data-slot="carousel-progress-text"/>;
|
|
104
103
|
}
|
|
105
104
|
const Carousel_Carousel = Object.assign(CarouselRoot, {
|
|
106
105
|
Root: CarouselRoot,
|
|
@@ -15,14 +15,14 @@ function CheckboxRoot(props) {
|
|
|
15
15
|
get asChild () {
|
|
16
16
|
return local.asChild;
|
|
17
17
|
},
|
|
18
|
-
"data-slot": "checkbox-root",
|
|
19
|
-
get ["data-size"] () {
|
|
20
|
-
return local.size ?? 'md';
|
|
21
|
-
},
|
|
22
18
|
get ["class"] () {
|
|
23
19
|
return cn('group/checkbox inline-flex cursor-pointer items-center gap-2 align-middle text-foreground data-disabled:cursor-default data-disabled:opacity-50 data-readonly:cursor-default', local.class);
|
|
24
20
|
}
|
|
25
21
|
}, others, {
|
|
22
|
+
get ["data-size"] () {
|
|
23
|
+
return local.size ?? 'md';
|
|
24
|
+
},
|
|
25
|
+
"data-slot": "checkbox-root",
|
|
26
26
|
get children () {
|
|
27
27
|
return local.children;
|
|
28
28
|
}
|
|
@@ -39,14 +39,14 @@ function CheckboxRootProvider(props) {
|
|
|
39
39
|
get asChild () {
|
|
40
40
|
return local.asChild;
|
|
41
41
|
},
|
|
42
|
-
"data-slot": "checkbox-root-provider",
|
|
43
|
-
get ["data-size"] () {
|
|
44
|
-
return local.size ?? 'md';
|
|
45
|
-
},
|
|
46
42
|
get ["class"] () {
|
|
47
43
|
return cn('group/checkbox inline-flex cursor-pointer items-center gap-2 align-middle text-foreground data-disabled:cursor-default data-disabled:opacity-50 data-readonly:cursor-default', local.class);
|
|
48
44
|
}
|
|
49
45
|
}, others, {
|
|
46
|
+
get ["data-size"] () {
|
|
47
|
+
return local.size ?? 'md';
|
|
48
|
+
},
|
|
49
|
+
"data-slot": "checkbox-root-provider",
|
|
50
50
|
get children () {
|
|
51
51
|
return local.children;
|
|
52
52
|
}
|
|
@@ -61,7 +61,6 @@ function CheckboxIndicator(props) {
|
|
|
61
61
|
const resolvedChildren = children(()=>local.children);
|
|
62
62
|
const slot = ()=>local.indeterminate ? 'checkbox-indicator-indeterminate-icon' : 'checkbox-indicator-checked-icon';
|
|
63
63
|
return createComponent(Checkbox.Indicator, mergeProps({
|
|
64
|
-
"data-slot": "checkbox-indicator",
|
|
65
64
|
get ["class"] () {
|
|
66
65
|
return cn('inline-flex h-full w-full items-center justify-center text-inherit', local.class);
|
|
67
66
|
},
|
|
@@ -69,6 +68,7 @@ function CheckboxIndicator(props) {
|
|
|
69
68
|
return local.indeterminate;
|
|
70
69
|
}
|
|
71
70
|
}, others, {
|
|
71
|
+
"data-slot": "checkbox-indicator",
|
|
72
72
|
get children () {
|
|
73
73
|
return resolvedChildren() ?? (()=>{
|
|
74
74
|
var _el$ = _tmpl$();
|
|
@@ -89,11 +89,11 @@ function CheckboxControl(props) {
|
|
|
89
89
|
]);
|
|
90
90
|
const resolvedChildren = children(()=>local.children);
|
|
91
91
|
return createComponent(Checkbox.Control, mergeProps({
|
|
92
|
-
"data-slot": "checkbox-control",
|
|
93
92
|
get ["class"] () {
|
|
94
93
|
return cn("[@media(hover:hover)]:[&:not([data-disabled]):not([data-readonly])[data-state='unchecked'][data-hover]:bg-accent box-border inline-flex size-5 shrink-0 items-center justify-center rounded-xs border border-border bg-background p-0 leading-none text-primary-foreground transition-[background-color,border-color,color,opacity] duration-200 select-none group-data-[size=lg]/checkbox:size-control-xs group-data-[size=sm]/checkbox:size-4 group-data-[size=xl]/checkbox:size-7 group-data-[size=xs]/checkbox:size-3.5 data-focus-visible:outline-1 data-focus-visible:outline-offset-1 data-focus-visible:outline-ring data-invalid:border-destructive data-invalid:text-destructive-foreground data-invalid:data-focus-visible:outline-destructive data-[state=checked]:border-primary data-[state=checked]:bg-primary data-invalid:data-[state=checked]:border-destructive data-invalid:data-[state=checked]:bg-destructive data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-invalid:data-[state=indeterminate]:border-destructive data-invalid:data-[state=indeterminate]:bg-destructive motion-reduce:transition-none", local.class);
|
|
95
94
|
}
|
|
96
95
|
}, others, {
|
|
96
|
+
"data-slot": "checkbox-control",
|
|
97
97
|
get children () {
|
|
98
98
|
return resolvedChildren() ?? [
|
|
99
99
|
createComponent(CheckboxIndicator, {}),
|
|
@@ -109,22 +109,24 @@ function CheckboxLabel(props) {
|
|
|
109
109
|
'class'
|
|
110
110
|
]);
|
|
111
111
|
return createComponent(Checkbox.Label, mergeProps({
|
|
112
|
-
"data-slot": "checkbox-label",
|
|
113
112
|
get ["class"] () {
|
|
114
113
|
return cn('text-sm leading-5 font-medium text-inherit', local.class);
|
|
115
114
|
}
|
|
116
|
-
}, others
|
|
115
|
+
}, others, {
|
|
116
|
+
"data-slot": "checkbox-label"
|
|
117
|
+
}));
|
|
117
118
|
}
|
|
118
119
|
function CheckboxGroup(props) {
|
|
119
120
|
const [local, others] = splitProps(props, [
|
|
120
121
|
'class'
|
|
121
122
|
]);
|
|
122
123
|
return createComponent(Checkbox.Group, mergeProps({
|
|
123
|
-
"data-slot": "checkbox-group",
|
|
124
124
|
get ["class"] () {
|
|
125
125
|
return cn('flex flex-col gap-2 text-foreground', local.class);
|
|
126
126
|
}
|
|
127
|
-
}, others
|
|
127
|
+
}, others, {
|
|
128
|
+
"data-slot": "checkbox-group"
|
|
129
|
+
}));
|
|
128
130
|
}
|
|
129
131
|
const Checkbox_Checkbox = Object.assign(CheckboxRoot, {
|
|
130
132
|
Root: CheckboxRoot,
|
|
@@ -9,7 +9,7 @@ function CheckboxRoot(props) {
|
|
|
9
9
|
'class',
|
|
10
10
|
'size'
|
|
11
11
|
]);
|
|
12
|
-
return <Checkbox.Root asChild={local.asChild}
|
|
12
|
+
return <Checkbox.Root asChild={local.asChild} class={cn('group/checkbox inline-flex cursor-pointer items-center gap-2 align-middle text-foreground data-disabled:cursor-default data-disabled:opacity-50 data-readonly:cursor-default', local.class)} {...others} data-size={local.size ?? 'md'} data-slot="checkbox-root">
|
|
13
13
|
{local.children}
|
|
14
14
|
</Checkbox.Root>;
|
|
15
15
|
}
|
|
@@ -20,7 +20,7 @@ function CheckboxRootProvider(props) {
|
|
|
20
20
|
'class',
|
|
21
21
|
'size'
|
|
22
22
|
]);
|
|
23
|
-
return <Checkbox.RootProvider asChild={local.asChild}
|
|
23
|
+
return <Checkbox.RootProvider asChild={local.asChild} class={cn('group/checkbox inline-flex cursor-pointer items-center gap-2 align-middle text-foreground data-disabled:cursor-default data-disabled:opacity-50 data-readonly:cursor-default', local.class)} {...others} data-size={local.size ?? 'md'} data-slot="checkbox-root-provider">
|
|
24
24
|
{local.children}
|
|
25
25
|
</Checkbox.RootProvider>;
|
|
26
26
|
}
|
|
@@ -32,7 +32,7 @@ function CheckboxIndicator(props) {
|
|
|
32
32
|
]);
|
|
33
33
|
const resolvedChildren = children(()=>local.children);
|
|
34
34
|
const slot = ()=>local.indeterminate ? 'checkbox-indicator-indeterminate-icon' : 'checkbox-indicator-checked-icon';
|
|
35
|
-
return <Checkbox.Indicator
|
|
35
|
+
return <Checkbox.Indicator class={cn('inline-flex h-full w-full items-center justify-center text-inherit', local.class)} indeterminate={local.indeterminate} {...others} data-slot="checkbox-indicator">
|
|
36
36
|
{resolvedChildren() ?? <span aria-hidden="true" data-slot={slot()} class="inline-flex size-3 items-center justify-center leading-none text-inherit group-data-[size=lg]/checkbox:size-3.5 group-data-[size=sm]/checkbox:size-2.5 group-data-[size=xl]/checkbox:size-4 group-data-[size=xs]/checkbox:size-2 [&>svg]:size-full">
|
|
37
37
|
{local.indeterminate ? <IndeterminateIcon/> : <CheckIcon/>}
|
|
38
38
|
</span>}
|
|
@@ -44,7 +44,7 @@ function CheckboxControl(props) {
|
|
|
44
44
|
'class'
|
|
45
45
|
]);
|
|
46
46
|
const resolvedChildren = children(()=>local.children);
|
|
47
|
-
return <Checkbox.Control
|
|
47
|
+
return <Checkbox.Control class={cn("[@media(hover:hover)]:[&:not([data-disabled]):not([data-readonly])[data-state='unchecked'][data-hover]:bg-accent box-border inline-flex size-5 shrink-0 items-center justify-center rounded-xs border border-border bg-background p-0 leading-none text-primary-foreground transition-[background-color,border-color,color,opacity] duration-200 select-none group-data-[size=lg]/checkbox:size-control-xs group-data-[size=sm]/checkbox:size-4 group-data-[size=xl]/checkbox:size-7 group-data-[size=xs]/checkbox:size-3.5 data-focus-visible:outline-1 data-focus-visible:outline-offset-1 data-focus-visible:outline-ring data-invalid:border-destructive data-invalid:text-destructive-foreground data-invalid:data-focus-visible:outline-destructive data-[state=checked]:border-primary data-[state=checked]:bg-primary data-invalid:data-[state=checked]:border-destructive data-invalid:data-[state=checked]:bg-destructive data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-invalid:data-[state=indeterminate]:border-destructive data-invalid:data-[state=indeterminate]:bg-destructive motion-reduce:transition-none", local.class)} {...others} data-slot="checkbox-control">
|
|
48
48
|
{resolvedChildren() ?? <>
|
|
49
49
|
<CheckboxIndicator/>
|
|
50
50
|
<CheckboxIndicator indeterminate/>
|
|
@@ -55,13 +55,13 @@ function CheckboxLabel(props) {
|
|
|
55
55
|
const [local, others] = splitProps(props, [
|
|
56
56
|
'class'
|
|
57
57
|
]);
|
|
58
|
-
return <Checkbox.Label
|
|
58
|
+
return <Checkbox.Label class={cn('text-sm leading-5 font-medium text-inherit', local.class)} {...others} data-slot="checkbox-label"/>;
|
|
59
59
|
}
|
|
60
60
|
function CheckboxGroup(props) {
|
|
61
61
|
const [local, others] = splitProps(props, [
|
|
62
62
|
'class'
|
|
63
63
|
]);
|
|
64
|
-
return <Checkbox.Group
|
|
64
|
+
return <Checkbox.Group class={cn('flex flex-col gap-2 text-foreground', local.class)} {...others} data-slot="checkbox-group"/>;
|
|
65
65
|
}
|
|
66
66
|
const Checkbox_Checkbox = Object.assign(CheckboxRoot, {
|
|
67
67
|
Root: CheckboxRoot,
|
|
@@ -9,66 +9,72 @@ function ClipboardRoot(props) {
|
|
|
9
9
|
'class'
|
|
10
10
|
]);
|
|
11
11
|
return createComponent(Clipboard.Root, mergeProps({
|
|
12
|
-
"data-slot": "clipboard-root",
|
|
13
12
|
get ["class"] () {
|
|
14
13
|
return cn('flex w-full flex-col gap-1.5 text-foreground', local.class);
|
|
15
14
|
}
|
|
16
|
-
}, others
|
|
15
|
+
}, others, {
|
|
16
|
+
"data-slot": "clipboard-root"
|
|
17
|
+
}));
|
|
17
18
|
}
|
|
18
19
|
function ClipboardRootProvider(props) {
|
|
19
20
|
const [local, others] = splitProps(props, [
|
|
20
21
|
'class'
|
|
21
22
|
]);
|
|
22
23
|
return createComponent(Clipboard.RootProvider, mergeProps({
|
|
23
|
-
"data-slot": "clipboard-root-provider",
|
|
24
24
|
get ["class"] () {
|
|
25
25
|
return cn('flex w-full flex-col gap-1.5 text-foreground', local.class);
|
|
26
26
|
}
|
|
27
|
-
}, others
|
|
27
|
+
}, others, {
|
|
28
|
+
"data-slot": "clipboard-root-provider"
|
|
29
|
+
}));
|
|
28
30
|
}
|
|
29
31
|
function ClipboardLabel(props) {
|
|
30
32
|
const [local, others] = splitProps(props, [
|
|
31
33
|
'class'
|
|
32
34
|
]);
|
|
33
35
|
return createComponent(Clipboard.Label, mergeProps({
|
|
34
|
-
"data-slot": "clipboard-label",
|
|
35
36
|
get ["class"] () {
|
|
36
37
|
return cn('text-sm leading-5 font-medium', local.class);
|
|
37
38
|
}
|
|
38
|
-
}, others
|
|
39
|
+
}, others, {
|
|
40
|
+
"data-slot": "clipboard-label"
|
|
41
|
+
}));
|
|
39
42
|
}
|
|
40
43
|
function ClipboardControl(props) {
|
|
41
44
|
const [local, others] = splitProps(props, [
|
|
42
45
|
'class'
|
|
43
46
|
]);
|
|
44
47
|
return createComponent(Clipboard.Control, mergeProps({
|
|
45
|
-
"data-slot": "clipboard-control",
|
|
46
48
|
get ["class"] () {
|
|
47
49
|
return cn('flex w-full items-center gap-2', local.class);
|
|
48
50
|
}
|
|
49
|
-
}, others
|
|
51
|
+
}, others, {
|
|
52
|
+
"data-slot": "clipboard-control"
|
|
53
|
+
}));
|
|
50
54
|
}
|
|
51
55
|
function ClipboardInput(props) {
|
|
52
56
|
const [local, others] = splitProps(props, [
|
|
53
57
|
'class'
|
|
54
58
|
]);
|
|
55
59
|
return createComponent(Clipboard.Input, mergeProps({
|
|
56
|
-
"data-slot": "clipboard-input",
|
|
57
60
|
get ["class"] () {
|
|
58
61
|
return cn('box-border min-h-control-md w-full min-w-0 rounded-md border border-border bg-background px-3.5 py-1 text-md leading-6 text-foreground outline-1 -outline-offset-1 outline-transparent transition duration-200 ease-in-out placeholder:text-muted-foreground focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50', local.class);
|
|
59
62
|
}
|
|
60
|
-
}, others
|
|
63
|
+
}, others, {
|
|
64
|
+
"data-slot": "clipboard-input"
|
|
65
|
+
}));
|
|
61
66
|
}
|
|
62
67
|
function ClipboardTrigger(props) {
|
|
63
68
|
const [local, others] = splitProps(props, [
|
|
64
69
|
'class'
|
|
65
70
|
]);
|
|
66
71
|
return createComponent(Clipboard.Trigger, mergeProps({
|
|
67
|
-
"data-slot": "clipboard-trigger",
|
|
68
72
|
get ["class"] () {
|
|
69
73
|
return cn('box-border inline-flex min-h-control-md shrink-0 cursor-pointer appearance-none items-center justify-center gap-2 rounded-md border border-border bg-background px-4 text-sm leading-5 font-medium whitespace-nowrap text-foreground transition duration-200 ease-in-out select-none focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none [&_svg]:size-4 [&_svg]:shrink-0 [&:active:not(:disabled):not([data-disabled])]:opacity-[0.94] motion-safe:[&:active:not(:disabled):not([data-disabled])]:translate-y-px motion-safe:[&:active:not(:disabled):not([data-disabled])]:scale-[0.985] [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:bg-accent', local.class);
|
|
70
74
|
}
|
|
71
|
-
}, others
|
|
75
|
+
}, others, {
|
|
76
|
+
"data-slot": "clipboard-trigger"
|
|
77
|
+
}));
|
|
72
78
|
}
|
|
73
79
|
function ClipboardIndicator(props) {
|
|
74
80
|
const [local, others] = splitProps(props, [
|
|
@@ -78,7 +84,6 @@ function ClipboardIndicator(props) {
|
|
|
78
84
|
]);
|
|
79
85
|
const resolvedChildren = children(()=>local.children);
|
|
80
86
|
return createComponent(Clipboard.Indicator, mergeProps({
|
|
81
|
-
"data-slot": "clipboard-indicator",
|
|
82
87
|
get ["class"] () {
|
|
83
88
|
return cn('inline-flex shrink-0 items-center justify-center', local.class);
|
|
84
89
|
},
|
|
@@ -90,6 +95,7 @@ function ClipboardIndicator(props) {
|
|
|
90
95
|
})();
|
|
91
96
|
}
|
|
92
97
|
}, others, {
|
|
98
|
+
"data-slot": "clipboard-indicator",
|
|
93
99
|
get children () {
|
|
94
100
|
return resolvedChildren() ?? (()=>{
|
|
95
101
|
var _el$2 = _tmpl$2();
|
|
@@ -104,24 +110,29 @@ function ClipboardValueText(props) {
|
|
|
104
110
|
'class'
|
|
105
111
|
]);
|
|
106
112
|
return createComponent(Clipboard.ValueText, mergeProps({
|
|
107
|
-
"data-slot": "clipboard-value-text",
|
|
108
113
|
get ["class"] () {
|
|
109
114
|
return cn('min-w-0 overflow-hidden text-ellipsis whitespace-nowrap', local.class);
|
|
110
115
|
}
|
|
111
|
-
}, others
|
|
116
|
+
}, others, {
|
|
117
|
+
"data-slot": "clipboard-value-text"
|
|
118
|
+
}));
|
|
112
119
|
}
|
|
113
120
|
function ClipboardCopyText(props) {
|
|
114
121
|
const [local, others] = splitProps(props, [
|
|
115
122
|
'children',
|
|
123
|
+
'class',
|
|
116
124
|
'copied'
|
|
117
125
|
]);
|
|
118
126
|
const resolvedChildren = children(()=>local.children);
|
|
119
|
-
return createComponent(
|
|
120
|
-
"
|
|
127
|
+
return createComponent(Clipboard.Indicator, mergeProps({
|
|
128
|
+
get ["class"] () {
|
|
129
|
+
return cn('inline-flex shrink-0 items-center justify-center', local.class);
|
|
130
|
+
},
|
|
121
131
|
get copied () {
|
|
122
132
|
return memo(()=>void 0 === local.copied)() ? 'Copied' : local.copied;
|
|
123
133
|
}
|
|
124
134
|
}, others, {
|
|
135
|
+
"data-slot": "clipboard-copy-text",
|
|
125
136
|
get children () {
|
|
126
137
|
return memo(()=>void 0 === resolvedChildren())() ? 'Copy' : resolvedChildren();
|
|
127
138
|
}
|
|
@@ -6,37 +6,37 @@ function ClipboardRoot(props) {
|
|
|
6
6
|
const [local, others] = splitProps(props, [
|
|
7
7
|
'class'
|
|
8
8
|
]);
|
|
9
|
-
return <Clipboard.Root
|
|
9
|
+
return <Clipboard.Root class={cn('flex w-full flex-col gap-1.5 text-foreground', local.class)} {...others} data-slot="clipboard-root"/>;
|
|
10
10
|
}
|
|
11
11
|
function ClipboardRootProvider(props) {
|
|
12
12
|
const [local, others] = splitProps(props, [
|
|
13
13
|
'class'
|
|
14
14
|
]);
|
|
15
|
-
return <Clipboard.RootProvider
|
|
15
|
+
return <Clipboard.RootProvider class={cn('flex w-full flex-col gap-1.5 text-foreground', local.class)} {...others} data-slot="clipboard-root-provider"/>;
|
|
16
16
|
}
|
|
17
17
|
function ClipboardLabel(props) {
|
|
18
18
|
const [local, others] = splitProps(props, [
|
|
19
19
|
'class'
|
|
20
20
|
]);
|
|
21
|
-
return <Clipboard.Label
|
|
21
|
+
return <Clipboard.Label class={cn('text-sm leading-5 font-medium', local.class)} {...others} data-slot="clipboard-label"/>;
|
|
22
22
|
}
|
|
23
23
|
function ClipboardControl(props) {
|
|
24
24
|
const [local, others] = splitProps(props, [
|
|
25
25
|
'class'
|
|
26
26
|
]);
|
|
27
|
-
return <Clipboard.Control
|
|
27
|
+
return <Clipboard.Control class={cn('flex w-full items-center gap-2', local.class)} {...others} data-slot="clipboard-control"/>;
|
|
28
28
|
}
|
|
29
29
|
function ClipboardInput(props) {
|
|
30
30
|
const [local, others] = splitProps(props, [
|
|
31
31
|
'class'
|
|
32
32
|
]);
|
|
33
|
-
return <Clipboard.Input
|
|
33
|
+
return <Clipboard.Input class={cn('box-border min-h-control-md w-full min-w-0 rounded-md border border-border bg-background px-3.5 py-1 text-md leading-6 text-foreground outline-1 -outline-offset-1 outline-transparent transition duration-200 ease-in-out placeholder:text-muted-foreground focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50', local.class)} {...others} data-slot="clipboard-input"/>;
|
|
34
34
|
}
|
|
35
35
|
function ClipboardTrigger(props) {
|
|
36
36
|
const [local, others] = splitProps(props, [
|
|
37
37
|
'class'
|
|
38
38
|
]);
|
|
39
|
-
return <Clipboard.Trigger
|
|
39
|
+
return <Clipboard.Trigger class={cn('box-border inline-flex min-h-control-md shrink-0 cursor-pointer appearance-none items-center justify-center gap-2 rounded-md border border-border bg-background px-4 text-sm leading-5 font-medium whitespace-nowrap text-foreground transition duration-200 ease-in-out select-none focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none [&_svg]:size-4 [&_svg]:shrink-0 [&:active:not(:disabled):not([data-disabled])]:opacity-[0.94] motion-safe:[&:active:not(:disabled):not([data-disabled])]:translate-y-px motion-safe:[&:active:not(:disabled):not([data-disabled])]:scale-[0.985] [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:bg-accent', local.class)} {...others} data-slot="clipboard-trigger"/>;
|
|
40
40
|
}
|
|
41
41
|
function ClipboardIndicator(props) {
|
|
42
42
|
const [local, others] = splitProps(props, [
|
|
@@ -45,9 +45,9 @@ function ClipboardIndicator(props) {
|
|
|
45
45
|
'copied'
|
|
46
46
|
]);
|
|
47
47
|
const resolvedChildren = children(()=>local.children);
|
|
48
|
-
return <Clipboard.Indicator
|
|
48
|
+
return <Clipboard.Indicator class={cn('inline-flex shrink-0 items-center justify-center', local.class)} copied={local.copied ?? <span aria-hidden="true" data-slot="clipboard-indicator-copied-icon" class="inline-flex shrink-0 items-center justify-center">
|
|
49
49
|
<CheckIcon/>
|
|
50
|
-
</span>} {...others}>
|
|
50
|
+
</span>} {...others} data-slot="clipboard-indicator">
|
|
51
51
|
{resolvedChildren() ?? <span aria-hidden="true" data-slot="clipboard-indicator-idle-icon" class="inline-flex shrink-0 items-center justify-center">
|
|
52
52
|
<CopyIcon/>
|
|
53
53
|
</span>}
|
|
@@ -57,17 +57,18 @@ function ClipboardValueText(props) {
|
|
|
57
57
|
const [local, others] = splitProps(props, [
|
|
58
58
|
'class'
|
|
59
59
|
]);
|
|
60
|
-
return <Clipboard.ValueText
|
|
60
|
+
return <Clipboard.ValueText class={cn('min-w-0 overflow-hidden text-ellipsis whitespace-nowrap', local.class)} {...others} data-slot="clipboard-value-text"/>;
|
|
61
61
|
}
|
|
62
62
|
function ClipboardCopyText(props) {
|
|
63
63
|
const [local, others] = splitProps(props, [
|
|
64
64
|
'children',
|
|
65
|
+
'class',
|
|
65
66
|
'copied'
|
|
66
67
|
]);
|
|
67
68
|
const resolvedChildren = children(()=>local.children);
|
|
68
|
-
return <
|
|
69
|
+
return <Clipboard.Indicator class={cn('inline-flex shrink-0 items-center justify-center', local.class)} copied={void 0 === local.copied ? 'Copied' : local.copied} {...others} data-slot="clipboard-copy-text">
|
|
69
70
|
{void 0 === resolvedChildren() ? 'Copy' : resolvedChildren()}
|
|
70
|
-
</
|
|
71
|
+
</Clipboard.Indicator>;
|
|
71
72
|
}
|
|
72
73
|
const Clipboard_Clipboard = Object.assign(ClipboardRoot, {
|
|
73
74
|
Root: ClipboardRoot,
|
|
@@ -9,22 +9,24 @@ function CollapsibleRoot(props) {
|
|
|
9
9
|
'class'
|
|
10
10
|
]);
|
|
11
11
|
return createComponent(Collapsible.Root, mergeProps({
|
|
12
|
-
"data-slot": "collapsible-root",
|
|
13
12
|
get ["class"] () {
|
|
14
13
|
return cn('box-border flex w-full max-w-full min-w-0 flex-col text-foreground', local.class);
|
|
15
14
|
}
|
|
16
|
-
}, others
|
|
15
|
+
}, others, {
|
|
16
|
+
"data-slot": "collapsible-root"
|
|
17
|
+
}));
|
|
17
18
|
}
|
|
18
19
|
function CollapsibleRootProvider(props) {
|
|
19
20
|
const [local, others] = splitProps(props, [
|
|
20
21
|
'class'
|
|
21
22
|
]);
|
|
22
23
|
return createComponent(Collapsible.RootProvider, mergeProps({
|
|
23
|
-
"data-slot": "collapsible-root-provider",
|
|
24
24
|
get ["class"] () {
|
|
25
25
|
return cn('box-border flex w-full max-w-full min-w-0 flex-col text-foreground', local.class);
|
|
26
26
|
}
|
|
27
|
-
}, others
|
|
27
|
+
}, others, {
|
|
28
|
+
"data-slot": "collapsible-root-provider"
|
|
29
|
+
}));
|
|
28
30
|
}
|
|
29
31
|
function CollapsibleTrigger(props) {
|
|
30
32
|
const [local, others] = splitProps(props, [
|
|
@@ -35,11 +37,12 @@ function CollapsibleTrigger(props) {
|
|
|
35
37
|
get asChild () {
|
|
36
38
|
return local.asChild;
|
|
37
39
|
},
|
|
38
|
-
"data-slot": "collapsible-trigger",
|
|
39
40
|
get ["class"] () {
|
|
40
41
|
return cn(!local.asChild && 'box-border flex w-full cursor-pointer items-center justify-between gap-2 bg-transparent px-0 py-1 text-start text-sm outline-0 transition-colors duration-200 select-none focus-visible:relative focus-visible:z-1 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50 data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none', local.class);
|
|
41
42
|
}
|
|
42
|
-
}, others
|
|
43
|
+
}, others, {
|
|
44
|
+
"data-slot": "collapsible-trigger"
|
|
45
|
+
}));
|
|
43
46
|
}
|
|
44
47
|
function CollapsibleIndicator(props) {
|
|
45
48
|
const [local, others] = splitProps(props, [
|
|
@@ -48,11 +51,11 @@ function CollapsibleIndicator(props) {
|
|
|
48
51
|
]);
|
|
49
52
|
const resolvedChildren = children(()=>local.children);
|
|
50
53
|
return createComponent(Collapsible.Indicator, mergeProps({
|
|
51
|
-
"data-slot": "collapsible-indicator",
|
|
52
54
|
get ["class"] () {
|
|
53
55
|
return cn('inline-flex size-3 shrink-0 items-center justify-center transition-transform duration-200 data-disabled:opacity-50 data-[state=open]:rotate-180 motion-reduce:transition-none [&_svg]:size-full', local.class);
|
|
54
56
|
}
|
|
55
57
|
}, others, {
|
|
58
|
+
"data-slot": "collapsible-indicator",
|
|
56
59
|
get children () {
|
|
57
60
|
return resolvedChildren() ?? createComponent(ChevronDownIcon, {});
|
|
58
61
|
}
|
|
@@ -63,22 +66,24 @@ function CollapsibleContent(props) {
|
|
|
63
66
|
'class'
|
|
64
67
|
]);
|
|
65
68
|
return createComponent(Collapsible.Content, mergeProps({
|
|
66
|
-
"data-slot": "collapsible-content",
|
|
67
69
|
get ["class"] () {
|
|
68
70
|
return cn('box-border overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-moduix-collapsible-closed data-[has-collapsed-size]:data-[state=closed]:animate-moduix-collapsible-closed-partial data-[state=open]:animate-moduix-collapsible-open data-[has-collapsed-size]:data-[state=open]:animate-moduix-collapsible-open-partial motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]', local.class);
|
|
69
71
|
}
|
|
70
|
-
}, others
|
|
72
|
+
}, others, {
|
|
73
|
+
"data-slot": "collapsible-content"
|
|
74
|
+
}));
|
|
71
75
|
}
|
|
72
76
|
function CollapsibleBody(props) {
|
|
73
77
|
const [local, others] = splitProps(props, [
|
|
74
78
|
'class'
|
|
75
79
|
]);
|
|
76
80
|
return createComponent(ark.div, mergeProps({
|
|
77
|
-
"data-slot": "collapsible-body",
|
|
78
81
|
get ["class"] () {
|
|
79
82
|
return cn('grid min-w-0 gap-2', local.class);
|
|
80
83
|
}
|
|
81
|
-
}, others
|
|
84
|
+
}, others, {
|
|
85
|
+
"data-slot": "collapsible-body"
|
|
86
|
+
}));
|
|
82
87
|
}
|
|
83
88
|
const Collapsible_Collapsible = Object.assign(CollapsibleRoot, {
|
|
84
89
|
Root: CollapsibleRoot,
|
|
@@ -7,20 +7,20 @@ function CollapsibleRoot(props) {
|
|
|
7
7
|
const [local, others] = splitProps(props, [
|
|
8
8
|
'class'
|
|
9
9
|
]);
|
|
10
|
-
return <Collapsible.Root
|
|
10
|
+
return <Collapsible.Root class={cn('box-border flex w-full max-w-full min-w-0 flex-col text-foreground', local.class)} {...others} data-slot="collapsible-root"/>;
|
|
11
11
|
}
|
|
12
12
|
function CollapsibleRootProvider(props) {
|
|
13
13
|
const [local, others] = splitProps(props, [
|
|
14
14
|
'class'
|
|
15
15
|
]);
|
|
16
|
-
return <Collapsible.RootProvider
|
|
16
|
+
return <Collapsible.RootProvider class={cn('box-border flex w-full max-w-full min-w-0 flex-col text-foreground', local.class)} {...others} data-slot="collapsible-root-provider"/>;
|
|
17
17
|
}
|
|
18
18
|
function CollapsibleTrigger(props) {
|
|
19
19
|
const [local, others] = splitProps(props, [
|
|
20
20
|
'asChild',
|
|
21
21
|
'class'
|
|
22
22
|
]);
|
|
23
|
-
return <Collapsible.Trigger asChild={local.asChild}
|
|
23
|
+
return <Collapsible.Trigger asChild={local.asChild} class={cn(!local.asChild && 'box-border flex w-full cursor-pointer items-center justify-between gap-2 bg-transparent px-0 py-1 text-start text-sm outline-0 transition-colors duration-200 select-none focus-visible:relative focus-visible:z-1 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50 data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none', local.class)} {...others} data-slot="collapsible-trigger"/>;
|
|
24
24
|
}
|
|
25
25
|
function CollapsibleIndicator(props) {
|
|
26
26
|
const [local, others] = splitProps(props, [
|
|
@@ -28,7 +28,7 @@ function CollapsibleIndicator(props) {
|
|
|
28
28
|
'class'
|
|
29
29
|
]);
|
|
30
30
|
const resolvedChildren = children(()=>local.children);
|
|
31
|
-
return <Collapsible.Indicator
|
|
31
|
+
return <Collapsible.Indicator class={cn('inline-flex size-3 shrink-0 items-center justify-center transition-transform duration-200 data-disabled:opacity-50 data-[state=open]:rotate-180 motion-reduce:transition-none [&_svg]:size-full', local.class)} {...others} data-slot="collapsible-indicator">
|
|
32
32
|
{resolvedChildren() ?? <ChevronDownIcon/>}
|
|
33
33
|
</Collapsible.Indicator>;
|
|
34
34
|
}
|
|
@@ -36,13 +36,13 @@ function CollapsibleContent(props) {
|
|
|
36
36
|
const [local, others] = splitProps(props, [
|
|
37
37
|
'class'
|
|
38
38
|
]);
|
|
39
|
-
return <Collapsible.Content
|
|
39
|
+
return <Collapsible.Content class={cn('box-border overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-moduix-collapsible-closed data-[has-collapsed-size]:data-[state=closed]:animate-moduix-collapsible-closed-partial data-[state=open]:animate-moduix-collapsible-open data-[has-collapsed-size]:data-[state=open]:animate-moduix-collapsible-open-partial motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]', local.class)} {...others} data-slot="collapsible-content"/>;
|
|
40
40
|
}
|
|
41
41
|
function CollapsibleBody(props) {
|
|
42
42
|
const [local, others] = splitProps(props, [
|
|
43
43
|
'class'
|
|
44
44
|
]);
|
|
45
|
-
return <ark.div
|
|
45
|
+
return <ark.div class={cn('grid min-w-0 gap-2', local.class)} {...others} data-slot="collapsible-body"/>;
|
|
46
46
|
}
|
|
47
47
|
const Collapsible_Collapsible = Object.assign(CollapsibleRoot, {
|
|
48
48
|
Root: CollapsibleRoot,
|