@tempots/beatui 0.39.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 (82) hide show
  1. package/dist/{2019-1S9vgvv2.cjs → 2019-nWH_nAwT.cjs} +1 -1
  2. package/dist/{2019-DPD_eCKE.js → 2019-sCKLAY8c.js} +2 -2
  3. package/dist/{2020-aLm9VmDL.js → 2020-B4xCW_nu.js} +2 -2
  4. package/dist/{2020-CGrbEEmD.cjs → 2020-D7RWX09D.cjs} +1 -1
  5. package/dist/{ar-B0vT_MPe.cjs → ar-D_4BfIJO.cjs} +1 -1
  6. package/dist/{ar-CbM09z5P.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 +181 -107
  10. package/dist/beatui.tailwind.css +181 -107
  11. package/dist/{de-tK36cL_u.cjs → de-C0PZz9sE.cjs} +1 -1
  12. package/dist/{de-Dd907tZQ.js → de-CeLwmVZz.js} +1 -1
  13. package/dist/{es-K35LRZa-.cjs → es-C8qT1ins.cjs} +1 -1
  14. package/dist/{es-BkJxjMdG.js → es-DxOgARww.js} +1 -1
  15. package/dist/{fa-DBTUBsw_.js → fa-B9pEff8A.js} +1 -1
  16. package/dist/{fa-BBikwwku.cjs → fa-BFV9MxMX.cjs} +1 -1
  17. package/dist/{fr-DMtXrrnJ.cjs → fr-BBx5IJ7G.cjs} +1 -1
  18. package/dist/{fr-Fmupo556.js → fr-Caeevx56.js} +1 -1
  19. package/dist/{he-on3Ivp8g.cjs → he-CMOvd4Dr.cjs} +1 -1
  20. package/dist/{he-DkI64oaY.js → he-DeN-WW3u.js} +1 -1
  21. package/dist/{hi-GdD5MihT.js → hi-Dey2HxiD.js} +1 -1
  22. package/dist/{hi-CNFV8ITE.cjs → hi-IOU_PzvH.cjs} +1 -1
  23. package/dist/{index-e8oQ-k0x.cjs → index-B0ff5lT-.cjs} +4 -4
  24. package/dist/{index-BkQ7xHgi.js → index-BTZqW3-b.js} +1245 -1232
  25. package/dist/{index-wdi93sK4.cjs → index-C2VAPX2b.cjs} +1 -1
  26. package/dist/{index-DjShJtXp.js → index-CAeOFdez.js} +1 -1
  27. package/dist/{index-BI5w0jSz.js → index-CBT2SLat.js} +224 -223
  28. package/dist/{index-Bv2gn_kV.cjs → index-ClFVnBUS.cjs} +3 -3
  29. package/dist/{index-BA93M8Ux.cjs → index-D8fg48Fv.cjs} +1 -1
  30. package/dist/{index-BfFlhmAq.js → index-DJqo6Guq.js} +1 -1
  31. package/dist/{index-CPBlySmE.cjs → index-Dtka01mK.cjs} +12 -12
  32. package/dist/{index-BK8t6gqu.js → index-HqWBd-jW.js} +680 -677
  33. package/dist/{index-LUItEwlw.js → index-IQ3lRaL0.js} +1 -1
  34. package/dist/{index-CKyH3jwP.cjs → index-KPHFBjQB.cjs} +1 -1
  35. package/dist/index.cjs.js +4 -4
  36. package/dist/index.es.js +1489 -1467
  37. package/dist/{it-Bpnfd60V.js → it-DghnQdZa.js} +1 -1
  38. package/dist/{it-BDOzBRkQ.cjs → it-uQF0jkDT.cjs} +1 -1
  39. package/dist/{ja-N-7c7zD7.cjs → ja-BJD6uPbl.cjs} +1 -1
  40. package/dist/{ja-SjlGNgs9.js → ja-Kb7rxmFg.js} +1 -1
  41. package/dist/json-schema/index.cjs.js +1 -1
  42. package/dist/json-schema/index.es.js +1 -1
  43. package/dist/{ko-CH69ZNts.js → ko-53o5WJ-v.js} +1 -1
  44. package/dist/{ko-BBeTXIlY.cjs → ko-B7bLdRnp.cjs} +1 -1
  45. package/dist/markdown/index.cjs.js +1 -1
  46. package/dist/markdown/index.es.js +1 -1
  47. package/dist/modal-BRUgTJG9.cjs +1 -0
  48. package/dist/{modal-BD76Rve3.js → modal-_2B8vIo0.js} +234 -209
  49. package/dist/{nl-C2C9QDH2.cjs → nl-CJE0fC8g.cjs} +1 -1
  50. package/dist/{nl-DnvMlW8v.js → nl-DvUVT7xd.js} +1 -1
  51. package/dist/{notice-CQZseCQs.js → notice-C4n5jXi6.js} +196 -186
  52. package/dist/notice-CncwkUTy.cjs +2 -0
  53. package/dist/{pl-CBEX2qN1.js → pl-C3oYeTwf.js} +1 -1
  54. package/dist/{pl-sNBCzEUd.cjs → pl-DUaY5slY.cjs} +1 -1
  55. package/dist/prosemirror/index.cjs.js +1 -1
  56. package/dist/prosemirror/index.es.js +1 -1
  57. package/dist/{pt-Bvxg9VEA.cjs → pt-BAqNKCuy.cjs} +1 -1
  58. package/dist/{pt-ByFqFAdQ.js → pt-BJGeScun.js} +1 -1
  59. package/dist/{ru-6d5JfoDw.js → ru-2irv1YXp.js} +1 -1
  60. package/dist/{ru-CPAdsn4m.cjs → ru-CAlgJm3K.cjs} +1 -1
  61. package/dist/{toolbar-Dw2VQD9y.cjs → toolbar-B7HrL0vD.cjs} +1 -1
  62. package/dist/{toolbar-Cl_TAa3r.js → toolbar-CVDXVnje.js} +1 -1
  63. package/dist/{tr-gv4vJfm8.js → tr-CkHLE5u7.js} +1 -1
  64. package/dist/{tr-IKZtCQQR.cjs → tr-DMiXAhok.cjs} +1 -1
  65. package/dist/{translations-djDSPqdb.js → translations-DEEflRUY.js} +61 -60
  66. package/dist/{translations-CK426qyd.cjs → translations-DRNj0YIi.cjs} +1 -1
  67. package/dist/{translations-DJR65Jii.cjs → translations-Dw1oO6Dh.cjs} +1 -1
  68. package/dist/{translations-DXLmnUiB.js → translations-Q5C5LyIi.js} +1 -1
  69. package/dist/types/components/misc/notification-provider.d.ts +3 -3
  70. package/dist/types/utils/use-animated-toggle.d.ts +17 -4
  71. package/dist/{ur-Bgq_2yjr.cjs → ur-BjiNs3SL.cjs} +1 -1
  72. package/dist/{ur-Bo6bjEBS.js → ur-bxBR_9Z-.js} +1 -1
  73. package/dist/{utils-Bw911Eo4.js → utils-BCbc19N0.js} +202 -193
  74. package/dist/utils-BJZipnfW.cjs +1 -0
  75. package/dist/{vi-BrUQnj-8.cjs → vi-CByOZvV2.cjs} +1 -1
  76. package/dist/{vi-xDLJ3TIx.js → vi-CKknZqol.js} +1 -1
  77. package/dist/{zh-BqH1Cioq.cjs → zh-C0QOebEA.cjs} +1 -1
  78. package/dist/{zh-BivWxJJh.js → zh-CmUgcP9o.js} +1 -1
  79. package/package.json +4 -3
  80. package/dist/modal-DQycMZ8_.cjs +0 -1
  81. package/dist/notice-CFoc4PJe.cjs +0 -2
  82. package/dist/utils-Bsrfm-0d.cjs +0 -1
@@ -1,7 +1,7 @@
1
- import { WithElement as S, OnDispose as W, prop as z, attr as g, computedOf as A, Fragment as R, WithBrowserCtx as J, Value as U, render as Q, html as k, dataAttr as F, aria as O, on as X, When as q, Use as H, coalesce as I } from "@tempots/dom";
2
- import { g as V, T as j } from "./timer-DzWb416P.js";
3
- import { s as Y, C as Z } from "./notice-CQZseCQs.js";
4
- import { a as K, B as _ } from "./translations-djDSPqdb.js";
1
+ import { WithElement as D, OnDispose as V, prop as R, computedOf as w, Fragment as B, attr as g, WithBrowserCtx as J, Value as U, render as Q, html as k, dataAttr as S, aria as F, on as X, When as I, Use as H, coalesce as _ } from "@tempots/dom";
2
+ import { g as $, T as P } from "./timer-DzWb416P.js";
3
+ import { s as Y, C as Z } from "./notice-C4n5jXi6.js";
4
+ import { a as K, B as W } from "./translations-DEEflRUY.js";
5
5
  const ee = [
6
6
  "a[href]",
7
7
  "button:not([disabled])",
@@ -23,23 +23,23 @@ function te(o) {
23
23
  }
24
24
  );
25
25
  }
26
- function $(o = {}) {
26
+ function M(o = {}) {
27
27
  const {
28
28
  active: t = !0,
29
29
  escapeDeactivates: s = !0,
30
30
  onEscape: e,
31
31
  initialFocus: n,
32
- returnFocus: a,
33
- clickOutsideDeactivates: i = !1,
34
- onClickOutside: d
32
+ returnFocus: r,
33
+ clickOutsideDeactivates: a = !1,
34
+ onClickOutside: u
35
35
  } = o;
36
- return S((f) => {
37
- let m = t, p = null, c = [];
36
+ return D((m) => {
37
+ let f = t, p = null, c = [];
38
38
  typeof document < "u" && (p = document.activeElement);
39
39
  const v = () => {
40
- c = te(f);
40
+ c = te(m);
41
41
  }, b = (l) => {
42
- if (m) {
42
+ if (f) {
43
43
  if (s && l.key === "Escape") {
44
44
  l.preventDefault(), e?.();
45
45
  return;
@@ -49,39 +49,39 @@ function $(o = {}) {
49
49
  l.preventDefault();
50
50
  return;
51
51
  }
52
- const r = c.indexOf(
52
+ const i = c.indexOf(
53
53
  document.activeElement
54
54
  );
55
- l.shiftKey ? r <= 0 && (l.preventDefault(), c[c.length - 1]?.focus()) : r >= c.length - 1 && (l.preventDefault(), c[0]?.focus());
55
+ l.shiftKey ? i <= 0 && (l.preventDefault(), c[c.length - 1]?.focus()) : i >= c.length - 1 && (l.preventDefault(), c[0]?.focus());
56
56
  }
57
57
  }
58
58
  }, h = (l) => {
59
- if (!m || !i) return;
60
- const r = l.target;
61
- f.contains(r) || d?.();
59
+ if (!f || !a) return;
60
+ const i = l.target;
61
+ m.contains(i) || u?.();
62
62
  }, y = () => {
63
- if (!m) return;
63
+ if (!f) return;
64
64
  v();
65
65
  let l = null;
66
66
  typeof n == "function" ? l = n() : n ? l = n : c.length > 0 && (l = c[0]), l && setTimeout(() => {
67
67
  l?.focus();
68
- }, 50), document.addEventListener("keydown", b, !0), i && document.addEventListener("click", h, !0);
69
- }, C = () => {
70
- m = !1, document.removeEventListener("keydown", b, !0), document.removeEventListener("click", h, !0);
68
+ }, 50), document.addEventListener("keydown", b, !0), a && document.addEventListener("click", h, !0);
69
+ }, L = () => {
70
+ f = !1, document.removeEventListener("keydown", b, !0), document.removeEventListener("click", h, !0);
71
71
  let l = null;
72
- typeof a == "function" ? l = a() : a ? l = a : p && (l = p), l && document.body.contains(l) && setTimeout(() => {
72
+ typeof r == "function" ? l = r() : r ? l = r : p && (l = p), l && document.body.contains(l) && setTimeout(() => {
73
73
  l?.focus();
74
74
  }, 0);
75
75
  };
76
- return setTimeout(() => y(), 0), W(() => {
77
- C();
76
+ return setTimeout(() => y(), 0), V(() => {
77
+ L();
78
78
  });
79
79
  });
80
80
  }
81
- function me(o = {}) {
81
+ function pe(o = {}) {
82
82
  return {
83
- activate: () => $({ ...o, active: !0 }),
84
- deactivate: () => $({ ...o, active: !1 })
83
+ activate: () => M({ ...o, active: !0 }),
84
+ deactivate: () => M({ ...o, active: !1 })
85
85
  };
86
86
  }
87
87
  function N({
@@ -89,35 +89,35 @@ function N({
89
89
  openedAfter: t,
90
90
  closedAfter: s
91
91
  }) {
92
- const e = z(o), n = () => {
92
+ const e = R(o), n = () => {
93
93
  e.set("start-opening");
94
- }, a = () => {
94
+ }, r = () => {
95
95
  e.set("start-closing");
96
- }, i = e.map(
97
- (r) => r !== "closed" && r !== "start-closing" && r !== "closing"
98
- ), d = (r) => {
99
- r ? n() : a();
100
- }, f = () => {
101
- d(!i.value);
102
- }, m = [], p = (r) => {
103
- m.push(
104
- e.on((x) => {
105
- x === "closed" && r();
96
+ }, a = e.map(
97
+ (i) => i !== "closed" && i !== "start-closing" && i !== "closing"
98
+ ), u = (i) => {
99
+ i ? n() : r();
100
+ }, m = () => {
101
+ u(!a.value);
102
+ }, f = [], p = (i) => {
103
+ f.push(
104
+ e.on((T) => {
105
+ T === "closed" && i();
106
106
  })
107
107
  );
108
108
  };
109
109
  let c = () => {
110
110
  };
111
- e.on((r) => {
112
- switch (c(), r) {
111
+ e.on((i) => {
112
+ switch (c(), i) {
113
113
  case "start-opening":
114
- c = V(() => e.set("opening"));
114
+ c = $(() => e.set("opening"));
115
115
  break;
116
116
  case "opening":
117
117
  c = t(() => e.set("opened"));
118
118
  break;
119
119
  case "start-closing":
120
- c = V(() => e.set("closing"));
120
+ c = $(() => e.set("closing"));
121
121
  break;
122
122
  case "closing":
123
123
  c = s(() => e.set("closed"));
@@ -128,27 +128,27 @@ function N({
128
128
  break;
129
129
  }
130
130
  }), e.onDispose(() => {
131
- m.forEach((r) => r()), c();
131
+ f.forEach((i) => i()), c();
132
132
  });
133
- const v = e.map((r) => r === "closed"), b = e.map((r) => r === "start-opening"), h = e.map((r) => r === "opening"), y = e.map((r) => r === "opened"), C = e.map((r) => r === "closing"), l = e.map((r) => r === "start-closing");
133
+ const v = e.map((i) => i === "closed"), b = e.map((i) => i === "start-opening"), h = e.map((i) => i === "opening"), y = e.map((i) => i === "opened"), L = e.map((i) => i === "closing"), l = e.map((i) => i === "start-closing");
134
134
  return {
135
135
  status: e,
136
136
  open: n,
137
- close: a,
138
- toggle: f,
139
- setOpen: d,
140
- display: i,
137
+ close: r,
138
+ toggle: m,
139
+ setOpen: u,
140
+ display: a,
141
141
  isClosed: v,
142
142
  isStartOpening: b,
143
143
  isOpening: h,
144
144
  isOpened: y,
145
- isClosing: C,
145
+ isClosing: L,
146
146
  isStartClosing: l,
147
147
  dispose: () => e.dispose(),
148
148
  listenOnClosed: p
149
149
  };
150
150
  }
151
- function fe({
151
+ function he({
152
152
  initialStatus: o = "closed",
153
153
  duration: t,
154
154
  openDuration: s = t ?? 500,
@@ -156,30 +156,30 @@ function fe({
156
156
  } = {}) {
157
157
  return N({
158
158
  initialStatus: o,
159
- openedAfter: (n) => j(n, s),
160
- closedAfter: (n) => j(n, e)
159
+ openedAfter: (n) => P(n, s),
160
+ closedAfter: (n) => P(n, e)
161
161
  });
162
162
  }
163
- function P(o, t) {
163
+ function z(o, t) {
164
164
  let s = !1, e = null;
165
165
  function n() {
166
- s || (s = !0, o.removeEventListener("transitionend", a), o.removeEventListener("animationend", i), e && (clearTimeout(e), e = null), t());
166
+ s || (s = !0, o.removeEventListener("transitionend", r), o.removeEventListener("animationend", a), e && (clearTimeout(e), e = null), t());
167
167
  }
168
- function a(m) {
169
- m.target === o && n();
168
+ function r(f) {
169
+ f.target === o && n();
170
170
  }
171
- function i(m) {
172
- m.target === o && n();
171
+ function a(f) {
172
+ f.target === o && n();
173
173
  }
174
- const f = V(() => {
174
+ const m = $(() => {
175
175
  if (typeof o.getAnimations > "u") {
176
176
  e = setTimeout(n, 16);
177
177
  return;
178
178
  }
179
- o.addEventListener("transitionend", a), o.addEventListener("animationend", i), o.getAnimations().length === 0 && (e = setTimeout(n, 1e3));
179
+ o.addEventListener("transitionend", r), o.addEventListener("animationend", a), o.getAnimations().length === 0 && (e = setTimeout(n, 1e3));
180
180
  });
181
181
  return () => {
182
- s = !0, f(), e && (clearTimeout(e), e = null), o.removeEventListener("transitionend", a), o.removeEventListener("animationend", i);
182
+ s = !0, m(), e && (clearTimeout(e), e = null), o.removeEventListener("transitionend", r), o.removeEventListener("animationend", a);
183
183
  };
184
184
  }
185
185
  function G({
@@ -194,42 +194,67 @@ function G({
194
194
  ...N({
195
195
  initialStatus: o,
196
196
  openedAfter: (e) => s == null ? (e(), () => {
197
- }) : P(s, e),
197
+ }) : z(s, e),
198
198
  closedAfter: (e) => s == null ? (e(), () => {
199
- }) : P(s, e)
199
+ }) : z(s, e)
200
200
  })
201
201
  };
202
202
  }
203
- function se({
204
- animation: o = "fade",
203
+ function se(o) {
204
+ if (o == null) return "";
205
+ const t = [];
206
+ return o.fade && t.push("fade"), o.slide && t.push(`slide-${o.slide}`), o.scale != null && t.push("scale"), t.length > 0 ? t.join(" ") : "none";
207
+ }
208
+ function ne(o) {
209
+ if (o == null) return "";
210
+ const t = [];
211
+ return o.scale != null && typeof o.scale == "number" && t.push(`--scale-factor: ${o.scale}`), o.transformOrigin != null && t.push(`--transform-origin: ${o.transformOrigin}`), o.duration != null && t.push(`--animation-duration: ${o.duration}ms`), o.easing != null && t.push(`--animation-easing: ${o.easing}`), t.join("; ");
212
+ }
213
+ function oe({
214
+ animation: o,
205
215
  status: t
206
216
  }) {
207
- return g.class(
208
- A(
209
- o,
210
- t
211
- )(
212
- (s, e) => `bc-animated-toggle bc-animated-toggle--${s} bc-animated-toggle--${e}`
213
- )
217
+ const s = w(
218
+ o,
219
+ t
220
+ )((n, r) => {
221
+ if (n == null)
222
+ return `bc-animated-toggle bc-animated-toggle--${r}`;
223
+ const a = r === "start-opening" || r === "opening" || r === "opened";
224
+ let u;
225
+ return "enter" in n || "exit" in n ? u = a ? n.enter : n.exit : u = n, `bc-animated-toggle bc-animated-toggle--${se(u)} bc-animated-toggle--${r}`;
226
+ }), e = w(
227
+ o,
228
+ t
229
+ )((n, r) => {
230
+ if (n == null) return "";
231
+ const a = r === "start-opening" || r === "opening" || r === "opened";
232
+ let u;
233
+ return "enter" in n || "exit" in n ? u = a ? n.enter : n.exit : u = n, ne(u);
234
+ });
235
+ return B(
236
+ V(s, e),
237
+ g.class(s),
238
+ g.style(e)
214
239
  );
215
240
  }
216
- function pe({
241
+ function ge({
217
242
  initialStatus: o = "closed",
218
- animation: t = "fade"
243
+ animation: t
219
244
  }, s) {
220
- return S((e) => {
221
- const { setElement: n, dispose: a, ...i } = G({
245
+ return D((e) => {
246
+ const { setElement: n, dispose: r, ...a } = G({
222
247
  initialStatus: o,
223
248
  element: e
224
249
  });
225
- return n(e), R(
226
- se({ status: i.status, animation: t }),
227
- W(a),
228
- s(i)
250
+ return n(e), B(
251
+ oe({ status: a.status, animation: t }),
252
+ V(r),
253
+ s(a)
229
254
  );
230
255
  });
231
256
  }
232
- function ne(o) {
257
+ function re(o) {
233
258
  return {
234
259
  "~standard": {
235
260
  version: 1,
@@ -253,7 +278,7 @@ function ne(o) {
253
278
  errors: e.errors.map((n) => ({
254
279
  message: n.message,
255
280
  path: n.path?.map(
256
- (a) => typeof a == "object" && "key" in a ? a.key.toString() : a.toString()
281
+ (r) => typeof r == "object" && "key" in r ? r.key.toString() : r.toString()
257
282
  ) || []
258
283
  }))
259
284
  }
@@ -261,18 +286,18 @@ function ne(o) {
261
286
  }
262
287
  };
263
288
  }
264
- class T {
289
+ class A {
265
290
  optional() {
266
- return new oe(this);
291
+ return new ae(this);
267
292
  }
268
293
  default(t) {
269
- return new ae(this, t);
294
+ return new ie(this, t);
270
295
  }
271
296
  schema() {
272
- return ne(this);
297
+ return re(this);
273
298
  }
274
299
  }
275
- class w extends T {
300
+ class C extends A {
276
301
  minLength;
277
302
  maxLength;
278
303
  pattern;
@@ -289,36 +314,36 @@ class w extends T {
289
314
  return s.length > 0 ? { success: !1, errors: s } : { success: !0, data: t };
290
315
  }
291
316
  min(t, s) {
292
- const e = new w();
317
+ const e = new C();
293
318
  return e.minLength = t, e.maxLength = this.maxLength, e.pattern = this.pattern, e.customValidations = [...this.customValidations], s && e.customValidations.push(
294
319
  (n) => n.length < t ? s : null
295
320
  ), e;
296
321
  }
297
322
  max(t, s) {
298
- const e = new w();
323
+ const e = new C();
299
324
  return e.minLength = this.minLength, e.maxLength = t, e.pattern = this.pattern, e.customValidations = [...this.customValidations], s && e.customValidations.push(
300
325
  (n) => n.length > t ? s : null
301
326
  ), e;
302
327
  }
303
328
  regex(t, s) {
304
- const e = new w();
329
+ const e = new C();
305
330
  return e.minLength = this.minLength, e.maxLength = this.maxLength, e.pattern = t, e.customValidations = [...this.customValidations], s && e.customValidations.push(
306
331
  (n) => t.test(n) ? null : s
307
332
  ), e;
308
333
  }
309
334
  email(t = "Please enter a valid email address") {
310
- const s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, e = new w();
335
+ const s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, e = new C();
311
336
  return e.minLength = this.minLength, e.maxLength = this.maxLength, e.pattern = this.pattern, e.customValidations = [
312
337
  ...this.customValidations,
313
338
  (n) => s.test(n) ? null : t
314
339
  ], e;
315
340
  }
316
341
  refine(t) {
317
- const s = new w();
342
+ const s = new C();
318
343
  return s.minLength = this.minLength, s.maxLength = this.maxLength, s.pattern = this.pattern, s.customValidations = [...this.customValidations, t], s;
319
344
  }
320
345
  }
321
- class B extends T {
346
+ class O extends A {
322
347
  mustBeTrue = !1;
323
348
  trueMessage;
324
349
  validate(t) {
@@ -328,20 +353,20 @@ class B extends T {
328
353
  } : { success: !0, data: t };
329
354
  }
330
355
  refine(t, s) {
331
- const e = new B();
356
+ const e = new O();
332
357
  e.mustBeTrue = this.mustBeTrue, e.trueMessage = this.trueMessage;
333
358
  const n = e.validate.bind(e);
334
- return e.validate = (a) => {
335
- const i = n(a);
336
- return i.success ? t(i.data) ? i : { success: !1, errors: [{ message: s }] } : i;
359
+ return e.validate = (r) => {
360
+ const a = n(r);
361
+ return a.success ? t(a.data) ? a : { success: !1, errors: [{ message: s }] } : a;
337
362
  }, e;
338
363
  }
339
364
  literal(t, s) {
340
- const e = new B();
365
+ const e = new O();
341
366
  return e.mustBeTrue = !0, e.trueMessage = s, e;
342
367
  }
343
368
  }
344
- class oe extends T {
369
+ class ae extends A {
345
370
  constructor(t) {
346
371
  super(), this.inner = t;
347
372
  }
@@ -352,7 +377,7 @@ class oe extends T {
352
377
  return s.success ? { success: !0, data: s.data } : { success: !1, errors: s.errors };
353
378
  }
354
379
  }
355
- class ae extends T {
380
+ class ie extends A {
356
381
  constructor(t, s) {
357
382
  super(), this.inner = t, this.defaultValue = s;
358
383
  }
@@ -360,7 +385,7 @@ class ae extends T {
360
385
  return t === void 0 ? { success: !0, data: this.defaultValue } : this.inner.validate(t);
361
386
  }
362
387
  }
363
- class M extends T {
388
+ class j extends A {
364
389
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
365
390
  constructor(t) {
366
391
  super(), this.shape = t;
@@ -369,47 +394,47 @@ class M extends T {
369
394
  if (typeof t != "object" || t === null || Array.isArray(t))
370
395
  return { success: !1, errors: [{ message: "Expected object" }] };
371
396
  const s = t, e = {}, n = [];
372
- for (const [a, i] of Object.entries(this.shape)) {
373
- const d = i.validate(s[a]);
374
- if (d.success)
375
- e[a] = d.data;
397
+ for (const [r, a] of Object.entries(this.shape)) {
398
+ const u = a.validate(s[r]);
399
+ if (u.success)
400
+ e[r] = u.data;
376
401
  else
377
- for (const f of d.errors)
402
+ for (const m of u.errors)
378
403
  n.push({
379
- message: f.message,
380
- path: [a, ...f.path || []]
404
+ message: m.message,
405
+ path: [r, ...m.path || []]
381
406
  });
382
407
  }
383
408
  return n.length > 0 ? { success: !1, errors: n } : { success: !0, data: e };
384
409
  }
385
410
  refine(t, s) {
386
- const e = new M(this.shape), n = e.validate.bind(e);
387
- return e.validate = (a) => {
388
- const i = n(a);
389
- if (!i.success) return i;
390
- const d = t(i.data);
391
- return d ? {
411
+ const e = new j(this.shape), n = e.validate.bind(e);
412
+ return e.validate = (r) => {
413
+ const a = n(r);
414
+ if (!a.success) return a;
415
+ const u = t(a.data);
416
+ return u ? {
392
417
  success: !1,
393
418
  errors: [
394
419
  {
395
- message: d,
420
+ message: u,
396
421
  path: s?.path
397
422
  }
398
423
  ]
399
- } : { success: !0, data: i.data };
424
+ } : { success: !0, data: a.data };
400
425
  }, e;
401
426
  }
402
427
  }
403
- const he = () => new w(), ge = () => new B(), be = (o) => new M(o);
404
- function re(o) {
428
+ const be = () => new C(), ve = () => new O(), ye = (o) => new j(o);
429
+ function ce(o) {
405
430
  return J((t) => {
406
- const s = [], e = () => s.forEach((a) => a());
431
+ const s = [], e = () => s.forEach((r) => r());
407
432
  return o(({
408
- effect: a = "opaque",
409
- mode: i = "capturing",
410
- onClickOutside: d,
411
- onEscape: f,
412
- content: m,
433
+ effect: r = "opaque",
434
+ mode: a = "capturing",
435
+ onClickOutside: u,
436
+ onEscape: m,
437
+ content: f,
413
438
  container: p = "body"
414
439
  }) => {
415
440
  p === "body" && (t = t.makePortal("body"));
@@ -419,132 +444,132 @@ function re(o) {
419
444
  }, b = () => {
420
445
  };
421
446
  const h = (E) => {
422
- E.key === "Escape" && (f?.(), c.close());
447
+ E.key === "Escape" && (m?.(), c.close());
423
448
  }, y = () => {
424
- d?.(), c.close();
425
- }, C = (E) => {
449
+ u?.(), c.close();
450
+ }, L = (E) => {
426
451
  v(), b(), E === "capturing" ? (document.addEventListener("keydown", h), v = () => document.removeEventListener("keydown", h), t.element.addEventListener("mousedown", y), b = () => t.element.removeEventListener("mousedown", y)) : (v = () => {
427
452
  }, b = () => {
428
453
  });
429
- }, l = U.on(i, C);
454
+ }, l = U.on(a, L);
430
455
  s.push(l), s.push(() => {
431
456
  c.dispose(), v(), b();
432
457
  });
433
- const x = Q((() => {
458
+ const T = Q((() => {
434
459
  const E = /* @__PURE__ */ new Set();
435
- for (const u of t.element.querySelectorAll(
460
+ for (const d of t.element.querySelectorAll(
436
461
  ":scope > :not([data-overlay])"
437
462
  ))
438
- u.hasAttribute("inert") ? E.add(u) : u.setAttribute("inert", "");
463
+ d.hasAttribute("inert") ? E.add(d) : d.setAttribute("inert", "");
439
464
  return s.push(() => {
440
- for (const u of t.element.querySelectorAll(
465
+ for (const d of t.element.querySelectorAll(
441
466
  ":scope > :not([data-overlay])"
442
467
  ))
443
- E.has(u) || u.removeAttribute("inert");
468
+ E.has(d) || d.removeAttribute("inert");
444
469
  E.clear();
445
470
  }), document.activeElement?.blur?.(), k.div(
446
- S((u) => c.setElement(u)),
447
- F.status(c.status.map(String)),
448
- F.overlay("true"),
471
+ D((d) => c.setElement(d)),
472
+ S.status(c.status.map(String)),
473
+ S.overlay("true"),
449
474
  g.class(
450
- A(
451
- a ?? "opaque",
452
- i
475
+ w(
476
+ r ?? "opaque",
477
+ a
453
478
  )(
454
- (u, L) => `bc-overlay bc-overlay--effect-${u} bc-overlay--mode-${L}`
479
+ (d, x) => `bc-overlay bc-overlay--effect-${d} bc-overlay--mode-${x}`
455
480
  )
456
481
  ),
457
- m
482
+ f
458
483
  );
459
484
  })(), t.element, {
460
485
  disposeWithParent: !0,
461
486
  clear: !1,
462
487
  providers: t.providers
463
488
  });
464
- s.push(x), V(() => c.open());
489
+ s.push(T), $(() => c.open());
465
490
  }, e);
466
491
  });
467
492
  }
468
- function ie(o, t) {
493
+ function le(o, t) {
469
494
  const {
470
495
  size: s = "md",
471
496
  dismissable: e = !0,
472
497
  showCloseButton: n = !0,
473
- onClose: a,
474
- overlayEffect: i = "opaque",
475
- container: d = "body",
476
- position: f = "center"
498
+ onClose: r,
499
+ overlayEffect: a = "opaque",
500
+ container: u = "body",
501
+ position: m = "center"
477
502
  } = o;
478
- return re((m, p) => {
503
+ return ce((f, p) => {
479
504
  let c = () => {
480
505
  };
481
506
  return t((h) => {
482
507
  c = p;
483
- const y = z("capturing");
484
- U.on(e, (u) => {
485
- y.set(u ? "capturing" : "non-capturing");
508
+ const y = R("capturing");
509
+ U.on(e, (d) => {
510
+ y.set(d ? "capturing" : "non-capturing");
486
511
  });
487
- const C = A(
512
+ const L = w(
488
513
  h.header != null,
489
514
  n
490
- )((u, L) => u || L), l = Y("modal"), r = `${l}-header`, x = `${l}-body`, E = k.div(
515
+ )((d, x) => d || x), l = Y("modal"), i = `${l}-header`, T = `${l}-body`, E = k.div(
491
516
  g.class(
492
- A(
517
+ w(
493
518
  s,
494
- f
519
+ m
495
520
  )(
496
- (u, L) => `bc-modal bc-modal--size-${u} bc-modal--container-${d} bc-modal--position-${L}`
521
+ (d, x) => `bc-modal bc-modal--size-${d} bc-modal--container-${u} bc-modal--position-${x}`
497
522
  )
498
523
  ),
499
524
  // Essential ARIA attributes for modal dialog
500
525
  g.role("dialog"),
501
- O.modal(!0),
502
- ...h.header ? [O.labelledby(r)] : [],
503
- O.describedby(x),
526
+ F.modal(!0),
527
+ ...h.header ? [F.labelledby(i)] : [],
528
+ F.describedby(T),
504
529
  g.tabindex(-1),
505
530
  // Make modal focusable for initial focus
506
531
  g.id(l),
507
- F.focusTrap("true"),
532
+ S.focusTrap("true"),
508
533
  // Mark as focus trap container
509
- X.mousedown((u) => u.stopPropagation()),
534
+ X.mousedown((d) => d.stopPropagation()),
510
535
  // Prevent overlay click-outside when clicking modal content
511
536
  // Focus trap implementation
512
- $({
537
+ M({
513
538
  escapeDeactivates: !1,
514
539
  // Let Overlay handle escape key
515
540
  initialFocus: () => {
516
- const u = document.getElementById(l);
517
- if (!u) return null;
518
- const L = u.querySelector(
541
+ const d = document.getElementById(l);
542
+ if (!d) return null;
543
+ const x = d.querySelector(
519
544
  '[aria-label="Close modal"]'
520
545
  );
521
- if (L) return L;
522
- const D = u.querySelector(
546
+ if (x) return x;
547
+ const q = d.querySelector(
523
548
  'button, input, select, textarea, [tabindex]:not([tabindex="-1"])'
524
549
  );
525
- return D || u;
550
+ return q || d;
526
551
  }
527
552
  }),
528
553
  // Modal content container
529
554
  k.div(
530
555
  g.class("bc-modal__content"),
531
556
  // Header section
532
- q(
533
- C,
557
+ I(
558
+ L,
534
559
  () => k.div(
535
560
  g.class("bc-modal__header"),
536
561
  k.div(
537
562
  g.class("bc-modal__title"),
538
- ...h.header ? [g.id(r)] : [],
563
+ ...h.header ? [g.id(i)] : [],
539
564
  h.header
540
565
  ),
541
- q(
566
+ I(
542
567
  n,
543
568
  () => H(
544
569
  K,
545
- (u) => Z({
570
+ (d) => Z({
546
571
  size: "sm",
547
- label: u.$.closeModal,
572
+ label: d.$.closeModal,
548
573
  onClick: () => {
549
574
  c(), p();
550
575
  }
@@ -554,21 +579,21 @@ function ie(o, t) {
554
579
  )
555
580
  ),
556
581
  // Body section
557
- k.div(g.class("bc-modal__body"), g.id(x), h.body),
582
+ k.div(g.class("bc-modal__body"), g.id(T), h.body),
558
583
  // Footer section
559
584
  h.footer && k.div(g.class("bc-modal__footer"), h.footer)
560
585
  )
561
586
  );
562
- m({
587
+ f({
563
588
  mode: y,
564
- effect: i ?? "opaque",
565
- container: d,
566
- content: E,
589
+ effect: a ?? "opaque",
590
+ container: u,
591
+ content: B(V(y, L), E),
567
592
  onClickOutside: () => {
568
- a?.(), p();
593
+ r?.(), p();
569
594
  },
570
595
  onEscape: () => {
571
- a?.(), p();
596
+ r?.(), p();
572
597
  }
573
598
  });
574
599
  }, () => {
@@ -576,58 +601,58 @@ function ie(o, t) {
576
601
  });
577
602
  });
578
603
  }
579
- function ve(o, t) {
580
- const { confirmText: s, cancelText: e, onConfirm: n, onCancel: a, ...i } = o;
604
+ function Ee(o, t) {
605
+ const { confirmText: s, cancelText: e, onConfirm: n, onCancel: r, ...a } = o;
581
606
  return H(
582
607
  K,
583
- (d) => ie({ showCloseButton: !1, ...i }, (f, m) => {
608
+ (u) => le({ showCloseButton: !1, ...a }, (m, f) => {
584
609
  const p = () => {
585
- n?.(), m();
610
+ n?.(), f();
586
611
  }, c = () => {
587
- a?.(), m();
612
+ r?.(), f();
588
613
  };
589
614
  return t((b) => {
590
- f({
615
+ m({
591
616
  body: b,
592
- footer: R(
617
+ footer: B(
593
618
  g.class("bc-modal__actions"),
594
- _(
619
+ W(
595
620
  {
596
621
  variant: "outline",
597
622
  onClick: c
598
623
  },
599
- I(e, d.$.cancel)
624
+ _(e, u.$.cancel)
600
625
  ),
601
- _(
626
+ W(
602
627
  {
603
628
  color: "primary",
604
629
  variant: "filled",
605
630
  onClick: p
606
631
  },
607
- I(s, d.$.confirm)
632
+ _(s, u.$.confirm)
608
633
  )
609
634
  )
610
635
  });
611
- }, m);
636
+ }, f);
612
637
  })
613
638
  );
614
639
  }
615
640
  export {
616
- se as A,
617
- B,
618
- ve as C,
619
- $ as F,
620
- ie as M,
621
- re as O,
622
- w as S,
623
- pe as a,
624
- ge as b,
625
- M as c,
626
- ne as d,
627
- me as e,
641
+ oe as A,
642
+ O as B,
643
+ Ee as C,
644
+ M as F,
645
+ le as M,
646
+ ce as O,
647
+ C as S,
648
+ ge as a,
649
+ ve as b,
650
+ j as c,
651
+ re as d,
652
+ pe as e,
628
653
  N as f,
629
- fe as g,
630
- be as o,
631
- he as s,
654
+ he as g,
655
+ ye as o,
656
+ be as s,
632
657
  G as u
633
658
  };