@nadicodeai/ui 12.1.210 → 12.1.212

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 (148) hide show
  1. package/AGENTS.md +11 -4
  2. package/dist/components/account-menu.d.ts +3 -3
  3. package/dist/components/account-menu.d.ts.map +1 -1
  4. package/dist/components/account-menu.js +7 -5
  5. package/dist/components/activity-feed.d.ts +4 -2
  6. package/dist/components/activity-feed.d.ts.map +1 -1
  7. package/dist/components/activity-feed.js +10 -3
  8. package/dist/components/board.d.ts +45 -0
  9. package/dist/components/board.d.ts.map +1 -0
  10. package/dist/components/board.js +35 -0
  11. package/dist/components/breadcrumb.d.ts +3 -3
  12. package/dist/components/breadcrumb.d.ts.map +1 -1
  13. package/dist/components/button.d.ts +6 -1
  14. package/dist/components/button.d.ts.map +1 -1
  15. package/dist/components/button.js +5 -2
  16. package/dist/components/card-row.js +1 -1
  17. package/dist/components/chart-card.d.ts +19 -6
  18. package/dist/components/chart-card.d.ts.map +1 -1
  19. package/dist/components/chart-card.js +17 -7
  20. package/dist/components/collection-page.d.ts +4 -4
  21. package/dist/components/collection-page.d.ts.map +1 -1
  22. package/dist/components/collection-page.js +4 -8
  23. package/dist/components/collection-toolbar.d.ts +5 -4
  24. package/dist/components/collection-toolbar.d.ts.map +1 -1
  25. package/dist/components/collection-toolbar.js +9 -5
  26. package/dist/components/column-foot.d.ts +53 -0
  27. package/dist/components/column-foot.d.ts.map +1 -0
  28. package/dist/components/column-foot.js +32 -0
  29. package/dist/components/conversation-card.d.ts +38 -0
  30. package/dist/components/conversation-card.d.ts.map +1 -0
  31. package/dist/components/conversation-card.js +19 -0
  32. package/dist/components/data-table.d.ts +27 -22
  33. package/dist/components/data-table.d.ts.map +1 -1
  34. package/dist/components/data-table.js +76 -25
  35. package/dist/components/entry-page.d.ts +55 -0
  36. package/dist/components/entry-page.d.ts.map +1 -0
  37. package/dist/components/entry-page.js +41 -0
  38. package/dist/components/entry-scene.d.ts +1 -1
  39. package/dist/components/entry-scene.js +1 -1
  40. package/dist/components/filter-toolbar.d.ts +43 -0
  41. package/dist/components/filter-toolbar.d.ts.map +1 -0
  42. package/dist/components/filter-toolbar.js +44 -0
  43. package/dist/components/hive-scene.d.ts +4 -1
  44. package/dist/components/hive-scene.d.ts.map +1 -1
  45. package/dist/components/hive-scene.js +6 -1
  46. package/dist/components/invite-card.js +1 -1
  47. package/dist/components/item.d.ts +1 -1
  48. package/dist/components/item.js +2 -2
  49. package/dist/components/kpi-card.d.ts +10 -3
  50. package/dist/components/kpi-card.d.ts.map +1 -1
  51. package/dist/components/kpi-card.js +12 -4
  52. package/dist/components/message-notice.d.ts +3 -3
  53. package/dist/components/message-notice.js +1 -1
  54. package/dist/components/notice-banner.d.ts +1 -1
  55. package/dist/components/notice-banner.js +1 -1
  56. package/dist/components/object-page.d.ts +8 -2
  57. package/dist/components/object-page.d.ts.map +1 -1
  58. package/dist/components/object-page.js +7 -2
  59. package/dist/components/object-workspace.d.ts +25 -5
  60. package/dist/components/object-workspace.d.ts.map +1 -1
  61. package/dist/components/object-workspace.js +30 -7
  62. package/dist/components/page-actions.d.ts +0 -2
  63. package/dist/components/page-actions.d.ts.map +1 -1
  64. package/dist/components/page-actions.js +1 -5
  65. package/dist/components/page-frame.d.ts +38 -0
  66. package/dist/components/page-frame.d.ts.map +1 -0
  67. package/dist/components/page-frame.js +29 -0
  68. package/dist/components/page-header.d.ts +4 -3
  69. package/dist/components/page-header.d.ts.map +1 -1
  70. package/dist/components/page-header.js +5 -4
  71. package/dist/components/pending-label.d.ts +1 -1
  72. package/dist/components/pending-label.d.ts.map +1 -1
  73. package/dist/components/pending-label.js +4 -6
  74. package/dist/components/place-count.d.ts +20 -0
  75. package/dist/components/place-count.d.ts.map +1 -0
  76. package/dist/components/place-count.js +16 -0
  77. package/dist/components/plan-card.d.ts +49 -0
  78. package/dist/components/plan-card.d.ts.map +1 -0
  79. package/dist/components/plan-card.js +22 -0
  80. package/dist/components/product-band.d.ts +20 -0
  81. package/dist/components/product-band.d.ts.map +1 -0
  82. package/dist/components/product-band.js +23 -0
  83. package/dist/components/product-shell.d.ts +316 -44
  84. package/dist/components/product-shell.d.ts.map +1 -1
  85. package/dist/components/product-shell.js +533 -36
  86. package/dist/components/reading-column.d.ts +1 -1
  87. package/dist/components/reading-column.js +1 -1
  88. package/dist/components/record-list.d.ts +19 -3
  89. package/dist/components/record-list.d.ts.map +1 -1
  90. package/dist/components/record-list.js +23 -8
  91. package/dist/components/record-time.d.ts +6 -2
  92. package/dist/components/record-time.d.ts.map +1 -1
  93. package/dist/components/record-time.js +8 -5
  94. package/dist/components/row-edit-form.d.ts +1 -1
  95. package/dist/components/row-edit-form.js +1 -1
  96. package/dist/components/scope-switcher.d.ts +3 -1
  97. package/dist/components/scope-switcher.d.ts.map +1 -1
  98. package/dist/components/scope-switcher.js +3 -6
  99. package/dist/components/settings-page.d.ts +3 -3
  100. package/dist/components/settings-page.js +3 -3
  101. package/dist/components/settings-section.d.ts +19 -5
  102. package/dist/components/settings-section.d.ts.map +1 -1
  103. package/dist/components/settings-section.js +14 -6
  104. package/dist/components/sidebar-sections.d.ts.map +1 -1
  105. package/dist/components/sidebar-sections.js +4 -4
  106. package/dist/components/sidebar.d.ts +27 -5
  107. package/dist/components/sidebar.d.ts.map +1 -1
  108. package/dist/components/sidebar.js +56 -24
  109. package/dist/components/table-card.d.ts.map +1 -1
  110. package/dist/components/table-card.js +2 -1
  111. package/dist/components/table-layouts.d.ts +27 -0
  112. package/dist/components/table-layouts.d.ts.map +1 -1
  113. package/dist/components/table-layouts.js +30 -0
  114. package/dist/components/toast.d.ts +10 -1
  115. package/dist/components/toast.d.ts.map +1 -1
  116. package/dist/components/toast.js +24 -1
  117. package/dist/components/update-card.js +1 -1
  118. package/dist/index.d.ts +5 -0
  119. package/dist/index.d.ts.map +1 -1
  120. package/dist/index.js +5 -0
  121. package/dist/internal/button-classes.d.ts +2 -0
  122. package/dist/internal/button-classes.d.ts.map +1 -1
  123. package/dist/internal/button-classes.js +54 -46
  124. package/dist/internal/card-actions.d.ts +3 -0
  125. package/dist/internal/card-actions.d.ts.map +1 -0
  126. package/dist/internal/card-actions.js +4 -0
  127. package/dist/internal/footer-strip.d.ts.map +1 -1
  128. package/dist/internal/footer-strip.js +3 -1
  129. package/dist/internal/table-compact-line.d.ts +1 -7
  130. package/dist/internal/table-compact-line.d.ts.map +1 -1
  131. package/dist/internal/table-compact-line.js +5 -11
  132. package/dist/lib/product-shell.d.ts +20 -0
  133. package/dist/lib/product-shell.d.ts.map +1 -0
  134. package/dist/lib/product-shell.js +19 -0
  135. package/dist/showcase/specimens/compositions.d.ts +15 -0
  136. package/dist/showcase/specimens/compositions.d.ts.map +1 -1
  137. package/dist/showcase/specimens/compositions.js +70 -0
  138. package/dist/showcase/specimens/index.d.ts +11 -0
  139. package/dist/showcase/specimens/index.d.ts.map +1 -1
  140. package/dist/showcase/specimens/navigation.d.ts +4 -0
  141. package/dist/showcase/specimens/navigation.d.ts.map +1 -1
  142. package/dist/showcase/specimens/navigation.js +26 -1
  143. package/dist/showcase/usage.generated.d.ts +1 -1
  144. package/dist/showcase/usage.generated.d.ts.map +1 -1
  145. package/dist/showcase/usage.generated.js +166 -45
  146. package/dist/styles/components.css +38 -0
  147. package/dist/styles/globals.css +0 -5
  148. package/package.json +6 -2
@@ -7,11 +7,13 @@ import { ChevronDown } from "lucide-react";
7
7
  import { cn } from "../lib/utils.js";
8
8
  import { ActionContextMenu } from "./action-menu.js";
9
9
  import { Button, ButtonLink } from "./button.js";
10
- import { CollectionToolbar } from "./collection-toolbar.js";
11
10
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuTrigger, } from "./dropdown-menu.js";
12
11
  import { EmptyState } from "./empty-state.js";
12
+ import { FilterToolbar, filterToolbarHolds, } from "./filter-toolbar.js";
13
13
  import { MiddleTruncate } from "./middle-truncate.js";
14
- import { Table, TableCell, TableCol, TableColgroup, TableDetailRow, TableHead, TableHeader, TableRecordGroup, TableRow, } from "./table.js";
14
+ import { NoticeBanner } from "./notice-banner.js";
15
+ import { Table, TableBody, TableCell, TableCol, TableColgroup, TableDetailRow, TableHead, TableHeader, TableRecordGroup, TableRow, } from "./table.js";
16
+ import { Skeleton } from "./skeleton.js";
15
17
  import { TableCard } from "./table-card.js";
16
18
  import { TableCompactLayoutOf, TableCompactLine, } from "../internal/table-compact-line.js";
17
19
  import { compactLayoutFor, tableCompactLayouts, } from "./table-layouts.js";
@@ -81,6 +83,9 @@ function primaryRowLinkProps({ href, label, wraps, content, }) {
81
83
  const COMPACT_IDENTITY_CLASS = {
82
84
  tight: "@max-xl/table:w-full @max-xl/table:max-w-0",
83
85
  standard: "@max-3xl/table:w-full @max-3xl/table:max-w-0",
86
+ ample: "@max-[52rem]/table:w-full @max-[52rem]/table:max-w-0",
87
+ large: "@max-4xl/table:w-full @max-4xl/table:max-w-0",
88
+ generous: "@max-[60rem]/table:w-full @max-[60rem]/table:max-w-0",
84
89
  wide: "@max-5xl/table:w-full @max-5xl/table:max-w-0",
85
90
  roomy: "@max-[68rem]/table:w-full @max-[68rem]/table:max-w-0",
86
91
  spacious: "@max-6xl/table:w-full @max-6xl/table:max-w-0",
@@ -88,6 +93,39 @@ const COMPACT_IDENTITY_CLASS = {
88
93
  vast: "@max-[96rem]/table:w-full @max-[96rem]/table:max-w-0",
89
94
  always: "w-full max-w-0",
90
95
  };
96
+ const COMPACT_TRAILING_SPACING = {
97
+ tight: "@max-xl/table:pr-(--card-spacing)",
98
+ standard: "@max-3xl/table:pr-(--card-spacing)",
99
+ ample: "@max-[52rem]/table:pr-(--card-spacing)",
100
+ large: "@max-4xl/table:pr-(--card-spacing)",
101
+ generous: "@max-[60rem]/table:pr-(--card-spacing)",
102
+ wide: "@max-5xl/table:pr-(--card-spacing)",
103
+ roomy: "@max-[68rem]/table:pr-(--card-spacing)",
104
+ spacious: "@max-6xl/table:pr-(--card-spacing)",
105
+ broad: "@max-7xl/table:pr-(--card-spacing)",
106
+ vast: "@max-[96rem]/table:pr-(--card-spacing)",
107
+ always: "pr-(--card-spacing)",
108
+ };
109
+ const COMPACT_TRAILING_ALIGN = {
110
+ tight: "@max-xl/table:text-right",
111
+ standard: "@max-3xl/table:text-right",
112
+ ample: "@max-[52rem]/table:text-right",
113
+ large: "@max-4xl/table:text-right",
114
+ generous: "@max-[60rem]/table:text-right",
115
+ wide: "@max-5xl/table:text-right",
116
+ roomy: "@max-[68rem]/table:text-right",
117
+ spacious: "@max-6xl/table:text-right",
118
+ broad: "@max-7xl/table:text-right",
119
+ vast: "@max-[96rem]/table:text-right",
120
+ always: "text-right",
121
+ };
122
+ function compactTrailingClass(column, trailingColumnId, identityColumnId, compactLayout) {
123
+ if (!compactLayout || column.id !== trailingColumnId)
124
+ return false;
125
+ const meta = column.columnDef.meta;
126
+ const trails = meta?.wraps !== true && meta?.centered !== true && column.id !== identityColumnId;
127
+ return cn(COMPACT_TRAILING_SPACING[compactLayout], trails && COMPACT_TRAILING_ALIGN[compactLayout]);
128
+ }
91
129
  function identityWidthClass(column, identityColumnId, compactLayout) {
92
130
  return column.id === identityColumnId && compactLayout
93
131
  ? COMPACT_IDENTITY_CLASS[compactLayout]
@@ -187,9 +225,6 @@ function PagerButton({ enabled, label, link, onClick, }) {
187
225
  function GroupHeading({ children, span }) {
188
226
  return (_jsx("tbody", { "data-slot": "table-group-heading", children: _jsx(TableRow, { children: _jsx(TableHead, { className: "text-foreground last:text-left", colSpan: span, scope: "colgroup", children: children }) }) }));
189
227
  }
190
- function DefaultToolbar({ actions }) {
191
- return actions ? _jsx(CollectionToolbar, { label: "", actions: actions }) : null;
192
- }
193
228
  /**
194
229
  * Records compared across columns: the same facts for every record, read down a column and
195
230
  * across a row, inside their `TableCard`.
@@ -200,10 +235,12 @@ function DefaultToolbar({ actions }) {
200
235
  * @instead “For a row of descriptive content paired with a single action (membership row, integration row), use `Entity` instead.” (https://vercel.com/geist/table)
201
236
  * “For a key/value metadata block on a detail page, use `Description`, not a two-column table.” (https://vercel.com/geist/table)
202
237
  * Ours: Geist's `Entity` is a `RecordList` row. A registry of entities whose columns `RecordList` cannot hold, more than three facts beside a filter bar the product owns, as Vercel's Deployments list, is this table with `rows="entities"`, which draws the same rows: headings for assistive technology only, 72 px rows, a `RecordIdentity` in the identity column. Its `Description` is `ObjectFacts`. A list on a page of its own is a `CollectionPage`. A descriptive list is `ItemGroup`.
203
- * @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is as wide as its definition's `size`, in pixels, and the columns without one share the rest, so a table gives a size to every column but the one that takes the spare width; a value too long for its column ends in an ellipsis, whole in its title (a record's name carries its own), unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle instead. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings (Vercel's Usage page: *Delivery network*, *Functions*): a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. A row never scrolls sideways and never gives a column without a size less than 160 px: on a card narrower than its columns (the sized ones and 160 px for each without a size, however wide that is; columns no card holds lay out this way on every card) the row keeps its name and its `primaryColumns`, and every other column leaves it, its value joining the one muted line under the name, joined by a middle dot (a `Tag` reads as its text there); entity facts wrap below the name so every value stays readable, while other rows end in an ellipsis unless a column `wraps`, or `dropped` when its `compact` says so, or beside an entity row's name, which ends in an ellipsis before it, when it says `name`, as Vercel's lists read on a phone: no labels, no second line; an `optional` column's empty value is left out of the line. A table whose every column is in `primaryColumns`, a settings matrix, lays out by its content there instead, so the name wraps beside the columns. A document's table, such as a legal page's, is read whole instead: its columns take the `wraps` option, so their words wrap and the row grows, and it keeps its header row; in the compact layout every cell but the identity wraps between words. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right (Vercel's deployments list ends "Deployment retention is enabled. Learn more" with *View recently deleted*); it is the one place a table says a sentence. Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
238
+ * @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is as wide as its definition's `size`, in pixels, and the columns without one share the rest, so a table gives a size to every column but the one that takes the spare width; a value too long for its column ends in an ellipsis, whole in its title (a record's name carries its own), unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle instead. The last column trails unless it `wraps` or is `centered`, and on a card too narrow for the columns the last one the row keeps is its last column; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings (Vercel's Usage page: *Delivery network*, *Functions*): a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. A row never scrolls sideways and never gives a column without a size less than 160 px: on a card narrower than its columns (the sized ones and 160 px for each without a size, however wide that is; columns no card holds lay out this way on every card) the row keeps its name and its `primaryColumns`, and every other column leaves it, its value joining the one muted line under the name, joined by a middle dot (a `Tag` reads as its text there); entity facts wrap below the name so every value stays readable, while other rows end in an ellipsis unless a column `wraps`, or `dropped` when its `compact` says so, or beside an entity row's name, which ends in an ellipsis before it, when it says `name`, as Vercel's lists read on a phone: no labels, no second line; an `optional` column's empty value is left out of the line. A table whose every column is in `primaryColumns`, a settings matrix, lays out by its content there instead, so the name wraps beside the columns. A document's table, such as a legal page's, is read whole instead: its columns take the `wraps` option, so their words wrap and the row grows, and it keeps its header row; in the compact layout every cell but the identity wraps between words. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right (Vercel's deployments list ends "Deployment retention is enabled. Learn more" with *View recently deleted*); it is the one place a table says a sentence. Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
204
239
  * “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table)
205
240
  * “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
206
241
  * Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced.
242
+ * Ours: a table that is the page's job under its title takes the page's `notice`, one `NoticeBanner` above its toolbar, 12 px over it, as a collection page places it under the title: a refresh of the rows that failed, with Try again (nadicode decision).
243
+ * Ours: the table draws its own toolbar, a `FilterToolbar`: from `toolbar` for a registry whose search, filters and sort the product keeps (the URL), or else its own local search; the column menu and `toolbarActions` end it. A product never draws a table's toolbar itself. While the page reads the rows, `DataTableSkeleton` stands in the table's place: the same card, a heading row and the given number of rows at the table's heights, the columns after the second leaving it below 640 px, with no words (nadicode decision).
207
244
  * “Sortable column headers are buttons. The visible label stays Title Case; the sort-direction arrow is decorative and the button announces the next sort state to assistive tech.” (https://vercel.com/geist/table)
208
245
  * Ours: the order has one owner, the app's `sorting`, which the URL holds and a `CollectionSort` above the list sets, so no heading is a button and every page of a paged list follows one order.
209
246
  * “Apply `tabular-nums` (or Geist Mono) to numeric columns so digits align across rows for comparison.” (https://vercel.com/geist/table)
@@ -213,11 +250,24 @@ function DefaultToolbar({ actions }) {
213
250
  * “Use the canonical short relative-time form in cells (`2m ago`, `5h ago`); switch to `Mar 14, 2026` past 7 days. See `Relative Time Card`.” (https://vercel.com/geist/table)
214
251
  * “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table)
215
252
  * Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product's catalogue, in both languages. The footer is a count or the paging, never a help sentence: guidance a step needs lives in that step. Totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total. Italian headings run a third longer and never wrap.
216
- * @access A native table named by `tableLabel`, which is required; `th scope="col"`; the record's name is the row's one link. A sorted column's heading carries `aria-sort`. Ours: a missing value is a hidden "—" with screen-reader text, never blank.
253
+ * @access A native table named by `tableLabel`, which is required; `th scope="col"`; the record's name is the row's one link. A sorted column's heading carries `aria-sort`. `DataTableSkeleton` is busy and its placeholder table is hidden from assistive technology. Ours: a missing value is a hidden "—" with screen-reader text, never blank.
217
254
  */
218
255
  export function DataTable(props) {
219
256
  return _jsx(RecordsTable, { ...props, kind: props.rows ?? "figures" });
220
257
  }
258
+ /**
259
+ * What stands in a DataTable's place while its page reads the rows: its card, a heading row and
260
+ * `rows` rows of `columns` placeholders, with no words, under the table's `notice` when a read of
261
+ * the rows is failing, as the table places it.
262
+ */
263
+ export function DataTableSkeleton({ rows, columns, notice, }) {
264
+ const placeholders = Array.from({ length: columns }, (_, column) => column);
265
+ const narrowHidden = (column) => (column > 1 ? "hidden sm:table-cell" : undefined);
266
+ const skeleton = (_jsx("div", { "aria-busy": "true", className: "min-w-0 w-full", "data-slot": "data-table-skeleton", children: _jsx(TableCard, { children: _jsxs(Table, { "aria-hidden": true, className: "table-fixed text-body-sm", children: [_jsx(TableHeader, { children: _jsx(TableRow, { children: placeholders.map((column) => (_jsx(TableHead, { className: narrowHidden(column), children: _jsx(Skeleton, { className: "h-4 w-3/4" }) }, column))) }) }), _jsx(TableBody, { bordered: true, children: Array.from({ length: rows }, (_, row) => (_jsx(TableRow, { children: placeholders.map((column) => (_jsx(TableCell, { className: narrowHidden(column), children: _jsx("div", { className: "flex h-5 items-center", children: _jsx(Skeleton, { className: "h-4 w-3/4" }) }) }, column))) }, row))) })] }) }) }));
267
+ if (!notice)
268
+ return skeleton;
269
+ return (_jsxs("div", { className: "min-w-0 w-full", children: [_jsx(NoticeBanner, { ...notice, className: cn("mb-3", notice.className) }), skeleton] }));
270
+ }
221
271
  /**
222
272
  * The entity rows `RecordList` draws: a table whose headings only a screen reader reads, 72 px
223
273
  * rows, and a form that opens inside the record's row. A screen draws these rows with
@@ -226,7 +276,7 @@ export function DataTable(props) {
226
276
  export function EntityTable(props) {
227
277
  return _jsx(RecordsTable, { ...props, kind: "entities" });
228
278
  }
229
- function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPlaceholder, primaryColumns, tableLabel, heading, footer, footerNote, group, embedded = false, summary, rowHref, rowLabel, primaryColumnId, empty, noMatchMessage, columnsLabel, clearSearchLabel, pageLabels, toolbarActions, externalFilter, sorting: externalSorting, pagination, renderRowLink = defaultRowLink, renderToolbar = DefaultToolbar, wrapCard, rowEditor, rowMenu, rowUnderName, }) {
279
+ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPlaceholder, primaryColumns, tableLabel, heading, footer, footerNote, group, embedded = false, summary, rowHref, rowLabel, primaryColumnId, empty, noMatchMessage, columnsLabel, clearSearchLabel, pageLabels, toolbarActions, externalFilter, sorting: externalSorting, pagination, renderRowLink = defaultRowLink, toolbar, wrapCard, notice, rowEditor, rowMenu, rowUnderName, }) {
230
280
  const entities = kind === "entities";
231
281
  const [sorting, setSorting] = React.useState([]);
232
282
  const [columnFilters, setColumnFilters] = React.useState([]);
@@ -265,6 +315,9 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
265
315
  // A table whose every column stays lays out by its content on a narrow card, so the name wraps
266
316
  // beside the columns instead of collapsing between them.
267
317
  const tableLayout = compactLayout ?? neededLayout;
318
+ const visibleColumns = table.getVisibleLeafColumns();
319
+ const lastKept = visibleColumns.filter((column) => primaryColumns.includes(column.id)).at(-1);
320
+ const trailingColumnId = lastKept === visibleColumns.at(-1) ? undefined : lastKept?.id;
268
321
  const [shownLayout, layoutProbeRef] = useShownLayout();
269
322
  const canPreviousPage = pagination ? pagination.hasPrevious : table.getCanPreviousPage();
270
323
  const canNextPage = pagination ? pagination.hasNext : table.getCanNextPage();
@@ -332,7 +385,7 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
332
385
  const centered = cell.column.columnDef.meta?.centered === true;
333
386
  const cutByEllipsis = !wraps && !isPrimaryLink;
334
387
  const holdsCompactLine = compactLine !== undefined && cell.column.id === identityColumnId;
335
- const className = cn(numeric && "text-right tabular-nums wrap-normal", wraps && "whitespace-normal last:text-left", centered && "text-center last:text-center", cutByEllipsis && "overflow-hidden text-ellipsis", identityWidthClass(cell.column, identityColumnId, tableLayout), collapsed);
388
+ const className = cn(numeric && "text-right tabular-nums wrap-normal", wraps && "whitespace-normal last:text-left", centered && "text-center last:text-center", cutByEllipsis && "overflow-hidden text-ellipsis", identityWidthClass(cell.column, identityColumnId, tableLayout), compactTrailingClass(cell.column, trailingColumnId, identityColumnId, compactLayout), collapsed);
336
389
  const drawnOnlyInDetailRow = Boolean(collapsed) && shownLayout === "details" && !isPrimaryLink;
337
390
  if (drawnOnlyInDetailRow) {
338
391
  return _jsx(TableCell, { className: className }, cell.id);
@@ -358,25 +411,23 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
358
411
  const size = sizeOf.get(column.id);
359
412
  return (_jsx(TableCol, { className: cn(collapseTrackClass(column, primaryColumns, compactLayout)), style: size === undefined ? undefined : { width: size } }, column.id));
360
413
  }) }), _jsx(TableHeader, { className: entities ? "sr-only" : undefined, children: table.getHeaderGroups().map((headerGroup) => (_jsx(TableRow, { children: headerGroup.headers.map((header) => (_jsx(TableHead, { "aria-sort": sortOrder(header.column.getIsSorted()), "data-identity": header.column.id === identityColumnId ? "" : undefined, className: cn(isNumericColumn(header.column) && "text-right tabular-nums", header.column.columnDef.meta?.wraps === true && "last:text-left", header.column.columnDef.meta?.centered === true &&
361
- "text-center last:text-center", identityWidthClass(header.column, identityColumnId, tableLayout), collapseClass(header.column, primaryColumns, compactLayout)), children: header.isPlaceholder
414
+ "text-center last:text-center", identityWidthClass(header.column, identityColumnId, tableLayout), compactTrailingClass(header.column, trailingColumnId, identityColumnId, compactLayout), collapseClass(header.column, primaryColumns, compactLayout)), children: header.isPlaceholder
362
415
  ? null
363
416
  : flexRender(header.column.columnDef.header, header.getContext()) }, header.id))) }, headerGroup.id))) }), _jsx(LayoutProbeLeadingRecords, { layout: tableLayout, probeRef: layoutProbeRef, children: sections.map((section) => (_jsxs(React.Fragment, { children: [section.heading === undefined ? null : (_jsx(GroupHeading, { span: table.getVisibleLeafColumns().length, children: section.heading })), section.rows.map(renderRow)] }, section.heading ?? ""))) })] }) }))] }));
364
417
  const actions = columnsControl || toolbarActions ? (_jsxs(_Fragment, { children: [columnsControl, toolbarActions] })) : null;
365
- const toolbarSlots = { actions };
366
- if (filterColumn && filterPlaceholder !== undefined && clearSearchLabel !== undefined) {
367
- toolbarSlots.search = {
368
- label: filterPlaceholder,
369
- placeholder: filterPlaceholder,
370
- value: filterValue,
371
- onChange: (value) => filterColumn.setFilterValue(value),
372
- };
373
- toolbarSlots.clear = {
374
- label: clearSearchLabel,
375
- onClear: () => filterColumn.setFilterValue(""),
376
- };
377
- }
378
- const toolbarRow = renderToolbar(toolbarSlots);
418
+ const tools = toolbar ?? {
419
+ label: filterPlaceholder ?? columnsLabel ?? tableLabel,
420
+ search: filterColumn && filterPlaceholder !== undefined && clearSearchLabel !== undefined
421
+ ? {
422
+ label: filterPlaceholder,
423
+ clearLabel: clearSearchLabel,
424
+ value: filterValue,
425
+ onValueChange: (value) => filterColumn.setFilterValue(value),
426
+ }
427
+ : undefined,
428
+ };
429
+ const toolbarRow = filterToolbarHolds({ ...tools, actions }) ? (_jsx(FilterToolbar, { lead: "filters", ...tools, actions: actions })) : null;
379
430
  const pager = pageLabels && pagination !== false && (canPreviousPage || canNextPage) ? (_jsxs("div", { "aria-busy": waitingForPage || undefined, className: "flex items-center gap-3", children: [pagination && pagination.status ? (_jsx("span", { className: "tabular-nums", children: pagination.status })) : null, _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(PagerButton, { enabled: canPreviousPage && !waitingForPage, label: pageLabels.previous, link: pagination ? pagination.previousLink : undefined, onClick: goPreviousPage }), _jsx(PagerButton, { enabled: canNextPage && !waitingForPage, label: pageLabels.next, link: pagination ? pagination.nextLink : undefined, onClick: goNextPage })] })] })) : null;
380
431
  const card = (_jsx(TableCard, { surface: embedded ? "plain" : "resting", title: heading?.title, description: heading?.description, toolbar: heading ? toolbarRow : undefined, summary: summary, footerHint: footer, footer: pager, note: footerNote, children: tableNode }));
381
- return (_jsxs("div", { className: "min-w-0 w-full text-body-sm", "data-slot": "data-table", children: [heading ? null : toolbarRow, wrapCard ? wrapCard(card) : card] }));
432
+ return (_jsxs("div", { className: "min-w-0 w-full text-body-sm", "data-slot": "data-table", children: [notice ? _jsx(NoticeBanner, { ...notice, className: cn("mb-3", notice.className) }) : null, heading ? null : toolbarRow, wrapCard ? wrapCard(card) : card] }));
382
433
  }
@@ -0,0 +1,55 @@
1
+ import type { ReactElement, ReactNode } from "react";
2
+ import { type NoticeBannerProps } from "./notice-banner.js";
3
+ declare const COLUMN_WIDTH: {
4
+ readonly sm: "max-w-sm";
5
+ readonly md: "max-w-md";
6
+ readonly approval: "max-w-[32.5rem]";
7
+ readonly lg: "max-w-xl";
8
+ readonly xl: "max-w-3xl";
9
+ readonly "2xl": "max-w-5xl";
10
+ };
11
+ export type EntryPageWidth = keyof typeof COLUMN_WIDTH;
12
+ export type EntryPageProps = {
13
+ /** The product's wordmark at the start of the header band; a link home only where leaving is safe. */
14
+ brand: ReactNode;
15
+ /** What stands at the header's end: the theme switcher, the way to sign out. */
16
+ actions?: ReactNode;
17
+ /** The column's measure: `md` for a form, `approval` for a hand-over, `2xl` for a record beside its map. */
18
+ width?: EntryPageWidth;
19
+ /** A short job sits in the window's optical centre; a long one (a waiting room, a document) starts at the top. */
20
+ align?: "center" | "start";
21
+ /** No line under the header, for a page whose picture stands on the whole window. */
22
+ bare?: boolean;
23
+ /** The dark plane in every theme: the pages that hand a person to Nadia, drawn on black as her own entry screen is. */
24
+ dark?: boolean;
25
+ /** The product's figure, ambient above the column, such as Nadia's orb: artwork that claims no activity. */
26
+ presence?: ReactNode;
27
+ /** The approved picture of the page, behind everything from 1024 px and left out below. */
28
+ picture?: ReactNode;
29
+ /** `approval` lays the header over the picture and tightens the column, for a page that hands a person to Nadia. */
30
+ layout?: "default" | "approval";
31
+ /** The page's heading: its h1 and the lines that introduce it, such as who invited the person. */
32
+ heading?: ReactNode;
33
+ /** A condition of what the page does that the page fixes, under its heading: one `NoticeBanner`. */
34
+ notice?: NoticeBannerProps;
35
+ /** The heading, the notice and the content stand in one card, for a page whose card is its job: an invitation. */
36
+ card?: boolean;
37
+ /** The page's own content: its form, its record, its document. */
38
+ children?: ReactNode;
39
+ /** The product's `<main />`, which the page fills: a page owns its landmarks, so no component renders one. */
40
+ main: ReactElement;
41
+ };
42
+ /**
43
+ * A page a person meets outside the product's shell: a header band with the wordmark, then one
44
+ * column with the job.
45
+ *
46
+ * @family Compositions
47
+ * @when Every page outside the signed-in shell: sign-in, sign-up, an invitation, two-factor, a legal document, the company check, and the pages that hand a person to Nadia or back from a closed account (nadicode decision).
48
+ * @instead A page inside the shell is a `CollectionPage`, `ObjectPage`, `OverviewPage` or `SettingsPage`. Nadia's installer and her desktop's own entry screens are an `EntryScene`; Alveare Server's is the `HiveScene`.
49
+ * @behaviour The page is the `main` landmark the product passes: a header band with the `brand` at its start and the `actions` at its end, a line under it unless `bare`, then one centred column of the `width` measure, in the window's optical centre or from the top (`align`), 24 px between its parts (12 px with `layout="approval"`, whose header lies over the picture from 640 px). The `picture` stands behind the whole window from 1024 px and is left out below; `dark` draws the page on the dark plane in every theme. The `presence` stands centred at the column's top, then the `heading`, the `notice` under it and the page's content: one notice at a time, a strip as wide as the column with its one fix, under the title as every page composition places it. With `card` the heading, the notice and the content stand in one resting card, 24 px apart inside its padding, the strip as wide as the card's content. The page has no navigation of its own: the brand links home only where leaving is safe, and a page that names an account offers a way to sign out among its `actions` or as its notice's fix.
50
+ * @words None of its own: the brand, the actions, the notice and the content carry the product's words.
51
+ * @access One `main` landmark; the page's h1 is in its `heading`, or in its content when it has none. The picture and the presence are hidden and inert, and the header's actions stay in reading order before the content.
52
+ */
53
+ export declare function EntryPage({ brand, actions, width, align, bare, dark, presence, picture, layout, heading, notice, card, children, main, }: EntryPageProps): ReactElement;
54
+ export {};
55
+ //# sourceMappingURL=entry-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-page.d.ts","sourceRoot":"","sources":["../../src/components/entry-page.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGlF,QAAA,MAAM,YAAY;;;;;;;CAOR,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,YAAY,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG;IAC3B,sGAAsG;IACtG,KAAK,EAAE,SAAS,CAAC;IACjB,gFAAgF;IAChF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,4GAA4G;IAC5G,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,kHAAkH;IAClH,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC3B,qFAAqF;IACrF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uHAAuH;IACvH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,oHAAoH;IACpH,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAChC,kGAAkG;IAClG,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,oGAAoG;IACpG,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,kHAAkH;IAClH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kEAAkE;IAClE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,8GAA8G;IAC9G,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,OAAO,EACP,KAAY,EACZ,KAAgB,EAChB,IAAY,EACZ,IAAY,EACZ,QAAQ,EACR,OAAO,EACP,MAAkB,EAClB,OAAO,EACP,MAAM,EACN,IAAY,EACZ,QAAQ,EACR,IAAI,GACL,EAAE,cAAc,GAAG,YAAY,CA6B/B"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ import { Card, CardContent } from "./card.js";
4
+ import { NoticeBanner } from "./notice-banner.js";
5
+ import { cn } from "../lib/utils.js";
6
+ const COLUMN_WIDTH = {
7
+ sm: "max-w-sm",
8
+ md: "max-w-md",
9
+ approval: "max-w-[32.5rem]",
10
+ lg: "max-w-xl",
11
+ xl: "max-w-3xl",
12
+ "2xl": "max-w-5xl",
13
+ };
14
+ /**
15
+ * A page a person meets outside the product's shell: a header band with the wordmark, then one
16
+ * column with the job.
17
+ *
18
+ * @family Compositions
19
+ * @when Every page outside the signed-in shell: sign-in, sign-up, an invitation, two-factor, a legal document, the company check, and the pages that hand a person to Nadia or back from a closed account (nadicode decision).
20
+ * @instead A page inside the shell is a `CollectionPage`, `ObjectPage`, `OverviewPage` or `SettingsPage`. Nadia's installer and her desktop's own entry screens are an `EntryScene`; Alveare Server's is the `HiveScene`.
21
+ * @behaviour The page is the `main` landmark the product passes: a header band with the `brand` at its start and the `actions` at its end, a line under it unless `bare`, then one centred column of the `width` measure, in the window's optical centre or from the top (`align`), 24 px between its parts (12 px with `layout="approval"`, whose header lies over the picture from 640 px). The `picture` stands behind the whole window from 1024 px and is left out below; `dark` draws the page on the dark plane in every theme. The `presence` stands centred at the column's top, then the `heading`, the `notice` under it and the page's content: one notice at a time, a strip as wide as the column with its one fix, under the title as every page composition places it. With `card` the heading, the notice and the content stand in one resting card, 24 px apart inside its padding, the strip as wide as the card's content. The page has no navigation of its own: the brand links home only where leaving is safe, and a page that names an account offers a way to sign out among its `actions` or as its notice's fix.
22
+ * @words None of its own: the brand, the actions, the notice and the content carry the product's words.
23
+ * @access One `main` landmark; the page's h1 is in its `heading`, or in its content when it has none. The picture and the presence are hidden and inert, and the header's actions stay in reading order before the content.
24
+ */
25
+ export function EntryPage({ brand, actions, width = "md", align = "center", bare = false, dark = false, presence, picture, layout = "default", heading, notice, card = false, children, main, }) {
26
+ return useRender({
27
+ defaultTagName: "div",
28
+ render: main,
29
+ props: {
30
+ className: cn("relative isolate flex min-h-svh flex-col bg-background text-foreground", dark && "dark"),
31
+ children: (_jsx(EntryPageBody, { actions: actions, align: align, bare: bare, brand: brand, card: card, heading: heading, layout: layout, notice: notice, picture: picture, presence: presence, width: width, children: children })),
32
+ },
33
+ state: { slot: "entry-page" },
34
+ });
35
+ }
36
+ function EntryPageBody({ brand, actions, width = "md", align = "center", bare = false, presence, picture, layout = "default", heading, notice, card, children, }) {
37
+ const job = (_jsxs(_Fragment, { children: [heading, notice ? _jsx(NoticeBanner, { ...notice }) : null, children] }));
38
+ return (_jsxs(_Fragment, { children: [picture ? (_jsx("div", { "aria-hidden": "true", className: "pointer-events-none absolute inset-0 hidden overflow-clip lg:block", inert: true, children: picture })) : null, _jsxs("header", { className: cn("relative z-10 flex shrink-0 items-center justify-between gap-3", layout === "approval"
39
+ ? "p-4 sm:absolute sm:inset-x-0 sm:top-0 sm:px-8 sm:py-6"
40
+ : "p-4 sm:px-6 md:px-10", !bare && "border-b border-border"), children: [brand, actions ? _jsx("div", { className: "flex items-center gap-2", children: actions }) : null] }), _jsx("div", { className: cn("relative z-10 flex flex-1 justify-center", layout === "approval" ? "p-4 sm:p-6" : "px-4 py-8 sm:px-6 md:px-10 md:py-12", align === "center" ? "items-center" : "items-start"), children: _jsxs("div", { className: cn("flex w-full flex-col", COLUMN_WIDTH[width], layout === "approval" ? "gap-3" : "gap-6"), "data-slot": "entry-page-column", children: [presence ? (_jsx("div", { "aria-hidden": "true", className: "flex justify-center", "data-slot": "entry-page-presence", children: presence })) : null, card ? (_jsx(Card, { children: _jsx(CardContent, { className: "flex flex-col gap-6", children: job }) })) : (job)] }) })] }));
41
+ }
@@ -37,7 +37,7 @@ export type EntrySceneProps = {
37
37
  *
38
38
  * @family Compositions
39
39
  * @when Nadia's installer and the desktop's sign-in, start, update and failure screens, which paint the same screen; a page that shows that screen beside other things; the top of every Nadia pairing drawer, contained at 16:9 with only its short status ("Connecting Telegram", "Linked", "Code expired"): a longer sentence stands under the scene, never in it, and the code or QR the phone takes, with its expiry, then the steps on the phone follow it.
40
- * @instead The Portal's entry pages are its funnel frame with the shared entry header; Alveare Server's entry is the HiveScene; a wait inside the product is a WaitingLine.
40
+ * @instead The Portal's entry pages are an `EntryPage`; Alveare Server's entry is the HiveScene; a wait inside the product is a WaitingLine.
41
41
  * @behaviour It holds no state and decides nothing: which view is open, the words and when the screen ends belong to whoever mounts it. Required: the picture, the wordmark and the heading, because every entry screen has all three; a screen that leaves one out does not compile. It fills a box of the window's own shape (`aspectRatio`), so the picture's figure stands on the window's floor (`pictureFeet`). A failure quiets the picture and never removes it. Its children stand in order: the message, the actions, the progress line, the stage list.
42
42
  * @words The heading names the surface and is never seen. Instructions and status are one plain sentence that changes only when the real stage changes ("Loading your tools").
43
43
  * @access One level-1 heading for the screen, read but not shown; a message that reports work in progress is a status.
@@ -8,7 +8,7 @@ import { cssVariables } from "../lib/css-variables.js";
8
8
  *
9
9
  * @family Compositions
10
10
  * @when Nadia's installer and the desktop's sign-in, start, update and failure screens, which paint the same screen; a page that shows that screen beside other things; the top of every Nadia pairing drawer, contained at 16:9 with only its short status ("Connecting Telegram", "Linked", "Code expired"): a longer sentence stands under the scene, never in it, and the code or QR the phone takes, with its expiry, then the steps on the phone follow it.
11
- * @instead The Portal's entry pages are its funnel frame with the shared entry header; Alveare Server's entry is the HiveScene; a wait inside the product is a WaitingLine.
11
+ * @instead The Portal's entry pages are an `EntryPage`; Alveare Server's entry is the HiveScene; a wait inside the product is a WaitingLine.
12
12
  * @behaviour It holds no state and decides nothing: which view is open, the words and when the screen ends belong to whoever mounts it. Required: the picture, the wordmark and the heading, because every entry screen has all three; a screen that leaves one out does not compile. It fills a box of the window's own shape (`aspectRatio`), so the picture's figure stands on the window's floor (`pictureFeet`). A failure quiets the picture and never removes it. Its children stand in order: the message, the actions, the progress line, the stage list.
13
13
  * @words The heading names the surface and is never seen. Instructions and status are one plain sentence that changes only when the real stage changes ("Loading your tools").
14
14
  * @access One level-1 heading for the screen, read but not shown; a message that reports work in progress is a status.
@@ -0,0 +1,43 @@
1
+ import { type ReactNode } from "react";
2
+ import { type CollectionFiltersProps } from "./collection-filters.js";
3
+ import { type CollectionSearchProps } from "./collection-search.js";
4
+ import { type CollectionSortProps } from "./collection-sort.js";
5
+ export type FilterToolbarProps = {
6
+ /** Names the toolbar: "Customer filters". */
7
+ label: string;
8
+ search?: CollectionSearchProps | undefined;
9
+ filters?: CollectionFiltersProps | undefined;
10
+ /** Clears the search and every filter at once; shown only while one is set: "Clear filters". */
11
+ clear?: {
12
+ label: string;
13
+ onClear: () => void;
14
+ } | undefined;
15
+ sort?: CollectionSortProps | undefined;
16
+ /** The collection's own commands, after the sort at the trailing edge. */
17
+ actions?: ReactNode;
18
+ /** The rows of a new search, filter or sort are being read; the rows shown are the last ones. */
19
+ pending?: boolean | undefined;
20
+ /** `plain` where the rows never pass under the bar. */
21
+ surface?: "glass" | "plain" | undefined;
22
+ /**
23
+ * What leads the bar: a collection's `search`, then its filters (`CollectionPage`), or a
24
+ * comparison's `filters`, then its search (`DataTable`).
25
+ */
26
+ lead?: "search" | "filters" | undefined;
27
+ };
28
+ /** Whether the toolbar has anything to draw: a page leaves it out when it holds nothing. */
29
+ export declare function filterToolbarHolds({ search, filters, sort, actions, }: Pick<FilterToolbarProps, "search" | "filters" | "sort" | "actions">): boolean;
30
+ /**
31
+ * A collection's search, filters and sort, drawn from what the product holds of them.
32
+ *
33
+ * @family Compositions
34
+ * @when The toolbar over a collection's rows: the one `CollectionPage` draws from its `search`, `filters` and `sort`, and the one `DataTable` draws from its `toolbar` for a registry the product keeps in the URL (Customers, Statements, an Agent's usage). On its own, only over a region the server answers from the same question, which no list composition draws, such as an analysis whose search and metric live in the URL.
35
+ * @instead A list of records gives `CollectionPage`, and a comparison `DataTable`, its search, filters and sort, and they place this toolbar; a page never draws it beside them. The bar's own layout is `CollectionToolbar`, which a page never draws. Finding across the product is `CommandDialog`. A page's commands are `PageActions` on the title's row.
36
+ * @behaviour A comparison's bar (`lead="filters"`, as `DataTable` draws it) leads with its filters and Clear filters, then the search; otherwise the search comes first (nadicode decision). The search first, growing to fill the row, then the filters, then Clear filters while the search or a filter is set, then the sort, then the collection's own `actions`, in the reading and the Tab order alike; below 640 px the search takes the first line and the rest follow under it, wrapping onto more lines rather than cutting one (`CollectionToolbar`). The search is disabled until the page is interactive, so a word typed before then is never lost. While `pending`, the toolbar is busy and, after a second, shows the one waiting line, while the rows already shown stay; it never shows a label of its own. A toolbar with nothing to hold draws nothing. While a page reads the collection, `FilterToolbarSkeleton` holds the bar's place: a search's bar and a control's, at their heights (nadicode decision).
37
+ * @words The label names the collection's tools: *Customer filters*. Clear filters is the product's word.
38
+ * @access `role="toolbar"` named by `label`, `aria-busy` while `pending`; the waiting line is decorative. The skeleton carries no words, is busy, and is hidden from assistive technology.
39
+ */
40
+ export declare function FilterToolbar({ label, search, filters, clear, sort, actions, pending, surface, lead, }: FilterToolbarProps): import("react").JSX.Element | null;
41
+ /** What stands in a FilterToolbar's place while its page reads the collection: a search's bar and a control's, at their heights, with no words. */
42
+ export declare function FilterToolbarSkeleton(): import("react").JSX.Element;
43
+ //# sourceMappingURL=filter-toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-toolbar.d.ts","sourceRoot":"","sources":["../../src/components/filter-toolbar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAwB,MAAM,OAAO,CAAC;AAG7D,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AASxF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC3C,OAAO,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAC7C,gGAAgG;IAChG,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,GAAG,SAAS,CAAC;IAC3D,IAAI,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACvC,0EAA0E;IAC1E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,iGAAiG;IACjG,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IACxC;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,4FAA4F;AAC5F,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,OAAO,EACP,IAAI,EACJ,OAAO,GACR,EAAE,IAAI,CAAC,kBAAkB,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC,GAAG,OAAO,CAO/E;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,MAAM,EACN,OAAO,EACP,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAe,EACf,OAAO,EACP,IAAe,GAChB,EAAE,kBAAkB,sCA+CpB;AAED,mJAAmJ;AACnJ,wBAAgB,qBAAqB,gCAepC"}
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useSyncExternalStore } from "react";
4
+ import { Button } from "./button.js";
5
+ import { CollectionFilters } from "./collection-filters.js";
6
+ import { CollectionSearch } from "./collection-search.js";
7
+ import { CollectionSort } from "./collection-sort.js";
8
+ import { CollectionToolbar } from "./collection-toolbar.js";
9
+ import { Skeleton } from "./skeleton.js";
10
+ import { WaitingLine } from "./waiting-line.js";
11
+ const subscribeToClientSnapshot = () => () => undefined;
12
+ const getClientSnapshot = () => true;
13
+ const getServerSnapshot = () => false;
14
+ /** Whether the toolbar has anything to draw: a page leaves it out when it holds nothing. */
15
+ export function filterToolbarHolds({ search, filters, sort, actions, }) {
16
+ return (search !== undefined ||
17
+ (filters !== undefined && filters.facets.length > 0) ||
18
+ sort !== undefined ||
19
+ (actions !== undefined && actions !== null && actions !== false));
20
+ }
21
+ /**
22
+ * A collection's search, filters and sort, drawn from what the product holds of them.
23
+ *
24
+ * @family Compositions
25
+ * @when The toolbar over a collection's rows: the one `CollectionPage` draws from its `search`, `filters` and `sort`, and the one `DataTable` draws from its `toolbar` for a registry the product keeps in the URL (Customers, Statements, an Agent's usage). On its own, only over a region the server answers from the same question, which no list composition draws, such as an analysis whose search and metric live in the URL.
26
+ * @instead A list of records gives `CollectionPage`, and a comparison `DataTable`, its search, filters and sort, and they place this toolbar; a page never draws it beside them. The bar's own layout is `CollectionToolbar`, which a page never draws. Finding across the product is `CommandDialog`. A page's commands are `PageActions` on the title's row.
27
+ * @behaviour A comparison's bar (`lead="filters"`, as `DataTable` draws it) leads with its filters and Clear filters, then the search; otherwise the search comes first (nadicode decision). The search first, growing to fill the row, then the filters, then Clear filters while the search or a filter is set, then the sort, then the collection's own `actions`, in the reading and the Tab order alike; below 640 px the search takes the first line and the rest follow under it, wrapping onto more lines rather than cutting one (`CollectionToolbar`). The search is disabled until the page is interactive, so a word typed before then is never lost. While `pending`, the toolbar is busy and, after a second, shows the one waiting line, while the rows already shown stay; it never shows a label of its own. A toolbar with nothing to hold draws nothing. While a page reads the collection, `FilterToolbarSkeleton` holds the bar's place: a search's bar and a control's, at their heights (nadicode decision).
28
+ * @words The label names the collection's tools: *Customer filters*. Clear filters is the product's word.
29
+ * @access `role="toolbar"` named by `label`, `aria-busy` while `pending`; the waiting line is decorative. The skeleton carries no words, is busy, and is hidden from assistive technology.
30
+ */
31
+ export function FilterToolbar({ label, search, filters, clear, sort, actions, pending = false, surface, lead = "search", }) {
32
+ const interactive = useSyncExternalStore(subscribeToClientSnapshot, getClientSnapshot, getServerSnapshot);
33
+ if (!filterToolbarHolds({ search, filters, sort, actions }))
34
+ return null;
35
+ const narrowed = Boolean(search?.value) || (filters?.facets.some((facet) => Boolean(facet.value)) ?? false);
36
+ const filtersLead = lead === "filters";
37
+ const filtering = (filters && filters.facets.length > 0) || (clear && narrowed) ? (_jsxs(_Fragment, { children: [filters ? _jsx(CollectionFilters, { ...filters }) : null, clear && narrowed ? (_jsx(Button, { variant: "ghost", onClick: clear.onClear, children: clear.label })) : null] })) : undefined;
38
+ const trailing = (!filtersLead && filtering) || sort || actions ? (_jsxs(_Fragment, { children: [filtersLead ? null : filtering, sort ? _jsx(CollectionSort, { ...sort }) : null, actions] })) : undefined;
39
+ return (_jsx(CollectionToolbar, { actions: trailing, controls: filtersLead ? filtering : undefined, "aria-busy": pending || undefined, "data-pending": pending || undefined, "data-slot": "filter-toolbar", label: label, search: search ? (_jsx(CollectionSearch, { ...search, disabled: search.disabled === true || !interactive })) : undefined, status: _jsx(WaitingLine, { className: "w-24", decorative: true, waiting: pending }), surface: surface }));
40
+ }
41
+ /** What stands in a FilterToolbar's place while its page reads the collection: a search's bar and a control's, at their heights, with no words. */
42
+ export function FilterToolbarSkeleton() {
43
+ return (_jsx(CollectionToolbar, { actions: _jsx(Skeleton, { className: "h-control-height min-h-touch-target w-28 [@media(hover:hover)_and_(pointer:fine)]:min-h-0" }), "aria-busy": "true", "aria-hidden": "true", "data-slot": "filter-toolbar-skeleton", label: "", search: _jsx(Skeleton, { className: "h-control-height min-h-touch-target w-full [@media(hover:hover)_and_(pointer:fine)]:min-h-0" }) }));
44
+ }
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type UpdateCardProps } from "./update-card.js";
2
3
  /**
3
4
  * Alveare's entry scene, the hive, which Alveare's desktop and Alveare Server
4
5
  * both stand their entry screens on (apps/alveare/docs/design-doctrine.md,
@@ -91,5 +92,7 @@ declare function HiveLine({ children, id, tone, }: {
91
92
  id?: string;
92
93
  tone?: "body" | "error";
93
94
  }): React.JSX.Element;
94
- export { HiveLine, HiveScene, HiveTitle };
95
+ /** The update offer under a hive screen's words, where the product has no column to hold it, such as a workspace that stopped. */
96
+ declare function HiveUpdate(props: UpdateCardProps): React.JSX.Element;
97
+ export { HiveLine, HiveScene, HiveTitle, HiveUpdate };
95
98
  //# sourceMappingURL=hive-scene.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hive-scene.d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M,CAAA;CAAE,qBAM9E;AAED,iEAAiE;AACjE,iBAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,EAAE,EACF,IAAa,GACd,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACzB,qBAMA;AAED,kIAAkI;AAClI,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,qBAMzC;AAED,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC"}
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { mountAgentOrb } from "../internal/agent-orb.js";
5
5
  import { cn } from "../lib/utils.js";
6
+ import { UpdateCard } from "./update-card.js";
6
7
  const COBALTO = "var(--nc-identity-cobalto)";
7
8
  const VERDE = "var(--nc-identity-verde)";
8
9
  const ARANCIO = "var(--nc-identity-arancio)";
@@ -409,4 +410,8 @@ function HiveTitle({ children, id }) {
409
410
  function HiveLine({ children, id, tone = "body", }) {
410
411
  return (_jsx("p", { className: "nc-hive-line", "data-tone": tone, id: id, children: children }));
411
412
  }
412
- export { HiveLine, HiveScene, HiveTitle };
413
+ /** The update offer under a hive screen's words, where the product has no column to hold it, such as a workspace that stopped. */
414
+ function HiveUpdate(props) {
415
+ return (_jsx("div", { className: "w-full max-w-64 justify-self-center text-start", "data-slot": "hive-update", children: _jsx(UpdateCard, { ...props }) }));
416
+ }
417
+ export { HiveLine, HiveScene, HiveTitle, HiveUpdate };
@@ -20,6 +20,6 @@ const QR_PX = 160;
20
20
  * @access The title is the page's level-1 heading and the installers a list under its own heading. The mark is decorative; the code is an image named by what it opens.
21
21
  */
22
22
  function InviteCard({ mark, title, description, open, install, phone, }) {
23
- return (_jsx(Card, { "data-slot": "invite-card", children: _jsxs(CardContent, { className: "flex flex-col gap-6", children: [_jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [_jsx("img", { alt: "", "aria-hidden": "true", className: "h-10 w-auto", src: mark }), _jsx("h1", { className: "nc-type-heading-sm m-0", children: title }), _jsx("p", { className: "nc-type-body-md m-0 text-muted-foreground", children: description })] }), open ? (_jsx(ButtonLink, { className: "w-full", href: open.href, size: "lg", children: open.label })) : null, phone ? (_jsxs("div", { className: "hidden items-center gap-5 rounded-md border border-border p-4 lg:flex", children: [_jsx(QrCode, { className: "shrink-0", label: phone.label, size: QR_PX, value: phone.link }), _jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [_jsx("span", { className: "nc-type-body-md font-medium", children: phone.label }), _jsx("span", { className: "nc-type-body-sm text-muted-foreground", children: phone.how })] })] })) : null, install && install.installers.length > 0 ? (_jsxs("section", { "aria-labelledby": "invite-card-install", className: "hidden flex-col gap-2 md:flex", children: [_jsx("h2", { className: "nc-type-body-sm m-0 text-muted-foreground", id: "invite-card-install", children: install.label }), _jsx(ItemGroup, { className: "rounded-md border border-border", divided: true, render: _jsx("ul", {}), children: install.installers.map((installer) => (_jsxs(Item, { render: _jsx("li", {}), children: [_jsx(ItemMedia, { variant: "icon", children: _jsx(PlatformMark, { platform: installer.platform, size: 20 }) }), _jsxs(ItemContent, { children: [_jsxs(ItemTitle, { children: [installer.name, installer.suggested ? (_jsx(Badge, { size: "sm", variant: "outline", children: install.suggested })) : null] }), installer.size ? _jsx(ItemDescription, { children: installer.size }) : null] }), _jsx(ItemActions, { children: _jsxs(ButtonLink, { "aria-label": `${install.download} ${installer.name}`, href: installer.href, size: "sm", variant: "secondary", children: [_jsx(Download, { "aria-hidden": "true" }), install.download] }) })] }, installer.platform))) })] })) : null] }) }));
23
+ return (_jsx(Card, { "data-slot": "invite-card", children: _jsxs(CardContent, { className: "flex flex-col gap-6", children: [_jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [_jsx("img", { alt: "", "aria-hidden": "true", className: "h-10 w-auto", src: mark }), _jsx("h1", { className: "nc-type-heading-sm m-0", children: title }), _jsx("p", { className: "nc-type-body-md m-0 text-muted-foreground", children: description })] }), open ? (_jsx(ButtonLink, { className: "w-full", href: open.href, size: "lg", children: open.label })) : null, phone ? (_jsxs("div", { className: "hidden items-center gap-5 rounded-md border border-border p-4 lg:flex", children: [_jsx(QrCode, { className: "shrink-0", label: phone.label, size: QR_PX, value: phone.link }), _jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [_jsx("span", { className: "nc-type-body-md font-medium", children: phone.label }), _jsx("span", { className: "nc-type-body-sm text-muted-foreground", children: phone.how })] })] })) : null, install && install.installers.length > 0 ? (_jsxs("section", { "aria-labelledby": "invite-card-install", className: "hidden flex-col gap-2 md:flex", children: [_jsx("h2", { className: "nc-type-body-sm m-0 text-muted-foreground", id: "invite-card-install", children: install.label }), _jsx(ItemGroup, { className: "rounded-md border border-border px-4", divided: true, render: _jsx("ul", {}), children: install.installers.map((installer) => (_jsxs(Item, { render: _jsx("li", {}), children: [_jsx(ItemMedia, { variant: "icon", children: _jsx(PlatformMark, { platform: installer.platform, size: 20 }) }), _jsxs(ItemContent, { children: [_jsxs(ItemTitle, { children: [installer.name, installer.suggested ? (_jsx(Badge, { size: "sm", variant: "outline", children: install.suggested })) : null] }), installer.size ? _jsx(ItemDescription, { children: installer.size }) : null] }), _jsx(ItemActions, { children: _jsxs(ButtonLink, { "aria-label": `${install.download} ${installer.name}`, href: installer.href, size: "sm", variant: "secondary", children: [_jsx(Download, { "aria-hidden": "true" }), install.download] }) })] }, installer.platform))) })] })) : null] }) }));
24
24
  }
25
25
  export { InviteCard };
@@ -27,7 +27,7 @@ declare const itemVariants: (props?: ({
27
27
  * @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
28
28
  * “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
29
29
  * Ours: Geist's `Table` is a `DataTable` and its `Description` is `ObjectFacts`. An object a person opens, with a mark, facts and a status, is a `RecordList` row; the same row edited in place is a `RecordList` with an `editor`. A page whose job is one collection is `CollectionPage`. Agents in a gallery are `AgentListRow`; Library entries `CatalogEntry`.
30
- * @behaviour A list of descriptive rows is an `ItemGroup` of `Item`s, never table semantics. A row too narrow for its title beside its actions puts the actions under the title, so a name never squeezes to a few letters a line; `min-w-0` on `ItemContent` turns that off, for a row whose figures must stay on the title's line. Every row has a title over its one muted description line; only a message row read whole, or a second content beside the first, may be description only. Media, content and actions stand 16 px apart, centred on one another, in a 72 px row of 16 px padding; a 600 title stands over one 20 px description with no gap, and each holds one line and ends in an ellipsis (`whole` lets a message wrap). Inside a card the group is `divided`: no gaps, one hairline between items. An item that is an `a`, a `button` or a `label` takes the `accent` hover and is one hit target; a plain item never reacts to hover; nested controls stay independent. An `xs` item inside a menu or a combobox option takes the option's padding and adds none. A button in the row is `size="sm"` (32 px). A row a person picks starts with `ItemSelect` and is drawn `render={<label />}`, so the whole row ticks its box and has no other control. A second content beside the first takes only the room its words need. Colour is neutral: the title in ink, the description and any trailing words muted, no hue.
30
+ * @behaviour A list of descriptive rows is an `ItemGroup` of `Item`s, never table semantics. A row too narrow for its title beside its actions puts the actions under the title, so a name never squeezes to a few letters a line; `min-w-0` on `ItemContent` turns that off, for a row whose figures must stay on the title's line. Every row has a title over its one muted description line; only a message row read whole, or a second content beside the first, may be description only. Media, content and actions stand 16 px apart, centred on one another, in a 72 px row of 16 px padding; a 600 title stands over one 20 px description with no gap, and each holds one line and ends in an ellipsis (`whole` lets a message wrap). Inside a card the group is `divided`: no gaps, one hairline between items, and no side padding, so each row's media and words start on the card's content edge under its title, as a table's first column does. An item that is an `a`, a `button` or a `label` takes the `accent` hover and is one hit target; a plain item never reacts to hover; nested controls stay independent. An `xs` item inside a menu or a combobox option takes the option's padding and adds none. A button in the row is `size="sm"` (32 px). A row a person picks starts with `ItemSelect` and is drawn `render={<label />}`, so the whole row ticks its box and has no other control. A second content beside the first takes only the room its words need. Colour is neutral: the title in ink, the description and any trailing words muted, no hue.
31
31
  * “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity)
32
32
  * Ours: the third control goes in the row's three dots.
33
33
  * “Render the Skeleton variant (`entity-with-skeleton`) during load instead of an empty row, and swap to real content once data resolves.” (https://vercel.com/geist/entity)
@@ -22,7 +22,7 @@ function ItemGroup({ className, divided = false, render, ...props }) {
22
22
  function ItemSeparator({ className, ...props }) {
23
23
  return (_jsx(Separator, { "data-slot": "item-separator", orientation: "horizontal", className: cn("my-2", className), ...props, "aria-hidden": "true", role: "presentation" }));
24
24
  }
25
- const itemVariants = cva("nc-transition-paint group/item flex w-full flex-wrap items-center rounded-sm border text-sm in-data-divided:rounded-none in-data-divided:border-0 [a]:transition-colors [a]:hover:bg-accent [label]:cursor-pointer [label]:transition-colors [label]:hover:bg-accent [button]:transition-colors [button]:text-left [button]:enabled:hover:bg-accent [button]:disabled:opacity-50", {
25
+ const itemVariants = cva("nc-transition-paint group/item flex w-full flex-wrap items-center rounded-sm border text-sm in-data-divided:rounded-none in-data-divided:border-0 in-data-divided:px-0 [a]:transition-colors [a]:hover:bg-accent [label]:cursor-pointer [label]:transition-colors [label]:hover:bg-accent [button]:transition-colors [button]:text-left [button]:enabled:hover:bg-accent [button]:disabled:opacity-50", {
26
26
  variants: {
27
27
  variant: {
28
28
  default: "border-transparent",
@@ -48,7 +48,7 @@ const itemVariants = cva("nc-transition-paint group/item flex w-full flex-wrap i
48
48
  * @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
49
49
  * “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
50
50
  * Ours: Geist's `Table` is a `DataTable` and its `Description` is `ObjectFacts`. An object a person opens, with a mark, facts and a status, is a `RecordList` row; the same row edited in place is a `RecordList` with an `editor`. A page whose job is one collection is `CollectionPage`. Agents in a gallery are `AgentListRow`; Library entries `CatalogEntry`.
51
- * @behaviour A list of descriptive rows is an `ItemGroup` of `Item`s, never table semantics. A row too narrow for its title beside its actions puts the actions under the title, so a name never squeezes to a few letters a line; `min-w-0` on `ItemContent` turns that off, for a row whose figures must stay on the title's line. Every row has a title over its one muted description line; only a message row read whole, or a second content beside the first, may be description only. Media, content and actions stand 16 px apart, centred on one another, in a 72 px row of 16 px padding; a 600 title stands over one 20 px description with no gap, and each holds one line and ends in an ellipsis (`whole` lets a message wrap). Inside a card the group is `divided`: no gaps, one hairline between items. An item that is an `a`, a `button` or a `label` takes the `accent` hover and is one hit target; a plain item never reacts to hover; nested controls stay independent. An `xs` item inside a menu or a combobox option takes the option's padding and adds none. A button in the row is `size="sm"` (32 px). A row a person picks starts with `ItemSelect` and is drawn `render={<label />}`, so the whole row ticks its box and has no other control. A second content beside the first takes only the room its words need. Colour is neutral: the title in ink, the description and any trailing words muted, no hue.
51
+ * @behaviour A list of descriptive rows is an `ItemGroup` of `Item`s, never table semantics. A row too narrow for its title beside its actions puts the actions under the title, so a name never squeezes to a few letters a line; `min-w-0` on `ItemContent` turns that off, for a row whose figures must stay on the title's line. Every row has a title over its one muted description line; only a message row read whole, or a second content beside the first, may be description only. Media, content and actions stand 16 px apart, centred on one another, in a 72 px row of 16 px padding; a 600 title stands over one 20 px description with no gap, and each holds one line and ends in an ellipsis (`whole` lets a message wrap). Inside a card the group is `divided`: no gaps, one hairline between items, and no side padding, so each row's media and words start on the card's content edge under its title, as a table's first column does. An item that is an `a`, a `button` or a `label` takes the `accent` hover and is one hit target; a plain item never reacts to hover; nested controls stay independent. An `xs` item inside a menu or a combobox option takes the option's padding and adds none. A button in the row is `size="sm"` (32 px). A row a person picks starts with `ItemSelect` and is drawn `render={<label />}`, so the whole row ticks its box and has no other control. A second content beside the first takes only the room its words need. Colour is neutral: the title in ink, the description and any trailing words muted, no hue.
52
52
  * “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity)
53
53
  * Ours: the third control goes in the row's three dots.
54
54
  * “Render the Skeleton variant (`entity-with-skeleton`) during load instead of an empty row, and swap to real content once data resolves.” (https://vercel.com/geist/entity)
@@ -43,11 +43,18 @@ type KpiCardProps = {
43
43
  * @family Charts
44
44
  * @when One figure a person checks at a glance: Active Agents, Spend, Tasks done, Need attention, in an overview's row of figures.
45
45
  * @instead A figure read over time is a `ChartCard`, and a single figure is never nested inside one. A ratio beside two money measures is a `KpiCard` next to the chart, never a second axis. A level against a cap is `Progress`.
46
- * @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. With `sparkline`, Vercel Observability's overview tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows. The line loads on demand: a streaming server render and the browser draw it once it has loaded, and a synchronous `renderToString` leaves its row empty.
46
+ * @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. The label keeps two lines, wrapped or not, and the value stands under them at the same height in either layout, so the values of a row sit level whichever layout each card takes. With `sparkline`, Vercel Observability's overview tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows. The line loads on demand: a streaming server render and the browser draw it once it has loaded, and a synchronous `renderToString` leaves its row empty. While its page reads the figure, `KpiCardSkeleton` stands in its place: the same small card, the label's two lines, the value's line and, with `footer`, the footer's line, with no words (nadicode decision).
47
47
  * @words The label names the measure in sentence case: "Active Agents", "Spend". The change is signed with a true minus and its unit ("+12.4%", "−1"), the comparison names the period: "vs 16 last week", "vs August 2026". No icon beside the label.
48
- * @access The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour.
48
+ * @access The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour. `KpiCardSkeleton` is busy and its bars are hidden from assistive technology.
49
49
  */
50
50
  declare function KpiCard({ label, value, delta, note, tone, render, presentation, sparkline, }: KpiCardProps): React.JSX.Element;
51
- export { KpiCard };
51
+ /**
52
+ * What stands in a KpiCard's place while its page reads the figure: the card, the label's two
53
+ * lines, the value's line and, for a figure with a comparison or a note, the footer's line.
54
+ */
55
+ declare function KpiCardSkeleton({ footer }: {
56
+ footer?: boolean;
57
+ }): React.JSX.Element;
58
+ export { KpiCard, KpiCardSkeleton };
52
59
  export type { KpiCardDelta, KpiCardDirection, KpiCardProps, KpiCardTone };
53
60
  //# sourceMappingURL=kpi-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kpi-card.d.ts","sourceRoot":"","sources":["../../src/components/kpi-card.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAW3D,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQtF,KAAK,gBAAgB,GAAG,cAAc,CAAC;AACvC,KAAK,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtD,KAAK,YAAY,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