@viglet/viglet-design-system 2026.3.9 → 2026.3.11
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 +528 -44
- package/consumers.json +186 -0
- package/dist/badge-locale-CJkHDlPg.cjs +1 -0
- package/dist/badge-locale-DxDp8Q3S.js +397 -0
- package/dist/bento/bento-actions-menu.d.ts +8 -0
- package/dist/bento/bento-actions-menu.d.ts.map +1 -1
- package/dist/bento/bento-back-to-top.d.ts +9 -1
- package/dist/bento/bento-back-to-top.d.ts.map +1 -1
- package/dist/bento/bento-command-palette.d.ts +56 -9
- package/dist/bento/bento-command-palette.d.ts.map +1 -1
- package/dist/bento/bento-data-table.d.ts +81 -0
- package/dist/bento/bento-data-table.d.ts.map +1 -0
- package/dist/bento/bento-diff.d.ts +41 -0
- package/dist/bento/bento-diff.d.ts.map +1 -0
- package/dist/bento/bento-empty-state.d.ts +8 -1
- package/dist/bento/bento-empty-state.d.ts.map +1 -1
- package/dist/bento/bento-entity-shell.d.ts.map +1 -1
- package/dist/bento/bento-filter-bar.d.ts +60 -0
- package/dist/bento/bento-filter-bar.d.ts.map +1 -0
- package/dist/bento/bento-form-section.d.ts +14 -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 +13 -13
- 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-palette-trigger.d.ts +18 -0
- package/dist/bento/bento-palette-trigger.d.ts.map +1 -0
- package/dist/bento/bento-section-chrome.d.ts +19 -39
- package/dist/bento/bento-section-chrome.d.ts.map +1 -1
- package/dist/bento/bento-shell-shortcuts.d.ts +67 -0
- package/dist/bento/bento-shell-shortcuts.d.ts.map +1 -0
- package/dist/bento/bento-shell.d.ts +53 -0
- package/dist/bento/bento-shell.d.ts.map +1 -0
- package/dist/bento/bento-shortcuts-dialog.d.ts +9 -7
- package/dist/bento/bento-shortcuts-dialog.d.ts.map +1 -1
- package/dist/bento/bento-status-marker.d.ts +5 -2
- package/dist/bento/bento-status-marker.d.ts.map +1 -1
- package/dist/bento/bento-tile.d.ts.map +1 -1
- package/dist/bento/bento-user-menu.d.ts +9 -8
- package/dist/bento/bento-user-menu.d.ts.map +1 -1
- package/dist/bento/bento-version-rail.d.ts +31 -0
- package/dist/bento/bento-version-rail.d.ts.map +1 -0
- package/dist/bento/index.d.ts +15 -6
- package/dist/bento/index.d.ts.map +1 -1
- package/dist/bento.cjs +5 -1
- package/dist/bento.css +70 -4
- package/dist/bento.es.js +1778 -701
- package/dist/catalogue.json +5283 -0
- package/dist/components/app-footer.d.ts +7 -0
- package/dist/components/app-footer.d.ts.map +1 -1
- package/dist/components/app-switcher.d.ts.map +1 -1
- package/dist/components/backend-status.d.ts +19 -11
- package/dist/components/backend-status.d.ts.map +1 -1
- package/dist/components/badge-colorful.d.ts +13 -0
- package/dist/components/badge-colorful.d.ts.map +1 -1
- package/dist/components/badge-locale.d.ts +7 -0
- package/dist/components/badge-locale.d.ts.map +1 -1
- package/dist/components/error-boundary.d.ts +15 -13
- package/dist/components/error-boundary.d.ts.map +1 -1
- package/dist/components/language-select.d.ts +8 -0
- package/dist/components/language-select.d.ts.map +1 -1
- package/dist/components/login/login.d.ts +27 -0
- package/dist/components/login/login.d.ts.map +1 -1
- package/dist/components/mode-toggle.d.ts +9 -0
- package/dist/components/mode-toggle.d.ts.map +1 -1
- package/dist/components/nav-secondary.d.ts +7 -0
- package/dist/components/nav-secondary.d.ts.map +1 -1
- package/dist/components/router/dialog.delete.d.ts +8 -0
- package/dist/components/router/dialog.delete.d.ts.map +1 -1
- package/dist/components/router/gradient-button-link.d.ts +6 -0
- package/dist/components/router/gradient-button-link.d.ts.map +1 -1
- package/dist/components/router/index.d.ts +0 -11
- package/dist/components/router/index.d.ts.map +1 -1
- package/dist/components/router/loading-provider.d.ts +4 -0
- package/dist/components/router/loading-provider.d.ts.map +1 -1
- package/dist/components/startup-first/startup-first.d.ts +29 -0
- package/dist/components/startup-first/startup-first.d.ts.map +1 -1
- package/dist/components/ui/accordion.d.ts +17 -0
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/avatar.d.ts +14 -0
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/badge.d.ts +6 -0
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +25 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +15 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/card.d.ts +27 -0
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/dialog.d.ts +36 -0
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/drawer.d.ts +35 -0
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +53 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/floating-formulas-bg.d.ts +8 -0
- package/dist/components/ui/floating-formulas-bg.d.ts.map +1 -1
- package/dist/components/ui/form-actions.d.ts +7 -0
- package/dist/components/ui/form-actions.d.ts.map +1 -1
- package/dist/components/ui/form-item-two-columns.d.ts +7 -0
- package/dist/components/ui/form-item-two-columns.d.ts.map +1 -1
- package/dist/components/ui/form.d.ts +25 -0
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/glass-card.d.ts +18 -14
- package/dist/components/ui/glass-card.d.ts.map +1 -1
- package/dist/components/ui/gradient-button.d.ts +15 -1
- package/dist/components/ui/gradient-button.d.ts.map +1 -1
- package/dist/components/ui/gradient-switch.d.ts +6 -0
- package/dist/components/ui/gradient-switch.d.ts.map +1 -1
- package/dist/components/ui/hover-card.d.ts +14 -0
- package/dist/components/ui/hover-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/input.d.ts +6 -0
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +41 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/pagination.d.ts +25 -0
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/popover.d.ts +24 -0
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/pulse-ring.d.ts +9 -11
- package/dist/components/ui/pulse-ring.d.ts.map +1 -1
- package/dist/components/ui/resizable.d.ts +11 -0
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/section-card.d.ts +9 -0
- package/dist/components/ui/section-card.d.ts.map +1 -1
- package/dist/components/ui/select.d.ts +36 -0
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/sheet.d.ts +29 -0
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts +83 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/skeleton.d.ts +4 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/sonner.d.ts +16 -0
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/stepper.d.ts +8 -0
- package/dist/components/ui/stepper.d.ts.map +1 -1
- package/dist/components/ui/sticky-save-bar.d.ts +7 -0
- package/dist/components/ui/sticky-save-bar.d.ts.map +1 -1
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/table.d.ts +31 -0
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/tabs.d.ts +16 -0
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +7 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle.d.ts +4 -0
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/tooltip.d.ts +18 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/user-avatar.d.ts +2 -1
- package/dist/components/ui/user-avatar.d.ts.map +1 -1
- package/dist/components/ui/viglet-assistant.d.ts +103 -0
- package/dist/components/ui/viglet-assistant.d.ts.map +1 -0
- package/dist/components/ui/viglet-avatar.d.ts +44 -0
- package/dist/components/ui/viglet-avatar.d.ts.map +1 -0
- package/dist/contexts/breadcrumb.context.d.ts +7 -0
- package/dist/contexts/breadcrumb.context.d.ts.map +1 -1
- package/dist/contexts/user.context.d.ts +8 -0
- package/dist/contexts/user.context.d.ts.map +1 -1
- package/dist/exports.json +359 -30
- 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 +168 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/locales/en/assistant.json.d.ts +25 -0
- package/dist/i18n/locales/en/bento.json.d.ts +48 -2
- 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 +25 -0
- package/dist/i18n/locales/pt/bento.json.d.ts +48 -2
- 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 +572 -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 +2280 -733
- package/dist/lib/busy.d.ts +26 -0
- package/dist/lib/busy.d.ts.map +1 -0
- package/dist/lib/corner-slot.d.ts +15 -0
- package/dist/lib/corner-slot.d.ts.map +1 -0
- package/dist/{loading-provider-BWWhhfEn.js → loading-provider-ClDkFPuv.js} +84 -81
- package/dist/loading-provider-DGuCfsl9.cjs +1 -0
- package/dist/preset.css +7 -10
- package/dist/router.cjs +1 -1
- package/dist/router.es.js +2 -776
- package/dist/user.context-Cr3GAQ_r.js +762 -0
- package/dist/user.context-hbdvmXOn.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 +81 -11
- package/docs/reference/grounds.dc.html +9 -9
- package/package.json +16 -4
- package/scripts/consumer-entries.mjs +209 -0
- package/scripts/lib/contrast.mjs +301 -0
- package/scripts/mcp.mjs +300 -0
- package/scripts/page-lint.mjs +428 -0
- package/scripts/page-reference.mjs +54 -10
- package/dist/badge-locale-CoEEv7s5.js +0 -581
- package/dist/badge-locale-hQyWhAKe.cjs +0 -7
- package/dist/breadcrumb.context-KQut7j8U.js +0 -917
- package/dist/breadcrumb.context-Vwc3lAlf.cjs +0 -1
- package/dist/components/router/blank-slate.d.ts +0 -21
- package/dist/components/router/blank-slate.d.ts.map +0 -1
- package/dist/components/router/grid.list.d.ts +0 -39
- package/dist/components/router/grid.list.d.ts.map +0 -1
- package/dist/components/router/internal.sidebar.d.ts +0 -61
- package/dist/components/router/internal.sidebar.d.ts.map +0 -1
- package/dist/components/router/nav-main.d.ts +0 -25
- package/dist/components/router/nav-main.d.ts.map +0 -1
- package/dist/components/router/nav-user.d.ts +0 -24
- package/dist/components/router/nav-user.d.ts.map +0 -1
- package/dist/components/router/page-content.d.ts +0 -12
- package/dist/components/router/page-content.d.ts.map +0 -1
- package/dist/components/router/page-header.d.ts +0 -23
- package/dist/components/router/page-header.d.ts.map +0 -1
- package/dist/components/router/page.d.ts +0 -22
- package/dist/components/router/page.d.ts.map +0 -1
- package/dist/components/router/sticky.page.header.d.ts +0 -85
- package/dist/components/router/sticky.page.header.d.ts.map +0 -1
- package/dist/components/router/sub.page.d.ts +0 -50
- package/dist/components/router/sub.page.d.ts.map +0 -1
- package/dist/components/router/sub.page.header.d.ts +0 -37
- package/dist/components/router/sub.page.header.d.ts.map +0 -1
- package/dist/i18n-DD3rQOWi.js +0 -426
- package/dist/i18n-DrBq-qJJ.cjs +0 -1
- package/dist/lib/react-markers.d.ts +0 -17
- package/dist/lib/react-markers.d.ts.map +0 -1
- package/dist/loading-provider-CmeMqLGk.cjs +0 -1
- package/dist/user.context-B9vIBzY5.cjs +0 -1
- package/dist/user.context-D1PxP4D4.js +0 -512
|
@@ -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,29 @@ 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
62
|
/**
|
|
17
|
-
* The
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
63
|
+
* The keyboard-first launcher over every surface the nav rail lists, plus any
|
|
64
|
+
* results the product supplies for the query.
|
|
65
|
+
*
|
|
66
|
+
* Built on the Radix `Dialog` primitive: a filter box and a flat result list the
|
|
67
|
+
* arrow keys move through. A surface with a bento route navigates inside the
|
|
68
|
+
* shell; one without links out, marked with an external-link glyph, so the
|
|
69
|
+
* palette reaches everything while a product migrates.
|
|
23
70
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
71
|
+
* It only renders and drives selection while `open`. `useBentoShellShortcuts`
|
|
72
|
+
* opens it from the keyboard and `BentoPaletteTrigger` from the header.
|
|
26
73
|
*/
|
|
27
|
-
export declare function BentoCommandPalette({ open, onOpenChange, items }: Readonly<BentoCommandPaletteProps>): import("react").JSX.Element;
|
|
74
|
+
export declare function BentoCommandPalette({ open, onOpenChange, items, group, onQueryChange, }: Readonly<BentoCommandPaletteProps>): import("react").JSX.Element;
|
|
28
75
|
//# 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;AA0DD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,KAAK,EACL,aAAa,GACd,EAAE,QAAQ,CAAC,wBAAwB,CAAC,+BA8MpC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { RowData } from '@tanstack/react-table';
|
|
2
|
+
import { ComponentType, ReactNode } from 'react';
|
|
3
|
+
import { BentoActionTone } from './bento-actions-menu';
|
|
4
|
+
export interface BentoDataTableColumn<TRow> {
|
|
5
|
+
/** Stable id, also what a layout's `hidden` list names. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** The header, in the product's words, already translated. */
|
|
8
|
+
header: string;
|
|
9
|
+
/** What the cell shows. */
|
|
10
|
+
cell: (row: TRow) => ReactNode;
|
|
11
|
+
/** Given, the column sorts by this value; omitted, its header is not a sort control. */
|
|
12
|
+
sortValue?: (row: TRow) => string | number | Date | null | undefined;
|
|
13
|
+
/** The column's grid track, e.g. `"minmax(16rem, 2fr)"`. Defaults to `minmax(8rem, 1fr)`. */
|
|
14
|
+
width?: string;
|
|
15
|
+
/** `false` keeps the column out of the column picker, always shown. */
|
|
16
|
+
hideable?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface BentoDataTableAction<TRow> {
|
|
19
|
+
/** Stable id for the action. */
|
|
20
|
+
id: string;
|
|
21
|
+
/** What the menu or the selection bar says, already translated. */
|
|
22
|
+
label: string;
|
|
23
|
+
icon: ComponentType<{
|
|
24
|
+
size?: number;
|
|
25
|
+
}>;
|
|
26
|
+
tone?: BentoActionTone;
|
|
27
|
+
/** Receives the one row, or every selected row. */
|
|
28
|
+
onSelect: (rows: TRow[]) => void;
|
|
29
|
+
}
|
|
30
|
+
/** Which columns the reader hid. The product stores it; the table only reports changes. */
|
|
31
|
+
export interface BentoDataTableLayout {
|
|
32
|
+
hidden: string[];
|
|
33
|
+
}
|
|
34
|
+
export interface BentoDataTableProps<TRow> {
|
|
35
|
+
rows: readonly TRow[];
|
|
36
|
+
getRowId: (row: TRow) => string;
|
|
37
|
+
columns: readonly BentoDataTableColumn<TRow>[];
|
|
38
|
+
/** The table's accessible name. */
|
|
39
|
+
label: string;
|
|
40
|
+
/** How a screen reader names one row, in its checkbox and its actions menu. Defaults to its id. */
|
|
41
|
+
getRowLabel?: (row: TRow) => string;
|
|
42
|
+
/** A menu of named actions on each row. */
|
|
43
|
+
rowActions?: readonly BentoDataTableAction<TRow>[];
|
|
44
|
+
/** Given, rows are selectable, and these act on the selection from a bar above the table. */
|
|
45
|
+
selectionActions?: readonly BentoDataTableAction<TRow>[];
|
|
46
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
47
|
+
/**
|
|
48
|
+
* What the rows were chosen by, such as a serialised filter. A selection holds
|
|
49
|
+
* within one scope, and a new one starts with nothing selected, so an action
|
|
50
|
+
* never lands on rows a filter has since hidden.
|
|
51
|
+
*/
|
|
52
|
+
selectionScope?: string;
|
|
53
|
+
/** Controlled column layout. Omitted, the table keeps its own. */
|
|
54
|
+
layout?: BentoDataTableLayout;
|
|
55
|
+
onLayoutChange?: (layout: BentoDataTableLayout) => void;
|
|
56
|
+
/** Enter or a double click on a row. */
|
|
57
|
+
onRowOpen?: (row: TRow) => void;
|
|
58
|
+
/** Pixels per row. Rows are one height, which is what lets the table mount only the visible ones. */
|
|
59
|
+
rowHeight?: number;
|
|
60
|
+
/** The scrolling body's height in pixels. */
|
|
61
|
+
height?: number;
|
|
62
|
+
/** Shown instead of the body when there are no rows. */
|
|
63
|
+
empty?: ReactNode;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* VDS138 — a table a curator sorts, range-selects and acts on at scale.
|
|
67
|
+
*
|
|
68
|
+
* `BentoListPage` renders tiles, which fits a dozen sites and not a folder of four
|
|
69
|
+
* thousand posts, so every console hand-rolled its lists, each with its own idea
|
|
70
|
+
* of sorting, selection and keyboard, and none with virtualization. This is the
|
|
71
|
+
* one table: rows are mounted only for the visible window, sortable headers say
|
|
72
|
+
* how they sort, a row is reachable, selectable and actionable from the keyboard
|
|
73
|
+
* (arrows, shift-arrows for a range, Space, Enter, Escape), and row actions are a
|
|
74
|
+
* menu of named items, never hover-only buttons.
|
|
75
|
+
*
|
|
76
|
+
* It holds no data and no product vocabulary: the product passes rows, columns
|
|
77
|
+
* and actions, and stores the column layout the way `BentoListPage` has it store
|
|
78
|
+
* a tile layout.
|
|
79
|
+
*/
|
|
80
|
+
export declare function BentoDataTable<TRow extends RowData>({ rows, getRowId, columns, label, getRowLabel, rowActions, selectionActions, onSelectionChange, selectionScope, layout, onLayoutChange, onRowOpen, rowHeight, height, empty, }: Readonly<BentoDataTableProps<TRow>>): import("react").JSX.Element;
|
|
81
|
+
//# sourceMappingURL=bento-data-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-data-table.d.ts","sourceRoot":"","sources":["../../src/bento/bento-data-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,OAA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AmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,mGAAmG;IACnG,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,MAAM,CAAC;IACpC,2CAA2C;IAC3C,UAAU,CAAC,EAAE,SAAS,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;IACnD,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,SAAS,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;IACzD,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACxD,wCAAwC;IACxC,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,qGAAqG;IACrG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAWD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,IAAI,SAAS,OAAO,EAAE,EACnD,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,MAAM,EACN,cAAc,EACd,SAAS,EACT,SAAc,EACd,MAAY,EACZ,KAAK,GACN,EAAE,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,+BA+YrC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** How a field's two values are compared. */
|
|
3
|
+
export type BentoDiffFieldKind =
|
|
4
|
+
/** Plain text, compared word by word. */
|
|
5
|
+
"text"
|
|
6
|
+
/** HTML, compared on the blocks it renders (paragraphs, headings, items), not on its markup. */
|
|
7
|
+
| "rich"
|
|
8
|
+
/** Anything else, compared whole: a number, a date, a choice. */
|
|
9
|
+
| "value";
|
|
10
|
+
export interface BentoDiffField {
|
|
11
|
+
id: string;
|
|
12
|
+
/** The field's name, already translated. */
|
|
13
|
+
label: string;
|
|
14
|
+
kind?: BentoDiffFieldKind;
|
|
15
|
+
/** How a `value` field shows one side. Defaults to its string form. */
|
|
16
|
+
format?: (value: unknown) => ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/** One side of a comparison, by field id. `null` is a side that does not exist: a created or deleted item. */
|
|
19
|
+
export type BentoDiffSide = Readonly<Record<string, unknown>> | null;
|
|
20
|
+
export interface BentoDiffProps {
|
|
21
|
+
before: BentoDiffSide;
|
|
22
|
+
after: BentoDiffSide;
|
|
23
|
+
fields: readonly BentoDiffField[];
|
|
24
|
+
/** Open the unchanged fields instead of collapsing them. */
|
|
25
|
+
showUnchanged?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* VDS140 — one comparison for every place a curator compares two versions.
|
|
29
|
+
*
|
|
30
|
+
* Revision history, an agent's change under review and a translation against its
|
|
31
|
+
* source each put two versions of structured content side by side. Drawn per
|
|
32
|
+
* surface, the three would disagree about what changed and how a change reads.
|
|
33
|
+
*
|
|
34
|
+
* Field by field, from a schema the product passes: unchanged fields collapse, text
|
|
35
|
+
* is compared by word, rich text by the blocks it renders, and a side that does not
|
|
36
|
+
* exist, a page just created or just deleted, renders whole as additions or
|
|
37
|
+
* removals rather than as an empty panel. A change is named in text as well as
|
|
38
|
+
* coloured, so it reads the same without colour. It fetches nothing.
|
|
39
|
+
*/
|
|
40
|
+
export declare function BentoDiff({ before, after, fields, showUnchanged }: Readonly<BentoDiffProps>): import("react").JSX.Element;
|
|
41
|
+
//# sourceMappingURL=bento-diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-diff.d.ts","sourceRoot":"","sources":["../../src/bento/bento-diff.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAKjD,6CAA6C;AAC7C,MAAM,MAAM,kBAAkB;AAC5B,yCAAyC;AACvC,MAAM;AACR,gGAAgG;GAC9F,MAAM;AACR,iEAAiE;GAC/D,OAAO,CAAC;AAEZ,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,uEAAuE;IACvE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,SAAS,CAAC;CACxC;AAED,8GAA8G;AAC9G,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;AAErE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,SAAS,cAAc,EAAE,CAAC;IAClC,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAgED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,aAAqB,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,+BAqFnG"}
|
|
@@ -18,6 +18,13 @@ export interface BentoEmptyStateProps {
|
|
|
18
18
|
* empty cell inside a mosaic (see the list-page `EmptyHintTile`).
|
|
19
19
|
*/
|
|
20
20
|
align?: "center" | "start";
|
|
21
|
+
/**
|
|
22
|
+
* The title's heading level, one below the heading the empty state sits under:
|
|
23
|
+
* 2 under a page's hero, 3 inside a section. It is a heading in every chrome,
|
|
24
|
+
* since a styled div in one and a heading in another is a skipped level inside
|
|
25
|
+
* a shared component.
|
|
26
|
+
*/
|
|
27
|
+
titleLevel?: 2 | 3 | 4;
|
|
21
28
|
className?: string;
|
|
22
29
|
}
|
|
23
30
|
/**
|
|
@@ -31,5 +38,5 @@ export interface BentoEmptyStateProps {
|
|
|
31
38
|
* The list mosaic's `EmptyHintTile` delegates to this component (wrapping it in
|
|
32
39
|
* the grid span), so lists and standalone panels stay visually identical.
|
|
33
40
|
*/
|
|
34
|
-
export declare function BentoEmptyState({ icon: Icon, tone, title, description, action, align, className, }: Readonly<BentoEmptyStateProps>): import("react").JSX.Element;
|
|
41
|
+
export declare function BentoEmptyState({ icon: Icon, tone, title, description, action, align, titleLevel, className, }: Readonly<BentoEmptyStateProps>): import("react").JSX.Element;
|
|
35
42
|
//# sourceMappingURL=bento-empty-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-empty-state.d.ts","sourceRoot":"","sources":["../../src/bento/bento-empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/D,MAAM,WAAW,oBAAoB;IACnC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EAAE,IAAmB,EACzB,IAAe,EACf,KAAK,EACL,WAAW,EACX,MAAM,EACN,KAAgB,EAChB,SAAS,GACV,EAAE,QAAQ,CAAC,oBAAoB,CAAC,+
|
|
1
|
+
{"version":3,"file":"bento-empty-state.d.ts","sourceRoot":"","sources":["../../src/bento/bento-empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/D,MAAM,WAAW,oBAAoB;IACnC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EAAE,IAAmB,EACzB,IAAe,EACf,KAAK,EACL,WAAW,EACX,MAAM,EACN,KAAgB,EAChB,UAAc,EACd,SAAS,GACV,EAAE,QAAQ,CAAC,oBAAoB,CAAC,+BA0BhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-entity-shell.d.ts","sourceRoot":"","sources":["../../src/bento/bento-entity-shell.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,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+
export interface BentoFilterChoiceFacet {
|
|
4
|
+
id: string;
|
|
5
|
+
kind: "choice";
|
|
6
|
+
/** The facet's name, already translated. */
|
|
7
|
+
label: string;
|
|
8
|
+
options: readonly {
|
|
9
|
+
value: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}[];
|
|
12
|
+
/** More than one option at a time. Defaults to one. */
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** A facet whose value is a range of calendar dates, as `YYYY-MM-DD`. */
|
|
16
|
+
export interface BentoFilterDateFacet {
|
|
17
|
+
id: string;
|
|
18
|
+
kind: "date";
|
|
19
|
+
label: string;
|
|
20
|
+
}
|
|
21
|
+
export type BentoFilterFacet = BentoFilterChoiceFacet | BentoFilterDateFacet;
|
|
22
|
+
export interface BentoFilterDateRange {
|
|
23
|
+
from?: string;
|
|
24
|
+
to?: string;
|
|
25
|
+
}
|
|
26
|
+
/** Everything the bar says, as data the product can put in a URL. */
|
|
27
|
+
export interface BentoFilterValue {
|
|
28
|
+
query: string;
|
|
29
|
+
/** By facet id: the chosen option values, or a date range. An absent or empty entry is no filter. */
|
|
30
|
+
facets: Record<string, readonly string[] | BentoFilterDateRange | undefined>;
|
|
31
|
+
}
|
|
32
|
+
export interface BentoFilterBarProps {
|
|
33
|
+
value: BentoFilterValue;
|
|
34
|
+
/** Called once per thing a reader does: a choice, a removed chip, an applied range, a pause in typing. */
|
|
35
|
+
onChange: (value: BentoFilterValue) => void;
|
|
36
|
+
facets: readonly BentoFilterFacet[];
|
|
37
|
+
/** The text field's placeholder and accessible name. */
|
|
38
|
+
queryLabel?: string;
|
|
39
|
+
/** How long typing has to pause before the query is sent, in milliseconds. */
|
|
40
|
+
queryDelay?: number;
|
|
41
|
+
/** Saved views, or anything else the product offers beside the filters. The bar stores nothing. */
|
|
42
|
+
views?: ReactNode;
|
|
43
|
+
}
|
|
44
|
+
export declare const EMPTY_FILTERS: BentoFilterValue;
|
|
45
|
+
/**
|
|
46
|
+
* VDS139 — the query row, drawn once.
|
|
47
|
+
*
|
|
48
|
+
* A content list is filtered more than it is scrolled: drafts of one type, in one
|
|
49
|
+
* locale, changed this week. Each product composed that row itself, from a search
|
|
50
|
+
* input and whatever menus it had, so a reader learned it again per product.
|
|
51
|
+
*
|
|
52
|
+
* The bar owns no state. The product passes `value` and receives one `onChange`
|
|
53
|
+
* per action, which is what lets it mirror the filters into the URL and make a
|
|
54
|
+
* filtered view a link. A facet is declared by the product (its id, its words,
|
|
55
|
+
* its options), so the bar holds no product vocabulary. Pass the same value as a
|
|
56
|
+
* `BentoDataTable`'s `selectionScope`, and a selection never outlives the rows it
|
|
57
|
+
* was made on.
|
|
58
|
+
*/
|
|
59
|
+
export declare function BentoFilterBar({ value, onChange, facets, queryLabel, queryDelay, views, }: Readonly<BentoFilterBarProps>): import("react").JSX.Element;
|
|
60
|
+
//# sourceMappingURL=bento-filter-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-filter-bar.d.ts","sourceRoot":"","sources":["../../src/bento/bento-filter-bar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,SAAS,EAA8B,MAAM,OAAO,CAAC;AAexF,yDAAyD;AACzD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACrD,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,yEAAyE;AACzE,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,oBAAoB,CAAC;AAE7E,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,qEAAqE;AACrE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,qGAAqG;IACrG,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,oBAAoB,GAAG,SAAS,CAAC,CAAC;CAC9E;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,gBAAgB,CAAC;IACxB,0GAA0G;IAC1G,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5C,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACpC,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mGAAmG;IACnG,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,aAAa,EAAE,gBAA4C,CAAC;AAezE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,MAAM,EACN,UAAU,EACV,UAAgB,EAChB,KAAK,GACN,EAAE,QAAQ,CAAC,mBAAmB,CAAC,+BA6G/B"}
|
|
@@ -16,7 +16,20 @@ 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, not applied instead of it. A form written
|
|
21
|
+
* against the console's compound API reaches this through
|
|
22
|
+
* `AdaptiveSectionCard`, which used to forward it on one branch only — so a
|
|
23
|
+
* styled form lost its styling under one of the two chromes (VDS111).
|
|
24
|
+
*/
|
|
25
|
+
className?: string;
|
|
19
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The frosted surface itself, as a class list rather than a second copy of one.
|
|
29
|
+
* `AdaptiveSectionCard` renders a section whose header it cannot read, and a
|
|
30
|
+
* pasted class list is the one a change to this surface never reaches.
|
|
31
|
+
*/
|
|
32
|
+
export declare const BENTO_FORM_SURFACE = "bento-tile bento-glass relative flex flex-col gap-5 overflow-hidden rounded-3xl p-5 md:p-6";
|
|
20
33
|
/**
|
|
21
34
|
* Frosted-glass section wrapper for Bento forms — the form-page
|
|
22
35
|
* counterpart of `BentoTile`. Groups related fields under a tonal
|
|
@@ -27,5 +40,5 @@ export interface BentoFormSectionProps {
|
|
|
27
40
|
* inside `children`, so existing FormField/Input/Select/Switch
|
|
28
41
|
* components are reused without modification.
|
|
29
42
|
*/
|
|
30
|
-
export declare function BentoFormSection({ icon: Icon, tone, title, description, children, trailing, as: Heading, }: Readonly<BentoFormSectionProps>): import("react").JSX.Element;
|
|
43
|
+
export declare function BentoFormSection({ icon: Icon, tone, title, description, children, trailing, as: Heading, className, }: Readonly<BentoFormSectionProps>): import("react").JSX.Element;
|
|
31
44
|
//# 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;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,+FAC+D,CAAC;AAE/F;;;;;;;;;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,+BAoBjC"}
|
|
@@ -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,+BAoMhC"}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
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
2
|
export interface BentoNavRailProps {
|
|
16
3
|
/**
|
|
17
4
|
* The sections a product decided this reader may see, already filtered.
|
|
@@ -28,5 +15,18 @@ export interface BentoNavRailProps {
|
|
|
28
15
|
/** Label for the Home button. Defaults to the `home.title` translation. */
|
|
29
16
|
homeLabel?: string;
|
|
30
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* The fixed icon rail down the left edge, with Home and one link per section hub
|
|
20
|
+
* and never the leaf surfaces.
|
|
21
|
+
*
|
|
22
|
+
* Listing hubs rather than surfaces keeps the rail a fixed, small height however
|
|
23
|
+
* many surfaces a product has, so it cannot overflow the viewport the way a flat
|
|
24
|
+
* console sidebar did. Each hub opens its section's area, where the surfaces sit
|
|
25
|
+
* as a bento mosaic, and a surface is reached from there or from the command
|
|
26
|
+
* palette. `BentoShell` takes it as `rail` and reserves its gutter.
|
|
27
|
+
*
|
|
28
|
+
* Hidden below `md`, where the header's palette trigger and the global shortcut
|
|
29
|
+
* navigate instead. The console era's collapsible `Sidebar` is not for a bento page.
|
|
30
|
+
*/
|
|
31
31
|
export declare function BentoNavRail({ groups, homeRoute, homeAliases, homeLabel, }: Readonly<BentoNavRailProps>): import("react").JSX.Element;
|
|
32
32
|
//# sourceMappingURL=bento-nav-rail.d.ts.map
|
|
@@ -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,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;;;;;;;;;;;;GAYG;AACH,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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface BentoPaletteTriggerProps {
|
|
2
|
+
/** Open the palette: the same state `useBentoShellShortcuts` toggles. */
|
|
3
|
+
onClick: () => void;
|
|
4
|
+
/** Detected from the platform when omitted. */
|
|
5
|
+
isMac?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* VDS149 — the palette trigger BENTO-AUTHORING puts in the header's leading set,
|
|
10
|
+
* with the platform's own hint: ⌘K on macOS, Ctrl K everywhere else. A bare ⌘K
|
|
11
|
+
* on Windows sends a reader to a key that is not there.
|
|
12
|
+
*
|
|
13
|
+
* On a phone the rail is hidden and this is the way to a deep area, so the word
|
|
14
|
+
* stays in the accessible name at every width and only its glyph shows. The hint
|
|
15
|
+
* comes from the binding set, so it cannot name a key the hook does not bind.
|
|
16
|
+
*/
|
|
17
|
+
export declare function BentoPaletteTrigger({ onClick, isMac, className }: Readonly<BentoPaletteTriggerProps>): import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=bento-palette-trigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-palette-trigger.d.ts","sourceRoot":"","sources":["../../src/bento/bento-palette-trigger.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,wBAAwB;IACvC,yEAAyE;IACzE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,KAAuB,EAAE,SAAS,EAAE,EAAE,QAAQ,CAAC,wBAAwB,CAAC,+BA6BtH"}
|
|
@@ -1,56 +1,36 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
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
3
|
export interface AdaptiveSectionCardProps {
|
|
34
4
|
variant?: ColorVariant;
|
|
35
|
-
/**
|
|
36
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Merged onto the frosted surface rather than replacing it. This was the prop
|
|
7
|
+
* the chrome switch used to drop on one of its two branches, so a form styled
|
|
8
|
+
* through the wrapper lost that styling under the very chrome the wrapper
|
|
9
|
+
* existed to hide (VDS111); it is asserted on both paths below for that reason.
|
|
10
|
+
*/
|
|
37
11
|
className?: string;
|
|
38
12
|
children?: ReactNode;
|
|
39
13
|
}
|
|
40
14
|
/**
|
|
41
|
-
* A `SectionCard`
|
|
42
|
-
*
|
|
43
|
-
* card everywhere else. Import it aliased where you want a drop-in:
|
|
15
|
+
* A `SectionCard`'s markup rendered as a frosted {@link BentoFormSection}.
|
|
16
|
+
* Import it aliased where you want a drop-in:
|
|
44
17
|
*
|
|
45
18
|
* ```tsx
|
|
46
19
|
* import { AdaptiveSectionCard as SectionCard } from "@viglet/viglet-design-system/bento"
|
|
47
20
|
* ```
|
|
48
21
|
*
|
|
49
|
-
*
|
|
50
|
-
* and
|
|
51
|
-
*
|
|
22
|
+
* It reads the icon, title and description off the `Header` (or `StaticHeader`)
|
|
23
|
+
* child and unwraps the `Content` child, so a form written against the console's
|
|
24
|
+
* compound API renders in the bento language without being rewritten. Every
|
|
25
|
+
* other child renders where it was written. That compound API is the whole
|
|
26
|
+
* difference from `BentoFormSection`, which takes the same three as props.
|
|
27
|
+
*
|
|
28
|
+
* It used to pick between two chromes off a provider, which is what let one form
|
|
29
|
+
* live in two consoles at once while a product migrated behind a parallel route.
|
|
30
|
+
* Every consumer finished that migration (VDS147), so there is one chrome left
|
|
31
|
+
* and nothing to pick between.
|
|
52
32
|
*/
|
|
53
|
-
declare function AdaptiveSectionCard({ variant,
|
|
33
|
+
declare function AdaptiveSectionCard({ variant, className, children, }: Readonly<AdaptiveSectionCardProps>): import("react").JSX.Element;
|
|
54
34
|
declare namespace AdaptiveSectionCard {
|
|
55
35
|
var Header: ({ icon: Icon, title, description, className }: Readonly<import("@/components/ui/section-card").HeaderProps>) => import("react").JSX.Element;
|
|
56
36
|
var StaticHeader: ({ icon: Icon, title, description, className }: Readonly<import("@/components/ui/section-card").StaticHeaderProps>) => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bento-section-chrome.d.ts","sourceRoot":"","sources":["../../src/bento/bento-section-chrome.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"bento-section-chrome.d.ts","sourceRoot":"","sources":["../../src/bento/bento-section-chrome.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxG,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AA4B9E,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,mBAAmB,CAAC,EAC3B,OAAgB,EAChB,SAAS,EACT,QAAQ,GACT,EAAE,QAAQ,CAAC,wBAAwB,CAAC,+BA4CpC;kBAhDQ,mBAAmB;;;;;AAsD5B,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/** What a shell shortcut asks for. The product owns the open state; the hook only calls back. */
|
|
2
|
+
export type BentoShellAction = "palette" | "shortcuts";
|
|
3
|
+
export interface BentoShellShortcut {
|
|
4
|
+
action: BentoShellAction;
|
|
5
|
+
/** The `KeyboardEvent.key` it answers, compared case-insensitively. */
|
|
6
|
+
key: string;
|
|
7
|
+
/**
|
|
8
|
+
* Held with the platform's own modifier: ⌘ on macOS, Ctrl everywhere else,
|
|
9
|
+
* which is the one the hint shows. A chord types no character, so it answers
|
|
10
|
+
* from inside a field too; a bare key never does.
|
|
11
|
+
*/
|
|
12
|
+
mod?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* VDS149 — the shell's one binding set, read by the hook that binds it, the
|
|
16
|
+
* dialog that lists it and the trigger that hints at it.
|
|
17
|
+
*
|
|
18
|
+
* Each product used to write its own. Two did, and they agreed on ⌘K and nothing
|
|
19
|
+
* else: one bound `?` to the guide, the other bound `/` to the palette and never
|
|
20
|
+
* bound `?`, while mounting the guide that listed `?` as global and did not list
|
|
21
|
+
* `/`. A guide to a dead key, and the real shortcut unlisted.
|
|
22
|
+
*
|
|
23
|
+
* `/` stays. It is the search key readers bring from elsewhere, the product that
|
|
24
|
+
* bound it already taught it, and a bare key costs nothing where nobody is typing,
|
|
25
|
+
* which is the only place a bare key answers.
|
|
26
|
+
*/
|
|
27
|
+
export declare const BENTO_SHELL_SHORTCUTS: readonly BentoShellShortcut[];
|
|
28
|
+
/** macOS and iPadOS, which is where the modifier is ⌘. */
|
|
29
|
+
export declare function isMacPlatform(): boolean;
|
|
30
|
+
/** The keycaps a binding shows, one per `<kbd>`: `["⌘", "K"]`, `["Ctrl", "K"]`, `["/"]`. */
|
|
31
|
+
export declare function bentoShortcutKeys(shortcut: BentoShellShortcut, isMac: boolean): string[];
|
|
32
|
+
/**
|
|
33
|
+
* Whether a key pressed here was meant for a field: an input, a textarea, a
|
|
34
|
+
* select or anything editable. `closest` rather than `isContentEditable` alone,
|
|
35
|
+
* because a node inside an editor is editable by inheritance and not every DOM
|
|
36
|
+
* implementation computes that.
|
|
37
|
+
*/
|
|
38
|
+
export declare function isTypingTarget(target: EventTarget | null): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The binding a keydown answers, if any.
|
|
41
|
+
*
|
|
42
|
+
* Nothing answers a key something nearer already handled, which is how an editor
|
|
43
|
+
* binding ⌘K to "insert link" keeps it, nor one mid-composition or held down. A
|
|
44
|
+
* bare key answers only outside a field and under no modifier, except AltGr,
|
|
45
|
+
* which reports Ctrl and Alt together and is how some layouts type `/` at all.
|
|
46
|
+
*/
|
|
47
|
+
export declare function matchShellShortcut(event: KeyboardEvent, isMac: boolean): BentoShellShortcut | undefined;
|
|
48
|
+
export interface BentoShellShortcutsOptions {
|
|
49
|
+
/** Called for ⌘K or `/`. Toggle here: ⌘K pressed with the palette open is how a reader closes it. */
|
|
50
|
+
onPalette: () => void;
|
|
51
|
+
/** Called for `?`. Omit it and `?` is left alone, for a product that mounts no guide. */
|
|
52
|
+
onShortcuts?: () => void;
|
|
53
|
+
/** Detected from the platform when omitted; pass it to pin one in a test or a story. */
|
|
54
|
+
isMac?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Bind the shell's shortcuts on the window, once, at the shell's root.
|
|
58
|
+
*
|
|
59
|
+
* ```tsx
|
|
60
|
+
* useBentoShellShortcuts({
|
|
61
|
+
* onPalette: () => setPaletteOpen((open) => !open),
|
|
62
|
+
* onShortcuts: () => setShortcutsOpen((open) => !open),
|
|
63
|
+
* })
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export declare function useBentoShellShortcuts({ onPalette, onShortcuts, isMac, }: Readonly<BentoShellShortcutsOptions>): void;
|
|
67
|
+
//# sourceMappingURL=bento-shell-shortcuts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bento-shell-shortcuts.d.ts","sourceRoot":"","sources":["../../src/bento/bento-shell-shortcuts.ts"],"names":[],"mappings":"AAEA,iGAAiG;AACjG,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,CAAC;AAEvD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,gBAAgB,CAAC;IACzB,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,kBAAkB,EAI7D,CAAC;AAEH,0DAA0D;AAC1D,wBAAgB,aAAa,IAAI,OAAO,CAGvC;AAED,4FAA4F;AAC5F,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAGxF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAMlE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CAYvG;AAED,MAAM,WAAW,0BAA0B;IACzC,qGAAqG;IACrG,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,yFAAyF;IACzF,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,wFAAwF;IACxF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,WAAW,EACX,KAAuB,GACxB,EAAE,QAAQ,CAAC,0BAA0B,CAAC,GAAG,IAAI,CAmB7C"}
|