@base-ui/react 1.0.0-rc.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +156 -5
- package/README.md +2 -3
- package/accordion/header/AccordionHeader.d.ts +1 -1
- package/accordion/item/AccordionItem.d.ts +1 -1
- package/accordion/panel/AccordionPanel.d.ts +1 -1
- package/accordion/root/AccordionRoot.d.ts +1 -1
- package/accordion/trigger/AccordionTrigger.d.ts +1 -1
- package/accordion/trigger/AccordionTrigger.js +3 -4
- package/alert-dialog/root/AlertDialogRoot.d.ts +3 -3
- package/autocomplete/root/AutocompleteRoot.d.ts +1 -1
- package/avatar/fallback/AvatarFallback.d.ts +1 -1
- package/avatar/image/AvatarImage.d.ts +1 -1
- package/avatar/root/AvatarRoot.d.ts +1 -1
- package/button/Button.d.ts +4 -17
- package/button/Button.js +1 -2
- package/checkbox/indicator/CheckboxIndicator.d.ts +1 -1
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.d.ts +4 -0
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.js +4 -0
- package/checkbox/root/CheckboxRoot.d.ts +1 -1
- package/checkbox/root/CheckboxRoot.js +5 -4
- package/checkbox/root/CheckboxRootDataAttributes.d.ts +4 -0
- package/checkbox/root/CheckboxRootDataAttributes.js +4 -0
- package/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/collapsible/panel/CollapsiblePanel.d.ts +1 -1
- package/collapsible/root/CollapsibleRoot.d.ts +1 -1
- package/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
- package/collapsible/trigger/CollapsibleTrigger.js +1 -2
- package/combobox/arrow/ComboboxArrow.d.ts +1 -1
- package/combobox/backdrop/ComboboxBackdrop.d.ts +1 -1
- package/combobox/chip/ComboboxChip.d.ts +1 -1
- package/combobox/chip-remove/ComboboxChipRemove.d.ts +1 -1
- package/combobox/chip-remove/ComboboxChipRemove.js +3 -2
- package/combobox/chips/ComboboxChips.d.ts +1 -1
- package/combobox/chips/ComboboxChips.js +7 -1
- package/combobox/clear/ComboboxClear.d.ts +1 -1
- package/combobox/clear/ComboboxClear.js +2 -2
- package/combobox/empty/ComboboxEmpty.d.ts +1 -1
- package/combobox/group/ComboboxGroup.d.ts +1 -1
- package/combobox/group-label/ComboboxGroupLabel.d.ts +1 -1
- package/combobox/icon/ComboboxIcon.d.ts +1 -1
- package/combobox/input/ComboboxInput.d.ts +1 -1
- package/combobox/input/ComboboxInput.js +12 -18
- package/combobox/item/ComboboxItem.d.ts +1 -1
- package/combobox/item/ComboboxItem.js +0 -1
- package/combobox/item-indicator/ComboboxItemIndicator.d.ts +1 -1
- package/combobox/list/ComboboxList.d.ts +1 -1
- package/combobox/popup/ComboboxPopup.d.ts +1 -1
- package/combobox/popup/ComboboxPopup.js +2 -1
- package/combobox/portal/ComboboxPortal.d.ts +1 -1
- package/combobox/positioner/ComboboxPositioner.d.ts +1 -1
- package/combobox/root/AriaCombobox.d.ts +8 -1
- package/combobox/root/AriaCombobox.js +19 -16
- package/combobox/root/ComboboxRoot.d.ts +1 -1
- package/combobox/row/ComboboxRow.d.ts +1 -1
- package/combobox/status/ComboboxStatus.d.ts +1 -1
- package/combobox/store.d.ts +3 -0
- package/combobox/store.js +21 -0
- package/combobox/trigger/ComboboxTrigger.d.ts +14 -1
- package/combobox/trigger/ComboboxTrigger.js +31 -11
- package/combobox/trigger/ComboboxTriggerDataAttributes.d.ts +13 -0
- package/combobox/trigger/ComboboxTriggerDataAttributes.js +13 -0
- package/combobox/utils/stateAttributesMapping.d.ts +14 -0
- package/combobox/utils/stateAttributesMapping.js +18 -0
- package/combobox/value/ComboboxValue.d.ts +5 -0
- package/combobox/value/ComboboxValue.js +15 -6
- package/composite/root/useCompositeRoot.d.ts +1 -1
- package/context-menu/trigger/ContextMenuTrigger.d.ts +1 -1
- package/csp-provider/CSPContext.d.ts +13 -0
- package/csp-provider/CSPContext.js +25 -0
- package/csp-provider/CSPProvider.d.ts +25 -0
- package/csp-provider/CSPProvider.js +32 -0
- package/csp-provider/index.d.ts +2 -0
- package/csp-provider/index.js +12 -0
- package/csp-provider/index.parts.d.ts +1 -0
- package/csp-provider/index.parts.js +12 -0
- package/dialog/backdrop/DialogBackdrop.d.ts +1 -1
- package/dialog/close/DialogClose.d.ts +1 -1
- package/dialog/description/DialogDescription.d.ts +1 -1
- package/dialog/popup/DialogPopup.d.ts +1 -1
- package/dialog/portal/DialogPortal.d.ts +1 -1
- package/dialog/portal/DialogPortal.js +1 -0
- package/dialog/root/DialogRoot.d.ts +4 -4
- package/dialog/store/DialogStore.d.ts +2 -2
- package/dialog/title/DialogTitle.d.ts +1 -1
- package/dialog/viewport/DialogViewport.d.ts +1 -1
- package/esm/accordion/header/AccordionHeader.d.ts +1 -1
- package/esm/accordion/item/AccordionItem.d.ts +1 -1
- package/esm/accordion/panel/AccordionPanel.d.ts +1 -1
- package/esm/accordion/root/AccordionRoot.d.ts +1 -1
- package/esm/accordion/trigger/AccordionTrigger.d.ts +1 -1
- package/esm/accordion/trigger/AccordionTrigger.js +3 -4
- package/esm/alert-dialog/root/AlertDialogRoot.d.ts +3 -3
- package/esm/autocomplete/root/AutocompleteRoot.d.ts +1 -1
- package/esm/avatar/fallback/AvatarFallback.d.ts +1 -1
- package/esm/avatar/image/AvatarImage.d.ts +1 -1
- package/esm/avatar/root/AvatarRoot.d.ts +1 -1
- package/esm/button/Button.d.ts +4 -17
- package/esm/button/Button.js +1 -2
- package/esm/checkbox/indicator/CheckboxIndicator.d.ts +1 -1
- package/esm/checkbox/indicator/CheckboxIndicatorDataAttributes.d.ts +4 -0
- package/esm/checkbox/indicator/CheckboxIndicatorDataAttributes.js +4 -0
- package/esm/checkbox/root/CheckboxRoot.d.ts +1 -1
- package/esm/checkbox/root/CheckboxRoot.js +6 -5
- package/esm/checkbox/root/CheckboxRootDataAttributes.d.ts +4 -0
- package/esm/checkbox/root/CheckboxRootDataAttributes.js +4 -0
- package/esm/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/esm/collapsible/panel/CollapsiblePanel.d.ts +1 -1
- package/esm/collapsible/root/CollapsibleRoot.d.ts +1 -1
- package/esm/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
- package/esm/collapsible/trigger/CollapsibleTrigger.js +1 -2
- package/esm/combobox/arrow/ComboboxArrow.d.ts +1 -1
- package/esm/combobox/backdrop/ComboboxBackdrop.d.ts +1 -1
- package/esm/combobox/chip/ComboboxChip.d.ts +1 -1
- package/esm/combobox/chip-remove/ComboboxChipRemove.d.ts +1 -1
- package/esm/combobox/chip-remove/ComboboxChipRemove.js +3 -2
- package/esm/combobox/chips/ComboboxChips.d.ts +1 -1
- package/esm/combobox/chips/ComboboxChips.js +7 -1
- package/esm/combobox/clear/ComboboxClear.d.ts +1 -1
- package/esm/combobox/clear/ComboboxClear.js +2 -2
- package/esm/combobox/empty/ComboboxEmpty.d.ts +1 -1
- package/esm/combobox/group/ComboboxGroup.d.ts +1 -1
- package/esm/combobox/group-label/ComboboxGroupLabel.d.ts +1 -1
- package/esm/combobox/icon/ComboboxIcon.d.ts +1 -1
- package/esm/combobox/input/ComboboxInput.d.ts +1 -1
- package/esm/combobox/input/ComboboxInput.js +12 -17
- package/esm/combobox/item/ComboboxItem.d.ts +1 -1
- package/esm/combobox/item/ComboboxItem.js +0 -1
- package/esm/combobox/item-indicator/ComboboxItemIndicator.d.ts +1 -1
- package/esm/combobox/list/ComboboxList.d.ts +1 -1
- package/esm/combobox/popup/ComboboxPopup.d.ts +1 -1
- package/esm/combobox/popup/ComboboxPopup.js +2 -1
- package/esm/combobox/portal/ComboboxPortal.d.ts +1 -1
- package/esm/combobox/positioner/ComboboxPositioner.d.ts +1 -1
- package/esm/combobox/root/AriaCombobox.d.ts +8 -1
- package/esm/combobox/root/AriaCombobox.js +20 -17
- package/esm/combobox/root/ComboboxRoot.d.ts +1 -1
- package/esm/combobox/row/ComboboxRow.d.ts +1 -1
- package/esm/combobox/status/ComboboxStatus.d.ts +1 -1
- package/esm/combobox/store.d.ts +3 -0
- package/esm/combobox/store.js +21 -0
- package/esm/combobox/trigger/ComboboxTrigger.d.ts +14 -1
- package/esm/combobox/trigger/ComboboxTrigger.js +32 -12
- package/esm/combobox/trigger/ComboboxTriggerDataAttributes.d.ts +13 -0
- package/esm/combobox/trigger/ComboboxTriggerDataAttributes.js +13 -0
- package/esm/combobox/utils/stateAttributesMapping.d.ts +14 -0
- package/esm/combobox/utils/stateAttributesMapping.js +12 -0
- package/esm/combobox/value/ComboboxValue.d.ts +5 -0
- package/esm/combobox/value/ComboboxValue.js +16 -7
- package/esm/composite/root/useCompositeRoot.d.ts +1 -1
- package/esm/context-menu/trigger/ContextMenuTrigger.d.ts +1 -1
- package/esm/csp-provider/CSPContext.d.ts +13 -0
- package/esm/csp-provider/CSPContext.js +18 -0
- package/esm/csp-provider/CSPProvider.d.ts +25 -0
- package/esm/csp-provider/CSPProvider.js +27 -0
- package/esm/csp-provider/index.d.ts +2 -0
- package/esm/csp-provider/index.js +1 -0
- package/esm/csp-provider/index.parts.d.ts +1 -0
- package/esm/csp-provider/index.parts.js +1 -0
- package/esm/dialog/backdrop/DialogBackdrop.d.ts +1 -1
- package/esm/dialog/close/DialogClose.d.ts +1 -1
- package/esm/dialog/description/DialogDescription.d.ts +1 -1
- package/esm/dialog/popup/DialogPopup.d.ts +1 -1
- package/esm/dialog/portal/DialogPortal.d.ts +1 -1
- package/esm/dialog/portal/DialogPortal.js +1 -0
- package/esm/dialog/root/DialogRoot.d.ts +4 -4
- package/esm/dialog/store/DialogStore.d.ts +2 -2
- package/esm/dialog/title/DialogTitle.d.ts +1 -1
- package/esm/dialog/viewport/DialogViewport.d.ts +1 -1
- package/esm/field/control/FieldControl.d.ts +1 -1
- package/esm/field/description/FieldDescription.d.ts +1 -1
- package/esm/field/error/FieldError.d.ts +1 -1
- package/esm/field/index.d.ts +2 -1
- package/esm/field/item/FieldItem.d.ts +1 -1
- package/esm/field/label/FieldLabel.d.ts +11 -2
- package/esm/field/label/FieldLabel.js +51 -11
- package/esm/field/root/FieldRoot.d.ts +10 -1
- package/esm/field/root/FieldRoot.js +8 -0
- package/esm/field/useField.js +7 -3
- package/esm/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/esm/fieldset/root/FieldsetRoot.d.ts +1 -1
- package/esm/floating-ui-react/components/FloatingFocusManager.js +7 -6
- package/esm/floating-ui-react/components/FloatingPortal.d.ts +2 -2
- package/esm/floating-ui-react/components/FloatingPortal.js +11 -2
- package/esm/floating-ui-react/hooks/useClientPoint.js +5 -4
- package/esm/floating-ui-react/hooks/useDismiss.js +16 -3
- package/esm/floating-ui-react/hooks/useFocus.d.ts +5 -0
- package/esm/floating-ui-react/hooks/useFocus.js +43 -9
- package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js +17 -4
- package/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js +3 -0
- package/esm/form/Form.d.ts +18 -1
- package/esm/form/Form.js +17 -0
- package/esm/form/FormContext.d.ts +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/input/Input.d.ts +1 -1
- package/esm/menu/arrow/MenuArrow.d.ts +1 -1
- package/esm/menu/backdrop/MenuBackdrop.d.ts +1 -1
- package/esm/menu/checkbox-item/MenuCheckboxItem.d.ts +1 -1
- package/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.d.ts +1 -1
- package/esm/menu/group/MenuGroup.d.ts +1 -1
- package/esm/menu/group-label/MenuGroupLabel.d.ts +1 -1
- package/esm/menu/item/MenuItem.d.ts +1 -1
- package/esm/menu/popup/MenuPopup.d.ts +1 -1
- package/esm/menu/popup/MenuPopup.js +4 -3
- package/esm/menu/portal/MenuPortal.d.ts +1 -1
- package/esm/menu/positioner/MenuPositioner.d.ts +1 -1
- package/esm/menu/radio-group/MenuRadioGroup.d.ts +1 -1
- package/esm/menu/radio-item/MenuRadioItem.d.ts +1 -1
- package/esm/menu/radio-item-indicator/MenuRadioItemIndicator.d.ts +1 -1
- package/esm/menu/root/MenuRoot.d.ts +7 -6
- package/esm/menu/root/MenuRoot.js +4 -2
- package/esm/menu/store/MenuStore.js +3 -3
- package/esm/menu/submenu-trigger/MenuSubmenuTrigger.d.ts +1 -1
- package/esm/menu/trigger/MenuTrigger.js +13 -13
- package/esm/menubar/Menubar.d.ts +1 -1
- package/esm/merge-props/mergeProps.d.ts +31 -11
- package/esm/merge-props/mergeProps.js +29 -8
- package/esm/meter/indicator/MeterIndicator.d.ts +1 -1
- package/esm/meter/label/MeterLabel.d.ts +1 -1
- package/esm/meter/root/MeterRoot.d.ts +1 -1
- package/esm/meter/track/MeterTrack.d.ts +1 -1
- package/esm/meter/value/MeterValue.d.ts +1 -1
- package/esm/navigation-menu/arrow/NavigationMenuArrow.d.ts +1 -1
- package/esm/navigation-menu/backdrop/NavigationMenuBackdrop.d.ts +1 -1
- package/esm/navigation-menu/content/NavigationMenuContent.d.ts +1 -1
- package/esm/navigation-menu/content/NavigationMenuContent.js +6 -0
- package/esm/navigation-menu/icon/NavigationMenuIcon.d.ts +1 -1
- package/esm/navigation-menu/item/NavigationMenuItem.d.ts +1 -1
- package/esm/navigation-menu/link/NavigationMenuLink.d.ts +1 -1
- package/esm/navigation-menu/list/NavigationMenuList.d.ts +1 -1
- package/esm/navigation-menu/popup/NavigationMenuPopup.d.ts +1 -1
- package/esm/navigation-menu/portal/NavigationMenuPortal.d.ts +1 -1
- package/esm/navigation-menu/positioner/NavigationMenuPositioner.d.ts +1 -1
- package/esm/navigation-menu/root/NavigationMenuRoot.d.ts +2 -2
- package/esm/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -1
- package/esm/navigation-menu/viewport/NavigationMenuViewport.d.ts +1 -1
- package/esm/number-field/decrement/NumberFieldDecrement.d.ts +1 -1
- package/esm/number-field/decrement/NumberFieldDecrement.js +4 -6
- package/esm/number-field/group/NumberFieldGroup.d.ts +1 -1
- package/esm/number-field/increment/NumberFieldIncrement.d.ts +1 -1
- package/esm/number-field/increment/NumberFieldIncrement.js +4 -6
- package/esm/number-field/input/NumberFieldInput.d.ts +1 -1
- package/esm/number-field/input/NumberFieldInput.js +5 -2
- package/esm/number-field/root/NumberFieldRoot.d.ts +5 -4
- package/esm/number-field/root/NumberFieldRoot.js +12 -5
- package/esm/number-field/root/useNumberFieldButton.d.ts +0 -3
- package/esm/number-field/root/useNumberFieldButton.js +5 -11
- package/esm/number-field/scrub-area/NumberFieldScrubArea.d.ts +1 -1
- package/esm/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.d.ts +1 -1
- package/esm/popover/arrow/PopoverArrow.d.ts +1 -1
- package/esm/popover/backdrop/PopoverBackdrop.d.ts +1 -1
- package/esm/popover/close/PopoverClose.d.ts +1 -1
- package/esm/popover/description/PopoverDescription.d.ts +1 -1
- package/esm/popover/popup/PopoverPopup.d.ts +1 -1
- package/esm/popover/popup/PopoverPopup.js +0 -30
- package/esm/popover/portal/PopoverPortal.d.ts +1 -1
- package/esm/popover/positioner/PopoverPositioner.d.ts +1 -1
- package/esm/popover/positioner/PopoverPositioner.js +2 -1
- package/esm/popover/root/PopoverRoot.d.ts +2 -2
- package/esm/popover/store/PopoverStore.d.ts +4 -2
- package/esm/popover/store/PopoverStore.js +8 -5
- package/esm/popover/title/PopoverTitle.d.ts +1 -1
- package/esm/popover/trigger/PopoverTrigger.js +2 -2
- package/esm/popover/viewport/PopoverViewport.d.ts +1 -1
- package/esm/popover/viewport/PopoverViewport.js +28 -12
- package/esm/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
- package/esm/preview-card/arrow/PreviewCardArrow.js +2 -3
- package/esm/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
- package/esm/preview-card/backdrop/PreviewCardBackdrop.js +4 -5
- package/esm/preview-card/index.parts.d.ts +3 -1
- package/esm/preview-card/index.parts.js +3 -1
- package/esm/preview-card/popup/PreviewCardPopup.d.ts +2 -1
- package/esm/preview-card/popup/PreviewCardPopup.js +17 -11
- package/esm/preview-card/portal/PreviewCardPortal.d.ts +1 -1
- package/esm/preview-card/portal/PreviewCardPortal.js +2 -3
- package/esm/preview-card/positioner/PreviewCardPositioner.d.ts +2 -1
- package/esm/preview-card/positioner/PreviewCardPositioner.js +16 -11
- package/esm/preview-card/root/PreviewCardContext.d.ts +5 -26
- package/esm/preview-card/root/PreviewCardContext.js +2 -2
- package/esm/preview-card/root/PreviewCardRoot.d.ts +35 -10
- package/esm/preview-card/root/PreviewCardRoot.js +61 -116
- package/esm/preview-card/store/PreviewCardHandle.d.ts +33 -0
- package/esm/preview-card/store/PreviewCardHandle.js +55 -0
- package/esm/preview-card/store/PreviewCardStore.d.ts +36 -0
- package/esm/preview-card/store/PreviewCardStore.js +97 -0
- package/esm/preview-card/trigger/PreviewCardTrigger.d.ts +15 -3
- package/esm/preview-card/trigger/PreviewCardTrigger.js +49 -13
- package/esm/preview-card/viewport/PreviewCardViewport.d.ts +22 -0
- package/esm/preview-card/viewport/PreviewCardViewport.js +272 -0
- package/esm/preview-card/viewport/PreviewCardViewportCssVars.d.ts +14 -0
- package/esm/preview-card/viewport/PreviewCardViewportCssVars.js +15 -0
- package/esm/preview-card/viewport/PreviewCardViewportDataAttributes.d.ts +26 -0
- package/esm/preview-card/viewport/PreviewCardViewportDataAttributes.js +27 -0
- package/esm/progress/indicator/ProgressIndicator.d.ts +1 -1
- package/esm/progress/label/ProgressLabel.d.ts +1 -1
- package/esm/progress/root/ProgressRoot.d.ts +1 -1
- package/esm/progress/track/ProgressTrack.d.ts +1 -1
- package/esm/progress/value/ProgressValue.d.ts +1 -1
- package/esm/radio/indicator/RadioIndicator.d.ts +1 -1
- package/esm/radio/root/RadioRoot.d.ts +1 -1
- package/esm/radio/root/RadioRoot.js +9 -9
- package/esm/radio-group/RadioGroup.d.ts +4 -4
- package/esm/radio-group/RadioGroup.js +2 -2
- package/esm/scroll-area/content/ScrollAreaContent.d.ts +1 -1
- package/esm/scroll-area/content/ScrollAreaContent.js +10 -1
- package/esm/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/esm/scroll-area/corner/ScrollAreaCorner.js +1 -1
- package/esm/scroll-area/root/ScrollAreaRoot.d.ts +26 -2
- package/esm/scroll-area/root/ScrollAreaRoot.js +33 -29
- package/esm/scroll-area/root/ScrollAreaRootContext.d.ts +10 -43
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +1 -1
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.js +4 -4
- package/esm/scroll-area/thumb/ScrollAreaThumb.d.ts +2 -2
- package/esm/scroll-area/thumb/ScrollAreaThumb.js +1 -1
- package/esm/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
- package/esm/scroll-area/viewport/ScrollAreaViewport.js +51 -25
- package/esm/select/arrow/SelectArrow.d.ts +1 -1
- package/esm/select/backdrop/SelectBackdrop.d.ts +1 -1
- package/esm/select/group/SelectGroup.d.ts +1 -1
- package/esm/select/group-label/SelectGroupLabel.d.ts +1 -1
- package/esm/select/icon/SelectIcon.d.ts +1 -1
- package/esm/select/item/SelectItem.d.ts +1 -1
- package/esm/select/item/SelectItem.js +0 -1
- package/esm/select/item-indicator/SelectItemIndicator.d.ts +1 -1
- package/esm/select/item-text/SelectItemText.d.ts +1 -1
- package/esm/select/list/SelectList.d.ts +1 -1
- package/esm/select/popup/SelectPopup.d.ts +1 -1
- package/esm/select/popup/SelectPopup.js +154 -95
- package/esm/select/portal/SelectPortal.d.ts +1 -1
- package/esm/select/positioner/SelectPositioner.d.ts +1 -1
- package/esm/select/root/SelectRoot.d.ts +2 -2
- package/esm/select/root/SelectRoot.js +26 -13
- package/esm/select/scroll-arrow/SelectScrollArrow.d.ts +1 -1
- package/esm/select/scroll-down-arrow/SelectScrollDownArrow.d.ts +1 -1
- package/esm/select/scroll-up-arrow/SelectScrollUpArrow.d.ts +1 -1
- package/esm/select/store.d.ts +2 -1
- package/esm/select/store.js +19 -13
- package/esm/select/trigger/SelectTrigger.d.ts +14 -4
- package/esm/select/trigger/SelectTrigger.js +50 -18
- package/esm/select/value/SelectValue.d.ts +6 -1
- package/esm/select/value/SelectValue.js +19 -5
- package/esm/separator/Separator.d.ts +1 -1
- package/esm/slider/control/SliderControl.d.ts +1 -1
- package/esm/slider/control/SliderControl.js +1 -1
- package/esm/slider/control/SliderControlDataAttributes.d.ts +0 -8
- package/esm/slider/control/SliderControlDataAttributes.js +0 -8
- package/esm/slider/indicator/SliderIndicator.d.ts +1 -1
- package/esm/slider/indicator/SliderIndicatorDataAttributes.d.ts +0 -8
- package/esm/slider/indicator/SliderIndicatorDataAttributes.js +0 -8
- package/esm/slider/root/SliderRootDataAttributes.d.ts +0 -8
- package/esm/slider/root/SliderRootDataAttributes.js +0 -8
- package/esm/slider/thumb/SliderThumb.d.ts +2 -2
- package/esm/slider/thumb/SliderThumb.js +7 -1
- package/esm/slider/thumb/SliderThumbDataAttributes.d.ts +0 -8
- package/esm/slider/thumb/SliderThumbDataAttributes.js +0 -8
- package/esm/slider/track/SliderTrack.d.ts +1 -1
- package/esm/slider/track/SliderTrackDataAttributes.d.ts +0 -8
- package/esm/slider/track/SliderTrackDataAttributes.js +0 -8
- package/esm/slider/value/SliderValue.d.ts +1 -1
- package/esm/slider/value/SliderValueDataAttributes.d.ts +0 -8
- package/esm/slider/value/SliderValueDataAttributes.js +0 -8
- package/esm/switch/root/SwitchRoot.d.ts +6 -1
- package/esm/switch/root/SwitchRoot.js +15 -6
- package/esm/switch/thumb/SwitchThumb.d.ts +1 -1
- package/esm/tabs/indicator/TabsIndicator.d.ts +1 -1
- package/esm/tabs/indicator/TabsIndicator.js +6 -0
- package/esm/tabs/list/TabsList.d.ts +1 -1
- package/esm/tabs/panel/TabsPanel.d.ts +1 -1
- package/esm/tabs/root/TabsRoot.d.ts +1 -1
- package/esm/tabs/tab/TabsTab.d.ts +1 -1
- package/esm/toast/action/ToastAction.d.ts +1 -1
- package/esm/toast/arrow/ToastArrow.d.ts +1 -1
- package/esm/toast/close/ToastClose.d.ts +1 -1
- package/esm/toast/content/ToastContent.d.ts +1 -1
- package/esm/toast/description/ToastDescription.d.ts +1 -1
- package/esm/toast/portal/ToastPortal.d.ts +1 -1
- package/esm/toast/positioner/ToastPositioner.d.ts +1 -1
- package/esm/toast/provider/ToastProvider.js +46 -19
- package/esm/toast/root/ToastRoot.d.ts +1 -1
- package/esm/toast/title/ToastTitle.d.ts +1 -1
- package/esm/toast/viewport/ToastViewport.d.ts +1 -1
- package/esm/toggle/Toggle.d.ts +1 -1
- package/esm/toggle-group/ToggleGroup.d.ts +1 -1
- package/esm/toolbar/button/ToolbarButton.d.ts +1 -1
- package/esm/toolbar/group/ToolbarGroup.d.ts +1 -1
- package/esm/toolbar/input/ToolbarInput.d.ts +1 -1
- package/esm/toolbar/link/ToolbarLink.d.ts +1 -1
- package/esm/toolbar/root/ToolbarRoot.d.ts +1 -1
- package/esm/toolbar/separator/ToolbarSeparator.d.ts +1 -1
- package/esm/tooltip/arrow/TooltipArrow.d.ts +1 -1
- package/esm/tooltip/popup/TooltipPopup.d.ts +1 -1
- package/esm/tooltip/popup/TooltipPopup.js +0 -31
- package/esm/tooltip/portal/TooltipPortal.d.ts +1 -1
- package/esm/tooltip/positioner/TooltipPositioner.d.ts +1 -1
- package/esm/tooltip/positioner/TooltipPositioner.js +2 -1
- package/esm/tooltip/root/TooltipRoot.d.ts +4 -6
- package/esm/tooltip/root/TooltipRoot.js +1 -2
- package/esm/tooltip/store/TooltipStore.d.ts +4 -2
- package/esm/tooltip/store/TooltipStore.js +7 -4
- package/esm/tooltip/trigger/TooltipTrigger.js +1 -1
- package/esm/tooltip/viewport/TooltipViewport.d.ts +1 -1
- package/esm/tooltip/viewport/TooltipViewport.js +28 -12
- package/esm/use-render/index.d.ts +2 -1
- package/esm/use-render/index.js +2 -1
- package/esm/utils/FloatingPortalLite.d.ts +1 -1
- package/esm/utils/popups/popupStoreUtils.js +21 -2
- package/esm/utils/resolveValueLabel.d.ts +5 -1
- package/esm/utils/resolveValueLabel.js +46 -22
- package/esm/utils/styles.d.ts +1 -1
- package/esm/utils/styles.js +10 -6
- package/esm/utils/types.d.ts +1 -1
- package/esm/utils/useAnimationsFinished.d.ts +2 -2
- package/esm/utils/useAnimationsFinished.js +56 -33
- package/esm/utils/useOpenChangeComplete.js +8 -10
- package/esm/utils/useOpenInteractionType.js +6 -1
- package/esm/utils/usePopupAutoResize.js +82 -46
- package/field/control/FieldControl.d.ts +1 -1
- package/field/description/FieldDescription.d.ts +1 -1
- package/field/error/FieldError.d.ts +1 -1
- package/field/index.d.ts +2 -1
- package/field/item/FieldItem.d.ts +1 -1
- package/field/label/FieldLabel.d.ts +11 -2
- package/field/label/FieldLabel.js +51 -11
- package/field/root/FieldRoot.d.ts +10 -1
- package/field/root/FieldRoot.js +8 -0
- package/field/useField.js +7 -3
- package/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/fieldset/root/FieldsetRoot.d.ts +1 -1
- package/floating-ui-react/components/FloatingFocusManager.js +7 -6
- package/floating-ui-react/components/FloatingPortal.d.ts +2 -2
- package/floating-ui-react/components/FloatingPortal.js +11 -2
- package/floating-ui-react/hooks/useClientPoint.js +5 -4
- package/floating-ui-react/hooks/useDismiss.js +16 -3
- package/floating-ui-react/hooks/useFocus.d.ts +5 -0
- package/floating-ui-react/hooks/useFocus.js +43 -9
- package/floating-ui-react/hooks/useHoverReferenceInteraction.js +17 -4
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.js +3 -0
- package/form/Form.d.ts +18 -1
- package/form/Form.js +17 -0
- package/form/FormContext.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.js +12 -1
- package/input/Input.d.ts +1 -1
- package/menu/arrow/MenuArrow.d.ts +1 -1
- package/menu/backdrop/MenuBackdrop.d.ts +1 -1
- package/menu/checkbox-item/MenuCheckboxItem.d.ts +1 -1
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.d.ts +1 -1
- package/menu/group/MenuGroup.d.ts +1 -1
- package/menu/group-label/MenuGroupLabel.d.ts +1 -1
- package/menu/item/MenuItem.d.ts +1 -1
- package/menu/popup/MenuPopup.d.ts +1 -1
- package/menu/popup/MenuPopup.js +4 -3
- package/menu/portal/MenuPortal.d.ts +1 -1
- package/menu/positioner/MenuPositioner.d.ts +1 -1
- package/menu/radio-group/MenuRadioGroup.d.ts +1 -1
- package/menu/radio-item/MenuRadioItem.d.ts +1 -1
- package/menu/radio-item-indicator/MenuRadioItemIndicator.d.ts +1 -1
- package/menu/root/MenuRoot.d.ts +7 -6
- package/menu/root/MenuRoot.js +4 -2
- package/menu/store/MenuStore.js +3 -3
- package/menu/submenu-trigger/MenuSubmenuTrigger.d.ts +1 -1
- package/menu/trigger/MenuTrigger.js +14 -14
- package/menubar/Menubar.d.ts +1 -1
- package/merge-props/mergeProps.d.ts +31 -11
- package/merge-props/mergeProps.js +29 -8
- package/meter/indicator/MeterIndicator.d.ts +1 -1
- package/meter/label/MeterLabel.d.ts +1 -1
- package/meter/root/MeterRoot.d.ts +1 -1
- package/meter/track/MeterTrack.d.ts +1 -1
- package/meter/value/MeterValue.d.ts +1 -1
- package/navigation-menu/arrow/NavigationMenuArrow.d.ts +1 -1
- package/navigation-menu/backdrop/NavigationMenuBackdrop.d.ts +1 -1
- package/navigation-menu/content/NavigationMenuContent.d.ts +1 -1
- package/navigation-menu/content/NavigationMenuContent.js +6 -0
- package/navigation-menu/icon/NavigationMenuIcon.d.ts +1 -1
- package/navigation-menu/item/NavigationMenuItem.d.ts +1 -1
- package/navigation-menu/link/NavigationMenuLink.d.ts +1 -1
- package/navigation-menu/list/NavigationMenuList.d.ts +1 -1
- package/navigation-menu/popup/NavigationMenuPopup.d.ts +1 -1
- package/navigation-menu/portal/NavigationMenuPortal.d.ts +1 -1
- package/navigation-menu/positioner/NavigationMenuPositioner.d.ts +1 -1
- package/navigation-menu/root/NavigationMenuRoot.d.ts +2 -2
- package/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -1
- package/navigation-menu/viewport/NavigationMenuViewport.d.ts +1 -1
- package/number-field/decrement/NumberFieldDecrement.d.ts +1 -1
- package/number-field/decrement/NumberFieldDecrement.js +4 -6
- package/number-field/group/NumberFieldGroup.d.ts +1 -1
- package/number-field/increment/NumberFieldIncrement.d.ts +1 -1
- package/number-field/increment/NumberFieldIncrement.js +4 -6
- package/number-field/input/NumberFieldInput.d.ts +1 -1
- package/number-field/input/NumberFieldInput.js +5 -2
- package/number-field/root/NumberFieldRoot.d.ts +5 -4
- package/number-field/root/NumberFieldRoot.js +11 -4
- package/number-field/root/useNumberFieldButton.d.ts +0 -3
- package/number-field/root/useNumberFieldButton.js +5 -11
- package/number-field/scrub-area/NumberFieldScrubArea.d.ts +1 -1
- package/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.d.ts +1 -1
- package/package.json +13 -3
- package/popover/arrow/PopoverArrow.d.ts +1 -1
- package/popover/backdrop/PopoverBackdrop.d.ts +1 -1
- package/popover/close/PopoverClose.d.ts +1 -1
- package/popover/description/PopoverDescription.d.ts +1 -1
- package/popover/popup/PopoverPopup.d.ts +1 -1
- package/popover/popup/PopoverPopup.js +0 -30
- package/popover/portal/PopoverPortal.d.ts +1 -1
- package/popover/positioner/PopoverPositioner.d.ts +1 -1
- package/popover/positioner/PopoverPositioner.js +2 -1
- package/popover/root/PopoverRoot.d.ts +2 -2
- package/popover/store/PopoverStore.d.ts +4 -2
- package/popover/store/PopoverStore.js +8 -5
- package/popover/title/PopoverTitle.d.ts +1 -1
- package/popover/trigger/PopoverTrigger.js +2 -2
- package/popover/viewport/PopoverViewport.d.ts +1 -1
- package/popover/viewport/PopoverViewport.js +28 -12
- package/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
- package/preview-card/arrow/PreviewCardArrow.js +2 -3
- package/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
- package/preview-card/backdrop/PreviewCardBackdrop.js +4 -5
- package/preview-card/index.parts.d.ts +3 -1
- package/preview-card/index.parts.js +21 -1
- package/preview-card/popup/PreviewCardPopup.d.ts +2 -1
- package/preview-card/popup/PreviewCardPopup.js +17 -11
- package/preview-card/portal/PreviewCardPortal.d.ts +1 -1
- package/preview-card/portal/PreviewCardPortal.js +2 -3
- package/preview-card/positioner/PreviewCardPositioner.d.ts +2 -1
- package/preview-card/positioner/PreviewCardPositioner.js +16 -11
- package/preview-card/root/PreviewCardContext.d.ts +5 -26
- package/preview-card/root/PreviewCardContext.js +2 -2
- package/preview-card/root/PreviewCardRoot.d.ts +35 -10
- package/preview-card/root/PreviewCardRoot.js +59 -113
- package/preview-card/store/PreviewCardHandle.d.ts +33 -0
- package/preview-card/store/PreviewCardHandle.js +63 -0
- package/preview-card/store/PreviewCardStore.d.ts +36 -0
- package/preview-card/store/PreviewCardStore.js +105 -0
- package/preview-card/trigger/PreviewCardTrigger.d.ts +15 -3
- package/preview-card/trigger/PreviewCardTrigger.js +50 -13
- package/preview-card/viewport/PreviewCardViewport.d.ts +22 -0
- package/preview-card/viewport/PreviewCardViewport.js +278 -0
- package/preview-card/viewport/PreviewCardViewportCssVars.d.ts +14 -0
- package/preview-card/viewport/PreviewCardViewportCssVars.js +21 -0
- package/preview-card/viewport/PreviewCardViewportDataAttributes.d.ts +26 -0
- package/preview-card/viewport/PreviewCardViewportDataAttributes.js +33 -0
- package/progress/indicator/ProgressIndicator.d.ts +1 -1
- package/progress/label/ProgressLabel.d.ts +1 -1
- package/progress/root/ProgressRoot.d.ts +1 -1
- package/progress/track/ProgressTrack.d.ts +1 -1
- package/progress/value/ProgressValue.d.ts +1 -1
- package/radio/indicator/RadioIndicator.d.ts +1 -1
- package/radio/root/RadioRoot.d.ts +1 -1
- package/radio/root/RadioRoot.js +8 -8
- package/radio-group/RadioGroup.d.ts +4 -4
- package/radio-group/RadioGroup.js +1 -1
- package/scroll-area/content/ScrollAreaContent.d.ts +1 -1
- package/scroll-area/content/ScrollAreaContent.js +10 -1
- package/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/scroll-area/corner/ScrollAreaCorner.js +1 -1
- package/scroll-area/root/ScrollAreaRoot.d.ts +26 -2
- package/scroll-area/root/ScrollAreaRoot.js +33 -29
- package/scroll-area/root/ScrollAreaRootContext.d.ts +10 -43
- package/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +1 -1
- package/scroll-area/scrollbar/ScrollAreaScrollbar.js +4 -4
- package/scroll-area/thumb/ScrollAreaThumb.d.ts +2 -2
- package/scroll-area/thumb/ScrollAreaThumb.js +1 -1
- package/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
- package/scroll-area/viewport/ScrollAreaViewport.js +51 -25
- package/select/arrow/SelectArrow.d.ts +1 -1
- package/select/backdrop/SelectBackdrop.d.ts +1 -1
- package/select/group/SelectGroup.d.ts +1 -1
- package/select/group-label/SelectGroupLabel.d.ts +1 -1
- package/select/icon/SelectIcon.d.ts +1 -1
- package/select/item/SelectItem.d.ts +1 -1
- package/select/item/SelectItem.js +0 -1
- package/select/item-indicator/SelectItemIndicator.d.ts +1 -1
- package/select/item-text/SelectItemText.d.ts +1 -1
- package/select/list/SelectList.d.ts +1 -1
- package/select/popup/SelectPopup.d.ts +1 -1
- package/select/popup/SelectPopup.js +154 -95
- package/select/portal/SelectPortal.d.ts +1 -1
- package/select/positioner/SelectPositioner.d.ts +1 -1
- package/select/root/SelectRoot.d.ts +2 -2
- package/select/root/SelectRoot.js +24 -11
- package/select/scroll-arrow/SelectScrollArrow.d.ts +1 -1
- package/select/scroll-down-arrow/SelectScrollDownArrow.d.ts +1 -1
- package/select/scroll-up-arrow/SelectScrollUpArrow.d.ts +1 -1
- package/select/store.d.ts +2 -1
- package/select/store.js +18 -12
- package/select/trigger/SelectTrigger.d.ts +14 -4
- package/select/trigger/SelectTrigger.js +50 -18
- package/select/value/SelectValue.d.ts +6 -1
- package/select/value/SelectValue.js +18 -4
- package/separator/Separator.d.ts +1 -1
- package/slider/control/SliderControl.d.ts +1 -1
- package/slider/control/SliderControl.js +1 -1
- package/slider/control/SliderControlDataAttributes.d.ts +0 -8
- package/slider/control/SliderControlDataAttributes.js +0 -8
- package/slider/indicator/SliderIndicator.d.ts +1 -1
- package/slider/indicator/SliderIndicatorDataAttributes.d.ts +0 -8
- package/slider/indicator/SliderIndicatorDataAttributes.js +0 -8
- package/slider/root/SliderRootDataAttributes.d.ts +0 -8
- package/slider/root/SliderRootDataAttributes.js +0 -8
- package/slider/thumb/SliderThumb.d.ts +2 -2
- package/slider/thumb/SliderThumb.js +7 -1
- package/slider/thumb/SliderThumbDataAttributes.d.ts +0 -8
- package/slider/thumb/SliderThumbDataAttributes.js +0 -8
- package/slider/track/SliderTrack.d.ts +1 -1
- package/slider/track/SliderTrackDataAttributes.d.ts +0 -8
- package/slider/track/SliderTrackDataAttributes.js +0 -8
- package/slider/value/SliderValue.d.ts +1 -1
- package/slider/value/SliderValueDataAttributes.d.ts +0 -8
- package/slider/value/SliderValueDataAttributes.js +0 -8
- package/switch/root/SwitchRoot.d.ts +6 -1
- package/switch/root/SwitchRoot.js +14 -5
- package/switch/thumb/SwitchThumb.d.ts +1 -1
- package/tabs/indicator/TabsIndicator.d.ts +1 -1
- package/tabs/indicator/TabsIndicator.js +6 -0
- package/tabs/list/TabsList.d.ts +1 -1
- package/tabs/panel/TabsPanel.d.ts +1 -1
- package/tabs/root/TabsRoot.d.ts +1 -1
- package/tabs/tab/TabsTab.d.ts +1 -1
- package/toast/action/ToastAction.d.ts +1 -1
- package/toast/arrow/ToastArrow.d.ts +1 -1
- package/toast/close/ToastClose.d.ts +1 -1
- package/toast/content/ToastContent.d.ts +1 -1
- package/toast/description/ToastDescription.d.ts +1 -1
- package/toast/portal/ToastPortal.d.ts +1 -1
- package/toast/positioner/ToastPositioner.d.ts +1 -1
- package/toast/provider/ToastProvider.js +46 -19
- package/toast/root/ToastRoot.d.ts +1 -1
- package/toast/title/ToastTitle.d.ts +1 -1
- package/toast/viewport/ToastViewport.d.ts +1 -1
- package/toggle/Toggle.d.ts +1 -1
- package/toggle-group/ToggleGroup.d.ts +1 -1
- package/toolbar/button/ToolbarButton.d.ts +1 -1
- package/toolbar/group/ToolbarGroup.d.ts +1 -1
- package/toolbar/input/ToolbarInput.d.ts +1 -1
- package/toolbar/link/ToolbarLink.d.ts +1 -1
- package/toolbar/root/ToolbarRoot.d.ts +1 -1
- package/toolbar/separator/ToolbarSeparator.d.ts +1 -1
- package/tooltip/arrow/TooltipArrow.d.ts +1 -1
- package/tooltip/popup/TooltipPopup.d.ts +1 -1
- package/tooltip/popup/TooltipPopup.js +0 -31
- package/tooltip/portal/TooltipPortal.d.ts +1 -1
- package/tooltip/positioner/TooltipPositioner.d.ts +1 -1
- package/tooltip/positioner/TooltipPositioner.js +2 -1
- package/tooltip/root/TooltipRoot.d.ts +4 -6
- package/tooltip/root/TooltipRoot.js +1 -2
- package/tooltip/store/TooltipStore.d.ts +4 -2
- package/tooltip/store/TooltipStore.js +7 -4
- package/tooltip/trigger/TooltipTrigger.js +1 -1
- package/tooltip/viewport/TooltipViewport.d.ts +1 -1
- package/tooltip/viewport/TooltipViewport.js +28 -12
- package/use-render/index.d.ts +2 -1
- package/utils/FloatingPortalLite.d.ts +1 -1
- package/utils/popups/popupStoreUtils.js +21 -2
- package/utils/resolveValueLabel.d.ts +5 -1
- package/utils/resolveValueLabel.js +48 -22
- package/utils/styles.d.ts +1 -1
- package/utils/styles.js +10 -6
- package/utils/types.d.ts +1 -1
- package/utils/useAnimationsFinished.d.ts +2 -2
- package/utils/useAnimationsFinished.js +56 -33
- package/utils/useOpenChangeComplete.js +8 -10
- package/utils/useOpenInteractionType.js +6 -1
- package/utils/usePopupAutoResize.js +82 -46
- package/esm/utils/interactions/useFocusWithDelay.d.ts +0 -9
- package/esm/utils/interactions/useFocusWithDelay.js +0 -81
- package/utils/interactions/useFocusWithDelay.d.ts +0 -9
- package/utils/interactions/useFocusWithDelay.js +0 -87
- /package/esm/utils/{useMixedToggleClickHander.d.ts → useMixedToggleClickHandler.d.ts} +0 -0
- /package/esm/utils/{useMixedToggleClickHander.js → useMixedToggleClickHandler.js} +0 -0
- /package/utils/{useMixedToggleClickHander.d.ts → useMixedToggleClickHandler.d.ts} +0 -0
- /package/utils/{useMixedToggleClickHander.js → useMixedToggleClickHandler.js} +0 -0
|
@@ -5,7 +5,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
|
5
5
|
*
|
|
6
6
|
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
7
7
|
*/
|
|
8
|
-
export declare const NavigationMenuIcon: React.ForwardRefExoticComponent<NavigationMenuIconProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const NavigationMenuIcon: React.ForwardRefExoticComponent<Omit<NavigationMenuIconProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export interface NavigationMenuIconState {
|
|
10
10
|
/**
|
|
11
11
|
* Whether the navigation menu is open and the item is active.
|
|
@@ -6,7 +6,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
|
6
6
|
*
|
|
7
7
|
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
8
8
|
*/
|
|
9
|
-
export declare const NavigationMenuItem: React.ForwardRefExoticComponent<NavigationMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const NavigationMenuItem: React.ForwardRefExoticComponent<Omit<NavigationMenuItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export interface NavigationMenuItemState {}
|
|
11
11
|
export interface NavigationMenuItemProps extends BaseUIComponentProps<'li', NavigationMenuItem.State> {
|
|
12
12
|
/**
|
|
@@ -6,7 +6,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
|
6
6
|
*
|
|
7
7
|
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
8
8
|
*/
|
|
9
|
-
export declare const NavigationMenuLink: React.ForwardRefExoticComponent<NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
9
|
+
export declare const NavigationMenuLink: React.ForwardRefExoticComponent<Omit<NavigationMenuLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
10
|
export interface NavigationMenuLinkState {
|
|
11
11
|
/**
|
|
12
12
|
* Whether the link is the currently active page.
|
|
@@ -6,7 +6,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
|
6
6
|
*
|
|
7
7
|
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
8
8
|
*/
|
|
9
|
-
export declare const NavigationMenuList: React.ForwardRefExoticComponent<NavigationMenuListProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const NavigationMenuList: React.ForwardRefExoticComponent<Omit<NavigationMenuListProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export interface NavigationMenuListState {
|
|
11
11
|
/**
|
|
12
12
|
* If `true`, the popup is open.
|
|
@@ -7,7 +7,7 @@ import type { TransitionStatus } from "../../utils/useTransitionStatus.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
9
9
|
*/
|
|
10
|
-
export declare const NavigationMenuPopup: React.ForwardRefExoticComponent<NavigationMenuPopupProps & React.RefAttributes<HTMLElement>>;
|
|
10
|
+
export declare const NavigationMenuPopup: React.ForwardRefExoticComponent<Omit<NavigationMenuPopupProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
11
11
|
export interface NavigationMenuPopupState {
|
|
12
12
|
/**
|
|
13
13
|
* If `true`, the popup is open.
|
|
@@ -7,7 +7,7 @@ import { FloatingPortal } from "../../floating-ui-react/index.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
9
9
|
*/
|
|
10
|
-
export declare const NavigationMenuPortal: React.ForwardRefExoticComponent<NavigationMenuPortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export declare const NavigationMenuPortal: React.ForwardRefExoticComponent<Omit<NavigationMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export declare namespace NavigationMenuPortal {
|
|
12
12
|
interface State {}
|
|
13
13
|
}
|
|
@@ -7,7 +7,7 @@ import { useAnchorPositioning, type Align, type Side } from "../../utils/useAnch
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
9
9
|
*/
|
|
10
|
-
export declare const NavigationMenuPositioner: React.ForwardRefExoticComponent<NavigationMenuPositionerProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export declare const NavigationMenuPositioner: React.ForwardRefExoticComponent<Omit<NavigationMenuPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export interface NavigationMenuPositionerState {
|
|
12
12
|
/**
|
|
13
13
|
* Whether the navigation menu is currently open.
|
|
@@ -8,7 +8,7 @@ import { REASONS } from "../../utils/reasons.js";
|
|
|
8
8
|
*
|
|
9
9
|
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
10
10
|
*/
|
|
11
|
-
export declare const NavigationMenuRoot: React.ForwardRefExoticComponent<NavigationMenuRootProps & React.RefAttributes<HTMLElement>>;
|
|
11
|
+
export declare const NavigationMenuRoot: React.ForwardRefExoticComponent<Omit<NavigationMenuRootProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
12
12
|
export interface NavigationMenuRootState {
|
|
13
13
|
/**
|
|
14
14
|
* If `true`, the popup is open.
|
|
@@ -23,7 +23,7 @@ export interface NavigationMenuRootProps extends BaseUIComponentProps<'nav', Nav
|
|
|
23
23
|
/**
|
|
24
24
|
* A ref to imperative actions.
|
|
25
25
|
*/
|
|
26
|
-
actionsRef?: React.RefObject<NavigationMenuRoot.Actions>;
|
|
26
|
+
actionsRef?: React.RefObject<NavigationMenuRoot.Actions | null>;
|
|
27
27
|
/**
|
|
28
28
|
* Event handler called after any animations complete when the navigation menu is closed.
|
|
29
29
|
*/
|
|
@@ -7,7 +7,7 @@ import type { BaseUIComponentProps, NativeButtonProps } from "../../utils/types.
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
9
9
|
*/
|
|
10
|
-
export declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<NavigationMenuTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
export interface NavigationMenuTriggerState {
|
|
12
12
|
/**
|
|
13
13
|
* If `true`, the popup is open and the item is active.
|
|
@@ -6,7 +6,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
|
6
6
|
*
|
|
7
7
|
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
8
8
|
*/
|
|
9
|
-
export declare const NavigationMenuViewport: React.ForwardRefExoticComponent<NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const NavigationMenuViewport: React.ForwardRefExoticComponent<Omit<NavigationMenuViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export interface NavigationMenuViewportState {}
|
|
11
11
|
export interface NavigationMenuViewportProps extends BaseUIComponentProps<'div', NavigationMenuViewport.State> {}
|
|
12
12
|
export declare namespace NavigationMenuViewport {
|
|
@@ -7,7 +7,7 @@ import type { NumberFieldRoot } from "../root/NumberFieldRoot.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
9
9
|
*/
|
|
10
|
-
export declare const NumberFieldDecrement: React.ForwardRefExoticComponent<NumberFieldDecrementProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export declare const NumberFieldDecrement: React.ForwardRefExoticComponent<Omit<NumberFieldDecrementProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
export interface NumberFieldDecrementState extends NumberFieldRoot.State {}
|
|
12
12
|
export interface NumberFieldDecrementProps extends NativeButtonProps, BaseUIComponentProps<'button', NumberFieldDecrement.State> {}
|
|
13
13
|
export declare namespace NumberFieldDecrement {
|
|
@@ -32,7 +32,6 @@ export const NumberFieldDecrement = /*#__PURE__*/React.forwardRef(function Numbe
|
|
|
32
32
|
inputValue,
|
|
33
33
|
intentionalTouchCheckTimeout,
|
|
34
34
|
isPressedRef,
|
|
35
|
-
maxWithDefault,
|
|
36
35
|
minWithDefault,
|
|
37
36
|
movesAfterTouchRef,
|
|
38
37
|
readOnly,
|
|
@@ -46,15 +45,13 @@ export const NumberFieldDecrement = /*#__PURE__*/React.forwardRef(function Numbe
|
|
|
46
45
|
lastChangedValueRef,
|
|
47
46
|
onValueCommitted
|
|
48
47
|
} = useNumberFieldRootContext();
|
|
49
|
-
const
|
|
48
|
+
const isMin = value != null && value <= minWithDefault;
|
|
49
|
+
const disabled = disabledProp || contextDisabled || isMin;
|
|
50
50
|
const props = useNumberFieldButton({
|
|
51
51
|
isIncrement: false,
|
|
52
52
|
inputRef,
|
|
53
53
|
startAutoChange,
|
|
54
54
|
stopAutoChange,
|
|
55
|
-
minWithDefault,
|
|
56
|
-
maxWithDefault,
|
|
57
|
-
value,
|
|
58
55
|
inputValue,
|
|
59
56
|
disabled,
|
|
60
57
|
readOnly,
|
|
@@ -77,7 +74,8 @@ export const NumberFieldDecrement = /*#__PURE__*/React.forwardRef(function Numbe
|
|
|
77
74
|
buttonRef
|
|
78
75
|
} = useButton({
|
|
79
76
|
disabled,
|
|
80
|
-
native: nativeButton
|
|
77
|
+
native: nativeButton,
|
|
78
|
+
focusableWhenDisabled: true
|
|
81
79
|
});
|
|
82
80
|
const buttonState = React.useMemo(() => ({
|
|
83
81
|
...state,
|
|
@@ -7,7 +7,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
9
9
|
*/
|
|
10
|
-
export declare const NumberFieldGroup: React.ForwardRefExoticComponent<NumberFieldGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export declare const NumberFieldGroup: React.ForwardRefExoticComponent<Omit<NumberFieldGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export interface NumberFieldGroupState extends NumberFieldRoot.State {}
|
|
12
12
|
export interface NumberFieldGroupProps extends BaseUIComponentProps<'div', NumberFieldGroup.State> {}
|
|
13
13
|
export declare namespace NumberFieldGroup {
|
|
@@ -7,7 +7,7 @@ import type { NumberFieldRoot } from "../root/NumberFieldRoot.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
9
9
|
*/
|
|
10
|
-
export declare const NumberFieldIncrement: React.ForwardRefExoticComponent<NumberFieldIncrementProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export declare const NumberFieldIncrement: React.ForwardRefExoticComponent<Omit<NumberFieldIncrementProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
export interface NumberFieldIncrementState extends NumberFieldRoot.State {}
|
|
12
12
|
export interface NumberFieldIncrementProps extends NativeButtonProps, BaseUIComponentProps<'button', NumberFieldIncrement.State> {}
|
|
13
13
|
export declare namespace NumberFieldIncrement {
|
|
@@ -34,7 +34,6 @@ export const NumberFieldIncrement = /*#__PURE__*/React.forwardRef(function Numbe
|
|
|
34
34
|
isPressedRef,
|
|
35
35
|
locale,
|
|
36
36
|
maxWithDefault,
|
|
37
|
-
minWithDefault,
|
|
38
37
|
movesAfterTouchRef,
|
|
39
38
|
readOnly,
|
|
40
39
|
setValue,
|
|
@@ -46,15 +45,13 @@ export const NumberFieldIncrement = /*#__PURE__*/React.forwardRef(function Numbe
|
|
|
46
45
|
lastChangedValueRef,
|
|
47
46
|
onValueCommitted
|
|
48
47
|
} = useNumberFieldRootContext();
|
|
49
|
-
const
|
|
48
|
+
const isMax = value != null && value >= maxWithDefault;
|
|
49
|
+
const disabled = disabledProp || contextDisabled || isMax;
|
|
50
50
|
const props = useNumberFieldButton({
|
|
51
51
|
isIncrement: true,
|
|
52
52
|
inputRef,
|
|
53
53
|
startAutoChange,
|
|
54
54
|
stopAutoChange,
|
|
55
|
-
minWithDefault,
|
|
56
|
-
maxWithDefault,
|
|
57
|
-
value,
|
|
58
55
|
inputValue,
|
|
59
56
|
disabled,
|
|
60
57
|
readOnly,
|
|
@@ -77,7 +74,8 @@ export const NumberFieldIncrement = /*#__PURE__*/React.forwardRef(function Numbe
|
|
|
77
74
|
buttonRef
|
|
78
75
|
} = useButton({
|
|
79
76
|
disabled,
|
|
80
|
-
native: nativeButton
|
|
77
|
+
native: nativeButton,
|
|
78
|
+
focusableWhenDisabled: true
|
|
81
79
|
});
|
|
82
80
|
const buttonState = React.useMemo(() => ({
|
|
83
81
|
...state,
|
|
@@ -7,7 +7,7 @@ import type { NumberFieldRoot } from "../root/NumberFieldRoot.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
9
9
|
*/
|
|
10
|
-
export declare const NumberFieldInput: React.ForwardRefExoticComponent<NumberFieldInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
+
export declare const NumberFieldInput: React.ForwardRefExoticComponent<Omit<NumberFieldInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
export interface NumberFieldInputState extends NumberFieldRoot.State {}
|
|
12
12
|
export interface NumberFieldInputProps extends BaseUIComponentProps<'input', NumberFieldInput.State> {
|
|
13
13
|
/**
|
|
@@ -117,11 +117,14 @@ export const NumberFieldInput = /*#__PURE__*/React.forwardRef(function NumberFie
|
|
|
117
117
|
// causing a hydration mismatch.
|
|
118
118
|
suppressHydrationWarning: true,
|
|
119
119
|
onFocus(event) {
|
|
120
|
-
if (event.defaultPrevented || readOnly || disabled
|
|
120
|
+
if (event.defaultPrevented || readOnly || disabled) {
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
hasTouchedInputRef.current = true;
|
|
124
123
|
setFocused(true);
|
|
124
|
+
if (hasTouchedInputRef.current) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
hasTouchedInputRef.current = true;
|
|
125
128
|
|
|
126
129
|
// Browsers set selection at the start of the input field by default. We want to set it at
|
|
127
130
|
// the end for the first focus.
|
|
@@ -10,7 +10,7 @@ import { REASONS } from "../../utils/reasons.js";
|
|
|
10
10
|
*
|
|
11
11
|
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
12
12
|
*/
|
|
13
|
-
export declare const NumberFieldRoot: React.ForwardRefExoticComponent<NumberFieldRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export declare const NumberFieldRoot: React.ForwardRefExoticComponent<Omit<NumberFieldRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
14
|
export interface NumberFieldRootProps extends Omit<BaseUIComponentProps<'div', NumberFieldRootState>, 'onChange'> {
|
|
15
15
|
/**
|
|
16
16
|
* The id of the input element.
|
|
@@ -31,11 +31,12 @@ export interface NumberFieldRootProps extends Omit<BaseUIComponentProps<'div', N
|
|
|
31
31
|
*/
|
|
32
32
|
smallStep?: number;
|
|
33
33
|
/**
|
|
34
|
-
* Amount to increment and decrement with the buttons and arrow keys,
|
|
35
|
-
*
|
|
34
|
+
* Amount to increment and decrement with the buttons and arrow keys, or to scrub with pointer movement in the scrub area.
|
|
35
|
+
* To always enable step validation on form submission, specify the `min` prop explicitly in conjunction with this prop.
|
|
36
|
+
* Specify `step="any"` to always disable step validation.
|
|
36
37
|
* @default 1
|
|
37
38
|
*/
|
|
38
|
-
step?: number;
|
|
39
|
+
step?: number | 'any';
|
|
39
40
|
/**
|
|
40
41
|
* The large step value of the input element when incrementing while the shift key is held. Snaps
|
|
41
42
|
* to multiples of this value.
|
|
@@ -9,7 +9,7 @@ import { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';
|
|
|
9
9
|
import { useValueAsRef } from '@base-ui/utils/useValueAsRef';
|
|
10
10
|
import { useForcedRerendering } from '@base-ui/utils/useForcedRerendering';
|
|
11
11
|
import { useMergedRefs } from '@base-ui/utils/useMergedRefs';
|
|
12
|
-
import { visuallyHidden } from '@base-ui/utils/visuallyHidden';
|
|
12
|
+
import { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';
|
|
13
13
|
import { ownerDocument, ownerWindow } from '@base-ui/utils/owner';
|
|
14
14
|
import { isIOS } from '@base-ui/utils/detectBrowser';
|
|
15
15
|
import { NumberFieldRootContext } from "./NumberFieldRootContext.js";
|
|
@@ -37,7 +37,7 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
37
37
|
min,
|
|
38
38
|
max,
|
|
39
39
|
smallStep = 0.1,
|
|
40
|
-
step = 1,
|
|
40
|
+
step: stepProp = 1,
|
|
41
41
|
largeStep = 10,
|
|
42
42
|
required = false,
|
|
43
43
|
disabled: disabledProp = false,
|
|
@@ -69,6 +69,7 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
69
69
|
} = useFieldRootContext();
|
|
70
70
|
const disabled = fieldDisabled || disabledProp;
|
|
71
71
|
const name = fieldName ?? nameProp;
|
|
72
|
+
const step = stepProp === 'any' ? 1 : stepProp;
|
|
72
73
|
const [isScrubbing, setIsScrubbing] = React.useState(false);
|
|
73
74
|
const minWithDefault = min ?? Number.MIN_SAFE_INTEGER;
|
|
74
75
|
const maxWithDefault = max ?? Number.MAX_SAFE_INTEGER;
|
|
@@ -391,6 +392,9 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
391
392
|
value: contextValue,
|
|
392
393
|
children: [element, /*#__PURE__*/_jsx("input", {
|
|
393
394
|
...validation.getInputValidationProps({
|
|
395
|
+
onFocus() {
|
|
396
|
+
inputRef.current?.focus();
|
|
397
|
+
},
|
|
394
398
|
onChange(event) {
|
|
395
399
|
// Workaround for https://github.com/facebook/react/issues/9023
|
|
396
400
|
if (event.nativeEvent.defaultPrevented) {
|
|
@@ -413,13 +417,16 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
413
417
|
name: name,
|
|
414
418
|
value: value ?? '',
|
|
415
419
|
min: min,
|
|
416
|
-
max: max
|
|
417
|
-
|
|
420
|
+
max: max
|
|
421
|
+
// stepMismatch validation is broken unless an explicit `min` is added.
|
|
422
|
+
// See https://github.com/facebook/react/issues/12334.
|
|
423
|
+
,
|
|
424
|
+
step: stepProp,
|
|
418
425
|
disabled: disabled,
|
|
419
426
|
required: required,
|
|
420
427
|
"aria-hidden": true,
|
|
421
428
|
tabIndex: -1,
|
|
422
|
-
style: visuallyHidden
|
|
429
|
+
style: name ? visuallyHiddenInput : visuallyHidden
|
|
423
430
|
})]
|
|
424
431
|
});
|
|
425
432
|
});
|
|
@@ -17,14 +17,11 @@ export interface UseNumberFieldButtonParameters {
|
|
|
17
17
|
isIncrement: boolean;
|
|
18
18
|
isPressedRef: React.RefObject<boolean | null>;
|
|
19
19
|
locale?: Intl.LocalesArgument;
|
|
20
|
-
maxWithDefault: number;
|
|
21
|
-
minWithDefault: number;
|
|
22
20
|
movesAfterTouchRef: React.RefObject<number | null>;
|
|
23
21
|
readOnly: boolean;
|
|
24
22
|
setValue: (value: number | null, details: NumberFieldRoot.ChangeEventDetails) => void;
|
|
25
23
|
startAutoChange: (isIncrement: boolean, event?: React.MouseEvent | Event) => void;
|
|
26
24
|
stopAutoChange: () => void;
|
|
27
|
-
value: number | null;
|
|
28
25
|
valueRef: React.RefObject<number | null>;
|
|
29
26
|
lastChangedValueRef: React.RefObject<number | null>;
|
|
30
27
|
onValueCommitted: (value: number | null, eventDetails: NumberFieldRoot.CommitEventDetails) => void;
|
|
@@ -18,14 +18,11 @@ export function useNumberFieldButton(params) {
|
|
|
18
18
|
isIncrement,
|
|
19
19
|
isPressedRef,
|
|
20
20
|
locale,
|
|
21
|
-
maxWithDefault,
|
|
22
|
-
minWithDefault,
|
|
23
21
|
movesAfterTouchRef,
|
|
24
22
|
readOnly,
|
|
25
23
|
setValue,
|
|
26
24
|
startAutoChange,
|
|
27
25
|
stopAutoChange,
|
|
28
|
-
value,
|
|
29
26
|
valueRef,
|
|
30
27
|
lastChangedValueRef,
|
|
31
28
|
onValueCommitted
|
|
@@ -37,8 +34,6 @@ export function useNumberFieldButton(params) {
|
|
|
37
34
|
const isTouchingButtonRef = React.useRef(false);
|
|
38
35
|
const ignoreClickRef = React.useRef(false);
|
|
39
36
|
const pointerTypeRef = React.useRef('');
|
|
40
|
-
const isMin = value != null && value <= minWithDefault;
|
|
41
|
-
const isMax = value != null && value >= maxWithDefault;
|
|
42
37
|
const pressReason = isIncrement ? 'increment-press' : 'decrement-press';
|
|
43
38
|
function commitValue(nativeEvent) {
|
|
44
39
|
allowInputSyncRef.current = true;
|
|
@@ -55,7 +50,7 @@ export function useNumberFieldButton(params) {
|
|
|
55
50
|
}
|
|
56
51
|
}
|
|
57
52
|
const props = {
|
|
58
|
-
disabled
|
|
53
|
+
disabled,
|
|
59
54
|
'aria-readonly': readOnly || undefined,
|
|
60
55
|
'aria-label': isIncrement ? 'Increase' : 'Decrease',
|
|
61
56
|
'aria-controls': id,
|
|
@@ -74,7 +69,7 @@ export function useNumberFieldButton(params) {
|
|
|
74
69
|
isTouchingButtonRef.current = false;
|
|
75
70
|
},
|
|
76
71
|
onClick(event) {
|
|
77
|
-
const isDisabled = disabled || readOnly
|
|
72
|
+
const isDisabled = disabled || readOnly;
|
|
78
73
|
if (event.defaultPrevented || isDisabled || (
|
|
79
74
|
// If it's not a keyboard/virtual click, ignore.
|
|
80
75
|
pointerTypeRef.current === 'touch' ? ignoreClickRef.current : event.detail !== 0)) {
|
|
@@ -95,8 +90,7 @@ export function useNumberFieldButton(params) {
|
|
|
95
90
|
},
|
|
96
91
|
onPointerDown(event) {
|
|
97
92
|
const isMainButton = !event.button || event.button === 0;
|
|
98
|
-
|
|
99
|
-
if (event.defaultPrevented || readOnly || !isMainButton || isDisabled) {
|
|
93
|
+
if (event.defaultPrevented || readOnly || !isMainButton || disabled) {
|
|
100
94
|
return;
|
|
101
95
|
}
|
|
102
96
|
pointerTypeRef.current = event.pointerType;
|
|
@@ -142,7 +136,7 @@ export function useNumberFieldButton(params) {
|
|
|
142
136
|
}
|
|
143
137
|
},
|
|
144
138
|
onPointerMove(event) {
|
|
145
|
-
const isDisabled = disabled || readOnly
|
|
139
|
+
const isDisabled = disabled || readOnly;
|
|
146
140
|
if (isDisabled || event.pointerType !== 'touch' || !isPressedRef.current) {
|
|
147
141
|
return;
|
|
148
142
|
}
|
|
@@ -163,7 +157,7 @@ export function useNumberFieldButton(params) {
|
|
|
163
157
|
}
|
|
164
158
|
},
|
|
165
159
|
onMouseEnter(event) {
|
|
166
|
-
const isDisabled = disabled || readOnly
|
|
160
|
+
const isDisabled = disabled || readOnly;
|
|
167
161
|
if (event.defaultPrevented || isDisabled || !isPressedRef.current || isTouchingButtonRef.current || pointerTypeRef.current === 'touch') {
|
|
168
162
|
return;
|
|
169
163
|
}
|
|
@@ -7,7 +7,7 @@ import type { NumberFieldRoot } from "../root/NumberFieldRoot.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
9
9
|
*/
|
|
10
|
-
export declare const NumberFieldScrubArea: React.ForwardRefExoticComponent<NumberFieldScrubAreaProps & React.RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
export declare const NumberFieldScrubArea: React.ForwardRefExoticComponent<Omit<NumberFieldScrubAreaProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
11
11
|
export interface NumberFieldScrubAreaState extends NumberFieldRoot.State {}
|
|
12
12
|
export interface NumberFieldScrubAreaProps extends BaseUIComponentProps<'span', NumberFieldScrubArea.State> {
|
|
13
13
|
/**
|
|
@@ -10,7 +10,7 @@ import type { NumberFieldRoot } from "../root/NumberFieldRoot.js";
|
|
|
10
10
|
*
|
|
11
11
|
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
12
12
|
*/
|
|
13
|
-
export declare const NumberFieldScrubAreaCursor: React.ForwardRefExoticComponent<NumberFieldScrubAreaCursorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
13
|
+
export declare const NumberFieldScrubAreaCursor: React.ForwardRefExoticComponent<Omit<NumberFieldScrubAreaCursorProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
14
14
|
export interface NumberFieldScrubAreaCursorState extends NumberFieldRoot.State {}
|
|
15
15
|
export interface NumberFieldScrubAreaCursorProps extends BaseUIComponentProps<'span', NumberFieldScrubAreaCursor.State> {}
|
|
16
16
|
export declare namespace NumberFieldScrubAreaCursor {
|
|
@@ -7,7 +7,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
|
|
9
9
|
*/
|
|
10
|
-
export declare const PopoverArrow: React.ForwardRefExoticComponent<PopoverArrowProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export declare const PopoverArrow: React.ForwardRefExoticComponent<Omit<PopoverArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export interface PopoverArrowState {
|
|
12
12
|
/**
|
|
13
13
|
* Whether the popover is currently open.
|
|
@@ -7,7 +7,7 @@ import type { TransitionStatus } from "../../utils/useTransitionStatus.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
|
|
9
9
|
*/
|
|
10
|
-
export declare const PopoverBackdrop: React.ForwardRefExoticComponent<PopoverBackdropProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export declare const PopoverBackdrop: React.ForwardRefExoticComponent<Omit<PopoverBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export interface PopoverBackdropState {
|
|
12
12
|
/**
|
|
13
13
|
* Whether the popover is currently open.
|
|
@@ -6,7 +6,7 @@ import type { BaseUIComponentProps, NativeButtonProps } from "../../utils/types.
|
|
|
6
6
|
*
|
|
7
7
|
* Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
|
|
8
8
|
*/
|
|
9
|
-
export declare const PopoverClose: React.ForwardRefExoticComponent<PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export declare const PopoverClose: React.ForwardRefExoticComponent<Omit<PopoverCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
export interface PopoverCloseState {}
|
|
11
11
|
export interface PopoverCloseProps extends NativeButtonProps, BaseUIComponentProps<'button', PopoverClose.State> {}
|
|
12
12
|
export declare namespace PopoverClose {
|
|
@@ -6,7 +6,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
|
6
6
|
*
|
|
7
7
|
* Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
|
|
8
8
|
*/
|
|
9
|
-
export declare const PopoverDescription: React.ForwardRefExoticComponent<PopoverDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
9
|
+
export declare const PopoverDescription: React.ForwardRefExoticComponent<Omit<PopoverDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
10
10
|
export interface PopoverDescriptionState {}
|
|
11
11
|
export interface PopoverDescriptionProps extends BaseUIComponentProps<'p', PopoverDescription.State> {}
|
|
12
12
|
export declare namespace PopoverDescription {
|
|
@@ -9,7 +9,7 @@ import type { TransitionStatus } from "../../utils/useTransitionStatus.js";
|
|
|
9
9
|
*
|
|
10
10
|
* Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
|
|
11
11
|
*/
|
|
12
|
-
export declare const PopoverPopup: React.ForwardRefExoticComponent<PopoverPopupProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export declare const PopoverPopup: React.ForwardRefExoticComponent<Omit<PopoverPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
export interface PopoverPopupState {
|
|
14
14
|
/**
|
|
15
15
|
* Whether the popover is currently open.
|
|
@@ -10,8 +10,6 @@ import { transitionStatusMapping } from "../../utils/stateAttributesMapping.js";
|
|
|
10
10
|
import { useOpenChangeComplete } from "../../utils/useOpenChangeComplete.js";
|
|
11
11
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
12
12
|
import { REASONS } from "../../utils/reasons.js";
|
|
13
|
-
import { usePopupAutoResize } from "../../utils/usePopupAutoResize.js";
|
|
14
|
-
import { useDirection } from "../../direction-provider/DirectionContext.js";
|
|
15
13
|
import { COMPOSITE_KEYS } from "../../composite/composite.js";
|
|
16
14
|
import { useToolbarRootContext } from "../../toolbar/root/ToolbarRootContext.js";
|
|
17
15
|
import { getDisabledMountTransitionStyles } from "../../utils/getDisabledMountTransitionStyles.js";
|
|
@@ -40,7 +38,6 @@ export const PopoverPopup = /*#__PURE__*/React.forwardRef(function PopoverPopup(
|
|
|
40
38
|
} = usePopoverRootContext();
|
|
41
39
|
const positioner = usePopoverPositionerContext();
|
|
42
40
|
const insideToolbar = useToolbarRootContext(true) != null;
|
|
43
|
-
const direction = useDirection();
|
|
44
41
|
const open = store.useState('open');
|
|
45
42
|
const openMethod = store.useState('openMethod');
|
|
46
43
|
const instantType = store.useState('instantType');
|
|
@@ -51,9 +48,6 @@ export const PopoverPopup = /*#__PURE__*/React.forwardRef(function PopoverPopup(
|
|
|
51
48
|
const modal = store.useState('modal');
|
|
52
49
|
const mounted = store.useState('mounted');
|
|
53
50
|
const openReason = store.useState('openChangeReason');
|
|
54
|
-
const popupElement = store.useState('popupElement');
|
|
55
|
-
const payload = store.useState('payload');
|
|
56
|
-
const positionerElement = store.useState('positionerElement');
|
|
57
51
|
const activeTriggerElement = store.useState('activeTriggerElement');
|
|
58
52
|
const floatingContext = store.useState('floatingRootContext');
|
|
59
53
|
useOpenChangeComplete({
|
|
@@ -93,30 +87,6 @@ export const PopoverPopup = /*#__PURE__*/React.forwardRef(function PopoverPopup(
|
|
|
93
87
|
const setPopupElement = React.useCallback(element => {
|
|
94
88
|
store.set('popupElement', element);
|
|
95
89
|
}, [store]);
|
|
96
|
-
function handleMeasureLayout() {
|
|
97
|
-
floatingContext.context.events.emit('measure-layout');
|
|
98
|
-
}
|
|
99
|
-
function handleMeasureLayoutComplete(previousDimensions, nextDimensions) {
|
|
100
|
-
floatingContext.context.events.emit('measure-layout-complete', {
|
|
101
|
-
previousDimensions,
|
|
102
|
-
nextDimensions
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// If there's just one trigger, we can skip the auto-resize logic as
|
|
107
|
-
// the popover will always be anchored to the same position.
|
|
108
|
-
const autoresizeEnabled = React.useCallback(() => store.context.triggerElements.size > 1, [store]);
|
|
109
|
-
usePopupAutoResize({
|
|
110
|
-
popupElement,
|
|
111
|
-
positionerElement,
|
|
112
|
-
mounted,
|
|
113
|
-
content: payload,
|
|
114
|
-
enabled: autoresizeEnabled,
|
|
115
|
-
onMeasureLayout: handleMeasureLayout,
|
|
116
|
-
onMeasureLayoutComplete: handleMeasureLayoutComplete,
|
|
117
|
-
side: positioner.side,
|
|
118
|
-
direction
|
|
119
|
-
});
|
|
120
90
|
const element = useRenderElement('div', componentProps, {
|
|
121
91
|
state,
|
|
122
92
|
ref: [forwardedRef, store.context.popupRef, setPopupElement],
|
|
@@ -7,7 +7,7 @@ import { FloatingPortal } from "../../floating-ui-react/index.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
|
|
9
9
|
*/
|
|
10
|
-
export declare const PopoverPortal: React.ForwardRefExoticComponent<PopoverPortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export declare const PopoverPortal: React.ForwardRefExoticComponent<Omit<PopoverPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export declare namespace PopoverPortal {
|
|
12
12
|
interface State {}
|
|
13
13
|
}
|
|
@@ -7,7 +7,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)
|
|
9
9
|
*/
|
|
10
|
-
export declare const PopoverPositioner: React.ForwardRefExoticComponent<PopoverPositionerProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export declare const PopoverPositioner: React.ForwardRefExoticComponent<Omit<PopoverPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export interface PopoverPositionerState {
|
|
12
12
|
/**
|
|
13
13
|
* Whether the popover is currently open.
|
|
@@ -56,6 +56,7 @@ export const PopoverPositioner = /*#__PURE__*/React.forwardRef(function PopoverP
|
|
|
56
56
|
const positionerElement = store.useState('positionerElement');
|
|
57
57
|
const instantType = store.useState('instantType');
|
|
58
58
|
const transitionStatus = store.useState('transitionStatus');
|
|
59
|
+
const hasViewport = store.useState('hasViewport');
|
|
59
60
|
const prevTriggerElementRef = React.useRef(null);
|
|
60
61
|
const runOnceAnimationsFinish = useAnimationsFinished(positionerElement, false, false);
|
|
61
62
|
const positioning = useAnchorPositioning({
|
|
@@ -75,7 +76,7 @@ export const PopoverPositioner = /*#__PURE__*/React.forwardRef(function PopoverP
|
|
|
75
76
|
keepMounted,
|
|
76
77
|
nodeId,
|
|
77
78
|
collisionAvoidance,
|
|
78
|
-
adaptiveOrigin
|
|
79
|
+
adaptiveOrigin: hasViewport ? adaptiveOrigin : undefined
|
|
79
80
|
});
|
|
80
81
|
const defaultProps = React.useMemo(() => {
|
|
81
82
|
const hiddenStyles = {};
|
|
@@ -49,13 +49,13 @@ export interface PopoverRootProps<Payload = unknown> {
|
|
|
49
49
|
modal?: boolean | 'trap-focus';
|
|
50
50
|
/**
|
|
51
51
|
* ID of the trigger that the popover is associated with.
|
|
52
|
-
* This is useful in
|
|
52
|
+
* This is useful in conjunction with the `open` prop to create a controlled popover.
|
|
53
53
|
* There's no need to specify this prop when the popover is uncontrolled (i.e. when the `open` prop is not set).
|
|
54
54
|
*/
|
|
55
55
|
triggerId?: string | null;
|
|
56
56
|
/**
|
|
57
57
|
* ID of the trigger that the popover is associated with.
|
|
58
|
-
* This is useful in
|
|
58
|
+
* This is useful in conjunction with the `defaultOpen` prop to create an initially open popover.
|
|
59
59
|
*/
|
|
60
60
|
defaultTriggerId?: string | null;
|
|
61
61
|
/**
|
|
@@ -16,6 +16,7 @@ export type State<Payload> = PopupStoreState<Payload> & {
|
|
|
16
16
|
descriptionElementId: string | undefined;
|
|
17
17
|
openOnHover: boolean;
|
|
18
18
|
closeDelay: number;
|
|
19
|
+
hasViewport: boolean;
|
|
19
20
|
};
|
|
20
21
|
type Context = PopupStoreContext<PopoverRoot.ChangeEventDetails> & {
|
|
21
22
|
readonly popupRef: React.RefObject<HTMLElement | null>;
|
|
@@ -36,6 +37,7 @@ declare const selectors: {
|
|
|
36
37
|
descriptionElementId: (state: State<unknown>) => string | undefined;
|
|
37
38
|
openOnHover: (state: State<unknown>) => boolean;
|
|
38
39
|
closeDelay: (state: State<unknown>) => number;
|
|
40
|
+
hasViewport: (state: State<unknown>) => boolean;
|
|
39
41
|
open: (state: PopupStoreState<unknown>) => boolean;
|
|
40
42
|
mounted: (state: PopupStoreState<unknown>) => boolean;
|
|
41
43
|
transitionStatus: (state: PopupStoreState<unknown>) => import("../../utils/useTransitionStatus.js").TransitionStatus;
|
|
@@ -47,8 +49,8 @@ declare const selectors: {
|
|
|
47
49
|
isTriggerActive: (state: PopupStoreState<unknown>, triggerId: string | undefined) => boolean;
|
|
48
50
|
isOpenedByTrigger: (state: PopupStoreState<unknown>, triggerId: string | undefined) => boolean;
|
|
49
51
|
isMountedByTrigger: (state: PopupStoreState<unknown>, triggerId: string | undefined) => boolean;
|
|
50
|
-
triggerProps: (state: PopupStoreState<unknown>, isActive: boolean) => import("../../
|
|
51
|
-
popupProps: (state: PopupStoreState<unknown>) => import("../../
|
|
52
|
+
triggerProps: (state: PopupStoreState<unknown>, isActive: boolean) => import("../../index.js").HTMLProps;
|
|
53
|
+
popupProps: (state: PopupStoreState<unknown>) => import("../../index.js").HTMLProps;
|
|
52
54
|
popupElement: (state: PopupStoreState<unknown>) => HTMLElement | null;
|
|
53
55
|
positionerElement: (state: PopupStoreState<unknown>) => HTMLElement | null;
|
|
54
56
|
};
|