@base-ui/react 1.0.0 → 1.2.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.
- package/CHANGELOG.md +317 -1
- package/README.md +2 -3
- package/accordion/header/AccordionHeader.d.ts +1 -1
- package/accordion/item/AccordionItem.d.ts +2 -2
- package/accordion/item/AccordionItemContext.d.ts +1 -1
- package/accordion/panel/AccordionPanel.d.ts +1 -1
- package/accordion/root/AccordionRoot.d.ts +10 -10
- package/accordion/trigger/AccordionTrigger.d.ts +1 -1
- package/accordion/trigger/AccordionTrigger.js +3 -4
- package/alert-dialog/root/AlertDialogRoot.d.ts +5 -5
- package/alert-dialog/root/AlertDialogRoot.js +6 -4
- package/autocomplete/index.parts.d.ts +2 -1
- package/autocomplete/index.parts.js +8 -1
- package/autocomplete/root/AutocompleteRoot.d.ts +19 -14
- package/autocomplete/root/AutocompleteRoot.js +4 -6
- package/avatar/fallback/AvatarFallback.d.ts +8 -3
- package/avatar/fallback/AvatarFallback.js +34 -6
- package/avatar/image/AvatarImage.d.ts +8 -3
- package/avatar/image/AvatarImage.js +35 -6
- package/avatar/image/useImageLoadingStatus.d.ts +2 -2
- package/avatar/root/AvatarRoot.d.ts +1 -1
- package/avatar/root/AvatarRoot.js +2 -2
- package/button/Button.d.ts +5 -18
- package/button/Button.js +3 -4
- package/checkbox/indicator/CheckboxIndicator.d.ts +2 -2
- package/checkbox/indicator/CheckboxIndicator.js +4 -4
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.d.ts +4 -0
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.js +4 -0
- package/checkbox/root/CheckboxRoot.d.ts +14 -14
- package/checkbox/root/CheckboxRoot.js +36 -12
- package/checkbox/root/CheckboxRootDataAttributes.d.ts +4 -0
- package/checkbox/root/CheckboxRootDataAttributes.js +4 -0
- package/checkbox-group/CheckboxGroup.d.ts +6 -6
- package/checkbox-group/CheckboxGroup.js +2 -2
- package/checkbox-group/useCheckboxGroupParent.d.ts +3 -3
- package/collapsible/panel/CollapsiblePanel.d.ts +3 -3
- package/collapsible/root/CollapsibleRoot.d.ts +5 -5
- package/collapsible/root/useCollapsibleRoot.d.ts +2 -2
- package/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
- package/collapsible/trigger/CollapsibleTrigger.js +1 -2
- package/combobox/arrow/ComboboxArrow.d.ts +1 -1
- package/combobox/arrow/ComboboxArrow.js +2 -2
- package/combobox/arrow/ComboboxArrowDataAttributes.js +2 -2
- package/combobox/backdrop/ComboboxBackdrop.d.ts +1 -1
- package/combobox/backdrop/ComboboxBackdrop.js +2 -2
- package/combobox/chip/ComboboxChip.d.ts +1 -1
- package/combobox/chip/ComboboxChip.js +6 -3
- package/combobox/chip/ComboboxChipContext.js +1 -0
- package/combobox/chip-remove/ComboboxChipRemove.d.ts +1 -1
- package/combobox/chip-remove/ComboboxChipRemove.js +31 -35
- package/combobox/chips/ComboboxChips.d.ts +1 -1
- package/combobox/chips/ComboboxChips.js +7 -1
- package/combobox/chips/ComboboxChipsContext.js +1 -0
- package/combobox/clear/ComboboxClear.d.ts +3 -3
- package/combobox/clear/ComboboxClear.js +4 -5
- package/combobox/empty/ComboboxEmpty.d.ts +1 -1
- package/combobox/group/ComboboxGroup.d.ts +2 -2
- package/combobox/group/ComboboxGroupContext.d.ts +1 -1
- package/combobox/group/ComboboxGroupContext.js +1 -0
- package/combobox/group-label/ComboboxGroupLabel.d.ts +1 -1
- package/combobox/icon/ComboboxIcon.d.ts +1 -1
- package/combobox/index.parts.d.ts +2 -1
- package/combobox/index.parts.js +8 -1
- package/combobox/input/ComboboxInput.d.ts +2 -2
- package/combobox/input/ComboboxInput.js +49 -25
- package/combobox/item/ComboboxItem.d.ts +4 -4
- package/combobox/item/ComboboxItem.js +15 -16
- package/combobox/item/ComboboxItemContext.js +1 -0
- package/combobox/item-indicator/ComboboxItemIndicator.d.ts +2 -2
- package/combobox/item-indicator/ComboboxItemIndicator.js +2 -2
- package/combobox/list/ComboboxList.d.ts +1 -1
- package/combobox/list/ComboboxList.js +2 -2
- package/combobox/popup/ComboboxPopup.d.ts +3 -3
- package/combobox/popup/ComboboxPopup.js +2 -2
- package/combobox/popup/ComboboxPopupDataAttributes.js +2 -2
- package/combobox/portal/ComboboxPortal.d.ts +2 -2
- package/combobox/portal/ComboboxPortalContext.js +1 -0
- package/combobox/positioner/ComboboxPositioner.d.ts +1 -1
- package/combobox/positioner/ComboboxPositioner.js +5 -3
- package/combobox/positioner/ComboboxPositionerDataAttributes.js +2 -2
- package/combobox/root/AriaCombobox.d.ts +55 -43
- package/combobox/root/AriaCombobox.js +58 -73
- package/combobox/root/ComboboxRoot.d.ts +19 -14
- package/combobox/root/ComboboxRoot.js +3 -1
- package/combobox/root/ComboboxRootContext.d.ts +1 -0
- package/combobox/root/ComboboxRootContext.js +1 -0
- package/combobox/root/utils/useFilter.d.ts +2 -2
- package/combobox/root/utils/useFilteredItems.d.ts +4 -0
- package/combobox/root/utils/useFilteredItems.js +14 -0
- package/combobox/row/ComboboxRow.d.ts +1 -1
- package/combobox/row/ComboboxRowContext.js +1 -0
- package/combobox/status/ComboboxStatus.d.ts +1 -1
- package/combobox/store.d.ts +14 -11
- package/combobox/store.js +24 -3
- package/combobox/trigger/ComboboxTrigger.d.ts +15 -2
- package/combobox/trigger/ComboboxTrigger.js +33 -14
- package/combobox/trigger/ComboboxTriggerDataAttributes.d.ts +13 -0
- package/combobox/trigger/ComboboxTriggerDataAttributes.js +13 -0
- package/combobox/utils/stateAttributesMapping.d.ts +14 -0
- package/combobox/utils/stateAttributesMapping.js +18 -0
- package/combobox/value/ComboboxValue.d.ts +5 -0
- package/combobox/value/ComboboxValue.js +15 -6
- package/composite/item/CompositeItem.d.ts +6 -6
- package/composite/list/CompositeList.d.ts +3 -3
- package/composite/list/CompositeListContext.d.ts +1 -1
- package/composite/list/useCompositeListItem.d.ts +5 -5
- package/composite/root/CompositeRoot.d.ts +19 -19
- package/composite/root/useCompositeRoot.d.ts +13 -13
- package/context-menu/index.d.ts +1 -0
- package/context-menu/index.parts.d.ts +1 -0
- package/context-menu/index.parts.js +7 -0
- package/context-menu/root/ContextMenuRoot.d.ts +1 -1
- package/context-menu/root/ContextMenuRootContext.js +1 -0
- package/context-menu/trigger/ContextMenuTrigger.d.ts +1 -1
- package/context-menu/trigger/ContextMenuTrigger.js +13 -3
- package/csp-provider/CSPContext.d.ts +13 -0
- package/csp-provider/CSPContext.js +25 -0
- package/csp-provider/CSPProvider.d.ts +25 -0
- package/csp-provider/CSPProvider.js +32 -0
- package/csp-provider/index.d.ts +2 -0
- package/csp-provider/index.js +12 -0
- package/csp-provider/index.parts.d.ts +1 -0
- package/csp-provider/index.parts.js +12 -0
- package/dialog/backdrop/DialogBackdrop.d.ts +2 -2
- package/dialog/backdrop/DialogBackdrop.js +2 -2
- package/dialog/close/DialogClose.d.ts +1 -1
- package/dialog/close/DialogClose.js +2 -2
- package/dialog/description/DialogDescription.d.ts +1 -1
- package/dialog/popup/DialogPopup.d.ts +3 -3
- package/dialog/popup/DialogPopup.js +2 -2
- package/dialog/portal/DialogPortal.d.ts +3 -3
- package/dialog/portal/DialogPortal.js +1 -0
- package/dialog/portal/DialogPortalContext.js +1 -0
- package/dialog/root/DialogRoot.d.ts +13 -13
- package/dialog/root/DialogRoot.js +17 -4
- package/dialog/root/useDialogRoot.d.ts +3 -3
- package/dialog/root/useDialogRoot.js +4 -0
- package/dialog/store/DialogStore.d.ts +258 -17
- package/dialog/store/DialogStore.js +3 -0
- package/dialog/title/DialogTitle.d.ts +1 -1
- package/dialog/trigger/DialogTrigger.d.ts +3 -3
- package/dialog/trigger/DialogTrigger.js +3 -3
- package/dialog/viewport/DialogViewport.d.ts +1 -1
- package/dialog/viewport/DialogViewport.js +5 -2
- package/direction-provider/DirectionProvider.d.ts +1 -1
- package/drawer/backdrop/DrawerBackdrop.d.ts +28 -0
- package/drawer/backdrop/DrawerBackdrop.js +63 -0
- package/drawer/backdrop/DrawerBackdropCssVars.d.ts +7 -0
- package/drawer/backdrop/DrawerBackdropCssVars.js +14 -0
- package/drawer/close/DrawerClose.d.ts +23 -0
- package/drawer/close/DrawerClose.js +15 -0
- package/drawer/content/DrawerContent.d.ts +15 -0
- package/drawer/content/DrawerContent.js +32 -0
- package/drawer/description/DrawerDescription.d.ts +18 -0
- package/drawer/description/DrawerDescription.js +15 -0
- package/drawer/indent/DrawerIndent.d.ts +20 -0
- package/drawer/indent/DrawerIndent.js +87 -0
- package/drawer/indent-background/DrawerIndentBackground.d.ts +18 -0
- package/drawer/indent-background/DrawerIndentBackground.js +47 -0
- package/drawer/index.d.ts +14 -0
- package/drawer/index.js +9 -0
- package/drawer/index.parts.d.ts +14 -0
- package/drawer/index.parts.js +109 -0
- package/drawer/popup/DrawerPopup.d.ts +69 -0
- package/drawer/popup/DrawerPopup.js +291 -0
- package/drawer/popup/DrawerPopupCssVars.d.ts +37 -0
- package/drawer/popup/DrawerPopupCssVars.js +44 -0
- package/drawer/popup/DrawerPopupDataAttributes.d.ts +27 -0
- package/drawer/popup/DrawerPopupDataAttributes.js +34 -0
- package/drawer/portal/DrawerPortal.d.ts +29 -0
- package/drawer/portal/DrawerPortal.js +16 -0
- package/drawer/provider/DrawerProvider.d.ts +16 -0
- package/drawer/provider/DrawerProvider.js +100 -0
- package/drawer/provider/DrawerProviderContext.d.ts +19 -0
- package/drawer/provider/DrawerProviderContext.js +21 -0
- package/drawer/root/DrawerRoot.d.ts +124 -0
- package/drawer/root/DrawerRoot.js +235 -0
- package/drawer/root/DrawerRootContext.d.ts +89 -0
- package/drawer/root/DrawerRootContext.js +21 -0
- package/drawer/root/useDrawerSnapPoints.d.ts +15 -0
- package/drawer/root/useDrawerSnapPoints.js +155 -0
- package/drawer/swipe-area/DrawerSwipeArea.d.ts +45 -0
- package/drawer/swipe-area/DrawerSwipeArea.js +385 -0
- package/drawer/title/DrawerTitle.d.ts +18 -0
- package/drawer/title/DrawerTitle.js +15 -0
- package/drawer/trigger/DrawerTrigger.d.ts +43 -0
- package/drawer/trigger/DrawerTrigger.js +15 -0
- package/drawer/viewport/DrawerViewport.d.ts +30 -0
- package/drawer/viewport/DrawerViewport.js +873 -0
- package/drawer/viewport/DrawerViewportContext.d.ts +11 -0
- package/drawer/viewport/DrawerViewportContext.js +21 -0
- package/esm/accordion/header/AccordionHeader.d.ts +1 -1
- package/esm/accordion/item/AccordionItem.d.ts +2 -2
- package/esm/accordion/item/AccordionItemContext.d.ts +1 -1
- package/esm/accordion/panel/AccordionPanel.d.ts +1 -1
- package/esm/accordion/root/AccordionRoot.d.ts +10 -10
- package/esm/accordion/trigger/AccordionTrigger.d.ts +1 -1
- package/esm/accordion/trigger/AccordionTrigger.js +3 -4
- package/esm/alert-dialog/root/AlertDialogRoot.d.ts +5 -5
- package/esm/alert-dialog/root/AlertDialogRoot.js +6 -4
- package/esm/autocomplete/index.parts.d.ts +2 -1
- package/esm/autocomplete/index.parts.js +2 -1
- package/esm/autocomplete/root/AutocompleteRoot.d.ts +19 -14
- package/esm/autocomplete/root/AutocompleteRoot.js +4 -6
- package/esm/avatar/fallback/AvatarFallback.d.ts +8 -3
- package/esm/avatar/fallback/AvatarFallback.js +33 -6
- package/esm/avatar/image/AvatarImage.d.ts +8 -3
- package/esm/avatar/image/AvatarImage.js +34 -6
- package/esm/avatar/image/useImageLoadingStatus.d.ts +2 -2
- package/esm/avatar/root/AvatarRoot.d.ts +1 -1
- package/esm/avatar/root/AvatarRoot.js +2 -2
- package/esm/button/Button.d.ts +5 -18
- package/esm/button/Button.js +3 -4
- package/esm/checkbox/indicator/CheckboxIndicator.d.ts +2 -2
- package/esm/checkbox/indicator/CheckboxIndicator.js +4 -4
- package/esm/checkbox/indicator/CheckboxIndicatorDataAttributes.d.ts +4 -0
- package/esm/checkbox/indicator/CheckboxIndicatorDataAttributes.js +4 -0
- package/esm/checkbox/root/CheckboxRoot.d.ts +14 -14
- package/esm/checkbox/root/CheckboxRoot.js +37 -13
- package/esm/checkbox/root/CheckboxRootDataAttributes.d.ts +4 -0
- package/esm/checkbox/root/CheckboxRootDataAttributes.js +4 -0
- package/esm/checkbox-group/CheckboxGroup.d.ts +6 -6
- package/esm/checkbox-group/CheckboxGroup.js +2 -2
- package/esm/checkbox-group/useCheckboxGroupParent.d.ts +3 -3
- package/esm/collapsible/panel/CollapsiblePanel.d.ts +3 -3
- package/esm/collapsible/root/CollapsibleRoot.d.ts +5 -5
- package/esm/collapsible/root/useCollapsibleRoot.d.ts +2 -2
- package/esm/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
- package/esm/collapsible/trigger/CollapsibleTrigger.js +1 -2
- package/esm/combobox/arrow/ComboboxArrow.d.ts +1 -1
- package/esm/combobox/arrow/ComboboxArrow.js +2 -2
- package/esm/combobox/arrow/ComboboxArrowDataAttributes.js +2 -2
- package/esm/combobox/backdrop/ComboboxBackdrop.d.ts +1 -1
- package/esm/combobox/backdrop/ComboboxBackdrop.js +2 -2
- package/esm/combobox/chip/ComboboxChip.d.ts +1 -1
- package/esm/combobox/chip/ComboboxChip.js +6 -3
- package/esm/combobox/chip/ComboboxChipContext.js +2 -0
- package/esm/combobox/chip-remove/ComboboxChipRemove.d.ts +1 -1
- package/esm/combobox/chip-remove/ComboboxChipRemove.js +31 -35
- package/esm/combobox/chips/ComboboxChips.d.ts +1 -1
- package/esm/combobox/chips/ComboboxChips.js +7 -1
- package/esm/combobox/chips/ComboboxChipsContext.js +2 -0
- package/esm/combobox/clear/ComboboxClear.d.ts +3 -3
- package/esm/combobox/clear/ComboboxClear.js +4 -5
- package/esm/combobox/empty/ComboboxEmpty.d.ts +1 -1
- package/esm/combobox/group/ComboboxGroup.d.ts +2 -2
- package/esm/combobox/group/ComboboxGroupContext.d.ts +1 -1
- package/esm/combobox/group/ComboboxGroupContext.js +2 -0
- package/esm/combobox/group-label/ComboboxGroupLabel.d.ts +1 -1
- package/esm/combobox/icon/ComboboxIcon.d.ts +1 -1
- package/esm/combobox/index.parts.d.ts +2 -1
- package/esm/combobox/index.parts.js +2 -1
- package/esm/combobox/input/ComboboxInput.d.ts +2 -2
- package/esm/combobox/input/ComboboxInput.js +49 -24
- package/esm/combobox/item/ComboboxItem.d.ts +4 -4
- package/esm/combobox/item/ComboboxItem.js +15 -16
- package/esm/combobox/item/ComboboxItemContext.js +2 -0
- package/esm/combobox/item-indicator/ComboboxItemIndicator.d.ts +2 -2
- package/esm/combobox/item-indicator/ComboboxItemIndicator.js +2 -2
- package/esm/combobox/list/ComboboxList.d.ts +1 -1
- package/esm/combobox/list/ComboboxList.js +2 -2
- package/esm/combobox/popup/ComboboxPopup.d.ts +3 -3
- package/esm/combobox/popup/ComboboxPopup.js +2 -2
- package/esm/combobox/popup/ComboboxPopupDataAttributes.js +2 -2
- package/esm/combobox/portal/ComboboxPortal.d.ts +2 -2
- package/esm/combobox/portal/ComboboxPortalContext.js +2 -0
- package/esm/combobox/positioner/ComboboxPositioner.d.ts +1 -1
- package/esm/combobox/positioner/ComboboxPositioner.js +5 -3
- package/esm/combobox/positioner/ComboboxPositionerDataAttributes.js +2 -2
- package/esm/combobox/root/AriaCombobox.d.ts +55 -43
- package/esm/combobox/root/AriaCombobox.js +60 -75
- package/esm/combobox/root/ComboboxRoot.d.ts +19 -14
- package/esm/combobox/root/ComboboxRoot.js +3 -1
- package/esm/combobox/root/ComboboxRootContext.d.ts +1 -0
- package/esm/combobox/root/ComboboxRootContext.js +2 -0
- package/esm/combobox/root/utils/useFilter.d.ts +2 -2
- package/esm/combobox/root/utils/useFilteredItems.d.ts +4 -0
- package/esm/combobox/root/utils/useFilteredItems.js +9 -0
- package/esm/combobox/row/ComboboxRow.d.ts +1 -1
- package/esm/combobox/row/ComboboxRowContext.js +2 -0
- package/esm/combobox/status/ComboboxStatus.d.ts +1 -1
- package/esm/combobox/store.d.ts +14 -11
- package/esm/combobox/store.js +24 -3
- package/esm/combobox/trigger/ComboboxTrigger.d.ts +15 -2
- package/esm/combobox/trigger/ComboboxTrigger.js +34 -15
- package/esm/combobox/trigger/ComboboxTriggerDataAttributes.d.ts +13 -0
- package/esm/combobox/trigger/ComboboxTriggerDataAttributes.js +13 -0
- package/esm/combobox/utils/stateAttributesMapping.d.ts +14 -0
- package/esm/combobox/utils/stateAttributesMapping.js +12 -0
- package/esm/combobox/value/ComboboxValue.d.ts +5 -0
- package/esm/combobox/value/ComboboxValue.js +16 -7
- package/esm/composite/item/CompositeItem.d.ts +6 -6
- package/esm/composite/list/CompositeList.d.ts +3 -3
- package/esm/composite/list/CompositeListContext.d.ts +1 -1
- package/esm/composite/list/useCompositeListItem.d.ts +5 -5
- package/esm/composite/root/CompositeRoot.d.ts +19 -19
- package/esm/composite/root/useCompositeRoot.d.ts +13 -13
- package/esm/context-menu/index.d.ts +1 -0
- package/esm/context-menu/index.parts.d.ts +1 -0
- package/esm/context-menu/index.parts.js +1 -0
- package/esm/context-menu/root/ContextMenuRoot.d.ts +1 -1
- package/esm/context-menu/root/ContextMenuRootContext.js +2 -0
- package/esm/context-menu/trigger/ContextMenuTrigger.d.ts +1 -1
- package/esm/context-menu/trigger/ContextMenuTrigger.js +13 -3
- package/esm/csp-provider/CSPContext.d.ts +13 -0
- package/esm/csp-provider/CSPContext.js +18 -0
- package/esm/csp-provider/CSPProvider.d.ts +25 -0
- package/esm/csp-provider/CSPProvider.js +27 -0
- package/esm/csp-provider/index.d.ts +2 -0
- package/esm/csp-provider/index.js +1 -0
- package/esm/csp-provider/index.parts.d.ts +1 -0
- package/esm/csp-provider/index.parts.js +1 -0
- package/esm/dialog/backdrop/DialogBackdrop.d.ts +2 -2
- package/esm/dialog/backdrop/DialogBackdrop.js +2 -2
- package/esm/dialog/close/DialogClose.d.ts +1 -1
- package/esm/dialog/close/DialogClose.js +2 -2
- package/esm/dialog/description/DialogDescription.d.ts +1 -1
- package/esm/dialog/popup/DialogPopup.d.ts +3 -3
- package/esm/dialog/popup/DialogPopup.js +2 -2
- package/esm/dialog/portal/DialogPortal.d.ts +3 -3
- package/esm/dialog/portal/DialogPortal.js +1 -0
- package/esm/dialog/portal/DialogPortalContext.js +2 -0
- package/esm/dialog/root/DialogRoot.d.ts +13 -13
- package/esm/dialog/root/DialogRoot.js +17 -4
- package/esm/dialog/root/useDialogRoot.d.ts +3 -3
- package/esm/dialog/root/useDialogRoot.js +4 -0
- package/esm/dialog/store/DialogStore.d.ts +258 -17
- package/esm/dialog/store/DialogStore.js +3 -0
- package/esm/dialog/title/DialogTitle.d.ts +1 -1
- package/esm/dialog/trigger/DialogTrigger.d.ts +3 -3
- package/esm/dialog/trigger/DialogTrigger.js +2 -2
- package/esm/dialog/viewport/DialogViewport.d.ts +1 -1
- package/esm/dialog/viewport/DialogViewport.js +5 -2
- package/esm/direction-provider/DirectionProvider.d.ts +1 -1
- package/esm/drawer/backdrop/DrawerBackdrop.d.ts +28 -0
- package/esm/drawer/backdrop/DrawerBackdrop.js +57 -0
- package/esm/drawer/backdrop/DrawerBackdropCssVars.d.ts +7 -0
- package/esm/drawer/backdrop/DrawerBackdropCssVars.js +8 -0
- package/esm/drawer/close/DrawerClose.d.ts +23 -0
- package/esm/drawer/close/DrawerClose.js +10 -0
- package/esm/drawer/content/DrawerContent.d.ts +15 -0
- package/esm/drawer/content/DrawerContent.js +27 -0
- package/esm/drawer/description/DrawerDescription.d.ts +18 -0
- package/esm/drawer/description/DrawerDescription.js +10 -0
- package/esm/drawer/indent/DrawerIndent.d.ts +20 -0
- package/esm/drawer/indent/DrawerIndent.js +81 -0
- package/esm/drawer/indent-background/DrawerIndentBackground.d.ts +18 -0
- package/esm/drawer/indent-background/DrawerIndentBackground.js +41 -0
- package/esm/drawer/index.d.ts +14 -0
- package/esm/drawer/index.js +1 -0
- package/esm/drawer/index.parts.d.ts +14 -0
- package/esm/drawer/index.parts.js +14 -0
- package/esm/drawer/popup/DrawerPopup.d.ts +69 -0
- package/esm/drawer/popup/DrawerPopup.js +285 -0
- package/esm/drawer/popup/DrawerPopupCssVars.d.ts +37 -0
- package/esm/drawer/popup/DrawerPopupCssVars.js +38 -0
- package/esm/drawer/popup/DrawerPopupDataAttributes.d.ts +27 -0
- package/esm/drawer/popup/DrawerPopupDataAttributes.js +28 -0
- package/esm/drawer/portal/DrawerPortal.d.ts +29 -0
- package/esm/drawer/portal/DrawerPortal.js +11 -0
- package/esm/drawer/provider/DrawerProvider.d.ts +16 -0
- package/esm/drawer/provider/DrawerProvider.js +95 -0
- package/esm/drawer/provider/DrawerProviderContext.d.ts +19 -0
- package/esm/drawer/provider/DrawerProviderContext.js +13 -0
- package/esm/drawer/root/DrawerRoot.d.ts +124 -0
- package/esm/drawer/root/DrawerRoot.js +229 -0
- package/esm/drawer/root/DrawerRootContext.d.ts +89 -0
- package/esm/drawer/root/DrawerRootContext.js +13 -0
- package/esm/drawer/root/useDrawerSnapPoints.d.ts +15 -0
- package/esm/drawer/root/useDrawerSnapPoints.js +149 -0
- package/esm/drawer/swipe-area/DrawerSwipeArea.d.ts +45 -0
- package/esm/drawer/swipe-area/DrawerSwipeArea.js +379 -0
- package/esm/drawer/title/DrawerTitle.d.ts +18 -0
- package/esm/drawer/title/DrawerTitle.js +10 -0
- package/esm/drawer/trigger/DrawerTrigger.d.ts +43 -0
- package/esm/drawer/trigger/DrawerTrigger.js +10 -0
- package/esm/drawer/viewport/DrawerViewport.d.ts +30 -0
- package/esm/drawer/viewport/DrawerViewport.js +867 -0
- package/esm/drawer/viewport/DrawerViewportContext.d.ts +11 -0
- package/esm/drawer/viewport/DrawerViewportContext.js +13 -0
- package/esm/field/control/FieldControl.d.ts +3 -3
- package/esm/field/control/FieldControl.js +22 -20
- package/esm/field/description/FieldDescription.d.ts +1 -1
- package/esm/field/error/FieldError.d.ts +6 -3
- package/esm/field/error/FieldError.js +50 -7
- package/esm/field/index.d.ts +2 -1
- package/esm/field/item/FieldItem.d.ts +2 -2
- package/esm/field/item/FieldItemContext.js +2 -0
- package/esm/field/label/FieldLabel.d.ts +11 -2
- package/esm/field/label/FieldLabel.js +56 -11
- package/esm/field/root/FieldRoot.d.ts +18 -9
- package/esm/field/root/FieldRoot.js +8 -0
- package/esm/field/root/FieldRootContext.d.ts +1 -1
- package/esm/field/useField.d.ts +1 -1
- package/esm/field/useField.js +9 -3
- package/esm/field/validity/FieldValidity.d.ts +2 -0
- package/esm/field/validity/FieldValidity.js +11 -4
- package/esm/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/esm/fieldset/legend/FieldsetLegend.js +2 -2
- package/esm/fieldset/root/FieldsetRoot.d.ts +2 -2
- package/esm/fieldset/root/FieldsetRoot.js +3 -3
- package/esm/floating-ui-react/components/FloatingDelayGroup.d.ts +2 -7
- package/esm/floating-ui-react/components/FloatingDelayGroup.js +2 -9
- package/esm/floating-ui-react/components/FloatingFocusManager.d.ts +11 -21
- package/esm/floating-ui-react/components/FloatingFocusManager.js +70 -82
- package/esm/floating-ui-react/components/FloatingPortal.d.ts +10 -11
- package/esm/floating-ui-react/components/FloatingPortal.js +12 -5
- package/esm/floating-ui-react/components/FloatingTree.d.ts +1 -1
- package/esm/floating-ui-react/hooks/useClick.d.ts +12 -6
- package/esm/floating-ui-react/hooks/useClick.js +6 -5
- package/esm/floating-ui-react/hooks/useClientPoint.d.ts +2 -12
- package/esm/floating-ui-react/hooks/useClientPoint.js +10 -20
- package/esm/floating-ui-react/hooks/useDismiss.d.ts +15 -15
- package/esm/floating-ui-react/hooks/useDismiss.js +22 -6
- package/esm/floating-ui-react/hooks/useFloating.js +2 -0
- package/esm/floating-ui-react/hooks/useFloatingRootContext.d.ts +4 -10
- package/esm/floating-ui-react/hooks/useFloatingRootContext.js +5 -3
- package/esm/floating-ui-react/hooks/useFocus.d.ts +4 -5
- package/esm/floating-ui-react/hooks/useFocus.js +43 -10
- package/esm/floating-ui-react/hooks/useHover.d.ts +7 -30
- package/esm/floating-ui-react/hooks/useHover.js +20 -37
- package/esm/floating-ui-react/hooks/useHoverFloatingInteraction.d.ts +2 -7
- package/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js +35 -40
- package/esm/floating-ui-react/hooks/useHoverInteractionSharedState.d.ts +17 -14
- package/esm/floating-ui-react/hooks/useHoverInteractionSharedState.js +36 -30
- package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +7 -3
- package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js +71 -61
- package/esm/floating-ui-react/hooks/useInteractions.d.ts +2 -2
- package/esm/floating-ui-react/hooks/useListNavigation.d.ts +19 -35
- package/esm/floating-ui-react/hooks/useListNavigation.js +13 -12
- package/esm/floating-ui-react/hooks/useRole.d.ts +1 -7
- package/esm/floating-ui-react/hooks/useRole.js +2 -3
- package/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.d.ts +2 -2
- package/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js +5 -0
- package/esm/floating-ui-react/hooks/useTypeahead.d.ts +6 -16
- package/esm/floating-ui-react/hooks/useTypeahead.js +48 -16
- package/esm/floating-ui-react/middleware/arrow.d.ts +1 -1
- package/esm/floating-ui-react/safePolygon.d.ts +3 -3
- package/esm/floating-ui-react/types.d.ts +14 -14
- package/esm/floating-ui-react/utils/composite.d.ts +5 -5
- package/esm/floating-ui-react/utils/composite.js +1 -2
- package/esm/floating-ui-react/utils/element.d.ts +2 -1
- package/esm/floating-ui-react/utils/element.js +16 -4
- package/esm/floating-ui-react/utils/enqueueFocus.d.ts +3 -3
- package/esm/floating-ui-react/utils/event.js +2 -4
- package/esm/floating-ui-react/utils/markOthers.js +2 -2
- package/esm/floating-ui-react/utils/tabbable.js +6 -5
- package/esm/form/Form.d.ts +22 -5
- package/esm/form/Form.js +17 -0
- package/esm/form/FormContext.d.ts +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +3 -1
- package/esm/input/Input.d.ts +3 -3
- package/esm/labelable-provider/LabelableContext.d.ts +1 -1
- package/esm/labelable-provider/LabelableContext.js +1 -1
- package/esm/labelable-provider/LabelableProvider.js +33 -3
- package/esm/labelable-provider/useLabelableId.d.ts +3 -2
- package/esm/labelable-provider/useLabelableId.js +38 -12
- package/esm/menu/arrow/MenuArrow.d.ts +1 -1
- package/esm/menu/arrow/MenuArrow.js +2 -2
- package/esm/menu/arrow/MenuArrowDataAttributes.js +2 -2
- package/esm/menu/backdrop/MenuBackdrop.d.ts +1 -1
- package/esm/menu/backdrop/MenuBackdrop.js +2 -2
- package/esm/menu/checkbox-item/MenuCheckboxItem.d.ts +9 -9
- package/esm/menu/checkbox-item/MenuCheckboxItemContext.js +2 -0
- package/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.d.ts +3 -3
- package/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +3 -3
- package/esm/menu/group/MenuGroup.d.ts +1 -1
- package/esm/menu/group/MenuGroupContext.js +2 -0
- package/esm/menu/group-label/MenuGroupLabel.d.ts +1 -1
- package/esm/menu/index.d.ts +2 -1
- package/esm/menu/index.parts.d.ts +1 -0
- package/esm/menu/index.parts.js +1 -0
- package/esm/menu/item/MenuItem.d.ts +6 -6
- package/esm/menu/item/MenuItem.js +2 -2
- package/esm/menu/item/useMenuItem.js +12 -48
- package/esm/menu/item/useMenuItemCommonProps.d.ts +43 -0
- package/esm/menu/item/useMenuItemCommonProps.js +66 -0
- package/esm/menu/link-item/MenuLinkItem.d.ts +34 -0
- package/esm/menu/link-item/MenuLinkItem.js +55 -0
- package/esm/menu/link-item/MenuLinkItemDataAttributes.d.ts +6 -0
- package/esm/menu/link-item/MenuLinkItemDataAttributes.js +7 -0
- package/esm/menu/popup/MenuPopup.d.ts +4 -3
- package/esm/menu/popup/MenuPopup.js +6 -5
- package/esm/menu/popup/MenuPopupDataAttributes.js +2 -2
- package/esm/menu/portal/MenuPortal.d.ts +2 -2
- package/esm/menu/portal/MenuPortalContext.js +2 -0
- package/esm/menu/positioner/MenuPositioner.d.ts +1 -1
- package/esm/menu/positioner/MenuPositioner.js +6 -12
- package/esm/menu/positioner/MenuPositionerDataAttributes.js +2 -2
- package/esm/menu/radio-group/MenuRadioGroup.d.ts +3 -3
- package/esm/menu/radio-group/MenuRadioGroup.js +2 -2
- package/esm/menu/radio-group/MenuRadioGroupContext.js +2 -0
- package/esm/menu/radio-item/MenuRadioItem.d.ts +6 -6
- package/esm/menu/radio-item/MenuRadioItemContext.js +2 -0
- package/esm/menu/radio-item-indicator/MenuRadioItemIndicator.d.ts +3 -3
- package/esm/menu/radio-item-indicator/MenuRadioItemIndicator.js +3 -3
- package/esm/menu/root/MenuRoot.d.ts +21 -20
- package/esm/menu/root/MenuRoot.js +42 -38
- package/esm/menu/store/MenuStore.d.ts +255 -15
- package/esm/menu/store/MenuStore.js +5 -14
- package/esm/menu/submenu-root/MenuSubmenuRoot.d.ts +2 -2
- package/esm/menu/submenu-root/MenuSubmenuRootContext.js +2 -0
- package/esm/menu/submenu-trigger/MenuSubmenuTrigger.d.ts +23 -23
- package/esm/menu/submenu-trigger/MenuSubmenuTrigger.js +9 -7
- package/esm/menu/trigger/MenuTrigger.d.ts +10 -6
- package/esm/menu/trigger/MenuTrigger.js +17 -16
- package/esm/menubar/Menubar.d.ts +5 -5
- package/esm/menubar/Menubar.js +2 -2
- package/esm/merge-props/mergeProps.d.ts +31 -11
- package/esm/merge-props/mergeProps.js +29 -8
- package/esm/meter/indicator/MeterIndicator.d.ts +1 -1
- package/esm/meter/label/MeterLabel.d.ts +1 -1
- package/esm/meter/root/MeterRoot.d.ts +7 -7
- package/esm/meter/root/MeterRoot.js +3 -11
- package/esm/meter/track/MeterTrack.d.ts +1 -1
- package/esm/meter/value/MeterValue.d.ts +2 -2
- package/esm/navigation-menu/arrow/NavigationMenuArrow.d.ts +1 -1
- package/esm/navigation-menu/arrow/NavigationMenuArrow.js +2 -2
- package/esm/navigation-menu/arrow/NavigationMenuArrowDataAttributes.js +2 -2
- package/esm/navigation-menu/backdrop/NavigationMenuBackdrop.d.ts +1 -1
- package/esm/navigation-menu/backdrop/NavigationMenuBackdrop.js +2 -2
- package/esm/navigation-menu/content/NavigationMenuContent.d.ts +9 -2
- package/esm/navigation-menu/content/NavigationMenuContent.js +32 -5
- package/esm/navigation-menu/icon/NavigationMenuIcon.d.ts +1 -1
- package/esm/navigation-menu/icon/NavigationMenuIcon.js +2 -2
- package/esm/navigation-menu/item/NavigationMenuItem.d.ts +1 -1
- package/esm/navigation-menu/item/NavigationMenuItemContext.js +2 -0
- package/esm/navigation-menu/link/NavigationMenuLink.d.ts +3 -3
- package/esm/navigation-menu/link/NavigationMenuLink.js +2 -2
- package/esm/navigation-menu/list/NavigationMenuDismissContext.js +2 -0
- package/esm/navigation-menu/list/NavigationMenuList.d.ts +1 -1
- package/esm/navigation-menu/list/NavigationMenuList.js +2 -2
- package/esm/navigation-menu/popup/NavigationMenuPopup.d.ts +14 -1
- package/esm/navigation-menu/popup/NavigationMenuPopup.js +2 -2
- package/esm/navigation-menu/popup/NavigationMenuPopupDataAttributes.js +2 -2
- package/esm/navigation-menu/portal/NavigationMenuPortal.d.ts +3 -3
- package/esm/navigation-menu/portal/NavigationMenuPortalContext.js +2 -0
- package/esm/navigation-menu/positioner/NavigationMenuPositioner.d.ts +1 -1
- package/esm/navigation-menu/positioner/NavigationMenuPositioner.js +2 -2
- package/esm/navigation-menu/positioner/NavigationPositionerDataAttributes.js +2 -2
- package/esm/navigation-menu/root/NavigationMenuRoot.d.ts +7 -7
- package/esm/navigation-menu/root/NavigationMenuRoot.js +2 -2
- package/esm/navigation-menu/root/NavigationMenuRootContext.js +2 -0
- package/esm/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -1
- package/esm/navigation-menu/trigger/NavigationMenuTrigger.js +8 -124
- package/esm/navigation-menu/utils/isOutsideMenuEvent.d.ts +1 -1
- package/esm/navigation-menu/viewport/NavigationMenuViewport.d.ts +1 -1
- package/esm/navigation-menu/viewport/NavigationMenuViewport.js +21 -1
- package/esm/number-field/decrement/NumberFieldDecrement.d.ts +1 -1
- package/esm/number-field/decrement/NumberFieldDecrement.js +4 -6
- package/esm/number-field/group/NumberFieldGroup.d.ts +1 -1
- package/esm/number-field/increment/NumberFieldIncrement.d.ts +1 -1
- package/esm/number-field/increment/NumberFieldIncrement.js +4 -6
- package/esm/number-field/input/NumberFieldInput.d.ts +1 -1
- package/esm/number-field/input/NumberFieldInput.js +8 -13
- package/esm/number-field/root/NumberFieldRoot.d.ts +31 -23
- package/esm/number-field/root/NumberFieldRoot.js +34 -12
- package/esm/number-field/root/NumberFieldRootContext.d.ts +2 -2
- package/esm/number-field/root/useNumberFieldButton.d.ts +3 -6
- package/esm/number-field/root/useNumberFieldButton.js +17 -18
- package/esm/number-field/scrub-area/NumberFieldScrubArea.d.ts +3 -3
- package/esm/number-field/scrub-area/NumberFieldScrubArea.js +16 -0
- package/esm/number-field/scrub-area/NumberFieldScrubAreaContext.js +2 -0
- package/esm/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.d.ts +1 -1
- package/esm/number-field/utils/stateAttributesMapping.js +3 -1
- package/esm/number-field/utils/subscribeToVisualViewportResize.d.ts +1 -1
- package/esm/number-field/utils/types.d.ts +5 -5
- package/esm/number-field/utils/validate.d.ts +3 -1
- package/esm/number-field/utils/validate.js +3 -2
- package/esm/popover/arrow/PopoverArrow.d.ts +1 -1
- package/esm/popover/arrow/PopoverArrow.js +2 -2
- package/esm/popover/arrow/PopoverArrowDataAttributes.js +2 -2
- package/esm/popover/backdrop/PopoverBackdrop.d.ts +1 -1
- package/esm/popover/backdrop/PopoverBackdrop.js +2 -2
- package/esm/popover/close/PopoverClose.d.ts +1 -1
- package/esm/popover/description/PopoverDescription.d.ts +1 -1
- package/esm/popover/popup/PopoverPopup.d.ts +4 -3
- package/esm/popover/popup/PopoverPopup.js +2 -32
- package/esm/popover/portal/PopoverPortal.d.ts +2 -2
- package/esm/popover/portal/PopoverPortal.js +1 -2
- package/esm/popover/portal/PopoverPortalContext.js +2 -0
- package/esm/popover/positioner/PopoverPositioner.d.ts +1 -1
- package/esm/popover/positioner/PopoverPositioner.js +5 -4
- package/esm/popover/positioner/PopoverPositionerDataAttributes.js +2 -2
- package/esm/popover/root/PopoverRoot.d.ts +11 -11
- package/esm/popover/root/PopoverRoot.js +18 -5
- package/esm/popover/store/PopoverStore.d.ts +257 -15
- package/esm/popover/store/PopoverStore.js +8 -5
- package/esm/popover/title/PopoverTitle.d.ts +1 -1
- package/esm/popover/trigger/PopoverTrigger.d.ts +7 -7
- package/esm/popover/trigger/PopoverTrigger.js +4 -4
- package/esm/popover/viewport/PopoverViewport.d.ts +10 -2
- package/esm/popover/viewport/PopoverViewport.js +20 -181
- package/esm/popover/viewport/PopoverViewportDataAttributes.d.ts +5 -0
- package/esm/popover/viewport/PopoverViewportDataAttributes.js +5 -0
- package/esm/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
- package/esm/preview-card/arrow/PreviewCardArrow.js +4 -5
- package/esm/preview-card/arrow/PreviewCardArrowDataAttributes.js +2 -2
- package/esm/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
- package/esm/preview-card/backdrop/PreviewCardBackdrop.js +6 -7
- package/esm/preview-card/index.parts.d.ts +3 -1
- package/esm/preview-card/index.parts.js +3 -1
- package/esm/preview-card/popup/PreviewCardPopup.d.ts +2 -1
- package/esm/preview-card/popup/PreviewCardPopup.js +18 -12
- package/esm/preview-card/popup/PreviewCardPopupDataAttributes.js +2 -2
- package/esm/preview-card/portal/PreviewCardPortal.d.ts +2 -2
- package/esm/preview-card/portal/PreviewCardPortal.js +2 -3
- package/esm/preview-card/portal/PreviewCardPortalContext.js +2 -0
- package/esm/preview-card/positioner/PreviewCardPositioner.d.ts +2 -1
- package/esm/preview-card/positioner/PreviewCardPositioner.js +17 -12
- package/esm/preview-card/positioner/PreviewCardPositionerContext.d.ts +1 -1
- package/esm/preview-card/positioner/PreviewCardPositionerDataAttributes.js +2 -2
- package/esm/preview-card/root/PreviewCardContext.d.ts +5 -26
- package/esm/preview-card/root/PreviewCardContext.js +2 -2
- package/esm/preview-card/root/PreviewCardRoot.d.ts +39 -14
- package/esm/preview-card/root/PreviewCardRoot.js +73 -115
- package/esm/preview-card/store/PreviewCardHandle.d.ts +33 -0
- package/esm/preview-card/store/PreviewCardHandle.js +55 -0
- package/esm/preview-card/store/PreviewCardStore.d.ts +276 -0
- package/esm/preview-card/store/PreviewCardStore.js +97 -0
- package/esm/preview-card/trigger/PreviewCardTrigger.d.ts +17 -5
- package/esm/preview-card/trigger/PreviewCardTrigger.js +50 -14
- package/esm/preview-card/viewport/PreviewCardViewport.d.ts +27 -0
- package/esm/preview-card/viewport/PreviewCardViewport.js +56 -0
- package/esm/preview-card/viewport/PreviewCardViewportCssVars.d.ts +14 -0
- package/esm/preview-card/viewport/PreviewCardViewportCssVars.js +15 -0
- package/esm/preview-card/viewport/PreviewCardViewportDataAttributes.d.ts +26 -0
- package/esm/preview-card/viewport/PreviewCardViewportDataAttributes.js +27 -0
- package/esm/progress/indicator/ProgressIndicator.d.ts +1 -1
- package/esm/progress/label/ProgressLabel.d.ts +1 -1
- package/esm/progress/root/ProgressRoot.d.ts +7 -7
- package/esm/progress/root/ProgressRoot.js +2 -13
- package/esm/progress/track/ProgressTrack.d.ts +1 -1
- package/esm/progress/value/ProgressValue.d.ts +2 -2
- package/esm/radio/indicator/RadioIndicator.d.ts +2 -2
- package/esm/radio/indicator/RadioIndicator.js +4 -4
- package/esm/radio/root/RadioRoot.d.ts +37 -17
- package/esm/radio/root/RadioRoot.js +53 -19
- package/esm/radio-group/RadioGroup.d.ts +18 -12
- package/esm/radio-group/RadioGroup.js +69 -62
- package/esm/radio-group/RadioGroupContext.d.ts +9 -8
- package/esm/radio-group/RadioGroupContext.js +1 -13
- package/esm/scroll-area/content/ScrollAreaContent.d.ts +1 -1
- package/esm/scroll-area/content/ScrollAreaContent.js +10 -1
- package/esm/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/esm/scroll-area/corner/ScrollAreaCorner.js +1 -1
- package/esm/scroll-area/root/ScrollAreaRoot.d.ts +30 -4
- package/esm/scroll-area/root/ScrollAreaRoot.js +34 -29
- package/esm/scroll-area/root/ScrollAreaRootContext.d.ts +10 -43
- package/esm/scroll-area/root/ScrollAreaRootContext.js +2 -0
- package/esm/scroll-area/root/ScrollAreaRootDataAttributes.d.ts +4 -0
- package/esm/scroll-area/root/ScrollAreaRootDataAttributes.js +4 -0
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +3 -3
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.js +6 -6
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbarContext.js +2 -0
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.d.ts +1 -1
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.js +1 -1
- package/esm/scroll-area/thumb/ScrollAreaThumb.d.ts +3 -3
- package/esm/scroll-area/thumb/ScrollAreaThumb.js +3 -3
- package/esm/scroll-area/utils/scrollEdges.d.ts +2 -0
- package/esm/scroll-area/utils/scrollEdges.js +22 -0
- package/esm/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
- package/esm/scroll-area/viewport/ScrollAreaViewport.js +67 -38
- package/esm/scroll-area/viewport/ScrollAreaViewportContext.js +2 -0
- package/esm/scroll-area/viewport/ScrollAreaViewportDataAttributes.d.ts +4 -0
- package/esm/scroll-area/viewport/ScrollAreaViewportDataAttributes.js +4 -0
- package/esm/select/arrow/SelectArrow.d.ts +1 -1
- package/esm/select/arrow/SelectArrow.js +2 -2
- package/esm/select/arrow/SelectArrowDataAttributes.js +2 -2
- package/esm/select/backdrop/SelectBackdrop.d.ts +1 -1
- package/esm/select/backdrop/SelectBackdrop.js +2 -2
- package/esm/select/group/SelectGroup.d.ts +1 -1
- package/esm/select/group/SelectGroupContext.js +2 -0
- package/esm/select/group-label/SelectGroupLabel.d.ts +1 -1
- package/esm/select/icon/SelectIcon.d.ts +1 -1
- package/esm/select/icon/SelectIcon.js +2 -2
- package/esm/select/item/SelectItem.d.ts +3 -3
- package/esm/select/item/SelectItem.js +13 -14
- package/esm/select/item/SelectItemContext.js +2 -0
- package/esm/select/item-indicator/SelectItemIndicator.d.ts +2 -2
- package/esm/select/item-indicator/SelectItemIndicator.js +2 -2
- package/esm/select/item-text/SelectItemText.d.ts +1 -1
- package/esm/select/list/SelectList.d.ts +1 -1
- package/esm/select/popup/SelectPopup.d.ts +12 -1
- package/esm/select/popup/SelectPopup.js +200 -112
- package/esm/select/popup/SelectPopupDataAttributes.js +2 -2
- package/esm/select/portal/SelectPortal.d.ts +1 -1
- package/esm/select/portal/SelectPortalContext.js +2 -0
- package/esm/select/positioner/SelectPositioner.d.ts +2 -2
- package/esm/select/positioner/SelectPositioner.js +14 -11
- package/esm/select/positioner/SelectPositionerContext.js +2 -0
- package/esm/select/positioner/SelectPositionerDataAttributes.js +2 -2
- package/esm/select/root/SelectRoot.d.ts +28 -23
- package/esm/select/root/SelectRoot.js +28 -13
- package/esm/select/root/SelectRootContext.d.ts +14 -14
- package/esm/select/root/SelectRootContext.js +2 -0
- package/esm/select/scroll-arrow/SelectScrollArrow.d.ts +2 -2
- package/esm/select/scroll-arrow/SelectScrollArrow.js +2 -2
- package/esm/select/scroll-down-arrow/SelectScrollDownArrow.d.ts +2 -2
- package/esm/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.js +1 -1
- package/esm/select/scroll-up-arrow/SelectScrollUpArrow.d.ts +2 -2
- package/esm/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.js +1 -1
- package/esm/select/store.d.ts +5 -4
- package/esm/select/store.js +22 -16
- package/esm/select/trigger/SelectTrigger.d.ts +15 -5
- package/esm/select/trigger/SelectTrigger.js +51 -19
- package/esm/select/value/SelectValue.d.ts +10 -1
- package/esm/select/value/SelectValue.js +20 -6
- package/esm/separator/Separator.d.ts +2 -2
- package/esm/separator/Separator.js +2 -2
- package/esm/slider/control/SliderControl.d.ts +1 -1
- package/esm/slider/control/SliderControl.js +1 -1
- package/esm/slider/control/SliderControlDataAttributes.d.ts +0 -8
- package/esm/slider/control/SliderControlDataAttributes.js +0 -8
- package/esm/slider/indicator/SliderIndicator.d.ts +1 -1
- package/esm/slider/indicator/SliderIndicatorDataAttributes.d.ts +0 -8
- package/esm/slider/indicator/SliderIndicatorDataAttributes.js +0 -8
- package/esm/slider/root/SliderRoot.d.ts +17 -17
- package/esm/slider/root/SliderRoot.js +3 -2
- package/esm/slider/root/SliderRootContext.d.ts +2 -2
- package/esm/slider/root/SliderRootDataAttributes.d.ts +0 -8
- package/esm/slider/root/SliderRootDataAttributes.js +0 -8
- package/esm/slider/root/stateAttributesMapping.js +3 -1
- package/esm/slider/thumb/SliderThumb.d.ts +9 -9
- package/esm/slider/thumb/SliderThumb.js +7 -1
- package/esm/slider/thumb/SliderThumbDataAttributes.d.ts +0 -8
- package/esm/slider/thumb/SliderThumbDataAttributes.js +0 -8
- package/esm/slider/track/SliderTrack.d.ts +1 -1
- package/esm/slider/track/SliderTrackDataAttributes.d.ts +0 -8
- package/esm/slider/track/SliderTrackDataAttributes.js +0 -8
- package/esm/slider/utils/getPushedThumbValues.d.ts +1 -1
- package/esm/slider/utils/resolveThumbCollision.d.ts +2 -2
- package/esm/slider/value/SliderValue.d.ts +2 -2
- package/esm/slider/value/SliderValueDataAttributes.d.ts +0 -8
- package/esm/slider/value/SliderValueDataAttributes.js +0 -8
- package/esm/switch/root/SwitchRoot.d.ts +16 -11
- package/esm/switch/root/SwitchRoot.js +22 -7
- package/esm/switch/root/SwitchRootContext.js +2 -0
- package/esm/switch/thumb/SwitchThumb.d.ts +1 -1
- package/esm/tabs/indicator/TabsIndicator.d.ts +2 -2
- package/esm/tabs/indicator/TabsIndicator.js +8 -2
- package/esm/tabs/list/TabsList.d.ts +3 -3
- package/esm/tabs/list/TabsList.js +2 -2
- package/esm/tabs/panel/TabsPanel.d.ts +5 -3
- package/esm/tabs/panel/TabsPanel.js +35 -9
- package/esm/tabs/root/TabsRoot.d.ts +5 -5
- package/esm/tabs/root/TabsRootContext.d.ts +1 -1
- package/esm/tabs/tab/TabsTab.d.ts +2 -2
- package/esm/tabs/tab/TabsTab.js +2 -2
- package/esm/toast/action/ToastAction.d.ts +1 -1
- package/esm/toast/action/ToastAction.js +2 -2
- package/esm/toast/arrow/ToastArrow.d.ts +1 -1
- package/esm/toast/arrow/ToastArrow.js +2 -2
- package/esm/toast/arrow/ToastArrowDataAttributes.js +4 -3
- package/esm/toast/close/ToastClose.d.ts +1 -1
- package/esm/toast/close/ToastClose.js +6 -8
- package/esm/toast/content/ToastContent.d.ts +1 -1
- package/esm/toast/content/ToastContent.js +2 -2
- package/esm/toast/createToastManager.d.ts +5 -5
- package/esm/toast/createToastManager.js +3 -6
- package/esm/toast/description/ToastDescription.d.ts +1 -1
- package/esm/toast/description/ToastDescription.js +4 -6
- package/esm/toast/portal/ToastPortal.d.ts +1 -1
- package/esm/toast/positioner/ToastPositioner.d.ts +3 -3
- package/esm/toast/positioner/ToastPositioner.js +6 -7
- package/esm/toast/positioner/ToastPositionerDataAttributes.js +2 -2
- package/esm/toast/provider/ToastProvider.d.ts +3 -3
- package/esm/toast/provider/ToastProvider.js +26 -258
- package/esm/toast/provider/ToastProviderContext.d.ts +4 -25
- package/esm/toast/provider/ToastProviderContext.js +3 -1
- package/esm/toast/root/ToastRoot.d.ts +2 -2
- package/esm/toast/root/ToastRoot.js +19 -27
- package/esm/toast/root/ToastRootContext.js +2 -0
- package/esm/toast/store.d.ts +51 -0
- package/esm/toast/store.js +355 -0
- package/esm/toast/title/ToastTitle.d.ts +1 -1
- package/esm/toast/title/ToastTitle.js +4 -6
- package/esm/toast/useToastManager.d.ts +20 -21
- package/esm/toast/useToastManager.js +8 -14
- package/esm/toast/viewport/ToastViewport.d.ts +1 -1
- package/esm/toast/viewport/ToastViewport.js +66 -92
- package/esm/toggle/Toggle.d.ts +10 -8
- package/esm/toggle/Toggle.js +13 -3
- package/esm/toggle-group/ToggleGroup.d.ts +22 -10
- package/esm/toggle-group/ToggleGroup.js +8 -5
- package/esm/toggle-group/ToggleGroupContext.d.ts +10 -5
- package/esm/toolbar/button/ToolbarButton.d.ts +3 -3
- package/esm/toolbar/button/ToolbarButton.js +2 -2
- package/esm/toolbar/group/ToolbarGroup.d.ts +2 -2
- package/esm/toolbar/group/ToolbarGroup.js +2 -2
- package/esm/toolbar/group/ToolbarGroupContext.js +2 -0
- package/esm/toolbar/input/ToolbarInput.d.ts +4 -4
- package/esm/toolbar/input/ToolbarInput.js +2 -2
- package/esm/toolbar/link/ToolbarLink.d.ts +1 -1
- package/esm/toolbar/link/ToolbarLink.js +2 -2
- package/esm/toolbar/root/ToolbarRoot.d.ts +4 -4
- package/esm/toolbar/root/ToolbarRoot.js +2 -2
- package/esm/toolbar/separator/ToolbarSeparator.d.ts +1 -1
- package/esm/tooltip/arrow/TooltipArrow.d.ts +2 -1
- package/esm/tooltip/arrow/TooltipArrow.js +2 -2
- package/esm/tooltip/arrow/TooltipArrowDataAttributes.js +2 -2
- package/esm/tooltip/popup/TooltipPopup.d.ts +1 -1
- package/esm/tooltip/popup/TooltipPopup.js +2 -33
- package/esm/tooltip/popup/TooltipPopupDataAttributes.js +2 -2
- package/esm/tooltip/portal/TooltipPortal.d.ts +2 -2
- package/esm/tooltip/portal/TooltipPortalContext.js +2 -0
- package/esm/tooltip/positioner/TooltipPositioner.d.ts +2 -2
- package/esm/tooltip/positioner/TooltipPositioner.js +2 -1
- package/esm/tooltip/positioner/TooltipPositionerContext.d.ts +1 -1
- package/esm/tooltip/positioner/TooltipPositionerDataAttributes.js +2 -2
- package/esm/tooltip/provider/TooltipProvider.d.ts +3 -3
- package/esm/tooltip/provider/TooltipProviderContext.js +2 -0
- package/esm/tooltip/root/TooltipRoot.d.ts +15 -17
- package/esm/tooltip/root/TooltipRoot.js +24 -13
- package/esm/tooltip/store/TooltipStore.d.ts +258 -16
- package/esm/tooltip/store/TooltipStore.js +7 -4
- package/esm/tooltip/trigger/TooltipTrigger.d.ts +11 -4
- package/esm/tooltip/trigger/TooltipTrigger.js +13 -7
- package/esm/tooltip/trigger/TooltipTriggerDataAttributes.d.ts +4 -0
- package/esm/tooltip/trigger/TooltipTriggerDataAttributes.js +4 -0
- package/esm/tooltip/viewport/TooltipViewport.d.ts +10 -2
- package/esm/tooltip/viewport/TooltipViewport.js +17 -182
- package/esm/unstable-use-media-query/index.d.ts +5 -5
- package/esm/use-button/useButton.d.ts +4 -4
- package/esm/use-button/useButton.js +7 -2
- package/esm/use-render/index.d.ts +2 -1
- package/esm/use-render/index.js +2 -1
- package/esm/use-render/useRender.d.ts +9 -9
- package/esm/utils/FloatingPortalLite.d.ts +1 -1
- package/esm/utils/InternalBackdrop.d.ts +1 -1
- package/esm/utils/createBaseUIEventDetails.d.ts +3 -0
- package/esm/utils/formatNumber.d.ts +2 -1
- package/esm/utils/formatNumber.js +11 -0
- package/esm/utils/getDisabledMountTransitionStyles.d.ts +1 -1
- package/esm/utils/getPseudoElementBounds.js +1 -1
- package/esm/utils/itemEquality.d.ts +5 -5
- package/esm/utils/itemEquality.js +17 -17
- package/esm/utils/popupStateMapping.d.ts +10 -0
- package/esm/utils/popupStateMapping.js +10 -0
- package/esm/utils/popups/popupStoreUtils.js +23 -2
- package/esm/utils/popups/popupTriggerMap.d.ts +14 -1
- package/esm/utils/popups/popupTriggerMap.js +27 -9
- package/esm/utils/popups/store.d.ts +28 -18
- package/esm/utils/popups/store.js +8 -5
- package/esm/utils/reason-parts.d.ts +3 -0
- package/esm/utils/reason-parts.js +3 -0
- package/esm/utils/resolveValueLabel.d.ts +5 -1
- package/esm/utils/resolveValueLabel.js +46 -22
- package/esm/utils/scrollable.d.ts +4 -0
- package/esm/utils/scrollable.js +32 -0
- package/esm/utils/styles.d.ts +1 -1
- package/esm/utils/styles.js +10 -6
- package/esm/utils/types.d.ts +7 -7
- package/esm/utils/useAnchorPositioning.d.ts +26 -26
- package/esm/utils/useAnchorPositioning.js +19 -16
- package/esm/utils/useAnimationsFinished.d.ts +2 -2
- package/esm/utils/useAnimationsFinished.js +56 -33
- package/esm/utils/useFocusableWhenDisabled.d.ts +4 -4
- package/esm/utils/{useMixedToggleClickHander.d.ts → useMixedToggleClickHandler.d.ts} +1 -1
- package/esm/utils/{useMixedToggleClickHander.js → useMixedToggleClickHandler.js} +2 -0
- package/esm/utils/useOpenChangeComplete.d.ts +2 -2
- package/esm/utils/useOpenChangeComplete.js +8 -10
- package/esm/utils/useOpenInteractionType.js +6 -1
- package/esm/utils/usePopupAutoResize.d.ts +3 -3
- package/esm/utils/usePopupAutoResize.js +84 -46
- package/esm/utils/usePopupViewport.d.ts +58 -0
- package/esm/utils/usePopupViewport.js +247 -0
- package/esm/utils/useRenderElement.d.ts +9 -9
- package/esm/utils/useRenderElement.js +28 -1
- package/esm/utils/useSwipeDismiss.d.ts +108 -0
- package/esm/utils/useSwipeDismiss.js +944 -0
- package/esm/utils/useValueChanged.js +2 -0
- package/field/control/FieldControl.d.ts +3 -3
- package/field/control/FieldControl.js +21 -20
- package/field/description/FieldDescription.d.ts +1 -1
- package/field/error/FieldError.d.ts +6 -3
- package/field/error/FieldError.js +51 -7
- package/field/index.d.ts +2 -1
- package/field/item/FieldItem.d.ts +2 -2
- package/field/item/FieldItemContext.js +1 -0
- package/field/label/FieldLabel.d.ts +11 -2
- package/field/label/FieldLabel.js +56 -11
- package/field/root/FieldRoot.d.ts +18 -9
- package/field/root/FieldRoot.js +8 -0
- package/field/root/FieldRootContext.d.ts +1 -1
- package/field/useField.d.ts +1 -1
- package/field/useField.js +8 -3
- package/field/validity/FieldValidity.d.ts +2 -0
- package/field/validity/FieldValidity.js +9 -3
- package/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/fieldset/legend/FieldsetLegend.js +2 -2
- package/fieldset/root/FieldsetRoot.d.ts +2 -2
- package/fieldset/root/FieldsetRoot.js +3 -3
- package/floating-ui-react/components/FloatingDelayGroup.d.ts +2 -7
- package/floating-ui-react/components/FloatingDelayGroup.js +2 -9
- package/floating-ui-react/components/FloatingFocusManager.d.ts +11 -21
- package/floating-ui-react/components/FloatingFocusManager.js +68 -80
- package/floating-ui-react/components/FloatingPortal.d.ts +10 -11
- package/floating-ui-react/components/FloatingPortal.js +12 -5
- package/floating-ui-react/components/FloatingTree.d.ts +1 -1
- package/floating-ui-react/hooks/useClick.d.ts +12 -6
- package/floating-ui-react/hooks/useClick.js +6 -5
- package/floating-ui-react/hooks/useClientPoint.d.ts +2 -12
- package/floating-ui-react/hooks/useClientPoint.js +9 -20
- package/floating-ui-react/hooks/useDismiss.d.ts +15 -15
- package/floating-ui-react/hooks/useDismiss.js +20 -5
- package/floating-ui-react/hooks/useFloating.js +1 -0
- package/floating-ui-react/hooks/useFloatingRootContext.d.ts +4 -10
- package/floating-ui-react/hooks/useFloatingRootContext.js +4 -3
- package/floating-ui-react/hooks/useFocus.d.ts +4 -5
- package/floating-ui-react/hooks/useFocus.js +41 -9
- package/floating-ui-react/hooks/useHover.d.ts +7 -30
- package/floating-ui-react/hooks/useHover.js +18 -36
- package/floating-ui-react/hooks/useHoverFloatingInteraction.d.ts +2 -7
- package/floating-ui-react/hooks/useHoverFloatingInteraction.js +33 -39
- package/floating-ui-react/hooks/useHoverInteractionSharedState.d.ts +17 -14
- package/floating-ui-react/hooks/useHoverInteractionSharedState.js +36 -30
- package/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +7 -3
- package/floating-ui-react/hooks/useHoverReferenceInteraction.js +69 -60
- package/floating-ui-react/hooks/useInteractions.d.ts +2 -2
- package/floating-ui-react/hooks/useListNavigation.d.ts +19 -35
- package/floating-ui-react/hooks/useListNavigation.js +11 -11
- package/floating-ui-react/hooks/useRole.d.ts +1 -7
- package/floating-ui-react/hooks/useRole.js +2 -3
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.d.ts +2 -2
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.js +4 -0
- package/floating-ui-react/hooks/useTypeahead.d.ts +6 -16
- package/floating-ui-react/hooks/useTypeahead.js +46 -15
- package/floating-ui-react/middleware/arrow.d.ts +1 -1
- package/floating-ui-react/safePolygon.d.ts +3 -3
- package/floating-ui-react/types.d.ts +14 -14
- package/floating-ui-react/utils/composite.d.ts +5 -5
- package/floating-ui-react/utils/composite.js +1 -3
- package/floating-ui-react/utils/element.d.ts +2 -1
- package/floating-ui-react/utils/element.js +16 -4
- package/floating-ui-react/utils/enqueueFocus.d.ts +3 -3
- package/floating-ui-react/utils/event.js +2 -4
- package/floating-ui-react/utils/markOthers.js +2 -2
- package/floating-ui-react/utils/tabbable.js +5 -4
- package/form/Form.d.ts +22 -5
- package/form/Form.js +17 -0
- package/form/FormContext.d.ts +1 -1
- package/index.d.ts +2 -0
- package/index.js +23 -1
- package/input/Input.d.ts +3 -3
- package/labelable-provider/LabelableContext.d.ts +1 -1
- package/labelable-provider/LabelableContext.js +1 -1
- package/labelable-provider/LabelableProvider.js +33 -3
- package/labelable-provider/useLabelableId.d.ts +3 -2
- package/labelable-provider/useLabelableId.js +39 -12
- package/menu/arrow/MenuArrow.d.ts +1 -1
- package/menu/arrow/MenuArrow.js +2 -2
- package/menu/arrow/MenuArrowDataAttributes.js +2 -2
- package/menu/backdrop/MenuBackdrop.d.ts +1 -1
- package/menu/backdrop/MenuBackdrop.js +2 -2
- package/menu/checkbox-item/MenuCheckboxItem.d.ts +9 -9
- package/menu/checkbox-item/MenuCheckboxItemContext.js +1 -0
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.d.ts +3 -3
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +3 -3
- package/menu/group/MenuGroup.d.ts +1 -1
- package/menu/group/MenuGroupContext.js +1 -0
- package/menu/group-label/MenuGroupLabel.d.ts +1 -1
- package/menu/index.d.ts +2 -1
- package/menu/index.parts.d.ts +1 -0
- package/menu/index.parts.js +7 -0
- package/menu/item/MenuItem.d.ts +6 -6
- package/menu/item/MenuItem.js +2 -2
- package/menu/item/useMenuItem.js +12 -48
- package/menu/item/useMenuItemCommonProps.d.ts +43 -0
- package/menu/item/useMenuItemCommonProps.js +72 -0
- package/menu/link-item/MenuLinkItem.d.ts +34 -0
- package/menu/link-item/MenuLinkItem.js +60 -0
- package/menu/link-item/MenuLinkItemDataAttributes.d.ts +6 -0
- package/menu/link-item/MenuLinkItemDataAttributes.js +13 -0
- package/menu/popup/MenuPopup.d.ts +4 -3
- package/menu/popup/MenuPopup.js +6 -5
- package/menu/popup/MenuPopupDataAttributes.js +2 -2
- package/menu/portal/MenuPortal.d.ts +2 -2
- package/menu/portal/MenuPortalContext.js +1 -0
- package/menu/positioner/MenuPositioner.d.ts +1 -1
- package/menu/positioner/MenuPositioner.js +6 -12
- package/menu/positioner/MenuPositionerDataAttributes.js +2 -2
- package/menu/radio-group/MenuRadioGroup.d.ts +3 -3
- package/menu/radio-group/MenuRadioGroup.js +2 -2
- package/menu/radio-group/MenuRadioGroupContext.js +1 -0
- package/menu/radio-item/MenuRadioItem.d.ts +6 -6
- package/menu/radio-item/MenuRadioItemContext.js +1 -0
- package/menu/radio-item-indicator/MenuRadioItemIndicator.d.ts +3 -3
- package/menu/radio-item-indicator/MenuRadioItemIndicator.js +3 -3
- package/menu/root/MenuRoot.d.ts +21 -20
- package/menu/root/MenuRoot.js +43 -39
- package/menu/store/MenuStore.d.ts +255 -15
- package/menu/store/MenuStore.js +5 -14
- package/menu/submenu-root/MenuSubmenuRoot.d.ts +2 -2
- package/menu/submenu-root/MenuSubmenuRootContext.js +1 -0
- package/menu/submenu-trigger/MenuSubmenuTrigger.d.ts +23 -23
- package/menu/submenu-trigger/MenuSubmenuTrigger.js +10 -8
- package/menu/trigger/MenuTrigger.d.ts +10 -6
- package/menu/trigger/MenuTrigger.js +19 -18
- package/menubar/Menubar.d.ts +5 -5
- package/menubar/Menubar.js +2 -2
- package/merge-props/mergeProps.d.ts +31 -11
- package/merge-props/mergeProps.js +29 -8
- package/meter/indicator/MeterIndicator.d.ts +1 -1
- package/meter/label/MeterLabel.d.ts +1 -1
- package/meter/root/MeterRoot.d.ts +7 -7
- package/meter/root/MeterRoot.js +1 -10
- package/meter/track/MeterTrack.d.ts +1 -1
- package/meter/value/MeterValue.d.ts +2 -2
- package/navigation-menu/arrow/NavigationMenuArrow.d.ts +1 -1
- package/navigation-menu/arrow/NavigationMenuArrow.js +2 -2
- package/navigation-menu/arrow/NavigationMenuArrowDataAttributes.js +2 -2
- package/navigation-menu/backdrop/NavigationMenuBackdrop.d.ts +1 -1
- package/navigation-menu/backdrop/NavigationMenuBackdrop.js +2 -2
- package/navigation-menu/content/NavigationMenuContent.d.ts +9 -2
- package/navigation-menu/content/NavigationMenuContent.js +32 -5
- package/navigation-menu/icon/NavigationMenuIcon.d.ts +1 -1
- package/navigation-menu/icon/NavigationMenuIcon.js +2 -2
- package/navigation-menu/item/NavigationMenuItem.d.ts +1 -1
- package/navigation-menu/item/NavigationMenuItemContext.js +1 -0
- package/navigation-menu/link/NavigationMenuLink.d.ts +3 -3
- package/navigation-menu/link/NavigationMenuLink.js +2 -2
- package/navigation-menu/list/NavigationMenuDismissContext.js +1 -0
- package/navigation-menu/list/NavigationMenuList.d.ts +1 -1
- package/navigation-menu/list/NavigationMenuList.js +2 -2
- package/navigation-menu/popup/NavigationMenuPopup.d.ts +14 -1
- package/navigation-menu/popup/NavigationMenuPopup.js +2 -2
- package/navigation-menu/popup/NavigationMenuPopupDataAttributes.js +2 -2
- package/navigation-menu/portal/NavigationMenuPortal.d.ts +3 -3
- package/navigation-menu/portal/NavigationMenuPortalContext.js +1 -0
- package/navigation-menu/positioner/NavigationMenuPositioner.d.ts +1 -1
- package/navigation-menu/positioner/NavigationMenuPositioner.js +2 -2
- package/navigation-menu/positioner/NavigationPositionerDataAttributes.js +2 -2
- package/navigation-menu/root/NavigationMenuRoot.d.ts +7 -7
- package/navigation-menu/root/NavigationMenuRoot.js +2 -2
- package/navigation-menu/root/NavigationMenuRootContext.js +1 -0
- package/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -1
- package/navigation-menu/trigger/NavigationMenuTrigger.js +7 -124
- package/navigation-menu/utils/isOutsideMenuEvent.d.ts +1 -1
- package/navigation-menu/viewport/NavigationMenuViewport.d.ts +1 -1
- package/navigation-menu/viewport/NavigationMenuViewport.js +21 -1
- package/number-field/decrement/NumberFieldDecrement.d.ts +1 -1
- package/number-field/decrement/NumberFieldDecrement.js +4 -6
- package/number-field/group/NumberFieldGroup.d.ts +1 -1
- package/number-field/increment/NumberFieldIncrement.d.ts +1 -1
- package/number-field/increment/NumberFieldIncrement.js +4 -6
- package/number-field/input/NumberFieldInput.d.ts +1 -1
- package/number-field/input/NumberFieldInput.js +8 -13
- package/number-field/root/NumberFieldRoot.d.ts +31 -23
- package/number-field/root/NumberFieldRoot.js +33 -11
- package/number-field/root/NumberFieldRootContext.d.ts +2 -2
- package/number-field/root/useNumberFieldButton.d.ts +3 -6
- package/number-field/root/useNumberFieldButton.js +17 -18
- package/number-field/scrub-area/NumberFieldScrubArea.d.ts +3 -3
- package/number-field/scrub-area/NumberFieldScrubArea.js +16 -0
- package/number-field/scrub-area/NumberFieldScrubAreaContext.js +1 -0
- package/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.d.ts +1 -1
- package/number-field/utils/stateAttributesMapping.js +3 -1
- package/number-field/utils/subscribeToVisualViewportResize.d.ts +1 -1
- package/number-field/utils/types.d.ts +5 -5
- package/number-field/utils/validate.d.ts +3 -1
- package/number-field/utils/validate.js +3 -2
- package/package.json +24 -5
- package/popover/arrow/PopoverArrow.d.ts +1 -1
- package/popover/arrow/PopoverArrow.js +2 -2
- package/popover/arrow/PopoverArrowDataAttributes.js +2 -2
- package/popover/backdrop/PopoverBackdrop.d.ts +1 -1
- package/popover/backdrop/PopoverBackdrop.js +2 -2
- package/popover/close/PopoverClose.d.ts +1 -1
- package/popover/description/PopoverDescription.d.ts +1 -1
- package/popover/popup/PopoverPopup.d.ts +4 -3
- package/popover/popup/PopoverPopup.js +2 -32
- package/popover/portal/PopoverPortal.d.ts +2 -2
- package/popover/portal/PopoverPortal.js +1 -2
- package/popover/portal/PopoverPortalContext.js +1 -0
- package/popover/positioner/PopoverPositioner.d.ts +1 -1
- package/popover/positioner/PopoverPositioner.js +5 -4
- package/popover/positioner/PopoverPositionerDataAttributes.js +2 -2
- package/popover/root/PopoverRoot.d.ts +11 -11
- package/popover/root/PopoverRoot.js +18 -5
- package/popover/store/PopoverStore.d.ts +257 -15
- package/popover/store/PopoverStore.js +8 -5
- package/popover/title/PopoverTitle.d.ts +1 -1
- package/popover/trigger/PopoverTrigger.d.ts +7 -7
- package/popover/trigger/PopoverTrigger.js +5 -5
- package/popover/viewport/PopoverViewport.d.ts +10 -2
- package/popover/viewport/PopoverViewport.js +20 -181
- package/popover/viewport/PopoverViewportDataAttributes.d.ts +5 -0
- package/popover/viewport/PopoverViewportDataAttributes.js +5 -0
- package/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
- package/preview-card/arrow/PreviewCardArrow.js +4 -5
- package/preview-card/arrow/PreviewCardArrowDataAttributes.js +2 -2
- package/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
- package/preview-card/backdrop/PreviewCardBackdrop.js +6 -7
- package/preview-card/index.parts.d.ts +3 -1
- package/preview-card/index.parts.js +21 -1
- package/preview-card/popup/PreviewCardPopup.d.ts +2 -1
- package/preview-card/popup/PreviewCardPopup.js +18 -12
- package/preview-card/popup/PreviewCardPopupDataAttributes.js +2 -2
- package/preview-card/portal/PreviewCardPortal.d.ts +2 -2
- package/preview-card/portal/PreviewCardPortal.js +2 -3
- package/preview-card/portal/PreviewCardPortalContext.js +1 -0
- package/preview-card/positioner/PreviewCardPositioner.d.ts +2 -1
- package/preview-card/positioner/PreviewCardPositioner.js +17 -12
- package/preview-card/positioner/PreviewCardPositionerContext.d.ts +1 -1
- package/preview-card/positioner/PreviewCardPositionerDataAttributes.js +2 -2
- package/preview-card/root/PreviewCardContext.d.ts +5 -26
- package/preview-card/root/PreviewCardContext.js +2 -2
- package/preview-card/root/PreviewCardRoot.d.ts +39 -14
- package/preview-card/root/PreviewCardRoot.js +71 -112
- package/preview-card/store/PreviewCardHandle.d.ts +33 -0
- package/preview-card/store/PreviewCardHandle.js +63 -0
- package/preview-card/store/PreviewCardStore.d.ts +276 -0
- package/preview-card/store/PreviewCardStore.js +105 -0
- package/preview-card/trigger/PreviewCardTrigger.d.ts +17 -5
- package/preview-card/trigger/PreviewCardTrigger.js +51 -14
- package/preview-card/viewport/PreviewCardViewport.d.ts +27 -0
- package/preview-card/viewport/PreviewCardViewport.js +62 -0
- package/preview-card/viewport/PreviewCardViewportCssVars.d.ts +14 -0
- package/preview-card/viewport/PreviewCardViewportCssVars.js +21 -0
- package/preview-card/viewport/PreviewCardViewportDataAttributes.d.ts +26 -0
- package/preview-card/viewport/PreviewCardViewportDataAttributes.js +33 -0
- package/progress/indicator/ProgressIndicator.d.ts +1 -1
- package/progress/label/ProgressLabel.d.ts +1 -1
- package/progress/root/ProgressRoot.d.ts +7 -7
- package/progress/root/ProgressRoot.js +1 -12
- package/progress/track/ProgressTrack.d.ts +1 -1
- package/progress/value/ProgressValue.d.ts +2 -2
- package/radio/indicator/RadioIndicator.d.ts +2 -2
- package/radio/indicator/RadioIndicator.js +4 -4
- package/radio/root/RadioRoot.d.ts +37 -17
- package/radio/root/RadioRoot.js +52 -18
- package/radio-group/RadioGroup.d.ts +18 -12
- package/radio-group/RadioGroup.js +68 -61
- package/radio-group/RadioGroupContext.d.ts +9 -8
- package/radio-group/RadioGroupContext.js +1 -13
- package/scroll-area/content/ScrollAreaContent.d.ts +1 -1
- package/scroll-area/content/ScrollAreaContent.js +10 -1
- package/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/scroll-area/corner/ScrollAreaCorner.js +1 -1
- package/scroll-area/root/ScrollAreaRoot.d.ts +30 -4
- package/scroll-area/root/ScrollAreaRoot.js +34 -29
- package/scroll-area/root/ScrollAreaRootContext.d.ts +10 -43
- package/scroll-area/root/ScrollAreaRootContext.js +1 -0
- package/scroll-area/root/ScrollAreaRootDataAttributes.d.ts +4 -0
- package/scroll-area/root/ScrollAreaRootDataAttributes.js +4 -0
- package/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +3 -3
- package/scroll-area/scrollbar/ScrollAreaScrollbar.js +6 -6
- package/scroll-area/scrollbar/ScrollAreaScrollbarContext.js +1 -0
- package/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.d.ts +1 -1
- package/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.js +1 -1
- package/scroll-area/thumb/ScrollAreaThumb.d.ts +3 -3
- package/scroll-area/thumb/ScrollAreaThumb.js +3 -3
- package/scroll-area/utils/scrollEdges.d.ts +2 -0
- package/scroll-area/utils/scrollEdges.js +29 -0
- package/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
- package/scroll-area/viewport/ScrollAreaViewport.js +67 -38
- package/scroll-area/viewport/ScrollAreaViewportContext.js +1 -0
- package/scroll-area/viewport/ScrollAreaViewportDataAttributes.d.ts +4 -0
- package/scroll-area/viewport/ScrollAreaViewportDataAttributes.js +4 -0
- package/select/arrow/SelectArrow.d.ts +1 -1
- package/select/arrow/SelectArrow.js +2 -2
- package/select/arrow/SelectArrowDataAttributes.js +2 -2
- package/select/backdrop/SelectBackdrop.d.ts +1 -1
- package/select/backdrop/SelectBackdrop.js +2 -2
- package/select/group/SelectGroup.d.ts +1 -1
- package/select/group/SelectGroupContext.js +1 -0
- package/select/group-label/SelectGroupLabel.d.ts +1 -1
- package/select/icon/SelectIcon.d.ts +1 -1
- package/select/icon/SelectIcon.js +2 -2
- package/select/item/SelectItem.d.ts +3 -3
- package/select/item/SelectItem.js +13 -14
- package/select/item/SelectItemContext.js +1 -0
- package/select/item-indicator/SelectItemIndicator.d.ts +2 -2
- package/select/item-indicator/SelectItemIndicator.js +2 -2
- package/select/item-text/SelectItemText.d.ts +1 -1
- package/select/list/SelectList.d.ts +1 -1
- package/select/popup/SelectPopup.d.ts +12 -1
- package/select/popup/SelectPopup.js +200 -112
- package/select/popup/SelectPopupDataAttributes.js +2 -2
- package/select/portal/SelectPortal.d.ts +1 -1
- package/select/portal/SelectPortalContext.js +1 -0
- package/select/positioner/SelectPositioner.d.ts +2 -2
- package/select/positioner/SelectPositioner.js +13 -10
- package/select/positioner/SelectPositionerContext.js +1 -0
- package/select/positioner/SelectPositionerDataAttributes.js +2 -2
- package/select/root/SelectRoot.d.ts +28 -23
- package/select/root/SelectRoot.js +26 -11
- package/select/root/SelectRootContext.d.ts +14 -14
- package/select/root/SelectRootContext.js +1 -0
- package/select/scroll-arrow/SelectScrollArrow.d.ts +2 -2
- package/select/scroll-arrow/SelectScrollArrow.js +2 -2
- package/select/scroll-down-arrow/SelectScrollDownArrow.d.ts +2 -2
- package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.js +1 -1
- package/select/scroll-up-arrow/SelectScrollUpArrow.d.ts +2 -2
- package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.js +1 -1
- package/select/store.d.ts +5 -4
- package/select/store.js +21 -15
- package/select/trigger/SelectTrigger.d.ts +15 -5
- package/select/trigger/SelectTrigger.js +51 -19
- package/select/value/SelectValue.d.ts +10 -1
- package/select/value/SelectValue.js +19 -5
- package/separator/Separator.d.ts +2 -2
- package/separator/Separator.js +2 -2
- package/slider/control/SliderControl.d.ts +1 -1
- package/slider/control/SliderControl.js +1 -1
- package/slider/control/SliderControlDataAttributes.d.ts +0 -8
- package/slider/control/SliderControlDataAttributes.js +0 -8
- package/slider/indicator/SliderIndicator.d.ts +1 -1
- package/slider/indicator/SliderIndicatorDataAttributes.d.ts +0 -8
- package/slider/indicator/SliderIndicatorDataAttributes.js +0 -8
- package/slider/root/SliderRoot.d.ts +17 -17
- package/slider/root/SliderRoot.js +3 -2
- package/slider/root/SliderRootContext.d.ts +2 -2
- package/slider/root/SliderRootDataAttributes.d.ts +0 -8
- package/slider/root/SliderRootDataAttributes.js +0 -8
- package/slider/root/stateAttributesMapping.js +3 -1
- package/slider/thumb/SliderThumb.d.ts +9 -9
- package/slider/thumb/SliderThumb.js +7 -1
- package/slider/thumb/SliderThumbDataAttributes.d.ts +0 -8
- package/slider/thumb/SliderThumbDataAttributes.js +0 -8
- package/slider/track/SliderTrack.d.ts +1 -1
- package/slider/track/SliderTrackDataAttributes.d.ts +0 -8
- package/slider/track/SliderTrackDataAttributes.js +0 -8
- package/slider/utils/getPushedThumbValues.d.ts +1 -1
- package/slider/utils/resolveThumbCollision.d.ts +2 -2
- package/slider/value/SliderValue.d.ts +2 -2
- package/slider/value/SliderValueDataAttributes.d.ts +0 -8
- package/slider/value/SliderValueDataAttributes.js +0 -8
- package/switch/root/SwitchRoot.d.ts +16 -11
- package/switch/root/SwitchRoot.js +21 -6
- package/switch/root/SwitchRootContext.js +1 -0
- package/switch/thumb/SwitchThumb.d.ts +1 -1
- package/tabs/indicator/TabsIndicator.d.ts +2 -2
- package/tabs/indicator/TabsIndicator.js +8 -2
- package/tabs/list/TabsList.d.ts +3 -3
- package/tabs/list/TabsList.js +2 -2
- package/tabs/panel/TabsPanel.d.ts +5 -3
- package/tabs/panel/TabsPanel.js +37 -10
- package/tabs/root/TabsRoot.d.ts +5 -5
- package/tabs/root/TabsRootContext.d.ts +1 -1
- package/tabs/tab/TabsTab.d.ts +2 -2
- package/tabs/tab/TabsTab.js +2 -2
- package/toast/action/ToastAction.d.ts +1 -1
- package/toast/action/ToastAction.js +2 -2
- package/toast/arrow/ToastArrow.d.ts +1 -1
- package/toast/arrow/ToastArrow.js +2 -2
- package/toast/arrow/ToastArrowDataAttributes.js +4 -3
- package/toast/close/ToastClose.d.ts +1 -1
- package/toast/close/ToastClose.js +5 -7
- package/toast/content/ToastContent.d.ts +1 -1
- package/toast/content/ToastContent.js +2 -2
- package/toast/createToastManager.d.ts +5 -5
- package/toast/createToastManager.js +3 -6
- package/toast/description/ToastDescription.d.ts +1 -1
- package/toast/description/ToastDescription.js +4 -6
- package/toast/portal/ToastPortal.d.ts +1 -1
- package/toast/positioner/ToastPositioner.d.ts +3 -3
- package/toast/positioner/ToastPositioner.js +5 -6
- package/toast/positioner/ToastPositionerDataAttributes.js +2 -2
- package/toast/provider/ToastProvider.d.ts +3 -3
- package/toast/provider/ToastProvider.js +24 -257
- package/toast/provider/ToastProviderContext.d.ts +4 -25
- package/toast/provider/ToastProviderContext.js +3 -2
- package/toast/root/ToastRoot.d.ts +2 -2
- package/toast/root/ToastRoot.js +18 -26
- package/toast/root/ToastRootContext.js +1 -0
- package/toast/store.d.ts +51 -0
- package/toast/store.js +362 -0
- package/toast/title/ToastTitle.d.ts +1 -1
- package/toast/title/ToastTitle.js +4 -6
- package/toast/useToastManager.d.ts +20 -21
- package/toast/useToastManager.js +8 -14
- package/toast/viewport/ToastViewport.d.ts +1 -1
- package/toast/viewport/ToastViewport.js +65 -91
- package/toggle/Toggle.d.ts +10 -8
- package/toggle/Toggle.js +13 -3
- package/toggle-group/ToggleGroup.d.ts +22 -10
- package/toggle-group/ToggleGroup.js +8 -5
- package/toggle-group/ToggleGroupContext.d.ts +10 -5
- package/toolbar/button/ToolbarButton.d.ts +3 -3
- package/toolbar/button/ToolbarButton.js +2 -2
- package/toolbar/group/ToolbarGroup.d.ts +2 -2
- package/toolbar/group/ToolbarGroup.js +2 -2
- package/toolbar/group/ToolbarGroupContext.js +1 -0
- package/toolbar/input/ToolbarInput.d.ts +4 -4
- package/toolbar/input/ToolbarInput.js +2 -2
- package/toolbar/link/ToolbarLink.d.ts +1 -1
- package/toolbar/link/ToolbarLink.js +2 -2
- package/toolbar/root/ToolbarRoot.d.ts +4 -4
- package/toolbar/root/ToolbarRoot.js +2 -2
- package/toolbar/separator/ToolbarSeparator.d.ts +1 -1
- package/tooltip/arrow/TooltipArrow.d.ts +2 -1
- package/tooltip/arrow/TooltipArrow.js +2 -2
- package/tooltip/arrow/TooltipArrowDataAttributes.js +2 -2
- package/tooltip/popup/TooltipPopup.d.ts +1 -1
- package/tooltip/popup/TooltipPopup.js +2 -33
- package/tooltip/popup/TooltipPopupDataAttributes.js +2 -2
- package/tooltip/portal/TooltipPortal.d.ts +2 -2
- package/tooltip/portal/TooltipPortalContext.js +1 -0
- package/tooltip/positioner/TooltipPositioner.d.ts +2 -2
- package/tooltip/positioner/TooltipPositioner.js +2 -1
- package/tooltip/positioner/TooltipPositionerContext.d.ts +1 -1
- package/tooltip/positioner/TooltipPositionerDataAttributes.js +2 -2
- package/tooltip/provider/TooltipProvider.d.ts +3 -3
- package/tooltip/provider/TooltipProviderContext.js +1 -0
- package/tooltip/root/TooltipRoot.d.ts +15 -17
- package/tooltip/root/TooltipRoot.js +24 -13
- package/tooltip/store/TooltipStore.d.ts +258 -16
- package/tooltip/store/TooltipStore.js +7 -4
- package/tooltip/trigger/TooltipTrigger.d.ts +11 -4
- package/tooltip/trigger/TooltipTrigger.js +13 -7
- package/tooltip/trigger/TooltipTriggerDataAttributes.d.ts +4 -0
- package/tooltip/trigger/TooltipTriggerDataAttributes.js +4 -0
- package/tooltip/viewport/TooltipViewport.d.ts +10 -2
- package/tooltip/viewport/TooltipViewport.js +17 -182
- package/unstable-use-media-query/index.d.ts +5 -5
- package/use-button/useButton.d.ts +4 -4
- package/use-button/useButton.js +7 -2
- package/use-render/index.d.ts +2 -1
- package/use-render/useRender.d.ts +9 -9
- package/utils/FloatingPortalLite.d.ts +1 -1
- package/utils/InternalBackdrop.d.ts +1 -1
- package/utils/createBaseUIEventDetails.d.ts +3 -0
- package/utils/formatNumber.d.ts +2 -1
- package/utils/formatNumber.js +12 -0
- package/utils/getDisabledMountTransitionStyles.d.ts +1 -1
- package/utils/getPseudoElementBounds.js +1 -1
- package/utils/itemEquality.d.ts +5 -5
- package/utils/itemEquality.js +18 -18
- package/utils/popupStateMapping.d.ts +10 -0
- package/utils/popupStateMapping.js +10 -0
- package/utils/popups/popupStoreUtils.js +22 -2
- package/utils/popups/popupTriggerMap.d.ts +14 -1
- package/utils/popups/popupTriggerMap.js +27 -10
- package/utils/popups/store.d.ts +28 -18
- package/utils/popups/store.js +8 -5
- package/utils/reason-parts.d.ts +3 -0
- package/utils/reason-parts.js +4 -1
- package/utils/resolveValueLabel.d.ts +5 -1
- package/utils/resolveValueLabel.js +48 -22
- package/utils/scrollable.d.ts +4 -0
- package/utils/scrollable.js +40 -0
- package/utils/styles.d.ts +1 -1
- package/utils/styles.js +10 -6
- package/utils/types.d.ts +7 -7
- package/utils/useAnchorPositioning.d.ts +26 -26
- package/utils/useAnchorPositioning.js +19 -16
- package/utils/useAnimationsFinished.d.ts +2 -2
- package/utils/useAnimationsFinished.js +56 -33
- package/utils/useFocusableWhenDisabled.d.ts +4 -4
- package/utils/{useMixedToggleClickHander.d.ts → useMixedToggleClickHandler.d.ts} +1 -1
- package/utils/{useMixedToggleClickHander.js → useMixedToggleClickHandler.js} +1 -0
- package/utils/useOpenChangeComplete.d.ts +2 -2
- package/utils/useOpenChangeComplete.js +8 -10
- package/utils/useOpenInteractionType.js +6 -1
- package/utils/usePopupAutoResize.d.ts +3 -3
- package/utils/usePopupAutoResize.js +83 -46
- package/utils/usePopupViewport.d.ts +58 -0
- package/utils/usePopupViewport.js +253 -0
- package/utils/useRenderElement.d.ts +9 -9
- package/utils/useRenderElement.js +28 -1
- package/utils/useSwipeDismiss.d.ts +108 -0
- package/utils/useSwipeDismiss.js +952 -0
- package/utils/useValueChanged.js +1 -0
- package/esm/toast/viewport/ToastViewportContext.d.ts +0 -6
- package/esm/toast/viewport/ToastViewportContext.js +0 -11
- package/esm/utils/interactions/useFocusWithDelay.d.ts +0 -9
- package/esm/utils/interactions/useFocusWithDelay.js +0 -81
- package/toast/viewport/ToastViewportContext.d.ts +0 -6
- package/toast/viewport/ToastViewportContext.js +0 -20
- package/utils/interactions/useFocusWithDelay.d.ts +0 -9
- package/utils/interactions/useFocusWithDelay.js +0 -87
|
@@ -11,7 +11,7 @@ var _FieldsetRootContext = require("./FieldsetRootContext");
|
|
|
11
11
|
var _useRenderElement = require("../../utils/useRenderElement");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
/**
|
|
14
|
-
* Groups
|
|
14
|
+
* Groups a shared legend with related controls.
|
|
15
15
|
* Renders a `<fieldset>` element.
|
|
16
16
|
*
|
|
17
17
|
* Documentation: [Base UI Fieldset](https://base-ui.com/react/components/fieldset)
|
|
@@ -24,9 +24,9 @@ const FieldsetRoot = exports.FieldsetRoot = /*#__PURE__*/React.forwardRef(functi
|
|
|
24
24
|
...elementProps
|
|
25
25
|
} = componentProps;
|
|
26
26
|
const [legendId, setLegendId] = React.useState(undefined);
|
|
27
|
-
const state =
|
|
27
|
+
const state = {
|
|
28
28
|
disabled
|
|
29
|
-
}
|
|
29
|
+
};
|
|
30
30
|
const element = (0, _useRenderElement.useRenderElement)('fieldset', componentProps, {
|
|
31
31
|
ref: forwardedRef,
|
|
32
32
|
state,
|
|
@@ -12,7 +12,7 @@ export interface FloatingDelayGroupProps {
|
|
|
12
12
|
* This is useful if you want grouping to “last” longer than the close delay,
|
|
13
13
|
* for example if there is no close delay at all.
|
|
14
14
|
*/
|
|
15
|
-
timeoutMs?: number;
|
|
15
|
+
timeoutMs?: number | undefined;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Experimental next version of `FloatingDelayGroup` to become the default
|
|
@@ -26,11 +26,6 @@ export interface FloatingDelayGroupProps {
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function FloatingDelayGroup(props: FloatingDelayGroupProps): React.JSX.Element;
|
|
28
28
|
interface UseDelayGroupOptions {
|
|
29
|
-
/**
|
|
30
|
-
* Whether delay grouping should be enabled.
|
|
31
|
-
* @default true
|
|
32
|
-
*/
|
|
33
|
-
enabled?: boolean;
|
|
34
29
|
/**
|
|
35
30
|
* Whether the trigger this hook is used in has opened the tooltip.
|
|
36
31
|
*/
|
|
@@ -40,7 +35,7 @@ interface UseDelayGroupReturn {
|
|
|
40
35
|
/**
|
|
41
36
|
* The delay reference object.
|
|
42
37
|
*/
|
|
43
|
-
delayRef: React.
|
|
38
|
+
delayRef: React.RefObject<Delay>;
|
|
44
39
|
/**
|
|
45
40
|
* Whether animations should be removed.
|
|
46
41
|
*/
|
|
@@ -78,7 +78,6 @@ function useDelayGroup(context, options = {
|
|
|
78
78
|
const store = 'rootStore' in context ? context.rootStore : context;
|
|
79
79
|
const floatingId = store.useState('floatingId');
|
|
80
80
|
const {
|
|
81
|
-
enabled = true,
|
|
82
81
|
open
|
|
83
82
|
} = options;
|
|
84
83
|
const groupContext = React.useContext(FloatingDelayGroupContext);
|
|
@@ -100,9 +99,6 @@ function useDelayGroup(context, options = {
|
|
|
100
99
|
currentContextRef.current = null;
|
|
101
100
|
delayRef.current = initialDelayRef.current;
|
|
102
101
|
}
|
|
103
|
-
if (!enabled) {
|
|
104
|
-
return undefined;
|
|
105
|
-
}
|
|
106
102
|
if (!currentIdRef.current) {
|
|
107
103
|
return undefined;
|
|
108
104
|
}
|
|
@@ -124,11 +120,8 @@ function useDelayGroup(context, options = {
|
|
|
124
120
|
unset();
|
|
125
121
|
}
|
|
126
122
|
return undefined;
|
|
127
|
-
}, [
|
|
123
|
+
}, [open, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store]);
|
|
128
124
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
129
|
-
if (!enabled) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
125
|
if (!open) {
|
|
133
126
|
return;
|
|
134
127
|
}
|
|
@@ -155,7 +148,7 @@ function useDelayGroup(context, options = {
|
|
|
155
148
|
setIsInstantPhase(false);
|
|
156
149
|
prevContext?.setIsInstantPhase(false);
|
|
157
150
|
}
|
|
158
|
-
}, [
|
|
151
|
+
}, [open, floatingId, store, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout]);
|
|
159
152
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
160
153
|
return () => {
|
|
161
154
|
currentContextRef.current = null;
|
|
@@ -11,19 +11,14 @@ export interface FloatingFocusManagerProps {
|
|
|
11
11
|
/**
|
|
12
12
|
* The interaction type used to open the floating element.
|
|
13
13
|
*/
|
|
14
|
-
openInteractionType?: InteractionType | null;
|
|
14
|
+
openInteractionType?: (InteractionType | null) | undefined;
|
|
15
15
|
/**
|
|
16
16
|
* Whether or not the focus manager should be disabled. Useful to delay focus
|
|
17
17
|
* management until after a transition completes or some other conditional
|
|
18
18
|
* state.
|
|
19
19
|
* @default false
|
|
20
20
|
*/
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* The order in which focus cycles.
|
|
24
|
-
* @default ['content']
|
|
25
|
-
*/
|
|
26
|
-
order?: Array<'reference' | 'floating' | 'content'>;
|
|
21
|
+
disabled?: boolean | undefined;
|
|
27
22
|
/**
|
|
28
23
|
* Determines the element to focus when the floating element is opened.
|
|
29
24
|
*
|
|
@@ -35,7 +30,7 @@ export interface FloatingFocusManagerProps {
|
|
|
35
30
|
* or `false`/`undefined` to do nothing.
|
|
36
31
|
* @default true
|
|
37
32
|
*/
|
|
38
|
-
initialFocus?: boolean | React.RefObject<HTMLElement | null> | ((openType: InteractionType) => boolean | HTMLElement | null | void);
|
|
33
|
+
initialFocus?: (boolean | React.RefObject<HTMLElement | null> | ((openType: InteractionType) => boolean | HTMLElement | null | void)) | undefined;
|
|
39
34
|
/**
|
|
40
35
|
* Determines the element to focus when the floating element is closed.
|
|
41
36
|
*
|
|
@@ -47,7 +42,7 @@ export interface FloatingFocusManagerProps {
|
|
|
47
42
|
* or `false`/`undefined` to do nothing.
|
|
48
43
|
* @default true
|
|
49
44
|
*/
|
|
50
|
-
returnFocus?: boolean | React.RefObject<HTMLElement | null> | ((closeType: InteractionType) => boolean | HTMLElement | null | void);
|
|
45
|
+
returnFocus?: (boolean | React.RefObject<HTMLElement | null> | ((closeType: InteractionType) => boolean | HTMLElement | null | void)) | undefined;
|
|
51
46
|
/**
|
|
52
47
|
* Determines where focus should be restored if focus inside the floating element is lost
|
|
53
48
|
* (such as due to the removal of the currently focused element from the DOM).
|
|
@@ -58,14 +53,14 @@ export interface FloatingFocusManagerProps {
|
|
|
58
53
|
* - `false`: do not restore focus
|
|
59
54
|
* @default false
|
|
60
55
|
*/
|
|
61
|
-
restoreFocus?: boolean | 'popup';
|
|
56
|
+
restoreFocus?: (boolean | 'popup') | undefined;
|
|
62
57
|
/**
|
|
63
58
|
* Determines if focus is “modal”, meaning focus is fully trapped inside the
|
|
64
59
|
* floating element and outside content cannot be accessed. This includes
|
|
65
60
|
* screen reader virtual cursors.
|
|
66
61
|
* @default true
|
|
67
62
|
*/
|
|
68
|
-
modal?: boolean;
|
|
63
|
+
modal?: boolean | undefined;
|
|
69
64
|
/**
|
|
70
65
|
* Determines whether `focusout` event listeners that control whether the
|
|
71
66
|
* floating element should be closed if the focus moves outside of it are
|
|
@@ -73,29 +68,24 @@ export interface FloatingFocusManagerProps {
|
|
|
73
68
|
* focus management.
|
|
74
69
|
* @default true
|
|
75
70
|
*/
|
|
76
|
-
closeOnFocusOut?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Returns a list of elements that should be considered part of the
|
|
79
|
-
* floating element.
|
|
80
|
-
*/
|
|
81
|
-
getInsideElements?: () => Element[];
|
|
71
|
+
closeOnFocusOut?: boolean | undefined;
|
|
82
72
|
/**
|
|
83
73
|
* Overrides the element to focus when tabbing forward out of the floating element.
|
|
84
74
|
*/
|
|
85
|
-
nextFocusableElement?: HTMLElement | React.RefObject<HTMLElement | null> | null;
|
|
75
|
+
nextFocusableElement?: (HTMLElement | React.RefObject<HTMLElement | null> | null) | undefined;
|
|
86
76
|
/**
|
|
87
77
|
* Overrides the element to focus when tabbing backward out of the floating element.
|
|
88
78
|
*/
|
|
89
|
-
previousFocusableElement?: HTMLElement | React.RefObject<HTMLElement | null> | null;
|
|
79
|
+
previousFocusableElement?: (HTMLElement | React.RefObject<HTMLElement | null> | null) | undefined;
|
|
90
80
|
/**
|
|
91
81
|
* Ref to the focus guard preceding the floating element content.
|
|
92
82
|
* Can be useful to focus the popup progammatically.
|
|
93
83
|
*/
|
|
94
|
-
beforeContentFocusGuardRef?: React.RefObject<HTMLSpanElement | null
|
|
84
|
+
beforeContentFocusGuardRef?: React.RefObject<HTMLSpanElement | null> | undefined;
|
|
95
85
|
/**
|
|
96
86
|
* External FlatingTree to use when the one provided by context can't be used.
|
|
97
87
|
*/
|
|
98
|
-
externalTree?: FloatingTreeStore;
|
|
88
|
+
externalTree?: FloatingTreeStore | undefined;
|
|
99
89
|
}
|
|
100
90
|
/**
|
|
101
91
|
* Provides focus management for the floating element.
|
|
@@ -15,6 +15,7 @@ var _useStableCallback = require("@base-ui/utils/useStableCallback");
|
|
|
15
15
|
var _useIsoLayoutEffect = require("@base-ui/utils/useIsoLayoutEffect");
|
|
16
16
|
var _visuallyHidden = require("@base-ui/utils/visuallyHidden");
|
|
17
17
|
var _useTimeout = require("@base-ui/utils/useTimeout");
|
|
18
|
+
var _detectBrowser = require("@base-ui/utils/detectBrowser");
|
|
18
19
|
var _useAnimationFrame = require("@base-ui/utils/useAnimationFrame");
|
|
19
20
|
var _owner = require("@base-ui/utils/owner");
|
|
20
21
|
var _FocusGuard = require("../../utils/FocusGuard");
|
|
@@ -54,12 +55,14 @@ function getEventType(event, lastInteractionType) {
|
|
|
54
55
|
const LIST_LIMIT = 20;
|
|
55
56
|
let previouslyFocusedElements = [];
|
|
56
57
|
function clearDisconnectedPreviouslyFocusedElements() {
|
|
57
|
-
previouslyFocusedElements = previouslyFocusedElements.filter(
|
|
58
|
+
previouslyFocusedElements = previouslyFocusedElements.filter(entry => {
|
|
59
|
+
return entry.deref()?.isConnected;
|
|
60
|
+
});
|
|
58
61
|
}
|
|
59
62
|
function addPreviouslyFocusedElement(element) {
|
|
60
63
|
clearDisconnectedPreviouslyFocusedElements();
|
|
61
64
|
if (element && (0, _dom.getNodeName)(element) !== 'body') {
|
|
62
|
-
previouslyFocusedElements.push(element);
|
|
65
|
+
previouslyFocusedElements.push(new WeakRef(element));
|
|
63
66
|
if (previouslyFocusedElements.length > LIST_LIMIT) {
|
|
64
67
|
previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);
|
|
65
68
|
}
|
|
@@ -67,7 +70,7 @@ function addPreviouslyFocusedElement(element) {
|
|
|
67
70
|
}
|
|
68
71
|
function getPreviouslyFocusedElement() {
|
|
69
72
|
clearDisconnectedPreviouslyFocusedElements();
|
|
70
|
-
return previouslyFocusedElements[previouslyFocusedElements.length - 1];
|
|
73
|
+
return previouslyFocusedElements[previouslyFocusedElements.length - 1]?.deref();
|
|
71
74
|
}
|
|
72
75
|
function getFirstTabbableElement(container) {
|
|
73
76
|
if (!container) {
|
|
@@ -118,14 +121,12 @@ function FloatingFocusManager(props) {
|
|
|
118
121
|
context,
|
|
119
122
|
children,
|
|
120
123
|
disabled = false,
|
|
121
|
-
order = ['content'],
|
|
122
124
|
initialFocus = true,
|
|
123
125
|
returnFocus = true,
|
|
124
126
|
restoreFocus = false,
|
|
125
127
|
modal = true,
|
|
126
128
|
closeOnFocusOut = true,
|
|
127
129
|
openInteractionType = '',
|
|
128
|
-
getInsideElements: getInsideElementsProp = () => [],
|
|
129
130
|
nextFocusableElement,
|
|
130
131
|
previousFocusableElement,
|
|
131
132
|
beforeContentFocusGuardRef,
|
|
@@ -140,7 +141,6 @@ function FloatingFocusManager(props) {
|
|
|
140
141
|
dataRef
|
|
141
142
|
} = store.context;
|
|
142
143
|
const getNodeId = (0, _useStableCallback.useStableCallback)(() => dataRef.current.floatingContext?.nodeId);
|
|
143
|
-
const getInsideElements = (0, _useStableCallback.useStableCallback)(getInsideElementsProp);
|
|
144
144
|
const ignoreInitialFocus = initialFocus === false;
|
|
145
145
|
// If the reference is a combobox and is typeable (e.g. input/textarea),
|
|
146
146
|
// there are different focus semantics. The guards should not be rendered, but
|
|
@@ -148,7 +148,7 @@ function FloatingFocusManager(props) {
|
|
|
148
148
|
// hidden dismiss button should only appear at the end of the list, not the
|
|
149
149
|
// start.
|
|
150
150
|
const isUntrappedTypeableCombobox = (0, _utils.isTypeableCombobox)(domReference) && ignoreInitialFocus;
|
|
151
|
-
const orderRef =
|
|
151
|
+
const orderRef = React.useRef(['content']);
|
|
152
152
|
const initialFocusRef = (0, _useValueAsRef.useValueAsRef)(initialFocus);
|
|
153
153
|
const returnFocusRef = (0, _useValueAsRef.useValueAsRef)(returnFocus);
|
|
154
154
|
const openInteractionTypeRef = (0, _useValueAsRef.useValueAsRef)(openInteractionType);
|
|
@@ -162,6 +162,10 @@ function FloatingFocusManager(props) {
|
|
|
162
162
|
const tabbableIndexRef = React.useRef(-1);
|
|
163
163
|
const closeTypeRef = React.useRef('');
|
|
164
164
|
const lastInteractionTypeRef = React.useRef('');
|
|
165
|
+
const beforeGuardRef = React.useRef(null);
|
|
166
|
+
const afterGuardRef = React.useRef(null);
|
|
167
|
+
const mergedBeforeGuardRef = (0, _useMergedRefs.useMergedRefs)(beforeGuardRef, beforeContentFocusGuardRef, portalContext?.beforeInsideRef);
|
|
168
|
+
const mergedAfterGuardRef = (0, _useMergedRefs.useMergedRefs)(afterGuardRef, portalContext?.afterInsideRef);
|
|
165
169
|
const blurTimeout = (0, _useTimeout.useTimeout)();
|
|
166
170
|
const pointerDownTimeout = (0, _useTimeout.useTimeout)();
|
|
167
171
|
const restoreFocusFrame = (0, _useAnimationFrame.useAnimationFrame)();
|
|
@@ -174,54 +178,33 @@ function FloatingFocusManager(props) {
|
|
|
174
178
|
const content = getTabbableContent(container);
|
|
175
179
|
return orderRef.current.map(() => content).filter(Boolean).flat();
|
|
176
180
|
});
|
|
181
|
+
|
|
182
|
+
// Prevent Tab from escaping the modal when there are no tabbable elements.
|
|
177
183
|
React.useEffect(() => {
|
|
178
|
-
if (disabled) {
|
|
179
|
-
return undefined;
|
|
180
|
-
}
|
|
181
|
-
if (!modal) {
|
|
184
|
+
if (disabled || !modal) {
|
|
182
185
|
return undefined;
|
|
183
186
|
}
|
|
184
187
|
function onKeyDown(event) {
|
|
185
188
|
if (event.key === 'Tab') {
|
|
186
189
|
// The focus guards have nothing to focus, so we need to stop the event.
|
|
187
|
-
if ((0, _utils.contains)(floatingFocusElement, (0, _utils.activeElement)((0,
|
|
190
|
+
if ((0, _utils.contains)(floatingFocusElement, (0, _utils.activeElement)((0, _owner.ownerDocument)(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {
|
|
188
191
|
(0, _utils.stopEvent)(event);
|
|
189
192
|
}
|
|
190
193
|
}
|
|
191
194
|
}
|
|
192
|
-
const doc = (0,
|
|
195
|
+
const doc = (0, _owner.ownerDocument)(floatingFocusElement);
|
|
193
196
|
doc.addEventListener('keydown', onKeyDown);
|
|
194
197
|
return () => {
|
|
195
198
|
doc.removeEventListener('keydown', onKeyDown);
|
|
196
199
|
};
|
|
197
200
|
}, [disabled, domReference, floatingFocusElement, modal, orderRef, isUntrappedTypeableCombobox, getTabbableContent, getTabbableElements]);
|
|
198
|
-
React.useEffect(() => {
|
|
199
|
-
if (disabled) {
|
|
200
|
-
return undefined;
|
|
201
|
-
}
|
|
202
|
-
if (!floating) {
|
|
203
|
-
return undefined;
|
|
204
|
-
}
|
|
205
|
-
function handleFocusIn(event) {
|
|
206
|
-
const target = (0, _utils.getTarget)(event);
|
|
207
|
-
const tabbableContent = getTabbableContent();
|
|
208
|
-
const tabbableIndex = tabbableContent.indexOf(target);
|
|
209
|
-
if (tabbableIndex !== -1) {
|
|
210
|
-
tabbableIndexRef.current = tabbableIndex;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
floating.addEventListener('focusin', handleFocusIn);
|
|
214
|
-
return () => {
|
|
215
|
-
floating.removeEventListener('focusin', handleFocusIn);
|
|
216
|
-
};
|
|
217
|
-
}, [disabled, floating, getTabbableContent]);
|
|
218
201
|
|
|
219
|
-
// Track
|
|
202
|
+
// Track pointer/keyboard interactions to disambiguate focus and outside presses.
|
|
220
203
|
React.useEffect(() => {
|
|
221
204
|
if (disabled || !open) {
|
|
222
205
|
return undefined;
|
|
223
206
|
}
|
|
224
|
-
const doc = (0,
|
|
207
|
+
const doc = (0, _owner.ownerDocument)(floatingFocusElement);
|
|
225
208
|
function clearPointerDownOutside() {
|
|
226
209
|
pointerDownOutsideRef.current = false;
|
|
227
210
|
}
|
|
@@ -230,6 +213,9 @@ function FloatingFocusManager(props) {
|
|
|
230
213
|
const pointerTargetInside = (0, _utils.contains)(floating, target) || (0, _utils.contains)(domReference, target) || (0, _utils.contains)(portalContext?.portalNode, target);
|
|
231
214
|
pointerDownOutsideRef.current = !pointerTargetInside;
|
|
232
215
|
lastInteractionTypeRef.current = event.pointerType || 'keyboard';
|
|
216
|
+
if (target?.closest(`[${_constants.CLICK_TRIGGER_IDENTIFIER}]`)) {
|
|
217
|
+
isPointerDownRef.current = true;
|
|
218
|
+
}
|
|
233
219
|
}
|
|
234
220
|
function onKeyDown() {
|
|
235
221
|
lastInteractionTypeRef.current = 'keyboard';
|
|
@@ -245,13 +231,13 @@ function FloatingFocusManager(props) {
|
|
|
245
231
|
doc.removeEventListener('keydown', onKeyDown, true);
|
|
246
232
|
};
|
|
247
233
|
}, [disabled, floating, domReference, floatingFocusElement, open, portalContext]);
|
|
234
|
+
|
|
235
|
+
// Close on focus out and restore focus within the floating tree when needed.
|
|
248
236
|
React.useEffect(() => {
|
|
249
|
-
if (disabled) {
|
|
250
|
-
return undefined;
|
|
251
|
-
}
|
|
252
|
-
if (!closeOnFocusOut) {
|
|
237
|
+
if (disabled || !closeOnFocusOut) {
|
|
253
238
|
return undefined;
|
|
254
239
|
}
|
|
240
|
+
const doc = (0, _owner.ownerDocument)(floatingFocusElement);
|
|
255
241
|
|
|
256
242
|
// In Safari, buttons lose focus when pressing them.
|
|
257
243
|
function handlePointerDown() {
|
|
@@ -260,6 +246,14 @@ function FloatingFocusManager(props) {
|
|
|
260
246
|
isPointerDownRef.current = false;
|
|
261
247
|
});
|
|
262
248
|
}
|
|
249
|
+
function handleFocusIn(event) {
|
|
250
|
+
const target = (0, _utils.getTarget)(event);
|
|
251
|
+
const tabbableContent = getTabbableContent();
|
|
252
|
+
const tabbableIndex = tabbableContent.indexOf(target);
|
|
253
|
+
if (tabbableIndex !== -1) {
|
|
254
|
+
tabbableIndexRef.current = tabbableIndex;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
263
257
|
function handleFocusOutside(event) {
|
|
264
258
|
const relatedTarget = event.relatedTarget;
|
|
265
259
|
const currentTarget = event.currentTarget;
|
|
@@ -267,14 +261,15 @@ function FloatingFocusManager(props) {
|
|
|
267
261
|
queueMicrotask(() => {
|
|
268
262
|
const nodeId = getNodeId();
|
|
269
263
|
const triggers = store.context.triggerElements;
|
|
270
|
-
const
|
|
264
|
+
const isRelatedFocusGuard = relatedTarget?.hasAttribute((0, _createAttribute.createAttribute)('focus-guard')) && [beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeInsideRef.current, portalContext?.afterInsideRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, (0, _resolveRef.resolveRef)(previousFocusableElement), (0, _resolveRef.resolveRef)(nextFocusableElement)].includes(relatedTarget);
|
|
265
|
+
const movedToUnrelatedNode = !((0, _utils.contains)(domReference, relatedTarget) || (0, _utils.contains)(floating, relatedTarget) || (0, _utils.contains)(relatedTarget, floating) || (0, _utils.contains)(portalContext?.portalNode, relatedTarget) || relatedTarget != null && triggers.hasElement(relatedTarget) || triggers.hasMatchingElement(trigger => (0, _utils.contains)(trigger, relatedTarget)) || isRelatedFocusGuard || tree && ((0, _utils.getNodeChildren)(tree.nodesRef.current, nodeId).find(node => (0, _utils.contains)(node.context?.elements.floating, relatedTarget) || (0, _utils.contains)(node.context?.elements.domReference, relatedTarget)) || (0, _utils.getNodeAncestors)(tree.nodesRef.current, nodeId).find(node => [node.context?.elements.floating, (0, _utils.getFloatingFocusElement)(node.context?.elements.floating)].includes(relatedTarget) || node.context?.elements.domReference === relatedTarget)));
|
|
271
266
|
if (currentTarget === domReference && floatingFocusElement) {
|
|
272
267
|
handleTabIndex(floatingFocusElement, orderRef);
|
|
273
268
|
}
|
|
274
269
|
|
|
275
270
|
// Restore focus to the previous tabbable element index to prevent
|
|
276
271
|
// focus from being lost outside the floating tree.
|
|
277
|
-
if (restoreFocus && currentTarget !== domReference && !isFocusable(target) && (0, _utils.activeElement)(
|
|
272
|
+
if (restoreFocus && currentTarget !== domReference && !isFocusable(target) && (0, _utils.activeElement)(doc) === doc.body) {
|
|
278
273
|
// Let `FloatingPortal` effect knows that focus is still inside the
|
|
279
274
|
// floating tree.
|
|
280
275
|
if ((0, _dom.isHTMLElement)(floatingFocusElement)) {
|
|
@@ -345,6 +340,7 @@ function FloatingFocusManager(props) {
|
|
|
345
340
|
});
|
|
346
341
|
}
|
|
347
342
|
if (floating) {
|
|
343
|
+
floating.addEventListener('focusin', handleFocusIn);
|
|
348
344
|
floating.addEventListener('focusout', handleFocusOutside);
|
|
349
345
|
if (portalContext) {
|
|
350
346
|
floating.addEventListener('focusout', markInsideReactTree, true);
|
|
@@ -353,6 +349,7 @@ function FloatingFocusManager(props) {
|
|
|
353
349
|
});
|
|
354
350
|
}
|
|
355
351
|
cleanups.push(() => {
|
|
352
|
+
floating.removeEventListener('focusin', handleFocusIn);
|
|
356
353
|
floating.removeEventListener('focusout', handleFocusOutside);
|
|
357
354
|
});
|
|
358
355
|
}
|
|
@@ -361,11 +358,9 @@ function FloatingFocusManager(props) {
|
|
|
361
358
|
cleanup();
|
|
362
359
|
});
|
|
363
360
|
};
|
|
364
|
-
}, [disabled, domReference, floating, floatingFocusElement, modal, tree, portalContext, store, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, orderRef, dataRef, blurTimeout, pointerDownTimeout, restoreFocusFrame]);
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
const mergedBeforeGuardRef = (0, _useMergedRefs.useMergedRefs)(beforeGuardRef, beforeContentFocusGuardRef, portalContext?.beforeInsideRef);
|
|
368
|
-
const mergedAfterGuardRef = (0, _useMergedRefs.useMergedRefs)(afterGuardRef, portalContext?.afterInsideRef);
|
|
361
|
+
}, [disabled, domReference, floating, floatingFocusElement, modal, tree, portalContext, store, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, orderRef, dataRef, blurTimeout, pointerDownTimeout, restoreFocusFrame, nextFocusableElement, previousFocusableElement]);
|
|
362
|
+
|
|
363
|
+
// Hide everything outside the floating tree from assistive tech while open.
|
|
369
364
|
React.useEffect(() => {
|
|
370
365
|
if (disabled || !floating || !open) {
|
|
371
366
|
return undefined;
|
|
@@ -375,17 +370,16 @@ function FloatingFocusManager(props) {
|
|
|
375
370
|
const portalNodes = Array.from(portalContext?.portalNode?.querySelectorAll(`[${(0, _createAttribute.createAttribute)('portal')}]`) || []);
|
|
376
371
|
const ancestors = tree ? (0, _utils.getNodeAncestors)(tree.nodesRef.current, getNodeId()) : [];
|
|
377
372
|
const rootAncestorComboboxDomReference = ancestors.find(node => (0, _utils.isTypeableCombobox)(node.context?.elements.domReference || null))?.context?.elements.domReference;
|
|
378
|
-
const insideElements = [floating, rootAncestorComboboxDomReference, ...portalNodes,
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}, [open, disabled, domReference, floating, modal, orderRef, portalContext, isUntrappedTypeableCombobox, tree, getNodeId, getInsideElements, nextFocusableElement, previousFocusableElement]);
|
|
373
|
+
const insideElements = [floating, rootAncestorComboboxDomReference, ...portalNodes, startDismissButtonRef.current, endDismissButtonRef.current, beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, (0, _resolveRef.resolveRef)(previousFocusableElement), (0, _resolveRef.resolveRef)(nextFocusableElement), isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);
|
|
374
|
+
return (0, _markOthers.markOthers)(insideElements, modal || isUntrappedTypeableCombobox);
|
|
375
|
+
}, [open, disabled, domReference, floating, modal, orderRef, portalContext, isUntrappedTypeableCombobox, tree, getNodeId, nextFocusableElement, previousFocusableElement]);
|
|
376
|
+
|
|
377
|
+
// Focus the initial element when the floating element opens.
|
|
384
378
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
385
379
|
if (!open || disabled || !(0, _dom.isHTMLElement)(floatingFocusElement)) {
|
|
386
380
|
return;
|
|
387
381
|
}
|
|
388
|
-
const doc = (0,
|
|
382
|
+
const doc = (0, _owner.ownerDocument)(floatingFocusElement);
|
|
389
383
|
const previouslyFocusedElement = (0, _utils.activeElement)(doc);
|
|
390
384
|
|
|
391
385
|
// Wait for any layout effect state setters to execute to set `tabIndex`.
|
|
@@ -414,11 +408,13 @@ function FloatingFocusManager(props) {
|
|
|
414
408
|
});
|
|
415
409
|
});
|
|
416
410
|
}, [disabled, open, floatingFocusElement, ignoreInitialFocus, getTabbableElements, initialFocusRef, openInteractionTypeRef]);
|
|
411
|
+
|
|
412
|
+
// Track return focus targets and restore focus on unmount/close.
|
|
417
413
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
418
414
|
if (disabled || !floatingFocusElement) {
|
|
419
415
|
return undefined;
|
|
420
416
|
}
|
|
421
|
-
const doc = (0,
|
|
417
|
+
const doc = (0, _owner.ownerDocument)(floatingFocusElement);
|
|
422
418
|
const previouslyFocusedElement = (0, _utils.activeElement)(doc);
|
|
423
419
|
addPreviouslyFocusedElement(previouslyFocusedElement);
|
|
424
420
|
|
|
@@ -500,40 +496,30 @@ function FloatingFocusManager(props) {
|
|
|
500
496
|
});
|
|
501
497
|
}
|
|
502
498
|
fallbackEl.remove();
|
|
499
|
+
preventReturnFocusRef.current = false;
|
|
503
500
|
});
|
|
504
501
|
};
|
|
505
502
|
}, [disabled, floating, floatingFocusElement, returnFocusRef, dataRef, events, tree, isInsidePortal, domReference, getNodeId]);
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
React.useEffect(() => {
|
|
514
|
-
if (disabled || !open) {
|
|
515
|
-
return undefined;
|
|
503
|
+
|
|
504
|
+
// Safari may randomly scroll to the bottom of the page if an input inside a popup has focus
|
|
505
|
+
// when the popup unmounts from the DOM.
|
|
506
|
+
// By blurring it before the popup unmounts, we can prevent this behavior.
|
|
507
|
+
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
508
|
+
if (!_detectBrowser.isWebKit || open || !floating) {
|
|
509
|
+
return;
|
|
516
510
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
isPointerDownRef.current = true;
|
|
521
|
-
}
|
|
511
|
+
const activeEl = (0, _utils.activeElement)((0, _owner.ownerDocument)(floating));
|
|
512
|
+
if (!(0, _dom.isHTMLElement)(activeEl) || !(0, _utils.isTypeableElement)(activeEl)) {
|
|
513
|
+
return;
|
|
522
514
|
}
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
};
|
|
528
|
-
}, [disabled, open, floatingFocusElement]);
|
|
529
|
-
|
|
515
|
+
if ((0, _utils.contains)(floating, activeEl)) {
|
|
516
|
+
activeEl.blur();
|
|
517
|
+
}
|
|
518
|
+
}, [open, floating]);
|
|
530
519
|
// Synchronize the `context` & `modal` value to the FloatingPortal context.
|
|
531
520
|
// It will decide whether or not it needs to render its own guards.
|
|
532
521
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
533
|
-
if (disabled) {
|
|
534
|
-
return undefined;
|
|
535
|
-
}
|
|
536
|
-
if (!portalContext) {
|
|
522
|
+
if (disabled || !portalContext) {
|
|
537
523
|
return undefined;
|
|
538
524
|
}
|
|
539
525
|
portalContext.setFocusManagerState({
|
|
@@ -547,6 +533,8 @@ function FloatingFocusManager(props) {
|
|
|
547
533
|
portalContext.setFocusManagerState(null);
|
|
548
534
|
};
|
|
549
535
|
}, [disabled, portalContext, modal, open, store, closeOnFocusOut, domReference]);
|
|
536
|
+
|
|
537
|
+
// Keep the floating element tabIndex in sync and clear stale focus records.
|
|
550
538
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
551
539
|
if (disabled || !floatingFocusElement) {
|
|
552
540
|
return undefined;
|
|
@@ -5,8 +5,8 @@ type FocusManagerState = null | {
|
|
|
5
5
|
modal: boolean;
|
|
6
6
|
open: boolean;
|
|
7
7
|
onOpenChange(open: boolean, data?: {
|
|
8
|
-
reason?: string;
|
|
9
|
-
event?: Event;
|
|
8
|
+
reason?: string | undefined;
|
|
9
|
+
event?: Event | undefined;
|
|
10
10
|
}): void;
|
|
11
11
|
domReference: Element | null;
|
|
12
12
|
closeOnFocusOut: boolean;
|
|
@@ -20,11 +20,10 @@ export declare const usePortalContext: () => {
|
|
|
20
20
|
afterOutsideRef: React.RefObject<HTMLSpanElement | null>;
|
|
21
21
|
} | null;
|
|
22
22
|
export interface UseFloatingPortalNodeProps {
|
|
23
|
-
ref?: React.Ref<HTMLDivElement
|
|
24
|
-
container?: HTMLElement | ShadowRoot | null | React.RefObject<HTMLElement | ShadowRoot | null
|
|
25
|
-
componentProps?: useRenderElement.ComponentProps<any
|
|
26
|
-
elementProps?: React.HTMLAttributes<HTMLDivElement
|
|
27
|
-
elementState?: Record<string, unknown>;
|
|
23
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
24
|
+
container?: (HTMLElement | ShadowRoot | null | React.RefObject<HTMLElement | ShadowRoot | null>) | undefined;
|
|
25
|
+
componentProps?: useRenderElement.ComponentProps<any> | undefined;
|
|
26
|
+
elementProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
|
|
28
27
|
}
|
|
29
28
|
export interface UseFloatingPortalNodeResult {
|
|
30
29
|
portalNode: HTMLElement | null;
|
|
@@ -40,15 +39,15 @@ export declare function useFloatingPortalNode(props?: UseFloatingPortalNodeProps
|
|
|
40
39
|
* @see https://floating-ui.com/docs/FloatingPortal
|
|
41
40
|
* @internal
|
|
42
41
|
*/
|
|
43
|
-
export declare const FloatingPortal: React.ForwardRefExoticComponent<FloatingPortal.Props<any> & {
|
|
44
|
-
renderGuards?: boolean;
|
|
45
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
export declare const FloatingPortal: React.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
|
|
43
|
+
renderGuards?: boolean | undefined;
|
|
44
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
45
|
export declare namespace FloatingPortal {
|
|
47
46
|
interface Props<State> extends BaseUIComponentProps<'div', State> {
|
|
48
47
|
/**
|
|
49
48
|
* A parent element to render the portal element into.
|
|
50
49
|
*/
|
|
51
|
-
container?: UseFloatingPortalNodeProps['container'];
|
|
50
|
+
container?: UseFloatingPortalNodeProps['container'] | undefined;
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
export {};
|
|
@@ -13,6 +13,7 @@ var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
|
13
13
|
var _dom = require("@floating-ui/utils/dom");
|
|
14
14
|
var _useId = require("@base-ui/utils/useId");
|
|
15
15
|
var _useIsoLayoutEffect = require("@base-ui/utils/useIsoLayoutEffect");
|
|
16
|
+
var _useStableCallback = require("@base-ui/utils/useStableCallback");
|
|
16
17
|
var _FocusGuard = require("../../utils/FocusGuard");
|
|
17
18
|
var _utils = require("../utils");
|
|
18
19
|
var _createBaseUIEventDetails = require("../../utils/createBaseUIEventDetails");
|
|
@@ -31,14 +32,21 @@ function useFloatingPortalNode(props = {}) {
|
|
|
31
32
|
ref,
|
|
32
33
|
container: containerProp,
|
|
33
34
|
componentProps = _constants.EMPTY_OBJECT,
|
|
34
|
-
elementProps
|
|
35
|
-
elementState
|
|
35
|
+
elementProps
|
|
36
36
|
} = props;
|
|
37
37
|
const uniqueId = (0, _useId.useId)();
|
|
38
38
|
const portalContext = usePortalContext();
|
|
39
39
|
const parentPortalNode = portalContext?.portalNode;
|
|
40
40
|
const [containerElement, setContainerElement] = React.useState(null);
|
|
41
41
|
const [portalNode, setPortalNode] = React.useState(null);
|
|
42
|
+
const setPortalNodeRef = (0, _useStableCallback.useStableCallback)(node => {
|
|
43
|
+
if (node !== null) {
|
|
44
|
+
// the useIsoLayoutEffect below watching containerProp / parentPortalNode
|
|
45
|
+
// sets setPortalNode(null) when the container becomes null or changes.
|
|
46
|
+
// So even though the ref callback now ignores null, the portal node still gets cleared.
|
|
47
|
+
setPortalNode(node);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
42
50
|
const containerRef = React.useRef(null);
|
|
43
51
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
44
52
|
// Wait for the container to be resolved if explicitly `null`.
|
|
@@ -71,8 +79,7 @@ function useFloatingPortalNode(props = {}) {
|
|
|
71
79
|
}
|
|
72
80
|
}, [containerProp, parentPortalNode, uniqueId]);
|
|
73
81
|
const portalElement = (0, _useRenderElement.useRenderElement)('div', componentProps, {
|
|
74
|
-
ref: [ref,
|
|
75
|
-
state: elementState,
|
|
82
|
+
ref: [ref, setPortalNodeRef],
|
|
76
83
|
props: [{
|
|
77
84
|
id: uniqueId,
|
|
78
85
|
[attr]: ''
|
|
@@ -134,7 +141,7 @@ const FloatingPortal = exports.FloatingPortal = /*#__PURE__*/React.forwardRef(fu
|
|
|
134
141
|
// portal has already been focused, either by tabbing into a focus trap
|
|
135
142
|
// element outside or using the mouse.
|
|
136
143
|
function onFocus(event) {
|
|
137
|
-
if (portalNode && (0, _utils.isOutsideEvent)(event)) {
|
|
144
|
+
if (portalNode && event.relatedTarget && (0, _utils.isOutsideEvent)(event)) {
|
|
138
145
|
const focusing = event.type === 'focusin';
|
|
139
146
|
const manageFocus = focusing ? _utils.enableFocusInside : _utils.disableFocusInside;
|
|
140
147
|
manageFocus(portalNode);
|
|
@@ -27,7 +27,7 @@ export interface FloatingNodeProps {
|
|
|
27
27
|
export declare function FloatingNode(props: FloatingNodeProps): React.JSX.Element;
|
|
28
28
|
export interface FloatingTreeProps {
|
|
29
29
|
children?: React.ReactNode;
|
|
30
|
-
externalTree?: FloatingTreeStore;
|
|
30
|
+
externalTree?: FloatingTreeStore | undefined;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Provides context for nested floating elements when they are not children of
|