@tempots/beatui 0.81.0 → 0.82.1

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 (237) hide show
  1. package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
  2. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  3. package/dist/{ar-DwHLVgKj.cjs → ar-D7CXDmVZ.cjs} +1 -1
  4. package/dist/{ar-Bo_FZZi7.js → ar-nOSKXpIW.js} +1 -1
  5. package/dist/auth/index.cjs.js +1 -1
  6. package/dist/auth/index.es.js +63 -1349
  7. package/dist/auth-divider-BqZPH1-z.cjs +1 -0
  8. package/dist/auth-divider-Wr-S16kF.js +1355 -0
  9. package/dist/beatui.css +2035 -295
  10. package/dist/beatui.tailwind.css +2036 -296
  11. package/dist/better-auth/index.cjs.js +1 -0
  12. package/dist/better-auth/index.es.js +754 -0
  13. package/dist/{de-zI5mdV4M.cjs → de-WzsOu9Gn.cjs} +1 -1
  14. package/dist/{de-CCqwOkqN.js → de-f2xcEb34.js} +1 -1
  15. package/dist/{deep-merge-1uN6CG6K.js → deep-merge-BYm0y62g.js} +271 -285
  16. package/dist/deep-merge-d7sf0xmN.cjs +1 -0
  17. package/dist/duration-input-B9UNmUCh.cjs +1 -0
  18. package/dist/{duration-input-C9kpsw-t.js → duration-input-DqcJbxKD.js} +31 -29
  19. package/dist/editor-toolbar-group--a-xgsJw.cjs +1 -0
  20. package/dist/editor-toolbar-group-CVpl5mxF.js +31 -0
  21. package/dist/{es-BF02UrPL.js → es-CDqqzpCw.js} +1 -1
  22. package/dist/{es-Cw90CAbu.cjs → es-Ds2Xf3wV.cjs} +1 -1
  23. package/dist/{fa-DPQV4YB8.js → fa-C7tE_hR3.js} +1 -1
  24. package/dist/{fa-B4lssnzR.cjs → fa-Ct1UtDB7.cjs} +1 -1
  25. package/dist/{fr-1Kd6z1F-.cjs → fr-CzAkRFed.cjs} +1 -1
  26. package/dist/{fr-dmxPhwkD.js → fr-yOW_68YY.js} +1 -1
  27. package/dist/{he-BtQbrVt3.js → he-D2oUloCJ.js} +1 -1
  28. package/dist/{he-CJ3XnuPm.cjs → he-DlXALrK7.cjs} +1 -1
  29. package/dist/{hi-BpfnFKHp.cjs → hi-3dBhLwDs.cjs} +1 -1
  30. package/dist/{hi-D_Le4Yka.js → hi-D5ZlZoQq.js} +1 -1
  31. package/dist/{hls.light.min-Bhrf47iR.cjs → hls.light.min-C6xKDzRR.cjs} +1 -1
  32. package/dist/{hls.light.min-C6VwviEa.js → hls.light.min-hEMf_E8u.js} +1 -1
  33. package/dist/{index-CfaWytS2.cjs → index-05UbKOYe.cjs} +1 -1
  34. package/dist/{index-K6u33-GC.cjs → index-Bt7FYl80.cjs} +19 -19
  35. package/dist/{index-YtW7SCWB.js → index-C2Lq1m45.js} +1434 -1463
  36. package/dist/{index-CGEzILlC.js → index-lYhXnu6I.js} +1 -1
  37. package/dist/index.cjs.js +4 -4
  38. package/dist/index.es.js +2389 -2738
  39. package/dist/input-container-C6qEIjcA.cjs +1 -0
  40. package/dist/input-container-DiCjOzR2.js +247 -0
  41. package/dist/{it-DyHjSuHN.js → it-6e6X-4BB.js} +1 -1
  42. package/dist/{it-COCZ9NyB.cjs → it-DohtcWi9.cjs} +1 -1
  43. package/dist/{ja-X43lABza.js → ja-BxNuNo2H.js} +1 -1
  44. package/dist/{ja--NdggLU9.cjs → ja-eyTArrgS.cjs} +1 -1
  45. package/dist/json-schema/index.cjs.js +1 -8
  46. package/dist/json-schema/index.es.js +1359 -7608
  47. package/dist/json-schema-display/index.cjs.js +1 -0
  48. package/dist/json-schema-display/index.es.js +846 -0
  49. package/dist/json-structure/index.cjs.js +1 -1
  50. package/dist/json-structure/index.es.js +542 -698
  51. package/dist/{ko-BUvb0ggK.cjs → ko-BFLCDMMs.cjs} +1 -1
  52. package/dist/{ko-B9g9iw99.js → ko-Ch0jFsBV.js} +1 -1
  53. package/dist/lexical/index.cjs.js +46 -0
  54. package/dist/lexical/index.es.js +21370 -0
  55. package/dist/lexical.css +1124 -0
  56. package/dist/menu-CZzRsQP_.js +372 -0
  57. package/dist/menu-ClrU72xH.cjs +1 -0
  58. package/dist/modal-I5srcntN.cjs +1 -0
  59. package/dist/modal-v3u2Fpnd.js +488 -0
  60. package/dist/{nl-0S25Gsld.cjs → nl-Bx2ACvr4.cjs} +1 -1
  61. package/dist/{nl-Ew5jnSsT.js → nl-NuTdZO1s.js} +1 -1
  62. package/dist/{notice-C-964yaY.js → notice-BuZvdvZh.js} +84 -82
  63. package/dist/notice-CLDdy1MW.cjs +1 -0
  64. package/dist/oneof-branch-detection-DsM1K5xc.cjs +8 -0
  65. package/dist/oneof-branch-detection-Dt8ss9lc.js +6281 -0
  66. package/dist/{pl-C9f6UBSe.js → pl-Bs4nLJ__.js} +1 -1
  67. package/dist/{pl-B3k-K3S4.cjs → pl-QHl6sl8f.cjs} +1 -1
  68. package/dist/prosemirror/index.cjs.js +1 -1
  69. package/dist/prosemirror/index.es.js +1 -1
  70. package/dist/{pt-DYtAvbrw.js → pt-BETjHZrL.js} +1 -1
  71. package/dist/{pt-CKoikRO5.cjs → pt-DZGw2Z-1.cjs} +1 -1
  72. package/dist/{ru-ZexN-b8V.js → ru-Bi1_DEKM.js} +1 -1
  73. package/dist/{ru-COb7RSDt.cjs → ru-D03IuLqh.cjs} +1 -1
  74. package/dist/session-id-3KiilioY.js +8 -0
  75. package/dist/session-id-B5lJMzbB.cjs +1 -0
  76. package/dist/stack-BJgsPJ9A.js +873 -0
  77. package/dist/stack-DcZ_u50f.cjs +1 -0
  78. package/dist/string-B9vVyfq3.cjs +1 -0
  79. package/dist/string-DYyMxBl-.js +19 -0
  80. package/dist/styles-url-B2dzXrYt.cjs +1 -0
  81. package/dist/styles-url-Cw_mxshe.js +4 -0
  82. package/dist/text-input-B3VBat1k.js +44 -0
  83. package/dist/text-input-Ds8e7Z1G.cjs +1 -0
  84. package/dist/{toolbar-DNpBIoJo.js → toolbar-D994_E_s.js} +4 -4
  85. package/dist/toolbar-x0_8lmKu.cjs +1 -0
  86. package/dist/{tr-tO_EH-Y2.cjs → tr-B_-_1wua.cjs} +1 -1
  87. package/dist/{tr-BDvn05-H.js → tr-DiYB-FwX.js} +1 -1
  88. package/dist/translations-B4-Zd2LM.cjs +1 -0
  89. package/dist/translations-Cq8bUKJP.js +584 -0
  90. package/dist/{translations-DwGC_94w.cjs → translations-D62qqNV9.cjs} +1 -1
  91. package/dist/{translations-CfWR4loD.js → translations-DPr6c05Z.js} +1 -1
  92. package/dist/types/better-auth/bridge.d.ts +2 -0
  93. package/dist/types/better-auth/callbacks.d.ts +6 -0
  94. package/dist/types/better-auth/components/authenticated.d.ts +4 -0
  95. package/dist/types/better-auth/components/better-auth-container.d.ts +4 -0
  96. package/dist/types/better-auth/components/better-auth-modal.d.ts +4 -0
  97. package/dist/types/better-auth/components/magic-link-form.d.ts +7 -0
  98. package/dist/types/better-auth/components/passkey-management.d.ts +6 -0
  99. package/dist/types/better-auth/components/passkey-signin.d.ts +12 -0
  100. package/dist/types/better-auth/components/two-factor-setup.d.ts +8 -0
  101. package/dist/types/better-auth/components/two-factor-verify.d.ts +10 -0
  102. package/dist/types/better-auth/i18n/default.d.ts +29 -0
  103. package/dist/types/better-auth/i18n/locales/en.d.ts +28 -0
  104. package/dist/types/better-auth/i18n/translations.d.ts +27 -0
  105. package/dist/types/better-auth/index.d.ts +22 -0
  106. package/dist/types/better-auth/provider.d.ts +6 -0
  107. package/dist/types/better-auth/session.d.ts +14 -0
  108. package/dist/types/better-auth/social-mapping.d.ts +2 -0
  109. package/dist/types/better-auth/types.d.ts +164 -0
  110. package/dist/types/components/auth/auth-container.d.ts +1 -1
  111. package/dist/types/components/auth/social-providers.d.ts +1 -1
  112. package/dist/types/components/auth/types.d.ts +2 -0
  113. package/dist/types/components/editor-toolbar/editor-toolbar-button.d.ts +16 -0
  114. package/dist/types/components/editor-toolbar/editor-toolbar-group.d.ts +9 -0
  115. package/dist/types/components/editor-toolbar/index.d.ts +2 -0
  116. package/dist/types/components/json-schema-display/display-widget-customization.d.ts +61 -0
  117. package/dist/types/components/json-schema-display/display-wrapper.d.ts +14 -0
  118. package/dist/types/components/json-schema-display/displays/any-display.d.ts +14 -0
  119. package/dist/types/components/json-schema-display/displays/array-display.d.ts +13 -0
  120. package/dist/types/components/json-schema-display/displays/boolean-display.d.ts +13 -0
  121. package/dist/types/components/json-schema-display/displays/composition-display.d.ts +14 -0
  122. package/dist/types/components/json-schema-display/displays/enum-const-display.d.ts +13 -0
  123. package/dist/types/components/json-schema-display/displays/generic-display.d.ts +18 -0
  124. package/dist/types/components/json-schema-display/displays/null-display.d.ts +13 -0
  125. package/dist/types/components/json-schema-display/displays/number-display.d.ts +13 -0
  126. package/dist/types/components/json-schema-display/displays/object-display.d.ts +13 -0
  127. package/dist/types/components/json-schema-display/displays/string-display.d.ts +14 -0
  128. package/dist/types/components/json-schema-display/index.d.ts +14 -0
  129. package/dist/types/components/json-schema-display/json-schema-display.d.ts +25 -0
  130. package/dist/types/components/json-schema-display/mismatch.d.ts +14 -0
  131. package/dist/types/components/json-structure/controls/control-utils.d.ts +19 -0
  132. package/dist/types/components/json-structure/controls/index.d.ts +1 -0
  133. package/dist/types/components/lexical/bare-editor.d.ts +29 -0
  134. package/dist/types/components/lexical/code/index.d.ts +1 -0
  135. package/dist/types/components/lexical/code/language-selector.d.ts +13 -0
  136. package/dist/types/components/lexical/contextual-editor.d.ts +22 -0
  137. package/dist/types/components/lexical/docked-editor.d.ts +23 -0
  138. package/dist/types/components/lexical/floating/block-handle.d.ts +16 -0
  139. package/dist/types/components/lexical/floating/floating-toolbar.d.ts +12 -0
  140. package/dist/types/components/lexical/floating/index.d.ts +6 -0
  141. package/dist/types/components/lexical/floating/slash-command-palette.d.ts +20 -0
  142. package/dist/types/components/lexical/index.d.ts +8 -0
  143. package/dist/types/components/lexical/lexical-editor-input.d.ts +30 -0
  144. package/dist/types/components/lexical/table/index.d.ts +1 -0
  145. package/dist/types/components/lexical/table/table-controls.d.ts +12 -0
  146. package/dist/types/components/lexical/toolbar/index.d.ts +6 -0
  147. package/dist/types/components/lexical/toolbar/lexical-toolbar.d.ts +12 -0
  148. package/dist/types/components/lexical/toolbar/toolbar-button.d.ts +1 -0
  149. package/dist/types/components/lexical/toolbar/toolbar-group.d.ts +1 -0
  150. package/dist/types/components/lexical/toolbar/toolbar-helpers.d.ts +30 -0
  151. package/dist/types/components/prosemirror/etoolbar-button.d.ts +1 -11
  152. package/dist/types/components/prosemirror/etoolbar-group.d.ts +1 -4
  153. package/dist/types/json-schema-display/index.d.ts +1 -0
  154. package/dist/types/lexical/commands/index.d.ts +17 -0
  155. package/dist/types/lexical/headless.d.ts +39 -0
  156. package/dist/types/lexical/horizontal-rule-node.d.ts +20 -0
  157. package/dist/types/lexical/index.d.ts +20 -0
  158. package/dist/types/lexical/lazy-loader.d.ts +35 -0
  159. package/dist/types/lexical/nodes.d.ts +29 -0
  160. package/dist/types/lexical/plugins/auto-link.d.ts +7 -0
  161. package/dist/types/lexical/plugins/clipboard.d.ts +11 -0
  162. package/dist/types/lexical/plugins/code-shiki.d.ts +11 -0
  163. package/dist/types/lexical/plugins/code.d.ts +7 -0
  164. package/dist/types/lexical/plugins/dragon.d.ts +6 -0
  165. package/dist/types/lexical/plugins/file-io.d.ts +10 -0
  166. package/dist/types/lexical/plugins/hashtag.d.ts +7 -0
  167. package/dist/types/lexical/plugins/history.d.ts +7 -0
  168. package/dist/types/lexical/plugins/horizontal-rule.d.ts +12 -0
  169. package/dist/types/lexical/plugins/html-io.d.ts +9 -0
  170. package/dist/types/lexical/plugins/index.d.ts +24 -0
  171. package/dist/types/lexical/plugins/link.d.ts +6 -0
  172. package/dist/types/lexical/plugins/list.d.ts +6 -0
  173. package/dist/types/lexical/plugins/mark.d.ts +15 -0
  174. package/dist/types/lexical/plugins/markdown-io.d.ts +13 -0
  175. package/dist/types/lexical/plugins/offset.d.ts +6 -0
  176. package/dist/types/lexical/plugins/overflow.d.ts +7 -0
  177. package/dist/types/lexical/plugins/plain-text.d.ts +6 -0
  178. package/dist/types/lexical/plugins/rich-text.d.ts +6 -0
  179. package/dist/types/lexical/plugins/selection.d.ts +6 -0
  180. package/dist/types/lexical/plugins/slash-commands.d.ts +26 -0
  181. package/dist/types/lexical/plugins/table.d.ts +11 -0
  182. package/dist/types/lexical/plugins/text.d.ts +13 -0
  183. package/dist/types/lexical/plugins/yjs.d.ts +9 -0
  184. package/dist/types/lexical/styles-url.d.ts +2 -0
  185. package/dist/types/lexical/styles.d.ts +2 -0
  186. package/dist/types/lexical/types.d.ts +634 -0
  187. package/dist/types/lexical-i18n/default.d.ts +92 -0
  188. package/dist/types/lexical-i18n/index.d.ts +21 -0
  189. package/dist/types/lexical-i18n/locales/ar.d.ts +91 -0
  190. package/dist/types/lexical-i18n/locales/de.d.ts +91 -0
  191. package/dist/types/lexical-i18n/locales/en.d.ts +91 -0
  192. package/dist/types/lexical-i18n/locales/es.d.ts +91 -0
  193. package/dist/types/lexical-i18n/locales/fa.d.ts +91 -0
  194. package/dist/types/lexical-i18n/locales/fr.d.ts +91 -0
  195. package/dist/types/lexical-i18n/locales/he.d.ts +91 -0
  196. package/dist/types/lexical-i18n/locales/hi.d.ts +91 -0
  197. package/dist/types/lexical-i18n/locales/it.d.ts +91 -0
  198. package/dist/types/lexical-i18n/locales/ja.d.ts +91 -0
  199. package/dist/types/lexical-i18n/locales/ko.d.ts +91 -0
  200. package/dist/types/lexical-i18n/locales/nl.d.ts +91 -0
  201. package/dist/types/lexical-i18n/locales/pl.d.ts +91 -0
  202. package/dist/types/lexical-i18n/locales/pt.d.ts +91 -0
  203. package/dist/types/lexical-i18n/locales/ru.d.ts +91 -0
  204. package/dist/types/lexical-i18n/locales/tr.d.ts +91 -0
  205. package/dist/types/lexical-i18n/locales/ur.d.ts +91 -0
  206. package/dist/types/lexical-i18n/locales/vi.d.ts +91 -0
  207. package/dist/types/lexical-i18n/locales/zh.d.ts +91 -0
  208. package/dist/types/lexical-i18n/translations.d.ts +21 -0
  209. package/dist/{ur-DbEqQgS6.js → ur-B69X-xNs.js} +1 -1
  210. package/dist/{ur-BbnYJ3HS.cjs → ur-DyUSmIbo.cjs} +1 -1
  211. package/dist/use-animated-toggle-ChycsEoj.js +175 -0
  212. package/dist/use-animated-toggle-DR6CyMac.cjs +1 -0
  213. package/dist/use-form-B56E_x5Y.js +859 -0
  214. package/dist/use-form-Cnp3XQ5X.cjs +2 -0
  215. package/dist/utils-DEbsp9Q9.js +129 -0
  216. package/dist/utils-DIUEhA-Z.cjs +1 -0
  217. package/dist/{vi-CpZUeuSj.js → vi-BdzxA60L.js} +1 -1
  218. package/dist/{vi-ByBwvGQY.cjs → vi-CBmPaHxg.cjs} +1 -1
  219. package/dist/widget-customization-Dk7XcVly.cjs +1 -0
  220. package/dist/widget-customization-Ds9sicAg.js +1073 -0
  221. package/dist/{zh-DnxK0ieB.cjs → zh-Cb1b8uik.cjs} +1 -1
  222. package/dist/{zh-DJyhKO0I.js → zh-Dn1UJiZa.js} +1 -1
  223. package/package.json +59 -8
  224. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  225. package/dist/_commonjsHelpers-DwGv2jUC.cjs +0 -1
  226. package/dist/deep-merge-CBIkQM4E.cjs +0 -1
  227. package/dist/duration-input-DHWhQJnn.cjs +0 -1
  228. package/dist/modal-CSHIhHvI.js +0 -654
  229. package/dist/modal-cc8Ehngz.cjs +0 -1
  230. package/dist/notice-C_BWqu2K.cjs +0 -1
  231. package/dist/toolbar-D5FcnRju.cjs +0 -1
  232. package/dist/translations-0tLX4x7M.js +0 -866
  233. package/dist/translations-WPN3ibDg.cjs +0 -1
  234. package/dist/use-form-D4JFOcjo.cjs +0 -2
  235. package/dist/use-form-D4rqJkvG.js +0 -1731
  236. package/dist/widget-customization-BSjJz3_Y.js +0 -1195
  237. package/dist/widget-customization-CrFVrt4V.cjs +0 -1
@@ -0,0 +1,859 @@
1
+ import { Use as q, coalesce as G, aria as V, attr as c, on as M, html as m, Value as C, Empty as T, computedOf as y, When as A, dataAttr as P, TextNode as J, prop as k, Fragment as $, emitValue as Q, emitValueAsNumber as X } from "@tempots/dom";
2
+ import { B as Y, I as z } from "./translations-Cq8bUKJP.js";
3
+ import { B as Z, I as ee } from "./input-container-DiCjOzR2.js";
4
+ import { M as te, L as se, i as g } from "./stack-BJgsPJ9A.js";
5
+ import { s as j } from "./session-id-3KiilioY.js";
6
+ const E = (s, e) => s === e || s !== s && e !== e;
7
+ function we({
8
+ size: s = "sm",
9
+ icon: e = "line-md:close",
10
+ disabled: t,
11
+ roundedness: n = "full",
12
+ color: i = "base",
13
+ onClick: a,
14
+ label: o
15
+ }, ...r) {
16
+ return q(Y, (l) => {
17
+ const d = G(o, l.$.closeModal);
18
+ return Z(
19
+ {
20
+ variant: "text",
21
+ size: s,
22
+ roundedness: n,
23
+ disabled: t,
24
+ color: i,
25
+ onClick: a
26
+ },
27
+ c.title(d),
28
+ V.label(d),
29
+ ...r,
30
+ z({ icon: e, size: s ?? "sm" })
31
+ );
32
+ });
33
+ }
34
+ const De = (s) => {
35
+ const {
36
+ value: e,
37
+ onBlur: t,
38
+ onChange: n,
39
+ placeholder: i,
40
+ disabled: a,
41
+ id: o,
42
+ checkedIcon: r,
43
+ uncheckedIcon: l,
44
+ iconSize: d = "lg"
45
+ } = s, h = o ?? j("checkbox"), p = `${h}-label`, v = () => {
46
+ if (C.get(a ?? !1)) return;
47
+ const u = C.get(e);
48
+ n?.(!u);
49
+ }, w = (u) => {
50
+ C.get(a ?? !1) || (u.key === " " || u.key === "Enter") && (u.preventDefault(), v());
51
+ };
52
+ return ee(
53
+ {
54
+ baseContainer: !0,
55
+ growInput: !1,
56
+ ...s,
57
+ input: m.span(
58
+ c.class("bc-checkbox-input"),
59
+ m.span(
60
+ c.class("bc-checkbox-input__checkbox"),
61
+ c.class(
62
+ C.map(
63
+ e,
64
+ (u) => u ? "bc-checkbox-input__checkbox--checked" : "bc-checkbox-input__checkbox--unchecked"
65
+ )
66
+ ),
67
+ c.class(
68
+ C.map(
69
+ a ?? !1,
70
+ (u) => u ? "bc-checkbox-input__checkbox--disabled" : ""
71
+ )
72
+ ),
73
+ c.id(h),
74
+ c.role("checkbox"),
75
+ c.tabindex(
76
+ C.map(
77
+ a ?? !1,
78
+ (u) => u ? -1 : 0
79
+ )
80
+ ),
81
+ V.checked(e),
82
+ V.disabled(a),
83
+ i != null ? V.labelledby(p) : T,
84
+ M.keydown(w),
85
+ t != null ? M.blur(t) : T,
86
+ z({
87
+ icon: y(
88
+ e,
89
+ r,
90
+ l
91
+ )(
92
+ (u, f, D) => u ? f ?? "akar-icons/check-box-fill" : D ?? "akar-icons/box"
93
+ ),
94
+ accessibility: "decorative",
95
+ size: d
96
+ })
97
+ ),
98
+ i != null ? m.label(
99
+ c.class("bc-checkbox-input__label"),
100
+ c.id(p),
101
+ c.for(h),
102
+ te(i)
103
+ ) : T
104
+ )
105
+ },
106
+ M.click(v)
107
+ );
108
+ }, ne = m.span(
109
+ c.class("bc-input-wrapper__required"),
110
+ " *"
111
+ );
112
+ function ie(s) {
113
+ const e = ["bc-input-wrapper"];
114
+ return s !== "vertical" && e.push(`bc-input-wrapper--${s}`), e.join(" ");
115
+ }
116
+ function re(s, e) {
117
+ const t = ["bc-input-wrapper__label-text"];
118
+ return s ? t.push("bc-input-wrapper__label-text--error") : e ? t.push("bc-input-wrapper__label-text--disabled") : t.push("bc-input-wrapper__label-text--default"), t.join(" ");
119
+ }
120
+ function ae(s, e) {
121
+ if (s === "horizontal-fixed" && e != null)
122
+ return `--input-wrapper-label-width: ${e}`;
123
+ }
124
+ const L = ({
125
+ fullWidth: s = !1,
126
+ required: e,
127
+ label: t,
128
+ labelChildren: n,
129
+ context: i,
130
+ description: a,
131
+ content: o,
132
+ error: r,
133
+ labelFor: l,
134
+ hasError: d,
135
+ disabled: h,
136
+ layout: p,
137
+ labelWidth: v
138
+ }, ...w) => {
139
+ const u = d ?? r != null, f = h ?? !1, D = p ?? "vertical", S = j("input-wrapper"), x = a ? `${S}-description` : void 0, O = r != null ? `${S}-error` : void 0, H = y(D)((b) => b !== "vertical"), K = y(
140
+ D,
141
+ v ?? void 0
142
+ )((b, I) => ae(b, I));
143
+ return m.div(
144
+ c.class(C.map(D, (b) => ie(b))),
145
+ c.class(
146
+ C.map(
147
+ s,
148
+ (b) => b ? "bc-input-wrapper--full-width" : ""
149
+ )
150
+ ),
151
+ c.style(K),
152
+ t != null || i != null ? m.div(
153
+ c.class("bc-input-wrapper__header"),
154
+ m.div(
155
+ c.class("bc-input-wrapper__label-section"),
156
+ m.label(
157
+ c.class("bc-input-wrapper__label"),
158
+ l != null ? c.for(l) : T,
159
+ m.span(
160
+ c.class(
161
+ y(
162
+ u,
163
+ f
164
+ )(
165
+ (b, I) => re(
166
+ b ?? !1,
167
+ I ?? !1
168
+ )
169
+ )
170
+ ),
171
+ t
172
+ ),
173
+ t != null && e ? ne : T
174
+ ),
175
+ // Show description under label when horizontal
176
+ A(
177
+ y(
178
+ H,
179
+ a
180
+ )((b, I) => b && I != null),
181
+ () => m.div(
182
+ c.class(
183
+ "bc-input-wrapper__description bc-input-wrapper__description--under-label"
184
+ ),
185
+ c.id(x),
186
+ a
187
+ )
188
+ )
189
+ ),
190
+ i != null ? se(i) : T,
191
+ n
192
+ ) : T,
193
+ m.div(
194
+ c.class("bc-input-wrapper__content"),
195
+ // Add data attributes to help inputs inherit accessibility information
196
+ [x, O].filter(Boolean).length > 0 ? P.describedby(
197
+ [x, O].filter(Boolean).join(" ")
198
+ ) : T,
199
+ e ? P.required("true") : T,
200
+ A(u, () => P.invalid("true")),
201
+ o
202
+ ),
203
+ // Show description at bottom only when not horizontal
204
+ A(
205
+ y(H, a)((b, I) => !b && I != null),
206
+ () => m.div(
207
+ c.class("bc-input-wrapper__description"),
208
+ c.id(x),
209
+ a
210
+ )
211
+ ),
212
+ A(
213
+ u,
214
+ () => m.div(
215
+ c.class("bc-input-wrapper__error"),
216
+ c.id(O),
217
+ V.live("polite"),
218
+ // Announce errors to screen readers
219
+ c.role("alert"),
220
+ // Mark as alert for immediate attention
221
+ r
222
+ )
223
+ ),
224
+ ...w
225
+ );
226
+ }, oe = (
227
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
228
+ ((s, e) => () => {
229
+ s.markTouched(), e?.();
230
+ })
231
+ ), F = (s, e) => (t) => {
232
+ s.change(t), e?.(t);
233
+ };
234
+ function W(s, e) {
235
+ const { controller: t, onBlur: n, onChange: i, id: a, triggerOn: o, ...r } = e;
236
+ return s({
237
+ id: a ?? t.name,
238
+ disabled: t.disabled,
239
+ value: t.signal,
240
+ hasError: t.errorVisible,
241
+ name: t.name,
242
+ ...r,
243
+ onInput: o === "input" ? F(t, i) : void 0,
244
+ onChange: o !== "input" ? F(t, i) : void 0,
245
+ onBlur: oe(t, n)
246
+ });
247
+ }
248
+ function Ce(s, { id: e, labelFor: t, ...n }, ...i) {
249
+ const a = e ?? n.controller.name ?? j("control"), o = t ?? a;
250
+ return L(
251
+ {
252
+ ...n,
253
+ hasError: n.controller.errorVisible,
254
+ error: J(n.controller.error.map((r) => r ?? "")),
255
+ labelFor: o,
256
+ content: W(
257
+ (r) => s({ ...r, id: a }),
258
+ n
259
+ )
260
+ },
261
+ ...i
262
+ );
263
+ }
264
+ function le(s, e) {
265
+ const { toInput: t, fromInput: n, controller: i, ...a } = e, o = i.transform(t, n);
266
+ return W(s, {
267
+ ...a,
268
+ controller: o
269
+ });
270
+ }
271
+ function Te(s, {
272
+ id: e,
273
+ labelFor: t,
274
+ ...n
275
+ }, ...i) {
276
+ const a = e ?? n.controller.name ?? j("control");
277
+ return L(
278
+ {
279
+ ...n,
280
+ labelFor: t ?? a,
281
+ content: le(s, {
282
+ ...n,
283
+ id: a
284
+ })
285
+ },
286
+ ...i
287
+ );
288
+ }
289
+ function _e(s) {
290
+ return s.split(".").map((t) => {
291
+ const n = t.match(/^\[(\d+)\]$/);
292
+ return n ? Number(n[1]) : t;
293
+ });
294
+ }
295
+ function ce(s) {
296
+ return typeof s == "number" ? `[${s}]` : `.${s}`;
297
+ }
298
+ function he(s) {
299
+ if (s.length === 0) return "";
300
+ const [e, ...t] = s;
301
+ return [
302
+ typeof e == "number" ? `[${e}]` : e,
303
+ ...t.map(ce)
304
+ ].join("");
305
+ }
306
+ const Ie = {
307
+ /** A valid validation result */
308
+ valid: g.valid,
309
+ /**
310
+ * Create an invalid validation with a message
311
+ */
312
+ invalid(s) {
313
+ return g.invalid({ message: s });
314
+ },
315
+ /**
316
+ * Create an invalid validation with field-specific errors.
317
+ * Values can be error messages (strings) or full ControllerError objects.
318
+ */
319
+ invalidFields(s) {
320
+ const e = {};
321
+ for (const [t, n] of Object.entries(s))
322
+ e[t] = typeof n == "string" ? { message: n } : n;
323
+ return g.invalid({ dependencies: e });
324
+ },
325
+ /**
326
+ * Create an invalid validation from a ControllerError object
327
+ */
328
+ fromError(s) {
329
+ return g.invalid(s);
330
+ }
331
+ };
332
+ function B(s) {
333
+ return function(t) {
334
+ if (t.type === "valid") return t;
335
+ let n = t.error;
336
+ for (const i of s)
337
+ if (n = n?.dependencies?.[i], n == null) return g.valid;
338
+ return g.invalid(n);
339
+ };
340
+ }
341
+ class _ {
342
+ path;
343
+ change;
344
+ signal;
345
+ status;
346
+ error;
347
+ hasError;
348
+ touched;
349
+ errorVisible;
350
+ dirty;
351
+ dependencyErrors;
352
+ #e = {
353
+ disabled: k(!1),
354
+ touched: k(!1)
355
+ };
356
+ #s;
357
+ #t = k(void 0);
358
+ parent;
359
+ disabled;
360
+ #n = [];
361
+ disabledOrHasErrors;
362
+ constructor(e, t, n, i, a, o = E) {
363
+ this.path = e, this.change = t, this.signal = n, this.status = i, this.#s = o, this.#t.set(n.value), this.error = i.map(
364
+ (r) => r?.type === "invalid" ? r.error?.message : void 0
365
+ ), this.hasError = this.error.map((r) => r != null), this.touched = this.#e.touched, a.validationMode ? this.errorVisible = y(
366
+ this.hasError,
367
+ this.touched,
368
+ a.validationMode
369
+ )((r, l, d) => d === "eager" ? !!r : !!r && !!l) : this.errorVisible = y(
370
+ this.hasError,
371
+ this.touched
372
+ )((r, l) => !!r && !!l), this.dirty = y(
373
+ this.signal,
374
+ this.#t
375
+ )((r, l) => !this.#s(r, l)), this.dependencyErrors = i.map(
376
+ (r) => r?.type === "invalid" ? r.error?.dependencies : void 0
377
+ ), this.parent = a, this.disabled = y(
378
+ this.#e.disabled,
379
+ a.disabled
380
+ )((r, l) => r || l), this.disabledOrHasErrors = y(
381
+ this.disabled,
382
+ this.hasError
383
+ )((r, l) => r || l), this.onDispose(() => {
384
+ this.#e.disabled.dispose(), this.#e.touched.dispose(), this.disabled.dispose(), this.error.dispose(), this.errorVisible.dispose(), this.dirty.dispose(), this.#t.dispose(), this.dependencyErrors.dispose(), this.disabledOrHasErrors.dispose();
385
+ });
386
+ }
387
+ get name() {
388
+ return he(this.path);
389
+ }
390
+ onDispose = (e) => {
391
+ this.#n.push(e);
392
+ };
393
+ dispose = () => {
394
+ for (const e of this.#n)
395
+ try {
396
+ e();
397
+ } catch (t) {
398
+ console.error("Error in dispose callback:", t);
399
+ }
400
+ this.#n.length = 0;
401
+ };
402
+ setDisabled = (e) => {
403
+ this.#e.disabled.set(e);
404
+ };
405
+ disable = () => this.setDisabled(!0);
406
+ enable = () => this.setDisabled(!1);
407
+ markTouched = () => {
408
+ this.#e.touched.set(!0);
409
+ };
410
+ resetTouched = () => {
411
+ this.#e.touched.set(!1);
412
+ };
413
+ markPristine = () => {
414
+ this.#t.set(this.signal.value);
415
+ };
416
+ reset = () => {
417
+ this.change(this.#t.value);
418
+ };
419
+ array = (e = E) => new de(
420
+ this.path,
421
+ this.change,
422
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
423
+ this.signal,
424
+ this.status,
425
+ this.parent,
426
+ e
427
+ );
428
+ object = (e = E) => new ue(
429
+ this.path,
430
+ this.change,
431
+ this.signal,
432
+ this.status,
433
+ this.parent,
434
+ e
435
+ );
436
+ transform = (e, t, n = [], i = E) => new _(
437
+ [...this.path, ...n],
438
+ (a) => this.change(t(a)),
439
+ this.signal.map(e, i),
440
+ this.status.map(B(n)),
441
+ this.parent,
442
+ i
443
+ );
444
+ asyncTransform = (e, t, n, i = [], a = E) => new _(
445
+ [...this.path, ...i],
446
+ (o) => {
447
+ t(o).then((r) => this.change(r));
448
+ },
449
+ this.signal.mapAsync(e, n, void 0, a),
450
+ this.status.map(B(i)),
451
+ this.parent,
452
+ a
453
+ );
454
+ }
455
+ class ue extends _ {
456
+ #e = /* @__PURE__ */ new Map();
457
+ #s = /* @__PURE__ */ new Map();
458
+ #t = /* @__PURE__ */ new Map();
459
+ #n = k(!1);
460
+ touchedDeep = this.#n;
461
+ #r = /* @__PURE__ */ new Map();
462
+ #i = /* @__PURE__ */ new Map();
463
+ #o = k(!1);
464
+ dirtyDeep = this.#o;
465
+ #c;
466
+ #h;
467
+ #l = () => {
468
+ let e = !1;
469
+ for (const t of this.#s.values())
470
+ if (t) {
471
+ e = !0;
472
+ break;
473
+ }
474
+ this.#n.set(this.touched.value || e);
475
+ };
476
+ constructor(e, t, n, i, a, o) {
477
+ super(
478
+ e,
479
+ t,
480
+ n.map((l) => l ?? {}, o),
481
+ i,
482
+ a,
483
+ o
484
+ ), this.#c = this.touched.on(() => {
485
+ this.#l();
486
+ }), this.#h = this.dirty.on(() => {
487
+ this.#a();
488
+ });
489
+ const r = this.signal.on(() => this.#a());
490
+ this.onDispose(() => {
491
+ for (const l of this.#e.values())
492
+ l.dispose();
493
+ this.#e.clear();
494
+ for (const l of this.#t.values()) l();
495
+ this.#t.clear(), this.#s.clear(), this.#n.dispose();
496
+ for (const l of this.#i.values()) l();
497
+ this.#i.clear(), this.#r.clear(), this.#o.dispose(), this.#c(), this.#h(), r();
498
+ });
499
+ }
500
+ field = (e) => {
501
+ if (this.#e.has(e))
502
+ return this.#e.get(e);
503
+ const t = async (o) => {
504
+ this.change({
505
+ ...this.signal.value,
506
+ [e]: o
507
+ });
508
+ }, n = new _(
509
+ [...this.path, e],
510
+ t,
511
+ this.signal.map((o) => o[e]),
512
+ this.status.map(B([e])),
513
+ {
514
+ disabled: this.disabled,
515
+ // propagate validationMode to children if present
516
+ validationMode: this.parent.validationMode
517
+ }
518
+ );
519
+ this.#e.set(e, n);
520
+ const i = n.touched.on((o) => {
521
+ this.#s.set(e, o), this.#l();
522
+ });
523
+ this.#t.set(e, i);
524
+ const a = n.dirty.on((o) => {
525
+ this.#r.set(e, o), this.#a();
526
+ });
527
+ return this.#i.set(e, a), n;
528
+ };
529
+ markAllTouched = () => {
530
+ this.markTouched();
531
+ const e = this.signal.value;
532
+ for (const t of Object.keys(e))
533
+ this.field(t).markTouched();
534
+ for (const t of this.#e.values())
535
+ t.markTouched();
536
+ };
537
+ markAllPristine = () => {
538
+ this.markPristine();
539
+ const e = this.signal.value;
540
+ for (const t of Object.keys(e))
541
+ this.field(t).markPristine?.();
542
+ for (const t of this.#e.values())
543
+ t.markPristine?.();
544
+ };
545
+ #a = () => {
546
+ let e = !1;
547
+ for (const t of this.#r.values())
548
+ if (t) {
549
+ e = !0;
550
+ break;
551
+ }
552
+ this.#o.set(this.dirty.value || e);
553
+ };
554
+ }
555
+ class de extends _ {
556
+ #e = new Array();
557
+ length;
558
+ #s = /* @__PURE__ */ new Map();
559
+ #t = /* @__PURE__ */ new Map();
560
+ #n = k(!1);
561
+ touchedDeep = this.#n;
562
+ #r = /* @__PURE__ */ new Map();
563
+ #i = /* @__PURE__ */ new Map();
564
+ #o = k(!1);
565
+ dirtyDeep = this.#o;
566
+ #c;
567
+ #h;
568
+ #l = () => {
569
+ let e = !1;
570
+ for (const t of this.#s.values())
571
+ if (t) {
572
+ e = !0;
573
+ break;
574
+ }
575
+ this.#n.set(this.touched.value || e);
576
+ };
577
+ constructor(e, t, n, i, a, o) {
578
+ const r = n.map((h) => h ?? [], o);
579
+ super(e, t, r, i, a, o);
580
+ const l = r.on((h) => {
581
+ const p = this.#e.length - h.length;
582
+ p > 0 && (this.#e.splice(h.length, p).forEach((v, w) => {
583
+ const u = h.length + w;
584
+ v.dispose(), this.#t.get(u)?.(), this.#t.delete(u), this.#s.delete(u), this.#i.get(u)?.(), this.#i.delete(u), this.#r.delete(u);
585
+ }), this.#l(), this.#a());
586
+ });
587
+ this.length = r.map((h) => h.length), this.#c = this.touched.on(() => {
588
+ this.#l();
589
+ }), this.#h = this.dirty.on(() => {
590
+ this.#a();
591
+ });
592
+ const d = this.signal.on(() => this.#a());
593
+ this.onDispose(() => {
594
+ for (const h of this.#e)
595
+ h.dispose();
596
+ this.length.dispose(), this.#e.length = 0, l(), r.dispose();
597
+ for (const h of this.#t.values()) h();
598
+ this.#t.clear(), this.#s.clear(), this.#n.dispose();
599
+ for (const h of this.#i.values()) h();
600
+ this.#i.clear(), this.#r.clear(), this.#o.dispose(), this.#c(), this.#h(), d();
601
+ });
602
+ }
603
+ item = (e) => {
604
+ if (this.#e[e])
605
+ return this.#e[e];
606
+ const t = async (o) => {
607
+ const r = this.signal.value.slice();
608
+ r[e] = o, this.change(r);
609
+ }, n = new _(
610
+ [...this.path, e],
611
+ t,
612
+ this.signal.map((o) => o[e]),
613
+ this.status.map(B([e])),
614
+ {
615
+ disabled: this.disabled,
616
+ validationMode: this.parent.validationMode
617
+ }
618
+ );
619
+ this.#e[e] = n;
620
+ const i = n.touched.on((o) => {
621
+ this.#s.set(e, o), this.#l();
622
+ });
623
+ this.#t.set(e, i);
624
+ const a = n.dirty.on((o) => {
625
+ this.#r.set(e, o), this.#a();
626
+ });
627
+ return this.#i.set(e, a), n;
628
+ };
629
+ push = (...e) => {
630
+ this.change([...this.signal.value, ...e]);
631
+ };
632
+ pop = () => {
633
+ this.splice(this.signal.value.length - 1, 1);
634
+ };
635
+ shift = () => {
636
+ this.splice(0, 1);
637
+ };
638
+ unshift = (...e) => {
639
+ this.change([...e, ...this.signal.value]);
640
+ };
641
+ removeAt = (e) => {
642
+ this.splice(e, 1);
643
+ };
644
+ splice = (e, t) => {
645
+ const n = this.signal.value.slice();
646
+ n.splice(e, t), this.change(n);
647
+ };
648
+ move = (e, t, n = 1) => {
649
+ if (n < 1 || e === t) return;
650
+ const i = this.signal.value.slice(), a = i.splice(e, n);
651
+ i.splice(t, 0, ...a), this.change(i);
652
+ };
653
+ markAllTouched = () => {
654
+ this.markTouched();
655
+ const e = this.signal.value.length;
656
+ for (let t = 0; t < e; t++)
657
+ this.item(t).markTouched();
658
+ };
659
+ markAllPristine = () => {
660
+ this.markPristine();
661
+ const e = this.signal.value.length;
662
+ for (let t = 0; t < e; t++)
663
+ this.item(t).markPristine?.();
664
+ };
665
+ #a = () => {
666
+ let e = !1;
667
+ for (const t of this.#r.values())
668
+ if (t) {
669
+ e = !0;
670
+ break;
671
+ }
672
+ this.#o.set(this.dirty.value || e);
673
+ };
674
+ }
675
+ function pe(s) {
676
+ function e(t) {
677
+ return typeof t == "number" ? t : t.toString();
678
+ }
679
+ return s.map(
680
+ (t) => typeof t == "object" && t.key != null ? e(t.key) : e(t)
681
+ );
682
+ }
683
+ function fe(s) {
684
+ const e = s.filter((i) => i.path == null || i.path.length === 0).map((i) => i.message), t = s.filter((i) => i.path != null && i.path.length > 0).reduce((i, a) => {
685
+ const o = pe(a.path), r = o.pop();
686
+ let l = i;
687
+ for (const d of o)
688
+ l.dependencies == null && (l.dependencies = {}), l.dependencies[d] == null && (l.dependencies[d] = {}), l = l.dependencies[d];
689
+ return l.dependencies == null && (l.dependencies = {}), l.dependencies[r] = { message: a.message }, i;
690
+ }, {}), n = e.join(`
691
+ `);
692
+ return {
693
+ ...t,
694
+ message: n != "" ? n : void 0
695
+ };
696
+ }
697
+ function be({
698
+ initialValue: s,
699
+ onChange: e,
700
+ validate: t,
701
+ equals: n,
702
+ validationMode: i,
703
+ validateDebounceMs: a
704
+ }) {
705
+ const o = C.deriveProp(s), r = k(g.valid), l = k(!1), d = k(i ?? "onTouched"), h = (f) => {
706
+ r.set(f);
707
+ };
708
+ let p;
709
+ const v = async (f) => {
710
+ if (t != null) {
711
+ const D = await t(f);
712
+ h(D);
713
+ }
714
+ }, w = async (f) => {
715
+ o.set(f), e?.(f);
716
+ const D = d.value;
717
+ if (t != null) {
718
+ if (D === "onSubmit")
719
+ return;
720
+ const S = a ?? 0;
721
+ S > 0 ? (p && clearTimeout(p), p = setTimeout(() => {
722
+ v(f);
723
+ }, S)) : await v(f);
724
+ }
725
+ }, u = new _(
726
+ [],
727
+ w,
728
+ o,
729
+ r,
730
+ {
731
+ disabled: l,
732
+ validationMode: d
733
+ },
734
+ n ?? E
735
+ );
736
+ return u.onDispose(() => {
737
+ l.dispose(), o.dispose(), r.dispose(), d.dispose(), p && clearTimeout(p);
738
+ }), { controller: u, setStatus: h };
739
+ }
740
+ function R(s) {
741
+ return $(c.disabled(s.disabled), c.name(s.name));
742
+ }
743
+ function Me(s, {
744
+ triggerOn: e = "change"
745
+ } = {}) {
746
+ return $(
747
+ R(s),
748
+ c.value(s.signal),
749
+ (e === "input" ? M.input : M.change)(Q(s.change))
750
+ );
751
+ }
752
+ function Ee(s, {
753
+ triggerOn: e = "change"
754
+ } = {}) {
755
+ return $(
756
+ R(s),
757
+ c.valueAsNumber(s.signal),
758
+ (e === "input" ? M.input : M.change)(
759
+ X(s.change)
760
+ )
761
+ );
762
+ }
763
+ function N(s) {
764
+ return s.issues != null ? g.invalid(fe(s.issues)) : g.valid;
765
+ }
766
+ async function Se({
767
+ task: s,
768
+ errorMessage: e,
769
+ errorPath: t = ["root"],
770
+ validation: n
771
+ }) {
772
+ try {
773
+ const i = await s();
774
+ return n != null ? n(i) : g.valid;
775
+ } catch (i) {
776
+ const a = e ?? (i instanceof Error ? i.message : "Operation failed");
777
+ return t.length === 1 && t[0] === "root" ? g.invalid({
778
+ message: a
779
+ }) : g.invalid({
780
+ dependencies: U(t, a)
781
+ });
782
+ }
783
+ }
784
+ function U(s, e) {
785
+ if (s.length === 1)
786
+ return {
787
+ [s[0]]: { message: e }
788
+ };
789
+ const [t, ...n] = s;
790
+ return {
791
+ [t]: {
792
+ dependencies: U(n, e)
793
+ }
794
+ };
795
+ }
796
+ function Ve({
797
+ initialValue: s = {},
798
+ schema: e,
799
+ onSubmit: t = async () => g.valid,
800
+ validationMode: n,
801
+ validateDebounceMs: i
802
+ }) {
803
+ const { controller: a, setStatus: o } = be({
804
+ initialValue: s,
805
+ validationMode: n ?? "onTouched",
806
+ validateDebounceMs: i,
807
+ validate: (n ?? "onTouched") === "onSubmit" || e == null ? void 0 : async (h) => N(
808
+ await e["~standard"].validate(h)
809
+ )
810
+ }), r = k(!1), l = a.object();
811
+ return l.onDispose(r.dispose), {
812
+ controller: l,
813
+ setStatus: o,
814
+ submit: async (h) => {
815
+ if (r.set(!0), h?.preventDefault(), l.markAllTouched(), e != null) {
816
+ const v = l.signal.value, w = N(
817
+ await e["~standard"].validate(v)
818
+ );
819
+ if (o(w), w.type === "invalid") {
820
+ r.set(!1);
821
+ return;
822
+ }
823
+ }
824
+ const p = await t(l.signal.value);
825
+ r.set(!1), p.type === "invalid" && o(p);
826
+ },
827
+ submitting: r
828
+ };
829
+ }
830
+ export {
831
+ de as A,
832
+ W as B,
833
+ we as C,
834
+ L as I,
835
+ Te as M,
836
+ E as O,
837
+ ne as R,
838
+ De as a,
839
+ Ce as b,
840
+ F as c,
841
+ _ as d,
842
+ B as e,
843
+ ue as f,
844
+ be as g,
845
+ le as h,
846
+ he as i,
847
+ Ie as j,
848
+ pe as k,
849
+ fe as l,
850
+ oe as m,
851
+ R as n,
852
+ Me as o,
853
+ _e as p,
854
+ Ee as q,
855
+ N as s,
856
+ Se as t,
857
+ Ve as u,
858
+ ce as w
859
+ };