@szum-tech/design-system 3.15.0 → 3.16.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/{chunk-3MH6P44N.js → chunk-3DP3VMPN.js} +1 -1
- package/dist/{chunk-XJIUGEPN.js → chunk-A72LE53B.js} +1 -1
- package/dist/{chunk-UIOBJSKZ.cjs → chunk-DUAM4RTP.cjs} +1 -1
- package/dist/{chunk-XY3ZNUWR.cjs → chunk-F7NFSDOD.cjs} +17 -4
- package/dist/{chunk-DTYX7CYN.cjs → chunk-HPICKLBZ.cjs} +2 -2
- package/dist/chunk-KTAIBRTH.cjs +10 -0
- package/dist/{chunk-KGGCA634.js → chunk-L2TRMQNN.js} +1 -1
- package/dist/{chunk-PTZVUZNQ.cjs → chunk-MFTNHVPZ.cjs} +556 -5
- package/dist/chunk-NXEZE7LG.js +15 -0
- package/dist/{chunk-OH323B3O.js → chunk-OIM2X2NK.js} +531 -5
- package/dist/chunk-OXZQGDTR.js +208 -0
- package/dist/{chunk-4IGU5SVP.js → chunk-P4IL77YC.js} +16 -4
- package/dist/{chunk-CAIAZGSW.cjs → chunk-RKFU4DS3.cjs} +2 -2
- package/dist/chunk-SHPJGB2L.cjs +19 -0
- package/dist/{chunk-CFJ44JVK.cjs → chunk-UNOMGKAZ.cjs} +2 -2
- package/dist/{chunk-Q2MJKFIE.js → chunk-WCQ5WKCQ.js} +1 -1
- package/dist/chunk-X7WREEFD.js +8 -0
- package/dist/chunk-YBFG2IRJ.cjs +225 -0
- package/dist/components/badge-overflow/index.cjs +2 -2
- package/dist/components/badge-overflow/index.js +1 -1
- package/dist/components/button/index.cjs +19 -16
- package/dist/components/button/index.js +18 -15
- package/dist/components/carousel/index.cjs +20 -17
- package/dist/components/carousel/index.js +18 -15
- package/dist/components/collapsible/index.cjs +18 -0
- package/dist/components/collapsible/index.d.cts +12 -0
- package/dist/components/collapsible/index.d.ts +12 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/color-picker/index.cjs +29 -26
- package/dist/components/color-picker/index.js +18 -15
- package/dist/components/dropdown-menu/index.cjs +71 -0
- package/dist/components/dropdown-menu/index.d.cts +67 -0
- package/dist/components/dropdown-menu/index.d.ts +67 -0
- package/dist/components/dropdown-menu/index.js +2 -0
- package/dist/components/field/index.cjs +12 -12
- package/dist/components/field/index.js +2 -2
- package/dist/components/index.cjs +332 -149
- package/dist/components/index.d.cts +6 -1
- package/dist/components/index.d.ts +6 -1
- package/dist/components/index.js +18 -15
- package/dist/components/item/index.cjs +12 -12
- package/dist/components/item/index.js +2 -2
- package/dist/components/masonry/index.cjs +4 -4
- package/dist/components/masonry/index.js +2 -2
- package/dist/components/separator/index.cjs +2 -2
- package/dist/components/separator/index.js +1 -1
- package/dist/components/sidebar/index.cjs +148 -0
- package/dist/components/sidebar/index.d.cts +135 -0
- package/dist/components/sidebar/index.d.ts +135 -0
- package/dist/components/sidebar/index.js +43 -0
- package/dist/components/skeleton/index.cjs +11 -0
- package/dist/components/skeleton/index.d.cts +7 -0
- package/dist/components/skeleton/index.d.ts +7 -0
- package/dist/components/skeleton/index.js +2 -0
- package/dist/components/stepper/index.cjs +37 -34
- package/dist/components/stepper/index.js +18 -15
- package/dist/components/timeline/index.cjs +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toaster/index.cjs +20 -17
- package/dist/components/toaster/index.js +18 -15
- package/dist/components/tooltip/index.d.cts +2 -4
- package/dist/components/tooltip/index.d.ts +2 -4
- package/dist/hooks/index.cjs +8 -4
- package/dist/hooks/index.d.cts +3 -1
- package/dist/hooks/index.d.ts +3 -1
- package/dist/hooks/index.js +1 -1
- package/dist/tooltip-content-DqtogPBq.d.cts +8 -0
- package/dist/tooltip-content-DqtogPBq.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkMNDQXDV4_cjs = require('./chunk-MNDQXDV4.cjs');
|
|
4
|
-
var
|
|
5
|
-
var chunkGEDBA3JU_cjs = require('./chunk-GEDBA3JU.cjs');
|
|
4
|
+
var chunkA7SBXO2Y_cjs = require('./chunk-A7SBXO2Y.cjs');
|
|
6
5
|
var chunk6HX7ETL3_cjs = require('./chunk-6HX7ETL3.cjs');
|
|
6
|
+
var chunk375QAB65_cjs = require('./chunk-375QAB65.cjs');
|
|
7
|
+
var chunkKTAIBRTH_cjs = require('./chunk-KTAIBRTH.cjs');
|
|
8
|
+
var chunk3WSQRFUY_cjs = require('./chunk-3WSQRFUY.cjs');
|
|
7
9
|
var chunkB4M7Q5KX_cjs = require('./chunk-B4M7Q5KX.cjs');
|
|
8
|
-
var
|
|
10
|
+
var chunkGEDBA3JU_cjs = require('./chunk-GEDBA3JU.cjs');
|
|
11
|
+
var chunkDUAM4RTP_cjs = require('./chunk-DUAM4RTP.cjs');
|
|
12
|
+
var chunkF7NFSDOD_cjs = require('./chunk-F7NFSDOD.cjs');
|
|
9
13
|
var chunkN4TYSZSU_cjs = require('./chunk-N4TYSZSU.cjs');
|
|
10
14
|
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
11
15
|
var React16 = require('react');
|
|
@@ -542,7 +546,7 @@ function ColorPickerImpl(props) {
|
|
|
542
546
|
const store = useColorPickerStoreContext(COLOR_PICKER_IMPL_NAME);
|
|
543
547
|
const dir = radixUi.Direction.useDirection(dirProp);
|
|
544
548
|
const [formTrigger, setFormTrigger] = React16__namespace.useState(null);
|
|
545
|
-
const composedRef =
|
|
549
|
+
const composedRef = chunkF7NFSDOD_cjs.useComposedRefs(ref, (node) => setFormTrigger(node));
|
|
546
550
|
const isFormControl = formTrigger ? !!formTrigger.closest("form") : true;
|
|
547
551
|
chunkN4TYSZSU_cjs.useIsomorphicLayoutEffect(() => {
|
|
548
552
|
if (valueProp !== void 0) {
|
|
@@ -650,7 +654,7 @@ function ColorPickerArea(props) {
|
|
|
650
654
|
const hsv = useColorPickerStore((state) => state.hsv);
|
|
651
655
|
const isDraggingRef = React16__namespace.useRef(false);
|
|
652
656
|
const areaRef = React16__namespace.useRef(null);
|
|
653
|
-
const composedRef =
|
|
657
|
+
const composedRef = chunkF7NFSDOD_cjs.useComposedRefs(ref, areaRef);
|
|
654
658
|
const updateColorFromPosition = React16__namespace.useCallback(
|
|
655
659
|
(clientX, clientY) => {
|
|
656
660
|
if (!areaRef.current) return;
|
|
@@ -2204,6 +2208,528 @@ var Toaster = ({ theme = "system", ...props }) => {
|
|
|
2204
2208
|
}
|
|
2205
2209
|
);
|
|
2206
2210
|
};
|
|
2211
|
+
|
|
2212
|
+
// src/components/sidebar/sidebar.constants.ts
|
|
2213
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
2214
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
2215
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
2216
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
2217
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
2218
|
+
var SIDEBAR_ROOT_NAME = "SidebarProvider";
|
|
2219
|
+
var SidebarContext = React16__namespace.createContext(null);
|
|
2220
|
+
function useSidebarContext(consumerName) {
|
|
2221
|
+
const context = React16__namespace.useContext(SidebarContext);
|
|
2222
|
+
if (!context) {
|
|
2223
|
+
throw new Error(`\`${consumerName}\` must be used within \`${SIDEBAR_ROOT_NAME}\``);
|
|
2224
|
+
}
|
|
2225
|
+
return context;
|
|
2226
|
+
}
|
|
2227
|
+
function useSidebar() {
|
|
2228
|
+
return useSidebarContext("useSidebar");
|
|
2229
|
+
}
|
|
2230
|
+
function SidebarProvider({
|
|
2231
|
+
defaultOpen = true,
|
|
2232
|
+
open: openProp,
|
|
2233
|
+
onOpenChange: setOpenProp,
|
|
2234
|
+
className,
|
|
2235
|
+
style,
|
|
2236
|
+
children,
|
|
2237
|
+
...props
|
|
2238
|
+
}) {
|
|
2239
|
+
const isMobile = chunkF7NFSDOD_cjs.useIsMobile();
|
|
2240
|
+
const [openMobile, setOpenMobile] = React16__namespace.useState(false);
|
|
2241
|
+
const [_open, _setOpen] = React16__namespace.useState(defaultOpen);
|
|
2242
|
+
const open = openProp ?? _open;
|
|
2243
|
+
const setOpen = React16__namespace.useCallback(
|
|
2244
|
+
(value) => {
|
|
2245
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
2246
|
+
if (setOpenProp) {
|
|
2247
|
+
setOpenProp(openState);
|
|
2248
|
+
} else {
|
|
2249
|
+
_setOpen(openState);
|
|
2250
|
+
}
|
|
2251
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
2252
|
+
},
|
|
2253
|
+
[setOpenProp, open]
|
|
2254
|
+
);
|
|
2255
|
+
const toggleSidebar = React16__namespace.useCallback(() => {
|
|
2256
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
2257
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
2258
|
+
React16__namespace.useEffect(() => {
|
|
2259
|
+
const handleKeyDown = (event) => {
|
|
2260
|
+
if (event.key === "b" && (event.metaKey || event.ctrlKey)) {
|
|
2261
|
+
event.preventDefault();
|
|
2262
|
+
toggleSidebar();
|
|
2263
|
+
}
|
|
2264
|
+
};
|
|
2265
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
2266
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
2267
|
+
}, [toggleSidebar]);
|
|
2268
|
+
const state = open ? "expanded" : "collapsed";
|
|
2269
|
+
const contextValue = React16__namespace.useMemo(
|
|
2270
|
+
() => ({ state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar }),
|
|
2271
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
2272
|
+
);
|
|
2273
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2274
|
+
"div",
|
|
2275
|
+
{
|
|
2276
|
+
"data-slot": "sidebar-wrapper",
|
|
2277
|
+
style: {
|
|
2278
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
2279
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
2280
|
+
...style
|
|
2281
|
+
},
|
|
2282
|
+
className: chunkH2BWO3SI_cjs.cn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className),
|
|
2283
|
+
...props,
|
|
2284
|
+
children
|
|
2285
|
+
}
|
|
2286
|
+
) });
|
|
2287
|
+
}
|
|
2288
|
+
function Sidebar({
|
|
2289
|
+
side = "left",
|
|
2290
|
+
variant = "sidebar",
|
|
2291
|
+
collapsible = "offcanvas",
|
|
2292
|
+
className,
|
|
2293
|
+
children,
|
|
2294
|
+
dir,
|
|
2295
|
+
...props
|
|
2296
|
+
}) {
|
|
2297
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebarContext("Sidebar");
|
|
2298
|
+
if (collapsible === "none") {
|
|
2299
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2300
|
+
"div",
|
|
2301
|
+
{
|
|
2302
|
+
"data-slot": "sidebar",
|
|
2303
|
+
className: chunkH2BWO3SI_cjs.cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
|
|
2304
|
+
...props,
|
|
2305
|
+
children
|
|
2306
|
+
}
|
|
2307
|
+
);
|
|
2308
|
+
}
|
|
2309
|
+
if (isMobile) {
|
|
2310
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk375QAB65_cjs.Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2311
|
+
chunk375QAB65_cjs.SheetContent,
|
|
2312
|
+
{
|
|
2313
|
+
dir,
|
|
2314
|
+
"data-sidebar": "sidebar",
|
|
2315
|
+
"data-slot": "sidebar",
|
|
2316
|
+
"data-mobile": "true",
|
|
2317
|
+
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0",
|
|
2318
|
+
style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
|
|
2319
|
+
side,
|
|
2320
|
+
showCloseButton: false,
|
|
2321
|
+
children: [
|
|
2322
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunk375QAB65_cjs.SheetHeader, { className: "sr-only", children: [
|
|
2323
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk375QAB65_cjs.SheetTitle, { children: "Sidebar" }),
|
|
2324
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk375QAB65_cjs.SheetDescription, { children: "Displays the mobile sidebar." })
|
|
2325
|
+
] }),
|
|
2326
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
2327
|
+
]
|
|
2328
|
+
}
|
|
2329
|
+
) });
|
|
2330
|
+
}
|
|
2331
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2332
|
+
"div",
|
|
2333
|
+
{
|
|
2334
|
+
className: "group peer text-sidebar-foreground hidden md:block",
|
|
2335
|
+
"data-state": state,
|
|
2336
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
2337
|
+
"data-variant": variant,
|
|
2338
|
+
"data-side": side,
|
|
2339
|
+
"data-slot": "sidebar",
|
|
2340
|
+
children: [
|
|
2341
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2342
|
+
"div",
|
|
2343
|
+
{
|
|
2344
|
+
"data-slot": "sidebar-gap",
|
|
2345
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
2346
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
2347
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
2348
|
+
"group-data-[side=right]:rotate-180",
|
|
2349
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
2350
|
+
)
|
|
2351
|
+
}
|
|
2352
|
+
),
|
|
2353
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2354
|
+
"div",
|
|
2355
|
+
{
|
|
2356
|
+
"data-slot": "sidebar-container",
|
|
2357
|
+
"data-side": side,
|
|
2358
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
2359
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
|
|
2360
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
2361
|
+
className
|
|
2362
|
+
),
|
|
2363
|
+
...props,
|
|
2364
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2365
|
+
"div",
|
|
2366
|
+
{
|
|
2367
|
+
"data-sidebar": "sidebar",
|
|
2368
|
+
"data-slot": "sidebar-inner",
|
|
2369
|
+
className: "bg-sidebar group-data-[variant=floating]:ring-sidebar-border flex size-full flex-col group-data-[variant=floating]:rounded group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1",
|
|
2370
|
+
children
|
|
2371
|
+
}
|
|
2372
|
+
)
|
|
2373
|
+
}
|
|
2374
|
+
)
|
|
2375
|
+
]
|
|
2376
|
+
}
|
|
2377
|
+
);
|
|
2378
|
+
}
|
|
2379
|
+
function SidebarTrigger({ className, onClick, ...props }) {
|
|
2380
|
+
const { toggleSidebar } = useSidebarContext("SidebarTrigger");
|
|
2381
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2382
|
+
Button,
|
|
2383
|
+
{
|
|
2384
|
+
"data-sidebar": "trigger",
|
|
2385
|
+
"data-slot": "sidebar-trigger",
|
|
2386
|
+
variant: "ghost",
|
|
2387
|
+
size: "icon-sm",
|
|
2388
|
+
className: chunkH2BWO3SI_cjs.cn(className),
|
|
2389
|
+
onClick: (event) => {
|
|
2390
|
+
onClick?.(event);
|
|
2391
|
+
toggleSidebar();
|
|
2392
|
+
},
|
|
2393
|
+
...props,
|
|
2394
|
+
children: [
|
|
2395
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelLeftIcon, { className: "cn-rtl-flip" }),
|
|
2396
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
2397
|
+
]
|
|
2398
|
+
}
|
|
2399
|
+
);
|
|
2400
|
+
}
|
|
2401
|
+
function SidebarRail({ className, ...props }) {
|
|
2402
|
+
const { toggleSidebar } = useSidebarContext("SidebarRail");
|
|
2403
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2404
|
+
"button",
|
|
2405
|
+
{
|
|
2406
|
+
"data-sidebar": "rail",
|
|
2407
|
+
"data-slot": "sidebar-rail",
|
|
2408
|
+
"aria-label": "Toggle Sidebar",
|
|
2409
|
+
tabIndex: -1,
|
|
2410
|
+
onClick: toggleSidebar,
|
|
2411
|
+
title: "Toggle Sidebar",
|
|
2412
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
2413
|
+
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2",
|
|
2414
|
+
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
2415
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
2416
|
+
"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
2417
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
2418
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
2419
|
+
className
|
|
2420
|
+
),
|
|
2421
|
+
...props
|
|
2422
|
+
}
|
|
2423
|
+
);
|
|
2424
|
+
}
|
|
2425
|
+
function SidebarInset({ className, ...props }) {
|
|
2426
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2427
|
+
"main",
|
|
2428
|
+
{
|
|
2429
|
+
"data-slot": "sidebar-inset",
|
|
2430
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
2431
|
+
"bg-background relative flex w-full flex-1 flex-col md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
2432
|
+
className
|
|
2433
|
+
),
|
|
2434
|
+
...props
|
|
2435
|
+
}
|
|
2436
|
+
);
|
|
2437
|
+
}
|
|
2438
|
+
function SidebarInput({ className, ...props }) {
|
|
2439
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2440
|
+
chunkB4M7Q5KX_cjs.Input,
|
|
2441
|
+
{
|
|
2442
|
+
"data-slot": "sidebar-input",
|
|
2443
|
+
"data-sidebar": "input",
|
|
2444
|
+
className: chunkH2BWO3SI_cjs.cn("bg-background h-8 w-full shadow-none", className),
|
|
2445
|
+
...props
|
|
2446
|
+
}
|
|
2447
|
+
);
|
|
2448
|
+
}
|
|
2449
|
+
function SidebarHeader({ className, ...props }) {
|
|
2450
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2451
|
+
"div",
|
|
2452
|
+
{
|
|
2453
|
+
"data-slot": "sidebar-header",
|
|
2454
|
+
"data-sidebar": "header",
|
|
2455
|
+
className: chunkH2BWO3SI_cjs.cn("flex flex-col gap-2 p-2", className),
|
|
2456
|
+
...props
|
|
2457
|
+
}
|
|
2458
|
+
);
|
|
2459
|
+
}
|
|
2460
|
+
function SidebarFooter({ className, ...props }) {
|
|
2461
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2462
|
+
"div",
|
|
2463
|
+
{
|
|
2464
|
+
"data-slot": "sidebar-footer",
|
|
2465
|
+
"data-sidebar": "footer",
|
|
2466
|
+
className: chunkH2BWO3SI_cjs.cn("flex flex-col gap-2 p-2", className),
|
|
2467
|
+
...props
|
|
2468
|
+
}
|
|
2469
|
+
);
|
|
2470
|
+
}
|
|
2471
|
+
function SidebarSeparator({ className, ...props }) {
|
|
2472
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2473
|
+
chunkDUAM4RTP_cjs.Separator,
|
|
2474
|
+
{
|
|
2475
|
+
"data-slot": "sidebar-separator",
|
|
2476
|
+
"data-sidebar": "separator",
|
|
2477
|
+
className: chunkH2BWO3SI_cjs.cn("bg-sidebar-border mx-2 w-auto", className),
|
|
2478
|
+
...props
|
|
2479
|
+
}
|
|
2480
|
+
);
|
|
2481
|
+
}
|
|
2482
|
+
function SidebarContent({ className, ...props }) {
|
|
2483
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2484
|
+
"div",
|
|
2485
|
+
{
|
|
2486
|
+
"data-slot": "sidebar-content",
|
|
2487
|
+
"data-sidebar": "content",
|
|
2488
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
2489
|
+
"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
2490
|
+
className
|
|
2491
|
+
),
|
|
2492
|
+
...props
|
|
2493
|
+
}
|
|
2494
|
+
);
|
|
2495
|
+
}
|
|
2496
|
+
function SidebarGroup({ className, ...props }) {
|
|
2497
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2498
|
+
"div",
|
|
2499
|
+
{
|
|
2500
|
+
"data-slot": "sidebar-group",
|
|
2501
|
+
"data-sidebar": "group",
|
|
2502
|
+
className: chunkH2BWO3SI_cjs.cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
2503
|
+
...props
|
|
2504
|
+
}
|
|
2505
|
+
);
|
|
2506
|
+
}
|
|
2507
|
+
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
2508
|
+
const Comp = asChild ? reactSlot.Slot : "div";
|
|
2509
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2510
|
+
Comp,
|
|
2511
|
+
{
|
|
2512
|
+
"data-slot": "sidebar-group-label",
|
|
2513
|
+
"data-sidebar": "group-label",
|
|
2514
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
2515
|
+
"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2516
|
+
className
|
|
2517
|
+
),
|
|
2518
|
+
...props
|
|
2519
|
+
}
|
|
2520
|
+
);
|
|
2521
|
+
}
|
|
2522
|
+
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
2523
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
2524
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2525
|
+
Comp,
|
|
2526
|
+
{
|
|
2527
|
+
"data-slot": "sidebar-group-action",
|
|
2528
|
+
"data-sidebar": "group-action",
|
|
2529
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
2530
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded p-0 outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2531
|
+
className
|
|
2532
|
+
),
|
|
2533
|
+
...props
|
|
2534
|
+
}
|
|
2535
|
+
);
|
|
2536
|
+
}
|
|
2537
|
+
function SidebarGroupContent({ className, ...props }) {
|
|
2538
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2539
|
+
"div",
|
|
2540
|
+
{
|
|
2541
|
+
"data-slot": "sidebar-group-content",
|
|
2542
|
+
"data-sidebar": "group-content",
|
|
2543
|
+
className: chunkH2BWO3SI_cjs.cn("w-full text-sm", className),
|
|
2544
|
+
...props
|
|
2545
|
+
}
|
|
2546
|
+
);
|
|
2547
|
+
}
|
|
2548
|
+
function SidebarMenu({ className, ...props }) {
|
|
2549
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2550
|
+
"ul",
|
|
2551
|
+
{
|
|
2552
|
+
"data-slot": "sidebar-menu",
|
|
2553
|
+
"data-sidebar": "menu",
|
|
2554
|
+
className: chunkH2BWO3SI_cjs.cn("flex w-full min-w-0 flex-col gap-0", className),
|
|
2555
|
+
...props
|
|
2556
|
+
}
|
|
2557
|
+
);
|
|
2558
|
+
}
|
|
2559
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
2560
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2561
|
+
"li",
|
|
2562
|
+
{
|
|
2563
|
+
"data-slot": "sidebar-menu-item",
|
|
2564
|
+
"data-sidebar": "menu-item",
|
|
2565
|
+
className: chunkH2BWO3SI_cjs.cn("group/menu-item relative", className),
|
|
2566
|
+
...props
|
|
2567
|
+
}
|
|
2568
|
+
);
|
|
2569
|
+
}
|
|
2570
|
+
var sidebarMenuButtonVariants = classVarianceAuthority.cva(
|
|
2571
|
+
"peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[state-open]:hover:bg-sidebar-accent data-[state-open]:hover:text-sidebar-accent-foreground data-[state-active]:bg-sidebar-accent data-[state-active]:font-medium data-[state-active]:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",
|
|
2572
|
+
{
|
|
2573
|
+
variants: {
|
|
2574
|
+
variant: {
|
|
2575
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
2576
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
2577
|
+
},
|
|
2578
|
+
size: {
|
|
2579
|
+
default: "h-8 text-sm",
|
|
2580
|
+
sm: "h-7 text-xs",
|
|
2581
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
2582
|
+
}
|
|
2583
|
+
},
|
|
2584
|
+
defaultVariants: {
|
|
2585
|
+
variant: "default",
|
|
2586
|
+
size: "default"
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
);
|
|
2590
|
+
function SidebarMenuButton({
|
|
2591
|
+
asChild = false,
|
|
2592
|
+
isActive = false,
|
|
2593
|
+
variant = "default",
|
|
2594
|
+
size = "default",
|
|
2595
|
+
tooltip,
|
|
2596
|
+
className,
|
|
2597
|
+
...props
|
|
2598
|
+
}) {
|
|
2599
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
2600
|
+
const { isMobile, state } = useSidebarContext("SidebarMenuButton");
|
|
2601
|
+
const button = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2602
|
+
Comp,
|
|
2603
|
+
{
|
|
2604
|
+
"data-slot": "sidebar-menu-button",
|
|
2605
|
+
"data-sidebar": "menu-button",
|
|
2606
|
+
"data-size": size,
|
|
2607
|
+
"data-active": isActive,
|
|
2608
|
+
className: chunkH2BWO3SI_cjs.cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
2609
|
+
...props
|
|
2610
|
+
}
|
|
2611
|
+
);
|
|
2612
|
+
if (!tooltip) {
|
|
2613
|
+
return button;
|
|
2614
|
+
}
|
|
2615
|
+
if (typeof tooltip === "string") {
|
|
2616
|
+
tooltip = { children: tooltip };
|
|
2617
|
+
}
|
|
2618
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkA7SBXO2Y_cjs.Tooltip, { children: [
|
|
2619
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkA7SBXO2Y_cjs.TooltipTrigger, { asChild: true, children: button }),
|
|
2620
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkA7SBXO2Y_cjs.TooltipContent, { side: "right", align: "center", hidden: state !== "collapsed" || isMobile, ...tooltip })
|
|
2621
|
+
] });
|
|
2622
|
+
}
|
|
2623
|
+
function SidebarMenuAction({
|
|
2624
|
+
className,
|
|
2625
|
+
asChild = false,
|
|
2626
|
+
showOnHover = false,
|
|
2627
|
+
...props
|
|
2628
|
+
}) {
|
|
2629
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
2630
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2631
|
+
Comp,
|
|
2632
|
+
{
|
|
2633
|
+
"data-slot": "sidebar-menu-action",
|
|
2634
|
+
"data-sidebar": "menu-action",
|
|
2635
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
2636
|
+
"text-sidebar-foreground ring-sidebar-ring peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded p-0 outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2637
|
+
showOnHover && "peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 md:opacity-0",
|
|
2638
|
+
className
|
|
2639
|
+
),
|
|
2640
|
+
...props
|
|
2641
|
+
}
|
|
2642
|
+
);
|
|
2643
|
+
}
|
|
2644
|
+
function SidebarMenuBadge({ className, ...props }) {
|
|
2645
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2646
|
+
"div",
|
|
2647
|
+
{
|
|
2648
|
+
"data-slot": "sidebar-menu-badge",
|
|
2649
|
+
"data-sidebar": "menu-badge",
|
|
2650
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
2651
|
+
"text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1",
|
|
2652
|
+
className
|
|
2653
|
+
),
|
|
2654
|
+
...props
|
|
2655
|
+
}
|
|
2656
|
+
);
|
|
2657
|
+
}
|
|
2658
|
+
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
2659
|
+
const [width] = React16__namespace.useState(() => {
|
|
2660
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2661
|
+
});
|
|
2662
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2663
|
+
"div",
|
|
2664
|
+
{
|
|
2665
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
2666
|
+
"data-sidebar": "menu-skeleton",
|
|
2667
|
+
className: chunkH2BWO3SI_cjs.cn("flex h-8 items-center gap-2 rounded px-2", className),
|
|
2668
|
+
...props,
|
|
2669
|
+
children: [
|
|
2670
|
+
showIcon && /* @__PURE__ */ jsxRuntime.jsx(chunkKTAIBRTH_cjs.Skeleton, { className: "size-4 rounded", "data-sidebar": "menu-skeleton-icon" }),
|
|
2671
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2672
|
+
chunkKTAIBRTH_cjs.Skeleton,
|
|
2673
|
+
{
|
|
2674
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
2675
|
+
"data-sidebar": "menu-skeleton-text",
|
|
2676
|
+
style: {
|
|
2677
|
+
"--skeleton-width": width
|
|
2678
|
+
}
|
|
2679
|
+
}
|
|
2680
|
+
)
|
|
2681
|
+
]
|
|
2682
|
+
}
|
|
2683
|
+
);
|
|
2684
|
+
}
|
|
2685
|
+
function SidebarMenuSub({ className, ...props }) {
|
|
2686
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2687
|
+
"ul",
|
|
2688
|
+
{
|
|
2689
|
+
"data-slot": "sidebar-menu-sub",
|
|
2690
|
+
"data-sidebar": "menu-sub",
|
|
2691
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
2692
|
+
"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",
|
|
2693
|
+
className
|
|
2694
|
+
),
|
|
2695
|
+
...props
|
|
2696
|
+
}
|
|
2697
|
+
);
|
|
2698
|
+
}
|
|
2699
|
+
function SidebarMenuSubItem({ className, ...props }) {
|
|
2700
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2701
|
+
"li",
|
|
2702
|
+
{
|
|
2703
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
2704
|
+
"data-sidebar": "menu-sub-item",
|
|
2705
|
+
className: chunkH2BWO3SI_cjs.cn("group/menu-sub-item relative", className),
|
|
2706
|
+
...props
|
|
2707
|
+
}
|
|
2708
|
+
);
|
|
2709
|
+
}
|
|
2710
|
+
function SidebarMenuSubButton({
|
|
2711
|
+
asChild = false,
|
|
2712
|
+
size = "md",
|
|
2713
|
+
isActive = false,
|
|
2714
|
+
className,
|
|
2715
|
+
...props
|
|
2716
|
+
}) {
|
|
2717
|
+
const Comp = asChild ? reactSlot.Slot : "a";
|
|
2718
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2719
|
+
Comp,
|
|
2720
|
+
{
|
|
2721
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
2722
|
+
"data-sidebar": "menu-sub-button",
|
|
2723
|
+
"data-size": size,
|
|
2724
|
+
"data-active": isActive,
|
|
2725
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
2726
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-[state=active]:bg-sidebar-accent data-[state=active]:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded px-2 outline-hidden group-data-[collapsible=icon]:hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2727
|
+
className
|
|
2728
|
+
),
|
|
2729
|
+
...props
|
|
2730
|
+
}
|
|
2731
|
+
);
|
|
2732
|
+
}
|
|
2207
2733
|
var buttonVariants = classVarianceAuthority.cva(
|
|
2208
2734
|
[
|
|
2209
2735
|
"inline-flex shrink-0 items-center justify-center gap-2 rounded text-sm font-medium whitespace-nowrap transition-all outline-none",
|
|
@@ -2332,6 +2858,29 @@ exports.ColorPickerHueSlider = ColorPickerHueSlider;
|
|
|
2332
2858
|
exports.ColorPickerInput = ColorPickerInput;
|
|
2333
2859
|
exports.ColorPickerSwatch = ColorPickerSwatch;
|
|
2334
2860
|
exports.ColorPickerTrigger = ColorPickerTrigger;
|
|
2861
|
+
exports.Sidebar = Sidebar;
|
|
2862
|
+
exports.SidebarContent = SidebarContent;
|
|
2863
|
+
exports.SidebarFooter = SidebarFooter;
|
|
2864
|
+
exports.SidebarGroup = SidebarGroup;
|
|
2865
|
+
exports.SidebarGroupAction = SidebarGroupAction;
|
|
2866
|
+
exports.SidebarGroupContent = SidebarGroupContent;
|
|
2867
|
+
exports.SidebarGroupLabel = SidebarGroupLabel;
|
|
2868
|
+
exports.SidebarHeader = SidebarHeader;
|
|
2869
|
+
exports.SidebarInput = SidebarInput;
|
|
2870
|
+
exports.SidebarInset = SidebarInset;
|
|
2871
|
+
exports.SidebarMenu = SidebarMenu;
|
|
2872
|
+
exports.SidebarMenuAction = SidebarMenuAction;
|
|
2873
|
+
exports.SidebarMenuBadge = SidebarMenuBadge;
|
|
2874
|
+
exports.SidebarMenuButton = SidebarMenuButton;
|
|
2875
|
+
exports.SidebarMenuItem = SidebarMenuItem;
|
|
2876
|
+
exports.SidebarMenuSkeleton = SidebarMenuSkeleton;
|
|
2877
|
+
exports.SidebarMenuSub = SidebarMenuSub;
|
|
2878
|
+
exports.SidebarMenuSubButton = SidebarMenuSubButton;
|
|
2879
|
+
exports.SidebarMenuSubItem = SidebarMenuSubItem;
|
|
2880
|
+
exports.SidebarProvider = SidebarProvider;
|
|
2881
|
+
exports.SidebarRail = SidebarRail;
|
|
2882
|
+
exports.SidebarSeparator = SidebarSeparator;
|
|
2883
|
+
exports.SidebarTrigger = SidebarTrigger;
|
|
2335
2884
|
exports.Stepper = Stepper;
|
|
2336
2885
|
exports.StepperActivationMode = StepperActivationMode;
|
|
2337
2886
|
exports.StepperContent = StepperContent;
|
|
@@ -2350,6 +2899,8 @@ exports.StepperTitle = StepperTitle;
|
|
|
2350
2899
|
exports.StepperTrigger = StepperTrigger;
|
|
2351
2900
|
exports.Toaster = Toaster;
|
|
2352
2901
|
exports.useColorPickerStore = useColorPickerStore;
|
|
2902
|
+
exports.useSidebar = useSidebar;
|
|
2903
|
+
exports.useSidebarContext = useSidebarContext;
|
|
2353
2904
|
exports.useStepperContext = useStepperContext;
|
|
2354
2905
|
exports.useStepperFocusContext = useStepperFocusContext;
|
|
2355
2906
|
exports.useStepperItemContext = useStepperItemContext;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Collapsible as Collapsible$1 } from 'radix-ui';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/components/collapsible/collapsible.tsx
|
|
5
|
+
function Collapsible({ ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Root, { "data-slot": "collapsible", ...props });
|
|
7
|
+
}
|
|
8
|
+
function CollapsibleTrigger({ ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Collapsible$1.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props });
|
|
10
|
+
}
|
|
11
|
+
function CollapsibleContent({ ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Collapsible$1.CollapsibleContent, { "data-slot": "collapsible-content", ...props });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|