@viglet/viglet-design-system 2026.3.8 → 2026.3.9
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/{badge-locale-BxI9TwkE.js → badge-locale-CoEEv7s5.js} +98 -96
- package/dist/badge-locale-hQyWhAKe.cjs +7 -0
- package/dist/bento/bento-back-to-top.d.ts.map +1 -1
- package/dist/bento.cjs +1 -1
- package/dist/bento.es.js +56 -56
- package/dist/{breadcrumb.context-CGqjI0-U.js → breadcrumb.context-KQut7j8U.js} +30 -27
- package/dist/breadcrumb.context-Vwc3lAlf.cjs +1 -0
- package/dist/components/router/grid.list.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.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/exports.json +1 -1
- package/dist/i18n/index.d.ts +28 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/locales/en/bento.json.d.ts +2 -1
- package/dist/i18n/locales/en/common.json.d.ts +10 -1
- package/dist/i18n/locales/en/dialog.json.d.ts +2 -1
- package/dist/i18n/locales/en/sidebar.json.d.ts +4 -1
- package/dist/i18n/locales/pt/bento.json.d.ts +2 -1
- package/dist/i18n/locales/pt/common.json.d.ts +10 -1
- package/dist/i18n/locales/pt/dialog.json.d.ts +2 -1
- package/dist/i18n/locales/pt/sidebar.json.d.ts +4 -1
- package/dist/{i18n-DuNITbWa.js → i18n-DD3rQOWi.js} +36 -8
- package/dist/i18n-DrBq-qJJ.cjs +1 -0
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.es.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +42 -33
- package/dist/{loading-provider-CMnOuvdR.js → loading-provider-BWWhhfEn.js} +12 -12
- package/dist/{loading-provider-1mgM91iY.cjs → loading-provider-CmeMqLGk.cjs} +1 -1
- package/dist/preset.css +3 -1
- package/dist/router.cjs +1 -1
- package/dist/router.es.js +134 -133
- package/dist/{user.context-r50nSWER.cjs → user.context-B9vIBzY5.cjs} +1 -1
- package/dist/{user.context-kPAqKN4o.js → user.context-D1PxP4D4.js} +16 -16
- package/dist/viglet-design-system.css +1 -1
- package/package.json +1 -1
- package/dist/badge-locale-sIsBdP_e.cjs +0 -7
- package/dist/breadcrumb.context-DYeZEC65.cjs +0 -1
- package/dist/i18n-DoNdMLEd.cjs +0 -1
package/dist/index.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, K as l, L as u, M as ee, N as te, O as ne, P as re, R as ie, S as ae, T as oe, U as d, V as se, W as ce, _ as f, a as le, b as ue, c as de, d as fe, f as p, g as m, h as pe, i as me, j as he, k as ge, l as _e, m as h, n as ve, o as ye, p as be, r as xe, s as Se, t as g, u as _, v as Ce, w as we, x as v, y as Te } from "./badge-locale-
|
|
3
|
-
import { $ as Ee, A as De, B as Oe, C as ke, D as Ae, E as je, F as Me, G as Ne, H as Pe, I as Fe, J as Ie, K as Le, L as Re, N as ze, O as Be, P as Ve, Q as He, R as Ue, S as We, T as Ge, U as Ke, V as qe, W as Je, X as Ye, Y as Xe, Z as Ze, _ as Qe, _t as $e, a as et, at as tt, b as nt, c as rt, ct as it, d as at, dt as ot, et as st, f as ct, ft as lt, g as ut, gt as dt, h as ft, ht as pt, i as mt, it as ht, j as gt, k as _t, l as vt, lt as yt, m as bt, mt as xt, n as St, nt as Ct, o as wt, ot as Tt, p as Et, pt as Dt, q as Ot, r as kt, rt as At, s as jt, st as Mt, t as Nt, tt as Pt, u as Ft, ut as It, v as Lt, w as Rt, x as zt, y as Bt, z as Vt } from "./breadcrumb.context-
|
|
4
|
-
import { a as Ht, c as Ut, i as Wt, l as Gt, n as Kt, o as qt, r as y, s as Jt, t as Yt, u as Xt } from "./user.context-
|
|
2
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, K as l, L as u, M as ee, N as te, O as ne, P as re, R as ie, S as ae, T as oe, U as d, V as se, W as ce, _ as f, a as le, b as ue, c as de, d as fe, f as p, g as m, h as pe, i as me, j as he, k as ge, l as _e, m as h, n as ve, o as ye, p as be, r as xe, s as Se, t as g, u as _, v as Ce, w as we, x as v, y as Te } from "./badge-locale-CoEEv7s5.js";
|
|
3
|
+
import { $ as Ee, A as De, B as Oe, C as ke, D as Ae, E as je, F as Me, G as Ne, H as Pe, I as Fe, J as Ie, K as Le, L as Re, N as ze, O as Be, P as Ve, Q as He, R as Ue, S as We, T as Ge, U as Ke, V as qe, W as Je, X as Ye, Y as Xe, Z as Ze, _ as Qe, _t as $e, a as et, at as tt, b as nt, c as rt, ct as it, d as at, dt as ot, et as st, f as ct, ft as lt, g as ut, gt as dt, h as ft, ht as pt, i as mt, it as ht, j as gt, k as _t, l as vt, lt as yt, m as bt, mt as xt, n as St, nt as Ct, o as wt, ot as Tt, p as Et, pt as Dt, q as Ot, r as kt, rt as At, s as jt, st as Mt, t as Nt, tt as Pt, u as Ft, ut as It, v as Lt, w as Rt, x as zt, y as Bt, z as Vt } from "./breadcrumb.context-KQut7j8U.js";
|
|
4
|
+
import { a as Ht, c as Ut, i as Wt, l as Gt, n as Kt, o as qt, r as y, s as Jt, t as Yt, u as Xt } from "./user.context-D1PxP4D4.js";
|
|
5
5
|
import { FloatingFormulasBg as b } from "./floating-formulas-bg.es.js";
|
|
6
6
|
import { i as Zt, n as Qt, r as $t } from "./products-Du9KB6Xl.js";
|
|
7
|
-
import { i as en, n as tn, r as nn } from "./i18n-
|
|
7
|
+
import { i as en, n as tn, r as nn } from "./i18n-DD3rQOWi.js";
|
|
8
8
|
import * as x from "@radix-ui/react-accordion";
|
|
9
9
|
import * as S from "react";
|
|
10
10
|
import rn, { createContext as C, useCallback as an, useContext as w, useEffect as T, useMemo as on, useRef as sn, useState as cn } from "react";
|
|
11
11
|
import { Fragment as ln, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
12
12
|
import { Slot as un } from "@radix-ui/react-slot";
|
|
13
13
|
import { cva as O } from "class-variance-authority";
|
|
14
|
+
import { useTranslation as k } from "react-i18next";
|
|
14
15
|
import * as dn from "@radix-ui/react-checkbox";
|
|
15
|
-
import { Drawer as
|
|
16
|
+
import { Drawer as A } from "vaul";
|
|
16
17
|
import { Controller as fn, FormProvider as pn, useFormContext as mn, useFormState as hn } from "react-hook-form";
|
|
17
18
|
import * as gn from "@radix-ui/react-label";
|
|
18
19
|
import { IconAlertTriangle as _n, IconAlertTriangleFilled as vn, IconCheck as yn, IconCircleCheck as bn, IconDeviceFloppy as xn, IconLoader2 as Sn, IconLogout as Cn, IconRefresh as wn, IconTrash as Tn, IconUserCircle as En, IconX as Dn } from "@tabler/icons-react";
|
|
19
|
-
import { useTranslation as A } from "react-i18next";
|
|
20
20
|
import * as j from "@radix-ui/react-switch";
|
|
21
21
|
import * as M from "@radix-ui/react-hover-card";
|
|
22
22
|
import * as N from "@radix-ui/react-navigation-menu";
|
|
@@ -189,31 +189,31 @@ function qn({ className: e, ...t }) {
|
|
|
189
189
|
//#endregion
|
|
190
190
|
//#region src/components/ui/drawer.tsx
|
|
191
191
|
function Jn({ ...e }) {
|
|
192
|
-
return /* @__PURE__ */ E(
|
|
192
|
+
return /* @__PURE__ */ E(A.Root, {
|
|
193
193
|
"data-slot": "drawer",
|
|
194
194
|
...e
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
197
|
function Yn({ ...e }) {
|
|
198
|
-
return /* @__PURE__ */ E(
|
|
198
|
+
return /* @__PURE__ */ E(A.Trigger, {
|
|
199
199
|
"data-slot": "drawer-trigger",
|
|
200
200
|
...e
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
function Xn({ ...e }) {
|
|
204
|
-
return /* @__PURE__ */ E(
|
|
204
|
+
return /* @__PURE__ */ E(A.Portal, {
|
|
205
205
|
"data-slot": "drawer-portal",
|
|
206
206
|
...e
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
209
|
function Zn({ ...e }) {
|
|
210
|
-
return /* @__PURE__ */ E(
|
|
210
|
+
return /* @__PURE__ */ E(A.Close, {
|
|
211
211
|
"data-slot": "drawer-close",
|
|
212
212
|
...e
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
215
|
function Qn({ className: e, ...t }) {
|
|
216
|
-
return /* @__PURE__ */ E(
|
|
216
|
+
return /* @__PURE__ */ E(A.Overlay, {
|
|
217
217
|
"data-slot": "drawer-overlay",
|
|
218
218
|
className: d("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", e),
|
|
219
219
|
...t
|
|
@@ -222,7 +222,7 @@ function Qn({ className: e, ...t }) {
|
|
|
222
222
|
function $n({ className: e, children: t, ...n }) {
|
|
223
223
|
return /* @__PURE__ */ D(Xn, {
|
|
224
224
|
"data-slot": "drawer-portal",
|
|
225
|
-
children: [/* @__PURE__ */ E(Qn, {}), /* @__PURE__ */ D(
|
|
225
|
+
children: [/* @__PURE__ */ E(Qn, {}), /* @__PURE__ */ D(A.Content, {
|
|
226
226
|
"data-slot": "drawer-content",
|
|
227
227
|
className: d("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", e),
|
|
228
228
|
...n,
|
|
@@ -245,14 +245,14 @@ function tr({ className: e, ...t }) {
|
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
function nr({ className: e, ...t }) {
|
|
248
|
-
return /* @__PURE__ */ E(
|
|
248
|
+
return /* @__PURE__ */ E(A.Title, {
|
|
249
249
|
"data-slot": "drawer-title",
|
|
250
250
|
className: d("text-foreground font-semibold", e),
|
|
251
251
|
...t
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
254
|
function rr({ className: e, ...t }) {
|
|
255
|
-
return /* @__PURE__ */ E(
|
|
255
|
+
return /* @__PURE__ */ E(A.Description, {
|
|
256
256
|
"data-slot": "drawer-description",
|
|
257
257
|
className: d("text-muted-foreground text-sm", e),
|
|
258
258
|
...t
|
|
@@ -355,7 +355,7 @@ function B({ children: e, className: t }) {
|
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
357
|
function mr({ onClick: e, children: t, className: n }) {
|
|
358
|
-
let { t: r } =
|
|
358
|
+
let { t: r } = k();
|
|
359
359
|
return /* @__PURE__ */ D(_, {
|
|
360
360
|
type: "button",
|
|
361
361
|
variant: "outline",
|
|
@@ -365,7 +365,7 @@ function mr({ onClick: e, children: t, className: n }) {
|
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
367
|
function hr({ loading: e, disabled: t, children: n, className: r }) {
|
|
368
|
-
let { t: i } =
|
|
368
|
+
let { t: i } = k();
|
|
369
369
|
return /* @__PURE__ */ D(_, {
|
|
370
370
|
type: "submit",
|
|
371
371
|
disabled: t || e,
|
|
@@ -374,7 +374,7 @@ function hr({ loading: e, disabled: t, children: n, className: r }) {
|
|
|
374
374
|
});
|
|
375
375
|
}
|
|
376
376
|
function gr({ onClick: e, children: t, className: n }) {
|
|
377
|
-
let { t: r } =
|
|
377
|
+
let { t: r } = k();
|
|
378
378
|
return /* @__PURE__ */ D(_, {
|
|
379
379
|
type: "button",
|
|
380
380
|
variant: "outline",
|
|
@@ -565,9 +565,10 @@ function Mr({ className: e, ...t }) {
|
|
|
565
565
|
//#endregion
|
|
566
566
|
//#region src/components/ui/pagination.tsx
|
|
567
567
|
function Nr({ className: e, ...t }) {
|
|
568
|
+
let { t: n } = k();
|
|
568
569
|
return /* @__PURE__ */ E("nav", {
|
|
569
570
|
role: "navigation",
|
|
570
|
-
"aria-label": "pagination",
|
|
571
|
+
"aria-label": n("common.pagination", { defaultValue: "Pagination" }),
|
|
571
572
|
className: d("mx-auto flex w-full justify-center", e),
|
|
572
573
|
...t
|
|
573
574
|
});
|
|
@@ -596,31 +597,34 @@ function U({ className: e, isActive: t, size: n = "icon", children: r, ...i }) {
|
|
|
596
597
|
});
|
|
597
598
|
}
|
|
598
599
|
function Ir({ className: e, ...t }) {
|
|
600
|
+
let { t: n } = k();
|
|
599
601
|
return /* @__PURE__ */ D(U, {
|
|
600
|
-
"aria-label": "Go to previous page",
|
|
602
|
+
"aria-label": n("common.goToPreviousPage", { defaultValue: "Go to previous page" }),
|
|
601
603
|
size: "default",
|
|
602
604
|
className: d("gap-1 pl-2.5", e),
|
|
603
605
|
...t,
|
|
604
|
-
children: [/* @__PURE__ */ E(Ln, { className: "h-4 w-4" }), /* @__PURE__ */ E("span", { children: "Previous" })]
|
|
606
|
+
children: [/* @__PURE__ */ E(Ln, { className: "h-4 w-4" }), /* @__PURE__ */ E("span", { children: n("common.previous", { defaultValue: "Previous" }) })]
|
|
605
607
|
});
|
|
606
608
|
}
|
|
607
609
|
function Lr({ className: e, ...n }) {
|
|
610
|
+
let { t: r } = k();
|
|
608
611
|
return /* @__PURE__ */ D(U, {
|
|
609
|
-
"aria-label": "Go to next page",
|
|
612
|
+
"aria-label": r("common.goToNextPage", { defaultValue: "Go to next page" }),
|
|
610
613
|
size: "default",
|
|
611
614
|
className: d("gap-1 pr-2.5", e),
|
|
612
615
|
...n,
|
|
613
|
-
children: [/* @__PURE__ */ E("span", { children: "Next" }), /* @__PURE__ */ E(t, { className: "h-4 w-4" })]
|
|
616
|
+
children: [/* @__PURE__ */ E("span", { children: r("common.next", { defaultValue: "Next" }) }), /* @__PURE__ */ E(t, { className: "h-4 w-4" })]
|
|
614
617
|
});
|
|
615
618
|
}
|
|
616
619
|
function Rr({ className: e, ...t }) {
|
|
620
|
+
let { t: n } = k();
|
|
617
621
|
return /* @__PURE__ */ D("span", {
|
|
618
622
|
"aria-hidden": "true",
|
|
619
623
|
className: d("flex h-9 w-9 items-center justify-center", e),
|
|
620
624
|
...t,
|
|
621
625
|
children: [/* @__PURE__ */ E(dt, { className: "h-4 w-4" }), /* @__PURE__ */ E("span", {
|
|
622
626
|
className: "sr-only",
|
|
623
|
-
children: "More pages"
|
|
627
|
+
children: n("common.morePages", { defaultValue: "More pages" })
|
|
624
628
|
})]
|
|
625
629
|
});
|
|
626
630
|
}
|
|
@@ -704,7 +708,7 @@ var qr = {
|
|
|
704
708
|
green: "bg-green-50 dark:bg-green-950/30"
|
|
705
709
|
};
|
|
706
710
|
function Jr({ title: e, badges: t, actions: n, onCancel: r, loading: i, disabled: a, variant: o = "gray" }) {
|
|
707
|
-
let { t: s } =
|
|
711
|
+
let { t: s } = k();
|
|
708
712
|
return /* @__PURE__ */ D("div", {
|
|
709
713
|
className: `sticky top-0 z-10 border rounded-lg px-4 py-3 flex items-center justify-between gap-4 ${qr[o]}`,
|
|
710
714
|
children: [/* @__PURE__ */ D("div", {
|
|
@@ -1014,7 +1018,7 @@ function gi({ className: e, children: t, variant: n, size: r, ...i }) {
|
|
|
1014
1018
|
//#endregion
|
|
1015
1019
|
//#region src/components/ui/user-menu.tsx
|
|
1016
1020
|
function _i({ user: e, onAccount: t, onSignOut: n, extraItems: r, className: a, align: o = "end" }) {
|
|
1017
|
-
let { t: s } =
|
|
1021
|
+
let { t: s } = k(), c = `${e.firstName ?? ""} ${e.lastName ?? ""}`.trim() || e.username || "";
|
|
1018
1022
|
return /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ E(i, {
|
|
1019
1023
|
asChild: !0,
|
|
1020
1024
|
children: /* @__PURE__ */ E("button", {
|
|
@@ -1264,10 +1268,15 @@ function Ii({ children: e, className: t, ...n }) {
|
|
|
1264
1268
|
});
|
|
1265
1269
|
}
|
|
1266
1270
|
function Li({ current: e, total: t, className: n, ...r }) {
|
|
1271
|
+
let { t: i } = k();
|
|
1267
1272
|
return /* @__PURE__ */ E("div", {
|
|
1268
1273
|
className: `vig-sf__fade-in flex items-center gap-2 mb-4 ${n ?? ""}`,
|
|
1269
1274
|
role: "group",
|
|
1270
|
-
"aria-label":
|
|
1275
|
+
"aria-label": i("common.stepOf", {
|
|
1276
|
+
index: e,
|
|
1277
|
+
count: t,
|
|
1278
|
+
defaultValue: "Step {{index}} of {{count}}"
|
|
1279
|
+
}),
|
|
1271
1280
|
...r,
|
|
1272
1281
|
children: Array.from({ length: t }, (t, n) => /* @__PURE__ */ E("span", {
|
|
1273
1282
|
className: n + 1 <= e ? "vig-sf__step vig-sf__step--active" : "vig-sf__step",
|
|
@@ -1419,7 +1428,7 @@ function qi({ open: e, onToggle: t, apps: n, triggerTitle: r = "Apps", closeLabe
|
|
|
1419
1428
|
] });
|
|
1420
1429
|
}
|
|
1421
1430
|
function Ji({ app: e, onToggle: t }) {
|
|
1422
|
-
let { t: n } =
|
|
1431
|
+
let { t: n } = k(), r = e.name.includes(".") ? n(e.name, { defaultValue: e.name }) : e.name;
|
|
1423
1432
|
return /* @__PURE__ */ D("a", {
|
|
1424
1433
|
href: e.href,
|
|
1425
1434
|
target: e.external ? "_blank" : void 0,
|
|
@@ -1503,7 +1512,7 @@ function $i({ healthEndpoint: e = "/api/v2/ping", pollInterval: t = 5e3, showBan
|
|
|
1503
1512
|
});
|
|
1504
1513
|
}
|
|
1505
1514
|
function J() {
|
|
1506
|
-
let { status: e, retry: t } = Qi(), { t: n } =
|
|
1515
|
+
let { status: e, retry: t } = Qi(), { t: n } = k();
|
|
1507
1516
|
if (e === "online") return null;
|
|
1508
1517
|
let r = e === "checking";
|
|
1509
1518
|
return /* @__PURE__ */ E("div", {
|
|
@@ -1560,7 +1569,7 @@ var ea = class extends rn.Component {
|
|
|
1560
1569
|
}
|
|
1561
1570
|
};
|
|
1562
1571
|
function ta({ error: e }) {
|
|
1563
|
-
let { t } =
|
|
1572
|
+
let { t } = k();
|
|
1564
1573
|
return /* @__PURE__ */ E("div", {
|
|
1565
1574
|
className: "flex items-center justify-center min-h-[80vh] px-6 py-16",
|
|
1566
1575
|
children: /* @__PURE__ */ E("div", {
|
|
@@ -1608,7 +1617,7 @@ function ta({ error: e }) {
|
|
|
1608
1617
|
//#endregion
|
|
1609
1618
|
//#region src/components/language-select.tsx
|
|
1610
1619
|
function na({ value: e, onValueChange: t, locales: n, extraLocaleValues: r = [], placeholder: i, className: a }) {
|
|
1611
|
-
let { t: o } =
|
|
1620
|
+
let { t: o } = k(), s = i ?? o("forms.common.chooseLanguage"), c = /* @__PURE__ */ new Map();
|
|
1612
1621
|
n.forEach((e) => {
|
|
1613
1622
|
c.set(e.initials, {
|
|
1614
1623
|
name: e.en,
|
|
@@ -1662,7 +1671,7 @@ var ra = [{
|
|
|
1662
1671
|
flag: "🇧🇷"
|
|
1663
1672
|
}];
|
|
1664
1673
|
function ia({ languages: e = ra }) {
|
|
1665
|
-
let { i18n: t, t: n } =
|
|
1674
|
+
let { i18n: t, t: n } = k();
|
|
1666
1675
|
return /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ E(i, {
|
|
1667
1676
|
asChild: !0,
|
|
1668
1677
|
children: /* @__PURE__ */ D(_, {
|
|
@@ -1709,7 +1718,7 @@ var oa = {
|
|
|
1709
1718
|
docs: "https://docs.viglet.org"
|
|
1710
1719
|
};
|
|
1711
1720
|
function sa({ open: e, onToggle: t, activeProduct: n, urls: r, triggerTitle: i, closeLabel: a, headerHeight: o = 56 }) {
|
|
1712
|
-
let { t: s } =
|
|
1721
|
+
let { t: s } = k(), c = {
|
|
1713
1722
|
...oa,
|
|
1714
1723
|
...r
|
|
1715
1724
|
}, l = [
|
|
@@ -1771,7 +1780,7 @@ var ca = {
|
|
|
1771
1780
|
pt: Fn
|
|
1772
1781
|
};
|
|
1773
1782
|
function la() {
|
|
1774
|
-
let { i18n: e } =
|
|
1783
|
+
let { i18n: e } = k();
|
|
1775
1784
|
return on(() => ca[e.language?.substring(0, 2)] ?? Pn, [e.language]);
|
|
1776
1785
|
}
|
|
1777
1786
|
//#endregion
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { A as e, D as t, F as n, I as r, M as i, U as a, c as o, d as s, j as c, k as l, l as u, n as d, r as f, u as p } from "./badge-locale-
|
|
1
|
+
import { A as e, D as t, F as n, I as r, M as i, U as a, c as o, d as s, j as c, k as l, l as u, n as d, r as f, u as p } from "./badge-locale-CoEEv7s5.js";
|
|
2
2
|
import { useState as m } from "react";
|
|
3
3
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useTranslation as v } from "react-i18next";
|
|
5
|
+
import { IconAlertTriangle as y, IconAlertTriangleFilled as b, IconTrash as x } from "@tabler/icons-react";
|
|
6
6
|
import { NavLink as S, useNavigate as C } from "react-router-dom";
|
|
7
7
|
//#region src/components/router/dialog.delete.tsx
|
|
8
|
-
var w = ({ feature: a, name: o, onDelete: s, open:
|
|
9
|
-
let k = T && T.length > 0, A = C(), { t: j } =
|
|
8
|
+
var w = ({ feature: a, name: o, onDelete: s, open: b, setOpen: S, trigger: w, blockedBy: T, title: E, description: D, confirmLabel: O }) => {
|
|
9
|
+
let k = T && T.length > 0, A = C(), { t: j } = v(), [M, N] = m(""), P = M === o;
|
|
10
10
|
function F(e) {
|
|
11
11
|
S(e), e || N("");
|
|
12
12
|
}
|
|
13
13
|
return /* @__PURE__ */ _(t, {
|
|
14
|
-
open:
|
|
14
|
+
open: b,
|
|
15
15
|
onOpenChange: F,
|
|
16
16
|
children: [w !== null && /* @__PURE__ */ g(r, {
|
|
17
17
|
asChild: !0,
|
|
18
18
|
children: w ?? /* @__PURE__ */ g(p, {
|
|
19
19
|
variant: "ghost",
|
|
20
20
|
size: "icon-sm",
|
|
21
|
-
children: /* @__PURE__ */ g(
|
|
21
|
+
children: /* @__PURE__ */ g(x, { className: "size-5!" })
|
|
22
22
|
})
|
|
23
23
|
}), /* @__PURE__ */ g(l, {
|
|
24
24
|
className: "sm:max-w-md",
|
|
@@ -26,7 +26,7 @@ var w = ({ feature: a, name: o, onDelete: s, open: y, setOpen: S, trigger: w, bl
|
|
|
26
26
|
/* @__PURE__ */ _(i, { children: [
|
|
27
27
|
/* @__PURE__ */ g("div", {
|
|
28
28
|
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",
|
|
29
|
-
children: /* @__PURE__ */ g(
|
|
29
|
+
children: /* @__PURE__ */ g(y, { className: "size-6 text-amber-500" })
|
|
30
30
|
}),
|
|
31
31
|
/* @__PURE__ */ g(n, {
|
|
32
32
|
className: "text-center",
|
|
@@ -78,7 +78,7 @@ var w = ({ feature: a, name: o, onDelete: s, open: y, setOpen: S, trigger: w, bl
|
|
|
78
78
|
/* @__PURE__ */ _(i, { children: [
|
|
79
79
|
/* @__PURE__ */ g("div", {
|
|
80
80
|
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",
|
|
81
|
-
children: /* @__PURE__ */ g(
|
|
81
|
+
children: /* @__PURE__ */ g(x, { className: "size-6 text-red-500" })
|
|
82
82
|
}),
|
|
83
83
|
/* @__PURE__ */ g(n, {
|
|
84
84
|
className: "text-center",
|
|
@@ -118,7 +118,7 @@ var w = ({ feature: a, name: o, onDelete: s, open: y, setOpen: S, trigger: w, bl
|
|
|
118
118
|
variant: "destructive",
|
|
119
119
|
disabled: !P,
|
|
120
120
|
className: "w-full",
|
|
121
|
-
children: [/* @__PURE__ */ g(
|
|
121
|
+
children: [/* @__PURE__ */ g(x, { className: "size-4" }), O ?? j("dialog.deleteFeature", { feature: a })]
|
|
122
122
|
}), /* @__PURE__ */ g(p, {
|
|
123
123
|
onClick: () => F(!1),
|
|
124
124
|
variant: "ghost",
|
|
@@ -187,9 +187,9 @@ var E = ({ icon: e, title: t, description: n, urlNew: r, buttonText: i }) => /*
|
|
|
187
187
|
})
|
|
188
188
|
})
|
|
189
189
|
}), D = ({ checkIsNotUndefined: e, error: t, tryAgainUrl: n, children: r }) => {
|
|
190
|
-
let { t: i } =
|
|
190
|
+
let { t: i } = v();
|
|
191
191
|
return t ? /* @__PURE__ */ g(E, {
|
|
192
|
-
icon:
|
|
192
|
+
icon: b,
|
|
193
193
|
title: i("common.errorLoading"),
|
|
194
194
|
description: t,
|
|
195
195
|
buttonText: i("common.tryAgain"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./badge-locale-
|
|
1
|
+
const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./badge-locale-hQyWhAKe.cjs");let n=require("react");n=e.t(n,1);let r=require("react/jsx-runtime"),i=require("react-i18next"),a=require("@tabler/icons-react"),o=require("react-router-dom");var s=({feature:e,name:s,onDelete:c,open:l,setOpen:u,trigger:d,blockedBy:f,title:p,description:m,confirmLabel:h})=>{let g=f&&f.length>0,_=(0,o.useNavigate)(),{t:v}=(0,i.useTranslation)(),[y,b]=(0,n.useState)(``),x=y===s;function S(e){u(e),e||b(``)}return(0,r.jsxs)(t.D,{open:l,onOpenChange:S,children:[d!==null&&(0,r.jsx)(t.I,{asChild:!0,children:d??(0,r.jsx)(t.u,{variant:`ghost`,size:`icon-sm`,children:(0,r.jsx)(a.IconTrash,{className:`size-5!`})})}),(0,r.jsx)(t.k,{className:`sm:max-w-md`,children:g?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.M,{children:[(0,r.jsx)(`div`,{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`,children:(0,r.jsx)(a.IconAlertTriangle,{className:`size-6 text-amber-500`})}),(0,r.jsx)(t.F,{className:`text-center`,children:v(`dialog.cannotDelete`,{feature:e})}),(0,r.jsx)(t.A,{className:`text-center`,children:v(`dialog.inUse`,{name:s})})]}),(0,r.jsxs)(`div`,{className:`space-y-3`,children:[(0,r.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:v(`dialog.dependingSites`,{feature:e})}),(0,r.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:f.map(e=>{let n=e.language?t.n(e.language):void 0;return(0,r.jsx)(t.r,{text:e.name,href:e.href,onClick:e=>{u(!1),e&&_(e)},prefix:n?(0,r.jsx)(`img`,{src:`https://flagcdn.com/w40/${n}.png`,alt:e.language,className:`w-4 h-3 object-cover rounded-sm`}):void 0},e.id)})}),(0,r.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:v(`dialog.removeDependencies`,{feature:e})})]}),(0,r.jsx)(t.j,{children:(0,r.jsx)(t.u,{onClick:()=>u(!1),variant:`outline`,className:`w-full`,children:v(`dialog.understood`)})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.M,{children:[(0,r.jsx)(`div`,{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`,children:(0,r.jsx)(a.IconTrash,{className:`size-6 text-red-500`})}),(0,r.jsx)(t.F,{className:`text-center`,children:p??v(`dialog.deleteFeature`,{feature:e})}),(0,r.jsx)(t.A,{className:`text-center`,children:m??v(`dialog.permanentDelete`,{name:s})})]}),(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsxs)(`label`,{className:`text-sm text-muted-foreground`,children:[v(`dialog.typeToConfirm`),` `,(0,r.jsx)(`span`,{className:`font-mono font-semibold text-foreground bg-muted px-1.5 py-0.5 rounded`,children:s}),` `,v(`dialog.toConfirm`)]}),(0,r.jsx)(t.l,{value:y,onChange:e=>b(e.target.value),placeholder:s,className:`font-mono text-sm`,autoFocus:!0})]}),(0,r.jsxs)(t.j,{className:`flex-col gap-2 sm:flex-col`,children:[(0,r.jsxs)(t.u,{onClick:c,variant:`destructive`,disabled:!x,className:`w-full`,children:[(0,r.jsx)(a.IconTrash,{className:`size-4`}),h??v(`dialog.deleteFeature`,{feature:e})]}),(0,r.jsx)(t.u,{onClick:()=>S(!1),variant:`ghost`,className:`w-full`,children:v(`common.cancel`)})]})]})})]})};function c({className:e,variant:n,size:i,to:a,onClick:s,children:c}){let l=t.U(t.d({variant:n,size:i,className:e}));return(0,r.jsx)(o.NavLink,{to:a,"data-slot":`gradient-button`,className:l,onClick:e=>{let t=typeof a==`string`?a:a.pathname;t&&globalThis.location.pathname===t&&globalThis.location.reload(),s&&s(e)},children:c})}var l=({icon:e,title:t,description:n,urlNew:i,buttonText:a})=>(0,r.jsx)(`div`,{className:`flex items-center justify-center px-6 py-16`,children:(0,r.jsx)(`div`,{className:`relative w-full max-w-md overflow-hidden rounded-2xl border border-border/50 bg-card/80 backdrop-blur-sm shadow-xl`,children:(0,r.jsxs)(`div`,{className:`relative flex flex-col items-center text-center px-8 py-12 space-y-6`,children:[(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-0 rounded-2xl bg-gradient-to-br from-[var(--vg-accent-surface-strong)] to-[var(--vg-accent-surface-strong)] blur-xl animate-pulse`}),(0,r.jsx)(`div`,{className:`relative inline-flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br vg-accent-solid shadow-lg shadow-[var(--vg-accent-line)] ring-4 ring-[var(--vg-accent-surface)]`,children:(0,r.jsx)(e,{className:`text-white`,size:30})})]}),(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:t}),(0,r.jsx)(`p`,{className:`text-sm text-muted-foreground leading-relaxed max-w-xs mx-auto`,children:n})]}),i&&(0,r.jsx)(c,{size:`lg`,to:i,children:a})]})})}),u=({checkIsNotUndefined:e,error:n,tryAgainUrl:o,children:s})=>{let{t:c}=(0,i.useTranslation)();return n?(0,r.jsx)(l,{icon:a.IconAlertTriangleFilled,title:c(`common.errorLoading`),description:n,buttonText:c(`common.tryAgain`),urlNew:o}):e===void 0&&!n?(0,r.jsxs)(`div`,{className:`space-y-6 py-8 px-6 animate-pulse`,children:[(0,r.jsx)(t.c,{className:`h-8 w-1/3 rounded-md`}),(0,r.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6`,children:[`skeleton-1`,`skeleton-2`,`skeleton-3`].map(e=>(0,r.jsxs)(`div`,{className:`space-y-3 p-4 border rounded-xl bg-slate-50/50 dark:bg-slate-900/20`,children:[(0,r.jsx)(t.c,{className:`h-5 w-2/3`}),(0,r.jsx)(t.c,{className:`h-12 w-full`}),(0,r.jsx)(t.c,{className:`h-4 w-5/6`})]},e))}),(0,r.jsx)(`div`,{className:`pt-4`,children:(0,r.jsx)(t.c,{className:`h-10 w-32 rounded-lg`})})]}):(0,r.jsx)(r.Fragment,{children:s})};Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
|
package/dist/preset.css
CHANGED
|
@@ -99,7 +99,9 @@
|
|
|
99
99
|
--vg-secondary: oklch(0.97 0 0);
|
|
100
100
|
--vg-secondary-foreground: oklch(0.205 0 0);
|
|
101
101
|
--vg-muted: oklch(0.97 0 0);
|
|
102
|
-
--vg-muted
|
|
102
|
+
/* 0.52 and not 0.556 (VDS92): the old value was 4.34:1 on --vg-muted, under AA, and
|
|
103
|
+
break-even is 0.547. contrast.test.ts holds every named pair to 4.5:1. */
|
|
104
|
+
--vg-muted-foreground: oklch(0.52 0 0);
|
|
103
105
|
--vg-accent: oklch(0.97 0 0);
|
|
104
106
|
--vg-accent-foreground: oklch(0.205 0 0);
|
|
105
107
|
--vg-destructive: oklch(0.577 0.245 27.325);
|
package/dist/router.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./badge-locale-sIsBdP_e.cjs"),n=require("./breadcrumb.context-DYeZEC65.cjs"),r=require("./loading-provider-1mgM91iY.cjs");let i=require("react");i=e.t(i,1);let a=require("react/jsx-runtime"),o=require("@tabler/icons-react"),s=require("react-i18next"),c=require("@iconify/react"),l=require("react-router-dom"),u=require("@tanstack/react-table");function d(e){return typeof e.type==`string`?void 0:e.type.displayName}var f=()=>null;f.displayName=`GridListNewButton`;var p=()=>null;p.displayName=`GridListAction`;var m=()=>null;m.displayName=`GridListItemAction`;var h=[`vg-accent-solid`,`from-emerald-500 to-teal-500`,`from-violet-500 to-purple-500`,`from-amber-500 to-orange-500`,`from-rose-500 to-pink-500`,`from-cyan-500 to-sky-500`,`from-fuchsia-500 to-pink-500`,`from-lime-500 to-emerald-500`];function g(e){let t=0;for(let n=0;n<e.length;n++)t=(e.codePointAt(n)??0)+((t<<5)-t);return h[Math.abs(t)%h.length]}function _(e){return e.split(/[\s\-_]+/).filter(Boolean).slice(0,2).map(e=>e[0].toUpperCase()).join(``)}var v={columnFilteringFeature:u.columnFilteringFeature,globalFilteringFeature:u.globalFilteringFeature,rowPaginationFeature:u.rowPaginationFeature,rowSortingFeature:u.rowSortingFeature,coreRowModel:(0,u.createCoreRowModel)(),filteredRowModel:(0,u.createFilteredRowModel)(),paginatedRowModel:(0,u.createPaginatedRowModel)(),sortedRowModel:(0,u.createSortedRowModel)()},y=[{accessorKey:`name`,header:`Name`},{accessorKey:`description`,header:`Description`},{accessorKey:`url`,header:`URL`}],b=Object.assign(({gridItemList:e,children:r})=>{let{t:f}=(0,s.useTranslation)(),p=(0,l.useNavigate)(),m=[],h=[];i.default.Children.forEach(r,e=>{if(i.default.isValidElement(e)){if(d(e)===`GridListNewButton`){let{to:n,label:r}=e.props;m.push({key:`new-${r}`,render:()=>(0,a.jsxs)(t.g,{onClick:()=>p(n),children:[(0,a.jsx)(o.IconPlus,{className:`size-4 mr-2`}),`New `,r]})})}else if(d(e)===`GridListAction`){let{children:t}=e.props;m.push({key:`action-${m.length}`,render:()=>(0,a.jsx)(a.Fragment,{children:t})})}else if(d(e)===`GridListItemAction`){let t=e.props;h.push({key:`item-action-${h.length}`,icon:t.icon,label:t.label,onClick:t.onClick,position:t.position??`right`})}}});let b=h.length>0,x=h.filter(e=>e.position===`left`),S=h.filter(e=>e.position===`right`),[C,w]=(0,i.useState)({pageIndex:0,pageSize:12}),[T,E]=i.default.useState([]),[D,O]=(0,i.useState)(``),k=(0,u.useTable)({features:v,data:e,columns:y,onSortingChange:E,state:{globalFilter:D,pagination:C,sorting:T},onGlobalFilterChange:O,getColumnCanGlobalFilter:e=>e.id===`name`||e.id===`description`,onPaginationChange:w}),A=k.getRowModel().rows;return(0,a.jsxs)(`div`,{className:`px-6`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,a.jsxs)(`div`,{className:`relative flex-1 max-w-sm`,children:[(0,a.jsx)(o.IconSearch,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground`}),(0,a.jsx)(t.l,{placeholder:f(`forms.common.search`),value:D??``,onChange:e=>O(e.target.value),className:`pl-9`})]}),(0,a.jsxs)(`span`,{className:`text-sm text-muted-foreground whitespace-nowrap`,children:[k.getFilteredRowModel().rows.length,` `,k.getFilteredRowModel().rows.length===1?f(`forms.common.item`):f(`forms.common.items`)]}),m.length>0&&(0,a.jsx)(`div`,{className:`ml-auto`,children:(0,a.jsxs)(t.f,{children:[(0,a.jsx)(t.E,{asChild:!0,children:(0,a.jsxs)(t.u,{variant:`outline`,size:`sm`,className:`gap-1.5`,children:[(0,a.jsx)(o.IconDotsVertical,{className:`size-4`}),(0,a.jsx)(`span`,{className:`hidden sm:inline`,children:f(`forms.common.actions`)})]})}),(0,a.jsx)(t.m,{align:`end`,children:m.map(e=>(0,a.jsx)(i.default.Fragment,{children:e.render()},e.key))})]})})]}),A.length>0?(0,a.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4`,children:A.map(e=>{let t=e.getValue(`name`),r=e.getValue(`description`),i=e.getValue(`url`),s=e.original.icon??void 0,u=g(t),d=_(t),p=(0,a.jsxs)(n.$,{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)]`,children:[(0,a.jsx)(`div`,{className:`h-1.5 bg-linear-to-r ${u} opacity-70 group-hover:opacity-100 transition-opacity`}),(0,a.jsxs)(`div`,{className:`p-4 flex items-start gap-3`,children:[b&&x.length>0&&(0,a.jsx)(`div`,{className:`flex items-center gap-1 shrink-0 mt-0.5`,children:x.map(t=>(0,a.jsx)(`button`,{type:`button`,title:t.label,onClick:()=>t.onClick(e.original),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`,children:t.icon},t.key))}),(0,a.jsx)(`div`,{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`,children:s?(0,a.jsx)(c.Icon,{icon:s,className:`size-5`}):d}),(0,a.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,a.jsx)(`h3`,{className:`font-medium text-sm truncate group-hover:text-[var(--vg-accent-fg)] transition-colors`,children:t}),r?(0,a.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1 line-clamp-2 leading-relaxed`,children:r}):(0,a.jsx)(`p`,{className:`text-xs text-muted-foreground/50 mt-1 italic`,children:f(`forms.common.noDescription`)})]}),b?S.length>0&&(0,a.jsx)(`div`,{className:`flex items-center gap-1 shrink-0 mt-0.5`,children:S.map(t=>(0,a.jsx)(`button`,{type:`button`,title:t.label,onClick:()=>t.onClick(e.original),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`,children:t.icon},t.key))}):(0,a.jsx)(o.IconChevronRight,{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`})]})]});return b?(0,a.jsx)(`div`,{className:`group`,children:p},e.id):(0,a.jsx)(l.NavLink,{to:i,className:`group`,children:p},e.id)})}):(0,a.jsx)(n.$,{className:`p-8`,children:(0,a.jsxs)(`div`,{className:`text-center text-muted-foreground`,children:[(0,a.jsx)(o.IconSearch,{className:`h-8 w-8 mx-auto mb-2 opacity-40`}),(0,a.jsx)(`p`,{className:`text-sm`,children:f(`forms.common.noResults`)})]})}),k.getPageCount()>1&&(0,a.jsxs)(`div`,{className:`flex items-center justify-end space-x-2 mt-4`,children:[(0,a.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,a.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:f(`forms.common.perPage`)}),(0,a.jsxs)(n.U,{value:`${k.state.pagination.pageSize}`,onValueChange:e=>k.setPageSize(Number(e)),children:[(0,a.jsx)(n.Z,{className:`h-8 w-17.5`,children:(0,a.jsx)(n.Q,{placeholder:k.state.pagination.pageSize})}),(0,a.jsx)(n.W,{side:`top`,children:[12,24,36,48].map(e=>(0,a.jsx)(n.K,{value:`${e}`,children:e},e))})]})]}),(0,a.jsx)(`div`,{className:`flex w-25 items-center justify-center text-sm font-medium`,children:f(`forms.common.pageOf`,{index:k.state.pagination.pageIndex+1,count:k.getPageCount()})}),(0,a.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,a.jsx)(t.u,{variant:`outline`,size:`sm`,onClick:()=>k.previousPage(),disabled:!k.getCanPreviousPage(),className:`h-8 w-8 p-0`,children:(0,a.jsx)(`span`,{children:`<`})}),(0,a.jsx)(t.u,{variant:`outline`,size:`sm`,onClick:()=>k.nextPage(),disabled:!k.getCanNextPage(),className:`h-8 w-8 p-0`,children:(0,a.jsx)(`span`,{children:`>`})})]})]})]})},{NewButton:f,Action:p,ItemAction:m}),x=e=>!e.url&&(e.children?.length??0)>0,S=(e,t,n)=>{if(e.url){let r=(t??``)+e.url;if(n===r||n.startsWith(r+`/`))return!0}return e.children?.some(e=>S(e,t,n))??!1},C=e=>(e??0).toLocaleString(),w=(e,t,r,i,o)=>e.map(e=>(0,a.jsxs)(n.S,{children:[(0,a.jsx)(n.x,{tooltip:e.title,isActive:S(e,t,r),asChild:!0,children:(0,a.jsxs)(l.NavLink,{to:(t??``)+(e.url??``),onClick:o,children:[e.icon&&(0,a.jsx)(e.icon,{className:`size-5!`}),(0,a.jsx)(`span`,{children:e.title})]})}),!i&&e.children&&e.children.length>0&&(0,a.jsx)(n.v,{className:`ml-4`,children:w(e.children,t,r,i,o)})]},e.title)),T=({icon:e,feature:i,name:c,urlBase:u,isNew:d,data:f,onDelete:p,onExport:m,open:h,setOpen:g})=>{let{t:_}=(0,s.useTranslation)(),v=(0,l.useLocation)().pathname,{state:y,isMobile:b,setOpenMobile:S}=n.j(),T=y===`collapsed`,E=b?()=>S(!1):void 0;return(0,a.jsxs)(n.c,{collapsible:`icon`,variant:`inset`,position:`absolute`,children:[(0,a.jsx)(n.h,{className:`pb-3`,children:(0,a.jsx)(n.v,{children:(0,a.jsxs)(n.S,{className:`flex items-center`,children:[(0,a.jsx)(n.x,{asChild:!0,className:`data-[slot=sidebar-menu-button]:p-1.5!`,children:(0,a.jsxs)(l.NavLink,{to:u??`#`,className:`flex items-center gap-2.5`,children:[(0,a.jsx)(`div`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg vg-accent-chip ring-1`,children:(0,a.jsx)(e,{className:`size-5! vg-accent-text`})}),!T&&(0,a.jsx)(`span`,{className:`text-sm font-semibold whitespace-nowrap truncate`,children:d?_(`sidebar.new`,{feature:i}):c})]})}),!T&&(0,a.jsxs)(`div`,{className:`flex items-center gap-1 mr-auto`,children:[!d&&m&&(0,a.jsx)(t.u,{variant:`ghost`,size:`icon-sm`,onClick:m,children:(0,a.jsx)(o.IconDownload,{className:`size-5!`})}),!d&&p&&g&&(0,a.jsx)(r.i,{feature:i,name:c,onDelete:p,open:h??!1,setOpen:g})]})]})})}),(0,a.jsxs)(n.l,{children:[f?.counts&&f.counts.length>0&&(0,a.jsxs)(n.d,{children:[(0,a.jsx)(n.m,{children:_(`sidebar.indexing`)}),(0,a.jsx)(n.p,{className:`flex flex-col gap-2 pt-4`,children:(0,a.jsx)(n.v,{children:f.counts.map(e=>(0,a.jsxs)(n.S,{children:[(0,a.jsxs)(n.x,{tooltip:e.title+`: `+C(e.count),variant:`outline`,children:[e.icon&&(0,a.jsx)(e.icon,{className:`size-5!`}),(0,a.jsx)(`span`,{children:e.title})]}),!T&&(0,a.jsx)(n.b,{children:C(e.count)})]},e.title))})})]}),(()=>{let e=f?.navMain??[],t=d?e.filter(e=>e.showOnNew??e.url===`/detail`):e,r=t.filter(e=>!x(e)),o=t.filter(x);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.d,{children:[(0,a.jsx)(n.m,{children:i}),(0,a.jsx)(n.p,{className:`flex flex-col gap-2`,children:(0,a.jsx)(n.v,{children:w(r,u,v,T,E)})})]}),o.map(e=>(0,a.jsxs)(n.d,{children:[(0,a.jsx)(n.m,{children:e.title}),(0,a.jsx)(n.p,{className:`flex flex-col gap-2`,children:(0,a.jsx)(n.v,{children:w(e.children??[],u,v,T,E)})})]},e.title))]})})()]})]})};function E({groups:e}){let t=(0,l.useLocation)().pathname,{isMobile:r,setOpenMobile:i}=n.j();return(0,a.jsx)(a.Fragment,{children:e.map(e=>(0,a.jsxs)(n.d,{children:[e.label&&(0,a.jsx)(n.m,{children:e.label}),(0,a.jsx)(n.p,{className:`flex flex-col gap-2`,children:(0,a.jsx)(n.v,{children:e.items.map(e=>(0,a.jsx)(n.S,{children:(0,a.jsx)(n.x,{tooltip:e.title,isActive:t.startsWith(e.url),asChild:!0,children:(0,a.jsxs)(l.NavLink,{to:e.url,onClick:()=>r&&i(!1),children:[e.icon&&(0,a.jsx)(e.icon,{className:`size-6!`}),(0,a.jsx)(`span`,{children:e.title})]})})},e.title))})})]},e.label??`_ungrouped`))})}function D({user:e,accountUrl:r,logoutUrl:c,onLogout:u}){let{t:d}=(0,s.useTranslation)(),{isMobile:f}=n.j(),p=()=>{u?u():c&&(globalThis.location.href=c)},m=i.default.useMemo(()=>{let t=e.firstName||``,n=e.lastName||``;if(!t&&!n)return` `;let r=`${t} ${n}`.trim().split(` `).filter(Boolean);return r.length===1?r[0].charAt(0).toUpperCase():r[0].charAt(0).toUpperCase()+(r.at(-1)?.charAt(0).toUpperCase()??``)},[e]),h=e?.avatarUrl||``;return(0,a.jsx)(n.v,{children:(0,a.jsx)(n.S,{children:(0,a.jsxs)(t.f,{children:[(0,a.jsx)(t.E,{asChild:!0,children:(0,a.jsxs)(n.x,{size:`lg`,className:`data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground`,children:[(0,a.jsxs)(n.pt,{className:`h-8 w-8 rounded-lg`,children:[h&&(0,a.jsx)(n.ht,{src:h,alt:e.username}),(0,a.jsx)(n.mt,{className:`rounded-lg`,children:m})]}),(0,a.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,a.jsxs)(`span`,{className:`truncate font-medium`,children:[e.firstName,` `,e.lastName]}),(0,a.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.email})]}),(0,a.jsx)(o.IconDotsVertical,{className:`ml-auto size-4`})]})}),(0,a.jsxs)(t.m,{className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,side:f?`bottom`:`right`,align:`end`,sideOffset:4,children:[(0,a.jsx)(t._,{className:`p-0 font-normal`,children:(0,a.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-left text-sm`,children:[(0,a.jsxs)(n.pt,{className:`h-8 w-8 rounded-lg`,children:[h&&(0,a.jsx)(n.ht,{src:h,alt:e.username}),(0,a.jsx)(n.mt,{className:`rounded-lg`,children:m})]}),(0,a.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,a.jsxs)(`span`,{className:`truncate font-medium`,children:[e.firstName,` `,e.lastName]}),(0,a.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.email})]})]})}),(0,a.jsx)(t.x,{}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h,{children:(0,a.jsx)(l.NavLink,{to:r,className:`w-full`,children:(0,a.jsxs)(t.g,{children:[(0,a.jsx)(o.IconUserCircle,{}),d(`nav.account`)]})})}),(0,a.jsx)(t.x,{})]}),(0,a.jsxs)(t.g,{onClick:p,className:`cursor-pointer`,children:[(0,a.jsx)(o.IconLogout,{}),(0,a.jsx)(`span`,{children:d(`nav.logOut`)})]})]})]})})})}var O=()=>(0,a.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,a.jsx)(`div`,{className:`@container/main flex flex-1 flex-col gap-2`,children:(0,a.jsx)(`div`,{className:`flex flex-col gap-2 px-1 py-1 md:gap-3 md:px-2 md:py-2`,children:(0,a.jsx)(l.Outlet,{})})})}),k=({icon:e,title:t,urlBase:r,children:c})=>{let{items:u}=n.n(),d=(0,l.useNavigate)(),{t:f}=(0,s.useTranslation)(),p=u.length>0?u[u.length-1]:null,m=u.length>1?u[u.length-2]:null;return(0,a.jsx)(`header`,{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)`,children:(0,a.jsxs)(`div`,{className:`flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6`,children:[(0,a.jsx)(n.A,{className:`-ml-1 hidden md:flex`}),(0,a.jsx)(n.H,{orientation:`vertical`,className:`mx-2 data-[orientation=vertical]:h-4 hidden md:block`}),(0,a.jsxs)(`div`,{className:`hidden md:flex items-center gap-1`,children:[e&&(0,a.jsx)(`div`,{className:`flex h-8 w-8 items-center justify-center rounded-lg vg-accent-chip ring-1 mr-1`,children:(0,a.jsx)(e,{className:`size-4.5! vg-accent-text`})}),r?(0,a.jsx)(n.ot,{children:(0,a.jsx)(n.ut,{children:u.map((e,t)=>(0,a.jsxs)(i.default.Fragment,{children:[t>0&&(0,a.jsx)(n.ft,{}),(0,a.jsx)(n.ct,{children:e.href?(0,a.jsx)(n.lt,{asChild:!0,children:(0,a.jsx)(l.NavLink,{to:e.href,children:e.label})}):(0,a.jsx)(n.dt,{children:e.label})})]},e.label))})}):(0,a.jsx)(`h1`,{className:`text-base font-semibold`,children:t})]}),(0,a.jsxs)(`div`,{className:`flex md:hidden items-center gap-2 min-w-0 flex-1`,children:[m?.href&&(0,a.jsx)(`button`,{type:`button`,title:f(`common.goBack`),onClick:()=>d(m.href),className:`shrink-0 flex items-center justify-center size-8 rounded-lg hover:bg-muted transition-colors`,children:(0,a.jsx)(o.IconChevronLeft,{className:`size-4`})}),e&&(0,a.jsx)(`div`,{className:`flex shrink-0 h-7 w-7 items-center justify-center rounded-lg vg-accent-chip ring-1`,children:(0,a.jsx)(e,{className:`size-3.5! vg-accent-text`})}),(0,a.jsx)(`span`,{className:`text-sm font-semibold truncate`,children:p?.label??t})]}),(0,a.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[c&&(0,a.jsx)(`div`,{className:`hidden md:flex items-center`,children:c}),(0,a.jsx)(`div`,{className:`hidden md:block`,children:(0,a.jsx)(n.i,{})}),(0,a.jsx)(n.A,{className:`md:hidden`})]})]})})},A=({icon:e,title:t,urlBase:n})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{icon:e,title:t,urlBase:n}),(0,a.jsx)(O,{})]}),j=({icon:e,feature:t,description:r,urlBase:i})=>{let o=n.M(),s=o?.isMobile??!1,c=o?.toggleSidebar??(()=>{}),u=(0,a.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,a.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-lg vg-accent-chip ring-1 ${s?`cursor-pointer active:scale-95 transition-transform`:``}`,onClick:s?c:void 0,onKeyDown:s?e=>{(e.key===`Enter`||e.key===` `)&&c()}:void 0,tabIndex:s?0:void 0,role:s?`button`:void 0,title:s?`Open navigation`:void 0,children:(0,a.jsx)(e,{className:`size-5! vg-accent-text`})}),(0,a.jsxs)(`div`,{className:`min-w-0`,children:[(0,a.jsx)(`h1`,{className:`text-base font-semibold leading-tight text-foreground truncate`,children:t}),(0,a.jsx)(`p`,{className:`hidden md:block text-xs text-muted-foreground leading-relaxed mt-0.5 truncate`,children:r})]})]});return i&&!s?(0,a.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,a.jsx)(l.NavLink,{to:i,className:`group inline-flex max-w-full`,children:u})}):(0,a.jsx)(`div`,{className:`min-w-0 flex-1`,children:u})};j.displayName=`StickyPageHeaderTitle`;var M=()=>null;M.displayName=`StickyPageHeaderAction`;var N=({children:e,menuLabel:n})=>{let r=(0,l.useNavigate)(),{t:c}=(0,s.useTranslation)(),u=[],d=[];i.default.Children.forEach(e,e=>{i.default.isValidElement(e)&&e.type?.displayName===`StickyPageHeaderAction`?u.push(e.props):d.push(e)});let f=n??c(`common.actions`);return(0,a.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[d,u.length>0&&(0,a.jsxs)(t.f,{children:[(0,a.jsx)(t.E,{asChild:!0,children:n?(0,a.jsxs)(t.u,{variant:`outline`,size:`sm`,className:`gap-1.5`,children:[(0,a.jsx)(o.IconDotsVertical,{className:`size-4`}),(0,a.jsx)(`span`,{className:`hidden sm:inline`,children:n})]}):(0,a.jsx)(t.u,{variant:`ghost`,size:`icon-sm`,"aria-label":f,title:f,children:(0,a.jsx)(o.IconDotsVertical,{className:`size-5!`})})}),(0,a.jsx)(t.m,{align:`end`,children:u.map(e=>{let n=e.icon??o.IconPlus;return(0,a.jsxs)(t.g,{disabled:e.disabled,onClick:()=>{e.href&&r(e.href),e.onClick&&e.onClick()},children:[(0,a.jsx)(n,{className:`size-4 mr-2`}),e.label]},e.label)})})]})]})};N.displayName=`StickyPageHeaderActions`;var P=Object.assign(({children:e})=>(0,a.jsx)(`header`,{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`,children:(0,a.jsxs)(`div`,{className:`flex w-full items-center gap-3 px-4 lg:px-6 py-3`,children:[(0,a.jsxs)(`div`,{className:`hidden md:flex items-center gap-1`,children:[(0,a.jsx)(n.A,{className:`-ml-1`}),(0,a.jsx)(n.H,{orientation:`vertical`,className:`mx-2 data-[orientation=vertical]:h-4`})]}),e]})}),{Title:j,Actions:N,Action:M}),F={comfortable:{outer:`px-1 md:px-6 lg:px-8 py-1 md:py-4`,inset:`md:mr-1.5 md:my-1.5`,main:`pt-2 md:pt-4`},compact:{outer:`px-0 py-0`,inset:`min-w-0 md:mx-1.5`,main:`pt-1 md:pt-2`}},I=({outletContext:e,density:t=`comfortable`,...r})=>{let i=F[t];return(0,a.jsx)(`div`,{className:`w-full ${i.outer} min-h-[calc(100svh-10.5rem)]`,children:(0,a.jsx)(`div`,{className:`flex min-h-full w-full md:rounded-xl md:border md:bg-sidebar md:shadow-sm`,children:(0,a.jsxs)(n.D,{defaultOpen:!0,className:`min-h-0!`,style:{"--sidebar-width":`calc(var(--spacing) * 72)`,"--header-height":`calc(var(--spacing) * 12)`,minHeight:0},children:[(0,a.jsx)(T,{...r}),(0,a.jsx)(n._,{className:`${i.inset} md:rounded-xl md:border bg-background md:shadow-sm`,children:(0,a.jsx)(`main`,{className:`flex flex-1 flex-col ${i.main} max-md:[&_.px-6]:px-2`,children:(0,a.jsx)(l.Outlet,{context:e})})})]})})})},L=()=>null;L.displayName=`SubPageHeaderAction`;var R=Object.assign(({icon:e,feature:s,name:c,description:u,urlBase:f,onDelete:p,open:m,setOpen:h,children:g})=>{let _=n.M(),v=_?.isMobile??!1,y=_?.toggleSidebar??(()=>{}),b=(0,l.useNavigate)(),x=[];i.default.Children.forEach(g,e=>{i.default.isValidElement(e)&&d(e)===`SubPageHeaderAction`&&x.push(e.props)});let S=(0,a.jsxs)(`div`,{className:`flex items-center gap-3`,children:[e&&(0,a.jsx)(`div`,{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`:``}`,onClick:v?y:void 0,onKeyDown:v?e=>{(e.key===`Enter`||e.key===` `)&&y()}:void 0,tabIndex:v?0:void 0,title:v?`Open navigation`:void 0,children:(0,a.jsx)(e,{className:`size-5! vg-accent-text`})}),(0,a.jsxs)(`div`,{className:`min-w-0`,children:[(0,a.jsx)(`h1`,{className:`text-base font-semibold leading-tight text-foreground`,children:s}),(0,a.jsx)(`p`,{className:`hidden md:block text-xs text-muted-foreground leading-relaxed mt-0.5`,children:u})]})]});return(0,a.jsxs)(`header`,{className:`mb-5`,children:[(0,a.jsxs)(`div`,{className:`flex w-full items-center gap-3 px-4 lg:px-6`,children:[(0,a.jsxs)(`div`,{className:`hidden md:flex items-center gap-1`,children:[(0,a.jsx)(n.A,{className:`-ml-1`}),(0,a.jsx)(n.H,{orientation:`vertical`,className:`mx-2 data-[orientation=vertical]:h-4`})]}),(0,a.jsx)(`div`,{className:`min-w-0 flex-1`,children:f&&!v?(0,a.jsx)(l.NavLink,{to:f,className:`group inline-flex`,children:S}):S}),(0,a.jsxs)(`div`,{className:`flex items-center gap-2`,children:[x.length>0&&(0,a.jsxs)(t.f,{children:[(0,a.jsx)(t.E,{asChild:!0,children:(0,a.jsxs)(t.u,{variant:`outline`,size:`sm`,className:`gap-1.5`,children:[(0,a.jsx)(o.IconDotsVertical,{className:`size-4`}),(0,a.jsx)(`span`,{className:`hidden sm:inline`,children:`Actions`})]})}),(0,a.jsx)(t.m,{align:`end`,children:x.map(e=>{let n=e.icon??o.IconPlus;return(0,a.jsxs)(t.g,{disabled:e.disabled,onClick:()=>{e.href&&b(e.href),e.onClick&&e.onClick()},children:[(0,a.jsx)(n,{className:`size-4 mr-2`}),e.label]},e.label)})})]}),m!==void 0&&p!==void 0&&h!==void 0&&(0,a.jsx)(r.i,{feature:s,name:c,onDelete:p,open:m,setOpen:h})]})]}),(0,a.jsx)(n.H,{className:`mt-3`})]})},{Action:L});exports.BlankSlate=r.n,exports.DialogDelete=r.i,exports.GradientButtonLink=r.r,exports.GridList=b,exports.InternalSidebar=T,exports.LoadProvider=r.t,exports.NavMain=E,exports.NavUser=D,exports.Page=A,exports.PageContent=O,exports.PageHeader=k,exports.StickyPageHeader=P,exports.SubPage=I,exports.SubPageHeader=R;
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./badge-locale-hQyWhAKe.cjs"),n=require("./breadcrumb.context-Vwc3lAlf.cjs"),r=require("./loading-provider-CmeMqLGk.cjs");let i=require("react");i=e.t(i,1);let a=require("react/jsx-runtime"),o=require("react-i18next"),s=require("@tabler/icons-react"),c=require("@iconify/react"),l=require("react-router-dom"),u=require("@tanstack/react-table");function d(e){return typeof e.type==`string`?void 0:e.type.displayName}var f=()=>null;f.displayName=`GridListNewButton`;var p=()=>null;p.displayName=`GridListAction`;var m=()=>null;m.displayName=`GridListItemAction`;var h=[`vg-accent-solid`,`from-emerald-500 to-teal-500`,`from-violet-500 to-purple-500`,`from-amber-500 to-orange-500`,`from-rose-500 to-pink-500`,`from-cyan-500 to-sky-500`,`from-fuchsia-500 to-pink-500`,`from-lime-500 to-emerald-500`];function g(e){let t=0;for(let n=0;n<e.length;n++)t=(e.codePointAt(n)??0)+((t<<5)-t);return h[Math.abs(t)%h.length]}function _(e){return e.split(/[\s\-_]+/).filter(Boolean).slice(0,2).map(e=>e[0].toUpperCase()).join(``)}var v={columnFilteringFeature:u.columnFilteringFeature,globalFilteringFeature:u.globalFilteringFeature,rowPaginationFeature:u.rowPaginationFeature,rowSortingFeature:u.rowSortingFeature,coreRowModel:(0,u.createCoreRowModel)(),filteredRowModel:(0,u.createFilteredRowModel)(),paginatedRowModel:(0,u.createPaginatedRowModel)(),sortedRowModel:(0,u.createSortedRowModel)()},y=[{accessorKey:`name`,header:`Name`},{accessorKey:`description`,header:`Description`},{accessorKey:`url`,header:`URL`}],b=Object.assign(({gridItemList:e,children:r})=>{let{t:f}=(0,o.useTranslation)(),p=(0,l.useNavigate)(),m=[],h=[];i.default.Children.forEach(r,e=>{if(i.default.isValidElement(e)){if(d(e)===`GridListNewButton`){let{to:n,label:r}=e.props;m.push({key:`new-${r}`,render:()=>(0,a.jsxs)(t.g,{onClick:()=>p(n),children:[(0,a.jsx)(s.IconPlus,{className:`size-4 mr-2`}),f(`sidebar.new`,{feature:r,defaultValue:`New {{feature}}`})]})})}else if(d(e)===`GridListAction`){let{children:t}=e.props;m.push({key:`action-${m.length}`,render:()=>(0,a.jsx)(a.Fragment,{children:t})})}else if(d(e)===`GridListItemAction`){let t=e.props;h.push({key:`item-action-${h.length}`,icon:t.icon,label:t.label,onClick:t.onClick,position:t.position??`right`})}}});let b=h.length>0,x=h.filter(e=>e.position===`left`),S=h.filter(e=>e.position===`right`),[C,w]=(0,i.useState)({pageIndex:0,pageSize:12}),[T,E]=i.default.useState([]),[D,O]=(0,i.useState)(``),k=(0,u.useTable)({features:v,data:e,columns:y,onSortingChange:E,state:{globalFilter:D,pagination:C,sorting:T},onGlobalFilterChange:O,getColumnCanGlobalFilter:e=>e.id===`name`||e.id===`description`,onPaginationChange:w}),A=k.getRowModel().rows;return(0,a.jsxs)(`div`,{className:`px-6`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,a.jsxs)(`div`,{className:`relative flex-1 max-w-sm`,children:[(0,a.jsx)(s.IconSearch,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground`}),(0,a.jsx)(t.l,{placeholder:f(`forms.common.search`),value:D??``,onChange:e=>O(e.target.value),className:`pl-9`})]}),(0,a.jsxs)(`span`,{className:`text-sm text-muted-foreground whitespace-nowrap`,children:[k.getFilteredRowModel().rows.length,` `,k.getFilteredRowModel().rows.length===1?f(`forms.common.item`):f(`forms.common.items`)]}),m.length>0&&(0,a.jsx)(`div`,{className:`ml-auto`,children:(0,a.jsxs)(t.f,{children:[(0,a.jsx)(t.E,{asChild:!0,children:(0,a.jsxs)(t.u,{variant:`outline`,size:`sm`,className:`gap-1.5`,children:[(0,a.jsx)(s.IconDotsVertical,{className:`size-4`}),(0,a.jsx)(`span`,{className:`hidden sm:inline`,children:f(`forms.common.actions`)})]})}),(0,a.jsx)(t.m,{align:`end`,children:m.map(e=>(0,a.jsx)(i.default.Fragment,{children:e.render()},e.key))})]})})]}),A.length>0?(0,a.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4`,children:A.map(e=>{let t=e.getValue(`name`),r=e.getValue(`description`),i=e.getValue(`url`),o=e.original.icon??void 0,u=g(t),d=_(t),p=(0,a.jsxs)(n.$,{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)]`,children:[(0,a.jsx)(`div`,{className:`h-1.5 bg-linear-to-r ${u} opacity-70 group-hover:opacity-100 transition-opacity`}),(0,a.jsxs)(`div`,{className:`p-4 flex items-start gap-3`,children:[b&&x.length>0&&(0,a.jsx)(`div`,{className:`flex items-center gap-1 shrink-0 mt-0.5`,children:x.map(t=>(0,a.jsx)(`button`,{type:`button`,title:t.label,onClick:()=>t.onClick(e.original),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`,children:t.icon},t.key))}),(0,a.jsx)(`div`,{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`,children:o?(0,a.jsx)(c.Icon,{icon:o,className:`size-5`}):d}),(0,a.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,a.jsx)(`h3`,{className:`font-medium text-sm truncate group-hover:text-[var(--vg-accent-fg)] transition-colors`,children:t}),r?(0,a.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1 line-clamp-2 leading-relaxed`,children:r}):(0,a.jsx)(`p`,{className:`text-xs text-muted-foreground/50 mt-1 italic`,children:f(`forms.common.noDescription`)})]}),b?S.length>0&&(0,a.jsx)(`div`,{className:`flex items-center gap-1 shrink-0 mt-0.5`,children:S.map(t=>(0,a.jsx)(`button`,{type:`button`,title:t.label,onClick:()=>t.onClick(e.original),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`,children:t.icon},t.key))}):(0,a.jsx)(s.IconChevronRight,{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`})]})]});return b?(0,a.jsx)(`div`,{className:`group`,children:p},e.id):(0,a.jsx)(l.NavLink,{to:i,className:`group`,children:p},e.id)})}):(0,a.jsx)(n.$,{className:`p-8`,children:(0,a.jsxs)(`div`,{className:`text-center text-muted-foreground`,children:[(0,a.jsx)(s.IconSearch,{className:`h-8 w-8 mx-auto mb-2 opacity-40`}),(0,a.jsx)(`p`,{className:`text-sm`,children:f(`forms.common.noResults`)})]})}),k.getPageCount()>1&&(0,a.jsxs)(`div`,{className:`flex items-center justify-end space-x-2 mt-4`,children:[(0,a.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,a.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:f(`forms.common.perPage`)}),(0,a.jsxs)(n.U,{value:`${k.state.pagination.pageSize}`,onValueChange:e=>k.setPageSize(Number(e)),children:[(0,a.jsx)(n.Z,{className:`h-8 w-17.5`,children:(0,a.jsx)(n.Q,{placeholder:k.state.pagination.pageSize})}),(0,a.jsx)(n.W,{side:`top`,children:[12,24,36,48].map(e=>(0,a.jsx)(n.K,{value:`${e}`,children:e},e))})]})]}),(0,a.jsx)(`div`,{className:`flex w-25 items-center justify-center text-sm font-medium`,children:f(`forms.common.pageOf`,{index:k.state.pagination.pageIndex+1,count:k.getPageCount()})}),(0,a.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,a.jsx)(t.u,{variant:`outline`,size:`sm`,onClick:()=>k.previousPage(),disabled:!k.getCanPreviousPage(),className:`h-8 w-8 p-0`,"aria-label":f(`common.goToPreviousPage`,{defaultValue:`Go to previous page`}),children:(0,a.jsx)(`span`,{children:`<`})}),(0,a.jsx)(t.u,{variant:`outline`,size:`sm`,onClick:()=>k.nextPage(),disabled:!k.getCanNextPage(),className:`h-8 w-8 p-0`,"aria-label":f(`common.goToNextPage`,{defaultValue:`Go to next page`}),children:(0,a.jsx)(`span`,{children:`>`})})]})]})]})},{NewButton:f,Action:p,ItemAction:m}),x=e=>!e.url&&(e.children?.length??0)>0,S=(e,t,n)=>{if(e.url){let r=(t??``)+e.url;if(n===r||n.startsWith(r+`/`))return!0}return e.children?.some(e=>S(e,t,n))??!1},C=e=>(e??0).toLocaleString(),w=(e,t,r,i,o)=>e.map(e=>(0,a.jsxs)(n.S,{children:[(0,a.jsx)(n.x,{tooltip:e.title,isActive:S(e,t,r),asChild:!0,children:(0,a.jsxs)(l.NavLink,{to:(t??``)+(e.url??``),onClick:o,children:[e.icon&&(0,a.jsx)(e.icon,{className:`size-5!`}),(0,a.jsx)(`span`,{children:e.title})]})}),!i&&e.children&&e.children.length>0&&(0,a.jsx)(n.v,{className:`ml-4`,children:w(e.children,t,r,i,o)})]},e.title)),T=({icon:e,feature:i,name:c,urlBase:u,isNew:d,data:f,onDelete:p,onExport:m,open:h,setOpen:g})=>{let{t:_}=(0,o.useTranslation)(),v=(0,l.useLocation)().pathname,{state:y,isMobile:b,setOpenMobile:S}=n.j(),T=y===`collapsed`,E=b?()=>S(!1):void 0;return(0,a.jsxs)(n.c,{collapsible:`icon`,variant:`inset`,position:`absolute`,children:[(0,a.jsx)(n.h,{className:`pb-3`,children:(0,a.jsx)(n.v,{children:(0,a.jsxs)(n.S,{className:`flex items-center`,children:[(0,a.jsx)(n.x,{asChild:!0,className:`data-[slot=sidebar-menu-button]:p-1.5!`,children:(0,a.jsxs)(l.NavLink,{to:u??`#`,className:`flex items-center gap-2.5`,children:[(0,a.jsx)(`div`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg vg-accent-chip ring-1`,children:(0,a.jsx)(e,{className:`size-5! vg-accent-text`})}),!T&&(0,a.jsx)(`span`,{className:`text-sm font-semibold whitespace-nowrap truncate`,children:d?_(`sidebar.new`,{feature:i}):c})]})}),!T&&(0,a.jsxs)(`div`,{className:`flex items-center gap-1 mr-auto`,children:[!d&&m&&(0,a.jsx)(t.u,{variant:`ghost`,size:`icon-sm`,onClick:m,children:(0,a.jsx)(s.IconDownload,{className:`size-5!`})}),!d&&p&&g&&(0,a.jsx)(r.i,{feature:i,name:c,onDelete:p,open:h??!1,setOpen:g})]})]})})}),(0,a.jsxs)(n.l,{children:[f?.counts&&f.counts.length>0&&(0,a.jsxs)(n.d,{children:[(0,a.jsx)(n.m,{children:_(`sidebar.indexing`)}),(0,a.jsx)(n.p,{className:`flex flex-col gap-2 pt-4`,children:(0,a.jsx)(n.v,{children:f.counts.map(e=>(0,a.jsxs)(n.S,{children:[(0,a.jsxs)(n.x,{tooltip:e.title+`: `+C(e.count),variant:`outline`,children:[e.icon&&(0,a.jsx)(e.icon,{className:`size-5!`}),(0,a.jsx)(`span`,{children:e.title})]}),!T&&(0,a.jsx)(n.b,{children:C(e.count)})]},e.title))})})]}),(()=>{let e=f?.navMain??[],t=d?e.filter(e=>e.showOnNew??e.url===`/detail`):e,r=t.filter(e=>!x(e)),o=t.filter(x);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.d,{children:[(0,a.jsx)(n.m,{children:i}),(0,a.jsx)(n.p,{className:`flex flex-col gap-2`,children:(0,a.jsx)(n.v,{children:w(r,u,v,T,E)})})]}),o.map(e=>(0,a.jsxs)(n.d,{children:[(0,a.jsx)(n.m,{children:e.title}),(0,a.jsx)(n.p,{className:`flex flex-col gap-2`,children:(0,a.jsx)(n.v,{children:w(e.children??[],u,v,T,E)})})]},e.title))]})})()]})]})};function E({groups:e}){let t=(0,l.useLocation)().pathname,{isMobile:r,setOpenMobile:i}=n.j();return(0,a.jsx)(a.Fragment,{children:e.map(e=>(0,a.jsxs)(n.d,{children:[e.label&&(0,a.jsx)(n.m,{children:e.label}),(0,a.jsx)(n.p,{className:`flex flex-col gap-2`,children:(0,a.jsx)(n.v,{children:e.items.map(e=>(0,a.jsx)(n.S,{children:(0,a.jsx)(n.x,{tooltip:e.title,isActive:t.startsWith(e.url),asChild:!0,children:(0,a.jsxs)(l.NavLink,{to:e.url,onClick:()=>r&&i(!1),children:[e.icon&&(0,a.jsx)(e.icon,{className:`size-6!`}),(0,a.jsx)(`span`,{children:e.title})]})})},e.title))})})]},e.label??`_ungrouped`))})}function D({user:e,accountUrl:r,logoutUrl:c,onLogout:u}){let{t:d}=(0,o.useTranslation)(),{isMobile:f}=n.j(),p=()=>{u?u():c&&(globalThis.location.href=c)},m=i.default.useMemo(()=>{let t=e.firstName||``,n=e.lastName||``;if(!t&&!n)return` `;let r=`${t} ${n}`.trim().split(` `).filter(Boolean);return r.length===1?r[0].charAt(0).toUpperCase():r[0].charAt(0).toUpperCase()+(r.at(-1)?.charAt(0).toUpperCase()??``)},[e]),h=e?.avatarUrl||``;return(0,a.jsx)(n.v,{children:(0,a.jsx)(n.S,{children:(0,a.jsxs)(t.f,{children:[(0,a.jsx)(t.E,{asChild:!0,children:(0,a.jsxs)(n.x,{size:`lg`,className:`data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground`,children:[(0,a.jsxs)(n.pt,{className:`h-8 w-8 rounded-lg`,children:[h&&(0,a.jsx)(n.ht,{src:h,alt:e.username}),(0,a.jsx)(n.mt,{className:`rounded-lg`,children:m})]}),(0,a.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,a.jsxs)(`span`,{className:`truncate font-medium`,children:[e.firstName,` `,e.lastName]}),(0,a.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.email})]}),(0,a.jsx)(s.IconDotsVertical,{className:`ml-auto size-4`})]})}),(0,a.jsxs)(t.m,{className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,side:f?`bottom`:`right`,align:`end`,sideOffset:4,children:[(0,a.jsx)(t._,{className:`p-0 font-normal`,children:(0,a.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-left text-sm`,children:[(0,a.jsxs)(n.pt,{className:`h-8 w-8 rounded-lg`,children:[h&&(0,a.jsx)(n.ht,{src:h,alt:e.username}),(0,a.jsx)(n.mt,{className:`rounded-lg`,children:m})]}),(0,a.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,a.jsxs)(`span`,{className:`truncate font-medium`,children:[e.firstName,` `,e.lastName]}),(0,a.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.email})]})]})}),(0,a.jsx)(t.x,{}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h,{children:(0,a.jsx)(l.NavLink,{to:r,className:`w-full`,children:(0,a.jsxs)(t.g,{children:[(0,a.jsx)(s.IconUserCircle,{}),d(`nav.account`)]})})}),(0,a.jsx)(t.x,{})]}),(0,a.jsxs)(t.g,{onClick:p,className:`cursor-pointer`,children:[(0,a.jsx)(s.IconLogout,{}),(0,a.jsx)(`span`,{children:d(`nav.logOut`)})]})]})]})})})}var O=()=>(0,a.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,a.jsx)(`div`,{className:`@container/main flex flex-1 flex-col gap-2`,children:(0,a.jsx)(`div`,{className:`flex flex-col gap-2 px-1 py-1 md:gap-3 md:px-2 md:py-2`,children:(0,a.jsx)(l.Outlet,{})})})}),k=({icon:e,title:t,urlBase:r,children:c})=>{let{items:u}=n.n(),d=(0,l.useNavigate)(),{t:f}=(0,o.useTranslation)(),p=u.length>0?u[u.length-1]:null,m=u.length>1?u[u.length-2]:null;return(0,a.jsx)(`header`,{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)`,children:(0,a.jsxs)(`div`,{className:`flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6`,children:[(0,a.jsx)(n.A,{className:`-ml-1 hidden md:flex`}),(0,a.jsx)(n.H,{orientation:`vertical`,className:`mx-2 data-[orientation=vertical]:h-4 hidden md:block`}),(0,a.jsxs)(`div`,{className:`hidden md:flex items-center gap-1`,children:[e&&(0,a.jsx)(`div`,{className:`flex h-8 w-8 items-center justify-center rounded-lg vg-accent-chip ring-1 mr-1`,children:(0,a.jsx)(e,{className:`size-4.5! vg-accent-text`})}),r?(0,a.jsx)(n.ot,{children:(0,a.jsx)(n.ut,{children:u.map((e,t)=>(0,a.jsxs)(i.default.Fragment,{children:[t>0&&(0,a.jsx)(n.ft,{}),(0,a.jsx)(n.ct,{children:e.href?(0,a.jsx)(n.lt,{asChild:!0,children:(0,a.jsx)(l.NavLink,{to:e.href,children:e.label})}):(0,a.jsx)(n.dt,{children:e.label})})]},e.label))})}):(0,a.jsx)(`h1`,{className:`text-base font-semibold`,children:t})]}),(0,a.jsxs)(`div`,{className:`flex md:hidden items-center gap-2 min-w-0 flex-1`,children:[m?.href&&(0,a.jsx)(`button`,{type:`button`,title:f(`common.goBack`),onClick:()=>d(m.href),className:`shrink-0 flex items-center justify-center size-8 rounded-lg hover:bg-muted transition-colors`,children:(0,a.jsx)(s.IconChevronLeft,{className:`size-4`})}),e&&(0,a.jsx)(`div`,{className:`flex shrink-0 h-7 w-7 items-center justify-center rounded-lg vg-accent-chip ring-1`,children:(0,a.jsx)(e,{className:`size-3.5! vg-accent-text`})}),(0,a.jsx)(`span`,{className:`text-sm font-semibold truncate`,children:p?.label??t})]}),(0,a.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[c&&(0,a.jsx)(`div`,{className:`hidden md:flex items-center`,children:c}),(0,a.jsx)(`div`,{className:`hidden md:block`,children:(0,a.jsx)(n.i,{})}),(0,a.jsx)(n.A,{className:`md:hidden`})]})]})})},A=({icon:e,title:t,urlBase:n})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{icon:e,title:t,urlBase:n}),(0,a.jsx)(O,{})]}),j=({icon:e,feature:t,description:r,urlBase:i})=>{let s=n.M(),c=s?.isMobile??!1,u=s?.toggleSidebar??(()=>{}),{t:d}=(0,o.useTranslation)(),f=(0,a.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-lg vg-accent-chip ring-1 ${c?`cursor-pointer active:scale-95 transition-transform`:``}`,onClick:c?u:void 0,onKeyDown:c?e=>{(e.key===`Enter`||e.key===` `)&&u()}:void 0,tabIndex:c?0:void 0,role:c?`button`:void 0,title:c?d(`common.openNavigation`,{defaultValue:`Open navigation`}):void 0,children:(0,a.jsx)(e,{className:`size-5! vg-accent-text`})}),p=(0,a.jsxs)(`div`,{className:`flex items-center gap-3`,children:[f,(0,a.jsxs)(`div`,{className:`min-w-0`,children:[(0,a.jsx)(`h1`,{className:`text-base font-semibold leading-tight text-foreground truncate`,children:t}),(0,a.jsx)(`p`,{className:`hidden md:block text-xs text-muted-foreground leading-relaxed mt-0.5 truncate`,children:r})]})]});return i&&!c?(0,a.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,a.jsx)(l.NavLink,{to:i,className:`group inline-flex max-w-full`,children:p})}):(0,a.jsx)(`div`,{className:`min-w-0 flex-1`,children:p})};j.displayName=`StickyPageHeaderTitle`;var M=()=>null;M.displayName=`StickyPageHeaderAction`;var N=({children:e,menuLabel:n})=>{let r=(0,l.useNavigate)(),{t:c}=(0,o.useTranslation)(),u=[],d=[];i.default.Children.forEach(e,e=>{i.default.isValidElement(e)&&e.type?.displayName===`StickyPageHeaderAction`?u.push(e.props):d.push(e)});let f=n??c(`common.actions`);return(0,a.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[d,u.length>0&&(0,a.jsxs)(t.f,{children:[(0,a.jsx)(t.E,{asChild:!0,children:n?(0,a.jsxs)(t.u,{variant:`outline`,size:`sm`,className:`gap-1.5`,children:[(0,a.jsx)(s.IconDotsVertical,{className:`size-4`}),(0,a.jsx)(`span`,{className:`hidden sm:inline`,children:n})]}):(0,a.jsx)(t.u,{variant:`ghost`,size:`icon-sm`,"aria-label":f,title:f,children:(0,a.jsx)(s.IconDotsVertical,{className:`size-5!`})})}),(0,a.jsx)(t.m,{align:`end`,children:u.map(e=>{let n=e.icon??s.IconPlus;return(0,a.jsxs)(t.g,{disabled:e.disabled,onClick:()=>{e.href&&r(e.href),e.onClick&&e.onClick()},children:[(0,a.jsx)(n,{className:`size-4 mr-2`}),e.label]},e.label)})})]})]})};N.displayName=`StickyPageHeaderActions`;var P=Object.assign(({children:e})=>(0,a.jsx)(`header`,{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`,children:(0,a.jsxs)(`div`,{className:`flex w-full items-center gap-3 px-4 lg:px-6 py-3`,children:[(0,a.jsxs)(`div`,{className:`hidden md:flex items-center gap-1`,children:[(0,a.jsx)(n.A,{className:`-ml-1`}),(0,a.jsx)(n.H,{orientation:`vertical`,className:`mx-2 data-[orientation=vertical]:h-4`})]}),e]})}),{Title:j,Actions:N,Action:M}),F={comfortable:{outer:`px-1 md:px-6 lg:px-8 py-1 md:py-4`,inset:`md:mr-1.5 md:my-1.5`,main:`pt-2 md:pt-4`},compact:{outer:`px-0 py-0`,inset:`min-w-0 md:mx-1.5`,main:`pt-1 md:pt-2`}},I=({outletContext:e,density:t=`comfortable`,...r})=>{let i=F[t];return(0,a.jsx)(`div`,{className:`w-full ${i.outer} min-h-[calc(100svh-10.5rem)]`,children:(0,a.jsx)(`div`,{className:`flex min-h-full w-full md:rounded-xl md:border md:bg-sidebar md:shadow-sm`,children:(0,a.jsxs)(n.D,{defaultOpen:!0,className:`min-h-0!`,style:{"--sidebar-width":`calc(var(--spacing) * 72)`,"--header-height":`calc(var(--spacing) * 12)`,minHeight:0},children:[(0,a.jsx)(T,{...r}),(0,a.jsx)(n._,{className:`${i.inset} md:rounded-xl md:border bg-background md:shadow-sm`,children:(0,a.jsx)(`main`,{className:`flex flex-1 flex-col ${i.main} max-md:[&_.px-6]:px-2`,children:(0,a.jsx)(l.Outlet,{context:e})})})]})})})},L=()=>null;L.displayName=`SubPageHeaderAction`;var R=Object.assign(({icon:e,feature:c,name:u,description:f,urlBase:p,onDelete:m,open:h,setOpen:g,children:_})=>{let v=n.M(),y=v?.isMobile??!1,b=v?.toggleSidebar??(()=>{}),x=(0,l.useNavigate)(),{t:S}=(0,o.useTranslation)(),C=[];i.default.Children.forEach(_,e=>{i.default.isValidElement(e)&&d(e)===`SubPageHeaderAction`&&C.push(e.props)});let w=e&&(0,a.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-lg vg-accent-chip ring-1 ${y?`cursor-pointer active:scale-95 transition-transform`:``}`,onClick:y?b:void 0,onKeyDown:y?e=>{(e.key===`Enter`||e.key===` `)&&b()}:void 0,tabIndex:y?0:void 0,title:y?S(`common.openNavigation`,{defaultValue:`Open navigation`}):void 0,children:(0,a.jsx)(e,{className:`size-5! vg-accent-text`})}),T=(0,a.jsxs)(`div`,{className:`flex items-center gap-3`,children:[w,(0,a.jsxs)(`div`,{className:`min-w-0`,children:[(0,a.jsx)(`h1`,{className:`text-base font-semibold leading-tight text-foreground`,children:c}),(0,a.jsx)(`p`,{className:`hidden md:block text-xs text-muted-foreground leading-relaxed mt-0.5`,children:f})]})]});return(0,a.jsxs)(`header`,{className:`mb-5`,children:[(0,a.jsxs)(`div`,{className:`flex w-full items-center gap-3 px-4 lg:px-6`,children:[(0,a.jsxs)(`div`,{className:`hidden md:flex items-center gap-1`,children:[(0,a.jsx)(n.A,{className:`-ml-1`}),(0,a.jsx)(n.H,{orientation:`vertical`,className:`mx-2 data-[orientation=vertical]:h-4`})]}),(0,a.jsx)(`div`,{className:`min-w-0 flex-1`,children:p&&!y?(0,a.jsx)(l.NavLink,{to:p,className:`group inline-flex`,children:T}):T}),(0,a.jsxs)(`div`,{className:`flex items-center gap-2`,children:[C.length>0&&(0,a.jsxs)(t.f,{children:[(0,a.jsx)(t.E,{asChild:!0,children:(0,a.jsxs)(t.u,{variant:`outline`,size:`sm`,className:`gap-1.5`,children:[(0,a.jsx)(s.IconDotsVertical,{className:`size-4`}),(0,a.jsx)(`span`,{className:`hidden sm:inline`,children:S(`common.actions`,{defaultValue:`Actions`})})]})}),(0,a.jsx)(t.m,{align:`end`,children:C.map(e=>{let n=e.icon??s.IconPlus;return(0,a.jsxs)(t.g,{disabled:e.disabled,onClick:()=>{e.href&&x(e.href),e.onClick&&e.onClick()},children:[(0,a.jsx)(n,{className:`size-4 mr-2`}),e.label]},e.label)})})]}),h!==void 0&&m!==void 0&&g!==void 0&&(0,a.jsx)(r.i,{feature:c,name:u,onDelete:m,open:h,setOpen:g})]})]}),(0,a.jsx)(n.H,{className:`mt-3`})]})},{Action:L});exports.BlankSlate=r.n,exports.DialogDelete=r.i,exports.GradientButtonLink=r.r,exports.GridList=b,exports.InternalSidebar=T,exports.LoadProvider=r.t,exports.NavMain=E,exports.NavUser=D,exports.Page=A,exports.PageContent=O,exports.PageHeader=k,exports.StickyPageHeader=P,exports.SubPage=I,exports.SubPageHeader=R;
|