@krosoft/react 0.0.138 → 0.0.140
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/Topbar-CesmKByg.js +215 -0
- package/dist/components/core/index.js +30 -29
- package/dist/components/core/navbar/Sidebar.d.ts +19 -15
- package/dist/components/core/navbar/Sidebar.d.ts.map +1 -1
- package/dist/components/core/navbar/SidebarHeader.d.ts +9 -0
- package/dist/components/core/navbar/SidebarHeader.d.ts.map +1 -0
- package/dist/components/core/navbar/index.d.ts +3 -0
- package/dist/components/core/navbar/index.d.ts.map +1 -1
- package/dist/components/core/navbar/index.js +5 -4
- package/dist/components/index.js +87 -86
- package/package.json +1 -1
- package/dist/Topbar-DZGhCt0o.js +0 -215
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import * as O from "react";
|
|
3
|
+
import { ChevronDownIcon as $, SearchIcon as L, MenuIcon as M } from "lucide-react";
|
|
4
|
+
import { T as B, c as Q, a as R, b as q, B as F } from "./tooltip-BWyFpIxo.js";
|
|
5
|
+
import { c as s } from "./tailwind.helper-B6yFEsav.js";
|
|
6
|
+
import "./sidebar.context-D5nywlmP.js";
|
|
7
|
+
import { u as W } from "./useSidebar-BJuALHqQ.js";
|
|
8
|
+
import "react-i18next";
|
|
9
|
+
import "next-themes";
|
|
10
|
+
import { I as G, S as H, b as _, h as E, c as J } from "./sheet-Gop1cIaU.js";
|
|
11
|
+
import { S as D } from "./skeleton-8o8eJd3P.js";
|
|
12
|
+
const K = ({
|
|
13
|
+
path: o,
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
15
|
+
icon: c,
|
|
16
|
+
label: m,
|
|
17
|
+
badge: n,
|
|
18
|
+
subItems: t,
|
|
19
|
+
currentPath: r,
|
|
20
|
+
collapsed: d,
|
|
21
|
+
dense: p = !1,
|
|
22
|
+
onItemClick: g
|
|
23
|
+
}) => {
|
|
24
|
+
const [x, v] = O.useState((t == null ? void 0 : t.some((a) => r === a.path || r.startsWith(`${a.path}/`))) ?? !1), u = o ? r === o || o !== "/" && r.startsWith(`${o}/`) : !1, b = t == null ? void 0 : t.some((a) => r === a.path || r.startsWith(`${a.path}/`)), N = /* @__PURE__ */ l(
|
|
25
|
+
"a",
|
|
26
|
+
{
|
|
27
|
+
href: o ?? "#",
|
|
28
|
+
onClick: (a) => {
|
|
29
|
+
a.preventDefault(), t && t.length > 0 ? d || v(!x) : o && g(o);
|
|
30
|
+
},
|
|
31
|
+
className: s(
|
|
32
|
+
"flex items-center cursor-pointer transition-all duration-200 group",
|
|
33
|
+
p ? "gap-2.5 rounded-lg mb-0.5" : "gap-3 rounded-2xl mb-2",
|
|
34
|
+
d ? p ? "justify-center p-2 h-9 w-9 mx-auto" : "justify-center p-3 h-12 w-12 mx-auto" : p ? "px-3 py-1.5 h-9" : "px-4 py-3 h-12",
|
|
35
|
+
u || !d && b ? p ? "bg-sidebar-primary text-sidebar-primary-foreground" : "bg-sidebar-primary text-sidebar-primary-foreground shadow-lg" : "hover:bg-sidebar-accent text-sidebar-foreground hover:text-sidebar-accent-foreground"
|
|
36
|
+
),
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ e("div", { className: s("flex-shrink-0 transition-transform group-hover:scale-110", d ? "flex items-center justify-center" : ""), children: /* @__PURE__ */ e(c, { className: "size-4" }) }),
|
|
39
|
+
!d && /* @__PURE__ */ l(A, { children: [
|
|
40
|
+
/* @__PURE__ */ e("span", { className: s("flex-grow transition-opacity duration-150 font-medium", p ? "text-sm" : ""), children: m }),
|
|
41
|
+
n !== void 0 && /* @__PURE__ */ e("span", { className: "bg-red-500 text-white text-xs rounded-full py-1 min-w-[20px] text-center px-2 font-semibold", children: n }),
|
|
42
|
+
t && t.length > 0 && /* @__PURE__ */ e($, { className: s("size-4 transition-transform duration-200", x ? "rotate-180" : "") })
|
|
43
|
+
] })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
return /* @__PURE__ */ l(A, { children: [
|
|
48
|
+
d ? /* @__PURE__ */ l(B, { children: [
|
|
49
|
+
/* @__PURE__ */ e(Q, { asChild: !0, children: N }),
|
|
50
|
+
/* @__PURE__ */ e(
|
|
51
|
+
R,
|
|
52
|
+
{
|
|
53
|
+
side: "right",
|
|
54
|
+
sideOffset: 6,
|
|
55
|
+
className: "rounded-xl z-[99999] flex gap-2 bg-sidebar text-sidebar-foreground border border-sidebar-border py-2 text-sm shadow-lg",
|
|
56
|
+
children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
57
|
+
/* @__PURE__ */ e("p", { className: "font-semibold", children: m }),
|
|
58
|
+
n !== void 0 && /* @__PURE__ */ l("span", { className: "ml-1 text-xs", children: [
|
|
59
|
+
"(",
|
|
60
|
+
n,
|
|
61
|
+
")"
|
|
62
|
+
] })
|
|
63
|
+
] }) })
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] }) : N,
|
|
67
|
+
!d && t && t.length > 0 && x && /* @__PURE__ */ e(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
className: s(
|
|
71
|
+
"flex flex-col ml-4 pl-4 border-l-2 border-sidebar-border/50 animate-in slide-in-from-top-2 fade-in duration-200",
|
|
72
|
+
p ? "gap-0.5 mb-0.5" : "gap-1 mb-2"
|
|
73
|
+
),
|
|
74
|
+
children: t.map((a, k) => {
|
|
75
|
+
const y = r === a.path || a.path !== "/" && r.startsWith(`${a.path}/`);
|
|
76
|
+
return /* @__PURE__ */ l(
|
|
77
|
+
"a",
|
|
78
|
+
{
|
|
79
|
+
href: a.path,
|
|
80
|
+
onClick: (i) => {
|
|
81
|
+
i.preventDefault(), g(a.path);
|
|
82
|
+
},
|
|
83
|
+
className: s(
|
|
84
|
+
"flex items-center justify-between rounded-xl text-sm transition-all duration-200",
|
|
85
|
+
p ? "px-3 py-1" : "px-4 py-2",
|
|
86
|
+
y ? "bg-sidebar-accent/50 text-sidebar-primary font-semibold" : "text-sidebar-muted hover:bg-sidebar-accent hover:text-sidebar-foreground"
|
|
87
|
+
),
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ e("span", { children: a.label }),
|
|
90
|
+
a.badge !== void 0 && /* @__PURE__ */ e("span", { className: "bg-sidebar-primary/20 text-sidebar-primary text-[10px] rounded-full py-0.5 px-2 font-semibold", children: a.badge })
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
k
|
|
94
|
+
);
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] });
|
|
99
|
+
}, te = ({ groups: o, currentPath: c, onItemClick: m, slots: n, search: t, dense: r = !1, loading: d = !1 }) => {
|
|
100
|
+
const { enabled: p = !1, placeholder: g = "Rechercher..." } = t ?? {}, { header: x, footer: v } = n ?? {}, { collapsed: u, isMobile: b, setCollapsed: w } = W(), [S, j] = O.useState(""), h = b ? !1 : u, T = !u, N = (i) => {
|
|
101
|
+
m(i), b && w(!0);
|
|
102
|
+
}, a = S.trim().toLowerCase(), k = a === "" ? o : o.map((i) => ({
|
|
103
|
+
...i,
|
|
104
|
+
items: i.items.filter(
|
|
105
|
+
(f) => {
|
|
106
|
+
var C;
|
|
107
|
+
return f.label.toLowerCase().includes(a) || (((C = f.subItems) == null ? void 0 : C.some((z) => z.label.toLowerCase().includes(a))) ?? !1);
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
})).filter((i) => i.items.length > 0), y = /* @__PURE__ */ l("div", { className: "flex flex-col h-full bg-sidebar text-sidebar-foreground", children: [
|
|
111
|
+
x,
|
|
112
|
+
p && !h && /* @__PURE__ */ e("div", { className: s("px-4", r ? "pt-2" : "pt-4"), children: /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
113
|
+
/* @__PURE__ */ e(L, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-sidebar-muted" }),
|
|
114
|
+
/* @__PURE__ */ e(
|
|
115
|
+
G,
|
|
116
|
+
{
|
|
117
|
+
type: "search",
|
|
118
|
+
value: S,
|
|
119
|
+
onChange: (i) => {
|
|
120
|
+
j(i.target.value);
|
|
121
|
+
},
|
|
122
|
+
placeholder: g,
|
|
123
|
+
className: s(
|
|
124
|
+
"bg-sidebar-accent/40 border-sidebar-border pl-9 text-sidebar-foreground placeholder:text-sidebar-muted",
|
|
125
|
+
r ? "h-8 text-sm" : "h-9"
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
] }) }),
|
|
130
|
+
/* @__PURE__ */ e("div", { className: s("flex-1 overflow-y-auto px-2 scrollbar-modern", r ? "py-2" : "py-4"), children: d ? Array.from({ length: 5 }).map((i, f) => /* @__PURE__ */ l("div", { className: s("flex items-center gap-3", r ? "mb-1 h-9" : "mb-2 h-12", h ? "justify-center px-3" : "px-4"), children: [
|
|
131
|
+
/* @__PURE__ */ e(D, { className: "size-5 flex-shrink-0 rounded-md" }),
|
|
132
|
+
!h && /* @__PURE__ */ e(D, { className: "h-4 flex-1" })
|
|
133
|
+
] }, f)) : k.map((i, f) => /* @__PURE__ */ l("div", { className: r ? "mb-3" : "mb-6", children: [
|
|
134
|
+
!h && i.title !== void 0 && i.title !== "" && /* @__PURE__ */ e("h3", { className: s("px-4 text-xs uppercase tracking-wider font-semibold text-sidebar-muted", r ? "mb-1" : "mb-2"), children: i.title }),
|
|
135
|
+
/* @__PURE__ */ e("nav", { className: s("flex flex-col", r ? "gap-0.5" : "gap-1"), children: i.items.map((C, z) => /* @__PURE__ */ e(K, { ...C, currentPath: c, collapsed: h, dense: r, onItemClick: N }, z)) })
|
|
136
|
+
] }, f)) }),
|
|
137
|
+
v && /* @__PURE__ */ e("div", { className: s("border-t border-sidebar-border", r ? "p-2" : "p-4", h ? "flex justify-center" : ""), children: v })
|
|
138
|
+
] });
|
|
139
|
+
return b ? /* @__PURE__ */ e(
|
|
140
|
+
H,
|
|
141
|
+
{
|
|
142
|
+
open: T,
|
|
143
|
+
onOpenChange: (i) => {
|
|
144
|
+
w(!i);
|
|
145
|
+
},
|
|
146
|
+
children: /* @__PURE__ */ l(_, { side: "left", className: "w-[16rem] p-0 bg-sidebar border-r border-sidebar-border overflow-hidden [&>button]:text-sidebar-foreground", children: [
|
|
147
|
+
/* @__PURE__ */ e(E, { className: "sr-only", children: "Menu de navigation" }),
|
|
148
|
+
/* @__PURE__ */ e(J, { className: "sr-only", children: "Navigation principale de l'application" }),
|
|
149
|
+
y
|
|
150
|
+
] })
|
|
151
|
+
}
|
|
152
|
+
) : /* @__PURE__ */ e(q, { delayDuration: 0, children: /* @__PURE__ */ e(
|
|
153
|
+
"aside",
|
|
154
|
+
{
|
|
155
|
+
className: s(
|
|
156
|
+
"flex flex-col bg-sidebar h-screen border-r border-sidebar-border transition-all duration-300",
|
|
157
|
+
h ? "w-[--navbar-width-icon]" : "w-[--navbar-width]",
|
|
158
|
+
"flex"
|
|
159
|
+
),
|
|
160
|
+
style: {
|
|
161
|
+
"--navbar-width": "16rem",
|
|
162
|
+
"--navbar-width-icon": "5rem"
|
|
163
|
+
},
|
|
164
|
+
children: y
|
|
165
|
+
}
|
|
166
|
+
) });
|
|
167
|
+
}, ie = ({
|
|
168
|
+
name: o = "appname",
|
|
169
|
+
subName: c = "appsubname",
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
171
|
+
icon: m,
|
|
172
|
+
dense: n = !1
|
|
173
|
+
}) => {
|
|
174
|
+
const { collapsed: t, isMobile: r } = W(), d = r ? !1 : t;
|
|
175
|
+
return /* @__PURE__ */ l("div", { className: s("flex items-center flex-shrink-0 gap-3 px-4", n ? "h-14" : "h-16 md:h-20", d ? "justify-center" : ""), children: [
|
|
176
|
+
m !== void 0 && /* @__PURE__ */ e("div", { className: "flex-shrink-0 text-sidebar-foreground", children: /* @__PURE__ */ e(m, { className: n ? "size-5" : "size-6" }) }),
|
|
177
|
+
!d && /* @__PURE__ */ l("div", { className: "flex flex-col", children: [
|
|
178
|
+
/* @__PURE__ */ e("h1", { className: s("font-bold text-sidebar-foreground leading-tight", n ? "text-base" : "text-lg"), children: o }),
|
|
179
|
+
/* @__PURE__ */ e("span", { className: s("text-sidebar-muted font-medium", n ? "text-[11px]" : "text-xs"), children: c })
|
|
180
|
+
] })
|
|
181
|
+
] });
|
|
182
|
+
}, se = ({ collapsed: o, isMobile: c, onToggleSidebar: m, actionsNode: n, userMenuNode: t }) => /* @__PURE__ */ l(
|
|
183
|
+
"header",
|
|
184
|
+
{
|
|
185
|
+
className: s(
|
|
186
|
+
"fixed top-0 right-0 z-[60] h-16 md:h-20 bg-topbar text-topbar-foreground flex items-center justify-between px-4 transition-all duration-300",
|
|
187
|
+
c && "left-0",
|
|
188
|
+
!c && o && "left-[5rem]",
|
|
189
|
+
!c && !o && "left-[16rem]"
|
|
190
|
+
),
|
|
191
|
+
tabIndex: -1,
|
|
192
|
+
children: [
|
|
193
|
+
/* @__PURE__ */ e("div", { className: "flex items-center min-w-0 flex-1", children: /* @__PURE__ */ e(
|
|
194
|
+
F,
|
|
195
|
+
{
|
|
196
|
+
variant: "ghost",
|
|
197
|
+
size: "icon",
|
|
198
|
+
onClick: m,
|
|
199
|
+
className: "text-topbar-foreground hover:bg-topbar-accent hover:text-topbar-accent-foreground",
|
|
200
|
+
children: /* @__PURE__ */ e(M, { className: "size-4" })
|
|
201
|
+
}
|
|
202
|
+
) }),
|
|
203
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-2 md:gap-4 flex-shrink-0", children: [
|
|
204
|
+
n,
|
|
205
|
+
t
|
|
206
|
+
] })
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
export {
|
|
211
|
+
te as S,
|
|
212
|
+
se as T,
|
|
213
|
+
ie as a,
|
|
214
|
+
K as b
|
|
215
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { D as r, M as o } from "../../MetricCard-D-qPl6zh.js";
|
|
2
2
|
import { K as t, a as i, S as l, b as p } from "../../SkeletonCards-BPIVRCOE.js";
|
|
3
|
-
import { A as
|
|
4
|
-
import { D
|
|
3
|
+
import { A as m, C as d, F as f } from "../../ConfirmationDialog-DJcxTNTk.js";
|
|
4
|
+
import { D, a as T, b as n, c, d as x, e as A, f as S, g as C, h as F, i as P, P as h } from "../../toggle-group-BASGy2mQ.js";
|
|
5
5
|
import { A as k, a as I, F as K, S as v, T as E } from "../../TableFilter-rjiss-d9.js";
|
|
6
|
-
import { G as
|
|
6
|
+
import { G as M } from "../../GenericForm-Cy5ntJxi.js";
|
|
7
7
|
import { I as L } from "../../ImageInput-CJ419eqw.js";
|
|
8
8
|
import { D as G, a as N, S as O, b as R } from "../../SearchInput-T9TeORNA.js";
|
|
9
9
|
import { M as j } from "../../MultiSelect-DblSHEsg.js";
|
|
@@ -11,49 +11,49 @@ import { A as w } from "../../AppActions-DCaejx-3.js";
|
|
|
11
11
|
import { A as J } from "../../AppSubTitle-BNd5_q0i.js";
|
|
12
12
|
import { A as U } from "../../AppTitle-uboDuil4.js";
|
|
13
13
|
import { K as X } from "../../KpiCardsLayout-DDR49Qqh.js";
|
|
14
|
-
import { S as Z, a as _, T as
|
|
15
|
-
import { E as
|
|
16
|
-
import { E as
|
|
17
|
-
import { L as
|
|
18
|
-
import { D as
|
|
19
|
-
import { A as na, a as ca, b as
|
|
20
|
-
import { T as
|
|
14
|
+
import { S as Z, a as _, b as $, T as aa } from "../../Topbar-CesmKByg.js";
|
|
15
|
+
import { E as ra } from "../../ErrorAlert-DH1onuyt.js";
|
|
16
|
+
import { E as sa } from "../../ErrorState-vU8d4CwD.js";
|
|
17
|
+
import { L as ia } from "../../LoadingState-BN0YaPSs.js";
|
|
18
|
+
import { D as pa, T as ba, a as ma, b as da, c as fa, d as ga, e as Da } from "../../DataTable-BVgo8YWR.js";
|
|
19
|
+
import { A as na, a as ca, b as xa, c as Aa } from "../../AppVerticalTabs-NZ02HPGP.js";
|
|
20
|
+
import { T as Ca } from "../../ThemeSelector-Qv8QBlYq.js";
|
|
21
21
|
export {
|
|
22
22
|
k as ActiveFilters,
|
|
23
23
|
I as AdvancedFilters,
|
|
24
24
|
w as AppActions,
|
|
25
|
-
|
|
25
|
+
m as AppDialog,
|
|
26
26
|
J as AppSubTitle,
|
|
27
27
|
na as AppTabContainer,
|
|
28
28
|
ca as AppTabHeader,
|
|
29
|
-
|
|
29
|
+
xa as AppTabs,
|
|
30
30
|
U as AppTitle,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
Aa as AppVerticalTabs,
|
|
32
|
+
d as ConfirmationDialog,
|
|
33
33
|
r as DashboardCard,
|
|
34
|
-
|
|
34
|
+
pa as DataTable,
|
|
35
35
|
G as DatePicker,
|
|
36
36
|
N as DateRangePicker,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
D as Dialog,
|
|
38
|
+
T as DialogClose,
|
|
39
|
+
n as DialogContent,
|
|
40
|
+
c as DialogDescription,
|
|
41
41
|
x as DialogFooter,
|
|
42
42
|
A as DialogHeader,
|
|
43
43
|
S as DialogOverlay,
|
|
44
44
|
C as DialogPortal,
|
|
45
45
|
F as DialogTitle,
|
|
46
46
|
P as DialogTrigger,
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
ra as ErrorAlert,
|
|
48
|
+
sa as ErrorState,
|
|
49
49
|
K as FilterField,
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
f as FormDialog,
|
|
51
|
+
M as GenericForm,
|
|
52
52
|
L as ImageInput,
|
|
53
53
|
t as KpiCard,
|
|
54
54
|
i as KpiCards,
|
|
55
55
|
X as KpiCardsLayout,
|
|
56
|
-
|
|
56
|
+
ia as LoadingState,
|
|
57
57
|
o as MetricCard,
|
|
58
58
|
j as MultiSelect,
|
|
59
59
|
h as Progress,
|
|
@@ -61,16 +61,17 @@ export {
|
|
|
61
61
|
v as SearchableFilterPill,
|
|
62
62
|
R as SearchableSelect,
|
|
63
63
|
Z as Sidebar,
|
|
64
|
-
_ as
|
|
64
|
+
_ as SidebarHeader,
|
|
65
|
+
$ as SidebarNavItem,
|
|
65
66
|
l as SkeletonCard,
|
|
66
67
|
p as SkeletonCards,
|
|
67
|
-
|
|
68
|
+
ba as TableActions,
|
|
68
69
|
ma as TableBody,
|
|
69
|
-
|
|
70
|
+
da as TableBulkActions,
|
|
70
71
|
E as TableFilter,
|
|
71
72
|
fa as TableHeader,
|
|
72
73
|
ga as TablePagination,
|
|
73
74
|
Da as TableSettings,
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
Ca as ThemeSelector,
|
|
76
|
+
aa as Topbar
|
|
76
77
|
};
|
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
export interface SidebarSubItem {
|
|
3
|
+
label: string;
|
|
4
|
+
path: string;
|
|
5
|
+
badge?: number;
|
|
6
|
+
}
|
|
2
7
|
export interface SidebarItem {
|
|
3
8
|
icon: React.ElementType;
|
|
4
9
|
label: string;
|
|
5
10
|
path?: string;
|
|
6
11
|
badge?: number;
|
|
7
|
-
subItems?:
|
|
8
|
-
label: string;
|
|
9
|
-
path: string;
|
|
10
|
-
badge?: number;
|
|
11
|
-
}[];
|
|
12
|
+
subItems?: SidebarSubItem[];
|
|
12
13
|
}
|
|
13
14
|
export interface SidebarGroup {
|
|
14
15
|
title?: string;
|
|
15
16
|
items: SidebarItem[];
|
|
16
17
|
}
|
|
18
|
+
export interface SidebarSlots {
|
|
19
|
+
header?: React.ReactNode;
|
|
20
|
+
footer?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export interface SidebarSearch {
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
}
|
|
17
26
|
export interface SidebarProps {
|
|
18
27
|
groups: SidebarGroup[];
|
|
19
|
-
onItemClick: (path: string) => void;
|
|
20
28
|
currentPath: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
headerNode?: React.ReactNode;
|
|
25
|
-
footerNode?: React.ReactNode;
|
|
26
|
-
loading?: boolean;
|
|
27
|
-
searchable?: boolean;
|
|
28
|
-
searchPlaceholder?: string;
|
|
29
|
+
onItemClick: (path: string) => void;
|
|
30
|
+
slots?: SidebarSlots;
|
|
31
|
+
search?: SidebarSearch;
|
|
29
32
|
dense?: boolean;
|
|
33
|
+
loading?: boolean;
|
|
30
34
|
}
|
|
31
|
-
export declare const Sidebar: ({ groups,
|
|
35
|
+
export declare const Sidebar: ({ groups, currentPath, onItemClick, slots, search, dense, loading }: SidebarProps) => React.ReactElement;
|
|
32
36
|
//# sourceMappingURL=Sidebar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/core/navbar/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/core/navbar/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAE3B,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAGpC,KAAK,CAAC,EAAE,YAAY,CAAC;IAGrB,MAAM,CAAC,EAAE,aAAa,CAAC;IAGvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,OAAO,GAAI,qEAAqF,YAAY,KAAG,KAAK,CAAC,YAuHjI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SidebarHeaderProps {
|
|
3
|
+
name?: string;
|
|
4
|
+
subName?: string;
|
|
5
|
+
icon?: React.ElementType;
|
|
6
|
+
dense?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const SidebarHeader: ({ name, subName, icon: Icon, dense, }: SidebarHeaderProps) => React.ReactElement;
|
|
9
|
+
//# sourceMappingURL=SidebarHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/core/navbar/SidebarHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,GAAI,uCAM3B,kBAAkB,KAAG,KAAK,CAAC,YAmB7B,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { Sidebar } from "./Sidebar";
|
|
2
|
+
export type { SidebarProps, SidebarItem, SidebarGroup, SidebarSubItem, SidebarSlots, SidebarSearch } from "./Sidebar";
|
|
3
|
+
export { SidebarHeader } from "./SidebarHeader";
|
|
4
|
+
export type { SidebarHeaderProps } from "./SidebarHeader";
|
|
2
5
|
export { SidebarNavItem } from "./SidebarNavItem";
|
|
3
6
|
export type { SidebarNavItemProps } from "./SidebarNavItem";
|
|
4
7
|
export { Topbar } from "./Topbar";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/navbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/navbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACtH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { S as r, a as b, b as d, T as s } from "../../../Topbar-CesmKByg.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
b as
|
|
5
|
-
|
|
3
|
+
r as Sidebar,
|
|
4
|
+
b as SidebarHeader,
|
|
5
|
+
d as SidebarNavItem,
|
|
6
|
+
s as Topbar
|
|
6
7
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { D as o, M as r } from "../MetricCard-D-qPl6zh.js";
|
|
2
2
|
import { K as t, a as n, S as i, b as l } from "../SkeletonCards-BPIVRCOE.js";
|
|
3
3
|
import { A as p, C as u, F as g } from "../ConfirmationDialog-DJcxTNTk.js";
|
|
4
|
-
import { A as
|
|
4
|
+
import { A as m, j as C, k as S, l as T, m as c, n as D, o as M, p as x, q as A, r as I, s as h, t as P, u as f, v as w, w as v, x as F, B as L, y as B, z as G, C as R, E as k, F as H, G as N, H as y, I as E, J as O, K as V, L as K, M as z, N as U, O as j, Q as q, R as J, S as Q, T as W, U as X, V as Y, W as Z, X as _, Y as $, Z as aa, _ as ea, $ as oa, a0 as ra, a1 as sa, a2 as ta, a3 as na, a4 as ia, a5 as la, a6 as ba, a7 as pa, a8 as ua, a9 as ga, aa as da, ab as ma, ac as Ca, ad as Sa, ae as Ta, af as ca, ag as Da, ah as Ma, ai as xa, aj as Aa, ak as Ia, al as ha, am as Pa, an as fa, D as wa, a as va, b as Fa, c as La, d as Ba, e as Ga, f as Ra, g as ka, h as Ha, i as Na, ao as ya, ap as Ea, aq as Oa, ar as Va, as as Ka, at as za, au as Ua, av as ja, aw as qa, ax as Ja, ay as Qa, az as Wa, aA as Xa, aB as Ya, aC as Za, aD as _a, aE as $a, aF as ae, aG as ee, aH as oe, aI as re, aJ as se, aK as te, aL as ne, aM as ie, aN as le, aO as be, aP as pe, aQ as ue, aR as ge, aS as de, aT as me, aU as Ce, aV as Se, aW as Te, aX as ce, aY as De, aZ as Me, a_ as xe, a$ as Ae, b0 as Ie, b1 as he, b2 as Pe, b3 as fe, b4 as we, b5 as ve, b6 as Fe, b7 as Le, b8 as Be, b9 as Ge, ba as Re, bb as ke, bc as He, bd as Ne, be as ye, bf as Ee, bg as Oe, bh as Ve, bi as Ke, bj as ze, bk as Ue, bl as je, bm as qe, bn as Je, bo as Qe, bp as We, bq as Xe, br as Ye, bs as Ze, bt as _e, bu as $e, bv as ao, bw as eo, bx as oo, P as ro, by as so, bz as to, bA as no, bB as io, bC as lo, bD as bo, bE as po, bF as uo, bG as go, bH as mo, bI as Co, bJ as So, bK as To, bL as co, bM as Do, bN as Mo, bO as xo, bP as Ao, bQ as Io, bR as ho, bS as Po, bT as fo, bU as wo, bV as vo, bW as Fo, bX as Lo, bY as Bo, bZ as Go, b_ as Ro, b$ as ko, c0 as Ho, c1 as No, c2 as yo, c3 as Eo } from "../toggle-group-BASGy2mQ.js";
|
|
5
5
|
import { A as Vo, a as Ko, F as zo, S as Uo, T as jo } from "../TableFilter-rjiss-d9.js";
|
|
6
6
|
import { G as Jo } from "../GenericForm-Cy5ntJxi.js";
|
|
7
7
|
import { I as Wo } from "../ImageInput-CJ419eqw.js";
|
|
@@ -11,29 +11,29 @@ import { A as rr } from "../AppActions-DCaejx-3.js";
|
|
|
11
11
|
import { A as tr } from "../AppSubTitle-BNd5_q0i.js";
|
|
12
12
|
import { A as ir } from "../AppTitle-uboDuil4.js";
|
|
13
13
|
import { K as br } from "../KpiCardsLayout-DDR49Qqh.js";
|
|
14
|
-
import { S as ur, a as gr, T as mr } from "../Topbar-
|
|
15
|
-
import { E as
|
|
16
|
-
import { E as
|
|
17
|
-
import { L as
|
|
18
|
-
import { D as
|
|
19
|
-
import { A as
|
|
20
|
-
import { T as
|
|
21
|
-
import { A as
|
|
22
|
-
import { A as
|
|
23
|
-
import { B as
|
|
24
|
-
import { I as
|
|
25
|
-
import { S as
|
|
26
|
-
import { S as
|
|
27
|
-
import { toast as
|
|
14
|
+
import { S as ur, a as gr, b as dr, T as mr } from "../Topbar-CesmKByg.js";
|
|
15
|
+
import { E as Sr } from "../ErrorAlert-DH1onuyt.js";
|
|
16
|
+
import { E as cr } from "../ErrorState-vU8d4CwD.js";
|
|
17
|
+
import { L as Mr } from "../LoadingState-BN0YaPSs.js";
|
|
18
|
+
import { D as Ar, T as Ir, a as hr, b as Pr, c as fr, d as wr, e as vr } from "../DataTable-BVgo8YWR.js";
|
|
19
|
+
import { A as Lr, a as Br, b as Gr, c as Rr } from "../AppVerticalTabs-NZ02HPGP.js";
|
|
20
|
+
import { T as Hr } from "../ThemeSelector-Qv8QBlYq.js";
|
|
21
|
+
import { A as yr, a as Er, b as Or } from "../alert-B78CiTYe.js";
|
|
22
|
+
import { A as Kr, C as zr, a as Ur, b as jr, R as qr, c as Jr, d as Qr, T as Wr, e as Xr } from "../toaster-Du2OlHAd.js";
|
|
23
|
+
import { B as Zr, T as _r, a as $r, b as as, c as es, d as os } from "../tooltip-BWyFpIxo.js";
|
|
24
|
+
import { I as ss, S as ts, a as ns, b as is, c as ls, d as bs, e as ps, f as us, g as gs, h as ds, i as ms } from "../sheet-Gop1cIaU.js";
|
|
25
|
+
import { S as Ss, a as Ts, b as cs, c as Ds, d as Ms, e as xs, f as As, g as Is, h as hs, i as Ps } from "../select-MWzbMBAS.js";
|
|
26
|
+
import { S as ws } from "../skeleton-8o8eJd3P.js";
|
|
27
|
+
import { toast as Fs } from "sonner";
|
|
28
28
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
m as Accordion,
|
|
30
|
+
C as AccordionContent,
|
|
31
|
+
S as AccordionItem,
|
|
32
|
+
T as AccordionTrigger,
|
|
33
33
|
Vo as ActiveFilters,
|
|
34
34
|
Ko as AdvancedFilters,
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
yr as Alert,
|
|
36
|
+
Er as AlertDescription,
|
|
37
37
|
c as AlertDialog,
|
|
38
38
|
D as AlertDialogAction,
|
|
39
39
|
M as AlertDialogCancel,
|
|
@@ -43,16 +43,16 @@ export {
|
|
|
43
43
|
h as AlertDialogHeader,
|
|
44
44
|
P as AlertDialogTitle,
|
|
45
45
|
f as AlertDialogTrigger,
|
|
46
|
-
|
|
46
|
+
Or as AlertTitle,
|
|
47
47
|
rr as AppActions,
|
|
48
48
|
p as AppDialog,
|
|
49
49
|
tr as AppSubTitle,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
Lr as AppTabContainer,
|
|
51
|
+
Br as AppTabHeader,
|
|
52
|
+
Gr as AppTabs,
|
|
53
53
|
ir as AppTitle,
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
Rr as AppVerticalTabs,
|
|
55
|
+
Kr as AspectRatio,
|
|
56
56
|
w as Avatar,
|
|
57
57
|
v as AvatarFallback,
|
|
58
58
|
F as AvatarImage,
|
|
@@ -64,7 +64,7 @@ export {
|
|
|
64
64
|
H as BreadcrumbList,
|
|
65
65
|
N as BreadcrumbPage,
|
|
66
66
|
y as BreadcrumbSeparator,
|
|
67
|
-
|
|
67
|
+
Zr as Button,
|
|
68
68
|
E as Calendar,
|
|
69
69
|
O as Card,
|
|
70
70
|
V as CardContent,
|
|
@@ -84,9 +84,9 @@ export {
|
|
|
84
84
|
aa as ChartTooltip,
|
|
85
85
|
ea as ChartTooltipContent,
|
|
86
86
|
oa as Checkbox,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
zr as Collapsible,
|
|
88
|
+
Ur as CollapsibleContent,
|
|
89
|
+
jr as CollapsibleTrigger,
|
|
90
90
|
ra as Command,
|
|
91
91
|
sa as CommandDialog,
|
|
92
92
|
ta as CommandEmpty,
|
|
@@ -98,11 +98,11 @@ export {
|
|
|
98
98
|
ua as CommandShortcut,
|
|
99
99
|
u as ConfirmationDialog,
|
|
100
100
|
ga as ContextMenu,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
da as ContextMenuCheckboxItem,
|
|
102
|
+
ma as ContextMenuContent,
|
|
103
|
+
Ca as ContextMenuGroup,
|
|
104
|
+
Sa as ContextMenuItem,
|
|
105
|
+
Ta as ContextMenuLabel,
|
|
106
106
|
ca as ContextMenuPortal,
|
|
107
107
|
Da as ContextMenuRadioGroup,
|
|
108
108
|
Ma as ContextMenuRadioItem,
|
|
@@ -113,7 +113,7 @@ export {
|
|
|
113
113
|
Pa as ContextMenuSubTrigger,
|
|
114
114
|
fa as ContextMenuTrigger,
|
|
115
115
|
o as DashboardCard,
|
|
116
|
-
|
|
116
|
+
Ar as DataTable,
|
|
117
117
|
Yo as DatePicker,
|
|
118
118
|
Zo as DateRangePicker,
|
|
119
119
|
wa as Dialog,
|
|
@@ -151,8 +151,8 @@ export {
|
|
|
151
151
|
te as DropdownMenuSubContent,
|
|
152
152
|
ne as DropdownMenuSubTrigger,
|
|
153
153
|
ie as DropdownMenuTrigger,
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
Sr as ErrorAlert,
|
|
155
|
+
cr as ErrorState,
|
|
156
156
|
zo as FilterField,
|
|
157
157
|
le as Form,
|
|
158
158
|
be as FormControl,
|
|
@@ -160,14 +160,14 @@ export {
|
|
|
160
160
|
g as FormDialog,
|
|
161
161
|
ue as FormField,
|
|
162
162
|
ge as FormItem,
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
de as FormLabel,
|
|
164
|
+
me as FormMessage,
|
|
165
165
|
Jo as GenericForm,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
Ce as HoverCard,
|
|
167
|
+
Se as HoverCardContent,
|
|
168
|
+
Te as HoverCardTrigger,
|
|
169
169
|
Wo as ImageInput,
|
|
170
|
-
|
|
170
|
+
ss as Input,
|
|
171
171
|
ce as InputOTP,
|
|
172
172
|
De as InputOTPGroup,
|
|
173
173
|
Me as InputOTPSeparator,
|
|
@@ -176,7 +176,7 @@ export {
|
|
|
176
176
|
n as KpiCards,
|
|
177
177
|
br as KpiCardsLayout,
|
|
178
178
|
Ae as Label,
|
|
179
|
-
|
|
179
|
+
Mr as LoadingState,
|
|
180
180
|
Ie as Menubar,
|
|
181
181
|
he as MenubarCheckboxItem,
|
|
182
182
|
Pe as MenubarContent,
|
|
@@ -216,64 +216,65 @@ export {
|
|
|
216
216
|
ro as Progress,
|
|
217
217
|
so as RadioGroup,
|
|
218
218
|
to as RadioGroupItem,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
219
|
+
qr as ResizableHandle,
|
|
220
|
+
Jr as ResizablePanel,
|
|
221
|
+
Qr as ResizablePanelGroup,
|
|
222
222
|
no as ScrollArea,
|
|
223
223
|
io as ScrollBar,
|
|
224
224
|
_o as SearchInput,
|
|
225
225
|
Uo as SearchableFilterPill,
|
|
226
226
|
$o as SearchableSelect,
|
|
227
|
-
|
|
227
|
+
Ss as Select,
|
|
228
228
|
Ts as SelectContent,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
229
|
+
cs as SelectGroup,
|
|
230
|
+
Ds as SelectItem,
|
|
231
|
+
Ms as SelectLabel,
|
|
232
|
+
xs as SelectScrollDownButton,
|
|
233
|
+
As as SelectScrollUpButton,
|
|
234
|
+
Is as SelectSeparator,
|
|
235
|
+
hs as SelectTrigger,
|
|
236
|
+
Ps as SelectValue,
|
|
237
237
|
lo as Separator,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
238
|
+
ts as Sheet,
|
|
239
|
+
ns as SheetClose,
|
|
240
|
+
is as SheetContent,
|
|
241
|
+
ls as SheetDescription,
|
|
242
|
+
bs as SheetFooter,
|
|
243
|
+
ps as SheetHeader,
|
|
244
|
+
us as SheetOverlay,
|
|
245
|
+
gs as SheetPortal,
|
|
246
|
+
ds as SheetTitle,
|
|
247
247
|
ms as SheetTrigger,
|
|
248
248
|
ur as Sidebar,
|
|
249
|
-
gr as
|
|
249
|
+
gr as SidebarHeader,
|
|
250
|
+
dr as SidebarNavItem,
|
|
250
251
|
bo as SimpleTable,
|
|
251
252
|
po as SimpleTableBody,
|
|
252
253
|
uo as SimpleTableCaption,
|
|
253
254
|
go as SimpleTableCell,
|
|
254
255
|
mo as SimpleTableFooter,
|
|
255
256
|
Co as SimpleTableHead,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
So as SimpleTableHeader,
|
|
258
|
+
To as SimpleTableRow,
|
|
259
|
+
ws as Skeleton,
|
|
259
260
|
i as SkeletonCard,
|
|
260
261
|
l as SkeletonCards,
|
|
261
262
|
co as Slider,
|
|
262
|
-
|
|
263
|
+
Wr as Sonner,
|
|
263
264
|
Do as Switch,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
Ir as TableActions,
|
|
266
|
+
hr as TableBody,
|
|
267
|
+
Pr as TableBulkActions,
|
|
267
268
|
jo as TableFilter,
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
fr as TableHeader,
|
|
270
|
+
wr as TablePagination,
|
|
271
|
+
vr as TableSettings,
|
|
271
272
|
Mo as Tabs,
|
|
272
273
|
xo as TabsContent,
|
|
273
274
|
Ao as TabsList,
|
|
274
275
|
Io as TabsTrigger,
|
|
275
276
|
ho as Textarea,
|
|
276
|
-
|
|
277
|
+
Hr as ThemeSelector,
|
|
277
278
|
Po as Toast,
|
|
278
279
|
fo as ToastAction,
|
|
279
280
|
wo as ToastClose,
|
|
@@ -281,19 +282,19 @@ export {
|
|
|
281
282
|
Fo as ToastProvider,
|
|
282
283
|
Lo as ToastTitle,
|
|
283
284
|
Bo as ToastViewport,
|
|
284
|
-
|
|
285
|
+
Xr as Toaster,
|
|
285
286
|
Go as Toggle,
|
|
286
287
|
Ro as ToggleGroup,
|
|
287
288
|
ko as ToggleGroupItem,
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
289
|
+
_r as Tooltip,
|
|
290
|
+
$r as TooltipContent,
|
|
291
|
+
as as TooltipProvider,
|
|
292
|
+
es as TooltipTrigger,
|
|
292
293
|
mr as Topbar,
|
|
293
294
|
Ho as badgeVariants,
|
|
294
|
-
|
|
295
|
+
os as buttonVariants,
|
|
295
296
|
No as navigationMenuTriggerStyle,
|
|
296
|
-
|
|
297
|
+
Fs as toast,
|
|
297
298
|
yo as toggleVariants,
|
|
298
299
|
Eo as useFormField
|
|
299
300
|
};
|
package/package.json
CHANGED
package/dist/Topbar-DZGhCt0o.js
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as e, Fragment as O } from "react/jsx-runtime";
|
|
2
|
-
import * as W from "react";
|
|
3
|
-
import { ChevronDownIcon as $, SearchIcon as L, MenuIcon as B } from "lucide-react";
|
|
4
|
-
import { T as M, c as Q, a as R, b as q, B as F } from "./tooltip-BWyFpIxo.js";
|
|
5
|
-
import { c as r } from "./tailwind.helper-B6yFEsav.js";
|
|
6
|
-
import "./sidebar.context-D5nywlmP.js";
|
|
7
|
-
import { u as G } from "./useSidebar-BJuALHqQ.js";
|
|
8
|
-
import "react-i18next";
|
|
9
|
-
import "next-themes";
|
|
10
|
-
import { I as _, S as E, b as H, h as J, c as K } from "./sheet-Gop1cIaU.js";
|
|
11
|
-
import { S as A } from "./skeleton-8o8eJd3P.js";
|
|
12
|
-
const U = ({
|
|
13
|
-
path: n,
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
15
|
-
icon: h,
|
|
16
|
-
label: f,
|
|
17
|
-
badge: p,
|
|
18
|
-
subItems: t,
|
|
19
|
-
currentPath: o,
|
|
20
|
-
collapsed: m,
|
|
21
|
-
dense: d = !1,
|
|
22
|
-
onItemClick: v
|
|
23
|
-
}) => {
|
|
24
|
-
const [b, S] = W.useState((t == null ? void 0 : t.some((a) => o === a.path || o.startsWith(`${a.path}/`))) || !1), l = n ? o === n || n !== "/" && o.startsWith(`${n}/`) : !1, u = t == null ? void 0 : t.some((a) => o === a.path || o.startsWith(`${a.path}/`)), y = /* @__PURE__ */ s(
|
|
25
|
-
"a",
|
|
26
|
-
{
|
|
27
|
-
href: n || "#",
|
|
28
|
-
onClick: (a) => {
|
|
29
|
-
a.preventDefault(), t && t.length > 0 ? m || S(!b) : n && v(n);
|
|
30
|
-
},
|
|
31
|
-
className: r(
|
|
32
|
-
"flex items-center cursor-pointer transition-all duration-200 group",
|
|
33
|
-
d ? "gap-2.5 rounded-lg mb-0.5" : "gap-3 rounded-2xl mb-2",
|
|
34
|
-
m ? d ? "justify-center p-2 h-9 w-9 mx-auto" : "justify-center p-3 h-12 w-12 mx-auto" : d ? "px-3 py-1.5 h-9" : "px-4 py-3 h-12",
|
|
35
|
-
l || !m && u ? d ? "bg-sidebar-primary text-sidebar-primary-foreground" : "bg-sidebar-primary text-sidebar-primary-foreground shadow-lg" : "hover:bg-sidebar-accent text-sidebar-foreground hover:text-sidebar-accent-foreground"
|
|
36
|
-
),
|
|
37
|
-
children: [
|
|
38
|
-
/* @__PURE__ */ e("div", { className: r("flex-shrink-0 transition-transform group-hover:scale-110", m ? "flex items-center justify-center" : ""), children: /* @__PURE__ */ e(h, { className: "size-4" }) }),
|
|
39
|
-
!m && /* @__PURE__ */ s(O, { children: [
|
|
40
|
-
/* @__PURE__ */ e("span", { className: r("flex-grow transition-opacity duration-150 font-medium", d ? "text-sm" : ""), children: f }),
|
|
41
|
-
p !== void 0 && /* @__PURE__ */ e("span", { className: "bg-red-500 text-white text-xs rounded-full py-1 min-w-[20px] text-center px-2 font-semibold", children: p }),
|
|
42
|
-
t && t.length > 0 && /* @__PURE__ */ e($, { className: r("size-4 transition-transform duration-200", b ? "rotate-180" : "") })
|
|
43
|
-
] })
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
return /* @__PURE__ */ s(O, { children: [
|
|
48
|
-
m ? /* @__PURE__ */ s(M, { children: [
|
|
49
|
-
/* @__PURE__ */ e(Q, { asChild: !0, children: y }),
|
|
50
|
-
/* @__PURE__ */ e(
|
|
51
|
-
R,
|
|
52
|
-
{
|
|
53
|
-
side: "right",
|
|
54
|
-
sideOffset: 6,
|
|
55
|
-
className: "rounded-xl z-[99999] flex gap-2 bg-sidebar text-sidebar-foreground border border-sidebar-border py-2 text-sm shadow-lg",
|
|
56
|
-
children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
57
|
-
/* @__PURE__ */ e("p", { className: "font-semibold", children: f }),
|
|
58
|
-
p !== void 0 && /* @__PURE__ */ s("span", { className: "ml-1 text-xs", children: [
|
|
59
|
-
"(",
|
|
60
|
-
p,
|
|
61
|
-
")"
|
|
62
|
-
] })
|
|
63
|
-
] }) })
|
|
64
|
-
}
|
|
65
|
-
)
|
|
66
|
-
] }) : y,
|
|
67
|
-
!m && t && t.length > 0 && b && /* @__PURE__ */ e(
|
|
68
|
-
"div",
|
|
69
|
-
{
|
|
70
|
-
className: r(
|
|
71
|
-
"flex flex-col ml-4 pl-4 border-l-2 border-sidebar-border/50 animate-in slide-in-from-top-2 fade-in duration-200",
|
|
72
|
-
d ? "gap-0.5 mb-0.5" : "gap-1 mb-2"
|
|
73
|
-
),
|
|
74
|
-
children: t.map((a, g) => {
|
|
75
|
-
const j = o === a.path || a.path !== "/" && o.startsWith(`${a.path}/`);
|
|
76
|
-
return /* @__PURE__ */ s(
|
|
77
|
-
"a",
|
|
78
|
-
{
|
|
79
|
-
href: a.path,
|
|
80
|
-
onClick: (C) => {
|
|
81
|
-
C.preventDefault(), v(a.path);
|
|
82
|
-
},
|
|
83
|
-
className: r(
|
|
84
|
-
"flex items-center justify-between rounded-xl text-sm transition-all duration-200",
|
|
85
|
-
d ? "px-3 py-1" : "px-4 py-2",
|
|
86
|
-
j ? "bg-sidebar-accent/50 text-sidebar-primary font-semibold" : "text-sidebar-muted hover:bg-sidebar-accent hover:text-sidebar-foreground"
|
|
87
|
-
),
|
|
88
|
-
children: [
|
|
89
|
-
/* @__PURE__ */ e("span", { children: a.label }),
|
|
90
|
-
a.badge !== void 0 && /* @__PURE__ */ e("span", { className: "bg-sidebar-primary/20 text-sidebar-primary text-[10px] rounded-full py-0.5 px-2 font-semibold", children: a.badge })
|
|
91
|
-
]
|
|
92
|
-
},
|
|
93
|
-
g
|
|
94
|
-
);
|
|
95
|
-
})
|
|
96
|
-
}
|
|
97
|
-
)
|
|
98
|
-
] });
|
|
99
|
-
}, ie = ({
|
|
100
|
-
groups: n,
|
|
101
|
-
onItemClick: h,
|
|
102
|
-
currentPath: f,
|
|
103
|
-
appName: p = "appname",
|
|
104
|
-
appSubName: t = "appsubname",
|
|
105
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
106
|
-
appIcon: o,
|
|
107
|
-
headerNode: m,
|
|
108
|
-
footerNode: d,
|
|
109
|
-
loading: v = !1,
|
|
110
|
-
searchable: b = !1,
|
|
111
|
-
searchPlaceholder: S = "Rechercher...",
|
|
112
|
-
dense: l = !1
|
|
113
|
-
}) => {
|
|
114
|
-
const { collapsed: u, isMobile: N, setCollapsed: k } = G(), [z, D] = W.useState(""), c = N ? !1 : u, y = !u, a = (i) => {
|
|
115
|
-
h(i), N && k(!0);
|
|
116
|
-
}, g = z.trim().toLowerCase(), j = g === "" ? n : n.map((i) => ({
|
|
117
|
-
...i,
|
|
118
|
-
items: i.items.filter(
|
|
119
|
-
(x) => {
|
|
120
|
-
var w;
|
|
121
|
-
return x.label.toLowerCase().includes(g) || (((w = x.subItems) == null ? void 0 : w.some((T) => T.label.toLowerCase().includes(g))) ?? !1);
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
})).filter((i) => i.items.length > 0), C = /* @__PURE__ */ s("div", { className: "flex flex-col h-full bg-sidebar text-sidebar-foreground", children: [
|
|
125
|
-
m ?? /* @__PURE__ */ s("div", { className: r("flex items-center flex-shrink-0 gap-3 px-4", l ? "h-14" : "h-16 md:h-20", c ? "justify-center" : ""), children: [
|
|
126
|
-
o !== void 0 && /* @__PURE__ */ e("div", { className: "flex-shrink-0 text-sidebar-foreground", children: /* @__PURE__ */ e(o, { className: l ? "size-5" : "size-6" }) }),
|
|
127
|
-
!c && /* @__PURE__ */ s("div", { className: "flex flex-col", children: [
|
|
128
|
-
/* @__PURE__ */ e("h1", { className: r("font-bold text-sidebar-foreground leading-tight", l ? "text-base" : "text-lg"), children: p }),
|
|
129
|
-
/* @__PURE__ */ e("span", { className: r("text-sidebar-muted font-medium", l ? "text-[11px]" : "text-xs"), children: t })
|
|
130
|
-
] })
|
|
131
|
-
] }),
|
|
132
|
-
b && !c && /* @__PURE__ */ e("div", { className: r("px-4", l ? "pt-2" : "pt-4"), children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
133
|
-
/* @__PURE__ */ e(L, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-sidebar-muted" }),
|
|
134
|
-
/* @__PURE__ */ e(
|
|
135
|
-
_,
|
|
136
|
-
{
|
|
137
|
-
type: "search",
|
|
138
|
-
value: z,
|
|
139
|
-
onChange: (i) => {
|
|
140
|
-
D(i.target.value);
|
|
141
|
-
},
|
|
142
|
-
placeholder: S,
|
|
143
|
-
className: r(
|
|
144
|
-
"bg-sidebar-accent/40 border-sidebar-border pl-9 text-sidebar-foreground placeholder:text-sidebar-muted",
|
|
145
|
-
l ? "h-8 text-sm" : "h-9"
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
)
|
|
149
|
-
] }) }),
|
|
150
|
-
/* @__PURE__ */ e("div", { className: r("flex-1 overflow-y-auto px-2 scrollbar-modern", l ? "py-2" : "py-4"), children: v ? Array.from({ length: 5 }).map((i, x) => /* @__PURE__ */ s("div", { className: r("flex items-center gap-3", l ? "mb-1 h-9" : "mb-2 h-12", c ? "justify-center px-3" : "px-4"), children: [
|
|
151
|
-
/* @__PURE__ */ e(A, { className: "size-5 flex-shrink-0 rounded-md" }),
|
|
152
|
-
!c && /* @__PURE__ */ e(A, { className: "h-4 flex-1" })
|
|
153
|
-
] }, x)) : j.map((i, x) => /* @__PURE__ */ s("div", { className: l ? "mb-3" : "mb-6", children: [
|
|
154
|
-
!c && i.title !== void 0 && i.title !== "" && /* @__PURE__ */ e("h3", { className: r("px-4 text-xs uppercase tracking-wider font-semibold text-sidebar-muted", l ? "mb-1" : "mb-2"), children: i.title }),
|
|
155
|
-
/* @__PURE__ */ e("nav", { className: r("flex flex-col", l ? "gap-0.5" : "gap-1"), children: i.items.map((w, T) => /* @__PURE__ */ e(U, { ...w, currentPath: f, collapsed: c, dense: l, onItemClick: a }, T)) })
|
|
156
|
-
] }, x)) }),
|
|
157
|
-
d && /* @__PURE__ */ e("div", { className: r("border-t border-sidebar-border", l ? "p-2" : "p-4", c ? "flex justify-center" : ""), children: d })
|
|
158
|
-
] });
|
|
159
|
-
return N ? /* @__PURE__ */ e(
|
|
160
|
-
E,
|
|
161
|
-
{
|
|
162
|
-
open: y,
|
|
163
|
-
onOpenChange: (i) => {
|
|
164
|
-
k(!i);
|
|
165
|
-
},
|
|
166
|
-
children: /* @__PURE__ */ s(H, { side: "left", className: "w-[16rem] p-0 bg-sidebar border-r border-sidebar-border overflow-hidden [&>button]:text-sidebar-foreground", children: [
|
|
167
|
-
/* @__PURE__ */ e(J, { className: "sr-only", children: "Menu de navigation" }),
|
|
168
|
-
/* @__PURE__ */ e(K, { className: "sr-only", children: "Navigation principale de l'application" }),
|
|
169
|
-
C
|
|
170
|
-
] })
|
|
171
|
-
}
|
|
172
|
-
) : /* @__PURE__ */ e(q, { delayDuration: 0, children: /* @__PURE__ */ e(
|
|
173
|
-
"aside",
|
|
174
|
-
{
|
|
175
|
-
className: r("flex flex-col bg-sidebar h-screen transition-all duration-300", c ? "w-[--navbar-width-icon]" : "w-[--navbar-width]", "flex"),
|
|
176
|
-
style: {
|
|
177
|
-
"--navbar-width": "16rem",
|
|
178
|
-
"--navbar-width-icon": "5rem"
|
|
179
|
-
},
|
|
180
|
-
children: C
|
|
181
|
-
}
|
|
182
|
-
) });
|
|
183
|
-
}, se = ({ collapsed: n, isMobile: h, onToggleSidebar: f, actionsNode: p, userMenuNode: t }) => /* @__PURE__ */ s(
|
|
184
|
-
"header",
|
|
185
|
-
{
|
|
186
|
-
className: r(
|
|
187
|
-
"fixed top-0 right-0 z-[60] h-16 md:h-20 bg-topbar text-topbar-foreground flex items-center justify-between px-4 transition-all duration-300",
|
|
188
|
-
h && "left-0",
|
|
189
|
-
!h && n && "left-[5rem]",
|
|
190
|
-
!h && !n && "left-[16rem]"
|
|
191
|
-
),
|
|
192
|
-
tabIndex: -1,
|
|
193
|
-
children: [
|
|
194
|
-
/* @__PURE__ */ e("div", { className: "flex items-center min-w-0 flex-1", children: /* @__PURE__ */ e(
|
|
195
|
-
F,
|
|
196
|
-
{
|
|
197
|
-
variant: "ghost",
|
|
198
|
-
size: "icon",
|
|
199
|
-
onClick: f,
|
|
200
|
-
className: "text-topbar-foreground hover:bg-topbar-accent hover:text-topbar-accent-foreground",
|
|
201
|
-
children: /* @__PURE__ */ e(B, { className: "size-4" })
|
|
202
|
-
}
|
|
203
|
-
) }),
|
|
204
|
-
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 md:gap-4 flex-shrink-0", children: [
|
|
205
|
-
p,
|
|
206
|
-
t
|
|
207
|
-
] })
|
|
208
|
-
]
|
|
209
|
-
}
|
|
210
|
-
);
|
|
211
|
-
export {
|
|
212
|
-
ie as S,
|
|
213
|
-
se as T,
|
|
214
|
-
U as a
|
|
215
|
-
};
|