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
package/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0-alpha.1
4
+
5
+ ### Breaking Changes
6
+
7
+ - Replace polymorphic `as` with callback-only `render`. For example, use
8
+ `<Dialog.Trigger render={(props) => <Button {...props} />}>Open</Dialog.Trigger>`.
9
+ - Put replacement-only attributes and required custom-component props inside the
10
+ callback. Forward its live props and ref to the final DOM element.
11
+ - Render selection is mount-time. Use conditional JSX inside a stable callback
12
+ for reactive root changes. JSX-valued render props are not supported.
13
+ - Preserve semantic flags such as `nativeButton={false}` for non-button roots.
14
+
15
+ ### Added
16
+
17
+ - Export Solid-native `useRender` from the package root and `solid-baseui/use-render`.
18
+ - Provide live DOM props and component state to render callbacks, with native JSX
19
+ defaults when no callback is supplied.
20
+ - Add custom-component composition, type-contract, SSR, and hydration coverage.
21
+
22
+ ### Fixed
23
+
24
+ - Avoid Button's dynamic state-attribute spread and unnecessary stable-ref
25
+ reapplication on disabled-state changes.
26
+ - Preserve Toolbar disabled/focusable semantics independently of render callback
27
+ presence, and install its owned event bridge before hydration event replay.
28
+
29
+ The package remains an unstable alpha. Further performance work is deferred;
30
+ benchmarks and profiling artifacts are not included in the published package.
package/README.md CHANGED
@@ -15,8 +15,8 @@ maintained by MUI or the Base UI team, nor by the SolidJS core team.
15
15
 
16
16
  ## Install
17
17
 
18
- Released only under the `alpha` dist-tag, so you have to ask for it explicitly —
19
- there is no `latest` release yet:
18
+ Install explicitly from the `alpha` dist-tag to get the current prerelease.
19
+ There is no stable release:
20
20
 
21
21
  ```bash
22
22
  bun add solid-baseui@alpha
@@ -25,12 +25,15 @@ bun add solid-baseui@alpha
25
25
  Peer dependencies:
26
26
 
27
27
  ```
28
- solid-js ^2.0.0-rc.0
29
- @solidjs/web ^2.0.0-rc.0
28
+ solid-js ^2.0.0-rc.6
29
+ @solidjs/web ^2.0.0-rc.6
30
30
  ```
31
31
 
32
32
  Solid 2 is itself a release candidate, which is part of why this package is
33
- alpha.
33
+ alpha. Upgrade both runtimes together and use a compatible Solid 2 compiler.
34
+ RC.6 includes the portal event-delegation fix required by this port; no local
35
+ dependency patch is needed. This workspace uses `@solidjs/vite-plugin@3.0.0-next.38`
36
+ with the RC.6 compiler.
34
37
 
35
38
  ## Usage
36
39
 
@@ -78,9 +81,93 @@ export function App() {
78
81
  Every family is available from the root entry point or its own subpath
79
82
  (`solid-baseui/dialog`, `solid-baseui/select`, and so on).
80
83
 
84
+ Polymorphic parts render their native element by default. To replace it, supply
85
+ a callback and forward its live DOM props, including `ref`, to the final element:
86
+
87
+ ```tsx
88
+ import { Button } from "solid-baseui/button";
89
+
90
+ <Button
91
+ nativeButton={false}
92
+ render={(props, state) => (
93
+ <a {...props} href="/settings" data-disabled={state.disabled ? "" : undefined} />
94
+ )}
95
+ >
96
+ Settings
97
+ </Button>;
98
+ ```
99
+
100
+ The callback receives live object state, not an accessor. Read `state.disabled`
101
+ and supplied props in JSX or reactive computations. Destructuring or eagerly
102
+ copying them during callback setup loses liveness. Always forward props and ref,
103
+ including through custom components, so events, accessibility, focus, and
104
+ registration reach the final DOM node.
105
+
106
+ ## Migrating To 0.1.0-alpha.1
107
+
108
+ Version `0.1.0-alpha.1` replaces `as` with callback-only `render`. There is no compatibility
109
+ alias, and JSX-valued `render={<a />}` is unsupported. Replace an old
110
+ `<Button as="a" href="/settings" nativeButton={false}>` with the callback above.
111
+ No `Dynamic`, `dynamic()`, or `withoutComponentBinding` adapter is needed: the
112
+ callback writes native or custom-component JSX directly.
113
+
114
+ - Outer attributes remain typed for the default native element. Put `href` and
115
+ other replacement-only attributes inside the callback, not on a native-button
116
+ outer API. Likewise, supply required custom-component props inside the callback,
117
+ for example `render={(props) => <AppLink {...props} to="/settings" />}`.
118
+ - Keep semantic flags such as `nativeButton={false}` where supported when the
119
+ final element is not a button. Selecting an element does not automatically
120
+ select the component's keyboard or disabled policy.
121
+ - Render selection happens at mount. Replacing the `render` prop later does not
122
+ switch the renderer. To change the root, use conditional JSX inside one stable
123
+ callback and forward props/ref to every possible final element, for example
124
+ `render={(props) => <>{compact() ? <span {...props} /> : <div {...props} />}</>}` on a
125
+ visual part that supports those roots.
126
+ - A spread does not compose an overridden handler, ref, or class. Preserve supplied
127
+ values explicitly when adding behavior: use Solid ref/class arrays and the
128
+ focused event helper for ordered cancellation. A custom component must do the
129
+ same when it overrides forwarded props.
130
+
131
+ ```tsx
132
+ import { Button } from "solid-baseui/button";
133
+ import { composeEventHandlers } from "solid-baseui/internals/composeEventHandlers";
134
+
135
+ <Button
136
+ render={(props) => (
137
+ <button
138
+ {...props}
139
+ class={[props.class, "action"]}
140
+ ref={[props.ref, (element) => { element.dataset.action = "save"; }]}
141
+ onClick={composeEventHandlers(
142
+ () => props.onClick,
143
+ () => () => console.info("Save activated"),
144
+ )}
145
+ />
146
+ )}
147
+ >
148
+ Save
149
+ </Button>;
150
+ ```
151
+
152
+ The event accessor reads the current supplied handler at event time; the helper
153
+ preserves its Base UI cancellation contract. Prefer putting ordinary caller
154
+ handlers on the outer component when no callback-specific composition is needed.
155
+
156
+ Component authors can import `useRender` from `solid-baseui/use-render` or the
157
+ package root. Its signature is
158
+ `useRender(props, stateAccessor, nativeFallbackCallback)`, returning a local JSX
159
+ component. For example, `const Render = useRender(props, () => state(), (domProps) =>
160
+ <div {...domProps} />)` selects the callback or native default. Pass explicit
161
+ attributes to `<Render>` and spread props with component-only keys omitted last;
162
+ the helper does not build component behavior or merge event handlers for you.
163
+ `ComponentRenderFn` and `ComponentRenderProps` are exported as types from the
164
+ root, `solid-baseui/use-render`, and `solid-baseui/types`.
165
+
166
+ See [CHANGELOG.md](./CHANGELOG.md) for this alpha's changes.
167
+
81
168
  ## Status
82
169
 
83
- Most of the port is done: 40 public subpaths are shipped, backed by the shared P0
170
+ Most of the port is done: component and utility subpaths are backed by the shared P0
84
171
  and overlay foundations. Not everything is finished:
85
172
 
86
173
  | Area | State |
@@ -103,8 +190,8 @@ This is a port, not a transliteration. Where React idioms do not carry over, the
103
190
  Solid-native equivalent wins:
104
191
 
105
192
  - Components use `class`, not `className`.
106
- - Polymorphic components use `as` with `Dynamic`. There is no React-style
107
- `render` prop.
193
+ - Polymorphic components use callback-only `render` with native JSX defaults.
194
+ React element cloning and JSX-valued render props are not supported.
108
195
  - Provider hooks return accessors, because replacing a Solid context value is not
109
196
  reactive.
110
197
  - Refs are ordinary props and compose through Solid ref arrays. There is no
@@ -0,0 +1,521 @@
1
+ import { t as e } from "./useRender-CxZ8PI-g.js";
2
+ import { getStateAttributesProps as t } from "./internals/getStateAttributesProps.js";
3
+ import { P as n, d as r, i } from "./reasons-Co5CzjKq.js";
4
+ import { n as a, t as o } from "./resolveStyle-XcgAuaKR.js";
5
+ import { createChangeEventDetails as s } from "./internals/createBaseUIEventDetails.js";
6
+ import { transitionStatusMapping as c } from "./internals/stateAttributesMapping.js";
7
+ import { composeEventHandlers as l } from "./internals/composeEventHandlers.js";
8
+ import { a as u, n as d, r as f } from "./dom-BEAeQ9Eb.js";
9
+ import { n as p, t as m } from "./InternalBackdrop-cSK13gaM.js";
10
+ import { c as h, i as ee, n as te, r as g, s as _, t as v } from "./FloatingTree-23B7KKPD.js";
11
+ import { a as y, n as b, o as x, t as S } from "./PopupStore-Du0O57fL.js";
12
+ import { a as ne, o as C } from "./popupStateMapping-C6jQ_LKo.js";
13
+ import { i as re, n as w, r as T, t as E } from "./PopupHandle-CQI6Om1Z.js";
14
+ import { t as D } from "./setRef-fXF6OIo3.js";
15
+ import { a as O, i as ie, n as ae, r as k, t as oe } from "./buttonSemantics-paljfpOX.js";
16
+ import { createComponent as A, getNextElement as j, memo as M, mergeProps as N, runHydrationEvents as P, spread as F, template as I } from "@solidjs/web";
17
+ import { $REFRESH as se, Show as L, createContext as R, createEffect as z, createMemo as B, createSignal as V, createUniqueId as H, omit as U, onCleanup as W, untrack as G, useContext as K } from "solid-js";
18
+ //#region src/dialog/store/DialogStore.ts
19
+ var ce = class extends S {
20
+ openMethodAccessor;
21
+ setOpenMethodSignal;
22
+ openMethodRevisionAccessor;
23
+ setOpenMethodRevision;
24
+ constructor(e = {}) {
25
+ super(e);
26
+ let [t, n] = V(null, { ownedWrite: !0 });
27
+ this.openMethodAccessor = t, this.setOpenMethodSignal = n;
28
+ let [r, i] = V(0, { ownedWrite: !0 });
29
+ this.openMethodRevisionAccessor = r, this.setOpenMethodRevision = i;
30
+ }
31
+ openMethod() {
32
+ return this.openMethodAccessor();
33
+ }
34
+ setOpenMethod(e) {
35
+ this.setOpenMethodSignal(e), this.setOpenMethodRevision((e) => e + 1);
36
+ }
37
+ openMethodRevision() {
38
+ return this.openMethodRevisionAccessor();
39
+ }
40
+ setPayload(e) {
41
+ this.set("payload", e);
42
+ }
43
+ setOpen(e, t) {
44
+ return !e && t.trigger == null && this.activeTriggerId() != null && (t.trigger = this.state.activeTriggerElement ?? void 0), super.setOpen(e, t);
45
+ }
46
+ }, q = class extends w {
47
+ openMethod() {
48
+ return null;
49
+ }
50
+ setOpenMethod(e) {}
51
+ setPayload(e) {}
52
+ }, J = Symbol("DialogRootContext"), le = R(J);
53
+ function Y(e = !1) {
54
+ let t = K(le);
55
+ if (t === J) {
56
+ if (e) return;
57
+ throw Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");
58
+ }
59
+ return t;
60
+ }
61
+ //#endregion
62
+ //#region src/dialog/root/DialogRoot.tsx
63
+ function ue(e) {
64
+ return X("dialog", e);
65
+ }
66
+ function X(e, t, n = {}) {
67
+ let i = Y(!0), a = h(), o = _(), c = a ?? new g(), l = H(), m = H(), b = G(() => t.open !== void 0), S = G(() => t.triggerId !== void 0), ne = i !== void 0, C = e === "alert-dialog", re = e === "drawer", w = B(() => C ? !0 : t.modal ?? !0), E = B(() => C || (t.disablePointerDismissal ?? !1)), D = new ce({
68
+ controlledOpen: () => b ? t.open : void 0,
69
+ controlledTriggerId: () => S ? t.triggerId : void 0,
70
+ floatingId: m,
71
+ nested: o !== null,
72
+ nodeId: l,
73
+ onOpenChange: () => t.onOpenChange,
74
+ onOpenChangeComplete: () => t.onOpenChangeComplete
75
+ });
76
+ D.update({
77
+ open: b ? !!G(() => t.open) : !!G(() => t.defaultOpen),
78
+ activeTriggerId: G(() => t.defaultTriggerId ?? null)
79
+ });
80
+ let O = D.access((e) => e.payload), ie = ee({
81
+ tree: c,
82
+ id: l,
83
+ parentId: o,
84
+ context: () => D.context.floatingRoot
85
+ }), [ae, k] = V(), [oe, j] = V(), [N, P] = V(null, { ownedWrite: !0 }), [F, I] = V(null, { ownedWrite: !0 }), [L, R] = V(null, { ownedWrite: !0 }), [U, K] = V(0, {
86
+ equals: !1,
87
+ ownedWrite: !0
88
+ }), q = /* @__PURE__ */ new Map(), J = B(() => {
89
+ U();
90
+ let e = 0;
91
+ for (let t of q.values()) e += t.dialogCount;
92
+ return e;
93
+ }), ue = B(() => {
94
+ U();
95
+ let e = 0;
96
+ for (let t of q.values()) e += t.drawerCount;
97
+ return e;
98
+ }), X = { current: !0 }, Z = y(D, () => D.track().popupElement, { onUnmount: () => D.setOpenMethod(null) });
99
+ function de(e, t, n) {
100
+ let r = q.get(e);
101
+ (r?.dialogCount !== t || r.drawerCount !== n) && (q.set(e, {
102
+ dialogCount: t,
103
+ drawerCount: n
104
+ }), K((e) => e + 1));
105
+ }
106
+ function fe(e) {
107
+ q.delete(e) && K((e) => e + 1);
108
+ }
109
+ let pe = {
110
+ store: D,
111
+ tree: c,
112
+ nested: ne,
113
+ role: C ? "alertdialog" : "dialog",
114
+ modal: w,
115
+ disablePointerDismissal: E,
116
+ nestedOpenDialogCount: J,
117
+ nestedOpenDrawerCount: ue,
118
+ outsidePressEnabled: X,
119
+ titleId: ae,
120
+ setTitleId: k,
121
+ descriptionId: oe,
122
+ setDescriptionId: j,
123
+ backdropElement: N,
124
+ setBackdropElement: P,
125
+ internalBackdropElement: F,
126
+ setInternalBackdropElement: I,
127
+ viewportElement: L,
128
+ setViewportElement: R,
129
+ presence: Z,
130
+ updateNestedLayer: de,
131
+ removeNestedLayer: fe
132
+ };
133
+ D.context.floatingRoot.context.data.insideElements = () => [
134
+ N(),
135
+ F(),
136
+ L()
137
+ ], D.configureTriggerUnmount({ closeOnActiveTriggerUnmount: !1 }), T(() => t.handle, D);
138
+ let Q = x({
139
+ context: D.context.floatingRoot,
140
+ tree: () => c,
141
+ escapeKey: () => J() === 0,
142
+ outsidePress: () => (e) => {
143
+ if (!X.current || E() || J() > 0 || "button" in e && e.button !== 0) return !1;
144
+ if ("touches" in e) {
145
+ if (e.type === "touchend") {
146
+ if (e.changedTouches.length !== 1 || e.touches.length !== 0) return !1;
147
+ } else if (e.touches.length !== 1) return !1;
148
+ }
149
+ if (w() === !1) return !0;
150
+ let t = f(e), n = F(), r = N();
151
+ return !n && !r || t === n || t === r || u(t) && d(t, D.state.popupElement) && !t.hasAttribute("data-base-ui-portal");
152
+ },
153
+ outsidePressEvent: () => F() || N() ? "intentional" : {
154
+ mouse: w() === "trap-focus" ? "sloppy" : "intentional",
155
+ touch: "sloppy"
156
+ }
157
+ });
158
+ D.setInteractionProps({
159
+ activeTriggerProps: { onKeyDown: Q.onKeyDown },
160
+ inactiveTriggerProps: { onKeyDown: Q.onKeyDown },
161
+ popupProps: {}
162
+ }), p(() => D.open() && w() === !0, () => D.track().popupElement), z(() => ({
163
+ open: D.open(),
164
+ activeTriggerId: D.activeTriggerId()
165
+ }), () => G(() => D.reconcileTriggers()));
166
+ let $ = G(() => D.open()), me = G(() => D.openMethodRevision());
167
+ z(() => ({
168
+ open: D.open(),
169
+ openMethodRevision: D.openMethodRevision()
170
+ }), (e) => {
171
+ !e.open && $ ? me = e.openMethodRevision : e.open && !$ && e.openMethodRevision === me && D.setOpenMethod(null), $ = e.open;
172
+ });
173
+ let he = Symbol("DialogRoot");
174
+ z(() => ({
175
+ open: D.open(),
176
+ nestedDialogs: J(),
177
+ nestedDrawers: ue()
178
+ }), (e) => {
179
+ i?.updateNestedLayer(he, e.open ? e.nestedDialogs + 1 : 0, e.open ? e.nestedDrawers + +!!re : 0);
180
+ });
181
+ let ge = {
182
+ unmount: Z.forceUnmount,
183
+ close() {
184
+ D.setOpen(!1, s(r));
185
+ }
186
+ };
187
+ z(() => t.actionsRef, (e) => {
188
+ e?.(ge);
189
+ });
190
+ function _e() {
191
+ let e = B(() => t.children), n = G(e), r = n;
192
+ return typeof n == "function" && (r = n.name === "bound read" && Object.prototype.hasOwnProperty.call(n, se) ? M(() => e()) : G(() => n({ payload: O }))), r;
193
+ }
194
+ return W(() => {
195
+ i?.removeNestedLayer(he), D.clearInteractionProps(), delete D.context.floatingRoot.context.data.insideElements;
196
+ }), A(le, {
197
+ value: pe,
198
+ get children() {
199
+ return A(te, {
200
+ value: c,
201
+ get children() {
202
+ return A(v, {
203
+ get value() {
204
+ return ie.id ?? null;
205
+ },
206
+ get children() {
207
+ return [M(() => n.extraContent?.()), A(_e, {})];
208
+ }
209
+ });
210
+ }
211
+ });
212
+ }
213
+ });
214
+ }
215
+ //#endregion
216
+ //#region src/dialog/utils/mergeDialogStyles.ts
217
+ function Z(e, t) {
218
+ if (typeof t == "string") {
219
+ let n = Object.entries(e).filter((e) => e[1] != null).map(([e, t]) => `${e}:${String(t)}`).join(";");
220
+ return n ? `${n};${t}` : t;
221
+ }
222
+ return {
223
+ ...e,
224
+ ...t || void 0
225
+ };
226
+ }
227
+ //#endregion
228
+ //#region src/dialog/utils/stateAttributesMapping.ts
229
+ var de = { "data-open": "" }, fe = { "data-closed": "" }, pe = { "data-nested-dialog-open": "" }, Q = {
230
+ open: (e) => e ? de : fe,
231
+ ...c
232
+ }, $ = {
233
+ ...Q,
234
+ nestedDialogOpen: (e) => e ? pe : null
235
+ }, me = /* @__PURE__ */ I("<button>");
236
+ function he(n) {
237
+ let r = Y(), c = n, u = n, d = B(() => c.disabled ?? !1), f = B(() => c.nativeButton ?? !0), p = B(() => ({ disabled: d() })), m = e(n, () => p(), (e) => (() => {
238
+ var t = j(me);
239
+ return F(t, e, !1), P(), t;
240
+ })()), h = B(() => a(n.class, p())), ee = B(() => o(n.style, p())), te = B(() => t(p())), g = U(u, "render", "class", "disabled", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style");
241
+ function _(e) {
242
+ r.store.open() && r.store.setOpen(!1, s(i, e));
243
+ }
244
+ let v = l(() => G(() => d() ? k : void 0), () => c.onClick, () => _), y = l(() => G(() => d() ? k : void 0), () => c.onPointerDown), b = l(() => G(() => d() ? O : void 0), () => c.onMouseDown), x = l(() => G(() => d() ? ie : void 0), () => c.onKeyDown, () => G(() => f() ? void 0 : oe)), S = l(() => G(() => d() ? O : void 0), () => c.onKeyUp, () => G(() => f() ? void 0 : ae));
245
+ return A(m, N({
246
+ ref: [c.ref],
247
+ get type() {
248
+ return f() ? "button" : void 0;
249
+ },
250
+ get role() {
251
+ return f() ? void 0 : "button";
252
+ },
253
+ get tabIndex() {
254
+ return !f() && d() ? -1 : 0;
255
+ },
256
+ get disabled() {
257
+ return (M(() => !!f())() ? d() : f()) || void 0;
258
+ },
259
+ get "aria-disabled"() {
260
+ return !f() && d() ? "true" : void 0;
261
+ },
262
+ get class() {
263
+ return h();
264
+ },
265
+ get style() {
266
+ return ee();
267
+ },
268
+ onClick: v,
269
+ onKeyDown: x,
270
+ onKeyUp: S,
271
+ onMouseDown: b,
272
+ onPointerDown: y
273
+ }, te, g));
274
+ }
275
+ //#endregion
276
+ //#region src/dialog/description/DialogDescription.tsx
277
+ var ge = /* @__PURE__ */ I("<p>");
278
+ function _e(t) {
279
+ let n = Y(), r = t, i = t, s = `base-ui-${H()}`, c = B(() => r.id || s), l = {}, u = e(t, () => l, (e) => (() => {
280
+ var t = j(ge);
281
+ return F(t, e, !1), P(), t;
282
+ })()), d = B(() => a(t.class, l)), f = B(() => o(t.style, l)), p = U(i, "render", "class", "id", "ref", "style");
283
+ return z(() => c(), (e) => (n.setDescriptionId(e), () => n.setDescriptionId((t) => t === e ? void 0 : t))), A(u, N({
284
+ ref: [r.ref],
285
+ get id() {
286
+ return c();
287
+ },
288
+ get class() {
289
+ return d();
290
+ },
291
+ get style() {
292
+ return f();
293
+ }
294
+ }, p));
295
+ }
296
+ //#endregion
297
+ //#region src/dialog/portal/DialogPortalContext.ts
298
+ var ve = Symbol("DialogPortalContext"), ye = R(ve);
299
+ function be() {
300
+ let e = K(ye);
301
+ if (e === ve) throw Error("Base UI: <Dialog.Portal> is missing.");
302
+ return e;
303
+ }
304
+ //#endregion
305
+ //#region src/dialog/portal/DialogPortal.tsx
306
+ function xe(e) {
307
+ let t = Y(), n = e, r = e, i = B(() => n.keepMounted ?? !1), s = B(() => t.presence.mounted() || i()), c = {}, l = B(() => a(e.class, c)), u = B(() => o(e.style, c)), d = U(r, "render", "class", "container", "keepMounted", "ref", "style"), f = { keepMounted: i };
308
+ function p() {
309
+ let e = null;
310
+ return W(() => {
311
+ t.internalBackdropElement() === e && t.setInternalBackdropElement(null);
312
+ }), A(m, {
313
+ ref: (n) => {
314
+ e = n, t.setInternalBackdropElement(n);
315
+ },
316
+ get open() {
317
+ return t.store.open();
318
+ }
319
+ });
320
+ }
321
+ return A(L, {
322
+ get when() {
323
+ return s();
324
+ },
325
+ get children() {
326
+ return A(ye, {
327
+ value: f,
328
+ get children() {
329
+ return A(C, N({
330
+ get render() {
331
+ return e.render;
332
+ },
333
+ get container() {
334
+ return n.container;
335
+ },
336
+ ref: (e) => {
337
+ n.ref && D(n.ref, e);
338
+ },
339
+ get class() {
340
+ return l();
341
+ },
342
+ get style() {
343
+ return u();
344
+ }
345
+ }, d, { get children() {
346
+ return [A(L, {
347
+ get when() {
348
+ return M(() => !!t.presence.mounted())() ? t.modal() === !0 : t.presence.mounted();
349
+ },
350
+ get children() {
351
+ return A(p, {});
352
+ }
353
+ }), M(() => e.children)];
354
+ } }));
355
+ }
356
+ });
357
+ }
358
+ });
359
+ }
360
+ //#endregion
361
+ //#region src/dialog/title/DialogTitle.tsx
362
+ var Se = /* @__PURE__ */ I("<h2>");
363
+ function Ce(t) {
364
+ let n = Y(), r = t, i = t, s = `base-ui-${H()}`, c = B(() => r.id || s), l = {}, u = e(t, () => l, (e) => (() => {
365
+ var t = j(Se);
366
+ return F(t, e, !1), P(), t;
367
+ })()), d = B(() => a(t.class, l)), f = B(() => o(t.style, l)), p = U(i, "render", "class", "id", "ref", "style");
368
+ return z(() => c(), (e) => (n.setTitleId(e), () => n.setTitleId((t) => t === e ? void 0 : t))), A(u, N({
369
+ ref: [r.ref],
370
+ get id() {
371
+ return c();
372
+ },
373
+ get class() {
374
+ return d();
375
+ },
376
+ get style() {
377
+ return f();
378
+ }
379
+ }, p));
380
+ }
381
+ //#endregion
382
+ //#region src/dialog/trigger/DialogTrigger.tsx
383
+ var we = /* @__PURE__ */ I("<button>");
384
+ function Te(r) {
385
+ let i = Y(!0), c = r;
386
+ if (!i && !G(() => c.handle)) throw Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");
387
+ let u = r, d = `base-ui-${H()}`, f = B(() => c.id || d), p = B(() => c.disabled ?? !1), m = B(() => c.nativeButton ?? !0), [h, ee] = V(null, { ownedWrite: !0 }), te = re(() => c.handle), g = B(() => te() ?? i?.store), _ = B(() => {
388
+ let e = g();
389
+ return !!(e?.open() && e.activeTriggerId() === f());
390
+ }), v = B(() => ({
391
+ disabled: p(),
392
+ open: _()
393
+ })), y = e(r, () => v(), (e) => (() => {
394
+ var t = j(we);
395
+ return F(t, e, !1), P(), t;
396
+ })()), x = B(() => a(r.class, v())), S = B(() => o(r.style, v())), C = B(() => t(v(), ne)), w = U(u, "render", "class", "disabled", "handle", "id", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "payload", "ref", "style"), T = "", E = "";
397
+ b(g, f, h, () => ({ payload: c.payload }));
398
+ function D(e) {
399
+ let t = g(), r = h();
400
+ !t || !r || e.button !== 0 || (t.open() || t.setOpenMethod(E || (e.detail === 0 ? "keyboard" : Ee() ? "touch" : "mouse")), t.setOpen(!(t.open() && t.activeTriggerId() === f()), s(n, e, r)));
401
+ }
402
+ function I() {
403
+ E = T, T = "";
404
+ }
405
+ function se(e) {
406
+ T = e.pointerType;
407
+ }
408
+ function L(e) {
409
+ T = "keyboard";
410
+ let t = g(), n = t?.state.popupElement, r = t ? (t.activeTriggerId() === f() ? t.state.activeTriggerProps : t.state.inactiveTriggerProps).onKeyDown : void 0, i = e.currentTarget;
411
+ n && i && n.ownerDocument !== i.ownerDocument && typeof r == "function" && r(e);
412
+ }
413
+ let R = l(() => G(() => p() ? k : void 0), () => I, () => c.onClick, () => D), z = l(() => G(() => p() ? k : void 0), () => c.onPointerDown, () => se), W = l(() => G(() => p() ? O : void 0), () => c.onMouseDown), K = l(() => G(() => p() ? ie : void 0), () => c.onKeyDown, () => L, () => G(() => m() ? void 0 : oe)), ce = l(() => G(() => p() ? O : void 0), () => c.onKeyUp, () => G(() => m() ? void 0 : ae));
414
+ return A(y, N({
415
+ ref: [((e) => ee(e)), c.ref],
416
+ get id() {
417
+ return f();
418
+ },
419
+ get type() {
420
+ return m() ? "button" : void 0;
421
+ },
422
+ get role() {
423
+ return m() ? void 0 : "button";
424
+ },
425
+ get tabIndex() {
426
+ return !m() && p() ? -1 : 0;
427
+ },
428
+ get disabled() {
429
+ return (M(() => !!m())() ? p() : m()) || void 0;
430
+ },
431
+ get "aria-disabled"() {
432
+ return !m() && p() ? "true" : void 0;
433
+ },
434
+ "aria-haspopup": "dialog",
435
+ get "aria-expanded"() {
436
+ return _() ? "true" : "false";
437
+ },
438
+ get "aria-controls"() {
439
+ return g()?.triggerPopupId(f());
440
+ },
441
+ "data-base-ui-click-trigger": "",
442
+ get class() {
443
+ return x();
444
+ },
445
+ get style() {
446
+ return S();
447
+ },
448
+ onClick: R,
449
+ onKeyDown: K,
450
+ onKeyUp: ce,
451
+ onMouseDown: W,
452
+ onPointerDown: z
453
+ }, C, w));
454
+ }
455
+ function Ee() {
456
+ if (typeof navigator > "u") return !1;
457
+ let e = navigator.platform.toLowerCase();
458
+ return /^i(os$|p)/.test(e) || e === "macintel" && navigator.maxTouchPoints > 1;
459
+ }
460
+ //#endregion
461
+ //#region src/dialog/viewport/DialogViewport.tsx
462
+ var De = /* @__PURE__ */ I("<div>");
463
+ function Oe(n) {
464
+ let r = be(), i = Y(), s = n, c = U(n, "render", "class", "ref", "style"), l = B(() => ({
465
+ open: i.store.open(),
466
+ transitionStatus: i.store.track().transitionStatus,
467
+ nested: i.nested,
468
+ nestedDialogOpen: i.nestedOpenDialogCount() > 0
469
+ })), u = e(n, () => l(), (e) => (() => {
470
+ var t = j(De);
471
+ return F(t, e, !1), P(), t;
472
+ })()), d = B(() => a(n.class, l())), f = B(() => Z({ "pointer-events": i.store.open() ? void 0 : "none" }, o(n.style, l()))), p = B(() => t(l(), $)), m = B(() => r.keepMounted() || i.presence.mounted()), h = null;
473
+ return W(() => {
474
+ i.viewportElement() === h && i.setViewportElement(null);
475
+ }), A(L, {
476
+ get when() {
477
+ return m();
478
+ },
479
+ get children() {
480
+ return A(u, N({
481
+ ref: [((e) => {
482
+ h = e, i.setViewportElement(e);
483
+ }), s.ref],
484
+ role: "presentation",
485
+ get hidden() {
486
+ return !i.presence.mounted();
487
+ },
488
+ get class() {
489
+ return d();
490
+ },
491
+ get style() {
492
+ return f();
493
+ }
494
+ }, p, c));
495
+ }
496
+ });
497
+ }
498
+ //#endregion
499
+ //#region src/dialog/store/DialogHandle.ts
500
+ var ke = class extends E {
501
+ constructor() {
502
+ super("Dialog", !1, new q());
503
+ }
504
+ open(e) {
505
+ this.openByTrigger(e);
506
+ }
507
+ openWithPayload(e) {
508
+ this.attachedStore && (this.attachedStore.setPayload(e), this.attachedStore.setOpen(!0, s(r)));
509
+ }
510
+ close() {
511
+ this.closePopup();
512
+ }
513
+ get isOpen() {
514
+ return this.attachedStore?.open() ?? !1;
515
+ }
516
+ };
517
+ function Ae() {
518
+ return new ke();
519
+ }
520
+ //#endregion
521
+ export { Ce as a, _e as c, Q as d, Z as f, Y as h, Te as i, he as l, X as m, Ae as n, xe as o, ue as p, Oe as r, be as s, ke as t, $ as u };