@nadicodeai/ui 12.1.240 → 12.1.241

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 (102) hide show
  1. package/dist/components/action-menu.d.ts +5 -1
  2. package/dist/components/action-menu.d.ts.map +1 -1
  3. package/dist/components/assistant-panel-header.d.ts +25 -0
  4. package/dist/components/assistant-panel-header.d.ts.map +1 -0
  5. package/dist/components/assistant-panel-header.js +18 -0
  6. package/dist/components/assistant-welcome.d.ts +26 -0
  7. package/dist/components/assistant-welcome.d.ts.map +1 -0
  8. package/dist/components/assistant-welcome.js +16 -0
  9. package/dist/components/button.d.ts +6 -1
  10. package/dist/components/button.d.ts.map +1 -1
  11. package/dist/components/button.js +6 -1
  12. package/dist/components/collection-filters.d.ts +6 -3
  13. package/dist/components/collection-filters.d.ts.map +1 -1
  14. package/dist/components/collection-filters.js +5 -4
  15. package/dist/components/column-foot.d.ts +3 -2
  16. package/dist/components/column-foot.d.ts.map +1 -1
  17. package/dist/components/column-foot.js +2 -1
  18. package/dist/components/company-card-actions.d.ts +19 -0
  19. package/dist/components/company-card-actions.d.ts.map +1 -0
  20. package/dist/components/company-card-actions.js +16 -0
  21. package/dist/components/confirm-dialog.d.ts +6 -1
  22. package/dist/components/confirm-dialog.d.ts.map +1 -1
  23. package/dist/components/confirm-dialog.js +17 -3
  24. package/dist/components/drawer-steps.d.ts +8 -7
  25. package/dist/components/drawer-steps.d.ts.map +1 -1
  26. package/dist/components/drawer-steps.js +7 -6
  27. package/dist/components/figure-row.d.ts +2 -4
  28. package/dist/components/figure-row.d.ts.map +1 -1
  29. package/dist/components/figure-row.js +3 -3
  30. package/dist/components/filter-toolbar.d.ts +2 -4
  31. package/dist/components/filter-toolbar.d.ts.map +1 -1
  32. package/dist/components/filter-toolbar.js +2 -2
  33. package/dist/components/form-dialog.d.ts +11 -2
  34. package/dist/components/form-dialog.d.ts.map +1 -1
  35. package/dist/components/form-dialog.js +18 -3
  36. package/dist/components/item.d.ts +5 -9
  37. package/dist/components/item.d.ts.map +1 -1
  38. package/dist/components/item.js +5 -9
  39. package/dist/components/numbered-steps.d.ts +8 -5
  40. package/dist/components/numbered-steps.d.ts.map +1 -1
  41. package/dist/components/numbered-steps.js +5 -4
  42. package/dist/components/object-workspace.d.ts +2 -2
  43. package/dist/components/object-workspace.d.ts.map +1 -1
  44. package/dist/components/object-workspace.js +2 -2
  45. package/dist/components/page-actions.d.ts +5 -5
  46. package/dist/components/page-actions.d.ts.map +1 -1
  47. package/dist/components/page-actions.js +9 -4
  48. package/dist/components/plan-card.d.ts +14 -2
  49. package/dist/components/plan-card.d.ts.map +1 -1
  50. package/dist/components/plan-card.js +3 -2
  51. package/dist/components/product-band.d.ts +19 -7
  52. package/dist/components/product-band.d.ts.map +1 -1
  53. package/dist/components/product-band.js +12 -6
  54. package/dist/components/product-shell-bell.d.ts +71 -0
  55. package/dist/components/product-shell-bell.d.ts.map +1 -0
  56. package/dist/components/product-shell-bell.js +36 -0
  57. package/dist/components/product-shell.d.ts +21 -4
  58. package/dist/components/product-shell.d.ts.map +1 -1
  59. package/dist/components/product-shell.js +23 -2
  60. package/dist/components/record-list.d.ts +4 -2
  61. package/dist/components/record-list.d.ts.map +1 -1
  62. package/dist/components/record-list.js +10 -7
  63. package/dist/components/settings-facts.d.ts +5 -4
  64. package/dist/components/settings-facts.d.ts.map +1 -1
  65. package/dist/components/settings-facts.js +4 -3
  66. package/dist/components/settings-section.d.ts +11 -9
  67. package/dist/components/settings-section.d.ts.map +1 -1
  68. package/dist/components/settings-section.js +7 -6
  69. package/dist/internal/clear-filters.d.ts +7 -0
  70. package/dist/internal/clear-filters.d.ts.map +1 -0
  71. package/dist/internal/clear-filters.js +6 -0
  72. package/dist/internal/command-runner.d.ts +30 -5
  73. package/dist/internal/command-runner.d.ts.map +1 -1
  74. package/dist/internal/command-runner.js +61 -14
  75. package/dist/internal/footer-commands.d.ts +33 -0
  76. package/dist/internal/footer-commands.d.ts.map +1 -0
  77. package/dist/internal/footer-commands.js +27 -0
  78. package/dist/internal/footer-strip.d.ts.map +1 -1
  79. package/dist/internal/footer-strip.js +2 -4
  80. package/dist/internal/form-submit.d.ts +3 -2
  81. package/dist/internal/form-submit.d.ts.map +1 -1
  82. package/dist/internal/form-submit.js +2 -2
  83. package/dist/internal/page-command-button.d.ts +11 -1
  84. package/dist/internal/page-command-button.d.ts.map +1 -1
  85. package/dist/internal/page-command-button.js +3 -0
  86. package/dist/showcase/specimens/actions.d.ts +1 -0
  87. package/dist/showcase/specimens/actions.d.ts.map +1 -1
  88. package/dist/showcase/specimens/actions.js +12 -1
  89. package/dist/showcase/specimens/compositions.d.ts +2 -0
  90. package/dist/showcase/specimens/compositions.d.ts.map +1 -1
  91. package/dist/showcase/specimens/compositions.js +16 -7
  92. package/dist/showcase/specimens/data.d.ts.map +1 -1
  93. package/dist/showcase/specimens/data.js +1 -1
  94. package/dist/showcase/specimens/index.d.ts +4 -0
  95. package/dist/showcase/specimens/index.d.ts.map +1 -1
  96. package/dist/showcase/specimens/navigation.d.ts +2 -0
  97. package/dist/showcase/specimens/navigation.d.ts.map +1 -1
  98. package/dist/showcase/specimens/navigation.js +28 -0
  99. package/dist/showcase/usage.generated.d.ts +1 -1
  100. package/dist/showcase/usage.generated.d.ts.map +1 -1
  101. package/dist/showcase/usage.generated.js +74 -30
  102. package/package.json +2 -2
@@ -36,8 +36,12 @@ export type CommandConfirmation = {
36
36
  };
37
37
  /** A reversible destructive command runs at once and says so in a toast whose one action is Undo. */
38
38
  export type CommandUndo = {
39
- /** "Message deleted", with its Undo action, from the catalogue. */
39
+ /** "Message deleted", from the catalogue; the composition gives its toast the Undo. */
40
40
  message: ResolvedMessage;
41
+ /** The Undo's word, from the catalogue: "Undo". */
42
+ label: string;
43
+ /** Brings back what the command did; it returns why it could not, which the composition says in an error toast. */
44
+ onClick: CommandRun;
41
45
  };
42
46
  type RunsThroughComposition = {
43
47
  onClick: CommandRun;
@@ -1 +1 @@
1
-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at 24 px, in the state of her conversation. */
4
+ mark: ReactElement;
5
+ /** Her name: "Sofia". */
6
+ name: string;
7
+ /** The way to close her panel, at the header's end; left out where the panel's sheet draws its own Close. */
8
+ close?: {
9
+ label: string;
10
+ onClick: () => void;
11
+ } | undefined;
12
+ };
13
+ /**
14
+ * The head of the assistant's panel beside the page: her mark, her name and the way to close it.
15
+ *
16
+ * @family Compositions
17
+ * @when The top of the panel that `ProductShell`'s assistant toggle opens, as the Portal's Sofia, over her conversation in every state: opening, failed, answering. A product gives her mark, her name and its close, and never draws the header or its button.
18
+ * @instead The page's own head is the shell's path and `PageActions`. A sheet that holds a record has its own title and Close (`Sheet`, `RecordSheet`).
19
+ * @behaviour One 56 px row, 16 px at its sides: the mark, then the name in the semibold body type taking the room, then Close as a ghost icon button. On a phone the panel is a sheet whose own Close stands in the corner, so the product leaves `close` out there.
20
+ * @words Her name as the product writes it; Close is named in the product's words ("Close").
21
+ * @access A `header` landmark inside the panel; Close is a button named by `close.label`, and closing
22
+ * puts focus back on the assistant's toggle (`ProductShellAssistant`).
23
+ */
24
+ export declare function AssistantPanelHeader({ mark, name, close }: AssistantPanelHeaderProps): import("react").JSX.Element;
25
+ //# sourceMappingURL=assistant-panel-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistant-panel-header.d.ts","sourceRoot":"","sources":["../../src/components/assistant-panel-header.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,MAAM,MAAM,yBAAyB,GAAG;IACtC,2EAA2E;IAC3E,IAAI,EAAE,YAAY,CAAC;IACnB,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,6GAA6G;IAC7G,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,GAAG,SAAS,CAAC;CAC5D,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,yBAAyB,+BAqBpF"}
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { XIcon } from "lucide-react";
4
+ import { Button } from "./button.js";
5
+ /**
6
+ * The head of the assistant's panel beside the page: her mark, her name and the way to close it.
7
+ *
8
+ * @family Compositions
9
+ * @when The top of the panel that `ProductShell`'s assistant toggle opens, as the Portal's Sofia, over her conversation in every state: opening, failed, answering. A product gives her mark, her name and its close, and never draws the header or its button.
10
+ * @instead The page's own head is the shell's path and `PageActions`. A sheet that holds a record has its own title and Close (`Sheet`, `RecordSheet`).
11
+ * @behaviour One 56 px row, 16 px at its sides: the mark, then the name in the semibold body type taking the room, then Close as a ghost icon button. On a phone the panel is a sheet whose own Close stands in the corner, so the product leaves `close` out there.
12
+ * @words Her name as the product writes it; Close is named in the product's words ("Close").
13
+ * @access A `header` landmark inside the panel; Close is a button named by `close.label`, and closing
14
+ * puts focus back on the assistant's toggle (`ProductShellAssistant`).
15
+ */
16
+ export function AssistantPanelHeader({ mark, name, close }) {
17
+ return (_jsxs("header", { className: "flex h-14 shrink-0 items-center gap-2 px-4", "data-slot": "assistant-panel-header", children: [mark, _jsx("p", { className: "flex-1 font-semibold", children: name }), close ? (_jsx(Button, { "aria-label": close.label, onClick: close.onClick, size: "icon", type: "button", variant: "ghost", children: _jsx(XIcon, { "aria-hidden": "true" }) })) : null] }));
18
+ }
@@ -0,0 +1,26 @@
1
+ import type { ReactElement } from "react";
2
+ import { type PageCommand } from "./page-actions.js";
3
+ export type AssistantWelcomeProps = {
4
+ /** Her mark: an Agent's orb at 64 px. */
5
+ mark: ReactElement;
6
+ /** "Hi, I'm Sofia". */
7
+ title: string;
8
+ /** What she can do, or her greeting. */
9
+ body: string;
10
+ /** The choice her greeting asks for, filled: "Show me around". */
11
+ primary?: PageCommand | undefined;
12
+ /** A lesser choice, outline: "Not now" beside a greeting's, or a tour she offers while the composer is the way in. */
13
+ secondary?: PageCommand | undefined;
14
+ };
15
+ /**
16
+ * What the assistant says above an empty conversation: who she is, what she can do, and the choices she offers.
17
+ *
18
+ * @family Compositions
19
+ * @when Above the composer of an assistant's empty conversation, as the Portal's Sofia's welcome: the thread's `Welcome`. A greeting that asks for an answer gives `primary` and `secondary` (Show me around, Not now); a welcome that only offers a tour gives it as `secondary`, since the composer is the main way in. A product gives the words and the commands, and never draws the welcome's buttons.
20
+ * @instead A place a person has never filled is `EmptyState` `firstUse`. The suggested prompts under the composer are the thread's `suggestions`.
21
+ * @behaviour Centred, 12 px apart, 24 px above the composer: the mark, the title in the large semibold type, the body in the muted small type, then the choices in one row that wraps, `primary` filled before `secondary` outline. A choice that cannot run yet, as a tour that is starting, is `disabled`.
22
+ * @words The product's catalogue: the title introduces her by name; the body is one or two sentences; the choices name what happens ("Show me around", "Not now").
23
+ * @access Plain text above native buttons, each named by its label, in visual order.
24
+ */
25
+ export declare function AssistantWelcome({ mark, title, body, primary, secondary }: AssistantWelcomeProps): import("react").JSX.Element;
26
+ //# sourceMappingURL=assistant-welcome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistant-welcome.d.ts","sourceRoot":"","sources":["../../src/components/assistant-welcome.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,gBAAgB,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG;IAClC,yCAAyC;IACzC,IAAI,EAAE,YAAY,CAAC;IACnB,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAClC,sHAAsH;IACtH,SAAS,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,qBAAqB,+BAiBhG"}
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { PageCommandButton } from "./page-actions.js";
4
+ /**
5
+ * What the assistant says above an empty conversation: who she is, what she can do, and the choices she offers.
6
+ *
7
+ * @family Compositions
8
+ * @when Above the composer of an assistant's empty conversation, as the Portal's Sofia's welcome: the thread's `Welcome`. A greeting that asks for an answer gives `primary` and `secondary` (Show me around, Not now); a welcome that only offers a tour gives it as `secondary`, since the composer is the main way in. A product gives the words and the commands, and never draws the welcome's buttons.
9
+ * @instead A place a person has never filled is `EmptyState` `firstUse`. The suggested prompts under the composer are the thread's `suggestions`.
10
+ * @behaviour Centred, 12 px apart, 24 px above the composer: the mark, the title in the large semibold type, the body in the muted small type, then the choices in one row that wraps, `primary` filled before `secondary` outline. A choice that cannot run yet, as a tour that is starting, is `disabled`.
11
+ * @words The product's catalogue: the title introduces her by name; the body is one or two sentences; the choices name what happens ("Show me around", "Not now").
12
+ * @access Plain text above native buttons, each named by its label, in visual order.
13
+ */
14
+ export function AssistantWelcome({ mark, title, body, primary, secondary }) {
15
+ return (_jsxs("div", { className: "mb-6 flex flex-col items-center gap-3 px-4 text-center", "data-slot": "assistant-welcome", children: [mark, _jsx("p", { className: "text-lg font-semibold", children: title }), _jsx("p", { className: "text-muted-foreground text-sm", children: body }), primary || secondary ? (_jsxs("div", { className: "flex flex-wrap justify-center gap-2", children: [primary ? _jsx(PageCommandButton, { command: primary, variant: "default" }) : null, secondary ? _jsx(PageCommandButton, { command: secondary, variant: "outline" }) : null] })) : null] }));
16
+ }
@@ -51,7 +51,12 @@ export type IconButtonPartProps = Omit<IconButtonProps, "size" | "aria-label" |
51
51
  *
52
52
  * @family Actions
53
53
  * @when "Use `Button` for actions that mutate state (deploy, save, delete); use `ButtonLink` for navigation that changes the URL." (https://vercel.com/geist/button)
54
- * Ours: one `default` per surface, the thing this page or dialog is for.
54
+ * Ours: one `default` per surface, the thing this page or dialog is for; on a settings page each card
55
+ * acts on its own, so each card's footer action is its one `default` (Save, Invite, Enable). A product's page never renders
56
+ * it: the page gives each command as data to the composition of the place it stands in (`PageActions`,
57
+ * a card's `actions`, `SettingsSection`'s `footer`, `RecordList`'s `commands`, `EmptyState`'s `action`, a
58
+ * dialog's form), which draws this button with that place's look; the Portal's lint
59
+ * (`nadicodeai/commands-as-data`) refuses it on a signed-in page.
55
60
  * @instead "Switch to a `Menu` or `Split Button` when more than one related action shares a row." (https://vercel.com/geist/button)
56
61
  * Ours: a link inside a sentence is `TextLink`. A record's secondary commands go in `ActionMenu`. Appending to a list is a
57
62
  * `LoadMoreButton`. An on/off value is a `Switch`.
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,QAAQ,EAGb,KAAK,QAAQ,EACd,MAAM,2BAA2B,CAAC;AAGnC,MAAM,MAAM,WAAW,GACnB;IAAE,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,SAAS,CAAA;CAAE,GACjD;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/C,KAAK,QAAQ,GAAG,WAAW,GAAG;IAC5B,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,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M,MAAM,eAAe,GAAG,cAAc,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC;AAMrE;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,UAAU,CAAC,EAClB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,OAAO,EACP,MAAM,EACN,MAAM,EACN,KAAgB,EAChB,IAAgB,EAChB,MAAM,EACN,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,eAAe,8FA4BjB;AAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC"}
@@ -29,7 +29,12 @@ function ButtonContent({ children, loading, loadingLabel, prefix, size, suffix,
29
29
  *
30
30
  * @family Actions
31
31
  * @when "Use `Button` for actions that mutate state (deploy, save, delete); use `ButtonLink` for navigation that changes the URL." (https://vercel.com/geist/button)
32
- * Ours: one `default` per surface, the thing this page or dialog is for.
32
+ * Ours: one `default` per surface, the thing this page or dialog is for; on a settings page each card
33
+ * acts on its own, so each card's footer action is its one `default` (Save, Invite, Enable). A product's page never renders
34
+ * it: the page gives each command as data to the composition of the place it stands in (`PageActions`,
35
+ * a card's `actions`, `SettingsSection`'s `footer`, `RecordList`'s `commands`, `EmptyState`'s `action`, a
36
+ * dialog's form), which draws this button with that place's look; the Portal's lint
37
+ * (`nadicodeai/commands-as-data`) refuses it on a signed-in page.
33
38
  * @instead "Switch to a `Menu` or `Split Button` when more than one related action shares a row." (https://vercel.com/geist/button)
34
39
  * Ours: a link inside a sentence is `TextLink`. A record's secondary commands go in `ActionMenu`. Appending to a list is a
35
40
  * `LoadMoreButton`. An on/off value is a `Switch`.
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type ClearFilters } from "../internal/clear-filters.js";
2
3
  export type CollectionFilterOption = {
3
4
  value: string;
4
5
  label: string;
@@ -37,6 +38,8 @@ export type CollectionFilterCopy = {
37
38
  export type CollectionFiltersProps = {
38
39
  facets: readonly CollectionFilter[];
39
40
  copy: CollectionFilterCopy;
41
+ /** Unsets every facet at once, shown only while one is set: "Clear filters". */
42
+ clear?: ClearFilters | undefined;
40
43
  };
41
44
  /**
42
45
  * The filters in a collection's toolbar: one Add filter button, a chip for
@@ -46,9 +49,9 @@ export type CollectionFiltersProps = {
46
49
  * @family Compositions
47
50
  * @when A collection or a feed a person narrows by a property its records share (its query facets): a status, an owner, a kind. It stands in the toolbar after the search and before the sort.
48
51
  * @instead Finding one record by its name is the search. Changing the order is the sort. Switching between sibling collections is the page's tabs.
49
- * @behaviour Add filter opens a picker of the facets, then of a facet's values, each searchable; Backspace in an empty search goes back to the facets. The picker stays inside the window: where its values are taller than the room beside its trigger, it takes that room, Back and the search stay in view, and the values scroll under them. A facet in force is a chip that reopens its values, with a button that removes it. A suggested value waits as a dashed chip in the muted grey, led by a + and never by the value's own mark, so it never reads as a filter in force, while its facet is unset, and applies in one click. Focus returns to Add filter when a facet is removed. The product keeps each facet's value, in the URL where it has one.
50
- * @words Every string is the product's: `copy` names Add filter, the two searches, the empty result, Back and Remove; each facet names itself, its values and its "All" choice.
52
+ * @behaviour Ours: a bar of filters with no `FilterToolbar` around it, such as an analysis's pivot controls, gives its `clear` here, and the filters draw Clear filters quietly after their chips while a facet is set; inside a `FilterToolbar` the toolbar's own `clear` does it, since it also clears the search (nadicode decision). Add filter opens a picker of the facets, then of a facet's values, each searchable; Backspace in an empty search goes back to the facets. The picker stays inside the window: where its values are taller than the room beside its trigger, it takes that room, Back and the search stay in view, and the values scroll under them. A facet in force is a chip that reopens its values, with a button that removes it. A suggested value waits as a dashed chip in the muted grey, led by a + and never by the value's own mark, so it never reads as a filter in force, while its facet is unset, and applies in one click. Focus returns to Add filter when a facet is removed. The product keeps each facet's value, in the URL where it has one.
53
+ * @words Every string is the product's: `copy` names Add filter, the two searches, the empty result, Back and Remove, and `clear` names Clear filters; each facet names itself, its values and its "All" choice.
51
54
  * @access Each chip is a group named by its facet; its remove button reads Remove with the facet's name. The pickers are searchable lists named by what they search.
52
55
  */
53
- export declare function CollectionFilters({ facets, copy }: CollectionFiltersProps): React.JSX.Element | null;
56
+ export declare function CollectionFilters({ facets, copy, clear }: CollectionFiltersProps): React.JSX.Element | null;
54
57
  //# sourceMappingURL=collection-filters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection-filters.d.ts","sourceRoot":"","sources":["../../src/components/collection-filters.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,SAAS,sBAAsB,EAAE,CAAC;IAC3C,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,+FAA+F;IAC/F,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA0HF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,SAAS,gB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AChB,CAAC;AA0HF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACpC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,gFAAgF;IAChF,KAAK,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,sBAAsB,4BAoFhF"}
@@ -6,6 +6,7 @@ import { Button } from "./button.js";
6
6
  import { ButtonGroup } from "./button-group.js";
7
7
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "./command.js";
8
8
  import { Popover, PopoverContent, PopoverTitle, PopoverTrigger } from "./popover.js";
9
+ import { ClearFiltersButton } from "../internal/clear-filters.js";
9
10
  function FilterPicker({ facets, copy, initialField, returnFocus, children, }) {
10
11
  const [open, setOpen] = React.useState(false);
11
12
  const [field, setField] = React.useState(initialField);
@@ -47,11 +48,11 @@ function FilterPicker({ facets, copy, initialField, returnFocus, children, }) {
47
48
  * @family Compositions
48
49
  * @when A collection or a feed a person narrows by a property its records share (its query facets): a status, an owner, a kind. It stands in the toolbar after the search and before the sort.
49
50
  * @instead Finding one record by its name is the search. Changing the order is the sort. Switching between sibling collections is the page's tabs.
50
- * @behaviour Add filter opens a picker of the facets, then of a facet's values, each searchable; Backspace in an empty search goes back to the facets. The picker stays inside the window: where its values are taller than the room beside its trigger, it takes that room, Back and the search stay in view, and the values scroll under them. A facet in force is a chip that reopens its values, with a button that removes it. A suggested value waits as a dashed chip in the muted grey, led by a + and never by the value's own mark, so it never reads as a filter in force, while its facet is unset, and applies in one click. Focus returns to Add filter when a facet is removed. The product keeps each facet's value, in the URL where it has one.
51
- * @words Every string is the product's: `copy` names Add filter, the two searches, the empty result, Back and Remove; each facet names itself, its values and its "All" choice.
51
+ * @behaviour Ours: a bar of filters with no `FilterToolbar` around it, such as an analysis's pivot controls, gives its `clear` here, and the filters draw Clear filters quietly after their chips while a facet is set; inside a `FilterToolbar` the toolbar's own `clear` does it, since it also clears the search (nadicode decision). Add filter opens a picker of the facets, then of a facet's values, each searchable; Backspace in an empty search goes back to the facets. The picker stays inside the window: where its values are taller than the room beside its trigger, it takes that room, Back and the search stay in view, and the values scroll under them. A facet in force is a chip that reopens its values, with a button that removes it. A suggested value waits as a dashed chip in the muted grey, led by a + and never by the value's own mark, so it never reads as a filter in force, while its facet is unset, and applies in one click. Focus returns to Add filter when a facet is removed. The product keeps each facet's value, in the URL where it has one.
52
+ * @words Every string is the product's: `copy` names Add filter, the two searches, the empty result, Back and Remove, and `clear` names Clear filters; each facet names itself, its values and its "All" choice.
52
53
  * @access Each chip is a group named by its facet; its remove button reads Remove with the facet's name. The pickers are searchable lists named by what they search.
53
54
  */
54
- export function CollectionFilters({ facets, copy }) {
55
+ export function CollectionFilters({ facets, copy, clear }) {
55
56
  const addTrigger = React.useRef(null);
56
57
  if (!facets.length)
57
58
  return null;
@@ -75,5 +76,5 @@ export function CollectionFilters({ facets, copy }) {
75
76
  }, children: [_jsxs("span", { className: "sr-only", children: [copy.add, ":"] }), " ", _jsxs("span", { className: "truncate", children: [facet.label, " ", _jsx("span", { className: option.mono ? "font-label-mono text-label-mono" : undefined, children: option.label })] })] }, `${facet.label}:${value}`),
76
77
  ]
77
78
  : [];
78
- }))] }));
79
+ })), clear && facets.some((facet) => facet.value) ? _jsx(ClearFiltersButton, { ...clear }) : null] }));
79
80
  }
@@ -1,5 +1,6 @@
1
1
  import type * as React from "react";
2
2
  import { type AccountMenuProps } from "./account-menu.js";
3
+ import { type ProductShellBellData } from "./product-shell-bell.js";
3
4
  import { SidebarEntryCard } from "./sidebar.js";
4
5
  import { type UpdateCardProps } from "./update-card.js";
5
6
  /** The one band above the account: the update offer, or the way out of the product. */
@@ -20,7 +21,7 @@ export type ColumnFootProps = {
20
21
  places?: React.ReactNode;
21
22
  account: ColumnFootAccount;
22
23
  /** The bell beside the account, the product's notifications inbox. */
23
- bell?: React.ReactNode;
24
+ bell?: ProductShellBellData;
24
25
  /** The column shows icons alone: the account shows its picture and the update offer one icon. */
25
26
  collapsed?: boolean;
26
27
  className?: string;
@@ -31,7 +32,7 @@ export declare function columnFootRegions({ band, places, account, bell, collaps
31
32
  band: React.JSX.Element | undefined;
32
33
  foot: React.ReactNode;
33
34
  account: React.JSX.Element;
34
- actions: React.ReactNode;
35
+ actions: React.JSX.Element | undefined;
35
36
  };
36
37
  /** The foot's band as the foot draws it: the update offer, one icon while `narrow`, or the way out. */
37
38
  export declare function FootBand({ band, narrow }: {
@@ -1 +1 @@
1
- {"version":3,"file":"column-foot.d.ts","sourceRoot":"","sources":["../../src/components/column-foot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAA6C,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE5E,uFAAuF;AACvF,MAAM,MAAM,cAAc,GACtB;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GAC1C;IAAE,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE7E,KAAK,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,IAAI,CAAC,SAAS,OAAO,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC;AAEzF,2FAA2F;AAC3F,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAC9C,gBAAgB,EAChB,aAAa,GAAG,MAAM,GAAG,OAAO,CACjC,CAAC;AAEF,MAAM,MAAM,eAAe,GA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S,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,EAAE,eAAe,qBAEzE"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { AccountMenu } from "./account-menu.js";
3
+ import { ProductShellBell } from "./product-shell-bell.js";
3
4
  import { SidebarEntryCard, SidebarFoot, SidebarMenu, SidebarMenuItem } from "./sidebar.js";
4
5
  import { UpdateCard } from "./update-card.js";
5
6
  /** The regions of the foot, as `ProductShell` and `ColumnFoot` both fill them. */
@@ -8,7 +9,7 @@ export function columnFootRegions({ band, places, account, bell, collapsed = fal
8
9
  band: band ? _jsx(FootBand, { band: band, narrow: collapsed }) : undefined,
9
10
  foot: places,
10
11
  account: _jsx(AccountMenu, { ...account, pictureOnly: collapsed }),
11
- actions: bell,
12
+ actions: bell ? _jsx(ProductShellBell, { ...bell }) : undefined,
12
13
  };
13
14
  }
14
15
  /** The foot's band as the foot draws it: the update offer, one icon while `narrow`, or the way out. */
@@ -0,0 +1,19 @@
1
+ import { type PageCommand } from "./page-actions.js";
2
+ export type CompanyCardActionsProps = {
3
+ /** What the person does with the card: "Share your card". */
4
+ primary: PageCommand;
5
+ /** Up to two lesser ways to hand it on: "Invite by email", "QR code". */
6
+ secondary?: readonly [PageCommand] | readonly [PageCommand, PageCommand] | undefined;
7
+ };
8
+ /**
9
+ * What a person does with their company's card, beside it on the identity plane.
10
+ *
11
+ * @family Actions
12
+ * @when Under or beside a `CompanyCard` on its `BrandField`: the account's Profile shows the card with Share your card, and the Partner invitation panel adds Invite by email and QR code. A product gives the commands and never draws their buttons.
13
+ * @instead A card's header commands are its composition's `actions` (`CardActionsRow`). A record's commands are its list's. The card itself holds nothing interactive.
14
+ * @behaviour One row that wraps, 8 px apart: `primary` first as the white filled button (`brandSolid`), then each `secondary` as the white label with no fill (`brandGhost`), so every label clears AA on the ink plane. A command that shows a part of the page, as the QR code, carries `expands`, and its button says whether that part is shown. A running command keeps its place and says its pending word. The row places itself nowhere: the product's layout centres it under the card or starts it in a column beside it.
15
+ * @words The product's catalogue: a verb and what it acts on, in sentence case ("Share your card", "Invite by email"); a pending word in the -ing form ("Preparing the card").
16
+ * @access Native buttons in visual order, each named by its label; a command that shows a part of the page has `aria-expanded` and `aria-controls`. A command that opens a dialog returns focus to its button when the dialog closes.
17
+ */
18
+ export declare function CompanyCardActions({ primary, secondary }: CompanyCardActionsProps): import("react").JSX.Element;
19
+ //# sourceMappingURL=company-card-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company-card-actions.d.ts","sourceRoot":"","sources":["../../src/components/company-card-actions.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,gBAAgB,CAAC;AAErE,MAAM,MAAM,uBAAuB,GAAG;IACpC,6DAA6D;IAC7D,OAAO,EAAE,WAAW,CAAC;IACrB,yEAAyE;IACzE,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,SAAS,CAAC;CACtF,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,uBAAuB,+BASjF"}
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { PageCommandButton } from "./page-actions.js";
4
+ /**
5
+ * What a person does with their company's card, beside it on the identity plane.
6
+ *
7
+ * @family Actions
8
+ * @when Under or beside a `CompanyCard` on its `BrandField`: the account's Profile shows the card with Share your card, and the Partner invitation panel adds Invite by email and QR code. A product gives the commands and never draws their buttons.
9
+ * @instead A card's header commands are its composition's `actions` (`CardActionsRow`). A record's commands are its list's. The card itself holds nothing interactive.
10
+ * @behaviour One row that wraps, 8 px apart: `primary` first as the white filled button (`brandSolid`), then each `secondary` as the white label with no fill (`brandGhost`), so every label clears AA on the ink plane. A command that shows a part of the page, as the QR code, carries `expands`, and its button says whether that part is shown. A running command keeps its place and says its pending word. The row places itself nowhere: the product's layout centres it under the card or starts it in a column beside it.
11
+ * @words The product's catalogue: a verb and what it acts on, in sentence case ("Share your card", "Invite by email"); a pending word in the -ing form ("Preparing the card").
12
+ * @access Native buttons in visual order, each named by its label; a command that shows a part of the page has `aria-expanded` and `aria-controls`. A command that opens a dialog returns focus to its button when the dialog closes.
13
+ */
14
+ export function CompanyCardActions({ primary, secondary }) {
15
+ return (_jsxs("div", { className: "flex flex-wrap items-center gap-2", "data-slot": "company-card-actions", children: [_jsx(PageCommandButton, { command: primary, variant: "brandSolid" }), secondary?.map((command) => (_jsx(PageCommandButton, { command: command, variant: "brandGhost" }, command.label)))] }));
16
+ }
@@ -36,6 +36,11 @@ export type ConfirmDialogProps = {
36
36
  * with the message's own actions, such as signing in, under it.
37
37
  */
38
38
  error?: ResolvedMessage | null;
39
+ /**
40
+ * Where focus goes once the dialog has closed and the control it would return to is gone, such
41
+ * as the row a confirmed Remove took away: the list's heading. Left out, focus returns as usual.
42
+ */
43
+ focusFallback?: (() => HTMLElement | null) | undefined;
39
44
  };
40
45
  /**
41
46
  * The product's word for the dismissal every confirmation offers, from its catalogue: "Cancel",
@@ -75,5 +80,5 @@ export declare function useConfirmationOpen(): boolean;
75
80
  * "Keep the Cancel button literally `Cancel` so screen-reader users hear a stable dismissal label across destructive flows." (https://vercel.com/geist/modal)
76
81
  * Ours: `role="alertdialog"` named by its title and described by its consequence; the note is `role="note"` with its icon hidden; focus starts on Cancel, or in the field with `verify` (nadicode decision).
77
82
  */
78
- export declare function ConfirmDialog({ open, onConfirm, onCancel, title, description, confirmLabel, confirmPendingLabel, destructive, loading, verify, irreversible, error, }: ConfirmDialogProps): import("react").JSX.Element;
83
+ export declare function ConfirmDialog({ open, onConfirm, onCancel, title, description, confirmLabel, confirmPendingLabel, destructive, loading, verify, irreversible, error, focusFallback, }: ConfirmDialogProps): import("react").JSX.Element;
79
84
  //# sourceMappingURL=confirm-dialog.d.ts.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S,CAAC;CACrB,+BAGA;AAID;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAmBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,KAAK,EACL,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,WAAmB,EACnB,OAAe,EACf,MAAM,EACN,YAAY,EACZ,KAAK,EACL,aAAa,GACd,EAAE,kBAAkB,+BAkCpB"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { createContext, useContext, useEffect, useId, useMemo, useRef, useState, } from "react";
3
+ import { createContext, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, } from "react";
4
4
  import { createStore, useStore } from "zustand";
5
5
  import { OctagonAlertIcon } from "lucide-react";
6
6
  import { AlertDialog, AlertDialogBody, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "./alert-dialog.js";
@@ -9,6 +9,20 @@ import { Field, FieldError, FieldLabel } from "./field.js";
9
9
  import { Input } from "./input.js";
10
10
  import { PageCommandButton } from "../internal/page-command-button.js";
11
11
  import { bodyBeyondTitle } from "./product-message.js";
12
+ /**
13
+ * The dialog returns focus to the control it was opened from as it leaves the screen; when that
14
+ * control is gone the page has nothing focused, and the fallback takes it, once the return is done.
15
+ */
16
+ function FocusFallbackOnClose({ to }) {
17
+ useLayoutEffect(() => () => {
18
+ setTimeout(() => {
19
+ const active = document.activeElement;
20
+ if (active === null || active === document.body)
21
+ to()?.focus();
22
+ });
23
+ }, [to]);
24
+ return null;
25
+ }
12
26
  const ConfirmWords = createContext({ cancel: "Cancel" });
13
27
  /**
14
28
  * The product's word for the dismissal every confirmation offers, from its catalogue: "Cancel",
@@ -66,7 +80,7 @@ function refuseBareVerb(confirmLabel) {
66
80
  * "Keep the Cancel button literally `Cancel` so screen-reader users hear a stable dismissal label across destructive flows." (https://vercel.com/geist/modal)
67
81
  * Ours: `role="alertdialog"` named by its title and described by its consequence; the note is `role="note"` with its icon hidden; focus starts on Cancel, or in the field with `verify` (nadicode decision).
68
82
  */
69
- export function ConfirmDialog({ open, onConfirm, onCancel, title, description, confirmLabel, confirmPendingLabel, destructive = false, loading = false, verify, irreversible, error, }) {
83
+ export function ConfirmDialog({ open, onConfirm, onCancel, title, description, confirmLabel, confirmPendingLabel, destructive = false, loading = false, verify, irreversible, error, focusFallback, }) {
70
84
  if (open)
71
85
  refuseBareVerb(confirmLabel);
72
86
  useCountedOpen(open);
@@ -75,7 +89,7 @@ export function ConfirmDialog({ open, onConfirm, onCancel, title, description, c
75
89
  return (_jsx(AlertDialog, { open: open, onOpenChange: (nextOpen) => {
76
90
  if (!nextOpen && !loading)
77
91
  onCancel();
78
- }, children: _jsxs(AlertDialogContent, { initialFocus: verify ? phraseField : cancel, children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: title }), _jsx(AlertDialogDescription, { children: description })] }), _jsx(ConfirmDialogPanel, { cancel: cancel, confirmLabel: confirmLabel, confirmPendingLabel: confirmPendingLabel, destructive: destructive, error: error, irreversible: irreversible, loading: loading, onCancel: onCancel, onConfirm: onConfirm, phraseField: phraseField, verify: verify })] }) }));
92
+ }, children: _jsxs(AlertDialogContent, { initialFocus: verify ? phraseField : cancel, children: [focusFallback ? _jsx(FocusFallbackOnClose, { to: focusFallback }) : null, _jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: title }), _jsx(AlertDialogDescription, { children: description })] }), _jsx(ConfirmDialogPanel, { cancel: cancel, confirmLabel: confirmLabel, confirmPendingLabel: confirmPendingLabel, destructive: destructive, error: error, irreversible: irreversible, loading: loading, onCancel: onCancel, onConfirm: onConfirm, phraseField: phraseField, verify: verify })] }) }));
79
93
  }
80
94
  function ConfirmDialogPanel({ cancel, phraseField, onConfirm, onCancel, confirmLabel, confirmPendingLabel, destructive = false, loading = false, verify, irreversible, error, }) {
81
95
  const words = useContext(ConfirmWords);
@@ -1,4 +1,5 @@
1
1
  import type { ComponentProps, ReactNode } from "react";
2
+ import { type FormSubmit } from "../internal/form-submit.js";
2
3
  export type DrawerStep = {
3
4
  id: string;
4
5
  /** The step's name; for what was already chosen, the thing's own name. */
@@ -6,7 +7,7 @@ export type DrawerStep = {
6
7
  state: "chosen" | "current";
7
8
  /** What was chosen stands with this in place of a number, such as an Agent's orb. */
8
9
  mark?: ReactNode;
9
- /** A `DrawerStepBody` and a `DrawerStepFooter`, with the step's form around them if it has one. */
10
+ /** A `DrawerStepBody`, and for the current step its form around it and a `DrawerStepFooter`. */
10
11
  children?: ReactNode;
11
12
  };
12
13
  /**
@@ -15,17 +16,17 @@ export type DrawerStep = {
15
16
  * @family Compositions
16
17
  * @when Inside a `FormDrawer` with `job="stack"`: a job a person starts from a card and finishes in the drawer, which holds what they chose, then the steps that remain.
17
18
  * @instead Steps a person follows on a page are `NumberedSteps`; a setup whose steps replace each other around a wait is `FormDrawer` with `job="steps"`.
18
- * @behaviour One card per step, 16 px apart. Each card's first row is 20 px of mark and its title, 24 px in from its sides. What was chosen stands first with its own mark, and what the person should know about it under that; the current step has its number in ink, its content and its actions in a band under it. The orb may overhang its 20 px, since its drawn edge is inside its box.
19
- * @words A step's title is one or two words: *Review*, *Configure*.
20
- * @access An ordered list; the current step carries `aria-current="step"`; the drawn numbers are hidden, since the list reads the position.
19
+ * @behaviour One card per step, 16 px apart. Each card's first row is 20 px of mark and its title, 24 px in from its sides. What was chosen stands first with its own mark, and what the person should know about it under that; the current step has its number in ink, its content, and in a band under it (`DrawerStepFooter`) its form's submit, which the product gives as data and the band draws filled at its end: it is disabled while `disabled`, and while `pending` it keeps its place and says `pendingLabel`. The product never draws a button in the band. The orb may overhang its 20 px, since its drawn edge is inside its box.
20
+ * @words A step's title is one or two words: *Review*, *Configure*. The submit is a verb and its noun, *Create Agent*, its pending word the -ing form, *Creating Agent*.
21
+ * @access An ordered list; the current step carries `aria-current="step"`; the drawn numbers are hidden, since the list reads the position. The submit is a submit button of the step's form, named by its label; a running one is busy.
21
22
  */
22
23
  export declare function DrawerSteps({ steps }: {
23
24
  steps: readonly DrawerStep[];
24
25
  }): import("react").JSX.Element;
25
26
  /** What the current step holds, under its row. */
26
27
  export declare function DrawerStepBody({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
27
- /** The band under the current step, its primary at the end. */
28
- export declare function DrawerStepFooter({ children }: {
29
- children: ReactNode;
28
+ /** The band under the current step: its form's submit at the end, given as data. */
29
+ export declare function DrawerStepFooter({ submit }: {
30
+ submit: FormSubmit;
30
31
  }): import("react").JSX.Element;
31
32
  //# sourceMappingURL=drawer-steps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-steps.d.ts","sourceRoot":"","sources":["../../src/components/drawer-steps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvD,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,0EAA0E;IAC1E,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B,qFAAqF;IACrF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,mGAAmG;IACnG,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAaF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,UAAU,EAAE,CAAA;CAAE,+BAoBtE;AAED,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,+BAQ5E;AAED,+DAA+D;AAC/D,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAMrE"}
1
+ {"version":3,"file":"drawer-steps.d.ts","sourceRoot":"","sources":["../../src/components/drawer-steps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,wBAAwB,CAAC;AAG3E,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,0EAA0E;IAC1E,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B,qFAAqF;IACrF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAaF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,UAAU,EAAE,CAAA;CAAE,+BAoBtE;AAED,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,+BAQ5E;AAED,oFAAoF;AACpF,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,+BAMlE"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Card, CardFooter } from "./card.js";
3
+ import { FormSubmitButton } from "../internal/form-submit.js";
3
4
  import { cn } from "../lib/utils.js";
4
5
  function StepNumber({ index }) {
5
6
  return (_jsx("span", { "aria-hidden": "true", className: "flex size-5 items-center justify-center rounded-full bg-foreground text-xs font-medium tabular-nums text-background", children: index + 1 }));
@@ -10,9 +11,9 @@ function StepNumber({ index }) {
10
11
  * @family Compositions
11
12
  * @when Inside a `FormDrawer` with `job="stack"`: a job a person starts from a card and finishes in the drawer, which holds what they chose, then the steps that remain.
12
13
  * @instead Steps a person follows on a page are `NumberedSteps`; a setup whose steps replace each other around a wait is `FormDrawer` with `job="steps"`.
13
- * @behaviour One card per step, 16 px apart. Each card's first row is 20 px of mark and its title, 24 px in from its sides. What was chosen stands first with its own mark, and what the person should know about it under that; the current step has its number in ink, its content and its actions in a band under it. The orb may overhang its 20 px, since its drawn edge is inside its box.
14
- * @words A step's title is one or two words: *Review*, *Configure*.
15
- * @access An ordered list; the current step carries `aria-current="step"`; the drawn numbers are hidden, since the list reads the position.
14
+ * @behaviour One card per step, 16 px apart. Each card's first row is 20 px of mark and its title, 24 px in from its sides. What was chosen stands first with its own mark, and what the person should know about it under that; the current step has its number in ink, its content, and in a band under it (`DrawerStepFooter`) its form's submit, which the product gives as data and the band draws filled at its end: it is disabled while `disabled`, and while `pending` it keeps its place and says `pendingLabel`. The product never draws a button in the band. The orb may overhang its 20 px, since its drawn edge is inside its box.
15
+ * @words A step's title is one or two words: *Review*, *Configure*. The submit is a verb and its noun, *Create Agent*, its pending word the -ing form, *Creating Agent*.
16
+ * @access An ordered list; the current step carries `aria-current="step"`; the drawn numbers are hidden, since the list reads the position. The submit is a submit button of the step's form, named by its label; a running one is busy.
16
17
  */
17
18
  export function DrawerSteps({ steps }) {
18
19
  return (_jsx("ol", { className: "grid grid-cols-[minmax(0,1fr)] gap-4", "data-slot": "drawer-steps", children: steps.map((step, index) => (_jsx("li", { "aria-current": step.state === "current" ? "step" : undefined, children: _jsxs(Card, { className: "gap-0 py-0", "data-state": step.state, children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3 px-6 py-5", children: [_jsx("span", { className: "flex size-5 shrink-0 items-center justify-center", children: step.mark ?? _jsx(StepNumber, { index: index }) }), _jsx("span", { className: "min-w-0 text-heading-xs wrap-break-word text-foreground", children: step.title })] }), step.children] }) }, step.id))) }));
@@ -21,7 +22,7 @@ export function DrawerSteps({ steps }) {
21
22
  export function DrawerStepBody({ className, ...props }) {
22
23
  return (_jsx("div", { className: cn("grid min-w-0 gap-5 px-6 pb-6", className), "data-slot": "drawer-step-body", ...props }));
23
24
  }
24
- /** The band under the current step, its primary at the end. */
25
- export function DrawerStepFooter({ children }) {
26
- return (_jsx(CardFooter, { className: "justify-end px-6", "data-slot": "drawer-step-footer", children: children }));
25
+ /** The band under the current step: its form's submit at the end, given as data. */
26
+ export function DrawerStepFooter({ submit }) {
27
+ return (_jsx(CardFooter, { className: "justify-end px-6", "data-slot": "drawer-step-footer", children: _jsx(FormSubmitButton, { submit: submit }) }));
27
28
  }
@@ -24,8 +24,6 @@ type FigureRowProps = {
24
24
  noteTone?: FigureRowNoteTone;
25
25
  /** The one action the figure asks for, at the row's trailing edge. */
26
26
  command?: PageCommand | undefined;
27
- /** `default`, the filled button, only for the one action the page waits on; `outline` otherwise. */
28
- commandVariant?: "outline" | "default" | undefined;
29
27
  };
30
28
  /**
31
29
  * One figure of an object with its bar, one sentence and the one action it asks for, as a row
@@ -34,11 +32,11 @@ type FigureRowProps = {
34
32
  * @family Data
35
33
  * @when An object's own readings, each with what a person does about it: an account's Included usage with its bar and its cycle, its Extra usage with Buy Extra usage, the card its plan is paid with, a Partner's Extra usage to allocate, the credit runway on the staff Dashboard. Rows stand in a `FigureRows`, given to `ObjectPage` as its `figures` or to an `ObjectSection` as its body.
36
34
  * @instead A figure among an overview's row of figures is a `KpiCard`, with `meter` for a share. A percentage in a table cell or a list row is the bar with its figure, `MeterReading` in the Portal. The object's fixed details (its price, its renewal date) are its facts. A state of the object with nothing to read is a `StatusBadge` beside its name. A setting is a `SettingsSection`.
37
- * @behaviour From 640 px of screen: the 32 px `IconTile` of the figure's kind, then the label (13 px, the supporting text colour) over the value (16 px medium, ink, tabular digits), and the command at the row's trailing edge as a small button, outline unless `commandVariant` makes it the page's one filled button. Under them the 10 px bar across the row, 12 px below, then the note, 8 px below, in the supporting text colour, or the warning or the error colour by `noteTone`. Each row is padded 16 px above and below and takes the width of the card's content, so the card's own inset holds it at the sides. Under 640 px the command goes full width under the note. With no `meter` there is no bar: a figure with no reading says so in its value ("Not metered", a `StatusBadge`). The bar is the kit's `Progress`: its fill is the action colour, or the threshold `tone` the reading crossed, and red past the maximum. A command keeps its own behaviour (`link`, `onClick` or `render`); a pending one is its button's pending label; a command that cannot run now stays, disabled, with its reason. Rows are a list divided by the border hairline (`FigureRows`). While its object reads, `FigureRowSkeleton` stands in each row's place: the tile, the label's and the value's lines and a note's line, with no words.
35
+ * @behaviour From 640 px of screen: the 32 px `IconTile` of the figure's kind, then the label (13 px, the supporting text colour) over the value (16 px medium, ink, tabular digits), and the command at the row's trailing edge as a small outline button, whatever the figure reads (nadicode decision). Under them the 10 px bar across the row, 12 px below, then the note, 8 px below, in the supporting text colour, or the warning or the error colour by `noteTone`. Each row is padded 16 px above and below and takes the width of the card's content, so the card's own inset holds it at the sides. Under 640 px the command goes full width under the note. With no `meter` there is no bar: a figure with no reading says so in its value ("Not metered", a `StatusBadge`). The bar is the kit's `Progress`: its fill is the action colour, or the threshold `tone` the reading crossed, and red past the maximum. A command keeps its own behaviour (`link`, `onClick` or `render`); a pending one is its button's pending label; a command that cannot run now stays, disabled, with its reason. Rows are a list divided by the border hairline (`FigureRows`). While its object reads, `FigureRowSkeleton` stands in each row's place: the tile, the label's and the value's lines and a note's line, with no words.
38
36
  * @words The label names the figure as the product calls it ("Included usage", "Extra usage available", "Card"); the value is the reading with its unit ("40% used", "€15.00", "Visa ···· 2212", "None saved"); the note is one sentence ("Current cycle: Nov 1, 2026 – Nov 30, 2026"); the command is a verb on the figure ("Buy Extra usage", "Update payment method"), or the name of the page it opens ("System health").
39
37
  * @access `FigureRows` is a list named by its `aria-label` ("Usage"), each figure an item. The tile is decorative, since the label names the kind. The bar is a progress bar named by the label, with its value read as a percentage. The command is a real button or link, the only stop on the row for the keyboard, and comes after the figure in reading order.
40
38
  */
41
- declare function FigureRow({ icon, tone, label, value, meter, note, noteTone, command, commandVariant, }: FigureRowProps): ReactElement;
39
+ declare function FigureRow({ icon, tone, label, value, meter, note, noteTone, command, }: FigureRowProps): ReactElement;
42
40
  /**
43
41
  * The list of an object's figures: one `FigureRow` per item, divided by the border hairline.
44
42
  * `FigureRow` holds its usage page.
@@ -1 +1 @@
1
- {"version":3,"file":"figure-row.d.ts","sourceRoot":"","sources":["../../src/components/figure-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,gCAAgC,CAAC;AAGrF,KAAK,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAE5D,KAAK,cAAc,GAAG;IACpB,iFAAiF;IACjF,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,iGAAiG;IACjG,KAAK,EAAE,SAAS,CAAC;IACjB,sFAAsF;IACtF,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,YAAY,CAAA;KAAE,CAAC;IAC7D,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,sEAAsE;IACtE,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAClC,oGAAoG;IACpG,cAAc,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;CACpD,CAAC;AAQF;;;;;;;;;;GAUG;AACH,iBAAS,SAAS,C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,IAAI,CAAC,EAAE,YAAY,CAAA;KAAE,CAAC;IAC7D,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,sEAAsE;IACtE,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACnC,CAAC;AAQF;;;;;;;;;;GAUG;AACH,iBAAS,SAAS,CAAC,EACjB,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,QAAoB,EACpB,OAAO,GACR,EAAE,cAAc,GAAG,YAAY,CAkD/B;AAED;;;GAGG;AACH,iBAAS,UAAU,CAAC,EAClB,YAAY,EAAE,KAAK,EACnB,QAAQ,GACT,EAAE;IACD,8CAA8C;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,YAAY,CAMf;AAED;;;;GAIG;AACH,iBAAS,iBAAiB,IAAI,YAAY,CAkBzC;AAED,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,CAAC"}
@@ -16,12 +16,12 @@ const NOTE_TONE_CLASS = {
16
16
  * @family Data
17
17
  * @when An object's own readings, each with what a person does about it: an account's Included usage with its bar and its cycle, its Extra usage with Buy Extra usage, the card its plan is paid with, a Partner's Extra usage to allocate, the credit runway on the staff Dashboard. Rows stand in a `FigureRows`, given to `ObjectPage` as its `figures` or to an `ObjectSection` as its body.
18
18
  * @instead A figure among an overview's row of figures is a `KpiCard`, with `meter` for a share. A percentage in a table cell or a list row is the bar with its figure, `MeterReading` in the Portal. The object's fixed details (its price, its renewal date) are its facts. A state of the object with nothing to read is a `StatusBadge` beside its name. A setting is a `SettingsSection`.
19
- * @behaviour From 640 px of screen: the 32 px `IconTile` of the figure's kind, then the label (13 px, the supporting text colour) over the value (16 px medium, ink, tabular digits), and the command at the row's trailing edge as a small button, outline unless `commandVariant` makes it the page's one filled button. Under them the 10 px bar across the row, 12 px below, then the note, 8 px below, in the supporting text colour, or the warning or the error colour by `noteTone`. Each row is padded 16 px above and below and takes the width of the card's content, so the card's own inset holds it at the sides. Under 640 px the command goes full width under the note. With no `meter` there is no bar: a figure with no reading says so in its value ("Not metered", a `StatusBadge`). The bar is the kit's `Progress`: its fill is the action colour, or the threshold `tone` the reading crossed, and red past the maximum. A command keeps its own behaviour (`link`, `onClick` or `render`); a pending one is its button's pending label; a command that cannot run now stays, disabled, with its reason. Rows are a list divided by the border hairline (`FigureRows`). While its object reads, `FigureRowSkeleton` stands in each row's place: the tile, the label's and the value's lines and a note's line, with no words.
19
+ * @behaviour From 640 px of screen: the 32 px `IconTile` of the figure's kind, then the label (13 px, the supporting text colour) over the value (16 px medium, ink, tabular digits), and the command at the row's trailing edge as a small outline button, whatever the figure reads (nadicode decision). Under them the 10 px bar across the row, 12 px below, then the note, 8 px below, in the supporting text colour, or the warning or the error colour by `noteTone`. Each row is padded 16 px above and below and takes the width of the card's content, so the card's own inset holds it at the sides. Under 640 px the command goes full width under the note. With no `meter` there is no bar: a figure with no reading says so in its value ("Not metered", a `StatusBadge`). The bar is the kit's `Progress`: its fill is the action colour, or the threshold `tone` the reading crossed, and red past the maximum. A command keeps its own behaviour (`link`, `onClick` or `render`); a pending one is its button's pending label; a command that cannot run now stays, disabled, with its reason. Rows are a list divided by the border hairline (`FigureRows`). While its object reads, `FigureRowSkeleton` stands in each row's place: the tile, the label's and the value's lines and a note's line, with no words.
20
20
  * @words The label names the figure as the product calls it ("Included usage", "Extra usage available", "Card"); the value is the reading with its unit ("40% used", "€15.00", "Visa ···· 2212", "None saved"); the note is one sentence ("Current cycle: Nov 1, 2026 – Nov 30, 2026"); the command is a verb on the figure ("Buy Extra usage", "Update payment method"), or the name of the page it opens ("System health").
21
21
  * @access `FigureRows` is a list named by its `aria-label` ("Usage"), each figure an item. The tile is decorative, since the label names the kind. The bar is a progress bar named by the label, with its value read as a percentage. The command is a real button or link, the only stop on the row for the keyboard, and comes after the figure in reading order.
22
22
  */
23
- function FigureRow({ icon, tone, label, value, meter, note, noteTone = "default", command, commandVariant = "outline", }) {
24
- return (_jsxs("li", { className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] gap-x-3 py-4 sm:grid-cols-[auto_minmax(0,1fr)_auto]", "data-slot": "figure-row", children: [_jsx("span", { className: "col-start-1 row-start-1 flex self-center", children: _jsx(IconTile, { icon: icon, size: 32, tone: tone }) }), _jsxs("div", { className: "col-start-2 row-start-1 grid min-w-0 gap-0.5 self-center", children: [_jsx("span", { className: "text-label-sm wrap-break-word text-muted-foreground", children: label }), _jsx("div", { className: "min-w-0 text-label-md font-medium wrap-break-word text-foreground tabular-nums", "data-slot": "figure-row-value", children: value })] }), meter ? (_jsx(Progress, { "aria-label": label, className: "col-span-full mt-3", max: meter.max, size: "md", tone: meter.tone, value: meter.value })) : null, note ? (_jsx("p", { className: cn("col-span-full mt-2 text-body-compact wrap-break-word", NOTE_TONE_CLASS[noteTone]), "data-slot": "figure-row-note", "data-tone": noteTone, children: note })) : null, command ? (_jsx("div", { className: "col-span-full mt-3 flex min-w-0 **:data-[slot=button]:w-full sm:col-span-1 sm:col-start-3 sm:row-start-1 sm:mt-0 sm:self-center sm:**:data-[slot=button]:w-auto", "data-slot": "figure-row-command", children: _jsx(PageCommandButton, { command: command, size: "sm", variant: commandVariant }) })) : null] }));
23
+ function FigureRow({ icon, tone, label, value, meter, note, noteTone = "default", command, }) {
24
+ return (_jsxs("li", { className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] gap-x-3 py-4 sm:grid-cols-[auto_minmax(0,1fr)_auto]", "data-slot": "figure-row", children: [_jsx("span", { className: "col-start-1 row-start-1 flex self-center", children: _jsx(IconTile, { icon: icon, size: 32, tone: tone }) }), _jsxs("div", { className: "col-start-2 row-start-1 grid min-w-0 gap-0.5 self-center", children: [_jsx("span", { className: "text-label-sm wrap-break-word text-muted-foreground", children: label }), _jsx("div", { className: "min-w-0 text-label-md font-medium wrap-break-word text-foreground tabular-nums", "data-slot": "figure-row-value", children: value })] }), meter ? (_jsx(Progress, { "aria-label": label, className: "col-span-full mt-3", max: meter.max, size: "md", tone: meter.tone, value: meter.value })) : null, note ? (_jsx("p", { className: cn("col-span-full mt-2 text-body-compact wrap-break-word", NOTE_TONE_CLASS[noteTone]), "data-slot": "figure-row-note", "data-tone": noteTone, children: note })) : null, command ? (_jsx("div", { className: "col-span-full mt-3 flex min-w-0 **:data-[slot=button]:w-full sm:col-span-1 sm:col-start-3 sm:row-start-1 sm:mt-0 sm:self-center sm:**:data-[slot=button]:w-auto", "data-slot": "figure-row-command", children: _jsx(PageCommandButton, { command: command, size: "sm", variant: "outline" }) })) : null] }));
25
25
  }
26
26
  /**
27
27
  * The list of an object's figures: one `FigureRow` per item, divided by the border hairline.