@base-ui/react 1.4.1 → 1.5.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 +125 -8
- package/README.md +1 -1
- package/accordion/item/AccordionItem.d.ts +4 -0
- package/accordion/item/AccordionItem.js +5 -4
- package/accordion/panel/AccordionPanel.js +29 -51
- package/accordion/root/AccordionRoot.js +5 -6
- package/accordion/trigger/AccordionTrigger.js +3 -4
- package/alert-dialog/handle.d.ts +14 -1
- package/alert-dialog/handle.js +22 -5
- package/alert-dialog/index.d.ts +1 -1
- package/alert-dialog/index.parts.d.ts +2 -3
- package/alert-dialog/index.parts.js +4 -5
- package/alert-dialog/root/AlertDialogRoot.d.ts +7 -7
- package/alert-dialog/root/AlertDialogRoot.js +2 -56
- package/alert-dialog/trigger/AlertDialogTrigger.d.ts +25 -0
- package/alert-dialog/trigger/AlertDialogTrigger.js +15 -0
- package/alert-dialog/trigger/AlertDialogTriggerDataAttributes.d.ts +10 -0
- package/alert-dialog/trigger/AlertDialogTriggerDataAttributes.js +18 -0
- package/autocomplete/root/AutocompleteRoot.js +9 -10
- package/avatar/image/AvatarImage.js +4 -4
- package/checkbox/indicator/CheckboxIndicator.js +2 -2
- package/checkbox/root/CheckboxRoot.js +49 -11
- package/checkbox-group/CheckboxGroup.js +1 -5
- package/collapsible/panel/CollapsiblePanel.js +29 -51
- package/collapsible/panel/useCollapsiblePanel.d.ts +9 -23
- package/collapsible/panel/useCollapsiblePanel.js +308 -268
- package/collapsible/root/CollapsibleRoot.d.ts +1 -1
- package/collapsible/root/CollapsibleRootContext.d.ts +0 -2
- package/collapsible/root/useCollapsibleRoot.d.ts +0 -27
- package/collapsible/root/useCollapsibleRoot.js +2 -64
- package/collapsible/trigger/CollapsibleTrigger.js +5 -6
- package/combobox/arrow/ComboboxArrow.js +1 -1
- package/combobox/backdrop/ComboboxBackdrop.js +1 -1
- package/combobox/chip/ComboboxChip.js +7 -2
- package/combobox/clear/ComboboxClear.d.ts +4 -0
- package/combobox/clear/ComboboxClear.js +1 -0
- package/combobox/clear/ComboboxClearDataAttributes.d.ts +4 -0
- package/combobox/clear/ComboboxClearDataAttributes.js +4 -0
- package/combobox/icon/ComboboxIcon.js +1 -1
- package/combobox/input/ComboboxInput.js +15 -6
- package/combobox/item/ComboboxItem.js +8 -14
- package/combobox/item-indicator/ComboboxItemIndicator.js +1 -2
- package/combobox/root/AriaCombobox.js +61 -28
- package/combobox/store.d.ts +4 -8
- package/combobox/store.js +2 -1
- package/combobox/utils/ComboboxInternalDismissButton.js +2 -3
- package/csp-provider/CSPProvider.js +1 -1
- package/dialog/close/DialogClose.js +6 -6
- package/dialog/popup/DialogPopup.js +9 -4
- package/dialog/root/DialogRoot.d.ts +1 -2
- package/dialog/root/DialogRoot.js +3 -73
- package/dialog/root/DialogRootContext.d.ts +1 -0
- package/dialog/root/DialogRootContext.js +3 -1
- package/dialog/root/useDialogRoot.d.ts +12 -4
- package/dialog/root/useDialogRoot.js +27 -25
- package/dialog/root/useRenderDialogRoot.d.ts +4 -0
- package/dialog/root/useRenderDialogRoot.js +96 -0
- package/dialog/store/DialogHandle.d.ts +1 -1
- package/dialog/store/DialogHandle.js +2 -2
- package/dialog/store/DialogStore.d.ts +88 -1
- package/dialog/store/DialogStore.js +12 -17
- package/dialog/trigger/DialogTrigger.d.ts +1 -1
- package/dialog/trigger/DialogTrigger.js +11 -4
- package/dialog/viewport/DialogViewport.js +4 -3
- package/drawer/popup/DrawerPopup.js +13 -9
- package/drawer/root/DrawerRoot.js +11 -11
- package/drawer/root/DrawerRootContext.d.ts +1 -1
- package/drawer/swipe-area/DrawerSwipeArea.js +6 -5
- package/drawer/viewport/DrawerViewport.js +13 -14
- package/esm/accordion/item/AccordionItem.d.ts +4 -0
- package/esm/accordion/item/AccordionItem.js +5 -4
- package/esm/accordion/panel/AccordionPanel.js +29 -51
- package/esm/accordion/root/AccordionRoot.js +5 -6
- package/esm/accordion/trigger/AccordionTrigger.js +4 -5
- package/esm/alert-dialog/handle.d.ts +14 -1
- package/esm/alert-dialog/handle.js +20 -5
- package/esm/alert-dialog/index.d.ts +1 -1
- package/esm/alert-dialog/index.parts.d.ts +2 -3
- package/esm/alert-dialog/index.parts.js +2 -3
- package/esm/alert-dialog/root/AlertDialogRoot.d.ts +7 -7
- package/esm/alert-dialog/root/AlertDialogRoot.js +2 -55
- package/esm/alert-dialog/trigger/AlertDialogTrigger.d.ts +25 -0
- package/esm/alert-dialog/trigger/AlertDialogTrigger.js +10 -0
- package/esm/alert-dialog/trigger/AlertDialogTriggerDataAttributes.d.ts +10 -0
- package/esm/alert-dialog/trigger/AlertDialogTriggerDataAttributes.js +12 -0
- package/esm/autocomplete/root/AutocompleteRoot.js +9 -10
- package/esm/avatar/image/AvatarImage.js +4 -4
- package/esm/checkbox/indicator/CheckboxIndicator.js +2 -2
- package/esm/checkbox/root/CheckboxRoot.js +49 -11
- package/esm/checkbox-group/CheckboxGroup.js +1 -5
- package/esm/collapsible/panel/CollapsiblePanel.js +29 -51
- package/esm/collapsible/panel/useCollapsiblePanel.d.ts +9 -23
- package/esm/collapsible/panel/useCollapsiblePanel.js +309 -269
- package/esm/collapsible/root/CollapsibleRoot.d.ts +1 -1
- package/esm/collapsible/root/CollapsibleRootContext.d.ts +0 -2
- package/esm/collapsible/root/useCollapsibleRoot.d.ts +0 -27
- package/esm/collapsible/root/useCollapsibleRoot.js +2 -64
- package/esm/collapsible/trigger/CollapsibleTrigger.js +5 -6
- package/esm/combobox/arrow/ComboboxArrow.js +1 -1
- package/esm/combobox/backdrop/ComboboxBackdrop.js +1 -1
- package/esm/combobox/chip/ComboboxChip.js +7 -2
- package/esm/combobox/clear/ComboboxClear.d.ts +4 -0
- package/esm/combobox/clear/ComboboxClear.js +1 -0
- package/esm/combobox/clear/ComboboxClearDataAttributes.d.ts +4 -0
- package/esm/combobox/clear/ComboboxClearDataAttributes.js +4 -0
- package/esm/combobox/icon/ComboboxIcon.js +1 -1
- package/esm/combobox/input/ComboboxInput.js +16 -7
- package/esm/combobox/item/ComboboxItem.js +8 -14
- package/esm/combobox/item-indicator/ComboboxItemIndicator.js +1 -2
- package/esm/combobox/root/AriaCombobox.js +62 -29
- package/esm/combobox/store.d.ts +4 -8
- package/esm/combobox/store.js +2 -1
- package/esm/combobox/utils/ComboboxInternalDismissButton.js +2 -3
- package/esm/csp-provider/CSPProvider.js +1 -1
- package/esm/dialog/close/DialogClose.js +6 -6
- package/esm/dialog/popup/DialogPopup.js +9 -4
- package/esm/dialog/root/DialogRoot.d.ts +1 -2
- package/esm/dialog/root/DialogRoot.js +4 -72
- package/esm/dialog/root/DialogRootContext.d.ts +1 -0
- package/esm/dialog/root/DialogRootContext.js +2 -0
- package/esm/dialog/root/useDialogRoot.d.ts +12 -4
- package/esm/dialog/root/useDialogRoot.js +28 -27
- package/esm/dialog/root/useRenderDialogRoot.d.ts +4 -0
- package/esm/dialog/root/useRenderDialogRoot.js +90 -0
- package/esm/dialog/store/DialogHandle.d.ts +1 -1
- package/esm/dialog/store/DialogHandle.js +2 -2
- package/esm/dialog/store/DialogStore.d.ts +88 -1
- package/esm/dialog/store/DialogStore.js +13 -18
- package/esm/dialog/trigger/DialogTrigger.d.ts +1 -1
- package/esm/dialog/trigger/DialogTrigger.js +12 -5
- package/esm/dialog/viewport/DialogViewport.js +4 -3
- package/esm/drawer/popup/DrawerPopup.js +14 -9
- package/esm/drawer/root/DrawerRoot.js +11 -11
- package/esm/drawer/root/DrawerRootContext.d.ts +1 -1
- package/esm/drawer/swipe-area/DrawerSwipeArea.js +6 -5
- package/esm/drawer/viewport/DrawerViewport.js +13 -14
- package/esm/field/control/FieldControl.js +2 -6
- package/esm/field/item/FieldItem.js +1 -4
- package/esm/field/root/FieldRoot.js +11 -3
- package/esm/field/root/useFieldValidation.d.ts +1 -0
- package/esm/field/root/useFieldValidation.js +23 -20
- package/esm/field/utils/getCombinedFieldValidityData.d.ts +1 -1
- package/esm/field/validity/FieldValidity.d.ts +1 -1
- package/esm/floating-ui-react/components/FloatingDelayGroup.js +3 -3
- package/esm/floating-ui-react/components/FloatingFocusManager.d.ts +1 -1
- package/esm/floating-ui-react/components/FloatingFocusManager.js +20 -8
- package/esm/floating-ui-react/components/FloatingPortal.js +3 -3
- package/esm/floating-ui-react/hooks/useClick.js +83 -74
- package/esm/floating-ui-react/hooks/useClientPoint.js +29 -20
- package/esm/floating-ui-react/hooks/useDismiss.d.ts +1 -1
- package/esm/floating-ui-react/hooks/useDismiss.js +82 -93
- package/esm/floating-ui-react/hooks/useFloating.js +37 -32
- package/esm/floating-ui-react/hooks/useFloatingRootContext.d.ts +1 -1
- package/esm/floating-ui-react/hooks/useFloatingRootContext.js +2 -2
- package/esm/floating-ui-react/hooks/useFocus.js +84 -81
- package/esm/floating-ui-react/hooks/useHover.js +72 -76
- package/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js +49 -44
- package/esm/floating-ui-react/hooks/useHoverInteractionSharedState.js +1 -1
- package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +7 -2
- package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js +44 -39
- package/esm/floating-ui-react/hooks/useHoverShared.d.ts +2 -1
- package/esm/floating-ui-react/hooks/useHoverShared.js +4 -0
- package/esm/floating-ui-react/hooks/useListNavigation.d.ts +1 -3
- package/esm/floating-ui-react/hooks/useListNavigation.js +83 -74
- package/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.d.ts +9 -6
- package/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js +25 -20
- package/esm/floating-ui-react/hooks/useTypeahead.d.ts +2 -2
- package/esm/floating-ui-react/hooks/useTypeahead.js +33 -52
- package/esm/floating-ui-react/index.d.ts +0 -2
- package/esm/floating-ui-react/index.js +0 -2
- package/esm/floating-ui-react/types.d.ts +2 -7
- package/esm/floating-ui-react/utils/composite.js +2 -0
- package/esm/floating-ui-react/utils/enqueueFocus.d.ts +1 -1
- package/esm/floating-ui-react/utils/enqueueFocus.js +10 -7
- package/esm/floating-ui-react/utils/getEmptyRootContext.js +1 -1
- package/esm/form/Form.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/composite/composite.d.ts +0 -1
- package/esm/internals/composite/composite.js +1 -2
- package/esm/internals/composite/root/useCompositeRoot.js +2 -2
- package/esm/internals/createBaseUIEventDetails.d.ts +2 -0
- package/esm/internals/csp-context/index.d.ts +2 -0
- package/esm/internals/csp-context/index.js +1 -0
- package/esm/internals/field-register-control/index.d.ts +0 -1
- package/esm/internals/field-register-control/useFieldControlRegistration.d.ts +2 -1
- package/esm/internals/field-register-control/useFieldControlRegistration.js +11 -14
- package/esm/internals/field-register-control/useRegisterFieldControl.d.ts +1 -4
- package/esm/internals/field-register-control/useRegisterFieldControl.js +6 -11
- package/esm/internals/field-root-context/FieldRootContext.d.ts +1 -0
- package/esm/internals/field-root-context/FieldRootContext.js +3 -2
- package/esm/internals/form-context/FormContext.d.ts +5 -1
- package/esm/internals/reason-parts.d.ts +2 -0
- package/esm/internals/reason-parts.js +2 -0
- package/esm/internals/types.d.ts +1 -0
- package/esm/internals/use-button/useButton.js +4 -4
- package/esm/internals/usePressAndHold.js +2 -2
- package/esm/internals/useRenderElement.js +2 -0
- package/esm/menu/arrow/MenuArrow.js +1 -1
- package/esm/menu/backdrop/MenuBackdrop.js +1 -1
- package/esm/menu/checkbox-item/MenuCheckboxItem.js +5 -7
- package/esm/menu/group/MenuGroup.js +1 -4
- package/esm/menu/group/MenuGroupContext.d.ts +1 -3
- package/esm/menu/group/MenuGroupContext.js +1 -1
- package/esm/menu/group-label/MenuGroupLabel.js +4 -6
- package/esm/menu/link-item/MenuLinkItem.js +2 -2
- package/esm/menu/popup/MenuPopup.js +5 -5
- package/esm/menu/radio-group/MenuRadioGroup.js +11 -5
- package/esm/menu/radio-item/MenuRadioItem.js +5 -7
- package/esm/menu/root/MenuRoot.js +63 -68
- package/esm/menu/store/MenuHandle.js +1 -1
- package/esm/menu/store/MenuStore.d.ts +87 -0
- package/esm/menu/submenu-trigger/MenuSubmenuTrigger.js +8 -5
- package/esm/menu/trigger/MenuTrigger.js +13 -10
- package/esm/menu/viewport/MenuViewport.d.ts +2 -2
- package/esm/menu/viewport/MenuViewport.js +2 -2
- package/esm/navigation-menu/arrow/NavigationMenuArrow.js +1 -1
- package/esm/navigation-menu/backdrop/NavigationMenuBackdrop.js +1 -1
- package/esm/navigation-menu/content/NavigationMenuContent.js +8 -5
- package/esm/navigation-menu/icon/NavigationMenuIcon.js +1 -1
- package/esm/navigation-menu/item/NavigationMenuItem.js +2 -2
- package/esm/navigation-menu/list/NavigationMenuList.js +1 -1
- package/esm/navigation-menu/popup/NavigationMenuPopup.js +2 -2
- package/esm/navigation-menu/root/NavigationMenuRoot.js +1 -3
- package/esm/navigation-menu/trigger/NavigationMenuTrigger.js +24 -17
- package/esm/navigation-menu/utils/isOutsideMenuEvent.d.ts +0 -1
- package/esm/navigation-menu/utils/isOutsideMenuEvent.js +1 -5
- package/esm/navigation-menu/viewport/NavigationMenuViewport.js +2 -3
- package/esm/number-field/input/NumberFieldInput.js +3 -5
- package/esm/number-field/root/NumberFieldRoot.js +5 -2
- package/esm/number-field/scrub-area/NumberFieldScrubArea.js +7 -3
- package/esm/otp-field/input/OTPFieldInput.js +43 -29
- package/esm/otp-field/root/OTPFieldRoot.d.ts +17 -8
- package/esm/otp-field/root/OTPFieldRoot.js +33 -33
- package/esm/otp-field/root/OTPFieldRootContext.d.ts +1 -1
- package/esm/otp-field/utils/otp.d.ts +5 -4
- package/esm/otp-field/utils/otp.js +23 -12
- package/esm/popover/arrow/PopoverArrow.js +1 -1
- package/esm/popover/backdrop/PopoverBackdrop.js +1 -1
- package/esm/popover/close/PopoverClose.js +2 -2
- package/esm/popover/description/PopoverDescription.js +1 -7
- package/esm/popover/popup/PopoverPopup.d.ts +1 -1
- package/esm/popover/popup/PopoverPopup.js +16 -10
- package/esm/popover/popup/PopoverPopupDataAttributes.d.ts +1 -1
- package/esm/popover/popup/PopoverPopupDataAttributes.js +1 -1
- package/esm/popover/positioner/PopoverPositioner.js +5 -5
- package/esm/popover/root/PopoverRoot.d.ts +1 -1
- package/esm/popover/root/PopoverRoot.js +42 -47
- package/esm/popover/store/PopoverHandle.js +1 -1
- package/esm/popover/store/PopoverStore.d.ts +91 -4
- package/esm/popover/store/PopoverStore.js +17 -18
- package/esm/popover/title/PopoverTitle.js +1 -7
- package/esm/popover/trigger/PopoverTrigger.js +24 -17
- package/esm/popover/viewport/PopoverViewport.d.ts +3 -3
- package/esm/popover/viewport/PopoverViewport.js +2 -2
- package/esm/popover/viewport/PopoverViewportDataAttributes.d.ts +1 -1
- package/esm/popover/viewport/PopoverViewportDataAttributes.js +1 -1
- package/esm/preview-card/positioner/PreviewCardPositioner.js +11 -1
- package/esm/preview-card/root/PreviewCardRoot.d.ts +1 -1
- package/esm/preview-card/root/PreviewCardRoot.js +32 -22
- package/esm/preview-card/store/PreviewCardHandle.js +1 -1
- package/esm/preview-card/store/PreviewCardStore.d.ts +90 -2
- package/esm/preview-card/store/PreviewCardStore.js +19 -31
- package/esm/preview-card/trigger/PreviewCardTrigger.js +6 -3
- package/esm/preview-card/viewport/PreviewCardViewport.d.ts +2 -2
- package/esm/preview-card/viewport/PreviewCardViewport.js +2 -2
- package/esm/preview-card/viewport/PreviewCardViewportDataAttributes.d.ts +2 -2
- package/esm/preview-card/viewport/PreviewCardViewportDataAttributes.js +2 -2
- package/esm/progress/indicator/ProgressIndicator.js +6 -11
- package/esm/progress/root/ProgressRoot.d.ts +1 -1
- package/esm/radio/root/RadioRoot.js +7 -3
- package/esm/radio-group/RadioGroup.js +4 -11
- package/esm/radio-group/RadioGroupContext.d.ts +0 -1
- package/esm/scroll-area/content/ScrollAreaContent.js +4 -4
- package/esm/scroll-area/root/ScrollAreaRoot.js +1 -1
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.js +16 -20
- package/esm/scroll-area/viewport/ScrollAreaViewport.js +6 -10
- package/esm/select/arrow/SelectArrow.js +1 -1
- package/esm/select/backdrop/SelectBackdrop.js +1 -1
- package/esm/select/group/SelectGroup.js +1 -1
- package/esm/select/group-label/SelectGroupLabel.js +2 -2
- package/esm/select/icon/SelectIcon.js +1 -1
- package/esm/select/item/SelectItem.js +46 -32
- package/esm/select/item/SelectItemContext.d.ts +1 -1
- package/esm/select/item-indicator/SelectItemIndicator.js +1 -2
- package/esm/select/item-text/SelectItemText.js +9 -6
- package/esm/select/list/SelectList.js +1 -1
- package/esm/select/popup/SelectPopup.js +8 -3
- package/esm/select/positioner/SelectPositioner.js +3 -0
- package/esm/select/root/SelectRoot.js +46 -40
- package/esm/select/root/SelectRootContext.d.ts +4 -5
- package/esm/select/store.d.ts +3 -0
- package/esm/select/store.js +1 -0
- package/esm/select/trigger/SelectTrigger.d.ts +5 -0
- package/esm/select/trigger/SelectTrigger.js +19 -33
- package/esm/select/trigger/SelectTriggerDataAttributes.d.ts +5 -0
- package/esm/select/trigger/SelectTriggerDataAttributes.js +5 -0
- package/esm/slider/control/SliderControl.js +10 -12
- package/esm/slider/root/SliderRoot.js +1 -4
- package/esm/slider/thumb/SliderThumb.js +32 -30
- package/esm/slider/value/SliderValue.js +7 -15
- package/esm/switch/root/SwitchRoot.js +10 -10
- package/esm/switch/thumb/SwitchThumb.js +1 -9
- package/esm/tabs/indicator/TabsIndicator.js +14 -19
- package/esm/tabs/list/TabsList.js +4 -10
- package/esm/tabs/list/TabsListContext.d.ts +2 -1
- package/esm/tabs/panel/TabsPanel.js +1 -1
- package/esm/tabs/root/TabsRoot.d.ts +16 -1
- package/esm/tabs/root/TabsRoot.js +73 -25
- package/esm/tabs/root/TabsRootContext.d.ts +0 -2
- package/esm/toast/provider/ToastProvider.js +1 -1
- package/esm/toast/root/ToastRoot.d.ts +1 -1
- package/esm/toast/root/ToastRoot.js +108 -131
- package/esm/toast/root/ToastRootDataAttributes.d.ts +1 -1
- package/esm/toast/root/ToastRootDataAttributes.js +1 -1
- package/esm/toast/store.d.ts +9 -1
- package/esm/toast/store.js +19 -13
- package/esm/toast/useToastManager.d.ts +1 -1
- package/esm/toast/viewport/ToastViewport.js +1 -1
- package/esm/toggle/Toggle.js +5 -9
- package/esm/toggle-group/ToggleGroup.d.ts +2 -2
- package/esm/toggle-group/ToggleGroup.js +6 -13
- package/esm/toolbar/link/ToolbarLink.d.ts +1 -1
- package/esm/toolbar/link/ToolbarLink.js +1 -2
- package/esm/tooltip/arrow/TooltipArrow.js +3 -3
- package/esm/tooltip/popup/TooltipPopup.js +5 -4
- package/esm/tooltip/root/TooltipRoot.js +35 -26
- package/esm/tooltip/store/TooltipHandle.js +1 -1
- package/esm/tooltip/store/TooltipStore.d.ts +90 -2
- package/esm/tooltip/store/TooltipStore.js +18 -31
- package/esm/tooltip/trigger/TooltipTrigger.js +151 -20
- package/esm/tooltip/viewport/TooltipViewport.d.ts +2 -2
- package/esm/tooltip/viewport/TooltipViewport.js +2 -2
- package/esm/tooltip/viewport/TooltipViewportDataAttributes.d.ts +1 -1
- package/esm/tooltip/viewport/TooltipViewportDataAttributes.js +1 -1
- package/esm/unstable-use-media-query/index.js +1 -1
- package/esm/utils/popups/index.d.ts +1 -0
- package/esm/utils/popups/index.js +1 -0
- package/esm/utils/popups/inlineRect.d.ts +15 -0
- package/esm/utils/popups/inlineRect.js +191 -0
- package/esm/utils/popups/popupStoreUtils.d.ts +28 -10
- package/esm/utils/popups/popupStoreUtils.js +105 -20
- package/esm/utils/popups/popupTriggerMap.js +2 -0
- package/esm/utils/popups/store.d.ts +15 -2
- package/esm/utils/popups/store.js +38 -2
- package/esm/utils/popups/useTriggerFocusGuards.js +4 -5
- package/esm/utils/useAnchorPositioning.d.ts +5 -0
- package/esm/utils/useAnchorPositioning.js +12 -9
- package/esm/utils/useOpenInteractionType.d.ts +4 -0
- package/esm/utils/useOpenInteractionType.js +23 -18
- package/field/control/FieldControl.js +2 -6
- package/field/item/FieldItem.js +1 -4
- package/field/root/FieldRoot.js +11 -3
- package/field/root/useFieldValidation.d.ts +1 -0
- package/field/root/useFieldValidation.js +23 -20
- package/field/utils/getCombinedFieldValidityData.d.ts +1 -1
- package/field/validity/FieldValidity.d.ts +1 -1
- package/floating-ui-react/components/FloatingDelayGroup.js +3 -3
- package/floating-ui-react/components/FloatingFocusManager.d.ts +1 -1
- package/floating-ui-react/components/FloatingFocusManager.js +20 -8
- package/floating-ui-react/components/FloatingPortal.js +3 -3
- package/floating-ui-react/hooks/useClick.js +82 -73
- package/floating-ui-react/hooks/useClientPoint.js +29 -20
- package/floating-ui-react/hooks/useDismiss.d.ts +1 -1
- package/floating-ui-react/hooks/useDismiss.js +82 -92
- package/floating-ui-react/hooks/useFloating.js +36 -32
- package/floating-ui-react/hooks/useFloatingRootContext.d.ts +1 -1
- package/floating-ui-react/hooks/useFloatingRootContext.js +2 -2
- package/floating-ui-react/hooks/useFocus.js +84 -81
- package/floating-ui-react/hooks/useHover.js +74 -78
- package/floating-ui-react/hooks/useHoverFloatingInteraction.js +48 -43
- package/floating-ui-react/hooks/useHoverInteractionSharedState.js +1 -1
- package/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +7 -2
- package/floating-ui-react/hooks/useHoverReferenceInteraction.js +43 -38
- package/floating-ui-react/hooks/useHoverShared.d.ts +2 -1
- package/floating-ui-react/hooks/useHoverShared.js +11 -0
- package/floating-ui-react/hooks/useListNavigation.d.ts +1 -3
- package/floating-ui-react/hooks/useListNavigation.js +83 -74
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.d.ts +9 -6
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.js +26 -20
- package/floating-ui-react/hooks/useTypeahead.d.ts +2 -2
- package/floating-ui-react/hooks/useTypeahead.js +33 -52
- package/floating-ui-react/index.d.ts +0 -2
- package/floating-ui-react/index.js +0 -14
- package/floating-ui-react/types.d.ts +2 -7
- package/floating-ui-react/utils/composite.js +2 -0
- package/floating-ui-react/utils/enqueueFocus.d.ts +1 -1
- package/floating-ui-react/utils/enqueueFocus.js +10 -7
- package/floating-ui-react/utils/getEmptyRootContext.js +1 -1
- package/form/Form.js +2 -2
- package/index.js +1 -1
- package/internals/composite/composite.d.ts +0 -1
- package/internals/composite/composite.js +2 -3
- package/internals/composite/root/useCompositeRoot.js +1 -1
- package/internals/createBaseUIEventDetails.d.ts +2 -0
- package/internals/csp-context/index.d.ts +2 -0
- package/internals/csp-context/index.js +18 -0
- package/internals/field-register-control/index.d.ts +0 -1
- package/internals/field-register-control/useFieldControlRegistration.d.ts +2 -1
- package/internals/field-register-control/useFieldControlRegistration.js +11 -14
- package/internals/field-register-control/useRegisterFieldControl.d.ts +1 -4
- package/internals/field-register-control/useRegisterFieldControl.js +6 -11
- package/internals/field-root-context/FieldRootContext.d.ts +1 -0
- package/internals/field-root-context/FieldRootContext.js +4 -3
- package/internals/form-context/FormContext.d.ts +5 -1
- package/internals/reason-parts.d.ts +2 -0
- package/internals/reason-parts.js +3 -1
- package/internals/types.d.ts +1 -0
- package/internals/use-button/useButton.js +4 -4
- package/internals/usePressAndHold.js +2 -2
- package/internals/useRenderElement.js +2 -0
- package/menu/arrow/MenuArrow.js +1 -1
- package/menu/backdrop/MenuBackdrop.js +1 -1
- package/menu/checkbox-item/MenuCheckboxItem.js +5 -7
- package/menu/group/MenuGroup.js +1 -4
- package/menu/group/MenuGroupContext.d.ts +1 -3
- package/menu/group/MenuGroupContext.js +1 -1
- package/menu/group-label/MenuGroupLabel.js +4 -6
- package/menu/link-item/MenuLinkItem.js +2 -2
- package/menu/popup/MenuPopup.js +5 -5
- package/menu/radio-group/MenuRadioGroup.js +11 -5
- package/menu/radio-item/MenuRadioItem.js +5 -7
- package/menu/root/MenuRoot.js +60 -65
- package/menu/store/MenuHandle.js +1 -1
- package/menu/store/MenuStore.d.ts +87 -0
- package/menu/submenu-trigger/MenuSubmenuTrigger.js +7 -4
- package/menu/trigger/MenuTrigger.js +12 -9
- package/menu/viewport/MenuViewport.d.ts +2 -2
- package/menu/viewport/MenuViewport.js +2 -2
- package/navigation-menu/arrow/NavigationMenuArrow.js +1 -1
- package/navigation-menu/backdrop/NavigationMenuBackdrop.js +1 -1
- package/navigation-menu/content/NavigationMenuContent.js +8 -5
- package/navigation-menu/icon/NavigationMenuIcon.js +1 -1
- package/navigation-menu/item/NavigationMenuItem.js +2 -2
- package/navigation-menu/list/NavigationMenuList.js +1 -1
- package/navigation-menu/popup/NavigationMenuPopup.js +2 -2
- package/navigation-menu/root/NavigationMenuRoot.js +1 -3
- package/navigation-menu/trigger/NavigationMenuTrigger.js +23 -16
- package/navigation-menu/utils/isOutsideMenuEvent.d.ts +0 -1
- package/navigation-menu/utils/isOutsideMenuEvent.js +1 -5
- package/navigation-menu/viewport/NavigationMenuViewport.js +2 -3
- package/number-field/input/NumberFieldInput.js +3 -5
- package/number-field/root/NumberFieldRoot.js +5 -2
- package/number-field/scrub-area/NumberFieldScrubArea.js +7 -3
- package/otp-field/input/OTPFieldInput.js +42 -28
- package/otp-field/root/OTPFieldRoot.d.ts +17 -8
- package/otp-field/root/OTPFieldRoot.js +32 -32
- package/otp-field/root/OTPFieldRootContext.d.ts +1 -1
- package/otp-field/utils/otp.d.ts +5 -4
- package/otp-field/utils/otp.js +24 -12
- package/package.json +331 -317
- package/popover/arrow/PopoverArrow.js +1 -1
- package/popover/backdrop/PopoverBackdrop.js +1 -1
- package/popover/close/PopoverClose.js +2 -2
- package/popover/description/PopoverDescription.js +1 -7
- package/popover/popup/PopoverPopup.d.ts +1 -1
- package/popover/popup/PopoverPopup.js +16 -10
- package/popover/popup/PopoverPopupDataAttributes.d.ts +1 -1
- package/popover/popup/PopoverPopupDataAttributes.js +1 -1
- package/popover/positioner/PopoverPositioner.js +5 -5
- package/popover/root/PopoverRoot.d.ts +1 -1
- package/popover/root/PopoverRoot.js +39 -44
- package/popover/store/PopoverHandle.js +1 -1
- package/popover/store/PopoverStore.d.ts +91 -4
- package/popover/store/PopoverStore.js +16 -19
- package/popover/title/PopoverTitle.js +1 -7
- package/popover/trigger/PopoverTrigger.js +23 -16
- package/popover/viewport/PopoverViewport.d.ts +3 -3
- package/popover/viewport/PopoverViewport.js +2 -2
- package/popover/viewport/PopoverViewportDataAttributes.d.ts +1 -1
- package/popover/viewport/PopoverViewportDataAttributes.js +1 -1
- package/preview-card/positioner/PreviewCardPositioner.js +11 -1
- package/preview-card/root/PreviewCardRoot.d.ts +1 -1
- package/preview-card/root/PreviewCardRoot.js +30 -20
- package/preview-card/store/PreviewCardHandle.js +1 -1
- package/preview-card/store/PreviewCardStore.d.ts +90 -2
- package/preview-card/store/PreviewCardStore.js +18 -30
- package/preview-card/trigger/PreviewCardTrigger.js +5 -2
- package/preview-card/viewport/PreviewCardViewport.d.ts +2 -2
- package/preview-card/viewport/PreviewCardViewport.js +2 -2
- package/preview-card/viewport/PreviewCardViewportDataAttributes.d.ts +2 -2
- package/preview-card/viewport/PreviewCardViewportDataAttributes.js +2 -2
- package/progress/indicator/ProgressIndicator.js +6 -11
- package/progress/root/ProgressRoot.d.ts +1 -1
- package/radio/root/RadioRoot.js +7 -3
- package/radio-group/RadioGroup.js +4 -11
- package/radio-group/RadioGroupContext.d.ts +0 -1
- package/scroll-area/content/ScrollAreaContent.js +4 -4
- package/scroll-area/root/ScrollAreaRoot.js +1 -1
- package/scroll-area/scrollbar/ScrollAreaScrollbar.js +16 -20
- package/scroll-area/viewport/ScrollAreaViewport.js +6 -10
- package/select/arrow/SelectArrow.js +1 -1
- package/select/backdrop/SelectBackdrop.js +1 -1
- package/select/group/SelectGroup.js +1 -1
- package/select/group-label/SelectGroupLabel.js +2 -2
- package/select/icon/SelectIcon.js +1 -1
- package/select/item/SelectItem.js +46 -32
- package/select/item/SelectItemContext.d.ts +1 -1
- package/select/item-indicator/SelectItemIndicator.js +1 -2
- package/select/item-text/SelectItemText.js +9 -6
- package/select/list/SelectList.js +1 -1
- package/select/popup/SelectPopup.js +8 -3
- package/select/positioner/SelectPositioner.js +3 -0
- package/select/root/SelectRoot.js +45 -39
- package/select/root/SelectRootContext.d.ts +4 -5
- package/select/store.d.ts +3 -0
- package/select/store.js +1 -0
- package/select/trigger/SelectTrigger.d.ts +5 -0
- package/select/trigger/SelectTrigger.js +19 -33
- package/select/trigger/SelectTriggerDataAttributes.d.ts +5 -0
- package/select/trigger/SelectTriggerDataAttributes.js +5 -0
- package/slider/control/SliderControl.js +9 -11
- package/slider/root/SliderRoot.js +1 -4
- package/slider/thumb/SliderThumb.js +32 -30
- package/slider/value/SliderValue.js +7 -15
- package/switch/root/SwitchRoot.js +10 -10
- package/switch/thumb/SwitchThumb.js +1 -9
- package/tabs/indicator/TabsIndicator.js +14 -19
- package/tabs/list/TabsList.js +4 -10
- package/tabs/list/TabsListContext.d.ts +2 -1
- package/tabs/panel/TabsPanel.js +1 -1
- package/tabs/root/TabsRoot.d.ts +16 -1
- package/tabs/root/TabsRoot.js +71 -24
- package/tabs/root/TabsRootContext.d.ts +0 -2
- package/toast/provider/ToastProvider.js +1 -1
- package/toast/root/ToastRoot.d.ts +1 -1
- package/toast/root/ToastRoot.js +110 -133
- package/toast/root/ToastRootDataAttributes.d.ts +1 -1
- package/toast/root/ToastRootDataAttributes.js +1 -1
- package/toast/store.d.ts +9 -1
- package/toast/store.js +18 -12
- package/toast/useToastManager.d.ts +1 -1
- package/toast/viewport/ToastViewport.js +1 -1
- package/toggle/Toggle.js +5 -9
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/toggle-group/ToggleGroup.js +6 -13
- package/toolbar/link/ToolbarLink.d.ts +1 -1
- package/toolbar/link/ToolbarLink.js +1 -2
- package/tooltip/arrow/TooltipArrow.js +3 -3
- package/tooltip/popup/TooltipPopup.js +5 -4
- package/tooltip/root/TooltipRoot.js +32 -23
- package/tooltip/store/TooltipHandle.js +1 -1
- package/tooltip/store/TooltipStore.d.ts +90 -2
- package/tooltip/store/TooltipStore.js +17 -30
- package/tooltip/trigger/TooltipTrigger.js +152 -20
- package/tooltip/viewport/TooltipViewport.d.ts +2 -2
- package/tooltip/viewport/TooltipViewport.js +2 -2
- package/tooltip/viewport/TooltipViewportDataAttributes.d.ts +1 -1
- package/tooltip/viewport/TooltipViewportDataAttributes.js +1 -1
- package/unstable-use-media-query/index.js +1 -1
- package/utils/popups/index.d.ts +1 -0
- package/utils/popups/index.js +11 -0
- package/utils/popups/inlineRect.d.ts +15 -0
- package/utils/popups/inlineRect.js +198 -0
- package/utils/popups/popupStoreUtils.d.ts +28 -10
- package/utils/popups/popupStoreUtils.js +110 -20
- package/utils/popups/popupTriggerMap.js +2 -0
- package/utils/popups/store.d.ts +15 -2
- package/utils/popups/store.js +39 -2
- package/utils/popups/useTriggerFocusGuards.js +4 -5
- package/utils/useAnchorPositioning.d.ts +5 -0
- package/utils/useAnchorPositioning.js +12 -9
- package/utils/useOpenInteractionType.d.ts +4 -0
- package/utils/useOpenInteractionType.js +24 -17
- package/checkbox-group/index.parts.d.ts +0 -1
- package/checkbox-group/index.parts.js +0 -12
- package/esm/checkbox-group/index.parts.d.ts +0 -1
- package/esm/checkbox-group/index.parts.js +0 -1
- package/esm/floating-ui-react/hooks/useInteractions.d.ts +0 -20
- package/esm/floating-ui-react/hooks/useInteractions.js +0 -88
- package/esm/floating-ui-react/hooks/useRole.d.ts +0 -17
- package/esm/floating-ui-react/hooks/useRole.js +0 -113
- package/floating-ui-react/hooks/useInteractions.d.ts +0 -20
- package/floating-ui-react/hooks/useInteractions.js +0 -95
- package/floating-ui-react/hooks/useRole.d.ts +0 -17
- package/floating-ui-react/hooks/useRole.js +0 -120
- /package/{csp-provider → esm/internals/csp-context}/CSPContext.d.ts +0 -0
- /package/esm/{csp-provider → internals/csp-context}/CSPContext.js +0 -0
- /package/{esm/csp-provider → internals/csp-context}/CSPContext.d.ts +0 -0
- /package/{csp-provider → internals/csp-context}/CSPContext.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,127 @@
|
|
|
1
1
|
# Versions
|
|
2
2
|
|
|
3
|
+
## v1.5.0
|
|
4
|
+
|
|
5
|
+
_May 19, 2026_
|
|
6
|
+
|
|
7
|
+
### General changes
|
|
8
|
+
|
|
9
|
+
- Use local document for virtual arrow (#4662) by @lyzno1
|
|
10
|
+
- Fix macOS Safari and Firefox minimizing fullscreen when closing popups with <kbd>Esc</kbd> (#4695) by @arturbien
|
|
11
|
+
- Drop unnecessary memoization (#4693) by @flaviendelangle
|
|
12
|
+
- Do not use `Math.random()` in `useStableCallback()` (#4732) by @michaldudak
|
|
13
|
+
- Fix return focus when reference disconnects (#4655) by @atomiks
|
|
14
|
+
- Improve mount performance with interaction splitting (#4661) by @atomiks
|
|
15
|
+
- Don't steal initial focus if focus already moved inside a popup (#4775) by @stefee
|
|
16
|
+
|
|
17
|
+
### Alert Dialog
|
|
18
|
+
|
|
19
|
+
- Fix handle defaults (#4834) by @atomiks
|
|
20
|
+
|
|
21
|
+
### Autocomplete
|
|
22
|
+
|
|
23
|
+
- Fix native `FormData` for popup inputs (#4725) by @lunaxislu
|
|
24
|
+
|
|
25
|
+
### Checkbox
|
|
26
|
+
|
|
27
|
+
- Submit the associated form when pressing <kbd>Enter</kbd> (#4713) by @michaldudak
|
|
28
|
+
|
|
29
|
+
### Combobox
|
|
30
|
+
|
|
31
|
+
- Expose clear visibility state (#4664) by @atomiks
|
|
32
|
+
- Fix popup input form submit (#4687) by @atomiks
|
|
33
|
+
- Preserve `closeQuery` when closing multiple input-inside-popup combobox (#4715) by @mj12albert
|
|
34
|
+
- Fix RTL component behavior (#4840) by @atomiks
|
|
35
|
+
- Ignore hidden-input changes while readonly or disabled (#4810) by @lunaxislu
|
|
36
|
+
|
|
37
|
+
### Dialog
|
|
38
|
+
|
|
39
|
+
- Consider the controlled `open` prop for open state detection (#4712) by @michaldudak
|
|
40
|
+
|
|
41
|
+
### Drawer
|
|
42
|
+
|
|
43
|
+
- Forward `style` prop in `<Drawer.Viewport>` (#4841) by @atomiks
|
|
44
|
+
|
|
45
|
+
### Field
|
|
46
|
+
|
|
47
|
+
- Avoid `flushSync` during validation (#4685) by @atomiks
|
|
48
|
+
|
|
49
|
+
### Form
|
|
50
|
+
|
|
51
|
+
- Avoid `flushSync` during validation (#4685) by @atomiks
|
|
52
|
+
|
|
53
|
+
### Menu
|
|
54
|
+
|
|
55
|
+
- Fix submenu pointer-events scope for `keepMounted` portals (#4723) by @twillhorn
|
|
56
|
+
- Support `<Menu.GroupLabel>` in `<Menu.RadioGroup>` (#4826) by @nami8824
|
|
57
|
+
- Consider the controlled `open` prop for open state detection (#4712) by @michaldudak
|
|
58
|
+
|
|
59
|
+
### Navigation Menu
|
|
60
|
+
|
|
61
|
+
- Fix RTL component behavior (#4840) by @atomiks
|
|
62
|
+
- Fix `keepMounted` content sizing (#4817) by @atomiks
|
|
63
|
+
|
|
64
|
+
### Number Field
|
|
65
|
+
|
|
66
|
+
- Allow Persian digits in keyboard input (#4719) by @lunaxislu
|
|
67
|
+
- Sync pasted input during step interactions (#4824) by @lunaxislu
|
|
68
|
+
|
|
69
|
+
### OTP Field
|
|
70
|
+
|
|
71
|
+
- **Breaking change:** Rename `sanitizeValue()` to `normalizeValue()` and allow composing with validation (#4717) by @atomiks
|
|
72
|
+
- Avoid `flushSync` during validation (#4685) by @atomiks
|
|
73
|
+
- Support <kbd>Ctrl</kbd> and <kbd>Cmd</kbd> shortcuts (#4606) by @atomiks
|
|
74
|
+
- Fire `onValueComplete()` for full paste (#4690) by @atomiks
|
|
75
|
+
- Fix vertical arrow slot navigation (#4844) by @atomiks
|
|
76
|
+
- Ignore hidden input changes while readonly or disabled (#4806) by @lunaxislu
|
|
77
|
+
- Prevent locked hidden autofill validation (#4827) by @lunaxislu
|
|
78
|
+
- Fix RTL arrow navigation (#4847) by @atomiks
|
|
79
|
+
|
|
80
|
+
### Popover
|
|
81
|
+
|
|
82
|
+
- Fix RTL component behavior (#4840) by @atomiks
|
|
83
|
+
- Preserve active trigger on close press (#4741) by @mj12albert
|
|
84
|
+
- Consider the controlled `open` prop for open state detection (#4712) by @michaldudak
|
|
85
|
+
|
|
86
|
+
### Preview Card
|
|
87
|
+
|
|
88
|
+
- Consider the controlled `open` prop for open state detection (#4712) by @michaldudak
|
|
89
|
+
- Integrate inline positioning (#2074) by @atomiks
|
|
90
|
+
|
|
91
|
+
### Scroll Area
|
|
92
|
+
|
|
93
|
+
- Fix RTL component behavior (#4840) by @atomiks
|
|
94
|
+
|
|
95
|
+
### Select
|
|
96
|
+
|
|
97
|
+
- Clear stale item text ref (#4683) by @atomiks
|
|
98
|
+
- Add `data-popup-side` to trigger (#4671) by @mj12albert
|
|
99
|
+
- Allow mouse selection without highlight (#4699) by @atomiks
|
|
100
|
+
- Ignore hidden-input changes while readonly or disabled (#4810) by @lunaxislu
|
|
101
|
+
- Fix nested Select requiring extra outside clicks to dismiss parent (#4820) by @mattrothenberg
|
|
102
|
+
|
|
103
|
+
### Tabs
|
|
104
|
+
|
|
105
|
+
- Fire `onValueChange()` for automatic tab selection (#4704) by @michaldudak
|
|
106
|
+
|
|
107
|
+
### Toast
|
|
108
|
+
|
|
109
|
+
- Re-use `getElementTransform()` and remove local implementation (#4749) by @sai6855
|
|
110
|
+
- Fix stuck drag state on release (#4742) by @aeterno-caspian
|
|
111
|
+
- Remove memoized selector (#4751) by @atomiks
|
|
112
|
+
|
|
113
|
+
### Tooltip
|
|
114
|
+
|
|
115
|
+
- Consider the controlled `open` prop for open state detection (#4712) by @michaldudak
|
|
116
|
+
- Fix flickering when nesting tooltip inside another tooltip's trigger (#4501) by @michaldudak
|
|
117
|
+
|
|
118
|
+
All contributors of this release in alphabetical order: @aeterno-caspian, @arturbien, @atomiks, @flaviendelangle, @Janpot, @lunaxislu, @lyzno1, @mattrothenberg, @michaldudak, @mj12albert, @nami8824, @sai6855, @stefee, @twillhorn
|
|
119
|
+
|
|
3
120
|
## v1.4.1
|
|
4
121
|
|
|
5
122
|
_Apr 20, 2026_
|
|
6
123
|
|
|
7
|
-
### General
|
|
124
|
+
### General changes
|
|
8
125
|
|
|
9
126
|
- Clear highlight on pointer leave when item is clipped by scroll container (#4604) by @atomiks
|
|
10
127
|
- Fix `display: contents` tabbability (#4642) by @atomiks
|
|
@@ -15,13 +132,13 @@ _Apr 20, 2026_
|
|
|
15
132
|
|
|
16
133
|
- Fix stale popup size on rapid trigger hover (#4646) by @atomiks
|
|
17
134
|
|
|
18
|
-
All contributors of this release in alphabetical order
|
|
135
|
+
All contributors of this release in alphabetical order: @atomiks, @LukasTy
|
|
19
136
|
|
|
20
137
|
## v1.4.0
|
|
21
138
|
|
|
22
139
|
_Apr 13, 2026_
|
|
23
140
|
|
|
24
|
-
### General
|
|
141
|
+
### General changes
|
|
25
142
|
|
|
26
143
|
- Improve `render` prop warning accuracy (#4324, #4363) by @atomiks
|
|
27
144
|
- Fix `preventBaseUIHandler` runtime wrapping (#4330) by @atomiks
|
|
@@ -146,13 +263,13 @@ _Apr 13, 2026_
|
|
|
146
263
|
|
|
147
264
|
- Fix incorrect keyboard nav on cross axis (#4488) by @mj12albert
|
|
148
265
|
|
|
149
|
-
All contributors of this release in alphabetical order
|
|
266
|
+
All contributors of this release in alphabetical order: @arturbien, @atomiks, @CiscoFran10, @devxoul, @flaviendelangle, @kyrregjerstad, @LukasTy, @lunaxislu, @mattrothenberg, @mdm317, @michaldudak, @mj12albert, @Profesor08, @ryanrhee, @sai6855, @tsbehlman
|
|
150
267
|
|
|
151
268
|
## v1.3.0
|
|
152
269
|
|
|
153
270
|
_Mar 12, 2026_
|
|
154
271
|
|
|
155
|
-
### General
|
|
272
|
+
### General changes
|
|
156
273
|
|
|
157
274
|
- Warn when a component function is rendered directly (#4077) by @atomiks
|
|
158
275
|
- Reset `openMethod` after close transition (#4128) by @atomiks
|
|
@@ -293,7 +410,7 @@ _Mar 12, 2026_
|
|
|
293
410
|
|
|
294
411
|
- Add `closeOnClick` prop (#4140) by @atomiks
|
|
295
412
|
|
|
296
|
-
All contributors of this release in alphabetical order
|
|
413
|
+
All contributors of this release in alphabetical order: @aarongarciah, @atomiks, @cgatian, @chuganzy, @CiscoFran10, @dmitri-gb, @flaviendelangle, @jijiseong, @michaldudak, @mj12albert, @obeattie, @vcode-sh
|
|
297
414
|
|
|
298
415
|
## v1.2.0
|
|
299
416
|
|
|
@@ -466,7 +583,7 @@ _Feb 12, 2026_
|
|
|
466
583
|
- Fix broken scale transition with detached triggers (#3810) by @michaldudak
|
|
467
584
|
- Fix disabled prop on Triggers (#4049) by @michaldudak
|
|
468
585
|
|
|
469
|
-
All contributors of this release in alphabetical order
|
|
586
|
+
All contributors of this release in alphabetical order: @antonfrolovsky, @arturbien, @atomiks, @CiscoFran10, @CrawlerCode, @flaviendelangle, @guisehn, @jijiseong, @LukasTy, @markocupic024, @mattrothenberg, @mdm317, @michaelhazan, @michaldudak, @mj12albert, @obeattie, @OliverSpeir, @oliviertassinari, @sai6855, @sarthakmalik0810, @solastley, @ZeeshanTamboli
|
|
470
587
|
|
|
471
588
|
## v1.1.0
|
|
472
589
|
|
|
@@ -2099,7 +2216,7 @@ _Mar 20, 2025_
|
|
|
2099
2216
|
- Mention Progress.Value in API reference (#1429) @aarongarciah
|
|
2100
2217
|
- Update release instructions (#1417) @michaldudak
|
|
2101
2218
|
|
|
2102
|
-
###
|
|
2219
|
+
### Internal
|
|
2103
2220
|
|
|
2104
2221
|
- [code-infra] Polish VS Code DX (#1238) @oliviertassinari
|
|
2105
2222
|
- [code-infra] Fix build:types not copying on some setups (#1482) @Janpot
|
package/README.md
CHANGED
|
@@ -12,6 +12,10 @@ import { REASONS } from "../../internals/reasons.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
14
|
export interface AccordionItemState extends AccordionRootState {
|
|
15
|
+
/**
|
|
16
|
+
* Whether the accordion item's panel is currently hidden.
|
|
17
|
+
*/
|
|
18
|
+
hidden: boolean;
|
|
15
19
|
/**
|
|
16
20
|
* The item index.
|
|
17
21
|
*/
|
|
@@ -74,9 +74,8 @@ const AccordionItem = exports.AccordionItem = /*#__PURE__*/React.forwardRef(func
|
|
|
74
74
|
const collapsibleState = React.useMemo(() => ({
|
|
75
75
|
open: collapsible.open,
|
|
76
76
|
disabled: collapsible.disabled,
|
|
77
|
-
hidden: !collapsible.mounted,
|
|
78
77
|
transitionStatus: collapsible.transitionStatus
|
|
79
|
-
}), [collapsible.open, collapsible.disabled, collapsible.
|
|
78
|
+
}), [collapsible.open, collapsible.disabled, collapsible.transitionStatus]);
|
|
80
79
|
const collapsibleContext = React.useMemo(() => ({
|
|
81
80
|
...collapsible,
|
|
82
81
|
onOpenChange,
|
|
@@ -84,11 +83,13 @@ const AccordionItem = exports.AccordionItem = /*#__PURE__*/React.forwardRef(func
|
|
|
84
83
|
}), [collapsible, collapsibleState, onOpenChange]);
|
|
85
84
|
const state = React.useMemo(() => ({
|
|
86
85
|
...rootState,
|
|
86
|
+
hidden: !isOpen && !collapsible.mounted,
|
|
87
87
|
index,
|
|
88
88
|
disabled,
|
|
89
89
|
open: isOpen
|
|
90
|
-
}), [disabled, index, isOpen, rootState]);
|
|
91
|
-
const
|
|
90
|
+
}), [collapsible.mounted, disabled, index, isOpen, rootState]);
|
|
91
|
+
const defaultTriggerId = (0, _useBaseUiId.useBaseUiId)();
|
|
92
|
+
const [triggerId, setTriggerId] = React.useState(defaultTriggerId);
|
|
92
93
|
const accordionItemContext = React.useMemo(() => ({
|
|
93
94
|
open: isOpen,
|
|
94
95
|
state,
|
|
@@ -9,13 +9,13 @@ exports.AccordionPanel = void 0;
|
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _useIsoLayoutEffect = require("@base-ui/utils/useIsoLayoutEffect");
|
|
11
11
|
var _warn = require("@base-ui/utils/warn");
|
|
12
|
+
var _resolveStyle = require("../../utils/resolveStyle");
|
|
12
13
|
var _CollapsibleRootContext = require("../../collapsible/root/CollapsibleRootContext");
|
|
13
14
|
var _useCollapsiblePanel = require("../../collapsible/panel/useCollapsiblePanel");
|
|
14
15
|
var _AccordionRootContext = require("../root/AccordionRootContext");
|
|
15
16
|
var _AccordionItemContext = require("../item/AccordionItemContext");
|
|
16
17
|
var _stateAttributesMapping = require("../item/stateAttributesMapping");
|
|
17
18
|
var _AccordionPanelCssVars = require("./AccordionPanelCssVars");
|
|
18
|
-
var _useOpenChangeComplete = require("../../internals/useOpenChangeComplete");
|
|
19
19
|
var _useRenderElement = require("../../internals/useRenderElement");
|
|
20
20
|
/**
|
|
21
21
|
* A collapsible panel with the accordion item contents.
|
|
@@ -38,24 +38,12 @@ const AccordionPanel = exports.AccordionPanel = /*#__PURE__*/React.forwardRef(fu
|
|
|
38
38
|
keepMounted: contextKeepMounted
|
|
39
39
|
} = (0, _AccordionRootContext.useAccordionRootContext)();
|
|
40
40
|
const {
|
|
41
|
-
abortControllerRef,
|
|
42
|
-
animationTypeRef,
|
|
43
|
-
height,
|
|
44
41
|
mounted,
|
|
45
42
|
onOpenChange,
|
|
46
43
|
open,
|
|
47
44
|
panelId,
|
|
48
|
-
panelRef,
|
|
49
|
-
runOnceAnimationsFinish,
|
|
50
|
-
setDimensions,
|
|
51
|
-
setHiddenUntilFound,
|
|
52
|
-
setKeepMounted,
|
|
53
45
|
setMounted,
|
|
54
46
|
setOpen,
|
|
55
|
-
setVisible,
|
|
56
|
-
transitionDimensionRef,
|
|
57
|
-
visible,
|
|
58
|
-
width,
|
|
59
47
|
setPanelIdState,
|
|
60
48
|
transitionStatus
|
|
61
49
|
} = (0, _CollapsibleRootContext.useCollapsibleRootContext)();
|
|
@@ -65,7 +53,7 @@ const AccordionPanel = exports.AccordionPanel = /*#__PURE__*/React.forwardRef(fu
|
|
|
65
53
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
66
54
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
67
55
|
if (keepMountedProp === false && hiddenUntilFound) {
|
|
68
|
-
(0, _warn.warn)('The `keepMounted={false}` prop on
|
|
56
|
+
(0, _warn.warn)('The `keepMounted={false}` prop on an `Accordion.Panel` is ignored when `hiddenUntilFound` is enabled on the panel or root, since the panel must remain mounted while closed.');
|
|
69
57
|
}
|
|
70
58
|
}, [hiddenUntilFound, keepMountedProp]);
|
|
71
59
|
}
|
|
@@ -78,59 +66,41 @@ const AccordionPanel = exports.AccordionPanel = /*#__PURE__*/React.forwardRef(fu
|
|
|
78
66
|
}
|
|
79
67
|
return undefined;
|
|
80
68
|
}, [idProp, setPanelIdState]);
|
|
81
|
-
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
82
|
-
setHiddenUntilFound(hiddenUntilFound);
|
|
83
|
-
}, [setHiddenUntilFound, hiddenUntilFound]);
|
|
84
|
-
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
85
|
-
setKeepMounted(keepMounted);
|
|
86
|
-
}, [setKeepMounted, keepMounted]);
|
|
87
|
-
(0, _useOpenChangeComplete.useOpenChangeComplete)({
|
|
88
|
-
open: open && transitionStatus === 'idle',
|
|
89
|
-
ref: panelRef,
|
|
90
|
-
onComplete() {
|
|
91
|
-
if (!open) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
setDimensions({
|
|
95
|
-
width: undefined,
|
|
96
|
-
height: undefined
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
69
|
const {
|
|
101
|
-
|
|
70
|
+
height,
|
|
71
|
+
props,
|
|
72
|
+
ref,
|
|
73
|
+
shouldPreventOpenAnimation,
|
|
74
|
+
shouldRender,
|
|
75
|
+
transitionStatus: panelTransitionStatus,
|
|
76
|
+
width
|
|
102
77
|
} = (0, _useCollapsiblePanel.useCollapsiblePanel)({
|
|
103
|
-
abortControllerRef,
|
|
104
|
-
animationTypeRef,
|
|
105
78
|
externalRef: forwardedRef,
|
|
106
|
-
height,
|
|
107
79
|
hiddenUntilFound,
|
|
108
80
|
id: idProp ?? panelId,
|
|
109
81
|
keepMounted,
|
|
110
82
|
mounted,
|
|
111
83
|
onOpenChange,
|
|
112
84
|
open,
|
|
113
|
-
panelRef,
|
|
114
|
-
runOnceAnimationsFinish,
|
|
115
|
-
setDimensions,
|
|
116
85
|
setMounted,
|
|
117
86
|
setOpen,
|
|
118
|
-
|
|
119
|
-
transitionDimensionRef,
|
|
120
|
-
visible,
|
|
121
|
-
width
|
|
87
|
+
transitionStatus
|
|
122
88
|
});
|
|
123
89
|
const {
|
|
124
90
|
state,
|
|
125
91
|
triggerId
|
|
126
92
|
} = (0, _AccordionItemContext.useAccordionItemContext)();
|
|
127
|
-
const panelState =
|
|
93
|
+
const panelState = {
|
|
128
94
|
...state,
|
|
129
|
-
transitionStatus
|
|
130
|
-
}
|
|
131
|
-
const
|
|
95
|
+
transitionStatus: panelTransitionStatus
|
|
96
|
+
};
|
|
97
|
+
const resolvedStyle = (0, _resolveStyle.resolveStyle)(style, panelState);
|
|
98
|
+
const element = (0, _useRenderElement.useRenderElement)('div', {
|
|
99
|
+
...componentProps,
|
|
100
|
+
style: undefined
|
|
101
|
+
}, {
|
|
132
102
|
state: panelState,
|
|
133
|
-
ref
|
|
103
|
+
ref,
|
|
134
104
|
props: [props, {
|
|
135
105
|
'aria-labelledby': triggerId,
|
|
136
106
|
role: 'region',
|
|
@@ -138,10 +108,18 @@ const AccordionPanel = exports.AccordionPanel = /*#__PURE__*/React.forwardRef(fu
|
|
|
138
108
|
[_AccordionPanelCssVars.AccordionPanelCssVars.accordionPanelHeight]: height === undefined ? 'auto' : `${height}px`,
|
|
139
109
|
[_AccordionPanelCssVars.AccordionPanelCssVars.accordionPanelWidth]: width === undefined ? 'auto' : `${width}px`
|
|
140
110
|
}
|
|
141
|
-
}, elementProps
|
|
111
|
+
}, elementProps, resolvedStyle ? {
|
|
112
|
+
style: resolvedStyle
|
|
113
|
+
} : undefined,
|
|
114
|
+
// Resolve the public `style` prop so temporary `animationName: 'none'`
|
|
115
|
+
// can still win after user's inline styles have been merged.
|
|
116
|
+
shouldPreventOpenAnimation ? {
|
|
117
|
+
style: {
|
|
118
|
+
animationName: 'none'
|
|
119
|
+
}
|
|
120
|
+
} : undefined],
|
|
142
121
|
stateAttributesMapping: _stateAttributesMapping.accordionStateAttributesMapping
|
|
143
122
|
});
|
|
144
|
-
const shouldRender = keepMounted || hiddenUntilFound || mounted;
|
|
145
123
|
if (!shouldRender) {
|
|
146
124
|
return null;
|
|
147
125
|
}
|
|
@@ -36,7 +36,7 @@ const AccordionRoot = exports.AccordionRoot = /*#__PURE__*/React.forwardRef(func
|
|
|
36
36
|
hiddenUntilFound: hiddenUntilFoundProp,
|
|
37
37
|
keepMounted: keepMountedProp,
|
|
38
38
|
loopFocus = true,
|
|
39
|
-
onValueChange
|
|
39
|
+
onValueChange,
|
|
40
40
|
multiple = false,
|
|
41
41
|
orientation = 'vertical',
|
|
42
42
|
value: valueProp,
|
|
@@ -49,7 +49,7 @@ const AccordionRoot = exports.AccordionRoot = /*#__PURE__*/React.forwardRef(func
|
|
|
49
49
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
50
50
|
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
51
51
|
if (hiddenUntilFoundProp && keepMountedProp === false) {
|
|
52
|
-
(0, _warn.warn)('The `keepMounted={false}` prop on
|
|
52
|
+
(0, _warn.warn)('The `keepMounted={false}` prop on `Accordion.Root` is ignored when `hiddenUntilFound` is enabled, since panels must remain mounted while closed.');
|
|
53
53
|
}
|
|
54
54
|
}, [hiddenUntilFoundProp, keepMountedProp]);
|
|
55
55
|
}
|
|
@@ -62,7 +62,6 @@ const AccordionRoot = exports.AccordionRoot = /*#__PURE__*/React.forwardRef(func
|
|
|
62
62
|
}
|
|
63
63
|
return undefined;
|
|
64
64
|
}, [valueProp, defaultValueProp]);
|
|
65
|
-
const onValueChange = (0, _useStableCallback.useStableCallback)(onValueChangeProp);
|
|
66
65
|
const accordionItemRefs = React.useRef([]);
|
|
67
66
|
const [value, setValue] = (0, _useControlled.useControlled)({
|
|
68
67
|
controlled: valueProp,
|
|
@@ -74,7 +73,7 @@ const AccordionRoot = exports.AccordionRoot = /*#__PURE__*/React.forwardRef(func
|
|
|
74
73
|
const details = (0, _createBaseUIEventDetails.createChangeEventDetails)(_reasons.REASONS.none);
|
|
75
74
|
if (!multiple) {
|
|
76
75
|
const nextValue = value[0] === newValue ? [] : [newValue];
|
|
77
|
-
onValueChange(nextValue, details);
|
|
76
|
+
onValueChange?.(nextValue, details);
|
|
78
77
|
if (details.isCanceled) {
|
|
79
78
|
return;
|
|
80
79
|
}
|
|
@@ -82,14 +81,14 @@ const AccordionRoot = exports.AccordionRoot = /*#__PURE__*/React.forwardRef(func
|
|
|
82
81
|
} else if (nextOpen) {
|
|
83
82
|
const nextOpenValues = value.slice();
|
|
84
83
|
nextOpenValues.push(newValue);
|
|
85
|
-
onValueChange(nextOpenValues, details);
|
|
84
|
+
onValueChange?.(nextOpenValues, details);
|
|
86
85
|
if (details.isCanceled) {
|
|
87
86
|
return;
|
|
88
87
|
}
|
|
89
88
|
setValue(nextOpenValues);
|
|
90
89
|
} else {
|
|
91
90
|
const nextOpenValues = value.filter(v => v !== newValue);
|
|
92
|
-
onValueChange(nextOpenValues, details);
|
|
91
|
+
onValueChange?.(nextOpenValues, details);
|
|
93
92
|
if (details.isCanceled) {
|
|
94
93
|
return;
|
|
95
94
|
}
|
|
@@ -16,7 +16,6 @@ var _composite = require("../../internals/composite/composite");
|
|
|
16
16
|
var _AccordionRootContext = require("../root/AccordionRootContext");
|
|
17
17
|
var _AccordionItemContext = require("../item/AccordionItemContext");
|
|
18
18
|
var _useRenderElement = require("../../internals/useRenderElement");
|
|
19
|
-
const SUPPORTED_KEYS = new Set([_composite.ARROW_DOWN, _composite.ARROW_UP, _composite.ARROW_RIGHT, _composite.ARROW_LEFT, _composite.HOME, _composite.END]);
|
|
20
19
|
function getActiveTriggers(accordionItemRefs) {
|
|
21
20
|
const {
|
|
22
21
|
current: accordionItemElements
|
|
@@ -88,14 +87,14 @@ const AccordionTrigger = exports.AccordionTrigger = /*#__PURE__*/React.forwardRe
|
|
|
88
87
|
setTriggerId(undefined);
|
|
89
88
|
};
|
|
90
89
|
}, [idProp, setTriggerId]);
|
|
91
|
-
const props =
|
|
90
|
+
const props = {
|
|
92
91
|
'aria-controls': open ? panelId : undefined,
|
|
93
92
|
'aria-expanded': open,
|
|
94
93
|
id,
|
|
95
94
|
tabIndex: 0,
|
|
96
95
|
onClick: handleTrigger,
|
|
97
96
|
onKeyDown(event) {
|
|
98
|
-
if (!
|
|
97
|
+
if (!_composite.COMPOSITE_KEYS.has(event.key)) {
|
|
99
98
|
return;
|
|
100
99
|
}
|
|
101
100
|
(0, _composite.stopEvent)(event);
|
|
@@ -160,7 +159,7 @@ const AccordionTrigger = exports.AccordionTrigger = /*#__PURE__*/React.forwardRe
|
|
|
160
159
|
triggers[nextIndex].focus();
|
|
161
160
|
}
|
|
162
161
|
}
|
|
163
|
-
}
|
|
162
|
+
};
|
|
164
163
|
const element = (0, _useRenderElement.useRenderElement)('button', componentProps, {
|
|
165
164
|
state,
|
|
166
165
|
ref: [forwardedRef, buttonRef],
|
package/alert-dialog/handle.d.ts
CHANGED
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
import { DialogHandle } from "../dialog/store/DialogHandle.js";
|
|
2
|
-
|
|
2
|
+
import { DialogStore } from "../dialog/store/DialogStore.js";
|
|
3
|
+
export declare const alertDialogState: {
|
|
4
|
+
readonly modal: true;
|
|
5
|
+
readonly disablePointerDismissal: true;
|
|
6
|
+
readonly role: "alertdialog";
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A handle to control an Alert Dialog imperatively and to associate detached triggers with it.
|
|
10
|
+
*/
|
|
11
|
+
export declare class AlertDialogHandle<Payload> extends DialogHandle<Payload> {
|
|
12
|
+
private readonly __alertDialogBrand;
|
|
13
|
+
constructor(store?: DialogStore<Payload>);
|
|
14
|
+
}
|
|
15
|
+
export declare function createAlertDialogHandle<Payload>(): AlertDialogHandle<Payload>;
|
package/alert-dialog/handle.js
CHANGED
|
@@ -3,13 +3,30 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.alertDialogState = exports.AlertDialogHandle = void 0;
|
|
6
7
|
exports.createAlertDialogHandle = createAlertDialogHandle;
|
|
7
8
|
var _DialogHandle = require("../dialog/store/DialogHandle");
|
|
8
9
|
var _DialogStore = require("../dialog/store/DialogStore");
|
|
10
|
+
const alertDialogState = exports.alertDialogState = {
|
|
11
|
+
modal: true,
|
|
12
|
+
disablePointerDismissal: true,
|
|
13
|
+
role: 'alertdialog'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A handle to control an Alert Dialog imperatively and to associate detached triggers with it.
|
|
18
|
+
*/
|
|
19
|
+
class AlertDialogHandle extends _DialogHandle.DialogHandle {
|
|
20
|
+
constructor(store) {
|
|
21
|
+
const alertDialogStore = store ?? new _DialogStore.DialogStore(alertDialogState);
|
|
22
|
+
super(alertDialogStore);
|
|
23
|
+
if (store) {
|
|
24
|
+
// Supplied stores may have been created as plain dialogs; enforce alert-dialog state.
|
|
25
|
+
this.store.update(alertDialogState);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.AlertDialogHandle = AlertDialogHandle;
|
|
9
30
|
function createAlertDialogHandle() {
|
|
10
|
-
return new
|
|
11
|
-
modal: true,
|
|
12
|
-
disablePointerDismissal: true,
|
|
13
|
-
role: 'alertdialog'
|
|
14
|
-
}));
|
|
31
|
+
return new AlertDialogHandle();
|
|
15
32
|
}
|
package/alert-dialog/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export type { DialogDescriptionProps as AlertDialogDescriptionProps, DialogDescr
|
|
|
6
6
|
export type { DialogPopupProps as AlertDialogPopupProps, DialogPopupState as AlertDialogPopupState } from "../dialog/popup/DialogPopup.js";
|
|
7
7
|
export type { DialogPortalProps as AlertDialogPortalProps, DialogPortalState as AlertDialogPortalState } from "../dialog/portal/DialogPortal.js";
|
|
8
8
|
export type { DialogTitleProps as AlertDialogTitleProps, DialogTitleState as AlertDialogTitleState } from "../dialog/title/DialogTitle.js";
|
|
9
|
-
export type
|
|
9
|
+
export type * from "./trigger/AlertDialogTrigger.js";
|
|
10
10
|
export type { DialogViewportProps as AlertDialogViewportProps, DialogViewportState as AlertDialogViewportState } from "../dialog/viewport/DialogViewport.js";
|
|
@@ -5,7 +5,6 @@ export { DialogDescription as Description } from "../dialog/description/DialogDe
|
|
|
5
5
|
export { DialogPopup as Popup } from "../dialog/popup/DialogPopup.js";
|
|
6
6
|
export { DialogPortal as Portal } from "../dialog/portal/DialogPortal.js";
|
|
7
7
|
export { DialogTitle as Title } from "../dialog/title/DialogTitle.js";
|
|
8
|
-
export {
|
|
8
|
+
export { AlertDialogTrigger as Trigger } from "./trigger/AlertDialogTrigger.js";
|
|
9
9
|
export { DialogViewport as Viewport } from "../dialog/viewport/DialogViewport.js";
|
|
10
|
-
export { createAlertDialogHandle as createHandle } from "./handle.js";
|
|
11
|
-
export { DialogHandle as Handle } from "../dialog/store/DialogHandle.js";
|
|
10
|
+
export { AlertDialogHandle as Handle, createAlertDialogHandle as createHandle } from "./handle.js";
|
|
@@ -24,7 +24,7 @@ Object.defineProperty(exports, "Description", {
|
|
|
24
24
|
Object.defineProperty(exports, "Handle", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function () {
|
|
27
|
-
return
|
|
27
|
+
return _handle.AlertDialogHandle;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "Popup", {
|
|
@@ -54,7 +54,7 @@ Object.defineProperty(exports, "Title", {
|
|
|
54
54
|
Object.defineProperty(exports, "Trigger", {
|
|
55
55
|
enumerable: true,
|
|
56
56
|
get: function () {
|
|
57
|
-
return
|
|
57
|
+
return _AlertDialogTrigger.AlertDialogTrigger;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "Viewport", {
|
|
@@ -76,7 +76,6 @@ var _DialogDescription = require("../dialog/description/DialogDescription");
|
|
|
76
76
|
var _DialogPopup = require("../dialog/popup/DialogPopup");
|
|
77
77
|
var _DialogPortal = require("../dialog/portal/DialogPortal");
|
|
78
78
|
var _DialogTitle = require("../dialog/title/DialogTitle");
|
|
79
|
-
var
|
|
79
|
+
var _AlertDialogTrigger = require("./trigger/AlertDialogTrigger");
|
|
80
80
|
var _DialogViewport = require("../dialog/viewport/DialogViewport");
|
|
81
|
-
var _handle = require("./handle");
|
|
82
|
-
var _DialogHandle = require("../dialog/store/DialogHandle");
|
|
81
|
+
var _handle = require("./handle");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseUIChangeEventDetails } from "../../internals/createBaseUIEventDetails.js";
|
|
3
|
-
import { DialogHandle } from "../../dialog/store/DialogHandle.js";
|
|
4
3
|
import type { DialogRoot } from "../../dialog/root/DialogRoot.js";
|
|
4
|
+
import type { AlertDialogHandle } from "../handle.js";
|
|
5
5
|
/**
|
|
6
6
|
* Groups all parts of the alert dialog.
|
|
7
7
|
* Doesn't render its own HTML element.
|
|
@@ -12,15 +12,15 @@ export declare function AlertDialogRoot<Payload>(props: AlertDialogRoot.Props<Pa
|
|
|
12
12
|
export interface AlertDialogRootState {}
|
|
13
13
|
export interface AlertDialogRootProps<Payload = unknown> extends Omit<DialogRoot.Props<Payload>, 'modal' | 'disablePointerDismissal' | 'onOpenChange' | 'actionsRef' | 'handle'> {
|
|
14
14
|
/**
|
|
15
|
-
* Event handler called when the dialog is opened or closed.
|
|
15
|
+
* Event handler called when the alert dialog is opened or closed.
|
|
16
16
|
*/
|
|
17
17
|
onOpenChange?: ((open: boolean, eventDetails: AlertDialogRoot.ChangeEventDetails) => void) | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* A ref to imperative actions.
|
|
20
|
-
* - `unmount`: When specified, the dialog will not be unmounted when closed.
|
|
21
|
-
* Instead, the `unmount` function must be called to unmount the dialog manually.
|
|
22
|
-
* Useful when the dialog's animation is controlled by an external library.
|
|
23
|
-
* - `close`: Closes the dialog imperatively when called.
|
|
20
|
+
* - `unmount`: When specified, the alert dialog will not be unmounted when closed.
|
|
21
|
+
* Instead, the `unmount` function must be called to unmount the alert dialog manually.
|
|
22
|
+
* Useful when the alert dialog's animation is controlled by an external library.
|
|
23
|
+
* - `close`: Closes the alert dialog imperatively when called.
|
|
24
24
|
*/
|
|
25
25
|
actionsRef?: React.RefObject<AlertDialogRoot.Actions | null> | undefined;
|
|
26
26
|
/**
|
|
@@ -28,7 +28,7 @@ export interface AlertDialogRootProps<Payload = unknown> extends Omit<DialogRoot
|
|
|
28
28
|
* If specified, allows external triggers to control the alert dialog's open state.
|
|
29
29
|
* Can be created with the AlertDialog.createHandle() method.
|
|
30
30
|
*/
|
|
31
|
-
handle?:
|
|
31
|
+
handle?: AlertDialogHandle<Payload> | undefined;
|
|
32
32
|
}
|
|
33
33
|
export type AlertDialogRootActions = DialogRoot.Actions;
|
|
34
34
|
export type AlertDialogRootChangeEventReason = DialogRoot.ChangeEventReason;
|