solid-baseui 0.1.0-alpha.0 → 0.1.0-alpha.2

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 (342) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +133 -15
  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-grSdNHqW.js → FocusManager-q7z7PMV1.js} +94 -91
  8. package/dist/lib/client/{FormContext-BB05lWOI.js → FormContext-CwLBtm_d.js} +1 -0
  9. package/dist/lib/client/{InternalBackdrop-cSK13gaM.js → InternalBackdrop-B8_lfUvf.js} +1 -1
  10. package/dist/lib/client/{LabelableContext-DKsB0fIx.js → LabelableContext-CmQF-TX2.js} +3 -6
  11. package/dist/lib/client/MenuSubmenuTrigger-DMb5CwTF.js +1584 -0
  12. package/dist/lib/client/{PopupHandle-CcJG4NMy.js → PopupHandle-DyX5gY1e.js} +17 -11
  13. package/dist/lib/client/{PopupStore-DjB-wO88.js → PopupStore-BjRwcvbG.js} +138 -115
  14. package/dist/lib/client/PopupViewport-BanYHrD-.js +154 -0
  15. package/dist/lib/client/Separator-D5oJzlA3.js +27 -0
  16. package/dist/lib/client/TriggerFocusGuards-Fzspp3Y1.js +51 -0
  17. package/dist/lib/client/accordion/index.js +1 -1
  18. package/dist/lib/client/accordion-CA2DfX67.js +381 -0
  19. package/dist/lib/client/alert-dialog/index.js +1 -1
  20. package/dist/lib/client/{alert-dialog-BH_3ndio.js → alert-dialog-Bup88Dpx.js} +2 -2
  21. package/dist/lib/client/autocomplete/index.js +1 -1
  22. package/dist/lib/client/{autocomplete-Cob_FZEP.js → autocomplete-oyy_uRpU.js} +30 -25
  23. package/dist/lib/client/avatar/index.js +1 -1
  24. package/dist/lib/client/avatar-DNZ4fnBd.js +191 -0
  25. package/dist/lib/client/button/index.js +1 -1
  26. package/dist/lib/client/button-BJZYmCVv.js +88 -0
  27. package/dist/lib/client/checkbox/index.js +1 -1
  28. package/dist/lib/client/checkbox-group/index.js +1 -1
  29. package/dist/lib/client/checkbox-group-DGyrciZJ.js +135 -0
  30. package/dist/lib/client/checkbox-sQHYTbpB.js +425 -0
  31. package/dist/lib/client/collapsible/index.js +1 -1
  32. package/dist/lib/client/collapsible-BENbFFCc.js +230 -0
  33. package/dist/lib/client/combobox/index.js +2 -2
  34. package/dist/lib/client/combobox-BGH8QLXH.js +401 -0
  35. package/dist/lib/client/compositeNavigation-DCt1sQon.js +82 -0
  36. package/dist/lib/client/{constants-BYjBUIIi.js → constants-ByOMFJAe.js} +105 -101
  37. package/dist/lib/client/context-menu/index.js +1 -1
  38. package/dist/lib/client/context-menu-xQ1sBCET.js +220 -0
  39. package/dist/lib/client/{createAnchorPositioning-DcxDXUgB.js → createAnchorPositioning-DCXIApS1.js} +149 -146
  40. package/dist/lib/client/{createAnchoredPopupScrollLock-Cx0cbh1_.js → createAnchoredPopupScrollLock-BxKpJbCE.js} +2 -2
  41. package/dist/lib/client/{createClickInteraction-CTaIFBiV.js → createClickInteraction-BeBsTqtY.js} +1 -1
  42. package/dist/lib/client/{createCollapsiblePanel-DeDu0O2t.js → createCollapsiblePanel-BQ8r4RTi.js} +1 -1
  43. package/dist/lib/client/createFocusInteraction-DQPWkZe2.js +60 -0
  44. package/dist/lib/client/createLabelableId-DxJRwMUJ.js +14 -0
  45. package/dist/lib/client/{createPopupAutoResize-CGNiLhGq.js → createPopupAutoResize-CSNpMz5v.js} +4 -4
  46. package/dist/lib/client/{createTransitionStatus-B1L-whed.js → createTransitionStatus-BL_cPSEA.js} +12 -12
  47. package/dist/lib/client/dialog/index.js +1 -1
  48. package/dist/lib/client/{dialog-DkaQwIgP.js → dialog-C0EF0a5u.js} +2 -2
  49. package/dist/lib/client/{dom-BEAeQ9Eb.js → dom-lDdayFF_.js} +25 -15
  50. package/dist/lib/client/drawer/index.js +1 -1
  51. package/dist/lib/client/drawer-uKoNBwDU.js +1540 -0
  52. package/dist/lib/client/field/index.js +1 -1
  53. package/dist/lib/client/field-DIMrgpBW.js +483 -0
  54. package/dist/lib/client/fieldset/index.js +1 -1
  55. package/dist/lib/client/fieldset-Byqk3noT.js +70 -0
  56. package/dist/lib/client/form/index.js +1 -1
  57. package/dist/lib/client/form-Bqq8wSLY.js +109 -0
  58. package/dist/lib/client/index.js +44 -42
  59. package/dist/lib/client/input/index.js +1 -1
  60. package/dist/lib/client/{input-gb0ejxkm.js → input-YthuKwIE.js} +1 -1
  61. package/dist/lib/client/internals/composeEventHandlers.js +14 -8
  62. package/dist/lib/client/internals/field-root-context/index.js +2 -2
  63. package/dist/lib/client/internals/form-context/index.js +1 -1
  64. package/dist/lib/client/internals/labelable-provider/index.js +1 -1
  65. package/dist/lib/client/{mergeStyleValue-C4ITiiIV.js → isSolidAccessor-BH_FevwH.js} +8 -15
  66. package/dist/lib/client/menu/index.js +1 -1
  67. package/dist/lib/client/menu-4rNLN6aX.js +334 -0
  68. package/dist/lib/client/menubar/index.js +1 -1
  69. package/dist/lib/client/menubar-nFQGtNmY.js +163 -0
  70. package/dist/lib/client/mergeStyleValue-Dcd36yxZ.js +12 -0
  71. package/dist/lib/client/meter/index.js +1 -1
  72. package/dist/lib/client/meter-BvWdppcx.js +178 -0
  73. package/dist/lib/client/navigation-menu/index.js +1 -1
  74. package/dist/lib/client/navigation-menu-BbRyun3a.js +1070 -0
  75. package/dist/lib/client/number-field/index.js +1 -1
  76. package/dist/lib/client/number-field-hT_H0hVu.js +1043 -0
  77. package/dist/lib/client/otp-field/index.js +1 -1
  78. package/dist/lib/client/otp-field-lsy2iGID.js +584 -0
  79. package/dist/lib/client/popover/index.js +1 -1
  80. package/dist/lib/client/popover-Cmvmuf1L.js +940 -0
  81. package/dist/lib/client/popupStateMapping-nhukB8NK.js +371 -0
  82. package/dist/lib/client/preview-card/index.js +1 -1
  83. package/dist/lib/client/preview-card-Dtu8AnBN.js +632 -0
  84. package/dist/lib/client/progress/index.js +1 -1
  85. package/dist/lib/client/progress-AVKxvgpc.js +195 -0
  86. package/dist/lib/client/radio/index.js +1 -1
  87. package/dist/lib/client/radio-CeCU-Qqi.js +284 -0
  88. package/dist/lib/client/radio-group/index.js +1 -1
  89. package/dist/lib/client/radio-group-NbuJvjQe.js +195 -0
  90. package/dist/lib/client/runOnceAnimationsFinish-CFADb4CN.js +49 -0
  91. package/dist/lib/client/{safePolygon--bbKn0c8.js → safePolygon-DVAR5dQD.js} +74 -70
  92. package/dist/lib/client/scroll-area/index.js +1 -1
  93. package/dist/lib/client/scroll-area-DqbvoAd7.js +717 -0
  94. package/dist/lib/client/{scrollable-SRNYlhF7.js → scrollable-BVaDUXng.js} +12 -12
  95. package/dist/lib/client/select/index.js +1 -1
  96. package/dist/lib/client/select-Dad51Xbn.js +1934 -0
  97. package/dist/lib/client/separator/index.js +1 -1
  98. package/dist/lib/client/slider/index.js +1 -1
  99. package/dist/lib/client/slider-CLSKFq_M.js +927 -0
  100. package/dist/lib/client/switch/index.js +1 -1
  101. package/dist/lib/client/switch-Bzuu5EIg.js +306 -0
  102. package/dist/lib/client/tabs/index.js +1 -1
  103. package/dist/lib/client/tabs-DWiBDv8D.js +695 -0
  104. package/dist/lib/client/toast/index.js +1 -1
  105. package/dist/lib/client/toast-DmtPJW2k.js +1118 -0
  106. package/dist/lib/client/toggle/index.js +1 -1
  107. package/dist/lib/client/toggle-CAe-Z8Xn.js +142 -0
  108. package/dist/lib/client/toggle-group/index.js +1 -1
  109. package/dist/lib/client/toggle-group-BbQg5s-m.js +134 -0
  110. package/dist/lib/client/toolbar/index.js +1 -1
  111. package/dist/lib/client/toolbar-BXT_g-oX.js +504 -0
  112. package/dist/lib/client/tooltip/index.js +1 -1
  113. package/dist/lib/client/tooltip-h2r2_Xuo.js +850 -0
  114. package/dist/lib/client/use-render/index.js +2 -0
  115. package/dist/lib/client/useFilteredItems-BX0BEuSI.js +2301 -0
  116. package/dist/lib/client/useRender-CxZ8PI-g.js +12 -0
  117. package/dist/lib/server/{DialogHandle-ATZlm9RC.js → DialogHandle-BGIISmG7.js} +37 -46
  118. package/dist/lib/server/{DialogPopup-BebI-w5P.js → DialogPopup-C2ZDGf42.js} +12 -15
  119. package/dist/lib/server/{FieldControl-Y_kI7ARp.js → FieldControl-CDMMyvuj.js} +62 -26
  120. package/dist/lib/server/{FieldRootContext-IC-LWzVp.js → FieldRootContext-Bfpna6gA.js} +3 -3
  121. package/dist/lib/server/{FocusManager-BrbZVWME.js → FocusManager-D-xgblGs.js} +9 -5
  122. package/dist/lib/server/{FormContext-pvESt85v.js → FormContext-CYwo_ZnB.js} +1 -0
  123. package/dist/lib/server/{InternalBackdrop-C_iDPVR-.js → InternalBackdrop-D_2zAWnl.js} +1 -1
  124. package/dist/lib/server/{LabelableContext-DZP3rgAY.js → LabelableContext-BTeF0IWb.js} +4 -6
  125. package/dist/lib/server/{MenuSubmenuTrigger-DA4gsv6z.js → MenuSubmenuTrigger-BMQKlOvU.js} +177 -210
  126. package/dist/lib/server/{PopupHandle-DthPgNjy.js → PopupHandle-QNj4mED2.js} +14 -5
  127. package/dist/lib/server/{PopupStore-DEs3FAEe.js → PopupStore-evylvVnN.js} +42 -15
  128. package/dist/lib/server/{PopupViewport-3r_KTFwX.js → PopupViewport-BDttjORN.js} +38 -28
  129. package/dist/lib/server/{Separator-vhhYxWGr.js → Separator-DTvtnxzP.js} +4 -6
  130. package/dist/lib/server/TriggerFocusGuards-B9GNbLrL.js +61 -0
  131. package/dist/lib/server/accordion/index.js +39 -77
  132. package/dist/lib/server/alert-dialog/index.js +2 -2
  133. package/dist/lib/server/autocomplete/index.js +14 -5
  134. package/dist/lib/server/avatar/index.js +90 -51
  135. package/dist/lib/server/button/index.js +14 -15
  136. package/dist/lib/server/checkbox/index.js +37 -64
  137. package/dist/lib/server/checkbox-group/index.js +21 -11
  138. package/dist/lib/server/collapsible/index.js +42 -49
  139. package/dist/lib/server/combobox/index.js +79 -50
  140. package/dist/lib/server/{compositeNavigation-BRVT1C38.js → compositeNavigation-D5jKM4yk.js} +32 -1
  141. package/dist/lib/server/{constants-9H__9xbS.js → constants-ByqXubhO.js} +10 -5
  142. package/dist/lib/server/context-menu/index.js +14 -16
  143. package/dist/lib/server/{createAnchorPositioning-C-cVOPwz.js → createAnchorPositioning-DrQYe7RS.js} +12 -7
  144. package/dist/lib/server/{createAnchoredPopupScrollLock-DFuUrykR.js → createAnchoredPopupScrollLock-q6gnOSmv.js} +2 -2
  145. package/dist/lib/server/{createClickInteraction-BYsMgvup.js → createClickInteraction-D7oc1Vco.js} +1 -1
  146. package/dist/lib/server/{createCollapsiblePanel-DTyVJz0G.js → createCollapsiblePanel-B45kTe6v.js} +1 -1
  147. package/dist/lib/server/{createFocusInteraction-EIS0QOel.js → createFocusInteraction-DFKr4G7a.js} +22 -2
  148. package/dist/lib/server/createLabelableId-WMUKtY6s.js +18 -0
  149. package/dist/lib/server/{createPopupAutoResize-DO50jjNX.js → createPopupAutoResize-Cg0-lLf4.js} +2 -2
  150. package/dist/lib/server/{createTransitionStatus-BTlrerSS.js → createTransitionStatus-184v7j3-.js} +2 -2
  151. package/dist/lib/server/dialog/index.js +2 -2
  152. package/dist/lib/server/{dom-Crg_2R-j.js → dom-D8_aB1yy.js} +14 -1
  153. package/dist/lib/server/drawer/index.js +96 -100
  154. package/dist/lib/server/field/index.js +110 -98
  155. package/dist/lib/server/fieldset/index.js +13 -16
  156. package/dist/lib/server/form/index.js +18 -14
  157. package/dist/lib/server/index.js +5 -3
  158. package/dist/lib/server/input/index.js +1 -1
  159. package/dist/lib/server/internals/composeEventHandlers.js +15 -9
  160. package/dist/lib/server/internals/field-root-context/index.js +1 -1
  161. package/dist/lib/server/internals/form-context/index.js +1 -1
  162. package/dist/lib/server/internals/labelable-provider/index.js +1 -1
  163. package/dist/lib/server/{mergeStyleValue-Db8bRCM4.js → isSolidAccessor-CZpzAH5l.js} +7 -21
  164. package/dist/lib/server/menu/index.js +30 -29
  165. package/dist/lib/server/menubar/index.js +10 -35
  166. package/dist/lib/server/mergeStyleValue-DecVaoac.js +20 -0
  167. package/dist/lib/server/meter/index.js +20 -32
  168. package/dist/lib/server/navigation-menu/index.js +67 -138
  169. package/dist/lib/server/number-field/index.js +64 -62
  170. package/dist/lib/server/otp-field/index.js +19 -22
  171. package/dist/lib/server/popover/index.js +61 -77
  172. package/dist/lib/server/{popupStateMapping-nKoUwoke.js → popupStateMapping-VHqr6M4H.js} +19 -17
  173. package/dist/lib/server/preview-card/index.js +39 -50
  174. package/dist/lib/server/progress/index.js +21 -33
  175. package/dist/lib/server/radio/index.js +24 -45
  176. package/dist/lib/server/radio-group/index.js +12 -13
  177. package/dist/lib/server/{runOnceAnimationsFinish-DCHzXWZU.js → runOnceAnimationsFinish-CYq38H8J.js} +2 -1
  178. package/dist/lib/server/{safePolygon-CAm5RJGv.js → safePolygon-B8QtiIZ3.js} +6 -1
  179. package/dist/lib/server/scroll-area/index.js +40 -49
  180. package/dist/lib/server/{scrollable-CjsSxbGr.js → scrollable-C9Pgq8T5.js} +1 -1
  181. package/dist/lib/server/select/index.js +128 -213
  182. package/dist/lib/server/separator/index.js +1 -1
  183. package/dist/lib/server/slider/index.js +39 -52
  184. package/dist/lib/server/switch/index.js +22 -32
  185. package/dist/lib/server/tabs/index.js +197 -137
  186. package/dist/lib/server/toast/index.js +78 -95
  187. package/dist/lib/server/toggle/index.js +11 -13
  188. package/dist/lib/server/toggle-group/index.js +11 -9
  189. package/dist/lib/server/toolbar/index.js +76 -93
  190. package/dist/lib/server/tooltip/index.js +53 -57
  191. package/dist/lib/server/use-render/index.js +2 -0
  192. package/dist/lib/server/{useFilteredItems-DvuctLt3.js → useFilteredItems-BmhL0nf1.js} +335 -316
  193. package/dist/lib/server/useRender-CryVdCjs.js +16 -0
  194. package/dist/lib/types/accordion/header/AccordionHeader.d.ts +1 -1
  195. package/dist/lib/types/accordion/item/AccordionItem.d.ts +1 -1
  196. package/dist/lib/types/accordion/panel/AccordionPanel.d.ts +1 -1
  197. package/dist/lib/types/accordion/root/AccordionRoot.d.ts +2 -7
  198. package/dist/lib/types/accordion/trigger/AccordionTrigger.d.ts +7 -7
  199. package/dist/lib/types/alert-dialog/trigger/AlertDialogTrigger.d.ts +1 -2
  200. package/dist/lib/types/autocomplete/trigger/AutocompleteTrigger.d.ts +1 -0
  201. package/dist/lib/types/avatar/fallback/AvatarFallback.d.ts +2 -2
  202. package/dist/lib/types/avatar/image/AvatarImage.d.ts +9 -3
  203. package/dist/lib/types/avatar/image/createImageLoadingStatus.d.ts +3 -2
  204. package/dist/lib/types/avatar/root/AvatarRoot.d.ts +1 -1
  205. package/dist/lib/types/button/Button.d.ts +1 -1
  206. package/dist/lib/types/checkbox-group/CheckboxGroupContext.d.ts +4 -1
  207. package/dist/lib/types/collapsible/panel/CollapsiblePanel.d.ts +1 -1
  208. package/dist/lib/types/collapsible/root/CollapsibleRoot.d.ts +1 -1
  209. package/dist/lib/types/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
  210. package/dist/lib/types/combobox/chip/ComboboxChip.d.ts +2 -0
  211. package/dist/lib/types/combobox/index.d.ts +2 -0
  212. package/dist/lib/types/combobox/index.parts.d.ts +1 -0
  213. package/dist/lib/types/combobox/items/createItems.d.ts +42 -0
  214. package/dist/lib/types/combobox/root/AriaCombobox.d.ts +4 -0
  215. package/dist/lib/types/combobox/root/ComboboxRoot.d.ts +17 -8
  216. package/dist/lib/types/combobox/root/ComboboxRootContext.d.ts +2 -0
  217. package/dist/lib/types/combobox/store/ComboboxStore.d.ts +1 -0
  218. package/dist/lib/types/combobox/trigger/ComboboxTrigger.d.ts +1 -0
  219. package/dist/lib/types/combobox/utils/handleInputPress.d.ts +1 -1
  220. package/dist/lib/types/dialog/backdrop/DialogBackdrop.d.ts +1 -1
  221. package/dist/lib/types/dialog/description/DialogDescription.d.ts +1 -1
  222. package/dist/lib/types/dialog/title/DialogTitle.d.ts +1 -1
  223. package/dist/lib/types/dialog/viewport/DialogViewport.d.ts +1 -1
  224. package/dist/lib/types/drawer/backdrop/DrawerBackdrop.d.ts +1 -1
  225. package/dist/lib/types/drawer/content/DrawerContent.d.ts +1 -1
  226. package/dist/lib/types/drawer/indent/DrawerIndent.d.ts +1 -1
  227. package/dist/lib/types/drawer/indent-background/DrawerIndentBackground.d.ts +1 -1
  228. package/dist/lib/types/field/control/FieldControl.d.ts +5 -5
  229. package/dist/lib/types/field/root/FieldRoot.d.ts +1 -1
  230. package/dist/lib/types/field/root/createFieldValidation.d.ts +3 -2
  231. package/dist/lib/types/fieldset/legend/FieldsetLegend.d.ts +1 -1
  232. package/dist/lib/types/fieldset/root/FieldsetRoot.d.ts +1 -1
  233. package/dist/lib/types/index.d.ts +1 -0
  234. package/dist/lib/types/internals/composeEventHandlers.d.ts +9 -2
  235. package/dist/lib/types/internals/createTransitionStatus.d.ts +1 -1
  236. package/dist/lib/types/internals/field-root-context/FieldRootContext.d.ts +1 -0
  237. package/dist/lib/types/internals/form-context/FormContext.d.ts +1 -0
  238. package/dist/lib/types/internals/labelable-provider/LabelableContext.d.ts +1 -0
  239. package/dist/lib/types/internals/labelable-provider/createLabelableId.d.ts +3 -0
  240. package/dist/lib/types/internals/overlay/PopupPortal.d.ts +4 -2
  241. package/dist/lib/types/internals/overlay/createPopupPresence.d.ts +1 -0
  242. package/dist/lib/types/internals/overlay/dom.d.ts +2 -0
  243. package/dist/lib/types/menu/root/MenuRootContext.d.ts +1 -0
  244. package/dist/lib/types/meter/indicator/MeterIndicator.d.ts +1 -1
  245. package/dist/lib/types/meter/label/MeterLabel.d.ts +1 -1
  246. package/dist/lib/types/meter/root/MeterRoot.d.ts +1 -1
  247. package/dist/lib/types/meter/track/MeterTrack.d.ts +1 -1
  248. package/dist/lib/types/meter/value/MeterValue.d.ts +1 -1
  249. package/dist/lib/types/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -0
  250. package/dist/lib/types/number-field/input/NumberFieldInput.d.ts +5 -5
  251. package/dist/lib/types/number-field/root/NumberFieldRootContext.d.ts +1 -0
  252. package/dist/lib/types/popover/arrow/PopoverArrow.d.ts +1 -1
  253. package/dist/lib/types/popover/backdrop/PopoverBackdrop.d.ts +1 -1
  254. package/dist/lib/types/popover/description/PopoverDescription.d.ts +1 -1
  255. package/dist/lib/types/popover/positioner/PopoverPositioner.d.ts +1 -1
  256. package/dist/lib/types/popover/title/PopoverTitle.d.ts +1 -1
  257. package/dist/lib/types/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
  258. package/dist/lib/types/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
  259. package/dist/lib/types/preview-card/positioner/PreviewCardPositioner.d.ts +1 -1
  260. package/dist/lib/types/progress/indicator/ProgressIndicator.d.ts +1 -1
  261. package/dist/lib/types/progress/label/ProgressLabel.d.ts +1 -1
  262. package/dist/lib/types/progress/root/ProgressRoot.d.ts +1 -1
  263. package/dist/lib/types/progress/track/ProgressTrack.d.ts +1 -1
  264. package/dist/lib/types/progress/value/ProgressValue.d.ts +1 -1
  265. package/dist/lib/types/radio/indicator/RadioIndicator.d.ts +2 -2
  266. package/dist/lib/types/scroll-area/content/ScrollAreaContent.d.ts +1 -1
  267. package/dist/lib/types/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
  268. package/dist/lib/types/scroll-area/root/ScrollAreaRoot.d.ts +1 -1
  269. package/dist/lib/types/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +2 -1
  270. package/dist/lib/types/scroll-area/thumb/ScrollAreaThumb.d.ts +1 -1
  271. package/dist/lib/types/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
  272. package/dist/lib/types/separator/Separator.d.ts +1 -1
  273. package/dist/lib/types/slider/track/SliderTrack.d.ts +2 -2
  274. package/dist/lib/types/tabs/indicator/prehydrationScript.d.ts +1 -1
  275. package/dist/lib/types/tabs/list/TabsList.d.ts +1 -1
  276. package/dist/lib/types/tabs/panel/TabsPanel.d.ts +1 -1
  277. package/dist/lib/types/tabs/root/TabsRoot.d.ts +1 -1
  278. package/dist/lib/types/tabs/tab/TabsTab.d.ts +1 -1
  279. package/dist/lib/types/toast/createToastManager.d.ts +2 -2
  280. package/dist/lib/types/toast/store/ToastStore.d.ts +1 -1
  281. package/dist/lib/types/toast/useToastManager.d.ts +1 -1
  282. package/dist/lib/types/toggle/Toggle.d.ts +1 -1
  283. package/dist/lib/types/toggle-group/ToggleGroup.d.ts +1 -1
  284. package/dist/lib/types/toolbar/group/ToolbarGroup.d.ts +1 -1
  285. package/dist/lib/types/toolbar/link/ToolbarLink.d.ts +10 -3
  286. package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +10 -4
  287. package/dist/lib/types/toolbar/separator/ToolbarSeparator.d.ts +1 -1
  288. package/dist/lib/types/tooltip/arrow/TooltipArrow.d.ts +1 -1
  289. package/dist/lib/types/tooltip/positioner/TooltipPositioner.d.ts +1 -1
  290. package/dist/lib/types/types/index.d.ts +7 -3
  291. package/dist/lib/types/use-render/index.d.ts +2 -0
  292. package/dist/lib/types/use-render/useRender.d.ts +10 -0
  293. package/package.json +24 -11
  294. package/dist/lib/client/DialogHandle-DrN2YWCv.js +0 -518
  295. package/dist/lib/client/DialogPopup-ZlqmGfdk.js +0 -136
  296. package/dist/lib/client/FieldControl-Bc-z2og6.js +0 -116
  297. package/dist/lib/client/MenuSubmenuTrigger-QZkQ0F2v.js +0 -1570
  298. package/dist/lib/client/PopupViewport-DgrIqQea.js +0 -152
  299. package/dist/lib/client/Separator-9DboD_Si.js +0 -25
  300. package/dist/lib/client/TriggerFocusGuards-CQ-JuASy.js +0 -56
  301. package/dist/lib/client/accordion-sOXt9AlG.js +0 -399
  302. package/dist/lib/client/avatar-AF9vyD4q.js +0 -146
  303. package/dist/lib/client/button-DpUi-2g8.js +0 -82
  304. package/dist/lib/client/checkbox-BbAwOptH.js +0 -441
  305. package/dist/lib/client/checkbox-group-CSSp_805.js +0 -128
  306. package/dist/lib/client/collapsible-BIbje_ub.js +0 -232
  307. package/dist/lib/client/combobox-8O-vgTLL.js +0 -352
  308. package/dist/lib/client/compositeNavigation-sxniYTc7.js +0 -58
  309. package/dist/lib/client/context-menu-BTMkXtrs.js +0 -217
  310. package/dist/lib/client/createFocusInteraction-D4w1-235.js +0 -50
  311. package/dist/lib/client/drawer-Ce2cChLt.js +0 -1550
  312. package/dist/lib/client/field-C-o7jzKW.js +0 -469
  313. package/dist/lib/client/fieldset-BQTAWv2L.js +0 -65
  314. package/dist/lib/client/form-BINBiW5L.js +0 -106
  315. package/dist/lib/client/menu-DeMT08oD.js +0 -326
  316. package/dist/lib/client/menubar-C4aomSYv.js +0 -185
  317. package/dist/lib/client/meter-xSU37Q0m.js +0 -171
  318. package/dist/lib/client/navigation-menu-ZILQmdn6.js +0 -1083
  319. package/dist/lib/client/number-field-B8CsTb_8.js +0 -1035
  320. package/dist/lib/client/otp-field-DBkMcnog.js +0 -582
  321. package/dist/lib/client/popover-CQwyp-fs.js +0 -929
  322. package/dist/lib/client/popupStateMapping-C9eZl19i.js +0 -367
  323. package/dist/lib/client/preview-card-D_2Q8lpC.js +0 -625
  324. package/dist/lib/client/progress-D7r0xAC9.js +0 -188
  325. package/dist/lib/client/radio-CzGQ81z1.js +0 -299
  326. package/dist/lib/client/radio-group-DpHlBKA6.js +0 -193
  327. package/dist/lib/client/runOnceAnimationsFinish-15EM-Z4l.js +0 -48
  328. package/dist/lib/client/scroll-area-CffM4U0R.js +0 -701
  329. package/dist/lib/client/select-IFhiEg73.js +0 -1940
  330. package/dist/lib/client/slider-BCagYmGp.js +0 -921
  331. package/dist/lib/client/switch-RIJeDnvS.js +0 -308
  332. package/dist/lib/client/tabs-fOAKs7r3.js +0 -696
  333. package/dist/lib/client/toast-D2P8UqUs.js +0 -1108
  334. package/dist/lib/client/toggle-group-0Aue0owJ.js +0 -129
  335. package/dist/lib/client/toggle-momVEIBL.js +0 -138
  336. package/dist/lib/client/toolbar-Du22aKCv.js +0 -492
  337. package/dist/lib/client/tooltip-CyK61fl1.js +0 -844
  338. package/dist/lib/client/useFilteredItems-DTekHz39.js +0 -2223
  339. package/dist/lib/client/withoutComponentBinding-CcCW7fSc.js +0 -13
  340. package/dist/lib/server/TriggerFocusGuards-sbGwf45f.js +0 -63
  341. package/dist/lib/server/withoutComponentBinding-BHaWr5kU.js +0 -20
  342. package/dist/lib/types/internals/withoutComponentBinding.d.ts +0 -7
@@ -1,1035 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { getStateAttributesProps as t } from "./internals/getStateAttributesProps.js";
3
- import { F as n, O as r, _ as i, b as a, f as o, g as s, h as c, m as l, o as u, w as d } from "./reasons-Co5CzjKq.js";
4
- import { n as f, t as p } from "./resolveStyle-XcgAuaKR.js";
5
- import { createChangeEventDetails as m, createGenericEventDetails as h } from "./internals/createBaseUIEventDetails.js";
6
- import { composeEventHandlers as g } from "./internals/composeEventHandlers.js";
7
- import { fieldValidityMapping as _ } from "./internals/field-constants.js";
8
- import { n as v } from "./FieldRootContext-izCEh80D.js";
9
- import { n as y } from "./FormContext-BB05lWOI.js";
10
- import { r as b } from "./LabelableContext-DKsB0fIx.js";
11
- import { mergeStyles as x } from "./internals/mergeStyles.js";
12
- import { Dynamic as S, Portal as C, createComponent as w, delegateEvents as T, effect as E, getNextElement as D, memo as O, mergeProps as k, ref as ee, runHydrationEvents as A, setAttribute as j, style as M, template as N } from "@solidjs/web";
13
- import { Show as P, createContext as F, createEffect as I, createMemo as L, createSignal as R, createUniqueId as z, flush as te, omit as B, onCleanup as V, onSettled as H, untrack as U, useContext as W } from "solid-js";
14
- //#region src/number-field/utils/parse.ts
15
- var G = "零〇一二三四五六七八九", ne = /[٠-٩۰-۹0-9]/g, K = /[零〇一二三四五六七八九]/g, re = [
16
- "%",
17
- "٪",
18
- "%",
19
- "﹪"
20
- ], ie = ["‰", "؉"], ae = /[%٪%﹪]/, q = /[‰؉]/, oe = /[%٪%﹪]/g, se = /[‰؉]/g, ce = /[٠-٩۰-۹]/, J = /[零〇一二三四五六七八九]/, le = /[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;
21
- function ue(e) {
22
- return le.test(e);
23
- }
24
- var de = [
25
- ".",
26
- ",",
27
- ".",
28
- ",",
29
- "٫",
30
- "٬"
31
- ], fe = /\p{Zs}/u, pe = /\p{Cf}/u, me = /\p{Cf}/gu, he = [
32
- "+",
33
- "+",
34
- "﹢"
35
- ], ge = [
36
- "-",
37
- "−",
38
- "-",
39
- "‒",
40
- "–",
41
- "—",
42
- "﹣"
43
- ], Y = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
44
- function X(e, t) {
45
- return new Intl.NumberFormat(e, t);
46
- }
47
- function _e(e, t) {
48
- let [n, r = "0"] = String(e).split("e");
49
- return Number(`${n}e${Number(r) + t}`);
50
- }
51
- var ve = /[-−-‒–—﹣]/gu, Z = /[++﹢]/gu, ye = /[-−-‒–—﹣]/, be = /[++﹢]/, xe = 11111.1;
52
- function Se(e, t) {
53
- return X(e, t).formatToParts(xe);
54
- }
55
- function Ce(e, t) {
56
- let n = Se(e, t), r = {};
57
- n.forEach((e) => {
58
- r[e.type] = e.value;
59
- });
60
- let i = ".";
61
- return X(e).formatToParts(.1).forEach((e) => {
62
- e.type === "decimal" && (i = e.value);
63
- }), {
64
- ...r,
65
- decimal: i
66
- };
67
- }
68
- function Q(e, t, n) {
69
- let r = e.replace(me, "").trim();
70
- r = r.replace(ve, "-").replace(Z, "+");
71
- let i = !1, a = (e, t) => (t === "-" && (i = !0), "");
72
- r = r.replace(/([+-])\s*$/, a).replace(/^\s*([+-])/, a);
73
- let o = t;
74
- o === void 0 && (ce.test(r) ? o = "ar" : J.test(r) && (o = "zh"));
75
- let { group: s, decimal: c, currency: l, exponentSeparator: u } = Ce(o, n), d = X(o, n).formatToParts(1).filter((e) => e.type === "unit").map((e) => Y(e.value)), f = d.length ? new RegExp(d.join("|"), "g") : null, p = null;
76
- s && (p = /\p{Zs}/u.test(s) ? /\p{Zs}/gu : s === "'" || s === "’" ? /['’]/g : new RegExp(Y(s), "g"));
77
- let m = [
78
- [p, ""],
79
- [new RegExp(Y(c), "g"), "."],
80
- [/[.٫]/g, "."],
81
- [/[,٬]/g, ""],
82
- [l ? new RegExp(Y(l), "g") : null, ""],
83
- [f, ""],
84
- [oe, ""],
85
- [se, ""],
86
- [u ? new RegExp(Y(u), "g") : null, "e"],
87
- [ne, (e) => String(e.charCodeAt(0) % 16)],
88
- [K, (e) => String(Math.max(G.indexOf(e) - 1, 0))]
89
- ].reduce((e, [t, n]) => t ? e.replace(t, n) : e, r), h = m.lastIndexOf(".");
90
- if (h !== -1 && (m = `${m.slice(0, h).replace(/\./g, "")}.${m.slice(h + 1).replace(/\./g, "")}`), /^[-+]?Infinity$/i.test(r) || r.includes("∞")) return null;
91
- let g = (i ? "-" : "") + m, _ = parseFloat(g), v = n?.style, y = v === "unit" && n?.unit === "percent", b = ae.test(e) || v === "percent";
92
- return q.test(e) ? _ = _e(_, -3) : !y && b && (_ = _e(_, -2)), Number.isFinite(_) ? _ : null;
93
- }
94
- //#endregion
95
- //#region src/number-field/utils/format.ts
96
- var we = /* @__PURE__ */ new Map();
97
- function Te(e) {
98
- if (e !== void 0) return Array.isArray(e) ? e.map((e) => e.toString()).join(",") : e.toString();
99
- }
100
- function Ee(e, t) {
101
- let n = JSON.stringify({
102
- locale: Te(e),
103
- options: t
104
- }), r = we.get(n);
105
- return r || (r = new Intl.NumberFormat(e, t), we.set(n, r)), r;
106
- }
107
- function De(e, t, n) {
108
- return e === null ? "" : Ee(t, n).format(e);
109
- }
110
- //#endregion
111
- //#region src/number-field/utils/platform.ts
112
- function Oe() {
113
- return typeof navigator > "u" ? "" : navigator.platform.toLowerCase();
114
- }
115
- function ke() {
116
- return typeof navigator > "u" ? "" : navigator.userAgent.toLowerCase();
117
- }
118
- function Ae() {
119
- let e = Oe(), t = typeof navigator > "u" ? 0 : navigator.maxTouchPoints;
120
- return /^i(os$|p)/.test(e) || e === "macintel" && t > 1;
121
- }
122
- function je() {
123
- return typeof CSS < "u" && !!CSS.supports?.("-webkit-backdrop-filter:none");
124
- }
125
- function Me() {
126
- return !je() && ke().includes("firefox");
127
- }
128
- //#endregion
129
- //#region src/number-field/utils/stateAttributesMapping.ts
130
- var $ = {
131
- inputValue: () => null,
132
- value: () => null,
133
- ..._
134
- }, Ne = 1e-10, Pe = 1e-10;
135
- function Fe(e) {
136
- return e?.maximumFractionDigits != null || e?.minimumFractionDigits != null || e?.maximumSignificantDigits != null || e?.minimumSignificantDigits != null || e?.roundingIncrement != null || e?.roundingMode != null || e?.roundingPriority != null;
137
- }
138
- function Ie(e, t) {
139
- if (!Number.isFinite(e)) return e;
140
- if (!Fe(t)) {
141
- let t = parseFloat(e.toPrecision(15));
142
- return Math.abs(t - e) <= Math.min(2 ** -52 * Math.max(1, Math.abs(e)), Pe) ? t : e;
143
- }
144
- let n = new Intl.NumberFormat("en-US", {
145
- ...t,
146
- signDisplay: "auto",
147
- currencySign: "standard",
148
- notation: t.notation === "compact" ? "standard" : t.notation,
149
- useGrouping: !1
150
- }), r = n.format(e), i = Q(r, "en-US", t);
151
- return i === null ? e : n.format(i) === r ? i : e;
152
- }
153
- function Le(e, t, n, r) {
154
- let i = Math.abs(n), a = Math.sign(n), o = i * Ne * a, s = e - t + o;
155
- return r ? t + Math.round(s / n) * n : t + (a > 0 ? Math.floor(s / i) : Math.ceil(s / i)) * i;
156
- }
157
- function Re(e, t, n) {
158
- return Math.max(t, Math.min(e, n));
159
- }
160
- function ze(e, t, n, r, i, a, o, s, c) {
161
- if (e === null) return e;
162
- let l = e;
163
- if (t != null && o && t !== 0 && (l = Le(l, s || n === -(2 ** 53 - 1) ? i : n, t, s)), c && (l = Re(l, n, r)), t == null && !Fe(a)) return l;
164
- let u = Ie(l, a);
165
- return c ? Re(u, n, r) : u;
166
- }
167
- //#endregion
168
- //#region src/number-field/root/NumberFieldRootContext.ts
169
- var Be = Symbol("NumberFieldRootContext"), Ve = F(Be);
170
- function He() {
171
- let e = W(Ve);
172
- if (e === Be) throw Error("Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.");
173
- return e;
174
- }
175
- //#endregion
176
- //#region src/number-field/root/NumberFieldRoot.tsx
177
- var Ue = /* @__PURE__ */ N("<input type=number aria-hidden=true tabindex=-1>"), We = {
178
- "clip-path": "inset(50%)",
179
- overflow: "hidden",
180
- "white-space": "nowrap",
181
- border: "0",
182
- padding: "0",
183
- width: "1px",
184
- height: "1px",
185
- margin: "-1px",
186
- position: "fixed",
187
- top: "0",
188
- left: "0"
189
- }, Ge = {
190
- ...We,
191
- position: "absolute"
192
- };
193
- function Ke(e) {
194
- let r = v(!0), i = y(), a = b(), o = e, s = e, c = Symbol("NumberField"), l = U(a.controlId), u = typeof l == "string" ? l : `base-ui-${z()}`, g = U(() => o.value !== void 0), [_, x] = R(() => U(() => o.defaultValue ?? null)), [C, T] = R(), [O, N] = R(), [P, F] = R(!1), [te, V] = R("numeric"), H = !0, W = null, G = !1, ne = B(s, "allowOutOfRange", "allowWheelScrub", "as", "class", "defaultValue", "disabled", "form", "format", "id", "inputRef", "largeStep", "locale", "max", "min", "name", "onChange", "onValueChange", "onValueCommitted", "readOnly", "ref", "required", "smallStep", "snapOnStep", "step", "style", "value"), K = L(() => g ? o.value ?? null : _()), ae = L(() => o.id ?? u), q = L(() => o.min), oe = L(() => o.max), se = L(() => q() ?? -(2 ** 53 - 1)), ce = L(() => oe() ?? 2 ** 53 - 1), J = L(() => r.disabled() || (o.disabled ?? !1)), le = L(() => o.readOnly ?? !1), ue = L(() => o.required ?? !1), pe = L(() => o.name), me = L(() => r.name() ?? pe()), Y = L(() => o.locale), X = L(() => o.format), [_e, ve] = R(() => De(U(K), U(Y), U(X))), Z = L(() => ({
195
- ...r.state(),
196
- disabled: J(),
197
- readOnly: le(),
198
- required: ue(),
199
- value: K(),
200
- inputValue: _e(),
201
- scrubbing: P()
202
- })), ye = L(() => f(e.class, Z())), be = L(() => p(e.style, Z())), xe = L(() => t(Z(), $));
203
- function Q(e) {
204
- ve(e);
205
- }
206
- function we() {
207
- let e = X(), t = Se(Y(), e), n = new Set(de), r = (e) => {
208
- for (let t of e) n.add(t);
209
- }, i = t.find((e) => e.type === "decimal")?.value ?? Ce(Y(), e).decimal;
210
- n.add(i);
211
- for (let e of t) e.type !== "integer" && e.type !== "fraction" && e.type !== "exponentInteger" && e.type !== "compact" && (r(Array.from(e.value)), fe.test(e.value) && n.add(" "));
212
- let a = e?.style;
213
- return (a === "percent" || a === "unit" && e?.unit === "percent") && r(re), (a === "percent" || a === "unit" && e?.unit === "permille") && r(ie), r(he), (se() < 0 || (o.allowOutOfRange ?? !1)) && r(ge), n;
214
- }
215
- function Te(e) {
216
- if (e?.altKey) return o.smallStep ?? .1;
217
- if (e?.shiftKey) return o.largeStep ?? 10;
218
- let t = o.step ?? 1;
219
- return t === "any" ? 1 : t;
220
- }
221
- function Ee(e, t) {
222
- let n = t.direction, i = t.event, a = t.reason.startsWith("input-") || t.reason === "none", s = ze(e, n ? Te(i) * n : void 0, se(), ce(), q() ?? 0, X(), o.snapOnStep ?? !1, i.altKey ?? !1, !(o.allowOutOfRange && a)), c = s !== K() || a && (e !== K() || !H);
223
- if (c) {
224
- if (o.onValueChange?.(s, t), t.isCanceled) return !1;
225
- g || x(s), r.setDirty(s !== r.validityData().initialValue), G = !0;
226
- }
227
- return W = s, H && Q(De(s, Y(), X())), c;
228
- }
229
- function Oe(e, { direction: t, currentValue: n, event: r, reason: i }) {
230
- let a = n ?? K(), o = r;
231
- return typeof a == "number" ? Ee(a + e * t, m(i, o, void 0, { direction: t })) : Ee(0, m(i, o));
232
- }
233
- function ke(e, t) {
234
- G = !1, o.onValueCommitted?.(e, t);
235
- }
236
- function je(e) {
237
- let t = C();
238
- e.ctrlKey || !t || t.ownerDocument.activeElement !== t || (e.preventDefault(), H = !0, Oe(Te(e), {
239
- direction: e.deltaY > 0 ? -1 : 1,
240
- event: e,
241
- reason: "wheel"
242
- }) && ke(W, h(n, e)));
243
- }
244
- function Me(e) {
245
- if (e.defaultPrevented || J() || le()) return;
246
- let t = e.currentTarget.valueAsNumber, n = Number.isNaN(t) ? null : t;
247
- Ee(n, m(d, e)), i.clearError(me()), r.validation.change(W ?? n);
248
- }
249
- return I(() => K(), (e) => {
250
- r.setFilled(e !== null);
251
- }), I(() => ({
252
- currentValue: _e(),
253
- formattedValue: De(K(), Y(), X())
254
- }), (e) => {
255
- H && e.formattedValue !== e.currentValue && Q(e.formattedValue);
256
- }), I(() => se(), (e) => {
257
- Ae() && V(e >= 0 ? "decimal" : "text");
258
- }), I(() => ({
259
- allowWheelScrub: o.allowWheelScrub ?? !1,
260
- disabled: J(),
261
- input: C(),
262
- readOnly: le()
263
- }), (e) => {
264
- if (!e.allowWheelScrub || e.disabled || e.readOnly || !e.input) return;
265
- let t = e.input;
266
- return t.addEventListener("wheel", je, { passive: !1 }), () => t.removeEventListener("wheel", je);
267
- }), I(() => ({
268
- disabled: J(),
269
- hidden: O()
270
- }), (e) => {
271
- if (!(!e.hidden || e.disabled)) return r.validation.registerInput(c, e.hidden, () => U(() => C() ?? null));
272
- }), w(Ve, {
273
- value: {
274
- controlSource: c,
275
- minWithDefault: se,
276
- maxWithDefault: ce,
277
- id: ae,
278
- setValue: Ee,
279
- getStepAmount: Te,
280
- incrementValue: Oe,
281
- inputElement: C,
282
- setInputElement: (e) => T(e),
283
- allowInputSync: () => H,
284
- setAllowInputSync: (e) => {
285
- H = e;
286
- },
287
- formatOptions: X,
288
- value: K,
289
- lastChangedValue: () => W,
290
- setLastChangedValue: (e) => {
291
- W = e;
292
- },
293
- hasPendingCommit: () => G,
294
- setHasPendingCommit: (e) => {
295
- G = e;
296
- },
297
- name: me,
298
- nameProp: pe,
299
- inputMode: te,
300
- getAllowedNonNumericKeys: we,
301
- min: q,
302
- max: oe,
303
- inputValue: _e,
304
- setInputValue: Q,
305
- locale: Y,
306
- setIsScrubbing: (e) => F(e),
307
- state: Z,
308
- onValueCommitted: ke
309
- },
310
- get children() {
311
- return [w(S, k({
312
- get component() {
313
- return e.as ?? "div";
314
- },
315
- ref: [o.ref],
316
- get class() {
317
- return ye();
318
- },
319
- get style() {
320
- return be();
321
- }
322
- }, xe, ne)), (() => {
323
- var e = D(Ue);
324
- return e.$$input = Me, e.addEventListener("focus", () => C()?.focus()), ee(() => [((e) => N(e)), o.inputRef], e), E(() => ({
325
- e: o.form,
326
- t: me(),
327
- a: K() ?? "",
328
- o: q(),
329
- i: oe(),
330
- n: o.step ?? 1,
331
- s: J(),
332
- h: le(),
333
- r: ue(),
334
- d: me() ? Ge : We
335
- }), ({ e: t, t: n, a: r, o: i, i: a, n: o, s, h: c, r: l, d: u }, d) => {
336
- t !== d?.e && j(e, "form", t), n !== d?.t && j(e, "name", n), e.value = r ?? "", i !== d?.o && j(e, "min", i), a !== d?.i && j(e, "max", a), o !== d?.n && j(e, "step", o), s !== d?.s && j(e, "disabled", s), c !== d?.h && j(e, "readonly", c), l !== d?.r && j(e, "required", l), M(e, u, d?.d);
337
- }), A(), e;
338
- })()];
339
- }
340
- });
341
- }
342
- T(["input"]);
343
- //#endregion
344
- //#region src/number-field/group/NumberFieldGroup.tsx
345
- function qe(e) {
346
- let n = He(), r = B(e, "as", "class", "style"), i = n.state, a = L(() => f(e.class, i())), o = L(() => p(e.style, i())), s = L(() => t(i(), $));
347
- return w(S, k({
348
- get component() {
349
- return e.as ?? "div";
350
- },
351
- get class() {
352
- return a();
353
- },
354
- get style() {
355
- return o();
356
- },
357
- role: "group"
358
- }, s, r));
359
- }
360
- //#endregion
361
- //#region src/number-field/root/createPressAndHold.ts
362
- var Je = 60, Ye = 400, Xe = 8, Ze = 50, Qe = 3;
363
- function $e(e) {
364
- return e === "touch" || e === "pen";
365
- }
366
- function et(e) {
367
- let t = !1, n = 0, r = 0, i = 0, a = !1, o = !1, s = "", c, l, u, d, f, p, m = () => void 0, h = () => void 0;
368
- function g() {
369
- f !== void 0 && (p?.clearTimeout(f), f = void 0, p = void 0), c !== void 0 && (l?.clearTimeout(c), c = void 0, l = void 0), u !== void 0 && (d?.clearInterval(u), u = void 0, d = void 0), m(), m = () => void 0, n = 0;
370
- }
371
- function _(n) {
372
- g();
373
- let r = e.element(), i = r?.ownerDocument.defaultView;
374
- if (!r || !i) return;
375
- function a(e) {
376
- e.preventDefault();
377
- }
378
- i.addEventListener("contextmenu", a), m = () => {
379
- i.removeEventListener("contextmenu", a);
380
- }, h();
381
- let o = { once: !0 };
382
- function s(n) {
383
- t = !1, g(), e.onStop()?.(n);
384
- }
385
- if (i.addEventListener("pointerup", s, o), h = () => {
386
- i.removeEventListener("pointerup", s, o);
387
- }, !e.tick()(n)) {
388
- g();
389
- return;
390
- }
391
- l = i, c = i.setTimeout(() => {
392
- c = void 0, l = void 0, d = i, u = i.setInterval(() => {
393
- e.tick()(n) || g();
394
- }, Je);
395
- }, Ye);
396
- }
397
- let v = {
398
- onTouchStart() {
399
- a = !0;
400
- },
401
- onTouchEnd() {
402
- a = !1;
403
- },
404
- onPointerDown(a) {
405
- if (a.defaultPrevented || a.button || e.disabled()) return;
406
- if (s = a.pointerType, o = !1, t = !0, r = a.clientX, i = a.clientY, !$e(a.pointerType)) {
407
- a.preventDefault(), _(a);
408
- return;
409
- }
410
- let c = a.currentTarget?.ownerDocument.defaultView ?? e.element()?.ownerDocument.defaultView;
411
- c && (f !== void 0 && p?.clearTimeout(f), p = c, f = c.setTimeout(() => {
412
- f = void 0, p = void 0;
413
- let e = n;
414
- n = 0, t && e < Qe ? (_(a), o = !0) : (o = !1, g());
415
- }, Ze));
416
- },
417
- onPointerUp(e) {
418
- $e(e.pointerType) && (t = !1);
419
- },
420
- onPointerMove(a) {
421
- if (e.disabled() || !$e(a.pointerType) || !t) return;
422
- n += 1;
423
- let o = r - a.clientX, s = i - a.clientY;
424
- o ** 2 + s ** 2 > Xe ** 2 && g();
425
- },
426
- onMouseEnter(n) {
427
- n.defaultPrevented || e.disabled() || !t || a || $e(s) || _(n);
428
- },
429
- onMouseLeave() {
430
- a || g();
431
- },
432
- onMouseUp() {
433
- a || g();
434
- }
435
- };
436
- function y(e) {
437
- return e.defaultPrevented ? !0 : $e(s) ? o : e.detail !== 0;
438
- }
439
- return V(() => {
440
- g(), h();
441
- }), {
442
- pointerHandlers: v,
443
- shouldSkipClick: y
444
- };
445
- }
446
- //#endregion
447
- //#region src/number-field/increment/NumberFieldStepperButton.tsx
448
- var tt = {
449
- "-webkit-user-select": "none",
450
- "user-select": "none"
451
- };
452
- function nt(e, n) {
453
- let r = He(), i = e, a = e, s = null, c = !1, l = B(a, "as", "class", "disabled", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "onPointerDown", "onPointerMove", "onPointerUp", "onTouchEnd", "onTouchStart", "ref", "style"), d = r.state, _ = L(() => i.nativeButton ?? !0), v = L(() => {
454
- let e = d(), t = e.value !== null && (n ? e.value >= r.maxWithDefault() : e.value <= r.minWithDefault());
455
- return (i.disabled ?? !1) || e.disabled || t;
456
- }), y = L(() => v() || d().readOnly), b = L(() => ({
457
- ...d(),
458
- disabled: v()
459
- })), C = L(() => f(e.class, b())), T = L(() => {
460
- let t = p(e.style, b());
461
- return typeof t == "string" ? `-webkit-user-select:none;user-select:none;${t}` : x(tt, t === !1 ? void 0 : t) ?? tt;
462
- }), E = L(() => t(b(), $)), D = n ? o : u;
463
- function ee(e) {
464
- let t = !r.allowInputSync();
465
- if (r.setAllowInputSync(!0), !t) {
466
- let e = r.value();
467
- return r.setLastChangedValue(e), e;
468
- }
469
- let n = Q(r.inputValue(), r.locale(), r.formatOptions());
470
- if (n !== null) {
471
- let t = m(D, e);
472
- if (r.setValue(n, t), !t.isCanceled) return n;
473
- }
474
- return r.value();
475
- }
476
- function A(e) {
477
- let t = c ? s : void 0;
478
- return c = !1, r.incrementValue(r.getStepAmount(e), {
479
- direction: n ? 1 : -1,
480
- currentValue: t,
481
- event: e,
482
- reason: D
483
- });
484
- }
485
- function j(e) {
486
- let t = r.lastChangedValue() ?? r.value();
487
- r.onValueCommitted(t, h(D, e));
488
- }
489
- let M = et({
490
- disabled: y,
491
- element: r.inputElement,
492
- tick: () => A,
493
- onStop: () => j
494
- });
495
- function N(e) {
496
- if (e.defaultPrevented || y() || M.shouldSkipClick(e)) return;
497
- let t = ee(e);
498
- r.incrementValue(r.getStepAmount(e), {
499
- direction: n ? 1 : -1,
500
- currentValue: t,
501
- event: e,
502
- reason: D
503
- });
504
- let i = r.lastChangedValue() ?? r.value();
505
- i !== t && r.onValueCommitted(i, h(D, e));
506
- }
507
- function P(e) {
508
- e.defaultPrevented || d().readOnly || e.button || v() || (s = ee(e), c = !0, r.setLastChangedValue(null), $e(e.pointerType) || r.inputElement()?.focus(), M.pointerHandlers.onPointerDown(e));
509
- }
510
- let F = g(() => U(y) ? rt : void 0, () => i.onClick, () => N), I = g(() => U(y) ? rt : void 0, () => i.onPointerDown, () => P), R = g(() => U(y) ? it : void 0, () => i.onMouseDown), z = g(() => U(y) ? at : void 0, () => i.onKeyDown, () => U(_) ? void 0 : ot), te = g(() => U(y) ? it : void 0, () => i.onKeyUp, () => U(_) ? void 0 : st), V = g(() => i.onPointerUp, () => M.pointerHandlers.onPointerUp), W = g(() => i.onPointerMove, () => M.pointerHandlers.onPointerMove), G = g(() => i.onTouchStart, () => M.pointerHandlers.onTouchStart), ne = g(() => i.onTouchEnd, () => M.pointerHandlers.onTouchEnd), K = g(() => i.onMouseEnter, () => M.pointerHandlers.onMouseEnter), re = g(() => i.onMouseLeave, () => M.pointerHandlers.onMouseLeave), ie = g(() => i.onMouseUp, () => M.pointerHandlers.onMouseUp);
511
- return H(() => {}), w(S, k({
512
- get component() {
513
- return e.as ?? "button";
514
- },
515
- ref: [((e) => e), i.ref],
516
- get class() {
517
- return C();
518
- },
519
- get style() {
520
- return T();
521
- },
522
- get type() {
523
- return _() ? "button" : void 0;
524
- },
525
- get role() {
526
- return _() ? void 0 : "button";
527
- },
528
- tabIndex: -1,
529
- get disabled() {
530
- return _() && v() ? !0 : void 0;
531
- },
532
- get "aria-disabled"() {
533
- return O(() => !!y())() ? "true" : _() ? "false" : void 0;
534
- },
535
- "aria-label": n ? "Increase" : "Decrease",
536
- get "aria-controls"() {
537
- return r.id();
538
- },
539
- onClick: F,
540
- onMouseDown: R,
541
- onKeyDown: z,
542
- onKeyUp: te,
543
- onPointerDown: I,
544
- onPointerUp: V,
545
- onPointerMove: W,
546
- onTouchStart: G,
547
- onTouchEnd: ne,
548
- onMouseEnter: K,
549
- onMouseLeave: re,
550
- onMouseUp: ie
551
- }, E, l));
552
- }
553
- function rt(e) {
554
- e.preventDefault(), e.preventBaseUIHandler();
555
- }
556
- function it(e) {
557
- e.preventBaseUIHandler();
558
- }
559
- function at(e) {
560
- e.key !== "Tab" && e.preventDefault(), e.preventBaseUIHandler();
561
- }
562
- function ot(e) {
563
- if (e.target !== e.currentTarget) return;
564
- let t = ct(e.currentTarget), n = e.key === "Enter", r = e.key === " ";
565
- if (t || !n && !r) {
566
- t && r && e.preventDefault();
567
- return;
568
- }
569
- e.defaultPrevented || (e.preventDefault(), n && (e.preventBaseUIHandler(), lt(e.currentTarget, e)));
570
- }
571
- function st(e) {
572
- e.target === e.currentTarget && !e.defaultPrevented && e.key === " " && (e.preventBaseUIHandler(), lt(e.currentTarget, e));
573
- }
574
- function ct(e) {
575
- return e.tagName === "A" && !!e.href;
576
- }
577
- function lt(e, t) {
578
- let n = e.ownerDocument.defaultView;
579
- if (!n) return;
580
- let r = n.PointerEvent ?? n.MouseEvent;
581
- e.dispatchEvent(new r("click", {
582
- bubbles: !0,
583
- cancelable: !0,
584
- composed: !0,
585
- detail: 0,
586
- shiftKey: t.shiftKey,
587
- ctrlKey: t.ctrlKey,
588
- altKey: t.altKey,
589
- metaKey: t.metaKey
590
- }));
591
- }
592
- //#endregion
593
- //#region src/number-field/increment/NumberFieldIncrement.tsx
594
- function ut(e) {
595
- return nt(e, !0);
596
- }
597
- //#endregion
598
- //#region src/number-field/decrement/NumberFieldDecrement.tsx
599
- function dt(e) {
600
- return nt(e, !1);
601
- }
602
- //#endregion
603
- //#region src/number-field/input/NumberFieldInput.tsx
604
- var ft = /* @__PURE__ */ new Set([
605
- "Backspace",
606
- "Delete",
607
- "ArrowLeft",
608
- "ArrowRight",
609
- "Tab",
610
- "Enter",
611
- "Escape"
612
- ]);
613
- function pt(e) {
614
- let n = He(), r = v(!0), o = y(), u = b(), d = e, _ = e, [x, C] = R(), T = !1, E = !1, D = null, O = U(n.value), ee = B(_, "as", "aria-describedby", "aria-labelledby", "aria-roledescription", "class", "onBlur", "onFocus", "onInput", "onKeyDown", "onPaste", "ref", "style"), A = n.state, j = L(() => f(e.class, A())), M = L(() => p(e.style, A())), N = L(() => t(A(), $)), P = L(() => d["aria-labelledby"] ?? u.labelId()), F = L(() => u.getAriaDescribedBy(d["aria-describedby"])), z = {
615
- id: void 0,
616
- name: void 0,
617
- value: n.value,
618
- getControl: () => x() ?? null
619
- };
620
- function te(e) {
621
- if (e.defaultPrevented || A().disabled || (r.setFocused(!0), T)) return;
622
- T = !0;
623
- let t = e.currentTarget.value.length;
624
- e.currentTarget.setSelectionRange(t, t);
625
- }
626
- function H(e) {
627
- let t = A();
628
- if (e.defaultPrevented || t.disabled || (r.setTouched(!0), r.setFocused(!1), t.readOnly)) return;
629
- let i = !n.allowInputSync(), a = n.hasPendingCommit(), o = n.value(), c = n.inputValue();
630
- if (n.setAllowInputSync(!0), c.trim() === "") {
631
- let t = m(s, e);
632
- if (n.setValue(null, t), t.isCanceled) return;
633
- r.validationMode() === "onBlur" && r.validation.commit(null), (i || a || o !== null) && n.onValueCommitted(null, h(s, e));
634
- return;
635
- }
636
- let u = n.formatOptions(), d = Q(c, n.locale(), u);
637
- if (d === null) return;
638
- let f = Fe(u), p;
639
- p = !i && !f ? o : f ? Ie(d, u) : d;
640
- let g = o !== p, _ = i || g || a, v = p;
641
- if (g) {
642
- let t = m(l, e);
643
- if (E = !0, n.setValue(p, t), t.isCanceled) {
644
- E = !1;
645
- return;
646
- }
647
- v = n.lastChangedValue(), v === o && (E = !1);
648
- }
649
- r.validationMode() === "onBlur" && r.validation.commit(v), _ && n.onValueCommitted(v, h(l, e));
650
- let y = De(v, n.locale(), u);
651
- c !== y && n.setInputValue(y);
652
- }
653
- function W(e) {
654
- if (e.defaultPrevented) {
655
- e.currentTarget.value = n.inputValue();
656
- return;
657
- }
658
- n.setAllowInputSync(!1);
659
- let t = e.currentTarget.value;
660
- if (t.trim() === "") {
661
- n.setInputValue(t), n.setValue(null, m(s, e));
662
- return;
663
- }
664
- let r = n.getAllowedNonNumericKeys();
665
- if (!Array.from(t).every((e) => ue(e) || ye.test(e) || r.has(e) || pe.test(e))) {
666
- e.currentTarget.value = n.inputValue();
667
- return;
668
- }
669
- let i = Q(t, n.locale(), n.formatOptions());
670
- n.setInputValue(t), i !== null && n.setValue(i, m(c, e));
671
- }
672
- function G(e) {
673
- let t = A();
674
- if (e.defaultPrevented || t.readOnly || t.disabled) return;
675
- let r = n.inputValue(), i = !n.allowInputSync(), o = n.getAllowedNonNumericKeys(), s = o.has(e.key), { decimal: c, currency: l, percentSign: u } = Ce(n.locale(), n.formatOptions()), d = e.currentTarget.selectionStart, f = e.currentTarget.selectionEnd, p = d === 0 && f === r.length, g = (e) => d !== null && f !== null && e >= d && e < f, _ = [[ye, ve], [be, Z]];
676
- for (let [t, n] of _) if (t.test(e.key) && Array.from(o).some((e) => t.test(e))) {
677
- let e = r.search(n), t = e !== -1 && g(e);
678
- s = !(ye.test(r) || be.test(r)) || p || t;
679
- }
680
- for (let t of [
681
- c,
682
- l,
683
- u
684
- ]) if (t && e.key === t) {
685
- let e = r.indexOf(t);
686
- s = e === -1 || p || g(e);
687
- }
688
- let v = e.key === "ArrowUp" || e.key === "ArrowDown";
689
- if (e.which === 229 || e.altKey && !v || e.ctrlKey || e.metaKey || s || ue(e.key) || ft.has(e.key)) return;
690
- let y = null;
691
- if (e.key === "Home" && n.min() !== void 0 ? y = n.min() ?? null : e.key === "End" && n.max() !== void 0 && (y = n.max() ?? null), e.key.length > 1 && !v && y === null) return;
692
- let b = i ? Q(r, n.locale(), n.formatOptions()) : null;
693
- e.preventDefault(), e.stopPropagation();
694
- let x = !1;
695
- (v || y !== null) && n.setAllowInputSync(!0), v ? (i || n.setLastChangedValue(n.value()), x = n.incrementValue(n.getStepAmount(e), {
696
- direction: e.key === "ArrowUp" ? 1 : -1,
697
- currentValue: b,
698
- event: e,
699
- reason: a
700
- })) : y !== null && (x = n.setValue(y, m(a, e))), x && n.onValueCommitted(n.lastChangedValue(), h(a, e));
701
- }
702
- function ne(e) {
703
- let t = A();
704
- if (e.defaultPrevented || t.readOnly || t.disabled) return;
705
- let r = "";
706
- try {
707
- r = e.clipboardData?.getData("text/plain") ?? "";
708
- } catch {
709
- return;
710
- }
711
- e.preventDefault();
712
- let a = e.currentTarget.selectionStart ?? 0, o = e.currentTarget.selectionEnd ?? a, s = n.inputValue(), c = s.slice(0, a) + r + s.slice(o), l = Q(c, n.locale(), n.formatOptions());
713
- l !== null && (n.setAllowInputSync(!1), D = a + r.length, n.setValue(l, m(i, e)), n.setInputValue(c));
714
- }
715
- let K = g(() => d.onFocus, () => te), re = g(() => d.onBlur, () => H), ie = g(() => d.onInput, () => W), ae = g(() => d.onKeyDown, () => G), q = g(() => d.onPaste, () => ne);
716
- return I(() => ({
717
- element: x(),
718
- inputValue: n.inputValue()
719
- }), (e) => {
720
- if (D === null) return;
721
- let t = D;
722
- D = null, e.element?.setSelectionRange(t, t);
723
- }), I(() => ({
724
- disabled: A().disabled,
725
- element: x(),
726
- id: n.id(),
727
- name: n.nameProp()
728
- }), (e) => {
729
- z.id = e.id, z.name = e.name, r.registerFieldControl(n.controlSource, e.disabled || !e.element ? void 0 : z), u.registerControlId(n.controlSource, e.element ? e.id : void 0);
730
- }), I(() => ({
731
- name: n.name(),
732
- shouldValidateOnChange: r.shouldValidateOnChange(),
733
- value: n.value()
734
- }), (e) => {
735
- if (e.value !== O) {
736
- if (O = e.value, o.clearError(e.name), E && !e.shouldValidateOnChange) {
737
- E = !1;
738
- return;
739
- }
740
- U(() => r.validation.change(e.value));
741
- }
742
- }), V(() => {
743
- n.setInputElement(void 0), r.registerFieldControl(n.controlSource, void 0), u.registerControlId(n.controlSource, void 0);
744
- }), w(S, k({
745
- get component() {
746
- return e.as ?? "input";
747
- },
748
- ref: [((e) => {
749
- C(e), n.setInputElement(e);
750
- }), d.ref],
751
- get id() {
752
- return n.id();
753
- },
754
- get class() {
755
- return j();
756
- },
757
- get style() {
758
- return M();
759
- },
760
- get required() {
761
- return A().required;
762
- },
763
- get disabled() {
764
- return A().disabled;
765
- },
766
- get readonly() {
767
- return A().readOnly;
768
- },
769
- get inputMode() {
770
- return n.inputMode();
771
- },
772
- get value() {
773
- return n.inputValue();
774
- },
775
- type: "text",
776
- autocomplete: "off",
777
- autocorrect: "off",
778
- spellcheck: "false",
779
- get "aria-roledescription"() {
780
- return d["aria-roledescription"] ?? "Number field";
781
- },
782
- get "aria-invalid"() {
783
- return !A().disabled && A().valid === !1 ? "true" : void 0;
784
- },
785
- get "aria-labelledby"() {
786
- return P();
787
- },
788
- get "aria-describedby"() {
789
- return F();
790
- },
791
- onFocus: K,
792
- onBlur: re,
793
- onInput: ie,
794
- onKeyDown: ae,
795
- onPaste: q
796
- }, N, ee));
797
- }
798
- //#endregion
799
- //#region src/number-field/utils/getViewportRect.ts
800
- function mt(e, t) {
801
- let n = t.ownerDocument.defaultView ?? window;
802
- if (e != null) {
803
- let n = t.getBoundingClientRect();
804
- return {
805
- left: n.left - e / 2,
806
- top: n.top - e / 2,
807
- right: n.right + e / 2,
808
- bottom: n.bottom + e / 2
809
- };
810
- }
811
- let r = n.visualViewport;
812
- return r ? {
813
- left: r.offsetLeft,
814
- top: r.offsetTop,
815
- right: r.offsetLeft + r.width,
816
- bottom: r.offsetTop + r.height
817
- } : {
818
- left: 0,
819
- top: 0,
820
- right: n.document.documentElement.clientWidth,
821
- bottom: n.document.documentElement.clientHeight
822
- };
823
- }
824
- //#endregion
825
- //#region src/number-field/scrub-area/NumberFieldScrubAreaContext.ts
826
- var ht = Symbol("NumberFieldScrubAreaContext"), gt = F(ht);
827
- function _t() {
828
- let e = W(gt);
829
- if (e === ht) throw Error("Base UI: NumberFieldScrubAreaContext is missing. NumberFieldScrubArea parts must be placed within <NumberField.ScrubArea>.");
830
- return e;
831
- }
832
- //#endregion
833
- //#region src/number-field/scrub-area/NumberFieldScrubArea.tsx
834
- var vt = {
835
- "touch-action": "none",
836
- "-webkit-user-select": "none",
837
- "user-select": "none"
838
- };
839
- function yt(e) {
840
- let n = He(), i = e, a = e, [o, s] = R(), [c, l] = R(), [u, d] = R(!1), [m, _] = R(!1), [v, y] = R(!1), b = L(() => n.state().disabled), C = L(() => n.state().readOnly), T = n.state, E = B(a, "as", "class", "direction", "onPointerDown", "pixelSensitivity", "ref", "style", "teleportDistance"), D = L(() => f(e.class, T())), O = L(() => {
841
- let t = p(e.style, T());
842
- return typeof t == "string" ? `touch-action:none;-webkit-user-select:none;user-select:none;${t}` : x(vt, t === !1 ? void 0 : t);
843
- }), ee = L(() => t(T(), $)), A = {
844
- x: 0,
845
- y: 0
846
- }, j = !1, M = !1, N = null, P, F;
847
- function z() {
848
- P !== void 0 && (F?.clearTimeout(P), P = void 0, F = void 0);
849
- }
850
- function H(e, t, n) {
851
- let r = e.ownerDocument.defaultView?.visualViewport?.scale ?? 1;
852
- e.style.transform = `translate3d(${t}px,${n}px,0) scale(${1 / r})`;
853
- }
854
- function U(e) {
855
- let t = c(), n = o();
856
- if (!t || !n) return;
857
- let r = mt(i.teleportDistance, n), a = (e, t, n, r) => e + t < n ? r - t : e + t > r ? n - t : e;
858
- A.x = a(Math.round(A.x + e.movementX), t.offsetWidth / 2, r.left, r.right), A.y = a(Math.round(A.y + e.movementY), t.offsetHeight / 2, r.top, r.bottom), H(t, A.x, A.y);
859
- }
860
- function W(e, t) {
861
- let r = () => {
862
- y(e), n.setIsScrubbing(e);
863
- };
864
- if (!e) {
865
- r();
866
- return;
867
- }
868
- te(r);
869
- let i = c();
870
- i && (A.x = t.clientX - i.offsetWidth / 2, A.y = t.clientY - i.offsetHeight / 2, H(i, A.x, A.y));
871
- }
872
- function G(e, t) {
873
- try {
874
- o()?.ownerDocument.exitPointerLock();
875
- } catch {} finally {
876
- if (j = !1, W(!1, e), n.onValueCommitted(n.lastChangedValue() ?? n.value(), h(r, e)), !M && N != null) {
877
- let e = t.ownerDocument.defaultView;
878
- e && N.dispatchEvent(new e.MouseEvent("click", {
879
- bubbles: !0,
880
- cancelable: !0
881
- }));
882
- }
883
- M = !1, N = null;
884
- }
885
- }
886
- I(() => ({
887
- direction: i.direction ?? "horizontal",
888
- disabled: b(),
889
- input: n.inputElement(),
890
- pixelSensitivity: i.pixelSensitivity ?? 2,
891
- readOnly: C(),
892
- scrubbing: v()
893
- }), (e) => {
894
- if (!e.input || e.disabled || e.readOnly || !e.scrubbing) return;
895
- let t = e.input, i = t.ownerDocument.defaultView;
896
- if (!i) return;
897
- let a = i, o = 0;
898
- function s(e) {
899
- j && (Me() ? (z(), F = a, P = a.setTimeout(G, 20, e, t)) : G(e, t));
900
- }
901
- function c(t) {
902
- if (!j) return;
903
- t.preventDefault(), U(t);
904
- let { movementX: i, movementY: a } = t;
905
- if (o += e.direction === "vertical" ? a : i, Math.abs(o) >= e.pixelSensitivity) {
906
- o = 0, M = !0;
907
- let s = (e.direction === "vertical" ? -a : i) * n.getStepAmount(t);
908
- s !== 0 && (n.setAllowInputSync(!0), n.incrementValue(Math.abs(s), {
909
- direction: s >= 0 ? 1 : -1,
910
- event: t,
911
- reason: r
912
- }));
913
- }
914
- }
915
- return a.addEventListener("pointerup", s, !0), a.addEventListener("pointermove", c, !0), () => {
916
- P !== void 0 && (F?.clearTimeout(P), P = void 0, F = void 0), a.removeEventListener("pointerup", s, !0), a.removeEventListener("pointermove", c, !0);
917
- };
918
- }), I(() => ({
919
- disabled: b(),
920
- element: o(),
921
- readOnly: C()
922
- }), (e) => {
923
- if (!e.element || e.disabled || e.readOnly) return;
924
- let t = (e) => {
925
- e.touches.length === 1 && e.preventDefault();
926
- };
927
- return e.element.addEventListener("touchstart", t), () => e.element?.removeEventListener("touchstart", t);
928
- });
929
- async function ne(e) {
930
- if (e.defaultPrevented || C() || e.button !== 0 || b()) return;
931
- let t = e.pointerType === "touch";
932
- if (d(t), e.pointerType === "mouse" && (e.preventDefault(), n.inputElement()?.focus()), j = !0, M = !1, N = bt(e), W(!0, e), !t && !je()) {
933
- let t = o() ?? e.currentTarget;
934
- try {
935
- await t.ownerDocument.body.requestPointerLock(), _(!1);
936
- } catch {
937
- _(!0);
938
- } finally {
939
- j && W(!0, e);
940
- }
941
- }
942
- }
943
- let K = g(() => i.onPointerDown, () => ne);
944
- return V(() => {
945
- if (z(), l(void 0), j) {
946
- j = !1, n.setIsScrubbing(!1);
947
- try {
948
- o()?.ownerDocument.exitPointerLock();
949
- } catch {}
950
- }
951
- }), w(gt, {
952
- value: {
953
- isScrubbing: v,
954
- isTouchInput: u,
955
- isPointerLockDenied: m,
956
- scrubAreaElement: o,
957
- scrubAreaCursorElement: c,
958
- setScrubAreaCursorElement: l
959
- },
960
- get children() {
961
- return w(S, k({
962
- get component() {
963
- return e.as ?? "span";
964
- },
965
- ref: [((e) => s(e)), i.ref],
966
- role: "presentation",
967
- get class() {
968
- return D();
969
- },
970
- get style() {
971
- return O();
972
- },
973
- onPointerDown: K
974
- }, ee, E));
975
- }
976
- });
977
- }
978
- function bt(e) {
979
- return e.composedPath?.()[0] ?? e.target;
980
- }
981
- //#endregion
982
- //#region src/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.tsx
983
- var xt = {
984
- position: "fixed",
985
- top: "0",
986
- left: "0",
987
- "pointer-events": "none"
988
- };
989
- function St(e) {
990
- let n = He(), r = _t(), i = e, a = B(e, "as", "class", "ref", "style"), o = n.state, s = L(() => r.isScrubbing() && !je() && !r.isTouchInput() && !r.isPointerLockDenied()), c = () => r.scrubAreaElement()?.ownerDocument.body, l = L(() => f(e.class, o())), u = L(() => {
991
- let t = p(e.style, o());
992
- return typeof t == "string" ? `position:fixed;top:0;left:0;pointer-events:none;${t}` : x(xt, t === !1 ? void 0 : t);
993
- }), d = L(() => t(o(), $));
994
- return I(s, (e) => {
995
- e || r.setScrubAreaCursorElement(void 0);
996
- }), V(() => {
997
- r.setScrubAreaCursorElement(void 0);
998
- }), w(P, {
999
- get when() {
1000
- return O(() => !!s())() ? c() : void 0;
1001
- },
1002
- keyed: !0,
1003
- children: (t) => w(C, {
1004
- mount: t,
1005
- get children() {
1006
- return w(S, k({
1007
- get component() {
1008
- return e.as ?? "span";
1009
- },
1010
- ref: [((e) => r.setScrubAreaCursorElement(e)), i.ref],
1011
- role: "presentation",
1012
- get class() {
1013
- return l();
1014
- },
1015
- get style() {
1016
- return u();
1017
- }
1018
- }, d, a));
1019
- }
1020
- })
1021
- });
1022
- }
1023
- //#endregion
1024
- //#region src/number-field/index.parts.ts
1025
- var Ct = /* @__PURE__ */ e({
1026
- Decrement: () => dt,
1027
- Group: () => qe,
1028
- Increment: () => ut,
1029
- Input: () => pt,
1030
- Root: () => Ke,
1031
- ScrubArea: () => yt,
1032
- ScrubAreaCursor: () => St
1033
- });
1034
- //#endregion
1035
- export { Ct as t };