@la-batcave/ui 3.5.1 → 4.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/Alert.d.ts +17 -7
- package/dist/Alert.js +31 -28
- package/dist/Button.js +29 -26
- package/dist/Card.d.ts +2 -6
- package/dist/Card.js +35 -58
- package/dist/CodeBlock.js +2 -2
- package/dist/Collapse.js +8 -8
- package/dist/Combobox.js +51 -51
- package/dist/DarkMode.js +11 -11
- package/dist/DatePicker.d.ts +5 -17
- package/dist/DatePicker.js +221 -205
- package/dist/Dialog.js +65 -65
- package/dist/Drawer.js +1 -1
- package/dist/Dropdown.js +10 -10
- package/dist/HoverCard.js +13 -13
- package/dist/Input.js +633 -626
- package/dist/LogViewer.js +1 -1
- package/dist/Menubar.js +25 -25
- package/dist/Pagination.js +17 -17
- package/dist/Popover.js +4 -4
- package/dist/Resizable.js +1 -1
- package/dist/Sheet.d.ts +1 -1
- package/dist/Sheet.js +21 -21
- package/dist/Sidebar.d.ts +39 -1
- package/dist/Sidebar.js +101 -63
- package/dist/Skeleton.js +9 -9
- package/dist/Table.js +31 -31
- package/dist/Tabs.d.ts +15 -11
- package/dist/Tabs.js +134 -125
- package/dist/Toast.js +35 -34
- package/dist/Tooltip.js +1 -1
- package/dist/Typography.js +9 -9
- package/dist/Widget.js +77 -81
- package/dist/index.css +1 -1
- package/package.json +3 -2
package/dist/LogViewer.js
CHANGED
package/dist/Menubar.js
CHANGED
|
@@ -5,7 +5,7 @@ import { u as W, R as X, I as Y, c as O, a as q } from "./_shared/index-C0gNQvxa
|
|
|
5
5
|
import { u as J, c as v, a as Q } from "./_shared/index-CXeb1OMI.js";
|
|
6
6
|
import { u as Z } from "./_shared/index-DLcqcWxM.js";
|
|
7
7
|
import { u as y } from "./_shared/index-BC7vfx-u.js";
|
|
8
|
-
import { A as ee, P as re, C as ae, I as ne, S as oe, L as te, c as se, G as ue, R as ie, a as ce, b as de, d as le, e as pe, f as be, g as
|
|
8
|
+
import { A as ee, P as re, C as ae, I as ne, S as oe, L as te, c as se, G as ue, R as ie, a as ce, b as de, d as le, e as pe, f as be, g as fe, h as me } from "./_shared/index-CukUn3R0.js";
|
|
9
9
|
import { P as G } from "./_shared/index-V-Ajw7Ac.js";
|
|
10
10
|
import { c as R } from "./_shared/utils-eGXXUFl7.js";
|
|
11
11
|
var _ = "Menubar", [I, ge, Me] = q(_), [D] = Q(_, [
|
|
@@ -21,7 +21,7 @@ var _ = "Menubar", [I, ge, Me] = q(_), [D] = Q(_, [
|
|
|
21
21
|
loop: p = !0,
|
|
22
22
|
dir: c,
|
|
23
23
|
...i
|
|
24
|
-
} = e, b = W(c), u = k(r), [
|
|
24
|
+
} = e, b = W(c), u = k(r), [m, f] = J({
|
|
25
25
|
prop: n,
|
|
26
26
|
onChange: o,
|
|
27
27
|
defaultProp: h ?? "",
|
|
@@ -31,19 +31,19 @@ var _ = "Menubar", [I, ge, Me] = q(_), [D] = Q(_, [
|
|
|
31
31
|
ve,
|
|
32
32
|
{
|
|
33
33
|
scope: r,
|
|
34
|
-
value:
|
|
34
|
+
value: m,
|
|
35
35
|
onMenuOpen: s.useCallback(
|
|
36
36
|
(M) => {
|
|
37
|
-
|
|
37
|
+
f(M), l(M);
|
|
38
38
|
},
|
|
39
|
-
[
|
|
39
|
+
[f]
|
|
40
40
|
),
|
|
41
|
-
onMenuClose: s.useCallback(() =>
|
|
41
|
+
onMenuClose: s.useCallback(() => f(""), [f]),
|
|
42
42
|
onMenuToggle: s.useCallback(
|
|
43
43
|
(M) => {
|
|
44
|
-
|
|
44
|
+
f((P) => P ? "" : M), l(M);
|
|
45
45
|
},
|
|
46
|
-
[
|
|
46
|
+
[f]
|
|
47
47
|
),
|
|
48
48
|
dir: b,
|
|
49
49
|
loop: p,
|
|
@@ -83,8 +83,8 @@ var A = "MenubarMenu", [he, F] = D(A), L = (e) => {
|
|
|
83
83
|
{
|
|
84
84
|
...c,
|
|
85
85
|
open: u,
|
|
86
|
-
onOpenChange: (
|
|
87
|
-
|
|
86
|
+
onOpenChange: (m) => {
|
|
87
|
+
m || p.onMenuClose();
|
|
88
88
|
},
|
|
89
89
|
modal: !1,
|
|
90
90
|
dir: p.dir,
|
|
@@ -97,7 +97,7 @@ var A = "MenubarMenu", [he, F] = D(A), L = (e) => {
|
|
|
97
97
|
L.displayName = A;
|
|
98
98
|
var N = "MenubarTrigger", $ = s.forwardRef(
|
|
99
99
|
(e, a) => {
|
|
100
|
-
const { __scopeMenubar: r, disabled: n = !1, ...o } = e, h = k(r), p = d(r), c = S(N, r), i = F(N, r), b = s.useRef(null), u = Z(a, b, i.triggerRef), [
|
|
100
|
+
const { __scopeMenubar: r, disabled: n = !1, ...o } = e, h = k(r), p = d(r), c = S(N, r), i = F(N, r), b = s.useRef(null), u = Z(a, b, i.triggerRef), [m, f] = s.useState(!1), g = c.value === i.value;
|
|
101
101
|
return /* @__PURE__ */ t(I.ItemSlot, { scope: r, value: i.value, disabled: n, children: /* @__PURE__ */ t(
|
|
102
102
|
Y,
|
|
103
103
|
{
|
|
@@ -114,7 +114,7 @@ var N = "MenubarTrigger", $ = s.forwardRef(
|
|
|
114
114
|
"aria-haspopup": "menu",
|
|
115
115
|
"aria-expanded": g,
|
|
116
116
|
"aria-controls": g ? i.contentId : void 0,
|
|
117
|
-
"data-highlighted":
|
|
117
|
+
"data-highlighted": m ? "" : void 0,
|
|
118
118
|
"data-state": g ? "open" : "closed",
|
|
119
119
|
"data-disabled": n ? "" : void 0,
|
|
120
120
|
disabled: n,
|
|
@@ -129,8 +129,8 @@ var N = "MenubarTrigger", $ = s.forwardRef(
|
|
|
129
129
|
onKeyDown: v(e.onKeyDown, (l) => {
|
|
130
130
|
n || (["Enter", " "].includes(l.key) && c.onMenuToggle(i.value), l.key === "ArrowDown" && c.onMenuOpen(i.value), ["Enter", " ", "ArrowDown"].includes(l.key) && (i.wasKeyboardTriggerOpenRef.current = !0, l.preventDefault()));
|
|
131
131
|
}),
|
|
132
|
-
onFocus: v(e.onFocus, () =>
|
|
133
|
-
onBlur: v(e.onBlur, () =>
|
|
132
|
+
onFocus: v(e.onFocus, () => f(!0)),
|
|
133
|
+
onBlur: v(e.onBlur, () => f(!1))
|
|
134
134
|
}
|
|
135
135
|
) })
|
|
136
136
|
}
|
|
@@ -160,8 +160,8 @@ var C = "MenubarContent", U = s.forwardRef(
|
|
|
160
160
|
!p.value && !b.current && c.triggerRef.current?.focus(), b.current = !1, u.preventDefault();
|
|
161
161
|
}),
|
|
162
162
|
onFocusOutside: v(e.onFocusOutside, (u) => {
|
|
163
|
-
const
|
|
164
|
-
i().some((g) => g.ref.current?.contains(
|
|
163
|
+
const m = u.target;
|
|
164
|
+
i().some((g) => g.ref.current?.contains(m)) && u.preventDefault();
|
|
165
165
|
}),
|
|
166
166
|
onInteractOutside: v(e.onInteractOutside, () => {
|
|
167
167
|
b.current = !0;
|
|
@@ -173,8 +173,8 @@ var C = "MenubarContent", U = s.forwardRef(
|
|
|
173
173
|
e.onKeyDown,
|
|
174
174
|
(u) => {
|
|
175
175
|
if (["ArrowRight", "ArrowLeft"].includes(u.key)) {
|
|
176
|
-
const
|
|
177
|
-
if (!M &&
|
|
176
|
+
const m = u.target, f = m.hasAttribute("data-radix-menubar-subtrigger"), g = m.closest("[data-radix-menubar-content]") !== u.currentTarget, M = (p.dir === "rtl" ? "ArrowRight" : "ArrowLeft") === u.key;
|
|
177
|
+
if (!M && f || g && M) return;
|
|
178
178
|
let x = i().filter((w) => !w.disabled).map((w) => w.value);
|
|
179
179
|
M && x.reverse();
|
|
180
180
|
const E = x.indexOf(c.value);
|
|
@@ -263,7 +263,7 @@ var De = "MenubarSubTrigger", ke = s.forwardRef(
|
|
|
263
263
|
(e, a) => {
|
|
264
264
|
const { __scopeMenubar: r, ...n } = e, o = d(r);
|
|
265
265
|
return /* @__PURE__ */ t(
|
|
266
|
-
|
|
266
|
+
fe,
|
|
267
267
|
{
|
|
268
268
|
"data-radix-menubar-subtrigger": "",
|
|
269
269
|
...o,
|
|
@@ -278,7 +278,7 @@ var Ke = "MenubarSubContent", Fe = s.forwardRef(
|
|
|
278
278
|
(e, a) => {
|
|
279
279
|
const { __scopeMenubar: r, ...n } = e, o = d(r);
|
|
280
280
|
return /* @__PURE__ */ t(
|
|
281
|
-
|
|
281
|
+
me,
|
|
282
282
|
{
|
|
283
283
|
...o,
|
|
284
284
|
"data-radix-menubar-content": "",
|
|
@@ -306,7 +306,7 @@ const Ye = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
|
306
306
|
{
|
|
307
307
|
ref: r,
|
|
308
308
|
className: R(
|
|
309
|
-
"flex items-center gap-1 border border-border rounded-
|
|
309
|
+
"flex items-center gap-1 border border-border rounded-3xl bg-card p-1",
|
|
310
310
|
e
|
|
311
311
|
),
|
|
312
312
|
...a
|
|
@@ -318,10 +318,10 @@ const dr = Be, qe = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */
|
|
|
318
318
|
{
|
|
319
319
|
ref: r,
|
|
320
320
|
className: R(
|
|
321
|
-
"flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-
|
|
321
|
+
"flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-2xl text-foreground cursor-pointer select-none outline-none transition-colors",
|
|
322
322
|
"hover:bg-muted hover:text-foreground",
|
|
323
323
|
"data-[state=open]:bg-muted data-[state=open]:text-foreground",
|
|
324
|
-
"focus-visible:ring-
|
|
324
|
+
"focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30",
|
|
325
325
|
e
|
|
326
326
|
),
|
|
327
327
|
...a
|
|
@@ -335,7 +335,7 @@ const Je = s.forwardRef(({ className: e, sideOffset: a = 8, alignOffset: r = -4,
|
|
|
335
335
|
sideOffset: a,
|
|
336
336
|
alignOffset: r,
|
|
337
337
|
className: R(
|
|
338
|
-
"z-50 min-w-[180px] overflow-hidden rounded-
|
|
338
|
+
"z-50 min-w-[180px] overflow-hidden rounded-3xl border border-border bg-card/95 backdrop-blur-md p-1 shadow-lg",
|
|
339
339
|
"animate-in fade-in-0 zoom-in-95",
|
|
340
340
|
"data-[side=bottom]:slide-in-from-top-2",
|
|
341
341
|
"data-[side=top]:slide-in-from-bottom-2",
|
|
@@ -352,7 +352,7 @@ const Qe = s.forwardRef(({ className: e, inset: a, ...r }, n) => /* @__PURE__ */
|
|
|
352
352
|
{
|
|
353
353
|
ref: n,
|
|
354
354
|
className: R(
|
|
355
|
-
"relative flex items-center gap-2 rounded-
|
|
355
|
+
"relative flex items-center gap-2 rounded-2xl px-2 py-1.5 text-sm text-foreground cursor-pointer select-none outline-none transition-colors",
|
|
356
356
|
"data-[highlighted]:bg-primary/10 data-[highlighted]:text-foreground",
|
|
357
357
|
"data-[disabled]:opacity-50 data-[disabled]:pointer-events-none",
|
|
358
358
|
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
package/dist/Pagination.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as n, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "react";
|
|
3
|
-
import { ChevronLeft as
|
|
3
|
+
import { ChevronLeft as c, ChevronRight as d, MoreHorizontal as p } from "lucide-react";
|
|
4
4
|
import { c as r } from "./_shared/utils-eGXXUFl7.js";
|
|
5
|
-
function
|
|
5
|
+
function P({ className: a, ...e }) {
|
|
6
6
|
return /* @__PURE__ */ n(
|
|
7
7
|
"nav",
|
|
8
8
|
{
|
|
@@ -13,7 +13,7 @@ function v({ className: a, ...e }) {
|
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const f = o.forwardRef(({ className: a, ...e }, i) => /* @__PURE__ */ n(
|
|
17
17
|
"ul",
|
|
18
18
|
{
|
|
19
19
|
ref: i,
|
|
@@ -21,25 +21,25 @@ const g = o.forwardRef(({ className: a, ...e }, i) => /* @__PURE__ */ n(
|
|
|
21
21
|
...e
|
|
22
22
|
}
|
|
23
23
|
));
|
|
24
|
-
|
|
25
|
-
const
|
|
24
|
+
f.displayName = "PaginationContent";
|
|
25
|
+
const g = o.forwardRef(
|
|
26
26
|
({ className: a, ...e }, i) => /* @__PURE__ */ n("li", { ref: i, className: r("", a), ...e })
|
|
27
27
|
);
|
|
28
|
-
|
|
28
|
+
g.displayName = "PaginationItem";
|
|
29
29
|
const u = {
|
|
30
30
|
sm: "h-7 min-w-7 text-xs",
|
|
31
31
|
md: "h-9 min-w-9 text-sm",
|
|
32
32
|
lg: "h-11 min-w-11 text-base"
|
|
33
33
|
}, l = o.forwardRef(
|
|
34
|
-
({ className: a, isActive: e = !1, size: i = "md", ...t },
|
|
34
|
+
({ className: a, isActive: e = !1, size: i = "md", ...t }, m) => /* @__PURE__ */ n(
|
|
35
35
|
"button",
|
|
36
36
|
{
|
|
37
|
-
ref:
|
|
37
|
+
ref: m,
|
|
38
38
|
type: "button",
|
|
39
39
|
"aria-current": e ? "page" : void 0,
|
|
40
40
|
className: r(
|
|
41
|
-
"inline-flex items-center justify-center rounded-
|
|
42
|
-
"outline-none focus-visible:ring
|
|
41
|
+
"inline-flex items-center justify-center rounded-xl font-medium transition-colors cursor-pointer select-none",
|
|
42
|
+
"outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30",
|
|
43
43
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:pointer-events-none",
|
|
44
44
|
u[i],
|
|
45
45
|
e ? "bg-primary/15 text-primary border border-primary/20" : "bg-transparent text-muted-foreground border border-transparent hover:bg-secondary/50 hover:text-foreground",
|
|
@@ -58,7 +58,7 @@ const x = o.forwardRef(({ className: a, label: e, ...i }, t) => /* @__PURE__ */
|
|
|
58
58
|
className: r("gap-1 px-2.5", a),
|
|
59
59
|
...i,
|
|
60
60
|
children: [
|
|
61
|
-
/* @__PURE__ */ n(
|
|
61
|
+
/* @__PURE__ */ n(c, { className: "size-4" }),
|
|
62
62
|
e && /* @__PURE__ */ n("span", { children: e })
|
|
63
63
|
]
|
|
64
64
|
}
|
|
@@ -78,7 +78,7 @@ const b = o.forwardRef(({ className: a, label: e, ...i }, t) => /* @__PURE__ */
|
|
|
78
78
|
}
|
|
79
79
|
));
|
|
80
80
|
b.displayName = "PaginationNext";
|
|
81
|
-
function
|
|
81
|
+
function v({ className: a, ...e }) {
|
|
82
82
|
return /* @__PURE__ */ s(
|
|
83
83
|
"span",
|
|
84
84
|
{
|
|
@@ -89,17 +89,17 @@ function P({ className: a, ...e }) {
|
|
|
89
89
|
),
|
|
90
90
|
...e,
|
|
91
91
|
children: [
|
|
92
|
-
/* @__PURE__ */ n(
|
|
92
|
+
/* @__PURE__ */ n(p, { className: "size-4" }),
|
|
93
93
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "More pages" })
|
|
94
94
|
]
|
|
95
95
|
}
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
98
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
P as Pagination,
|
|
100
|
+
f as PaginationContent,
|
|
101
|
+
v as PaginationEllipsis,
|
|
102
|
+
g as PaginationItem,
|
|
103
103
|
l as PaginationLink,
|
|
104
104
|
b as PaginationNext,
|
|
105
105
|
x as PaginationPrevious
|
package/dist/Popover.js
CHANGED
|
@@ -3,14 +3,14 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
3
3
|
import * as d from "react";
|
|
4
4
|
import { P as c, C as i, R as p, a as m, T as l } from "./_shared/index-C3aZemLI.js";
|
|
5
5
|
import { c as f } from "./_shared/utils-eGXXUFl7.js";
|
|
6
|
-
const v = p, b = l, R = m,
|
|
6
|
+
const v = p, b = l, R = m, P = d.forwardRef(({ className: e, align: t = "center", sideOffset: a = 4, container: r, ...s }, n) => /* @__PURE__ */ o(c, { container: r, children: /* @__PURE__ */ o(
|
|
7
7
|
i,
|
|
8
8
|
{
|
|
9
9
|
ref: n,
|
|
10
10
|
align: t,
|
|
11
11
|
sideOffset: a,
|
|
12
12
|
className: f(
|
|
13
|
-
"z-50 bg-card border border-border rounded-
|
|
13
|
+
"z-50 bg-card border border-border rounded-3xl shadow-lg p-4",
|
|
14
14
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
15
15
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
16
16
|
"outline-none",
|
|
@@ -19,10 +19,10 @@ const v = p, b = l, R = m, g = d.forwardRef(({ className: e, align: t = "center"
|
|
|
19
19
|
...s
|
|
20
20
|
}
|
|
21
21
|
) }));
|
|
22
|
-
|
|
22
|
+
P.displayName = "PopoverContent";
|
|
23
23
|
export {
|
|
24
24
|
v as Popover,
|
|
25
25
|
R as PopoverClose,
|
|
26
|
-
|
|
26
|
+
P as PopoverContent,
|
|
27
27
|
b as PopoverTrigger
|
|
28
28
|
};
|
package/dist/Resizable.js
CHANGED
|
@@ -1518,7 +1518,7 @@ const ct = ({
|
|
|
1518
1518
|
In,
|
|
1519
1519
|
{
|
|
1520
1520
|
className: rn(
|
|
1521
|
-
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring
|
|
1521
|
+
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
1522
1522
|
n
|
|
1523
1523
|
),
|
|
1524
1524
|
...t,
|
package/dist/Sheet.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface SheetOverlayProps extends React.ComponentPropsWithoutRef<typeof
|
|
|
9
9
|
}
|
|
10
10
|
declare const SheetOverlay: React.ForwardRefExoticComponent<SheetOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
declare const sheetVariants: (props?: ({
|
|
12
|
-
side?: "
|
|
12
|
+
side?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
export interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
15
15
|
}
|
package/dist/Sheet.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
3
3
|
import * as r from "react";
|
|
4
|
-
import { O as f, P as m, C as p, a as n, T as u, D as
|
|
4
|
+
import { O as f, P as m, C as p, a as n, T as u, D as b, R as h, b as g } from "./_shared/index-DlSuDb9N.js";
|
|
5
5
|
import { c as x } from "./_shared/index-uPOYJZpG.js";
|
|
6
6
|
import { X as S } from "lucide-react";
|
|
7
7
|
import { c as s } from "./_shared/utils-eGXXUFl7.js";
|
|
8
|
-
const k =
|
|
8
|
+
const k = h, z = g, P = n, y = m, d = r.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
9
9
|
f,
|
|
10
10
|
{
|
|
11
11
|
ref: a,
|
|
12
12
|
className: s(
|
|
13
|
-
"fixed inset-0 z-50 bg-black/
|
|
13
|
+
"fixed inset-0 z-50 bg-black/30 backdrop-blur-sm",
|
|
14
14
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
15
15
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
16
|
-
|
|
16
|
+
e
|
|
17
17
|
),
|
|
18
|
-
...
|
|
18
|
+
...t
|
|
19
19
|
}
|
|
20
20
|
));
|
|
21
21
|
d.displayName = "SheetOverlay";
|
|
@@ -34,58 +34,58 @@ const v = x(
|
|
|
34
34
|
side: "right"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
), N = r.forwardRef(({ side:
|
|
37
|
+
), N = r.forwardRef(({ side: e = "right", className: t, children: a, ...l }, c) => /* @__PURE__ */ i(y, { children: [
|
|
38
38
|
/* @__PURE__ */ o(d, {}),
|
|
39
39
|
/* @__PURE__ */ i(
|
|
40
40
|
p,
|
|
41
41
|
{
|
|
42
42
|
ref: c,
|
|
43
|
-
className: s(v({ side:
|
|
43
|
+
className: s(v({ side: e }), t),
|
|
44
44
|
...l,
|
|
45
45
|
children: [
|
|
46
46
|
a,
|
|
47
|
-
/* @__PURE__ */ o(n, { className: "absolute right-4 top-4 w-7 h-7 rounded-
|
|
47
|
+
/* @__PURE__ */ o(n, { className: "absolute right-4 top-4 w-7 h-7 rounded-xl flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors cursor-pointer outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30", children: /* @__PURE__ */ o(S, { size: 18 }) })
|
|
48
48
|
]
|
|
49
49
|
}
|
|
50
50
|
)
|
|
51
51
|
] }));
|
|
52
52
|
N.displayName = "SheetContent";
|
|
53
|
-
function V({ className:
|
|
53
|
+
function V({ className: e, ...t }) {
|
|
54
54
|
return /* @__PURE__ */ o(
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
57
|
-
className: s("flex flex-col gap-0.5 px-5 pt-5",
|
|
58
|
-
...
|
|
57
|
+
className: s("flex flex-col gap-0.5 px-5 pt-5", e),
|
|
58
|
+
...t
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
|
-
function F({ className:
|
|
62
|
+
function F({ className: e, ...t }) {
|
|
63
63
|
return /* @__PURE__ */ o(
|
|
64
64
|
"div",
|
|
65
65
|
{
|
|
66
66
|
className: s(
|
|
67
67
|
"flex items-center justify-end gap-2 py-4 px-5 mt-auto border-t border-border",
|
|
68
|
-
|
|
68
|
+
e
|
|
69
69
|
),
|
|
70
|
-
...
|
|
70
|
+
...t
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
|
-
const w = r.forwardRef(({ className:
|
|
74
|
+
const w = r.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
75
75
|
u,
|
|
76
76
|
{
|
|
77
77
|
ref: a,
|
|
78
|
-
className: s("text-base font-semibold text-foreground",
|
|
79
|
-
...
|
|
78
|
+
className: s("text-base font-semibold text-foreground", e),
|
|
79
|
+
...t
|
|
80
80
|
}
|
|
81
81
|
));
|
|
82
82
|
w.displayName = "SheetTitle";
|
|
83
|
-
const R = r.forwardRef(({ className:
|
|
84
|
-
|
|
83
|
+
const R = r.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
84
|
+
b,
|
|
85
85
|
{
|
|
86
86
|
ref: a,
|
|
87
|
-
className: s("text-sm text-muted-foreground",
|
|
88
|
-
...
|
|
87
|
+
className: s("text-sm text-muted-foreground", e),
|
|
88
|
+
...t
|
|
89
89
|
}
|
|
90
90
|
));
|
|
91
91
|
R.displayName = "SheetDescription";
|
package/dist/Sidebar.d.ts
CHANGED
|
@@ -114,4 +114,42 @@ export interface EasySidebarProps extends Omit<React.HTMLAttributes<HTMLElement>
|
|
|
114
114
|
navbarHeight?: number;
|
|
115
115
|
}
|
|
116
116
|
declare function EasySidebar({ items, header, footer, renderLink, onNavigate, navbarHeight, className, ...props }: EasySidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
117
|
-
export
|
|
117
|
+
export interface IconSidebarItemDef {
|
|
118
|
+
/** Unique key for this item. */
|
|
119
|
+
key: string;
|
|
120
|
+
/** Icon component (required). */
|
|
121
|
+
icon: React.ComponentType<{
|
|
122
|
+
size?: number;
|
|
123
|
+
className?: string;
|
|
124
|
+
}>;
|
|
125
|
+
/** Tooltip label shown on hover. */
|
|
126
|
+
label?: string;
|
|
127
|
+
/** Whether this item is currently active. */
|
|
128
|
+
active?: boolean;
|
|
129
|
+
}
|
|
130
|
+
export interface IconSidebarProps extends React.HTMLAttributes<HTMLElement> {
|
|
131
|
+
/** Array of icon items. */
|
|
132
|
+
items: IconSidebarItemDef[];
|
|
133
|
+
/** Callback when an item is clicked. Receives the item key. */
|
|
134
|
+
onNavigate?: (key: string) => void;
|
|
135
|
+
/** Header content rendered above the icons (e.g. app logo). */
|
|
136
|
+
header?: React.ReactNode;
|
|
137
|
+
/** Footer content rendered below the icons. */
|
|
138
|
+
footer?: React.ReactNode;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Narrow icon-only sidebar. Fixed width, no expand/collapse.
|
|
142
|
+
* Each item shows only an icon with an optional tooltip on hover.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* <IconSidebar
|
|
146
|
+
* items={[
|
|
147
|
+
* { key: "home", icon: Home, label: "Home", active: true },
|
|
148
|
+
* { key: "search", icon: Search, label: "Search" },
|
|
149
|
+
* { key: "settings", icon: Settings, label: "Settings" },
|
|
150
|
+
* ]}
|
|
151
|
+
* onNavigate={setPage}
|
|
152
|
+
* />
|
|
153
|
+
*/
|
|
154
|
+
declare function IconSidebar({ items, onNavigate, header, footer, className, ...props }: IconSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
155
|
+
export { SidebarLayout, SidebarTrigger, Sidebar, SidebarInset, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarSeparator, SidebarItem, EasySidebar, IconSidebar, useSidebar, };
|