laif-ds 0.2.90 → 0.2.91
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/CHANGELOG.md +20 -0
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/agent-docs/adoption-report.json +24 -26
- package/dist/agent-docs/components/AppSidebar.md +51 -12
- package/dist/agent-docs/components/Sheet.md +4 -1
- package/dist/agent-docs/components/Sidebar.md +2 -1
- package/dist/agent-docs/components-list.md +1 -1
- package/dist/agent-docs/manifest.json +10 -6
- package/dist/components/ui/app-sidebar.js +188 -84
- package/dist/components/ui/sheet.js +42 -39
- package/dist/components/ui/sidebar.js +105 -108
- package/dist/index.d.ts +3 -2
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Root as i, Content as l, Close as c, Description as
|
|
2
|
+
import { jsx as a, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
import { Root as i, Content as l, Close as c, Description as u, Title as f, Trigger as m, Portal as h, Overlay as p } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
4
4
|
import { designTokens as n } from "../design-tokens.js";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as o } from "../../lib/utils.js";
|
|
6
6
|
import b from "../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
7
|
-
function
|
|
8
|
-
return /* @__PURE__ */
|
|
7
|
+
function z({ ...t }) {
|
|
8
|
+
return /* @__PURE__ */ a(i, { "data-slot": "sheet", ...t });
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function T({
|
|
11
11
|
...t
|
|
12
12
|
}) {
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ a(m, { "data-slot": "sheet-trigger", ...t });
|
|
14
14
|
}
|
|
15
15
|
function g({
|
|
16
16
|
...t
|
|
17
17
|
}) {
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ a(h, { "data-slot": "sheet-portal", ...t });
|
|
19
19
|
}
|
|
20
20
|
function x({
|
|
21
21
|
className: t,
|
|
22
22
|
...e
|
|
23
23
|
}) {
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ a(
|
|
25
25
|
p,
|
|
26
26
|
{
|
|
27
27
|
"data-slot": "sheet-overlay",
|
|
28
|
-
className:
|
|
28
|
+
className: o(
|
|
29
29
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
30
30
|
t
|
|
31
31
|
),
|
|
@@ -33,40 +33,43 @@ function x({
|
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function k({
|
|
37
37
|
className: t,
|
|
38
38
|
children: e,
|
|
39
|
-
side:
|
|
39
|
+
side: s = "right",
|
|
40
40
|
...d
|
|
41
41
|
}) {
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ r(g, { children: [
|
|
43
|
+
/* @__PURE__ */ a(x, {}),
|
|
44
|
+
/* @__PURE__ */ r(
|
|
45
45
|
l,
|
|
46
46
|
{
|
|
47
47
|
"data-slot": "sheet-content",
|
|
48
|
-
className:
|
|
48
|
+
className: o(
|
|
49
49
|
"bg-d-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
s === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right border-d-border inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
51
|
+
s === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left border-d-border inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
52
|
+
s === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top border-d-border inset-x-0 top-0 h-auto border-b",
|
|
53
|
+
s === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom border-d-border inset-x-0 bottom-0 h-auto border-t",
|
|
54
|
+
// Covers the viewport, so there is no edge to slide in from: it fades
|
|
55
|
+
// and scales up instead, the usual full-screen mobile menu motion.
|
|
56
|
+
s === "full" && "data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 inset-0 h-svh w-screen max-w-none data-[state=closed]:duration-200 data-[state=open]:duration-300",
|
|
54
57
|
t
|
|
55
58
|
),
|
|
56
59
|
...d,
|
|
57
60
|
children: [
|
|
58
61
|
e,
|
|
59
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ r(
|
|
60
63
|
c,
|
|
61
64
|
{
|
|
62
|
-
className:
|
|
65
|
+
className: o(
|
|
63
66
|
"ring-offset-d-background data-[state=open]:bg-d-secondary absolute top-4 right-4 opacity-70 transition-opacity hover:opacity-100 disabled:pointer-events-none",
|
|
64
67
|
n.focusRing,
|
|
65
68
|
n.radius.sm
|
|
66
69
|
),
|
|
67
70
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ a(b, { className: "size-4" }),
|
|
72
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
|
|
70
73
|
]
|
|
71
74
|
}
|
|
72
75
|
)
|
|
@@ -75,22 +78,22 @@ function C({
|
|
|
75
78
|
)
|
|
76
79
|
] });
|
|
77
80
|
}
|
|
78
|
-
function
|
|
79
|
-
return /* @__PURE__ */
|
|
81
|
+
function C({ className: t, ...e }) {
|
|
82
|
+
return /* @__PURE__ */ a(
|
|
80
83
|
"div",
|
|
81
84
|
{
|
|
82
85
|
"data-slot": "sheet-header",
|
|
83
|
-
className:
|
|
86
|
+
className: o("flex flex-col gap-1.5 p-4", t),
|
|
84
87
|
...e
|
|
85
88
|
}
|
|
86
89
|
);
|
|
87
90
|
}
|
|
88
91
|
function j({ className: t, ...e }) {
|
|
89
|
-
return /* @__PURE__ */
|
|
92
|
+
return /* @__PURE__ */ a(
|
|
90
93
|
"div",
|
|
91
94
|
{
|
|
92
95
|
"data-slot": "sheet-footer",
|
|
93
|
-
className:
|
|
96
|
+
className: o("mt-auto flex flex-col gap-2 p-4", t),
|
|
94
97
|
...e
|
|
95
98
|
}
|
|
96
99
|
);
|
|
@@ -99,11 +102,11 @@ function D({
|
|
|
99
102
|
className: t,
|
|
100
103
|
...e
|
|
101
104
|
}) {
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
|
|
105
|
+
return /* @__PURE__ */ a(
|
|
106
|
+
f,
|
|
104
107
|
{
|
|
105
108
|
"data-slot": "sheet-title",
|
|
106
|
-
className:
|
|
109
|
+
className: o("text-d-foreground font-semibold", t),
|
|
107
110
|
...e
|
|
108
111
|
}
|
|
109
112
|
);
|
|
@@ -112,21 +115,21 @@ function O({
|
|
|
112
115
|
className: t,
|
|
113
116
|
...e
|
|
114
117
|
}) {
|
|
115
|
-
return /* @__PURE__ */
|
|
116
|
-
|
|
118
|
+
return /* @__PURE__ */ a(
|
|
119
|
+
u,
|
|
117
120
|
{
|
|
118
121
|
"data-slot": "sheet-description",
|
|
119
|
-
className:
|
|
122
|
+
className: o("text-d-secondary-foreground text-sm", t),
|
|
120
123
|
...e
|
|
121
124
|
}
|
|
122
125
|
);
|
|
123
126
|
}
|
|
124
127
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
z as Sheet,
|
|
129
|
+
k as SheetContent,
|
|
127
130
|
O as SheetDescription,
|
|
128
131
|
j as SheetFooter,
|
|
129
|
-
|
|
132
|
+
C as SheetHeader,
|
|
130
133
|
D as SheetTitle,
|
|
131
|
-
|
|
134
|
+
T as SheetTrigger
|
|
132
135
|
};
|
|
@@ -3,23 +3,23 @@ import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
|
3
3
|
import { Root as v } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
4
4
|
import { cva as k } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
5
|
import * as d from "react";
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Input as
|
|
8
|
-
import { Separator as
|
|
9
|
-
import { Sheet as
|
|
6
|
+
import { Button as z } from "./button.js";
|
|
7
|
+
import { Input as I } from "./input.js";
|
|
8
|
+
import { Separator as T } from "./separator.js";
|
|
9
|
+
import { Sheet as B, SheetContent as E, SheetHeader as A, SheetTitle as D, SheetDescription as O } from "./sheet.js";
|
|
10
10
|
import { Skeleton as R } from "./skeleton.js";
|
|
11
|
-
import { Tooltip as G, TooltipTrigger as
|
|
12
|
-
import { useIsMobile as
|
|
11
|
+
import { Tooltip as G, TooltipTrigger as j, TooltipContent as H, TooltipProvider as K } from "./tooltip.js";
|
|
12
|
+
import { useIsMobile as L } from "../../hooks/use-mobile.js";
|
|
13
13
|
import { cn as i } from "../../lib/utils.js";
|
|
14
14
|
import P from "../../node_modules/lucide-react/dist/esm/icons/panel-left.js";
|
|
15
|
-
const $ = "sidebar_state", V = 3600 * 24 * 7,
|
|
16
|
-
function
|
|
15
|
+
const $ = "sidebar_state", V = 3600 * 24 * 7, q = "16rem", F = "3rem", W = "b", M = d.createContext(null);
|
|
16
|
+
function y() {
|
|
17
17
|
const a = d.useContext(M);
|
|
18
18
|
if (!a)
|
|
19
19
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
20
20
|
return a;
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const U = d.forwardRef(
|
|
23
23
|
({
|
|
24
24
|
defaultOpen: a = !0,
|
|
25
25
|
open: e,
|
|
@@ -29,7 +29,7 @@ const X = d.forwardRef(
|
|
|
29
29
|
children: s,
|
|
30
30
|
...f
|
|
31
31
|
}, g) => {
|
|
32
|
-
const c =
|
|
32
|
+
const c = L(), [p, u] = d.useState(!1), [x, _] = d.useState(a), h = e ?? x, w = d.useCallback(
|
|
33
33
|
(l) => {
|
|
34
34
|
const b = typeof l == "function" ? l(h) : l;
|
|
35
35
|
t ? t(b) : _(b), document.cookie = `${$}=${b}; path=/; max-age=${V}`;
|
|
@@ -38,13 +38,13 @@ const X = d.forwardRef(
|
|
|
38
38
|
), S = d.useCallback(() => c ? u((l) => !l) : w((l) => !l), [c, w, u]);
|
|
39
39
|
d.useEffect(() => {
|
|
40
40
|
const l = (b) => {
|
|
41
|
-
b.key ===
|
|
41
|
+
b.key === W && (b.metaKey || b.ctrlKey) && (b.preventDefault(), S());
|
|
42
42
|
};
|
|
43
43
|
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
44
44
|
}, [S]);
|
|
45
|
-
const
|
|
45
|
+
const N = h ? "expanded" : "collapsed", C = d.useMemo(
|
|
46
46
|
() => ({
|
|
47
|
-
state:
|
|
47
|
+
state: N,
|
|
48
48
|
open: h,
|
|
49
49
|
setOpen: w,
|
|
50
50
|
isMobile: c,
|
|
@@ -53,7 +53,7 @@ const X = d.forwardRef(
|
|
|
53
53
|
toggleSidebar: S
|
|
54
54
|
}),
|
|
55
55
|
[
|
|
56
|
-
|
|
56
|
+
N,
|
|
57
57
|
h,
|
|
58
58
|
w,
|
|
59
59
|
c,
|
|
@@ -62,11 +62,11 @@ const X = d.forwardRef(
|
|
|
62
62
|
S
|
|
63
63
|
]
|
|
64
64
|
);
|
|
65
|
-
return /* @__PURE__ */ r(M.Provider, { value: C, children: /* @__PURE__ */ r(
|
|
65
|
+
return /* @__PURE__ */ r(M.Provider, { value: C, children: /* @__PURE__ */ r(K, { delayDuration: 0, children: /* @__PURE__ */ r(
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
68
68
|
style: {
|
|
69
|
-
"--sidebar-width":
|
|
69
|
+
"--sidebar-width": q,
|
|
70
70
|
"--sidebar-width-icon": F,
|
|
71
71
|
...n
|
|
72
72
|
},
|
|
@@ -81,8 +81,8 @@ const X = d.forwardRef(
|
|
|
81
81
|
) }) });
|
|
82
82
|
}
|
|
83
83
|
);
|
|
84
|
-
|
|
85
|
-
const
|
|
84
|
+
U.displayName = "SidebarProvider";
|
|
85
|
+
const X = d.forwardRef(
|
|
86
86
|
({
|
|
87
87
|
side: a = "left",
|
|
88
88
|
variant: e = "sidebar",
|
|
@@ -91,7 +91,7 @@ const Y = d.forwardRef(
|
|
|
91
91
|
children: n,
|
|
92
92
|
...s
|
|
93
93
|
}, f) => {
|
|
94
|
-
const { isMobile: g, state: c, openMobile: p, setOpenMobile: u } =
|
|
94
|
+
const { isMobile: g, state: c, openMobile: p, setOpenMobile: u } = y();
|
|
95
95
|
return t === "none" ? /* @__PURE__ */ r(
|
|
96
96
|
"div",
|
|
97
97
|
{
|
|
@@ -103,19 +103,16 @@ const Y = d.forwardRef(
|
|
|
103
103
|
...s,
|
|
104
104
|
children: n
|
|
105
105
|
}
|
|
106
|
-
) : g ? /* @__PURE__ */ r(
|
|
107
|
-
|
|
106
|
+
) : g ? /* @__PURE__ */ r(B, { open: p, onOpenChange: u, ...s, children: /* @__PURE__ */ m(
|
|
107
|
+
E,
|
|
108
108
|
{
|
|
109
109
|
"data-sidebar": "sidebar",
|
|
110
110
|
"data-mobile": "true",
|
|
111
|
-
className: "bg-d-sidebar text-d-sidebar-foreground
|
|
112
|
-
|
|
113
|
-
"--sidebar-width": q
|
|
114
|
-
},
|
|
115
|
-
side: a,
|
|
111
|
+
className: "bg-d-sidebar text-d-sidebar-foreground p-0 [&_[data-sidebar=header]]:pr-12 [&>button]:top-2 [&>button]:right-2 [&>button]:flex [&>button]:size-11 [&>button]:items-center [&>button]:justify-center [&>button]:opacity-100",
|
|
112
|
+
side: "full",
|
|
116
113
|
children: [
|
|
117
|
-
/* @__PURE__ */ m(
|
|
118
|
-
/* @__PURE__ */ r(
|
|
114
|
+
/* @__PURE__ */ m(A, { className: "sr-only", children: [
|
|
115
|
+
/* @__PURE__ */ r(D, { children: "Sidebar" }),
|
|
119
116
|
/* @__PURE__ */ r(O, { children: "Displays the mobile sidebar." })
|
|
120
117
|
] }),
|
|
121
118
|
/* @__PURE__ */ r("div", { className: "flex h-full w-full flex-col", children: n })
|
|
@@ -138,7 +135,7 @@ const Y = d.forwardRef(
|
|
|
138
135
|
"relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear",
|
|
139
136
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
140
137
|
"group-data-[side=right]:rotate-180",
|
|
141
|
-
e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
|
|
138
|
+
e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]"
|
|
142
139
|
)
|
|
143
140
|
}
|
|
144
141
|
),
|
|
@@ -149,7 +146,7 @@ const Y = d.forwardRef(
|
|
|
149
146
|
"fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
150
147
|
a === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
151
148
|
// Adjust the padding for floating and inset variants.
|
|
152
|
-
e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
149
|
+
e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
153
150
|
o
|
|
154
151
|
),
|
|
155
152
|
...s,
|
|
@@ -168,11 +165,11 @@ const Y = d.forwardRef(
|
|
|
168
165
|
);
|
|
169
166
|
}
|
|
170
167
|
);
|
|
171
|
-
|
|
172
|
-
const
|
|
173
|
-
const { toggleSidebar: n } =
|
|
168
|
+
X.displayName = "Sidebar";
|
|
169
|
+
const Y = d.forwardRef(({ className: a, onClick: e, ...t }, o) => {
|
|
170
|
+
const { toggleSidebar: n } = y();
|
|
174
171
|
return /* @__PURE__ */ m(
|
|
175
|
-
|
|
172
|
+
z,
|
|
176
173
|
{
|
|
177
174
|
ref: o,
|
|
178
175
|
"data-sidebar": "trigger",
|
|
@@ -190,9 +187,9 @@ const J = d.forwardRef(({ className: a, onClick: e, ...t }, o) => {
|
|
|
190
187
|
}
|
|
191
188
|
);
|
|
192
189
|
});
|
|
193
|
-
|
|
194
|
-
const
|
|
195
|
-
const { toggleSidebar: o } =
|
|
190
|
+
Y.displayName = "SidebarTrigger";
|
|
191
|
+
const J = d.forwardRef(({ className: a, ...e }, t) => {
|
|
192
|
+
const { toggleSidebar: o } = y();
|
|
196
193
|
return /* @__PURE__ */ r(
|
|
197
194
|
"button",
|
|
198
195
|
{
|
|
@@ -215,8 +212,8 @@ const Q = d.forwardRef(({ className: a, ...e }, t) => {
|
|
|
215
212
|
}
|
|
216
213
|
);
|
|
217
214
|
});
|
|
218
|
-
|
|
219
|
-
const
|
|
215
|
+
J.displayName = "SidebarRail";
|
|
216
|
+
const Q = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
220
217
|
"main",
|
|
221
218
|
{
|
|
222
219
|
ref: t,
|
|
@@ -228,9 +225,9 @@ const Z = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
228
225
|
...e
|
|
229
226
|
}
|
|
230
227
|
));
|
|
231
|
-
|
|
232
|
-
const
|
|
233
|
-
|
|
228
|
+
Q.displayName = "SidebarInset";
|
|
229
|
+
const Z = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
230
|
+
I,
|
|
234
231
|
{
|
|
235
232
|
ref: t,
|
|
236
233
|
"data-sidebar": "input",
|
|
@@ -241,8 +238,8 @@ const ee = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
241
238
|
...e
|
|
242
239
|
}
|
|
243
240
|
));
|
|
244
|
-
|
|
245
|
-
const
|
|
241
|
+
Z.displayName = "SidebarInput";
|
|
242
|
+
const ee = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
246
243
|
"div",
|
|
247
244
|
{
|
|
248
245
|
ref: t,
|
|
@@ -251,8 +248,8 @@ const ae = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
251
248
|
...e
|
|
252
249
|
}
|
|
253
250
|
));
|
|
254
|
-
|
|
255
|
-
const
|
|
251
|
+
ee.displayName = "SidebarHeader";
|
|
252
|
+
const ae = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
256
253
|
"div",
|
|
257
254
|
{
|
|
258
255
|
ref: t,
|
|
@@ -261,9 +258,9 @@ const te = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
261
258
|
...e
|
|
262
259
|
}
|
|
263
260
|
));
|
|
264
|
-
|
|
265
|
-
const
|
|
266
|
-
|
|
261
|
+
ae.displayName = "SidebarFooter";
|
|
262
|
+
const te = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
263
|
+
T,
|
|
267
264
|
{
|
|
268
265
|
ref: t,
|
|
269
266
|
"data-sidebar": "separator",
|
|
@@ -271,21 +268,21 @@ const re = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
271
268
|
...e
|
|
272
269
|
}
|
|
273
270
|
));
|
|
274
|
-
|
|
275
|
-
const
|
|
271
|
+
te.displayName = "SidebarSeparator";
|
|
272
|
+
const re = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
276
273
|
"div",
|
|
277
274
|
{
|
|
278
275
|
ref: t,
|
|
279
276
|
"data-sidebar": "content",
|
|
280
277
|
className: i(
|
|
281
|
-
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
278
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-x-hidden group-data-[collapsible=icon]:overflow-y-auto",
|
|
282
279
|
a
|
|
283
280
|
),
|
|
284
281
|
...e
|
|
285
282
|
}
|
|
286
283
|
));
|
|
287
|
-
|
|
288
|
-
const
|
|
284
|
+
re.displayName = "SidebarContent";
|
|
285
|
+
const de = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
289
286
|
"div",
|
|
290
287
|
{
|
|
291
288
|
ref: t,
|
|
@@ -294,8 +291,8 @@ const ie = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
294
291
|
...e
|
|
295
292
|
}
|
|
296
293
|
));
|
|
297
|
-
|
|
298
|
-
const
|
|
294
|
+
de.displayName = "SidebarGroup";
|
|
295
|
+
const ie = d.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PURE__ */ r(
|
|
299
296
|
e ? v : "div",
|
|
300
297
|
{
|
|
301
298
|
ref: o,
|
|
@@ -308,8 +305,8 @@ const oe = d.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PU
|
|
|
308
305
|
...t
|
|
309
306
|
}
|
|
310
307
|
));
|
|
311
|
-
|
|
312
|
-
const
|
|
308
|
+
ie.displayName = "SidebarGroupLabel";
|
|
309
|
+
const oe = d.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PURE__ */ r(
|
|
313
310
|
e ? v : "button",
|
|
314
311
|
{
|
|
315
312
|
ref: o,
|
|
@@ -324,8 +321,8 @@ const ne = d.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PU
|
|
|
324
321
|
...t
|
|
325
322
|
}
|
|
326
323
|
));
|
|
327
|
-
|
|
328
|
-
const
|
|
324
|
+
oe.displayName = "SidebarGroupAction";
|
|
325
|
+
const ne = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
329
326
|
"div",
|
|
330
327
|
{
|
|
331
328
|
ref: t,
|
|
@@ -334,8 +331,8 @@ const se = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
334
331
|
...e
|
|
335
332
|
}
|
|
336
333
|
));
|
|
337
|
-
|
|
338
|
-
const
|
|
334
|
+
ne.displayName = "SidebarGroupContent";
|
|
335
|
+
const se = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
339
336
|
"ul",
|
|
340
337
|
{
|
|
341
338
|
ref: t,
|
|
@@ -344,8 +341,8 @@ const le = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
344
341
|
...e
|
|
345
342
|
}
|
|
346
343
|
));
|
|
347
|
-
|
|
348
|
-
const
|
|
344
|
+
se.displayName = "SidebarMenu";
|
|
345
|
+
const le = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
349
346
|
"li",
|
|
350
347
|
{
|
|
351
348
|
ref: t,
|
|
@@ -354,8 +351,8 @@ const ce = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
354
351
|
...e
|
|
355
352
|
}
|
|
356
353
|
));
|
|
357
|
-
|
|
358
|
-
const
|
|
354
|
+
le.displayName = "SidebarMenuItem";
|
|
355
|
+
const ce = k(
|
|
359
356
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-d-sidebar-ring transition-[width,height,padding] hover:bg-d-sidebar-accent hover:text-d-sidebar-accent-foreground focus-visible:ring-2 active:bg-d-sidebar-accent active:text-d-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-d-sidebar-accent data-[active=true]:font-bold data-[active=true]:text-d-sidebar-accent-foreground data-[state=open]:hover:bg-d-sidebar-accent data-[state=open]:hover:text-d-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",
|
|
360
357
|
{
|
|
361
358
|
variants: {
|
|
@@ -374,7 +371,7 @@ const ue = k(
|
|
|
374
371
|
size: "default"
|
|
375
372
|
}
|
|
376
373
|
}
|
|
377
|
-
),
|
|
374
|
+
), ue = d.forwardRef(
|
|
378
375
|
({
|
|
379
376
|
asChild: a = !1,
|
|
380
377
|
isActive: e = !1,
|
|
@@ -384,23 +381,23 @@ const ue = k(
|
|
|
384
381
|
className: s,
|
|
385
382
|
...f
|
|
386
383
|
}, g) => {
|
|
387
|
-
const c = a ? v : "button", { isMobile: p, state: u } =
|
|
384
|
+
const c = a ? v : "button", { isMobile: p, state: u } = y(), x = /* @__PURE__ */ r(
|
|
388
385
|
c,
|
|
389
386
|
{
|
|
390
387
|
ref: g,
|
|
391
388
|
"data-sidebar": "menu-button",
|
|
392
389
|
"data-size": o,
|
|
393
390
|
"data-active": e,
|
|
394
|
-
className: i(
|
|
391
|
+
className: i(ce({ variant: t, size: o }), s),
|
|
395
392
|
...f
|
|
396
393
|
}
|
|
397
394
|
);
|
|
398
395
|
return n ? (typeof n == "string" && (n = {
|
|
399
396
|
children: n
|
|
400
397
|
}), /* @__PURE__ */ m(G, { children: [
|
|
401
|
-
/* @__PURE__ */ r(
|
|
398
|
+
/* @__PURE__ */ r(j, { asChild: !0, children: x }),
|
|
402
399
|
/* @__PURE__ */ r(
|
|
403
|
-
|
|
400
|
+
H,
|
|
404
401
|
{
|
|
405
402
|
side: "right",
|
|
406
403
|
align: "center",
|
|
@@ -411,8 +408,8 @@ const ue = k(
|
|
|
411
408
|
] })) : x;
|
|
412
409
|
}
|
|
413
410
|
);
|
|
414
|
-
|
|
415
|
-
const
|
|
411
|
+
ue.displayName = "SidebarMenuButton";
|
|
412
|
+
const be = d.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, ...o }, n) => /* @__PURE__ */ r(
|
|
416
413
|
e ? v : "button",
|
|
417
414
|
{
|
|
418
415
|
ref: n,
|
|
@@ -431,8 +428,8 @@ const fe = d.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, .
|
|
|
431
428
|
...o
|
|
432
429
|
}
|
|
433
430
|
));
|
|
434
|
-
|
|
435
|
-
const
|
|
431
|
+
be.displayName = "SidebarMenuAction";
|
|
432
|
+
const fe = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
436
433
|
"div",
|
|
437
434
|
{
|
|
438
435
|
ref: t,
|
|
@@ -449,8 +446,8 @@ const pe = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
449
446
|
...e
|
|
450
447
|
}
|
|
451
448
|
));
|
|
452
|
-
|
|
453
|
-
const
|
|
449
|
+
fe.displayName = "SidebarMenuBadge";
|
|
450
|
+
const pe = d.forwardRef(({ className: a, showIcon: e = !1, ...t }, o) => {
|
|
454
451
|
const n = d.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
455
452
|
return /* @__PURE__ */ m(
|
|
456
453
|
"div",
|
|
@@ -481,8 +478,8 @@ const me = d.forwardRef(({ className: a, showIcon: e = !1, ...t }, o) => {
|
|
|
481
478
|
}
|
|
482
479
|
);
|
|
483
480
|
});
|
|
484
|
-
|
|
485
|
-
const
|
|
481
|
+
pe.displayName = "SidebarMenuSkeleton";
|
|
482
|
+
const me = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
486
483
|
"ul",
|
|
487
484
|
{
|
|
488
485
|
ref: t,
|
|
@@ -495,10 +492,10 @@ const ge = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
495
492
|
...e
|
|
496
493
|
}
|
|
497
494
|
));
|
|
498
|
-
|
|
499
|
-
const
|
|
500
|
-
|
|
501
|
-
const
|
|
495
|
+
me.displayName = "SidebarMenuSub";
|
|
496
|
+
const ge = d.forwardRef(({ ...a }, e) => /* @__PURE__ */ r("li", { ref: e, ...a }));
|
|
497
|
+
ge.displayName = "SidebarMenuSubItem";
|
|
498
|
+
const he = d.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, className: o, ...n }, s) => /* @__PURE__ */ r(
|
|
502
499
|
a ? v : "a",
|
|
503
500
|
{
|
|
504
501
|
ref: s,
|
|
@@ -516,30 +513,30 @@ const ve = d.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, classNa
|
|
|
516
513
|
...n
|
|
517
514
|
}
|
|
518
515
|
));
|
|
519
|
-
|
|
516
|
+
he.displayName = "SidebarMenuSubButton";
|
|
520
517
|
export {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
518
|
+
X as Sidebar,
|
|
519
|
+
re as SidebarContent,
|
|
520
|
+
ae as SidebarFooter,
|
|
521
|
+
de as SidebarGroup,
|
|
522
|
+
oe as SidebarGroupAction,
|
|
523
|
+
ne as SidebarGroupContent,
|
|
524
|
+
ie as SidebarGroupLabel,
|
|
525
|
+
ee as SidebarHeader,
|
|
526
|
+
Z as SidebarInput,
|
|
527
|
+
Q as SidebarInset,
|
|
528
|
+
se as SidebarMenu,
|
|
529
|
+
be as SidebarMenuAction,
|
|
530
|
+
fe as SidebarMenuBadge,
|
|
531
|
+
ue as SidebarMenuButton,
|
|
532
|
+
le as SidebarMenuItem,
|
|
533
|
+
pe as SidebarMenuSkeleton,
|
|
534
|
+
me as SidebarMenuSub,
|
|
535
|
+
he as SidebarMenuSubButton,
|
|
536
|
+
ge as SidebarMenuSubItem,
|
|
537
|
+
U as SidebarProvider,
|
|
538
|
+
J as SidebarRail,
|
|
539
|
+
te as SidebarSeparator,
|
|
540
|
+
Y as SidebarTrigger,
|
|
541
|
+
y as useSidebar
|
|
545
542
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -563,7 +563,7 @@ export declare interface AppSelectOption {
|
|
|
563
563
|
|
|
564
564
|
export declare type AppSelectProps = SingleSelectProps | MultiSelectProps;
|
|
565
565
|
|
|
566
|
-
export declare function AppSidebar({ navigation, navigationFooter, headerContent, footerContent, showRail, linkComponent: LinkComponent, linkProps, ...props }: AppSidebarProps): JSX.Element;
|
|
566
|
+
export declare function AppSidebar({ navigation, navigationFooter, headerContent, footerContent, showRail, collapsible, linkComponent: LinkComponent, linkProps, ...props }: AppSidebarProps): JSX.Element;
|
|
567
567
|
|
|
568
568
|
declare interface AppSidebarProps extends React_2.ComponentProps<typeof Sidebar> {
|
|
569
569
|
navigation: NavGroup[];
|
|
@@ -2662,6 +2662,7 @@ export declare function NavigationMenuViewport({ className, ...props }: React_2.
|
|
|
2662
2662
|
|
|
2663
2663
|
export declare interface NavItem {
|
|
2664
2664
|
title: string;
|
|
2665
|
+
/** Ignored when the item has `subItems`: the button toggles instead of navigating. */
|
|
2665
2666
|
url: string;
|
|
2666
2667
|
isActive?: boolean;
|
|
2667
2668
|
iconName?: IconName;
|
|
@@ -2937,7 +2938,7 @@ declare interface ServerState {
|
|
|
2937
2938
|
export declare function Sheet({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
|
|
2938
2939
|
|
|
2939
2940
|
export declare function SheetContent({ className, children, side, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
2940
|
-
side?: "top" | "right" | "bottom" | "left";
|
|
2941
|
+
side?: "top" | "right" | "bottom" | "left" | "full";
|
|
2941
2942
|
}): JSX.Element;
|
|
2942
2943
|
|
|
2943
2944
|
export declare function SheetDescription({ className, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Description>): JSX.Element;
|