@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.
- package/CHANGELOG.md +131 -3
- package/dist/backdrop-icons.d.ts +53 -0
- package/dist/backdrop-icons.js +62 -0
- package/dist/backdrop-icons.js.map +1 -0
- package/dist/backdrop.css +1 -0
- package/dist/backdrop.d.ts +46 -0
- package/dist/backdrop.js +127 -0
- package/dist/backdrop.js.map +1 -0
- package/dist/components/Backdrop/BackdropAppMenu.d.ts +55 -0
- package/dist/components/Backdrop/BackdropAppMenu.js +79 -0
- package/dist/components/Backdrop/BackdropAppMenu.js.map +1 -0
- package/dist/components/Backdrop/BackdropAppMenu.module.css.js +48 -0
- package/dist/components/Backdrop/BackdropAppMenu.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropBasics.d.ts +129 -0
- package/dist/components/Backdrop/BackdropBasics.js +130 -0
- package/dist/components/Backdrop/BackdropBasics.js.map +1 -0
- package/dist/components/Backdrop/BackdropBasics.module.css.js +71 -0
- package/dist/components/Backdrop/BackdropBasics.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropButton.d.ts +63 -0
- package/dist/components/Backdrop/BackdropButton.js +59 -0
- package/dist/components/Backdrop/BackdropButton.js.map +1 -0
- package/dist/components/Backdrop/BackdropButton.module.css.js +41 -0
- package/dist/components/Backdrop/BackdropButton.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropCharts.d.ts +158 -0
- package/dist/components/Backdrop/BackdropCharts.js +222 -0
- package/dist/components/Backdrop/BackdropCharts.js.map +1 -0
- package/dist/components/Backdrop/BackdropCharts.module.css.js +109 -0
- package/dist/components/Backdrop/BackdropCharts.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropChrome.d.ts +26 -0
- package/dist/components/Backdrop/BackdropChrome.js +35 -0
- package/dist/components/Backdrop/BackdropChrome.js.map +1 -0
- package/dist/components/Backdrop/BackdropConversation.d.ts +67 -0
- package/dist/components/Backdrop/BackdropConversation.js +76 -0
- package/dist/components/Backdrop/BackdropConversation.js.map +1 -0
- package/dist/components/Backdrop/BackdropConversation.module.css.js +44 -0
- package/dist/components/Backdrop/BackdropConversation.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropData.d.ts +195 -0
- package/dist/components/Backdrop/BackdropData.js +204 -0
- package/dist/components/Backdrop/BackdropData.js.map +1 -0
- package/dist/components/Backdrop/BackdropData.module.css.js +135 -0
- package/dist/components/Backdrop/BackdropData.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropDisplay.d.ts +122 -0
- package/dist/components/Backdrop/BackdropDisplay.js +80 -0
- package/dist/components/Backdrop/BackdropDisplay.js.map +1 -0
- package/dist/components/Backdrop/BackdropDisplay.module.css.js +80 -0
- package/dist/components/Backdrop/BackdropDisplay.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropFields.d.ts +122 -0
- package/dist/components/Backdrop/BackdropFields.js +196 -0
- package/dist/components/Backdrop/BackdropFields.js.map +1 -0
- package/dist/components/Backdrop/BackdropFields.module.css.js +104 -0
- package/dist/components/Backdrop/BackdropFields.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropFlows.d.ts +128 -0
- package/dist/components/Backdrop/BackdropFlows.js +156 -0
- package/dist/components/Backdrop/BackdropFlows.js.map +1 -0
- package/dist/components/Backdrop/BackdropFlows.module.css.js +80 -0
- package/dist/components/Backdrop/BackdropFlows.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropFrame.d.ts +36 -0
- package/dist/components/Backdrop/BackdropFrame.js +15 -0
- package/dist/components/Backdrop/BackdropFrame.js.map +1 -0
- package/dist/components/Backdrop/BackdropFrame.module.css.js +14 -0
- package/dist/components/Backdrop/BackdropFrame.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropGlobalPanels.d.ts +272 -0
- package/dist/components/Backdrop/BackdropGlobalPanels.js +264 -0
- package/dist/components/Backdrop/BackdropGlobalPanels.js.map +1 -0
- package/dist/components/Backdrop/BackdropGlobalPanels.module.css.js +201 -0
- package/dist/components/Backdrop/BackdropGlobalPanels.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropHub.d.ts +80 -0
- package/dist/components/Backdrop/BackdropHub.js +92 -0
- package/dist/components/Backdrop/BackdropHub.js.map +1 -0
- package/dist/components/Backdrop/BackdropHub.module.css.js +40 -0
- package/dist/components/Backdrop/BackdropHub.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropLists.d.ts +165 -0
- package/dist/components/Backdrop/BackdropLists.js +162 -0
- package/dist/components/Backdrop/BackdropLists.js.map +1 -0
- package/dist/components/Backdrop/BackdropLists.module.css.js +114 -0
- package/dist/components/Backdrop/BackdropLists.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropOverlays.d.ts +175 -0
- package/dist/components/Backdrop/BackdropOverlays.js +252 -0
- package/dist/components/Backdrop/BackdropOverlays.js.map +1 -0
- package/dist/components/Backdrop/BackdropOverlays.module.css.js +104 -0
- package/dist/components/Backdrop/BackdropOverlays.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropPage.d.ts +73 -0
- package/dist/components/Backdrop/BackdropPage.js +65 -0
- package/dist/components/Backdrop/BackdropPage.js.map +1 -0
- package/dist/components/Backdrop/BackdropPage.module.css.js +46 -0
- package/dist/components/Backdrop/BackdropPage.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropPatterns.d.ts +224 -0
- package/dist/components/Backdrop/BackdropPatterns.js +202 -0
- package/dist/components/Backdrop/BackdropPatterns.js.map +1 -0
- package/dist/components/Backdrop/BackdropPatterns.module.css.js +114 -0
- package/dist/components/Backdrop/BackdropPatterns.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropRail.d.ts +63 -0
- package/dist/components/Backdrop/BackdropRail.js +98 -0
- package/dist/components/Backdrop/BackdropRail.js.map +1 -0
- package/dist/components/Backdrop/BackdropRail.module.css.js +42 -0
- package/dist/components/Backdrop/BackdropRail.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropSheets.d.ts +68 -0
- package/dist/components/Backdrop/BackdropSheets.js +75 -0
- package/dist/components/Backdrop/BackdropSheets.js.map +1 -0
- package/dist/components/Backdrop/BackdropSheets.module.css.js +42 -0
- package/dist/components/Backdrop/BackdropSheets.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropTabs.d.ts +20 -0
- package/dist/components/Backdrop/BackdropTabs.js +31 -0
- package/dist/components/Backdrop/BackdropTabs.js.map +1 -0
- package/dist/components/Backdrop/BackdropTabs.module.css.js +16 -0
- package/dist/components/Backdrop/BackdropTabs.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropTooltip.d.ts +21 -0
- package/dist/components/Backdrop/BackdropTooltip.js +15 -0
- package/dist/components/Backdrop/BackdropTooltip.js.map +1 -0
- package/dist/components/Backdrop/BackdropTooltip.module.css.js +18 -0
- package/dist/components/Backdrop/BackdropTooltip.module.css.js.map +1 -0
- package/dist/components/Backdrop/BackdropTopStrip.d.ts +65 -0
- package/dist/components/Backdrop/BackdropTopStrip.js +46 -0
- package/dist/components/Backdrop/BackdropTopStrip.js.map +1 -0
- package/dist/components/Backdrop/BackdropTopStrip.module.css.js +40 -0
- package/dist/components/Backdrop/BackdropTopStrip.module.css.js.map +1 -0
- package/dist/components/Backdrop/cx.d.ts +2 -0
- package/dist/components/Backdrop/cx.js +7 -0
- package/dist/components/Backdrop/cx.js.map +1 -0
- package/dist/components/Backdrop/icons.d.ts +70 -0
- package/dist/components/Backdrop/icons.js +103 -0
- package/dist/components/Backdrop/icons.js.map +1 -0
- package/package.json +23 -4
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useId as b, useContext as I, createContext as w } from "react";
|
|
4
|
+
import a from "./BackdropFields.module.css.js";
|
|
5
|
+
import { cx as p } from "./cx.js";
|
|
6
|
+
import { AlertCircle as B, Circle as $, CheckCircleFilled as g, Search as T, Close as R, ChevronDown as D } from "./icons.js";
|
|
7
|
+
import { BackdropIconTile as S } from "./BackdropDisplay.js";
|
|
8
|
+
const k = w(null);
|
|
9
|
+
function f(...c) {
|
|
10
|
+
const n = c.filter(Boolean).join(" ");
|
|
11
|
+
return n === "" ? void 0 : n;
|
|
12
|
+
}
|
|
13
|
+
function x(c, n) {
|
|
14
|
+
const i = I(k);
|
|
15
|
+
return {
|
|
16
|
+
id: c.id ?? (i == null ? void 0 : i.controlId),
|
|
17
|
+
"aria-describedby": f(i == null ? void 0 : i.describedBy, n, c["aria-describedby"]),
|
|
18
|
+
"aria-invalid": c["aria-invalid"] ?? (i != null && i.invalid ? !0 : void 0)
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function W({ label: c, children: n, optionalLabel: i, hint: d, error: s, controlId: r, className: l, ...h }) {
|
|
22
|
+
const o = b(), m = r ?? `${o}-control`, u = `${m}-hint`, N = `${m}-error`, v = s != null && s !== !1, F = v ? N : d !== void 0 ? u : void 0;
|
|
23
|
+
return /* @__PURE__ */ t("div", { className: p(a.field, l), ...h, children: [
|
|
24
|
+
/* @__PURE__ */ t("label", { htmlFor: m, className: a.label, children: [
|
|
25
|
+
c,
|
|
26
|
+
i !== void 0 && /* @__PURE__ */ t("span", { className: a.optional, children: [
|
|
27
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: "·" }),
|
|
28
|
+
" ",
|
|
29
|
+
i
|
|
30
|
+
] })
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ e(k.Provider, { value: { controlId: m, describedBy: F, invalid: v }, children: n }),
|
|
33
|
+
v ? /* @__PURE__ */ t("p", { id: N, className: a.error, children: [
|
|
34
|
+
/* @__PURE__ */ e("span", { className: a.errorIcon, children: /* @__PURE__ */ e(B, {}) }),
|
|
35
|
+
/* @__PURE__ */ e("span", { children: s })
|
|
36
|
+
] }) : d !== void 0 && /* @__PURE__ */ e("p", { id: u, className: a.hint, children: d })
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
function E({ leadingIcon: c, suffix: n, focusFlow: i = !1, className: d, type: s = "text", ...r }) {
|
|
40
|
+
const l = `${b()}-suffix`, h = n != null, o = x(r, h ? l : void 0);
|
|
41
|
+
return /* @__PURE__ */ t("span", { className: p(a.control, i && a.focusFlow, d), children: [
|
|
42
|
+
c !== void 0 && /* @__PURE__ */ e("span", { className: a.leading, "aria-hidden": "true", children: c }),
|
|
43
|
+
/* @__PURE__ */ e("input", { type: s, ...r, ...o, className: a.input }),
|
|
44
|
+
h && /* @__PURE__ */ e("span", { id: l, className: a.suffix, children: n })
|
|
45
|
+
] });
|
|
46
|
+
}
|
|
47
|
+
function O({ className: c, rows: n = 3, size: i = "md", footer: d, ...s }) {
|
|
48
|
+
const r = x(s), l = d != null && d !== !1;
|
|
49
|
+
return i !== "lg" && !l ? /* @__PURE__ */ e("textarea", { rows: Math.max(3, n), ...s, ...r, className: p(a.textarea, c) }) : /* @__PURE__ */ t("div", { className: p(a.textareaBox, i === "lg" && a.textareaBoxLg, c), children: [
|
|
50
|
+
/* @__PURE__ */ e("textarea", { rows: Math.max(3, n), ...s, ...r, className: a.textareaBare }),
|
|
51
|
+
l && /* @__PURE__ */ e("div", { className: a.textareaFooter, children: d })
|
|
52
|
+
] });
|
|
53
|
+
}
|
|
54
|
+
function A({ appearance: c = "field", focusFlow: n = !1, className: i, children: d, ...s }) {
|
|
55
|
+
const r = x(s), l = c === "pill";
|
|
56
|
+
return /* @__PURE__ */ t("span", { className: p(a.selectWrap, l && a.selectWrapPill, i), children: [
|
|
57
|
+
/* @__PURE__ */ e("select", { ...s, ...r, className: p(a.select, l ? a.selectPill : n && a.focusFlow), children: d }),
|
|
58
|
+
/* @__PURE__ */ e("span", { className: a.chevron, "aria-hidden": "true", children: /* @__PURE__ */ e(D, {}) })
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
function q({ label: c, clearLabel: n, size: i = "lg", className: d, ...s }) {
|
|
62
|
+
const r = x(s);
|
|
63
|
+
return /* @__PURE__ */ t("span", { className: p(a.control, a.search, i === "md" && a.searchMd, d), children: [
|
|
64
|
+
/* @__PURE__ */ e("span", { className: a.leading, "aria-hidden": "true", children: /* @__PURE__ */ e(T, { size: 16 }) }),
|
|
65
|
+
/* @__PURE__ */ e("input", { type: "search", "aria-label": c, ...s, ...r, className: a.input }),
|
|
66
|
+
n !== void 0 && /* @__PURE__ */ e("button", { type: "button", "aria-label": n, className: a.clear, children: /* @__PURE__ */ e(R, { size: 16 }) })
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
function H({ label: c, description: n, className: i, id: d, ...s }) {
|
|
70
|
+
const r = b(), l = d ?? `${r}-switch`, h = `${l}-description`, o = n != null;
|
|
71
|
+
return /* @__PURE__ */ t("span", { className: p(a.switchRow, i), children: [
|
|
72
|
+
/* @__PURE__ */ t("span", { className: a.switchTrackSlot, children: [
|
|
73
|
+
/* @__PURE__ */ e(
|
|
74
|
+
"input",
|
|
75
|
+
{
|
|
76
|
+
type: "checkbox",
|
|
77
|
+
role: "switch",
|
|
78
|
+
id: l,
|
|
79
|
+
...s,
|
|
80
|
+
"aria-describedby": f(o && h, s["aria-describedby"]),
|
|
81
|
+
className: a.switchInput
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ e("span", { className: a.switchTrack, "aria-hidden": "true", children: /* @__PURE__ */ e("span", { className: a.switchThumb }) })
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ t("span", { className: a.switchText, children: [
|
|
87
|
+
/* @__PURE__ */ e("label", { htmlFor: l, className: a.switchLabel, children: c }),
|
|
88
|
+
o && /* @__PURE__ */ e("span", { id: h, className: a.switchDescription, children: n })
|
|
89
|
+
] })
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
const y = w(null);
|
|
93
|
+
function C({
|
|
94
|
+
legend: c,
|
|
95
|
+
name: n,
|
|
96
|
+
hint: i,
|
|
97
|
+
error: d,
|
|
98
|
+
children: s,
|
|
99
|
+
className: r,
|
|
100
|
+
listClassName: l,
|
|
101
|
+
listStyle: h,
|
|
102
|
+
...o
|
|
103
|
+
}) {
|
|
104
|
+
const m = b(), u = `${m}-hint`, N = `${m}-error`, v = d != null && d !== !1;
|
|
105
|
+
return /* @__PURE__ */ t(
|
|
106
|
+
"fieldset",
|
|
107
|
+
{
|
|
108
|
+
...o,
|
|
109
|
+
"aria-describedby": f(v ? N : i !== void 0 && u, o["aria-describedby"]),
|
|
110
|
+
className: p(a.fieldset, r),
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ e("legend", { className: a.legend, children: c }),
|
|
113
|
+
/* @__PURE__ */ e(y.Provider, { value: { name: n, invalid: v }, children: /* @__PURE__ */ e("div", { className: l, style: h, children: s }) }),
|
|
114
|
+
v ? /* @__PURE__ */ t("p", { id: N, className: a.error, children: [
|
|
115
|
+
/* @__PURE__ */ e("span", { className: a.errorIcon, children: /* @__PURE__ */ e(B, {}) }),
|
|
116
|
+
/* @__PURE__ */ e("span", { children: d })
|
|
117
|
+
] }) : i !== void 0 && /* @__PURE__ */ e("p", { id: u, className: a.hint, children: i })
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
function J(c) {
|
|
123
|
+
return /* @__PURE__ */ e(C, { ...c, listClassName: a.radioList });
|
|
124
|
+
}
|
|
125
|
+
function K({ label: c, description: n, className: i, id: d, ...s }) {
|
|
126
|
+
const r = I(y), l = b(), h = d ?? `${l}-radio`, o = `${h}-description`, m = n != null;
|
|
127
|
+
return /* @__PURE__ */ t("span", { className: p(a.radioRow, i), children: [
|
|
128
|
+
/* @__PURE__ */ e(
|
|
129
|
+
"input",
|
|
130
|
+
{
|
|
131
|
+
type: "radio",
|
|
132
|
+
id: h,
|
|
133
|
+
name: s.name ?? (r == null ? void 0 : r.name),
|
|
134
|
+
...s,
|
|
135
|
+
"aria-invalid": s["aria-invalid"] ?? (r != null && r.invalid ? !0 : void 0),
|
|
136
|
+
"aria-describedby": f(m && o, s["aria-describedby"]),
|
|
137
|
+
className: a.radio
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ t("span", { className: a.radioText, children: [
|
|
141
|
+
/* @__PURE__ */ e("label", { htmlFor: h, className: a.radioLabel, children: c }),
|
|
142
|
+
m && /* @__PURE__ */ e("span", { id: o, className: a.radioDescription, children: n })
|
|
143
|
+
] })
|
|
144
|
+
] });
|
|
145
|
+
}
|
|
146
|
+
function Q({ columns: c = 1, ...n }) {
|
|
147
|
+
const i = Math.max(1, Math.floor(c));
|
|
148
|
+
return /* @__PURE__ */ e(
|
|
149
|
+
C,
|
|
150
|
+
{
|
|
151
|
+
...n,
|
|
152
|
+
listClassName: a.cardList,
|
|
153
|
+
listStyle: i > 1 ? { "--backdrop-radio-card-columns": i } : void 0
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
function U({ title: c, description: n, icon: i, className: d, id: s, ...r }) {
|
|
158
|
+
const l = I(y), h = b(), o = s ?? `${h}-card`, m = `${o}-title`, u = `${o}-description`, N = n != null;
|
|
159
|
+
return /* @__PURE__ */ t("label", { htmlFor: o, className: p(a.card, d), children: [
|
|
160
|
+
/* @__PURE__ */ e(
|
|
161
|
+
"input",
|
|
162
|
+
{
|
|
163
|
+
type: "radio",
|
|
164
|
+
id: o,
|
|
165
|
+
name: r.name ?? (l == null ? void 0 : l.name),
|
|
166
|
+
...r,
|
|
167
|
+
"aria-labelledby": r["aria-labelledby"] ?? m,
|
|
168
|
+
"aria-invalid": r["aria-invalid"] ?? (l != null && l.invalid ? !0 : void 0),
|
|
169
|
+
"aria-describedby": f(N && u, r["aria-describedby"]),
|
|
170
|
+
className: a.cardInput
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
i !== void 0 && /* @__PURE__ */ e(S, { children: i }),
|
|
174
|
+
/* @__PURE__ */ t("span", { className: a.cardText, children: [
|
|
175
|
+
/* @__PURE__ */ e("span", { id: m, className: a.cardTitle, children: c }),
|
|
176
|
+
N && /* @__PURE__ */ e("span", { id: u, className: a.cardDescription, children: n })
|
|
177
|
+
] }),
|
|
178
|
+
/* @__PURE__ */ t("span", { className: a.cardIndicator, "aria-hidden": "true", children: [
|
|
179
|
+
/* @__PURE__ */ e("span", { className: a.cardIndicatorOff, children: /* @__PURE__ */ e($, { size: 20 }) }),
|
|
180
|
+
/* @__PURE__ */ e("span", { className: a.cardIndicatorOn, children: /* @__PURE__ */ e(g, { size: 20 }) })
|
|
181
|
+
] })
|
|
182
|
+
] });
|
|
183
|
+
}
|
|
184
|
+
export {
|
|
185
|
+
W as BackdropField,
|
|
186
|
+
E as BackdropInput,
|
|
187
|
+
K as BackdropRadio,
|
|
188
|
+
U as BackdropRadioCard,
|
|
189
|
+
Q as BackdropRadioCardGroup,
|
|
190
|
+
J as BackdropRadioGroup,
|
|
191
|
+
q as BackdropSearchField,
|
|
192
|
+
A as BackdropSelect,
|
|
193
|
+
H as BackdropSwitch,
|
|
194
|
+
O as BackdropTextarea
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=BackdropFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackdropFields.js","sources":["../../../src/components/Backdrop/BackdropFields.tsx"],"sourcesContent":["'use client'\n\nimport { createContext, useContext, useId } from 'react'\nimport type {\n CSSProperties,\n FieldsetHTMLAttributes,\n HTMLAttributes,\n InputHTMLAttributes,\n ReactNode,\n SelectHTMLAttributes,\n TextareaHTMLAttributes,\n} from 'react'\nimport styles from './BackdropFields.module.css'\nimport { cx } from './cx'\nimport { AlertCircle, CheckCircleFilled, ChevronDown, Circle, Close, Search } from './icons'\nimport { BackdropIconTile } from './BackdropDisplay'\n\n/*\n * Batch 2 · Fields. The form controls every product's settings, dialogs and\n * focus flows are built from (N9-N13). Stage A: static and presentational.\n *\n * Every control renders the NATIVE element (<input>, <textarea>, <select>, a\n * checkbox with role=\"switch\", a radio) and spreads the remaining native\n * attributes onto it, so a consumer passes value / defaultValue / onChange /\n * name / disabled the ordinary way and Stage B has nothing to restructure. No\n * component here holds state or owns a handler. A selected radio card or an\n * \"on\" switch is drawn from the native :checked state in CSS, not from a prop.\n *\n * Field label above, optional suffix, hint below, error replacing the hint.\n * Input text input, 40 (44 in focus flows), leading icon, trailing unit.\n * Textarea the input's ring, radius and padding; three rows at least.\n * Select native select with a 16px chevron; `pill` for the list filter.\n * Search field in-page search: 16px lens, optional clear button.\n * Switch 34x20 track, label right, optional description.\n * Radio group plain radios in a fieldset with a legend.\n * Radio card a selectable card; grouped stacked or N across.\n *\n * Sizes are ADR-0017's: input 40 / 44 and radius 10 (D9), input edge\n * --backdrop-line-strong (D8), card radius 16 (D2), icons 16 (D17).\n */\n\n/* ── Field ─────────────────────────────────────────────────────────────── */\n\ninterface FieldContextValue {\n controlId: string\n /** The hint's or the error's id: whichever is showing. */\n describedBy?: string\n invalid: boolean\n}\n\n/* A field hands its control the ids that wire label, hint and error to it.\n Context, not state: nothing here changes after the first render. */\nconst FieldContext = createContext<FieldContextValue | null>(null)\n\n/** Joins the ids that describe a control, dropping the empty ones. */\nfunction joinIds(...ids: Array<string | undefined | false>): string | undefined {\n const joined = ids.filter(Boolean).join(' ')\n return joined === '' ? undefined : joined\n}\n\n/** The props a native control takes from the field it sits in, merged with its own. */\nfunction useFieldWiring(own: { id?: string; 'aria-describedby'?: string; 'aria-invalid'?: InputHTMLAttributes<HTMLInputElement>['aria-invalid'] }, extraDescribedBy?: string) {\n const field = useContext(FieldContext)\n return {\n id: own.id ?? field?.controlId,\n 'aria-describedby': joinIds(field?.describedBy, extraDescribedBy, own['aria-describedby']),\n 'aria-invalid': own['aria-invalid'] ?? (field?.invalid ? true : undefined),\n }\n}\n\nexport interface BackdropFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n /** \"Company name\". Programmatically tied to the control inside. */\n label: ReactNode\n /** The control: a BackdropInput, BackdropTextarea, BackdropSelect or BackdropSearchField. */\n children: ReactNode\n /** The muted suffix after the label: \"optional\" (drawn \"· optional\"). */\n optionalLabel?: string\n /** One line of help under the control. Hidden while there is an error. */\n hint?: ReactNode\n /** What is wrong, in the danger colour with the warning icon. Replaces the hint and marks the control invalid. */\n error?: ReactNode\n /** The control's id. Generated when omitted. */\n controlId?: string\n}\n\n/*\n * Label 13/18 500 above the control, hint 13/18 muted below it. An error takes\n * the hint's place rather than stacking under it, so the field does not grow\n * by a line when it goes wrong; the hint is the thing the error corrects.\n */\nexport function BackdropField({ label, children, optionalLabel, hint, error, controlId, className, ...rest }: BackdropFieldProps) {\n const generated = useId()\n const id = controlId ?? `${generated}-control`\n const hintId = `${id}-hint`\n const errorId = `${id}-error`\n const hasError = error !== undefined && error !== null && error !== false\n const describedBy = hasError ? errorId : hint !== undefined ? hintId : undefined\n return (\n <div className={cx(styles.field, className)} {...rest}>\n <label htmlFor={id} className={styles.label}>\n {label}\n {optionalLabel !== undefined && (\n <span className={styles.optional}>\n <span aria-hidden=\"true\">·</span> {optionalLabel}\n </span>\n )}\n </label>\n <FieldContext.Provider value={{ controlId: id, describedBy, invalid: hasError }}>{children}</FieldContext.Provider>\n {hasError ? (\n <p id={errorId} className={styles.error}>\n <span className={styles.errorIcon}>\n <AlertCircle />\n </span>\n <span>{error}</span>\n </p>\n ) : (\n hint !== undefined && (\n <p id={hintId} className={styles.hint}>\n {hint}\n </p>\n )\n )}\n </div>\n )\n}\n\n/* ── Input ─────────────────────────────────────────────────────────────── */\n\nexport interface BackdropInputProps extends InputHTMLAttributes<HTMLInputElement> {\n /** A 16px icon before the text (ADR-0017, D17). Decorative. */\n leadingIcon?: ReactNode\n /** A unit after the text: \"€\", \"staff\", \"per channel\". Read out with the field as its description. */\n suffix?: ReactNode\n /** 44px instead of 40, for focus flows only (ADR-0017, D9). */\n focusFlow?: boolean\n}\n\n/*\n * The box is a span around the native input, so the leading icon and the unit\n * sit inside the ring. It draws the focus ring when the input inside has\n * keyboard-or-text focus (:focus-visible), the read-only and disabled looks\n * from the input's own attributes, and the danger edge from aria-invalid.\n */\nexport function BackdropInput({ leadingIcon, suffix, focusFlow = false, className, type = 'text', ...rest }: BackdropInputProps) {\n const suffixId = `${useId()}-suffix`\n const hasSuffix = suffix !== undefined && suffix !== null\n const wiring = useFieldWiring(rest, hasSuffix ? suffixId : undefined)\n return (\n <span className={cx(styles.control, focusFlow && styles.focusFlow, className)}>\n {leadingIcon !== undefined && (\n <span className={styles.leading} aria-hidden=\"true\">\n {leadingIcon}\n </span>\n )}\n <input type={type} {...rest} {...wiring} className={styles.input} />\n {hasSuffix && (\n <span id={suffixId} className={styles.suffix}>\n {suffix}\n </span>\n )}\n </span>\n )\n}\n\n/* ── Textarea ──────────────────────────────────────────────────────────── */\n\n/**\n * `md` (default) is the form textarea. `lg` is the free-writing box at the\n * head of a create page (Content \"New post\", Off-market \"New introduction\"):\n * 20/32 text, radius 16, roomier padding (Batch 4, N27).\n */\nexport type BackdropTextareaSize = 'md' | 'lg'\n\nexport interface BackdropTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n size?: BackdropTextareaSize\n /**\n * Content inside the box's ring, under the text: an \"Add a link or file\"\n * text link, a block of pasted details. With it, or with `size=\"lg\"`, the\n * ring moves from the <textarea> to a box around it; `className` then goes\n * on that box and every other prop still reaches the <textarea>.\n */\n footer?: ReactNode\n}\n\n/** The input's ring, radius and padding. Three rows at least; it grows by hand (resize: vertical). */\nexport function BackdropTextarea({ className, rows = 3, size = 'md', footer, ...rest }: BackdropTextareaProps) {\n const wiring = useFieldWiring(rest)\n const hasFooter = footer !== undefined && footer !== null && footer !== false\n if (size !== 'lg' && !hasFooter) {\n return <textarea rows={Math.max(3, rows)} {...rest} {...wiring} className={cx(styles.textarea, className)} />\n }\n /* The box draws the ring, the focus outline (from the <textarea>'s\n :focus-visible), the invalid and disabled looks; the <textarea> inside is\n bare. The footer is content, not a control of the field's own. */\n return (\n <div className={cx(styles.textareaBox, size === 'lg' && styles.textareaBoxLg, className)}>\n <textarea rows={Math.max(3, rows)} {...rest} {...wiring} className={styles.textareaBare} />\n {hasFooter && <div className={styles.textareaFooter}>{footer}</div>}\n </div>\n )\n}\n\n/* ── Select ────────────────────────────────────────────────────────────── */\n\n/**\n * `field` is the 40px form select, drawn exactly like the input. `pill` is the\n * list filter (\"All types\", \"Last 12 weeks\"): the filter chip's 34px height and\n * full radius, so it sits level in a row of chips (ADR-0017, D11).\n */\nexport type BackdropSelectAppearance = 'field' | 'pill'\n\nexport interface BackdropSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {\n appearance?: BackdropSelectAppearance\n /** 44px instead of 40, for focus flows only. `field` only. */\n focusFlow?: boolean\n /** <option> elements. */\n children: ReactNode\n}\n\n/*\n * A native <select>. The browser's own arrow is removed and the package's 16px\n * chevron drawn over the box's right edge, under the pointer so a click still\n * reaches the select. The open list is the platform's, in Stage A and after.\n */\nexport function BackdropSelect({ appearance = 'field', focusFlow = false, className, children, ...rest }: BackdropSelectProps) {\n const wiring = useFieldWiring(rest)\n const pill = appearance === 'pill'\n return (\n <span className={cx(styles.selectWrap, pill && styles.selectWrapPill, className)}>\n <select {...rest} {...wiring} className={cx(styles.select, pill ? styles.selectPill : focusFlow && styles.focusFlow)}>\n {children}\n </select>\n <span className={styles.chevron} aria-hidden=\"true\">\n <ChevronDown />\n </span>\n </span>\n )\n}\n\n/* ── Search field ──────────────────────────────────────────────────────── */\n\nexport interface BackdropSearchFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {\n /**\n * The field's accessible name when it has no visible label (\"Search\n * companies\"). Inside a BackdropField the field's label names it instead.\n */\n label?: string\n /**\n * Draws the clear button (×) at the end, named by this: \"Clear search\".\n * Stage A: markup only. The press is wired in Stage B.\n */\n clearLabel?: string\n /**\n * `lg` (default) is the 40px input (D9). `md` is 34, with 14/20 text, for\n * the bar above a list, where it sits beside the 34px filter button, chips\n * and pill select (Jamal at the Batch 3 gate, 11 Nov). Form fields stay 40.\n */\n size?: 'lg' | 'md'\n}\n\n/** An in-page search box: the input's box with a 16px lens before the text. */\nexport function BackdropSearchField({ label, clearLabel, size = 'lg', className, ...rest }: BackdropSearchFieldProps) {\n const wiring = useFieldWiring(rest)\n return (\n <span className={cx(styles.control, styles.search, size === 'md' && styles.searchMd, className)}>\n <span className={styles.leading} aria-hidden=\"true\">\n <Search size={16} />\n </span>\n <input type=\"search\" aria-label={label} {...rest} {...wiring} className={styles.input} />\n {clearLabel !== undefined && (\n <button type=\"button\" aria-label={clearLabel} className={styles.clear}>\n <Close size={16} />\n </button>\n )}\n </span>\n )\n}\n\n/* ── Switch ────────────────────────────────────────────────────────────── */\n\nexport interface BackdropSwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'role'> {\n /** \"Email me when a meeting is booked\". 14/20 500, right of the track. */\n label: ReactNode\n /** One muted line under the label. */\n description?: ReactNode\n}\n\n/*\n * A native checkbox with role=\"switch\", so on/off is the platform's checked\n * state and the keyboard (Space) is the platform's too. The input lies over\n * the 34x20 track at zero opacity; the track and thumb follow :checked.\n */\nexport function BackdropSwitch({ label, description, className, id, ...rest }: BackdropSwitchProps) {\n const generated = useId()\n const inputId = id ?? `${generated}-switch`\n const descriptionId = `${inputId}-description`\n const hasDescription = description !== undefined && description !== null\n return (\n <span className={cx(styles.switchRow, className)}>\n <span className={styles.switchTrackSlot}>\n <input\n type=\"checkbox\"\n role=\"switch\"\n id={inputId}\n {...rest}\n aria-describedby={joinIds(hasDescription && descriptionId, rest['aria-describedby'])}\n className={styles.switchInput}\n />\n <span className={styles.switchTrack} aria-hidden=\"true\">\n <span className={styles.switchThumb} />\n </span>\n </span>\n <span className={styles.switchText}>\n <label htmlFor={inputId} className={styles.switchLabel}>\n {label}\n </label>\n {hasDescription && (\n <span id={descriptionId} className={styles.switchDescription}>\n {description}\n </span>\n )}\n </span>\n </span>\n )\n}\n\n/* ── Radio group ───────────────────────────────────────────────────────── */\n\ninterface RadioGroupContextValue {\n name?: string\n invalid: boolean\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextValue | null>(null)\n\ninterface BackdropRadioGroupBase extends Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'children'> {\n /** The question: \"Who can see this?\". Drawn as the field label (13/18 500). */\n legend: ReactNode\n /** The radios' shared `name`, handed to every radio inside. */\n name?: string\n /** One line of help under the options. Hidden while there is an error. */\n hint?: ReactNode\n /** What is wrong. Replaces the hint and marks every radio invalid. */\n error?: ReactNode\n children: ReactNode\n}\n\nfunction RadioFieldset({\n legend,\n name,\n hint,\n error,\n children,\n className,\n listClassName,\n listStyle,\n ...rest\n}: BackdropRadioGroupBase & { listClassName: string | undefined; listStyle?: CSSProperties }) {\n const generated = useId()\n const hintId = `${generated}-hint`\n const errorId = `${generated}-error`\n const hasError = error !== undefined && error !== null && error !== false\n return (\n <fieldset\n {...rest}\n aria-describedby={joinIds(hasError ? errorId : hint !== undefined && hintId, rest['aria-describedby'])}\n className={cx(styles.fieldset, className)}\n >\n <legend className={styles.legend}>{legend}</legend>\n <RadioGroupContext.Provider value={{ name, invalid: hasError }}>\n <div className={listClassName} style={listStyle}>\n {children}\n </div>\n </RadioGroupContext.Provider>\n {hasError ? (\n <p id={errorId} className={styles.error}>\n <span className={styles.errorIcon}>\n <AlertCircle />\n </span>\n <span>{error}</span>\n </p>\n ) : (\n hint !== undefined && (\n <p id={hintId} className={styles.hint}>\n {hint}\n </p>\n )\n )}\n </fieldset>\n )\n}\n\nexport type BackdropRadioGroupProps = BackdropRadioGroupBase\n\n/** Plain radios, one size, stacked, in a fieldset whose legend asks the question. */\nexport function BackdropRadioGroup(props: BackdropRadioGroupProps) {\n return <RadioFieldset {...props} listClassName={styles.radioList} />\n}\n\nexport interface BackdropRadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {\n /** \"Only my team\". 14/20 500. */\n label: ReactNode\n /** One muted line under the label. */\n description?: ReactNode\n}\n\n/** One plain radio: an 18px circle (the checkbox's size), ink dot when chosen. */\nexport function BackdropRadio({ label, description, className, id, ...rest }: BackdropRadioProps) {\n const group = useContext(RadioGroupContext)\n const generated = useId()\n const inputId = id ?? `${generated}-radio`\n const descriptionId = `${inputId}-description`\n const hasDescription = description !== undefined && description !== null\n return (\n <span className={cx(styles.radioRow, className)}>\n <input\n type=\"radio\"\n id={inputId}\n name={rest.name ?? group?.name}\n {...rest}\n aria-invalid={rest['aria-invalid'] ?? (group?.invalid ? true : undefined)}\n aria-describedby={joinIds(hasDescription && descriptionId, rest['aria-describedby'])}\n className={styles.radio}\n />\n <span className={styles.radioText}>\n <label htmlFor={inputId} className={styles.radioLabel}>\n {label}\n </label>\n {hasDescription && (\n <span id={descriptionId} className={styles.radioDescription}>\n {description}\n </span>\n )}\n </span>\n </span>\n )\n}\n\n/* ── Radio card ────────────────────────────────────────────────────────── */\n\nexport interface BackdropRadioCardGroupProps extends BackdropRadioGroupBase {\n /** 1 stacks the cards; 2 or more lays them out that many across, equal widths. */\n columns?: number\n}\n\n/** Radio cards in a fieldset: stacked by default, or `columns` across. */\nexport function BackdropRadioCardGroup({ columns = 1, ...props }: BackdropRadioCardGroupProps) {\n const across = Math.max(1, Math.floor(columns))\n return (\n <RadioFieldset\n {...props}\n listClassName={styles.cardList}\n listStyle={across > 1 ? ({ '--backdrop-radio-card-columns': across } as CSSProperties) : undefined}\n />\n )\n}\n\nexport interface BackdropRadioCardProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'title'> {\n /** \"Pay as you go\". 14/20 600. */\n title: ReactNode\n /** One or two muted lines. */\n description?: ReactNode\n /** An 18px icon, drawn in the 36px row tile (BackdropIconTile). Decorative. */\n icon?: ReactNode\n}\n\n/*\n * The whole card is the radio's <label>, so a press anywhere on it chooses it.\n * Its name is the title alone (aria-labelledby); the description describes it.\n * Unchosen: a 1px hairline ring and an empty circle. Chosen: the selected stat\n * tile's 1.5px ink ring and a filled check. Both follow the native :checked\n * state, so a defaultChecked card renders chosen with no prop of ours.\n */\nexport function BackdropRadioCard({ title, description, icon, className, id, ...rest }: BackdropRadioCardProps) {\n const group = useContext(RadioGroupContext)\n const generated = useId()\n const inputId = id ?? `${generated}-card`\n const titleId = `${inputId}-title`\n const descriptionId = `${inputId}-description`\n const hasDescription = description !== undefined && description !== null\n return (\n <label htmlFor={inputId} className={cx(styles.card, className)}>\n <input\n type=\"radio\"\n id={inputId}\n name={rest.name ?? group?.name}\n {...rest}\n aria-labelledby={rest['aria-labelledby'] ?? titleId}\n aria-invalid={rest['aria-invalid'] ?? (group?.invalid ? true : undefined)}\n aria-describedby={joinIds(hasDescription && descriptionId, rest['aria-describedby'])}\n className={styles.cardInput}\n />\n {icon !== undefined && <BackdropIconTile>{icon}</BackdropIconTile>}\n <span className={styles.cardText}>\n <span id={titleId} className={styles.cardTitle}>\n {title}\n </span>\n {hasDescription && (\n <span id={descriptionId} className={styles.cardDescription}>\n {description}\n </span>\n )}\n </span>\n <span className={styles.cardIndicator} aria-hidden=\"true\">\n <span className={styles.cardIndicatorOff}>\n <Circle size={20} />\n </span>\n <span className={styles.cardIndicatorOn}>\n <CheckCircleFilled size={20} />\n </span>\n </span>\n </label>\n )\n}\n"],"names":["FieldContext","createContext","joinIds","ids","joined","useFieldWiring","own","extraDescribedBy","field","useContext","BackdropField","label","children","optionalLabel","hint","error","controlId","className","rest","generated","useId","id","hintId","errorId","hasError","describedBy","jsxs","cx","styles","jsx","AlertCircle","BackdropInput","leadingIcon","suffix","focusFlow","type","suffixId","hasSuffix","wiring","BackdropTextarea","rows","size","footer","hasFooter","BackdropSelect","appearance","pill","ChevronDown","BackdropSearchField","clearLabel","Search","Close","BackdropSwitch","description","inputId","descriptionId","hasDescription","RadioGroupContext","RadioFieldset","legend","name","listClassName","listStyle","BackdropRadioGroup","props","BackdropRadio","group","BackdropRadioCardGroup","columns","across","BackdropRadioCard","title","icon","titleId","BackdropIconTile","Circle","CheckCircleFilled"],"mappings":";;;;;;;AAoDA,MAAMA,IAAeC,E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,EAAC,QAAA,EAAK,WAAWE,EAAO,UACtB,UAAA;AAAA,MAAA,gBAAAC,EAAC,UAAK,IAAI4C,GAAS,WAAW7C,EAAO,WAClC,UAAA2C,GACH;AAAA,MACCf,uBACE,QAAA,EAAK,IAAID,GAAe,WAAW3B,EAAO,iBACxC,UAAAyB,EAAA,CACH;AAAA,IAAA,GAEJ;AAAA,sBACC,QAAA,EAAK,WAAWzB,EAAO,eAAe,eAAY,QACjD,UAAA;AAAA,MAAA,gBAAAC,EAAC,QAAA,EAAK,WAAWD,EAAO,kBACtB,4BAAC+C,GAAA,EAAO,MAAM,IAAI,EAAA,CACpB;AAAA,MACA,gBAAA9C,EAAC,UAAK,WAAWD,EAAO,iBACtB,UAAA,gBAAAC,EAAC+C,GAAA,EAAkB,MAAM,GAAA,CAAI,EAAA,CAC/B;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
const t = "_field_85y0y_5", c = "_label_85y0y_15", _ = "_legend_85y0y_16", o = "_optional_85y0y_24", r = "_hint_85y0y_30", e = "_error_85y0y_31", a = "_errorIcon_85y0y_50", s = "_control_85y0y_61", i = "_focusFlow_85y0y_76", n = "_input_85y0y_80", y = "_leading_85y0y_135", d = "_suffix_85y0y_146", l = "_search_85y0y_154", h = "_clear_85y0y_158", x = "_searchMd_85y0y_163", w = "_textarea_85y0y_200", p = "_textareaBox_85y0y_248", f = "_textareaBoxLg_85y0y_266", T = "_textareaBare_85y0y_272", u = "_textareaFooter_85y0y_323", I = "_selectWrap_85y0y_332", L = "_selectWrapPill_85y0y_339", b = "_select_85y0y_332", g = "_selectPill_85y0y_369", B = "_chevron_85y0y_400", D = "_switchRow_85y0y_416", k = "_switchTrackSlot_85y0y_424", F = "_switchInput_85y0y_433", O = "_switchTrack_85y0y_424", P = "_switchThumb_85y0y_458", R = "_switchText_85y0y_492", W = "_radioText_85y0y_493", m = "_switchLabel_85y0y_501", v = "_radioLabel_85y0y_502", M = "_switchDescription_85y0y_509", S = "_radioDescription_85y0y_510", j = "_radioRow_85y0y_517", q = "_radio_85y0y_493", z = "_fieldset_85y0y_524", A = "_radioList_85y0y_540", C = "_cardList_85y0y_597", E = "_card_85y0y_597", G = "_cardInput_85y0y_621", H = "_cardText_85y0y_654", J = "_cardTitle_85y0y_662", K = "_cardDescription_85y0y_668", N = "_cardIndicator_85y0y_678", Q = "_cardIndicatorOff_85y0y_683", U = "_cardIndicatorOn_85y0y_688", V = {
|
|
2
|
+
field: t,
|
|
3
|
+
label: c,
|
|
4
|
+
legend: _,
|
|
5
|
+
optional: o,
|
|
6
|
+
hint: r,
|
|
7
|
+
error: e,
|
|
8
|
+
errorIcon: a,
|
|
9
|
+
control: s,
|
|
10
|
+
focusFlow: i,
|
|
11
|
+
input: n,
|
|
12
|
+
leading: y,
|
|
13
|
+
suffix: d,
|
|
14
|
+
search: l,
|
|
15
|
+
clear: h,
|
|
16
|
+
searchMd: x,
|
|
17
|
+
textarea: w,
|
|
18
|
+
textareaBox: p,
|
|
19
|
+
textareaBoxLg: f,
|
|
20
|
+
textareaBare: T,
|
|
21
|
+
textareaFooter: u,
|
|
22
|
+
selectWrap: I,
|
|
23
|
+
selectWrapPill: L,
|
|
24
|
+
select: b,
|
|
25
|
+
selectPill: g,
|
|
26
|
+
chevron: B,
|
|
27
|
+
switchRow: D,
|
|
28
|
+
switchTrackSlot: k,
|
|
29
|
+
switchInput: F,
|
|
30
|
+
switchTrack: O,
|
|
31
|
+
switchThumb: P,
|
|
32
|
+
switchText: R,
|
|
33
|
+
radioText: W,
|
|
34
|
+
switchLabel: m,
|
|
35
|
+
radioLabel: v,
|
|
36
|
+
switchDescription: M,
|
|
37
|
+
radioDescription: S,
|
|
38
|
+
radioRow: j,
|
|
39
|
+
radio: q,
|
|
40
|
+
fieldset: z,
|
|
41
|
+
radioList: A,
|
|
42
|
+
cardList: C,
|
|
43
|
+
card: E,
|
|
44
|
+
cardInput: G,
|
|
45
|
+
cardText: H,
|
|
46
|
+
cardTitle: J,
|
|
47
|
+
cardDescription: K,
|
|
48
|
+
cardIndicator: N,
|
|
49
|
+
cardIndicatorOff: Q,
|
|
50
|
+
cardIndicatorOn: U
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
E as card,
|
|
54
|
+
K as cardDescription,
|
|
55
|
+
N as cardIndicator,
|
|
56
|
+
Q as cardIndicatorOff,
|
|
57
|
+
U as cardIndicatorOn,
|
|
58
|
+
G as cardInput,
|
|
59
|
+
C as cardList,
|
|
60
|
+
H as cardText,
|
|
61
|
+
J as cardTitle,
|
|
62
|
+
B as chevron,
|
|
63
|
+
h as clear,
|
|
64
|
+
s as control,
|
|
65
|
+
V as default,
|
|
66
|
+
e as error,
|
|
67
|
+
a as errorIcon,
|
|
68
|
+
t as field,
|
|
69
|
+
z as fieldset,
|
|
70
|
+
i as focusFlow,
|
|
71
|
+
r as hint,
|
|
72
|
+
n as input,
|
|
73
|
+
c as label,
|
|
74
|
+
y as leading,
|
|
75
|
+
_ as legend,
|
|
76
|
+
o as optional,
|
|
77
|
+
q as radio,
|
|
78
|
+
S as radioDescription,
|
|
79
|
+
v as radioLabel,
|
|
80
|
+
A as radioList,
|
|
81
|
+
j as radioRow,
|
|
82
|
+
W as radioText,
|
|
83
|
+
l as search,
|
|
84
|
+
x as searchMd,
|
|
85
|
+
b as select,
|
|
86
|
+
g as selectPill,
|
|
87
|
+
I as selectWrap,
|
|
88
|
+
L as selectWrapPill,
|
|
89
|
+
d as suffix,
|
|
90
|
+
M as switchDescription,
|
|
91
|
+
F as switchInput,
|
|
92
|
+
m as switchLabel,
|
|
93
|
+
D as switchRow,
|
|
94
|
+
R as switchText,
|
|
95
|
+
P as switchThumb,
|
|
96
|
+
O as switchTrack,
|
|
97
|
+
k as switchTrackSlot,
|
|
98
|
+
w as textarea,
|
|
99
|
+
T as textareaBare,
|
|
100
|
+
p as textareaBox,
|
|
101
|
+
f as textareaBoxLg,
|
|
102
|
+
u as textareaFooter
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=BackdropFields.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackdropFields.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { BackdropPageAction } from './BackdropPage';
|
|
3
|
+
import { BackdropStep } from './BackdropGlobalPanels';
|
|
4
|
+
/**
|
|
5
|
+
* `columns` (default): the label in a 200px column beside the control
|
|
6
|
+
* (--backdrop-settings-label-width). `stacked`: the label above the control,
|
|
7
|
+
* for a container too narrow for a column (a 480px form dialog).
|
|
8
|
+
*/
|
|
9
|
+
export type BackdropSettingsRowLayout = 'columns' | 'stacked';
|
|
10
|
+
export interface BackdropSettingsRowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
11
|
+
/** The setting's name: "Daily limit". 15/22, semibold. */
|
|
12
|
+
label: ReactNode;
|
|
13
|
+
/** One line under the name: "Messages sent per channel each day." 14/20, muted. */
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* The id of the control this row labels. With it the name renders as a
|
|
17
|
+
* `<label htmlFor>`, so a native control is named by it, and the row is not
|
|
18
|
+
* also a group (the name would be read twice). The description's id is then
|
|
19
|
+
* `${htmlFor}-description`, for the control's `aria-describedby`. Without it
|
|
20
|
+
* the name is a plain span and the row names itself as a group, described
|
|
21
|
+
* by the description.
|
|
22
|
+
*/
|
|
23
|
+
htmlFor?: string;
|
|
24
|
+
/** The control: an input, a select, a switch, a value. */
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
/** One trailing action after the control: "Change", "Disconnect". An outline button at 34px. */
|
|
27
|
+
action?: BackdropPageAction;
|
|
28
|
+
layout?: BackdropSettingsRowLayout;
|
|
29
|
+
/**
|
|
30
|
+
* `center` (default) centres the label on the control, right for a 40px
|
|
31
|
+
* input or a switch. `start` tops them, for a tall control (a text area).
|
|
32
|
+
*/
|
|
33
|
+
align?: 'center' | 'start';
|
|
34
|
+
linkComponent?: ElementType;
|
|
35
|
+
}
|
|
36
|
+
export declare function BackdropSettingsRow({ label, description, htmlFor, children, action, layout, align, linkComponent, className, ...rest }: BackdropSettingsRowProps): import("react").JSX.Element;
|
|
37
|
+
export interface BackdropSettingsSectionProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'children'> {
|
|
38
|
+
/** The section's name: "Sending". Drawn by BackdropSectionHeader. */
|
|
39
|
+
title: ReactNode;
|
|
40
|
+
/** One line under the name: "Added to the end of every email." 14/20, muted. */
|
|
41
|
+
description?: ReactNode;
|
|
42
|
+
/** A trailing link in the header: "Reset to defaults". */
|
|
43
|
+
action?: BackdropPageAction;
|
|
44
|
+
/** 2 under a page title (default), 3 inside a settings dialog, whose title is the h2. Size does not change. */
|
|
45
|
+
level?: 2 | 3;
|
|
46
|
+
/** BackdropSettingsRow elements. */
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
linkComponent?: ElementType;
|
|
49
|
+
}
|
|
50
|
+
/** A `<section>` named by its heading, holding a run of ruled rows. */
|
|
51
|
+
export declare function BackdropSettingsSection({ title, description, action, level, children, linkComponent, className, ...rest }: BackdropSettingsSectionProps): import("react").JSX.Element;
|
|
52
|
+
export interface BackdropSaveFooterProps {
|
|
53
|
+
/** "Cancel": a ghost button. */
|
|
54
|
+
cancel: BackdropPageAction;
|
|
55
|
+
/** "Save": ink by default, the primary inside a dialog. */
|
|
56
|
+
save: BackdropPageAction;
|
|
57
|
+
/**
|
|
58
|
+
* `ink` (default) as in a dialog. `primary` is the screen's one orange
|
|
59
|
+
* action, for a settings page with no other primary on it.
|
|
60
|
+
*/
|
|
61
|
+
emphasis?: 'ink' | 'primary';
|
|
62
|
+
/** A short fact at the start of the bar: "Unsaved changes". Muted. */
|
|
63
|
+
status?: ReactNode;
|
|
64
|
+
/** The save is in progress: Save shows the button's spinner and `aria-busy`. */
|
|
65
|
+
busy?: boolean;
|
|
66
|
+
/** Nothing to save yet. */
|
|
67
|
+
saveDisabled?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* `bar` (default): its own white bar with a hairline above, padded 16 / 24.
|
|
70
|
+
* `plain`: the two buttons only, to pass as BackdropDialog's `footer`, which
|
|
71
|
+
* draws the bar itself.
|
|
72
|
+
*/
|
|
73
|
+
appearance?: 'bar' | 'plain';
|
|
74
|
+
/** `bar` only: stick to the bottom of the scrolling container. */
|
|
75
|
+
sticky?: boolean;
|
|
76
|
+
linkComponent?: ElementType;
|
|
77
|
+
className?: string;
|
|
78
|
+
}
|
|
79
|
+
export declare function BackdropSaveFooter({ cancel, save, emphasis, status, busy, saveDisabled, appearance, sticky, linkComponent, className, }: BackdropSaveFooterProps): import("react").JSX.Element;
|
|
80
|
+
export interface BackdropFlowHeaderProps {
|
|
81
|
+
/** The app's 32px mark. Decorative: the flow's name follows it. */
|
|
82
|
+
mark?: ReactNode;
|
|
83
|
+
/** The flow's name: "Outbound setup". */
|
|
84
|
+
flowName: ReactNode;
|
|
85
|
+
/** The steps, drawn by BackdropStepList as the horizontal stepper in the bar's middle. */
|
|
86
|
+
steps?: BackdropStep[];
|
|
87
|
+
/** The stepper's accessible name ("Setup steps"). Required with `steps`. */
|
|
88
|
+
stepsLabel?: string;
|
|
89
|
+
/** The position, formatted by the caller: "Step 2 of 4". Above the title. */
|
|
90
|
+
stepText?: ReactNode;
|
|
91
|
+
/** The step's title. The page's one h1, at the 40px focus-flow size (ADR-0017, D1). */
|
|
92
|
+
title?: ReactNode;
|
|
93
|
+
/** One line under the title. */
|
|
94
|
+
description?: ReactNode;
|
|
95
|
+
/** The exit button's name ("Exit setup"). Omit to draw no exit. Stage B wires it. */
|
|
96
|
+
exitLabel?: string;
|
|
97
|
+
className?: string;
|
|
98
|
+
}
|
|
99
|
+
export declare function BackdropFlowHeader({ mark, flowName, steps, stepsLabel, stepText, title, description, exitLabel, className, }: BackdropFlowHeaderProps): import("react").JSX.Element;
|
|
100
|
+
/** The outcome's tone, in the status pill's colours (ADR-0017, D7). */
|
|
101
|
+
export type BackdropResultTone = 'success' | 'danger' | 'neutral';
|
|
102
|
+
/** One line of the details card: "Amount" · "€1,200.00". */
|
|
103
|
+
export interface BackdropResultDetail {
|
|
104
|
+
key: string;
|
|
105
|
+
label: ReactNode;
|
|
106
|
+
value: ReactNode;
|
|
107
|
+
}
|
|
108
|
+
export interface BackdropResultProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'children'> {
|
|
109
|
+
tone?: BackdropResultTone;
|
|
110
|
+
/** 20px (ADR-0017, D17), drawn in the 48px circle: a check, a cross, an hourglass. Decorative. */
|
|
111
|
+
icon: ReactNode;
|
|
112
|
+
/** "Payment received". The page's h1 by default. */
|
|
113
|
+
title: ReactNode;
|
|
114
|
+
/** One line: "€1,200 is now in your wallet." */
|
|
115
|
+
body?: ReactNode;
|
|
116
|
+
/** Key-value lines in a flat card under the body. */
|
|
117
|
+
details?: BackdropResultDetail[];
|
|
118
|
+
/** The details list's accessible name ("Payment details"). */
|
|
119
|
+
detailsLabel?: string;
|
|
120
|
+
/** The main next step: the screen's orange button. */
|
|
121
|
+
primaryAction?: BackdropPageAction;
|
|
122
|
+
/** A second, quieter step: an outline button after the first. */
|
|
123
|
+
secondaryAction?: BackdropPageAction;
|
|
124
|
+
/** 1 (default) on its own page; 2 inside a dialog or under another title. Size does not change. */
|
|
125
|
+
headingLevel?: 1 | 2;
|
|
126
|
+
linkComponent?: ElementType;
|
|
127
|
+
}
|
|
128
|
+
export declare function BackdropResult({ tone, icon, title, body, details, detailsLabel, primaryAction, secondaryAction, headingLevel, linkComponent, className, ...rest }: BackdropResultProps): import("react").JSX.Element;
|