@base-ui/react 1.6.0 → 1.7.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 (1217) hide show
  1. package/CHANGELOG.md +229 -0
  2. package/accordion/item/AccordionItem.js +6 -13
  3. package/accordion/item/AccordionItem.mjs +6 -13
  4. package/accordion/item/AccordionItemContext.d.mts +2 -1
  5. package/accordion/item/AccordionItemContext.d.ts +2 -1
  6. package/accordion/item/stateAttributesMapping.js +3 -5
  7. package/accordion/item/stateAttributesMapping.mjs +3 -5
  8. package/accordion/panel/AccordionPanel.js +12 -11
  9. package/accordion/panel/AccordionPanel.mjs +12 -11
  10. package/accordion/panel/AccordionPanelDataAttributes.d.mts +1 -1
  11. package/accordion/panel/AccordionPanelDataAttributes.d.ts +1 -1
  12. package/accordion/panel/AccordionPanelDataAttributes.js +1 -1
  13. package/accordion/panel/AccordionPanelDataAttributes.mjs +1 -1
  14. package/accordion/root/AccordionRoot.js +4 -7
  15. package/accordion/root/AccordionRoot.mjs +4 -7
  16. package/accordion/trigger/AccordionTrigger.js +7 -7
  17. package/accordion/trigger/AccordionTrigger.mjs +7 -7
  18. package/alert-dialog/handle.d.mts +6 -8
  19. package/alert-dialog/handle.d.ts +6 -8
  20. package/alert-dialog/handle.js +8 -19
  21. package/alert-dialog/handle.mjs +7 -17
  22. package/alert-dialog/root/AlertDialogRoot.js +1 -1
  23. package/alert-dialog/root/AlertDialogRoot.mjs +1 -1
  24. package/autocomplete/index.d.mts +1 -0
  25. package/autocomplete/index.d.ts +1 -0
  26. package/autocomplete/index.parts.d.mts +1 -1
  27. package/autocomplete/index.parts.d.ts +1 -1
  28. package/autocomplete/index.parts.js +2 -2
  29. package/autocomplete/index.parts.mjs +1 -1
  30. package/autocomplete/input-group/AutocompleteInputGroup.d.mts +1 -1
  31. package/autocomplete/input-group/AutocompleteInputGroup.d.ts +1 -1
  32. package/autocomplete/root/AutocompleteRoot.d.mts +6 -1
  33. package/autocomplete/root/AutocompleteRoot.d.ts +6 -1
  34. package/autocomplete/root/AutocompleteRoot.js +4 -10
  35. package/autocomplete/root/AutocompleteRoot.mjs +4 -10
  36. package/autocomplete/separator/AutocompleteSeparator.d.mts +26 -0
  37. package/autocomplete/separator/AutocompleteSeparator.d.ts +26 -0
  38. package/autocomplete/separator/AutocompleteSeparator.js +15 -0
  39. package/autocomplete/separator/AutocompleteSeparator.mjs +10 -0
  40. package/autocomplete/trigger/AutocompleteTrigger.d.mts +1 -1
  41. package/autocomplete/trigger/AutocompleteTrigger.d.ts +1 -1
  42. package/avatar/fallback/AvatarFallback.d.mts +2 -0
  43. package/avatar/fallback/AvatarFallback.d.ts +2 -0
  44. package/avatar/fallback/AvatarFallback.js +5 -5
  45. package/avatar/fallback/AvatarFallback.mjs +5 -5
  46. package/avatar/image/AvatarImage.d.mts +1 -1
  47. package/avatar/image/AvatarImage.d.ts +1 -1
  48. package/avatar/image/AvatarImageDataAttributes.d.mts +1 -1
  49. package/avatar/image/AvatarImageDataAttributes.d.ts +1 -1
  50. package/avatar/image/AvatarImageDataAttributes.js +1 -1
  51. package/avatar/image/AvatarImageDataAttributes.mjs +1 -1
  52. package/checkbox/indicator/CheckboxIndicator.js +3 -5
  53. package/checkbox/indicator/CheckboxIndicator.mjs +3 -5
  54. package/checkbox/indicator/CheckboxIndicatorDataAttributes.d.mts +1 -1
  55. package/checkbox/indicator/CheckboxIndicatorDataAttributes.d.ts +1 -1
  56. package/checkbox/indicator/CheckboxIndicatorDataAttributes.js +1 -1
  57. package/checkbox/indicator/CheckboxIndicatorDataAttributes.mjs +1 -1
  58. package/checkbox/root/CheckboxRoot.d.mts +2 -1
  59. package/checkbox/root/CheckboxRoot.d.ts +2 -1
  60. package/checkbox/root/CheckboxRoot.js +39 -31
  61. package/checkbox/root/CheckboxRoot.mjs +39 -31
  62. package/checkbox/utils/{useStateAttributesMapping.d.mts → getCheckboxStateAttributesMapping.d.mts} +1 -1
  63. package/checkbox/utils/{useStateAttributesMapping.d.ts → getCheckboxStateAttributesMapping.d.ts} +1 -1
  64. package/checkbox/utils/getCheckboxStateAttributesMapping.js +26 -0
  65. package/checkbox/utils/{useStateAttributesMapping.mjs → getCheckboxStateAttributesMapping.mjs} +5 -9
  66. package/checkbox-group/CheckboxGroup.js +33 -24
  67. package/checkbox-group/CheckboxGroup.mjs +33 -24
  68. package/checkbox-group/CheckboxGroupContext.d.mts +2 -5
  69. package/checkbox-group/CheckboxGroupContext.d.ts +2 -5
  70. package/checkbox-group/CheckboxGroupContext.js +2 -8
  71. package/checkbox-group/CheckboxGroupContext.mjs +2 -7
  72. package/checkbox-group/useCheckboxGroupParent.d.mts +2 -4
  73. package/checkbox-group/useCheckboxGroupParent.d.ts +2 -4
  74. package/checkbox-group/useCheckboxGroupParent.js +5 -6
  75. package/checkbox-group/useCheckboxGroupParent.mjs +5 -6
  76. package/collapsible/panel/CollapsiblePanel.js +12 -11
  77. package/collapsible/panel/CollapsiblePanel.mjs +12 -11
  78. package/collapsible/panel/CollapsiblePanelDataAttributes.d.mts +1 -1
  79. package/collapsible/panel/CollapsiblePanelDataAttributes.d.ts +1 -1
  80. package/collapsible/panel/CollapsiblePanelDataAttributes.js +1 -1
  81. package/collapsible/panel/CollapsiblePanelDataAttributes.mjs +1 -1
  82. package/collapsible/panel/useCollapsiblePanel.js +29 -24
  83. package/collapsible/panel/useCollapsiblePanel.mjs +29 -24
  84. package/collapsible/root/CollapsibleRootDataAttributes.d.mts +18 -0
  85. package/collapsible/root/CollapsibleRootDataAttributes.d.ts +18 -0
  86. package/collapsible/root/CollapsibleRootDataAttributes.js +26 -0
  87. package/collapsible/root/CollapsibleRootDataAttributes.mjs +20 -0
  88. package/collapsible/root/useCollapsibleRoot.d.mts +2 -1
  89. package/collapsible/root/useCollapsibleRoot.d.ts +2 -1
  90. package/collapsible/root/useCollapsibleRoot.js +5 -3
  91. package/collapsible/root/useCollapsibleRoot.mjs +5 -3
  92. package/combobox/arrow/ComboboxArrow.d.mts +1 -1
  93. package/combobox/arrow/ComboboxArrow.d.ts +1 -1
  94. package/combobox/backdrop/ComboboxBackdropDataAttributes.d.mts +1 -1
  95. package/combobox/backdrop/ComboboxBackdropDataAttributes.d.ts +1 -1
  96. package/combobox/backdrop/ComboboxBackdropDataAttributes.js +1 -1
  97. package/combobox/backdrop/ComboboxBackdropDataAttributes.mjs +1 -1
  98. package/combobox/chip/ComboboxChip.js +4 -6
  99. package/combobox/chip/ComboboxChip.mjs +4 -6
  100. package/combobox/chip-remove/ComboboxChipRemove.js +1 -7
  101. package/combobox/chip-remove/ComboboxChipRemove.mjs +1 -7
  102. package/combobox/clear/ComboboxClear.js +5 -3
  103. package/combobox/clear/ComboboxClear.mjs +5 -3
  104. package/combobox/clear/ComboboxClearDataAttributes.d.mts +1 -1
  105. package/combobox/clear/ComboboxClearDataAttributes.d.ts +1 -1
  106. package/combobox/clear/ComboboxClearDataAttributes.js +1 -1
  107. package/combobox/clear/ComboboxClearDataAttributes.mjs +1 -1
  108. package/combobox/collection/ComboboxCollection.d.mts +1 -1
  109. package/combobox/collection/ComboboxCollection.d.ts +1 -1
  110. package/combobox/collection/ComboboxCollection.js +0 -3
  111. package/combobox/collection/ComboboxCollection.mjs +0 -3
  112. package/combobox/group-label/ComboboxGroupLabel.js +1 -1
  113. package/combobox/group-label/ComboboxGroupLabel.mjs +1 -1
  114. package/combobox/index.d.mts +1 -0
  115. package/combobox/index.d.ts +1 -0
  116. package/combobox/index.parts.d.mts +1 -1
  117. package/combobox/index.parts.d.ts +1 -1
  118. package/combobox/index.parts.js +2 -2
  119. package/combobox/index.parts.mjs +1 -1
  120. package/combobox/input/ComboboxInput.d.mts +1 -1
  121. package/combobox/input/ComboboxInput.d.ts +1 -1
  122. package/combobox/input/ComboboxInput.js +43 -88
  123. package/combobox/input/ComboboxInput.mjs +44 -89
  124. package/combobox/input-group/ComboboxInputGroup.d.mts +1 -1
  125. package/combobox/input-group/ComboboxInputGroup.d.ts +1 -1
  126. package/combobox/input-group/ComboboxInputGroup.js +3 -8
  127. package/combobox/input-group/ComboboxInputGroup.mjs +4 -9
  128. package/combobox/item/ComboboxItem.js +21 -23
  129. package/combobox/item/ComboboxItem.mjs +22 -24
  130. package/combobox/item-indicator/ComboboxItemIndicator.js +1 -2
  131. package/combobox/item-indicator/ComboboxItemIndicator.mjs +1 -2
  132. package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.d.mts +1 -1
  133. package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.d.ts +1 -1
  134. package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.js +1 -1
  135. package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.mjs +1 -1
  136. package/combobox/label/ComboboxLabel.js +2 -1
  137. package/combobox/label/ComboboxLabel.mjs +2 -1
  138. package/combobox/list/ComboboxList.js +5 -10
  139. package/combobox/list/ComboboxList.mjs +5 -10
  140. package/combobox/popup/ComboboxPopup.d.mts +1 -1
  141. package/combobox/popup/ComboboxPopup.d.ts +1 -1
  142. package/combobox/popup/ComboboxPopup.js +5 -7
  143. package/combobox/popup/ComboboxPopup.mjs +6 -8
  144. package/combobox/popup/ComboboxPopupDataAttributes.d.mts +1 -1
  145. package/combobox/popup/ComboboxPopupDataAttributes.d.ts +1 -1
  146. package/combobox/popup/ComboboxPopupDataAttributes.js +1 -1
  147. package/combobox/popup/ComboboxPopupDataAttributes.mjs +1 -1
  148. package/combobox/portal/ComboboxPortal.d.mts +6 -2
  149. package/combobox/portal/ComboboxPortal.d.ts +6 -2
  150. package/combobox/positioner/ComboboxPositioner.d.mts +1 -1
  151. package/combobox/positioner/ComboboxPositioner.d.ts +1 -1
  152. package/combobox/positioner/ComboboxPositioner.js +13 -13
  153. package/combobox/positioner/ComboboxPositioner.mjs +14 -14
  154. package/combobox/positioner/ComboboxPositionerContext.d.mts +1 -1
  155. package/combobox/positioner/ComboboxPositionerContext.d.ts +1 -1
  156. package/combobox/root/AriaCombobox.d.mts +5 -10
  157. package/combobox/root/AriaCombobox.d.ts +5 -10
  158. package/combobox/root/AriaCombobox.js +259 -196
  159. package/combobox/root/AriaCombobox.mjs +262 -199
  160. package/combobox/root/utils/index.js +2 -4
  161. package/combobox/root/utils/index.mjs +2 -4
  162. package/combobox/root/utils/useFilter.js +2 -3
  163. package/combobox/root/utils/useFilter.mjs +2 -3
  164. package/combobox/separator/ComboboxSeparator.d.mts +26 -0
  165. package/combobox/separator/ComboboxSeparator.d.ts +26 -0
  166. package/combobox/separator/ComboboxSeparator.js +15 -0
  167. package/combobox/separator/ComboboxSeparator.mjs +10 -0
  168. package/combobox/store.d.mts +6 -9
  169. package/combobox/store.d.ts +6 -9
  170. package/combobox/store.js +47 -48
  171. package/combobox/store.mjs +47 -48
  172. package/combobox/trigger/ComboboxTrigger.d.mts +1 -1
  173. package/combobox/trigger/ComboboxTrigger.d.ts +1 -1
  174. package/combobox/trigger/ComboboxTrigger.js +12 -33
  175. package/combobox/trigger/ComboboxTrigger.mjs +14 -34
  176. package/combobox/utils/ComboboxInternalDismissButton.d.mts +1 -5
  177. package/combobox/utils/ComboboxInternalDismissButton.d.ts +1 -5
  178. package/combobox/utils/parts.d.mts +24 -0
  179. package/combobox/utils/parts.d.ts +24 -0
  180. package/combobox/utils/parts.js +59 -0
  181. package/combobox/utils/parts.mjs +50 -0
  182. package/combobox/utils/stateAttributesMapping.d.mts +3 -3
  183. package/combobox/utils/stateAttributesMapping.d.ts +3 -3
  184. package/combobox/utils/useInitialLiveRegionTextMutation.js +1 -1
  185. package/combobox/utils/useInitialLiveRegionTextMutation.mjs +1 -1
  186. package/context-menu/root/ContextMenuRoot.d.mts +3 -1
  187. package/context-menu/root/ContextMenuRoot.d.ts +3 -1
  188. package/context-menu/trigger/ContextMenuTrigger.js +40 -22
  189. package/context-menu/trigger/ContextMenuTrigger.mjs +40 -22
  190. package/dialog/backdrop/DialogBackdrop.js +2 -10
  191. package/dialog/backdrop/DialogBackdrop.mjs +3 -10
  192. package/dialog/backdrop/DialogBackdropDataAttributes.d.mts +1 -1
  193. package/dialog/backdrop/DialogBackdropDataAttributes.d.ts +1 -1
  194. package/dialog/backdrop/DialogBackdropDataAttributes.js +1 -1
  195. package/dialog/backdrop/DialogBackdropDataAttributes.mjs +1 -1
  196. package/dialog/close/DialogClose.js +1 -3
  197. package/dialog/close/DialogClose.mjs +1 -3
  198. package/dialog/description/DialogDescription.js +1 -3
  199. package/dialog/description/DialogDescription.mjs +1 -3
  200. package/dialog/popup/DialogPopup.js +7 -23
  201. package/dialog/popup/DialogPopup.mjs +8 -23
  202. package/dialog/popup/DialogPopupDataAttributes.d.mts +1 -1
  203. package/dialog/popup/DialogPopupDataAttributes.d.ts +1 -1
  204. package/dialog/popup/DialogPopupDataAttributes.js +1 -1
  205. package/dialog/popup/DialogPopupDataAttributes.mjs +1 -1
  206. package/dialog/portal/DialogPortal.d.mts +3 -3
  207. package/dialog/portal/DialogPortal.d.ts +3 -3
  208. package/dialog/portal/DialogPortal.js +1 -3
  209. package/dialog/portal/DialogPortal.mjs +1 -3
  210. package/dialog/root/DialogRoot.js +1 -5
  211. package/dialog/root/DialogRoot.mjs +1 -4
  212. package/dialog/root/DialogRootContext.d.mts +3 -7
  213. package/dialog/root/DialogRootContext.d.ts +3 -7
  214. package/dialog/root/DialogRootContext.js +4 -6
  215. package/dialog/root/DialogRootContext.mjs +3 -5
  216. package/dialog/root/useDialogRoot.d.mts +0 -6
  217. package/dialog/root/useDialogRoot.d.ts +0 -6
  218. package/dialog/root/useDialogRoot.js +33 -46
  219. package/dialog/root/useDialogRoot.mjs +34 -46
  220. package/dialog/root/useRenderDialogRoot.d.mts +1 -1
  221. package/dialog/root/useRenderDialogRoot.d.ts +1 -1
  222. package/dialog/root/useRenderDialogRoot.js +34 -42
  223. package/dialog/root/useRenderDialogRoot.mjs +36 -44
  224. package/dialog/store/DialogHandle.d.mts +20 -16
  225. package/dialog/store/DialogHandle.d.ts +20 -16
  226. package/dialog/store/DialogHandle.js +32 -27
  227. package/dialog/store/DialogHandle.mjs +33 -28
  228. package/dialog/store/DialogStore.d.mts +14 -4
  229. package/dialog/store/DialogStore.d.ts +14 -4
  230. package/dialog/store/DialogStore.js +49 -34
  231. package/dialog/store/DialogStore.mjs +49 -35
  232. package/dialog/title/DialogTitle.js +1 -3
  233. package/dialog/title/DialogTitle.mjs +1 -3
  234. package/dialog/trigger/DialogTrigger.js +4 -5
  235. package/dialog/trigger/DialogTrigger.mjs +5 -6
  236. package/dialog/utils/stateAttributesMapping.d.mts +12 -0
  237. package/dialog/utils/stateAttributesMapping.d.ts +12 -0
  238. package/dialog/utils/stateAttributesMapping.js +21 -0
  239. package/dialog/utils/stateAttributesMapping.mjs +15 -0
  240. package/dialog/viewport/DialogViewport.js +3 -22
  241. package/dialog/viewport/DialogViewport.mjs +3 -21
  242. package/dialog/viewport/DialogViewportDataAttributes.d.mts +1 -1
  243. package/dialog/viewport/DialogViewportDataAttributes.d.ts +1 -1
  244. package/dialog/viewport/DialogViewportDataAttributes.js +1 -1
  245. package/dialog/viewport/DialogViewportDataAttributes.mjs +1 -1
  246. package/docs/index.md +1 -0
  247. package/docs/react/components/accordion.md +1 -1
  248. package/docs/react/components/alert-dialog.md +25 -21
  249. package/docs/react/components/autocomplete.md +158 -103
  250. package/docs/react/components/avatar.md +15 -11
  251. package/docs/react/components/checkbox.md +21 -21
  252. package/docs/react/components/collapsible.md +10 -1
  253. package/docs/react/components/combobox.md +51 -23
  254. package/docs/react/components/context-menu.md +474 -87
  255. package/docs/react/components/dialog.md +396 -21
  256. package/docs/react/components/drawer.md +27 -23
  257. package/docs/react/components/field.md +11 -11
  258. package/docs/react/components/form.md +13 -11
  259. package/docs/react/components/menu.md +138 -118
  260. package/docs/react/components/menubar.md +41 -41
  261. package/docs/react/components/navigation-menu.md +57 -71
  262. package/docs/react/components/number-field.md +6 -6
  263. package/docs/react/components/otp-field.md +20 -18
  264. package/docs/react/components/popover.md +51 -36
  265. package/docs/react/components/preview-card.md +56 -47
  266. package/docs/react/components/progress.md +3 -3
  267. package/docs/react/components/radio.md +1 -1
  268. package/docs/react/components/select.md +57 -55
  269. package/docs/react/components/slider.md +22 -22
  270. package/docs/react/components/tabs.md +275 -1
  271. package/docs/react/components/toast.md +21 -26
  272. package/docs/react/components/toolbar.md +27 -23
  273. package/docs/react/components/tooltip.md +30 -17
  274. package/docs/react/handbook/animation.md +3 -3
  275. package/docs/react/handbook/forms.md +3 -3
  276. package/docs/react/handbook/styling.md +1 -1
  277. package/docs/react/overview/about.md +10 -7
  278. package/docs/react/overview/community.md +3 -2
  279. package/docs/react/overview/quick-start.md +3 -3
  280. package/docs/react/overview/releases/v1-7-0.md +236 -0
  281. package/docs/react/overview/releases.md +10 -2
  282. package/docs/react/utils/direction-provider.md +5 -2
  283. package/drawer/backdrop/DrawerBackdrop.js +2 -10
  284. package/drawer/backdrop/DrawerBackdrop.mjs +3 -10
  285. package/drawer/backdrop/DrawerBackdropDataAttributes.d.mts +1 -1
  286. package/drawer/backdrop/DrawerBackdropDataAttributes.d.ts +1 -1
  287. package/drawer/backdrop/DrawerBackdropDataAttributes.js +1 -1
  288. package/drawer/backdrop/DrawerBackdropDataAttributes.mjs +1 -1
  289. package/drawer/handle.d.mts +16 -0
  290. package/drawer/handle.d.ts +16 -0
  291. package/drawer/handle.js +25 -0
  292. package/drawer/handle.mjs +18 -0
  293. package/drawer/indent/DrawerIndent.js +1 -1
  294. package/drawer/indent/DrawerIndent.mjs +1 -1
  295. package/drawer/indent-background/DrawerIndentBackground.js +1 -1
  296. package/drawer/indent-background/DrawerIndentBackground.mjs +1 -1
  297. package/drawer/index.parts.d.mts +1 -1
  298. package/drawer/index.parts.d.ts +1 -1
  299. package/drawer/index.parts.js +3 -3
  300. package/drawer/index.parts.mjs +1 -1
  301. package/drawer/popup/DrawerPopup.js +10 -12
  302. package/drawer/popup/DrawerPopup.mjs +11 -13
  303. package/drawer/popup/DrawerPopupDataAttributes.d.mts +1 -1
  304. package/drawer/popup/DrawerPopupDataAttributes.d.ts +1 -1
  305. package/drawer/popup/DrawerPopupDataAttributes.js +1 -1
  306. package/drawer/popup/DrawerPopupDataAttributes.mjs +1 -1
  307. package/drawer/portal/DrawerPortal.d.mts +3 -3
  308. package/drawer/portal/DrawerPortal.d.ts +3 -3
  309. package/drawer/provider/DrawerProvider.js +13 -24
  310. package/drawer/provider/DrawerProvider.mjs +13 -24
  311. package/drawer/provider/DrawerProviderContext.d.mts +3 -4
  312. package/drawer/provider/DrawerProviderContext.d.ts +3 -4
  313. package/drawer/provider/DrawerProviderContext.js +2 -8
  314. package/drawer/provider/DrawerProviderContext.mjs +2 -7
  315. package/drawer/root/DrawerRoot.d.mts +2 -2
  316. package/drawer/root/DrawerRoot.d.ts +2 -2
  317. package/drawer/root/DrawerRoot.js +30 -34
  318. package/drawer/root/DrawerRoot.mjs +31 -35
  319. package/drawer/root/DrawerRootContext.d.mts +7 -2
  320. package/drawer/root/DrawerRootContext.d.ts +7 -2
  321. package/drawer/root/DrawerRootContext.js +1 -1
  322. package/drawer/root/DrawerRootContext.mjs +1 -1
  323. package/drawer/root/useDrawerSnapPoints.d.mts +6 -2
  324. package/drawer/root/useDrawerSnapPoints.d.ts +6 -2
  325. package/drawer/root/useDrawerSnapPoints.js +16 -24
  326. package/drawer/root/useDrawerSnapPoints.mjs +15 -24
  327. package/drawer/swipe-area/DrawerSwipeArea.js +82 -49
  328. package/drawer/swipe-area/DrawerSwipeArea.mjs +82 -49
  329. package/drawer/trigger/DrawerTrigger.d.mts +1 -1
  330. package/drawer/trigger/DrawerTrigger.d.ts +1 -1
  331. package/drawer/viewport/DrawerViewport.js +178 -340
  332. package/drawer/viewport/DrawerViewport.mjs +180 -342
  333. package/drawer/viewport/DrawerViewportContext.d.mts +1 -2
  334. package/drawer/viewport/DrawerViewportContext.d.ts +1 -2
  335. package/drawer/viewport/DrawerViewportContext.js +2 -8
  336. package/drawer/viewport/DrawerViewportContext.mjs +2 -7
  337. package/drawer/viewport/DrawerViewportDataAttributes.d.mts +1 -1
  338. package/drawer/viewport/DrawerViewportDataAttributes.d.ts +1 -1
  339. package/drawer/viewport/DrawerViewportDataAttributes.js +1 -1
  340. package/drawer/viewport/DrawerViewportDataAttributes.mjs +1 -1
  341. package/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardProvider.js +250 -60
  342. package/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardProvider.mjs +250 -60
  343. package/field/control/FieldControl.js +2 -2
  344. package/field/control/FieldControl.mjs +2 -2
  345. package/field/error/FieldError.js +2 -2
  346. package/field/error/FieldError.mjs +2 -2
  347. package/field/error/FieldErrorDataAttributes.d.mts +1 -1
  348. package/field/error/FieldErrorDataAttributes.d.ts +1 -1
  349. package/field/error/FieldErrorDataAttributes.js +1 -1
  350. package/field/error/FieldErrorDataAttributes.mjs +1 -1
  351. package/field/item/FieldItem.js +0 -5
  352. package/field/item/FieldItem.mjs +0 -5
  353. package/field/root/FieldRoot.js +8 -15
  354. package/field/root/FieldRoot.mjs +8 -15
  355. package/field/root/useFieldValidation.d.mts +17 -2
  356. package/field/root/useFieldValidation.d.ts +17 -2
  357. package/field/root/useFieldValidation.js +83 -77
  358. package/field/root/useFieldValidation.mjs +82 -77
  359. package/field/validity/FieldValidity.js +4 -0
  360. package/field/validity/FieldValidity.mjs +4 -0
  361. package/fieldset/legend/FieldsetLegend.js +3 -10
  362. package/fieldset/legend/FieldsetLegend.mjs +4 -10
  363. package/fieldset/root/FieldsetRootContext.d.mts +1 -1
  364. package/fieldset/root/FieldsetRootContext.d.ts +1 -1
  365. package/floating-ui-react/components/FloatingDelayGroup.d.mts +2 -41
  366. package/floating-ui-react/components/FloatingDelayGroup.d.ts +2 -41
  367. package/floating-ui-react/components/FloatingDelayGroup.js +0 -9
  368. package/floating-ui-react/components/FloatingDelayGroup.mjs +0 -9
  369. package/floating-ui-react/components/FloatingFocusManager.d.mts +1 -7
  370. package/floating-ui-react/components/FloatingFocusManager.d.ts +1 -7
  371. package/floating-ui-react/components/FloatingFocusManager.js +41 -27
  372. package/floating-ui-react/components/FloatingFocusManager.mjs +41 -27
  373. package/floating-ui-react/components/FloatingPortal.d.mts +7 -14
  374. package/floating-ui-react/components/FloatingPortal.d.ts +7 -14
  375. package/floating-ui-react/components/FloatingPortal.js +11 -13
  376. package/floating-ui-react/components/FloatingPortal.mjs +11 -13
  377. package/floating-ui-react/components/FloatingRootStore.js +6 -6
  378. package/floating-ui-react/components/FloatingRootStore.mjs +7 -7
  379. package/floating-ui-react/components/FloatingTree.d.mts +1 -19
  380. package/floating-ui-react/components/FloatingTree.d.ts +1 -19
  381. package/floating-ui-react/hooks/useClick.js +5 -1
  382. package/floating-ui-react/hooks/useClick.mjs +6 -2
  383. package/floating-ui-react/hooks/useDismiss.js +2 -2
  384. package/floating-ui-react/hooks/useDismiss.mjs +2 -2
  385. package/floating-ui-react/hooks/useFloating.d.mts +9 -1
  386. package/floating-ui-react/hooks/useFloating.d.ts +9 -1
  387. package/floating-ui-react/hooks/useFloating.js +14 -2
  388. package/floating-ui-react/hooks/useFloating.mjs +13 -2
  389. package/floating-ui-react/hooks/useHoverReferenceInteraction.d.mts +12 -0
  390. package/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +12 -0
  391. package/floating-ui-react/hooks/useHoverReferenceInteraction.js +16 -4
  392. package/floating-ui-react/hooks/useHoverReferenceInteraction.mjs +16 -4
  393. package/floating-ui-react/hooks/useListNavigation.js +15 -1
  394. package/floating-ui-react/hooks/useListNavigation.mjs +15 -1
  395. package/floating-ui-react/hooks/useTypeahead.d.mts +5 -5
  396. package/floating-ui-react/hooks/useTypeahead.d.ts +5 -5
  397. package/floating-ui-react/hooks/useTypeahead.js +9 -14
  398. package/floating-ui-react/hooks/useTypeahead.mjs +9 -14
  399. package/floating-ui-react/index.d.mts +0 -4
  400. package/floating-ui-react/index.d.ts +0 -4
  401. package/floating-ui-react/index.mjs +12 -0
  402. package/floating-ui-react/utils/composite.js +7 -0
  403. package/floating-ui-react/utils/composite.mjs +7 -0
  404. package/form/Form.d.mts +1 -1
  405. package/form/Form.d.ts +1 -1
  406. package/form/Form.js +62 -47
  407. package/form/Form.mjs +62 -47
  408. package/index.js +1 -1
  409. package/index.mjs +1 -1
  410. package/internals/PrehydrationScript.d.mts +36 -0
  411. package/internals/PrehydrationScript.d.ts +36 -0
  412. package/internals/PrehydrationScript.js +59 -0
  413. package/internals/PrehydrationScript.mjs +54 -0
  414. package/internals/composite/composite.d.mts +2 -10
  415. package/internals/composite/composite.d.ts +2 -10
  416. package/internals/composite/composite.js +4 -12
  417. package/internals/composite/composite.mjs +3 -11
  418. package/internals/composite/index.d.mts +2 -1
  419. package/internals/composite/index.d.ts +2 -1
  420. package/internals/composite/index.js +11 -4
  421. package/internals/composite/index.mjs +1 -1
  422. package/internals/composite/item/CompositeItem.d.mts +0 -3
  423. package/internals/composite/item/CompositeItem.d.ts +0 -3
  424. package/internals/composite/item/CompositeItem.js +2 -4
  425. package/internals/composite/item/CompositeItem.mjs +2 -4
  426. package/internals/composite/item/useCompositeItem.d.mts +1 -1
  427. package/internals/composite/item/useCompositeItem.d.ts +1 -1
  428. package/internals/composite/list/CompositeList.d.mts +3 -3
  429. package/internals/composite/list/CompositeList.d.ts +3 -3
  430. package/internals/composite/list/CompositeList.js +165 -86
  431. package/internals/composite/list/CompositeList.mjs +165 -86
  432. package/internals/composite/list/CompositeListContext.d.mts +8 -4
  433. package/internals/composite/list/CompositeListContext.d.ts +8 -4
  434. package/internals/composite/list/CompositeListContext.js +1 -6
  435. package/internals/composite/list/CompositeListContext.mjs +1 -6
  436. package/internals/composite/list/useCompositeListItem.d.mts +11 -8
  437. package/internals/composite/list/useCompositeListItem.d.ts +11 -8
  438. package/internals/composite/list/useCompositeListItem.js +25 -32
  439. package/internals/composite/list/useCompositeListItem.mjs +25 -32
  440. package/internals/composite/root/CompositeRoot.d.mts +1 -4
  441. package/internals/composite/root/CompositeRoot.d.ts +1 -4
  442. package/internals/composite/root/CompositeRoot.js +0 -3
  443. package/internals/composite/root/CompositeRoot.mjs +0 -3
  444. package/internals/composite/root/useCompositeRoot.d.mts +0 -1
  445. package/internals/composite/root/useCompositeRoot.d.ts +0 -1
  446. package/internals/composite/root/useCompositeRoot.js +19 -39
  447. package/internals/composite/root/useCompositeRoot.mjs +20 -40
  448. package/internals/createBaseUIEventDetails.d.mts +1 -1
  449. package/internals/createBaseUIEventDetails.d.ts +1 -1
  450. package/internals/csp-context/CSPContext.d.mts +0 -6
  451. package/internals/csp-context/CSPContext.d.ts +0 -6
  452. package/internals/csp-context/CSPContext.js +0 -7
  453. package/internals/csp-context/CSPContext.mjs +0 -7
  454. package/internals/direction-context/DirectionContext.d.mts +0 -3
  455. package/internals/direction-context/DirectionContext.d.ts +0 -3
  456. package/internals/direction-context/DirectionContext.js +0 -3
  457. package/internals/direction-context/DirectionContext.mjs +0 -3
  458. package/internals/field-constants/constants.js +2 -3
  459. package/internals/field-constants/constants.mjs +2 -3
  460. package/internals/field-register-control/useFieldControlRegistration.d.mts +1 -1
  461. package/internals/field-register-control/useFieldControlRegistration.d.ts +1 -1
  462. package/internals/field-register-control/useFieldControlRegistration.js +21 -16
  463. package/internals/field-register-control/useFieldControlRegistration.mjs +21 -16
  464. package/internals/field-register-control/useRegisterFieldControl.js +13 -9
  465. package/internals/field-register-control/useRegisterFieldControl.mjs +13 -8
  466. package/internals/field-root-context/FieldRootContext.d.mts +0 -7
  467. package/internals/field-root-context/FieldRootContext.d.ts +0 -7
  468. package/internals/field-root-context/FieldRootContext.js +2 -9
  469. package/internals/field-root-context/FieldRootContext.mjs +3 -10
  470. package/internals/form-context/FormContext.d.mts +1 -0
  471. package/internals/form-context/FormContext.d.ts +1 -0
  472. package/internals/form-context/FormContext.js +3 -0
  473. package/internals/form-context/FormContext.mjs +3 -0
  474. package/{utils → internals}/getDisabledMountTransitionStyles.d.mts +1 -1
  475. package/{utils → internals}/getDisabledMountTransitionStyles.d.ts +1 -1
  476. package/{utils → internals}/getDisabledMountTransitionStyles.js +1 -1
  477. package/{utils → internals}/getDisabledMountTransitionStyles.mjs +1 -1
  478. package/internals/itemEquality.d.mts +1 -0
  479. package/internals/itemEquality.d.ts +1 -0
  480. package/internals/itemEquality.js +7 -0
  481. package/internals/itemEquality.mjs +6 -0
  482. package/internals/labelable-provider/LabelableProvider.d.mts +0 -3
  483. package/internals/labelable-provider/LabelableProvider.d.ts +0 -3
  484. package/internals/labelable-provider/LabelableProvider.js +0 -3
  485. package/internals/labelable-provider/LabelableProvider.mjs +0 -4
  486. package/internals/labelable-provider/useAriaLabelledBy.d.mts +0 -3
  487. package/internals/labelable-provider/useAriaLabelledBy.d.ts +0 -3
  488. package/internals/labelable-provider/useAriaLabelledBy.js +0 -3
  489. package/internals/labelable-provider/useAriaLabelledBy.mjs +0 -4
  490. package/internals/labelable-provider/useLabel.d.mts +1 -1
  491. package/internals/labelable-provider/useLabel.d.ts +1 -1
  492. package/internals/labelable-provider/useLabelableId.js +1 -1
  493. package/internals/labelable-provider/useLabelableId.mjs +1 -1
  494. package/internals/prehydrationScript.stub.d.mts +1 -0
  495. package/internals/prehydrationScript.stub.d.ts +1 -0
  496. package/internals/prehydrationScript.stub.js +12 -0
  497. package/internals/prehydrationScript.stub.mjs +6 -0
  498. package/internals/stateAttributesMapping.d.mts +1 -1
  499. package/internals/stateAttributesMapping.d.ts +1 -1
  500. package/internals/stateAttributesMapping.js +3 -3
  501. package/internals/stateAttributesMapping.mjs +3 -3
  502. package/internals/use-button/useButton.js +30 -14
  503. package/internals/use-button/useButton.mjs +30 -14
  504. package/{utils → internals}/useAnchorPositioning.d.mts +11 -4
  505. package/{utils → internals}/useAnchorPositioning.d.ts +11 -4
  506. package/{utils → internals}/useAnchorPositioning.js +97 -68
  507. package/{utils → internals}/useAnchorPositioning.mjs +96 -68
  508. package/internals/useAnimationsFinished.d.mts +2 -3
  509. package/internals/useAnimationsFinished.d.ts +2 -3
  510. package/internals/useAnimationsFinished.js +8 -11
  511. package/internals/useAnimationsFinished.mjs +8 -11
  512. package/internals/useOpenChangeComplete.js +1 -1
  513. package/internals/useOpenChangeComplete.mjs +1 -1
  514. package/internals/usePressAndHold.d.mts +0 -1
  515. package/internals/usePressAndHold.d.ts +0 -1
  516. package/internals/usePressAndHold.js +4 -8
  517. package/internals/usePressAndHold.mjs +4 -8
  518. package/internals/useRenderElement.js +6 -6
  519. package/internals/useRenderElement.mjs +6 -6
  520. package/internals/useValueChanged.js +3 -6
  521. package/internals/useValueChanged.mjs +3 -6
  522. package/menu/arrow/MenuArrow.d.mts +1 -1
  523. package/menu/arrow/MenuArrow.d.ts +1 -1
  524. package/menu/backdrop/MenuBackdrop.js +1 -7
  525. package/menu/backdrop/MenuBackdrop.mjs +2 -7
  526. package/menu/backdrop/MenuBackdropDataAttributes.d.mts +1 -1
  527. package/menu/backdrop/MenuBackdropDataAttributes.d.ts +1 -1
  528. package/menu/backdrop/MenuBackdropDataAttributes.js +1 -1
  529. package/menu/backdrop/MenuBackdropDataAttributes.mjs +1 -1
  530. package/menu/checkbox-item/MenuCheckboxItem.js +6 -2
  531. package/menu/checkbox-item/MenuCheckboxItem.mjs +6 -2
  532. package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +2 -1
  533. package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.mjs +2 -1
  534. package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.d.mts +1 -1
  535. package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.d.ts +1 -1
  536. package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.js +1 -1
  537. package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.mjs +1 -1
  538. package/menu/group/MenuGroupContext.d.mts +1 -1
  539. package/menu/group/MenuGroupContext.d.ts +1 -1
  540. package/menu/group-label/MenuGroupLabel.js +1 -1
  541. package/menu/group-label/MenuGroupLabel.mjs +1 -1
  542. package/menu/item/MenuItem.js +4 -1
  543. package/menu/item/MenuItem.mjs +4 -1
  544. package/menu/item/useMenuItem.js +1 -3
  545. package/menu/item/useMenuItem.mjs +1 -3
  546. package/menu/item/useMenuItemCommonProps.d.mts +2 -3
  547. package/menu/item/useMenuItemCommonProps.d.ts +2 -3
  548. package/menu/item/useMenuItemCommonProps.js +7 -2
  549. package/menu/item/useMenuItemCommonProps.mjs +7 -2
  550. package/menu/link-item/MenuLinkItem.d.mts +1 -1
  551. package/menu/link-item/MenuLinkItem.d.ts +1 -1
  552. package/menu/link-item/MenuLinkItem.js +4 -1
  553. package/menu/link-item/MenuLinkItem.mjs +4 -1
  554. package/menu/popup/MenuPopup.d.mts +1 -1
  555. package/menu/popup/MenuPopup.d.ts +1 -1
  556. package/menu/popup/MenuPopup.js +5 -14
  557. package/menu/popup/MenuPopup.mjs +7 -15
  558. package/menu/popup/MenuPopupDataAttributes.d.mts +1 -1
  559. package/menu/popup/MenuPopupDataAttributes.d.ts +1 -1
  560. package/menu/popup/MenuPopupDataAttributes.js +1 -1
  561. package/menu/popup/MenuPopupDataAttributes.mjs +1 -1
  562. package/menu/portal/MenuPortal.d.mts +6 -2
  563. package/menu/portal/MenuPortal.d.ts +6 -2
  564. package/menu/positioner/MenuPositioner.d.mts +1 -1
  565. package/menu/positioner/MenuPositioner.d.ts +1 -1
  566. package/menu/positioner/MenuPositioner.js +8 -6
  567. package/menu/positioner/MenuPositioner.mjs +8 -6
  568. package/menu/positioner/MenuPositionerContext.d.mts +1 -1
  569. package/menu/positioner/MenuPositionerContext.d.ts +1 -1
  570. package/menu/positioner/MenuPositionerCssVars.d.mts +12 -0
  571. package/menu/positioner/MenuPositionerCssVars.d.ts +12 -0
  572. package/menu/positioner/MenuPositionerCssVars.js +12 -0
  573. package/menu/positioner/MenuPositionerCssVars.mjs +12 -0
  574. package/menu/radio-item/MenuRadioItem.js +5 -2
  575. package/menu/radio-item/MenuRadioItem.mjs +5 -2
  576. package/menu/radio-item-indicator/MenuRadioItemIndicator.js +2 -1
  577. package/menu/radio-item-indicator/MenuRadioItemIndicator.mjs +2 -1
  578. package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.d.mts +1 -1
  579. package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.d.ts +1 -1
  580. package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.js +1 -1
  581. package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.mjs +1 -1
  582. package/menu/root/MenuRoot.d.mts +11 -7
  583. package/menu/root/MenuRoot.d.ts +11 -7
  584. package/menu/root/MenuRoot.js +36 -13
  585. package/menu/root/MenuRoot.mjs +38 -15
  586. package/menu/store/MenuHandle.d.mts +18 -10
  587. package/menu/store/MenuHandle.d.ts +18 -10
  588. package/menu/store/MenuHandle.js +21 -20
  589. package/menu/store/MenuHandle.mjs +22 -19
  590. package/menu/store/MenuStore.d.mts +22 -7
  591. package/menu/store/MenuStore.d.ts +22 -7
  592. package/menu/store/MenuStore.js +71 -53
  593. package/menu/store/MenuStore.mjs +72 -55
  594. package/menu/submenu-trigger/MenuSubmenuTrigger.js +29 -8
  595. package/menu/submenu-trigger/MenuSubmenuTrigger.mjs +28 -8
  596. package/menu/trigger/MenuTrigger.js +7 -22
  597. package/menu/trigger/MenuTrigger.mjs +10 -24
  598. package/menu/utils/findRootOwnerId.js +1 -1
  599. package/menu/utils/findRootOwnerId.mjs +1 -1
  600. package/menu/viewport/MenuViewport.js +1 -9
  601. package/menu/viewport/MenuViewport.mjs +2 -9
  602. package/menubar/Menubar.js +2 -1
  603. package/menubar/Menubar.mjs +2 -1
  604. package/meter/root/MeterRoot.js +4 -6
  605. package/meter/root/MeterRoot.mjs +4 -6
  606. package/meter/root/MeterRootContext.d.mts +0 -2
  607. package/meter/root/MeterRootContext.d.ts +0 -2
  608. package/navigation-menu/arrow/NavigationMenuArrow.d.mts +1 -1
  609. package/navigation-menu/arrow/NavigationMenuArrow.d.ts +1 -1
  610. package/navigation-menu/arrow/NavigationMenuArrow.js +1 -1
  611. package/navigation-menu/arrow/NavigationMenuArrow.mjs +1 -1
  612. package/navigation-menu/backdrop/NavigationMenuBackdrop.js +1 -7
  613. package/navigation-menu/backdrop/NavigationMenuBackdrop.mjs +2 -7
  614. package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.d.mts +1 -1
  615. package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.d.ts +1 -1
  616. package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.js +1 -1
  617. package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.mjs +1 -1
  618. package/navigation-menu/content/NavigationMenuContentDataAttributes.d.mts +1 -1
  619. package/navigation-menu/content/NavigationMenuContentDataAttributes.d.ts +1 -1
  620. package/navigation-menu/content/NavigationMenuContentDataAttributes.js +1 -1
  621. package/navigation-menu/content/NavigationMenuContentDataAttributes.mjs +1 -1
  622. package/navigation-menu/link/NavigationMenuLink.d.mts +1 -1
  623. package/navigation-menu/link/NavigationMenuLink.d.ts +1 -1
  624. package/navigation-menu/popup/NavigationMenuPopup.d.mts +1 -1
  625. package/navigation-menu/popup/NavigationMenuPopup.d.ts +1 -1
  626. package/navigation-menu/popup/NavigationMenuPopup.js +2 -8
  627. package/navigation-menu/popup/NavigationMenuPopup.mjs +3 -8
  628. package/navigation-menu/popup/NavigationMenuPopupDataAttributes.d.mts +1 -1
  629. package/navigation-menu/popup/NavigationMenuPopupDataAttributes.d.ts +1 -1
  630. package/navigation-menu/popup/NavigationMenuPopupDataAttributes.js +1 -1
  631. package/navigation-menu/popup/NavigationMenuPopupDataAttributes.mjs +1 -1
  632. package/navigation-menu/portal/NavigationMenuPortal.d.mts +3 -3
  633. package/navigation-menu/portal/NavigationMenuPortal.d.ts +3 -3
  634. package/navigation-menu/positioner/NavigationMenuPositioner.d.mts +1 -1
  635. package/navigation-menu/positioner/NavigationMenuPositioner.d.ts +1 -1
  636. package/navigation-menu/positioner/NavigationMenuPositioner.js +7 -6
  637. package/navigation-menu/positioner/NavigationMenuPositioner.mjs +7 -6
  638. package/navigation-menu/positioner/NavigationMenuPositionerContext.d.mts +2 -2
  639. package/navigation-menu/positioner/NavigationMenuPositionerContext.d.ts +2 -2
  640. package/navigation-menu/trigger/NavigationMenuTrigger.js +63 -101
  641. package/navigation-menu/trigger/NavigationMenuTrigger.mjs +63 -101
  642. package/navigation-menu/utils/isOutsideMenuEvent.js +2 -5
  643. package/navigation-menu/utils/isOutsideMenuEvent.mjs +2 -5
  644. package/navigation-menu/utils/useNavigationMenuAnchorPositioning.d.mts +6 -0
  645. package/navigation-menu/utils/useNavigationMenuAnchorPositioning.d.ts +6 -0
  646. package/navigation-menu/utils/useNavigationMenuAnchorPositioning.js +16 -0
  647. package/navigation-menu/utils/useNavigationMenuAnchorPositioning.mjs +12 -0
  648. package/number-field/input/NumberFieldInput.d.mts +1 -1
  649. package/number-field/input/NumberFieldInput.d.ts +1 -1
  650. package/number-field/input/NumberFieldInput.js +40 -25
  651. package/number-field/input/NumberFieldInput.mjs +41 -26
  652. package/number-field/root/NumberFieldRoot.js +37 -55
  653. package/number-field/root/NumberFieldRoot.mjs +38 -56
  654. package/number-field/root/NumberFieldRootContext.d.mts +0 -7
  655. package/number-field/root/NumberFieldRootContext.d.ts +0 -7
  656. package/number-field/root/useNumberFieldStepperButton.js +108 -21
  657. package/number-field/root/useNumberFieldStepperButton.mjs +108 -21
  658. package/number-field/scrub-area/NumberFieldScrubArea.js +28 -32
  659. package/number-field/scrub-area/NumberFieldScrubArea.mjs +28 -32
  660. package/number-field/utils/constants.d.mts +1 -2
  661. package/number-field/utils/constants.d.ts +1 -2
  662. package/number-field/utils/constants.js +2 -3
  663. package/number-field/utils/constants.mjs +1 -2
  664. package/number-field/utils/parse.d.mts +27 -15
  665. package/number-field/utils/parse.d.ts +27 -15
  666. package/number-field/utils/parse.js +74 -135
  667. package/number-field/utils/parse.mjs +73 -134
  668. package/number-field/utils/types.d.mts +2 -1
  669. package/number-field/utils/types.d.ts +2 -1
  670. package/number-field/utils/validate.d.mts +1 -19
  671. package/number-field/utils/validate.d.ts +1 -19
  672. package/number-field/utils/validate.js +6 -14
  673. package/number-field/utils/validate.mjs +6 -14
  674. package/otp-field/input/OTPFieldInput.d.mts +1 -1
  675. package/otp-field/input/OTPFieldInput.d.ts +1 -1
  676. package/otp-field/input/OTPFieldInput.js +4 -1
  677. package/otp-field/input/OTPFieldInput.mjs +5 -2
  678. package/otp-field/root/OTPFieldRoot.js +13 -14
  679. package/otp-field/root/OTPFieldRoot.mjs +13 -14
  680. package/package.json +93 -5
  681. package/popover/arrow/PopoverArrow.d.mts +1 -1
  682. package/popover/arrow/PopoverArrow.d.ts +1 -1
  683. package/popover/arrow/PopoverArrow.js +1 -3
  684. package/popover/arrow/PopoverArrow.mjs +1 -3
  685. package/popover/backdrop/PopoverBackdrop.js +3 -11
  686. package/popover/backdrop/PopoverBackdrop.mjs +4 -11
  687. package/popover/backdrop/PopoverBackdropDataAttributes.d.mts +1 -1
  688. package/popover/backdrop/PopoverBackdropDataAttributes.d.ts +1 -1
  689. package/popover/backdrop/PopoverBackdropDataAttributes.js +1 -1
  690. package/popover/backdrop/PopoverBackdropDataAttributes.mjs +1 -1
  691. package/popover/close/PopoverClose.js +1 -3
  692. package/popover/close/PopoverClose.mjs +1 -3
  693. package/popover/description/PopoverDescription.js +1 -3
  694. package/popover/description/PopoverDescription.mjs +1 -3
  695. package/popover/popup/PopoverPopup.d.mts +1 -1
  696. package/popover/popup/PopoverPopup.d.ts +1 -1
  697. package/popover/popup/PopoverPopup.js +6 -17
  698. package/popover/popup/PopoverPopup.mjs +9 -19
  699. package/popover/popup/PopoverPopupDataAttributes.d.mts +1 -1
  700. package/popover/popup/PopoverPopupDataAttributes.d.ts +1 -1
  701. package/popover/popup/PopoverPopupDataAttributes.js +3 -3
  702. package/popover/popup/PopoverPopupDataAttributes.mjs +3 -3
  703. package/popover/portal/PopoverPortal.d.mts +6 -2
  704. package/popover/portal/PopoverPortal.d.ts +6 -2
  705. package/popover/portal/PopoverPortal.js +1 -3
  706. package/popover/portal/PopoverPortal.mjs +1 -3
  707. package/popover/positioner/PopoverPositioner.d.mts +1 -1
  708. package/popover/positioner/PopoverPositioner.d.ts +1 -1
  709. package/popover/positioner/PopoverPositioner.js +19 -22
  710. package/popover/positioner/PopoverPositioner.mjs +19 -22
  711. package/popover/positioner/PopoverPositionerContext.d.mts +1 -1
  712. package/popover/positioner/PopoverPositionerContext.d.ts +1 -1
  713. package/popover/positioner/PopoverPositionerCssVars.d.mts +2 -0
  714. package/popover/positioner/PopoverPositionerCssVars.d.ts +2 -0
  715. package/popover/positioner/PopoverPositionerCssVars.js +2 -0
  716. package/popover/positioner/PopoverPositionerCssVars.mjs +2 -0
  717. package/popover/root/PopoverRoot.d.mts +2 -0
  718. package/popover/root/PopoverRoot.d.ts +2 -0
  719. package/popover/root/PopoverRoot.js +29 -22
  720. package/popover/root/PopoverRoot.mjs +31 -24
  721. package/popover/root/PopoverRootContext.d.mts +1 -3
  722. package/popover/root/PopoverRootContext.d.ts +1 -3
  723. package/popover/store/PopoverHandle.d.mts +18 -10
  724. package/popover/store/PopoverHandle.d.ts +18 -10
  725. package/popover/store/PopoverHandle.js +21 -21
  726. package/popover/store/PopoverHandle.mjs +22 -20
  727. package/popover/store/PopoverStore.d.mts +22 -10
  728. package/popover/store/PopoverStore.d.ts +22 -10
  729. package/popover/store/PopoverStore.js +82 -67
  730. package/popover/store/PopoverStore.mjs +81 -67
  731. package/popover/title/PopoverTitle.js +1 -3
  732. package/popover/title/PopoverTitle.mjs +1 -3
  733. package/popover/trigger/PopoverTrigger.js +9 -11
  734. package/popover/trigger/PopoverTrigger.mjs +10 -12
  735. package/popover/viewport/PopoverViewport.js +2 -12
  736. package/popover/viewport/PopoverViewport.mjs +3 -12
  737. package/preview-card/arrow/PreviewCardArrow.d.mts +1 -1
  738. package/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
  739. package/preview-card/backdrop/PreviewCardBackdrop.d.mts +1 -1
  740. package/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
  741. package/preview-card/backdrop/PreviewCardBackdrop.js +2 -8
  742. package/preview-card/backdrop/PreviewCardBackdrop.mjs +3 -8
  743. package/preview-card/backdrop/PreviewCardBackdropDataAttributes.d.mts +1 -1
  744. package/preview-card/backdrop/PreviewCardBackdropDataAttributes.d.ts +1 -1
  745. package/preview-card/backdrop/PreviewCardBackdropDataAttributes.js +1 -1
  746. package/preview-card/backdrop/PreviewCardBackdropDataAttributes.mjs +1 -1
  747. package/preview-card/popup/PreviewCardPopup.d.mts +1 -1
  748. package/preview-card/popup/PreviewCardPopup.d.ts +1 -1
  749. package/preview-card/popup/PreviewCardPopup.js +6 -12
  750. package/preview-card/popup/PreviewCardPopup.mjs +7 -12
  751. package/preview-card/popup/PreviewCardPopupDataAttributes.d.mts +1 -1
  752. package/preview-card/popup/PreviewCardPopupDataAttributes.d.ts +1 -1
  753. package/preview-card/popup/PreviewCardPopupDataAttributes.js +1 -1
  754. package/preview-card/popup/PreviewCardPopupDataAttributes.mjs +1 -1
  755. package/preview-card/portal/PreviewCardPortal.d.mts +6 -2
  756. package/preview-card/portal/PreviewCardPortal.d.ts +6 -2
  757. package/preview-card/portal/PreviewCardPortal.mjs +1 -2
  758. package/preview-card/positioner/PreviewCardPositioner.d.mts +1 -1
  759. package/preview-card/positioner/PreviewCardPositioner.d.ts +1 -1
  760. package/preview-card/positioner/PreviewCardPositioner.js +3 -4
  761. package/preview-card/positioner/PreviewCardPositioner.mjs +3 -4
  762. package/preview-card/positioner/PreviewCardPositionerContext.d.mts +1 -1
  763. package/preview-card/positioner/PreviewCardPositionerContext.d.ts +1 -1
  764. package/preview-card/positioner/PreviewCardPositionerContext.js +1 -1
  765. package/preview-card/positioner/PreviewCardPositionerContext.mjs +1 -1
  766. package/preview-card/positioner/PreviewCardPositionerCssVars.d.mts +12 -0
  767. package/preview-card/positioner/PreviewCardPositionerCssVars.d.ts +12 -0
  768. package/preview-card/positioner/PreviewCardPositionerCssVars.js +12 -0
  769. package/preview-card/positioner/PreviewCardPositionerCssVars.mjs +12 -0
  770. package/preview-card/root/PreviewCardRoot.js +14 -17
  771. package/preview-card/root/PreviewCardRoot.mjs +15 -18
  772. package/preview-card/store/PreviewCardHandle.d.mts +15 -12
  773. package/preview-card/store/PreviewCardHandle.d.ts +15 -12
  774. package/preview-card/store/PreviewCardHandle.js +18 -23
  775. package/preview-card/store/PreviewCardHandle.mjs +19 -23
  776. package/preview-card/store/PreviewCardStore.d.mts +22 -7
  777. package/preview-card/store/PreviewCardStore.d.ts +22 -7
  778. package/preview-card/store/PreviewCardStore.js +43 -30
  779. package/preview-card/store/PreviewCardStore.mjs +43 -31
  780. package/preview-card/trigger/PreviewCardTrigger.d.mts +1 -1
  781. package/preview-card/trigger/PreviewCardTrigger.d.ts +1 -1
  782. package/preview-card/trigger/PreviewCardTrigger.js +4 -8
  783. package/preview-card/trigger/PreviewCardTrigger.mjs +5 -9
  784. package/preview-card/viewport/PreviewCardViewport.js +1 -9
  785. package/preview-card/viewport/PreviewCardViewport.mjs +2 -9
  786. package/progress/indicator/ProgressIndicator.js +1 -5
  787. package/progress/indicator/ProgressIndicator.mjs +1 -5
  788. package/progress/root/ProgressRoot.d.mts +1 -2
  789. package/progress/root/ProgressRoot.d.ts +1 -2
  790. package/progress/root/ProgressRoot.js +28 -19
  791. package/progress/root/ProgressRoot.mjs +29 -20
  792. package/progress/root/ProgressRootContext.d.mts +4 -12
  793. package/progress/root/ProgressRootContext.d.ts +4 -12
  794. package/progress/root/stateAttributesMapping.js +3 -17
  795. package/progress/root/stateAttributesMapping.mjs +3 -17
  796. package/progress/value/ProgressValue.d.mts +1 -1
  797. package/progress/value/ProgressValue.d.ts +1 -1
  798. package/progress/value/ProgressValue.js +7 -3
  799. package/progress/value/ProgressValue.mjs +7 -3
  800. package/radio/indicator/RadioIndicatorDataAttributes.d.mts +1 -1
  801. package/radio/indicator/RadioIndicatorDataAttributes.d.ts +1 -1
  802. package/radio/indicator/RadioIndicatorDataAttributes.js +1 -1
  803. package/radio/indicator/RadioIndicatorDataAttributes.mjs +1 -1
  804. package/radio/root/RadioRoot.js +22 -29
  805. package/radio/root/RadioRoot.mjs +22 -29
  806. package/radio/utils/stateAttributesMapping.js +2 -3
  807. package/radio/utils/stateAttributesMapping.mjs +2 -3
  808. package/radio-group/RadioGroup.js +47 -32
  809. package/radio-group/RadioGroup.mjs +47 -32
  810. package/radio-group/RadioGroupContext.d.mts +0 -1
  811. package/radio-group/RadioGroupContext.d.ts +0 -1
  812. package/scroll-area/root/ScrollAreaRoot.js +122 -83
  813. package/scroll-area/root/ScrollAreaRoot.mjs +122 -83
  814. package/scroll-area/root/ScrollAreaRootContext.d.mts +1 -3
  815. package/scroll-area/root/ScrollAreaRootContext.d.ts +1 -3
  816. package/scroll-area/root/stateAttributes.js +10 -19
  817. package/scroll-area/root/stateAttributes.mjs +10 -19
  818. package/scroll-area/scrollbar/ScrollAreaScrollbar.js +58 -74
  819. package/scroll-area/scrollbar/ScrollAreaScrollbar.mjs +58 -74
  820. package/scroll-area/scrollbar/ScrollAreaScrollbarContext.d.mts +1 -3
  821. package/scroll-area/scrollbar/ScrollAreaScrollbarContext.d.ts +1 -3
  822. package/scroll-area/thumb/ScrollAreaThumb.js +10 -24
  823. package/scroll-area/thumb/ScrollAreaThumb.mjs +10 -24
  824. package/scroll-area/utils/getOffset.js +4 -3
  825. package/scroll-area/utils/getOffset.mjs +4 -3
  826. package/scroll-area/viewport/ScrollAreaViewport.js +76 -79
  827. package/scroll-area/viewport/ScrollAreaViewport.mjs +77 -80
  828. package/select/arrow/SelectArrow.d.mts +1 -1
  829. package/select/arrow/SelectArrow.d.ts +1 -1
  830. package/select/arrow/SelectArrow.js +1 -7
  831. package/select/arrow/SelectArrow.mjs +2 -7
  832. package/select/backdrop/SelectBackdropDataAttributes.d.mts +1 -1
  833. package/select/backdrop/SelectBackdropDataAttributes.d.ts +1 -1
  834. package/select/backdrop/SelectBackdropDataAttributes.js +1 -1
  835. package/select/backdrop/SelectBackdropDataAttributes.mjs +1 -1
  836. package/select/group-label/SelectGroupLabel.js +3 -0
  837. package/select/group-label/SelectGroupLabel.mjs +3 -0
  838. package/select/index.d.mts +2 -1
  839. package/select/index.d.ts +2 -1
  840. package/select/index.parts.d.mts +1 -1
  841. package/select/index.parts.d.ts +1 -1
  842. package/select/index.parts.js +2 -2
  843. package/select/index.parts.mjs +1 -1
  844. package/select/item/SelectItem.js +12 -25
  845. package/select/item/SelectItem.mjs +13 -26
  846. package/select/item/SelectItemContext.d.mts +0 -1
  847. package/select/item/SelectItemContext.d.ts +0 -1
  848. package/select/item-indicator/SelectItemIndicator.js +1 -2
  849. package/select/item-indicator/SelectItemIndicator.mjs +1 -2
  850. package/select/item-indicator/SelectItemIndicatorDataAttributes.d.mts +1 -1
  851. package/select/item-indicator/SelectItemIndicatorDataAttributes.d.ts +1 -1
  852. package/select/item-indicator/SelectItemIndicatorDataAttributes.js +1 -1
  853. package/select/item-indicator/SelectItemIndicatorDataAttributes.mjs +1 -1
  854. package/select/item-text/SelectItemText.js +4 -5
  855. package/select/item-text/SelectItemText.mjs +4 -5
  856. package/select/label/SelectLabel.js +2 -1
  857. package/select/label/SelectLabel.mjs +2 -1
  858. package/select/list/SelectList.js +3 -6
  859. package/select/list/SelectList.mjs +3 -6
  860. package/select/popup/SelectPopup.d.mts +1 -1
  861. package/select/popup/SelectPopup.d.ts +1 -1
  862. package/select/popup/SelectPopup.js +32 -52
  863. package/select/popup/SelectPopup.mjs +33 -53
  864. package/select/popup/SelectPopupDataAttributes.d.mts +1 -1
  865. package/select/popup/SelectPopupDataAttributes.d.ts +1 -1
  866. package/select/popup/SelectPopupDataAttributes.js +1 -1
  867. package/select/popup/SelectPopupDataAttributes.mjs +1 -1
  868. package/select/portal/SelectPortal.d.mts +7 -2
  869. package/select/portal/SelectPortal.d.ts +7 -2
  870. package/select/portal/SelectPortal.js +3 -7
  871. package/select/portal/SelectPortal.mjs +3 -7
  872. package/select/positioner/SelectPositioner.d.mts +1 -1
  873. package/select/positioner/SelectPositioner.d.ts +1 -1
  874. package/select/positioner/SelectPositioner.js +15 -29
  875. package/select/positioner/SelectPositioner.mjs +17 -31
  876. package/select/positioner/SelectPositionerContext.d.mts +1 -1
  877. package/select/positioner/SelectPositionerContext.d.ts +1 -1
  878. package/select/root/SelectRoot.d.mts +2 -0
  879. package/select/root/SelectRoot.d.ts +2 -0
  880. package/select/root/SelectRoot.js +93 -121
  881. package/select/root/SelectRoot.mjs +95 -123
  882. package/select/root/SelectRootContext.d.mts +4 -5
  883. package/select/root/SelectRootContext.d.ts +4 -5
  884. package/select/root/SelectRootContext.js +1 -11
  885. package/select/root/SelectRootContext.mjs +0 -9
  886. package/select/scroll-arrow/SelectScrollArrow.d.mts +1 -6
  887. package/select/scroll-arrow/SelectScrollArrow.d.ts +1 -6
  888. package/select/scroll-arrow/SelectScrollArrow.js +4 -11
  889. package/select/scroll-arrow/SelectScrollArrow.mjs +4 -11
  890. package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.d.mts +1 -1
  891. package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.d.ts +1 -1
  892. package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.js +1 -1
  893. package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.mjs +1 -1
  894. package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.d.mts +1 -1
  895. package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.d.ts +1 -1
  896. package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.js +1 -1
  897. package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.mjs +1 -1
  898. package/select/separator/SelectSeparator.d.mts +26 -0
  899. package/select/separator/SelectSeparator.d.ts +26 -0
  900. package/select/separator/SelectSeparator.js +15 -0
  901. package/select/separator/SelectSeparator.mjs +10 -0
  902. package/select/store.d.mts +3 -5
  903. package/select/store.d.ts +3 -5
  904. package/select/store.js +32 -35
  905. package/select/store.mjs +32 -35
  906. package/select/trigger/SelectTrigger.d.mts +1 -1
  907. package/select/trigger/SelectTrigger.d.ts +1 -1
  908. package/select/trigger/SelectTrigger.js +3 -8
  909. package/select/trigger/SelectTrigger.mjs +4 -9
  910. package/select/value/SelectValue.js +1 -1
  911. package/select/value/SelectValue.mjs +1 -1
  912. package/slider/control/SliderControl.js +61 -78
  913. package/slider/control/SliderControl.mjs +61 -78
  914. package/slider/indicator/SliderIndicator.js +15 -34
  915. package/slider/indicator/SliderIndicator.mjs +15 -34
  916. package/slider/root/SliderRoot.d.mts +5 -3
  917. package/slider/root/SliderRoot.d.ts +5 -3
  918. package/slider/root/SliderRoot.js +36 -47
  919. package/slider/root/SliderRoot.mjs +36 -47
  920. package/slider/root/SliderRootContext.d.mts +6 -4
  921. package/slider/root/SliderRootContext.d.ts +6 -4
  922. package/slider/root/stateAttributesMapping.js +7 -6
  923. package/slider/root/stateAttributesMapping.mjs +7 -6
  924. package/slider/thumb/SliderThumb.js +64 -69
  925. package/slider/thumb/SliderThumb.mjs +64 -69
  926. package/slider/utils/getMidpoint.d.mts +1 -2
  927. package/slider/utils/getMidpoint.d.ts +1 -2
  928. package/slider/utils/getMidpoint.js +2 -5
  929. package/slider/utils/getMidpoint.mjs +2 -5
  930. package/slider/utils/getPushedThumbValues.d.mts +4 -21
  931. package/slider/utils/getPushedThumbValues.d.ts +4 -21
  932. package/slider/utils/getPushedThumbValues.js +6 -15
  933. package/slider/utils/getPushedThumbValues.mjs +7 -15
  934. package/slider/utils/getSliderValue.js +8 -8
  935. package/slider/utils/getSliderValue.mjs +8 -8
  936. package/slider/utils/resolveThumbCollision.d.mts +5 -24
  937. package/slider/utils/resolveThumbCollision.d.ts +5 -24
  938. package/slider/utils/resolveThumbCollision.js +33 -64
  939. package/slider/utils/resolveThumbCollision.mjs +33 -64
  940. package/slider/utils/test-utils.d.mts +1 -11
  941. package/slider/utils/test-utils.d.ts +1 -11
  942. package/slider/utils/test-utils.js +1 -11
  943. package/slider/utils/test-utils.mjs +1 -11
  944. package/slider/utils/validateMinimumDistance.js +6 -7
  945. package/slider/utils/validateMinimumDistance.mjs +6 -7
  946. package/slider/value/SliderValue.js +6 -16
  947. package/slider/value/SliderValue.mjs +6 -16
  948. package/switch/root/SwitchRoot.js +18 -19
  949. package/switch/root/SwitchRoot.mjs +18 -19
  950. package/switch/stateAttributesMapping.js +2 -3
  951. package/switch/stateAttributesMapping.mjs +2 -3
  952. package/tabs/indicator/TabsIndicator.js +13 -24
  953. package/tabs/indicator/TabsIndicator.mjs +13 -24
  954. package/tabs/indicator/prehydrationScript.min.d.mts +1 -1
  955. package/tabs/indicator/prehydrationScript.min.d.ts +1 -1
  956. package/tabs/indicator/prehydrationScript.min.js +1 -1
  957. package/tabs/indicator/prehydrationScript.min.mjs +1 -1
  958. package/tabs/list/TabsList.js +1 -11
  959. package/tabs/list/TabsList.mjs +1 -11
  960. package/tabs/list/TabsListContext.d.mts +0 -5
  961. package/tabs/list/TabsListContext.d.ts +0 -5
  962. package/tabs/panel/TabsPanel.js +10 -20
  963. package/tabs/panel/TabsPanel.mjs +10 -20
  964. package/tabs/panel/TabsPanelDataAttributes.d.mts +1 -1
  965. package/tabs/panel/TabsPanelDataAttributes.d.ts +1 -1
  966. package/tabs/panel/TabsPanelDataAttributes.js +1 -1
  967. package/tabs/panel/TabsPanelDataAttributes.mjs +1 -1
  968. package/tabs/root/TabsRoot.js +40 -75
  969. package/tabs/root/TabsRoot.mjs +40 -75
  970. package/tabs/root/TabsRootContext.d.mts +4 -11
  971. package/tabs/root/TabsRootContext.d.ts +4 -11
  972. package/tabs/root/stateAttributesMapping.js +1 -2
  973. package/tabs/root/stateAttributesMapping.mjs +1 -2
  974. package/tabs/tab/TabsTab.js +42 -39
  975. package/tabs/tab/TabsTab.mjs +42 -39
  976. package/toast/action/ToastAction.js +2 -5
  977. package/toast/action/ToastAction.mjs +2 -5
  978. package/toast/arrow/ToastArrow.d.mts +1 -1
  979. package/toast/arrow/ToastArrow.d.ts +1 -1
  980. package/toast/arrow/ToastArrow.js +1 -2
  981. package/toast/arrow/ToastArrow.mjs +1 -2
  982. package/toast/close/ToastClose.js +3 -4
  983. package/toast/close/ToastClose.mjs +3 -4
  984. package/toast/content/ToastContent.js +3 -7
  985. package/toast/content/ToastContent.mjs +3 -7
  986. package/toast/description/ToastDescription.js +8 -23
  987. package/toast/description/ToastDescription.mjs +8 -23
  988. package/toast/portal/ToastPortal.d.mts +9 -3
  989. package/toast/portal/ToastPortal.d.ts +9 -3
  990. package/toast/portal/ToastPortal.js +10 -1
  991. package/toast/portal/ToastPortal.mjs +9 -2
  992. package/toast/positioner/ToastPositioner.d.mts +1 -1
  993. package/toast/positioner/ToastPositioner.d.ts +1 -1
  994. package/toast/positioner/ToastPositioner.js +4 -5
  995. package/toast/positioner/ToastPositioner.mjs +4 -5
  996. package/toast/positioner/ToastPositionerContext.d.mts +1 -1
  997. package/toast/positioner/ToastPositionerContext.d.ts +1 -1
  998. package/toast/provider/ToastProvider.js +19 -10
  999. package/toast/provider/ToastProvider.mjs +20 -11
  1000. package/toast/root/ToastRoot.d.mts +2 -0
  1001. package/toast/root/ToastRoot.d.ts +2 -0
  1002. package/toast/root/ToastRoot.js +93 -140
  1003. package/toast/root/ToastRoot.mjs +92 -139
  1004. package/toast/root/ToastRootContext.d.mts +0 -6
  1005. package/toast/root/ToastRootContext.d.ts +0 -6
  1006. package/toast/root/ToastRootDataAttributes.d.mts +1 -1
  1007. package/toast/root/ToastRootDataAttributes.d.ts +1 -1
  1008. package/toast/root/ToastRootDataAttributes.js +1 -1
  1009. package/toast/root/ToastRootDataAttributes.mjs +1 -1
  1010. package/toast/store.d.mts +17 -22
  1011. package/toast/store.d.ts +17 -22
  1012. package/toast/store.js +51 -85
  1013. package/toast/store.mjs +53 -86
  1014. package/toast/title/ToastTitle.js +8 -23
  1015. package/toast/title/ToastTitle.mjs +8 -23
  1016. package/toast/useToastManager.js +1 -6
  1017. package/toast/useToastManager.mjs +2 -6
  1018. package/toast/utils/isRenderableNode.d.mts +3 -0
  1019. package/toast/utils/isRenderableNode.d.ts +3 -0
  1020. package/toast/utils/isRenderableNode.js +21 -0
  1021. package/toast/utils/isRenderableNode.mjs +13 -0
  1022. package/toast/utils/test-utils.d.mts +1 -8
  1023. package/toast/utils/test-utils.d.ts +1 -8
  1024. package/toast/utils/useToastLabelPart.d.mts +18 -0
  1025. package/toast/utils/useToastLabelPart.d.ts +18 -0
  1026. package/toast/utils/useToastLabelPart.js +52 -0
  1027. package/toast/utils/useToastLabelPart.mjs +47 -0
  1028. package/toast/viewport/ToastViewport.js +42 -78
  1029. package/toast/viewport/ToastViewport.mjs +42 -78
  1030. package/toggle/Toggle.js +1 -2
  1031. package/toggle/Toggle.mjs +1 -2
  1032. package/toggle-group/ToggleGroup.js +4 -19
  1033. package/toggle-group/ToggleGroup.mjs +4 -19
  1034. package/toggle-group/ToggleGroupContext.d.mts +1 -3
  1035. package/toggle-group/ToggleGroupContext.d.ts +1 -3
  1036. package/toggle-group/ToggleGroupContext.js +2 -8
  1037. package/toggle-group/ToggleGroupContext.mjs +2 -7
  1038. package/toolbar/button/ToolbarButton.js +2 -2
  1039. package/toolbar/button/ToolbarButton.mjs +2 -2
  1040. package/toolbar/group/ToolbarGroupContext.d.mts +1 -2
  1041. package/toolbar/group/ToolbarGroupContext.d.ts +1 -2
  1042. package/toolbar/group/ToolbarGroupContext.js +2 -8
  1043. package/toolbar/group/ToolbarGroupContext.mjs +2 -7
  1044. package/toolbar/input/ToolbarInput.js +8 -11
  1045. package/toolbar/input/ToolbarInput.mjs +8 -11
  1046. package/toolbar/link/ToolbarLink.d.mts +1 -1
  1047. package/toolbar/link/ToolbarLink.d.ts +1 -1
  1048. package/toolbar/root/ToolbarRoot.js +4 -5
  1049. package/toolbar/root/ToolbarRoot.mjs +4 -5
  1050. package/toolbar/root/ToolbarRootContext.d.mts +0 -3
  1051. package/toolbar/root/ToolbarRootContext.d.ts +0 -3
  1052. package/toolbar/separator/ToolbarSeparator.d.mts +2 -2
  1053. package/toolbar/separator/ToolbarSeparator.d.ts +2 -2
  1054. package/toolbar/separator/ToolbarSeparator.js +1 -4
  1055. package/toolbar/separator/ToolbarSeparator.mjs +3 -5
  1056. package/tooltip/arrow/TooltipArrow.d.mts +1 -1
  1057. package/tooltip/arrow/TooltipArrow.d.ts +1 -1
  1058. package/tooltip/popup/TooltipPopup.d.mts +1 -1
  1059. package/tooltip/popup/TooltipPopup.d.ts +1 -1
  1060. package/tooltip/popup/TooltipPopup.js +4 -9
  1061. package/tooltip/popup/TooltipPopup.mjs +5 -9
  1062. package/tooltip/popup/TooltipPopupDataAttributes.d.mts +1 -1
  1063. package/tooltip/popup/TooltipPopupDataAttributes.d.ts +1 -1
  1064. package/tooltip/popup/TooltipPopupDataAttributes.js +1 -1
  1065. package/tooltip/popup/TooltipPopupDataAttributes.mjs +1 -1
  1066. package/tooltip/portal/TooltipPortal.d.mts +6 -2
  1067. package/tooltip/portal/TooltipPortal.d.ts +6 -2
  1068. package/tooltip/portal/TooltipPortal.mjs +1 -2
  1069. package/tooltip/positioner/TooltipPositioner.d.mts +1 -1
  1070. package/tooltip/positioner/TooltipPositioner.d.ts +1 -1
  1071. package/tooltip/positioner/TooltipPositioner.js +3 -4
  1072. package/tooltip/positioner/TooltipPositioner.mjs +3 -4
  1073. package/tooltip/positioner/TooltipPositionerContext.d.mts +1 -1
  1074. package/tooltip/positioner/TooltipPositionerContext.d.ts +1 -1
  1075. package/tooltip/positioner/TooltipPositionerCssVars.d.mts +12 -0
  1076. package/tooltip/positioner/TooltipPositionerCssVars.d.ts +12 -0
  1077. package/tooltip/positioner/TooltipPositionerCssVars.js +12 -0
  1078. package/tooltip/positioner/TooltipPositionerCssVars.mjs +12 -0
  1079. package/tooltip/provider/TooltipProvider.d.mts +1 -1
  1080. package/tooltip/provider/TooltipProvider.d.ts +1 -1
  1081. package/tooltip/provider/TooltipProvider.js +1 -5
  1082. package/tooltip/provider/TooltipProvider.mjs +1 -5
  1083. package/tooltip/provider/TooltipProviderContext.d.mts +5 -6
  1084. package/tooltip/provider/TooltipProviderContext.d.ts +5 -6
  1085. package/tooltip/provider/TooltipProviderContext.js +3 -0
  1086. package/tooltip/provider/TooltipProviderContext.mjs +4 -0
  1087. package/tooltip/root/TooltipRoot.js +18 -17
  1088. package/tooltip/root/TooltipRoot.mjs +19 -18
  1089. package/tooltip/store/TooltipHandle.d.mts +15 -12
  1090. package/tooltip/store/TooltipHandle.d.ts +15 -12
  1091. package/tooltip/store/TooltipHandle.js +18 -23
  1092. package/tooltip/store/TooltipHandle.mjs +19 -23
  1093. package/tooltip/store/TooltipStore.d.mts +24 -6
  1094. package/tooltip/store/TooltipStore.d.ts +24 -6
  1095. package/tooltip/store/TooltipStore.js +54 -31
  1096. package/tooltip/store/TooltipStore.mjs +54 -32
  1097. package/tooltip/trigger/TooltipTrigger.d.mts +1 -1
  1098. package/tooltip/trigger/TooltipTrigger.d.ts +1 -1
  1099. package/tooltip/trigger/TooltipTrigger.js +15 -25
  1100. package/tooltip/trigger/TooltipTrigger.mjs +16 -26
  1101. package/tooltip/viewport/TooltipViewport.js +1 -9
  1102. package/tooltip/viewport/TooltipViewport.mjs +2 -9
  1103. package/utils/FloatingPortalLite.d.mts +7 -9
  1104. package/utils/FloatingPortalLite.d.ts +7 -9
  1105. package/utils/FloatingPortalLite.js +4 -4
  1106. package/utils/FloatingPortalLite.mjs +4 -5
  1107. package/utils/FocusGuard.d.mts +1 -5
  1108. package/utils/FocusGuard.d.ts +1 -5
  1109. package/utils/InternalBackdrop.d.mts +0 -4
  1110. package/utils/InternalBackdrop.d.ts +0 -4
  1111. package/utils/NullStore.d.mts +15 -0
  1112. package/utils/NullStore.d.ts +15 -0
  1113. package/utils/NullStore.js +23 -0
  1114. package/utils/NullStore.mjs +16 -0
  1115. package/utils/adaptiveOriginConstants.d.mts +8 -0
  1116. package/utils/adaptiveOriginConstants.d.ts +8 -0
  1117. package/utils/adaptiveOriginConstants.js +14 -0
  1118. package/utils/adaptiveOriginConstants.mjs +8 -0
  1119. package/utils/adaptiveOriginMiddleware.d.mts +0 -4
  1120. package/utils/adaptiveOriginMiddleware.d.ts +0 -4
  1121. package/utils/adaptiveOriginMiddleware.js +5 -8
  1122. package/utils/adaptiveOriginMiddleware.mjs +1 -4
  1123. package/utils/closePart.d.mts +1 -4
  1124. package/utils/closePart.d.ts +1 -4
  1125. package/utils/closePart.js +2 -13
  1126. package/utils/closePart.mjs +1 -12
  1127. package/utils/dispatchClickWithModifiers.d.mts +21 -0
  1128. package/utils/dispatchClickWithModifiers.d.ts +21 -0
  1129. package/utils/dispatchClickWithModifiers.js +30 -0
  1130. package/utils/dispatchClickWithModifiers.mjs +24 -0
  1131. package/utils/formatNumber.d.mts +1 -2
  1132. package/utils/formatNumber.d.ts +1 -2
  1133. package/utils/formatNumber.js +0 -12
  1134. package/utils/formatNumber.mjs +0 -11
  1135. package/utils/getElementAtPoint.d.mts +3 -1
  1136. package/utils/getElementAtPoint.d.ts +3 -1
  1137. package/utils/getElementAtPoint.js +5 -2
  1138. package/utils/getElementAtPoint.mjs +5 -2
  1139. package/utils/getPseudoElementBounds.d.mts +5 -0
  1140. package/utils/getPseudoElementBounds.d.ts +5 -0
  1141. package/utils/getPseudoElementBounds.js +14 -0
  1142. package/utils/getPseudoElementBounds.mjs +13 -0
  1143. package/utils/hideMiddleware.js +7 -4
  1144. package/utils/hideMiddleware.mjs +7 -4
  1145. package/utils/listbox-separator/ListboxSeparator.d.mts +18 -0
  1146. package/utils/listbox-separator/ListboxSeparator.d.ts +18 -0
  1147. package/utils/listbox-separator/ListboxSeparator.js +36 -0
  1148. package/utils/listbox-separator/ListboxSeparator.mjs +31 -0
  1149. package/utils/popupStateMapping.d.mts +19 -7
  1150. package/utils/popupStateMapping.d.ts +19 -7
  1151. package/utils/popupStateMapping.js +14 -9
  1152. package/utils/popupStateMapping.mjs +15 -8
  1153. package/utils/popups/index.d.mts +3 -1
  1154. package/utils/popups/index.d.ts +3 -1
  1155. package/utils/popups/index.js +22 -0
  1156. package/utils/popups/index.mjs +3 -1
  1157. package/utils/popups/popupHandle.d.mts +113 -0
  1158. package/utils/popups/popupHandle.d.ts +113 -0
  1159. package/utils/popups/popupHandle.js +229 -0
  1160. package/utils/popups/popupHandle.mjs +222 -0
  1161. package/utils/popups/popupStoreUtils.d.mts +47 -12
  1162. package/utils/popups/popupStoreUtils.d.ts +47 -12
  1163. package/utils/popups/popupStoreUtils.js +109 -44
  1164. package/utils/popups/popupStoreUtils.mjs +107 -42
  1165. package/utils/popups/popupTriggerMap.d.mts +3 -2
  1166. package/utils/popups/popupTriggerMap.d.ts +3 -2
  1167. package/utils/popups/popupTriggerMap.js +48 -21
  1168. package/utils/popups/popupTriggerMap.mjs +48 -21
  1169. package/utils/popups/store.d.mts +14 -0
  1170. package/utils/popups/store.d.ts +14 -0
  1171. package/utils/popups/store.js +33 -21
  1172. package/utils/popups/store.mjs +33 -21
  1173. package/utils/popups/usePopupHandleStore.d.mts +12 -0
  1174. package/utils/popups/usePopupHandleStore.d.ts +12 -0
  1175. package/utils/popups/usePopupHandleStore.js +33 -0
  1176. package/utils/popups/usePopupHandleStore.mjs +27 -0
  1177. package/utils/scrollable.d.mts +2 -0
  1178. package/utils/scrollable.d.ts +2 -0
  1179. package/utils/scrollable.js +20 -12
  1180. package/utils/scrollable.mjs +18 -12
  1181. package/utils/usePopupAutoResize.d.mts +1 -1
  1182. package/utils/usePopupAutoResize.d.ts +1 -1
  1183. package/utils/usePopupAutoResize.js +15 -18
  1184. package/utils/usePopupAutoResize.mjs +15 -18
  1185. package/utils/usePopupViewport.d.mts +5 -15
  1186. package/utils/usePopupViewport.d.ts +5 -15
  1187. package/utils/usePopupViewport.js +48 -17
  1188. package/utils/usePopupViewport.mjs +47 -17
  1189. package/utils/usePositioner.js +1 -1
  1190. package/utils/usePositioner.mjs +1 -1
  1191. package/utils/useRegisteredLabelId.d.mts +2 -1
  1192. package/utils/useRegisteredLabelId.d.ts +2 -1
  1193. package/utils/useRegisteredLabelId.js +1 -1
  1194. package/utils/useRegisteredLabelId.mjs +1 -1
  1195. package/utils/useSwipeDismiss.js +72 -113
  1196. package/utils/useSwipeDismiss.mjs +72 -113
  1197. package/checkbox/utils/useStateAttributesMapping.js +0 -30
  1198. package/number-field/root/useNumberFieldButton.d.mts +0 -21
  1199. package/number-field/root/useNumberFieldButton.d.ts +0 -21
  1200. package/number-field/root/useNumberFieldButton.js +0 -135
  1201. package/number-field/root/useNumberFieldButton.mjs +0 -130
  1202. package/number-field/utils/subscribeToVisualViewportResize.d.mts +0 -1
  1203. package/number-field/utils/subscribeToVisualViewportResize.d.ts +0 -1
  1204. package/number-field/utils/subscribeToVisualViewportResize.js +0 -23
  1205. package/number-field/utils/subscribeToVisualViewportResize.mjs +0 -18
  1206. package/select/portal/SelectPortalContext.d.mts +0 -3
  1207. package/select/portal/SelectPortalContext.d.ts +0 -3
  1208. package/select/portal/SelectPortalContext.js +0 -21
  1209. package/select/portal/SelectPortalContext.mjs +0 -13
  1210. package/slider/utils/replaceArrayItemAtIndex.d.mts +0 -1
  1211. package/slider/utils/replaceArrayItemAtIndex.d.ts +0 -1
  1212. package/slider/utils/replaceArrayItemAtIndex.js +0 -12
  1213. package/slider/utils/replaceArrayItemAtIndex.mjs +0 -6
  1214. package/slider/utils/valueArrayToPercentages.d.mts +0 -1
  1215. package/slider/utils/valueArrayToPercentages.d.ts +0 -1
  1216. package/slider/utils/valueArrayToPercentages.js +0 -15
  1217. package/slider/utils/valueArrayToPercentages.mjs +0 -9
@@ -8,9 +8,11 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.DrawerSwipeArea = void 0;
9
9
  var React = _interopRequireWildcard(require("react"));
10
10
  var _useStableCallback = require("@base-ui/utils/useStableCallback");
11
- var _useTimeout = require("@base-ui/utils/useTimeout");
11
+ var _useIsoLayoutEffect = require("@base-ui/utils/useIsoLayoutEffect");
12
+ var _owner = require("@base-ui/utils/owner");
12
13
  var _DialogRootContext = require("../../dialog/root/DialogRootContext");
13
14
  var _useRenderElement = require("../../internals/useRenderElement");
15
+ var _noop = require("../../internals/noop");
14
16
  var _createBaseUIEventDetails = require("../../internals/createBaseUIEventDetails");
15
17
  var _reasons = require("../../internals/reasons");
16
18
  var _useSwipeDismiss = require("../../utils/useSwipeDismiss");
@@ -21,6 +23,7 @@ var _DrawerRootContext = require("../root/DrawerRootContext");
21
23
  var _useBaseUiId = require("../../internals/useBaseUiId");
22
24
  var _popups = require("../../utils/popups");
23
25
  var _DrawerProviderContext = require("../provider/DrawerProviderContext");
26
+ var _event = require("../../floating-ui-react/utils/event");
24
27
  var _DrawerSwipeAreaDataAttributes = require("./DrawerSwipeAreaDataAttributes");
25
28
  const DEFAULT_SWIPE_OPEN_RATIO = 0.5;
26
29
  const MIN_SWIPE_START_DISTANCE = 1;
@@ -46,9 +49,9 @@ const stateAttributesMapping = {
46
49
  return value ? SWIPE_AREA_SWIPING_HOOK : null;
47
50
  },
48
51
  swipeDirection(value) {
49
- return value ? {
52
+ return {
50
53
  [_DrawerSwipeAreaDataAttributes.DrawerSwipeAreaDataAttributes.swipeDirection]: value
51
- } : null;
54
+ };
52
55
  },
53
56
  disabled(value) {
54
57
  return value ? SWIPE_AREA_DISABLED_HOOK : null;
@@ -79,16 +82,14 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
79
82
  swipeDirection: swipeDirectionProp,
80
83
  ...elementProps
81
84
  } = componentProps;
82
- const {
83
- store
84
- } = (0, _DialogRootContext.useDialogRootContext)();
85
+ const store = (0, _DialogRootContext.useDialogRootContext)();
85
86
  const {
86
87
  swipeDirection,
87
- frontmostHeight
88
+ frontmostHeight,
89
+ swipeAreaActiveRef
88
90
  } = (0, _DrawerRootContext.useDrawerRootContext)();
89
- const providerContext = (0, _DrawerProviderContext.useDrawerProviderContext)(true);
91
+ const providerContext = (0, _DrawerProviderContext.useDrawerProviderContext)();
90
92
  const [swipeActive, setSwipeActive] = React.useState(false);
91
- const releaseDismissTimeout = (0, _useTimeout.useTimeout)();
92
93
  const swipeAreaRef = React.useRef(null);
93
94
  const swipeStartEventRef = React.useRef(null);
94
95
  const openedBySwipeRef = React.useRef(false);
@@ -98,7 +99,10 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
98
99
  });
99
100
  const closedOffsetRef = React.useRef(null);
100
101
  const appliedSwipeStylesRef = React.useRef(false);
102
+ const swipePopupElementRef = React.useRef(null);
103
+ const swipeBackdropElementRef = React.useRef(null);
101
104
  const popupTransitionRef = React.useRef(null);
105
+ const releaseGuardCleanupRef = React.useRef(_noop.NOOP);
102
106
  const swipeAreaId = (0, _useBaseUiId.useBaseUiId)(componentProps.id);
103
107
  const registerTrigger = (0, _popups.useTriggerRegistration)(swipeAreaId, store);
104
108
  const open = store.useState('open');
@@ -110,21 +114,40 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
110
114
  const dismissDirection = oppositeSwipeDirection[resolvedSwipeDirection];
111
115
  const enabled = !disabled && (!open || swipeActive);
112
116
  function disableDismissForSwipe() {
113
- releaseDismissTimeout.clear();
117
+ releaseGuardCleanupRef.current();
114
118
  store.context.outsidePressEnabledRef.current = false;
115
119
  }
116
- function enableDismissAfterRelease() {
117
- // Safari can dispatch outside-press for the same swipe-open gesture
118
- // after release, so defer re-enabling dismissal to the next macrotask.
119
- releaseDismissTimeout.start(0, () => {
120
+ const enableDismissAfterRelease = (0, _useStableCallback.useStableCallback)(() => {
121
+ releaseGuardCleanupRef.current();
122
+ const doc = (0, _owner.ownerDocument)(swipeAreaRef.current);
123
+ function restore(event) {
124
+ // The gesture's trailing release click is the one physical click with no `pointerdown` of
125
+ // its own. Ignore it and keep waiting, so it cannot dismiss the drawer it just opened,
126
+ // while a click-only activation (keyboard or assistive tech) still re-enables in time.
127
+ if (event?.type === 'click' && event.detail !== 0 && !(0, _event.isVirtualClick)(event)) {
128
+ return;
129
+ }
130
+ releaseGuardCleanupRef.current = _noop.NOOP;
131
+ doc.removeEventListener('pointerdown', restore, true);
132
+ doc.removeEventListener('click', restore, true);
120
133
  store.context.outsidePressEnabledRef.current = true;
121
- });
122
- }
123
- function resolvePopupSize() {
124
- const popupElement = store.context.popupRef.current;
125
- if (!popupElement) {
126
- return null;
127
134
  }
135
+
136
+ // The pointerup that ends a swipe-open gesture synthesizes a `click`. When the drag released
137
+ // outside the popup (e.g. it was dragged past the popup's size), that click would be treated as
138
+ // an outside press and immediately dismiss the drawer that was just opened. Keep outside-press
139
+ // dismissal disabled until the next interaction that isn't that release click: a deliberate
140
+ // outside press starts with a `pointerdown`, and a click-only activation (keyboard or
141
+ // assistive tech) is distinguishable from a physical release. This is deterministic, unlike
142
+ // re-enabling on a timer that can race the synthesized click and dismiss at random.
143
+ //
144
+ // `restore` runs in document capture, ahead of floating-ui's own outside-press check (which
145
+ // happens on the event target, after capture), so the triggering press still dismisses.
146
+ releaseGuardCleanupRef.current = restore;
147
+ doc.addEventListener('pointerdown', restore, true);
148
+ doc.addEventListener('click', restore, true);
149
+ });
150
+ function getPopupSize(popupElement) {
128
151
  const isHorizontal = dismissDirection === 'left' || dismissDirection === 'right';
129
152
  const size = isHorizontal ? popupElement.offsetWidth : popupElement.offsetHeight;
130
153
  if (size <= 0) {
@@ -132,15 +155,15 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
132
155
  }
133
156
  return size;
134
157
  }
135
- function resolveClosedOffset() {
136
- const offset = resolvePopupSize();
158
+ function resolvePopupSize() {
159
+ const popupElement = store.context.popupRef.current;
160
+ return popupElement ? getPopupSize(popupElement) : null;
161
+ }
162
+ function resolveClosedOffset(popupElement) {
163
+ const offset = getPopupSize(popupElement);
137
164
  if (offset == null) {
138
165
  return null;
139
166
  }
140
- const popupElement = store.context.popupRef.current;
141
- if (!popupElement) {
142
- return offset;
143
- }
144
167
  const isHorizontal = dismissDirection === 'left' || dismissDirection === 'right';
145
168
  const transform = (0, _useSwipeDismiss.getElementTransform)(popupElement);
146
169
  const transformOffset = isHorizontal ? transform.x : transform.y;
@@ -157,9 +180,6 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
157
180
  return popupSize * DEFAULT_SWIPE_OPEN_RATIO;
158
181
  }
159
182
  function applySwipeMovement() {
160
- if (!swipeActive) {
161
- return;
162
- }
163
183
  const popupElement = store.context.popupRef.current;
164
184
  if (!popupElement) {
165
185
  return;
@@ -168,10 +188,10 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
168
188
  return;
169
189
  }
170
190
  if (closedOffsetRef.current == null) {
171
- closedOffsetRef.current = resolveClosedOffset();
191
+ closedOffsetRef.current = resolveClosedOffset(popupElement);
172
192
  }
173
193
  const closedOffset = closedOffsetRef.current;
174
- if (!closedOffset || !Number.isFinite(closedOffset) || closedOffset <= 0) {
194
+ if (closedOffset === null) {
175
195
  return;
176
196
  }
177
197
  const {
@@ -192,6 +212,7 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
192
212
  popupElement.style.setProperty(_DrawerPopupCssVars.DrawerPopupCssVars.swipeMovementX, `${movementX}px`);
193
213
  popupElement.style.setProperty(_DrawerPopupCssVars.DrawerPopupCssVars.swipeMovementY, `${movementY}px`);
194
214
  popupElement.setAttribute(_DrawerPopupDataAttributes.DrawerPopupDataAttributes.swiping, '');
215
+ swipePopupElementRef.current = popupElement;
195
216
  if (popupTransitionRef.current === null) {
196
217
  popupTransitionRef.current = popupElement.style.transition;
197
218
  }
@@ -199,6 +220,7 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
199
220
  const backdropElement = store.context.backdropRef.current;
200
221
  if (backdropElement) {
201
222
  backdropElement.setAttribute(_DrawerPopupDataAttributes.DrawerPopupDataAttributes.swiping, '');
223
+ swipeBackdropElementRef.current = backdropElement;
202
224
  backdropElement.style.setProperty(_DrawerBackdropCssVars.DrawerBackdropCssVars.swipeProgress, `${backdropProgress}`);
203
225
  if (openProgress > 0 && frontmostHeight > 0) {
204
226
  backdropElement.style.setProperty(_DrawerPopupCssVars.DrawerPopupCssVars.height, `${frontmostHeight}px`);
@@ -211,10 +233,11 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
211
233
  frontmostHeight: openProgress > 0 ? frontmostHeight : 0
212
234
  });
213
235
  appliedSwipeStylesRef.current = true;
236
+ swipeAreaActiveRef.current = true;
214
237
  }
215
238
  const clearSwipeStyles = (0, _useStableCallback.useStableCallback)(() => {
216
- const popupElement = store.context.popupRef.current;
217
- if (popupElement && appliedSwipeStylesRef.current) {
239
+ const popupElement = swipePopupElementRef.current;
240
+ if (popupElement) {
218
241
  popupElement.style.removeProperty(_DrawerPopupCssVars.DrawerPopupCssVars.swipeMovementX);
219
242
  popupElement.style.removeProperty(_DrawerPopupCssVars.DrawerPopupCssVars.swipeMovementY);
220
243
  popupElement.removeAttribute(_DrawerPopupDataAttributes.DrawerPopupDataAttributes.swiping);
@@ -223,7 +246,7 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
223
246
  popupElement.style.transition = popupTransitionRef.current;
224
247
  popupTransitionRef.current = null;
225
248
  }
226
- const backdropElement = store.context.backdropRef.current;
249
+ const backdropElement = swipeBackdropElementRef.current;
227
250
  if (backdropElement) {
228
251
  backdropElement.removeAttribute(_DrawerPopupDataAttributes.DrawerPopupDataAttributes.swiping);
229
252
  backdropElement.style.setProperty(_DrawerBackdropCssVars.DrawerBackdropCssVars.swipeProgress, '0');
@@ -234,19 +257,16 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
234
257
  frontmostHeight: 0
235
258
  });
236
259
  appliedSwipeStylesRef.current = false;
260
+ swipePopupElementRef.current = null;
261
+ swipeBackdropElementRef.current = null;
262
+ swipeAreaActiveRef.current = false;
237
263
  });
238
264
  function openDrawer(event) {
239
- if (store.select('open')) {
240
- return;
241
- }
242
265
  openedBySwipeRef.current = true;
243
- store.setOpen(true, (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.swipe, event, swipeAreaRef.current ?? undefined));
266
+ store.setOpen(true, (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.swipe, event, swipeAreaRef.current));
244
267
  }
245
268
  function closeDrawer(event) {
246
- if (!store.select('open')) {
247
- return;
248
- }
249
- store.setOpen(false, (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.swipe, event, swipeAreaRef.current ?? undefined));
269
+ store.setOpen(false, (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.swipe, event, swipeAreaRef.current));
250
270
  }
251
271
  function resetSwipeInteractionState() {
252
272
  swipeStartEventRef.current = null;
@@ -289,10 +309,10 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
289
309
  return;
290
310
  }
291
311
  const displacement = (0, _useSwipeDismiss.getDisplacement)(resolvedSwipeDirection, details.deltaX, details.deltaY);
292
- if (displacement < MIN_SWIPE_START_DISTANCE && !openedBySwipeRef.current) {
312
+ if (!openedBySwipeRef.current && displacement < MIN_SWIPE_START_DISTANCE) {
293
313
  return;
294
314
  }
295
- if (!openedBySwipeRef.current) {
315
+ if (!openedBySwipeRef.current && !store.select('open')) {
296
316
  openDrawer(swipeStartEventRef.current);
297
317
  }
298
318
  applySwipeMovement();
@@ -308,14 +328,14 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
308
328
  const displacement = (0, _useSwipeDismiss.getDisplacement)(resolvedSwipeDirection, deltaX, deltaY);
309
329
  const releaseVelocity = (0, _useSwipeDismiss.getDisplacement)(resolvedSwipeDirection, releaseVelocityX, releaseVelocityY);
310
330
  const threshold = resolveSwipeOpenThreshold();
311
- const hasEnoughDistance = threshold != null && displacement >= threshold;
331
+ const hasEnoughDistance = displacement >= threshold;
312
332
  const hasEnoughVelocity = releaseVelocity >= VELOCITY_THRESHOLD;
313
- const shouldOpen = threshold != null && direction === resolvedSwipeDirection && (hasEnoughDistance || hasEnoughVelocity) && !disabled;
333
+ const shouldOpen = direction === resolvedSwipeDirection && (hasEnoughDistance || hasEnoughVelocity) && !disabled;
314
334
  if (shouldOpen) {
315
335
  if (!store.select('open')) {
316
336
  openDrawer(event);
317
337
  }
318
- } else if (openedBySwipeRef.current) {
338
+ } else if (openedBySwipeRef.current && store.select('open')) {
319
339
  closeDrawer(event);
320
340
  }
321
341
  finishSwipeInteraction();
@@ -326,16 +346,29 @@ const DrawerSwipeArea = exports.DrawerSwipeArea = /*#__PURE__*/React.forwardRef(
326
346
  const swipePointerProps = swipe.getPointerProps();
327
347
  const swipeTouchProps = swipe.getTouchProps();
328
348
  const resetSwipe = swipe.reset;
329
- React.useEffect(() => {
349
+
350
+ // The commit that opens the drawer re-renders the popup, resetting `--swipe-movement-*` to `0px`
351
+ // (the viewport isn't swiping). Re-assert after the DOM mutation but before paint. No deps: must
352
+ // run on every commit the swipe area participates in.
353
+ (0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
354
+ if (swipeActive && appliedSwipeStylesRef.current) {
355
+ applySwipeMovement();
356
+ }
357
+ });
358
+ (0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
330
359
  if (!enabled) {
360
+ if (swipeActive) {
361
+ enableDismissAfterRelease();
362
+ }
331
363
  resetSwipe();
332
364
  resetDragDelta();
333
365
  clearSwipeStyles();
334
366
  resetSwipeInteractionState();
335
367
  }
336
- }, [clearSwipeStyles, enabled, resetDragDelta, resetSwipe]);
368
+ }, [clearSwipeStyles, enableDismissAfterRelease, enabled, resetDragDelta, resetSwipe, swipeActive]);
337
369
  React.useEffect(() => {
338
370
  return () => {
371
+ releaseGuardCleanupRef.current();
339
372
  store.context.outsidePressEnabledRef.current = true;
340
373
  };
341
374
  }, [store]);
@@ -2,9 +2,11 @@
2
2
 
3
3
  import * as React from 'react';
4
4
  import { useStableCallback } from '@base-ui/utils/useStableCallback';
5
- import { useTimeout } from '@base-ui/utils/useTimeout';
5
+ import { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';
6
+ import { ownerDocument } from '@base-ui/utils/owner';
6
7
  import { useDialogRootContext } from "../../dialog/root/DialogRootContext.mjs";
7
8
  import { useRenderElement } from "../../internals/useRenderElement.mjs";
9
+ import { NOOP } from "../../internals/noop.mjs";
8
10
  import { createChangeEventDetails } from "../../internals/createBaseUIEventDetails.mjs";
9
11
  import { REASONS } from "../../internals/reasons.mjs";
10
12
  import { getDisplacement, getElementTransform, useSwipeDismiss } from "../../utils/useSwipeDismiss.mjs";
@@ -15,6 +17,7 @@ import { useDrawerRootContext } from "../root/DrawerRootContext.mjs";
15
17
  import { useBaseUiId } from "../../internals/useBaseUiId.mjs";
16
18
  import { useTriggerRegistration } from "../../utils/popups/index.mjs";
17
19
  import { useDrawerProviderContext } from "../provider/DrawerProviderContext.mjs";
20
+ import { isVirtualClick } from "../../floating-ui-react/utils/event.mjs";
18
21
  import { DrawerSwipeAreaDataAttributes } from "./DrawerSwipeAreaDataAttributes.mjs";
19
22
  const DEFAULT_SWIPE_OPEN_RATIO = 0.5;
20
23
  const MIN_SWIPE_START_DISTANCE = 1;
@@ -40,9 +43,9 @@ const stateAttributesMapping = {
40
43
  return value ? SWIPE_AREA_SWIPING_HOOK : null;
41
44
  },
42
45
  swipeDirection(value) {
43
- return value ? {
46
+ return {
44
47
  [DrawerSwipeAreaDataAttributes.swipeDirection]: value
45
- } : null;
48
+ };
46
49
  },
47
50
  disabled(value) {
48
51
  return value ? SWIPE_AREA_DISABLED_HOOK : null;
@@ -73,16 +76,14 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
73
76
  swipeDirection: swipeDirectionProp,
74
77
  ...elementProps
75
78
  } = componentProps;
76
- const {
77
- store
78
- } = useDialogRootContext();
79
+ const store = useDialogRootContext();
79
80
  const {
80
81
  swipeDirection,
81
- frontmostHeight
82
+ frontmostHeight,
83
+ swipeAreaActiveRef
82
84
  } = useDrawerRootContext();
83
- const providerContext = useDrawerProviderContext(true);
85
+ const providerContext = useDrawerProviderContext();
84
86
  const [swipeActive, setSwipeActive] = React.useState(false);
85
- const releaseDismissTimeout = useTimeout();
86
87
  const swipeAreaRef = React.useRef(null);
87
88
  const swipeStartEventRef = React.useRef(null);
88
89
  const openedBySwipeRef = React.useRef(false);
@@ -92,7 +93,10 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
92
93
  });
93
94
  const closedOffsetRef = React.useRef(null);
94
95
  const appliedSwipeStylesRef = React.useRef(false);
96
+ const swipePopupElementRef = React.useRef(null);
97
+ const swipeBackdropElementRef = React.useRef(null);
95
98
  const popupTransitionRef = React.useRef(null);
99
+ const releaseGuardCleanupRef = React.useRef(NOOP);
96
100
  const swipeAreaId = useBaseUiId(componentProps.id);
97
101
  const registerTrigger = useTriggerRegistration(swipeAreaId, store);
98
102
  const open = store.useState('open');
@@ -104,21 +108,40 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
104
108
  const dismissDirection = oppositeSwipeDirection[resolvedSwipeDirection];
105
109
  const enabled = !disabled && (!open || swipeActive);
106
110
  function disableDismissForSwipe() {
107
- releaseDismissTimeout.clear();
111
+ releaseGuardCleanupRef.current();
108
112
  store.context.outsidePressEnabledRef.current = false;
109
113
  }
110
- function enableDismissAfterRelease() {
111
- // Safari can dispatch outside-press for the same swipe-open gesture
112
- // after release, so defer re-enabling dismissal to the next macrotask.
113
- releaseDismissTimeout.start(0, () => {
114
+ const enableDismissAfterRelease = useStableCallback(() => {
115
+ releaseGuardCleanupRef.current();
116
+ const doc = ownerDocument(swipeAreaRef.current);
117
+ function restore(event) {
118
+ // The gesture's trailing release click is the one physical click with no `pointerdown` of
119
+ // its own. Ignore it and keep waiting, so it cannot dismiss the drawer it just opened,
120
+ // while a click-only activation (keyboard or assistive tech) still re-enables in time.
121
+ if (event?.type === 'click' && event.detail !== 0 && !isVirtualClick(event)) {
122
+ return;
123
+ }
124
+ releaseGuardCleanupRef.current = NOOP;
125
+ doc.removeEventListener('pointerdown', restore, true);
126
+ doc.removeEventListener('click', restore, true);
114
127
  store.context.outsidePressEnabledRef.current = true;
115
- });
116
- }
117
- function resolvePopupSize() {
118
- const popupElement = store.context.popupRef.current;
119
- if (!popupElement) {
120
- return null;
121
128
  }
129
+
130
+ // The pointerup that ends a swipe-open gesture synthesizes a `click`. When the drag released
131
+ // outside the popup (e.g. it was dragged past the popup's size), that click would be treated as
132
+ // an outside press and immediately dismiss the drawer that was just opened. Keep outside-press
133
+ // dismissal disabled until the next interaction that isn't that release click: a deliberate
134
+ // outside press starts with a `pointerdown`, and a click-only activation (keyboard or
135
+ // assistive tech) is distinguishable from a physical release. This is deterministic, unlike
136
+ // re-enabling on a timer that can race the synthesized click and dismiss at random.
137
+ //
138
+ // `restore` runs in document capture, ahead of floating-ui's own outside-press check (which
139
+ // happens on the event target, after capture), so the triggering press still dismisses.
140
+ releaseGuardCleanupRef.current = restore;
141
+ doc.addEventListener('pointerdown', restore, true);
142
+ doc.addEventListener('click', restore, true);
143
+ });
144
+ function getPopupSize(popupElement) {
122
145
  const isHorizontal = dismissDirection === 'left' || dismissDirection === 'right';
123
146
  const size = isHorizontal ? popupElement.offsetWidth : popupElement.offsetHeight;
124
147
  if (size <= 0) {
@@ -126,15 +149,15 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
126
149
  }
127
150
  return size;
128
151
  }
129
- function resolveClosedOffset() {
130
- const offset = resolvePopupSize();
152
+ function resolvePopupSize() {
153
+ const popupElement = store.context.popupRef.current;
154
+ return popupElement ? getPopupSize(popupElement) : null;
155
+ }
156
+ function resolveClosedOffset(popupElement) {
157
+ const offset = getPopupSize(popupElement);
131
158
  if (offset == null) {
132
159
  return null;
133
160
  }
134
- const popupElement = store.context.popupRef.current;
135
- if (!popupElement) {
136
- return offset;
137
- }
138
161
  const isHorizontal = dismissDirection === 'left' || dismissDirection === 'right';
139
162
  const transform = getElementTransform(popupElement);
140
163
  const transformOffset = isHorizontal ? transform.x : transform.y;
@@ -151,9 +174,6 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
151
174
  return popupSize * DEFAULT_SWIPE_OPEN_RATIO;
152
175
  }
153
176
  function applySwipeMovement() {
154
- if (!swipeActive) {
155
- return;
156
- }
157
177
  const popupElement = store.context.popupRef.current;
158
178
  if (!popupElement) {
159
179
  return;
@@ -162,10 +182,10 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
162
182
  return;
163
183
  }
164
184
  if (closedOffsetRef.current == null) {
165
- closedOffsetRef.current = resolveClosedOffset();
185
+ closedOffsetRef.current = resolveClosedOffset(popupElement);
166
186
  }
167
187
  const closedOffset = closedOffsetRef.current;
168
- if (!closedOffset || !Number.isFinite(closedOffset) || closedOffset <= 0) {
188
+ if (closedOffset === null) {
169
189
  return;
170
190
  }
171
191
  const {
@@ -186,6 +206,7 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
186
206
  popupElement.style.setProperty(DrawerPopupCssVars.swipeMovementX, `${movementX}px`);
187
207
  popupElement.style.setProperty(DrawerPopupCssVars.swipeMovementY, `${movementY}px`);
188
208
  popupElement.setAttribute(DrawerPopupDataAttributes.swiping, '');
209
+ swipePopupElementRef.current = popupElement;
189
210
  if (popupTransitionRef.current === null) {
190
211
  popupTransitionRef.current = popupElement.style.transition;
191
212
  }
@@ -193,6 +214,7 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
193
214
  const backdropElement = store.context.backdropRef.current;
194
215
  if (backdropElement) {
195
216
  backdropElement.setAttribute(DrawerPopupDataAttributes.swiping, '');
217
+ swipeBackdropElementRef.current = backdropElement;
196
218
  backdropElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, `${backdropProgress}`);
197
219
  if (openProgress > 0 && frontmostHeight > 0) {
198
220
  backdropElement.style.setProperty(DrawerPopupCssVars.height, `${frontmostHeight}px`);
@@ -205,10 +227,11 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
205
227
  frontmostHeight: openProgress > 0 ? frontmostHeight : 0
206
228
  });
207
229
  appliedSwipeStylesRef.current = true;
230
+ swipeAreaActiveRef.current = true;
208
231
  }
209
232
  const clearSwipeStyles = useStableCallback(() => {
210
- const popupElement = store.context.popupRef.current;
211
- if (popupElement && appliedSwipeStylesRef.current) {
233
+ const popupElement = swipePopupElementRef.current;
234
+ if (popupElement) {
212
235
  popupElement.style.removeProperty(DrawerPopupCssVars.swipeMovementX);
213
236
  popupElement.style.removeProperty(DrawerPopupCssVars.swipeMovementY);
214
237
  popupElement.removeAttribute(DrawerPopupDataAttributes.swiping);
@@ -217,7 +240,7 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
217
240
  popupElement.style.transition = popupTransitionRef.current;
218
241
  popupTransitionRef.current = null;
219
242
  }
220
- const backdropElement = store.context.backdropRef.current;
243
+ const backdropElement = swipeBackdropElementRef.current;
221
244
  if (backdropElement) {
222
245
  backdropElement.removeAttribute(DrawerPopupDataAttributes.swiping);
223
246
  backdropElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, '0');
@@ -228,19 +251,16 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
228
251
  frontmostHeight: 0
229
252
  });
230
253
  appliedSwipeStylesRef.current = false;
254
+ swipePopupElementRef.current = null;
255
+ swipeBackdropElementRef.current = null;
256
+ swipeAreaActiveRef.current = false;
231
257
  });
232
258
  function openDrawer(event) {
233
- if (store.select('open')) {
234
- return;
235
- }
236
259
  openedBySwipeRef.current = true;
237
- store.setOpen(true, createChangeEventDetails(REASONS.swipe, event, swipeAreaRef.current ?? undefined));
260
+ store.setOpen(true, createChangeEventDetails(REASONS.swipe, event, swipeAreaRef.current));
238
261
  }
239
262
  function closeDrawer(event) {
240
- if (!store.select('open')) {
241
- return;
242
- }
243
- store.setOpen(false, createChangeEventDetails(REASONS.swipe, event, swipeAreaRef.current ?? undefined));
263
+ store.setOpen(false, createChangeEventDetails(REASONS.swipe, event, swipeAreaRef.current));
244
264
  }
245
265
  function resetSwipeInteractionState() {
246
266
  swipeStartEventRef.current = null;
@@ -283,10 +303,10 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
283
303
  return;
284
304
  }
285
305
  const displacement = getDisplacement(resolvedSwipeDirection, details.deltaX, details.deltaY);
286
- if (displacement < MIN_SWIPE_START_DISTANCE && !openedBySwipeRef.current) {
306
+ if (!openedBySwipeRef.current && displacement < MIN_SWIPE_START_DISTANCE) {
287
307
  return;
288
308
  }
289
- if (!openedBySwipeRef.current) {
309
+ if (!openedBySwipeRef.current && !store.select('open')) {
290
310
  openDrawer(swipeStartEventRef.current);
291
311
  }
292
312
  applySwipeMovement();
@@ -302,14 +322,14 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
302
322
  const displacement = getDisplacement(resolvedSwipeDirection, deltaX, deltaY);
303
323
  const releaseVelocity = getDisplacement(resolvedSwipeDirection, releaseVelocityX, releaseVelocityY);
304
324
  const threshold = resolveSwipeOpenThreshold();
305
- const hasEnoughDistance = threshold != null && displacement >= threshold;
325
+ const hasEnoughDistance = displacement >= threshold;
306
326
  const hasEnoughVelocity = releaseVelocity >= VELOCITY_THRESHOLD;
307
- const shouldOpen = threshold != null && direction === resolvedSwipeDirection && (hasEnoughDistance || hasEnoughVelocity) && !disabled;
327
+ const shouldOpen = direction === resolvedSwipeDirection && (hasEnoughDistance || hasEnoughVelocity) && !disabled;
308
328
  if (shouldOpen) {
309
329
  if (!store.select('open')) {
310
330
  openDrawer(event);
311
331
  }
312
- } else if (openedBySwipeRef.current) {
332
+ } else if (openedBySwipeRef.current && store.select('open')) {
313
333
  closeDrawer(event);
314
334
  }
315
335
  finishSwipeInteraction();
@@ -320,16 +340,29 @@ export const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwip
320
340
  const swipePointerProps = swipe.getPointerProps();
321
341
  const swipeTouchProps = swipe.getTouchProps();
322
342
  const resetSwipe = swipe.reset;
323
- React.useEffect(() => {
343
+
344
+ // The commit that opens the drawer re-renders the popup, resetting `--swipe-movement-*` to `0px`
345
+ // (the viewport isn't swiping). Re-assert after the DOM mutation but before paint. No deps: must
346
+ // run on every commit the swipe area participates in.
347
+ useIsoLayoutEffect(() => {
348
+ if (swipeActive && appliedSwipeStylesRef.current) {
349
+ applySwipeMovement();
350
+ }
351
+ });
352
+ useIsoLayoutEffect(() => {
324
353
  if (!enabled) {
354
+ if (swipeActive) {
355
+ enableDismissAfterRelease();
356
+ }
325
357
  resetSwipe();
326
358
  resetDragDelta();
327
359
  clearSwipeStyles();
328
360
  resetSwipeInteractionState();
329
361
  }
330
- }, [clearSwipeStyles, enabled, resetDragDelta, resetSwipe]);
362
+ }, [clearSwipeStyles, enableDismissAfterRelease, enabled, resetDragDelta, resetSwipe, swipeActive]);
331
363
  React.useEffect(() => {
332
364
  return () => {
365
+ releaseGuardCleanupRef.current();
333
366
  store.context.outsidePressEnabledRef.current = true;
334
367
  };
335
368
  }, [store]);
@@ -1,5 +1,5 @@
1
1
  import type * as React from 'react';
2
- import type { DialogHandle as DrawerHandle } from "../../dialog/store/DialogHandle.mjs";
2
+ import type { DrawerHandle } from "../handle.mjs";
3
3
  import type { BaseUIComponentProps, NativeButtonProps } from "../../internals/types.mjs";
4
4
  /**
5
5
  * A button that opens the drawer.
@@ -1,5 +1,5 @@
1
1
  import type * as React from 'react';
2
- import type { DialogHandle as DrawerHandle } from "../../dialog/store/DialogHandle.js";
2
+ import type { DrawerHandle } from "../handle.js";
3
3
  import type { BaseUIComponentProps, NativeButtonProps } from "../../internals/types.js";
4
4
  /**
5
5
  * A button that opens the drawer.