@base-ui/react 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +229 -0
- package/accordion/item/AccordionItem.js +6 -13
- package/accordion/item/AccordionItem.mjs +6 -13
- package/accordion/item/AccordionItemContext.d.mts +2 -1
- package/accordion/item/AccordionItemContext.d.ts +2 -1
- package/accordion/item/stateAttributesMapping.js +3 -5
- package/accordion/item/stateAttributesMapping.mjs +3 -5
- package/accordion/panel/AccordionPanel.js +12 -11
- package/accordion/panel/AccordionPanel.mjs +12 -11
- package/accordion/panel/AccordionPanelDataAttributes.d.mts +1 -1
- package/accordion/panel/AccordionPanelDataAttributes.d.ts +1 -1
- package/accordion/panel/AccordionPanelDataAttributes.js +1 -1
- package/accordion/panel/AccordionPanelDataAttributes.mjs +1 -1
- package/accordion/root/AccordionRoot.js +4 -7
- package/accordion/root/AccordionRoot.mjs +4 -7
- package/accordion/trigger/AccordionTrigger.js +7 -7
- package/accordion/trigger/AccordionTrigger.mjs +7 -7
- package/alert-dialog/handle.d.mts +6 -8
- package/alert-dialog/handle.d.ts +6 -8
- package/alert-dialog/handle.js +8 -19
- package/alert-dialog/handle.mjs +7 -17
- package/alert-dialog/root/AlertDialogRoot.js +1 -1
- package/alert-dialog/root/AlertDialogRoot.mjs +1 -1
- package/autocomplete/index.d.mts +1 -0
- package/autocomplete/index.d.ts +1 -0
- package/autocomplete/index.parts.d.mts +1 -1
- package/autocomplete/index.parts.d.ts +1 -1
- package/autocomplete/index.parts.js +2 -2
- package/autocomplete/index.parts.mjs +1 -1
- package/autocomplete/input-group/AutocompleteInputGroup.d.mts +1 -1
- package/autocomplete/input-group/AutocompleteInputGroup.d.ts +1 -1
- package/autocomplete/root/AutocompleteRoot.d.mts +6 -1
- package/autocomplete/root/AutocompleteRoot.d.ts +6 -1
- package/autocomplete/root/AutocompleteRoot.js +4 -10
- package/autocomplete/root/AutocompleteRoot.mjs +4 -10
- package/autocomplete/separator/AutocompleteSeparator.d.mts +26 -0
- package/autocomplete/separator/AutocompleteSeparator.d.ts +26 -0
- package/autocomplete/separator/AutocompleteSeparator.js +15 -0
- package/autocomplete/separator/AutocompleteSeparator.mjs +10 -0
- package/autocomplete/trigger/AutocompleteTrigger.d.mts +1 -1
- package/autocomplete/trigger/AutocompleteTrigger.d.ts +1 -1
- package/avatar/fallback/AvatarFallback.d.mts +2 -0
- package/avatar/fallback/AvatarFallback.d.ts +2 -0
- package/avatar/fallback/AvatarFallback.js +5 -5
- package/avatar/fallback/AvatarFallback.mjs +5 -5
- package/avatar/image/AvatarImage.d.mts +1 -1
- package/avatar/image/AvatarImage.d.ts +1 -1
- package/avatar/image/AvatarImageDataAttributes.d.mts +1 -1
- package/avatar/image/AvatarImageDataAttributes.d.ts +1 -1
- package/avatar/image/AvatarImageDataAttributes.js +1 -1
- package/avatar/image/AvatarImageDataAttributes.mjs +1 -1
- package/checkbox/indicator/CheckboxIndicator.js +3 -5
- package/checkbox/indicator/CheckboxIndicator.mjs +3 -5
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.d.mts +1 -1
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.d.ts +1 -1
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.js +1 -1
- package/checkbox/indicator/CheckboxIndicatorDataAttributes.mjs +1 -1
- package/checkbox/root/CheckboxRoot.d.mts +2 -1
- package/checkbox/root/CheckboxRoot.d.ts +2 -1
- package/checkbox/root/CheckboxRoot.js +39 -31
- package/checkbox/root/CheckboxRoot.mjs +39 -31
- package/checkbox/utils/{useStateAttributesMapping.d.mts → getCheckboxStateAttributesMapping.d.mts} +1 -1
- package/checkbox/utils/{useStateAttributesMapping.d.ts → getCheckboxStateAttributesMapping.d.ts} +1 -1
- package/checkbox/utils/getCheckboxStateAttributesMapping.js +26 -0
- package/checkbox/utils/{useStateAttributesMapping.mjs → getCheckboxStateAttributesMapping.mjs} +5 -9
- package/checkbox-group/CheckboxGroup.js +33 -24
- package/checkbox-group/CheckboxGroup.mjs +33 -24
- package/checkbox-group/CheckboxGroupContext.d.mts +2 -5
- package/checkbox-group/CheckboxGroupContext.d.ts +2 -5
- package/checkbox-group/CheckboxGroupContext.js +2 -8
- package/checkbox-group/CheckboxGroupContext.mjs +2 -7
- package/checkbox-group/useCheckboxGroupParent.d.mts +2 -4
- package/checkbox-group/useCheckboxGroupParent.d.ts +2 -4
- package/checkbox-group/useCheckboxGroupParent.js +5 -6
- package/checkbox-group/useCheckboxGroupParent.mjs +5 -6
- package/collapsible/panel/CollapsiblePanel.js +12 -11
- package/collapsible/panel/CollapsiblePanel.mjs +12 -11
- package/collapsible/panel/CollapsiblePanelDataAttributes.d.mts +1 -1
- package/collapsible/panel/CollapsiblePanelDataAttributes.d.ts +1 -1
- package/collapsible/panel/CollapsiblePanelDataAttributes.js +1 -1
- package/collapsible/panel/CollapsiblePanelDataAttributes.mjs +1 -1
- package/collapsible/panel/useCollapsiblePanel.js +29 -24
- package/collapsible/panel/useCollapsiblePanel.mjs +29 -24
- package/collapsible/root/CollapsibleRootDataAttributes.d.mts +18 -0
- package/collapsible/root/CollapsibleRootDataAttributes.d.ts +18 -0
- package/collapsible/root/CollapsibleRootDataAttributes.js +26 -0
- package/collapsible/root/CollapsibleRootDataAttributes.mjs +20 -0
- package/collapsible/root/useCollapsibleRoot.d.mts +2 -1
- package/collapsible/root/useCollapsibleRoot.d.ts +2 -1
- package/collapsible/root/useCollapsibleRoot.js +5 -3
- package/collapsible/root/useCollapsibleRoot.mjs +5 -3
- package/combobox/arrow/ComboboxArrow.d.mts +1 -1
- package/combobox/arrow/ComboboxArrow.d.ts +1 -1
- package/combobox/backdrop/ComboboxBackdropDataAttributes.d.mts +1 -1
- package/combobox/backdrop/ComboboxBackdropDataAttributes.d.ts +1 -1
- package/combobox/backdrop/ComboboxBackdropDataAttributes.js +1 -1
- package/combobox/backdrop/ComboboxBackdropDataAttributes.mjs +1 -1
- package/combobox/chip/ComboboxChip.js +4 -6
- package/combobox/chip/ComboboxChip.mjs +4 -6
- package/combobox/chip-remove/ComboboxChipRemove.js +1 -7
- package/combobox/chip-remove/ComboboxChipRemove.mjs +1 -7
- package/combobox/clear/ComboboxClear.js +5 -3
- package/combobox/clear/ComboboxClear.mjs +5 -3
- package/combobox/clear/ComboboxClearDataAttributes.d.mts +1 -1
- package/combobox/clear/ComboboxClearDataAttributes.d.ts +1 -1
- package/combobox/clear/ComboboxClearDataAttributes.js +1 -1
- package/combobox/clear/ComboboxClearDataAttributes.mjs +1 -1
- package/combobox/collection/ComboboxCollection.d.mts +1 -1
- package/combobox/collection/ComboboxCollection.d.ts +1 -1
- package/combobox/collection/ComboboxCollection.js +0 -3
- package/combobox/collection/ComboboxCollection.mjs +0 -3
- package/combobox/group-label/ComboboxGroupLabel.js +1 -1
- package/combobox/group-label/ComboboxGroupLabel.mjs +1 -1
- package/combobox/index.d.mts +1 -0
- package/combobox/index.d.ts +1 -0
- package/combobox/index.parts.d.mts +1 -1
- package/combobox/index.parts.d.ts +1 -1
- package/combobox/index.parts.js +2 -2
- package/combobox/index.parts.mjs +1 -1
- package/combobox/input/ComboboxInput.d.mts +1 -1
- package/combobox/input/ComboboxInput.d.ts +1 -1
- package/combobox/input/ComboboxInput.js +43 -88
- package/combobox/input/ComboboxInput.mjs +44 -89
- package/combobox/input-group/ComboboxInputGroup.d.mts +1 -1
- package/combobox/input-group/ComboboxInputGroup.d.ts +1 -1
- package/combobox/input-group/ComboboxInputGroup.js +3 -8
- package/combobox/input-group/ComboboxInputGroup.mjs +4 -9
- package/combobox/item/ComboboxItem.js +21 -23
- package/combobox/item/ComboboxItem.mjs +22 -24
- package/combobox/item-indicator/ComboboxItemIndicator.js +1 -2
- package/combobox/item-indicator/ComboboxItemIndicator.mjs +1 -2
- package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.d.mts +1 -1
- package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.d.ts +1 -1
- package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.js +1 -1
- package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.mjs +1 -1
- package/combobox/label/ComboboxLabel.js +2 -1
- package/combobox/label/ComboboxLabel.mjs +2 -1
- package/combobox/list/ComboboxList.js +5 -10
- package/combobox/list/ComboboxList.mjs +5 -10
- package/combobox/popup/ComboboxPopup.d.mts +1 -1
- package/combobox/popup/ComboboxPopup.d.ts +1 -1
- package/combobox/popup/ComboboxPopup.js +5 -7
- package/combobox/popup/ComboboxPopup.mjs +6 -8
- package/combobox/popup/ComboboxPopupDataAttributes.d.mts +1 -1
- package/combobox/popup/ComboboxPopupDataAttributes.d.ts +1 -1
- package/combobox/popup/ComboboxPopupDataAttributes.js +1 -1
- package/combobox/popup/ComboboxPopupDataAttributes.mjs +1 -1
- package/combobox/portal/ComboboxPortal.d.mts +6 -2
- package/combobox/portal/ComboboxPortal.d.ts +6 -2
- package/combobox/positioner/ComboboxPositioner.d.mts +1 -1
- package/combobox/positioner/ComboboxPositioner.d.ts +1 -1
- package/combobox/positioner/ComboboxPositioner.js +13 -13
- package/combobox/positioner/ComboboxPositioner.mjs +14 -14
- package/combobox/positioner/ComboboxPositionerContext.d.mts +1 -1
- package/combobox/positioner/ComboboxPositionerContext.d.ts +1 -1
- package/combobox/root/AriaCombobox.d.mts +5 -10
- package/combobox/root/AriaCombobox.d.ts +5 -10
- package/combobox/root/AriaCombobox.js +259 -196
- package/combobox/root/AriaCombobox.mjs +262 -199
- package/combobox/root/utils/index.js +2 -4
- package/combobox/root/utils/index.mjs +2 -4
- package/combobox/root/utils/useFilter.js +2 -3
- package/combobox/root/utils/useFilter.mjs +2 -3
- package/combobox/separator/ComboboxSeparator.d.mts +26 -0
- package/combobox/separator/ComboboxSeparator.d.ts +26 -0
- package/combobox/separator/ComboboxSeparator.js +15 -0
- package/combobox/separator/ComboboxSeparator.mjs +10 -0
- package/combobox/store.d.mts +6 -9
- package/combobox/store.d.ts +6 -9
- package/combobox/store.js +47 -48
- package/combobox/store.mjs +47 -48
- package/combobox/trigger/ComboboxTrigger.d.mts +1 -1
- package/combobox/trigger/ComboboxTrigger.d.ts +1 -1
- package/combobox/trigger/ComboboxTrigger.js +12 -33
- package/combobox/trigger/ComboboxTrigger.mjs +14 -34
- package/combobox/utils/ComboboxInternalDismissButton.d.mts +1 -5
- package/combobox/utils/ComboboxInternalDismissButton.d.ts +1 -5
- package/combobox/utils/parts.d.mts +24 -0
- package/combobox/utils/parts.d.ts +24 -0
- package/combobox/utils/parts.js +59 -0
- package/combobox/utils/parts.mjs +50 -0
- package/combobox/utils/stateAttributesMapping.d.mts +3 -3
- package/combobox/utils/stateAttributesMapping.d.ts +3 -3
- package/combobox/utils/useInitialLiveRegionTextMutation.js +1 -1
- package/combobox/utils/useInitialLiveRegionTextMutation.mjs +1 -1
- package/context-menu/root/ContextMenuRoot.d.mts +3 -1
- package/context-menu/root/ContextMenuRoot.d.ts +3 -1
- package/context-menu/trigger/ContextMenuTrigger.js +40 -22
- package/context-menu/trigger/ContextMenuTrigger.mjs +40 -22
- package/dialog/backdrop/DialogBackdrop.js +2 -10
- package/dialog/backdrop/DialogBackdrop.mjs +3 -10
- package/dialog/backdrop/DialogBackdropDataAttributes.d.mts +1 -1
- package/dialog/backdrop/DialogBackdropDataAttributes.d.ts +1 -1
- package/dialog/backdrop/DialogBackdropDataAttributes.js +1 -1
- package/dialog/backdrop/DialogBackdropDataAttributes.mjs +1 -1
- package/dialog/close/DialogClose.js +1 -3
- package/dialog/close/DialogClose.mjs +1 -3
- package/dialog/description/DialogDescription.js +1 -3
- package/dialog/description/DialogDescription.mjs +1 -3
- package/dialog/popup/DialogPopup.js +7 -23
- package/dialog/popup/DialogPopup.mjs +8 -23
- package/dialog/popup/DialogPopupDataAttributes.d.mts +1 -1
- package/dialog/popup/DialogPopupDataAttributes.d.ts +1 -1
- package/dialog/popup/DialogPopupDataAttributes.js +1 -1
- package/dialog/popup/DialogPopupDataAttributes.mjs +1 -1
- package/dialog/portal/DialogPortal.d.mts +3 -3
- package/dialog/portal/DialogPortal.d.ts +3 -3
- package/dialog/portal/DialogPortal.js +1 -3
- package/dialog/portal/DialogPortal.mjs +1 -3
- package/dialog/root/DialogRoot.js +1 -5
- package/dialog/root/DialogRoot.mjs +1 -4
- package/dialog/root/DialogRootContext.d.mts +3 -7
- package/dialog/root/DialogRootContext.d.ts +3 -7
- package/dialog/root/DialogRootContext.js +4 -6
- package/dialog/root/DialogRootContext.mjs +3 -5
- package/dialog/root/useDialogRoot.d.mts +0 -6
- package/dialog/root/useDialogRoot.d.ts +0 -6
- package/dialog/root/useDialogRoot.js +33 -46
- package/dialog/root/useDialogRoot.mjs +34 -46
- package/dialog/root/useRenderDialogRoot.d.mts +1 -1
- package/dialog/root/useRenderDialogRoot.d.ts +1 -1
- package/dialog/root/useRenderDialogRoot.js +34 -42
- package/dialog/root/useRenderDialogRoot.mjs +36 -44
- package/dialog/store/DialogHandle.d.mts +20 -16
- package/dialog/store/DialogHandle.d.ts +20 -16
- package/dialog/store/DialogHandle.js +32 -27
- package/dialog/store/DialogHandle.mjs +33 -28
- package/dialog/store/DialogStore.d.mts +14 -4
- package/dialog/store/DialogStore.d.ts +14 -4
- package/dialog/store/DialogStore.js +49 -34
- package/dialog/store/DialogStore.mjs +49 -35
- package/dialog/title/DialogTitle.js +1 -3
- package/dialog/title/DialogTitle.mjs +1 -3
- package/dialog/trigger/DialogTrigger.js +4 -5
- package/dialog/trigger/DialogTrigger.mjs +5 -6
- package/dialog/utils/stateAttributesMapping.d.mts +12 -0
- package/dialog/utils/stateAttributesMapping.d.ts +12 -0
- package/dialog/utils/stateAttributesMapping.js +21 -0
- package/dialog/utils/stateAttributesMapping.mjs +15 -0
- package/dialog/viewport/DialogViewport.js +3 -22
- package/dialog/viewport/DialogViewport.mjs +3 -21
- package/dialog/viewport/DialogViewportDataAttributes.d.mts +1 -1
- package/dialog/viewport/DialogViewportDataAttributes.d.ts +1 -1
- package/dialog/viewport/DialogViewportDataAttributes.js +1 -1
- package/dialog/viewport/DialogViewportDataAttributes.mjs +1 -1
- package/docs/index.md +1 -0
- package/docs/react/components/accordion.md +1 -1
- package/docs/react/components/alert-dialog.md +25 -21
- package/docs/react/components/autocomplete.md +158 -103
- package/docs/react/components/avatar.md +15 -11
- package/docs/react/components/checkbox.md +21 -21
- package/docs/react/components/collapsible.md +10 -1
- package/docs/react/components/combobox.md +51 -23
- package/docs/react/components/context-menu.md +474 -87
- package/docs/react/components/dialog.md +396 -21
- package/docs/react/components/drawer.md +27 -23
- package/docs/react/components/field.md +11 -11
- package/docs/react/components/form.md +13 -11
- package/docs/react/components/menu.md +138 -118
- package/docs/react/components/menubar.md +41 -41
- package/docs/react/components/navigation-menu.md +57 -71
- package/docs/react/components/number-field.md +6 -6
- package/docs/react/components/otp-field.md +20 -18
- package/docs/react/components/popover.md +51 -36
- package/docs/react/components/preview-card.md +56 -47
- package/docs/react/components/progress.md +3 -3
- package/docs/react/components/radio.md +1 -1
- package/docs/react/components/select.md +57 -55
- package/docs/react/components/slider.md +22 -22
- package/docs/react/components/tabs.md +275 -1
- package/docs/react/components/toast.md +21 -26
- package/docs/react/components/toolbar.md +27 -23
- package/docs/react/components/tooltip.md +30 -17
- package/docs/react/handbook/animation.md +3 -3
- package/docs/react/handbook/forms.md +3 -3
- package/docs/react/handbook/styling.md +1 -1
- package/docs/react/overview/about.md +10 -7
- package/docs/react/overview/community.md +3 -2
- package/docs/react/overview/quick-start.md +3 -3
- package/docs/react/overview/releases/v1-7-0.md +236 -0
- package/docs/react/overview/releases.md +10 -2
- package/docs/react/utils/direction-provider.md +5 -2
- package/drawer/backdrop/DrawerBackdrop.js +2 -10
- package/drawer/backdrop/DrawerBackdrop.mjs +3 -10
- package/drawer/backdrop/DrawerBackdropDataAttributes.d.mts +1 -1
- package/drawer/backdrop/DrawerBackdropDataAttributes.d.ts +1 -1
- package/drawer/backdrop/DrawerBackdropDataAttributes.js +1 -1
- package/drawer/backdrop/DrawerBackdropDataAttributes.mjs +1 -1
- package/drawer/handle.d.mts +16 -0
- package/drawer/handle.d.ts +16 -0
- package/drawer/handle.js +25 -0
- package/drawer/handle.mjs +18 -0
- package/drawer/indent/DrawerIndent.js +1 -1
- package/drawer/indent/DrawerIndent.mjs +1 -1
- package/drawer/indent-background/DrawerIndentBackground.js +1 -1
- package/drawer/indent-background/DrawerIndentBackground.mjs +1 -1
- package/drawer/index.parts.d.mts +1 -1
- package/drawer/index.parts.d.ts +1 -1
- package/drawer/index.parts.js +3 -3
- package/drawer/index.parts.mjs +1 -1
- package/drawer/popup/DrawerPopup.js +10 -12
- package/drawer/popup/DrawerPopup.mjs +11 -13
- package/drawer/popup/DrawerPopupDataAttributes.d.mts +1 -1
- package/drawer/popup/DrawerPopupDataAttributes.d.ts +1 -1
- package/drawer/popup/DrawerPopupDataAttributes.js +1 -1
- package/drawer/popup/DrawerPopupDataAttributes.mjs +1 -1
- package/drawer/portal/DrawerPortal.d.mts +3 -3
- package/drawer/portal/DrawerPortal.d.ts +3 -3
- package/drawer/provider/DrawerProvider.js +13 -24
- package/drawer/provider/DrawerProvider.mjs +13 -24
- package/drawer/provider/DrawerProviderContext.d.mts +3 -4
- package/drawer/provider/DrawerProviderContext.d.ts +3 -4
- package/drawer/provider/DrawerProviderContext.js +2 -8
- package/drawer/provider/DrawerProviderContext.mjs +2 -7
- package/drawer/root/DrawerRoot.d.mts +2 -2
- package/drawer/root/DrawerRoot.d.ts +2 -2
- package/drawer/root/DrawerRoot.js +30 -34
- package/drawer/root/DrawerRoot.mjs +31 -35
- package/drawer/root/DrawerRootContext.d.mts +7 -2
- package/drawer/root/DrawerRootContext.d.ts +7 -2
- package/drawer/root/DrawerRootContext.js +1 -1
- package/drawer/root/DrawerRootContext.mjs +1 -1
- package/drawer/root/useDrawerSnapPoints.d.mts +6 -2
- package/drawer/root/useDrawerSnapPoints.d.ts +6 -2
- package/drawer/root/useDrawerSnapPoints.js +16 -24
- package/drawer/root/useDrawerSnapPoints.mjs +15 -24
- package/drawer/swipe-area/DrawerSwipeArea.js +82 -49
- package/drawer/swipe-area/DrawerSwipeArea.mjs +82 -49
- package/drawer/trigger/DrawerTrigger.d.mts +1 -1
- package/drawer/trigger/DrawerTrigger.d.ts +1 -1
- package/drawer/viewport/DrawerViewport.js +178 -340
- package/drawer/viewport/DrawerViewport.mjs +180 -342
- package/drawer/viewport/DrawerViewportContext.d.mts +1 -2
- package/drawer/viewport/DrawerViewportContext.d.ts +1 -2
- package/drawer/viewport/DrawerViewportContext.js +2 -8
- package/drawer/viewport/DrawerViewportContext.mjs +2 -7
- package/drawer/viewport/DrawerViewportDataAttributes.d.mts +1 -1
- package/drawer/viewport/DrawerViewportDataAttributes.d.ts +1 -1
- package/drawer/viewport/DrawerViewportDataAttributes.js +1 -1
- package/drawer/viewport/DrawerViewportDataAttributes.mjs +1 -1
- package/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardProvider.js +250 -60
- package/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardProvider.mjs +250 -60
- package/field/control/FieldControl.js +2 -2
- package/field/control/FieldControl.mjs +2 -2
- package/field/error/FieldError.js +2 -2
- package/field/error/FieldError.mjs +2 -2
- package/field/error/FieldErrorDataAttributes.d.mts +1 -1
- package/field/error/FieldErrorDataAttributes.d.ts +1 -1
- package/field/error/FieldErrorDataAttributes.js +1 -1
- package/field/error/FieldErrorDataAttributes.mjs +1 -1
- package/field/item/FieldItem.js +0 -5
- package/field/item/FieldItem.mjs +0 -5
- package/field/root/FieldRoot.js +8 -15
- package/field/root/FieldRoot.mjs +8 -15
- package/field/root/useFieldValidation.d.mts +17 -2
- package/field/root/useFieldValidation.d.ts +17 -2
- package/field/root/useFieldValidation.js +83 -77
- package/field/root/useFieldValidation.mjs +82 -77
- package/field/validity/FieldValidity.js +4 -0
- package/field/validity/FieldValidity.mjs +4 -0
- package/fieldset/legend/FieldsetLegend.js +3 -10
- package/fieldset/legend/FieldsetLegend.mjs +4 -10
- package/fieldset/root/FieldsetRootContext.d.mts +1 -1
- package/fieldset/root/FieldsetRootContext.d.ts +1 -1
- package/floating-ui-react/components/FloatingDelayGroup.d.mts +2 -41
- package/floating-ui-react/components/FloatingDelayGroup.d.ts +2 -41
- package/floating-ui-react/components/FloatingDelayGroup.js +0 -9
- package/floating-ui-react/components/FloatingDelayGroup.mjs +0 -9
- package/floating-ui-react/components/FloatingFocusManager.d.mts +1 -7
- package/floating-ui-react/components/FloatingFocusManager.d.ts +1 -7
- package/floating-ui-react/components/FloatingFocusManager.js +41 -27
- package/floating-ui-react/components/FloatingFocusManager.mjs +41 -27
- package/floating-ui-react/components/FloatingPortal.d.mts +7 -14
- package/floating-ui-react/components/FloatingPortal.d.ts +7 -14
- package/floating-ui-react/components/FloatingPortal.js +11 -13
- package/floating-ui-react/components/FloatingPortal.mjs +11 -13
- package/floating-ui-react/components/FloatingRootStore.js +6 -6
- package/floating-ui-react/components/FloatingRootStore.mjs +7 -7
- package/floating-ui-react/components/FloatingTree.d.mts +1 -19
- package/floating-ui-react/components/FloatingTree.d.ts +1 -19
- package/floating-ui-react/hooks/useClick.js +5 -1
- package/floating-ui-react/hooks/useClick.mjs +6 -2
- package/floating-ui-react/hooks/useDismiss.js +2 -2
- package/floating-ui-react/hooks/useDismiss.mjs +2 -2
- package/floating-ui-react/hooks/useFloating.d.mts +9 -1
- package/floating-ui-react/hooks/useFloating.d.ts +9 -1
- package/floating-ui-react/hooks/useFloating.js +14 -2
- package/floating-ui-react/hooks/useFloating.mjs +13 -2
- package/floating-ui-react/hooks/useHoverReferenceInteraction.d.mts +12 -0
- package/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +12 -0
- package/floating-ui-react/hooks/useHoverReferenceInteraction.js +16 -4
- package/floating-ui-react/hooks/useHoverReferenceInteraction.mjs +16 -4
- package/floating-ui-react/hooks/useListNavigation.js +15 -1
- package/floating-ui-react/hooks/useListNavigation.mjs +15 -1
- package/floating-ui-react/hooks/useTypeahead.d.mts +5 -5
- package/floating-ui-react/hooks/useTypeahead.d.ts +5 -5
- package/floating-ui-react/hooks/useTypeahead.js +9 -14
- package/floating-ui-react/hooks/useTypeahead.mjs +9 -14
- package/floating-ui-react/index.d.mts +0 -4
- package/floating-ui-react/index.d.ts +0 -4
- package/floating-ui-react/index.mjs +12 -0
- package/floating-ui-react/utils/composite.js +7 -0
- package/floating-ui-react/utils/composite.mjs +7 -0
- package/form/Form.d.mts +1 -1
- package/form/Form.d.ts +1 -1
- package/form/Form.js +62 -47
- package/form/Form.mjs +62 -47
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/PrehydrationScript.d.mts +36 -0
- package/internals/PrehydrationScript.d.ts +36 -0
- package/internals/PrehydrationScript.js +59 -0
- package/internals/PrehydrationScript.mjs +54 -0
- package/internals/composite/composite.d.mts +2 -10
- package/internals/composite/composite.d.ts +2 -10
- package/internals/composite/composite.js +4 -12
- package/internals/composite/composite.mjs +3 -11
- package/internals/composite/index.d.mts +2 -1
- package/internals/composite/index.d.ts +2 -1
- package/internals/composite/index.js +11 -4
- package/internals/composite/index.mjs +1 -1
- package/internals/composite/item/CompositeItem.d.mts +0 -3
- package/internals/composite/item/CompositeItem.d.ts +0 -3
- package/internals/composite/item/CompositeItem.js +2 -4
- package/internals/composite/item/CompositeItem.mjs +2 -4
- package/internals/composite/item/useCompositeItem.d.mts +1 -1
- package/internals/composite/item/useCompositeItem.d.ts +1 -1
- package/internals/composite/list/CompositeList.d.mts +3 -3
- package/internals/composite/list/CompositeList.d.ts +3 -3
- package/internals/composite/list/CompositeList.js +165 -86
- package/internals/composite/list/CompositeList.mjs +165 -86
- package/internals/composite/list/CompositeListContext.d.mts +8 -4
- package/internals/composite/list/CompositeListContext.d.ts +8 -4
- package/internals/composite/list/CompositeListContext.js +1 -6
- package/internals/composite/list/CompositeListContext.mjs +1 -6
- package/internals/composite/list/useCompositeListItem.d.mts +11 -8
- package/internals/composite/list/useCompositeListItem.d.ts +11 -8
- package/internals/composite/list/useCompositeListItem.js +25 -32
- package/internals/composite/list/useCompositeListItem.mjs +25 -32
- package/internals/composite/root/CompositeRoot.d.mts +1 -4
- package/internals/composite/root/CompositeRoot.d.ts +1 -4
- package/internals/composite/root/CompositeRoot.js +0 -3
- package/internals/composite/root/CompositeRoot.mjs +0 -3
- package/internals/composite/root/useCompositeRoot.d.mts +0 -1
- package/internals/composite/root/useCompositeRoot.d.ts +0 -1
- package/internals/composite/root/useCompositeRoot.js +19 -39
- package/internals/composite/root/useCompositeRoot.mjs +20 -40
- package/internals/createBaseUIEventDetails.d.mts +1 -1
- package/internals/createBaseUIEventDetails.d.ts +1 -1
- package/internals/csp-context/CSPContext.d.mts +0 -6
- package/internals/csp-context/CSPContext.d.ts +0 -6
- package/internals/csp-context/CSPContext.js +0 -7
- package/internals/csp-context/CSPContext.mjs +0 -7
- package/internals/direction-context/DirectionContext.d.mts +0 -3
- package/internals/direction-context/DirectionContext.d.ts +0 -3
- package/internals/direction-context/DirectionContext.js +0 -3
- package/internals/direction-context/DirectionContext.mjs +0 -3
- package/internals/field-constants/constants.js +2 -3
- package/internals/field-constants/constants.mjs +2 -3
- package/internals/field-register-control/useFieldControlRegistration.d.mts +1 -1
- package/internals/field-register-control/useFieldControlRegistration.d.ts +1 -1
- package/internals/field-register-control/useFieldControlRegistration.js +21 -16
- package/internals/field-register-control/useFieldControlRegistration.mjs +21 -16
- package/internals/field-register-control/useRegisterFieldControl.js +13 -9
- package/internals/field-register-control/useRegisterFieldControl.mjs +13 -8
- package/internals/field-root-context/FieldRootContext.d.mts +0 -7
- package/internals/field-root-context/FieldRootContext.d.ts +0 -7
- package/internals/field-root-context/FieldRootContext.js +2 -9
- package/internals/field-root-context/FieldRootContext.mjs +3 -10
- package/internals/form-context/FormContext.d.mts +1 -0
- package/internals/form-context/FormContext.d.ts +1 -0
- package/internals/form-context/FormContext.js +3 -0
- package/internals/form-context/FormContext.mjs +3 -0
- package/{utils → internals}/getDisabledMountTransitionStyles.d.mts +1 -1
- package/{utils → internals}/getDisabledMountTransitionStyles.d.ts +1 -1
- package/{utils → internals}/getDisabledMountTransitionStyles.js +1 -1
- package/{utils → internals}/getDisabledMountTransitionStyles.mjs +1 -1
- package/internals/itemEquality.d.mts +1 -0
- package/internals/itemEquality.d.ts +1 -0
- package/internals/itemEquality.js +7 -0
- package/internals/itemEquality.mjs +6 -0
- package/internals/labelable-provider/LabelableProvider.d.mts +0 -3
- package/internals/labelable-provider/LabelableProvider.d.ts +0 -3
- package/internals/labelable-provider/LabelableProvider.js +0 -3
- package/internals/labelable-provider/LabelableProvider.mjs +0 -4
- package/internals/labelable-provider/useAriaLabelledBy.d.mts +0 -3
- package/internals/labelable-provider/useAriaLabelledBy.d.ts +0 -3
- package/internals/labelable-provider/useAriaLabelledBy.js +0 -3
- package/internals/labelable-provider/useAriaLabelledBy.mjs +0 -4
- package/internals/labelable-provider/useLabel.d.mts +1 -1
- package/internals/labelable-provider/useLabel.d.ts +1 -1
- package/internals/labelable-provider/useLabelableId.js +1 -1
- package/internals/labelable-provider/useLabelableId.mjs +1 -1
- package/internals/prehydrationScript.stub.d.mts +1 -0
- package/internals/prehydrationScript.stub.d.ts +1 -0
- package/internals/prehydrationScript.stub.js +12 -0
- package/internals/prehydrationScript.stub.mjs +6 -0
- package/internals/stateAttributesMapping.d.mts +1 -1
- package/internals/stateAttributesMapping.d.ts +1 -1
- package/internals/stateAttributesMapping.js +3 -3
- package/internals/stateAttributesMapping.mjs +3 -3
- package/internals/use-button/useButton.js +30 -14
- package/internals/use-button/useButton.mjs +30 -14
- package/{utils → internals}/useAnchorPositioning.d.mts +11 -4
- package/{utils → internals}/useAnchorPositioning.d.ts +11 -4
- package/{utils → internals}/useAnchorPositioning.js +97 -68
- package/{utils → internals}/useAnchorPositioning.mjs +96 -68
- package/internals/useAnimationsFinished.d.mts +2 -3
- package/internals/useAnimationsFinished.d.ts +2 -3
- package/internals/useAnimationsFinished.js +8 -11
- package/internals/useAnimationsFinished.mjs +8 -11
- package/internals/useOpenChangeComplete.js +1 -1
- package/internals/useOpenChangeComplete.mjs +1 -1
- package/internals/usePressAndHold.d.mts +0 -1
- package/internals/usePressAndHold.d.ts +0 -1
- package/internals/usePressAndHold.js +4 -8
- package/internals/usePressAndHold.mjs +4 -8
- package/internals/useRenderElement.js +6 -6
- package/internals/useRenderElement.mjs +6 -6
- package/internals/useValueChanged.js +3 -6
- package/internals/useValueChanged.mjs +3 -6
- package/menu/arrow/MenuArrow.d.mts +1 -1
- package/menu/arrow/MenuArrow.d.ts +1 -1
- package/menu/backdrop/MenuBackdrop.js +1 -7
- package/menu/backdrop/MenuBackdrop.mjs +2 -7
- package/menu/backdrop/MenuBackdropDataAttributes.d.mts +1 -1
- package/menu/backdrop/MenuBackdropDataAttributes.d.ts +1 -1
- package/menu/backdrop/MenuBackdropDataAttributes.js +1 -1
- package/menu/backdrop/MenuBackdropDataAttributes.mjs +1 -1
- package/menu/checkbox-item/MenuCheckboxItem.js +6 -2
- package/menu/checkbox-item/MenuCheckboxItem.mjs +6 -2
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +2 -1
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.mjs +2 -1
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.d.mts +1 -1
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.d.ts +1 -1
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.js +1 -1
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicatorDataAttributes.mjs +1 -1
- package/menu/group/MenuGroupContext.d.mts +1 -1
- package/menu/group/MenuGroupContext.d.ts +1 -1
- package/menu/group-label/MenuGroupLabel.js +1 -1
- package/menu/group-label/MenuGroupLabel.mjs +1 -1
- package/menu/item/MenuItem.js +4 -1
- package/menu/item/MenuItem.mjs +4 -1
- package/menu/item/useMenuItem.js +1 -3
- package/menu/item/useMenuItem.mjs +1 -3
- package/menu/item/useMenuItemCommonProps.d.mts +2 -3
- package/menu/item/useMenuItemCommonProps.d.ts +2 -3
- package/menu/item/useMenuItemCommonProps.js +7 -2
- package/menu/item/useMenuItemCommonProps.mjs +7 -2
- package/menu/link-item/MenuLinkItem.d.mts +1 -1
- package/menu/link-item/MenuLinkItem.d.ts +1 -1
- package/menu/link-item/MenuLinkItem.js +4 -1
- package/menu/link-item/MenuLinkItem.mjs +4 -1
- package/menu/popup/MenuPopup.d.mts +1 -1
- package/menu/popup/MenuPopup.d.ts +1 -1
- package/menu/popup/MenuPopup.js +5 -14
- package/menu/popup/MenuPopup.mjs +7 -15
- package/menu/popup/MenuPopupDataAttributes.d.mts +1 -1
- package/menu/popup/MenuPopupDataAttributes.d.ts +1 -1
- package/menu/popup/MenuPopupDataAttributes.js +1 -1
- package/menu/popup/MenuPopupDataAttributes.mjs +1 -1
- package/menu/portal/MenuPortal.d.mts +6 -2
- package/menu/portal/MenuPortal.d.ts +6 -2
- package/menu/positioner/MenuPositioner.d.mts +1 -1
- package/menu/positioner/MenuPositioner.d.ts +1 -1
- package/menu/positioner/MenuPositioner.js +8 -6
- package/menu/positioner/MenuPositioner.mjs +8 -6
- package/menu/positioner/MenuPositionerContext.d.mts +1 -1
- package/menu/positioner/MenuPositionerContext.d.ts +1 -1
- package/menu/positioner/MenuPositionerCssVars.d.mts +12 -0
- package/menu/positioner/MenuPositionerCssVars.d.ts +12 -0
- package/menu/positioner/MenuPositionerCssVars.js +12 -0
- package/menu/positioner/MenuPositionerCssVars.mjs +12 -0
- package/menu/radio-item/MenuRadioItem.js +5 -2
- package/menu/radio-item/MenuRadioItem.mjs +5 -2
- package/menu/radio-item-indicator/MenuRadioItemIndicator.js +2 -1
- package/menu/radio-item-indicator/MenuRadioItemIndicator.mjs +2 -1
- package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.d.mts +1 -1
- package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.d.ts +1 -1
- package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.js +1 -1
- package/menu/radio-item-indicator/MenuRadioItemIndicatorDataAttributes.mjs +1 -1
- package/menu/root/MenuRoot.d.mts +11 -7
- package/menu/root/MenuRoot.d.ts +11 -7
- package/menu/root/MenuRoot.js +36 -13
- package/menu/root/MenuRoot.mjs +38 -15
- package/menu/store/MenuHandle.d.mts +18 -10
- package/menu/store/MenuHandle.d.ts +18 -10
- package/menu/store/MenuHandle.js +21 -20
- package/menu/store/MenuHandle.mjs +22 -19
- package/menu/store/MenuStore.d.mts +22 -7
- package/menu/store/MenuStore.d.ts +22 -7
- package/menu/store/MenuStore.js +71 -53
- package/menu/store/MenuStore.mjs +72 -55
- package/menu/submenu-trigger/MenuSubmenuTrigger.js +29 -8
- package/menu/submenu-trigger/MenuSubmenuTrigger.mjs +28 -8
- package/menu/trigger/MenuTrigger.js +7 -22
- package/menu/trigger/MenuTrigger.mjs +10 -24
- package/menu/utils/findRootOwnerId.js +1 -1
- package/menu/utils/findRootOwnerId.mjs +1 -1
- package/menu/viewport/MenuViewport.js +1 -9
- package/menu/viewport/MenuViewport.mjs +2 -9
- package/menubar/Menubar.js +2 -1
- package/menubar/Menubar.mjs +2 -1
- package/meter/root/MeterRoot.js +4 -6
- package/meter/root/MeterRoot.mjs +4 -6
- package/meter/root/MeterRootContext.d.mts +0 -2
- package/meter/root/MeterRootContext.d.ts +0 -2
- package/navigation-menu/arrow/NavigationMenuArrow.d.mts +1 -1
- package/navigation-menu/arrow/NavigationMenuArrow.d.ts +1 -1
- package/navigation-menu/arrow/NavigationMenuArrow.js +1 -1
- package/navigation-menu/arrow/NavigationMenuArrow.mjs +1 -1
- package/navigation-menu/backdrop/NavigationMenuBackdrop.js +1 -7
- package/navigation-menu/backdrop/NavigationMenuBackdrop.mjs +2 -7
- package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.d.mts +1 -1
- package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.d.ts +1 -1
- package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.js +1 -1
- package/navigation-menu/backdrop/NavigationMenuBackdropDataAttributes.mjs +1 -1
- package/navigation-menu/content/NavigationMenuContentDataAttributes.d.mts +1 -1
- package/navigation-menu/content/NavigationMenuContentDataAttributes.d.ts +1 -1
- package/navigation-menu/content/NavigationMenuContentDataAttributes.js +1 -1
- package/navigation-menu/content/NavigationMenuContentDataAttributes.mjs +1 -1
- package/navigation-menu/link/NavigationMenuLink.d.mts +1 -1
- package/navigation-menu/link/NavigationMenuLink.d.ts +1 -1
- package/navigation-menu/popup/NavigationMenuPopup.d.mts +1 -1
- package/navigation-menu/popup/NavigationMenuPopup.d.ts +1 -1
- package/navigation-menu/popup/NavigationMenuPopup.js +2 -8
- package/navigation-menu/popup/NavigationMenuPopup.mjs +3 -8
- package/navigation-menu/popup/NavigationMenuPopupDataAttributes.d.mts +1 -1
- package/navigation-menu/popup/NavigationMenuPopupDataAttributes.d.ts +1 -1
- package/navigation-menu/popup/NavigationMenuPopupDataAttributes.js +1 -1
- package/navigation-menu/popup/NavigationMenuPopupDataAttributes.mjs +1 -1
- package/navigation-menu/portal/NavigationMenuPortal.d.mts +3 -3
- package/navigation-menu/portal/NavigationMenuPortal.d.ts +3 -3
- package/navigation-menu/positioner/NavigationMenuPositioner.d.mts +1 -1
- package/navigation-menu/positioner/NavigationMenuPositioner.d.ts +1 -1
- package/navigation-menu/positioner/NavigationMenuPositioner.js +7 -6
- package/navigation-menu/positioner/NavigationMenuPositioner.mjs +7 -6
- package/navigation-menu/positioner/NavigationMenuPositionerContext.d.mts +2 -2
- package/navigation-menu/positioner/NavigationMenuPositionerContext.d.ts +2 -2
- package/navigation-menu/trigger/NavigationMenuTrigger.js +63 -101
- package/navigation-menu/trigger/NavigationMenuTrigger.mjs +63 -101
- package/navigation-menu/utils/isOutsideMenuEvent.js +2 -5
- package/navigation-menu/utils/isOutsideMenuEvent.mjs +2 -5
- package/navigation-menu/utils/useNavigationMenuAnchorPositioning.d.mts +6 -0
- package/navigation-menu/utils/useNavigationMenuAnchorPositioning.d.ts +6 -0
- package/navigation-menu/utils/useNavigationMenuAnchorPositioning.js +16 -0
- package/navigation-menu/utils/useNavigationMenuAnchorPositioning.mjs +12 -0
- package/number-field/input/NumberFieldInput.d.mts +1 -1
- package/number-field/input/NumberFieldInput.d.ts +1 -1
- package/number-field/input/NumberFieldInput.js +40 -25
- package/number-field/input/NumberFieldInput.mjs +41 -26
- package/number-field/root/NumberFieldRoot.js +37 -55
- package/number-field/root/NumberFieldRoot.mjs +38 -56
- package/number-field/root/NumberFieldRootContext.d.mts +0 -7
- package/number-field/root/NumberFieldRootContext.d.ts +0 -7
- package/number-field/root/useNumberFieldStepperButton.js +108 -21
- package/number-field/root/useNumberFieldStepperButton.mjs +108 -21
- package/number-field/scrub-area/NumberFieldScrubArea.js +28 -32
- package/number-field/scrub-area/NumberFieldScrubArea.mjs +28 -32
- package/number-field/utils/constants.d.mts +1 -2
- package/number-field/utils/constants.d.ts +1 -2
- package/number-field/utils/constants.js +2 -3
- package/number-field/utils/constants.mjs +1 -2
- package/number-field/utils/parse.d.mts +27 -15
- package/number-field/utils/parse.d.ts +27 -15
- package/number-field/utils/parse.js +74 -135
- package/number-field/utils/parse.mjs +73 -134
- package/number-field/utils/types.d.mts +2 -1
- package/number-field/utils/types.d.ts +2 -1
- package/number-field/utils/validate.d.mts +1 -19
- package/number-field/utils/validate.d.ts +1 -19
- package/number-field/utils/validate.js +6 -14
- package/number-field/utils/validate.mjs +6 -14
- package/otp-field/input/OTPFieldInput.d.mts +1 -1
- package/otp-field/input/OTPFieldInput.d.ts +1 -1
- package/otp-field/input/OTPFieldInput.js +4 -1
- package/otp-field/input/OTPFieldInput.mjs +5 -2
- package/otp-field/root/OTPFieldRoot.js +13 -14
- package/otp-field/root/OTPFieldRoot.mjs +13 -14
- package/package.json +93 -5
- package/popover/arrow/PopoverArrow.d.mts +1 -1
- package/popover/arrow/PopoverArrow.d.ts +1 -1
- package/popover/arrow/PopoverArrow.js +1 -3
- package/popover/arrow/PopoverArrow.mjs +1 -3
- package/popover/backdrop/PopoverBackdrop.js +3 -11
- package/popover/backdrop/PopoverBackdrop.mjs +4 -11
- package/popover/backdrop/PopoverBackdropDataAttributes.d.mts +1 -1
- package/popover/backdrop/PopoverBackdropDataAttributes.d.ts +1 -1
- package/popover/backdrop/PopoverBackdropDataAttributes.js +1 -1
- package/popover/backdrop/PopoverBackdropDataAttributes.mjs +1 -1
- package/popover/close/PopoverClose.js +1 -3
- package/popover/close/PopoverClose.mjs +1 -3
- package/popover/description/PopoverDescription.js +1 -3
- package/popover/description/PopoverDescription.mjs +1 -3
- package/popover/popup/PopoverPopup.d.mts +1 -1
- package/popover/popup/PopoverPopup.d.ts +1 -1
- package/popover/popup/PopoverPopup.js +6 -17
- package/popover/popup/PopoverPopup.mjs +9 -19
- package/popover/popup/PopoverPopupDataAttributes.d.mts +1 -1
- package/popover/popup/PopoverPopupDataAttributes.d.ts +1 -1
- package/popover/popup/PopoverPopupDataAttributes.js +3 -3
- package/popover/popup/PopoverPopupDataAttributes.mjs +3 -3
- package/popover/portal/PopoverPortal.d.mts +6 -2
- package/popover/portal/PopoverPortal.d.ts +6 -2
- package/popover/portal/PopoverPortal.js +1 -3
- package/popover/portal/PopoverPortal.mjs +1 -3
- package/popover/positioner/PopoverPositioner.d.mts +1 -1
- package/popover/positioner/PopoverPositioner.d.ts +1 -1
- package/popover/positioner/PopoverPositioner.js +19 -22
- package/popover/positioner/PopoverPositioner.mjs +19 -22
- package/popover/positioner/PopoverPositionerContext.d.mts +1 -1
- package/popover/positioner/PopoverPositionerContext.d.ts +1 -1
- package/popover/positioner/PopoverPositionerCssVars.d.mts +2 -0
- package/popover/positioner/PopoverPositionerCssVars.d.ts +2 -0
- package/popover/positioner/PopoverPositionerCssVars.js +2 -0
- package/popover/positioner/PopoverPositionerCssVars.mjs +2 -0
- package/popover/root/PopoverRoot.d.mts +2 -0
- package/popover/root/PopoverRoot.d.ts +2 -0
- package/popover/root/PopoverRoot.js +29 -22
- package/popover/root/PopoverRoot.mjs +31 -24
- package/popover/root/PopoverRootContext.d.mts +1 -3
- package/popover/root/PopoverRootContext.d.ts +1 -3
- package/popover/store/PopoverHandle.d.mts +18 -10
- package/popover/store/PopoverHandle.d.ts +18 -10
- package/popover/store/PopoverHandle.js +21 -21
- package/popover/store/PopoverHandle.mjs +22 -20
- package/popover/store/PopoverStore.d.mts +22 -10
- package/popover/store/PopoverStore.d.ts +22 -10
- package/popover/store/PopoverStore.js +82 -67
- package/popover/store/PopoverStore.mjs +81 -67
- package/popover/title/PopoverTitle.js +1 -3
- package/popover/title/PopoverTitle.mjs +1 -3
- package/popover/trigger/PopoverTrigger.js +9 -11
- package/popover/trigger/PopoverTrigger.mjs +10 -12
- package/popover/viewport/PopoverViewport.js +2 -12
- package/popover/viewport/PopoverViewport.mjs +3 -12
- package/preview-card/arrow/PreviewCardArrow.d.mts +1 -1
- package/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
- package/preview-card/backdrop/PreviewCardBackdrop.d.mts +1 -1
- package/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
- package/preview-card/backdrop/PreviewCardBackdrop.js +2 -8
- package/preview-card/backdrop/PreviewCardBackdrop.mjs +3 -8
- package/preview-card/backdrop/PreviewCardBackdropDataAttributes.d.mts +1 -1
- package/preview-card/backdrop/PreviewCardBackdropDataAttributes.d.ts +1 -1
- package/preview-card/backdrop/PreviewCardBackdropDataAttributes.js +1 -1
- package/preview-card/backdrop/PreviewCardBackdropDataAttributes.mjs +1 -1
- package/preview-card/popup/PreviewCardPopup.d.mts +1 -1
- package/preview-card/popup/PreviewCardPopup.d.ts +1 -1
- package/preview-card/popup/PreviewCardPopup.js +6 -12
- package/preview-card/popup/PreviewCardPopup.mjs +7 -12
- package/preview-card/popup/PreviewCardPopupDataAttributes.d.mts +1 -1
- package/preview-card/popup/PreviewCardPopupDataAttributes.d.ts +1 -1
- package/preview-card/popup/PreviewCardPopupDataAttributes.js +1 -1
- package/preview-card/popup/PreviewCardPopupDataAttributes.mjs +1 -1
- package/preview-card/portal/PreviewCardPortal.d.mts +6 -2
- package/preview-card/portal/PreviewCardPortal.d.ts +6 -2
- package/preview-card/portal/PreviewCardPortal.mjs +1 -2
- package/preview-card/positioner/PreviewCardPositioner.d.mts +1 -1
- package/preview-card/positioner/PreviewCardPositioner.d.ts +1 -1
- package/preview-card/positioner/PreviewCardPositioner.js +3 -4
- package/preview-card/positioner/PreviewCardPositioner.mjs +3 -4
- package/preview-card/positioner/PreviewCardPositionerContext.d.mts +1 -1
- package/preview-card/positioner/PreviewCardPositionerContext.d.ts +1 -1
- package/preview-card/positioner/PreviewCardPositionerContext.js +1 -1
- package/preview-card/positioner/PreviewCardPositionerContext.mjs +1 -1
- package/preview-card/positioner/PreviewCardPositionerCssVars.d.mts +12 -0
- package/preview-card/positioner/PreviewCardPositionerCssVars.d.ts +12 -0
- package/preview-card/positioner/PreviewCardPositionerCssVars.js +12 -0
- package/preview-card/positioner/PreviewCardPositionerCssVars.mjs +12 -0
- package/preview-card/root/PreviewCardRoot.js +14 -17
- package/preview-card/root/PreviewCardRoot.mjs +15 -18
- package/preview-card/store/PreviewCardHandle.d.mts +15 -12
- package/preview-card/store/PreviewCardHandle.d.ts +15 -12
- package/preview-card/store/PreviewCardHandle.js +18 -23
- package/preview-card/store/PreviewCardHandle.mjs +19 -23
- package/preview-card/store/PreviewCardStore.d.mts +22 -7
- package/preview-card/store/PreviewCardStore.d.ts +22 -7
- package/preview-card/store/PreviewCardStore.js +43 -30
- package/preview-card/store/PreviewCardStore.mjs +43 -31
- package/preview-card/trigger/PreviewCardTrigger.d.mts +1 -1
- package/preview-card/trigger/PreviewCardTrigger.d.ts +1 -1
- package/preview-card/trigger/PreviewCardTrigger.js +4 -8
- package/preview-card/trigger/PreviewCardTrigger.mjs +5 -9
- package/preview-card/viewport/PreviewCardViewport.js +1 -9
- package/preview-card/viewport/PreviewCardViewport.mjs +2 -9
- package/progress/indicator/ProgressIndicator.js +1 -5
- package/progress/indicator/ProgressIndicator.mjs +1 -5
- package/progress/root/ProgressRoot.d.mts +1 -2
- package/progress/root/ProgressRoot.d.ts +1 -2
- package/progress/root/ProgressRoot.js +28 -19
- package/progress/root/ProgressRoot.mjs +29 -20
- package/progress/root/ProgressRootContext.d.mts +4 -12
- package/progress/root/ProgressRootContext.d.ts +4 -12
- package/progress/root/stateAttributesMapping.js +3 -17
- package/progress/root/stateAttributesMapping.mjs +3 -17
- package/progress/value/ProgressValue.d.mts +1 -1
- package/progress/value/ProgressValue.d.ts +1 -1
- package/progress/value/ProgressValue.js +7 -3
- package/progress/value/ProgressValue.mjs +7 -3
- package/radio/indicator/RadioIndicatorDataAttributes.d.mts +1 -1
- package/radio/indicator/RadioIndicatorDataAttributes.d.ts +1 -1
- package/radio/indicator/RadioIndicatorDataAttributes.js +1 -1
- package/radio/indicator/RadioIndicatorDataAttributes.mjs +1 -1
- package/radio/root/RadioRoot.js +22 -29
- package/radio/root/RadioRoot.mjs +22 -29
- package/radio/utils/stateAttributesMapping.js +2 -3
- package/radio/utils/stateAttributesMapping.mjs +2 -3
- package/radio-group/RadioGroup.js +47 -32
- package/radio-group/RadioGroup.mjs +47 -32
- package/radio-group/RadioGroupContext.d.mts +0 -1
- package/radio-group/RadioGroupContext.d.ts +0 -1
- package/scroll-area/root/ScrollAreaRoot.js +122 -83
- package/scroll-area/root/ScrollAreaRoot.mjs +122 -83
- package/scroll-area/root/ScrollAreaRootContext.d.mts +1 -3
- package/scroll-area/root/ScrollAreaRootContext.d.ts +1 -3
- package/scroll-area/root/stateAttributes.js +10 -19
- package/scroll-area/root/stateAttributes.mjs +10 -19
- package/scroll-area/scrollbar/ScrollAreaScrollbar.js +58 -74
- package/scroll-area/scrollbar/ScrollAreaScrollbar.mjs +58 -74
- package/scroll-area/scrollbar/ScrollAreaScrollbarContext.d.mts +1 -3
- package/scroll-area/scrollbar/ScrollAreaScrollbarContext.d.ts +1 -3
- package/scroll-area/thumb/ScrollAreaThumb.js +10 -24
- package/scroll-area/thumb/ScrollAreaThumb.mjs +10 -24
- package/scroll-area/utils/getOffset.js +4 -3
- package/scroll-area/utils/getOffset.mjs +4 -3
- package/scroll-area/viewport/ScrollAreaViewport.js +76 -79
- package/scroll-area/viewport/ScrollAreaViewport.mjs +77 -80
- package/select/arrow/SelectArrow.d.mts +1 -1
- package/select/arrow/SelectArrow.d.ts +1 -1
- package/select/arrow/SelectArrow.js +1 -7
- package/select/arrow/SelectArrow.mjs +2 -7
- package/select/backdrop/SelectBackdropDataAttributes.d.mts +1 -1
- package/select/backdrop/SelectBackdropDataAttributes.d.ts +1 -1
- package/select/backdrop/SelectBackdropDataAttributes.js +1 -1
- package/select/backdrop/SelectBackdropDataAttributes.mjs +1 -1
- package/select/group-label/SelectGroupLabel.js +3 -0
- package/select/group-label/SelectGroupLabel.mjs +3 -0
- package/select/index.d.mts +2 -1
- package/select/index.d.ts +2 -1
- package/select/index.parts.d.mts +1 -1
- package/select/index.parts.d.ts +1 -1
- package/select/index.parts.js +2 -2
- package/select/index.parts.mjs +1 -1
- package/select/item/SelectItem.js +12 -25
- package/select/item/SelectItem.mjs +13 -26
- package/select/item/SelectItemContext.d.mts +0 -1
- package/select/item/SelectItemContext.d.ts +0 -1
- package/select/item-indicator/SelectItemIndicator.js +1 -2
- package/select/item-indicator/SelectItemIndicator.mjs +1 -2
- package/select/item-indicator/SelectItemIndicatorDataAttributes.d.mts +1 -1
- package/select/item-indicator/SelectItemIndicatorDataAttributes.d.ts +1 -1
- package/select/item-indicator/SelectItemIndicatorDataAttributes.js +1 -1
- package/select/item-indicator/SelectItemIndicatorDataAttributes.mjs +1 -1
- package/select/item-text/SelectItemText.js +4 -5
- package/select/item-text/SelectItemText.mjs +4 -5
- package/select/label/SelectLabel.js +2 -1
- package/select/label/SelectLabel.mjs +2 -1
- package/select/list/SelectList.js +3 -6
- package/select/list/SelectList.mjs +3 -6
- package/select/popup/SelectPopup.d.mts +1 -1
- package/select/popup/SelectPopup.d.ts +1 -1
- package/select/popup/SelectPopup.js +32 -52
- package/select/popup/SelectPopup.mjs +33 -53
- package/select/popup/SelectPopupDataAttributes.d.mts +1 -1
- package/select/popup/SelectPopupDataAttributes.d.ts +1 -1
- package/select/popup/SelectPopupDataAttributes.js +1 -1
- package/select/popup/SelectPopupDataAttributes.mjs +1 -1
- package/select/portal/SelectPortal.d.mts +7 -2
- package/select/portal/SelectPortal.d.ts +7 -2
- package/select/portal/SelectPortal.js +3 -7
- package/select/portal/SelectPortal.mjs +3 -7
- package/select/positioner/SelectPositioner.d.mts +1 -1
- package/select/positioner/SelectPositioner.d.ts +1 -1
- package/select/positioner/SelectPositioner.js +15 -29
- package/select/positioner/SelectPositioner.mjs +17 -31
- package/select/positioner/SelectPositionerContext.d.mts +1 -1
- package/select/positioner/SelectPositionerContext.d.ts +1 -1
- package/select/root/SelectRoot.d.mts +2 -0
- package/select/root/SelectRoot.d.ts +2 -0
- package/select/root/SelectRoot.js +93 -121
- package/select/root/SelectRoot.mjs +95 -123
- package/select/root/SelectRootContext.d.mts +4 -5
- package/select/root/SelectRootContext.d.ts +4 -5
- package/select/root/SelectRootContext.js +1 -11
- package/select/root/SelectRootContext.mjs +0 -9
- package/select/scroll-arrow/SelectScrollArrow.d.mts +1 -6
- package/select/scroll-arrow/SelectScrollArrow.d.ts +1 -6
- package/select/scroll-arrow/SelectScrollArrow.js +4 -11
- package/select/scroll-arrow/SelectScrollArrow.mjs +4 -11
- package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.d.mts +1 -1
- package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.d.ts +1 -1
- package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.js +1 -1
- package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.mjs +1 -1
- package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.d.mts +1 -1
- package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.d.ts +1 -1
- package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.js +1 -1
- package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.mjs +1 -1
- package/select/separator/SelectSeparator.d.mts +26 -0
- package/select/separator/SelectSeparator.d.ts +26 -0
- package/select/separator/SelectSeparator.js +15 -0
- package/select/separator/SelectSeparator.mjs +10 -0
- package/select/store.d.mts +3 -5
- package/select/store.d.ts +3 -5
- package/select/store.js +32 -35
- package/select/store.mjs +32 -35
- package/select/trigger/SelectTrigger.d.mts +1 -1
- package/select/trigger/SelectTrigger.d.ts +1 -1
- package/select/trigger/SelectTrigger.js +3 -8
- package/select/trigger/SelectTrigger.mjs +4 -9
- package/select/value/SelectValue.js +1 -1
- package/select/value/SelectValue.mjs +1 -1
- package/slider/control/SliderControl.js +61 -78
- package/slider/control/SliderControl.mjs +61 -78
- package/slider/indicator/SliderIndicator.js +15 -34
- package/slider/indicator/SliderIndicator.mjs +15 -34
- package/slider/root/SliderRoot.d.mts +5 -3
- package/slider/root/SliderRoot.d.ts +5 -3
- package/slider/root/SliderRoot.js +36 -47
- package/slider/root/SliderRoot.mjs +36 -47
- package/slider/root/SliderRootContext.d.mts +6 -4
- package/slider/root/SliderRootContext.d.ts +6 -4
- package/slider/root/stateAttributesMapping.js +7 -6
- package/slider/root/stateAttributesMapping.mjs +7 -6
- package/slider/thumb/SliderThumb.js +64 -69
- package/slider/thumb/SliderThumb.mjs +64 -69
- package/slider/utils/getMidpoint.d.mts +1 -2
- package/slider/utils/getMidpoint.d.ts +1 -2
- package/slider/utils/getMidpoint.js +2 -5
- package/slider/utils/getMidpoint.mjs +2 -5
- package/slider/utils/getPushedThumbValues.d.mts +4 -21
- package/slider/utils/getPushedThumbValues.d.ts +4 -21
- package/slider/utils/getPushedThumbValues.js +6 -15
- package/slider/utils/getPushedThumbValues.mjs +7 -15
- package/slider/utils/getSliderValue.js +8 -8
- package/slider/utils/getSliderValue.mjs +8 -8
- package/slider/utils/resolveThumbCollision.d.mts +5 -24
- package/slider/utils/resolveThumbCollision.d.ts +5 -24
- package/slider/utils/resolveThumbCollision.js +33 -64
- package/slider/utils/resolveThumbCollision.mjs +33 -64
- package/slider/utils/test-utils.d.mts +1 -11
- package/slider/utils/test-utils.d.ts +1 -11
- package/slider/utils/test-utils.js +1 -11
- package/slider/utils/test-utils.mjs +1 -11
- package/slider/utils/validateMinimumDistance.js +6 -7
- package/slider/utils/validateMinimumDistance.mjs +6 -7
- package/slider/value/SliderValue.js +6 -16
- package/slider/value/SliderValue.mjs +6 -16
- package/switch/root/SwitchRoot.js +18 -19
- package/switch/root/SwitchRoot.mjs +18 -19
- package/switch/stateAttributesMapping.js +2 -3
- package/switch/stateAttributesMapping.mjs +2 -3
- package/tabs/indicator/TabsIndicator.js +13 -24
- package/tabs/indicator/TabsIndicator.mjs +13 -24
- package/tabs/indicator/prehydrationScript.min.d.mts +1 -1
- package/tabs/indicator/prehydrationScript.min.d.ts +1 -1
- package/tabs/indicator/prehydrationScript.min.js +1 -1
- package/tabs/indicator/prehydrationScript.min.mjs +1 -1
- package/tabs/list/TabsList.js +1 -11
- package/tabs/list/TabsList.mjs +1 -11
- package/tabs/list/TabsListContext.d.mts +0 -5
- package/tabs/list/TabsListContext.d.ts +0 -5
- package/tabs/panel/TabsPanel.js +10 -20
- package/tabs/panel/TabsPanel.mjs +10 -20
- package/tabs/panel/TabsPanelDataAttributes.d.mts +1 -1
- package/tabs/panel/TabsPanelDataAttributes.d.ts +1 -1
- package/tabs/panel/TabsPanelDataAttributes.js +1 -1
- package/tabs/panel/TabsPanelDataAttributes.mjs +1 -1
- package/tabs/root/TabsRoot.js +40 -75
- package/tabs/root/TabsRoot.mjs +40 -75
- package/tabs/root/TabsRootContext.d.mts +4 -11
- package/tabs/root/TabsRootContext.d.ts +4 -11
- package/tabs/root/stateAttributesMapping.js +1 -2
- package/tabs/root/stateAttributesMapping.mjs +1 -2
- package/tabs/tab/TabsTab.js +42 -39
- package/tabs/tab/TabsTab.mjs +42 -39
- package/toast/action/ToastAction.js +2 -5
- package/toast/action/ToastAction.mjs +2 -5
- package/toast/arrow/ToastArrow.d.mts +1 -1
- package/toast/arrow/ToastArrow.d.ts +1 -1
- package/toast/arrow/ToastArrow.js +1 -2
- package/toast/arrow/ToastArrow.mjs +1 -2
- package/toast/close/ToastClose.js +3 -4
- package/toast/close/ToastClose.mjs +3 -4
- package/toast/content/ToastContent.js +3 -7
- package/toast/content/ToastContent.mjs +3 -7
- package/toast/description/ToastDescription.js +8 -23
- package/toast/description/ToastDescription.mjs +8 -23
- package/toast/portal/ToastPortal.d.mts +9 -3
- package/toast/portal/ToastPortal.d.ts +9 -3
- package/toast/portal/ToastPortal.js +10 -1
- package/toast/portal/ToastPortal.mjs +9 -2
- package/toast/positioner/ToastPositioner.d.mts +1 -1
- package/toast/positioner/ToastPositioner.d.ts +1 -1
- package/toast/positioner/ToastPositioner.js +4 -5
- package/toast/positioner/ToastPositioner.mjs +4 -5
- package/toast/positioner/ToastPositionerContext.d.mts +1 -1
- package/toast/positioner/ToastPositionerContext.d.ts +1 -1
- package/toast/provider/ToastProvider.js +19 -10
- package/toast/provider/ToastProvider.mjs +20 -11
- package/toast/root/ToastRoot.d.mts +2 -0
- package/toast/root/ToastRoot.d.ts +2 -0
- package/toast/root/ToastRoot.js +93 -140
- package/toast/root/ToastRoot.mjs +92 -139
- package/toast/root/ToastRootContext.d.mts +0 -6
- package/toast/root/ToastRootContext.d.ts +0 -6
- package/toast/root/ToastRootDataAttributes.d.mts +1 -1
- package/toast/root/ToastRootDataAttributes.d.ts +1 -1
- package/toast/root/ToastRootDataAttributes.js +1 -1
- package/toast/root/ToastRootDataAttributes.mjs +1 -1
- package/toast/store.d.mts +17 -22
- package/toast/store.d.ts +17 -22
- package/toast/store.js +51 -85
- package/toast/store.mjs +53 -86
- package/toast/title/ToastTitle.js +8 -23
- package/toast/title/ToastTitle.mjs +8 -23
- package/toast/useToastManager.js +1 -6
- package/toast/useToastManager.mjs +2 -6
- package/toast/utils/isRenderableNode.d.mts +3 -0
- package/toast/utils/isRenderableNode.d.ts +3 -0
- package/toast/utils/isRenderableNode.js +21 -0
- package/toast/utils/isRenderableNode.mjs +13 -0
- package/toast/utils/test-utils.d.mts +1 -8
- package/toast/utils/test-utils.d.ts +1 -8
- package/toast/utils/useToastLabelPart.d.mts +18 -0
- package/toast/utils/useToastLabelPart.d.ts +18 -0
- package/toast/utils/useToastLabelPart.js +52 -0
- package/toast/utils/useToastLabelPart.mjs +47 -0
- package/toast/viewport/ToastViewport.js +42 -78
- package/toast/viewport/ToastViewport.mjs +42 -78
- package/toggle/Toggle.js +1 -2
- package/toggle/Toggle.mjs +1 -2
- package/toggle-group/ToggleGroup.js +4 -19
- package/toggle-group/ToggleGroup.mjs +4 -19
- package/toggle-group/ToggleGroupContext.d.mts +1 -3
- package/toggle-group/ToggleGroupContext.d.ts +1 -3
- package/toggle-group/ToggleGroupContext.js +2 -8
- package/toggle-group/ToggleGroupContext.mjs +2 -7
- package/toolbar/button/ToolbarButton.js +2 -2
- package/toolbar/button/ToolbarButton.mjs +2 -2
- package/toolbar/group/ToolbarGroupContext.d.mts +1 -2
- package/toolbar/group/ToolbarGroupContext.d.ts +1 -2
- package/toolbar/group/ToolbarGroupContext.js +2 -8
- package/toolbar/group/ToolbarGroupContext.mjs +2 -7
- package/toolbar/input/ToolbarInput.js +8 -11
- package/toolbar/input/ToolbarInput.mjs +8 -11
- package/toolbar/link/ToolbarLink.d.mts +1 -1
- package/toolbar/link/ToolbarLink.d.ts +1 -1
- package/toolbar/root/ToolbarRoot.js +4 -5
- package/toolbar/root/ToolbarRoot.mjs +4 -5
- package/toolbar/root/ToolbarRootContext.d.mts +0 -3
- package/toolbar/root/ToolbarRootContext.d.ts +0 -3
- package/toolbar/separator/ToolbarSeparator.d.mts +2 -2
- package/toolbar/separator/ToolbarSeparator.d.ts +2 -2
- package/toolbar/separator/ToolbarSeparator.js +1 -4
- package/toolbar/separator/ToolbarSeparator.mjs +3 -5
- package/tooltip/arrow/TooltipArrow.d.mts +1 -1
- package/tooltip/arrow/TooltipArrow.d.ts +1 -1
- package/tooltip/popup/TooltipPopup.d.mts +1 -1
- package/tooltip/popup/TooltipPopup.d.ts +1 -1
- package/tooltip/popup/TooltipPopup.js +4 -9
- package/tooltip/popup/TooltipPopup.mjs +5 -9
- package/tooltip/popup/TooltipPopupDataAttributes.d.mts +1 -1
- package/tooltip/popup/TooltipPopupDataAttributes.d.ts +1 -1
- package/tooltip/popup/TooltipPopupDataAttributes.js +1 -1
- package/tooltip/popup/TooltipPopupDataAttributes.mjs +1 -1
- package/tooltip/portal/TooltipPortal.d.mts +6 -2
- package/tooltip/portal/TooltipPortal.d.ts +6 -2
- package/tooltip/portal/TooltipPortal.mjs +1 -2
- package/tooltip/positioner/TooltipPositioner.d.mts +1 -1
- package/tooltip/positioner/TooltipPositioner.d.ts +1 -1
- package/tooltip/positioner/TooltipPositioner.js +3 -4
- package/tooltip/positioner/TooltipPositioner.mjs +3 -4
- package/tooltip/positioner/TooltipPositionerContext.d.mts +1 -1
- package/tooltip/positioner/TooltipPositionerContext.d.ts +1 -1
- package/tooltip/positioner/TooltipPositionerCssVars.d.mts +12 -0
- package/tooltip/positioner/TooltipPositionerCssVars.d.ts +12 -0
- package/tooltip/positioner/TooltipPositionerCssVars.js +12 -0
- package/tooltip/positioner/TooltipPositionerCssVars.mjs +12 -0
- package/tooltip/provider/TooltipProvider.d.mts +1 -1
- package/tooltip/provider/TooltipProvider.d.ts +1 -1
- package/tooltip/provider/TooltipProvider.js +1 -5
- package/tooltip/provider/TooltipProvider.mjs +1 -5
- package/tooltip/provider/TooltipProviderContext.d.mts +5 -6
- package/tooltip/provider/TooltipProviderContext.d.ts +5 -6
- package/tooltip/provider/TooltipProviderContext.js +3 -0
- package/tooltip/provider/TooltipProviderContext.mjs +4 -0
- package/tooltip/root/TooltipRoot.js +18 -17
- package/tooltip/root/TooltipRoot.mjs +19 -18
- package/tooltip/store/TooltipHandle.d.mts +15 -12
- package/tooltip/store/TooltipHandle.d.ts +15 -12
- package/tooltip/store/TooltipHandle.js +18 -23
- package/tooltip/store/TooltipHandle.mjs +19 -23
- package/tooltip/store/TooltipStore.d.mts +24 -6
- package/tooltip/store/TooltipStore.d.ts +24 -6
- package/tooltip/store/TooltipStore.js +54 -31
- package/tooltip/store/TooltipStore.mjs +54 -32
- package/tooltip/trigger/TooltipTrigger.d.mts +1 -1
- package/tooltip/trigger/TooltipTrigger.d.ts +1 -1
- package/tooltip/trigger/TooltipTrigger.js +15 -25
- package/tooltip/trigger/TooltipTrigger.mjs +16 -26
- package/tooltip/viewport/TooltipViewport.js +1 -9
- package/tooltip/viewport/TooltipViewport.mjs +2 -9
- package/utils/FloatingPortalLite.d.mts +7 -9
- package/utils/FloatingPortalLite.d.ts +7 -9
- package/utils/FloatingPortalLite.js +4 -4
- package/utils/FloatingPortalLite.mjs +4 -5
- package/utils/FocusGuard.d.mts +1 -5
- package/utils/FocusGuard.d.ts +1 -5
- package/utils/InternalBackdrop.d.mts +0 -4
- package/utils/InternalBackdrop.d.ts +0 -4
- package/utils/NullStore.d.mts +15 -0
- package/utils/NullStore.d.ts +15 -0
- package/utils/NullStore.js +23 -0
- package/utils/NullStore.mjs +16 -0
- package/utils/adaptiveOriginConstants.d.mts +8 -0
- package/utils/adaptiveOriginConstants.d.ts +8 -0
- package/utils/adaptiveOriginConstants.js +14 -0
- package/utils/adaptiveOriginConstants.mjs +8 -0
- package/utils/adaptiveOriginMiddleware.d.mts +0 -4
- package/utils/adaptiveOriginMiddleware.d.ts +0 -4
- package/utils/adaptiveOriginMiddleware.js +5 -8
- package/utils/adaptiveOriginMiddleware.mjs +1 -4
- package/utils/closePart.d.mts +1 -4
- package/utils/closePart.d.ts +1 -4
- package/utils/closePart.js +2 -13
- package/utils/closePart.mjs +1 -12
- package/utils/dispatchClickWithModifiers.d.mts +21 -0
- package/utils/dispatchClickWithModifiers.d.ts +21 -0
- package/utils/dispatchClickWithModifiers.js +30 -0
- package/utils/dispatchClickWithModifiers.mjs +24 -0
- package/utils/formatNumber.d.mts +1 -2
- package/utils/formatNumber.d.ts +1 -2
- package/utils/formatNumber.js +0 -12
- package/utils/formatNumber.mjs +0 -11
- package/utils/getElementAtPoint.d.mts +3 -1
- package/utils/getElementAtPoint.d.ts +3 -1
- package/utils/getElementAtPoint.js +5 -2
- package/utils/getElementAtPoint.mjs +5 -2
- package/utils/getPseudoElementBounds.d.mts +5 -0
- package/utils/getPseudoElementBounds.d.ts +5 -0
- package/utils/getPseudoElementBounds.js +14 -0
- package/utils/getPseudoElementBounds.mjs +13 -0
- package/utils/hideMiddleware.js +7 -4
- package/utils/hideMiddleware.mjs +7 -4
- package/utils/listbox-separator/ListboxSeparator.d.mts +18 -0
- package/utils/listbox-separator/ListboxSeparator.d.ts +18 -0
- package/utils/listbox-separator/ListboxSeparator.js +36 -0
- package/utils/listbox-separator/ListboxSeparator.mjs +31 -0
- package/utils/popupStateMapping.d.mts +19 -7
- package/utils/popupStateMapping.d.ts +19 -7
- package/utils/popupStateMapping.js +14 -9
- package/utils/popupStateMapping.mjs +15 -8
- package/utils/popups/index.d.mts +3 -1
- package/utils/popups/index.d.ts +3 -1
- package/utils/popups/index.js +22 -0
- package/utils/popups/index.mjs +3 -1
- package/utils/popups/popupHandle.d.mts +113 -0
- package/utils/popups/popupHandle.d.ts +113 -0
- package/utils/popups/popupHandle.js +229 -0
- package/utils/popups/popupHandle.mjs +222 -0
- package/utils/popups/popupStoreUtils.d.mts +47 -12
- package/utils/popups/popupStoreUtils.d.ts +47 -12
- package/utils/popups/popupStoreUtils.js +109 -44
- package/utils/popups/popupStoreUtils.mjs +107 -42
- package/utils/popups/popupTriggerMap.d.mts +3 -2
- package/utils/popups/popupTriggerMap.d.ts +3 -2
- package/utils/popups/popupTriggerMap.js +48 -21
- package/utils/popups/popupTriggerMap.mjs +48 -21
- package/utils/popups/store.d.mts +14 -0
- package/utils/popups/store.d.ts +14 -0
- package/utils/popups/store.js +33 -21
- package/utils/popups/store.mjs +33 -21
- package/utils/popups/usePopupHandleStore.d.mts +12 -0
- package/utils/popups/usePopupHandleStore.d.ts +12 -0
- package/utils/popups/usePopupHandleStore.js +33 -0
- package/utils/popups/usePopupHandleStore.mjs +27 -0
- package/utils/scrollable.d.mts +2 -0
- package/utils/scrollable.d.ts +2 -0
- package/utils/scrollable.js +20 -12
- package/utils/scrollable.mjs +18 -12
- package/utils/usePopupAutoResize.d.mts +1 -1
- package/utils/usePopupAutoResize.d.ts +1 -1
- package/utils/usePopupAutoResize.js +15 -18
- package/utils/usePopupAutoResize.mjs +15 -18
- package/utils/usePopupViewport.d.mts +5 -15
- package/utils/usePopupViewport.d.ts +5 -15
- package/utils/usePopupViewport.js +48 -17
- package/utils/usePopupViewport.mjs +47 -17
- package/utils/usePositioner.js +1 -1
- package/utils/usePositioner.mjs +1 -1
- package/utils/useRegisteredLabelId.d.mts +2 -1
- package/utils/useRegisteredLabelId.d.ts +2 -1
- package/utils/useRegisteredLabelId.js +1 -1
- package/utils/useRegisteredLabelId.mjs +1 -1
- package/utils/useSwipeDismiss.js +72 -113
- package/utils/useSwipeDismiss.mjs +72 -113
- package/checkbox/utils/useStateAttributesMapping.js +0 -30
- package/number-field/root/useNumberFieldButton.d.mts +0 -21
- package/number-field/root/useNumberFieldButton.d.ts +0 -21
- package/number-field/root/useNumberFieldButton.js +0 -135
- package/number-field/root/useNumberFieldButton.mjs +0 -130
- package/number-field/utils/subscribeToVisualViewportResize.d.mts +0 -1
- package/number-field/utils/subscribeToVisualViewportResize.d.ts +0 -1
- package/number-field/utils/subscribeToVisualViewportResize.js +0 -23
- package/number-field/utils/subscribeToVisualViewportResize.mjs +0 -18
- package/select/portal/SelectPortalContext.d.mts +0 -3
- package/select/portal/SelectPortalContext.d.ts +0 -3
- package/select/portal/SelectPortalContext.js +0 -21
- package/select/portal/SelectPortalContext.mjs +0 -13
- package/slider/utils/replaceArrayItemAtIndex.d.mts +0 -1
- package/slider/utils/replaceArrayItemAtIndex.d.ts +0 -1
- package/slider/utils/replaceArrayItemAtIndex.js +0 -12
- package/slider/utils/replaceArrayItemAtIndex.mjs +0 -6
- package/slider/utils/valueArrayToPercentages.d.mts +0 -1
- package/slider/utils/valueArrayToPercentages.d.ts +0 -1
- package/slider/utils/valueArrayToPercentages.js +0 -15
- package/slider/utils/valueArrayToPercentages.mjs +0 -9
|
@@ -26,11 +26,11 @@ import { Menu } from '@base-ui/react/menu';
|
|
|
26
26
|
export default function ExampleMenu() {
|
|
27
27
|
return (
|
|
28
28
|
<Menu.Root>
|
|
29
|
-
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-
|
|
29
|
+
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-pressed:bg-neutral-100 dark:border-white dark:bg-neutral-950 dark:text-white dark:hover:not-data-disabled:bg-neutral-800 dark:active:not-data-disabled:bg-neutral-700 data-disabled:border-neutral-500 data-disabled:text-neutral-500 disabled:border-neutral-500 disabled:text-neutral-500 dark:data-disabled:border-neutral-400 dark:data-disabled:text-neutral-400 dark:data-pressed:bg-neutral-800 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-neutral-950 dark:focus-visible:outline-white">
|
|
30
30
|
Song <CaretDownIcon />
|
|
31
31
|
</Menu.Trigger>
|
|
32
32
|
<Menu.Portal>
|
|
33
|
-
<Menu.Positioner className="outline-hidden" sideOffset={8}>
|
|
33
|
+
<Menu.Positioner className="outline-hidden" sideOffset={8} align="start">
|
|
34
34
|
<Menu.Popup className="relative origin-[var(--transform-origin)] border border-neutral-950 bg-white py-1 text-neutral-950 shadow-[0.25rem_0.25rem_0] shadow-black/12 outline-hidden transition-[scale,opacity] duration-100 ease-out data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0 dark:border-white dark:bg-neutral-950 dark:text-white dark:shadow-none">
|
|
35
35
|
<Menu.Item className={itemClass}>Add to Library</Menu.Item>
|
|
36
36
|
<Menu.Item className={itemClass}>Add to Playlist</Menu.Item>
|
|
@@ -118,7 +118,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
&[data-
|
|
121
|
+
&[data-pressed] {
|
|
122
122
|
background-color: oklch(97% 0 0deg);
|
|
123
123
|
|
|
124
124
|
@media (prefers-color-scheme: dark) {
|
|
@@ -247,7 +247,7 @@ export default function ExampleMenu() {
|
|
|
247
247
|
Song <CaretDownIcon />
|
|
248
248
|
</Menu.Trigger>
|
|
249
249
|
<Menu.Portal>
|
|
250
|
-
<Menu.Positioner className={styles.Positioner} sideOffset={8}>
|
|
250
|
+
<Menu.Positioner className={styles.Positioner} sideOffset={8} align="start">
|
|
251
251
|
<Menu.Popup className={styles.Popup}>
|
|
252
252
|
<Menu.Item className={styles.Item}>Add to Library</Menu.Item>
|
|
253
253
|
<Menu.Item className={styles.Item}>Add to Playlist</Menu.Item>
|
|
@@ -346,12 +346,12 @@ export default function ExampleMenu() {
|
|
|
346
346
|
<Menu.Root>
|
|
347
347
|
<Menu.Trigger
|
|
348
348
|
openOnHover
|
|
349
|
-
className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-
|
|
349
|
+
className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-pressed:bg-neutral-100 dark:border-white dark:bg-neutral-950 dark:text-white dark:hover:not-data-disabled:bg-neutral-800 dark:active:not-data-disabled:bg-neutral-700 data-disabled:border-neutral-500 data-disabled:text-neutral-500 disabled:border-neutral-500 disabled:text-neutral-500 dark:data-disabled:border-neutral-400 dark:data-disabled:text-neutral-400 dark:data-pressed:bg-neutral-800 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-neutral-950 dark:focus-visible:outline-white"
|
|
350
350
|
>
|
|
351
351
|
Add to playlist <CaretDownIcon />
|
|
352
352
|
</Menu.Trigger>
|
|
353
353
|
<Menu.Portal>
|
|
354
|
-
<Menu.Positioner className="outline-hidden" sideOffset={8}>
|
|
354
|
+
<Menu.Positioner className="outline-hidden" sideOffset={8} align="start">
|
|
355
355
|
<Menu.Popup className="relative origin-[var(--transform-origin)] border border-neutral-950 bg-white py-1 text-neutral-950 shadow-[0.25rem_0.25rem_0] shadow-black/12 outline-hidden transition-[scale,opacity] duration-100 ease-out data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0 dark:border-white dark:bg-neutral-950 dark:text-white dark:shadow-none">
|
|
356
356
|
<Menu.Item className={itemClass}>Get Up!</Menu.Item>
|
|
357
357
|
<Menu.Item className={itemClass}>Inside Out</Menu.Item>
|
|
@@ -436,7 +436,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
-
&[data-
|
|
439
|
+
&[data-pressed] {
|
|
440
440
|
background-color: oklch(97% 0 0deg);
|
|
441
441
|
|
|
442
442
|
@media (prefers-color-scheme: dark) {
|
|
@@ -565,7 +565,7 @@ export default function ExampleMenu() {
|
|
|
565
565
|
Add to playlist <CaretDownIcon />
|
|
566
566
|
</Menu.Trigger>
|
|
567
567
|
<Menu.Portal>
|
|
568
|
-
<Menu.Positioner className={styles.Positioner} sideOffset={8}>
|
|
568
|
+
<Menu.Positioner className={styles.Positioner} sideOffset={8} align="start">
|
|
569
569
|
<Menu.Popup className={styles.Popup}>
|
|
570
570
|
<Menu.Item className={styles.Item}>Get Up!</Menu.Item>
|
|
571
571
|
<Menu.Item className={styles.Item}>Inside Out</Menu.Item>
|
|
@@ -618,11 +618,11 @@ export default function ExampleMenu() {
|
|
|
618
618
|
|
|
619
619
|
return (
|
|
620
620
|
<Menu.Root>
|
|
621
|
-
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-
|
|
621
|
+
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-pressed:bg-neutral-100 dark:border-white dark:bg-neutral-950 dark:text-white dark:hover:not-data-disabled:bg-neutral-800 dark:active:not-data-disabled:bg-neutral-700 data-disabled:border-neutral-500 data-disabled:text-neutral-500 disabled:border-neutral-500 disabled:text-neutral-500 dark:data-disabled:border-neutral-400 dark:data-disabled:text-neutral-400 dark:data-pressed:bg-neutral-800 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-neutral-950 dark:focus-visible:outline-white">
|
|
622
622
|
Workspace <CaretDownIcon />
|
|
623
623
|
</Menu.Trigger>
|
|
624
624
|
<Menu.Portal>
|
|
625
|
-
<Menu.Positioner className="outline-hidden" sideOffset={8}>
|
|
625
|
+
<Menu.Positioner className="outline-hidden" sideOffset={8} align="start">
|
|
626
626
|
<Menu.Popup className="relative origin-[var(--transform-origin)] border border-neutral-950 bg-white py-1 text-neutral-950 shadow-[0.25rem_0.25rem_0] shadow-black/12 outline-hidden transition-[scale,opacity] duration-100 ease-out data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0 dark:border-white dark:bg-neutral-950 dark:text-white dark:shadow-none">
|
|
627
627
|
<Menu.CheckboxItem
|
|
628
628
|
checked={showMinimap}
|
|
@@ -748,7 +748,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
750
|
|
|
751
|
-
&[data-
|
|
751
|
+
&[data-pressed] {
|
|
752
752
|
background-color: oklch(97% 0 0deg);
|
|
753
753
|
|
|
754
754
|
@media (prefers-color-scheme: dark) {
|
|
@@ -894,7 +894,7 @@ export default function ExampleMenu() {
|
|
|
894
894
|
Workspace <CaretDownIcon />
|
|
895
895
|
</Menu.Trigger>
|
|
896
896
|
<Menu.Portal>
|
|
897
|
-
<Menu.Positioner className={styles.Positioner} sideOffset={8}>
|
|
897
|
+
<Menu.Positioner className={styles.Positioner} sideOffset={8} align="start">
|
|
898
898
|
<Menu.Popup className={styles.Popup}>
|
|
899
899
|
<Menu.CheckboxItem
|
|
900
900
|
checked={showMinimap}
|
|
@@ -985,11 +985,11 @@ export default function ExampleMenu() {
|
|
|
985
985
|
const [value, setValue] = React.useState('date');
|
|
986
986
|
return (
|
|
987
987
|
<Menu.Root>
|
|
988
|
-
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-
|
|
988
|
+
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-pressed:bg-neutral-100 dark:border-white dark:bg-neutral-950 dark:text-white dark:hover:not-data-disabled:bg-neutral-800 dark:active:not-data-disabled:bg-neutral-700 data-disabled:border-neutral-500 data-disabled:text-neutral-500 disabled:border-neutral-500 disabled:text-neutral-500 dark:data-disabled:border-neutral-400 dark:data-disabled:text-neutral-400 dark:data-pressed:bg-neutral-800 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-neutral-950 dark:focus-visible:outline-white">
|
|
989
989
|
Sort <CaretDownIcon />
|
|
990
990
|
</Menu.Trigger>
|
|
991
991
|
<Menu.Portal>
|
|
992
|
-
<Menu.Positioner className="outline-hidden" sideOffset={8}>
|
|
992
|
+
<Menu.Positioner className="outline-hidden" sideOffset={8} align="start">
|
|
993
993
|
<Menu.Popup className="relative origin-[var(--transform-origin)] border border-neutral-950 bg-white py-1 text-neutral-950 shadow-[0.25rem_0.25rem_0] shadow-black/12 outline-hidden transition-[scale,opacity] duration-100 ease-out data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0 dark:border-white dark:bg-neutral-950 dark:text-white dark:shadow-none">
|
|
994
994
|
<Menu.RadioGroup value={value} onValueChange={setValue}>
|
|
995
995
|
<Menu.RadioItem value="date" className={radioItemClass}>
|
|
@@ -1105,7 +1105,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
1107
|
|
|
1108
|
-
&[data-
|
|
1108
|
+
&[data-pressed] {
|
|
1109
1109
|
background-color: oklch(97% 0 0deg);
|
|
1110
1110
|
|
|
1111
1111
|
@media (prefers-color-scheme: dark) {
|
|
@@ -1247,7 +1247,7 @@ export default function ExampleMenu() {
|
|
|
1247
1247
|
Sort <CaretDownIcon />
|
|
1248
1248
|
</Menu.Trigger>
|
|
1249
1249
|
<Menu.Portal>
|
|
1250
|
-
<Menu.Positioner className={styles.Positioner} sideOffset={8}>
|
|
1250
|
+
<Menu.Positioner className={styles.Positioner} sideOffset={8} align="start">
|
|
1251
1251
|
<Menu.Popup className={styles.Popup}>
|
|
1252
1252
|
<Menu.RadioGroup value={value} onValueChange={setValue}>
|
|
1253
1253
|
<Menu.RadioItem className={styles.RadioItem} value="date">
|
|
@@ -1344,11 +1344,11 @@ export default function ExampleMenu() {
|
|
|
1344
1344
|
|
|
1345
1345
|
return (
|
|
1346
1346
|
<Menu.Root>
|
|
1347
|
-
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-
|
|
1347
|
+
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-pressed:bg-neutral-100 dark:border-white dark:bg-neutral-950 dark:text-white dark:hover:not-data-disabled:bg-neutral-800 dark:active:not-data-disabled:bg-neutral-700 data-disabled:border-neutral-500 data-disabled:text-neutral-500 disabled:border-neutral-500 disabled:text-neutral-500 dark:data-disabled:border-neutral-400 dark:data-disabled:text-neutral-400 dark:data-pressed:bg-neutral-800 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-neutral-950 dark:focus-visible:outline-white">
|
|
1348
1348
|
View <CaretDownIcon />
|
|
1349
1349
|
</Menu.Trigger>
|
|
1350
1350
|
<Menu.Portal>
|
|
1351
|
-
<Menu.Positioner className="outline-hidden" sideOffset={8}>
|
|
1351
|
+
<Menu.Positioner className="outline-hidden" sideOffset={8} align="start">
|
|
1352
1352
|
<Menu.Popup className="relative origin-[var(--transform-origin)] border border-neutral-950 bg-white py-1 text-neutral-950 shadow-[0.25rem_0.25rem_0] shadow-black/12 outline-hidden transition-[scale,opacity] duration-100 ease-out data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0 dark:border-white dark:bg-neutral-950 dark:text-white dark:shadow-none">
|
|
1353
1353
|
<Menu.RadioGroup value={value} onValueChange={setValue}>
|
|
1354
1354
|
<Menu.GroupLabel className="py-2 pr-8 pl-[2.125rem] text-sm leading-4 text-neutral-500 select-none dark:text-neutral-400">
|
|
@@ -1505,7 +1505,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
1505
1505
|
}
|
|
1506
1506
|
}
|
|
1507
1507
|
|
|
1508
|
-
&[data-
|
|
1508
|
+
&[data-pressed] {
|
|
1509
1509
|
background-color: oklch(97% 0 0deg);
|
|
1510
1510
|
|
|
1511
1511
|
@media (prefers-color-scheme: dark) {
|
|
@@ -1670,7 +1670,7 @@ export default function ExampleMenu() {
|
|
|
1670
1670
|
View <CaretDownIcon />
|
|
1671
1671
|
</Menu.Trigger>
|
|
1672
1672
|
<Menu.Portal>
|
|
1673
|
-
<Menu.Positioner className={styles.Positioner} sideOffset={8}>
|
|
1673
|
+
<Menu.Positioner className={styles.Positioner} sideOffset={8} align="start">
|
|
1674
1674
|
<Menu.Popup className={styles.Popup}>
|
|
1675
1675
|
<Menu.RadioGroup value={value} onValueChange={setValue}>
|
|
1676
1676
|
<Menu.GroupLabel className={styles.GroupLabel}>Sort</Menu.GroupLabel>
|
|
@@ -1816,11 +1816,11 @@ import { Menu } from '@base-ui/react/menu';
|
|
|
1816
1816
|
export default function ExampleMenu() {
|
|
1817
1817
|
return (
|
|
1818
1818
|
<Menu.Root>
|
|
1819
|
-
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-
|
|
1819
|
+
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-pressed:bg-neutral-100 dark:border-white dark:bg-neutral-950 dark:text-white dark:hover:not-data-disabled:bg-neutral-800 dark:active:not-data-disabled:bg-neutral-700 data-disabled:border-neutral-500 data-disabled:text-neutral-500 disabled:border-neutral-500 disabled:text-neutral-500 dark:data-disabled:border-neutral-400 dark:data-disabled:text-neutral-400 dark:data-pressed:bg-neutral-800 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-neutral-950 dark:focus-visible:outline-white">
|
|
1820
1820
|
Song <CaretDownIcon />
|
|
1821
1821
|
</Menu.Trigger>
|
|
1822
1822
|
<Menu.Portal>
|
|
1823
|
-
<Menu.Positioner className="outline-hidden" sideOffset={8}>
|
|
1823
|
+
<Menu.Positioner className="outline-hidden" sideOffset={8} align="start">
|
|
1824
1824
|
<Menu.Popup className={popupClass}>
|
|
1825
1825
|
<Menu.Item className={itemClass}>Add to Library</Menu.Item>
|
|
1826
1826
|
|
|
@@ -1865,7 +1865,7 @@ export default function ExampleMenu() {
|
|
|
1865
1865
|
const popupClass =
|
|
1866
1866
|
'relative origin-[var(--transform-origin)] border border-neutral-950 bg-white py-1 text-neutral-950 shadow-[0.25rem_0.25rem_0] shadow-black/12 outline-hidden transition-[scale,opacity] duration-100 ease-out data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0 dark:border-white dark:bg-neutral-950 dark:text-white dark:shadow-none';
|
|
1867
1867
|
const itemClass =
|
|
1868
|
-
"flex cursor-default py-2 pr-6 pl-4 text-sm leading-4 outline-hidden select-none data-
|
|
1868
|
+
"flex cursor-default py-2 pr-6 pl-4 text-sm leading-4 outline-hidden select-none data-highlighted:relative data-highlighted:z-0 data-highlighted:text-white data-highlighted:before:absolute data-highlighted:before:inset-x-1 data-highlighted:before:inset-y-0 data-highlighted:before:z-[-1] data-highlighted:before:bg-neutral-950 data-highlighted:before:content-[''] data-disabled:text-neutral-500 dark:data-highlighted:text-neutral-950 dark:data-highlighted:before:bg-white dark:data-disabled:text-neutral-400";
|
|
1869
1869
|
const submenuTriggerClass =
|
|
1870
1870
|
"flex cursor-default items-center justify-between gap-4 py-2 pr-2 pl-4 text-sm leading-4 outline-hidden select-none data-popup-open:relative data-popup-open:z-0 data-popup-open:before:absolute data-popup-open:before:inset-x-1 data-popup-open:before:inset-y-0 data-popup-open:before:z-[-1] data-popup-open:before:bg-neutral-100 data-popup-open:before:content-[''] data-highlighted:relative data-highlighted:z-0 data-highlighted:text-white data-highlighted:before:absolute data-highlighted:before:inset-x-1 data-highlighted:before:inset-y-0 data-highlighted:before:z-[-1] data-highlighted:before:bg-neutral-950 data-highlighted:before:content-[''] data-highlighted:data-popup-open:before:bg-neutral-950 data-disabled:text-neutral-500 dark:data-popup-open:before:bg-neutral-800 dark:data-highlighted:text-neutral-950 dark:data-highlighted:before:bg-white dark:data-highlighted:data-popup-open:before:bg-white dark:data-disabled:text-neutral-400";
|
|
1871
1871
|
|
|
@@ -1956,7 +1956,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
1956
1956
|
}
|
|
1957
1957
|
}
|
|
1958
1958
|
|
|
1959
|
-
&[data-
|
|
1959
|
+
&[data-pressed] {
|
|
1960
1960
|
background-color: oklch(97% 0 0deg);
|
|
1961
1961
|
|
|
1962
1962
|
@media (prefers-color-scheme: dark) {
|
|
@@ -2030,11 +2030,6 @@ This example shows how to implement the component using CSS Modules.
|
|
|
2030
2030
|
font-size: 0.875rem;
|
|
2031
2031
|
line-height: 1rem;
|
|
2032
2032
|
|
|
2033
|
-
&[data-popup-open] {
|
|
2034
|
-
z-index: 0;
|
|
2035
|
-
position: relative;
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
2033
|
&[data-highlighted] {
|
|
2039
2034
|
z-index: 0;
|
|
2040
2035
|
position: relative;
|
|
@@ -2045,32 +2040,12 @@ This example shows how to implement the component using CSS Modules.
|
|
|
2045
2040
|
}
|
|
2046
2041
|
}
|
|
2047
2042
|
|
|
2048
|
-
&[data-popup-open]::before,
|
|
2049
2043
|
&[data-highlighted]::before {
|
|
2050
2044
|
content: '';
|
|
2051
2045
|
z-index: -1;
|
|
2052
2046
|
position: absolute;
|
|
2053
2047
|
inset-block: 0;
|
|
2054
2048
|
inset-inline: 0.25rem;
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
|
-
&[data-popup-open]::before {
|
|
2058
|
-
background-color: oklch(97% 0 0deg);
|
|
2059
|
-
|
|
2060
|
-
@media (prefers-color-scheme: dark) {
|
|
2061
|
-
background-color: oklch(26.9% 0 0deg);
|
|
2062
|
-
}
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
&[data-highlighted]::before {
|
|
2066
|
-
background-color: oklch(14.5% 0 0deg);
|
|
2067
|
-
|
|
2068
|
-
@media (prefers-color-scheme: dark) {
|
|
2069
|
-
background-color: white;
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
|
|
2073
|
-
&[data-highlighted][data-popup-open]::before {
|
|
2074
2049
|
background-color: oklch(14.5% 0 0deg);
|
|
2075
2050
|
|
|
2076
2051
|
@media (prefers-color-scheme: dark) {
|
|
@@ -2092,6 +2067,32 @@ This example shows how to implement the component using CSS Modules.
|
|
|
2092
2067
|
justify-content: space-between;
|
|
2093
2068
|
gap: 1rem;
|
|
2094
2069
|
padding-right: 0.5rem;
|
|
2070
|
+
|
|
2071
|
+
&[data-popup-open] {
|
|
2072
|
+
z-index: 0;
|
|
2073
|
+
position: relative;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
&[data-popup-open]::before {
|
|
2077
|
+
content: '';
|
|
2078
|
+
z-index: -1;
|
|
2079
|
+
position: absolute;
|
|
2080
|
+
inset-block: 0;
|
|
2081
|
+
inset-inline: 0.25rem;
|
|
2082
|
+
background-color: oklch(97% 0 0deg);
|
|
2083
|
+
|
|
2084
|
+
@media (prefers-color-scheme: dark) {
|
|
2085
|
+
background-color: oklch(26.9% 0 0deg);
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
&[data-highlighted][data-popup-open]::before {
|
|
2090
|
+
background-color: oklch(14.5% 0 0deg);
|
|
2091
|
+
|
|
2092
|
+
@media (prefers-color-scheme: dark) {
|
|
2093
|
+
background-color: white;
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2095
2096
|
}
|
|
2096
2097
|
|
|
2097
2098
|
.Separator {
|
|
@@ -2119,7 +2120,7 @@ export default function ExampleMenu() {
|
|
|
2119
2120
|
Song <CaretDownIcon />
|
|
2120
2121
|
</Menu.Trigger>
|
|
2121
2122
|
<Menu.Portal>
|
|
2122
|
-
<Menu.Positioner className={styles.Positioner} sideOffset={8}>
|
|
2123
|
+
<Menu.Positioner className={styles.Positioner} sideOffset={8} align="start">
|
|
2123
2124
|
<Menu.Popup className={styles.Popup}>
|
|
2124
2125
|
<Menu.Item className={styles.Item}>Add to Library</Menu.Item>
|
|
2125
2126
|
|
|
@@ -2255,6 +2256,9 @@ When the trigger and menu content need to live in different parts of the tree (f
|
|
|
2255
2256
|
Note that only top-level menus can have detached triggers.
|
|
2256
2257
|
Submenus must have their triggers defined within the `SubmenuRoot` part.
|
|
2257
2258
|
|
|
2259
|
+
The imperative methods on the handle, such as `open()` and `close()`, require a `<Menu.Root>` using the same handle to be mounted.
|
|
2260
|
+
Calls made while no root is attached to the handle — before one mounts, or after it unmounts — are ignored. Each time a root mounts, it starts from fresh state: a call made while no root was attached is not replayed, and no open state carries over from a previous mount.
|
|
2261
|
+
|
|
2258
2262
|
```jsx title="Detached triggers"
|
|
2259
2263
|
const demoMenu = Menu.createHandle();
|
|
2260
2264
|
|
|
@@ -2298,14 +2302,14 @@ export default function MenuDetachedTriggersSimpleDemo() {
|
|
|
2298
2302
|
<Menu.Trigger
|
|
2299
2303
|
handle={demoMenu}
|
|
2300
2304
|
aria-label="Project actions"
|
|
2301
|
-
className="flex size-8 items-center justify-center rounded-none border border-neutral-950 bg-white text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-
|
|
2305
|
+
className="flex size-8 items-center justify-center rounded-none border border-neutral-950 bg-white text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-pressed:bg-neutral-100 dark:border-white dark:bg-neutral-950 dark:text-white dark:hover:not-data-disabled:bg-neutral-800 dark:active:not-data-disabled:bg-neutral-700 data-disabled:border-neutral-500 data-disabled:text-neutral-500 disabled:border-neutral-500 disabled:text-neutral-500 dark:data-disabled:border-neutral-400 dark:data-disabled:text-neutral-400 dark:data-pressed:bg-neutral-800 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-neutral-950 dark:focus-visible:outline-white"
|
|
2302
2306
|
>
|
|
2303
2307
|
<EllipsisHorizontalIcon />
|
|
2304
2308
|
</Menu.Trigger>
|
|
2305
2309
|
|
|
2306
2310
|
<Menu.Root handle={demoMenu}>
|
|
2307
2311
|
<Menu.Portal>
|
|
2308
|
-
<Menu.Positioner sideOffset={8} className="outline-hidden">
|
|
2312
|
+
<Menu.Positioner sideOffset={8} align="start" className="outline-hidden">
|
|
2309
2313
|
<Menu.Popup className={popupClass}>
|
|
2310
2314
|
<Menu.Item className={itemClass}>Rename</Menu.Item>
|
|
2311
2315
|
<Menu.Item className={itemClass}>Duplicate</Menu.Item>
|
|
@@ -2391,7 +2395,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
2391
2395
|
}
|
|
2392
2396
|
}
|
|
2393
2397
|
|
|
2394
|
-
&[data-
|
|
2398
|
+
&[data-pressed] {
|
|
2395
2399
|
background-color: oklch(97% 0 0deg);
|
|
2396
2400
|
|
|
2397
2401
|
@media (prefers-color-scheme: dark) {
|
|
@@ -2472,7 +2476,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
2472
2476
|
}
|
|
2473
2477
|
}
|
|
2474
2478
|
|
|
2475
|
-
&[data-
|
|
2479
|
+
&[data-pressed] {
|
|
2476
2480
|
background-color: oklch(97% 0 0deg);
|
|
2477
2481
|
|
|
2478
2482
|
@media (prefers-color-scheme: dark) {
|
|
@@ -2620,7 +2624,7 @@ export default function MenuDetachedTriggersSimpleDemo() {
|
|
|
2620
2624
|
|
|
2621
2625
|
<Menu.Root handle={demoMenu}>
|
|
2622
2626
|
<Menu.Portal>
|
|
2623
|
-
<Menu.Positioner sideOffset={8} className={styles.Positioner}>
|
|
2627
|
+
<Menu.Positioner sideOffset={8} align="start" className={styles.Positioner}>
|
|
2624
2628
|
<Menu.Popup className={styles.Popup}>
|
|
2625
2629
|
<Menu.Item className={styles.Item}>Rename</Menu.Item>
|
|
2626
2630
|
<Menu.Item className={styles.Item}>Duplicate</Menu.Item>
|
|
@@ -2823,7 +2827,7 @@ export default function MenuDetachedTriggersControlledDemo() {
|
|
|
2823
2827
|
>
|
|
2824
2828
|
{({ payload }) => (
|
|
2825
2829
|
<Menu.Portal>
|
|
2826
|
-
<Menu.Positioner sideOffset={8} className="outline-hidden">
|
|
2830
|
+
<Menu.Positioner sideOffset={8} align="start" className="outline-hidden">
|
|
2827
2831
|
<Menu.Popup className={popupClass}>
|
|
2828
2832
|
{payload &&
|
|
2829
2833
|
MENUS[payload].map((item, index) => (
|
|
@@ -2843,7 +2847,7 @@ export default function MenuDetachedTriggersControlledDemo() {
|
|
|
2843
2847
|
const itemClass =
|
|
2844
2848
|
"flex cursor-default py-2 pr-8 pl-4 text-sm leading-4 outline-hidden select-none data-highlighted:relative data-highlighted:z-0 data-highlighted:text-white data-highlighted:before:absolute data-highlighted:before:inset-x-1 data-highlighted:before:inset-y-0 data-highlighted:before:z-[-1] data-highlighted:before:bg-neutral-950 data-highlighted:before:content-[''] data-disabled:text-neutral-500 dark:data-highlighted:text-neutral-950 dark:data-highlighted:before:bg-white dark:data-disabled:text-neutral-400";
|
|
2845
2849
|
const triggerClass =
|
|
2846
|
-
'flex h-8 items-center justify-center gap-2 rounded-none border border-neutral-950 bg-white px-3 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:bg-neutral-100 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-neutral-950 dark:focus-visible:outline-white active:bg-neutral-200 data-
|
|
2850
|
+
'flex h-8 items-center justify-center gap-2 rounded-none border border-neutral-950 bg-white px-3 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:bg-neutral-100 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-neutral-950 dark:focus-visible:outline-white active:bg-neutral-200 data-pressed:bg-neutral-100 dark:border-white dark:bg-neutral-950 dark:text-white dark:hover:bg-neutral-800 dark:active:bg-neutral-700 dark:data-pressed:bg-neutral-800';
|
|
2847
2851
|
const popupClass =
|
|
2848
2852
|
'relative origin-[var(--transform-origin)] border border-neutral-950 bg-white py-1 text-neutral-950 shadow-[0.25rem_0.25rem_0] shadow-black/12 outline-hidden transition-[scale,opacity] duration-100 ease-out data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0 dark:border-white dark:bg-neutral-950 dark:text-white dark:shadow-none';
|
|
2849
2853
|
```
|
|
@@ -2895,7 +2899,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
2895
2899
|
}
|
|
2896
2900
|
}
|
|
2897
2901
|
|
|
2898
|
-
&[data-
|
|
2902
|
+
&[data-pressed] {
|
|
2899
2903
|
background-color: oklch(97% 0 0deg);
|
|
2900
2904
|
|
|
2901
2905
|
@media (prefers-color-scheme: dark) {
|
|
@@ -2976,7 +2980,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
2976
2980
|
}
|
|
2977
2981
|
}
|
|
2978
2982
|
|
|
2979
|
-
&[data-
|
|
2983
|
+
&[data-pressed] {
|
|
2980
2984
|
background-color: oklch(97% 0 0deg);
|
|
2981
2985
|
|
|
2982
2986
|
@media (prefers-color-scheme: dark) {
|
|
@@ -3195,7 +3199,7 @@ export default function MenuDetachedTriggersControlledDemo() {
|
|
|
3195
3199
|
>
|
|
3196
3200
|
{({ payload }) => (
|
|
3197
3201
|
<Menu.Portal>
|
|
3198
|
-
<Menu.Positioner className={styles.Positioner} sideOffset={8}>
|
|
3202
|
+
<Menu.Positioner className={styles.Positioner} sideOffset={8} align="start">
|
|
3199
3203
|
<Menu.Popup className={styles.Popup}>
|
|
3200
3204
|
{payload &&
|
|
3201
3205
|
itemGroups[payload].map((item, index) => (
|
|
@@ -3232,7 +3236,7 @@ import { Menu } from '@base-ui/react/menu';
|
|
|
3232
3236
|
export default function MenuArrowDemo() {
|
|
3233
3237
|
return (
|
|
3234
3238
|
<Menu.Root>
|
|
3235
|
-
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-
|
|
3239
|
+
<Menu.Trigger className="flex h-8 items-center justify-center gap-1.5 rounded-none border border-neutral-950 bg-white pl-3 pr-2 text-sm leading-none whitespace-nowrap font-normal text-neutral-950 select-none hover:not-data-disabled:bg-neutral-100 active:not-data-disabled:bg-neutral-200 data-pressed:bg-neutral-100 dark:border-white dark:bg-neutral-950 dark:text-white dark:hover:not-data-disabled:bg-neutral-800 dark:active:not-data-disabled:bg-neutral-700 data-disabled:border-neutral-500 data-disabled:text-neutral-500 disabled:border-neutral-500 disabled:text-neutral-500 dark:data-disabled:border-neutral-400 dark:data-disabled:text-neutral-400 dark:data-pressed:bg-neutral-800 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-neutral-950 dark:focus-visible:outline-white">
|
|
3236
3240
|
Song <CaretDownIcon />
|
|
3237
3241
|
</Menu.Trigger>
|
|
3238
3242
|
<Menu.Portal>
|
|
@@ -3328,7 +3332,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
3328
3332
|
}
|
|
3329
3333
|
}
|
|
3330
3334
|
|
|
3331
|
-
&[data-
|
|
3335
|
+
&[data-pressed] {
|
|
3332
3336
|
background-color: oklch(97% 0 0deg);
|
|
3333
3337
|
|
|
3334
3338
|
@media (prefers-color-scheme: dark) {
|
|
@@ -3550,7 +3554,7 @@ The menu also supports content transitions.
|
|
|
3550
3554
|
This is useful when different triggers display different content within the same menu.
|
|
3551
3555
|
|
|
3552
3556
|
To enable content animations, wrap the menu content in the `<Menu.Viewport>` part.
|
|
3553
|
-
This part renders a `div` with `data-activation-direction`, containing space-separated horizontal (`left` or `right`) and vertical (`up` or `down`)
|
|
3557
|
+
This part renders a `div` with `data-activation-direction`, containing up to two space-separated tokens — a horizontal (`left` or `right`) and a vertical (`up` or `down`) value — so you can make direction-aware animations.
|
|
3554
3558
|
|
|
3555
3559
|
Inside `<Menu.Viewport>`, content is wrapped in `div`s with transition data attributes:
|
|
3556
3560
|
|
|
@@ -3620,6 +3624,7 @@ export default function MenuDetachedTriggersFullDemo() {
|
|
|
3620
3624
|
<Menu.Portal>
|
|
3621
3625
|
<Menu.Positioner
|
|
3622
3626
|
sideOffset={8}
|
|
3627
|
+
align="start"
|
|
3623
3628
|
className={`
|
|
3624
3629
|
outline-none
|
|
3625
3630
|
h-[var(--positioner-height)] w-[var(--positioner-width)] max-w-[var(--available-width)]
|
|
@@ -3700,9 +3705,9 @@ const triggerClass = `
|
|
|
3700
3705
|
rounded-none border border-neutral-950 bg-white
|
|
3701
3706
|
px-3 text-sm font-normal text-neutral-950
|
|
3702
3707
|
select-none
|
|
3703
|
-
hover:bg-neutral-100 active:bg-neutral-200 data-
|
|
3708
|
+
hover:bg-neutral-100 active:bg-neutral-200 data-pressed:bg-neutral-100
|
|
3704
3709
|
dark:border-white dark:bg-neutral-950 dark:text-white
|
|
3705
|
-
dark:hover:bg-neutral-800 dark:active:bg-neutral-700 dark:data-
|
|
3710
|
+
dark:hover:bg-neutral-800 dark:active:bg-neutral-700 dark:data-pressed:bg-neutral-800
|
|
3706
3711
|
focus-visible:outline focus-visible:outline-2
|
|
3707
3712
|
focus-visible:-outline-offset-1 focus-visible:outline-neutral-950 dark:focus-visible:outline-white
|
|
3708
3713
|
`;
|
|
@@ -3764,7 +3769,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
3764
3769
|
}
|
|
3765
3770
|
}
|
|
3766
3771
|
|
|
3767
|
-
&[data-
|
|
3772
|
+
&[data-pressed] {
|
|
3768
3773
|
background-color: oklch(97% 0 0deg);
|
|
3769
3774
|
|
|
3770
3775
|
@media (prefers-color-scheme: dark) {
|
|
@@ -3845,7 +3850,7 @@ This example shows how to implement the component using CSS Modules.
|
|
|
3845
3850
|
}
|
|
3846
3851
|
}
|
|
3847
3852
|
|
|
3848
|
-
&[data-
|
|
3853
|
+
&[data-pressed] {
|
|
3849
3854
|
background-color: oklch(97% 0 0deg);
|
|
3850
3855
|
|
|
3851
3856
|
@media (prefers-color-scheme: dark) {
|
|
@@ -4034,6 +4039,7 @@ export default function MenuDetachedTriggersFullDemo() {
|
|
|
4034
4039
|
<Menu.Portal>
|
|
4035
4040
|
<Menu.Positioner
|
|
4036
4041
|
sideOffset={8}
|
|
4042
|
+
align="start"
|
|
4037
4043
|
className={`${styles.Positioner} ${transitionStyles.Positioner}`}
|
|
4038
4044
|
>
|
|
4039
4045
|
<Menu.Popup className={`${styles.Popup} ${transitionStyles.Popup}`}>
|
|
@@ -4157,23 +4163,23 @@ Doesn't render its own HTML element.
|
|
|
4157
4163
|
|
|
4158
4164
|
**Root Props:**
|
|
4159
4165
|
|
|
4160
|
-
| Prop | Type | Default | Description
|
|
4161
|
-
| :------------------- | :---------------------------------------------------------------------- | :----------- |
|
|
4162
|
-
| defaultOpen | `boolean` | `false` | Whether the menu is initially open. To render a controlled menu, use the `open` prop instead.
|
|
4163
|
-
| open | `boolean` | - | Whether the menu is currently open.
|
|
4164
|
-
| onOpenChange | `((open: boolean, eventDetails: Menu.Root.ChangeEventDetails) => void)` | - | Event handler called when the menu is opened or closed.
|
|
4165
|
-
| highlightItemOnHover | `boolean` | `true` | Whether moving the pointer over items should highlight them.
Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state.
|
|
4166
|
-
| actionsRef | `React.RefObject<Menu.Root.Actions \| null>` | - | A ref to imperative actions. `unmount`: Manually unmounts the menu.
Call this after any externally controlled closing animation finishes.`close`: When specified, the menu can be closed imperatively.
|
|
4167
|
-
| closeParentOnEsc | `boolean` | `false` | When in a submenu, determines whether pressing the Escape key
closes the entire menu, or only the current child menu.
|
|
4168
|
-
| defaultTriggerId | `string \| null` | - | ID of the trigger that the
|
|
4169
|
-
| handle | `Menu.Handle<Payload>` | - | A handle to associate the menu with a trigger.
If specified, allows external triggers to control the menu's open state.
|
|
4170
|
-
| loopFocus | `boolean` | `true` | Whether to loop keyboard focus back to the first item
when the end of the list is reached while using the arrow keys.
|
|
4171
|
-
| modal | `boolean` | `true` | Determines if the menu enters a modal state when open. `true`: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled.`false`: user interaction with the rest of the document is allowed. |
|
|
4172
|
-
| onOpenChangeComplete | `((open: boolean) => void)` | - | Event handler called after any animations complete when the menu is closed.
|
|
4173
|
-
| triggerId | `string \| null` | - | ID of the trigger that the
|
|
4174
|
-
| disabled | `boolean` | `false` | Whether the component should ignore user interaction.
|
|
4175
|
-
| orientation | `Menu.Root.Orientation` | `'vertical'` | The visual orientation of the menu.
Controls whether roving focus uses up/down or left/right arrow keys.
|
|
4176
|
-
| children | `React.ReactNode \| PayloadChildRenderFunction<Payload>` | - | The content of the
|
|
4166
|
+
| Prop | Type | Default | Description |
|
|
4167
|
+
| :------------------- | :---------------------------------------------------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
4168
|
+
| defaultOpen | `boolean` | `false` | Whether the menu is initially open. To render a controlled menu, use the `open` prop instead. |
|
|
4169
|
+
| open | `boolean` | - | Whether the menu is currently open. |
|
|
4170
|
+
| onOpenChange | `((open: boolean, eventDetails: Menu.Root.ChangeEventDetails) => void)` | - | Event handler called when the menu is opened or closed. |
|
|
4171
|
+
| highlightItemOnHover | `boolean` | `true` | Whether moving the pointer over items should highlight them.
Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state. |
|
|
4172
|
+
| actionsRef | `React.RefObject<Menu.Root.Actions \| null>` | - | A ref to imperative actions. `unmount`: Manually unmounts the menu.
Call this after any externally controlled closing animation finishes.`close`: When specified, the menu can be closed imperatively. |
|
|
4173
|
+
| closeParentOnEsc | `boolean` | `false` | When in a submenu, determines whether pressing the Escape key
closes the entire menu, or only the current child menu. |
|
|
4174
|
+
| defaultTriggerId | `string \| null` | - | ID of the trigger that the menu is associated with.
This is useful in conjunction with the `defaultOpen` prop to create an initially open menu. |
|
|
4175
|
+
| handle | `Menu.Handle<Payload>` | - | A handle to associate the menu with a trigger.
If specified, allows external triggers to control the menu's open state. |
|
|
4176
|
+
| loopFocus | `boolean` | `true` | Whether to loop keyboard focus back to the first item
when the end of the list is reached while using the arrow keys. |
|
|
4177
|
+
| modal | `boolean` | `true` | Determines if the menu enters a modal state when open. `true`: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled.`false`: user interaction with the rest of the document is allowed. On touch devices, a `true` modal blocks outside taps but leaves the page scrollable unless the popup spans nearly the full viewport width, matching native iOS behavior. Nested menus ignore this prop, and menus opened by hover are never modal. |
|
|
4178
|
+
| onOpenChangeComplete | `((open: boolean) => void)` | - | Event handler called after any animations complete when the menu is opened or closed. |
|
|
4179
|
+
| triggerId | `string \| null` | - | ID of the trigger that the menu is associated with.
This is useful in conjunction with the `open` prop to create a controlled menu.
There's no need to specify this prop when the menu is uncontrolled (that is, when the `open` prop is not set). |
|
|
4180
|
+
| disabled | `boolean` | `false` | Whether the component should ignore user interaction. |
|
|
4181
|
+
| orientation | `Menu.Root.Orientation` | `'vertical'` | The visual orientation of the menu.
Controls whether roving focus uses up/down or left/right arrow keys. |
|
|
4182
|
+
| children | `React.ReactNode \| PayloadChildRenderFunction<Payload>` | - | The content of the menu.
This can be a regular React node or a render function that receives the `payload` of the active trigger. |
|
|
4177
4183
|
|
|
4178
4184
|
### Root.Props
|
|
4179
4185
|
|
|
@@ -4332,12 +4338,12 @@ Renders a `<div>` element.
|
|
|
4332
4338
|
|
|
4333
4339
|
**Backdrop Data Attributes:**
|
|
4334
4340
|
|
|
4335
|
-
| Attribute | Type | Description
|
|
4336
|
-
| :------------------ | :--- |
|
|
4337
|
-
| data-open | - | Present when the menu is open.
|
|
4338
|
-
| data-closed | - | Present when the menu is closed.
|
|
4339
|
-
| data-starting-style | - | Present when the menu
|
|
4340
|
-
| data-ending-style | - | Present when the menu is animating out.
|
|
4341
|
+
| Attribute | Type | Description |
|
|
4342
|
+
| :------------------ | :--- | :----------------------------------------- |
|
|
4343
|
+
| data-open | - | Present when the menu is open. |
|
|
4344
|
+
| data-closed | - | Present when the menu is closed. |
|
|
4345
|
+
| data-starting-style | - | Present when the menu begins animating in. |
|
|
4346
|
+
| data-ending-style | - | Present when the menu is animating out. |
|
|
4341
4347
|
|
|
4342
4348
|
### Backdrop.Props
|
|
4343
4349
|
|
|
@@ -4423,13 +4429,15 @@ Renders a `<div>` element.
|
|
|
4423
4429
|
|
|
4424
4430
|
**Positioner CSS Variables:**
|
|
4425
4431
|
|
|
4426
|
-
| Variable
|
|
4427
|
-
|
|
|
4428
|
-
| `--anchor-height`
|
|
4429
|
-
| `--anchor-width`
|
|
4430
|
-
| `--available-height`
|
|
4431
|
-
| `--available-width`
|
|
4432
|
-
| `--
|
|
4432
|
+
| Variable | Type | Description |
|
|
4433
|
+
| :-------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------- |
|
|
4434
|
+
| `--anchor-height` | `number` | The anchor's height. |
|
|
4435
|
+
| `--anchor-width` | `number` | The anchor's width. |
|
|
4436
|
+
| `--available-height` | `number` | The available height between the trigger and the edge of the viewport. |
|
|
4437
|
+
| `--available-width` | `number` | The available width between the trigger and the edge of the viewport. |
|
|
4438
|
+
| `--positioner-height` | `number` | The height of the menu's positioner.
It is important to set `height` to this value when using CSS to animate size changes. |
|
|
4439
|
+
| `--positioner-width` | `number` | The width of the menu's positioner.
It is important to set `width` to this value when using CSS to animate size changes. |
|
|
4440
|
+
| `--transform-origin` | `string` | The coordinates that this element is anchored to. Used for animations and transitions. |
|
|
4433
4441
|
|
|
4434
4442
|
### Positioner.Props
|
|
4435
4443
|
|
|
@@ -4478,7 +4486,7 @@ Renders a `<div>` element.
|
|
|
4478
4486
|
| data-align | `'start' \| 'center' \| 'end'` | Indicates how the popup is aligned relative to specified side. |
|
|
4479
4487
|
| data-instant | `'click' \| 'dismiss' \| 'group' \| 'trigger-change'` | Present if animations should be instant. |
|
|
4480
4488
|
| data-side | `'top' \| 'bottom' \| 'left' \| 'right' \| 'inline-end' \| 'inline-start'` | Indicates which side the popup is positioned relative to the trigger. |
|
|
4481
|
-
| data-starting-style | - | Present when the menu
|
|
4489
|
+
| data-starting-style | - | Present when the menu begins animating in. |
|
|
4482
4490
|
| data-ending-style | - | Present when the menu is animating out. |
|
|
4483
4491
|
|
|
4484
4492
|
### Popup.Props
|
|
@@ -4726,7 +4734,7 @@ Doesn't render its own HTML element.
|
|
|
4726
4734
|
| actionsRef | `React.RefObject<Menu.Root.Actions \| null>` | - | A ref to imperative actions. `unmount`: Manually unmounts the menu.
Call this after any externally controlled closing animation finishes.`close`: When specified, the menu can be closed imperatively. |
|
|
4727
4735
|
| closeParentOnEsc | `boolean` | `false` | When in a submenu, determines whether pressing the Escape key
closes the entire menu, or only the current child menu. |
|
|
4728
4736
|
| loopFocus | `boolean` | `true` | Whether to loop keyboard focus back to the first item
when the end of the list is reached while using the arrow keys. |
|
|
4729
|
-
| onOpenChangeComplete | `((open: boolean) => void)` | - | Event handler called after any animations complete when the menu is closed.
|
|
4737
|
+
| onOpenChangeComplete | `((open: boolean) => void)` | - | Event handler called after any animations complete when the menu is opened or closed. |
|
|
4730
4738
|
| disabled | `boolean` | `false` | Whether the component should ignore user interaction. |
|
|
4731
4739
|
| orientation | `Menu.Root.Orientation` | `'vertical'` | The visual orientation of the menu.
Controls whether roving focus uses up/down or left/right arrow keys. |
|
|
4732
4740
|
| children | `React.ReactNode` | - | The content of the submenu. |
|
|
@@ -4980,13 +4988,13 @@ Renders a `<span>` element.
|
|
|
4980
4988
|
|
|
4981
4989
|
**RadioItemIndicator Data Attributes:**
|
|
4982
4990
|
|
|
4983
|
-
| Attribute | Type | Description
|
|
4984
|
-
| :------------------ | :--- |
|
|
4985
|
-
| data-checked | - | Present when the menu radio item is selected.
|
|
4986
|
-
| data-unchecked | - | Present when the menu radio item is not selected.
|
|
4987
|
-
| data-disabled | - | Present when the menu radio item is disabled.
|
|
4988
|
-
| data-starting-style | - | Present when the radio indicator
|
|
4989
|
-
| data-ending-style | - | Present when the radio indicator is animating out.
|
|
4991
|
+
| Attribute | Type | Description |
|
|
4992
|
+
| :------------------ | :--- | :---------------------------------------------------- |
|
|
4993
|
+
| data-checked | - | Present when the menu radio item is selected. |
|
|
4994
|
+
| data-unchecked | - | Present when the menu radio item is not selected. |
|
|
4995
|
+
| data-disabled | - | Present when the menu radio item is disabled. |
|
|
4996
|
+
| data-starting-style | - | Present when the radio indicator begins animating in. |
|
|
4997
|
+
| data-ending-style | - | Present when the radio indicator is animating out. |
|
|
4990
4998
|
|
|
4991
4999
|
### RadioItemIndicator.Props
|
|
4992
5000
|
|
|
@@ -5126,7 +5134,7 @@ Renders a `<span>` element.
|
|
|
5126
5134
|
| data-checked | - | Present when the menu checkbox item is checked. |
|
|
5127
5135
|
| data-unchecked | - | Present when the menu checkbox item is not checked. |
|
|
5128
5136
|
| data-disabled | - | Present when the menu checkbox item is disabled. |
|
|
5129
|
-
| data-starting-style | - | Present when the indicator
|
|
5137
|
+
| data-starting-style | - | Present when the indicator begins animating in. |
|
|
5130
5138
|
| data-ending-style | - | Present when the indicator is animating out. |
|
|
5131
5139
|
|
|
5132
5140
|
### CheckboxItemIndicator.Props
|
|
@@ -5160,11 +5168,18 @@ type ReturnValue = Menu.Handle<Payload>;
|
|
|
5160
5168
|
|
|
5161
5169
|
### Handle
|
|
5162
5170
|
|
|
5171
|
+
Controls a Menu imperatively and associates detached `Menu.Trigger` components with a `Menu.Root`.
|
|
5172
|
+
Create one with `Menu.createHandle()` and pass it to the `handle` prop of the root and of any
|
|
5173
|
+
triggers rendered outside of it.
|
|
5174
|
+
|
|
5175
|
+
The imperative methods take effect only while a root using this handle is mounted; calls made
|
|
5176
|
+
before a root attaches (or after it unmounts) are ignored.
|
|
5177
|
+
|
|
5163
5178
|
**Properties:**
|
|
5164
5179
|
|
|
5165
|
-
| Property | Type | Modifiers | Description
|
|
5166
|
-
| :------- | :-------- | :-------- |
|
|
5167
|
-
| isOpen | `boolean` | readonly |
|
|
5180
|
+
| Property | Type | Modifiers | Description |
|
|
5181
|
+
| :------- | :-------- | :-------- | :------------------------------------------------------------------------------------------- |
|
|
5182
|
+
| isOpen | `boolean` | readonly | Whether the menu is currently open. Returns `false` while no root is attached to the handle. |
|
|
5168
5183
|
|
|
5169
5184
|
**Methods:**
|
|
5170
5185
|
|
|
@@ -5173,7 +5188,8 @@ function open(triggerId: string): void;
|
|
|
5173
5188
|
```
|
|
5174
5189
|
|
|
5175
5190
|
Opens the menu and associates it with the trigger with the given id.
|
|
5176
|
-
|
|
5191
|
+
|
|
5192
|
+
This method should only be called in an event handler or an effect (not during rendering).
|
|
5177
5193
|
|
|
5178
5194
|
```typescript
|
|
5179
5195
|
function close(): void;
|
|
@@ -5181,6 +5197,8 @@ function close(): void;
|
|
|
5181
5197
|
|
|
5182
5198
|
Closes the menu.
|
|
5183
5199
|
|
|
5200
|
+
This method should only be called in an event handler or an effect (not during rendering).
|
|
5201
|
+
|
|
5184
5202
|
### LinkItem
|
|
5185
5203
|
|
|
5186
5204
|
A link in the menu that can be used to navigate to a different page or section.
|
|
@@ -5188,13 +5206,13 @@ Renders an `<a>` element.
|
|
|
5188
5206
|
|
|
5189
5207
|
**LinkItem Props:**
|
|
5190
5208
|
|
|
5191
|
-
| Prop | Type
|
|
5192
|
-
| :----------- |
|
|
5193
|
-
| label | `string`
|
|
5194
|
-
| closeOnClick | `boolean`
|
|
5195
|
-
| className | `string \| ((state: Menu.LinkItem.State) => string \| undefined)`
|
|
5196
|
-
| style | `React.CSSProperties \| ((state: Menu.LinkItem.State) => React.CSSProperties \| undefined)`
|
|
5197
|
-
| render | `ReactElement \| ((props:
|
|
5209
|
+
| Prop | Type | Default | Description |
|
|
5210
|
+
| :----------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5211
|
+
| label | `string` | - | Overrides the text label to use when the item is matched during keyboard text navigation. |
|
|
5212
|
+
| closeOnClick | `boolean` | `false` | Whether to close the menu when the item is clicked. |
|
|
5213
|
+
| className | `string \| ((state: Menu.LinkItem.State) => string \| undefined)` | - | CSS class applied to the element, or a function that
returns a class based on the component's state. |
|
|
5214
|
+
| style | `React.CSSProperties \| ((state: Menu.LinkItem.State) => React.CSSProperties \| undefined)` | - | Style applied to the element, or a function that
returns a style object based on the component's state. |
|
|
5215
|
+
| render | `ReactElement \| ((props: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, state: Menu.LinkItem.State) => ReactElement)` | - | Allows you to replace the component's HTML element
with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
|
|
5198
5216
|
|
|
5199
5217
|
**LinkItem Data Attributes:**
|
|
5200
5218
|
|
|
@@ -5350,6 +5368,8 @@ Maps `Canonical`: `Alias` — Use Canonical when its namespace is already import
|
|
|
5350
5368
|
- `Menu.SubmenuTrigger.Props`: `MenuSubmenuTriggerProps`
|
|
5351
5369
|
- `Menu.SubmenuTrigger.State`: `MenuSubmenuTriggerState`
|
|
5352
5370
|
|
|
5371
|
+
The `Viewport` is optional — reach for it only when a single popup is opened by multiple triggers, its content differs per trigger, and the switch between them is animated. When used, set `width: var(--positioner-width)` and `height: var(--positioner-height)` on the `Positioner` so its box is frozen to the measured size during the transition; otherwise content-driven resizing can make the popup thrash or flip to another side.
|
|
5372
|
+
|
|
5353
5373
|
## createHandle
|
|
5354
5374
|
|
|
5355
5375
|
[//]: # '@exclude-table-of-contents'
|