@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,114 @@
|
|
|
1
|
+
const t = "_srOnly_1mwtw_6", o = "_list_1mwtw_17", w = "_listCard_1mwtw_30", _ = "_listInCard_1mwtw_34", e = "_row_1mwtw_38", r = "_rowInteractive_1mwtw_54", n = "_rowSelected_1mwtw_58", c = "_rowLeading_1mwtw_72", a = "_rowText_1mwtw_78", l = "_rowTitle_1mwtw_86", s = "_rowDescription_1mwtw_87", i = "_rowTarget_1mwtw_107", m = "_rowMeta_1mwtw_141", v = "_rowMetaUnread_1mwtw_153", k = "_rowUnread_1mwtw_158", d = "_rowStatus_1mwtw_166", u = "_rowValue_1mwtw_171", b = "_rowFigure_1mwtw_180", C = "_rowValueCaption_1mwtw_188", p = "_rowAction_1mwtw_195", g = "_rowChevron_1mwtw_200", S = "_kv_1mwtw_208", I = "_kvOpen_1mwtw_216", T = "_kvRow_1mwtw_220", h = "_kvLabel_1mwtw_230", y = "_kvValue_1mwtw_234", L = "_kvFigure_1mwtw_242", V = "_kvCaption_1mwtw_247", A = "_kvInline_1mwtw_254", B = "_kvStacked_1mwtw_271", F = "_table_1mwtw_288", M = "_caption_1mwtw_297", O = "_selectCol_1mwtw_305", U = "_th_1mwtw_309", x = "_td_1mwtw_310", D = "_tableSticky_1mwtw_337", E = "_alignEnd_1mwtw_344", R = "_sortButton_1mwtw_353", f = "_sortButtonActive_1mwtw_368", j = "_sortIcon_1mwtw_377", q = "_numeric_1mwtw_390", z = "_selectCell_1mwtw_395", G = "_tr_1mwtw_403", H = "_tableInteractive_1mwtw_407", J = "_trSelected_1mwtw_411", K = "_cellTarget_1mwtw_432", N = "_skeleton_1mwtw_460", P = "_emptyCell_1mwtw_476", Q = "_toolbar_1mwtw_482", W = "_toolbarLead_1mwtw_491", X = "_toolbarTrail_1mwtw_492", Y = "_toolbarChips_1mwtw_493", Z = "_toolbarSearch_1mwtw_513", $ = "_toolbarCount_1mwtw_518", tt = {
|
|
2
|
+
srOnly: t,
|
|
3
|
+
list: o,
|
|
4
|
+
listCard: w,
|
|
5
|
+
listInCard: _,
|
|
6
|
+
row: e,
|
|
7
|
+
rowInteractive: r,
|
|
8
|
+
rowSelected: n,
|
|
9
|
+
rowLeading: c,
|
|
10
|
+
rowText: a,
|
|
11
|
+
rowTitle: l,
|
|
12
|
+
rowDescription: s,
|
|
13
|
+
rowTarget: i,
|
|
14
|
+
rowMeta: m,
|
|
15
|
+
rowMetaUnread: v,
|
|
16
|
+
rowUnread: k,
|
|
17
|
+
rowStatus: d,
|
|
18
|
+
rowValue: u,
|
|
19
|
+
rowFigure: b,
|
|
20
|
+
rowValueCaption: C,
|
|
21
|
+
rowAction: p,
|
|
22
|
+
rowChevron: g,
|
|
23
|
+
kv: S,
|
|
24
|
+
kvOpen: I,
|
|
25
|
+
kvRow: T,
|
|
26
|
+
kvLabel: h,
|
|
27
|
+
kvValue: y,
|
|
28
|
+
kvFigure: L,
|
|
29
|
+
kvCaption: V,
|
|
30
|
+
kvInline: A,
|
|
31
|
+
kvStacked: B,
|
|
32
|
+
table: F,
|
|
33
|
+
caption: M,
|
|
34
|
+
selectCol: O,
|
|
35
|
+
th: U,
|
|
36
|
+
td: x,
|
|
37
|
+
tableSticky: D,
|
|
38
|
+
alignEnd: E,
|
|
39
|
+
sortButton: R,
|
|
40
|
+
sortButtonActive: f,
|
|
41
|
+
sortIcon: j,
|
|
42
|
+
numeric: q,
|
|
43
|
+
selectCell: z,
|
|
44
|
+
tr: G,
|
|
45
|
+
tableInteractive: H,
|
|
46
|
+
trSelected: J,
|
|
47
|
+
cellTarget: K,
|
|
48
|
+
skeleton: N,
|
|
49
|
+
emptyCell: P,
|
|
50
|
+
toolbar: Q,
|
|
51
|
+
toolbarLead: W,
|
|
52
|
+
toolbarTrail: X,
|
|
53
|
+
toolbarChips: Y,
|
|
54
|
+
toolbarSearch: Z,
|
|
55
|
+
toolbarCount: $
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
E as alignEnd,
|
|
59
|
+
M as caption,
|
|
60
|
+
K as cellTarget,
|
|
61
|
+
tt as default,
|
|
62
|
+
P as emptyCell,
|
|
63
|
+
S as kv,
|
|
64
|
+
V as kvCaption,
|
|
65
|
+
L as kvFigure,
|
|
66
|
+
A as kvInline,
|
|
67
|
+
h as kvLabel,
|
|
68
|
+
I as kvOpen,
|
|
69
|
+
T as kvRow,
|
|
70
|
+
B as kvStacked,
|
|
71
|
+
y as kvValue,
|
|
72
|
+
o as list,
|
|
73
|
+
w as listCard,
|
|
74
|
+
_ as listInCard,
|
|
75
|
+
q as numeric,
|
|
76
|
+
e as row,
|
|
77
|
+
p as rowAction,
|
|
78
|
+
g as rowChevron,
|
|
79
|
+
s as rowDescription,
|
|
80
|
+
b as rowFigure,
|
|
81
|
+
r as rowInteractive,
|
|
82
|
+
c as rowLeading,
|
|
83
|
+
m as rowMeta,
|
|
84
|
+
v as rowMetaUnread,
|
|
85
|
+
n as rowSelected,
|
|
86
|
+
d as rowStatus,
|
|
87
|
+
i as rowTarget,
|
|
88
|
+
a as rowText,
|
|
89
|
+
l as rowTitle,
|
|
90
|
+
k as rowUnread,
|
|
91
|
+
u as rowValue,
|
|
92
|
+
C as rowValueCaption,
|
|
93
|
+
z as selectCell,
|
|
94
|
+
O as selectCol,
|
|
95
|
+
N as skeleton,
|
|
96
|
+
R as sortButton,
|
|
97
|
+
f as sortButtonActive,
|
|
98
|
+
j as sortIcon,
|
|
99
|
+
t as srOnly,
|
|
100
|
+
F as table,
|
|
101
|
+
H as tableInteractive,
|
|
102
|
+
D as tableSticky,
|
|
103
|
+
x as td,
|
|
104
|
+
U as th,
|
|
105
|
+
Q as toolbar,
|
|
106
|
+
Y as toolbarChips,
|
|
107
|
+
$ as toolbarCount,
|
|
108
|
+
W as toolbarLead,
|
|
109
|
+
Z as toolbarSearch,
|
|
110
|
+
X as toolbarTrail,
|
|
111
|
+
G as tr,
|
|
112
|
+
J as trSelected
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=BackdropLists.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackdropLists.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { CSSProperties, ElementType, ReactElement, ReactNode } from 'react';
|
|
2
|
+
export type BackdropPopoverWidth = 'help' | 'account' | 'tokens' | 'mission' | 'allApps' | 'auto';
|
|
3
|
+
export interface BackdropPopoverProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** The panel's accessible name ("Account", "Token balance"). */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Paper's widths per popover; `auto` sizes to content. */
|
|
8
|
+
width?: BackdropPopoverWidth;
|
|
9
|
+
/** `menu`: 6px around a list of rows. `card`: 20px around free content. `none`. */
|
|
10
|
+
padding?: 'menu' | 'card' | 'none';
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
export declare function BackdropPopover({ children, label, width, padding, className, style }: BackdropPopoverProps): import("react").JSX.Element;
|
|
15
|
+
export interface BackdropPopoverAnchorProps {
|
|
16
|
+
/**
|
|
17
|
+
* The opener (a strip chip, the avatar, a "…" button): one element that
|
|
18
|
+
* renders a focusable control and passes `ref`, `aria-expanded`,
|
|
19
|
+
* `aria-controls`, `onClick` and `onKeyDown` through to it, as every Backdrop
|
|
20
|
+
* button does. Its pressed state follows `aria-expanded`, which this sets.
|
|
21
|
+
*/
|
|
22
|
+
trigger: ReactElement<Record<string, unknown>>;
|
|
23
|
+
/** The panel, shown while the anchor is open. */
|
|
24
|
+
popover?: ReactNode;
|
|
25
|
+
/** Controlled open state. Omit it and the anchor keeps its own. */
|
|
26
|
+
open?: boolean;
|
|
27
|
+
/** Starting state when uncontrolled: a story draws the panel open with this. */
|
|
28
|
+
defaultOpen?: boolean;
|
|
29
|
+
/** Every open and close, including Escape, an outside click and focus leaving. */
|
|
30
|
+
onOpenChange?: (open: boolean) => void;
|
|
31
|
+
/** Align the panel's start or end edge with the opener's (round 6: "aligned to its edge"). */
|
|
32
|
+
align?: 'start' | 'end';
|
|
33
|
+
/** Open beside the opener rather than under it (the rail's All apps tile). */
|
|
34
|
+
side?: 'bottom' | 'right';
|
|
35
|
+
/**
|
|
36
|
+
* This panel's key in a surrounding BackdropChrome. Its open state is then
|
|
37
|
+
* the chrome's: opening it closes any other chrome panel, a modal dialog
|
|
38
|
+
* closes it, and `useBackdropPanel(panel)` opens it from anywhere. Takes
|
|
39
|
+
* precedence over `open`; `onOpenChange` still hears every change. Ignored
|
|
40
|
+
* outside a BackdropChrome.
|
|
41
|
+
*/
|
|
42
|
+
panel?: string;
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Where an arrow key moves focus inside an open Backdrop panel, as an index into
|
|
47
|
+
* its tab stops, or null when the key is not one the panel handles. `current`
|
|
48
|
+
* is -1 when focus is on nothing in the list. The ADR-0010 disclosure rule: Up
|
|
49
|
+
* and Down move in DOM order and stop at the ends, Home and End jump to them,
|
|
50
|
+
* and Tab is left alone.
|
|
51
|
+
*/
|
|
52
|
+
export declare function backdropArrowTarget(key: string, current: number, count: number): number | null;
|
|
53
|
+
export declare function BackdropPopoverAnchor({ trigger, popover, open, defaultOpen, onOpenChange, align, side, panel, className, }: BackdropPopoverAnchorProps): import("react").JSX.Element;
|
|
54
|
+
export interface BackdropMenuRow {
|
|
55
|
+
key: string;
|
|
56
|
+
label: ReactNode;
|
|
57
|
+
/** 18px stroke icon. */
|
|
58
|
+
icon?: ReactNode;
|
|
59
|
+
href?: string;
|
|
60
|
+
onClick?: () => void;
|
|
61
|
+
/** Right-hand content: a badge, a shortcut, a segmented control. */
|
|
62
|
+
trailing?: ReactNode;
|
|
63
|
+
/** Show the hover ground, for a story of the hover state. */
|
|
64
|
+
highlighted?: boolean;
|
|
65
|
+
/** Render the row as a static line holding `trailing` (the Language row). */
|
|
66
|
+
static?: boolean;
|
|
67
|
+
/** Draw a divider above this row. */
|
|
68
|
+
dividerBefore?: boolean;
|
|
69
|
+
/** The current choice (a selected option in a filter list). */
|
|
70
|
+
selected?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface BackdropMenuListProps {
|
|
73
|
+
rows: BackdropMenuRow[];
|
|
74
|
+
linkComponent?: ElementType;
|
|
75
|
+
className?: string;
|
|
76
|
+
}
|
|
77
|
+
export declare function BackdropMenuList({ rows, linkComponent: Link, className }: BackdropMenuListProps): import("react").JSX.Element;
|
|
78
|
+
export interface BackdropSegmentedOption {
|
|
79
|
+
value: string;
|
|
80
|
+
label: ReactNode;
|
|
81
|
+
/** Leading 16px stroke icon. Decorative: the label names the segment. */
|
|
82
|
+
icon?: ReactNode;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* `default`: the 30px track that sits inside a menu row (the Language row).
|
|
86
|
+
* `lg`: a 40px track, the height a control stands at in a form row (ADR-0017, D4).
|
|
87
|
+
*/
|
|
88
|
+
export type BackdropSegmentedSize = 'default' | 'lg';
|
|
89
|
+
export interface BackdropSegmentedProps {
|
|
90
|
+
/** The group's name ("Language"). */
|
|
91
|
+
label: string;
|
|
92
|
+
options: BackdropSegmentedOption[];
|
|
93
|
+
value: string;
|
|
94
|
+
onValueChange?: (value: string) => void;
|
|
95
|
+
size?: BackdropSegmentedSize;
|
|
96
|
+
className?: string;
|
|
97
|
+
}
|
|
98
|
+
/** Two or three exclusive options in a sunken track (English | Français). */
|
|
99
|
+
export declare function BackdropSegmented({ label, options, value, onValueChange, size, className }: BackdropSegmentedProps): import("react").JSX.Element;
|
|
100
|
+
export type BackdropDialogWidth = 'form' | 'search' | 'settings';
|
|
101
|
+
export interface BackdropDialogSection {
|
|
102
|
+
key: string;
|
|
103
|
+
label: ReactNode;
|
|
104
|
+
/** The section on show. Exactly one entry should carry it. */
|
|
105
|
+
active?: boolean;
|
|
106
|
+
}
|
|
107
|
+
export interface BackdropDialogProps {
|
|
108
|
+
/** The dialog's heading. Omit only when `label` names it (the search dialog). */
|
|
109
|
+
title?: ReactNode;
|
|
110
|
+
/** Accessible name when there is no visible title. With a title and no label, the title names the dialog. */
|
|
111
|
+
label?: string;
|
|
112
|
+
children: ReactNode;
|
|
113
|
+
/** Buttons at the foot: "Cancel" outline, the action in ink. */
|
|
114
|
+
footer?: ReactNode;
|
|
115
|
+
/** The close button's name. Omit to draw no close button. */
|
|
116
|
+
closeLabel?: string;
|
|
117
|
+
onClose?: () => void;
|
|
118
|
+
/**
|
|
119
|
+
* `form` 480px, `search` 640px. `settings` 880×640 (ADR-0017, D5): a section
|
|
120
|
+
* nav down the left (`sections`) beside a content area, with the header and
|
|
121
|
+
* footer ruled off from them.
|
|
122
|
+
*/
|
|
123
|
+
width?: BackdropDialogWidth;
|
|
124
|
+
/** A mark before the title: the app's 32px tile on an app's settings. Decorative. */
|
|
125
|
+
leading?: ReactNode;
|
|
126
|
+
/**
|
|
127
|
+
* The `settings` size's section nav. One section is shown at a time (D15):
|
|
128
|
+
* `children` is the active section's content, and the active entry is marked
|
|
129
|
+
* `aria-current`. Ignored at the other sizes.
|
|
130
|
+
*/
|
|
131
|
+
sections?: BackdropDialogSection[];
|
|
132
|
+
/** The section nav's accessible name ("Sections"). Required with `sections`. */
|
|
133
|
+
sectionsLabel?: string;
|
|
134
|
+
/** `centre` (default) or `top`: 96px from the top, as search opens. */
|
|
135
|
+
placement?: 'centre' | 'top';
|
|
136
|
+
/**
|
|
137
|
+
* Position against the nearest positioned ancestor (the frame) rather than
|
|
138
|
+
* the viewport. For stories and screenshots of a dialog in place.
|
|
139
|
+
*/
|
|
140
|
+
contained?: boolean;
|
|
141
|
+
/** Remove the padding, for a dialog that lays out its own regions. */
|
|
142
|
+
bare?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* This dialog's key in a surrounding BackdropChrome, so
|
|
145
|
+
* `useBackdropPanel(panel)` reads and sets whether it is up. With or without
|
|
146
|
+
* one, a modal dialog inside a BackdropChrome claims it while mounted (see
|
|
147
|
+
* below).
|
|
148
|
+
*/
|
|
149
|
+
panel?: string;
|
|
150
|
+
className?: string;
|
|
151
|
+
}
|
|
152
|
+
export declare function BackdropDialog({ title, label, children, footer, closeLabel, onClose, width, placement, contained, bare, leading, sections, sectionsLabel, panel, className, }: BackdropDialogProps): import("react").JSX.Element;
|
|
153
|
+
export interface BackdropToastProps {
|
|
154
|
+
/** One short line: "Campaign launched", "3 messages sent". */
|
|
155
|
+
children: ReactNode;
|
|
156
|
+
/** Leading icon (a check for success). */
|
|
157
|
+
icon?: ReactNode;
|
|
158
|
+
/** One action, a text link: "Undo", "View". */
|
|
159
|
+
action?: ReactNode;
|
|
160
|
+
/** The dismiss button's name. */
|
|
161
|
+
closeLabel?: string;
|
|
162
|
+
onClose?: () => void;
|
|
163
|
+
tone?: 'default' | 'danger';
|
|
164
|
+
className?: string;
|
|
165
|
+
}
|
|
166
|
+
/** An ink toast. Mount it inside a BackdropToastRegion, which announces it. */
|
|
167
|
+
export declare function BackdropToast({ children, icon, action, closeLabel, onClose, tone, className }: BackdropToastProps): import("react").JSX.Element;
|
|
168
|
+
export interface BackdropToastRegionProps {
|
|
169
|
+
children?: ReactNode;
|
|
170
|
+
/** The live region's name ("Notifications"). */
|
|
171
|
+
label: string;
|
|
172
|
+
contained?: boolean;
|
|
173
|
+
}
|
|
174
|
+
/** The bottom-centre stack toasts appear in: a polite live region. */
|
|
175
|
+
export declare function BackdropToastRegion({ children, label, contained }: BackdropToastRegionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r, jsxs as N, Fragment as q } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as A, useId as F, useLayoutEffect as R, useEffect as M, useCallback as S, useContext as V, isValidElement as O, cloneElement as G, createContext as J } from "react";
|
|
4
|
+
import { useAnchoredOverlay as j } from "../../anchored-overlay.js";
|
|
5
|
+
import e from "./BackdropOverlays.module.css.js";
|
|
6
|
+
import { cx as p } from "./cx.js";
|
|
7
|
+
import { Close as z } from "./icons.js";
|
|
8
|
+
import { BackdropIconButton as Q } from "./BackdropButton.js";
|
|
9
|
+
import { useChromeState as W, useChromePanel as X } from "./BackdropChrome.js";
|
|
10
|
+
function de({ children: t, label: s, width: i = "auto", padding: d = "card", className: a, style: m }) {
|
|
11
|
+
return /* @__PURE__ */ r("div", { "aria-label": s, className: p(e.popover, e[`w-${i}`], e[`pad-${d}`], a), style: m, children: t });
|
|
12
|
+
}
|
|
13
|
+
const U = J(null), Y = [
|
|
14
|
+
"a[href]",
|
|
15
|
+
"button:not([disabled])",
|
|
16
|
+
"input:not([disabled])",
|
|
17
|
+
"select:not([disabled])",
|
|
18
|
+
"textarea:not([disabled])",
|
|
19
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
20
|
+
].join(",");
|
|
21
|
+
function w(t) {
|
|
22
|
+
return t ? Array.from(t.querySelectorAll(Y)) : [];
|
|
23
|
+
}
|
|
24
|
+
function Z(t, s, i) {
|
|
25
|
+
if (i === 0) return null;
|
|
26
|
+
switch (t) {
|
|
27
|
+
case "ArrowDown":
|
|
28
|
+
return s < 0 ? 0 : Math.min(s + 1, i - 1);
|
|
29
|
+
case "ArrowUp":
|
|
30
|
+
return s < 0 ? i - 1 : Math.max(s - 1, 0);
|
|
31
|
+
case "Home":
|
|
32
|
+
return 0;
|
|
33
|
+
case "End":
|
|
34
|
+
return i - 1;
|
|
35
|
+
default:
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function _(t) {
|
|
40
|
+
return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLElement && t.isContentEditable;
|
|
41
|
+
}
|
|
42
|
+
function ee(t, s) {
|
|
43
|
+
typeof t == "function" ? t(s) : t && (t.current = s);
|
|
44
|
+
}
|
|
45
|
+
function ue({
|
|
46
|
+
trigger: t,
|
|
47
|
+
popover: s,
|
|
48
|
+
open: i,
|
|
49
|
+
defaultOpen: d,
|
|
50
|
+
onOpenChange: a,
|
|
51
|
+
align: m = "start",
|
|
52
|
+
side: l = "bottom",
|
|
53
|
+
panel: D,
|
|
54
|
+
className: f
|
|
55
|
+
}) {
|
|
56
|
+
const P = X(D), c = j(
|
|
57
|
+
P ? {
|
|
58
|
+
open: P.open,
|
|
59
|
+
onOpenChange: (n) => {
|
|
60
|
+
P.setOpen(n), a == null || a(n);
|
|
61
|
+
}
|
|
62
|
+
} : { open: i, defaultOpen: d, onOpenChange: a }
|
|
63
|
+
), g = A(null), K = A(!1);
|
|
64
|
+
M(() => {
|
|
65
|
+
var n;
|
|
66
|
+
!c.open || !K.current || (K.current = !1, (n = w(g.current)[0]) == null || n.focus());
|
|
67
|
+
}, [c.open]), R(() => {
|
|
68
|
+
const n = g.current;
|
|
69
|
+
if (!c.open || l !== "right" || !n) return;
|
|
70
|
+
const u = () => {
|
|
71
|
+
n.style.translate = "";
|
|
72
|
+
const k = parseFloat(getComputedStyle(n).getPropertyValue("--backdrop-popover-offset")) || 8, o = n.getBoundingClientRect(), v = Math.min(o.bottom - (window.innerHeight - k), o.top - k);
|
|
73
|
+
v > 0 && (n.style.translate = `0 ${-v}px`);
|
|
74
|
+
};
|
|
75
|
+
return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
76
|
+
}, [c.open, l]);
|
|
77
|
+
const x = c.triggerProps, T = O(t) ? t.props : {}, E = T.onClick, B = T.onKeyDown, h = T.ref, { toggle: y, setOpen: I } = c, H = S(
|
|
78
|
+
(n) => {
|
|
79
|
+
x.ref(n), ee(h, n);
|
|
80
|
+
},
|
|
81
|
+
// triggerProps.ref is stable (useCallback inside the hook).
|
|
82
|
+
[h]
|
|
83
|
+
), b = O(t) ? G(t, {
|
|
84
|
+
ref: H,
|
|
85
|
+
"aria-expanded": x["aria-expanded"],
|
|
86
|
+
"aria-controls": x["aria-controls"],
|
|
87
|
+
onClick: (n) => {
|
|
88
|
+
E == null || E(n), y();
|
|
89
|
+
},
|
|
90
|
+
onKeyDown: (n) => {
|
|
91
|
+
var u;
|
|
92
|
+
B == null || B(n), x.onKeyDown(n), !(n.key !== "ArrowDown" || n.defaultPrevented) && (n.preventDefault(), c.open ? (u = w(g.current)[0]) == null || u.focus() : (K.current = !0, I(!0)));
|
|
93
|
+
}
|
|
94
|
+
}) : t, C = (n) => {
|
|
95
|
+
var o;
|
|
96
|
+
if (c.panelProps.onKeyDown(n), n.defaultPrevented || _(n.target)) return;
|
|
97
|
+
const u = w(g.current), k = Z(n.key, u.indexOf(document.activeElement), u.length);
|
|
98
|
+
k !== null && (n.preventDefault(), (o = u[k]) == null || o.focus());
|
|
99
|
+
}, L = S(
|
|
100
|
+
(n) => {
|
|
101
|
+
g.current = n, c.panelProps.ref(n);
|
|
102
|
+
},
|
|
103
|
+
// panelProps.ref is stable (useCallback inside the hook).
|
|
104
|
+
[]
|
|
105
|
+
);
|
|
106
|
+
return /* @__PURE__ */ N("div", { className: p(e.anchor, f), children: [
|
|
107
|
+
b,
|
|
108
|
+
c.open && s && /* @__PURE__ */ r("div", { ref: L, id: c.panelProps.id, onKeyDown: C, className: p(e.placement, e[`side-${l}`], e[`align-${m}`]), children: /* @__PURE__ */ r(U.Provider, { value: { close: c.close }, children: s }) })
|
|
109
|
+
] });
|
|
110
|
+
}
|
|
111
|
+
function me({ rows: t, linkComponent: s = "a", className: i }) {
|
|
112
|
+
const d = V(U);
|
|
113
|
+
return /* @__PURE__ */ r("ul", { className: p(e.menuList, i), children: t.map((a) => {
|
|
114
|
+
const m = /* @__PURE__ */ N(q, { children: [
|
|
115
|
+
a.icon && /* @__PURE__ */ r("span", { className: e.rowIcon, children: a.icon }),
|
|
116
|
+
/* @__PURE__ */ r("span", { className: e.rowLabel, children: a.label }),
|
|
117
|
+
a.trailing && /* @__PURE__ */ r("span", { className: e.rowTrailing, children: a.trailing })
|
|
118
|
+
] }), l = a.static ? "div" : a.href !== void 0 ? s : "button", D = a.static ? {} : a.href !== void 0 ? { href: a.href } : { type: "button" };
|
|
119
|
+
return /* @__PURE__ */ N("li", { className: e.menuItem, children: [
|
|
120
|
+
a.dividerBefore && /* @__PURE__ */ r("span", { className: e.divider, "aria-hidden": "true" }),
|
|
121
|
+
/* @__PURE__ */ r(
|
|
122
|
+
l,
|
|
123
|
+
{
|
|
124
|
+
...D,
|
|
125
|
+
onClick: a.static ? void 0 : () => {
|
|
126
|
+
var f;
|
|
127
|
+
(f = a.onClick) == null || f.call(a), d == null || d.close();
|
|
128
|
+
},
|
|
129
|
+
"aria-current": a.selected ? "true" : void 0,
|
|
130
|
+
className: p(e.row, a.static && e.rowStatic, a.highlighted && e.rowHighlighted),
|
|
131
|
+
children: m
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
] }, a.key);
|
|
135
|
+
}) });
|
|
136
|
+
}
|
|
137
|
+
function pe({ label: t, options: s, value: i, onValueChange: d, size: a = "default", className: m }) {
|
|
138
|
+
return /* @__PURE__ */ r("div", { role: "radiogroup", "aria-label": t, className: p(e.segmented, a === "lg" && e.segmentedLg, m), children: s.map((l) => /* @__PURE__ */ N(
|
|
139
|
+
"button",
|
|
140
|
+
{
|
|
141
|
+
type: "button",
|
|
142
|
+
role: "radio",
|
|
143
|
+
"aria-checked": l.value === i,
|
|
144
|
+
className: e.segment,
|
|
145
|
+
onClick: d ? () => d(l.value) : void 0,
|
|
146
|
+
children: [
|
|
147
|
+
l.icon && /* @__PURE__ */ r("span", { className: e.segmentIcon, "aria-hidden": "true", children: l.icon }),
|
|
148
|
+
l.label
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
l.value
|
|
152
|
+
)) });
|
|
153
|
+
}
|
|
154
|
+
function fe({
|
|
155
|
+
title: t,
|
|
156
|
+
label: s,
|
|
157
|
+
children: i,
|
|
158
|
+
footer: d,
|
|
159
|
+
closeLabel: a,
|
|
160
|
+
onClose: m,
|
|
161
|
+
width: l = "form",
|
|
162
|
+
placement: D = "centre",
|
|
163
|
+
contained: f = !1,
|
|
164
|
+
bare: P = !1,
|
|
165
|
+
leading: c,
|
|
166
|
+
sections: g,
|
|
167
|
+
sectionsLabel: K,
|
|
168
|
+
panel: x,
|
|
169
|
+
className: T
|
|
170
|
+
}) {
|
|
171
|
+
const E = l === "settings", B = A(null), h = A(m);
|
|
172
|
+
h.current = m;
|
|
173
|
+
const y = W(), I = F(), H = F(), b = x ?? `dialog:${I}`, C = y == null ? void 0 : y.setOpenKey;
|
|
174
|
+
R(() => {
|
|
175
|
+
if (!(!C || f))
|
|
176
|
+
return C(b), () => C((o) => o === b ? null : o);
|
|
177
|
+
}, [C, b, f]);
|
|
178
|
+
const L = A(!1), n = y == null ? void 0 : y.openKey;
|
|
179
|
+
M(() => {
|
|
180
|
+
var o;
|
|
181
|
+
f || n === void 0 || (n === b ? L.current = !0 : L.current && (L.current = !1, (o = h.current) == null || o.call(h)));
|
|
182
|
+
}, [n, b, f]), M(() => {
|
|
183
|
+
const o = document.activeElement;
|
|
184
|
+
return () => {
|
|
185
|
+
var $;
|
|
186
|
+
const v = document.activeElement;
|
|
187
|
+
(!v || v === document.body || !!(($ = B.current) != null && $.contains(v))) && o instanceof HTMLElement && o !== document.body && o.isConnected && o.focus();
|
|
188
|
+
};
|
|
189
|
+
}, []);
|
|
190
|
+
const u = j({
|
|
191
|
+
open: !0,
|
|
192
|
+
hasTrigger: !1,
|
|
193
|
+
modal: !f,
|
|
194
|
+
onOpenChange: (o) => {
|
|
195
|
+
var v;
|
|
196
|
+
o || (v = h.current) == null || v.call(h);
|
|
197
|
+
}
|
|
198
|
+
}), k = S(
|
|
199
|
+
(o) => {
|
|
200
|
+
B.current = o, u.panelProps.ref(o);
|
|
201
|
+
},
|
|
202
|
+
// panelProps.ref is stable (useCallback inside the hook).
|
|
203
|
+
[]
|
|
204
|
+
);
|
|
205
|
+
return /* @__PURE__ */ r("div", { className: p(e.scrim, f && e.contained, D === "top" && e.top), children: /* @__PURE__ */ N(
|
|
206
|
+
"div",
|
|
207
|
+
{
|
|
208
|
+
ref: k,
|
|
209
|
+
id: u.panelProps.id,
|
|
210
|
+
onKeyDown: u.panelProps.onKeyDown,
|
|
211
|
+
role: "dialog",
|
|
212
|
+
"aria-modal": "true",
|
|
213
|
+
"aria-label": s,
|
|
214
|
+
"aria-labelledby": s === void 0 && t ? H : void 0,
|
|
215
|
+
className: p(e.dialog, e[`dw-${l}`], T),
|
|
216
|
+
children: [
|
|
217
|
+
(t || a || c) && /* @__PURE__ */ N("div", { className: p(e.dialogHeader, !!c && e.dialogHeaderLeading, E && e.dialogHeaderSettings), children: [
|
|
218
|
+
c && /* @__PURE__ */ r("span", { className: e.dialogLeading, "aria-hidden": "true", children: c }),
|
|
219
|
+
t && /* @__PURE__ */ r("h2", { id: H, className: e.dialogTitle, children: t }),
|
|
220
|
+
a && /* @__PURE__ */ r(Q, { label: a, icon: /* @__PURE__ */ r(z, {}), onClick: m, tooltip: !1 })
|
|
221
|
+
] }),
|
|
222
|
+
E ? /* @__PURE__ */ N("div", { className: e.settingsBody, children: [
|
|
223
|
+
g && g.length > 0 && /* @__PURE__ */ r("nav", { "aria-label": K, className: e.sectionNav, children: /* @__PURE__ */ r("ul", { className: e.sectionList, children: g.map((o) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r("button", { type: "button", "aria-current": o.active ? "true" : void 0, className: e.section, children: o.label }) }, o.key)) }) }),
|
|
224
|
+
/* @__PURE__ */ r("div", { className: p(e.settingsContent, !P && e.settingsContentPadding), children: i })
|
|
225
|
+
] }) : /* @__PURE__ */ r("div", { className: p(!P && e.dialogBody), children: i }),
|
|
226
|
+
d && /* @__PURE__ */ r("div", { className: e.dialogFooter, children: d })
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
) });
|
|
230
|
+
}
|
|
231
|
+
function he({ children: t, icon: s, action: i, closeLabel: d, onClose: a, tone: m = "default", className: l }) {
|
|
232
|
+
return /* @__PURE__ */ N("div", { className: p(e.toast, m === "danger" && e.toastDanger, l), children: [
|
|
233
|
+
s && /* @__PURE__ */ r("span", { className: e.toastIcon, children: s }),
|
|
234
|
+
/* @__PURE__ */ r("span", { className: e.toastText, children: t }),
|
|
235
|
+
i && /* @__PURE__ */ r("span", { className: e.toastAction, children: i }),
|
|
236
|
+
d && /* @__PURE__ */ r("button", { type: "button", "aria-label": d, className: e.toastClose, onClick: a, children: /* @__PURE__ */ r(z, { size: 16 }) })
|
|
237
|
+
] });
|
|
238
|
+
}
|
|
239
|
+
function ge({ children: t, label: s, contained: i = !1 }) {
|
|
240
|
+
return /* @__PURE__ */ r("div", { role: "region", "aria-label": s, "aria-live": "polite", className: p(e.toastRegion, i && e.contained), children: t });
|
|
241
|
+
}
|
|
242
|
+
export {
|
|
243
|
+
fe as BackdropDialog,
|
|
244
|
+
me as BackdropMenuList,
|
|
245
|
+
de as BackdropPopover,
|
|
246
|
+
ue as BackdropPopoverAnchor,
|
|
247
|
+
pe as BackdropSegmented,
|
|
248
|
+
he as BackdropToast,
|
|
249
|
+
ge as BackdropToastRegion,
|
|
250
|
+
Z as backdropArrowTarget
|
|
251
|
+
};
|
|
252
|
+
//# sourceMappingURL=BackdropOverlays.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackdropOverlays.js","sources":["../../../src/components/Backdrop/BackdropOverlays.tsx"],"sourcesContent":["'use client'\n\nimport {\n cloneElement,\n createContext,\n isValidElement,\n useCallback,\n useContext,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n type CSSProperties,\n type ElementType,\n type KeyboardEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react'\nimport { useAnchoredOverlay } from '../../anchored-overlay'\nimport styles from './BackdropOverlays.module.css'\nimport { cx } from './cx'\nimport { Close } from './icons'\nimport { BackdropIconButton } from './BackdropButton'\nimport { useChromePanel, useChromeState } from './BackdropChrome'\n\n/* ── Popover ───────────────────────────────────────────────────────────── */\n\nexport type BackdropPopoverWidth = 'help' | 'account' | 'tokens' | 'mission' | 'allApps' | 'auto'\n\nexport interface BackdropPopoverProps {\n children: ReactNode\n /** The panel's accessible name (\"Account\", \"Token balance\"). */\n label: string\n /** Paper's widths per popover; `auto` sizes to content. */\n width?: BackdropPopoverWidth\n /** `menu`: 6px around a list of rows. `card`: 20px around free content. `none`. */\n padding?: 'menu' | 'card' | 'none'\n className?: string\n style?: CSSProperties\n}\n\n/*\n * The floating card every popover and menu is drawn in: white, radius 12, the\n * popover shadow, no scrim (round 6, addition 2). Position it with\n * BackdropPopoverAnchor, which also gives it its keyboard and dismissal, or\n * against the frame through BackdropFrame `overlays` for a static drawing.\n *\n * No widget role: a non-modal panel of ordinary links and buttons is a\n * disclosure (ADR-0010), named by `aria-label` the way AppSwitcher's panel is.\n */\nexport function BackdropPopover({ children, label, width = 'auto', padding = 'card', className, style }: BackdropPopoverProps) {\n return (\n <div aria-label={label} className={cx(styles.popover, styles[`w-${width}`], styles[`pad-${padding}`], className)} style={style}>\n {children}\n </div>\n )\n}\n\nexport interface BackdropPopoverAnchorProps {\n /**\n * The opener (a strip chip, the avatar, a \"…\" button): one element that\n * renders a focusable control and passes `ref`, `aria-expanded`,\n * `aria-controls`, `onClick` and `onKeyDown` through to it, as every Backdrop\n * button does. Its pressed state follows `aria-expanded`, which this sets.\n */\n trigger: ReactElement<Record<string, unknown>>\n /** The panel, shown while the anchor is open. */\n popover?: ReactNode\n /** Controlled open state. Omit it and the anchor keeps its own. */\n open?: boolean\n /** Starting state when uncontrolled: a story draws the panel open with this. */\n defaultOpen?: boolean\n /** Every open and close, including Escape, an outside click and focus leaving. */\n onOpenChange?: (open: boolean) => void\n /** Align the panel's start or end edge with the opener's (round 6: \"aligned to its edge\"). */\n align?: 'start' | 'end'\n /** Open beside the opener rather than under it (the rail's All apps tile). */\n side?: 'bottom' | 'right'\n /**\n * This panel's key in a surrounding BackdropChrome. Its open state is then\n * the chrome's: opening it closes any other chrome panel, a modal dialog\n * closes it, and `useBackdropPanel(panel)` opens it from anywhere. Takes\n * precedence over `open`; `onOpenChange` still hears every change. Ignored\n * outside a BackdropChrome.\n */\n panel?: string\n className?: string\n}\n\n/** What a row inside an anchored panel calls to close it and return focus to the opener. */\nconst PopoverContext = createContext<{ close: () => void } | null>(null)\n\n// Tab stops inside a panel, in document order: what the arrow keys walk.\nconst FOCUSABLE = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',')\n\nfunction focusablesIn(root: HTMLElement | null): HTMLElement[] {\n return root ? Array.from(root.querySelectorAll<HTMLElement>(FOCUSABLE)) : []\n}\n\n/**\n * Where an arrow key moves focus inside an open Backdrop panel, as an index into\n * its tab stops, or null when the key is not one the panel handles. `current`\n * is -1 when focus is on nothing in the list. The ADR-0010 disclosure rule: Up\n * and Down move in DOM order and stop at the ends, Home and End jump to them,\n * and Tab is left alone.\n */\nexport function backdropArrowTarget(key: string, current: number, count: number): number | null {\n if (count === 0) return null\n switch (key) {\n case 'ArrowDown':\n return current < 0 ? 0 : Math.min(current + 1, count - 1)\n case 'ArrowUp':\n return current < 0 ? count - 1 : Math.max(current - 1, 0)\n case 'Home':\n return 0\n case 'End':\n return count - 1\n default:\n return null\n }\n}\n\n/** A text field keeps its own arrows, Home and End: they move the caret there. */\nfunction isTextEntry(node: EventTarget | null): boolean {\n return node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement || (node instanceof HTMLElement && node.isContentEditable)\n}\n\nfunction setRef<T>(ref: Ref<T> | undefined, node: T | null) {\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as { current: T | null }).current = node\n}\n\n/*\n * Places a popover 8px from its opener and owns its behaviour (Stage B):\n * ADR-0009's dismissal contract through useAnchoredOverlay -- Escape and an\n * outside click close, focus leaving trigger and panel together closes, focus\n * returns to the opener -- and ADR-0010's disclosure keyboard: Tab is the\n * document's order, unmanaged; Up/Down/Home/End move between the panel's\n * controls and stop at the ends; ArrowDown on the opener opens the panel at its\n * first control. The panel carries no widget role (ADR-0010).\n */\nexport function BackdropPopoverAnchor({\n trigger,\n popover,\n open,\n defaultOpen,\n onOpenChange,\n align = 'start',\n side = 'bottom',\n panel,\n className,\n}: BackdropPopoverAnchorProps) {\n const chrome = useChromePanel(panel)\n const overlay = useAnchoredOverlay(\n chrome\n ? {\n open: chrome.open,\n onOpenChange: (next) => {\n chrome.setOpen(next)\n onOpenChange?.(next)\n },\n }\n : { open, defaultOpen, onOpenChange },\n )\n const panelNode = useRef<HTMLDivElement | null>(null)\n const focusFirstOnOpen = useRef(false)\n\n // A panel opened from the keyboard with ArrowDown takes focus at its first\n // control once it is in the DOM. Opened by a click or drawn open by\n // `defaultOpen`, it takes none: focus stays where the person left it.\n useEffect(() => {\n if (!overlay.open || !focusFirstOnOpen.current) return\n focusFirstOnOpen.current = false\n focusablesIn(panelNode.current)[0]?.focus()\n }, [overlay.open])\n\n // A side panel is placed by CSS alone, level with its opener's top, so an\n // opener low in the rail pushes a tall panel past the bottom of the window.\n // Once open it is measured and lifted by the overflow, no higher than the\n // popover offset from the top: the panel stays beside its opener and in view.\n // Re-measured on resize. Below-opener panels are left alone; lifting one\n // would cover its own opener.\n useLayoutEffect(() => {\n const node = panelNode.current\n if (!overlay.open || side !== 'right' || !node) return\n const clamp = () => {\n node.style.translate = ''\n const margin = parseFloat(getComputedStyle(node).getPropertyValue('--backdrop-popover-offset')) || 8\n const rect = node.getBoundingClientRect()\n const lift = Math.min(rect.bottom - (window.innerHeight - margin), rect.top - margin)\n if (lift > 0) node.style.translate = `0 ${-lift}px`\n }\n clamp()\n window.addEventListener('resize', clamp)\n return () => window.removeEventListener('resize', clamp)\n }, [overlay.open, side])\n\n const triggerProps = overlay.triggerProps!\n const own = isValidElement(trigger) ? trigger.props : {}\n const ownOnClick = own.onClick as ((event: unknown) => void) | undefined\n const ownOnKeyDown = own.onKeyDown as ((event: KeyboardEvent<HTMLElement>) => void) | undefined\n const ownRef = own.ref as Ref<HTMLElement> | undefined\n const { toggle, setOpen } = overlay\n\n const triggerRef = useCallback(\n (node: HTMLElement | null) => {\n triggerProps.ref(node)\n setRef(ownRef, node)\n },\n // triggerProps.ref is stable (useCallback inside the hook).\n [ownRef],\n )\n\n const opener = isValidElement(trigger)\n ? cloneElement(trigger, {\n ref: triggerRef,\n 'aria-expanded': triggerProps['aria-expanded'],\n 'aria-controls': triggerProps['aria-controls'],\n onClick: (event: unknown) => {\n ownOnClick?.(event)\n toggle()\n },\n onKeyDown: (event: KeyboardEvent<HTMLElement>) => {\n ownOnKeyDown?.(event)\n triggerProps.onKeyDown(event)\n if (event.key !== 'ArrowDown' || event.defaultPrevented) return\n event.preventDefault()\n if (overlay.open) focusablesIn(panelNode.current)[0]?.focus()\n else {\n focusFirstOnOpen.current = true\n setOpen(true)\n }\n },\n })\n : trigger\n\n const onPanelKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n overlay.panelProps.onKeyDown(event)\n if (event.defaultPrevented || isTextEntry(event.target)) return\n const list = focusablesIn(panelNode.current)\n const next = backdropArrowTarget(event.key, list.indexOf(document.activeElement as HTMLElement), list.length)\n if (next === null) return\n event.preventDefault()\n list[next]?.focus()\n }\n\n const setPanel = useCallback(\n (node: HTMLDivElement | null) => {\n panelNode.current = node\n overlay.panelProps.ref(node)\n },\n // panelProps.ref is stable (useCallback inside the hook).\n [],\n )\n\n return (\n <div className={cx(styles.anchor, className)}>\n {opener}\n {overlay.open && popover && (\n <div ref={setPanel} id={overlay.panelProps.id} onKeyDown={onPanelKeyDown} className={cx(styles.placement, styles[`side-${side}`], styles[`align-${align}`])}>\n <PopoverContext.Provider value={{ close: overlay.close }}>{popover}</PopoverContext.Provider>\n </div>\n )}\n </div>\n )\n}\n\n/* ── Menu rows ─────────────────────────────────────────────────────────── */\n\nexport interface BackdropMenuRow {\n key: string\n label: ReactNode\n /** 18px stroke icon. */\n icon?: ReactNode\n href?: string\n onClick?: () => void\n /** Right-hand content: a badge, a shortcut, a segmented control. */\n trailing?: ReactNode\n /** Show the hover ground, for a story of the hover state. */\n highlighted?: boolean\n /** Render the row as a static line holding `trailing` (the Language row). */\n static?: boolean\n /** Draw a divider above this row. */\n dividerBefore?: boolean\n /** The current choice (a selected option in a filter list). */\n selected?: boolean\n}\n\nexport interface BackdropMenuListProps {\n rows: BackdropMenuRow[]\n linkComponent?: ElementType\n className?: string\n}\n\n/*\n * Rows of 36px: an 18px icon, a 14px label, an optional trailing slot. Links\n * and buttons in a list, not role=\"menu\": the panel is a disclosure (ADR-0010),\n * every row is its own Tab stop, and BackdropPopoverAnchor adds the arrow keys.\n * Inside an anchored panel, choosing a row closes the panel and returns focus\n * to its opener; a static row (the Language row) does not.\n */\nexport function BackdropMenuList({ rows, linkComponent: Link = 'a', className }: BackdropMenuListProps) {\n const popover = useContext(PopoverContext)\n return (\n <ul className={cx(styles.menuList, className)}>\n {rows.map((row) => {\n const content = (\n <>\n {row.icon && <span className={styles.rowIcon}>{row.icon}</span>}\n <span className={styles.rowLabel}>{row.label}</span>\n {row.trailing && <span className={styles.rowTrailing}>{row.trailing}</span>}\n </>\n )\n const Element: ElementType = row.static ? 'div' : row.href !== undefined ? Link : 'button'\n const elementProps = row.static ? {} : row.href !== undefined ? { href: row.href } : { type: 'button' }\n return (\n <li key={row.key} className={styles.menuItem}>\n {row.dividerBefore && <span className={styles.divider} aria-hidden=\"true\" />}\n <Element\n {...elementProps}\n onClick={\n row.static\n ? undefined\n : () => {\n row.onClick?.()\n popover?.close()\n }\n }\n aria-current={row.selected ? 'true' : undefined}\n className={cx(styles.row, row.static && styles.rowStatic, row.highlighted && styles.rowHighlighted)}\n >\n {content}\n </Element>\n </li>\n )\n })}\n </ul>\n )\n}\n\n/* ── Segmented control ─────────────────────────────────────────────────── */\n\nexport interface BackdropSegmentedOption {\n value: string\n label: ReactNode\n /** Leading 16px stroke icon. Decorative: the label names the segment. */\n icon?: ReactNode\n}\n\n/**\n * `default`: the 30px track that sits inside a menu row (the Language row).\n * `lg`: a 40px track, the height a control stands at in a form row (ADR-0017, D4).\n */\nexport type BackdropSegmentedSize = 'default' | 'lg'\n\nexport interface BackdropSegmentedProps {\n /** The group's name (\"Language\"). */\n label: string\n options: BackdropSegmentedOption[]\n value: string\n onValueChange?: (value: string) => void\n size?: BackdropSegmentedSize\n className?: string\n}\n\n/** Two or three exclusive options in a sunken track (English | Français). */\nexport function BackdropSegmented({ label, options, value, onValueChange, size = 'default', className }: BackdropSegmentedProps) {\n return (\n <div role=\"radiogroup\" aria-label={label} className={cx(styles.segmented, size === 'lg' && styles.segmentedLg, className)}>\n {options.map((option) => (\n <button\n key={option.value}\n type=\"button\"\n role=\"radio\"\n aria-checked={option.value === value}\n className={styles.segment}\n onClick={onValueChange ? () => onValueChange(option.value) : undefined}\n >\n {option.icon && (\n <span className={styles.segmentIcon} aria-hidden=\"true\">\n {option.icon}\n </span>\n )}\n {option.label}\n </button>\n ))}\n </div>\n )\n}\n\n/* ── Dialog ────────────────────────────────────────────────────────────── */\n\nexport type BackdropDialogWidth = 'form' | 'search' | 'settings'\n\nexport interface BackdropDialogSection {\n key: string\n label: ReactNode\n /** The section on show. Exactly one entry should carry it. */\n active?: boolean\n}\n\nexport interface BackdropDialogProps {\n /** The dialog's heading. Omit only when `label` names it (the search dialog). */\n title?: ReactNode\n /** Accessible name when there is no visible title. With a title and no label, the title names the dialog. */\n label?: string\n children: ReactNode\n /** Buttons at the foot: \"Cancel\" outline, the action in ink. */\n footer?: ReactNode\n /** The close button's name. Omit to draw no close button. */\n closeLabel?: string\n onClose?: () => void\n /**\n * `form` 480px, `search` 640px. `settings` 880×640 (ADR-0017, D5): a section\n * nav down the left (`sections`) beside a content area, with the header and\n * footer ruled off from them.\n */\n width?: BackdropDialogWidth\n /** A mark before the title: the app's 32px tile on an app's settings. Decorative. */\n leading?: ReactNode\n /**\n * The `settings` size's section nav. One section is shown at a time (D15):\n * `children` is the active section's content, and the active entry is marked\n * `aria-current`. Ignored at the other sizes.\n */\n sections?: BackdropDialogSection[]\n /** The section nav's accessible name (\"Sections\"). Required with `sections`. */\n sectionsLabel?: string\n /** `centre` (default) or `top`: 96px from the top, as search opens. */\n placement?: 'centre' | 'top'\n /**\n * Position against the nearest positioned ancestor (the frame) rather than\n * the viewport. For stories and screenshots of a dialog in place.\n */\n contained?: boolean\n /** Remove the padding, for a dialog that lays out its own regions. */\n bare?: boolean\n /**\n * This dialog's key in a surrounding BackdropChrome, so\n * `useBackdropPanel(panel)` reads and sets whether it is up. With or without\n * one, a modal dialog inside a BackdropChrome claims it while mounted (see\n * below).\n */\n panel?: string\n className?: string\n}\n\n/*\n * A centred card over a scrim, for a short task (≤ ~6 fields; the depth rule).\n * Open while it is mounted. Its behaviour is the anchored-overlay contract's\n * modal variant (ADR-0009): focus moves to its first control and Tab is\n * trapped inside, the rest of the document is `inert`, Escape and a press on\n * the scrim call `onClose`, and focus returns to wherever it was when the\n * dialog mounted once it unmounts.\n *\n * A `contained` dialog is a drawing of one in place, for a story or a\n * screenshot: it pulls no focus and traps none (a story page must stay usable\n * around it), and Escape and the scrim still call `onClose`.\n */\nexport function BackdropDialog({\n title,\n label,\n children,\n footer,\n closeLabel,\n onClose,\n width = 'form',\n placement = 'centre',\n contained = false,\n bare = false,\n leading,\n sections,\n sectionsLabel,\n panel,\n className,\n}: BackdropDialogProps) {\n const settings = width === 'settings'\n const panelNode = useRef<HTMLDivElement | null>(null)\n\n /*\n * Inside a BackdropChrome a modal dialog is the open panel while it is\n * mounted (Jamal, 12 Nov 2026, ADR-0009 addendum): mounting closes an open\n * popover, whose rows would otherwise stay reachable behind the scrim, and a\n * later open of another chrome panel closes the dialog through onClose.\n * Claimed in a layout effect, so the popover never paints under the scrim.\n * A contained dialog is a drawing and claims nothing.\n */\n const onCloseRef = useRef(onClose)\n onCloseRef.current = onClose\n const chrome = useChromeState()\n const generatedKey = useId()\n // A dialog is named by its visible title unless `label` names it: without\n // one or the other a screen reader announces only \"dialog\".\n const titleId = useId()\n const ownKey = panel ?? `dialog:${generatedKey}`\n const setOpenKey = chrome?.setOpenKey\n useLayoutEffect(() => {\n if (!setOpenKey || contained) return\n setOpenKey(ownKey)\n return () => setOpenKey((current) => (current === ownKey ? null : current))\n }, [setOpenKey, ownKey, contained])\n // Closes only once the dialog has been the open panel and something else\n // has replaced it, never on the render before its own claim lands.\n const held = useRef(false)\n const openKey = chrome?.openKey\n useEffect(() => {\n if (contained || openKey === undefined) return\n if (openKey === ownKey) held.current = true\n else if (held.current) {\n held.current = false\n onCloseRef.current?.()\n }\n }, [openKey, ownKey, contained])\n\n // Declared before the hook, so it reads the opener before the modal variant\n // moves focus into the panel. Restores on unmount, and only when focus has\n // nowhere better to be: still inside the dialog, or dropped to the body.\n useEffect(() => {\n const opener = document.activeElement\n return () => {\n const active = document.activeElement\n const stranded = !active || active === document.body || Boolean(panelNode.current?.contains(active))\n if (stranded && opener instanceof HTMLElement && opener !== document.body && opener.isConnected) opener.focus()\n }\n }, [])\n\n const overlay = useAnchoredOverlay({\n open: true,\n hasTrigger: false,\n modal: !contained,\n onOpenChange: (next) => {\n if (!next) onCloseRef.current?.()\n },\n })\n\n const setPanel = useCallback(\n (node: HTMLDivElement | null) => {\n panelNode.current = node\n overlay.panelProps.ref(node)\n },\n // panelProps.ref is stable (useCallback inside the hook).\n [],\n )\n\n return (\n <div className={cx(styles.scrim, contained && styles.contained, placement === 'top' && styles.top)}>\n <div\n ref={setPanel}\n id={overlay.panelProps.id}\n onKeyDown={overlay.panelProps.onKeyDown}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={label}\n aria-labelledby={label === undefined && title ? titleId : undefined}\n className={cx(styles.dialog, styles[`dw-${width}`], className)}\n >\n {(title || closeLabel || leading) && (\n <div className={cx(styles.dialogHeader, Boolean(leading) && styles.dialogHeaderLeading, settings && styles.dialogHeaderSettings)}>\n {leading && (\n <span className={styles.dialogLeading} aria-hidden=\"true\">\n {leading}\n </span>\n )}\n {title && (\n <h2 id={titleId} className={styles.dialogTitle}>\n {title}\n </h2>\n )}\n {closeLabel && <BackdropIconButton label={closeLabel} icon={<Close />} onClick={onClose} tooltip={false} />}\n </div>\n )}\n {settings ? (\n <div className={styles.settingsBody}>\n {sections && sections.length > 0 && (\n <nav aria-label={sectionsLabel} className={styles.sectionNav}>\n <ul className={styles.sectionList}>\n {sections.map((section) => (\n <li key={section.key}>\n {/* Choosing a section is Stage B: the markup is the control, the handler is not yet wired. */}\n <button type=\"button\" aria-current={section.active ? 'true' : undefined} className={styles.section}>\n {section.label}\n </button>\n </li>\n ))}\n </ul>\n </nav>\n )}\n <div className={cx(styles.settingsContent, !bare && styles.settingsContentPadding)}>{children}</div>\n </div>\n ) : (\n <div className={cx(!bare && styles.dialogBody)}>{children}</div>\n )}\n {footer && <div className={styles.dialogFooter}>{footer}</div>}\n </div>\n </div>\n )\n}\n\n/* ── Toast ─────────────────────────────────────────────────────────────── */\n\nexport interface BackdropToastProps {\n /** One short line: \"Campaign launched\", \"3 messages sent\". */\n children: ReactNode\n /** Leading icon (a check for success). */\n icon?: ReactNode\n /** One action, a text link: \"Undo\", \"View\". */\n action?: ReactNode\n /** The dismiss button's name. */\n closeLabel?: string\n onClose?: () => void\n tone?: 'default' | 'danger'\n className?: string\n}\n\n/** An ink toast. Mount it inside a BackdropToastRegion, which announces it. */\nexport function BackdropToast({ children, icon, action, closeLabel, onClose, tone = 'default', className }: BackdropToastProps) {\n return (\n <div className={cx(styles.toast, tone === 'danger' && styles.toastDanger, className)}>\n {icon && <span className={styles.toastIcon}>{icon}</span>}\n <span className={styles.toastText}>{children}</span>\n {action && <span className={styles.toastAction}>{action}</span>}\n {closeLabel && (\n <button type=\"button\" aria-label={closeLabel} className={styles.toastClose} onClick={onClose}>\n <Close size={16} />\n </button>\n )}\n </div>\n )\n}\n\nexport interface BackdropToastRegionProps {\n children?: ReactNode\n /** The live region's name (\"Notifications\"). */\n label: string\n contained?: boolean\n}\n\n/** The bottom-centre stack toasts appear in: a polite live region. */\nexport function BackdropToastRegion({ children, label, contained = false }: BackdropToastRegionProps) {\n return (\n <div role=\"region\" aria-label={label} aria-live=\"polite\" className={cx(styles.toastRegion, contained && styles.contained)}>\n {children}\n </div>\n )\n}\n"],"names":["BackdropPopover","children","label","width","padding","className","style","jsx","cx","styles","PopoverContext","createContext","FOCUSABLE","focusablesIn","root","backdropArrowTarget","key","current","count","isTextEntry","node","setRef","ref","BackdropPopoverAnchor","trigger","popover","open","defaultOpen","onOpenChange","align","side","panel","chrome","useChromePanel","overlay","useAnchoredOverlay","next","panelNode","useRef","focusFirstOnOpen","useEffect","_a","useLayoutEffect","clamp","margin","rect","lift","triggerProps","own","isValidElement","ownOnClick","ownOnKeyDown","ownRef","toggle","setOpen","triggerRef","useCallback","opener","cloneElement","event","onPanelKeyDown","list","setPanel","BackdropMenuList","rows","Link","useContext","row","content","jsxs","Fragment","Element","elementProps","BackdropSegmented","options","value","onValueChange","size","option","BackdropDialog","title","footer","closeLabel","onClose","placement","contained","bare","leading","sections","sectionsLabel","settings","onCloseRef","useChromeState","generatedKey","useId","titleId","ownKey","setOpenKey","held","openKey","active","BackdropIconButton","Close","section","BackdropToast","icon","action","tone","BackdropToastRegion"],"mappings":";;;;;;;;;AAmDO,SAASA,GAAgB,EAAE,UAAAC,GAAU,OAAAC,GAAO,OAAAC,IAAQ,QAAQ,SAAAC,IAAU,QAAQ,WAAAC,GAAW,OAAAC,KAA+B;AAC7H,SACE,gBAAAC,EAAC,SAAI,cAAYL,GAAO,WAAWM,EAAGC,EAAO,SAASA,EAAO,KAAKN,CAAK,EAAE,GAAGM,EAAO,OAAOL,CAAO,EAAE,GAAGC,CAAS,GAAG,OAAAC,GAC/G,UAAAL,EAAA,CACH;AAEJ;AAkCA,MAAMS,IAAiBC,EAA4C,IAAI,GAGjEC,IAAY;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,KAAK,GAAG;AAEV,SAASC,EAAaC,GAAyC;AAC7D,SAAOA,IAAO,MAAM,KAAKA,EAAK,iBAA8BF,CAAS,CAAC,IAAI,CAAA;AAC5E;AASO,SAASG,EAAoBC,GAAaC,GAAiBC,GAA8B;AAC9F,MAAIA,MAAU,EAAG,QAAO;AACxB,UAAQF,GAAA;AAAA,IACN,KAAK;AACH,aAAOC,IAAU,IAAI,IAAI,KAAK,IAAIA,IAAU,GAAGC,IAAQ,CAAC;AAAA,I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