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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +95 -8
  3. package/dist/lib/client/DialogHandle-BGyIbcvg.js +521 -0
  4. package/dist/lib/client/DialogPopup-Df7MC358.js +138 -0
  5. package/dist/lib/client/FieldControl-C0PATyKV.js +142 -0
  6. package/dist/lib/client/{FocusManager-grSdNHqW.js → FocusManager-NP1uPXTi.js} +5 -5
  7. package/dist/lib/client/{FormContext-BB05lWOI.js → FormContext-CwLBtm_d.js} +1 -0
  8. package/dist/lib/client/{LabelableContext-DKsB0fIx.js → LabelableContext-CmQF-TX2.js} +3 -6
  9. package/dist/lib/client/MenuSubmenuTrigger-yfncqM-D.js +1584 -0
  10. package/dist/lib/client/{PopupHandle-CcJG4NMy.js → PopupHandle-CQI6Om1Z.js} +1 -1
  11. package/dist/lib/client/{PopupStore-DjB-wO88.js → PopupStore-Du0O57fL.js} +118 -98
  12. package/dist/lib/client/{PopupViewport-DgrIqQea.js → PopupViewport-IS4XU03s.js} +2 -2
  13. package/dist/lib/client/Separator-D5oJzlA3.js +27 -0
  14. package/dist/lib/client/TriggerFocusGuards-Cs8LVBj5.js +51 -0
  15. package/dist/lib/client/accordion/index.js +1 -1
  16. package/dist/lib/client/accordion-BFeZFpJZ.js +381 -0
  17. package/dist/lib/client/alert-dialog/index.js +1 -1
  18. package/dist/lib/client/{alert-dialog-BH_3ndio.js → alert-dialog-BxGUF8_Q.js} +2 -2
  19. package/dist/lib/client/autocomplete/index.js +1 -1
  20. package/dist/lib/client/{autocomplete-Cob_FZEP.js → autocomplete-C9QA98XD.js} +30 -25
  21. package/dist/lib/client/avatar/index.js +1 -1
  22. package/dist/lib/client/avatar-BQoEzzav.js +191 -0
  23. package/dist/lib/client/button/index.js +1 -1
  24. package/dist/lib/client/button-akYS6FyY.js +88 -0
  25. package/dist/lib/client/checkbox/index.js +1 -1
  26. package/dist/lib/client/checkbox-DOXtzBhA.js +425 -0
  27. package/dist/lib/client/checkbox-group/index.js +1 -1
  28. package/dist/lib/client/checkbox-group-CwMDoSTK.js +135 -0
  29. package/dist/lib/client/collapsible/index.js +1 -1
  30. package/dist/lib/client/collapsible-t8YReaIp.js +230 -0
  31. package/dist/lib/client/combobox/index.js +2 -2
  32. package/dist/lib/client/combobox-6DhOdzit.js +399 -0
  33. package/dist/lib/client/{constants-BYjBUIIi.js → constants-cOVxAoxB.js} +5 -1
  34. package/dist/lib/client/context-menu/index.js +1 -1
  35. package/dist/lib/client/context-menu-CplDpqmi.js +220 -0
  36. package/dist/lib/client/{createAnchorPositioning-DcxDXUgB.js → createAnchorPositioning-D96gu-Dz.js} +148 -145
  37. package/dist/lib/client/{createCollapsiblePanel-DeDu0O2t.js → createCollapsiblePanel-BQ8r4RTi.js} +1 -1
  38. package/dist/lib/client/createFocusInteraction--s9_qBf3.js +60 -0
  39. package/dist/lib/client/createLabelableId-DxJRwMUJ.js +14 -0
  40. package/dist/lib/client/{createPopupAutoResize-CGNiLhGq.js → createPopupAutoResize-Dn-stj-8.js} +1 -1
  41. package/dist/lib/client/{createTransitionStatus-B1L-whed.js → createTransitionStatus-BL_cPSEA.js} +12 -12
  42. package/dist/lib/client/dialog/index.js +1 -1
  43. package/dist/lib/client/{dialog-DkaQwIgP.js → dialog-B9tR9X48.js} +2 -2
  44. package/dist/lib/client/drawer/index.js +1 -1
  45. package/dist/lib/client/drawer-dyr3_sKQ.js +1539 -0
  46. package/dist/lib/client/field/index.js +1 -1
  47. package/dist/lib/client/field-CjUAjp1m.js +483 -0
  48. package/dist/lib/client/fieldset/index.js +1 -1
  49. package/dist/lib/client/fieldset-Byqk3noT.js +70 -0
  50. package/dist/lib/client/form/index.js +1 -1
  51. package/dist/lib/client/form-6Ne_bWQX.js +109 -0
  52. package/dist/lib/client/index.js +44 -42
  53. package/dist/lib/client/input/index.js +1 -1
  54. package/dist/lib/client/{input-gb0ejxkm.js → input-_QHvSSqM.js} +1 -1
  55. package/dist/lib/client/internals/form-context/index.js +1 -1
  56. package/dist/lib/client/internals/labelable-provider/index.js +1 -1
  57. package/dist/lib/client/menu/index.js +1 -1
  58. package/dist/lib/client/menu-DLqUBmMK.js +334 -0
  59. package/dist/lib/client/menubar/index.js +1 -1
  60. package/dist/lib/client/menubar-DhPRUQZ6.js +163 -0
  61. package/dist/lib/client/{mergeStyleValue-C4ITiiIV.js → mergeStyleValue-DhTA9Nwe.js} +7 -3
  62. package/dist/lib/client/meter/index.js +1 -1
  63. package/dist/lib/client/meter-BvWdppcx.js +178 -0
  64. package/dist/lib/client/navigation-menu/index.js +1 -1
  65. package/dist/lib/client/navigation-menu-mVHV41Ky.js +1070 -0
  66. package/dist/lib/client/number-field/index.js +1 -1
  67. package/dist/lib/client/number-field-DusLw_0X.js +1043 -0
  68. package/dist/lib/client/otp-field/index.js +1 -1
  69. package/dist/lib/client/otp-field-D-B9tZzF.js +584 -0
  70. package/dist/lib/client/popover/index.js +1 -1
  71. package/dist/lib/client/popover-Cv7xn0nW.js +938 -0
  72. package/dist/lib/client/popupStateMapping-C6jQ_LKo.js +371 -0
  73. package/dist/lib/client/preview-card/index.js +1 -1
  74. package/dist/lib/client/preview-card-FTN_aafM.js +632 -0
  75. package/dist/lib/client/progress/index.js +1 -1
  76. package/dist/lib/client/progress-AVKxvgpc.js +195 -0
  77. package/dist/lib/client/radio/index.js +1 -1
  78. package/dist/lib/client/radio-DA_oZhQT.js +284 -0
  79. package/dist/lib/client/radio-group/index.js +1 -1
  80. package/dist/lib/client/radio-group-CWtQxWDl.js +195 -0
  81. package/dist/lib/client/runOnceAnimationsFinish-CFADb4CN.js +49 -0
  82. package/dist/lib/client/{safePolygon--bbKn0c8.js → safePolygon-DJG0VIVo.js} +4 -0
  83. package/dist/lib/client/scroll-area/index.js +1 -1
  84. package/dist/lib/client/scroll-area-NCr49LkD.js +717 -0
  85. package/dist/lib/client/select/index.js +1 -1
  86. package/dist/lib/client/select-DSPJt7Rk.js +1933 -0
  87. package/dist/lib/client/separator/index.js +1 -1
  88. package/dist/lib/client/slider/index.js +1 -1
  89. package/dist/lib/client/slider-CWq9hxFf.js +927 -0
  90. package/dist/lib/client/switch/index.js +1 -1
  91. package/dist/lib/client/switch-CPl7QHKI.js +306 -0
  92. package/dist/lib/client/tabs/index.js +1 -1
  93. package/dist/lib/client/tabs-Bn4rZDyZ.js +692 -0
  94. package/dist/lib/client/toast/index.js +1 -1
  95. package/dist/lib/client/toast-7LdqZWOs.js +1118 -0
  96. package/dist/lib/client/toggle/index.js +1 -1
  97. package/dist/lib/client/toggle-CsC37e3e.js +142 -0
  98. package/dist/lib/client/toggle-group/index.js +1 -1
  99. package/dist/lib/client/toggle-group-DSWb9HxN.js +134 -0
  100. package/dist/lib/client/toolbar/index.js +1 -1
  101. package/dist/lib/client/toolbar-DcCi3HNp.js +504 -0
  102. package/dist/lib/client/tooltip/index.js +1 -1
  103. package/dist/lib/client/tooltip-D-PkGco9.js +849 -0
  104. package/dist/lib/client/use-render/index.js +2 -0
  105. package/dist/lib/client/useFilteredItems-B7z2CGMV.js +2270 -0
  106. package/dist/lib/client/useRender-CxZ8PI-g.js +12 -0
  107. package/dist/lib/server/{DialogHandle-ATZlm9RC.js → DialogHandle-nJSSy_jM.js} +24 -33
  108. package/dist/lib/server/{DialogPopup-BebI-w5P.js → DialogPopup-Da1aIxVA.js} +10 -13
  109. package/dist/lib/server/{FieldControl-Y_kI7ARp.js → FieldControl-BDeNR3ug.js} +56 -20
  110. package/dist/lib/server/{FocusManager-BrbZVWME.js → FocusManager-1LfoCsya.js} +1 -3
  111. package/dist/lib/server/{FormContext-pvESt85v.js → FormContext-CYwo_ZnB.js} +1 -0
  112. package/dist/lib/server/{LabelableContext-DZP3rgAY.js → LabelableContext-BTeF0IWb.js} +4 -6
  113. package/dist/lib/server/{MenuSubmenuTrigger-DA4gsv6z.js → MenuSubmenuTrigger-rR8ZN7YR.js} +133 -166
  114. package/dist/lib/server/{PopupHandle-DthPgNjy.js → PopupHandle-Ct6wywmP.js} +1 -1
  115. package/dist/lib/server/{PopupStore-DEs3FAEe.js → PopupStore-kHjFPiQ5.js} +38 -14
  116. package/dist/lib/server/{PopupViewport-3r_KTFwX.js → PopupViewport-DftN5VUp.js} +2 -2
  117. package/dist/lib/server/{Separator-vhhYxWGr.js → Separator-DTvtnxzP.js} +4 -6
  118. package/dist/lib/server/TriggerFocusGuards-CvoGfft9.js +61 -0
  119. package/dist/lib/server/accordion/index.js +32 -70
  120. package/dist/lib/server/alert-dialog/index.js +2 -2
  121. package/dist/lib/server/autocomplete/index.js +14 -5
  122. package/dist/lib/server/avatar/index.js +90 -51
  123. package/dist/lib/server/button/index.js +8 -9
  124. package/dist/lib/server/checkbox/index.js +30 -57
  125. package/dist/lib/server/checkbox-group/index.js +20 -10
  126. package/dist/lib/server/collapsible/index.js +36 -43
  127. package/dist/lib/server/combobox/index.js +64 -35
  128. package/dist/lib/server/{constants-9H__9xbS.js → constants-D7ciIzsV.js} +8 -3
  129. package/dist/lib/server/context-menu/index.js +7 -9
  130. package/dist/lib/server/{createAnchorPositioning-C-cVOPwz.js → createAnchorPositioning-B5Y0WEev.js} +11 -6
  131. package/dist/lib/server/{createCollapsiblePanel-DTyVJz0G.js → createCollapsiblePanel-B45kTe6v.js} +1 -1
  132. package/dist/lib/server/{createFocusInteraction-EIS0QOel.js → createFocusInteraction-DMyKsniI.js} +22 -2
  133. package/dist/lib/server/createLabelableId-WMUKtY6s.js +18 -0
  134. package/dist/lib/server/{createPopupAutoResize-DO50jjNX.js → createPopupAutoResize-ImBjwdj_.js} +1 -1
  135. package/dist/lib/server/{createTransitionStatus-BTlrerSS.js → createTransitionStatus-184v7j3-.js} +2 -2
  136. package/dist/lib/server/dialog/index.js +2 -2
  137. package/dist/lib/server/drawer/index.js +63 -71
  138. package/dist/lib/server/field/index.js +105 -93
  139. package/dist/lib/server/fieldset/index.js +13 -16
  140. package/dist/lib/server/form/index.js +16 -12
  141. package/dist/lib/server/index.js +5 -3
  142. package/dist/lib/server/input/index.js +1 -1
  143. package/dist/lib/server/internals/form-context/index.js +1 -1
  144. package/dist/lib/server/internals/labelable-provider/index.js +1 -1
  145. package/dist/lib/server/menu/index.js +21 -20
  146. package/dist/lib/server/menubar/index.js +6 -31
  147. package/dist/lib/server/{mergeStyleValue-Db8bRCM4.js → mergeStyleValue-BwJ10_X2.js} +6 -1
  148. package/dist/lib/server/meter/index.js +20 -32
  149. package/dist/lib/server/navigation-menu/index.js +53 -124
  150. package/dist/lib/server/number-field/index.js +44 -42
  151. package/dist/lib/server/otp-field/index.js +11 -14
  152. package/dist/lib/server/popover/index.js +42 -59
  153. package/dist/lib/server/{popupStateMapping-nKoUwoke.js → popupStateMapping-B2KsiiLb.js} +18 -16
  154. package/dist/lib/server/preview-card/index.js +30 -41
  155. package/dist/lib/server/progress/index.js +21 -33
  156. package/dist/lib/server/radio/index.js +18 -39
  157. package/dist/lib/server/radio-group/index.js +7 -8
  158. package/dist/lib/server/{runOnceAnimationsFinish-DCHzXWZU.js → runOnceAnimationsFinish-CYq38H8J.js} +2 -1
  159. package/dist/lib/server/{safePolygon-CAm5RJGv.js → safePolygon-C1GNJbKR.js} +5 -0
  160. package/dist/lib/server/scroll-area/index.js +23 -32
  161. package/dist/lib/server/select/index.js +95 -181
  162. package/dist/lib/server/separator/index.js +1 -1
  163. package/dist/lib/server/slider/index.js +25 -38
  164. package/dist/lib/server/switch/index.js +13 -23
  165. package/dist/lib/server/tabs/index.js +185 -129
  166. package/dist/lib/server/toast/index.js +49 -66
  167. package/dist/lib/server/toggle/index.js +4 -6
  168. package/dist/lib/server/toggle-group/index.js +9 -7
  169. package/dist/lib/server/toolbar/index.js +62 -79
  170. package/dist/lib/server/tooltip/index.js +28 -37
  171. package/dist/lib/server/use-render/index.js +2 -0
  172. package/dist/lib/server/{useFilteredItems-DvuctLt3.js → useFilteredItems-DCxq20Is.js} +164 -189
  173. package/dist/lib/server/useRender-CryVdCjs.js +16 -0
  174. package/dist/lib/types/accordion/header/AccordionHeader.d.ts +1 -1
  175. package/dist/lib/types/accordion/item/AccordionItem.d.ts +1 -1
  176. package/dist/lib/types/accordion/panel/AccordionPanel.d.ts +1 -1
  177. package/dist/lib/types/accordion/root/AccordionRoot.d.ts +2 -7
  178. package/dist/lib/types/accordion/trigger/AccordionTrigger.d.ts +1 -1
  179. package/dist/lib/types/alert-dialog/trigger/AlertDialogTrigger.d.ts +1 -2
  180. package/dist/lib/types/autocomplete/trigger/AutocompleteTrigger.d.ts +1 -0
  181. package/dist/lib/types/avatar/fallback/AvatarFallback.d.ts +2 -2
  182. package/dist/lib/types/avatar/image/AvatarImage.d.ts +9 -3
  183. package/dist/lib/types/avatar/image/createImageLoadingStatus.d.ts +3 -2
  184. package/dist/lib/types/avatar/root/AvatarRoot.d.ts +1 -1
  185. package/dist/lib/types/button/Button.d.ts +1 -1
  186. package/dist/lib/types/checkbox-group/CheckboxGroupContext.d.ts +4 -1
  187. package/dist/lib/types/collapsible/panel/CollapsiblePanel.d.ts +1 -1
  188. package/dist/lib/types/collapsible/root/CollapsibleRoot.d.ts +1 -1
  189. package/dist/lib/types/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
  190. package/dist/lib/types/combobox/index.d.ts +2 -0
  191. package/dist/lib/types/combobox/index.parts.d.ts +1 -0
  192. package/dist/lib/types/combobox/items/createItems.d.ts +42 -0
  193. package/dist/lib/types/combobox/root/AriaCombobox.d.ts +4 -0
  194. package/dist/lib/types/combobox/root/ComboboxRoot.d.ts +12 -8
  195. package/dist/lib/types/combobox/root/ComboboxRootContext.d.ts +2 -0
  196. package/dist/lib/types/combobox/trigger/ComboboxTrigger.d.ts +1 -0
  197. package/dist/lib/types/dialog/backdrop/DialogBackdrop.d.ts +1 -1
  198. package/dist/lib/types/dialog/description/DialogDescription.d.ts +1 -1
  199. package/dist/lib/types/dialog/title/DialogTitle.d.ts +1 -1
  200. package/dist/lib/types/dialog/viewport/DialogViewport.d.ts +1 -1
  201. package/dist/lib/types/drawer/backdrop/DrawerBackdrop.d.ts +1 -1
  202. package/dist/lib/types/drawer/content/DrawerContent.d.ts +1 -1
  203. package/dist/lib/types/drawer/indent/DrawerIndent.d.ts +1 -1
  204. package/dist/lib/types/drawer/indent-background/DrawerIndentBackground.d.ts +1 -1
  205. package/dist/lib/types/field/root/FieldRoot.d.ts +1 -1
  206. package/dist/lib/types/field/root/createFieldValidation.d.ts +3 -2
  207. package/dist/lib/types/fieldset/legend/FieldsetLegend.d.ts +1 -1
  208. package/dist/lib/types/fieldset/root/FieldsetRoot.d.ts +1 -1
  209. package/dist/lib/types/index.d.ts +1 -0
  210. package/dist/lib/types/internals/createTransitionStatus.d.ts +1 -1
  211. package/dist/lib/types/internals/form-context/FormContext.d.ts +1 -0
  212. package/dist/lib/types/internals/labelable-provider/LabelableContext.d.ts +1 -0
  213. package/dist/lib/types/internals/labelable-provider/createLabelableId.d.ts +3 -0
  214. package/dist/lib/types/internals/overlay/PopupPortal.d.ts +4 -2
  215. package/dist/lib/types/internals/overlay/createPopupPresence.d.ts +1 -0
  216. package/dist/lib/types/menu/root/MenuRootContext.d.ts +1 -0
  217. package/dist/lib/types/meter/indicator/MeterIndicator.d.ts +1 -1
  218. package/dist/lib/types/meter/label/MeterLabel.d.ts +1 -1
  219. package/dist/lib/types/meter/root/MeterRoot.d.ts +1 -1
  220. package/dist/lib/types/meter/track/MeterTrack.d.ts +1 -1
  221. package/dist/lib/types/meter/value/MeterValue.d.ts +1 -1
  222. package/dist/lib/types/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -0
  223. package/dist/lib/types/number-field/root/NumberFieldRootContext.d.ts +1 -0
  224. package/dist/lib/types/popover/arrow/PopoverArrow.d.ts +1 -1
  225. package/dist/lib/types/popover/backdrop/PopoverBackdrop.d.ts +1 -1
  226. package/dist/lib/types/popover/description/PopoverDescription.d.ts +1 -1
  227. package/dist/lib/types/popover/positioner/PopoverPositioner.d.ts +1 -1
  228. package/dist/lib/types/popover/title/PopoverTitle.d.ts +1 -1
  229. package/dist/lib/types/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
  230. package/dist/lib/types/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
  231. package/dist/lib/types/preview-card/positioner/PreviewCardPositioner.d.ts +1 -1
  232. package/dist/lib/types/progress/indicator/ProgressIndicator.d.ts +1 -1
  233. package/dist/lib/types/progress/label/ProgressLabel.d.ts +1 -1
  234. package/dist/lib/types/progress/root/ProgressRoot.d.ts +1 -1
  235. package/dist/lib/types/progress/track/ProgressTrack.d.ts +1 -1
  236. package/dist/lib/types/progress/value/ProgressValue.d.ts +1 -1
  237. package/dist/lib/types/radio/indicator/RadioIndicator.d.ts +2 -2
  238. package/dist/lib/types/scroll-area/content/ScrollAreaContent.d.ts +1 -1
  239. package/dist/lib/types/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
  240. package/dist/lib/types/scroll-area/root/ScrollAreaRoot.d.ts +1 -1
  241. package/dist/lib/types/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +2 -1
  242. package/dist/lib/types/scroll-area/thumb/ScrollAreaThumb.d.ts +1 -1
  243. package/dist/lib/types/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
  244. package/dist/lib/types/separator/Separator.d.ts +1 -1
  245. package/dist/lib/types/tabs/indicator/prehydrationScript.d.ts +1 -1
  246. package/dist/lib/types/tabs/list/TabsList.d.ts +1 -1
  247. package/dist/lib/types/tabs/panel/TabsPanel.d.ts +1 -1
  248. package/dist/lib/types/tabs/root/TabsRoot.d.ts +1 -1
  249. package/dist/lib/types/tabs/tab/TabsTab.d.ts +1 -1
  250. package/dist/lib/types/toast/createToastManager.d.ts +2 -2
  251. package/dist/lib/types/toast/store/ToastStore.d.ts +1 -1
  252. package/dist/lib/types/toast/useToastManager.d.ts +1 -1
  253. package/dist/lib/types/toggle/Toggle.d.ts +1 -1
  254. package/dist/lib/types/toggle-group/ToggleGroup.d.ts +1 -1
  255. package/dist/lib/types/toolbar/group/ToolbarGroup.d.ts +1 -1
  256. package/dist/lib/types/toolbar/link/ToolbarLink.d.ts +1 -1
  257. package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +1 -1
  258. package/dist/lib/types/toolbar/separator/ToolbarSeparator.d.ts +1 -1
  259. package/dist/lib/types/tooltip/arrow/TooltipArrow.d.ts +1 -1
  260. package/dist/lib/types/tooltip/positioner/TooltipPositioner.d.ts +1 -1
  261. package/dist/lib/types/types/index.d.ts +7 -3
  262. package/dist/lib/types/use-render/index.d.ts +2 -0
  263. package/dist/lib/types/use-render/useRender.d.ts +10 -0
  264. package/package.json +24 -11
  265. package/dist/lib/client/DialogHandle-DrN2YWCv.js +0 -518
  266. package/dist/lib/client/DialogPopup-ZlqmGfdk.js +0 -136
  267. package/dist/lib/client/FieldControl-Bc-z2og6.js +0 -116
  268. package/dist/lib/client/MenuSubmenuTrigger-QZkQ0F2v.js +0 -1570
  269. package/dist/lib/client/Separator-9DboD_Si.js +0 -25
  270. package/dist/lib/client/TriggerFocusGuards-CQ-JuASy.js +0 -56
  271. package/dist/lib/client/accordion-sOXt9AlG.js +0 -399
  272. package/dist/lib/client/avatar-AF9vyD4q.js +0 -146
  273. package/dist/lib/client/button-DpUi-2g8.js +0 -82
  274. package/dist/lib/client/checkbox-BbAwOptH.js +0 -441
  275. package/dist/lib/client/checkbox-group-CSSp_805.js +0 -128
  276. package/dist/lib/client/collapsible-BIbje_ub.js +0 -232
  277. package/dist/lib/client/combobox-8O-vgTLL.js +0 -352
  278. package/dist/lib/client/context-menu-BTMkXtrs.js +0 -217
  279. package/dist/lib/client/createFocusInteraction-D4w1-235.js +0 -50
  280. package/dist/lib/client/drawer-Ce2cChLt.js +0 -1550
  281. package/dist/lib/client/field-C-o7jzKW.js +0 -469
  282. package/dist/lib/client/fieldset-BQTAWv2L.js +0 -65
  283. package/dist/lib/client/form-BINBiW5L.js +0 -106
  284. package/dist/lib/client/menu-DeMT08oD.js +0 -326
  285. package/dist/lib/client/menubar-C4aomSYv.js +0 -185
  286. package/dist/lib/client/meter-xSU37Q0m.js +0 -171
  287. package/dist/lib/client/navigation-menu-ZILQmdn6.js +0 -1083
  288. package/dist/lib/client/number-field-B8CsTb_8.js +0 -1035
  289. package/dist/lib/client/otp-field-DBkMcnog.js +0 -582
  290. package/dist/lib/client/popover-CQwyp-fs.js +0 -929
  291. package/dist/lib/client/popupStateMapping-C9eZl19i.js +0 -367
  292. package/dist/lib/client/preview-card-D_2Q8lpC.js +0 -625
  293. package/dist/lib/client/progress-D7r0xAC9.js +0 -188
  294. package/dist/lib/client/radio-CzGQ81z1.js +0 -299
  295. package/dist/lib/client/radio-group-DpHlBKA6.js +0 -193
  296. package/dist/lib/client/runOnceAnimationsFinish-15EM-Z4l.js +0 -48
  297. package/dist/lib/client/scroll-area-CffM4U0R.js +0 -701
  298. package/dist/lib/client/select-IFhiEg73.js +0 -1940
  299. package/dist/lib/client/slider-BCagYmGp.js +0 -921
  300. package/dist/lib/client/switch-RIJeDnvS.js +0 -308
  301. package/dist/lib/client/tabs-fOAKs7r3.js +0 -696
  302. package/dist/lib/client/toast-D2P8UqUs.js +0 -1108
  303. package/dist/lib/client/toggle-group-0Aue0owJ.js +0 -129
  304. package/dist/lib/client/toggle-momVEIBL.js +0 -138
  305. package/dist/lib/client/toolbar-Du22aKCv.js +0 -492
  306. package/dist/lib/client/tooltip-CyK61fl1.js +0 -844
  307. package/dist/lib/client/useFilteredItems-DTekHz39.js +0 -2223
  308. package/dist/lib/client/withoutComponentBinding-CcCW7fSc.js +0 -13
  309. package/dist/lib/server/TriggerFocusGuards-sbGwf45f.js +0 -63
  310. package/dist/lib/server/withoutComponentBinding-BHaWr5kU.js +0 -20
  311. package/dist/lib/types/internals/withoutComponentBinding.d.ts +0 -7
@@ -0,0 +1,195 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { t } from "./useRender-CxZ8PI-g.js";
3
+ import { getStateAttributesProps as n } from "./internals/getStateAttributesProps.js";
4
+ import { n as r, t as i } from "./resolveStyle-XcgAuaKR.js";
5
+ import { mergeStyles as a } from "./internals/mergeStyles.js";
6
+ import { createComponent as o, effect as s, getNextElement as c, memo as l, mergeProps as u, runHydrationEvents as d, spread as f, style as p, template as m } from "@solidjs/web";
7
+ import { createContext as h, createEffect as g, createMemo as _, createSignal as v, createUniqueId as y, omit as b, useContext as x } from "solid-js";
8
+ //#region src/progress/root/ProgressRootContext.ts
9
+ var S = Symbol("ProgressRootContext"), C = h(S);
10
+ function w() {
11
+ let e = x(C);
12
+ if (e === S) throw Error("Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.");
13
+ return e;
14
+ }
15
+ //#endregion
16
+ //#region src/progress/root/stateAttributesMapping.ts
17
+ var T = { status(e) {
18
+ return { [`data-${e}`]: "" };
19
+ } }, E = /* @__PURE__ */ m("<div>"), D = /* @__PURE__ */ m("<span role=presentation>x"), O = {
20
+ "clip-path": "inset(50%)",
21
+ overflow: "hidden",
22
+ "white-space": "nowrap",
23
+ border: 0,
24
+ padding: 0,
25
+ width: "1px",
26
+ height: "1px",
27
+ margin: "-1px",
28
+ position: "fixed",
29
+ top: 0,
30
+ left: 0
31
+ };
32
+ function k(e) {
33
+ let a = e, m = e, [h, g] = v(), y = b(m, "render", "children", "class", "format", "getAriaValueText", "locale", "max", "min", "style", "value"), x = _(() => a.min ?? 0), S = _(() => a.max ?? 100), w = _(() => {
34
+ if (a.value == null || !Number.isFinite(a.value)) return null;
35
+ let e = (a.value - x()) * 100 / (S() - x());
36
+ return A(Number.isNaN(e) ? 0 : e, 0, 100);
37
+ }), k = _(() => a.value == null || !Number.isFinite(a.value) ? null : A(a.value, x(), S())), j = _(() => {
38
+ let e = k();
39
+ return e == null ? "indeterminate" : e === S() ? "complete" : "progressing";
40
+ }), M = _(() => {
41
+ let e = k();
42
+ return e == null ? "" : a.format ? new Intl.NumberFormat(a.locale, a.format).format(e) : new Intl.NumberFormat(a.locale, { style: "percent" }).format((w() ?? 0) / 100);
43
+ }), N = _(() => a.getAriaValueText ? a.getAriaValueText(M(), a.value) : j() === "indeterminate" ? "indeterminate progress" : M()), P = _(() => ({ status: j() })), F = _(() => r(e.class, P())), I = _(() => i(e.style, P())), L = _(() => n(P(), T)), R = {
44
+ formattedValue: M,
45
+ percentageValue: w,
46
+ setLabelId: g,
47
+ state: P,
48
+ value: () => a.value
49
+ }, z = t(e, () => P(), (e) => (() => {
50
+ var t = c(E);
51
+ return f(t, e, !1), d(), t;
52
+ })());
53
+ return o(C, {
54
+ value: R,
55
+ get children() {
56
+ return o(z, u({
57
+ get class() {
58
+ return F();
59
+ },
60
+ get style() {
61
+ return I();
62
+ },
63
+ get "aria-labelledby"() {
64
+ return h();
65
+ },
66
+ get "aria-valuemax"() {
67
+ return S();
68
+ },
69
+ get "aria-valuemin"() {
70
+ return x();
71
+ },
72
+ get "aria-valuenow"() {
73
+ return k() ?? void 0;
74
+ },
75
+ get "aria-valuetext"() {
76
+ return N();
77
+ },
78
+ role: "progressbar"
79
+ }, L, y, { get children() {
80
+ return [l(() => m.children), (() => {
81
+ var e = c(D);
82
+ return s(() => O, (t, n) => {
83
+ p(e, t, n);
84
+ }), e;
85
+ })()];
86
+ } }));
87
+ }
88
+ });
89
+ }
90
+ function A(e, t, n) {
91
+ return Math.max(t, Math.min(e, n));
92
+ }
93
+ //#endregion
94
+ //#region src/progress/track/ProgressTrack.tsx
95
+ var j = /* @__PURE__ */ m("<div>");
96
+ function M(e) {
97
+ let a = w(), s = b(e, "render", "class", "style"), l = _(() => a.state()), p = _(() => r(e.class, l())), m = _(() => i(e.style, l())), h = _(() => n(l(), T)), g = t(e, () => l(), (e) => (() => {
98
+ var t = c(j);
99
+ return f(t, e, !1), d(), t;
100
+ })());
101
+ return o(g, u({
102
+ get class() {
103
+ return p();
104
+ },
105
+ get style() {
106
+ return m();
107
+ }
108
+ }, h, s));
109
+ }
110
+ //#endregion
111
+ //#region src/progress/indicator/ProgressIndicator.tsx
112
+ var N = /* @__PURE__ */ m("<div>");
113
+ function P(e) {
114
+ let s = w(), l = b(e, "render", "class", "style"), p = _(() => s.state()), m = _(() => r(e.class, p())), h = _(() => {
115
+ let e = s.percentageValue();
116
+ return e == null ? void 0 : {
117
+ "inset-inline-start": "0",
118
+ height: "inherit",
119
+ width: `${e}%`
120
+ };
121
+ }), g = _(() => {
122
+ let t = h(), n = i(e.style, p());
123
+ return t ? typeof n == "string" ? `inset-inline-start:0;height:inherit;width:${s.percentageValue()}%;${n}` : a(t, n === !1 ? void 0 : n) : n;
124
+ }), v = _(() => n(p(), T)), y = t(e, () => p(), (e) => (() => {
125
+ var t = c(N);
126
+ return f(t, e, !1), d(), t;
127
+ })());
128
+ return o(y, u({
129
+ get class() {
130
+ return m();
131
+ },
132
+ get style() {
133
+ return g();
134
+ }
135
+ }, v, l));
136
+ }
137
+ //#endregion
138
+ //#region src/progress/value/ProgressValue.tsx
139
+ var F = /* @__PURE__ */ m("<span>");
140
+ function I(e) {
141
+ let a = e, s = w(), l = b(e, "render", "children", "class", "style"), p = _(() => s.state()), m = _(() => r(e.class, p())), h = _(() => i(e.style, p())), g = _(() => n(p(), T)), v = _(() => {
142
+ let e = p().status === "indeterminate";
143
+ return typeof a.children == "function" ? a.children(e ? "indeterminate" : s.formattedValue(), s.value()) : e ? null : s.formattedValue();
144
+ }), y = t(e, () => p(), (e) => (() => {
145
+ var t = c(F);
146
+ return f(t, e, !1), d(), t;
147
+ })());
148
+ return o(y, u({
149
+ get class() {
150
+ return m();
151
+ },
152
+ get style() {
153
+ return h();
154
+ },
155
+ "aria-hidden": "true"
156
+ }, g, l, { get children() {
157
+ return v();
158
+ } }));
159
+ }
160
+ //#endregion
161
+ //#region src/progress/label/ProgressLabel.tsx
162
+ var L = /* @__PURE__ */ m("<span>");
163
+ function R(e) {
164
+ let a = w(), s = `base-ui-${y()}`, l = b(e, "render", "class", "id", "style"), p = _(() => e.id ?? s), m = _(() => a.state()), h = _(() => r(e.class, m())), v = _(() => i(e.style, m())), x = _(() => n(m(), T));
165
+ g(p, (e) => (a.setLabelId(e), () => {
166
+ a.setLabelId((t) => t === e ? void 0 : t);
167
+ }));
168
+ let S = t(e, () => m(), (e) => (() => {
169
+ var t = c(L);
170
+ return f(t, e, !1), d(), t;
171
+ })());
172
+ return o(S, u({
173
+ get id() {
174
+ return p();
175
+ },
176
+ get class() {
177
+ return h();
178
+ },
179
+ get style() {
180
+ return v();
181
+ },
182
+ role: "presentation"
183
+ }, x, l));
184
+ }
185
+ //#endregion
186
+ //#region src/progress/index.parts.ts
187
+ var z = /* @__PURE__ */ e({
188
+ Indicator: () => P,
189
+ Label: () => R,
190
+ Root: () => k,
191
+ Track: () => M,
192
+ Value: () => I
193
+ });
194
+ //#endregion
195
+ export { z as t };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../radio-CzGQ81z1.js";
1
+ import { t as e } from "../radio-DA_oZhQT.js";
2
2
  export { e as Radio };
@@ -0,0 +1,284 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { t } from "./useRender-CxZ8PI-g.js";
3
+ import { getStateAttributesProps as n } from "./internals/getStateAttributesProps.js";
4
+ import { w as r } from "./reasons-Co5CzjKq.js";
5
+ import { n as i, t as a } from "./resolveStyle-XcgAuaKR.js";
6
+ import { createChangeEventDetails as o } from "./internals/createBaseUIEventDetails.js";
7
+ import { transitionStatusMapping as s } from "./internals/stateAttributesMapping.js";
8
+ import { composeEventHandlers as c } from "./internals/composeEventHandlers.js";
9
+ import { t as l } from "./runOnceAnimationsFinish-CFADb4CN.js";
10
+ import { t as u } from "./createTransitionStatus-BL_cPSEA.js";
11
+ import { fieldStateAttributesMapping as d } from "./internals/field-constants.js";
12
+ import { n as f } from "./FieldRootContext-izCEh80D.js";
13
+ import { r as p } from "./LabelableContext-CmQF-TX2.js";
14
+ import { n as m } from "./FieldItemContext-Bwzf-4tL.js";
15
+ import { n as h } from "./RadioGroupContext-CZexBsPa.js";
16
+ import { createComponent as g, delegateEvents as _, effect as v, getNextElement as y, memo as ee, mergeProps as b, ref as x, runHydrationEvents as S, setAttribute as C, setProperty as w, spread as T, style as te, template as E } from "@solidjs/web";
17
+ import { Show as D, createContext as O, createEffect as k, createMemo as A, createSignal as j, createUniqueId as M, omit as N, onCleanup as ne, onSettled as re, untrack as ie, useContext as P } from "solid-js";
18
+ //#region src/radio/root/RadioRootContext.ts
19
+ var F = Symbol("RadioRootContext"), I = O(F);
20
+ function L() {
21
+ let e = P(I);
22
+ if (e === F) throw Error("Base UI: RadioRootContext is missing. Radio parts must be placed within <Radio.Root>.");
23
+ return e;
24
+ }
25
+ //#endregion
26
+ //#region src/radio/root/RadioRoot.tsx
27
+ var ae = /* @__PURE__ */ E("<span>"), oe = /* @__PURE__ */ E("<input type=radio tabindex=-1 aria-hidden=true>"), R = {
28
+ "clip-path": "inset(50%)",
29
+ overflow: "hidden",
30
+ "white-space": "nowrap",
31
+ border: "0",
32
+ padding: "0",
33
+ width: "1px",
34
+ height: "1px",
35
+ margin: "-1px",
36
+ position: "fixed",
37
+ top: "0",
38
+ left: "0"
39
+ }, se = {
40
+ ...R,
41
+ position: "absolute"
42
+ }, ce = {
43
+ ...d,
44
+ checked(e) {
45
+ return e ? { "data-checked": "" } : { "data-unchecked": "" };
46
+ }
47
+ };
48
+ function z(e) {
49
+ let s = h(), l = f(!0), u = m(), d = p(), _ = e, E = e, D = Symbol("Radio"), O = Symbol("RadioLabelSource"), P = `base-ui-${M()}`, F = `base-ui-${M()}`, L = `base-ui-${M()}`, z = ie(d.controlId), V = typeof z == "string" ? z : P, [H, U] = j(), [W, ue] = j(), [de, G] = j(), fe = N(E, "aria-describedby", "aria-labelledby", "render", "class", "disabled", "id", "inputRef", "nativeButton", "onClick", "onFocus", "onKeyDown", "onKeyUp", "readOnly", "ref", "required", "style", "value"), K = A(() => _.nativeButton ?? !1), q = A(() => l.disabled() || u.disabled() || (s?.disabled() ?? !1) || (_.disabled ?? !1)), J = A(() => (s?.readOnly() ?? !1) || (_.readOnly ?? !1)), Y = A(() => (s?.required() ?? !1) || (_.required ?? !1)), X = A(() => s ? s.checkedValue() === _.value : _.value === ""), Z = A(() => _.id ?? V), pe = A(() => K() ? Z() : F), Q = A(() => ({
50
+ ...l.state(),
51
+ required: Y(),
52
+ disabled: q(),
53
+ readOnly: J(),
54
+ checked: X()
55
+ })), me = A(() => i(e.class, Q())), he = t(e, () => Q(), (e) => (() => {
56
+ var t = y(ae);
57
+ return T(t, e, !1), S(), t;
58
+ })()), ge = A(() => a(e.style, Q())), _e = A(() => n(Q(), ce)), ve = A(() => _["aria-labelledby"] ?? d.labelId() ?? de()), ye = A(() => d.getAriaDescribedBy(_["aria-describedby"])), $ = {
59
+ token: D,
60
+ checked: X,
61
+ disabled: q,
62
+ element: H,
63
+ input: W,
64
+ value: () => _.value
65
+ }, be = c(() => _.onClick), xe = c(() => _.onFocus), Se = c(() => _.onKeyDown), Ce = c(() => _.onKeyUp);
66
+ function we(e) {
67
+ if (be.call(e.currentTarget, e), e.baseUIHandlerPrevented || e.defaultPrevented || q() || J()) return;
68
+ e.preventDefault();
69
+ let t = W();
70
+ t && !X() && B(t, e);
71
+ }
72
+ function Te(e) {
73
+ xe.call(e.currentTarget, e), !e.baseUIHandlerPrevented && (s?.setActiveRadio($), !(!s || q() || J() || !s.touched()) && (W()?.click(), s.setTouched(!1)));
74
+ }
75
+ function Ee(e) {
76
+ if (Se.call(e.currentTarget, e), !e.baseUIHandlerPrevented) {
77
+ if (e.key === "Enter") {
78
+ e.preventDefault();
79
+ return;
80
+ }
81
+ !K() && e.key === " " && e.preventDefault();
82
+ }
83
+ }
84
+ function De(e) {
85
+ Ce.call(e.currentTarget, e), !(e.baseUIHandlerPrevented || K() || e.defaultPrevented || e.key !== " " || q() || J()) && B(e.currentTarget, e);
86
+ }
87
+ function Oe(e) {
88
+ let t = e.currentTarget;
89
+ if (e.stopPropagation(), X()) return;
90
+ if (!s || q() || J() || _.value === void 0) {
91
+ e.preventDefault();
92
+ let n = X();
93
+ queueMicrotask(() => {
94
+ s ? s.syncInputs() : t.checked = n;
95
+ });
96
+ return;
97
+ }
98
+ let n = o(r, e);
99
+ if (!s.selectValue(_.value, n)) {
100
+ e.preventDefault(), queueMicrotask(s.syncInputs);
101
+ return;
102
+ }
103
+ l.setTouched(!0), queueMicrotask(s.syncInputs);
104
+ }
105
+ function ke() {
106
+ H()?.focus();
107
+ }
108
+ function Ae() {
109
+ return H() ?? null;
110
+ }
111
+ return k(Z, (e) => d.registerControlId(O, e)), k(() => s, (e) => e?.registerRadio($)), k(() => ({
112
+ explicit: _["aria-labelledby"],
113
+ fieldLabel: d.labelId(),
114
+ input: W(),
115
+ inputId: Z(),
116
+ nativeButton: K()
117
+ }), (e) => {
118
+ if (e.explicit || e.fieldLabel || e.nativeButton || !e.input) {
119
+ G(void 0);
120
+ return;
121
+ }
122
+ let t = e.input.closest("label") ?? e.input.labels?.[0];
123
+ if (!t) {
124
+ G(void 0);
125
+ return;
126
+ }
127
+ t.id ||= L, G(t.id || void 0);
128
+ }), k(() => ({
129
+ input: W(),
130
+ source: s?.fieldControlSource
131
+ }), (e) => {
132
+ if (!(!e.input || !e.source)) return l.validation.registerInput(e.source, e.input, Ae);
133
+ }), k(() => ({
134
+ checked: X(),
135
+ disabled: q(),
136
+ input: W()
137
+ }), (e) => {
138
+ e.checked && l.setFilled(!0), s?.notifyRadioChange();
139
+ }), re(() => {
140
+ H();
141
+ }), ne(() => {
142
+ d.registerControlId(O, void 0);
143
+ }), g(I, {
144
+ value: Q,
145
+ get children() {
146
+ return [g(he, b({
147
+ ref: [((e) => U(e)), _.ref],
148
+ get id() {
149
+ return pe();
150
+ },
151
+ get class() {
152
+ return me();
153
+ },
154
+ get style() {
155
+ return ge();
156
+ },
157
+ get type() {
158
+ return K() ? "button" : void 0;
159
+ },
160
+ role: "radio",
161
+ get tabIndex() {
162
+ return ee(() => !!q())() ? -1 : s ? s.isTabStop($) ? 0 : -1 : 0;
163
+ },
164
+ get disabled() {
165
+ return K() && q() ? !0 : void 0;
166
+ },
167
+ get "aria-disabled"() {
168
+ return !K() && q() ? "true" : void 0;
169
+ },
170
+ get "aria-checked"() {
171
+ return X() ? "true" : "false";
172
+ },
173
+ get "aria-labelledby"() {
174
+ return ve();
175
+ },
176
+ get "aria-describedby"() {
177
+ return ye();
178
+ },
179
+ get "aria-invalid"() {
180
+ return Q().valid === !1 && !q() ? "true" : void 0;
181
+ },
182
+ get "data-composite-item-active"() {
183
+ return X() ? "" : void 0;
184
+ },
185
+ onClick: we,
186
+ onFocus: Te,
187
+ onKeyDown: Ee,
188
+ onKeyUp: De
189
+ }, _e, fe)), (() => {
190
+ var e = y(oe);
191
+ return e.addEventListener("focus", ke), e.$$click = Oe, x(() => [((e) => ue(e)), _.inputRef], e), v(() => ({
192
+ e: s?.form(),
193
+ t: K() ? void 0 : Z(),
194
+ a: s?.name(),
195
+ o: s?.name() ? se : R,
196
+ i: _.value === void 0 ? void 0 : le(_.value),
197
+ n: q(),
198
+ s: X(),
199
+ h: Y(),
200
+ r: J()
201
+ }), ({ e: t, t: n, a: r, o: i, i: a, n: o, s, h: c, r: l }, u) => {
202
+ t !== u?.e && C(e, "form", t), n !== u?.t && C(e, "id", n), r !== u?.a && C(e, "name", r), te(e, i, u?.o), w(e, "value", a), o !== u?.n && C(e, "disabled", o), w(e, "checked", s), c !== u?.h && C(e, "required", c), l !== u?.r && C(e, "readonly", l);
203
+ }), S(), e;
204
+ })()];
205
+ }
206
+ });
207
+ }
208
+ function le(e) {
209
+ if (e == null) return "";
210
+ if (typeof e == "string") return e;
211
+ try {
212
+ return JSON.stringify(e);
213
+ } catch {
214
+ return String(e);
215
+ }
216
+ }
217
+ function B(e, t) {
218
+ let n = e.ownerDocument.defaultView;
219
+ if (!n) return;
220
+ let r = n.PointerEvent ?? n.MouseEvent;
221
+ e.dispatchEvent(new r("click", {
222
+ bubbles: !0,
223
+ cancelable: !0,
224
+ composed: !0,
225
+ detail: 0,
226
+ shiftKey: t.shiftKey,
227
+ ctrlKey: t.ctrlKey,
228
+ altKey: t.altKey,
229
+ metaKey: t.metaKey
230
+ }));
231
+ }
232
+ _(["click"]);
233
+ //#endregion
234
+ //#region src/radio/indicator/RadioIndicator.tsx
235
+ var V = /* @__PURE__ */ E("<span>"), H = {
236
+ ...d,
237
+ ...s,
238
+ checked(e) {
239
+ return e ? { "data-checked": "" } : { "data-unchecked": "" };
240
+ }
241
+ };
242
+ function U(e) {
243
+ let r, o = !1, s = L(), c = e, d = N(e, "render", "class", "keepMounted", "ref", "style"), f = A(() => s().checked), p = u(() => f()), m = A(() => (c.keepMounted ?? !1) || p.mounted()), h = A(() => ({
244
+ ...s(),
245
+ transitionStatus: p.transitionStatus()
246
+ })), _ = t(e, () => h(), (e) => (() => {
247
+ var t = y(V);
248
+ return T(t, e, !1), S(), t;
249
+ })()), v = A(() => m() ? i(e.class, h()) : void 0), ee = A(() => m() ? a(e.style, h()) : void 0), x = A(() => n(h(), H));
250
+ return k(() => ({
251
+ checked: f(),
252
+ element: r,
253
+ status: p.transitionStatus()
254
+ }), (e) => {
255
+ if (o = e.checked, e.checked || e.status !== "ending" || !e.element) return;
256
+ let t = new AbortController();
257
+ return l(e.element, () => {
258
+ o || p.setMounted(!1);
259
+ }, t.signal), () => t.abort();
260
+ }), g(D, {
261
+ get when() {
262
+ return m();
263
+ },
264
+ get children() {
265
+ return g(_, b({
266
+ ref: [c.ref, ((e) => r = e)],
267
+ get class() {
268
+ return v();
269
+ },
270
+ get style() {
271
+ return ee();
272
+ }
273
+ }, x, d));
274
+ }
275
+ });
276
+ }
277
+ //#endregion
278
+ //#region src/radio/index.parts.ts
279
+ var W = /* @__PURE__ */ e({
280
+ Indicator: () => U,
281
+ Root: () => z
282
+ });
283
+ //#endregion
284
+ export { W as t };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../radio-group-DpHlBKA6.js";
1
+ import { t as e } from "../radio-group-CWtQxWDl.js";
2
2
  export { e as RadioGroup };
@@ -0,0 +1,195 @@
1
+ import { t as e } from "./useRender-CxZ8PI-g.js";
2
+ import { getStateAttributesProps as t } from "./internals/getStateAttributesProps.js";
3
+ import { n, t as r } from "./resolveStyle-XcgAuaKR.js";
4
+ import { composeEventHandlers as i } from "./internals/composeEventHandlers.js";
5
+ import { n as a } from "./DirectionContext-BwMabICS.js";
6
+ import { fieldStateAttributesMapping as o } from "./internals/field-constants.js";
7
+ import { n as ee } from "./FieldRootContext-izCEh80D.js";
8
+ import { n as te } from "./FormContext-CwLBtm_d.js";
9
+ import { r as ne } from "./LabelableContext-CmQF-TX2.js";
10
+ import { n as s } from "./FieldsetRootContext-BgThSAcd.js";
11
+ import { t as c } from "./RadioGroupContext-CZexBsPa.js";
12
+ import { createComponent as l, getNextElement as re, mergeProps as ie, runHydrationEvents as ae, spread as oe, template as u } from "@solidjs/web";
13
+ import { createEffect as d, createMemo as f, createSignal as p, createUniqueId as m, omit as h, onCleanup as g, onSettled as _, untrack as v } from "solid-js";
14
+ //#region src/radio-group/RadioGroup.tsx
15
+ var y = /* @__PURE__ */ u("<div>");
16
+ function b(u) {
17
+ let b = ee(!0), le = s(!0), C = te(), w = ne(), ue = a(), T = u, de = u, E = Symbol("RadioGroup"), D = `base-ui-${m()}`, O = v(() => T.value !== void 0), [k, A] = p(() => v(() => T.defaultValue)), [j, M] = p(), [N, P] = p(!1), [F, I] = p(), [L, R] = p(0), z = /* @__PURE__ */ new Map(), B, V = v(() => O ? T.value : k()), H, U, fe = h(de, "aria-describedby", "aria-labelledby", "render", "class", "defaultValue", "disabled", "form", "inputRef", "name", "onBlur", "onFocus", "onKeyDown", "onValueChange", "readOnly", "ref", "required", "style", "value"), W = f(() => O ? T.value : k()), G = f(() => b.disabled() || (T.disabled ?? !1)), K = f(() => T.readOnly ?? !1), q = f(() => T.required ?? !1), J = f(() => b.name() ?? T.name), pe = f(() => W() ?? null), Y = f(() => ({
18
+ ...b.state(),
19
+ disabled: G(),
20
+ readOnly: K(),
21
+ required: q()
22
+ })), me = f(() => n(u.class, Y())), he = e(u, () => Y(), (e) => (() => {
23
+ var t = re(y);
24
+ return oe(t, e, !1), ae(), t;
25
+ })()), ge = f(() => r(u.style, Y())), _e = f(() => t(Y(), o)), ve = f(() => T["aria-labelledby"] ?? w.labelId() ?? le?.legendId()), ye = f(() => w.getAriaDescribedBy(T["aria-describedby"])), be = f(() => {
26
+ L();
27
+ let e = Array.from(z.values()), t = e.find((e) => e.checked() && !e.disabled());
28
+ return t ? t.token : e.find((e) => e.token === F() && !e.disabled())?.token ?? e.find((e) => !e.disabled())?.token;
29
+ });
30
+ function xe(e) {
31
+ return z.set(e.token, e), (v(e.checked) || !B && !v(e.disabled)) && (B = e.token, I(e.token)), X(), () => {
32
+ if (z.delete(e.token), B === e.token) {
33
+ let e = Array.from(z.values()).find((e) => v(e.checked) && !v(e.disabled)) ?? Array.from(z.values()).find((e) => !v(e.disabled));
34
+ B = e?.token, I(e?.token);
35
+ }
36
+ X();
37
+ };
38
+ }
39
+ function X() {
40
+ R((e) => e + 1);
41
+ }
42
+ function Z(e) {
43
+ e.disabled() || (B = e.token, I(e.token));
44
+ }
45
+ function Q(e) {
46
+ return !e.disabled() && be() === e.token;
47
+ }
48
+ function Se(e, t) {
49
+ return T.onValueChange?.(e, t), !t.isCanceled && (O || A(() => e), !0);
50
+ }
51
+ function Ce() {
52
+ for (let e of z.values()) {
53
+ let t = v(e.input);
54
+ t && (t.checked = v(e.checked));
55
+ }
56
+ }
57
+ function we() {
58
+ let e = C.formElement();
59
+ if (!e) return W() ?? null;
60
+ L();
61
+ for (let t of z.values()) {
62
+ let n = t.input();
63
+ if (n?.checked && ce(n, e)) return W() ?? null;
64
+ }
65
+ return null;
66
+ }
67
+ let $ = {
68
+ id: D,
69
+ name: T.name,
70
+ value: pe,
71
+ getValue: we,
72
+ getControl: () => b.validation.getInputControl() ?? j() ?? null
73
+ }, Te = i(() => T.onFocus), Ee = i(() => T.onBlur), De = i(() => T.onKeyDown);
74
+ function Oe(e) {
75
+ Te.call(e.currentTarget, e), !e.baseUIHandlerPrevented && b.setFocused(!0);
76
+ }
77
+ function ke(e) {
78
+ if (Ee.call(e.currentTarget, e), e.baseUIHandlerPrevented) return;
79
+ let t = e.relatedTarget;
80
+ t instanceof Element && se(e.currentTarget, t) || (b.setTouched(!0), b.setFocused(!1), b.validationMode() === "onBlur" && b.validation.commit(W()));
81
+ }
82
+ function Ae(e) {
83
+ if (De.call(e.currentTarget, e), e.baseUIHandlerPrevented) return;
84
+ let t = x(e, ue());
85
+ if (t === 0 || e.ctrlKey || e.altKey || e.metaKey) return;
86
+ L();
87
+ let n = Array.from(z.values()).filter((e) => !e.disabled());
88
+ if (n.length < 2) return;
89
+ let r = e.composedPath()[0], i = n.findIndex((e) => r instanceof Node && e.element()?.contains(r));
90
+ if (i === -1) return;
91
+ let a = n[(i + t + n.length) % n.length];
92
+ !a || a === n[i] || (e.preventDefault(), e.stopPropagation(), P(!0), Z(a), queueMicrotask(() => a.element()?.focus()));
93
+ }
94
+ let je = {
95
+ checkedValue: W,
96
+ disabled: G,
97
+ fieldControlSource: E,
98
+ form: () => T.form,
99
+ name: J,
100
+ readOnly: K,
101
+ required: q,
102
+ state: Y,
103
+ touched: N,
104
+ isTabStop: Q,
105
+ notifyRadioChange: X,
106
+ registerRadio: xe,
107
+ selectValue: Se,
108
+ setActiveRadio: Z,
109
+ setTouched: P,
110
+ syncInputs: Ce
111
+ };
112
+ return d(() => ({
113
+ disabled: G(),
114
+ element: j(),
115
+ id: T.id ?? D,
116
+ name: T.name
117
+ }), (e) => {
118
+ $.id = e.id, $.name = e.name, b.registerFieldControl(E, e.disabled || !e.element ? void 0 : $);
119
+ }), d(() => ({
120
+ initialValue: b.validityData().initialValue,
121
+ name: J(),
122
+ value: W()
123
+ }), (e) => {
124
+ e.value !== V && (V = e.value, v(() => {
125
+ C.clearError(e.name), b.setDirty(e.value !== e.initialValue), b.setFilled(e.value != null), b.validation.change(e.value), X();
126
+ }));
127
+ }), d(() => {
128
+ L();
129
+ let e = Array.from(z.values()), t = e.find((e) => e.checked() && !e.disabled() && e.input())?.input();
130
+ return {
131
+ inputRef: T.inputRef,
132
+ representative: t ?? e.find((e) => !e.disabled() && e.input())?.input()
133
+ };
134
+ }, (e) => {
135
+ (e.representative !== H || e.inputRef !== U) && (H = e.representative, U = e.inputRef, e.representative && S(e.inputRef, e.representative));
136
+ }), _(() => {
137
+ b.setFilled(W() != null);
138
+ }), g(() => b.registerFieldControl(E, void 0)), l(c, {
139
+ value: je,
140
+ get children() {
141
+ return l(he, ie({
142
+ ref: [((e) => M(e)), T.ref],
143
+ get class() {
144
+ return me();
145
+ },
146
+ get style() {
147
+ return ge();
148
+ },
149
+ role: "radiogroup",
150
+ get "aria-required"() {
151
+ return q() ? "true" : void 0;
152
+ },
153
+ get "aria-disabled"() {
154
+ return G() ? "true" : void 0;
155
+ },
156
+ get "aria-readonly"() {
157
+ return K() ? "true" : void 0;
158
+ },
159
+ get "aria-labelledby"() {
160
+ return ve();
161
+ },
162
+ get "aria-describedby"() {
163
+ return ye();
164
+ },
165
+ get "aria-invalid"() {
166
+ return Y().valid === !1 && !G() ? "true" : void 0;
167
+ },
168
+ onFocus: Oe,
169
+ onBlur: ke,
170
+ onKeyDown: Ae
171
+ }, _e, fe));
172
+ }
173
+ });
174
+ }
175
+ function x(e, t) {
176
+ return e.key === "ArrowDown" ? 1 : e.key === "ArrowUp" ? -1 : e.key === "ArrowRight" ? t === "rtl" ? -1 : 1 : e.key === "ArrowLeft" ? t === "rtl" ? 1 : -1 : 0;
177
+ }
178
+ function se(e, t) {
179
+ if (e.contains(t)) return !0;
180
+ let n = t;
181
+ for (; n;) {
182
+ if (n === e) return !0;
183
+ n = n.parentNode ?? (n instanceof ShadowRoot ? n.host : null);
184
+ }
185
+ return !1;
186
+ }
187
+ function ce(e, t) {
188
+ return e.matches(":disabled") ? !1 : e.form === t || e.form === null && !e.hasAttribute("form");
189
+ }
190
+ function S(e, t) {
191
+ if (Array.isArray(e)) for (let n of e) S(n, t);
192
+ else typeof e == "function" && e(t);
193
+ }
194
+ //#endregion
195
+ export { b as t };