@monospaced/set-react 0.22.0 → 0.24.0

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