@nadicodeai/ui 12.1.210 → 12.1.211

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 (125) 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/column-foot.d.ts +53 -0
  24. package/dist/components/column-foot.d.ts.map +1 -0
  25. package/dist/components/column-foot.js +32 -0
  26. package/dist/components/conversation-card.d.ts +38 -0
  27. package/dist/components/conversation-card.d.ts.map +1 -0
  28. package/dist/components/conversation-card.js +19 -0
  29. package/dist/components/data-table.d.ts +26 -21
  30. package/dist/components/data-table.d.ts.map +1 -1
  31. package/dist/components/data-table.js +34 -22
  32. package/dist/components/entry-page.d.ts +55 -0
  33. package/dist/components/entry-page.d.ts.map +1 -0
  34. package/dist/components/entry-page.js +41 -0
  35. package/dist/components/entry-scene.d.ts +1 -1
  36. package/dist/components/entry-scene.js +1 -1
  37. package/dist/components/filter-toolbar.d.ts +43 -0
  38. package/dist/components/filter-toolbar.d.ts.map +1 -0
  39. package/dist/components/filter-toolbar.js +44 -0
  40. package/dist/components/hive-scene.d.ts +4 -1
  41. package/dist/components/hive-scene.d.ts.map +1 -1
  42. package/dist/components/hive-scene.js +6 -1
  43. package/dist/components/kpi-card.d.ts +10 -3
  44. package/dist/components/kpi-card.d.ts.map +1 -1
  45. package/dist/components/kpi-card.js +11 -3
  46. package/dist/components/message-notice.d.ts +3 -3
  47. package/dist/components/message-notice.js +1 -1
  48. package/dist/components/notice-banner.d.ts +1 -1
  49. package/dist/components/notice-banner.js +1 -1
  50. package/dist/components/object-workspace.d.ts +25 -5
  51. package/dist/components/object-workspace.d.ts.map +1 -1
  52. package/dist/components/object-workspace.js +30 -7
  53. package/dist/components/page-actions.d.ts +0 -2
  54. package/dist/components/page-actions.d.ts.map +1 -1
  55. package/dist/components/page-actions.js +1 -5
  56. package/dist/components/page-frame.d.ts +38 -0
  57. package/dist/components/page-frame.d.ts.map +1 -0
  58. package/dist/components/page-frame.js +29 -0
  59. package/dist/components/place-count.d.ts +20 -0
  60. package/dist/components/place-count.d.ts.map +1 -0
  61. package/dist/components/place-count.js +16 -0
  62. package/dist/components/plan-card.d.ts +49 -0
  63. package/dist/components/plan-card.d.ts.map +1 -0
  64. package/dist/components/plan-card.js +22 -0
  65. package/dist/components/product-band.d.ts +20 -0
  66. package/dist/components/product-band.d.ts.map +1 -0
  67. package/dist/components/product-band.js +23 -0
  68. package/dist/components/product-shell.d.ts +314 -44
  69. package/dist/components/product-shell.d.ts.map +1 -1
  70. package/dist/components/product-shell.js +465 -36
  71. package/dist/components/reading-column.d.ts +1 -1
  72. package/dist/components/reading-column.js +1 -1
  73. package/dist/components/record-list.d.ts +19 -3
  74. package/dist/components/record-list.d.ts.map +1 -1
  75. package/dist/components/record-list.js +23 -8
  76. package/dist/components/record-time.d.ts +6 -2
  77. package/dist/components/record-time.d.ts.map +1 -1
  78. package/dist/components/record-time.js +8 -5
  79. package/dist/components/row-edit-form.d.ts +1 -1
  80. package/dist/components/row-edit-form.js +1 -1
  81. package/dist/components/scope-switcher.d.ts +3 -1
  82. package/dist/components/scope-switcher.d.ts.map +1 -1
  83. package/dist/components/scope-switcher.js +3 -6
  84. package/dist/components/settings-page.d.ts +3 -3
  85. package/dist/components/settings-page.js +3 -3
  86. package/dist/components/settings-section.d.ts +18 -4
  87. package/dist/components/settings-section.d.ts.map +1 -1
  88. package/dist/components/settings-section.js +12 -4
  89. package/dist/components/sidebar-sections.d.ts.map +1 -1
  90. package/dist/components/sidebar-sections.js +4 -4
  91. package/dist/components/sidebar.d.ts +27 -5
  92. package/dist/components/sidebar.d.ts.map +1 -1
  93. package/dist/components/sidebar.js +55 -23
  94. package/dist/components/table-card.d.ts.map +1 -1
  95. package/dist/components/table-card.js +2 -1
  96. package/dist/components/toast.d.ts +10 -1
  97. package/dist/components/toast.d.ts.map +1 -1
  98. package/dist/components/toast.js +24 -1
  99. package/dist/index.d.ts +5 -0
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +5 -0
  102. package/dist/internal/button-classes.d.ts +2 -0
  103. package/dist/internal/button-classes.d.ts.map +1 -1
  104. package/dist/internal/button-classes.js +54 -46
  105. package/dist/internal/card-actions.d.ts +3 -0
  106. package/dist/internal/card-actions.d.ts.map +1 -0
  107. package/dist/internal/card-actions.js +4 -0
  108. package/dist/internal/footer-strip.d.ts.map +1 -1
  109. package/dist/internal/footer-strip.js +3 -1
  110. package/dist/lib/product-shell.d.ts +20 -0
  111. package/dist/lib/product-shell.d.ts.map +1 -0
  112. package/dist/lib/product-shell.js +19 -0
  113. package/dist/showcase/specimens/compositions.d.ts +15 -0
  114. package/dist/showcase/specimens/compositions.d.ts.map +1 -1
  115. package/dist/showcase/specimens/compositions.js +70 -0
  116. package/dist/showcase/specimens/index.d.ts +11 -0
  117. package/dist/showcase/specimens/index.d.ts.map +1 -1
  118. package/dist/showcase/specimens/navigation.d.ts +4 -0
  119. package/dist/showcase/specimens/navigation.d.ts.map +1 -1
  120. package/dist/showcase/specimens/navigation.js +26 -1
  121. package/dist/showcase/usage.generated.d.ts +1 -1
  122. package/dist/showcase/usage.generated.d.ts.map +1 -1
  123. package/dist/showcase/usage.generated.js +159 -38
  124. package/dist/styles/components.css +12 -0
  125. package/package.json +6 -2
@@ -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 stand on the line under it (`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,g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SyncExternalStore } 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 stand on the line under it (`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.ts","sourceRoot":"","sources":["../../src/components/hive-scene.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,MAAM,SAAS,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,6DAA6D;AAC7D,MAAM,MAAM,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnF,mFAAmF;AACnF,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,SAAS,SAAS,EAAE,CAAC;IAC9B,SAAS,EAAE,SAAS,SAAS,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,cAAc,G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IAClD,iEAAiE;IACjE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AA4LF;;;;;;;;;;;;;;GAcG;AACH,iBAAS,SAAS,CAAC,EACjB,IAAI,EACJ,MAAkB,EAClB,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,MAAM,EACN,KAAK,EACL,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,qBA8QhB;AAED,2DAA2D;AAC3D,iBAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,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 };
@@ -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. 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,EA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EAChB,MAAM,EACN,YAAqB,EACrB,SAAS,GACV,EAAE,YAAY,qBA0Hd;AAED;;;GAGG;AACH,iBAAS,eAAe,CAAC,EAAE,MAAc,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,qBAoBhE;AAED,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -6,6 +6,7 @@ import * as React from "react";
6
6
  import { ChevronRight } from "lucide-react";
7
7
  import { cn } from "../lib/utils.js";
8
8
  import { Card, CardAction, CardDescription, CardFooter, CardHeader, CardTitle, } from "./card.js";
9
+ import { Skeleton, SkeletonRegion } from "./skeleton.js";
9
10
  import { TrendBadge, trendTone } from "./trend-badge.js";
10
11
  // The line is the only part of a card that needs the chart library, which a page of figures without
11
12
  // lines would otherwise load too; its row keeps its height while the line loads.
@@ -24,9 +25,9 @@ const VALUE_TONE_CLASS = {
24
25
  * @family Charts
25
26
  * @when One figure a person checks at a glance: Active Agents, Spend, Tasks done, Need attention, in an overview's row of figures.
26
27
  * @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`.
27
- * @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.
28
+ * @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. 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).
28
29
  * @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.
29
- * @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.
30
+ * @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.
30
31
  */
31
32
  function KpiCard({ label, value, delta, note, tone = "default", render, presentation = "card", sparkline, }) {
32
33
  if (presentation === "inline") {
@@ -39,4 +40,11 @@ function KpiCard({ label, value, delta, note, tone = "default", render, presenta
39
40
  }
40
41
  return (_jsxs(Card, { size: "sm", "data-slot": "kpi-card", "data-tone": tone, render: render, variant: render ? "link" : "default", children: [_jsxs(CardHeader, { children: [_jsxs(CardDescription, { className: "flex min-h-10 items-start gap-0.5", children: [_jsx("span", { className: "line-clamp-2", children: label }), render ? _jsx(ChevronRight, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0" }) : null] }), _jsx(CardTitle, { className: cn("text-heading-md tabular-nums group-data-[size=sm]/card:text-heading-md", VALUE_TONE_CLASS[tone]), "data-kpi-value": "", children: value }), delta ? _jsx(CardAction, { "data-kpi-delta": delta.direction, children: badge }) : null] }), delta || note ? (_jsx(CardFooter, { className: "flex-nowrap", children: _jsx("span", { className: "min-w-0 truncate", title: footerLine, children: footerLine }) })) : null] }));
41
42
  }
42
- export { KpiCard };
43
+ /**
44
+ * What stands in a KpiCard's place while its page reads the figure: the card, the label's two
45
+ * lines, the value's line and, for a figure with a comparison or a note, the footer's line.
46
+ */
47
+ function KpiCardSkeleton({ footer = false }) {
48
+ return (_jsx(SkeletonRegion, { busy: true, "data-slot": "kpi-card-skeleton", children: _jsxs(Card, { size: "sm", children: [_jsxs(CardHeader, { children: [_jsx(CardDescription, { className: "min-h-10", children: _jsx(Skeleton, { boxHeight: 20, className: "max-w-full", height: 16, width: 128 }) }), _jsx(CardTitle, { children: _jsx(Skeleton, { boxHeight: 32, height: 24, width: 96 }) })] }), footer ? (_jsx(CardFooter, { children: _jsx(Skeleton, { boxHeight: 20, height: 16, width: "100%" }) })) : null] }) }));
49
+ }
50
+ export { KpiCard, KpiCardSkeleton };
@@ -5,8 +5,8 @@ export type { MessageNoticeTone };
5
5
  /**
6
6
  * A message where it changes the reader's decision (DESIGN.md "Elevation &
7
7
  * Depth", the notice paragraph):
8
- * - `action`: under the control whose write failed, as one passage with its
9
- * control beside it;
8
+ * - `action`: beside the control whose write failed, as one passage: under a
9
+ * lone control, above the buttons of a footer;
10
10
  * - `section`: at the top of the section it concerns, framed, for a condition
11
11
  * that lasts.
12
12
  */
@@ -29,7 +29,7 @@ export type MessageNoticeProps = {
29
29
  * A catalogue message about one thing on the screen.
30
30
  *
31
31
  * @family Feedback
32
- * @when "Display text that requires attention or provides additional information." (https://vercel.com/geist/note) "Use a Note for inline contextual feedback next to the field, card, or section it describes: a region change warning above a region picker, a rate-limit notice next to a usage gauge." (https://vercel.com/geist/note) "Choose `variant` by meaning: `error` for a problem the user must fix, `warning` for a consequence to acknowledge, `success` for a passed check, `secondary` for neutral information." (https://vercel.com/geist/note) Ours: a message beside the field, card or section it describes, under the control whose write failed (`action`), or atop the section whose condition lasts (`section`). The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` (a passed check or a state the product manages for the reader, drawn in the accent blue) and `neutral` is `secondary`; there is no violet or cyan.
32
+ * @when "Display text that requires attention or provides additional information." (https://vercel.com/geist/note) "Use a Note for inline contextual feedback next to the field, card, or section it describes: a region change warning above a region picker, a rate-limit notice next to a usage gauge." (https://vercel.com/geist/note) "Choose `variant` by meaning: `error` for a problem the user must fix, `warning` for a consequence to acknowledge, `success` for a passed check, `secondary` for neutral information." (https://vercel.com/geist/note) Ours: a message beside the field, card or section it describes, beside the control whose write failed (`action`: under a lone control, above the buttons of a footer, as a settings card's failed save stands above its Save), or atop the section whose condition lasts (`section`). The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` (a passed check or a state the product manages for the reader, drawn in the accent blue) and `neutral` is `secondary`; there is no violet or cyan.
33
33
  * @instead "Pick `Banner` when the message is page-level or system-wide and needs a CTA, `Toast` for transient acknowledgments, `Modal` for destructive confirmations." (https://vercel.com/geist/note) Ours: `Banner` is `NoticeBanner`, for a condition of the page's own object, and a system-wide condition is a notification in the product's inbox, never a banner; `Toast` is `showMessageToast` and `Modal` is `ConfirmDialog`. For a field's wrong value use `FieldError`. For a failed read use `EmptyState failed`.
34
34
  * @behaviour "A Note is persistent until the underlying state changes; don’t add an ad hoc dismiss control because it competes with the message." (https://vercel.com/geist/note) "One Note per concept. Stacking three Notes on a card means the page architecture, not the Note copy, is wrong." (https://vercel.com/geist/note) "The optional `NoteAction` holds a single inline CTA. Don’t pair it with a second button." (https://vercel.com/geist/note) Ours: `Alert` is its primitive. Tone `destructive` by default, `warning`, `info` or `neutral`; there is no `success` tone. Colour sits on the line, the text and the mark; the ground stays clear, and the action stays neutral. `section` is the framed note, a line 36 px high with its mark and sentence on one row and the action at its trailing edge (under 768 px the action takes its own row, full width), with or without an action; `action` is the unframed passage, its mark and sentence on one row with the action link inside the sentence, after a space. The title and the body run on as one passage, the title closed by a full stop when it has none of its own, so the two never read as one sentence; the title leads in bold (semibold in a note, medium in a passage) only when a body follows it, and stands at regular weight alone. A message worded for a notice has one action, a small default button in a section and an underlined 14 px link in the passage, and at most a second one after it (Nadia's *Ask Nadia* after *Try again*), an outline button in a section and a second link in the passage; a third is not shown. A section can draw the host's own `controls` in the action's place instead, such as a carried tree's buttons that keep their behaviour. Long words wrap, nothing truncates. A successful retry removes it. Required: the catalogue `message`, so the sentence and its mark are always drawn.
35
35
  * @words "`NoteLabel` is a 1–2 word Title Case prefix that names the topic: `Region Change`, `Rate Limit`, `Plan Limit`. Cut hedges like `Heads Up`, `FYI`, and `Note`." (https://vercel.com/geist/note) "`NoteContent` is one sentence in active voice that names the impact: `Changing this region restarts all functions.`" (https://vercel.com/geist/note) "No `variant="info"` exists; omit `variant` for the default info icon or use `variant="secondary"` for neutral copy." (https://vercel.com/geist/note) "Single-fragment labels take no period; full descriptive sentences in the body do." (https://vercel.com/geist/note) Ours: words come from the catalogue only. The message's title stands in for `NoteLabel` and `NoteContent`, in sentence case, and `info` exists as Geist's blue `success`. The action is labelled with its result: *Try again*, *Sign in*. When the message carries an action, its body does not repeat it: the link is the step, so the body ends before "Try again".
@@ -17,7 +17,7 @@ const LEAD = { action: "font-medium", section: "font-semibold" };
17
17
  * A catalogue message about one thing on the screen.
18
18
  *
19
19
  * @family Feedback
20
- * @when "Display text that requires attention or provides additional information." (https://vercel.com/geist/note) "Use a Note for inline contextual feedback next to the field, card, or section it describes: a region change warning above a region picker, a rate-limit notice next to a usage gauge." (https://vercel.com/geist/note) "Choose `variant` by meaning: `error` for a problem the user must fix, `warning` for a consequence to acknowledge, `success` for a passed check, `secondary` for neutral information." (https://vercel.com/geist/note) Ours: a message beside the field, card or section it describes, under the control whose write failed (`action`), or atop the section whose condition lasts (`section`). The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` (a passed check or a state the product manages for the reader, drawn in the accent blue) and `neutral` is `secondary`; there is no violet or cyan.
20
+ * @when "Display text that requires attention or provides additional information." (https://vercel.com/geist/note) "Use a Note for inline contextual feedback next to the field, card, or section it describes: a region change warning above a region picker, a rate-limit notice next to a usage gauge." (https://vercel.com/geist/note) "Choose `variant` by meaning: `error` for a problem the user must fix, `warning` for a consequence to acknowledge, `success` for a passed check, `secondary` for neutral information." (https://vercel.com/geist/note) Ours: a message beside the field, card or section it describes, beside the control whose write failed (`action`: under a lone control, above the buttons of a footer, as a settings card's failed save stands above its Save), or atop the section whose condition lasts (`section`). The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` (a passed check or a state the product manages for the reader, drawn in the accent blue) and `neutral` is `secondary`; there is no violet or cyan.
21
21
  * @instead "Pick `Banner` when the message is page-level or system-wide and needs a CTA, `Toast` for transient acknowledgments, `Modal` for destructive confirmations." (https://vercel.com/geist/note) Ours: `Banner` is `NoticeBanner`, for a condition of the page's own object, and a system-wide condition is a notification in the product's inbox, never a banner; `Toast` is `showMessageToast` and `Modal` is `ConfirmDialog`. For a field's wrong value use `FieldError`. For a failed read use `EmptyState failed`.
22
22
  * @behaviour "A Note is persistent until the underlying state changes; don’t add an ad hoc dismiss control because it competes with the message." (https://vercel.com/geist/note) "One Note per concept. Stacking three Notes on a card means the page architecture, not the Note copy, is wrong." (https://vercel.com/geist/note) "The optional `NoteAction` holds a single inline CTA. Don’t pair it with a second button." (https://vercel.com/geist/note) Ours: `Alert` is its primitive. Tone `destructive` by default, `warning`, `info` or `neutral`; there is no `success` tone. Colour sits on the line, the text and the mark; the ground stays clear, and the action stays neutral. `section` is the framed note, a line 36 px high with its mark and sentence on one row and the action at its trailing edge (under 768 px the action takes its own row, full width), with or without an action; `action` is the unframed passage, its mark and sentence on one row with the action link inside the sentence, after a space. The title and the body run on as one passage, the title closed by a full stop when it has none of its own, so the two never read as one sentence; the title leads in bold (semibold in a note, medium in a passage) only when a body follows it, and stands at regular weight alone. A message worded for a notice has one action, a small default button in a section and an underlined 14 px link in the passage, and at most a second one after it (Nadia's *Ask Nadia* after *Try again*), an outline button in a section and a second link in the passage; a third is not shown. A section can draw the host's own `controls` in the action's place instead, such as a carried tree's buttons that keep their behaviour. Long words wrap, nothing truncates. A successful retry removes it. Required: the catalogue `message`, so the sentence and its mark are always drawn.
23
23
  * @words "`NoteLabel` is a 1–2 word Title Case prefix that names the topic: `Region Change`, `Rate Limit`, `Plan Limit`. Cut hedges like `Heads Up`, `FYI`, and `Note`." (https://vercel.com/geist/note) "`NoteContent` is one sentence in active voice that names the impact: `Changing this region restarts all functions.`" (https://vercel.com/geist/note) "No `variant="info"` exists; omit `variant` for the default info icon or use `variant="secondary"` for neutral copy." (https://vercel.com/geist/note) "Single-fragment labels take no period; full descriptive sentences in the body do." (https://vercel.com/geist/note) Ours: words come from the catalogue only. The message's title stands in for `NoteLabel` and `NoteContent`, in sentence case, and `info` exists as Geist's blue `success`. The action is labelled with its result: *Try again*, *Sign in*. When the message carries an action, its body does not repeat it: the link is the step, so the body ends before "Try again".
@@ -25,7 +25,7 @@ export type NoticeBannerProps = {
25
25
  * A condition of the page's own object, with the fix the page offers.
26
26
  *
27
27
  * @family Feedback
28
- * @when "A prominent message that spans the full width of its container to announce important information." (https://vercel.com/geist/banner) "Used for temporary, project-wide notifications that require resolution" (https://vercel.com/geist/project-banner) "Use Project Banner for project-wide states that need resolution: overdue billing, an active rollback, attack mitigation, an expiring trial blocking deploys." (https://vercel.com/geist/project-banner) "Match `variant` to severity: `error` for critical downtime or payment-blocking states, `warning` for an exceptional state with non-immediate action, `success` for a positive temporary mitigation, `gray` for routine project-wide notices." (https://vercel.com/geist/project-banner) Ours: a condition of the page's own object that the page itself resolves, with that resolving action on the banner: a past-due subscription on its billing page, a failed refresh of the page's own reading. The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` and `neutral` is `gray`. A page gives it to its composition's `notice` (`CollectionPage`, `ObjectPage`, `OverviewPage`, `SettingsPage`), which places it under the title; a product never renders it, which `nadicodeai/page-composition` refuses (nadicode decision).
28
+ * @when "A prominent message that spans the full width of its container to announce important information." (https://vercel.com/geist/banner) "Used for temporary, project-wide notifications that require resolution" (https://vercel.com/geist/project-banner) "Use Project Banner for project-wide states that need resolution: overdue billing, an active rollback, attack mitigation, an expiring trial blocking deploys." (https://vercel.com/geist/project-banner) "Match `variant` to severity: `error` for critical downtime or payment-blocking states, `warning` for an exceptional state with non-immediate action, `success` for a positive temporary mitigation, `gray` for routine project-wide notices." (https://vercel.com/geist/project-banner) Ours: a condition of the page's own object that the page itself resolves, with that resolving action on the banner: a past-due subscription on its billing page, a failed refresh of the page's own reading. The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` and `neutral` is `gray`. A page gives it to its composition's `notice` (`CollectionPage`, `ObjectPage`, `OverviewPage`, `SettingsPage`, a `DataTable` that is the page's job, and `EntryPage` outside the shell), which places it under the title; a product never renders it, which `nadicodeai/page-composition` refuses (nadicode decision).
29
29
  * @instead "Pick `Note` for inline contextual messages tied to a single field or card, `Toast` for transient acknowledgments, `Modal` for confirmations." (https://vercel.com/geist/project-banner) Ours: there is no announcement strip. `Note` is `MessageNotice` (`placement="section"`), `Toast` is `showMessageToast` and `Modal` is `ConfirmDialog`. For a measured level use a `KpiCard` with its tone; crossing a threshold is a notification in the inbox, not a banner. A condition of the system, the setup or the staff (a connection, a stored secret, a failing job, anything a staff member fixes in settings) is a notification in the product's inbox, never a banner on a page, and the page that fixes it shows the state in its own section: "The Vercel dashboard displays a popover, which contains all relevant notifications" (https://vercel.com/docs/notifications), and the Portal's System health raises it through Knock to the bell at the sidebar's foot.
30
30
  * @behaviour "Project Banner is non-dismissible by design. If the message can be dismissed without resolving the underlying state, it isn’t banner-worthy; move it to a `Note`." (https://vercel.com/geist/project-banner) "Show one Project Banner at a time. Stacking competing banners drowns the most urgent state." (https://vercel.com/geist/project-banner) "Always pass a `callToAction` that resolves the state. A banner with no route is a dead end." (https://vercel.com/geist/project-banner) Ours: a strip as wide as its container: a filled ground with a line on its top and bottom edge only, no corners, 40 px high and centred, with the mark, the sentence and the fix on one row; under 768 px the fix drops under the sentence, aligned with its text. The title and the description run on as one passage: the title closed by a full stop when it has none of its own, leading in semibold when a description follows and at regular weight alone, the description after it on the same line, and a description that repeats the title not shown. `detail` takes its own row under the passage. Colour sits on the whole strip (ground, both lines, mark and text); the fix is an underlined link in the darkest step of the same hue (neutral: `text-foreground`) and returns to the strip's text on hover. Neutral and info take the Info mark, warning and destructive the TriangleAlert. `action` is the `callToAction`: one command, never two, never a ready-made button, and there is no close button. Required: `action`, `title`, `tone` and `liveRegion`; the mark is always drawn, and `icon` swaps the tone's mark for another lucide icon.
31
31
  * @words "`label` is one sentence in sentence case that names the impact: `Your Pro trial expires in 3 days.` Don’t open with `Heads up` or apologetic preambles." (https://vercel.com/geist/project-banner) "`callToAction.label` is Title Case `Verb + Noun` and points at the resolver: `Update Payment Method`, `Reactivate Project`, `Review Tokens`." (https://vercel.com/geist/project-banner) "Name the affected entity when the project context isn’t obvious from the surrounding chrome (`Production deployments are paused on my-project`)." (https://vercel.com/geist/project-banner) "Don’t encode severity in the copy with emoji or interjections; the variant carries that signal." (https://vercel.com/geist/project-banner) "`NoteLabel` is a 1–2 word Title Case prefix that names the topic: `Region Change`, `Rate Limit`, `Plan Limit`. Cut hedges like `Heads Up`, `FYI`, and `Note`." (https://vercel.com/geist/note) Ours: the `title` is the `label`: the one sentence, naming the condition, its impact and the object. A `description` only adds what the title leaves out, in one more sentence. Our `label` is the `NoteLabel` topic prefix. The action is sentence case, verb and noun, pointing at the resolver: "Update payment method", "Try again". No "Please". The words come from the product's catalogue code.
@@ -9,7 +9,7 @@ const LIVE_REGION_ROLE = { assertive: "alert", polite: "status", off: "note" };
9
9
  * A condition of the page's own object, with the fix the page offers.
10
10
  *
11
11
  * @family Feedback
12
- * @when "A prominent message that spans the full width of its container to announce important information." (https://vercel.com/geist/banner) "Used for temporary, project-wide notifications that require resolution" (https://vercel.com/geist/project-banner) "Use Project Banner for project-wide states that need resolution: overdue billing, an active rollback, attack mitigation, an expiring trial blocking deploys." (https://vercel.com/geist/project-banner) "Match `variant` to severity: `error` for critical downtime or payment-blocking states, `warning` for an exceptional state with non-immediate action, `success` for a positive temporary mitigation, `gray` for routine project-wide notices." (https://vercel.com/geist/project-banner) Ours: a condition of the page's own object that the page itself resolves, with that resolving action on the banner: a past-due subscription on its billing page, a failed refresh of the page's own reading. The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` and `neutral` is `gray`. A page gives it to its composition's `notice` (`CollectionPage`, `ObjectPage`, `OverviewPage`, `SettingsPage`), which places it under the title; a product never renders it, which `nadicodeai/page-composition` refuses (nadicode decision).
12
+ * @when "A prominent message that spans the full width of its container to announce important information." (https://vercel.com/geist/banner) "Used for temporary, project-wide notifications that require resolution" (https://vercel.com/geist/project-banner) "Use Project Banner for project-wide states that need resolution: overdue billing, an active rollback, attack mitigation, an expiring trial blocking deploys." (https://vercel.com/geist/project-banner) "Match `variant` to severity: `error` for critical downtime or payment-blocking states, `warning` for an exceptional state with non-immediate action, `success` for a positive temporary mitigation, `gray` for routine project-wide notices." (https://vercel.com/geist/project-banner) Ours: a condition of the page's own object that the page itself resolves, with that resolving action on the banner: a past-due subscription on its billing page, a failed refresh of the page's own reading. The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` and `neutral` is `gray`. A page gives it to its composition's `notice` (`CollectionPage`, `ObjectPage`, `OverviewPage`, `SettingsPage`, a `DataTable` that is the page's job, and `EntryPage` outside the shell), which places it under the title; a product never renders it, which `nadicodeai/page-composition` refuses (nadicode decision).
13
13
  * @instead "Pick `Note` for inline contextual messages tied to a single field or card, `Toast` for transient acknowledgments, `Modal` for confirmations." (https://vercel.com/geist/project-banner) Ours: there is no announcement strip. `Note` is `MessageNotice` (`placement="section"`), `Toast` is `showMessageToast` and `Modal` is `ConfirmDialog`. For a measured level use a `KpiCard` with its tone; crossing a threshold is a notification in the inbox, not a banner. A condition of the system, the setup or the staff (a connection, a stored secret, a failing job, anything a staff member fixes in settings) is a notification in the product's inbox, never a banner on a page, and the page that fixes it shows the state in its own section: "The Vercel dashboard displays a popover, which contains all relevant notifications" (https://vercel.com/docs/notifications), and the Portal's System health raises it through Knock to the bell at the sidebar's foot.
14
14
  * @behaviour "Project Banner is non-dismissible by design. If the message can be dismissed without resolving the underlying state, it isn’t banner-worthy; move it to a `Note`." (https://vercel.com/geist/project-banner) "Show one Project Banner at a time. Stacking competing banners drowns the most urgent state." (https://vercel.com/geist/project-banner) "Always pass a `callToAction` that resolves the state. A banner with no route is a dead end." (https://vercel.com/geist/project-banner) Ours: a strip as wide as its container: a filled ground with a line on its top and bottom edge only, no corners, 40 px high and centred, with the mark, the sentence and the fix on one row; under 768 px the fix drops under the sentence, aligned with its text. The title and the description run on as one passage: the title closed by a full stop when it has none of its own, leading in semibold when a description follows and at regular weight alone, the description after it on the same line, and a description that repeats the title not shown. `detail` takes its own row under the passage. Colour sits on the whole strip (ground, both lines, mark and text); the fix is an underlined link in the darkest step of the same hue (neutral: `text-foreground`) and returns to the strip's text on hover. Neutral and info take the Info mark, warning and destructive the TriangleAlert. `action` is the `callToAction`: one command, never two, never a ready-made button, and there is no close button. Required: `action`, `title`, `tone` and `liveRegion`; the mark is always drawn, and `icon` swaps the tone's mark for another lucide icon.
15
15
  * @words "`label` is one sentence in sentence case that names the impact: `Your Pro trial expires in 3 days.` Don’t open with `Heads up` or apologetic preambles." (https://vercel.com/geist/project-banner) "`callToAction.label` is Title Case `Verb + Noun` and points at the resolver: `Update Payment Method`, `Reactivate Project`, `Review Tokens`." (https://vercel.com/geist/project-banner) "Name the affected entity when the project context isn’t obvious from the surrounding chrome (`Production deployments are paused on my-project`)." (https://vercel.com/geist/project-banner) "Don’t encode severity in the copy with emoji or interjections; the variant carries that signal." (https://vercel.com/geist/project-banner) "`NoteLabel` is a 1–2 word Title Case prefix that names the topic: `Region Change`, `Rate Limit`, `Plan Limit`. Cut hedges like `Heads Up`, `FYI`, and `Note`." (https://vercel.com/geist/note) Ours: the `title` is the `label`: the one sentence, naming the condition, its impact and the object. A `description` only adds what the title leaves out, in one more sentence. Our `label` is the `NoteLabel` topic prefix. The action is sentence case, verb and noun, pointing at the resolver: "Update payment method", "Try again". No "Please". The words come from the product's catalogue code.
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from "react";
1
+ import { type ReactElement, type ReactNode } from "react";
2
2
  import { type CardActions, type PageCommand } from "./page-actions.js";
3
3
  type ObjectFactShape = {
4
4
  label: string;
@@ -20,6 +20,13 @@ export type ObjectFact = ObjectFactShape & ({
20
20
  /** A value that ends in an ellipsis on one line instead of wrapping; a string value is also whole in its title. Not available on a `block` fact. */
21
21
  ellipsis?: boolean;
22
22
  });
23
+ /** The way back to the list a section's record was chosen from, with nothing chosen. */
24
+ export type ObjectSectionBack = {
25
+ /** Names where it leads: "Back to statements". */
26
+ label: string;
27
+ /** The product's router link, such as `<Link href="/statements" />`. */
28
+ link: ReactElement;
29
+ };
23
30
  /** A card's footer: one muted sentence at its start and the card's one command at its end. */
24
31
  export type CardFooterLine = {
25
32
  hint: string;
@@ -34,21 +41,34 @@ export type CardFooterLine = {
34
41
  * @family Compositions
35
42
  * @when A part of an ObjectPage a person reads or changes on its own: a customer's Company details, an Agent's Instructions, a Library entry's source, a Partner's services in Billing. Also a setup card on an overview, its body the `NumberedSteps` a person follows, as Vercel's Speed Insights *Get Started*: the Dashboard's setup guide; and a card among a person's settings that holds no setting, such as their nadicode card on Profile.
36
43
  * @instead Values a person edits and saves together are a SettingsSection; a list of the object's records is a RecordList with its heading; a passing condition is a MessageNotice.
37
- * @behaviour As Vercel's Spend Management, Payment Method and AI Gateway Credit cards on its Billing page: a resting card, its title and the one-sentence description directly under it, both always given; at the header's trailing edge `actions`, drawn as every card's header draws them (`CardActions`: the muted `meta`, then up to two secondaries as outline buttons, the primary as the filled one, then the three dots), so a way to another page is a secondary with its `link`, an outline button named for the page, never a text link; then its body; then the optional `footer`, a strip under a divider with its sentence at the start and its one command at the end as an outline button. No icon in the header. Neutral throughout. A section that edits in place swaps to the same section as a `SettingsSection`, with Cancel (`save.cancel`) before Save.
38
- * @words The title names what the section holds ("Company", "Instructions"); the description says in one sentence what it holds or lets a person change; a command is a verb on it ("Edit"), and a way to another page is that page's name ("Statements"); `meta` is a short count or time ("2 of 5 Agents"); the footer's sentence is a limit or where the section's object changes ("At most three cards.").
39
- * @access The title is a heading one level under the page (h2), deeper only under another heading through `headingLevel`.
44
+ * @behaviour `cardSize="sm"` draws the compact card, as `Card`'s `size`, for a section that stands beside fuller cards (nadicode decision). As Vercel's Spend Management, Payment Method and AI Gateway Credit cards on its Billing page: a resting card, its title and the one-sentence description directly under it, both always given; a `status` right after the title, as SettingsSection and TableCard place theirs ("Provisional"), makes the header one record's, as a Statement's cycle: the title at medium weight, and a lone `meta` in the caption's size that keeps the title's row on a narrow card (nadicode decision); at the header's trailing edge `actions`, drawn as every card's header draws them (`CardActions`: the muted `meta`, then up to two secondaries as outline buttons, the primary as the filled one, then the three dots), so a way to another page is a secondary with its `link`, an outline button named for the page, never a text link; then its body; then the optional `footer`, a strip under a divider with its sentence at the start and its one command at the end as an outline button. No icon in the header. Neutral throughout. A section that shows one record chosen from a list on the same page, such as an issued Statement opened from its history, takes `back`: the way to the list with nothing chosen, a quiet link with a leading arrow above the title, never a button among the `actions` (nadicode decision). A section that edits in place swaps to the same section as a `SettingsSection`, with Cancel (`save.cancel`) before Save. While its page reads it, `ObjectSectionSkeleton` stands in its place: the same card, bars for the title and the description at their line heights, then `rows` lines of the body, with no words (nadicode decision).
45
+ * @words The title names what the section holds ("Company", "Instructions"); the description says in one sentence what it holds or lets a person change; a command is a verb on it ("Edit"), and a way to another page is that page's name ("Statements"); `meta` is a short count or time ("2 of 5 Agents"); `back` says where it leads ("Back to statements"); the footer's sentence is a limit or where the section's object changes ("At most three cards.").
46
+ * @access The title is a heading one level under the page (h2), deeper only under another heading through `headingLevel`; a `status` stands beside it, outside it. `back` is a real link before the title in reading order. `ObjectSectionSkeleton` is busy and its bars are hidden from assistive technology.
40
47
  */
41
- export declare function ObjectSection({ title, description, actions, footer, children, headingLevel, }: {
48
+ export declare function ObjectSection({ title, status, description, actions, back, footer, children, headingLevel, cardSize, }: {
42
49
  title: string;
50
+ /** The state of what the section holds, as a `StatusBadge` right after the title: "Provisional". */
51
+ status?: ReactElement | undefined;
43
52
  /** The one sentence under the title that says what the section holds or changes. */
44
53
  description: NonNullable<ReactNode>;
45
54
  /** The section's commands at its header's trailing edge, a way to another page among them. */
46
55
  actions?: CardActions;
56
+ /** Above the title, the way back to the list this section's record was chosen from. */
57
+ back?: ObjectSectionBack | undefined;
47
58
  /** The strip under the body: a limit or where the object changes, and the one command after it. */
48
59
  footer?: CardFooterLine;
49
60
  children: ReactNode;
50
61
  /** A card titles a section of its page; nest it deeper only under another heading. */
51
62
  headingLevel?: 2 | 3 | 4;
63
+ /** The card's own density, as `Card`'s `size`: `sm` for a section that stands beside fuller cards. */
64
+ cardSize?: "default" | "sm";
65
+ }): import("react").JSX.Element;
66
+ /**
67
+ * What stands in an ObjectSection's place while its page reads it: its card, a bar for the title
68
+ * and one for the description, and `rows` lines of its body.
69
+ */
70
+ export declare function ObjectSectionSkeleton({ rows }: {
71
+ rows: number;
52
72
  }): import("react").JSX.Element;
53
73
  /**
54
74
  * An object's facts as labelled values in a grid, inside one of its sections.
@@ -1 +1 @@
1
- {"version":3,"file":"object-workspace.d.ts","sourceRoot":"","sources":["../../src/components/object-workspace.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAK9C,O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B,GACpB,EAAE;IACD,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,+BAyDA"}
1
+ {"version":3,"file":"object-workspace.d.ts","sourceRoot":"","sources":["../../src/components/object-workspace.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAMjE,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,WAAW,EAEjB,MAAM,gBAAgB,CAAC;AAKxB,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,gGAAgG;IAChG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,eAAe,GACtC,CACI;IACE;;;OAGG;IACH,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,GACD;IACE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,oJAAoJ;IACpJ,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CACJ,CAAC;AAEJ,wFAAwF;AACxF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAkBF,8FAA8F;AAC9F,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,WAAW,CAAA;CAAE,GACvC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE,CAAC;AAE5C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,MAAM,EACN,WAAW,EACX,OAAO,EACP,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,YAAgB,EAChB,QAAoB,GACrB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,oGAAoG;IACpG,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IAClC,oFAAoF;IACpF,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACpC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,uFAAuF;IACvF,IAAI,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACrC,mGAAmG;IACnG,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,sFAAsF;IACtF,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CAC7B,+BA+CA;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,+BAoB/D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAmB,GACpB,EAAE;IACD,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,+BAyDA"}
@@ -1,23 +1,46 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Info } from "lucide-react";
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 { ArrowLeft, Info } from "lucide-react";
3
4
  import { useId } from "react";
4
5
  import { cn } from "../lib/utils.js";
6
+ import { hasCardActions } from "../internal/card-actions.js";
5
7
  import { FooterStrip } from "../internal/footer-strip.js";
6
8
  import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "./card.js";
7
9
  import { CardActionsRow, PageCommandButton, } from "./page-actions.js";
10
+ import { textLinkVariants } from "./text-link.js";
11
+ import { Skeleton, SkeletonRegion } from "./skeleton.js";
8
12
  import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
13
+ function BackLink({ label, link }) {
14
+ return useRender({
15
+ defaultTagName: "a",
16
+ render: link,
17
+ props: {
18
+ className: textLinkVariants({ kind: "quiet" }),
19
+ children: (_jsxs(_Fragment, { children: [_jsx(ArrowLeft, { "aria-hidden": "true" }), label] })),
20
+ },
21
+ });
22
+ }
9
23
  /**
10
24
  * A section of an object's page: a card that owns one decision about the object.
11
25
  *
12
26
  * @family Compositions
13
27
  * @when A part of an ObjectPage a person reads or changes on its own: a customer's Company details, an Agent's Instructions, a Library entry's source, a Partner's services in Billing. Also a setup card on an overview, its body the `NumberedSteps` a person follows, as Vercel's Speed Insights *Get Started*: the Dashboard's setup guide; and a card among a person's settings that holds no setting, such as their nadicode card on Profile.
14
28
  * @instead Values a person edits and saves together are a SettingsSection; a list of the object's records is a RecordList with its heading; a passing condition is a MessageNotice.
15
- * @behaviour As Vercel's Spend Management, Payment Method and AI Gateway Credit cards on its Billing page: a resting card, its title and the one-sentence description directly under it, both always given; at the header's trailing edge `actions`, drawn as every card's header draws them (`CardActions`: the muted `meta`, then up to two secondaries as outline buttons, the primary as the filled one, then the three dots), so a way to another page is a secondary with its `link`, an outline button named for the page, never a text link; then its body; then the optional `footer`, a strip under a divider with its sentence at the start and its one command at the end as an outline button. No icon in the header. Neutral throughout. A section that edits in place swaps to the same section as a `SettingsSection`, with Cancel (`save.cancel`) before Save.
16
- * @words The title names what the section holds ("Company", "Instructions"); the description says in one sentence what it holds or lets a person change; a command is a verb on it ("Edit"), and a way to another page is that page's name ("Statements"); `meta` is a short count or time ("2 of 5 Agents"); the footer's sentence is a limit or where the section's object changes ("At most three cards.").
17
- * @access The title is a heading one level under the page (h2), deeper only under another heading through `headingLevel`.
29
+ * @behaviour `cardSize="sm"` draws the compact card, as `Card`'s `size`, for a section that stands beside fuller cards (nadicode decision). As Vercel's Spend Management, Payment Method and AI Gateway Credit cards on its Billing page: a resting card, its title and the one-sentence description directly under it, both always given; a `status` right after the title, as SettingsSection and TableCard place theirs ("Provisional"), makes the header one record's, as a Statement's cycle: the title at medium weight, and a lone `meta` in the caption's size that keeps the title's row on a narrow card (nadicode decision); at the header's trailing edge `actions`, drawn as every card's header draws them (`CardActions`: the muted `meta`, then up to two secondaries as outline buttons, the primary as the filled one, then the three dots), so a way to another page is a secondary with its `link`, an outline button named for the page, never a text link; then its body; then the optional `footer`, a strip under a divider with its sentence at the start and its one command at the end as an outline button. No icon in the header. Neutral throughout. A section that shows one record chosen from a list on the same page, such as an issued Statement opened from its history, takes `back`: the way to the list with nothing chosen, a quiet link with a leading arrow above the title, never a button among the `actions` (nadicode decision). A section that edits in place swaps to the same section as a `SettingsSection`, with Cancel (`save.cancel`) before Save. While its page reads it, `ObjectSectionSkeleton` stands in its place: the same card, bars for the title and the description at their line heights, then `rows` lines of the body, with no words (nadicode decision).
30
+ * @words The title names what the section holds ("Company", "Instructions"); the description says in one sentence what it holds or lets a person change; a command is a verb on it ("Edit"), and a way to another page is that page's name ("Statements"); `meta` is a short count or time ("2 of 5 Agents"); `back` says where it leads ("Back to statements"); the footer's sentence is a limit or where the section's object changes ("At most three cards.").
31
+ * @access The title is a heading one level under the page (h2), deeper only under another heading through `headingLevel`; a `status` stands beside it, outside it. `back` is a real link before the title in reading order. `ObjectSectionSkeleton` is busy and its bars are hidden from assistive technology.
32
+ */
33
+ export function ObjectSection({ title, status, description, actions, back, footer, children, headingLevel = 2, cardSize = "default", }) {
34
+ const loneMeta = Boolean(actions?.meta) && !hasCardActions({ ...actions, meta: undefined });
35
+ const header = (_jsxs(CardHeader, { className: status ? "[&_[data-slot=card-actions-meta]]:text-caption" : undefined, narrowAction: status && loneMeta ? "title-row" : undefined, children: [status ? (_jsxs(CardTitle, { className: "flex flex-wrap items-center gap-2 font-medium", children: [_jsx("span", { role: "heading", "aria-level": headingLevel, children: title }), status] })) : (_jsx(CardTitle, { role: "heading", "aria-level": headingLevel, children: title })), _jsx(CardDescription, { children: description }), actions ? (_jsx(CardAction, { children: _jsx(CardActionsRow, { ...actions }) })) : null] }));
36
+ return (_jsxs(Card, { "data-slot": "object-section", size: cardSize, children: [back ? (_jsxs("div", { className: "grid min-w-0 gap-2", children: [_jsx("div", { className: "px-(--card-spacing)", children: _jsx(BackLink, { ...back }) }), header] })) : (header), _jsx(CardContent, { children: children }), footer ? (_jsx(FooterStrip, { hint: footer.hint, hintSlot: "object-section-hint", children: footer.command ? _jsx(PageCommandButton, { command: footer.command, variant: "outline" }) : null })) : null] }));
37
+ }
38
+ /**
39
+ * What stands in an ObjectSection's place while its page reads it: its card, a bar for the title
40
+ * and one for the description, and `rows` lines of its body.
18
41
  */
19
- export function ObjectSection({ title, description, actions, footer, children, headingLevel = 2, }) {
20
- return (_jsxs(Card, { "data-slot": "object-section", children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { role: "heading", "aria-level": headingLevel, children: title }), _jsx(CardDescription, { children: description }), actions ? (_jsx(CardAction, { children: _jsx(CardActionsRow, { ...actions }) })) : null] }), _jsx(CardContent, { children: children }), footer ? (_jsx(FooterStrip, { hint: footer.hint, hintSlot: "object-section-hint", children: footer.command ? _jsx(PageCommandButton, { command: footer.command, variant: "outline" }) : null })) : null] }));
42
+ export function ObjectSectionSkeleton({ rows }) {
43
+ return (_jsx(SkeletonRegion, { busy: true, "data-slot": "object-section-skeleton", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: _jsx(Skeleton, { boxHeight: 26, className: "max-w-full", height: 20, width: 160 }) }), _jsx(CardDescription, { children: _jsx(Skeleton, { boxHeight: 20, className: "max-w-full", height: 16, width: 288 }) })] }), _jsx(CardContent, { className: "flex flex-col gap-3", children: Array.from({ length: rows }, (_, row) => (_jsx(Skeleton, { className: "h-4 w-full" }, row))) })] }) }));
21
44
  }
22
45
  /**
23
46
  * An object's facts as labelled values in a grid, inside one of its sections.
@@ -45,8 +45,6 @@ export type CardActions = Omit<PageActionsProps, "secondary"> & {
45
45
  * @access DOM order is visual order. A command whose label does not name its target carries `accessibleName`. A way to another page is a real link.
46
46
  */
47
47
  export declare function CardActionsRow({ meta, period, secondary, primary, menu }: CardActions): import("react").JSX.Element | null;
48
- /** Whether a card's header has anything of `actions` to draw, so it keeps no empty cell for them. */
49
- export declare function hasCardActions({ meta, period, secondary, primary, menu }: CardActions): boolean;
50
48
  export declare function PageCommandButton({ command, ...appearance }: CommandLook & {
51
49
  command: PagePrimaryCommand;
52
50
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"page-actions.d.ts","sourceRoot":"","sources":["../../src/components/page-actions.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAKf,OAAO,EAEL,KAAK,WAAW,EAEhB,KAAK,WAAW,EAChB,KAAK,eAAe,EAGrB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAI/E,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElG;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG;IACjD,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,kBAAkB,CAAC;AAElE,uEAAuE;AACvE,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC;AAElC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,qGAAqG;I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,CAAC;IAC1B,SAAS,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,SAAS,CAAC;CAC3E,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,WAAW,sCAkBrF;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,GAAG,UAAU,EACd,EAAE,WAAW,GAAG;IAAE,OAAO,EAAE,kBAAkB,CAAA;CAAE,+BAG/C;AAwCD,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,gBAAgB,sCAUpF;AAyCD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,MAAa,GACd,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,+BAIA;AAED,uGAAuG;AACvG,wBAAgB,aAAa,IAAI,OAAO,CAGvC;AAED,yFAAyF;AACzF,wBAAgB,eAAe,gCAS9B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,sCA6BlD"}
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { createContext, useContext, useEffect, useId, useLayoutEffect, useState, } from "react";
4
4
  import { createPortal } from "react-dom";
5
5
  import { createStore, useStore } from "zustand";
6
+ import { hasCardActions } from "../internal/card-actions.js";
6
7
  import { useCommandRunner } from "../internal/command-runner.js";
7
8
  import { lookOf, PageCommandButton as PlainCommandButton, WithDisabledReason, } from "../internal/page-command-button.js";
8
9
  import { MenuCommandRow } from "../internal/record-menu-items.js";
@@ -25,11 +26,6 @@ export function CardActionsRow({ meta, period, secondary, primary, menu }) {
25
26
  const secondaries = secondary === undefined ? [] : "label" in secondary ? [secondary] : secondary;
26
27
  return (_jsxs("div", { "data-slot": "card-actions", className: "flex max-w-full min-w-0 flex-wrap items-center gap-2", children: [meta ? (_jsx("span", { className: "mr-1 text-label-sm text-muted-foreground", "data-slot": "card-actions-meta", children: meta })) : null, period, secondaries.map((command) => (_jsx(PageCommandButton, { command: command, variant: "outline" }, command.label))), primary ? _jsx(PageCommandButton, { command: primary, variant: "default" }) : null, menu ? _jsx(ActionMenu, { ...menu, size: "page" }) : null] }));
27
28
  }
28
- /** Whether a card's header has anything of `actions` to draw, so it keeps no empty cell for them. */
29
- export function hasCardActions({ meta, period, secondary, primary, menu }) {
30
- const secondaries = secondary === undefined ? 0 : "label" in secondary ? 1 : secondary.length;
31
- return Boolean(meta || period || secondaries > 0 || primary || menu);
32
- }
33
29
  export function PageCommandButton({ command, ...appearance }) {
34
30
  if ("choices" in command)
35
31
  return _jsx(ChoicesCommandButton, { command: command, ...appearance });