@moduix/solid-tailwind 1.1.1 → 2.0.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 +2 -2
- package/dist/components/accordion/Accordion.jsx +1 -1
- package/dist/components/alert/Alert.js +15 -15
- package/dist/components/alert/Alert.jsx +7 -7
- package/dist/components/angle-slider/AngleSlider.js +15 -8
- package/dist/components/angle-slider/AngleSlider.jsx +13 -6
- package/dist/components/avatar/Avatar.js +3 -3
- package/dist/components/avatar/Avatar.jsx +2 -2
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +4 -4
- package/dist/components/breadcrumbs/Breadcrumbs.js +34 -29
- package/dist/components/breadcrumbs/Breadcrumbs.jsx +12 -11
- package/dist/components/carousel/Carousel.js +3 -3
- package/dist/components/carousel/Carousel.jsx +3 -3
- package/dist/components/drawer/Drawer.js +3 -3
- package/dist/components/drawer/Drawer.jsx +1 -1
- package/dist/components/highlight/Highlight.js +1 -1
- package/dist/components/highlight/Highlight.jsx +1 -1
- package/dist/components/image-cropper/ImageCropper.d.ts +1 -1
- package/dist/components/json-tree-view/JsonTreeView.js +3 -2
- package/dist/components/json-tree-view/JsonTreeView.jsx +3 -2
- package/dist/components/menu/Menu.d.ts +3 -1
- package/dist/components/menu/Menu.js +18 -25
- package/dist/components/menu/Menu.jsx +14 -15
- package/dist/components/native-select/NativeSelect.d.ts +0 -1
- package/dist/components/native-select/NativeSelect.js +2 -7
- package/dist/components/native-select/NativeSelect.jsx +2 -4
- package/dist/components/navigation-menu/NavigationMenu.d.ts +1 -0
- package/dist/components/navigation-menu/NavigationMenu.js +2 -1
- package/dist/components/navigation-menu/NavigationMenu.jsx +2 -1
- package/dist/components/number-input/NumberInput.js +3 -3
- package/dist/components/number-input/NumberInput.jsx +3 -3
- package/dist/components/pagination/Pagination.js +6 -6
- package/dist/components/pagination/Pagination.jsx +6 -6
- package/dist/components/password-input/PasswordInput.js +6 -15
- package/dist/components/password-input/PasswordInput.jsx +5 -13
- package/dist/components/pin-input/PinInput.js +2 -2
- package/dist/components/pin-input/PinInput.jsx +2 -2
- package/dist/components/popover/Popover.js +6 -6
- package/dist/components/popover/Popover.jsx +6 -6
- package/dist/components/progress-circular/ProgressCircular.js +3 -3
- package/dist/components/progress-circular/ProgressCircular.jsx +3 -3
- package/dist/components/qr-code/QrCode.js +1 -1
- package/dist/components/qr-code/QrCode.jsx +1 -1
- package/dist/components/radio-group/RadioGroup.d.ts +2 -2
- package/dist/components/radio-group/RadioGroup.js +1 -1
- package/dist/components/radio-group/RadioGroup.jsx +1 -1
- package/dist/components/rating-group/RatingGroup.js +11 -11
- package/dist/components/rating-group/RatingGroup.jsx +4 -4
- package/dist/components/scroll-area/ScrollArea.d.ts +1 -1
- package/dist/components/scroll-area/ScrollArea.js +2 -2
- package/dist/components/scroll-area/ScrollArea.jsx +2 -2
- package/dist/components/segment-group/SegmentGroup.d.ts +1 -1
- package/dist/components/segment-group/SegmentGroup.js +2 -1
- package/dist/components/segment-group/SegmentGroup.jsx +2 -1
- package/dist/components/select/Select.js +6 -6
- package/dist/components/select/Select.jsx +7 -8
- package/dist/components/separator/Separator.js +1 -1
- package/dist/components/separator/Separator.jsx +1 -1
- package/dist/components/sidebar/Sidebar.js +50 -56
- package/dist/components/sidebar/Sidebar.jsx +25 -27
- package/dist/components/signature-pad/SignaturePad.d.ts +1 -1
- package/dist/components/signature-pad/SignaturePad.js +1 -1
- package/dist/components/signature-pad/SignaturePad.jsx +1 -1
- package/dist/components/slider/Slider.js +5 -5
- package/dist/components/slider/Slider.jsx +3 -3
- package/dist/components/split-button/SplitButton.js +12 -11
- package/dist/components/split-button/SplitButton.jsx +10 -10
- package/dist/components/splitter/Splitter.js +2 -2
- package/dist/components/splitter/Splitter.jsx +2 -2
- package/dist/components/steps/Steps.js +2 -2
- package/dist/components/steps/Steps.jsx +2 -2
- package/dist/components/swap/Swap.js +9 -9
- package/dist/components/swap/Swap.jsx +3 -3
- package/dist/components/switch/Switch.js +7 -7
- package/dist/components/switch/Switch.jsx +3 -3
- package/dist/components/table/Table.js +3 -3
- package/dist/components/table/Table.jsx +3 -3
- package/dist/components/tabs/Tabs.js +7 -7
- package/dist/components/tabs/Tabs.jsx +3 -3
- package/dist/components/tag/Tag.js +1 -1
- package/dist/components/tag/Tag.jsx +1 -1
- package/dist/components/tags-input/TagsInput.js +3 -3
- package/dist/components/tags-input/TagsInput.jsx +3 -3
- package/dist/components/text/Text.js +1 -1
- package/dist/components/text/Text.jsx +1 -1
- package/dist/components/timer/Timer.js +1 -1
- package/dist/components/timer/Timer.jsx +1 -1
- package/dist/components/toast/Toast.js +2 -2
- package/dist/components/toast/Toast.jsx +2 -2
- package/dist/components/toc/Toc.d.ts +2 -2
- package/dist/components/toc/Toc.js +5 -6
- package/dist/components/toc/Toc.jsx +5 -6
- package/dist/components/toggle/Toggle.d.ts +5 -1
- package/dist/components/toggle/Toggle.js +2 -2
- package/dist/components/toggle/Toggle.jsx +2 -2
- package/dist/components/toggle-group/ToggleGroup.d.ts +1 -2
- package/dist/components/toggle-group/ToggleGroup.js +4 -25
- package/dist/components/toggle-group/ToggleGroup.jsx +4 -25
- package/dist/components/tooltip/Tooltip.js +2 -2
- package/dist/components/tooltip/Tooltip.jsx +2 -2
- package/dist/components/tour/Tour.js +1 -1
- package/dist/components/tour/Tour.jsx +1 -1
- package/dist/components/tree-view/TreeView.js +4 -2
- package/dist/components/tree-view/TreeView.jsx +4 -2
- package/dist/components/typeset/Typeset_module.css +6 -4
- package/dist/styles/animations.css +10 -0
- package/dist/styles/style.css +2 -0
- package/package.json +1 -1
|
@@ -21,9 +21,6 @@ function SliderRoot(props) {
|
|
|
21
21
|
get value () {
|
|
22
22
|
return local.value;
|
|
23
23
|
},
|
|
24
|
-
get ["data-readonly"] () {
|
|
25
|
-
return local.readOnly ? '' : void 0;
|
|
26
|
-
},
|
|
27
24
|
get ["class"] () {
|
|
28
25
|
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);
|
|
29
26
|
},
|
|
@@ -31,6 +28,9 @@ function SliderRoot(props) {
|
|
|
31
28
|
return local.readOnly;
|
|
32
29
|
}
|
|
33
30
|
}, others, {
|
|
31
|
+
get ["data-readonly"] () {
|
|
32
|
+
return local.readOnly ? '' : void 0;
|
|
33
|
+
},
|
|
34
34
|
"data-slot": "slider-root",
|
|
35
35
|
get children () {
|
|
36
36
|
return local.children;
|
|
@@ -160,7 +160,7 @@ function SliderMarkerGroup(props) {
|
|
|
160
160
|
]);
|
|
161
161
|
return createComponent(Slider.MarkerGroup, mergeProps({
|
|
162
162
|
get ["class"] () {
|
|
163
|
-
return cn('mt-2
|
|
163
|
+
return cn('mt-2 group-data-[orientation=vertical]:m-0 group-data-[orientation=vertical]:h-full group-data-[orientation=vertical]:[grid-area:markers]', local.class);
|
|
164
164
|
}
|
|
165
165
|
}, others, {
|
|
166
166
|
"data-slot": "slider-marker-group"
|
|
@@ -172,7 +172,7 @@ function SliderMarker(props) {
|
|
|
172
172
|
]);
|
|
173
173
|
return createComponent(Slider.Marker, mergeProps({
|
|
174
174
|
get ["class"] () {
|
|
175
|
-
return cn("
|
|
175
|
+
return cn("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);
|
|
176
176
|
}
|
|
177
177
|
}, others, {
|
|
178
178
|
"data-slot": "slider-marker"
|
|
@@ -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}
|
|
13
|
+
return <Slider.Root asChild={local.asChild} defaultValue={local.defaultValue} 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)} readOnly={local.readOnly} {...others} data-readonly={local.readOnly ? '' : void 0} data-slot="slider-root">
|
|
14
14
|
{local.children}
|
|
15
15
|
</Slider.Root>;
|
|
16
16
|
}
|
|
@@ -74,13 +74,13 @@ function SliderMarkerGroup(props) {
|
|
|
74
74
|
const [local, others] = splitProps(props, [
|
|
75
75
|
'class'
|
|
76
76
|
]);
|
|
77
|
-
return <Slider.MarkerGroup class={cn('mt-2
|
|
77
|
+
return <Slider.MarkerGroup class={cn('mt-2 group-data-[orientation=vertical]:m-0 group-data-[orientation=vertical]:h-full 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 class={cn("
|
|
83
|
+
return <Slider.Marker class={cn("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, [
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { className, createComponent, effect, insert, memo, mergeProps, setAttribute, template, use } from "solid-js/web";
|
|
2
|
-
import { useFocusVisible } from "@ark-ui/solid";
|
|
3
2
|
import { Menu } from "@ark-ui/solid/menu";
|
|
4
3
|
import { cva } from "class-variance-authority";
|
|
5
4
|
import { children, createContext, splitProps, useContext } from "solid-js";
|
|
@@ -8,13 +7,14 @@ import { ChevronDownIcon } from "../../internal/icons/ui/index.js";
|
|
|
8
7
|
import { OverlayPortal } from "../../internal/overlayPortal.js";
|
|
9
8
|
import { Button } from "../button/index.js";
|
|
10
9
|
import { Menu as index_js_Menu } from "../menu/index.js";
|
|
10
|
+
import { menuContentVariants, menuPositionerVariants } from "../menu/Menu.js";
|
|
11
11
|
var _tmpl$ = /*#__PURE__*/ template("<div role=group data-scope=split-button data-part=root data-slot=split-button-root>");
|
|
12
|
-
const splitButtonTriggerVariants = cva("relative min-w-0 -ms-
|
|
12
|
+
const splitButtonTriggerVariants = cva("relative min-w-0 -ms-[calc(var(--moduix-button-border-width,var(--moduix-border-width-sm))*-1)] 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-['']", {
|
|
13
13
|
variants: {
|
|
14
14
|
size: {
|
|
15
15
|
xs: 'px-2',
|
|
16
16
|
sm: 'px-2.5',
|
|
17
|
-
md: 'px-
|
|
17
|
+
md: 'px-3',
|
|
18
18
|
lg: 'px-3.5',
|
|
19
19
|
xl: 'px-4'
|
|
20
20
|
},
|
|
@@ -112,14 +112,14 @@ function SplitButtonAction(props) {
|
|
|
112
112
|
}
|
|
113
113
|
function SplitButtonTrigger(props) {
|
|
114
114
|
const [local, others] = splitProps(props, [
|
|
115
|
+
'aria-label',
|
|
115
116
|
'children',
|
|
116
117
|
'class',
|
|
118
|
+
'ref',
|
|
117
119
|
'size',
|
|
118
|
-
'variant'
|
|
119
|
-
'aria-label'
|
|
120
|
+
'variant'
|
|
120
121
|
]);
|
|
121
122
|
const context = useSplitButtonContext('SplitButton.Trigger');
|
|
122
|
-
const focusVisible = useFocusVisible();
|
|
123
123
|
const resolvedChildren = children(()=>local.children);
|
|
124
124
|
const resolvedSize = ()=>local.size ?? context.size();
|
|
125
125
|
const resolvedVariant = ()=>local.variant ?? context.variant();
|
|
@@ -131,6 +131,10 @@ function SplitButtonTrigger(props) {
|
|
|
131
131
|
}), local.class);
|
|
132
132
|
return createComponent(Menu.Trigger, mergeProps(others, {
|
|
133
133
|
asChild: (triggerProps)=>createComponent(Button, mergeProps(triggerProps, {
|
|
134
|
+
ref (r$) {
|
|
135
|
+
var _ref$2 = local.ref;
|
|
136
|
+
"function" == typeof _ref$2 ? _ref$2(r$) : local.ref = r$;
|
|
137
|
+
},
|
|
134
138
|
"data-slot": "split-button-trigger",
|
|
135
139
|
get size () {
|
|
136
140
|
return resolvedSize();
|
|
@@ -154,9 +158,6 @@ function SplitButtonTrigger(props) {
|
|
|
154
158
|
},
|
|
155
159
|
get ["class"] () {
|
|
156
160
|
return triggerClass();
|
|
157
|
-
},
|
|
158
|
-
get ["data-focus-visible"] () {
|
|
159
|
-
return focusVisible() ? '' : void 0;
|
|
160
161
|
}
|
|
161
162
|
}));
|
|
162
163
|
}
|
|
@@ -169,7 +170,7 @@ function SplitButtonPositioner(props) {
|
|
|
169
170
|
return createComponent(Menu.Positioner, mergeProps(others, {
|
|
170
171
|
"data-slot": "split-button-positioner",
|
|
171
172
|
get ["class"] () {
|
|
172
|
-
return cn(
|
|
173
|
+
return cn(menuPositionerVariants(), local.class);
|
|
173
174
|
}
|
|
174
175
|
}));
|
|
175
176
|
}
|
|
@@ -187,7 +188,7 @@ function SplitButtonContent(props) {
|
|
|
187
188
|
},
|
|
188
189
|
"data-slot": "split-button-content",
|
|
189
190
|
get ["class"] () {
|
|
190
|
-
return cn(
|
|
191
|
+
return cn(menuContentVariants(), local.class);
|
|
191
192
|
},
|
|
192
193
|
get children () {
|
|
193
194
|
return memo(()=>!!local.asChild)() ? local.children : createComponent(index_js_Menu.Viewport, {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useFocusVisible } from "@ark-ui/solid";
|
|
2
1
|
import { Menu } from "@ark-ui/solid/menu";
|
|
3
2
|
import { cva } from "class-variance-authority";
|
|
4
3
|
import { children, createContext, splitProps, useContext } from "solid-js";
|
|
@@ -7,12 +6,13 @@ import { ChevronDownIcon } from "../../internal/icons/ui/index.jsx";
|
|
|
7
6
|
import { OverlayPortal } from "../../internal/overlayPortal.jsx";
|
|
8
7
|
import { Button } from "../button/index.jsx";
|
|
9
8
|
import { Menu as index_jsx_Menu } from "../menu/index.jsx";
|
|
10
|
-
|
|
9
|
+
import { menuContentVariants, menuPositionerVariants } from "../menu/Menu.jsx";
|
|
10
|
+
const splitButtonTriggerVariants = cva("relative min-w-0 -ms-[calc(var(--moduix-button-border-width,var(--moduix-border-width-sm))*-1)] 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-['']", {
|
|
11
11
|
variants: {
|
|
12
12
|
size: {
|
|
13
13
|
xs: 'px-2',
|
|
14
14
|
sm: 'px-2.5',
|
|
15
|
-
md: 'px-
|
|
15
|
+
md: 'px-3',
|
|
16
16
|
lg: 'px-3.5',
|
|
17
17
|
xl: 'px-4'
|
|
18
18
|
},
|
|
@@ -74,14 +74,14 @@ function SplitButtonAction(props) {
|
|
|
74
74
|
}
|
|
75
75
|
function SplitButtonTrigger(props) {
|
|
76
76
|
const [local, others] = splitProps(props, [
|
|
77
|
+
'aria-label',
|
|
77
78
|
'children',
|
|
78
79
|
'class',
|
|
80
|
+
'ref',
|
|
79
81
|
'size',
|
|
80
|
-
'variant'
|
|
81
|
-
'aria-label'
|
|
82
|
+
'variant'
|
|
82
83
|
]);
|
|
83
84
|
const context = useSplitButtonContext('SplitButton.Trigger');
|
|
84
|
-
const focusVisible = useFocusVisible();
|
|
85
85
|
const resolvedChildren = children(()=>local.children);
|
|
86
86
|
const resolvedSize = ()=>local.size ?? context.size();
|
|
87
87
|
const resolvedVariant = ()=>local.variant ?? context.variant();
|
|
@@ -91,16 +91,16 @@ function SplitButtonTrigger(props) {
|
|
|
91
91
|
size: resolvedSize(),
|
|
92
92
|
variant: resolvedVariant()
|
|
93
93
|
}), local.class);
|
|
94
|
-
return <Menu.Trigger {...others} asChild={(triggerProps)=><Button {...triggerProps()} data-slot="split-button-trigger" size={resolvedSize()} variant={resolvedVariant()} class={triggerClass()} aria-label={ariaLabel()}>
|
|
94
|
+
return <Menu.Trigger {...others} asChild={(triggerProps)=><Button {...triggerProps()} ref={local.ref} data-slot="split-button-trigger" size={resolvedSize()} variant={resolvedVariant()} class={triggerClass()} aria-label={ariaLabel()}>
|
|
95
95
|
{resolvedChildren() ?? <ChevronDownIcon/>}
|
|
96
|
-
</Button>} data-slot="split-button-trigger" aria-label={ariaLabel()} class={triggerClass()}
|
|
96
|
+
</Button>} data-slot="split-button-trigger" aria-label={ariaLabel()} class={triggerClass()}/>;
|
|
97
97
|
}
|
|
98
98
|
function SplitButtonPositioner(props) {
|
|
99
99
|
const [local, others] = splitProps(props, [
|
|
100
100
|
'class'
|
|
101
101
|
]);
|
|
102
102
|
return <OverlayPortal>
|
|
103
|
-
<Menu.Positioner {...others} data-slot="split-button-positioner" class={cn(
|
|
103
|
+
<Menu.Positioner {...others} data-slot="split-button-positioner" class={cn(menuPositionerVariants(), local.class)}/>
|
|
104
104
|
</OverlayPortal>;
|
|
105
105
|
}
|
|
106
106
|
function SplitButtonContent(props) {
|
|
@@ -109,7 +109,7 @@ function SplitButtonContent(props) {
|
|
|
109
109
|
'children',
|
|
110
110
|
'class'
|
|
111
111
|
]);
|
|
112
|
-
return <Menu.Content {...others} asChild={local.asChild} data-slot="split-button-content" class={cn(
|
|
112
|
+
return <Menu.Content {...others} asChild={local.asChild} data-slot="split-button-content" class={cn(menuContentVariants(), local.class)}>
|
|
113
113
|
{local.asChild ? local.children : <index_jsx_Menu.Viewport>{local.children}</index_jsx_Menu.Viewport>}
|
|
114
114
|
</Menu.Content>;
|
|
115
115
|
}
|
|
@@ -68,7 +68,7 @@ function SplitterResizeTriggerIndicator(props) {
|
|
|
68
68
|
]);
|
|
69
69
|
return createComponent(Splitter.ResizeTriggerIndicator, mergeProps({
|
|
70
70
|
get ["class"] () {
|
|
71
|
-
return cn('pointer-events-none absolute start-1/2 top-1/2 z-2 box-border h-control-xs w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full border border-border bg-background shadow-sm transition-[background-color,border-color,box-shadow,transform] duration-200 ease-in-out group-hover/trigger:border-muted-foreground/40 group-hover/trigger:shadow-md group-focus-visible/trigger:outline-2 group-focus-visible/trigger:outline-offset-1 group-focus-visible/trigger:outline-ring data-disabled:invisible data-dragging:scale-[1.08] data-dragging:bg-background data-dragging:shadow-md data-[orientation=vertical]:h-1.5 data-[orientation=vertical]:w-control-xs', local.class);
|
|
71
|
+
return cn('pointer-events-none absolute start-1/2 top-1/2 z-2 box-border h-control-xs w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full border border-border bg-background shadow-sm transition-[background-color,border-color,box-shadow,transform] duration-200 ease-in-out group-hover/trigger:border-muted-foreground/40 group-hover/trigger:shadow-md group-focus-visible/trigger:outline-2 group-focus-visible/trigger:outline-offset-1 group-focus-visible/trigger:outline-ring data-disabled:invisible data-dragging:scale-[1.08] data-dragging:bg-background data-dragging:shadow-md data-[orientation=vertical]:h-1.5 data-[orientation=vertical]:w-control-xs motion-reduce:transition-none', local.class);
|
|
72
72
|
}
|
|
73
73
|
}, others, {
|
|
74
74
|
"data-slot": "splitter-resize-trigger-indicator"
|
|
@@ -85,7 +85,7 @@ function SplitterResizeTrigger(props) {
|
|
|
85
85
|
return local.asChild;
|
|
86
86
|
},
|
|
87
87
|
get ["class"] () {
|
|
88
|
-
return cn("group/trigger relative z-1 box-border flex w-px min-w-px cursor-col-resize appearance-none items-center justify-center border-0 bg-transparent p-0 outline-0 transition-opacity duration-200 ease-in-out before:absolute before:h-full before:w-[0.5px] before:rounded-full before:bg-border before:transition-[background-color] before:duration-200 before:ease-in-out before:content-[''] after:absolute after:z-1 after:h-full after:w-2.5 after:content-[''] data-disabled:cursor-default data-disabled:opacity-50 data-dragging:before:bg-muted-foreground/40 data-[orientation=vertical]:h-px data-[orientation=vertical]:min-h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:min-w-0 data-[orientation=vertical]:cursor-row-resize data-[orientation=vertical]:before:h-[0.5px] data-[orientation=vertical]:before:w-full data-[orientation=vertical]:after:h-2.5 data-[orientation=vertical]:after:w-full [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:before:bg-muted-foreground/40", local.class);
|
|
88
|
+
return cn("group/trigger relative z-1 box-border flex w-px min-w-px cursor-col-resize appearance-none items-center justify-center border-0 bg-transparent p-0 outline-0 transition-opacity duration-200 ease-in-out before:absolute before:h-full before:w-[0.5px] before:rounded-full before:bg-border before:transition-[background-color] before:duration-200 before:ease-in-out before:content-[''] after:absolute after:z-1 after:h-full after:w-2.5 after:content-[''] data-disabled:cursor-default data-disabled:opacity-50 data-dragging:before:bg-muted-foreground/40 data-[orientation=vertical]:h-px data-[orientation=vertical]:min-h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:min-w-0 data-[orientation=vertical]:cursor-row-resize data-[orientation=vertical]:before:h-[0.5px] data-[orientation=vertical]:before:w-full data-[orientation=vertical]:after:h-2.5 data-[orientation=vertical]:after:w-full motion-reduce:transition-none motion-reduce:before:transition-none [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:before:bg-muted-foreground/40", local.class);
|
|
89
89
|
}
|
|
90
90
|
}, others, {
|
|
91
91
|
"data-slot": "splitter-resize-trigger",
|
|
@@ -35,7 +35,7 @@ function SplitterResizeTriggerIndicator(props) {
|
|
|
35
35
|
const [local, others] = splitProps(props, [
|
|
36
36
|
'class'
|
|
37
37
|
]);
|
|
38
|
-
return <Splitter.ResizeTriggerIndicator class={cn('pointer-events-none absolute start-1/2 top-1/2 z-2 box-border h-control-xs w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full border border-border bg-background shadow-sm transition-[background-color,border-color,box-shadow,transform] duration-200 ease-in-out group-hover/trigger:border-muted-foreground/40 group-hover/trigger:shadow-md group-focus-visible/trigger:outline-2 group-focus-visible/trigger:outline-offset-1 group-focus-visible/trigger:outline-ring data-disabled:invisible data-dragging:scale-[1.08] data-dragging:bg-background data-dragging:shadow-md data-[orientation=vertical]:h-1.5 data-[orientation=vertical]:w-control-xs', local.class)} {...others} data-slot="splitter-resize-trigger-indicator"/>;
|
|
38
|
+
return <Splitter.ResizeTriggerIndicator class={cn('pointer-events-none absolute start-1/2 top-1/2 z-2 box-border h-control-xs w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full border border-border bg-background shadow-sm transition-[background-color,border-color,box-shadow,transform] duration-200 ease-in-out group-hover/trigger:border-muted-foreground/40 group-hover/trigger:shadow-md group-focus-visible/trigger:outline-2 group-focus-visible/trigger:outline-offset-1 group-focus-visible/trigger:outline-ring data-disabled:invisible data-dragging:scale-[1.08] data-dragging:bg-background data-dragging:shadow-md data-[orientation=vertical]:h-1.5 data-[orientation=vertical]:w-control-xs motion-reduce:transition-none', local.class)} {...others} data-slot="splitter-resize-trigger-indicator"/>;
|
|
39
39
|
}
|
|
40
40
|
function SplitterResizeTrigger(props) {
|
|
41
41
|
const [local, others] = splitProps(props, [
|
|
@@ -43,7 +43,7 @@ function SplitterResizeTrigger(props) {
|
|
|
43
43
|
'children',
|
|
44
44
|
'class'
|
|
45
45
|
]);
|
|
46
|
-
return <Splitter.ResizeTrigger asChild={local.asChild} class={cn("group/trigger relative z-1 box-border flex w-px min-w-px cursor-col-resize appearance-none items-center justify-center border-0 bg-transparent p-0 outline-0 transition-opacity duration-200 ease-in-out before:absolute before:h-full before:w-[0.5px] before:rounded-full before:bg-border before:transition-[background-color] before:duration-200 before:ease-in-out before:content-[''] after:absolute after:z-1 after:h-full after:w-2.5 after:content-[''] data-disabled:cursor-default data-disabled:opacity-50 data-dragging:before:bg-muted-foreground/40 data-[orientation=vertical]:h-px data-[orientation=vertical]:min-h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:min-w-0 data-[orientation=vertical]:cursor-row-resize data-[orientation=vertical]:before:h-[0.5px] data-[orientation=vertical]:before:w-full data-[orientation=vertical]:after:h-2.5 data-[orientation=vertical]:after:w-full [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:before:bg-muted-foreground/40", local.class)} {...others} data-slot="splitter-resize-trigger">
|
|
46
|
+
return <Splitter.ResizeTrigger asChild={local.asChild} class={cn("group/trigger relative z-1 box-border flex w-px min-w-px cursor-col-resize appearance-none items-center justify-center border-0 bg-transparent p-0 outline-0 transition-opacity duration-200 ease-in-out before:absolute before:h-full before:w-[0.5px] before:rounded-full before:bg-border before:transition-[background-color] before:duration-200 before:ease-in-out before:content-[''] after:absolute after:z-1 after:h-full after:w-2.5 after:content-[''] data-disabled:cursor-default data-disabled:opacity-50 data-dragging:before:bg-muted-foreground/40 data-[orientation=vertical]:h-px data-[orientation=vertical]:min-h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:min-w-0 data-[orientation=vertical]:cursor-row-resize data-[orientation=vertical]:before:h-[0.5px] data-[orientation=vertical]:before:w-full data-[orientation=vertical]:after:h-2.5 data-[orientation=vertical]:after:w-full motion-reduce:transition-none motion-reduce:before:transition-none [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:before:bg-muted-foreground/40", local.class)} {...others} data-slot="splitter-resize-trigger">
|
|
47
47
|
{void 0 === local.children && !local.asChild ? <SplitterResizeTriggerIndicator/> : local.children}
|
|
48
48
|
</Splitter.ResizeTrigger>;
|
|
49
49
|
}
|
|
@@ -123,7 +123,7 @@ function StepsPrevTrigger(props) {
|
|
|
123
123
|
]);
|
|
124
124
|
return createComponent(Steps.PrevTrigger, mergeProps({
|
|
125
125
|
get ["class"] () {
|
|
126
|
-
return cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-3 py-1.5 text-sm leading-5 text-foreground transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50
|
|
126
|
+
return cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-3 py-1.5 text-sm leading-5 text-foreground transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50 motion-reduce:transition-none [@media(hover:hover)]:[&:not(:disabled):not([data-disabled])]:hover:bg-accent', local.class);
|
|
127
127
|
}
|
|
128
128
|
}, others, {
|
|
129
129
|
"data-slot": "steps-prev-trigger"
|
|
@@ -135,7 +135,7 @@ function StepsNextTrigger(props) {
|
|
|
135
135
|
]);
|
|
136
136
|
return createComponent(Steps.NextTrigger, mergeProps({
|
|
137
137
|
get ["class"] () {
|
|
138
|
-
return cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-foreground bg-foreground px-3 py-1.5 text-sm leading-5 text-background transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50
|
|
138
|
+
return cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-foreground bg-foreground px-3 py-1.5 text-sm leading-5 text-background transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50 motion-reduce:transition-none [@media(hover:hover)]:[&:not(:disabled):not([data-disabled])]:hover:bg-foreground', local.class);
|
|
139
139
|
}
|
|
140
140
|
}, others, {
|
|
141
141
|
"data-slot": "steps-next-trigger"
|
|
@@ -65,13 +65,13 @@ function StepsPrevTrigger(props) {
|
|
|
65
65
|
const [local, others] = splitProps(props, [
|
|
66
66
|
'class'
|
|
67
67
|
]);
|
|
68
|
-
return <Steps.PrevTrigger class={cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-3 py-1.5 text-sm leading-5 text-foreground transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50
|
|
68
|
+
return <Steps.PrevTrigger class={cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-3 py-1.5 text-sm leading-5 text-foreground transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50 motion-reduce:transition-none [@media(hover:hover)]:[&:not(:disabled):not([data-disabled])]:hover:bg-accent', local.class)} {...others} data-slot="steps-prev-trigger"/>;
|
|
69
69
|
}
|
|
70
70
|
function StepsNextTrigger(props) {
|
|
71
71
|
const [local, others] = splitProps(props, [
|
|
72
72
|
'class'
|
|
73
73
|
]);
|
|
74
|
-
return <Steps.NextTrigger class={cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-foreground bg-foreground px-3 py-1.5 text-sm leading-5 text-background transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50
|
|
74
|
+
return <Steps.NextTrigger class={cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-foreground bg-foreground px-3 py-1.5 text-sm leading-5 text-background transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50 motion-reduce:transition-none [@media(hover:hover)]:[&:not(:disabled):not([data-disabled])]:hover:bg-foreground', local.class)} {...others} data-slot="steps-next-trigger"/>;
|
|
75
75
|
}
|
|
76
76
|
function StepsProgress(props) {
|
|
77
77
|
const [local, others] = splitProps(props, [
|
|
@@ -8,13 +8,13 @@ function SwapRoot(props) {
|
|
|
8
8
|
'class'
|
|
9
9
|
]);
|
|
10
10
|
return createComponent(Swap.Root, mergeProps({
|
|
11
|
-
get ["data-animation"] () {
|
|
12
|
-
return local.animation ?? 'scale';
|
|
13
|
-
},
|
|
14
11
|
get ["class"] () {
|
|
15
|
-
return cn("group/swap
|
|
12
|
+
return cn("group/swap place-items-center align-middle [grid-template-areas:'swap'] data-[animation=flip]:[perspective:24rem]", local.class);
|
|
16
13
|
}
|
|
17
14
|
}, others, {
|
|
15
|
+
get ["data-animation"] () {
|
|
16
|
+
return local.animation ?? 'scale';
|
|
17
|
+
},
|
|
18
18
|
"data-slot": "swap-root"
|
|
19
19
|
}));
|
|
20
20
|
}
|
|
@@ -24,13 +24,13 @@ function SwapRootProvider(props) {
|
|
|
24
24
|
'class'
|
|
25
25
|
]);
|
|
26
26
|
return createComponent(Swap.RootProvider, mergeProps({
|
|
27
|
-
get ["data-animation"] () {
|
|
28
|
-
return local.animation ?? 'scale';
|
|
29
|
-
},
|
|
30
27
|
get ["class"] () {
|
|
31
|
-
return cn("group/swap
|
|
28
|
+
return cn("group/swap place-items-center align-middle [grid-template-areas:'swap'] data-[animation=flip]:[perspective:24rem]", local.class);
|
|
32
29
|
}
|
|
33
30
|
}, others, {
|
|
31
|
+
get ["data-animation"] () {
|
|
32
|
+
return local.animation ?? 'scale';
|
|
33
|
+
},
|
|
34
34
|
"data-slot": "swap-root-provider"
|
|
35
35
|
}));
|
|
36
36
|
}
|
|
@@ -40,7 +40,7 @@ function SwapIndicator(props) {
|
|
|
40
40
|
]);
|
|
41
41
|
return createComponent(Swap.Indicator, mergeProps({
|
|
42
42
|
get ["class"] () {
|
|
43
|
-
return cn('
|
|
43
|
+
return cn('items-center justify-center text-inherit group-data-[animation=flip]/swap:[backface-visibility:hidden] group-data-[animation=fade]/swap:data-[state=closed]:animate-moduix-swap-fade-exit group-data-[animation=flip]/swap:data-[state=closed]:animate-moduix-swap-flip-exit group-data-[animation=rotate]/swap:data-[state=closed]:animate-moduix-swap-rotate-exit group-data-[animation=scale]/swap:data-[state=closed]:animate-moduix-swap-scale-exit group-data-[animation=fade]/swap:data-[state=open]:animate-moduix-swap-fade-enter group-data-[animation=flip]/swap:data-[state=open]:animate-moduix-swap-flip-enter group-data-[animation=rotate]/swap:data-[state=open]:animate-moduix-swap-rotate-enter group-data-[animation=scale]/swap:data-[state=open]:animate-moduix-swap-scale-enter motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]', local.class);
|
|
44
44
|
}
|
|
45
45
|
}, others, {
|
|
46
46
|
"data-slot": "swap-indicator"
|
|
@@ -6,20 +6,20 @@ function SwapRoot(props) {
|
|
|
6
6
|
'animation',
|
|
7
7
|
'class'
|
|
8
8
|
]);
|
|
9
|
-
return <Swap.Root
|
|
9
|
+
return <Swap.Root class={cn("group/swap place-items-center align-middle [grid-template-areas:'swap'] data-[animation=flip]:[perspective:24rem]", local.class)} {...others} data-animation={local.animation ?? 'scale'} data-slot="swap-root"/>;
|
|
10
10
|
}
|
|
11
11
|
function SwapRootProvider(props) {
|
|
12
12
|
const [local, others] = splitProps(props, [
|
|
13
13
|
'animation',
|
|
14
14
|
'class'
|
|
15
15
|
]);
|
|
16
|
-
return <Swap.RootProvider
|
|
16
|
+
return <Swap.RootProvider class={cn("group/swap place-items-center align-middle [grid-template-areas:'swap'] data-[animation=flip]:[perspective:24rem]", local.class)} {...others} data-animation={local.animation ?? 'scale'} data-slot="swap-root-provider"/>;
|
|
17
17
|
}
|
|
18
18
|
function SwapIndicator(props) {
|
|
19
19
|
const [local, others] = splitProps(props, [
|
|
20
20
|
'class'
|
|
21
21
|
]);
|
|
22
|
-
return <Swap.Indicator class={cn('
|
|
22
|
+
return <Swap.Indicator class={cn('items-center justify-center text-inherit group-data-[animation=flip]/swap:[backface-visibility:hidden] group-data-[animation=fade]/swap:data-[state=closed]:animate-moduix-swap-fade-exit group-data-[animation=flip]/swap:data-[state=closed]:animate-moduix-swap-flip-exit group-data-[animation=rotate]/swap:data-[state=closed]:animate-moduix-swap-rotate-exit group-data-[animation=scale]/swap:data-[state=closed]:animate-moduix-swap-scale-exit group-data-[animation=fade]/swap:data-[state=open]:animate-moduix-swap-fade-enter group-data-[animation=flip]/swap:data-[state=open]:animate-moduix-swap-flip-enter group-data-[animation=rotate]/swap:data-[state=open]:animate-moduix-swap-rotate-enter group-data-[animation=scale]/swap:data-[state=open]:animate-moduix-swap-scale-enter motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]', local.class)} {...others} data-slot="swap-indicator"/>;
|
|
23
23
|
}
|
|
24
24
|
const Swap_Swap = Object.assign(SwapRoot, {
|
|
25
25
|
Root: SwapRoot,
|
|
@@ -13,13 +13,13 @@ function SwitchRoot(props) {
|
|
|
13
13
|
get asChild () {
|
|
14
14
|
return local.asChild;
|
|
15
15
|
},
|
|
16
|
-
get ["data-size"] () {
|
|
17
|
-
return local.size ?? 'md';
|
|
18
|
-
},
|
|
19
16
|
get ["class"] () {
|
|
20
17
|
return cn('group/switch inline-flex w-fit cursor-pointer items-center gap-2 align-middle data-disabled:cursor-default data-disabled:opacity-50 data-readonly:cursor-default', local.class);
|
|
21
18
|
}
|
|
22
19
|
}, others, {
|
|
20
|
+
get ["data-size"] () {
|
|
21
|
+
return local.size ?? 'md';
|
|
22
|
+
},
|
|
23
23
|
"data-slot": "switch-root",
|
|
24
24
|
get children () {
|
|
25
25
|
return local.children;
|
|
@@ -37,13 +37,13 @@ function SwitchRootProvider(props) {
|
|
|
37
37
|
get asChild () {
|
|
38
38
|
return local.asChild;
|
|
39
39
|
},
|
|
40
|
-
get ["data-size"] () {
|
|
41
|
-
return local.size ?? 'md';
|
|
42
|
-
},
|
|
43
40
|
get ["class"] () {
|
|
44
41
|
return cn('group/switch inline-flex w-fit cursor-pointer items-center gap-2 align-middle data-disabled:cursor-default data-disabled:opacity-50 data-readonly:cursor-default', local.class);
|
|
45
42
|
}
|
|
46
43
|
}, others, {
|
|
44
|
+
get ["data-size"] () {
|
|
45
|
+
return local.size ?? 'md';
|
|
46
|
+
},
|
|
47
47
|
"data-slot": "switch-root-provider",
|
|
48
48
|
get children () {
|
|
49
49
|
return local.children;
|
|
@@ -58,7 +58,7 @@ function SwitchControl(props) {
|
|
|
58
58
|
const resolvedChildren = children(()=>local.children);
|
|
59
59
|
return createComponent(Switch.Control, mergeProps({
|
|
60
60
|
get ["class"] () {
|
|
61
|
-
return cn("[@media(hover:hover)]:[&:not([data-disabled]):not([data-readonly])[data-state='unchecked'][data-hover]:bg-accent relative inline-flex h-control-xs w-11 shrink-0 items-center rounded-full border border-border bg-muted p-0.5 leading-none outline-0 transition-[background-color,border-color,opacity] duration-200 ease-in-out select-none group-data-[size=lg]/switch:h-7 group-data-[size=lg]/switch:w-13 group-data-[size=sm]/switch:h-5 group-data-[size=sm]/switch:w-9 group-data-[size=xl]/switch:h-control-sm group-data-[size=xl]/switch:w-15 group-data-[size=xs]/switch:h-4 group-data-[size=xs]/switch:w-7 data-focus-visible:outline-1 data-focus-visible:outline-offset-1 data-focus-visible:outline-ring data-invalid:border-destructive data-[state=checked]:border-primary data-[state=checked]:bg-primary motion-reduce:transition-none", local.class);
|
|
61
|
+
return cn("[@media(hover:hover)]:[&:not([data-disabled]):not([data-readonly])[data-state='unchecked'][data-hover]:bg-accent relative inline-flex h-control-xs w-11 shrink-0 items-center rounded-full border border-border bg-muted p-0.5 leading-none outline-0 transition-[background-color,border-color,opacity] duration-200 ease-in-out select-none group-data-[size=lg]/switch:h-7 group-data-[size=lg]/switch:w-13 group-data-[size=sm]/switch:h-5 group-data-[size=sm]/switch:w-9 group-data-[size=xl]/switch:h-control-sm group-data-[size=xl]/switch:w-15 group-data-[size=xs]/switch:h-4 group-data-[size=xs]/switch:w-7 data-focus-visible:outline-1 data-focus-visible:outline-offset-1 data-focus-visible:outline-ring data-invalid:border-destructive data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:data-invalid:border-destructive motion-reduce:transition-none", local.class);
|
|
62
62
|
}
|
|
63
63
|
}, others, {
|
|
64
64
|
"data-slot": "switch-control",
|
|
@@ -8,7 +8,7 @@ function SwitchRoot(props) {
|
|
|
8
8
|
'class',
|
|
9
9
|
'size'
|
|
10
10
|
]);
|
|
11
|
-
return <Switch.Root asChild={local.asChild}
|
|
11
|
+
return <Switch.Root asChild={local.asChild} class={cn('group/switch inline-flex w-fit cursor-pointer items-center gap-2 align-middle data-disabled:cursor-default data-disabled:opacity-50 data-readonly:cursor-default', local.class)} {...others} data-size={local.size ?? 'md'} data-slot="switch-root">
|
|
12
12
|
{local.children}
|
|
13
13
|
</Switch.Root>;
|
|
14
14
|
}
|
|
@@ -19,7 +19,7 @@ function SwitchRootProvider(props) {
|
|
|
19
19
|
'class',
|
|
20
20
|
'size'
|
|
21
21
|
]);
|
|
22
|
-
return <Switch.RootProvider asChild={local.asChild}
|
|
22
|
+
return <Switch.RootProvider asChild={local.asChild} class={cn('group/switch inline-flex w-fit cursor-pointer items-center gap-2 align-middle data-disabled:cursor-default data-disabled:opacity-50 data-readonly:cursor-default', local.class)} {...others} data-size={local.size ?? 'md'} data-slot="switch-root-provider">
|
|
23
23
|
{local.children}
|
|
24
24
|
</Switch.RootProvider>;
|
|
25
25
|
}
|
|
@@ -29,7 +29,7 @@ function SwitchControl(props) {
|
|
|
29
29
|
'class'
|
|
30
30
|
]);
|
|
31
31
|
const resolvedChildren = children(()=>local.children);
|
|
32
|
-
return <Switch.Control class={cn("[@media(hover:hover)]:[&:not([data-disabled]):not([data-readonly])[data-state='unchecked'][data-hover]:bg-accent relative inline-flex h-control-xs w-11 shrink-0 items-center rounded-full border border-border bg-muted p-0.5 leading-none outline-0 transition-[background-color,border-color,opacity] duration-200 ease-in-out select-none group-data-[size=lg]/switch:h-7 group-data-[size=lg]/switch:w-13 group-data-[size=sm]/switch:h-5 group-data-[size=sm]/switch:w-9 group-data-[size=xl]/switch:h-control-sm group-data-[size=xl]/switch:w-15 group-data-[size=xs]/switch:h-4 group-data-[size=xs]/switch:w-7 data-focus-visible:outline-1 data-focus-visible:outline-offset-1 data-focus-visible:outline-ring data-invalid:border-destructive data-[state=checked]:border-primary data-[state=checked]:bg-primary motion-reduce:transition-none", local.class)} {...others} data-slot="switch-control">
|
|
32
|
+
return <Switch.Control class={cn("[@media(hover:hover)]:[&:not([data-disabled]):not([data-readonly])[data-state='unchecked'][data-hover]:bg-accent relative inline-flex h-control-xs w-11 shrink-0 items-center rounded-full border border-border bg-muted p-0.5 leading-none outline-0 transition-[background-color,border-color,opacity] duration-200 ease-in-out select-none group-data-[size=lg]/switch:h-7 group-data-[size=lg]/switch:w-13 group-data-[size=sm]/switch:h-5 group-data-[size=sm]/switch:w-9 group-data-[size=xl]/switch:h-control-sm group-data-[size=xl]/switch:w-15 group-data-[size=xs]/switch:h-4 group-data-[size=xs]/switch:w-7 data-focus-visible:outline-1 data-focus-visible:outline-offset-1 data-focus-visible:outline-ring data-invalid:border-destructive data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:data-invalid:border-destructive motion-reduce:transition-none", local.class)} {...others} data-slot="switch-control">
|
|
33
33
|
{resolvedChildren() ?? <SwitchThumb/>}
|
|
34
34
|
</Switch.Control>;
|
|
35
35
|
}
|
|
@@ -251,7 +251,7 @@ function TableRow(props) {
|
|
|
251
251
|
"data-part": "row",
|
|
252
252
|
"data-slot": "table-row",
|
|
253
253
|
get ["class"] () {
|
|
254
|
-
return cn('transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-header]/table-header:border-b group-data-[slot=table-header]/table-header:border-border group-data-[slot=table-body]/table-body:last:border-b-0 group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:focus-within:bg-muted group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:hover:bg-muted group-data-[striped]/table:[&:nth-child(even):not([data-empty])]:bg-muted/35', local.class);
|
|
254
|
+
return cn('transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-header]/table-header:border-b group-data-[slot=table-header]/table-header:border-border group-data-[slot=table-body]/table-body:last:border-b-0 motion-reduce:transition-none group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:focus-within:bg-muted group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:hover:bg-muted group-data-[striped]/table:group-data-[slot=table-body]/table-body:[&:nth-child(even):not([data-empty])]:bg-muted/35', local.class);
|
|
255
255
|
}
|
|
256
256
|
}));
|
|
257
257
|
}
|
|
@@ -277,7 +277,7 @@ function TableColumnHeader(props) {
|
|
|
277
277
|
},
|
|
278
278
|
"data-slot": "table-column-header",
|
|
279
279
|
get ["class"] () {
|
|
280
|
-
return cn('relative z-0 px-4 py-3 align-middle font-medium whitespace-nowrap text-muted-foreground group-data-[size=lg]/table:px-5 group-data-[size=lg]/table:py-4 group-data-[size=sm]/table:px-3 group-data-[size=sm]/table:py-2 group-data-[sticky-header]/table:data-[sticky]:z-4 data-[sticky=end]:sticky data-[sticky=end]:end-0 data-[sticky=end]:z-2 data-[sticky=end]:bg-card data-[sticky=start]:sticky data-[sticky=start]:start-0 data-[sticky=start]:z-2 data-[sticky=start]:bg-card group-data-[show-column-border]/table:[&:not(:last-child)]:border-e group-data-[show-column-border]/table:[&:not(:last-child)]:border-border', local.numeric && 'text-end tabular-nums', local.class);
|
|
280
|
+
return cn('relative z-0 px-4 py-3 text-left align-middle font-medium whitespace-nowrap text-muted-foreground group-data-[size=lg]/table:px-5 group-data-[size=lg]/table:py-4 group-data-[size=sm]/table:px-3 group-data-[size=sm]/table:py-2 group-data-[sticky-header]/table:data-[sticky]:z-4 data-[sticky=end]:sticky data-[sticky=end]:end-0 data-[sticky=end]:z-2 data-[sticky=end]:bg-card data-[sticky=start]:sticky data-[sticky=start]:start-0 data-[sticky=start]:z-2 data-[sticky=start]:bg-card group-data-[show-column-border]/table:[&:not(:last-child)]:border-e group-data-[show-column-border]/table:[&:not(:last-child)]:border-border', local.numeric && 'text-end tabular-nums', local.class);
|
|
281
281
|
}
|
|
282
282
|
}));
|
|
283
283
|
}
|
|
@@ -323,7 +323,7 @@ function TableEmpty(props) {
|
|
|
323
323
|
"data-part": "row",
|
|
324
324
|
"data-empty": true,
|
|
325
325
|
"data-slot": "table-row",
|
|
326
|
-
class: "transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-body]/table-body:last:border-b-0",
|
|
326
|
+
class: "transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-body]/table-body:last:border-b-0 motion-reduce:transition-none",
|
|
327
327
|
get children () {
|
|
328
328
|
return createComponent(ark.td, mergeProps({
|
|
329
329
|
get asChild () {
|
|
@@ -129,7 +129,7 @@ function TableRow(props) {
|
|
|
129
129
|
'data-scope',
|
|
130
130
|
'data-slot'
|
|
131
131
|
]);
|
|
132
|
-
return <ark.tr asChild={local.asChild} {...others} data-scope="table" data-part="row" data-slot="table-row" class={cn('transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-header]/table-header:border-b group-data-[slot=table-header]/table-header:border-border group-data-[slot=table-body]/table-body:last:border-b-0 group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:focus-within:bg-muted group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:hover:bg-muted group-data-[striped]/table:[&:nth-child(even):not([data-empty])]:bg-muted/35', local.class)}/>;
|
|
132
|
+
return <ark.tr asChild={local.asChild} {...others} data-scope="table" data-part="row" data-slot="table-row" class={cn('transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-header]/table-header:border-b group-data-[slot=table-header]/table-header:border-border group-data-[slot=table-body]/table-body:last:border-b-0 motion-reduce:transition-none group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:focus-within:bg-muted group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:hover:bg-muted group-data-[striped]/table:group-data-[slot=table-body]/table-body:[&:nth-child(even):not([data-empty])]:bg-muted/35', local.class)}/>;
|
|
133
133
|
}
|
|
134
134
|
function TableColumnHeader(props) {
|
|
135
135
|
const [local, others] = splitProps(props, [
|
|
@@ -141,7 +141,7 @@ function TableColumnHeader(props) {
|
|
|
141
141
|
'data-slot',
|
|
142
142
|
'numeric'
|
|
143
143
|
]);
|
|
144
|
-
return <ark.th asChild={local.asChild} {...others} data-scope="table" data-part="column-header" data-numeric={local.numeric || void 0} data-slot="table-column-header" class={cn('relative z-0 px-4 py-3 align-middle font-medium whitespace-nowrap text-muted-foreground group-data-[size=lg]/table:px-5 group-data-[size=lg]/table:py-4 group-data-[size=sm]/table:px-3 group-data-[size=sm]/table:py-2 group-data-[sticky-header]/table:data-[sticky]:z-4 data-[sticky=end]:sticky data-[sticky=end]:end-0 data-[sticky=end]:z-2 data-[sticky=end]:bg-card data-[sticky=start]:sticky data-[sticky=start]:start-0 data-[sticky=start]:z-2 data-[sticky=start]:bg-card group-data-[show-column-border]/table:[&:not(:last-child)]:border-e group-data-[show-column-border]/table:[&:not(:last-child)]:border-border', local.numeric && 'text-end tabular-nums', local.class)}/>;
|
|
144
|
+
return <ark.th asChild={local.asChild} {...others} data-scope="table" data-part="column-header" data-numeric={local.numeric || void 0} data-slot="table-column-header" class={cn('relative z-0 px-4 py-3 text-left align-middle font-medium whitespace-nowrap text-muted-foreground group-data-[size=lg]/table:px-5 group-data-[size=lg]/table:py-4 group-data-[size=sm]/table:px-3 group-data-[size=sm]/table:py-2 group-data-[sticky-header]/table:data-[sticky]:z-4 data-[sticky=end]:sticky data-[sticky=end]:end-0 data-[sticky=end]:z-2 data-[sticky=end]:bg-card data-[sticky=start]:sticky data-[sticky=start]:start-0 data-[sticky=start]:z-2 data-[sticky=start]:bg-card group-data-[show-column-border]/table:[&:not(:last-child)]:border-e group-data-[show-column-border]/table:[&:not(:last-child)]:border-border', local.numeric && 'text-end tabular-nums', local.class)}/>;
|
|
145
145
|
}
|
|
146
146
|
function TableCell(props) {
|
|
147
147
|
const [local, others] = splitProps(props, [
|
|
@@ -166,7 +166,7 @@ function TableEmpty(props) {
|
|
|
166
166
|
'data-slot'
|
|
167
167
|
]);
|
|
168
168
|
const resolvedChildren = children(()=>local.children);
|
|
169
|
-
return <ark.tr data-scope="table" data-part="row" data-empty data-slot="table-row" class="transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-body]/table-body:last:border-b-0">
|
|
169
|
+
return <ark.tr data-scope="table" data-part="row" data-empty data-slot="table-row" class="transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-body]/table-body:last:border-b-0 motion-reduce:transition-none">
|
|
170
170
|
<ark.td asChild={local.asChild} {...others} data-scope="table" data-part="empty" data-slot="table-empty" colSpan={local.colSpan} class={cn('relative z-0 px-4 py-3 align-middle group-data-[size=lg]/table:px-5 group-data-[size=lg]/table:py-4 group-data-[size=sm]/table:px-3 group-data-[size=sm]/table:py-2 data-[sticky=end]:sticky data-[sticky=end]:end-0 data-[sticky=end]:z-2 data-[sticky=end]:bg-card data-[sticky=start]:sticky data-[sticky=start]:start-0 data-[sticky=start]:z-2 data-[sticky=start]:bg-card group-data-[show-column-border]/table:[&:not(:last-child)]:border-e group-data-[show-column-border]/table:[&:not(:last-child)]:border-border', 'py-6 text-center text-muted-foreground group-data-[size=lg]/table:py-8 group-data-[size=sm]/table:py-4', local.class)}>
|
|
171
171
|
{resolvedChildren() ?? 'No results.'}
|
|
172
172
|
</ark.td>
|
|
@@ -9,9 +9,6 @@ function TabsRoot(props) {
|
|
|
9
9
|
'variant'
|
|
10
10
|
]);
|
|
11
11
|
return createComponent(Tabs.Root, mergeProps({
|
|
12
|
-
get ["data-variant"] () {
|
|
13
|
-
return memo(()=>'vertical' === local.orientation)() ? 'default' : local.variant ?? 'default';
|
|
14
|
-
},
|
|
15
12
|
get ["class"] () {
|
|
16
13
|
return cn('group/tabs box-border flex w-full min-w-0 flex-col gap-3 text-foreground data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch', local.class);
|
|
17
14
|
},
|
|
@@ -19,6 +16,9 @@ function TabsRoot(props) {
|
|
|
19
16
|
return local.orientation;
|
|
20
17
|
}
|
|
21
18
|
}, others, {
|
|
19
|
+
get ["data-variant"] () {
|
|
20
|
+
return memo(()=>'vertical' === local.orientation)() ? 'default' : local.variant ?? 'default';
|
|
21
|
+
},
|
|
22
22
|
"data-slot": "tabs-root"
|
|
23
23
|
}));
|
|
24
24
|
}
|
|
@@ -30,9 +30,6 @@ function TabsRootProvider(props) {
|
|
|
30
30
|
]);
|
|
31
31
|
const orientation = ()=>local.value().getRootProps()['data-orientation'];
|
|
32
32
|
return createComponent(Tabs.RootProvider, mergeProps({
|
|
33
|
-
get ["data-variant"] () {
|
|
34
|
-
return memo(()=>'vertical' === orientation())() ? 'default' : local.variant ?? 'default';
|
|
35
|
-
},
|
|
36
33
|
get ["class"] () {
|
|
37
34
|
return cn('group/tabs box-border flex w-full min-w-0 flex-col gap-3 text-foreground data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch', local.class);
|
|
38
35
|
},
|
|
@@ -40,6 +37,9 @@ function TabsRootProvider(props) {
|
|
|
40
37
|
return local.value;
|
|
41
38
|
}
|
|
42
39
|
}, others, {
|
|
40
|
+
get ["data-variant"] () {
|
|
41
|
+
return memo(()=>'vertical' === orientation())() ? 'default' : local.variant ?? 'default';
|
|
42
|
+
},
|
|
43
43
|
"data-slot": "tabs-root-provider"
|
|
44
44
|
}));
|
|
45
45
|
}
|
|
@@ -73,7 +73,7 @@ function TabsIndicator(props) {
|
|
|
73
73
|
]);
|
|
74
74
|
return createComponent(Tabs.Indicator, mergeProps({
|
|
75
75
|
get ["class"] () {
|
|
76
|
-
return cn('pointer-events-none absolute top-1/2 left-[var(--left,0)] z-0 h-8 w-[var(--width,0)] -translate-y-1/2 rounded-md bg-background shadow-sm transition-[var(--transition-property,translate)] duration-
|
|
76
|
+
return cn('pointer-events-none absolute top-1/2 left-[var(--left,0)] z-0 h-8 w-[var(--width,0)] -translate-y-1/2 rounded-md bg-background shadow-sm transition-[var(--transition-property,translate)] [--transition-duration:var(--moduix-duration-normal)] [--transition-timing-function:var(--moduix-ease-in-out)] group-data-[orientation=vertical]/tabs:top-[var(--top,0)] group-data-[orientation=vertical]/tabs:left-1/2 group-data-[orientation=vertical]/tabs:h-[var(--height,0)] group-data-[orientation=vertical]/tabs:w-[calc(100%-0.5rem)] group-data-[orientation=vertical]/tabs:-translate-x-1/2 group-data-[orientation=vertical]/tabs:translate-y-0 group-data-[variant=line]/tabs:top-auto group-data-[variant=line]/tabs:bottom-0 group-data-[variant=line]/tabs:h-0.5 group-data-[variant=line]/tabs:[translate:none] group-data-[variant=line]/tabs:rounded-full group-data-[variant=line]/tabs:bg-foreground group-data-[variant=line]/tabs:shadow-none motion-reduce:transition-none', local.class);
|
|
77
77
|
}
|
|
78
78
|
}, others, {
|
|
79
79
|
"data-slot": "tabs-indicator"
|
|
@@ -7,7 +7,7 @@ function TabsRoot(props) {
|
|
|
7
7
|
'orientation',
|
|
8
8
|
'variant'
|
|
9
9
|
]);
|
|
10
|
-
return <Tabs.Root
|
|
10
|
+
return <Tabs.Root class={cn('group/tabs box-border flex w-full min-w-0 flex-col gap-3 text-foreground data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch', local.class)} orientation={local.orientation} {...others} data-variant={'vertical' === local.orientation ? 'default' : local.variant ?? 'default'} data-slot="tabs-root"/>;
|
|
11
11
|
}
|
|
12
12
|
function TabsRootProvider(props) {
|
|
13
13
|
const [local, others] = splitProps(props, [
|
|
@@ -16,7 +16,7 @@ function TabsRootProvider(props) {
|
|
|
16
16
|
'variant'
|
|
17
17
|
]);
|
|
18
18
|
const orientation = ()=>local.value().getRootProps()['data-orientation'];
|
|
19
|
-
return <Tabs.RootProvider
|
|
19
|
+
return <Tabs.RootProvider class={cn('group/tabs box-border flex w-full min-w-0 flex-col gap-3 text-foreground data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch', local.class)} value={local.value} {...others} data-variant={'vertical' === orientation() ? 'default' : local.variant ?? 'default'} data-slot="tabs-root-provider"/>;
|
|
20
20
|
}
|
|
21
21
|
function TabsList(props) {
|
|
22
22
|
const [local, others] = splitProps(props, [
|
|
@@ -34,7 +34,7 @@ function TabsIndicator(props) {
|
|
|
34
34
|
const [local, others] = splitProps(props, [
|
|
35
35
|
'class'
|
|
36
36
|
]);
|
|
37
|
-
return <Tabs.Indicator class={cn('pointer-events-none absolute top-1/2 left-[var(--left,0)] z-0 h-8 w-[var(--width,0)] -translate-y-1/2 rounded-md bg-background shadow-sm transition-[var(--transition-property,translate)] duration-
|
|
37
|
+
return <Tabs.Indicator class={cn('pointer-events-none absolute top-1/2 left-[var(--left,0)] z-0 h-8 w-[var(--width,0)] -translate-y-1/2 rounded-md bg-background shadow-sm transition-[var(--transition-property,translate)] [--transition-duration:var(--moduix-duration-normal)] [--transition-timing-function:var(--moduix-ease-in-out)] group-data-[orientation=vertical]/tabs:top-[var(--top,0)] group-data-[orientation=vertical]/tabs:left-1/2 group-data-[orientation=vertical]/tabs:h-[var(--height,0)] group-data-[orientation=vertical]/tabs:w-[calc(100%-0.5rem)] group-data-[orientation=vertical]/tabs:-translate-x-1/2 group-data-[orientation=vertical]/tabs:translate-y-0 group-data-[variant=line]/tabs:top-auto group-data-[variant=line]/tabs:bottom-0 group-data-[variant=line]/tabs:h-0.5 group-data-[variant=line]/tabs:[translate:none] group-data-[variant=line]/tabs:rounded-full group-data-[variant=line]/tabs:bg-foreground group-data-[variant=line]/tabs:shadow-none motion-reduce:transition-none', local.class)} {...others} data-slot="tabs-indicator"/>;
|
|
38
38
|
}
|
|
39
39
|
function TabsContent(props) {
|
|
40
40
|
const [local, others] = splitProps(props, [
|