@moduix/solid-tailwind 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/Accordion.js +19 -13
- package/dist/components/accordion/Accordion.jsx +7 -7
- package/dist/components/alert/Alert.js +19 -13
- package/dist/components/alert/Alert.jsx +7 -7
- package/dist/components/angle-slider/AngleSlider.d.ts +2 -6
- package/dist/components/angle-slider/AngleSlider.js +21 -16
- package/dist/components/angle-slider/AngleSlider.jsx +10 -11
- package/dist/components/avatar/Avatar.js +10 -7
- package/dist/components/avatar/Avatar.jsx +6 -6
- package/dist/components/bleed/Bleed.js +1 -1
- package/dist/components/bleed/Bleed.jsx +1 -1
- package/dist/components/button/Button.js +1 -6
- package/dist/components/button/Button.jsx +2 -4
- package/dist/components/card/Card.js +54 -44
- package/dist/components/card/Card.jsx +12 -12
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/Carousel.js +32 -23
- package/dist/components/carousel/Carousel.jsx +12 -13
- package/dist/components/checkbox/Checkbox.js +16 -14
- package/dist/components/checkbox/Checkbox.jsx +6 -6
- package/dist/components/clipboard/Clipboard.js +28 -17
- package/dist/components/clipboard/Clipboard.jsx +12 -11
- package/dist/components/collapsible/Collapsible.js +16 -11
- package/dist/components/collapsible/Collapsible.jsx +6 -6
- package/dist/components/color-picker/ColorPicker.js +69 -48
- package/dist/components/color-picker/ColorPicker.jsx +28 -28
- package/dist/components/combobox/Combobox.js +44 -31
- package/dist/components/combobox/Combobox.jsx +18 -18
- package/dist/components/command-palette/CommandPalette.js +71 -52
- package/dist/components/command-palette/CommandPalette.jsx +28 -31
- package/dist/components/container/Container.js +5 -5
- package/dist/components/container/Container.jsx +5 -5
- package/dist/components/date-input/DateInput.js +18 -12
- package/dist/components/date-input/DateInput.jsx +7 -7
- package/dist/components/date-picker/DatePicker.js +73 -51
- package/dist/components/date-picker/DatePicker.jsx +29 -29
- package/dist/components/dialog/Dialog.js +30 -20
- package/dist/components/dialog/Dialog.jsx +10 -10
- package/dist/components/drawer/Drawer.js +45 -30
- package/dist/components/drawer/Drawer.jsx +15 -15
- package/dist/components/editable/Editable.js +24 -17
- package/dist/components/editable/Editable.jsx +10 -10
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/empty/Empty.jsx +1 -1
- package/dist/components/file-upload/FileUpload.js +39 -28
- package/dist/components/file-upload/FileUpload.jsx +17 -17
- package/dist/components/floating-panel/FloatingPanel.js +35 -23
- package/dist/components/floating-panel/FloatingPanel.jsx +12 -12
- package/dist/components/hover-card/HoverCard.js +16 -11
- package/dist/components/hover-card/HoverCard.jsx +6 -6
- package/dist/components/image-cropper/ImageCropper.js +21 -14
- package/dist/components/image-cropper/ImageCropper.jsx +7 -7
- package/dist/components/input-group/InputGroup.js +3 -2
- package/dist/components/input-group/InputGroup.jsx +3 -2
- package/dist/components/json-tree-view/JsonTreeView.js +1 -1
- package/dist/components/json-tree-view/JsonTreeView.jsx +1 -1
- package/dist/components/lightbox/Lightbox.d.ts +1 -0
- package/dist/components/lightbox/Lightbox.js +41 -27
- package/dist/components/lightbox/Lightbox.jsx +13 -12
- package/dist/components/listbox/Listbox.js +48 -32
- package/dist/components/listbox/Listbox.jsx +17 -17
- package/dist/components/marquee/Marquee.js +18 -12
- package/dist/components/marquee/Marquee.jsx +9 -9
- package/dist/components/menu/Menu.js +66 -44
- package/dist/components/menu/Menu.jsx +28 -28
- package/dist/components/navigation-menu/NavigationMenu.js +36 -24
- package/dist/components/navigation-menu/NavigationMenu.jsx +12 -12
- package/dist/components/number-input/NumberInput.js +19 -14
- package/dist/components/number-input/NumberInput.jsx +9 -9
- package/dist/components/pagination/Pagination.js +10 -9
- package/dist/components/pagination/Pagination.jsx +8 -8
- package/dist/components/password-input/PasswordInput.js +16 -11
- package/dist/components/password-input/PasswordInput.jsx +6 -6
- package/dist/components/pin-input/PinInput.js +15 -10
- package/dist/components/pin-input/PinInput.jsx +6 -6
- package/dist/components/popover/Popover.js +37 -25
- package/dist/components/popover/Popover.jsx +13 -13
- package/dist/components/progress-circular/ProgressCircular.js +18 -13
- package/dist/components/progress-circular/ProgressCircular.jsx +8 -8
- package/dist/components/progress-linear/ProgressLinear.js +17 -12
- package/dist/components/progress-linear/ProgressLinear.jsx +7 -7
- package/dist/components/qr-code/QrCode.js +8 -7
- package/dist/components/qr-code/QrCode.jsx +6 -6
- package/dist/components/rating-group/RatingGroup.js +15 -10
- package/dist/components/rating-group/RatingGroup.jsx +6 -6
- package/dist/components/segment-group/SegmentGroup.js +17 -12
- package/dist/components/segment-group/SegmentGroup.jsx +7 -7
- package/dist/components/select/Select.js +50 -35
- package/dist/components/select/Select.jsx +20 -20
- package/dist/components/sidebar/Sidebar.js +72 -43
- package/dist/components/sidebar/Sidebar.jsx +34 -27
- package/dist/components/signature-pad/SignaturePad.js +16 -12
- package/dist/components/signature-pad/SignaturePad.jsx +8 -8
- package/dist/components/slider/Slider.js +29 -20
- package/dist/components/slider/Slider.jsx +11 -11
- package/dist/components/split-button/SplitButton.d.ts +4 -3
- package/dist/components/split-button/SplitButton.js +20 -9
- package/dist/components/split-button/SplitButton.jsx +13 -7
- package/dist/components/splitter/Splitter.js +13 -9
- package/dist/components/splitter/Splitter.jsx +5 -5
- package/dist/components/steps/Steps.js +34 -23
- package/dist/components/steps/Steps.jsx +12 -12
- package/dist/components/swap/Swap.js +9 -6
- package/dist/components/swap/Swap.jsx +3 -3
- package/dist/components/switch/Switch.js +9 -7
- package/dist/components/switch/Switch.jsx +5 -5
- package/dist/components/tabs/Tabs.js +18 -12
- package/dist/components/tabs/Tabs.jsx +6 -6
- package/dist/components/tags-input/TagsInput.js +28 -20
- package/dist/components/tags-input/TagsInput.jsx +12 -12
- package/dist/components/timer/Timer.js +21 -14
- package/dist/components/timer/Timer.jsx +7 -7
- package/dist/components/toast/Toast.js +11 -9
- package/dist/components/toast/Toast.jsx +7 -7
- package/dist/components/toc/Toc.js +31 -20
- package/dist/components/toc/Toc.jsx +10 -10
- package/dist/components/tooltip/Tooltip.js +13 -9
- package/dist/components/tooltip/Tooltip.jsx +5 -5
- package/dist/components/tour/Tour.js +38 -26
- package/dist/components/tour/Tour.jsx +13 -13
- package/dist/components/tree-view/TreeView.js +39 -28
- package/dist/components/tree-view/TreeView.jsx +17 -17
- package/dist/styles/animations.css +8 -8
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ function ColorPickerRoot(props) {
|
|
|
14
14
|
'unmountOnExit'
|
|
15
15
|
]);
|
|
16
16
|
return <OverlayPortalProvider portalled={local.portalled} portalRef={local.portalRef}>
|
|
17
|
-
<ColorPicker.Root asChild={local.asChild}
|
|
17
|
+
<ColorPicker.Root asChild={local.asChild} class={cn('box-border flex w-64 max-w-full min-w-0 flex-col gap-2 text-foreground data-disabled:opacity-50', local.class)} lazyMount={local.lazyMount ?? true} unmountOnExit={local.unmountOnExit ?? true} {...others} data-slot="color-picker-root">
|
|
18
18
|
{local.children}
|
|
19
19
|
</ColorPicker.Root>
|
|
20
20
|
</OverlayPortalProvider>;
|
|
@@ -30,7 +30,7 @@ function ColorPickerRootProvider(props) {
|
|
|
30
30
|
'unmountOnExit'
|
|
31
31
|
]);
|
|
32
32
|
return <OverlayPortalProvider portalled={local.portalled} portalRef={local.portalRef}>
|
|
33
|
-
<ColorPicker.RootProvider asChild={local.asChild}
|
|
33
|
+
<ColorPicker.RootProvider asChild={local.asChild} class={cn('box-border flex w-64 max-w-full min-w-0 flex-col gap-2 text-foreground data-disabled:opacity-50', local.class)} lazyMount={local.lazyMount ?? true} unmountOnExit={local.unmountOnExit ?? true} {...others} data-slot="color-picker-root-provider">
|
|
34
34
|
{local.children}
|
|
35
35
|
</ColorPicker.RootProvider>
|
|
36
36
|
</OverlayPortalProvider>;
|
|
@@ -39,13 +39,13 @@ function ColorPickerLabel(props) {
|
|
|
39
39
|
const [local, others] = splitProps(props, [
|
|
40
40
|
'class'
|
|
41
41
|
]);
|
|
42
|
-
return <ColorPicker.Label
|
|
42
|
+
return <ColorPicker.Label class={cn('inline-flex items-center text-sm font-medium text-foreground select-none', local.class)} {...others} data-slot="color-picker-label"/>;
|
|
43
43
|
}
|
|
44
44
|
function ColorPickerControl(props) {
|
|
45
45
|
const [local, others] = splitProps(props, [
|
|
46
46
|
'class'
|
|
47
47
|
]);
|
|
48
|
-
return <ColorPicker.Control
|
|
48
|
+
return <ColorPicker.Control class={cn('flex min-w-0 items-center gap-2 data-disabled:opacity-50', local.class)} {...others} data-slot="color-picker-control"/>;
|
|
49
49
|
}
|
|
50
50
|
function ColorPickerTrigger(props) {
|
|
51
51
|
const [local, others] = splitProps(props, [
|
|
@@ -53,7 +53,7 @@ function ColorPickerTrigger(props) {
|
|
|
53
53
|
'class'
|
|
54
54
|
]);
|
|
55
55
|
const resolvedChildren = children(()=>local.children);
|
|
56
|
-
return <ColorPicker.Trigger
|
|
56
|
+
return <ColorPicker.Trigger class={cn('group/trigger box-border grid size-control-md shrink-0 place-items-center overflow-hidden rounded-md border border-border bg-background p-1 text-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,background-color] duration-200 ease-in-out select-none focus-visible:border-ring focus-visible:outline-ring disabled:cursor-default data-disabled:cursor-default data-invalid:border-destructive data-invalid:outline-destructive data-readonly:cursor-default data-[fit-content]:inline-flex data-[fit-content]:w-auto data-[fit-content]:min-w-control-md data-[fit-content]:gap-2 data-[fit-content]:px-3 data-[state=open]:border-ring data-[state=open]:outline-ring motion-reduce:transition-none', local.class)} {...others} data-slot="color-picker-trigger">
|
|
57
57
|
{resolvedChildren() ?? <>
|
|
58
58
|
<ColorPicker.TransparencyGrid data-slot="color-picker-transparency-grid" class="col-start-1 row-start-1 size-full rounded-[inherit] group-data-[fit-content]/trigger:col-auto group-data-[fit-content]/trigger:row-auto group-data-[fit-content]/trigger:size-4 group-data-[fit-content]/trigger:shrink-0"/>
|
|
59
59
|
<ColorPicker.ValueSwatch data-slot="color-picker-value-swatch" class="z-1 col-start-1 row-start-1 size-full rounded-[inherit] group-data-[fit-content]/trigger:col-auto group-data-[fit-content]/trigger:row-auto group-data-[fit-content]/trigger:size-4 group-data-[fit-content]/trigger:shrink-0"/>
|
|
@@ -65,14 +65,14 @@ function ColorPickerPositioner(props) {
|
|
|
65
65
|
'class'
|
|
66
66
|
]);
|
|
67
67
|
return <OverlayPortal>
|
|
68
|
-
<ColorPicker.Positioner
|
|
68
|
+
<ColorPicker.Positioner class={cn('z-[var(--z-index)] outline-0', local.class)} {...others} data-slot="color-picker-positioner"/>
|
|
69
69
|
</OverlayPortal>;
|
|
70
70
|
}
|
|
71
71
|
function ColorPickerContent(props) {
|
|
72
72
|
const [local, others] = splitProps(props, [
|
|
73
73
|
'class'
|
|
74
74
|
]);
|
|
75
|
-
return <ColorPicker.Content
|
|
75
|
+
return <ColorPicker.Content class={cn('z-[calc(var(--moduix-z-popup)+var(--layer-index,0))] box-border flex max-h-[min(32rem,var(--available-height))] w-64 max-w-[var(--available-width)] origin-[var(--transform-origin)] flex-col gap-3 overflow-auto overscroll-contain rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-lg outline-0 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)} {...others} data-slot="color-picker-content"/>;
|
|
76
76
|
}
|
|
77
77
|
function ColorPickerArea(props) {
|
|
78
78
|
const [local, others] = splitProps(props, [
|
|
@@ -80,7 +80,7 @@ function ColorPickerArea(props) {
|
|
|
80
80
|
'class'
|
|
81
81
|
]);
|
|
82
82
|
const resolvedChildren = children(()=>local.children);
|
|
83
|
-
return <ColorPicker.Area
|
|
83
|
+
return <ColorPicker.Area class={cn('relative box-border h-40 w-full touch-none overflow-hidden rounded-md shadow-[inset_0_0_0_1px_color-mix(in_oklab,black_14%,transparent)] select-none data-disabled:cursor-default data-readonly:cursor-default', local.class)} {...others} data-slot="color-picker-area">
|
|
84
84
|
{resolvedChildren() ?? <>
|
|
85
85
|
<ColorPicker.AreaBackground data-slot="color-picker-area-background" class="size-full rounded-[inherit]"/>
|
|
86
86
|
<ColorPicker.AreaThumb data-slot="color-picker-area-thumb" class="box-border size-4 -translate-x-1/2 -translate-y-1/2 rounded-full bg-background shadow-[0_0_0_4px_rgb(0_0_0_/_18%),0_2px_4px_0_rgb(0_0_0_/_10%),0_1px_2px_-1px_rgb(0_0_0_/_10%)] ring-2 ring-background outline-0 focus-visible:ring-ring data-disabled:pointer-events-none"/>
|
|
@@ -91,13 +91,13 @@ function ColorPickerAreaBackground(props) {
|
|
|
91
91
|
const [local, others] = splitProps(props, [
|
|
92
92
|
'class'
|
|
93
93
|
]);
|
|
94
|
-
return <ColorPicker.AreaBackground
|
|
94
|
+
return <ColorPicker.AreaBackground class={cn('size-full rounded-[inherit]', local.class)} {...others} data-slot="color-picker-area-background"/>;
|
|
95
95
|
}
|
|
96
96
|
function ColorPickerAreaThumb(props) {
|
|
97
97
|
const [local, others] = splitProps(props, [
|
|
98
98
|
'class'
|
|
99
99
|
]);
|
|
100
|
-
return <ColorPicker.AreaThumb
|
|
100
|
+
return <ColorPicker.AreaThumb class={cn('box-border size-4 -translate-x-1/2 -translate-y-1/2 rounded-full bg-background shadow-[0_0_0_4px_rgb(0_0_0_/_18%),0_2px_4px_0_rgb(0_0_0_/_10%),0_1px_2px_-1px_rgb(0_0_0_/_10%)] ring-2 ring-background outline-0 focus-visible:ring-ring data-disabled:pointer-events-none', local.class)} {...others} data-slot="color-picker-area-thumb"/>;
|
|
101
101
|
}
|
|
102
102
|
function ColorPickerChannelSlider(props) {
|
|
103
103
|
const [local, others] = splitProps(props, [
|
|
@@ -106,7 +106,7 @@ function ColorPickerChannelSlider(props) {
|
|
|
106
106
|
'class'
|
|
107
107
|
]);
|
|
108
108
|
const resolvedChildren = children(()=>local.children);
|
|
109
|
-
return <ColorPicker.ChannelSlider channel={local.channel}
|
|
109
|
+
return <ColorPicker.ChannelSlider channel={local.channel} class={cn('relative box-border flex h-3 touch-none items-center rounded-full select-none data-[orientation=vertical]:h-40 data-[orientation=vertical]:w-3 data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-center', local.class)} {...others} data-slot="color-picker-channel-slider">
|
|
110
110
|
{resolvedChildren() ?? <>
|
|
111
111
|
{'alpha' === local.channel && <ColorPicker.TransparencyGrid data-slot="color-picker-transparency-grid" class="size-full rounded-[inherit]"/>}
|
|
112
112
|
<ColorPicker.ChannelSliderTrack data-slot="color-picker-channel-slider-track" class="h-3 w-full rounded-[inherit] shadow-[inset_0_0_0_1px_color-mix(in_oklab,black_14%,transparent)] data-[orientation=vertical]:h-full data-[orientation=vertical]:w-3"/>
|
|
@@ -118,7 +118,7 @@ function ColorPickerSliders(props) {
|
|
|
118
118
|
const [local, others] = splitProps(props, [
|
|
119
119
|
'class'
|
|
120
120
|
]);
|
|
121
|
-
return <div
|
|
121
|
+
return <div class={cn('flex min-w-0 flex-1 flex-col gap-2', local.class)} {...others} data-slot="color-picker-sliders">
|
|
122
122
|
<ColorPickerChannelSlider channel="hue"/>
|
|
123
123
|
<ColorPickerChannelSlider channel="alpha"/>
|
|
124
124
|
</div>;
|
|
@@ -127,31 +127,31 @@ function ColorPickerChannelSliderTrack(props) {
|
|
|
127
127
|
const [local, others] = splitProps(props, [
|
|
128
128
|
'class'
|
|
129
129
|
]);
|
|
130
|
-
return <ColorPicker.ChannelSliderTrack
|
|
130
|
+
return <ColorPicker.ChannelSliderTrack class={cn('h-3 w-full rounded-[inherit] shadow-[inset_0_0_0_1px_color-mix(in_oklab,black_14%,transparent)] data-[orientation=vertical]:h-full data-[orientation=vertical]:w-3', local.class)} {...others} data-slot="color-picker-channel-slider-track"/>;
|
|
131
131
|
}
|
|
132
132
|
function ColorPickerChannelSliderThumb(props) {
|
|
133
133
|
const [local, others] = splitProps(props, [
|
|
134
134
|
'class'
|
|
135
135
|
]);
|
|
136
|
-
return <ColorPicker.ChannelSliderThumb
|
|
136
|
+
return <ColorPicker.ChannelSliderThumb class={cn('box-border size-4 -translate-x-1/2 -translate-y-1/2 rounded-full bg-background shadow-[0_0_0_4px_rgb(0_0_0_/_18%),0_2px_4px_0_rgb(0_0_0_/_10%),0_1px_2px_-1px_rgb(0_0_0_/_10%)] ring-2 ring-background outline-0 focus-visible:ring-ring data-disabled:pointer-events-none', local.class)} {...others} data-slot="color-picker-channel-slider-thumb"/>;
|
|
137
137
|
}
|
|
138
138
|
function ColorPickerChannelSliderLabel(props) {
|
|
139
139
|
const [local, others] = splitProps(props, [
|
|
140
140
|
'class'
|
|
141
141
|
]);
|
|
142
|
-
return <ColorPicker.ChannelSliderLabel
|
|
142
|
+
return <ColorPicker.ChannelSliderLabel class={cn('text-sm font-medium text-foreground', local.class)} {...others} data-slot="color-picker-channel-slider-label"/>;
|
|
143
143
|
}
|
|
144
144
|
function ColorPickerChannelSliderValueText(props) {
|
|
145
145
|
const [local, others] = splitProps(props, [
|
|
146
146
|
'class'
|
|
147
147
|
]);
|
|
148
|
-
return <ColorPicker.ChannelSliderValueText
|
|
148
|
+
return <ColorPicker.ChannelSliderValueText class={cn('text-sm text-muted-foreground', local.class)} {...others} data-slot="color-picker-channel-slider-value-text"/>;
|
|
149
149
|
}
|
|
150
150
|
function ColorPickerChannelInput(props) {
|
|
151
151
|
const [local, others] = splitProps(props, [
|
|
152
152
|
'class'
|
|
153
153
|
]);
|
|
154
|
-
return <ColorPicker.ChannelInput
|
|
154
|
+
return <ColorPicker.ChannelInput class={cn('box-border h-control-md w-full min-w-0 [appearance:textfield] rounded-md border border-border bg-background px-3 text-sm text-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color] duration-200 ease-in-out focus:border-ring focus:outline-ring data-disabled:opacity-50 data-invalid:border-destructive data-invalid:outline-destructive data-[channel=alpha]:w-16 data-[channel=alpha]:flex-none motion-reduce:transition-none [&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:m-0 [&::-webkit-outer-spin-button]:appearance-none', local.class)} {...others} data-slot="color-picker-channel-input"/>;
|
|
155
155
|
}
|
|
156
156
|
function ColorPickerEyeDropperTrigger(props) {
|
|
157
157
|
const [local, others] = splitProps(props, [
|
|
@@ -159,7 +159,7 @@ function ColorPickerEyeDropperTrigger(props) {
|
|
|
159
159
|
'class'
|
|
160
160
|
]);
|
|
161
161
|
const resolvedChildren = children(()=>local.children);
|
|
162
|
-
return <ColorPicker.EyeDropperTrigger
|
|
162
|
+
return <ColorPicker.EyeDropperTrigger class={cn('box-border inline-flex h-control-md min-w-control-md shrink-0 items-center justify-center gap-2 rounded-md border border-border bg-transparent px-2 text-sm text-muted-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,background-color,color] duration-200 ease-in-out focus-visible:border-ring focus-visible:outline-ring disabled:cursor-default data-disabled:cursor-default data-focus:border-ring data-focus:outline-ring data-readonly:cursor-default motion-reduce:transition-none [&:not([disabled]):not([data-disabled]):not([data-readonly]):hover]:bg-muted [&:not([disabled]):not([data-disabled]):not([data-readonly]):hover]:text-foreground [&>svg]:size-4 [&>svg]:shrink-0', local.class)} {...others} data-slot="color-picker-eye-dropper-trigger">
|
|
163
163
|
{resolvedChildren() ?? <PipetteIcon/>}
|
|
164
164
|
</ColorPicker.EyeDropperTrigger>;
|
|
165
165
|
}
|
|
@@ -168,7 +168,7 @@ function ColorPickerFormatSelect(props) {
|
|
|
168
168
|
'class'
|
|
169
169
|
]);
|
|
170
170
|
return <span class="group/format-select relative inline-grid w-fit max-w-full min-w-0 shrink-0">
|
|
171
|
-
<ColorPicker.FormatSelect
|
|
171
|
+
<ColorPicker.FormatSelect class={cn('peer/format-select box-border h-control-md w-auto min-w-0 rounded-md border border-border bg-background px-3 pe-8 text-sm text-foreground uppercase outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color] duration-200 ease-in-out focus:border-ring focus:outline-ring disabled:cursor-default data-disabled:cursor-default data-disabled:opacity-50 data-invalid:border-destructive data-invalid:outline-destructive forced-colors:appearance-auto forced-colors:pe-3', local.class)} {...others} data-slot="color-picker-format-select"/>
|
|
172
172
|
<span aria-hidden="true" class="pointer-events-none absolute top-1/2 right-3 inline-flex size-4 -translate-y-1/2 items-center justify-center rounded-sm bg-transparent leading-none text-muted-foreground transition-[background-color,color,opacity] duration-200 ease-in-out peer-disabled/format-select:opacity-50 peer-data-disabled/format-select:opacity-50 peer-[:not([disabled]):hover]/format-select:bg-muted peer-[:not([disabled]):hover]/format-select:text-foreground forced-colors:hidden [&>svg]:block [&>svg]:size-full">
|
|
173
173
|
<ChevronDownIcon/>
|
|
174
174
|
</span>
|
|
@@ -178,13 +178,13 @@ function ColorPickerFormatTrigger(props) {
|
|
|
178
178
|
const [local, others] = splitProps(props, [
|
|
179
179
|
'class'
|
|
180
180
|
]);
|
|
181
|
-
return <ColorPicker.FormatTrigger
|
|
181
|
+
return <ColorPicker.FormatTrigger class={cn('box-border inline-flex h-control-md min-w-control-md shrink-0 items-center justify-center gap-2 rounded-md border border-border bg-transparent px-2 text-sm text-muted-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,background-color,color] duration-200 ease-in-out focus-visible:border-ring focus-visible:outline-ring disabled:cursor-default data-disabled:cursor-default data-focus:border-ring data-focus:outline-ring data-readonly:cursor-default motion-reduce:transition-none [&:not([disabled]):not([data-disabled]):not([data-readonly]):hover]:bg-muted [&:not([disabled]):not([data-disabled]):not([data-readonly]):hover]:text-foreground [&>svg]:size-4 [&>svg]:shrink-0', local.class)} {...others} data-slot="color-picker-format-trigger"/>;
|
|
182
182
|
}
|
|
183
183
|
function ColorPickerSwatchGroup(props) {
|
|
184
184
|
const [local, others] = splitProps(props, [
|
|
185
185
|
'class'
|
|
186
186
|
]);
|
|
187
|
-
return <ColorPicker.SwatchGroup
|
|
187
|
+
return <ColorPicker.SwatchGroup class={cn('flex flex-wrap gap-2', local.class)} {...others} data-slot="color-picker-swatch-group"/>;
|
|
188
188
|
}
|
|
189
189
|
function ColorPickerSwatchTrigger(props) {
|
|
190
190
|
const [local, others] = splitProps(props, [
|
|
@@ -193,7 +193,7 @@ function ColorPickerSwatchTrigger(props) {
|
|
|
193
193
|
'value'
|
|
194
194
|
]);
|
|
195
195
|
const resolvedChildren = children(()=>local.children);
|
|
196
|
-
return <ColorPicker.SwatchTrigger
|
|
196
|
+
return <ColorPicker.SwatchTrigger class={cn('group/swatch inline-flex cursor-pointer items-center justify-center rounded-sm border-0 bg-transparent p-0 outline-0 focus-visible:ring-2 focus-visible:ring-ring data-disabled:cursor-default data-disabled:opacity-50', local.class)} value={local.value} {...others} data-slot="color-picker-swatch-trigger">
|
|
197
197
|
{resolvedChildren() ?? <ColorPicker.Swatch data-slot="color-picker-swatch" class="relative grid size-control-sm shrink-0 place-items-center overflow-hidden rounded-[inherit] shadow-[inset_0_0_0_1px_color-mix(in_oklab,black_14%,transparent)]" value={local.value}>
|
|
198
198
|
<ColorPicker.SwatchIndicator data-slot="color-picker-swatch-indicator" class="pointer-events-none absolute inset-0 hidden items-center justify-center text-white [filter:drop-shadow(0_1px_1px_rgb(0_0_0_/_45%))] group-data-[state=checked]/swatch:inline-flex data-[state=checked]:inline-flex [&>svg]:size-4">
|
|
199
199
|
<CheckIcon/>
|
|
@@ -205,7 +205,7 @@ function ColorPickerSwatch(props) {
|
|
|
205
205
|
const [local, others] = splitProps(props, [
|
|
206
206
|
'class'
|
|
207
207
|
]);
|
|
208
|
-
return <ColorPicker.Swatch
|
|
208
|
+
return <ColorPicker.Swatch class={cn('relative grid size-control-sm shrink-0 place-items-center overflow-hidden rounded-[inherit] shadow-[inset_0_0_0_1px_color-mix(in_oklab,black_14%,transparent)]', local.class)} {...others} data-slot="color-picker-swatch"/>;
|
|
209
209
|
}
|
|
210
210
|
function ColorPickerSwatchIndicator(props) {
|
|
211
211
|
const [local, others] = splitProps(props, [
|
|
@@ -213,7 +213,7 @@ function ColorPickerSwatchIndicator(props) {
|
|
|
213
213
|
'class'
|
|
214
214
|
]);
|
|
215
215
|
const resolvedChildren = children(()=>local.children);
|
|
216
|
-
return <ColorPicker.SwatchIndicator
|
|
216
|
+
return <ColorPicker.SwatchIndicator class={cn('pointer-events-none absolute inset-0 hidden items-center justify-center text-white [filter:drop-shadow(0_1px_1px_rgb(0_0_0_/_45%))] data-[state=checked]:inline-flex [&>svg]:size-4', local.class)} {...others} data-slot="color-picker-swatch-indicator">
|
|
217
217
|
{resolvedChildren() ?? <CheckIcon/>}
|
|
218
218
|
</ColorPicker.SwatchIndicator>;
|
|
219
219
|
}
|
|
@@ -221,25 +221,25 @@ function ColorPickerTransparencyGrid(props) {
|
|
|
221
221
|
const [local, others] = splitProps(props, [
|
|
222
222
|
'class'
|
|
223
223
|
]);
|
|
224
|
-
return <ColorPicker.TransparencyGrid
|
|
224
|
+
return <ColorPicker.TransparencyGrid class={cn('col-start-1 row-start-1 size-full rounded-[inherit] group-data-[fit-content]/trigger:col-auto group-data-[fit-content]/trigger:row-auto group-data-[fit-content]/trigger:size-4 group-data-[fit-content]/trigger:shrink-0', local.class)} {...others} data-slot="color-picker-transparency-grid"/>;
|
|
225
225
|
}
|
|
226
226
|
function ColorPickerValueSwatch(props) {
|
|
227
227
|
const [local, others] = splitProps(props, [
|
|
228
228
|
'class'
|
|
229
229
|
]);
|
|
230
|
-
return <ColorPicker.ValueSwatch
|
|
230
|
+
return <ColorPicker.ValueSwatch class={cn('z-1 col-start-1 row-start-1 size-full rounded-[inherit] group-data-[fit-content]/trigger:col-auto group-data-[fit-content]/trigger:row-auto group-data-[fit-content]/trigger:size-4 group-data-[fit-content]/trigger:shrink-0', local.class)} {...others} data-slot="color-picker-value-swatch"/>;
|
|
231
231
|
}
|
|
232
232
|
function ColorPickerValueText(props) {
|
|
233
233
|
const [local, others] = splitProps(props, [
|
|
234
234
|
'class'
|
|
235
235
|
]);
|
|
236
|
-
return <ColorPicker.ValueText
|
|
236
|
+
return <ColorPicker.ValueText class={cn('min-w-0 text-sm text-foreground', local.class)} {...others} data-slot="color-picker-value-text"/>;
|
|
237
237
|
}
|
|
238
238
|
function ColorPickerView(props) {
|
|
239
239
|
const [local, others] = splitProps(props, [
|
|
240
240
|
'class'
|
|
241
241
|
]);
|
|
242
|
-
return <ColorPicker.View
|
|
242
|
+
return <ColorPicker.View class={cn('flex min-w-0 flex-col gap-2 [&[hidden]:not([hidden="until-found"])]:hidden', local.class)} {...others} data-slot="color-picker-view"/>;
|
|
243
243
|
}
|
|
244
244
|
const ColorPicker_ColorPicker = Object.assign(ColorPickerRoot, {
|
|
245
245
|
Root: ColorPickerRoot,
|
|
@@ -28,7 +28,6 @@ const Combobox_ComboboxRoot = function(props) {
|
|
|
28
28
|
get asChild () {
|
|
29
29
|
return local.asChild;
|
|
30
30
|
},
|
|
31
|
-
"data-slot": "combobox-root",
|
|
32
31
|
get ["class"] () {
|
|
33
32
|
return cn('box-border flex w-64 max-w-full min-w-0 flex-col gap-1.5 text-foreground', local.class);
|
|
34
33
|
},
|
|
@@ -39,6 +38,7 @@ const Combobox_ComboboxRoot = function(props) {
|
|
|
39
38
|
return local.unmountOnExit ?? true;
|
|
40
39
|
}
|
|
41
40
|
}, others, {
|
|
41
|
+
"data-slot": "combobox-root",
|
|
42
42
|
get children () {
|
|
43
43
|
return local.children;
|
|
44
44
|
}
|
|
@@ -68,7 +68,6 @@ const Combobox_ComboboxRootProvider = function(props) {
|
|
|
68
68
|
get asChild () {
|
|
69
69
|
return local.asChild;
|
|
70
70
|
},
|
|
71
|
-
"data-slot": "combobox-root-provider",
|
|
72
71
|
get ["class"] () {
|
|
73
72
|
return cn('box-border flex w-64 max-w-full min-w-0 flex-col gap-1.5 text-foreground', local.class);
|
|
74
73
|
},
|
|
@@ -79,6 +78,7 @@ const Combobox_ComboboxRootProvider = function(props) {
|
|
|
79
78
|
return local.unmountOnExit ?? true;
|
|
80
79
|
}
|
|
81
80
|
}, others, {
|
|
81
|
+
"data-slot": "combobox-root-provider",
|
|
82
82
|
get children () {
|
|
83
83
|
return local.children;
|
|
84
84
|
}
|
|
@@ -91,22 +91,24 @@ function ComboboxLabel(props) {
|
|
|
91
91
|
'class'
|
|
92
92
|
]);
|
|
93
93
|
return createComponent(Combobox.Label, mergeProps({
|
|
94
|
-
"data-slot": "combobox-label",
|
|
95
94
|
get ["class"] () {
|
|
96
95
|
return cn('inline-flex items-center text-sm font-medium text-foreground select-none data-disabled:opacity-50', local.class);
|
|
97
96
|
}
|
|
98
|
-
}, others
|
|
97
|
+
}, others, {
|
|
98
|
+
"data-slot": "combobox-label"
|
|
99
|
+
}));
|
|
99
100
|
}
|
|
100
101
|
function ComboboxControl(props) {
|
|
101
102
|
const [local, others] = splitProps(props, [
|
|
102
103
|
'class'
|
|
103
104
|
]);
|
|
104
105
|
return createComponent(Combobox.Control, mergeProps({
|
|
105
|
-
"data-slot": "combobox-control",
|
|
106
106
|
get ["class"] () {
|
|
107
107
|
return cn('group/combobox-control relative flex w-full min-w-0 items-center rounded-md border border-border bg-background text-foreground outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,outline-color] duration-200 ease-in-out data-disabled:opacity-50 data-focus:border-ring data-focus:outline-ring data-invalid:border-destructive data-invalid:outline-destructive data-[state=open]:border-ring data-[state=open]:outline-ring motion-reduce:transition-none', local.class);
|
|
108
108
|
}
|
|
109
|
-
}, others
|
|
109
|
+
}, others, {
|
|
110
|
+
"data-slot": "combobox-control"
|
|
111
|
+
}));
|
|
110
112
|
}
|
|
111
113
|
function ComboboxInput(props) {
|
|
112
114
|
const [local, others] = splitProps(props, [
|
|
@@ -117,11 +119,12 @@ function ComboboxInput(props) {
|
|
|
117
119
|
get asChild () {
|
|
118
120
|
return local.asChild;
|
|
119
121
|
},
|
|
120
|
-
"data-slot": "combobox-input",
|
|
121
122
|
get ["class"] () {
|
|
122
123
|
return cn(!local.asChild && 'm-0 box-border h-control-md w-full min-w-0 rounded-[inherit] border-0 bg-transparent px-3.5 text-inherit outline-0 [font:inherit] group-has-[>[data-slot=combobox-clear-trigger]]/combobox-control:pe-[4.375rem] group-has-[>[data-slot=combobox-trigger]]/combobox-control:pe-11 group-has-[>[data-slot=combobox-clear-trigger]]/combobox-control:group-has-[>[data-slot=combobox-trigger]]/combobox-control:pe-[4.375rem] placeholder:text-muted-foreground', local.class);
|
|
123
124
|
}
|
|
124
|
-
}, others
|
|
125
|
+
}, others, {
|
|
126
|
+
"data-slot": "combobox-input"
|
|
127
|
+
}));
|
|
125
128
|
}
|
|
126
129
|
function ComboboxClearTrigger(props) {
|
|
127
130
|
const [local, others] = splitProps(props, [
|
|
@@ -143,9 +146,9 @@ function ComboboxClearTrigger(props) {
|
|
|
143
146
|
get ["aria-labelledby"] () {
|
|
144
147
|
return local['aria-labelledby'];
|
|
145
148
|
},
|
|
146
|
-
"data-slot": "combobox-clear-trigger",
|
|
147
149
|
class: triggerClass
|
|
148
150
|
}, others, {
|
|
151
|
+
"data-slot": "combobox-clear-trigger",
|
|
149
152
|
get children () {
|
|
150
153
|
return local.children;
|
|
151
154
|
}
|
|
@@ -165,9 +168,10 @@ function ComboboxClearTrigger(props) {
|
|
|
165
168
|
}
|
|
166
169
|
}));
|
|
167
170
|
},
|
|
168
|
-
"data-slot": "combobox-clear-trigger",
|
|
169
171
|
class: triggerClass
|
|
170
|
-
}, others
|
|
172
|
+
}, others, {
|
|
173
|
+
"data-slot": "combobox-clear-trigger"
|
|
174
|
+
}));
|
|
171
175
|
}
|
|
172
176
|
function ComboboxTrigger(props) {
|
|
173
177
|
const [local, others] = splitProps(props, [
|
|
@@ -176,11 +180,11 @@ function ComboboxTrigger(props) {
|
|
|
176
180
|
]);
|
|
177
181
|
const resolvedChildren = children(()=>local.children);
|
|
178
182
|
return createComponent(Combobox.Trigger, mergeProps({
|
|
179
|
-
"data-slot": "combobox-trigger",
|
|
180
183
|
get ["class"] () {
|
|
181
184
|
return cn('absolute end-2 top-1/2 m-0 box-border inline-flex size-control-xs shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center rounded-sm border-0 bg-transparent p-0 [line-height:0] text-muted-foreground transition-[background-color,color,opacity] duration-200 ease-in-out focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-ring disabled:cursor-default data-disabled:cursor-default motion-reduce:transition-none [&>svg]:block [&>svg]:size-4 [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:bg-muted [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:text-foreground', local.class);
|
|
182
185
|
}
|
|
183
186
|
}, others, {
|
|
187
|
+
"data-slot": "combobox-trigger",
|
|
184
188
|
get children () {
|
|
185
189
|
return resolvedChildren() ?? createComponent(ChevronUpDownIcon, {});
|
|
186
190
|
}
|
|
@@ -193,11 +197,12 @@ function ComboboxPositioner(props) {
|
|
|
193
197
|
return createComponent(OverlayPortal, {
|
|
194
198
|
get children () {
|
|
195
199
|
return createComponent(Combobox.Positioner, mergeProps({
|
|
196
|
-
"data-slot": "combobox-positioner",
|
|
197
200
|
get ["class"] () {
|
|
198
201
|
return cn('z-[var(--z-index)] outline-0', local.class);
|
|
199
202
|
}
|
|
200
|
-
}, others
|
|
203
|
+
}, others, {
|
|
204
|
+
"data-slot": "combobox-positioner"
|
|
205
|
+
}));
|
|
201
206
|
}
|
|
202
207
|
});
|
|
203
208
|
}
|
|
@@ -206,88 +211,96 @@ function ComboboxContent(props) {
|
|
|
206
211
|
'class'
|
|
207
212
|
]);
|
|
208
213
|
return createComponent(Combobox.Content, mergeProps({
|
|
209
|
-
"data-slot": "combobox-content",
|
|
210
214
|
get ["class"] () {
|
|
211
215
|
return cn('z-[calc(60+var(--layer-index,0))] box-border flex max-h-[min(24rem,var(--available-height))] max-w-[var(--available-width)] min-w-[var(--reference-width)] origin-[var(--transform-origin)] scroll-py-1 flex-col overflow-auto overscroll-contain rounded-md border border-border bg-popover py-1 text-popover-foreground shadow-lg outline-0 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);
|
|
212
216
|
}
|
|
213
|
-
}, others
|
|
217
|
+
}, others, {
|
|
218
|
+
"data-slot": "combobox-content"
|
|
219
|
+
}));
|
|
214
220
|
}
|
|
215
221
|
function ComboboxEmpty(props) {
|
|
216
222
|
const [local, others] = splitProps(props, [
|
|
217
223
|
'class'
|
|
218
224
|
]);
|
|
219
225
|
return createComponent(Combobox.Empty, mergeProps({
|
|
220
|
-
"data-slot": "combobox-empty",
|
|
221
226
|
get ["class"] () {
|
|
222
227
|
return cn('px-4 py-1 text-sm text-muted-foreground', local.class);
|
|
223
228
|
}
|
|
224
|
-
}, others
|
|
229
|
+
}, others, {
|
|
230
|
+
"data-slot": "combobox-empty"
|
|
231
|
+
}));
|
|
225
232
|
}
|
|
226
233
|
function ComboboxStatus(props) {
|
|
227
234
|
const [local, others] = splitProps(props, [
|
|
228
235
|
'class'
|
|
229
236
|
]);
|
|
230
237
|
return createComponent(ark.div, mergeProps({
|
|
231
|
-
"data-slot": "combobox-status",
|
|
232
238
|
get ["class"] () {
|
|
233
239
|
return cn('px-4 py-1 text-sm text-muted-foreground', local.class);
|
|
234
240
|
}
|
|
235
|
-
}, others
|
|
241
|
+
}, others, {
|
|
242
|
+
"data-slot": "combobox-status"
|
|
243
|
+
}));
|
|
236
244
|
}
|
|
237
245
|
function ComboboxList(props) {
|
|
238
246
|
const [local, others] = splitProps(props, [
|
|
239
247
|
'class'
|
|
240
248
|
]);
|
|
241
249
|
return createComponent(Combobox.List, mergeProps({
|
|
242
|
-
"data-slot": "combobox-list",
|
|
243
250
|
get ["class"] () {
|
|
244
251
|
return cn('flex min-h-0 flex-col outline-0 data-empty:hidden', local.class);
|
|
245
252
|
}
|
|
246
|
-
}, others
|
|
253
|
+
}, others, {
|
|
254
|
+
"data-slot": "combobox-list"
|
|
255
|
+
}));
|
|
247
256
|
}
|
|
248
257
|
function ComboboxItemGroup(props) {
|
|
249
258
|
const [local, others] = splitProps(props, [
|
|
250
259
|
'class'
|
|
251
260
|
]);
|
|
252
261
|
return createComponent(Combobox.ItemGroup, mergeProps({
|
|
253
|
-
"data-slot": "combobox-item-group",
|
|
254
262
|
get ["class"] () {
|
|
255
263
|
return cn('flex flex-col [&+&]:mt-2', local.class);
|
|
256
264
|
}
|
|
257
|
-
}, others
|
|
265
|
+
}, others, {
|
|
266
|
+
"data-slot": "combobox-item-group"
|
|
267
|
+
}));
|
|
258
268
|
}
|
|
259
269
|
function ComboboxItemGroupLabel(props) {
|
|
260
270
|
const [local, others] = splitProps(props, [
|
|
261
271
|
'class'
|
|
262
272
|
]);
|
|
263
273
|
return createComponent(Combobox.ItemGroupLabel, mergeProps({
|
|
264
|
-
"data-slot": "combobox-item-group-label",
|
|
265
274
|
get ["class"] () {
|
|
266
275
|
return cn('sticky -top-1 z-1 bg-popover px-2.5 py-1 text-xs font-normal text-muted-foreground', local.class);
|
|
267
276
|
}
|
|
268
|
-
}, others
|
|
277
|
+
}, others, {
|
|
278
|
+
"data-slot": "combobox-item-group-label"
|
|
279
|
+
}));
|
|
269
280
|
}
|
|
270
281
|
function ComboboxItem(props) {
|
|
271
282
|
const [local, others] = splitProps(props, [
|
|
272
283
|
'class'
|
|
273
284
|
]);
|
|
274
285
|
return createComponent(Combobox.Item, mergeProps({
|
|
275
|
-
"data-slot": "combobox-item",
|
|
276
286
|
get ["class"] () {
|
|
277
287
|
return cn('relative mx-1 box-border flex min-h-control-sm w-[calc(100%-0.5rem)] cursor-default items-center justify-between gap-2 rounded-sm border-0 bg-transparent px-3 py-1 text-sm text-popover-foreground outline-0 select-none data-disabled:pointer-events-none data-disabled:text-muted-foreground data-disabled:opacity-50 data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[state=checked]:text-popover-foreground', local.class);
|
|
278
288
|
}
|
|
279
|
-
}, others
|
|
289
|
+
}, others, {
|
|
290
|
+
"data-slot": "combobox-item"
|
|
291
|
+
}));
|
|
280
292
|
}
|
|
281
293
|
function ComboboxItemText(props) {
|
|
282
294
|
const [local, others] = splitProps(props, [
|
|
283
295
|
'class'
|
|
284
296
|
]);
|
|
285
297
|
return createComponent(Combobox.ItemText, mergeProps({
|
|
286
|
-
"data-slot": "combobox-item-text",
|
|
287
298
|
get ["class"] () {
|
|
288
299
|
return cn('min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap', local.class);
|
|
289
300
|
}
|
|
290
|
-
}, others
|
|
301
|
+
}, others, {
|
|
302
|
+
"data-slot": "combobox-item-text"
|
|
303
|
+
}));
|
|
291
304
|
}
|
|
292
305
|
function ComboboxItemIndicator(props) {
|
|
293
306
|
const [local, others] = splitProps(props, [
|
|
@@ -296,11 +309,11 @@ function ComboboxItemIndicator(props) {
|
|
|
296
309
|
]);
|
|
297
310
|
const resolvedChildren = children(()=>local.children);
|
|
298
311
|
return createComponent(Combobox.ItemIndicator, mergeProps({
|
|
299
|
-
"data-slot": "combobox-item-indicator",
|
|
300
312
|
get ["class"] () {
|
|
301
313
|
return cn('inline-flex size-3 shrink-0 items-center justify-center [&>svg]:size-full', local.class);
|
|
302
314
|
}
|
|
303
315
|
}, others, {
|
|
316
|
+
"data-slot": "combobox-item-indicator",
|
|
304
317
|
get children () {
|
|
305
318
|
return resolvedChildren() ?? createComponent(CheckIcon, {});
|
|
306
319
|
}
|