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