@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
|
@@ -5,6 +5,7 @@ import { useStableCallback } from '@base-ui/utils/useStableCallback';
|
|
|
5
5
|
import { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';
|
|
6
6
|
import { useMergedRefs } from '@base-ui/utils/useMergedRefs';
|
|
7
7
|
import { visuallyHidden } from '@base-ui/utils/visuallyHidden';
|
|
8
|
+
import { ownerWindow } from '@base-ui/utils/owner';
|
|
8
9
|
import { clamp } from "../../internals/clamp.js";
|
|
9
10
|
import { formatNumber } from "../../utils/formatNumber.js";
|
|
10
11
|
import { mergeProps } from "../../merge-props/index.js";
|
|
@@ -15,7 +16,7 @@ import { valueToPercent } from "../../utils/valueToPercent.js";
|
|
|
15
16
|
import { ARROW_DOWN, ARROW_UP, ARROW_RIGHT, ARROW_LEFT, HOME, END, COMPOSITE_KEYS, PAGE_UP, PAGE_DOWN } from "../../internals/composite/composite.js";
|
|
16
17
|
import { useCompositeListItem } from "../../internals/composite/list/useCompositeListItem.js";
|
|
17
18
|
import { useDirection } from "../../internals/direction-context/DirectionContext.js";
|
|
18
|
-
import { useCSPContext } from "../../csp-
|
|
19
|
+
import { useCSPContext } from "../../internals/csp-context/CSPContext.js";
|
|
19
20
|
import { useFieldRootContext } from "../../internals/field-root-context/FieldRootContext.js";
|
|
20
21
|
import { matchesFocusVisible } from "../../floating-ui-react/utils/element.js";
|
|
21
22
|
import { useLabelableId } from "../../internals/labelable-provider/useLabelableId.js";
|
|
@@ -27,7 +28,7 @@ import { sliderStateAttributesMapping } from "../root/stateAttributesMapping.js"
|
|
|
27
28
|
import { SliderThumbDataAttributes } from "./SliderThumbDataAttributes.js";
|
|
28
29
|
import { script as prehydrationScript } from "./prehydrationScript.min.js";
|
|
29
30
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
|
-
const ALL_KEYS = new Set([
|
|
31
|
+
const ALL_KEYS = new Set([...COMPOSITE_KEYS, PAGE_UP, PAGE_DOWN]);
|
|
31
32
|
function getDefaultAriaValueText(values, index, format, locale) {
|
|
32
33
|
if (index < 0) {
|
|
33
34
|
return undefined;
|
|
@@ -170,7 +171,7 @@ export const SliderThumb = /*#__PURE__*/React.forwardRef(function SliderThumb(co
|
|
|
170
171
|
}
|
|
171
172
|
}, [getInsetPosition, inset, thumbValuePercent]);
|
|
172
173
|
useIsoLayoutEffect(() => {
|
|
173
|
-
if (!inset
|
|
174
|
+
if (!inset) {
|
|
174
175
|
return undefined;
|
|
175
176
|
}
|
|
176
177
|
const control = controlRef.current;
|
|
@@ -178,39 +179,32 @@ export const SliderThumb = /*#__PURE__*/React.forwardRef(function SliderThumb(co
|
|
|
178
179
|
if (!control || !thumb) {
|
|
179
180
|
return undefined;
|
|
180
181
|
}
|
|
181
|
-
const
|
|
182
|
+
const ResizeObserverCtor = ownerWindow(control).ResizeObserver;
|
|
183
|
+
if (typeof ResizeObserverCtor !== 'function') {
|
|
184
|
+
return undefined;
|
|
185
|
+
}
|
|
186
|
+
const resizeObserver = new ResizeObserverCtor(getInsetPosition);
|
|
182
187
|
resizeObserver.observe(control);
|
|
183
188
|
resizeObserver.observe(thumb);
|
|
184
189
|
return () => {
|
|
185
190
|
resizeObserver.disconnect();
|
|
186
191
|
};
|
|
187
192
|
}, [controlRef, getInsetPosition, inset]);
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
if (
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
} else if (safeLastUsedThumbIndex === index) {
|
|
196
|
-
zIndex = 1;
|
|
197
|
-
}
|
|
198
|
-
} else if (activeIndex === index) {
|
|
193
|
+
const startEdge = vertical ? 'bottom' : 'insetInlineStart';
|
|
194
|
+
const crossOffsetProperty = vertical ? 'left' : 'top';
|
|
195
|
+
let zIndex;
|
|
196
|
+
if (range) {
|
|
197
|
+
if (activeIndex === index) {
|
|
198
|
+
zIndex = 2;
|
|
199
|
+
} else if (safeLastUsedThumbIndex === index) {
|
|
199
200
|
zIndex = 1;
|
|
200
201
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
[startEdge]: `${thumbValuePercent}%`,
|
|
208
|
-
[crossOffsetProperty]: '50%',
|
|
209
|
-
translate: `${(vertical || !rtl ? -1 : 1) * 50}% ${(vertical ? 1 : -1) * 50}%`,
|
|
210
|
-
zIndex
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
return {
|
|
202
|
+
} else if (activeIndex === index) {
|
|
203
|
+
zIndex = 1;
|
|
204
|
+
}
|
|
205
|
+
let thumbStyle;
|
|
206
|
+
if (inset) {
|
|
207
|
+
thumbStyle = {
|
|
214
208
|
['--position']: `${positionPercent ?? 0}%`,
|
|
215
209
|
visibility: renderBeforeHydration && isHydrating || positionPercent === undefined ? 'hidden' : undefined,
|
|
216
210
|
position: 'absolute',
|
|
@@ -219,7 +213,15 @@ export const SliderThumb = /*#__PURE__*/React.forwardRef(function SliderThumb(co
|
|
|
219
213
|
translate: `${(vertical || !rtl ? -1 : 1) * 50}% ${(vertical ? 1 : -1) * 50}%`,
|
|
220
214
|
zIndex
|
|
221
215
|
};
|
|
222
|
-
}
|
|
216
|
+
} else {
|
|
217
|
+
thumbStyle = !Number.isFinite(thumbValuePercent) ? visuallyHidden : {
|
|
218
|
+
position: 'absolute',
|
|
219
|
+
[startEdge]: `${thumbValuePercent}%`,
|
|
220
|
+
[crossOffsetProperty]: '50%',
|
|
221
|
+
translate: `${(vertical || !rtl ? -1 : 1) * 50}% ${(vertical ? 1 : -1) * 50}%`,
|
|
222
|
+
zIndex
|
|
223
|
+
};
|
|
224
|
+
}
|
|
223
225
|
let cssWritingMode;
|
|
224
226
|
if (orientation === 'vertical') {
|
|
225
227
|
cssWritingMode = rtl ? 'vertical-rl' : 'vertical-lr';
|
|
@@ -375,7 +377,7 @@ export const SliderThumb = /*#__PURE__*/React.forwardRef(function SliderThumb(co
|
|
|
375
377
|
pressedInputRef.current = inputRef.current;
|
|
376
378
|
}
|
|
377
379
|
},
|
|
378
|
-
style:
|
|
380
|
+
style: thumbStyle,
|
|
379
381
|
suppressHydrationWarning: renderBeforeHydration || undefined
|
|
380
382
|
}, elementProps],
|
|
381
383
|
stateAttributesMapping: sliderStateAttributesMapping
|
|
@@ -27,15 +27,13 @@ export const SliderValue = /*#__PURE__*/React.forwardRef(function SliderValue(co
|
|
|
27
27
|
formatOptionsRef,
|
|
28
28
|
locale
|
|
29
29
|
} = useSliderRootContext();
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
htmlFor += `${thumbMetadata.inputId} `;
|
|
35
|
-
}
|
|
30
|
+
let htmlFor = '';
|
|
31
|
+
for (const thumbMetadata of thumbMap.values()) {
|
|
32
|
+
if (thumbMetadata?.inputId) {
|
|
33
|
+
htmlFor += `${thumbMetadata.inputId} `;
|
|
36
34
|
}
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
}
|
|
36
|
+
const outputFor = htmlFor.trim() === '' ? undefined : htmlFor.trim();
|
|
39
37
|
const formattedValues = React.useMemo(() => {
|
|
40
38
|
const arr = [];
|
|
41
39
|
for (let i = 0; i < values.length; i += 1) {
|
|
@@ -43,13 +41,7 @@ export const SliderValue = /*#__PURE__*/React.forwardRef(function SliderValue(co
|
|
|
43
41
|
}
|
|
44
42
|
return arr;
|
|
45
43
|
}, [formatOptionsRef, locale, values]);
|
|
46
|
-
const defaultDisplayValue =
|
|
47
|
-
const arr = [];
|
|
48
|
-
for (let i = 0; i < values.length; i += 1) {
|
|
49
|
-
arr.push(formattedValues[i] || values[i]);
|
|
50
|
-
}
|
|
51
|
-
return arr.join(' – ');
|
|
52
|
-
}, [values, formattedValues]);
|
|
44
|
+
const defaultDisplayValue = values.map((v, i) => formattedValues[i] || v).join(' – ');
|
|
53
45
|
const element = useRenderElement('output', componentProps, {
|
|
54
46
|
state,
|
|
55
47
|
ref: forwardedRef,
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useControlled } from '@base-ui/utils/useControlled';
|
|
5
|
-
import { useStableCallback } from '@base-ui/utils/useStableCallback';
|
|
6
5
|
import { useMergedRefs } from '@base-ui/utils/useMergedRefs';
|
|
7
6
|
import { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';
|
|
8
7
|
import { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';
|
|
9
8
|
import { EMPTY_OBJECT } from '@base-ui/utils/empty';
|
|
9
|
+
import { ownerWindow } from '@base-ui/utils/owner';
|
|
10
10
|
import { useRenderElement } from "../../internals/useRenderElement.js";
|
|
11
11
|
import { mergeProps } from "../../merge-props/index.js";
|
|
12
12
|
import { useBaseUiId } from "../../internals/useBaseUiId.js";
|
|
@@ -41,7 +41,7 @@ export const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(comp
|
|
|
41
41
|
inputRef: externalInputRef,
|
|
42
42
|
name: nameProp,
|
|
43
43
|
nativeButton = false,
|
|
44
|
-
onCheckedChange
|
|
44
|
+
onCheckedChange,
|
|
45
45
|
readOnly = false,
|
|
46
46
|
required = false,
|
|
47
47
|
disabled: disabledProp = false,
|
|
@@ -72,7 +72,6 @@ export const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(comp
|
|
|
72
72
|
} = useLabelableContext();
|
|
73
73
|
const disabled = fieldDisabled || disabledProp;
|
|
74
74
|
const name = fieldName ?? nameProp;
|
|
75
|
-
const onCheckedChange = useStableCallback(onCheckedChangeProp);
|
|
76
75
|
const inputRef = React.useRef(null);
|
|
77
76
|
const handleInputRef = useMergedRefs(inputRef, externalInputRef, validation.inputRef);
|
|
78
77
|
const switchRef = React.useRef(null);
|
|
@@ -89,10 +88,7 @@ export const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(comp
|
|
|
89
88
|
name: 'Switch',
|
|
90
89
|
state: 'checked'
|
|
91
90
|
});
|
|
92
|
-
useRegisterFieldControl(switchRef,
|
|
93
|
-
id,
|
|
94
|
-
value: checked
|
|
95
|
-
});
|
|
91
|
+
useRegisterFieldControl(switchRef, id, checked);
|
|
96
92
|
useIsoLayoutEffect(() => {
|
|
97
93
|
if (inputRef.current) {
|
|
98
94
|
setFilled(inputRef.current.checked);
|
|
@@ -144,7 +140,11 @@ export const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(comp
|
|
|
144
140
|
return;
|
|
145
141
|
}
|
|
146
142
|
event.preventDefault();
|
|
147
|
-
inputRef.current
|
|
143
|
+
const input = inputRef.current;
|
|
144
|
+
if (!input) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
input.dispatchEvent(new (ownerWindow(input).PointerEvent)('click', {
|
|
148
148
|
bubbles: true,
|
|
149
149
|
shiftKey: event.shiftKey,
|
|
150
150
|
ctrlKey: event.ctrlKey,
|
|
@@ -153,7 +153,7 @@ export const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(comp
|
|
|
153
153
|
}));
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
|
-
const inputProps =
|
|
156
|
+
const inputProps = mergeProps({
|
|
157
157
|
checked,
|
|
158
158
|
disabled,
|
|
159
159
|
form,
|
|
@@ -190,7 +190,7 @@ export const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(comp
|
|
|
190
190
|
// To avoid this, we only set the value if it's defined
|
|
191
191
|
value !== undefined ? {
|
|
192
192
|
value
|
|
193
|
-
} : EMPTY_OBJECT)
|
|
193
|
+
} : EMPTY_OBJECT);
|
|
194
194
|
const state = React.useMemo(() => ({
|
|
195
195
|
...fieldState,
|
|
196
196
|
checked,
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useSwitchRootContext } from "../root/SwitchRootContext.js";
|
|
5
5
|
import { useRenderElement } from "../../internals/useRenderElement.js";
|
|
6
|
-
import { useFieldRootContext } from "../../internals/field-root-context/FieldRootContext.js";
|
|
7
6
|
import { stateAttributesMapping } from "../stateAttributesMapping.js";
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -19,16 +18,9 @@ export const SwitchThumb = /*#__PURE__*/React.forwardRef(function SwitchThumb(co
|
|
|
19
18
|
style,
|
|
20
19
|
...elementProps
|
|
21
20
|
} = componentProps;
|
|
22
|
-
const {
|
|
23
|
-
state: fieldState
|
|
24
|
-
} = useFieldRootContext();
|
|
25
21
|
const state = useSwitchRootContext();
|
|
26
|
-
const extendedState = {
|
|
27
|
-
...fieldState,
|
|
28
|
-
...state
|
|
29
|
-
};
|
|
30
22
|
return useRenderElement('span', componentProps, {
|
|
31
|
-
state
|
|
23
|
+
state,
|
|
32
24
|
ref: forwardedRef,
|
|
33
25
|
stateAttributesMapping,
|
|
34
26
|
props: elementProps
|
|
@@ -10,7 +10,7 @@ import { tabsStateAttributesMapping } from "../root/stateAttributesMapping.js";
|
|
|
10
10
|
import { useTabsListContext } from "../list/TabsListContext.js";
|
|
11
11
|
import { script as prehydrationScript } from "./prehydrationScript.min.js";
|
|
12
12
|
import { TabsIndicatorCssVars } from "./TabsIndicatorCssVars.js";
|
|
13
|
-
import { useCSPContext } from "../../csp-
|
|
13
|
+
import { useCSPContext } from "../../internals/csp-context/CSPContext.js";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
const stateAttributesMapping = {
|
|
16
16
|
...tabsStateAttributesMapping,
|
|
@@ -24,7 +24,7 @@ const stateAttributesMapping = {
|
|
|
24
24
|
*
|
|
25
25
|
* Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)
|
|
26
26
|
*/
|
|
27
|
-
export const TabsIndicator = /*#__PURE__*/React.forwardRef(function
|
|
27
|
+
export const TabsIndicator = /*#__PURE__*/React.forwardRef(function TabsIndicator(componentProps, forwardedRef) {
|
|
28
28
|
const {
|
|
29
29
|
className,
|
|
30
30
|
render,
|
|
@@ -89,29 +89,24 @@ export const TabsIndicator = /*#__PURE__*/React.forwardRef(function TabIndicator
|
|
|
89
89
|
bottom = tabsListElement.scrollHeight - top - height;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
const activeTabPosition =
|
|
92
|
+
const activeTabPosition = isTabSelected ? {
|
|
93
93
|
left,
|
|
94
94
|
right,
|
|
95
95
|
top,
|
|
96
96
|
bottom
|
|
97
|
-
} : null
|
|
98
|
-
const activeTabSize =
|
|
97
|
+
} : null;
|
|
98
|
+
const activeTabSize = isTabSelected ? {
|
|
99
99
|
width,
|
|
100
100
|
height
|
|
101
|
-
} : null
|
|
102
|
-
const style =
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
[TabsIndicatorCssVars.activeTabBottom]: `${bottom}px`,
|
|
111
|
-
[TabsIndicatorCssVars.activeTabWidth]: `${width}px`,
|
|
112
|
-
[TabsIndicatorCssVars.activeTabHeight]: `${height}px`
|
|
113
|
-
};
|
|
114
|
-
}, [left, right, top, bottom, width, height, isTabSelected]);
|
|
101
|
+
} : null;
|
|
102
|
+
const style = isTabSelected ? {
|
|
103
|
+
[TabsIndicatorCssVars.activeTabLeft]: `${left}px`,
|
|
104
|
+
[TabsIndicatorCssVars.activeTabRight]: `${right}px`,
|
|
105
|
+
[TabsIndicatorCssVars.activeTabTop]: `${top}px`,
|
|
106
|
+
[TabsIndicatorCssVars.activeTabBottom]: `${bottom}px`,
|
|
107
|
+
[TabsIndicatorCssVars.activeTabWidth]: `${width}px`,
|
|
108
|
+
[TabsIndicatorCssVars.activeTabHeight]: `${height}px`
|
|
109
|
+
} : undefined;
|
|
115
110
|
const displayIndicator = isTabSelected && width > 0 && height > 0;
|
|
116
111
|
const state = {
|
|
117
112
|
orientation,
|
|
@@ -36,20 +36,14 @@ export const TabsList = /*#__PURE__*/React.forwardRef(function TabsList(componen
|
|
|
36
36
|
const indicatorUpdateListenersRef = React.useRef(new Set());
|
|
37
37
|
const tabResizeObserverElementsRef = React.useRef(new Set());
|
|
38
38
|
const resizeObserverRef = React.useRef(null);
|
|
39
|
-
const notifyIndicatorUpdateListeners = useStableCallback(() => {
|
|
40
|
-
indicatorUpdateListenersRef.current.forEach(listener => {
|
|
41
|
-
listener();
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
39
|
React.useEffect(() => {
|
|
45
40
|
if (typeof ResizeObserver === 'undefined') {
|
|
46
41
|
return undefined;
|
|
47
42
|
}
|
|
48
43
|
const resizeObserver = new ResizeObserver(() => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
notifyIndicatorUpdateListeners();
|
|
44
|
+
indicatorUpdateListenersRef.current.forEach(listener => {
|
|
45
|
+
listener();
|
|
46
|
+
});
|
|
53
47
|
});
|
|
54
48
|
resizeObserverRef.current = resizeObserver;
|
|
55
49
|
if (tabsListElement) {
|
|
@@ -62,7 +56,7 @@ export const TabsList = /*#__PURE__*/React.forwardRef(function TabsList(componen
|
|
|
62
56
|
resizeObserver.disconnect();
|
|
63
57
|
resizeObserverRef.current = null;
|
|
64
58
|
};
|
|
65
|
-
}, [tabsListElement
|
|
59
|
+
}, [tabsListElement]);
|
|
66
60
|
const registerIndicatorUpdateListener = useStableCallback(listener => {
|
|
67
61
|
indicatorUpdateListenersRef.current.add(listener);
|
|
68
62
|
return () => {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { TabsRoot } from "../root/TabsRoot.js";
|
|
3
|
+
import type { TabsTab } from "../tab/TabsTab.js";
|
|
3
4
|
export interface TabsListContext {
|
|
4
5
|
activateOnFocus: boolean;
|
|
5
6
|
highlightedTabIndex: number;
|
|
6
7
|
registerIndicatorUpdateListener: (listener: () => void) => () => void;
|
|
7
8
|
registerTabResizeObserverElement: (element: HTMLElement) => () => void;
|
|
8
|
-
onTabActivation: (newValue:
|
|
9
|
+
onTabActivation: (newValue: TabsTab.Value, eventDetails: TabsRoot.ChangeEventDetails) => void;
|
|
9
10
|
setHighlightedTabIndex: (index: number) => void;
|
|
10
11
|
tabsListElement: HTMLElement | null;
|
|
11
12
|
}
|
|
@@ -23,7 +23,7 @@ const stateAttributesMapping = {
|
|
|
23
23
|
*
|
|
24
24
|
* Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)
|
|
25
25
|
*/
|
|
26
|
-
export const TabsPanel = /*#__PURE__*/React.forwardRef(function
|
|
26
|
+
export const TabsPanel = /*#__PURE__*/React.forwardRef(function TabsPanel(componentProps, forwardedRef) {
|
|
27
27
|
const {
|
|
28
28
|
className,
|
|
29
29
|
value,
|
|
@@ -40,10 +40,25 @@ export interface TabsRootProps extends BaseUIComponentProps<'div', TabsRootState
|
|
|
40
40
|
orientation?: TabsRoot.Orientation | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* Callback invoked when new value is being set.
|
|
43
|
+
*
|
|
44
|
+
* The event `reason` is `'none'` for user-initiated changes, such as a click
|
|
45
|
+
* or keyboard navigation; `'initial'` for the first automatic selection or
|
|
46
|
+
* fallback in uncontrolled roots when `defaultValue` is omitted or
|
|
47
|
+
* `undefined`, including when the implicit initial value is disabled or
|
|
48
|
+
* missing; `'disabled'` for automatic fallback when the selected tab becomes
|
|
49
|
+
* disabled in uncontrolled roots; or `'missing'` for automatic fallback when
|
|
50
|
+
* the selected tab is removed, or when an explicit `defaultValue` never
|
|
51
|
+
* matches a mounted tab in uncontrolled roots.
|
|
52
|
+
*
|
|
53
|
+
* For automatic changes, the selected value can be `null` when no enabled Tab
|
|
54
|
+
* is available as a fallback.
|
|
55
|
+
*
|
|
56
|
+
* Automatic changes cannot be canceled; calling `eventDetails.cancel()` for
|
|
57
|
+
* `'initial'`, `'disabled'`, or `'missing'` has no effect.
|
|
43
58
|
*/
|
|
44
59
|
onValueChange?: ((value: TabsTab.Value, eventDetails: TabsRoot.ChangeEventDetails) => void) | undefined;
|
|
45
60
|
}
|
|
46
|
-
export type TabsRootChangeEventReason = typeof REASONS.none;
|
|
61
|
+
export type TabsRootChangeEventReason = typeof REASONS.none | typeof REASONS.disabled | typeof REASONS.missing | typeof REASONS.initial;
|
|
47
62
|
export type TabsRootChangeEventDetails = BaseUIChangeEventDetails<TabsRoot.ChangeEventReason, {
|
|
48
63
|
activationDirection: TabsTab.ActivationDirection;
|
|
49
64
|
}>;
|
|
@@ -8,13 +8,16 @@ import { useRenderElement } from "../../internals/useRenderElement.js";
|
|
|
8
8
|
import { CompositeList } from "../../internals/composite/list/CompositeList.js";
|
|
9
9
|
import { TabsRootContext } from "./TabsRootContext.js";
|
|
10
10
|
import { tabsStateAttributesMapping } from "./stateAttributesMapping.js";
|
|
11
|
-
import {
|
|
11
|
+
import { createChangeEventDetails } from "../../internals/createBaseUIEventDetails.js";
|
|
12
|
+
import { REASONS } from "../../internals/reasons.js";
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* Groups the tabs and the corresponding panels.
|
|
14
16
|
* Renders a `<div>` element.
|
|
15
17
|
*
|
|
16
18
|
* Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)
|
|
17
19
|
*/
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
21
|
export const TabsRoot = /*#__PURE__*/React.forwardRef(function TabsRoot(componentProps, forwardedRef) {
|
|
19
22
|
const {
|
|
20
23
|
className,
|
|
@@ -27,9 +30,9 @@ export const TabsRoot = /*#__PURE__*/React.forwardRef(function TabsRoot(componen
|
|
|
27
30
|
...elementProps
|
|
28
31
|
} = componentProps;
|
|
29
32
|
|
|
30
|
-
// Track whether the user explicitly provided a `defaultValue` prop.
|
|
33
|
+
// Track whether the user explicitly provided a defined `defaultValue` prop.
|
|
31
34
|
// Used to determine if we should honor a disabled tab selection.
|
|
32
|
-
const hasExplicitDefaultValueProp =
|
|
35
|
+
const hasExplicitDefaultValueProp = componentProps.defaultValue !== undefined;
|
|
33
36
|
const tabPanelRefs = React.useRef([]);
|
|
34
37
|
const [mountedTabPanels, setMountedTabPanels] = React.useState(() => new Map());
|
|
35
38
|
const [value, setValue] = useControlled({
|
|
@@ -97,6 +100,11 @@ export const TabsRoot = /*#__PURE__*/React.forwardRef(function TabsRoot(componen
|
|
|
97
100
|
}
|
|
98
101
|
setValue(newValue);
|
|
99
102
|
});
|
|
103
|
+
const notifyAutomaticValueChange = useStableCallback((nextValue, reason) => {
|
|
104
|
+
onValueChangeProp?.(nextValue, createChangeEventDetails(reason, undefined, undefined, {
|
|
105
|
+
activationDirection: 'none'
|
|
106
|
+
}));
|
|
107
|
+
});
|
|
100
108
|
const registerMountedTabPanel = useStableCallback((panelValue, panelId) => {
|
|
101
109
|
setMountedTabPanels(prev => {
|
|
102
110
|
if (prev.get(panelValue) === panelId) {
|
|
@@ -164,38 +172,78 @@ export const TabsRoot = /*#__PURE__*/React.forwardRef(function TabsRoot(componen
|
|
|
164
172
|
return undefined;
|
|
165
173
|
}, [tabMap]);
|
|
166
174
|
|
|
167
|
-
//
|
|
168
|
-
//
|
|
169
|
-
|
|
170
|
-
//
|
|
175
|
+
// Implicit uncontrolled selections are still automatic changes, so notify
|
|
176
|
+
// once when the tabs first register. Explicit defaults are treated as user-owned.
|
|
177
|
+
const shouldNotifyInitialValueChangeRef = React.useRef(!hasExplicitDefaultValueProp);
|
|
178
|
+
// An explicit defaultValue can intentionally point at a disabled tab on mount.
|
|
179
|
+
// Once that selection becomes valid, later disabled states should fall back.
|
|
180
|
+
const shouldHonorDisabledDefaultValueRef = React.useRef(hasExplicitDefaultValueProp);
|
|
181
|
+
const didRegisterTabsRef = React.useRef(false);
|
|
182
|
+
|
|
183
|
+
// Uncontrolled roots own automatic fallback. Controlled roots keep the exact
|
|
184
|
+
// value supplied by the parent, even when that tab is disabled or missing.
|
|
171
185
|
useIsoLayoutEffect(() => {
|
|
172
|
-
if (isControlled
|
|
186
|
+
if (isControlled) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
function commitAutomaticValueChange(fallbackValue, fallbackReason) {
|
|
190
|
+
setValue(fallbackValue);
|
|
191
|
+
// Automatic fallbacks are not directional transitions; reset the direction
|
|
192
|
+
// alongside the value so the batched commit keeps both in sync.
|
|
193
|
+
setActivationDirectionState(prev => {
|
|
194
|
+
if (prev.previousValue === fallbackValue && prev.tabActivationDirection === 'none') {
|
|
195
|
+
return prev;
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
previousValue: fallbackValue,
|
|
199
|
+
tabActivationDirection: 'none'
|
|
200
|
+
};
|
|
201
|
+
});
|
|
202
|
+
notifyAutomaticValueChange(fallbackValue, fallbackReason);
|
|
203
|
+
// Mark the initial notification as delivered only after the consumer
|
|
204
|
+
// callback returns. The fallback value is queued first so automatic
|
|
205
|
+
// consistency updates are not cancelable through a throwing handler.
|
|
206
|
+
shouldNotifyInitialValueChangeRef.current = false;
|
|
207
|
+
}
|
|
208
|
+
if (tabMap.size === 0) {
|
|
209
|
+
if (!didRegisterTabsRef.current || value === null) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
commitAutomaticValueChange(null, REASONS.missing);
|
|
173
213
|
return;
|
|
174
214
|
}
|
|
215
|
+
didRegisterTabsRef.current = true;
|
|
175
216
|
const selectionIsDisabled = selectedTabMetadata?.disabled;
|
|
176
217
|
const selectionIsMissing = selectedTabMetadata == null && value !== null;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return;
|
|
218
|
+
if (!selectionIsDisabled && value === defaultValueProp) {
|
|
219
|
+
shouldHonorDisabledDefaultValueRef.current = false;
|
|
180
220
|
}
|
|
181
|
-
if (
|
|
221
|
+
if (shouldHonorDisabledDefaultValueRef.current && selectionIsDisabled && value === defaultValueProp) {
|
|
182
222
|
return;
|
|
183
223
|
}
|
|
184
|
-
const
|
|
185
|
-
if (
|
|
224
|
+
const shouldNotifyInitialValueChange = shouldNotifyInitialValueChangeRef.current;
|
|
225
|
+
if (selectionIsDisabled || selectionIsMissing) {
|
|
226
|
+
const fallbackValue = firstEnabledTabValue ?? null;
|
|
227
|
+
if (value === fallbackValue) {
|
|
228
|
+
// Already at the fallback value; no commit or notification needed,
|
|
229
|
+
// but record that the implicit-initial transition has resolved.
|
|
230
|
+
shouldNotifyInitialValueChangeRef.current = false;
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
let fallbackReason = REASONS.missing;
|
|
234
|
+
if (shouldNotifyInitialValueChange) {
|
|
235
|
+
fallbackReason = REASONS.initial;
|
|
236
|
+
} else if (selectionIsDisabled) {
|
|
237
|
+
fallbackReason = REASONS.disabled;
|
|
238
|
+
}
|
|
239
|
+
commitAutomaticValueChange(fallbackValue, fallbackReason);
|
|
186
240
|
return;
|
|
187
241
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return {
|
|
194
|
-
...prev,
|
|
195
|
-
tabActivationDirection: 'none'
|
|
196
|
-
};
|
|
197
|
-
});
|
|
198
|
-
}, [defaultValueProp, firstEnabledTabValue, hasExplicitDefaultValueProp, isControlled, selectedTabMetadata, setValue, tabMap, value]);
|
|
242
|
+
if (shouldNotifyInitialValueChange && selectedTabMetadata != null) {
|
|
243
|
+
notifyAutomaticValueChange(value, REASONS.initial);
|
|
244
|
+
shouldNotifyInitialValueChangeRef.current = false;
|
|
245
|
+
}
|
|
246
|
+
}, [defaultValueProp, firstEnabledTabValue, isControlled, notifyAutomaticValueChange, selectedTabMetadata, setValue, tabMap, value]);
|
|
199
247
|
const state = {
|
|
200
248
|
orientation,
|
|
201
249
|
tabActivationDirection
|
|
@@ -20,12 +20,10 @@ export interface TabsRootContext {
|
|
|
20
20
|
getTabElementBySelectedValue: (selectedValue: TabsTab.Value | undefined) => HTMLElement | null;
|
|
21
21
|
/**
|
|
22
22
|
* Gets the `id` attribute of the Tab that corresponds to the given TabPanel value.
|
|
23
|
-
* @param (any) panelValue Value to find the Tab for.
|
|
24
23
|
*/
|
|
25
24
|
getTabIdByPanelValue: (panelValue: TabsTab.Value) => string | undefined;
|
|
26
25
|
/**
|
|
27
26
|
* Gets the `id` attribute of the TabPanel that corresponds to the given Tab value.
|
|
28
|
-
* @param (any) tabValue Value to find the TabPanel for.
|
|
29
27
|
*/
|
|
30
28
|
getTabPanelIdByValue: (tabValue: TabsTab.Value) => string | undefined;
|
|
31
29
|
registerMountedTabPanel: (panelValue: TabsTab.Value | number, panelId: string) => void;
|