solid-baseui 0.1.0-alpha.1 → 0.1.0-alpha.3

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 (189) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +30 -35
  3. package/dist/lib/client/DialogHandle-DluOK_7u.js +521 -0
  4. package/dist/lib/client/DialogPopup-CfEb3F54.js +138 -0
  5. package/dist/lib/client/FieldControl-eDe-Jnp9.js +142 -0
  6. package/dist/lib/client/{FieldRootContext-izCEh80D.js → FieldRootContext-D3fuVjs3.js} +1 -1
  7. package/dist/lib/client/{FocusManager-NP1uPXTi.js → FocusManager-q7z7PMV1.js} +92 -89
  8. package/dist/lib/client/{InternalBackdrop-cSK13gaM.js → InternalBackdrop-B8_lfUvf.js} +1 -1
  9. package/dist/lib/client/{MenuSubmenuTrigger-yfncqM-D.js → MenuSubmenuTrigger-DMb5CwTF.js} +386 -386
  10. package/dist/lib/client/{PopupHandle-CQI6Om1Z.js → PopupHandle-DyX5gY1e.js} +17 -11
  11. package/dist/lib/client/{PopupStore-Du0O57fL.js → PopupStore-BjRwcvbG.js} +91 -88
  12. package/dist/lib/client/PopupViewport-BanYHrD-.js +154 -0
  13. package/dist/lib/client/{TriggerFocusGuards-Cs8LVBj5.js → TriggerFocusGuards-Fzspp3Y1.js} +2 -2
  14. package/dist/lib/client/accordion/index.js +1 -1
  15. package/dist/lib/client/{accordion-BFeZFpJZ.js → accordion-CA2DfX67.js} +144 -144
  16. package/dist/lib/client/alert-dialog/index.js +1 -1
  17. package/dist/lib/client/{alert-dialog-BxGUF8_Q.js → alert-dialog-Bup88Dpx.js} +2 -2
  18. package/dist/lib/client/autocomplete/index.js +1 -1
  19. package/dist/lib/client/{autocomplete-C9QA98XD.js → autocomplete-oyy_uRpU.js} +2 -2
  20. package/dist/lib/client/avatar/index.js +1 -1
  21. package/dist/lib/client/avatar-DNZ4fnBd.js +191 -0
  22. package/dist/lib/client/button/index.js +1 -1
  23. package/dist/lib/client/button-BJZYmCVv.js +88 -0
  24. package/dist/lib/client/checkbox/index.js +1 -1
  25. package/dist/lib/client/checkbox-group/index.js +1 -1
  26. package/dist/lib/client/{checkbox-group-CwMDoSTK.js → checkbox-group-DGyrciZJ.js} +1 -1
  27. package/dist/lib/client/checkbox-sQHYTbpB.js +425 -0
  28. package/dist/lib/client/collapsible/index.js +1 -1
  29. package/dist/lib/client/collapsible-BENbFFCc.js +230 -0
  30. package/dist/lib/client/combobox/index.js +1 -1
  31. package/dist/lib/client/{combobox-6DhOdzit.js → combobox-BGH8QLXH.js} +143 -141
  32. package/dist/lib/client/compositeNavigation-DCt1sQon.js +82 -0
  33. package/dist/lib/client/{constants-cOVxAoxB.js → constants-ByOMFJAe.js} +100 -100
  34. package/dist/lib/client/context-menu/index.js +1 -1
  35. package/dist/lib/client/context-menu-xQ1sBCET.js +220 -0
  36. package/dist/lib/client/{createAnchorPositioning-D96gu-Dz.js → createAnchorPositioning-DCXIApS1.js} +1 -1
  37. package/dist/lib/client/{createAnchoredPopupScrollLock-Cx0cbh1_.js → createAnchoredPopupScrollLock-BxKpJbCE.js} +2 -2
  38. package/dist/lib/client/{createClickInteraction-CTaIFBiV.js → createClickInteraction-BeBsTqtY.js} +1 -1
  39. package/dist/lib/client/{createFocusInteraction--s9_qBf3.js → createFocusInteraction-DQPWkZe2.js} +7 -7
  40. package/dist/lib/client/{createPopupAutoResize-Dn-stj-8.js → createPopupAutoResize-CSNpMz5v.js} +3 -3
  41. package/dist/lib/client/dialog/index.js +1 -1
  42. package/dist/lib/client/{dialog-B9tR9X48.js → dialog-C0EF0a5u.js} +2 -2
  43. package/dist/lib/client/{dom-BEAeQ9Eb.js → dom-lDdayFF_.js} +25 -15
  44. package/dist/lib/client/drawer/index.js +1 -1
  45. package/dist/lib/client/{drawer-dyr3_sKQ.js → drawer-uKoNBwDU.js} +519 -518
  46. package/dist/lib/client/field/index.js +1 -1
  47. package/dist/lib/client/{field-CjUAjp1m.js → field-DIMrgpBW.js} +144 -144
  48. package/dist/lib/client/form/index.js +1 -1
  49. package/dist/lib/client/form-Bqq8wSLY.js +109 -0
  50. package/dist/lib/client/index.js +34 -34
  51. package/dist/lib/client/input/index.js +1 -1
  52. package/dist/lib/client/{input-_QHvSSqM.js → input-YthuKwIE.js} +1 -1
  53. package/dist/lib/client/internals/composeEventHandlers.js +14 -8
  54. package/dist/lib/client/internals/field-root-context/index.js +2 -2
  55. package/dist/lib/client/{mergeStyleValue-DhTA9Nwe.js → isSolidAccessor-BH_FevwH.js} +1 -12
  56. package/dist/lib/client/menu/index.js +1 -1
  57. package/dist/lib/client/{menu-DLqUBmMK.js → menu-4rNLN6aX.js} +79 -79
  58. package/dist/lib/client/menubar/index.js +1 -1
  59. package/dist/lib/client/menubar-nFQGtNmY.js +163 -0
  60. package/dist/lib/client/mergeStyleValue-Dcd36yxZ.js +12 -0
  61. package/dist/lib/client/navigation-menu/index.js +1 -1
  62. package/dist/lib/client/{navigation-menu-mVHV41Ky.js → navigation-menu-BbRyun3a.js} +284 -284
  63. package/dist/lib/client/number-field/index.js +1 -1
  64. package/dist/lib/client/{number-field-DusLw_0X.js → number-field-hT_H0hVu.js} +356 -356
  65. package/dist/lib/client/otp-field/index.js +1 -1
  66. package/dist/lib/client/otp-field-lsy2iGID.js +584 -0
  67. package/dist/lib/client/popover/index.js +1 -1
  68. package/dist/lib/client/{popover-Cv7xn0nW.js → popover-Cmvmuf1L.js} +250 -248
  69. package/dist/lib/client/{popupStateMapping-C6jQ_LKo.js → popupStateMapping-nhukB8NK.js} +51 -51
  70. package/dist/lib/client/preview-card/index.js +1 -1
  71. package/dist/lib/client/{preview-card-FTN_aafM.js → preview-card-Dtu8AnBN.js} +168 -168
  72. package/dist/lib/client/radio/index.js +1 -1
  73. package/dist/lib/client/{radio-DA_oZhQT.js → radio-CeCU-Qqi.js} +77 -77
  74. package/dist/lib/client/radio-group/index.js +1 -1
  75. package/dist/lib/client/radio-group-NbuJvjQe.js +195 -0
  76. package/dist/lib/client/{safePolygon-DJG0VIVo.js → safePolygon-DVAR5dQD.js} +70 -70
  77. package/dist/lib/client/scroll-area/index.js +1 -1
  78. package/dist/lib/client/scroll-area-DqbvoAd7.js +717 -0
  79. package/dist/lib/client/{scrollable-SRNYlhF7.js → scrollable-BVaDUXng.js} +12 -12
  80. package/dist/lib/client/select/index.js +1 -1
  81. package/dist/lib/client/{select-DSPJt7Rk.js → select-Dad51Xbn.js} +635 -634
  82. package/dist/lib/client/slider/index.js +1 -1
  83. package/dist/lib/client/slider-CLSKFq_M.js +927 -0
  84. package/dist/lib/client/switch/index.js +1 -1
  85. package/dist/lib/client/{switch-CPl7QHKI.js → switch-Bzuu5EIg.js} +61 -61
  86. package/dist/lib/client/tabs/index.js +1 -1
  87. package/dist/lib/client/{tabs-Bn4rZDyZ.js → tabs-DWiBDv8D.js} +252 -249
  88. package/dist/lib/client/toast/index.js +1 -1
  89. package/dist/lib/client/{toast-7LdqZWOs.js → toast-DmtPJW2k.js} +353 -353
  90. package/dist/lib/client/toggle/index.js +1 -1
  91. package/dist/lib/client/{toggle-CsC37e3e.js → toggle-CAe-Z8Xn.js} +33 -33
  92. package/dist/lib/client/toggle-group/index.js +1 -1
  93. package/dist/lib/client/{toggle-group-DSWb9HxN.js → toggle-group-BbQg5s-m.js} +44 -44
  94. package/dist/lib/client/toolbar/index.js +1 -1
  95. package/dist/lib/client/{toolbar-DcCi3HNp.js → toolbar-BXT_g-oX.js} +218 -218
  96. package/dist/lib/client/tooltip/index.js +1 -1
  97. package/dist/lib/client/{tooltip-D-PkGco9.js → tooltip-h2r2_Xuo.js} +250 -249
  98. package/dist/lib/client/{useFilteredItems-B7z2CGMV.js → useFilteredItems-BX0BEuSI.js} +850 -819
  99. package/dist/lib/server/{DialogHandle-nJSSy_jM.js → DialogHandle-BGIISmG7.js} +16 -16
  100. package/dist/lib/server/{DialogPopup-Da1aIxVA.js → DialogPopup-C2ZDGf42.js} +4 -4
  101. package/dist/lib/server/{FieldControl-BDeNR3ug.js → FieldControl-CDMMyvuj.js} +6 -6
  102. package/dist/lib/server/{FieldRootContext-IC-LWzVp.js → FieldRootContext-Bfpna6gA.js} +3 -3
  103. package/dist/lib/server/{FocusManager-1LfoCsya.js → FocusManager-D-xgblGs.js} +9 -3
  104. package/dist/lib/server/{InternalBackdrop-C_iDPVR-.js → InternalBackdrop-D_2zAWnl.js} +1 -1
  105. package/dist/lib/server/{MenuSubmenuTrigger-rR8ZN7YR.js → MenuSubmenuTrigger-BMQKlOvU.js} +50 -50
  106. package/dist/lib/server/{PopupHandle-Ct6wywmP.js → PopupHandle-QNj4mED2.js} +14 -5
  107. package/dist/lib/server/{PopupStore-kHjFPiQ5.js → PopupStore-evylvVnN.js} +5 -2
  108. package/dist/lib/server/{PopupViewport-DftN5VUp.js → PopupViewport-BDttjORN.js} +37 -27
  109. package/dist/lib/server/{TriggerFocusGuards-CvoGfft9.js → TriggerFocusGuards-B9GNbLrL.js} +2 -2
  110. package/dist/lib/server/accordion/index.js +7 -7
  111. package/dist/lib/server/alert-dialog/index.js +2 -2
  112. package/dist/lib/server/autocomplete/index.js +2 -2
  113. package/dist/lib/server/avatar/index.js +3 -3
  114. package/dist/lib/server/button/index.js +6 -6
  115. package/dist/lib/server/checkbox/index.js +7 -7
  116. package/dist/lib/server/checkbox-group/index.js +1 -1
  117. package/dist/lib/server/collapsible/index.js +6 -6
  118. package/dist/lib/server/combobox/index.js +18 -18
  119. package/dist/lib/server/{compositeNavigation-BRVT1C38.js → compositeNavigation-D5jKM4yk.js} +32 -1
  120. package/dist/lib/server/{constants-D7ciIzsV.js → constants-ByqXubhO.js} +2 -2
  121. package/dist/lib/server/context-menu/index.js +9 -9
  122. package/dist/lib/server/{createAnchorPositioning-B5Y0WEev.js → createAnchorPositioning-DrQYe7RS.js} +1 -1
  123. package/dist/lib/server/{createAnchoredPopupScrollLock-DFuUrykR.js → createAnchoredPopupScrollLock-q6gnOSmv.js} +2 -2
  124. package/dist/lib/server/{createClickInteraction-BYsMgvup.js → createClickInteraction-D7oc1Vco.js} +1 -1
  125. package/dist/lib/server/{createFocusInteraction-DMyKsniI.js → createFocusInteraction-DFKr4G7a.js} +1 -1
  126. package/dist/lib/server/{createPopupAutoResize-ImBjwdj_.js → createPopupAutoResize-Cg0-lLf4.js} +1 -1
  127. package/dist/lib/server/dialog/index.js +2 -2
  128. package/dist/lib/server/{dom-Crg_2R-j.js → dom-D8_aB1yy.js} +14 -1
  129. package/dist/lib/server/drawer/index.js +38 -34
  130. package/dist/lib/server/field/index.js +6 -6
  131. package/dist/lib/server/form/index.js +2 -2
  132. package/dist/lib/server/input/index.js +1 -1
  133. package/dist/lib/server/internals/composeEventHandlers.js +15 -9
  134. package/dist/lib/server/internals/field-root-context/index.js +1 -1
  135. package/dist/lib/server/{mergeStyleValue-BwJ10_X2.js → isSolidAccessor-CZpzAH5l.js} +1 -20
  136. package/dist/lib/server/menu/index.js +17 -17
  137. package/dist/lib/server/menubar/index.js +4 -4
  138. package/dist/lib/server/mergeStyleValue-DecVaoac.js +20 -0
  139. package/dist/lib/server/navigation-menu/index.js +21 -21
  140. package/dist/lib/server/number-field/index.js +21 -21
  141. package/dist/lib/server/otp-field/index.js +8 -8
  142. package/dist/lib/server/popover/index.js +27 -26
  143. package/dist/lib/server/{popupStateMapping-B2KsiiLb.js → popupStateMapping-VHqr6M4H.js} +1 -1
  144. package/dist/lib/server/preview-card/index.js +16 -16
  145. package/dist/lib/server/radio/index.js +6 -6
  146. package/dist/lib/server/radio-group/index.js +5 -5
  147. package/dist/lib/server/{safePolygon-C1GNJbKR.js → safePolygon-B8QtiIZ3.js} +1 -1
  148. package/dist/lib/server/scroll-area/index.js +18 -18
  149. package/dist/lib/server/{scrollable-CjsSxbGr.js → scrollable-C9Pgq8T5.js} +1 -1
  150. package/dist/lib/server/select/index.js +39 -38
  151. package/dist/lib/server/slider/index.js +14 -14
  152. package/dist/lib/server/switch/index.js +9 -9
  153. package/dist/lib/server/tabs/index.js +12 -8
  154. package/dist/lib/server/toast/index.js +32 -32
  155. package/dist/lib/server/toggle/index.js +7 -7
  156. package/dist/lib/server/toggle-group/index.js +2 -2
  157. package/dist/lib/server/toolbar/index.js +14 -14
  158. package/dist/lib/server/tooltip/index.js +32 -27
  159. package/dist/lib/server/{useFilteredItems-DCxq20Is.js → useFilteredItems-BmhL0nf1.js} +181 -137
  160. package/dist/lib/types/accordion/trigger/AccordionTrigger.d.ts +7 -7
  161. package/dist/lib/types/combobox/chip/ComboboxChip.d.ts +2 -0
  162. package/dist/lib/types/combobox/root/ComboboxRoot.d.ts +6 -1
  163. package/dist/lib/types/combobox/store/ComboboxStore.d.ts +1 -0
  164. package/dist/lib/types/combobox/utils/handleInputPress.d.ts +1 -1
  165. package/dist/lib/types/field/control/FieldControl.d.ts +5 -5
  166. package/dist/lib/types/internals/composeEventHandlers.d.ts +9 -2
  167. package/dist/lib/types/internals/field-root-context/FieldRootContext.d.ts +1 -0
  168. package/dist/lib/types/internals/overlay/dom.d.ts +2 -0
  169. package/dist/lib/types/number-field/input/NumberFieldInput.d.ts +5 -5
  170. package/dist/lib/types/slider/track/SliderTrack.d.ts +2 -2
  171. package/dist/lib/types/toolbar/link/ToolbarLink.d.ts +10 -3
  172. package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +10 -4
  173. package/package.json +2 -2
  174. package/dist/lib/client/DialogHandle-BGyIbcvg.js +0 -521
  175. package/dist/lib/client/DialogPopup-Df7MC358.js +0 -138
  176. package/dist/lib/client/FieldControl-C0PATyKV.js +0 -142
  177. package/dist/lib/client/PopupViewport-IS4XU03s.js +0 -152
  178. package/dist/lib/client/avatar-BQoEzzav.js +0 -191
  179. package/dist/lib/client/button-akYS6FyY.js +0 -88
  180. package/dist/lib/client/checkbox-DOXtzBhA.js +0 -425
  181. package/dist/lib/client/collapsible-t8YReaIp.js +0 -230
  182. package/dist/lib/client/compositeNavigation-sxniYTc7.js +0 -58
  183. package/dist/lib/client/context-menu-CplDpqmi.js +0 -220
  184. package/dist/lib/client/form-6Ne_bWQX.js +0 -109
  185. package/dist/lib/client/menubar-DhPRUQZ6.js +0 -163
  186. package/dist/lib/client/otp-field-D-B9tZzF.js +0 -584
  187. package/dist/lib/client/radio-group-CWtQxWDl.js +0 -195
  188. package/dist/lib/client/scroll-area-NCr49LkD.js +0 -717
  189. package/dist/lib/client/slider-CWq9hxFf.js +0 -927
@@ -1,2 +1,2 @@
1
- import { t as e } from "../field-CjUAjp1m.js";
1
+ import { t as e } from "../field-DIMrgpBW.js";
2
2
  export { e as Field };
@@ -3,21 +3,21 @@ import { t } from "./useRender-CxZ8PI-g.js";
3
3
  import { getStateAttributesProps as n } from "./internals/getStateAttributesProps.js";
4
4
  import { n as r, t as i } from "./resolveStyle-XcgAuaKR.js";
5
5
  import { transitionStatusMapping as a } from "./internals/stateAttributesMapping.js";
6
- import { composeEventHandlers as o } from "./internals/composeEventHandlers.js";
7
- import { t as s } from "./runOnceAnimationsFinish-CFADb4CN.js";
8
- import { t as c } from "./createTransitionStatus-BL_cPSEA.js";
9
- import { DEFAULT_VALIDITY_DATA as l, DEFAULT_VALIDITY_STATE as u, VALIDITY_KEYS as d, copyNativeValidity as f, fieldStateAttributesMapping as p } from "./internals/field-constants.js";
10
- import { n as m, t as h } from "./FieldRootContext-izCEh80D.js";
11
- import { n as g } from "./FormContext-CwLBtm_d.js";
12
- import { n as _, r as v, t as y } from "./LabelableContext-CmQF-TX2.js";
13
- import { n as b, t as x } from "./FieldItemContext-Bwzf-4tL.js";
14
- import { n as S } from "./FieldsetRootContext-BgThSAcd.js";
15
- import { t as C } from "./form-types-DFBxc1LF.js";
16
- import { t as w } from "./FieldControl-C0PATyKV.js";
6
+ import { composeEventHandlers as o, liveEventHandler as s } from "./internals/composeEventHandlers.js";
7
+ import { t as c } from "./runOnceAnimationsFinish-CFADb4CN.js";
8
+ import { t as l } from "./createTransitionStatus-BL_cPSEA.js";
9
+ import { DEFAULT_VALIDITY_DATA as u, DEFAULT_VALIDITY_STATE as d, VALIDITY_KEYS as f, copyNativeValidity as p, fieldStateAttributesMapping as m } from "./internals/field-constants.js";
10
+ import { n as h, r as g } from "./FieldRootContext-D3fuVjs3.js";
11
+ import { n as _ } from "./FormContext-CwLBtm_d.js";
12
+ import { n as v, r as y, t as b } from "./LabelableContext-CmQF-TX2.js";
13
+ import { n as x, t as S } from "./FieldItemContext-Bwzf-4tL.js";
14
+ import { n as C } from "./FieldsetRootContext-BgThSAcd.js";
15
+ import { t as w } from "./form-types-DFBxc1LF.js";
16
+ import { t as ee } from "./FieldControl-eDe-Jnp9.js";
17
17
  import { createComponent as T, getNextElement as E, insert as D, memo as O, mergeProps as k, runHydrationEvents as A, spread as j, template as M } from "@solidjs/web";
18
18
  import { For as N, Show as P, createEffect as F, createMemo as I, createSignal as L, createUniqueId as R, omit as z, onCleanup as B, onSettled as V, untrack as H } from "solid-js";
19
19
  //#region src/field/root/createFieldValidation.ts
20
- function ee(e) {
20
+ function U(e) {
21
21
  let t = /* @__PURE__ */ new Map(), n = null, r = 0, i, a = null, o;
22
22
  function s() {
23
23
  a = null, i !== void 0 && (clearTimeout(i), i = void 0);
@@ -26,7 +26,7 @@ function ee(e) {
26
26
  let r = n ? t.get(n) : void 0;
27
27
  if (!r) return null;
28
28
  let i = null;
29
- for (let t of r.keys()) if (U(t, e.form.formElement())) {
29
+ for (let t of r.keys()) if (W(t, e.form.formElement())) {
30
30
  if (!t.validity.valid) return t;
31
31
  i ??= t;
32
32
  }
@@ -36,12 +36,12 @@ function ee(e) {
36
36
  let e = o;
37
37
  o = void 0, e && (!e[0].willValidate || e[0].validationMessage === e[1]) && e[0].setCustomValidity(e[2]);
38
38
  }
39
- function f(t, n = !1) {
39
+ function u(t, n = !1) {
40
40
  r += 1;
41
41
  let i = r;
42
42
  s();
43
- let f = c(), p = () => f?.validationMessage ? [f.validationMessage] : [], m = () => (f = c(), f?.willValidate ? W(f, e.isMarkedDirty()) : {
44
- ...u,
43
+ let u = c(), p = () => u?.validationMessage ? [u.validationMessage] : [], m = () => (u = c(), u?.willValidate ? G(u, e.isMarkedDirty()) : {
44
+ ...d,
45
45
  valid: !0
46
46
  }), h = (n, r) => {
47
47
  let i = n.valid === !1 ? r : [];
@@ -54,40 +54,40 @@ function ee(e) {
54
54
  });
55
55
  };
56
56
  if (n) {
57
- if (e.state().valid !== !1 || !f) return;
58
- let t = f.validity;
57
+ if (e.state().valid !== !1 || !u) return;
58
+ let t = u.validity;
59
59
  if (!t.valueMissing) {
60
- l(), f = c();
61
- let e = f?.validity.customError ? p() : [];
60
+ l(), u = c();
61
+ let e = u?.validity.customError ? p() : [];
62
62
  h({
63
- ...u,
63
+ ...d,
64
64
  valid: e.length === 0,
65
65
  customError: e.length > 0
66
66
  }, e);
67
67
  return;
68
68
  }
69
- for (let e of d) if (e !== "valueMissing" && e !== "customError" && t[e]) return;
69
+ for (let e of f) if (e !== "valueMissing" && e !== "customError" && t[e]) return;
70
70
  }
71
71
  l();
72
72
  let g = m(), _ = e.shouldValidateOnChange();
73
- if (f?.validationMessage && !_) {
73
+ if (u?.validationMessage && !_) {
74
74
  h(g, p());
75
75
  return;
76
76
  }
77
77
  let v = (e, t = g) => {
78
78
  let n = e ? [].concat(e).filter(Boolean) : [];
79
- if (n.length > 0 && (t.valid = !1, t.customError = !0, f?.willValidate)) {
80
- let e = f.validity.customError ? f.validationMessage : "", t = n.join("\n").replace(/\r\n?/g, "\n");
81
- f.setCustomValidity(t), o = [
82
- f,
79
+ if (n.length > 0 && (t.valid = !1, t.customError = !0, u?.willValidate)) {
80
+ let e = u.validity.customError ? u.validationMessage : "", t = n.join("\n").replace(/\r\n?/g, "\n");
81
+ u.setCustomValidity(t), o = [
82
+ u,
83
83
  t,
84
84
  e
85
85
  ];
86
86
  }
87
87
  h(t, n.length > 0 ? n : p());
88
88
  }, y = e.validate()?.(t, e.form.getFormValues());
89
- if (G(y)) {
90
- a = f, g.valid === !1 ? h(g, p()) : (e.validationMode() === "onSubmit" || !e.getValidityData().state.customError) && h({
89
+ if (K(y)) {
90
+ a = u, g.valid === !1 ? h(g, p()) : (e.validationMode() === "onSubmit" || !e.getValidityData().state.customError) && h({
91
91
  ...g,
92
92
  valid: null
93
93
  }, []), y.then((e) => {
@@ -104,11 +104,11 @@ function ee(e) {
104
104
  let o = e.shouldValidateOnChange(), l = e.validationDebounceTime();
105
105
  if (o && t !== "" && l > 0) {
106
106
  a = c(), i = setTimeout(() => {
107
- i = void 0, f(t);
107
+ i = void 0, u(t);
108
108
  }, l);
109
109
  return;
110
110
  }
111
- f(t, !o);
111
+ u(t, !o);
112
112
  }
113
113
  function m(e, r, i = () => r) {
114
114
  let o = t.get(e);
@@ -129,65 +129,65 @@ function ee(e) {
129
129
  return B(() => {
130
130
  p(void 0, !0), l();
131
131
  }), {
132
- commit: f,
132
+ commit: u,
133
133
  change: p,
134
134
  registerInput: m,
135
135
  getInputControl: h,
136
136
  setActiveInputSource: g
137
137
  };
138
138
  }
139
- function U(e, t) {
139
+ function W(e, t) {
140
140
  return e.matches(":disabled") ? !1 : !t || e.form === t || e.form === null && !e.hasAttribute("form");
141
141
  }
142
- function W(e, t) {
143
- let n = f(e.validity), r = n.valueMissing;
144
- for (let e of d) if (e !== "valueMissing" && n[e]) {
142
+ function G(e, t) {
143
+ let n = p(e.validity), r = n.valueMissing;
144
+ for (let e of f) if (e !== "valueMissing" && n[e]) {
145
145
  r = !1;
146
146
  break;
147
147
  }
148
148
  return r && !t && (n.valid = !0, n.valueMissing = !1), n;
149
149
  }
150
- function G(e) {
150
+ function K(e) {
151
151
  return typeof e == "object" && !!e && "then" in e;
152
152
  }
153
153
  //#endregion
154
154
  //#region src/field/root/FieldRoot.tsx
155
155
  var te = /* @__PURE__ */ M("<div>");
156
- function K(e) {
157
- let a = g(), o = e, s = S(!0), c = v(), u = _({ parent: c }), d = z(e, "actionsRef", "render", "class", "dirty", "disabled", "invalid", "name", "style", "touched", "validate", "validationDebounceTime", "validationMode"), [f, m] = L(!1), [b, x] = L(!1), [w, D] = L(!1), [O, M] = L(!1), [N, P] = L(0), R = H(() => e.dirty ?? !1), V = null, U = null, W = !1, G, K = {
158
- ...l,
159
- state: { ...l.state },
156
+ function q(e) {
157
+ let a = _(), o = e, s = C(!0), c = y(), l = v({ parent: c }), d = z(e, "actionsRef", "render", "class", "dirty", "disabled", "invalid", "name", "style", "touched", "validate", "validationDebounceTime", "validationMode"), [f, p] = L(!1), [g, x] = L(!1), [S, ee] = L(!1), [D, O] = L(!1), [M, N] = L(0), P = H(() => e.dirty ?? !1), R = null, V = null, W = !1, G, K = {
158
+ ...u,
159
+ state: { ...u.state },
160
160
  errors: []
161
- }, [q, ne] = L(K), J = I(() => s?.disabled() || (e.disabled ?? !1)), re = I(() => (N(), U?.name)), Y = I(() => e.name ?? re()), X = I(() => e.invalid === !0 || C(a.errors(), Y())), Z = I(() => e.validationMode ?? a.validationMode()), ie = I(() => e.dirty ?? b()), ae = I(() => e.touched ?? f()), Q = I(() => ({
161
+ }, [q, ne] = L(K), J = I(() => s?.disabled() || (e.disabled ?? !1)), re = I(() => (M(), V?.name)), Y = I(() => e.name ?? re()), X = I(() => e.invalid === !0 || w(a.errors(), Y())), Z = I(() => e.validationMode ?? a.validationMode()), ie = I(() => e.dirty ?? g()), ae = I(() => e.touched ?? f()), Q = I(() => ({
162
162
  disabled: J(),
163
163
  touched: ae(),
164
164
  dirty: ie(),
165
165
  valid: X() ? !1 : J() ? null : q().state.valid,
166
- filled: w(),
167
- focused: O()
166
+ filled: S(),
167
+ focused: D()
168
168
  })), oe = I(() => r(e.class, Q())), se = t(e, () => Q(), (e) => (() => {
169
169
  var t = E(te);
170
170
  return j(t, e, !1), A(), t;
171
- })()), ce = I(() => i(e.style, Q())), le = I(() => n(Q(), p));
171
+ })()), ce = I(() => i(e.style, Q())), le = I(() => n(Q(), m));
172
172
  function ue(e) {
173
173
  K = e, ne(e);
174
174
  }
175
175
  function de(t) {
176
- e.touched === void 0 && m(t);
176
+ e.touched === void 0 && p(t);
177
177
  }
178
178
  function fe(t) {
179
- e.dirty === void 0 && (t && (R = !0), x(t));
179
+ e.dirty === void 0 && (t && (P = !0), x(t));
180
180
  }
181
181
  function pe() {
182
- return U ? U.value() : K.value;
182
+ return V ? V.value() : K.value;
183
183
  }
184
184
  function me() {
185
- return U ? U.getValue ? U.getValue() : U.value() : K.value;
185
+ return V ? V.getValue ? V.getValue() : V.value() : K.value;
186
186
  }
187
187
  function he() {
188
- R = !0, $.commit(pe());
188
+ P = !0, $.commit(pe());
189
189
  }
190
- let $ = ee({
190
+ let $ = U({
191
191
  form: a,
192
192
  getValidityData: () => K,
193
193
  publish: ue,
@@ -195,29 +195,29 @@ function K(e) {
195
195
  validationDebounceTime: () => e.validationDebounceTime ?? 0,
196
196
  state: Q,
197
197
  validationMode: Z,
198
- isMarkedDirty: () => R,
198
+ isMarkedDirty: () => P,
199
199
  shouldValidateOnChange: () => Z() === "onChange" || Z() === "onSubmit" && a.submitAttempted()
200
200
  }), ge = {
201
201
  token: Symbol("Field"),
202
202
  name: Y,
203
203
  validate: he,
204
204
  isInvalid: () => X() || !J() && K.state.valid === !1,
205
- getControl: () => $.getInputControl() ?? U?.getControl() ?? null,
205
+ getControl: () => $.getInputControl() ?? V?.getControl() ?? null,
206
206
  getValue: me
207
207
  };
208
208
  function _e() {
209
- let e = !!(U?.id && !J());
209
+ let e = !!(V?.id && !J());
210
210
  e && !G ? G = a.registerField(ge) : !e && G && (G(), G = void 0);
211
211
  }
212
212
  function ve(e, t) {
213
213
  if (!t) {
214
- V === e && (V = null, U = null, $.setActiveInputSource(null), P((e) => e + 1));
214
+ R === e && (R = null, V = null, $.setActiveInputSource(null), N((e) => e + 1));
215
215
  return;
216
216
  }
217
- V = e, U = t, $.setActiveInputSource(e), W || (W = !0, ue({
217
+ R = e, V = t, $.setActiveInputSource(e), W || (W = !0, ue({
218
218
  ...K,
219
219
  initialValue: H(pe)
220
- })), P((e) => e + 1);
220
+ })), N((e) => e + 1);
221
221
  }
222
222
  let ye = { validate: he }, be = {
223
223
  state: Q,
@@ -229,20 +229,20 @@ function K(e) {
229
229
  shouldValidateOnChange: () => Z() === "onChange" || Z() === "onSubmit" && a.submitAttempted(),
230
230
  setTouched: de,
231
231
  setDirty: fe,
232
- setFilled: D,
233
- setFocused: M,
232
+ setFilled: ee,
233
+ setFocused: O,
234
234
  registerFieldControl: ve,
235
235
  validation: $
236
236
  };
237
237
  return F(() => e.dirty, (e) => {
238
- e !== void 0 && (R = e);
238
+ e !== void 0 && (P = e);
239
239
  }), F(() => ({
240
- version: N(),
240
+ version: M(),
241
241
  disabled: J()
242
242
  }), () => H(_e)), F(() => o.actionsRef, (e) => {
243
243
  e?.(ye);
244
- }), B(() => G?.()), T(y, {
245
- value: u,
244
+ }), B(() => G?.()), T(b, {
245
+ value: l,
246
246
  get children() {
247
247
  return T(h, {
248
248
  value: be,
@@ -262,102 +262,102 @@ function K(e) {
262
262
  }
263
263
  //#endregion
264
264
  //#region src/field/label/FieldLabel.tsx
265
- var q = /* @__PURE__ */ M("<label>");
266
- function ne(e) {
267
- let a = m(), s = b(), c = v(), l = e, u = e, d = `base-ui-${R()}`, [f, h] = L(), g = z(u, "render", "class", "id", "nativeLabel", "onClick", "onMouseDown", "onPointerDown", "ref", "style"), _ = I(() => l.id ?? d), y = I(() => l.nativeLabel ?? !0), x = I(() => ({
265
+ var ne = /* @__PURE__ */ M("<label>");
266
+ function J(e) {
267
+ let a = g(), c = x(), l = y(), u = e, d = e, f = `base-ui-${R()}`, [p, h] = L(), _ = z(d, "render", "class", "id", "nativeLabel", "onClick", "onMouseDown", "onPointerDown", "ref", "style"), v = I(() => u.id ?? f), b = I(() => u.nativeLabel ?? !0), S = I(() => ({
268
268
  ...a.state(),
269
- disabled: a.disabled() || s.disabled()
270
- })), S = I(() => r(e.class, x())), C = t(e, () => x(), (e) => (() => {
271
- var t = E(q);
269
+ disabled: a.disabled() || c.disabled()
270
+ })), C = I(() => r(e.class, S())), w = t(e, () => S(), (e) => (() => {
271
+ var t = E(ne);
272
272
  return j(t, e, !1), A(), t;
273
- })()), w = I(() => i(e.style, x())), D = I(() => n(x(), p)), M = o(() => l.onClick), N = o(() => l.onMouseDown), P = o(() => l.onPointerDown);
273
+ })()), ee = I(() => i(e.style, S())), D = I(() => n(S(), m)), M = o(s(() => u.onClick)), N = o(s(() => u.onMouseDown)), P = o(s(() => u.onPointerDown));
274
274
  function B(e) {
275
275
  return e instanceof Element && !!e.closest("button,input,select,textarea");
276
276
  }
277
277
  function H() {
278
- let e = c.controlId(), t = f();
278
+ let e = l.controlId(), t = p();
279
279
  if (!e || !t) return;
280
280
  let n = t.ownerDocument.getElementById(e);
281
281
  n instanceof HTMLElement && n.focus({ focusVisible: !0 });
282
282
  }
283
- function ee(e) {
284
- M.call(e.currentTarget, e), !e.baseUIHandlerPrevented && !y() && !B(e.target) && H();
285
- }
286
283
  function U(e) {
287
- N.call(e.currentTarget, e), !e.baseUIHandlerPrevented && !B(e.target) && !e.defaultPrevented && e.detail > 1 && e.preventDefault();
284
+ M.call(e.currentTarget, e), !e.baseUIHandlerPrevented && !b() && !B(e.target) && H();
288
285
  }
289
286
  function W(e) {
290
- P.call(e.currentTarget, e), !e.baseUIHandlerPrevented && (y() || e.preventDefault());
287
+ N.call(e.currentTarget, e), !e.baseUIHandlerPrevented && !B(e.target) && !e.defaultPrevented && e.detail > 1 && e.preventDefault();
291
288
  }
292
- return F(_, (e) => c.registerLabelId(e)), V(() => {
293
- f();
294
- }), T(C, k({
295
- ref: [((e) => h(e)), l.ref],
289
+ function G(e) {
290
+ P.call(e.currentTarget, e), !e.baseUIHandlerPrevented && (b() || e.preventDefault());
291
+ }
292
+ return F(v, (e) => l.registerLabelId(e)), V(() => {
293
+ p();
294
+ }), T(w, k({
295
+ ref: [((e) => h(e)), u.ref],
296
296
  get id() {
297
- return _();
297
+ return v();
298
298
  },
299
299
  get class() {
300
- return S();
300
+ return C();
301
301
  },
302
302
  get style() {
303
- return w();
303
+ return ee();
304
304
  },
305
305
  get for() {
306
- return O(() => !!y())() ? c.controlId() ?? void 0 : void 0;
306
+ return O(() => !!b())() ? l.controlId() ?? void 0 : void 0;
307
307
  },
308
- onClick: ee,
309
- onMouseDown: U,
310
- onPointerDown: W
311
- }, D, g));
308
+ onClick: U,
309
+ onMouseDown: W,
310
+ onPointerDown: G
311
+ }, D, _));
312
312
  }
313
313
  //#endregion
314
314
  //#region src/field/description/FieldDescription.tsx
315
- var J = /* @__PURE__ */ M("<p>");
316
- function re(e) {
317
- let a = m(), o = b(), s = v(), c = Symbol("FieldDescription"), l = `base-ui-${R()}`, u = z(e, "render", "class", "id", "style"), d = I(() => e.id ?? l), f = I(() => ({
315
+ var re = /* @__PURE__ */ M("<p>");
316
+ function Y(e) {
317
+ let a = g(), o = x(), s = y(), c = Symbol("FieldDescription"), l = `base-ui-${R()}`, u = z(e, "render", "class", "id", "style"), d = I(() => e.id ?? l), f = I(() => ({
318
318
  ...a.state(),
319
319
  disabled: a.disabled() || o.disabled()
320
- })), h = I(() => r(e.class, f())), g = t(e, () => f(), (e) => (() => {
321
- var t = E(J);
320
+ })), p = I(() => r(e.class, f())), h = t(e, () => f(), (e) => (() => {
321
+ var t = E(re);
322
322
  return j(t, e, !1), A(), t;
323
- })()), _ = I(() => i(e.style, f())), y = I(() => n(f(), p));
324
- return F(d, (e) => s.registerMessageId(c, e)), B(() => s.registerMessageId(c, void 0)), T(g, k({
323
+ })()), _ = I(() => i(e.style, f())), v = I(() => n(f(), m));
324
+ return F(d, (e) => s.registerMessageId(c, e)), B(() => s.registerMessageId(c, void 0)), T(h, k({
325
325
  get id() {
326
326
  return d();
327
327
  },
328
328
  get class() {
329
- return h();
329
+ return p();
330
330
  },
331
331
  get style() {
332
332
  return _();
333
333
  }
334
- }, y, u));
334
+ }, v, u));
335
335
  }
336
336
  //#endregion
337
337
  //#region src/field/item/FieldItem.tsx
338
- var Y = /* @__PURE__ */ M("<div>");
339
- function X(e) {
340
- let a = m(), o = v(), s = _({ parent: o }), c = z(e, "render", "class", "disabled", "style"), l = I(() => a.disabled() || (e.disabled ?? !1)), u = I(() => ({
338
+ var X = /* @__PURE__ */ M("<div>");
339
+ function Z(e) {
340
+ let a = g(), o = y(), s = v({ parent: o }), c = z(e, "render", "class", "disabled", "style"), l = I(() => a.disabled() || (e.disabled ?? !1)), u = I(() => ({
341
341
  ...a.state(),
342
342
  disabled: l()
343
343
  })), d = I(() => r(e.class, u())), f = t(e, () => u(), (e) => (() => {
344
- var t = E(Y);
344
+ var t = E(X);
345
345
  return j(t, e, !1), A(), t;
346
- })()), h = I(() => i(e.style, u())), g = I(() => n(u(), p)), b = { disabled: l };
347
- return T(y, {
346
+ })()), p = I(() => i(e.style, u())), h = I(() => n(u(), m)), _ = { disabled: l };
347
+ return T(b, {
348
348
  value: s,
349
349
  get children() {
350
- return T(x, {
351
- value: b,
350
+ return T(S, {
351
+ value: _,
352
352
  get children() {
353
353
  return T(f, k({
354
354
  get class() {
355
355
  return d();
356
356
  },
357
357
  get style() {
358
- return h();
358
+ return p();
359
359
  }
360
- }, g, c));
360
+ }, h, c));
361
361
  }
362
362
  });
363
363
  }
@@ -365,52 +365,52 @@ function X(e) {
365
365
  }
366
366
  //#endregion
367
367
  //#region src/field/error/FieldError.tsx
368
- var Z = /* @__PURE__ */ M("<ul>"), ie = /* @__PURE__ */ M("<li>"), ae = /* @__PURE__ */ M("<div>"), Q = {
369
- ...p,
368
+ var ie = /* @__PURE__ */ M("<ul>"), ae = /* @__PURE__ */ M("<li>"), Q = /* @__PURE__ */ M("<div>"), oe = {
369
+ ...m,
370
370
  ...a
371
371
  };
372
- function oe(e) {
373
- let a, o = !1, l = m(), u = g(), d = v(), f = e, p = e, h = Symbol("FieldError"), _ = `base-ui-${R()}`, y = z(p, "render", "children", "class", "id", "match", "ref", "style"), b = I(() => f.id ?? _), x = I(() => {
374
- let e = l.name(), t = u.errors();
372
+ function se(e) {
373
+ let a, o = !1, s = g(), u = _(), d = y(), f = e, p = e, m = Symbol("FieldError"), h = `base-ui-${R()}`, v = z(p, "render", "children", "class", "id", "match", "ref", "style"), b = I(() => f.id ?? h), x = I(() => {
374
+ let e = s.name(), t = u.errors();
375
375
  return e && Object.hasOwn(t, e) ? t[e] : null;
376
376
  }), S = I(() => {
377
377
  let e = x();
378
378
  return Array.isArray(e) ? e.length > 0 : !!e;
379
379
  }), C = I(() => typeof f.match == "string" ? f.match : void 0), w = I(() => {
380
380
  if (f.match === !0) return !0;
381
- if (l.state().disabled) return !1;
381
+ if (s.state().disabled) return !1;
382
382
  let e = C();
383
- return e ? !!l.validityData().state[e] : S() || l.validityData().state.valid === !1;
384
- }), M = I(() => {
383
+ return e ? !!s.validityData().state[e] : S() || s.validityData().state.valid === !1;
384
+ }), ee = I(() => {
385
385
  if (!C() && S()) return x();
386
- let e = l.validityData();
386
+ let e = s.validityData();
387
387
  return e.errors.length > 1 ? e.errors : e.error;
388
- }), V = I(() => {
388
+ }), M = I(() => {
389
389
  if (f.children !== void 0) return f.children;
390
- let e = M();
390
+ let e = ee();
391
391
  return Array.isArray(e) ? e.length > 1 ? (() => {
392
- var t = E(Z);
392
+ var t = E(ie);
393
393
  return D(t, T(N, {
394
394
  each: e,
395
395
  children: (e) => (() => {
396
- var t = E(ie);
396
+ var t = E(ae);
397
397
  return D(t, e), t;
398
398
  })()
399
399
  })), t;
400
400
  })() : e[0] : e;
401
- }), [H, ee] = L(), U = c(() => w()), W = I(() => ({
402
- ...l.state(),
401
+ }), [V, H] = L(), U = l(() => w()), W = I(() => ({
402
+ ...s.state(),
403
403
  transitionStatus: U.transitionStatus()
404
404
  })), G = t(e, () => W(), (e) => (() => {
405
- var t = E(ae);
405
+ var t = E(Q);
406
406
  return j(t, e, !1), A(), t;
407
- })()), te = I(() => U.mounted() ? r(e.class, W()) : void 0), K = I(() => U.mounted() ? i(e.style, W()) : void 0), q = I(() => n(W(), Q));
407
+ })()), K = I(() => U.mounted() ? r(e.class, W()) : void 0), te = I(() => U.mounted() ? i(e.style, W()) : void 0), q = I(() => n(W(), oe));
408
408
  return F(() => ({
409
409
  visible: w(),
410
410
  id: b(),
411
- message: w() ? V() : void 0
411
+ message: w() ? M() : void 0
412
412
  }), (e) => {
413
- o = e.visible, d.registerMessageId(h, e.visible ? e.id : void 0), e.visible && ee(e.message);
413
+ o = e.visible, d.registerMessageId(m, e.visible ? e.id : void 0), e.visible && H(e.message);
414
414
  }), F(() => ({
415
415
  visible: w(),
416
416
  transitionStatus: U.transitionStatus(),
@@ -418,10 +418,10 @@ function oe(e) {
418
418
  }), (e) => {
419
419
  if (e.visible || e.transitionStatus !== "ending" || !e.element) return;
420
420
  let t = new AbortController();
421
- return s(e.element, () => {
421
+ return c(e.element, () => {
422
422
  o || (a = void 0, U.setMounted(!1));
423
423
  }, t.signal), () => t.abort();
424
- }), B(() => d.registerMessageId(h, void 0)), T(P, {
424
+ }), B(() => d.registerMessageId(m, void 0)), T(P, {
425
425
  get when() {
426
426
  return U.mounted();
427
427
  },
@@ -432,21 +432,21 @@ function oe(e) {
432
432
  return b();
433
433
  },
434
434
  get class() {
435
- return te();
435
+ return K();
436
436
  },
437
437
  get style() {
438
- return K();
438
+ return te();
439
439
  }
440
- }, q, y, { get children() {
441
- return O(() => !!w())() ? V() : H();
440
+ }, q, v, { get children() {
441
+ return O(() => !!w())() ? M() : V();
442
442
  } }));
443
443
  }
444
444
  });
445
445
  }
446
446
  //#endregion
447
447
  //#region src/field/validity/FieldValidity.tsx
448
- function se(e) {
449
- let t = m(), n = I(() => {
448
+ function ce(e) {
449
+ let t = g(), n = I(() => {
450
450
  let e = t.validityData();
451
451
  return t.invalid() ? {
452
452
  ...e,
@@ -455,7 +455,7 @@ function se(e) {
455
455
  valid: !1
456
456
  }
457
457
  } : e;
458
- }), r = c(() => n().state.valid === !1), i = I(() => {
458
+ }), r = l(() => n().state.valid === !1), i = I(() => {
459
459
  let e = n();
460
460
  return {
461
461
  error: e.error,
@@ -470,14 +470,14 @@ function se(e) {
470
470
  }
471
471
  //#endregion
472
472
  //#region src/field/index.parts.ts
473
- var ce = /* @__PURE__ */ e({
474
- Control: () => w,
475
- Description: () => re,
476
- Error: () => oe,
477
- Item: () => X,
478
- Label: () => ne,
479
- Root: () => K,
480
- Validity: () => se
473
+ var le = /* @__PURE__ */ e({
474
+ Control: () => ee,
475
+ Description: () => Y,
476
+ Error: () => se,
477
+ Item: () => Z,
478
+ Label: () => J,
479
+ Root: () => q,
480
+ Validity: () => ce
481
481
  });
482
482
  //#endregion
483
- export { ce as t };
483
+ export { le as t };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../form-6Ne_bWQX.js";
1
+ import { t as e } from "../form-Bqq8wSLY.js";
2
2
  export { e as Form };