@cryptlex/web-components 1.3.2 → 1.3.3
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/data-table/column-picker.es.js +81 -0
- package/dist/components/data-table/column-picker.es.js.map +1 -0
- package/dist/components/data-table/data-table.es.js +197 -0
- package/dist/components/data-table/data-table.es.js.map +1 -0
- package/dist/components/data-table/page-size.es.js +23 -0
- package/dist/components/data-table/page-size.es.js.map +1 -0
- package/dist/components/data-table/paginator.es.js +63 -0
- package/dist/components/data-table/paginator.es.js.map +1 -0
- package/dist/components/data-table/table-actions.es.js +82 -0
- package/dist/components/data-table/table-actions.es.js.map +1 -0
- package/dist/components/data-table/table-commons.es.js +55 -0
- package/dist/components/data-table/table-commons.es.js.map +1 -0
- package/dist/components/data-table/table-content.es.js +46 -0
- package/dist/components/data-table/table-content.es.js.map +1 -0
- package/dist/components/data-table/table-utils/constants.es.js +274 -0
- package/dist/components/data-table/table-utils/constants.es.js.map +1 -0
- package/dist/components/data-table/table-utils/createTableFetchFn.es.js +25 -0
- package/dist/components/data-table/table-utils/createTableFetchFn.es.js.map +1 -0
- package/dist/components/data-table/table-utils/date.es.js +12 -0
- package/dist/components/data-table/table-utils/date.es.js.map +1 -0
- package/dist/components/data-table/table-utils/fetch.es.js +40 -0
- package/dist/components/data-table/table-utils/fetch.es.js.map +1 -0
- package/dist/components/data-table/table-utils/link-display.es.js +21 -0
- package/dist/components/data-table/table-utils/link-display.es.js.map +1 -0
- package/dist/components/data-table/table-utils/string.es.js +19 -0
- package/dist/components/data-table/table-utils/string.es.js.map +1 -0
- package/dist/components/data-table/table-utils/types.es.js +5 -0
- package/dist/components/data-table/table-utils/types.es.js.map +1 -0
- package/dist/components/info-card/info-card.es.js +74 -0
- package/dist/components/info-card/info-card.es.js.map +1 -0
- package/dist/components/sidebar/app-layout.es.js +86 -0
- package/dist/components/sidebar/app-layout.es.js.map +1 -0
- package/dist/components/sidebar/nav-main.es.js +76 -0
- package/dist/components/sidebar/nav-main.es.js.map +1 -0
- package/dist/components/sidebar/sidebar.es.js +10 -0
- package/dist/components/sidebar/sidebar.es.js.map +1 -0
- package/dist/components/static-data-table/data-table.es.js +30 -0
- package/dist/components/static-data-table/data-table.es.js.map +1 -0
- package/dist/components/ui/button.es.js +12 -22
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/drawer.es.js +13 -12
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/dynamic-input.es.js +141 -0
- package/dist/components/ui/dynamic-input.es.js.map +1 -0
- package/dist/components/ui/mutli-select.es.js +197 -0
- package/dist/components/ui/mutli-select.es.js.map +1 -0
- package/dist/components/ui/search-input.es.js +41 -0
- package/dist/components/ui/search-input.es.js.map +1 -0
- package/dist/components/ui/sheet.es.js +11 -37
- package/dist/components/ui/sheet.es.js.map +1 -1
- package/dist/components/ui/sidebar.es.js +286 -264
- package/dist/components/ui/sidebar.es.js.map +1 -1
- package/dist/components/ui/table-page-layout.es.js +14 -0
- package/dist/components/ui/table-page-layout.es.js.map +1 -0
- package/dist/index.es.d.ts +303 -2
- package/dist/index.es.js +264 -208
- package/dist/index.es.js.map +1 -1
- package/dist/utils/index.es.js +13 -8
- package/dist/utils/index.es.js.map +1 -1
- package/package.json +10 -3
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Slot as g } from "@radix-ui/react-slot";
|
|
1
|
+
import { jsx as r, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { Slot as h } from "@radix-ui/react-slot";
|
|
4
3
|
import { cva as I } from "class-variance-authority";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { Sheet as A, SheetContent as D } from "./sheet.es.js";
|
|
4
|
+
import { Menu as k, ChevronLeft as z, ChevronRight as B } from "lucide-react";
|
|
5
|
+
import * as i from "react";
|
|
6
|
+
import { Button as E } from "./button.es.js";
|
|
7
|
+
import { Input as T } from "./input.es.js";
|
|
8
|
+
import { Separator as A } from "./separator.es.js";
|
|
9
|
+
import { Sheet as D, SheetContent as G, SheetHeader as O, SheetTitle as H, SheetDescription as K } from "./sheet.es.js";
|
|
12
10
|
import { Skeleton as M } from "./skeleton.es.js";
|
|
13
|
-
import { TooltipProvider as
|
|
14
|
-
|
|
11
|
+
import { TooltipProvider as L, Tooltip as j, TooltipTrigger as $, TooltipContent as V } from "./tooltip.es.js";
|
|
12
|
+
import { useIsMobile as W } from "../../hooks/use-mobile.es.js";
|
|
13
|
+
import { cn as o } from "../../utils/index.es.js";
|
|
14
|
+
const q = "sidebar:state", F = 60 * 60 * 24 * 7, U = "16rem", X = "18rem", Y = "3rem", J = "b", R = i.createContext(null);
|
|
15
15
|
function y() {
|
|
16
16
|
const a = i.useContext(R);
|
|
17
17
|
if (!a)
|
|
18
18
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
19
19
|
return a;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const Q = i.forwardRef(
|
|
22
22
|
({
|
|
23
23
|
defaultOpen: a = !0,
|
|
24
24
|
open: e,
|
|
@@ -26,57 +26,55 @@ const F = i.forwardRef(
|
|
|
26
26
|
className: d,
|
|
27
27
|
style: n,
|
|
28
28
|
children: s,
|
|
29
|
-
...
|
|
30
|
-
},
|
|
31
|
-
const
|
|
29
|
+
...c
|
|
30
|
+
}, f) => {
|
|
31
|
+
const u = W(), [p, b] = i.useState(!1), [v, _] = i.useState(a), m = e ?? v, x = i.useCallback(
|
|
32
32
|
(l) => {
|
|
33
33
|
if (t)
|
|
34
|
-
return t == null ? void 0 : t(
|
|
35
|
-
|
|
36
|
-
);
|
|
37
|
-
_(l), document.cookie = `${L}=${p}; path=/; max-age=${j}`;
|
|
34
|
+
return t == null ? void 0 : t(typeof l == "function" ? l(m) : l);
|
|
35
|
+
_(l), document.cookie = `${q}=${m}; path=/; max-age=${F}`;
|
|
38
36
|
},
|
|
39
|
-
[t,
|
|
40
|
-
),
|
|
37
|
+
[t, m]
|
|
38
|
+
), w = i.useCallback(() => u ? b((l) => !l) : x((l) => !l), [u, x, b]);
|
|
41
39
|
i.useEffect(() => {
|
|
42
|
-
const l = (
|
|
43
|
-
|
|
40
|
+
const l = (S) => {
|
|
41
|
+
S.key === J && (S.metaKey || S.ctrlKey) && (S.preventDefault(), w());
|
|
44
42
|
};
|
|
45
43
|
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
46
|
-
}, [
|
|
47
|
-
const N =
|
|
44
|
+
}, [w]);
|
|
45
|
+
const N = m ? "expanded" : "collapsed", C = i.useMemo(
|
|
48
46
|
() => ({
|
|
49
47
|
state: N,
|
|
50
|
-
open:
|
|
51
|
-
setOpen:
|
|
52
|
-
isMobile:
|
|
53
|
-
openMobile:
|
|
48
|
+
open: m,
|
|
49
|
+
setOpen: x,
|
|
50
|
+
isMobile: u,
|
|
51
|
+
openMobile: p,
|
|
54
52
|
setOpenMobile: b,
|
|
55
|
-
toggleSidebar:
|
|
53
|
+
toggleSidebar: w
|
|
56
54
|
}),
|
|
57
|
-
[N,
|
|
55
|
+
[N, m, x, u, p, b, w]
|
|
58
56
|
);
|
|
59
|
-
return /* @__PURE__ */ r(R.Provider, { value: C, children: /* @__PURE__ */ r(
|
|
57
|
+
return /* @__PURE__ */ r(R.Provider, { value: C, children: /* @__PURE__ */ r(L, { delayDuration: 0, children: /* @__PURE__ */ r(
|
|
60
58
|
"div",
|
|
61
59
|
{
|
|
62
60
|
style: {
|
|
63
|
-
"--sidebar-width":
|
|
64
|
-
"--sidebar-width-icon":
|
|
61
|
+
"--sidebar-width": U,
|
|
62
|
+
"--sidebar-width-icon": Y,
|
|
65
63
|
...n
|
|
66
64
|
},
|
|
67
65
|
className: o(
|
|
68
66
|
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
69
67
|
d
|
|
70
68
|
),
|
|
71
|
-
ref:
|
|
72
|
-
...
|
|
69
|
+
ref: f,
|
|
70
|
+
...c,
|
|
73
71
|
children: s
|
|
74
72
|
}
|
|
75
73
|
) }) });
|
|
76
74
|
}
|
|
77
75
|
);
|
|
78
|
-
|
|
79
|
-
const
|
|
76
|
+
Q.displayName = "SidebarProvider";
|
|
77
|
+
const Z = i.forwardRef(
|
|
80
78
|
({
|
|
81
79
|
side: a = "left",
|
|
82
80
|
variant: e = "sidebar",
|
|
@@ -84,8 +82,8 @@ const U = i.forwardRef(
|
|
|
84
82
|
className: d,
|
|
85
83
|
children: n,
|
|
86
84
|
...s
|
|
87
|
-
},
|
|
88
|
-
const { isMobile:
|
|
85
|
+
}, c) => {
|
|
86
|
+
const { isMobile: f, state: u, openMobile: p, setOpenMobile: b } = y();
|
|
89
87
|
return t === "none" ? /* @__PURE__ */ r(
|
|
90
88
|
"div",
|
|
91
89
|
{
|
|
@@ -93,29 +91,35 @@ const U = i.forwardRef(
|
|
|
93
91
|
"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
|
|
94
92
|
d
|
|
95
93
|
),
|
|
96
|
-
ref:
|
|
94
|
+
ref: c,
|
|
97
95
|
...s,
|
|
98
96
|
children: n
|
|
99
97
|
}
|
|
100
|
-
) :
|
|
101
|
-
|
|
98
|
+
) : f ? /* @__PURE__ */ r(D, { open: p, onOpenChange: b, ...s, children: /* @__PURE__ */ g(
|
|
99
|
+
G,
|
|
102
100
|
{
|
|
103
101
|
"data-sidebar": "sidebar",
|
|
104
102
|
"data-mobile": "true",
|
|
105
103
|
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
106
104
|
style: {
|
|
107
|
-
"--sidebar-width":
|
|
105
|
+
"--sidebar-width": X
|
|
108
106
|
},
|
|
109
107
|
side: a,
|
|
110
|
-
children:
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ g(O, { children: [
|
|
110
|
+
/* @__PURE__ */ r(H, {}),
|
|
111
|
+
/* @__PURE__ */ r(K, {})
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ r("div", { className: "flex h-full w-full flex-col", children: n })
|
|
114
|
+
]
|
|
111
115
|
}
|
|
112
|
-
) }) : /* @__PURE__ */
|
|
116
|
+
) }) : /* @__PURE__ */ g(
|
|
113
117
|
"div",
|
|
114
118
|
{
|
|
115
|
-
ref:
|
|
119
|
+
ref: c,
|
|
116
120
|
className: "group peer hidden md:block text-sidebar-foreground",
|
|
117
|
-
"data-state":
|
|
118
|
-
"data-collapsible":
|
|
121
|
+
"data-state": u,
|
|
122
|
+
"data-collapsible": u === "collapsed" ? t : "",
|
|
119
123
|
"data-variant": e,
|
|
120
124
|
"data-side": a,
|
|
121
125
|
children: [
|
|
@@ -156,69 +160,73 @@ const U = i.forwardRef(
|
|
|
156
160
|
);
|
|
157
161
|
}
|
|
158
162
|
);
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
const { toggleSidebar: n } = y();
|
|
162
|
-
return /* @__PURE__ */
|
|
163
|
-
|
|
163
|
+
Z.displayName = "Sidebar";
|
|
164
|
+
const P = i.forwardRef(({ className: a, onClick: e, ...t }, d) => {
|
|
165
|
+
const { toggleSidebar: n, open: s, isMobile: c } = y();
|
|
166
|
+
return /* @__PURE__ */ g(
|
|
167
|
+
E,
|
|
164
168
|
{
|
|
165
169
|
ref: d,
|
|
166
170
|
"data-sidebar": "trigger",
|
|
167
171
|
variant: "ghost",
|
|
168
172
|
size: "icon",
|
|
169
173
|
className: o("h-7 w-7", a),
|
|
170
|
-
onClick: (
|
|
171
|
-
e == null || e(
|
|
174
|
+
onClick: (f) => {
|
|
175
|
+
e == null || e(f), n();
|
|
172
176
|
},
|
|
173
177
|
...t,
|
|
174
178
|
children: [
|
|
175
|
-
/* @__PURE__ */ r(k, {}),
|
|
179
|
+
c ? /* @__PURE__ */ r(k, {}) : s ? /* @__PURE__ */ r(z, {}) : /* @__PURE__ */ r(B, {}),
|
|
176
180
|
/* @__PURE__ */ r("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
177
181
|
]
|
|
178
182
|
}
|
|
179
183
|
);
|
|
180
184
|
});
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
185
|
+
P.displayName = "SidebarTrigger";
|
|
186
|
+
const ee = i.forwardRef(
|
|
187
|
+
({ className: a, ...e }, t) => {
|
|
188
|
+
const { toggleSidebar: d } = y();
|
|
189
|
+
return /* @__PURE__ */ r(
|
|
190
|
+
"button",
|
|
191
|
+
{
|
|
192
|
+
ref: t,
|
|
193
|
+
"data-sidebar": "rail",
|
|
194
|
+
"aria-label": "Toggle Sidebar",
|
|
195
|
+
tabIndex: -1,
|
|
196
|
+
onClick: d,
|
|
197
|
+
title: "Toggle Sidebar",
|
|
198
|
+
className: o(
|
|
199
|
+
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
200
|
+
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
201
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
202
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
203
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
204
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
205
|
+
a
|
|
206
|
+
),
|
|
207
|
+
...e
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
ee.displayName = "SidebarRail";
|
|
213
|
+
const ae = i.forwardRef(
|
|
214
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
215
|
+
"main",
|
|
186
216
|
{
|
|
187
217
|
ref: t,
|
|
188
|
-
"data-sidebar": "rail",
|
|
189
|
-
"aria-label": "Toggle Sidebar",
|
|
190
|
-
tabIndex: -1,
|
|
191
|
-
onClick: d,
|
|
192
|
-
title: "Toggle Sidebar",
|
|
193
218
|
className: o(
|
|
194
|
-
"
|
|
195
|
-
"[[data-
|
|
196
|
-
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
197
|
-
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
198
|
-
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
199
|
-
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
219
|
+
"relative flex min-h-svh flex-1 flex-col bg-background",
|
|
220
|
+
"peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
200
221
|
a
|
|
201
222
|
),
|
|
202
223
|
...e
|
|
203
224
|
}
|
|
204
|
-
)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
{
|
|
210
|
-
ref: t,
|
|
211
|
-
className: o(
|
|
212
|
-
"relative flex min-h-svh flex-1 flex-col bg-background",
|
|
213
|
-
"peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
214
|
-
a
|
|
215
|
-
),
|
|
216
|
-
...e
|
|
217
|
-
}
|
|
218
|
-
));
|
|
219
|
-
J.displayName = "SidebarInset";
|
|
220
|
-
const P = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
221
|
-
E,
|
|
225
|
+
)
|
|
226
|
+
);
|
|
227
|
+
ae.displayName = "SidebarInset";
|
|
228
|
+
const te = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
229
|
+
T,
|
|
222
230
|
{
|
|
223
231
|
ref: t,
|
|
224
232
|
"data-sidebar": "input",
|
|
@@ -229,29 +237,33 @@ const P = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
229
237
|
...e
|
|
230
238
|
}
|
|
231
239
|
));
|
|
232
|
-
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
"
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
240
|
+
te.displayName = "SidebarInput";
|
|
241
|
+
const re = i.forwardRef(
|
|
242
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
243
|
+
"div",
|
|
244
|
+
{
|
|
245
|
+
ref: t,
|
|
246
|
+
"data-sidebar": "header",
|
|
247
|
+
className: o("flex flex-col gap-2 p-2", a),
|
|
248
|
+
...e
|
|
249
|
+
}
|
|
250
|
+
)
|
|
251
|
+
);
|
|
252
|
+
re.displayName = "SidebarHeader";
|
|
253
|
+
const ie = i.forwardRef(
|
|
254
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
255
|
+
"div",
|
|
256
|
+
{
|
|
257
|
+
ref: t,
|
|
258
|
+
"data-sidebar": "footer",
|
|
259
|
+
className: o("flex flex-col gap-2 p-2", a),
|
|
260
|
+
...e
|
|
261
|
+
}
|
|
262
|
+
)
|
|
263
|
+
);
|
|
264
|
+
ie.displayName = "SidebarFooter";
|
|
265
|
+
const oe = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
266
|
+
A,
|
|
255
267
|
{
|
|
256
268
|
ref: t,
|
|
257
269
|
"data-sidebar": "separator",
|
|
@@ -259,32 +271,36 @@ const ee = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
259
271
|
...e
|
|
260
272
|
}
|
|
261
273
|
));
|
|
262
|
-
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
"
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
)
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
274
|
+
oe.displayName = "SidebarSeparator";
|
|
275
|
+
const de = i.forwardRef(
|
|
276
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
277
|
+
"div",
|
|
278
|
+
{
|
|
279
|
+
ref: t,
|
|
280
|
+
"data-sidebar": "content",
|
|
281
|
+
className: o(
|
|
282
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
283
|
+
a
|
|
284
|
+
),
|
|
285
|
+
...e
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
);
|
|
289
|
+
de.displayName = "SidebarContent";
|
|
290
|
+
const ne = i.forwardRef(
|
|
291
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
292
|
+
"div",
|
|
293
|
+
{
|
|
294
|
+
ref: t,
|
|
295
|
+
"data-sidebar": "group",
|
|
296
|
+
className: o("relative flex w-full min-w-0 flex-col p-2", a),
|
|
297
|
+
...e
|
|
298
|
+
}
|
|
299
|
+
)
|
|
300
|
+
);
|
|
301
|
+
ne.displayName = "SidebarGroup";
|
|
302
|
+
const se = i.forwardRef(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
|
|
303
|
+
e ? h : "div",
|
|
288
304
|
{
|
|
289
305
|
ref: d,
|
|
290
306
|
"data-sidebar": "group-label",
|
|
@@ -296,9 +312,9 @@ const re = i.forwardRef(({ className: a, asChild: e = !1, ...t }, d) => /* @__PU
|
|
|
296
312
|
...t
|
|
297
313
|
}
|
|
298
314
|
));
|
|
299
|
-
|
|
300
|
-
const
|
|
301
|
-
e ?
|
|
315
|
+
se.displayName = "SidebarGroupLabel";
|
|
316
|
+
const le = i.forwardRef(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
|
|
317
|
+
e ? h : "button",
|
|
302
318
|
{
|
|
303
319
|
ref: d,
|
|
304
320
|
"data-sidebar": "group-action",
|
|
@@ -312,38 +328,44 @@ const ie = i.forwardRef(({ className: a, asChild: e = !1, ...t }, d) => /* @__PU
|
|
|
312
328
|
...t
|
|
313
329
|
}
|
|
314
330
|
));
|
|
315
|
-
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
"
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
)
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
331
|
+
le.displayName = "SidebarGroupAction";
|
|
332
|
+
const ce = i.forwardRef(
|
|
333
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
334
|
+
"div",
|
|
335
|
+
{
|
|
336
|
+
ref: t,
|
|
337
|
+
"data-sidebar": "group-content",
|
|
338
|
+
className: o("w-full text-body", a),
|
|
339
|
+
...e
|
|
340
|
+
}
|
|
341
|
+
)
|
|
342
|
+
);
|
|
343
|
+
ce.displayName = "SidebarGroupContent";
|
|
344
|
+
const ue = i.forwardRef(
|
|
345
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
346
|
+
"ul",
|
|
347
|
+
{
|
|
348
|
+
ref: t,
|
|
349
|
+
"data-sidebar": "menu",
|
|
350
|
+
className: o("flex w-full min-w-0 flex-col", a),
|
|
351
|
+
...e
|
|
352
|
+
}
|
|
353
|
+
)
|
|
354
|
+
);
|
|
355
|
+
ue.displayName = "SidebarMenu";
|
|
356
|
+
const be = i.forwardRef(
|
|
357
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
358
|
+
"li",
|
|
359
|
+
{
|
|
360
|
+
ref: t,
|
|
361
|
+
"data-sidebar": "menu-item",
|
|
362
|
+
className: o("group/menu-item relative", a),
|
|
363
|
+
...e
|
|
364
|
+
}
|
|
365
|
+
)
|
|
366
|
+
);
|
|
367
|
+
be.displayName = "SidebarMenuItem";
|
|
368
|
+
const fe = I(
|
|
347
369
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-body outline-none ring-sidebar-ring transition-[width,height,padding] 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 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
348
370
|
{
|
|
349
371
|
variants: {
|
|
@@ -362,46 +384,46 @@ const se = I(
|
|
|
362
384
|
size: "default"
|
|
363
385
|
}
|
|
364
386
|
}
|
|
365
|
-
),
|
|
387
|
+
), pe = i.forwardRef(
|
|
366
388
|
({
|
|
367
389
|
asChild: a = !1,
|
|
368
390
|
isActive: e = !1,
|
|
369
391
|
variant: t = "default",
|
|
370
|
-
size: d = "
|
|
392
|
+
size: d = "lg",
|
|
371
393
|
tooltip: n,
|
|
372
394
|
className: s,
|
|
373
|
-
...
|
|
374
|
-
},
|
|
375
|
-
const
|
|
376
|
-
|
|
395
|
+
...c
|
|
396
|
+
}, f) => {
|
|
397
|
+
const u = a ? h : "button", { isMobile: p, state: b } = y(), v = /* @__PURE__ */ r(
|
|
398
|
+
u,
|
|
377
399
|
{
|
|
378
|
-
ref:
|
|
400
|
+
ref: f,
|
|
379
401
|
"data-sidebar": "menu-button",
|
|
380
402
|
"data-size": d,
|
|
381
403
|
"data-active": e,
|
|
382
|
-
className: o(
|
|
383
|
-
...
|
|
404
|
+
className: o(fe({ variant: t, size: d }), s),
|
|
405
|
+
...c
|
|
384
406
|
}
|
|
385
407
|
);
|
|
386
408
|
return n ? (typeof n == "string" && (n = {
|
|
387
409
|
children: n
|
|
388
|
-
}), /* @__PURE__ */
|
|
389
|
-
/* @__PURE__ */ r(
|
|
410
|
+
}), /* @__PURE__ */ g(j, { children: [
|
|
411
|
+
/* @__PURE__ */ r($, { asChild: !0, children: v }),
|
|
390
412
|
/* @__PURE__ */ r(
|
|
391
|
-
|
|
413
|
+
V,
|
|
392
414
|
{
|
|
393
415
|
side: "right",
|
|
394
416
|
align: "center",
|
|
395
|
-
hidden: b !== "collapsed" ||
|
|
417
|
+
hidden: b !== "collapsed" || p,
|
|
396
418
|
...n
|
|
397
419
|
}
|
|
398
420
|
)
|
|
399
|
-
] })) :
|
|
421
|
+
] })) : v;
|
|
400
422
|
}
|
|
401
423
|
);
|
|
402
|
-
|
|
403
|
-
const
|
|
404
|
-
e ?
|
|
424
|
+
pe.displayName = "SidebarMenuButton";
|
|
425
|
+
const me = i.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, ...d }, n) => /* @__PURE__ */ r(
|
|
426
|
+
e ? h : "button",
|
|
405
427
|
{
|
|
406
428
|
ref: n,
|
|
407
429
|
"data-sidebar": "menu-action",
|
|
@@ -419,28 +441,30 @@ const ce = i.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, .
|
|
|
419
441
|
...d
|
|
420
442
|
}
|
|
421
443
|
));
|
|
422
|
-
|
|
423
|
-
const
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
444
|
+
me.displayName = "SidebarMenuAction";
|
|
445
|
+
const ge = i.forwardRef(
|
|
446
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
447
|
+
"div",
|
|
448
|
+
{
|
|
449
|
+
ref: t,
|
|
450
|
+
"data-sidebar": "menu-badge",
|
|
451
|
+
className: o(
|
|
452
|
+
"absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-caption font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
|
|
453
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
454
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
455
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
456
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
457
|
+
"group-data-[collapsible=icon]:hidden",
|
|
458
|
+
a
|
|
459
|
+
),
|
|
460
|
+
...e
|
|
461
|
+
}
|
|
462
|
+
)
|
|
463
|
+
);
|
|
464
|
+
ge.displayName = "SidebarMenuBadge";
|
|
465
|
+
const he = i.forwardRef(({ className: a, showIcon: e = !1, ...t }, d) => {
|
|
442
466
|
const n = i.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
443
|
-
return /* @__PURE__ */
|
|
467
|
+
return /* @__PURE__ */ g(
|
|
444
468
|
"div",
|
|
445
469
|
{
|
|
446
470
|
ref: d,
|
|
@@ -448,13 +472,7 @@ const ue = i.forwardRef(({ className: a, showIcon: e = !1, ...t }, d) => {
|
|
|
448
472
|
className: o("rounded-md h-8 flex gap-2 px-2 items-center", a),
|
|
449
473
|
...t,
|
|
450
474
|
children: [
|
|
451
|
-
e && /* @__PURE__ */ r(
|
|
452
|
-
M,
|
|
453
|
-
{
|
|
454
|
-
className: "size-4 rounded-md",
|
|
455
|
-
"data-sidebar": "menu-skeleton-icon"
|
|
456
|
-
}
|
|
457
|
-
),
|
|
475
|
+
e && /* @__PURE__ */ r(M, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
|
|
458
476
|
/* @__PURE__ */ r(
|
|
459
477
|
M,
|
|
460
478
|
{
|
|
@@ -469,25 +487,29 @@ const ue = i.forwardRef(({ className: a, showIcon: e = !1, ...t }, d) => {
|
|
|
469
487
|
}
|
|
470
488
|
);
|
|
471
489
|
});
|
|
472
|
-
|
|
473
|
-
const
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
const
|
|
490
|
-
a
|
|
490
|
+
he.displayName = "SidebarMenuSkeleton";
|
|
491
|
+
const ve = i.forwardRef(
|
|
492
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
493
|
+
"ul",
|
|
494
|
+
{
|
|
495
|
+
ref: t,
|
|
496
|
+
"data-sidebar": "menu-sub",
|
|
497
|
+
className: o(
|
|
498
|
+
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5",
|
|
499
|
+
"group-data-[collapsible=icon]:hidden",
|
|
500
|
+
a
|
|
501
|
+
),
|
|
502
|
+
...e
|
|
503
|
+
}
|
|
504
|
+
)
|
|
505
|
+
);
|
|
506
|
+
ve.displayName = "SidebarMenuSub";
|
|
507
|
+
const xe = i.forwardRef(
|
|
508
|
+
({ ...a }, e) => /* @__PURE__ */ r("li", { ref: e, ...a })
|
|
509
|
+
);
|
|
510
|
+
xe.displayName = "SidebarMenuSubItem";
|
|
511
|
+
const we = i.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, className: d, ...n }, s) => /* @__PURE__ */ r(
|
|
512
|
+
a ? h : "a",
|
|
491
513
|
{
|
|
492
514
|
ref: s,
|
|
493
515
|
"data-sidebar": "menu-sub-button",
|
|
@@ -504,31 +526,31 @@ const me = i.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, classNa
|
|
|
504
526
|
...n
|
|
505
527
|
}
|
|
506
528
|
));
|
|
507
|
-
|
|
529
|
+
we.displayName = "SidebarMenuSubButton";
|
|
508
530
|
export {
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
531
|
+
Z as Sidebar,
|
|
532
|
+
de as SidebarContent,
|
|
533
|
+
ie as SidebarFooter,
|
|
534
|
+
ne as SidebarGroup,
|
|
535
|
+
le as SidebarGroupAction,
|
|
536
|
+
ce as SidebarGroupContent,
|
|
537
|
+
se as SidebarGroupLabel,
|
|
538
|
+
re as SidebarHeader,
|
|
539
|
+
te as SidebarInput,
|
|
540
|
+
ae as SidebarInset,
|
|
541
|
+
ue as SidebarMenu,
|
|
542
|
+
me as SidebarMenuAction,
|
|
543
|
+
ge as SidebarMenuBadge,
|
|
544
|
+
pe as SidebarMenuButton,
|
|
545
|
+
be as SidebarMenuItem,
|
|
546
|
+
he as SidebarMenuSkeleton,
|
|
547
|
+
ve as SidebarMenuSub,
|
|
548
|
+
we as SidebarMenuSubButton,
|
|
549
|
+
xe as SidebarMenuSubItem,
|
|
550
|
+
Q as SidebarProvider,
|
|
551
|
+
ee as SidebarRail,
|
|
552
|
+
oe as SidebarSeparator,
|
|
553
|
+
P as SidebarTrigger,
|
|
532
554
|
y as useSidebar
|
|
533
555
|
};
|
|
534
556
|
//# sourceMappingURL=sidebar.es.js.map
|