@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
|
@@ -18,11 +18,11 @@ function SignaturePadRoot(props) {
|
|
|
18
18
|
get asChild () {
|
|
19
19
|
return local.asChild;
|
|
20
20
|
},
|
|
21
|
-
"data-slot": "signature-pad-root",
|
|
22
21
|
get ["class"] () {
|
|
23
22
|
return cn('box-border inline-flex w-70 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50', local.class);
|
|
24
23
|
}
|
|
25
24
|
}, others, {
|
|
25
|
+
"data-slot": "signature-pad-root",
|
|
26
26
|
get children () {
|
|
27
27
|
return createComponent(SignaturePadReadOnlyContext.Provider, {
|
|
28
28
|
value: ()=>others.readOnly ?? field?.().readOnly ?? false,
|
|
@@ -49,11 +49,11 @@ function SignaturePadRootProvider(props) {
|
|
|
49
49
|
get asChild () {
|
|
50
50
|
return local.asChild;
|
|
51
51
|
},
|
|
52
|
-
"data-slot": "signature-pad-root-provider",
|
|
53
52
|
get ["class"] () {
|
|
54
53
|
return cn('box-border inline-flex w-70 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50', local.class);
|
|
55
54
|
}
|
|
56
55
|
}, others, {
|
|
56
|
+
"data-slot": "signature-pad-root-provider",
|
|
57
57
|
get children () {
|
|
58
58
|
return local.children;
|
|
59
59
|
}
|
|
@@ -66,44 +66,48 @@ function SignaturePadLabel(props) {
|
|
|
66
66
|
'class'
|
|
67
67
|
]);
|
|
68
68
|
return createComponent(SignaturePad.Label, mergeProps({
|
|
69
|
-
"data-slot": "signature-pad-label",
|
|
70
69
|
get ["class"] () {
|
|
71
70
|
return cn('text-sm leading-5 font-medium text-foreground select-none', local.class);
|
|
72
71
|
}
|
|
73
|
-
}, others
|
|
72
|
+
}, others, {
|
|
73
|
+
"data-slot": "signature-pad-label"
|
|
74
|
+
}));
|
|
74
75
|
}
|
|
75
76
|
function SignaturePadControl(props) {
|
|
76
77
|
const [local, others] = splitProps(props, [
|
|
77
78
|
'class'
|
|
78
79
|
]);
|
|
79
80
|
return createComponent(SignaturePad.Control, mergeProps({
|
|
80
|
-
"data-slot": "signature-pad-control",
|
|
81
81
|
get ["class"] () {
|
|
82
82
|
return cn('box-border h-40 min-h-40 w-full min-w-0 overflow-hidden rounded-md border border-border bg-background text-foreground shadow-sm transition-[border-color,box-shadow,opacity] duration-200 ease-in-out outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring data-disabled:cursor-not-allowed motion-reduce:transition-none', local.class);
|
|
83
83
|
}
|
|
84
|
-
}, others
|
|
84
|
+
}, others, {
|
|
85
|
+
"data-slot": "signature-pad-control"
|
|
86
|
+
}));
|
|
85
87
|
}
|
|
86
88
|
function SignaturePadSegment(props) {
|
|
87
89
|
const [local, others] = splitProps(props, [
|
|
88
90
|
'class'
|
|
89
91
|
]);
|
|
90
92
|
return createComponent(SignaturePad.Segment, mergeProps({
|
|
91
|
-
"data-slot": "signature-pad-segment",
|
|
92
93
|
get ["class"] () {
|
|
93
94
|
return cn('fill-current', local.class);
|
|
94
95
|
}
|
|
95
|
-
}, others
|
|
96
|
+
}, others, {
|
|
97
|
+
"data-slot": "signature-pad-segment"
|
|
98
|
+
}));
|
|
96
99
|
}
|
|
97
100
|
function SignaturePadGuide(props) {
|
|
98
101
|
const [local, others] = splitProps(props, [
|
|
99
102
|
'class'
|
|
100
103
|
]);
|
|
101
104
|
return createComponent(SignaturePad.Guide, mergeProps({
|
|
102
|
-
"data-slot": "signature-pad-guide",
|
|
103
105
|
get ["class"] () {
|
|
104
106
|
return cn('pointer-events-none absolute start-6 end-6 bottom-8 border-b border-dashed border-border', local.class);
|
|
105
107
|
}
|
|
106
|
-
}, others
|
|
108
|
+
}, others, {
|
|
109
|
+
"data-slot": "signature-pad-guide"
|
|
110
|
+
}));
|
|
107
111
|
}
|
|
108
112
|
function SignaturePadClearTrigger(props) {
|
|
109
113
|
const [local, others] = splitProps(props, [
|
|
@@ -128,9 +132,9 @@ function SignaturePadClearTrigger(props) {
|
|
|
128
132
|
get ["aria-labelledby"] () {
|
|
129
133
|
return local['aria-labelledby'];
|
|
130
134
|
},
|
|
131
|
-
"data-slot": "signature-pad-clear-trigger",
|
|
132
135
|
class: triggerClass
|
|
133
136
|
}, others, {
|
|
137
|
+
"data-slot": "signature-pad-clear-trigger",
|
|
134
138
|
get disabled () {
|
|
135
139
|
return isDisabled();
|
|
136
140
|
},
|
|
@@ -159,9 +163,9 @@ function SignaturePadClearTrigger(props) {
|
|
|
159
163
|
}
|
|
160
164
|
}));
|
|
161
165
|
},
|
|
162
|
-
"data-slot": "signature-pad-clear-trigger",
|
|
163
166
|
class: triggerClass
|
|
164
167
|
}, others, {
|
|
168
|
+
"data-slot": "signature-pad-clear-trigger",
|
|
165
169
|
get disabled () {
|
|
166
170
|
return isDisabled();
|
|
167
171
|
}
|
|
@@ -13,7 +13,7 @@ function SignaturePadRoot(props) {
|
|
|
13
13
|
'class'
|
|
14
14
|
]);
|
|
15
15
|
const field = useFieldContext();
|
|
16
|
-
return <SignaturePad.Root asChild={local.asChild}
|
|
16
|
+
return <SignaturePad.Root asChild={local.asChild} class={cn('box-border inline-flex w-70 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50', local.class)} {...others} data-slot="signature-pad-root">
|
|
17
17
|
<SignaturePadReadOnlyContext.Provider value={()=>others.readOnly ?? field?.().readOnly ?? false}>
|
|
18
18
|
{local.children}
|
|
19
19
|
</SignaturePadReadOnlyContext.Provider>
|
|
@@ -29,7 +29,7 @@ function SignaturePadRootProvider(props) {
|
|
|
29
29
|
const signaturePad = others.value;
|
|
30
30
|
return signaturePad[signaturePadReadOnly]?.() ?? false;
|
|
31
31
|
}}>
|
|
32
|
-
<SignaturePad.RootProvider asChild={local.asChild}
|
|
32
|
+
<SignaturePad.RootProvider asChild={local.asChild} class={cn('box-border inline-flex w-70 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50', local.class)} {...others} data-slot="signature-pad-root-provider">
|
|
33
33
|
{local.children}
|
|
34
34
|
</SignaturePad.RootProvider>
|
|
35
35
|
</SignaturePadReadOnlyContext.Provider>;
|
|
@@ -38,25 +38,25 @@ function SignaturePadLabel(props) {
|
|
|
38
38
|
const [local, others] = splitProps(props, [
|
|
39
39
|
'class'
|
|
40
40
|
]);
|
|
41
|
-
return <SignaturePad.Label
|
|
41
|
+
return <SignaturePad.Label class={cn('text-sm leading-5 font-medium text-foreground select-none', local.class)} {...others} data-slot="signature-pad-label"/>;
|
|
42
42
|
}
|
|
43
43
|
function SignaturePadControl(props) {
|
|
44
44
|
const [local, others] = splitProps(props, [
|
|
45
45
|
'class'
|
|
46
46
|
]);
|
|
47
|
-
return <SignaturePad.Control
|
|
47
|
+
return <SignaturePad.Control class={cn('box-border h-40 min-h-40 w-full min-w-0 overflow-hidden rounded-md border border-border bg-background text-foreground shadow-sm transition-[border-color,box-shadow,opacity] duration-200 ease-in-out outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring data-disabled:cursor-not-allowed motion-reduce:transition-none', local.class)} {...others} data-slot="signature-pad-control"/>;
|
|
48
48
|
}
|
|
49
49
|
function SignaturePadSegment(props) {
|
|
50
50
|
const [local, others] = splitProps(props, [
|
|
51
51
|
'class'
|
|
52
52
|
]);
|
|
53
|
-
return <SignaturePad.Segment
|
|
53
|
+
return <SignaturePad.Segment class={cn('fill-current', local.class)} {...others} data-slot="signature-pad-segment"/>;
|
|
54
54
|
}
|
|
55
55
|
function SignaturePadGuide(props) {
|
|
56
56
|
const [local, others] = splitProps(props, [
|
|
57
57
|
'class'
|
|
58
58
|
]);
|
|
59
|
-
return <SignaturePad.Guide
|
|
59
|
+
return <SignaturePad.Guide class={cn('pointer-events-none absolute start-6 end-6 bottom-8 border-b border-dashed border-border', local.class)} {...others} data-slot="signature-pad-guide"/>;
|
|
60
60
|
}
|
|
61
61
|
function SignaturePadClearTrigger(props) {
|
|
62
62
|
const [local, others] = splitProps(props, [
|
|
@@ -71,7 +71,7 @@ function SignaturePadClearTrigger(props) {
|
|
|
71
71
|
const readOnly = useContext(SignaturePadReadOnlyContext);
|
|
72
72
|
const isDisabled = ()=>readOnly() || local.disabled ? true : void 0;
|
|
73
73
|
const triggerClass = cn('absolute end-2 top-2 border-0', local.class);
|
|
74
|
-
if (local.asChild) return <SignaturePad.ClearTrigger asChild={local.asChild} aria-label={local['aria-label']} aria-labelledby={local['aria-labelledby']} data-slot="signature-pad-clear-trigger"
|
|
74
|
+
if (local.asChild) return <SignaturePad.ClearTrigger asChild={local.asChild} aria-label={local['aria-label']} aria-labelledby={local['aria-labelledby']} class={triggerClass} {...others} data-slot="signature-pad-clear-trigger" disabled={isDisabled()}>
|
|
75
75
|
{local.children}
|
|
76
76
|
</SignaturePad.ClearTrigger>;
|
|
77
77
|
return <SignaturePad.ClearTrigger asChild={(triggerProps)=>{
|
|
@@ -79,7 +79,7 @@ function SignaturePadClearTrigger(props) {
|
|
|
79
79
|
return <CloseButton.Root {...resolvedProps} aria-label={local['aria-label']} aria-labelledby={local['aria-labelledby']} class={cn(resolvedProps.class, 'size-7 rounded-sm bg-transparent text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring motion-reduce:transition-none [&>svg]:size-4 [&>svg]:shrink-0 [@media(hover:hover)]:[&:not([data-disabled]):hover]:bg-accent [@media(hover:hover)]:[&:not([data-disabled]):hover]:text-foreground', local.class)}>
|
|
80
80
|
{resolvedChildren() ?? <RotateCcwIcon class="size-4" aria-hidden="true"/>}
|
|
81
81
|
</CloseButton.Root>;
|
|
82
|
-
}} data-slot="signature-pad-clear-trigger"
|
|
82
|
+
}} class={triggerClass} {...others} data-slot="signature-pad-clear-trigger" disabled={isDisabled()}/>;
|
|
83
83
|
}
|
|
84
84
|
function SignaturePadCanvas(props) {
|
|
85
85
|
return <SignaturePadControl {...props}>
|
|
@@ -21,7 +21,6 @@ function SliderRoot(props) {
|
|
|
21
21
|
get value () {
|
|
22
22
|
return local.value;
|
|
23
23
|
},
|
|
24
|
-
"data-slot": "slider-root",
|
|
25
24
|
get ["data-readonly"] () {
|
|
26
25
|
return local.readOnly ? '' : void 0;
|
|
27
26
|
},
|
|
@@ -32,6 +31,7 @@ function SliderRoot(props) {
|
|
|
32
31
|
return local.readOnly;
|
|
33
32
|
}
|
|
34
33
|
}, others, {
|
|
34
|
+
"data-slot": "slider-root",
|
|
35
35
|
get children () {
|
|
36
36
|
return local.children;
|
|
37
37
|
}
|
|
@@ -50,66 +50,72 @@ function SliderRootProvider(props) {
|
|
|
50
50
|
get value () {
|
|
51
51
|
return local.value;
|
|
52
52
|
},
|
|
53
|
-
"data-slot": "slider-root-provider",
|
|
54
53
|
get ["class"] () {
|
|
55
54
|
return cn("group flex w-48 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50 data-[orientation=vertical]:grid data-[orientation=vertical]:h-48 data-[orientation=vertical]:w-max data-[orientation=vertical]:grid-cols-[auto_max-content] data-[orientation=vertical]:grid-rows-[auto_minmax(0,1fr)] data-[orientation=vertical]:items-center data-[orientation=vertical]:gap-x-2 data-[orientation=vertical]:[grid-template-areas:'label_value'_'control_markers']", local.class);
|
|
56
55
|
}
|
|
57
|
-
}, others
|
|
56
|
+
}, others, {
|
|
57
|
+
"data-slot": "slider-root-provider"
|
|
58
|
+
}));
|
|
58
59
|
}
|
|
59
60
|
function SliderLabel(props) {
|
|
60
61
|
const [local, others] = splitProps(props, [
|
|
61
62
|
'class'
|
|
62
63
|
]);
|
|
63
64
|
return createComponent(Slider.Label, mergeProps({
|
|
64
|
-
"data-slot": "slider-label",
|
|
65
65
|
get ["class"] () {
|
|
66
66
|
return cn('text-sm leading-5 font-normal text-foreground select-none group-data-[orientation=vertical]:[grid-area:label]', local.class);
|
|
67
67
|
}
|
|
68
|
-
}, others
|
|
68
|
+
}, others, {
|
|
69
|
+
"data-slot": "slider-label"
|
|
70
|
+
}));
|
|
69
71
|
}
|
|
70
72
|
function SliderValueText(props) {
|
|
71
73
|
const [local, others] = splitProps(props, [
|
|
72
74
|
'class'
|
|
73
75
|
]);
|
|
74
76
|
return createComponent(Slider.ValueText, mergeProps({
|
|
75
|
-
"data-slot": "slider-value-text",
|
|
76
77
|
get ["class"] () {
|
|
77
78
|
return cn('text-right text-sm leading-5 font-normal text-foreground group-data-[orientation=vertical]:justify-self-end group-data-[orientation=vertical]:[grid-area:value]', local.class);
|
|
78
79
|
}
|
|
79
|
-
}, others
|
|
80
|
+
}, others, {
|
|
81
|
+
"data-slot": "slider-value-text"
|
|
82
|
+
}));
|
|
80
83
|
}
|
|
81
84
|
function SliderControl(props) {
|
|
82
85
|
const [local, others] = splitProps(props, [
|
|
83
86
|
'class'
|
|
84
87
|
]);
|
|
85
88
|
return createComponent(Slider.Control, mergeProps({
|
|
86
|
-
"data-slot": "slider-control",
|
|
87
89
|
get ["class"] () {
|
|
88
90
|
return cn('relative flex min-h-5 w-full cursor-pointer touch-none items-center select-none group-data-readonly:cursor-default group-data-[orientation=vertical]:[grid-area:control] data-disabled:cursor-default data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-0 data-[orientation=vertical]:w-5 data-[orientation=vertical]:flex-col', local.class);
|
|
89
91
|
}
|
|
90
|
-
}, others
|
|
92
|
+
}, others, {
|
|
93
|
+
"data-slot": "slider-control"
|
|
94
|
+
}));
|
|
91
95
|
}
|
|
92
96
|
function SliderTrack(props) {
|
|
93
97
|
const [local, others] = splitProps(props, [
|
|
94
98
|
'class'
|
|
95
99
|
]);
|
|
96
100
|
return createComponent(Slider.Track, mergeProps({
|
|
97
|
-
"data-slot": "slider-track",
|
|
98
101
|
get ["class"] () {
|
|
99
102
|
return cn('h-1.5 w-full flex-1 overflow-hidden rounded-full bg-muted ring-1 ring-border select-none ring-inset data-invalid:ring-destructive data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5', local.class);
|
|
100
103
|
}
|
|
101
|
-
}, others
|
|
104
|
+
}, others, {
|
|
105
|
+
"data-slot": "slider-track"
|
|
106
|
+
}));
|
|
102
107
|
}
|
|
103
108
|
function SliderRange(props) {
|
|
104
109
|
const [local, others] = splitProps(props, [
|
|
105
110
|
'class'
|
|
106
111
|
]);
|
|
107
112
|
return createComponent(Slider.Range, mergeProps({
|
|
108
|
-
"data-slot": "slider-range",
|
|
109
113
|
get ["class"] () {
|
|
110
114
|
return cn('h-full rounded-[inherit] bg-primary data-invalid:bg-destructive data-[orientation=vertical]:w-full', local.class);
|
|
111
115
|
}
|
|
112
|
-
}, others
|
|
116
|
+
}, others, {
|
|
117
|
+
"data-slot": "slider-range"
|
|
118
|
+
}));
|
|
113
119
|
}
|
|
114
120
|
function SliderThumb(props) {
|
|
115
121
|
const [local, others] = splitProps(props, [
|
|
@@ -121,11 +127,11 @@ function SliderThumb(props) {
|
|
|
121
127
|
get asChild () {
|
|
122
128
|
return local.asChild;
|
|
123
129
|
},
|
|
124
|
-
"data-slot": "slider-thumb",
|
|
125
130
|
get ["class"] () {
|
|
126
131
|
return cn('box-border flex size-4 shrink-0 items-center justify-center rounded-full border border-border bg-background shadow-sm outline-0 transition-[border-color,background-color,box-shadow] duration-200 ease-in-out select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring data-disabled:pointer-events-none data-dragging:border-ring data-dragging:shadow-md data-dragging:ring-1 data-dragging:ring-ring data-invalid:border-destructive data-invalid:focus-visible:ring-destructive motion-reduce:transition-none', local.class);
|
|
127
132
|
}
|
|
128
133
|
}, others, {
|
|
134
|
+
"data-slot": "slider-thumb",
|
|
129
135
|
get children () {
|
|
130
136
|
return local.children;
|
|
131
137
|
}
|
|
@@ -153,33 +159,36 @@ function SliderMarkerGroup(props) {
|
|
|
153
159
|
'class'
|
|
154
160
|
]);
|
|
155
161
|
return createComponent(Slider.MarkerGroup, mergeProps({
|
|
156
|
-
"data-slot": "slider-marker-group",
|
|
157
162
|
get ["class"] () {
|
|
158
163
|
return cn('mt-2 flex justify-between group-data-[orientation=vertical]:m-0 group-data-[orientation=vertical]:h-full group-data-[orientation=vertical]:flex-col group-data-[orientation=vertical]:[grid-area:markers]', local.class);
|
|
159
164
|
}
|
|
160
|
-
}, others
|
|
165
|
+
}, others, {
|
|
166
|
+
"data-slot": "slider-marker-group"
|
|
167
|
+
}));
|
|
161
168
|
}
|
|
162
169
|
function SliderMarker(props) {
|
|
163
170
|
const [local, others] = splitProps(props, [
|
|
164
171
|
'class'
|
|
165
172
|
]);
|
|
166
173
|
return createComponent(Slider.Marker, mergeProps({
|
|
167
|
-
"data-slot": "slider-marker",
|
|
168
174
|
get ["class"] () {
|
|
169
175
|
return cn("relative text-xs leading-4 text-muted-foreground before:absolute before:start-1/2 before:-top-2 before:size-1 before:-translate-x-1/2 before:rounded-full before:bg-border before:content-[''] data-[orientation=vertical]:before:-start-2 data-[orientation=vertical]:before:top-1/2 data-[orientation=vertical]:before:-translate-y-1/2 data-[state=at-value]:before:bg-primary group-data-invalid:data-[state=at-value]:before:bg-destructive data-[state=under-value]:before:bg-primary group-data-invalid:data-[state=under-value]:before:bg-destructive", local.class);
|
|
170
176
|
}
|
|
171
|
-
}, others
|
|
177
|
+
}, others, {
|
|
178
|
+
"data-slot": "slider-marker"
|
|
179
|
+
}));
|
|
172
180
|
}
|
|
173
181
|
function SliderDraggingIndicator(props) {
|
|
174
182
|
const [local, others] = splitProps(props, [
|
|
175
183
|
'class'
|
|
176
184
|
]);
|
|
177
185
|
return createComponent(Slider.DraggingIndicator, mergeProps({
|
|
178
|
-
"data-slot": "slider-dragging-indicator",
|
|
179
186
|
get ["class"] () {
|
|
180
187
|
return cn('pointer-events-none -top-8 rounded-sm bg-foreground px-2 py-1 text-xs leading-none font-medium whitespace-nowrap text-background', local.class);
|
|
181
188
|
}
|
|
182
|
-
}, others
|
|
189
|
+
}, others, {
|
|
190
|
+
"data-slot": "slider-dragging-indicator"
|
|
191
|
+
}));
|
|
183
192
|
}
|
|
184
193
|
const Slider_Slider = Object.assign(SliderRoot, {
|
|
185
194
|
Root: SliderRoot,
|
|
@@ -10,7 +10,7 @@ function SliderRoot(props) {
|
|
|
10
10
|
'readOnly',
|
|
11
11
|
'value'
|
|
12
12
|
]);
|
|
13
|
-
return <Slider.Root asChild={local.asChild} defaultValue={local.defaultValue} value={local.value} data-
|
|
13
|
+
return <Slider.Root asChild={local.asChild} defaultValue={local.defaultValue} value={local.value} data-readonly={local.readOnly ? '' : void 0} class={cn("group flex w-48 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50 data-[orientation=vertical]:grid data-[orientation=vertical]:h-48 data-[orientation=vertical]:w-max data-[orientation=vertical]:grid-cols-[auto_max-content] data-[orientation=vertical]:grid-rows-[auto_minmax(0,1fr)] data-[orientation=vertical]:items-center data-[orientation=vertical]:gap-x-2 data-[orientation=vertical]:[grid-template-areas:'label_value'_'control_markers']", local.class)} readOnly={local.readOnly} {...others} data-slot="slider-root">
|
|
14
14
|
{local.children}
|
|
15
15
|
</Slider.Root>;
|
|
16
16
|
}
|
|
@@ -20,37 +20,37 @@ function SliderRootProvider(props) {
|
|
|
20
20
|
'class',
|
|
21
21
|
'value'
|
|
22
22
|
]);
|
|
23
|
-
return <Slider.RootProvider asChild={local.asChild} value={local.value}
|
|
23
|
+
return <Slider.RootProvider asChild={local.asChild} value={local.value} class={cn("group flex w-48 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50 data-[orientation=vertical]:grid data-[orientation=vertical]:h-48 data-[orientation=vertical]:w-max data-[orientation=vertical]:grid-cols-[auto_max-content] data-[orientation=vertical]:grid-rows-[auto_minmax(0,1fr)] data-[orientation=vertical]:items-center data-[orientation=vertical]:gap-x-2 data-[orientation=vertical]:[grid-template-areas:'label_value'_'control_markers']", local.class)} {...others} data-slot="slider-root-provider"/>;
|
|
24
24
|
}
|
|
25
25
|
function SliderLabel(props) {
|
|
26
26
|
const [local, others] = splitProps(props, [
|
|
27
27
|
'class'
|
|
28
28
|
]);
|
|
29
|
-
return <Slider.Label
|
|
29
|
+
return <Slider.Label class={cn('text-sm leading-5 font-normal text-foreground select-none group-data-[orientation=vertical]:[grid-area:label]', local.class)} {...others} data-slot="slider-label"/>;
|
|
30
30
|
}
|
|
31
31
|
function SliderValueText(props) {
|
|
32
32
|
const [local, others] = splitProps(props, [
|
|
33
33
|
'class'
|
|
34
34
|
]);
|
|
35
|
-
return <Slider.ValueText
|
|
35
|
+
return <Slider.ValueText class={cn('text-right text-sm leading-5 font-normal text-foreground group-data-[orientation=vertical]:justify-self-end group-data-[orientation=vertical]:[grid-area:value]', local.class)} {...others} data-slot="slider-value-text"/>;
|
|
36
36
|
}
|
|
37
37
|
function SliderControl(props) {
|
|
38
38
|
const [local, others] = splitProps(props, [
|
|
39
39
|
'class'
|
|
40
40
|
]);
|
|
41
|
-
return <Slider.Control
|
|
41
|
+
return <Slider.Control class={cn('relative flex min-h-5 w-full cursor-pointer touch-none items-center select-none group-data-readonly:cursor-default group-data-[orientation=vertical]:[grid-area:control] data-disabled:cursor-default data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-0 data-[orientation=vertical]:w-5 data-[orientation=vertical]:flex-col', local.class)} {...others} data-slot="slider-control"/>;
|
|
42
42
|
}
|
|
43
43
|
function SliderTrack(props) {
|
|
44
44
|
const [local, others] = splitProps(props, [
|
|
45
45
|
'class'
|
|
46
46
|
]);
|
|
47
|
-
return <Slider.Track
|
|
47
|
+
return <Slider.Track class={cn('h-1.5 w-full flex-1 overflow-hidden rounded-full bg-muted ring-1 ring-border select-none ring-inset data-invalid:ring-destructive data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5', local.class)} {...others} data-slot="slider-track"/>;
|
|
48
48
|
}
|
|
49
49
|
function SliderRange(props) {
|
|
50
50
|
const [local, others] = splitProps(props, [
|
|
51
51
|
'class'
|
|
52
52
|
]);
|
|
53
|
-
return <Slider.Range
|
|
53
|
+
return <Slider.Range class={cn('h-full rounded-[inherit] bg-primary data-invalid:bg-destructive data-[orientation=vertical]:w-full', local.class)} {...others} data-slot="slider-range"/>;
|
|
54
54
|
}
|
|
55
55
|
function SliderThumb(props) {
|
|
56
56
|
const [local, others] = splitProps(props, [
|
|
@@ -58,7 +58,7 @@ function SliderThumb(props) {
|
|
|
58
58
|
'children',
|
|
59
59
|
'class'
|
|
60
60
|
]);
|
|
61
|
-
return <Slider.Thumb asChild={local.asChild}
|
|
61
|
+
return <Slider.Thumb asChild={local.asChild} class={cn('box-border flex size-4 shrink-0 items-center justify-center rounded-full border border-border bg-background shadow-sm outline-0 transition-[border-color,background-color,box-shadow] duration-200 ease-in-out select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring data-disabled:pointer-events-none data-dragging:border-ring data-dragging:shadow-md data-dragging:ring-1 data-dragging:ring-ring data-invalid:border-destructive data-invalid:focus-visible:ring-destructive motion-reduce:transition-none', local.class)} {...others} data-slot="slider-thumb">
|
|
62
62
|
{local.children}
|
|
63
63
|
</Slider.Thumb>;
|
|
64
64
|
}
|
|
@@ -74,19 +74,19 @@ function SliderMarkerGroup(props) {
|
|
|
74
74
|
const [local, others] = splitProps(props, [
|
|
75
75
|
'class'
|
|
76
76
|
]);
|
|
77
|
-
return <Slider.MarkerGroup
|
|
77
|
+
return <Slider.MarkerGroup class={cn('mt-2 flex justify-between group-data-[orientation=vertical]:m-0 group-data-[orientation=vertical]:h-full group-data-[orientation=vertical]:flex-col group-data-[orientation=vertical]:[grid-area:markers]', local.class)} {...others} data-slot="slider-marker-group"/>;
|
|
78
78
|
}
|
|
79
79
|
function SliderMarker(props) {
|
|
80
80
|
const [local, others] = splitProps(props, [
|
|
81
81
|
'class'
|
|
82
82
|
]);
|
|
83
|
-
return <Slider.Marker
|
|
83
|
+
return <Slider.Marker class={cn("relative text-xs leading-4 text-muted-foreground before:absolute before:start-1/2 before:-top-2 before:size-1 before:-translate-x-1/2 before:rounded-full before:bg-border before:content-[''] data-[orientation=vertical]:before:-start-2 data-[orientation=vertical]:before:top-1/2 data-[orientation=vertical]:before:-translate-y-1/2 data-[state=at-value]:before:bg-primary group-data-invalid:data-[state=at-value]:before:bg-destructive data-[state=under-value]:before:bg-primary group-data-invalid:data-[state=under-value]:before:bg-destructive", local.class)} {...others} data-slot="slider-marker"/>;
|
|
84
84
|
}
|
|
85
85
|
function SliderDraggingIndicator(props) {
|
|
86
86
|
const [local, others] = splitProps(props, [
|
|
87
87
|
'class'
|
|
88
88
|
]);
|
|
89
|
-
return <Slider.DraggingIndicator
|
|
89
|
+
return <Slider.DraggingIndicator class={cn('pointer-events-none -top-8 rounded-sm bg-foreground px-2 py-1 text-xs leading-none font-medium whitespace-nowrap text-background', local.class)} {...others} data-slot="slider-dragging-indicator"/>;
|
|
90
90
|
}
|
|
91
91
|
const Slider_Slider = Object.assign(SliderRoot, {
|
|
92
92
|
Root: SliderRoot,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Menu as MenuPrimitive } from '@ark-ui/solid/menu';
|
|
1
2
|
import type { ComponentProps, JSX } from 'solid-js';
|
|
2
3
|
import { Button } from '../button/index.js';
|
|
3
4
|
import { Menu } from '../menu/index.js';
|
|
@@ -17,14 +18,14 @@ type SplitButtonActionProps = Omit<ButtonProps, 'size' | 'variant'> & {
|
|
|
17
18
|
size?: SplitButtonSize;
|
|
18
19
|
variant?: SplitButtonVariant;
|
|
19
20
|
};
|
|
20
|
-
type SplitButtonTriggerProps = Omit<ComponentProps<typeof
|
|
21
|
+
type SplitButtonTriggerProps = Omit<ComponentProps<typeof MenuPrimitive.Trigger>, 'asChild' | 'children' | 'class'> & {
|
|
21
22
|
children?: JSX.Element;
|
|
22
23
|
class?: string;
|
|
23
24
|
size?: SplitButtonSize;
|
|
24
25
|
variant?: SplitButtonVariant;
|
|
25
26
|
};
|
|
26
|
-
type SplitButtonContentProps = ComponentProps<typeof
|
|
27
|
-
type SplitButtonPositionerProps = ComponentProps<typeof
|
|
27
|
+
type SplitButtonContentProps = ComponentProps<typeof MenuPrimitive.Content>;
|
|
28
|
+
type SplitButtonPositionerProps = ComponentProps<typeof MenuPrimitive.Positioner>;
|
|
28
29
|
declare function SplitButtonRoot(props: SplitButtonRootProps): JSX.Element;
|
|
29
30
|
declare function SplitButtonAction(props: SplitButtonActionProps): JSX.Element;
|
|
30
31
|
declare function SplitButtonTrigger(props: SplitButtonTriggerProps): JSX.Element;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { className, createComponent, effect, insert, memo, mergeProps, setAttribute, template, use } from "solid-js/web";
|
|
2
|
+
import { useFocusVisible } from "@ark-ui/solid";
|
|
3
|
+
import { Menu } from "@ark-ui/solid/menu";
|
|
2
4
|
import { cva } from "class-variance-authority";
|
|
3
5
|
import { children, createContext, splitProps, useContext } from "solid-js";
|
|
4
6
|
import { cn } from "../../internal/cn.js";
|
|
5
7
|
import { ChevronDownIcon } from "../../internal/icons/ui/index.js";
|
|
8
|
+
import { OverlayPortal } from "../../internal/overlayPortal.js";
|
|
6
9
|
import { Button } from "../button/index.js";
|
|
7
|
-
import { Menu } from "../menu/index.js";
|
|
10
|
+
import { Menu as index_js_Menu } from "../menu/index.js";
|
|
8
11
|
var _tmpl$ = /*#__PURE__*/ template("<div role=group data-scope=split-button data-part=root data-slot=split-button-root>");
|
|
9
12
|
const splitButtonTriggerVariants = cva("relative min-w-0 -ms-px rounded-s-none before:pointer-events-none before:absolute before:inset-y-1.5 before:start-0 before:w-px before:bg-current before:opacity-[0.16] before:content-['']", {
|
|
10
13
|
variants: {
|
|
@@ -53,7 +56,7 @@ function SplitButtonRoot(props) {
|
|
|
53
56
|
variant: ()=>local.variant ?? 'default'
|
|
54
57
|
},
|
|
55
58
|
get children () {
|
|
56
|
-
return createComponent(
|
|
59
|
+
return createComponent(index_js_Menu.Root, mergeProps({
|
|
57
60
|
get onSelect () {
|
|
58
61
|
return local.onSelect;
|
|
59
62
|
},
|
|
@@ -116,6 +119,7 @@ function SplitButtonTrigger(props) {
|
|
|
116
119
|
'aria-label'
|
|
117
120
|
]);
|
|
118
121
|
const context = useSplitButtonContext('SplitButton.Trigger');
|
|
122
|
+
const focusVisible = useFocusVisible();
|
|
119
123
|
const resolvedChildren = children(()=>local.children);
|
|
120
124
|
const resolvedSize = ()=>local.size ?? context.size();
|
|
121
125
|
const resolvedVariant = ()=>local.variant ?? context.variant();
|
|
@@ -150,6 +154,9 @@ function SplitButtonTrigger(props) {
|
|
|
150
154
|
},
|
|
151
155
|
get ["class"] () {
|
|
152
156
|
return triggerClass();
|
|
157
|
+
},
|
|
158
|
+
get ["data-focus-visible"] () {
|
|
159
|
+
return focusVisible() ? '' : void 0;
|
|
153
160
|
}
|
|
154
161
|
}));
|
|
155
162
|
}
|
|
@@ -157,12 +164,16 @@ function SplitButtonPositioner(props) {
|
|
|
157
164
|
const [local, others] = splitProps(props, [
|
|
158
165
|
'class'
|
|
159
166
|
]);
|
|
160
|
-
return createComponent(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
167
|
+
return createComponent(OverlayPortal, {
|
|
168
|
+
get children () {
|
|
169
|
+
return createComponent(Menu.Positioner, mergeProps(others, {
|
|
170
|
+
"data-slot": "split-button-positioner",
|
|
171
|
+
get ["class"] () {
|
|
172
|
+
return cn('z-[var(--z-index)] w-[var(--positioner-width,auto)] max-w-[var(--available-width)] outline-0', local.class);
|
|
173
|
+
}
|
|
174
|
+
}));
|
|
164
175
|
}
|
|
165
|
-
})
|
|
176
|
+
});
|
|
166
177
|
}
|
|
167
178
|
function SplitButtonContent(props) {
|
|
168
179
|
const [local, others] = splitProps(props, [
|
|
@@ -176,10 +187,10 @@ function SplitButtonContent(props) {
|
|
|
176
187
|
},
|
|
177
188
|
"data-slot": "split-button-content",
|
|
178
189
|
get ["class"] () {
|
|
179
|
-
return local.class;
|
|
190
|
+
return cn('relative z-[calc(var(--moduix-z-popup)+var(--layer-index,0))] flex max-w-[min(20rem,var(--available-width,100vw))] min-w-[min(max(var(--reference-width,0px),12rem),var(--available-width,100vw))] origin-[var(--transform-origin)] flex-col overflow-visible rounded-md bg-popover py-1 text-popover-foreground shadow-lg outline-1 outline-border [--arrow-background:var(--color-popover)] [--arrow-size:0.625rem] data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]', local.class);
|
|
180
191
|
},
|
|
181
192
|
get children () {
|
|
182
|
-
return memo(()=>!!local.asChild)() ? local.children : createComponent(
|
|
193
|
+
return memo(()=>!!local.asChild)() ? local.children : createComponent(index_js_Menu.Viewport, {
|
|
183
194
|
get children () {
|
|
184
195
|
return local.children;
|
|
185
196
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { useFocusVisible } from "@ark-ui/solid";
|
|
2
|
+
import { Menu } from "@ark-ui/solid/menu";
|
|
1
3
|
import { cva } from "class-variance-authority";
|
|
2
4
|
import { children, createContext, splitProps, useContext } from "solid-js";
|
|
3
5
|
import { cn } from "../../internal/cn.jsx";
|
|
4
6
|
import { ChevronDownIcon } from "../../internal/icons/ui/index.jsx";
|
|
7
|
+
import { OverlayPortal } from "../../internal/overlayPortal.jsx";
|
|
5
8
|
import { Button } from "../button/index.jsx";
|
|
6
|
-
import { Menu } from "../menu/index.jsx";
|
|
9
|
+
import { Menu as index_jsx_Menu } from "../menu/index.jsx";
|
|
7
10
|
const splitButtonTriggerVariants = cva("relative min-w-0 -ms-px rounded-s-none before:pointer-events-none before:absolute before:inset-y-1.5 before:start-0 before:w-px before:bg-current before:opacity-[0.16] before:content-['']", {
|
|
8
11
|
variants: {
|
|
9
12
|
size: {
|
|
@@ -49,7 +52,7 @@ function SplitButtonRoot(props) {
|
|
|
49
52
|
size: ()=>local.size ?? 'md',
|
|
50
53
|
variant: ()=>local.variant ?? 'default'
|
|
51
54
|
}}>
|
|
52
|
-
<
|
|
55
|
+
<index_jsx_Menu.Root onSelect={local.onSelect} positioning={{
|
|
53
56
|
placement: 'bottom-end',
|
|
54
57
|
gutter: 4,
|
|
55
58
|
...local.positioning
|
|
@@ -57,7 +60,7 @@ function SplitButtonRoot(props) {
|
|
|
57
60
|
<div role="group" aria-label={local['aria-label']} aria-labelledby={local['aria-labelledby']} data-scope="split-button" data-part="root" data-slot="split-button-root" class={cn('inline-flex items-stretch', local.class)} ref={local.ref}>
|
|
58
61
|
{local.children}
|
|
59
62
|
</div>
|
|
60
|
-
</
|
|
63
|
+
</index_jsx_Menu.Root>
|
|
61
64
|
</SplitButtonContext.Provider>;
|
|
62
65
|
}
|
|
63
66
|
function SplitButtonAction(props) {
|
|
@@ -78,6 +81,7 @@ function SplitButtonTrigger(props) {
|
|
|
78
81
|
'aria-label'
|
|
79
82
|
]);
|
|
80
83
|
const context = useSplitButtonContext('SplitButton.Trigger');
|
|
84
|
+
const focusVisible = useFocusVisible();
|
|
81
85
|
const resolvedChildren = children(()=>local.children);
|
|
82
86
|
const resolvedSize = ()=>local.size ?? context.size();
|
|
83
87
|
const resolvedVariant = ()=>local.variant ?? context.variant();
|
|
@@ -89,13 +93,15 @@ function SplitButtonTrigger(props) {
|
|
|
89
93
|
}), local.class);
|
|
90
94
|
return <Menu.Trigger {...others} asChild={(triggerProps)=><Button {...triggerProps()} data-slot="split-button-trigger" size={resolvedSize()} variant={resolvedVariant()} class={triggerClass()} aria-label={ariaLabel()}>
|
|
91
95
|
{resolvedChildren() ?? <ChevronDownIcon/>}
|
|
92
|
-
</Button>} data-slot="split-button-trigger" aria-label={ariaLabel()} class={triggerClass()}/>;
|
|
96
|
+
</Button>} data-slot="split-button-trigger" aria-label={ariaLabel()} class={triggerClass()} data-focus-visible={focusVisible() ? '' : void 0}/>;
|
|
93
97
|
}
|
|
94
98
|
function SplitButtonPositioner(props) {
|
|
95
99
|
const [local, others] = splitProps(props, [
|
|
96
100
|
'class'
|
|
97
101
|
]);
|
|
98
|
-
return <
|
|
102
|
+
return <OverlayPortal>
|
|
103
|
+
<Menu.Positioner {...others} data-slot="split-button-positioner" class={cn('z-[var(--z-index)] w-[var(--positioner-width,auto)] max-w-[var(--available-width)] outline-0', local.class)}/>
|
|
104
|
+
</OverlayPortal>;
|
|
99
105
|
}
|
|
100
106
|
function SplitButtonContent(props) {
|
|
101
107
|
const [local, others] = splitProps(props, [
|
|
@@ -103,8 +109,8 @@ function SplitButtonContent(props) {
|
|
|
103
109
|
'children',
|
|
104
110
|
'class'
|
|
105
111
|
]);
|
|
106
|
-
return <Menu.Content {...others} asChild={local.asChild} data-slot="split-button-content" class={local.class}>
|
|
107
|
-
{local.asChild ? local.children : <
|
|
112
|
+
return <Menu.Content {...others} asChild={local.asChild} data-slot="split-button-content" class={cn('relative z-[calc(var(--moduix-z-popup)+var(--layer-index,0))] flex max-w-[min(20rem,var(--available-width,100vw))] min-w-[min(max(var(--reference-width,0px),12rem),var(--available-width,100vw))] origin-[var(--transform-origin)] flex-col overflow-visible rounded-md bg-popover py-1 text-popover-foreground shadow-lg outline-1 outline-border [--arrow-background:var(--color-popover)] [--arrow-size:0.625rem] data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]', local.class)}>
|
|
113
|
+
{local.asChild ? local.children : <index_jsx_Menu.Viewport>{local.children}</index_jsx_Menu.Viewport>}
|
|
108
114
|
</Menu.Content>;
|
|
109
115
|
}
|
|
110
116
|
const SplitButton = Object.assign(SplitButtonRoot, {
|