@kanso-labs/kanso-ui 0.48.4 → 0.50.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.
@@ -0,0 +1,295 @@
1
+ "use client";
2
+ import { c } from "react/compiler-runtime";
3
+ import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
4
+ import { createElement } from "react";
5
+ import { CheckGlyph } from "../../glyphs/index.js";
6
+ import { hasContent } from "../../render/content.js";
7
+ import { useRender } from "../../render/useRender.js";
8
+ import { rowStyles } from "../../row/styles.js";
9
+ import { mergeStyles } from "../../styles/merge.js";
10
+ import Button from "../button/index.js";
11
+ import Text from "../text/index.js";
12
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
+ // src/components/empty-state/index.tsx
14
+ const styles = {
15
+ block: {
16
+ kGNEyG: "x6s0dn4",
17
+ kB7OPa: "x9f619",
18
+ k1xSpc: "x78zum5",
19
+ kXwgrk: "xdt5ytf",
20
+ kLKAdn: "x196d3sl",
21
+ kg3NbH: "x790zyz",
22
+ k9WMMc: "x2b8uid",
23
+ $$css: true
24
+ },
25
+ line: {
26
+ ks0D6T: "xykivgp",
27
+ $$css: true
28
+ },
29
+ lineUnderTitle: {
30
+ keoZOQ: "x7suny0",
31
+ $$css: true
32
+ },
33
+ rowLine: {
34
+ kzQI83: "x1iyjqo2",
35
+ k7Eaqz: "xeuugli",
36
+ $$css: true
37
+ }
38
+ };
39
+ const lineStyles = {
40
+ alone: styles.line,
41
+ underTitle: [styles.line, styles.lineUnderTitle]
42
+ };
43
+ const HEADINGS = [
44
+ "h1",
45
+ "h2",
46
+ "h3",
47
+ "h4",
48
+ "h5",
49
+ "h6"
50
+ ];
51
+ function heading(level) {
52
+ return createElement(Number.isInteger(level) && level >= 1 && level <= 6 ? HEADINGS[level - 1] : HEADINGS[1]);
53
+ }
54
+ const PARAGRAPH = /* @__PURE__ */ jsx("p", {});
55
+ function ActionButton(t0) {
56
+ const $ = c(5);
57
+ const { action, variant } = t0;
58
+ let t1;
59
+ if ($[0] !== action.href || $[1] !== action.label || $[2] !== action.onPress || $[3] !== variant) {
60
+ t1 = action.href === void 0 ? /* @__PURE__ */ jsx(Button, {
61
+ onPress: action.onPress,
62
+ variant,
63
+ children: action.label
64
+ }) : /* @__PURE__ */ jsx(Button, {
65
+ href: action.href,
66
+ onPress: action.onPress,
67
+ variant,
68
+ children: action.label
69
+ });
70
+ $[0] = action.href;
71
+ $[1] = action.label;
72
+ $[2] = action.onPress;
73
+ $[3] = variant;
74
+ $[4] = t1;
75
+ } else t1 = $[4];
76
+ return t1;
77
+ }
78
+ /**
79
+ * What a screen, a list or a section draws when it has nothing to show.
80
+ *
81
+ * ```tsx
82
+ * <EmptyState
83
+ * action={{ label: 'Label', onPress: add }}
84
+ * description="Supporting line"
85
+ * icon={<Icon />}
86
+ * title="Headline"
87
+ * />
88
+ * ```
89
+ *
90
+ * `kind="first"` is a screen with nothing in it yet, `size="inline"` the
91
+ * same for a section, `kind="done"` a list emptied, and `kind="status"` a
92
+ * screen that cannot show what it was opened for. Draw it where the content
93
+ * would be, under the screen's bar. The call site's `className` and `style`
94
+ * land on its own element.
95
+ */
96
+ function EmptyState(props$1) {
97
+ const $ = c(42);
98
+ const fields = props$1;
99
+ let children;
100
+ let render;
101
+ let t0;
102
+ let t1;
103
+ let t2;
104
+ let t3;
105
+ if ($[0] !== fields) {
106
+ const { action, description, headingLevel: t4, icon, kind: t5, render: t6, size: t7, title, ...rest } = fields;
107
+ render = t6;
108
+ const headingLevel = t4 === void 0 ? 2 : t4;
109
+ const kind = t5 === void 0 ? "first" : t5;
110
+ const size = t7 === void 0 ? "default" : t7;
111
+ const status = kind === "status";
112
+ const inline = kind === "first" && size === "inline";
113
+ const row = kind === "done" || inline;
114
+ if (kind === "done") {
115
+ let t8;
116
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
117
+ t8 = /* @__PURE__ */ jsx(CheckGlyph, { className: "xxk0z11 x1mxwv8y x2lah0s xvy4d1p" });
118
+ $[7] = t8;
119
+ } else t8 = $[7];
120
+ let t9;
121
+ if ($[8] !== description) {
122
+ t9 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t8, /* @__PURE__ */ jsx(Line, {
123
+ xstyle: styles.rowLine,
124
+ children: description
125
+ })] });
126
+ $[8] = description;
127
+ $[9] = t9;
128
+ } else t9 = $[9];
129
+ children = t9;
130
+ } else if (inline) {
131
+ let t8;
132
+ if ($[10] !== icon) {
133
+ t8 = !hasContent(icon) ? null : /* @__PURE__ */ jsx("div", {
134
+ "aria-hidden": "true",
135
+ className: "x6s0dn4 xp89om9 x1rv7mn0 x1dkaolv x9f619 xscdzaa x78zum5 x2lah0s xwsyq91 x1eujcsb xl56j7k",
136
+ children: icon
137
+ });
138
+ $[10] = icon;
139
+ $[11] = t8;
140
+ } else t8 = $[11];
141
+ let t9;
142
+ if ($[12] !== description) {
143
+ t9 = /* @__PURE__ */ jsx(Line, {
144
+ xstyle: styles.rowLine,
145
+ children: description
146
+ });
147
+ $[12] = description;
148
+ $[13] = t9;
149
+ } else t9 = $[13];
150
+ let t10;
151
+ if ($[14] !== t8 || $[15] !== t9) {
152
+ t10 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t8, t9] });
153
+ $[14] = t8;
154
+ $[15] = t9;
155
+ $[16] = t10;
156
+ } else t10 = $[16];
157
+ children = t10;
158
+ } else {
159
+ let t8;
160
+ if ($[17] !== icon || $[18] !== status) {
161
+ t8 = !hasContent(icon) ? null : /* @__PURE__ */ jsx("div", {
162
+ "aria-hidden": "true",
163
+ ...{
164
+ 0: { className: "x6s0dn4 x1peatla x1dkaolv x9f619 x78zum5 x2lah0s x1s3cmhv x1fu8urw xl56j7k xxkrg4w xp89om9 xscdzaa" },
165
+ 1: { className: "x6s0dn4 x1peatla x1dkaolv x9f619 x78zum5 x2lah0s x1s3cmhv x1fu8urw xl56j7k xxkrg4w x1rrhr5q x1w5n3ug" }
166
+ }[!!status << 0],
167
+ children: icon
168
+ });
169
+ $[17] = icon;
170
+ $[18] = status;
171
+ $[19] = t8;
172
+ } else t8 = $[19];
173
+ let t9;
174
+ if ($[20] !== headingLevel || $[21] !== title) {
175
+ t9 = !hasContent(title) ? null : /* @__PURE__ */ jsx(Text, {
176
+ render: heading(headingLevel),
177
+ variant: "titleLarge",
178
+ className: "x193iq5w",
179
+ children: title
180
+ });
181
+ $[20] = headingLevel;
182
+ $[21] = title;
183
+ $[22] = t9;
184
+ } else t9 = $[22];
185
+ let t10;
186
+ if ($[23] !== description || $[24] !== title) {
187
+ t10 = !hasContent(description) ? null : /* @__PURE__ */ jsx(Line, {
188
+ xstyle: hasContent(title) ? lineStyles.underTitle : lineStyles.alone,
189
+ children: description
190
+ });
191
+ $[23] = description;
192
+ $[24] = title;
193
+ $[25] = t10;
194
+ } else t10 = $[25];
195
+ let t11;
196
+ if ($[26] !== action || $[27] !== status) {
197
+ t11 = action === void 0 ? null : /* @__PURE__ */ jsx("div", {
198
+ className: "x9f619 x1yhnu8z",
199
+ children: /* @__PURE__ */ jsx(ActionButton, {
200
+ action,
201
+ variant: status ? "outlined" : "filled"
202
+ })
203
+ });
204
+ $[26] = action;
205
+ $[27] = status;
206
+ $[28] = t11;
207
+ } else t11 = $[28];
208
+ let t12;
209
+ if ($[29] !== t10 || $[30] !== t11 || $[31] !== t8 || $[32] !== t9) {
210
+ t12 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
211
+ t8,
212
+ t9,
213
+ t10,
214
+ t11
215
+ ] });
216
+ $[29] = t10;
217
+ $[30] = t11;
218
+ $[31] = t8;
219
+ $[32] = t9;
220
+ $[33] = t12;
221
+ } else t12 = $[33];
222
+ children = t12;
223
+ }
224
+ t3 = useRender;
225
+ t2 = "div";
226
+ t0 = rest;
227
+ t1 = mergeStyles(props(row ? [rowStyles.base, rowStyles.list] : styles.block, inline && rowStyles.twoLine), rest);
228
+ $[0] = fields;
229
+ $[1] = children;
230
+ $[2] = render;
231
+ $[3] = t0;
232
+ $[4] = t1;
233
+ $[5] = t2;
234
+ $[6] = t3;
235
+ } else {
236
+ children = $[1];
237
+ render = $[2];
238
+ t0 = $[3];
239
+ t1 = $[4];
240
+ t2 = $[5];
241
+ t3 = $[6];
242
+ }
243
+ let t4;
244
+ if ($[34] !== children || $[35] !== t0 || $[36] !== t1) {
245
+ t4 = {
246
+ ...t0,
247
+ ...t1,
248
+ children
249
+ };
250
+ $[34] = children;
251
+ $[35] = t0;
252
+ $[36] = t1;
253
+ $[37] = t4;
254
+ } else t4 = $[37];
255
+ let t5;
256
+ if ($[38] !== render || $[39] !== t2 || $[40] !== t4) {
257
+ t5 = {
258
+ defaultTagName: t2,
259
+ props: t4,
260
+ render
261
+ };
262
+ $[38] = render;
263
+ $[39] = t2;
264
+ $[40] = t4;
265
+ $[41] = t5;
266
+ } else t5 = $[41];
267
+ return t3(t5);
268
+ }
269
+ function Line(t0) {
270
+ const $ = c(5);
271
+ const { children, xstyle } = t0;
272
+ let t1;
273
+ if ($[0] !== xstyle) {
274
+ t1 = props(xstyle);
275
+ $[0] = xstyle;
276
+ $[1] = t1;
277
+ } else t1 = $[1];
278
+ let t2;
279
+ if ($[2] !== children || $[3] !== t1) {
280
+ t2 = /* @__PURE__ */ jsx(Text, {
281
+ render: PARAGRAPH,
282
+ tone: "muted",
283
+ variant: "bodyMedium",
284
+ ...t1,
285
+ children
286
+ });
287
+ $[2] = children;
288
+ $[3] = t1;
289
+ $[4] = t2;
290
+ } else t2 = $[4];
291
+ return t2;
292
+ }
293
+ export { EmptyState as default };
294
+
295
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_c","stylex","createElement","hasContent","useRender","rowStyles","mergeStyles","styles","block","kGNEyG","kB7OPa","k1xSpc","kXwgrk","kLKAdn","kg3NbH","k9WMMc","$$css","line","ks0D6T","lineUnderTitle","keoZOQ","rowLine","kzQI83","k7Eaqz","lineStyles","alone","underTitle","HEADINGS","heading","level","Number","isInteger","PARAGRAPH","href","label","onPress","kind","size","action","description","headingLevel","icon","title","ActionButton","t0","$","variant","t1","undefined","EmptyState","props","fields","children","render","t2","t3","t4","t5","t6","t7","rest","status","inline","row","t8","Symbol","for","t9","t10","0","className","1","t11","t12","base","list","twoLine","defaultTagName","Line","xstyle"],"sources":["../../../src/components/empty-state/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { createElement } from 'react';\nimport type { RenderComponentProps } from '../../render/useRender';\nimport { CheckGlyph } from '../../glyphs';\nimport { hasContent } from '../../render/content';\nimport { useRender } from '../../render/useRender';\nimport { rowStyles } from '../../row/styles';\nimport { mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, sizing, spacing } from '../../tokens/design.tokens.stylex';\nimport Button from '../button';\nimport Text from '../text';\n\n// What a screen, a list or a section draws when it has nothing to show, in\n// one of four layouts. No Material Design page draws an empty state, so the\n// layouts are the library's own, built from the pages' parts: a mark in a\n// filled circle, a title in title large, a line in body medium on on surface\n// variant, and one common button.\n//\n// - **`first`**, a module or a list with nothing in it yet: a 64dp mark at\n// the full corner in the primary container, its glyph at 32dp in on\n// primary container; the title; the line, at most 280dp wide; and one\n// filled button. 16dp from the mark to the title, 8dp to the line and 24dp\n// to the button. It starts 40dp under what is above it and is centred\n// across, never down the screen's height, so it reads as the top of the\n// screen rather than floating in its middle.\n// - **`first` at `size=\"inline\"`**, a section with nothing in it yet: a 40dp\n// mark with a 20dp glyph and the line alone, in the lists page's 72dp row,\n// drawn on src/row's styles as ListItem's row is.\n// - **`done`**, a list some things were in and none are left: a 24dp check\n// in the primary role and the line, in the lists page's 56dp row, lined up\n// where the rows were. No title and no button: nothing is wrong.\n// - **`status`**, a screen that cannot show what it was opened for: the first\n// layout with a neutral mark, on surface container highest with its glyph\n// in on surface variant, and an outlined button, since what it offers is a\n// way round rather than the screen's main action.\n//\n// Each form's props are its own, so a part a layout does not draw, such as\n// a title on `done`, does not compile. A mark is decorative and hidden from\n// screen readers, the app's icon in it with it. An icon is drawn `1em`\n// square in `currentColor`, as every icon here is, and the mark sets both.\n//\n// The title is a heading at `headingLevel`, 2 unless the app says otherwise:\n// an empty state sits under the page's own title, the app bar's `<h1>`. The\n// 64dp mark and the 280dp measure are literals: the first falls between\n// steps of the sizing scale, and the second bounds a line of reading rather\n// than measuring anything a theme resizes.\n//\n// `size` takes `default` and `inline` rather than the library's size scale:\n// it names a layout, a screen's or a section's row, not a step of a scale,\n// and it is the name react-native-kanso-ui's EmptyState gives the same prop.\n//\n// An empty state is not announced when it replaces what was there, since one\n// drawn on a screen's first render should not be. Where removing the last\n// item or a failed load swaps one in, announce the change through a live\n// region already on the page: one inserted with its words inside it is often\n// not read at all.\n//\n// Under forced colours the marks' fills are painted over, which leaves the\n// glyph in the system's text colour on the page, as an icon is anywhere else.\n\nconst styles = {\n block: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kLKAdn: \"x196d3sl\",\n kg3NbH: \"x790zyz\",\n k9WMMc: \"x2b8uid\",\n $$css: true\n },\n line: {\n ks0D6T: \"xykivgp\",\n $$css: true\n },\n lineUnderTitle: {\n keoZOQ: \"x7suny0\",\n $$css: true\n },\n rowLine: {\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n }\n};\n\n// The screen line's two placements, alone or under a title, each one stable\n// value rather than an array built at the prop.\nconst lineStyles = {\n alone: styles.line,\n underTitle: [styles.line, styles.lineUnderTitle]\n} as const;\nconst HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\n\n// The title's element, looked up rather than interpolated into a tag name,\n// for the reason AppBar's `heading` gives: a level outside the six falls back\n// to the default rather than rendering a custom element.\nfunction heading(level: number) {\n const known = Number.isInteger(level) && level >= 1 && level <= 6;\n return createElement(known ? HEADINGS[level - 1] : HEADINGS[1]);\n}\nconst PARAGRAPH = <p />;\ntype EmptyStateAction = {\n /** Where the button leads, through the app's router. */\n href?: string;\n /** What the button says. */\n label: string;\n /** Run when the button is pressed. */\n onPress?: () => void;\n};\ntype EmptyStateBaseProps = Omit<RenderComponentProps<'div'>, 'children' | 'title'>;\n\n// Every prop any form takes, which the component reads once the form is\n// known.\ntype EmptyStateFields = EmptyStateBaseProps & EmptyStateScreenParts & {\n kind?: EmptyStateKind;\n size?: EmptyStateSize;\n};\ntype EmptyStateKind = 'done' | 'first' | 'status';\ntype EmptyStateProps = ((EmptyStateScreenParts & {\n /**\n * `first`, nothing there yet; `done`, nothing left; `status`, what\n * was opened cannot be shown.\n * @default 'first'\n */\n kind?: 'first' | 'status';\n /**\n * `inline` draws `first` as a 72dp row for a section, with a 40dp\n * mark and the line alone.\n * @default 'default'\n */\n size?: 'default';\n}) | {\n action?: never;\n description: ReactNode;\n headingLevel?: never;\n icon?: never;\n kind: 'done';\n size?: never;\n title?: never;\n} | {\n action?: never;\n description: ReactNode;\n headingLevel?: never;\n icon?: ReactNode;\n kind?: 'first';\n size: 'inline';\n title?: never;\n}) & EmptyStateBaseProps;\n\n// The screen layouts' parts, which `first` and `status` share.\ntype EmptyStateScreenParts = {\n /**\n * The one button, filled for `first` and outlined for `status`. The row\n * forms draw none.\n */\n action?: EmptyStateAction;\n /**\n * The line saying what is empty, what is done, or what can be done about\n * it: inline content, since it is drawn as a paragraph. The row forms need\n * it, since it is all they say.\n */\n description?: ReactNode;\n /**\n * Where the title sits in the page's outline, as one of the six heading\n * levels. A value outside the six that reaches it untyped falls back to 2.\n * @default 2\n */\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n /**\n * The glyph in the mark, `1em` square in `currentColor`: 32dp in a screen's\n * 64dp mark and 20dp in a section's 40dp one. `done` draws a check of its\n * own.\n */\n icon?: ReactNode;\n /** The title, a heading in the page's outline. The row forms draw none. */\n title?: ReactNode;\n};\ntype EmptyStateSize = 'default' | 'inline';\n\n// The one button, filled or outlined, as a link where it has somewhere to\n// go.\nfunction ActionButton({\n action,\n variant\n}: {\n action: EmptyStateAction;\n variant: 'filled' | 'outlined';\n}) {\n return action.href === undefined ? <Button onPress={action.onPress} variant={variant}>\n {action.label}\n </Button> : <Button href={action.href} onPress={action.onPress} variant={variant}>\n {action.label}\n </Button>;\n}\n\n/**\n * What a screen, a list or a section draws when it has nothing to show.\n *\n * ```tsx\n * <EmptyState\n * action={{ label: 'Label', onPress: add }}\n * description=\"Supporting line\"\n * icon={<Icon />}\n * title=\"Headline\"\n * />\n * ```\n *\n * `kind=\"first\"` is a screen with nothing in it yet, `size=\"inline\"` the\n * same for a section, `kind=\"done\"` a list emptied, and `kind=\"status\"` a\n * screen that cannot show what it was opened for. Draw it where the content\n * would be, under the screen's bar. The call site's `className` and `style`\n * land on its own element.\n */\nfunction EmptyState(props: EmptyStateProps) {\n const fields: EmptyStateFields = props;\n const {\n action,\n description,\n headingLevel = 2,\n icon,\n kind = 'first',\n render,\n size = 'default',\n title,\n ...rest\n } = fields;\n const status = kind === 'status';\n const inline = kind === 'first' && size === 'inline';\n const row = kind === 'done' || inline;\n let children: ReactNode;\n if (kind === 'done') {\n children = <>\n <CheckGlyph className=\"xxk0z11 x1mxwv8y x2lah0s xvy4d1p\" />\n <Line xstyle={styles.rowLine}>{description}</Line>\n </>;\n } else if (inline) {\n children = <>\n {!hasContent(icon) ? null : <div aria-hidden=\"true\" className=\"x6s0dn4 xp89om9 x1rv7mn0 x1dkaolv x9f619 xscdzaa x78zum5 x2lah0s xwsyq91 x1eujcsb xl56j7k\">\n {icon}\n </div>}\n <Line xstyle={styles.rowLine}>{description}</Line>\n </>;\n } else {\n children = <>\n {!hasContent(icon) ? null : <div aria-hidden=\"true\" {...{\n 0: {\n className: \"x6s0dn4 x1peatla x1dkaolv x9f619 x78zum5 x2lah0s x1s3cmhv x1fu8urw xl56j7k xxkrg4w xp89om9 xscdzaa\"\n },\n 1: {\n className: \"x6s0dn4 x1peatla x1dkaolv x9f619 x78zum5 x2lah0s x1s3cmhv x1fu8urw xl56j7k xxkrg4w x1rrhr5q x1w5n3ug\"\n }\n }[!!status << 0]}>\n {icon}\n </div>}\n {!hasContent(title) ? null : <Text render={heading(headingLevel)} variant=\"titleLarge\" className=\"x193iq5w\">\n {title}\n </Text>}\n {!hasContent(description) ? null : <Line xstyle={hasContent(title) ? lineStyles.underTitle : lineStyles.alone}>\n {description}\n </Line>}\n {action === undefined ? null : <div className=\"x9f619 x1yhnu8z\">\n <ActionButton action={action} variant={status ? 'outlined' : 'filled'} />\n </div>}\n </>;\n }\n return useRender({\n defaultTagName: 'div',\n props: {\n ...rest,\n ...mergeStyles(stylex.props(row ? [rowStyles.base, rowStyles.list] : styles.block, inline && rowStyles.twoLine), rest),\n children\n },\n render\n });\n}\n\n// The line, in body medium on on surface variant, as a paragraph.\nfunction Line({\n children,\n xstyle\n}: {\n children: ReactNode;\n xstyle: stylex.StyleXStyles;\n}) {\n return <Text render={PARAGRAPH} tone=\"muted\" variant=\"bodyMedium\" {...stylex.props(xstyle)}>\n {children}\n </Text>;\n}\nexport type { EmptyStateAction, EmptyStateKind, EmptyStateProps, EmptyStateSize };\nexport default EmptyState;"],"mappings":";;;;;;;;;;;;;AAgEA,MAAMO,SAAS;CACbC,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,MAAM;EACJC,QAAQ;EACRF,OAAO;CACT;CACAG,gBAAgB;EACdC,QAAQ;EACRJ,OAAO;CACT;CACAK,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRP,OAAO;CACT;AACF;AAIA,MAAMQ,aAAa;CACjBC,OAAOlB,OAAOU;CACdS,YAAY,CAACnB,OAAOU,MAAMV,OAAOY,cAAc;AACjD;AACA,MAAMQ,WAAW;CAAC;CAAM;CAAM;CAAM;CAAM;CAAM;AAAI;AAKpD,SA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AAE;EAAAF,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,QAAAQ,UAAAR,EAAA,QAAAS,MAAAT,EAAA,QAAAW,IAAA;EANcC,KAAA;GAAAoB,gBACCvB;GAAKJ,OACdM;GAINH;EAEH;EAACR,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;EAAAT,EAAA,MAAAW;EAAAX,EAAA,MAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OARMzC,GAAUqD,EAQhB;AAAC;AAIJ,SAAAqB,KAAAlC,IAAA;CAAA,MAAAC,IAAA7C,EAAA,CAAA;CAAc,MAAA,EAAAoD,UAAA2B,WAAAnC;CAMb,IAAAG;CAAA,IAAAF,EAAA,OAAAkC,QAAA;EACuEhC,KAAA9C,MAAa8E,MAAM;EAAClC,EAAA,KAAAkC;EAAAlC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAAO,YAAAP,EAAA,OAAAE,IAAA;EAAnFO,KAAA,oBAAC,MAAD;GAActB,QAAAA;GAAgB,MAAA;GAAgB,SAAA;GAAY,GAAKe;GACjEK;EADO,CAAA;EAEHP,EAAA,KAAAO;EAAAP,EAAA,KAAAE;EAAAF,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OAFFS;AAEE"}
@@ -1,6 +1,8 @@
1
1
  import { ReactNode, RefAttributes } from "react";
2
2
  import { ClassNameOrFunction, Key, MenuItemProps, MenuItemRenderProps, StyleOrFunction } from "react-aria-components";
3
3
  import { ButtonState } from "../../button/index.js";
4
+ import "../../theme-scope.js";
5
+ import { t as KuiTheme } from "../../kanso-ui-core/defaults-DYY7ddNI.js";
4
6
  import { FabSize, FabTone } from "../fab/index.js";
5
7
  type FabMenuItemProps = Omit<MenuItemProps, 'children' | 'className' | 'style'> & {
6
8
  /** The action's name, drawn as its label. */
@@ -11,6 +13,20 @@ type FabMenuItemProps = Omit<MenuItemProps, 'children' | 'className' | 'style'>
11
13
  icon?: ReactNode;
12
14
  /** A function may compute the style from the action's render state. */
13
15
  style?: StyleOrFunction<MenuItemRenderProps>;
16
+ /**
17
+ * `--kui-*` overrides for this action's pill alone, over those of the page
18
+ * around the menu, as `ThemeScope`'s `theme` takes them. The pill reads its
19
+ * tone's container pair from them, and its icon and label follow. Keep the
20
+ * map a constant, as for `ThemeScope`.
21
+ */
22
+ theme?: KuiTheme;
23
+ /**
24
+ * The colour set this action's pill draws in, the container pair of the
25
+ * page's three tones, in place of the menu's. The close button keeps the
26
+ * menu's.
27
+ * @default the menu's `tone`
28
+ */
29
+ tone?: FabTone;
14
30
  };
15
31
  type FabMenuProps = {
16
32
  /**
@@ -85,5 +101,5 @@ declare namespace FabMenu {
85
101
  * One action: a pill holding an icon and a label, on the menu's tone.
86
102
  * Choosing it closes the menu.
87
103
  */
88
- declare function FabMenuItem({ children, icon, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, textValue, ...props }: FabMenuItemProps & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
104
+ declare function FabMenuItem({ children, icon, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, textValue, theme, tone: ownTone, ...props }: FabMenuItemProps & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
89
105
  export { FabMenuItem, type FabMenuItemProps, type FabMenuProps, FabMenu as default };
@@ -10,6 +10,7 @@ import { CloseGlyph } from "../../glyphs/index.js";
10
10
  import { useRipple } from "../../hooks/useRipple.js";
11
11
  import { focus } from "../../styles/focus.js";
12
12
  import { mergeStatefulStyles } from "../../styles/merge.js";
13
+ import { tokenScope } from "../../tokens/design.tokens.stylex.js";
13
14
  import { jsx, jsxs } from "react/jsx-runtime";
14
15
  // src/components/fab-menu/index.tsx
15
16
  const styles = {
@@ -212,8 +213,8 @@ function FabMenu(t0) {
212
213
  */
213
214
  function FabMenuItem(t0) {
214
215
  const $ = c(22);
215
- const { children, icon, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, textValue, ...props$1 } = t0;
216
- const tone = useContext(ToneContext);
216
+ const { children, icon, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, textValue, theme, tone: ownTone, ...props$1 } = t0;
217
+ const menuTone = useContext(ToneContext);
217
218
  let t1;
218
219
  if ($[0] !== onContextMenu || $[1] !== onPointerCancel || $[2] !== onPointerDown || $[3] !== onPointerLeave || $[4] !== onPointerUp) {
219
220
  t1 = {
@@ -240,7 +241,10 @@ function FabMenuItem(t0) {
240
241
  $[8] = t2;
241
242
  } else t2 = $[8];
242
243
  const t3 = ripple.handlers;
243
- const t4 = mergeStatefulStyles(itemClasses(tone), props$1);
244
+ const t4 = mergeStatefulStyles(itemClasses(ownTone ?? menuTone, theme !== void 0), theme === void 0 ? props$1 : {
245
+ ...props$1,
246
+ style: themed(theme, props$1.style)
247
+ });
244
248
  let t5;
245
249
  if ($[9] !== icon) {
246
250
  t5 = icon === void 0 ? null : /* @__PURE__ */ jsx("span", {
@@ -284,8 +288,14 @@ function FabMenuItem(t0) {
284
288
  } else t7 = $[21];
285
289
  return t7;
286
290
  }
287
- function itemClasses(tone) {
288
- return (state) => props(styles.item, fabTones.tonal[tone], state.isHovered && fabStyles.hovered, state.isFocused && fabStyles.focused, state.isFocusVisible && styles.itemFocused, state.isPressed && fabStyles.pressed, state.isDisabled && styles.itemDisabled);
291
+ function itemClasses(tone, isScoped) {
292
+ return (state) => props(styles.item, isScoped && tokenScope, fabTones.tonal[tone], state.isHovered && fabStyles.hovered, state.isFocused && fabStyles.focused, state.isFocusVisible && styles.itemFocused, state.isPressed && fabStyles.pressed, state.isDisabled && styles.itemDisabled);
293
+ }
294
+ function themed(theme, style) {
295
+ return (state) => ({
296
+ ...theme,
297
+ ...typeof style === "function" ? style(state) : style
298
+ });
289
299
  }
290
300
  function triggerClasses(isOpen, size, tone) {
291
301
  return (state) => props(fabStyles.base, focus.ring, styles.trigger, isOpen ? fabTones.filled[tone] : fabTones.tonal[tone], isOpen ? styles.closeButton : fabSizes[size], state.isHovered && fabStyles.hovered, state.isFocusVisible && fabStyles.focused, state.isPressed && fabStyles.pressed, state.isDisabled && fabStyles.disabled);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","useState","RACMenuItem","textOf","fabIconSizes","fabSizes","fabStyles","fabTones","useRipple","focus","mergeStatefulStyles","styles","closeButton","kZKoxP","kaIpWk","kzqmXN","$$css","closeIcon","kGuDYH","item","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kGVxlE","kB7OPa","kkrTdU","k1xSpc","kMv6JI","k63SB2","kOIVth","kb6lSQ","kLWn49","kAzted","k7Eaqz","k3XXqK","kVQacm","kg3NbH","kVAEAm","khDVqt","itemDisabled","kWkggS","kMwMTN","itemFocused","kjBf7l","kInvED","kMeerF","trigger","kIyJzY","k1ekBW","kAMwcw","ToneContext","children","className","icon","style","container","defaultOpen","isOpen","onAction","onOpenChange","size","tone","FabMenu","t0","$","label","t1","ref","t2","t3","undefined","ownOpen","setOwnOpen","open","t4","next","changeOpen","t5","triggerClasses","t6","props","t7","t8","t9","t10","t11","t12","t13","FabMenuItem","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","ripple","T0","handlers","itemClasses","md","surface","state","tonal","isHovered","hovered","isFocused","focused","isFocusVisible","isPressed","pressed","isDisabled","base","ring","filled","disabled","Item","RACMenu","RACPopover","RACMenuTrigger"],"sources":["../../../src/components/fab-menu/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, Key, MenuItemRenderProps, MenuItemProps as RACMenuItemProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useState } from 'react';\nimport { Menu as RACMenu, MenuItem as RACMenuItem, MenuTrigger as RACMenuTrigger, Popover as RACPopover, Text } from 'react-aria-components';\nimport type { ButtonState } from '../../button';\nimport type { FabSize, FabTone } from '../fab';\nimport { ButtonBase } from '../../button';\nimport { textOf } from '../../collection/text';\nimport { fabIconSizes, fabSizes, fabStyles, fabTones } from '../../fab/styles';\nimport { CloseGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The FAB menu page's menu: a FAB that opens two to six related actions\n// floating above it, in place of a speed dial. Open, the FAB becomes the\n// menu's close button — the pages' 56dp circle in the tone itself, with a\n// 20dp close mark — and the actions stand in a column 8dp above it, lined up\n// on its trailing edge, each a 56dp pill on the tone's container pair with\n// 24dp at either end, a 24dp icon 8dp before a title-medium label, 4dp apart\n// and raised on the level 3 shadow. The values are the page's, read from\n// Material Design's own FAB menu tokens. The three tones are the page's three\n// colour sets: the close button takes the tone and the actions its\n// container, so the two contrast as the page draws them.\n//\n// The FAB is the menu's own rather than a child the call site places, as\n// Menu's trigger is, because what it draws depends on whether the menu is\n// open, and the menu is what knows. Closed, it is Fab at any of its sizes,\n// with Fab's styles; it shrinks to the close button's 56dp as the menu opens,\n// keeping the corner its layout anchors it by, and its corner rounds and its\n// colour deepens over the same medium duration. A reader who asks for\n// reduced motion gets the change at once.\n//\n// React Aria's `MenuTrigger`, `Menu` and `MenuItem` supply the behaviour: the\n// FAB's `aria-expanded`, the arrow keys between the actions, Escape and an\n// outside press to close, and focus returned to the FAB. The surface is\n// React Aria's `Popover` with nothing drawn on it, since each action is a\n// container of its own; it arrives over the overlay module's short duration,\n// as every popup does, and leaves at once, for the reason that module\n// gives.\n//\n// Under forced colours the shadows go and the containers are painted over,\n// so the FAB and each action are drawn as a 1px `ButtonText` rule.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The actions rise into place from just below where they settle.\nconst riseIn = \"x1uknk9t-B\";\nconst styles = {\n closeButton: {\n kZKoxP: \"xs1ryiz\",\n kaIpWk: \"x16rqkct\",\n kzqmXN: \"x1fh0d6s\",\n $$css: true\n },\n closeIcon: {\n kGuDYH: \"xwsyq91\",\n $$css: true\n },\n item: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kGVxlE: \"x1udv5rz\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kOIVth: \"x126z3so\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kAzted: \"xdovgog\",\n k7Eaqz: \"x13ijof9\",\n k3XXqK: \"x1t137rt\",\n kVQacm: \"xb3r6kr\",\n kg3NbH: \"xg0ps1x\",\n kVAEAm: \"x1n2onr6\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n itemDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n itemFocused: {\n kjBf7l: \"xat36cu x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1s780dp\",\n $$css: true\n },\n trigger: {\n kIyJzY: \"xioksi3 x12w9bfk\",\n k1ekBW: \"x104ni8d\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n }\n};\n\n// What a tone draws its actions in: the container pair, as the close button\n// takes the tone itself.\nconst ToneContext = createContext<FabTone>('primary');\ntype FabMenuItemProps = Omit<RACMenuItemProps, 'children' | 'className' | 'style'> & {\n /** The action's name, drawn as its label. */\n children: ReactNode;\n /** A function may compute the class from the action's render state. */\n className?: ClassNameOrFunction<MenuItemRenderProps>;\n /** An icon before the label, at the page's 24px. */\n icon?: ReactNode;\n /** A function may compute the style from the action's render state. */\n style?: StyleOrFunction<MenuItemRenderProps>;\n};\ntype FabMenuProps = {\n /**\n * What the FAB does, in words: an icon alone has no name, and the menu\n * takes its name from the FAB that opens it.\n */\n 'aria-label': string;\n /** The actions, as `FabMenu.Item`s — the page asks for two to six. */\n children: ReactNode;\n /**\n * A function may compute the class from the FAB's render state. It lands\n * on the FAB, which is what a layout positions.\n */\n className?: ClassNameOrFunction<ButtonState>;\n /**\n * Where the actions are portalled to. Defaults to the container of the\n * `ThemeScope` around it, or to the end of `<body>` where there is none. A\n * subtree themed through the `themeScope` class has no container of its own,\n * so point this inside it, or they render outside and keep the page's tokens.\n */\n container?: Element;\n /**\n * Whether the menu starts open, when it keeps its own state.\n * @default false\n */\n defaultOpen?: boolean;\n /** The FAB's icon while the menu is closed. */\n icon: ReactNode;\n /** Whether the menu is open, when the call site holds the state. */\n isOpen?: boolean;\n /** Called with an action's `id` when it is chosen. */\n onAction?: (key: Key) => void;\n /** Called when the menu opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * The FAB's size while the menu is closed, as Fab's: `md` 56px, `lg` 80px\n * or `xl` 96px. Open, it is the close button's 56px whatever it was.\n * @default 'md'\n */\n size?: FabSize;\n /** A function may compute the style from the FAB's render state. */\n style?: StyleOrFunction<ButtonState>;\n /**\n * The page's three colour sets: the close button takes the tone and the\n * actions its container pair.\n * @default 'primary'\n */\n tone?: FabTone;\n} & RefAttributes<HTMLButtonElement>;\n\n/**\n * A FAB that opens a column of related actions above it, and closes them\n * again. The actions are `FabMenu.Item`s.\n *\n * ```tsx\n * <FabMenu aria-label=\"Label\" icon={<PlusIcon />}>\n * <FabMenu.Item icon={<FirstIcon />} id=\"first\">\n * First item\n * </FabMenu.Item>\n * <FabMenu.Item icon={<SecondIcon />} id=\"second\">\n * Second item\n * </FabMenu.Item>\n * </FabMenu>\n * ```\n *\n * The call site's `className`, `style` and `ref` land on the FAB.\n */\nfunction FabMenu({\n 'aria-label': label,\n children,\n className,\n container,\n defaultOpen = false,\n icon,\n isOpen,\n onAction,\n onOpenChange,\n ref,\n size = 'md',\n style,\n tone = 'primary'\n}: FabMenuProps) {\n const [ownOpen, setOwnOpen] = useState(defaultOpen);\n const open = isOpen ?? ownOpen;\n const changeOpen = useCallback((next: boolean) => {\n if (isOpen === undefined) {\n setOwnOpen(next);\n }\n onOpenChange?.(next);\n }, [isOpen, onOpenChange]);\n return <ToneContext value={tone}>\n <RACMenuTrigger isOpen={open} onOpenChange={changeOpen}>\n <ButtonBase aria-label={label} classes={triggerClasses(open, size, tone)} className={className} ref={ref} style={style}>\n <span {...stylex.props(fabStyles.icon, open ? styles.closeIcon : fabIconSizes[size])}>\n {open ? <CloseGlyph className=\"xlzyvqe x15vhz18\" /> : icon}\n </span>\n </ButtonBase>\n <RACPopover offset={8} placement=\"top end\"\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} className=\"xvhm28k x1u6grsq xhpbw76 x16dv9tl x9f619 x1t137rt\">\n <RACMenu onAction={onAction} className=\"xuk3077 x9f619 x78zum5 xdt5ytf xzoy561 x1t137rt\">\n {children}\n </RACMenu>\n </RACPopover>\n </RACMenuTrigger>\n </ToneContext>;\n}\n\n/**\n * One action: a pill holding an icon and a label, on the menu's tone.\n * Choosing it closes the menu.\n */\nfunction FabMenuItem({\n children,\n icon,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n textValue,\n ...props\n}: FabMenuItemProps & RefAttributes<HTMLDivElement>) {\n const tone = useContext(ToneContext);\n // The press ripple Menu's items draw — see MenuItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACMenuItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemClasses(tone), props)}>\n {icon === undefined ? null : <span {...stylex.props(fabStyles.icon, fabIconSizes.md)}>{icon}</span>}\n <Text slot=\"label\">{children}</Text>\n {ripple.surface}\n </RACMenuItem>;\n}\n\n// An action's classes, from React Aria's render state: the tone's container\n// pair, and the layers over it. Built by a call rather than written inline at\n// the prop, which is what react-perf's no-new-function-as-prop is after.\nfunction itemClasses(tone: FabTone) {\n return (state: MenuItemRenderProps) => stylex.props(styles.item, fabTones.tonal[tone], state.isHovered && fabStyles.hovered, state.isFocused && fabStyles.focused, state.isFocusVisible && styles.itemFocused, state.isPressed && fabStyles.pressed, state.isDisabled && styles.itemDisabled);\n}\n\n// The FAB's classes: Fab's own while the menu is closed, the close button's\n// while it is open. The press layer is a press's alone: React Aria reports\n// the FAB pressed for as long as its menu is open, and ButtonBase hands these\n// classes `isPressed` only while the FAB is actually being pressed.\nfunction triggerClasses(isOpen: boolean, size: FabSize, tone: FabTone) {\n return (state: ButtonState) => stylex.props(fabStyles.base, focus.ring, styles.trigger, isOpen ? fabTones.filled[tone] : fabTones.tonal[tone], isOpen ? styles.closeButton : fabSizes[size], state.isHovered && fabStyles.hovered, state.isFocusVisible && fabStyles.focused, state.isPressed && fabStyles.pressed, state.isDisabled && fabStyles.disabled);\n}\nFabMenu.Item = FabMenuItem;\nexport type { FabMenuItemProps, FabMenuProps };\nexport { FabMenuItem };\nexport default FabMenu;"],"mappings":";;;;;;;;;;;;;;AAyDA,MAAMc,SAAS;CACbC,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAW;EACTC,QAAQ;EACRF,OAAO;CACT;CACAG,MAAM;EACJC,QAAQ;EACRC,QAAQ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G,MAAMzC,OAAOJ,SAAS/C,OAAOC,cAAcP,SAASwD,OAAOyC,MAAME,aAAalG,UAAUmG,SAASH,MAAMM,kBAAkBtG,UAAUqG,SAASL,MAAMO,aAAavG,UAAUwG,SAASR,MAAMS,cAAczG,UAAU6G,QAAQ;AAC5V;AACApD,QAAQqD,OAAO3B"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","useState","RACMenuItem","textOf","fabIconSizes","fabSizes","fabStyles","fabTones","useRipple","focus","mergeStatefulStyles","tokenScope","styles","closeButton","kZKoxP","kaIpWk","kzqmXN","$$css","closeIcon","kGuDYH","item","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kGVxlE","kB7OPa","kkrTdU","k1xSpc","kMv6JI","k63SB2","kOIVth","kb6lSQ","kLWn49","kAzted","k7Eaqz","k3XXqK","kVQacm","kg3NbH","kVAEAm","khDVqt","itemDisabled","kWkggS","kMwMTN","itemFocused","kjBf7l","kInvED","kMeerF","trigger","kIyJzY","k1ekBW","kAMwcw","ToneContext","children","className","icon","style","theme","tone","container","defaultOpen","isOpen","onAction","onOpenChange","size","FabMenu","t0","$","label","t1","ref","t2","t3","undefined","ownOpen","setOwnOpen","open","t4","next","changeOpen","t5","triggerClasses","t6","props","t7","t8","t9","t10","t11","t12","t13","FabMenuItem","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","ownTone","menuTone","ripple","T0","handlers","itemClasses","themed","md","surface","isScoped","state","tonal","isHovered","hovered","isFocused","focused","isFocusVisible","isPressed","pressed","isDisabled","base","ring","filled","disabled","Item","RACMenu","RACPopover","RACMenuTrigger"],"sources":["../../../src/components/fab-menu/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSProperties, ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, Key, MenuItemRenderProps, MenuItemProps as RACMenuItemProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useState } from 'react';\nimport { Menu as RACMenu, MenuItem as RACMenuItem, MenuTrigger as RACMenuTrigger, Popover as RACPopover, Text } from 'react-aria-components';\nimport type { ButtonState } from '../../button';\nimport type { KuiTheme } from '../../theme-scope';\nimport type { FabSize, FabTone } from '../fab';\nimport { ButtonBase } from '../../button';\nimport { textOf } from '../../collection/text';\nimport { fabIconSizes, fabSizes, fabStyles, fabTones } from '../../fab/styles';\nimport { CloseGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, tokenScope, typography } from '../../tokens/design.tokens.stylex';\n\n// The FAB menu page's menu: a FAB that opens two to six related actions\n// floating above it, in place of a speed dial. Open, the FAB becomes the\n// menu's close button — the pages' 56dp circle in the tone itself, with a\n// 20dp close mark — and the actions stand in a column 8dp above it, lined up\n// on its trailing edge, each a 56dp pill on the tone's container pair with\n// 24dp at either end, a 24dp icon 8dp before a title-medium label, 4dp apart\n// and raised on the level 3 shadow. The values are the page's, read from\n// Material Design's own FAB menu tokens. The three tones are the page's three\n// colour sets: the close button takes the tone and the actions its\n// container, so the two contrast as the page draws them.\n//\n// The FAB is the menu's own rather than a child the call site places, as\n// Menu's trigger is, because what it draws depends on whether the menu is\n// open, and the menu is what knows. Closed, it is Fab at any of its sizes,\n// with Fab's styles; it shrinks to the close button's 56dp as the menu opens,\n// keeping the corner its layout anchors it by, and its corner rounds and its\n// colour deepens over the same medium duration. A reader who asks for\n// reduced motion gets the change at once.\n//\n// React Aria's `MenuTrigger`, `Menu` and `MenuItem` supply the behaviour: the\n// FAB's `aria-expanded`, the arrow keys between the actions, Escape and an\n// outside press to close, and focus returned to the FAB. The surface is\n// React Aria's `Popover` with nothing drawn on it, since each action is a\n// container of its own; it arrives over the overlay module's short duration,\n// as every popup does, and leaves at once, for the reason that module\n// gives.\n//\n// Under forced colours the shadows go and the containers are painted over,\n// so the FAB and each action are drawn as a 1px `ButtonText` rule.\n//\n// An action can take a tone of its own, or a theme of its own, which the page\n// does not draw: a menu whose actions each open a different part of an app\n// can draw each in that part's colour. Either changes that action's pill\n// alone, its container pair read from its own tone under its own theme, and\n// the close button keeps the menu's. A theme is the `--kui-*` map\n// `ThemeScope` takes, declared on the pill with the tokens resolved again\n// there, as a scope resolves them, so it reaches that pill and nothing else.\n// An action with neither draws in the menu's tone, as the page does.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The actions rise into place from just below where they settle.\nconst riseIn = \"x1uknk9t-B\";\nconst styles = {\n closeButton: {\n kZKoxP: \"xs1ryiz\",\n kaIpWk: \"x16rqkct\",\n kzqmXN: \"x1fh0d6s\",\n $$css: true\n },\n closeIcon: {\n kGuDYH: \"xwsyq91\",\n $$css: true\n },\n item: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kGVxlE: \"x1udv5rz\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kOIVth: \"x126z3so\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kAzted: \"xdovgog\",\n k7Eaqz: \"x13ijof9\",\n k3XXqK: \"x1t137rt\",\n kVQacm: \"xb3r6kr\",\n kg3NbH: \"xg0ps1x\",\n kVAEAm: \"x1n2onr6\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n itemDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n itemFocused: {\n kjBf7l: \"xat36cu x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1s780dp\",\n $$css: true\n },\n trigger: {\n kIyJzY: \"xioksi3 x12w9bfk\",\n k1ekBW: \"x104ni8d\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n }\n};\n\n// What a tone draws its actions in: the container pair, as the close button\n// takes the tone itself.\nconst ToneContext = createContext<FabTone>('primary');\ntype FabMenuItemProps = Omit<RACMenuItemProps, 'children' | 'className' | 'style'> & {\n /** The action's name, drawn as its label. */\n children: ReactNode;\n /** A function may compute the class from the action's render state. */\n className?: ClassNameOrFunction<MenuItemRenderProps>;\n /** An icon before the label, at the page's 24px. */\n icon?: ReactNode;\n /** A function may compute the style from the action's render state. */\n style?: StyleOrFunction<MenuItemRenderProps>;\n /**\n * `--kui-*` overrides for this action's pill alone, over those of the page\n * around the menu, as `ThemeScope`'s `theme` takes them. The pill reads its\n * tone's container pair from them, and its icon and label follow. Keep the\n * map a constant, as for `ThemeScope`.\n */\n theme?: KuiTheme;\n /**\n * The colour set this action's pill draws in, the container pair of the\n * page's three tones, in place of the menu's. The close button keeps the\n * menu's.\n * @default the menu's `tone`\n */\n tone?: FabTone;\n};\ntype FabMenuProps = {\n /**\n * What the FAB does, in words: an icon alone has no name, and the menu\n * takes its name from the FAB that opens it.\n */\n 'aria-label': string;\n /** The actions, as `FabMenu.Item`s — the page asks for two to six. */\n children: ReactNode;\n /**\n * A function may compute the class from the FAB's render state. It lands\n * on the FAB, which is what a layout positions.\n */\n className?: ClassNameOrFunction<ButtonState>;\n /**\n * Where the actions are portalled to. Defaults to the container of the\n * `ThemeScope` around it, or to the end of `<body>` where there is none. A\n * subtree themed through the `themeScope` class has no container of its own,\n * so point this inside it, or they render outside and keep the page's tokens.\n */\n container?: Element;\n /**\n * Whether the menu starts open, when it keeps its own state.\n * @default false\n */\n defaultOpen?: boolean;\n /** The FAB's icon while the menu is closed. */\n icon: ReactNode;\n /** Whether the menu is open, when the call site holds the state. */\n isOpen?: boolean;\n /** Called with an action's `id` when it is chosen. */\n onAction?: (key: Key) => void;\n /** Called when the menu opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * The FAB's size while the menu is closed, as Fab's: `md` 56px, `lg` 80px\n * or `xl` 96px. Open, it is the close button's 56px whatever it was.\n * @default 'md'\n */\n size?: FabSize;\n /** A function may compute the style from the FAB's render state. */\n style?: StyleOrFunction<ButtonState>;\n /**\n * The page's three colour sets: the close button takes the tone and the\n * actions its container pair.\n * @default 'primary'\n */\n tone?: FabTone;\n} & RefAttributes<HTMLButtonElement>;\n\n/**\n * A FAB that opens a column of related actions above it, and closes them\n * again. The actions are `FabMenu.Item`s.\n *\n * ```tsx\n * <FabMenu aria-label=\"Label\" icon={<PlusIcon />}>\n * <FabMenu.Item icon={<FirstIcon />} id=\"first\">\n * First item\n * </FabMenu.Item>\n * <FabMenu.Item icon={<SecondIcon />} id=\"second\">\n * Second item\n * </FabMenu.Item>\n * </FabMenu>\n * ```\n *\n * The call site's `className`, `style` and `ref` land on the FAB.\n */\nfunction FabMenu({\n 'aria-label': label,\n children,\n className,\n container,\n defaultOpen = false,\n icon,\n isOpen,\n onAction,\n onOpenChange,\n ref,\n size = 'md',\n style,\n tone = 'primary'\n}: FabMenuProps) {\n const [ownOpen, setOwnOpen] = useState(defaultOpen);\n const open = isOpen ?? ownOpen;\n const changeOpen = useCallback((next: boolean) => {\n if (isOpen === undefined) {\n setOwnOpen(next);\n }\n onOpenChange?.(next);\n }, [isOpen, onOpenChange]);\n return <ToneContext value={tone}>\n <RACMenuTrigger isOpen={open} onOpenChange={changeOpen}>\n <ButtonBase aria-label={label} classes={triggerClasses(open, size, tone)} className={className} ref={ref} style={style}>\n <span {...stylex.props(fabStyles.icon, open ? styles.closeIcon : fabIconSizes[size])}>\n {open ? <CloseGlyph className=\"xlzyvqe x15vhz18\" /> : icon}\n </span>\n </ButtonBase>\n <RACPopover offset={8} placement=\"top end\"\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} className=\"xvhm28k x1u6grsq xhpbw76 x16dv9tl x9f619 x1t137rt\">\n <RACMenu onAction={onAction} className=\"xuk3077 x9f619 x78zum5 xdt5ytf xzoy561 x1t137rt\">\n {children}\n </RACMenu>\n </RACPopover>\n </RACMenuTrigger>\n </ToneContext>;\n}\n\n/**\n * One action: a pill holding an icon and a label, on the menu's tone.\n * Choosing it closes the menu.\n */\nfunction FabMenuItem({\n children,\n icon,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n textValue,\n theme,\n tone: ownTone,\n ...props\n}: FabMenuItemProps & RefAttributes<HTMLDivElement>) {\n const menuTone = useContext(ToneContext);\n // The press ripple Menu's items draw — see MenuItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACMenuItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemClasses(ownTone ?? menuTone, theme !== undefined), theme === undefined ? props : {\n ...props,\n style: themed(theme, props.style)\n })}>\n {icon === undefined ? null : <span {...stylex.props(fabStyles.icon, fabIconSizes.md)}>{icon}</span>}\n <Text slot=\"label\">{children}</Text>\n {ripple.surface}\n </RACMenuItem>;\n}\n\n// An action's classes, from React Aria's render state: the tone's container\n// pair, and the layers over it. Built by a call rather than written inline at\n// the prop, which is what react-perf's no-new-function-as-prop is after.\nfunction itemClasses(tone: FabTone, isScoped: boolean) {\n return (state: MenuItemRenderProps) => stylex.props(styles.item, isScoped && tokenScope, fabTones.tonal[tone], state.isHovered && fabStyles.hovered, state.isFocused && fabStyles.focused, state.isFocusVisible && styles.itemFocused, state.isPressed && fabStyles.pressed, state.isDisabled && styles.itemDisabled);\n}\n\n// An action's style with its theme declared under the call site's own, as\n// ThemeScope declares a theme: the call site's style wins where the two set\n// the same property.\nfunction themed(theme: KuiTheme, style: StyleOrFunction<MenuItemRenderProps> | undefined) {\n return (state: MenuItemRenderProps & {\n defaultStyle: CSSProperties;\n }) => ({\n ...theme,\n ...(typeof style === 'function' ? style(state) : style)\n });\n}\n\n// The FAB's classes: Fab's own while the menu is closed, the close button's\n// while it is open. The press layer is a press's alone: React Aria reports\n// the FAB pressed for as long as its menu is open, and ButtonBase hands these\n// classes `isPressed` only while the FAB is actually being pressed.\nfunction triggerClasses(isOpen: boolean, size: FabSize, tone: FabTone) {\n return (state: ButtonState) => stylex.props(fabStyles.base, focus.ring, styles.trigger, isOpen ? fabTones.filled[tone] : fabTones.tonal[tone], isOpen ? styles.closeButton : fabSizes[size], state.isHovered && fabStyles.hovered, state.isFocusVisible && fabStyles.focused, state.isPressed && fabStyles.pressed, state.isDisabled && fabStyles.disabled);\n}\nFabMenu.Item = FabMenuItem;\nexport type { FabMenuItemProps, FabMenuProps };\nexport { FabMenuItem };\nexport default FabMenu;"],"mappings":";;;;;;;;;;;;;;;AAmEA,MAAMe,SAAS;CACbC,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAW;EACTC,QAAQ;EACRF,OAAO;CACT;CACAG,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRV,QAAQ;EACRW,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRvB,OAAO;CACT;C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ASiH,OAAO9D,QAAQnD,SAASsG,MAAMnD,OAAOG,SAASjD,OAAOC,cAAcR,SAAS2D,OAAO4C,MAAME,aAAaxG,UAAUyG,SAASH,MAAMM,kBAAkB5G,UAAU2G,SAASL,MAAMO,aAAa7G,UAAU8G,SAASR,MAAMS,cAAc/G,UAAUmH,QAAQ;AAC5V;AACAxD,QAAQyD,OAAO/B"}
@@ -34,6 +34,7 @@ import Dialog, { DialogBody, DialogContent, DialogContentProps, DialogFooter, Di
34
34
  import Disclosure, { DisclosureHeader, DisclosureHeaderProps, DisclosurePanel, DisclosurePanelProps, DisclosureProps } from "./disclosure/index.js";
35
35
  import DisclosureGroup, { DisclosureGroupProps } from "./disclosure-group/index.js";
36
36
  import DropZone, { DropZoneProps, FileTrigger, FileTriggerProps } from "./drop-zone/index.js";
37
+ import EmptyState, { EmptyStateAction, EmptyStateKind, EmptyStateProps, EmptyStateSize } from "./empty-state/index.js";
37
38
  import Fab, { FabProps, FabSize, FabTone, FabVariant } from "./fab/index.js";
38
39
  import FabMenu, { FabMenuItem, FabMenuItemProps, FabMenuProps } from "./fab-menu/index.js";
39
40
  import Feed, { FeedProps } from "./feed/index.js";
@@ -50,7 +51,7 @@ import Menu, { MenuAlign, MenuContent, MenuContentProps, MenuItem, MenuItemProps
50
51
  import Meter, { MeterProps, MeterTone } from "./meter/index.js";
51
52
  import NavigationBar, { NavigationBarItem, NavigationBarProps } from "./navigation-bar/index.js";
52
53
  import { NavigationItemProps } from "../navigation/index.js";
53
- import NavigationRail, { NavigationRailItem, NavigationRailProps } from "./navigation-rail/index.js";
54
+ import NavigationRail, { NavigationRailFab, NavigationRailFabProps, NavigationRailItem, NavigationRailProps } from "./navigation-rail/index.js";
54
55
  import NavigationTree, { NavigationTreeItem, NavigationTreeItemProps, NavigationTreeProps, NavigationTreeSection, NavigationTreeSectionProps } from "./navigation-tree/index.js";
55
56
  import NumberField, { NumberFieldProps } from "./number-field/index.js";
56
57
  import Popover, { PopoverAlign, PopoverContent, PopoverContentProps, PopoverDescription, PopoverDescriptionProps, PopoverProps, PopoverSide, PopoverSize, PopoverTitle, PopoverTitleProps, PopoverTrigger } from "./popover/index.js";
@@ -64,8 +65,9 @@ import SegmentedButton, { SegmentedButtonProps, SegmentedButtonSegment, Segmente
64
65
  import Select, { SelectProps } from "./select/index.js";
65
66
  import Separator, { SeparatorInset, SeparatorProps } from "./separator/index.js";
66
67
  import Sheet, { SheetBody, SheetContent, SheetContentProps, SheetFooter, SheetHandle, SheetHeader, SheetProps, SheetTitle, SheetTitleProps } from "./sheet/index.js";
68
+ import Skeleton, { SkeletonBar, SkeletonBarProps, SkeletonBarSize, SkeletonCircle, SkeletonCircleProps, SkeletonProps, SkeletonRow, SkeletonRowProps } from "./skeleton/index.js";
67
69
  import Slider, { SliderProps, SliderSize } from "./slider/index.js";
68
- import Snackbar, { SnackbarAction, SnackbarMessage, SnackbarOptions, SnackbarProps, SnackbarQueue, SnackbarRegionRenderProps as ToastRegionRenderProps } from "./snackbar/index.js";
70
+ import Snackbar, { SnackbarAction, SnackbarMessage, SnackbarOptions, SnackbarProps, SnackbarQueue, SnackbarRegionRenderProps as ToastRegionRenderProps, SnackbarTone } from "./snackbar/index.js";
69
71
  import SplitButton, { SplitButtonAction, SplitButtonActionProps, SplitButtonMenu, SplitButtonMenuProps, SplitButtonProps, SplitButtonVariant } from "./split-button/index.js";
70
72
  import Stack, { StackAlign, StackGap, StackJustify, StackProps } from "./stack/index.js";
71
73
  import SupportingPane, { SupportingPaneProps } from "./supporting-pane/index.js";
@@ -82,4 +84,4 @@ import TokenField, { TokenFieldProps, TokenSegment } from "./token-field/index.j
82
84
  import Toolbar, { ToolbarProps, ToolbarTone } from "./toolbar/index.js";
83
85
  import Tooltip, { TooltipAlign, TooltipProps, TooltipSide } from "./tooltip/index.js";
84
86
  import Tree, { TreeItem, TreeItemProps, TreeLoadMore, TreeLoadMoreProps, TreeProps, TreeSection, TreeSectionProps } from "./tree/index.js";
85
- export { AppBar, type AppBarProps, type AppBarScroll, type AppBarScrollOptions, Autocomplete, type AutocompleteFilter, type AutocompleteProps, Avatar, type AvatarProps, Badge, type BadgeProps, Breadcrumbs, BreadcrumbsItem, type BreadcrumbsItemProps, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, type CardVariant, Carousel, CarouselItem, type CarouselItemProps, type CarouselItemRenderProps, type CarouselLayout, type CarouselProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipActionProps, type ChipDropdownProps, type ChipFilterProps, ChipGroup, ChipGroupChip, type ChipGroupChipProps, type ChipGroupProps, type ChipProps, type ChipVariant, Code, type CodeProps, ColorArea, type ColorAreaProps, ColorField, type ColorFieldProps, ColorPicker, type ColorPickerProps, ColorSlider, type ColorSliderProps, ColorSwatch, ColorSwatchPicker, ColorSwatchPickerItem, type ColorSwatchPickerItemProps, type ColorSwatchPickerProps, type ColorSwatchProps, ColorWheel, type ColorWheelProps, ComboBox, type ComboBoxProps, type ComboBoxSelectionMode, Container, type ContainerProps, CopyField, type CopyFieldProps, Currency, type CurrencyDisplay, type CurrencyNotation, type CurrencyProps, type CurrencySignDisplay, type CurrencyTone, DateField, type DateFieldProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, Dialog, DialogBody, DialogContent, type DialogContentProps, DialogFooter, DialogHeader, type DialogProps, DialogTitle, type DialogTitleProps, Disclosure, DisclosureGroup, type DisclosureGroupProps, DisclosureHeader, type DisclosureHeaderProps, DisclosurePanel, type DisclosurePanelProps, type DisclosureProps, DropZone, type DropZoneProps, Fab, FabMenu, FabMenuItem, type FabMenuItemProps, type FabMenuProps, type FabProps, type FabSize, type FabTone, type FabVariant, Feed, type FeedProps, type FieldVariant, FileTrigger, type FileTriggerProps, Form, type FormProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Keycap, type KeycapProps, Link, type LinkProps, type LinkTone, type LinkUnderline, List, ListBox, ListBoxItem, type ListBoxItemProps, ListBoxLoadMore, type ListBoxLoadMoreProps, type ListBoxProps, ListBoxSection, type ListBoxSectionProps, ListDetail, type ListDetailProps, ListItem, type ListItemProps, ListLoadMore, type ListLoadMoreProps, type ListProps, ListRow, type ListRowProps, ListSection, type ListSectionProps, LoadingIndicator, type LoadingIndicatorProps, Menu, type MenuAlign, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLoadMore, type MenuLoadMoreProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, type MenuSide, MenuSubmenu, type MenuSubmenuProps, Meter, type MeterProps, type MeterTone, NavigationBar, NavigationBarItem, type NavigationItemProps as NavigationBarItemProps, type NavigationBarProps, NavigationRail, NavigationRailItem, type NavigationItemProps as NavigationRailItemProps, type NavigationRailProps, NavigationTree, NavigationTreeItem, type NavigationTreeItemProps, type NavigationTreeProps, NavigationTreeSection, type NavigationTreeSectionProps, NumberField, type NumberFieldProps, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, type PopoverProps, type PopoverSide, type PopoverSize, PopoverTitle, type PopoverTitleProps, type PopoverTrigger, ProductIcon, type ProductIconProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorShape, type ProgressIndicatorTone, type ProgressIndicatorVariant, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RangeCalendar, type RangeCalendarProps, SearchField, type SearchFieldProps, SearchView, SearchViewContent, type SearchViewContentProps, type SearchViewProps, SegmentedButton, type SegmentedButtonProps, SegmentedButtonSegment, type SegmentedButtonSegmentProps, Select, type SelectProps, Separator, type SeparatorInset, type SeparatorProps, Sheet, SheetBody, SheetContent, type SheetContentProps, SheetFooter, SheetHandle, SheetHeader, type SheetProps, SheetTitle, type SheetTitleProps, Slider, type SliderProps, type SliderSize, Snackbar, type SnackbarAction, type SnackbarMessage, type SnackbarOptions, type SnackbarProps, type SnackbarQueue, type ToastRegionRenderProps as SnackbarRegionRenderProps, SplitButton, SplitButtonAction, type SplitButtonActionProps, SplitButtonMenu, type SplitButtonMenuProps, type SplitButtonProps, type SplitButtonVariant, Stack, type StackAlign, type StackGap, type StackJustify, type StackProps, SupportingPane, type SupportingPaneProps, Switch, type SwitchProps, Table, type TableAlign, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, TableLoadMore, type TableLoadMoreProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsLayout, TabsList, type TabsListProps, TabsPanel, type TabsPanelProps, TabsPanels, type TabsPanelsProps, type TabsProps, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagProps, type TagTone, type TagVariant, Text, TextArea, type TextAreaProps, TextField, type TextFieldProps, type TextProps, TimeField, type TimeFieldProps, TimePicker, type TimePickerMode, type TimePickerProps, TokenField, type TokenFieldProps, type TokenSegment, Toolbar, type ToolbarProps, type ToolbarTone, Tooltip, type TooltipAlign, type TooltipProps, type TooltipSide, Tree, TreeItem, type TreeItemProps, TreeLoadMore, type TreeLoadMoreProps, type TreeProps, TreeSection, type TreeSectionProps, useAppBarScroll };
87
+ export { AppBar, type AppBarProps, type AppBarScroll, type AppBarScrollOptions, Autocomplete, type AutocompleteFilter, type AutocompleteProps, Avatar, type AvatarProps, Badge, type BadgeProps, Breadcrumbs, BreadcrumbsItem, type BreadcrumbsItemProps, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, type CardVariant, Carousel, CarouselItem, type CarouselItemProps, type CarouselItemRenderProps, type CarouselLayout, type CarouselProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipActionProps, type ChipDropdownProps, type ChipFilterProps, ChipGroup, ChipGroupChip, type ChipGroupChipProps, type ChipGroupProps, type ChipProps, type ChipVariant, Code, type CodeProps, ColorArea, type ColorAreaProps, ColorField, type ColorFieldProps, ColorPicker, type ColorPickerProps, ColorSlider, type ColorSliderProps, ColorSwatch, ColorSwatchPicker, ColorSwatchPickerItem, type ColorSwatchPickerItemProps, type ColorSwatchPickerProps, type ColorSwatchProps, ColorWheel, type ColorWheelProps, ComboBox, type ComboBoxProps, type ComboBoxSelectionMode, Container, type ContainerProps, CopyField, type CopyFieldProps, Currency, type CurrencyDisplay, type CurrencyNotation, type CurrencyProps, type CurrencySignDisplay, type CurrencyTone, DateField, type DateFieldProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, Dialog, DialogBody, DialogContent, type DialogContentProps, DialogFooter, DialogHeader, type DialogProps, DialogTitle, type DialogTitleProps, Disclosure, DisclosureGroup, type DisclosureGroupProps, DisclosureHeader, type DisclosureHeaderProps, DisclosurePanel, type DisclosurePanelProps, type DisclosureProps, DropZone, type DropZoneProps, EmptyState, type EmptyStateAction, type EmptyStateKind, type EmptyStateProps, type EmptyStateSize, Fab, FabMenu, FabMenuItem, type FabMenuItemProps, type FabMenuProps, type FabProps, type FabSize, type FabTone, type FabVariant, Feed, type FeedProps, type FieldVariant, FileTrigger, type FileTriggerProps, Form, type FormProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Keycap, type KeycapProps, Link, type LinkProps, type LinkTone, type LinkUnderline, List, ListBox, ListBoxItem, type ListBoxItemProps, ListBoxLoadMore, type ListBoxLoadMoreProps, type ListBoxProps, ListBoxSection, type ListBoxSectionProps, ListDetail, type ListDetailProps, ListItem, type ListItemProps, ListLoadMore, type ListLoadMoreProps, type ListProps, ListRow, type ListRowProps, ListSection, type ListSectionProps, LoadingIndicator, type LoadingIndicatorProps, Menu, type MenuAlign, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLoadMore, type MenuLoadMoreProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, type MenuSide, MenuSubmenu, type MenuSubmenuProps, Meter, type MeterProps, type MeterTone, NavigationBar, NavigationBarItem, type NavigationItemProps as NavigationBarItemProps, type NavigationBarProps, NavigationRail, NavigationRailFab, type NavigationRailFabProps, NavigationRailItem, type NavigationItemProps as NavigationRailItemProps, type NavigationRailProps, NavigationTree, NavigationTreeItem, type NavigationTreeItemProps, type NavigationTreeProps, NavigationTreeSection, type NavigationTreeSectionProps, NumberField, type NumberFieldProps, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, type PopoverProps, type PopoverSide, type PopoverSize, PopoverTitle, type PopoverTitleProps, type PopoverTrigger, ProductIcon, type ProductIconProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorShape, type ProgressIndicatorTone, type ProgressIndicatorVariant, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RangeCalendar, type RangeCalendarProps, SearchField, type SearchFieldProps, SearchView, SearchViewContent, type SearchViewContentProps, type SearchViewProps, SegmentedButton, type SegmentedButtonProps, SegmentedButtonSegment, type SegmentedButtonSegmentProps, Select, type SelectProps, Separator, type SeparatorInset, type SeparatorProps, Sheet, SheetBody, SheetContent, type SheetContentProps, SheetFooter, SheetHandle, SheetHeader, type SheetProps, SheetTitle, type SheetTitleProps, Skeleton, SkeletonBar, type SkeletonBarProps, type SkeletonBarSize, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, SkeletonRow, type SkeletonRowProps, Slider, type SliderProps, type SliderSize, Snackbar, type SnackbarAction, type SnackbarMessage, type SnackbarOptions, type SnackbarProps, type SnackbarQueue, type ToastRegionRenderProps as SnackbarRegionRenderProps, type SnackbarTone, SplitButton, SplitButtonAction, type SplitButtonActionProps, SplitButtonMenu, type SplitButtonMenuProps, type SplitButtonProps, type SplitButtonVariant, Stack, type StackAlign, type StackGap, type StackJustify, type StackProps, SupportingPane, type SupportingPaneProps, Switch, type SwitchProps, Table, type TableAlign, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, TableLoadMore, type TableLoadMoreProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsLayout, TabsList, type TabsListProps, TabsPanel, type TabsPanelProps, TabsPanels, type TabsPanelsProps, type TabsProps, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagProps, type TagTone, type TagVariant, Text, TextArea, type TextAreaProps, TextField, type TextFieldProps, type TextProps, TimeField, type TimeFieldProps, TimePicker, type TimePickerMode, type TimePickerProps, TokenField, type TokenFieldProps, type TokenSegment, Toolbar, type ToolbarProps, type ToolbarTone, Tooltip, type TooltipAlign, type TooltipProps, type TooltipSide, Tree, TreeItem, type TreeItemProps, TreeLoadMore, type TreeLoadMoreProps, type TreeProps, TreeSection, type TreeSectionProps, useAppBarScroll };