@monospaced/set-react 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/README.md +5 -0
  2. package/dist/components/alert/alert.d.ts +10 -0
  3. package/dist/components/alert/alert.d.ts.map +1 -0
  4. package/dist/components/avatar/avatar.d.ts +5 -0
  5. package/dist/components/avatar/avatar.d.ts.map +1 -0
  6. package/dist/components/badge/badge.d.ts +5 -0
  7. package/dist/components/badge/badge.d.ts.map +1 -0
  8. package/dist/components/banner/banner.d.ts +10 -0
  9. package/dist/components/banner/banner.d.ts.map +1 -0
  10. package/dist/components/blockquote/blockquote.d.ts +9 -0
  11. package/dist/components/blockquote/blockquote.d.ts.map +1 -0
  12. package/dist/components/box/box.d.ts +8 -0
  13. package/dist/components/box/box.d.ts.map +1 -0
  14. package/dist/components/button/button.d.ts +5 -0
  15. package/dist/components/button/button.d.ts.map +1 -0
  16. package/dist/components/card/card.d.ts +9 -0
  17. package/dist/components/card/card.d.ts.map +1 -0
  18. package/dist/components/checkbox/checkbox.d.ts +5 -0
  19. package/dist/components/checkbox/checkbox.d.ts.map +1 -0
  20. package/dist/components/container/container.d.ts +8 -0
  21. package/dist/components/container/container.d.ts.map +1 -0
  22. package/dist/components/details/details.d.ts +8 -0
  23. package/dist/components/details/details.d.ts.map +1 -0
  24. package/dist/components/divider/divider.d.ts +5 -0
  25. package/dist/components/divider/divider.d.ts.map +1 -0
  26. package/dist/components/expander/expander.d.ts +5 -0
  27. package/dist/components/expander/expander.d.ts.map +1 -0
  28. package/dist/components/fieldset/fieldset.d.ts +8 -0
  29. package/dist/components/fieldset/fieldset.d.ts.map +1 -0
  30. package/dist/components/figure/figure.d.ts +9 -0
  31. package/dist/components/figure/figure.d.ts.map +1 -0
  32. package/dist/components/grid/grid.d.ts +8 -0
  33. package/dist/components/grid/grid.d.ts.map +1 -0
  34. package/dist/components/grid-item/grid-item.d.ts +8 -0
  35. package/dist/components/grid-item/grid-item.d.ts.map +1 -0
  36. package/dist/components/heading/heading.d.ts +5 -0
  37. package/dist/components/heading/heading.d.ts.map +1 -0
  38. package/dist/components/icon/icon.d.ts +5 -0
  39. package/dist/components/icon/icon.d.ts.map +1 -0
  40. package/dist/components/image/image.d.ts +5 -0
  41. package/dist/components/image/image.d.ts.map +1 -0
  42. package/dist/components/inline/inline.d.ts +8 -0
  43. package/dist/components/inline/inline.d.ts.map +1 -0
  44. package/dist/components/input/input.d.ts +5 -0
  45. package/dist/components/input/input.d.ts.map +1 -0
  46. package/dist/components/link/link.d.ts +8 -0
  47. package/dist/components/link/link.d.ts.map +1 -0
  48. package/dist/components/logo/logo.d.ts +5 -0
  49. package/dist/components/logo/logo.d.ts.map +1 -0
  50. package/dist/components/menu/menu.d.ts +14 -0
  51. package/dist/components/menu/menu.d.ts.map +1 -0
  52. package/dist/components/nav/nav.d.ts +5 -0
  53. package/dist/components/nav/nav.d.ts.map +1 -0
  54. package/dist/components/page/page.d.ts +11 -0
  55. package/dist/components/page/page.d.ts.map +1 -0
  56. package/dist/components/panel/panel.d.ts +8 -0
  57. package/dist/components/panel/panel.d.ts.map +1 -0
  58. package/dist/components/pattern/pattern.d.ts +8 -0
  59. package/dist/components/pattern/pattern.d.ts.map +1 -0
  60. package/dist/components/poster/poster.d.ts +9 -0
  61. package/dist/components/poster/poster.d.ts.map +1 -0
  62. package/dist/components/prose/prose.d.ts +8 -0
  63. package/dist/components/prose/prose.d.ts.map +1 -0
  64. package/dist/components/radios/radios.d.ts +5 -0
  65. package/dist/components/radios/radios.d.ts.map +1 -0
  66. package/dist/components/range/range.d.ts +5 -0
  67. package/dist/components/range/range.d.ts.map +1 -0
  68. package/dist/components/root/root.d.ts +8 -0
  69. package/dist/components/root/root.d.ts.map +1 -0
  70. package/dist/components/sidebar/sidebar.d.ts +10 -0
  71. package/dist/components/sidebar/sidebar.d.ts.map +1 -0
  72. package/dist/components/spinner/spinner.d.ts +5 -0
  73. package/dist/components/spinner/spinner.d.ts.map +1 -0
  74. package/dist/components/stack/stack.d.ts +8 -0
  75. package/dist/components/stack/stack.d.ts.map +1 -0
  76. package/dist/components/surface/surface.d.ts +8 -0
  77. package/dist/components/surface/surface.d.ts.map +1 -0
  78. package/dist/components/switch/switch.d.ts +5 -0
  79. package/dist/components/switch/switch.d.ts.map +1 -0
  80. package/dist/components/text/text.d.ts +8 -0
  81. package/dist/components/text/text.d.ts.map +1 -0
  82. package/dist/components/textarea/textarea.d.ts +5 -0
  83. package/dist/components/textarea/textarea.d.ts.map +1 -0
  84. package/dist/index.cjs +2 -0
  85. package/dist/index.cjs.map +1 -0
  86. package/dist/index.d.ts +43 -0
  87. package/dist/index.d.ts.map +1 -0
  88. package/dist/index.js +875 -0
  89. package/dist/index.js.map +1 -0
  90. package/dist/reactify.d.ts +27 -0
  91. package/dist/reactify.d.ts.map +1 -0
  92. package/dist/test/setup.d.ts +1 -0
  93. package/dist/test/setup.d.ts.map +1 -0
  94. package/package.json +51 -0
package/dist/index.js ADDED
@@ -0,0 +1,875 @@
1
+ import { serializeSetNode as ae, defineSetAlert as ue, SET_ALERT_EVENT_BEFORE_DISMISS as b, SET_ALERT_EVENT_DISMISS as v, buildSetAlert as de, buildSetAvatar as Se, buildSetBadge as Ee, defineSetBanner as fe, SET_BANNER_EVENT_BEFORE_DISMISS as g, SET_BANNER_EVENT_DISMISS as A, buildSetBanner as Te, buildSetBlockquote as Le, buildSetBox as Re, buildSetButton as he, buildSetCard as Oe, buildSetCheckbox as Ie, buildSetContainer as Ne, buildSetDetails as Ce, buildSetDivider as me, buildSetExpander as De, buildSetFieldset as be, buildSetFigure as ve, buildSetGrid as ge, buildSetGridItem as Ae, buildSetHeading as He, buildSetIcon as pe, buildSetImage as Pe, buildSetInline as Be, buildSetInput as ke, buildSetLink as Fe, buildSetLogo as xe, defineSetMenu as ye, SET_MENU_EVENT_CHOOSE as H, buildSetMenu as we, defineSetNav as Ge, buildSetNav as Me, buildSetPage as Ue, buildSetPanel as ze, buildSetPattern as je, buildSetPoster as Ke, buildSetProse as We, buildSetRadios as Ve, defineSetRange as Qe, buildSetRange as qe, buildSetRoot as Xe, buildSetSidebar as $e, defineSetSidebar as Ye, buildSetSpinner as Je, buildSetStack as Ze, buildSetSurface as en, buildSetSwitch as nn, buildSetText as tn, buildSetTextarea as rn } from "@monospaced/set-core";
2
+ import { defineSetComponents as ot } from "@monospaced/set-core";
3
+ import { createElement as T, Fragment as O, useEffect as f, useRef as C, useCallback as m } from "react";
4
+ const on = {
5
+ autocomplete: "autoComplete",
6
+ class: "className",
7
+ for: "htmlFor",
8
+ readonly: "readOnly",
9
+ spellcheck: "spellCheck",
10
+ srcset: "srcSet",
11
+ "stroke-linecap": "strokeLinecap",
12
+ "stroke-linejoin": "strokeLinejoin",
13
+ "stroke-width": "strokeWidth",
14
+ tabindex: "tabIndex"
15
+ }, sn = /* @__PURE__ */ new Set(["input", "textarea", "select"]);
16
+ function cn(e) {
17
+ const n = {};
18
+ for (const [t, r] of Object.entries(e)) {
19
+ if (r == null || r === !1 && (t.startsWith("data-") || t.startsWith("aria-")))
20
+ continue;
21
+ const c = on[t] ?? t;
22
+ n[c] = r === !0 && t.startsWith("data-") ? "" : r;
23
+ }
24
+ return n;
25
+ }
26
+ function ln(e) {
27
+ const n = [], t = (r) => {
28
+ if (r.kind === "element") {
29
+ sn.has(r.tag) && n.push(r);
30
+ for (const c of r.children) t(c);
31
+ }
32
+ };
33
+ return t(e), n;
34
+ }
35
+ function _n(e) {
36
+ const n = {}, t = {};
37
+ let r;
38
+ for (const [s, i] of Object.entries(e))
39
+ i !== void 0 && (s === "ref" ? n[s] = i : s === "autoFocus" ? r = i : t[s] = i);
40
+ const c = r !== void 0 ? { autoFocus: r, ...t } : { ...t };
41
+ return { rootExtras: n, primaryFirstExtras: c, primaryRestExtras: t };
42
+ }
43
+ function an(e, n) {
44
+ if (n.primaries.length === 0) return {};
45
+ const t = n.primaries.indexOf(e);
46
+ return t === 0 ? n.primaryFirstExtras : t > 0 ? n.primaryRestExtras : {};
47
+ }
48
+ function ce(e, n, t) {
49
+ const r = {
50
+ ...cn(e.attrs),
51
+ ...n
52
+ };
53
+ if (e.tag === "textarea" && e.children.length > 0) {
54
+ const i = e.children.map((o) => o.kind === "text" ? o.value : "").join("");
55
+ return !("value" in r) && i.length > 0 && (r.defaultValue = i), { props: r, children: null };
56
+ }
57
+ if (e.children.some(
58
+ (i) => i.kind === "raw" && !(i.html in t.slots)
59
+ ))
60
+ return r.dangerouslySetInnerHTML = {
61
+ __html: e.children.map(ae).join("")
62
+ }, { props: r, children: null };
63
+ const s = e.children.map((i, o) => i.kind === "raw" && i.html in t.slots ? T(O, { key: o }, t.slots[i.html]) : le(i, o, t));
64
+ return { props: r, children: s };
65
+ }
66
+ function le(e, n, t) {
67
+ if (e.kind === "text")
68
+ return e.value in t.slots ? T(O, { key: n }, t.slots[e.value]) : e.value;
69
+ if (e.kind === "raw")
70
+ return e.html in t.slots ? T(O, { key: n }, t.slots[e.html]) : T("span", {
71
+ key: n,
72
+ dangerouslySetInnerHTML: { __html: e.html }
73
+ });
74
+ const { props: r, children: c } = ce(
75
+ e,
76
+ an(e, t),
77
+ t
78
+ );
79
+ return n !== void 0 && (r.key = n), c === null ? T(e.tag, r) : T(e.tag, r, ...c);
80
+ }
81
+ function l(e, n = {}, t = {}) {
82
+ if (e.kind !== "element")
83
+ return T(O, null, le(e, void 0, {
84
+ slots: t,
85
+ primaries: [],
86
+ primaryFirstExtras: {},
87
+ primaryRestExtras: {}
88
+ }));
89
+ const r = ln(e), c = r.length > 0 ? _n(n) : {
90
+ rootExtras: n,
91
+ primaryFirstExtras: {},
92
+ primaryRestExtras: {}
93
+ }, s = {
94
+ slots: t,
95
+ primaries: r,
96
+ primaryFirstExtras: c.primaryFirstExtras,
97
+ primaryRestExtras: c.primaryRestExtras
98
+ }, { props: i, children: o } = ce(e, c.rootExtras, s);
99
+ return o === null ? T(e.tag, i) : T(e.tag, i, ...o);
100
+ }
101
+ function _(e) {
102
+ const n = {};
103
+ for (const [t, r] of Object.entries(e))
104
+ r !== void 0 && (t === "ref" || t === "autoFocus" || t === "value" || t.startsWith("on")) && (n[t] = r);
105
+ return n;
106
+ }
107
+ function un(e, n) {
108
+ typeof e == "function" ? e(n) : e && (e.current = n);
109
+ }
110
+ function Tn(e) {
111
+ const { onBeforeDismiss: n, onDismiss: t, ref: r, ...c } = e;
112
+ f(() => {
113
+ ue();
114
+ }, []);
115
+ const s = C(null);
116
+ f(() => {
117
+ const o = s.current;
118
+ if (!(!o || !n))
119
+ return o.addEventListener(
120
+ b,
121
+ n
122
+ ), () => o.removeEventListener(
123
+ b,
124
+ n
125
+ );
126
+ }, [n]), f(() => {
127
+ const o = s.current;
128
+ if (!(!o || !t))
129
+ return o.addEventListener(v, t), () => o.removeEventListener(
130
+ v,
131
+ t
132
+ );
133
+ }, [t]);
134
+ const i = m(
135
+ (o) => {
136
+ s.current = o, un(r, o);
137
+ },
138
+ [r]
139
+ );
140
+ return l(de(e), {
141
+ ..._(c),
142
+ ref: i
143
+ });
144
+ }
145
+ function Ln(e) {
146
+ return l(
147
+ Se(e),
148
+ _(e)
149
+ );
150
+ }
151
+ function Rn(e) {
152
+ return l(
153
+ Ee(e),
154
+ _(e)
155
+ );
156
+ }
157
+ function dn(e, n) {
158
+ typeof e == "function" ? e(n) : e && (e.current = n);
159
+ }
160
+ function hn(e) {
161
+ const { onBeforeDismiss: n, onDismiss: t, ref: r, ...c } = e;
162
+ f(() => {
163
+ fe();
164
+ }, []);
165
+ const s = C(null);
166
+ f(() => {
167
+ const o = s.current;
168
+ if (!(!o || !n))
169
+ return o.addEventListener(
170
+ g,
171
+ n
172
+ ), () => o.removeEventListener(
173
+ g,
174
+ n
175
+ );
176
+ }, [n]), f(() => {
177
+ const o = s.current;
178
+ if (!(!o || !t))
179
+ return o.addEventListener(A, t), () => o.removeEventListener(
180
+ A,
181
+ t
182
+ );
183
+ }, [t]);
184
+ const i = m(
185
+ (o) => {
186
+ s.current = o, dn(r, o);
187
+ },
188
+ [r]
189
+ );
190
+ return l(Te(e), {
191
+ ..._(c),
192
+ ref: i
193
+ });
194
+ }
195
+ const p = "__SET_SLOT_BLOCKQUOTE_QUOTE__", P = "__SET_SLOT_BLOCKQUOTE_ATTRIBUTION__";
196
+ function On(e) {
197
+ const { align: n, attribution: t, id: r, measured: c, quote: s, responsive: i, size: o, ...a } = e, u = Le({
198
+ align: n,
199
+ attribution: P,
200
+ id: r,
201
+ measured: c,
202
+ quote: p,
203
+ responsive: i,
204
+ size: o
205
+ });
206
+ return l(
207
+ u,
208
+ _(a),
209
+ {
210
+ [p]: s,
211
+ [P]: t
212
+ }
213
+ );
214
+ }
215
+ const B = "__SET_SLOT_BOX_CHILDREN__";
216
+ function In(e) {
217
+ const {
218
+ background: n,
219
+ border: t,
220
+ children: r,
221
+ id: c,
222
+ paddingBlock: s,
223
+ paddingInline: i,
224
+ radius: o,
225
+ responsive: a,
226
+ surface: u,
227
+ ...d
228
+ } = e, S = r != null && r !== !1, E = Re({
229
+ background: n,
230
+ border: t,
231
+ children: S ? B : void 0,
232
+ id: c,
233
+ paddingBlock: s,
234
+ paddingInline: i,
235
+ radius: o,
236
+ responsive: a,
237
+ surface: u
238
+ });
239
+ return l(
240
+ E,
241
+ _(d),
242
+ {
243
+ ...S ? { [B]: r } : {}
244
+ }
245
+ );
246
+ }
247
+ function Nn(e) {
248
+ return l(
249
+ he(e),
250
+ _(e)
251
+ );
252
+ }
253
+ const k = "__SET_SLOT_CARD_DESCRIPTION__", F = "__SET_SLOT_CARD_NOTE__";
254
+ function Cn(e) {
255
+ const { description: n, headingLevel: t, href: r, id: c, note: s, surface: i, title: o, ...a } = e, u = s != null && s !== !1, d = Oe({
256
+ description: k,
257
+ headingLevel: t,
258
+ href: r,
259
+ id: c,
260
+ note: u ? F : void 0,
261
+ surface: i,
262
+ title: o
263
+ });
264
+ return l(
265
+ d,
266
+ _(a),
267
+ {
268
+ [k]: n,
269
+ ...u ? { [F]: s } : {}
270
+ }
271
+ );
272
+ }
273
+ function mn(e) {
274
+ return l(
275
+ Ie(e),
276
+ _(e)
277
+ );
278
+ }
279
+ const x = "__SET_SLOT_CONTAINER_CHILDREN__";
280
+ function Dn(e) {
281
+ const { children: n, gutter: t, id: r, maxInlineSize: c, ...s } = e, i = n != null && n !== !1, o = Ne({
282
+ children: i ? x : void 0,
283
+ gutter: t,
284
+ id: r,
285
+ maxInlineSize: c
286
+ });
287
+ return l(
288
+ o,
289
+ _(s),
290
+ {
291
+ ...i ? { [x]: n } : {}
292
+ }
293
+ );
294
+ }
295
+ const y = "__SET_SLOT_DETAILS_CHILDREN__";
296
+ function bn(e) {
297
+ const { children: n, id: t, inlineSize: r, open: c, summary: s, ...i } = e, o = n != null && n !== !1, a = Ce({
298
+ children: o ? y : void 0,
299
+ id: t,
300
+ inlineSize: r,
301
+ open: c,
302
+ summary: s
303
+ });
304
+ return l(
305
+ a,
306
+ _(i),
307
+ {
308
+ ...o ? { [y]: n } : {}
309
+ }
310
+ );
311
+ }
312
+ function vn(e) {
313
+ return l(
314
+ me(e),
315
+ _(e)
316
+ );
317
+ }
318
+ function gn(e) {
319
+ return l(
320
+ De(e),
321
+ _(e)
322
+ );
323
+ }
324
+ const w = "__SET_SLOT_FIELDSET_CHILDREN__";
325
+ function An(e) {
326
+ const {
327
+ children: n,
328
+ description: t,
329
+ disabled: r,
330
+ id: c,
331
+ invalid: s,
332
+ legend: i,
333
+ inlineSize: o,
334
+ ...a
335
+ } = e, u = n != null && n !== !1, d = be({
336
+ children: u ? w : void 0,
337
+ description: t,
338
+ disabled: r,
339
+ id: c,
340
+ invalid: s,
341
+ legend: i,
342
+ inlineSize: o
343
+ });
344
+ return l(
345
+ d,
346
+ _(a),
347
+ {
348
+ ...u ? { [w]: n } : {}
349
+ }
350
+ );
351
+ }
352
+ const G = "__SET_SLOT_FIGURE_CHILDREN__", M = "__SET_SLOT_FIGURE_CAPTION__";
353
+ function Hn(e) {
354
+ const { align: n, caption: t, children: r, id: c, responsive: s, ...i } = e, o = ve({
355
+ align: n,
356
+ caption: M,
357
+ children: G,
358
+ id: c,
359
+ responsive: s
360
+ });
361
+ return l(
362
+ o,
363
+ _(i),
364
+ {
365
+ [G]: r,
366
+ [M]: t
367
+ }
368
+ );
369
+ }
370
+ const U = "__SET_SLOT_GRID_CHILDREN__";
371
+ function pn(e) {
372
+ const { children: n, gap: t, id: r, ...c } = e, s = n != null && n !== !1, i = ge({
373
+ children: s ? U : void 0,
374
+ gap: t,
375
+ id: r
376
+ });
377
+ return l(
378
+ i,
379
+ _(c),
380
+ {
381
+ ...s ? { [U]: n } : {}
382
+ }
383
+ );
384
+ }
385
+ const z = "__SET_SLOT_GRID_ITEM_CHILDREN__";
386
+ function Pn(e) {
387
+ const {
388
+ children: n,
389
+ align: t,
390
+ justify: r,
391
+ colSpan: c,
392
+ colStart: s,
393
+ id: i,
394
+ rowSpan: o,
395
+ rowSpanNarrow: a,
396
+ rowSpanWide: u,
397
+ rowStart: d,
398
+ rowStartNarrow: S,
399
+ rowStartWide: E,
400
+ colSpanNarrow: L,
401
+ colStartNarrow: R,
402
+ colSpanWide: I,
403
+ colStartWide: h,
404
+ ...N
405
+ } = e, D = n != null && n !== !1, _e = Ae({
406
+ children: D ? z : void 0,
407
+ align: t,
408
+ justify: r,
409
+ colSpan: c,
410
+ colStart: s,
411
+ id: i,
412
+ rowSpan: o,
413
+ rowSpanNarrow: a,
414
+ rowSpanWide: u,
415
+ rowStart: d,
416
+ rowStartNarrow: S,
417
+ rowStartWide: E,
418
+ colSpanNarrow: L,
419
+ colStartNarrow: R,
420
+ colSpanWide: I,
421
+ colStartWide: h
422
+ });
423
+ return l(
424
+ _e,
425
+ _(N),
426
+ {
427
+ ...D ? { [z]: n } : {}
428
+ }
429
+ );
430
+ }
431
+ function Bn(e) {
432
+ return l(
433
+ He(e),
434
+ _(e)
435
+ );
436
+ }
437
+ function kn(e) {
438
+ return l(
439
+ pe(e),
440
+ _(e)
441
+ );
442
+ }
443
+ function Fn(e) {
444
+ return l(
445
+ Pe(e),
446
+ _(e)
447
+ );
448
+ }
449
+ const j = "__SET_SLOT_INLINE_CHILDREN__";
450
+ function xn(e) {
451
+ const { as: n, align: t, children: r, gap: c, id: s, justify: i, nowrap: o, ...a } = e, u = r != null && r !== !1, d = Be({
452
+ as: n,
453
+ align: t,
454
+ children: u ? j : void 0,
455
+ gap: c,
456
+ id: s,
457
+ justify: i,
458
+ nowrap: o
459
+ });
460
+ return l(
461
+ d,
462
+ _(a),
463
+ {
464
+ ...u ? { [j]: r } : {}
465
+ }
466
+ );
467
+ }
468
+ function yn(e) {
469
+ return l(
470
+ ke(e),
471
+ _(e)
472
+ );
473
+ }
474
+ const K = "__SET_SLOT_LINK_ICON__";
475
+ function wn(e) {
476
+ const {
477
+ appearance: n,
478
+ current: t,
479
+ download: r,
480
+ href: c,
481
+ id: s,
482
+ icon: i,
483
+ iconPlacement: o,
484
+ label: a,
485
+ labelVisibility: u,
486
+ rel: d,
487
+ size: S,
488
+ target: E,
489
+ tone: L,
490
+ underline: R,
491
+ ...I
492
+ } = e, h = i != null && i !== !1, N = Fe({
493
+ appearance: n,
494
+ current: t,
495
+ download: r,
496
+ href: c,
497
+ id: s,
498
+ icon: h ? K : void 0,
499
+ iconPlacement: o,
500
+ label: a,
501
+ labelVisibility: u,
502
+ rel: d,
503
+ size: S,
504
+ target: E,
505
+ tone: L,
506
+ underline: R
507
+ });
508
+ return l(
509
+ N,
510
+ _(I),
511
+ {
512
+ ...h ? { [K]: i } : {}
513
+ }
514
+ );
515
+ }
516
+ function Gn(e) {
517
+ return l(
518
+ xe(e),
519
+ _(e)
520
+ );
521
+ }
522
+ function Sn(e, n) {
523
+ typeof e == "function" ? e(n) : e && (e.current = n);
524
+ }
525
+ function Mn(e) {
526
+ const { onChoose: n, ref: t, ...r } = e;
527
+ f(() => {
528
+ ye();
529
+ }, []);
530
+ const c = C(null);
531
+ f(() => {
532
+ const i = c.current;
533
+ if (!(!i || !n))
534
+ return i.addEventListener(H, n), () => i.removeEventListener(H, n);
535
+ }, [n]);
536
+ const s = m(
537
+ (i) => {
538
+ c.current = i, Sn(t, i);
539
+ },
540
+ [t]
541
+ );
542
+ return l(we(e), {
543
+ ..._(r),
544
+ ref: s
545
+ });
546
+ }
547
+ function Un(e) {
548
+ return f(() => {
549
+ Ge();
550
+ }, []), l(
551
+ Me(e),
552
+ _(e)
553
+ );
554
+ }
555
+ const W = "__SET_SLOT_PAGE_BANNER__", V = "__SET_SLOT_PAGE_HEADER__", Q = "__SET_SLOT_PAGE_CHILDREN__", q = "__SET_SLOT_PAGE_FOOTER__";
556
+ function zn(e) {
557
+ const {
558
+ banner: n,
559
+ children: t,
560
+ centerMain: r,
561
+ header: c,
562
+ headerBorder: s,
563
+ headerSize: i,
564
+ id: o,
565
+ stickyHeader: a,
566
+ footer: u,
567
+ ...d
568
+ } = e, S = n != null && n !== !1, E = t != null && t !== !1, L = Ue({
569
+ banner: S ? W : void 0,
570
+ children: E ? Q : void 0,
571
+ centerMain: r,
572
+ header: V,
573
+ headerBorder: s,
574
+ headerSize: i,
575
+ id: o,
576
+ stickyHeader: a,
577
+ footer: q
578
+ });
579
+ return l(
580
+ L,
581
+ _(d),
582
+ {
583
+ ...S ? { [W]: n } : {},
584
+ [V]: c,
585
+ ...E ? { [Q]: t } : {},
586
+ [q]: u
587
+ }
588
+ );
589
+ }
590
+ const X = "__SET_SLOT_PANEL_CHILDREN__";
591
+ function jn(e) {
592
+ const { children: n, id: t, padding: r, surface: c, ...s } = e, i = n != null && n !== !1, o = ze({
593
+ children: i ? X : void 0,
594
+ id: t,
595
+ padding: r,
596
+ surface: c
597
+ });
598
+ return l(
599
+ o,
600
+ _(s),
601
+ {
602
+ ...i ? { [X]: n } : {}
603
+ }
604
+ );
605
+ }
606
+ const $ = "__SET_SLOT_PATTERN_CHILDREN__";
607
+ function Kn(e) {
608
+ const { children: n, id: t, tone: r, size: c, variant: s, ...i } = e, o = n != null && n !== !1, a = je({
609
+ children: o ? $ : void 0,
610
+ id: t,
611
+ tone: r,
612
+ size: c,
613
+ variant: s
614
+ });
615
+ return l(
616
+ a,
617
+ _(i),
618
+ {
619
+ ...o ? { [$]: n } : {}
620
+ }
621
+ );
622
+ }
623
+ const Y = "__SET_SLOT_POSTER_MEDIA__", J = "__SET_SLOT_POSTER_CHILDREN__";
624
+ function Wn(e) {
625
+ const { children: n, contentTheme: t, id: r, media: c, surface: s, ...i } = e, o = n != null && n !== !1, a = Ke({
626
+ children: o ? J : void 0,
627
+ contentTheme: t,
628
+ id: r,
629
+ media: Y,
630
+ surface: s
631
+ });
632
+ return l(
633
+ a,
634
+ _(i),
635
+ {
636
+ [Y]: c,
637
+ ...o ? { [J]: n } : {}
638
+ }
639
+ );
640
+ }
641
+ const Z = "__SET_SLOT_PROSE_CHILDREN__";
642
+ function Vn(e) {
643
+ const {
644
+ children: n,
645
+ align: t,
646
+ hangingPunctuation: r,
647
+ id: c,
648
+ measured: s,
649
+ responsive: i,
650
+ ...o
651
+ } = e, a = We({
652
+ children: Z,
653
+ align: t,
654
+ hangingPunctuation: r,
655
+ id: c,
656
+ measured: s,
657
+ responsive: i
658
+ });
659
+ return l(
660
+ a,
661
+ _(o),
662
+ {
663
+ [Z]: n
664
+ }
665
+ );
666
+ }
667
+ function Qn(e) {
668
+ return l(
669
+ Ve(e),
670
+ _(e)
671
+ );
672
+ }
673
+ function qn(e) {
674
+ return f(() => {
675
+ Qe();
676
+ }, []), l(
677
+ qe(e),
678
+ _(e)
679
+ );
680
+ }
681
+ const ee = "__SET_SLOT_ROOT_CHILDREN__";
682
+ function Xn(e) {
683
+ const {
684
+ appOverscrollBehavior: n,
685
+ appRoot: t,
686
+ brand: r,
687
+ children: c,
688
+ dir: s,
689
+ id: i,
690
+ lang: o,
691
+ theme: a,
692
+ ...u
693
+ } = e, d = Xe({
694
+ appOverscrollBehavior: n,
695
+ appRoot: t,
696
+ brand: r,
697
+ children: ee,
698
+ dir: s,
699
+ id: i,
700
+ lang: o,
701
+ theme: a
702
+ });
703
+ return l(
704
+ d,
705
+ _(u),
706
+ {
707
+ [ee]: c
708
+ }
709
+ );
710
+ }
711
+ const ne = "__SET_SLOT_SIDEBAR_HEADER__", te = "__SET_SLOT_SIDEBAR_CHILDREN__", re = "__SET_SLOT_SIDEBAR_FOOTER__";
712
+ function $n(e) {
713
+ const {
714
+ aboveNotebook: n,
715
+ buttonSize: t,
716
+ children: r,
717
+ collapseLabel: c,
718
+ footer: s,
719
+ header: i,
720
+ id: o,
721
+ surface: a,
722
+ triggerLabel: u,
723
+ ...d
724
+ } = e, S = i != null && i !== !1, E = r != null && r !== !1, L = s != null && s !== !1, R = $e({
725
+ aboveNotebook: n,
726
+ buttonSize: t,
727
+ children: E ? te : void 0,
728
+ collapseLabel: c,
729
+ footer: L ? re : void 0,
730
+ header: S ? ne : void 0,
731
+ id: o,
732
+ surface: a,
733
+ triggerLabel: u
734
+ });
735
+ return f(() => {
736
+ Ye();
737
+ }, []), l(
738
+ R,
739
+ _(d),
740
+ {
741
+ ...S ? { [ne]: i } : {},
742
+ ...E ? { [te]: r } : {},
743
+ ...L ? { [re]: s } : {}
744
+ }
745
+ );
746
+ }
747
+ function Yn(e) {
748
+ return l(
749
+ Je(e),
750
+ _(e)
751
+ );
752
+ }
753
+ const ie = "__SET_SLOT_STACK_CHILDREN__";
754
+ function Jn(e) {
755
+ const { align: n, as: t, children: r, gap: c, id: s, responsive: i, ...o } = e, a = r != null && r !== !1, u = Ze({
756
+ align: n,
757
+ as: t,
758
+ children: a ? ie : void 0,
759
+ gap: c,
760
+ id: s,
761
+ responsive: i
762
+ });
763
+ return l(
764
+ u,
765
+ _(o),
766
+ {
767
+ ...a ? { [ie]: r } : {}
768
+ }
769
+ );
770
+ }
771
+ const oe = "__SET_SLOT_SURFACE_CHILDREN__";
772
+ function Zn(e) {
773
+ const { children: n, contentTheme: t, id: r, variant: c, ...s } = e, i = en({
774
+ children: oe,
775
+ contentTheme: t,
776
+ id: r,
777
+ variant: c
778
+ });
779
+ return l(
780
+ i,
781
+ _(s),
782
+ {
783
+ [oe]: n
784
+ }
785
+ );
786
+ }
787
+ function et(e) {
788
+ return l(
789
+ nn(e),
790
+ _(e)
791
+ );
792
+ }
793
+ const se = "__SET_SLOT_TEXT_CHILDREN__";
794
+ function nt(e) {
795
+ const {
796
+ as: n,
797
+ children: t,
798
+ id: r,
799
+ linkVisited: c,
800
+ responsive: s,
801
+ align: i,
802
+ measured: o,
803
+ size: a,
804
+ tone: u,
805
+ ...d
806
+ } = e, S = tn({
807
+ as: n,
808
+ children: se,
809
+ id: r,
810
+ linkVisited: c,
811
+ responsive: s,
812
+ align: i,
813
+ measured: o,
814
+ size: a,
815
+ tone: u
816
+ });
817
+ return l(
818
+ S,
819
+ _(d),
820
+ {
821
+ [se]: t
822
+ }
823
+ );
824
+ }
825
+ function tt(e) {
826
+ return l(
827
+ rn(e),
828
+ _(e)
829
+ );
830
+ }
831
+ export {
832
+ Tn as Alert,
833
+ Ln as Avatar,
834
+ Rn as Badge,
835
+ hn as Banner,
836
+ On as Blockquote,
837
+ In as Box,
838
+ Nn as Button,
839
+ Cn as Card,
840
+ mn as Checkbox,
841
+ Dn as Container,
842
+ bn as Details,
843
+ vn as Divider,
844
+ gn as Expander,
845
+ An as Fieldset,
846
+ Hn as Figure,
847
+ pn as Grid,
848
+ Pn as GridItem,
849
+ Bn as Heading,
850
+ kn as Icon,
851
+ Fn as Image,
852
+ xn as Inline,
853
+ yn as Input,
854
+ wn as Link,
855
+ Gn as Logo,
856
+ Mn as Menu,
857
+ Un as Nav,
858
+ zn as Page,
859
+ jn as Panel,
860
+ Kn as Pattern,
861
+ Wn as Poster,
862
+ Vn as Prose,
863
+ Qn as Radios,
864
+ qn as Range,
865
+ Xn as Root,
866
+ $n as Sidebar,
867
+ Yn as Spinner,
868
+ Jn as Stack,
869
+ Zn as Surface,
870
+ et as Switch,
871
+ nt as Text,
872
+ tt as Textarea,
873
+ ot as defineSetAll
874
+ };
875
+ //# sourceMappingURL=index.js.map