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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +133 -15
  3. package/dist/lib/client/DialogHandle-DluOK_7u.js +521 -0
  4. package/dist/lib/client/DialogPopup-CfEb3F54.js +138 -0
  5. package/dist/lib/client/FieldControl-eDe-Jnp9.js +142 -0
  6. package/dist/lib/client/{FieldRootContext-izCEh80D.js → FieldRootContext-D3fuVjs3.js} +1 -1
  7. package/dist/lib/client/{FocusManager-grSdNHqW.js → FocusManager-q7z7PMV1.js} +94 -91
  8. package/dist/lib/client/{FormContext-BB05lWOI.js → FormContext-CwLBtm_d.js} +1 -0
  9. package/dist/lib/client/{InternalBackdrop-cSK13gaM.js → InternalBackdrop-B8_lfUvf.js} +1 -1
  10. package/dist/lib/client/{LabelableContext-DKsB0fIx.js → LabelableContext-CmQF-TX2.js} +3 -6
  11. package/dist/lib/client/MenuSubmenuTrigger-DMb5CwTF.js +1584 -0
  12. package/dist/lib/client/{PopupHandle-CcJG4NMy.js → PopupHandle-DyX5gY1e.js} +17 -11
  13. package/dist/lib/client/{PopupStore-DjB-wO88.js → PopupStore-BjRwcvbG.js} +138 -115
  14. package/dist/lib/client/PopupViewport-BanYHrD-.js +154 -0
  15. package/dist/lib/client/Separator-D5oJzlA3.js +27 -0
  16. package/dist/lib/client/TriggerFocusGuards-Fzspp3Y1.js +51 -0
  17. package/dist/lib/client/accordion/index.js +1 -1
  18. package/dist/lib/client/accordion-CA2DfX67.js +381 -0
  19. package/dist/lib/client/alert-dialog/index.js +1 -1
  20. package/dist/lib/client/{alert-dialog-BH_3ndio.js → alert-dialog-Bup88Dpx.js} +2 -2
  21. package/dist/lib/client/autocomplete/index.js +1 -1
  22. package/dist/lib/client/{autocomplete-Cob_FZEP.js → autocomplete-oyy_uRpU.js} +30 -25
  23. package/dist/lib/client/avatar/index.js +1 -1
  24. package/dist/lib/client/avatar-DNZ4fnBd.js +191 -0
  25. package/dist/lib/client/button/index.js +1 -1
  26. package/dist/lib/client/button-BJZYmCVv.js +88 -0
  27. package/dist/lib/client/checkbox/index.js +1 -1
  28. package/dist/lib/client/checkbox-group/index.js +1 -1
  29. package/dist/lib/client/checkbox-group-DGyrciZJ.js +135 -0
  30. package/dist/lib/client/checkbox-sQHYTbpB.js +425 -0
  31. package/dist/lib/client/collapsible/index.js +1 -1
  32. package/dist/lib/client/collapsible-BENbFFCc.js +230 -0
  33. package/dist/lib/client/combobox/index.js +2 -2
  34. package/dist/lib/client/combobox-BGH8QLXH.js +401 -0
  35. package/dist/lib/client/compositeNavigation-DCt1sQon.js +82 -0
  36. package/dist/lib/client/{constants-BYjBUIIi.js → constants-ByOMFJAe.js} +105 -101
  37. package/dist/lib/client/context-menu/index.js +1 -1
  38. package/dist/lib/client/context-menu-xQ1sBCET.js +220 -0
  39. package/dist/lib/client/{createAnchorPositioning-DcxDXUgB.js → createAnchorPositioning-DCXIApS1.js} +149 -146
  40. package/dist/lib/client/{createAnchoredPopupScrollLock-Cx0cbh1_.js → createAnchoredPopupScrollLock-BxKpJbCE.js} +2 -2
  41. package/dist/lib/client/{createClickInteraction-CTaIFBiV.js → createClickInteraction-BeBsTqtY.js} +1 -1
  42. package/dist/lib/client/{createCollapsiblePanel-DeDu0O2t.js → createCollapsiblePanel-BQ8r4RTi.js} +1 -1
  43. package/dist/lib/client/createFocusInteraction-DQPWkZe2.js +60 -0
  44. package/dist/lib/client/createLabelableId-DxJRwMUJ.js +14 -0
  45. package/dist/lib/client/{createPopupAutoResize-CGNiLhGq.js → createPopupAutoResize-CSNpMz5v.js} +4 -4
  46. package/dist/lib/client/{createTransitionStatus-B1L-whed.js → createTransitionStatus-BL_cPSEA.js} +12 -12
  47. package/dist/lib/client/dialog/index.js +1 -1
  48. package/dist/lib/client/{dialog-DkaQwIgP.js → dialog-C0EF0a5u.js} +2 -2
  49. package/dist/lib/client/{dom-BEAeQ9Eb.js → dom-lDdayFF_.js} +25 -15
  50. package/dist/lib/client/drawer/index.js +1 -1
  51. package/dist/lib/client/drawer-uKoNBwDU.js +1540 -0
  52. package/dist/lib/client/field/index.js +1 -1
  53. package/dist/lib/client/field-DIMrgpBW.js +483 -0
  54. package/dist/lib/client/fieldset/index.js +1 -1
  55. package/dist/lib/client/fieldset-Byqk3noT.js +70 -0
  56. package/dist/lib/client/form/index.js +1 -1
  57. package/dist/lib/client/form-Bqq8wSLY.js +109 -0
  58. package/dist/lib/client/index.js +44 -42
  59. package/dist/lib/client/input/index.js +1 -1
  60. package/dist/lib/client/{input-gb0ejxkm.js → input-YthuKwIE.js} +1 -1
  61. package/dist/lib/client/internals/composeEventHandlers.js +14 -8
  62. package/dist/lib/client/internals/field-root-context/index.js +2 -2
  63. package/dist/lib/client/internals/form-context/index.js +1 -1
  64. package/dist/lib/client/internals/labelable-provider/index.js +1 -1
  65. package/dist/lib/client/{mergeStyleValue-C4ITiiIV.js → isSolidAccessor-BH_FevwH.js} +8 -15
  66. package/dist/lib/client/menu/index.js +1 -1
  67. package/dist/lib/client/menu-4rNLN6aX.js +334 -0
  68. package/dist/lib/client/menubar/index.js +1 -1
  69. package/dist/lib/client/menubar-nFQGtNmY.js +163 -0
  70. package/dist/lib/client/mergeStyleValue-Dcd36yxZ.js +12 -0
  71. package/dist/lib/client/meter/index.js +1 -1
  72. package/dist/lib/client/meter-BvWdppcx.js +178 -0
  73. package/dist/lib/client/navigation-menu/index.js +1 -1
  74. package/dist/lib/client/navigation-menu-BbRyun3a.js +1070 -0
  75. package/dist/lib/client/number-field/index.js +1 -1
  76. package/dist/lib/client/number-field-hT_H0hVu.js +1043 -0
  77. package/dist/lib/client/otp-field/index.js +1 -1
  78. package/dist/lib/client/otp-field-lsy2iGID.js +584 -0
  79. package/dist/lib/client/popover/index.js +1 -1
  80. package/dist/lib/client/popover-Cmvmuf1L.js +940 -0
  81. package/dist/lib/client/popupStateMapping-nhukB8NK.js +371 -0
  82. package/dist/lib/client/preview-card/index.js +1 -1
  83. package/dist/lib/client/preview-card-Dtu8AnBN.js +632 -0
  84. package/dist/lib/client/progress/index.js +1 -1
  85. package/dist/lib/client/progress-AVKxvgpc.js +195 -0
  86. package/dist/lib/client/radio/index.js +1 -1
  87. package/dist/lib/client/radio-CeCU-Qqi.js +284 -0
  88. package/dist/lib/client/radio-group/index.js +1 -1
  89. package/dist/lib/client/radio-group-NbuJvjQe.js +195 -0
  90. package/dist/lib/client/runOnceAnimationsFinish-CFADb4CN.js +49 -0
  91. package/dist/lib/client/{safePolygon--bbKn0c8.js → safePolygon-DVAR5dQD.js} +74 -70
  92. package/dist/lib/client/scroll-area/index.js +1 -1
  93. package/dist/lib/client/scroll-area-DqbvoAd7.js +717 -0
  94. package/dist/lib/client/{scrollable-SRNYlhF7.js → scrollable-BVaDUXng.js} +12 -12
  95. package/dist/lib/client/select/index.js +1 -1
  96. package/dist/lib/client/select-Dad51Xbn.js +1934 -0
  97. package/dist/lib/client/separator/index.js +1 -1
  98. package/dist/lib/client/slider/index.js +1 -1
  99. package/dist/lib/client/slider-CLSKFq_M.js +927 -0
  100. package/dist/lib/client/switch/index.js +1 -1
  101. package/dist/lib/client/switch-Bzuu5EIg.js +306 -0
  102. package/dist/lib/client/tabs/index.js +1 -1
  103. package/dist/lib/client/tabs-DWiBDv8D.js +695 -0
  104. package/dist/lib/client/toast/index.js +1 -1
  105. package/dist/lib/client/toast-DmtPJW2k.js +1118 -0
  106. package/dist/lib/client/toggle/index.js +1 -1
  107. package/dist/lib/client/toggle-CAe-Z8Xn.js +142 -0
  108. package/dist/lib/client/toggle-group/index.js +1 -1
  109. package/dist/lib/client/toggle-group-BbQg5s-m.js +134 -0
  110. package/dist/lib/client/toolbar/index.js +1 -1
  111. package/dist/lib/client/toolbar-BXT_g-oX.js +504 -0
  112. package/dist/lib/client/tooltip/index.js +1 -1
  113. package/dist/lib/client/tooltip-h2r2_Xuo.js +850 -0
  114. package/dist/lib/client/use-render/index.js +2 -0
  115. package/dist/lib/client/useFilteredItems-BX0BEuSI.js +2301 -0
  116. package/dist/lib/client/useRender-CxZ8PI-g.js +12 -0
  117. package/dist/lib/server/{DialogHandle-ATZlm9RC.js → DialogHandle-BGIISmG7.js} +37 -46
  118. package/dist/lib/server/{DialogPopup-BebI-w5P.js → DialogPopup-C2ZDGf42.js} +12 -15
  119. package/dist/lib/server/{FieldControl-Y_kI7ARp.js → FieldControl-CDMMyvuj.js} +62 -26
  120. package/dist/lib/server/{FieldRootContext-IC-LWzVp.js → FieldRootContext-Bfpna6gA.js} +3 -3
  121. package/dist/lib/server/{FocusManager-BrbZVWME.js → FocusManager-D-xgblGs.js} +9 -5
  122. package/dist/lib/server/{FormContext-pvESt85v.js → FormContext-CYwo_ZnB.js} +1 -0
  123. package/dist/lib/server/{InternalBackdrop-C_iDPVR-.js → InternalBackdrop-D_2zAWnl.js} +1 -1
  124. package/dist/lib/server/{LabelableContext-DZP3rgAY.js → LabelableContext-BTeF0IWb.js} +4 -6
  125. package/dist/lib/server/{MenuSubmenuTrigger-DA4gsv6z.js → MenuSubmenuTrigger-BMQKlOvU.js} +177 -210
  126. package/dist/lib/server/{PopupHandle-DthPgNjy.js → PopupHandle-QNj4mED2.js} +14 -5
  127. package/dist/lib/server/{PopupStore-DEs3FAEe.js → PopupStore-evylvVnN.js} +42 -15
  128. package/dist/lib/server/{PopupViewport-3r_KTFwX.js → PopupViewport-BDttjORN.js} +38 -28
  129. package/dist/lib/server/{Separator-vhhYxWGr.js → Separator-DTvtnxzP.js} +4 -6
  130. package/dist/lib/server/TriggerFocusGuards-B9GNbLrL.js +61 -0
  131. package/dist/lib/server/accordion/index.js +39 -77
  132. package/dist/lib/server/alert-dialog/index.js +2 -2
  133. package/dist/lib/server/autocomplete/index.js +14 -5
  134. package/dist/lib/server/avatar/index.js +90 -51
  135. package/dist/lib/server/button/index.js +14 -15
  136. package/dist/lib/server/checkbox/index.js +37 -64
  137. package/dist/lib/server/checkbox-group/index.js +21 -11
  138. package/dist/lib/server/collapsible/index.js +42 -49
  139. package/dist/lib/server/combobox/index.js +79 -50
  140. package/dist/lib/server/{compositeNavigation-BRVT1C38.js → compositeNavigation-D5jKM4yk.js} +32 -1
  141. package/dist/lib/server/{constants-9H__9xbS.js → constants-ByqXubhO.js} +10 -5
  142. package/dist/lib/server/context-menu/index.js +14 -16
  143. package/dist/lib/server/{createAnchorPositioning-C-cVOPwz.js → createAnchorPositioning-DrQYe7RS.js} +12 -7
  144. package/dist/lib/server/{createAnchoredPopupScrollLock-DFuUrykR.js → createAnchoredPopupScrollLock-q6gnOSmv.js} +2 -2
  145. package/dist/lib/server/{createClickInteraction-BYsMgvup.js → createClickInteraction-D7oc1Vco.js} +1 -1
  146. package/dist/lib/server/{createCollapsiblePanel-DTyVJz0G.js → createCollapsiblePanel-B45kTe6v.js} +1 -1
  147. package/dist/lib/server/{createFocusInteraction-EIS0QOel.js → createFocusInteraction-DFKr4G7a.js} +22 -2
  148. package/dist/lib/server/createLabelableId-WMUKtY6s.js +18 -0
  149. package/dist/lib/server/{createPopupAutoResize-DO50jjNX.js → createPopupAutoResize-Cg0-lLf4.js} +2 -2
  150. package/dist/lib/server/{createTransitionStatus-BTlrerSS.js → createTransitionStatus-184v7j3-.js} +2 -2
  151. package/dist/lib/server/dialog/index.js +2 -2
  152. package/dist/lib/server/{dom-Crg_2R-j.js → dom-D8_aB1yy.js} +14 -1
  153. package/dist/lib/server/drawer/index.js +96 -100
  154. package/dist/lib/server/field/index.js +110 -98
  155. package/dist/lib/server/fieldset/index.js +13 -16
  156. package/dist/lib/server/form/index.js +18 -14
  157. package/dist/lib/server/index.js +5 -3
  158. package/dist/lib/server/input/index.js +1 -1
  159. package/dist/lib/server/internals/composeEventHandlers.js +15 -9
  160. package/dist/lib/server/internals/field-root-context/index.js +1 -1
  161. package/dist/lib/server/internals/form-context/index.js +1 -1
  162. package/dist/lib/server/internals/labelable-provider/index.js +1 -1
  163. package/dist/lib/server/{mergeStyleValue-Db8bRCM4.js → isSolidAccessor-CZpzAH5l.js} +7 -21
  164. package/dist/lib/server/menu/index.js +30 -29
  165. package/dist/lib/server/menubar/index.js +10 -35
  166. package/dist/lib/server/mergeStyleValue-DecVaoac.js +20 -0
  167. package/dist/lib/server/meter/index.js +20 -32
  168. package/dist/lib/server/navigation-menu/index.js +67 -138
  169. package/dist/lib/server/number-field/index.js +64 -62
  170. package/dist/lib/server/otp-field/index.js +19 -22
  171. package/dist/lib/server/popover/index.js +61 -77
  172. package/dist/lib/server/{popupStateMapping-nKoUwoke.js → popupStateMapping-VHqr6M4H.js} +19 -17
  173. package/dist/lib/server/preview-card/index.js +39 -50
  174. package/dist/lib/server/progress/index.js +21 -33
  175. package/dist/lib/server/radio/index.js +24 -45
  176. package/dist/lib/server/radio-group/index.js +12 -13
  177. package/dist/lib/server/{runOnceAnimationsFinish-DCHzXWZU.js → runOnceAnimationsFinish-CYq38H8J.js} +2 -1
  178. package/dist/lib/server/{safePolygon-CAm5RJGv.js → safePolygon-B8QtiIZ3.js} +6 -1
  179. package/dist/lib/server/scroll-area/index.js +40 -49
  180. package/dist/lib/server/{scrollable-CjsSxbGr.js → scrollable-C9Pgq8T5.js} +1 -1
  181. package/dist/lib/server/select/index.js +128 -213
  182. package/dist/lib/server/separator/index.js +1 -1
  183. package/dist/lib/server/slider/index.js +39 -52
  184. package/dist/lib/server/switch/index.js +22 -32
  185. package/dist/lib/server/tabs/index.js +197 -137
  186. package/dist/lib/server/toast/index.js +78 -95
  187. package/dist/lib/server/toggle/index.js +11 -13
  188. package/dist/lib/server/toggle-group/index.js +11 -9
  189. package/dist/lib/server/toolbar/index.js +76 -93
  190. package/dist/lib/server/tooltip/index.js +53 -57
  191. package/dist/lib/server/use-render/index.js +2 -0
  192. package/dist/lib/server/{useFilteredItems-DvuctLt3.js → useFilteredItems-BmhL0nf1.js} +335 -316
  193. package/dist/lib/server/useRender-CryVdCjs.js +16 -0
  194. package/dist/lib/types/accordion/header/AccordionHeader.d.ts +1 -1
  195. package/dist/lib/types/accordion/item/AccordionItem.d.ts +1 -1
  196. package/dist/lib/types/accordion/panel/AccordionPanel.d.ts +1 -1
  197. package/dist/lib/types/accordion/root/AccordionRoot.d.ts +2 -7
  198. package/dist/lib/types/accordion/trigger/AccordionTrigger.d.ts +7 -7
  199. package/dist/lib/types/alert-dialog/trigger/AlertDialogTrigger.d.ts +1 -2
  200. package/dist/lib/types/autocomplete/trigger/AutocompleteTrigger.d.ts +1 -0
  201. package/dist/lib/types/avatar/fallback/AvatarFallback.d.ts +2 -2
  202. package/dist/lib/types/avatar/image/AvatarImage.d.ts +9 -3
  203. package/dist/lib/types/avatar/image/createImageLoadingStatus.d.ts +3 -2
  204. package/dist/lib/types/avatar/root/AvatarRoot.d.ts +1 -1
  205. package/dist/lib/types/button/Button.d.ts +1 -1
  206. package/dist/lib/types/checkbox-group/CheckboxGroupContext.d.ts +4 -1
  207. package/dist/lib/types/collapsible/panel/CollapsiblePanel.d.ts +1 -1
  208. package/dist/lib/types/collapsible/root/CollapsibleRoot.d.ts +1 -1
  209. package/dist/lib/types/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
  210. package/dist/lib/types/combobox/chip/ComboboxChip.d.ts +2 -0
  211. package/dist/lib/types/combobox/index.d.ts +2 -0
  212. package/dist/lib/types/combobox/index.parts.d.ts +1 -0
  213. package/dist/lib/types/combobox/items/createItems.d.ts +42 -0
  214. package/dist/lib/types/combobox/root/AriaCombobox.d.ts +4 -0
  215. package/dist/lib/types/combobox/root/ComboboxRoot.d.ts +17 -8
  216. package/dist/lib/types/combobox/root/ComboboxRootContext.d.ts +2 -0
  217. package/dist/lib/types/combobox/store/ComboboxStore.d.ts +1 -0
  218. package/dist/lib/types/combobox/trigger/ComboboxTrigger.d.ts +1 -0
  219. package/dist/lib/types/combobox/utils/handleInputPress.d.ts +1 -1
  220. package/dist/lib/types/dialog/backdrop/DialogBackdrop.d.ts +1 -1
  221. package/dist/lib/types/dialog/description/DialogDescription.d.ts +1 -1
  222. package/dist/lib/types/dialog/title/DialogTitle.d.ts +1 -1
  223. package/dist/lib/types/dialog/viewport/DialogViewport.d.ts +1 -1
  224. package/dist/lib/types/drawer/backdrop/DrawerBackdrop.d.ts +1 -1
  225. package/dist/lib/types/drawer/content/DrawerContent.d.ts +1 -1
  226. package/dist/lib/types/drawer/indent/DrawerIndent.d.ts +1 -1
  227. package/dist/lib/types/drawer/indent-background/DrawerIndentBackground.d.ts +1 -1
  228. package/dist/lib/types/field/control/FieldControl.d.ts +5 -5
  229. package/dist/lib/types/field/root/FieldRoot.d.ts +1 -1
  230. package/dist/lib/types/field/root/createFieldValidation.d.ts +3 -2
  231. package/dist/lib/types/fieldset/legend/FieldsetLegend.d.ts +1 -1
  232. package/dist/lib/types/fieldset/root/FieldsetRoot.d.ts +1 -1
  233. package/dist/lib/types/index.d.ts +1 -0
  234. package/dist/lib/types/internals/composeEventHandlers.d.ts +9 -2
  235. package/dist/lib/types/internals/createTransitionStatus.d.ts +1 -1
  236. package/dist/lib/types/internals/field-root-context/FieldRootContext.d.ts +1 -0
  237. package/dist/lib/types/internals/form-context/FormContext.d.ts +1 -0
  238. package/dist/lib/types/internals/labelable-provider/LabelableContext.d.ts +1 -0
  239. package/dist/lib/types/internals/labelable-provider/createLabelableId.d.ts +3 -0
  240. package/dist/lib/types/internals/overlay/PopupPortal.d.ts +4 -2
  241. package/dist/lib/types/internals/overlay/createPopupPresence.d.ts +1 -0
  242. package/dist/lib/types/internals/overlay/dom.d.ts +2 -0
  243. package/dist/lib/types/menu/root/MenuRootContext.d.ts +1 -0
  244. package/dist/lib/types/meter/indicator/MeterIndicator.d.ts +1 -1
  245. package/dist/lib/types/meter/label/MeterLabel.d.ts +1 -1
  246. package/dist/lib/types/meter/root/MeterRoot.d.ts +1 -1
  247. package/dist/lib/types/meter/track/MeterTrack.d.ts +1 -1
  248. package/dist/lib/types/meter/value/MeterValue.d.ts +1 -1
  249. package/dist/lib/types/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -0
  250. package/dist/lib/types/number-field/input/NumberFieldInput.d.ts +5 -5
  251. package/dist/lib/types/number-field/root/NumberFieldRootContext.d.ts +1 -0
  252. package/dist/lib/types/popover/arrow/PopoverArrow.d.ts +1 -1
  253. package/dist/lib/types/popover/backdrop/PopoverBackdrop.d.ts +1 -1
  254. package/dist/lib/types/popover/description/PopoverDescription.d.ts +1 -1
  255. package/dist/lib/types/popover/positioner/PopoverPositioner.d.ts +1 -1
  256. package/dist/lib/types/popover/title/PopoverTitle.d.ts +1 -1
  257. package/dist/lib/types/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
  258. package/dist/lib/types/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
  259. package/dist/lib/types/preview-card/positioner/PreviewCardPositioner.d.ts +1 -1
  260. package/dist/lib/types/progress/indicator/ProgressIndicator.d.ts +1 -1
  261. package/dist/lib/types/progress/label/ProgressLabel.d.ts +1 -1
  262. package/dist/lib/types/progress/root/ProgressRoot.d.ts +1 -1
  263. package/dist/lib/types/progress/track/ProgressTrack.d.ts +1 -1
  264. package/dist/lib/types/progress/value/ProgressValue.d.ts +1 -1
  265. package/dist/lib/types/radio/indicator/RadioIndicator.d.ts +2 -2
  266. package/dist/lib/types/scroll-area/content/ScrollAreaContent.d.ts +1 -1
  267. package/dist/lib/types/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
  268. package/dist/lib/types/scroll-area/root/ScrollAreaRoot.d.ts +1 -1
  269. package/dist/lib/types/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +2 -1
  270. package/dist/lib/types/scroll-area/thumb/ScrollAreaThumb.d.ts +1 -1
  271. package/dist/lib/types/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
  272. package/dist/lib/types/separator/Separator.d.ts +1 -1
  273. package/dist/lib/types/slider/track/SliderTrack.d.ts +2 -2
  274. package/dist/lib/types/tabs/indicator/prehydrationScript.d.ts +1 -1
  275. package/dist/lib/types/tabs/list/TabsList.d.ts +1 -1
  276. package/dist/lib/types/tabs/panel/TabsPanel.d.ts +1 -1
  277. package/dist/lib/types/tabs/root/TabsRoot.d.ts +1 -1
  278. package/dist/lib/types/tabs/tab/TabsTab.d.ts +1 -1
  279. package/dist/lib/types/toast/createToastManager.d.ts +2 -2
  280. package/dist/lib/types/toast/store/ToastStore.d.ts +1 -1
  281. package/dist/lib/types/toast/useToastManager.d.ts +1 -1
  282. package/dist/lib/types/toggle/Toggle.d.ts +1 -1
  283. package/dist/lib/types/toggle-group/ToggleGroup.d.ts +1 -1
  284. package/dist/lib/types/toolbar/group/ToolbarGroup.d.ts +1 -1
  285. package/dist/lib/types/toolbar/link/ToolbarLink.d.ts +10 -3
  286. package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +10 -4
  287. package/dist/lib/types/toolbar/separator/ToolbarSeparator.d.ts +1 -1
  288. package/dist/lib/types/tooltip/arrow/TooltipArrow.d.ts +1 -1
  289. package/dist/lib/types/tooltip/positioner/TooltipPositioner.d.ts +1 -1
  290. package/dist/lib/types/types/index.d.ts +7 -3
  291. package/dist/lib/types/use-render/index.d.ts +2 -0
  292. package/dist/lib/types/use-render/useRender.d.ts +10 -0
  293. package/package.json +24 -11
  294. package/dist/lib/client/DialogHandle-DrN2YWCv.js +0 -518
  295. package/dist/lib/client/DialogPopup-ZlqmGfdk.js +0 -136
  296. package/dist/lib/client/FieldControl-Bc-z2og6.js +0 -116
  297. package/dist/lib/client/MenuSubmenuTrigger-QZkQ0F2v.js +0 -1570
  298. package/dist/lib/client/PopupViewport-DgrIqQea.js +0 -152
  299. package/dist/lib/client/Separator-9DboD_Si.js +0 -25
  300. package/dist/lib/client/TriggerFocusGuards-CQ-JuASy.js +0 -56
  301. package/dist/lib/client/accordion-sOXt9AlG.js +0 -399
  302. package/dist/lib/client/avatar-AF9vyD4q.js +0 -146
  303. package/dist/lib/client/button-DpUi-2g8.js +0 -82
  304. package/dist/lib/client/checkbox-BbAwOptH.js +0 -441
  305. package/dist/lib/client/checkbox-group-CSSp_805.js +0 -128
  306. package/dist/lib/client/collapsible-BIbje_ub.js +0 -232
  307. package/dist/lib/client/combobox-8O-vgTLL.js +0 -352
  308. package/dist/lib/client/compositeNavigation-sxniYTc7.js +0 -58
  309. package/dist/lib/client/context-menu-BTMkXtrs.js +0 -217
  310. package/dist/lib/client/createFocusInteraction-D4w1-235.js +0 -50
  311. package/dist/lib/client/drawer-Ce2cChLt.js +0 -1550
  312. package/dist/lib/client/field-C-o7jzKW.js +0 -469
  313. package/dist/lib/client/fieldset-BQTAWv2L.js +0 -65
  314. package/dist/lib/client/form-BINBiW5L.js +0 -106
  315. package/dist/lib/client/menu-DeMT08oD.js +0 -326
  316. package/dist/lib/client/menubar-C4aomSYv.js +0 -185
  317. package/dist/lib/client/meter-xSU37Q0m.js +0 -171
  318. package/dist/lib/client/navigation-menu-ZILQmdn6.js +0 -1083
  319. package/dist/lib/client/number-field-B8CsTb_8.js +0 -1035
  320. package/dist/lib/client/otp-field-DBkMcnog.js +0 -582
  321. package/dist/lib/client/popover-CQwyp-fs.js +0 -929
  322. package/dist/lib/client/popupStateMapping-C9eZl19i.js +0 -367
  323. package/dist/lib/client/preview-card-D_2Q8lpC.js +0 -625
  324. package/dist/lib/client/progress-D7r0xAC9.js +0 -188
  325. package/dist/lib/client/radio-CzGQ81z1.js +0 -299
  326. package/dist/lib/client/radio-group-DpHlBKA6.js +0 -193
  327. package/dist/lib/client/runOnceAnimationsFinish-15EM-Z4l.js +0 -48
  328. package/dist/lib/client/scroll-area-CffM4U0R.js +0 -701
  329. package/dist/lib/client/select-IFhiEg73.js +0 -1940
  330. package/dist/lib/client/slider-BCagYmGp.js +0 -921
  331. package/dist/lib/client/switch-RIJeDnvS.js +0 -308
  332. package/dist/lib/client/tabs-fOAKs7r3.js +0 -696
  333. package/dist/lib/client/toast-D2P8UqUs.js +0 -1108
  334. package/dist/lib/client/toggle-group-0Aue0owJ.js +0 -129
  335. package/dist/lib/client/toggle-momVEIBL.js +0 -138
  336. package/dist/lib/client/toolbar-Du22aKCv.js +0 -492
  337. package/dist/lib/client/tooltip-CyK61fl1.js +0 -844
  338. package/dist/lib/client/useFilteredItems-DTekHz39.js +0 -2223
  339. package/dist/lib/client/withoutComponentBinding-CcCW7fSc.js +0 -13
  340. package/dist/lib/server/TriggerFocusGuards-sbGwf45f.js +0 -63
  341. package/dist/lib/server/withoutComponentBinding-BHaWr5kU.js +0 -20
  342. package/dist/lib/types/internals/withoutComponentBinding.d.ts +0 -7
@@ -1,32 +1,34 @@
1
+ import { t as useRender } from "./useRender-CryVdCjs.js";
1
2
  import { getStateAttributesProps } from "./internals/getStateAttributesProps.js";
2
3
  import { E as pointer, S as listNavigation, b as keyboard, g as inputClear, h as inputChange, l as escapeKey, r as clearPress, t as cancelOpen, v as inputPress, w as none, y as itemPress } from "./internals/reasons.js";
3
4
  import { n as resolveClass, t as resolveStyle } from "./resolveStyle-XCSFDHAL.js";
4
5
  import { createChangeEventDetails, createGenericEventDetails } from "./internals/createBaseUIEventDetails.js";
5
6
  import { transitionStatusMapping } from "./internals/stateAttributesMapping.js";
6
- import { composeEventHandlers } from "./internals/composeEventHandlers.js";
7
- import { t as runOnceAnimationsFinish } from "./runOnceAnimationsFinish-DCHzXWZU.js";
8
- import { a as isElement, c as isHTMLElement, l as isInteractiveElement, n as contains, o as isElementVisible, p as ownerDocument } from "./dom-Crg_2R-j.js";
9
- import { i as isListIndexDisabled, n as getMinListIndex, r as getNavigatedIndex, t as getMaxListIndex } from "./compositeNavigation-BRVT1C38.js";
10
- import { t as createAnchorPositioning } from "./createAnchorPositioning-C-cVOPwz.js";
11
- import { t as InternalBackdrop } from "./InternalBackdrop-C_iDPVR-.js";
12
- import { t as createAnchoredPopupScrollLock } from "./createAnchoredPopupScrollLock-DFuUrykR.js";
13
- import { t as createClickInteraction } from "./createClickInteraction-BYsMgvup.js";
7
+ import { composeEventHandlers, liveEventHandler } from "./internals/composeEventHandlers.js";
8
+ import { t as runOnceAnimationsFinish } from "./runOnceAnimationsFinish-CYq38H8J.js";
9
+ import { l as isHTMLElement, m as ownerDocument, n as contains, o as isElement, s as isElementVisible, u as isInteractiveElement } from "./dom-D8_aB1yy.js";
10
+ import { i as isListIndexDisabled, n as getMinListIndex, r as getNavigatedIndex, t as getMaxListIndex } from "./compositeNavigation-D5jKM4yk.js";
11
+ import { t as createAnchorPositioning } from "./createAnchorPositioning-DrQYe7RS.js";
12
+ import { t as InternalBackdrop } from "./InternalBackdrop-D_2zAWnl.js";
13
+ import { t as createAnchoredPopupScrollLock } from "./createAnchoredPopupScrollLock-q6gnOSmv.js";
14
+ import { t as createClickInteraction } from "./createClickInteraction-D7oc1Vco.js";
14
15
  import { c as useFloatingTree, i as createFloatingNode, n as FloatingTreeContext, r as FloatingTreeStore, s as useFloatingParentNodeId, t as FloatingParentNodeContext } from "./FloatingTree-z1JPD1dR.js";
15
- import { a as createPopupPresence, n as createTriggerRegistration, o as createDismiss, t as PopupStore } from "./PopupStore-DEs3FAEe.js";
16
- import { t as createTransitionStatus } from "./createTransitionStatus-BTlrerSS.js";
17
- import { a as triggerOpenStateMapping, i as pressableTriggerOpenStateMapping, n as popupStateMapping, o as PopupPortal, r as popupTransitionStateMapping } from "./popupStateMapping-nKoUwoke.js";
18
- import { t as FocusManager } from "./FocusManager-BrbZVWME.js";
19
- import { a as stopButtonInteraction, i as preventDisabledButtonKeyDown, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "./buttonSemantics-BSwDxJhh.js";
16
+ import { a as createPopupPresence, n as createTriggerRegistration, o as createDismiss, t as PopupStore } from "./PopupStore-evylvVnN.js";
17
+ import { t as createTransitionStatus } from "./createTransitionStatus-184v7j3-.js";
18
+ import { a as triggerOpenStateMapping, i as pressableTriggerOpenStateMapping, n as popupStateMapping, o as PopupPortal, r as popupTransitionStateMapping } from "./popupStateMapping-VHqr6M4H.js";
19
+ import { t as FocusManager } from "./FocusManager-D-xgblGs.js";
20
20
  import { t as setRef } from "./setRef-Bt70sW7c.js";
21
+ import { a as stopButtonInteraction, i as preventDisabledButtonKeyDown, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "./buttonSemantics-BSwDxJhh.js";
21
22
  import { n as useDirection } from "./DirectionContext-YORWLF08.js";
22
23
  import { DEFAULT_FIELD_STATE_ATTRIBUTES, fieldStateAttributesMapping } from "./internals/field-constants.js";
23
- import { n as useFieldRootContext } from "./FieldRootContext-IC-LWzVp.js";
24
- import { n as useFormContext } from "./FormContext-pvESt85v.js";
25
- import { a as defaultItemEquality, c as removeItem, i as compareItemEquality, l as selectedValueIncludes, n as isSolidAccessor, o as findItemIndex, r as areItemArraysEqual, s as findSelectionIndex, t as mergeStyleValue } from "./mergeStyleValue-Db8bRCM4.js";
26
- import { r as useLabelableContext } from "./LabelableContext-DZP3rgAY.js";
27
- import { i as isScrollableY } from "./scrollable-CjsSxbGr.js";
24
+ import { n as FieldRootContext, r as useFieldRootContext, t as DEFAULT_FIELD_ROOT_CONTEXT } from "./FieldRootContext-Bfpna6gA.js";
25
+ import { n as useFormContext } from "./FormContext-CYwo_ZnB.js";
26
+ import { a as findItemIndex, c as selectedValueIncludes, i as defaultItemEquality, n as areItemArraysEqual, o as findSelectionIndex, r as compareItemEquality, s as removeItem, t as isSolidAccessor } from "./isSolidAccessor-CZpzAH5l.js";
27
+ import { r as useLabelableContext } from "./LabelableContext-BTeF0IWb.js";
28
+ import { i as isScrollableY } from "./scrollable-C9Pgq8T5.js";
28
29
  import { t as isAndroid } from "./platform-DYukKUir.js";
29
- import { Dynamic, escape, memo, mergeProps, ssr, ssrAttribute, ssrElement, ssrGroup, ssrHydrationKey, ssrStyle } from "@solidjs/web";
30
+ import { t as mergeStyleValue } from "./mergeStyleValue-DecVaoac.js";
31
+ import { escape, memo, mergeProps, ssr, ssrAttribute, ssrElement, ssrGroup, ssrHydrationKey, ssrStyle } from "@solidjs/web";
30
32
  import { For, Show, createContext, createEffect, createMemo, createSignal, createUniqueId, flush, omit, onCleanup, untrack, useContext } from "solid-js";
31
33
  //#region src/internals/overlay/createListNavigation.ts
32
34
  function createListNavigation(options) {
@@ -195,7 +197,7 @@ function serializeValue(value) {
195
197
  }
196
198
  }
197
199
  function isGroupedItems(items) {
198
- return Array.isArray(items) && items.length > 0 && typeof items[0] === "object" && items[0] != null && "items" in items[0];
200
+ return Array.isArray(items) && items.length > 0 && typeof items[0] === "object" && items[0] != null && Array.isArray(items[0].items);
199
201
  }
200
202
  function flattenItems(items) {
201
203
  if (!Array.isArray(items)) return [];
@@ -205,7 +207,7 @@ function flattenItems(items) {
205
207
  /** Whether an explicit `null` item carries a label that should win over a placeholder. */
206
208
  function hasNullItemLabel(items) {
207
209
  if (items == null) return false;
208
- if (!Array.isArray(items)) return "null" in items;
210
+ if (!Array.isArray(items)) return Object.hasOwn(items, "null");
209
211
  for (const item of flattenItems(items)) {
210
212
  const labeled = item;
211
213
  if (labeled && typeof labeled === "object" && labeled.value == null && labeled.label != null) return true;
@@ -232,7 +234,7 @@ function resolveSelectedLabel(value, items, itemToStringLabel) {
232
234
  const fallback = () => stringifyAsLabel(value, itemToStringLabel);
233
235
  if (itemToStringLabel && value != null) return itemToStringLabel(value);
234
236
  if (value && typeof value === "object" && "label" in value && value.label != null) return value.label;
235
- if (items && !Array.isArray(items)) return items[String(value)] ?? fallback();
237
+ if (items && !Array.isArray(items)) return Object.hasOwn(items, String(value)) ? items[String(value)] ?? fallback() : fallback();
236
238
  if (Array.isArray(items)) {
237
239
  const flatItems = flattenItems(items);
238
240
  if (value == null || typeof value !== "object") {
@@ -455,7 +457,7 @@ var ComboboxStore = class extends PopupStore {
455
457
  [this.popupSide, this.setPopupSide] = signal(null);
456
458
  [this.openMethod, this.setOpenMethod] = signal(null);
457
459
  [this.inputInsidePopup, this.setInputInsidePopup] = signal(true);
458
- [this.inputOwnsFormValue, this.setInputOwnsFormValue] = signal(false);
460
+ [this.inputOwnsFormValue, this.setInputOwnsFormValue] = signal(options.inputOwnsFormValue ?? false);
459
461
  }
460
462
  /** The item elements addressed by index, as list navigation and typeahead see them. */
461
463
  elements() {
@@ -563,18 +565,29 @@ function AriaCombobox(props) {
563
565
  const multiple = createMemo(() => props.selectionMode === "multiple");
564
566
  const single = createMemo(() => props.selectionMode === "single");
565
567
  const comparator = createMemo(() => props.isItemEqualToValue ?? defaultItemEquality);
566
- const itemToStringLabel = () => props.itemToStringLabel;
568
+ const itemToStringLabel = () => props.itemCollection ? resolveLabel : props.itemToStringLabel;
569
+ function resolveLabel(value) {
570
+ const collection = props.itemCollection;
571
+ if (!collection) return stringifyAsLabel(value, props.itemToStringLabel);
572
+ if (!collection.hasValue(value, comparator())) {
573
+ const external = flattenItems(props.filteredItems).find((item) => compareItemEquality(collection.value(item), value, comparator()));
574
+ if (external !== void 0) return collection.itemLabel(external);
575
+ }
576
+ return collection.label(value, comparator(), props.itemToStringLabel);
577
+ }
578
+ const projectValue = (item) => props.itemCollection ? props.itemCollection.value(item) : item;
579
+ const sourceLabel = () => props.itemCollection?.itemLabel ?? props.itemToStringLabel;
567
580
  const itemToStringValue = () => props.itemToStringValue;
568
581
  const initialSelectedValue = untrack(() => {
569
582
  const defaultValue = props.defaultSelectedValue;
570
- if (defaultValue !== void 0 && defaultValue !== null) return Array.isArray(defaultValue) ? defaultValue.slice() : defaultValue;
583
+ if (defaultValue !== void 0 && defaultValue !== null) return props.selectionMode === "multiple" && Array.isArray(defaultValue) ? defaultValue.slice() : defaultValue;
571
584
  return props.selectionMode === "multiple" ? [] : defaultValue ?? null;
572
585
  });
573
586
  const [uncontrolledSelected, setUncontrolledSelected] = createSignal(() => initialSelectedValue);
574
587
  const selectedValue = createMemo(() => controlledSelected ? props.selectedValue ?? null : uncontrolledSelected());
575
588
  const initialDefaultInputValue = untrack(() => {
576
589
  if (hasInputValueProp) return props.defaultInputValue ?? props.inputValue ?? "";
577
- if (props.selectionMode === "single") return stringifyAsLabel(selectedValue(), props.itemToStringLabel);
590
+ if (props.selectionMode === "single") return resolveLabel(selectedValue());
578
591
  return "";
579
592
  });
580
593
  const [uncontrolledInput, setUncontrolledInput] = createSignal(initialDefaultInputValue);
@@ -614,18 +627,18 @@ function AriaCombobox(props) {
614
627
  if (props.filter === null) return () => true;
615
628
  if (props.filter !== void 0) return props.filter;
616
629
  const collator = collatorFilter();
617
- const toLabel = props.itemToStringLabel;
630
+ const toLabel = sourceLabel();
618
631
  return (item, query) => item == null ? false : collator.contains(item, query, toLabel);
619
632
  });
620
633
  const query = createMemo(() => closeQuery() ?? String(inputValue()).trim());
621
- const selectedLabelString = createMemo(() => single() ? stringifyAsLabel(selectedValue(), props.itemToStringLabel) : "");
634
+ const selectedLabelString = createMemo(() => single() ? resolveLabel(selectedValue()) : "");
622
635
  const shouldBypassFiltering = createMemo(() => {
623
636
  const label = selectedLabelString();
624
637
  const currentQuery = query();
625
638
  return single() && !queryChangedAfterOpen() && currentQuery !== "" && label.length === currentQuery.length && collatorFilter().contains(label, currentQuery);
626
639
  });
627
- const filterQuery = createMemo(() => shouldBypassFiltering() ? "" : query());
628
- const shouldIgnoreExternalFiltering = createMemo(() => hasItems() && hasFilteredItemsProp() && shouldBypassFiltering());
640
+ const filterQuery = createMemo(() => props.filterQuery ?? (shouldBypassFiltering() ? "" : query()));
641
+ const shouldIgnoreExternalFiltering = createMemo(() => hasItems() && hasFilteredItemsProp() && shouldBypassFiltering() && (!props.itemCollection || props.itemCollection.hasValue(selectedValue(), comparator())));
629
642
  const flatItems = createMemo(() => flattenItems(props.items));
630
643
  const filteredItems = createMemo(() => {
631
644
  if (props.filteredItems !== void 0 && !shouldIgnoreExternalFiltering()) return props.filteredItems;
@@ -634,7 +647,7 @@ function AriaCombobox(props) {
634
647
  const currentQuery = filterQuery();
635
648
  const currentLimit = limit();
636
649
  const match = filter();
637
- const toLabel = props.itemToStringLabel;
650
+ const toLabel = sourceLabel();
638
651
  if (isGroupedItems(items)) {
639
652
  const resultingGroups = [];
640
653
  let currentCount = 0;
@@ -672,14 +685,15 @@ function AriaCombobox(props) {
672
685
  const listEmpty = createMemo(() => filteredItems().length === 0);
673
686
  let hadInputClear = false;
674
687
  let lastHighlight = INITIAL_LAST_HIGHLIGHT;
688
+ let lastHighlightType = none;
675
689
  let pendingQueryHighlight = null;
676
690
  let pendingInitialHighlight = null;
677
- let initializedOpen = false;
691
+ let initializedOpen = untrack(() => Boolean(props.open ?? props.defaultOpen) && props.autoHighlight === true);
678
692
  let previousSelectedValue = cloneValue(untrack(selectedValue));
679
693
  let previousInputValue = untrack(inputValue);
680
- let previousItems = untrack(() => props.items);
681
694
  let previousQuery = untrack(query);
682
695
  const store = new ComboboxStore({
696
+ inputOwnsFormValue: untrack(() => props.selectionMode === "none"),
683
697
  controlledOpen: () => controlledOpen ? props.open : void 0,
684
698
  floatingId,
685
699
  nodeId,
@@ -695,7 +709,7 @@ function AriaCombobox(props) {
695
709
  });
696
710
  store.update({ open: untrack(() => props.open ?? props.defaultOpen ?? false) });
697
711
  store.configureTriggerUnmount({ closeOnActiveTriggerUnmount: false });
698
- store.setInputOwnsFormValue(untrack(() => props.selectionMode === "none"));
712
+ createEffect(() => selectionMode() === "none" && (props.inline || !store.inputInsidePopup()), (owns) => store.setInputOwnsFormValue(Boolean(owns)));
699
713
  const node = createFloatingNode({
700
714
  tree,
701
715
  id: nodeId,
@@ -713,14 +727,14 @@ function AriaCombobox(props) {
713
727
  return store.track().popupElement;
714
728
  }
715
729
  /** Item values addressed by index, from `items` when provided and rendered items otherwise. */
716
- const itemValues = createMemo(() => hasItems() || hasFilteredItemsProp() ? flatFilteredItems() : store.collection.values());
717
- createMemo(() => {
730
+ const itemValues = createMemo(() => hasItems() || hasFilteredItemsProp() ? flatFilteredItems().map(projectValue) : store.collection.values());
731
+ function itemLabels() {
718
732
  const rendered = store.collection.labels();
719
733
  if (!hasItems()) return rendered;
720
- const derived = flatFilteredItems().map((item) => stringifyAsLabel(item, props.itemToStringLabel));
734
+ const derived = flatFilteredItems().map((item) => stringifyAsLabel(item, sourceLabel()));
721
735
  if (!store.forceMounted()) return derived;
722
736
  return derived.map((label, index) => rendered[index] ?? label);
723
- });
737
+ }
724
738
  const listElements = createMemo(() => {
725
739
  const elements = store.collection.elements();
726
740
  const length = itemValues().length;
@@ -748,14 +762,15 @@ function AriaCombobox(props) {
748
762
  const fieldStringValue = createMemo(() => {
749
763
  if (selectionMode() === "none") return inputValue();
750
764
  const current = selectedValue();
751
- return Array.isArray(current) ? current.map((value) => stringifyAsValue(value, props.itemToStringValue)) : stringifyAsValue(current, props.itemToStringValue);
765
+ return multiple() && Array.isArray(current) ? current.map((value) => stringifyAsValue(value, props.itemToStringValue)) : stringifyAsValue(current, props.itemToStringValue);
752
766
  });
753
767
  const serializedValue = createMemo(() => {
754
768
  const raw = fieldRawValue();
755
- return Array.isArray(raw) ? "" : stringifyAsValue(raw, props.itemToStringValue);
769
+ return multiple() && Array.isArray(raw) ? "" : stringifyAsValue(raw, props.itemToStringValue);
756
770
  });
757
771
  const hiddenInputName = createMemo(() => multiple() || selectionMode() === "none" && store.inputOwnsFormValue() ? void 0 : name());
758
772
  function emitHighlight(value, index, type) {
773
+ lastHighlightType = type;
759
774
  if (index === -1) {
760
775
  if (lastHighlight === INITIAL_LAST_HIGHLIGHT) return;
761
776
  lastHighlight = INITIAL_LAST_HIGHLIGHT;
@@ -789,9 +804,9 @@ function AriaCombobox(props) {
789
804
  }
790
805
  }
791
806
  function setInputValue(next, details) {
792
- hadInputClear = details.reason === inputClear;
793
807
  props.onInputValueChange?.(next, details);
794
808
  if (details.isCanceled) return;
809
+ hadInputClear = details.reason === inputClear;
795
810
  if (details.reason === "input-change") {
796
811
  if (store.open() && closeQuery() !== null) setCloseQuery(null);
797
812
  const event = details.event;
@@ -830,7 +845,7 @@ function AriaCombobox(props) {
830
845
  } else if (multiple()) {
831
846
  if (!inline()) setCloseQuery(currentQuery);
832
847
  if (store.inputInsidePopup()) setIndices({ activeIndex: null });
833
- if (!store.inputInsidePopup() || inline()) setInputValue("", createChangeEventDetails(inputClear, details.event));
848
+ if (!store.inputInsidePopup() || inline()) setInputValue("", createChangeEventDetails(inputClear, details.event, void 0, { isItemPress: details.reason === itemPress }));
834
849
  }
835
850
  }
836
851
  if (!nextOpen && store.inputInsidePopup() && (details.reason === "focus-out" || details.reason === "outside-press")) {
@@ -843,7 +858,7 @@ function AriaCombobox(props) {
843
858
  props.onSelectedValueChange?.(next, details);
844
859
  if (details.isCanceled) return;
845
860
  if (!controlledSelected) setUncontrolledSelected(() => next);
846
- if (selectionMode() === "none" && store.track().popupElement != null && (props.fillInputOnItemPress ?? true) || single() && !store.inputInsidePopup()) setInputValue(stringifyAsLabel(next, props.itemToStringLabel), createChangeEventDetails(details.reason, details.event));
861
+ if (selectionMode() === "none" && store.track().popupElement != null && (props.fillInputOnItemPress ?? true) || single() && !store.inputInsidePopup()) setInputValue(resolveLabel(next), createChangeEventDetails(details.reason, details.event));
847
862
  }
848
863
  function handleSelection(event, itemValue) {
849
864
  const target = event.target;
@@ -857,11 +872,14 @@ function AriaCombobox(props) {
857
872
  }
858
873
  if (multiple()) {
859
874
  const current = Array.isArray(selectedValue()) ? selectedValue() : [];
860
- setSelectedValue(selectedValueIncludes(current, itemValue, comparator()) ? removeItem(current, itemValue, comparator()) : [...current, itemValue], details);
875
+ const alreadySelected = selectedValueIncludes(current, itemValue, comparator());
876
+ setSelectedValue(alreadySelected ? removeItem(current, itemValue, comparator()) : [...current, itemValue], details);
861
877
  if (details.isCanceled) return;
862
878
  if (!((inputElement()?.value.trim() ?? "") !== "")) return;
863
- if (store.inputInsidePopup()) setInputValue("", createChangeEventDetails(inputClear, details.event));
864
- else setOpen(false, details);
879
+ if (store.inputInsidePopup()) {
880
+ setInputValue("", createChangeEventDetails(inputClear, details.event, void 0, { isItemPress: true }));
881
+ if (pendingQueryHighlight && !alreadySelected) pendingQueryHighlight.toggledValue = itemValue;
882
+ } else setOpen(false, details);
865
883
  return;
866
884
  }
867
885
  setSelectedValue(itemValue, details);
@@ -891,7 +909,7 @@ function AriaCombobox(props) {
891
909
  setCloseQuery(null);
892
910
  store.resetAfterClose();
893
911
  if (selectionMode() === "none") setIndices({
894
- activeIndex: null,
912
+ activeIndex: autoHighlight() === "always" && store.listElement() && !store.track().popupElement && itemValues().length > 0 ? 0 : null,
895
913
  selectedIndex: null
896
914
  });
897
915
  else setIndices({ activeIndex: null });
@@ -901,7 +919,7 @@ function AriaCombobox(props) {
901
919
  if (store.inputInsidePopup()) {
902
920
  if (currentInput && currentInput.value !== "") setInputValue("", createChangeEventDetails(inputClear));
903
921
  } else {
904
- const label = stringifyAsLabel(selectedValue(), props.itemToStringLabel);
922
+ const label = resolveLabel(selectedValue());
905
923
  if (currentInput && currentInput.value !== label) setInputValue(label, createChangeEventDetails(label === "" ? inputClear : none));
906
924
  }
907
925
  }
@@ -926,13 +944,13 @@ function AriaCombobox(props) {
926
944
  reference["aria-expanded"] = expanded() ? "true" : "false";
927
945
  reference["aria-haspopup"] = grid() ? "grid" : "listbox";
928
946
  reference["aria-controls"] = expanded() ? store.listElement()?.id : void 0;
929
- reference["aria-autocomplete"] = autoCompleteMode();
947
+ reference["aria-autocomplete"] = readOnly() ? "none" : autoCompleteMode();
930
948
  }
931
949
  return reference;
932
950
  });
933
951
  const click = createClickInteraction({
934
952
  context: store.context.floatingRoot,
935
- enabled: () => !readOnly() && !disabled() && openOnInputClick(),
953
+ enabled: () => !disabled() && openOnInputClick(),
936
954
  event: () => "mousedown-only",
937
955
  toggle: () => false,
938
956
  reason: () => inputPress,
@@ -941,7 +959,7 @@ function AriaCombobox(props) {
941
959
  const dismiss = createDismiss({
942
960
  context: store.context.floatingRoot,
943
961
  tree: () => tree,
944
- enabled: () => !readOnly() && !disabled() && !inline(),
962
+ enabled: () => !disabled() && !inline(),
945
963
  outsidePressEvent: () => ({
946
964
  mouse: "sloppy",
947
965
  touch: "intentional"
@@ -954,7 +972,7 @@ function AriaCombobox(props) {
954
972
  });
955
973
  const listNavigation$1 = createListNavigation({
956
974
  context: store.context.floatingRoot,
957
- enabled: () => !readOnly() && !disabled(),
975
+ enabled: () => !disabled(),
958
976
  list: listElements,
959
977
  activeIndex: store.activeIndex,
960
978
  selectedIndex: store.selectedIndex,
@@ -992,6 +1010,8 @@ function AriaCombobox(props) {
992
1010
  flatFilteredItems,
993
1011
  listEmpty,
994
1012
  itemValues,
1013
+ itemLabels,
1014
+ hasItemCollection: () => props.itemCollection !== void 0,
995
1015
  selectedValue,
996
1016
  inputValue,
997
1017
  hasSelectedValue,
@@ -1078,12 +1098,15 @@ function AriaCombobox(props) {
1078
1098
  mode: selectionMode(),
1079
1099
  values: itemValues(),
1080
1100
  compare: comparator(),
1081
- isMultiple: multiple()
1082
- }), (state) => {
1101
+ isMultiple: multiple(),
1102
+ mounted: presence.mounted(),
1103
+ hasItems: hasItems() || hasFilteredItemsProp()
1104
+ }), (state, previous) => {
1083
1105
  if (state.open) return;
1084
1106
  store.pointerDownItem = null;
1085
1107
  if (state.mode === "none") return;
1086
- untrack(() => setIndices({ selectedIndex: findSelectionIndex(hasItems() ? flatItems() : state.values, state.selected, state.compare, state.isMultiple) }));
1108
+ if (!state.hasItems && !state.mounted && state.values.length === 0 && previous && sameValue(state.selected, previous.selected, state.compare)) return;
1109
+ untrack(() => setIndices({ selectedIndex: findSelectionIndex(state.values, state.selected, state.compare, state.isMultiple) }));
1087
1110
  });
1088
1111
  createEffect(() => ({
1089
1112
  activeIndex: store.activeIndex(),
@@ -1094,31 +1117,40 @@ function AriaCombobox(props) {
1094
1117
  highlight: autoHighlight()
1095
1118
  }), (state) => untrack(() => resolveHighlight(state)));
1096
1119
  function resolveHighlight(state) {
1120
+ let activeIndex = state.activeIndex;
1097
1121
  const pending = pendingQueryHighlight;
1098
1122
  if (pending) {
1099
1123
  const listIsNavigable = state.open || state.inline || store.track().positionerElement?.hidden === false;
1100
1124
  if (pending.hasQuery) {
1101
- if (state.highlight && listIsNavigable) store.setActiveIndex(0);
1125
+ if (state.values.length === 0 && !hasItems() && !hasFilteredItemsProp()) return;
1126
+ if (state.highlight && listIsNavigable) {
1127
+ store.setActiveIndex(0);
1128
+ activeIndex = 0;
1129
+ }
1102
1130
  pendingQueryHighlight = null;
1103
1131
  } else if (String(state.input).trim() === "") {
1104
1132
  pendingQueryHighlight = null;
1105
1133
  if (listIsNavigable) {
1106
1134
  const clearedBySelection = pending.selection;
1107
- if (state.highlight === "always" && !clearedBySelection && selectionMode() === "none") store.setActiveIndex(0);
1135
+ if (state.highlight === "always" && !clearedBySelection && selectionMode() === "none") {
1136
+ store.setActiveIndex(0);
1137
+ activeIndex = 0;
1138
+ }
1108
1139
  queueMicrotask(() => untrack(() => {
1109
1140
  if (!store.open() && !inline() || (inputElement()?.value.trim() ?? "") !== "") return;
1110
1141
  const current = selectedValue();
1111
1142
  const isMultiple = multiple();
1112
- const lastSelected = isMultiple && Array.isArray(current) ? current[current.length - 1] : current;
1113
- const hasSelection = selectionMode() !== "none" && lastSelected != null;
1114
- if (hasSelection || clearedBySelection) store.setActiveIndex(hasSelection ? findSelectionIndex(itemValues(), current, comparator(), isMultiple) : null);
1115
- else if (autoHighlight() === "always") store.setActiveIndex(0);
1143
+ const hasSelection = isMultiple && Array.isArray(current) ? current.length > 0 : selectionMode() !== "none" && current != null;
1144
+ if (hasSelection || clearedBySelection) {
1145
+ const toggledIndex = findItemIndex(itemValues(), pending.toggledValue, comparator());
1146
+ store.setActiveIndex(hasSelection ? toggledIndex !== -1 ? toggledIndex : findSelectionIndex(itemValues(), current, comparator(), isMultiple) : null);
1147
+ } else if (autoHighlight() === "always") store.setActiveIndex(0);
1116
1148
  }));
1117
1149
  }
1118
1150
  }
1119
1151
  }
1120
1152
  if (!state.open && !state.inline) return;
1121
- if (state.activeIndex == null) {
1153
+ if (activeIndex == null) {
1122
1154
  if (state.highlight === "always" && state.values.length > 0) {
1123
1155
  store.setActiveIndex(0);
1124
1156
  return;
@@ -1126,21 +1158,21 @@ function AriaCombobox(props) {
1126
1158
  emitHighlight(void 0, -1, none);
1127
1159
  return;
1128
1160
  }
1129
- if (state.activeIndex >= state.values.length) {
1161
+ if (activeIndex >= state.values.length) {
1130
1162
  emitHighlight(void 0, -1, none);
1131
1163
  store.setActiveIndex(null);
1132
1164
  return;
1133
1165
  }
1134
- const itemValue = state.values[state.activeIndex];
1166
+ const itemValue = state.values[activeIndex];
1135
1167
  const previousValue = lastHighlight.value;
1136
1168
  const sameItem = previousValue !== NO_ACTIVE_VALUE && compareItemEquality(itemValue, previousValue, comparator());
1137
- if (lastHighlight.index !== state.activeIndex || !sameItem) emitHighlight(itemValue, state.activeIndex, none);
1169
+ if (lastHighlight.index !== activeIndex || !sameItem) emitHighlight(itemValue, activeIndex, none);
1138
1170
  }
1139
1171
  createEffect(() => ({
1140
1172
  index: store.activeIndex(),
1141
1173
  elements: listElements()
1142
1174
  }), (state) => {
1143
- if (state.index == null || !store.keyboardActive) return;
1175
+ if (state.index == null || lastHighlightType === "pointer") return;
1144
1176
  state.elements[state.index]?.scrollIntoView?.({
1145
1177
  block: "nearest",
1146
1178
  inline: "nearest"
@@ -1162,9 +1194,12 @@ function AriaCombobox(props) {
1162
1194
  const pending = pendingInitialHighlight;
1163
1195
  pendingInitialHighlight = null;
1164
1196
  if (store.activeIndex() != null || queryChangedAfterOpen()) return;
1165
- const selected = selectionMode() === "none" ? null : store.selectedIndex();
1197
+ const selected = selectionMode() === "none" ? null : findSelectionIndex(itemValues(), selectedValue(), comparator(), multiple());
1166
1198
  if (selected != null) {
1167
- setIndices({ activeIndex: selected });
1199
+ setIndices({
1200
+ activeIndex: selected,
1201
+ selectedIndex: selected
1202
+ });
1168
1203
  return;
1169
1204
  }
1170
1205
  if (pending && (selectionMode() !== "none" || autoHighlight() !== false)) {
@@ -1204,7 +1239,7 @@ function AriaCombobox(props) {
1204
1239
  setQueryChangedAfterOpen(true);
1205
1240
  });
1206
1241
  function syncInputToSelectedLabel() {
1207
- const label = stringifyAsLabel(selectedValue(), props.itemToStringLabel);
1242
+ const label = resolveLabel(selectedValue());
1208
1243
  if (inputValue() !== label) setInputValue(label, createChangeEventDetails(none));
1209
1244
  }
1210
1245
  createEffect(() => ({
@@ -1236,10 +1271,11 @@ function AriaCombobox(props) {
1236
1271
  field.validation.change(state.input);
1237
1272
  });
1238
1273
  });
1239
- createEffect(() => props.items, (items) => {
1240
- const previous = previousItems;
1241
- previousItems = items;
1242
- if (previous === items) return;
1274
+ createEffect(() => ({
1275
+ items: props.items,
1276
+ label: selectedLabelString()
1277
+ }), (current, previous) => {
1278
+ if (!previous || current.items === previous.items && current.label === previous.label) return;
1243
1279
  untrack(() => {
1244
1280
  if (!single() || hasInputValueProp || store.inputInsidePopup() || queryChangedAfterOpen()) return;
1245
1281
  syncInputToSelectedLabel();
@@ -1269,7 +1305,7 @@ function AriaCombobox(props) {
1269
1305
  if (!setOpen(true, createChangeEventDetails("list-navigation", event, triggerElement() ?? void 0))) pendingInitialHighlight = null;
1270
1306
  }
1271
1307
  function handleNavigationKeyDown(event) {
1272
- if (readOnly() || disabled()) return;
1308
+ if (disabled()) return;
1273
1309
  if (!store.open() && !inline()) {
1274
1310
  if (event.key !== "ArrowDown" && event.key !== "ArrowUp") return;
1275
1311
  event.preventDefault();
@@ -1411,8 +1447,13 @@ function ComboboxTrigger(props) {
1411
1447
  return context.store.listElement()?.id;
1412
1448
  });
1413
1449
  const ariaLabelledBy = createMemo(() => internalProps["aria-labelledby"] ?? labelable.labelId() ?? context.store.labelId());
1450
+ const ariaDescribedBy = createMemo(() => {
1451
+ const external = internalProps["aria-describedby"];
1452
+ return external === false ? false : labelable.getAriaDescribedBy(external);
1453
+ });
1414
1454
  const state = createMemo(() => ({
1415
1455
  ...context.field.state(),
1456
+ readOnly: context.readOnly(),
1416
1457
  open: context.store.open(),
1417
1458
  disabled: disabled(),
1418
1459
  popupSide: context.store.resolvedPopupSide(),
@@ -1422,17 +1463,17 @@ function ComboboxTrigger(props) {
1422
1463
  const classValue = createMemo(() => resolveClass(props.class, state()));
1423
1464
  const styleValue = createMemo(() => resolveStyle(props.style, state()));
1424
1465
  const stateAttributes = createMemo(() => getStateAttributesProps(state(), comboboxControlStateMapping));
1425
- const others = omit(allProps, "aria-labelledby", "as", "class", "disabled", "id", "nativeButton", "onBlur", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "onPointerEnter", "ref", "style");
1466
+ const others = omit(allProps, "aria-describedby", "aria-labelledby", "render", "class", "disabled", "id", "nativeButton", "onBlur", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "onPointerEnter", "ref", "style");
1426
1467
  const click = createClickInteraction({
1427
1468
  context: context.store.context.floatingRoot,
1428
- enabled: () => !context.readOnly() && !context.disabled(),
1469
+ enabled: () => !context.disabled(),
1429
1470
  event: () => "mousedown"
1430
1471
  });
1431
1472
  const typeahead = createTypeahead({
1432
1473
  context: context.store.context.floatingRoot,
1433
1474
  enabled: () => !context.store.open() && !context.readOnly() && !context.disabled() && context.selectionMode() === "single",
1434
- list: () => context.store.collection.labels(),
1435
- elements: () => context.store.collection.elements(),
1475
+ list: context.itemLabels,
1476
+ disabledIndices: () => context.store.collection.disabledIndices(),
1436
1477
  activeIndex: context.store.activeIndex,
1437
1478
  selectedIndex: context.store.selectedIndex,
1438
1479
  onMatch(index) {
@@ -1450,7 +1491,7 @@ function ComboboxTrigger(props) {
1450
1491
  }
1451
1492
  function handleFocus() {
1452
1493
  context.field.setFocused(true);
1453
- if (disabled() || context.readOnly()) return;
1494
+ if (disabled()) return;
1454
1495
  clearTimeout(focusTimer);
1455
1496
  focusTimer = setTimeout(() => context.forceMount(), 0);
1456
1497
  }
@@ -1478,7 +1519,7 @@ function ComboboxTrigger(props) {
1478
1519
  removeMouseUp = () => documentNode.removeEventListener("mouseup", onMouseUp);
1479
1520
  }
1480
1521
  function handleMouseDown(event) {
1481
- if (disabled() || context.readOnly()) return;
1522
+ if (disabled()) return;
1482
1523
  const trigger = event.currentTarget;
1483
1524
  if (!insidePopup()) context.store.context.floatingRoot.update({ domReferenceElement: trigger });
1484
1525
  context.forceMount();
@@ -1497,7 +1538,7 @@ function ComboboxTrigger(props) {
1497
1538
  click.onClick(event);
1498
1539
  }
1499
1540
  function handleKeyDown(event) {
1500
- if (context.readOnly()) return;
1541
+ if (disabled()) return;
1501
1542
  typeahead.onKeyDown(event);
1502
1543
  if (event.key === "ArrowDown" || event.key === "ArrowUp") {
1503
1544
  event.preventDefault();
@@ -1507,14 +1548,14 @@ function ComboboxTrigger(props) {
1507
1548
  context.focusInput();
1508
1549
  }
1509
1550
  }
1510
- const onBlur = composeEventHandlers(() => internalProps.onBlur, () => handleBlur);
1511
- const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onClick, () => handleClick);
1512
- const onFocus = composeEventHandlers(() => internalProps.onFocus, () => handleFocus);
1513
- const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0), () => internalProps.onKeyDown, () => handleKeyDown, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown));
1514
- const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
1515
- const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onMouseDown, () => handleMouseDown);
1516
- const onPointerDown = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onPointerDown, () => handlePointerDown);
1517
- const onPointerEnter = composeEventHandlers(() => internalProps.onPointerEnter, () => (event) => {
1551
+ const onBlur = composeEventHandlers(liveEventHandler(() => internalProps.onBlur), handleBlur);
1552
+ const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onClick), handleClick);
1553
+ const onFocus = composeEventHandlers(liveEventHandler(() => internalProps.onFocus), handleFocus);
1554
+ const onKeyDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0)), liveEventHandler(() => internalProps.onKeyDown), handleKeyDown, liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown)));
1555
+ const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onKeyUp), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp)));
1556
+ const onMouseDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onMouseDown), handleMouseDown);
1557
+ const onPointerDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onPointerDown), handlePointerDown);
1558
+ const onPointerEnter = composeEventHandlers(liveEventHandler(() => internalProps.onPointerEnter), (event) => {
1518
1559
  pointerType = event.pointerType || "";
1519
1560
  });
1520
1561
  createEffect(() => ({
@@ -1533,10 +1574,7 @@ function ComboboxTrigger(props) {
1533
1574
  removeMouseUp?.();
1534
1575
  labelable.registerControlId(labelSource, void 0);
1535
1576
  });
1536
- return Dynamic(mergeProps({
1537
- get component() {
1538
- return props.as ?? "button";
1539
- },
1577
+ return useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true))(mergeProps({
1540
1578
  ref: [((value) => setElement(value)), internalProps.ref],
1541
1579
  get id() {
1542
1580
  return id();
@@ -1568,9 +1606,15 @@ function ComboboxTrigger(props) {
1568
1606
  get ["aria-required"]() {
1569
1607
  return insidePopup() && context.required() ? "true" : void 0;
1570
1608
  },
1609
+ get ["aria-readonly"]() {
1610
+ return insidePopup() && context.readOnly() ? "true" : void 0;
1611
+ },
1571
1612
  get ["aria-labelledby"]() {
1572
1613
  return ariaLabelledBy();
1573
1614
  },
1615
+ get ["aria-describedby"]() {
1616
+ return ariaDescribedBy();
1617
+ },
1574
1618
  get ["aria-invalid"]() {
1575
1619
  return state().valid === false && !disabled() ? "true" : void 0;
1576
1620
  },
@@ -1748,7 +1792,11 @@ function ComboboxInput(props) {
1748
1792
  const activeIndex = context.store.activeIndex();
1749
1793
  return activeIndex == null ? void 0 : `${context.id()}-${activeIndex}`;
1750
1794
  });
1751
- const others = omit(allProps, "as", "class", "disabled", "id", "onBlur", "onCompositionEnd", "onCompositionStart", "onFocus", "onInput", "onKeyDown", "onMouseDown", "onPointerDown", "onPointerMove", "ref", "style");
1795
+ const ariaDescribedBy = createMemo(() => {
1796
+ const external = internalProps["aria-describedby"];
1797
+ return hasPositionerParent || external === false ? external : labelable.getAriaDescribedBy(external);
1798
+ });
1799
+ const others = omit(allProps, "aria-describedby", "render", "class", "disabled", "id", "onBlur", "onCompositionEnd", "onCompositionStart", "onFocus", "onInput", "onKeyDown", "onMouseDown", "onPointerDown", "onPointerMove", "ref", "style");
1752
1800
  function clearHighlight() {
1753
1801
  context.setIndices({
1754
1802
  activeIndex: null,
@@ -1785,6 +1833,14 @@ function ComboboxInput(props) {
1785
1833
  const next = event.currentTarget.value;
1786
1834
  setComposingValue(null);
1787
1835
  context.setInputValue(next, createChangeEventDetails(inputChange, event));
1836
+ restoreAcceptedInputValue(event.currentTarget);
1837
+ }
1838
+ function restoreAcceptedInputValue(input) {
1839
+ queueMicrotask(() => untrack(() => {
1840
+ if (composing || context.inputElement() !== input) return;
1841
+ const accepted = context.inputValue();
1842
+ if (input.value !== accepted) input.value = accepted;
1843
+ }));
1788
1844
  }
1789
1845
  function maybeOpenOnInput(trimmed, event, shouldOpen) {
1790
1846
  if (context.readOnly() || disabled() || !trimmed || !shouldOpen) return;
@@ -1807,7 +1863,10 @@ function ComboboxInput(props) {
1807
1863
  }
1808
1864
  const changeDetails = createChangeEventDetails(inputChange, event);
1809
1865
  context.setInputValue(input.value, changeDetails);
1810
- if (changeDetails.isCanceled) return;
1866
+ if (changeDetails.isCanceled) {
1867
+ input.value = context.inputValue();
1868
+ return;
1869
+ }
1811
1870
  const empty = input.value === "";
1812
1871
  const clearDetails = createChangeEventDetails(inputClear, event);
1813
1872
  if (empty && !context.store.inputInsidePopup()) {
@@ -1816,6 +1875,7 @@ function ComboboxInput(props) {
1816
1875
  }
1817
1876
  maybeOpenOnInput(input.value.trim(), event, shouldOpenOnInput);
1818
1877
  if (context.store.open() && context.store.activeIndex() !== null && !context.autoHighlight()) clearHighlight();
1878
+ restoreAcceptedInputValue(input);
1819
1879
  }
1820
1880
  /** Chip highlight movement driven from the input, which owns real focus. */
1821
1881
  function resolveChipIndex(event) {
@@ -1859,10 +1919,16 @@ function ComboboxInput(props) {
1859
1919
  function handleKeyDown(event) {
1860
1920
  const editable = !disabled() && !context.readOnly();
1861
1921
  const modified = event.ctrlKey || event.shiftKey || event.altKey || event.metaKey;
1862
- if (editable && !modified) context.store.keyboardActive = true;
1922
+ if (!disabled() && !modified) context.store.keyboardActive = true;
1863
1923
  if (!(context.grid() && context.store.activeIndex() == null && (event.key === "ArrowLeft" || event.key === "ArrowRight"))) context.listNavigation.onKeyDown(event);
1864
1924
  context.dismiss.onKeyDown(event);
1865
- if (!editable || modified) return;
1925
+ if (!editable || modified) {
1926
+ if (context.readOnly() && event.key === "Enter" && context.store.open() && context.store.activeIndex() !== null) {
1927
+ event.preventDefault();
1928
+ event.stopPropagation();
1929
+ }
1930
+ return;
1931
+ }
1866
1932
  const input = event.currentTarget;
1867
1933
  const isRTL = direction() === "rtl";
1868
1934
  if (event.key === "Home" || event.key === "End") {
@@ -1870,7 +1936,7 @@ function ComboboxInput(props) {
1870
1936
  event.stopPropagation();
1871
1937
  const scrollAmount = input.scrollWidth - input.clientWidth;
1872
1938
  const atStart = event.key === "Home";
1873
- const cursor = isGecko() && isRTL === atStart ? input.value.length : atStart ? 0 : input.value.length;
1939
+ const cursor = (isGecko() && isRTL ? !atStart : atStart) ? 0 : input.value.length;
1874
1940
  input.setSelectionRange(cursor, cursor);
1875
1941
  input.scrollLeft = atStart ? 0 : isRTL ? -scrollAmount : scrollAmount;
1876
1942
  return;
@@ -1910,18 +1976,18 @@ function ComboboxInput(props) {
1910
1976
  function markPointerActive() {
1911
1977
  context.store.keyboardActive = false;
1912
1978
  }
1913
- const onBlur = composeEventHandlers(() => internalProps.onBlur, () => handleBlur);
1914
- const onCompositionEnd = composeEventHandlers(() => internalProps.onCompositionEnd, () => handleCompositionEnd);
1915
- const onCompositionStart = composeEventHandlers(() => internalProps.onCompositionStart, () => handleCompositionStart);
1916
- const onFocus = composeEventHandlers(() => internalProps.onFocus, () => handleFocus);
1917
- const onInput = composeEventHandlers(() => internalProps.onInput, () => handleInput);
1918
- const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, () => handleKeyDown);
1919
- const onMouseDown = composeEventHandlers(() => internalProps.onMouseDown, () => (event) => context.click.onMouseDown(event));
1920
- const onPointerDown = composeEventHandlers(() => internalProps.onPointerDown, () => (event) => {
1979
+ const onBlur = composeEventHandlers(liveEventHandler(() => internalProps.onBlur), handleBlur);
1980
+ const onCompositionEnd = composeEventHandlers(liveEventHandler(() => internalProps.onCompositionEnd), handleCompositionEnd);
1981
+ const onCompositionStart = composeEventHandlers(liveEventHandler(() => internalProps.onCompositionStart), handleCompositionStart);
1982
+ const onFocus = composeEventHandlers(liveEventHandler(() => internalProps.onFocus), handleFocus);
1983
+ const onInput = composeEventHandlers(liveEventHandler(() => internalProps.onInput), handleInput);
1984
+ const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), handleKeyDown);
1985
+ const onMouseDown = composeEventHandlers(liveEventHandler(() => internalProps.onMouseDown), (event) => context.click.onMouseDown(event));
1986
+ const onPointerDown = composeEventHandlers(liveEventHandler(() => internalProps.onPointerDown), (event) => {
1921
1987
  markPointerActive();
1922
1988
  context.click.onPointerDown(event);
1923
1989
  });
1924
- const onPointerMove = composeEventHandlers(() => internalProps.onPointerMove, () => markPointerActive);
1990
+ const onPointerMove = composeEventHandlers(liveEventHandler(() => internalProps.onPointerMove), markPointerActive);
1925
1991
  createEffect(() => ({
1926
1992
  insidePopup: insidePopup(),
1927
1993
  owns: inputOwnsFormValue()
@@ -1934,6 +2000,15 @@ function ComboboxInput(props) {
1934
2000
  if (untrack(context.inputElement) === element) context.setInputElement(null);
1935
2001
  });
1936
2002
  let element = null;
2003
+ const Render = useRender(props, () => state(), (props) => ssrElement("input", props, void 0, true));
2004
+ const InputScope = (props) => hasPositionerParent ? FieldRootContext({
2005
+ value: DEFAULT_FIELD_ROOT_CONTEXT,
2006
+ get children() {
2007
+ return props.children;
2008
+ }
2009
+ }) : memo(() => {
2010
+ return escape(props.children);
2011
+ });
1937
2012
  return [Show({
1938
2013
  get when() {
1939
2014
  return memo(() => {
@@ -1945,76 +2020,75 @@ function ComboboxInput(props) {
1945
2020
  context.store.startDismissElement = node;
1946
2021
  } });
1947
2022
  }
1948
- }), Dynamic(mergeProps({
1949
- get component() {
1950
- return props.as ?? "input";
1951
- },
1952
- ref: [((value) => {
1953
- element = value;
1954
- context.setInputElement(value);
1955
- }), internalProps.ref],
1956
- get id() {
1957
- return id();
1958
- },
1959
- get value() {
1960
- return composingValue() ?? context.inputValue();
1961
- },
1962
- get disabled() {
1963
- return disabled();
1964
- },
1965
- get readonly() {
1966
- return context.readOnly();
1967
- },
1968
- get required() {
1969
- return memo(() => {
1970
- return context.selectionMode() === "none";
1971
- })() ? context.required() : void 0;
1972
- },
1973
- get form() {
1974
- return context.form();
1975
- },
1976
- get name() {
1977
- return memo(() => {
1978
- return !!inputOwnsFormValue();
1979
- })() ? context.name() : void 0;
1980
- },
1981
- get ["aria-readonly"]() {
1982
- return context.readOnly() ? "true" : void 0;
1983
- },
1984
- get ["aria-required"]() {
1985
- return context.required() ? "true" : void 0;
1986
- },
1987
- get ["aria-labelledby"]() {
1988
- return labelable.labelId();
1989
- },
1990
- get ["aria-describedby"]() {
1991
- return labelable.getAriaDescribedBy(void 0);
1992
- },
1993
- get ["aria-activedescendant"]() {
1994
- return activeDescendant();
1995
- },
1996
- get ["aria-invalid"]() {
1997
- return state().valid === false && !disabled() ? "true" : void 0;
1998
- },
1999
- "data-base-ui-click-trigger": "",
2000
- get ["class"]() {
2001
- return classValue();
2002
- },
2003
- get style() {
2004
- return styleValue();
2005
- },
2006
- onBlur,
2007
- onCompositionEnd,
2008
- onCompositionStart,
2009
- onFocus,
2010
- onInput,
2011
- onKeyDown,
2012
- onMouseDown,
2013
- onPointerDown,
2014
- onPointerMove
2015
- }, () => {
2016
- return context.referenceAria();
2017
- }, stateAttributes, others))];
2023
+ }), InputScope({ get children() {
2024
+ return Render(mergeProps({
2025
+ ref: [((value) => {
2026
+ element = value;
2027
+ context.setInputElement(value);
2028
+ }), internalProps.ref],
2029
+ get id() {
2030
+ return id();
2031
+ },
2032
+ get value() {
2033
+ return composingValue() ?? context.inputValue();
2034
+ },
2035
+ get disabled() {
2036
+ return disabled();
2037
+ },
2038
+ get readonly() {
2039
+ return context.readOnly();
2040
+ },
2041
+ get required() {
2042
+ return memo(() => {
2043
+ return context.selectionMode() === "none";
2044
+ })() ? context.required() : void 0;
2045
+ },
2046
+ get form() {
2047
+ return context.form();
2048
+ },
2049
+ get name() {
2050
+ return memo(() => {
2051
+ return !!inputOwnsFormValue();
2052
+ })() ? context.name() : void 0;
2053
+ },
2054
+ get ["aria-readonly"]() {
2055
+ return context.readOnly() ? "true" : void 0;
2056
+ },
2057
+ get ["aria-required"]() {
2058
+ return context.required() ? "true" : void 0;
2059
+ },
2060
+ get ["aria-labelledby"]() {
2061
+ return labelable.labelId();
2062
+ },
2063
+ get ["aria-describedby"]() {
2064
+ return ariaDescribedBy();
2065
+ },
2066
+ get ["aria-activedescendant"]() {
2067
+ return activeDescendant();
2068
+ },
2069
+ get ["aria-invalid"]() {
2070
+ return state().valid === false && !disabled() ? "true" : void 0;
2071
+ },
2072
+ "data-base-ui-click-trigger": "",
2073
+ get ["class"]() {
2074
+ return classValue();
2075
+ },
2076
+ get style() {
2077
+ return styleValue();
2078
+ },
2079
+ onBlur,
2080
+ onCompositionEnd,
2081
+ onCompositionStart,
2082
+ onFocus,
2083
+ onInput,
2084
+ onKeyDown,
2085
+ onMouseDown,
2086
+ onPointerDown,
2087
+ onPointerMove
2088
+ }, () => {
2089
+ return context.referenceAria();
2090
+ }, stateAttributes, others));
2091
+ } })];
2018
2092
  }
2019
2093
  function isGecko() {
2020
2094
  return typeof navigator !== "undefined" && navigator.userAgent.includes("Firefox");
@@ -2025,8 +2099,8 @@ function isGecko() {
2025
2099
  * Routes a press anywhere in the input's surroundings back to the input, so clicking the padding
2026
2100
  * of an input group or the empty space beside the chips focuses and opens the combobox.
2027
2101
  */
2028
- function handleInputPress(event, context, disabled, readOnly, shouldIgnoreTarget) {
2029
- if (event.baseUIHandlerPrevented || readOnly) return;
2102
+ function handleInputPress(event, context, disabled, shouldIgnoreTarget) {
2103
+ if (event.baseUIHandlerPrevented) return;
2030
2104
  const target = event.target;
2031
2105
  const targetElement = isElement(target) ? target : null;
2032
2106
  if (targetElement !== event.currentTarget && (shouldIgnoreTarget?.(targetElement) || isInteractiveElement(targetElement))) return;
@@ -2054,16 +2128,13 @@ function ComboboxInputGroup(props) {
2054
2128
  const classValue = createMemo(() => resolveClass(props.class, state()));
2055
2129
  const styleValue = createMemo(() => resolveStyle(props.style, state()));
2056
2130
  const stateAttributes = createMemo(() => getStateAttributesProps(state(), comboboxControlStateMapping));
2057
- const others = omit(allProps, "as", "class", "onMouseDown", "ref", "style");
2058
- const onMouseDown = composeEventHandlers(() => internalProps.onMouseDown, () => (event) => handleInputPress(event, context, context.disabled(), context.readOnly(), (target) => contains(context.store.chipsContainerElement, target)));
2131
+ const others = omit(allProps, "render", "class", "onMouseDown", "ref", "style");
2132
+ const onMouseDown = composeEventHandlers(liveEventHandler(() => internalProps.onMouseDown), (event) => handleInputPress(event, context, context.disabled(), (target) => contains(context.store.chipsContainerElement, target)));
2059
2133
  onCleanup(() => {
2060
2134
  if (untrack(context.inputGroupElement) === element) context.setInputGroupElement(null);
2061
2135
  });
2062
2136
  let element = null;
2063
- return Dynamic(mergeProps({
2064
- get component() {
2065
- return props.as ?? "div";
2066
- },
2137
+ return useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true))(mergeProps({
2067
2138
  ref: [((value) => {
2068
2139
  element = value;
2069
2140
  context.setInputGroupElement(value);
@@ -2089,44 +2160,19 @@ function ComboboxIcon(props) {
2089
2160
  const classValue = createMemo(() => resolveClass(props.class, state()));
2090
2161
  const styleValue = createMemo(() => resolveStyle(props.style, state()));
2091
2162
  const stateAttributes = createMemo(() => getStateAttributesProps(state(), triggerOpenStateMapping));
2092
- const others = omit(allProps, "as", "class", "ref", "style");
2093
- return Show({
2094
- get when() {
2095
- return props.as;
2096
- },
2097
- get fallback() {
2098
- return ssrElement("span", () => {
2099
- return mergeProps({
2100
- "aria-hidden": "true",
2101
- get ["class"]() {
2102
- return classValue();
2103
- },
2104
- get style() {
2105
- return styleValue();
2106
- }
2107
- }, stateAttributes, others);
2108
- }, () => {
2109
- return () => {
2110
- return escape(props.children ?? "▼");
2111
- };
2112
- }, true);
2163
+ const others = omit(allProps, "render", "class", "ref", "style");
2164
+ return useRender(props, () => state(), (props) => ssrElement("span", props, void 0, true))(mergeProps({
2165
+ ref: [internalProps.ref],
2166
+ "aria-hidden": "true",
2167
+ get ["class"]() {
2168
+ return classValue();
2113
2169
  },
2114
- children: (component) => Dynamic(mergeProps({
2115
- get component() {
2116
- return component();
2117
- },
2118
- ref: [internalProps.ref],
2119
- "aria-hidden": "true",
2120
- get ["class"]() {
2121
- return classValue();
2122
- },
2123
- get style() {
2124
- return styleValue();
2125
- }
2126
- }, stateAttributes, others, { get children() {
2127
- return props.children ?? "▼";
2128
- } }))
2129
- });
2170
+ get style() {
2171
+ return styleValue();
2172
+ }
2173
+ }, stateAttributes, others, { get children() {
2174
+ return props.children ?? "▼";
2175
+ } }));
2130
2176
  }
2131
2177
  //#endregion
2132
2178
  //#region src/combobox/clear/ComboboxClear.tsx
@@ -2154,7 +2200,7 @@ function ComboboxClear(props) {
2154
2200
  const classValue = createMemo(() => resolveClass(props.class, state()));
2155
2201
  const styleValue = createMemo(() => resolveStyle(props.style, state()));
2156
2202
  const stateAttributes = createMemo(() => getStateAttributesProps(state(), comboboxClearStateMapping));
2157
- const others = omit(allProps, "as", "class", "disabled", "keepMounted", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "ref", "style");
2203
+ const others = omit(allProps, "render", "class", "disabled", "keepMounted", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "ref", "style");
2158
2204
  let element = null;
2159
2205
  createEffect(() => ({
2160
2206
  visible: visible(),
@@ -2173,7 +2219,7 @@ function ComboboxClear(props) {
2173
2219
  const type = context.store.keyboardActive ? keyboard : pointer;
2174
2220
  context.setInputValue("", createChangeEventDetails(clearPress, event));
2175
2221
  if (context.selectionMode() !== "none") {
2176
- context.setSelectedValue(Array.isArray(context.selectedValue()) ? [] : null, createChangeEventDetails(clearPress, event));
2222
+ context.setSelectedValue(context.multiple() ? [] : null, createChangeEventDetails(clearPress, event));
2177
2223
  context.setIndices({
2178
2224
  activeIndex: null,
2179
2225
  selectedIndex: null,
@@ -2185,19 +2231,17 @@ function ComboboxClear(props) {
2185
2231
  });
2186
2232
  context.focusInput();
2187
2233
  }
2188
- const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onClick, () => handleClick);
2189
- const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown));
2190
- const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
2191
- const onMouseDown = composeEventHandlers(() => internalProps.onMouseDown, () => (event) => event.preventDefault());
2234
+ const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onClick), handleClick);
2235
+ const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown)));
2236
+ const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onKeyUp), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp)));
2237
+ const onMouseDown = composeEventHandlers(liveEventHandler(() => internalProps.onMouseDown), (event) => event.preventDefault());
2238
+ const Render = useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true));
2192
2239
  return Show({
2193
2240
  get when() {
2194
2241
  return shouldRender();
2195
2242
  },
2196
2243
  get children() {
2197
- return Dynamic(mergeProps({
2198
- get component() {
2199
- return props.as ?? "button";
2200
- },
2244
+ return Render(mergeProps({
2201
2245
  ref: [((value) => {
2202
2246
  element = value;
2203
2247
  context.store.clearElement = value;
@@ -2266,7 +2310,7 @@ function ComboboxList(props) {
2266
2310
  const state = createMemo(() => ({ empty: context.listEmpty() }));
2267
2311
  const classValue = createMemo(() => resolveClass(props.class, state()));
2268
2312
  const styleValue = createMemo(() => resolveStyle(props.style, state()));
2269
- const others = omit(allProps, "as", "children", "class", "id", "onKeyDown", "ref", "style");
2313
+ const others = omit(allProps, "render", "children", "class", "id", "onKeyDown", "ref", "style");
2270
2314
  function handleKeyDown(event) {
2271
2315
  if (context.disabled() || context.readOnly()) return;
2272
2316
  context.store.keyboardActive = true;
@@ -2277,7 +2321,7 @@ function ComboboxList(props) {
2277
2321
  event.stopPropagation();
2278
2322
  context.clickHighlightedItem(activeIndex, event);
2279
2323
  }
2280
- const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, () => handleKeyDown);
2324
+ const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), handleKeyDown);
2281
2325
  const [listElement, setListElement] = createSignal(null, { ownedWrite: true });
2282
2326
  createEffect(listElement, (element) => {
2283
2327
  if (!element) return;
@@ -2301,13 +2345,10 @@ function ComboboxList(props) {
2301
2345
  });
2302
2346
  const children = createMemo(() => {
2303
2347
  const child = props.children;
2304
- if (typeof child === "function" && !isSolidAccessor(child)) return ComboboxCollection({ children: child });
2348
+ if (typeof child === "function" && !isSolidAccessor(child) && !("$ll" in child)) return ComboboxCollection({ children: child });
2305
2349
  return child;
2306
2350
  });
2307
- return Dynamic(mergeProps({
2308
- get component() {
2309
- return props.as ?? "div";
2310
- },
2351
+ return useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true))(mergeProps({
2311
2352
  ref: [((element) => {
2312
2353
  setListElement(element);
2313
2354
  context.store.setListElement(element);
@@ -2323,6 +2364,9 @@ function ComboboxList(props) {
2323
2364
  get ["aria-multiselectable"]() {
2324
2365
  return context.multiple() ? "true" : void 0;
2325
2366
  },
2367
+ get ["aria-readonly"]() {
2368
+ return !context.grid() && context.readOnly() ? "true" : void 0;
2369
+ },
2326
2370
  get ["class"]() {
2327
2371
  return classValue();
2328
2372
  },
@@ -2388,13 +2432,10 @@ function ComboboxStatus(props) {
2388
2432
  const state = {};
2389
2433
  const classValue = createMemo(() => resolveClass(props.class, state));
2390
2434
  const styleValue = createMemo(() => resolveStyle(props.style, state));
2391
- const others = omit(allProps, "as", "class", "ref", "style");
2435
+ const others = omit(allProps, "render", "class", "ref", "style");
2392
2436
  const [element, setElement] = createSignal(null, { ownedWrite: true });
2393
2437
  createInitialLiveRegionTextMutation(element);
2394
- return Dynamic(mergeProps({
2395
- get component() {
2396
- return props.as ?? "div";
2397
- },
2438
+ return useRender(props, () => state, (props) => ssrElement("div", props, void 0, true))(mergeProps({
2398
2439
  ref: [((value) => setElement(value)), internalProps.ref],
2399
2440
  role: "status",
2400
2441
  "aria-live": "polite",
@@ -2432,7 +2473,7 @@ function ComboboxPortal(props) {
2432
2473
  const state = {};
2433
2474
  const classValue = createMemo(() => resolveClass(props.class, state));
2434
2475
  const styleValue = createMemo(() => resolveStyle(props.style, state));
2435
- const others = omit(allProps, "as", "class", "container", "keepMounted", "ref", "style");
2476
+ const others = omit(allProps, "render", "class", "container", "keepMounted", "ref", "style");
2436
2477
  return Show({
2437
2478
  get when() {
2438
2479
  return shouldRender();
@@ -2440,12 +2481,12 @@ function ComboboxPortal(props) {
2440
2481
  get children() {
2441
2482
  return ComboboxPortalContext({
2442
2483
  get value() {
2443
- return keepMounted();
2484
+ return untrack(keepMounted);
2444
2485
  },
2445
2486
  get children() {
2446
2487
  return PopupPortal(mergeProps({
2447
- get as() {
2448
- return props.as;
2488
+ get render() {
2489
+ return props.render;
2449
2490
  },
2450
2491
  get container() {
2451
2492
  return internalProps.container;
@@ -2482,11 +2523,8 @@ function ComboboxBackdrop(props) {
2482
2523
  "-webkit-user-select": "none"
2483
2524
  }, resolveStyle(props.style, state())));
2484
2525
  const stateAttributes = createMemo(() => getStateAttributesProps(state(), comboboxBackdropStateMapping));
2485
- const others = omit(allProps, "as", "class", "ref", "style");
2486
- return Dynamic(mergeProps({
2487
- get component() {
2488
- return props.as ?? "div";
2489
- },
2526
+ const others = omit(allProps, "render", "class", "ref", "style");
2527
+ return useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true))(mergeProps({
2490
2528
  ref: [internalProps.ref],
2491
2529
  role: "presentation",
2492
2530
  get hidden() {
@@ -2551,7 +2589,7 @@ function ComboboxPositioner(props) {
2551
2589
  transition: context.store.track().transitionStatus === "starting" ? "none" : void 0
2552
2590
  }, resolveStyle(props.style, state())));
2553
2591
  const stateAttributes = createMemo(() => getStateAttributesProps(state(), comboboxPositionerStateMapping));
2554
- const others = omit(allProps, "align", "alignOffset", "anchor", "arrowPadding", "as", "class", "collisionAvoidance", "collisionBoundary", "collisionPadding", "disableAnchorTracking", "positionMethod", "ref", "side", "sideOffset", "sticky", "style");
2592
+ const others = omit(allProps, "align", "alignOffset", "anchor", "arrowPadding", "render", "class", "collisionAvoidance", "collisionBoundary", "collisionPadding", "disableAnchorTracking", "positionMethod", "ref", "side", "sideOffset", "sticky", "style");
2555
2593
  createAnchoredPopupScrollLock({
2556
2594
  enabled: () => context.store.open() && context.modal(),
2557
2595
  touchOpen: () => context.store.openMethod() === "touch",
@@ -2585,6 +2623,7 @@ function ComboboxPositioner(props) {
2585
2623
  }
2586
2624
  });
2587
2625
  }
2626
+ const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
2588
2627
  return ComboboxPositionerContext({
2589
2628
  value: positionerContext,
2590
2629
  get children() {
@@ -2597,10 +2636,7 @@ function ComboboxPositioner(props) {
2597
2636
  get children() {
2598
2637
  return ModalBackdrop({});
2599
2638
  }
2600
- }), Dynamic(mergeProps({
2601
- get component() {
2602
- return props.as ?? "div";
2603
- },
2639
+ }), Render(mergeProps({
2604
2640
  ref: [((value) => {
2605
2641
  setElement(value);
2606
2642
  context.store.setPositionerElement(value);
@@ -2648,7 +2684,7 @@ function ComboboxPopup(props) {
2648
2684
  const classValue = createMemo(() => resolveClass(props.class, state()));
2649
2685
  const styleValue = createMemo(() => mergeStyleValue({ transition: state().transitionStatus === "starting" ? "none" : void 0 }, resolveStyle(props.style, state())));
2650
2686
  const stateAttributes = createMemo(() => getStateAttributesProps(state(), comboboxPopupStateMapping));
2651
- const others = omit(allProps, "as", "class", "finalFocus", "id", "initialFocus", "onFocus", "ref", "style");
2687
+ const others = omit(allProps, "render", "class", "finalFocus", "id", "initialFocus", "onFocus", "ref", "style");
2652
2688
  const focusManagerModal = createMemo(() => !context.store.inputInsidePopup() || context.modal());
2653
2689
  const resolvedInitialFocus = createMemo(() => {
2654
2690
  if (internalProps.initialFocus !== void 0) return internalProps.initialFocus;
@@ -2676,6 +2712,7 @@ function ComboboxPopup(props) {
2676
2712
  onCleanup(() => {
2677
2713
  if (context.store.state.popupElement === popupElement) context.store.setPopupElement(null);
2678
2714
  });
2715
+ const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
2679
2716
  return FocusManager({
2680
2717
  get context() {
2681
2718
  return context.store.context.floatingRoot;
@@ -2704,10 +2741,7 @@ function ComboboxPopup(props) {
2704
2741
  referenceElement: () => context.store.inputInsidePopup() ? context.triggerElement() : context.inputElement(),
2705
2742
  getInsideElements: () => [context.store.startDismissElement, context.store.endDismissElement],
2706
2743
  get children() {
2707
- return [Dynamic(mergeProps({
2708
- get component() {
2709
- return props.as ?? "div";
2710
- },
2744
+ return [Render(mergeProps({
2711
2745
  ref: [((element) => {
2712
2746
  popupElement = element;
2713
2747
  context.store.setPopupElement(element);
@@ -2764,15 +2798,12 @@ function ComboboxArrow(props) {
2764
2798
  const classValue = createMemo(() => resolveClass(props.class, state()));
2765
2799
  const styleValue = createMemo(() => mergeStyleValue(positioner.arrowStyles(), resolveStyle(props.style, state())));
2766
2800
  const stateAttributes = createMemo(() => getStateAttributesProps(state(), popupStateMapping));
2767
- const others = omit(allProps, "as", "class", "ref", "style");
2801
+ const others = omit(allProps, "render", "class", "ref", "style");
2768
2802
  let arrow = null;
2769
2803
  onCleanup(() => {
2770
2804
  if (arrow) positioner.setArrowElement(null);
2771
2805
  });
2772
- return Dynamic(mergeProps({
2773
- get component() {
2774
- return props.as ?? "div";
2775
- },
2806
+ return useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true))(mergeProps({
2776
2807
  ref: [((element) => {
2777
2808
  arrow = element;
2778
2809
  positioner.setArrowElement(element);
@@ -2799,13 +2830,15 @@ function useComboboxGroupContext() {
2799
2830
  //#region src/combobox/group/ComboboxGroup.tsx
2800
2831
  /** Groups related items with the corresponding label. */
2801
2832
  function ComboboxGroup(props) {
2833
+ const context = useComboboxRootContext();
2802
2834
  const internalProps = props;
2803
2835
  const allProps = props;
2804
2836
  const [labelId, setLabelId] = createSignal(void 0, { ownedWrite: true });
2805
2837
  const state = {};
2806
2838
  const classValue = createMemo(() => resolveClass(props.class, state));
2807
2839
  const styleValue = createMemo(() => resolveStyle(props.style, state));
2808
- const others = omit(allProps, "as", "class", "items", "ref", "style");
2840
+ const others = omit(allProps, "render", "class", "items", "ref", "style");
2841
+ const Render = useRender(props, () => state, (props) => ssrElement("div", props, void 0, true));
2809
2842
  return ComboboxGroupCollectionContext({
2810
2843
  value: { items: () => internalProps.items },
2811
2844
  get children() {
@@ -2815,12 +2848,11 @@ function ComboboxGroup(props) {
2815
2848
  setLabelId
2816
2849
  },
2817
2850
  get children() {
2818
- return Dynamic(mergeProps({
2819
- get component() {
2820
- return props.as ?? "div";
2821
- },
2851
+ return Render(mergeProps({
2822
2852
  ref: [internalProps.ref],
2823
- role: "group",
2853
+ get role() {
2854
+ return context.grid() ? "rowgroup" : "group";
2855
+ },
2824
2856
  get ["aria-labelledby"]() {
2825
2857
  return labelId();
2826
2858
  },
@@ -2848,21 +2880,19 @@ function ComboboxGroupLabel(props) {
2848
2880
  const state = {};
2849
2881
  const classValue = createMemo(() => resolveClass(props.class, state));
2850
2882
  const styleValue = createMemo(() => resolveStyle(props.style, state));
2851
- const others = omit(allProps, "as", "class", "id", "ref", "style");
2883
+ const others = omit(allProps, "render", "class", "id", "ref", "style");
2852
2884
  createEffect(id, (currentId) => {
2853
2885
  context.setLabelId(currentId);
2854
2886
  return () => {
2855
2887
  if (context.labelId() === currentId) context.setLabelId(void 0);
2856
2888
  };
2857
2889
  });
2858
- return Dynamic(mergeProps({
2859
- get component() {
2860
- return props.as ?? "div";
2861
- },
2890
+ return useRender(props, () => state, (props) => ssrElement("div", props, void 0, true))(mergeProps({
2862
2891
  ref: [internalProps.ref],
2863
2892
  get id() {
2864
2893
  return id();
2865
2894
  },
2895
+ "aria-hidden": "true",
2866
2896
  get ["class"]() {
2867
2897
  return classValue();
2868
2898
  },
@@ -2908,8 +2938,7 @@ function ComboboxItem(props) {
2908
2938
  const declaredIndex = createMemo(() => {
2909
2939
  if (internalProps.index != null) return internalProps.index;
2910
2940
  if (!context.virtualized()) return;
2911
- const derived = findItemIndex(context.flatFilteredItems(), itemValue(), context.comparator());
2912
- return derived === -1 ? void 0 : derived;
2941
+ return findItemIndex(context.itemValues(), itemValue(), context.comparator());
2913
2942
  });
2914
2943
  const unregister = context.store.collection.register({
2915
2944
  token,
@@ -2924,7 +2953,7 @@ function ComboboxItem(props) {
2924
2953
  const selected = createMemo(() => {
2925
2954
  if (!selectable()) return false;
2926
2955
  const current = context.selectedValue();
2927
- if (Array.isArray(current)) return selectedValueIncludes(current, itemValue(), context.comparator());
2956
+ if (context.multiple() && Array.isArray(current)) return selectedValueIncludes(current, itemValue(), context.comparator());
2928
2957
  return compareItemEquality(itemValue(), current, context.comparator());
2929
2958
  });
2930
2959
  const highlighted = createMemo(() => context.store.activeIndex() === index());
@@ -2936,7 +2965,7 @@ function ComboboxItem(props) {
2936
2965
  const classValue = createMemo(() => resolveClass(props.class, state()));
2937
2966
  const styleValue = createMemo(() => resolveStyle(props.style, state()));
2938
2967
  const stateAttributes = createMemo(() => getStateAttributesProps(state()));
2939
- const others = omit(allProps, "as", "class", "disabled", "id", "index", "nativeButton", "onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerLeave", "onPointerMove", "ref", "style", "value");
2968
+ const others = omit(allProps, "render", "class", "disabled", "id", "index", "nativeButton", "onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerLeave", "onPointerMove", "ref", "style", "value");
2940
2969
  function commitSelection(event) {
2941
2970
  if (context.submitOnItemClick()) {
2942
2971
  context.handleSelection(event, itemValue());
@@ -2966,19 +2995,19 @@ function ComboboxItem(props) {
2966
2995
  function handlePointerMove(event) {
2967
2996
  if (event.pointerType === "touch") return;
2968
2997
  context.store.keyboardActive = false;
2969
- if (disabled()) return;
2998
+ if (disabled() || !hasRegistered()) return;
2970
2999
  context.listNavigation.onItemPointerMove(event, index());
2971
3000
  }
2972
3001
  function handlePointerLeave(event) {
2973
3002
  if (context.keepHighlight()) return;
2974
3003
  context.listNavigation.onItemPointerLeave(event);
2975
3004
  }
2976
- const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onClick, () => handleClick);
2977
- const onMouseDown = composeEventHandlers(() => internalProps.onMouseDown, () => handleMouseDown);
2978
- const onMouseUp = composeEventHandlers(() => internalProps.onMouseUp, () => handleMouseUp);
2979
- const onPointerDown = composeEventHandlers(() => internalProps.onPointerDown, () => handlePointerDown);
2980
- const onPointerMove = composeEventHandlers(() => internalProps.onPointerMove, () => handlePointerMove);
2981
- const onPointerLeave = composeEventHandlers(() => internalProps.onPointerLeave, () => handlePointerLeave);
3005
+ const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onClick), handleClick);
3006
+ const onMouseDown = composeEventHandlers(liveEventHandler(() => internalProps.onMouseDown), handleMouseDown);
3007
+ const onMouseUp = composeEventHandlers(liveEventHandler(() => internalProps.onMouseUp), handleMouseUp);
3008
+ const onPointerDown = composeEventHandlers(liveEventHandler(() => internalProps.onPointerDown), handlePointerDown);
3009
+ const onPointerMove = composeEventHandlers(liveEventHandler(() => internalProps.onPointerMove), handlePointerMove);
3010
+ const onPointerLeave = composeEventHandlers(liveEventHandler(() => internalProps.onPointerLeave), handlePointerLeave);
2982
3011
  createEffect(() => ({
2983
3012
  registered: hasRegistered(),
2984
3013
  hasItems: context.hasItems(),
@@ -2988,21 +3017,19 @@ function ComboboxItem(props) {
2988
3017
  compare: context.comparator()
2989
3018
  }), (current) => {
2990
3019
  if (!current.registered || current.hasItems) return;
2991
- const lastSelected = Array.isArray(current.selected) ? current.selected[current.selected.length - 1] : current.selected;
2992
- if (compareItemEquality(current.value, lastSelected, current.compare)) untrack(() => context.store.setSelectedIndex(current.index));
3020
+ untrack(() => context.store.setSelectedIndex(findSelectionIndex(context.store.collection.values(), current.selected, current.compare, context.multiple())));
2993
3021
  });
2994
3022
  createEffect(element, () => context.store.collection.touch());
2995
3023
  onCleanup(unregister);
3024
+ const itemContext = {
3025
+ selected,
3026
+ index
3027
+ };
3028
+ const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
2996
3029
  return ComboboxItemContext({
2997
- value: {
2998
- selected,
2999
- index
3000
- },
3030
+ value: itemContext,
3001
3031
  get children() {
3002
- return Dynamic(mergeProps({
3003
- get component() {
3004
- return props.as ?? "div";
3005
- },
3032
+ return Render(mergeProps({
3006
3033
  ref: [((value) => {
3007
3034
  setElement(value);
3008
3035
  context.store.collection.touch();
@@ -3050,14 +3077,12 @@ function ComboboxRow(props) {
3050
3077
  const state = {};
3051
3078
  const classValue = createMemo(() => resolveClass(props.class, state));
3052
3079
  const styleValue = createMemo(() => resolveStyle(props.style, state));
3053
- const others = omit(allProps, "as", "class", "ref", "style");
3080
+ const others = omit(allProps, "render", "class", "ref", "style");
3081
+ const Render = useRender(props, () => state, (props) => ssrElement("div", props, void 0, true));
3054
3082
  return ComboboxRowContext({
3055
3083
  value: true,
3056
3084
  get children() {
3057
- return Dynamic(mergeProps({
3058
- get component() {
3059
- return props.as ?? "div";
3060
- },
3085
+ return Render(mergeProps({
3061
3086
  ref: [internalProps.ref],
3062
3087
  role: "row",
3063
3088
  get ["class"]() {
@@ -3085,16 +3110,13 @@ function ComboboxEmpty(props) {
3085
3110
  const state = {};
3086
3111
  const classValue = createMemo(() => resolveClass(props.class, state));
3087
3112
  const styleValue = createMemo(() => resolveStyle(props.style, state));
3088
- const others = omit(allProps, "as", "children", "class", "ref", "style");
3113
+ const others = omit(allProps, "render", "children", "class", "ref", "style");
3089
3114
  const [element, setElement] = createSignal(null, { ownedWrite: true });
3090
3115
  createInitialLiveRegionTextMutation(element);
3091
3116
  onCleanup(() => {
3092
3117
  if (context.store.emptyElement === element()) context.store.emptyElement = null;
3093
3118
  });
3094
- return Dynamic(mergeProps({
3095
- get component() {
3096
- return props.as ?? "div";
3097
- },
3119
+ return useRender(props, () => state, (props) => ssrElement("div", props, void 0, true))(mergeProps({
3098
3120
  ref: [((value) => {
3099
3121
  setElement(value);
3100
3122
  context.store.emptyElement = value;
@@ -3130,11 +3152,8 @@ function ComboboxSeparator(props) {
3130
3152
  const classValue = createMemo(() => resolveClass(props.class, state()));
3131
3153
  const styleValue = createMemo(() => resolveStyle(props.style, state()));
3132
3154
  const stateAttributes = createMemo(() => getStateAttributesProps(state()));
3133
- const others = omit(allProps, "as", "class", "orientation", "ref", "style");
3134
- return Dynamic(mergeProps({
3135
- get component() {
3136
- return props.as ?? "div";
3137
- },
3155
+ const others = omit(allProps, "render", "class", "orientation", "ref", "style");
3156
+ return useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true))(mergeProps({
3138
3157
  ref: [internalProps.ref],
3139
3158
  role: "presentation",
3140
3159
  get ["class"]() {
@@ -3154,4 +3173,4 @@ function useFilteredItems() {
3154
3173
  return useComboboxRootContext().filteredItems;
3155
3174
  }
3156
3175
  //#endregion
3157
- export { getFilter as A, getIndexAfterChipRemoval as C, ComboboxTrigger as D, useRequiredComboboxChipsContext as E, resolveMultipleLabels as M, resolveSelectedLabel as N, AriaCombobox as O, stringifyAsLabel as P, getChipNavigationKeys as S, ComboboxChipsContext as T, ComboboxClear as _, ComboboxItem as a, handleInputPress as b, ComboboxGroup as c, ComboboxPositioner as d, ComboboxBackdrop as f, ComboboxCollection as g, ComboboxList as h, ComboboxRow as i, hasNullItemLabel as j, useComboboxRootContext as k, ComboboxArrow as l, ComboboxStatus as m, ComboboxSeparator as n, useComboboxItemContext as o, ComboboxPortal as p, ComboboxEmpty as r, ComboboxGroupLabel as s, useFilteredItems as t, ComboboxPopup as u, ComboboxIcon as v, ComboboxChipRegistry as w, ComboboxInput as x, ComboboxInputGroup as y };
3176
+ export { getFilter as A, getIndexAfterChipRemoval as C, ComboboxTrigger as D, useRequiredComboboxChipsContext as E, stringifyAsLabel as F, hasNullItemLabel as M, resolveMultipleLabels as N, AriaCombobox as O, resolveSelectedLabel as P, getChipNavigationKeys as S, ComboboxChipsContext as T, ComboboxClear as _, ComboboxItem as a, handleInputPress as b, ComboboxGroup as c, ComboboxPositioner as d, ComboboxBackdrop as f, ComboboxCollection as g, ComboboxList as h, ComboboxRow as i, flattenItems as j, useComboboxRootContext as k, ComboboxArrow as l, ComboboxStatus as m, ComboboxSeparator as n, useComboboxItemContext as o, ComboboxPortal as p, ComboboxEmpty as r, ComboboxGroupLabel as s, useFilteredItems as t, ComboboxPopup as u, ComboboxIcon as v, ComboboxChipRegistry as w, ComboboxInput as x, ComboboxInputGroup as y };