@viglet/viglet-design-system 2026.3.12 → 2026.3.13
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 +39 -10
- package/dist/bento/bento-calendar.d.ts +52 -0
- package/dist/bento/bento-calendar.d.ts.map +1 -0
- package/dist/bento/bento-change-mark.d.ts +21 -0
- package/dist/bento/bento-change-mark.d.ts.map +1 -0
- package/dist/bento/bento-data-table.d.ts +8 -1
- package/dist/bento/bento-data-table.d.ts.map +1 -1
- package/dist/bento/bento-diff.d.ts +10 -1
- package/dist/bento/bento-diff.d.ts.map +1 -1
- package/dist/bento/bento-split-page.d.ts +31 -0
- package/dist/bento/bento-split-page.d.ts.map +1 -0
- package/dist/bento/bento-version-rail.d.ts.map +1 -1
- package/dist/bento/index.d.ts +4 -1
- package/dist/bento/index.d.ts.map +1 -1
- package/dist/bento.cjs +4 -4
- package/dist/bento.es.js +1430 -787
- package/dist/catalogue.json +189 -1
- package/dist/components/ui/viglet-assistant.d.ts +7 -1
- package/dist/components/ui/viglet-assistant.d.ts.map +1 -1
- package/dist/exports.json +14 -1
- package/dist/i18n/index.d.ts +44 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/locales/en/bento.json.d.ts +22 -0
- package/dist/i18n/locales/pt/bento.json.d.ts +22 -0
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.es.js +40 -0
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +971 -1083
- package/dist/preset.css +1 -1
- package/dist/{user.context-BXQ7lgg5.js → user.context-D3kmD3_y.js} +285 -169
- package/dist/user.context-gQvBxcwr.cjs +1 -0
- package/dist/viglet-design-system.css +1 -1
- package/docs/BENTO-AUTHORING.md +13 -2
- package/docs/reference/README.md +2 -1
- package/docs/reference/canvas.json +10 -1
- package/docs/reference/split.dc.html +164 -0
- package/package.json +1 -1
- package/scripts/lib/contrast.mjs +29 -3
- package/scripts/page-reference.mjs +3 -3
- package/dist/user.context-D01CI8gq.cjs +0 -1
package/dist/bento.es.js
CHANGED
|
@@ -1,57 +1,58 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "./utils-Fk5jmzzb.js";
|
|
3
3
|
import { a as t, c as n, d as r, g as i, o as a, p as o, u as s } from "./badge-locale-Bx7m7tg2.js";
|
|
4
|
-
import { A as c,
|
|
5
|
-
import { r as
|
|
6
|
-
import { Children as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
import { useTranslation as
|
|
9
|
-
import { IconAdjustmentsHorizontal as
|
|
10
|
-
import { Icon as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
4
|
+
import { A as c, B as l, C as u, F as d, G as f, I as p, K as m, M as h, N as g, P as _, R as v, S as y, T as b, _ as x, a as S, b as C, c as w, f as T, g as E, h as D, i as O, j as k, k as A, l as j, m as M, n as N, p as ee, q as P, r as te, s as F, u as I, v as L, x as R, z as ne } from "./user.context-D3kmD3_y.js";
|
|
5
|
+
import { r as re, t as ie } from "./loading-provider-D-_5G-08.js";
|
|
6
|
+
import { Children as ae, Fragment as oe, isValidElement as z, useEffect as B, useId as se, useMemo as V, useRef as H, useState as U, useSyncExternalStore as ce } from "react";
|
|
7
|
+
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
8
|
+
import { useTranslation as q } from "react-i18next";
|
|
9
|
+
import { IconAdjustmentsHorizontal as le, IconAlertTriangle as ue, IconArrowBackUp as de, IconArrowDown as fe, IconArrowLeft as J, IconArrowRight as pe, IconArrowUp as me, IconArrowsSort as he, IconBuildingCommunity as ge, IconBuildingSkyscraper as _e, IconChevronDown as ve, IconChevronLeft as ye, IconChevronRight as be, IconColumns3 as xe, IconDeviceFloppy as Se, IconDotsVertical as Ce, IconExternalLink as we, IconGripVertical as Te, IconHome as Ee, IconKeyboard as De, IconLayoutGrid as Oe, IconLogout as ke, IconPalette as Ae, IconPlus as je, IconRobot as Me, IconSearch as Ne, IconSparkles as Pe, IconTrash as Fe, IconUser as Ie, IconUserCircle as Le, IconUsers as Re, IconX as ze } from "@tabler/icons-react";
|
|
10
|
+
import { Icon as Be } from "@iconify/react";
|
|
11
|
+
import { useDefaultLayout as Ve } from "react-resizable-panels";
|
|
12
|
+
import { Link as He, useInRouterContext as Ue, useLocation as We, useNavigate as Ge } from "react-router-dom";
|
|
13
|
+
import { createCoreRowModel as Ke, createSortedRowModel as qe, rowSortingFeature as Je, useTable as Ye } from "@tanstack/react-table";
|
|
14
|
+
import { DndContext as Xe, KeyboardSensor as Ze, PointerSensor as Qe, closestCenter as $e, useSensor as et, useSensors as tt } from "@dnd-kit/core";
|
|
15
|
+
import { SortableContext as nt, arrayMove as rt, rectSortingStrategy as it, useSortable as at } from "@dnd-kit/sortable";
|
|
16
|
+
import { CSS as ot } from "@dnd-kit/utilities";
|
|
16
17
|
//#region src/bento/bento-actions-menu.tsx
|
|
17
|
-
var
|
|
18
|
+
var st = {
|
|
18
19
|
default: "",
|
|
19
20
|
destructive: "bento-item-danger"
|
|
20
|
-
},
|
|
21
|
-
function
|
|
22
|
-
process.env.NODE_ENV === "production" ||
|
|
21
|
+
}, ct = /* @__PURE__ */ new Set();
|
|
22
|
+
function lt(e) {
|
|
23
|
+
process.env.NODE_ENV === "production" || ct.has(e) || (ct.add(e), console.warn(`BentoActionsMenu: the action "${e}" has no id. Give it a stable name, such as "post.delete": it is rendered as data-action-id so a console verb can be matched to an agent verb, and it becomes required in the next release.`));
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
let { t: n } =
|
|
25
|
+
function ut({ actions: e, triggerLabel: t }) {
|
|
26
|
+
let { t: n } = q();
|
|
26
27
|
if (e.length === 0) return null;
|
|
27
|
-
for (let t of e) t.id ||
|
|
28
|
-
return /* @__PURE__ */
|
|
28
|
+
for (let t of e) t.id || lt(t.label);
|
|
29
|
+
return /* @__PURE__ */ K(k, { children: [/* @__PURE__ */ G(f, {
|
|
29
30
|
asChild: !0,
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ G("button", {
|
|
31
32
|
type: "button",
|
|
32
33
|
"aria-label": t ?? n("forms.formActions.moreActions", { defaultValue: "More actions" }),
|
|
33
34
|
className: "bento-tile-clickable inline-flex h-9 w-9 items-center justify-center rounded-full border border-border/60 bg-card/60 text-muted-foreground backdrop-blur transition-colors duration-200 hover:text-foreground",
|
|
34
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ G(Ce, { size: 18 })
|
|
35
36
|
})
|
|
36
|
-
}), /* @__PURE__ */
|
|
37
|
+
}), /* @__PURE__ */ G(g, {
|
|
37
38
|
align: "end",
|
|
38
39
|
sideOffset: 8,
|
|
39
40
|
className: "bento-dropdown min-w-44 p-1.5",
|
|
40
41
|
children: e.map((e) => {
|
|
41
|
-
let t = e.icon, n =
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
let t = e.icon, n = st[e.tone ?? "default"];
|
|
43
|
+
return /* @__PURE__ */ K(d, {
|
|
43
44
|
"data-action-id": e.id,
|
|
44
45
|
onSelect: e.onSelect,
|
|
45
46
|
disabled: e.disabled,
|
|
46
47
|
className: `bento-dropdown-item cursor-pointer gap-2 px-3 py-2 ${n}`,
|
|
47
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ G(t, { size: 16 }), e.label]
|
|
48
49
|
}, e.id ?? e.label);
|
|
49
50
|
})
|
|
50
51
|
})] });
|
|
51
52
|
}
|
|
52
53
|
//#endregion
|
|
53
54
|
//#region src/bento/bento-tones.ts
|
|
54
|
-
var
|
|
55
|
+
var dt = {
|
|
55
56
|
blue: "bento-tone-blue",
|
|
56
57
|
indigo: "bento-tone-indigo",
|
|
57
58
|
violet: "bento-tone-violet",
|
|
@@ -59,347 +60,349 @@ var Qe = {
|
|
|
59
60
|
amber: "bento-tone-amber",
|
|
60
61
|
rose: "bento-tone-rose",
|
|
61
62
|
slate: "bento-tone-slate"
|
|
62
|
-
},
|
|
63
|
-
function
|
|
64
|
-
return `bento-chip ${
|
|
63
|
+
}, ft = Object.keys(dt);
|
|
64
|
+
function Y(e) {
|
|
65
|
+
return `bento-chip ${dt[e] ?? dt.slate}`;
|
|
65
66
|
}
|
|
66
67
|
//#endregion
|
|
67
68
|
//#region src/bento/bento-count-tile.tsx
|
|
68
|
-
function
|
|
69
|
-
let o = /* @__PURE__ */
|
|
70
|
-
className: `grid h-9 w-9 place-items-center rounded-2xl text-white shadow-md ${
|
|
71
|
-
children: /* @__PURE__ */
|
|
72
|
-
}), /* @__PURE__ */
|
|
69
|
+
function pt({ to: e, icon: t, tone: n, label: r, count: i, span: a }) {
|
|
70
|
+
let o = /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("span", {
|
|
71
|
+
className: `grid h-9 w-9 place-items-center rounded-2xl text-white shadow-md ${Y(n)}`,
|
|
72
|
+
children: /* @__PURE__ */ G(t, { size: 18 })
|
|
73
|
+
}), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("div", {
|
|
73
74
|
className: "text-3xl font-semibold tabular-nums tracking-tight",
|
|
74
75
|
children: i
|
|
75
|
-
}), /* @__PURE__ */
|
|
76
|
+
}), /* @__PURE__ */ G("div", {
|
|
76
77
|
className: "text-[11px] uppercase tracking-wider text-muted-foreground",
|
|
77
78
|
children: r
|
|
78
79
|
})] })] }), s = `bento-tile bento-glass group relative flex flex-col justify-between overflow-hidden p-4 ${a}${e ? " bento-tile-clickable" : ""}`;
|
|
79
|
-
return e ? /* @__PURE__ */
|
|
80
|
+
return e ? /* @__PURE__ */ G(He, {
|
|
80
81
|
to: e,
|
|
81
82
|
className: s,
|
|
82
83
|
children: o
|
|
83
|
-
}) : /* @__PURE__ */
|
|
84
|
+
}) : /* @__PURE__ */ G("div", {
|
|
84
85
|
className: s,
|
|
85
86
|
children: o
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
89
|
//#endregion
|
|
89
90
|
//#region src/bento/bento-data-table.tsx
|
|
90
|
-
var
|
|
91
|
-
rowSortingFeature:
|
|
92
|
-
coreRowModel:
|
|
93
|
-
sortedRowModel:
|
|
91
|
+
var mt = 6, ht = {
|
|
92
|
+
rowSortingFeature: Je,
|
|
93
|
+
coreRowModel: Ke(),
|
|
94
|
+
sortedRowModel: qe()
|
|
94
95
|
};
|
|
95
|
-
function
|
|
96
|
-
let { t:
|
|
97
|
-
|
|
98
|
-
let
|
|
99
|
-
F(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
function gt({ rows: t, getRowId: n, columns: r, label: i, getRowLabel: a, rowActions: o, selectionActions: s, selectedIds: c, onSelectionChange: l, selectionScope: u, layout: d, onLayoutChange: p, onRowOpen: _, rowHeight: v = 44, height: y = 480, empty: b }) {
|
|
97
|
+
let { t: x } = q(), [S, C] = U([]), [w, T] = U({ hidden: [] }), [E, D] = U(/* @__PURE__ */ new Set()), [O, A] = U(null), [j, M] = U(u), [N, ee] = U(void 0);
|
|
98
|
+
j !== u && (M(u), D(/* @__PURE__ */ new Set()), ee(c), A(null));
|
|
99
|
+
let te = V(() => new Set(c ?? []), [c]), F = E;
|
|
100
|
+
c !== void 0 && (F = c === N ? /* @__PURE__ */ new Set() : te);
|
|
101
|
+
let I = H(u);
|
|
102
|
+
B(() => {
|
|
103
|
+
I.current !== u && (I.current = u, l?.([]));
|
|
104
|
+
}, [u, l]);
|
|
105
|
+
let [L, R] = U(0), [ne, re] = U(0), ie = H(null), ae = H(/* @__PURE__ */ new Map()), oe = H(!1), z = (s?.length ?? 0) > 0, se = (e) => a?.(e) ?? n(e), ce = V(() => r.map((e) => ({
|
|
103
106
|
id: e.id,
|
|
104
107
|
accessorFn: (t) => e.sortValue?.(t) ?? null,
|
|
105
108
|
enableSorting: e.sortValue !== void 0
|
|
106
|
-
})), [r]), W =
|
|
107
|
-
features:
|
|
109
|
+
})), [r]), W = Ye({
|
|
110
|
+
features: ht,
|
|
108
111
|
data: t,
|
|
109
|
-
columns:
|
|
110
|
-
state: { sorting:
|
|
111
|
-
onSortingChange:
|
|
112
|
-
}).getRowModel().rows.map((e) => e.original),
|
|
113
|
-
|
|
114
|
-
...
|
|
112
|
+
columns: ce,
|
|
113
|
+
state: { sorting: S },
|
|
114
|
+
onSortingChange: C
|
|
115
|
+
}).getRowModel().rows.map((e) => e.original), le = d ?? w, ue = r.filter((e) => e.hideable === !1 || !le.hidden.includes(e.id)), de = [
|
|
116
|
+
z ? "2.75rem" : null,
|
|
117
|
+
...ue.map((e) => e.width ?? "minmax(8rem, 1fr)"),
|
|
115
118
|
o?.length ? "3.25rem" : null
|
|
116
|
-
].filter(Boolean).join(" "),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}, [
|
|
120
|
-
function
|
|
121
|
-
|
|
119
|
+
].filter(Boolean).join(" "), J = W.length, pe = Math.max(1, Math.floor(y / v)), ge = Math.max(0, Math.floor(ne / v) - mt), _e = Math.min(J, Math.ceil((ne + y) / v) + mt), ve = Math.min(L, Math.max(0, J - 1));
|
|
120
|
+
B(() => {
|
|
121
|
+
oe.current && (oe.current = !1, ae.current.get(ve)?.focus());
|
|
122
|
+
}, [ve, ge]);
|
|
123
|
+
function ye(e) {
|
|
124
|
+
c === void 0 && D(e), l?.([...e]);
|
|
122
125
|
}
|
|
123
|
-
function
|
|
126
|
+
function be(e, t) {
|
|
124
127
|
let [r, i] = e <= t ? [e, t] : [t, e];
|
|
125
|
-
|
|
128
|
+
ye(new Set(W.slice(r, i + 1).map(n)));
|
|
126
129
|
}
|
|
127
|
-
function
|
|
128
|
-
let t = n(W[e]), r = new Set(
|
|
129
|
-
r.has(t) ? r.delete(t) : r.add(t),
|
|
130
|
+
function Se(e) {
|
|
131
|
+
let t = n(W[e]), r = new Set(F);
|
|
132
|
+
r.has(t) ? r.delete(t) : r.add(t), ye(r), A(e);
|
|
130
133
|
}
|
|
131
|
-
function
|
|
132
|
-
let n = Math.max(0, Math.min(
|
|
133
|
-
if (t &&
|
|
134
|
-
let e =
|
|
135
|
-
|
|
134
|
+
function Ce(e, t) {
|
|
135
|
+
let n = Math.max(0, Math.min(J - 1, e));
|
|
136
|
+
if (t && z) {
|
|
137
|
+
let e = O ?? ve;
|
|
138
|
+
A(e), be(e, n);
|
|
136
139
|
}
|
|
137
|
-
let r =
|
|
140
|
+
let r = ie.current, i = n * v;
|
|
138
141
|
if (r) {
|
|
139
142
|
let e = r.scrollTop;
|
|
140
|
-
i < e ? e = i : i +
|
|
143
|
+
i < e ? e = i : i + v > e + y && (e = i + v - y), e !== r.scrollTop && (r.scrollTop = e, re(e));
|
|
141
144
|
}
|
|
142
|
-
|
|
145
|
+
oe.current = !0, R(n);
|
|
143
146
|
}
|
|
144
|
-
function
|
|
147
|
+
function we(e, t) {
|
|
145
148
|
if (e.target !== e.currentTarget) return;
|
|
146
149
|
let r = e.shiftKey;
|
|
147
150
|
switch (e.key) {
|
|
148
151
|
case "ArrowDown":
|
|
149
|
-
|
|
152
|
+
Ce(t + 1, r);
|
|
150
153
|
break;
|
|
151
154
|
case "ArrowUp":
|
|
152
|
-
|
|
155
|
+
Ce(t - 1, r);
|
|
153
156
|
break;
|
|
154
157
|
case "PageDown":
|
|
155
|
-
|
|
158
|
+
Ce(t + pe, r);
|
|
156
159
|
break;
|
|
157
160
|
case "PageUp":
|
|
158
|
-
|
|
161
|
+
Ce(t - pe, r);
|
|
159
162
|
break;
|
|
160
163
|
case "Home":
|
|
161
|
-
|
|
164
|
+
Ce(0, r);
|
|
162
165
|
break;
|
|
163
166
|
case "End":
|
|
164
|
-
|
|
167
|
+
Ce(J - 1, r);
|
|
165
168
|
break;
|
|
166
169
|
case " ":
|
|
167
|
-
if (!
|
|
168
|
-
|
|
170
|
+
if (!z) return;
|
|
171
|
+
Se(t);
|
|
169
172
|
break;
|
|
170
173
|
case "Enter":
|
|
171
|
-
if (!
|
|
172
|
-
|
|
174
|
+
if (!_) return;
|
|
175
|
+
_(W[t]);
|
|
173
176
|
break;
|
|
174
177
|
case "Escape":
|
|
175
|
-
if (!
|
|
176
|
-
|
|
178
|
+
if (!z || F.size === 0) return;
|
|
179
|
+
ye(/* @__PURE__ */ new Set()), A(null);
|
|
177
180
|
break;
|
|
178
181
|
case "a":
|
|
179
182
|
case "A":
|
|
180
|
-
if (!
|
|
181
|
-
|
|
183
|
+
if (!z || !(e.ctrlKey || e.metaKey)) return;
|
|
184
|
+
ye(new Set(W.map(n)));
|
|
182
185
|
break;
|
|
183
186
|
default: return;
|
|
184
187
|
}
|
|
185
188
|
e.preventDefault();
|
|
186
189
|
}
|
|
187
|
-
function
|
|
188
|
-
if (!e.target.closest("button, a, input, [role='checkbox']") && (
|
|
190
|
+
function Te(e, t) {
|
|
191
|
+
if (!e.target.closest("button, a, input, [role='checkbox']") && (R(t), z)) {
|
|
189
192
|
if (e.shiftKey) {
|
|
190
|
-
let e =
|
|
191
|
-
|
|
192
|
-
} else e.metaKey || e.ctrlKey ?
|
|
193
|
+
let e = O ?? ve;
|
|
194
|
+
A(e), be(e, t);
|
|
195
|
+
} else e.metaKey || e.ctrlKey ? Se(t) : (ye(/* @__PURE__ */ new Set([n(W[t])])), A(t));
|
|
193
196
|
}
|
|
194
197
|
}
|
|
195
|
-
function
|
|
196
|
-
let t =
|
|
197
|
-
t ? t.desc ?
|
|
198
|
+
function Ee(e) {
|
|
199
|
+
let t = S.find((t) => t.id === e);
|
|
200
|
+
t ? t.desc ? C([]) : C([{
|
|
198
201
|
id: e,
|
|
199
202
|
desc: !0
|
|
200
|
-
}]) :
|
|
203
|
+
}]) : C([{
|
|
201
204
|
id: e,
|
|
202
205
|
desc: !1
|
|
203
206
|
}]);
|
|
204
207
|
}
|
|
205
|
-
function
|
|
206
|
-
let n = { hidden: t ? [...
|
|
207
|
-
d === void 0 &&
|
|
208
|
+
function De(e, t) {
|
|
209
|
+
let n = { hidden: t ? [...le.hidden, e] : le.hidden.filter((t) => t !== e) };
|
|
210
|
+
d === void 0 && T(n), p?.(n);
|
|
208
211
|
}
|
|
209
|
-
let
|
|
210
|
-
return /* @__PURE__ */
|
|
212
|
+
let Oe = W.filter((e) => F.has(n(e))), ke = J > 0 && Oe.length === J, Ae = r.filter((e) => e.hideable !== !1);
|
|
213
|
+
return /* @__PURE__ */ K("div", {
|
|
211
214
|
"data-slot": "bento-data-table",
|
|
212
215
|
className: "bento-glass overflow-hidden rounded-2xl",
|
|
213
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ K("div", {
|
|
214
217
|
className: "flex min-h-12 flex-wrap items-center gap-2 border-b border-border/50 px-3 py-2",
|
|
215
218
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ G("span", {
|
|
217
220
|
"aria-live": "polite",
|
|
218
221
|
className: "text-sm font-medium",
|
|
219
|
-
children:
|
|
222
|
+
children: Oe.length > 0 ? x("bento.table.selected", {
|
|
220
223
|
defaultValue: "{{count}} selected",
|
|
221
|
-
count:
|
|
224
|
+
count: Oe.length
|
|
222
225
|
}) : ""
|
|
223
226
|
}),
|
|
224
|
-
|
|
227
|
+
Oe.length > 0 && /* @__PURE__ */ K("div", {
|
|
225
228
|
role: "toolbar",
|
|
226
|
-
"aria-label":
|
|
229
|
+
"aria-label": x("bento.table.selectionActions", { defaultValue: "Actions on the selection" }),
|
|
227
230
|
className: "flex flex-wrap items-center gap-2",
|
|
228
231
|
children: [s?.map((t) => {
|
|
229
232
|
let n = t.icon;
|
|
230
|
-
return /* @__PURE__ */
|
|
233
|
+
return /* @__PURE__ */ K(P, {
|
|
231
234
|
variant: "outline",
|
|
232
235
|
size: "sm",
|
|
233
236
|
className: e("gap-1.5", t.tone === "destructive" && "bento-item-danger"),
|
|
234
|
-
onClick: () => t.onSelect(
|
|
235
|
-
children: [/* @__PURE__ */
|
|
237
|
+
onClick: () => t.onSelect(Oe),
|
|
238
|
+
children: [/* @__PURE__ */ G(n, { size: 16 }), t.label]
|
|
236
239
|
}, t.id);
|
|
237
|
-
}), /* @__PURE__ */
|
|
240
|
+
}), /* @__PURE__ */ G(P, {
|
|
238
241
|
variant: "ghost",
|
|
239
242
|
size: "sm",
|
|
240
|
-
onClick: () =>
|
|
241
|
-
children:
|
|
243
|
+
onClick: () => ye(/* @__PURE__ */ new Set()),
|
|
244
|
+
children: x("bento.table.clearSelection", { defaultValue: "Clear selection" })
|
|
242
245
|
})]
|
|
243
246
|
}),
|
|
244
|
-
|
|
247
|
+
Ae.length > 0 && /* @__PURE__ */ K(k, { children: [/* @__PURE__ */ G(f, {
|
|
245
248
|
asChild: !0,
|
|
246
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ K(P, {
|
|
247
250
|
variant: "ghost",
|
|
248
251
|
size: "sm",
|
|
249
252
|
className: "ml-auto gap-1.5",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ G(xe, {
|
|
251
254
|
size: 16,
|
|
252
255
|
"aria-hidden": "true"
|
|
253
|
-
}),
|
|
256
|
+
}), x("bento.table.columns", { defaultValue: "Columns" })]
|
|
254
257
|
})
|
|
255
|
-
}), /* @__PURE__ */
|
|
258
|
+
}), /* @__PURE__ */ G(g, {
|
|
256
259
|
align: "end",
|
|
257
260
|
className: "bento-dropdown min-w-44 p-1.5",
|
|
258
|
-
children:
|
|
259
|
-
checked: !
|
|
260
|
-
onCheckedChange: (t) =>
|
|
261
|
+
children: Ae.map((e) => /* @__PURE__ */ G(h, {
|
|
262
|
+
checked: !le.hidden.includes(e.id),
|
|
263
|
+
onCheckedChange: (t) => De(e.id, t !== !0),
|
|
261
264
|
onSelect: (e) => e.preventDefault(),
|
|
262
265
|
children: e.header
|
|
263
266
|
}, e.id))
|
|
264
267
|
})] })
|
|
265
268
|
]
|
|
266
|
-
}), /* @__PURE__ */
|
|
269
|
+
}), /* @__PURE__ */ K("div", {
|
|
267
270
|
role: "grid",
|
|
268
271
|
"aria-label": i,
|
|
269
|
-
"aria-rowcount":
|
|
270
|
-
"aria-colcount":
|
|
271
|
-
"aria-multiselectable":
|
|
272
|
-
children: [/* @__PURE__ */
|
|
272
|
+
"aria-rowcount": J + 1,
|
|
273
|
+
"aria-colcount": ue.length + +!!z + +!!o?.length,
|
|
274
|
+
"aria-multiselectable": z ? "true" : void 0,
|
|
275
|
+
children: [/* @__PURE__ */ G("div", {
|
|
273
276
|
role: "rowgroup",
|
|
274
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ K("div", {
|
|
275
278
|
role: "row",
|
|
276
279
|
"aria-rowindex": 1,
|
|
277
280
|
className: "grid items-center border-b border-border/50 px-1 text-xs font-medium text-muted-foreground",
|
|
278
281
|
style: {
|
|
279
|
-
gridTemplateColumns:
|
|
280
|
-
minHeight:
|
|
282
|
+
gridTemplateColumns: de,
|
|
283
|
+
minHeight: v
|
|
281
284
|
},
|
|
282
285
|
children: [
|
|
283
|
-
|
|
286
|
+
z && /* @__PURE__ */ G("div", {
|
|
284
287
|
role: "columnheader",
|
|
285
288
|
className: "grid place-items-center",
|
|
286
|
-
children: /* @__PURE__ */
|
|
287
|
-
"aria-label":
|
|
288
|
-
checked:
|
|
289
|
-
onCheckedChange: () =>
|
|
289
|
+
children: /* @__PURE__ */ G(m, {
|
|
290
|
+
"aria-label": x("bento.table.selectAll", { defaultValue: "Select all rows" }),
|
|
291
|
+
checked: ke ? !0 : Oe.length > 0 && "indeterminate",
|
|
292
|
+
onCheckedChange: () => ye(ke ? /* @__PURE__ */ new Set() : new Set(W.map(n)))
|
|
290
293
|
})
|
|
291
294
|
}),
|
|
292
|
-
|
|
293
|
-
let t =
|
|
294
|
-
return /* @__PURE__ */
|
|
295
|
+
ue.map((e) => {
|
|
296
|
+
let t = S.find((t) => t.id === e.id), n = t ? t.desc ? "descending" : "ascending" : "none";
|
|
297
|
+
return /* @__PURE__ */ G("div", {
|
|
295
298
|
role: "columnheader",
|
|
296
299
|
"aria-sort": e.sortValue ? n : void 0,
|
|
297
300
|
className: "min-w-0 px-2",
|
|
298
|
-
children: e.sortValue ? /* @__PURE__ */
|
|
301
|
+
children: e.sortValue ? /* @__PURE__ */ K("button", {
|
|
299
302
|
type: "button",
|
|
300
|
-
onClick: () =>
|
|
303
|
+
onClick: () => Ee(e.id),
|
|
301
304
|
className: "inline-flex max-w-full items-center gap-1 rounded-md py-1 hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",
|
|
302
305
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ G("span", {
|
|
304
307
|
className: "truncate",
|
|
305
308
|
children: e.header
|
|
306
309
|
}),
|
|
307
|
-
n === "ascending" && /* @__PURE__ */
|
|
310
|
+
n === "ascending" && /* @__PURE__ */ G(me, {
|
|
308
311
|
size: 14,
|
|
309
312
|
"aria-hidden": "true"
|
|
310
313
|
}),
|
|
311
|
-
n === "descending" && /* @__PURE__ */
|
|
314
|
+
n === "descending" && /* @__PURE__ */ G(fe, {
|
|
312
315
|
size: 14,
|
|
313
316
|
"aria-hidden": "true"
|
|
314
317
|
}),
|
|
315
|
-
n === "none" && /* @__PURE__ */
|
|
318
|
+
n === "none" && /* @__PURE__ */ G(he, {
|
|
316
319
|
size: 14,
|
|
317
320
|
"aria-hidden": "true",
|
|
318
321
|
className: "opacity-40"
|
|
319
322
|
})
|
|
320
323
|
]
|
|
321
|
-
}) : /* @__PURE__ */
|
|
324
|
+
}) : /* @__PURE__ */ G("span", {
|
|
322
325
|
className: "block truncate py-1",
|
|
323
326
|
children: e.header
|
|
324
327
|
})
|
|
325
328
|
}, e.id);
|
|
326
329
|
}),
|
|
327
|
-
o?.length ? /* @__PURE__ */
|
|
330
|
+
o?.length ? /* @__PURE__ */ G("div", {
|
|
328
331
|
role: "columnheader",
|
|
329
332
|
className: "px-2",
|
|
330
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ G("span", {
|
|
331
334
|
className: "sr-only",
|
|
332
|
-
children:
|
|
335
|
+
children: x("bento.table.actions", { defaultValue: "Actions" })
|
|
333
336
|
})
|
|
334
337
|
}) : null
|
|
335
338
|
]
|
|
336
339
|
})
|
|
337
|
-
}),
|
|
340
|
+
}), J === 0 ? /* @__PURE__ */ G("div", {
|
|
338
341
|
role: "rowgroup",
|
|
339
|
-
children: /* @__PURE__ */
|
|
342
|
+
children: /* @__PURE__ */ G("div", {
|
|
340
343
|
role: "row",
|
|
341
344
|
"aria-rowindex": 2,
|
|
342
|
-
children: /* @__PURE__ */
|
|
345
|
+
children: /* @__PURE__ */ G("div", {
|
|
343
346
|
role: "gridcell",
|
|
344
347
|
className: "px-4 py-10 text-center text-sm text-muted-foreground",
|
|
345
|
-
children:
|
|
348
|
+
children: b ?? x("bento.table.empty", { defaultValue: "Nothing to show" })
|
|
346
349
|
})
|
|
347
350
|
})
|
|
348
|
-
}) : /* @__PURE__ */
|
|
351
|
+
}) : /* @__PURE__ */ G("div", {
|
|
349
352
|
role: "rowgroup",
|
|
350
|
-
ref:
|
|
351
|
-
onScroll: (e) =>
|
|
353
|
+
ref: ie,
|
|
354
|
+
onScroll: (e) => re(e.currentTarget.scrollTop),
|
|
352
355
|
className: "relative overflow-y-auto",
|
|
353
|
-
style: { height:
|
|
354
|
-
children: /* @__PURE__ */
|
|
355
|
-
style: { height:
|
|
356
|
+
style: { height: y },
|
|
357
|
+
children: /* @__PURE__ */ G("div", {
|
|
358
|
+
style: { height: J * v },
|
|
356
359
|
className: "relative",
|
|
357
|
-
children: W.slice(
|
|
358
|
-
let i =
|
|
359
|
-
return /* @__PURE__ */
|
|
360
|
+
children: W.slice(ge, _e).map((t, r) => {
|
|
361
|
+
let i = ge + r, a = n(t), s = F.has(a), c = se(t);
|
|
362
|
+
return /* @__PURE__ */ K("div", {
|
|
360
363
|
ref: (e) => {
|
|
361
|
-
e ?
|
|
364
|
+
e ? ae.current.set(i, e) : ae.current.delete(i);
|
|
362
365
|
},
|
|
363
366
|
role: "row",
|
|
364
367
|
"aria-rowindex": i + 2,
|
|
365
|
-
"aria-selected":
|
|
366
|
-
tabIndex: i ===
|
|
367
|
-
onKeyDown: (e) =>
|
|
368
|
-
onClick: (e) =>
|
|
369
|
-
onDoubleClick: () =>
|
|
368
|
+
"aria-selected": z ? s ? "true" : "false" : void 0,
|
|
369
|
+
tabIndex: i === ve ? 0 : -1,
|
|
370
|
+
onKeyDown: (e) => we(e, i),
|
|
371
|
+
onClick: (e) => Te(e, i),
|
|
372
|
+
onDoubleClick: () => _?.(t),
|
|
370
373
|
onFocus: (e) => {
|
|
371
|
-
e.target === e.currentTarget &&
|
|
374
|
+
e.target === e.currentTarget && R(i);
|
|
372
375
|
},
|
|
373
376
|
className: e("absolute inset-x-0 grid items-center border-b border-border/30 px-1 text-sm outline-none transition-colors", "hover:bg-muted/40 focus-visible:bg-muted/60 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring", s && "bg-primary/10 hover:bg-primary/15"),
|
|
374
377
|
style: {
|
|
375
|
-
top: i *
|
|
376
|
-
height:
|
|
377
|
-
gridTemplateColumns:
|
|
378
|
+
top: i * v,
|
|
379
|
+
height: v,
|
|
380
|
+
gridTemplateColumns: de
|
|
378
381
|
},
|
|
379
382
|
children: [
|
|
380
|
-
|
|
383
|
+
z && /* @__PURE__ */ G("div", {
|
|
381
384
|
role: "gridcell",
|
|
382
385
|
className: "grid place-items-center",
|
|
383
|
-
children: /* @__PURE__ */
|
|
386
|
+
children: /* @__PURE__ */ G(m, {
|
|
384
387
|
tabIndex: -1,
|
|
385
|
-
"aria-label":
|
|
388
|
+
"aria-label": x("bento.table.selectRow", {
|
|
386
389
|
defaultValue: "Select {{row}}",
|
|
387
390
|
row: c
|
|
388
391
|
}),
|
|
389
392
|
checked: s,
|
|
390
|
-
onCheckedChange: () =>
|
|
393
|
+
onCheckedChange: () => Se(i)
|
|
391
394
|
})
|
|
392
395
|
}),
|
|
393
|
-
|
|
396
|
+
ue.map((e) => /* @__PURE__ */ G("div", {
|
|
394
397
|
role: "gridcell",
|
|
395
398
|
className: "min-w-0 truncate px-2",
|
|
396
399
|
children: e.cell(t)
|
|
397
400
|
}, e.id)),
|
|
398
|
-
o?.length ? /* @__PURE__ */
|
|
401
|
+
o?.length ? /* @__PURE__ */ G("div", {
|
|
399
402
|
role: "gridcell",
|
|
400
403
|
className: "grid place-items-center",
|
|
401
|
-
children: /* @__PURE__ */
|
|
402
|
-
triggerLabel:
|
|
404
|
+
children: /* @__PURE__ */ G(ut, {
|
|
405
|
+
triggerLabel: x("bento.table.rowActions", {
|
|
403
406
|
defaultValue: "Actions for {{row}}",
|
|
404
407
|
row: c
|
|
405
408
|
}),
|
|
@@ -422,24 +425,24 @@ function rt({ rows: t, getRowId: n, columns: r, label: i, getRowLabel: a, rowAct
|
|
|
422
425
|
}
|
|
423
426
|
//#endregion
|
|
424
427
|
//#region src/bento/bento-empty-state.tsx
|
|
425
|
-
function
|
|
426
|
-
let l =
|
|
427
|
-
return /* @__PURE__ */
|
|
428
|
+
function _t({ icon: t = Pe, tone: n = "indigo", title: r, description: i, action: a, align: o = "center", titleLevel: s = 2, className: c }) {
|
|
429
|
+
let l = Y(n), u = o === "center", d = `h${s}`;
|
|
430
|
+
return /* @__PURE__ */ K("div", {
|
|
428
431
|
className: e("bento-tile bento-glass flex flex-col gap-3 rounded-3xl p-8", u ? "items-center text-center" : "items-start text-left", c),
|
|
429
432
|
children: [
|
|
430
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ G("span", {
|
|
431
434
|
className: `grid h-12 w-12 place-items-center rounded-2xl ${l} text-white shadow-md`,
|
|
432
|
-
children: /* @__PURE__ */
|
|
435
|
+
children: /* @__PURE__ */ G(t, { size: 24 })
|
|
433
436
|
}),
|
|
434
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ G(d, {
|
|
435
438
|
className: "m-0 text-lg font-semibold tracking-tight",
|
|
436
439
|
children: r
|
|
437
440
|
}),
|
|
438
|
-
i && /* @__PURE__ */
|
|
441
|
+
i && /* @__PURE__ */ G("p", {
|
|
439
442
|
className: e("max-w-md text-sm text-muted-foreground", u && "mx-auto"),
|
|
440
443
|
children: i
|
|
441
444
|
}),
|
|
442
|
-
a && /* @__PURE__ */
|
|
445
|
+
a && /* @__PURE__ */ G("div", {
|
|
443
446
|
className: e("mt-1", u && "mx-auto"),
|
|
444
447
|
children: a
|
|
445
448
|
})
|
|
@@ -448,48 +451,48 @@ function it({ icon: t = Ce, tone: n = "indigo", title: r, description: i, action
|
|
|
448
451
|
}
|
|
449
452
|
//#endregion
|
|
450
453
|
//#region src/bento/bento-hero.tsx
|
|
451
|
-
function
|
|
452
|
-
return /* @__PURE__ */
|
|
454
|
+
function vt({ to: e, children: t }) {
|
|
455
|
+
return /* @__PURE__ */ K(He, {
|
|
453
456
|
to: e,
|
|
454
457
|
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ G(J, {
|
|
456
459
|
size: 14,
|
|
457
460
|
"aria-hidden": !0
|
|
458
461
|
}), t]
|
|
459
462
|
});
|
|
460
463
|
}
|
|
461
|
-
function
|
|
462
|
-
let s = e ?? (t == null ? null : /* @__PURE__ */
|
|
464
|
+
function yt({ eyebrow: e, backTo: t, backLabel: n, title: r, subtitle: i, leading: a, trailing: o }) {
|
|
465
|
+
let s = e ?? (t == null ? null : /* @__PURE__ */ G(vt, {
|
|
463
466
|
to: t,
|
|
464
467
|
children: n
|
|
465
468
|
}));
|
|
466
|
-
return /* @__PURE__ */
|
|
469
|
+
return /* @__PURE__ */ G("header", {
|
|
467
470
|
className: "bento-shell-header mb-6 flex flex-col items-start gap-3 md:mb-10",
|
|
468
|
-
children: /* @__PURE__ */
|
|
471
|
+
children: /* @__PURE__ */ K("div", {
|
|
469
472
|
className: "flex w-full items-start gap-4",
|
|
470
473
|
children: [
|
|
471
|
-
a && /* @__PURE__ */
|
|
474
|
+
a && /* @__PURE__ */ G("div", {
|
|
472
475
|
className: "shrink-0",
|
|
473
476
|
children: a
|
|
474
477
|
}),
|
|
475
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ K("div", {
|
|
476
479
|
className: "flex flex-1 flex-col gap-1",
|
|
477
480
|
children: [
|
|
478
|
-
s && /* @__PURE__ */
|
|
481
|
+
s && /* @__PURE__ */ G("span", {
|
|
479
482
|
className: "text-xs uppercase tracking-[0.18em] text-muted-foreground",
|
|
480
483
|
children: s
|
|
481
484
|
}),
|
|
482
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ G("h1", {
|
|
483
486
|
className: "text-3xl font-semibold tracking-tight md:text-4xl",
|
|
484
487
|
children: r
|
|
485
488
|
}),
|
|
486
|
-
i && /* @__PURE__ */
|
|
489
|
+
i && /* @__PURE__ */ G("p", {
|
|
487
490
|
className: "max-w-2xl text-sm text-muted-foreground",
|
|
488
491
|
children: i
|
|
489
492
|
})
|
|
490
493
|
]
|
|
491
494
|
}),
|
|
492
|
-
o && /* @__PURE__ */
|
|
495
|
+
o && /* @__PURE__ */ G("div", {
|
|
493
496
|
className: "ml-auto flex shrink-0 items-center gap-2",
|
|
494
497
|
children: o
|
|
495
498
|
})
|
|
@@ -499,43 +502,43 @@ function ot({ eyebrow: e, backTo: t, backLabel: n, title: r, subtitle: i, leadin
|
|
|
499
502
|
}
|
|
500
503
|
//#endregion
|
|
501
504
|
//#region src/bento/bento-hero-icon-picker.tsx
|
|
502
|
-
function
|
|
503
|
-
let { t:
|
|
504
|
-
return s ? /* @__PURE__ */
|
|
505
|
-
className: `grid h-12 w-12 place-items-center rounded-2xl ${
|
|
506
|
-
children: e ? /* @__PURE__ */
|
|
505
|
+
function bt({ value: e, onChange: t, onClear: n, defaultIcon: r, tone: i, title: a, description: o, readOnly: s = !1 }) {
|
|
506
|
+
let { t: l } = q(), [u, d] = U(!1);
|
|
507
|
+
return s ? /* @__PURE__ */ G("span", {
|
|
508
|
+
className: `grid h-12 w-12 place-items-center rounded-2xl ${Y(i)} text-white shadow-md`,
|
|
509
|
+
children: e ? /* @__PURE__ */ G(Be, {
|
|
507
510
|
icon: e,
|
|
508
511
|
className: "size-6 text-white"
|
|
509
|
-
}) : /* @__PURE__ */
|
|
510
|
-
}) : /* @__PURE__ */
|
|
512
|
+
}) : /* @__PURE__ */ G(r, { size: 24 })
|
|
513
|
+
}) : /* @__PURE__ */ K("div", {
|
|
511
514
|
className: "group relative",
|
|
512
515
|
children: [
|
|
513
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ K("button", {
|
|
514
517
|
type: "button",
|
|
515
|
-
onClick: () =>
|
|
516
|
-
"aria-label":
|
|
517
|
-
className: `group/icon relative grid h-12 w-12 cursor-pointer place-items-center overflow-hidden rounded-2xl ${
|
|
518
|
-
children: [e ? /* @__PURE__ */
|
|
518
|
+
onClick: () => d(!0),
|
|
519
|
+
"aria-label": l("forms.iconPicker.chooseAnIcon"),
|
|
520
|
+
className: `group/icon relative grid h-12 w-12 cursor-pointer place-items-center overflow-hidden rounded-2xl ${Y(i)} text-white shadow-md outline-none transition-all duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] hover:scale-105 focus-visible:ring-2 focus-visible:ring-ring active:scale-95`,
|
|
521
|
+
children: [e ? /* @__PURE__ */ G(Be, {
|
|
519
522
|
icon: e,
|
|
520
523
|
className: "size-6 text-white"
|
|
521
|
-
}) : /* @__PURE__ */
|
|
524
|
+
}) : /* @__PURE__ */ G(r, { size: 24 }), /* @__PURE__ */ G("span", {
|
|
522
525
|
className: "pointer-events-none absolute inset-0 grid place-items-center bg-black/40 opacity-0 transition-opacity duration-200 group-hover/icon:opacity-100",
|
|
523
|
-
children: /* @__PURE__ */
|
|
526
|
+
children: /* @__PURE__ */ G(Ae, { className: "size-5 text-white" })
|
|
524
527
|
})]
|
|
525
528
|
}),
|
|
526
|
-
e && n && /* @__PURE__ */
|
|
529
|
+
e && n && /* @__PURE__ */ G("button", {
|
|
527
530
|
type: "button",
|
|
528
531
|
onClick: (e) => {
|
|
529
532
|
e.stopPropagation(), n();
|
|
530
533
|
},
|
|
531
|
-
"aria-label":
|
|
532
|
-
title:
|
|
534
|
+
"aria-label": l("forms.common.remove"),
|
|
535
|
+
title: l("forms.common.remove"),
|
|
533
536
|
className: "absolute -right-1.5 -top-1.5 grid h-5 w-5 cursor-pointer place-items-center rounded-full border border-border/60 bg-card/90 text-foreground opacity-0 shadow-md backdrop-blur transition-opacity duration-200 bento-clear focus-visible:opacity-100 group-hover:opacity-100",
|
|
534
|
-
children: /* @__PURE__ */
|
|
537
|
+
children: /* @__PURE__ */ G(ze, { size: 12 })
|
|
535
538
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
-
open:
|
|
538
|
-
onOpenChange:
|
|
539
|
+
/* @__PURE__ */ G(c, {
|
|
540
|
+
open: u,
|
|
541
|
+
onOpenChange: d,
|
|
539
542
|
value: e,
|
|
540
543
|
onSelect: t,
|
|
541
544
|
onClear: n,
|
|
@@ -547,9 +550,9 @@ function st({ value: e, onChange: t, onClear: n, defaultIcon: r, tone: i, title:
|
|
|
547
550
|
}
|
|
548
551
|
//#endregion
|
|
549
552
|
//#region src/bento/bento-inline-edit.tsx
|
|
550
|
-
function
|
|
551
|
-
let { t: d } =
|
|
552
|
-
!f && n !== S && (C(n), h(n)),
|
|
553
|
+
function xt({ value: n, onSave: r, multiline: i = !1, placeholder: a, className: o, ariaLabel: s, autoFocus: c = !1, readOnly: l = !1, commitOnChange: u = !1 }) {
|
|
554
|
+
let { t: d } = q(), [f, p] = U(c), [m, h] = U(n), [g, _] = U(!1), v = H(null), y = H(null), b = H(!1), x = H(!1), [S, C] = U(n);
|
|
555
|
+
!f && n !== S && (C(n), h(n)), B(() => {
|
|
553
556
|
f && v.current ? (v.current.focus(), v.current.select()) : !f && x.current && (x.current = !1, y.current?.focus());
|
|
554
557
|
}, [f]);
|
|
555
558
|
function w() {
|
|
@@ -582,23 +585,23 @@ function ct({ value: n, onSave: r, multiline: i = !1, placeholder: a, className:
|
|
|
582
585
|
h(e), u && r(e);
|
|
583
586
|
}
|
|
584
587
|
let O = !n;
|
|
585
|
-
if (l) return /* @__PURE__ */
|
|
588
|
+
if (l) return /* @__PURE__ */ G("span", {
|
|
586
589
|
className: e("block w-full", o),
|
|
587
590
|
"aria-label": s,
|
|
588
|
-
children: n || /* @__PURE__ */
|
|
589
|
-
className: "text-muted-foreground
|
|
591
|
+
children: n || /* @__PURE__ */ G("span", {
|
|
592
|
+
className: "text-muted-foreground",
|
|
590
593
|
children: a ?? "—"
|
|
591
594
|
})
|
|
592
595
|
});
|
|
593
596
|
let k = "w-full bg-transparent outline-none border-b transition-colors duration-200", A = e(k, "cursor-text rounded-sm", O ? "border-dashed border-border/70 hover:border-foreground/40" : "border-transparent hover:border-border/60 focus-visible:border-border/80"), j = e(k, "bento-editing");
|
|
594
|
-
if (!f) return /* @__PURE__ */
|
|
597
|
+
if (!f) return /* @__PURE__ */ G("button", {
|
|
595
598
|
ref: y,
|
|
596
599
|
type: "button",
|
|
597
600
|
onClick: () => p(!0),
|
|
598
601
|
className: e(A, "text-left", o),
|
|
599
602
|
"aria-label": s ?? d("forms.formActions.edit"),
|
|
600
|
-
children: n || /* @__PURE__ */
|
|
601
|
-
className: "text-muted-foreground
|
|
603
|
+
children: n || /* @__PURE__ */ G("span", {
|
|
604
|
+
className: "text-muted-foreground",
|
|
602
605
|
children: a ?? "—"
|
|
603
606
|
})
|
|
604
607
|
});
|
|
@@ -609,7 +612,7 @@ function ct({ value: n, onSave: r, multiline: i = !1, placeholder: a, className:
|
|
|
609
612
|
}
|
|
610
613
|
e.key === "Enter" && (!i || e.metaKey || e.ctrlKey) && (e.preventDefault(), T());
|
|
611
614
|
}
|
|
612
|
-
return i ? /* @__PURE__ */
|
|
615
|
+
return i ? /* @__PURE__ */ G("textarea", {
|
|
613
616
|
ref: v,
|
|
614
617
|
value: m,
|
|
615
618
|
onChange: (e) => D(e.target.value),
|
|
@@ -620,7 +623,7 @@ function ct({ value: n, onSave: r, multiline: i = !1, placeholder: a, className:
|
|
|
620
623
|
"aria-busy": g || void 0,
|
|
621
624
|
rows: 3,
|
|
622
625
|
className: e(j, "resize-none py-0.5 leading-snug", o)
|
|
623
|
-
}) : /* @__PURE__ */
|
|
626
|
+
}) : /* @__PURE__ */ G(t, {
|
|
624
627
|
ref: v,
|
|
625
628
|
value: m,
|
|
626
629
|
onChange: (e) => D(e.target.value),
|
|
@@ -634,22 +637,22 @@ function ct({ value: n, onSave: r, multiline: i = !1, placeholder: a, className:
|
|
|
634
637
|
}
|
|
635
638
|
//#endregion
|
|
636
639
|
//#region src/bento/bento-status-marker.tsx
|
|
637
|
-
function
|
|
638
|
-
let { t: i } =
|
|
640
|
+
function St({ titleMissing: t, dirty: n, className: r }) {
|
|
641
|
+
let { t: i } = q();
|
|
639
642
|
if (!t && !n) return null;
|
|
640
643
|
let a = "inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] font-medium normal-case leading-none tracking-normal";
|
|
641
|
-
return t ? /* @__PURE__ */
|
|
644
|
+
return t ? /* @__PURE__ */ K("span", {
|
|
642
645
|
className: e(a, "bento-status bento-status-error", r),
|
|
643
|
-
children: [/* @__PURE__ */
|
|
644
|
-
}) : /* @__PURE__ */
|
|
646
|
+
children: [/* @__PURE__ */ G(ue, { className: "size-3" }), i("bento.saveBar.titleRequired", { defaultValue: "Title required" })]
|
|
647
|
+
}) : /* @__PURE__ */ K("span", {
|
|
645
648
|
className: e(a, "bento-status bento-status-warn", r),
|
|
646
|
-
children: [/* @__PURE__ */
|
|
649
|
+
children: [/* @__PURE__ */ G("span", { className: "h-1.5 w-1.5 rounded-full bento-status-dot bento-pulse" }), i("bento.saveBar.unsaved", { defaultValue: "Unsaved changes" })]
|
|
647
650
|
});
|
|
648
651
|
}
|
|
649
652
|
//#endregion
|
|
650
653
|
//#region src/bento/bento-scroll-fade.ts
|
|
651
|
-
function
|
|
652
|
-
|
|
654
|
+
function Ct(e) {
|
|
655
|
+
B(() => {
|
|
653
656
|
let t = e.current;
|
|
654
657
|
if (!t) return;
|
|
655
658
|
let n = document.documentElement, r = 0, i = () => {
|
|
@@ -666,23 +669,23 @@ function ut(e) {
|
|
|
666
669
|
}
|
|
667
670
|
//#endregion
|
|
668
671
|
//#region src/bento/bento-entity-shell.tsx
|
|
669
|
-
function
|
|
672
|
+
function wt(e, t) {
|
|
670
673
|
let n = {};
|
|
671
674
|
for (let r of Object.keys(e)) Object.assign(n, { [r]: t[r] });
|
|
672
675
|
return n;
|
|
673
676
|
}
|
|
674
|
-
function
|
|
675
|
-
let { t:
|
|
677
|
+
function Tt({ entity: e, isNew: t, headlineFallback: n, eyebrow: r, listRoute: i, icon: o, tone: s, formId: c, feature: l, hasStatus: u = !1, hideIcon: d = !1, readOnly: f = !1, autosaveOnly: p = !1, badge: m, notice: h, onUpdate: g, onDelete: _, extraActions: v, children: y }) {
|
|
678
|
+
let { t: b } = q(), x = Ge(), [S, C] = U(!1), [w, E] = U({
|
|
676
679
|
isDirty: !1,
|
|
677
680
|
isSubmitting: !1
|
|
678
|
-
}), D =
|
|
679
|
-
|
|
681
|
+
}), D = H(null);
|
|
682
|
+
Ct(D);
|
|
680
683
|
let O = {
|
|
681
684
|
title: e.title ?? "",
|
|
682
685
|
description: e.description ?? "",
|
|
683
686
|
icon: e.icon ?? null,
|
|
684
687
|
enabled: e.enabled ?? 1
|
|
685
|
-
}, [k, A] =
|
|
688
|
+
}, [k, A] = U(O), [j, M] = U(O);
|
|
686
689
|
(O.title !== j.title || O.description !== j.description || O.icon !== j.icon || O.enabled !== j.enabled) && (M(O), A(O));
|
|
687
690
|
async function N(n) {
|
|
688
691
|
if (A((e) => ({
|
|
@@ -694,59 +697,59 @@ function ft({ entity: e, isNew: t, headlineFallback: n, eyebrow: r, listRoute: i
|
|
|
694
697
|
await g({
|
|
695
698
|
...e,
|
|
696
699
|
...n
|
|
697
|
-
}),
|
|
700
|
+
}), T.success(b("forms.common.updated", {
|
|
698
701
|
name: r,
|
|
699
702
|
feature: l
|
|
700
703
|
}));
|
|
701
704
|
} catch (e) {
|
|
702
705
|
console.error("Failed to update entity field", e), A((e) => ({
|
|
703
706
|
...e,
|
|
704
|
-
...
|
|
705
|
-
})),
|
|
707
|
+
...wt(n, O)
|
|
708
|
+
})), T.error(b("forms.common.notUpdated", {
|
|
706
709
|
name: O.title || r,
|
|
707
710
|
feature: l
|
|
708
711
|
}));
|
|
709
712
|
}
|
|
710
713
|
}
|
|
711
|
-
async function
|
|
714
|
+
async function ee() {
|
|
712
715
|
if (_) {
|
|
713
716
|
try {
|
|
714
|
-
await _() ? (
|
|
717
|
+
await _() ? (T.success(b("forms.common.deleted", {
|
|
715
718
|
name: k.title,
|
|
716
719
|
feature: l
|
|
717
|
-
})),
|
|
720
|
+
})), x(i)) : T.error(b("forms.common.notDeleted", {
|
|
718
721
|
name: k.title,
|
|
719
722
|
feature: l
|
|
720
723
|
}));
|
|
721
724
|
} catch (e) {
|
|
722
|
-
console.error("Failed to delete entity", e),
|
|
725
|
+
console.error("Failed to delete entity", e), T.error(b("forms.common.notDeleted", {
|
|
723
726
|
name: k.title,
|
|
724
727
|
feature: l
|
|
725
728
|
}));
|
|
726
729
|
}
|
|
727
|
-
|
|
730
|
+
C(!1);
|
|
728
731
|
}
|
|
729
732
|
}
|
|
730
|
-
let P = k.enabled === 1,
|
|
733
|
+
let P = k.enabled === 1, te = !f, F = !(p && !t), I = !k.title.trim(), L = !t && !w.isDirty, R = I || L, ne = [...v ?? [], ..._ && !f ? [{
|
|
731
734
|
id: "entity.delete",
|
|
732
|
-
label:
|
|
733
|
-
icon:
|
|
735
|
+
label: b("forms.formActions.delete"),
|
|
736
|
+
icon: Fe,
|
|
734
737
|
tone: "destructive",
|
|
735
|
-
onSelect: () =>
|
|
738
|
+
onSelect: () => C(!0)
|
|
736
739
|
}] : []];
|
|
737
|
-
return /* @__PURE__ */
|
|
738
|
-
/* @__PURE__ */
|
|
739
|
-
eyebrow: /* @__PURE__ */
|
|
740
|
+
return /* @__PURE__ */ K(W, { children: [
|
|
741
|
+
/* @__PURE__ */ G(yt, {
|
|
742
|
+
eyebrow: /* @__PURE__ */ K("span", {
|
|
740
743
|
className: "inline-flex items-center gap-2",
|
|
741
|
-
children: [/* @__PURE__ */
|
|
744
|
+
children: [/* @__PURE__ */ G(vt, {
|
|
742
745
|
to: i,
|
|
743
746
|
children: r
|
|
744
|
-
}), !f && /* @__PURE__ */
|
|
745
|
-
titleMissing:
|
|
746
|
-
dirty: t ||
|
|
747
|
+
}), !f && /* @__PURE__ */ G(St, {
|
|
748
|
+
titleMissing: I,
|
|
749
|
+
dirty: t || w.isDirty
|
|
747
750
|
})]
|
|
748
751
|
}),
|
|
749
|
-
leading: /* @__PURE__ */
|
|
752
|
+
leading: /* @__PURE__ */ G(bt, {
|
|
750
753
|
value: k.icon,
|
|
751
754
|
onChange: (e) => N({ icon: e }),
|
|
752
755
|
onClear: () => N({ icon: null }),
|
|
@@ -756,72 +759,72 @@ function ft({ entity: e, isNew: t, headlineFallback: n, eyebrow: r, listRoute: i
|
|
|
756
759
|
description: k.description,
|
|
757
760
|
readOnly: f || d
|
|
758
761
|
}),
|
|
759
|
-
title: /* @__PURE__ */
|
|
762
|
+
title: /* @__PURE__ */ G(xt, {
|
|
760
763
|
value: k.title,
|
|
761
764
|
onSave: (e) => N({ title: e }),
|
|
762
765
|
placeholder: n,
|
|
763
766
|
className: "text-3xl font-semibold tracking-tight md:text-4xl",
|
|
764
|
-
ariaLabel:
|
|
767
|
+
ariaLabel: b("forms.common.title"),
|
|
765
768
|
autoFocus: t,
|
|
766
769
|
commitOnChange: t,
|
|
767
770
|
readOnly: f
|
|
768
771
|
}),
|
|
769
|
-
subtitle: /* @__PURE__ */
|
|
772
|
+
subtitle: /* @__PURE__ */ G(xt, {
|
|
770
773
|
value: k.description,
|
|
771
774
|
onSave: (e) => N({ description: e }),
|
|
772
775
|
multiline: !0,
|
|
773
|
-
placeholder:
|
|
776
|
+
placeholder: b("forms.common.description"),
|
|
774
777
|
className: "max-w-2xl text-sm text-muted-foreground",
|
|
775
|
-
ariaLabel:
|
|
778
|
+
ariaLabel: b("forms.common.description"),
|
|
776
779
|
commitOnChange: t,
|
|
777
780
|
readOnly: f
|
|
778
781
|
}),
|
|
779
|
-
trailing: /* @__PURE__ */
|
|
780
|
-
|
|
782
|
+
trailing: /* @__PURE__ */ K(W, { children: [
|
|
783
|
+
te && /* @__PURE__ */ K("div", {
|
|
781
784
|
className: "bento-fade-out flex shrink-0 items-center gap-2",
|
|
782
|
-
children: [
|
|
785
|
+
children: [F && /* @__PURE__ */ K(a, {
|
|
783
786
|
type: "submit",
|
|
784
787
|
form: c,
|
|
785
788
|
size: "sm",
|
|
786
|
-
loading:
|
|
787
|
-
"aria-disabled":
|
|
788
|
-
children: [/* @__PURE__ */
|
|
789
|
-
}), /* @__PURE__ */
|
|
789
|
+
loading: w.isSubmitting,
|
|
790
|
+
"aria-disabled": R ? "true" : void 0,
|
|
791
|
+
children: [/* @__PURE__ */ G(Se, { className: "size-4" }), b("forms.formActions.saveChanges")]
|
|
792
|
+
}), /* @__PURE__ */ K(a, {
|
|
790
793
|
type: "button",
|
|
791
794
|
size: "sm",
|
|
792
795
|
variant: "outline",
|
|
793
|
-
onClick: () =>
|
|
794
|
-
children: [/* @__PURE__ */
|
|
796
|
+
onClick: () => x(i),
|
|
797
|
+
children: [/* @__PURE__ */ G(ze, { className: "size-4" }), b("forms.formActions.cancel")]
|
|
795
798
|
})]
|
|
796
799
|
}),
|
|
797
800
|
m,
|
|
798
|
-
u && (f ? /* @__PURE__ */
|
|
801
|
+
u && (f ? /* @__PURE__ */ K("span", {
|
|
799
802
|
className: `flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[10px] uppercase tracking-wider ${P ? "bento-status bento-status-on" : "border-border bg-muted text-muted-foreground"}`,
|
|
800
|
-
children: [/* @__PURE__ */
|
|
801
|
-
}) : /* @__PURE__ */
|
|
803
|
+
children: [/* @__PURE__ */ G("span", { className: `h-1.5 w-1.5 rounded-full ${P ? "bento-status-dot bento-pulse" : "bg-muted-foreground/60"}` }), P ? b("common.active", { defaultValue: "Active" }) : b("common.idle", { defaultValue: "Idle" })]
|
|
804
|
+
}) : /* @__PURE__ */ K("button", {
|
|
802
805
|
type: "button",
|
|
803
806
|
onClick: () => N({ enabled: +!P }),
|
|
804
|
-
"aria-label":
|
|
805
|
-
title:
|
|
807
|
+
"aria-label": b("forms.common.enabled"),
|
|
808
|
+
title: b(P ? "common.activeToggleHint" : "common.idleToggleHint"),
|
|
806
809
|
className: `bento-tile-clickable flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[10px] uppercase tracking-wider transition-colors duration-200 ${P ? "bento-status bento-status-on" : "border-border bg-muted text-muted-foreground hover:bg-muted/80"}`,
|
|
807
|
-
children: [/* @__PURE__ */
|
|
810
|
+
children: [/* @__PURE__ */ G("span", { className: `h-1.5 w-1.5 rounded-full ${P ? "bento-status-dot bento-pulse" : "bg-muted-foreground/60"}` }), P ? b("common.active", { defaultValue: "Active" }) : b("common.idle", { defaultValue: "Idle" })]
|
|
808
811
|
})),
|
|
809
|
-
!t &&
|
|
812
|
+
!t && ne.length > 0 && /* @__PURE__ */ G(ut, { actions: ne })
|
|
810
813
|
] })
|
|
811
814
|
}),
|
|
812
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ G("div", {
|
|
813
816
|
ref: D,
|
|
814
817
|
"aria-hidden": !0,
|
|
815
818
|
className: "h-px"
|
|
816
819
|
}),
|
|
817
820
|
h,
|
|
818
|
-
!t && _ && /* @__PURE__ */
|
|
821
|
+
!t && _ && /* @__PURE__ */ G(re, {
|
|
819
822
|
feature: l,
|
|
820
823
|
name: k.title,
|
|
821
|
-
onDelete:
|
|
822
|
-
open:
|
|
823
|
-
setOpen:
|
|
824
|
-
trigger: /* @__PURE__ */
|
|
824
|
+
onDelete: ee,
|
|
825
|
+
open: S,
|
|
826
|
+
setOpen: C,
|
|
827
|
+
trigger: /* @__PURE__ */ G("span", {
|
|
825
828
|
className: "hidden",
|
|
826
829
|
"aria-hidden": !0
|
|
827
830
|
})
|
|
@@ -833,8 +836,49 @@ function ft({ entity: e, isNew: t, headlineFallback: n, eyebrow: r, listRoute: i
|
|
|
833
836
|
] });
|
|
834
837
|
}
|
|
835
838
|
//#endregion
|
|
839
|
+
//#region src/bento/bento-change-mark.tsx
|
|
840
|
+
var Et = {
|
|
841
|
+
added: "bento-status bento-status-on",
|
|
842
|
+
removed: "bento-status bento-status-error",
|
|
843
|
+
changed: "bento-status bento-status-warn",
|
|
844
|
+
unchanged: !1
|
|
845
|
+
};
|
|
846
|
+
function Dt({ state: t, compact: n = !1, className: r }) {
|
|
847
|
+
let { t: i } = q(), a = {
|
|
848
|
+
added: i("bento.diff.added", { defaultValue: "Added" }),
|
|
849
|
+
removed: i("bento.diff.removed", { defaultValue: "Removed" }),
|
|
850
|
+
changed: i("bento.diff.changed", { defaultValue: "Changed" }),
|
|
851
|
+
unchanged: i("bento.diff.unchanged", { defaultValue: "Unchanged" })
|
|
852
|
+
}[t], o = e("rounded-full border px-1.5 leading-4", n && "font-mono", Et[t], r);
|
|
853
|
+
if (!n) return /* @__PURE__ */ G("span", {
|
|
854
|
+
"data-slot": "bento-change-mark",
|
|
855
|
+
"data-state": t,
|
|
856
|
+
className: o,
|
|
857
|
+
children: a
|
|
858
|
+
});
|
|
859
|
+
let s = {
|
|
860
|
+
added: i("bento.diff.addedLetter", { defaultValue: "A" }),
|
|
861
|
+
removed: i("bento.diff.removedLetter", { defaultValue: "D" }),
|
|
862
|
+
changed: i("bento.diff.changedLetter", { defaultValue: "M" }),
|
|
863
|
+
unchanged: i("bento.diff.unchangedLetter", { defaultValue: "·" })
|
|
864
|
+
}[t];
|
|
865
|
+
return /* @__PURE__ */ K("span", {
|
|
866
|
+
"data-slot": "bento-change-mark",
|
|
867
|
+
"data-state": t,
|
|
868
|
+
title: a,
|
|
869
|
+
className: o,
|
|
870
|
+
children: [/* @__PURE__ */ G("span", {
|
|
871
|
+
"aria-hidden": "true",
|
|
872
|
+
children: s
|
|
873
|
+
}), /* @__PURE__ */ G("span", {
|
|
874
|
+
className: "sr-only",
|
|
875
|
+
children: a
|
|
876
|
+
})]
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
//#endregion
|
|
836
880
|
//#region src/bento/bento-diff.tsx
|
|
837
|
-
function
|
|
881
|
+
function Ot(e, t, n = !0) {
|
|
838
882
|
let r = e.length, i = t.length;
|
|
839
883
|
if (r * i > 4e5) return null;
|
|
840
884
|
let a = Array.from({ length: r + 1 }, () => new Uint32Array(i + 1));
|
|
@@ -851,16 +895,16 @@ function pt(e, t, n = !0) {
|
|
|
851
895
|
for (; l < i;) s("add", t[l++]);
|
|
852
896
|
return o;
|
|
853
897
|
}
|
|
854
|
-
var
|
|
855
|
-
function
|
|
898
|
+
var kt = (e) => e.split(/(\s+)/).filter((e) => e !== "");
|
|
899
|
+
function At(e) {
|
|
856
900
|
if (typeof DOMParser > "u") return e.split(/<\/(?:p|h[1-6]|li|blockquote|pre|div)>/i).map((e) => e.replace(/<[^>]*>/g, "").replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
857
901
|
let t = new DOMParser().parseFromString(e, "text/html"), n = [...t.body.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, pre")].filter((e) => !e.parentElement?.closest("p, h1, h2, h3, h4, h5, h6, li, blockquote, pre")).map((e) => (e.textContent ?? "").replace(/\s+/g, " ").trim()).filter(Boolean), r = (t.body.textContent ?? "").replace(/\s+/g, " ").trim();
|
|
858
902
|
return n.length > 0 ? n : r ? [r] : [];
|
|
859
903
|
}
|
|
860
|
-
var
|
|
861
|
-
function
|
|
862
|
-
let { t:
|
|
863
|
-
let r = t?.[e.id], i = n?.[e.id], a = e.kind ?? "text", o = a === "rich" ?
|
|
904
|
+
var X = (e) => e == null ? "" : String(e);
|
|
905
|
+
function jt({ before: t, after: n, fields: r, showUnchanged: i = !1, layout: a = "inline" }) {
|
|
906
|
+
let { t: o } = q(), [s, c] = U(i), l = r.map((e) => {
|
|
907
|
+
let r = t?.[e.id], i = n?.[e.id], a = e.kind ?? "text", o = a === "rich" ? At(X(r)).join("\n") === At(X(i)).join("\n") : a === "value" ? JSON.stringify(r ?? null) === JSON.stringify(i ?? null) : X(r) === X(i), s = "changed";
|
|
864
908
|
return t === null || (r == null || r === "") && !o ? s = "added" : n === null || (i == null || i === "") && !o ? s = "removed" : o && (s = "unchanged"), {
|
|
865
909
|
field: e,
|
|
866
910
|
a: r,
|
|
@@ -868,159 +912,758 @@ function gt({ before: t, after: n, fields: r, showUnchanged: i = !1 }) {
|
|
|
868
912
|
kind: a,
|
|
869
913
|
state: s
|
|
870
914
|
};
|
|
871
|
-
}),
|
|
872
|
-
|
|
873
|
-
removed: a("bento.diff.removed", { defaultValue: "Removed" }),
|
|
874
|
-
changed: a("bento.diff.changed", { defaultValue: "Changed" }),
|
|
875
|
-
unchanged: a("bento.diff.unchanged", { defaultValue: "Unchanged" })
|
|
876
|
-
};
|
|
877
|
-
return /* @__PURE__ */ H("div", {
|
|
915
|
+
}), u = l.filter((e) => e.state !== "unchanged"), d = l.filter((e) => e.state === "unchanged");
|
|
916
|
+
return /* @__PURE__ */ K("div", {
|
|
878
917
|
"data-slot": "bento-diff",
|
|
879
918
|
className: "flex flex-col gap-3",
|
|
880
919
|
children: [
|
|
881
|
-
(t === null || n === null) && /* @__PURE__ */
|
|
920
|
+
(t === null || n === null) && /* @__PURE__ */ G("p", {
|
|
882
921
|
className: "m-0 text-sm font-medium",
|
|
883
|
-
children: t === null ?
|
|
922
|
+
children: t === null ? o("bento.diff.created", { defaultValue: "Created in this version" }) : o("bento.diff.deleted", { defaultValue: "Deleted in this version" })
|
|
884
923
|
}),
|
|
885
|
-
|
|
924
|
+
u.length === 0 && /* @__PURE__ */ G("p", {
|
|
886
925
|
className: "m-0 text-sm text-muted-foreground",
|
|
887
|
-
children:
|
|
926
|
+
children: o("bento.diff.noChanges", { defaultValue: "No field changed" })
|
|
888
927
|
}),
|
|
889
|
-
/* @__PURE__ */
|
|
928
|
+
/* @__PURE__ */ G("dl", {
|
|
890
929
|
className: "m-0 flex flex-col gap-3",
|
|
891
|
-
children:
|
|
930
|
+
children: u.map((e) => /* @__PURE__ */ G(Mt, {
|
|
892
931
|
label: e.field.label,
|
|
893
|
-
status: d[e.state],
|
|
894
932
|
state: e.state,
|
|
895
|
-
children: /* @__PURE__ */
|
|
933
|
+
children: /* @__PURE__ */ G(Nt, {
|
|
934
|
+
row: e,
|
|
935
|
+
layout: a
|
|
936
|
+
})
|
|
896
937
|
}, e.field.id))
|
|
897
938
|
}),
|
|
898
|
-
|
|
939
|
+
d.length > 0 && /* @__PURE__ */ K("div", {
|
|
899
940
|
className: "flex flex-col gap-3",
|
|
900
|
-
children: [/* @__PURE__ */
|
|
941
|
+
children: [/* @__PURE__ */ K("button", {
|
|
901
942
|
type: "button",
|
|
902
|
-
"aria-expanded":
|
|
903
|
-
onClick: () =>
|
|
943
|
+
"aria-expanded": s ? "true" : "false",
|
|
944
|
+
onClick: () => c(!s),
|
|
904
945
|
className: "inline-flex items-center gap-1 self-start rounded-md text-sm text-muted-foreground hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",
|
|
905
|
-
children: [/* @__PURE__ */
|
|
946
|
+
children: [/* @__PURE__ */ G(be, {
|
|
906
947
|
size: 14,
|
|
907
948
|
"aria-hidden": "true",
|
|
908
|
-
className: e("transition-transform",
|
|
909
|
-
}),
|
|
949
|
+
className: e("transition-transform", s && "rotate-90")
|
|
950
|
+
}), o("bento.diff.unchangedCount", {
|
|
910
951
|
defaultValue: "{{count}} unchanged",
|
|
911
|
-
count:
|
|
952
|
+
count: d.length
|
|
912
953
|
})]
|
|
913
|
-
}),
|
|
954
|
+
}), s && /* @__PURE__ */ G("dl", {
|
|
914
955
|
className: "m-0 flex flex-col gap-3",
|
|
915
|
-
children:
|
|
916
|
-
label:
|
|
917
|
-
status: d.unchanged,
|
|
956
|
+
children: d.map((t) => /* @__PURE__ */ G(Mt, {
|
|
957
|
+
label: t.field.label,
|
|
918
958
|
state: "unchanged",
|
|
919
|
-
children: /* @__PURE__ */
|
|
920
|
-
className: "m-0 whitespace-pre-wrap text-sm text-muted-foreground",
|
|
921
|
-
children:
|
|
959
|
+
children: /* @__PURE__ */ G("p", {
|
|
960
|
+
className: e("m-0 whitespace-pre-wrap text-sm text-muted-foreground", t.kind === "lines" && "font-mono text-xs"),
|
|
961
|
+
children: t.kind === "rich" ? At(X(t.b)).join("\n\n") : t.field.format ? t.field.format(t.b) : X(t.b)
|
|
922
962
|
})
|
|
923
|
-
},
|
|
963
|
+
}, t.field.id))
|
|
924
964
|
})]
|
|
925
965
|
})
|
|
926
966
|
]
|
|
927
967
|
});
|
|
928
968
|
}
|
|
929
|
-
function
|
|
930
|
-
return /* @__PURE__ */
|
|
969
|
+
function Mt({ label: e, state: t, children: n }) {
|
|
970
|
+
return /* @__PURE__ */ K("div", {
|
|
931
971
|
className: "rounded-xl border border-border/60 bg-card/40 p-3",
|
|
932
|
-
children: [/* @__PURE__ */
|
|
972
|
+
children: [/* @__PURE__ */ K("dt", {
|
|
933
973
|
className: "mb-1.5 flex items-center gap-2 text-xs font-medium text-muted-foreground",
|
|
934
|
-
children: [/* @__PURE__ */
|
|
935
|
-
|
|
936
|
-
children: n
|
|
937
|
-
})]
|
|
938
|
-
}), /* @__PURE__ */ V("dd", {
|
|
974
|
+
children: [/* @__PURE__ */ G("span", { children: e }), /* @__PURE__ */ G(Dt, { state: t })]
|
|
975
|
+
}), /* @__PURE__ */ G("dd", {
|
|
939
976
|
className: "m-0",
|
|
940
|
-
children:
|
|
977
|
+
children: n
|
|
941
978
|
})]
|
|
942
979
|
});
|
|
943
980
|
}
|
|
944
|
-
function
|
|
945
|
-
let { t } =
|
|
946
|
-
if (
|
|
947
|
-
|
|
948
|
-
|
|
981
|
+
function Nt({ row: e, layout: t }) {
|
|
982
|
+
let { t: n } = q(), { field: r, a: i, b: a, kind: o, state: s } = e;
|
|
983
|
+
if (o === "lines") return /* @__PURE__ */ G(zt, {
|
|
984
|
+
label: r.label,
|
|
985
|
+
before: X(i),
|
|
986
|
+
after: X(a),
|
|
987
|
+
layout: t
|
|
988
|
+
});
|
|
989
|
+
if (o === "value") {
|
|
990
|
+
let e = (e) => r.format ? r.format(e) : X(e);
|
|
991
|
+
return /* @__PURE__ */ K("p", {
|
|
949
992
|
className: "m-0 flex flex-wrap items-center gap-2 text-sm",
|
|
950
993
|
children: [
|
|
951
|
-
|
|
952
|
-
|
|
994
|
+
s !== "added" && /* @__PURE__ */ G(Zt, { children: e(i) }),
|
|
995
|
+
s === "changed" && /* @__PURE__ */ G("span", {
|
|
953
996
|
"aria-hidden": "true",
|
|
954
997
|
children: "→"
|
|
955
998
|
}),
|
|
956
|
-
|
|
999
|
+
s !== "removed" && /* @__PURE__ */ G(Xt, { children: e(a) })
|
|
957
1000
|
]
|
|
958
1001
|
});
|
|
959
1002
|
}
|
|
960
|
-
let
|
|
1003
|
+
let c = o === "rich" ? At(X(i)) : [X(i)].filter(Boolean), l = o === "rich" ? At(X(a)) : [X(a)].filter(Boolean), u = Ot(c, l, !1) ?? [...c.map((e) => ({
|
|
961
1004
|
op: "remove",
|
|
962
1005
|
text: e
|
|
963
|
-
})), ...
|
|
1006
|
+
})), ...l.map((e) => ({
|
|
964
1007
|
op: "add",
|
|
965
1008
|
text: e
|
|
966
|
-
}))],
|
|
967
|
-
for (let e = 0; e <
|
|
968
|
-
let t =
|
|
1009
|
+
}))], d = [];
|
|
1010
|
+
for (let e = 0; e < u.length; e++) {
|
|
1011
|
+
let t = u[e], n = u[e + 1];
|
|
969
1012
|
if (t.op === "remove" && n?.op === "add") {
|
|
970
|
-
let r =
|
|
971
|
-
|
|
1013
|
+
let r = Ot(kt(t.text), kt(n.text));
|
|
1014
|
+
d.push(/* @__PURE__ */ G("p", {
|
|
972
1015
|
className: "m-0 whitespace-pre-wrap text-sm leading-relaxed",
|
|
973
|
-
children: r ? r.map((e, t) => e.op === "same" ? /* @__PURE__ */
|
|
974
|
-
/* @__PURE__ */
|
|
1016
|
+
children: r ? r.map((e, t) => e.op === "same" ? /* @__PURE__ */ G("span", { children: e.text }, t) : e.op === "add" ? /* @__PURE__ */ G(Xt, { children: e.text }, t) : /* @__PURE__ */ G(Zt, { children: e.text }, t)) : [
|
|
1017
|
+
/* @__PURE__ */ G(Zt, { children: t.text }, "r"),
|
|
975
1018
|
" ",
|
|
976
|
-
/* @__PURE__ */
|
|
1019
|
+
/* @__PURE__ */ G(Xt, { children: n.text }, "a")
|
|
977
1020
|
]
|
|
978
1021
|
}, e)), e++;
|
|
979
|
-
} else
|
|
1022
|
+
} else d.push(/* @__PURE__ */ G("p", {
|
|
980
1023
|
className: "m-0 whitespace-pre-wrap text-sm leading-relaxed",
|
|
981
|
-
children: t.op === "same" ? t.text : t.op === "add" ? /* @__PURE__ */
|
|
1024
|
+
children: t.op === "same" ? t.text : t.op === "add" ? /* @__PURE__ */ G(Xt, { children: t.text }) : /* @__PURE__ */ G(Zt, { children: t.text })
|
|
982
1025
|
}, e));
|
|
983
1026
|
}
|
|
984
|
-
return
|
|
1027
|
+
return d.length === 0 ? /* @__PURE__ */ G("p", {
|
|
985
1028
|
className: "m-0 text-sm text-muted-foreground",
|
|
986
|
-
children:
|
|
987
|
-
}) : /* @__PURE__ */
|
|
1029
|
+
children: n("bento.diff.empty", { defaultValue: "Empty" })
|
|
1030
|
+
}) : /* @__PURE__ */ G("div", {
|
|
988
1031
|
className: "flex flex-col gap-2",
|
|
989
|
-
children:
|
|
1032
|
+
children: d
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
var Pt = 3, Ft = (e) => e === "" ? [] : e.replace(/\r?\n$/, "").split(/\r?\n/);
|
|
1036
|
+
function It(e, t) {
|
|
1037
|
+
let n = Ft(e), r = Ft(t), i = 0;
|
|
1038
|
+
for (; i < n.length && i < r.length && n[i] === r[i];) i++;
|
|
1039
|
+
let a = 0;
|
|
1040
|
+
for (; a < n.length - i && a < r.length - i && n[n.length - 1 - a] === r[r.length - 1 - a];) a++;
|
|
1041
|
+
let o = Ot(n.slice(i, n.length - a), r.slice(i, r.length - a), !1);
|
|
1042
|
+
if (o === null) return null;
|
|
1043
|
+
let s = [], c = 0, l = 0, u = (e) => s.push({
|
|
1044
|
+
op: "same",
|
|
1045
|
+
text: e,
|
|
1046
|
+
old: ++c,
|
|
1047
|
+
new: ++l
|
|
1048
|
+
});
|
|
1049
|
+
n.slice(0, i).forEach(u);
|
|
1050
|
+
let d = [], f = [], p = () => {
|
|
1051
|
+
for (let e = 0; e < Math.min(d.length, f.length); e++) {
|
|
1052
|
+
let t = Ot(kt(d[e].text), kt(f[e].text));
|
|
1053
|
+
t && (d[e].parts = t.filter((e) => e.op !== "add"), f[e].parts = t.filter((e) => e.op !== "remove"));
|
|
1054
|
+
}
|
|
1055
|
+
s.push(...d, ...f), d = [], f = [];
|
|
1056
|
+
};
|
|
1057
|
+
for (let e of o) e.op === "remove" ? d.push({
|
|
1058
|
+
op: "remove",
|
|
1059
|
+
text: e.text,
|
|
1060
|
+
old: ++c
|
|
1061
|
+
}) : e.op === "add" ? f.push({
|
|
1062
|
+
op: "add",
|
|
1063
|
+
text: e.text,
|
|
1064
|
+
new: ++l
|
|
1065
|
+
}) : (p(), u(e.text));
|
|
1066
|
+
return p(), n.slice(n.length - a).forEach(u), s;
|
|
1067
|
+
}
|
|
1068
|
+
function Lt(e) {
|
|
1069
|
+
let t = [], n = 0;
|
|
1070
|
+
for (; n < e.length;) {
|
|
1071
|
+
if (e[n].op === "same") {
|
|
1072
|
+
t.push({
|
|
1073
|
+
left: e[n],
|
|
1074
|
+
right: e[n]
|
|
1075
|
+
}), n++;
|
|
1076
|
+
continue;
|
|
1077
|
+
}
|
|
1078
|
+
let r = [], i = [];
|
|
1079
|
+
for (; n < e.length && e[n].op !== "same"; n++) (e[n].op === "remove" ? r : i).push(e[n]);
|
|
1080
|
+
for (let e = 0; e < Math.max(r.length, i.length); e++) t.push({
|
|
1081
|
+
left: r[e] ?? null,
|
|
1082
|
+
right: i[e] ?? null
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
return t;
|
|
1086
|
+
}
|
|
1087
|
+
function Rt(e, t, n) {
|
|
1088
|
+
let r = Array(e.length).fill(!1);
|
|
1089
|
+
e.forEach((n, i) => {
|
|
1090
|
+
if (t(n)) for (let t = Math.max(0, i - Pt); t <= Math.min(e.length - 1, i + Pt); t++) r[t] = !0;
|
|
1091
|
+
});
|
|
1092
|
+
let i = [], a = 0;
|
|
1093
|
+
for (; a < e.length;) {
|
|
1094
|
+
let t = a, o = r[a];
|
|
1095
|
+
for (; a < e.length && r[a] === o;) a++;
|
|
1096
|
+
let s = e.slice(t, a);
|
|
1097
|
+
o || s.length === 1 ? i.push({
|
|
1098
|
+
fold: !1,
|
|
1099
|
+
items: s
|
|
1100
|
+
}) : i.push({
|
|
1101
|
+
fold: !0,
|
|
1102
|
+
key: n(s[0]),
|
|
1103
|
+
items: s
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
return i;
|
|
1107
|
+
}
|
|
1108
|
+
function zt({ label: t, before: n, after: r, layout: i }) {
|
|
1109
|
+
let { t: a } = q(), [o, s] = U(/* @__PURE__ */ new Set()), c = It(n, r);
|
|
1110
|
+
if (c === null) return /* @__PURE__ */ G("p", {
|
|
1111
|
+
className: "m-0 text-sm text-muted-foreground",
|
|
1112
|
+
children: a("bento.diff.tooLarge", { defaultValue: "Too many lines changed to compare them here" })
|
|
1113
|
+
});
|
|
1114
|
+
if (c.length === 0) return /* @__PURE__ */ G("p", {
|
|
1115
|
+
className: "m-0 text-sm text-muted-foreground",
|
|
1116
|
+
children: a("bento.diff.empty", { defaultValue: "Empty" })
|
|
1117
|
+
});
|
|
1118
|
+
let l = (e) => {
|
|
1119
|
+
let t = new Set(o);
|
|
1120
|
+
t.delete(e) || t.add(e), s(t);
|
|
1121
|
+
};
|
|
1122
|
+
function u(t, n, r) {
|
|
1123
|
+
let i = o.has(t.key);
|
|
1124
|
+
return [/* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", {
|
|
1125
|
+
colSpan: n,
|
|
1126
|
+
className: "bg-muted/40 px-2",
|
|
1127
|
+
children: /* @__PURE__ */ K("button", {
|
|
1128
|
+
type: "button",
|
|
1129
|
+
"aria-expanded": i ? "true" : "false",
|
|
1130
|
+
onClick: () => l(t.key),
|
|
1131
|
+
className: "inline-flex items-center gap-1 rounded-md font-sans text-muted-foreground hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",
|
|
1132
|
+
children: [/* @__PURE__ */ G(be, {
|
|
1133
|
+
size: 12,
|
|
1134
|
+
"aria-hidden": "true",
|
|
1135
|
+
className: e("transition-transform", i && "rotate-90")
|
|
1136
|
+
}), a("bento.diff.unchangedLines", {
|
|
1137
|
+
defaultValue: "{{count}} unchanged lines",
|
|
1138
|
+
count: t.items.length
|
|
1139
|
+
})]
|
|
1140
|
+
})
|
|
1141
|
+
}) }, `fold-${t.key}`), ...i ? t.items.map(r) : []];
|
|
1142
|
+
}
|
|
1143
|
+
let d = (t) => /* @__PURE__ */ G("table", {
|
|
1144
|
+
"data-layout": "inline",
|
|
1145
|
+
className: e("min-w-full border-collapse font-mono text-xs leading-5", t),
|
|
1146
|
+
children: /* @__PURE__ */ G("tbody", { children: Rt(c, (e) => e.op !== "same", Bt).map((e) => {
|
|
1147
|
+
let t = (e) => /* @__PURE__ */ G(Kt, { row: e }, Bt(e));
|
|
1148
|
+
return e.fold ? u(e, 4, t) : e.items.map(t);
|
|
1149
|
+
}) })
|
|
1150
|
+
});
|
|
1151
|
+
return /* @__PURE__ */ G("section", {
|
|
1152
|
+
"aria-label": t,
|
|
1153
|
+
tabIndex: 0,
|
|
1154
|
+
className: "@container/diff overflow-x-auto rounded-md border border-border/60 focus-visible:outline-2 focus-visible:outline-ring",
|
|
1155
|
+
children: i === "split" ? /* @__PURE__ */ K(W, { children: [d("@3xl/diff:hidden"), ((t) => /* @__PURE__ */ K("table", {
|
|
1156
|
+
"data-layout": "split",
|
|
1157
|
+
className: e("w-full table-fixed border-collapse font-mono text-xs leading-5", t),
|
|
1158
|
+
children: [/* @__PURE__ */ K("colgroup", { children: [
|
|
1159
|
+
/* @__PURE__ */ G("col", { className: "w-14" }),
|
|
1160
|
+
/* @__PURE__ */ G("col", { className: "w-5" }),
|
|
1161
|
+
/* @__PURE__ */ G("col", {}),
|
|
1162
|
+
/* @__PURE__ */ G("col", { className: "w-14" }),
|
|
1163
|
+
/* @__PURE__ */ G("col", { className: "w-5" }),
|
|
1164
|
+
/* @__PURE__ */ G("col", {})
|
|
1165
|
+
] }), /* @__PURE__ */ G("tbody", { children: Rt(Lt(c), (e) => e.left?.op !== "same", Vt).map((e) => {
|
|
1166
|
+
let t = (e) => /* @__PURE__ */ G(qt, { pair: e }, Vt(e));
|
|
1167
|
+
return e.fold ? u(e, 6, t) : e.items.map(t);
|
|
1168
|
+
}) })]
|
|
1169
|
+
}))("hidden @3xl/diff:table")] }) : d()
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
var Bt = (e) => `${e.old ?? ""}:${e.new ?? ""}`, Vt = (e) => `${e.left?.old ?? ""}:${e.right?.new ?? ""}`, Ht = (t) => e(t.op === "add" && "bento-status bento-status-on", t.op === "remove" && "bento-status bento-status-error");
|
|
1173
|
+
function Ut(e) {
|
|
1174
|
+
return e.parts ? e.parts.map((e, t) => e.op === "add" ? /* @__PURE__ */ G(Xt, { children: e.text }, t) : e.op === "remove" ? /* @__PURE__ */ G(Zt, { children: e.text }, t) : /* @__PURE__ */ G("span", { children: e.text }, t)) : e.op === "same" ? e.text : /* @__PURE__ */ G(Yt, {
|
|
1175
|
+
op: e.op,
|
|
1176
|
+
children: e.text
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
var Wt = {
|
|
1180
|
+
same: " ",
|
|
1181
|
+
add: "+",
|
|
1182
|
+
remove: "−"
|
|
1183
|
+
}, Gt = "select-none px-2 text-right align-top text-muted-foreground tabular-nums";
|
|
1184
|
+
function Kt({ row: t }) {
|
|
1185
|
+
let n = Ht(t);
|
|
1186
|
+
return /* @__PURE__ */ K("tr", {
|
|
1187
|
+
"data-op": t.op,
|
|
1188
|
+
children: [
|
|
1189
|
+
/* @__PURE__ */ G("td", {
|
|
1190
|
+
className: e("w-px", Gt, n),
|
|
1191
|
+
children: t.old
|
|
1192
|
+
}),
|
|
1193
|
+
/* @__PURE__ */ G("td", {
|
|
1194
|
+
className: e("w-px", Gt, n),
|
|
1195
|
+
children: t.new
|
|
1196
|
+
}),
|
|
1197
|
+
/* @__PURE__ */ G("td", {
|
|
1198
|
+
"aria-hidden": "true",
|
|
1199
|
+
className: e("w-px select-none pr-1", n),
|
|
1200
|
+
children: Wt[t.op]
|
|
1201
|
+
}),
|
|
1202
|
+
/* @__PURE__ */ G("td", {
|
|
1203
|
+
className: e("whitespace-pre pr-3", !t.parts && n),
|
|
1204
|
+
children: Ut(t)
|
|
1205
|
+
})
|
|
1206
|
+
]
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
function qt({ pair: e }) {
|
|
1210
|
+
return /* @__PURE__ */ K("tr", {
|
|
1211
|
+
"data-op": e.left?.op === "same" ? "same" : "change",
|
|
1212
|
+
children: [/* @__PURE__ */ G(Jt, {
|
|
1213
|
+
row: e.left,
|
|
1214
|
+
number: e.left?.old
|
|
1215
|
+
}), /* @__PURE__ */ G(Jt, {
|
|
1216
|
+
row: e.right,
|
|
1217
|
+
number: e.right?.new,
|
|
1218
|
+
right: !0
|
|
1219
|
+
})]
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1222
|
+
function Jt({ row: t, number: n, right: r = !1 }) {
|
|
1223
|
+
if (t === null) return /* @__PURE__ */ G("td", {
|
|
1224
|
+
colSpan: 3,
|
|
1225
|
+
"data-empty": "",
|
|
1226
|
+
className: e("[background-image:repeating-linear-gradient(-45deg,var(--color-border)_0_1px,transparent_0_6px)]", r && "border-l border-border/60")
|
|
990
1227
|
});
|
|
1228
|
+
let i = Ht(t);
|
|
1229
|
+
return /* @__PURE__ */ K(W, { children: [
|
|
1230
|
+
/* @__PURE__ */ G("td", {
|
|
1231
|
+
className: e(Gt, i, r && "border-l border-border/60"),
|
|
1232
|
+
children: n
|
|
1233
|
+
}),
|
|
1234
|
+
/* @__PURE__ */ G("td", {
|
|
1235
|
+
"aria-hidden": "true",
|
|
1236
|
+
className: e("select-none align-top", i),
|
|
1237
|
+
children: Wt[t.op]
|
|
1238
|
+
}),
|
|
1239
|
+
/* @__PURE__ */ G("td", {
|
|
1240
|
+
className: e("whitespace-pre-wrap pr-3 [overflow-wrap:anywhere]", !t.parts && i),
|
|
1241
|
+
children: Ut(t)
|
|
1242
|
+
})
|
|
1243
|
+
] });
|
|
991
1244
|
}
|
|
992
|
-
function
|
|
993
|
-
let { t } =
|
|
994
|
-
return /* @__PURE__ */
|
|
1245
|
+
function Yt({ op: e, children: t }) {
|
|
1246
|
+
let { t: n } = q();
|
|
1247
|
+
return /* @__PURE__ */ K(e === "add" ? "ins" : "del", {
|
|
1248
|
+
className: "no-underline",
|
|
1249
|
+
children: [/* @__PURE__ */ K("span", {
|
|
1250
|
+
className: "sr-only",
|
|
1251
|
+
children: [e === "add" ? n("bento.diff.addedStart", { defaultValue: "added:" }) : n("bento.diff.removedStart", { defaultValue: "removed:" }), " "]
|
|
1252
|
+
}), t]
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1255
|
+
function Xt({ children: e }) {
|
|
1256
|
+
let { t } = q();
|
|
1257
|
+
return /* @__PURE__ */ K("ins", {
|
|
995
1258
|
className: "bento-status bento-status-on rounded-sm px-0.5 underline decoration-2 underline-offset-2",
|
|
996
|
-
children: [/* @__PURE__ */
|
|
1259
|
+
children: [/* @__PURE__ */ K("span", {
|
|
997
1260
|
className: "sr-only",
|
|
998
1261
|
children: [t("bento.diff.addedStart", { defaultValue: "added:" }), " "]
|
|
999
1262
|
}), e]
|
|
1000
1263
|
});
|
|
1001
1264
|
}
|
|
1002
|
-
function
|
|
1003
|
-
let { t } =
|
|
1004
|
-
return /* @__PURE__ */
|
|
1265
|
+
function Zt({ children: e }) {
|
|
1266
|
+
let { t } = q();
|
|
1267
|
+
return /* @__PURE__ */ K("del", {
|
|
1005
1268
|
className: "bento-status bento-status-error rounded-sm px-0.5 line-through decoration-2",
|
|
1006
|
-
children: [/* @__PURE__ */
|
|
1269
|
+
children: [/* @__PURE__ */ K("span", {
|
|
1007
1270
|
className: "sr-only",
|
|
1008
1271
|
children: [t("bento.diff.removedStart", { defaultValue: "removed:" }), " "]
|
|
1009
1272
|
}), e]
|
|
1010
1273
|
});
|
|
1011
1274
|
}
|
|
1012
1275
|
//#endregion
|
|
1276
|
+
//#region src/bento/bento-split-page.tsx
|
|
1277
|
+
var Qt = ["primary", "secondary"], $t = {
|
|
1278
|
+
getItem: (e) => {
|
|
1279
|
+
try {
|
|
1280
|
+
return window.localStorage.getItem(e);
|
|
1281
|
+
} catch {
|
|
1282
|
+
return null;
|
|
1283
|
+
}
|
|
1284
|
+
},
|
|
1285
|
+
setItem: (e, t) => {
|
|
1286
|
+
try {
|
|
1287
|
+
window.localStorage.setItem(e, t);
|
|
1288
|
+
} catch {}
|
|
1289
|
+
}
|
|
1290
|
+
}, en = {
|
|
1291
|
+
getItem: () => null,
|
|
1292
|
+
setItem: () => {}
|
|
1293
|
+
};
|
|
1294
|
+
function tn({ primary: t, secondary: n, primaryLabel: r, secondaryLabel: i, storageKey: a, defaultRatio: o = 50, className: s }) {
|
|
1295
|
+
let { t: c } = q(), l = ee(), u = Ve({
|
|
1296
|
+
id: a ?? "bento-split-page",
|
|
1297
|
+
panelIds: Qt,
|
|
1298
|
+
storage: a ? $t : en
|
|
1299
|
+
});
|
|
1300
|
+
return l ? /* @__PURE__ */ K(F, {
|
|
1301
|
+
"data-slot": "bento-split-page",
|
|
1302
|
+
defaultValue: "primary",
|
|
1303
|
+
className: e("flex flex-col gap-3", s),
|
|
1304
|
+
children: [
|
|
1305
|
+
/* @__PURE__ */ K(j, {
|
|
1306
|
+
"aria-label": c("bento.split.switch", { defaultValue: "Show" }),
|
|
1307
|
+
className: "self-start",
|
|
1308
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1309
|
+
value: "primary",
|
|
1310
|
+
children: r
|
|
1311
|
+
}), /* @__PURE__ */ G(I, {
|
|
1312
|
+
value: "secondary",
|
|
1313
|
+
children: i
|
|
1314
|
+
})]
|
|
1315
|
+
}),
|
|
1316
|
+
/* @__PURE__ */ G(w, {
|
|
1317
|
+
value: "primary",
|
|
1318
|
+
forceMount: !0,
|
|
1319
|
+
className: "data-[state=inactive]:hidden",
|
|
1320
|
+
children: t
|
|
1321
|
+
}),
|
|
1322
|
+
/* @__PURE__ */ G(w, {
|
|
1323
|
+
value: "secondary",
|
|
1324
|
+
forceMount: !0,
|
|
1325
|
+
className: "data-[state=inactive]:hidden",
|
|
1326
|
+
children: n
|
|
1327
|
+
})
|
|
1328
|
+
]
|
|
1329
|
+
}) : /* @__PURE__ */ G("div", {
|
|
1330
|
+
"data-slot": "bento-split-page",
|
|
1331
|
+
className: e("h-[var(--bento-split-height,calc(100dvh-12rem))] min-h-80", s),
|
|
1332
|
+
children: /* @__PURE__ */ K(y, {
|
|
1333
|
+
orientation: "horizontal",
|
|
1334
|
+
defaultLayout: u.defaultLayout,
|
|
1335
|
+
onLayoutChanged: u.onLayoutChanged,
|
|
1336
|
+
children: [
|
|
1337
|
+
/* @__PURE__ */ G(R, {
|
|
1338
|
+
id: "primary",
|
|
1339
|
+
defaultSize: `${o}`,
|
|
1340
|
+
minSize: "25",
|
|
1341
|
+
children: /* @__PURE__ */ G("section", {
|
|
1342
|
+
"aria-label": r,
|
|
1343
|
+
className: "h-full overflow-y-auto pr-3",
|
|
1344
|
+
children: t
|
|
1345
|
+
})
|
|
1346
|
+
}),
|
|
1347
|
+
/* @__PURE__ */ G(C, { withHandle: !0 }),
|
|
1348
|
+
/* @__PURE__ */ G(R, {
|
|
1349
|
+
id: "secondary",
|
|
1350
|
+
defaultSize: `${100 - o}`,
|
|
1351
|
+
minSize: "25",
|
|
1352
|
+
children: /* @__PURE__ */ G("section", {
|
|
1353
|
+
"aria-label": i,
|
|
1354
|
+
className: "h-full overflow-y-auto pl-3",
|
|
1355
|
+
children: n
|
|
1356
|
+
})
|
|
1357
|
+
})
|
|
1358
|
+
]
|
|
1359
|
+
})
|
|
1360
|
+
});
|
|
1361
|
+
}
|
|
1362
|
+
//#endregion
|
|
1363
|
+
//#region src/bento/bento-calendar.tsx
|
|
1364
|
+
var Z = ({ y: e, m: t, d: n }) => `${e}-${String(t).padStart(2, "0")}-${String(n).padStart(2, "0")}`, Q = ({ y: e, m: t, d: n }) => Date.UTC(e, t - 1, n), nn = (e) => {
|
|
1365
|
+
let t = new Date(e);
|
|
1366
|
+
return {
|
|
1367
|
+
y: t.getUTCFullYear(),
|
|
1368
|
+
m: t.getUTCMonth() + 1,
|
|
1369
|
+
d: t.getUTCDate()
|
|
1370
|
+
};
|
|
1371
|
+
}, $ = (e, t) => nn(Q(e) + t * 864e5), rn = (e, t) => {
|
|
1372
|
+
let n = new Date(Date.UTC(e.y, e.m - 1 + t, 1)), r = new Date(Date.UTC(n.getUTCFullYear(), n.getUTCMonth() + 1, 0)).getUTCDate();
|
|
1373
|
+
return {
|
|
1374
|
+
y: n.getUTCFullYear(),
|
|
1375
|
+
m: n.getUTCMonth() + 1,
|
|
1376
|
+
d: Math.min(e.d, r)
|
|
1377
|
+
};
|
|
1378
|
+
}, an = (e) => new Date(Q(e)).getUTCDay();
|
|
1379
|
+
function on(e, t) {
|
|
1380
|
+
let n = new Intl.DateTimeFormat("en-US", {
|
|
1381
|
+
timeZone: t,
|
|
1382
|
+
year: "numeric",
|
|
1383
|
+
month: "numeric",
|
|
1384
|
+
day: "numeric",
|
|
1385
|
+
hour: "numeric",
|
|
1386
|
+
minute: "numeric",
|
|
1387
|
+
second: "numeric",
|
|
1388
|
+
hourCycle: "h23"
|
|
1389
|
+
}).formatToParts(new Date(e)), r = (e) => Number(n.find((t) => t.type === e)?.value);
|
|
1390
|
+
return {
|
|
1391
|
+
y: r("year"),
|
|
1392
|
+
m: r("month"),
|
|
1393
|
+
d: r("day"),
|
|
1394
|
+
h: r("hour"),
|
|
1395
|
+
mi: r("minute"),
|
|
1396
|
+
s: r("second")
|
|
1397
|
+
};
|
|
1398
|
+
}
|
|
1399
|
+
function sn(e, t, n, r, i, a) {
|
|
1400
|
+
let o = Date.UTC(e.y, e.m - 1, e.d, t, n, r), s = (e) => {
|
|
1401
|
+
let t = on(e, a);
|
|
1402
|
+
return Date.UTC(t.y, t.m - 1, t.d, t.h, t.mi, t.s) - Math.floor(e / 1e3) * 1e3;
|
|
1403
|
+
}, c = o - s(o), l = s(c);
|
|
1404
|
+
return o - l !== c && (c = o - l), new Date(c + i);
|
|
1405
|
+
}
|
|
1406
|
+
var cn = {
|
|
1407
|
+
on: "bento-status bento-status-on",
|
|
1408
|
+
warn: "bento-status bento-status-warn",
|
|
1409
|
+
error: "bento-status bento-status-error"
|
|
1410
|
+
};
|
|
1411
|
+
function ln({ entries: t, view: n, defaultView: r = "month", onViewChange: i, defaultDate: a, timeZone: o = Intl.DateTimeFormat().resolvedOptions().timeZone, weekStartsOn: s = 0, onEntryMove: c, onEntrySelect: l, onRangeChange: u, label: d, className: f }) {
|
|
1412
|
+
let { t: p, i18n: m } = q(), h = m?.resolvedLanguage ?? m?.language, g = (e) => {
|
|
1413
|
+
let t = on(new Date(e).getTime(), o);
|
|
1414
|
+
return {
|
|
1415
|
+
y: t.y,
|
|
1416
|
+
m: t.m,
|
|
1417
|
+
d: t.d
|
|
1418
|
+
};
|
|
1419
|
+
}, [_, v] = U(r), y = n ?? _, [b, x] = U(() => g(a ?? Date.now())), [S, C] = U(null), [w, T] = U(null), [E, D] = U(""), O = H(/* @__PURE__ */ new Map()), k = H(!1), A = se(), [j] = U(() => Z(g(Date.now()))), M = (e) => $(e, -((an(e) - s + 7) % 7)), N = M(y === "month" ? {
|
|
1420
|
+
...b,
|
|
1421
|
+
d: 1
|
|
1422
|
+
} : b), ee = y === "month" ? Math.ceil((Q(rn({
|
|
1423
|
+
...b,
|
|
1424
|
+
d: 1
|
|
1425
|
+
}, 1)) - Q(N)) / 6048e5) : 1, P = Array.from({ length: ee }, (e, t) => Array.from({ length: 7 }, (e, n) => $(N, t * 7 + n))), te = $(N, ee * 7), F = `${Z(N)}/${Z(te)}`;
|
|
1426
|
+
B(() => {
|
|
1427
|
+
u?.({
|
|
1428
|
+
start: sn(N, 0, 0, 0, 0, o),
|
|
1429
|
+
end: sn(te, 0, 0, 0, 0, o)
|
|
1430
|
+
});
|
|
1431
|
+
}, [F, o]), B(() => {
|
|
1432
|
+
k.current && (k.current = !1, O.current.get(Z(b))?.focus());
|
|
1433
|
+
});
|
|
1434
|
+
let I = /* @__PURE__ */ new Map();
|
|
1435
|
+
for (let e of t) {
|
|
1436
|
+
let t = new Date(e.start).getTime();
|
|
1437
|
+
if (Number.isNaN(t)) continue;
|
|
1438
|
+
let n = Z(g(t)), r = I.get(n) ?? [];
|
|
1439
|
+
r.push({
|
|
1440
|
+
entry: e,
|
|
1441
|
+
time: t
|
|
1442
|
+
}), I.set(n, r);
|
|
1443
|
+
}
|
|
1444
|
+
for (let e of I.values()) e.sort((e, t) => e.time - t.time);
|
|
1445
|
+
let L = (e) => new Intl.DateTimeFormat(h, {
|
|
1446
|
+
...e,
|
|
1447
|
+
timeZone: "UTC"
|
|
1448
|
+
}), R = (e) => L({ dateStyle: "full" }).format(Q(e)), ne = (e) => new Intl.DateTimeFormat(h, {
|
|
1449
|
+
timeStyle: "short",
|
|
1450
|
+
timeZone: o
|
|
1451
|
+
}).format(e), re = y === "month" ? L({
|
|
1452
|
+
month: "long",
|
|
1453
|
+
year: "numeric"
|
|
1454
|
+
}).format(Q({
|
|
1455
|
+
...b,
|
|
1456
|
+
d: 1
|
|
1457
|
+
})) : `${L({ dateStyle: "medium" }).format(Q(N))} – ${L({ dateStyle: "medium" }).format(Q($(te, -1)))}`;
|
|
1458
|
+
function ie(e) {
|
|
1459
|
+
k.current = !0, x(e);
|
|
1460
|
+
}
|
|
1461
|
+
function ae(e) {
|
|
1462
|
+
n === void 0 && v(e), i?.(e);
|
|
1463
|
+
}
|
|
1464
|
+
let oe = (e) => y === "month" ? rn(b, e) : $(b, 7 * e);
|
|
1465
|
+
function z(e, n) {
|
|
1466
|
+
let r = t.find((t) => t.id === e);
|
|
1467
|
+
if (!r || !c) return;
|
|
1468
|
+
let i = new Date(r.start).getTime(), a = on(i, o);
|
|
1469
|
+
Z(a) !== Z(n) && c(e, sn(n, a.h, a.mi, a.s, i % 1e3, o)), D(p("bento.calendar.moved", {
|
|
1470
|
+
defaultValue: "Moved {{label}} to {{day}}.",
|
|
1471
|
+
label: r.label,
|
|
1472
|
+
day: R(n)
|
|
1473
|
+
}));
|
|
1474
|
+
}
|
|
1475
|
+
function V(e, n) {
|
|
1476
|
+
let r = {
|
|
1477
|
+
ArrowLeft: () => $(n, -1),
|
|
1478
|
+
ArrowRight: () => $(n, 1),
|
|
1479
|
+
ArrowUp: () => $(n, -7),
|
|
1480
|
+
ArrowDown: () => $(n, 7),
|
|
1481
|
+
Home: () => M(n),
|
|
1482
|
+
End: () => $(M(n), 6),
|
|
1483
|
+
PageUp: () => oe(-1),
|
|
1484
|
+
PageDown: () => oe(1)
|
|
1485
|
+
}[e.key];
|
|
1486
|
+
if (r) {
|
|
1487
|
+
e.preventDefault(), ie(r());
|
|
1488
|
+
return;
|
|
1489
|
+
}
|
|
1490
|
+
if (S && (e.key === "Enter" || e.key === " ")) e.preventDefault(), z(S, n), C(null);
|
|
1491
|
+
else if (S && e.key === "Escape") {
|
|
1492
|
+
e.preventDefault();
|
|
1493
|
+
let n = t.find((e) => e.id === S);
|
|
1494
|
+
C(null), D(p("bento.calendar.cancelled", {
|
|
1495
|
+
defaultValue: "Put {{label}} back.",
|
|
1496
|
+
label: n?.label ?? ""
|
|
1497
|
+
}));
|
|
1498
|
+
} else e.key === "Enter" && (e.preventDefault(), e.currentTarget.querySelector("button")?.focus());
|
|
1499
|
+
}
|
|
1500
|
+
function ce(e, t) {
|
|
1501
|
+
let n = e.currentTarget.closest("td"), r = n ? [...n.querySelectorAll("button")] : [], i = r.indexOf(e.currentTarget), a = c && (e.key === " " || e.key === "Enter" && !l);
|
|
1502
|
+
if (e.key === "ArrowDown" || e.key === "ArrowUp") r[i + (e.key === "ArrowDown" ? 1 : -1)]?.focus();
|
|
1503
|
+
else if (e.key === "Escape") n?.focus();
|
|
1504
|
+
else if (a) C(t.id), D(p("bento.calendar.picked", {
|
|
1505
|
+
defaultValue: "Picked up {{label}}. Choose a day and press Enter.",
|
|
1506
|
+
label: t.label
|
|
1507
|
+
})), n?.focus();
|
|
1508
|
+
else if (e.key === "Enter" && l) l(t.id);
|
|
1509
|
+
else return;
|
|
1510
|
+
e.preventDefault(), e.stopPropagation();
|
|
1511
|
+
}
|
|
1512
|
+
function W(e, t) {
|
|
1513
|
+
let n = w ?? e.dataTransfer.getData("text/plain");
|
|
1514
|
+
T(null), n && (e.preventDefault(), z(n, t));
|
|
1515
|
+
}
|
|
1516
|
+
let le = c ? A : void 0;
|
|
1517
|
+
return /* @__PURE__ */ K("div", {
|
|
1518
|
+
"data-slot": "bento-calendar",
|
|
1519
|
+
className: e("flex flex-col gap-3", f),
|
|
1520
|
+
children: [
|
|
1521
|
+
/* @__PURE__ */ K("div", {
|
|
1522
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
1523
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1524
|
+
className: "flex items-center gap-1",
|
|
1525
|
+
children: [
|
|
1526
|
+
/* @__PURE__ */ G(un, {
|
|
1527
|
+
label: p("bento.calendar.previous", { defaultValue: "Previous" }),
|
|
1528
|
+
onClick: () => x(oe(-1)),
|
|
1529
|
+
children: /* @__PURE__ */ G(ye, {
|
|
1530
|
+
size: 16,
|
|
1531
|
+
"aria-hidden": "true"
|
|
1532
|
+
})
|
|
1533
|
+
}),
|
|
1534
|
+
/* @__PURE__ */ G(un, {
|
|
1535
|
+
label: p("bento.calendar.next", { defaultValue: "Next" }),
|
|
1536
|
+
onClick: () => x(oe(1)),
|
|
1537
|
+
children: /* @__PURE__ */ G(be, {
|
|
1538
|
+
size: 16,
|
|
1539
|
+
"aria-hidden": "true"
|
|
1540
|
+
})
|
|
1541
|
+
}),
|
|
1542
|
+
/* @__PURE__ */ G("button", {
|
|
1543
|
+
type: "button",
|
|
1544
|
+
onClick: () => x(g(Date.now())),
|
|
1545
|
+
className: "rounded-md border border-border px-2 py-1 text-sm hover:bg-muted/50 focus-visible:outline-2 focus-visible:outline-ring",
|
|
1546
|
+
children: p("bento.calendar.today", { defaultValue: "Today" })
|
|
1547
|
+
}),
|
|
1548
|
+
/* @__PURE__ */ G("h2", {
|
|
1549
|
+
className: "m-0 ml-2 text-base font-semibold",
|
|
1550
|
+
"aria-live": "polite",
|
|
1551
|
+
children: re
|
|
1552
|
+
})
|
|
1553
|
+
]
|
|
1554
|
+
}), /* @__PURE__ */ G("div", {
|
|
1555
|
+
role: "group",
|
|
1556
|
+
"aria-label": p("bento.calendar.views", { defaultValue: "View" }),
|
|
1557
|
+
className: "flex rounded-md border border-border p-0.5",
|
|
1558
|
+
children: ["month", "week"].map((t) => /* @__PURE__ */ G("button", {
|
|
1559
|
+
type: "button",
|
|
1560
|
+
"aria-pressed": y === t ? "true" : "false",
|
|
1561
|
+
onClick: () => ae(t),
|
|
1562
|
+
className: e("rounded px-2 py-0.5 text-sm focus-visible:outline-2 focus-visible:outline-ring", y === t ? "bg-primary text-primary-foreground" : "hover:bg-muted/50"),
|
|
1563
|
+
children: t === "month" ? p("bento.calendar.month", { defaultValue: "Month" }) : p("bento.calendar.week", { defaultValue: "Week" })
|
|
1564
|
+
}, t))
|
|
1565
|
+
})]
|
|
1566
|
+
}),
|
|
1567
|
+
/* @__PURE__ */ G("span", {
|
|
1568
|
+
role: "status",
|
|
1569
|
+
"aria-live": "polite",
|
|
1570
|
+
className: "sr-only",
|
|
1571
|
+
children: E
|
|
1572
|
+
}),
|
|
1573
|
+
le && /* @__PURE__ */ G("span", {
|
|
1574
|
+
id: le,
|
|
1575
|
+
className: "sr-only",
|
|
1576
|
+
children: p("bento.calendar.moveHint", { defaultValue: "Space picks this up to move it: the arrow keys choose a day, Enter drops it and Escape cancels." })
|
|
1577
|
+
}),
|
|
1578
|
+
/* @__PURE__ */ K("table", {
|
|
1579
|
+
role: "grid",
|
|
1580
|
+
"aria-label": d ?? re,
|
|
1581
|
+
className: "w-full table-fixed border-collapse text-sm",
|
|
1582
|
+
children: [/* @__PURE__ */ G("thead", { children: /* @__PURE__ */ G("tr", { children: P[0].map((e) => /* @__PURE__ */ G("th", {
|
|
1583
|
+
scope: "col",
|
|
1584
|
+
abbr: L({ weekday: "long" }).format(Q(e)),
|
|
1585
|
+
className: "pb-1 text-xs font-medium text-muted-foreground",
|
|
1586
|
+
children: L({ weekday: "short" }).format(Q(e))
|
|
1587
|
+
}, Z(e))) }) }), /* @__PURE__ */ G("tbody", { children: P.map((t) => /* @__PURE__ */ G("tr", { children: t.map((t) => {
|
|
1588
|
+
let n = Z(t), r = I.get(n) ?? [], i = n === Z(b), a = y === "month" && t.m !== b.m, o = r.length;
|
|
1589
|
+
return /* @__PURE__ */ K("td", {
|
|
1590
|
+
ref: (e) => {
|
|
1591
|
+
e ? O.current.set(n, e) : O.current.delete(n);
|
|
1592
|
+
},
|
|
1593
|
+
role: "gridcell",
|
|
1594
|
+
tabIndex: i ? 0 : -1,
|
|
1595
|
+
"aria-label": o > 0 ? `${R(t)}, ${p("bento.calendar.entries", {
|
|
1596
|
+
defaultValue: "{{count}} scheduled",
|
|
1597
|
+
count: o
|
|
1598
|
+
})}` : R(t),
|
|
1599
|
+
"aria-current": n === j ? "date" : void 0,
|
|
1600
|
+
"data-day": n,
|
|
1601
|
+
onKeyDown: (e) => V(e, t),
|
|
1602
|
+
onFocus: () => {
|
|
1603
|
+
i || x(t);
|
|
1604
|
+
},
|
|
1605
|
+
onDragOver: (e) => {
|
|
1606
|
+
w && e.preventDefault();
|
|
1607
|
+
},
|
|
1608
|
+
onDrop: (e) => W(e, t),
|
|
1609
|
+
className: e("border border-border/60 p-1 align-top outline-none", y === "month" ? "h-24" : "h-48", "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring", S && i && "bg-primary/10"),
|
|
1610
|
+
children: [/* @__PURE__ */ G("span", {
|
|
1611
|
+
"aria-hidden": "true",
|
|
1612
|
+
className: e("mb-1 inline-grid size-6 place-items-center rounded-full text-xs", n === j && "bg-primary font-semibold text-primary-foreground", n !== j && a && "text-muted-foreground"),
|
|
1613
|
+
children: t.d
|
|
1614
|
+
}), /* @__PURE__ */ G("ul", {
|
|
1615
|
+
className: "m-0 flex list-none flex-col gap-0.5 p-0",
|
|
1616
|
+
children: r.map(({ entry: t, time: n }) => /* @__PURE__ */ G("li", { children: /* @__PURE__ */ K("button", {
|
|
1617
|
+
type: "button",
|
|
1618
|
+
tabIndex: -1,
|
|
1619
|
+
draggable: c ? !0 : void 0,
|
|
1620
|
+
"aria-describedby": le,
|
|
1621
|
+
"aria-pressed": c ? S === t.id ? "true" : "false" : void 0,
|
|
1622
|
+
"data-entry": t.id,
|
|
1623
|
+
onKeyDown: (e) => ce(e, t),
|
|
1624
|
+
onClick: () => l?.(t.id),
|
|
1625
|
+
onDragStart: (e) => {
|
|
1626
|
+
e.dataTransfer.setData("text/plain", t.id), e.dataTransfer.effectAllowed = "move", T(t.id);
|
|
1627
|
+
},
|
|
1628
|
+
onDragEnd: () => T(null),
|
|
1629
|
+
className: e("flex w-full min-w-0 items-baseline gap-1 rounded-md px-1 py-0.5 text-left text-xs focus-visible:outline-2 focus-visible:outline-ring", t.tone ? cn[t.tone] : "bg-muted", S === t.id && "outline-2 outline-dashed outline-primary"),
|
|
1630
|
+
children: [/* @__PURE__ */ G("time", {
|
|
1631
|
+
dateTime: new Date(n).toISOString(),
|
|
1632
|
+
className: "flex-none tabular-nums",
|
|
1633
|
+
children: ne(n)
|
|
1634
|
+
}), /* @__PURE__ */ G("span", {
|
|
1635
|
+
className: "truncate",
|
|
1636
|
+
children: t.label
|
|
1637
|
+
})]
|
|
1638
|
+
}) }, t.id))
|
|
1639
|
+
})]
|
|
1640
|
+
}, n);
|
|
1641
|
+
}) }, Z(t[0]))) })]
|
|
1642
|
+
})
|
|
1643
|
+
]
|
|
1644
|
+
});
|
|
1645
|
+
}
|
|
1646
|
+
function un({ label: e, onClick: t, children: n }) {
|
|
1647
|
+
return /* @__PURE__ */ G("button", {
|
|
1648
|
+
type: "button",
|
|
1649
|
+
"aria-label": e,
|
|
1650
|
+
onClick: t,
|
|
1651
|
+
className: "grid size-7 place-items-center rounded-md border border-border hover:bg-muted/50 focus-visible:outline-2 focus-visible:outline-ring",
|
|
1652
|
+
children: n
|
|
1653
|
+
});
|
|
1654
|
+
}
|
|
1655
|
+
//#endregion
|
|
1013
1656
|
//#region src/bento/bento-layout.ts
|
|
1014
|
-
var
|
|
1657
|
+
var dn = {
|
|
1015
1658
|
LARGE: "col-span-2 row-span-2 md:col-span-2 md:row-span-2 lg:col-span-2 lg:row-span-2",
|
|
1016
1659
|
MEDIUM: "col-span-2 row-span-1 md:col-span-2 md:row-span-1 lg:col-span-2 lg:row-span-1",
|
|
1017
1660
|
SMALL: "col-span-1 row-span-1"
|
|
1018
|
-
},
|
|
1661
|
+
}, fn = {
|
|
1019
1662
|
SMALL: "MEDIUM",
|
|
1020
1663
|
MEDIUM: "LARGE",
|
|
1021
1664
|
LARGE: "SMALL"
|
|
1022
1665
|
};
|
|
1023
|
-
function
|
|
1666
|
+
function pn(e, t, n) {
|
|
1024
1667
|
if (!n || n.length === 0) return e.map((e, n) => ({
|
|
1025
1668
|
item: e,
|
|
1026
1669
|
key: t(e),
|
|
@@ -1041,7 +1684,7 @@ function Ct(e, t, n) {
|
|
|
1041
1684
|
emphasis: i.get(t) ?? "MEDIUM"
|
|
1042
1685
|
}));
|
|
1043
1686
|
}
|
|
1044
|
-
function
|
|
1687
|
+
function mn(e) {
|
|
1045
1688
|
return e.map((e, t) => ({
|
|
1046
1689
|
itemId: e.key,
|
|
1047
1690
|
emphasis: e.emphasis,
|
|
@@ -1050,45 +1693,45 @@ function wt(e) {
|
|
|
1050
1693
|
}
|
|
1051
1694
|
//#endregion
|
|
1052
1695
|
//#region src/bento/bento-entity-tile.tsx
|
|
1053
|
-
function
|
|
1054
|
-
let { t: f } =
|
|
1055
|
-
return /* @__PURE__ */
|
|
1696
|
+
function hn({ to: e, emphasis: t, featured: n, defaultIcon: r, icon: i, tone: a = "indigo", title: o, description: s, meta: c, enabled: l, hasStatus: u = !1, viewTransitionName: d }) {
|
|
1697
|
+
let { t: f } = q(), p = Y(a), m = t ?? (n ? "LARGE" : "MEDIUM"), h = m === "LARGE", g = m === "SMALL", _ = dn[m], v = l === 1, y = h ? "p-6 md:p-7" : g ? "p-4" : "p-5", b = h ? "h-14 w-14" : g ? "h-8 w-8" : "h-9 w-9", x = h ? 28 : g ? 16 : 18, S = h ? "text-xl md:text-2xl" : g ? "text-sm" : "text-base md:text-lg";
|
|
1698
|
+
return /* @__PURE__ */ K(He, {
|
|
1056
1699
|
to: e,
|
|
1057
1700
|
className: `bento-tile bento-tile-clickable bento-glass group relative flex flex-col ${h ? "gap-5" : "gap-4"} overflow-hidden ${y} ${_}`,
|
|
1058
1701
|
style: d ? { viewTransitionName: d } : void 0,
|
|
1059
1702
|
children: [
|
|
1060
|
-
h && /* @__PURE__ */
|
|
1703
|
+
h && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
|
|
1061
1704
|
"aria-hidden": !0,
|
|
1062
1705
|
className: `pointer-events-none absolute -bottom-10 -right-10 h-64 w-64 rounded-full ${p} opacity-40 blur-2xl dark:opacity-50`
|
|
1063
|
-
}), /* @__PURE__ */
|
|
1706
|
+
}), /* @__PURE__ */ G("div", {
|
|
1064
1707
|
"aria-hidden": !0,
|
|
1065
1708
|
className: `pointer-events-none absolute right-12 top-1/3 h-32 w-32 rounded-full ${p} bento-chip-tr opacity-20 blur-2xl dark:opacity-30`
|
|
1066
1709
|
})] }),
|
|
1067
|
-
/* @__PURE__ */
|
|
1710
|
+
/* @__PURE__ */ K("div", {
|
|
1068
1711
|
className: "relative z-1 flex items-center justify-between",
|
|
1069
|
-
children: [/* @__PURE__ */
|
|
1712
|
+
children: [/* @__PURE__ */ G("span", {
|
|
1070
1713
|
className: `grid place-items-center rounded-2xl ${p} text-white shadow-md ${b}`,
|
|
1071
|
-
children: i ? /* @__PURE__ */
|
|
1714
|
+
children: i ? /* @__PURE__ */ G(Be, {
|
|
1072
1715
|
icon: i,
|
|
1073
1716
|
className: h ? "size-7 text-white" : "size-4.5 text-white"
|
|
1074
|
-
}) : /* @__PURE__ */
|
|
1075
|
-
}), u && /* @__PURE__ */
|
|
1717
|
+
}) : /* @__PURE__ */ G(r, { size: x })
|
|
1718
|
+
}), u && /* @__PURE__ */ K("span", {
|
|
1076
1719
|
className: `flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-[10px] uppercase tracking-wider ${v ? "bento-status bento-status-on" : "border-border bg-muted text-muted-foreground"}`,
|
|
1077
|
-
children: [/* @__PURE__ */
|
|
1720
|
+
children: [/* @__PURE__ */ G("span", { className: `h-1.5 w-1.5 rounded-full ${v ? "bento-status-dot bento-pulse" : "bg-muted-foreground/60"}` }), v ? f("common.active", { defaultValue: "Active" }) : f("common.idle", { defaultValue: "Idle" })]
|
|
1078
1721
|
})]
|
|
1079
1722
|
}),
|
|
1080
|
-
/* @__PURE__ */
|
|
1723
|
+
/* @__PURE__ */ K("div", {
|
|
1081
1724
|
className: "relative z-1",
|
|
1082
1725
|
children: [
|
|
1083
|
-
/* @__PURE__ */
|
|
1726
|
+
/* @__PURE__ */ G("div", {
|
|
1084
1727
|
className: `font-semibold tracking-tight ${S}`,
|
|
1085
1728
|
children: o
|
|
1086
1729
|
}),
|
|
1087
|
-
!g && c && /* @__PURE__ */
|
|
1730
|
+
!g && c && /* @__PURE__ */ G("div", {
|
|
1088
1731
|
className: "mt-1 flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground",
|
|
1089
1732
|
children: c
|
|
1090
1733
|
}),
|
|
1091
|
-
!g && s && /* @__PURE__ */
|
|
1734
|
+
!g && s && /* @__PURE__ */ G("p", {
|
|
1092
1735
|
className: "mt-2 text-sm text-muted-foreground",
|
|
1093
1736
|
children: s
|
|
1094
1737
|
})
|
|
@@ -1099,26 +1742,26 @@ function Tt({ to: e, emphasis: t, featured: n, defaultIcon: r, icon: i, tone: a
|
|
|
1099
1742
|
}
|
|
1100
1743
|
//#endregion
|
|
1101
1744
|
//#region src/bento/bento-filter-bar.tsx
|
|
1102
|
-
var
|
|
1745
|
+
var gn = {
|
|
1103
1746
|
query: "",
|
|
1104
1747
|
facets: {}
|
|
1105
|
-
},
|
|
1106
|
-
function
|
|
1748
|
+
}, _n = (e) => typeof e == "object" && !!e && !Array.isArray(e), vn = (e) => Array.isArray(e) ? e : [];
|
|
1749
|
+
function yn(e, t, n) {
|
|
1107
1750
|
let r = { ...e.facets };
|
|
1108
|
-
return n === void 0 || Array.isArray(n) && n.length === 0 ||
|
|
1751
|
+
return n === void 0 || Array.isArray(n) && n.length === 0 || _n(n) && !n.from && !n.to ? delete r[t] : r[t] = n, {
|
|
1109
1752
|
...e,
|
|
1110
1753
|
facets: r
|
|
1111
1754
|
};
|
|
1112
1755
|
}
|
|
1113
|
-
function
|
|
1114
|
-
let { t: s } =
|
|
1756
|
+
function bn({ value: e, onChange: n, facets: r, queryLabel: i, queryDelay: a = 300, views: o }) {
|
|
1757
|
+
let { t: s } = q(), [c, l] = U({
|
|
1115
1758
|
source: e.query,
|
|
1116
1759
|
text: e.query
|
|
1117
|
-
}), [u, d] =
|
|
1760
|
+
}), [u, d] = U(null);
|
|
1118
1761
|
c.source !== e.query && l({
|
|
1119
1762
|
source: e.query,
|
|
1120
1763
|
text: e.query === u ? c.text : e.query
|
|
1121
|
-
}),
|
|
1764
|
+
}), B(() => {
|
|
1122
1765
|
if (c.text === e.query) return;
|
|
1123
1766
|
let t = setTimeout(() => {
|
|
1124
1767
|
d(c.text), n({
|
|
@@ -1136,36 +1779,36 @@ function At({ value: e, onChange: n, facets: r, queryLabel: i, queryDelay: a = 3
|
|
|
1136
1779
|
let f = [];
|
|
1137
1780
|
for (let t of r) {
|
|
1138
1781
|
let n = e.facets[t.id];
|
|
1139
|
-
if (t.kind === "choice") for (let r of
|
|
1782
|
+
if (t.kind === "choice") for (let r of vn(n)) {
|
|
1140
1783
|
let i = t.options.find((e) => e.value === r);
|
|
1141
1784
|
f.push({
|
|
1142
1785
|
key: `${t.id}:${r}`,
|
|
1143
1786
|
text: `${t.label}: ${i?.label ?? r}`,
|
|
1144
|
-
remove: () =>
|
|
1787
|
+
remove: () => yn(e, t.id, vn(n).filter((e) => e !== r))
|
|
1145
1788
|
});
|
|
1146
1789
|
}
|
|
1147
|
-
else
|
|
1790
|
+
else _n(n) && (n.from || n.to) && f.push({
|
|
1148
1791
|
key: t.id,
|
|
1149
1792
|
text: `${t.label}: ${n.from ?? "…"} – ${n.to ?? "…"}`,
|
|
1150
|
-
remove: () =>
|
|
1793
|
+
remove: () => yn(e, t.id, void 0)
|
|
1151
1794
|
});
|
|
1152
1795
|
}
|
|
1153
1796
|
let p = f.length > 0 || e.query !== "", m = i ?? s("bento.filters.search", { defaultValue: "Search" });
|
|
1154
|
-
return /* @__PURE__ */
|
|
1797
|
+
return /* @__PURE__ */ K("div", {
|
|
1155
1798
|
role: "search",
|
|
1156
1799
|
"aria-label": s("bento.filters.label", { defaultValue: "Filters" }),
|
|
1157
1800
|
"data-slot": "bento-filter-bar",
|
|
1158
1801
|
className: "flex flex-col gap-2",
|
|
1159
|
-
children: [/* @__PURE__ */
|
|
1802
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1160
1803
|
className: "flex flex-wrap items-center gap-2",
|
|
1161
1804
|
children: [
|
|
1162
|
-
/* @__PURE__ */
|
|
1805
|
+
/* @__PURE__ */ K("div", {
|
|
1163
1806
|
className: "relative min-w-48 flex-1",
|
|
1164
|
-
children: [/* @__PURE__ */
|
|
1807
|
+
children: [/* @__PURE__ */ G(Ne, {
|
|
1165
1808
|
size: 16,
|
|
1166
1809
|
"aria-hidden": "true",
|
|
1167
1810
|
className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
1168
|
-
}), /* @__PURE__ */
|
|
1811
|
+
}), /* @__PURE__ */ G(t, {
|
|
1169
1812
|
type: "search",
|
|
1170
1813
|
value: c.text,
|
|
1171
1814
|
placeholder: m,
|
|
@@ -1177,21 +1820,21 @@ function At({ value: e, onChange: n, facets: r, queryLabel: i, queryDelay: a = 3
|
|
|
1177
1820
|
className: "pl-9"
|
|
1178
1821
|
})]
|
|
1179
1822
|
}),
|
|
1180
|
-
r.map((t) => t.kind === "choice" ? /* @__PURE__ */
|
|
1823
|
+
r.map((t) => t.kind === "choice" ? /* @__PURE__ */ G(Sn, {
|
|
1181
1824
|
facet: t,
|
|
1182
1825
|
value: e,
|
|
1183
1826
|
onChange: n
|
|
1184
|
-
}, t.id) : /* @__PURE__ */
|
|
1827
|
+
}, t.id) : /* @__PURE__ */ G(Cn, {
|
|
1185
1828
|
facet: t,
|
|
1186
1829
|
value: e,
|
|
1187
1830
|
onChange: n
|
|
1188
1831
|
}, t.id)),
|
|
1189
1832
|
o
|
|
1190
1833
|
]
|
|
1191
|
-
}), p && /* @__PURE__ */
|
|
1834
|
+
}), p && /* @__PURE__ */ K("ul", {
|
|
1192
1835
|
className: "m-0 flex list-none flex-wrap items-center gap-1.5 p-0",
|
|
1193
1836
|
"aria-label": s("bento.filters.active", { defaultValue: "Active filters" }),
|
|
1194
|
-
children: [f.map((e) => /* @__PURE__ */
|
|
1837
|
+
children: [f.map((e) => /* @__PURE__ */ G("li", { children: /* @__PURE__ */ K("button", {
|
|
1195
1838
|
type: "button",
|
|
1196
1839
|
"aria-label": s("bento.filters.remove", {
|
|
1197
1840
|
defaultValue: "Remove filter {{filter}}",
|
|
@@ -1199,11 +1842,11 @@ function At({ value: e, onChange: n, facets: r, queryLabel: i, queryDelay: a = 3
|
|
|
1199
1842
|
}),
|
|
1200
1843
|
onClick: () => n(e.remove()),
|
|
1201
1844
|
className: "bento-clear inline-flex items-center gap-1 rounded-full border border-border/60 bg-card/60 py-0.5 pl-2.5 pr-1.5 text-xs",
|
|
1202
|
-
children: [e.text, /* @__PURE__ */
|
|
1845
|
+
children: [e.text, /* @__PURE__ */ G(ze, {
|
|
1203
1846
|
size: 12,
|
|
1204
1847
|
"aria-hidden": "true"
|
|
1205
1848
|
})]
|
|
1206
|
-
}) }, e.key)), /* @__PURE__ */
|
|
1849
|
+
}) }, e.key)), /* @__PURE__ */ G("li", { children: /* @__PURE__ */ G(P, {
|
|
1207
1850
|
variant: "ghost",
|
|
1208
1851
|
size: "sm",
|
|
1209
1852
|
className: "h-6 px-2 text-xs",
|
|
@@ -1211,108 +1854,108 @@ function At({ value: e, onChange: n, facets: r, queryLabel: i, queryDelay: a = 3
|
|
|
1211
1854
|
l({
|
|
1212
1855
|
source: "",
|
|
1213
1856
|
text: ""
|
|
1214
|
-
}), n(
|
|
1857
|
+
}), n(gn);
|
|
1215
1858
|
},
|
|
1216
1859
|
children: s("bento.filters.clearAll", { defaultValue: "Clear all" })
|
|
1217
1860
|
}) })]
|
|
1218
1861
|
})]
|
|
1219
1862
|
});
|
|
1220
1863
|
}
|
|
1221
|
-
function
|
|
1222
|
-
return /* @__PURE__ */
|
|
1864
|
+
function xn({ label: e, count: t, ...n }) {
|
|
1865
|
+
return /* @__PURE__ */ K(P, {
|
|
1223
1866
|
variant: "outline",
|
|
1224
1867
|
size: "sm",
|
|
1225
1868
|
className: "gap-1.5",
|
|
1226
1869
|
...n,
|
|
1227
1870
|
children: [
|
|
1228
1871
|
e,
|
|
1229
|
-
t > 0 && /* @__PURE__ */
|
|
1872
|
+
t > 0 && /* @__PURE__ */ G("span", {
|
|
1230
1873
|
className: "rounded-full bg-primary px-1.5 text-[0.6875rem] leading-4 text-primary-foreground",
|
|
1231
1874
|
children: t
|
|
1232
1875
|
}),
|
|
1233
|
-
/* @__PURE__ */
|
|
1876
|
+
/* @__PURE__ */ G(ve, {
|
|
1234
1877
|
size: 14,
|
|
1235
1878
|
"aria-hidden": "true"
|
|
1236
1879
|
})
|
|
1237
1880
|
]
|
|
1238
1881
|
});
|
|
1239
1882
|
}
|
|
1240
|
-
function
|
|
1241
|
-
let r =
|
|
1242
|
-
return /* @__PURE__ */
|
|
1883
|
+
function Sn({ facet: e, value: t, onChange: n }) {
|
|
1884
|
+
let r = vn(t.facets[e.id]);
|
|
1885
|
+
return /* @__PURE__ */ K(k, { children: [/* @__PURE__ */ G(f, {
|
|
1243
1886
|
asChild: !0,
|
|
1244
|
-
children: /* @__PURE__ */
|
|
1887
|
+
children: /* @__PURE__ */ G(xn, {
|
|
1245
1888
|
label: e.label,
|
|
1246
1889
|
count: r.length
|
|
1247
1890
|
})
|
|
1248
|
-
}), /* @__PURE__ */
|
|
1891
|
+
}), /* @__PURE__ */ G(g, {
|
|
1249
1892
|
align: "start",
|
|
1250
1893
|
className: "bento-dropdown min-w-44 p-1.5",
|
|
1251
|
-
children: e.multiple ? e.options.map((i) => /* @__PURE__ */
|
|
1894
|
+
children: e.multiple ? e.options.map((i) => /* @__PURE__ */ G(h, {
|
|
1252
1895
|
checked: r.includes(i.value),
|
|
1253
|
-
onCheckedChange: (a) => n(
|
|
1896
|
+
onCheckedChange: (a) => n(yn(t, e.id, a === !0 ? [...r, i.value] : r.filter((e) => e !== i.value))),
|
|
1254
1897
|
onSelect: (e) => e.preventDefault(),
|
|
1255
1898
|
children: i.label
|
|
1256
|
-
}, i.value)) : /* @__PURE__ */
|
|
1899
|
+
}, i.value)) : /* @__PURE__ */ G(v, {
|
|
1257
1900
|
value: r[0] ?? "",
|
|
1258
|
-
onValueChange: (i) => n(
|
|
1259
|
-
children: e.options.map((e) => /* @__PURE__ */
|
|
1901
|
+
onValueChange: (i) => n(yn(t, e.id, i === r[0] ? [] : [i])),
|
|
1902
|
+
children: e.options.map((e) => /* @__PURE__ */ G(ne, {
|
|
1260
1903
|
value: e.value,
|
|
1261
1904
|
children: e.label
|
|
1262
1905
|
}, e.value))
|
|
1263
1906
|
})
|
|
1264
1907
|
})] });
|
|
1265
1908
|
}
|
|
1266
|
-
function
|
|
1267
|
-
let { t: i } =
|
|
1268
|
-
return /* @__PURE__ */
|
|
1909
|
+
function Cn({ facet: e, value: n, onChange: r }) {
|
|
1910
|
+
let { t: i } = q(), a = n.facets[e.id], o = _n(a) ? a : {}, [s, c] = U(!1), [l, d] = U(o.from ?? ""), [f, p] = U(o.to ?? ""), m = se(), h = se();
|
|
1911
|
+
return /* @__PURE__ */ K(u, {
|
|
1269
1912
|
open: s,
|
|
1270
1913
|
onOpenChange: (e) => {
|
|
1271
|
-
e && (
|
|
1914
|
+
e && (d(o.from ?? ""), p(o.to ?? "")), c(e);
|
|
1272
1915
|
},
|
|
1273
|
-
children: [/* @__PURE__ */
|
|
1916
|
+
children: [/* @__PURE__ */ G(A, {
|
|
1274
1917
|
asChild: !0,
|
|
1275
|
-
children: /* @__PURE__ */
|
|
1918
|
+
children: /* @__PURE__ */ G(xn, {
|
|
1276
1919
|
label: e.label,
|
|
1277
1920
|
count: o.from || o.to ? 1 : 0
|
|
1278
1921
|
})
|
|
1279
|
-
}), /* @__PURE__ */
|
|
1922
|
+
}), /* @__PURE__ */ G(b, {
|
|
1280
1923
|
align: "start",
|
|
1281
1924
|
className: "bento-dropdown w-64 p-3",
|
|
1282
|
-
children: /* @__PURE__ */
|
|
1925
|
+
children: /* @__PURE__ */ K("form", {
|
|
1283
1926
|
className: "flex flex-col gap-2",
|
|
1284
1927
|
onSubmit: (t) => {
|
|
1285
|
-
t.preventDefault(), r(
|
|
1928
|
+
t.preventDefault(), r(yn(n, e.id, {
|
|
1286
1929
|
from: l || void 0,
|
|
1287
|
-
to:
|
|
1930
|
+
to: f || void 0
|
|
1288
1931
|
})), c(!1);
|
|
1289
1932
|
},
|
|
1290
1933
|
children: [
|
|
1291
|
-
/* @__PURE__ */
|
|
1292
|
-
htmlFor:
|
|
1934
|
+
/* @__PURE__ */ G("label", {
|
|
1935
|
+
htmlFor: m,
|
|
1293
1936
|
className: "text-xs text-muted-foreground",
|
|
1294
1937
|
children: i("bento.filters.from", { defaultValue: "From" })
|
|
1295
1938
|
}),
|
|
1296
|
-
/* @__PURE__ */
|
|
1297
|
-
id:
|
|
1939
|
+
/* @__PURE__ */ G(t, {
|
|
1940
|
+
id: m,
|
|
1298
1941
|
type: "date",
|
|
1299
1942
|
value: l,
|
|
1300
|
-
max:
|
|
1301
|
-
onChange: (e) =>
|
|
1943
|
+
max: f || void 0,
|
|
1944
|
+
onChange: (e) => d(e.target.value)
|
|
1302
1945
|
}),
|
|
1303
|
-
/* @__PURE__ */
|
|
1304
|
-
htmlFor:
|
|
1946
|
+
/* @__PURE__ */ G("label", {
|
|
1947
|
+
htmlFor: h,
|
|
1305
1948
|
className: "text-xs text-muted-foreground",
|
|
1306
1949
|
children: i("bento.filters.to", { defaultValue: "To" })
|
|
1307
1950
|
}),
|
|
1308
|
-
/* @__PURE__ */
|
|
1309
|
-
id:
|
|
1951
|
+
/* @__PURE__ */ G(t, {
|
|
1952
|
+
id: h,
|
|
1310
1953
|
type: "date",
|
|
1311
|
-
value:
|
|
1954
|
+
value: f,
|
|
1312
1955
|
min: l || void 0,
|
|
1313
|
-
onChange: (e) =>
|
|
1956
|
+
onChange: (e) => p(e.target.value)
|
|
1314
1957
|
}),
|
|
1315
|
-
/* @__PURE__ */
|
|
1958
|
+
/* @__PURE__ */ G(P, {
|
|
1316
1959
|
type: "submit",
|
|
1317
1960
|
size: "sm",
|
|
1318
1961
|
className: "mt-1",
|
|
@@ -1325,40 +1968,40 @@ function Nt({ facet: e, value: n, onChange: r }) {
|
|
|
1325
1968
|
}
|
|
1326
1969
|
//#endregion
|
|
1327
1970
|
//#region src/bento/bento-list-page.tsx
|
|
1328
|
-
var
|
|
1329
|
-
function
|
|
1330
|
-
let { t: x } =
|
|
1971
|
+
var wn = "bento-grid grid auto-rows-[minmax(140px,auto)] grid-cols-2 gap-4 md:grid-cols-4 md:gap-5 lg:grid-cols-6";
|
|
1972
|
+
function Tn({ items: e, error: t, tryAgainUrl: n, listId: r, eyebrow: i, backTo: a, backLabel: o, heroIcon: s, title: c, subtitle: l, tone: u = "indigo", headerAction: d, newRoute: f, newLabel: p, newSubtitle: m, hideNew: h = !1, itemKey: g, renderTile: _, emptyTitle: v, emptyDescription: y, layout: b }) {
|
|
1973
|
+
let { t: x } = q(), S = Y(u), [C, w] = U(!1), T = V(() => pn(e ?? [], g, b?.data?.entries), [
|
|
1331
1974
|
e,
|
|
1332
1975
|
g,
|
|
1333
1976
|
b?.data?.entries
|
|
1334
1977
|
]), E = !!r && !!b && (e?.length ?? 0) > 0;
|
|
1335
|
-
return /* @__PURE__ */
|
|
1978
|
+
return /* @__PURE__ */ K(ie, {
|
|
1336
1979
|
checkIsNotUndefined: e,
|
|
1337
1980
|
error: t ?? null,
|
|
1338
1981
|
tryAgainUrl: n,
|
|
1339
1982
|
children: [
|
|
1340
|
-
/* @__PURE__ */
|
|
1983
|
+
/* @__PURE__ */ G(yt, {
|
|
1341
1984
|
eyebrow: i,
|
|
1342
1985
|
backTo: a,
|
|
1343
1986
|
backLabel: o,
|
|
1344
|
-
leading: /* @__PURE__ */
|
|
1987
|
+
leading: /* @__PURE__ */ G("span", {
|
|
1345
1988
|
className: `grid h-12 w-12 place-items-center rounded-2xl ${S} text-white shadow-md`,
|
|
1346
|
-
children: /* @__PURE__ */
|
|
1989
|
+
children: /* @__PURE__ */ G(s, { size: 24 })
|
|
1347
1990
|
}),
|
|
1348
1991
|
title: c,
|
|
1349
1992
|
subtitle: l
|
|
1350
1993
|
}),
|
|
1351
|
-
(d || E && !C) && /* @__PURE__ */
|
|
1994
|
+
(d || E && !C) && /* @__PURE__ */ K("div", {
|
|
1352
1995
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
1353
|
-
children: [d, E && !C && /* @__PURE__ */
|
|
1996
|
+
children: [d, E && !C && /* @__PURE__ */ K(P, {
|
|
1354
1997
|
variant: "outline",
|
|
1355
1998
|
size: "sm",
|
|
1356
1999
|
onClick: () => w(!0),
|
|
1357
2000
|
className: "ml-auto gap-2",
|
|
1358
|
-
children: [/* @__PURE__ */
|
|
2001
|
+
children: [/* @__PURE__ */ G(le, { size: 16 }), x("bento.layout.customize", { defaultValue: "Customize layout" })]
|
|
1359
2002
|
})]
|
|
1360
2003
|
}),
|
|
1361
|
-
C && r && b ? /* @__PURE__ */
|
|
2004
|
+
C && r && b ? /* @__PURE__ */ G(On, {
|
|
1362
2005
|
layout: b,
|
|
1363
2006
|
resolved: T,
|
|
1364
2007
|
canEditGlobal: b?.data?.canEditGlobal ?? !1,
|
|
@@ -1370,7 +2013,7 @@ function Ft({ items: e, error: t, tryAgainUrl: n, listId: r, eyebrow: i, backTo:
|
|
|
1370
2013
|
newLabel: p,
|
|
1371
2014
|
newSubtitle: m,
|
|
1372
2015
|
onClose: () => w(!1)
|
|
1373
|
-
}) : /* @__PURE__ */
|
|
2016
|
+
}) : /* @__PURE__ */ G(Dn, {
|
|
1374
2017
|
resolved: T,
|
|
1375
2018
|
renderTile: _,
|
|
1376
2019
|
chip: S,
|
|
@@ -1385,26 +2028,26 @@ function Ft({ items: e, error: t, tryAgainUrl: n, listId: r, eyebrow: i, backTo:
|
|
|
1385
2028
|
]
|
|
1386
2029
|
});
|
|
1387
2030
|
}
|
|
1388
|
-
function
|
|
1389
|
-
let f =
|
|
1390
|
-
return /* @__PURE__ */
|
|
2031
|
+
function En({ items: e, error: t, tryAgainUrl: n, tone: r = "indigo", newRoute: i, newLabel: a, newSubtitle: o, hideNew: s = !1, itemKey: c, renderTile: l, emptyTitle: u, emptyDescription: d }) {
|
|
2032
|
+
let f = Y(r);
|
|
2033
|
+
return /* @__PURE__ */ G(ie, {
|
|
1391
2034
|
checkIsNotUndefined: e,
|
|
1392
2035
|
error: t ?? null,
|
|
1393
2036
|
tryAgainUrl: n,
|
|
1394
|
-
children: /* @__PURE__ */
|
|
1395
|
-
className:
|
|
2037
|
+
children: /* @__PURE__ */ K("div", {
|
|
2038
|
+
className: wn,
|
|
1396
2039
|
children: [
|
|
1397
|
-
!s && i && a ? /* @__PURE__ */
|
|
2040
|
+
!s && i && a ? /* @__PURE__ */ G(Mn, {
|
|
1398
2041
|
route: i,
|
|
1399
2042
|
label: a,
|
|
1400
2043
|
subtitle: o,
|
|
1401
2044
|
chip: f
|
|
1402
2045
|
}) : null,
|
|
1403
|
-
(e ?? []).map((e) => /* @__PURE__ */
|
|
2046
|
+
(e ?? []).map((e) => /* @__PURE__ */ G("span", {
|
|
1404
2047
|
className: "contents",
|
|
1405
2048
|
children: l(e)
|
|
1406
2049
|
}, c(e))),
|
|
1407
|
-
e?.length === 0 && /* @__PURE__ */
|
|
2050
|
+
e?.length === 0 && /* @__PURE__ */ G(Nn, {
|
|
1408
2051
|
title: u,
|
|
1409
2052
|
description: d
|
|
1410
2053
|
})
|
|
@@ -1412,30 +2055,30 @@ function It({ items: e, error: t, tryAgainUrl: n, tone: r = "indigo", newRoute:
|
|
|
1412
2055
|
})
|
|
1413
2056
|
});
|
|
1414
2057
|
}
|
|
1415
|
-
function
|
|
2058
|
+
function Dn({ resolved: t, renderTile: n, chip: r, hideNew: i, newRoute: a, newLabel: o, newSubtitle: s, isEmpty: c, emptyTitle: l, emptyDescription: u }) {
|
|
1416
2059
|
let d = t.some((e) => e.emphasis === "SMALL");
|
|
1417
|
-
return /* @__PURE__ */
|
|
1418
|
-
className: e(
|
|
2060
|
+
return /* @__PURE__ */ K("div", {
|
|
2061
|
+
className: e(wn, d && "grid-flow-dense"),
|
|
1419
2062
|
children: [
|
|
1420
|
-
!i && /* @__PURE__ */
|
|
2063
|
+
!i && /* @__PURE__ */ G(Mn, {
|
|
1421
2064
|
route: a,
|
|
1422
2065
|
label: o,
|
|
1423
2066
|
subtitle: s,
|
|
1424
2067
|
chip: r
|
|
1425
2068
|
}),
|
|
1426
|
-
t.map(({ item: e, key: t, emphasis: r }) => /* @__PURE__ */
|
|
2069
|
+
t.map(({ item: e, key: t, emphasis: r }) => /* @__PURE__ */ G("span", {
|
|
1427
2070
|
className: "contents",
|
|
1428
2071
|
children: n(e, r)
|
|
1429
2072
|
}, t)),
|
|
1430
|
-
c && /* @__PURE__ */
|
|
2073
|
+
c && /* @__PURE__ */ G(Nn, {
|
|
1431
2074
|
title: l,
|
|
1432
2075
|
description: u
|
|
1433
2076
|
})
|
|
1434
2077
|
]
|
|
1435
2078
|
});
|
|
1436
2079
|
}
|
|
1437
|
-
function
|
|
1438
|
-
let { t: f } =
|
|
2080
|
+
function On({ layout: t, resolved: n, canEditGlobal: r, isCustomized: i, renderTile: a, chip: o, hideNew: s, newRoute: c, newLabel: l, newSubtitle: u, onClose: d }) {
|
|
2081
|
+
let { t: f } = q(), [p, m] = U(n), [h, g] = U(null), _ = (t.saving ?? !1) || h !== null, v = (e) => _ && h === e ? { loading: !0 } : { "aria-disabled": _ || void 0 }, [y, b] = U(!1), x = (e, t) => async () => {
|
|
1439
2082
|
if (t) {
|
|
1440
2083
|
g(e), b(!1);
|
|
1441
2084
|
try {
|
|
@@ -1446,12 +2089,12 @@ function Rt({ layout: t, resolved: n, canEditGlobal: r, isCustomized: i, renderT
|
|
|
1446
2089
|
g(null);
|
|
1447
2090
|
}
|
|
1448
2091
|
}
|
|
1449
|
-
}, S =
|
|
2092
|
+
}, S = tt(et(Qe, { activationConstraint: { distance: 8 } }), et(Ze));
|
|
1450
2093
|
function C(e) {
|
|
1451
2094
|
let { active: t, over: n } = e;
|
|
1452
2095
|
!n || t.id === n.id || m((e) => {
|
|
1453
2096
|
let r = e.findIndex((e) => e.key === t.id), i = e.findIndex((e) => e.key === n.id);
|
|
1454
|
-
return r < 0 || i < 0 ? e :
|
|
2097
|
+
return r < 0 || i < 0 ? e : rt(e, r, i);
|
|
1455
2098
|
});
|
|
1456
2099
|
}
|
|
1457
2100
|
function w(e, t) {
|
|
@@ -1460,66 +2103,66 @@ function Rt({ layout: t, resolved: n, canEditGlobal: r, isCustomized: i, renderT
|
|
|
1460
2103
|
emphasis: t
|
|
1461
2104
|
} : n));
|
|
1462
2105
|
}
|
|
1463
|
-
let T =
|
|
1464
|
-
return /* @__PURE__ */
|
|
2106
|
+
let T = V(() => mn(p), [p]), E = p.some((e) => e.emphasis === "SMALL");
|
|
2107
|
+
return /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ K("div", {
|
|
1465
2108
|
className: "mb-4 flex flex-wrap items-center gap-2 rounded-2xl border border-border/60 bg-card/40 p-3 backdrop-blur-md",
|
|
1466
2109
|
children: [
|
|
1467
|
-
/* @__PURE__ */
|
|
2110
|
+
/* @__PURE__ */ G("span", {
|
|
1468
2111
|
className: "mr-auto text-sm text-muted-foreground",
|
|
1469
2112
|
children: f("bento.layout.editHint", { defaultValue: "Drag tiles to reorder · tap the size button to resize" })
|
|
1470
2113
|
}),
|
|
1471
|
-
i && t.onReset && /* @__PURE__ */
|
|
2114
|
+
i && t.onReset && /* @__PURE__ */ K(P, {
|
|
1472
2115
|
variant: "ghost",
|
|
1473
2116
|
size: "sm",
|
|
1474
2117
|
className: "gap-2",
|
|
1475
2118
|
...v("reset"),
|
|
1476
2119
|
onClick: x("reset", t.onReset),
|
|
1477
|
-
children: [h !== "reset" && /* @__PURE__ */
|
|
2120
|
+
children: [h !== "reset" && /* @__PURE__ */ G(de, { size: 16 }), f("bento.layout.reset", { defaultValue: "Reset to default" })]
|
|
1478
2121
|
}),
|
|
1479
|
-
r && t.onSaveGlobal && /* @__PURE__ */
|
|
2122
|
+
r && t.onSaveGlobal && /* @__PURE__ */ K(P, {
|
|
1480
2123
|
variant: "outline",
|
|
1481
2124
|
size: "sm",
|
|
1482
2125
|
className: "gap-2",
|
|
1483
2126
|
...v("global"),
|
|
1484
2127
|
onClick: x("global", () => t.onSaveGlobal?.(T)),
|
|
1485
|
-
children: [h !== "global" && /* @__PURE__ */
|
|
2128
|
+
children: [h !== "global" && /* @__PURE__ */ G(Re, { size: 16 }), f("bento.layout.saveGlobal", { defaultValue: "Set as default for everyone" })]
|
|
1486
2129
|
}),
|
|
1487
|
-
/* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ K(P, {
|
|
1488
2131
|
variant: "ghost",
|
|
1489
2132
|
size: "sm",
|
|
1490
2133
|
className: "gap-2",
|
|
1491
2134
|
...v("cancel"),
|
|
1492
2135
|
onClick: d,
|
|
1493
|
-
children: [/* @__PURE__ */
|
|
2136
|
+
children: [/* @__PURE__ */ G(ze, { size: 16 }), f("common.cancel", { defaultValue: "Cancel" })]
|
|
1494
2137
|
}),
|
|
1495
|
-
/* @__PURE__ */
|
|
2138
|
+
/* @__PURE__ */ K(P, {
|
|
1496
2139
|
size: "sm",
|
|
1497
2140
|
className: "gap-2",
|
|
1498
2141
|
...v("save"),
|
|
1499
2142
|
onClick: x("save", () => t.onSave(T)),
|
|
1500
|
-
children: [h !== "save" && /* @__PURE__ */
|
|
2143
|
+
children: [h !== "save" && /* @__PURE__ */ G(Se, { size: 16 }), f("bento.layout.save", { defaultValue: "Save layout" })]
|
|
1501
2144
|
}),
|
|
1502
|
-
y && /* @__PURE__ */
|
|
2145
|
+
y && /* @__PURE__ */ G("p", {
|
|
1503
2146
|
role: "alert",
|
|
1504
2147
|
className: "w-full text-sm text-destructive",
|
|
1505
2148
|
children: f("bento.layout.saveFailed", { defaultValue: "The layout could not be saved. Nothing has changed — try again." })
|
|
1506
2149
|
})
|
|
1507
2150
|
]
|
|
1508
|
-
}), /* @__PURE__ */
|
|
2151
|
+
}), /* @__PURE__ */ G(Xe, {
|
|
1509
2152
|
sensors: S,
|
|
1510
|
-
collisionDetection:
|
|
2153
|
+
collisionDetection: $e,
|
|
1511
2154
|
onDragEnd: C,
|
|
1512
|
-
children: /* @__PURE__ */
|
|
2155
|
+
children: /* @__PURE__ */ G(nt, {
|
|
1513
2156
|
items: p.map((e) => e.key),
|
|
1514
|
-
strategy:
|
|
1515
|
-
children: /* @__PURE__ */
|
|
1516
|
-
className: e(
|
|
1517
|
-
children: [!s && /* @__PURE__ */
|
|
2157
|
+
strategy: it,
|
|
2158
|
+
children: /* @__PURE__ */ K("div", {
|
|
2159
|
+
className: e(wn, E && "grid-flow-dense"),
|
|
2160
|
+
children: [!s && /* @__PURE__ */ G(Mn, {
|
|
1518
2161
|
route: c,
|
|
1519
2162
|
label: l,
|
|
1520
2163
|
subtitle: u,
|
|
1521
2164
|
chip: o
|
|
1522
|
-
}), p.map(({ item: e, key: t, emphasis: n }) => /* @__PURE__ */
|
|
2165
|
+
}), p.map(({ item: e, key: t, emphasis: n }) => /* @__PURE__ */ G(jn, {
|
|
1523
2166
|
id: t,
|
|
1524
2167
|
emphasis: n,
|
|
1525
2168
|
onSetEmphasis: (e) => w(t, e),
|
|
@@ -1529,11 +2172,11 @@ function Rt({ layout: t, resolved: n, canEditGlobal: r, isCustomized: i, renderT
|
|
|
1529
2172
|
})
|
|
1530
2173
|
})] });
|
|
1531
2174
|
}
|
|
1532
|
-
var
|
|
2175
|
+
var kn = [
|
|
1533
2176
|
"SMALL",
|
|
1534
2177
|
"MEDIUM",
|
|
1535
2178
|
"LARGE"
|
|
1536
|
-
],
|
|
2179
|
+
], An = {
|
|
1537
2180
|
SMALL: {
|
|
1538
2181
|
key: "bento.layout.size.small",
|
|
1539
2182
|
def: "Small"
|
|
@@ -1547,29 +2190,29 @@ var zt = [
|
|
|
1547
2190
|
def: "Large"
|
|
1548
2191
|
}
|
|
1549
2192
|
};
|
|
1550
|
-
function
|
|
1551
|
-
let { t: a } =
|
|
1552
|
-
transform:
|
|
2193
|
+
function jn({ id: t, emphasis: n, onSetEmphasis: r, children: i }) {
|
|
2194
|
+
let { t: a } = q(), { attributes: o, listeners: s, setNodeRef: c, transform: l, transition: u, isDragging: d } = at({ id: t }), f = {
|
|
2195
|
+
transform: ot.Translate.toString(l),
|
|
1553
2196
|
transition: u,
|
|
1554
2197
|
opacity: d ? .6 : 1,
|
|
1555
2198
|
zIndex: d ? 50 : void 0
|
|
1556
2199
|
};
|
|
1557
|
-
return /* @__PURE__ */
|
|
2200
|
+
return /* @__PURE__ */ K("div", {
|
|
1558
2201
|
ref: c,
|
|
1559
2202
|
style: f,
|
|
1560
|
-
className: e("relative h-full",
|
|
1561
|
-
children: [/* @__PURE__ */
|
|
2203
|
+
className: e("relative h-full", dn[n]),
|
|
2204
|
+
children: [/* @__PURE__ */ G("div", {
|
|
1562
2205
|
className: "pointer-events-none h-full select-none [&>*]:h-full [&>*]:w-full",
|
|
1563
2206
|
children: i
|
|
1564
|
-
}), /* @__PURE__ */
|
|
2207
|
+
}), /* @__PURE__ */ K("div", {
|
|
1565
2208
|
className: "absolute right-2 top-2 z-10 flex items-center gap-1",
|
|
1566
|
-
children: [/* @__PURE__ */
|
|
2209
|
+
children: [/* @__PURE__ */ G("div", {
|
|
1567
2210
|
role: "group",
|
|
1568
2211
|
"aria-label": a("bento.layout.sizeGroup", { defaultValue: "Tile size" }),
|
|
1569
2212
|
className: "flex items-center gap-0.5 rounded-full border border-border/60 bg-background/80 p-0.5 shadow-sm backdrop-blur",
|
|
1570
|
-
children:
|
|
1571
|
-
let i = t === n, o = a(
|
|
1572
|
-
return /* @__PURE__ */
|
|
2213
|
+
children: kn.map((t) => {
|
|
2214
|
+
let i = t === n, o = a(An[t].key, { defaultValue: An[t].def });
|
|
2215
|
+
return /* @__PURE__ */ G("button", {
|
|
1573
2216
|
type: "button",
|
|
1574
2217
|
onClick: () => r(t),
|
|
1575
2218
|
"aria-pressed": i,
|
|
@@ -1579,13 +2222,13 @@ function Vt({ id: t, emphasis: n, onSetEmphasis: r, children: i }) {
|
|
|
1579
2222
|
children: o.charAt(0)
|
|
1580
2223
|
}, t);
|
|
1581
2224
|
})
|
|
1582
|
-
}), /* @__PURE__ */
|
|
2225
|
+
}), /* @__PURE__ */ G("button", {
|
|
1583
2226
|
type: "button",
|
|
1584
2227
|
...o,
|
|
1585
2228
|
...s,
|
|
1586
2229
|
"aria-label": a("bento.layout.dragToReorder", { defaultValue: "Drag to reorder" }),
|
|
1587
2230
|
className: "grid h-7 w-7 cursor-grab place-items-center rounded-full border border-border/60 bg-background/80 shadow-sm backdrop-blur hover:bg-background active:cursor-grabbing",
|
|
1588
|
-
children: /* @__PURE__ */
|
|
2231
|
+
children: /* @__PURE__ */ G(Te, {
|
|
1589
2232
|
size: 14,
|
|
1590
2233
|
className: "text-muted-foreground"
|
|
1591
2234
|
})
|
|
@@ -1593,35 +2236,35 @@ function Vt({ id: t, emphasis: n, onSetEmphasis: r, children: i }) {
|
|
|
1593
2236
|
})]
|
|
1594
2237
|
});
|
|
1595
2238
|
}
|
|
1596
|
-
function
|
|
1597
|
-
let { t: i } =
|
|
1598
|
-
return /* @__PURE__ */
|
|
2239
|
+
function Mn({ route: e, label: t, subtitle: n, chip: r }) {
|
|
2240
|
+
let { t: i } = q();
|
|
2241
|
+
return /* @__PURE__ */ K(He, {
|
|
1599
2242
|
to: e,
|
|
1600
2243
|
className: "bento-tile bento-tile-clickable col-span-2 row-span-1 flex flex-col gap-3 rounded-3xl border-2 border-dashed border-border/60 bg-card/30 p-5 backdrop-blur-md bento-new-tile hover:bg-card/50 md:col-span-2 md:row-span-1 lg:col-span-2 lg:row-span-1",
|
|
1601
|
-
children: [/* @__PURE__ */
|
|
2244
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1602
2245
|
className: "flex items-center gap-3",
|
|
1603
|
-
children: [/* @__PURE__ */
|
|
2246
|
+
children: [/* @__PURE__ */ G("span", {
|
|
1604
2247
|
className: `bento-pulse grid h-10 w-10 place-items-center rounded-2xl ${r} text-white shadow-md`,
|
|
1605
|
-
children: /* @__PURE__ */
|
|
1606
|
-
}), /* @__PURE__ */
|
|
2248
|
+
children: /* @__PURE__ */ G(je, { size: 20 })
|
|
2249
|
+
}), /* @__PURE__ */ G("span", {
|
|
1607
2250
|
className: "text-[11px] uppercase tracking-wider text-muted-foreground",
|
|
1608
2251
|
children: i("forms.formActions.new", { defaultValue: "New" })
|
|
1609
2252
|
})]
|
|
1610
|
-
}), /* @__PURE__ */
|
|
2253
|
+
}), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("div", {
|
|
1611
2254
|
className: "text-base font-semibold tracking-tight md:text-lg",
|
|
1612
|
-
children: /* @__PURE__ */
|
|
2255
|
+
children: /* @__PURE__ */ G("span", {
|
|
1613
2256
|
className: `${r} bg-clip-text text-transparent`,
|
|
1614
2257
|
children: t
|
|
1615
2258
|
})
|
|
1616
|
-
}), n && /* @__PURE__ */
|
|
2259
|
+
}), n && /* @__PURE__ */ G("p", {
|
|
1617
2260
|
className: "mt-1 text-sm text-muted-foreground",
|
|
1618
2261
|
children: n
|
|
1619
2262
|
})] })]
|
|
1620
2263
|
});
|
|
1621
2264
|
}
|
|
1622
|
-
function
|
|
1623
|
-
return /* @__PURE__ */
|
|
1624
|
-
icon:
|
|
2265
|
+
function Nn({ title: e, description: t }) {
|
|
2266
|
+
return /* @__PURE__ */ G(_t, {
|
|
2267
|
+
icon: Pe,
|
|
1625
2268
|
title: e,
|
|
1626
2269
|
description: t,
|
|
1627
2270
|
align: "start",
|
|
@@ -1630,100 +2273,100 @@ function Ut({ title: e, description: t }) {
|
|
|
1630
2273
|
}
|
|
1631
2274
|
//#endregion
|
|
1632
2275
|
//#region src/bento/bento-save-bar.tsx
|
|
1633
|
-
function
|
|
1634
|
-
let { t: l } =
|
|
1635
|
-
return /* @__PURE__ */
|
|
2276
|
+
function Pn({ title: e, badges: t, actions: n, onCancel: r, loading: i, disabled: o, dirty: s, titleMissing: c }) {
|
|
2277
|
+
let { t: l } = q();
|
|
2278
|
+
return /* @__PURE__ */ K("div", {
|
|
1636
2279
|
className: "bento-glass flex items-center justify-between gap-4 rounded-2xl px-4 py-3 shadow-md backdrop-blur-xl",
|
|
1637
|
-
children: [/* @__PURE__ */
|
|
2280
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1638
2281
|
className: "flex min-w-0 items-center gap-3",
|
|
1639
2282
|
children: [
|
|
1640
|
-
e && /* @__PURE__ */
|
|
2283
|
+
e && /* @__PURE__ */ G("p", {
|
|
1641
2284
|
className: "truncate text-base font-semibold tracking-tight md:text-lg",
|
|
1642
2285
|
children: e
|
|
1643
2286
|
}),
|
|
1644
|
-
/* @__PURE__ */
|
|
2287
|
+
/* @__PURE__ */ G(St, {
|
|
1645
2288
|
titleMissing: c,
|
|
1646
2289
|
dirty: s
|
|
1647
2290
|
}),
|
|
1648
|
-
t && /* @__PURE__ */
|
|
2291
|
+
t && /* @__PURE__ */ G("div", {
|
|
1649
2292
|
className: "flex shrink-0 items-center gap-1.5",
|
|
1650
2293
|
children: t
|
|
1651
2294
|
})
|
|
1652
2295
|
]
|
|
1653
|
-
}), /* @__PURE__ */
|
|
2296
|
+
}), /* @__PURE__ */ G("div", {
|
|
1654
2297
|
className: "flex shrink-0 gap-2",
|
|
1655
|
-
children: n ?? /* @__PURE__ */
|
|
2298
|
+
children: n ?? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K(a, {
|
|
1656
2299
|
type: "submit",
|
|
1657
2300
|
size: "sm",
|
|
1658
2301
|
loading: i,
|
|
1659
2302
|
"aria-disabled": o ? "true" : void 0,
|
|
1660
|
-
children: [/* @__PURE__ */
|
|
1661
|
-
}), r && /* @__PURE__ */
|
|
2303
|
+
children: [/* @__PURE__ */ G(Se, { className: "size-4" }), l("forms.formActions.saveChanges")]
|
|
2304
|
+
}), r && /* @__PURE__ */ K(a, {
|
|
1662
2305
|
type: "button",
|
|
1663
2306
|
variant: "outline",
|
|
1664
2307
|
size: "sm",
|
|
1665
2308
|
onClick: r,
|
|
1666
|
-
children: [/* @__PURE__ */
|
|
2309
|
+
children: [/* @__PURE__ */ G(ze, { className: "size-4" }), l("forms.formActions.cancel")]
|
|
1667
2310
|
})] })
|
|
1668
2311
|
})]
|
|
1669
2312
|
});
|
|
1670
2313
|
}
|
|
1671
|
-
function
|
|
1672
|
-
return /* @__PURE__ */
|
|
2314
|
+
function Fn({ children: e }) {
|
|
2315
|
+
return /* @__PURE__ */ G("span", {
|
|
1673
2316
|
className: "rounded-full border border-border/60 bg-card/50 px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground backdrop-blur",
|
|
1674
2317
|
children: e
|
|
1675
2318
|
});
|
|
1676
2319
|
}
|
|
1677
|
-
|
|
2320
|
+
Pn.Badge = Fn;
|
|
1678
2321
|
//#endregion
|
|
1679
2322
|
//#region src/bento/bento-scroll-save-bar.tsx
|
|
1680
|
-
function
|
|
1681
|
-
let t =
|
|
1682
|
-
return
|
|
1683
|
-
/* @__PURE__ */
|
|
2323
|
+
function In(e) {
|
|
2324
|
+
let t = H(null);
|
|
2325
|
+
return Ct(t), /* @__PURE__ */ K(W, { children: [
|
|
2326
|
+
/* @__PURE__ */ G("div", {
|
|
1684
2327
|
ref: t,
|
|
1685
2328
|
"aria-hidden": !0,
|
|
1686
2329
|
className: "h-px"
|
|
1687
2330
|
}),
|
|
1688
|
-
/* @__PURE__ */
|
|
2331
|
+
/* @__PURE__ */ G("div", {
|
|
1689
2332
|
"aria-hidden": !0,
|
|
1690
2333
|
className: "bento-save-bar-spacer"
|
|
1691
2334
|
}),
|
|
1692
|
-
/* @__PURE__ */
|
|
2335
|
+
/* @__PURE__ */ G("div", {
|
|
1693
2336
|
className: "bento-fade-in fixed inset-x-0 top-20 z-20 mx-auto w-full max-w-7xl px-4 md:px-8",
|
|
1694
|
-
children: /* @__PURE__ */
|
|
2337
|
+
children: /* @__PURE__ */ G(Pn, { ...e })
|
|
1695
2338
|
})
|
|
1696
2339
|
] });
|
|
1697
2340
|
}
|
|
1698
2341
|
//#endregion
|
|
1699
2342
|
//#region src/bento/bento-form-hero.tsx
|
|
1700
|
-
function
|
|
1701
|
-
let { t: g } =
|
|
1702
|
-
return /* @__PURE__ */
|
|
1703
|
-
eyebrow: t === void 0 ? e : /* @__PURE__ */
|
|
2343
|
+
function Ln({ eyebrow: e, backTo: t, backLabel: n, leading: r, title: i, subtitle: o, trailing: s, onCancel: c, actions: l, loading: u, dirty: d, titleMissing: f, saveDisabled: p, stickyTitle: m, stickyBadges: h }) {
|
|
2344
|
+
let { t: g } = q(), _ = p ?? (!!f || !d);
|
|
2345
|
+
return /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(yt, {
|
|
2346
|
+
eyebrow: t === void 0 ? e : /* @__PURE__ */ G(vt, {
|
|
1704
2347
|
to: t,
|
|
1705
2348
|
children: n
|
|
1706
2349
|
}),
|
|
1707
2350
|
leading: r,
|
|
1708
2351
|
title: i,
|
|
1709
2352
|
subtitle: o,
|
|
1710
|
-
trailing: /* @__PURE__ */
|
|
2353
|
+
trailing: /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
|
|
1711
2354
|
className: "bento-fade-out flex shrink-0 items-center gap-2",
|
|
1712
|
-
children: l ?? /* @__PURE__ */
|
|
2355
|
+
children: l ?? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K(a, {
|
|
1713
2356
|
type: "submit",
|
|
1714
2357
|
size: "sm",
|
|
1715
2358
|
loading: u,
|
|
1716
2359
|
"aria-disabled": _ ? "true" : void 0,
|
|
1717
|
-
children: [/* @__PURE__ */
|
|
1718
|
-
}), /* @__PURE__ */
|
|
2360
|
+
children: [/* @__PURE__ */ G(Se, { className: "size-4" }), g("forms.formActions.saveChanges")]
|
|
2361
|
+
}), /* @__PURE__ */ K(a, {
|
|
1719
2362
|
type: "button",
|
|
1720
2363
|
variant: "outline",
|
|
1721
2364
|
size: "sm",
|
|
1722
2365
|
onClick: c,
|
|
1723
|
-
children: [/* @__PURE__ */
|
|
2366
|
+
children: [/* @__PURE__ */ G(ze, { className: "size-4" }), g("forms.formActions.cancel")]
|
|
1724
2367
|
})] })
|
|
1725
2368
|
}), s] })
|
|
1726
|
-
}), /* @__PURE__ */
|
|
2369
|
+
}), /* @__PURE__ */ G(In, {
|
|
1727
2370
|
title: m,
|
|
1728
2371
|
badges: h,
|
|
1729
2372
|
actions: l,
|
|
@@ -1736,32 +2379,32 @@ function qt({ eyebrow: e, backTo: t, backLabel: n, leading: r, title: i, subtitl
|
|
|
1736
2379
|
}
|
|
1737
2380
|
//#endregion
|
|
1738
2381
|
//#region src/bento/bento-form-section.tsx
|
|
1739
|
-
var
|
|
1740
|
-
function
|
|
1741
|
-
return /* @__PURE__ */
|
|
1742
|
-
className: e(
|
|
1743
|
-
children: [/* @__PURE__ */
|
|
2382
|
+
var Rn = "bento-tile bento-glass relative flex flex-col gap-5 overflow-hidden rounded-3xl p-5 md:p-6";
|
|
2383
|
+
function zn({ icon: t, tone: n, title: r, description: i, children: a, trailing: o, as: s = "h2", className: c }) {
|
|
2384
|
+
return /* @__PURE__ */ K("section", {
|
|
2385
|
+
className: e(Rn, c),
|
|
2386
|
+
children: [/* @__PURE__ */ K("header", {
|
|
1744
2387
|
className: "flex items-start justify-between gap-3",
|
|
1745
|
-
children: [/* @__PURE__ */
|
|
2388
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1746
2389
|
className: "flex items-center gap-3",
|
|
1747
|
-
children: [/* @__PURE__ */
|
|
1748
|
-
className: `grid h-10 w-10 place-items-center rounded-2xl text-white shadow-md ${
|
|
1749
|
-
children: /* @__PURE__ */
|
|
1750
|
-
}), /* @__PURE__ */
|
|
2390
|
+
children: [/* @__PURE__ */ G("span", {
|
|
2391
|
+
className: `grid h-10 w-10 place-items-center rounded-2xl text-white shadow-md ${Y(n)}`,
|
|
2392
|
+
children: /* @__PURE__ */ G(t, { size: 20 })
|
|
2393
|
+
}), /* @__PURE__ */ K("div", {
|
|
1751
2394
|
className: "flex flex-col gap-0.5",
|
|
1752
|
-
children: [/* @__PURE__ */
|
|
2395
|
+
children: [/* @__PURE__ */ G(s, {
|
|
1753
2396
|
className: "text-base font-semibold tracking-tight md:text-lg",
|
|
1754
2397
|
children: r
|
|
1755
|
-
}), i && /* @__PURE__ */
|
|
2398
|
+
}), i && /* @__PURE__ */ G("p", {
|
|
1756
2399
|
className: "text-sm text-muted-foreground",
|
|
1757
2400
|
children: i
|
|
1758
2401
|
})]
|
|
1759
2402
|
})]
|
|
1760
|
-
}), o && /* @__PURE__ */
|
|
2403
|
+
}), o && /* @__PURE__ */ G("div", {
|
|
1761
2404
|
className: "shrink-0",
|
|
1762
2405
|
children: o
|
|
1763
2406
|
})]
|
|
1764
|
-
}), /* @__PURE__ */
|
|
2407
|
+
}), /* @__PURE__ */ G("div", {
|
|
1765
2408
|
className: "flex flex-col gap-5",
|
|
1766
2409
|
children: a
|
|
1767
2410
|
})]
|
|
@@ -1769,10 +2412,10 @@ function Yt({ icon: t, tone: n, title: r, description: i, children: a, trailing:
|
|
|
1769
2412
|
}
|
|
1770
2413
|
//#endregion
|
|
1771
2414
|
//#region src/bento/bento-panel.tsx
|
|
1772
|
-
function
|
|
1773
|
-
return /* @__PURE__ */
|
|
2415
|
+
function Bn({ children: t, className: n, contentClassName: r }) {
|
|
2416
|
+
return /* @__PURE__ */ G("div", {
|
|
1774
2417
|
className: e("bento-glass rounded-2xl shadow-md", n),
|
|
1775
|
-
children: /* @__PURE__ */
|
|
2418
|
+
children: /* @__PURE__ */ G("div", {
|
|
1776
2419
|
className: r,
|
|
1777
2420
|
children: t
|
|
1778
2421
|
})
|
|
@@ -1780,16 +2423,16 @@ function Xt({ children: t, className: n, contentClassName: r }) {
|
|
|
1780
2423
|
}
|
|
1781
2424
|
//#endregion
|
|
1782
2425
|
//#region src/bento/bento-back-to-top.tsx
|
|
1783
|
-
var
|
|
1784
|
-
function
|
|
2426
|
+
var Vn = 480;
|
|
2427
|
+
function Hn(e) {
|
|
1785
2428
|
return window.addEventListener("scroll", e, { passive: !0 }), () => window.removeEventListener("scroll", e);
|
|
1786
2429
|
}
|
|
1787
|
-
function
|
|
1788
|
-
return window.scrollY >
|
|
2430
|
+
function Un() {
|
|
2431
|
+
return window.scrollY > Vn;
|
|
1789
2432
|
}
|
|
1790
|
-
function
|
|
1791
|
-
let { t } =
|
|
1792
|
-
return /* @__PURE__ */
|
|
2433
|
+
function Wn({ inline: e = !1 } = {}) {
|
|
2434
|
+
let { t } = q(), n = O(), r = e || n, i = ce(Hn, Un, () => !1);
|
|
2435
|
+
return /* @__PURE__ */ G("button", {
|
|
1793
2436
|
type: "button",
|
|
1794
2437
|
"aria-label": t("bento.backToTop", { defaultValue: "Back to top" }),
|
|
1795
2438
|
tabIndex: i ? 0 : -1,
|
|
@@ -1798,28 +2441,28 @@ function en({ inline: e = !1 } = {}) {
|
|
|
1798
2441
|
behavior: "smooth"
|
|
1799
2442
|
}),
|
|
1800
2443
|
className: `${r ? "relative" : "fixed bottom-6 right-6 z-40"} grid h-11 w-11 place-items-center rounded-full border border-border/60 bg-card/80 text-foreground shadow-lg backdrop-blur-xl transition-all duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] hover:-translate-y-0.5 hover:shadow-xl active:scale-95 ${i ? "pointer-events-auto translate-y-0 scale-100 opacity-100" : "pointer-events-none translate-y-4 scale-90 opacity-0"}`,
|
|
1801
|
-
children: /* @__PURE__ */
|
|
2444
|
+
children: /* @__PURE__ */ G(me, { size: 18 })
|
|
1802
2445
|
});
|
|
1803
2446
|
}
|
|
1804
2447
|
//#endregion
|
|
1805
2448
|
//#region src/bento/bento-nav.ts
|
|
1806
|
-
function
|
|
2449
|
+
function Gn(e) {
|
|
1807
2450
|
return e.bentoRoute ?? e.fallbackRoute;
|
|
1808
2451
|
}
|
|
1809
2452
|
//#endregion
|
|
1810
2453
|
//#region src/bento/bento-command-palette.tsx
|
|
1811
|
-
function
|
|
1812
|
-
return e ? /* @__PURE__ */
|
|
2454
|
+
function Kn({ label: e, children: t }) {
|
|
2455
|
+
return e ? /* @__PURE__ */ K("div", {
|
|
1813
2456
|
role: "group",
|
|
1814
2457
|
"aria-label": e,
|
|
1815
|
-
children: [/* @__PURE__ */
|
|
2458
|
+
children: [/* @__PURE__ */ G("p", {
|
|
1816
2459
|
className: "px-3 pt-2 pb-1 text-xs font-medium text-muted-foreground",
|
|
1817
2460
|
children: e
|
|
1818
2461
|
}), t]
|
|
1819
|
-
}) : /* @__PURE__ */
|
|
2462
|
+
}) : /* @__PURE__ */ G(W, { children: t });
|
|
1820
2463
|
}
|
|
1821
|
-
function
|
|
1822
|
-
return /* @__PURE__ */
|
|
2464
|
+
function qn({ index: e, active: t, icon: n, label: r, description: i, trailing: a, onActivate: o, onChoose: s }) {
|
|
2465
|
+
return /* @__PURE__ */ K("button", {
|
|
1823
2466
|
type: "button",
|
|
1824
2467
|
id: `bento-palette-opt-${e}`,
|
|
1825
2468
|
"data-index": e,
|
|
@@ -1829,18 +2472,18 @@ function rn({ index: e, active: t, icon: n, label: r, description: i, trailing:
|
|
|
1829
2472
|
onClick: s,
|
|
1830
2473
|
className: `flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${t ? "bg-accent text-accent-foreground" : "text-foreground"}`,
|
|
1831
2474
|
children: [
|
|
1832
|
-
n && /* @__PURE__ */
|
|
2475
|
+
n && /* @__PURE__ */ G(n, {
|
|
1833
2476
|
size: 18,
|
|
1834
2477
|
className: "shrink-0 text-muted-foreground"
|
|
1835
2478
|
}),
|
|
1836
|
-
/* @__PURE__ */
|
|
2479
|
+
/* @__PURE__ */ K("span", {
|
|
1837
2480
|
className: "flex-1 truncate",
|
|
1838
|
-
children: [r, i && /* @__PURE__ */
|
|
2481
|
+
children: [r, i && /* @__PURE__ */ G("span", {
|
|
1839
2482
|
className: "ml-2 text-muted-foreground",
|
|
1840
2483
|
children: i
|
|
1841
2484
|
})]
|
|
1842
2485
|
}),
|
|
1843
|
-
a ?? (t && /* @__PURE__ */
|
|
2486
|
+
a ?? (t && /* @__PURE__ */ G(pe, {
|
|
1844
2487
|
"aria-hidden": !0,
|
|
1845
2488
|
size: 15,
|
|
1846
2489
|
className: "shrink-0 text-muted-foreground"
|
|
@@ -1848,8 +2491,8 @@ function rn({ index: e, active: t, icon: n, label: r, description: i, trailing:
|
|
|
1848
2491
|
]
|
|
1849
2492
|
});
|
|
1850
2493
|
}
|
|
1851
|
-
function
|
|
1852
|
-
let { t: l } =
|
|
2494
|
+
function Jn({ open: e, onOpenChange: t, items: a, group: o, onQueryChange: c }) {
|
|
2495
|
+
let { t: l } = q(), u = Ge(), [d, f] = U(""), [p, m] = U(0), h = H(null), g = V(() => {
|
|
1853
2496
|
let e = d.trim().toLowerCase(), t = a.map((e) => ({
|
|
1854
2497
|
item: e,
|
|
1855
2498
|
label: l(e.titleKey),
|
|
@@ -1863,26 +2506,26 @@ function an({ open: e, onOpenChange: t, items: a, group: o, onQueryChange: c })
|
|
|
1863
2506
|
a,
|
|
1864
2507
|
d,
|
|
1865
2508
|
l
|
|
1866
|
-
]), _ =
|
|
2509
|
+
]), _ = V(() => [...g.map((e) => ({
|
|
1867
2510
|
kind: "nav",
|
|
1868
2511
|
entry: e
|
|
1869
2512
|
})), ...(o?.items ?? []).map((e) => ({
|
|
1870
2513
|
kind: "supplied",
|
|
1871
2514
|
item: e
|
|
1872
|
-
}))], [g, o]), v =
|
|
1873
|
-
|
|
2515
|
+
}))], [g, o]), v = H(c);
|
|
2516
|
+
B(() => {
|
|
1874
2517
|
v.current = c;
|
|
1875
|
-
}),
|
|
2518
|
+
}), B(() => {
|
|
1876
2519
|
v.current?.(d);
|
|
1877
2520
|
}, [d]);
|
|
1878
|
-
let [y, b] =
|
|
2521
|
+
let [y, b] = U(e);
|
|
1879
2522
|
e !== y && (b(e), e && (f(""), m(0)));
|
|
1880
2523
|
let x = _.length === 0 ? 0 : _.length - 1;
|
|
1881
|
-
p > x && m(x),
|
|
2524
|
+
p > x && m(x), B(() => {
|
|
1882
2525
|
(h.current?.querySelector(`[data-index="${p}"]`))?.scrollIntoView({ block: "nearest" });
|
|
1883
2526
|
}, [p]);
|
|
1884
2527
|
function S(e) {
|
|
1885
|
-
t(!1), e.kind === "nav" ? u(
|
|
2528
|
+
t(!1), e.kind === "nav" ? u(Gn(e.entry.item)) : o?.onSelect(e.item);
|
|
1886
2529
|
}
|
|
1887
2530
|
function C(e) {
|
|
1888
2531
|
if (e.key === "ArrowDown") e.preventDefault(), m((e) => _.length === 0 ? 0 : (e + 1) % _.length);
|
|
@@ -1893,28 +2536,28 @@ function an({ open: e, onOpenChange: t, items: a, group: o, onQueryChange: c })
|
|
|
1893
2536
|
t && S(t);
|
|
1894
2537
|
}
|
|
1895
2538
|
}
|
|
1896
|
-
return /* @__PURE__ */
|
|
2539
|
+
return /* @__PURE__ */ G(n, {
|
|
1897
2540
|
open: e,
|
|
1898
2541
|
onOpenChange: t,
|
|
1899
|
-
children: /* @__PURE__ */
|
|
2542
|
+
children: /* @__PURE__ */ K(s, {
|
|
1900
2543
|
showCloseButton: !1,
|
|
1901
2544
|
className: "top-[15%] max-w-xl translate-y-0 gap-0 overflow-hidden p-0",
|
|
1902
2545
|
onKeyDown: C,
|
|
1903
2546
|
children: [
|
|
1904
|
-
/* @__PURE__ */
|
|
2547
|
+
/* @__PURE__ */ G(i, {
|
|
1905
2548
|
className: "sr-only",
|
|
1906
2549
|
children: l("bento.palette.title", { defaultValue: "Command palette" })
|
|
1907
2550
|
}),
|
|
1908
|
-
/* @__PURE__ */
|
|
2551
|
+
/* @__PURE__ */ G(r, {
|
|
1909
2552
|
className: "sr-only",
|
|
1910
2553
|
children: l("bento.palette.description", { defaultValue: "Search and jump to any area" })
|
|
1911
2554
|
}),
|
|
1912
|
-
/* @__PURE__ */
|
|
2555
|
+
/* @__PURE__ */ K("div", {
|
|
1913
2556
|
className: "flex items-center gap-3 border-b border-border/60 px-4",
|
|
1914
|
-
children: [/* @__PURE__ */
|
|
2557
|
+
children: [/* @__PURE__ */ G(Ne, {
|
|
1915
2558
|
size: 18,
|
|
1916
2559
|
className: "shrink-0 text-muted-foreground"
|
|
1917
|
-
}), /* @__PURE__ */
|
|
2560
|
+
}), /* @__PURE__ */ G("input", {
|
|
1918
2561
|
autoFocus: !0,
|
|
1919
2562
|
type: "text",
|
|
1920
2563
|
role: "combobox",
|
|
@@ -1927,41 +2570,41 @@ function an({ open: e, onOpenChange: t, items: a, group: o, onQueryChange: c })
|
|
|
1927
2570
|
className: "h-12 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"
|
|
1928
2571
|
})]
|
|
1929
2572
|
}),
|
|
1930
|
-
/* @__PURE__ */
|
|
2573
|
+
/* @__PURE__ */ K("div", {
|
|
1931
2574
|
ref: h,
|
|
1932
2575
|
id: "bento-palette-list",
|
|
1933
2576
|
role: "listbox",
|
|
1934
2577
|
"aria-label": l("bento.palette.title", { defaultValue: "Command palette" }),
|
|
1935
2578
|
className: "max-h-80 overflow-y-auto p-2",
|
|
1936
2579
|
children: [
|
|
1937
|
-
_.length === 0 && !o?.pending && /* @__PURE__ */
|
|
2580
|
+
_.length === 0 && !o?.pending && /* @__PURE__ */ G("p", {
|
|
1938
2581
|
className: "px-3 py-6 text-center text-sm text-muted-foreground",
|
|
1939
2582
|
children: l("bento.palette.noResults", { defaultValue: "No matches" })
|
|
1940
2583
|
}),
|
|
1941
|
-
/* @__PURE__ */
|
|
2584
|
+
/* @__PURE__ */ G(Kn, {
|
|
1942
2585
|
label: o && g.length > 0 ? l("bento.palette.areas", { defaultValue: "Areas" }) : void 0,
|
|
1943
|
-
children: g.map(({ item: e, label: t }, n) => /* @__PURE__ */
|
|
2586
|
+
children: g.map(({ item: e, label: t }, n) => /* @__PURE__ */ G(qn, {
|
|
1944
2587
|
index: n,
|
|
1945
2588
|
active: n === p,
|
|
1946
2589
|
icon: e.icon,
|
|
1947
2590
|
label: t,
|
|
1948
2591
|
onActivate: () => m(n),
|
|
1949
2592
|
onChoose: () => S(_[n]),
|
|
1950
|
-
trailing: e.bentoRoute ? void 0 : /* @__PURE__ */
|
|
2593
|
+
trailing: e.bentoRoute ? void 0 : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(we, {
|
|
1951
2594
|
"aria-hidden": !0,
|
|
1952
2595
|
size: 15,
|
|
1953
2596
|
className: "shrink-0 text-muted-foreground/70"
|
|
1954
|
-
}), /* @__PURE__ */
|
|
2597
|
+
}), /* @__PURE__ */ G("span", {
|
|
1955
2598
|
className: "sr-only",
|
|
1956
2599
|
children: l("bento.palette.opensConsole", { defaultValue: "Opens in console" })
|
|
1957
2600
|
})] })
|
|
1958
2601
|
}, e.id))
|
|
1959
2602
|
}),
|
|
1960
|
-
o && /* @__PURE__ */
|
|
2603
|
+
o && /* @__PURE__ */ K(Kn, {
|
|
1961
2604
|
label: o.label,
|
|
1962
2605
|
children: [o.items.map((e, t) => {
|
|
1963
2606
|
let n = g.length + t;
|
|
1964
|
-
return /* @__PURE__ */
|
|
2607
|
+
return /* @__PURE__ */ G(qn, {
|
|
1965
2608
|
index: n,
|
|
1966
2609
|
active: n === p,
|
|
1967
2610
|
icon: e.icon,
|
|
@@ -1970,7 +2613,7 @@ function an({ open: e, onOpenChange: t, items: a, group: o, onQueryChange: c })
|
|
|
1970
2613
|
onActivate: () => m(n),
|
|
1971
2614
|
onChoose: () => S(_[n])
|
|
1972
2615
|
}, e.id);
|
|
1973
|
-
}), o.pending && /* @__PURE__ */
|
|
2616
|
+
}), o.pending && /* @__PURE__ */ G("p", {
|
|
1974
2617
|
className: "px-3 py-2.5 text-sm text-muted-foreground",
|
|
1975
2618
|
children: l("bento.palette.searching", { defaultValue: "Searching…" })
|
|
1976
2619
|
})]
|
|
@@ -1983,13 +2626,13 @@ function an({ open: e, onOpenChange: t, items: a, group: o, onQueryChange: c })
|
|
|
1983
2626
|
}
|
|
1984
2627
|
//#endregion
|
|
1985
2628
|
//#region src/bento/bento-shell.tsx
|
|
1986
|
-
function
|
|
1987
|
-
let { t: c } =
|
|
1988
|
-
return /* @__PURE__ */
|
|
2629
|
+
function Yn({ rail: t, headerStart: n, headerEnd: r, column: i = "default", dock: a, backToTop: o = !0, children: s }) {
|
|
2630
|
+
let { t: c } = q(), l = Ue(), u = se(), d = H(null), f = H(null), p = i === "full", m = n != null || r != null, h = o || a != null;
|
|
2631
|
+
return /* @__PURE__ */ K("div", {
|
|
1989
2632
|
"data-slot": "bento-shell",
|
|
1990
2633
|
className: e("relative w-full bg-background text-foreground", t != null && "bento-rail-gutter", p ? "flex h-svh flex-col overflow-hidden" : "min-h-svh"),
|
|
1991
2634
|
children: [
|
|
1992
|
-
/* @__PURE__ */
|
|
2635
|
+
/* @__PURE__ */ G("a", {
|
|
1993
2636
|
href: `#${u}`,
|
|
1994
2637
|
onClick: (e) => {
|
|
1995
2638
|
e.preventDefault(), d.current?.focus();
|
|
@@ -1997,28 +2640,28 @@ function on({ rail: t, headerStart: n, headerEnd: r, column: i = "default", dock
|
|
|
1997
2640
|
className: "sr-only rounded-full border border-border/60 bg-card px-4 py-2 text-sm shadow-lg focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[60]",
|
|
1998
2641
|
children: c("bento.shell.skip", { defaultValue: "Skip to content" })
|
|
1999
2642
|
}),
|
|
2000
|
-
/* @__PURE__ */
|
|
2643
|
+
/* @__PURE__ */ G("span", {
|
|
2001
2644
|
ref: f,
|
|
2002
2645
|
role: "status",
|
|
2003
2646
|
"aria-live": "polite",
|
|
2004
2647
|
className: "sr-only"
|
|
2005
2648
|
}),
|
|
2006
|
-
l && /* @__PURE__ */
|
|
2649
|
+
l && /* @__PURE__ */ G(Xn, {
|
|
2007
2650
|
main: d,
|
|
2008
2651
|
announcer: f
|
|
2009
2652
|
}),
|
|
2010
2653
|
t,
|
|
2011
|
-
m && /* @__PURE__ */
|
|
2654
|
+
m && /* @__PURE__ */ K("header", {
|
|
2012
2655
|
className: "bento-shell-header bento-shell-bar sticky top-0 z-30 flex shrink-0 items-center justify-between gap-3 border-b border-border/40 bg-background/55 py-3 backdrop-blur-xl backdrop-saturate-150",
|
|
2013
|
-
children: [/* @__PURE__ */
|
|
2656
|
+
children: [/* @__PURE__ */ G("div", {
|
|
2014
2657
|
className: "flex min-w-0 items-center gap-3",
|
|
2015
2658
|
children: n
|
|
2016
|
-
}), /* @__PURE__ */
|
|
2659
|
+
}), /* @__PURE__ */ G("div", {
|
|
2017
2660
|
className: "flex items-center gap-2",
|
|
2018
2661
|
children: r
|
|
2019
2662
|
})]
|
|
2020
2663
|
}),
|
|
2021
|
-
/* @__PURE__ */
|
|
2664
|
+
/* @__PURE__ */ G("main", {
|
|
2022
2665
|
ref: d,
|
|
2023
2666
|
id: u,
|
|
2024
2667
|
tabIndex: -1,
|
|
@@ -2027,20 +2670,20 @@ function on({ rail: t, headerStart: n, headerEnd: r, column: i = "default", dock
|
|
|
2027
2670
|
className: "bento-shell-main",
|
|
2028
2671
|
children: s
|
|
2029
2672
|
}),
|
|
2030
|
-
h && /* @__PURE__ */
|
|
2673
|
+
h && /* @__PURE__ */ G("div", {
|
|
2031
2674
|
"data-slot": "bento-shell-corner",
|
|
2032
2675
|
className: "pointer-events-none fixed bottom-5 right-5 z-50 flex flex-col items-end gap-3",
|
|
2033
|
-
children: /* @__PURE__ */
|
|
2676
|
+
children: /* @__PURE__ */ K(te.Provider, {
|
|
2034
2677
|
value: !0,
|
|
2035
|
-
children: [o && /* @__PURE__ */
|
|
2678
|
+
children: [o && /* @__PURE__ */ G(Wn, {}), a]
|
|
2036
2679
|
})
|
|
2037
2680
|
})
|
|
2038
2681
|
]
|
|
2039
2682
|
});
|
|
2040
2683
|
}
|
|
2041
|
-
function
|
|
2042
|
-
let { pathname: n } =
|
|
2043
|
-
return
|
|
2684
|
+
function Xn({ main: e, announcer: t }) {
|
|
2685
|
+
let { pathname: n } = We(), r = H(n);
|
|
2686
|
+
return B(() => {
|
|
2044
2687
|
if (r.current === n) return;
|
|
2045
2688
|
r.current = n;
|
|
2046
2689
|
let i = 0, a, o = () => {
|
|
@@ -2060,7 +2703,7 @@ function sn({ main: e, announcer: t }) {
|
|
|
2060
2703
|
}
|
|
2061
2704
|
//#endregion
|
|
2062
2705
|
//#region src/bento/bento-shell-shortcuts.ts
|
|
2063
|
-
var
|
|
2706
|
+
var Zn = Object.freeze([
|
|
2064
2707
|
{
|
|
2065
2708
|
action: "palette",
|
|
2066
2709
|
key: "k",
|
|
@@ -2075,14 +2718,14 @@ var cn = Object.freeze([
|
|
|
2075
2718
|
key: "?"
|
|
2076
2719
|
}
|
|
2077
2720
|
]);
|
|
2078
|
-
function
|
|
2721
|
+
function Qn() {
|
|
2079
2722
|
return typeof navigator > "u" ? !1 : /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent || "");
|
|
2080
2723
|
}
|
|
2081
|
-
function
|
|
2724
|
+
function $n(e, t) {
|
|
2082
2725
|
let n = e.key.length === 1 ? e.key.toUpperCase() : e.key;
|
|
2083
2726
|
return e.mod ? [t ? "⌘" : "Ctrl", n] : [n];
|
|
2084
2727
|
}
|
|
2085
|
-
function
|
|
2728
|
+
function er(e) {
|
|
2086
2729
|
if (!(e instanceof HTMLElement)) return !1;
|
|
2087
2730
|
if ([
|
|
2088
2731
|
"INPUT",
|
|
@@ -2092,24 +2735,24 @@ function dn(e) {
|
|
|
2092
2735
|
let t = e.closest("[contenteditable]");
|
|
2093
2736
|
return t !== null && t.getAttribute("contenteditable") !== "false";
|
|
2094
2737
|
}
|
|
2095
|
-
function
|
|
2738
|
+
function tr(e, t) {
|
|
2096
2739
|
if (e.defaultPrevented || e.isComposing || e.repeat) return;
|
|
2097
2740
|
let n = e.key.toLowerCase();
|
|
2098
|
-
return
|
|
2741
|
+
return Zn.find((r) => n === r.key ? r.mod ? (t ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey) && !e.altKey && !e.shiftKey : e.metaKey || er(e.target) ? !1 : e.ctrlKey === e.altKey : !1);
|
|
2099
2742
|
}
|
|
2100
|
-
function
|
|
2101
|
-
let r =
|
|
2743
|
+
function nr({ onPalette: e, onShortcuts: t, isMac: n = Qn() }) {
|
|
2744
|
+
let r = H({
|
|
2102
2745
|
onPalette: e,
|
|
2103
2746
|
onShortcuts: t
|
|
2104
2747
|
});
|
|
2105
|
-
|
|
2748
|
+
B(() => {
|
|
2106
2749
|
r.current = {
|
|
2107
2750
|
onPalette: e,
|
|
2108
2751
|
onShortcuts: t
|
|
2109
2752
|
};
|
|
2110
|
-
}),
|
|
2753
|
+
}), B(() => {
|
|
2111
2754
|
function e(e) {
|
|
2112
|
-
let t =
|
|
2755
|
+
let t = tr(e, n), i = t?.action === "palette" ? r.current.onPalette : t && r.current.onShortcuts;
|
|
2113
2756
|
i && (e.preventDefault(), i());
|
|
2114
2757
|
}
|
|
2115
2758
|
return globalThis.addEventListener("keydown", e), () => globalThis.removeEventListener("keydown", e);
|
|
@@ -2117,42 +2760,42 @@ function pn({ onPalette: e, onShortcuts: t, isMac: n = ln() }) {
|
|
|
2117
2760
|
}
|
|
2118
2761
|
//#endregion
|
|
2119
2762
|
//#region src/bento/bento-palette-trigger.tsx
|
|
2120
|
-
function
|
|
2121
|
-
let { t: i } =
|
|
2122
|
-
return /* @__PURE__ */
|
|
2763
|
+
function rr({ onClick: t, isMac: n = Qn(), className: r }) {
|
|
2764
|
+
let { t: i } = q(), a = Zn.filter((e) => e.action === "palette"), o = a.find((e) => e.mod);
|
|
2765
|
+
return /* @__PURE__ */ K("button", {
|
|
2123
2766
|
type: "button",
|
|
2124
2767
|
onClick: t,
|
|
2125
2768
|
"aria-keyshortcuts": a.map((e) => e.mod ? `${n ? "Meta" : "Control"}+${e.key.toUpperCase()}` : e.key).join(" "),
|
|
2126
2769
|
className: e("bento-tile bento-tile-clickable inline-flex items-center gap-2 rounded-full border border-border/60 bg-card/60 py-1.5 pl-3 pr-2 text-sm text-muted-foreground backdrop-blur hover:text-foreground", r),
|
|
2127
2770
|
children: [
|
|
2128
|
-
/* @__PURE__ */
|
|
2771
|
+
/* @__PURE__ */ G(Ne, {
|
|
2129
2772
|
"aria-hidden": !0,
|
|
2130
2773
|
size: 16
|
|
2131
2774
|
}),
|
|
2132
|
-
/* @__PURE__ */
|
|
2775
|
+
/* @__PURE__ */ G("span", {
|
|
2133
2776
|
className: "sr-only sm:not-sr-only",
|
|
2134
2777
|
children: i("bento.palette.search", { defaultValue: "Search" })
|
|
2135
2778
|
}),
|
|
2136
|
-
o && /* @__PURE__ */
|
|
2779
|
+
o && /* @__PURE__ */ G("kbd", {
|
|
2137
2780
|
"aria-hidden": !0,
|
|
2138
2781
|
className: "hidden rounded border border-border/60 bg-muted px-1.5 py-0.5 text-[10px] font-medium tracking-wide sm:inline",
|
|
2139
|
-
children:
|
|
2782
|
+
children: $n(o, n).join(n ? "" : " ")
|
|
2140
2783
|
})
|
|
2141
2784
|
]
|
|
2142
2785
|
});
|
|
2143
2786
|
}
|
|
2144
2787
|
//#endregion
|
|
2145
2788
|
//#region src/bento/bento-shortcuts-dialog.tsx
|
|
2146
|
-
function
|
|
2147
|
-
let { t: c } =
|
|
2789
|
+
function ir({ open: e, onOpenChange: t, isMac: a = Qn() }) {
|
|
2790
|
+
let { t: c } = q(), l = {
|
|
2148
2791
|
palette: c("bento.palette.open", { defaultValue: "Open command palette" }),
|
|
2149
2792
|
shortcuts: c("bento.shortcuts.openGuide", { defaultValue: "Show keyboard shortcuts" })
|
|
2150
|
-
}, u = [...new Set(
|
|
2793
|
+
}, u = [...new Set(Zn.map((e) => e.action))], d = [{
|
|
2151
2794
|
heading: c("bento.shortcuts.global", { defaultValue: "Global" }),
|
|
2152
2795
|
rows: u.map((e) => ({
|
|
2153
2796
|
id: e,
|
|
2154
2797
|
label: l[e],
|
|
2155
|
-
combos:
|
|
2798
|
+
combos: Zn.filter((t) => t.action === e).map((e) => $n(e, a))
|
|
2156
2799
|
}))
|
|
2157
2800
|
}, {
|
|
2158
2801
|
heading: c("bento.shortcuts.palette", { defaultValue: "Command palette" }),
|
|
@@ -2174,36 +2817,36 @@ function hn({ open: e, onOpenChange: t, isMac: a = ln() }) {
|
|
|
2174
2817
|
}
|
|
2175
2818
|
]
|
|
2176
2819
|
}];
|
|
2177
|
-
return /* @__PURE__ */
|
|
2820
|
+
return /* @__PURE__ */ G(n, {
|
|
2178
2821
|
open: e,
|
|
2179
2822
|
onOpenChange: t,
|
|
2180
|
-
children: /* @__PURE__ */
|
|
2823
|
+
children: /* @__PURE__ */ K(s, {
|
|
2181
2824
|
className: "max-w-md",
|
|
2182
|
-
children: [/* @__PURE__ */
|
|
2825
|
+
children: [/* @__PURE__ */ K(o, { children: [/* @__PURE__ */ K(i, {
|
|
2183
2826
|
className: "flex items-center gap-2",
|
|
2184
|
-
children: [/* @__PURE__ */
|
|
2827
|
+
children: [/* @__PURE__ */ G(De, {
|
|
2185
2828
|
size: 20,
|
|
2186
2829
|
className: "bento-accent-icon"
|
|
2187
2830
|
}), c("bento.shortcuts.title", { defaultValue: "Keyboard shortcuts" })]
|
|
2188
|
-
}), /* @__PURE__ */
|
|
2831
|
+
}), /* @__PURE__ */ G(r, { children: c("bento.shortcuts.description", { defaultValue: "Move around without leaving the keyboard." }) })] }), /* @__PURE__ */ G("div", {
|
|
2189
2832
|
className: "flex flex-col gap-5",
|
|
2190
|
-
children: d.map((e) => /* @__PURE__ */
|
|
2833
|
+
children: d.map((e) => /* @__PURE__ */ K("section", { children: [/* @__PURE__ */ G("h3", {
|
|
2191
2834
|
className: "mb-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",
|
|
2192
2835
|
children: e.heading
|
|
2193
|
-
}), /* @__PURE__ */
|
|
2836
|
+
}), /* @__PURE__ */ G("ul", {
|
|
2194
2837
|
className: "flex flex-col gap-1.5",
|
|
2195
|
-
children: e.rows.map((e) => /* @__PURE__ */
|
|
2838
|
+
children: e.rows.map((e) => /* @__PURE__ */ K("li", {
|
|
2196
2839
|
"data-shortcut": e.id,
|
|
2197
2840
|
className: "flex items-center justify-between gap-4",
|
|
2198
|
-
children: [/* @__PURE__ */
|
|
2841
|
+
children: [/* @__PURE__ */ G("span", {
|
|
2199
2842
|
className: "text-sm text-foreground",
|
|
2200
2843
|
children: e.label
|
|
2201
|
-
}), /* @__PURE__ */
|
|
2844
|
+
}), /* @__PURE__ */ G("span", {
|
|
2202
2845
|
className: "flex shrink-0 items-center gap-1",
|
|
2203
|
-
children: e.combos.map((e, t) => /* @__PURE__ */
|
|
2846
|
+
children: e.combos.map((e, t) => /* @__PURE__ */ K(oe, { children: [t > 0 && /* @__PURE__ */ G("span", {
|
|
2204
2847
|
className: "px-0.5 text-[11px] text-muted-foreground",
|
|
2205
2848
|
children: c("bento.shortcuts.or", { defaultValue: "or" })
|
|
2206
|
-
}), e.map((e) => /* @__PURE__ */
|
|
2849
|
+
}), e.map((e) => /* @__PURE__ */ G("kbd", {
|
|
2207
2850
|
className: "inline-flex min-w-6 items-center justify-center rounded-md border border-border/60 bg-muted px-1.5 py-0.5 text-[11px] font-medium tracking-wide",
|
|
2208
2851
|
children: e
|
|
2209
2852
|
}, e))] }, e.join("+")))
|
|
@@ -2216,148 +2859,148 @@ function hn({ open: e, onOpenChange: t, isMac: a = ln() }) {
|
|
|
2216
2859
|
}
|
|
2217
2860
|
//#endregion
|
|
2218
2861
|
//#region src/bento/bento-nav-rail.tsx
|
|
2219
|
-
var
|
|
2220
|
-
function
|
|
2862
|
+
var ar = Oe;
|
|
2863
|
+
function or(e, t) {
|
|
2221
2864
|
return e === t || e.startsWith(`${t}/`);
|
|
2222
2865
|
}
|
|
2223
|
-
function
|
|
2224
|
-
return t.section.areaRoute &&
|
|
2866
|
+
function sr(e, t) {
|
|
2867
|
+
return t.section.areaRoute && or(e, t.section.areaRoute) ? !0 : t.items.some((t) => t.bentoRoute && or(e, t.bentoRoute));
|
|
2225
2868
|
}
|
|
2226
|
-
function
|
|
2227
|
-
let { t: i } =
|
|
2228
|
-
return /* @__PURE__ */
|
|
2869
|
+
function cr({ groups: e, homeRoute: t, homeAliases: n, homeLabel: r }) {
|
|
2870
|
+
let { t: i } = q(), { pathname: a } = We(), o = V(() => e.filter((e) => !!e.section.areaRoute), [e]), s = a === t || (n?.includes(a) ?? !1);
|
|
2871
|
+
return /* @__PURE__ */ G(E, {
|
|
2229
2872
|
delayDuration: 200,
|
|
2230
|
-
children: /* @__PURE__ */
|
|
2873
|
+
children: /* @__PURE__ */ K("nav", {
|
|
2231
2874
|
"aria-label": i("bento.nav.label", { defaultValue: "Primary" }),
|
|
2232
2875
|
className: "fixed inset-y-0 left-0 z-40 hidden w-16 flex-col items-center gap-1 overflow-y-auto overflow-x-hidden border-r border-border/40 bg-background/55 pt-20 pb-4 backdrop-blur-xl backdrop-saturate-150 md:flex",
|
|
2233
2876
|
children: [
|
|
2234
|
-
/* @__PURE__ */
|
|
2877
|
+
/* @__PURE__ */ G(lr, {
|
|
2235
2878
|
to: t,
|
|
2236
|
-
icon:
|
|
2879
|
+
icon: Ee,
|
|
2237
2880
|
label: r ?? i("home.title", { defaultValue: "Home" }),
|
|
2238
2881
|
active: s
|
|
2239
2882
|
}),
|
|
2240
|
-
o.length > 0 && /* @__PURE__ */
|
|
2883
|
+
o.length > 0 && /* @__PURE__ */ G("span", {
|
|
2241
2884
|
"aria-hidden": !0,
|
|
2242
2885
|
className: "my-1 h-px w-6 bg-border/60"
|
|
2243
2886
|
}),
|
|
2244
|
-
o.map((e) => /* @__PURE__ */
|
|
2887
|
+
o.map((e) => /* @__PURE__ */ G(lr, {
|
|
2245
2888
|
to: e.section.areaRoute,
|
|
2246
|
-
icon: e.section.icon ??
|
|
2889
|
+
icon: e.section.icon ?? ar,
|
|
2247
2890
|
label: e.section.labelKey ? i(e.section.labelKey) : e.section.id,
|
|
2248
|
-
active:
|
|
2891
|
+
active: sr(a, e)
|
|
2249
2892
|
}, e.section.id))
|
|
2250
2893
|
]
|
|
2251
2894
|
})
|
|
2252
2895
|
});
|
|
2253
2896
|
}
|
|
2254
|
-
function
|
|
2255
|
-
return /* @__PURE__ */
|
|
2897
|
+
function lr({ to: e, icon: t, label: n, active: r }) {
|
|
2898
|
+
return /* @__PURE__ */ K(M, { children: [/* @__PURE__ */ G(x, {
|
|
2256
2899
|
asChild: !0,
|
|
2257
|
-
children: /* @__PURE__ */
|
|
2900
|
+
children: /* @__PURE__ */ G(He, {
|
|
2258
2901
|
to: e,
|
|
2259
2902
|
"aria-label": n,
|
|
2260
2903
|
"aria-current": r ? "page" : void 0,
|
|
2261
2904
|
className: `bento-tile-clickable grid h-11 w-11 shrink-0 place-items-center rounded-2xl border transition-colors duration-200 ${r ? "bento-rail-active" : "border-transparent text-muted-foreground hover:border-border/60 hover:bg-card/60 hover:text-foreground"}`,
|
|
2262
|
-
children: /* @__PURE__ */
|
|
2905
|
+
children: /* @__PURE__ */ G(t, { size: 20 })
|
|
2263
2906
|
})
|
|
2264
|
-
}), /* @__PURE__ */
|
|
2907
|
+
}), /* @__PURE__ */ G(D, {
|
|
2265
2908
|
side: "right",
|
|
2266
2909
|
children: n
|
|
2267
2910
|
})] });
|
|
2268
2911
|
}
|
|
2269
2912
|
//#endregion
|
|
2270
2913
|
//#region src/bento/bento-user-menu.tsx
|
|
2271
|
-
function
|
|
2272
|
-
let { user: o, status: s } =
|
|
2273
|
-
return s === "loading" ? /* @__PURE__ */
|
|
2914
|
+
function ur({ accountRoute: e, logoutUrl: t, organizationsRoute: n, tenantAdminRoute: r, onOpenShortcuts: i, onReplayTour: a }) {
|
|
2915
|
+
let { user: o, status: s } = N(), { t: c } = q(), u = Ge(), m = `${o.firstName ?? ""} ${o.lastName ?? ""}`.trim() || o.username || "";
|
|
2916
|
+
return s === "loading" ? /* @__PURE__ */ G("div", {
|
|
2274
2917
|
className: "h-9 w-9 rounded-full bg-muted/40",
|
|
2275
2918
|
"aria-hidden": !0
|
|
2276
|
-
}) : /* @__PURE__ */
|
|
2919
|
+
}) : /* @__PURE__ */ K(k, { children: [/* @__PURE__ */ G(f, {
|
|
2277
2920
|
asChild: !0,
|
|
2278
|
-
children: /* @__PURE__ */
|
|
2921
|
+
children: /* @__PURE__ */ G("button", {
|
|
2279
2922
|
type: "button",
|
|
2280
|
-
title:
|
|
2923
|
+
title: m || o.username,
|
|
2281
2924
|
className: "bento-tile-clickable cursor-pointer rounded-full p-0.5 ring-1 ring-border/60 outline-none transition-shadow duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] bento-ring hover:ring-2 focus-visible:ring-2 focus-visible:ring-ring",
|
|
2282
|
-
children: /* @__PURE__ */
|
|
2925
|
+
children: /* @__PURE__ */ G(S, {
|
|
2283
2926
|
givenName: o.firstName,
|
|
2284
2927
|
familyName: o.lastName,
|
|
2285
|
-
name:
|
|
2928
|
+
name: m || o.username,
|
|
2286
2929
|
src: o.avatarUrl || void 0,
|
|
2287
2930
|
alt: o.username
|
|
2288
2931
|
})
|
|
2289
2932
|
})
|
|
2290
|
-
}), /* @__PURE__ */
|
|
2933
|
+
}), /* @__PURE__ */ K(g, {
|
|
2291
2934
|
align: "end",
|
|
2292
2935
|
sideOffset: 10,
|
|
2293
2936
|
className: "bento-dropdown min-w-64 p-2",
|
|
2294
2937
|
children: [
|
|
2295
|
-
/* @__PURE__ */
|
|
2938
|
+
/* @__PURE__ */ G(p, {
|
|
2296
2939
|
className: "p-0 font-normal",
|
|
2297
|
-
children: /* @__PURE__ */
|
|
2940
|
+
children: /* @__PURE__ */ K("div", {
|
|
2298
2941
|
className: "flex items-center gap-3 rounded-xl px-2 py-2 text-left text-sm",
|
|
2299
|
-
children: [/* @__PURE__ */
|
|
2942
|
+
children: [/* @__PURE__ */ G("span", {
|
|
2300
2943
|
className: "rounded-full p-0.5 ring-1 ring-border/60",
|
|
2301
|
-
children: /* @__PURE__ */
|
|
2944
|
+
children: /* @__PURE__ */ G(S, {
|
|
2302
2945
|
givenName: o.firstName,
|
|
2303
2946
|
familyName: o.lastName,
|
|
2304
|
-
name:
|
|
2947
|
+
name: m || o.username,
|
|
2305
2948
|
src: o.avatarUrl || void 0,
|
|
2306
2949
|
alt: o.username
|
|
2307
2950
|
})
|
|
2308
|
-
}), /* @__PURE__ */
|
|
2951
|
+
}), /* @__PURE__ */ K("div", {
|
|
2309
2952
|
className: "grid flex-1 text-left text-sm leading-tight",
|
|
2310
|
-
children: [
|
|
2953
|
+
children: [m && /* @__PURE__ */ G("span", {
|
|
2311
2954
|
className: "truncate font-medium",
|
|
2312
|
-
children:
|
|
2313
|
-
}), o.email && /* @__PURE__ */
|
|
2955
|
+
children: m
|
|
2956
|
+
}), o.email && /* @__PURE__ */ G("span", {
|
|
2314
2957
|
className: "truncate text-xs text-muted-foreground",
|
|
2315
2958
|
children: o.email
|
|
2316
2959
|
})]
|
|
2317
2960
|
})]
|
|
2318
2961
|
})
|
|
2319
2962
|
}),
|
|
2320
|
-
/* @__PURE__ */
|
|
2321
|
-
/* @__PURE__ */
|
|
2322
|
-
/* @__PURE__ */
|
|
2323
|
-
onSelect: () =>
|
|
2963
|
+
/* @__PURE__ */ G(l, { className: "my-1.5 bg-border/50" }),
|
|
2964
|
+
/* @__PURE__ */ K(_, { children: [
|
|
2965
|
+
/* @__PURE__ */ K(d, {
|
|
2966
|
+
onSelect: () => u(e),
|
|
2324
2967
|
className: "bento-dropdown-item cursor-pointer gap-2 px-3 py-2",
|
|
2325
|
-
children: [/* @__PURE__ */
|
|
2968
|
+
children: [/* @__PURE__ */ G(Le, { size: 18 }), c("nav.account")]
|
|
2326
2969
|
}),
|
|
2327
|
-
n && /* @__PURE__ */
|
|
2328
|
-
onSelect: () =>
|
|
2970
|
+
n && /* @__PURE__ */ K(d, {
|
|
2971
|
+
onSelect: () => u(n),
|
|
2329
2972
|
className: "bento-dropdown-item cursor-pointer gap-2 px-3 py-2",
|
|
2330
|
-
children: [/* @__PURE__ */
|
|
2973
|
+
children: [/* @__PURE__ */ G(ge, { size: 18 }), c("nav.organizations", { defaultValue: "Organizations" })]
|
|
2331
2974
|
}),
|
|
2332
|
-
r && /* @__PURE__ */
|
|
2333
|
-
onSelect: () =>
|
|
2975
|
+
r && /* @__PURE__ */ K(d, {
|
|
2976
|
+
onSelect: () => u(r),
|
|
2334
2977
|
className: "bento-dropdown-item cursor-pointer gap-2 px-3 py-2",
|
|
2335
|
-
children: [/* @__PURE__ */
|
|
2978
|
+
children: [/* @__PURE__ */ G(_e, { size: 18 }), c("nav.tenantAdmin", { defaultValue: "Tenant administration" })]
|
|
2336
2979
|
})
|
|
2337
2980
|
] }),
|
|
2338
|
-
(i || a) && /* @__PURE__ */
|
|
2981
|
+
(i || a) && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(l, { className: "my-1.5 bg-border/50" }), /* @__PURE__ */ K(_, { children: [a && /* @__PURE__ */ K(d, {
|
|
2339
2982
|
onSelect: () => a(),
|
|
2340
2983
|
className: "bento-dropdown-item cursor-pointer gap-2 px-3 py-2",
|
|
2341
|
-
children: [/* @__PURE__ */
|
|
2342
|
-
}), i && /* @__PURE__ */
|
|
2984
|
+
children: [/* @__PURE__ */ G(Pe, { size: 18 }), c("bento.tour.replay", { defaultValue: "Take the tour" })]
|
|
2985
|
+
}), i && /* @__PURE__ */ K(d, {
|
|
2343
2986
|
onSelect: () => i(),
|
|
2344
2987
|
className: "bento-dropdown-item cursor-pointer gap-2 px-3 py-2",
|
|
2345
|
-
children: [/* @__PURE__ */
|
|
2988
|
+
children: [/* @__PURE__ */ G(De, { size: 18 }), c("bento.shortcuts.title", { defaultValue: "Keyboard shortcuts" })]
|
|
2346
2989
|
})] })] }),
|
|
2347
|
-
/* @__PURE__ */
|
|
2348
|
-
/* @__PURE__ */
|
|
2990
|
+
/* @__PURE__ */ G(l, { className: "my-1.5 bg-border/50" }),
|
|
2991
|
+
/* @__PURE__ */ K(d, {
|
|
2349
2992
|
onSelect: () => {
|
|
2350
2993
|
globalThis.location.href = t;
|
|
2351
2994
|
},
|
|
2352
2995
|
className: "bento-dropdown-item cursor-pointer gap-2 px-3 py-2 bento-item-danger",
|
|
2353
|
-
children: [/* @__PURE__ */
|
|
2996
|
+
children: [/* @__PURE__ */ G(ke, { size: 18 }), c("nav.logOut")]
|
|
2354
2997
|
})
|
|
2355
2998
|
]
|
|
2356
2999
|
})] });
|
|
2357
3000
|
}
|
|
2358
3001
|
//#endregion
|
|
2359
3002
|
//#region src/bento/bento-section-chrome.tsx
|
|
2360
|
-
var
|
|
3003
|
+
var dr = {
|
|
2361
3004
|
blue: "blue",
|
|
2362
3005
|
violet: "violet",
|
|
2363
3006
|
emerald: "emerald",
|
|
@@ -2367,62 +3010,62 @@ var Sn = {
|
|
|
2367
3010
|
cyan: "blue",
|
|
2368
3011
|
orange: "amber"
|
|
2369
3012
|
};
|
|
2370
|
-
function
|
|
3013
|
+
function fr({ variant: t = "blue", className: n, children: r }) {
|
|
2371
3014
|
let i;
|
|
2372
|
-
|
|
2373
|
-
if (!
|
|
3015
|
+
ae.forEach(r, (e) => {
|
|
3016
|
+
if (!z(e)) return;
|
|
2374
3017
|
let { type: t } = e;
|
|
2375
|
-
(t ===
|
|
3018
|
+
(t === L.Header || t === L.StaticHeader) && (i ??= e.props);
|
|
2376
3019
|
});
|
|
2377
|
-
let a =
|
|
2378
|
-
if (!
|
|
3020
|
+
let a = ae.map(r, (e) => {
|
|
3021
|
+
if (!z(e)) return e;
|
|
2379
3022
|
let { type: t } = e;
|
|
2380
|
-
return t ===
|
|
3023
|
+
return t === L.Header || t === L.StaticHeader ? null : t === L.Content ? e.props.children : e;
|
|
2381
3024
|
});
|
|
2382
|
-
return i ? /* @__PURE__ */
|
|
3025
|
+
return i ? /* @__PURE__ */ G(zn, {
|
|
2383
3026
|
icon: i.icon,
|
|
2384
|
-
tone:
|
|
3027
|
+
tone: dr[t] ?? "blue",
|
|
2385
3028
|
title: i.title,
|
|
2386
3029
|
description: i.description,
|
|
2387
3030
|
className: n,
|
|
2388
3031
|
children: a
|
|
2389
|
-
}) : /* @__PURE__ */
|
|
2390
|
-
className: e(
|
|
3032
|
+
}) : /* @__PURE__ */ G("section", {
|
|
3033
|
+
className: e(Rn, n),
|
|
2391
3034
|
children: a
|
|
2392
3035
|
});
|
|
2393
3036
|
}
|
|
2394
|
-
|
|
3037
|
+
fr.Header = L.Header, fr.StaticHeader = L.StaticHeader, fr.Content = L.Content;
|
|
2395
3038
|
//#endregion
|
|
2396
3039
|
//#region src/bento/bento-section.tsx
|
|
2397
|
-
var
|
|
2398
|
-
function
|
|
2399
|
-
let o = /* @__PURE__ */
|
|
3040
|
+
var pr = "bento-grid grid auto-rows-[minmax(140px,auto)] grid-cols-2 gap-4 md:grid-cols-4 md:gap-5 lg:grid-cols-6";
|
|
3041
|
+
function mr({ eyebrow: e, title: t, description: n, titleHref: r, children: i, gridClassName: a = pr }) {
|
|
3042
|
+
let o = /* @__PURE__ */ G("h2", {
|
|
2400
3043
|
className: "text-xl font-semibold tracking-tight md:text-2xl",
|
|
2401
3044
|
children: t
|
|
2402
3045
|
});
|
|
2403
|
-
return /* @__PURE__ */
|
|
3046
|
+
return /* @__PURE__ */ K("section", {
|
|
2404
3047
|
className: "mb-8 md:mb-10",
|
|
2405
|
-
children: [/* @__PURE__ */
|
|
3048
|
+
children: [/* @__PURE__ */ K("header", {
|
|
2406
3049
|
className: "bento-shell-header mb-4 flex flex-col gap-0.5",
|
|
2407
3050
|
children: [
|
|
2408
|
-
e && /* @__PURE__ */
|
|
3051
|
+
e && /* @__PURE__ */ G("span", {
|
|
2409
3052
|
className: "text-xs uppercase tracking-[0.18em] text-muted-foreground",
|
|
2410
3053
|
children: e
|
|
2411
3054
|
}),
|
|
2412
|
-
r ? /* @__PURE__ */
|
|
3055
|
+
r ? /* @__PURE__ */ K(He, {
|
|
2413
3056
|
to: r,
|
|
2414
3057
|
className: "group inline-flex w-fit items-center gap-1 text-foreground transition-colors hover:text-primary",
|
|
2415
|
-
children: [o, /* @__PURE__ */
|
|
3058
|
+
children: [o, /* @__PURE__ */ G(be, {
|
|
2416
3059
|
size: 20,
|
|
2417
3060
|
className: "text-muted-foreground transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] group-hover:translate-x-1"
|
|
2418
3061
|
})]
|
|
2419
3062
|
}) : o,
|
|
2420
|
-
n && /* @__PURE__ */
|
|
3063
|
+
n && /* @__PURE__ */ G("p", {
|
|
2421
3064
|
className: "max-w-2xl text-sm text-muted-foreground",
|
|
2422
3065
|
children: n
|
|
2423
3066
|
})
|
|
2424
3067
|
]
|
|
2425
|
-
}), /* @__PURE__ */
|
|
3068
|
+
}), /* @__PURE__ */ G("div", {
|
|
2426
3069
|
className: a,
|
|
2427
3070
|
children: i
|
|
2428
3071
|
})]
|
|
@@ -2430,66 +3073,66 @@ function Tn({ eyebrow: e, title: t, description: n, titleHref: r, children: i, g
|
|
|
2430
3073
|
}
|
|
2431
3074
|
//#endregion
|
|
2432
3075
|
//#region src/bento/bento-tile.tsx
|
|
2433
|
-
function
|
|
2434
|
-
let f = !r && !!(t || n), p = u ? "h-14 w-14 rounded-2xl" : "h-9 w-9 rounded-2xl", m = u ? 28 : 18, h = u ? "text-xl font-semibold tracking-tight md:text-2xl" : "text-base font-semibold tracking-tight md:text-lg", g = /* @__PURE__ */
|
|
2435
|
-
u && /* @__PURE__ */
|
|
3076
|
+
function hr({ to: t, onClick: n, disabled: r = !1, disabledHint: i, icon: a, tone: o, eyebrow: s, title: c, span: l, featured: u = !1, children: d }) {
|
|
3077
|
+
let f = !r && !!(t || n), p = u ? "h-14 w-14 rounded-2xl" : "h-9 w-9 rounded-2xl", m = u ? 28 : 18, h = u ? "text-xl font-semibold tracking-tight md:text-2xl" : "text-base font-semibold tracking-tight md:text-lg", g = /* @__PURE__ */ K(W, { children: [
|
|
3078
|
+
u && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
|
|
2436
3079
|
"aria-hidden": !0,
|
|
2437
|
-
className: `pointer-events-none absolute -bottom-10 -right-10 h-64 w-64 rounded-full ${
|
|
2438
|
-
}), /* @__PURE__ */
|
|
3080
|
+
className: `pointer-events-none absolute -bottom-10 -right-10 h-64 w-64 rounded-full ${Y(o)} opacity-40 blur-2xl dark:opacity-50`
|
|
3081
|
+
}), /* @__PURE__ */ G("div", {
|
|
2439
3082
|
"aria-hidden": !0,
|
|
2440
|
-
className: `pointer-events-none absolute right-12 top-1/3 h-32 w-32 rounded-full ${
|
|
3083
|
+
className: `pointer-events-none absolute right-12 top-1/3 h-32 w-32 rounded-full ${Y(o)} bento-chip-tr opacity-20 blur-2xl dark:opacity-30`
|
|
2441
3084
|
})] }),
|
|
2442
|
-
/* @__PURE__ */
|
|
3085
|
+
/* @__PURE__ */ K("div", {
|
|
2443
3086
|
className: "relative z-1 flex items-center justify-between",
|
|
2444
|
-
children: [/* @__PURE__ */
|
|
2445
|
-
className: `grid place-items-center ${
|
|
2446
|
-
children: /* @__PURE__ */
|
|
2447
|
-
}), f && /* @__PURE__ */
|
|
3087
|
+
children: [/* @__PURE__ */ G("span", {
|
|
3088
|
+
className: `grid place-items-center ${Y(o)} text-white shadow-md ${p}`,
|
|
3089
|
+
children: /* @__PURE__ */ G(a, { size: m })
|
|
3090
|
+
}), f && /* @__PURE__ */ G(be, {
|
|
2448
3091
|
size: u ? 18 : 16,
|
|
2449
3092
|
className: "text-muted-foreground transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] group-hover:translate-x-1"
|
|
2450
3093
|
})]
|
|
2451
3094
|
}),
|
|
2452
|
-
/* @__PURE__ */
|
|
3095
|
+
/* @__PURE__ */ K("div", {
|
|
2453
3096
|
className: "relative z-1",
|
|
2454
3097
|
children: [
|
|
2455
|
-
/* @__PURE__ */
|
|
3098
|
+
/* @__PURE__ */ G("div", {
|
|
2456
3099
|
className: "text-[11px] uppercase tracking-wider text-muted-foreground",
|
|
2457
3100
|
children: s
|
|
2458
3101
|
}),
|
|
2459
|
-
/* @__PURE__ */
|
|
3102
|
+
/* @__PURE__ */ G("div", {
|
|
2460
3103
|
className: `mt-0.5 ${h}`,
|
|
2461
3104
|
children: c
|
|
2462
3105
|
}),
|
|
2463
|
-
d && /* @__PURE__ */
|
|
3106
|
+
d && /* @__PURE__ */ G("div", {
|
|
2464
3107
|
className: "mt-2",
|
|
2465
3108
|
children: d
|
|
2466
3109
|
})
|
|
2467
3110
|
]
|
|
2468
3111
|
})
|
|
2469
3112
|
] }), _ = `bento-tile bento-glass group relative flex flex-col ${u ? "gap-5" : "gap-4"} overflow-hidden text-left ${u ? "p-6 md:p-7" : "p-5"} ${l}${f ? " bento-tile-clickable" : ""}${r ? " cursor-not-allowed opacity-60" : ""}`;
|
|
2470
|
-
return r ? /* @__PURE__ */
|
|
3113
|
+
return r ? /* @__PURE__ */ G("div", {
|
|
2471
3114
|
className: _,
|
|
2472
3115
|
"aria-disabled": "true",
|
|
2473
3116
|
title: i,
|
|
2474
3117
|
children: g
|
|
2475
|
-
}) : t ? /* @__PURE__ */
|
|
3118
|
+
}) : t ? /* @__PURE__ */ G(He, {
|
|
2476
3119
|
to: t,
|
|
2477
3120
|
className: _,
|
|
2478
3121
|
children: g
|
|
2479
|
-
}) : n ? /* @__PURE__ */
|
|
3122
|
+
}) : n ? /* @__PURE__ */ G("button", {
|
|
2480
3123
|
type: "button",
|
|
2481
3124
|
onClick: n,
|
|
2482
3125
|
className: e("w-full", _),
|
|
2483
3126
|
children: g
|
|
2484
|
-
}) : /* @__PURE__ */
|
|
3127
|
+
}) : /* @__PURE__ */ G("div", {
|
|
2485
3128
|
className: _,
|
|
2486
3129
|
children: g
|
|
2487
3130
|
});
|
|
2488
3131
|
}
|
|
2489
3132
|
//#endregion
|
|
2490
3133
|
//#region src/bento/bento-version-rail.tsx
|
|
2491
|
-
function
|
|
2492
|
-
let { t: a, i18n: o } =
|
|
3134
|
+
function gr({ versions: t, selected: n, onSelect: r, label: i }) {
|
|
3135
|
+
let { t: a, i18n: o } = q(), [s, c] = U(0), [l, u] = U([]), d = H(/* @__PURE__ */ new Map()), f = (e) => [...e].sort((e, n) => t.findIndex((e) => e.id === n) - t.findIndex((t) => t.id === e));
|
|
2493
3136
|
function p(e) {
|
|
2494
3137
|
if (n.includes(e)) {
|
|
2495
3138
|
u(l.filter((t) => t !== e)), r(n.filter((t) => t !== e));
|
|
@@ -2537,15 +3180,15 @@ function Dn({ versions: t, selected: n, onSelect: r, label: i }) {
|
|
|
2537
3180
|
}).format(t)
|
|
2538
3181
|
};
|
|
2539
3182
|
};
|
|
2540
|
-
return /* @__PURE__ */
|
|
3183
|
+
return /* @__PURE__ */ G("ul", {
|
|
2541
3184
|
role: "listbox",
|
|
2542
3185
|
"aria-label": i ?? a("bento.versions.label", { defaultValue: "Versions" }),
|
|
2543
3186
|
"aria-multiselectable": "true",
|
|
2544
3187
|
"data-slot": "bento-version-rail",
|
|
2545
3188
|
className: "m-0 flex list-none flex-col gap-1 p-0",
|
|
2546
3189
|
children: t.map((r, i) => {
|
|
2547
|
-
let o = n.includes(r.id), l = g(r.at), u = r.actor === "agent" ?
|
|
2548
|
-
return /* @__PURE__ */
|
|
3190
|
+
let o = n.includes(r.id), l = g(r.at), u = r.actor === "agent" ? Me : Ie, f = o ? "text-foreground/80" : "text-muted-foreground";
|
|
3191
|
+
return /* @__PURE__ */ K("li", {
|
|
2549
3192
|
ref: (e) => {
|
|
2550
3193
|
e ? d.current.set(i, e) : d.current.delete(i);
|
|
2551
3194
|
},
|
|
@@ -2558,26 +3201,26 @@ function Dn({ versions: t, selected: n, onSelect: r, label: i }) {
|
|
|
2558
3201
|
},
|
|
2559
3202
|
className: e("flex cursor-pointer flex-col gap-0.5 rounded-xl border px-3 py-2 text-sm outline-none transition-colors", "focus-visible:ring-2 focus-visible:ring-ring", o ? "border-primary/50 bg-primary/10" : "border-transparent hover:bg-muted/50"),
|
|
2560
3203
|
children: [
|
|
2561
|
-
/* @__PURE__ */
|
|
3204
|
+
/* @__PURE__ */ K("span", {
|
|
2562
3205
|
className: "flex items-center gap-1.5 font-medium",
|
|
2563
3206
|
children: [
|
|
2564
|
-
/* @__PURE__ */
|
|
3207
|
+
/* @__PURE__ */ G(u, {
|
|
2565
3208
|
size: 14,
|
|
2566
3209
|
"aria-hidden": "true"
|
|
2567
3210
|
}),
|
|
2568
3211
|
r.author,
|
|
2569
|
-
/* @__PURE__ */
|
|
2570
|
-
className: "text-xs font-normal
|
|
3212
|
+
/* @__PURE__ */ G("span", {
|
|
3213
|
+
className: e("text-xs font-normal", f),
|
|
2571
3214
|
children: r.actor === "agent" ? a("bento.versions.agent", { defaultValue: "Agent" }) : a("bento.versions.human", { defaultValue: "Person" })
|
|
2572
3215
|
})
|
|
2573
3216
|
]
|
|
2574
3217
|
}),
|
|
2575
|
-
/* @__PURE__ */
|
|
3218
|
+
/* @__PURE__ */ G("time", {
|
|
2576
3219
|
dateTime: l.iso,
|
|
2577
|
-
className: "text-xs
|
|
3220
|
+
className: e("text-xs", f),
|
|
2578
3221
|
children: l.text
|
|
2579
3222
|
}),
|
|
2580
|
-
r.summary && /* @__PURE__ */
|
|
3223
|
+
r.summary && /* @__PURE__ */ G("span", {
|
|
2581
3224
|
className: "text-xs",
|
|
2582
3225
|
children: r.summary
|
|
2583
3226
|
})
|
|
@@ -2587,4 +3230,4 @@ function Dn({ versions: t, selected: n, onSelect: r, label: i }) {
|
|
|
2587
3230
|
});
|
|
2588
3231
|
}
|
|
2589
3232
|
//#endregion
|
|
2590
|
-
export {
|
|
3233
|
+
export { fr as AdaptiveSectionCard, fn as BENTO_EMPHASIS_NEXT, dn as BENTO_EMPHASIS_SPAN, Zn as BENTO_SHELL_SHORTCUTS, ft as BENTO_TONES, dt as BENTO_TONE_CLASS, ut as BentoActionsMenu, vt as BentoBackLink, Wn as BentoBackToTop, ln as BentoCalendar, Dt as BentoChangeMark, Jn as BentoCommandPalette, pt as BentoCountTile, gt as BentoDataTable, jt as BentoDiff, _t as BentoEmptyState, Tt as BentoEntityShell, hn as BentoEntityTile, bn as BentoFilterBar, Ln as BentoFormHero, zn as BentoFormSection, yt as BentoHero, bt as BentoHeroIconPicker, xt as BentoInlineEdit, Tn as BentoListPage, cr as BentoNavRail, rr as BentoPaletteTrigger, Bn as BentoPanel, Pn as BentoSaveBar, In as BentoScrollSaveBar, mr as BentoSection, Yn as BentoShell, ir as BentoShortcutsDialog, tn as BentoSplitPage, St as BentoStatusMarker, hr as BentoTile, En as BentoTileGrid, ur as BentoUserMenu, gr as BentoVersionRail, gn as EMPTY_FILTERS, Y as bentoChipClass, Gn as bentoNavTarget, pn as resolveBentoLayout, mn as toBentoLayoutEntries, Ct as useBentoScrollFade, nr as useBentoShellShortcuts };
|