@boost33/ui 0.8.1 → 0.9.0

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 (123) hide show
  1. package/CHANGELOG.md +131 -3
  2. package/dist/backdrop-icons.d.ts +53 -0
  3. package/dist/backdrop-icons.js +62 -0
  4. package/dist/backdrop-icons.js.map +1 -0
  5. package/dist/backdrop.css +1 -0
  6. package/dist/backdrop.d.ts +46 -0
  7. package/dist/backdrop.js +127 -0
  8. package/dist/backdrop.js.map +1 -0
  9. package/dist/components/Backdrop/BackdropAppMenu.d.ts +55 -0
  10. package/dist/components/Backdrop/BackdropAppMenu.js +79 -0
  11. package/dist/components/Backdrop/BackdropAppMenu.js.map +1 -0
  12. package/dist/components/Backdrop/BackdropAppMenu.module.css.js +48 -0
  13. package/dist/components/Backdrop/BackdropAppMenu.module.css.js.map +1 -0
  14. package/dist/components/Backdrop/BackdropBasics.d.ts +129 -0
  15. package/dist/components/Backdrop/BackdropBasics.js +130 -0
  16. package/dist/components/Backdrop/BackdropBasics.js.map +1 -0
  17. package/dist/components/Backdrop/BackdropBasics.module.css.js +71 -0
  18. package/dist/components/Backdrop/BackdropBasics.module.css.js.map +1 -0
  19. package/dist/components/Backdrop/BackdropButton.d.ts +63 -0
  20. package/dist/components/Backdrop/BackdropButton.js +59 -0
  21. package/dist/components/Backdrop/BackdropButton.js.map +1 -0
  22. package/dist/components/Backdrop/BackdropButton.module.css.js +41 -0
  23. package/dist/components/Backdrop/BackdropButton.module.css.js.map +1 -0
  24. package/dist/components/Backdrop/BackdropCharts.d.ts +158 -0
  25. package/dist/components/Backdrop/BackdropCharts.js +222 -0
  26. package/dist/components/Backdrop/BackdropCharts.js.map +1 -0
  27. package/dist/components/Backdrop/BackdropCharts.module.css.js +109 -0
  28. package/dist/components/Backdrop/BackdropCharts.module.css.js.map +1 -0
  29. package/dist/components/Backdrop/BackdropChrome.d.ts +26 -0
  30. package/dist/components/Backdrop/BackdropChrome.js +35 -0
  31. package/dist/components/Backdrop/BackdropChrome.js.map +1 -0
  32. package/dist/components/Backdrop/BackdropConversation.d.ts +67 -0
  33. package/dist/components/Backdrop/BackdropConversation.js +76 -0
  34. package/dist/components/Backdrop/BackdropConversation.js.map +1 -0
  35. package/dist/components/Backdrop/BackdropConversation.module.css.js +44 -0
  36. package/dist/components/Backdrop/BackdropConversation.module.css.js.map +1 -0
  37. package/dist/components/Backdrop/BackdropData.d.ts +195 -0
  38. package/dist/components/Backdrop/BackdropData.js +204 -0
  39. package/dist/components/Backdrop/BackdropData.js.map +1 -0
  40. package/dist/components/Backdrop/BackdropData.module.css.js +135 -0
  41. package/dist/components/Backdrop/BackdropData.module.css.js.map +1 -0
  42. package/dist/components/Backdrop/BackdropDisplay.d.ts +122 -0
  43. package/dist/components/Backdrop/BackdropDisplay.js +80 -0
  44. package/dist/components/Backdrop/BackdropDisplay.js.map +1 -0
  45. package/dist/components/Backdrop/BackdropDisplay.module.css.js +80 -0
  46. package/dist/components/Backdrop/BackdropDisplay.module.css.js.map +1 -0
  47. package/dist/components/Backdrop/BackdropFields.d.ts +122 -0
  48. package/dist/components/Backdrop/BackdropFields.js +196 -0
  49. package/dist/components/Backdrop/BackdropFields.js.map +1 -0
  50. package/dist/components/Backdrop/BackdropFields.module.css.js +104 -0
  51. package/dist/components/Backdrop/BackdropFields.module.css.js.map +1 -0
  52. package/dist/components/Backdrop/BackdropFlows.d.ts +128 -0
  53. package/dist/components/Backdrop/BackdropFlows.js +156 -0
  54. package/dist/components/Backdrop/BackdropFlows.js.map +1 -0
  55. package/dist/components/Backdrop/BackdropFlows.module.css.js +80 -0
  56. package/dist/components/Backdrop/BackdropFlows.module.css.js.map +1 -0
  57. package/dist/components/Backdrop/BackdropFrame.d.ts +36 -0
  58. package/dist/components/Backdrop/BackdropFrame.js +15 -0
  59. package/dist/components/Backdrop/BackdropFrame.js.map +1 -0
  60. package/dist/components/Backdrop/BackdropFrame.module.css.js +14 -0
  61. package/dist/components/Backdrop/BackdropFrame.module.css.js.map +1 -0
  62. package/dist/components/Backdrop/BackdropGlobalPanels.d.ts +272 -0
  63. package/dist/components/Backdrop/BackdropGlobalPanels.js +264 -0
  64. package/dist/components/Backdrop/BackdropGlobalPanels.js.map +1 -0
  65. package/dist/components/Backdrop/BackdropGlobalPanels.module.css.js +201 -0
  66. package/dist/components/Backdrop/BackdropGlobalPanels.module.css.js.map +1 -0
  67. package/dist/components/Backdrop/BackdropHub.d.ts +80 -0
  68. package/dist/components/Backdrop/BackdropHub.js +92 -0
  69. package/dist/components/Backdrop/BackdropHub.js.map +1 -0
  70. package/dist/components/Backdrop/BackdropHub.module.css.js +40 -0
  71. package/dist/components/Backdrop/BackdropHub.module.css.js.map +1 -0
  72. package/dist/components/Backdrop/BackdropLists.d.ts +165 -0
  73. package/dist/components/Backdrop/BackdropLists.js +162 -0
  74. package/dist/components/Backdrop/BackdropLists.js.map +1 -0
  75. package/dist/components/Backdrop/BackdropLists.module.css.js +114 -0
  76. package/dist/components/Backdrop/BackdropLists.module.css.js.map +1 -0
  77. package/dist/components/Backdrop/BackdropOverlays.d.ts +175 -0
  78. package/dist/components/Backdrop/BackdropOverlays.js +252 -0
  79. package/dist/components/Backdrop/BackdropOverlays.js.map +1 -0
  80. package/dist/components/Backdrop/BackdropOverlays.module.css.js +104 -0
  81. package/dist/components/Backdrop/BackdropOverlays.module.css.js.map +1 -0
  82. package/dist/components/Backdrop/BackdropPage.d.ts +73 -0
  83. package/dist/components/Backdrop/BackdropPage.js +65 -0
  84. package/dist/components/Backdrop/BackdropPage.js.map +1 -0
  85. package/dist/components/Backdrop/BackdropPage.module.css.js +46 -0
  86. package/dist/components/Backdrop/BackdropPage.module.css.js.map +1 -0
  87. package/dist/components/Backdrop/BackdropPatterns.d.ts +224 -0
  88. package/dist/components/Backdrop/BackdropPatterns.js +202 -0
  89. package/dist/components/Backdrop/BackdropPatterns.js.map +1 -0
  90. package/dist/components/Backdrop/BackdropPatterns.module.css.js +114 -0
  91. package/dist/components/Backdrop/BackdropPatterns.module.css.js.map +1 -0
  92. package/dist/components/Backdrop/BackdropRail.d.ts +63 -0
  93. package/dist/components/Backdrop/BackdropRail.js +98 -0
  94. package/dist/components/Backdrop/BackdropRail.js.map +1 -0
  95. package/dist/components/Backdrop/BackdropRail.module.css.js +42 -0
  96. package/dist/components/Backdrop/BackdropRail.module.css.js.map +1 -0
  97. package/dist/components/Backdrop/BackdropSheets.d.ts +68 -0
  98. package/dist/components/Backdrop/BackdropSheets.js +75 -0
  99. package/dist/components/Backdrop/BackdropSheets.js.map +1 -0
  100. package/dist/components/Backdrop/BackdropSheets.module.css.js +42 -0
  101. package/dist/components/Backdrop/BackdropSheets.module.css.js.map +1 -0
  102. package/dist/components/Backdrop/BackdropTabs.d.ts +20 -0
  103. package/dist/components/Backdrop/BackdropTabs.js +31 -0
  104. package/dist/components/Backdrop/BackdropTabs.js.map +1 -0
  105. package/dist/components/Backdrop/BackdropTabs.module.css.js +16 -0
  106. package/dist/components/Backdrop/BackdropTabs.module.css.js.map +1 -0
  107. package/dist/components/Backdrop/BackdropTooltip.d.ts +21 -0
  108. package/dist/components/Backdrop/BackdropTooltip.js +15 -0
  109. package/dist/components/Backdrop/BackdropTooltip.js.map +1 -0
  110. package/dist/components/Backdrop/BackdropTooltip.module.css.js +18 -0
  111. package/dist/components/Backdrop/BackdropTooltip.module.css.js.map +1 -0
  112. package/dist/components/Backdrop/BackdropTopStrip.d.ts +65 -0
  113. package/dist/components/Backdrop/BackdropTopStrip.js +46 -0
  114. package/dist/components/Backdrop/BackdropTopStrip.js.map +1 -0
  115. package/dist/components/Backdrop/BackdropTopStrip.module.css.js +40 -0
  116. package/dist/components/Backdrop/BackdropTopStrip.module.css.js.map +1 -0
  117. package/dist/components/Backdrop/cx.d.ts +2 -0
  118. package/dist/components/Backdrop/cx.js +7 -0
  119. package/dist/components/Backdrop/cx.js.map +1 -0
  120. package/dist/components/Backdrop/icons.d.ts +70 -0
  121. package/dist/components/Backdrop/icons.js +103 -0
  122. package/dist/components/Backdrop/icons.js.map +1 -0
  123. package/package.json +23 -4
@@ -0,0 +1,156 @@
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
+ import { useId as g } from "react";
3
+ import l from "./BackdropFlows.module.css.js";
4
+ import { cx as b } from "./cx.js";
5
+ import { Close as w } from "./icons.js";
6
+ import { BackdropIconButton as B, BackdropButton as v } from "./BackdropButton.js";
7
+ import { BackdropPageHeader as S, BackdropCard as C, BackdropSectionHeader as z } from "./BackdropPage.js";
8
+ import { BackdropIconTile as I } from "./BackdropDisplay.js";
9
+ import { BackdropStepList as D } from "./BackdropGlobalPanels.js";
10
+ function P({
11
+ label: s,
12
+ description: r,
13
+ htmlFor: n,
14
+ children: o,
15
+ action: a,
16
+ layout: t = "columns",
17
+ align: c = "center",
18
+ linkComponent: i,
19
+ className: h,
20
+ ...f
21
+ }) {
22
+ const m = g(), u = n !== void 0, N = `${m}-label`, k = r != null ? u ? `${n}-description` : `${m}-description` : void 0, p = u ? "label" : "span";
23
+ return /* @__PURE__ */ d(
24
+ "div",
25
+ {
26
+ role: u ? void 0 : "group",
27
+ "aria-labelledby": u ? void 0 : N,
28
+ "aria-describedby": u ? void 0 : k,
29
+ className: b(l.row, t === "stacked" ? l.rowStacked : l.rowColumns, c === "start" && l.rowStart, h),
30
+ ...f,
31
+ children: [
32
+ /* @__PURE__ */ d("div", { className: l.rowLabelColumn, children: [
33
+ /* @__PURE__ */ e(p, { id: N, htmlFor: n, className: l.rowLabel, children: s }),
34
+ r != null && /* @__PURE__ */ e("span", { id: k, className: l.rowDescription, children: r })
35
+ ] }),
36
+ o != null && /* @__PURE__ */ e("div", { className: l.rowControl, children: o }),
37
+ a && /* @__PURE__ */ e("div", { className: l.rowAction, children: /* @__PURE__ */ e(v, { variant: "outline", size: "lg", href: a.href, linkComponent: i, onClick: a.onClick, children: a.label }) })
38
+ ]
39
+ }
40
+ );
41
+ }
42
+ function T({
43
+ title: s,
44
+ description: r,
45
+ action: n,
46
+ level: o = 2,
47
+ children: a,
48
+ linkComponent: t,
49
+ className: c,
50
+ ...i
51
+ }) {
52
+ const h = g();
53
+ return /* @__PURE__ */ d("section", { "aria-labelledby": h, className: b(l.settingsSection, c), ...i, children: [
54
+ /* @__PURE__ */ d("div", { className: l.settingsSectionHead, children: [
55
+ /* @__PURE__ */ e(z, { label: s, level: o, action: n, headingId: h, linkComponent: t }),
56
+ r != null && /* @__PURE__ */ e("p", { className: l.settingsSectionDescription, children: r })
57
+ ] }),
58
+ /* @__PURE__ */ e("div", { className: l.settingsSectionRows, children: a })
59
+ ] });
60
+ }
61
+ function V({
62
+ cancel: s,
63
+ save: r,
64
+ emphasis: n = "ink",
65
+ status: o,
66
+ busy: a = !1,
67
+ saveDisabled: t = !1,
68
+ appearance: c = "bar",
69
+ sticky: i = !1,
70
+ linkComponent: h,
71
+ className: f
72
+ }) {
73
+ const m = c === "bar";
74
+ return /* @__PURE__ */ d("div", { className: b(l.footer, m && l.footerBar, m && i && l.footerSticky, f), children: [
75
+ o != null && /* @__PURE__ */ e("span", { className: l.footerStatus, children: o }),
76
+ /* @__PURE__ */ d("div", { className: l.footerButtons, children: [
77
+ /* @__PURE__ */ e(v, { variant: "ghost", size: "lg", href: s.href, linkComponent: h, onClick: s.onClick, children: s.label }),
78
+ /* @__PURE__ */ e(
79
+ v,
80
+ {
81
+ variant: n,
82
+ size: "lg",
83
+ loading: a,
84
+ disabled: t || void 0,
85
+ href: r.href,
86
+ linkComponent: h,
87
+ onClick: r.onClick,
88
+ children: r.label
89
+ }
90
+ )
91
+ ] })
92
+ ] });
93
+ }
94
+ function q({
95
+ mark: s,
96
+ flowName: r,
97
+ steps: n,
98
+ stepsLabel: o,
99
+ stepText: a,
100
+ title: t,
101
+ description: c,
102
+ exitLabel: i,
103
+ className: h
104
+ }) {
105
+ return /* @__PURE__ */ d("div", { className: b(l.flow, h), children: [
106
+ /* @__PURE__ */ d("div", { className: l.flowBar, children: [
107
+ /* @__PURE__ */ d("div", { className: l.flowIdentity, children: [
108
+ s != null && /* @__PURE__ */ e("span", { className: l.flowMark, "aria-hidden": "true", children: s }),
109
+ /* @__PURE__ */ e("span", { className: l.flowName, children: r })
110
+ ] }),
111
+ n && n.length > 0 && o !== void 0 && /* @__PURE__ */ e("div", { className: l.flowSteps, children: /* @__PURE__ */ e(D, { steps: n, label: o, orientation: "horizontal" }) }),
112
+ /* @__PURE__ */ e("div", { className: l.flowExit, children: i && /* @__PURE__ */ e(B, { label: i, icon: /* @__PURE__ */ e(w, {}), size: "md", tooltip: !1 }) })
113
+ ] }),
114
+ (t != null || a != null) && /* @__PURE__ */ d("div", { className: l.flowHeading, children: [
115
+ a != null && /* @__PURE__ */ e("p", { className: l.flowStepText, children: a }),
116
+ t != null && /* @__PURE__ */ e(S, { size: "hero", title: t, fact: c })
117
+ ] })
118
+ ] });
119
+ }
120
+ function F({
121
+ tone: s = "neutral",
122
+ icon: r,
123
+ title: n,
124
+ body: o,
125
+ details: a,
126
+ detailsLabel: t,
127
+ primaryAction: c,
128
+ secondaryAction: i,
129
+ headingLevel: h = 1,
130
+ linkComponent: f,
131
+ className: m,
132
+ ...u
133
+ }) {
134
+ const N = g(), k = h === 2 ? "h2" : "h1";
135
+ return /* @__PURE__ */ d("section", { "aria-labelledby": N, className: b(l.result, m), "data-tone": s, ...u, children: [
136
+ /* @__PURE__ */ e(I, { size: "empty", shape: "circle", tone: s, className: l.resultIcon, children: r }),
137
+ /* @__PURE__ */ e(k, { id: N, className: l.resultTitle, children: n }),
138
+ o != null && /* @__PURE__ */ e("p", { className: l.resultBody, children: o }),
139
+ a && a.length > 0 && /* @__PURE__ */ e(C, { surface: "flat", padding: "md", className: l.resultCard, children: /* @__PURE__ */ e("dl", { className: l.resultDetails, "aria-label": t, children: a.map((p) => /* @__PURE__ */ d("div", { className: l.resultDetail, children: [
140
+ /* @__PURE__ */ e("dt", { className: l.resultDetailLabel, children: p.label }),
141
+ /* @__PURE__ */ e("dd", { className: l.resultDetailValue, children: p.value })
142
+ ] }, p.key)) }) }),
143
+ (c || i) && /* @__PURE__ */ d("div", { className: l.resultActions, children: [
144
+ c && /* @__PURE__ */ e(v, { variant: "primary", size: "lg", href: c.href, linkComponent: f, onClick: c.onClick, children: c.label }),
145
+ i && /* @__PURE__ */ e(v, { variant: "outline", size: "lg", href: i.href, linkComponent: f, onClick: i.onClick, children: i.label })
146
+ ] })
147
+ ] });
148
+ }
149
+ export {
150
+ q as BackdropFlowHeader,
151
+ F as BackdropResult,
152
+ V as BackdropSaveFooter,
153
+ P as BackdropSettingsRow,
154
+ T as BackdropSettingsSection
155
+ };
156
+ //# sourceMappingURL=BackdropFlows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackdropFlows.js","sources":["../../../src/components/Backdrop/BackdropFlows.tsx"],"sourcesContent":["import { useId, type ElementType, type HTMLAttributes, type ReactNode } from 'react'\nimport styles from './BackdropFlows.module.css'\nimport { cx } from './cx'\nimport { Close } from './icons'\nimport { BackdropButton, BackdropIconButton } from './BackdropButton'\nimport { BackdropCard, BackdropPageHeader, BackdropSectionHeader, type BackdropPageAction } from './BackdropPage'\nimport { BackdropIconTile } from './BackdropDisplay'\nimport { BackdropStepList, type BackdropStep } from './BackdropGlobalPanels'\n\n/*\n * Batch 2 · Flows (N14–N16). Stage A: static and presentational. No state and\n * no event handler of its own: every action takes the package's one action\n * shape ({ label, onClick?, href? }, as BackdropNextStepCard and\n * BackdropAvailability do), so Stage B wires them all the same way.\n *\n * Settings row a label column beside a control column, on a ruled row.\n * Settings section a titled group of rows, headed by BackdropSectionHeader.\n * Save footer Cancel / Save, as a bar (optionally sticky) or bare for\n * BackdropDialog's own footer slot.\n * Flow header the bar across a multi-step setup: the app's mark and the\n * flow's name, the stepper (BackdropStepList horizontal),\n * an exit button; then \"Step N of M\" and the step's title.\n * Result the centred outcome after an action: a toned circle\n * (BackdropIconTile), a title, one line, an optional\n * key-value card (BackdropCard), up to two actions.\n *\n * Every visible word is a prop: the package holds no copy (tests/no-hardcoded-\n * strings.test.ts). Controls are not built here; a row takes any control as\n * its children.\n */\n\n/* ── Settings row (N14) ─────────────────────────────────────────────────── */\n\n/**\n * `columns` (default): the label in a 200px column beside the control\n * (--backdrop-settings-label-width). `stacked`: the label above the control,\n * for a container too narrow for a column (a 480px form dialog).\n */\nexport type BackdropSettingsRowLayout = 'columns' | 'stacked'\n\nexport interface BackdropSettingsRowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n /** The setting's name: \"Daily limit\". 15/22, semibold. */\n label: ReactNode\n /** One line under the name: \"Messages sent per channel each day.\" 14/20, muted. */\n description?: ReactNode\n /**\n * The id of the control this row labels. With it the name renders as a\n * `<label htmlFor>`, so a native control is named by it, and the row is not\n * also a group (the name would be read twice). The description's id is then\n * `${htmlFor}-description`, for the control's `aria-describedby`. Without it\n * the name is a plain span and the row names itself as a group, described\n * by the description.\n */\n htmlFor?: string\n /** The control: an input, a select, a switch, a value. */\n children?: ReactNode\n /** One trailing action after the control: \"Change\", \"Disconnect\". An outline button at 34px. */\n action?: BackdropPageAction\n layout?: BackdropSettingsRowLayout\n /**\n * `center` (default) centres the label on the control, right for a 40px\n * input or a switch. `start` tops them, for a tall control (a text area).\n */\n align?: 'center' | 'start'\n linkComponent?: ElementType\n}\n\n/*\n * Without `htmlFor` the row is a group named by its label and described by its\n * description, so the setting reads whole whatever the control is (a switch\n * with its own name, a value, a segmented control). With it, the label names\n * the native control directly. Rows separate with a\n * hairline in --backdrop-line (ADR-0017, D8), drawn between rows only.\n */\nexport function BackdropSettingsRow({\n label,\n description,\n htmlFor,\n children,\n action,\n layout = 'columns',\n align = 'center',\n linkComponent,\n className,\n ...rest\n}: BackdropSettingsRowProps) {\n const id = useId()\n const labelsControl = htmlFor !== undefined\n const labelId = `${id}-label`\n const descriptionId = description != null ? (labelsControl ? `${htmlFor}-description` : `${id}-description`) : undefined\n const Name = labelsControl ? 'label' : 'span'\n return (\n <div\n role={labelsControl ? undefined : 'group'}\n aria-labelledby={labelsControl ? undefined : labelId}\n aria-describedby={labelsControl ? undefined : descriptionId}\n className={cx(styles.row, layout === 'stacked' ? styles.rowStacked : styles.rowColumns, align === 'start' && styles.rowStart, className)}\n {...rest}\n >\n <div className={styles.rowLabelColumn}>\n <Name id={labelId} htmlFor={htmlFor} className={styles.rowLabel}>\n {label}\n </Name>\n {description != null && (\n <span id={descriptionId} className={styles.rowDescription}>\n {description}\n </span>\n )}\n </div>\n {children != null && <div className={styles.rowControl}>{children}</div>}\n {action && (\n <div className={styles.rowAction}>\n <BackdropButton variant=\"outline\" size=\"lg\" href={action.href} linkComponent={linkComponent} onClick={action.onClick}>\n {action.label}\n </BackdropButton>\n </div>\n )}\n </div>\n )\n}\n\n/* ── Settings section (N14) ─────────────────────────────────────────────── */\n\nexport interface BackdropSettingsSectionProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'children'> {\n /** The section's name: \"Sending\". Drawn by BackdropSectionHeader. */\n title: ReactNode\n /** One line under the name: \"Added to the end of every email.\" 14/20, muted. */\n description?: ReactNode\n /** A trailing link in the header: \"Reset to defaults\". */\n action?: BackdropPageAction\n /** 2 under a page title (default), 3 inside a settings dialog, whose title is the h2. Size does not change. */\n level?: 2 | 3\n /** BackdropSettingsRow elements. */\n children: ReactNode\n linkComponent?: ElementType\n}\n\n/** A `<section>` named by its heading, holding a run of ruled rows. */\nexport function BackdropSettingsSection({\n title,\n description,\n action,\n level = 2,\n children,\n linkComponent,\n className,\n ...rest\n}: BackdropSettingsSectionProps) {\n const headingId = useId()\n return (\n <section aria-labelledby={headingId} className={cx(styles.settingsSection, className)} {...rest}>\n <div className={styles.settingsSectionHead}>\n <BackdropSectionHeader label={title} level={level} action={action} headingId={headingId} linkComponent={linkComponent} />\n {description != null && <p className={styles.settingsSectionDescription}>{description}</p>}\n </div>\n <div className={styles.settingsSectionRows}>{children}</div>\n </section>\n )\n}\n\n/* ── Save footer (N14) ──────────────────────────────────────────────────── */\n\nexport interface BackdropSaveFooterProps {\n /** \"Cancel\": a ghost button. */\n cancel: BackdropPageAction\n /** \"Save\": ink by default, the primary inside a dialog. */\n save: BackdropPageAction\n /**\n * `ink` (default) as in a dialog. `primary` is the screen's one orange\n * action, for a settings page with no other primary on it.\n */\n emphasis?: 'ink' | 'primary'\n /** A short fact at the start of the bar: \"Unsaved changes\". Muted. */\n status?: ReactNode\n /** The save is in progress: Save shows the button's spinner and `aria-busy`. */\n busy?: boolean\n /** Nothing to save yet. */\n saveDisabled?: boolean\n /**\n * `bar` (default): its own white bar with a hairline above, padded 16 / 24.\n * `plain`: the two buttons only, to pass as BackdropDialog's `footer`, which\n * draws the bar itself.\n */\n appearance?: 'bar' | 'plain'\n /** `bar` only: stick to the bottom of the scrolling container. */\n sticky?: boolean\n linkComponent?: ElementType\n className?: string\n}\n\nexport function BackdropSaveFooter({\n cancel,\n save,\n emphasis = 'ink',\n status,\n busy = false,\n saveDisabled = false,\n appearance = 'bar',\n sticky = false,\n linkComponent,\n className,\n}: BackdropSaveFooterProps) {\n const bar = appearance === 'bar'\n return (\n <div className={cx(styles.footer, bar && styles.footerBar, bar && sticky && styles.footerSticky, className)}>\n {status != null && <span className={styles.footerStatus}>{status}</span>}\n <div className={styles.footerButtons}>\n <BackdropButton variant=\"ghost\" size=\"lg\" href={cancel.href} linkComponent={linkComponent} onClick={cancel.onClick}>\n {cancel.label}\n </BackdropButton>\n <BackdropButton\n variant={emphasis}\n size=\"lg\"\n loading={busy}\n disabled={saveDisabled || undefined}\n href={save.href}\n linkComponent={linkComponent}\n onClick={save.onClick}\n >\n {save.label}\n </BackdropButton>\n </div>\n </div>\n )\n}\n\n/* ── Flow header (N15) ──────────────────────────────────────────────────── */\n\nexport interface BackdropFlowHeaderProps {\n /** The app's 32px mark. Decorative: the flow's name follows it. */\n mark?: ReactNode\n /** The flow's name: \"Outbound setup\". */\n flowName: ReactNode\n /** The steps, drawn by BackdropStepList as the horizontal stepper in the bar's middle. */\n steps?: BackdropStep[]\n /** The stepper's accessible name (\"Setup steps\"). Required with `steps`. */\n stepsLabel?: string\n /** The position, formatted by the caller: \"Step 2 of 4\". Above the title. */\n stepText?: ReactNode\n /** The step's title. The page's one h1, at the 40px focus-flow size (ADR-0017, D1). */\n title?: ReactNode\n /** One line under the title. */\n description?: ReactNode\n /** The exit button's name (\"Exit setup\"). Omit to draw no exit. Stage B wires it. */\n exitLabel?: string\n className?: string\n}\n\n/*\n * Two parts, each optional after the bar: the bar (mark, name, stepper, exit)\n * with a hairline below, and the step's heading under it. The heading is\n * BackdropPageHeader at size `hero`, so the focus flow's title exists once.\n */\nexport function BackdropFlowHeader({\n mark,\n flowName,\n steps,\n stepsLabel,\n stepText,\n title,\n description,\n exitLabel,\n className,\n}: BackdropFlowHeaderProps) {\n return (\n <div className={cx(styles.flow, className)}>\n <div className={styles.flowBar}>\n <div className={styles.flowIdentity}>\n {mark != null && (\n <span className={styles.flowMark} aria-hidden=\"true\">\n {mark}\n </span>\n )}\n <span className={styles.flowName}>{flowName}</span>\n </div>\n {steps && steps.length > 0 && stepsLabel !== undefined && (\n <div className={styles.flowSteps}>\n <BackdropStepList steps={steps} label={stepsLabel} orientation=\"horizontal\" />\n </div>\n )}\n <div className={styles.flowExit}>{exitLabel && <BackdropIconButton label={exitLabel} icon={<Close />} size=\"md\" tooltip={false} />}</div>\n </div>\n {(title != null || stepText != null) && (\n <div className={styles.flowHeading}>\n {stepText != null && <p className={styles.flowStepText}>{stepText}</p>}\n {title != null && <BackdropPageHeader size=\"hero\" title={title} fact={description} />}\n </div>\n )}\n </div>\n )\n}\n\n/* ── Result (N16) ───────────────────────────────────────────────────────── */\n\n/** The outcome's tone, in the status pill's colours (ADR-0017, D7). */\nexport type BackdropResultTone = 'success' | 'danger' | 'neutral'\n\n/** One line of the details card: \"Amount\" · \"€1,200.00\". */\nexport interface BackdropResultDetail {\n key: string\n label: ReactNode\n value: ReactNode\n}\n\nexport interface BackdropResultProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'children'> {\n tone?: BackdropResultTone\n /** 20px (ADR-0017, D17), drawn in the 48px circle: a check, a cross, an hourglass. Decorative. */\n icon: ReactNode\n /** \"Payment received\". The page's h1 by default. */\n title: ReactNode\n /** One line: \"€1,200 is now in your wallet.\" */\n body?: ReactNode\n /** Key-value lines in a flat card under the body. */\n details?: BackdropResultDetail[]\n /** The details list's accessible name (\"Payment details\"). */\n detailsLabel?: string\n /** The main next step: the screen's orange button. */\n primaryAction?: BackdropPageAction\n /** A second, quieter step: an outline button after the first. */\n secondaryAction?: BackdropPageAction\n /** 1 (default) on its own page; 2 inside a dialog or under another title. Size does not change. */\n headingLevel?: 1 | 2\n linkComponent?: ElementType\n}\n\n/*\n * The empty state's shape (D12), grown for an outcome: the 48px tile drawn as\n * a toned circle, the page title's size, a card of facts, two actions. A\n * static region: the outcome is the page, not an announcement over it.\n */\nexport function BackdropResult({\n tone = 'neutral',\n icon,\n title,\n body,\n details,\n detailsLabel,\n primaryAction,\n secondaryAction,\n headingLevel = 1,\n linkComponent,\n className,\n ...rest\n}: BackdropResultProps) {\n const headingId = useId()\n const Heading = headingLevel === 2 ? 'h2' : 'h1'\n return (\n <section aria-labelledby={headingId} className={cx(styles.result, className)} data-tone={tone} {...rest}>\n <BackdropIconTile size=\"empty\" shape=\"circle\" tone={tone} className={styles.resultIcon}>\n {icon}\n </BackdropIconTile>\n <Heading id={headingId} className={styles.resultTitle}>\n {title}\n </Heading>\n {body != null && <p className={styles.resultBody}>{body}</p>}\n {details && details.length > 0 && (\n <BackdropCard surface=\"flat\" padding=\"md\" className={styles.resultCard}>\n <dl className={styles.resultDetails} aria-label={detailsLabel}>\n {details.map((detail) => (\n <div key={detail.key} className={styles.resultDetail}>\n <dt className={styles.resultDetailLabel}>{detail.label}</dt>\n <dd className={styles.resultDetailValue}>{detail.value}</dd>\n </div>\n ))}\n </dl>\n </BackdropCard>\n )}\n {(primaryAction || secondaryAction) && (\n <div className={styles.resultActions}>\n {primaryAction && (\n <BackdropButton variant=\"primary\" size=\"lg\" href={primaryAction.href} linkComponent={linkComponent} onClick={primaryAction.onClick}>\n {primaryAction.label}\n </BackdropButton>\n )}\n {secondaryAction && (\n <BackdropButton variant=\"outline\" size=\"lg\" href={secondaryAction.href} linkComponent={linkComponent} onClick={secondaryAction.onClick}>\n {secondaryAction.label}\n </BackdropButton>\n )}\n </div>\n )}\n </section>\n )\n}\n"],"names":["BackdropSettingsRow","label","description","htmlFor","children","action","layout","align","linkComponent","className","rest","id","useId","labelsControl","labelId","descriptionId","Name","jsxs","cx","styles","jsx","BackdropButton","BackdropSettingsSection","title","level","headingId","BackdropSectionHeader","BackdropSaveFooter","cancel","save","emphasis","status","busy","saveDisabled","appearance","sticky","bar","BackdropFlowHeader","mark","flowName","steps","stepsLabel","stepText","exitLabel","BackdropStepList","BackdropIconButton","Close","BackdropPageHeader","BackdropResult","tone","icon","body","details","detailsLabel","primaryAction","secondaryAction","headingLevel","Heading","BackdropIconTile","BackdropCard","detail"],"mappings":";;;;;;;;;AA0EO,SAASA,EAAoB;AAAA,EAClC,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,OAAAC,IAAQ;AAAA,EACR,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,GAA6B;AAC3B,QAAMC,IAAKC,EAAA,GACLC,IAAgBV,MAAY,QAC5BW,IAAU,GAAGH,CAAE,UACfI,IAAgBb,KAAe,OAAQW,IAAgB,GAAGV,CAAO,iBAAiB,GAAGQ,CAAE,iBAAkB,QACzGK,IAAOH,IAAgB,UAAU;AACvC,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAMJ,IAAgB,SAAY;AAAA,MAClC,mBAAiBA,IAAgB,SAAYC;AAAA,MAC7C,oBAAkBD,IAAgB,SAAYE;AAAA,MAC9C,WAAWG,EAAGC,EAAO,KAAKb,MAAW,YAAYa,EAA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A;AAAA,MAAAmC,KACC,gBAAAlC,EAACC,GAAA,EAAe,SAAQ,WAAU,MAAK,MAAK,MAAMiC,EAAc,MAAM,eAAA9C,GAA8B,SAAS8C,EAAc,SACxH,YAAc,OACjB;AAAA,MAEDC,KACC,gBAAAnC,EAACC,GAAA,EAAe,SAAQ,WAAU,MAAK,MAAK,MAAMkC,EAAgB,MAAM,eAAA/C,GAA8B,SAAS+C,EAAgB,SAC5H,YAAgB,MAAA,CACnB;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -0,0 +1,80 @@
1
+ const t = "_row_1nkyt_15", o = "_rowColumns_1nkyt_28", n = "_rowLabelColumn_1nkyt_32", e = "_rowStart_1nkyt_37", s = "_rowStacked_1nkyt_47", _ = "_rowLabel_1nkyt_32", r = "_rowDescription_1nkyt_66", l = "_rowControl_1nkyt_72", c = "_rowAction_1nkyt_84", i = "_settingsSection_1nkyt_95", w = "_settingsSectionHead_1nkyt_103", a = "_settingsSectionDescription_1nkyt_109", y = "_settingsSectionRows_1nkyt_116", k = "_footer_1nkyt_123", u = "_footerBar_1nkyt_133", f = "_footerSticky_1nkyt_139", S = "_footerStatus_1nkyt_145", d = "_footerButtons_1nkyt_153", D = "_flow_1nkyt_161", g = "_flowBar_1nkyt_170", p = "_flowIdentity_1nkyt_180", B = "_flowExit_1nkyt_181", C = "_flowMark_1nkyt_196", b = "_flowName_1nkyt_201", m = "_flowSteps_1nkyt_210", L = "_flowHeading_1nkyt_216", x = "_flowStepText_1nkyt_223", A = "_result_1nkyt_234", H = "_resultIcon_1nkyt_248", I = "_resultTitle_1nkyt_258", T = "_resultBody_1nkyt_267", E = "_resultCard_1nkyt_274", M = "_resultDetails_1nkyt_281", N = "_resultDetail_1nkyt_281", R = "_resultDetailLabel_1nkyt_297", V = "_resultDetailValue_1nkyt_301", h = "_resultActions_1nkyt_308", j = {
2
+ row: t,
3
+ rowColumns: o,
4
+ rowLabelColumn: n,
5
+ rowStart: e,
6
+ rowStacked: s,
7
+ rowLabel: _,
8
+ rowDescription: r,
9
+ rowControl: l,
10
+ rowAction: c,
11
+ settingsSection: i,
12
+ settingsSectionHead: w,
13
+ settingsSectionDescription: a,
14
+ settingsSectionRows: y,
15
+ footer: k,
16
+ footerBar: u,
17
+ footerSticky: f,
18
+ footerStatus: S,
19
+ footerButtons: d,
20
+ flow: D,
21
+ flowBar: g,
22
+ flowIdentity: p,
23
+ flowExit: B,
24
+ flowMark: C,
25
+ flowName: b,
26
+ flowSteps: m,
27
+ flowHeading: L,
28
+ flowStepText: x,
29
+ result: A,
30
+ resultIcon: H,
31
+ resultTitle: I,
32
+ resultBody: T,
33
+ resultCard: E,
34
+ resultDetails: M,
35
+ resultDetail: N,
36
+ resultDetailLabel: R,
37
+ resultDetailValue: V,
38
+ resultActions: h
39
+ };
40
+ export {
41
+ j as default,
42
+ D as flow,
43
+ g as flowBar,
44
+ B as flowExit,
45
+ L as flowHeading,
46
+ p as flowIdentity,
47
+ C as flowMark,
48
+ b as flowName,
49
+ x as flowStepText,
50
+ m as flowSteps,
51
+ k as footer,
52
+ u as footerBar,
53
+ d as footerButtons,
54
+ S as footerStatus,
55
+ f as footerSticky,
56
+ A as result,
57
+ h as resultActions,
58
+ T as resultBody,
59
+ E as resultCard,
60
+ N as resultDetail,
61
+ R as resultDetailLabel,
62
+ V as resultDetailValue,
63
+ M as resultDetails,
64
+ H as resultIcon,
65
+ I as resultTitle,
66
+ t as row,
67
+ c as rowAction,
68
+ o as rowColumns,
69
+ l as rowControl,
70
+ r as rowDescription,
71
+ _ as rowLabel,
72
+ n as rowLabelColumn,
73
+ s as rowStacked,
74
+ e as rowStart,
75
+ i as settingsSection,
76
+ a as settingsSectionDescription,
77
+ w as settingsSectionHead,
78
+ y as settingsSectionRows
79
+ };
80
+ //# sourceMappingURL=BackdropFlows.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackdropFlows.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,36 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export type BackdropTheme = 'black' | 'light';
3
+ export interface BackdropFrameProps {
4
+ /**
5
+ * The frame's colour. Only the frame differs between the two: the rail, the
6
+ * strip and the edge of the sheet that sits on the frame. Everything on a
7
+ * white sheet is identical in both. Omit it to inherit the theme from an
8
+ * ancestor's `data-backdrop-theme` (black when there is none).
9
+ */
10
+ theme?: BackdropTheme;
11
+ /** Layer 3, across the top: a BackdropTopStrip. */
12
+ strip: ReactNode;
13
+ /** Layer 3, down the left: a BackdropRail. */
14
+ rail: ReactNode;
15
+ /**
16
+ * What sits on the frame: a BackdropHubSheet on the hub and global pages, or
17
+ * a BackdropAppLayer (menu sheet holding the content sheet) inside an app.
18
+ */
19
+ children: ReactNode;
20
+ /**
21
+ * Overlays drawn over the whole frame: an open popover, a dialog, toasts.
22
+ * They are positioned against the frame, so a story or a screenshot shows
23
+ * them in place without a portal.
24
+ */
25
+ overlays?: ReactNode;
26
+ /**
27
+ * The narrow layout: rail items icon-only with tooltips, the app menu folded
28
+ * to its icon strip, Search 280px. `auto` (default) switches below 1200px of
29
+ * viewport; `true`/`false` force it, for a fixed-size story or a host that
30
+ * decides by its own measure.
31
+ */
32
+ compact?: boolean | 'auto';
33
+ className?: string;
34
+ style?: CSSProperties;
35
+ }
36
+ export declare function BackdropFrame({ theme, strip, rail, children, overlays, compact, className, style }: BackdropFrameProps): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
+ import a from "./BackdropFrame.module.css.js";
3
+ import { cx as p } from "./cx.js";
4
+ function x({ theme: e, strip: s, rail: m, children: t, overlays: c, compact: i = "auto", className: o, style: d }) {
5
+ return /* @__PURE__ */ l("div", { className: p(a.frame, o), "data-backdrop-theme": e, "data-backdrop-compact": String(i), style: d, children: [
6
+ /* @__PURE__ */ r("div", { className: a.strip, children: s }),
7
+ /* @__PURE__ */ r("div", { className: a.rail, children: m }),
8
+ /* @__PURE__ */ r("main", { className: a.sheets, children: t }),
9
+ c
10
+ ] });
11
+ }
12
+ export {
13
+ x as BackdropFrame
14
+ };
15
+ //# sourceMappingURL=BackdropFrame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackdropFrame.js","sources":["../../../src/components/Backdrop/BackdropFrame.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react'\nimport styles from './BackdropFrame.module.css'\nimport { cx } from './cx'\n\nexport type BackdropTheme = 'black' | 'light'\n\nexport interface BackdropFrameProps {\n /**\n * The frame's colour. Only the frame differs between the two: the rail, the\n * strip and the edge of the sheet that sits on the frame. Everything on a\n * white sheet is identical in both. Omit it to inherit the theme from an\n * ancestor's `data-backdrop-theme` (black when there is none).\n */\n theme?: BackdropTheme\n /** Layer 3, across the top: a BackdropTopStrip. */\n strip: ReactNode\n /** Layer 3, down the left: a BackdropRail. */\n rail: ReactNode\n /**\n * What sits on the frame: a BackdropHubSheet on the hub and global pages, or\n * a BackdropAppLayer (menu sheet holding the content sheet) inside an app.\n */\n children: ReactNode\n /**\n * Overlays drawn over the whole frame: an open popover, a dialog, toasts.\n * They are positioned against the frame, so a story or a screenshot shows\n * them in place without a portal.\n */\n overlays?: ReactNode\n /**\n * The narrow layout: rail items icon-only with tooltips, the app menu folded\n * to its icon strip, Search 280px. `auto` (default) switches below 1200px of\n * viewport; `true`/`false` force it, for a fixed-size story or a host that\n * decides by its own measure.\n */\n compact?: boolean | 'auto'\n className?: string\n style?: CSSProperties\n}\n\n/*\n * Backdrop's layer 3: the black (or light) frame every Boost33 screen sits in.\n * A grid of three areas -- the 60px strip, the 76px rail, and the sheet area --\n * and nothing else. The sheets own their own insets from the frame edge, because\n * the hub sheet runs off the bottom (no bottom gutter) and the app menu sheet\n * does not (round 4, \"DECISION AFTER THE FRAME TEST\").\n *\n * Fills its container. Give the container a height (100dvh in an app; a fixed\n * artboard size in a story).\n */\nexport function BackdropFrame({ theme, strip, rail, children, overlays, compact = 'auto', className, style }: BackdropFrameProps) {\n return (\n <div className={cx(styles.frame, className)} data-backdrop-theme={theme} data-backdrop-compact={String(compact)} style={style}>\n <div className={styles.strip}>{strip}</div>\n <div className={styles.rail}>{rail}</div>\n <main className={styles.sheets}>{children}</main>\n {overlays}\n </div>\n )\n}\n"],"names":["BackdropFrame","theme","strip","rail","children","overlays","compact","className","style","jsxs","cx","styles","jsx"],"mappings":";;;AAkDO,SAASA,EAAc,EAAE,OAAAC,GAAO,OAAAC,GAAO,MAAAC,GAAM,UAAAC,GAAU,UAAAC,GAAU,SAAAC,IAAU,QAAQ,WAAAC,GAAW,OAAAC,EAAA,GAA6B;AAChI,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAGC,EAAO,OAAOJ,CAAS,GAAG,uBAAqBN,GAAO,yBAAuB,OAAOK,CAAO,GAAG,OAAAE,GAC/G,UAAA;AAAA,IAAA,gBAAAI,EAAC,OAAA,EAAI,WAAWD,EAAO,OAAQ,UAAAT,GAAM;AAAA,IACrC,gBAAAU,EAAC,OAAA,EAAI,WAAWD,EAAO,MAAO,UAAAR,GAAK;AAAA,IACnC,gBAAAS,EAAC,QAAA,EAAK,WAAWD,EAAO,QAAS,UAAAP,GAAS;AAAA,IACzCC;AAAA,EAAA,GACH;AAEJ;"}
@@ -0,0 +1,14 @@
1
+ const s = "_frame_1kx6d_3", t = "_strip_1kx6d_22", e = "_rail_1kx6d_27", _ = "_sheets_1kx6d_32", r = {
2
+ frame: s,
3
+ strip: t,
4
+ rail: e,
5
+ sheets: _
6
+ };
7
+ export {
8
+ r as default,
9
+ s as frame,
10
+ e as rail,
11
+ _ as sheets,
12
+ t as strip
13
+ };
14
+ //# sourceMappingURL=BackdropFrame.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackdropFrame.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,272 @@
1
+ import { ElementType, InputHTMLAttributes, ReactNode } from 'react';
2
+ import { BackdropMenuRow } from './BackdropOverlays';
3
+ export interface BackdropAccountMenuProps {
4
+ person: {
5
+ name: string;
6
+ organisation?: string;
7
+ email?: string;
8
+ };
9
+ /**
10
+ * An optional group above the settings rows, under its own divider (the Hub
11
+ * draws one row there: a link to the organisation's public profile). Omit
12
+ * it and the menu is unchanged.
13
+ */
14
+ topGroup?: BackdropMenuRow[];
15
+ /** Profile, Company, Team, Billing and tokens, the Language row. */
16
+ rows: BackdropMenuRow[];
17
+ /** Sign out, under its own divider. */
18
+ signOut: BackdropMenuRow;
19
+ /** The panel's accessible name. */
20
+ label: string;
21
+ linkComponent?: ElementType;
22
+ }
23
+ export declare function BackdropAccountMenu({ person, topGroup, rows, signOut, label, linkComponent }: BackdropAccountMenuProps): import("react").JSX.Element;
24
+ /** `default` 6px full width; `thin` 4px full width; `mini` 6px and 56px wide, inline in a row. */
25
+ export type BackdropProgressSize = 'default' | 'thin' | 'mini';
26
+ /** `ink` for progress; `success` only where the bar itself reports a good outcome. Never orange. */
27
+ export type BackdropProgressTone = 'ink' | 'success';
28
+ export interface BackdropProgressPart {
29
+ key: string;
30
+ /** 0–1, this part's share of the whole bar. */
31
+ share: number;
32
+ /** The legend line: "<b>710 granted</b> · resets 1 Dec". The words carry the meaning, not the swatch. */
33
+ legend: ReactNode;
34
+ }
35
+ export interface BackdropProgressProps {
36
+ /** 0–1. Ignored when `segments` or `parts` is given. */
37
+ value: number;
38
+ /** The bar's name, e.g. "Outbound, 220 of 310". */
39
+ label: string;
40
+ size?: BackdropProgressSize;
41
+ tone?: BackdropProgressTone;
42
+ /**
43
+ * Segmented: `total` discrete steps, `done` of them filled. The bar then
44
+ * reports `done` of `total` to assistive tech instead of a percentage.
45
+ */
46
+ segments?: {
47
+ total: number;
48
+ done: number;
49
+ };
50
+ /**
51
+ * Two-part: one 8px bar split into two parts (granted vs purchased), each
52
+ * with a legend line under it. The first part is ink, the second grey.
53
+ * Rendered as a labelled group, not a progressbar: it shows a composition,
54
+ * not progress. `size` and `tone` do not apply.
55
+ */
56
+ parts?: [BackdropProgressPart, BackdropProgressPart];
57
+ className?: string;
58
+ }
59
+ /** A 6px ink bar on a track. Ink, never orange: progress is not an action. */
60
+ export declare function BackdropProgress({ value, label, size, tone, segments, parts, className }: BackdropProgressProps): import("react").JSX.Element;
61
+ export interface BackdropTokensPopoverProps {
62
+ /** "Token balance". */
63
+ title: string;
64
+ /** "1,240", formatted by the caller. */
65
+ balance: ReactNode;
66
+ /** "tokens", after the number. */
67
+ unit: ReactNode;
68
+ /**
69
+ * A two-part bar under the balance, with its legend (granted vs purchased).
70
+ * Drawn between the number and the caption. Omit it and the popover is unchanged.
71
+ */
72
+ breakdown?: {
73
+ label: string;
74
+ parts: [BackdropProgressPart, BackdropProgressPart];
75
+ };
76
+ /** One fact: "Enough for about 6 weeks". */
77
+ caption?: ReactNode;
78
+ usage?: {
79
+ /** "Used this month". */
80
+ label: ReactNode;
81
+ total: ReactNode;
82
+ rows: {
83
+ key: string;
84
+ label: ReactNode;
85
+ value: ReactNode;
86
+ share: number;
87
+ barLabel: string;
88
+ }[];
89
+ };
90
+ /**
91
+ * "Buy tokens": an INK button, so the page keeps its one orange. Optional:
92
+ * an account whose wallet is not live has a true balance and nowhere to buy,
93
+ * and a button with no honest label is worse than none.
94
+ */
95
+ primaryAction?: {
96
+ label: string;
97
+ onClick?: () => void;
98
+ href?: string;
99
+ };
100
+ /** "Open wallet": a text link. */
101
+ secondaryAction?: {
102
+ label: string;
103
+ onClick?: () => void;
104
+ href?: string;
105
+ };
106
+ linkComponent?: ElementType;
107
+ }
108
+ export declare function BackdropTokensPopover({ title, balance, unit, breakdown, caption, usage, primaryAction, secondaryAction, linkComponent }: BackdropTokensPopoverProps): import("react").JSX.Element;
109
+ export interface BackdropStep {
110
+ key: string;
111
+ label: ReactNode;
112
+ /**
113
+ * `done` ticks, `next` is highlighted and may carry an action, `todo` is
114
+ * grey, `locked` shows a lock: not reachable yet. Pass a stateLabel saying
115
+ * so ("Locked"), since the lock is an icon.
116
+ */
117
+ state: 'done' | 'next' | 'todo' | 'locked';
118
+ /** The next step's one outline button ("Open replies"). */
119
+ action?: {
120
+ label: string;
121
+ onClick?: () => void;
122
+ href?: string;
123
+ };
124
+ /** Spoken state, since the tick is an icon: "Done". */
125
+ stateLabel?: string;
126
+ /** A right-hand fact for the step: a reward ("+50 tokens"), a date. */
127
+ trailing?: ReactNode;
128
+ }
129
+ export interface BackdropStepListProps {
130
+ steps: BackdropStep[];
131
+ /** The list's name ("Steps"). */
132
+ label: string;
133
+ /** `icon` (default) draws a tick or a circle; `number` draws the step's position in a circle. */
134
+ marker?: 'icon' | 'number';
135
+ /**
136
+ * `vertical` (default) is the checklist. `horizontal` is the stepper across
137
+ * the head of a focus flow: numbered markers joined by a line, no actions.
138
+ */
139
+ orientation?: 'vertical' | 'horizontal';
140
+ /**
141
+ * The colour of a `todo` step's empty circle or numbered ring. `faint`
142
+ * (default) is the light grey the mission and Get started panels draw.
143
+ * `choice` (Batch 3) is --backdrop-choice-off, the 3:1 grey an unselected
144
+ * choice control uses (WCAG 1.4.11): for a checklist on the page, where the
145
+ * empty circle is the only thing saying "not done yet". Vertical only.
146
+ */
147
+ todoTone?: 'faint' | 'choice';
148
+ linkComponent?: ElementType;
149
+ }
150
+ export declare function BackdropStepList({ steps, label, marker, orientation, todoTone, linkComponent }: BackdropStepListProps): import("react").JSX.Element;
151
+ export interface BackdropMissionPopoverProps {
152
+ /** "Book 5 meetings". */
153
+ title: string;
154
+ /** "2 of 5". */
155
+ progressText: ReactNode;
156
+ /** 0–1. */
157
+ progress: number;
158
+ /** The bar's name: "2 of 5 meetings booked". */
159
+ progressLabel: string;
160
+ /** Each step may carry its reward in `trailing` ("+50 tokens"). */
161
+ steps: BackdropStep[];
162
+ stepsLabel: string;
163
+ linkComponent?: ElementType;
164
+ }
165
+ export declare function BackdropMissionPopover({ title, progressText, progress, progressLabel, steps, stepsLabel, linkComponent }: BackdropMissionPopoverProps): import("react").JSX.Element;
166
+ export interface BackdropGetStartedProps {
167
+ /** "Get started". */
168
+ label: string;
169
+ /** "1 of 2". */
170
+ progressText: ReactNode;
171
+ /** 0–1, drawn as a small ring. */
172
+ progress: number;
173
+ /** Its panel is open: the pill holds its pressed state. */
174
+ open?: boolean;
175
+ onToggle?: () => void;
176
+ }
177
+ export declare function BackdropGetStarted({ label, progressText, progress, open, onToggle }: BackdropGetStartedProps): import("react").JSX.Element;
178
+ export interface BackdropGetStartedPanelProps {
179
+ /** "Get started". */
180
+ label: string;
181
+ /** "1 of 2". */
182
+ progressText: ReactNode;
183
+ steps: BackdropStep[];
184
+ stepsLabel: string;
185
+ linkComponent?: ElementType;
186
+ }
187
+ export declare function BackdropGetStartedPanel({ label, progressText, steps, stepsLabel, linkComponent }: BackdropGetStartedPanelProps): import("react").JSX.Element;
188
+ export interface BackdropAllAppsApp {
189
+ key: string;
190
+ name: string;
191
+ mark: ReactNode;
192
+ /**
193
+ * `pinned` shows a filled pin; `unpinned` an outline pin (and a "Pin" button
194
+ * on hover); `link` a trailing text + chevron ("Request access", "Set up");
195
+ * `soon` a Soon tag.
196
+ */
197
+ state: 'pinned' | 'unpinned' | 'link' | 'soon';
198
+ /** Words for the trailing affordance: "Pin", "Unpin", "Request access", "Soon". */
199
+ actionLabel: string;
200
+ href?: string;
201
+ onAction?: () => void;
202
+ /** Draw the hover state, for a story. */
203
+ highlighted?: boolean;
204
+ }
205
+ export interface BackdropAllAppsPopoverProps {
206
+ /** The panel's name ("All apps"). */
207
+ label: string;
208
+ /** The search field's placeholder ("Search apps"). Stage A: a static field. */
209
+ searchPlaceholder: string;
210
+ sections: {
211
+ key: string;
212
+ label: ReactNode;
213
+ apps: BackdropAllAppsApp[];
214
+ }[];
215
+ /** "Pin up to 4 apps to the rail". */
216
+ footer?: ReactNode;
217
+ linkComponent?: ElementType;
218
+ }
219
+ export declare function BackdropAllAppsPopover({ label, searchPlaceholder, sections, footer, linkComponent: Link }: BackdropAllAppsPopoverProps): import("react").JSX.Element;
220
+ export interface BackdropSearchResult {
221
+ key: string;
222
+ /** 24px: an app mark, a company square, a person avatar. */
223
+ leading: ReactNode;
224
+ /** The title, with the matched run in a <mark> (BackdropMatch). */
225
+ title: ReactNode;
226
+ /** Right-hand fact: a city, a status pill. */
227
+ meta?: ReactNode;
228
+ href?: string;
229
+ }
230
+ export interface BackdropSearchDialogProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'className' | 'placeholder' | 'defaultValue'> {
231
+ /** The dialog's name ("Search"). */
232
+ label: string;
233
+ placeholder: string;
234
+ /**
235
+ * What is typed, when the host does not drive the field: it becomes the
236
+ * input's starting value and the person types over it. A host that needs to
237
+ * read what is typed passes `value` and `onChange` instead, like any native
238
+ * field, and `query` is then ignored. Every other input prop reaches the
239
+ * <input> too.
240
+ */
241
+ query: string;
242
+ /** Groups with no result are not passed (round 6: "Apps (none → hide the group)"). */
243
+ groups: {
244
+ key: string;
245
+ label: ReactNode;
246
+ results: BackdropSearchResult[];
247
+ }[];
248
+ /** The highlighted result, the one ↵ opens. */
249
+ activeKey?: string;
250
+ /** "esc" on the key cap. */
251
+ escapeHint: string;
252
+ /** "↑↓ to move · ↵ to open · esc to close". */
253
+ footerHint: ReactNode;
254
+ /** One line when nothing matches: "No matching results". */
255
+ emptyText?: ReactNode;
256
+ contained?: boolean;
257
+ /**
258
+ * Called by Escape and by a press on the scrim, as on any BackdropDialog.
259
+ * The host unmounts the dialog in response; without it the "esc" cap above
260
+ * names a shortcut that does nothing.
261
+ */
262
+ onClose?: () => void;
263
+ /** Its key in a surrounding BackdropChrome, so a ⌘K handler opens it with `useBackdropPanel(panel)`. */
264
+ panel?: string;
265
+ linkComponent?: ElementType;
266
+ }
267
+ /** ⌘K: a 640px dialog 96px from the top, over the light scrim. */
268
+ export declare function BackdropSearchDialog({ label, placeholder, query, groups, activeKey, escapeHint, footerHint, emptyText, contained, onClose, panel, linkComponent: Link, ...rest }: BackdropSearchDialogProps): import("react").JSX.Element;
269
+ /** The matched run inside a search result title. */
270
+ export declare function BackdropMatch({ children }: {
271
+ children: ReactNode;
272
+ }): import("react").JSX.Element;