@base-ui/react 1.0.0 → 1.1.0

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 (672) hide show
  1. package/CHANGELOG.md +144 -1
  2. package/README.md +2 -3
  3. package/accordion/header/AccordionHeader.d.ts +1 -1
  4. package/accordion/item/AccordionItem.d.ts +1 -1
  5. package/accordion/panel/AccordionPanel.d.ts +1 -1
  6. package/accordion/root/AccordionRoot.d.ts +1 -1
  7. package/accordion/trigger/AccordionTrigger.d.ts +1 -1
  8. package/accordion/trigger/AccordionTrigger.js +3 -4
  9. package/alert-dialog/root/AlertDialogRoot.d.ts +3 -3
  10. package/autocomplete/root/AutocompleteRoot.d.ts +1 -1
  11. package/avatar/fallback/AvatarFallback.d.ts +1 -1
  12. package/avatar/image/AvatarImage.d.ts +1 -1
  13. package/avatar/root/AvatarRoot.d.ts +1 -1
  14. package/button/Button.d.ts +4 -17
  15. package/button/Button.js +1 -2
  16. package/checkbox/indicator/CheckboxIndicator.d.ts +1 -1
  17. package/checkbox/indicator/CheckboxIndicatorDataAttributes.d.ts +4 -0
  18. package/checkbox/indicator/CheckboxIndicatorDataAttributes.js +4 -0
  19. package/checkbox/root/CheckboxRoot.d.ts +1 -1
  20. package/checkbox/root/CheckboxRoot.js +5 -4
  21. package/checkbox/root/CheckboxRootDataAttributes.d.ts +4 -0
  22. package/checkbox/root/CheckboxRootDataAttributes.js +4 -0
  23. package/checkbox-group/CheckboxGroup.d.ts +1 -1
  24. package/collapsible/panel/CollapsiblePanel.d.ts +1 -1
  25. package/collapsible/root/CollapsibleRoot.d.ts +1 -1
  26. package/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
  27. package/collapsible/trigger/CollapsibleTrigger.js +1 -2
  28. package/combobox/arrow/ComboboxArrow.d.ts +1 -1
  29. package/combobox/backdrop/ComboboxBackdrop.d.ts +1 -1
  30. package/combobox/chip/ComboboxChip.d.ts +1 -1
  31. package/combobox/chip-remove/ComboboxChipRemove.d.ts +1 -1
  32. package/combobox/chip-remove/ComboboxChipRemove.js +3 -2
  33. package/combobox/chips/ComboboxChips.d.ts +1 -1
  34. package/combobox/chips/ComboboxChips.js +7 -1
  35. package/combobox/clear/ComboboxClear.d.ts +1 -1
  36. package/combobox/clear/ComboboxClear.js +2 -2
  37. package/combobox/empty/ComboboxEmpty.d.ts +1 -1
  38. package/combobox/group/ComboboxGroup.d.ts +1 -1
  39. package/combobox/group-label/ComboboxGroupLabel.d.ts +1 -1
  40. package/combobox/icon/ComboboxIcon.d.ts +1 -1
  41. package/combobox/input/ComboboxInput.d.ts +1 -1
  42. package/combobox/input/ComboboxInput.js +12 -18
  43. package/combobox/item/ComboboxItem.d.ts +1 -1
  44. package/combobox/item/ComboboxItem.js +0 -1
  45. package/combobox/item-indicator/ComboboxItemIndicator.d.ts +1 -1
  46. package/combobox/list/ComboboxList.d.ts +1 -1
  47. package/combobox/popup/ComboboxPopup.d.ts +1 -1
  48. package/combobox/popup/ComboboxPopup.js +2 -1
  49. package/combobox/portal/ComboboxPortal.d.ts +1 -1
  50. package/combobox/positioner/ComboboxPositioner.d.ts +1 -1
  51. package/combobox/root/AriaCombobox.d.ts +8 -1
  52. package/combobox/root/AriaCombobox.js +19 -16
  53. package/combobox/root/ComboboxRoot.d.ts +1 -1
  54. package/combobox/row/ComboboxRow.d.ts +1 -1
  55. package/combobox/status/ComboboxStatus.d.ts +1 -1
  56. package/combobox/store.d.ts +3 -0
  57. package/combobox/store.js +21 -0
  58. package/combobox/trigger/ComboboxTrigger.d.ts +14 -1
  59. package/combobox/trigger/ComboboxTrigger.js +31 -11
  60. package/combobox/trigger/ComboboxTriggerDataAttributes.d.ts +13 -0
  61. package/combobox/trigger/ComboboxTriggerDataAttributes.js +13 -0
  62. package/combobox/utils/stateAttributesMapping.d.ts +14 -0
  63. package/combobox/utils/stateAttributesMapping.js +18 -0
  64. package/combobox/value/ComboboxValue.d.ts +5 -0
  65. package/combobox/value/ComboboxValue.js +15 -6
  66. package/composite/root/useCompositeRoot.d.ts +1 -1
  67. package/context-menu/trigger/ContextMenuTrigger.d.ts +1 -1
  68. package/csp-provider/CSPContext.d.ts +13 -0
  69. package/csp-provider/CSPContext.js +25 -0
  70. package/csp-provider/CSPProvider.d.ts +25 -0
  71. package/csp-provider/CSPProvider.js +32 -0
  72. package/csp-provider/index.d.ts +2 -0
  73. package/csp-provider/index.js +12 -0
  74. package/csp-provider/index.parts.d.ts +1 -0
  75. package/csp-provider/index.parts.js +12 -0
  76. package/dialog/backdrop/DialogBackdrop.d.ts +1 -1
  77. package/dialog/close/DialogClose.d.ts +1 -1
  78. package/dialog/description/DialogDescription.d.ts +1 -1
  79. package/dialog/popup/DialogPopup.d.ts +1 -1
  80. package/dialog/portal/DialogPortal.d.ts +1 -1
  81. package/dialog/portal/DialogPortal.js +1 -0
  82. package/dialog/root/DialogRoot.d.ts +4 -4
  83. package/dialog/store/DialogStore.d.ts +2 -2
  84. package/dialog/title/DialogTitle.d.ts +1 -1
  85. package/dialog/viewport/DialogViewport.d.ts +1 -1
  86. package/esm/accordion/header/AccordionHeader.d.ts +1 -1
  87. package/esm/accordion/item/AccordionItem.d.ts +1 -1
  88. package/esm/accordion/panel/AccordionPanel.d.ts +1 -1
  89. package/esm/accordion/root/AccordionRoot.d.ts +1 -1
  90. package/esm/accordion/trigger/AccordionTrigger.d.ts +1 -1
  91. package/esm/accordion/trigger/AccordionTrigger.js +3 -4
  92. package/esm/alert-dialog/root/AlertDialogRoot.d.ts +3 -3
  93. package/esm/autocomplete/root/AutocompleteRoot.d.ts +1 -1
  94. package/esm/avatar/fallback/AvatarFallback.d.ts +1 -1
  95. package/esm/avatar/image/AvatarImage.d.ts +1 -1
  96. package/esm/avatar/root/AvatarRoot.d.ts +1 -1
  97. package/esm/button/Button.d.ts +4 -17
  98. package/esm/button/Button.js +1 -2
  99. package/esm/checkbox/indicator/CheckboxIndicator.d.ts +1 -1
  100. package/esm/checkbox/indicator/CheckboxIndicatorDataAttributes.d.ts +4 -0
  101. package/esm/checkbox/indicator/CheckboxIndicatorDataAttributes.js +4 -0
  102. package/esm/checkbox/root/CheckboxRoot.d.ts +1 -1
  103. package/esm/checkbox/root/CheckboxRoot.js +6 -5
  104. package/esm/checkbox/root/CheckboxRootDataAttributes.d.ts +4 -0
  105. package/esm/checkbox/root/CheckboxRootDataAttributes.js +4 -0
  106. package/esm/checkbox-group/CheckboxGroup.d.ts +1 -1
  107. package/esm/collapsible/panel/CollapsiblePanel.d.ts +1 -1
  108. package/esm/collapsible/root/CollapsibleRoot.d.ts +1 -1
  109. package/esm/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
  110. package/esm/collapsible/trigger/CollapsibleTrigger.js +1 -2
  111. package/esm/combobox/arrow/ComboboxArrow.d.ts +1 -1
  112. package/esm/combobox/backdrop/ComboboxBackdrop.d.ts +1 -1
  113. package/esm/combobox/chip/ComboboxChip.d.ts +1 -1
  114. package/esm/combobox/chip-remove/ComboboxChipRemove.d.ts +1 -1
  115. package/esm/combobox/chip-remove/ComboboxChipRemove.js +3 -2
  116. package/esm/combobox/chips/ComboboxChips.d.ts +1 -1
  117. package/esm/combobox/chips/ComboboxChips.js +7 -1
  118. package/esm/combobox/clear/ComboboxClear.d.ts +1 -1
  119. package/esm/combobox/clear/ComboboxClear.js +2 -2
  120. package/esm/combobox/empty/ComboboxEmpty.d.ts +1 -1
  121. package/esm/combobox/group/ComboboxGroup.d.ts +1 -1
  122. package/esm/combobox/group-label/ComboboxGroupLabel.d.ts +1 -1
  123. package/esm/combobox/icon/ComboboxIcon.d.ts +1 -1
  124. package/esm/combobox/input/ComboboxInput.d.ts +1 -1
  125. package/esm/combobox/input/ComboboxInput.js +12 -17
  126. package/esm/combobox/item/ComboboxItem.d.ts +1 -1
  127. package/esm/combobox/item/ComboboxItem.js +0 -1
  128. package/esm/combobox/item-indicator/ComboboxItemIndicator.d.ts +1 -1
  129. package/esm/combobox/list/ComboboxList.d.ts +1 -1
  130. package/esm/combobox/popup/ComboboxPopup.d.ts +1 -1
  131. package/esm/combobox/popup/ComboboxPopup.js +2 -1
  132. package/esm/combobox/portal/ComboboxPortal.d.ts +1 -1
  133. package/esm/combobox/positioner/ComboboxPositioner.d.ts +1 -1
  134. package/esm/combobox/root/AriaCombobox.d.ts +8 -1
  135. package/esm/combobox/root/AriaCombobox.js +20 -17
  136. package/esm/combobox/root/ComboboxRoot.d.ts +1 -1
  137. package/esm/combobox/row/ComboboxRow.d.ts +1 -1
  138. package/esm/combobox/status/ComboboxStatus.d.ts +1 -1
  139. package/esm/combobox/store.d.ts +3 -0
  140. package/esm/combobox/store.js +21 -0
  141. package/esm/combobox/trigger/ComboboxTrigger.d.ts +14 -1
  142. package/esm/combobox/trigger/ComboboxTrigger.js +32 -12
  143. package/esm/combobox/trigger/ComboboxTriggerDataAttributes.d.ts +13 -0
  144. package/esm/combobox/trigger/ComboboxTriggerDataAttributes.js +13 -0
  145. package/esm/combobox/utils/stateAttributesMapping.d.ts +14 -0
  146. package/esm/combobox/utils/stateAttributesMapping.js +12 -0
  147. package/esm/combobox/value/ComboboxValue.d.ts +5 -0
  148. package/esm/combobox/value/ComboboxValue.js +16 -7
  149. package/esm/composite/root/useCompositeRoot.d.ts +1 -1
  150. package/esm/context-menu/trigger/ContextMenuTrigger.d.ts +1 -1
  151. package/esm/csp-provider/CSPContext.d.ts +13 -0
  152. package/esm/csp-provider/CSPContext.js +18 -0
  153. package/esm/csp-provider/CSPProvider.d.ts +25 -0
  154. package/esm/csp-provider/CSPProvider.js +27 -0
  155. package/esm/csp-provider/index.d.ts +2 -0
  156. package/esm/csp-provider/index.js +1 -0
  157. package/esm/csp-provider/index.parts.d.ts +1 -0
  158. package/esm/csp-provider/index.parts.js +1 -0
  159. package/esm/dialog/backdrop/DialogBackdrop.d.ts +1 -1
  160. package/esm/dialog/close/DialogClose.d.ts +1 -1
  161. package/esm/dialog/description/DialogDescription.d.ts +1 -1
  162. package/esm/dialog/popup/DialogPopup.d.ts +1 -1
  163. package/esm/dialog/portal/DialogPortal.d.ts +1 -1
  164. package/esm/dialog/portal/DialogPortal.js +1 -0
  165. package/esm/dialog/root/DialogRoot.d.ts +4 -4
  166. package/esm/dialog/store/DialogStore.d.ts +2 -2
  167. package/esm/dialog/title/DialogTitle.d.ts +1 -1
  168. package/esm/dialog/viewport/DialogViewport.d.ts +1 -1
  169. package/esm/field/control/FieldControl.d.ts +1 -1
  170. package/esm/field/description/FieldDescription.d.ts +1 -1
  171. package/esm/field/error/FieldError.d.ts +1 -1
  172. package/esm/field/index.d.ts +2 -1
  173. package/esm/field/item/FieldItem.d.ts +1 -1
  174. package/esm/field/label/FieldLabel.d.ts +11 -2
  175. package/esm/field/label/FieldLabel.js +51 -11
  176. package/esm/field/root/FieldRoot.d.ts +10 -1
  177. package/esm/field/root/FieldRoot.js +8 -0
  178. package/esm/field/useField.js +7 -3
  179. package/esm/fieldset/legend/FieldsetLegend.d.ts +1 -1
  180. package/esm/fieldset/root/FieldsetRoot.d.ts +1 -1
  181. package/esm/floating-ui-react/components/FloatingFocusManager.js +7 -6
  182. package/esm/floating-ui-react/components/FloatingPortal.d.ts +2 -2
  183. package/esm/floating-ui-react/components/FloatingPortal.js +11 -2
  184. package/esm/floating-ui-react/hooks/useClientPoint.js +5 -4
  185. package/esm/floating-ui-react/hooks/useDismiss.js +16 -3
  186. package/esm/floating-ui-react/hooks/useFocus.d.ts +5 -0
  187. package/esm/floating-ui-react/hooks/useFocus.js +43 -9
  188. package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js +17 -4
  189. package/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js +3 -0
  190. package/esm/form/Form.d.ts +18 -1
  191. package/esm/form/Form.js +17 -0
  192. package/esm/form/FormContext.d.ts +1 -1
  193. package/esm/index.d.ts +1 -0
  194. package/esm/index.js +2 -1
  195. package/esm/input/Input.d.ts +1 -1
  196. package/esm/menu/arrow/MenuArrow.d.ts +1 -1
  197. package/esm/menu/backdrop/MenuBackdrop.d.ts +1 -1
  198. package/esm/menu/checkbox-item/MenuCheckboxItem.d.ts +1 -1
  199. package/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.d.ts +1 -1
  200. package/esm/menu/group/MenuGroup.d.ts +1 -1
  201. package/esm/menu/group-label/MenuGroupLabel.d.ts +1 -1
  202. package/esm/menu/item/MenuItem.d.ts +1 -1
  203. package/esm/menu/popup/MenuPopup.d.ts +1 -1
  204. package/esm/menu/popup/MenuPopup.js +4 -3
  205. package/esm/menu/portal/MenuPortal.d.ts +1 -1
  206. package/esm/menu/positioner/MenuPositioner.d.ts +1 -1
  207. package/esm/menu/radio-group/MenuRadioGroup.d.ts +1 -1
  208. package/esm/menu/radio-item/MenuRadioItem.d.ts +1 -1
  209. package/esm/menu/radio-item-indicator/MenuRadioItemIndicator.d.ts +1 -1
  210. package/esm/menu/root/MenuRoot.d.ts +7 -6
  211. package/esm/menu/root/MenuRoot.js +4 -2
  212. package/esm/menu/store/MenuStore.js +3 -3
  213. package/esm/menu/submenu-trigger/MenuSubmenuTrigger.d.ts +1 -1
  214. package/esm/menu/trigger/MenuTrigger.js +13 -13
  215. package/esm/menubar/Menubar.d.ts +1 -1
  216. package/esm/merge-props/mergeProps.d.ts +31 -11
  217. package/esm/merge-props/mergeProps.js +29 -8
  218. package/esm/meter/indicator/MeterIndicator.d.ts +1 -1
  219. package/esm/meter/label/MeterLabel.d.ts +1 -1
  220. package/esm/meter/root/MeterRoot.d.ts +1 -1
  221. package/esm/meter/track/MeterTrack.d.ts +1 -1
  222. package/esm/meter/value/MeterValue.d.ts +1 -1
  223. package/esm/navigation-menu/arrow/NavigationMenuArrow.d.ts +1 -1
  224. package/esm/navigation-menu/backdrop/NavigationMenuBackdrop.d.ts +1 -1
  225. package/esm/navigation-menu/content/NavigationMenuContent.d.ts +1 -1
  226. package/esm/navigation-menu/content/NavigationMenuContent.js +6 -0
  227. package/esm/navigation-menu/icon/NavigationMenuIcon.d.ts +1 -1
  228. package/esm/navigation-menu/item/NavigationMenuItem.d.ts +1 -1
  229. package/esm/navigation-menu/link/NavigationMenuLink.d.ts +1 -1
  230. package/esm/navigation-menu/list/NavigationMenuList.d.ts +1 -1
  231. package/esm/navigation-menu/popup/NavigationMenuPopup.d.ts +1 -1
  232. package/esm/navigation-menu/portal/NavigationMenuPortal.d.ts +1 -1
  233. package/esm/navigation-menu/positioner/NavigationMenuPositioner.d.ts +1 -1
  234. package/esm/navigation-menu/root/NavigationMenuRoot.d.ts +2 -2
  235. package/esm/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -1
  236. package/esm/navigation-menu/viewport/NavigationMenuViewport.d.ts +1 -1
  237. package/esm/number-field/decrement/NumberFieldDecrement.d.ts +1 -1
  238. package/esm/number-field/decrement/NumberFieldDecrement.js +4 -6
  239. package/esm/number-field/group/NumberFieldGroup.d.ts +1 -1
  240. package/esm/number-field/increment/NumberFieldIncrement.d.ts +1 -1
  241. package/esm/number-field/increment/NumberFieldIncrement.js +4 -6
  242. package/esm/number-field/input/NumberFieldInput.d.ts +1 -1
  243. package/esm/number-field/input/NumberFieldInput.js +5 -2
  244. package/esm/number-field/root/NumberFieldRoot.d.ts +5 -4
  245. package/esm/number-field/root/NumberFieldRoot.js +12 -5
  246. package/esm/number-field/root/useNumberFieldButton.d.ts +0 -3
  247. package/esm/number-field/root/useNumberFieldButton.js +5 -11
  248. package/esm/number-field/scrub-area/NumberFieldScrubArea.d.ts +1 -1
  249. package/esm/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.d.ts +1 -1
  250. package/esm/popover/arrow/PopoverArrow.d.ts +1 -1
  251. package/esm/popover/backdrop/PopoverBackdrop.d.ts +1 -1
  252. package/esm/popover/close/PopoverClose.d.ts +1 -1
  253. package/esm/popover/description/PopoverDescription.d.ts +1 -1
  254. package/esm/popover/popup/PopoverPopup.d.ts +1 -1
  255. package/esm/popover/popup/PopoverPopup.js +0 -30
  256. package/esm/popover/portal/PopoverPortal.d.ts +1 -1
  257. package/esm/popover/positioner/PopoverPositioner.d.ts +1 -1
  258. package/esm/popover/positioner/PopoverPositioner.js +2 -1
  259. package/esm/popover/root/PopoverRoot.d.ts +2 -2
  260. package/esm/popover/store/PopoverStore.d.ts +4 -2
  261. package/esm/popover/store/PopoverStore.js +8 -5
  262. package/esm/popover/title/PopoverTitle.d.ts +1 -1
  263. package/esm/popover/trigger/PopoverTrigger.js +2 -2
  264. package/esm/popover/viewport/PopoverViewport.d.ts +1 -1
  265. package/esm/popover/viewport/PopoverViewport.js +28 -12
  266. package/esm/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
  267. package/esm/preview-card/arrow/PreviewCardArrow.js +2 -3
  268. package/esm/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
  269. package/esm/preview-card/backdrop/PreviewCardBackdrop.js +4 -5
  270. package/esm/preview-card/index.parts.d.ts +3 -1
  271. package/esm/preview-card/index.parts.js +3 -1
  272. package/esm/preview-card/popup/PreviewCardPopup.d.ts +2 -1
  273. package/esm/preview-card/popup/PreviewCardPopup.js +17 -11
  274. package/esm/preview-card/portal/PreviewCardPortal.d.ts +1 -1
  275. package/esm/preview-card/portal/PreviewCardPortal.js +2 -3
  276. package/esm/preview-card/positioner/PreviewCardPositioner.d.ts +2 -1
  277. package/esm/preview-card/positioner/PreviewCardPositioner.js +16 -11
  278. package/esm/preview-card/root/PreviewCardContext.d.ts +5 -26
  279. package/esm/preview-card/root/PreviewCardContext.js +2 -2
  280. package/esm/preview-card/root/PreviewCardRoot.d.ts +35 -10
  281. package/esm/preview-card/root/PreviewCardRoot.js +61 -116
  282. package/esm/preview-card/store/PreviewCardHandle.d.ts +33 -0
  283. package/esm/preview-card/store/PreviewCardHandle.js +55 -0
  284. package/esm/preview-card/store/PreviewCardStore.d.ts +36 -0
  285. package/esm/preview-card/store/PreviewCardStore.js +97 -0
  286. package/esm/preview-card/trigger/PreviewCardTrigger.d.ts +15 -3
  287. package/esm/preview-card/trigger/PreviewCardTrigger.js +49 -13
  288. package/esm/preview-card/viewport/PreviewCardViewport.d.ts +22 -0
  289. package/esm/preview-card/viewport/PreviewCardViewport.js +272 -0
  290. package/esm/preview-card/viewport/PreviewCardViewportCssVars.d.ts +14 -0
  291. package/esm/preview-card/viewport/PreviewCardViewportCssVars.js +15 -0
  292. package/esm/preview-card/viewport/PreviewCardViewportDataAttributes.d.ts +26 -0
  293. package/esm/preview-card/viewport/PreviewCardViewportDataAttributes.js +27 -0
  294. package/esm/progress/indicator/ProgressIndicator.d.ts +1 -1
  295. package/esm/progress/label/ProgressLabel.d.ts +1 -1
  296. package/esm/progress/root/ProgressRoot.d.ts +1 -1
  297. package/esm/progress/track/ProgressTrack.d.ts +1 -1
  298. package/esm/progress/value/ProgressValue.d.ts +1 -1
  299. package/esm/radio/indicator/RadioIndicator.d.ts +1 -1
  300. package/esm/radio/root/RadioRoot.d.ts +1 -1
  301. package/esm/radio/root/RadioRoot.js +9 -9
  302. package/esm/radio-group/RadioGroup.d.ts +4 -4
  303. package/esm/radio-group/RadioGroup.js +2 -2
  304. package/esm/scroll-area/content/ScrollAreaContent.d.ts +1 -1
  305. package/esm/scroll-area/content/ScrollAreaContent.js +10 -1
  306. package/esm/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
  307. package/esm/scroll-area/corner/ScrollAreaCorner.js +1 -1
  308. package/esm/scroll-area/root/ScrollAreaRoot.d.ts +26 -2
  309. package/esm/scroll-area/root/ScrollAreaRoot.js +33 -29
  310. package/esm/scroll-area/root/ScrollAreaRootContext.d.ts +10 -43
  311. package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +1 -1
  312. package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.js +4 -4
  313. package/esm/scroll-area/thumb/ScrollAreaThumb.d.ts +2 -2
  314. package/esm/scroll-area/thumb/ScrollAreaThumb.js +1 -1
  315. package/esm/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
  316. package/esm/scroll-area/viewport/ScrollAreaViewport.js +51 -25
  317. package/esm/select/arrow/SelectArrow.d.ts +1 -1
  318. package/esm/select/backdrop/SelectBackdrop.d.ts +1 -1
  319. package/esm/select/group/SelectGroup.d.ts +1 -1
  320. package/esm/select/group-label/SelectGroupLabel.d.ts +1 -1
  321. package/esm/select/icon/SelectIcon.d.ts +1 -1
  322. package/esm/select/item/SelectItem.d.ts +1 -1
  323. package/esm/select/item/SelectItem.js +0 -1
  324. package/esm/select/item-indicator/SelectItemIndicator.d.ts +1 -1
  325. package/esm/select/item-text/SelectItemText.d.ts +1 -1
  326. package/esm/select/list/SelectList.d.ts +1 -1
  327. package/esm/select/popup/SelectPopup.d.ts +1 -1
  328. package/esm/select/popup/SelectPopup.js +154 -95
  329. package/esm/select/portal/SelectPortal.d.ts +1 -1
  330. package/esm/select/positioner/SelectPositioner.d.ts +1 -1
  331. package/esm/select/root/SelectRoot.d.ts +2 -2
  332. package/esm/select/root/SelectRoot.js +26 -13
  333. package/esm/select/scroll-arrow/SelectScrollArrow.d.ts +1 -1
  334. package/esm/select/scroll-down-arrow/SelectScrollDownArrow.d.ts +1 -1
  335. package/esm/select/scroll-up-arrow/SelectScrollUpArrow.d.ts +1 -1
  336. package/esm/select/store.d.ts +2 -1
  337. package/esm/select/store.js +19 -13
  338. package/esm/select/trigger/SelectTrigger.d.ts +14 -4
  339. package/esm/select/trigger/SelectTrigger.js +50 -18
  340. package/esm/select/value/SelectValue.d.ts +6 -1
  341. package/esm/select/value/SelectValue.js +19 -5
  342. package/esm/separator/Separator.d.ts +1 -1
  343. package/esm/slider/control/SliderControl.d.ts +1 -1
  344. package/esm/slider/control/SliderControl.js +1 -1
  345. package/esm/slider/control/SliderControlDataAttributes.d.ts +0 -8
  346. package/esm/slider/control/SliderControlDataAttributes.js +0 -8
  347. package/esm/slider/indicator/SliderIndicator.d.ts +1 -1
  348. package/esm/slider/indicator/SliderIndicatorDataAttributes.d.ts +0 -8
  349. package/esm/slider/indicator/SliderIndicatorDataAttributes.js +0 -8
  350. package/esm/slider/root/SliderRootDataAttributes.d.ts +0 -8
  351. package/esm/slider/root/SliderRootDataAttributes.js +0 -8
  352. package/esm/slider/thumb/SliderThumb.d.ts +2 -2
  353. package/esm/slider/thumb/SliderThumb.js +7 -1
  354. package/esm/slider/thumb/SliderThumbDataAttributes.d.ts +0 -8
  355. package/esm/slider/thumb/SliderThumbDataAttributes.js +0 -8
  356. package/esm/slider/track/SliderTrack.d.ts +1 -1
  357. package/esm/slider/track/SliderTrackDataAttributes.d.ts +0 -8
  358. package/esm/slider/track/SliderTrackDataAttributes.js +0 -8
  359. package/esm/slider/value/SliderValue.d.ts +1 -1
  360. package/esm/slider/value/SliderValueDataAttributes.d.ts +0 -8
  361. package/esm/slider/value/SliderValueDataAttributes.js +0 -8
  362. package/esm/switch/root/SwitchRoot.d.ts +6 -1
  363. package/esm/switch/root/SwitchRoot.js +15 -6
  364. package/esm/switch/thumb/SwitchThumb.d.ts +1 -1
  365. package/esm/tabs/indicator/TabsIndicator.d.ts +1 -1
  366. package/esm/tabs/indicator/TabsIndicator.js +6 -0
  367. package/esm/tabs/list/TabsList.d.ts +1 -1
  368. package/esm/tabs/panel/TabsPanel.d.ts +1 -1
  369. package/esm/tabs/root/TabsRoot.d.ts +1 -1
  370. package/esm/tabs/tab/TabsTab.d.ts +1 -1
  371. package/esm/toast/action/ToastAction.d.ts +1 -1
  372. package/esm/toast/arrow/ToastArrow.d.ts +1 -1
  373. package/esm/toast/close/ToastClose.d.ts +1 -1
  374. package/esm/toast/content/ToastContent.d.ts +1 -1
  375. package/esm/toast/description/ToastDescription.d.ts +1 -1
  376. package/esm/toast/portal/ToastPortal.d.ts +1 -1
  377. package/esm/toast/positioner/ToastPositioner.d.ts +1 -1
  378. package/esm/toast/provider/ToastProvider.js +46 -19
  379. package/esm/toast/root/ToastRoot.d.ts +1 -1
  380. package/esm/toast/title/ToastTitle.d.ts +1 -1
  381. package/esm/toast/viewport/ToastViewport.d.ts +1 -1
  382. package/esm/toggle/Toggle.d.ts +1 -1
  383. package/esm/toggle-group/ToggleGroup.d.ts +1 -1
  384. package/esm/toolbar/button/ToolbarButton.d.ts +1 -1
  385. package/esm/toolbar/group/ToolbarGroup.d.ts +1 -1
  386. package/esm/toolbar/input/ToolbarInput.d.ts +1 -1
  387. package/esm/toolbar/link/ToolbarLink.d.ts +1 -1
  388. package/esm/toolbar/root/ToolbarRoot.d.ts +1 -1
  389. package/esm/toolbar/separator/ToolbarSeparator.d.ts +1 -1
  390. package/esm/tooltip/arrow/TooltipArrow.d.ts +1 -1
  391. package/esm/tooltip/popup/TooltipPopup.d.ts +1 -1
  392. package/esm/tooltip/popup/TooltipPopup.js +0 -31
  393. package/esm/tooltip/portal/TooltipPortal.d.ts +1 -1
  394. package/esm/tooltip/positioner/TooltipPositioner.d.ts +1 -1
  395. package/esm/tooltip/positioner/TooltipPositioner.js +2 -1
  396. package/esm/tooltip/root/TooltipRoot.d.ts +4 -6
  397. package/esm/tooltip/root/TooltipRoot.js +1 -2
  398. package/esm/tooltip/store/TooltipStore.d.ts +4 -2
  399. package/esm/tooltip/store/TooltipStore.js +7 -4
  400. package/esm/tooltip/trigger/TooltipTrigger.js +1 -1
  401. package/esm/tooltip/viewport/TooltipViewport.d.ts +1 -1
  402. package/esm/tooltip/viewport/TooltipViewport.js +28 -12
  403. package/esm/use-render/index.d.ts +2 -1
  404. package/esm/use-render/index.js +2 -1
  405. package/esm/utils/FloatingPortalLite.d.ts +1 -1
  406. package/esm/utils/popups/popupStoreUtils.js +21 -2
  407. package/esm/utils/resolveValueLabel.d.ts +5 -1
  408. package/esm/utils/resolveValueLabel.js +46 -22
  409. package/esm/utils/styles.d.ts +1 -1
  410. package/esm/utils/styles.js +10 -6
  411. package/esm/utils/types.d.ts +1 -1
  412. package/esm/utils/useAnimationsFinished.d.ts +2 -2
  413. package/esm/utils/useAnimationsFinished.js +56 -33
  414. package/esm/utils/useOpenChangeComplete.js +8 -10
  415. package/esm/utils/useOpenInteractionType.js +6 -1
  416. package/esm/utils/usePopupAutoResize.js +82 -46
  417. package/field/control/FieldControl.d.ts +1 -1
  418. package/field/description/FieldDescription.d.ts +1 -1
  419. package/field/error/FieldError.d.ts +1 -1
  420. package/field/index.d.ts +2 -1
  421. package/field/item/FieldItem.d.ts +1 -1
  422. package/field/label/FieldLabel.d.ts +11 -2
  423. package/field/label/FieldLabel.js +51 -11
  424. package/field/root/FieldRoot.d.ts +10 -1
  425. package/field/root/FieldRoot.js +8 -0
  426. package/field/useField.js +7 -3
  427. package/fieldset/legend/FieldsetLegend.d.ts +1 -1
  428. package/fieldset/root/FieldsetRoot.d.ts +1 -1
  429. package/floating-ui-react/components/FloatingFocusManager.js +7 -6
  430. package/floating-ui-react/components/FloatingPortal.d.ts +2 -2
  431. package/floating-ui-react/components/FloatingPortal.js +11 -2
  432. package/floating-ui-react/hooks/useClientPoint.js +5 -4
  433. package/floating-ui-react/hooks/useDismiss.js +16 -3
  434. package/floating-ui-react/hooks/useFocus.d.ts +5 -0
  435. package/floating-ui-react/hooks/useFocus.js +43 -9
  436. package/floating-ui-react/hooks/useHoverReferenceInteraction.js +17 -4
  437. package/floating-ui-react/hooks/useSyncedFloatingRootContext.js +3 -0
  438. package/form/Form.d.ts +18 -1
  439. package/form/Form.js +17 -0
  440. package/form/FormContext.d.ts +1 -1
  441. package/index.d.ts +1 -0
  442. package/index.js +12 -1
  443. package/input/Input.d.ts +1 -1
  444. package/menu/arrow/MenuArrow.d.ts +1 -1
  445. package/menu/backdrop/MenuBackdrop.d.ts +1 -1
  446. package/menu/checkbox-item/MenuCheckboxItem.d.ts +1 -1
  447. package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.d.ts +1 -1
  448. package/menu/group/MenuGroup.d.ts +1 -1
  449. package/menu/group-label/MenuGroupLabel.d.ts +1 -1
  450. package/menu/item/MenuItem.d.ts +1 -1
  451. package/menu/popup/MenuPopup.d.ts +1 -1
  452. package/menu/popup/MenuPopup.js +4 -3
  453. package/menu/portal/MenuPortal.d.ts +1 -1
  454. package/menu/positioner/MenuPositioner.d.ts +1 -1
  455. package/menu/radio-group/MenuRadioGroup.d.ts +1 -1
  456. package/menu/radio-item/MenuRadioItem.d.ts +1 -1
  457. package/menu/radio-item-indicator/MenuRadioItemIndicator.d.ts +1 -1
  458. package/menu/root/MenuRoot.d.ts +7 -6
  459. package/menu/root/MenuRoot.js +4 -2
  460. package/menu/store/MenuStore.js +3 -3
  461. package/menu/submenu-trigger/MenuSubmenuTrigger.d.ts +1 -1
  462. package/menu/trigger/MenuTrigger.js +14 -14
  463. package/menubar/Menubar.d.ts +1 -1
  464. package/merge-props/mergeProps.d.ts +31 -11
  465. package/merge-props/mergeProps.js +29 -8
  466. package/meter/indicator/MeterIndicator.d.ts +1 -1
  467. package/meter/label/MeterLabel.d.ts +1 -1
  468. package/meter/root/MeterRoot.d.ts +1 -1
  469. package/meter/track/MeterTrack.d.ts +1 -1
  470. package/meter/value/MeterValue.d.ts +1 -1
  471. package/navigation-menu/arrow/NavigationMenuArrow.d.ts +1 -1
  472. package/navigation-menu/backdrop/NavigationMenuBackdrop.d.ts +1 -1
  473. package/navigation-menu/content/NavigationMenuContent.d.ts +1 -1
  474. package/navigation-menu/content/NavigationMenuContent.js +6 -0
  475. package/navigation-menu/icon/NavigationMenuIcon.d.ts +1 -1
  476. package/navigation-menu/item/NavigationMenuItem.d.ts +1 -1
  477. package/navigation-menu/link/NavigationMenuLink.d.ts +1 -1
  478. package/navigation-menu/list/NavigationMenuList.d.ts +1 -1
  479. package/navigation-menu/popup/NavigationMenuPopup.d.ts +1 -1
  480. package/navigation-menu/portal/NavigationMenuPortal.d.ts +1 -1
  481. package/navigation-menu/positioner/NavigationMenuPositioner.d.ts +1 -1
  482. package/navigation-menu/root/NavigationMenuRoot.d.ts +2 -2
  483. package/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -1
  484. package/navigation-menu/viewport/NavigationMenuViewport.d.ts +1 -1
  485. package/number-field/decrement/NumberFieldDecrement.d.ts +1 -1
  486. package/number-field/decrement/NumberFieldDecrement.js +4 -6
  487. package/number-field/group/NumberFieldGroup.d.ts +1 -1
  488. package/number-field/increment/NumberFieldIncrement.d.ts +1 -1
  489. package/number-field/increment/NumberFieldIncrement.js +4 -6
  490. package/number-field/input/NumberFieldInput.d.ts +1 -1
  491. package/number-field/input/NumberFieldInput.js +5 -2
  492. package/number-field/root/NumberFieldRoot.d.ts +5 -4
  493. package/number-field/root/NumberFieldRoot.js +11 -4
  494. package/number-field/root/useNumberFieldButton.d.ts +0 -3
  495. package/number-field/root/useNumberFieldButton.js +5 -11
  496. package/number-field/scrub-area/NumberFieldScrubArea.d.ts +1 -1
  497. package/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.d.ts +1 -1
  498. package/package.json +13 -3
  499. package/popover/arrow/PopoverArrow.d.ts +1 -1
  500. package/popover/backdrop/PopoverBackdrop.d.ts +1 -1
  501. package/popover/close/PopoverClose.d.ts +1 -1
  502. package/popover/description/PopoverDescription.d.ts +1 -1
  503. package/popover/popup/PopoverPopup.d.ts +1 -1
  504. package/popover/popup/PopoverPopup.js +0 -30
  505. package/popover/portal/PopoverPortal.d.ts +1 -1
  506. package/popover/positioner/PopoverPositioner.d.ts +1 -1
  507. package/popover/positioner/PopoverPositioner.js +2 -1
  508. package/popover/root/PopoverRoot.d.ts +2 -2
  509. package/popover/store/PopoverStore.d.ts +4 -2
  510. package/popover/store/PopoverStore.js +8 -5
  511. package/popover/title/PopoverTitle.d.ts +1 -1
  512. package/popover/trigger/PopoverTrigger.js +2 -2
  513. package/popover/viewport/PopoverViewport.d.ts +1 -1
  514. package/popover/viewport/PopoverViewport.js +28 -12
  515. package/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
  516. package/preview-card/arrow/PreviewCardArrow.js +2 -3
  517. package/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
  518. package/preview-card/backdrop/PreviewCardBackdrop.js +4 -5
  519. package/preview-card/index.parts.d.ts +3 -1
  520. package/preview-card/index.parts.js +21 -1
  521. package/preview-card/popup/PreviewCardPopup.d.ts +2 -1
  522. package/preview-card/popup/PreviewCardPopup.js +17 -11
  523. package/preview-card/portal/PreviewCardPortal.d.ts +1 -1
  524. package/preview-card/portal/PreviewCardPortal.js +2 -3
  525. package/preview-card/positioner/PreviewCardPositioner.d.ts +2 -1
  526. package/preview-card/positioner/PreviewCardPositioner.js +16 -11
  527. package/preview-card/root/PreviewCardContext.d.ts +5 -26
  528. package/preview-card/root/PreviewCardContext.js +2 -2
  529. package/preview-card/root/PreviewCardRoot.d.ts +35 -10
  530. package/preview-card/root/PreviewCardRoot.js +59 -113
  531. package/preview-card/store/PreviewCardHandle.d.ts +33 -0
  532. package/preview-card/store/PreviewCardHandle.js +63 -0
  533. package/preview-card/store/PreviewCardStore.d.ts +36 -0
  534. package/preview-card/store/PreviewCardStore.js +105 -0
  535. package/preview-card/trigger/PreviewCardTrigger.d.ts +15 -3
  536. package/preview-card/trigger/PreviewCardTrigger.js +50 -13
  537. package/preview-card/viewport/PreviewCardViewport.d.ts +22 -0
  538. package/preview-card/viewport/PreviewCardViewport.js +278 -0
  539. package/preview-card/viewport/PreviewCardViewportCssVars.d.ts +14 -0
  540. package/preview-card/viewport/PreviewCardViewportCssVars.js +21 -0
  541. package/preview-card/viewport/PreviewCardViewportDataAttributes.d.ts +26 -0
  542. package/preview-card/viewport/PreviewCardViewportDataAttributes.js +33 -0
  543. package/progress/indicator/ProgressIndicator.d.ts +1 -1
  544. package/progress/label/ProgressLabel.d.ts +1 -1
  545. package/progress/root/ProgressRoot.d.ts +1 -1
  546. package/progress/track/ProgressTrack.d.ts +1 -1
  547. package/progress/value/ProgressValue.d.ts +1 -1
  548. package/radio/indicator/RadioIndicator.d.ts +1 -1
  549. package/radio/root/RadioRoot.d.ts +1 -1
  550. package/radio/root/RadioRoot.js +8 -8
  551. package/radio-group/RadioGroup.d.ts +4 -4
  552. package/radio-group/RadioGroup.js +1 -1
  553. package/scroll-area/content/ScrollAreaContent.d.ts +1 -1
  554. package/scroll-area/content/ScrollAreaContent.js +10 -1
  555. package/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
  556. package/scroll-area/corner/ScrollAreaCorner.js +1 -1
  557. package/scroll-area/root/ScrollAreaRoot.d.ts +26 -2
  558. package/scroll-area/root/ScrollAreaRoot.js +33 -29
  559. package/scroll-area/root/ScrollAreaRootContext.d.ts +10 -43
  560. package/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +1 -1
  561. package/scroll-area/scrollbar/ScrollAreaScrollbar.js +4 -4
  562. package/scroll-area/thumb/ScrollAreaThumb.d.ts +2 -2
  563. package/scroll-area/thumb/ScrollAreaThumb.js +1 -1
  564. package/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
  565. package/scroll-area/viewport/ScrollAreaViewport.js +51 -25
  566. package/select/arrow/SelectArrow.d.ts +1 -1
  567. package/select/backdrop/SelectBackdrop.d.ts +1 -1
  568. package/select/group/SelectGroup.d.ts +1 -1
  569. package/select/group-label/SelectGroupLabel.d.ts +1 -1
  570. package/select/icon/SelectIcon.d.ts +1 -1
  571. package/select/item/SelectItem.d.ts +1 -1
  572. package/select/item/SelectItem.js +0 -1
  573. package/select/item-indicator/SelectItemIndicator.d.ts +1 -1
  574. package/select/item-text/SelectItemText.d.ts +1 -1
  575. package/select/list/SelectList.d.ts +1 -1
  576. package/select/popup/SelectPopup.d.ts +1 -1
  577. package/select/popup/SelectPopup.js +154 -95
  578. package/select/portal/SelectPortal.d.ts +1 -1
  579. package/select/positioner/SelectPositioner.d.ts +1 -1
  580. package/select/root/SelectRoot.d.ts +2 -2
  581. package/select/root/SelectRoot.js +24 -11
  582. package/select/scroll-arrow/SelectScrollArrow.d.ts +1 -1
  583. package/select/scroll-down-arrow/SelectScrollDownArrow.d.ts +1 -1
  584. package/select/scroll-up-arrow/SelectScrollUpArrow.d.ts +1 -1
  585. package/select/store.d.ts +2 -1
  586. package/select/store.js +18 -12
  587. package/select/trigger/SelectTrigger.d.ts +14 -4
  588. package/select/trigger/SelectTrigger.js +50 -18
  589. package/select/value/SelectValue.d.ts +6 -1
  590. package/select/value/SelectValue.js +18 -4
  591. package/separator/Separator.d.ts +1 -1
  592. package/slider/control/SliderControl.d.ts +1 -1
  593. package/slider/control/SliderControl.js +1 -1
  594. package/slider/control/SliderControlDataAttributes.d.ts +0 -8
  595. package/slider/control/SliderControlDataAttributes.js +0 -8
  596. package/slider/indicator/SliderIndicator.d.ts +1 -1
  597. package/slider/indicator/SliderIndicatorDataAttributes.d.ts +0 -8
  598. package/slider/indicator/SliderIndicatorDataAttributes.js +0 -8
  599. package/slider/root/SliderRootDataAttributes.d.ts +0 -8
  600. package/slider/root/SliderRootDataAttributes.js +0 -8
  601. package/slider/thumb/SliderThumb.d.ts +2 -2
  602. package/slider/thumb/SliderThumb.js +7 -1
  603. package/slider/thumb/SliderThumbDataAttributes.d.ts +0 -8
  604. package/slider/thumb/SliderThumbDataAttributes.js +0 -8
  605. package/slider/track/SliderTrack.d.ts +1 -1
  606. package/slider/track/SliderTrackDataAttributes.d.ts +0 -8
  607. package/slider/track/SliderTrackDataAttributes.js +0 -8
  608. package/slider/value/SliderValue.d.ts +1 -1
  609. package/slider/value/SliderValueDataAttributes.d.ts +0 -8
  610. package/slider/value/SliderValueDataAttributes.js +0 -8
  611. package/switch/root/SwitchRoot.d.ts +6 -1
  612. package/switch/root/SwitchRoot.js +14 -5
  613. package/switch/thumb/SwitchThumb.d.ts +1 -1
  614. package/tabs/indicator/TabsIndicator.d.ts +1 -1
  615. package/tabs/indicator/TabsIndicator.js +6 -0
  616. package/tabs/list/TabsList.d.ts +1 -1
  617. package/tabs/panel/TabsPanel.d.ts +1 -1
  618. package/tabs/root/TabsRoot.d.ts +1 -1
  619. package/tabs/tab/TabsTab.d.ts +1 -1
  620. package/toast/action/ToastAction.d.ts +1 -1
  621. package/toast/arrow/ToastArrow.d.ts +1 -1
  622. package/toast/close/ToastClose.d.ts +1 -1
  623. package/toast/content/ToastContent.d.ts +1 -1
  624. package/toast/description/ToastDescription.d.ts +1 -1
  625. package/toast/portal/ToastPortal.d.ts +1 -1
  626. package/toast/positioner/ToastPositioner.d.ts +1 -1
  627. package/toast/provider/ToastProvider.js +46 -19
  628. package/toast/root/ToastRoot.d.ts +1 -1
  629. package/toast/title/ToastTitle.d.ts +1 -1
  630. package/toast/viewport/ToastViewport.d.ts +1 -1
  631. package/toggle/Toggle.d.ts +1 -1
  632. package/toggle-group/ToggleGroup.d.ts +1 -1
  633. package/toolbar/button/ToolbarButton.d.ts +1 -1
  634. package/toolbar/group/ToolbarGroup.d.ts +1 -1
  635. package/toolbar/input/ToolbarInput.d.ts +1 -1
  636. package/toolbar/link/ToolbarLink.d.ts +1 -1
  637. package/toolbar/root/ToolbarRoot.d.ts +1 -1
  638. package/toolbar/separator/ToolbarSeparator.d.ts +1 -1
  639. package/tooltip/arrow/TooltipArrow.d.ts +1 -1
  640. package/tooltip/popup/TooltipPopup.d.ts +1 -1
  641. package/tooltip/popup/TooltipPopup.js +0 -31
  642. package/tooltip/portal/TooltipPortal.d.ts +1 -1
  643. package/tooltip/positioner/TooltipPositioner.d.ts +1 -1
  644. package/tooltip/positioner/TooltipPositioner.js +2 -1
  645. package/tooltip/root/TooltipRoot.d.ts +4 -6
  646. package/tooltip/root/TooltipRoot.js +1 -2
  647. package/tooltip/store/TooltipStore.d.ts +4 -2
  648. package/tooltip/store/TooltipStore.js +7 -4
  649. package/tooltip/trigger/TooltipTrigger.js +1 -1
  650. package/tooltip/viewport/TooltipViewport.d.ts +1 -1
  651. package/tooltip/viewport/TooltipViewport.js +28 -12
  652. package/use-render/index.d.ts +2 -1
  653. package/utils/FloatingPortalLite.d.ts +1 -1
  654. package/utils/popups/popupStoreUtils.js +21 -2
  655. package/utils/resolveValueLabel.d.ts +5 -1
  656. package/utils/resolveValueLabel.js +48 -22
  657. package/utils/styles.d.ts +1 -1
  658. package/utils/styles.js +10 -6
  659. package/utils/types.d.ts +1 -1
  660. package/utils/useAnimationsFinished.d.ts +2 -2
  661. package/utils/useAnimationsFinished.js +56 -33
  662. package/utils/useOpenChangeComplete.js +8 -10
  663. package/utils/useOpenInteractionType.js +6 -1
  664. package/utils/usePopupAutoResize.js +82 -46
  665. package/esm/utils/interactions/useFocusWithDelay.d.ts +0 -9
  666. package/esm/utils/interactions/useFocusWithDelay.js +0 -81
  667. package/utils/interactions/useFocusWithDelay.d.ts +0 -9
  668. package/utils/interactions/useFocusWithDelay.js +0 -87
  669. /package/esm/utils/{useMixedToggleClickHander.d.ts → useMixedToggleClickHandler.d.ts} +0 -0
  670. /package/esm/utils/{useMixedToggleClickHander.js → useMixedToggleClickHandler.js} +0 -0
  671. /package/utils/{useMixedToggleClickHander.d.ts → useMixedToggleClickHandler.d.ts} +0 -0
  672. /package/utils/{useMixedToggleClickHander.js → useMixedToggleClickHandler.js} +0 -0
@@ -6,7 +6,7 @@ import { useControlled } from '@base-ui/utils/useControlled';
6
6
  import { useStableCallback } from '@base-ui/utils/useStableCallback';
7
7
  import { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';
8
8
  import { useMergedRefs } from '@base-ui/utils/useMergedRefs';
9
- import { visuallyHidden } from '@base-ui/utils/visuallyHidden';
9
+ import { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';
10
10
  import { NOOP } from "../../utils/noop.js";
11
11
  import { useStateAttributesMapping } from "../utils/useStateAttributesMapping.js";
12
12
  import { useRenderElement } from "../../utils/useRenderElement.js";
@@ -170,11 +170,12 @@ export const CheckboxRoot = /*#__PURE__*/React.forwardRef(function CheckboxRoot(
170
170
  disabled,
171
171
  // parent checkboxes unset `name` to be excluded from form submission
172
172
  name: parent ? undefined : name,
173
- // Set `id` to stop Chrome warning about an unassociated input
174
- id: inputId ?? undefined,
173
+ // Set `id` to stop Chrome warning about an unassociated input.
174
+ // When using a native button, the `id` is applied to the button instead.
175
+ id: nativeButton ? undefined : inputId ?? undefined,
175
176
  required,
176
177
  ref: mergedInputRef,
177
- style: visuallyHidden,
178
+ style: name ? visuallyHiddenInput : visuallyHidden,
178
179
  tabIndex: -1,
179
180
  type: 'checkbox',
180
181
  'aria-hidden': true,
@@ -225,7 +226,7 @@ export const CheckboxRoot = /*#__PURE__*/React.forwardRef(function CheckboxRoot(
225
226
  state,
226
227
  ref: [buttonRef, controlRef, forwardedRef, groupContext?.registerControlRef],
227
228
  props: [{
228
- id,
229
+ id: nativeButton ? inputId ?? undefined : id,
229
230
  role: 'checkbox',
230
231
  'aria-checked': groupIndeterminate ? 'mixed' : checked,
231
232
  'aria-readonly': readOnly || undefined,
@@ -7,6 +7,10 @@ export declare enum CheckboxRootDataAttributes {
7
7
  * Present when the checkbox is not checked.
8
8
  */
9
9
  unchecked = "data-unchecked",
10
+ /**
11
+ * Present when the checkbox is in an indeterminate state.
12
+ */
13
+ indeterminate = "data-indeterminate",
10
14
  /**
11
15
  * Present when the checkbox is disabled.
12
16
  */
@@ -7,6 +7,10 @@ export let CheckboxRootDataAttributes = /*#__PURE__*/function (CheckboxRootDataA
7
7
  * Present when the checkbox is not checked.
8
8
  */
9
9
  CheckboxRootDataAttributes["unchecked"] = "data-unchecked";
10
+ /**
11
+ * Present when the checkbox is in an indeterminate state.
12
+ */
13
+ CheckboxRootDataAttributes["indeterminate"] = "data-indeterminate";
10
14
  /**
11
15
  * Present when the checkbox is disabled.
12
16
  */
@@ -8,7 +8,7 @@ import { REASONS } from "../utils/reasons.js";
8
8
  *
9
9
  * Documentation: [Base UI Checkbox Group](https://base-ui.com/react/components/checkbox-group)
10
10
  */
11
- export declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>;
11
+ export declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<CheckboxGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
12
  export interface CheckboxGroupState extends FieldRoot.State {
13
13
  /**
14
14
  * Whether the component should ignore user interaction.
@@ -8,7 +8,7 @@ import type { TransitionStatus } from "../../utils/useTransitionStatus.js";
8
8
  *
9
9
  * Documentation: [Base UI Collapsible](https://base-ui.com/react/components/collapsible)
10
10
  */
11
- export declare const CollapsiblePanel: React.ForwardRefExoticComponent<CollapsiblePanelProps & React.RefAttributes<HTMLDivElement>>;
11
+ export declare const CollapsiblePanel: React.ForwardRefExoticComponent<Omit<CollapsiblePanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
12
  export interface CollapsiblePanelState extends CollapsibleRoot.State {
13
13
  transitionStatus: TransitionStatus;
14
14
  }
@@ -9,7 +9,7 @@ import { REASONS } from "../../utils/reasons.js";
9
9
  *
10
10
  * Documentation: [Base UI Collapsible](https://base-ui.com/react/components/collapsible)
11
11
  */
12
- export declare const CollapsibleRoot: React.ForwardRefExoticComponent<CollapsibleRootProps & React.RefAttributes<HTMLDivElement>>;
12
+ export declare const CollapsibleRoot: React.ForwardRefExoticComponent<Omit<CollapsibleRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
13
  export interface CollapsibleRootState extends Pick<useCollapsibleRoot.ReturnValue, 'open' | 'disabled'> {}
14
14
  export interface CollapsibleRootProps extends BaseUIComponentProps<'div', CollapsibleRoot.State> {
15
15
  /**
@@ -7,7 +7,7 @@ import { CollapsibleRoot } from "../root/CollapsibleRoot.js";
7
7
  *
8
8
  * Documentation: [Base UI Collapsible](https://base-ui.com/react/components/collapsible)
9
9
  */
10
- export declare const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
10
+ export declare const CollapsibleTrigger: React.ForwardRefExoticComponent<Omit<CollapsibleTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
11
  export interface CollapsibleTriggerProps extends NativeButtonProps, BaseUIComponentProps<'button', CollapsibleRoot.State> {}
12
12
  export declare namespace CollapsibleTrigger {
13
13
  type Props = CollapsibleTriggerProps;
@@ -44,9 +44,8 @@ export const CollapsibleTrigger = /*#__PURE__*/React.forwardRef(function Collaps
44
44
  const props = React.useMemo(() => ({
45
45
  'aria-controls': open ? panelId : undefined,
46
46
  'aria-expanded': open,
47
- disabled,
48
47
  onClick: handleTrigger
49
- }), [panelId, disabled, open, handleTrigger]);
48
+ }), [panelId, open, handleTrigger]);
50
49
  const element = useRenderElement('button', componentProps, {
51
50
  state,
52
51
  ref: [forwardedRef, buttonRef],
@@ -5,7 +5,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
5
5
  * Displays an element positioned against the anchor.
6
6
  * Renders a `<div>` element.
7
7
  */
8
- export declare const ComboboxArrow: React.ForwardRefExoticComponent<ComboboxArrowProps & React.RefAttributes<HTMLDivElement>>;
8
+ export declare const ComboboxArrow: React.ForwardRefExoticComponent<Omit<ComboboxArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  export interface ComboboxArrowState {
10
10
  /**
11
11
  * Whether the popup is currently open.
@@ -5,7 +5,7 @@ import type { TransitionStatus } from "../../utils/useTransitionStatus.js";
5
5
  * An overlay displayed beneath the popup.
6
6
  * Renders a `<div>` element.
7
7
  */
8
- export declare const ComboboxBackdrop: React.ForwardRefExoticComponent<ComboboxBackdropProps & React.RefAttributes<HTMLDivElement>>;
8
+ export declare const ComboboxBackdrop: React.ForwardRefExoticComponent<Omit<ComboboxBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  export interface ComboboxBackdropProps extends BaseUIComponentProps<'div', ComboboxBackdrop.State> {}
10
10
  export interface ComboboxBackdropState {
11
11
  /**
@@ -4,7 +4,7 @@ import { BaseUIComponentProps } from "../../utils/types.js";
4
4
  * An individual chip that represents a value in a multiselectable input.
5
5
  * Renders a `<div>` element.
6
6
  */
7
- export declare const ComboboxChip: React.ForwardRefExoticComponent<ComboboxChipProps & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const ComboboxChip: React.ForwardRefExoticComponent<Omit<ComboboxChipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
8
  export interface ComboboxChipState {
9
9
  /**
10
10
  * Whether the component should ignore user interaction.
@@ -4,7 +4,7 @@ import { BaseUIComponentProps, NativeButtonProps } from "../../utils/types.js";
4
4
  * A button to remove a chip.
5
5
  * Renders a `<button>` element.
6
6
  */
7
- export declare const ComboboxChipRemove: React.ForwardRefExoticComponent<ComboboxChipRemoveProps & React.RefAttributes<HTMLButtonElement>>;
7
+ export declare const ComboboxChipRemove: React.ForwardRefExoticComponent<Omit<ComboboxChipRemoveProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
8
  export interface ComboboxChipRemoveState {
9
9
  /**
10
10
  * Whether the component should ignore user interaction.
@@ -20,6 +20,7 @@ export const ComboboxChipRemove = /*#__PURE__*/React.forwardRef(function Combobo
20
20
  const {
21
21
  render,
22
22
  className,
23
+ disabled: disabledProp = false,
23
24
  nativeButton = true,
24
25
  ...elementProps
25
26
  } = componentProps;
@@ -27,10 +28,11 @@ export const ComboboxChipRemove = /*#__PURE__*/React.forwardRef(function Combobo
27
28
  const {
28
29
  index
29
30
  } = useComboboxChipContext();
30
- const disabled = useStore(store, selectors.disabled);
31
+ const comboboxDisabled = useStore(store, selectors.disabled);
31
32
  const readOnly = useStore(store, selectors.readOnly);
32
33
  const selectedValue = useStore(store, selectors.selectedValue);
33
34
  const isItemEqualToValue = useStore(store, selectors.isItemEqualToValue);
35
+ const disabled = comboboxDisabled || disabledProp;
34
36
  const {
35
37
  buttonRef,
36
38
  getButtonProps
@@ -47,7 +49,6 @@ export const ComboboxChipRemove = /*#__PURE__*/React.forwardRef(function Combobo
47
49
  state,
48
50
  props: [{
49
51
  tabIndex: -1,
50
- disabled,
51
52
  'aria-readonly': readOnly || undefined,
52
53
  onClick(event) {
53
54
  if (disabled || readOnly) {
@@ -4,7 +4,7 @@ import { BaseUIComponentProps } from "../../utils/types.js";
4
4
  * A container for the chips in a multiselectable input.
5
5
  * Renders a `<div>` element.
6
6
  */
7
- export declare const ComboboxChips: React.ForwardRefExoticComponent<ComboboxChipsProps & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const ComboboxChips: React.ForwardRefExoticComponent<Omit<ComboboxChipsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
8
  export interface ComboboxChipsState {}
9
9
  export interface ComboboxChipsProps extends BaseUIComponentProps<'div', ComboboxChips.State> {}
10
10
  export declare namespace ComboboxChips {
@@ -7,6 +7,7 @@ import { ComboboxChipsContext } from "./ComboboxChipsContext.js";
7
7
  import { CompositeList } from "../../composite/list/CompositeList.js";
8
8
  import { useComboboxRootContext } from "../root/ComboboxRootContext.js";
9
9
  import { selectors } from "../store.js";
10
+ import { EMPTY_OBJECT } from "../../utils/constants.js";
10
11
 
11
12
  /**
12
13
  * A container for the chips in a multiselectable input.
@@ -21,6 +22,7 @@ export const ComboboxChips = /*#__PURE__*/React.forwardRef(function ComboboxChip
21
22
  } = componentProps;
22
23
  const store = useComboboxRootContext();
23
24
  const open = useStore(store, selectors.open);
25
+ const hasSelectionChips = useStore(store, selectors.hasSelectionChips);
24
26
  const [highlightedChipIndex, setHighlightedChipIndex] = React.useState(undefined);
25
27
  if (open && highlightedChipIndex !== undefined) {
26
28
  setHighlightedChipIndex(undefined);
@@ -28,7 +30,11 @@ export const ComboboxChips = /*#__PURE__*/React.forwardRef(function ComboboxChip
28
30
  const chipsRef = React.useRef([]);
29
31
  const element = useRenderElement('div', componentProps, {
30
32
  ref: [forwardedRef, store.state.chipsContainerRef],
31
- props: elementProps
33
+ // NVDA enters browse mode instead of staying in focus mode when navigating with
34
+ // arrow keys inside a container unless it has a toolbar role.
35
+ props: [hasSelectionChips ? {
36
+ role: 'toolbar'
37
+ } : EMPTY_OBJECT, elementProps]
32
38
  });
33
39
  const contextValue = React.useMemo(() => ({
34
40
  highlightedChipIndex,
@@ -5,7 +5,7 @@ import { TransitionStatus } from "../../utils/useTransitionStatus.js";
5
5
  * Clears the value when clicked.
6
6
  * Renders a `<button>` element.
7
7
  */
8
- export declare const ComboboxClear: React.ForwardRefExoticComponent<ComboboxClearProps & React.RefAttributes<HTMLButtonElement>>;
8
+ export declare const ComboboxClear: React.ForwardRefExoticComponent<Omit<ComboboxClearProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
9
  export interface ComboboxClearState {
10
10
  /**
11
11
  * Whether the popup is open.
@@ -40,6 +40,7 @@ export const ComboboxClear = /*#__PURE__*/React.forwardRef(function ComboboxClea
40
40
  const readOnly = useStore(store, selectors.readOnly);
41
41
  const open = useStore(store, selectors.open);
42
42
  const selectedValue = useStore(store, selectors.selectedValue);
43
+ const hasSelectionChips = useStore(store, selectors.hasSelectionChips);
43
44
  const inputValue = useComboboxInputValueContext();
44
45
  let visible = false;
45
46
  if (selectionMode === 'none') {
@@ -47,7 +48,7 @@ export const ComboboxClear = /*#__PURE__*/React.forwardRef(function ComboboxClea
47
48
  } else if (selectionMode === 'single') {
48
49
  visible = selectedValue != null;
49
50
  } else {
50
- visible = Array.isArray(selectedValue) && selectedValue.length > 0;
51
+ visible = hasSelectionChips;
51
52
  }
52
53
  const disabled = fieldDisabled || comboboxDisabled || disabledProp;
53
54
  const {
@@ -82,7 +83,6 @@ export const ComboboxClear = /*#__PURE__*/React.forwardRef(function ComboboxClea
82
83
  props: [{
83
84
  tabIndex: -1,
84
85
  children: 'x',
85
- disabled,
86
86
  'aria-readonly': readOnly || undefined,
87
87
  // Avoid stealing focus from the input.
88
88
  onMouseDown(event) {
@@ -6,7 +6,7 @@ import { BaseUIComponentProps } from "../../utils/types.js";
6
6
  * Announces changes politely to screen readers.
7
7
  * Renders a `<div>` element.
8
8
  */
9
- export declare const ComboboxEmpty: React.ForwardRefExoticComponent<ComboboxEmptyProps & React.RefAttributes<HTMLDivElement>>;
9
+ export declare const ComboboxEmpty: React.ForwardRefExoticComponent<Omit<ComboboxEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
10
  export interface ComboboxEmptyState {}
11
11
  export interface ComboboxEmptyProps extends BaseUIComponentProps<'div', ComboboxEmpty.State> {}
12
12
  export declare namespace ComboboxEmpty {
@@ -4,7 +4,7 @@ import { BaseUIComponentProps } from "../../utils/types.js";
4
4
  * Groups related items with the corresponding label.
5
5
  * Renders a `<div>` element.
6
6
  */
7
- export declare const ComboboxGroup: React.ForwardRefExoticComponent<ComboboxGroupProps & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const ComboboxGroup: React.ForwardRefExoticComponent<Omit<ComboboxGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
8
  export interface ComboboxGroupState {}
9
9
  export interface ComboboxGroupProps extends BaseUIComponentProps<'div', ComboboxGroup.State> {
10
10
  /**
@@ -4,7 +4,7 @@ import { BaseUIComponentProps } from "../../utils/types.js";
4
4
  * An accessible label that is automatically associated with its parent group.
5
5
  * Renders a `<div>` element.
6
6
  */
7
- export declare const ComboboxGroupLabel: React.ForwardRefExoticComponent<ComboboxGroupLabelProps & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const ComboboxGroupLabel: React.ForwardRefExoticComponent<Omit<ComboboxGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
8
  export interface ComboboxGroupLabelState {}
9
9
  export interface ComboboxGroupLabelProps extends BaseUIComponentProps<'div', ComboboxGroupLabel.State> {}
10
10
  export declare namespace ComboboxGroupLabel {
@@ -4,7 +4,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
4
4
  * An icon that indicates that the trigger button opens the popup.
5
5
  * Renders a `<span>` element.
6
6
  */
7
- export declare const ComboboxIcon: React.ForwardRefExoticComponent<ComboboxIconProps & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const ComboboxIcon: React.ForwardRefExoticComponent<Omit<ComboboxIconProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
8
  export interface ComboboxIconState {}
9
9
  export interface ComboboxIconProps extends BaseUIComponentProps<'span', ComboboxIcon.State> {}
10
10
  export declare namespace ComboboxIcon {
@@ -6,7 +6,7 @@ import type { Side } from "../../utils/useAnchorPositioning.js";
6
6
  * A text input to search for items in the list.
7
7
  * Renders an `<input>` element.
8
8
  */
9
- export declare const ComboboxInput: React.ForwardRefExoticComponent<ComboboxInputProps & React.RefAttributes<HTMLInputElement>>;
9
+ export declare const ComboboxInput: React.ForwardRefExoticComponent<Omit<ComboboxInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
10
10
  export interface ComboboxInputState extends FieldRoot.State {
11
11
  /**
12
12
  * Whether the corresponding popup is open.
@@ -7,10 +7,9 @@ import { isAndroid, isFirefox } from '@base-ui/utils/detectBrowser';
7
7
  import { useBaseUiId } from "../../utils/useBaseUiId.js";
8
8
  import { useRenderElement } from "../../utils/useRenderElement.js";
9
9
  import { useComboboxDerivedItemsContext, useComboboxInputValueContext, useComboboxRootContext } from "../root/ComboboxRootContext.js";
10
+ import { triggerStateAttributesMapping } from "../utils/stateAttributesMapping.js";
10
11
  import { selectors } from "../store.js";
11
- import { pressableTriggerOpenStateMapping } from "../../utils/popupStateMapping.js";
12
12
  import { useFieldRootContext } from "../../field/root/FieldRootContext.js";
13
- import { fieldValidityMapping } from "../../field/utils/constants.js";
14
13
  import { useLabelableContext } from "../../labelable-provider/LabelableContext.js";
15
14
  import { useComboboxChipsContext } from "../chips/ComboboxChipsContext.js";
16
15
  import { stopEvent } from "../../floating-ui-react/utils.js";
@@ -18,16 +17,6 @@ import { useComboboxPositionerContext } from "../positioner/ComboboxPositionerCo
18
17
  import { createChangeEventDetails } from "../../utils/createBaseUIEventDetails.js";
19
18
  import { REASONS } from "../../utils/reasons.js";
20
19
  import { useDirection } from "../../direction-provider/DirectionContext.js";
21
- const stateAttributesMapping = {
22
- ...pressableTriggerOpenStateMapping,
23
- ...fieldValidityMapping,
24
- popupSide: side => side ? {
25
- 'data-popup-side': side
26
- } : null,
27
- listEmpty: empty => empty ? {
28
- 'data-list-empty': ''
29
- } : null
30
- };
31
20
 
32
21
  /**
33
22
  * A text input to search for items in the list.
@@ -62,7 +51,7 @@ export const ComboboxInput = /*#__PURE__*/React.forwardRef(function ComboboxInpu
62
51
  // `inputValue` can't be placed in the store.
63
52
  // https://github.com/mui/base-ui/issues/2703
64
53
  const inputValue = useComboboxInputValueContext();
65
- const id = useBaseUiId(idProp);
54
+ const required = useStore(store, selectors.required);
66
55
  const direction = useDirection();
67
56
  const comboboxDisabled = useStore(store, selectors.disabled);
68
57
  const readOnly = useStore(store, selectors.readOnly);
@@ -76,20 +65,24 @@ export const ComboboxInput = /*#__PURE__*/React.forwardRef(function ComboboxInpu
76
65
  const selectedValue = useStore(store, selectors.selectedValue);
77
66
  const popupSideValue = useStore(store, selectors.popupSide);
78
67
  const positionerElement = useStore(store, selectors.positionerElement);
68
+ const rootId = useStore(store, selectors.id);
69
+ const inline = useStore(store, selectors.inline);
79
70
  const autoHighlightEnabled = Boolean(autoHighlightMode);
80
71
  const popupSide = mounted && positionerElement ? popupSideValue : null;
81
72
  const disabled = fieldDisabled || comboboxDisabled || disabledProp;
82
73
  const listEmpty = filteredItems.length === 0;
74
+ const isInsidePopup = hasPositionerParent || inline;
75
+ const id = useBaseUiId(idProp ?? (!isInsidePopup ? rootId : undefined));
83
76
  const [composingValue, setComposingValue] = React.useState(null);
84
77
  const isComposingRef = React.useRef(false);
85
78
  const setInputElement = useStableCallback(element => {
86
- const isInsidePopup = hasPositionerParent || store.state.inline;
87
- if (isInsidePopup && !store.state.hasInputValue) {
79
+ const nextIsInsidePopup = hasPositionerParent || store.state.inline;
80
+ if (nextIsInsidePopup && !store.state.hasInputValue) {
88
81
  store.state.setInputValue('', createChangeEventDetails(REASONS.none));
89
82
  }
90
83
  store.update({
91
84
  inputElement: element,
92
- inputInsidePopup: isInsidePopup
85
+ inputInsidePopup: nextIsInsidePopup
93
86
  });
94
87
  });
95
88
  const state = React.useMemo(() => ({
@@ -160,9 +153,11 @@ export const ComboboxInput = /*#__PURE__*/React.forwardRef(function ComboboxInpu
160
153
  type: 'text',
161
154
  value: componentProps.value ?? composingValue ?? inputValue,
162
155
  'aria-readonly': readOnly || undefined,
156
+ 'aria-required': required || undefined,
163
157
  'aria-labelledby': labelId,
164
158
  disabled,
165
159
  readOnly,
160
+ required: selectionMode === 'none' ? required : undefined,
166
161
  ...(selectionMode === 'none' && name && {
167
162
  name
168
163
  }),
@@ -349,7 +344,7 @@ export const ComboboxInput = /*#__PURE__*/React.forwardRef(function ComboboxInpu
349
344
  store.state.keyboardActiveRef.current = false;
350
345
  }
351
346
  }, validation ? validation.getValidationProps(elementProps) : elementProps],
352
- stateAttributesMapping
347
+ stateAttributesMapping: triggerStateAttributesMapping
353
348
  });
354
349
  return element;
355
350
  });
@@ -4,7 +4,7 @@ import type { BaseUIComponentProps, NonNativeButtonProps } from "../../utils/typ
4
4
  * An individual item in the list.
5
5
  * Renders a `<div>` element.
6
6
  */
7
- export declare const ComboboxItem: React.NamedExoticComponent<ComboboxItemProps & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const ComboboxItem: React.NamedExoticComponent<Omit<ComboboxItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
8
  export interface ComboboxItemState {
9
9
  /**
10
10
  * Whether the item should ignore user interaction.
@@ -131,7 +131,6 @@ export const ComboboxItem = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRe
131
131
  const defaultProps = {
132
132
  id,
133
133
  role: isRow ? 'gridcell' : 'option',
134
- 'aria-disabled': disabled || undefined,
135
134
  'aria-selected': selectable ? selected : undefined,
136
135
  // Focusable items steal focus from the input upon mouseup.
137
136
  // Warn if the user renders a natively focusable element like `<button>`,
@@ -5,7 +5,7 @@ import { type TransitionStatus } from "../../utils/useTransitionStatus.js";
5
5
  * Indicates whether the item is selected.
6
6
  * Renders a `<span>` element.
7
7
  */
8
- export declare const ComboboxItemIndicator: React.ForwardRefExoticComponent<ComboboxItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
8
+ export declare const ComboboxItemIndicator: React.ForwardRefExoticComponent<Omit<ComboboxItemIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
9
9
  export interface ComboboxItemIndicatorProps extends BaseUIComponentProps<'span', ComboboxItemIndicator.State> {
10
10
  children?: React.ReactNode;
11
11
  /**
@@ -4,7 +4,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
4
4
  * A list container for the items.
5
5
  * Renders a `<div>` element.
6
6
  */
7
- export declare const ComboboxList: React.ForwardRefExoticComponent<ComboboxListProps & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const ComboboxList: React.ForwardRefExoticComponent<Omit<ComboboxListProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
8
  export interface ComboboxListState {
9
9
  /**
10
10
  * Whether the list is empty.
@@ -7,7 +7,7 @@ import type { TransitionStatus } from "../../utils/useTransitionStatus.js";
7
7
  * A container for the list.
8
8
  * Renders a `<div>` element.
9
9
  */
10
- export declare const ComboboxPopup: React.ForwardRefExoticComponent<ComboboxPopupProps & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const ComboboxPopup: React.ForwardRefExoticComponent<Omit<ComboboxPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
11
  export interface ComboboxPopupState {
12
12
  open: boolean;
13
13
  side: Side;
@@ -42,6 +42,7 @@ export const ComboboxPopup = /*#__PURE__*/React.forwardRef(function ComboboxPopu
42
42
  const transitionStatus = useStore(store, selectors.transitionStatus);
43
43
  const inputInsidePopup = useStore(store, selectors.inputInsidePopup);
44
44
  const inputElement = useStore(store, selectors.inputElement);
45
+ const modal = useStore(store, selectors.modal);
45
46
  const empty = filteredItems.length === 0;
46
47
  useOpenChangeComplete({
47
48
  open,
@@ -90,7 +91,7 @@ export const ComboboxPopup = /*#__PURE__*/React.forwardRef(function ComboboxPopu
90
91
  return /*#__PURE__*/_jsx(FloatingFocusManager, {
91
92
  context: floatingRootContext,
92
93
  disabled: !mounted,
93
- modal: !inputInsidePopup,
94
+ modal: inputInsidePopup ? modal : false,
94
95
  openInteractionType: openMethod,
95
96
  initialFocus: resolvedInitialFocus,
96
97
  returnFocus: resolvedFinalFocus,
@@ -5,7 +5,7 @@ import { FloatingPortal } from "../../floating-ui-react/index.js";
5
5
  * By default, the portal element is appended to `<body>`.
6
6
  * Renders a `<div>` element.
7
7
  */
8
- export declare const ComboboxPortal: React.ForwardRefExoticComponent<ComboboxPortalProps & React.RefAttributes<HTMLDivElement>>;
8
+ export declare const ComboboxPortal: React.ForwardRefExoticComponent<Omit<ComboboxPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  export declare namespace ComboboxPortal {
10
10
  interface State {}
11
11
  }
@@ -5,7 +5,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
5
5
  * Positions the popup against the trigger.
6
6
  * Renders a `<div>` element.
7
7
  */
8
- export declare const ComboboxPositioner: React.ForwardRefExoticComponent<ComboboxPositionerProps & React.RefAttributes<HTMLDivElement>>;
8
+ export declare const ComboboxPositioner: React.ForwardRefExoticComponent<Omit<ComboboxPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  export interface ComboboxPositionerState {
10
10
  /**
11
11
  * Whether the popup is currently open.
@@ -81,6 +81,13 @@ interface ComboboxRootProps<ItemValue> {
81
81
  * @default true
82
82
  */
83
83
  highlightItemOnHover?: boolean;
84
+ /**
85
+ * Whether to loop keyboard focus back to the input when the end of the list is reached while using the arrow keys. The first item can then be reached by pressing <kbd>ArrowDown</kbd> again from the input, or the last item can be reached by pressing <kbd>ArrowUp</kbd> from the input.
86
+ * The input is always included in the focus loop per [ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/).
87
+ * When disabled, focus does not move when on the last element and the user presses <kbd>ArrowDown</kbd>, or when on the first element and the user presses <kbd>ArrowUp</kbd>.
88
+ * @default true
89
+ */
90
+ loopFocus?: boolean;
84
91
  /**
85
92
  * The input value of the combobox. Use when controlled.
86
93
  */
@@ -101,7 +108,7 @@ interface ComboboxRootProps<ItemValue> {
101
108
  * Instead, the `unmount` function must be called to unmount the combobox manually.
102
109
  * Useful when the combobox's animation is controlled by an external library.
103
110
  */
104
- actionsRef?: React.RefObject<AriaCombobox.Actions>;
111
+ actionsRef?: React.RefObject<AriaCombobox.Actions | null>;
105
112
  /**
106
113
  * Callback fired when an item is highlighted or unhighlighted.
107
114
  * Receives the highlighted item value (or `undefined` if no item is highlighted) and event details with a `reason` property describing why the highlight changed.
@@ -6,7 +6,7 @@ import { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';
6
6
  import { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';
7
7
  import { useStableCallback } from '@base-ui/utils/useStableCallback';
8
8
  import { useMergedRefs } from '@base-ui/utils/useMergedRefs';
9
- import { visuallyHidden } from '@base-ui/utils/visuallyHidden';
9
+ import { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';
10
10
  import { useRefWithInit } from '@base-ui/utils/useRefWithInit';
11
11
  import { Store, useStore } from '@base-ui/utils/store';
12
12
  import { useValueAsRef } from '@base-ui/utils/useValueAsRef';
@@ -60,6 +60,7 @@ export function AriaCombobox(props) {
60
60
  autoHighlight = false,
61
61
  keepHighlight = false,
62
62
  highlightItemOnHover = true,
63
+ loopFocus = true,
63
64
  itemToStringLabel,
64
65
  itemToStringValue,
65
66
  isItemEqualToValue = defaultItemEquality,
@@ -82,6 +83,9 @@ export function AriaCombobox(props) {
82
83
  setFilled,
83
84
  name: fieldName,
84
85
  disabled: fieldDisabled,
86
+ setTouched,
87
+ setFocused,
88
+ validationMode,
85
89
  validation
86
90
  } = useFieldRootContext();
87
91
  const id = useLabelableId({
@@ -447,6 +451,14 @@ export function AriaCombobox(props) {
447
451
  }
448
452
  }
449
453
  setOpenUnwrapped(nextOpen);
454
+ if (!nextOpen && inputInsidePopup && (eventDetails.reason === REASONS.focusOut || eventDetails.reason === REASONS.outsidePress)) {
455
+ setTouched(true);
456
+ setFocused(false);
457
+ if (validationMode === 'onBlur') {
458
+ const valueToValidate = selectionMode === 'none' ? inputValue : selectedValue;
459
+ validation.commit(valueToValidate);
460
+ }
461
+ }
450
462
  });
451
463
  const setSelectedValue = useStableCallback((nextValue, eventDetails) => {
452
464
  // Cast to `any` due to conditional value type (single vs. multiple).
@@ -673,11 +685,11 @@ export function AriaCombobox(props) {
673
685
  const current = Array.isArray(selectedValue) ? selectedValue : EMPTY_ARRAY;
674
686
  const next = current.filter(v => itemIncludes(registry, v, store.state.isItemEqualToValue));
675
687
  if (next.length !== current.length) {
676
- setSelectedValueUnwrapped(next);
688
+ setSelectedValue(next, createChangeEventDetails(REASONS.none));
677
689
  }
678
690
  return;
679
691
  }
680
- const isStillPresent = selectedValue == null ? true : itemIncludes(registry, selectedValue, store.state.isItemEqualToValue);
692
+ const isStillPresent = selectedValue == null || itemIncludes(registry, selectedValue, store.state.isItemEqualToValue);
681
693
  if (isStillPresent) {
682
694
  return;
683
695
  }
@@ -685,16 +697,8 @@ export function AriaCombobox(props) {
685
697
  if (defaultSelectedValue != null && itemIncludes(registry, defaultSelectedValue, store.state.isItemEqualToValue)) {
686
698
  fallback = defaultSelectedValue;
687
699
  }
688
- setSelectedValueUnwrapped(fallback);
689
-
690
- // Keep the input text in sync when the input is rendered outside the popup.
691
- if (!store.state.inputInsidePopup) {
692
- const stringVal = stringifyAsLabel(fallback, itemToStringLabel);
693
- if (inputRef.current && inputRef.current.value !== stringVal) {
694
- setInputValue(stringVal, createChangeEventDetails(REASONS.none));
695
- }
696
- }
697
- }, [items, flatItems, multiple, selectionMode, selectedValue, defaultSelectedValue, setSelectedValueUnwrapped, itemToStringLabel, store, setInputValue]);
700
+ setSelectedValue(fallback, createChangeEventDetails(REASONS.none));
701
+ }, [items, flatItems, multiple, selectionMode, selectedValue, defaultSelectedValue, store, setSelectedValue]);
698
702
  useIsoLayoutEffect(() => {
699
703
  if (selectionMode === 'none') {
700
704
  setFilled(String(inputValue) !== '');
@@ -831,8 +835,8 @@ export function AriaCombobox(props) {
831
835
  activeIndex,
832
836
  selectedIndex,
833
837
  virtual: true,
834
- loopFocus: true,
835
- allowEscape: !autoHighlightMode,
838
+ loopFocus,
839
+ allowEscape: loopFocus && !autoHighlightMode,
836
840
  focusItemOnOpen: queryChangedAfterOpen || selectionMode === 'none' && !autoHighlightMode ? false : 'auto',
837
841
  focusItemOnHover: highlightItemOnHover,
838
842
  resetOnPointerLeave: !keepHighlight,
@@ -996,14 +1000,13 @@ export function AriaCombobox(props) {
996
1000
  }
997
1001
  }
998
1002
  }),
999
- id: id,
1000
1003
  name: multiple || selectionMode === 'none' ? undefined : name,
1001
1004
  disabled: disabled,
1002
1005
  required: required && !hasMultipleSelection,
1003
1006
  readOnly: readOnly,
1004
1007
  value: serializedValue,
1005
1008
  ref: hiddenInputRef,
1006
- style: visuallyHidden,
1009
+ style: name ? visuallyHiddenInput : visuallyHidden,
1007
1010
  tabIndex: -1,
1008
1011
  "aria-hidden": true
1009
1012
  }), hiddenInputs]
@@ -53,7 +53,7 @@ export type ComboboxRootProps<Value, Multiple extends boolean | undefined = fals
53
53
  * Instead, the `unmount` function must be called to unmount the combobox manually.
54
54
  * Useful when the combobox's animation is controlled by an external library.
55
55
  */
56
- actionsRef?: React.RefObject<ComboboxRoot.Actions>;
56
+ actionsRef?: React.RefObject<ComboboxRoot.Actions | null>;
57
57
  /**
58
58
  * Event handler called when the popup is opened or closed.
59
59
  */
@@ -5,7 +5,7 @@ import { BaseUIComponentProps } from "../../utils/types.js";
5
5
  * Enable `grid` on the root component to turn the listbox into a grid.
6
6
  * Renders a `<div>` element.
7
7
  */
8
- export declare const ComboboxRow: React.ForwardRefExoticComponent<ComboboxRowProps & React.RefAttributes<HTMLDivElement>>;
8
+ export declare const ComboboxRow: React.ForwardRefExoticComponent<Omit<ComboboxRowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  export interface ComboboxRowState {}
10
10
  export interface ComboboxRowProps extends BaseUIComponentProps<'div', ComboboxRow.State> {}
11
11
  export declare namespace ComboboxRow {