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