@tempots/beatui 0.38.0 → 0.40.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 (102) hide show
  1. package/dist/{2019-DxwU2aOm.cjs → 2019-nWH_nAwT.cjs} +1 -1
  2. package/dist/{2019-CGWicU9n.js → 2019-sCKLAY8c.js} +2 -2
  3. package/dist/{2020-BRNvbMGL.js → 2020-B4xCW_nu.js} +2 -2
  4. package/dist/{2020-DHep9dU6.cjs → 2020-D7RWX09D.cjs} +1 -1
  5. package/dist/{ar-CqAHPRKu.cjs → ar-D_4BfIJO.cjs} +1 -1
  6. package/dist/{ar-avevuYiW.js → ar-i2uHmy8P.js} +1 -1
  7. package/dist/auth/index.cjs.js +1 -1
  8. package/dist/auth/index.es.js +54 -49
  9. package/dist/beatui.css +463 -59
  10. package/dist/beatui.tailwind.css +463 -59
  11. package/dist/{de--4OtRESW.cjs → de-C0PZz9sE.cjs} +1 -1
  12. package/dist/{de-Cz7ah611.js → de-CeLwmVZz.js} +1 -1
  13. package/dist/{es-CE1wRgxl.cjs → es-C8qT1ins.cjs} +1 -1
  14. package/dist/{es-CiNQQzF1.js → es-DxOgARww.js} +1 -1
  15. package/dist/{fa-Gkt0b9XN.js → fa-B9pEff8A.js} +1 -1
  16. package/dist/{fa-DjuJZNLK.cjs → fa-BFV9MxMX.cjs} +1 -1
  17. package/dist/{fr-DotyzMGL.cjs → fr-BBx5IJ7G.cjs} +1 -1
  18. package/dist/{fr-xM9p9Q6G.js → fr-Caeevx56.js} +1 -1
  19. package/dist/{he-BQ6ygVEQ.cjs → he-CMOvd4Dr.cjs} +1 -1
  20. package/dist/{he-CoO6PsiS.js → he-DeN-WW3u.js} +1 -1
  21. package/dist/{hi-DA3-4Cdo.js → hi-Dey2HxiD.js} +1 -1
  22. package/dist/{hi-BCfJ0mRh.cjs → hi-IOU_PzvH.cjs} +1 -1
  23. package/dist/{index-CesoPnvj.cjs → index-B-SyWyCc.cjs} +1 -1
  24. package/dist/{index-DJJ67-RV.js → index-B-pudlMv.js} +58 -58
  25. package/dist/{index-Dtqe3URb.cjs → index-B0ff5lT-.cjs} +4 -4
  26. package/dist/{index-i9pAnFtS.js → index-BTZqW3-b.js} +1245 -1232
  27. package/dist/{index-C5-BM51Y.cjs → index-C2VAPX2b.cjs} +1 -1
  28. package/dist/{index-DjShJtXp.js → index-CAeOFdez.js} +1 -1
  29. package/dist/{index-BI5w0jSz.js → index-CBT2SLat.js} +224 -223
  30. package/dist/{index-Bv2gn_kV.cjs → index-ClFVnBUS.cjs} +3 -3
  31. package/dist/{index-CCu0qfNP.cjs → index-D8fg48Fv.cjs} +1 -1
  32. package/dist/{index-C_nSdynJ.js → index-DJqo6Guq.js} +1 -1
  33. package/dist/{index-CZQHL_pf.cjs → index-Dtka01mK.cjs} +12 -12
  34. package/dist/{index-C2rz3G1d.js → index-HqWBd-jW.js} +680 -677
  35. package/dist/{index-D41aREgo.js → index-IQ3lRaL0.js} +1 -1
  36. package/dist/{index-CKyH3jwP.cjs → index-KPHFBjQB.cjs} +1 -1
  37. package/dist/index.cjs.js +4 -4
  38. package/dist/index.es.js +3349 -3064
  39. package/dist/{it-EdPuWBJR.js → it-DghnQdZa.js} +1 -1
  40. package/dist/{it-pv2Gm3jb.cjs → it-uQF0jkDT.cjs} +1 -1
  41. package/dist/{ja-CuRaPMgh.cjs → ja-BJD6uPbl.cjs} +1 -1
  42. package/dist/{ja-BSRCR430.js → ja-Kb7rxmFg.js} +1 -1
  43. package/dist/json-schema/index.cjs.js +1 -1
  44. package/dist/json-schema/index.es.js +1 -1
  45. package/dist/{ko-Dm4oD1fh.js → ko-53o5WJ-v.js} +1 -1
  46. package/dist/{ko-C7YP1PL4.cjs → ko-B7bLdRnp.cjs} +1 -1
  47. package/dist/markdown/index.cjs.js +1 -1
  48. package/dist/markdown/index.es.js +1 -1
  49. package/dist/modal-BRUgTJG9.cjs +1 -0
  50. package/dist/modal-_2B8vIo0.js +658 -0
  51. package/dist/{nl-ClCD6lP-.cjs → nl-CJE0fC8g.cjs} +1 -1
  52. package/dist/{nl-B0l1kdfd.js → nl-DvUVT7xd.js} +1 -1
  53. package/dist/{notice-BuYqG6zM.js → notice-C4n5jXi6.js} +408 -391
  54. package/dist/notice-CncwkUTy.cjs +2 -0
  55. package/dist/{pl-DVKneBSY.js → pl-C3oYeTwf.js} +1 -1
  56. package/dist/{pl-fyCkqVrr.cjs → pl-DUaY5slY.cjs} +1 -1
  57. package/dist/prosemirror/index.cjs.js +1 -1
  58. package/dist/prosemirror/index.es.js +1 -1
  59. package/dist/{pt-BHExG3lf.cjs → pt-BAqNKCuy.cjs} +1 -1
  60. package/dist/{pt-Bw0sTDOX.js → pt-BJGeScun.js} +1 -1
  61. package/dist/{ru-B26VQ4f9.js → ru-2irv1YXp.js} +1 -1
  62. package/dist/{ru-PuEOLDw1.cjs → ru-CAlgJm3K.cjs} +1 -1
  63. package/dist/tailwind/index.cjs.js +1 -1
  64. package/dist/tailwind/index.es.js +1 -1
  65. package/dist/tailwind/preset.cjs.js +1 -1
  66. package/dist/tailwind/preset.es.js +1 -1
  67. package/dist/tailwind/vite-plugin.cjs.js +1 -1
  68. package/dist/tailwind/vite-plugin.es.js +1 -1
  69. package/dist/{toolbar-kwkvH3nX.cjs → toolbar-B7HrL0vD.cjs} +1 -1
  70. package/dist/{toolbar-ClJbaKID.js → toolbar-CVDXVnje.js} +1 -1
  71. package/dist/{tr-DQMivdvy.js → tr-CkHLE5u7.js} +1 -1
  72. package/dist/{tr-CI97fTpD.cjs → tr-DMiXAhok.cjs} +1 -1
  73. package/dist/{translations-iam7PITs.js → translations-DEEflRUY.js} +96 -112
  74. package/dist/{translations-ZB5oDFId.cjs → translations-DRNj0YIi.cjs} +1 -1
  75. package/dist/translations-Dw1oO6Dh.cjs +1 -0
  76. package/dist/{translations-1yD6Rm5l.js → translations-Q5C5LyIi.js} +1 -1
  77. package/dist/types/components/beatui.d.ts +4 -1
  78. package/dist/types/components/button/button.d.ts +4 -3
  79. package/dist/types/components/form/input/input-wrapper.d.ts +2 -1
  80. package/dist/types/components/misc/index.d.ts +4 -0
  81. package/dist/types/components/misc/notification-provider.d.ts +47 -0
  82. package/dist/types/components/misc/notification.d.ts +17 -0
  83. package/dist/types/components/misc/opengraph.d.ts +111 -0
  84. package/dist/types/components/navigation/link/button-link.d.ts +2 -0
  85. package/dist/types/components/overlay/lightbox.d.ts +1 -1
  86. package/dist/types/components/overlay/modal.d.ts +2 -2
  87. package/dist/types/components/overlay/ribbon.d.ts +2 -2
  88. package/dist/types/utils/use-animated-toggle.d.ts +43 -9
  89. package/dist/{ur-B3CiO8KH.cjs → ur-BjiNs3SL.cjs} +1 -1
  90. package/dist/{ur-o3rog5MJ.js → ur-bxBR_9Z-.js} +1 -1
  91. package/dist/{utils-B_QSuN66.js → utils-BCbc19N0.js} +202 -193
  92. package/dist/utils-BJZipnfW.cjs +1 -0
  93. package/dist/{vi-FibsLfdk.cjs → vi-CByOZvV2.cjs} +1 -1
  94. package/dist/{vi-C7cb2K_B.js → vi-CKknZqol.js} +1 -1
  95. package/dist/{zh-BtSj_Euh.cjs → zh-C0QOebEA.cjs} +1 -1
  96. package/dist/{zh-NGrfqAHM.js → zh-CmUgcP9o.js} +1 -1
  97. package/package.json +4 -3
  98. package/dist/modal--1g8Y5LH.js +0 -601
  99. package/dist/modal-mA_AFUCI.cjs +0 -1
  100. package/dist/notice-DCuZEAQO.cjs +0 -2
  101. package/dist/translations-DQxg-W9w.cjs +0 -1
  102. package/dist/utils-BD6NGV1v.cjs +0 -1
@@ -1,11 +1,11 @@
1
- import { Use as j, coalesce as G, aria as P, attr as o, html as b, on as I, Value as C, Empty as _, computedOf as w, When as O, dataAttr as H, input as se, emitValue as $, prop as T, Fragment as B, emitValueAsNumber as te, Unless as ne, Ensure as ie } from "@tempots/dom";
2
- import { a as q, B as re, I as N, b as U, C as J } from "./translations-iam7PITs.js";
3
- const R = /* @__PURE__ */ new Map();
4
- function Q(e) {
5
- const s = R.get(e) ?? 0;
6
- return R.set(e, s + 1), `${e}-${s}`;
1
+ import { Use as q, coalesce as J, aria as B, attr as o, html as b, on as E, Value as y, Empty as _, computedOf as C, OnDispose as Q, When as O, dataAttr as U, input as ne, emitValue as x, prop as I, Fragment as F, emitValueAsNumber as ie, Unless as ae, Ensure as re } from "@tempots/dom";
2
+ import { a as z, B as le, I as N, b as R, C as X } from "./translations-DEEflRUY.js";
3
+ const W = /* @__PURE__ */ new Map();
4
+ function Y(e) {
5
+ const s = W.get(e) ?? 0;
6
+ return W.set(e, s + 1), `${e}-${s}`;
7
7
  }
8
- const k = {
8
+ const S = {
9
9
  /**
10
10
  * Creates a loading state.
11
11
  * @param previousValue - The previous value.
@@ -84,7 +84,7 @@ const k = {
84
84
  * @public
85
85
  */
86
86
  getOrElse(e, s) {
87
- return k.isSuccess(e) ? e.value : s;
87
+ return S.isSuccess(e) ? e.value : s;
88
88
  },
89
89
  /**
90
90
  * Gets the value if the result is a success; otherwise, returns the value from the alternative function.
@@ -95,7 +95,7 @@ const k = {
95
95
  * function.
96
96
  */
97
97
  getOrElseLazy(e, s) {
98
- return k.isSuccess(e) ? e.value : s();
98
+ return S.isSuccess(e) ? e.value : s();
99
99
  },
100
100
  /**
101
101
  * Gets the value if the result is a success; otherwise, returns `null`.
@@ -104,7 +104,7 @@ const k = {
104
104
  * @public
105
105
  */
106
106
  getOrNull(e) {
107
- return k.isSuccess(e) ? e.value : null;
107
+ return S.isSuccess(e) ? e.value : null;
108
108
  },
109
109
  /**
110
110
  * Gets the value if the result is a success; otherwise, returns `undefined`.
@@ -113,7 +113,7 @@ const k = {
113
113
  * @public
114
114
  */
115
115
  getOrUndefined(e) {
116
- return k.isSuccess(e) ? e.value : void 0;
116
+ return S.isSuccess(e) ? e.value : void 0;
117
117
  },
118
118
  /**
119
119
  * Gets the value of a `AsyncResult` if it is a `Success`, otherwise it throws the error contained in the `Failure`.
@@ -121,9 +121,9 @@ const k = {
121
121
  * @returns The value of the `AsyncResult` if it is a `Success`.
122
122
  */
123
123
  getUnsafe: (e) => {
124
- if (k.isSuccess(e))
124
+ if (S.isSuccess(e))
125
125
  return e.value;
126
- throw k.isFailure(e) ? e.error : new Error("Cannot get value from a not-asked or loading result");
126
+ throw S.isFailure(e) ? e.error : new Error("Cannot get value from a not-asked or loading result");
127
127
  },
128
128
  /**
129
129
  * Based on the state of the result, it picks the appropriate function to call and returns the result.
@@ -139,7 +139,7 @@ const k = {
139
139
  failure: t,
140
140
  loading: i,
141
141
  notAsked: n = i
142
- }) => k.isSuccess(e) ? s(e.value) : k.isFailure(e) ? t(e.error) : k.isNotAsked(e) ? n() : i(e.previousValue),
142
+ }) => S.isSuccess(e) ? s(e.value) : S.isFailure(e) ? t(e.error) : S.isNotAsked(e) ? n() : i(e.previousValue),
143
143
  /**
144
144
  * When the result is a success, it applies the function to the value.
145
145
  *
@@ -148,7 +148,7 @@ const k = {
148
148
  * @returns The result that was passed in.
149
149
  * @public
150
150
  */
151
- whenSuccess: (e, s) => (k.isSuccess(e) && s(e.value), e),
151
+ whenSuccess: (e, s) => (S.isSuccess(e) && s(e.value), e),
152
152
  /**
153
153
  * When the result is a failure, it applies the function to the error.
154
154
  *
@@ -157,7 +157,7 @@ const k = {
157
157
  * @returns The result that was passed in.
158
158
  * @public
159
159
  */
160
- whenFailure: (e, s) => (k.isFailure(e) && s(e.error), e),
160
+ whenFailure: (e, s) => (S.isFailure(e) && s(e.error), e),
161
161
  /**
162
162
  * Compares two results for equality.
163
163
  * @param r1 - The first result.
@@ -177,11 +177,11 @@ const k = {
177
177
  all: (e) => {
178
178
  const s = [];
179
179
  for (const t of e)
180
- if (k.isSuccess(t))
180
+ if (S.isSuccess(t))
181
181
  s.push(t.value);
182
182
  else
183
183
  return t;
184
- return k.success(s);
184
+ return S.success(s);
185
185
  },
186
186
  /**
187
187
  * Converts a Promise to an AsyncResult.
@@ -191,12 +191,12 @@ const k = {
191
191
  ofPromise: async (e) => {
192
192
  try {
193
193
  const s = await e;
194
- return k.success(s);
194
+ return S.success(s);
195
195
  } catch (s) {
196
- return k.failure(s instanceof Error ? s : new Error(String(s)));
196
+ return S.failure(s instanceof Error ? s : new Error(String(s)));
197
197
  }
198
198
  }
199
- }, F = (e, s) => e === s || e !== e && s !== s, D = {
199
+ }, P = (e, s) => e === s || e !== e && s !== s, D = {
200
200
  /**
201
201
  * Creates a valid `Validation`.
202
202
  * @returns A `Validation` that is `Valid`.
@@ -308,8 +308,8 @@ const k = {
308
308
  toAsync(e) {
309
309
  return m.match(
310
310
  e,
311
- (s) => k.success(s),
312
- (s) => k.failure(s)
311
+ (s) => S.success(s),
312
+ (s) => S.failure(s)
313
313
  );
314
314
  },
315
315
  /**
@@ -420,14 +420,14 @@ const k = {
420
420
  e,
421
421
  (n) => m.match(
422
422
  s,
423
- (r) => m.success(t(n, r)),
424
- (r) => m.failure(r)
423
+ (a) => m.success(t(n, a)),
424
+ (a) => m.failure(a)
425
425
  ),
426
426
  (n) => m.match(
427
427
  s,
428
428
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
429
- (r) => m.failure(n),
430
- (r) => m.failure(i(n, r))
429
+ (a) => m.failure(n),
430
+ (a) => m.failure(i(n, a))
431
431
  )
432
432
  ),
433
433
  /**
@@ -456,55 +456,55 @@ const k = {
456
456
  return m.success(s);
457
457
  }
458
458
  };
459
- function ae({
459
+ function ce({
460
460
  size: e = "sm",
461
461
  icon: s = "line-md:close",
462
462
  disabled: t,
463
463
  roundedness: i = "full",
464
464
  color: n = "base",
465
- onClick: r,
466
- label: a
467
- }, ...l) {
468
- return j(q, (c) => {
469
- const p = G(a, c.$.closeModal);
470
- return re(
465
+ onClick: a,
466
+ label: l
467
+ }, ...r) {
468
+ return q(z, (c) => {
469
+ const f = J(l, c.$.closeModal);
470
+ return le(
471
471
  {
472
472
  variant: "text",
473
473
  size: e,
474
474
  roundedness: i,
475
475
  disabled: t,
476
476
  color: n,
477
- onClick: r
477
+ onClick: a
478
478
  },
479
- o.title(p),
480
- P.label(p),
481
- ...l,
479
+ o.title(f),
480
+ B.label(f),
481
+ ...r,
482
482
  N({ icon: s, size: e ?? "sm" })
483
483
  );
484
484
  });
485
485
  }
486
- function z(e) {
486
+ function H(e) {
487
487
  return `bc-label bc-label--${e}`;
488
488
  }
489
- const Ie = (...e) => b.span(o.class(z("emphasis")), ...e), le = (...e) => b.span(o.class(z("default")), ...e), ce = (...e) => b.span(o.class(z("muted")), ...e), Te = (...e) => b.span(o.class(z("danger")), ...e), Ae = (e) => {
489
+ const Ae = (...e) => b.span(o.class(H("emphasis")), ...e), oe = (...e) => b.span(o.class(H("default")), ...e), ue = (...e) => b.span(o.class(H("muted")), ...e), Ve = (...e) => b.span(o.class(H("danger")), ...e), Oe = (e) => {
490
490
  const {
491
491
  value: s,
492
492
  onBlur: t,
493
493
  onChange: i,
494
494
  placeholder: n,
495
- disabled: r,
496
- id: a,
497
- checkedIcon: l,
495
+ disabled: a,
496
+ id: l,
497
+ checkedIcon: r,
498
498
  uncheckedIcon: c,
499
- iconSize: p = "lg"
500
- } = e, u = a ?? Q("checkbox"), g = `${u}-label`, S = () => {
501
- if (C.get(r ?? !1)) return;
502
- const h = C.get(s);
499
+ iconSize: f = "lg"
500
+ } = e, u = l ?? Y("checkbox"), g = `${u}-label`, w = () => {
501
+ if (y.get(a ?? !1)) return;
502
+ const h = y.get(s);
503
503
  i?.(!h);
504
504
  }, v = (h) => {
505
- C.get(r ?? !1) || (h.key === " " || h.key === "Enter") && (h.preventDefault(), S());
505
+ y.get(a ?? !1) || (h.key === " " || h.key === "Enter") && (h.preventDefault(), w());
506
506
  };
507
- return U(
507
+ return R(
508
508
  {
509
509
  baseContainer: !0,
510
510
  growInput: !1,
@@ -514,179 +514,187 @@ const Ie = (...e) => b.span(o.class(z("emphasis")), ...e), le = (...e) => b.span
514
514
  b.span(
515
515
  o.class("bc-checkbox-input__checkbox"),
516
516
  o.class(
517
- C.map(
517
+ y.map(
518
518
  s,
519
519
  (h) => h ? "bc-checkbox-input__checkbox--checked" : "bc-checkbox-input__checkbox--unchecked"
520
520
  )
521
521
  ),
522
522
  o.class(
523
- C.map(
524
- r ?? !1,
523
+ y.map(
524
+ a ?? !1,
525
525
  (h) => h ? "bc-checkbox-input__checkbox--disabled" : ""
526
526
  )
527
527
  ),
528
528
  o.id(u),
529
529
  o.role("checkbox"),
530
530
  o.tabindex(
531
- C.map(
532
- r ?? !1,
531
+ y.map(
532
+ a ?? !1,
533
533
  (h) => h ? -1 : 0
534
534
  )
535
535
  ),
536
- P.checked(s),
537
- P.disabled(r),
538
- n != null ? P.labelledby(g) : _,
539
- I.keydown(v),
540
- t != null ? I.blur(t) : _,
536
+ B.checked(s),
537
+ B.disabled(a),
538
+ n != null ? B.labelledby(g) : _,
539
+ E.keydown(v),
540
+ t != null ? E.blur(t) : _,
541
541
  N({
542
- icon: w(
542
+ icon: C(
543
543
  s,
544
- l,
544
+ r,
545
545
  c
546
546
  )(
547
- (h, d, f) => h ? d ?? "akar-icons/check-box-fill" : f ?? "akar-icons/box"
547
+ (h, d, p) => h ? d ?? "akar-icons/check-box-fill" : p ?? "akar-icons/box"
548
548
  ),
549
549
  accessibility: "decorative",
550
- size: p
550
+ size: f
551
551
  })
552
552
  ),
553
553
  n != null ? b.label(
554
554
  o.class("bc-checkbox-input__label"),
555
555
  o.id(g),
556
556
  o.for(u),
557
- ce(n)
557
+ ue(n)
558
558
  ) : _
559
559
  )
560
560
  },
561
- I.click(S)
561
+ E.click(w)
562
562
  );
563
- }, oe = b.span(
563
+ }, he = b.span(
564
564
  o.class("bc-input-wrapper__required"),
565
565
  " *"
566
566
  );
567
- function ue(e) {
567
+ function de(e) {
568
568
  const s = ["bc-input-wrapper"];
569
569
  return e !== "vertical" && s.push(`bc-input-wrapper--${e}`), s.join(" ");
570
570
  }
571
- function he(e, s) {
571
+ function pe(e, s) {
572
572
  const t = ["bc-input-wrapper__label-text"];
573
573
  return e ? t.push("bc-input-wrapper__label-text--error") : s ? t.push("bc-input-wrapper__label-text--disabled") : t.push("bc-input-wrapper__label-text--default"), t.join(" ");
574
574
  }
575
- function W(e, s) {
575
+ function K(e, s) {
576
576
  if (e === "horizontal-fixed" && s != null)
577
577
  return `--input-wrapper-label-width: ${s}`;
578
578
  }
579
- const X = ({
580
- required: e,
581
- label: s,
582
- labelChildren: t,
583
- context: i,
584
- description: n,
585
- content: r,
586
- error: a,
587
- labelFor: l,
588
- hasError: c,
589
- disabled: p,
590
- layout: u,
591
- labelWidth: g
592
- }, ...S) => {
593
- const v = c ?? a != null, h = p ?? !1, d = u ?? "vertical", f = Q("input-wrapper"), E = n ? `${f}-description` : void 0, A = a != null ? `${f}-error` : void 0, x = w(d)((y) => y !== "vertical");
579
+ const Z = ({
580
+ fullWidth: e = !1,
581
+ required: s,
582
+ label: t,
583
+ labelChildren: i,
584
+ context: n,
585
+ description: a,
586
+ content: l,
587
+ error: r,
588
+ labelFor: c,
589
+ hasError: f,
590
+ disabled: u,
591
+ layout: g,
592
+ labelWidth: w
593
+ }, ...v) => {
594
+ const h = f ?? r != null, d = u ?? !1, p = g ?? "vertical", T = Y("input-wrapper"), A = a ? `${T}-description` : void 0, $ = r != null ? `${T}-error` : void 0, L = C(p)((k) => k !== "vertical");
594
595
  return b.div(
595
- o.class(C.map(d, (y) => ue(y))),
596
+ Q(L),
597
+ o.class(y.map(p, (k) => de(k))),
598
+ o.class(
599
+ y.map(
600
+ e,
601
+ (k) => k ? "bc-input-wrapper--full-width" : ""
602
+ )
603
+ ),
596
604
  O(
597
- w(
598
- d,
599
- g ?? void 0
600
- )((y, V) => W(y, V) != null),
605
+ C(
606
+ p,
607
+ w ?? void 0
608
+ )((k, V) => K(k, V) != null),
601
609
  () => o.style(
602
- C.map(
603
- w(
604
- d,
605
- g ?? void 0
606
- )((y, V) => W(y, V)),
607
- (y) => y
610
+ y.map(
611
+ C(
612
+ p,
613
+ w ?? void 0
614
+ )((k, V) => K(k, V)),
615
+ (k) => k
608
616
  )
609
617
  )
610
618
  ),
611
- s != null || i != null ? b.div(
619
+ t != null || n != null ? b.div(
612
620
  o.class("bc-input-wrapper__header"),
613
621
  b.div(
614
622
  o.class("bc-input-wrapper__label-section"),
615
623
  b.label(
616
624
  o.class("bc-input-wrapper__label"),
617
- l != null ? o.for(l) : _,
625
+ c != null ? o.for(c) : _,
618
626
  b.span(
619
627
  o.class(
620
- w(
621
- v,
622
- h
628
+ C(
629
+ h,
630
+ d
623
631
  )(
624
- (y, V) => he(
625
- y ?? !1,
632
+ (k, V) => pe(
633
+ k ?? !1,
626
634
  V ?? !1
627
635
  )
628
636
  )
629
637
  ),
630
- s
638
+ t
631
639
  ),
632
- s != null && e ? oe : _
640
+ t != null && s ? he : _
633
641
  ),
634
642
  // Show description under label when horizontal
635
643
  O(
636
- w(
637
- x,
638
- n
639
- )((y, V) => y && V != null),
644
+ C(
645
+ L,
646
+ a
647
+ )((k, V) => k && V != null),
640
648
  () => b.div(
641
649
  o.class(
642
650
  "bc-input-wrapper__description bc-input-wrapper__description--under-label"
643
651
  ),
644
- o.id(E),
645
- n
652
+ o.id(A),
653
+ a
646
654
  )
647
655
  )
648
656
  ),
649
- i != null ? le(i) : _,
650
- t
657
+ n != null ? oe(n) : _,
658
+ i
651
659
  ) : _,
652
660
  b.div(
653
661
  o.class("bc-input-wrapper__content"),
654
662
  // Add data attributes to help inputs inherit accessibility information
655
- [E, A].filter(Boolean).length > 0 ? H.describedby(
656
- [E, A].filter(Boolean).join(" ")
663
+ [A, $].filter(Boolean).length > 0 ? U.describedby(
664
+ [A, $].filter(Boolean).join(" ")
657
665
  ) : _,
658
- e ? H.required("true") : _,
659
- O(v, () => H.invalid("true")),
660
- r
666
+ s ? U.required("true") : _,
667
+ O(h, () => U.invalid("true")),
668
+ l
661
669
  ),
662
670
  // Show description at bottom only when not horizontal
663
671
  O(
664
- w(x, n)((y, V) => !y && V != null),
672
+ C(L, a)((k, V) => !k && V != null),
665
673
  () => b.div(
666
674
  o.class("bc-input-wrapper__description"),
667
- o.id(E),
668
- n
675
+ o.id(A),
676
+ a
669
677
  )
670
678
  ),
671
- a != null ? O(
672
- v,
679
+ r != null ? O(
680
+ h,
673
681
  () => b.div(
674
682
  o.class("bc-input-wrapper__error"),
675
- o.id(A),
676
- P.live("polite"),
683
+ o.id($),
684
+ B.live("polite"),
677
685
  // Announce errors to screen readers
678
686
  o.role("alert"),
679
687
  // Mark as alert for immediate attention
680
- a
688
+ r
681
689
  )
682
690
  ) : null,
683
- ...S
691
+ ...v
684
692
  );
685
693
  };
686
- function Ve(...e) {
694
+ function Me(...e) {
687
695
  return b.div(o.class("bc-stack"), ...e);
688
696
  }
689
- const Oe = (e) => {
697
+ const $e = (e) => {
690
698
  const s = {
691
699
  name: "email",
692
700
  autocomplete: "email",
@@ -695,116 +703,116 @@ const Oe = (e) => {
695
703
  value: t,
696
704
  before: i,
697
705
  onBlur: n,
698
- onChange: r,
699
- onInput: a,
700
- placeholder: l
706
+ onChange: a,
707
+ onInput: l,
708
+ placeholder: r
701
709
  } = s, c = i ?? N({
702
710
  icon: "line-md:email",
703
711
  size: "sm",
704
712
  color: "neutral"
705
713
  });
706
- return j(
707
- q,
708
- (p) => U({
714
+ return q(
715
+ z,
716
+ (f) => R({
709
717
  ...e,
710
718
  before: c,
711
- input: se.email(
712
- J(s),
713
- o.placeholder(G(l, p.$.emailPlaceholderText)),
719
+ input: ne.email(
720
+ X(s),
721
+ o.placeholder(J(r, f.$.emailPlaceholderText)),
714
722
  o.value(t),
715
723
  o.class("bc-input"),
716
- n != null ? I.blur($(n)) : _,
717
- r != null ? I.change($(r)) : _,
718
- a != null ? I.input($(a)) : _
724
+ n != null ? E.blur(x(n)) : _,
725
+ a != null ? E.change(x(a)) : _,
726
+ l != null ? E.input(x(l)) : _
719
727
  )
720
728
  })
721
729
  );
722
- }, Me = (e) => {
730
+ }, xe = (e) => {
723
731
  const {
724
732
  value: s,
725
733
  onBlur: t,
726
734
  onChange: i,
727
735
  onInput: n,
728
- before: r,
729
- after: a,
730
- hasError: l,
736
+ before: a,
737
+ after: l,
738
+ hasError: r,
731
739
  disabled: c,
732
- autocomplete: p,
740
+ autocomplete: f,
733
741
  placeholder: u,
734
742
  ...g
735
- } = e, S = {
743
+ } = e, w = {
736
744
  name: "password",
737
745
  disabled: c,
738
746
  ...g
739
- }, v = T(!0), h = w(
747
+ }, v = I(!0), h = C(
740
748
  v,
741
- p
742
- )((d, f) => d ? f ?? "current-password" : "off");
743
- return j(q, (d) => {
744
- const f = w(
749
+ f
750
+ )((d, p) => d ? p ?? "current-password" : "off");
751
+ return q(z, (d) => {
752
+ const p = C(
745
753
  d.$.passwordPlaceholderText,
746
754
  v,
747
755
  u
748
- )((A, x, y) => x ? "•••••••••••••••" : y ?? A), E = b.button(
756
+ )((A, $, L) => $ ? "•••••••••••••••" : L ?? A), T = b.button(
749
757
  o.type("button"),
750
758
  o.class("bc-input-container__password-toggle"),
751
- P.label(d.$.togglePasswordVisibility),
752
- I.click(() => v.update((A) => !A)),
759
+ B.label(d.$.togglePasswordVisibility),
760
+ E.click(() => v.update((A) => !A)),
753
761
  O(
754
762
  v,
755
763
  () => N({ icon: "line-md:watch" }),
756
764
  () => N({ icon: "line-md:watch-off" })
757
765
  )
758
766
  );
759
- return U({
760
- before: r,
767
+ return R({
768
+ before: a,
761
769
  disabled: c,
762
- hasError: l,
770
+ hasError: r,
763
771
  input: b.input(
764
- J({
765
- ...S,
772
+ X({
773
+ ...w,
766
774
  autocomplete: h,
767
- placeholder: f
775
+ placeholder: p
768
776
  }),
769
777
  O(
770
778
  v,
771
- () => B(o.type("password")),
772
- () => B(o.type("text"))
779
+ () => F(o.type("password")),
780
+ () => F(o.type("text"))
773
781
  ),
774
782
  o.class("bc-input"),
775
783
  o.value(s),
776
- t != null ? I.blur($(t)) : _,
777
- i != null ? I.change($(i)) : _,
778
- n != null ? I.input($(n)) : _
784
+ t != null ? E.blur(x(t)) : _,
785
+ i != null ? E.change(x(i)) : _,
786
+ n != null ? E.input(x(n)) : _
779
787
  ),
780
- after: a != null ? B(E, a) : E
788
+ after: l != null ? F(T, l) : T
781
789
  });
782
790
  });
783
- }, de = (
791
+ }, fe = (
784
792
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
785
793
  (e, s) => () => {
786
794
  e.markTouched(), s?.();
787
795
  }
788
- ), pe = (e, s) => (t) => {
796
+ ), be = (e, s) => (t) => {
789
797
  e.change(t), s?.(t);
790
798
  };
791
- function Y(e, s) {
792
- const { controller: t, onBlur: i, onChange: n, ...r } = s;
799
+ function ee(e, s) {
800
+ const { controller: t, onBlur: i, onChange: n, ...a } = s;
793
801
  return e({
794
802
  id: t.name,
795
803
  disabled: t.disabled,
796
804
  value: t.signal,
797
805
  hasError: t.errorVisible,
798
- ...r,
799
- onChange: pe(t, n),
800
- onBlur: de(t, i)
806
+ ...a,
807
+ onChange: be(t, n),
808
+ onBlur: fe(t, i)
801
809
  });
802
810
  }
803
- function $e(e, s, ...t) {
804
- return X(
811
+ function Fe(e, s, ...t) {
812
+ return Z(
805
813
  {
806
814
  ...s,
807
- content: Y(
815
+ content: ee(
808
816
  e,
809
817
  s
810
818
  )
@@ -812,40 +820,40 @@ function $e(e, s, ...t) {
812
820
  ...t
813
821
  );
814
822
  }
815
- function fe(e, s) {
816
- const { toInput: t, fromInput: i, controller: n, ...r } = s, a = n.transform(t, i);
817
- return Y(e, {
818
- ...r,
819
- controller: a
823
+ function me(e, s) {
824
+ const { toInput: t, fromInput: i, controller: n, ...a } = s, l = n.transform(t, i);
825
+ return ee(e, {
826
+ ...a,
827
+ controller: l
820
828
  });
821
829
  }
822
- function xe(e, s, ...t) {
823
- return X(
830
+ function Pe(e, s, ...t) {
831
+ return Z(
824
832
  {
825
833
  ...s,
826
- content: fe(e, s)
834
+ content: me(e, s)
827
835
  },
828
836
  ...t
829
837
  );
830
838
  }
831
- function Fe(e) {
839
+ function Be(e) {
832
840
  return e.split(".").map((t) => {
833
841
  const i = t.match(/^\[(\d+)\]$/);
834
842
  return i ? Number(i[1]) : t;
835
843
  });
836
844
  }
837
- function be(e) {
845
+ function ge(e) {
838
846
  return typeof e == "number" ? `[${e}]` : `.${e}`;
839
847
  }
840
- function me(e) {
848
+ function ve(e) {
841
849
  if (e.length === 0) return "";
842
850
  const [s, ...t] = e;
843
851
  return [
844
852
  typeof s == "number" ? `[${s}]` : s,
845
- ...t.map(be)
853
+ ...t.map(ge)
846
854
  ].join("");
847
855
  }
848
- function L(e) {
856
+ function j(e) {
849
857
  return function(t) {
850
858
  if (t.type === "valid") return t;
851
859
  let i = t.error;
@@ -866,42 +874,42 @@ class M {
866
874
  dirty;
867
875
  dependencyErrors;
868
876
  #e = {
869
- disabled: T(!1),
870
- touched: T(!1)
877
+ disabled: I(!1),
878
+ touched: I(!1)
871
879
  };
872
880
  #t;
873
- #s = T(void 0);
881
+ #s = I(void 0);
874
882
  parent;
875
883
  disabled;
876
884
  #n = [];
877
885
  disabledOrHasErrors;
878
- constructor(s, t, i, n, r, a = F) {
879
- this.path = s, this.change = t, this.signal = i, this.status = n, this.#t = a, this.#s.set(i.value), this.error = n.map(
880
- (l) => l?.type === "invalid" ? l.error?.message : void 0
881
- ), this.hasError = this.error.map((l) => l != null), this.touched = this.#e.touched, r.validationMode ? this.errorVisible = w(
886
+ constructor(s, t, i, n, a, l = P) {
887
+ this.path = s, this.change = t, this.signal = i, this.status = n, this.#t = l, this.#s.set(i.value), this.error = n.map(
888
+ (r) => r?.type === "invalid" ? r.error?.message : void 0
889
+ ), this.hasError = this.error.map((r) => r != null), this.touched = this.#e.touched, a.validationMode ? this.errorVisible = C(
882
890
  this.hasError,
883
891
  this.touched,
884
- r.validationMode
885
- )((l, c, p) => p === "continuous" ? !!l : !!l && !!c) : this.errorVisible = w(
892
+ a.validationMode
893
+ )((r, c, f) => f === "continuous" ? !!r : !!r && !!c) : this.errorVisible = C(
886
894
  this.hasError,
887
895
  this.touched
888
- )((l, c) => !!l && !!c), this.dirty = w(
896
+ )((r, c) => !!r && !!c), this.dirty = C(
889
897
  this.signal,
890
898
  this.#s
891
- )((l, c) => !this.#t(l, c)), this.dependencyErrors = n.map(
892
- (l) => l?.type === "invalid" ? l.error?.dependencies : void 0
893
- ), this.parent = r, this.disabled = w(
899
+ )((r, c) => !this.#t(r, c)), this.dependencyErrors = n.map(
900
+ (r) => r?.type === "invalid" ? r.error?.dependencies : void 0
901
+ ), this.parent = a, this.disabled = C(
894
902
  this.#e.disabled,
895
- r.disabled
896
- )((l, c) => l || c), this.disabledOrHasErrors = w(
903
+ a.disabled
904
+ )((r, c) => r || c), this.disabledOrHasErrors = C(
897
905
  this.disabled,
898
906
  this.hasError
899
- )((l, c) => l || c), this.onDispose(() => {
907
+ )((r, c) => r || c), this.onDispose(() => {
900
908
  this.#e.disabled.dispose(), this.#e.touched.dispose(), this.disabled.dispose(), this.error.dispose(), this.errorVisible.dispose(), this.dirty.dispose(), this.#s.dispose(), this.dependencyErrors.dispose(), this.disabledOrHasErrors.dispose();
901
909
  });
902
910
  }
903
911
  get name() {
904
- return me(this.path);
912
+ return ve(this.path);
905
913
  }
906
914
  onDispose = (s) => {
907
915
  this.#n.push(s);
@@ -932,7 +940,7 @@ class M {
932
940
  reset = () => {
933
941
  this.change(this.#s.value);
934
942
  };
935
- array = (s = F) => new ve(
943
+ array = (s = P) => new we(
936
944
  this.path,
937
945
  this.change,
938
946
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -941,7 +949,7 @@ class M {
941
949
  this.parent,
942
950
  s
943
951
  );
944
- object = (s = F) => new ge(
952
+ object = (s = P) => new ye(
945
953
  this.path,
946
954
  this.change,
947
955
  this.signal,
@@ -949,34 +957,34 @@ class M {
949
957
  this.parent,
950
958
  s
951
959
  );
952
- transform = (s, t, i = [], n = F) => new M(
960
+ transform = (s, t, i = [], n = P) => new M(
953
961
  [...this.path, ...i],
954
- (r) => this.change(t(r)),
962
+ (a) => this.change(t(a)),
955
963
  this.signal.map(s, n),
956
- this.status.map(L(i)),
964
+ this.status.map(j(i)),
957
965
  this.parent,
958
966
  n
959
967
  );
960
- asyncTransform = (s, t, i, n = [], r = F) => new M(
968
+ asyncTransform = (s, t, i, n = [], a = P) => new M(
961
969
  [...this.path, ...n],
962
- (a) => {
963
- t(a).then((l) => this.change(l));
970
+ (l) => {
971
+ t(l).then((r) => this.change(r));
964
972
  },
965
- this.signal.mapAsync(s, i, void 0, r),
966
- this.status.map(L(n)),
973
+ this.signal.mapAsync(s, i, void 0, a),
974
+ this.status.map(j(n)),
967
975
  this.parent,
968
- r
976
+ a
969
977
  );
970
978
  }
971
- class ge extends M {
979
+ class ye extends M {
972
980
  #e = /* @__PURE__ */ new Map();
973
981
  #t = /* @__PURE__ */ new Map();
974
982
  #s = /* @__PURE__ */ new Map();
975
- #n = T(!1);
983
+ #n = I(!1);
976
984
  touchedDeep = this.#n;
977
- #r = /* @__PURE__ */ new Map();
985
+ #a = /* @__PURE__ */ new Map();
978
986
  #i = /* @__PURE__ */ new Map();
979
- #l = T(!1);
987
+ #l = I(!1);
980
988
  dirtyDeep = this.#l;
981
989
  #o;
982
990
  #u;
@@ -989,20 +997,20 @@ class ge extends M {
989
997
  }
990
998
  this.#n.set(this.touched.value || s);
991
999
  };
992
- constructor(s, t, i, n, r, a) {
1000
+ constructor(s, t, i, n, a, l) {
993
1001
  super(
994
1002
  s,
995
1003
  t,
996
- i.map((c) => c ?? {}, a),
1004
+ i.map((c) => c ?? {}, l),
997
1005
  n,
998
- r,
999
- a
1006
+ a,
1007
+ l
1000
1008
  ), this.#o = this.touched.on(() => {
1001
1009
  this.#c();
1002
1010
  }), this.#u = this.dirty.on(() => {
1003
- this.#a();
1011
+ this.#r();
1004
1012
  });
1005
- const l = this.signal.on(() => this.#a());
1013
+ const r = this.signal.on(() => this.#r());
1006
1014
  this.onDispose(() => {
1007
1015
  for (const c of this.#e.values())
1008
1016
  c.dispose();
@@ -1010,22 +1018,22 @@ class ge extends M {
1010
1018
  for (const c of this.#s.values()) c();
1011
1019
  this.#s.clear(), this.#t.clear(), this.#n.dispose();
1012
1020
  for (const c of this.#i.values()) c();
1013
- this.#i.clear(), this.#r.clear(), this.#l.dispose(), this.#o(), this.#u(), l();
1021
+ this.#i.clear(), this.#a.clear(), this.#l.dispose(), this.#o(), this.#u(), r();
1014
1022
  });
1015
1023
  }
1016
1024
  field = (s) => {
1017
1025
  if (this.#e.has(s))
1018
1026
  return this.#e.get(s);
1019
- const t = async (a) => {
1027
+ const t = async (l) => {
1020
1028
  this.change({
1021
1029
  ...this.signal.value,
1022
- [s]: a
1030
+ [s]: l
1023
1031
  });
1024
1032
  }, i = new M(
1025
1033
  [...this.path, s],
1026
1034
  t,
1027
- this.signal.map((a) => a[s]),
1028
- this.status.map(L([s])),
1035
+ this.signal.map((l) => l[s]),
1036
+ this.status.map(j([s])),
1029
1037
  {
1030
1038
  disabled: this.disabled,
1031
1039
  // propagate validationMode to children if present
@@ -1033,14 +1041,14 @@ class ge extends M {
1033
1041
  }
1034
1042
  );
1035
1043
  this.#e.set(s, i);
1036
- const n = i.touched.on((a) => {
1037
- this.#t.set(s, a), this.#c();
1044
+ const n = i.touched.on((l) => {
1045
+ this.#t.set(s, l), this.#c();
1038
1046
  });
1039
1047
  this.#s.set(s, n);
1040
- const r = i.dirty.on((a) => {
1041
- this.#r.set(s, a), this.#a();
1048
+ const a = i.dirty.on((l) => {
1049
+ this.#a.set(s, l), this.#r();
1042
1050
  });
1043
- return this.#i.set(s, r), i;
1051
+ return this.#i.set(s, a), i;
1044
1052
  };
1045
1053
  markAllTouched = () => {
1046
1054
  this.markTouched();
@@ -1058,9 +1066,9 @@ class ge extends M {
1058
1066
  for (const t of this.#e.values())
1059
1067
  t.markPristine?.();
1060
1068
  };
1061
- #a = () => {
1069
+ #r = () => {
1062
1070
  let s = !1;
1063
- for (const t of this.#r.values())
1071
+ for (const t of this.#a.values())
1064
1072
  if (t) {
1065
1073
  s = !0;
1066
1074
  break;
@@ -1068,16 +1076,16 @@ class ge extends M {
1068
1076
  this.#l.set(this.dirty.value || s);
1069
1077
  };
1070
1078
  }
1071
- class ve extends M {
1079
+ class we extends M {
1072
1080
  #e = new Array();
1073
1081
  length;
1074
1082
  #t = /* @__PURE__ */ new Map();
1075
1083
  #s = /* @__PURE__ */ new Map();
1076
- #n = T(!1);
1084
+ #n = I(!1);
1077
1085
  touchedDeep = this.#n;
1078
- #r = /* @__PURE__ */ new Map();
1086
+ #a = /* @__PURE__ */ new Map();
1079
1087
  #i = /* @__PURE__ */ new Map();
1080
- #l = T(!1);
1088
+ #l = I(!1);
1081
1089
  dirtyDeep = this.#l;
1082
1090
  #o;
1083
1091
  #u;
@@ -1090,57 +1098,57 @@ class ve extends M {
1090
1098
  }
1091
1099
  this.#n.set(this.touched.value || s);
1092
1100
  };
1093
- constructor(s, t, i, n, r, a) {
1094
- const l = i.map((u) => u ?? [], a);
1095
- super(s, t, l, n, r, a);
1096
- const c = l.on((u) => {
1101
+ constructor(s, t, i, n, a, l) {
1102
+ const r = i.map((u) => u ?? [], l);
1103
+ super(s, t, r, n, a, l);
1104
+ const c = r.on((u) => {
1097
1105
  const g = this.#e.length - u.length;
1098
- g > 0 && (this.#e.splice(u.length, g).forEach((S, v) => {
1106
+ g > 0 && (this.#e.splice(u.length, g).forEach((w, v) => {
1099
1107
  const h = u.length + v;
1100
- S.dispose(), this.#s.get(h)?.(), this.#s.delete(h), this.#t.delete(h), this.#i.get(h)?.(), this.#i.delete(h), this.#r.delete(h);
1101
- }), this.#c(), this.#a());
1108
+ w.dispose(), this.#s.get(h)?.(), this.#s.delete(h), this.#t.delete(h), this.#i.get(h)?.(), this.#i.delete(h), this.#a.delete(h);
1109
+ }), this.#c(), this.#r());
1102
1110
  });
1103
- this.length = l.map((u) => u.length), this.#o = this.touched.on(() => {
1111
+ this.length = r.map((u) => u.length), this.#o = this.touched.on(() => {
1104
1112
  this.#c();
1105
1113
  }), this.#u = this.dirty.on(() => {
1106
- this.#a();
1114
+ this.#r();
1107
1115
  });
1108
- const p = this.signal.on(() => this.#a());
1116
+ const f = this.signal.on(() => this.#r());
1109
1117
  this.onDispose(() => {
1110
1118
  for (const u of this.#e)
1111
1119
  u.dispose();
1112
- this.length.dispose(), this.#e.length = 0, c(), l.dispose();
1120
+ this.length.dispose(), this.#e.length = 0, c(), r.dispose();
1113
1121
  for (const u of this.#s.values()) u();
1114
1122
  this.#s.clear(), this.#t.clear(), this.#n.dispose();
1115
1123
  for (const u of this.#i.values()) u();
1116
- this.#i.clear(), this.#r.clear(), this.#l.dispose(), this.#o(), this.#u(), p();
1124
+ this.#i.clear(), this.#a.clear(), this.#l.dispose(), this.#o(), this.#u(), f();
1117
1125
  });
1118
1126
  }
1119
1127
  item = (s) => {
1120
1128
  if (this.#e[s])
1121
1129
  return this.#e[s];
1122
- const t = async (a) => {
1123
- const l = this.signal.value.slice();
1124
- l[s] = a, this.change(l);
1130
+ const t = async (l) => {
1131
+ const r = this.signal.value.slice();
1132
+ r[s] = l, this.change(r);
1125
1133
  }, i = new M(
1126
1134
  [...this.path, s],
1127
1135
  t,
1128
- this.signal.map((a) => a[s]),
1129
- this.status.map(L([s])),
1136
+ this.signal.map((l) => l[s]),
1137
+ this.status.map(j([s])),
1130
1138
  {
1131
1139
  disabled: this.disabled,
1132
1140
  validationMode: this.parent.validationMode
1133
1141
  }
1134
1142
  );
1135
1143
  this.#e[s] = i;
1136
- const n = i.touched.on((a) => {
1137
- this.#t.set(s, a), this.#c();
1144
+ const n = i.touched.on((l) => {
1145
+ this.#t.set(s, l), this.#c();
1138
1146
  });
1139
1147
  this.#s.set(s, n);
1140
- const r = i.dirty.on((a) => {
1141
- this.#r.set(s, a), this.#a();
1148
+ const a = i.dirty.on((l) => {
1149
+ this.#a.set(s, l), this.#r();
1142
1150
  });
1143
- return this.#i.set(s, r), i;
1151
+ return this.#i.set(s, a), i;
1144
1152
  };
1145
1153
  push = (...s) => {
1146
1154
  this.change([...this.signal.value, ...s]);
@@ -1163,8 +1171,8 @@ class ve extends M {
1163
1171
  };
1164
1172
  move = (s, t, i = 1) => {
1165
1173
  if (i < 1 || s === t) return;
1166
- const n = this.signal.value.slice(), r = n.splice(s, i);
1167
- n.splice(t, 0, ...r), this.change(n);
1174
+ const n = this.signal.value.slice(), a = n.splice(s, i);
1175
+ n.splice(t, 0, ...a), this.change(n);
1168
1176
  };
1169
1177
  markAllTouched = () => {
1170
1178
  this.markTouched();
@@ -1178,9 +1186,9 @@ class ve extends M {
1178
1186
  for (let t = 0; t < s; t++)
1179
1187
  this.item(t).markPristine?.();
1180
1188
  };
1181
- #a = () => {
1189
+ #r = () => {
1182
1190
  let s = !1;
1183
- for (const t of this.#r.values())
1191
+ for (const t of this.#a.values())
1184
1192
  if (t) {
1185
1193
  s = !0;
1186
1194
  break;
@@ -1188,7 +1196,7 @@ class ve extends M {
1188
1196
  this.#l.set(this.dirty.value || s);
1189
1197
  };
1190
1198
  }
1191
- function ye(e) {
1199
+ function ke(e) {
1192
1200
  function s(t) {
1193
1201
  return typeof t == "number" ? t : t.toString();
1194
1202
  }
@@ -1196,13 +1204,13 @@ function ye(e) {
1196
1204
  (t) => typeof t == "object" && t.key != null ? s(t.key) : s(t)
1197
1205
  );
1198
1206
  }
1199
- function ke(e) {
1200
- const s = e.filter((n) => n.path == null || n.path.length === 0).map((n) => n.message), t = e.filter((n) => n.path != null && n.path.length > 0).reduce((n, r) => {
1201
- const a = ye(r.path), l = a.pop();
1207
+ function Se(e) {
1208
+ const s = e.filter((n) => n.path == null || n.path.length === 0).map((n) => n.message), t = e.filter((n) => n.path != null && n.path.length > 0).reduce((n, a) => {
1209
+ const l = ke(a.path), r = l.pop();
1202
1210
  let c = n;
1203
- for (const p of a)
1204
- c.dependencies == null && (c.dependencies = {}), c.dependencies[p] == null && (c.dependencies[p] = {}), c = c.dependencies[p];
1205
- return c.dependencies == null && (c.dependencies = {}), c.dependencies[l] = { message: r.message }, n;
1211
+ for (const f of l)
1212
+ c.dependencies == null && (c.dependencies = {}), c.dependencies[f] == null && (c.dependencies[f] = {}), c = c.dependencies[f];
1213
+ return c.dependencies == null && (c.dependencies = {}), c.dependencies[r] = { message: a.message }, n;
1206
1214
  }, {}), i = s.join(`
1207
1215
  `);
1208
1216
  return {
@@ -1210,76 +1218,76 @@ function ke(e) {
1210
1218
  message: i != "" ? i : void 0
1211
1219
  };
1212
1220
  }
1213
- function we({
1221
+ function Ce({
1214
1222
  initialValue: e,
1215
1223
  onChange: s,
1216
1224
  validate: t,
1217
1225
  equals: i,
1218
1226
  validationMode: n,
1219
- validateDebounceMs: r
1227
+ validateDebounceMs: a
1220
1228
  }) {
1221
- const a = C.deriveProp(e), l = T(D.valid), c = T(!1), p = T(n ?? "touchedOrSubmit"), u = (d) => {
1222
- l.set(d);
1229
+ const l = y.deriveProp(e), r = I(D.valid), c = I(!1), f = I(n ?? "touchedOrSubmit"), u = (d) => {
1230
+ r.set(d);
1223
1231
  };
1224
1232
  let g;
1225
- const S = async (d) => {
1233
+ const w = async (d) => {
1226
1234
  if (t != null) {
1227
- const f = await t(d);
1228
- u(f);
1235
+ const p = await t(d);
1236
+ u(p);
1229
1237
  }
1230
1238
  }, v = async (d) => {
1231
- a.set(d), s?.(d);
1232
- const f = p.value;
1239
+ l.set(d), s?.(d);
1240
+ const p = f.value;
1233
1241
  if (t != null) {
1234
- if (f === "onSubmit")
1242
+ if (p === "onSubmit")
1235
1243
  return;
1236
- const E = r ?? 0;
1237
- E > 0 ? (g && clearTimeout(g), g = setTimeout(() => {
1238
- S(d);
1239
- }, E)) : await S(d);
1244
+ const T = a ?? 0;
1245
+ T > 0 ? (g && clearTimeout(g), g = setTimeout(() => {
1246
+ w(d);
1247
+ }, T)) : await w(d);
1240
1248
  }
1241
1249
  }, h = new M(
1242
1250
  [],
1243
1251
  v,
1244
- a,
1245
1252
  l,
1253
+ r,
1246
1254
  {
1247
1255
  disabled: c,
1248
- validationMode: p
1256
+ validationMode: f
1249
1257
  },
1250
- i ?? F
1258
+ i ?? P
1251
1259
  );
1252
1260
  return h.onDispose(() => {
1253
- c.dispose(), a.dispose(), l.dispose(), p.dispose(), g && clearTimeout(g);
1261
+ c.dispose(), l.dispose(), r.dispose(), f.dispose(), g && clearTimeout(g);
1254
1262
  }), { controller: h, setStatus: u };
1255
1263
  }
1256
- function Z(e) {
1257
- return B(o.disabled(e.disabled), o.name(e.name));
1264
+ function se(e) {
1265
+ return F(o.disabled(e.disabled), o.name(e.name));
1258
1266
  }
1259
- function Pe(e, {
1267
+ function Ne(e, {
1260
1268
  triggerOn: s = "change"
1261
1269
  } = {}) {
1262
- return B(
1263
- Z(e),
1270
+ return F(
1271
+ se(e),
1264
1272
  o.value(e.signal),
1265
- (s === "input" ? I.input : I.change)($(e.change))
1273
+ (s === "input" ? E.input : E.change)(x(e.change))
1266
1274
  );
1267
1275
  }
1268
- function Be(e, {
1276
+ function Le(e, {
1269
1277
  triggerOn: s = "change"
1270
1278
  } = {}) {
1271
- return B(
1272
- Z(e),
1279
+ return F(
1280
+ se(e),
1273
1281
  o.valueAsNumber(e.signal),
1274
- (s === "input" ? I.input : I.change)(
1275
- te(e.change)
1282
+ (s === "input" ? E.input : E.change)(
1283
+ ie(e.change)
1276
1284
  )
1277
1285
  );
1278
1286
  }
1279
- function K(e) {
1280
- return e.issues != null ? D.invalid(ke(e.issues)) : D.valid;
1287
+ function G(e) {
1288
+ return e.issues != null ? D.invalid(Se(e.issues)) : D.valid;
1281
1289
  }
1282
- async function Ne({
1290
+ async function je({
1283
1291
  task: e,
1284
1292
  errorMessage: s,
1285
1293
  errorPath: t = ["root"],
@@ -1289,15 +1297,15 @@ async function Ne({
1289
1297
  const n = await e();
1290
1298
  return i != null ? i(n) : D.valid;
1291
1299
  } catch (n) {
1292
- const r = s ?? (n instanceof Error ? n.message : "Operation failed");
1300
+ const a = s ?? (n instanceof Error ? n.message : "Operation failed");
1293
1301
  return t.length === 1 && t[0] === "root" ? D.invalid({
1294
- message: r
1302
+ message: a
1295
1303
  }) : D.invalid({
1296
- dependencies: ee(t, r)
1304
+ dependencies: te(t, a)
1297
1305
  });
1298
1306
  }
1299
1307
  }
1300
- function ee(e, s) {
1308
+ function te(e, s) {
1301
1309
  if (e.length === 1)
1302
1310
  return {
1303
1311
  [e[0]]: { message: s }
@@ -1305,48 +1313,48 @@ function ee(e, s) {
1305
1313
  const [t, ...i] = e;
1306
1314
  return {
1307
1315
  [t]: {
1308
- dependencies: ee(i, s)
1316
+ dependencies: te(i, s)
1309
1317
  }
1310
1318
  };
1311
1319
  }
1312
- function Le({
1320
+ function qe({
1313
1321
  initialValue: e = {},
1314
1322
  schema: s,
1315
1323
  onSubmit: t = async () => D.valid,
1316
1324
  validationMode: i,
1317
1325
  validateDebounceMs: n
1318
1326
  }) {
1319
- const { controller: r, setStatus: a } = we({
1327
+ const { controller: a, setStatus: l } = Ce({
1320
1328
  initialValue: e,
1321
1329
  validationMode: i ?? "touchedOrSubmit",
1322
1330
  validateDebounceMs: n,
1323
- validate: (i ?? "touchedOrSubmit") === "onSubmit" || s == null ? void 0 : async (u) => K(
1331
+ validate: (i ?? "touchedOrSubmit") === "onSubmit" || s == null ? void 0 : async (u) => G(
1324
1332
  await s["~standard"].validate(u)
1325
1333
  )
1326
- }), l = T(!1), c = r.object();
1327
- return c.onDispose(l.dispose), {
1334
+ }), r = I(!1), c = a.object();
1335
+ return c.onDispose(r.dispose), {
1328
1336
  controller: c,
1329
- setStatus: a,
1337
+ setStatus: l,
1330
1338
  submit: async (u) => {
1331
- if (l.set(!0), u?.preventDefault(), c.markAllTouched(), (i ?? "touchedOrSubmit") === "onSubmit") {
1332
- const S = c.signal.value, v = s?.["~standard"].validate;
1339
+ if (r.set(!0), u?.preventDefault(), c.markAllTouched(), (i ?? "touchedOrSubmit") === "onSubmit") {
1340
+ const w = c.signal.value, v = s?.["~standard"].validate;
1333
1341
  if (v == null) {
1334
- l.set(!1);
1342
+ r.set(!1);
1335
1343
  return;
1336
1344
  }
1337
- const h = K(await v(S));
1338
- if (a(h), h.type === "invalid") {
1339
- l.set(!1);
1345
+ const h = G(await v(w));
1346
+ if (l(h), h.type === "invalid") {
1347
+ r.set(!1);
1340
1348
  return;
1341
1349
  }
1342
1350
  }
1343
1351
  const g = await t(c.signal.value);
1344
- l.set(!1), g.type === "invalid" && a(g);
1352
+ r.set(!1), g.type === "invalid" && l(g);
1345
1353
  },
1346
- submitting: l
1354
+ submitting: r
1347
1355
  };
1348
1356
  }
1349
- function Se(e) {
1357
+ function _e(e) {
1350
1358
  switch (e) {
1351
1359
  case "success":
1352
1360
  return "material-symbols:check-circle-outline";
@@ -1359,7 +1367,7 @@ function Se(e) {
1359
1367
  return "material-symbols:info-outline";
1360
1368
  }
1361
1369
  }
1362
- function Ce(e) {
1370
+ function De(e) {
1363
1371
  switch (e) {
1364
1372
  case "success":
1365
1373
  return "success";
@@ -1372,7 +1380,7 @@ function Ce(e) {
1372
1380
  return "info";
1373
1381
  }
1374
1382
  }
1375
- function _e(e, s, t, i) {
1383
+ function Ee(e, s, t, i) {
1376
1384
  const n = [
1377
1385
  "bc-notice",
1378
1386
  `bc-notice--${e}`,
@@ -1380,106 +1388,115 @@ function _e(e, s, t, i) {
1380
1388
  ];
1381
1389
  return t && n.push("bc-notice--dismissible"), i && i.length > 0 && n.push(i), n.join(" ");
1382
1390
  }
1383
- function je({
1391
+ function ze({
1384
1392
  variant: e = "info",
1385
1393
  tone: s = "subtle",
1386
1394
  role: t,
1387
1395
  title: i,
1388
1396
  icon: n,
1389
- closable: r = !1,
1390
- onDismiss: a,
1391
- class: l
1397
+ closable: a = !1,
1398
+ onDismiss: l,
1399
+ class: r
1392
1400
  }, ...c) {
1393
- const p = C.map(
1394
- r,
1395
- (d) => !!d || a != null
1396
- ), u = C.map(e, (d) => d ?? "info"), g = C.map(s, (d) => d ?? "subtle"), S = w(
1401
+ const f = y.map(
1402
+ a,
1403
+ (d) => !!d || l != null
1404
+ ), u = y.map(e, (d) => d ?? "info"), g = y.map(s, (d) => d ?? "subtle"), w = C(
1397
1405
  t,
1398
1406
  u
1399
1407
  )(
1400
- (d, f) => d ?? (f === "danger" ? "alert" : "status")
1401
- ), v = T(!0), h = j(
1402
- q,
1408
+ (d, p) => d ?? (p === "danger" ? "alert" : "status")
1409
+ ), v = I(!0), h = q(
1410
+ z,
1403
1411
  (d) => b.div(
1404
1412
  o.class(
1405
- w(
1413
+ C(
1406
1414
  u,
1407
1415
  g,
1408
- p,
1409
- l
1410
- )((f, E, A, x) => _e(f, E, A, x))
1416
+ f,
1417
+ r
1418
+ )((p, T, A, $) => Ee(p, T, A, $))
1411
1419
  ),
1412
1420
  // Accessibility role mapping (always defined)
1413
- o.role(C.map(S, (f) => f)),
1414
- ne(
1415
- C.map(n, (f) => f === !1),
1421
+ o.role(y.map(w, (p) => p)),
1422
+ ae(
1423
+ y.map(n, (p) => p === !1),
1416
1424
  () => b.div(
1417
1425
  o.class("bc-notice__icon"),
1418
1426
  N({
1419
- icon: w(
1427
+ icon: C(
1420
1428
  n,
1421
1429
  u
1422
- )((f, E) => f === void 0 ? Se(E) : String(f)),
1430
+ )((p, T) => p === void 0 ? _e(T) : String(p)),
1423
1431
  size: "md",
1424
- color: C.map(u, Ce)
1432
+ color: y.map(u, De)
1425
1433
  })
1426
1434
  )
1427
1435
  ),
1428
1436
  b.div(
1429
1437
  o.class("bc-notice__body"),
1430
- ie(i, (f) => b.div(o.class("bc-notice__title"), f)),
1438
+ re(i, (p) => b.div(o.class("bc-notice__title"), p)),
1431
1439
  b.div(o.class("bc-notice__content"), ...c)
1432
1440
  ),
1433
1441
  O(
1434
- p,
1435
- () => ae({
1442
+ f,
1443
+ () => ce({
1436
1444
  size: "xs",
1437
1445
  label: d.$.closeModal,
1438
1446
  onClick: () => {
1439
- v.set(!1), a?.();
1447
+ v.set(!1), l?.();
1440
1448
  }
1441
1449
  })
1442
1450
  )
1443
1451
  )
1444
1452
  );
1445
- return O(v, () => h);
1453
+ return F(
1454
+ Q(
1455
+ () => {
1456
+ y.dispose(f), y.dispose(u), y.dispose(g);
1457
+ },
1458
+ w,
1459
+ v
1460
+ ),
1461
+ O(v, () => h)
1462
+ );
1446
1463
  }
1447
1464
  export {
1448
- ve as A,
1449
- Y as B,
1450
- ae as C,
1451
- Te as D,
1452
- Oe as E,
1453
- X as I,
1454
- le as L,
1455
- xe as M,
1456
- je as N,
1457
- F as O,
1458
- Me as P,
1459
- oe as R,
1460
- Ve as S,
1465
+ we as A,
1466
+ ee as B,
1467
+ ce as C,
1468
+ Ve as D,
1469
+ $e as E,
1470
+ Z as I,
1471
+ oe as L,
1472
+ Pe as M,
1473
+ ze as N,
1474
+ P as O,
1475
+ xe as P,
1476
+ he as R,
1477
+ Me as S,
1461
1478
  D as a,
1462
- Ae as b,
1463
- $e as c,
1464
- pe as d,
1479
+ Oe as b,
1480
+ Fe as c,
1481
+ be as d,
1465
1482
  M as e,
1466
- L as f,
1467
- fe as g,
1468
- me as h,
1469
- ge as i,
1470
- ye as j,
1471
- ke as k,
1472
- we as l,
1473
- de as m,
1474
- Z as n,
1475
- Pe as o,
1476
- Fe as p,
1477
- Be as q,
1478
- K as r,
1479
- Q as s,
1480
- Ne as t,
1481
- Le as u,
1482
- Ie as v,
1483
- be as w,
1484
- ce as x
1483
+ j as f,
1484
+ me as g,
1485
+ ve as h,
1486
+ ye as i,
1487
+ ke as j,
1488
+ Se as k,
1489
+ Ce as l,
1490
+ fe as m,
1491
+ se as n,
1492
+ Ne as o,
1493
+ Be as p,
1494
+ Le as q,
1495
+ G as r,
1496
+ Y as s,
1497
+ je as t,
1498
+ qe as u,
1499
+ Ae as v,
1500
+ ge as w,
1501
+ ue as x
1485
1502
  };