@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
|
@@ -28,7 +28,6 @@ const Select_SelectRoot = function(props) {
|
|
|
28
28
|
get asChild () {
|
|
29
29
|
return local.asChild;
|
|
30
30
|
},
|
|
31
|
-
"data-slot": "select-root",
|
|
32
31
|
get ["class"] () {
|
|
33
32
|
return cn('flex w-56 max-w-full min-w-0 flex-col gap-1.5 text-foreground', local.class);
|
|
34
33
|
},
|
|
@@ -39,6 +38,7 @@ const Select_SelectRoot = function(props) {
|
|
|
39
38
|
return local.unmountOnExit ?? true;
|
|
40
39
|
}
|
|
41
40
|
}, others, {
|
|
41
|
+
"data-slot": "select-root",
|
|
42
42
|
get children () {
|
|
43
43
|
return local.children;
|
|
44
44
|
}
|
|
@@ -68,7 +68,6 @@ const Select_SelectRootProvider = function(props) {
|
|
|
68
68
|
get asChild () {
|
|
69
69
|
return local.asChild;
|
|
70
70
|
},
|
|
71
|
-
"data-slot": "select-root-provider",
|
|
72
71
|
get ["class"] () {
|
|
73
72
|
return cn('flex w-56 max-w-full min-w-0 flex-col gap-1.5 text-foreground', local.class);
|
|
74
73
|
},
|
|
@@ -79,6 +78,7 @@ const Select_SelectRootProvider = function(props) {
|
|
|
79
78
|
return local.unmountOnExit ?? true;
|
|
80
79
|
}
|
|
81
80
|
}, others, {
|
|
81
|
+
"data-slot": "select-root-provider",
|
|
82
82
|
get children () {
|
|
83
83
|
return local.children;
|
|
84
84
|
}
|
|
@@ -91,22 +91,24 @@ function SelectLabel(props) {
|
|
|
91
91
|
'class'
|
|
92
92
|
]);
|
|
93
93
|
return createComponent(Select.Label, mergeProps({
|
|
94
|
-
"data-slot": "select-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": "select-label"
|
|
99
|
+
}));
|
|
99
100
|
}
|
|
100
101
|
function SelectControl(props) {
|
|
101
102
|
const [local, others] = splitProps(props, [
|
|
102
103
|
'class'
|
|
103
104
|
]);
|
|
104
105
|
return createComponent(Select.Control, mergeProps({
|
|
105
|
-
"data-slot": "select-control",
|
|
106
106
|
get ["class"] () {
|
|
107
107
|
return cn('group/select-control relative flex w-full min-w-0 items-center text-foreground data-disabled:opacity-50', local.class);
|
|
108
108
|
}
|
|
109
|
-
}, others
|
|
109
|
+
}, others, {
|
|
110
|
+
"data-slot": "select-control"
|
|
111
|
+
}));
|
|
110
112
|
}
|
|
111
113
|
function SelectTrigger(props) {
|
|
112
114
|
const [local, others] = splitProps(props, [
|
|
@@ -117,22 +119,24 @@ function SelectTrigger(props) {
|
|
|
117
119
|
get asChild () {
|
|
118
120
|
return local.asChild;
|
|
119
121
|
},
|
|
120
|
-
"data-slot": "select-trigger",
|
|
121
122
|
get ["class"] () {
|
|
122
123
|
return cn(!local.asChild && 'peer/select-trigger relative inline-flex h-control-md w-full min-w-0 cursor-pointer items-center justify-start rounded-md border border-border bg-background px-3.5 pe-[2.875rem] text-start text-inherit outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,outline-color] duration-200 ease-in-out select-none [font:inherit] group-has-[>[data-slot=select-clear-trigger]:not([hidden])]/select-control:pe-[4.25rem] group-data-invalid/select-control:border-destructive group-data-invalid/select-control:outline-destructive focus-visible:border-ring focus-visible:outline-ring disabled:cursor-default data-disabled:cursor-default data-placeholder-shown:text-muted-foreground data-[state=open]:border-ring data-[state=open]:outline-ring motion-reduce:transition-none', local.class);
|
|
123
124
|
}
|
|
124
|
-
}, others
|
|
125
|
+
}, others, {
|
|
126
|
+
"data-slot": "select-trigger"
|
|
127
|
+
}));
|
|
125
128
|
}
|
|
126
129
|
function SelectValueText(props) {
|
|
127
130
|
const [local, others] = splitProps(props, [
|
|
128
131
|
'class'
|
|
129
132
|
]);
|
|
130
133
|
return createComponent(Select.ValueText, mergeProps({
|
|
131
|
-
"data-slot": "select-value-text",
|
|
132
134
|
get ["class"] () {
|
|
133
135
|
return cn('min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap', local.class);
|
|
134
136
|
}
|
|
135
|
-
}, others
|
|
137
|
+
}, others, {
|
|
138
|
+
"data-slot": "select-value-text"
|
|
139
|
+
}));
|
|
136
140
|
}
|
|
137
141
|
function SelectClearTrigger(props) {
|
|
138
142
|
const [local, others] = splitProps(props, [
|
|
@@ -153,11 +157,11 @@ function SelectClearTrigger(props) {
|
|
|
153
157
|
get ["aria-labelledby"] () {
|
|
154
158
|
return local['aria-labelledby'];
|
|
155
159
|
},
|
|
156
|
-
"data-slot": "select-clear-trigger",
|
|
157
160
|
get ["class"] () {
|
|
158
161
|
return cn('pointer-events-auto absolute inset-y-0 end-[2.125rem] my-auto size-control-xs transition-[background-color,color,opacity] duration-200 ease-in-out focus-visible:outline-1 focus-visible:outline-offset-1 motion-reduce:transition-none [&>svg]:size-4', local.class);
|
|
159
162
|
}
|
|
160
163
|
}, others, {
|
|
164
|
+
"data-slot": "select-clear-trigger",
|
|
161
165
|
get children () {
|
|
162
166
|
return local.children;
|
|
163
167
|
}
|
|
@@ -177,11 +181,12 @@ function SelectClearTrigger(props) {
|
|
|
177
181
|
}
|
|
178
182
|
}));
|
|
179
183
|
},
|
|
180
|
-
"data-slot": "select-clear-trigger",
|
|
181
184
|
get ["class"] () {
|
|
182
185
|
return cn('pointer-events-auto absolute inset-y-0 end-[2.125rem] my-auto size-control-xs transition-[background-color,color,opacity] duration-200 ease-in-out focus-visible:outline-1 focus-visible:outline-offset-1 motion-reduce:transition-none [&>svg]:size-4', local.class);
|
|
183
186
|
}
|
|
184
|
-
}, others
|
|
187
|
+
}, others, {
|
|
188
|
+
"data-slot": "select-clear-trigger"
|
|
189
|
+
}));
|
|
185
190
|
}
|
|
186
191
|
function SelectIndicator(props) {
|
|
187
192
|
const [local, others] = splitProps(props, [
|
|
@@ -190,11 +195,11 @@ function SelectIndicator(props) {
|
|
|
190
195
|
]);
|
|
191
196
|
const resolvedChildren = children(()=>local.children);
|
|
192
197
|
return createComponent(Select.Indicator, mergeProps({
|
|
193
|
-
"data-slot": "select-indicator",
|
|
194
198
|
get ["class"] () {
|
|
195
199
|
return cn('pointer-events-none inline-flex size-control-xs shrink-0 items-center justify-center rounded-sm bg-transparent leading-none text-muted-foreground transition-[background-color,color,opacity] duration-200 ease-in-out peer-[:not([disabled]):not([data-disabled]):hover]/select-trigger:bg-muted peer-[:not([disabled]):not([data-disabled]):hover]/select-trigger:text-foreground motion-reduce:transition-none [&>svg]:block [&>svg]:size-4', local.class);
|
|
196
200
|
}
|
|
197
201
|
}, others, {
|
|
202
|
+
"data-slot": "select-indicator",
|
|
198
203
|
get children () {
|
|
199
204
|
return resolvedChildren() ?? createComponent(ChevronUpDownIcon, {});
|
|
200
205
|
}
|
|
@@ -240,11 +245,12 @@ function SelectPositioner(props) {
|
|
|
240
245
|
return createComponent(OverlayPortal, {
|
|
241
246
|
get children () {
|
|
242
247
|
return createComponent(Select.Positioner, mergeProps({
|
|
243
|
-
"data-slot": "select-positioner",
|
|
244
248
|
get ["class"] () {
|
|
245
249
|
return cn('z-[var(--z-index)] outline-0', local.class);
|
|
246
250
|
}
|
|
247
|
-
}, others
|
|
251
|
+
}, others, {
|
|
252
|
+
"data-slot": "select-positioner"
|
|
253
|
+
}));
|
|
248
254
|
}
|
|
249
255
|
});
|
|
250
256
|
}
|
|
@@ -253,66 +259,72 @@ function SelectContent(props) {
|
|
|
253
259
|
'class'
|
|
254
260
|
]);
|
|
255
261
|
return createComponent(Select.Content, mergeProps({
|
|
256
|
-
"data-slot": "select-content",
|
|
257
262
|
get ["class"] () {
|
|
258
263
|
return cn('z-[calc(60+var(--layer-index,0))] 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]:pointer-events-none data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:animate-none', local.class);
|
|
259
264
|
}
|
|
260
|
-
}, others
|
|
265
|
+
}, others, {
|
|
266
|
+
"data-slot": "select-content"
|
|
267
|
+
}));
|
|
261
268
|
}
|
|
262
269
|
function SelectList(props) {
|
|
263
270
|
const [local, others] = splitProps(props, [
|
|
264
271
|
'class'
|
|
265
272
|
]);
|
|
266
273
|
return createComponent(Select.List, mergeProps({
|
|
267
|
-
"data-slot": "select-list",
|
|
268
274
|
get ["class"] () {
|
|
269
275
|
return cn('flex min-h-0 scroll-py-1 flex-col overflow-y-auto overscroll-contain outline-0', local.class);
|
|
270
276
|
}
|
|
271
|
-
}, others
|
|
277
|
+
}, others, {
|
|
278
|
+
"data-slot": "select-list"
|
|
279
|
+
}));
|
|
272
280
|
}
|
|
273
281
|
function SelectItemGroup(props) {
|
|
274
282
|
const [local, others] = splitProps(props, [
|
|
275
283
|
'class'
|
|
276
284
|
]);
|
|
277
285
|
return createComponent(Select.ItemGroup, mergeProps({
|
|
278
|
-
"data-slot": "select-item-group",
|
|
279
286
|
get ["class"] () {
|
|
280
287
|
return cn('flex flex-col [&+&]:mt-2', local.class);
|
|
281
288
|
}
|
|
282
|
-
}, others
|
|
289
|
+
}, others, {
|
|
290
|
+
"data-slot": "select-item-group"
|
|
291
|
+
}));
|
|
283
292
|
}
|
|
284
293
|
function SelectItemGroupLabel(props) {
|
|
285
294
|
const [local, others] = splitProps(props, [
|
|
286
295
|
'class'
|
|
287
296
|
]);
|
|
288
297
|
return createComponent(Select.ItemGroupLabel, mergeProps({
|
|
289
|
-
"data-slot": "select-item-group-label",
|
|
290
298
|
get ["class"] () {
|
|
291
299
|
return cn('px-2.5 py-1 text-xs font-normal text-muted-foreground', local.class);
|
|
292
300
|
}
|
|
293
|
-
}, others
|
|
301
|
+
}, others, {
|
|
302
|
+
"data-slot": "select-item-group-label"
|
|
303
|
+
}));
|
|
294
304
|
}
|
|
295
305
|
function SelectItem(props) {
|
|
296
306
|
const [local, others] = splitProps(props, [
|
|
297
307
|
'class'
|
|
298
308
|
]);
|
|
299
309
|
return createComponent(Select.Item, mergeProps({
|
|
300
|
-
"data-slot": "select-item",
|
|
301
310
|
get ["class"] () {
|
|
302
311
|
return cn('relative mx-1 flex min-h-control-sm w-[calc(100%-0.5rem)] cursor-default items-center justify-between gap-2 rounded-sm 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', local.class);
|
|
303
312
|
}
|
|
304
|
-
}, others
|
|
313
|
+
}, others, {
|
|
314
|
+
"data-slot": "select-item"
|
|
315
|
+
}));
|
|
305
316
|
}
|
|
306
317
|
function SelectItemText(props) {
|
|
307
318
|
const [local, others] = splitProps(props, [
|
|
308
319
|
'class'
|
|
309
320
|
]);
|
|
310
321
|
return createComponent(Select.ItemText, mergeProps({
|
|
311
|
-
"data-slot": "select-item-text",
|
|
312
322
|
get ["class"] () {
|
|
313
323
|
return cn('min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap', local.class);
|
|
314
324
|
}
|
|
315
|
-
}, others
|
|
325
|
+
}, others, {
|
|
326
|
+
"data-slot": "select-item-text"
|
|
327
|
+
}));
|
|
316
328
|
}
|
|
317
329
|
function SelectItemIndicator(props) {
|
|
318
330
|
const [local, others] = splitProps(props, [
|
|
@@ -321,11 +333,11 @@ function SelectItemIndicator(props) {
|
|
|
321
333
|
]);
|
|
322
334
|
const resolvedChildren = children(()=>local.children);
|
|
323
335
|
return createComponent(Select.ItemIndicator, mergeProps({
|
|
324
|
-
"data-slot": "select-item-indicator",
|
|
325
336
|
get ["class"] () {
|
|
326
337
|
return cn('inline-flex size-3.5 shrink-0 items-center justify-center [&>svg]:size-3', local.class);
|
|
327
338
|
}
|
|
328
339
|
}, others, {
|
|
340
|
+
"data-slot": "select-item-indicator",
|
|
329
341
|
get children () {
|
|
330
342
|
return resolvedChildren() ?? createComponent(CheckIcon, {});
|
|
331
343
|
}
|
|
@@ -336,33 +348,36 @@ function SelectItemTextContent(props) {
|
|
|
336
348
|
'class'
|
|
337
349
|
]);
|
|
338
350
|
return createComponent(ark.span, mergeProps({
|
|
339
|
-
"data-slot": "select-item-text-content",
|
|
340
351
|
get ["class"] () {
|
|
341
352
|
return cn('inline-flex max-w-full min-w-0 items-center gap-2 align-top', local.class);
|
|
342
353
|
}
|
|
343
|
-
}, others
|
|
354
|
+
}, others, {
|
|
355
|
+
"data-slot": "select-item-text-content"
|
|
356
|
+
}));
|
|
344
357
|
}
|
|
345
358
|
function SelectItemTextIcon(props) {
|
|
346
359
|
const [local, others] = splitProps(props, [
|
|
347
360
|
'class'
|
|
348
361
|
]);
|
|
349
362
|
return createComponent(ark.span, mergeProps({
|
|
350
|
-
"data-slot": "select-item-text-icon",
|
|
351
363
|
get ["class"] () {
|
|
352
364
|
return cn('inline-flex size-4 shrink-0 items-center justify-center', local.class);
|
|
353
365
|
}
|
|
354
|
-
}, others
|
|
366
|
+
}, others, {
|
|
367
|
+
"data-slot": "select-item-text-icon"
|
|
368
|
+
}));
|
|
355
369
|
}
|
|
356
370
|
function SelectItemTextLabel(props) {
|
|
357
371
|
const [local, others] = splitProps(props, [
|
|
358
372
|
'class'
|
|
359
373
|
]);
|
|
360
374
|
return createComponent(ark.span, mergeProps({
|
|
361
|
-
"data-slot": "select-item-text-label",
|
|
362
375
|
get ["class"] () {
|
|
363
376
|
return cn('min-w-0 overflow-hidden text-ellipsis whitespace-nowrap', local.class);
|
|
364
377
|
}
|
|
365
|
-
}, others
|
|
378
|
+
}, others, {
|
|
379
|
+
"data-slot": "select-item-text-label"
|
|
380
|
+
}));
|
|
366
381
|
}
|
|
367
382
|
const Select_Select = Object.assign(Select_SelectRoot, {
|
|
368
383
|
Root: Select_SelectRoot,
|
|
@@ -16,7 +16,7 @@ const Select_SelectRoot = function(props) {
|
|
|
16
16
|
'unmountOnExit'
|
|
17
17
|
]);
|
|
18
18
|
return <OverlayPortalProvider portalled={local.portalled} portalRef={local.portalRef}>
|
|
19
|
-
<Select.Root asChild={local.asChild}
|
|
19
|
+
<Select.Root asChild={local.asChild} class={cn('flex w-56 max-w-full min-w-0 flex-col gap-1.5 text-foreground', local.class)} lazyMount={local.lazyMount ?? true} unmountOnExit={local.unmountOnExit ?? true} {...others} data-slot="select-root">
|
|
20
20
|
{local.children}
|
|
21
21
|
</Select.Root>
|
|
22
22
|
</OverlayPortalProvider>;
|
|
@@ -32,7 +32,7 @@ const Select_SelectRootProvider = function(props) {
|
|
|
32
32
|
'unmountOnExit'
|
|
33
33
|
]);
|
|
34
34
|
return <OverlayPortalProvider portalled={local.portalled} portalRef={local.portalRef}>
|
|
35
|
-
<Select.RootProvider asChild={local.asChild}
|
|
35
|
+
<Select.RootProvider asChild={local.asChild} class={cn('flex w-56 max-w-full min-w-0 flex-col gap-1.5 text-foreground', local.class)} lazyMount={local.lazyMount ?? true} unmountOnExit={local.unmountOnExit ?? true} {...others} data-slot="select-root-provider">
|
|
36
36
|
{local.children}
|
|
37
37
|
</Select.RootProvider>
|
|
38
38
|
</OverlayPortalProvider>;
|
|
@@ -41,26 +41,26 @@ function SelectLabel(props) {
|
|
|
41
41
|
const [local, others] = splitProps(props, [
|
|
42
42
|
'class'
|
|
43
43
|
]);
|
|
44
|
-
return <Select.Label
|
|
44
|
+
return <Select.Label class={cn('inline-flex items-center text-sm font-medium text-foreground select-none data-disabled:opacity-50', local.class)} {...others} data-slot="select-label"/>;
|
|
45
45
|
}
|
|
46
46
|
function SelectControl(props) {
|
|
47
47
|
const [local, others] = splitProps(props, [
|
|
48
48
|
'class'
|
|
49
49
|
]);
|
|
50
|
-
return <Select.Control
|
|
50
|
+
return <Select.Control class={cn('group/select-control relative flex w-full min-w-0 items-center text-foreground data-disabled:opacity-50', local.class)} {...others} data-slot="select-control"/>;
|
|
51
51
|
}
|
|
52
52
|
function SelectTrigger(props) {
|
|
53
53
|
const [local, others] = splitProps(props, [
|
|
54
54
|
'asChild',
|
|
55
55
|
'class'
|
|
56
56
|
]);
|
|
57
|
-
return <Select.Trigger asChild={local.asChild}
|
|
57
|
+
return <Select.Trigger asChild={local.asChild} class={cn(!local.asChild && 'peer/select-trigger relative inline-flex h-control-md w-full min-w-0 cursor-pointer items-center justify-start rounded-md border border-border bg-background px-3.5 pe-[2.875rem] text-start text-inherit outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,outline-color] duration-200 ease-in-out select-none [font:inherit] group-has-[>[data-slot=select-clear-trigger]:not([hidden])]/select-control:pe-[4.25rem] group-data-invalid/select-control:border-destructive group-data-invalid/select-control:outline-destructive focus-visible:border-ring focus-visible:outline-ring disabled:cursor-default data-disabled:cursor-default data-placeholder-shown:text-muted-foreground data-[state=open]:border-ring data-[state=open]:outline-ring motion-reduce:transition-none', local.class)} {...others} data-slot="select-trigger"/>;
|
|
58
58
|
}
|
|
59
59
|
function SelectValueText(props) {
|
|
60
60
|
const [local, others] = splitProps(props, [
|
|
61
61
|
'class'
|
|
62
62
|
]);
|
|
63
|
-
return <Select.ValueText
|
|
63
|
+
return <Select.ValueText class={cn('min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap', local.class)} {...others} data-slot="select-value-text"/>;
|
|
64
64
|
}
|
|
65
65
|
function SelectClearTrigger(props) {
|
|
66
66
|
const [local, others] = splitProps(props, [
|
|
@@ -71,7 +71,7 @@ function SelectClearTrigger(props) {
|
|
|
71
71
|
'class'
|
|
72
72
|
]);
|
|
73
73
|
const resolvedChildren = children(()=>local.children);
|
|
74
|
-
if (local.asChild) return <Select.ClearTrigger asChild={local.asChild} aria-label={local['aria-label']} aria-labelledby={local['aria-labelledby']}
|
|
74
|
+
if (local.asChild) return <Select.ClearTrigger asChild={local.asChild} aria-label={local['aria-label']} aria-labelledby={local['aria-labelledby']} class={cn('pointer-events-auto absolute inset-y-0 end-[2.125rem] my-auto size-control-xs transition-[background-color,color,opacity] duration-200 ease-in-out focus-visible:outline-1 focus-visible:outline-offset-1 motion-reduce:transition-none [&>svg]:size-4', local.class)} {...others} data-slot="select-clear-trigger">
|
|
75
75
|
{local.children}
|
|
76
76
|
</Select.ClearTrigger>;
|
|
77
77
|
return <Select.ClearTrigger asChild={(triggerProps)=>{
|
|
@@ -79,7 +79,7 @@ function SelectClearTrigger(props) {
|
|
|
79
79
|
return <CloseButton.Root {...resolvedProps} aria-label={local['aria-label'] ?? (null == local['aria-labelledby'] ? 'Clear selection' : void 0)} aria-labelledby={local['aria-labelledby']}>
|
|
80
80
|
{resolvedChildren()}
|
|
81
81
|
</CloseButton.Root>;
|
|
82
|
-
}}
|
|
82
|
+
}} class={cn('pointer-events-auto absolute inset-y-0 end-[2.125rem] my-auto size-control-xs transition-[background-color,color,opacity] duration-200 ease-in-out focus-visible:outline-1 focus-visible:outline-offset-1 motion-reduce:transition-none [&>svg]:size-4', local.class)} {...others} data-slot="select-clear-trigger"/>;
|
|
83
83
|
}
|
|
84
84
|
function SelectIndicator(props) {
|
|
85
85
|
const [local, others] = splitProps(props, [
|
|
@@ -87,7 +87,7 @@ function SelectIndicator(props) {
|
|
|
87
87
|
'class'
|
|
88
88
|
]);
|
|
89
89
|
const resolvedChildren = children(()=>local.children);
|
|
90
|
-
return <Select.Indicator
|
|
90
|
+
return <Select.Indicator class={cn('pointer-events-none inline-flex size-control-xs shrink-0 items-center justify-center rounded-sm bg-transparent leading-none text-muted-foreground transition-[background-color,color,opacity] duration-200 ease-in-out peer-[:not([disabled]):not([data-disabled]):hover]/select-trigger:bg-muted peer-[:not([disabled]):not([data-disabled]):hover]/select-trigger:text-foreground motion-reduce:transition-none [&>svg]:block [&>svg]:size-4', local.class)} {...others} data-slot="select-indicator">
|
|
91
91
|
{resolvedChildren() ?? <ChevronUpDownIcon/>}
|
|
92
92
|
</Select.Indicator>;
|
|
93
93
|
}
|
|
@@ -112,44 +112,44 @@ function SelectPositioner(props) {
|
|
|
112
112
|
'class'
|
|
113
113
|
]);
|
|
114
114
|
return <OverlayPortal>
|
|
115
|
-
<Select.Positioner
|
|
115
|
+
<Select.Positioner class={cn('z-[var(--z-index)] outline-0', local.class)} {...others} data-slot="select-positioner"/>
|
|
116
116
|
</OverlayPortal>;
|
|
117
117
|
}
|
|
118
118
|
function SelectContent(props) {
|
|
119
119
|
const [local, others] = splitProps(props, [
|
|
120
120
|
'class'
|
|
121
121
|
]);
|
|
122
|
-
return <Select.Content
|
|
122
|
+
return <Select.Content class={cn('z-[calc(60+var(--layer-index,0))] 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]:pointer-events-none data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:animate-none', local.class)} {...others} data-slot="select-content"/>;
|
|
123
123
|
}
|
|
124
124
|
function SelectList(props) {
|
|
125
125
|
const [local, others] = splitProps(props, [
|
|
126
126
|
'class'
|
|
127
127
|
]);
|
|
128
|
-
return <Select.List
|
|
128
|
+
return <Select.List class={cn('flex min-h-0 scroll-py-1 flex-col overflow-y-auto overscroll-contain outline-0', local.class)} {...others} data-slot="select-list"/>;
|
|
129
129
|
}
|
|
130
130
|
function SelectItemGroup(props) {
|
|
131
131
|
const [local, others] = splitProps(props, [
|
|
132
132
|
'class'
|
|
133
133
|
]);
|
|
134
|
-
return <Select.ItemGroup
|
|
134
|
+
return <Select.ItemGroup class={cn('flex flex-col [&+&]:mt-2', local.class)} {...others} data-slot="select-item-group"/>;
|
|
135
135
|
}
|
|
136
136
|
function SelectItemGroupLabel(props) {
|
|
137
137
|
const [local, others] = splitProps(props, [
|
|
138
138
|
'class'
|
|
139
139
|
]);
|
|
140
|
-
return <Select.ItemGroupLabel
|
|
140
|
+
return <Select.ItemGroupLabel class={cn('px-2.5 py-1 text-xs font-normal text-muted-foreground', local.class)} {...others} data-slot="select-item-group-label"/>;
|
|
141
141
|
}
|
|
142
142
|
function SelectItem(props) {
|
|
143
143
|
const [local, others] = splitProps(props, [
|
|
144
144
|
'class'
|
|
145
145
|
]);
|
|
146
|
-
return <Select.Item
|
|
146
|
+
return <Select.Item class={cn('relative mx-1 flex min-h-control-sm w-[calc(100%-0.5rem)] cursor-default items-center justify-between gap-2 rounded-sm 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', local.class)} {...others} data-slot="select-item"/>;
|
|
147
147
|
}
|
|
148
148
|
function SelectItemText(props) {
|
|
149
149
|
const [local, others] = splitProps(props, [
|
|
150
150
|
'class'
|
|
151
151
|
]);
|
|
152
|
-
return <Select.ItemText
|
|
152
|
+
return <Select.ItemText class={cn('min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap', local.class)} {...others} data-slot="select-item-text"/>;
|
|
153
153
|
}
|
|
154
154
|
function SelectItemIndicator(props) {
|
|
155
155
|
const [local, others] = splitProps(props, [
|
|
@@ -157,7 +157,7 @@ function SelectItemIndicator(props) {
|
|
|
157
157
|
'class'
|
|
158
158
|
]);
|
|
159
159
|
const resolvedChildren = children(()=>local.children);
|
|
160
|
-
return <Select.ItemIndicator
|
|
160
|
+
return <Select.ItemIndicator class={cn('inline-flex size-3.5 shrink-0 items-center justify-center [&>svg]:size-3', local.class)} {...others} data-slot="select-item-indicator">
|
|
161
161
|
{resolvedChildren() ?? <CheckIcon/>}
|
|
162
162
|
</Select.ItemIndicator>;
|
|
163
163
|
}
|
|
@@ -165,19 +165,19 @@ function SelectItemTextContent(props) {
|
|
|
165
165
|
const [local, others] = splitProps(props, [
|
|
166
166
|
'class'
|
|
167
167
|
]);
|
|
168
|
-
return <ark.span
|
|
168
|
+
return <ark.span class={cn('inline-flex max-w-full min-w-0 items-center gap-2 align-top', local.class)} {...others} data-slot="select-item-text-content"/>;
|
|
169
169
|
}
|
|
170
170
|
function SelectItemTextIcon(props) {
|
|
171
171
|
const [local, others] = splitProps(props, [
|
|
172
172
|
'class'
|
|
173
173
|
]);
|
|
174
|
-
return <ark.span
|
|
174
|
+
return <ark.span class={cn('inline-flex size-4 shrink-0 items-center justify-center', local.class)} {...others} data-slot="select-item-text-icon"/>;
|
|
175
175
|
}
|
|
176
176
|
function SelectItemTextLabel(props) {
|
|
177
177
|
const [local, others] = splitProps(props, [
|
|
178
178
|
'class'
|
|
179
179
|
]);
|
|
180
|
-
return <ark.span
|
|
180
|
+
return <ark.span class={cn('min-w-0 overflow-hidden text-ellipsis whitespace-nowrap', local.class)} {...others} data-slot="select-item-text-label"/>;
|
|
181
181
|
}
|
|
182
182
|
const Select_Select = Object.assign(Select_SelectRoot, {
|
|
183
183
|
Root: Select_SelectRoot,
|