@moduix/solid-tailwind 1.1.0 → 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/command-palette/CommandPalette.js +1 -1
- package/dist/components/command-palette/CommandPalette.jsx +1 -1
- 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 +10 -11
|
@@ -53,9 +53,7 @@ function toggleSidebarPanel(splitter, panelId) {
|
|
|
53
53
|
splitter().collapsePanel(panelId);
|
|
54
54
|
}
|
|
55
55
|
function useSidebarConfig() {
|
|
56
|
-
|
|
57
|
-
if (!config) throw new Error('Sidebar components must be used within Sidebar.Root');
|
|
58
|
-
return config;
|
|
56
|
+
return useContext(SidebarConfigContext);
|
|
59
57
|
}
|
|
60
58
|
function SidebarRoot(props) {
|
|
61
59
|
const [local, others] = splitProps(props, [
|
|
@@ -86,7 +84,7 @@ function SidebarRoot(props) {
|
|
|
86
84
|
},
|
|
87
85
|
"data-slot": "sidebar-root",
|
|
88
86
|
get ["class"] () {
|
|
89
|
-
return cn('group/splitter relative box-border h-112 min-h-0 w-full min-w-0 rounded-md border border-border bg-card text-foreground shadow-sm data-dragging:cursor-col-resize
|
|
87
|
+
return cn('group/splitter relative box-border h-112 min-h-0 w-full min-w-0 rounded-md border border-border bg-card text-foreground shadow-sm data-dragging:cursor-col-resize', 'isolate h-dvh min-h-96 w-full min-w-0 rounded-none border border-border bg-background text-foreground shadow-none', local.class);
|
|
90
88
|
},
|
|
91
89
|
get style () {
|
|
92
90
|
return memo(()=>'string' == typeof local.style)() ? `width:;height:;${local.style}` : {
|
|
@@ -129,7 +127,7 @@ function SidebarPanel(props) {
|
|
|
129
127
|
return collapsed() ? 'collapsed' : 'expanded';
|
|
130
128
|
},
|
|
131
129
|
get ["class"] () {
|
|
132
|
-
return cn('box-border min-h-50 min-w-0 overflow-auto rounded-none border-0 border-border bg-card p-4 text-card-foreground shadow-none
|
|
130
|
+
return cn('box-border min-h-50 min-w-0 overflow-auto rounded-none border-0 border-border bg-card p-4 text-card-foreground shadow-none data-dragging:select-none', 'group/sidebar-panel @container/sidebar-panel relative flex min-h-0 min-w-0 flex-col overflow-hidden bg-card p-0 text-card-foreground transition-colors duration-200 ease-in-out motion-reduce:transition-none', local.class);
|
|
133
131
|
}
|
|
134
132
|
}));
|
|
135
133
|
}
|
|
@@ -145,7 +143,7 @@ function SidebarInset(props) {
|
|
|
145
143
|
},
|
|
146
144
|
"data-slot": "sidebar-inset",
|
|
147
145
|
get ["class"] () {
|
|
148
|
-
return cn('box-border min-h-50 min-w-0 overflow-auto rounded-none border-0 border-border bg-card p-4 text-card-foreground shadow-none
|
|
146
|
+
return cn('box-border min-h-50 min-w-0 overflow-auto rounded-none border-0 border-border bg-card p-4 text-card-foreground shadow-none data-dragging:select-none', 'relative min-w-0 overflow-auto bg-background p-0 text-foreground', local.class);
|
|
149
147
|
}
|
|
150
148
|
}));
|
|
151
149
|
}
|
|
@@ -173,7 +171,7 @@ function SidebarResizeTrigger(props) {
|
|
|
173
171
|
},
|
|
174
172
|
"data-slot": "sidebar-resize-trigger",
|
|
175
173
|
get ["class"] () {
|
|
176
|
-
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
|
|
174
|
+
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 [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:before:bg-muted-foreground/40", 'z-2', local.class);
|
|
177
175
|
},
|
|
178
176
|
get children () {
|
|
179
177
|
return memo(()=>!!(void 0 === local.children && !local.asChild))() ? createComponent(index_js_Splitter.ResizeTriggerIndicator, {}) : local.children;
|
|
@@ -210,6 +208,11 @@ function SidebarTrigger(props) {
|
|
|
210
208
|
get ["aria-expanded"] () {
|
|
211
209
|
return !collapsed();
|
|
212
210
|
},
|
|
211
|
+
get ["class"] () {
|
|
212
|
+
return cn('relative z-4 -mx-3.5 inline-flex size-7 flex-none translate-y-10 cursor-pointer items-center justify-center rounded-full border border-border bg-background p-0 text-muted-foreground shadow-sm outline-0 transition-[background-color,color,box-shadow] duration-200 ease-in-out', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none', '[&>svg]:size-4 [&>svg]:transition-transform [&>svg]:duration-200 [&>svg]:ease-in-out data-[side=left]:data-[state=collapsed]:[&>svg]:rotate-180 data-[side=right]:data-[state=expanded]:[&>svg]:rotate-180', 'hover:bg-accent hover:text-accent-foreground', local.class);
|
|
213
|
+
},
|
|
214
|
+
onClick: handleClick
|
|
215
|
+
}, others, {
|
|
213
216
|
"data-scope": "sidebar",
|
|
214
217
|
"data-part": "trigger",
|
|
215
218
|
get ["data-side"] () {
|
|
@@ -218,11 +221,6 @@ function SidebarTrigger(props) {
|
|
|
218
221
|
get ["data-state"] () {
|
|
219
222
|
return collapsed() ? 'collapsed' : 'expanded';
|
|
220
223
|
},
|
|
221
|
-
get ["class"] () {
|
|
222
|
-
return cn('relative z-4 -mx-3.5 inline-flex size-7 flex-none translate-y-10 cursor-pointer items-center justify-center rounded-full border border-border bg-background p-0 text-muted-foreground shadow-sm outline-0 transition-[background-color,color,box-shadow] duration-200 ease-in-out', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none', '[&>svg]:size-4 [&>svg]:transition-transform [&>svg]:duration-200 [&>svg]:ease-in-out data-[side=left]:data-[state=collapsed]:[&>svg]:rotate-180 data-[side=right]:data-[state=expanded]:[&>svg]:rotate-180', 'hover:bg-accent hover:text-accent-foreground', local.class);
|
|
223
|
-
},
|
|
224
|
-
onClick: handleClick
|
|
225
|
-
}, others, {
|
|
226
224
|
"data-slot": "sidebar-trigger",
|
|
227
225
|
get children () {
|
|
228
226
|
return memo(()=>!!(void 0 === local.children && !local.asChild))() ? createComponent(ChevronLeftIcon, {}) : local.children;
|
|
@@ -234,12 +232,12 @@ function SidebarLabel(props) {
|
|
|
234
232
|
'class'
|
|
235
233
|
]);
|
|
236
234
|
return createComponent(ark.span, mergeProps({
|
|
237
|
-
"data-scope": "sidebar",
|
|
238
|
-
"data-part": "label",
|
|
239
235
|
get ["class"] () {
|
|
240
236
|
return cn('min-w-0 truncate group-data-[state=collapsed]/sidebar-panel:sr-only', local.class);
|
|
241
237
|
}
|
|
242
238
|
}, others, {
|
|
239
|
+
"data-scope": "sidebar",
|
|
240
|
+
"data-part": "label",
|
|
243
241
|
"data-slot": "sidebar-label"
|
|
244
242
|
}));
|
|
245
243
|
}
|
|
@@ -248,12 +246,12 @@ function SidebarHeader(props) {
|
|
|
248
246
|
'class'
|
|
249
247
|
]);
|
|
250
248
|
return createComponent(ark.header, mergeProps({
|
|
251
|
-
"data-scope": "sidebar",
|
|
252
|
-
"data-part": "header",
|
|
253
249
|
get ["class"] () {
|
|
254
250
|
return cn('flex flex-none items-center gap-2 p-3 group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:px-1 [&>*:only-child]:w-full group-data-[state=collapsed]/sidebar-panel:[&>*:only-child]:w-auto', local.class);
|
|
255
251
|
}
|
|
256
252
|
}, others, {
|
|
253
|
+
"data-scope": "sidebar",
|
|
254
|
+
"data-part": "header",
|
|
257
255
|
"data-slot": "sidebar-header"
|
|
258
256
|
}));
|
|
259
257
|
}
|
|
@@ -262,12 +260,12 @@ function SidebarContent(props) {
|
|
|
262
260
|
'class'
|
|
263
261
|
]);
|
|
264
262
|
return createComponent(ark.div, mergeProps({
|
|
265
|
-
"data-scope": "sidebar",
|
|
266
|
-
"data-part": "content",
|
|
267
263
|
get ["class"] () {
|
|
268
264
|
return cn('flex min-h-0 flex-auto [scrollbar-gutter:stable] flex-col overflow-auto overscroll-contain group-data-[state=collapsed]/sidebar-panel:[scrollbar-width:none] group-data-[state=collapsed]/sidebar-panel:[scrollbar-gutter:auto] group-data-[state=collapsed]/sidebar-panel:overflow-x-hidden group-data-[state=collapsed]/sidebar-panel:overflow-y-auto', local.class);
|
|
269
265
|
}
|
|
270
266
|
}, others, {
|
|
267
|
+
"data-scope": "sidebar",
|
|
268
|
+
"data-part": "content",
|
|
271
269
|
"data-slot": "sidebar-content"
|
|
272
270
|
}));
|
|
273
271
|
}
|
|
@@ -277,12 +275,12 @@ function SidebarExpandedContent(props) {
|
|
|
277
275
|
]);
|
|
278
276
|
const { collapsed } = useSidebar();
|
|
279
277
|
return createComponent(ark.div, mergeProps({
|
|
280
|
-
"data-scope": "sidebar",
|
|
281
|
-
"data-part": "expanded-content",
|
|
282
278
|
get ["class"] () {
|
|
283
279
|
return local.class;
|
|
284
280
|
}
|
|
285
281
|
}, others, {
|
|
282
|
+
"data-scope": "sidebar",
|
|
283
|
+
"data-part": "expanded-content",
|
|
286
284
|
"data-slot": "sidebar-expanded-content",
|
|
287
285
|
get hidden () {
|
|
288
286
|
return collapsed();
|
|
@@ -295,12 +293,12 @@ function SidebarCollapsedContent(props) {
|
|
|
295
293
|
]);
|
|
296
294
|
const { collapsed } = useSidebar();
|
|
297
295
|
return createComponent(ark.div, mergeProps({
|
|
298
|
-
"data-scope": "sidebar",
|
|
299
|
-
"data-part": "collapsed-content",
|
|
300
296
|
get ["class"] () {
|
|
301
297
|
return local.class;
|
|
302
298
|
}
|
|
303
299
|
}, others, {
|
|
300
|
+
"data-scope": "sidebar",
|
|
301
|
+
"data-part": "collapsed-content",
|
|
304
302
|
"data-slot": "sidebar-collapsed-content",
|
|
305
303
|
get hidden () {
|
|
306
304
|
return !collapsed();
|
|
@@ -312,12 +310,12 @@ function SidebarFooter(props) {
|
|
|
312
310
|
'class'
|
|
313
311
|
]);
|
|
314
312
|
return createComponent(ark.footer, mergeProps({
|
|
315
|
-
"data-scope": "sidebar",
|
|
316
|
-
"data-part": "footer",
|
|
317
313
|
get ["class"] () {
|
|
318
314
|
return cn('flex flex-none items-center gap-2 p-3 group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:px-1', local.class);
|
|
319
315
|
}
|
|
320
316
|
}, others, {
|
|
317
|
+
"data-scope": "sidebar",
|
|
318
|
+
"data-part": "footer",
|
|
321
319
|
"data-slot": "sidebar-footer"
|
|
322
320
|
}));
|
|
323
321
|
}
|
|
@@ -326,12 +324,12 @@ function SidebarGroup(props) {
|
|
|
326
324
|
'class'
|
|
327
325
|
]);
|
|
328
326
|
return createComponent(ark.section, mergeProps({
|
|
329
|
-
"data-scope": "sidebar",
|
|
330
|
-
"data-part": "group",
|
|
331
327
|
get ["class"] () {
|
|
332
328
|
return cn('flex flex-col gap-1 p-3 group-data-[state=collapsed]/sidebar-panel:px-1', local.class);
|
|
333
329
|
}
|
|
334
330
|
}, others, {
|
|
331
|
+
"data-scope": "sidebar",
|
|
332
|
+
"data-part": "group",
|
|
335
333
|
"data-slot": "sidebar-group"
|
|
336
334
|
}));
|
|
337
335
|
}
|
|
@@ -340,12 +338,12 @@ function SidebarGroupHeader(props) {
|
|
|
340
338
|
'class'
|
|
341
339
|
]);
|
|
342
340
|
return createComponent(ark.div, mergeProps({
|
|
343
|
-
"data-scope": "sidebar",
|
|
344
|
-
"data-part": "group-header",
|
|
345
341
|
get ["class"] () {
|
|
346
342
|
return cn('flex min-w-0 items-center gap-2', local.class);
|
|
347
343
|
}
|
|
348
344
|
}, others, {
|
|
345
|
+
"data-scope": "sidebar",
|
|
346
|
+
"data-part": "group-header",
|
|
349
347
|
"data-slot": "sidebar-group-header"
|
|
350
348
|
}));
|
|
351
349
|
}
|
|
@@ -354,12 +352,12 @@ function SidebarGroupLabel(props) {
|
|
|
354
352
|
'class'
|
|
355
353
|
]);
|
|
356
354
|
return createComponent(ark.h3, mergeProps({
|
|
357
|
-
"data-scope": "sidebar",
|
|
358
|
-
"data-part": "group-label",
|
|
359
355
|
get ["class"] () {
|
|
360
356
|
return cn('min-w-0 flex-1 truncate px-2 text-xs leading-4 font-medium text-muted-foreground group-data-[state=collapsed]/sidebar-panel:sr-only', local.class);
|
|
361
357
|
}
|
|
362
358
|
}, others, {
|
|
359
|
+
"data-scope": "sidebar",
|
|
360
|
+
"data-part": "group-label",
|
|
363
361
|
"data-slot": "sidebar-group-label"
|
|
364
362
|
}));
|
|
365
363
|
}
|
|
@@ -372,12 +370,12 @@ function SidebarGroupAction(props) {
|
|
|
372
370
|
get type () {
|
|
373
371
|
return local.type ?? 'button';
|
|
374
372
|
},
|
|
375
|
-
"data-scope": "sidebar",
|
|
376
|
-
"data-part": "group-action",
|
|
377
373
|
get ["class"] () {
|
|
378
374
|
return cn('focus-visible:outline-offset-0.5 me-2 inline-flex size-control-xs flex-none cursor-pointer items-center justify-center rounded-md p-0 text-muted-foreground outline-0 transition-colors duration-200 ease-in-out hover:bg-accent hover:text-accent-foreground focus-visible:outline-2 focus-visible:outline-ring motion-reduce:transition-none @max-[7rem]:hidden [&>svg]:size-4', local.class);
|
|
379
375
|
}
|
|
380
376
|
}, others, {
|
|
377
|
+
"data-scope": "sidebar",
|
|
378
|
+
"data-part": "group-action",
|
|
381
379
|
"data-slot": "sidebar-group-action"
|
|
382
380
|
}));
|
|
383
381
|
}
|
|
@@ -386,12 +384,12 @@ function SidebarNavigationList(props) {
|
|
|
386
384
|
'class'
|
|
387
385
|
]);
|
|
388
386
|
return createComponent(ark.ul, mergeProps({
|
|
389
|
-
"data-scope": "sidebar",
|
|
390
|
-
"data-part": "navigation-list",
|
|
391
387
|
get ["class"] () {
|
|
392
388
|
return cn('flex w-full min-w-0 flex-col gap-1', local.class);
|
|
393
389
|
}
|
|
394
390
|
}, others, {
|
|
391
|
+
"data-scope": "sidebar",
|
|
392
|
+
"data-part": "navigation-list",
|
|
395
393
|
"data-slot": "sidebar-navigation-list"
|
|
396
394
|
}));
|
|
397
395
|
}
|
|
@@ -400,12 +398,12 @@ function SidebarNavigationItem(props) {
|
|
|
400
398
|
'class'
|
|
401
399
|
]);
|
|
402
400
|
return createComponent(ark.li, mergeProps({
|
|
403
|
-
"data-scope": "sidebar",
|
|
404
|
-
"data-part": "navigation-item",
|
|
405
401
|
get ["class"] () {
|
|
406
402
|
return cn('relative min-w-0', local.class);
|
|
407
403
|
}
|
|
408
404
|
}, others, {
|
|
405
|
+
"data-scope": "sidebar",
|
|
406
|
+
"data-part": "navigation-item",
|
|
409
407
|
"data-slot": "sidebar-navigation-item"
|
|
410
408
|
}));
|
|
411
409
|
}
|
|
@@ -428,6 +426,10 @@ function SidebarNavigationButton(props) {
|
|
|
428
426
|
get ["aria-current"] () {
|
|
429
427
|
return local['aria-current'] ?? (local.active ? 'page' : void 0);
|
|
430
428
|
},
|
|
429
|
+
get ["class"] () {
|
|
430
|
+
return cn('flex w-full min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 py-1 text-start text-sm leading-5 text-ellipsis whitespace-nowrap text-card-foreground outline-0 transition-colors duration-200 ease-in-out has-[+_[data-slot=sidebar-navigation-badge]]:pe-10 @max-[7rem]:has-[+_[data-slot=sidebar-navigation-badge]]:pe-2', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-accent data-active:font-medium data-active:text-accent-foreground motion-reduce:transition-none [&:not(:disabled):not([aria-disabled=true])]:hover:bg-accent [&:not(:disabled):not([aria-disabled=true])]:hover:text-accent-foreground', 'group-data-[state=collapsed]/sidebar-panel:mx-auto group-data-[state=collapsed]/sidebar-panel:min-h-control-md group-data-[state=collapsed]/sidebar-panel:w-control-md group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:bg-transparent group-data-[state=collapsed]/sidebar-panel:px-0 group-data-[state=collapsed]/sidebar-panel:hover:bg-transparent', '[&>[data-sidebar-icon]]:shrink-0 [&>span:last-child]:min-w-0 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', '[&>[data-scope=select][data-part=indicator]]:ms-auto @max-[7rem]:[&>[data-scope=select][data-part=indicator]]:hidden', '[&>[data-slot=collapsible-indicator]]:ms-auto [&>[data-slot=collapsible-indicator]]:size-control-xs @max-[7rem]:[&>[data-slot=collapsible-indicator]]:hidden [&>[data-slot=collapsible-indicator]>svg]:size-3', '[&>[data-slot=menu-indicator]]:ms-auto [&>[data-slot=menu-indicator]]:size-control-xs [&>[data-slot=menu-indicator]]:leading-none [&>[data-slot=menu-indicator]]:text-muted-foreground @max-[7rem]:[&>[data-slot=menu-indicator]]:hidden [&>[data-slot=menu-indicator]>svg]:block [&>[data-slot=menu-indicator]>svg]:size-4', 'sm' === local.size && 'min-h-control-sm text-xs', (void 0 === local.size || 'md' === local.size) && 'min-h-control-md', 'lg' === local.size && 'min-h-control-lg', local.class);
|
|
431
|
+
}
|
|
432
|
+
}, others, {
|
|
431
433
|
"data-scope": "sidebar",
|
|
432
434
|
"data-part": "navigation-button",
|
|
433
435
|
get ["data-active"] () {
|
|
@@ -436,10 +438,6 @@ function SidebarNavigationButton(props) {
|
|
|
436
438
|
get ["data-size"] () {
|
|
437
439
|
return local.size ?? 'md';
|
|
438
440
|
},
|
|
439
|
-
get ["class"] () {
|
|
440
|
-
return cn('flex w-full min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 py-1 text-start text-sm leading-5 text-ellipsis whitespace-nowrap text-card-foreground outline-0 transition-colors duration-200 ease-in-out has-[+_[data-slot=sidebar-navigation-badge]]:pe-10 @max-[7rem]:has-[+_[data-slot=sidebar-navigation-badge]]:pe-2', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-accent data-active:font-medium data-active:text-accent-foreground motion-reduce:transition-none [&:not(:disabled):not([aria-disabled=true])]:hover:bg-accent [&:not(:disabled):not([aria-disabled=true])]:hover:text-accent-foreground', 'group-data-[state=collapsed]/sidebar-panel:mx-auto group-data-[state=collapsed]/sidebar-panel:min-h-control-md group-data-[state=collapsed]/sidebar-panel:w-control-md group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:bg-transparent group-data-[state=collapsed]/sidebar-panel:px-0 group-data-[state=collapsed]/sidebar-panel:hover:bg-transparent', '[&>[data-sidebar-icon]]:shrink-0 [&>span:last-child]:min-w-0 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', '[&>[data-scope=select][data-part=indicator]]:ms-auto @max-[7rem]:[&>[data-scope=select][data-part=indicator]]:hidden', '[&>[data-slot=collapsible-indicator]]:ms-auto [&>[data-slot=collapsible-indicator]]:size-control-xs @max-[7rem]:[&>[data-slot=collapsible-indicator]]:hidden [&>[data-slot=collapsible-indicator]>svg]:size-3', '[&>[data-slot=menu-indicator]]:ms-auto [&>[data-slot=menu-indicator]]:size-control-xs [&>[data-slot=menu-indicator]]:leading-none [&>[data-slot=menu-indicator]]:text-muted-foreground @max-[7rem]:[&>[data-slot=menu-indicator]]:hidden [&>[data-slot=menu-indicator]>svg]:block [&>[data-slot=menu-indicator]>svg]:size-4', 'sm' === local.size && 'min-h-control-sm text-xs', (void 0 === local.size || 'md' === local.size) && 'min-h-control-md', 'lg' === local.size && 'min-h-control-lg', local.class);
|
|
441
|
-
}
|
|
442
|
-
}, others, {
|
|
443
441
|
"data-slot": "sidebar-navigation-button"
|
|
444
442
|
}));
|
|
445
443
|
}
|
|
@@ -448,12 +446,12 @@ function SidebarNavigationBadge(props) {
|
|
|
448
446
|
'class'
|
|
449
447
|
]);
|
|
450
448
|
return createComponent(ark.span, mergeProps({
|
|
451
|
-
"data-scope": "sidebar",
|
|
452
|
-
"data-part": "navigation-badge",
|
|
453
449
|
get ["class"] () {
|
|
454
450
|
return cn('pointer-events-none absolute end-2.5 top-1/2 z-1 box-border inline-grid size-5 -translate-y-1/2 place-items-center rounded-full bg-primary p-0 text-[0.5625rem] leading-none font-medium text-primary-foreground tabular-nums @max-[7rem]:hidden', local.class);
|
|
455
451
|
}
|
|
456
452
|
}, others, {
|
|
453
|
+
"data-scope": "sidebar",
|
|
454
|
+
"data-part": "navigation-badge",
|
|
457
455
|
"data-slot": "sidebar-navigation-badge"
|
|
458
456
|
}));
|
|
459
457
|
}
|
|
@@ -462,12 +460,12 @@ function SidebarNavigationSubList(props) {
|
|
|
462
460
|
'class'
|
|
463
461
|
]);
|
|
464
462
|
return createComponent(ark.ul, mergeProps({
|
|
465
|
-
"data-scope": "sidebar",
|
|
466
|
-
"data-part": "navigation-sub-list",
|
|
467
463
|
get ["class"] () {
|
|
468
464
|
return cn('ms-4 mt-1 flex w-auto min-w-0 flex-col gap-1 border-s border-border ps-2 group-data-[state=collapsed]/sidebar-panel:hidden', local.class);
|
|
469
465
|
}
|
|
470
466
|
}, others, {
|
|
467
|
+
"data-scope": "sidebar",
|
|
468
|
+
"data-part": "navigation-sub-list",
|
|
471
469
|
"data-slot": "sidebar-navigation-sub-list"
|
|
472
470
|
}));
|
|
473
471
|
}
|
|
@@ -476,12 +474,12 @@ function SidebarNavigationSubItem(props) {
|
|
|
476
474
|
'class'
|
|
477
475
|
]);
|
|
478
476
|
return createComponent(ark.li, mergeProps({
|
|
479
|
-
"data-scope": "sidebar",
|
|
480
|
-
"data-part": "navigation-sub-item",
|
|
481
477
|
get ["class"] () {
|
|
482
478
|
return cn('relative min-w-0', local.class);
|
|
483
479
|
}
|
|
484
480
|
}, others, {
|
|
481
|
+
"data-scope": "sidebar",
|
|
482
|
+
"data-part": "navigation-sub-item",
|
|
485
483
|
"data-slot": "sidebar-navigation-sub-item"
|
|
486
484
|
}));
|
|
487
485
|
}
|
|
@@ -500,15 +498,15 @@ function SidebarNavigationSubButton(props) {
|
|
|
500
498
|
get ["aria-current"] () {
|
|
501
499
|
return local['aria-current'] ?? (local.active ? 'page' : void 0);
|
|
502
500
|
},
|
|
501
|
+
get ["class"] () {
|
|
502
|
+
return cn('flex min-h-control-sm w-full min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 text-start text-sm leading-5 text-ellipsis whitespace-nowrap text-card-foreground outline-0 transition-[background-color,border-color,color,box-shadow] duration-200 ease-in-out has-[+_[data-slot=sidebar-navigation-badge]]:pe-10 @max-[7rem]:has-[+_[data-slot=sidebar-navigation-badge]]:pe-2', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-accent data-active:font-medium data-active:text-accent-foreground motion-reduce:transition-none [&:not(:disabled):not([aria-disabled=true])]:hover:bg-accent [&:not(:disabled):not([aria-disabled=true])]:hover:text-accent-foreground', '[&>[data-sidebar-icon]]:shrink-0 [&>span:last-child]:min-w-0 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', local.class);
|
|
503
|
+
}
|
|
504
|
+
}, others, {
|
|
503
505
|
"data-scope": "sidebar",
|
|
504
506
|
"data-part": "navigation-sub-button",
|
|
505
507
|
get ["data-active"] () {
|
|
506
508
|
return local.active ? '' : void 0;
|
|
507
509
|
},
|
|
508
|
-
get ["class"] () {
|
|
509
|
-
return cn('flex min-h-control-sm w-full min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 text-start text-sm leading-5 text-ellipsis whitespace-nowrap text-card-foreground outline-0 transition-[background-color,border-color,color,box-shadow] duration-200 ease-in-out has-[+_[data-slot=sidebar-navigation-badge]]:pe-10 @max-[7rem]:has-[+_[data-slot=sidebar-navigation-badge]]:pe-2', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-accent data-active:font-medium data-active:text-accent-foreground motion-reduce:transition-none [&:not(:disabled):not([aria-disabled=true])]:hover:bg-accent [&:not(:disabled):not([aria-disabled=true])]:hover:text-accent-foreground', '[&>[data-sidebar-icon]]:shrink-0 [&>span:last-child]:min-w-0 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', local.class);
|
|
510
|
-
}
|
|
511
|
-
}, others, {
|
|
512
510
|
"data-slot": "sidebar-navigation-sub-button",
|
|
513
511
|
get children () {
|
|
514
512
|
return memo(()=>'string' == typeof local.children)() ? (()=>{
|
|
@@ -573,9 +571,7 @@ function SidebarInput(props) {
|
|
|
573
571
|
get ["class"] () {
|
|
574
572
|
return cn('w-full group-data-[state=collapsed]/sidebar-panel:hidden', local.class);
|
|
575
573
|
}
|
|
576
|
-
}, others
|
|
577
|
-
"data-slot": "sidebar-input"
|
|
578
|
-
}));
|
|
574
|
+
}, others));
|
|
579
575
|
}
|
|
580
576
|
function SidebarSeparator(props) {
|
|
581
577
|
const [local, others] = splitProps(props, [
|
|
@@ -585,9 +581,7 @@ function SidebarSeparator(props) {
|
|
|
585
581
|
get ["class"] () {
|
|
586
582
|
return cn('border-border', local.class);
|
|
587
583
|
}
|
|
588
|
-
}, others
|
|
589
|
-
"data-slot": "sidebar-separator"
|
|
590
|
-
}));
|
|
584
|
+
}, others));
|
|
591
585
|
}
|
|
592
586
|
const Sidebar = Object.assign(SidebarRoot, {
|
|
593
587
|
Root: SidebarRoot,
|
|
@@ -51,9 +51,7 @@ function toggleSidebarPanel(splitter, panelId) {
|
|
|
51
51
|
splitter().collapsePanel(panelId);
|
|
52
52
|
}
|
|
53
53
|
function useSidebarConfig() {
|
|
54
|
-
|
|
55
|
-
if (!config) throw new Error('Sidebar components must be used within Sidebar.Root');
|
|
56
|
-
return config;
|
|
54
|
+
return useContext(SidebarConfigContext);
|
|
57
55
|
}
|
|
58
56
|
function SidebarRoot(props) {
|
|
59
57
|
const [local, others] = splitProps(props, [
|
|
@@ -69,7 +67,7 @@ function SidebarRoot(props) {
|
|
|
69
67
|
panelId,
|
|
70
68
|
side
|
|
71
69
|
}}>
|
|
72
|
-
<Splitter.Root {...others} panels={getDefaultPanels(side(), panelId())} defaultSize={local.defaultSize ?? getDefaultSidebarSize(side())} orientation="horizontal" data-side={side()} data-slot="sidebar-root" class={cn('group/splitter relative box-border h-112 min-h-0 w-full min-w-0 rounded-md border border-border bg-card text-foreground shadow-sm data-dragging:cursor-col-resize
|
|
70
|
+
<Splitter.Root {...others} panels={getDefaultPanels(side(), panelId())} defaultSize={local.defaultSize ?? getDefaultSidebarSize(side())} orientation="horizontal" data-side={side()} data-slot="sidebar-root" class={cn('group/splitter relative box-border h-112 min-h-0 w-full min-w-0 rounded-md border border-border bg-card text-foreground shadow-sm data-dragging:cursor-col-resize', 'isolate h-dvh min-h-96 w-full min-w-0 rounded-none border border-border bg-background text-foreground shadow-none', local.class)} style={'string' == typeof local.style ? `width:;height:;${local.style}` : {
|
|
73
71
|
width: void 0,
|
|
74
72
|
height: void 0,
|
|
75
73
|
...local.style
|
|
@@ -94,14 +92,14 @@ function SidebarPanel(props) {
|
|
|
94
92
|
const config = useSidebarConfig();
|
|
95
93
|
const splitter = useSplitterContext();
|
|
96
94
|
const collapsed = ()=>splitter().isPanelCollapsed(config.panelId());
|
|
97
|
-
return <Splitter.Panel {...others} id={config.panelId()} data-side={config.side()} data-slot="sidebar-panel" data-state={collapsed() ? 'collapsed' : 'expanded'} class={cn('box-border min-h-50 min-w-0 overflow-auto rounded-none border-0 border-border bg-card p-4 text-card-foreground shadow-none
|
|
95
|
+
return <Splitter.Panel {...others} id={config.panelId()} data-side={config.side()} data-slot="sidebar-panel" data-state={collapsed() ? 'collapsed' : 'expanded'} class={cn('box-border min-h-50 min-w-0 overflow-auto rounded-none border-0 border-border bg-card p-4 text-card-foreground shadow-none data-dragging:select-none', 'group/sidebar-panel @container/sidebar-panel relative flex min-h-0 min-w-0 flex-col overflow-hidden bg-card p-0 text-card-foreground transition-colors duration-200 ease-in-out motion-reduce:transition-none', local.class)}/>;
|
|
98
96
|
}
|
|
99
97
|
function SidebarInset(props) {
|
|
100
98
|
const [local, others] = splitProps(props, [
|
|
101
99
|
'class'
|
|
102
100
|
]);
|
|
103
101
|
const config = useSidebarConfig();
|
|
104
|
-
return <Splitter.Panel {...others} id="content" data-side={config.side()} data-slot="sidebar-inset" class={cn('box-border min-h-50 min-w-0 overflow-auto rounded-none border-0 border-border bg-card p-4 text-card-foreground shadow-none
|
|
102
|
+
return <Splitter.Panel {...others} id="content" data-side={config.side()} data-slot="sidebar-inset" class={cn('box-border min-h-50 min-w-0 overflow-auto rounded-none border-0 border-border bg-card p-4 text-card-foreground shadow-none data-dragging:select-none', 'relative min-w-0 overflow-auto bg-background p-0 text-foreground', local.class)}/>;
|
|
105
103
|
}
|
|
106
104
|
function SidebarResizeTrigger(props) {
|
|
107
105
|
const [local, others] = splitProps(props, [
|
|
@@ -112,7 +110,7 @@ function SidebarResizeTrigger(props) {
|
|
|
112
110
|
]);
|
|
113
111
|
const config = useSidebarConfig();
|
|
114
112
|
const id = ()=>'left' === config.side() ? `${config.panelId()}:content` : `content:${config.panelId()}`;
|
|
115
|
-
return <Splitter.ResizeTrigger {...others} asChild={local.asChild} id={id()} aria-label={local['aria-label'] ?? 'Resize sidebar'} data-side={config.side()} data-slot="sidebar-resize-trigger" 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
|
|
113
|
+
return <Splitter.ResizeTrigger {...others} asChild={local.asChild} id={id()} aria-label={local['aria-label'] ?? 'Resize sidebar'} data-side={config.side()} data-slot="sidebar-resize-trigger" 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 [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:before:bg-muted-foreground/40", 'z-2', local.class)}>
|
|
116
114
|
{void 0 === local.children && !local.asChild ? <index_jsx_Splitter.ResizeTriggerIndicator/> : local.children}
|
|
117
115
|
</Splitter.ResizeTrigger>;
|
|
118
116
|
}
|
|
@@ -133,7 +131,7 @@ function SidebarTrigger(props) {
|
|
|
133
131
|
if (event.defaultPrevented) return;
|
|
134
132
|
toggleSidebarPanel(splitter, config.panelId());
|
|
135
133
|
};
|
|
136
|
-
return <ark.button asChild={local.asChild} type={local.type ?? 'button'} aria-label={local['aria-label'] ?? 'Toggle sidebar'} aria-expanded={!collapsed()}
|
|
134
|
+
return <ark.button asChild={local.asChild} type={local.type ?? 'button'} aria-label={local['aria-label'] ?? 'Toggle sidebar'} aria-expanded={!collapsed()} class={cn('relative z-4 -mx-3.5 inline-flex size-7 flex-none translate-y-10 cursor-pointer items-center justify-center rounded-full border border-border bg-background p-0 text-muted-foreground shadow-sm outline-0 transition-[background-color,color,box-shadow] duration-200 ease-in-out', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none', '[&>svg]:size-4 [&>svg]:transition-transform [&>svg]:duration-200 [&>svg]:ease-in-out data-[side=left]:data-[state=collapsed]:[&>svg]:rotate-180 data-[side=right]:data-[state=expanded]:[&>svg]:rotate-180', 'hover:bg-accent hover:text-accent-foreground', local.class)} onClick={handleClick} {...others} data-scope="sidebar" data-part="trigger" data-side={config.side()} data-state={collapsed() ? 'collapsed' : 'expanded'} data-slot="sidebar-trigger">
|
|
137
135
|
{void 0 === local.children && !local.asChild ? <ChevronLeftIcon/> : local.children}
|
|
138
136
|
</ark.button>;
|
|
139
137
|
}
|
|
@@ -141,76 +139,76 @@ function SidebarLabel(props) {
|
|
|
141
139
|
const [local, others] = splitProps(props, [
|
|
142
140
|
'class'
|
|
143
141
|
]);
|
|
144
|
-
return <ark.span
|
|
142
|
+
return <ark.span class={cn('min-w-0 truncate group-data-[state=collapsed]/sidebar-panel:sr-only', local.class)} {...others} data-scope="sidebar" data-part="label" data-slot="sidebar-label"/>;
|
|
145
143
|
}
|
|
146
144
|
function SidebarHeader(props) {
|
|
147
145
|
const [local, others] = splitProps(props, [
|
|
148
146
|
'class'
|
|
149
147
|
]);
|
|
150
|
-
return <ark.header
|
|
148
|
+
return <ark.header class={cn('flex flex-none items-center gap-2 p-3 group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:px-1 [&>*:only-child]:w-full group-data-[state=collapsed]/sidebar-panel:[&>*:only-child]:w-auto', local.class)} {...others} data-scope="sidebar" data-part="header" data-slot="sidebar-header"/>;
|
|
151
149
|
}
|
|
152
150
|
function SidebarContent(props) {
|
|
153
151
|
const [local, others] = splitProps(props, [
|
|
154
152
|
'class'
|
|
155
153
|
]);
|
|
156
|
-
return <ark.div
|
|
154
|
+
return <ark.div class={cn('flex min-h-0 flex-auto [scrollbar-gutter:stable] flex-col overflow-auto overscroll-contain group-data-[state=collapsed]/sidebar-panel:[scrollbar-width:none] group-data-[state=collapsed]/sidebar-panel:[scrollbar-gutter:auto] group-data-[state=collapsed]/sidebar-panel:overflow-x-hidden group-data-[state=collapsed]/sidebar-panel:overflow-y-auto', local.class)} {...others} data-scope="sidebar" data-part="content" data-slot="sidebar-content"/>;
|
|
157
155
|
}
|
|
158
156
|
function SidebarExpandedContent(props) {
|
|
159
157
|
const [local, others] = splitProps(props, [
|
|
160
158
|
'class'
|
|
161
159
|
]);
|
|
162
160
|
const { collapsed } = useSidebar();
|
|
163
|
-
return <ark.div data-scope="sidebar" data-part="expanded-content"
|
|
161
|
+
return <ark.div class={local.class} {...others} data-scope="sidebar" data-part="expanded-content" data-slot="sidebar-expanded-content" hidden={collapsed()}/>;
|
|
164
162
|
}
|
|
165
163
|
function SidebarCollapsedContent(props) {
|
|
166
164
|
const [local, others] = splitProps(props, [
|
|
167
165
|
'class'
|
|
168
166
|
]);
|
|
169
167
|
const { collapsed } = useSidebar();
|
|
170
|
-
return <ark.div data-scope="sidebar" data-part="collapsed-content"
|
|
168
|
+
return <ark.div class={local.class} {...others} data-scope="sidebar" data-part="collapsed-content" data-slot="sidebar-collapsed-content" hidden={!collapsed()}/>;
|
|
171
169
|
}
|
|
172
170
|
function SidebarFooter(props) {
|
|
173
171
|
const [local, others] = splitProps(props, [
|
|
174
172
|
'class'
|
|
175
173
|
]);
|
|
176
|
-
return <ark.footer
|
|
174
|
+
return <ark.footer class={cn('flex flex-none items-center gap-2 p-3 group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:px-1', local.class)} {...others} data-scope="sidebar" data-part="footer" data-slot="sidebar-footer"/>;
|
|
177
175
|
}
|
|
178
176
|
function SidebarGroup(props) {
|
|
179
177
|
const [local, others] = splitProps(props, [
|
|
180
178
|
'class'
|
|
181
179
|
]);
|
|
182
|
-
return <ark.section
|
|
180
|
+
return <ark.section class={cn('flex flex-col gap-1 p-3 group-data-[state=collapsed]/sidebar-panel:px-1', local.class)} {...others} data-scope="sidebar" data-part="group" data-slot="sidebar-group"/>;
|
|
183
181
|
}
|
|
184
182
|
function SidebarGroupHeader(props) {
|
|
185
183
|
const [local, others] = splitProps(props, [
|
|
186
184
|
'class'
|
|
187
185
|
]);
|
|
188
|
-
return <ark.div
|
|
186
|
+
return <ark.div class={cn('flex min-w-0 items-center gap-2', local.class)} {...others} data-scope="sidebar" data-part="group-header" data-slot="sidebar-group-header"/>;
|
|
189
187
|
}
|
|
190
188
|
function SidebarGroupLabel(props) {
|
|
191
189
|
const [local, others] = splitProps(props, [
|
|
192
190
|
'class'
|
|
193
191
|
]);
|
|
194
|
-
return <ark.h3
|
|
192
|
+
return <ark.h3 class={cn('min-w-0 flex-1 truncate px-2 text-xs leading-4 font-medium text-muted-foreground group-data-[state=collapsed]/sidebar-panel:sr-only', local.class)} {...others} data-scope="sidebar" data-part="group-label" data-slot="sidebar-group-label"/>;
|
|
195
193
|
}
|
|
196
194
|
function SidebarGroupAction(props) {
|
|
197
195
|
const [local, others] = splitProps(props, [
|
|
198
196
|
'class',
|
|
199
197
|
'type'
|
|
200
198
|
]);
|
|
201
|
-
return <ark.button type={local.type ?? 'button'}
|
|
199
|
+
return <ark.button type={local.type ?? 'button'} class={cn('focus-visible:outline-offset-0.5 me-2 inline-flex size-control-xs flex-none cursor-pointer items-center justify-center rounded-md p-0 text-muted-foreground outline-0 transition-colors duration-200 ease-in-out hover:bg-accent hover:text-accent-foreground focus-visible:outline-2 focus-visible:outline-ring motion-reduce:transition-none @max-[7rem]:hidden [&>svg]:size-4', local.class)} {...others} data-scope="sidebar" data-part="group-action" data-slot="sidebar-group-action"/>;
|
|
202
200
|
}
|
|
203
201
|
function SidebarNavigationList(props) {
|
|
204
202
|
const [local, others] = splitProps(props, [
|
|
205
203
|
'class'
|
|
206
204
|
]);
|
|
207
|
-
return <ark.ul
|
|
205
|
+
return <ark.ul class={cn('flex w-full min-w-0 flex-col gap-1', local.class)} {...others} data-scope="sidebar" data-part="navigation-list" data-slot="sidebar-navigation-list"/>;
|
|
208
206
|
}
|
|
209
207
|
function SidebarNavigationItem(props) {
|
|
210
208
|
const [local, others] = splitProps(props, [
|
|
211
209
|
'class'
|
|
212
210
|
]);
|
|
213
|
-
return <ark.li
|
|
211
|
+
return <ark.li class={cn('relative min-w-0', local.class)} {...others} data-scope="sidebar" data-part="navigation-item" data-slot="sidebar-navigation-item"/>;
|
|
214
212
|
}
|
|
215
213
|
function SidebarNavigationButton(props) {
|
|
216
214
|
const [local, others] = splitProps(props, [
|
|
@@ -221,25 +219,25 @@ function SidebarNavigationButton(props) {
|
|
|
221
219
|
'size',
|
|
222
220
|
'type'
|
|
223
221
|
]);
|
|
224
|
-
return <ark.button asChild={local.asChild} type={local.type ?? 'button'} aria-current={local['aria-current'] ?? (local.active ? 'page' : void 0)}
|
|
222
|
+
return <ark.button asChild={local.asChild} type={local.type ?? 'button'} aria-current={local['aria-current'] ?? (local.active ? 'page' : void 0)} class={cn('flex w-full min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 py-1 text-start text-sm leading-5 text-ellipsis whitespace-nowrap text-card-foreground outline-0 transition-colors duration-200 ease-in-out has-[+_[data-slot=sidebar-navigation-badge]]:pe-10 @max-[7rem]:has-[+_[data-slot=sidebar-navigation-badge]]:pe-2', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-accent data-active:font-medium data-active:text-accent-foreground motion-reduce:transition-none [&:not(:disabled):not([aria-disabled=true])]:hover:bg-accent [&:not(:disabled):not([aria-disabled=true])]:hover:text-accent-foreground', 'group-data-[state=collapsed]/sidebar-panel:mx-auto group-data-[state=collapsed]/sidebar-panel:min-h-control-md group-data-[state=collapsed]/sidebar-panel:w-control-md group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:bg-transparent group-data-[state=collapsed]/sidebar-panel:px-0 group-data-[state=collapsed]/sidebar-panel:hover:bg-transparent', '[&>[data-sidebar-icon]]:shrink-0 [&>span:last-child]:min-w-0 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', '[&>[data-scope=select][data-part=indicator]]:ms-auto @max-[7rem]:[&>[data-scope=select][data-part=indicator]]:hidden', '[&>[data-slot=collapsible-indicator]]:ms-auto [&>[data-slot=collapsible-indicator]]:size-control-xs @max-[7rem]:[&>[data-slot=collapsible-indicator]]:hidden [&>[data-slot=collapsible-indicator]>svg]:size-3', '[&>[data-slot=menu-indicator]]:ms-auto [&>[data-slot=menu-indicator]]:size-control-xs [&>[data-slot=menu-indicator]]:leading-none [&>[data-slot=menu-indicator]]:text-muted-foreground @max-[7rem]:[&>[data-slot=menu-indicator]]:hidden [&>[data-slot=menu-indicator]>svg]:block [&>[data-slot=menu-indicator]>svg]:size-4', 'sm' === local.size && 'min-h-control-sm text-xs', (void 0 === local.size || 'md' === local.size) && 'min-h-control-md', 'lg' === local.size && 'min-h-control-lg', local.class)} {...others} data-scope="sidebar" data-part="navigation-button" data-active={local.active ? '' : void 0} data-size={local.size ?? 'md'} data-slot="sidebar-navigation-button"/>;
|
|
225
223
|
}
|
|
226
224
|
function SidebarNavigationBadge(props) {
|
|
227
225
|
const [local, others] = splitProps(props, [
|
|
228
226
|
'class'
|
|
229
227
|
]);
|
|
230
|
-
return <ark.span
|
|
228
|
+
return <ark.span class={cn('pointer-events-none absolute end-2.5 top-1/2 z-1 box-border inline-grid size-5 -translate-y-1/2 place-items-center rounded-full bg-primary p-0 text-[0.5625rem] leading-none font-medium text-primary-foreground tabular-nums @max-[7rem]:hidden', local.class)} {...others} data-scope="sidebar" data-part="navigation-badge" data-slot="sidebar-navigation-badge"/>;
|
|
231
229
|
}
|
|
232
230
|
function SidebarNavigationSubList(props) {
|
|
233
231
|
const [local, others] = splitProps(props, [
|
|
234
232
|
'class'
|
|
235
233
|
]);
|
|
236
|
-
return <ark.ul
|
|
234
|
+
return <ark.ul class={cn('ms-4 mt-1 flex w-auto min-w-0 flex-col gap-1 border-s border-border ps-2 group-data-[state=collapsed]/sidebar-panel:hidden', local.class)} {...others} data-scope="sidebar" data-part="navigation-sub-list" data-slot="sidebar-navigation-sub-list"/>;
|
|
237
235
|
}
|
|
238
236
|
function SidebarNavigationSubItem(props) {
|
|
239
237
|
const [local, others] = splitProps(props, [
|
|
240
238
|
'class'
|
|
241
239
|
]);
|
|
242
|
-
return <ark.li
|
|
240
|
+
return <ark.li class={cn('relative min-w-0', local.class)} {...others} data-scope="sidebar" data-part="navigation-sub-item" data-slot="sidebar-navigation-sub-item"/>;
|
|
243
241
|
}
|
|
244
242
|
function SidebarNavigationSubButton(props) {
|
|
245
243
|
const [local, others] = splitProps(props, [
|
|
@@ -249,7 +247,7 @@ function SidebarNavigationSubButton(props) {
|
|
|
249
247
|
'children',
|
|
250
248
|
'class'
|
|
251
249
|
]);
|
|
252
|
-
return <ark.a asChild={local.asChild} aria-current={local['aria-current'] ?? (local.active ? 'page' : void 0)}
|
|
250
|
+
return <ark.a asChild={local.asChild} aria-current={local['aria-current'] ?? (local.active ? 'page' : void 0)} class={cn('flex min-h-control-sm w-full min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 text-start text-sm leading-5 text-ellipsis whitespace-nowrap text-card-foreground outline-0 transition-[background-color,border-color,color,box-shadow] duration-200 ease-in-out has-[+_[data-slot=sidebar-navigation-badge]]:pe-10 @max-[7rem]:has-[+_[data-slot=sidebar-navigation-badge]]:pe-2', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-accent data-active:font-medium data-active:text-accent-foreground motion-reduce:transition-none [&:not(:disabled):not([aria-disabled=true])]:hover:bg-accent [&:not(:disabled):not([aria-disabled=true])]:hover:text-accent-foreground', '[&>[data-sidebar-icon]]:shrink-0 [&>span:last-child]:min-w-0 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', local.class)} {...others} data-scope="sidebar" data-part="navigation-sub-button" data-active={local.active ? '' : void 0} data-slot="sidebar-navigation-sub-button">
|
|
253
251
|
{'string' == typeof local.children ? <span data-slot="sidebar-navigation-sub-label">{local.children}</span> : local.children}
|
|
254
252
|
</ark.a>;
|
|
255
253
|
}
|
|
@@ -277,13 +275,13 @@ function SidebarInput(props) {
|
|
|
277
275
|
const [local, others] = splitProps(props, [
|
|
278
276
|
'class'
|
|
279
277
|
]);
|
|
280
|
-
return <Input.Root class={cn('w-full group-data-[state=collapsed]/sidebar-panel:hidden', local.class)} {...others}
|
|
278
|
+
return <Input.Root class={cn('w-full group-data-[state=collapsed]/sidebar-panel:hidden', local.class)} {...others}/>;
|
|
281
279
|
}
|
|
282
280
|
function SidebarSeparator(props) {
|
|
283
281
|
const [local, others] = splitProps(props, [
|
|
284
282
|
'class'
|
|
285
283
|
]);
|
|
286
|
-
return <Separator.Root class={cn('border-border', local.class)} {...others}
|
|
284
|
+
return <Separator.Root class={cn('border-border', local.class)} {...others}/>;
|
|
287
285
|
}
|
|
288
286
|
const Sidebar = Object.assign(SidebarRoot, {
|
|
289
287
|
Root: SidebarRoot,
|
|
@@ -12,7 +12,7 @@ declare function SignaturePadControl(props: ComponentProps<typeof SignaturePadPr
|
|
|
12
12
|
declare function SignaturePadSegment(props: ComponentProps<typeof SignaturePadPrimitive.Segment>): import("solid-js").JSX.Element;
|
|
13
13
|
declare function SignaturePadGuide(props: ComponentProps<typeof SignaturePadPrimitive.Guide>): import("solid-js").JSX.Element;
|
|
14
14
|
declare function SignaturePadClearTrigger(props: ComponentProps<typeof SignaturePadPrimitive.ClearTrigger>): import("solid-js").JSX.Element;
|
|
15
|
-
type SignaturePadCanvasProps = Omit<ComponentProps<typeof SignaturePadPrimitive.Control>, 'children'>;
|
|
15
|
+
type SignaturePadCanvasProps = Omit<ComponentProps<typeof SignaturePadPrimitive.Control>, 'asChild' | 'children'>;
|
|
16
16
|
declare function SignaturePadCanvas(props: SignaturePadCanvasProps): import("solid-js").JSX.Element;
|
|
17
17
|
declare const SignaturePad: typeof SignaturePadRoot & {
|
|
18
18
|
Root: typeof SignaturePadRoot;
|
|
@@ -153,7 +153,7 @@ function SignaturePadClearTrigger(props) {
|
|
|
153
153
|
return local['aria-labelledby'];
|
|
154
154
|
},
|
|
155
155
|
get ["class"] () {
|
|
156
|
-
return cn(resolvedProps.class, 'size-
|
|
156
|
+
return cn(resolvedProps.class, 'size-control-md rounded-sm bg-transparent text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-ring motion-reduce:transition-none [&>svg]:size-4 [&>svg]:shrink-0 [@media(hover:hover)]:[&:not([data-disabled]):hover]:bg-accent [@media(hover:hover)]:[&:not([data-disabled]):hover]:text-foreground', local.class);
|
|
157
157
|
},
|
|
158
158
|
get children () {
|
|
159
159
|
return resolvedChildren() ?? createComponent(RotateCcwIcon, {
|
|
@@ -76,7 +76,7 @@ function SignaturePadClearTrigger(props) {
|
|
|
76
76
|
</SignaturePad.ClearTrigger>;
|
|
77
77
|
return <SignaturePad.ClearTrigger asChild={(triggerProps)=>{
|
|
78
78
|
const resolvedProps = triggerProps();
|
|
79
|
-
return <CloseButton.Root {...resolvedProps} aria-label={local['aria-label']} aria-labelledby={local['aria-labelledby']} class={cn(resolvedProps.class, 'size-
|
|
79
|
+
return <CloseButton.Root {...resolvedProps} aria-label={local['aria-label']} aria-labelledby={local['aria-labelledby']} class={cn(resolvedProps.class, 'size-control-md rounded-sm bg-transparent text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-ring motion-reduce:transition-none [&>svg]:size-4 [&>svg]:shrink-0 [@media(hover:hover)]:[&:not([data-disabled]):hover]:bg-accent [@media(hover:hover)]:[&:not([data-disabled]):hover]:text-foreground', local.class)}>
|
|
80
80
|
{resolvedChildren() ?? <RotateCcwIcon class="size-4" aria-hidden="true"/>}
|
|
81
81
|
</CloseButton.Root>;
|
|
82
82
|
}} class={triggerClass} {...others} data-slot="signature-pad-clear-trigger" disabled={isDisabled()}/>;
|