@viglet/viglet-design-system 2026.3.9 → 2026.3.10
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 +213 -16
- package/dist/badge-locale-Bij94NwL.cjs +1 -0
- package/dist/{badge-locale-CoEEv7s5.js → badge-locale-Du41PpLA.js} +183 -231
- package/dist/bento/bento-command-palette.d.ts +47 -12
- package/dist/bento/bento-command-palette.d.ts.map +1 -1
- package/dist/bento/bento-form-section.d.ts +7 -1
- package/dist/bento/bento-form-section.d.ts.map +1 -1
- package/dist/bento/bento-inline-edit.d.ts.map +1 -1
- package/dist/bento/bento-nav-rail.d.ts.map +1 -1
- package/dist/bento/bento-nav.d.ts +10 -2
- package/dist/bento/bento-nav.d.ts.map +1 -1
- package/dist/bento/bento-section-chrome.d.ts +5 -0
- package/dist/bento/bento-section-chrome.d.ts.map +1 -1
- package/dist/bento/bento-status-marker.d.ts.map +1 -1
- package/dist/bento/bento-tile.d.ts.map +1 -1
- package/dist/bento/index.d.ts +1 -1
- package/dist/bento/index.d.ts.map +1 -1
- package/dist/bento.cjs +1 -1
- package/dist/bento.es.js +464 -404
- package/dist/{breadcrumb.context-KQut7j8U.js → breadcrumb.context-BssgEydx.js} +229 -220
- package/dist/breadcrumb.context-DLsiMS59.cjs +1 -0
- package/dist/components/app-switcher.d.ts.map +1 -1
- package/dist/components/badge-colorful.d.ts +9 -0
- package/dist/components/badge-colorful.d.ts.map +1 -1
- package/dist/components/login/login.d.ts.map +1 -1
- package/dist/components/router/index.d.ts +1 -1
- package/dist/components/router/index.d.ts.map +1 -1
- package/dist/components/router/sub.page.d.ts.map +1 -1
- package/dist/components/startup-first/startup-first.d.ts.map +1 -1
- package/dist/components/ui/floating-formulas-bg.d.ts.map +1 -1
- package/dist/components/ui/glass-card.d.ts +10 -5
- package/dist/components/ui/glass-card.d.ts.map +1 -1
- package/dist/components/ui/icon-picker-dialog.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +6 -4
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +14 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/pulse-ring.d.ts.map +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sonner.d.ts +12 -0
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/stepper.d.ts.map +1 -1
- package/dist/components/ui/viglet-assistant.d.ts +60 -0
- package/dist/components/ui/viglet-assistant.d.ts.map +1 -0
- package/dist/components/ui/viglet-avatar.d.ts +42 -0
- package/dist/components/ui/viglet-avatar.d.ts.map +1 -0
- package/dist/exports.json +24 -5
- package/dist/floating-formulas-bg.cjs +1 -1
- package/dist/floating-formulas-bg.es.js +56 -55
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/use-assistant-notifications.d.ts +15 -0
- package/dist/hooks/use-assistant-notifications.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +74 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/locales/en/assistant.json.d.ts +22 -0
- package/dist/i18n/locales/en/bento.json.d.ts +3 -1
- package/dist/i18n/locales/en/common.json.d.ts +6 -1
- package/dist/i18n/locales/en/language.json.d.ts +8 -0
- package/dist/i18n/locales/pt/assistant.json.d.ts +22 -0
- package/dist/i18n/locales/pt/bento.json.d.ts +3 -1
- package/dist/i18n/locales/pt/common.json.d.ts +6 -1
- package/dist/i18n/locales/pt/language.json.d.ts +8 -0
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.es.js +478 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1311 -698
- package/dist/loading-provider-B6-R2ONB.cjs +1 -0
- package/dist/{loading-provider-BWWhhfEn.js → loading-provider-E3fbcekM.js} +24 -23
- package/dist/router.cjs +1 -1
- package/dist/router.es.js +4 -4
- package/dist/{user.context-D1PxP4D4.js → user.context-CPmUBBLa.js} +97 -87
- package/dist/user.context-xsJgPpcO.cjs +1 -0
- package/dist/utils-Fk5jmzzb.js +41 -0
- package/dist/utils-Oagwe_oa.cjs +1 -0
- package/dist/viglet-design-system.css +1 -1
- package/dist/vite/boot-loader.d.ts +33 -2
- package/dist/vite/boot-loader.d.ts.map +1 -1
- package/dist/vite.cjs +16 -5
- package/dist/vite.es.js +27 -14
- package/docs/BENTO-AUTHORING.md +20 -2
- package/docs/reference/grounds.dc.html +9 -9
- package/package.json +4 -3
- package/dist/badge-locale-hQyWhAKe.cjs +0 -7
- package/dist/breadcrumb.context-Vwc3lAlf.cjs +0 -1
- package/dist/i18n-DD3rQOWi.js +0 -426
- package/dist/i18n-DrBq-qJJ.cjs +0 -1
- package/dist/loading-provider-CmeMqLGk.cjs +0 -1
- package/dist/user.context-B9vIBzY5.cjs +0 -1
|
@@ -1,4 +1,39 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
1
2
|
import { BentoNavItem } from './bento-nav';
|
|
3
|
+
/** One result a product's own search returned. */
|
|
4
|
+
export interface BentoCommandPaletteResult {
|
|
5
|
+
id: string;
|
|
6
|
+
/** Already the word a reader sees: the product owns these, not the bundles here. */
|
|
7
|
+
label: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
icon?: ComponentType<{
|
|
10
|
+
size?: number;
|
|
11
|
+
className?: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A group of results the product fills for the query as typed (VDS123).
|
|
16
|
+
*
|
|
17
|
+
* The palette does not match these and never reorders them. The product asked
|
|
18
|
+
* its own source, that source ranked the answer by relevance it understands, and
|
|
19
|
+
* a substring match in the client would only undo that — which is why a consumer
|
|
20
|
+
* whose results come from an engine owning the query could not use this
|
|
21
|
+
* component at all.
|
|
22
|
+
*/
|
|
23
|
+
export interface BentoCommandPaletteGroup {
|
|
24
|
+
/** Heading for the group, already translated. */
|
|
25
|
+
label: string;
|
|
26
|
+
/** The answer to the current query, in the order the source gave it. */
|
|
27
|
+
items: BentoCommandPaletteResult[];
|
|
28
|
+
/**
|
|
29
|
+
* Whether the product is still resolving the query. A query that leaves the
|
|
30
|
+
* process takes time, and an empty list that is not empty yet reads as "no
|
|
31
|
+
* matches".
|
|
32
|
+
*/
|
|
33
|
+
pending?: boolean;
|
|
34
|
+
/** Called with the item the reader chose; the palette closes either way. */
|
|
35
|
+
onSelect: (item: BentoCommandPaletteResult) => void;
|
|
36
|
+
}
|
|
2
37
|
export interface BentoCommandPaletteProps {
|
|
3
38
|
open: boolean;
|
|
4
39
|
onOpenChange: (open: boolean) => void;
|
|
@@ -12,17 +47,17 @@ export interface BentoCommandPaletteProps {
|
|
|
12
47
|
* surfaces inside another's.
|
|
13
48
|
*/
|
|
14
49
|
items: BentoNavItem[];
|
|
50
|
+
/**
|
|
51
|
+
* A second group, whose items the product supplies per query. Omit it and the
|
|
52
|
+
* palette is exactly the nav launcher it was.
|
|
53
|
+
*/
|
|
54
|
+
group?: BentoCommandPaletteGroup;
|
|
55
|
+
/**
|
|
56
|
+
* The query as typed, so the product can answer it. Called on every change and
|
|
57
|
+
* once with `""` when the palette reopens, which is the moment a product drops
|
|
58
|
+
* the previous answer.
|
|
59
|
+
*/
|
|
60
|
+
onQueryChange?: (query: string) => void;
|
|
15
61
|
}
|
|
16
|
-
|
|
17
|
-
* The Bento `⌘K` command palette (T549) — a keyboard-first launcher over
|
|
18
|
-
* every navigable area. Built on the Radix `Dialog` primitive (zero extra
|
|
19
|
-
* deps): a filter box + a flat, arrow-key-navigable result list. Migrated
|
|
20
|
-
* surfaces navigate inside the bento shell; not-yet-migrated areas link out
|
|
21
|
-
* to the console (marked with an external-link glyph) so the palette reaches
|
|
22
|
-
* everything during the migration.
|
|
23
|
-
*
|
|
24
|
-
* Global open/close (⌘K / Ctrl+K) is owned by the parent shell; this
|
|
25
|
-
* component only renders and drives selection while `open`.
|
|
26
|
-
*/
|
|
27
|
-
export declare function BentoCommandPalette({ open, onOpenChange, items }: Readonly<BentoCommandPaletteProps>): import("react").JSX.Element;
|
|
62
|
+
export declare function BentoCommandPalette({ open, onOpenChange, items, group, onQueryChange, }: Readonly<BentoCommandPaletteProps>): import("react").JSX.Element;
|
|
28
63
|
//# sourceMappingURL=bento-command-palette.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-command-palette.d.ts","sourceRoot":"","sources":["../../src/bento/bento-command-palette.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bento-command-palette.d.ts","sourceRoot":"","sources":["../../src/bento/bento-command-palette.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAwC,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAGjF,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhE,kDAAkD;AAClD,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7D;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,wBAAwB;IACvC,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,KAAK,EAAE,yBAAyB,EAAE,CAAC;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4EAA4E;IAC5E,QAAQ,EAAE,CAAC,IAAI,EAAE,yBAAyB,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC;;;;;;;;OAQG;IACH,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,wBAAwB,CAAC;IACjC;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAqED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,KAAK,EACL,aAAa,GACd,EAAE,QAAQ,CAAC,wBAAwB,CAAC,+BA8MpC"}
|
|
@@ -16,6 +16,12 @@ export interface BentoFormSectionProps {
|
|
|
16
16
|
children: ReactNode;
|
|
17
17
|
/** Optional trailing slot in the header (badges, status pill, etc.). */
|
|
18
18
|
trailing?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Merged onto the frosted surface. A shared form reaches this through
|
|
21
|
+
* `AdaptiveSectionCard`, whose whole job is that the same node is styled the
|
|
22
|
+
* same way in either chrome (VDS111).
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
19
25
|
}
|
|
20
26
|
/**
|
|
21
27
|
* Frosted-glass section wrapper for Bento forms — the form-page
|
|
@@ -27,5 +33,5 @@ export interface BentoFormSectionProps {
|
|
|
27
33
|
* inside `children`, so existing FormField/Input/Select/Switch
|
|
28
34
|
* components are reused without modification.
|
|
29
35
|
*/
|
|
30
|
-
export declare function BentoFormSection({ icon: Icon, tone, title, description, children, trailing, as: Heading, }: Readonly<BentoFormSectionProps>): import("react").JSX.Element;
|
|
36
|
+
export declare function BentoFormSection({ icon: Icon, tone, title, description, children, trailing, as: Heading, className, }: Readonly<BentoFormSectionProps>): import("react").JSX.Element;
|
|
31
37
|
//# sourceMappingURL=bento-form-section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-form-section.d.ts","sourceRoot":"","sources":["../../src/bento/bento-form-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"bento-form-section.d.ts","sourceRoot":"","sources":["../../src/bento/bento-form-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAItD,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/D,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvC,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EAAE,IAAI,EACV,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,EAAE,EAAE,OAAc,EAClB,SAAS,GACV,EAAE,QAAQ,CAAC,qBAAqB,CAAC,+BAyBjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-inline-edit.d.ts","sourceRoot":"","sources":["../../src/bento/bento-inline-edit.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bento-inline-edit.d.ts","sourceRoot":"","sources":["../../src/bento/bento-inline-edit.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,2FAA2F;IAC3F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2JAA2J;IAC3J,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,MAAM,EACN,SAAiB,EACjB,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAiB,EACjB,QAAgB,EAChB,cAAsB,GACvB,EAAE,QAAQ,CAAC,oBAAoB,CAAC,+BAyKhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-nav-rail.d.ts","sourceRoot":"","sources":["../../src/bento/bento-nav-rail.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"bento-nav-rail.d.ts","sourceRoot":"","sources":["../../src/bento/bento-nav-rail.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAmB,MAAM,aAAa,CAAC;AAmClE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,SAAS,EACT,WAAW,EACX,SAAS,GACV,EAAE,QAAQ,CAAC,iBAAiB,CAAC,+BA4C7B"}
|
|
@@ -25,11 +25,19 @@ import { BentoTone } from './bento-tones';
|
|
|
25
25
|
export type BentoNavSectionId = string;
|
|
26
26
|
export interface BentoNavSection {
|
|
27
27
|
id: BentoNavSectionId;
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* i18n key for the section label. A section with none is named by its
|
|
30
|
+
* {@link BentoNavSection.id} on the nav rail, where the link is an icon and
|
|
31
|
+
* has nothing else to announce.
|
|
32
|
+
*/
|
|
29
33
|
labelKey?: string;
|
|
30
34
|
/** i18n key for the section description, shown on a hub. */
|
|
31
35
|
descriptionKey?: string;
|
|
32
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Icon shown for this section on the nav rail. A section with none still
|
|
38
|
+
* appears there — the rail draws a grid, for the mosaic its hub renders —
|
|
39
|
+
* because the route is what the rail exists to reach.
|
|
40
|
+
*/
|
|
33
41
|
icon?: TablerIcon;
|
|
34
42
|
/**
|
|
35
43
|
* The section's hub page. The rail links here and the hub renders every
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-nav.d.ts","sourceRoot":"","sources":["../../src/bento/bento-nav.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,iBAAiB,CAAC;IACtB
|
|
1
|
+
{"version":3,"file":"bento-nav.d.ts","sourceRoot":"","sources":["../../src/bento/bento-nav.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,iBAAiB,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,+BAA+B;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,qEAAqE;AACrE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,eAAe,CAAC;IACzB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAEzD"}
|
|
@@ -34,6 +34,11 @@ export interface AdaptiveSectionCardProps {
|
|
|
34
34
|
variant?: ColorVariant;
|
|
35
35
|
/** Console chrome only — the frosted section does not collapse. */
|
|
36
36
|
defaultOpen?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Merged onto whichever surface renders. `defaultOpen` above is the prop that
|
|
39
|
+
* only one chrome has; this one survives the switch, which is the difference
|
|
40
|
+
* the wrapper exists to hide (VDS111).
|
|
41
|
+
*/
|
|
37
42
|
className?: string;
|
|
38
43
|
children?: ReactNode;
|
|
39
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-section-chrome.d.ts","sourceRoot":"","sources":["../../src/bento/bento-section-chrome.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAK9E;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAIhD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,QAAQ,GACT,EAAE,QAAQ,CAAC;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC,+BAI1D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD;AAyBD,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,mEAAmE;IACnE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,mBAAmB,CAAC,EAC3B,OAAgB,EAChB,WAAW,EACX,SAAS,EACT,QAAQ,GACT,EAAE,QAAQ,CAAC,wBAAwB,CAAC,+
|
|
1
|
+
{"version":3,"file":"bento-section-chrome.d.ts","sourceRoot":"","sources":["../../src/bento/bento-section-chrome.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAK9E;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAIhD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,QAAQ,GACT,EAAE,QAAQ,CAAC;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC,+BAI1D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD;AAyBD,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,mEAAmE;IACnE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,mBAAmB,CAAC,EAC3B,OAAgB,EAChB,WAAW,EACX,SAAS,EACT,QAAQ,GACT,EAAE,QAAQ,CAAC,wBAAwB,CAAC,+BAuCpC;kBA5CQ,mBAAmB;;;;;AAkD5B,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-status-marker.d.ts","sourceRoot":"","sources":["../../src/bento/bento-status-marker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bento-status-marker.d.ts","sourceRoot":"","sources":["../../src/bento/bento-status-marker.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kEAAkE;IAClE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,QAAQ,CAAC,sBAAsB,CAAC,sCA2BrG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-tile.d.ts","sourceRoot":"","sources":["../../src/bento/bento-tile.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"bento-tile.d.ts","sourceRoot":"","sources":["../../src/bento/bento-tile.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtD,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B,oFAAoF;IACpF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvC,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EACxB,EAAE,EACF,OAAO,EACP,QAAgB,EAChB,YAAY,EACZ,IAAI,EAAE,IAAI,EACV,IAAI,EACJ,OAAO,EACP,KAAK,EACL,IAAI,EACJ,QAAgB,EAChB,QAAQ,GACT,EAAE,QAAQ,CAAC,cAAc,CAAC,+BAoF1B"}
|
package/dist/bento/index.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export { BentoFormHero, type BentoFormHeroProps } from './bento-form-hero';
|
|
|
42
42
|
export { BentoFormSection, type BentoFormSectionProps } from './bento-form-section';
|
|
43
43
|
export { BentoPanel, type BentoPanelProps } from './bento-panel';
|
|
44
44
|
export { BentoBackToTop } from './bento-back-to-top';
|
|
45
|
-
export { BentoCommandPalette, type BentoCommandPaletteProps } from './bento-command-palette';
|
|
45
|
+
export { BentoCommandPalette, type BentoCommandPaletteGroup, type BentoCommandPaletteProps, type BentoCommandPaletteResult, } from './bento-command-palette';
|
|
46
46
|
export { BentoShortcutsDialog, type BentoShortcutsDialogProps } from './bento-shortcuts-dialog';
|
|
47
47
|
export { BentoNavRail, type BentoNavRailProps } from './bento-nav-rail';
|
|
48
48
|
export { BentoUserMenu, type BentoUserMenuProps } from './bento-user-menu';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bento/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,OAAO,EAAE,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,KAAK,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACrI,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,mBAAmB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,aAAa,EACb,KAAK,kBAAkB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bento/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,OAAO,EAAE,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,KAAK,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACrI,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,mBAAmB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,aAAa,EACb,KAAK,kBAAkB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EACL,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,yBAAyB,EACzB,KAAK,aAAa,EAClB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,KAAK,SAAS,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,MAAM,gBAAgB,CAAC"}
|
package/dist/bento.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./badge-locale-hQyWhAKe.cjs"),t=require("./user.context-B9vIBzY5.cjs"),n=require("./loading-provider-CmeMqLGk.cjs");let r=require("react"),i=require("react/jsx-runtime"),a=require("react-i18next"),o=require("@tabler/icons-react"),s=require("@iconify/react"),c=require("react-router-dom"),l=require("@dnd-kit/core"),u=require("@dnd-kit/sortable"),d=require("@dnd-kit/utilities"),f=require("sonner");var p={default:``,destructive:`bento-item-danger`};function m({actions:t,triggerLabel:n}){let{t:r}=(0,a.useTranslation)();return t.length===0?null:(0,i.jsxs)(e.f,{children:[(0,i.jsx)(e.E,{asChild:!0,children:(0,i.jsx)(`button`,{type:`button`,"aria-label":n??r(`forms.formActions.moreActions`,{defaultValue:`More actions`}),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`,children:(0,i.jsx)(o.IconDotsVertical,{size:18})})}),(0,i.jsx)(e.m,{align:`end`,sideOffset:8,className:`bento-dropdown min-w-44 p-1.5`,children:t.map(t=>{let n=t.icon,r=p[t.tone??`default`];return(0,i.jsxs)(e.g,{onSelect:t.onSelect,disabled:t.disabled,className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2 ${r}`,children:[(0,i.jsx)(n,{size:16}),t.label]},t.label)})})]})}var h={blue:`bento-tone-blue`,indigo:`bento-tone-indigo`,violet:`bento-tone-violet`,emerald:`bento-tone-emerald`,amber:`bento-tone-amber`,rose:`bento-tone-rose`,slate:`bento-tone-slate`},g=Object.keys(h);function _(e){return`bento-chip ${h[e]??h.slate}`}function v({to:e,icon:t,tone:n,label:r,count:a,span:o}){let s=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`span`,{className:`grid h-9 w-9 place-items-center rounded-2xl text-white shadow-md ${_(n)}`,children:(0,i.jsx)(t,{size:18})}),(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`div`,{className:`text-3xl font-semibold tabular-nums tracking-tight`,children:a}),(0,i.jsx)(`div`,{className:`text-[11px] uppercase tracking-wider text-muted-foreground`,children:r})]})]}),l=`bento-tile bento-glass group relative flex flex-col justify-between overflow-hidden p-4 ${o}${e?` bento-tile-clickable`:``}`;return e?(0,i.jsx)(c.Link,{to:e,className:l,children:s}):(0,i.jsx)(`div`,{className:l,children:s})}function y({icon:t=o.IconSparkles,tone:n=`indigo`,title:r,description:a,action:s,align:c=`center`,className:l}){let u=_(n),d=c===`center`;return(0,i.jsxs)(`div`,{className:e.U(`bento-tile bento-glass flex flex-col gap-3 rounded-3xl p-8`,d?`items-center text-center`:`items-start text-left`,l),children:[(0,i.jsx)(`span`,{className:`grid h-12 w-12 place-items-center rounded-2xl ${u} text-white shadow-md`,children:(0,i.jsx)(t,{size:24})}),(0,i.jsx)(`div`,{className:`text-lg font-semibold tracking-tight`,children:r}),a&&(0,i.jsx)(`p`,{className:e.U(`max-w-md text-sm text-muted-foreground`,d&&`mx-auto`),children:a}),s&&(0,i.jsx)(`div`,{className:e.U(`mt-1`,d&&`mx-auto`),children:s})]})}function b({to:e,children:t}){return(0,i.jsxs)(c.Link,{to:e,className:`inline-flex items-center gap-1 hover:text-foreground`,children:[(0,i.jsx)(o.IconArrowLeft,{size:14,"aria-hidden":!0}),t]})}function x({eyebrow:e,backTo:t,backLabel:n,title:r,subtitle:a,leading:o,trailing:s}){let c=e??(t==null?null:(0,i.jsx)(b,{to:t,children:n}));return(0,i.jsx)(`header`,{className:`bento-shell-header mb-6 flex flex-col items-start gap-3 md:mb-10`,children:(0,i.jsxs)(`div`,{className:`flex w-full items-start gap-4`,children:[o&&(0,i.jsx)(`div`,{className:`shrink-0`,children:o}),(0,i.jsxs)(`div`,{className:`flex flex-1 flex-col gap-1`,children:[c&&(0,i.jsx)(`span`,{className:`text-xs uppercase tracking-[0.18em] text-muted-foreground`,children:c}),(0,i.jsx)(`h1`,{className:`text-3xl font-semibold tracking-tight md:text-4xl`,children:r}),a&&(0,i.jsx)(`p`,{className:`max-w-2xl text-sm text-muted-foreground`,children:a})]}),s&&(0,i.jsx)(`div`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:s})]})})}function S({value:e,onChange:n,onClear:c,defaultIcon:l,tone:u,title:d,description:f,readOnly:p=!1}){let{t:m}=(0,a.useTranslation)(),[h,g]=(0,r.useState)(!1);return p?(0,i.jsx)(`span`,{className:`grid h-12 w-12 place-items-center rounded-2xl ${_(u)} text-white shadow-md`,children:e?(0,i.jsx)(s.Icon,{icon:e,className:`size-6 text-white`}):(0,i.jsx)(l,{size:24})}):(0,i.jsxs)(`div`,{className:`group relative`,children:[(0,i.jsxs)(`button`,{type:`button`,onClick:()=>g(!0),"aria-label":m(`forms.iconPicker.chooseAnIcon`),className:`group/icon relative grid h-12 w-12 cursor-pointer place-items-center overflow-hidden rounded-2xl ${_(u)} 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`,children:[e?(0,i.jsx)(s.Icon,{icon:e,className:`size-6 text-white`}):(0,i.jsx)(l,{size:24}),(0,i.jsx)(`span`,{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`,children:(0,i.jsx)(o.IconPalette,{className:`size-5 text-white`})})]}),e&&c&&(0,i.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),c()},"aria-label":m(`forms.common.remove`),title:m(`forms.common.remove`),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`,children:(0,i.jsx)(o.IconX,{size:12})}),(0,i.jsx)(t.s,{open:h,onOpenChange:g,value:e,onSelect:n,onClear:c,title:d,description:f})]})}function C({value:t,onSave:n,multiline:o=!1,placeholder:s,className:c=``,ariaLabel:l,autoFocus:u=!1,readOnly:d=!1,commitOnChange:f=!1}){let{t:p}=(0,a.useTranslation)(),[m,h]=(0,r.useState)(u),[g,_]=(0,r.useState)(t),[v,y]=(0,r.useState)(!1),b=(0,r.useRef)(null),[x,S]=(0,r.useState)(t);!m&&t!==x&&(S(t),_(t)),(0,r.useEffect)(()=>{m&&b.current&&(b.current.focus(),b.current.select())},[m]);async function C(){let e=g.trim();if(e===t){h(!1);return}if(!e&&!s){_(t),h(!1);return}y(!0);try{await n(e)}catch{_(t)}finally{y(!1),h(!1)}}function w(){_(t),h(!1)}function T(e){_(e),f&&n(e)}let E=!t;if(d)return(0,i.jsx)(`span`,{className:`block w-full ${c}`,"aria-label":l,children:t||(0,i.jsx)(`span`,{className:`text-muted-foreground/80`,children:s??`—`})});let D=`w-full bg-transparent outline-none border-b transition-colors duration-200 ${c}`,O=`${D} cursor-text rounded-sm ${E?`border-dashed border-border/70 hover:border-foreground/40`:`border-transparent hover:border-border/60 focus-visible:border-border/80`} ${v?`opacity-60`:``}`,k=`${D} bento-editing`;if(!m)return(0,i.jsx)(`button`,{type:`button`,onClick:()=>h(!0),className:`${O} text-left`,"aria-label":l??p(`forms.formActions.edit`),disabled:v,children:t||(0,i.jsx)(`span`,{className:`text-muted-foreground/80`,children:s??`—`})});function A(e){if(e.key===`Escape`){e.preventDefault(),w();return}e.key===`Enter`&&(!o||e.metaKey||e.ctrlKey)&&(e.preventDefault(),C())}return o?(0,i.jsx)(`textarea`,{ref:b,value:g,onChange:e=>T(e.target.value),onBlur:C,onKeyDown:A,placeholder:s,"aria-label":l,rows:3,className:`${k} resize-none py-0.5 leading-snug`}):(0,i.jsx)(e.l,{ref:b,value:g,onChange:e=>T(e.target.value),onBlur:C,onKeyDown:A,placeholder:s,"aria-label":l,className:`${k} h-auto px-0 py-0 shadow-none focus-visible:ring-0`})}function w({titleMissing:e,dirty:t,className:n}){let{t:r}=(0,a.useTranslation)();if(!e&&!t)return null;let s=`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] font-medium normal-case leading-none tracking-normal`;return e?(0,i.jsxs)(`span`,{className:`${s} bento-status bento-status-error ${n??``}`,children:[(0,i.jsx)(o.IconAlertTriangle,{className:`size-3`}),r(`bento.saveBar.titleRequired`,{defaultValue:`Title required`})]}):(0,i.jsxs)(`span`,{className:`${s} bento-status bento-status-warn ${n??``}`,children:[(0,i.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bento-status-dot bento-pulse`}),r(`bento.saveBar.unsaved`,{defaultValue:`Unsaved changes`})]})}function T(e){(0,r.useEffect)(()=>{let t=e.current;if(!t)return;let n=document.documentElement,r=0,i=()=>{r=0;let e=t.getBoundingClientRect().top,i=Math.max(0,Math.min(1,(160-e)/80));n.style.setProperty(`--bento-fade`,String(i)),n.classList.toggle(`bento-fade-half`,i>.5)},a=()=>{r||=requestAnimationFrame(i)};return i(),window.addEventListener(`scroll`,a,{passive:!0}),window.addEventListener(`resize`,a),()=>{r&&cancelAnimationFrame(r),window.removeEventListener(`scroll`,a),window.removeEventListener(`resize`,a),n.style.removeProperty(`--bento-fade`),n.classList.remove(`bento-fade-half`)}},[e])}function E(e,t){let n={};for(let r of Object.keys(e))Object.assign(n,{[r]:t[r]});return n}function D({entity:t,isNew:s,headlineFallback:l,eyebrow:u,listRoute:d,icon:p,tone:h,formId:g,feature:_,hasStatus:v=!1,hideIcon:y=!1,readOnly:D=!1,autosaveOnly:O=!1,badge:k,notice:A,onUpdate:j,onDelete:M,extraActions:N,children:P}){let{t:F}=(0,a.useTranslation)(),I=(0,c.useNavigate)(),[L,R]=(0,r.useState)(!1),[z,B]=(0,r.useState)({isDirty:!1,isSubmitting:!1}),V=(0,r.useRef)(null);T(V);let H={title:t.title??``,description:t.description??``,icon:t.icon??null,enabled:t.enabled??1},[U,W]=(0,r.useState)(H),[G,K]=(0,r.useState)(H);(H.title!==G.title||H.description!==G.description||H.icon!==G.icon||H.enabled!==G.enabled)&&(K(H),W(H));async function q(e){if(W(t=>({...t,...e})),s||!j)return;let n=e.title??U.title;try{await j({...t,...e}),f.toast.success(F(`forms.common.updated`,{name:n,feature:_}))}catch(t){console.error(`Failed to update entity field`,t),W(t=>({...t,...E(e,H)})),f.toast.error(F(`forms.common.notUpdated`,{name:H.title||n,feature:_}))}}async function ee(){if(M){try{await M()?(f.toast.success(F(`forms.common.deleted`,{name:U.title,feature:_})),I(d)):f.toast.error(F(`forms.common.notDeleted`,{name:U.title,feature:_}))}catch(e){console.error(`Failed to delete entity`,e),f.toast.error(F(`forms.common.notDeleted`,{name:U.title,feature:_}))}R(!1)}}let J=U.enabled===1,te=!D,ne=!(O&&!s),Y=!U.title.trim(),X=!s&&!z.isDirty,re=Y||X,Z=[...N??[],...M&&!D?[{label:F(`forms.formActions.delete`),icon:o.IconTrash,tone:`destructive`,onSelect:()=>R(!0)}]:[]];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x,{eyebrow:(0,i.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,i.jsx)(b,{to:d,children:u}),!D&&(0,i.jsx)(w,{titleMissing:Y,dirty:s||z.isDirty})]}),leading:(0,i.jsx)(S,{value:U.icon,onChange:e=>q({icon:e}),onClear:()=>q({icon:null}),defaultIcon:p,tone:h,title:U.title,description:U.description,readOnly:D||y}),title:(0,i.jsx)(C,{value:U.title,onSave:e=>q({title:e}),placeholder:l,className:`text-3xl font-semibold tracking-tight md:text-4xl`,ariaLabel:F(`forms.common.title`),autoFocus:s,commitOnChange:s,readOnly:D}),subtitle:(0,i.jsx)(C,{value:U.description,onSave:e=>q({description:e}),multiline:!0,placeholder:F(`forms.common.description`),className:`max-w-2xl text-sm text-muted-foreground`,ariaLabel:F(`forms.common.description`),commitOnChange:s,readOnly:D}),trailing:(0,i.jsxs)(i.Fragment,{children:[te&&(0,i.jsxs)(`div`,{className:`bento-fade-out flex shrink-0 items-center gap-2`,children:[ne&&(0,i.jsxs)(e.u,{type:`submit`,form:g,size:`sm`,loading:z.isSubmitting,disabled:re,children:[(0,i.jsx)(o.IconDeviceFloppy,{className:`size-4`}),F(`forms.formActions.saveChanges`)]}),(0,i.jsxs)(e.u,{type:`button`,size:`sm`,variant:`outline`,onClick:()=>I(d),children:[(0,i.jsx)(o.IconX,{className:`size-4`}),F(`forms.formActions.cancel`)]})]}),k,v&&(D?(0,i.jsxs)(`span`,{className:`flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[10px] uppercase tracking-wider ${J?`bento-status bento-status-on`:`border-border bg-muted text-muted-foreground`}`,children:[(0,i.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${J?`bento-status-dot bento-pulse`:`bg-muted-foreground/60`}`}),J?F(`common.active`,{defaultValue:`Active`}):F(`common.idle`,{defaultValue:`Idle`})]}):(0,i.jsxs)(`button`,{type:`button`,onClick:()=>q({enabled:+!J}),"aria-label":F(`forms.common.enabled`),title:F(J?`common.activeToggleHint`:`common.idleToggleHint`),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 ${J?`bento-status bento-status-on`:`border-border bg-muted text-muted-foreground hover:bg-muted/80`}`,children:[(0,i.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${J?`bento-status-dot bento-pulse`:`bg-muted-foreground/60`}`}),J?F(`common.active`,{defaultValue:`Active`}):F(`common.idle`,{defaultValue:`Idle`})]})),!s&&Z.length>0&&(0,i.jsx)(m,{actions:Z})]})}),(0,i.jsx)(`div`,{ref:V,"aria-hidden":!0,className:`h-px`}),A,!s&&M&&(0,i.jsx)(n.i,{feature:_,name:U.title,onDelete:ee,open:L,setOpen:R,trigger:(0,i.jsx)(`span`,{className:`hidden`,"aria-hidden":!0})}),P({staged:U,onStateChange:B})]})}var O={LARGE:`col-span-2 row-span-2 md:col-span-2 md:row-span-2 lg:col-span-2 lg:row-span-2`,MEDIUM:`col-span-2 row-span-1 md:col-span-2 md:row-span-1 lg:col-span-2 lg:row-span-1`,SMALL:`col-span-1 row-span-1`},k={SMALL:`MEDIUM`,MEDIUM:`LARGE`,LARGE:`SMALL`};function A(e,t,n){if(!n||n.length===0)return e.map((e,n)=>({item:e,key:t(e),emphasis:n===0?`LARGE`:`MEDIUM`}));let r=new Map,i=new Map;for(let e of n)r.set(e.itemId,e.displayOrder),i.set(e.itemId,e.emphasis);return e.map((e,n)=>({item:e,key:t(e),idx:n})).sort((e,t)=>{let n=r.has(e.key)?r.get(e.key):2**53-1,i=r.has(t.key)?r.get(t.key):2**53-1;return n===i?e.idx-t.idx:n-i}).map(({item:e,key:t})=>({item:e,key:t,emphasis:i.get(t)??`MEDIUM`}))}function j(e){return e.map((e,t)=>({itemId:e.key,emphasis:e.emphasis,displayOrder:t}))}function M({to:e,emphasis:t,featured:n,defaultIcon:r,icon:o,tone:l=`indigo`,title:u,description:d,meta:f,enabled:p,hasStatus:m=!1,viewTransitionName:h}){let{t:g}=(0,a.useTranslation)(),v=_(l),y=t??(n?`LARGE`:`MEDIUM`),b=y===`LARGE`,x=y===`SMALL`,S=O[y],C=p===1,w=b?`p-6 md:p-7`:x?`p-4`:`p-5`,T=b?`h-14 w-14`:x?`h-8 w-8`:`h-9 w-9`,E=b?28:x?16:18,D=b?`text-xl md:text-2xl`:x?`text-sm`:`text-base md:text-lg`;return(0,i.jsxs)(c.Link,{to:e,className:`bento-tile bento-tile-clickable bento-glass group relative flex flex-col ${b?`gap-5`:`gap-4`} overflow-hidden ${w} ${S}`,style:h?{viewTransitionName:h}:void 0,children:[b&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute -bottom-10 -right-10 h-64 w-64 rounded-full ${v} opacity-40 blur-2xl dark:opacity-50`}),(0,i.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute right-12 top-1/3 h-32 w-32 rounded-full ${v} bento-chip-tr opacity-20 blur-2xl dark:opacity-30`})]}),(0,i.jsxs)(`div`,{className:`relative z-1 flex items-center justify-between`,children:[(0,i.jsx)(`span`,{className:`grid place-items-center rounded-2xl ${v} text-white shadow-md ${T}`,children:o?(0,i.jsx)(s.Icon,{icon:o,className:b?`size-7 text-white`:`size-4.5 text-white`}):(0,i.jsx)(r,{size:E})}),m&&(0,i.jsxs)(`span`,{className:`flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-[10px] uppercase tracking-wider ${C?`bento-status bento-status-on`:`border-border bg-muted text-muted-foreground`}`,children:[(0,i.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${C?`bento-status-dot bento-pulse`:`bg-muted-foreground/60`}`}),C?g(`common.active`,{defaultValue:`Active`}):g(`common.idle`,{defaultValue:`Idle`})]})]}),(0,i.jsxs)(`div`,{className:`relative z-1`,children:[(0,i.jsx)(`div`,{className:`font-semibold tracking-tight ${D}`,children:u}),!x&&f&&(0,i.jsx)(`div`,{className:`mt-1 flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground`,children:f}),!x&&d&&(0,i.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:d})]})]})}var N=`bento-grid grid auto-rows-[minmax(140px,auto)] grid-cols-2 gap-4 md:grid-cols-4 md:gap-5 lg:grid-cols-6`;function P({items:e,error:s,tryAgainUrl:c,listId:l,eyebrow:u,backTo:d,backLabel:f,heroIcon:p,title:m,subtitle:h,tone:g=`indigo`,headerAction:v,newRoute:y,newLabel:b,newSubtitle:S,hideNew:C=!1,itemKey:w,renderTile:T,emptyTitle:E,emptyDescription:D,layout:O}){let{t:k}=(0,a.useTranslation)(),j=_(g),[M,N]=(0,r.useState)(!1),P=(0,r.useMemo)(()=>A(e??[],w,O?.data?.entries),[e,w,O?.data?.entries]),F=!!l&&!!O&&(e?.length??0)>0;return(0,i.jsxs)(n.t,{checkIsNotUndefined:e,error:s??null,tryAgainUrl:c,children:[(0,i.jsx)(x,{eyebrow:u,backTo:d,backLabel:f,leading:(0,i.jsx)(`span`,{className:`grid h-12 w-12 place-items-center rounded-2xl ${j} text-white shadow-md`,children:(0,i.jsx)(p,{size:24})}),title:m,subtitle:h}),(v||F&&!M)&&(0,i.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[v,F&&!M&&(0,i.jsxs)(t.c,{variant:`outline`,size:`sm`,onClick:()=>N(!0),className:`ml-auto gap-2`,children:[(0,i.jsx)(o.IconAdjustmentsHorizontal,{size:16}),k(`bento.layout.customize`,{defaultValue:`Customize layout`})]})]}),M&&l&&O?(0,i.jsx)(L,{layout:O,resolved:P,canEditGlobal:O?.data?.canEditGlobal??!1,isCustomized:O?.data?.source===`USER`,renderTile:T,chip:j,hideNew:C,newRoute:y,newLabel:b,newSubtitle:S,onClose:()=>N(!1)}):(0,i.jsx)(I,{resolved:P,renderTile:T,chip:j,hideNew:C,newRoute:y,newLabel:b,newSubtitle:S,isEmpty:e?.length===0,emptyTitle:E,emptyDescription:D})]})}function F({items:e,error:t,tryAgainUrl:r,tone:a=`indigo`,newRoute:o,newLabel:s,newSubtitle:c,hideNew:l=!1,itemKey:u,renderTile:d,emptyTitle:f,emptyDescription:p}){let m=_(a);return(0,i.jsx)(n.t,{checkIsNotUndefined:e,error:t??null,tryAgainUrl:r,children:(0,i.jsxs)(`div`,{className:N,children:[!l&&o&&s?(0,i.jsx)(V,{route:o,label:s,subtitle:c,chip:m}):null,(e??[]).map(e=>(0,i.jsx)(`span`,{className:`contents`,children:d(e)},u(e))),e?.length===0&&(0,i.jsx)(H,{title:f,description:p})]})})}function I({resolved:t,renderTile:n,chip:r,hideNew:a,newRoute:o,newLabel:s,newSubtitle:c,isEmpty:l,emptyTitle:u,emptyDescription:d}){let f=t.some(e=>e.emphasis===`SMALL`);return(0,i.jsxs)(`div`,{className:e.U(N,f&&`grid-flow-dense`),children:[!a&&(0,i.jsx)(V,{route:o,label:s,subtitle:c,chip:r}),t.map(({item:e,key:t,emphasis:r})=>(0,i.jsx)(`span`,{className:`contents`,children:n(e,r)},t)),l&&(0,i.jsx)(H,{title:u,description:d})]})}function L({layout:n,resolved:s,canEditGlobal:c,isCustomized:d,renderTile:f,chip:p,hideNew:m,newRoute:h,newLabel:g,newSubtitle:_,onClose:v}){let{t:y}=(0,a.useTranslation)(),[b,x]=(0,r.useState)(s),S=n.saving??!1,[C,w]=(0,r.useState)(!1),T=e=>async()=>{if(e){w(!1);try{await e(),v()}catch(e){console.error(`Failed to save the bento layout`,e),w(!0)}}},E=(0,l.useSensors)((0,l.useSensor)(l.PointerSensor,{activationConstraint:{distance:8}}),(0,l.useSensor)(l.KeyboardSensor));function D(e){let{active:t,over:n}=e;!n||t.id===n.id||x(e=>{let r=e.findIndex(e=>e.key===t.id),i=e.findIndex(e=>e.key===n.id);return r<0||i<0?e:(0,u.arrayMove)(e,r,i)})}function O(e,t){x(n=>n.map(n=>n.key===e?{...n,emphasis:t}:n))}let k=(0,r.useMemo)(()=>j(b),[b]),A=b.some(e=>e.emphasis===`SMALL`);return(0,i.jsxs)(`div`,{children:[(0,i.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2 rounded-2xl border border-border/60 bg-card/40 p-3 backdrop-blur-md`,children:[(0,i.jsx)(`span`,{className:`mr-auto text-sm text-muted-foreground`,children:y(`bento.layout.editHint`,{defaultValue:`Drag tiles to reorder · tap the size button to resize`})}),d&&n.onReset&&(0,i.jsxs)(t.c,{variant:`ghost`,size:`sm`,className:`gap-2`,disabled:S,onClick:T(n.onReset),children:[(0,i.jsx)(o.IconArrowBackUp,{size:16}),y(`bento.layout.reset`,{defaultValue:`Reset to default`})]}),c&&n.onSaveGlobal&&(0,i.jsxs)(t.c,{variant:`outline`,size:`sm`,className:`gap-2`,disabled:S,onClick:T(()=>n.onSaveGlobal?.(k)),children:[(0,i.jsx)(o.IconUsers,{size:16}),y(`bento.layout.saveGlobal`,{defaultValue:`Set as default for everyone`})]}),(0,i.jsxs)(t.c,{variant:`ghost`,size:`sm`,className:`gap-2`,disabled:S,onClick:v,children:[(0,i.jsx)(o.IconX,{size:16}),y(`common.cancel`,{defaultValue:`Cancel`})]}),(0,i.jsxs)(t.c,{size:`sm`,className:`gap-2`,disabled:S,onClick:T(()=>n.onSave(k)),children:[(0,i.jsx)(o.IconDeviceFloppy,{size:16}),y(`bento.layout.save`,{defaultValue:`Save layout`})]}),C&&(0,i.jsx)(`p`,{role:`alert`,className:`w-full text-sm text-destructive`,children:y(`bento.layout.saveFailed`,{defaultValue:`The layout could not be saved. Nothing has changed — try again.`})})]}),(0,i.jsx)(l.DndContext,{sensors:E,collisionDetection:l.closestCenter,onDragEnd:D,children:(0,i.jsx)(u.SortableContext,{items:b.map(e=>e.key),strategy:u.rectSortingStrategy,children:(0,i.jsxs)(`div`,{className:e.U(N,A&&`grid-flow-dense`),children:[!m&&(0,i.jsx)(V,{route:h,label:g,subtitle:_,chip:p}),b.map(({item:e,key:t,emphasis:n})=>(0,i.jsx)(B,{id:t,emphasis:n,onSetEmphasis:e=>O(t,e),children:f(e,n)},t))]})})})]})}var R=[`SMALL`,`MEDIUM`,`LARGE`],z={SMALL:{key:`bento.layout.size.small`,def:`Small`},MEDIUM:{key:`bento.layout.size.medium`,def:`Medium`},LARGE:{key:`bento.layout.size.large`,def:`Large`}};function B({id:t,emphasis:n,onSetEmphasis:r,children:s}){let{t:c}=(0,a.useTranslation)(),{attributes:l,listeners:f,setNodeRef:p,transform:m,transition:h,isDragging:g}=(0,u.useSortable)({id:t}),_={transform:d.CSS.Translate.toString(m),transition:h,opacity:g?.6:1,zIndex:g?50:void 0};return(0,i.jsxs)(`div`,{ref:p,style:_,className:e.U(`relative h-full`,O[n]),children:[(0,i.jsx)(`div`,{className:`pointer-events-none h-full select-none [&>*]:h-full [&>*]:w-full`,children:s}),(0,i.jsxs)(`div`,{className:`absolute right-2 top-2 z-10 flex items-center gap-1`,children:[(0,i.jsx)(`div`,{role:`group`,"aria-label":c(`bento.layout.sizeGroup`,{defaultValue:`Tile size`}),className:`flex items-center gap-0.5 rounded-full border border-border/60 bg-background/80 p-0.5 shadow-sm backdrop-blur`,children:R.map(t=>{let a=t===n,o=c(z[t].key,{defaultValue:z[t].def});return(0,i.jsx)(`button`,{type:`button`,onClick:()=>r(t),"aria-pressed":a,"aria-label":o,title:o,className:e.U(`grid h-6 w-6 place-items-center rounded-full text-[11px] font-semibold uppercase transition-colors`,a?`bg-primary text-primary-foreground shadow`:`text-muted-foreground hover:bg-muted`),children:o.charAt(0)},t)})}),(0,i.jsx)(`button`,{type:`button`,...l,...f,"aria-label":c(`bento.layout.dragToReorder`,{defaultValue:`Drag to reorder`}),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`,children:(0,i.jsx)(o.IconGripVertical,{size:14,className:`text-muted-foreground`})})]})]})}function V({route:e,label:t,subtitle:n,chip:r}){let{t:s}=(0,a.useTranslation)();return(0,i.jsxs)(c.Link,{to:e,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`,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,i.jsx)(`span`,{className:`bento-pulse grid h-10 w-10 place-items-center rounded-2xl ${r} text-white shadow-md`,children:(0,i.jsx)(o.IconPlus,{size:20})}),(0,i.jsx)(`span`,{className:`text-[11px] uppercase tracking-wider text-muted-foreground`,children:s(`forms.formActions.new`,{defaultValue:`New`})})]}),(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`div`,{className:`text-base font-semibold tracking-tight md:text-lg`,children:(0,i.jsx)(`span`,{className:`${r} bg-clip-text text-transparent`,children:t})}),n&&(0,i.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:n})]})]})}function H({title:e,description:t}){return(0,i.jsx)(y,{icon:o.IconSparkles,title:e,description:t,align:`start`,className:`col-span-2 row-span-2 justify-end md:col-span-4`})}function U({title:t,badges:n,actions:r,onCancel:s,loading:c,disabled:l,dirty:u,titleMissing:d}){let{t:f}=(0,a.useTranslation)();return(0,i.jsxs)(`div`,{className:`bento-glass flex items-center justify-between gap-4 rounded-2xl px-4 py-3 shadow-md backdrop-blur-xl`,children:[(0,i.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[t&&(0,i.jsx)(`p`,{className:`truncate text-base font-semibold tracking-tight md:text-lg`,children:t}),(0,i.jsx)(w,{titleMissing:d,dirty:u}),n&&(0,i.jsx)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:n})]}),(0,i.jsx)(`div`,{className:`flex shrink-0 gap-2`,children:r??(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(e.u,{type:`submit`,size:`sm`,loading:c,disabled:l,children:[(0,i.jsx)(o.IconDeviceFloppy,{className:`size-4`}),f(`forms.formActions.saveChanges`)]}),s&&(0,i.jsxs)(e.u,{type:`button`,variant:`outline`,size:`sm`,onClick:s,children:[(0,i.jsx)(o.IconX,{className:`size-4`}),f(`forms.formActions.cancel`)]})]})})]})}function W({children:e}){return(0,i.jsx)(`span`,{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`,children:e})}U.Badge=W;function G(e){let t=(0,r.useRef)(null);return T(t),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{ref:t,"aria-hidden":!0,className:`h-px`}),(0,i.jsx)(`div`,{"aria-hidden":!0,className:`bento-save-bar-spacer`}),(0,i.jsx)(`div`,{className:`bento-fade-in fixed inset-x-0 top-20 z-20 mx-auto w-full max-w-7xl px-4 md:px-8`,children:(0,i.jsx)(U,{...e})})]})}function K({eyebrow:t,backTo:n,backLabel:r,leading:s,title:c,subtitle:l,trailing:u,onCancel:d,actions:f,loading:p,dirty:m,titleMissing:h,saveDisabled:g,stickyTitle:_,stickyBadges:v}){let{t:y}=(0,a.useTranslation)(),S=g??(!!h||!m);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x,{eyebrow:n===void 0?t:(0,i.jsx)(b,{to:n,children:r}),leading:s,title:c,subtitle:l,trailing:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{className:`bento-fade-out flex shrink-0 items-center gap-2`,children:f??(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(e.u,{type:`submit`,size:`sm`,loading:p,disabled:S,children:[(0,i.jsx)(o.IconDeviceFloppy,{className:`size-4`}),y(`forms.formActions.saveChanges`)]}),(0,i.jsxs)(e.u,{type:`button`,variant:`outline`,size:`sm`,onClick:d,children:[(0,i.jsx)(o.IconX,{className:`size-4`}),y(`forms.formActions.cancel`)]})]})}),u]})}),(0,i.jsx)(G,{title:_,badges:v,actions:f,onCancel:d,loading:p,disabled:S,dirty:m,titleMissing:h})]})}function q({icon:e,tone:t,title:n,description:r,children:a,trailing:o,as:s=`h2`}){return(0,i.jsxs)(`section`,{className:`bento-tile bento-glass relative flex flex-col gap-5 overflow-hidden rounded-3xl p-5 md:p-6`,children:[(0,i.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,i.jsx)(`span`,{className:`grid h-10 w-10 place-items-center rounded-2xl text-white shadow-md ${_(t)}`,children:(0,i.jsx)(e,{size:20})}),(0,i.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,i.jsx)(s,{className:`text-base font-semibold tracking-tight md:text-lg`,children:n}),r&&(0,i.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r})]})]}),o&&(0,i.jsx)(`div`,{className:`shrink-0`,children:o})]}),(0,i.jsx)(`div`,{className:`flex flex-col gap-5`,children:a})]})}function ee({children:t,className:n,contentClassName:r}){return(0,i.jsx)(`div`,{className:e.U(`bento-glass rounded-2xl shadow-md`,n),children:(0,i.jsx)(`div`,{className:r,children:t})})}var J=480;function te(e){return window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)}function ne(){return window.scrollY>J}function Y(){let{t:e}=(0,a.useTranslation)(),t=(0,r.useSyncExternalStore)(te,ne,()=>!1);return(0,i.jsx)(`button`,{type:`button`,"aria-label":e(`bento.backToTop`,{defaultValue:`Back to top`}),tabIndex:t?0:-1,onClick:()=>window.scrollTo({top:0,behavior:`smooth`}),className:`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 ${t?`translate-y-0 scale-100 opacity-100`:`pointer-events-none translate-y-4 scale-90 opacity-0`}`,children:(0,i.jsx)(o.IconArrowUp,{size:18})})}function X(e){return e.bentoRoute??e.fallbackRoute}function re({open:t,onOpenChange:n,items:s}){let{t:l}=(0,a.useTranslation)(),u=(0,c.useNavigate)(),[d,f]=(0,r.useState)(``),[p,m]=(0,r.useState)(0),h=(0,r.useRef)(null),g=(0,r.useMemo)(()=>{let e=d.trim().toLowerCase(),t=s.map(e=>({item:e,label:l(e.titleKey),description:l(e.descriptionKey)}));if(!e)return t;let n=[],r=[];for(let i of t)i.label.toLowerCase().includes(e)?n.push(i):i.description.toLowerCase().includes(e)&&r.push(i);return[...n,...r]},[s,d,l]),[_,v]=(0,r.useState)(t);t!==_&&(v(t),t&&(f(``),m(0)));let y=g.length===0?0:g.length-1;p>y&&m(y),(0,r.useEffect)(()=>{(h.current?.querySelector(`[data-index="${p}"]`))?.scrollIntoView({block:`nearest`})},[p]);function b(e){n(!1),u(X(e))}function x(e){if(e.key===`ArrowDown`)e.preventDefault(),m(e=>g.length===0?0:(e+1)%g.length);else if(e.key===`ArrowUp`)e.preventDefault(),m(e=>g.length===0?0:(e-1+g.length)%g.length);else if(e.key===`Enter`){e.preventDefault();let t=g[p];t&&b(t.item)}}return(0,i.jsx)(e.D,{open:t,onOpenChange:n,children:(0,i.jsxs)(e.k,{showCloseButton:!1,className:`top-[15%] max-w-xl translate-y-0 gap-0 overflow-hidden p-0`,onKeyDown:x,children:[(0,i.jsx)(e.F,{className:`sr-only`,children:l(`bento.palette.title`,{defaultValue:`Command palette`})}),(0,i.jsx)(e.A,{className:`sr-only`,children:l(`bento.palette.description`,{defaultValue:`Search and jump to any area`})}),(0,i.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-border/60 px-4`,children:[(0,i.jsx)(o.IconSearch,{size:18,className:`shrink-0 text-muted-foreground`}),(0,i.jsx)(`input`,{autoFocus:!0,type:`text`,role:`combobox`,"aria-expanded":`true`,"aria-controls":`bento-palette-list`,"aria-activedescendant":g[p]?`bento-palette-opt-${p}`:void 0,value:d,onChange:e=>f(e.target.value),placeholder:l(`bento.palette.placeholder`,{defaultValue:`Search areas…`}),className:`h-12 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground`})]}),(0,i.jsxs)(`div`,{ref:h,id:`bento-palette-list`,role:`listbox`,"aria-label":l(`bento.palette.title`,{defaultValue:`Command palette`}),className:`max-h-80 overflow-y-auto p-2`,children:[g.length===0&&(0,i.jsx)(`p`,{className:`px-3 py-6 text-center text-sm text-muted-foreground`,children:l(`bento.palette.noResults`,{defaultValue:`No matches`})}),g.map(({item:e,label:t},n)=>{let r=!e.bentoRoute,a=n===p,s=e.icon;return(0,i.jsxs)(`button`,{type:`button`,id:`bento-palette-opt-${n}`,"data-index":n,role:`option`,"aria-selected":a?`true`:`false`,onMouseEnter:()=>m(n),onClick:()=>b(e),className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${a?`bg-accent text-accent-foreground`:`text-foreground`}`,children:[(0,i.jsx)(s,{size:18,className:`shrink-0 text-muted-foreground`}),(0,i.jsx)(`span`,{className:`flex-1 truncate`,children:t}),r?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.IconExternalLink,{"aria-hidden":!0,size:15,className:`shrink-0 text-muted-foreground/70`}),(0,i.jsx)(`span`,{className:`sr-only`,children:l(`bento.palette.opensConsole`,{defaultValue:`Opens in console`})})]}):a&&(0,i.jsx)(o.IconArrowRight,{"aria-hidden":!0,size:15,className:`shrink-0 text-muted-foreground`})]},e.id)})]})]})})}function Z({open:t,onOpenChange:n,isMac:r}){let{t:s}=(0,a.useTranslation)(),c=r?`⌘`:`Ctrl`,l=[{heading:s(`bento.shortcuts.global`,{defaultValue:`Global`}),rows:[{keys:[c,`K`],label:s(`bento.palette.open`,{defaultValue:`Open command palette`})},{keys:[`?`],label:s(`bento.shortcuts.openGuide`,{defaultValue:`Show keyboard shortcuts`})}]},{heading:s(`bento.shortcuts.palette`,{defaultValue:`Command palette`}),rows:[{keys:[`↑`,`↓`],label:s(`bento.shortcuts.navigate`,{defaultValue:`Move between results`})},{keys:[`↵`],label:s(`bento.shortcuts.openSelected`,{defaultValue:`Open the selected area`})},{keys:[`Esc`],label:s(`bento.shortcuts.dismiss`,{defaultValue:`Close the palette or a dialog`})}]}];return(0,i.jsx)(e.D,{open:t,onOpenChange:n,children:(0,i.jsxs)(e.k,{className:`max-w-md`,children:[(0,i.jsxs)(e.M,{children:[(0,i.jsxs)(e.F,{className:`flex items-center gap-2`,children:[(0,i.jsx)(o.IconKeyboard,{size:20,className:`bento-accent-icon`}),s(`bento.shortcuts.title`,{defaultValue:`Keyboard shortcuts`})]}),(0,i.jsx)(e.A,{children:s(`bento.shortcuts.description`,{defaultValue:`Move around Turing without leaving the keyboard.`})})]}),(0,i.jsx)(`div`,{className:`flex flex-col gap-5`,children:l.map(e=>(0,i.jsxs)(`section`,{children:[(0,i.jsx)(`h3`,{className:`mb-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground`,children:e.heading}),(0,i.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.rows.map(e=>(0,i.jsxs)(`li`,{className:`flex items-center justify-between gap-4`,children:[(0,i.jsx)(`span`,{className:`text-sm text-foreground`,children:e.label}),(0,i.jsx)(`span`,{className:`flex shrink-0 items-center gap-1`,children:e.keys.map(e=>(0,i.jsx)(`kbd`,{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`,children:e},e))})]},e.label))})]},e.heading))})]})})}function ie(e,t){return e===t||e.startsWith(`${t}/`)}function ae(e,t){return t.section.areaRoute&&ie(e,t.section.areaRoute)?!0:t.items.some(t=>t.bentoRoute&&ie(e,t.bentoRoute))}function oe({groups:t,homeRoute:n,homeAliases:s,homeLabel:l}){let{t:u}=(0,a.useTranslation)(),{pathname:d}=(0,c.useLocation)(),f=(0,r.useMemo)(()=>t.filter(e=>e.section.areaRoute),[t]),p=d===n||(s?.includes(d)??!1);return(0,i.jsx)(e.o,{delayDuration:200,children:(0,i.jsxs)(`nav`,{"aria-label":u(`bento.nav.label`,{defaultValue:`Primary`}),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`,children:[(0,i.jsx)(se,{to:n,icon:o.IconHome,label:l??u(`home.title`,{defaultValue:`Home`}),active:p}),f.length>0&&(0,i.jsx)(`span`,{"aria-hidden":!0,className:`my-1 h-px w-6 bg-border/60`}),f.map(e=>(0,i.jsx)(se,{to:e.section.areaRoute,icon:e.section.icon,label:u(e.section.labelKey),active:ae(d,e)},e.section.id))]})})}function se({to:t,icon:n,label:r,active:a}){return(0,i.jsxs)(e.i,{children:[(0,i.jsx)(e.s,{asChild:!0,children:(0,i.jsx)(c.Link,{to:t,"aria-label":r,"aria-current":a?`page`:void 0,className:`bento-tile-clickable grid h-11 w-11 shrink-0 place-items-center rounded-2xl border transition-colors duration-200 ${a?`bento-rail-active`:`border-transparent text-muted-foreground hover:border-border/60 hover:bg-card/60 hover:text-foreground`}`,children:(0,i.jsx)(n,{size:20})})}),(0,i.jsx)(e.a,{side:`right`,children:r})]})}function ce({accountRoute:n,logoutUrl:r,organizationsRoute:s,tenantAdminRoute:l,onOpenShortcuts:u,onReplayTour:d}){let{user:f,status:p}=t.n(),{t:m}=(0,a.useTranslation)(),h=(0,c.useNavigate)(),g=`${f.firstName??``} ${f.lastName??``}`.trim()||f.username||``;return p===`loading`?(0,i.jsx)(`div`,{className:`h-9 w-9 rounded-full bg-muted/40`,"aria-hidden":!0}):(0,i.jsxs)(e.f,{children:[(0,i.jsx)(e.E,{asChild:!0,children:(0,i.jsx)(`button`,{type:`button`,title:g||f.username,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`,children:(0,i.jsx)(t.r,{givenName:f.firstName,familyName:f.lastName,name:g||f.username,src:f.avatarUrl||void 0,alt:f.username})})}),(0,i.jsxs)(e.m,{align:`end`,sideOffset:10,className:`bento-dropdown min-w-64 p-2`,children:[(0,i.jsx)(e._,{className:`p-0 font-normal`,children:(0,i.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl px-2 py-2 text-left text-sm`,children:[(0,i.jsx)(`span`,{className:`rounded-full p-0.5 ring-1 ring-border/60`,children:(0,i.jsx)(t.r,{givenName:f.firstName,familyName:f.lastName,name:g||f.username,src:f.avatarUrl||void 0,alt:f.username})}),(0,i.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[g&&(0,i.jsx)(`span`,{className:`truncate font-medium`,children:g}),f.email&&(0,i.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:f.email})]})]})}),(0,i.jsx)(e.x,{className:`my-1.5 bg-border/50`}),(0,i.jsxs)(e.h,{children:[(0,i.jsxs)(e.g,{onSelect:()=>h(n),className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2`,children:[(0,i.jsx)(o.IconUserCircle,{size:18}),m(`nav.account`)]}),s&&(0,i.jsxs)(e.g,{onSelect:()=>h(s),className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2`,children:[(0,i.jsx)(o.IconBuildingCommunity,{size:18}),m(`nav.organizations`,{defaultValue:`Organizations`})]}),l&&(0,i.jsxs)(e.g,{onSelect:()=>h(l),className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2`,children:[(0,i.jsx)(o.IconBuildingSkyscraper,{size:18}),m(`nav.tenantAdmin`,{defaultValue:`Tenant administration`})]})]}),(u||d)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.x,{className:`my-1.5 bg-border/50`}),(0,i.jsxs)(e.h,{children:[d&&(0,i.jsxs)(e.g,{onSelect:()=>d(),className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2`,children:[(0,i.jsx)(o.IconSparkles,{size:18}),m(`bento.tour.replay`,{defaultValue:`Take the tour`})]}),u&&(0,i.jsxs)(e.g,{onSelect:()=>u(),className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2`,children:[(0,i.jsx)(o.IconKeyboard,{size:18}),m(`bento.shortcuts.title`,{defaultValue:`Keyboard shortcuts`})]})]})]}),(0,i.jsx)(e.x,{className:`my-1.5 bg-border/50`}),(0,i.jsxs)(e.g,{onSelect:()=>{globalThis.location.href=r},className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2 bento-item-danger`,children:[(0,i.jsx)(o.IconLogout,{size:18}),m(`nav.logOut`)]})]})]})}var Q=(0,r.createContext)(`console`);function le({chrome:e,children:t}){return(0,i.jsx)(Q.Provider,{value:e,children:t})}function ue(){return(0,r.useContext)(Q)}var de={blue:`blue`,violet:`violet`,emerald:`emerald`,amber:`amber`,rose:`rose`,slate:`slate`,cyan:`blue`,orange:`amber`};function $({variant:e=`blue`,defaultOpen:n,className:a,children:o}){let s=(0,r.useContext)(Q),c,l;return s===`bento`&&r.Children.forEach(o,e=>{if(!(0,r.isValidElement)(e))return;let{type:n}=e;n===t.o.Header||n===t.o.StaticHeader?c=e.props:n===t.o.Content&&(l=e.props.children)}),s===`bento`&&c?(0,i.jsx)(q,{icon:c.icon,tone:de[e]??`blue`,title:c.title,description:c.description,children:l}):(0,i.jsx)(t.o,{variant:e,defaultOpen:n,className:a,children:o})}$.Header=t.o.Header,$.StaticHeader=t.o.StaticHeader,$.Content=t.o.Content;var fe=`bento-grid grid auto-rows-[minmax(140px,auto)] grid-cols-2 gap-4 md:grid-cols-4 md:gap-5 lg:grid-cols-6`;function pe({eyebrow:e,title:t,description:n,titleHref:r,children:a,gridClassName:s=fe}){let l=(0,i.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight md:text-2xl`,children:t});return(0,i.jsxs)(`section`,{className:`mb-8 md:mb-10`,children:[(0,i.jsxs)(`header`,{className:`bento-shell-header mb-4 flex flex-col gap-0.5`,children:[e&&(0,i.jsx)(`span`,{className:`text-xs uppercase tracking-[0.18em] text-muted-foreground`,children:e}),r?(0,i.jsxs)(c.Link,{to:r,className:`group inline-flex w-fit items-center gap-1 text-foreground transition-colors hover:text-primary`,children:[l,(0,i.jsx)(o.IconChevronRight,{size:20,className:`text-muted-foreground transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] group-hover:translate-x-1`})]}):l,n&&(0,i.jsx)(`p`,{className:`max-w-2xl text-sm text-muted-foreground`,children:n})]}),(0,i.jsx)(`div`,{className:s,children:a})]})}function me({to:e,onClick:t,disabled:n=!1,disabledHint:r,icon:a,tone:s,eyebrow:l,title:u,span:d,featured:f=!1,children:p}){let m=!n&&!!(e||t),h=f?`h-14 w-14 rounded-2xl`:`h-9 w-9 rounded-2xl`,g=f?28:18,v=f?`text-xl font-semibold tracking-tight md:text-2xl`:`text-base font-semibold tracking-tight md:text-lg`,y=(0,i.jsxs)(i.Fragment,{children:[f&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute -bottom-10 -right-10 h-64 w-64 rounded-full ${_(s)} opacity-40 blur-2xl dark:opacity-50`}),(0,i.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute right-12 top-1/3 h-32 w-32 rounded-full ${_(s)} bento-chip-tr opacity-20 blur-2xl dark:opacity-30`})]}),(0,i.jsxs)(`div`,{className:`relative z-1 flex items-center justify-between`,children:[(0,i.jsx)(`span`,{className:`grid place-items-center ${_(s)} text-white shadow-md ${h}`,children:(0,i.jsx)(a,{size:g})}),m&&(0,i.jsx)(o.IconChevronRight,{size:f?18:16,className:`text-muted-foreground transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] group-hover:translate-x-1`})]}),(0,i.jsxs)(`div`,{className:`relative z-1`,children:[(0,i.jsx)(`div`,{className:`text-[11px] uppercase tracking-wider text-muted-foreground`,children:l}),(0,i.jsx)(`div`,{className:`mt-0.5 ${v}`,children:u}),p&&(0,i.jsx)(`div`,{className:`mt-2`,children:p})]})]}),b=`bento-tile bento-glass group relative flex flex-col ${f?`gap-5`:`gap-4`} overflow-hidden text-left ${f?`p-6 md:p-7`:`p-5`} ${d}${m?` bento-tile-clickable`:``}${n?` cursor-not-allowed opacity-60`:``}`;return n?(0,i.jsx)(`div`,{className:b,"aria-disabled":`true`,title:r,children:y}):e?(0,i.jsx)(c.Link,{to:e,className:b,children:y}):t?(0,i.jsx)(`button`,{type:`button`,onClick:t,className:`${b} w-full`,children:y}):(0,i.jsx)(`div`,{className:b,children:y})}exports.AdaptiveSectionCard=$,exports.BENTO_EMPHASIS_NEXT=k,exports.BENTO_EMPHASIS_SPAN=O,exports.BENTO_TONES=g,exports.BENTO_TONE_CLASS=h,exports.BentoActionsMenu=m,exports.BentoBackLink=b,exports.BentoBackToTop=Y,exports.BentoCommandPalette=re,exports.BentoCountTile=v,exports.BentoEmptyState=y,exports.BentoEntityShell=D,exports.BentoEntityTile=M,exports.BentoFormHero=K,exports.BentoFormSection=q,exports.BentoHero=x,exports.BentoHeroIconPicker=S,exports.BentoInlineEdit=C,exports.BentoListPage=P,exports.BentoNavRail=oe,exports.BentoPanel=ee,exports.BentoSaveBar=U,exports.BentoScrollSaveBar=G,exports.BentoSection=pe,exports.BentoShortcutsDialog=Z,exports.BentoStatusMarker=w,exports.BentoTile=me,exports.BentoTileGrid=F,exports.BentoUserMenu=ce,exports.SectionCardChromeProvider=le,exports.bentoChipClass=_,exports.bentoNavTarget=X,exports.resolveBentoLayout=A,exports.toBentoLayoutEntries=j,exports.useBentoScrollFade=T,exports.useSectionChrome=ue;
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-Oagwe_oa.cjs"),t=require("./badge-locale-Bij94NwL.cjs"),n=require("./user.context-xsJgPpcO.cjs"),r=require("./loading-provider-B6-R2ONB.cjs");let i=require("react"),a=require("react/jsx-runtime"),o=require("react-i18next"),s=require("@tabler/icons-react"),c=require("@iconify/react"),l=require("react-router-dom"),u=require("@dnd-kit/core"),d=require("@dnd-kit/sortable"),f=require("@dnd-kit/utilities"),p=require("sonner");var m={default:``,destructive:`bento-item-danger`};function h({actions:e,triggerLabel:n}){let{t:r}=(0,o.useTranslation)();return e.length===0?null:(0,a.jsxs)(t.f,{children:[(0,a.jsx)(t.E,{asChild:!0,children:(0,a.jsx)(`button`,{type:`button`,"aria-label":n??r(`forms.formActions.moreActions`,{defaultValue:`More actions`}),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`,children:(0,a.jsx)(s.IconDotsVertical,{size:18})})}),(0,a.jsx)(t.m,{align:`end`,sideOffset:8,className:`bento-dropdown min-w-44 p-1.5`,children:e.map(e=>{let n=e.icon,r=m[e.tone??`default`];return(0,a.jsxs)(t.g,{onSelect:e.onSelect,disabled:e.disabled,className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2 ${r}`,children:[(0,a.jsx)(n,{size:16}),e.label]},e.label)})})]})}var g={blue:`bento-tone-blue`,indigo:`bento-tone-indigo`,violet:`bento-tone-violet`,emerald:`bento-tone-emerald`,amber:`bento-tone-amber`,rose:`bento-tone-rose`,slate:`bento-tone-slate`},_=Object.keys(g);function v(e){return`bento-chip ${g[e]??g.slate}`}function y({to:e,icon:t,tone:n,label:r,count:i,span:o}){let s=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`span`,{className:`grid h-9 w-9 place-items-center rounded-2xl text-white shadow-md ${v(n)}`,children:(0,a.jsx)(t,{size:18})}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`div`,{className:`text-3xl font-semibold tabular-nums tracking-tight`,children:i}),(0,a.jsx)(`div`,{className:`text-[11px] uppercase tracking-wider text-muted-foreground`,children:r})]})]}),c=`bento-tile bento-glass group relative flex flex-col justify-between overflow-hidden p-4 ${o}${e?` bento-tile-clickable`:``}`;return e?(0,a.jsx)(l.Link,{to:e,className:c,children:s}):(0,a.jsx)(`div`,{className:c,children:s})}function b({icon:t=s.IconSparkles,tone:n=`indigo`,title:r,description:i,action:o,align:c=`center`,className:l}){let u=v(n),d=c===`center`;return(0,a.jsxs)(`div`,{className:e.t(`bento-tile bento-glass flex flex-col gap-3 rounded-3xl p-8`,d?`items-center text-center`:`items-start text-left`,l),children:[(0,a.jsx)(`span`,{className:`grid h-12 w-12 place-items-center rounded-2xl ${u} text-white shadow-md`,children:(0,a.jsx)(t,{size:24})}),(0,a.jsx)(`div`,{className:`text-lg font-semibold tracking-tight`,children:r}),i&&(0,a.jsx)(`p`,{className:e.t(`max-w-md text-sm text-muted-foreground`,d&&`mx-auto`),children:i}),o&&(0,a.jsx)(`div`,{className:e.t(`mt-1`,d&&`mx-auto`),children:o})]})}function x({to:e,children:t}){return(0,a.jsxs)(l.Link,{to:e,className:`inline-flex items-center gap-1 hover:text-foreground`,children:[(0,a.jsx)(s.IconArrowLeft,{size:14,"aria-hidden":!0}),t]})}function S({eyebrow:e,backTo:t,backLabel:n,title:r,subtitle:i,leading:o,trailing:s}){let c=e??(t==null?null:(0,a.jsx)(x,{to:t,children:n}));return(0,a.jsx)(`header`,{className:`bento-shell-header mb-6 flex flex-col items-start gap-3 md:mb-10`,children:(0,a.jsxs)(`div`,{className:`flex w-full items-start gap-4`,children:[o&&(0,a.jsx)(`div`,{className:`shrink-0`,children:o}),(0,a.jsxs)(`div`,{className:`flex flex-1 flex-col gap-1`,children:[c&&(0,a.jsx)(`span`,{className:`text-xs uppercase tracking-[0.18em] text-muted-foreground`,children:c}),(0,a.jsx)(`h1`,{className:`text-3xl font-semibold tracking-tight md:text-4xl`,children:r}),i&&(0,a.jsx)(`p`,{className:`max-w-2xl text-sm text-muted-foreground`,children:i})]}),s&&(0,a.jsx)(`div`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:s})]})})}function C({value:e,onChange:t,onClear:r,defaultIcon:l,tone:u,title:d,description:f,readOnly:p=!1}){let{t:m}=(0,o.useTranslation)(),[h,g]=(0,i.useState)(!1);return p?(0,a.jsx)(`span`,{className:`grid h-12 w-12 place-items-center rounded-2xl ${v(u)} text-white shadow-md`,children:e?(0,a.jsx)(c.Icon,{icon:e,className:`size-6 text-white`}):(0,a.jsx)(l,{size:24})}):(0,a.jsxs)(`div`,{className:`group relative`,children:[(0,a.jsxs)(`button`,{type:`button`,onClick:()=>g(!0),"aria-label":m(`forms.iconPicker.chooseAnIcon`),className:`group/icon relative grid h-12 w-12 cursor-pointer place-items-center overflow-hidden rounded-2xl ${v(u)} 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`,children:[e?(0,a.jsx)(c.Icon,{icon:e,className:`size-6 text-white`}):(0,a.jsx)(l,{size:24}),(0,a.jsx)(`span`,{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`,children:(0,a.jsx)(s.IconPalette,{className:`size-5 text-white`})})]}),e&&r&&(0,a.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),r()},"aria-label":m(`forms.common.remove`),title:m(`forms.common.remove`),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`,children:(0,a.jsx)(s.IconX,{size:12})}),(0,a.jsx)(n.c,{open:h,onOpenChange:g,value:e,onSelect:t,onClear:r,title:d,description:f})]})}function w({value:n,onSave:r,multiline:s=!1,placeholder:c,className:l,ariaLabel:u,autoFocus:d=!1,readOnly:f=!1,commitOnChange:p=!1}){let{t:m}=(0,o.useTranslation)(),[h,g]=(0,i.useState)(d),[_,v]=(0,i.useState)(n),[y,b]=(0,i.useState)(!1),x=(0,i.useRef)(null),[S,C]=(0,i.useState)(n);!h&&n!==S&&(C(n),v(n)),(0,i.useEffect)(()=>{h&&x.current&&(x.current.focus(),x.current.select())},[h]);async function w(){let e=_.trim();if(e===n){g(!1);return}if(!e&&!c){v(n),g(!1);return}b(!0);try{await r(e)}catch{v(n)}finally{b(!1),g(!1)}}function T(){v(n),g(!1)}function E(e){v(e),p&&r(e)}let D=!n;if(f)return(0,a.jsx)(`span`,{className:e.t(`block w-full`,l),"aria-label":u,children:n||(0,a.jsx)(`span`,{className:`text-muted-foreground/80`,children:c??`—`})});let O=`w-full bg-transparent outline-none border-b transition-colors duration-200`,k=e.t(O,`cursor-text rounded-sm`,D?`border-dashed border-border/70 hover:border-foreground/40`:`border-transparent hover:border-border/60 focus-visible:border-border/80`,y&&`opacity-60`),A=e.t(O,`bento-editing`);if(!h)return(0,a.jsx)(`button`,{type:`button`,onClick:()=>g(!0),className:e.t(k,`text-left`,l),"aria-label":u??m(`forms.formActions.edit`),disabled:y,children:n||(0,a.jsx)(`span`,{className:`text-muted-foreground/80`,children:c??`—`})});function j(e){if(e.key===`Escape`){e.preventDefault(),T();return}e.key===`Enter`&&(!s||e.metaKey||e.ctrlKey)&&(e.preventDefault(),w())}return s?(0,a.jsx)(`textarea`,{ref:x,value:_,onChange:e=>E(e.target.value),onBlur:w,onKeyDown:j,placeholder:c,"aria-label":u,rows:3,className:e.t(A,`resize-none py-0.5 leading-snug`,l)}):(0,a.jsx)(t.l,{ref:x,value:_,onChange:e=>E(e.target.value),onBlur:w,onKeyDown:j,placeholder:c,"aria-label":u,className:e.t(A,`h-auto px-0 py-0 shadow-none focus-visible:ring-0`,l)})}function T({titleMissing:t,dirty:n,className:r}){let{t:i}=(0,o.useTranslation)();if(!t&&!n)return null;let c=`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] font-medium normal-case leading-none tracking-normal`;return t?(0,a.jsxs)(`span`,{className:e.t(c,`bento-status bento-status-error`,r),children:[(0,a.jsx)(s.IconAlertTriangle,{className:`size-3`}),i(`bento.saveBar.titleRequired`,{defaultValue:`Title required`})]}):(0,a.jsxs)(`span`,{className:e.t(c,`bento-status bento-status-warn`,r),children:[(0,a.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bento-status-dot bento-pulse`}),i(`bento.saveBar.unsaved`,{defaultValue:`Unsaved changes`})]})}function E(e){(0,i.useEffect)(()=>{let t=e.current;if(!t)return;let n=document.documentElement,r=0,i=()=>{r=0;let e=t.getBoundingClientRect().top,i=Math.max(0,Math.min(1,(160-e)/80));n.style.setProperty(`--bento-fade`,String(i)),n.classList.toggle(`bento-fade-half`,i>.5)},a=()=>{r||=requestAnimationFrame(i)};return i(),window.addEventListener(`scroll`,a,{passive:!0}),window.addEventListener(`resize`,a),()=>{r&&cancelAnimationFrame(r),window.removeEventListener(`scroll`,a),window.removeEventListener(`resize`,a),n.style.removeProperty(`--bento-fade`),n.classList.remove(`bento-fade-half`)}},[e])}function D(e,t){let n={};for(let r of Object.keys(e))Object.assign(n,{[r]:t[r]});return n}function O({entity:e,isNew:n,headlineFallback:c,eyebrow:u,listRoute:d,icon:f,tone:m,formId:g,feature:_,hasStatus:v=!1,hideIcon:y=!1,readOnly:b=!1,autosaveOnly:O=!1,badge:k,notice:A,onUpdate:j,onDelete:M,extraActions:N,children:P}){let{t:F}=(0,o.useTranslation)(),I=(0,l.useNavigate)(),[ee,L]=(0,i.useState)(!1),[R,z]=(0,i.useState)({isDirty:!1,isSubmitting:!1}),B=(0,i.useRef)(null);E(B);let V={title:e.title??``,description:e.description??``,icon:e.icon??null,enabled:e.enabled??1},[H,U]=(0,i.useState)(V),[W,G]=(0,i.useState)(V);(V.title!==W.title||V.description!==W.description||V.icon!==W.icon||V.enabled!==W.enabled)&&(G(V),U(V));async function K(t){if(U(e=>({...e,...t})),n||!j)return;let r=t.title??H.title;try{await j({...e,...t}),p.toast.success(F(`forms.common.updated`,{name:r,feature:_}))}catch(e){console.error(`Failed to update entity field`,e),U(e=>({...e,...D(t,V)})),p.toast.error(F(`forms.common.notUpdated`,{name:V.title||r,feature:_}))}}async function q(){if(M){try{await M()?(p.toast.success(F(`forms.common.deleted`,{name:H.title,feature:_})),I(d)):p.toast.error(F(`forms.common.notDeleted`,{name:H.title,feature:_}))}catch(e){console.error(`Failed to delete entity`,e),p.toast.error(F(`forms.common.notDeleted`,{name:H.title,feature:_}))}L(!1)}}let J=H.enabled===1,te=!b,ne=!(O&&!n),Y=!H.title.trim(),re=!n&&!R.isDirty,X=Y||re,Z=[...N??[],...M&&!b?[{label:F(`forms.formActions.delete`),icon:s.IconTrash,tone:`destructive`,onSelect:()=>L(!0)}]:[]];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S,{eyebrow:(0,a.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,a.jsx)(x,{to:d,children:u}),!b&&(0,a.jsx)(T,{titleMissing:Y,dirty:n||R.isDirty})]}),leading:(0,a.jsx)(C,{value:H.icon,onChange:e=>K({icon:e}),onClear:()=>K({icon:null}),defaultIcon:f,tone:m,title:H.title,description:H.description,readOnly:b||y}),title:(0,a.jsx)(w,{value:H.title,onSave:e=>K({title:e}),placeholder:c,className:`text-3xl font-semibold tracking-tight md:text-4xl`,ariaLabel:F(`forms.common.title`),autoFocus:n,commitOnChange:n,readOnly:b}),subtitle:(0,a.jsx)(w,{value:H.description,onSave:e=>K({description:e}),multiline:!0,placeholder:F(`forms.common.description`),className:`max-w-2xl text-sm text-muted-foreground`,ariaLabel:F(`forms.common.description`),commitOnChange:n,readOnly:b}),trailing:(0,a.jsxs)(a.Fragment,{children:[te&&(0,a.jsxs)(`div`,{className:`bento-fade-out flex shrink-0 items-center gap-2`,children:[ne&&(0,a.jsxs)(t.u,{type:`submit`,form:g,size:`sm`,loading:R.isSubmitting,disabled:X,children:[(0,a.jsx)(s.IconDeviceFloppy,{className:`size-4`}),F(`forms.formActions.saveChanges`)]}),(0,a.jsxs)(t.u,{type:`button`,size:`sm`,variant:`outline`,onClick:()=>I(d),children:[(0,a.jsx)(s.IconX,{className:`size-4`}),F(`forms.formActions.cancel`)]})]}),k,v&&(b?(0,a.jsxs)(`span`,{className:`flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[10px] uppercase tracking-wider ${J?`bento-status bento-status-on`:`border-border bg-muted text-muted-foreground`}`,children:[(0,a.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${J?`bento-status-dot bento-pulse`:`bg-muted-foreground/60`}`}),J?F(`common.active`,{defaultValue:`Active`}):F(`common.idle`,{defaultValue:`Idle`})]}):(0,a.jsxs)(`button`,{type:`button`,onClick:()=>K({enabled:+!J}),"aria-label":F(`forms.common.enabled`),title:F(J?`common.activeToggleHint`:`common.idleToggleHint`),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 ${J?`bento-status bento-status-on`:`border-border bg-muted text-muted-foreground hover:bg-muted/80`}`,children:[(0,a.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${J?`bento-status-dot bento-pulse`:`bg-muted-foreground/60`}`}),J?F(`common.active`,{defaultValue:`Active`}):F(`common.idle`,{defaultValue:`Idle`})]})),!n&&Z.length>0&&(0,a.jsx)(h,{actions:Z})]})}),(0,a.jsx)(`div`,{ref:B,"aria-hidden":!0,className:`h-px`}),A,!n&&M&&(0,a.jsx)(r.i,{feature:_,name:H.title,onDelete:q,open:ee,setOpen:L,trigger:(0,a.jsx)(`span`,{className:`hidden`,"aria-hidden":!0})}),P({staged:H,onStateChange:z})]})}var k={LARGE:`col-span-2 row-span-2 md:col-span-2 md:row-span-2 lg:col-span-2 lg:row-span-2`,MEDIUM:`col-span-2 row-span-1 md:col-span-2 md:row-span-1 lg:col-span-2 lg:row-span-1`,SMALL:`col-span-1 row-span-1`},A={SMALL:`MEDIUM`,MEDIUM:`LARGE`,LARGE:`SMALL`};function j(e,t,n){if(!n||n.length===0)return e.map((e,n)=>({item:e,key:t(e),emphasis:n===0?`LARGE`:`MEDIUM`}));let r=new Map,i=new Map;for(let e of n)r.set(e.itemId,e.displayOrder),i.set(e.itemId,e.emphasis);return e.map((e,n)=>({item:e,key:t(e),idx:n})).sort((e,t)=>{let n=r.has(e.key)?r.get(e.key):2**53-1,i=r.has(t.key)?r.get(t.key):2**53-1;return n===i?e.idx-t.idx:n-i}).map(({item:e,key:t})=>({item:e,key:t,emphasis:i.get(t)??`MEDIUM`}))}function M(e){return e.map((e,t)=>({itemId:e.key,emphasis:e.emphasis,displayOrder:t}))}function N({to:e,emphasis:t,featured:n,defaultIcon:r,icon:i,tone:s=`indigo`,title:u,description:d,meta:f,enabled:p,hasStatus:m=!1,viewTransitionName:h}){let{t:g}=(0,o.useTranslation)(),_=v(s),y=t??(n?`LARGE`:`MEDIUM`),b=y===`LARGE`,x=y===`SMALL`,S=k[y],C=p===1,w=b?`p-6 md:p-7`:x?`p-4`:`p-5`,T=b?`h-14 w-14`:x?`h-8 w-8`:`h-9 w-9`,E=b?28:x?16:18,D=b?`text-xl md:text-2xl`:x?`text-sm`:`text-base md:text-lg`;return(0,a.jsxs)(l.Link,{to:e,className:`bento-tile bento-tile-clickable bento-glass group relative flex flex-col ${b?`gap-5`:`gap-4`} overflow-hidden ${w} ${S}`,style:h?{viewTransitionName:h}:void 0,children:[b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute -bottom-10 -right-10 h-64 w-64 rounded-full ${_} opacity-40 blur-2xl dark:opacity-50`}),(0,a.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute right-12 top-1/3 h-32 w-32 rounded-full ${_} bento-chip-tr opacity-20 blur-2xl dark:opacity-30`})]}),(0,a.jsxs)(`div`,{className:`relative z-1 flex items-center justify-between`,children:[(0,a.jsx)(`span`,{className:`grid place-items-center rounded-2xl ${_} text-white shadow-md ${T}`,children:i?(0,a.jsx)(c.Icon,{icon:i,className:b?`size-7 text-white`:`size-4.5 text-white`}):(0,a.jsx)(r,{size:E})}),m&&(0,a.jsxs)(`span`,{className:`flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-[10px] uppercase tracking-wider ${C?`bento-status bento-status-on`:`border-border bg-muted text-muted-foreground`}`,children:[(0,a.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${C?`bento-status-dot bento-pulse`:`bg-muted-foreground/60`}`}),C?g(`common.active`,{defaultValue:`Active`}):g(`common.idle`,{defaultValue:`Idle`})]})]}),(0,a.jsxs)(`div`,{className:`relative z-1`,children:[(0,a.jsx)(`div`,{className:`font-semibold tracking-tight ${D}`,children:u}),!x&&f&&(0,a.jsx)(`div`,{className:`mt-1 flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground`,children:f}),!x&&d&&(0,a.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:d})]})]})}var P=`bento-grid grid auto-rows-[minmax(140px,auto)] grid-cols-2 gap-4 md:grid-cols-4 md:gap-5 lg:grid-cols-6`;function F({items:e,error:t,tryAgainUrl:c,listId:l,eyebrow:u,backTo:d,backLabel:f,heroIcon:p,title:m,subtitle:h,tone:g=`indigo`,headerAction:_,newRoute:y,newLabel:b,newSubtitle:x,hideNew:C=!1,itemKey:w,renderTile:T,emptyTitle:E,emptyDescription:D,layout:O}){let{t:k}=(0,o.useTranslation)(),A=v(g),[M,N]=(0,i.useState)(!1),P=(0,i.useMemo)(()=>j(e??[],w,O?.data?.entries),[e,w,O?.data?.entries]),F=!!l&&!!O&&(e?.length??0)>0;return(0,a.jsxs)(r.t,{checkIsNotUndefined:e,error:t??null,tryAgainUrl:c,children:[(0,a.jsx)(S,{eyebrow:u,backTo:d,backLabel:f,leading:(0,a.jsx)(`span`,{className:`grid h-12 w-12 place-items-center rounded-2xl ${A} text-white shadow-md`,children:(0,a.jsx)(p,{size:24})}),title:m,subtitle:h}),(_||F&&!M)&&(0,a.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[_,F&&!M&&(0,a.jsxs)(n.l,{variant:`outline`,size:`sm`,onClick:()=>N(!0),className:`ml-auto gap-2`,children:[(0,a.jsx)(s.IconAdjustmentsHorizontal,{size:16}),k(`bento.layout.customize`,{defaultValue:`Customize layout`})]})]}),M&&l&&O?(0,a.jsx)(L,{layout:O,resolved:P,canEditGlobal:O?.data?.canEditGlobal??!1,isCustomized:O?.data?.source===`USER`,renderTile:T,chip:A,hideNew:C,newRoute:y,newLabel:b,newSubtitle:x,onClose:()=>N(!1)}):(0,a.jsx)(ee,{resolved:P,renderTile:T,chip:A,hideNew:C,newRoute:y,newLabel:b,newSubtitle:x,isEmpty:e?.length===0,emptyTitle:E,emptyDescription:D})]})}function I({items:e,error:t,tryAgainUrl:n,tone:i=`indigo`,newRoute:o,newLabel:s,newSubtitle:c,hideNew:l=!1,itemKey:u,renderTile:d,emptyTitle:f,emptyDescription:p}){let m=v(i);return(0,a.jsx)(r.t,{checkIsNotUndefined:e,error:t??null,tryAgainUrl:n,children:(0,a.jsxs)(`div`,{className:P,children:[!l&&o&&s?(0,a.jsx)(V,{route:o,label:s,subtitle:c,chip:m}):null,(e??[]).map(e=>(0,a.jsx)(`span`,{className:`contents`,children:d(e)},u(e))),e?.length===0&&(0,a.jsx)(H,{title:f,description:p})]})})}function ee({resolved:t,renderTile:n,chip:r,hideNew:i,newRoute:o,newLabel:s,newSubtitle:c,isEmpty:l,emptyTitle:u,emptyDescription:d}){let f=t.some(e=>e.emphasis===`SMALL`);return(0,a.jsxs)(`div`,{className:e.t(P,f&&`grid-flow-dense`),children:[!i&&(0,a.jsx)(V,{route:o,label:s,subtitle:c,chip:r}),t.map(({item:e,key:t,emphasis:r})=>(0,a.jsx)(`span`,{className:`contents`,children:n(e,r)},t)),l&&(0,a.jsx)(H,{title:u,description:d})]})}function L({layout:t,resolved:r,canEditGlobal:c,isCustomized:l,renderTile:f,chip:p,hideNew:m,newRoute:h,newLabel:g,newSubtitle:_,onClose:v}){let{t:y}=(0,o.useTranslation)(),[b,x]=(0,i.useState)(r),S=t.saving??!1,[C,w]=(0,i.useState)(!1),T=e=>async()=>{if(e){w(!1);try{await e(),v()}catch(e){console.error(`Failed to save the bento layout`,e),w(!0)}}},E=(0,u.useSensors)((0,u.useSensor)(u.PointerSensor,{activationConstraint:{distance:8}}),(0,u.useSensor)(u.KeyboardSensor));function D(e){let{active:t,over:n}=e;!n||t.id===n.id||x(e=>{let r=e.findIndex(e=>e.key===t.id),i=e.findIndex(e=>e.key===n.id);return r<0||i<0?e:(0,d.arrayMove)(e,r,i)})}function O(e,t){x(n=>n.map(n=>n.key===e?{...n,emphasis:t}:n))}let k=(0,i.useMemo)(()=>M(b),[b]),A=b.some(e=>e.emphasis===`SMALL`);return(0,a.jsxs)(`div`,{children:[(0,a.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2 rounded-2xl border border-border/60 bg-card/40 p-3 backdrop-blur-md`,children:[(0,a.jsx)(`span`,{className:`mr-auto text-sm text-muted-foreground`,children:y(`bento.layout.editHint`,{defaultValue:`Drag tiles to reorder · tap the size button to resize`})}),l&&t.onReset&&(0,a.jsxs)(n.l,{variant:`ghost`,size:`sm`,className:`gap-2`,disabled:S,onClick:T(t.onReset),children:[(0,a.jsx)(s.IconArrowBackUp,{size:16}),y(`bento.layout.reset`,{defaultValue:`Reset to default`})]}),c&&t.onSaveGlobal&&(0,a.jsxs)(n.l,{variant:`outline`,size:`sm`,className:`gap-2`,disabled:S,onClick:T(()=>t.onSaveGlobal?.(k)),children:[(0,a.jsx)(s.IconUsers,{size:16}),y(`bento.layout.saveGlobal`,{defaultValue:`Set as default for everyone`})]}),(0,a.jsxs)(n.l,{variant:`ghost`,size:`sm`,className:`gap-2`,disabled:S,onClick:v,children:[(0,a.jsx)(s.IconX,{size:16}),y(`common.cancel`,{defaultValue:`Cancel`})]}),(0,a.jsxs)(n.l,{size:`sm`,className:`gap-2`,disabled:S,onClick:T(()=>t.onSave(k)),children:[(0,a.jsx)(s.IconDeviceFloppy,{size:16}),y(`bento.layout.save`,{defaultValue:`Save layout`})]}),C&&(0,a.jsx)(`p`,{role:`alert`,className:`w-full text-sm text-destructive`,children:y(`bento.layout.saveFailed`,{defaultValue:`The layout could not be saved. Nothing has changed — try again.`})})]}),(0,a.jsx)(u.DndContext,{sensors:E,collisionDetection:u.closestCenter,onDragEnd:D,children:(0,a.jsx)(d.SortableContext,{items:b.map(e=>e.key),strategy:d.rectSortingStrategy,children:(0,a.jsxs)(`div`,{className:e.t(P,A&&`grid-flow-dense`),children:[!m&&(0,a.jsx)(V,{route:h,label:g,subtitle:_,chip:p}),b.map(({item:e,key:t,emphasis:n})=>(0,a.jsx)(B,{id:t,emphasis:n,onSetEmphasis:e=>O(t,e),children:f(e,n)},t))]})})})]})}var R=[`SMALL`,`MEDIUM`,`LARGE`],z={SMALL:{key:`bento.layout.size.small`,def:`Small`},MEDIUM:{key:`bento.layout.size.medium`,def:`Medium`},LARGE:{key:`bento.layout.size.large`,def:`Large`}};function B({id:t,emphasis:n,onSetEmphasis:r,children:i}){let{t:c}=(0,o.useTranslation)(),{attributes:l,listeners:u,setNodeRef:p,transform:m,transition:h,isDragging:g}=(0,d.useSortable)({id:t}),_={transform:f.CSS.Translate.toString(m),transition:h,opacity:g?.6:1,zIndex:g?50:void 0};return(0,a.jsxs)(`div`,{ref:p,style:_,className:e.t(`relative h-full`,k[n]),children:[(0,a.jsx)(`div`,{className:`pointer-events-none h-full select-none [&>*]:h-full [&>*]:w-full`,children:i}),(0,a.jsxs)(`div`,{className:`absolute right-2 top-2 z-10 flex items-center gap-1`,children:[(0,a.jsx)(`div`,{role:`group`,"aria-label":c(`bento.layout.sizeGroup`,{defaultValue:`Tile size`}),className:`flex items-center gap-0.5 rounded-full border border-border/60 bg-background/80 p-0.5 shadow-sm backdrop-blur`,children:R.map(t=>{let i=t===n,o=c(z[t].key,{defaultValue:z[t].def});return(0,a.jsx)(`button`,{type:`button`,onClick:()=>r(t),"aria-pressed":i,"aria-label":o,title:o,className:e.t(`grid h-6 w-6 place-items-center rounded-full text-[11px] font-semibold uppercase transition-colors`,i?`bg-primary text-primary-foreground shadow`:`text-muted-foreground hover:bg-muted`),children:o.charAt(0)},t)})}),(0,a.jsx)(`button`,{type:`button`,...l,...u,"aria-label":c(`bento.layout.dragToReorder`,{defaultValue:`Drag to reorder`}),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`,children:(0,a.jsx)(s.IconGripVertical,{size:14,className:`text-muted-foreground`})})]})]})}function V({route:e,label:t,subtitle:n,chip:r}){let{t:i}=(0,o.useTranslation)();return(0,a.jsxs)(l.Link,{to:e,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`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,a.jsx)(`span`,{className:`bento-pulse grid h-10 w-10 place-items-center rounded-2xl ${r} text-white shadow-md`,children:(0,a.jsx)(s.IconPlus,{size:20})}),(0,a.jsx)(`span`,{className:`text-[11px] uppercase tracking-wider text-muted-foreground`,children:i(`forms.formActions.new`,{defaultValue:`New`})})]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`div`,{className:`text-base font-semibold tracking-tight md:text-lg`,children:(0,a.jsx)(`span`,{className:`${r} bg-clip-text text-transparent`,children:t})}),n&&(0,a.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:n})]})]})}function H({title:e,description:t}){return(0,a.jsx)(b,{icon:s.IconSparkles,title:e,description:t,align:`start`,className:`col-span-2 row-span-2 justify-end md:col-span-4`})}function U({title:e,badges:n,actions:r,onCancel:i,loading:c,disabled:l,dirty:u,titleMissing:d}){let{t:f}=(0,o.useTranslation)();return(0,a.jsxs)(`div`,{className:`bento-glass flex items-center justify-between gap-4 rounded-2xl px-4 py-3 shadow-md backdrop-blur-xl`,children:[(0,a.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[e&&(0,a.jsx)(`p`,{className:`truncate text-base font-semibold tracking-tight md:text-lg`,children:e}),(0,a.jsx)(T,{titleMissing:d,dirty:u}),n&&(0,a.jsx)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:n})]}),(0,a.jsx)(`div`,{className:`flex shrink-0 gap-2`,children:r??(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.u,{type:`submit`,size:`sm`,loading:c,disabled:l,children:[(0,a.jsx)(s.IconDeviceFloppy,{className:`size-4`}),f(`forms.formActions.saveChanges`)]}),i&&(0,a.jsxs)(t.u,{type:`button`,variant:`outline`,size:`sm`,onClick:i,children:[(0,a.jsx)(s.IconX,{className:`size-4`}),f(`forms.formActions.cancel`)]})]})})]})}function W({children:e}){return(0,a.jsx)(`span`,{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`,children:e})}U.Badge=W;function G(e){let t=(0,i.useRef)(null);return E(t),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`div`,{ref:t,"aria-hidden":!0,className:`h-px`}),(0,a.jsx)(`div`,{"aria-hidden":!0,className:`bento-save-bar-spacer`}),(0,a.jsx)(`div`,{className:`bento-fade-in fixed inset-x-0 top-20 z-20 mx-auto w-full max-w-7xl px-4 md:px-8`,children:(0,a.jsx)(U,{...e})})]})}function K({eyebrow:e,backTo:n,backLabel:r,leading:i,title:c,subtitle:l,trailing:u,onCancel:d,actions:f,loading:p,dirty:m,titleMissing:h,saveDisabled:g,stickyTitle:_,stickyBadges:v}){let{t:y}=(0,o.useTranslation)(),b=g??(!!h||!m);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S,{eyebrow:n===void 0?e:(0,a.jsx)(x,{to:n,children:r}),leading:i,title:c,subtitle:l,trailing:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`div`,{className:`bento-fade-out flex shrink-0 items-center gap-2`,children:f??(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.u,{type:`submit`,size:`sm`,loading:p,disabled:b,children:[(0,a.jsx)(s.IconDeviceFloppy,{className:`size-4`}),y(`forms.formActions.saveChanges`)]}),(0,a.jsxs)(t.u,{type:`button`,variant:`outline`,size:`sm`,onClick:d,children:[(0,a.jsx)(s.IconX,{className:`size-4`}),y(`forms.formActions.cancel`)]})]})}),u]})}),(0,a.jsx)(G,{title:_,badges:v,actions:f,onCancel:d,loading:p,disabled:b,dirty:m,titleMissing:h})]})}function q({icon:t,tone:n,title:r,description:i,children:o,trailing:s,as:c=`h2`,className:l}){return(0,a.jsxs)(`section`,{className:e.t(`bento-tile bento-glass relative flex flex-col gap-5 overflow-hidden rounded-3xl p-5 md:p-6`,l),children:[(0,a.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,a.jsx)(`span`,{className:`grid h-10 w-10 place-items-center rounded-2xl text-white shadow-md ${v(n)}`,children:(0,a.jsx)(t,{size:20})}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,a.jsx)(c,{className:`text-base font-semibold tracking-tight md:text-lg`,children:r}),i&&(0,a.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i})]})]}),s&&(0,a.jsx)(`div`,{className:`shrink-0`,children:s})]}),(0,a.jsx)(`div`,{className:`flex flex-col gap-5`,children:o})]})}function J({children:t,className:n,contentClassName:r}){return(0,a.jsx)(`div`,{className:e.t(`bento-glass rounded-2xl shadow-md`,n),children:(0,a.jsx)(`div`,{className:r,children:t})})}var te=480;function ne(e){return window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)}function Y(){return window.scrollY>te}function re(){let{t:e}=(0,o.useTranslation)(),t=(0,i.useSyncExternalStore)(ne,Y,()=>!1);return(0,a.jsx)(`button`,{type:`button`,"aria-label":e(`bento.backToTop`,{defaultValue:`Back to top`}),tabIndex:t?0:-1,onClick:()=>window.scrollTo({top:0,behavior:`smooth`}),className:`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 ${t?`translate-y-0 scale-100 opacity-100`:`pointer-events-none translate-y-4 scale-90 opacity-0`}`,children:(0,a.jsx)(s.IconArrowUp,{size:18})})}function X(e){return e.bentoRoute??e.fallbackRoute}function Z({label:e,children:t}){return e?(0,a.jsxs)(`div`,{role:`group`,"aria-label":e,children:[(0,a.jsx)(`p`,{className:`px-3 pt-2 pb-1 text-xs font-medium text-muted-foreground`,children:e}),t]}):(0,a.jsx)(a.Fragment,{children:t})}function ie({index:e,active:t,icon:n,label:r,description:i,trailing:o,onActivate:c,onChoose:l}){return(0,a.jsxs)(`button`,{type:`button`,id:`bento-palette-opt-${e}`,"data-index":e,role:`option`,"aria-selected":t?`true`:`false`,onMouseEnter:c,onClick:l,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`}`,children:[n&&(0,a.jsx)(n,{size:18,className:`shrink-0 text-muted-foreground`}),(0,a.jsxs)(`span`,{className:`flex-1 truncate`,children:[r,i&&(0,a.jsx)(`span`,{className:`ml-2 text-muted-foreground`,children:i})]}),o??(t&&(0,a.jsx)(s.IconArrowRight,{"aria-hidden":!0,size:15,className:`shrink-0 text-muted-foreground`}))]})}function ae({open:e,onOpenChange:n,items:r,group:c,onQueryChange:u}){let{t:d}=(0,o.useTranslation)(),f=(0,l.useNavigate)(),[p,m]=(0,i.useState)(``),[h,g]=(0,i.useState)(0),_=(0,i.useRef)(null),v=(0,i.useMemo)(()=>{let e=p.trim().toLowerCase(),t=r.map(e=>({item:e,label:d(e.titleKey),description:d(e.descriptionKey)}));if(!e)return t;let n=[],i=[];for(let r of t)r.label.toLowerCase().includes(e)?n.push(r):r.description.toLowerCase().includes(e)&&i.push(r);return[...n,...i]},[r,p,d]),y=(0,i.useMemo)(()=>[...v.map(e=>({kind:`nav`,entry:e})),...(c?.items??[]).map(e=>({kind:`supplied`,item:e}))],[v,c]),b=(0,i.useRef)(u);(0,i.useEffect)(()=>{b.current=u}),(0,i.useEffect)(()=>{b.current?.(p)},[p]);let[x,S]=(0,i.useState)(e);e!==x&&(S(e),e&&(m(``),g(0)));let C=y.length===0?0:y.length-1;h>C&&g(C),(0,i.useEffect)(()=>{(_.current?.querySelector(`[data-index="${h}"]`))?.scrollIntoView({block:`nearest`})},[h]);function w(e){n(!1),e.kind===`nav`?f(X(e.entry.item)):c?.onSelect(e.item)}function T(e){if(e.key===`ArrowDown`)e.preventDefault(),g(e=>y.length===0?0:(e+1)%y.length);else if(e.key===`ArrowUp`)e.preventDefault(),g(e=>y.length===0?0:(e-1+y.length)%y.length);else if(e.key===`Enter`){e.preventDefault();let t=y[h];t&&w(t)}}return(0,a.jsx)(t.D,{open:e,onOpenChange:n,children:(0,a.jsxs)(t.k,{showCloseButton:!1,className:`top-[15%] max-w-xl translate-y-0 gap-0 overflow-hidden p-0`,onKeyDown:T,children:[(0,a.jsx)(t.F,{className:`sr-only`,children:d(`bento.palette.title`,{defaultValue:`Command palette`})}),(0,a.jsx)(t.A,{className:`sr-only`,children:d(`bento.palette.description`,{defaultValue:`Search and jump to any area`})}),(0,a.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-border/60 px-4`,children:[(0,a.jsx)(s.IconSearch,{size:18,className:`shrink-0 text-muted-foreground`}),(0,a.jsx)(`input`,{autoFocus:!0,type:`text`,role:`combobox`,"aria-expanded":`true`,"aria-controls":`bento-palette-list`,"aria-activedescendant":y[h]?`bento-palette-opt-${h}`:void 0,value:p,onChange:e=>m(e.target.value),placeholder:d(`bento.palette.placeholder`,{defaultValue:`Search areas…`}),className:`h-12 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground`})]}),(0,a.jsxs)(`div`,{ref:_,id:`bento-palette-list`,role:`listbox`,"aria-label":d(`bento.palette.title`,{defaultValue:`Command palette`}),className:`max-h-80 overflow-y-auto p-2`,children:[y.length===0&&!c?.pending&&(0,a.jsx)(`p`,{className:`px-3 py-6 text-center text-sm text-muted-foreground`,children:d(`bento.palette.noResults`,{defaultValue:`No matches`})}),(0,a.jsx)(Z,{label:c&&v.length>0?d(`bento.palette.areas`,{defaultValue:`Areas`}):void 0,children:v.map(({item:e,label:t},n)=>(0,a.jsx)(ie,{index:n,active:n===h,icon:e.icon,label:t,onActivate:()=>g(n),onChoose:()=>w(y[n]),trailing:e.bentoRoute?void 0:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.IconExternalLink,{"aria-hidden":!0,size:15,className:`shrink-0 text-muted-foreground/70`}),(0,a.jsx)(`span`,{className:`sr-only`,children:d(`bento.palette.opensConsole`,{defaultValue:`Opens in console`})})]})},e.id))}),c&&(0,a.jsxs)(Z,{label:c.label,children:[c.items.map((e,t)=>{let n=v.length+t;return(0,a.jsx)(ie,{index:n,active:n===h,icon:e.icon,label:e.label,description:e.description,onActivate:()=>g(n),onChoose:()=>w(y[n])},e.id)}),c.pending&&(0,a.jsx)(`p`,{className:`px-3 py-2.5 text-sm text-muted-foreground`,children:d(`bento.palette.searching`,{defaultValue:`Searching…`})})]})]})]})})}function oe({open:e,onOpenChange:n,isMac:r}){let{t:i}=(0,o.useTranslation)(),c=r?`⌘`:`Ctrl`,l=[{heading:i(`bento.shortcuts.global`,{defaultValue:`Global`}),rows:[{keys:[c,`K`],label:i(`bento.palette.open`,{defaultValue:`Open command palette`})},{keys:[`?`],label:i(`bento.shortcuts.openGuide`,{defaultValue:`Show keyboard shortcuts`})}]},{heading:i(`bento.shortcuts.palette`,{defaultValue:`Command palette`}),rows:[{keys:[`↑`,`↓`],label:i(`bento.shortcuts.navigate`,{defaultValue:`Move between results`})},{keys:[`↵`],label:i(`bento.shortcuts.openSelected`,{defaultValue:`Open the selected area`})},{keys:[`Esc`],label:i(`bento.shortcuts.dismiss`,{defaultValue:`Close the palette or a dialog`})}]}];return(0,a.jsx)(t.D,{open:e,onOpenChange:n,children:(0,a.jsxs)(t.k,{className:`max-w-md`,children:[(0,a.jsxs)(t.M,{children:[(0,a.jsxs)(t.F,{className:`flex items-center gap-2`,children:[(0,a.jsx)(s.IconKeyboard,{size:20,className:`bento-accent-icon`}),i(`bento.shortcuts.title`,{defaultValue:`Keyboard shortcuts`})]}),(0,a.jsx)(t.A,{children:i(`bento.shortcuts.description`,{defaultValue:`Move around without leaving the keyboard.`})})]}),(0,a.jsx)(`div`,{className:`flex flex-col gap-5`,children:l.map(e=>(0,a.jsxs)(`section`,{children:[(0,a.jsx)(`h3`,{className:`mb-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground`,children:e.heading}),(0,a.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.rows.map(e=>(0,a.jsxs)(`li`,{className:`flex items-center justify-between gap-4`,children:[(0,a.jsx)(`span`,{className:`text-sm text-foreground`,children:e.label}),(0,a.jsx)(`span`,{className:`flex shrink-0 items-center gap-1`,children:e.keys.map(e=>(0,a.jsx)(`kbd`,{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`,children:e},e))})]},e.label))})]},e.heading))})]})})}var se=s.IconLayoutGrid;function ce(e,t){return e===t||e.startsWith(`${t}/`)}function le(e,t){return t.section.areaRoute&&ce(e,t.section.areaRoute)?!0:t.items.some(t=>t.bentoRoute&&ce(e,t.bentoRoute))}function ue({groups:e,homeRoute:n,homeAliases:r,homeLabel:c}){let{t:u}=(0,o.useTranslation)(),{pathname:d}=(0,l.useLocation)(),f=(0,i.useMemo)(()=>e.filter(e=>!!e.section.areaRoute),[e]),p=d===n||(r?.includes(d)??!1);return(0,a.jsx)(t.o,{delayDuration:200,children:(0,a.jsxs)(`nav`,{"aria-label":u(`bento.nav.label`,{defaultValue:`Primary`}),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`,children:[(0,a.jsx)(de,{to:n,icon:s.IconHome,label:c??u(`home.title`,{defaultValue:`Home`}),active:p}),f.length>0&&(0,a.jsx)(`span`,{"aria-hidden":!0,className:`my-1 h-px w-6 bg-border/60`}),f.map(e=>(0,a.jsx)(de,{to:e.section.areaRoute,icon:e.section.icon??se,label:e.section.labelKey?u(e.section.labelKey):e.section.id,active:le(d,e)},e.section.id))]})})}function de({to:e,icon:n,label:r,active:i}){return(0,a.jsxs)(t.i,{children:[(0,a.jsx)(t.s,{asChild:!0,children:(0,a.jsx)(l.Link,{to:e,"aria-label":r,"aria-current":i?`page`:void 0,className:`bento-tile-clickable grid h-11 w-11 shrink-0 place-items-center rounded-2xl border transition-colors duration-200 ${i?`bento-rail-active`:`border-transparent text-muted-foreground hover:border-border/60 hover:bg-card/60 hover:text-foreground`}`,children:(0,a.jsx)(n,{size:20})})}),(0,a.jsx)(t.a,{side:`right`,children:r})]})}function fe({accountRoute:e,logoutUrl:r,organizationsRoute:i,tenantAdminRoute:c,onOpenShortcuts:u,onReplayTour:d}){let{user:f,status:p}=n.n(),{t:m}=(0,o.useTranslation)(),h=(0,l.useNavigate)(),g=`${f.firstName??``} ${f.lastName??``}`.trim()||f.username||``;return p===`loading`?(0,a.jsx)(`div`,{className:`h-9 w-9 rounded-full bg-muted/40`,"aria-hidden":!0}):(0,a.jsxs)(t.f,{children:[(0,a.jsx)(t.E,{asChild:!0,children:(0,a.jsx)(`button`,{type:`button`,title:g||f.username,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`,children:(0,a.jsx)(n.r,{givenName:f.firstName,familyName:f.lastName,name:g||f.username,src:f.avatarUrl||void 0,alt:f.username})})}),(0,a.jsxs)(t.m,{align:`end`,sideOffset:10,className:`bento-dropdown min-w-64 p-2`,children:[(0,a.jsx)(t._,{className:`p-0 font-normal`,children:(0,a.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl px-2 py-2 text-left text-sm`,children:[(0,a.jsx)(`span`,{className:`rounded-full p-0.5 ring-1 ring-border/60`,children:(0,a.jsx)(n.r,{givenName:f.firstName,familyName:f.lastName,name:g||f.username,src:f.avatarUrl||void 0,alt:f.username})}),(0,a.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[g&&(0,a.jsx)(`span`,{className:`truncate font-medium`,children:g}),f.email&&(0,a.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:f.email})]})]})}),(0,a.jsx)(t.x,{className:`my-1.5 bg-border/50`}),(0,a.jsxs)(t.h,{children:[(0,a.jsxs)(t.g,{onSelect:()=>h(e),className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2`,children:[(0,a.jsx)(s.IconUserCircle,{size:18}),m(`nav.account`)]}),i&&(0,a.jsxs)(t.g,{onSelect:()=>h(i),className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2`,children:[(0,a.jsx)(s.IconBuildingCommunity,{size:18}),m(`nav.organizations`,{defaultValue:`Organizations`})]}),c&&(0,a.jsxs)(t.g,{onSelect:()=>h(c),className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2`,children:[(0,a.jsx)(s.IconBuildingSkyscraper,{size:18}),m(`nav.tenantAdmin`,{defaultValue:`Tenant administration`})]})]}),(u||d)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.x,{className:`my-1.5 bg-border/50`}),(0,a.jsxs)(t.h,{children:[d&&(0,a.jsxs)(t.g,{onSelect:()=>d(),className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2`,children:[(0,a.jsx)(s.IconSparkles,{size:18}),m(`bento.tour.replay`,{defaultValue:`Take the tour`})]}),u&&(0,a.jsxs)(t.g,{onSelect:()=>u(),className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2`,children:[(0,a.jsx)(s.IconKeyboard,{size:18}),m(`bento.shortcuts.title`,{defaultValue:`Keyboard shortcuts`})]})]})]}),(0,a.jsx)(t.x,{className:`my-1.5 bg-border/50`}),(0,a.jsxs)(t.g,{onSelect:()=>{globalThis.location.href=r},className:`bento-dropdown-item cursor-pointer gap-2 px-3 py-2 bento-item-danger`,children:[(0,a.jsx)(s.IconLogout,{size:18}),m(`nav.logOut`)]})]})]})}var Q=(0,i.createContext)(`console`);function pe({chrome:e,children:t}){return(0,a.jsx)(Q.Provider,{value:e,children:t})}function me(){return(0,i.useContext)(Q)}var he={blue:`blue`,violet:`violet`,emerald:`emerald`,amber:`amber`,rose:`rose`,slate:`slate`,cyan:`blue`,orange:`amber`};function $({variant:e=`blue`,defaultOpen:t,className:r,children:o}){let s=(0,i.useContext)(Q),c,l;return s===`bento`&&i.Children.forEach(o,e=>{if(!(0,i.isValidElement)(e))return;let{type:t}=e;t===n.o.Header||t===n.o.StaticHeader?c=e.props:t===n.o.Content&&(l=e.props.children)}),s===`bento`&&c?(0,a.jsx)(q,{icon:c.icon,tone:he[e]??`blue`,title:c.title,description:c.description,className:r,children:l}):(0,a.jsx)(n.o,{variant:e,defaultOpen:t,className:r,children:o})}$.Header=n.o.Header,$.StaticHeader=n.o.StaticHeader,$.Content=n.o.Content;var ge=`bento-grid grid auto-rows-[minmax(140px,auto)] grid-cols-2 gap-4 md:grid-cols-4 md:gap-5 lg:grid-cols-6`;function _e({eyebrow:e,title:t,description:n,titleHref:r,children:i,gridClassName:o=ge}){let c=(0,a.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight md:text-2xl`,children:t});return(0,a.jsxs)(`section`,{className:`mb-8 md:mb-10`,children:[(0,a.jsxs)(`header`,{className:`bento-shell-header mb-4 flex flex-col gap-0.5`,children:[e&&(0,a.jsx)(`span`,{className:`text-xs uppercase tracking-[0.18em] text-muted-foreground`,children:e}),r?(0,a.jsxs)(l.Link,{to:r,className:`group inline-flex w-fit items-center gap-1 text-foreground transition-colors hover:text-primary`,children:[c,(0,a.jsx)(s.IconChevronRight,{size:20,className:`text-muted-foreground transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] group-hover:translate-x-1`})]}):c,n&&(0,a.jsx)(`p`,{className:`max-w-2xl text-sm text-muted-foreground`,children:n})]}),(0,a.jsx)(`div`,{className:o,children:i})]})}function ve({to:t,onClick:n,disabled:r=!1,disabledHint:i,icon:o,tone:c,eyebrow:u,title:d,span:f,featured:p=!1,children:m}){let h=!r&&!!(t||n),g=p?`h-14 w-14 rounded-2xl`:`h-9 w-9 rounded-2xl`,_=p?28:18,y=p?`text-xl font-semibold tracking-tight md:text-2xl`:`text-base font-semibold tracking-tight md:text-lg`,b=(0,a.jsxs)(a.Fragment,{children:[p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute -bottom-10 -right-10 h-64 w-64 rounded-full ${v(c)} opacity-40 blur-2xl dark:opacity-50`}),(0,a.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute right-12 top-1/3 h-32 w-32 rounded-full ${v(c)} bento-chip-tr opacity-20 blur-2xl dark:opacity-30`})]}),(0,a.jsxs)(`div`,{className:`relative z-1 flex items-center justify-between`,children:[(0,a.jsx)(`span`,{className:`grid place-items-center ${v(c)} text-white shadow-md ${g}`,children:(0,a.jsx)(o,{size:_})}),h&&(0,a.jsx)(s.IconChevronRight,{size:p?18:16,className:`text-muted-foreground transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] group-hover:translate-x-1`})]}),(0,a.jsxs)(`div`,{className:`relative z-1`,children:[(0,a.jsx)(`div`,{className:`text-[11px] uppercase tracking-wider text-muted-foreground`,children:u}),(0,a.jsx)(`div`,{className:`mt-0.5 ${y}`,children:d}),m&&(0,a.jsx)(`div`,{className:`mt-2`,children:m})]})]}),x=`bento-tile bento-glass group relative flex flex-col ${p?`gap-5`:`gap-4`} overflow-hidden text-left ${p?`p-6 md:p-7`:`p-5`} ${f}${h?` bento-tile-clickable`:``}${r?` cursor-not-allowed opacity-60`:``}`;return r?(0,a.jsx)(`div`,{className:x,"aria-disabled":`true`,title:i,children:b}):t?(0,a.jsx)(l.Link,{to:t,className:x,children:b}):n?(0,a.jsx)(`button`,{type:`button`,onClick:n,className:e.t(`w-full`,x),children:b}):(0,a.jsx)(`div`,{className:x,children:b})}exports.AdaptiveSectionCard=$,exports.BENTO_EMPHASIS_NEXT=A,exports.BENTO_EMPHASIS_SPAN=k,exports.BENTO_TONES=_,exports.BENTO_TONE_CLASS=g,exports.BentoActionsMenu=h,exports.BentoBackLink=x,exports.BentoBackToTop=re,exports.BentoCommandPalette=ae,exports.BentoCountTile=y,exports.BentoEmptyState=b,exports.BentoEntityShell=O,exports.BentoEntityTile=N,exports.BentoFormHero=K,exports.BentoFormSection=q,exports.BentoHero=S,exports.BentoHeroIconPicker=C,exports.BentoInlineEdit=w,exports.BentoListPage=F,exports.BentoNavRail=ue,exports.BentoPanel=J,exports.BentoSaveBar=U,exports.BentoScrollSaveBar=G,exports.BentoSection=_e,exports.BentoShortcutsDialog=oe,exports.BentoStatusMarker=T,exports.BentoTile=ve,exports.BentoTileGrid=I,exports.BentoUserMenu=fe,exports.SectionCardChromeProvider=pe,exports.bentoChipClass=v,exports.bentoNavTarget=X,exports.resolveBentoLayout=j,exports.toBentoLayoutEntries=M,exports.useBentoScrollFade=E,exports.useSectionChrome=me;
|