@viglet/viglet-design-system 2026.3.2 → 2026.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +277 -7
- package/dist/assets.cjs +1 -0
- package/dist/assets.es.js +2 -0
- package/dist/badge-locale-BxI9TwkE.js +579 -0
- package/dist/badge-locale-sIsBdP_e.cjs +7 -0
- package/dist/bento/bento-actions-menu.d.ts +42 -0
- package/dist/bento/bento-actions-menu.d.ts.map +1 -0
- package/dist/bento/bento-back-to-top.d.ts +11 -0
- package/dist/bento/bento-back-to-top.d.ts.map +1 -0
- package/dist/bento/bento-command-palette.d.ts +28 -0
- package/dist/bento/bento-command-palette.d.ts.map +1 -0
- package/dist/bento/bento-count-tile.d.ts +18 -0
- package/dist/bento/bento-count-tile.d.ts.map +1 -0
- package/dist/bento/bento-empty-state.d.ts +35 -0
- package/dist/bento/bento-empty-state.d.ts.map +1 -0
- package/dist/bento/bento-entity-shell.d.ts +123 -0
- package/dist/bento/bento-entity-shell.d.ts.map +1 -0
- package/dist/bento/bento-entity-tile.d.ts +40 -0
- package/dist/bento/bento-entity-tile.d.ts.map +1 -0
- package/dist/bento/bento-form-hero.d.ts +91 -0
- package/dist/bento/bento-form-hero.d.ts.map +1 -0
- package/dist/bento/bento-form-section.d.ts +31 -0
- package/dist/bento/bento-form-section.d.ts.map +1 -0
- package/dist/bento/bento-hero-icon-picker.d.ts +35 -0
- package/dist/bento/bento-hero-icon-picker.d.ts.map +1 -0
- package/dist/bento/bento-hero.d.ts +62 -0
- package/dist/bento/bento-hero.d.ts.map +1 -0
- package/dist/bento/bento-inline-edit.d.ts +52 -0
- package/dist/bento/bento-inline-edit.d.ts.map +1 -0
- package/dist/bento/bento-layout.d.ts +52 -0
- package/dist/bento/bento-layout.d.ts.map +1 -0
- package/dist/bento/bento-list-page.d.ts +124 -0
- package/dist/bento/bento-list-page.d.ts.map +1 -0
- package/dist/bento/bento-nav-rail.d.ts +32 -0
- package/dist/bento/bento-nav-rail.d.ts.map +1 -0
- package/dist/bento/bento-nav.d.ts +69 -0
- package/dist/bento/bento-nav.d.ts.map +1 -0
- package/dist/bento/bento-save-bar.d.ts +36 -0
- package/dist/bento/bento-save-bar.d.ts.map +1 -0
- package/dist/bento/bento-scroll-fade.d.ts +20 -0
- package/dist/bento/bento-scroll-fade.d.ts.map +1 -0
- package/dist/bento/bento-scroll-save-bar.d.ts +22 -0
- package/dist/bento/bento-scroll-save-bar.d.ts.map +1 -0
- package/dist/bento/bento-section-chrome.d.ts +60 -0
- package/dist/bento/bento-section-chrome.d.ts.map +1 -0
- package/dist/bento/bento-section.d.ts +27 -0
- package/dist/bento/bento-section.d.ts.map +1 -0
- package/dist/bento/bento-shortcuts-dialog.d.ts +15 -0
- package/dist/bento/bento-shortcuts-dialog.d.ts.map +1 -0
- package/dist/bento/bento-status-marker.d.ts +26 -0
- package/dist/bento/bento-status-marker.d.ts.map +1 -0
- package/dist/bento/bento-tile.d.ts +42 -0
- package/dist/bento/bento-tile.d.ts.map +1 -0
- package/dist/bento/bento-tones.d.ts +33 -0
- package/dist/bento/bento-tones.d.ts.map +1 -0
- package/dist/bento/bento-user-menu.d.ts +31 -0
- package/dist/bento/bento-user-menu.d.ts.map +1 -0
- package/dist/bento/index.d.ts +59 -0
- package/dist/bento/index.d.ts.map +1 -0
- package/dist/bento.cjs +1 -0
- package/dist/bento.css +442 -0
- package/dist/bento.es.js +1501 -0
- package/dist/breadcrumb.context-CTnZ4rD0.cjs +1 -0
- package/dist/breadcrumb.context-h2A2IEJ_.js +928 -0
- package/dist/components/badge-locale.d.ts.map +1 -1
- package/dist/components/error-boundary.d.ts.map +1 -1
- package/dist/components/language-select.d.ts.map +1 -1
- package/dist/components/router/blank-slate.d.ts +10 -0
- package/dist/components/router/blank-slate.d.ts.map +1 -1
- package/dist/components/router/grid.list.d.ts +13 -0
- package/dist/components/router/grid.list.d.ts.map +1 -1
- package/dist/components/router/internal.sidebar.d.ts +27 -2
- package/dist/components/router/internal.sidebar.d.ts.map +1 -1
- package/dist/components/router/loading-provider.d.ts +6 -1
- package/dist/components/router/loading-provider.d.ts.map +1 -1
- package/dist/components/router/nav-main.d.ts +10 -0
- package/dist/components/router/nav-main.d.ts.map +1 -1
- package/dist/components/router/nav-user.d.ts +13 -0
- package/dist/components/router/nav-user.d.ts.map +1 -1
- package/dist/components/router/page-content.d.ts +10 -0
- package/dist/components/router/page-content.d.ts.map +1 -1
- package/dist/components/router/page-header.d.ts +13 -0
- package/dist/components/router/page-header.d.ts.map +1 -1
- package/dist/components/router/page.d.ts +13 -0
- package/dist/components/router/page.d.ts.map +1 -1
- package/dist/components/router/sticky.page.header.d.ts +14 -0
- package/dist/components/router/sticky.page.header.d.ts.map +1 -1
- package/dist/components/router/sub.page.d.ts +15 -11
- package/dist/components/router/sub.page.d.ts.map +1 -1
- package/dist/components/router/sub.page.header.d.ts +13 -0
- package/dist/components/router/sub.page.header.d.ts.map +1 -1
- package/dist/components/startup-first/startup-first.d.ts.map +1 -1
- package/dist/components/ui/floating-formulas-bg.d.ts +8 -1
- package/dist/components/ui/floating-formulas-bg.d.ts.map +1 -1
- package/dist/components/ui/form.d.ts +2 -2
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/gradient-button.d.ts.map +1 -1
- package/dist/components/ui/gradient-switch.d.ts.map +1 -1
- package/dist/components/ui/icon-picker-dialog.d.ts +35 -0
- package/dist/components/ui/icon-picker-dialog.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/section-card.d.ts +3 -3
- package/dist/components/ui/section-card.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/slider.d.ts +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/contexts/user.context.d.ts +24 -0
- package/dist/contexts/user.context.d.ts.map +1 -1
- package/dist/exports.json +404 -0
- package/dist/floating-formulas-bg.cjs +1 -0
- package/dist/floating-formulas-bg.css +21 -0
- package/dist/floating-formulas-bg.es.js +83 -56
- package/dist/fonts/inter-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-wght-normal.woff2 +0 -0
- package/dist/fonts/plus-jakarta-sans-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/plus-jakarta-sans-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/plus-jakarta-sans-vietnamese-wght-normal.woff2 +0 -0
- package/dist/fonts.css +126 -0
- package/dist/hooks/use-grid-adapter.d.ts.map +1 -1
- package/dist/hooks/use-mobile.d.ts +10 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-sub-page-breadcrumb.d.ts.map +1 -1
- package/dist/i18n/index.d.ts +136 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/locales/en/bento.json.d.ts +51 -0
- package/dist/i18n/locales/en/common.json.d.ts +7 -1
- package/dist/i18n/locales/en/forms.json.d.ts +15 -1
- package/dist/i18n/locales/en/nav.json.d.ts +3 -1
- package/dist/i18n/locales/pt/bento.json.d.ts +51 -0
- package/dist/i18n/locales/pt/common.json.d.ts +7 -1
- package/dist/i18n/locales/pt/forms.json.d.ts +15 -1
- package/dist/i18n/locales/pt/nav.json.d.ts +3 -1
- package/dist/i18n-DoNdMLEd.cjs +1 -0
- package/dist/{i18n-C94rDRaM.js → i18n-DuNITbWa.js} +155 -27
- package/dist/{i18n.cjs.js → i18n.cjs} +1 -1
- package/dist/i18n.es.js +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +492 -750
- package/dist/lib/axios.d.ts.map +1 -1
- package/dist/lib/export-xlsx.d.ts +7 -1
- package/dist/lib/export-xlsx.d.ts.map +1 -1
- package/dist/lib/react-markers.d.ts +17 -0
- package/dist/lib/react-markers.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +22 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/loading-provider-1mgM91iY.cjs +1 -0
- package/dist/loading-provider-CMnOuvdR.js +224 -0
- package/dist/preset.css +103 -3
- package/dist/products-DL_YYXkV.cjs +1 -0
- package/dist/products-Du9KB6Xl.js +9 -0
- package/dist/{rolldown-runtime-CMqjfN_6.cjs → rolldown-runtime-BocRIvOZ.cjs} +1 -1
- package/dist/router.cjs +1 -0
- package/dist/router.es.js +358 -555
- package/dist/user.context-kPAqKN4o.js +512 -0
- package/dist/user.context-r50nSWER.cjs +1 -0
- package/dist/viglet-design-system.css +1 -1
- package/dist/vite/boot-loader.d.ts +14 -4
- package/dist/vite/boot-loader.d.ts.map +1 -1
- package/dist/{vite.cjs.js → vite.cjs} +8 -8
- package/dist/vite.es.js +29 -16
- package/package.json +66 -22
- package/scripts/check-duplicates.mjs +198 -0
- package/dist/breadcrumb.context-C7VCfh49.js +0 -1501
- package/dist/breadcrumb.context-Td6Tjc_z.cjs +0 -7
- package/dist/floating-formulas-bg.cjs.js +0 -1
- package/dist/i18n-DN_2YzjB.cjs +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/router.cjs.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-layout.d.ts","sourceRoot":"","sources":["../../src/bento/bento-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,8DAA8D;AAC9D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD,wDAAwD;AACxD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE9D,sCAAsC;AACtC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,aAAa,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,sEAAsE;AACtE,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,iBAAiB,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAI7D,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,aAAa,EAAE,aAAa,CAIpE,CAAC;AAEF,0EAA0E;AAC1E,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC;IACR,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,aAAa,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,KAAK,EAAE,CAAC,EAAE,EACV,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,EAC5B,OAAO,EAAE,gBAAgB,EAAE,GAAG,SAAS,GACtC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAwBxB;AAED,qFAAqF;AACrF,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAAG,gBAAgB,EAAE,CAE5F"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Icon as TablerIcon } from '@tabler/icons-react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { BentoEmphasis, BentoLayoutEntry, BentoLayoutResponse } from './bento-layout';
|
|
4
|
+
import { BentoTone } from './bento-tones';
|
|
5
|
+
export interface BentoListPageProps<T> {
|
|
6
|
+
/** Query data — `undefined` while loading (drives the LoadProvider gate). */
|
|
7
|
+
items: T[] | undefined;
|
|
8
|
+
/** Connection error message, or null. */
|
|
9
|
+
error?: string | null;
|
|
10
|
+
/** URL the LoadProvider "try again" link points at (usually the list route). */
|
|
11
|
+
tryAgainUrl: string;
|
|
12
|
+
/**
|
|
13
|
+
* Stable surface key (e.g. `"llm"`, `"aiAgent"`). When set, the list becomes
|
|
14
|
+
* **customizable** (T575): a "Customize" affordance lets the user drag-reorder
|
|
15
|
+
* tiles and set per-tile emphasis, persisted via the T574 cascade. Omit for a
|
|
16
|
+
* fixed (featured=idx0) list.
|
|
17
|
+
*/
|
|
18
|
+
listId?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Bespoke eyebrow content. For the common "breadcrumb back to a parent"
|
|
21
|
+
* case prefer {@link backTo} / {@link backLabel}, which render the canonical
|
|
22
|
+
* arrow+label via BentoHero. Provide at most one of `eyebrow` / `backTo`.
|
|
23
|
+
*/
|
|
24
|
+
eyebrow?: ReactNode;
|
|
25
|
+
/** Canonical breadcrumb back-link target (forwarded to BentoHero). */
|
|
26
|
+
backTo?: string;
|
|
27
|
+
/** Label for the {@link backTo} back-link. */
|
|
28
|
+
backLabel?: ReactNode;
|
|
29
|
+
heroIcon: TablerIcon;
|
|
30
|
+
title: string;
|
|
31
|
+
subtitle: string;
|
|
32
|
+
/** Tone driving the hero chip + New-tile gradient. Default `indigo`. */
|
|
33
|
+
tone?: BentoTone;
|
|
34
|
+
/**
|
|
35
|
+
* Optional global action(s) rendered in a row below the hero (left-aligned,
|
|
36
|
+
* sharing the row with the "Customize" button). Use for list-scoped launch
|
|
37
|
+
* actions that aren't per-item — e.g. the persona↔persona dialogue (T585).
|
|
38
|
+
*/
|
|
39
|
+
headerAction?: ReactNode;
|
|
40
|
+
newRoute: string;
|
|
41
|
+
newLabel: ReactNode;
|
|
42
|
+
newSubtitle?: ReactNode;
|
|
43
|
+
/** Hide the dashed "New" tile — e.g. a read-only BYO-infra catalog. */
|
|
44
|
+
hideNew?: boolean;
|
|
45
|
+
itemKey: (item: T) => string;
|
|
46
|
+
/** Render one item's tile at the resolved {@link BentoEmphasis} size. */
|
|
47
|
+
renderTile: (item: T, emphasis: BentoEmphasis) => ReactNode;
|
|
48
|
+
emptyTitle: string;
|
|
49
|
+
emptyDescription: string;
|
|
50
|
+
/**
|
|
51
|
+
* Persistence for the drag-reorder + resize mode. Omit it and the mosaic
|
|
52
|
+
* renders the default order with no customise affordance; `listId` alone is
|
|
53
|
+
* not enough, because there would be nowhere to write to.
|
|
54
|
+
*/
|
|
55
|
+
layout?: BentoListLayout;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Layout persistence for a customisable mosaic, supplied by the product.
|
|
59
|
+
*
|
|
60
|
+
* Where a layout is stored is the product's business — its API, its cache, its
|
|
61
|
+
* mutation library. What the mosaic needs is the resolved layout and somewhere
|
|
62
|
+
* to send a new one, so that is all it asks for. Omit this and the list renders
|
|
63
|
+
* the built-in default order with no customise affordance, which is the right
|
|
64
|
+
* behaviour for a surface nobody has taught to remember.
|
|
65
|
+
*/
|
|
66
|
+
export interface BentoListLayout {
|
|
67
|
+
/** The layout already resolved for this surface. */
|
|
68
|
+
data?: BentoLayoutResponse;
|
|
69
|
+
/** Persist this order and these sizes for the current user. */
|
|
70
|
+
onSave: (entries: BentoLayoutEntry[]) => Promise<unknown> | void;
|
|
71
|
+
/** Persist as everyone's default. Omit to hide the affordance. */
|
|
72
|
+
onSaveGlobal?: (entries: BentoLayoutEntry[]) => Promise<unknown> | void;
|
|
73
|
+
/** Drop the customisation. Omit to hide the affordance. */
|
|
74
|
+
onReset?: () => Promise<unknown> | void;
|
|
75
|
+
/** A write is in flight — the panel's controls disable while true. */
|
|
76
|
+
saving?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The reusable Bento list surface — the `bento-grid` mosaic with a
|
|
80
|
+
* dashed "New" tile, an empty-state hint, and per-item {@link BentoEmphasis}
|
|
81
|
+
* sizing. When a `listId` is supplied it also gains a drag-reorder + emphasis
|
|
82
|
+
* **edit mode** (T575) whose layout persists through the T574 cascade
|
|
83
|
+
* (per-user override → admin global template → featured=idx0 default). Every
|
|
84
|
+
* entity list is this component plus a `renderTile`; the common tile shape is
|
|
85
|
+
* covered by {@link BentoEntityTile}.
|
|
86
|
+
*/
|
|
87
|
+
export declare function BentoListPage<T>({ items, error, tryAgainUrl, listId, eyebrow, backTo, backLabel, heroIcon: HeroIcon, title, subtitle, tone, headerAction, newRoute, newLabel, newSubtitle, hideNew, itemKey, renderTile, emptyTitle, emptyDescription, layout, }: Readonly<BentoListPageProps<T>>): import("react").JSX.Element;
|
|
88
|
+
export interface BentoTileGridProps<T> {
|
|
89
|
+
/** Query data — `undefined` while loading (drives the LoadProvider gate). */
|
|
90
|
+
items: T[] | undefined;
|
|
91
|
+
/** Connection error message, or null. */
|
|
92
|
+
error?: string | null;
|
|
93
|
+
/** URL the LoadProvider "try again" link points at. */
|
|
94
|
+
tryAgainUrl: string;
|
|
95
|
+
/** Tone driving the dashed New-tile gradient. Default `indigo`. */
|
|
96
|
+
tone?: BentoTone;
|
|
97
|
+
newRoute?: string;
|
|
98
|
+
newLabel?: ReactNode;
|
|
99
|
+
newSubtitle?: ReactNode;
|
|
100
|
+
/** Force-hide the dashed "New" tile (e.g. a Keycloak-backed read-only list). */
|
|
101
|
+
hideNew?: boolean;
|
|
102
|
+
itemKey: (item: T) => string;
|
|
103
|
+
/** Render one item's tile (typically a {@link BentoEntityTile}). */
|
|
104
|
+
renderTile: (item: T) => ReactNode;
|
|
105
|
+
emptyTitle: string;
|
|
106
|
+
emptyDescription: string;
|
|
107
|
+
/**
|
|
108
|
+
* Persistence for the drag-reorder + resize mode. Omit it and the mosaic
|
|
109
|
+
* renders the default order with no customise affordance; `listId` alone is
|
|
110
|
+
* not enough, because there would be nowhere to write to.
|
|
111
|
+
*/
|
|
112
|
+
layout?: BentoListLayout;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The Bento mosaic **without** a hero — the frosted `bento-grid` of tiles, an
|
|
116
|
+
* optional dashed "New" tile, and an empty-state hint. Use it for list content
|
|
117
|
+
* that renders inside a shell which already owns the header (e.g. a page with a
|
|
118
|
+
* shared {@link BentoHero} + pill tab-bar `Outlet`, like Administration, or a
|
|
119
|
+
* read-only landing that renders its own hero above the grid). Standalone CRUD
|
|
120
|
+
* lists should use {@link BentoListPage}, which wraps this shape with a hero and
|
|
121
|
+
* the T575 customize/reorder mode.
|
|
122
|
+
*/
|
|
123
|
+
export declare function BentoTileGrid<T>({ items, error, tryAgainUrl, tone, newRoute, newLabel, newSubtitle, hideNew, itemKey, renderTile, emptyTitle, emptyDescription, }: Readonly<BentoTileGridProps<T>>): import("react").JSX.Element;
|
|
124
|
+
//# sourceMappingURL=bento-list-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-list-page.d.ts","sourceRoot":"","sources":["../../src/bento/bento-list-page.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BentoNavGroup } from './bento-nav';
|
|
2
|
+
/**
|
|
3
|
+
* The persistent Bento navigation rail (T549, restructured in T573) — a slim,
|
|
4
|
+
* fixed, frosted icon strip on the left (desktop only). It lists **Home + the
|
|
5
|
+
* three section hubs** (Generative AI · Enterprise Search · Management), never
|
|
6
|
+
* the ~22 leaf surfaces. That keeps the rail at a fixed, small height no matter
|
|
7
|
+
* how many surfaces migrate, so it can never overflow the viewport the way the
|
|
8
|
+
* flat console sidebar did. Each hub opens an area page that groups every
|
|
9
|
+
* surface of that section as a bento mosaic; individual surfaces are reached
|
|
10
|
+
* from the hub or jumped to directly via the `⌘K` command palette.
|
|
11
|
+
*
|
|
12
|
+
* Hidden below `md` — on mobile the header's command button + global `⌘K`
|
|
13
|
+
* provide navigation without the rail eating horizontal space.
|
|
14
|
+
*/
|
|
15
|
+
export interface BentoNavRailProps {
|
|
16
|
+
/**
|
|
17
|
+
* The sections a product decided this reader may see, already filtered.
|
|
18
|
+
* Privileges and licences are the product's to know; the rail renders.
|
|
19
|
+
*/
|
|
20
|
+
groups: BentoNavGroup[];
|
|
21
|
+
/** Where the Home button leads. */
|
|
22
|
+
homeRoute: string;
|
|
23
|
+
/**
|
|
24
|
+
* Extra paths that should also light the Home button — a product whose bento
|
|
25
|
+
* root and home page are different routes passes both.
|
|
26
|
+
*/
|
|
27
|
+
homeAliases?: string[];
|
|
28
|
+
/** Label for the Home button. Defaults to the `home.title` translation. */
|
|
29
|
+
homeLabel?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function BentoNavRail({ groups, homeRoute, homeAliases, homeLabel, }: Readonly<BentoNavRailProps>): import("react").JSX.Element;
|
|
32
|
+
//# sourceMappingURL=bento-nav-rail.d.ts.map
|
|
@@ -0,0 +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,EAAE,MAAM,aAAa,CAAC;AAiBjD;;;;;;;;;;;;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,+BAqC7B"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Icon as TablerIcon } from '@tabler/icons-react';
|
|
2
|
+
import { BentoTone } from './bento-tones';
|
|
3
|
+
/**
|
|
4
|
+
* The shape of a navigation entry, without the entries.
|
|
5
|
+
*
|
|
6
|
+
* The rail, the hubs and the command palette all render the same thing, and
|
|
7
|
+
* what they render is one product's map of itself: its routes, its entity
|
|
8
|
+
* names, its sections. So the schema lives here and the array lives in the
|
|
9
|
+
* product — a package holding the array would offer Turing's routes inside a
|
|
10
|
+
* Shio console. viglet-ds-consumer-pair -- two products contrasted, not the
|
|
11
|
+
* consumer set enumerated.
|
|
12
|
+
*
|
|
13
|
+
* This is the *render* contract, deliberately narrower than what a product
|
|
14
|
+
* keeps. Visibility is a product concern: privileges, licences and which
|
|
15
|
+
* capabilities are switched on are all things only the product can answer, and
|
|
16
|
+
* it answers them before handing over a list. Carry those fields on your own
|
|
17
|
+
* type and pass the result:
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
* interface MyNavItem extends BentoNavItem { privilege?: string }
|
|
21
|
+
* const visible: BentoNavItem[] = all.filter(canSee)
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
/** Which band of the rail a section belongs to; a product names its own. */
|
|
25
|
+
export type BentoNavSectionId = string;
|
|
26
|
+
export interface BentoNavSection {
|
|
27
|
+
id: BentoNavSectionId;
|
|
28
|
+
/** i18n key for the section label. A section with none renders unlabelled. */
|
|
29
|
+
labelKey?: string;
|
|
30
|
+
/** i18n key for the section description, shown on a hub. */
|
|
31
|
+
descriptionKey?: string;
|
|
32
|
+
/** Icon shown for this section on the nav rail. */
|
|
33
|
+
icon?: TablerIcon;
|
|
34
|
+
/**
|
|
35
|
+
* The section's hub page. The rail links here and the hub renders every
|
|
36
|
+
* visible item of the section as a mosaic. A section without one is reached
|
|
37
|
+
* through its items alone.
|
|
38
|
+
*/
|
|
39
|
+
areaRoute?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface BentoNavItem {
|
|
42
|
+
id: string;
|
|
43
|
+
/** i18n key for the item label. */
|
|
44
|
+
titleKey: string;
|
|
45
|
+
/** i18n key for the item description, shown as the tile body. */
|
|
46
|
+
descriptionKey: string;
|
|
47
|
+
icon: TablerIcon;
|
|
48
|
+
section: BentoNavSectionId;
|
|
49
|
+
/** Tile tone on the mosaic. */
|
|
50
|
+
tone: BentoTone;
|
|
51
|
+
/** Grid span on the mosaic. Defaults to a 1×1 square when omitted. */
|
|
52
|
+
span?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Where this surface lives. Optional because a product mid-migration may not
|
|
55
|
+
* have moved it yet, in which case {@link BentoNavItem.fallbackRoute} is
|
|
56
|
+
* where the palette and the hubs send a reader instead.
|
|
57
|
+
*/
|
|
58
|
+
bentoRoute?: string;
|
|
59
|
+
/** Where to go while a surface has no bento route of its own. */
|
|
60
|
+
fallbackRoute: string;
|
|
61
|
+
}
|
|
62
|
+
/** One section and the items a product decided are visible in it. */
|
|
63
|
+
export interface BentoNavGroup {
|
|
64
|
+
section: BentoNavSection;
|
|
65
|
+
items: BentoNavItem[];
|
|
66
|
+
}
|
|
67
|
+
/** Where an item points: its own route if it has one, its fallback otherwise. */
|
|
68
|
+
export declare function bentoNavTarget(item: BentoNavItem): string;
|
|
69
|
+
//# sourceMappingURL=bento-nav.d.ts.map
|
|
@@ -0,0 +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,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,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"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface BentoSaveBarProps {
|
|
3
|
+
/** Headline shown alongside the badges. Renders only when provided. */
|
|
4
|
+
title?: string;
|
|
5
|
+
badges?: ReactNode;
|
|
6
|
+
/** Override the default Save / Cancel pair. */
|
|
7
|
+
actions?: ReactNode;
|
|
8
|
+
onCancel?: () => void;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Show the amber "unsaved changes" marker next to the title. */
|
|
12
|
+
dirty?: boolean;
|
|
13
|
+
/** Show the red "title required" marker (takes precedence over `dirty`). */
|
|
14
|
+
titleMissing?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface BentoSaveBarBadgeProps {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Renderless save-bar surface (visual only). Frosted-glass + iOS
|
|
21
|
+
* spring easing on the buttons.
|
|
22
|
+
*
|
|
23
|
+
* Position-agnostic: the consumer wraps it with whatever positioning
|
|
24
|
+
* makes sense (sticky, fixed, scroll-linked transforms, etc). For
|
|
25
|
+
* Bento detail pages it's typically wrapped in a `position: fixed`
|
|
26
|
+
* container at `top-20` whose opacity/translate are driven by the
|
|
27
|
+
* page's hero-scroll progress, so the bar feels like the header
|
|
28
|
+
* morphing into a sticky bar as the user scrolls.
|
|
29
|
+
*/
|
|
30
|
+
declare function BentoSaveBar({ title, badges, actions, onCancel, loading, disabled, dirty, titleMissing, }: Readonly<BentoSaveBarProps>): import("react").JSX.Element;
|
|
31
|
+
declare namespace BentoSaveBar {
|
|
32
|
+
var Badge: typeof BentoSaveBarBadge;
|
|
33
|
+
}
|
|
34
|
+
declare function BentoSaveBarBadge({ children }: Readonly<BentoSaveBarBadgeProps>): import("react").JSX.Element;
|
|
35
|
+
export { BentoSaveBar };
|
|
36
|
+
//# sourceMappingURL=bento-save-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-save-bar.d.ts","sourceRoot":"","sources":["../../src/bento/bento-save-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAK,EACL,YAAY,GACb,EAAE,QAAQ,CAAC,iBAAiB,CAAC,+BAmC7B;kBA5CQ,YAAY;;;AA8CrB,iBAAS,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,sBAAsB,CAAC,+BAMxE;AAID,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Drives the shared Bento "hero → sticky save bar" scroll morph.
|
|
4
|
+
*
|
|
5
|
+
* Each scroll frame it computes a 0..1 progress from the sentinel's viewport
|
|
6
|
+
* position and writes it as `--bento-fade` on `<html>`, toggling
|
|
7
|
+
* `bento-fade-half` past the midpoint. CSS inheritance then distributes it:
|
|
8
|
+
* hero-anchored controls (`bento-fade-out`) fade away and the fixed save bar
|
|
9
|
+
* (`bento-fade-in`) fades in, with zero React re-renders during scroll.
|
|
10
|
+
*
|
|
11
|
+
* - sentinel at 160px (STICKY_OFFSET + REVEAL_RANGE) → progress 0
|
|
12
|
+
* - sentinel at 80px (STICKY_OFFSET) → progress 1
|
|
13
|
+
*
|
|
14
|
+
* Extracted verbatim from {@link BentoEntityShell} so standalone form pages
|
|
15
|
+
* (which render their own hero instead of using the shell) can reuse the exact
|
|
16
|
+
* same mechanic via {@link BentoScrollSaveBar}. Pass a ref to a 1px sentinel
|
|
17
|
+
* rendered immediately after the hero.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useBentoScrollFade(sentinelRef: RefObject<HTMLElement | null>): void;
|
|
20
|
+
//# sourceMappingURL=bento-scroll-fade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-scroll-fade.d.ts","sourceRoot":"","sources":["../../src/bento/bento-scroll-fade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,QAoC5E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BentoSaveBarProps } from './bento-save-bar';
|
|
2
|
+
/**
|
|
3
|
+
* The scroll-linked save bar for Bento form pages that render their own hero
|
|
4
|
+
* (i.e. not built on {@link BentoEntityShell}). It reproduces the shell's
|
|
5
|
+
* "hero → sticky bar" morph so every form behaves identically:
|
|
6
|
+
*
|
|
7
|
+
* - At the top of the page the Save/Cancel controls live in the hero
|
|
8
|
+
* (wrap them in a `bento-fade-out` container so they fade as you scroll).
|
|
9
|
+
* - As the hero scrolls away this fixed bar fades in at `top-20`, below the
|
|
10
|
+
* shell header — so the controls appear to move from the header into a
|
|
11
|
+
* sticky bar, and nothing is shown until the title actually scrolls off.
|
|
12
|
+
*
|
|
13
|
+
* Self-contained: it renders its own 1px sentinel driven by
|
|
14
|
+
* {@link useBentoScrollFade} (the exact mechanic extracted from
|
|
15
|
+
* {@link BentoEntityShell}), the layout spacer, and a fixed `bento-fade-in`
|
|
16
|
+
* {@link BentoSaveBar}. Render it immediately after the hero, inside the
|
|
17
|
+
* `<form>` it submits (the default Save button is `type="submit"`). Keep the
|
|
18
|
+
* destructive action in the hero copy only — never pass a delete dialog here,
|
|
19
|
+
* since a controlled dialog rendered twice would open two modals at once.
|
|
20
|
+
*/
|
|
21
|
+
export declare function BentoScrollSaveBar(props: Readonly<BentoSaveBarProps>): import("react").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=bento-scroll-save-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-scroll-save-bar.d.ts","sourceRoot":"","sources":["../../src/bento/bento-scroll-save-bar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGxE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,+BAYpE"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ColorVariant } from '../components/ui/section-card';
|
|
3
|
+
/**
|
|
4
|
+
* Which chrome a section renders in. `console` is the default, so a form that
|
|
5
|
+
* knows nothing about this behaves exactly as it always did.
|
|
6
|
+
*/
|
|
7
|
+
export type SectionChrome = "console" | "bento";
|
|
8
|
+
/**
|
|
9
|
+
* Declare the chrome for everything beneath it.
|
|
10
|
+
*
|
|
11
|
+
* This is what lets one form live in two consoles at once. A product migrating
|
|
12
|
+
* behind a parallel route has its largest forms — a post editor, a site editor —
|
|
13
|
+
* rendered in both eras for the length of the migration, and the alternative to
|
|
14
|
+
* this is forking them: two copies of real field logic, drifting.
|
|
15
|
+
*
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <SectionCardChromeProvider chrome="bento">
|
|
18
|
+
* <MySharedForm />
|
|
19
|
+
* </SectionCardChromeProvider>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function SectionCardChromeProvider({ chrome, children, }: Readonly<{
|
|
23
|
+
chrome: SectionChrome;
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}>): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* The chrome the nearest provider declared.
|
|
28
|
+
*
|
|
29
|
+
* A shared section reads this to drop layout its other chrome imposes — the
|
|
30
|
+
* console's narrow centred column has no business inside a full-width shell.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useSectionChrome(): SectionChrome;
|
|
33
|
+
export interface AdaptiveSectionCardProps {
|
|
34
|
+
variant?: ColorVariant;
|
|
35
|
+
/** Console chrome only — the frosted section does not collapse. */
|
|
36
|
+
defaultOpen?: boolean;
|
|
37
|
+
className?: string;
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A `SectionCard` that renders as a frosted {@link BentoFormSection} under a
|
|
42
|
+
* `bento` {@link SectionCardChromeProvider}, and as the console's collapsible
|
|
43
|
+
* card everywhere else. Import it aliased where you want a drop-in:
|
|
44
|
+
*
|
|
45
|
+
* ```tsx
|
|
46
|
+
* import { AdaptiveSectionCard as SectionCard } from "@viglet/viglet-design-system/bento"
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* The compound markup does not change. In bento chrome it reads the icon, title
|
|
50
|
+
* and description off the `Header` (or `StaticHeader`) child and the fields off
|
|
51
|
+
* the `Content` child, so a form is written once and neither copy of it drifts.
|
|
52
|
+
*/
|
|
53
|
+
declare function AdaptiveSectionCard({ variant, defaultOpen, className, children, }: Readonly<AdaptiveSectionCardProps>): import("react").JSX.Element;
|
|
54
|
+
declare namespace AdaptiveSectionCard {
|
|
55
|
+
var Header: ({ icon: Icon, title, description, className }: Readonly<import("@/components/ui/section-card").HeaderProps>) => import("react").JSX.Element;
|
|
56
|
+
var StaticHeader: ({ icon: Icon, title, description, className }: Readonly<import("@/components/ui/section-card").StaticHeaderProps>) => import("react").JSX.Element;
|
|
57
|
+
var Content: ({ children, className }: Readonly<import("@/components/ui/section-card").ContentProps>) => import("react").JSX.Element | null;
|
|
58
|
+
}
|
|
59
|
+
export { AdaptiveSectionCard };
|
|
60
|
+
//# sourceMappingURL=bento-section-chrome.d.ts.map
|
|
@@ -0,0 +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,+BAsCpC;kBA3CQ,mBAAmB;;;;;AAiD5B,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface BentoSectionProps {
|
|
3
|
+
/** Section heading — small uppercase eyebrow above the title. */
|
|
4
|
+
eyebrow?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
/**
|
|
8
|
+
* When set, the title becomes a link to this route (e.g. the section's area
|
|
9
|
+
* hub) with a chevron affordance. Used on the home overview so each section
|
|
10
|
+
* heading drills into its dedicated hub page.
|
|
11
|
+
*/
|
|
12
|
+
titleHref?: string;
|
|
13
|
+
/** Tile children — should be `BentoTile` / `BentoCountTile` instances. */
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
/** Override the grid template. Defaults to a 2/4/6-col responsive bento grid. */
|
|
16
|
+
gridClassName?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Section wrapper for a Bento page. Renders an iOS-style heading
|
|
20
|
+
* (eyebrow + title + description) followed by a stagger-animated grid.
|
|
21
|
+
*
|
|
22
|
+
* Each section runs its own `bento-grid` so the nth-child stagger
|
|
23
|
+
* restarts within the section — preserves the cascading reveal even
|
|
24
|
+
* across long pages.
|
|
25
|
+
*/
|
|
26
|
+
export declare function BentoSection({ eyebrow, title, description, titleHref, children, gridClassName, }: Readonly<BentoSectionProps>): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=bento-section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-section.d.ts","sourceRoot":"","sources":["../../src/bento/bento-section.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,QAAQ,EAAE,SAAS,CAAC;IACpB,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAYD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAQ,EACR,aAAoC,GACrC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,+BAiC7B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface BentoShortcutsDialogProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onOpenChange: (open: boolean) => void;
|
|
4
|
+
/** True on macOS — swaps the ⌘ glyph for Ctrl on every other platform. */
|
|
5
|
+
isMac: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The keyboard-shortcut guide (T572) — a reference sheet for the handful of
|
|
9
|
+
* global + palette shortcuts the bento shell actually binds. Opened with `?`
|
|
10
|
+
* from anywhere, or from the user menu. Kept honest: it lists only shortcuts
|
|
11
|
+
* that really work (⌘K/Ctrl+K + `?` are global; the arrow/enter/esc set drives
|
|
12
|
+
* the command palette), so pressing what's shown always does what's shown.
|
|
13
|
+
*/
|
|
14
|
+
export declare function BentoShortcutsDialog({ open, onOpenChange, isMac }: Readonly<BentoShortcutsDialogProps>): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=bento-shortcuts-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-shortcuts-dialog.d.ts","sourceRoot":"","sources":["../../src/bento/bento-shortcuts-dialog.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,0EAA0E;IAC1E,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,QAAQ,CAAC,yBAAyB,CAAC,+BAgEtG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface BentoStatusMarkerProps {
|
|
2
|
+
/**
|
|
3
|
+
* The title is empty / missing. Takes precedence over `dirty` and renders
|
|
4
|
+
* a red blocking marker — the same condition that disables the Save button.
|
|
5
|
+
*/
|
|
6
|
+
titleMissing?: boolean;
|
|
7
|
+
/** There are unsaved changes — renders an amber "unsaved" cue. */
|
|
8
|
+
dirty?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Small status chip surfacing the two save-state cues the Bento detail pages
|
|
13
|
+
* carry (restored parity with the pre-redesign sticky header):
|
|
14
|
+
*
|
|
15
|
+
* - `titleMissing` → a red "Title required" blocker (Save is also disabled).
|
|
16
|
+
* - `dirty` → an amber "Unsaved changes" cue with a pulsing dot.
|
|
17
|
+
*
|
|
18
|
+
* Renders nothing when neither applies. Case/tracking are reset so it can sit
|
|
19
|
+
* inside the hero eyebrow (which is uppercase + wide-tracked) without
|
|
20
|
+
* inheriting those styles.
|
|
21
|
+
*
|
|
22
|
+
* @author Alexandre Oliveira
|
|
23
|
+
* @since 2026.3.4
|
|
24
|
+
*/
|
|
25
|
+
export declare function BentoStatusMarker({ titleMissing, dirty, className }: Readonly<BentoStatusMarkerProps>): import("react").JSX.Element | null;
|
|
26
|
+
//# sourceMappingURL=bento-status-marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-status-marker.d.ts","sourceRoot":"","sources":["../../src/bento/bento-status-marker.tsx"],"names":[],"mappings":"AAGA,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"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { BentoTone } from './bento-tones';
|
|
3
|
+
export interface BentoTileProps {
|
|
4
|
+
/** Destination route. When omitted, the tile renders as a non-clickable surface. */
|
|
5
|
+
to?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Click handler for action tiles (e.g. "Open chat") that run imperative work
|
|
8
|
+
* before navigating rather than being a plain link. Ignored when `to` is set
|
|
9
|
+
* or the tile is `disabled`; renders the tile as a `<button>`.
|
|
10
|
+
*/
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* Renders the tile as a non-interactive surface with reduced opacity and the
|
|
14
|
+
* `disabledHint` tooltip — for actions that exist but don't apply to the
|
|
15
|
+
* current entity (e.g. content validation on a non-audience persona).
|
|
16
|
+
*/
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
disabledHint?: string;
|
|
19
|
+
icon: ComponentType<{
|
|
20
|
+
size?: number;
|
|
21
|
+
}>;
|
|
22
|
+
tone: BentoTone;
|
|
23
|
+
eyebrow: string;
|
|
24
|
+
title: string;
|
|
25
|
+
/** Tailwind grid-span classes — the consumer drives the mosaic layout. */
|
|
26
|
+
span: string;
|
|
27
|
+
/**
|
|
28
|
+
* Marks this tile as the "hero" of its section (typically a 2x2 span).
|
|
29
|
+
* Featured tiles get a larger icon, larger title, and a soft tonal
|
|
30
|
+
* ornament that fills the extra real-estate so the surface doesn't
|
|
31
|
+
* read as half-empty next to short-content siblings.
|
|
32
|
+
*/
|
|
33
|
+
featured?: boolean;
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Generic Bento tile: icon chip + eyebrow + title + optional body.
|
|
38
|
+
* Press / hover / entry animations come from `bento.styles.css` via
|
|
39
|
+
* the `.bento-tile` and `.bento-glass` classes.
|
|
40
|
+
*/
|
|
41
|
+
export declare function BentoTile({ to, onClick, disabled, disabledHint, icon: Icon, tone, eyebrow, title, span, featured, children, }: Readonly<BentoTileProps>): import("react").JSX.Element;
|
|
42
|
+
//# sourceMappingURL=bento-tile.d.ts.map
|
|
@@ -0,0 +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;AAEtD,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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colour tones for bento tiles.
|
|
3
|
+
*
|
|
4
|
+
* A tone names the gradient on the icon chip; the surface behind it stays
|
|
5
|
+
* frosted and neutral so the two never compete. What a tone *is* lives in CSS:
|
|
6
|
+
* `bento.css` maps each name to `--bento-tone-from` / `--bento-tone-to`, which
|
|
7
|
+
* resolve from `--vg-bento-tone-<name>-*` in the preset.
|
|
8
|
+
*
|
|
9
|
+
* That indirection is the point. These used to be Tailwind colour classes baked
|
|
10
|
+
* into the components, so the palette belonged to this package rather than to
|
|
11
|
+
* the product rendering it — and Turing is blue where Shio is orange. A product
|
|
12
|
+
* re-keys a tone by redefining two custom properties, and forks nothing.
|
|
13
|
+
* viglet-ds-consumer-pair -- two products contrasted, not the consumer set.
|
|
14
|
+
*/
|
|
15
|
+
export type BentoTone = "blue" | "indigo" | "violet" | "emerald" | "amber" | "rose" | "slate";
|
|
16
|
+
/**
|
|
17
|
+
* The class that carries a tone. Pair it with `bento-chip`, which is what
|
|
18
|
+
* paints the gradient:
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <span className={`bento-chip ${BENTO_TONE_CLASS[tone]}`} />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const BENTO_TONE_CLASS: Record<BentoTone, string>;
|
|
25
|
+
/** Every tone this package defines, in the order the palette reads. */
|
|
26
|
+
export declare const BENTO_TONES: BentoTone[];
|
|
27
|
+
/**
|
|
28
|
+
* The class list for a chip of the given tone. `slate` is the fallback for an
|
|
29
|
+
* unknown value, which is what the chip's own CSS falls back to as well — a tile
|
|
30
|
+
* with a bad tone should look plain, not unstyled.
|
|
31
|
+
*/
|
|
32
|
+
export declare function bentoChipClass(tone: BentoTone | undefined): string;
|
|
33
|
+
//# sourceMappingURL=bento-tones.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-tones.d.ts","sourceRoot":"","sources":["../../src/bento/bento-tones.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,MAAM,GACN,OAAO,CAAC;AAEZ;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAQtD,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,WAAW,EAAoC,SAAS,EAAE,CAAC;AAExE;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAElE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User avatar + dropdown styled to harmonize with the Bento UI.
|
|
3
|
+
*
|
|
4
|
+
* Uses the same Radix DropdownMenu primitives as the design-system
|
|
5
|
+
* `UserMenu`, but the surface (`.bento-dropdown`) and items
|
|
6
|
+
* (`.bento-dropdown-item`) carry the frosted-glass look and iOS spring
|
|
7
|
+
* easing so it feels like part of the bento language.
|
|
8
|
+
*/
|
|
9
|
+
export interface BentoUserMenuProps {
|
|
10
|
+
/** Where the account entry leads. */
|
|
11
|
+
accountRoute: string;
|
|
12
|
+
/** Where signing out goes — a full navigation, not a router one. */
|
|
13
|
+
logoutUrl: string;
|
|
14
|
+
/**
|
|
15
|
+
* Where the organizations entry leads. Omit to hide it.
|
|
16
|
+
*
|
|
17
|
+
* A route rather than a feature flag: whether a product has tenancy, and
|
|
18
|
+
* whether this reader may see it, are questions only the product can answer,
|
|
19
|
+
* and answering them by passing or omitting a route means the package never
|
|
20
|
+
* has to mirror a feature model it cannot see.
|
|
21
|
+
*/
|
|
22
|
+
organizationsRoute?: string;
|
|
23
|
+
/** Where tenant administration leads. Omit to hide it. */
|
|
24
|
+
tenantAdminRoute?: string;
|
|
25
|
+
/** Open the keyboard-shortcut guide. Omit to hide the entry. */
|
|
26
|
+
onOpenShortcuts?: () => void;
|
|
27
|
+
/** Replay the first-run tour. Omit to hide the entry. */
|
|
28
|
+
onReplayTour?: () => void;
|
|
29
|
+
}
|
|
30
|
+
export declare function BentoUserMenu({ accountRoute, logoutUrl, organizationsRoute, tenantAdminRoute, onOpenShortcuts, onReplayTour, }: Readonly<BentoUserMenuProps>): import("react").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=bento-user-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-user-menu.d.ts","sourceRoot":"","sources":["../../src/bento/bento-user-menu.tsx"],"names":[],"mappings":"AAeA;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gEAAgE;IAChE,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,wBAAgB,aAAa,CAAC,EAC5B,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,YAAY,GACb,EAAE,QAAQ,CAAC,kBAAkB,CAAC,+BAmI9B"}
|