@tempots/beatui 0.37.0 → 0.39.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 (96) hide show
  1. package/dist/{2019-B1QESOSc.cjs → 2019-1S9vgvv2.cjs} +1 -1
  2. package/dist/{2019-RaU4YQ5c.js → 2019-DPD_eCKE.js} +2 -2
  3. package/dist/{2020-BI-SxTSK.cjs → 2020-CGrbEEmD.cjs} +1 -1
  4. package/dist/{2020-BAomdSE8.js → 2020-aLm9VmDL.js} +2 -2
  5. package/dist/{ar-CqAHPRKu.cjs → ar-B0vT_MPe.cjs} +1 -1
  6. package/dist/{ar-avevuYiW.js → ar-CbM09z5P.js} +1 -1
  7. package/dist/auth/index.cjs.js +1 -1
  8. package/dist/auth/index.es.js +4 -4
  9. package/dist/beatui.css +447 -83
  10. package/dist/beatui.tailwind.css +447 -83
  11. package/dist/{de-Cz7ah611.js → de-Dd907tZQ.js} +1 -1
  12. package/dist/{de--4OtRESW.cjs → de-tK36cL_u.cjs} +1 -1
  13. package/dist/{es-CiNQQzF1.js → es-BkJxjMdG.js} +1 -1
  14. package/dist/{es-CE1wRgxl.cjs → es-K35LRZa-.cjs} +1 -1
  15. package/dist/{fa-DjuJZNLK.cjs → fa-BBikwwku.cjs} +1 -1
  16. package/dist/{fa-Gkt0b9XN.js → fa-DBTUBsw_.js} +1 -1
  17. package/dist/{fr-DotyzMGL.cjs → fr-DMtXrrnJ.cjs} +1 -1
  18. package/dist/{fr-xM9p9Q6G.js → fr-Fmupo556.js} +1 -1
  19. package/dist/{he-CoO6PsiS.js → he-DkI64oaY.js} +1 -1
  20. package/dist/{he-BQ6ygVEQ.cjs → he-on3Ivp8g.cjs} +1 -1
  21. package/dist/{hi-BCfJ0mRh.cjs → hi-CNFV8ITE.cjs} +1 -1
  22. package/dist/{hi-DA3-4Cdo.js → hi-GdD5MihT.js} +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-CCu0qfNP.cjs → index-BA93M8Ux.cjs} +1 -1
  26. package/dist/{index-C2rz3G1d.js → index-BK8t6gqu.js} +3 -3
  27. package/dist/{index-C_nSdynJ.js → index-BfFlhmAq.js} +1 -1
  28. package/dist/{index-BS0NyhvV.js → index-BkQ7xHgi.js} +5 -5
  29. package/dist/{index-CZQHL_pf.cjs → index-CPBlySmE.cjs} +1 -1
  30. package/dist/{index-Dc9UNC8n.js → index-LUItEwlw.js} +1 -1
  31. package/dist/{index-BKjL6RO2.cjs → index-e8oQ-k0x.cjs} +2 -2
  32. package/dist/{index-BzApzJXc.cjs → index-wdi93sK4.cjs} +1 -1
  33. package/dist/index.cjs.js +4 -4
  34. package/dist/index.es.js +3075 -2812
  35. package/dist/{it-pv2Gm3jb.cjs → it-BDOzBRkQ.cjs} +1 -1
  36. package/dist/{it-EdPuWBJR.js → it-Bpnfd60V.js} +1 -1
  37. package/dist/{ja-CuRaPMgh.cjs → ja-N-7c7zD7.cjs} +1 -1
  38. package/dist/{ja-BSRCR430.js → ja-SjlGNgs9.js} +1 -1
  39. package/dist/json-schema/index.cjs.js +1 -1
  40. package/dist/json-schema/index.es.js +1 -1
  41. package/dist/{ko-C7YP1PL4.cjs → ko-BBeTXIlY.cjs} +1 -1
  42. package/dist/{ko-Dm4oD1fh.js → ko-CH69ZNts.js} +1 -1
  43. package/dist/modal-BD76Rve3.js +633 -0
  44. package/dist/modal-DQycMZ8_.cjs +1 -0
  45. package/dist/{nl-ClCD6lP-.cjs → nl-C2C9QDH2.cjs} +1 -1
  46. package/dist/{nl-B0l1kdfd.js → nl-DnvMlW8v.js} +1 -1
  47. package/dist/notice-CFoc4PJe.cjs +2 -0
  48. package/dist/{notice-C7o5d8Jw.js → notice-CQZseCQs.js} +388 -378
  49. package/dist/{pl-DVKneBSY.js → pl-CBEX2qN1.js} +1 -1
  50. package/dist/{pl-fyCkqVrr.cjs → pl-sNBCzEUd.cjs} +1 -1
  51. package/dist/prosemirror/index.cjs.js +1 -1
  52. package/dist/prosemirror/index.es.js +1 -1
  53. package/dist/{pt-BHExG3lf.cjs → pt-Bvxg9VEA.cjs} +1 -1
  54. package/dist/{pt-Bw0sTDOX.js → pt-ByFqFAdQ.js} +1 -1
  55. package/dist/{ru-B26VQ4f9.js → ru-6d5JfoDw.js} +1 -1
  56. package/dist/{ru-PuEOLDw1.cjs → ru-CPAdsn4m.cjs} +1 -1
  57. package/dist/tailwind/index.cjs.js +1 -1
  58. package/dist/tailwind/index.es.js +1 -1
  59. package/dist/tailwind/preset.cjs.js +1 -1
  60. package/dist/tailwind/preset.es.js +1 -1
  61. package/dist/tailwind/vite-plugin.cjs.js +1 -1
  62. package/dist/tailwind/vite-plugin.es.js +1 -1
  63. package/dist/{toolbar-ClJbaKID.js → toolbar-Cl_TAa3r.js} +1 -1
  64. package/dist/{toolbar-kwkvH3nX.cjs → toolbar-Dw2VQD9y.cjs} +1 -1
  65. package/dist/{tr-CI97fTpD.cjs → tr-IKZtCQQR.cjs} +1 -1
  66. package/dist/{tr-DQMivdvy.js → tr-gv4vJfm8.js} +1 -1
  67. package/dist/{translations-ZB5oDFId.cjs → translations-CK426qyd.cjs} +1 -1
  68. package/dist/translations-DJR65Jii.cjs +1 -0
  69. package/dist/{translations-1yD6Rm5l.js → translations-DXLmnUiB.js} +1 -1
  70. package/dist/{translations-iam7PITs.js → translations-djDSPqdb.js} +56 -73
  71. package/dist/types/components/beatui.d.ts +4 -1
  72. package/dist/types/components/button/button.d.ts +4 -3
  73. package/dist/types/components/form/input/input-wrapper.d.ts +2 -1
  74. package/dist/types/components/form/use-form.d.ts +1 -1
  75. package/dist/types/components/misc/index.d.ts +4 -0
  76. package/dist/types/components/misc/notification-provider.d.ts +47 -0
  77. package/dist/types/components/misc/notification.d.ts +17 -0
  78. package/dist/types/components/misc/opengraph.d.ts +111 -0
  79. package/dist/types/components/navigation/link/button-link.d.ts +2 -0
  80. package/dist/types/components/overlay/lightbox.d.ts +1 -1
  81. package/dist/types/components/overlay/modal.d.ts +2 -2
  82. package/dist/types/components/overlay/ribbon.d.ts +2 -2
  83. package/dist/types/utils/use-animated-toggle.d.ts +30 -9
  84. package/dist/{ur-B3CiO8KH.cjs → ur-Bgq_2yjr.cjs} +1 -1
  85. package/dist/{ur-o3rog5MJ.js → ur-Bo6bjEBS.js} +1 -1
  86. package/dist/{utils-BcIRhDH0.cjs → utils-Bsrfm-0d.cjs} +1 -1
  87. package/dist/{utils-C7619Rp3.js → utils-Bw911Eo4.js} +2 -2
  88. package/dist/{vi-FibsLfdk.cjs → vi-BrUQnj-8.cjs} +1 -1
  89. package/dist/{vi-C7cb2K_B.js → vi-xDLJ3TIx.js} +1 -1
  90. package/dist/{zh-NGrfqAHM.js → zh-BivWxJJh.js} +1 -1
  91. package/dist/{zh-BtSj_Euh.cjs → zh-BqH1Cioq.cjs} +1 -1
  92. package/package.json +3 -3
  93. package/dist/modal-CxG-RO9B.js +0 -601
  94. package/dist/modal-OMSAbIg1.cjs +0 -1
  95. package/dist/notice-0Xhzr7qR.cjs +0 -2
  96. package/dist/translations-DQxg-W9w.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 P, attr as o, html as b, on as E, Value as C, Empty as _, computedOf as k, When as O, dataAttr as U, input as te, emitValue as x, prop as I, Fragment as B, emitValueAsNumber as ne, Unless as ie, Ensure as ae } from "@tempots/dom";
2
+ import { a as z, B as re, I as N, b as R, C as Q } from "./translations-djDSPqdb.js";
3
+ const W = /* @__PURE__ */ new Map();
4
+ function X(e) {
5
+ const s = W.get(e) ?? 0;
6
+ return W.set(e, s + 1), `${e}-${s}`;
7
7
  }
8
- const k = {
8
+ const w = {
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 w.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 w.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 w.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 w.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 (w.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 w.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
+ }) => w.isSuccess(e) ? s(e.value) : w.isFailure(e) ? t(e.error) : w.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) => (w.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) => (w.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 (w.isSuccess(t))
181
181
  s.push(t.value);
182
182
  else
183
183
  return t;
184
- return k.success(s);
184
+ return w.success(s);
185
185
  },
186
186
  /**
187
187
  * Converts a Promise to an AsyncResult.
@@ -191,9 +191,9 @@ const k = {
191
191
  ofPromise: async (e) => {
192
192
  try {
193
193
  const s = await e;
194
- return k.success(s);
194
+ return w.success(s);
195
195
  } catch (s) {
196
- return k.failure(s instanceof Error ? s : new Error(String(s)));
196
+ return w.failure(s instanceof Error ? s : new Error(String(s)));
197
197
  }
198
198
  }
199
199
  }, F = (e, s) => e === s || e !== e && s !== s, D = {
@@ -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) => w.success(s),
312
+ (s) => w.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,17 +456,17 @@ const k = {
456
456
  return m.success(s);
457
457
  }
458
458
  };
459
- function ae({
459
+ function le({
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);
465
+ onClick: a,
466
+ label: l
467
+ }, ...r) {
468
+ return q(z, (c) => {
469
+ const f = J(l, c.$.closeModal);
470
470
  return re(
471
471
  {
472
472
  variant: "text",
@@ -474,37 +474,37 @@ function ae({
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
+ P.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 Te = (...e) => b.span(o.class(H("emphasis")), ...e), ce = (...e) => b.span(o.class(H("default")), ...e), oe = (...e) => b.span(o.class(H("muted")), ...e), Ae = (...e) => b.span(o.class(H("danger")), ...e), Ve = (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 d = C.get(s);
503
- i?.(!d);
504
- }, v = (d) => {
505
- C.get(r ?? !1) || (d.key === " " || d.key === "Enter") && (d.preventDefault(), S());
499
+ iconSize: f = "lg"
500
+ } = e, u = l ?? X("checkbox"), g = `${u}-label`, S = () => {
501
+ if (C.get(a ?? !1)) return;
502
+ const h = C.get(s);
503
+ i?.(!h);
504
+ }, v = (h) => {
505
+ C.get(a ?? !1) || (h.key === " " || h.key === "Enter") && (h.preventDefault(), S());
506
506
  };
507
- return U(
507
+ return R(
508
508
  {
509
509
  baseContainer: !0,
510
510
  growInput: !1,
@@ -516,177 +516,184 @@ const Ie = (...e) => b.span(o.class(z("emphasis")), ...e), le = (...e) => b.span
516
516
  o.class(
517
517
  C.map(
518
518
  s,
519
- (d) => d ? "bc-checkbox-input__checkbox--checked" : "bc-checkbox-input__checkbox--unchecked"
519
+ (h) => h ? "bc-checkbox-input__checkbox--checked" : "bc-checkbox-input__checkbox--unchecked"
520
520
  )
521
521
  ),
522
522
  o.class(
523
523
  C.map(
524
- r ?? !1,
525
- (d) => d ? "bc-checkbox-input__checkbox--disabled" : ""
524
+ a ?? !1,
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
531
  C.map(
532
- r ?? !1,
533
- (d) => d ? -1 : 0
532
+ a ?? !1,
533
+ (h) => h ? -1 : 0
534
534
  )
535
535
  ),
536
536
  P.checked(s),
537
- P.disabled(r),
537
+ P.disabled(a),
538
538
  n != null ? P.labelledby(g) : _,
539
- I.keydown(v),
540
- t != null ? I.blur(t) : _,
539
+ E.keydown(v),
540
+ t != null ? E.blur(t) : _,
541
541
  N({
542
- icon: w(
542
+ icon: k(
543
543
  s,
544
- l,
544
+ r,
545
545
  c
546
546
  )(
547
- (d, h, f) => d ? h ?? "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
+ oe(n)
558
558
  ) : _
559
559
  )
560
560
  },
561
- I.click(S)
561
+ E.click(S)
562
562
  );
563
- }, oe = b.span(
563
+ }, ue = b.span(
564
564
  o.class("bc-input-wrapper__required"),
565
565
  " *"
566
566
  );
567
- function ue(e) {
567
+ function he(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 de(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, d = p ?? !1, h = u ?? "vertical", f = Q("input-wrapper"), E = n ? `${f}-description` : void 0, A = a != null ? `${f}-error` : void 0, x = w(h)((y) => y !== "vertical");
579
+ const Y = ({
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: S
593
+ }, ...v) => {
594
+ const h = f ?? r != null, d = u ?? !1, p = g ?? "vertical", T = X("input-wrapper"), A = a ? `${T}-description` : void 0, $ = r != null ? `${T}-error` : void 0, L = k(p)((y) => y !== "vertical");
594
595
  return b.div(
595
- o.class(C.map(h, (y) => ue(y))),
596
+ o.class(C.map(p, (y) => he(y))),
597
+ o.class(
598
+ C.map(
599
+ e,
600
+ (y) => y ? "bc-input-wrapper--full-width" : ""
601
+ )
602
+ ),
596
603
  O(
597
- w(
598
- h,
599
- g ?? void 0
600
- )((y, V) => W(y, V) != null),
604
+ k(
605
+ p,
606
+ S ?? void 0
607
+ )((y, V) => K(y, V) != null),
601
608
  () => o.style(
602
609
  C.map(
603
- w(
604
- h,
605
- g ?? void 0
606
- )((y, V) => W(y, V)),
610
+ k(
611
+ p,
612
+ S ?? void 0
613
+ )((y, V) => K(y, V)),
607
614
  (y) => y
608
615
  )
609
616
  )
610
617
  ),
611
- s != null || i != null ? b.div(
618
+ t != null || n != null ? b.div(
612
619
  o.class("bc-input-wrapper__header"),
613
620
  b.div(
614
621
  o.class("bc-input-wrapper__label-section"),
615
622
  b.label(
616
623
  o.class("bc-input-wrapper__label"),
617
- l != null ? o.for(l) : _,
624
+ c != null ? o.for(c) : _,
618
625
  b.span(
619
626
  o.class(
620
- w(
621
- v,
627
+ k(
628
+ h,
622
629
  d
623
630
  )(
624
- (y, V) => he(
631
+ (y, V) => de(
625
632
  y ?? !1,
626
633
  V ?? !1
627
634
  )
628
635
  )
629
636
  ),
630
- s
637
+ t
631
638
  ),
632
- s != null && e ? oe : _
639
+ t != null && s ? ue : _
633
640
  ),
634
641
  // Show description under label when horizontal
635
642
  O(
636
- w(
637
- x,
638
- n
643
+ k(
644
+ L,
645
+ a
639
646
  )((y, V) => y && V != null),
640
647
  () => b.div(
641
648
  o.class(
642
649
  "bc-input-wrapper__description bc-input-wrapper__description--under-label"
643
650
  ),
644
- o.id(E),
645
- n
651
+ o.id(A),
652
+ a
646
653
  )
647
654
  )
648
655
  ),
649
- i != null ? le(i) : _,
650
- t
656
+ n != null ? ce(n) : _,
657
+ i
651
658
  ) : _,
652
659
  b.div(
653
660
  o.class("bc-input-wrapper__content"),
654
661
  // Add data attributes to help inputs inherit accessibility information
655
- [E, A].filter(Boolean).length > 0 ? H.describedby(
656
- [E, A].filter(Boolean).join(" ")
662
+ [A, $].filter(Boolean).length > 0 ? U.describedby(
663
+ [A, $].filter(Boolean).join(" ")
657
664
  ) : _,
658
- e ? H.required("true") : _,
659
- O(v, () => H.invalid("true")),
660
- r
665
+ s ? U.required("true") : _,
666
+ O(h, () => U.invalid("true")),
667
+ l
661
668
  ),
662
669
  // Show description at bottom only when not horizontal
663
670
  O(
664
- w(x, n)((y, V) => !y && V != null),
671
+ k(L, a)((y, V) => !y && V != null),
665
672
  () => b.div(
666
673
  o.class("bc-input-wrapper__description"),
667
- o.id(E),
668
- n
674
+ o.id(A),
675
+ a
669
676
  )
670
677
  ),
671
- a != null ? O(
672
- v,
678
+ r != null ? O(
679
+ h,
673
680
  () => b.div(
674
681
  o.class("bc-input-wrapper__error"),
675
- o.id(A),
682
+ o.id($),
676
683
  P.live("polite"),
677
684
  // Announce errors to screen readers
678
685
  o.role("alert"),
679
686
  // Mark as alert for immediate attention
680
- a
687
+ r
681
688
  )
682
689
  ) : null,
683
- ...S
690
+ ...v
684
691
  );
685
692
  };
686
- function Ve(...e) {
693
+ function Oe(...e) {
687
694
  return b.div(o.class("bc-stack"), ...e);
688
695
  }
689
- const Oe = (e) => {
696
+ const Me = (e) => {
690
697
  const s = {
691
698
  name: "email",
692
699
  autocomplete: "email",
@@ -695,76 +702,76 @@ const Oe = (e) => {
695
702
  value: t,
696
703
  before: i,
697
704
  onBlur: n,
698
- onChange: r,
699
- onInput: a,
700
- placeholder: l
705
+ onChange: a,
706
+ onInput: l,
707
+ placeholder: r
701
708
  } = s, c = i ?? N({
702
709
  icon: "line-md:email",
703
710
  size: "sm",
704
711
  color: "neutral"
705
712
  });
706
- return j(
707
- q,
708
- (p) => U({
713
+ return q(
714
+ z,
715
+ (f) => R({
709
716
  ...e,
710
717
  before: c,
711
- input: se.email(
712
- J(s),
713
- o.placeholder(G(l, p.$.emailPlaceholderText)),
718
+ input: te.email(
719
+ Q(s),
720
+ o.placeholder(J(r, f.$.emailPlaceholderText)),
714
721
  o.value(t),
715
722
  o.class("bc-input"),
716
- n != null ? I.blur($(n)) : _,
717
- r != null ? I.change($(r)) : _,
718
- a != null ? I.input($(a)) : _
723
+ n != null ? E.blur(x(n)) : _,
724
+ a != null ? E.change(x(a)) : _,
725
+ l != null ? E.input(x(l)) : _
719
726
  )
720
727
  })
721
728
  );
722
- }, Me = (e) => {
729
+ }, $e = (e) => {
723
730
  const {
724
731
  value: s,
725
732
  onBlur: t,
726
733
  onChange: i,
727
734
  onInput: n,
728
- before: r,
729
- after: a,
730
- hasError: l,
735
+ before: a,
736
+ after: l,
737
+ hasError: r,
731
738
  disabled: c,
732
- autocomplete: p,
739
+ autocomplete: f,
733
740
  placeholder: u,
734
741
  ...g
735
742
  } = e, S = {
736
743
  name: "password",
737
744
  disabled: c,
738
745
  ...g
739
- }, v = T(!0), d = w(
746
+ }, v = I(!0), h = k(
740
747
  v,
741
- p
742
- )((h, f) => h ? f ?? "current-password" : "off");
743
- return j(q, (h) => {
744
- const f = w(
745
- h.$.passwordPlaceholderText,
748
+ f
749
+ )((d, p) => d ? p ?? "current-password" : "off");
750
+ return q(z, (d) => {
751
+ const p = k(
752
+ d.$.passwordPlaceholderText,
746
753
  v,
747
754
  u
748
- )((A, x, y) => x ? "•••••••••••••••" : y ?? A), E = b.button(
755
+ )((A, $, L) => $ ? "•••••••••••••••" : L ?? A), T = b.button(
749
756
  o.type("button"),
750
757
  o.class("bc-input-container__password-toggle"),
751
- P.label(h.$.togglePasswordVisibility),
752
- I.click(() => v.update((A) => !A)),
758
+ P.label(d.$.togglePasswordVisibility),
759
+ E.click(() => v.update((A) => !A)),
753
760
  O(
754
761
  v,
755
762
  () => N({ icon: "line-md:watch" }),
756
763
  () => N({ icon: "line-md:watch-off" })
757
764
  )
758
765
  );
759
- return U({
760
- before: r,
766
+ return R({
767
+ before: a,
761
768
  disabled: c,
762
- hasError: l,
769
+ hasError: r,
763
770
  input: b.input(
764
- J({
771
+ Q({
765
772
  ...S,
766
- autocomplete: d,
767
- placeholder: f
773
+ autocomplete: h,
774
+ placeholder: p
768
775
  }),
769
776
  O(
770
777
  v,
@@ -773,38 +780,38 @@ const Oe = (e) => {
773
780
  ),
774
781
  o.class("bc-input"),
775
782
  o.value(s),
776
- t != null ? I.blur($(t)) : _,
777
- i != null ? I.change($(i)) : _,
778
- n != null ? I.input($(n)) : _
783
+ t != null ? E.blur(x(t)) : _,
784
+ i != null ? E.change(x(i)) : _,
785
+ n != null ? E.input(x(n)) : _
779
786
  ),
780
- after: a != null ? B(E, a) : E
787
+ after: l != null ? B(T, l) : T
781
788
  });
782
789
  });
783
- }, de = (
790
+ }, pe = (
784
791
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
785
792
  (e, s) => () => {
786
793
  e.markTouched(), s?.();
787
794
  }
788
- ), pe = (e, s) => (t) => {
795
+ ), fe = (e, s) => (t) => {
789
796
  e.change(t), s?.(t);
790
797
  };
791
- function Y(e, s) {
792
- const { controller: t, onBlur: i, onChange: n, ...r } = s;
798
+ function Z(e, s) {
799
+ const { controller: t, onBlur: i, onChange: n, ...a } = s;
793
800
  return e({
794
801
  id: t.name,
795
802
  disabled: t.disabled,
796
803
  value: t.signal,
797
804
  hasError: t.errorVisible,
798
- ...r,
799
- onChange: pe(t, n),
800
- onBlur: de(t, i)
805
+ ...a,
806
+ onChange: fe(t, n),
807
+ onBlur: pe(t, i)
801
808
  });
802
809
  }
803
- function $e(e, s, ...t) {
804
- return X(
810
+ function xe(e, s, ...t) {
811
+ return Y(
805
812
  {
806
813
  ...s,
807
- content: Y(
814
+ content: Z(
808
815
  e,
809
816
  s
810
817
  )
@@ -812,40 +819,40 @@ function $e(e, s, ...t) {
812
819
  ...t
813
820
  );
814
821
  }
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
822
+ function be(e, s) {
823
+ const { toInput: t, fromInput: i, controller: n, ...a } = s, l = n.transform(t, i);
824
+ return Z(e, {
825
+ ...a,
826
+ controller: l
820
827
  });
821
828
  }
822
- function xe(e, s, ...t) {
823
- return X(
829
+ function Fe(e, s, ...t) {
830
+ return Y(
824
831
  {
825
832
  ...s,
826
- content: fe(e, s)
833
+ content: be(e, s)
827
834
  },
828
835
  ...t
829
836
  );
830
837
  }
831
- function Fe(e) {
838
+ function Pe(e) {
832
839
  return e.split(".").map((t) => {
833
840
  const i = t.match(/^\[(\d+)\]$/);
834
841
  return i ? Number(i[1]) : t;
835
842
  });
836
843
  }
837
- function be(e) {
844
+ function me(e) {
838
845
  return typeof e == "number" ? `[${e}]` : `.${e}`;
839
846
  }
840
- function me(e) {
847
+ function ge(e) {
841
848
  if (e.length === 0) return "";
842
849
  const [s, ...t] = e;
843
850
  return [
844
851
  typeof s == "number" ? `[${s}]` : s,
845
- ...t.map(be)
852
+ ...t.map(me)
846
853
  ].join("");
847
854
  }
848
- function L(e) {
855
+ function j(e) {
849
856
  return function(t) {
850
857
  if (t.type === "valid") return t;
851
858
  let i = t.error;
@@ -866,42 +873,42 @@ class M {
866
873
  dirty;
867
874
  dependencyErrors;
868
875
  #e = {
869
- disabled: T(!1),
870
- touched: T(!1)
876
+ disabled: I(!1),
877
+ touched: I(!1)
871
878
  };
872
879
  #t;
873
- #s = T(void 0);
880
+ #s = I(void 0);
874
881
  parent;
875
882
  disabled;
876
883
  #n = [];
877
884
  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(
885
+ constructor(s, t, i, n, a, l = F) {
886
+ this.path = s, this.change = t, this.signal = i, this.status = n, this.#t = l, this.#s.set(i.value), this.error = n.map(
887
+ (r) => r?.type === "invalid" ? r.error?.message : void 0
888
+ ), this.hasError = this.error.map((r) => r != null), this.touched = this.#e.touched, a.validationMode ? this.errorVisible = k(
882
889
  this.hasError,
883
890
  this.touched,
884
- r.validationMode
885
- )((l, c, p) => p === "continuous" ? !!l : !!l && !!c) : this.errorVisible = w(
891
+ a.validationMode
892
+ )((r, c, f) => f === "continuous" ? !!r : !!r && !!c) : this.errorVisible = k(
886
893
  this.hasError,
887
894
  this.touched
888
- )((l, c) => !!l && !!c), this.dirty = w(
895
+ )((r, c) => !!r && !!c), this.dirty = k(
889
896
  this.signal,
890
897
  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(
898
+ )((r, c) => !this.#t(r, c)), this.dependencyErrors = n.map(
899
+ (r) => r?.type === "invalid" ? r.error?.dependencies : void 0
900
+ ), this.parent = a, this.disabled = k(
894
901
  this.#e.disabled,
895
- r.disabled
896
- )((l, c) => l || c), this.disabledOrHasErrors = w(
902
+ a.disabled
903
+ )((r, c) => r || c), this.disabledOrHasErrors = k(
897
904
  this.disabled,
898
905
  this.hasError
899
- )((l, c) => l || c), this.onDispose(() => {
906
+ )((r, c) => r || c), this.onDispose(() => {
900
907
  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
908
  });
902
909
  }
903
910
  get name() {
904
- return me(this.path);
911
+ return ge(this.path);
905
912
  }
906
913
  onDispose = (s) => {
907
914
  this.#n.push(s);
@@ -932,7 +939,7 @@ class M {
932
939
  reset = () => {
933
940
  this.change(this.#s.value);
934
941
  };
935
- array = (s = F) => new ve(
942
+ array = (s = F) => new ye(
936
943
  this.path,
937
944
  this.change,
938
945
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -941,7 +948,7 @@ class M {
941
948
  this.parent,
942
949
  s
943
950
  );
944
- object = (s = F) => new ge(
951
+ object = (s = F) => new ve(
945
952
  this.path,
946
953
  this.change,
947
954
  this.signal,
@@ -951,32 +958,32 @@ class M {
951
958
  );
952
959
  transform = (s, t, i = [], n = F) => new M(
953
960
  [...this.path, ...i],
954
- (r) => this.change(t(r)),
961
+ (a) => this.change(t(a)),
955
962
  this.signal.map(s, n),
956
- this.status.map(L(i)),
963
+ this.status.map(j(i)),
957
964
  this.parent,
958
965
  n
959
966
  );
960
- asyncTransform = (s, t, i, n = [], r = F) => new M(
967
+ asyncTransform = (s, t, i, n = [], a = F) => new M(
961
968
  [...this.path, ...n],
962
- (a) => {
963
- t(a).then((l) => this.change(l));
969
+ (l) => {
970
+ t(l).then((r) => this.change(r));
964
971
  },
965
- this.signal.mapAsync(s, i, void 0, r),
966
- this.status.map(L(n)),
972
+ this.signal.mapAsync(s, i, void 0, a),
973
+ this.status.map(j(n)),
967
974
  this.parent,
968
- r
975
+ a
969
976
  );
970
977
  }
971
- class ge extends M {
978
+ class ve extends M {
972
979
  #e = /* @__PURE__ */ new Map();
973
980
  #t = /* @__PURE__ */ new Map();
974
981
  #s = /* @__PURE__ */ new Map();
975
- #n = T(!1);
982
+ #n = I(!1);
976
983
  touchedDeep = this.#n;
977
- #r = /* @__PURE__ */ new Map();
984
+ #a = /* @__PURE__ */ new Map();
978
985
  #i = /* @__PURE__ */ new Map();
979
- #l = T(!1);
986
+ #l = I(!1);
980
987
  dirtyDeep = this.#l;
981
988
  #o;
982
989
  #u;
@@ -989,20 +996,20 @@ class ge extends M {
989
996
  }
990
997
  this.#n.set(this.touched.value || s);
991
998
  };
992
- constructor(s, t, i, n, r, a) {
999
+ constructor(s, t, i, n, a, l) {
993
1000
  super(
994
1001
  s,
995
1002
  t,
996
- i.map((c) => c ?? {}, a),
1003
+ i.map((c) => c ?? {}, l),
997
1004
  n,
998
- r,
999
- a
1005
+ a,
1006
+ l
1000
1007
  ), this.#o = this.touched.on(() => {
1001
1008
  this.#c();
1002
1009
  }), this.#u = this.dirty.on(() => {
1003
- this.#a();
1010
+ this.#r();
1004
1011
  });
1005
- const l = this.signal.on(() => this.#a());
1012
+ const r = this.signal.on(() => this.#r());
1006
1013
  this.onDispose(() => {
1007
1014
  for (const c of this.#e.values())
1008
1015
  c.dispose();
@@ -1010,22 +1017,22 @@ class ge extends M {
1010
1017
  for (const c of this.#s.values()) c();
1011
1018
  this.#s.clear(), this.#t.clear(), this.#n.dispose();
1012
1019
  for (const c of this.#i.values()) c();
1013
- this.#i.clear(), this.#r.clear(), this.#l.dispose(), this.#o(), this.#u(), l();
1020
+ this.#i.clear(), this.#a.clear(), this.#l.dispose(), this.#o(), this.#u(), r();
1014
1021
  });
1015
1022
  }
1016
1023
  field = (s) => {
1017
1024
  if (this.#e.has(s))
1018
1025
  return this.#e.get(s);
1019
- const t = async (a) => {
1026
+ const t = async (l) => {
1020
1027
  this.change({
1021
1028
  ...this.signal.value,
1022
- [s]: a
1029
+ [s]: l
1023
1030
  });
1024
1031
  }, i = new M(
1025
1032
  [...this.path, s],
1026
1033
  t,
1027
- this.signal.map((a) => a[s]),
1028
- this.status.map(L([s])),
1034
+ this.signal.map((l) => l[s]),
1035
+ this.status.map(j([s])),
1029
1036
  {
1030
1037
  disabled: this.disabled,
1031
1038
  // propagate validationMode to children if present
@@ -1033,14 +1040,14 @@ class ge extends M {
1033
1040
  }
1034
1041
  );
1035
1042
  this.#e.set(s, i);
1036
- const n = i.touched.on((a) => {
1037
- this.#t.set(s, a), this.#c();
1043
+ const n = i.touched.on((l) => {
1044
+ this.#t.set(s, l), this.#c();
1038
1045
  });
1039
1046
  this.#s.set(s, n);
1040
- const r = i.dirty.on((a) => {
1041
- this.#r.set(s, a), this.#a();
1047
+ const a = i.dirty.on((l) => {
1048
+ this.#a.set(s, l), this.#r();
1042
1049
  });
1043
- return this.#i.set(s, r), i;
1050
+ return this.#i.set(s, a), i;
1044
1051
  };
1045
1052
  markAllTouched = () => {
1046
1053
  this.markTouched();
@@ -1058,9 +1065,9 @@ class ge extends M {
1058
1065
  for (const t of this.#e.values())
1059
1066
  t.markPristine?.();
1060
1067
  };
1061
- #a = () => {
1068
+ #r = () => {
1062
1069
  let s = !1;
1063
- for (const t of this.#r.values())
1070
+ for (const t of this.#a.values())
1064
1071
  if (t) {
1065
1072
  s = !0;
1066
1073
  break;
@@ -1068,16 +1075,16 @@ class ge extends M {
1068
1075
  this.#l.set(this.dirty.value || s);
1069
1076
  };
1070
1077
  }
1071
- class ve extends M {
1078
+ class ye extends M {
1072
1079
  #e = new Array();
1073
1080
  length;
1074
1081
  #t = /* @__PURE__ */ new Map();
1075
1082
  #s = /* @__PURE__ */ new Map();
1076
- #n = T(!1);
1083
+ #n = I(!1);
1077
1084
  touchedDeep = this.#n;
1078
- #r = /* @__PURE__ */ new Map();
1085
+ #a = /* @__PURE__ */ new Map();
1079
1086
  #i = /* @__PURE__ */ new Map();
1080
- #l = T(!1);
1087
+ #l = I(!1);
1081
1088
  dirtyDeep = this.#l;
1082
1089
  #o;
1083
1090
  #u;
@@ -1090,57 +1097,57 @@ class ve extends M {
1090
1097
  }
1091
1098
  this.#n.set(this.touched.value || s);
1092
1099
  };
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) => {
1100
+ constructor(s, t, i, n, a, l) {
1101
+ const r = i.map((u) => u ?? [], l);
1102
+ super(s, t, r, n, a, l);
1103
+ const c = r.on((u) => {
1097
1104
  const g = this.#e.length - u.length;
1098
1105
  g > 0 && (this.#e.splice(u.length, g).forEach((S, v) => {
1099
- const d = u.length + v;
1100
- S.dispose(), this.#s.get(d)?.(), this.#s.delete(d), this.#t.delete(d), this.#i.get(d)?.(), this.#i.delete(d), this.#r.delete(d);
1101
- }), this.#c(), this.#a());
1106
+ const h = u.length + v;
1107
+ S.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);
1108
+ }), this.#c(), this.#r());
1102
1109
  });
1103
- this.length = l.map((u) => u.length), this.#o = this.touched.on(() => {
1110
+ this.length = r.map((u) => u.length), this.#o = this.touched.on(() => {
1104
1111
  this.#c();
1105
1112
  }), this.#u = this.dirty.on(() => {
1106
- this.#a();
1113
+ this.#r();
1107
1114
  });
1108
- const p = this.signal.on(() => this.#a());
1115
+ const f = this.signal.on(() => this.#r());
1109
1116
  this.onDispose(() => {
1110
1117
  for (const u of this.#e)
1111
1118
  u.dispose();
1112
- this.length.dispose(), this.#e.length = 0, c(), l.dispose();
1119
+ this.length.dispose(), this.#e.length = 0, c(), r.dispose();
1113
1120
  for (const u of this.#s.values()) u();
1114
1121
  this.#s.clear(), this.#t.clear(), this.#n.dispose();
1115
1122
  for (const u of this.#i.values()) u();
1116
- this.#i.clear(), this.#r.clear(), this.#l.dispose(), this.#o(), this.#u(), p();
1123
+ this.#i.clear(), this.#a.clear(), this.#l.dispose(), this.#o(), this.#u(), f();
1117
1124
  });
1118
1125
  }
1119
1126
  item = (s) => {
1120
1127
  if (this.#e[s])
1121
1128
  return this.#e[s];
1122
- const t = async (a) => {
1123
- const l = this.signal.value.slice();
1124
- l[s] = a, this.change(l);
1129
+ const t = async (l) => {
1130
+ const r = this.signal.value.slice();
1131
+ r[s] = l, this.change(r);
1125
1132
  }, i = new M(
1126
1133
  [...this.path, s],
1127
1134
  t,
1128
- this.signal.map((a) => a[s]),
1129
- this.status.map(L([s])),
1135
+ this.signal.map((l) => l[s]),
1136
+ this.status.map(j([s])),
1130
1137
  {
1131
1138
  disabled: this.disabled,
1132
1139
  validationMode: this.parent.validationMode
1133
1140
  }
1134
1141
  );
1135
1142
  this.#e[s] = i;
1136
- const n = i.touched.on((a) => {
1137
- this.#t.set(s, a), this.#c();
1143
+ const n = i.touched.on((l) => {
1144
+ this.#t.set(s, l), this.#c();
1138
1145
  });
1139
1146
  this.#s.set(s, n);
1140
- const r = i.dirty.on((a) => {
1141
- this.#r.set(s, a), this.#a();
1147
+ const a = i.dirty.on((l) => {
1148
+ this.#a.set(s, l), this.#r();
1142
1149
  });
1143
- return this.#i.set(s, r), i;
1150
+ return this.#i.set(s, a), i;
1144
1151
  };
1145
1152
  push = (...s) => {
1146
1153
  this.change([...this.signal.value, ...s]);
@@ -1163,8 +1170,8 @@ class ve extends M {
1163
1170
  };
1164
1171
  move = (s, t, i = 1) => {
1165
1172
  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);
1173
+ const n = this.signal.value.slice(), a = n.splice(s, i);
1174
+ n.splice(t, 0, ...a), this.change(n);
1168
1175
  };
1169
1176
  markAllTouched = () => {
1170
1177
  this.markTouched();
@@ -1178,9 +1185,9 @@ class ve extends M {
1178
1185
  for (let t = 0; t < s; t++)
1179
1186
  this.item(t).markPristine?.();
1180
1187
  };
1181
- #a = () => {
1188
+ #r = () => {
1182
1189
  let s = !1;
1183
- for (const t of this.#r.values())
1190
+ for (const t of this.#a.values())
1184
1191
  if (t) {
1185
1192
  s = !0;
1186
1193
  break;
@@ -1188,7 +1195,7 @@ class ve extends M {
1188
1195
  this.#l.set(this.dirty.value || s);
1189
1196
  };
1190
1197
  }
1191
- function ye(e) {
1198
+ function we(e) {
1192
1199
  function s(t) {
1193
1200
  return typeof t == "number" ? t : t.toString();
1194
1201
  }
@@ -1197,12 +1204,12 @@ function ye(e) {
1197
1204
  );
1198
1205
  }
1199
1206
  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
+ 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) => {
1208
+ const l = we(a.path), r = l.pop();
1202
1209
  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;
1210
+ for (const f of l)
1211
+ c.dependencies == null && (c.dependencies = {}), c.dependencies[f] == null && (c.dependencies[f] = {}), c = c.dependencies[f];
1212
+ return c.dependencies == null && (c.dependencies = {}), c.dependencies[r] = { message: a.message }, n;
1206
1213
  }, {}), i = s.join(`
1207
1214
  `);
1208
1215
  return {
@@ -1210,76 +1217,76 @@ function ke(e) {
1210
1217
  message: i != "" ? i : void 0
1211
1218
  };
1212
1219
  }
1213
- function we({
1220
+ function Se({
1214
1221
  initialValue: e,
1215
1222
  onChange: s,
1216
1223
  validate: t,
1217
1224
  equals: i,
1218
1225
  validationMode: n,
1219
- validateDebounceMs: r
1226
+ validateDebounceMs: a
1220
1227
  }) {
1221
- const a = C.deriveProp(e), l = T(D.valid), c = T(!1), p = T(n ?? "touchedOrSubmit"), u = (h) => {
1222
- l.set(h);
1228
+ const l = C.deriveProp(e), r = I(D.valid), c = I(!1), f = I(n ?? "touchedOrSubmit"), u = (d) => {
1229
+ r.set(d);
1223
1230
  };
1224
1231
  let g;
1225
- const S = async (h) => {
1232
+ const S = async (d) => {
1226
1233
  if (t != null) {
1227
- const f = await t(h);
1228
- u(f);
1234
+ const p = await t(d);
1235
+ u(p);
1229
1236
  }
1230
- }, v = async (h) => {
1231
- a.set(h), s?.(h);
1232
- const f = p.value;
1237
+ }, v = async (d) => {
1238
+ l.set(d), s?.(d);
1239
+ const p = f.value;
1233
1240
  if (t != null) {
1234
- if (f === "onSubmit")
1241
+ if (p === "onSubmit")
1235
1242
  return;
1236
- const E = r ?? 0;
1237
- E > 0 ? (g && clearTimeout(g), g = setTimeout(() => {
1238
- S(h);
1239
- }, E)) : await S(h);
1243
+ const T = a ?? 0;
1244
+ T > 0 ? (g && clearTimeout(g), g = setTimeout(() => {
1245
+ S(d);
1246
+ }, T)) : await S(d);
1240
1247
  }
1241
- }, d = new M(
1248
+ }, h = new M(
1242
1249
  [],
1243
1250
  v,
1244
- a,
1245
1251
  l,
1252
+ r,
1246
1253
  {
1247
1254
  disabled: c,
1248
- validationMode: p
1255
+ validationMode: f
1249
1256
  },
1250
1257
  i ?? F
1251
1258
  );
1252
- return d.onDispose(() => {
1253
- c.dispose(), a.dispose(), l.dispose(), p.dispose(), g && clearTimeout(g);
1254
- }), { controller: d, setStatus: u };
1259
+ return h.onDispose(() => {
1260
+ c.dispose(), l.dispose(), r.dispose(), f.dispose(), g && clearTimeout(g);
1261
+ }), { controller: h, setStatus: u };
1255
1262
  }
1256
- function Z(e) {
1263
+ function ee(e) {
1257
1264
  return B(o.disabled(e.disabled), o.name(e.name));
1258
1265
  }
1259
- function Pe(e, {
1266
+ function Be(e, {
1260
1267
  triggerOn: s = "change"
1261
1268
  } = {}) {
1262
1269
  return B(
1263
- Z(e),
1270
+ ee(e),
1264
1271
  o.value(e.signal),
1265
- (s === "input" ? I.input : I.change)($(e.change))
1272
+ (s === "input" ? E.input : E.change)(x(e.change))
1266
1273
  );
1267
1274
  }
1268
- function Be(e, {
1275
+ function Ne(e, {
1269
1276
  triggerOn: s = "change"
1270
1277
  } = {}) {
1271
1278
  return B(
1272
- Z(e),
1279
+ ee(e),
1273
1280
  o.valueAsNumber(e.signal),
1274
- (s === "input" ? I.input : I.change)(
1275
- te(e.change)
1281
+ (s === "input" ? E.input : E.change)(
1282
+ ne(e.change)
1276
1283
  )
1277
1284
  );
1278
1285
  }
1279
- function K(e) {
1286
+ function G(e) {
1280
1287
  return e.issues != null ? D.invalid(ke(e.issues)) : D.valid;
1281
1288
  }
1282
- async function Ne({
1289
+ async function Le({
1283
1290
  task: e,
1284
1291
  errorMessage: s,
1285
1292
  errorPath: t = ["root"],
@@ -1289,15 +1296,15 @@ async function Ne({
1289
1296
  const n = await e();
1290
1297
  return i != null ? i(n) : D.valid;
1291
1298
  } catch (n) {
1292
- const r = s ?? (n instanceof Error ? n.message : "Operation failed");
1299
+ const a = s ?? (n instanceof Error ? n.message : "Operation failed");
1293
1300
  return t.length === 1 && t[0] === "root" ? D.invalid({
1294
- message: r
1301
+ message: a
1295
1302
  }) : D.invalid({
1296
- dependencies: ee(t, r)
1303
+ dependencies: se(t, a)
1297
1304
  });
1298
1305
  }
1299
1306
  }
1300
- function ee(e, s) {
1307
+ function se(e, s) {
1301
1308
  if (e.length === 1)
1302
1309
  return {
1303
1310
  [e[0]]: { message: s }
@@ -1305,45 +1312,48 @@ function ee(e, s) {
1305
1312
  const [t, ...i] = e;
1306
1313
  return {
1307
1314
  [t]: {
1308
- dependencies: ee(i, s)
1315
+ dependencies: se(i, s)
1309
1316
  }
1310
1317
  };
1311
1318
  }
1312
- function Le({
1319
+ function je({
1313
1320
  initialValue: e = {},
1314
1321
  schema: s,
1315
1322
  onSubmit: t = async () => D.valid,
1316
1323
  validationMode: i,
1317
1324
  validateDebounceMs: n
1318
1325
  }) {
1319
- const { controller: r, setStatus: a } = we({
1326
+ const { controller: a, setStatus: l } = Se({
1320
1327
  initialValue: e,
1321
1328
  validationMode: i ?? "touchedOrSubmit",
1322
1329
  validateDebounceMs: n,
1323
- validate: (i ?? "touchedOrSubmit") === "onSubmit" ? void 0 : async (u) => K(
1330
+ validate: (i ?? "touchedOrSubmit") === "onSubmit" || s == null ? void 0 : async (u) => G(
1324
1331
  await s["~standard"].validate(u)
1325
1332
  )
1326
- }), l = T(!1), c = r.object();
1327
- return c.onDispose(l.dispose), {
1333
+ }), r = I(!1), c = a.object();
1334
+ return c.onDispose(r.dispose), {
1328
1335
  controller: c,
1329
- setStatus: a,
1336
+ setStatus: l,
1330
1337
  submit: async (u) => {
1331
- if (l.set(!0), u?.preventDefault(), c.markAllTouched(), (i ?? "touchedOrSubmit") === "onSubmit") {
1332
- const S = c.signal.value, v = K(
1333
- await s["~standard"].validate(S)
1334
- );
1335
- if (a(v), v.type === "invalid") {
1336
- l.set(!1);
1338
+ if (r.set(!0), u?.preventDefault(), c.markAllTouched(), (i ?? "touchedOrSubmit") === "onSubmit") {
1339
+ const S = c.signal.value, v = s?.["~standard"].validate;
1340
+ if (v == null) {
1341
+ r.set(!1);
1342
+ return;
1343
+ }
1344
+ const h = G(await v(S));
1345
+ if (l(h), h.type === "invalid") {
1346
+ r.set(!1);
1337
1347
  return;
1338
1348
  }
1339
1349
  }
1340
1350
  const g = await t(c.signal.value);
1341
- l.set(!1), g.type === "invalid" && a(g);
1351
+ r.set(!1), g.type === "invalid" && l(g);
1342
1352
  },
1343
- submitting: l
1353
+ submitting: r
1344
1354
  };
1345
1355
  }
1346
- function Se(e) {
1356
+ function Ce(e) {
1347
1357
  switch (e) {
1348
1358
  case "success":
1349
1359
  return "material-symbols:check-circle-outline";
@@ -1356,7 +1366,7 @@ function Se(e) {
1356
1366
  return "material-symbols:info-outline";
1357
1367
  }
1358
1368
  }
1359
- function Ce(e) {
1369
+ function _e(e) {
1360
1370
  switch (e) {
1361
1371
  case "success":
1362
1372
  return "success";
@@ -1369,7 +1379,7 @@ function Ce(e) {
1369
1379
  return "info";
1370
1380
  }
1371
1381
  }
1372
- function _e(e, s, t, i) {
1382
+ function De(e, s, t, i) {
1373
1383
  const n = [
1374
1384
  "bc-notice",
1375
1385
  `bc-notice--${e}`,
@@ -1377,106 +1387,106 @@ function _e(e, s, t, i) {
1377
1387
  ];
1378
1388
  return t && n.push("bc-notice--dismissible"), i && i.length > 0 && n.push(i), n.join(" ");
1379
1389
  }
1380
- function je({
1390
+ function qe({
1381
1391
  variant: e = "info",
1382
1392
  tone: s = "subtle",
1383
1393
  role: t,
1384
1394
  title: i,
1385
1395
  icon: n,
1386
- closable: r = !1,
1387
- onDismiss: a,
1388
- class: l
1396
+ closable: a = !1,
1397
+ onDismiss: l,
1398
+ class: r
1389
1399
  }, ...c) {
1390
- const p = C.map(
1391
- r,
1392
- (h) => !!h || a != null
1393
- ), u = C.map(e, (h) => h ?? "info"), g = C.map(s, (h) => h ?? "subtle"), S = w(
1400
+ const f = C.map(
1401
+ a,
1402
+ (d) => !!d || l != null
1403
+ ), u = C.map(e, (d) => d ?? "info"), g = C.map(s, (d) => d ?? "subtle"), S = k(
1394
1404
  t,
1395
1405
  u
1396
1406
  )(
1397
- (h, f) => h ?? (f === "danger" ? "alert" : "status")
1398
- ), v = T(!0), d = j(
1399
- q,
1400
- (h) => b.div(
1407
+ (d, p) => d ?? (p === "danger" ? "alert" : "status")
1408
+ ), v = I(!0), h = q(
1409
+ z,
1410
+ (d) => b.div(
1401
1411
  o.class(
1402
- w(
1412
+ k(
1403
1413
  u,
1404
1414
  g,
1405
- p,
1406
- l
1407
- )((f, E, A, x) => _e(f, E, A, x))
1415
+ f,
1416
+ r
1417
+ )((p, T, A, $) => De(p, T, A, $))
1408
1418
  ),
1409
1419
  // Accessibility role mapping (always defined)
1410
- o.role(C.map(S, (f) => f)),
1411
- ne(
1412
- C.map(n, (f) => f === !1),
1420
+ o.role(C.map(S, (p) => p)),
1421
+ ie(
1422
+ C.map(n, (p) => p === !1),
1413
1423
  () => b.div(
1414
1424
  o.class("bc-notice__icon"),
1415
1425
  N({
1416
- icon: w(
1426
+ icon: k(
1417
1427
  n,
1418
1428
  u
1419
- )((f, E) => f === void 0 ? Se(E) : String(f)),
1429
+ )((p, T) => p === void 0 ? Ce(T) : String(p)),
1420
1430
  size: "md",
1421
- color: C.map(u, Ce)
1431
+ color: C.map(u, _e)
1422
1432
  })
1423
1433
  )
1424
1434
  ),
1425
1435
  b.div(
1426
1436
  o.class("bc-notice__body"),
1427
- ie(i, (f) => b.div(o.class("bc-notice__title"), f)),
1437
+ ae(i, (p) => b.div(o.class("bc-notice__title"), p)),
1428
1438
  b.div(o.class("bc-notice__content"), ...c)
1429
1439
  ),
1430
1440
  O(
1431
- p,
1432
- () => ae({
1441
+ f,
1442
+ () => le({
1433
1443
  size: "xs",
1434
- label: h.$.closeModal,
1444
+ label: d.$.closeModal,
1435
1445
  onClick: () => {
1436
- v.set(!1), a?.();
1446
+ v.set(!1), l?.();
1437
1447
  }
1438
1448
  })
1439
1449
  )
1440
1450
  )
1441
1451
  );
1442
- return O(v, () => d);
1452
+ return O(v, () => h);
1443
1453
  }
1444
1454
  export {
1445
- ve as A,
1446
- Y as B,
1447
- ae as C,
1448
- Te as D,
1449
- Oe as E,
1450
- X as I,
1451
- le as L,
1452
- xe as M,
1453
- je as N,
1455
+ ye as A,
1456
+ Z as B,
1457
+ le as C,
1458
+ Ae as D,
1459
+ Me as E,
1460
+ Y as I,
1461
+ ce as L,
1462
+ Fe as M,
1463
+ qe as N,
1454
1464
  F as O,
1455
- Me as P,
1456
- oe as R,
1457
- Ve as S,
1465
+ $e as P,
1466
+ ue as R,
1467
+ Oe as S,
1458
1468
  D as a,
1459
- Ae as b,
1460
- $e as c,
1461
- pe as d,
1469
+ Ve as b,
1470
+ xe as c,
1471
+ fe as d,
1462
1472
  M as e,
1463
- L as f,
1464
- fe as g,
1465
- me as h,
1466
- ge as i,
1467
- ye as j,
1473
+ j as f,
1474
+ be as g,
1475
+ ge as h,
1476
+ ve as i,
1477
+ we as j,
1468
1478
  ke as k,
1469
- we as l,
1470
- de as m,
1471
- Z as n,
1472
- Pe as o,
1473
- Fe as p,
1474
- Be as q,
1475
- K as r,
1476
- Q as s,
1477
- Ne as t,
1478
- Le as u,
1479
- Ie as v,
1480
- be as w,
1481
- ce as x
1479
+ Se as l,
1480
+ pe as m,
1481
+ ee as n,
1482
+ Be as o,
1483
+ Pe as p,
1484
+ Ne as q,
1485
+ G as r,
1486
+ X as s,
1487
+ Le as t,
1488
+ je as u,
1489
+ Te as v,
1490
+ me as w,
1491
+ oe as x
1482
1492
  };