@viglet/viglet-design-system 2026.2.55 → 2026.3.2
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/{breadcrumb.context-C20vyfmC.js → breadcrumb.context-C7VCfh49.js} +324 -324
- package/dist/breadcrumb.context-Td6Tjc_z.cjs +7 -0
- package/dist/components/app-footer.d.ts +1 -1
- package/dist/components/app-footer.d.ts.map +1 -1
- package/dist/components/app-switcher.d.ts +1 -1
- package/dist/components/app-switcher.d.ts.map +1 -1
- package/dist/components/backend-status.d.ts +2 -2
- package/dist/components/backend-status.d.ts.map +1 -1
- package/dist/components/language-select.d.ts +1 -1
- package/dist/components/language-select.d.ts.map +1 -1
- package/dist/components/language-switcher.d.ts +1 -1
- package/dist/components/language-switcher.d.ts.map +1 -1
- package/dist/components/login/login.d.ts +11 -11
- package/dist/components/login/login.d.ts.map +1 -1
- package/dist/components/mode-toggle.d.ts +2 -2
- package/dist/components/mode-toggle.d.ts.map +1 -1
- package/dist/components/nav-secondary.d.ts +1 -1
- package/dist/components/nav-secondary.d.ts.map +1 -1
- package/dist/components/router/gradient-button-link.d.ts +1 -1
- package/dist/components/router/gradient-button-link.d.ts.map +1 -1
- package/dist/components/router/loading-provider.d.ts +1 -1
- package/dist/components/router/loading-provider.d.ts.map +1 -1
- package/dist/components/router/nav-main.d.ts +1 -1
- package/dist/components/router/nav-main.d.ts.map +1 -1
- package/dist/components/router/nav-user.d.ts +2 -1
- package/dist/components/router/nav-user.d.ts.map +1 -1
- package/dist/components/router/sticky.page.header.d.ts.map +1 -1
- package/dist/components/router/sub.page.header.d.ts.map +1 -1
- package/dist/components/startup-first/startup-first.d.ts +11 -11
- package/dist/components/startup-first/startup-first.d.ts.map +1 -1
- package/dist/components/theme-provider.d.ts +1 -1
- package/dist/components/theme-provider.d.ts.map +1 -1
- package/dist/components/ui/avatar.d.ts +3 -3
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +7 -7
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/card.d.ts +7 -7
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/dialog.d.ts +10 -10
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/drawer.d.ts +10 -10
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +15 -15
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/floating-formulas-bg.d.ts +1 -1
- package/dist/components/ui/floating-formulas-bg.d.ts.map +1 -1
- package/dist/components/ui/form-actions.d.ts +4 -4
- package/dist/components/ui/form-actions.d.ts.map +1 -1
- package/dist/components/ui/form.d.ts +7 -7
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/glass-card.d.ts +1 -1
- package/dist/components/ui/glass-card.d.ts.map +1 -1
- package/dist/components/ui/gradient-button.d.ts +1 -1
- package/dist/components/ui/gradient-button.d.ts.map +1 -1
- package/dist/components/ui/gradient-switch.d.ts +1 -1
- package/dist/components/ui/gradient-switch.d.ts.map +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +8 -8
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/pagination.d.ts +5 -5
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/popover.d.ts +7 -7
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/progress.d.ts +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/pulse-ring.d.ts +1 -1
- package/dist/components/ui/pulse-ring.d.ts.map +1 -1
- package/dist/components/ui/resizable.d.ts +3 -3
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/section-card.d.ts +4 -4
- package/dist/components/ui/section-card.d.ts.map +1 -1
- package/dist/components/ui/select.d.ts +10 -10
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/separator.d.ts +1 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/sheet.d.ts +8 -8
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts +23 -23
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/skeleton.d.ts +1 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/slider.d.ts +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/sonner.d.ts +1 -1
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/stepper.d.ts +3 -3
- package/dist/components/ui/stepper.d.ts.map +1 -1
- package/dist/components/ui/sticky-save-bar.d.ts +2 -2
- package/dist/components/ui/sticky-save-bar.d.ts.map +1 -1
- package/dist/components/ui/switch.d.ts +1 -1
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/table.d.ts +8 -8
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/tabs.d.ts +4 -4
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +2 -2
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/tooltip.d.ts +4 -4
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/user-avatar.d.ts +1 -1
- package/dist/components/ui/user-avatar.d.ts.map +1 -1
- package/dist/components/ui/user-menu.d.ts +1 -1
- package/dist/components/ui/user-menu.d.ts.map +1 -1
- package/dist/components/viglet-app-switcher.d.ts +1 -1
- package/dist/components/viglet-app-switcher.d.ts.map +1 -1
- package/dist/contexts/breadcrumb.context.d.ts +1 -1
- package/dist/contexts/breadcrumb.context.d.ts.map +1 -1
- package/dist/contexts/user.context.d.ts +1 -1
- package/dist/contexts/user.context.d.ts.map +1 -1
- package/dist/floating-formulas-bg.cjs.js +1 -1
- package/dist/i18n-DN_2YzjB.cjs +1 -0
- package/dist/i18n.cjs.js +1 -1
- package/dist/i18n.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +557 -557
- package/dist/{chunk-Bmb41Sf3.cjs → rolldown-runtime-CMqjfN_6.cjs} +1 -1
- package/dist/router.cjs.js +1 -1
- package/dist/router.es.js +384 -384
- package/dist/viglet-design-system.css +1 -1
- package/dist/vite.cjs.js +10 -2
- package/dist/vite.es.js +10 -2
- package/package.json +2 -2
- package/dist/breadcrumb.context-sGIkawm9.cjs +0 -7
- package/dist/i18n-DHez5YdJ.cjs +0 -1
- /package/dist/{i18n-DFQANHU9.js → i18n-C94rDRaM.js} +0 -0
package/dist/router.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { $ as e, A as t,
|
|
2
|
-
import
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { IconAlertTriangle as ve, IconAlertTriangleFilled as ye, IconChevronLeft as be, IconChevronRight as xe, IconDotsVertical as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { NavLink as
|
|
1
|
+
import { $t as e, A as t, At as n, C as r, Dt as i, F as a, Ft as o, Gt as s, Ht as c, Jt as l, Kt as u, N as d, Nt as f, Ot as p, P as m, Pt as h, Q as g, Qt as _, T as v, Tt as y, V as b, Wt as x, X as S, Z as ee, Zt as C, _ as w, an as te, at as ne, b as re, ct as T, d as ie, et as ae, f as oe, ft as E, g as D, ht as se, i as ce, kt as O, l as le, lt as ue, m as k, mt as A, n as de, ot as fe, pt as pe, qt as me, st as j, u as he, ut as M, v as ge, w as N, wt as P, x as F, yt as _e } from "./breadcrumb.context-C7VCfh49.js";
|
|
2
|
+
import I, { useState as L } from "react";
|
|
3
|
+
import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
4
|
+
import { IconAlertTriangle as ve, IconAlertTriangleFilled as ye, IconChevronLeft as be, IconChevronRight as xe, IconDotsVertical as V, IconDownload as Se, IconLogout as Ce, IconPlus as H, IconSearch as U, IconTrash as W, IconUserCircle as we } from "@tabler/icons-react";
|
|
5
|
+
import { useTranslation as G } from "react-i18next";
|
|
6
|
+
import { NavLink as K, Outlet as q, useLocation as J, useNavigate as Y } from "react-router-dom";
|
|
7
7
|
import { getCoreRowModel as Te, getFilteredRowModel as Ee, getPaginationRowModel as De, getSortedRowModel as Oe, useReactTable as ke } from "@tanstack/react-table";
|
|
8
8
|
import { Icon as Ae } from "@iconify/react";
|
|
9
9
|
//#region src/components/router/gradient-button-link.tsx
|
|
10
|
-
function
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
function X({ className: e, variant: t, size: n, to: r, onClick: i, children: a }) {
|
|
11
|
+
return /* @__PURE__ */ z(K, {
|
|
12
12
|
to: r,
|
|
13
13
|
"data-slot": "gradient-button",
|
|
14
|
-
className:
|
|
14
|
+
className: te(ue({
|
|
15
15
|
variant: t,
|
|
16
16
|
size: n,
|
|
17
17
|
className: e
|
|
@@ -25,34 +25,34 @@ function Y({ className: e, variant: t, size: n, to: r, onClick: i, children: a }
|
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/components/router/blank-slate.tsx
|
|
28
|
-
var
|
|
28
|
+
var Z = ({ icon: e, title: t, description: n, urlNew: r, buttonText: i }) => /* @__PURE__ */ z("div", {
|
|
29
29
|
className: "flex items-center justify-center px-6 py-16",
|
|
30
|
-
children: /* @__PURE__ */
|
|
30
|
+
children: /* @__PURE__ */ z("div", {
|
|
31
31
|
className: "relative w-full max-w-md overflow-hidden rounded-2xl border border-border/50 bg-card/80 backdrop-blur-sm shadow-xl",
|
|
32
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ B("div", {
|
|
33
33
|
className: "relative flex flex-col items-center text-center px-8 py-12 space-y-6",
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ B("div", {
|
|
36
36
|
className: "relative",
|
|
37
|
-
children: [/* @__PURE__ */
|
|
37
|
+
children: [/* @__PURE__ */ z("div", { className: "absolute inset-0 rounded-2xl bg-gradient-to-br from-blue-500/20 to-indigo-500/20 blur-xl animate-pulse" }), /* @__PURE__ */ z("div", {
|
|
38
38
|
className: "relative inline-flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-blue-600 to-indigo-600 shadow-lg shadow-blue-500/25 ring-4 ring-blue-500/10",
|
|
39
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ z(e, {
|
|
40
40
|
className: "text-white",
|
|
41
41
|
size: 30
|
|
42
42
|
})
|
|
43
43
|
})]
|
|
44
44
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ B("div", {
|
|
46
46
|
className: "space-y-2",
|
|
47
|
-
children: [/* @__PURE__ */
|
|
47
|
+
children: [/* @__PURE__ */ z("h2", {
|
|
48
48
|
className: "text-xl font-semibold tracking-tight",
|
|
49
49
|
children: t
|
|
50
|
-
}), /* @__PURE__ */
|
|
50
|
+
}), /* @__PURE__ */ z("p", {
|
|
51
51
|
className: "text-sm text-muted-foreground leading-relaxed max-w-xs mx-auto",
|
|
52
52
|
children: n
|
|
53
53
|
})]
|
|
54
54
|
}),
|
|
55
|
-
r && /* @__PURE__ */
|
|
55
|
+
r && /* @__PURE__ */ z(X, {
|
|
56
56
|
size: "lg",
|
|
57
57
|
to: r,
|
|
58
58
|
children: i
|
|
@@ -60,56 +60,56 @@ var X = ({ icon: e, title: t, description: n, urlNew: r, buttonText: i }) => /*
|
|
|
60
60
|
]
|
|
61
61
|
})
|
|
62
62
|
})
|
|
63
|
-
}),
|
|
64
|
-
let
|
|
65
|
-
function
|
|
66
|
-
|
|
63
|
+
}), Q = ({ feature: e, name: t, onDelete: r, open: a, setOpen: o, trigger: s, blockedBy: c, title: l, description: u, confirmLabel: d }) => {
|
|
64
|
+
let m = c && c.length > 0, g = Y(), { t: _ } = G(), [v, b] = L(""), x = v === t;
|
|
65
|
+
function S(e) {
|
|
66
|
+
o(e), e || b("");
|
|
67
67
|
}
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
open:
|
|
70
|
-
onOpenChange:
|
|
71
|
-
children: [s !== null && /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ B(y, {
|
|
69
|
+
open: a,
|
|
70
|
+
onOpenChange: S,
|
|
71
|
+
children: [s !== null && /* @__PURE__ */ z(h, {
|
|
72
72
|
asChild: !0,
|
|
73
|
-
children: s ?? /* @__PURE__ */
|
|
73
|
+
children: s ?? /* @__PURE__ */ z(T, {
|
|
74
74
|
variant: "ghost",
|
|
75
75
|
size: "icon-sm",
|
|
76
|
-
children: /* @__PURE__ */
|
|
76
|
+
children: /* @__PURE__ */ z(W, { className: "size-5!" })
|
|
77
77
|
})
|
|
78
|
-
}), /* @__PURE__ */
|
|
78
|
+
}), /* @__PURE__ */ z(i, {
|
|
79
79
|
className: "sm:max-w-md",
|
|
80
|
-
children:
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
80
|
+
children: m ? /* @__PURE__ */ B(R, { children: [
|
|
81
|
+
/* @__PURE__ */ B(n, { children: [
|
|
82
|
+
/* @__PURE__ */ z("div", {
|
|
83
83
|
className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-amber-500/10 ring-1 ring-amber-500/20 mb-2",
|
|
84
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ z(ve, { className: "size-6 text-amber-500" })
|
|
85
85
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ z(f, {
|
|
87
87
|
className: "text-center",
|
|
88
88
|
children: _("dialog.cannotDelete", { feature: e })
|
|
89
89
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ z(p, {
|
|
91
91
|
className: "text-center",
|
|
92
92
|
children: _("dialog.inUse", { name: t })
|
|
93
93
|
})
|
|
94
94
|
] }),
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ B("div", {
|
|
96
96
|
className: "space-y-3",
|
|
97
97
|
children: [
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ z("p", {
|
|
99
99
|
className: "text-sm text-muted-foreground",
|
|
100
100
|
children: _("dialog.dependingSites", { feature: e })
|
|
101
101
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ z("div", {
|
|
103
103
|
className: "flex flex-wrap gap-2",
|
|
104
104
|
children: c.map((e) => {
|
|
105
|
-
let t = e.language ?
|
|
106
|
-
return /* @__PURE__ */
|
|
105
|
+
let t = e.language ? le(e.language) : void 0;
|
|
106
|
+
return /* @__PURE__ */ z(he, {
|
|
107
107
|
text: e.name,
|
|
108
108
|
href: e.href,
|
|
109
109
|
onClick: (e) => {
|
|
110
|
-
|
|
110
|
+
o(!1), e && g(e);
|
|
111
111
|
},
|
|
112
|
-
prefix: t ? /* @__PURE__ */
|
|
112
|
+
prefix: t ? /* @__PURE__ */ z("img", {
|
|
113
113
|
src: `https://flagcdn.com/w40/${t}.png`,
|
|
114
114
|
alt: e.language,
|
|
115
115
|
className: "w-4 h-3 object-cover rounded-sm"
|
|
@@ -117,65 +117,65 @@ var X = ({ icon: e, title: t, description: n, urlNew: r, buttonText: i }) => /*
|
|
|
117
117
|
}, e.id);
|
|
118
118
|
})
|
|
119
119
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ z("p", {
|
|
121
121
|
className: "text-xs text-muted-foreground",
|
|
122
122
|
children: _("dialog.removeDependencies", { feature: e })
|
|
123
123
|
})
|
|
124
124
|
]
|
|
125
125
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
onClick: () =>
|
|
126
|
+
/* @__PURE__ */ z(O, { children: /* @__PURE__ */ z(T, {
|
|
127
|
+
onClick: () => o(!1),
|
|
128
128
|
variant: "outline",
|
|
129
129
|
className: "w-full",
|
|
130
130
|
children: _("dialog.understood")
|
|
131
131
|
}) })
|
|
132
|
-
] }) : /* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
132
|
+
] }) : /* @__PURE__ */ B(R, { children: [
|
|
133
|
+
/* @__PURE__ */ B(n, { children: [
|
|
134
|
+
/* @__PURE__ */ z("div", {
|
|
135
135
|
className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-red-500/10 ring-1 ring-red-500/20 mb-2",
|
|
136
|
-
children: /* @__PURE__ */
|
|
136
|
+
children: /* @__PURE__ */ z(W, { className: "size-6 text-red-500" })
|
|
137
137
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ z(f, {
|
|
139
139
|
className: "text-center",
|
|
140
|
-
children:
|
|
140
|
+
children: l ?? _("dialog.deleteFeature", { feature: e })
|
|
141
141
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ z(p, {
|
|
143
143
|
className: "text-center",
|
|
144
|
-
children:
|
|
144
|
+
children: u ?? _("dialog.permanentDelete", { name: t })
|
|
145
145
|
})
|
|
146
146
|
] }),
|
|
147
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ B("div", {
|
|
148
148
|
className: "space-y-2",
|
|
149
|
-
children: [/* @__PURE__ */
|
|
149
|
+
children: [/* @__PURE__ */ B("label", {
|
|
150
150
|
className: "text-sm text-muted-foreground",
|
|
151
151
|
children: [
|
|
152
152
|
_("dialog.typeToConfirm"),
|
|
153
153
|
" ",
|
|
154
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ z("span", {
|
|
155
155
|
className: "font-mono font-semibold text-foreground bg-muted px-1.5 py-0.5 rounded",
|
|
156
156
|
children: t
|
|
157
157
|
}),
|
|
158
158
|
" ",
|
|
159
159
|
_("dialog.toConfirm")
|
|
160
160
|
]
|
|
161
|
-
}), /* @__PURE__ */
|
|
161
|
+
}), /* @__PURE__ */ z(j, {
|
|
162
162
|
value: v,
|
|
163
|
-
onChange: (e) =>
|
|
163
|
+
onChange: (e) => b(e.target.value),
|
|
164
164
|
placeholder: t,
|
|
165
165
|
className: "font-mono text-sm",
|
|
166
166
|
autoFocus: !0
|
|
167
167
|
})]
|
|
168
168
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ B(O, {
|
|
170
170
|
className: "flex-col gap-2 sm:flex-col",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
172
|
-
onClick:
|
|
171
|
+
children: [/* @__PURE__ */ B(T, {
|
|
172
|
+
onClick: r,
|
|
173
173
|
variant: "destructive",
|
|
174
|
-
disabled: !
|
|
174
|
+
disabled: !x,
|
|
175
175
|
className: "w-full",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
177
|
-
}), /* @__PURE__ */
|
|
178
|
-
onClick: () =>
|
|
176
|
+
children: [/* @__PURE__ */ z(W, { className: "size-4" }), d ?? _("dialog.deleteFeature", { feature: e })]
|
|
177
|
+
}), /* @__PURE__ */ z(T, {
|
|
178
|
+
onClick: () => S(!1),
|
|
179
179
|
variant: "ghost",
|
|
180
180
|
className: "w-full",
|
|
181
181
|
children: _("common.cancel")
|
|
@@ -184,13 +184,13 @@ var X = ({ icon: e, title: t, description: n, urlNew: r, buttonText: i }) => /*
|
|
|
184
184
|
] })
|
|
185
185
|
})]
|
|
186
186
|
});
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
var je = () => null;
|
|
190
|
-
je.displayName = "GridListAction";
|
|
187
|
+
}, je = () => null;
|
|
188
|
+
je.displayName = "GridListNewButton";
|
|
191
189
|
var Me = () => null;
|
|
192
|
-
Me.displayName = "
|
|
193
|
-
var Ne =
|
|
190
|
+
Me.displayName = "GridListAction";
|
|
191
|
+
var Ne = () => null;
|
|
192
|
+
Ne.displayName = "GridListItemAction";
|
|
193
|
+
var Pe = [
|
|
194
194
|
"from-blue-500 to-indigo-500",
|
|
195
195
|
"from-emerald-500 to-teal-500",
|
|
196
196
|
"from-violet-500 to-purple-500",
|
|
@@ -200,15 +200,15 @@ var Ne = [
|
|
|
200
200
|
"from-fuchsia-500 to-pink-500",
|
|
201
201
|
"from-lime-500 to-emerald-500"
|
|
202
202
|
];
|
|
203
|
-
function
|
|
203
|
+
function Fe(e) {
|
|
204
204
|
let t = 0;
|
|
205
205
|
for (let n = 0; n < e.length; n++) t = (e.codePointAt(n) ?? 0) + ((t << 5) - t);
|
|
206
|
-
return
|
|
206
|
+
return Pe[Math.abs(t) % Pe.length];
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Ie(e) {
|
|
209
209
|
return e.split(/[\s\-_]+/).filter(Boolean).slice(0, 2).map((e) => e[0].toUpperCase()).join("");
|
|
210
210
|
}
|
|
211
|
-
var
|
|
211
|
+
var Le = [
|
|
212
212
|
{
|
|
213
213
|
accessorKey: "name",
|
|
214
214
|
header: "Name"
|
|
@@ -221,18 +221,18 @@ var Ie = [
|
|
|
221
221
|
accessorKey: "url",
|
|
222
222
|
header: "URL"
|
|
223
223
|
}
|
|
224
|
-
],
|
|
225
|
-
let { t:
|
|
226
|
-
|
|
227
|
-
if (
|
|
224
|
+
], Re = Object.assign(({ gridItemList: e, children: t }) => {
|
|
225
|
+
let { t: n } = G(), r = Y(), i = [], a = [];
|
|
226
|
+
I.Children.forEach(t, (e) => {
|
|
227
|
+
if (I.isValidElement(e)) {
|
|
228
228
|
if (e.type?.displayName === "GridListNewButton") {
|
|
229
229
|
let { to: t, label: n } = e.props;
|
|
230
|
-
|
|
230
|
+
i.push({
|
|
231
231
|
key: `new-${n}`,
|
|
232
|
-
render: () => /* @__PURE__ */
|
|
233
|
-
onClick: () =>
|
|
232
|
+
render: () => /* @__PURE__ */ B(A, {
|
|
233
|
+
onClick: () => r(t),
|
|
234
234
|
children: [
|
|
235
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ z(H, { className: "size-4 mr-2" }),
|
|
236
236
|
"New ",
|
|
237
237
|
n
|
|
238
238
|
]
|
|
@@ -240,14 +240,14 @@ var Ie = [
|
|
|
240
240
|
});
|
|
241
241
|
} else if (e.type?.displayName === "GridListAction") {
|
|
242
242
|
let { children: t } = e.props;
|
|
243
|
-
|
|
244
|
-
key: `action-${
|
|
245
|
-
render: () => /* @__PURE__ */ R
|
|
243
|
+
i.push({
|
|
244
|
+
key: `action-${i.length}`,
|
|
245
|
+
render: () => /* @__PURE__ */ z(R, { children: t })
|
|
246
246
|
});
|
|
247
247
|
} else if (e.type?.displayName === "GridListItemAction") {
|
|
248
248
|
let t = e.props;
|
|
249
|
-
|
|
250
|
-
key: `item-action-${
|
|
249
|
+
a.push({
|
|
250
|
+
key: `item-action-${a.length}`,
|
|
251
251
|
icon: t.icon,
|
|
252
252
|
label: t.label,
|
|
253
253
|
onClick: t.onClick,
|
|
@@ -256,80 +256,80 @@ var Ie = [
|
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
});
|
|
259
|
-
let
|
|
259
|
+
let s = a.length > 0, c = a.filter((e) => e.position === "left"), l = a.filter((e) => e.position === "right"), [u, d] = L({
|
|
260
260
|
pageIndex: 0,
|
|
261
261
|
pageSize: 12
|
|
262
|
-
}), [
|
|
263
|
-
data:
|
|
264
|
-
columns:
|
|
265
|
-
onSortingChange:
|
|
262
|
+
}), [f, p] = I.useState([]), [m, h] = L(""), _ = ke({
|
|
263
|
+
data: e,
|
|
264
|
+
columns: Le,
|
|
265
|
+
onSortingChange: p,
|
|
266
266
|
getCoreRowModel: Te(),
|
|
267
267
|
getPaginationRowModel: De(),
|
|
268
268
|
getSortedRowModel: Oe(),
|
|
269
269
|
getFilteredRowModel: Ee(),
|
|
270
270
|
state: {
|
|
271
|
-
globalFilter:
|
|
272
|
-
pagination:
|
|
273
|
-
sorting:
|
|
271
|
+
globalFilter: m,
|
|
272
|
+
pagination: u,
|
|
273
|
+
sorting: f
|
|
274
274
|
},
|
|
275
|
-
onGlobalFilterChange:
|
|
275
|
+
onGlobalFilterChange: h,
|
|
276
276
|
getColumnCanGlobalFilter: (e) => e.id === "name" || e.id === "description",
|
|
277
|
-
onPaginationChange:
|
|
278
|
-
}),
|
|
279
|
-
return /* @__PURE__ */
|
|
277
|
+
onPaginationChange: d
|
|
278
|
+
}), v = _.getRowModel().rows;
|
|
279
|
+
return /* @__PURE__ */ B("div", {
|
|
280
280
|
className: "px-6",
|
|
281
281
|
children: [
|
|
282
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ B("div", {
|
|
283
283
|
className: "flex items-center gap-3 mb-4",
|
|
284
284
|
children: [
|
|
285
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ B("div", {
|
|
286
286
|
className: "relative flex-1 max-w-sm",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
288
|
-
placeholder:
|
|
289
|
-
value:
|
|
290
|
-
onChange: (e) =>
|
|
287
|
+
children: [/* @__PURE__ */ z(U, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ z(j, {
|
|
288
|
+
placeholder: n("forms.common.search"),
|
|
289
|
+
value: m ?? "",
|
|
290
|
+
onChange: (e) => h(e.target.value),
|
|
291
291
|
className: "pl-9"
|
|
292
292
|
})]
|
|
293
293
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ B("span", {
|
|
295
295
|
className: "text-sm text-muted-foreground whitespace-nowrap",
|
|
296
296
|
children: [
|
|
297
|
-
|
|
297
|
+
_.getFilteredRowModel().rows.length,
|
|
298
298
|
" ",
|
|
299
|
-
|
|
299
|
+
_.getFilteredRowModel().rows.length === 1 ? n("forms.common.item") : n("forms.common.items")
|
|
300
300
|
]
|
|
301
301
|
}),
|
|
302
|
-
|
|
302
|
+
i.length > 0 && /* @__PURE__ */ z("div", {
|
|
303
303
|
className: "ml-auto",
|
|
304
|
-
children: /* @__PURE__ */
|
|
304
|
+
children: /* @__PURE__ */ B(M, { children: [/* @__PURE__ */ z(P, {
|
|
305
305
|
asChild: !0,
|
|
306
|
-
children: /* @__PURE__ */
|
|
306
|
+
children: /* @__PURE__ */ B(T, {
|
|
307
307
|
variant: "outline",
|
|
308
308
|
size: "sm",
|
|
309
309
|
className: "gap-1.5",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ z(V, { className: "size-4" }), /* @__PURE__ */ z("span", {
|
|
311
311
|
className: "hidden sm:inline",
|
|
312
|
-
children:
|
|
312
|
+
children: n("forms.common.actions")
|
|
313
313
|
})]
|
|
314
314
|
})
|
|
315
|
-
}), /* @__PURE__ */
|
|
315
|
+
}), /* @__PURE__ */ z(E, {
|
|
316
316
|
align: "end",
|
|
317
|
-
children:
|
|
317
|
+
children: i.map((e) => /* @__PURE__ */ z(I.Fragment, { children: e.render() }, e.key))
|
|
318
318
|
})] })
|
|
319
319
|
})
|
|
320
320
|
]
|
|
321
321
|
}),
|
|
322
|
-
|
|
322
|
+
v.length > 0 ? /* @__PURE__ */ z("div", {
|
|
323
323
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",
|
|
324
|
-
children:
|
|
325
|
-
let t = e.getValue("name"),
|
|
324
|
+
children: v.map((e) => {
|
|
325
|
+
let t = e.getValue("name"), r = e.getValue("description"), i = e.getValue("url"), a = e.original.icon ?? void 0, u = Fe(t), d = Ie(t), f = /* @__PURE__ */ B(o, {
|
|
326
326
|
className: "relative overflow-hidden p-0 h-full transition-all duration-200 hover:shadow-lg hover:shadow-blue-500/10 hover:-translate-y-0.5 border-border/60 hover:border-blue-500/30 dark:hover:border-blue-400/30",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ z("div", { className: `h-1.5 bg-linear-to-r ${u} opacity-70 group-hover:opacity-100 transition-opacity` }), /* @__PURE__ */ B("div", {
|
|
328
328
|
className: "p-4 flex items-start gap-3",
|
|
329
329
|
children: [
|
|
330
|
-
|
|
330
|
+
s && c.length > 0 && /* @__PURE__ */ z("div", {
|
|
331
331
|
className: "flex items-center gap-1 shrink-0 mt-0.5",
|
|
332
|
-
children:
|
|
332
|
+
children: c.map((t) => /* @__PURE__ */ z("button", {
|
|
333
333
|
type: "button",
|
|
334
334
|
title: t.label,
|
|
335
335
|
onClick: () => t.onClick(e.original),
|
|
@@ -337,109 +337,109 @@ var Ie = [
|
|
|
337
337
|
children: t.icon
|
|
338
338
|
}, t.key))
|
|
339
339
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
className: `shrink-0 w-10 h-10 rounded-lg bg-linear-to-br ${
|
|
342
|
-
children: a ? /* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ z("div", {
|
|
341
|
+
className: `shrink-0 w-10 h-10 rounded-lg bg-linear-to-br ${u} flex items-center justify-center text-white text-sm font-semibold shadow-sm`,
|
|
342
|
+
children: a ? /* @__PURE__ */ z(Ae, {
|
|
343
343
|
icon: a,
|
|
344
344
|
className: "size-5"
|
|
345
|
-
}) :
|
|
345
|
+
}) : d
|
|
346
346
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ B("div", {
|
|
348
348
|
className: "flex-1 min-w-0",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ z("h3", {
|
|
350
350
|
className: "font-medium text-sm truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors",
|
|
351
351
|
children: t
|
|
352
|
-
}),
|
|
352
|
+
}), r ? /* @__PURE__ */ z("p", {
|
|
353
353
|
className: "text-xs text-muted-foreground mt-1 line-clamp-2 leading-relaxed",
|
|
354
|
-
children:
|
|
355
|
-
}) : /* @__PURE__ */
|
|
354
|
+
children: r
|
|
355
|
+
}) : /* @__PURE__ */ z("p", {
|
|
356
356
|
className: "text-xs text-muted-foreground/50 mt-1 italic",
|
|
357
|
-
children:
|
|
357
|
+
children: n("forms.common.noDescription")
|
|
358
358
|
})]
|
|
359
359
|
}),
|
|
360
|
-
|
|
360
|
+
s ? l.length > 0 && /* @__PURE__ */ z("div", {
|
|
361
361
|
className: "flex items-center gap-1 shrink-0 mt-0.5",
|
|
362
|
-
children:
|
|
362
|
+
children: l.map((t) => /* @__PURE__ */ z("button", {
|
|
363
363
|
type: "button",
|
|
364
364
|
title: t.label,
|
|
365
365
|
onClick: () => t.onClick(e.original),
|
|
366
366
|
className: "inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground hover:text-blue-600 hover:bg-blue-500/10 dark:hover:text-blue-400 dark:hover:bg-blue-400/10 transition-colors cursor-pointer",
|
|
367
367
|
children: t.icon
|
|
368
368
|
}, t.key))
|
|
369
|
-
}) : /* @__PURE__ */
|
|
369
|
+
}) : /* @__PURE__ */ z(xe, { className: "h-4 w-4 text-muted-foreground/40 group-hover:text-blue-500 transition-all group-hover:translate-x-0.5 mt-0.5 shrink-0" })
|
|
370
370
|
]
|
|
371
371
|
})]
|
|
372
372
|
});
|
|
373
|
-
return
|
|
373
|
+
return s ? /* @__PURE__ */ z("div", {
|
|
374
374
|
className: "group",
|
|
375
|
-
children:
|
|
376
|
-
}, e.id) : /* @__PURE__ */
|
|
375
|
+
children: f
|
|
376
|
+
}, e.id) : /* @__PURE__ */ z(K, {
|
|
377
377
|
to: i,
|
|
378
378
|
className: "group",
|
|
379
|
-
children:
|
|
379
|
+
children: f
|
|
380
380
|
}, e.id);
|
|
381
381
|
})
|
|
382
|
-
}) : /* @__PURE__ */
|
|
382
|
+
}) : /* @__PURE__ */ z(o, {
|
|
383
383
|
className: "p-8",
|
|
384
|
-
children: /* @__PURE__ */
|
|
384
|
+
children: /* @__PURE__ */ B("div", {
|
|
385
385
|
className: "text-center text-muted-foreground",
|
|
386
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ z(U, { className: "h-8 w-8 mx-auto mb-2 opacity-40" }), /* @__PURE__ */ z("p", {
|
|
387
387
|
className: "text-sm",
|
|
388
|
-
children:
|
|
388
|
+
children: n("forms.common.noResults")
|
|
389
389
|
})]
|
|
390
390
|
})
|
|
391
391
|
}),
|
|
392
|
-
|
|
392
|
+
_.getPageCount() > 1 && /* @__PURE__ */ B("div", {
|
|
393
393
|
className: "flex items-center justify-end space-x-2 mt-4",
|
|
394
394
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ B("div", {
|
|
396
396
|
className: "flex items-center space-x-2",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ z("p", {
|
|
398
398
|
className: "text-sm text-muted-foreground",
|
|
399
|
-
children:
|
|
400
|
-
}), /* @__PURE__ */
|
|
401
|
-
value: `${
|
|
402
|
-
onValueChange: (e) =>
|
|
403
|
-
children: [/* @__PURE__ */
|
|
399
|
+
children: n("forms.common.perPage")
|
|
400
|
+
}), /* @__PURE__ */ B(ee, {
|
|
401
|
+
value: `${_.getState().pagination.pageSize}`,
|
|
402
|
+
onValueChange: (e) => _.setPageSize(Number(e)),
|
|
403
|
+
children: [/* @__PURE__ */ z(ne, {
|
|
404
404
|
className: "h-8 w-17.5",
|
|
405
|
-
children: /* @__PURE__ */
|
|
406
|
-
}), /* @__PURE__ */
|
|
405
|
+
children: /* @__PURE__ */ z(fe, { placeholder: _.getState().pagination.pageSize })
|
|
406
|
+
}), /* @__PURE__ */ z(g, {
|
|
407
407
|
side: "top",
|
|
408
408
|
children: [
|
|
409
409
|
12,
|
|
410
410
|
24,
|
|
411
411
|
36,
|
|
412
412
|
48
|
|
413
|
-
].map((
|
|
414
|
-
value: `${
|
|
415
|
-
children:
|
|
416
|
-
},
|
|
413
|
+
].map((e) => /* @__PURE__ */ z(ae, {
|
|
414
|
+
value: `${e}`,
|
|
415
|
+
children: e
|
|
416
|
+
}, e))
|
|
417
417
|
})]
|
|
418
418
|
})]
|
|
419
419
|
}),
|
|
420
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ z("div", {
|
|
421
421
|
className: "flex w-25 items-center justify-center text-sm font-medium",
|
|
422
|
-
children:
|
|
423
|
-
index:
|
|
424
|
-
count:
|
|
422
|
+
children: n("forms.common.pageOf", {
|
|
423
|
+
index: _.getState().pagination.pageIndex + 1,
|
|
424
|
+
count: _.getPageCount()
|
|
425
425
|
})
|
|
426
426
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ B("div", {
|
|
428
428
|
className: "flex items-center space-x-2",
|
|
429
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ z(T, {
|
|
430
430
|
variant: "outline",
|
|
431
431
|
size: "sm",
|
|
432
|
-
onClick: () =>
|
|
433
|
-
disabled: !
|
|
432
|
+
onClick: () => _.previousPage(),
|
|
433
|
+
disabled: !_.getCanPreviousPage(),
|
|
434
434
|
className: "h-8 w-8 p-0",
|
|
435
|
-
children: /* @__PURE__ */
|
|
436
|
-
}), /* @__PURE__ */
|
|
435
|
+
children: /* @__PURE__ */ z("span", { children: "<" })
|
|
436
|
+
}), /* @__PURE__ */ z(T, {
|
|
437
437
|
variant: "outline",
|
|
438
438
|
size: "sm",
|
|
439
|
-
onClick: () =>
|
|
440
|
-
disabled: !
|
|
439
|
+
onClick: () => _.nextPage(),
|
|
440
|
+
disabled: !_.getCanNextPage(),
|
|
441
441
|
className: "h-8 w-8 p-0",
|
|
442
|
-
children: /* @__PURE__ */
|
|
442
|
+
children: /* @__PURE__ */ z("span", { children: ">" })
|
|
443
443
|
})]
|
|
444
444
|
})
|
|
445
445
|
]
|
|
@@ -447,53 +447,53 @@ var Ie = [
|
|
|
447
447
|
]
|
|
448
448
|
});
|
|
449
449
|
}, {
|
|
450
|
-
NewButton:
|
|
451
|
-
Action:
|
|
452
|
-
ItemAction:
|
|
453
|
-
}),
|
|
450
|
+
NewButton: je,
|
|
451
|
+
Action: Me,
|
|
452
|
+
ItemAction: Ne
|
|
453
|
+
}), ze = (e) => (e ?? 0).toLocaleString(), Be = (e, t, n, r, i) => e.map((e) => /* @__PURE__ */ B(v, { children: [/* @__PURE__ */ z(N, {
|
|
454
454
|
tooltip: e.title,
|
|
455
455
|
isActive: n.startsWith((t ?? "") + e.url),
|
|
456
456
|
asChild: !0,
|
|
457
|
-
children: /* @__PURE__ */
|
|
457
|
+
children: /* @__PURE__ */ B(K, {
|
|
458
458
|
to: (t ?? "") + e.url,
|
|
459
459
|
onClick: i,
|
|
460
|
-
children: [e.icon && /* @__PURE__ */
|
|
460
|
+
children: [e.icon && /* @__PURE__ */ z(e.icon, { className: "size-5!" }), /* @__PURE__ */ z("span", { children: e.title })]
|
|
461
461
|
})
|
|
462
|
-
}), !r && e.children && e.children.length > 0 && /* @__PURE__ */
|
|
462
|
+
}), !r && e.children && e.children.length > 0 && /* @__PURE__ */ z(F, {
|
|
463
463
|
className: "ml-4",
|
|
464
|
-
children:
|
|
465
|
-
})] }, e.title)),
|
|
466
|
-
let { t: d } =
|
|
467
|
-
return /* @__PURE__ */
|
|
464
|
+
children: Be(e.children, t, n, r, i)
|
|
465
|
+
})] }, e.title)), Ve = ({ icon: e, feature: t, name: n, urlBase: i, isNew: a, data: o, onDelete: s, onExport: c, open: l, setOpen: u }) => {
|
|
466
|
+
let { t: d } = G(), f = J().pathname, { state: p, isMobile: h, setOpenMobile: g } = m(), _ = p === "collapsed", y = h ? () => g(!1) : void 0;
|
|
467
|
+
return /* @__PURE__ */ B(ie, {
|
|
468
468
|
collapsible: "icon",
|
|
469
469
|
variant: "inset",
|
|
470
470
|
position: "absolute",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ z(ge, {
|
|
472
472
|
className: "pb-3",
|
|
473
|
-
children: /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ z(F, { children: /* @__PURE__ */ B(v, {
|
|
474
474
|
className: "flex items-center",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
475
|
+
children: [/* @__PURE__ */ z(N, {
|
|
476
476
|
asChild: !0,
|
|
477
477
|
className: "data-[slot=sidebar-menu-button]:p-1.5!",
|
|
478
|
-
children: /* @__PURE__ */
|
|
478
|
+
children: /* @__PURE__ */ B(K, {
|
|
479
479
|
to: i ?? "#",
|
|
480
480
|
className: "flex items-center gap-2.5",
|
|
481
|
-
children: [/* @__PURE__ */
|
|
481
|
+
children: [/* @__PURE__ */ z("div", {
|
|
482
482
|
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10",
|
|
483
|
-
children: /* @__PURE__ */
|
|
484
|
-
}), !
|
|
483
|
+
children: /* @__PURE__ */ z(e, { className: "size-5! text-blue-600 dark:text-blue-400" })
|
|
484
|
+
}), !_ && /* @__PURE__ */ z("span", {
|
|
485
485
|
className: "text-sm font-semibold whitespace-nowrap truncate",
|
|
486
486
|
children: a ? d("sidebar.new", { feature: t }) : n
|
|
487
487
|
})]
|
|
488
488
|
})
|
|
489
|
-
}), !
|
|
489
|
+
}), !_ && /* @__PURE__ */ B("div", {
|
|
490
490
|
className: "flex items-center gap-1 mr-auto",
|
|
491
|
-
children: [!a && c && /* @__PURE__ */
|
|
491
|
+
children: [!a && c && /* @__PURE__ */ z(T, {
|
|
492
492
|
variant: "ghost",
|
|
493
493
|
size: "icon-sm",
|
|
494
494
|
onClick: c,
|
|
495
|
-
children: /* @__PURE__ */
|
|
496
|
-
}), !a && s && u && /* @__PURE__ */
|
|
495
|
+
children: /* @__PURE__ */ z(Se, { className: "size-5!" })
|
|
496
|
+
}), !a && s && u && /* @__PURE__ */ z(Q, {
|
|
497
497
|
feature: t,
|
|
498
498
|
name: n,
|
|
499
499
|
onDelete: s,
|
|
@@ -502,344 +502,344 @@ var Ie = [
|
|
|
502
502
|
})]
|
|
503
503
|
})]
|
|
504
504
|
}) })
|
|
505
|
-
}), /* @__PURE__ */
|
|
505
|
+
}), /* @__PURE__ */ B(oe, { children: [o?.counts && o.counts.length > 0 && /* @__PURE__ */ B(k, { children: [/* @__PURE__ */ z(w, { children: d("sidebar.indexing") }), /* @__PURE__ */ z(D, {
|
|
506
506
|
className: "flex flex-col gap-2 pt-4",
|
|
507
|
-
children: /* @__PURE__ */
|
|
508
|
-
tooltip: e.title + ": " +
|
|
507
|
+
children: /* @__PURE__ */ z(F, { children: o.counts.map((e) => /* @__PURE__ */ B(v, { children: [/* @__PURE__ */ B(N, {
|
|
508
|
+
tooltip: e.title + ": " + ze(e.count),
|
|
509
509
|
variant: "outline",
|
|
510
|
-
children: [e.icon && /* @__PURE__ */
|
|
511
|
-
}), !
|
|
512
|
-
})] }), /* @__PURE__ */
|
|
510
|
+
children: [e.icon && /* @__PURE__ */ z(e.icon, { className: "size-5!" }), /* @__PURE__ */ z("span", { children: e.title })]
|
|
511
|
+
}), !_ && /* @__PURE__ */ z(r, { children: ze(e.count) })] }, e.title)) })
|
|
512
|
+
})] }), /* @__PURE__ */ B(k, { children: [/* @__PURE__ */ z(w, { children: t }), /* @__PURE__ */ z(D, {
|
|
513
513
|
className: "flex flex-col gap-2",
|
|
514
|
-
children: /* @__PURE__ */
|
|
514
|
+
children: /* @__PURE__ */ z(F, { children: o?.navMain && Be(a ? o.navMain.filter((e) => e.url === "/detail") : o.navMain, i, f, _, y) })
|
|
515
515
|
})] })] })]
|
|
516
516
|
});
|
|
517
|
-
},
|
|
518
|
-
let { t:
|
|
519
|
-
return t ? /* @__PURE__ */
|
|
517
|
+
}, He = ({ checkIsNotUndefined: e, error: t, tryAgainUrl: n, children: r }) => {
|
|
518
|
+
let { t: i } = G();
|
|
519
|
+
return t ? /* @__PURE__ */ z(Z, {
|
|
520
520
|
icon: ye,
|
|
521
|
-
title:
|
|
521
|
+
title: i("common.errorLoading"),
|
|
522
522
|
description: t,
|
|
523
|
-
buttonText:
|
|
524
|
-
urlNew:
|
|
525
|
-
}) : e === void 0 && !t ? /* @__PURE__ */
|
|
523
|
+
buttonText: i("common.tryAgain"),
|
|
524
|
+
urlNew: n
|
|
525
|
+
}) : e === void 0 && !t ? /* @__PURE__ */ B("div", {
|
|
526
526
|
className: "space-y-6 py-8 px-6 animate-pulse",
|
|
527
527
|
children: [
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ z(b, { className: "h-8 w-1/3 rounded-md" }),
|
|
529
|
+
/* @__PURE__ */ z("div", {
|
|
530
530
|
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",
|
|
531
531
|
children: [
|
|
532
532
|
"skeleton-1",
|
|
533
533
|
"skeleton-2",
|
|
534
534
|
"skeleton-3"
|
|
535
|
-
].map((e) => /* @__PURE__ */
|
|
535
|
+
].map((e) => /* @__PURE__ */ B("div", {
|
|
536
536
|
className: "space-y-3 p-4 border rounded-xl bg-slate-50/50 dark:bg-slate-900/20",
|
|
537
537
|
children: [
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ z(b, { className: "h-5 w-2/3" }),
|
|
539
|
+
/* @__PURE__ */ z(b, { className: "h-12 w-full" }),
|
|
540
|
+
/* @__PURE__ */ z(b, { className: "h-4 w-5/6" })
|
|
541
541
|
]
|
|
542
542
|
}, e))
|
|
543
543
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ z("div", {
|
|
545
545
|
className: "pt-4",
|
|
546
|
-
children: /* @__PURE__ */
|
|
546
|
+
children: /* @__PURE__ */ z(b, { className: "h-10 w-32 rounded-lg" })
|
|
547
547
|
})
|
|
548
548
|
]
|
|
549
|
-
}) : /* @__PURE__ */ R
|
|
549
|
+
}) : /* @__PURE__ */ z(R, { children: r });
|
|
550
550
|
};
|
|
551
551
|
//#endregion
|
|
552
552
|
//#region src/components/router/nav-main.tsx
|
|
553
|
-
function
|
|
554
|
-
let t =
|
|
555
|
-
return /* @__PURE__ */ R
|
|
553
|
+
function Ue({ groups: e }) {
|
|
554
|
+
let t = J().pathname, { isMobile: n, setOpenMobile: r } = m();
|
|
555
|
+
return /* @__PURE__ */ z(R, { children: e.map((e) => /* @__PURE__ */ B(k, { children: [e.label && /* @__PURE__ */ z(w, { children: e.label }), /* @__PURE__ */ z(D, {
|
|
556
556
|
className: "flex flex-col gap-2",
|
|
557
|
-
children: /* @__PURE__ */
|
|
557
|
+
children: /* @__PURE__ */ z(F, { children: e.items.map((e) => /* @__PURE__ */ z(v, { children: /* @__PURE__ */ z(N, {
|
|
558
558
|
tooltip: e.title,
|
|
559
559
|
isActive: t.startsWith(e.url),
|
|
560
560
|
asChild: !0,
|
|
561
|
-
children: /* @__PURE__ */
|
|
561
|
+
children: /* @__PURE__ */ B(K, {
|
|
562
562
|
to: e.url,
|
|
563
563
|
onClick: () => n && r(!1),
|
|
564
|
-
children: [e.icon && /* @__PURE__ */
|
|
564
|
+
children: [e.icon && /* @__PURE__ */ z(e.icon, { className: "size-6!" }), /* @__PURE__ */ z("span", { children: e.title })]
|
|
565
565
|
})
|
|
566
566
|
}) }, e.title)) })
|
|
567
567
|
})] }, e.label ?? "_ungrouped")) });
|
|
568
568
|
}
|
|
569
569
|
//#endregion
|
|
570
570
|
//#region src/components/router/nav-user.tsx
|
|
571
|
-
function
|
|
572
|
-
let { t: a } =
|
|
573
|
-
|
|
574
|
-
}, c =
|
|
575
|
-
let
|
|
576
|
-
if (!
|
|
577
|
-
let r = `${
|
|
571
|
+
function We({ user: t, accountUrl: n, logoutUrl: r, onLogout: i }) {
|
|
572
|
+
let { t: a } = G(), { isMobile: o } = m(), s = () => {
|
|
573
|
+
i ? i() : r && (globalThis.location.href = r);
|
|
574
|
+
}, c = I.useMemo(() => {
|
|
575
|
+
let e = t.firstName || "", n = t.lastName || "";
|
|
576
|
+
if (!e && !n) return " ";
|
|
577
|
+
let r = `${e} ${n}`.trim().split(" ").filter(Boolean);
|
|
578
578
|
return r.length === 1 ? r[0].charAt(0).toUpperCase() : r[0].charAt(0).toUpperCase() + (r.at(-1)?.charAt(0).toUpperCase() ?? "");
|
|
579
|
-
}, [
|
|
580
|
-
return /* @__PURE__ */
|
|
579
|
+
}, [t]), l = t?.avatarUrl || "";
|
|
580
|
+
return /* @__PURE__ */ z(F, { children: /* @__PURE__ */ z(v, { children: /* @__PURE__ */ B(M, { children: [/* @__PURE__ */ z(P, {
|
|
581
581
|
asChild: !0,
|
|
582
|
-
children: /* @__PURE__ */
|
|
582
|
+
children: /* @__PURE__ */ B(N, {
|
|
583
583
|
size: "lg",
|
|
584
584
|
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
585
585
|
children: [
|
|
586
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ B(C, {
|
|
587
587
|
className: "h-8 w-8 rounded-lg",
|
|
588
|
-
children: [l && /* @__PURE__ */
|
|
588
|
+
children: [l && /* @__PURE__ */ z(e, {
|
|
589
589
|
src: l,
|
|
590
|
-
alt:
|
|
591
|
-
}), /* @__PURE__ */
|
|
590
|
+
alt: t.username
|
|
591
|
+
}), /* @__PURE__ */ z(_, {
|
|
592
592
|
className: "rounded-lg",
|
|
593
593
|
children: c
|
|
594
594
|
})]
|
|
595
595
|
}),
|
|
596
|
-
/* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ B("div", {
|
|
597
597
|
className: "grid flex-1 text-left text-sm leading-tight",
|
|
598
|
-
children: [/* @__PURE__ */
|
|
598
|
+
children: [/* @__PURE__ */ B("span", {
|
|
599
599
|
className: "truncate font-medium",
|
|
600
600
|
children: [
|
|
601
|
-
|
|
601
|
+
t.firstName,
|
|
602
602
|
" ",
|
|
603
|
-
|
|
603
|
+
t.lastName
|
|
604
604
|
]
|
|
605
|
-
}), /* @__PURE__ */
|
|
605
|
+
}), /* @__PURE__ */ z("span", {
|
|
606
606
|
className: "text-muted-foreground truncate text-xs",
|
|
607
|
-
children:
|
|
607
|
+
children: t.email
|
|
608
608
|
})]
|
|
609
609
|
}),
|
|
610
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ z(V, { className: "ml-auto size-4" })
|
|
611
611
|
]
|
|
612
612
|
})
|
|
613
|
-
}), /* @__PURE__ */
|
|
613
|
+
}), /* @__PURE__ */ B(E, {
|
|
614
614
|
className: "w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",
|
|
615
615
|
side: o ? "bottom" : "right",
|
|
616
616
|
align: "end",
|
|
617
617
|
sideOffset: 4,
|
|
618
618
|
children: [
|
|
619
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ z(se, {
|
|
620
620
|
className: "p-0 font-normal",
|
|
621
|
-
children: /* @__PURE__ */
|
|
621
|
+
children: /* @__PURE__ */ B("div", {
|
|
622
622
|
className: "flex items-center gap-2 px-1 py-1.5 text-left text-sm",
|
|
623
|
-
children: [/* @__PURE__ */
|
|
623
|
+
children: [/* @__PURE__ */ B(C, {
|
|
624
624
|
className: "h-8 w-8 rounded-lg",
|
|
625
|
-
children: [l && /* @__PURE__ */
|
|
625
|
+
children: [l && /* @__PURE__ */ z(e, {
|
|
626
626
|
src: l,
|
|
627
|
-
alt:
|
|
628
|
-
}), /* @__PURE__ */
|
|
627
|
+
alt: t.username
|
|
628
|
+
}), /* @__PURE__ */ z(_, {
|
|
629
629
|
className: "rounded-lg",
|
|
630
630
|
children: c
|
|
631
631
|
})]
|
|
632
|
-
}), /* @__PURE__ */
|
|
632
|
+
}), /* @__PURE__ */ B("div", {
|
|
633
633
|
className: "grid flex-1 text-left text-sm leading-tight",
|
|
634
|
-
children: [/* @__PURE__ */
|
|
634
|
+
children: [/* @__PURE__ */ B("span", {
|
|
635
635
|
className: "truncate font-medium",
|
|
636
636
|
children: [
|
|
637
|
-
|
|
637
|
+
t.firstName,
|
|
638
638
|
" ",
|
|
639
|
-
|
|
639
|
+
t.lastName
|
|
640
640
|
]
|
|
641
|
-
}), /* @__PURE__ */
|
|
641
|
+
}), /* @__PURE__ */ z("span", {
|
|
642
642
|
className: "text-muted-foreground truncate text-xs",
|
|
643
|
-
children:
|
|
643
|
+
children: t.email
|
|
644
644
|
})]
|
|
645
645
|
})]
|
|
646
646
|
})
|
|
647
647
|
}),
|
|
648
|
-
/* @__PURE__ */
|
|
649
|
-
|
|
650
|
-
to:
|
|
648
|
+
/* @__PURE__ */ z(_e, {}),
|
|
649
|
+
n && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(pe, { children: /* @__PURE__ */ z(K, {
|
|
650
|
+
to: n,
|
|
651
651
|
className: "w-full",
|
|
652
|
-
children: /* @__PURE__ */
|
|
653
|
-
}) }), /* @__PURE__ */
|
|
654
|
-
/* @__PURE__ */
|
|
652
|
+
children: /* @__PURE__ */ B(A, { children: [/* @__PURE__ */ z(we, {}), a("nav.account")] })
|
|
653
|
+
}) }), /* @__PURE__ */ z(_e, {})] }),
|
|
654
|
+
/* @__PURE__ */ B(A, {
|
|
655
655
|
onClick: s,
|
|
656
656
|
className: "cursor-pointer",
|
|
657
|
-
children: [/* @__PURE__ */
|
|
657
|
+
children: [/* @__PURE__ */ z(Ce, {}), /* @__PURE__ */ z("span", { children: a("nav.logOut") })]
|
|
658
658
|
})
|
|
659
659
|
]
|
|
660
660
|
})] }) }) });
|
|
661
661
|
}
|
|
662
662
|
//#endregion
|
|
663
663
|
//#region src/components/router/page-content.tsx
|
|
664
|
-
var $ = () => /* @__PURE__ */
|
|
664
|
+
var $ = () => /* @__PURE__ */ z("div", {
|
|
665
665
|
className: "flex flex-1 flex-col",
|
|
666
|
-
children: /* @__PURE__ */
|
|
666
|
+
children: /* @__PURE__ */ z("div", {
|
|
667
667
|
className: "@container/main flex flex-1 flex-col gap-2",
|
|
668
|
-
children: /* @__PURE__ */
|
|
668
|
+
children: /* @__PURE__ */ z("div", {
|
|
669
669
|
className: "flex flex-col gap-2 px-1 py-1 md:gap-3 md:px-2 md:py-2",
|
|
670
|
-
children: /* @__PURE__ */
|
|
670
|
+
children: /* @__PURE__ */ z(q, {})
|
|
671
671
|
})
|
|
672
672
|
})
|
|
673
|
-
}),
|
|
674
|
-
let { items: i } =
|
|
675
|
-
return /* @__PURE__ */
|
|
673
|
+
}), Ge = ({ icon: e, title: t, urlBase: n, children: r }) => {
|
|
674
|
+
let { items: i } = de(), a = Y(), { t: o } = G(), f = i.length > 0 ? i[i.length - 1] : null, p = i.length > 1 ? i[i.length - 2] : null;
|
|
675
|
+
return /* @__PURE__ */ z("header", {
|
|
676
676
|
className: "flex h-(--header-height) shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)",
|
|
677
|
-
children: /* @__PURE__ */
|
|
677
|
+
children: /* @__PURE__ */ B("div", {
|
|
678
678
|
className: "flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6",
|
|
679
679
|
children: [
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */
|
|
680
|
+
/* @__PURE__ */ z(d, { className: "-ml-1 hidden md:flex" }),
|
|
681
|
+
/* @__PURE__ */ z(S, {
|
|
682
682
|
orientation: "vertical",
|
|
683
683
|
className: "mx-2 data-[orientation=vertical]:h-4 hidden md:block"
|
|
684
684
|
}),
|
|
685
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ B("div", {
|
|
686
686
|
className: "hidden md:flex items-center gap-1",
|
|
687
|
-
children: [e && /* @__PURE__ */
|
|
687
|
+
children: [e && /* @__PURE__ */ z("div", {
|
|
688
688
|
className: "flex h-8 w-8 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10 mr-1",
|
|
689
|
-
children: /* @__PURE__ */
|
|
690
|
-
}), n ? /* @__PURE__ */
|
|
689
|
+
children: /* @__PURE__ */ z(e, { className: "size-4.5! text-blue-600 dark:text-blue-400" })
|
|
690
|
+
}), n ? /* @__PURE__ */ z(c, { children: /* @__PURE__ */ z(u, { children: i.map((e, t) => /* @__PURE__ */ B(I.Fragment, { children: [t > 0 && /* @__PURE__ */ z(l, {}), /* @__PURE__ */ z(x, { children: e.href ? /* @__PURE__ */ z(s, {
|
|
691
691
|
asChild: !0,
|
|
692
|
-
children: /* @__PURE__ */
|
|
692
|
+
children: /* @__PURE__ */ z(K, {
|
|
693
693
|
to: e.href,
|
|
694
694
|
children: e.label
|
|
695
695
|
})
|
|
696
|
-
}) : /* @__PURE__ */
|
|
696
|
+
}) : /* @__PURE__ */ z(me, { children: e.label }) })] }, e.label)) }) }) : /* @__PURE__ */ z("h1", {
|
|
697
697
|
className: "text-base font-semibold",
|
|
698
698
|
children: t
|
|
699
699
|
})]
|
|
700
700
|
}),
|
|
701
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ B("div", {
|
|
702
702
|
className: "flex md:hidden items-center gap-2 min-w-0 flex-1",
|
|
703
703
|
children: [
|
|
704
|
-
|
|
704
|
+
p?.href && /* @__PURE__ */ z("button", {
|
|
705
705
|
type: "button",
|
|
706
706
|
title: o("common.goBack"),
|
|
707
|
-
onClick: () => a(
|
|
707
|
+
onClick: () => a(p.href),
|
|
708
708
|
className: "shrink-0 flex items-center justify-center size-8 rounded-lg hover:bg-muted transition-colors",
|
|
709
|
-
children: /* @__PURE__ */
|
|
709
|
+
children: /* @__PURE__ */ z(be, { className: "size-4" })
|
|
710
710
|
}),
|
|
711
|
-
e && /* @__PURE__ */
|
|
711
|
+
e && /* @__PURE__ */ z("div", {
|
|
712
712
|
className: "flex shrink-0 h-7 w-7 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10",
|
|
713
|
-
children: /* @__PURE__ */
|
|
713
|
+
children: /* @__PURE__ */ z(e, { className: "size-3.5! text-blue-600 dark:text-blue-400" })
|
|
714
714
|
}),
|
|
715
|
-
/* @__PURE__ */
|
|
715
|
+
/* @__PURE__ */ z("span", {
|
|
716
716
|
className: "text-sm font-semibold truncate",
|
|
717
|
-
children:
|
|
717
|
+
children: f?.label ?? t
|
|
718
718
|
})
|
|
719
719
|
]
|
|
720
720
|
}),
|
|
721
|
-
/* @__PURE__ */
|
|
721
|
+
/* @__PURE__ */ B("div", {
|
|
722
722
|
className: "ml-auto flex items-center gap-2",
|
|
723
723
|
children: [
|
|
724
|
-
r && /* @__PURE__ */
|
|
724
|
+
r && /* @__PURE__ */ z("div", {
|
|
725
725
|
className: "hidden md:flex items-center",
|
|
726
726
|
children: r
|
|
727
727
|
}),
|
|
728
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ z("div", {
|
|
729
729
|
className: "hidden md:block",
|
|
730
|
-
children: /* @__PURE__ */
|
|
730
|
+
children: /* @__PURE__ */ z(ce, {})
|
|
731
731
|
}),
|
|
732
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ z(d, { className: "md:hidden" })
|
|
733
733
|
]
|
|
734
734
|
})
|
|
735
735
|
]
|
|
736
736
|
})
|
|
737
737
|
});
|
|
738
|
-
},
|
|
738
|
+
}, Ke = ({ icon: e, title: t, urlBase: n }) => /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(Ge, {
|
|
739
739
|
icon: e,
|
|
740
740
|
title: t,
|
|
741
741
|
urlBase: n
|
|
742
|
-
}), /* @__PURE__ */
|
|
743
|
-
let
|
|
742
|
+
}), /* @__PURE__ */ z($, {})] }), qe = ({ icon: e, feature: t, description: n, urlBase: r }) => {
|
|
743
|
+
let i = a(), o = i?.isMobile ?? !1, s = i?.toggleSidebar ?? (() => {}), c = /* @__PURE__ */ B("div", {
|
|
744
744
|
className: "flex items-center gap-3",
|
|
745
|
-
children: [/* @__PURE__ */
|
|
746
|
-
className: `flex h-9 w-9 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10 ${
|
|
747
|
-
onClick:
|
|
748
|
-
onKeyDown:
|
|
749
|
-
(e.key === "Enter" || e.key === " ") &&
|
|
745
|
+
children: [/* @__PURE__ */ z("div", {
|
|
746
|
+
className: `flex h-9 w-9 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10 ${o ? "cursor-pointer active:scale-95 transition-transform" : ""}`,
|
|
747
|
+
onClick: o ? s : void 0,
|
|
748
|
+
onKeyDown: o ? (e) => {
|
|
749
|
+
(e.key === "Enter" || e.key === " ") && s();
|
|
750
750
|
} : void 0,
|
|
751
|
-
tabIndex:
|
|
752
|
-
role:
|
|
753
|
-
title:
|
|
754
|
-
children: /* @__PURE__ */
|
|
755
|
-
}), /* @__PURE__ */
|
|
751
|
+
tabIndex: o ? 0 : void 0,
|
|
752
|
+
role: o ? "button" : void 0,
|
|
753
|
+
title: o ? "Open navigation" : void 0,
|
|
754
|
+
children: /* @__PURE__ */ z(e, { className: "size-5! text-blue-600 dark:text-blue-400" })
|
|
755
|
+
}), /* @__PURE__ */ B("div", {
|
|
756
756
|
className: "min-w-0",
|
|
757
|
-
children: [/* @__PURE__ */
|
|
757
|
+
children: [/* @__PURE__ */ z("h1", {
|
|
758
758
|
className: "text-base font-semibold leading-tight text-foreground truncate",
|
|
759
759
|
children: t
|
|
760
|
-
}), /* @__PURE__ */
|
|
760
|
+
}), /* @__PURE__ */ z("p", {
|
|
761
761
|
className: "hidden md:block text-xs text-muted-foreground leading-relaxed mt-0.5 truncate",
|
|
762
762
|
children: n
|
|
763
763
|
})]
|
|
764
764
|
})]
|
|
765
765
|
});
|
|
766
|
-
return r && !
|
|
766
|
+
return r && !o ? /* @__PURE__ */ z("div", {
|
|
767
767
|
className: "min-w-0 flex-1",
|
|
768
|
-
children: /* @__PURE__ */
|
|
768
|
+
children: /* @__PURE__ */ z(K, {
|
|
769
769
|
to: r,
|
|
770
770
|
className: "group inline-flex max-w-full",
|
|
771
|
-
children:
|
|
771
|
+
children: c
|
|
772
772
|
})
|
|
773
|
-
}) : /* @__PURE__ */
|
|
773
|
+
}) : /* @__PURE__ */ z("div", {
|
|
774
774
|
className: "min-w-0 flex-1",
|
|
775
|
-
children:
|
|
775
|
+
children: c
|
|
776
776
|
});
|
|
777
777
|
};
|
|
778
|
-
|
|
779
|
-
var
|
|
780
|
-
|
|
781
|
-
var
|
|
782
|
-
let n =
|
|
783
|
-
|
|
784
|
-
|
|
778
|
+
qe.displayName = "StickyPageHeaderTitle";
|
|
779
|
+
var Je = () => null;
|
|
780
|
+
Je.displayName = "StickyPageHeaderAction";
|
|
781
|
+
var Ye = ({ children: e, menuLabel: t }) => {
|
|
782
|
+
let n = Y(), { t: r } = G(), i = [], a = [];
|
|
783
|
+
I.Children.forEach(e, (e) => {
|
|
784
|
+
I.isValidElement(e) && e.type?.displayName === "StickyPageHeaderAction" ? i.push(e.props) : a.push(e);
|
|
785
785
|
});
|
|
786
|
-
let
|
|
787
|
-
return /* @__PURE__ */
|
|
786
|
+
let o = t ?? r("common.actions");
|
|
787
|
+
return /* @__PURE__ */ B("div", {
|
|
788
788
|
className: "flex items-center gap-2 shrink-0",
|
|
789
|
-
children: [
|
|
789
|
+
children: [a, i.length > 0 && /* @__PURE__ */ B(M, { children: [/* @__PURE__ */ z(P, {
|
|
790
790
|
asChild: !0,
|
|
791
|
-
children: t ? /* @__PURE__ */
|
|
791
|
+
children: t ? /* @__PURE__ */ B(T, {
|
|
792
792
|
variant: "outline",
|
|
793
793
|
size: "sm",
|
|
794
794
|
className: "gap-1.5",
|
|
795
|
-
children: [/* @__PURE__ */
|
|
795
|
+
children: [/* @__PURE__ */ z(V, { className: "size-4" }), /* @__PURE__ */ z("span", {
|
|
796
796
|
className: "hidden sm:inline",
|
|
797
797
|
children: t
|
|
798
798
|
})]
|
|
799
|
-
}) : /* @__PURE__ */
|
|
799
|
+
}) : /* @__PURE__ */ z(T, {
|
|
800
800
|
variant: "ghost",
|
|
801
801
|
size: "icon-sm",
|
|
802
|
-
"aria-label":
|
|
803
|
-
title:
|
|
804
|
-
children: /* @__PURE__ */
|
|
802
|
+
"aria-label": o,
|
|
803
|
+
title: o,
|
|
804
|
+
children: /* @__PURE__ */ z(V, { className: "size-5!" })
|
|
805
805
|
})
|
|
806
|
-
}), /* @__PURE__ */
|
|
806
|
+
}), /* @__PURE__ */ z(E, {
|
|
807
807
|
align: "end",
|
|
808
|
-
children:
|
|
809
|
-
let t = e.icon ??
|
|
810
|
-
return /* @__PURE__ */
|
|
808
|
+
children: i.map((e) => {
|
|
809
|
+
let t = e.icon ?? H;
|
|
810
|
+
return /* @__PURE__ */ B(A, {
|
|
811
811
|
disabled: e.disabled,
|
|
812
812
|
onClick: () => {
|
|
813
813
|
e.href && n(e.href), e.onClick && e.onClick();
|
|
814
814
|
},
|
|
815
|
-
children: [/* @__PURE__ */
|
|
815
|
+
children: [/* @__PURE__ */ z(t, { className: "size-4 mr-2" }), e.label]
|
|
816
816
|
}, e.label);
|
|
817
817
|
})
|
|
818
818
|
})] })]
|
|
819
819
|
});
|
|
820
820
|
};
|
|
821
|
-
|
|
822
|
-
var
|
|
821
|
+
Ye.displayName = "StickyPageHeaderActions";
|
|
822
|
+
var Xe = Object.assign(({ children: e }) => /* @__PURE__ */ z("header", {
|
|
823
823
|
className: "sticky top-0 z-10 -mx-4 lg:-mx-6 mb-5 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",
|
|
824
|
-
children: /* @__PURE__ */
|
|
824
|
+
children: /* @__PURE__ */ B("div", {
|
|
825
825
|
className: "flex w-full items-center gap-3 px-4 lg:px-6 py-3",
|
|
826
|
-
children: [/* @__PURE__ */
|
|
826
|
+
children: [/* @__PURE__ */ B("div", {
|
|
827
827
|
className: "hidden md:flex items-center gap-1",
|
|
828
|
-
children: [/* @__PURE__ */
|
|
828
|
+
children: [/* @__PURE__ */ z(d, { className: "-ml-1" }), /* @__PURE__ */ z(S, {
|
|
829
829
|
orientation: "vertical",
|
|
830
830
|
className: "mx-2 data-[orientation=vertical]:h-4"
|
|
831
831
|
})]
|
|
832
832
|
}), e]
|
|
833
833
|
})
|
|
834
834
|
}), {
|
|
835
|
-
Title:
|
|
836
|
-
Actions:
|
|
837
|
-
Action:
|
|
838
|
-
}),
|
|
835
|
+
Title: qe,
|
|
836
|
+
Actions: Ye,
|
|
837
|
+
Action: Je
|
|
838
|
+
}), Ze = (e) => /* @__PURE__ */ z("div", {
|
|
839
839
|
className: "w-full px-1 md:px-6 lg:px-8 py-1 md:py-4 min-h-[calc(100svh-10.5rem)]",
|
|
840
|
-
children: /* @__PURE__ */
|
|
840
|
+
children: /* @__PURE__ */ z("div", {
|
|
841
841
|
className: "flex min-h-full w-full md:rounded-xl md:border md:bg-sidebar md:shadow-sm",
|
|
842
|
-
children: /* @__PURE__ */
|
|
842
|
+
children: /* @__PURE__ */ B(t, {
|
|
843
843
|
defaultOpen: !0,
|
|
844
844
|
className: "min-h-0!",
|
|
845
845
|
style: {
|
|
@@ -847,90 +847,90 @@ var Ye = Object.assign(({ children: e }) => /* @__PURE__ */ R("header", {
|
|
|
847
847
|
"--header-height": "calc(var(--spacing) * 12)",
|
|
848
848
|
minHeight: 0
|
|
849
849
|
},
|
|
850
|
-
children: [/* @__PURE__ */
|
|
850
|
+
children: [/* @__PURE__ */ z(Ve, { ...e }), /* @__PURE__ */ z(re, {
|
|
851
851
|
className: "md:mr-1.5 md:my-1.5 md:rounded-xl md:border bg-background md:shadow-sm",
|
|
852
|
-
children: /* @__PURE__ */
|
|
852
|
+
children: /* @__PURE__ */ z("main", {
|
|
853
853
|
className: "flex flex-1 flex-col pt-2 md:pt-4 max-md:[&_.px-6]:px-2",
|
|
854
|
-
children: /* @__PURE__ */
|
|
854
|
+
children: /* @__PURE__ */ z(q, {})
|
|
855
855
|
})
|
|
856
856
|
})]
|
|
857
857
|
})
|
|
858
858
|
})
|
|
859
|
-
}),
|
|
860
|
-
|
|
861
|
-
var
|
|
862
|
-
let
|
|
863
|
-
|
|
864
|
-
|
|
859
|
+
}), Qe = () => null;
|
|
860
|
+
Qe.displayName = "SubPageHeaderAction";
|
|
861
|
+
var $e = Object.assign(({ icon: e, feature: t, name: n, description: r, urlBase: i, onDelete: o, open: s, setOpen: c, children: l }) => {
|
|
862
|
+
let u = a(), f = u?.isMobile ?? !1, p = u?.toggleSidebar ?? (() => {}), m = Y(), h = [];
|
|
863
|
+
I.Children.forEach(l, (e) => {
|
|
864
|
+
I.isValidElement(e) && e.type?.displayName === "SubPageHeaderAction" && h.push(e.props);
|
|
865
865
|
});
|
|
866
|
-
let g = /* @__PURE__ */
|
|
866
|
+
let g = /* @__PURE__ */ B("div", {
|
|
867
867
|
className: "flex items-center gap-3",
|
|
868
|
-
children: [e && /* @__PURE__ */
|
|
869
|
-
className: `flex h-9 w-9 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10 ${
|
|
870
|
-
onClick:
|
|
871
|
-
onKeyDown:
|
|
872
|
-
(e.key === "Enter" || e.key === " ") &&
|
|
868
|
+
children: [e && /* @__PURE__ */ z("div", {
|
|
869
|
+
className: `flex h-9 w-9 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10 ${f ? "cursor-pointer active:scale-95 transition-transform" : ""}`,
|
|
870
|
+
onClick: f ? p : void 0,
|
|
871
|
+
onKeyDown: f ? (e) => {
|
|
872
|
+
(e.key === "Enter" || e.key === " ") && p();
|
|
873
873
|
} : void 0,
|
|
874
|
-
tabIndex:
|
|
875
|
-
title:
|
|
876
|
-
children: /* @__PURE__ */
|
|
877
|
-
}), /* @__PURE__ */
|
|
874
|
+
tabIndex: f ? 0 : void 0,
|
|
875
|
+
title: f ? "Open navigation" : void 0,
|
|
876
|
+
children: /* @__PURE__ */ z(e, { className: "size-5! text-blue-600 dark:text-blue-400" })
|
|
877
|
+
}), /* @__PURE__ */ B("div", {
|
|
878
878
|
className: "min-w-0",
|
|
879
|
-
children: [/* @__PURE__ */
|
|
879
|
+
children: [/* @__PURE__ */ z("h1", {
|
|
880
880
|
className: "text-base font-semibold leading-tight text-foreground",
|
|
881
881
|
children: t
|
|
882
|
-
}), /* @__PURE__ */
|
|
882
|
+
}), /* @__PURE__ */ z("p", {
|
|
883
883
|
className: "hidden md:block text-xs text-muted-foreground leading-relaxed mt-0.5",
|
|
884
884
|
children: r
|
|
885
885
|
})]
|
|
886
886
|
})]
|
|
887
887
|
});
|
|
888
|
-
return /* @__PURE__ */
|
|
888
|
+
return /* @__PURE__ */ B("header", {
|
|
889
889
|
className: "mb-5",
|
|
890
|
-
children: [/* @__PURE__ */
|
|
890
|
+
children: [/* @__PURE__ */ B("div", {
|
|
891
891
|
className: "flex w-full items-center gap-3 px-4 lg:px-6",
|
|
892
892
|
children: [
|
|
893
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ B("div", {
|
|
894
894
|
className: "hidden md:flex items-center gap-1",
|
|
895
|
-
children: [/* @__PURE__ */
|
|
895
|
+
children: [/* @__PURE__ */ z(d, { className: "-ml-1" }), /* @__PURE__ */ z(S, {
|
|
896
896
|
orientation: "vertical",
|
|
897
897
|
className: "mx-2 data-[orientation=vertical]:h-4"
|
|
898
898
|
})]
|
|
899
899
|
}),
|
|
900
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ z("div", {
|
|
901
901
|
className: "min-w-0 flex-1",
|
|
902
|
-
children:
|
|
903
|
-
to:
|
|
902
|
+
children: i && !f ? /* @__PURE__ */ z(K, {
|
|
903
|
+
to: i,
|
|
904
904
|
className: "group inline-flex",
|
|
905
905
|
children: g
|
|
906
906
|
}) : g
|
|
907
907
|
}),
|
|
908
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ B("div", {
|
|
909
909
|
className: "flex items-center gap-2",
|
|
910
|
-
children: [h.length > 0 && /* @__PURE__ */
|
|
910
|
+
children: [h.length > 0 && /* @__PURE__ */ B(M, { children: [/* @__PURE__ */ z(P, {
|
|
911
911
|
asChild: !0,
|
|
912
|
-
children: /* @__PURE__ */
|
|
912
|
+
children: /* @__PURE__ */ B(T, {
|
|
913
913
|
variant: "outline",
|
|
914
914
|
size: "sm",
|
|
915
915
|
className: "gap-1.5",
|
|
916
|
-
children: [/* @__PURE__ */
|
|
916
|
+
children: [/* @__PURE__ */ z(V, { className: "size-4" }), /* @__PURE__ */ z("span", {
|
|
917
917
|
className: "hidden sm:inline",
|
|
918
918
|
children: "Actions"
|
|
919
919
|
})]
|
|
920
920
|
})
|
|
921
|
-
}), /* @__PURE__ */
|
|
921
|
+
}), /* @__PURE__ */ z(E, {
|
|
922
922
|
align: "end",
|
|
923
923
|
children: h.map((e) => {
|
|
924
|
-
let t = e.icon ??
|
|
925
|
-
return /* @__PURE__ */
|
|
924
|
+
let t = e.icon ?? H;
|
|
925
|
+
return /* @__PURE__ */ B(A, {
|
|
926
926
|
disabled: e.disabled,
|
|
927
927
|
onClick: () => {
|
|
928
928
|
e.href && m(e.href), e.onClick && e.onClick();
|
|
929
929
|
},
|
|
930
|
-
children: [/* @__PURE__ */
|
|
930
|
+
children: [/* @__PURE__ */ z(t, { className: "size-4 mr-2" }), e.label]
|
|
931
931
|
}, e.label);
|
|
932
932
|
})
|
|
933
|
-
})] }), s !== void 0 && o !== void 0 && c !== void 0 && /* @__PURE__ */
|
|
933
|
+
})] }), s !== void 0 && o !== void 0 && c !== void 0 && /* @__PURE__ */ z(Q, {
|
|
934
934
|
feature: t,
|
|
935
935
|
name: n,
|
|
936
936
|
onDelete: o,
|
|
@@ -939,8 +939,8 @@ var Qe = Object.assign(({ icon: e, feature: t, name: n, description: r, urlBase:
|
|
|
939
939
|
})]
|
|
940
940
|
})
|
|
941
941
|
]
|
|
942
|
-
}), /* @__PURE__ */
|
|
942
|
+
}), /* @__PURE__ */ z(S, { className: "mt-3" })]
|
|
943
943
|
});
|
|
944
|
-
}, { Action:
|
|
944
|
+
}, { Action: Qe });
|
|
945
945
|
//#endregion
|
|
946
|
-
export {
|
|
946
|
+
export { Z as BlankSlate, Q as DialogDelete, X as GradientButtonLink, Re as GridList, Ve as InternalSidebar, He as LoadProvider, Ue as NavMain, We as NavUser, Ke as Page, $ as PageContent, Ge as PageHeader, Xe as StickyPageHeader, Ze as SubPage, $e as SubPageHeader };
|