@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,135 @@
1
+ const e = "_status_1le2u_31", t = "_statusSm_1le2u_42", a = "_statusDot_1le2u_47", s = "_statusRing_1le2u_55", r = "_statusIcon_1le2u_61", _ = "_statusSvg_1le2u_67", o = "_meter_1le2u_82", u = "_meterSuccess_1le2u_92", l = "_meterCaption_1le2u_96", n = "_meterValue_1le2u_102", i = "_ring_1le2u_110", d = "_ringBand_1le2u_120", c = "_ringValue_1le2u_132", m = "_meterSignal_1le2u_140", b = "_signal_1le2u_144", C = "_signalBar_1le2u_152", v = "_signalBarOn_1le2u_158", w = "_signalValue_1le2u_162", y = "_summary_1le2u_170", g = "_summaryHead_1le2u_176", S = "_summaryStatus_1le2u_182", T = "_summaryTitle_1le2u_187", h = "_summaryDescription_1le2u_194", k = "_summaryBody_1le2u_201", B = "_summaryActions_1le2u_208", p = "_checklist_1le2u_216", A = "_checklistHead_1le2u_224", H = "_checklistTitleRow_1le2u_230", R = "_checklistTitle_1le2u_230", V = "_checklistCount_1le2u_244", D = "_review_1le2u_254", I = "_reviewRow_1le2u_259", M = "_reviewStacked_1le2u_263", f = "_reviewBody_1le2u_268", E = "_reviewWho_1le2u_276", F = "_reviewAvatar_1le2u_283", L = "_reviewName_1le2u_288", N = "_reviewMeta_1le2u_295", O = "_reviewTitle_1le2u_303", Q = "_reviewQuote_1le2u_310", W = "_reviewChips_1le2u_323", x = "_reviewActions_1le2u_330", j = "_board_1le2u_340", q = "_boardColumn_1le2u_354", z = "_boardColumnHead_1le2u_366", G = "_boardColumnTitle_1le2u_374", J = "_boardColumnCount_1le2u_385", K = "_boardColumnSummary_1le2u_386", P = "_boardList_1le2u_394", U = "_boardItem_1le2u_403", X = "_boardEmpty_1le2u_408", Y = "_boardCard_1le2u_421", Z = "_boardCardAction_1le2u_438", $ = "_boardCardTop_1le2u_452", ee = "_boardCardMeta_1le2u_459", te = "_boardCardHead_1le2u_465", ae = "_boardCardAvatar_1le2u_471", se = "_boardCardTitles_1le2u_476", re = "_boardCardTitle_1le2u_476", _e = "_boardCardSubtitle_1le2u_489", oe = "_boardCardBody_1le2u_495", ue = "_boardCardFooter_1le2u_500", le = {
2
+ status: e,
3
+ statusSm: t,
4
+ statusDot: a,
5
+ statusRing: s,
6
+ statusIcon: r,
7
+ statusSvg: _,
8
+ "status-neutral": "_status-neutral_1le2u_74",
9
+ "status-success": "_status-success_1le2u_75",
10
+ "status-warning": "_status-warning_1le2u_76",
11
+ "status-danger": "_status-danger_1le2u_77",
12
+ "status-info": "_status-info_1le2u_78",
13
+ meter: o,
14
+ meterSuccess: u,
15
+ meterCaption: l,
16
+ meterValue: n,
17
+ ring: i,
18
+ ringBand: d,
19
+ ringValue: c,
20
+ meterSignal: m,
21
+ signal: b,
22
+ signalBar: C,
23
+ signalBarOn: v,
24
+ signalValue: w,
25
+ summary: y,
26
+ summaryHead: g,
27
+ summaryStatus: S,
28
+ summaryTitle: T,
29
+ summaryDescription: h,
30
+ summaryBody: k,
31
+ summaryActions: B,
32
+ checklist: p,
33
+ checklistHead: A,
34
+ checklistTitleRow: H,
35
+ checklistTitle: R,
36
+ checklistCount: V,
37
+ review: D,
38
+ reviewRow: I,
39
+ reviewStacked: M,
40
+ reviewBody: f,
41
+ reviewWho: E,
42
+ reviewAvatar: F,
43
+ reviewName: L,
44
+ reviewMeta: N,
45
+ reviewTitle: O,
46
+ reviewQuote: Q,
47
+ reviewChips: W,
48
+ reviewActions: x,
49
+ board: j,
50
+ boardColumn: q,
51
+ boardColumnHead: z,
52
+ boardColumnTitle: G,
53
+ boardColumnCount: J,
54
+ boardColumnSummary: K,
55
+ boardList: P,
56
+ boardItem: U,
57
+ boardEmpty: X,
58
+ boardCard: Y,
59
+ boardCardAction: Z,
60
+ boardCardTop: $,
61
+ boardCardMeta: ee,
62
+ boardCardHead: te,
63
+ boardCardAvatar: ae,
64
+ boardCardTitles: se,
65
+ boardCardTitle: re,
66
+ boardCardSubtitle: _e,
67
+ boardCardBody: oe,
68
+ boardCardFooter: ue
69
+ };
70
+ export {
71
+ j as board,
72
+ Y as boardCard,
73
+ Z as boardCardAction,
74
+ ae as boardCardAvatar,
75
+ oe as boardCardBody,
76
+ ue as boardCardFooter,
77
+ te as boardCardHead,
78
+ ee as boardCardMeta,
79
+ _e as boardCardSubtitle,
80
+ re as boardCardTitle,
81
+ se as boardCardTitles,
82
+ $ as boardCardTop,
83
+ q as boardColumn,
84
+ J as boardColumnCount,
85
+ z as boardColumnHead,
86
+ K as boardColumnSummary,
87
+ G as boardColumnTitle,
88
+ X as boardEmpty,
89
+ U as boardItem,
90
+ P as boardList,
91
+ p as checklist,
92
+ V as checklistCount,
93
+ A as checklistHead,
94
+ R as checklistTitle,
95
+ H as checklistTitleRow,
96
+ le as default,
97
+ o as meter,
98
+ l as meterCaption,
99
+ m as meterSignal,
100
+ u as meterSuccess,
101
+ n as meterValue,
102
+ D as review,
103
+ x as reviewActions,
104
+ F as reviewAvatar,
105
+ f as reviewBody,
106
+ W as reviewChips,
107
+ N as reviewMeta,
108
+ L as reviewName,
109
+ Q as reviewQuote,
110
+ I as reviewRow,
111
+ M as reviewStacked,
112
+ O as reviewTitle,
113
+ E as reviewWho,
114
+ i as ring,
115
+ d as ringBand,
116
+ c as ringValue,
117
+ b as signal,
118
+ C as signalBar,
119
+ v as signalBarOn,
120
+ w as signalValue,
121
+ e as status,
122
+ a as statusDot,
123
+ r as statusIcon,
124
+ s as statusRing,
125
+ t as statusSm,
126
+ _ as statusSvg,
127
+ y as summary,
128
+ B as summaryActions,
129
+ k as summaryBody,
130
+ h as summaryDescription,
131
+ g as summaryHead,
132
+ S as summaryStatus,
133
+ T as summaryTitle
134
+ };
135
+ //# sourceMappingURL=BackdropData.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackdropData.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,122 @@
1
+ import { ElementType, HTMLAttributes, ReactNode } from 'react';
2
+ /** The one action shape every Backdrop pattern takes. */
3
+ interface BackdropDisplayAction {
4
+ label: string;
5
+ onClick?: () => void;
6
+ href?: string;
7
+ }
8
+ /**
9
+ * `row` (36px): the tile that leads a row or a card's head row (next-step hero
10
+ * and action list). `empty` (48px): the empty state's tile (ADR-0017, D12).
11
+ * One size per job; the 40, 44 and 56 drawn on some boards are out of date.
12
+ */
13
+ export type BackdropIconTileSize = 'row' | 'empty';
14
+ /**
15
+ * `square` (default) is the grey rounded tile. `circle` is the outcome mark at
16
+ * the head of BackdropResult (Batch 2 · Flows), the same box drawn round.
17
+ */
18
+ export type BackdropIconTileShape = 'square' | 'circle';
19
+ /**
20
+ * `neutral` (default) is the panel grey with ink. `success` and `danger` take
21
+ * the status pill's ground and text colours (ADR-0017, D7), so an outcome reads
22
+ * in the same green and red as its pill.
23
+ */
24
+ export type BackdropIconTileTone = 'neutral' | 'success' | 'danger';
25
+ export interface BackdropIconTileProps {
26
+ /** The icon: 18px in a `row` tile, 20px in an `empty` tile (ADR-0017, D17). Decorative. */
27
+ children: ReactNode;
28
+ size?: BackdropIconTileSize;
29
+ shape?: BackdropIconTileShape;
30
+ tone?: BackdropIconTileTone;
31
+ className?: string;
32
+ }
33
+ /** Decorative: the text beside it names the thing, so the tile is not announced. */
34
+ export declare function BackdropIconTile({ children, size, shape, tone, className }: BackdropIconTileProps): import("react").JSX.Element;
35
+ export interface BackdropEmptyStateProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'children'> {
36
+ /** 20px icon, drawn in the 48px tile. */
37
+ icon: ReactNode;
38
+ /** "No posts published yet". */
39
+ title: ReactNode;
40
+ /** One line of help: "Approve a post to see how it does." */
41
+ body: ReactNode;
42
+ /** At most one, and the screen's orange one when present (ADR-0017, D12). */
43
+ action?: BackdropDisplayAction;
44
+ linkComponent?: ElementType;
45
+ }
46
+ export declare function BackdropEmptyState({ icon, title, body, action, linkComponent, className, ...rest }: BackdropEmptyStateProps): import("react").JSX.Element;
47
+ /** `success`: a figure that is good news (money saved). The label and caption stay muted. */
48
+ export type BackdropStatTone = 'default' | 'success';
49
+ interface BackdropStatBase {
50
+ /** "Expected", "Meetings booked". */
51
+ label: ReactNode;
52
+ /** The figure: "€3,200", "5 of 7". Formatted by the caller; drawn with tabular numerals. */
53
+ value: ReactNode;
54
+ /** One fact under it: "2 open opportunities". */
55
+ caption?: ReactNode;
56
+ tone?: BackdropStatTone;
57
+ className?: string;
58
+ }
59
+ /** Bare on the page: label, number, caption, no box. */
60
+ export interface BackdropStatInlineProps extends BackdropStatBase {
61
+ appearance?: 'inline';
62
+ selected?: never;
63
+ }
64
+ /**
65
+ * A flat card (ADR-0017, D3: a hairline, no shadow). Give it `selected`
66
+ * (true or false) and it becomes a toggle button with `aria-pressed`, drawn
67
+ * with the ink ring when on: the tile that picks what a chart below shows.
68
+ * Stage A: the markup only; the press handler is Stage B's.
69
+ */
70
+ export interface BackdropStatTileProps extends BackdropStatBase {
71
+ appearance: 'tile';
72
+ selected?: boolean;
73
+ }
74
+ export type BackdropStatProps = BackdropStatInlineProps | BackdropStatTileProps;
75
+ export declare function BackdropStat(props: BackdropStatProps): import("react").JSX.Element;
76
+ export interface BackdropStatRowProps {
77
+ /** BackdropStat elements, all of one appearance. */
78
+ children: ReactNode;
79
+ /** `inline` stats sit 48px apart; `tile` stats share the width equally, 16px apart. */
80
+ appearance?: 'inline' | 'tile';
81
+ /** Inline only: close the row with a hairline (a stat strip above a list). */
82
+ divided?: boolean;
83
+ /** Names the group for assistive tech ("This month", "Choose a measure"). */
84
+ label?: string;
85
+ className?: string;
86
+ }
87
+ export declare function BackdropStatRow({ children, appearance, divided, label, className }: BackdropStatRowProps): import("react").JSX.Element;
88
+ /**
89
+ * The status pill's tones that a callout uses, plus the grey `neutral` most
90
+ * boards draw. `warning` is the pill's sand, never red or orange: red is
91
+ * `danger`, kept for something broken or blocked, and orange is the primary
92
+ * button (Jamal at the set 2 gate, 11 Nov).
93
+ */
94
+ export type BackdropCalloutTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
95
+ interface BackdropCalloutBase {
96
+ tone?: BackdropCalloutTone;
97
+ /** 18px in the box, 16px in a note (ADR-0017, D17). Decorative. */
98
+ icon?: ReactNode;
99
+ className?: string;
100
+ }
101
+ /** The tinted block: an icon, an optional short title, the text, an optional single action. */
102
+ export interface BackdropCalloutBoxProps extends BackdropCalloutBase {
103
+ appearance?: 'box';
104
+ /** "Why you", "Key point". Short. */
105
+ title?: ReactNode;
106
+ /** One or two sentences. */
107
+ children: ReactNode;
108
+ /** At most one, drawn as an outline button at the block's end. */
109
+ action?: BackdropDisplayAction;
110
+ linkComponent?: ElementType;
111
+ }
112
+ /** The inline note: an icon and one muted caption line, no box ("Card payment by Stripe"). */
113
+ export interface BackdropCalloutNoteProps extends BackdropCalloutBase {
114
+ appearance: 'note';
115
+ children: ReactNode;
116
+ title?: never;
117
+ action?: never;
118
+ linkComponent?: never;
119
+ }
120
+ export type BackdropCalloutProps = BackdropCalloutBoxProps | BackdropCalloutNoteProps;
121
+ export declare function BackdropCallout(props: BackdropCalloutProps): import("react").JSX.Element;
122
+ export {};
@@ -0,0 +1,80 @@
1
+ import { jsxs as d, jsx as t, Fragment as f } from "react/jsx-runtime";
2
+ import e from "./BackdropDisplay.module.css.js";
3
+ import { cx as o } from "./cx.js";
4
+ import { BackdropButton as N } from "./BackdropButton.js";
5
+ function v({ children: l, size: n = "row", shape: s = "square", tone: a = "neutral", className: c }) {
6
+ return /* @__PURE__ */ t(
7
+ "span",
8
+ {
9
+ className: o(
10
+ e.tile,
11
+ n === "empty" ? e.tileEmpty : e.tileRow,
12
+ s === "circle" && e.tileCircle,
13
+ a === "success" && e.tileSuccess,
14
+ a === "danger" && e.tileDanger,
15
+ c
16
+ ),
17
+ "aria-hidden": "true",
18
+ children: l
19
+ }
20
+ );
21
+ }
22
+ function C({ icon: l, title: n, body: s, action: a, linkComponent: c, className: r, ...i }) {
23
+ return /* @__PURE__ */ d("section", { className: o(e.empty, r), ...i, children: [
24
+ /* @__PURE__ */ t(v, { size: "empty", className: e.emptyTile, children: l }),
25
+ /* @__PURE__ */ t("h2", { className: e.emptyTitle, children: n }),
26
+ /* @__PURE__ */ t("p", { className: e.emptyBody, children: s }),
27
+ a && /* @__PURE__ */ t("div", { className: e.emptyAction, children: /* @__PURE__ */ t(N, { variant: "primary", size: "lg", href: a.href, linkComponent: c, onClick: a.onClick, children: a.label }) })
28
+ ] });
29
+ }
30
+ function T(l) {
31
+ const { label: n, value: s, caption: a, tone: c = "default", className: r } = l, i = l.appearance === "tile", m = i && l.selected !== void 0, u = /* @__PURE__ */ d(f, { children: [
32
+ /* @__PURE__ */ t("span", { className: e.statLabel, children: n }),
33
+ /* @__PURE__ */ t("span", { className: o(e.statValue, c === "success" && e.statValueSuccess), children: s }),
34
+ a !== void 0 && /* @__PURE__ */ t("span", { className: e.statCaption, children: a })
35
+ ] }), h = o(e.stat, i && e.statTile, m && l.selected && e.statSelected, r);
36
+ return m ? /* @__PURE__ */ t("button", { type: "button", className: o(h, e.statButton), "aria-pressed": l.selected, children: u }) : /* @__PURE__ */ t("div", { className: h, children: u });
37
+ }
38
+ function b({ children: l, appearance: n = "inline", divided: s = !1, label: a, className: c }) {
39
+ return /* @__PURE__ */ t(
40
+ "div",
41
+ {
42
+ role: a ? "group" : void 0,
43
+ "aria-label": a,
44
+ className: o(e.statRow, n === "tile" ? e.statRowTile : e.statRowInline, s && n === "inline" && e.statRowDivided, c),
45
+ children: l
46
+ }
47
+ );
48
+ }
49
+ const p = {
50
+ neutral: e.toneNeutral,
51
+ info: e.toneInfo,
52
+ success: e.toneSuccess,
53
+ warning: e.toneWarning,
54
+ danger: e.toneDanger
55
+ };
56
+ function w(l) {
57
+ const { tone: n = "neutral", icon: s, children: a, className: c } = l;
58
+ if (l.appearance === "note")
59
+ return /* @__PURE__ */ d("p", { className: o(e.note, p[n], c), "data-tone": n, children: [
60
+ s !== void 0 && /* @__PURE__ */ t("span", { className: e.noteIcon, "aria-hidden": "true", children: s }),
61
+ /* @__PURE__ */ t("span", { className: e.noteText, children: a })
62
+ ] });
63
+ const { title: r, action: i, linkComponent: m } = l;
64
+ return /* @__PURE__ */ d("div", { role: "note", className: o(e.callout, p[n], c), "data-tone": n, children: [
65
+ s !== void 0 && /* @__PURE__ */ t("span", { className: e.calloutIcon, "aria-hidden": "true", children: s }),
66
+ /* @__PURE__ */ d("div", { className: e.calloutText, children: [
67
+ r !== void 0 && /* @__PURE__ */ t("span", { className: e.calloutTitle, children: r }),
68
+ /* @__PURE__ */ t("span", { className: e.calloutBody, children: a })
69
+ ] }),
70
+ i && /* @__PURE__ */ t("span", { className: e.calloutAction, children: /* @__PURE__ */ t(N, { variant: "outline", size: "md", href: i.href, linkComponent: m, onClick: i.onClick, children: i.label }) })
71
+ ] });
72
+ }
73
+ export {
74
+ w as BackdropCallout,
75
+ C as BackdropEmptyState,
76
+ v as BackdropIconTile,
77
+ T as BackdropStat,
78
+ b as BackdropStatRow
79
+ };
80
+ //# sourceMappingURL=BackdropDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackdropDisplay.js","sources":["../../../src/components/Backdrop/BackdropDisplay.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes, ReactNode } from 'react'\nimport styles from './BackdropDisplay.module.css'\nimport { cx } from './cx'\nimport { BackdropButton } from './BackdropButton'\n\n/*\n * Batch 1 set 2 · Display. The page parts that show a fact rather than take an\n * action. Stage A: static and presentational. Nothing here owns an event\n * handler; actions take the package's one action shape ({ label, onClick?,\n * href? }, as BackdropNextStepCard and BackdropAvailability do) so wiring them\n * in Stage B is uniform.\n *\n * Icon tile a grey rounded square holding an icon. Two sizes, one per job.\n * Empty state the one empty-state design (ADR-0017, D12).\n * Stat label, big number, caption; inline or as a (selectable) tile.\n * Callout a tinted block with an icon and text; or a one-line note.\n */\n\n/** The one action shape every Backdrop pattern takes. */\ninterface BackdropDisplayAction {\n label: string\n onClick?: () => void\n href?: string\n}\n\n/* ── Icon tile ─────────────────────────────────────────────────────────── */\n\n/**\n * `row` (36px): the tile that leads a row or a card's head row (next-step hero\n * and action list). `empty` (48px): the empty state's tile (ADR-0017, D12).\n * One size per job; the 40, 44 and 56 drawn on some boards are out of date.\n */\nexport type BackdropIconTileSize = 'row' | 'empty'\n/**\n * `square` (default) is the grey rounded tile. `circle` is the outcome mark at\n * the head of BackdropResult (Batch 2 · Flows), the same box drawn round.\n */\nexport type BackdropIconTileShape = 'square' | 'circle'\n/**\n * `neutral` (default) is the panel grey with ink. `success` and `danger` take\n * the status pill's ground and text colours (ADR-0017, D7), so an outcome reads\n * in the same green and red as its pill.\n */\nexport type BackdropIconTileTone = 'neutral' | 'success' | 'danger'\n\nexport interface BackdropIconTileProps {\n /** The icon: 18px in a `row` tile, 20px in an `empty` tile (ADR-0017, D17). Decorative. */\n children: ReactNode\n size?: BackdropIconTileSize\n shape?: BackdropIconTileShape\n tone?: BackdropIconTileTone\n className?: string\n}\n\n/** Decorative: the text beside it names the thing, so the tile is not announced. */\nexport function BackdropIconTile({ children, size = 'row', shape = 'square', tone = 'neutral', className }: BackdropIconTileProps) {\n return (\n <span\n className={cx(\n styles.tile,\n size === 'empty' ? styles.tileEmpty : styles.tileRow,\n shape === 'circle' && styles.tileCircle,\n tone === 'success' && styles.tileSuccess,\n tone === 'danger' && styles.tileDanger,\n className,\n )}\n aria-hidden=\"true\"\n >\n {children}\n </span>\n )\n}\n\n/* ── Empty state ───────────────────────────────────────────────────────── */\n\nexport interface BackdropEmptyStateProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'children'> {\n /** 20px icon, drawn in the 48px tile. */\n icon: ReactNode\n /** \"No posts published yet\". */\n title: ReactNode\n /** One line of help: \"Approve a post to see how it does.\" */\n body: ReactNode\n /** At most one, and the screen's orange one when present (ADR-0017, D12). */\n action?: BackdropDisplayAction\n linkComponent?: ElementType\n}\n\n/*\n * ADR-0017, D12: a 48px icon tile, a 20px title, one line of help, at most one\n * action. BackdropAvailability's `empty` state renders through this, so the\n * design exists once. An h2, not an h1: an empty state sits under the page's\n * own title.\n */\nexport function BackdropEmptyState({ icon, title, body, action, linkComponent, className, ...rest }: BackdropEmptyStateProps) {\n return (\n <section className={cx(styles.empty, className)} {...rest}>\n <BackdropIconTile size=\"empty\" className={styles.emptyTile}>\n {icon}\n </BackdropIconTile>\n <h2 className={styles.emptyTitle}>{title}</h2>\n <p className={styles.emptyBody}>{body}</p>\n {action && (\n <div className={styles.emptyAction}>\n <BackdropButton variant=\"primary\" size=\"lg\" href={action.href} linkComponent={linkComponent} onClick={action.onClick}>\n {action.label}\n </BackdropButton>\n </div>\n )}\n </section>\n )\n}\n\n/* ── Stat ──────────────────────────────────────────────────────────────── */\n\n/** `success`: a figure that is good news (money saved). The label and caption stay muted. */\nexport type BackdropStatTone = 'default' | 'success'\n\ninterface BackdropStatBase {\n /** \"Expected\", \"Meetings booked\". */\n label: ReactNode\n /** The figure: \"€3,200\", \"5 of 7\". Formatted by the caller; drawn with tabular numerals. */\n value: ReactNode\n /** One fact under it: \"2 open opportunities\". */\n caption?: ReactNode\n tone?: BackdropStatTone\n className?: string\n}\n\n/** Bare on the page: label, number, caption, no box. */\nexport interface BackdropStatInlineProps extends BackdropStatBase {\n appearance?: 'inline'\n selected?: never\n}\n\n/**\n * A flat card (ADR-0017, D3: a hairline, no shadow). Give it `selected`\n * (true or false) and it becomes a toggle button with `aria-pressed`, drawn\n * with the ink ring when on: the tile that picks what a chart below shows.\n * Stage A: the markup only; the press handler is Stage B's.\n */\nexport interface BackdropStatTileProps extends BackdropStatBase {\n appearance: 'tile'\n selected?: boolean\n}\n\nexport type BackdropStatProps = BackdropStatInlineProps | BackdropStatTileProps\n\nexport function BackdropStat(props: BackdropStatProps) {\n const { label, value, caption, tone = 'default', className } = props\n const tile = props.appearance === 'tile'\n const selectable = tile && props.selected !== undefined\n const body = (\n <>\n <span className={styles.statLabel}>{label}</span>\n <span className={cx(styles.statValue, tone === 'success' && styles.statValueSuccess)}>{value}</span>\n {caption !== undefined && <span className={styles.statCaption}>{caption}</span>}\n </>\n )\n const classes = cx(styles.stat, tile && styles.statTile, selectable && props.selected && styles.statSelected, className)\n if (selectable) {\n return (\n <button type=\"button\" className={cx(classes, styles.statButton)} aria-pressed={props.selected}>\n {body}\n </button>\n )\n }\n return <div className={classes}>{body}</div>\n}\n\nexport interface BackdropStatRowProps {\n /** BackdropStat elements, all of one appearance. */\n children: ReactNode\n /** `inline` stats sit 48px apart; `tile` stats share the width equally, 16px apart. */\n appearance?: 'inline' | 'tile'\n /** Inline only: close the row with a hairline (a stat strip above a list). */\n divided?: boolean\n /** Names the group for assistive tech (\"This month\", \"Choose a measure\"). */\n label?: string\n className?: string\n}\n\nexport function BackdropStatRow({ children, appearance = 'inline', divided = false, label, className }: BackdropStatRowProps) {\n return (\n <div\n role={label ? 'group' : undefined}\n aria-label={label}\n className={cx(styles.statRow, appearance === 'tile' ? styles.statRowTile : styles.statRowInline, divided && appearance === 'inline' && styles.statRowDivided, className)}\n >\n {children}\n </div>\n )\n}\n\n/* ── Callout ───────────────────────────────────────────────────────────── */\n\n/**\n * The status pill's tones that a callout uses, plus the grey `neutral` most\n * boards draw. `warning` is the pill's sand, never red or orange: red is\n * `danger`, kept for something broken or blocked, and orange is the primary\n * button (Jamal at the set 2 gate, 11 Nov).\n */\nexport type BackdropCalloutTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger'\n\ninterface BackdropCalloutBase {\n tone?: BackdropCalloutTone\n /** 18px in the box, 16px in a note (ADR-0017, D17). Decorative. */\n icon?: ReactNode\n className?: string\n}\n\n/** The tinted block: an icon, an optional short title, the text, an optional single action. */\nexport interface BackdropCalloutBoxProps extends BackdropCalloutBase {\n appearance?: 'box'\n /** \"Why you\", \"Key point\". Short. */\n title?: ReactNode\n /** One or two sentences. */\n children: ReactNode\n /** At most one, drawn as an outline button at the block's end. */\n action?: BackdropDisplayAction\n linkComponent?: ElementType\n}\n\n/** The inline note: an icon and one muted caption line, no box (\"Card payment by Stripe\"). */\nexport interface BackdropCalloutNoteProps extends BackdropCalloutBase {\n appearance: 'note'\n children: ReactNode\n title?: never\n action?: never\n linkComponent?: never\n}\n\nexport type BackdropCalloutProps = BackdropCalloutBoxProps | BackdropCalloutNoteProps\n\nconst calloutToneClass: Record<BackdropCalloutTone, string | undefined> = {\n neutral: styles.toneNeutral,\n info: styles.toneInfo,\n success: styles.toneSuccess,\n warning: styles.toneWarning,\n danger: styles.toneDanger,\n}\n\n/*\n * Static content, so role=\"note\" rather than a live region: a callout is on\n * the page when it loads and is never announced over what the person is doing.\n * The tone is colour plus the caller's icon; the words carry the meaning.\n */\nexport function BackdropCallout(props: BackdropCalloutProps) {\n const { tone = 'neutral', icon, children, className } = props\n if (props.appearance === 'note') {\n return (\n <p className={cx(styles.note, calloutToneClass[tone], className)} data-tone={tone}>\n {icon !== undefined && (\n <span className={styles.noteIcon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n <span className={styles.noteText}>{children}</span>\n </p>\n )\n }\n const { title, action, linkComponent } = props\n return (\n <div role=\"note\" className={cx(styles.callout, calloutToneClass[tone], className)} data-tone={tone}>\n {icon !== undefined && (\n <span className={styles.calloutIcon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n <div className={styles.calloutText}>\n {title !== undefined && <span className={styles.calloutTitle}>{title}</span>}\n <span className={styles.calloutBody}>{children}</span>\n </div>\n {action && (\n <span className={styles.calloutAction}>\n <BackdropButton variant=\"outline\" size=\"md\" href={action.href} linkComponent={linkComponent} onClick={action.onClick}>\n {action.label}\n </BackdropButton>\n </span>\n )}\n </div>\n )\n}\n"],"names":["BackdropIconTile","children","size","shape","tone","className","jsx","cx","styles","BackdropEmptyState","icon","title","body","action","linkComponent","rest","jsxs","BackdropButton","BackdropStat","props","label","value","caption","tile","selectable","Fragment","classes","BackdropStatRow","appearance","divided","cal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= "_tile_u4rcs_7", s = "_tileRow_u4rcs_17", c = "_tileEmpty_u4rcs_22", e = "_tileCircle_u4rcs_29", o = "_tileSuccess_u4rcs_33", _ = "_tileDanger_u4rcs_38", n = "_empty_u4rcs_5", l = "_emptyTile_u4rcs_5", a = "_emptyTitle_u4rcs_61", u = "_emptyBody_u4rcs_70", i = "_emptyAction_u4rcs_77", r = "_stat_u4rcs_85", y = "_statLabel_u4rcs_94", p = "_statValue_u4rcs_103", T = "_statValueSuccess_u4rcs_112", m = "_statCaption_u4rcs_116", d = "_statTile_u4rcs_123", w = "_statButton_u4rcs_132", R = "_statSelected_u4rcs_145", I = "_statRow_u4rcs_149", S = "_statRowInline_u4rcs_154", g = "_statRowDivided_u4rcs_158", B = "_statRowTile_u4rcs_163", D = "_callout_u4rcs_173", x = "_calloutIcon_u4rcs_184", A = "_calloutText_u4rcs_196", C = "_calloutTitle_u4rcs_204", V = "_calloutBody_u4rcs_210", f = "_calloutAction_u4rcs_215", b = "_note_u4rcs_221", v = "_noteIcon_u4rcs_232", E = "_noteText_u4rcs_244", L = "_toneNeutral_u4rcs_249", N = "_toneInfo_u4rcs_254", W = "_toneSuccess_u4rcs_259", h = "_toneWarning_u4rcs_264", j = "_toneDanger_u4rcs_269", k = {
2
+ tile: t,
3
+ tileRow: s,
4
+ tileEmpty: c,
5
+ tileCircle: e,
6
+ tileSuccess: o,
7
+ tileDanger: _,
8
+ empty: n,
9
+ emptyTile: l,
10
+ emptyTitle: a,
11
+ emptyBody: u,
12
+ emptyAction: i,
13
+ stat: r,
14
+ statLabel: y,
15
+ statValue: p,
16
+ statValueSuccess: T,
17
+ statCaption: m,
18
+ statTile: d,
19
+ statButton: w,
20
+ statSelected: R,
21
+ statRow: I,
22
+ statRowInline: S,
23
+ statRowDivided: g,
24
+ statRowTile: B,
25
+ callout: D,
26
+ calloutIcon: x,
27
+ calloutText: A,
28
+ calloutTitle: C,
29
+ calloutBody: V,
30
+ calloutAction: f,
31
+ note: b,
32
+ noteIcon: v,
33
+ noteText: E,
34
+ toneNeutral: L,
35
+ toneInfo: N,
36
+ toneSuccess: W,
37
+ toneWarning: h,
38
+ toneDanger: j
39
+ };
40
+ export {
41
+ D as callout,
42
+ f as calloutAction,
43
+ V as calloutBody,
44
+ x as calloutIcon,
45
+ A as calloutText,
46
+ C as calloutTitle,
47
+ k as default,
48
+ n as empty,
49
+ i as emptyAction,
50
+ u as emptyBody,
51
+ l as emptyTile,
52
+ a as emptyTitle,
53
+ b as note,
54
+ v as noteIcon,
55
+ E as noteText,
56
+ r as stat,
57
+ w as statButton,
58
+ m as statCaption,
59
+ y as statLabel,
60
+ I as statRow,
61
+ g as statRowDivided,
62
+ S as statRowInline,
63
+ B as statRowTile,
64
+ R as statSelected,
65
+ d as statTile,
66
+ p as statValue,
67
+ T as statValueSuccess,
68
+ t as tile,
69
+ e as tileCircle,
70
+ _ as tileDanger,
71
+ c as tileEmpty,
72
+ s as tileRow,
73
+ o as tileSuccess,
74
+ j as toneDanger,
75
+ N as toneInfo,
76
+ L as toneNeutral,
77
+ W as toneSuccess,
78
+ h as toneWarning
79
+ };
80
+ //# sourceMappingURL=BackdropDisplay.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackdropDisplay.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,122 @@
1
+ import { FieldsetHTMLAttributes, HTMLAttributes, InputHTMLAttributes, ReactNode, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
2
+ export interface BackdropFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
3
+ /** "Company name". Programmatically tied to the control inside. */
4
+ label: ReactNode;
5
+ /** The control: a BackdropInput, BackdropTextarea, BackdropSelect or BackdropSearchField. */
6
+ children: ReactNode;
7
+ /** The muted suffix after the label: "optional" (drawn "· optional"). */
8
+ optionalLabel?: string;
9
+ /** One line of help under the control. Hidden while there is an error. */
10
+ hint?: ReactNode;
11
+ /** What is wrong, in the danger colour with the warning icon. Replaces the hint and marks the control invalid. */
12
+ error?: ReactNode;
13
+ /** The control's id. Generated when omitted. */
14
+ controlId?: string;
15
+ }
16
+ export declare function BackdropField({ label, children, optionalLabel, hint, error, controlId, className, ...rest }: BackdropFieldProps): import("react").JSX.Element;
17
+ export interface BackdropInputProps extends InputHTMLAttributes<HTMLInputElement> {
18
+ /** A 16px icon before the text (ADR-0017, D17). Decorative. */
19
+ leadingIcon?: ReactNode;
20
+ /** A unit after the text: "€", "staff", "per channel". Read out with the field as its description. */
21
+ suffix?: ReactNode;
22
+ /** 44px instead of 40, for focus flows only (ADR-0017, D9). */
23
+ focusFlow?: boolean;
24
+ }
25
+ export declare function BackdropInput({ leadingIcon, suffix, focusFlow, className, type, ...rest }: BackdropInputProps): import("react").JSX.Element;
26
+ /**
27
+ * `md` (default) is the form textarea. `lg` is the free-writing box at the
28
+ * head of a create page (Content "New post", Off-market "New introduction"):
29
+ * 20/32 text, radius 16, roomier padding (Batch 4, N27).
30
+ */
31
+ export type BackdropTextareaSize = 'md' | 'lg';
32
+ export interface BackdropTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
33
+ size?: BackdropTextareaSize;
34
+ /**
35
+ * Content inside the box's ring, under the text: an "Add a link or file"
36
+ * text link, a block of pasted details. With it, or with `size="lg"`, the
37
+ * ring moves from the <textarea> to a box around it; `className` then goes
38
+ * on that box and every other prop still reaches the <textarea>.
39
+ */
40
+ footer?: ReactNode;
41
+ }
42
+ /** The input's ring, radius and padding. Three rows at least; it grows by hand (resize: vertical). */
43
+ export declare function BackdropTextarea({ className, rows, size, footer, ...rest }: BackdropTextareaProps): import("react").JSX.Element;
44
+ /**
45
+ * `field` is the 40px form select, drawn exactly like the input. `pill` is the
46
+ * list filter ("All types", "Last 12 weeks"): the filter chip's 34px height and
47
+ * full radius, so it sits level in a row of chips (ADR-0017, D11).
48
+ */
49
+ export type BackdropSelectAppearance = 'field' | 'pill';
50
+ export interface BackdropSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
51
+ appearance?: BackdropSelectAppearance;
52
+ /** 44px instead of 40, for focus flows only. `field` only. */
53
+ focusFlow?: boolean;
54
+ /** <option> elements. */
55
+ children: ReactNode;
56
+ }
57
+ export declare function BackdropSelect({ appearance, focusFlow, className, children, ...rest }: BackdropSelectProps): import("react").JSX.Element;
58
+ export interface BackdropSearchFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
59
+ /**
60
+ * The field's accessible name when it has no visible label ("Search
61
+ * companies"). Inside a BackdropField the field's label names it instead.
62
+ */
63
+ label?: string;
64
+ /**
65
+ * Draws the clear button (×) at the end, named by this: "Clear search".
66
+ * Stage A: markup only. The press is wired in Stage B.
67
+ */
68
+ clearLabel?: string;
69
+ /**
70
+ * `lg` (default) is the 40px input (D9). `md` is 34, with 14/20 text, for
71
+ * the bar above a list, where it sits beside the 34px filter button, chips
72
+ * and pill select (Jamal at the Batch 3 gate, 11 Nov). Form fields stay 40.
73
+ */
74
+ size?: 'lg' | 'md';
75
+ }
76
+ /** An in-page search box: the input's box with a 16px lens before the text. */
77
+ export declare function BackdropSearchField({ label, clearLabel, size, className, ...rest }: BackdropSearchFieldProps): import("react").JSX.Element;
78
+ export interface BackdropSwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'role'> {
79
+ /** "Email me when a meeting is booked". 14/20 500, right of the track. */
80
+ label: ReactNode;
81
+ /** One muted line under the label. */
82
+ description?: ReactNode;
83
+ }
84
+ export declare function BackdropSwitch({ label, description, className, id, ...rest }: BackdropSwitchProps): import("react").JSX.Element;
85
+ interface BackdropRadioGroupBase extends Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'children'> {
86
+ /** The question: "Who can see this?". Drawn as the field label (13/18 500). */
87
+ legend: ReactNode;
88
+ /** The radios' shared `name`, handed to every radio inside. */
89
+ name?: string;
90
+ /** One line of help under the options. Hidden while there is an error. */
91
+ hint?: ReactNode;
92
+ /** What is wrong. Replaces the hint and marks every radio invalid. */
93
+ error?: ReactNode;
94
+ children: ReactNode;
95
+ }
96
+ export type BackdropRadioGroupProps = BackdropRadioGroupBase;
97
+ /** Plain radios, one size, stacked, in a fieldset whose legend asks the question. */
98
+ export declare function BackdropRadioGroup(props: BackdropRadioGroupProps): import("react").JSX.Element;
99
+ export interface BackdropRadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
100
+ /** "Only my team". 14/20 500. */
101
+ label: ReactNode;
102
+ /** One muted line under the label. */
103
+ description?: ReactNode;
104
+ }
105
+ /** One plain radio: an 18px circle (the checkbox's size), ink dot when chosen. */
106
+ export declare function BackdropRadio({ label, description, className, id, ...rest }: BackdropRadioProps): import("react").JSX.Element;
107
+ export interface BackdropRadioCardGroupProps extends BackdropRadioGroupBase {
108
+ /** 1 stacks the cards; 2 or more lays them out that many across, equal widths. */
109
+ columns?: number;
110
+ }
111
+ /** Radio cards in a fieldset: stacked by default, or `columns` across. */
112
+ export declare function BackdropRadioCardGroup({ columns, ...props }: BackdropRadioCardGroupProps): import("react").JSX.Element;
113
+ export interface BackdropRadioCardProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'title'> {
114
+ /** "Pay as you go". 14/20 600. */
115
+ title: ReactNode;
116
+ /** One or two muted lines. */
117
+ description?: ReactNode;
118
+ /** An 18px icon, drawn in the 36px row tile (BackdropIconTile). Decorative. */
119
+ icon?: ReactNode;
120
+ }
121
+ export declare function BackdropRadioCard({ title, description, icon, className, id, ...rest }: BackdropRadioCardProps): import("react").JSX.Element;
122
+ export {};