@nadicodeai/ui 12.1.224 → 12.1.225

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 (189) hide show
  1. package/AGENTS.md +4 -1
  2. package/dist/components/action-menu.d.ts +4 -4
  3. package/dist/components/action-menu.d.ts.map +1 -1
  4. package/dist/components/action-menu.js +2 -2
  5. package/dist/components/agent-card.d.ts +1 -1
  6. package/dist/components/agent-card.js +1 -1
  7. package/dist/components/badge.d.ts +2 -1
  8. package/dist/components/badge.d.ts.map +1 -1
  9. package/dist/components/badge.js +2 -1
  10. package/dist/components/brand.d.ts +1 -1
  11. package/dist/components/brand.d.ts.map +1 -1
  12. package/dist/components/brand.js +21 -2
  13. package/dist/components/card.d.ts +1 -1
  14. package/dist/components/card.js +1 -1
  15. package/dist/components/catalog-card.d.ts +1 -2
  16. package/dist/components/catalog-card.d.ts.map +1 -1
  17. package/dist/components/catalog-card.js +1 -2
  18. package/dist/components/chart-card.d.ts +2 -2
  19. package/dist/components/chart-card.d.ts.map +1 -1
  20. package/dist/components/chart-card.js +1 -1
  21. package/dist/components/check-counts.d.ts +3 -5
  22. package/dist/components/check-counts.d.ts.map +1 -1
  23. package/dist/components/check-counts.js +5 -7
  24. package/dist/components/collection-page.d.ts +6 -7
  25. package/dist/components/collection-page.d.ts.map +1 -1
  26. package/dist/components/collection-page.js +3 -3
  27. package/dist/components/data-table.d.ts +13 -21
  28. package/dist/components/data-table.d.ts.map +1 -1
  29. package/dist/components/data-table.js +57 -192
  30. package/dist/components/drawer-steps.d.ts +1 -1
  31. package/dist/components/drawer-steps.js +1 -1
  32. package/dist/components/dropdown-menu.d.ts +5 -4
  33. package/dist/components/dropdown-menu.d.ts.map +1 -1
  34. package/dist/components/dropdown-menu.js +7 -6
  35. package/dist/components/empty-state.d.ts +4 -1
  36. package/dist/components/empty-state.d.ts.map +1 -1
  37. package/dist/components/empty-state.js +5 -4
  38. package/dist/components/figure-row.d.ts +58 -0
  39. package/dist/components/figure-row.d.ts.map +1 -0
  40. package/dist/components/figure-row.js +41 -0
  41. package/dist/components/form-dialog.d.ts +1 -1
  42. package/dist/components/form-dialog.js +1 -1
  43. package/dist/components/form-drawer.d.ts +2 -2
  44. package/dist/components/form-drawer.js +2 -2
  45. package/dist/components/gauge.d.ts +2 -0
  46. package/dist/components/gauge.d.ts.map +1 -1
  47. package/dist/components/gauge.js +2 -0
  48. package/dist/components/icon-tile.d.ts +27 -0
  49. package/dist/components/icon-tile.d.ts.map +1 -0
  50. package/dist/components/icon-tile.js +18 -0
  51. package/dist/components/identity-mark.d.ts +3 -2
  52. package/dist/components/identity-mark.d.ts.map +1 -1
  53. package/dist/components/identity-mark.js +3 -10
  54. package/dist/components/kpi-card.d.ts +23 -6
  55. package/dist/components/kpi-card.d.ts.map +1 -1
  56. package/dist/components/kpi-card.js +11 -7
  57. package/dist/components/library-shelf.d.ts +1 -1
  58. package/dist/components/library-shelf.js +1 -1
  59. package/dist/components/menu-choice-row.d.ts +1 -2
  60. package/dist/components/menu-choice-row.d.ts.map +1 -1
  61. package/dist/components/menu-choice-row.js +1 -2
  62. package/dist/components/notice-banner.d.ts +1 -1
  63. package/dist/components/notice-banner.js +1 -1
  64. package/dist/components/numbered-steps.d.ts +1 -1
  65. package/dist/components/numbered-steps.js +1 -1
  66. package/dist/components/object-page.d.ts +25 -9
  67. package/dist/components/object-page.d.ts.map +1 -1
  68. package/dist/components/object-page.js +13 -9
  69. package/dist/components/object-workspace.d.ts +2 -2
  70. package/dist/components/object-workspace.js +2 -2
  71. package/dist/components/overview-page.d.ts +6 -1
  72. package/dist/components/overview-page.d.ts.map +1 -1
  73. package/dist/components/page-actions.d.ts +16 -15
  74. package/dist/components/page-actions.d.ts.map +1 -1
  75. package/dist/components/page-actions.js +9 -7
  76. package/dist/components/page-frame.d.ts +1 -1
  77. package/dist/components/page-frame.js +1 -1
  78. package/dist/components/page-header.d.ts +12 -9
  79. package/dist/components/page-header.d.ts.map +1 -1
  80. package/dist/components/page-header.js +11 -8
  81. package/dist/components/product-shell.d.ts +10 -13
  82. package/dist/components/product-shell.d.ts.map +1 -1
  83. package/dist/components/product-shell.js +9 -12
  84. package/dist/components/progress-checklist.d.ts +4 -4
  85. package/dist/components/progress-checklist.d.ts.map +1 -1
  86. package/dist/components/progress-checklist.js +4 -14
  87. package/dist/components/progress.d.ts +3 -1
  88. package/dist/components/progress.d.ts.map +1 -1
  89. package/dist/components/progress.js +3 -1
  90. package/dist/components/reading-column.d.ts +2 -2
  91. package/dist/components/reading-column.js +2 -2
  92. package/dist/components/record-commands.d.ts +15 -7
  93. package/dist/components/record-commands.d.ts.map +1 -1
  94. package/dist/components/record-commands.js +26 -19
  95. package/dist/components/record-identity.d.ts +4 -2
  96. package/dist/components/record-identity.d.ts.map +1 -1
  97. package/dist/components/record-identity.js +3 -4
  98. package/dist/components/record-list.d.ts +25 -27
  99. package/dist/components/record-list.d.ts.map +1 -1
  100. package/dist/components/record-list.js +31 -79
  101. package/dist/components/record-sheet.d.ts +1 -1
  102. package/dist/components/record-sheet.js +1 -1
  103. package/dist/components/row-edit-form.d.ts +1 -1
  104. package/dist/components/row-edit-form.js +1 -1
  105. package/dist/components/settings-facts.d.ts +5 -6
  106. package/dist/components/settings-facts.d.ts.map +1 -1
  107. package/dist/components/settings-facts.js +3 -4
  108. package/dist/components/settings-page.d.ts +2 -2
  109. package/dist/components/settings-page.js +2 -2
  110. package/dist/components/settings-section.d.ts +10 -5
  111. package/dist/components/settings-section.d.ts.map +1 -1
  112. package/dist/components/settings-section.js +8 -4
  113. package/dist/components/sheet.d.ts +1 -1
  114. package/dist/components/sheet.js +1 -1
  115. package/dist/components/sidebar-sections.d.ts +4 -4
  116. package/dist/components/sidebar-sections.d.ts.map +1 -1
  117. package/dist/components/sidebar-sections.js +3 -3
  118. package/dist/components/sidebar.d.ts +1 -1
  119. package/dist/components/sidebar.js +1 -1
  120. package/dist/components/status-badge.d.ts +15 -12
  121. package/dist/components/status-badge.d.ts.map +1 -1
  122. package/dist/components/status-badge.js +15 -12
  123. package/dist/components/step-cards.d.ts +1 -2
  124. package/dist/components/step-cards.d.ts.map +1 -1
  125. package/dist/components/step-cards.js +1 -2
  126. package/dist/components/switch.d.ts +4 -2
  127. package/dist/components/switch.d.ts.map +1 -1
  128. package/dist/components/switch.js +9 -3
  129. package/dist/components/table-card.d.ts +2 -3
  130. package/dist/components/table-card.d.ts.map +1 -1
  131. package/dist/components/table-card.js +2 -3
  132. package/dist/components/table.d.ts +6 -24
  133. package/dist/components/table.d.ts.map +1 -1
  134. package/dist/components/table.js +11 -23
  135. package/dist/components/tabs-nav.d.ts +2 -2
  136. package/dist/components/tabs-nav.js +2 -2
  137. package/dist/components/text-link.d.ts +5 -5
  138. package/dist/components/text-link.js +5 -5
  139. package/dist/index.d.ts +2 -0
  140. package/dist/index.d.ts.map +1 -1
  141. package/dist/index.js +2 -0
  142. package/dist/internal/badge-frame.d.ts +1 -1
  143. package/dist/internal/badge-frame.d.ts.map +1 -1
  144. package/dist/internal/badge-frame.js +1 -0
  145. package/dist/internal/catalog-list.d.ts.map +1 -1
  146. package/dist/internal/catalog-list.js +1 -1
  147. package/dist/internal/collection-rail.d.ts +2 -2
  148. package/dist/internal/collection-rail.d.ts.map +1 -1
  149. package/dist/internal/empty.d.ts +1 -1
  150. package/dist/internal/empty.d.ts.map +1 -1
  151. package/dist/internal/empty.js +1 -2
  152. package/dist/internal/fieldset-disabled.d.ts +6 -0
  153. package/dist/internal/fieldset-disabled.d.ts.map +1 -0
  154. package/dist/internal/fieldset-disabled.js +7 -0
  155. package/dist/internal/final-focus.d.ts +2 -2
  156. package/dist/internal/final-focus.js +2 -2
  157. package/dist/internal/icon-tile-frame.d.ts +16 -0
  158. package/dist/internal/icon-tile-frame.d.ts.map +1 -0
  159. package/dist/internal/icon-tile-frame.js +21 -0
  160. package/dist/internal/record-grid.d.ts +58 -0
  161. package/dist/internal/record-grid.d.ts.map +1 -0
  162. package/dist/internal/record-grid.js +79 -0
  163. package/dist/internal/settings-save.d.ts.map +1 -1
  164. package/dist/internal/settings-save.js +2 -1
  165. package/dist/showcase/specimens/actions.d.ts.map +1 -1
  166. package/dist/showcase/specimens/actions.js +1 -1
  167. package/dist/showcase/specimens/charts.d.ts.map +1 -1
  168. package/dist/showcase/specimens/charts.js +1 -1
  169. package/dist/showcase/specimens/compositions.d.ts.map +1 -1
  170. package/dist/showcase/specimens/compositions.js +3 -3
  171. package/dist/showcase/specimens/data.d.ts +1 -0
  172. package/dist/showcase/specimens/data.d.ts.map +1 -1
  173. package/dist/showcase/specimens/data.js +7 -4
  174. package/dist/showcase/specimens/index.d.ts +2 -0
  175. package/dist/showcase/specimens/index.d.ts.map +1 -1
  176. package/dist/showcase/specimens/status.d.ts +1 -0
  177. package/dist/showcase/specimens/status.d.ts.map +1 -1
  178. package/dist/showcase/specimens/status.js +4 -2
  179. package/dist/showcase/usage.generated.d.ts +1 -1
  180. package/dist/showcase/usage.generated.d.ts.map +1 -1
  181. package/dist/showcase/usage.generated.js +99 -77
  182. package/dist/standalone/index.js +1 -1
  183. package/package.json +2 -2
  184. package/dist/components/table-layouts.d.ts +0 -110
  185. package/dist/components/table-layouts.d.ts.map +0 -1
  186. package/dist/components/table-layouts.js +0 -125
  187. package/dist/internal/table-compact-line.d.ts +0 -57
  188. package/dist/internal/table-compact-line.d.ts.map +0 -1
  189. package/dist/internal/table-compact-line.js +0 -119
@@ -12,7 +12,7 @@ import { ChevronRightIcon, CheckIcon, LockIcon } from "lucide-react";
12
12
  * @family Menus
13
13
  * @when "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: inside `@nadicodeai/ui` only, which does not export it, a menu no composition draws: a column chooser, a sort, a product's own choices in a submenu.
14
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: those are `ContextMenu` and `CommandDialog`; two related primary actions stand side by side as buttons. A record's or a page's commands are `ActionMenu` or `PageActions`' menu, from data. The account's rows are `AccountMenu`. These four draw their rows with `DropdownMenuCommand`; the `DropdownMenu` family is used directly only for a choice menu such as a sort, with `DropdownMenuLink` for a destination row. A value to choose in a form is `Select`.
15
- * @behaviour "Dropdown menu opened via button. Supports typeahead and keyboard navigation." (https://vercel.com/geist/menu) "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`. A solid floating surface, 200 px wide at least, 10 px from its trigger. A labelled trigger may end in a chevron; an icon trigger has none. Safe commands come first, each with its icon, groups split by a divider, the destructive command last. Colour sits on that command alone: its text is the error colour at rest and its row takes the soft error fill when highlighted; the panel, the other rows, a section title and the divider stay neutral, and a suffix or lock is muted, 12 px after the label. A command that cannot run stays in place with muted text, never dimmed, and says why in a muted line under its label, which a tap on a phone reads as well as a pointer, since a tooltip opens for the mouse only; a destructive one is muted, not red. Every row, of any kind, is 36 px in the default comfortable density (44 on touch; the compact density, `density="compact"`, tightens the padding to about 28 px on a fine pointer, and no menu in the product uses it) with `{rounded.sm}` corners and the pointer cursor, or the default one when it cannot be chosen, a row with a reason growing by its line, and a section title is a muted row of that height. The highlight is the row's fill alone: no text inside a row changes colour with it, and a row that cannot be chosen takes no highlight. A submenu goes one level deep at most (`one-submenu-level`), and never holds a destructive command.
15
+ * @behaviour "Dropdown menu opened via button. Supports typeahead and keyboard navigation." (https://vercel.com/geist/menu) "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`. A solid floating surface, 200 px wide at least, 10 px from its trigger. A labelled trigger may end in a chevron; an icon trigger has none. Safe commands come first, each with its icon, groups split by a divider, the destructive command last. Colour sits on that command alone: its text is the error colour at rest and its row takes the soft error fill when highlighted; the panel, the other rows, a section title and the divider stay neutral, and a suffix or lock is muted, 12 px after the label. A command that cannot run stays in place with muted text, never dimmed, and a lock at its end; why is its description, read by a screen reader, never a line of text in the menu (owner, 2026-11-09); a destructive one is muted, not red. Every row, of any kind, is 36 px in the default comfortable density (44 on touch; the compact density, `density="compact"`, tightens the padding to about 28 px on a fine pointer, and no menu in the product uses it) with `{rounded.sm}` corners and the pointer cursor, or the default one when it cannot be chosen, and a section title is a muted row of that height. The highlight is the row's fill alone: no text inside a row changes colour with it, and a row that cannot be chosen takes no highlight. A submenu goes one level deep at most (`one-submenu-level`), and never holds a destructive 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) "Section headers (`MenuSection title`) are Title Case, 1–2 words (`Workspace`, `Recent Projects`)." (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, not Title Case: "Remove mailbox", never a bare "Delete"; a section title is sentence case too. Italian runs a third longer; rows wrap, never truncate.
17
17
  * @access "Up/Down arrows move focus through items, Home/End jump to first/last, Enter or Space activates." (https://vercel.com/geist/menu) "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: `role="menu"` named by its trigger, items `menuitem`. Unlike Geist, which skips disabled rows, arrows land on a command that cannot run so its reason is read; it is still never highlighted and never runs. A command's icon is hidden; the value it acts on and its reason are its description. `DropdownMenuCommand` requires its `icon`; a command that cannot run takes `disabledReason`, and one a person may not run is `locked` with its `reason`, so nothing is greyed without saying why.
18
18
  */
@@ -50,9 +50,10 @@ function DropdownMenuLink({ className, closeOnClick = true, inset, ...props }) {
50
50
  * icon takes the row's text colour; at the end it is muted, and red on a
51
51
  * destructive command. A command that
52
52
  * cannot run now takes `disabledReason` and stays in place with its text muted
53
- * and the reason under its label, and a destructive one is muted too,
54
- * not red. A command a person may not run is `locked`: inert, with a lock at
55
- * the end and the `reason` it is inert, which a locked command must give. A
53
+ * and a lock at its end, and a destructive one is muted too, not red. A
54
+ * command a person may not run is `locked`, drawn the same with the `reason` it
55
+ * is inert, which a locked command must give. Either reason is the item's
56
+ * description, read by a screen reader, never a line of text in the menu. A
56
57
  * command that starts work is `loading`: it says `loadingLabel` in its label's
57
58
  * place, stays focusable and ignores a second press, with no dimming. A
58
59
  * `link` is drawn as a link menu item, like `DropdownMenuLink`.
@@ -65,7 +66,7 @@ function DropdownMenuCommand({ icon, iconEnd = false, children, className, detai
65
66
  const describedBy = [detail ? `${id}-detail` : null, why ? `${id}-reason` : null]
66
67
  .filter(Boolean)
67
68
  .join(" ");
68
- const end = locked ? (_jsx(LockIcon, {})) : iconEnd ? (_jsxs(_Fragment, { children: [suffix, _jsx("span", { "aria-hidden": "true", className: "flex h-5 items-center justify-center in-data-[variant=destructive]:text-destructive-soft-foreground", children: icon })] })) : (suffix);
69
+ const end = inert ? (_jsx(LockIcon, {})) : iconEnd ? (_jsxs(_Fragment, { children: [suffix, _jsx("span", { "aria-hidden": "true", className: "flex h-5 items-center justify-center in-data-[variant=destructive]:text-destructive-soft-foreground", children: icon })] })) : (suffix);
69
70
  const hasLabelledParts = describedBy !== "" || Boolean(end);
70
71
  const row = {
71
72
  "aria-label": accessibleName,
@@ -75,7 +76,7 @@ function DropdownMenuCommand({ icon, iconEnd = false, children, className, detai
75
76
  "aria-disabled": busy || inert || undefined,
76
77
  closeOnClick: busy ? false : props.closeOnClick,
77
78
  className: cn(className, "h-auto w-full min-w-0 items-start justify-start gap-2 text-left font-normal whitespace-normal data-disabled:pointer-events-auto"),
78
- children: (_jsxs(_Fragment, { children: [iconEnd ? null : (_jsx("span", { "aria-hidden": "true", className: "flex h-5 shrink-0 items-center justify-center text-current", children: icon })), _jsxs("span", { className: "grid min-w-0 flex-1 gap-0.5 wrap-break-word", children: [_jsx("span", { id: `${id}-label`, children: loadingLabel === undefined ? (children) : (_jsx(PendingLabel, { pending: busy, pendingLabel: loadingLabel, children: children })) }), detail ? (_jsx("span", { className: "font-label-mono text-label-mono text-muted-foreground", "data-slot": "dropdown-menu-detail", id: `${id}-detail`, children: detail })) : null, why ? (_jsx("span", { className: "text-body-sm text-muted-foreground", "data-slot": "dropdown-menu-reason", id: `${id}-reason`, children: why })) : null] }), end ? (_jsx("span", { "aria-hidden": locked ? true : undefined, className: "ml-auto flex h-5 shrink-0 items-center gap-2 pl-3 text-muted-foreground", "data-slot": "dropdown-menu-suffix", children: end })) : null] })),
79
+ children: (_jsxs(_Fragment, { children: [iconEnd ? null : (_jsx("span", { "aria-hidden": "true", className: "flex h-5 shrink-0 items-center justify-center text-current", children: icon })), _jsxs("span", { className: "grid min-w-0 flex-1 gap-0.5 wrap-break-word", children: [_jsx("span", { id: `${id}-label`, children: loadingLabel === undefined ? (children) : (_jsx(PendingLabel, { pending: busy, pendingLabel: loadingLabel, children: children })) }), detail ? (_jsx("span", { className: "font-label-mono text-label-mono text-muted-foreground", "data-slot": "dropdown-menu-detail", id: `${id}-detail`, children: detail })) : null, why ? (_jsx("span", { className: "sr-only", "data-slot": "dropdown-menu-reason", id: `${id}-reason`, children: why })) : null] }), end ? (_jsx("span", { "aria-hidden": inert ? true : undefined, className: "ml-auto flex h-5 shrink-0 items-center gap-2 pl-3 text-muted-foreground", "data-slot": "dropdown-menu-suffix", children: end })) : null] })),
79
80
  };
80
81
  const linkElement = link ??
81
82
  (React.isValidElement(props.render) && props.render.props.href !== undefined
@@ -2,6 +2,7 @@ import { type ReactElement } from "react";
2
2
  import { type EmptyScope } from "../internal/empty.js";
3
3
  import { type CopyButtonProps } from "./copy-button.js";
4
4
  import type { EmptyArt } from "./empty-art.js";
5
+ import type { IconComponent } from "./identity-mark.js";
5
6
  import { type PageCommand, type PagePrimaryCommand } from "./page-actions.js";
6
7
  import { type ResolvedMessage } from "./product-message.js";
7
8
  /** A link that leaves for the product's documentation: a command drawn from the product's router link, so it carries `link`, never `onClick`. */
@@ -29,6 +30,8 @@ export type EmptyStateProps = {
29
30
  } | {
30
31
  kind: "nothingYet";
31
32
  message: string;
33
+ /** The kind of what is missing, as a 32 px tile above the sentence on a page or a region; a card or a line draws the sentence alone. */
34
+ icon?: IconComponent;
32
35
  } | {
33
36
  kind: "noResults";
34
37
  message: string;
@@ -61,7 +64,7 @@ export type EmptyStateKind<K extends EmptyStateProps["kind"]> = Omit<Extract<Emp
61
64
  * @family Feedback
62
65
  * @when "Fill spaces when no content has been added yet, or is temporarily empty due to the nature of the feature and should be designed to prevent confusion." (https://vercel.com/geist/empty-state) "A card used to communicate an error state with a title and message." (https://vercel.com/geist/error-card) "Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load." (https://vercel.com/geist/empty-state) "Render the permission and tier-denial variants full-page when the user lands on a route they can’t view. Use a `Note` only when one tile inside an otherwise-accessible page is gated." (https://vercel.com/geist/empty-state) "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: it is the one owner of an absence in every product: nothing else draws one, and it has no presentation option, so each kind looks the same everywhere. A composition takes its absence as a prop (`empty`, `noMatch` or `failed`), as `DataTable` takes `empty`. Pick the `kind` by the cause. `firstUse` is the blank slate and the informational variant: no record was ever made. `nothingYet`: empty now and it fills by itself. `noResults`: the search or filter found nothing. `cleared`: the work is done. `denied`: this viewer's role or plan does not open it. `failed`: the read failed; it is the Error and the Error Card, a failure inside a card with `scope="card"` and one that stands alone as a block with `page` or `region`. There is no educational kind.
63
66
  * @instead "Don’t put critical persistent warnings here. Empty states vanish when the list populates; persistent warnings belong in `Note` or the page header." (https://vercel.com/geist/empty-state) "Pick `toasts.error()` for transient action failures (`Couldn’t save settings. Try again.`) and the `error` prop on `Input` for field-level validation. Don’t replace either with this block." (https://vercel.com/geist/error) Ours: `Note` is `MessageNotice` or `NoticeBanner`, `toasts.error()` is `showMessageToast` with the tone `error`, and the `error` prop on `Input` is `FieldError`. Rows still loading are skeleton rows. A failure of one record's action is that record's row message. One gated tile on an open page is a `MessageNotice`, so `denied` takes `page` or `region`, never `card`.
64
- * @behaviour "The CTA must be a real `Button` or `Link`, not an `onClick` div, so it joins the tab order and exposes a role." (https://vercel.com/geist/empty-state) "Cap at one primary CTA, plus one secondary when the first action could legitimately be one of two paths (`Import Repository` and `Deploy Template`). Three CTAs is a smell." (https://vercel.com/geist/empty-state) "Don’t auto-launch a tour from the educational variant; pair `Start Tour` with `Skip`." (https://vercel.com/geist/empty-state) "The recovery action must do something concrete: a `Try Again` button when the operation is retry-safe, a named verb (`Reconnect GitHub`, `Update Payment Method`) when it isn’t." (https://vercel.com/geist/error) "Don’t auto-retry in the background; the user came to this surface to decide." (https://vercel.com/geist/error) "For full-page route errors (`error.tsx`), return focus to the `Try Again` button on appearance so a keyboard user can retry without hunting for it." (https://vercel.com/geist/error) "Always pair platform or system errors with a stable identifier (request ID `x-vercel-id`, deployment ID `dpl_…`, run ID, trace ID). Validation and permission denials are user-state, not system, and don’t need an ID." (https://vercel.com/geist/error) "Render the stable ID on a monospace sub-line under a collapsed `<details>` so the user can copy-paste it into a support thread." (https://vercel.com/geist/error) Ours: `firstUse` has the one picture, one action and at most one docs link under it; there is no educational kind, so no tour. A failure shows at most two of its message's actions, Retry first, and moves focus to the first one when it fills a page (`scope="page"`); its `reference` is the collapsed Disclosure holding the monospace identifier and a copy button. A page or a region stands on a resting card, inside a card it takes none, and a collection always passes `card`; a card that lists a few items, as a collection's rail does, passes `line`, where `nothingYet` and `cleared` are one 44 px row like an item: the message at the left, after the cleared check at 16 px. Every kind that carries a title, `failed` excepted, draws it the same way: a mark or picture, a 16 px medium title, one or two muted 14 px lines, 24 px apart, centred, the lines no wider than 340 px. `cleared` and `denied` carry a bordered 54 px tile with a muted icon, never a hue; the picture is `firstUse`'s alone. The action is the filled primary button, as Vercel's Connect draws Create Connector in its empty card; the docs link is muted. A page or a region is padded 48 px above and below and 70 px at the sides (a first use narrows to 24 px under 640 px for its picture). `failed` is the one hued kind: on a page or a region its ground, line, mark and text are all in the error colour, with a 16 px regular title, 16 px padding and 8 px between its parts, and the buttons stay neutral; inside a card it takes the text and mark colour alone, because the card owns the edge and a second one would double it. A first use's picture is 240 × 176 px on a page and 200 × 144 px in a region or a card. Required: `firstUse` and `denied` take a title and a line, `firstUse` its picture, `failed` the catalogue message whose title is always drawn.
67
+ * @behaviour "The CTA must be a real `Button` or `Link`, not an `onClick` div, so it joins the tab order and exposes a role." (https://vercel.com/geist/empty-state) "Cap at one primary CTA, plus one secondary when the first action could legitimately be one of two paths (`Import Repository` and `Deploy Template`). Three CTAs is a smell." (https://vercel.com/geist/empty-state) "Don’t auto-launch a tour from the educational variant; pair `Start Tour` with `Skip`." (https://vercel.com/geist/empty-state) "The recovery action must do something concrete: a `Try Again` button when the operation is retry-safe, a named verb (`Reconnect GitHub`, `Update Payment Method`) when it isn’t." (https://vercel.com/geist/error) "Don’t auto-retry in the background; the user came to this surface to decide." (https://vercel.com/geist/error) "For full-page route errors (`error.tsx`), return focus to the `Try Again` button on appearance so a keyboard user can retry without hunting for it." (https://vercel.com/geist/error) "Always pair platform or system errors with a stable identifier (request ID `x-vercel-id`, deployment ID `dpl_…`, run ID, trace ID). Validation and permission denials are user-state, not system, and don’t need an ID." (https://vercel.com/geist/error) "Render the stable ID on a monospace sub-line under a collapsed `<details>` so the user can copy-paste it into a support thread." (https://vercel.com/geist/error) Ours: `firstUse` has the one picture, one action and at most one docs link under it; there is no educational kind, so no tour. A failure shows at most two of its message's actions, Retry first, and moves focus to the first one when it fills a page (`scope="page"`); its `reference` is the collapsed Disclosure holding the monospace identifier and a copy button. A page or a region stands on a resting card, inside a card it takes none, and a collection always passes `card`; a card that lists a few items, as a collection's rail does, passes `line`, where `nothingYet` and `cleared` are one 44 px row like an item: the message at the left, after the cleared check at 16 px. A `nothingYet` on a page or a region may take `icon`, drawn as a 32 px `IconTile` above its sentence; inside a card or a line it is the sentence alone. Every kind that carries a title, `failed` excepted, draws it the same way: a mark or picture, a 16 px medium title, one or two muted 14 px lines, 24 px apart, centred, the lines no wider than 340 px. `cleared` and `denied` carry a neutral 54 px `IconTile`, never a hue; the picture is `firstUse`'s alone. The action is the filled primary button; the docs link is muted. A page or a region is padded 48 px above and below and 70 px at the sides (a first use narrows to 24 px under 640 px for its picture). `failed` is the one hued kind: on a page or a region its ground, line, mark and text are all in the error colour, with a 16 px regular title, 16 px padding and 8 px between its parts, and the buttons stay neutral; inside a card it takes the text and mark colour alone, because the card owns the edge and a second one would double it. A first use's picture is 240 × 176 px on a page and 200 × 144 px in a region or a card. Required: `firstUse` and `denied` take a title and a line, `firstUse` its picture, `failed` the catalogue message whose title is always drawn.
65
68
  * @words "`title` is Title Case (`No Logs Match Your Filter`); `description` is sentence case and adds new information instead of restating the title." (https://vercel.com/geist/empty-state) Ours: a title is sentence case and names what is missing ("No mailboxes yet"), not Title Case; a quiet line is one sentence. "Quote a single typed query verbatim with curly quotes: `No logs match “${query}”. Clear the filter to see all logs.` For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing." (https://vercel.com/geist/empty-state) "Onboarding bodies name the next action that creates the first item: `Push to your Git repository to create your first one.` Tier-gated bodies follow `{Feature value} with the {Plan} plan.`" (https://vercel.com/geist/empty-state) "Error variant pairs the body with a copyable request ID and a `Try Again` button." (https://vercel.com/geist/empty-state) "CTA labels are Title Case `Verb + Noun`. Never `Get Started`, `Continue`, or `OK`." (https://vercel.com/geist/empty-state) Ours: an action label is sentence case, verb and noun ("Clear filters", "New Agent"), never "Get started" or "OK". "State what happened and what to do next, in that order. Cut apologetic preambles (`Unfortunately`, `Oops`, `We’re sorry`)." (https://vercel.com/geist/error) "Use `Couldn’t` or `Can’t` for user-state errors (`Couldn’t verify your passkey. Try again.`); use `Failed to` for system or infra errors that mirror CLI output (`Build failed. Bundle exceeds 50 MB.`). `Unable to` is banned." (https://vercel.com/geist/error) "Don’t fall back to `Something Went Wrong` as a title; name the resource that failed (`Couldn’t Load Page`, `Couldn’t Load Deployments`)." (https://vercel.com/geist/error) "Never humor an error. Users hitting an error are frustrated; insincere copy makes it worse." (https://vercel.com/geist/error) Ours: a failure is the catalogue's message, never a string of the component's own, and its title names what failed to load.
66
69
  * @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) "When the error appears asynchronously (after a failed fetch), wrap the region in `aria-live="polite"` so it’s announced. Reserve `aria-live="assertive"` for true blocking errors that interrupt input." (https://vercel.com/geist/error) Ours: a title, a failure's included, is a heading, level 2 or, inside a titled section, 3. The picture is decorative. A failure's message is a `role="status"` line, polite, never an assertive alert, because it arrives after a read, not in the middle of input. `nothingYet`, `noResults` and `cleared` are plain lines with no live role of their own: the wrapper that stays mounted while rows and absence swap (the `aria-live="polite"` region, such as `SkeletonRegion`) announces them, once. Beside a table, an absence stands outside the semantic table body, never as a row of it, in that same wrapper.
67
70
  */
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/components/empty-state.tsx"],"names":[],"mappings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ACE,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,eAAe,CAAC;IACzB,mHAAmH;IACnH,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC,CACJ,CAAC;AAEF,sFAAsF;AACtF,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,eAAe,CAAC,MAAM,CAAC,IAAI,IAAI,CAClE,OAAO,CAAC,eAAe,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,EACrC,OAAO,GAAG,cAAc,CACzB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAuFhD"}
@@ -5,6 +5,7 @@ import { useEffect, useRef } from "react";
5
5
  import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyPicture, EmptyTitle, } from "../internal/empty.js";
6
6
  import { CopyButton } from "./copy-button.js";
7
7
  import { Disclosure } from "./disclosure.js";
8
+ import { IconTile } from "./icon-tile.js";
8
9
  import { PageCommandButton } from "./page-actions.js";
9
10
  import { bodyBeyondTitle } from "./product-message.js";
10
11
  /**
@@ -14,7 +15,7 @@ import { bodyBeyondTitle } from "./product-message.js";
14
15
  * @family Feedback
15
16
  * @when "Fill spaces when no content has been added yet, or is temporarily empty due to the nature of the feature and should be designed to prevent confusion." (https://vercel.com/geist/empty-state) "A card used to communicate an error state with a title and message." (https://vercel.com/geist/error-card) "Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load." (https://vercel.com/geist/empty-state) "Render the permission and tier-denial variants full-page when the user lands on a route they can’t view. Use a `Note` only when one tile inside an otherwise-accessible page is gated." (https://vercel.com/geist/empty-state) "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: it is the one owner of an absence in every product: nothing else draws one, and it has no presentation option, so each kind looks the same everywhere. A composition takes its absence as a prop (`empty`, `noMatch` or `failed`), as `DataTable` takes `empty`. Pick the `kind` by the cause. `firstUse` is the blank slate and the informational variant: no record was ever made. `nothingYet`: empty now and it fills by itself. `noResults`: the search or filter found nothing. `cleared`: the work is done. `denied`: this viewer's role or plan does not open it. `failed`: the read failed; it is the Error and the Error Card, a failure inside a card with `scope="card"` and one that stands alone as a block with `page` or `region`. There is no educational kind.
16
17
  * @instead "Don’t put critical persistent warnings here. Empty states vanish when the list populates; persistent warnings belong in `Note` or the page header." (https://vercel.com/geist/empty-state) "Pick `toasts.error()` for transient action failures (`Couldn’t save settings. Try again.`) and the `error` prop on `Input` for field-level validation. Don’t replace either with this block." (https://vercel.com/geist/error) Ours: `Note` is `MessageNotice` or `NoticeBanner`, `toasts.error()` is `showMessageToast` with the tone `error`, and the `error` prop on `Input` is `FieldError`. Rows still loading are skeleton rows. A failure of one record's action is that record's row message. One gated tile on an open page is a `MessageNotice`, so `denied` takes `page` or `region`, never `card`.
17
- * @behaviour "The CTA must be a real `Button` or `Link`, not an `onClick` div, so it joins the tab order and exposes a role." (https://vercel.com/geist/empty-state) "Cap at one primary CTA, plus one secondary when the first action could legitimately be one of two paths (`Import Repository` and `Deploy Template`). Three CTAs is a smell." (https://vercel.com/geist/empty-state) "Don’t auto-launch a tour from the educational variant; pair `Start Tour` with `Skip`." (https://vercel.com/geist/empty-state) "The recovery action must do something concrete: a `Try Again` button when the operation is retry-safe, a named verb (`Reconnect GitHub`, `Update Payment Method`) when it isn’t." (https://vercel.com/geist/error) "Don’t auto-retry in the background; the user came to this surface to decide." (https://vercel.com/geist/error) "For full-page route errors (`error.tsx`), return focus to the `Try Again` button on appearance so a keyboard user can retry without hunting for it." (https://vercel.com/geist/error) "Always pair platform or system errors with a stable identifier (request ID `x-vercel-id`, deployment ID `dpl_…`, run ID, trace ID). Validation and permission denials are user-state, not system, and don’t need an ID." (https://vercel.com/geist/error) "Render the stable ID on a monospace sub-line under a collapsed `<details>` so the user can copy-paste it into a support thread." (https://vercel.com/geist/error) Ours: `firstUse` has the one picture, one action and at most one docs link under it; there is no educational kind, so no tour. A failure shows at most two of its message's actions, Retry first, and moves focus to the first one when it fills a page (`scope="page"`); its `reference` is the collapsed Disclosure holding the monospace identifier and a copy button. A page or a region stands on a resting card, inside a card it takes none, and a collection always passes `card`; a card that lists a few items, as a collection's rail does, passes `line`, where `nothingYet` and `cleared` are one 44 px row like an item: the message at the left, after the cleared check at 16 px. Every kind that carries a title, `failed` excepted, draws it the same way: a mark or picture, a 16 px medium title, one or two muted 14 px lines, 24 px apart, centred, the lines no wider than 340 px. `cleared` and `denied` carry a bordered 54 px tile with a muted icon, never a hue; the picture is `firstUse`'s alone. The action is the filled primary button, as Vercel's Connect draws Create Connector in its empty card; the docs link is muted. A page or a region is padded 48 px above and below and 70 px at the sides (a first use narrows to 24 px under 640 px for its picture). `failed` is the one hued kind: on a page or a region its ground, line, mark and text are all in the error colour, with a 16 px regular title, 16 px padding and 8 px between its parts, and the buttons stay neutral; inside a card it takes the text and mark colour alone, because the card owns the edge and a second one would double it. A first use's picture is 240 × 176 px on a page and 200 × 144 px in a region or a card. Required: `firstUse` and `denied` take a title and a line, `firstUse` its picture, `failed` the catalogue message whose title is always drawn.
18
+ * @behaviour "The CTA must be a real `Button` or `Link`, not an `onClick` div, so it joins the tab order and exposes a role." (https://vercel.com/geist/empty-state) "Cap at one primary CTA, plus one secondary when the first action could legitimately be one of two paths (`Import Repository` and `Deploy Template`). Three CTAs is a smell." (https://vercel.com/geist/empty-state) "Don’t auto-launch a tour from the educational variant; pair `Start Tour` with `Skip`." (https://vercel.com/geist/empty-state) "The recovery action must do something concrete: a `Try Again` button when the operation is retry-safe, a named verb (`Reconnect GitHub`, `Update Payment Method`) when it isn’t." (https://vercel.com/geist/error) "Don’t auto-retry in the background; the user came to this surface to decide." (https://vercel.com/geist/error) "For full-page route errors (`error.tsx`), return focus to the `Try Again` button on appearance so a keyboard user can retry without hunting for it." (https://vercel.com/geist/error) "Always pair platform or system errors with a stable identifier (request ID `x-vercel-id`, deployment ID `dpl_…`, run ID, trace ID). Validation and permission denials are user-state, not system, and don’t need an ID." (https://vercel.com/geist/error) "Render the stable ID on a monospace sub-line under a collapsed `<details>` so the user can copy-paste it into a support thread." (https://vercel.com/geist/error) Ours: `firstUse` has the one picture, one action and at most one docs link under it; there is no educational kind, so no tour. A failure shows at most two of its message's actions, Retry first, and moves focus to the first one when it fills a page (`scope="page"`); its `reference` is the collapsed Disclosure holding the monospace identifier and a copy button. A page or a region stands on a resting card, inside a card it takes none, and a collection always passes `card`; a card that lists a few items, as a collection's rail does, passes `line`, where `nothingYet` and `cleared` are one 44 px row like an item: the message at the left, after the cleared check at 16 px. A `nothingYet` on a page or a region may take `icon`, drawn as a 32 px `IconTile` above its sentence; inside a card or a line it is the sentence alone. Every kind that carries a title, `failed` excepted, draws it the same way: a mark or picture, a 16 px medium title, one or two muted 14 px lines, 24 px apart, centred, the lines no wider than 340 px. `cleared` and `denied` carry a neutral 54 px `IconTile`, never a hue; the picture is `firstUse`'s alone. The action is the filled primary button; the docs link is muted. A page or a region is padded 48 px above and below and 70 px at the sides (a first use narrows to 24 px under 640 px for its picture). `failed` is the one hued kind: on a page or a region its ground, line, mark and text are all in the error colour, with a 16 px regular title, 16 px padding and 8 px between its parts, and the buttons stay neutral; inside a card it takes the text and mark colour alone, because the card owns the edge and a second one would double it. A first use's picture is 240 × 176 px on a page and 200 × 144 px in a region or a card. Required: `firstUse` and `denied` take a title and a line, `firstUse` its picture, `failed` the catalogue message whose title is always drawn.
18
19
  * @words "`title` is Title Case (`No Logs Match Your Filter`); `description` is sentence case and adds new information instead of restating the title." (https://vercel.com/geist/empty-state) Ours: a title is sentence case and names what is missing ("No mailboxes yet"), not Title Case; a quiet line is one sentence. "Quote a single typed query verbatim with curly quotes: `No logs match “${query}”. Clear the filter to see all logs.` For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing." (https://vercel.com/geist/empty-state) "Onboarding bodies name the next action that creates the first item: `Push to your Git repository to create your first one.` Tier-gated bodies follow `{Feature value} with the {Plan} plan.`" (https://vercel.com/geist/empty-state) "Error variant pairs the body with a copyable request ID and a `Try Again` button." (https://vercel.com/geist/empty-state) "CTA labels are Title Case `Verb + Noun`. Never `Get Started`, `Continue`, or `OK`." (https://vercel.com/geist/empty-state) Ours: an action label is sentence case, verb and noun ("Clear filters", "New Agent"), never "Get started" or "OK". "State what happened and what to do next, in that order. Cut apologetic preambles (`Unfortunately`, `Oops`, `We’re sorry`)." (https://vercel.com/geist/error) "Use `Couldn’t` or `Can’t` for user-state errors (`Couldn’t verify your passkey. Try again.`); use `Failed to` for system or infra errors that mirror CLI output (`Build failed. Bundle exceeds 50 MB.`). `Unable to` is banned." (https://vercel.com/geist/error) "Don’t fall back to `Something Went Wrong` as a title; name the resource that failed (`Couldn’t Load Page`, `Couldn’t Load Deployments`)." (https://vercel.com/geist/error) "Never humor an error. Users hitting an error are frustrated; insincere copy makes it worse." (https://vercel.com/geist/error) Ours: a failure is the catalogue's message, never a string of the component's own, and its title names what failed to load.
19
20
  * @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) "When the error appears asynchronously (after a failed fetch), wrap the region in `aria-live="polite"` so it’s announced. Reserve `aria-live="assertive"` for true blocking errors that interrupt input." (https://vercel.com/geist/error) Ours: a title, a failure's included, is a heading, level 2 or, inside a titled section, 3. The picture is decorative. A failure's message is a `role="status"` line, polite, never an assertive alert, because it arrives after a read, not in the middle of input. `nothingYet`, `noResults` and `cleared` are plain lines with no live role of their own: the wrapper that stays mounted while rows and absence swap (the `aria-live="polite"` region, such as `SkeletonRegion`) announces them, once. Beside a table, an absence stands outside the semantic table body, never as a row of it, in that same wrapper.
20
21
  */
@@ -25,11 +26,11 @@ export function EmptyState(props) {
25
26
  return (_jsxs(Empty, { className: scope === "card" ? undefined : "px-6 sm:px-17.5", "data-empty-state": props.kind, scope: scope, children: [_jsxs(EmptyHeader, { children: [_jsx(EmptyPicture, { size: scope === "page" ? "page" : "card", src: props.picture }), _jsx(TitleAndLine, { description: props.description, headingLevel: props.headingLevel, title: props.title })] }), props.action || props.docs ? (_jsxs(EmptyContent, { className: "flex-col flex-nowrap gap-6", "data-empty-state-action": true, children: [props.action ? _jsx(PageCommandButton, { command: props.action, variant: "default" }) : null, props.docs ? _jsx(DocsLink, { command: props.docs }) : null] })) : null] }));
26
27
  case "nothingYet":
27
28
  case "noResults":
28
- return (_jsxs(Empty, { className: scope === "line" ? undefined : "gap-3 py-7", "data-empty-state": props.kind, scope: scope, children: [_jsx(EmptyDescription, { className: "max-w-[40ch]", children: props.message }), props.kind === "noResults" ? (_jsx(EmptyContent, { "data-empty-state-action": true, children: _jsx(PageCommandButton, { command: props.clear, variant: "outline" }) })) : null] }));
29
+ return (_jsxs(Empty, { className: scope === "line" ? undefined : "gap-3 py-7", "data-empty-state": props.kind, scope: scope, children: [props.kind === "nothingYet" && props.icon && (scope === "page" || scope === "region") ? (_jsx(IconTile, { icon: props.icon, size: 32 })) : null, _jsx(EmptyDescription, { className: "max-w-[40ch]", children: props.message }), props.kind === "noResults" ? (_jsx(EmptyContent, { "data-empty-state-action": true, children: _jsx(PageCommandButton, { command: props.clear, variant: "outline" }) })) : null] }));
29
30
  case "cleared":
30
- return scope === "line" ? (_jsxs(Empty, { "data-empty-state": props.kind, scope: scope, children: [_jsx(CheckIcon, { "aria-hidden": "true", className: "size-4 shrink-0 text-muted-foreground" }), _jsx(EmptyDescription, { children: props.message })] })) : (_jsx(Empty, { "data-empty-state": props.kind, scope: scope, children: _jsxs(EmptyHeader, { children: [_jsx(EmptyMedia, { variant: "tile", children: _jsx(CheckIcon, { "aria-hidden": "true" }) }), _jsx(EmptyDescription, { children: props.message })] }) }));
31
+ return scope === "line" ? (_jsxs(Empty, { "data-empty-state": props.kind, scope: scope, children: [_jsx(CheckIcon, { "aria-hidden": "true", className: "size-4 shrink-0 text-muted-foreground" }), _jsx(EmptyDescription, { children: props.message })] })) : (_jsx(Empty, { "data-empty-state": props.kind, scope: scope, children: _jsxs(EmptyHeader, { children: [_jsx(IconTile, { icon: CheckIcon, size: 54 }), _jsx(EmptyDescription, { children: props.message })] }) }));
31
32
  case "denied":
32
- return (_jsxs(Empty, { "data-empty-state": props.kind, scope: scope, children: [_jsxs(EmptyHeader, { children: [_jsx(EmptyMedia, { variant: "tile", children: _jsx(LockKeyholeIcon, { "aria-hidden": "true" }) }), _jsx(TitleAndLine, { description: props.description, headingLevel: props.headingLevel, title: props.title })] }), props.action ? (_jsx(EmptyContent, { "data-empty-state-action": true, children: _jsx(PageCommandButton, { command: props.action, variant: "default" }) })) : null] }));
33
+ return (_jsxs(Empty, { "data-empty-state": props.kind, scope: scope, children: [_jsxs(EmptyHeader, { children: [_jsx(IconTile, { icon: LockKeyholeIcon, size: 54 }), _jsx(TitleAndLine, { description: props.description, headingLevel: props.headingLevel, title: props.title })] }), props.action ? (_jsx(EmptyContent, { "data-empty-state-action": true, children: _jsx(PageCommandButton, { command: props.action, variant: "default" }) })) : null] }));
33
34
  case "failed":
34
35
  return (_jsx(FailedRead, { headingLevel: props.headingLevel, message: props.message, reference: props.reference, scope: scope }));
35
36
  }
@@ -0,0 +1,58 @@
1
+ import type { ReactElement, ReactNode } from "react";
2
+ import { type IconTileTone } from "./icon-tile.js";
3
+ import type { IconComponent } from "./identity-mark.js";
4
+ import { type ProgressTone } from "./progress.js";
5
+ import { type PageCommand } from "../internal/page-command-button.js";
6
+ type FigureRowNoteTone = "default" | "warning" | "critical";
7
+ type FigureRowProps = {
8
+ /** The figure's kind, from the product's one map of kinds to icons and tones. */
9
+ icon: IconComponent;
10
+ tone?: IconTileTone;
11
+ /** What the figure is, which also names its bar: "Included usage". */
12
+ label: string;
13
+ /** The reading: "40% used", "€15.00", or a `StatusBadge` when the figure has a state instead. */
14
+ value: ReactNode;
15
+ /** The figure as a share of a cap or a total, drawn as a 10 px bar across the row. */
16
+ meter?: {
17
+ value: number;
18
+ max?: number;
19
+ tone?: ProgressTone;
20
+ };
21
+ /** One sentence under the figure: its period, what it is for, or what to do about it. */
22
+ note?: string;
23
+ /** `warning` or `critical` when the note says the figure needs attention. */
24
+ noteTone?: FigureRowNoteTone;
25
+ /** The one action the figure asks for, at the row's trailing edge. */
26
+ command?: PageCommand | undefined;
27
+ /** `default`, the filled button, only for the one action the page waits on; `outline` otherwise. */
28
+ commandVariant?: "outline" | "default" | undefined;
29
+ };
30
+ /**
31
+ * One figure of an object with its bar, one sentence and the one action it asks for, as a row
32
+ * inside the object's card or one of its sections.
33
+ *
34
+ * @family Data
35
+ * @when An object's own readings, each with what a person does about it: an account's Included usage with its bar and its cycle, its Extra usage with Buy Extra usage, the card its plan is paid with, a Partner's Extra usage to allocate, the credit runway on the staff Dashboard. Rows stand in a `FigureRows`, given to `ObjectPage` as its `figures` or to an `ObjectSection` as its body.
36
+ * @instead A figure among an overview's row of figures is a `KpiCard`, with `meter` for a share. A percentage in a table cell or a list row is the bar with its figure, `MeterReading` in the Portal. The object's fixed details (its price, its renewal date) are its facts. A state of the object with nothing to read is a `StatusBadge` beside its name. A setting is a `SettingsSection`.
37
+ * @behaviour From 640 px of screen: the 32 px `IconTile` of the figure's kind, then the label (13 px, the supporting text colour) over the value (16 px medium, ink, tabular digits), and the command at the row's trailing edge as a small button, outline unless `commandVariant` makes it the page's one filled button. Under them the 10 px bar across the row, 12 px below, then the note, 8 px below, in the supporting text colour, or the warning or the error colour by `noteTone`. Each row is padded 16 px above and below and takes the width of the card's content, so the card's own inset holds it at the sides. Under 640 px the command goes full width under the note. With no `meter` there is no bar: a figure with no reading says so in its value ("Not metered", a `StatusBadge`). The bar is the kit's `Progress`: its fill is the action colour, or the threshold `tone` the reading crossed, and red past the maximum. A command keeps its own behaviour (`link`, `onClick` or `render`); a pending one is its button's pending label; a command that cannot run now stays, disabled, with its reason. Rows are a list divided by the border hairline (`FigureRows`). While its object reads, `FigureRowSkeleton` stands in each row's place: the tile, the label's and the value's lines and a note's line, with no words.
38
+ * @words The label names the figure as the product calls it ("Included usage", "Extra usage available", "Card"); the value is the reading with its unit ("40% used", "€15.00", "Visa ···· 2212", "None saved"); the note is one sentence ("Current cycle: Nov 1, 2026 – Nov 30, 2026"); the command is a verb on the figure ("Buy Extra usage", "Update payment method"), or the name of the page it opens ("System health").
39
+ * @access `FigureRows` is a list named by its `aria-label` ("Usage"), each figure an item. The tile is decorative, since the label names the kind. The bar is a progress bar named by the label, with its value read as a percentage. The command is a real button or link, the only stop on the row for the keyboard, and comes after the figure in reading order.
40
+ */
41
+ declare function FigureRow({ icon, tone, label, value, meter, note, noteTone, command, commandVariant, }: FigureRowProps): ReactElement;
42
+ /**
43
+ * The list of an object's figures: one `FigureRow` per item, divided by the border hairline.
44
+ * `FigureRow` holds its usage page.
45
+ */
46
+ declare function FigureRows({ "aria-label": label, children, }: {
47
+ /** What the figures are together: "Usage". */
48
+ "aria-label": string;
49
+ children: ReactNode;
50
+ }): ReactElement;
51
+ /**
52
+ * What stands in a `FigureRow`'s place inside its `FigureRows` while the object reads: the tile,
53
+ * the label's and the value's lines and a note's line, with no words. The region that later holds
54
+ * the rows announces the wait.
55
+ */
56
+ declare function FigureRowSkeleton(): ReactElement;
57
+ export { FigureRow, FigureRowSkeleton, FigureRows, type FigureRowNoteTone, type FigureRowProps };
58
+ //# sourceMappingURL=figure-row.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figure-row.d.ts","sourceRoot":"","sources":["../../src/components/figure-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,gCAAgC,CAAC;AAGrF,KAAK,iBAA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s } from "react/jsx-runtime";
2
+ import { IconTile } from "./icon-tile.js";
3
+ import { Progress } from "./progress.js";
4
+ import { Skeleton, SkeletonRegion } from "./skeleton.js";
5
+ import { PageCommandButton } from "../internal/page-command-button.js";
6
+ import { cn } from "../lib/utils.js";
7
+ const NOTE_TONE_CLASS = {
8
+ default: "text-muted-foreground",
9
+ warning: "text-warning-soft-foreground",
10
+ critical: "text-destructive-soft-foreground",
11
+ };
12
+ /**
13
+ * One figure of an object with its bar, one sentence and the one action it asks for, as a row
14
+ * inside the object's card or one of its sections.
15
+ *
16
+ * @family Data
17
+ * @when An object's own readings, each with what a person does about it: an account's Included usage with its bar and its cycle, its Extra usage with Buy Extra usage, the card its plan is paid with, a Partner's Extra usage to allocate, the credit runway on the staff Dashboard. Rows stand in a `FigureRows`, given to `ObjectPage` as its `figures` or to an `ObjectSection` as its body.
18
+ * @instead A figure among an overview's row of figures is a `KpiCard`, with `meter` for a share. A percentage in a table cell or a list row is the bar with its figure, `MeterReading` in the Portal. The object's fixed details (its price, its renewal date) are its facts. A state of the object with nothing to read is a `StatusBadge` beside its name. A setting is a `SettingsSection`.
19
+ * @behaviour From 640 px of screen: the 32 px `IconTile` of the figure's kind, then the label (13 px, the supporting text colour) over the value (16 px medium, ink, tabular digits), and the command at the row's trailing edge as a small button, outline unless `commandVariant` makes it the page's one filled button. Under them the 10 px bar across the row, 12 px below, then the note, 8 px below, in the supporting text colour, or the warning or the error colour by `noteTone`. Each row is padded 16 px above and below and takes the width of the card's content, so the card's own inset holds it at the sides. Under 640 px the command goes full width under the note. With no `meter` there is no bar: a figure with no reading says so in its value ("Not metered", a `StatusBadge`). The bar is the kit's `Progress`: its fill is the action colour, or the threshold `tone` the reading crossed, and red past the maximum. A command keeps its own behaviour (`link`, `onClick` or `render`); a pending one is its button's pending label; a command that cannot run now stays, disabled, with its reason. Rows are a list divided by the border hairline (`FigureRows`). While its object reads, `FigureRowSkeleton` stands in each row's place: the tile, the label's and the value's lines and a note's line, with no words.
20
+ * @words The label names the figure as the product calls it ("Included usage", "Extra usage available", "Card"); the value is the reading with its unit ("40% used", "€15.00", "Visa ···· 2212", "None saved"); the note is one sentence ("Current cycle: Nov 1, 2026 – Nov 30, 2026"); the command is a verb on the figure ("Buy Extra usage", "Update payment method"), or the name of the page it opens ("System health").
21
+ * @access `FigureRows` is a list named by its `aria-label` ("Usage"), each figure an item. The tile is decorative, since the label names the kind. The bar is a progress bar named by the label, with its value read as a percentage. The command is a real button or link, the only stop on the row for the keyboard, and comes after the figure in reading order.
22
+ */
23
+ function FigureRow({ icon, tone, label, value, meter, note, noteTone = "default", command, commandVariant = "outline", }) {
24
+ return (_jsxs("li", { className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] gap-x-3 py-4 sm:grid-cols-[auto_minmax(0,1fr)_auto]", "data-slot": "figure-row", children: [_jsx("span", { className: "col-start-1 row-start-1 flex self-center", children: _jsx(IconTile, { icon: icon, size: 32, tone: tone }) }), _jsxs("div", { className: "col-start-2 row-start-1 grid min-w-0 gap-0.5 self-center", children: [_jsx("span", { className: "text-label-sm wrap-break-word text-muted-foreground", children: label }), _jsx("div", { className: "min-w-0 text-label-md font-medium wrap-break-word text-foreground tabular-nums", "data-slot": "figure-row-value", children: value })] }), meter ? (_jsx(Progress, { "aria-label": label, className: "col-span-full mt-3", max: meter.max, size: "md", tone: meter.tone, value: meter.value })) : null, note ? (_jsx("p", { className: cn("col-span-full mt-2 text-body-compact wrap-break-word", NOTE_TONE_CLASS[noteTone]), "data-slot": "figure-row-note", "data-tone": noteTone, children: note })) : null, command ? (_jsx("div", { className: "col-span-full mt-3 flex min-w-0 **:data-[slot=button]:w-full sm:col-span-1 sm:col-start-3 sm:row-start-1 sm:mt-0 sm:self-center sm:**:data-[slot=button]:w-auto", "data-slot": "figure-row-command", children: _jsx(PageCommandButton, { command: command, size: "sm", variant: commandVariant }) })) : null] }));
25
+ }
26
+ /**
27
+ * The list of an object's figures: one `FigureRow` per item, divided by the border hairline.
28
+ * `FigureRow` holds its usage page.
29
+ */
30
+ function FigureRows({ "aria-label": label, children, }) {
31
+ return (_jsx("ul", { "aria-label": label, className: "grid min-w-0 divide-y divide-border", "data-slot": "figure-rows", children: children }));
32
+ }
33
+ /**
34
+ * What stands in a `FigureRow`'s place inside its `FigureRows` while the object reads: the tile,
35
+ * the label's and the value's lines and a note's line, with no words. The region that later holds
36
+ * the rows announces the wait.
37
+ */
38
+ function FigureRowSkeleton() {
39
+ return (_jsx("li", { "data-slot": "figure-row-skeleton", children: _jsxs(SkeletonRegion, { busy: true, className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] gap-x-3 py-4", children: [_jsx(Skeleton, { className: "self-center", height: 32, width: 32 }), _jsxs("div", { className: "grid min-w-0 gap-0.5 self-center", children: [_jsx(Skeleton, { boxHeight: 16, className: "max-w-full", height: 12, width: 112 }), _jsx(Skeleton, { boxHeight: 20, className: "max-w-full", height: 16, width: 80 })] }), _jsx(Skeleton, { boxHeight: 18, className: "col-span-full mt-2 max-w-full", height: 12, width: 240 })] }) }));
40
+ }
41
+ export { FigureRow, FigureRowSkeleton, FigureRows };
@@ -12,7 +12,7 @@ export type FormDialogFormProps = FormProps & {
12
12
  * A new record, or one or two values from a command, in a modal dialog.
13
13
  *
14
14
  * @family Compositions
15
- * @when "Use Modal when a decision must block the rest of the page. For persistent associated context where the underlying page stays readable, use `Sheet` on desktop or `Drawer` on mobile." (https://vercel.com/geist/modal) Ours: a person adds a record through a few fields, or changes one or two values a command asks for: new customer, add a mailbox, add an MCP server.
15
+ * @when "Use Modal when a decision must block the rest of the page. For persistent associated context where the underlying page stays readable, use `Sheet` on desktop or `Drawer` on mobile." (https://vercel.com/geist/modal) Ours: a person adds a record through a few fields, or changes one or two values a command asks for: new customer, add a mailbox, add an MCP server; or changes what an object's card shows, from the card: its Edit opens the facts the card holds (Edit company details), and a setting's value at a glance opens that one setting (Voice chat) (owner, 2026-11-08).
16
16
  * @instead "Skip Modal for routine create flows that have a dedicated page; route to the page instead." (https://vercel.com/geist/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 record already in a list edits in its row with `RowEditForm`; a choice from a catalogue is a `CatalogDrawer`; a setup in steps with a wait is a `FormDrawer` with `job="steps"`; a consequence that asks nothing is confirmed in a `ConfirmDialog`.
17
17
  * @behaviour "Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: centred over a scrim without blur, 540 px wide, a bottom sheet on a phone: the title and its help, the fields in a 12 px column, then the footer, which stays at the bottom while a tall form scrolls, with Cancel at the leading edge and the primary at the trailing edge, in one row also on a phone. `FormDialogForm` puts the fields in the dialog's own scroll body and the actions in its fixed footer; no other overlay is nested inside. A refusal or a failed save sits above the footer and the fields keep what was typed. While its save runs it holds open, Cancel and the primary hold, and the waiting line runs under them. With `unsaved.dirty`, Escape and a press outside are held back and `unsaved.onDismissBlocked` runs so the caller can ask; Close and Cancel always close. A form whose primary takes something away, such as declining a company with a note for the record, sets `destructive` on `FormDialogForm`: the primary turns red, as `ConfirmDialog`'s destructive confirm does, and nothing else changes. 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 "`Modal.Title` is a Title Case statement, never a question. `Transfer Project` is correct; `Transfer Project?` is wrong." (https://vercel.com/geist/modal) "Primary button is `Verb + Noun` and matches the title verb (`Transfer Project` title pairs with `Transfer Project` button). Never `Confirm`, `OK`, or a bare verb on a destructive primary." (https://vercel.com/geist/modal) "Cancel literal stays `Cancel`. Acknowledgment-only Modals (after a key reveal, after a one-time-show) use `Done`, never `OK` or `Close`." (https://vercel.com/geist/modal) Ours: the title and the primary are sentence case, where Geist writes Title Case: the title names the job and its object, "New customer", "Add a mailbox"; the primary repeats it, "Create customer", "Add mailbox"; a destructive primary names what it takes away, "Decline company", never a bare "Decline".
@@ -10,7 +10,7 @@ import { guardUnsaved } from "../internal/unsaved-guard.js";
10
10
  * A new record, or one or two values from a command, in a modal dialog.
11
11
  *
12
12
  * @family Compositions
13
- * @when "Use Modal when a decision must block the rest of the page. For persistent associated context where the underlying page stays readable, use `Sheet` on desktop or `Drawer` on mobile." (https://vercel.com/geist/modal) Ours: a person adds a record through a few fields, or changes one or two values a command asks for: new customer, add a mailbox, add an MCP server.
13
+ * @when "Use Modal when a decision must block the rest of the page. For persistent associated context where the underlying page stays readable, use `Sheet` on desktop or `Drawer` on mobile." (https://vercel.com/geist/modal) Ours: a person adds a record through a few fields, or changes one or two values a command asks for: new customer, add a mailbox, add an MCP server; or changes what an object's card shows, from the card: its Edit opens the facts the card holds (Edit company details), and a setting's value at a glance opens that one setting (Voice chat) (owner, 2026-11-08).
14
14
  * @instead "Skip Modal for routine create flows that have a dedicated page; route to the page instead." (https://vercel.com/geist/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 record already in a list edits in its row with `RowEditForm`; a choice from a catalogue is a `CatalogDrawer`; a setup in steps with a wait is a `FormDrawer` with `job="steps"`; a consequence that asks nothing is confirmed in a `ConfirmDialog`.
15
15
  * @behaviour "Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: centred over a scrim without blur, 540 px wide, a bottom sheet on a phone: the title and its help, the fields in a 12 px column, then the footer, which stays at the bottom while a tall form scrolls, with Cancel at the leading edge and the primary at the trailing edge, in one row also on a phone. `FormDialogForm` puts the fields in the dialog's own scroll body and the actions in its fixed footer; no other overlay is nested inside. A refusal or a failed save sits above the footer and the fields keep what was typed. While its save runs it holds open, Cancel and the primary hold, and the waiting line runs under them. With `unsaved.dirty`, Escape and a press outside are held back and `unsaved.onDismissBlocked` runs so the caller can ask; Close and Cancel always close. A form whose primary takes something away, such as declining a company with a note for the record, sets `destructive` on `FormDialogForm`: the primary turns red, as `ConfirmDialog`'s destructive confirm does, and nothing else changes. 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".
16
16
  * @words "`Modal.Title` is a Title Case statement, never a question. `Transfer Project` is correct; `Transfer Project?` is wrong." (https://vercel.com/geist/modal) "Primary button is `Verb + Noun` and matches the title verb (`Transfer Project` title pairs with `Transfer Project` button). Never `Confirm`, `OK`, or a bare verb on a destructive primary." (https://vercel.com/geist/modal) "Cancel literal stays `Cancel`. Acknowledgment-only Modals (after a key reveal, after a one-time-show) use `Done`, never `OK` or `Close`." (https://vercel.com/geist/modal) Ours: the title and the primary are sentence case, where Geist writes Title Case: the title names the job and its object, "New customer", "Add a mailbox"; the primary repeats it, "Create customer", "Add mailbox"; a destructive primary names what it takes away, "Decline company", never a bare "Decline".
@@ -43,8 +43,8 @@ export type FormDrawerProps = FormSurfaceProps & ({
43
43
  * The right-side sheet for a catalogue or a setup in steps, at one width.
44
44
  *
45
45
  * @family Compositions
46
- * @when Ours: choosing from a catalogue too long for a dialog (through `CatalogDrawer`), or setting something up in several steps with a wait: connect a messaging channel, Telegram's code; or, with `job="stack"` and a `DrawerSteps`, making something from a shelf's card with what it holds in sight, as Vercel's Add Connection: an Agent from an Agent template.
47
- * @instead "Don’t use Sheet to confirm destructive actions. The default `modal=false` keeps the page interactive, which weakens severity for a delete or revoke." (https://vercel.com/geist/sheet) Ours: a new record from a few fields is a `FormDialog`; a record already in a list edits in its row with `RowEditForm`; a fact on the record's own page changes in place in its section; a consequence is confirmed in a `ConfirmDialog`; a phone's short job is a `Drawer`.
46
+ * @when Ours: choosing from a catalogue too long for a dialog (through `CatalogDrawer`), or setting something up in several steps with a wait: connect a messaging channel, Telegram's code; or, with `job="stack"` and a `DrawerSteps`, making something from a shelf's card with what it holds in sight: an Agent from an Agent template.
47
+ * @instead "Don’t use Sheet to confirm destructive actions. The default `modal=false` keeps the page interactive, which weakens severity for a delete or revoke." (https://vercel.com/geist/sheet) Ours: a new record from a few fields is a `FormDialog`; a record already in a list edits in its row with `RowEditForm`; an object's facts change in a `FormDialog` from its card's Edit; a consequence is confirmed in a `ConfirmDialog`; a phone's short job is a `Drawer`.
48
48
  * @behaviour "Sheet defaults to `modal=false` so toasts and other high-z elements stay reachable. Keep that default unless the sheet owns the screen." (https://vercel.com/geist/sheet) "Pick `side` from the trigger location: a row inspector slides from `right`, a global filter from `left`. Don’t change sides mid-session." (https://vercel.com/geist/sheet) "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet) Ours: a modal `Sheet` from the right edge over the scrim, because the drawer owns the screen, at the Sheet's one width that no caller sets. The header holds the step ("Step 2 of 3", in mono) over the title, which stays the job's name, then the description and Close; the body scrolls between the header and a footer that stays, with no fill or rule of its own, Cancel then the primary at its trailing edge. A press outside does not close it; Escape does, unless `unsaved.dirty` holds it back. Cancel holds while a save runs. With `job="stack"` it is 658 px wide from `lg`, for the cards it holds, with no step line over the title and no footer: each card has its own actions. 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".
49
49
  * @words "Title is Title Case and names the entity (`Deployment Details`, `Member Profile`), not the page action." (https://vercel.com/geist/sheet) "Body is read-mostly: sentence case prose with Title Case sub-headings. Action buttons are optional; when present, follow `Verb + Noun`." (https://vercel.com/geist/sheet) Ours: the title is sentence case and names the job and its object: "Connect Telegram", "Add a skill". The step reads "Step N of M". The primary says what it does: "Connect", "Continue", never "OK".
50
50
  * @access "Trap focus inside the sheet while it’s open and return focus to the trigger row on close so keyboard users keep their place in the list." (https://vercel.com/geist/sheet) "Provide a visible close button labeled `Close` (or an icon button with `aria-label="Close"`) since clicking outside doesn’t dismiss." (https://vercel.com/geist/sheet) "Announce the sheet with `aria-labelledby` pointing at the title; pair it with `aria-describedby` only when the body is short and load-bearing." (https://vercel.com/geist/sheet) Ours: a modal dialog named by its title; focus returns to the opener on close, or to `finalFocus` when the opener is gone. The step is read before the title.
@@ -11,8 +11,8 @@ import { cn } from "../lib/utils.js";
11
11
  * The right-side sheet for a catalogue or a setup in steps, at one width.
12
12
  *
13
13
  * @family Compositions
14
- * @when Ours: choosing from a catalogue too long for a dialog (through `CatalogDrawer`), or setting something up in several steps with a wait: connect a messaging channel, Telegram's code; or, with `job="stack"` and a `DrawerSteps`, making something from a shelf's card with what it holds in sight, as Vercel's Add Connection: an Agent from an Agent template.
15
- * @instead "Don’t use Sheet to confirm destructive actions. The default `modal=false` keeps the page interactive, which weakens severity for a delete or revoke." (https://vercel.com/geist/sheet) Ours: a new record from a few fields is a `FormDialog`; a record already in a list edits in its row with `RowEditForm`; a fact on the record's own page changes in place in its section; a consequence is confirmed in a `ConfirmDialog`; a phone's short job is a `Drawer`.
14
+ * @when Ours: choosing from a catalogue too long for a dialog (through `CatalogDrawer`), or setting something up in several steps with a wait: connect a messaging channel, Telegram's code; or, with `job="stack"` and a `DrawerSteps`, making something from a shelf's card with what it holds in sight: an Agent from an Agent template.
15
+ * @instead "Don’t use Sheet to confirm destructive actions. The default `modal=false` keeps the page interactive, which weakens severity for a delete or revoke." (https://vercel.com/geist/sheet) Ours: a new record from a few fields is a `FormDialog`; a record already in a list edits in its row with `RowEditForm`; an object's facts change in a `FormDialog` from its card's Edit; a consequence is confirmed in a `ConfirmDialog`; a phone's short job is a `Drawer`.
16
16
  * @behaviour "Sheet defaults to `modal=false` so toasts and other high-z elements stay reachable. Keep that default unless the sheet owns the screen." (https://vercel.com/geist/sheet) "Pick `side` from the trigger location: a row inspector slides from `right`, a global filter from `left`. Don’t change sides mid-session." (https://vercel.com/geist/sheet) "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet) Ours: a modal `Sheet` from the right edge over the scrim, because the drawer owns the screen, at the Sheet's one width that no caller sets. The header holds the step ("Step 2 of 3", in mono) over the title, which stays the job's name, then the description and Close; the body scrolls between the header and a footer that stays, with no fill or rule of its own, Cancel then the primary at its trailing edge. A press outside does not close it; Escape does, unless `unsaved.dirty` holds it back. Cancel holds while a save runs. With `job="stack"` it is 658 px wide from `lg`, for the cards it holds, with no step line over the title and no footer: each card has its own actions. 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".
17
17
  * @words "Title is Title Case and names the entity (`Deployment Details`, `Member Profile`), not the page action." (https://vercel.com/geist/sheet) "Body is read-mostly: sentence case prose with Title Case sub-headings. Action buttons are optional; when present, follow `Verb + Noun`." (https://vercel.com/geist/sheet) Ours: the title is sentence case and names the job and its object: "Connect Telegram", "Add a skill". The step reads "Step N of M". The primary says what it does: "Connect", "Continue", never "OK".
18
18
  * @access "Trap focus inside the sheet while it’s open and return focus to the trigger row on close so keyboard users keep their place in the list." (https://vercel.com/geist/sheet) "Provide a visible close button labeled `Close` (or an icon button with `aria-label="Close"`) since clicking outside doesn’t dismiss." (https://vercel.com/geist/sheet) "Announce the sheet with `aria-labelledby` pointing at the title; pair it with `aria-describedby` only when the body is short and load-bearing." (https://vercel.com/geist/sheet) Ours: a modal dialog named by its title; focus returns to the opener on close, or to `finalFocus` when the opener is gone. The step is read before the title.
@@ -31,6 +31,8 @@ type GaugeProps = Omit<Meter.Root.Props, "value" | "min" | "max" | "children" |
31
31
  * @when "A 0–100 ratio against a fixed maximum where the comparison is the point, like quota usage, build cache hit rate, uptime, or billing-period consumption." (https://vercel.com/geist/gauge)
32
32
  * Ours: one ratio out of 100 on Base UI `Meter`. `size` follows the weight of the figure beside it:
33
33
  * `xs` (20 px), `sm` (32), `md` (64) and `lg` (128). The centre holds the number or an icon.
34
+ * It stands only where a row has no room for a bar, as `ProgressChecklist`'s ring; a share a
35
+ * person reads is a bar.
34
36
  * @instead "For determinate task progress with a known total (uploads, multi-step setup), use `Progress`." (https://vercel.com/geist/gauge)
35
37
  * "For binary or enumerated state, use `Status Dot` for deployments or `Badge` for everything else." (https://vercel.com/geist/gauge)
36
38
  * Ours: every state uses `StatusBadge`. A single figure on its own is a `KpiCard`. A wait
@@ -1 +1 @@
1
- {"version":3,"file":"gauge.d.ts","s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,CAAC,EACb,SAAS,EACT,KAAK,EACL,IAAgB,EAChB,IAAW,EACX,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,UAAU,+BAuEZ;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -35,6 +35,8 @@ const GAUGE_ARC_MOTION = "transition-[stroke-dasharray,stroke-dashoffset,stroke]
35
35
  * @when "A 0–100 ratio against a fixed maximum where the comparison is the point, like quota usage, build cache hit rate, uptime, or billing-period consumption." (https://vercel.com/geist/gauge)
36
36
  * Ours: one ratio out of 100 on Base UI `Meter`. `size` follows the weight of the figure beside it:
37
37
  * `xs` (20 px), `sm` (32), `md` (64) and `lg` (128). The centre holds the number or an icon.
38
+ * It stands only where a row has no room for a bar, as `ProgressChecklist`'s ring; a share a
39
+ * person reads is a bar.
38
40
  * @instead "For determinate task progress with a known total (uploads, multi-step setup), use `Progress`." (https://vercel.com/geist/gauge)
39
41
  * "For binary or enumerated state, use `Status Dot` for deployments or `Badge` for everything else." (https://vercel.com/geist/gauge)
40
42
  * Ours: every state uses `StatusBadge`. A single figure on its own is a `KpiCard`. A wait
@@ -0,0 +1,27 @@
1
+ import type { ReactElement } from "react";
2
+ import type { IconComponent } from "./identity-mark.js";
3
+ import { type IconTileTone } from "../internal/icon-tile-frame.js";
4
+ type IconTileSize = 24 | 32 | 40 | 54;
5
+ type IconTileProps = {
6
+ /** The one Lucide icon of the kind, passed as the component (`icon={Coins}`). */
7
+ icon: IconComponent;
8
+ /** Neutral by default; a category hue names a kind, and its icon says the same without colour. */
9
+ tone?: IconTileTone;
10
+ /** 32 in a row, 24 in a dense line, 40 at a card's head, 54 above an empty state's words. */
11
+ size?: IconTileSize;
12
+ /** Its accessible name where no words beside it say what kind it is. Decorative otherwise. */
13
+ label?: string;
14
+ };
15
+ /**
16
+ * One icon on a square tile that says what kind of figure, step or notice a row is.
17
+ *
18
+ * @family Status
19
+ * @when At the start of a row whose kind a person tells apart at a glance: a figure of an object's card (Included usage, Extra usage, the card a plan is paid with), a step of a setup checklist, an alert's level in an inbox; and above the words of an empty state. `FigureRow` and `ProgressChecklist` draw it at 32, `EmptyState` at 54.
20
+ * @instead The thing a row is, a record, a person, an Agent or an app, is its `IdentityMark`: a record of a kind with no picture of its own is `IdentityMark kind="record"`, which draws this same tile. A record's state is a `StatusBadge`, and a plan or a role a `Badge`. An icon beside a card's title, a KPI's label or a section heading only repeats the words and is left out.
21
+ * @behaviour Static. A square, 24, 32, 40 or 54 px, with one Lucide icon at its centre: half the tile, and 32 px on the 54 px tile; 6 px corners under 40 px and 8 px from 40 px. `neutral`, the default, is the card ground held by a 1 px inset ring in the border colour, its icon in the supporting text colour; each of the eight category tones (blue, teal, purple, pink, green, orange, yellow, red) is that hue's soft ground with its deep ink for the icon, and no ring; the same roles in dark. A hue names a kind and never a state, and each kind has its own icon, so the hue never stands alone. The product keeps one map from each kind to its icon and tone, so a kind looks the same on every page.
22
+ * @words None: the label or the sentence beside it names the kind. `label` names the kind in a word or two ("Extra usage") where nothing beside it does.
23
+ * @access Hidden from assistive technology beside the words that name its kind. With `label` it is an image named by it.
24
+ */
25
+ declare function IconTile({ icon: Icon, tone, size, label }: IconTileProps): ReactElement;
26
+ export { IconTile, type IconTileProps, type IconTileSize, type IconTileTone };
27
+ //# sourceMappingURL=icon-tile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-tile.d.ts","sourceRoot":"","sources":["../../src/components/icon-tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE9E,KAAK,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAKtC,KAAK,aAAa,GAAG;IACnB,iFAAiF;IACjF,IAAI,EAAE,aAAa,CAAC;IACpB,kGAAkG;IAClG,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,6FAA6F;IAC7F,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,8FAA8F;IAC9F,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;GASG;AACH,iBAAS,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAgB,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,aAAa,GAAG,YAAY,CAMjG;AAED,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { IconTileFrame } from "../internal/icon-tile-frame.js";
3
+ /** The icon's size on each tile: half the tile, and 32 on the 54 px tile an empty state stands on. */
4
+ const ICON_SIZE = { 24: 12, 32: 16, 40: 20, 54: 32 };
5
+ /**
6
+ * One icon on a square tile that says what kind of figure, step or notice a row is.
7
+ *
8
+ * @family Status
9
+ * @when At the start of a row whose kind a person tells apart at a glance: a figure of an object's card (Included usage, Extra usage, the card a plan is paid with), a step of a setup checklist, an alert's level in an inbox; and above the words of an empty state. `FigureRow` and `ProgressChecklist` draw it at 32, `EmptyState` at 54.
10
+ * @instead The thing a row is, a record, a person, an Agent or an app, is its `IdentityMark`: a record of a kind with no picture of its own is `IdentityMark kind="record"`, which draws this same tile. A record's state is a `StatusBadge`, and a plan or a role a `Badge`. An icon beside a card's title, a KPI's label or a section heading only repeats the words and is left out.
11
+ * @behaviour Static. A square, 24, 32, 40 or 54 px, with one Lucide icon at its centre: half the tile, and 32 px on the 54 px tile; 6 px corners under 40 px and 8 px from 40 px. `neutral`, the default, is the card ground held by a 1 px inset ring in the border colour, its icon in the supporting text colour; each of the eight category tones (blue, teal, purple, pink, green, orange, yellow, red) is that hue's soft ground with its deep ink for the icon, and no ring; the same roles in dark. A hue names a kind and never a state, and each kind has its own icon, so the hue never stands alone. The product keeps one map from each kind to its icon and tone, so a kind looks the same on every page.
12
+ * @words None: the label or the sentence beside it names the kind. `label` names the kind in a word or two ("Extra usage") where nothing beside it does.
13
+ * @access Hidden from assistive technology beside the words that name its kind. With `label` it is an image named by it.
14
+ */
15
+ function IconTile({ icon: Icon, tone = "neutral", size = 32, label }) {
16
+ return (_jsx(IconTileFrame, { "data-slot": "icon-tile", label: label, size: size, tone: tone, children: _jsx(Icon, { "aria-hidden": "true", size: ICON_SIZE[size] }) }));
17
+ }
18
+ export { IconTile };
@@ -1,6 +1,7 @@
1
1
  import type { ComponentType, CSSProperties, ReactElement, ReactNode } from "react";
2
2
  import { type AgentOrbFigure, type AgentOrbState } from "./agent-orb.js";
3
3
  import { type AppMarkGlyph } from "./app-mark.js";
4
+ import { type IconTileTone } from "../internal/icon-tile-frame.js";
4
5
  export type IdentityMarkSize = 20 | 24 | 28 | 32 | 40 | 64;
5
6
  /** A navigation icon from any Lucide build: the package's and Hermes's ship different versions of the same icons. */
6
7
  export type IconComponent = ComponentType<{
@@ -45,7 +46,7 @@ export type IdentityMarkProps = {
45
46
  /** The record's own icon when it names one, as a skill does in its hub card; otherwise its kind's, the one its section has in the navigation: Mail for a mailbox. */
46
47
  icon: IconComponent;
47
48
  /** A catalogue kind's ground; neutral is the ringed card ground. */
48
- tone?: "neutral" | "teal";
49
+ tone?: IconTileTone;
49
50
  /** The record's own object picture, a transparent image drawn on its kind's ground in place of the icon at 64; smaller marks draw the icon. */
50
51
  picture?: string;
51
52
  });
@@ -58,7 +59,7 @@ export type IdentityMarkProps = {
58
59
  * @family Status
59
60
  * @when The first thing in a record's row (32), at the head of its object page (64), in a feed or a sidebar identity line (24), on a Library entry (40), for the company at the top of Nadia's list (28): wherever it tells a person which thing they are looking at.
60
61
  * @instead An icon beside a card's title, a KPI's label or a section heading only repeats the words and is left out. A row's, an object's, a feed's or a sidebar's mark is one of this component's kinds, never a decorative icon: a list gets its richness from real identity marks, never from decoration. A picture for a first use or a whole-page moment is the empty state's or the page's own. A model is its `ModelIdentity`; a maker's mark beside a model's name in a list of models is `ModelMark` at 24.
61
- * @behaviour Static, except an Agent's orb, which moves with her state. An Agent is always her real orb from the orb engine, at the largest orb size not above the mark's, with no tile and no ring, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo in its bordered tile on the page ground, or its first letter when it has no logo; a record that belongs to a model maker, such as a key held at that maker, is the maker's `ModelMark` at the mark's size, with its initials when LobeHub has no mark for it; a company is its own logo, contained whole in its original colours and proportions on a dark ringed tile, as Vercel shows a project's favicon, and until a logo is found, or when the stored logo does not load, its initials in white on that same tile, so a found logo only replaces the letters; a company's mark is the same whatever its standing and whichever directory opened it, and a Partner is said in words where its standing matters, never by a colour; a person is their picture, then their initials, in a round mark; a record with no picture of its own takes its kind's own icon, the same icon its section has in the navigation (Mail for a mailbox, a server for an MCP server, a key for a password), in a ringed tile on the card ground; a skill takes the icon its hub card names, and the Skills icon when it names none, on that same neutral ringed tile, so the icon alone tells one skill from another and no colour stands for the kind; a plugin likewise takes the icon its hub card names, and the Plugins icon when it names none, on the same neutral ringed tile, since the colour of a Library row is its category label's alone; a record's own object picture, such as a Library skill's or plugin's, is drawn only at 64, at the head of its own page, on its kind's ground in the icon's place, because at a row's size its detail does not read. A record tile takes `{rounded.sm}` (6 px) corners, `{rounded.md}` (8 px) at 40 and 64; a company's tile and an app's tile take `{rounded.md}` at every size.
62
+ * @behaviour Static, except an Agent's orb, which moves with her state. An Agent is always her real orb from the orb engine, at the largest orb size not above the mark's, with no tile and no ring, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo in its bordered tile on the page ground, or its first letter when it has no logo; a record that belongs to a model maker, such as a key held at that maker, is the maker's `ModelMark` at the mark's size, with its initials when LobeHub has no mark for it; a company is its own logo, contained whole in its original colours and proportions on a dark ringed tile, and until a logo is found, or when the stored logo does not load, its initials in white on that same tile, so a found logo only replaces the letters; a company's mark is the same whatever its standing and whichever directory opened it, and a Partner is said in words where its standing matters, never by a colour; a person is their picture, then their initials, in a round mark; a record with no picture of its own takes its kind's own icon, the same icon its section has in the navigation (Mail for a mailbox, a server for an MCP server, a key for a password), in a ringed tile on the card ground; a skill takes the icon its hub card names, and the Skills icon when it names none, on that same neutral ringed tile, so the icon alone tells one skill from another and no colour stands for the kind; a plugin likewise takes the icon its hub card names, and the Plugins icon when it names none, on the same neutral ringed tile, since the colour of a Library row is its category label's alone; a record's own object picture, such as a Library skill's or plugin's, is drawn only at 64, at the head of its own page, on its kind's ground in the icon's place, because at a row's size its detail does not read. A record tile is the tile `IconTile` draws, its ground, ring and corners: `{rounded.sm}` (6 px), `{rounded.md}` (8 px) at 40 and 64; a company's tile and an app's tile take `{rounded.md}` at every size.
62
63
  * @words None of its own: the record's name stands beside it. Initials stand for a company or a person: the first letters of the name's first two words. An app with no logo takes the first letter of its name as a monogram, a model maker with no mark the initials of its slug, and no other kind takes letters.
63
64
  * @access Decorative beside the record's name. Alone, as in a narrow rail, `label` names it.
64
65
  */
@@ -1 +1 @@
1
- {"version":3,"file":"identity-mark.d.ts","sourceRoot":"","sources":["../../src/components/identity-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnF,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,aAAa,EACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAMnE,MAAM,MAAM,gBAAgB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE3D,qHAAqH;AACrH,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,C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;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAC;CAChB,GACD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,qKAAqK;IACrK,IAAI,EAAE,aAAa,CAAC;IACpB,oEAAoE;IACpE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,+IAA+I;IAC/I,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CACJ,CAAC;AAwBF;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAmEhE"}
@@ -4,7 +4,7 @@ import { AppMark } from "./app-mark.js";
4
4
  import { Avatar, AvatarFallback, AvatarImage, avatarInitials } from "./avatar.js";
5
5
  import { ModelMark } from "./model-mark.js";
6
6
  import { CompanyMark } from "../internal/company-mark.js";
7
- import { cn } from "../lib/utils.js";
7
+ import { IconTileFrame } from "../internal/icon-tile-frame.js";
8
8
  const MEASURES = {
9
9
  20: { orb: 20, icon: 12, initials: 8 },
10
10
  24: { orb: 24, icon: 14, initials: 9 },
@@ -13,10 +13,6 @@ const MEASURES = {
13
13
  40: { orb: 40, icon: 20, initials: 13 },
14
14
  64: { orb: 64, icon: 24, initials: 20 },
15
15
  };
16
- const TONES = {
17
- neutral: "bg-card text-muted-foreground ring-1 ring-border ring-inset",
18
- teal: "bg-category-teal text-category-teal-foreground",
19
- };
20
16
  function naming(label) {
21
17
  return label
22
18
  ? { role: "img", "aria-label": label }
@@ -25,9 +21,6 @@ function naming(label) {
25
21
  function avatarName(label) {
26
22
  return label ? { label } : { decorative: true };
27
23
  }
28
- function RecordTile({ label, size, tone, children, }) {
29
- return (_jsx("span", { className: cn("inline-flex shrink-0 items-center justify-center", size >= 40 ? "rounded-md" : "rounded-sm", TONES[tone]), "data-kind": "record", "data-slot": "identity-mark", style: { width: size, height: size }, ...naming(label), children: children }));
30
- }
31
24
  /**
32
25
  * What says which thing a record is, at a fixed size at the start of its row,
33
26
  * its object's head or its feed line: an Agent's orb, an app's logo, a model
@@ -37,7 +30,7 @@ function RecordTile({ label, size, tone, children, }) {
37
30
  * @family Status
38
31
  * @when The first thing in a record's row (32), at the head of its object page (64), in a feed or a sidebar identity line (24), on a Library entry (40), for the company at the top of Nadia's list (28): wherever it tells a person which thing they are looking at.
39
32
  * @instead An icon beside a card's title, a KPI's label or a section heading only repeats the words and is left out. A row's, an object's, a feed's or a sidebar's mark is one of this component's kinds, never a decorative icon: a list gets its richness from real identity marks, never from decoration. A picture for a first use or a whole-page moment is the empty state's or the page's own. A model is its `ModelIdentity`; a maker's mark beside a model's name in a list of models is `ModelMark` at 24.
40
- * @behaviour Static, except an Agent's orb, which moves with her state. An Agent is always her real orb from the orb engine, at the largest orb size not above the mark's, with no tile and no ring, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo in its bordered tile on the page ground, or its first letter when it has no logo; a record that belongs to a model maker, such as a key held at that maker, is the maker's `ModelMark` at the mark's size, with its initials when LobeHub has no mark for it; a company is its own logo, contained whole in its original colours and proportions on a dark ringed tile, as Vercel shows a project's favicon, and until a logo is found, or when the stored logo does not load, its initials in white on that same tile, so a found logo only replaces the letters; a company's mark is the same whatever its standing and whichever directory opened it, and a Partner is said in words where its standing matters, never by a colour; a person is their picture, then their initials, in a round mark; a record with no picture of its own takes its kind's own icon, the same icon its section has in the navigation (Mail for a mailbox, a server for an MCP server, a key for a password), in a ringed tile on the card ground; a skill takes the icon its hub card names, and the Skills icon when it names none, on that same neutral ringed tile, so the icon alone tells one skill from another and no colour stands for the kind; a plugin likewise takes the icon its hub card names, and the Plugins icon when it names none, on the same neutral ringed tile, since the colour of a Library row is its category label's alone; a record's own object picture, such as a Library skill's or plugin's, is drawn only at 64, at the head of its own page, on its kind's ground in the icon's place, because at a row's size its detail does not read. A record tile takes `{rounded.sm}` (6 px) corners, `{rounded.md}` (8 px) at 40 and 64; a company's tile and an app's tile take `{rounded.md}` at every size.
33
+ * @behaviour Static, except an Agent's orb, which moves with her state. An Agent is always her real orb from the orb engine, at the largest orb size not above the mark's, with no tile and no ring, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo in its bordered tile on the page ground, or its first letter when it has no logo; a record that belongs to a model maker, such as a key held at that maker, is the maker's `ModelMark` at the mark's size, with its initials when LobeHub has no mark for it; a company is its own logo, contained whole in its original colours and proportions on a dark ringed tile, and until a logo is found, or when the stored logo does not load, its initials in white on that same tile, so a found logo only replaces the letters; a company's mark is the same whatever its standing and whichever directory opened it, and a Partner is said in words where its standing matters, never by a colour; a person is their picture, then their initials, in a round mark; a record with no picture of its own takes its kind's own icon, the same icon its section has in the navigation (Mail for a mailbox, a server for an MCP server, a key for a password), in a ringed tile on the card ground; a skill takes the icon its hub card names, and the Skills icon when it names none, on that same neutral ringed tile, so the icon alone tells one skill from another and no colour stands for the kind; a plugin likewise takes the icon its hub card names, and the Plugins icon when it names none, on the same neutral ringed tile, since the colour of a Library row is its category label's alone; a record's own object picture, such as a Library skill's or plugin's, is drawn only at 64, at the head of its own page, on its kind's ground in the icon's place, because at a row's size its detail does not read. A record tile is the tile `IconTile` draws, its ground, ring and corners: `{rounded.sm}` (6 px), `{rounded.md}` (8 px) at 40 and 64; a company's tile and an app's tile take `{rounded.md}` at every size.
41
34
  * @words None of its own: the record's name stands beside it. Initials stand for a company or a person: the first letters of the name's first two words. An app with no logo takes the first letter of its name as a monogram, a model maker with no mark the initials of its slug, and no other kind takes letters.
42
35
  * @access Decorative beside the record's name. Alone, as in a narrow rail, `label` names it.
43
36
  */
@@ -58,6 +51,6 @@ export function IdentityMark(props) {
58
51
  case "company":
59
52
  return (_jsx(CompanyMark, { initialsSize: measures.initials, logo: props.logo, name: props.name, naming: naming(props.label), size: size }));
60
53
  case "record":
61
- return (_jsx(RecordTile, { label: props.label, size: size, tone: props.tone ?? "neutral", children: props.picture && size === 64 ? (_jsx("img", { alt: "", className: "size-[84%] object-contain", "data-slot": "identity-mark-picture", src: props.picture })) : (_jsx(props.icon, { "aria-hidden": "true", size: measures.icon })) }));
54
+ return (_jsx(IconTileFrame, { "data-kind": "record", "data-slot": "identity-mark", label: props.label, size: size, tone: props.tone ?? "neutral", children: props.picture && size === 64 ? (_jsx("img", { alt: "", className: "size-[84%] object-contain", "data-slot": "identity-mark-picture", src: props.picture })) : (_jsx(props.icon, { "aria-hidden": "true", size: measures.icon })) }));
62
55
  }
63
56
  }