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
@@ -1,326 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { getStateAttributesProps as t } from "./internals/getStateAttributesProps.js";
3
- import { M as n, P as r, t as 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 { composeEventHandlers as c } from "./internals/composeEventHandlers.js";
7
- import { t as l } from "./PopupViewport-DgrIqQea.js";
8
- import { n as ee } from "./PopupStore-DjB-wO88.js";
9
- import { r as u, t as d } from "./safePolygon--bbKn0c8.js";
10
- import { i as f } from "./popupStateMapping-C9eZl19i.js";
11
- import { i as p, n as m, t as h } from "./PopupHandle-CcJG4NMy.js";
12
- import { t as te } from "./TriggerFocusGuards-CQ-JuASy.js";
13
- import { a as ne, i as re, n as ie, r as ae, t as oe } from "./buttonSemantics-paljfpOX.js";
14
- import { n as se } from "./DirectionContext-BwMabICS.js";
15
- import { C as g, _, a as v, c as y, d as b, f as x, g as S, h as C, i as ce, l as le, m as w, n as T, o as E, p as D, r as O, s as k, t as ue, u as de, v as fe, w as A, x as j, y as M } from "./MenuSubmenuTrigger-QZkQ0F2v.js";
16
- import { n as pe } from "./MenubarContext-BYt3fkt-.js";
17
- import { t as N } from "./Separator-9DboD_Si.js";
18
- import { Dynamic as P, createComponent as F, memo as me, mergeProps as I } from "@solidjs/web";
19
- import { Show as L, createEffect as R, createMemo as z, createSignal as B, createUniqueId as he, omit as V, onCleanup as ge, untrack as H } from "solid-js";
20
- //#region src/menu/trigger/MenuTrigger.tsx
21
- function U(e) {
22
- let l = g(!0), m = pe(!0), h = e;
23
- if (!l && !H(() => h.handle)) throw Error("Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.");
24
- let se = e, _ = m ? H(() => m.createTriggerId()) : `base-ui-${he()}`, v = z(() => h.id || _), y = z(() => h.nativeButton ?? !0), b = z(() => h.openOnHover ?? !!m?.hasSubmenuOpen()), x = z(() => h.delay ?? 100), S = z(() => h.closeDelay ?? 0), [C, ce] = B(null, { ownedWrite: !0 }), le = p(() => h.handle), w = z(() => le() ?? l?.store), T = z(() => {
25
- let e = w();
26
- return e instanceof A ? e : void 0;
27
- }), E = () => {
28
- let e = h.handle?.store;
29
- return e instanceof A ? e : T();
30
- }, D = z(() => !!(h.disabled || T()?.disabled() || m?.disabled())), O = z(() => {
31
- let e = w();
32
- return !!(e?.open() && e.activeTriggerId() === v());
33
- }), k = z(() => ({
34
- disabled: D(),
35
- open: O()
36
- })), ue = z(() => a(e.class, k())), fe = z(() => o(e.style, k())), j = z(() => t(k(), f)), M = V(se, "as", "class", "closeDelay", "delay", "disabled", "handle", "id", "nativeButton", "onClick", "onBlur", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseMove", "onPointerDown", "openOnHover", "payload", "ref", "style"), N = "", U, W, G = !1, K = !1, q, J = !1, Y = !1, X, Z = m ? {
37
- token: Symbol("MenubarTrigger"),
38
- order: 0,
39
- element: C,
40
- disabled: D
41
- } : void 0;
42
- if (Z) {
43
- let e = m.registerTrigger(Z);
44
- R(() => ({
45
- disabled: D(),
46
- element: C()
47
- }), () => m.notifyItemChange()), ge(e);
48
- }
49
- ee(w, v, C, () => ({
50
- payload: h.payload,
51
- closeDelay: S()
52
- })), R(() => ({
53
- store: T(),
54
- id: v(),
55
- menubar: m
56
- }), (e) => {
57
- if (!e.store) return;
58
- let t = H(() => e.store.registerMenubarTrigger(e.id, e.menubar));
59
- return H(() => e.store.forwardMenubarTrigger(e.id, e.menubar)), t;
60
- }), R(() => ({
61
- open: O(),
62
- reason: T()?.openChangeReason()
63
- }), (e) => {
64
- clearTimeout(W), G = e.open && e.reason === "trigger-hover", G && (W = setTimeout(() => {
65
- G = !1;
66
- }, 500));
67
- });
68
- function _e(e, t) {
69
- clearTimeout(U), e.allowMouseUpTrigger = !1, U = setTimeout(() => {
70
- e.allowMouseUpTrigger = !0;
71
- }, 200), X?.();
72
- let n = t.ownerDocument, r = (n) => {
73
- clearTimeout(U), e.allowMouseUpTrigger = !1;
74
- let r = n.target, a = e.track().positionerElement;
75
- if (t.contains(r) || a?.contains(r) || r?.closest(`[data-rootownerid="${e.rootNodeId()}"]`)) return;
76
- let o = t.getBoundingClientRect();
77
- n.clientX >= o.left && n.clientX <= o.right && n.clientY >= o.top && n.clientY <= o.bottom || e.closeTree(n, i);
78
- };
79
- n.addEventListener("mouseup", r, { once: !0 }), X = () => n.removeEventListener("mouseup", r);
80
- }
81
- function Q(e, t) {
82
- e.context.triggerElements.add(v(), t), e.forwardTriggerData(v(), t, {
83
- payload: h.payload,
84
- closeDelay: S()
85
- }), e.forwardMenubarTrigger(v(), m), e.activateMenubarTrigger(v());
86
- }
87
- function ve(e) {
88
- let t = E(), n = C();
89
- if (!t || !n || e.button !== 0) return;
90
- K = !0;
91
- let i = O();
92
- if (Q(t, n), m && i) {
93
- K = !1;
94
- return;
95
- }
96
- if (i || _e(t, n), t.setOpenMethod(N || "mouse"), i && G) {
97
- t.setOpen(!0, s(r, e, n));
98
- return;
99
- }
100
- t.setOpen(!i, s(r, e, n));
101
- }
102
- function ye(e) {
103
- if (J && e !== q && e.detail === 0) {
104
- J = !1;
105
- return;
106
- }
107
- if (Y) return;
108
- if (e.detail !== 0 && K) {
109
- K = !1;
110
- return;
111
- }
112
- K = !1;
113
- let t = E(), n = C();
114
- !t || !n || (Q(t, n), t.setOpenMethod("keyboard"), t.setPendingFocus("first"), t.setOpen(!O(), s(r, e, n)));
115
- }
116
- function be(e) {
117
- !y() || e.key !== "Enter" || e.target !== e.currentTarget || (e.preventDefault(), e.preventBaseUIHandler(), J = !0, Y = !0, de(e.currentTarget, e, 0, (e) => {
118
- q = e;
119
- }), Y = !1, q.baseUIHandlerPrevented || ye(q), setTimeout(() => {
120
- J = !1, q = void 0;
121
- }));
122
- }
123
- function xe(e) {
124
- let t = E();
125
- if (!t) return;
126
- let n = t.state[t.activeTriggerId() === v() ? "activeTriggerProps" : "inactiveTriggerProps"].onKeyDown;
127
- typeof n == "function" && n(e);
128
- }
129
- function Se(e) {
130
- E()?.handleTriggerKeyDown(e, e.currentTarget), e.defaultPrevented && e.key.startsWith("Arrow") && e.preventBaseUIHandler();
131
- }
132
- function Ce(e) {
133
- Z && m.setActiveTrigger(Z);
134
- let t = E(), r = C();
135
- !m || !t || !r || D() || O() || !m.hasSubmenuOpen() || (Q(t, r), t.setOpenMethod("keyboard"), t.setPendingFocus("first"), t.setOpen(!0, s(n, e, r)));
136
- }
137
- let we = c(() => H(() => D() ? ae : void 0), () => h.onClick, () => ye), Te = c(() => h.onFocus, () => Ce), Ee = c(() => h.onBlur), De = c(() => H(() => D() ? ne : void 0), () => h.onMouseDown, () => ve), Oe = c(() => h.onMouseMove, () => () => T()?.setAllowMouseEnter(!0)), ke = c(() => H(() => D() ? ae : void 0), () => h.onPointerDown, () => (e) => {
138
- N = e.pointerType || "";
139
- }), Ae = c(() => H(() => D() ? re : void 0), () => h.onKeyDown, () => xe, () => Se, () => be, () => H(() => y() ? void 0 : oe)), je = c(() => H(() => D() ? ne : void 0), () => h.onKeyUp, () => H(() => y() ? void 0 : ie));
140
- function Me(e) {
141
- let t = H(() => e.store);
142
- return u({
143
- context: t.context.floatingRoot,
144
- reference: C,
145
- floating: () => t.track().positionerElement,
146
- tree: () => t.tree(),
147
- enabled: () => !D() && b() && t.hoverEnabled(),
148
- floatingEnabled: () => !m && !D() && b() && t.hoverEnabled(),
149
- delay: () => ({ close: S() }),
150
- restMs: () => m ? 0 : x(),
151
- restOnly: () => !m,
152
- handleClose: () => d({ blockPointerEvents: !m }),
153
- mouseOnly: () => !0,
154
- shouldOpen: () => !m || m.hasSubmenuOpen() && !O()
155
- }), null;
156
- }
157
- let $ = F(P, I({
158
- get component() {
159
- return e.as ?? "button";
160
- },
161
- ref: [((e) => ce(e)), h.ref],
162
- get id() {
163
- return v();
164
- },
165
- get type() {
166
- return y() ? "button" : void 0;
167
- },
168
- get role() {
169
- return m ? "menuitem" : y() ? void 0 : "button";
170
- },
171
- get tabIndex() {
172
- return Z ? m.isTabStop(Z) ? 0 : -1 : !y() && D() ? -1 : 0;
173
- },
174
- get disabled() {
175
- return (me(() => !!y())() ? D() : y()) || void 0;
176
- },
177
- get "aria-disabled"() {
178
- return !y() && D() ? "true" : void 0;
179
- },
180
- "aria-haspopup": "menu",
181
- get "aria-expanded"() {
182
- return O() ? "true" : "false";
183
- },
184
- get "aria-controls"() {
185
- return w()?.triggerPopupId(v());
186
- },
187
- "data-base-ui-click-trigger": "",
188
- get "data-trigger-disabled"() {
189
- return D() ? "" : void 0;
190
- },
191
- get class() {
192
- return ue();
193
- },
194
- get style() {
195
- return fe();
196
- },
197
- onClick: we,
198
- onBlur: Ee,
199
- onFocus: Te,
200
- onKeyDown: Ae,
201
- onKeyUp: je,
202
- onMouseDown: De,
203
- onMouseMove: Oe,
204
- onPointerDown: ke
205
- }, j, M));
206
- return ge(() => {
207
- clearTimeout(U), clearTimeout(W), X?.();
208
- }), m ? [F(L, {
209
- keyed: !0,
210
- get when() {
211
- return T();
212
- },
213
- children: (e) => F(Me, { store: e })
214
- }), $] : [F(L, {
215
- keyed: !0,
216
- get when() {
217
- return T();
218
- },
219
- children: (e) => F(Me, { store: e })
220
- }), F(L, {
221
- keyed: !0,
222
- get when() {
223
- return T();
224
- },
225
- fallback: $,
226
- children: (e) => F(te, {
227
- get context() {
228
- return e.context.floatingRoot;
229
- },
230
- get enabled() {
231
- return e.isMountedByTrigger(v());
232
- },
233
- trigger: C,
234
- positioner: () => e.track().positionerElement,
235
- beforeContentGuard: () => e.beforeContentGuard(),
236
- afterGuardRef: (t) => e.setAfterTriggerGuard(t),
237
- children: $
238
- })
239
- })];
240
- }
241
- //#endregion
242
- //#region src/menu/viewport/MenuViewport.tsx
243
- function W(e) {
244
- let n = g(), r = S(), i = se(), s = e, c = e, [ee, u] = B({
245
- activationDirection: void 0,
246
- transitioning: !1
247
- }, { ownedWrite: !0 }), d = z(() => ({
248
- ...ee(),
249
- instant: n.store.instantType()
250
- })), f = z(() => a(e.class, d())), p = z(() => o(e.style, d())), m = z(() => t(d(), _)), h = V(c, "as", "children", "class", "ref", "style");
251
- return F(P, I({
252
- get component() {
253
- return e.as ?? "div";
254
- },
255
- ref: [s.ref],
256
- get class() {
257
- return f();
258
- },
259
- get style() {
260
- return p();
261
- }
262
- }, m, h, { get children() {
263
- return F(l, {
264
- get store() {
265
- return n.store;
266
- },
267
- get side() {
268
- return r.renderedSide();
269
- },
270
- get direction() {
271
- return i();
272
- },
273
- onStateChange: u,
274
- get children() {
275
- return e.children;
276
- }
277
- });
278
- } }));
279
- }
280
- //#endregion
281
- //#region src/menu/store/MenuHandle.ts
282
- var G = class extends h {
283
- constructor() {
284
- super("Menu", !0, new m());
285
- }
286
- open(e) {
287
- this.openByTrigger(e);
288
- }
289
- close() {
290
- this.closePopup();
291
- }
292
- get isOpen() {
293
- return this.attachedStore?.open() ?? !1;
294
- }
295
- };
296
- function K() {
297
- return new G();
298
- }
299
- //#endregion
300
- //#region src/menu/index.parts.ts
301
- var q = /* @__PURE__ */ e({
302
- Arrow: () => D,
303
- Backdrop: () => M,
304
- CheckboxItem: () => y,
305
- CheckboxItemIndicator: () => k,
306
- Group: () => x,
307
- GroupLabel: () => b,
308
- Handle: () => G,
309
- Item: () => le,
310
- LinkItem: () => E,
311
- Popup: () => w,
312
- Portal: () => fe,
313
- Positioner: () => C,
314
- RadioGroup: () => v,
315
- RadioItem: () => ce,
316
- RadioItemIndicator: () => O,
317
- Root: () => j,
318
- Separator: () => N,
319
- SubmenuRoot: () => T,
320
- SubmenuTrigger: () => ue,
321
- Trigger: () => U,
322
- Viewport: () => W,
323
- createHandle: () => K
324
- });
325
- //#endregion
326
- export { q as t };
@@ -1,185 +0,0 @@
1
- import { getStateAttributesProps as e } from "./internals/getStateAttributesProps.js";
2
- import { n as t, t as n } from "./resolveStyle-XcgAuaKR.js";
3
- import { composeEventHandlers as r } from "./internals/composeEventHandlers.js";
4
- import { r as i } from "./compositeNavigation-sxniYTc7.js";
5
- import { i as a, r as o } from "./FloatingTree-23B7KKPD.js";
6
- import { n as ee } from "./DirectionContext-BwMabICS.js";
7
- import { t as s } from "./MenubarContext-BYt3fkt-.js";
8
- import { t as c } from "./withoutComponentBinding-CcCW7fSc.js";
9
- import { Dynamic as l, createComponent as u, getNextElement as te, mergeProps as d, ref as f, runHydrationEvents as p, spread as ne, template as m } from "@solidjs/web";
10
- import { createEffect as re, createMemo as h, createSignal as g, createUniqueId as _, omit as ie, onCleanup as ae, untrack as v } from "solid-js";
11
- //#region src/menubar/Menubar.tsx
12
- var oe = /* @__PURE__ */ m("<div>"), se = { hasSubmenuOpen: (e) => e ? { "data-has-submenu-open": "" } : null };
13
- function y(m) {
14
- let y = ee(), x = m, le = m, ue = `base-ui-${_()}`, S = h(() => x.id || ue), C = h(() => x.modal ?? !0), w = h(() => x.disabled ?? !1), T = h(() => x.orientation ?? "horizontal"), [E, D] = g(null, { ownedWrite: !0 }), [O, k] = g(!1, { ownedWrite: !0 }), [A, de] = g(), [fe, pe] = g(0), j = new o(), M = _();
15
- a({
16
- tree: j,
17
- id: M
18
- });
19
- let N = /* @__PURE__ */ new Map(), me = { value: !1 }, P = 0, F = 0, I = 0, L = !1, R = !1, z = h(() => ({
20
- orientation: T(),
21
- modal: C(),
22
- hasSubmenuOpen: O()
23
- })), B = h(() => t(m.class, z())), V = h(() => n(m.style, z())), H = h(() => e(z(), se)), U = ie(le, "as", "class", "disabled", "id", "loopFocus", "modal", "onFocusIn", "onKeyDown", "orientation", "ref", "style");
24
- function W() {
25
- R || (R = !0, queueMicrotask(() => {
26
- R = !1, pe((e) => e + 1);
27
- }));
28
- }
29
- function he(e) {
30
- return e.order = P, P += 1, N.set(e.token, e), W(), () => {
31
- N.delete(e.token), W();
32
- };
33
- }
34
- function G() {
35
- return Array.from(N.values()).sort(ce);
36
- }
37
- function K() {
38
- return G().filter(b);
39
- }
40
- function ge(e) {
41
- fe();
42
- let t = G(), n = t.every((e) => !e.element()), r = n ? t.filter((e) => !e.disabled()) : K(), i = r.find((e) => e.token === A());
43
- return (n || b(e)) && (i ?? r[0])?.token === e.token;
44
- }
45
- function q(e) {
46
- b(e) && de(e.token);
47
- }
48
- function J(e) {
49
- let t = e.composedPath(), n = t[0];
50
- return G().find((e) => {
51
- let r = e.element();
52
- return r && (t.includes(r) || n instanceof Node && r.contains(n));
53
- });
54
- }
55
- function Y(e) {
56
- if (e.defaultPrevented || e.cancelBubble || e.shiftKey || e.ctrlKey || e.altKey || e.metaKey) return;
57
- let t = K();
58
- if (t.length === 0) return;
59
- let n = J(e)?.token ?? A(), r = t.findIndex((e) => e.token === n), a = i({
60
- list: t.map((e) => e.element()),
61
- currentIndex: r,
62
- key: e.key,
63
- orientation: T(),
64
- rtl: y() === "rtl",
65
- loop: x.loopFocus ?? !0
66
- });
67
- if (a === r || a < 0) return;
68
- let o = t[a];
69
- o && (e.preventDefault(), e.stopPropagation(), q(o), o.element()?.focus({ preventScroll: !0 }));
70
- }
71
- let X = r(() => x.onFocusIn, () => (e) => {
72
- let t = J(e);
73
- t && q(t);
74
- }), Z = r(() => x.onKeyDown, () => Y), Q = {
75
- modal: C,
76
- disabled: w,
77
- orientation: T,
78
- hasSubmenuOpen: O,
79
- rootElement: E,
80
- rootId: S,
81
- tree: j,
82
- nodeId: M,
83
- allowMouseUpTrigger: me,
84
- createTriggerId() {
85
- F += 1, F === 1 && typeof document < "u" && (I = (E() ?? document.getElementById(S()))?.querySelectorAll("[role=\"menuitem\"][aria-haspopup=\"menu\"]").length ?? 0, I > 0 && !L && (L = !0, queueMicrotask(() => {
86
- I = 0;
87
- })));
88
- let e = I > 0 ? (F - 1) % I + 1 : F;
89
- return `${S()}-trigger-${e}`;
90
- },
91
- isTabStop: ge,
92
- notifyItemChange: W,
93
- registerTrigger: he,
94
- setActiveTrigger: q,
95
- relayKeyboardEvent: Y
96
- };
97
- re(E, (e) => {
98
- let t = e?.ownerDocument.defaultView?.MutationObserver;
99
- if (!e || !t) return;
100
- let n = new t(W);
101
- return n.observe(e, {
102
- attributes: !0,
103
- childList: !0,
104
- subtree: !0,
105
- attributeFilter: [
106
- "class",
107
- "disabled",
108
- "hidden",
109
- "style"
110
- ]
111
- }), () => n.disconnect();
112
- });
113
- let _e = j.events.on("menuopenchange", (e) => {
114
- !e.nodeId || e.parentNodeId !== M || (e.open ? k(!0) : e.reason !== "sibling-open" && e.reason !== "list-navigation" && k(!1));
115
- });
116
- ae(_e);
117
- let $ = v(() => m.as);
118
- return $ ? u(s, {
119
- value: Q,
120
- get children() {
121
- return u(l, d({
122
- get component() {
123
- return c($);
124
- },
125
- ref: [((e) => D(e)), x.ref],
126
- get id() {
127
- return S();
128
- },
129
- role: "menubar",
130
- get "aria-orientation"() {
131
- return T();
132
- },
133
- get class() {
134
- return B();
135
- },
136
- get style() {
137
- return V();
138
- },
139
- onFocusIn: X,
140
- onKeyDown: Z
141
- }, H, U));
142
- }
143
- }) : u(s, {
144
- value: Q,
145
- get children() {
146
- var e = te(oe);
147
- return f(() => [((e) => D(e)), x.ref], e), ne(e, d({
148
- get id() {
149
- return S();
150
- },
151
- role: "menubar",
152
- get "aria-orientation"() {
153
- return T();
154
- },
155
- get class() {
156
- return B();
157
- },
158
- get style() {
159
- return V();
160
- },
161
- onFocusIn: X,
162
- onKeyDown: Z
163
- }, H, U), !1), p(), e;
164
- }
165
- });
166
- }
167
- function ce(e, t) {
168
- let n = e.element(), r = t.element();
169
- if (n && r && n !== r) {
170
- let e = n.compareDocumentPosition(r);
171
- if ((e & Node.DOCUMENT_POSITION_DISCONNECTED) === 0) {
172
- if (e & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
173
- if (e & Node.DOCUMENT_POSITION_PRECEDING) return 1;
174
- }
175
- }
176
- return e.order - t.order;
177
- }
178
- function b(e) {
179
- let t = e.element();
180
- if (!t?.isConnected || e.disabled() || t.matches(":disabled")) return !1;
181
- let n = t.ownerDocument.defaultView?.getComputedStyle(t);
182
- return !n || n.display === "none" || n.display === "contents" || n.visibility === "hidden" || n.visibility === "collapse" ? !1 : typeof t.checkVisibility != "function" || t.checkVisibility();
183
- }
184
- //#endregion
185
- export { y as t };
@@ -1,171 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { n as t, t as n } from "./resolveStyle-XcgAuaKR.js";
3
- import { mergeStyles as r } from "./internals/mergeStyles.js";
4
- import { Dynamic as i, createComponent as a, effect as o, getNextElement as s, memo as c, mergeProps as l, style as u, template as d } from "@solidjs/web";
5
- import { createContext as f, createEffect as p, createMemo as m, createSignal as h, createUniqueId as g, omit as _, useContext as v } from "solid-js";
6
- //#region src/meter/root/MeterRootContext.ts
7
- var y = Symbol("MeterRootContext"), b = f(y);
8
- function x() {
9
- let e = v(b);
10
- if (e === y) throw Error("Base UI: MeterRootContext is missing. Meter parts must be placed within <Meter.Root>.");
11
- return e;
12
- }
13
- //#endregion
14
- //#region src/meter/root/MeterRoot.tsx
15
- var S = /* @__PURE__ */ d("<span role=presentation>x"), C = {
16
- "clip-path": "inset(50%)",
17
- overflow: "hidden",
18
- "white-space": "nowrap",
19
- border: 0,
20
- padding: 0,
21
- width: "1px",
22
- height: "1px",
23
- margin: "-1px",
24
- position: "fixed",
25
- top: 0,
26
- left: 0
27
- };
28
- function w(e) {
29
- let r = e, d = e, [f, p] = h(), g = _(d, "as", "children", "class", "format", "getAriaValueText", "locale", "max", "min", "style", "value"), v = m(() => r.min ?? 0), y = m(() => r.max ?? 100), x = m(() => {
30
- let e = (r.value - v()) * 100 / (y() - v());
31
- return T(Number.isNaN(e) ? 0 : e, 0, 100);
32
- }), w = m(() => T(Number.isNaN(r.value) ? v() : r.value, v(), y())), E = m(() => r.format ? new Intl.NumberFormat(r.locale, r.format).format(w()) : new Intl.NumberFormat(r.locale, { style: "percent" }).format(x() / 100)), D = m(() => r.getAriaValueText ? r.getAriaValueText(E(), r.value) : E()), O = {}, k = m(() => t(e.class, O)), A = m(() => n(e.style, O));
33
- return a(b, {
34
- value: {
35
- formattedValue: E,
36
- percentageValue: x,
37
- setLabelId: p,
38
- value: () => r.value
39
- },
40
- get children() {
41
- return a(i, l({
42
- get component() {
43
- return e.as ?? "div";
44
- },
45
- get class() {
46
- return k();
47
- },
48
- get style() {
49
- return A();
50
- },
51
- get "aria-labelledby"() {
52
- return f();
53
- },
54
- get "aria-valuemax"() {
55
- return y();
56
- },
57
- get "aria-valuemin"() {
58
- return v();
59
- },
60
- get "aria-valuenow"() {
61
- return w();
62
- },
63
- get "aria-valuetext"() {
64
- return D();
65
- },
66
- role: "meter"
67
- }, g, { get children() {
68
- return [c(() => d.children), (() => {
69
- var e = s(S);
70
- return o(() => C, (t, n) => {
71
- u(e, t, n);
72
- }), e;
73
- })()];
74
- } }));
75
- }
76
- });
77
- }
78
- function T(e, t, n) {
79
- return Math.max(t, Math.min(e, n));
80
- }
81
- //#endregion
82
- //#region src/meter/track/MeterTrack.tsx
83
- function E(e) {
84
- let r = _(e, "as", "class", "style"), o = {}, s = m(() => t(e.class, o)), c = m(() => n(e.style, o));
85
- return a(i, l({
86
- get component() {
87
- return e.as ?? "div";
88
- },
89
- get class() {
90
- return s();
91
- },
92
- get style() {
93
- return c();
94
- }
95
- }, r));
96
- }
97
- //#endregion
98
- //#region src/meter/indicator/MeterIndicator.tsx
99
- function D(e) {
100
- let o = x(), s = _(e, "as", "class", "style"), c = {}, u = m(() => t(e.class, c)), d = m(() => ({
101
- "inset-inline-start": "0",
102
- height: "inherit",
103
- width: `${o.percentageValue()}%`
104
- })), f = m(() => {
105
- let t = n(e.style, c);
106
- return typeof t == "string" ? `inset-inline-start:0;height:inherit;width:${o.percentageValue()}%;${t}` : r(d(), t === !1 ? void 0 : t);
107
- });
108
- return a(i, l({
109
- get component() {
110
- return e.as ?? "div";
111
- },
112
- get class() {
113
- return u();
114
- },
115
- get style() {
116
- return f();
117
- }
118
- }, s));
119
- }
120
- //#endregion
121
- //#region src/meter/value/MeterValue.tsx
122
- function O(e) {
123
- let r = e, o = x(), s = _(e, "as", "children", "class", "style"), c = {}, u = m(() => t(e.class, c)), d = m(() => n(e.style, c)), f = m(() => typeof r.children == "function" ? r.children(o.formattedValue(), o.value()) : o.formattedValue());
124
- return a(i, l({
125
- get component() {
126
- return e.as ?? "span";
127
- },
128
- get class() {
129
- return u();
130
- },
131
- get style() {
132
- return d();
133
- },
134
- "aria-hidden": "true"
135
- }, s, { get children() {
136
- return f();
137
- } }));
138
- }
139
- //#endregion
140
- //#region src/meter/label/MeterLabel.tsx
141
- function k(e) {
142
- let r = x(), o = `base-ui-${g()}`, s = _(e, "as", "class", "id", "style"), c = m(() => e.id ?? o), u = {}, d = m(() => t(e.class, u)), f = m(() => n(e.style, u));
143
- return p(c, (e) => (r.setLabelId(e), () => {
144
- r.setLabelId((t) => t === e ? void 0 : t);
145
- })), a(i, l({
146
- get component() {
147
- return e.as ?? "span";
148
- },
149
- get id() {
150
- return c();
151
- },
152
- get class() {
153
- return d();
154
- },
155
- get style() {
156
- return f();
157
- },
158
- role: "presentation"
159
- }, s));
160
- }
161
- //#endregion
162
- //#region src/meter/index.parts.ts
163
- var A = /* @__PURE__ */ e({
164
- Indicator: () => D,
165
- Label: () => k,
166
- Root: () => w,
167
- Track: () => E,
168
- Value: () => O
169
- });
170
- //#endregion
171
- export { A as t };