@nadicodeai/ui 12.1.197 → 12.1.199

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.
Files changed (111) hide show
  1. package/AGENTS.md +7 -1
  2. package/dist/components/action-menu.d.ts +1 -1
  3. package/dist/components/action-menu.js +1 -1
  4. package/dist/components/activity-calendar.d.ts +2 -2
  5. package/dist/components/activity-calendar.js +2 -2
  6. package/dist/components/card.d.ts +2 -2
  7. package/dist/components/card.js +2 -2
  8. package/dist/components/clearable-input.d.ts +3 -2
  9. package/dist/components/clearable-input.d.ts.map +1 -1
  10. package/dist/components/clearable-input.js +3 -2
  11. package/dist/components/collection-page.d.ts +1 -1
  12. package/dist/components/collection-page.js +1 -1
  13. package/dist/components/collection-sort.d.ts +2 -2
  14. package/dist/components/collection-sort.js +2 -2
  15. package/dist/components/collection-toolbar.js +2 -2
  16. package/dist/components/command.d.ts +2 -2
  17. package/dist/components/command.js +2 -2
  18. package/dist/components/confirm-dialog.d.ts +1 -1
  19. package/dist/components/confirm-dialog.js +1 -1
  20. package/dist/components/context-menu.d.ts +1 -1
  21. package/dist/components/context-menu.js +1 -1
  22. package/dist/components/data-table.d.ts +3 -3
  23. package/dist/components/data-table.js +2 -2
  24. package/dist/components/dialog.d.ts +2 -1
  25. package/dist/components/dialog.d.ts.map +1 -1
  26. package/dist/components/dialog.js +2 -1
  27. package/dist/components/disclosure.d.ts +2 -2
  28. package/dist/components/disclosure.js +2 -2
  29. package/dist/components/document-tabs.d.ts +46 -0
  30. package/dist/components/document-tabs.d.ts.map +1 -0
  31. package/dist/components/document-tabs.js +54 -0
  32. package/dist/components/dropdown-menu.d.ts +1 -1
  33. package/dist/components/dropdown-menu.js +1 -1
  34. package/dist/components/empty-state.d.ts +1 -1
  35. package/dist/components/empty-state.js +1 -1
  36. package/dist/components/entry-scene.d.ts +1 -1
  37. package/dist/components/entry-scene.js +1 -1
  38. package/dist/components/file-tree.d.ts +42 -0
  39. package/dist/components/file-tree.d.ts.map +1 -0
  40. package/dist/components/file-tree.js +93 -0
  41. package/dist/components/file-type-icon.d.ts +6 -3
  42. package/dist/components/file-type-icon.d.ts.map +1 -1
  43. package/dist/components/file-type-icon.js +79 -5
  44. package/dist/components/form-dialog.d.ts +1 -1
  45. package/dist/components/form-dialog.js +1 -1
  46. package/dist/components/form-drawer.d.ts +1 -1
  47. package/dist/components/form-drawer.js +1 -1
  48. package/dist/components/hover-card.d.ts +2 -1
  49. package/dist/components/hover-card.d.ts.map +1 -1
  50. package/dist/components/hover-card.js +2 -1
  51. package/dist/components/identity-mark.d.ts +1 -1
  52. package/dist/components/identity-mark.js +1 -1
  53. package/dist/components/input.d.ts +4 -4
  54. package/dist/components/input.js +4 -4
  55. package/dist/components/middle-truncate.d.ts +3 -1
  56. package/dist/components/middle-truncate.d.ts.map +1 -1
  57. package/dist/components/middle-truncate.js +3 -1
  58. package/dist/components/notice-banner.d.ts +1 -1
  59. package/dist/components/notice-banner.js +1 -1
  60. package/dist/components/object-page.d.ts +3 -3
  61. package/dist/components/object-page.d.ts.map +1 -1
  62. package/dist/components/object-page.js +2 -2
  63. package/dist/components/page-actions.d.ts +3 -3
  64. package/dist/components/page-actions.js +3 -3
  65. package/dist/components/page-header.d.ts +16 -8
  66. package/dist/components/page-header.d.ts.map +1 -1
  67. package/dist/components/page-header.js +16 -8
  68. package/dist/components/popover.d.ts +4 -3
  69. package/dist/components/popover.d.ts.map +1 -1
  70. package/dist/components/popover.js +4 -3
  71. package/dist/components/record-identity.d.ts +1 -1
  72. package/dist/components/record-identity.js +1 -1
  73. package/dist/components/record-list.d.ts +1 -1
  74. package/dist/components/record-list.js +1 -1
  75. package/dist/components/scope-switcher.d.ts +1 -1
  76. package/dist/components/scope-switcher.js +1 -1
  77. package/dist/components/settings-facts.d.ts +1 -1
  78. package/dist/components/settings-facts.js +1 -1
  79. package/dist/components/settings-page.d.ts +1 -1
  80. package/dist/components/settings-page.js +1 -1
  81. package/dist/components/settings-section.d.ts +6 -6
  82. package/dist/components/settings-section.js +6 -6
  83. package/dist/components/sidebar-sections.d.ts +2 -2
  84. package/dist/components/sidebar-sections.js +2 -2
  85. package/dist/components/sidebar.d.ts +3 -3
  86. package/dist/components/sidebar.js +3 -3
  87. package/dist/components/status-badge.d.ts +13 -4
  88. package/dist/components/status-badge.d.ts.map +1 -1
  89. package/dist/components/status-badge.js +13 -4
  90. package/dist/components/table-value.d.ts +2 -2
  91. package/dist/components/table-value.js +2 -2
  92. package/dist/components/tabs.d.ts +10 -3
  93. package/dist/components/tabs.d.ts.map +1 -1
  94. package/dist/components/tabs.js +10 -3
  95. package/dist/components/tooltip.d.ts +3 -2
  96. package/dist/components/tooltip.d.ts.map +1 -1
  97. package/dist/components/tooltip.js +3 -2
  98. package/dist/components/waiting-line.d.ts +3 -2
  99. package/dist/components/waiting-line.d.ts.map +1 -1
  100. package/dist/components/waiting-line.js +3 -2
  101. package/dist/internal/row-message.d.ts +1 -1
  102. package/dist/showcase/specimens/index.d.ts +2 -0
  103. package/dist/showcase/specimens/index.d.ts.map +1 -1
  104. package/dist/showcase/specimens/navigation.d.ts +2 -0
  105. package/dist/showcase/specimens/navigation.d.ts.map +1 -1
  106. package/dist/showcase/specimens/navigation.js +52 -0
  107. package/dist/showcase/usage.generated.d.ts +1 -1
  108. package/dist/showcase/usage.generated.d.ts.map +1 -1
  109. package/dist/showcase/usage.generated.js +84 -62
  110. package/dist/styles/components.css +2 -2
  111. package/package.json +4 -2
package/AGENTS.md CHANGED
@@ -36,7 +36,13 @@ that draws it for all of them, never in `DESIGN.md`
36
36
  - **Usage.** The main export's TSDoc is the component's contract and carries
37
37
  `@family`, `@when`, `@instead`, `@behaviour`, `@words` and `@access`;
38
38
  `generate:usage` refreshes the showcase's index from it, and `check:usage` fails
39
- until it runs.
39
+ until it runs. `@when` is the job, with the products' own examples; `@instead`
40
+ what to use for the jobs next to it; `@behaviour` its states, what it does on
41
+ each input and what it owns; `@words` which strings the product words, and how;
42
+ `@access` its role, name, keyboard path and focus. A page quoting Geist names
43
+ our API, not Geist's props (Button's appearance is `variant`), and a name
44
+ Geist has that we lack does not call for a new primitive: use the existing
45
+ composition first.
40
46
  - **Agents.** `@nadicodeai/ui/agents` re-exports assistant-ui and our reviewed
41
47
  compositions; `@nadicodeai/ui/agent-orb` is the React-free entry a native
42
48
  startup screen paints an orb with before React loads.
@@ -40,7 +40,7 @@ export type ActionMenuProps = RecordMenu & {
40
40
  *
41
41
  * @family Menus
42
42
  * @when "An overflow menu triggered by a three-dot icon that reveals additional actions in a dropdown." (https://vercel.com/geist/dots-menu) "Use Menu for a discoverable trigger that opens a list of actions on a single resource (a dots menu on a row, a dropdown on a primary entity)." (https://vercel.com/geist/menu) Ours: the secondary commands of one record from a visible trigger: the row's three dots, or the page's, which comes last in the title row. A record's one main task is a visible button beside the dots; one non-destructive command that can run, alone, is drawn as a button by `RecordList` and `PageActions`, never as a menu; one that cannot run or is locked stays in the menu so its reason is read.
43
- * @instead "For right-click or long-press on a row, use `ContextMenu`. For global commands behind `⌘K`, use `CommandMenu`. For two related primary actions, use a split button rather than burying the secondary action." (https://vercel.com/geist/menu) Ours: for a record's main task use a visible button (Edit opens the row). For finding across everything use `CommandDialog`. For a value to choose use `Select`. For right-click use the mirror, `ActionContextMenu`.
43
+ * @instead "For right-click or long-press on a row, use `ContextMenu`. For global commands behind `⌘K`, use `CommandMenu`. For two related primary actions, use a split button rather than burying the secondary action." (https://vercel.com/geist/menu) Ours: for a record's main task use a visible button (Edit opens the row). A record's way to its own page is its visible name or a labelled link, never a command in this menu. For finding across everything use `CommandDialog`. For a value to choose use `Select`. For right-click use the mirror, `ActionContextMenu`.
44
44
  * @behaviour "Open on click, not hover; hover-open menus collide with screen readers and trackpad scrolls." (https://vercel.com/geist/menu) "Position auto-flips based on window bounds; don’t hardcode a side that clips on narrow viewports." (https://vercel.com/geist/menu) "Close on item activation, Escape, and outside-click. Don’t auto-close on a hover-out." (https://vercel.com/geist/menu) "Use `MenuItemLocked` for permission-gated actions so the lock icon and disabled state explain why the row is inert." (https://vercel.com/geist/menu) Ours: that is `locked` with its `reason`, which is required: the row stays in place, inert, with a lock at its end and the reason under its label. The menu is at most 288 px wide, as the account menu is, and the record's name heading it is one line, cut with an ellipsis and whole in its tooltip, so a long record, a memory or a sentence, never widens it. The trigger is a ghost icon button at `{spacing.control-height}` (36 px) wherever it stands, named for its record ("More for pec@acme.it"), and comes last, after any button; it keeps its fill while open. The menu opens 10 px under the trigger, aligned to its end: the record's name, the commands with their icons first and the value one acts on in mono under it, then the destructive ones after a divider in the error colour. A command that cannot run now takes `disabledReason`: it stays in place, 36 px like the rest, with its text muted, never dimmed, and says why in a line under its label; a destructive one is muted, not red; a running one takes `pending` and `pendingLabel`. Nothing renders with no command.
45
45
  * @words "Item children are Title Case `Verb + Noun` (`Rename Project`, `Duplicate Deployment`). Bare verbs like `Rename` or `Edit` are wrong outside obvious single-object context." (https://vercel.com/geist/menu) "End an item with `…` only when activating it opens a follow-up dialog (`Rename…`, `Transfer to Team…`)." (https://vercel.com/geist/menu) "Group destructive items at the bottom, separated by a divider, and keep the destructive copy as `Verb + Noun` (`Delete Project`, never bare `Delete`)." (https://vercel.com/geist/menu) "Cap a Menu around 10 items. Past that, group with `MenuSection` or move secondary actions to a settings page." (https://vercel.com/geist/menu) Ours: sentence case, "Remove mailbox", not Title Case. The trigger reads "More for {record}"; the header is the record's name. Rows wrap, never truncate.
46
46
  * @access "Typeahead jumps to the next item whose label starts with the typed character; keep the visible label first so typeahead matches what the user sees." (https://vercel.com/geist/menu) "Return focus to the trigger on close so keyboard users keep their place in the row." (https://vercel.com/geist/menu) Ours: the trigger is a ghost icon button named by `label`, which is required, `aria-expanded` while open. `role="menu"`, items `menuitem` in a group named by `record`, which is required; every command requires its `icon`. The value a command acts on and its reason are the item's description; icons hidden.
@@ -11,7 +11,7 @@ const MAX_COMMANDS = 10;
11
11
  *
12
12
  * @family Menus
13
13
  * @when "An overflow menu triggered by a three-dot icon that reveals additional actions in a dropdown." (https://vercel.com/geist/dots-menu) "Use Menu for a discoverable trigger that opens a list of actions on a single resource (a dots menu on a row, a dropdown on a primary entity)." (https://vercel.com/geist/menu) Ours: the secondary commands of one record from a visible trigger: the row's three dots, or the page's, which comes last in the title row. A record's one main task is a visible button beside the dots; one non-destructive command that can run, alone, is drawn as a button by `RecordList` and `PageActions`, never as a menu; one that cannot run or is locked stays in the menu so its reason is read.
14
- * @instead "For right-click or long-press on a row, use `ContextMenu`. For global commands behind `⌘K`, use `CommandMenu`. For two related primary actions, use a split button rather than burying the secondary action." (https://vercel.com/geist/menu) Ours: for a record's main task use a visible button (Edit opens the row). For finding across everything use `CommandDialog`. For a value to choose use `Select`. For right-click use the mirror, `ActionContextMenu`.
14
+ * @instead "For right-click or long-press on a row, use `ContextMenu`. For global commands behind `⌘K`, use `CommandMenu`. For two related primary actions, use a split button rather than burying the secondary action." (https://vercel.com/geist/menu) Ours: for a record's main task use a visible button (Edit opens the row). A record's way to its own page is its visible name or a labelled link, never a command in this menu. For finding across everything use `CommandDialog`. For a value to choose use `Select`. For right-click use the mirror, `ActionContextMenu`.
15
15
  * @behaviour "Open on click, not hover; hover-open menus collide with screen readers and trackpad scrolls." (https://vercel.com/geist/menu) "Position auto-flips based on window bounds; don’t hardcode a side that clips on narrow viewports." (https://vercel.com/geist/menu) "Close on item activation, Escape, and outside-click. Don’t auto-close on a hover-out." (https://vercel.com/geist/menu) "Use `MenuItemLocked` for permission-gated actions so the lock icon and disabled state explain why the row is inert." (https://vercel.com/geist/menu) Ours: that is `locked` with its `reason`, which is required: the row stays in place, inert, with a lock at its end and the reason under its label. The menu is at most 288 px wide, as the account menu is, and the record's name heading it is one line, cut with an ellipsis and whole in its tooltip, so a long record, a memory or a sentence, never widens it. The trigger is a ghost icon button at `{spacing.control-height}` (36 px) wherever it stands, named for its record ("More for pec@acme.it"), and comes last, after any button; it keeps its fill while open. The menu opens 10 px under the trigger, aligned to its end: the record's name, the commands with their icons first and the value one acts on in mono under it, then the destructive ones after a divider in the error colour. A command that cannot run now takes `disabledReason`: it stays in place, 36 px like the rest, with its text muted, never dimmed, and says why in a line under its label; a destructive one is muted, not red; a running one takes `pending` and `pendingLabel`. Nothing renders with no command.
16
16
  * @words "Item children are Title Case `Verb + Noun` (`Rename Project`, `Duplicate Deployment`). Bare verbs like `Rename` or `Edit` are wrong outside obvious single-object context." (https://vercel.com/geist/menu) "End an item with `…` only when activating it opens a follow-up dialog (`Rename…`, `Transfer to Team…`)." (https://vercel.com/geist/menu) "Group destructive items at the bottom, separated by a divider, and keep the destructive copy as `Verb + Noun` (`Delete Project`, never bare `Delete`)." (https://vercel.com/geist/menu) "Cap a Menu around 10 items. Past that, group with `MenuSection` or move secondary actions to a settings page." (https://vercel.com/geist/menu) Ours: sentence case, "Remove mailbox", not Title Case. The trigger reads "More for {record}"; the header is the record's name. Rows wrap, never truncate.
17
17
  * @access "Typeahead jumps to the next item whose label starts with the typed character; keep the visible label first so typeahead matches what the user sees." (https://vercel.com/geist/menu) "Return focus to the trigger on close so keyboard users keep their place in the row." (https://vercel.com/geist/menu) Ours: the trigger is a ghost icon button named by `label`, which is required, `aria-expanded` while open. `role="menu"`, items `menuitem` in a group named by `record`, which is required; every command requires its `icon`. The value a command acts on and its reason are the item's description; icons hidden.
@@ -30,8 +30,8 @@ declare function activityCalendarData(data: readonly ActivityCalendarDatum[], fr
30
30
  * @instead Never added to fill a row. Amounts over time are a bar or area chart. It follows the
31
31
  * selected metric and names its own from-to window.
32
32
  * @behaviour One hue, chart-1, at four steps of opacity over an empty day; a legend from Less to
33
- * More. Only measured history: unknown coverage stays unknown, never zero. Its card spans the row
34
- * like every chart card; a window of a quarter or less draws larger cells, so 30 days is never a
33
+ * More. Only measured history: unknown coverage stays unknown, never zero. Its card stands beside
34
+ * one sibling card from `lg` when the page has one, and spans the row alone otherwise; a window of a quarter or less draws larger cells, so 30 days is never a
35
35
  * thumbnail.
36
36
  * @words The window as dates in the description. Each day's label: *8 October 2026: 42 requests*.
37
37
  * @access Every day is a named cell for assistive technology; the legend steps are named too.
@@ -53,8 +53,8 @@ function localizedCalendarLabels(locale) {
53
53
  * @instead Never added to fill a row. Amounts over time are a bar or area chart. It follows the
54
54
  * selected metric and names its own from-to window.
55
55
  * @behaviour One hue, chart-1, at four steps of opacity over an empty day; a legend from Less to
56
- * More. Only measured history: unknown coverage stays unknown, never zero. Its card spans the row
57
- * like every chart card; a window of a quarter or less draws larger cells, so 30 days is never a
56
+ * More. Only measured history: unknown coverage stays unknown, never zero. Its card stands beside
57
+ * one sibling card from `lg` when the page has one, and spans the row alone otherwise; a window of a quarter or less draws larger cells, so 30 days is never a
58
58
  * thumbnail.
59
59
  * @words The window as dates in the description. Each day's label: *8 October 2026: 42 requests*.
60
60
  * @access Every day is a named cell for assistive technology; the legend steps are named too.
@@ -7,9 +7,9 @@ type CardFlush = "bottom" | "all";
7
7
  * The surface of every card; on its own only a container inside a composition.
8
8
  *
9
9
  * @family Data
10
- * @when "For in-product cards and dashboard tiles, use `Card`; Book is too decorative for repeated UI rows." (https://vercel.com/geist/book) Ours: only inside a composition that owns the job: the object card of an `ObjectPage`, the setting card of a `SettingsSection`, a KPI, a chart, a table. A new kind of card is a new composition, never a `Card` assembled at a call site.
10
+ * @when "For in-product cards and dashboard tiles, use `Card`; Book is too decorative for repeated UI rows." (https://vercel.com/geist/book) Ours: only inside a composition that owns the job: the object card of an `ObjectPage`, the setting card of a `SettingsSection`, a KPI, a chart, a table. A new kind of card is a new composition, never a `Card` assembled at a call site, and never a card holding only an introduction.
11
11
  * @instead "Groups related form controls inside a bordered card with optional footer actions." (https://vercel.com/geist/fieldset) Ours: that card, a title and description, one control and a footer with help at the start and one action at the end, is `SettingsSection`. An object's card (a header bar with its name and commands, a body of facts, rows that open, a footer hint with one link elsewhere) is `ObjectPage`. The page's title row is never in a card. A row of a list is `Item`. A plane of brand colour is `BrandField`.
12
- * @behaviour "One Note per concept." (https://vercel.com/geist/note) "Stacking three Notes on a card means the page architecture, not the Note copy, is wrong." (https://vercel.com/geist/note) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the corner and shadow come with `surface`: a raised card takes the larger corner. Never set a corner at the call site. `surface` defaults to `resting`, the resting height of "Elevation & Depth" in DESIGN.md. `CardHeader` lays out title, description and one `CardAction`. An action of one control (a button, a badge, a sparkline, the three dots) stands at the title's right, as Vercel keeps a card's Add on its title row on a phone; on a card narrower than 28rem the description runs under both, and the control moves under the title only when the title's longest word would not fit beside it, so it never covers it. An action of several controls moves under the description in a header narrower than 28rem (the header's own width, not the viewport's); `CardFooter` is a strip in the `recessed` role, one tone off the card body inside the card's edge, behind one seam in the border colour: `canvas-soft` below the white card in light, and `dark-canvas` below the resting body in dark; on the left one short muted line, only where it says something specific to that card (a limit such as *Please use 32 characters at maximum.*, what a value is for, the plan a feature needs or a link to learn more) and never one sentence every card repeats, on the right at most one button or link, the section's action. It is 56 px high whether or not it holds a button, and as high as its lines in a `size="sm"` card, the compact card of a side column or a figure. The two kinds differ in what their header and footer hold: an object card's header holds the object's commands and its footer only a link, so it never saves; a setting card's header holds a title, a description and at most a switch that applies on change, and its footer holds the Save. A card is neutral; colour enters only through a status inside it or a section's `tone`.
12
+ * @behaviour "One Note per concept." (https://vercel.com/geist/note) "Stacking three Notes on a card means the page architecture, not the Note copy, is wrong." (https://vercel.com/geist/note) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the corner and shadow come with `surface`: a raised card takes the larger corner. Never set a corner at the call site. `surface` defaults to `resting`, the resting height of "Elevation & Depth" in DESIGN.md. `CardHeader` lays out title, description and one `CardAction`. An action of one control (a button, a badge, a sparkline, the three dots) stands at the title's right, as Vercel keeps a card's Add on its title row on a phone; on a card narrower than 28rem the description runs under both, and the control moves under the title only when the title's longest word would not fit beside it, so it never covers it. An action of several controls moves under the description in a header narrower than 28rem (the header's own width, not the viewport's); `CardFooter` is a strip in the `recessed` role, one tone off the card body inside the card's edge, behind one seam in the border colour: `canvas-soft` below the white card in light, and `dark-canvas` below the resting body in dark; on the left one short muted line, only where it says something specific to that card (a limit such as *Please use 32 characters at maximum.*, what a value is for, the plan a feature needs or a link to learn more) and never one sentence every card repeats, on the right at most one button or link, the section's action. It is 56 px high whether or not it holds a button, and as high as its lines in a `size="sm"` card, the compact card of a side column or a figure. The two kinds differ in what their header and footer hold: an object card's header holds the object's commands and its footer only a link, so it never saves; a setting card's header holds a title, a description and its `actions` or `control`, and its footer holds the Save, which also applies a switch in the card (`SettingsSection`). A card's or a section's title carries no icon, unless the card stands for one external system, whose mark it then carries. A card is neutral; colour enters only through a status inside it or a section's `tone`.
13
13
  * `flush="bottom"` ends the card at its last child, for rows whose hairlines run to its bottom edge, as a footer does; `flush="all"` lets the content meet every edge with no gap between children, for one picture or grid that fills the card.
14
14
  * @words The title is a noun phrase naming what the card holds; the description one sentence directly under it, only when it adds something.
15
15
  * @access A plain container; give it `render={<section />}` with a heading when it is a region of the page.
@@ -6,9 +6,9 @@ import { cn } from "../lib/utils.js";
6
6
  * The surface of every card; on its own only a container inside a composition.
7
7
  *
8
8
  * @family Data
9
- * @when "For in-product cards and dashboard tiles, use `Card`; Book is too decorative for repeated UI rows." (https://vercel.com/geist/book) Ours: only inside a composition that owns the job: the object card of an `ObjectPage`, the setting card of a `SettingsSection`, a KPI, a chart, a table. A new kind of card is a new composition, never a `Card` assembled at a call site.
9
+ * @when "For in-product cards and dashboard tiles, use `Card`; Book is too decorative for repeated UI rows." (https://vercel.com/geist/book) Ours: only inside a composition that owns the job: the object card of an `ObjectPage`, the setting card of a `SettingsSection`, a KPI, a chart, a table. A new kind of card is a new composition, never a `Card` assembled at a call site, and never a card holding only an introduction.
10
10
  * @instead "Groups related form controls inside a bordered card with optional footer actions." (https://vercel.com/geist/fieldset) Ours: that card, a title and description, one control and a footer with help at the start and one action at the end, is `SettingsSection`. An object's card (a header bar with its name and commands, a body of facts, rows that open, a footer hint with one link elsewhere) is `ObjectPage`. The page's title row is never in a card. A row of a list is `Item`. A plane of brand colour is `BrandField`.
11
- * @behaviour "One Note per concept." (https://vercel.com/geist/note) "Stacking three Notes on a card means the page architecture, not the Note copy, is wrong." (https://vercel.com/geist/note) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the corner and shadow come with `surface`: a raised card takes the larger corner. Never set a corner at the call site. `surface` defaults to `resting`, the resting height of "Elevation & Depth" in DESIGN.md. `CardHeader` lays out title, description and one `CardAction`. An action of one control (a button, a badge, a sparkline, the three dots) stands at the title's right, as Vercel keeps a card's Add on its title row on a phone; on a card narrower than 28rem the description runs under both, and the control moves under the title only when the title's longest word would not fit beside it, so it never covers it. An action of several controls moves under the description in a header narrower than 28rem (the header's own width, not the viewport's); `CardFooter` is a strip in the `recessed` role, one tone off the card body inside the card's edge, behind one seam in the border colour: `canvas-soft` below the white card in light, and `dark-canvas` below the resting body in dark; on the left one short muted line, only where it says something specific to that card (a limit such as *Please use 32 characters at maximum.*, what a value is for, the plan a feature needs or a link to learn more) and never one sentence every card repeats, on the right at most one button or link, the section's action. It is 56 px high whether or not it holds a button, and as high as its lines in a `size="sm"` card, the compact card of a side column or a figure. The two kinds differ in what their header and footer hold: an object card's header holds the object's commands and its footer only a link, so it never saves; a setting card's header holds a title, a description and at most a switch that applies on change, and its footer holds the Save. A card is neutral; colour enters only through a status inside it or a section's `tone`.
11
+ * @behaviour "One Note per concept." (https://vercel.com/geist/note) "Stacking three Notes on a card means the page architecture, not the Note copy, is wrong." (https://vercel.com/geist/note) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the corner and shadow come with `surface`: a raised card takes the larger corner. Never set a corner at the call site. `surface` defaults to `resting`, the resting height of "Elevation & Depth" in DESIGN.md. `CardHeader` lays out title, description and one `CardAction`. An action of one control (a button, a badge, a sparkline, the three dots) stands at the title's right, as Vercel keeps a card's Add on its title row on a phone; on a card narrower than 28rem the description runs under both, and the control moves under the title only when the title's longest word would not fit beside it, so it never covers it. An action of several controls moves under the description in a header narrower than 28rem (the header's own width, not the viewport's); `CardFooter` is a strip in the `recessed` role, one tone off the card body inside the card's edge, behind one seam in the border colour: `canvas-soft` below the white card in light, and `dark-canvas` below the resting body in dark; on the left one short muted line, only where it says something specific to that card (a limit such as *Please use 32 characters at maximum.*, what a value is for, the plan a feature needs or a link to learn more) and never one sentence every card repeats, on the right at most one button or link, the section's action. It is 56 px high whether or not it holds a button, and as high as its lines in a `size="sm"` card, the compact card of a side column or a figure. The two kinds differ in what their header and footer hold: an object card's header holds the object's commands and its footer only a link, so it never saves; a setting card's header holds a title, a description and its `actions` or `control`, and its footer holds the Save, which also applies a switch in the card (`SettingsSection`). A card's or a section's title carries no icon, unless the card stands for one external system, whose mark it then carries. A card is neutral; colour enters only through a status inside it or a section's `tone`.
12
12
  * `flush="bottom"` ends the card at its last child, for rows whose hairlines run to its bottom edge, as a footer does; `flush="all"` lets the content meet every edge with no gap between children, for one picture or grid that fills the card.
13
13
  * @words The title is a noun phrase naming what the card holds; the description one sentence directly under it, only when it adds something.
14
14
  * @access A plain container; give it `render={<section />}` with a heading when it is a region of the page.
@@ -29,8 +29,9 @@ export type ClearableInputProps = Omit<React.ComponentProps<"input">, "defaultVa
29
29
  * (https://vercel.com/geist/clearable-input) Ours: a single-line value a person may want to empty
30
30
  * in one move: a filter, a search, a reference they paste and replace.
31
31
  * @instead A collection's search is `CollectionSearch`. A value that is never emptied is `Input`. A
32
- * box with a fixed prefix or suffix is `Input`; one with a copy button is `InputGroup`, and any
33
- * other fixed part beside a box is an `InputGroup` composition.
32
+ * box with a fixed prefix or suffix is `Input`. A value shown with its copy button is
33
+ * `TextWithCopyButton`. Any other fixed part beside a box is an `InputGroup`, which only this
34
+ * package's components draw.
34
35
  * @behaviour Same ring, halo, hover, disabled and error as `Input`; colour sits where it does there
35
36
  * and nowhere else. The clear button shows only while the box has text and is enabled, as an Esc
36
37
  * key cap flush against the end of the box that darkens on hover and keeps a transparent fill (a
@@ -1 +1 @@
1
- {"version":3,"file":"clearable-input.d.ts","sourceRoot":"","sources":["../../src/components/clearable-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGtD,sGAAsG;AACtG,MAAM,MAAM,sBAAsB,GAAG,QAAQ,SAAS,MAAM,IAAI,GAC5D,IAAI,SAAS,OAAO,GAClB,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,GAClB,KAAK,GACP,KAAK,CAAC;AAEV,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAC7B,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAClE,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,wEAAwE;IACxE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,gHAAgH;IAChH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,SAAS,CAAC;AAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,KAAK,EACL,aAAa,EACb,OAAO,EACP,UAAU,EACV,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,OAAe,EACf,KAAK,EACL,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,mBAAmB,qBA0ErB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"clearable-input.d.ts","sourceRoot":"","sources":["../../src/components/clearable-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGtD,sGAAsG;AACtG,MAAM,MAAM,sBAAsB,GAAG,QAAQ,SAAS,MAAM,IAAI,GAC5D,IAAI,SAAS,OAAO,GAClB,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,GAClB,KAAK,GACP,KAAK,CAAC;AAEV,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAC7B,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAClE,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,wEAAwE;IACxE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,gHAAgH;IAChH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,SAAS,CAAC;AAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,KAAK,EACL,aAAa,EACb,OAAO,EACP,UAAU,EACV,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,OAAe,EACf,KAAK,EACL,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,mBAAmB,qBA0ErB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -14,8 +14,9 @@ import { WaitingLine } from "./waiting-line.js";
14
14
  * (https://vercel.com/geist/clearable-input) Ours: a single-line value a person may want to empty
15
15
  * in one move: a filter, a search, a reference they paste and replace.
16
16
  * @instead A collection's search is `CollectionSearch`. A value that is never emptied is `Input`. A
17
- * box with a fixed prefix or suffix is `Input`; one with a copy button is `InputGroup`, and any
18
- * other fixed part beside a box is an `InputGroup` composition.
17
+ * box with a fixed prefix or suffix is `Input`. A value shown with its copy button is
18
+ * `TextWithCopyButton`. Any other fixed part beside a box is an `InputGroup`, which only this
19
+ * package's components draw.
19
20
  * @behaviour Same ring, halo, hover, disabled and error as `Input`; colour sits where it does there
20
21
  * and nowhere else. The clear button shows only while the box has text and is enabled, as an Esc
21
22
  * key cap flush against the end of the box that darkens on hover and keeps a transparent fill (a
@@ -52,7 +52,7 @@ export type CollectionPageProps<TRecord extends RowData, TCommand extends string
52
52
  * Ours: Customers and Partners use the full-width list, with actionable attention above the toolbar when present. Business summaries belong on Dashboard and Analytics. A rail remains available for context that belongs to the collection itself, such as the selected Library hub.
53
53
  * @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
54
54
  * Ours: records compared across columns, read by their headings, are a `DataTable` under the page's own title and toolbar. A list inside another page's section is a `RecordList` with its `heading`.
55
- * @behaviour Title or none, as Vercel decides it: a page that is one plain list of things a person makes, whose concept needs no sentence, such as Vercel's Domains, Storage, Projects and AI Gateway's API Keys, has no title row, and its actions (its create buttons) end its search row, after the filters. A page that needs its one sentence, or whose commands do something other than create, such as Environment Variables, Members, Integrations and Deployments, keeps its title row with the sentence and every action on it. The product says which a page is (`PageActionsHostProvider`'s `titled`, or this composition's own `title`), never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.
55
+ * @behaviour The page supplies its records and their commands as data, never its own toolbar, table, rows or menus. Title or none, as Vercel decides it: a page that is one plain list of things a person makes, whose concept needs no sentence, such as Vercel's Domains, Storage, Projects and AI Gateway's API Keys, has no title row, and its actions (its create buttons) end its search row, after the filters. A page that needs its one sentence, or whose commands do something other than create, such as Environment Variables, Members, Integrations and Deployments, keeps its title row with the sentence and every action on it. The product says which a page is (`PageActionsHostProvider`'s `titled`, or this composition's own `title`), never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The page's title names the collection once, and the records' card never adds a header that only describes it. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. The page's actions stay on its title row whichever tab is shown; the toolbar belongs to the tab shown, and switching clears its search and page. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.
56
56
  * @words “For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing.” (https://vercel.com/geist/empty-state)
57
57
  * Ours: every string is the product's, in sentence case. The title names the collection in the plural ("Agents"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").
58
58
  * @access “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
@@ -20,7 +20,7 @@ import { CollectionRailColumn } from "../internal/collection-rail.js";
20
20
  * Ours: Customers and Partners use the full-width list, with actionable attention above the toolbar when present. Business summaries belong on Dashboard and Analytics. A rail remains available for context that belongs to the collection itself, such as the selected Library hub.
21
21
  * @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
22
22
  * Ours: records compared across columns, read by their headings, are a `DataTable` under the page's own title and toolbar. A list inside another page's section is a `RecordList` with its `heading`.
23
- * @behaviour Title or none, as Vercel decides it: a page that is one plain list of things a person makes, whose concept needs no sentence, such as Vercel's Domains, Storage, Projects and AI Gateway's API Keys, has no title row, and its actions (its create buttons) end its search row, after the filters. A page that needs its one sentence, or whose commands do something other than create, such as Environment Variables, Members, Integrations and Deployments, keeps its title row with the sentence and every action on it. The product says which a page is (`PageActionsHostProvider`'s `titled`, or this composition's own `title`), never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.
23
+ * @behaviour The page supplies its records and their commands as data, never its own toolbar, table, rows or menus. Title or none, as Vercel decides it: a page that is one plain list of things a person makes, whose concept needs no sentence, such as Vercel's Domains, Storage, Projects and AI Gateway's API Keys, has no title row, and its actions (its create buttons) end its search row, after the filters. A page that needs its one sentence, or whose commands do something other than create, such as Environment Variables, Members, Integrations and Deployments, keeps its title row with the sentence and every action on it. The product says which a page is (`PageActionsHostProvider`'s `titled`, or this composition's own `title`), never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The page's title names the collection once, and the records' card never adds a header that only describes it. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. The page's actions stay on its title row whichever tab is shown; the toolbar belongs to the tab shown, and switching clears its search and page. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.
24
24
  * @words “For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing.” (https://vercel.com/geist/empty-state)
25
25
  * Ours: every string is the product's, in sentence case. The title names the collection in the plural ("Agents"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").
26
26
  * @access “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
@@ -14,8 +14,8 @@ export type CollectionSortProps = {
14
14
  *
15
15
  * @family Choices
16
16
  * @when A collection whose rows can be read in more than one order: newest, name, cost.
17
- * @instead Sorting by a column of a comparison table is `DataTable`'s own header. Narrowing rows is
18
- * `CollectionFilters`.
17
+ * @instead A comparison table has no sortable heading: a `DataTable` takes the order this control
18
+ * sets as its `sorting`. Narrowing rows is `CollectionFilters`.
19
19
  * @behaviour An outline button names the order in force; its menu offers the others as radio rows
20
20
  * with the current one checked. Choosing the current order changes nothing. It renders nothing
21
21
  * without options.
@@ -8,8 +8,8 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel
8
8
  *
9
9
  * @family Choices
10
10
  * @when A collection whose rows can be read in more than one order: newest, name, cost.
11
- * @instead Sorting by a column of a comparison table is `DataTable`'s own header. Narrowing rows is
12
- * `CollectionFilters`.
11
+ * @instead A comparison table has no sortable heading: a `DataTable` takes the order this control
12
+ * sets as its `sorting`. Narrowing rows is `CollectionFilters`.
13
13
  * @behaviour An outline button names the order in force; its menu offers the others as radio rows
14
14
  * with the current one checked. Choosing the current order changes nothing. It renders nothing
15
15
  * without options.
@@ -27,8 +27,8 @@ const IN_CARD = "[[data-slot=table-card-toolbar]_&]:relative [[data-slot=table-c
27
27
  * @access `role="toolbar"` named by `label`.
28
28
  */
29
29
  export function CollectionToolbar({ label, controls, search, actions, status, surface = "glass", ...props }) {
30
- // A search alone is the plain row: a search box never stands in a box of its
31
- // own (DESIGN.md "Menus and commands").
30
+ // A search alone is the plain row, as the usage page above says: a search box
31
+ // never stands in a box of its own.
32
32
  const drawn = surface === "glass" && (controls || actions) ? "glass" : "plain";
33
33
  return (_jsxs("div", { "data-slot": "collection-toolbar", ...props, role: "toolbar", "aria-label": label, "data-surface": drawn, className: `flex min-w-0 flex-wrap items-center gap-2 ${drawn === "glass" ? ON_PAGE : PLAIN} ${IN_CARD}`, children: [controls ? (_jsx("div", { "data-slot": "collection-toolbar-controls", className: "flex min-w-0 max-w-full flex-wrap items-center gap-2 max-sm:relative max-sm:order-2 max-sm:-m-0.5 max-sm:flex-1 max-sm:basis-0 max-sm:flex-nowrap max-sm:overflow-x-auto max-sm:p-0.5 max-sm:scrollbar-none max-sm:*:max-w-none max-sm:*:shrink-0", children: controls })) : null, search ? (_jsx("div", { "data-slot": "collection-toolbar-search", className: "min-w-0 basis-full max-sm:order-1 sm:flex-1 sm:basis-64", children: search })) : null, actions ? (_jsx("div", { "data-slot": "collection-toolbar-actions", className: "ml-auto flex min-w-0 flex-wrap items-center gap-2 max-sm:relative max-sm:order-3 max-sm:-m-0.5 max-sm:flex-nowrap max-sm:overflow-x-auto max-sm:p-0.5 max-sm:scrollbar-none max-sm:*:max-w-none max-sm:*:shrink-0", children: actions })) : null, status ? _jsx("div", { className: "absolute right-0 bottom-0", children: status }) : null] }));
34
34
  }
@@ -11,8 +11,8 @@ declare function Command({ className, children, resultCount, ...props }: React.C
11
11
  * Find anything across the product and go there.
12
12
  *
13
13
  * @family Navigation
14
- * @when "Use CommandMenu for a global, keyboard-first command palette that finds resources and runs actions across the app." (https://vercel.com/geist/command-menu) Ours: finding anything across the product and going there: an Agent, a customer, a page, a creation page (*New Agent*). Opened by ⌘K or the sidebar's Find. It goes to places and never runs a command.
15
- * @instead "For a menu opened from a visible trigger on a single resource, use `Menu`; for right-click on a row, use `ContextMenu`." (https://vercel.com/geist/command-menu) "Group items into pages (`Projects`, `Team Settings`) when a single flat list would exceed roughly 30 items or span multiple resource types." (https://vercel.com/geist/command-menu) Ours: those are `DropdownMenu` and `ContextMenu`. One record's commands are its `ActionMenu`. Search inside one collection is `CollectionSearch`. Choosing the page's scope is `ScopeSwitcher`. `CommandDialog` has no pages: its list is groups.
14
+ * @when "Use CommandMenu for a global, keyboard-first command palette that finds resources and runs actions across the app." (https://vercel.com/geist/command-menu) Ours: finding anything across the product and going there: an Agent, a customer, a page, a creation page (*New Agent*). Opened by ⌘K or the sidebar's Find. It names every place the sidebar names, every chat and every settings page; it goes to places and never runs a command.
15
+ * @instead "For a menu opened from a visible trigger on a single resource, use `Menu`; for right-click on a row, use `ContextMenu`." (https://vercel.com/geist/command-menu) "Group items into pages (`Projects`, `Team Settings`) when a single flat list would exceed roughly 30 items or span multiple resource types." (https://vercel.com/geist/command-menu) Ours: one record's commands are its `ActionMenu` and, on right-click, its mirror `ActionContextMenu`; a page's are `PageActions`' `menu`. Search inside one collection is `CollectionSearch`. Choosing the page's scope is `ScopeSwitcher`. `CommandDialog` has no pages: its list is groups.
16
16
  * @behaviour "Bind `⌘K` on macOS and `Ctrl+K` elsewhere. Don’t reuse the binding for any in-page filter input; it’s a global shortcut." (https://vercel.com/geist/command-menu) "Open into the root page; preserve the search query when navigating back from a sub-page so the user’s typing isn’t lost." (https://vercel.com/geist/command-menu) "Trap focus inside the overlay while it’s open and return focus to the previously active element on close." (https://vercel.com/geist/command-menu) "Show a recent or default item set when the input is empty so the menu is useful before typing." (https://vercel.com/geist/command-menu) Ours: a solid surface, never glass; opens instantly, 640 px wide and 15% down the window; on a phone it is a bottom sheet, 640 px high with 8 px top corners and the list filling it. The input row stands above the list with a line under it, the field in large type with no icon and an *Esc* key at its end that closes the dialog and is the next stop after the field on Tab; the list scrolls past 436 px. The first row is highlighted on open. No match says so. Every row is 36 px with the pointer cursor, a group's heading is a muted 36 px row, a divider bleeds across the list. A row's shortcut is a `CommandShortcut` and a word or icon at its end is a `CommandSuffix`. Colour carries nothing: the highlighted row is a faint neutral wash with its text unchanged, group headings, suffixes and the empty line are muted, and no row, key or divider takes a hue. `CommandDialog` draws `Command` itself, so a product never mounts one; its parts are `CommandInput`, `CommandList`, `CommandEmpty`, `CommandGroup`, `CommandItem` and `CommandShortcut` (a `Kbd`).
17
17
  * @words "`<CommandMenu.Item>` children are Title Case verb phrases (`Deploy Project`, `Invite Team Member`). Avoid navigation phrasing like `Go to project page`; CommandMenu commands act, not browse." (https://vercel.com/geist/command-menu) "`CommandMenuPage.label` is Title Case and names the scope (`Projects`, `Team Settings`)." (https://vercel.com/geist/command-menu) "`CommandMenuPage.placeholder` is sentence case, action-oriented, and ends with `…` (`Search projects…`, `Type a command or search…`). Bare `Search…` is wrong because it doesn’t name the scope." (https://vercel.com/geist/command-menu) "`<CommandMenu.Group heading>` is Title Case, 1–2 words (`Actions`, `Recent`)." (https://vercel.com/geist/command-menu) Ours: groups are plural nouns in sentence case (*Agents*, *Go to*), one or two words. Items are names, or verb and noun for a creation page (*New Agent*), because the dialog goes to places. The placeholder names what is searched, never a bare "Search". No match quotes the query.
18
18
  * @access "Use `aria-live="polite"` on the result count so screen readers hear how the list narrows as the user types." (https://vercel.com/geist/command-menu) "Up/Down arrows move highlight, Enter activates, Escape closes. Backspace at an empty input pops the page stack." (https://vercel.com/geist/command-menu) "Display each item’s `keybind` as a `Kbd` slot so the shortcut is discoverable to sighted users and announced as a label to screen readers." (https://vercel.com/geist/command-menu) Ours: a dialog with a screen-reader `title` and `description`, both required; the *Esc* key is a button named by `closeLabel`, which is required; the field is a combobox over a listbox; the highlighted item is `aria-selected`. A polite live region reads `resultCount` as the list narrows, and it is required. `CommandInput` requires its `placeholder`, `CommandGroup` its `heading` and `CommandItem` its `onSelect`, so no field, group or row is left unnamed or inert; a row with no group stands outside a `CommandGroup`. A shortcut is a `CommandShortcut`, drawn as `kbd` elements. With no pages there is no stack for Backspace to pop.
@@ -19,8 +19,8 @@ function Command({ className, children, resultCount, ...props }) {
19
19
  * Find anything across the product and go there.
20
20
  *
21
21
  * @family Navigation
22
- * @when "Use CommandMenu for a global, keyboard-first command palette that finds resources and runs actions across the app." (https://vercel.com/geist/command-menu) Ours: finding anything across the product and going there: an Agent, a customer, a page, a creation page (*New Agent*). Opened by ⌘K or the sidebar's Find. It goes to places and never runs a command.
23
- * @instead "For a menu opened from a visible trigger on a single resource, use `Menu`; for right-click on a row, use `ContextMenu`." (https://vercel.com/geist/command-menu) "Group items into pages (`Projects`, `Team Settings`) when a single flat list would exceed roughly 30 items or span multiple resource types." (https://vercel.com/geist/command-menu) Ours: those are `DropdownMenu` and `ContextMenu`. One record's commands are its `ActionMenu`. Search inside one collection is `CollectionSearch`. Choosing the page's scope is `ScopeSwitcher`. `CommandDialog` has no pages: its list is groups.
22
+ * @when "Use CommandMenu for a global, keyboard-first command palette that finds resources and runs actions across the app." (https://vercel.com/geist/command-menu) Ours: finding anything across the product and going there: an Agent, a customer, a page, a creation page (*New Agent*). Opened by ⌘K or the sidebar's Find. It names every place the sidebar names, every chat and every settings page; it goes to places and never runs a command.
23
+ * @instead "For a menu opened from a visible trigger on a single resource, use `Menu`; for right-click on a row, use `ContextMenu`." (https://vercel.com/geist/command-menu) "Group items into pages (`Projects`, `Team Settings`) when a single flat list would exceed roughly 30 items or span multiple resource types." (https://vercel.com/geist/command-menu) Ours: one record's commands are its `ActionMenu` and, on right-click, its mirror `ActionContextMenu`; a page's are `PageActions`' `menu`. Search inside one collection is `CollectionSearch`. Choosing the page's scope is `ScopeSwitcher`. `CommandDialog` has no pages: its list is groups.
24
24
  * @behaviour "Bind `⌘K` on macOS and `Ctrl+K` elsewhere. Don’t reuse the binding for any in-page filter input; it’s a global shortcut." (https://vercel.com/geist/command-menu) "Open into the root page; preserve the search query when navigating back from a sub-page so the user’s typing isn’t lost." (https://vercel.com/geist/command-menu) "Trap focus inside the overlay while it’s open and return focus to the previously active element on close." (https://vercel.com/geist/command-menu) "Show a recent or default item set when the input is empty so the menu is useful before typing." (https://vercel.com/geist/command-menu) Ours: a solid surface, never glass; opens instantly, 640 px wide and 15% down the window; on a phone it is a bottom sheet, 640 px high with 8 px top corners and the list filling it. The input row stands above the list with a line under it, the field in large type with no icon and an *Esc* key at its end that closes the dialog and is the next stop after the field on Tab; the list scrolls past 436 px. The first row is highlighted on open. No match says so. Every row is 36 px with the pointer cursor, a group's heading is a muted 36 px row, a divider bleeds across the list. A row's shortcut is a `CommandShortcut` and a word or icon at its end is a `CommandSuffix`. Colour carries nothing: the highlighted row is a faint neutral wash with its text unchanged, group headings, suffixes and the empty line are muted, and no row, key or divider takes a hue. `CommandDialog` draws `Command` itself, so a product never mounts one; its parts are `CommandInput`, `CommandList`, `CommandEmpty`, `CommandGroup`, `CommandItem` and `CommandShortcut` (a `Kbd`).
25
25
  * @words "`<CommandMenu.Item>` children are Title Case verb phrases (`Deploy Project`, `Invite Team Member`). Avoid navigation phrasing like `Go to project page`; CommandMenu commands act, not browse." (https://vercel.com/geist/command-menu) "`CommandMenuPage.label` is Title Case and names the scope (`Projects`, `Team Settings`)." (https://vercel.com/geist/command-menu) "`CommandMenuPage.placeholder` is sentence case, action-oriented, and ends with `…` (`Search projects…`, `Type a command or search…`). Bare `Search…` is wrong because it doesn’t name the scope." (https://vercel.com/geist/command-menu) "`<CommandMenu.Group heading>` is Title Case, 1–2 words (`Actions`, `Recent`)." (https://vercel.com/geist/command-menu) Ours: groups are plural nouns in sentence case (*Agents*, *Go to*), one or two words. Items are names, or verb and noun for a creation page (*New Agent*), because the dialog goes to places. The placeholder names what is searched, never a bare "Search". No match quotes the query.
26
26
  * @access "Use `aria-live="polite"` on the result count so screen readers hear how the list narrows as the user types." (https://vercel.com/geist/command-menu) "Up/Down arrows move highlight, Enter activates, Escape closes. Backspace at an empty input pops the page stack." (https://vercel.com/geist/command-menu) "Display each item’s `keybind` as a `Kbd` slot so the shortcut is discoverable to sighted users and announced as a label to screen readers." (https://vercel.com/geist/command-menu) Ours: a dialog with a screen-reader `title` and `description`, both required; the *Esc* key is a button named by `closeLabel`, which is required; the field is a combobox over a listbox; the highlighted item is `aria-selected`. A polite live region reads `resultCount` as the list narrows, and it is required. `CommandInput` requires its `placeholder`, `CommandGroup` its `heading` and `CommandItem` its `onSelect`, so no field, group or row is left unnamed or inert; a row with no group stands outside a `CommandGroup`. A shortcut is a `CommandShortcut`, drawn as `kbd` elements. With no pages there is no stack for Backspace to pop.
@@ -44,7 +44,7 @@ export type ConfirmDialogProps = {
44
44
  * @family Compositions
45
45
  * @when "Reach for this over `Modal` when the action is destructive and warrants friction: delete, rotate, revoke, disconnect, downgrade, disable a security setting. The typed gate forces deliberate intent." (https://vercel.com/geist/destructive-action-modal) "Use it for reversible destructive actions too, when the consequence is serious enough to warrant a pause — disabling deployment protection, revoking a shared token. Keep the typed gate; drop `irreversibleDescription`." (https://vercel.com/geist/destructive-action-modal) "For high-stakes destructive actions (delete production resource, rotate signing key, downgrade plan), gate the primary button on a typed match of the resource name." (https://vercel.com/geist/modal) Ours: `ConfirmDialog` is Geist's DestructiveActionModal: remove a mailbox, delete an Agent, with `verify` as the typed gate. It asks for the record's name before the confirm enables on a high-stakes action (delete, rotate, revoke, disconnect, downgrade, a protection switched off), even a reversible one; `irreversible` names what cannot be undone and is left out when the action can be reversed.
46
46
  * @instead "Don't use for routine confirmations (save draft, discard changes, close without saving). The typed gate reads as melodrama when the stakes are low — use a plain `Modal` instead." (https://vercel.com/geist/destructive-action-modal) "Confirm destructive actions in a Modal. `Drawer` and `Sheet` don’t fully dim the page, so they read as too soft for a delete or revoke." (https://vercel.com/geist/modal) Ours: a routine confirmation (discard a draft) takes neither `verify` nor `irreversible`; an action that can be undone runs at once and offers its undo in a toast; a form of a few fields is a `FormDialog`; a choice from a catalogue is a `CatalogDrawer`.
47
- * @behaviour "The verification input gets focus on open so the user can start typing immediately. Submit stays disabled until the value matches `verificationPhrase` exactly." (https://vercel.com/geist/destructive-action-modal) "Enter submits only when the gate is open; it's a no-op otherwise. Cancel, outside-click, and Escape all dismiss." (https://vercel.com/geist/destructive-action-modal) "`loading` disables both buttons. The caller owns `open` — do not self-dismiss from `onConfirm`. Close the modal after the API settles (success or error), or keep it open on error so the user can retry." (https://vercel.com/geist/destructive-action-modal) "Default focus to `Cancel` on any destructive Modal. Enter must never trigger the destructive action without a typed confirmation." (https://vercel.com/geist/modal) "Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: `title`, `description`, `confirmLabel` and `cancelLabel` are required; `irreversible` and `verify` are optional, and the absence of `irreversible` is what marks the action reversible. Geist's `irreversibleDescription` is `irreversible`, `verificationPhrase` and `verificationLabel` are `verify.phrase` and `verify.prompt`, and `error` is the catalogue's message. 480 px wide over a scrim. The title and the description, then the body in a 24 px column: the `irreversible` note, the `verify` field, the failure under it. `irreversible` is a flat red note with a red mark and red words, not a band over the footer; besides it the only red is the failure and the enabled destructive confirm. While `loading` the field turns read-only and keeps focus, Escape does not close it, and the confirm says `confirmPendingLabel`, which falls back to the confirm's label. A press outside does not close it, so a stray click never discards a typed phrase or an action in flight; Escape and Cancel do. The footer is a bar that stays at the bottom while a tall confirmation scrolls, and a row on a phone too. How long it stays open while work goes on follows DESIGN.md "System activity".
47
+ * @behaviour "The verification input gets focus on open so the user can start typing immediately. Submit stays disabled until the value matches `verificationPhrase` exactly." (https://vercel.com/geist/destructive-action-modal) "Enter submits only when the gate is open; it's a no-op otherwise. Cancel, outside-click, and Escape all dismiss." (https://vercel.com/geist/destructive-action-modal) "`loading` disables both buttons. The caller owns `open` — do not self-dismiss from `onConfirm`. Close the modal after the API settles (success or error), or keep it open on error so the user can retry." (https://vercel.com/geist/destructive-action-modal) "Default focus to `Cancel` on any destructive Modal. Enter must never trigger the destructive action without a typed confirmation." (https://vercel.com/geist/modal) "Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: `title`, `description`, `confirmLabel` and `cancelLabel` are required; `irreversible` and `verify` are optional, and the absence of `irreversible` is what marks the action reversible. Geist's `irreversibleDescription` is `irreversible`, `verificationPhrase` and `verificationLabel` are `verify.phrase` and `verify.prompt`, and `error` is the catalogue's message. 480 px wide over a scrim. The title and the description, then the body in a 24 px column: the `irreversible` note, the `verify` field, the failure under it. `irreversible` is a flat red note with a red mark and red words, not a band over the footer; besides it the only red is the failure and the enabled destructive confirm. While `loading` the field turns read-only and keeps focus, Escape does not close it, and the confirm says `confirmPendingLabel`, which falls back to the confirm's label. A press outside does not close it, so a stray click never discards a typed phrase or an action in flight; Escape and Cancel do. The footer is a bar that stays at the bottom while a tall confirmation scrolls, and a row on a phone too. How long it stays open while work goes on follows the product-design skill's rule/wait-shows-where-it-lives and living-elements.md "System waits".
48
48
  * @words "`title` is Title Case, `Verb + Noun`, a statement — never a question. `Delete Project`, not `Delete this project?`." (https://vercel.com/geist/destructive-action-modal) "`description` is sentence case, names the consequence, and interpolates the specific resource when relevant. `<b>my-project</b> and all its deployments will be permanently deleted.` reads stronger than `This project and all its deployments will be deleted.`." (https://vercel.com/geist/destructive-action-modal) "`confirmLabel` matches the title 1:1. Never generic (`Confirm`, `OK`, `Continue`), never a bare verb (`Delete`)." (https://vercel.com/geist/destructive-action-modal) "`cancelLabel` defaults to `Cancel`. Override when Cancel is ambiguous, such as `Keep Turn Running` when the primary action is itself a cancellation." (https://vercel.com/geist/destructive-action-modal) "`verificationPhrase`: for entity deletes, type the **resource name itself** (`my-project`) and pair with `verificationLabel="project name"` so the prompt reads `To confirm, type the project name "my-project"`. That's the canonical signal that the user knows which thing they're acting on. Fall back to a lowercase verb phrase (`disable vercel authentication`) only when there's no entity to name." (https://vercel.com/geist/destructive-action-modal) "`irreversibleDescription` names the specific action and resource and ends with `cannot be undone.` — `Deleting my-project cannot be undone.` rather than the generic `This cannot be undone.`. Omit the prop entirely for reversible actions; the prop's absence is the signal, not a falsy value." (https://vercel.com/geist/destructive-action-modal) "`error` surfaces the API failure verbatim in Vercel voice: `Couldn't save settings. Try again.`. Never dump a raw error object." (https://vercel.com/geist/destructive-action-modal) "Pair the post-confirm success toast verb 1:1 with the primary button: `Delete Project` button, `Project deleted` toast. Never `Project removed`." (https://vercel.com/geist/destructive-action-modal) "Close irreversible bodies with `This cannot be undone.`; close cascade-only bodies with `Some effects cannot be undone.`. Don’t claim full irreversibility for a partial cascade." (https://vercel.com/geist/modal) Ours: the title is sentence case and names the record, "Remove pec@acme.it", and the confirm repeats the verb and the noun, "Remove mailbox", so the two share a verb and not every word; its success toast uses the same verb ("Mailbox removed"). The description names the record in medium weight.
49
49
  * @access "The verification input is associated with its prompt via `aria-labelledby` + `htmlFor`. Screen readers announce the full prompt (`To confirm, type "delete my-project"`) on focus." (https://vercel.com/geist/destructive-action-modal) "The Warning icon in the irreversibility band is `aria-hidden`; the sentence carries the meaning so nothing is announced twice." (https://vercel.com/geist/destructive-action-modal) "Focus stays inside the modal across an `error` transition so the user can retry without losing context. After success, return focus to the trigger." (https://vercel.com/geist/destructive-action-modal) "Set `aria-labelledby` to the `Modal.Title` id so screen readers announce the title on open." (https://vercel.com/geist/modal) "Keep the Cancel button literally `Cancel` so screen-reader users hear a stable dismissal label across destructive flows." (https://vercel.com/geist/modal) Ours: `role="alertdialog"` named by its title and described by its consequence; the note is `role="note"` with its icon hidden. Focus starts on Cancel, or in the field with `verify`.
50
50
  */
@@ -14,7 +14,7 @@ import { bodyBeyondTitle } from "./product-message.js";
14
14
  * @family Compositions
15
15
  * @when "Reach for this over `Modal` when the action is destructive and warrants friction: delete, rotate, revoke, disconnect, downgrade, disable a security setting. The typed gate forces deliberate intent." (https://vercel.com/geist/destructive-action-modal) "Use it for reversible destructive actions too, when the consequence is serious enough to warrant a pause — disabling deployment protection, revoking a shared token. Keep the typed gate; drop `irreversibleDescription`." (https://vercel.com/geist/destructive-action-modal) "For high-stakes destructive actions (delete production resource, rotate signing key, downgrade plan), gate the primary button on a typed match of the resource name." (https://vercel.com/geist/modal) Ours: `ConfirmDialog` is Geist's DestructiveActionModal: remove a mailbox, delete an Agent, with `verify` as the typed gate. It asks for the record's name before the confirm enables on a high-stakes action (delete, rotate, revoke, disconnect, downgrade, a protection switched off), even a reversible one; `irreversible` names what cannot be undone and is left out when the action can be reversed.
16
16
  * @instead "Don't use for routine confirmations (save draft, discard changes, close without saving). The typed gate reads as melodrama when the stakes are low — use a plain `Modal` instead." (https://vercel.com/geist/destructive-action-modal) "Confirm destructive actions in a Modal. `Drawer` and `Sheet` don’t fully dim the page, so they read as too soft for a delete or revoke." (https://vercel.com/geist/modal) Ours: a routine confirmation (discard a draft) takes neither `verify` nor `irreversible`; an action that can be undone runs at once and offers its undo in a toast; a form of a few fields is a `FormDialog`; a choice from a catalogue is a `CatalogDrawer`.
17
- * @behaviour "The verification input gets focus on open so the user can start typing immediately. Submit stays disabled until the value matches `verificationPhrase` exactly." (https://vercel.com/geist/destructive-action-modal) "Enter submits only when the gate is open; it's a no-op otherwise. Cancel, outside-click, and Escape all dismiss." (https://vercel.com/geist/destructive-action-modal) "`loading` disables both buttons. The caller owns `open` — do not self-dismiss from `onConfirm`. Close the modal after the API settles (success or error), or keep it open on error so the user can retry." (https://vercel.com/geist/destructive-action-modal) "Default focus to `Cancel` on any destructive Modal. Enter must never trigger the destructive action without a typed confirmation." (https://vercel.com/geist/modal) "Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: `title`, `description`, `confirmLabel` and `cancelLabel` are required; `irreversible` and `verify` are optional, and the absence of `irreversible` is what marks the action reversible. Geist's `irreversibleDescription` is `irreversible`, `verificationPhrase` and `verificationLabel` are `verify.phrase` and `verify.prompt`, and `error` is the catalogue's message. 480 px wide over a scrim. The title and the description, then the body in a 24 px column: the `irreversible` note, the `verify` field, the failure under it. `irreversible` is a flat red note with a red mark and red words, not a band over the footer; besides it the only red is the failure and the enabled destructive confirm. While `loading` the field turns read-only and keeps focus, Escape does not close it, and the confirm says `confirmPendingLabel`, which falls back to the confirm's label. A press outside does not close it, so a stray click never discards a typed phrase or an action in flight; Escape and Cancel do. The footer is a bar that stays at the bottom while a tall confirmation scrolls, and a row on a phone too. How long it stays open while work goes on follows DESIGN.md "System activity".
17
+ * @behaviour "The verification input gets focus on open so the user can start typing immediately. Submit stays disabled until the value matches `verificationPhrase` exactly." (https://vercel.com/geist/destructive-action-modal) "Enter submits only when the gate is open; it's a no-op otherwise. Cancel, outside-click, and Escape all dismiss." (https://vercel.com/geist/destructive-action-modal) "`loading` disables both buttons. The caller owns `open` — do not self-dismiss from `onConfirm`. Close the modal after the API settles (success or error), or keep it open on error so the user can retry." (https://vercel.com/geist/destructive-action-modal) "Default focus to `Cancel` on any destructive Modal. Enter must never trigger the destructive action without a typed confirmation." (https://vercel.com/geist/modal) "Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: `title`, `description`, `confirmLabel` and `cancelLabel` are required; `irreversible` and `verify` are optional, and the absence of `irreversible` is what marks the action reversible. Geist's `irreversibleDescription` is `irreversible`, `verificationPhrase` and `verificationLabel` are `verify.phrase` and `verify.prompt`, and `error` is the catalogue's message. 480 px wide over a scrim. The title and the description, then the body in a 24 px column: the `irreversible` note, the `verify` field, the failure under it. `irreversible` is a flat red note with a red mark and red words, not a band over the footer; besides it the only red is the failure and the enabled destructive confirm. While `loading` the field turns read-only and keeps focus, Escape does not close it, and the confirm says `confirmPendingLabel`, which falls back to the confirm's label. A press outside does not close it, so a stray click never discards a typed phrase or an action in flight; Escape and Cancel do. The footer is a bar that stays at the bottom while a tall confirmation scrolls, and a row on a phone too. How long it stays open while work goes on follows the product-design skill's rule/wait-shows-where-it-lives and living-elements.md "System waits".
18
18
  * @words "`title` is Title Case, `Verb + Noun`, a statement — never a question. `Delete Project`, not `Delete this project?`." (https://vercel.com/geist/destructive-action-modal) "`description` is sentence case, names the consequence, and interpolates the specific resource when relevant. `<b>my-project</b> and all its deployments will be permanently deleted.` reads stronger than `This project and all its deployments will be deleted.`." (https://vercel.com/geist/destructive-action-modal) "`confirmLabel` matches the title 1:1. Never generic (`Confirm`, `OK`, `Continue`), never a bare verb (`Delete`)." (https://vercel.com/geist/destructive-action-modal) "`cancelLabel` defaults to `Cancel`. Override when Cancel is ambiguous, such as `Keep Turn Running` when the primary action is itself a cancellation." (https://vercel.com/geist/destructive-action-modal) "`verificationPhrase`: for entity deletes, type the **resource name itself** (`my-project`) and pair with `verificationLabel="project name"` so the prompt reads `To confirm, type the project name "my-project"`. That's the canonical signal that the user knows which thing they're acting on. Fall back to a lowercase verb phrase (`disable vercel authentication`) only when there's no entity to name." (https://vercel.com/geist/destructive-action-modal) "`irreversibleDescription` names the specific action and resource and ends with `cannot be undone.` — `Deleting my-project cannot be undone.` rather than the generic `This cannot be undone.`. Omit the prop entirely for reversible actions; the prop's absence is the signal, not a falsy value." (https://vercel.com/geist/destructive-action-modal) "`error` surfaces the API failure verbatim in Vercel voice: `Couldn't save settings. Try again.`. Never dump a raw error object." (https://vercel.com/geist/destructive-action-modal) "Pair the post-confirm success toast verb 1:1 with the primary button: `Delete Project` button, `Project deleted` toast. Never `Project removed`." (https://vercel.com/geist/destructive-action-modal) "Close irreversible bodies with `This cannot be undone.`; close cascade-only bodies with `Some effects cannot be undone.`. Don’t claim full irreversibility for a partial cascade." (https://vercel.com/geist/modal) Ours: the title is sentence case and names the record, "Remove pec@acme.it", and the confirm repeats the verb and the noun, "Remove mailbox", so the two share a verb and not every word; its success toast uses the same verb ("Mailbox removed"). The description names the record in medium weight.
19
19
  * @access "The verification input is associated with its prompt via `aria-labelledby` + `htmlFor`. Screen readers announce the full prompt (`To confirm, type "delete my-project"`) on focus." (https://vercel.com/geist/destructive-action-modal) "The Warning icon in the irreversibility band is `aria-hidden`; the sentence carries the meaning so nothing is announced twice." (https://vercel.com/geist/destructive-action-modal) "Focus stays inside the modal across an `error` transition so the user can retry without losing context. After success, return focus to the trigger." (https://vercel.com/geist/destructive-action-modal) "Set `aria-labelledby` to the `Modal.Title` id so screen readers announce the title on open." (https://vercel.com/geist/modal) "Keep the Cancel button literally `Cancel` so screen-reader users hear a stable dismissal label across destructive flows." (https://vercel.com/geist/modal) Ours: `role="alertdialog"` named by its title and described by its consequence; the note is `role="note"` with its icon hidden. Focus starts on Cancel, or in the field with `verify`.
20
20
  */
@@ -5,7 +5,7 @@ import { DropdownMenuCheckboxItem, DropdownMenuGroup, DropdownMenuItem, Dropdown
5
5
  * A menu that opens at the pointer on a right-click or a long press, from the dropdown's own parts.
6
6
  *
7
7
  * @family Menus
8
- * @when "Use ContextMenu for power-user shortcuts on right-click or long-press over a row, file, or canvas object." (https://vercel.com/geist/context-menu) "ContextMenu must never be the only entry point for an action. Mirror every item in a visible `Menu` trigger or row button so mouse-only and keyboard-only users have parity." (https://vercel.com/geist/context-menu) Ours: a right-click on a canvas or a surface no record owns, whose commands are also reachable another way.
8
+ * @when "Use ContextMenu for power-user shortcuts on right-click or long-press over a row, file, or canvas object." (https://vercel.com/geist/context-menu) "ContextMenu must never be the only entry point for an action. Mirror every item in a visible `Menu` trigger or row button so mouse-only and keyboard-only users have parity." (https://vercel.com/geist/context-menu) Ours: inside `@nadicodeai/ui` only, which does not export it: `ActionContextMenu` draws it for a record. A right-click on a canvas or a surface no record owns, whose commands are also reachable another way, is a composition built on it in this package.
9
9
  * @instead "For a global command palette, use `CommandMenu`; for a dropdown opened from a visible trigger, use `Menu`." (https://vercel.com/geist/context-menu) Ours: those are `CommandDialog` and `DropdownMenu`. A record's right-click is `ActionContextMenu`, from the same data as its `ActionMenu`.
10
10
  * @behaviour "Bind to right-click on desktop and long-press on touch. Suppress the native browser menu only on the trigger area, not the whole page." (https://vercel.com/geist/context-menu) "Position the menu at the pointer; if it would overflow the viewport, flip horizontally then vertically before clipping." (https://vercel.com/geist/context-menu) "Close on activation, Escape, and outside-click. Don’t close on hover-out." (https://vercel.com/geist/context-menu) Ours: the dropdown's surface and rows exactly, 160 px wide at least, opening 2 px right of the pointer and appearing at once, with no entry motion. A row that cannot be chosen keeps its place with its text muted, never dimmed. Destructive last, after a divider.
11
11
  * @words "Items follow the same rules as `Menu`: Title Case `Verb + Noun` (`Open in New Tab`, `Copy URL`, `Delete Deployment`). Bare verbs are wrong." (https://vercel.com/geist/context-menu) "End with `…` only when activating opens a follow-up dialog (`Rename…`, `Move to Folder…`)." (https://vercel.com/geist/context-menu) "Group destructive items at the bottom with a divider and keep the destructive label `Verb + Noun`. `Delete` alone never ships." (https://vercel.com/geist/context-menu) Ours: sentence case, "Copy address", not Title Case. Identical to the visible menu's, in the same order; a command reached two ways reads the same both ways.
@@ -10,7 +10,7 @@ import { DropdownMenuCheckboxItem, DropdownMenuGroup, DropdownMenuItem, Dropdown
10
10
  * A menu that opens at the pointer on a right-click or a long press, from the dropdown's own parts.
11
11
  *
12
12
  * @family Menus
13
- * @when "Use ContextMenu for power-user shortcuts on right-click or long-press over a row, file, or canvas object." (https://vercel.com/geist/context-menu) "ContextMenu must never be the only entry point for an action. Mirror every item in a visible `Menu` trigger or row button so mouse-only and keyboard-only users have parity." (https://vercel.com/geist/context-menu) Ours: a right-click on a canvas or a surface no record owns, whose commands are also reachable another way.
13
+ * @when "Use ContextMenu for power-user shortcuts on right-click or long-press over a row, file, or canvas object." (https://vercel.com/geist/context-menu) "ContextMenu must never be the only entry point for an action. Mirror every item in a visible `Menu` trigger or row button so mouse-only and keyboard-only users have parity." (https://vercel.com/geist/context-menu) Ours: inside `@nadicodeai/ui` only, which does not export it: `ActionContextMenu` draws it for a record. A right-click on a canvas or a surface no record owns, whose commands are also reachable another way, is a composition built on it in this package.
14
14
  * @instead "For a global command palette, use `CommandMenu`; for a dropdown opened from a visible trigger, use `Menu`." (https://vercel.com/geist/context-menu) Ours: those are `CommandDialog` and `DropdownMenu`. A record's right-click is `ActionContextMenu`, from the same data as its `ActionMenu`.
15
15
  * @behaviour "Bind to right-click on desktop and long-press on touch. Suppress the native browser menu only on the trigger area, not the whole page." (https://vercel.com/geist/context-menu) "Position the menu at the pointer; if it would overflow the viewport, flip horizontally then vertically before clipping." (https://vercel.com/geist/context-menu) "Close on activation, Escape, and outside-click. Don’t close on hover-out." (https://vercel.com/geist/context-menu) Ours: the dropdown's surface and rows exactly, 160 px wide at least, opening 2 px right of the pointer and appearing at once, with no entry motion. A row that cannot be chosen keeps its place with its text muted, never dimmed. Destructive last, after a divider.
16
16
  * @words "Items follow the same rules as `Menu`: Title Case `Verb + Noun` (`Open in New Tab`, `Copy URL`, `Delete Deployment`). Bare verbs are wrong." (https://vercel.com/geist/context-menu) "End with `…` only when activating opens a follow-up dialog (`Rename…`, `Move to Folder…`)." (https://vercel.com/geist/context-menu) "Group destructive items at the bottom with a divider and keep the destructive label `Verb + Noun`. `Delete` alone never ships." (https://vercel.com/geist/context-menu) Ours: sentence case, "Copy address", not Title Case. Identical to the visible menu's, in the same order; a command reached two ways reads the same both ways.
@@ -207,7 +207,7 @@ type DataTableRowNav<TData extends RowData> = {
207
207
  export type DataTableProps<TData extends RowData> = DataTableBaseProps<TData> & DataTableLocalSearch & DataTableOrder & DataTableRowNav<TData>;
208
208
  /**
209
209
  * The record being edited and its form, drawn inside its row under the
210
- * record's own line (DESIGN.md "Menus and commands"); `rowId` is the
210
+ * record's own line (`RowEditForm`'s usage page); `rowId` is the
211
211
  * `getRowId` of that record. The form is a `RowEditForm`.
212
212
  */
213
213
  type EntityRowEditor<TData extends RowData> = {
@@ -240,14 +240,14 @@ export declare function columnMenuLabel<TData extends RowData, TValue extends Ce
240
240
  * “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
241
241
  * Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced.
242
242
  * “Sortable column headers are buttons. The visible label stays Title Case; the sort-direction arrow is decorative and the button announces the next sort state to assistive tech.” (https://vercel.com/geist/table)
243
- * Ours: the order has one owner, the app's `sorting`, which the URL holds, so no heading is a button and every page of a paged list follows one order.
243
+ * Ours: the order has one owner, the app's `sorting`, which the URL holds and a `CollectionSort` above the list sets, so no heading is a button and every page of a paged list follows one order.
244
244
  * “Apply `tabular-nums` (or Geist Mono) to numeric columns so digits align across rows for comparison.” (https://vercel.com/geist/table)
245
245
  * Ours: a numeric column trails in tabular figures.
246
246
  * @words “Column headers (`<Table.Head>`) are Title Case nouns or noun phrases: `Last Used`, `Requests (7d)`, `Created`, `Status`. Never sentences.” (https://vercel.com/geist/table)
247
247
  * “Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table)
248
248
  * “Use the canonical short relative-time form in cells (`2m ago`, `5h ago`); switch to `Mar 14, 2026` past 7 days. See `Relative Time Card`.” (https://vercel.com/geist/table)
249
249
  * “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table)
250
- * Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product's catalogue, in both languages. The footer is a count or the paging; totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total. Italian headings run a third longer and never wrap.
250
+ * Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product's catalogue, in both languages. The footer is a count or the paging, never a help sentence: guidance a step needs lives in that step. Totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total. Italian headings run a third longer and never wrap.
251
251
  * @access A native table named by `tableLabel`, which is required; `th scope="col"`; the record's name is the row's one link. A sorted column's heading carries `aria-sort`. Ours: a missing value is a hidden "—" with screen-reader text, never blank.
252
252
  */
253
253
  export declare function DataTable<TData extends RowData>(props: DataTableProps<TData>): React.JSX.Element;
@@ -201,14 +201,14 @@ function DefaultToolbar({ actions }) {
201
201
  * “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
202
202
  * Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced.
203
203
  * “Sortable column headers are buttons. The visible label stays Title Case; the sort-direction arrow is decorative and the button announces the next sort state to assistive tech.” (https://vercel.com/geist/table)
204
- * Ours: the order has one owner, the app's `sorting`, which the URL holds, so no heading is a button and every page of a paged list follows one order.
204
+ * Ours: the order has one owner, the app's `sorting`, which the URL holds and a `CollectionSort` above the list sets, so no heading is a button and every page of a paged list follows one order.
205
205
  * “Apply `tabular-nums` (or Geist Mono) to numeric columns so digits align across rows for comparison.” (https://vercel.com/geist/table)
206
206
  * Ours: a numeric column trails in tabular figures.
207
207
  * @words “Column headers (`<Table.Head>`) are Title Case nouns or noun phrases: `Last Used`, `Requests (7d)`, `Created`, `Status`. Never sentences.” (https://vercel.com/geist/table)
208
208
  * “Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table)
209
209
  * “Use the canonical short relative-time form in cells (`2m ago`, `5h ago`); switch to `Mar 14, 2026` past 7 days. See `Relative Time Card`.” (https://vercel.com/geist/table)
210
210
  * “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table)
211
- * Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product's catalogue, in both languages. The footer is a count or the paging; totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total. Italian headings run a third longer and never wrap.
211
+ * Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product's catalogue, in both languages. The footer is a count or the paging, never a help sentence: guidance a step needs lives in that step. Totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total. Italian headings run a third longer and never wrap.
212
212
  * @access A native table named by `tableLabel`, which is required; `th scope="col"`; the record's name is the row's one link. A sorted column's heading carries `aria-sort`. Ours: a missing value is a hidden "—" with screen-reader text, never blank.
213
213
  */
214
214
  export function DataTable(props) {
@@ -20,7 +20,8 @@ import { type PhoneLayout } from "../internal/phone-sheet.js";
20
20
  * edge, the primary at the trailing edge, a lone button across the full width. A step back
21
21
  * (*Previous*) is wrapped with Cancel in one group at the leading edge, so the footer keeps two
22
22
  * ends. A footer always holds an action: `children`, or `showCloseButton` with its `closeLabel`.
23
- * All neutral: the footer and a `sticky` header are recessed behind a hairline, and no hue appears
23
+ * A choice to stop being asked is a checkbox at the end of the body, remembered by whichever
24
+ * action is taken, never a third button in the footer. All neutral: the footer and a `sticky` header are recessed behind a hairline, and no hue appears
24
25
  * but the focus ring.
25
26
  * @words "`Modal.Title` is a Title Case statement, never a question. `Transfer Project` is correct; `Transfer Project?` is wrong." (https://vercel.com/geist/modal)
26
27
  * "`Modal.P` body is sentence case, 1–3 sentences. State the consequence first, then any cascade." (https://vercel.com/geist/modal)
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAWlE,OAAO,EAAE,KAAK,WAAW,EAAoB,MAAM,wBAAwB,CAAC;AAG5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,qBAE5E;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,qBAEjE;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,qBAE/D;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAE7D;AAED,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1C,KAAK,kBAAkB,GAAG,eAAe,CAAC,QAAQ,CAAC,KAAK,GAAG;IACzD,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,MAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,qBAcrF;AAED,KAAK,kBAAkB,GAAG,eAAe,CAAC,KAAK,CAAC,KAAK,GAAG;IACtD,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,CACE;IAAE,eAAe,CAAC,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,eAAe,EAAE,KAAK,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAA;CAAE,CACrD,CAAC;AAEJ,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,eAAsB,EACtB,UAAU,EACV,MAAkB,EAClB,WAAqB,EACrB,MAAc,EACd,UAAqC,EACrC,GAAG,KAAK,EACT,EAAE,kBAAkB,qBA4CpB;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYzE;AAED;;;;;;GAMG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GACpE,CACI;IAAE,eAAe,CAAC,EAAE,KAAK,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE;AAChF,4EAA4E;GAC1E;IAAE,eAAe,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAC5E,CAAC;AAEJ,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,eAAe,EACf,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAmBnB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBASxE;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,qBAYpF;AAED,OAAO,EACL,MAAM,EACN,UAAU,EACV,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAWlE,OAAO,EAAE,KAAK,WAAW,EAAoB,MAAM,wBAAwB,CAAC;AAG5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,qBAE5E;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,qBAEjE;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,qBAE/D;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAE7D;AAED,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1C,KAAK,kBAAkB,GAAG,eAAe,CAAC,QAAQ,CAAC,KAAK,GAAG;IACzD,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,MAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,qBAcrF;AAED,KAAK,kBAAkB,GAAG,eAAe,CAAC,KAAK,CAAC,KAAK,GAAG;IACtD,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,CACE;IAAE,eAAe,CAAC,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,eAAe,EAAE,KAAK,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAA;CAAE,CACrD,CAAC;AAEJ,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,eAAsB,EACtB,UAAU,EACV,MAAkB,EAClB,WAAqB,EACrB,MAAc,EACd,UAAqC,EACrC,GAAG,KAAK,EACT,EAAE,kBAAkB,qBA4CpB;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYzE;AAED;;;;;;GAMG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GACpE,CACI;IAAE,eAAe,CAAC,EAAE,KAAK,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE;AAChF,4EAA4E;GAC1E;IAAE,eAAe,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAC5E,CAAC;AAEJ,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,eAAe,EACf,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAmBnB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBASxE;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,qBAYpF;AAED,OAAO,EACL,MAAM,EACN,UAAU,EACV,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
@@ -25,7 +25,8 @@ import { XIcon } from "lucide-react";
25
25
  * edge, the primary at the trailing edge, a lone button across the full width. A step back
26
26
  * (*Previous*) is wrapped with Cancel in one group at the leading edge, so the footer keeps two
27
27
  * ends. A footer always holds an action: `children`, or `showCloseButton` with its `closeLabel`.
28
- * All neutral: the footer and a `sticky` header are recessed behind a hairline, and no hue appears
28
+ * A choice to stop being asked is a checkbox at the end of the body, remembered by whichever
29
+ * action is taken, never a third button in the footer. All neutral: the footer and a `sticky` header are recessed behind a hairline, and no hue appears
29
30
  * but the focus ring.
30
31
  * @words "`Modal.Title` is a Title Case statement, never a question. `Transfer Project` is correct; `Transfer Project?` is wrong." (https://vercel.com/geist/modal)
31
32
  * "`Modal.P` body is sentence case, 1–3 sentences. State the consequence first, then any cascade." (https://vercel.com/geist/modal)
@@ -11,8 +11,8 @@ interface DisclosureProps {
11
11
  *
12
12
  * It is the native `<details>` element, so it opens without JavaScript, renders
13
13
  * on the server, and is announced as a disclosure; the closed label names what
14
- * is inside, because a closed disclosure must still say what it holds
15
- * (DESIGN.md "Page compositions").
14
+ * is inside, because a closed disclosure must still say what it holds (its
15
+ * `@words` below).
16
16
  *
17
17
  * @family Other
18
18
  * @when Supporting detail a person opens on demand, such as other download formats or a checksum.
@@ -7,8 +7,8 @@ import { cn } from "../lib/utils.js";
7
7
  *
8
8
  * It is the native `<details>` element, so it opens without JavaScript, renders
9
9
  * on the server, and is announced as a disclosure; the closed label names what
10
- * is inside, because a closed disclosure must still say what it holds
11
- * (DESIGN.md "Page compositions").
10
+ * is inside, because a closed disclosure must still say what it holds (its
11
+ * `@words` below).
12
12
  *
13
13
  * @family Other
14
14
  * @when Supporting detail a person opens on demand, such as other download formats or a checksum.
@@ -0,0 +1,46 @@
1
+ import * as React from "react";
2
+ export interface DocumentTab {
3
+ value: string;
4
+ label: string;
5
+ icon: React.ReactNode;
6
+ /** A longer name shown on hover: the file's path or the page's address. */
7
+ title?: string;
8
+ /** The ×'s hover title, in the product's words: "Close Notes.md". */
9
+ closeLabel: string;
10
+ }
11
+ export interface DocumentTabsProps {
12
+ tabs: readonly DocumentTab[];
13
+ value: string;
14
+ onValueChange: (value: string) => void;
15
+ onClose: (value: string) => void;
16
+ /** Builds the ids that tie each tab to the panel the page draws for it. */
17
+ idBase: string;
18
+ "aria-label": string;
19
+ /** Controls after the tabs, such as the button that opens a new one. */
20
+ children?: React.ReactNode;
21
+ className?: string;
22
+ }
23
+ /** The id of a tab and of the panel it shows, for a page that draws its panels itself. */
24
+ declare function documentTabIds(idBase: string, value: string): {
25
+ tab: string;
26
+ panel: string;
27
+ };
28
+ /**
29
+ * Open documents side by side, as a browser's tabs: each a name with its icon and a close button, one of them shown.
30
+ *
31
+ * @family Navigation
32
+ * @when The things a person opened and switches between beside their work, each one closable: the files and web pages
33
+ * of Nadia's side panel. The set changes as they open and close things.
34
+ * @instead A fixed set of sibling views of one object is `Tabs`; a list of records to open is `ItemGroup`.
35
+ * @behaviour One tab stop: the arrow keys move between tabs, Home and End go to the first and the last, and moving
36
+ * selects. Delete or Backspace closes the focused tab and moves the focus to the tab shown next. A click on a tab's ×,
37
+ * which shows `closeLabel` on hover, closes that tab only and does not select it; the × is the pointer's, never a tab stop. Each tab is as wide as its name, from 7rem to 14rem, ending in an
38
+ * ellipsis; a row wider than its space scrolls sideways without a bar, and the tab shown scrolls into view. The tab
39
+ * shown takes the `accent` fill and ink text; the others are muted text that takes a lighter accent on hover.
40
+ * @words Each tab is the document's own name, a file's or a page's title. `closeLabel` is "Close <name>".
41
+ * @access A `tablist` named by `aria-label` of `tab`s, each declaring Delete in `aria-keyshortcuts` and an `aria-controls` naming the panel the page draws with
42
+ * `documentTabIds(idBase, value).panel`, which the panel takes as its id beside `aria-labelledby` set to `.tab`.
43
+ */
44
+ declare function DocumentTabs({ tabs, value, onValueChange, onClose, idBase, children, className, ...props }: DocumentTabsProps): React.JSX.Element;
45
+ export { DocumentTabs, documentTabIds };
46
+ //# sourceMappingURL=document-tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-tabs.d.ts","sourceRoot":"","sources":["../../src/components/document-tabs.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,SAAS,WAAW,EAAE,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,0FAA0F;AAC1F,iBAAS,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;EAEpD;AAED;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,YAAY,CAAC,EACpB,IAAI,EACJ,KAAK,EACL,aAAa,EACb,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,qBA2EnB;AAED,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC"}