@base-ui/react 1.1.0 → 1.3.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 +321 -1
- package/accordion/header/AccordionHeader.d.ts +4 -2
- package/accordion/item/AccordionItem.d.ts +11 -5
- package/accordion/item/AccordionItemContext.d.ts +3 -3
- package/accordion/item/stateAttributesMapping.d.ts +2 -2
- package/accordion/panel/AccordionPanel.d.ts +6 -3
- package/accordion/root/AccordionRoot.d.ts +25 -16
- package/accordion/root/AccordionRootContext.d.ts +7 -7
- package/accordion/trigger/AccordionTrigger.d.ts +4 -2
- package/accordion/trigger/AccordionTrigger.js +3 -1
- package/alert-dialog/root/AlertDialogRoot.d.ts +5 -3
- package/alert-dialog/root/AlertDialogRoot.js +6 -4
- package/autocomplete/index.d.ts +1 -0
- package/autocomplete/index.parts.d.ts +3 -1
- package/autocomplete/index.parts.js +15 -1
- package/autocomplete/root/AutocompleteRoot.d.ts +21 -16
- package/autocomplete/root/AutocompleteRoot.js +8 -7
- package/avatar/fallback/AvatarFallback.d.ts +5 -3
- package/avatar/fallback/AvatarFallback.js +2 -2
- package/avatar/image/AvatarImage.d.ts +11 -3
- package/avatar/image/AvatarImage.js +34 -6
- package/avatar/image/AvatarImageDataAttributes.d.ts +10 -0
- package/avatar/image/AvatarImageDataAttributes.js +18 -0
- package/avatar/image/useImageLoadingStatus.d.ts +2 -2
- package/avatar/root/AvatarRoot.d.ts +4 -1
- package/avatar/root/AvatarRoot.js +2 -2
- package/button/Button.d.ts +1 -1
- package/button/Button.js +2 -2
- package/checkbox/indicator/CheckboxIndicator.d.ts +7 -4
- package/checkbox/indicator/CheckboxIndicator.js +4 -4
- package/checkbox/root/CheckboxRoot.d.ts +16 -16
- package/checkbox/root/CheckboxRoot.js +35 -9
- package/checkbox/root/CheckboxRootContext.d.ts +4 -4
- package/checkbox/utils/useStateAttributesMapping.d.ts +2 -2
- package/checkbox-group/CheckboxGroup.d.ts +8 -8
- package/checkbox-group/CheckboxGroup.js +2 -2
- package/checkbox-group/CheckboxGroupContext.d.ts +2 -2
- package/checkbox-group/useCheckboxGroupParent.d.ts +5 -8
- package/collapsible/panel/CollapsiblePanel.d.ts +8 -5
- package/collapsible/panel/useCollapsiblePanel.d.ts +2 -5
- package/collapsible/root/CollapsibleRoot.d.ts +7 -7
- package/collapsible/root/CollapsibleRootContext.d.ts +4 -4
- package/collapsible/root/stateAttributesMapping.d.ts +2 -2
- package/collapsible/root/useCollapsibleRoot.d.ts +4 -7
- package/collapsible/trigger/CollapsibleTrigger.d.ts +4 -2
- package/combobox/arrow/ComboboxArrow.d.ts +10 -1
- package/combobox/arrow/ComboboxArrow.js +2 -2
- package/combobox/arrow/ComboboxArrowDataAttributes.js +2 -2
- package/combobox/backdrop/ComboboxBackdrop.d.ts +4 -1
- package/combobox/backdrop/ComboboxBackdrop.js +2 -2
- package/combobox/chip/ComboboxChip.d.ts +1 -1
- package/combobox/chip/ComboboxChip.js +6 -3
- package/combobox/chip/ComboboxChipContext.js +1 -0
- package/combobox/chip-remove/ComboboxChipRemove.d.ts +1 -1
- package/combobox/chip-remove/ComboboxChipRemove.js +28 -33
- package/combobox/chips/ComboboxChips.d.ts +1 -1
- package/combobox/chips/ComboboxChipsContext.js +1 -0
- package/combobox/clear/ComboboxClear.d.ts +6 -3
- package/combobox/clear/ComboboxClear.js +2 -3
- package/combobox/collection/ComboboxCollection.d.ts +2 -0
- package/combobox/empty/ComboboxEmpty.d.ts +1 -1
- package/combobox/group/ComboboxGroup.d.ts +2 -2
- package/combobox/group/ComboboxGroupContext.d.ts +1 -1
- package/combobox/group/ComboboxGroupContext.js +1 -0
- package/combobox/group-label/ComboboxGroupLabel.d.ts +1 -1
- package/combobox/icon/ComboboxIcon.d.ts +2 -2
- package/combobox/index.d.ts +2 -0
- package/combobox/index.parts.d.ts +4 -1
- package/combobox/index.parts.js +22 -1
- package/combobox/input/ComboboxInput.d.ts +4 -4
- package/combobox/input/ComboboxInput.js +60 -13
- package/combobox/input-group/ComboboxInputGroup.d.ts +40 -0
- package/combobox/input-group/ComboboxInputGroup.js +68 -0
- package/combobox/input-group/ComboboxInputGroupDataAttributes.d.ts +55 -0
- package/combobox/input-group/ComboboxInputGroupDataAttributes.js +62 -0
- package/combobox/item/ComboboxItem.d.ts +4 -4
- package/combobox/item/ComboboxItem.js +17 -16
- package/combobox/item/ComboboxItemContext.js +1 -0
- package/combobox/item-indicator/ComboboxItemIndicator.d.ts +8 -2
- package/combobox/item-indicator/ComboboxItemIndicator.js +2 -2
- package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.d.ts +10 -0
- package/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.js +18 -0
- package/combobox/label/ComboboxLabel.d.ts +16 -0
- package/combobox/label/ComboboxLabel.js +68 -0
- package/combobox/list/ComboboxList.d.ts +1 -1
- package/combobox/list/ComboboxList.js +2 -2
- package/combobox/popup/ComboboxPopup.d.ts +21 -3
- package/combobox/popup/ComboboxPopup.js +11 -4
- package/combobox/popup/ComboboxPopupDataAttributes.js +2 -2
- package/combobox/portal/ComboboxPortal.d.ts +4 -5
- package/combobox/portal/ComboboxPortalContext.js +1 -0
- package/combobox/positioner/ComboboxPositioner.d.ts +14 -2
- package/combobox/positioner/ComboboxPositioner.js +8 -5
- package/combobox/positioner/ComboboxPositionerDataAttributes.js +2 -2
- package/combobox/root/AriaCombobox.d.ts +52 -46
- package/combobox/root/AriaCombobox.js +58 -68
- package/combobox/root/ComboboxRoot.d.ts +21 -16
- package/combobox/root/ComboboxRoot.js +3 -1
- package/combobox/root/ComboboxRootContext.d.ts +1 -0
- package/combobox/root/ComboboxRootContext.js +1 -0
- package/combobox/root/utils/useFilter.d.ts +2 -2
- package/combobox/root/utils/useFilteredItems.d.ts +4 -0
- package/combobox/root/utils/useFilteredItems.js +14 -0
- package/combobox/row/ComboboxRow.d.ts +1 -1
- package/combobox/row/ComboboxRowContext.js +1 -0
- package/combobox/status/ComboboxStatus.d.ts +1 -1
- package/combobox/store.d.ts +18 -12
- package/combobox/store.js +5 -3
- package/combobox/trigger/ComboboxTrigger.d.ts +4 -4
- package/combobox/trigger/ComboboxTrigger.js +8 -6
- package/combobox/utils/ComboboxInternalDismissButton.d.ts +5 -0
- package/combobox/utils/ComboboxInternalDismissButton.js +44 -0
- package/composite/item/CompositeItem.d.ts +9 -7
- package/composite/list/CompositeList.d.ts +5 -3
- package/composite/list/CompositeListContext.d.ts +1 -1
- package/composite/list/useCompositeListItem.d.ts +5 -5
- package/composite/root/CompositeRoot.d.ts +22 -20
- package/composite/root/useCompositeRoot.d.ts +12 -12
- package/context-menu/index.d.ts +1 -0
- package/context-menu/index.parts.d.ts +1 -0
- package/context-menu/index.parts.js +7 -0
- package/context-menu/root/ContextMenuRoot.d.ts +1 -1
- package/context-menu/root/ContextMenuRootContext.js +1 -0
- package/context-menu/trigger/ContextMenuTrigger.d.ts +3 -3
- package/context-menu/trigger/ContextMenuTrigger.js +13 -3
- package/csp-provider/CSPContext.d.ts +2 -2
- package/csp-provider/CSPProvider.d.ts +2 -2
- package/dialog/backdrop/DialogBackdrop.d.ts +5 -2
- package/dialog/backdrop/DialogBackdrop.js +2 -2
- package/dialog/close/DialogClose.d.ts +1 -1
- package/dialog/close/DialogClose.js +2 -2
- package/dialog/description/DialogDescription.d.ts +1 -1
- package/dialog/popup/DialogPopup.d.ts +6 -3
- package/dialog/popup/DialogPopup.js +2 -2
- package/dialog/portal/DialogPortal.d.ts +5 -6
- package/dialog/portal/DialogPortalContext.js +1 -0
- package/dialog/root/DialogRoot.d.ts +15 -10
- package/dialog/root/DialogRoot.js +17 -4
- package/dialog/root/useDialogRoot.d.ts +5 -9
- package/dialog/root/useDialogRoot.js +6 -5
- package/dialog/store/DialogStore.d.ts +258 -17
- package/dialog/store/DialogStore.js +3 -0
- package/dialog/title/DialogTitle.d.ts +1 -1
- package/dialog/trigger/DialogTrigger.d.ts +4 -4
- package/dialog/trigger/DialogTrigger.js +3 -3
- package/dialog/viewport/DialogViewport.d.ts +3 -0
- package/dialog/viewport/DialogViewport.js +5 -2
- package/direction-provider/DirectionProvider.d.ts +3 -1
- package/drawer/backdrop/DrawerBackdrop.d.ts +31 -0
- package/drawer/backdrop/DrawerBackdrop.js +63 -0
- package/drawer/backdrop/DrawerBackdropCssVars.d.ts +7 -0
- package/drawer/backdrop/DrawerBackdropCssVars.js +14 -0
- package/drawer/backdrop/DrawerBackdropDataAttributes.d.ts +18 -0
- package/drawer/backdrop/DrawerBackdropDataAttributes.js +26 -0
- package/drawer/close/DrawerClose.d.ts +23 -0
- package/drawer/close/DrawerClose.js +15 -0
- package/drawer/content/DrawerContent.d.ts +15 -0
- package/drawer/content/DrawerContent.js +33 -0
- package/drawer/content/DrawerContentDataAttributes.d.ts +1 -0
- package/drawer/content/DrawerContentDataAttributes.js +7 -0
- package/drawer/description/DrawerDescription.d.ts +18 -0
- package/drawer/description/DrawerDescription.js +15 -0
- package/drawer/indent/DrawerIndent.d.ts +21 -0
- package/drawer/indent/DrawerIndent.js +88 -0
- package/drawer/indent-background/DrawerIndentBackground.d.ts +20 -0
- package/drawer/indent-background/DrawerIndentBackground.js +49 -0
- package/drawer/index.d.ts +15 -0
- package/drawer/index.js +9 -0
- package/drawer/index.parts.d.ts +15 -0
- package/drawer/index.parts.js +116 -0
- package/drawer/popup/DrawerPopup.d.ts +72 -0
- package/drawer/popup/DrawerPopup.js +348 -0
- package/drawer/popup/DrawerPopupCssVars.d.ts +37 -0
- package/drawer/popup/DrawerPopupCssVars.js +44 -0
- package/drawer/popup/DrawerPopupDataAttributes.d.ts +43 -0
- package/drawer/popup/DrawerPopupDataAttributes.js +51 -0
- package/drawer/portal/DrawerPortal.d.ts +29 -0
- package/drawer/portal/DrawerPortal.js +16 -0
- package/drawer/provider/DrawerProvider.d.ts +16 -0
- package/drawer/provider/DrawerProvider.js +100 -0
- package/drawer/provider/DrawerProviderContext.d.ts +19 -0
- package/drawer/provider/DrawerProviderContext.js +21 -0
- package/drawer/root/DrawerRoot.d.ts +126 -0
- package/drawer/root/DrawerRoot.js +239 -0
- package/drawer/root/DrawerRootContext.d.ts +89 -0
- package/drawer/root/DrawerRootContext.js +21 -0
- package/drawer/root/useDrawerSnapPoints.d.ts +15 -0
- package/drawer/root/useDrawerSnapPoints.js +155 -0
- package/drawer/swipe-area/DrawerSwipeArea.d.ts +45 -0
- package/drawer/swipe-area/DrawerSwipeArea.js +387 -0
- package/drawer/swipe-area/DrawerSwipeAreaDataAttributes.d.ts +23 -0
- package/drawer/swipe-area/DrawerSwipeAreaDataAttributes.js +31 -0
- package/drawer/title/DrawerTitle.d.ts +18 -0
- package/drawer/title/DrawerTitle.js +15 -0
- package/drawer/trigger/DrawerTrigger.d.ts +43 -0
- package/drawer/trigger/DrawerTrigger.js +15 -0
- package/drawer/viewport/DrawerViewport.d.ts +33 -0
- package/drawer/viewport/DrawerViewport.js +995 -0
- package/drawer/viewport/DrawerViewportContext.d.ts +11 -0
- package/drawer/viewport/DrawerViewportContext.js +21 -0
- package/drawer/viewport/DrawerViewportDataAttributes.d.ts +22 -0
- package/drawer/viewport/DrawerViewportDataAttributes.js +30 -0
- package/esm/accordion/header/AccordionHeader.d.ts +4 -2
- package/esm/accordion/item/AccordionItem.d.ts +11 -5
- package/esm/accordion/item/AccordionItemContext.d.ts +3 -3
- package/esm/accordion/item/stateAttributesMapping.d.ts +2 -2
- package/esm/accordion/panel/AccordionPanel.d.ts +6 -3
- package/esm/accordion/root/AccordionRoot.d.ts +25 -16
- package/esm/accordion/root/AccordionRootContext.d.ts +7 -7
- package/esm/accordion/trigger/AccordionTrigger.d.ts +4 -2
- package/esm/accordion/trigger/AccordionTrigger.js +3 -1
- package/esm/alert-dialog/root/AlertDialogRoot.d.ts +5 -3
- package/esm/alert-dialog/root/AlertDialogRoot.js +6 -4
- package/esm/autocomplete/index.d.ts +1 -0
- package/esm/autocomplete/index.parts.d.ts +3 -1
- package/esm/autocomplete/index.parts.js +3 -1
- package/esm/autocomplete/root/AutocompleteRoot.d.ts +21 -16
- package/esm/autocomplete/root/AutocompleteRoot.js +8 -7
- package/esm/avatar/fallback/AvatarFallback.d.ts +5 -3
- package/esm/avatar/fallback/AvatarFallback.js +2 -2
- package/esm/avatar/image/AvatarImage.d.ts +11 -3
- package/esm/avatar/image/AvatarImage.js +33 -6
- package/esm/avatar/image/AvatarImageDataAttributes.d.ts +10 -0
- package/esm/avatar/image/AvatarImageDataAttributes.js +12 -0
- package/esm/avatar/image/useImageLoadingStatus.d.ts +2 -2
- package/esm/avatar/root/AvatarRoot.d.ts +4 -1
- package/esm/avatar/root/AvatarRoot.js +2 -2
- package/esm/button/Button.d.ts +1 -1
- package/esm/button/Button.js +2 -2
- package/esm/checkbox/indicator/CheckboxIndicator.d.ts +7 -4
- package/esm/checkbox/indicator/CheckboxIndicator.js +4 -4
- package/esm/checkbox/root/CheckboxRoot.d.ts +16 -16
- package/esm/checkbox/root/CheckboxRoot.js +35 -9
- package/esm/checkbox/root/CheckboxRootContext.d.ts +4 -4
- package/esm/checkbox/utils/useStateAttributesMapping.d.ts +2 -2
- package/esm/checkbox-group/CheckboxGroup.d.ts +8 -8
- package/esm/checkbox-group/CheckboxGroup.js +2 -2
- package/esm/checkbox-group/CheckboxGroupContext.d.ts +2 -2
- package/esm/checkbox-group/useCheckboxGroupParent.d.ts +5 -8
- package/esm/collapsible/panel/CollapsiblePanel.d.ts +8 -5
- package/esm/collapsible/panel/useCollapsiblePanel.d.ts +2 -5
- package/esm/collapsible/root/CollapsibleRoot.d.ts +7 -7
- package/esm/collapsible/root/CollapsibleRootContext.d.ts +4 -4
- package/esm/collapsible/root/stateAttributesMapping.d.ts +2 -2
- package/esm/collapsible/root/useCollapsibleRoot.d.ts +4 -7
- package/esm/collapsible/trigger/CollapsibleTrigger.d.ts +4 -2
- package/esm/combobox/arrow/ComboboxArrow.d.ts +10 -1
- package/esm/combobox/arrow/ComboboxArrow.js +2 -2
- package/esm/combobox/arrow/ComboboxArrowDataAttributes.js +2 -2
- package/esm/combobox/backdrop/ComboboxBackdrop.d.ts +4 -1
- package/esm/combobox/backdrop/ComboboxBackdrop.js +2 -2
- package/esm/combobox/chip/ComboboxChip.d.ts +1 -1
- package/esm/combobox/chip/ComboboxChip.js +6 -3
- package/esm/combobox/chip/ComboboxChipContext.js +2 -0
- package/esm/combobox/chip-remove/ComboboxChipRemove.d.ts +1 -1
- package/esm/combobox/chip-remove/ComboboxChipRemove.js +28 -33
- package/esm/combobox/chips/ComboboxChips.d.ts +1 -1
- package/esm/combobox/chips/ComboboxChipsContext.js +2 -0
- package/esm/combobox/clear/ComboboxClear.d.ts +6 -3
- package/esm/combobox/clear/ComboboxClear.js +2 -3
- package/esm/combobox/collection/ComboboxCollection.d.ts +2 -0
- package/esm/combobox/empty/ComboboxEmpty.d.ts +1 -1
- package/esm/combobox/group/ComboboxGroup.d.ts +2 -2
- package/esm/combobox/group/ComboboxGroupContext.d.ts +1 -1
- package/esm/combobox/group/ComboboxGroupContext.js +2 -0
- package/esm/combobox/group-label/ComboboxGroupLabel.d.ts +1 -1
- package/esm/combobox/icon/ComboboxIcon.d.ts +2 -2
- package/esm/combobox/index.d.ts +2 -0
- package/esm/combobox/index.parts.d.ts +4 -1
- package/esm/combobox/index.parts.js +4 -1
- package/esm/combobox/input/ComboboxInput.d.ts +4 -4
- package/esm/combobox/input/ComboboxInput.js +60 -13
- package/esm/combobox/input-group/ComboboxInputGroup.d.ts +40 -0
- package/esm/combobox/input-group/ComboboxInputGroup.js +63 -0
- package/esm/combobox/input-group/ComboboxInputGroupDataAttributes.d.ts +55 -0
- package/esm/combobox/input-group/ComboboxInputGroupDataAttributes.js +56 -0
- package/esm/combobox/item/ComboboxItem.d.ts +4 -4
- package/esm/combobox/item/ComboboxItem.js +17 -16
- package/esm/combobox/item/ComboboxItemContext.js +2 -0
- package/esm/combobox/item-indicator/ComboboxItemIndicator.d.ts +8 -2
- package/esm/combobox/item-indicator/ComboboxItemIndicator.js +2 -2
- package/esm/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.d.ts +10 -0
- package/esm/combobox/item-indicator/ComboboxItemIndicatorDataAttributes.js +12 -0
- package/esm/combobox/label/ComboboxLabel.d.ts +16 -0
- package/esm/combobox/label/ComboboxLabel.js +63 -0
- package/esm/combobox/list/ComboboxList.d.ts +1 -1
- package/esm/combobox/list/ComboboxList.js +2 -2
- package/esm/combobox/popup/ComboboxPopup.d.ts +21 -3
- package/esm/combobox/popup/ComboboxPopup.js +12 -5
- package/esm/combobox/popup/ComboboxPopupDataAttributes.js +2 -2
- package/esm/combobox/portal/ComboboxPortal.d.ts +4 -5
- package/esm/combobox/portal/ComboboxPortalContext.js +2 -0
- package/esm/combobox/positioner/ComboboxPositioner.d.ts +14 -2
- package/esm/combobox/positioner/ComboboxPositioner.js +8 -5
- package/esm/combobox/positioner/ComboboxPositionerDataAttributes.js +2 -2
- package/esm/combobox/root/AriaCombobox.d.ts +52 -46
- package/esm/combobox/root/AriaCombobox.js +59 -69
- package/esm/combobox/root/ComboboxRoot.d.ts +21 -16
- package/esm/combobox/root/ComboboxRoot.js +3 -1
- package/esm/combobox/root/ComboboxRootContext.d.ts +1 -0
- package/esm/combobox/root/ComboboxRootContext.js +2 -0
- package/esm/combobox/root/utils/useFilter.d.ts +2 -2
- package/esm/combobox/root/utils/useFilteredItems.d.ts +4 -0
- package/esm/combobox/root/utils/useFilteredItems.js +9 -0
- package/esm/combobox/row/ComboboxRow.d.ts +1 -1
- package/esm/combobox/row/ComboboxRowContext.js +2 -0
- package/esm/combobox/status/ComboboxStatus.d.ts +1 -1
- package/esm/combobox/store.d.ts +18 -12
- package/esm/combobox/store.js +5 -3
- package/esm/combobox/trigger/ComboboxTrigger.d.ts +4 -4
- package/esm/combobox/trigger/ComboboxTrigger.js +8 -6
- package/esm/combobox/utils/ComboboxInternalDismissButton.d.ts +5 -0
- package/esm/combobox/utils/ComboboxInternalDismissButton.js +38 -0
- package/esm/composite/item/CompositeItem.d.ts +9 -7
- package/esm/composite/list/CompositeList.d.ts +5 -3
- package/esm/composite/list/CompositeListContext.d.ts +1 -1
- package/esm/composite/list/useCompositeListItem.d.ts +5 -5
- package/esm/composite/root/CompositeRoot.d.ts +22 -20
- package/esm/composite/root/useCompositeRoot.d.ts +12 -12
- package/esm/context-menu/index.d.ts +1 -0
- package/esm/context-menu/index.parts.d.ts +1 -0
- package/esm/context-menu/index.parts.js +1 -0
- package/esm/context-menu/root/ContextMenuRoot.d.ts +1 -1
- package/esm/context-menu/root/ContextMenuRootContext.js +2 -0
- package/esm/context-menu/trigger/ContextMenuTrigger.d.ts +3 -3
- package/esm/context-menu/trigger/ContextMenuTrigger.js +13 -3
- package/esm/csp-provider/CSPContext.d.ts +2 -2
- package/esm/csp-provider/CSPProvider.d.ts +2 -2
- package/esm/dialog/backdrop/DialogBackdrop.d.ts +5 -2
- package/esm/dialog/backdrop/DialogBackdrop.js +2 -2
- package/esm/dialog/close/DialogClose.d.ts +1 -1
- package/esm/dialog/close/DialogClose.js +2 -2
- package/esm/dialog/description/DialogDescription.d.ts +1 -1
- package/esm/dialog/popup/DialogPopup.d.ts +6 -3
- package/esm/dialog/popup/DialogPopup.js +2 -2
- package/esm/dialog/portal/DialogPortal.d.ts +5 -6
- package/esm/dialog/portal/DialogPortalContext.js +2 -0
- package/esm/dialog/root/DialogRoot.d.ts +15 -10
- package/esm/dialog/root/DialogRoot.js +17 -4
- package/esm/dialog/root/useDialogRoot.d.ts +5 -9
- package/esm/dialog/root/useDialogRoot.js +6 -5
- package/esm/dialog/store/DialogStore.d.ts +258 -17
- package/esm/dialog/store/DialogStore.js +3 -0
- package/esm/dialog/title/DialogTitle.d.ts +1 -1
- package/esm/dialog/trigger/DialogTrigger.d.ts +4 -4
- package/esm/dialog/trigger/DialogTrigger.js +2 -2
- package/esm/dialog/viewport/DialogViewport.d.ts +3 -0
- package/esm/dialog/viewport/DialogViewport.js +5 -2
- package/esm/direction-provider/DirectionProvider.d.ts +3 -1
- package/esm/drawer/backdrop/DrawerBackdrop.d.ts +31 -0
- package/esm/drawer/backdrop/DrawerBackdrop.js +57 -0
- package/esm/drawer/backdrop/DrawerBackdropCssVars.d.ts +7 -0
- package/esm/drawer/backdrop/DrawerBackdropCssVars.js +8 -0
- package/esm/drawer/backdrop/DrawerBackdropDataAttributes.d.ts +18 -0
- package/esm/drawer/backdrop/DrawerBackdropDataAttributes.js +20 -0
- package/esm/drawer/close/DrawerClose.d.ts +23 -0
- package/esm/drawer/close/DrawerClose.js +10 -0
- package/esm/drawer/content/DrawerContent.d.ts +15 -0
- package/esm/drawer/content/DrawerContent.js +28 -0
- package/esm/drawer/content/DrawerContentDataAttributes.d.ts +1 -0
- package/esm/drawer/content/DrawerContentDataAttributes.js +1 -0
- package/esm/drawer/description/DrawerDescription.d.ts +18 -0
- package/esm/drawer/description/DrawerDescription.js +10 -0
- package/esm/drawer/indent/DrawerIndent.d.ts +21 -0
- package/esm/drawer/indent/DrawerIndent.js +82 -0
- package/esm/drawer/indent-background/DrawerIndentBackground.d.ts +20 -0
- package/esm/drawer/indent-background/DrawerIndentBackground.js +43 -0
- package/esm/drawer/index.d.ts +15 -0
- package/esm/drawer/index.js +1 -0
- package/esm/drawer/index.parts.d.ts +15 -0
- package/esm/drawer/index.parts.js +15 -0
- package/esm/drawer/popup/DrawerPopup.d.ts +72 -0
- package/esm/drawer/popup/DrawerPopup.js +342 -0
- package/esm/drawer/popup/DrawerPopupCssVars.d.ts +37 -0
- package/esm/drawer/popup/DrawerPopupCssVars.js +38 -0
- package/esm/drawer/popup/DrawerPopupDataAttributes.d.ts +43 -0
- package/esm/drawer/popup/DrawerPopupDataAttributes.js +45 -0
- package/esm/drawer/portal/DrawerPortal.d.ts +29 -0
- package/esm/drawer/portal/DrawerPortal.js +11 -0
- package/esm/drawer/provider/DrawerProvider.d.ts +16 -0
- package/esm/drawer/provider/DrawerProvider.js +95 -0
- package/esm/drawer/provider/DrawerProviderContext.d.ts +19 -0
- package/esm/drawer/provider/DrawerProviderContext.js +13 -0
- package/esm/drawer/root/DrawerRoot.d.ts +126 -0
- package/esm/drawer/root/DrawerRoot.js +233 -0
- package/esm/drawer/root/DrawerRootContext.d.ts +89 -0
- package/esm/drawer/root/DrawerRootContext.js +13 -0
- package/esm/drawer/root/useDrawerSnapPoints.d.ts +15 -0
- package/esm/drawer/root/useDrawerSnapPoints.js +149 -0
- package/esm/drawer/swipe-area/DrawerSwipeArea.d.ts +45 -0
- package/esm/drawer/swipe-area/DrawerSwipeArea.js +381 -0
- package/esm/drawer/swipe-area/DrawerSwipeAreaDataAttributes.d.ts +23 -0
- package/esm/drawer/swipe-area/DrawerSwipeAreaDataAttributes.js +25 -0
- package/esm/drawer/title/DrawerTitle.d.ts +18 -0
- package/esm/drawer/title/DrawerTitle.js +10 -0
- package/esm/drawer/trigger/DrawerTrigger.d.ts +43 -0
- package/esm/drawer/trigger/DrawerTrigger.js +10 -0
- package/esm/drawer/viewport/DrawerViewport.d.ts +33 -0
- package/esm/drawer/viewport/DrawerViewport.js +989 -0
- package/esm/drawer/viewport/DrawerViewportContext.d.ts +11 -0
- package/esm/drawer/viewport/DrawerViewportContext.js +13 -0
- package/esm/drawer/viewport/DrawerViewportDataAttributes.d.ts +22 -0
- package/esm/drawer/viewport/DrawerViewportDataAttributes.js +24 -0
- package/esm/field/control/FieldControl.d.ts +6 -6
- package/esm/field/control/FieldControl.js +22 -20
- package/esm/field/description/FieldDescription.d.ts +3 -3
- package/esm/field/error/FieldError.d.ts +10 -4
- package/esm/field/error/FieldError.js +50 -7
- package/esm/field/error/FieldErrorDataAttributes.d.ts +8 -0
- package/esm/field/error/FieldErrorDataAttributes.js +10 -1
- package/esm/field/item/FieldItem.d.ts +5 -4
- package/esm/field/item/FieldItem.js +2 -2
- package/esm/field/item/FieldItemContext.js +2 -0
- package/esm/field/label/FieldLabel.d.ts +4 -4
- package/esm/field/label/FieldLabel.js +13 -53
- package/esm/field/root/FieldRoot.d.ts +28 -11
- package/esm/field/root/FieldRoot.js +2 -1
- package/esm/field/root/FieldRootContext.d.ts +3 -3
- package/esm/field/root/FieldRootContext.js +6 -13
- package/esm/field/root/useFieldValidation.js +5 -4
- package/esm/field/useField.d.ts +1 -1
- package/esm/field/useField.js +2 -0
- package/esm/field/utils/constants.d.ts +3 -0
- package/esm/field/utils/constants.js +11 -0
- package/esm/field/validity/FieldValidity.d.ts +9 -1
- package/esm/field/validity/FieldValidity.js +11 -4
- package/esm/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/esm/fieldset/legend/FieldsetLegend.js +2 -2
- package/esm/fieldset/root/FieldsetRoot.d.ts +2 -2
- package/esm/fieldset/root/FieldsetRoot.js +3 -3
- package/esm/floating-ui-react/components/FloatingDelayGroup.d.ts +2 -7
- package/esm/floating-ui-react/components/FloatingDelayGroup.js +3 -10
- package/esm/floating-ui-react/components/FloatingFocusManager.d.ts +17 -22
- package/esm/floating-ui-react/components/FloatingFocusManager.js +88 -97
- package/esm/floating-ui-react/components/FloatingPortal.d.ts +12 -11
- package/esm/floating-ui-react/components/FloatingPortal.js +1 -3
- package/esm/floating-ui-react/components/FloatingTree.d.ts +1 -1
- package/esm/floating-ui-react/hooks/useClick.d.ts +12 -6
- package/esm/floating-ui-react/hooks/useClick.js +6 -5
- package/esm/floating-ui-react/hooks/useClientPoint.d.ts +2 -12
- package/esm/floating-ui-react/hooks/useClientPoint.js +5 -16
- package/esm/floating-ui-react/hooks/useDismiss.d.ts +14 -18
- package/esm/floating-ui-react/hooks/useDismiss.js +325 -263
- package/esm/floating-ui-react/hooks/useFloating.js +2 -0
- package/esm/floating-ui-react/hooks/useFloatingRootContext.d.ts +4 -10
- package/esm/floating-ui-react/hooks/useFloatingRootContext.js +5 -3
- package/esm/floating-ui-react/hooks/useFocus.d.ts +2 -8
- package/esm/floating-ui-react/hooks/useFocus.js +11 -12
- package/esm/floating-ui-react/hooks/useHover.d.ts +7 -38
- package/esm/floating-ui-react/hooks/useHover.js +21 -63
- package/esm/floating-ui-react/hooks/useHoverFloatingInteraction.d.ts +3 -9
- package/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js +70 -91
- package/esm/floating-ui-react/hooks/useHoverInteractionSharedState.d.ts +27 -15
- package/esm/floating-ui-react/hooks/useHoverInteractionSharedState.js +65 -32
- package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +14 -5
- package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js +96 -121
- package/esm/floating-ui-react/hooks/useHoverShared.d.ts +28 -0
- package/esm/floating-ui-react/hooks/useHoverShared.js +26 -0
- package/esm/floating-ui-react/hooks/useInteractions.d.ts +2 -2
- package/esm/floating-ui-react/hooks/useListNavigation.d.ts +19 -35
- package/esm/floating-ui-react/hooks/useListNavigation.js +20 -15
- package/esm/floating-ui-react/hooks/useRole.d.ts +1 -7
- package/esm/floating-ui-react/hooks/useRole.js +2 -3
- package/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.d.ts +2 -2
- package/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js +2 -0
- package/esm/floating-ui-react/hooks/useTypeahead.d.ts +12 -16
- package/esm/floating-ui-react/hooks/useTypeahead.js +74 -26
- package/esm/floating-ui-react/middleware/arrow.d.ts +1 -1
- package/esm/floating-ui-react/safePolygon.d.ts +2 -6
- package/esm/floating-ui-react/safePolygon.js +149 -119
- package/esm/floating-ui-react/types.d.ts +16 -15
- package/esm/floating-ui-react/utils/composite.d.ts +6 -5
- package/esm/floating-ui-react/utils/composite.js +129 -131
- package/esm/floating-ui-react/utils/element.d.ts +2 -1
- package/esm/floating-ui-react/utils/element.js +16 -4
- package/esm/floating-ui-react/utils/enqueueFocus.d.ts +3 -3
- package/esm/floating-ui-react/utils/event.js +2 -4
- package/esm/floating-ui-react/utils/markOthers.d.ts +7 -1
- package/esm/floating-ui-react/utils/markOthers.js +121 -83
- package/esm/floating-ui-react/utils/tabbable.js +6 -5
- package/esm/form/Form.d.ts +6 -6
- package/esm/global.d.ts +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/input/Input.d.ts +13 -6
- package/esm/labelable-provider/LabelableContext.d.ts +1 -1
- package/esm/labelable-provider/LabelableContext.js +1 -1
- package/esm/labelable-provider/LabelableProvider.d.ts +4 -1
- package/esm/labelable-provider/LabelableProvider.js +35 -4
- package/esm/labelable-provider/useAriaLabelledBy.d.ts +9 -0
- package/esm/labelable-provider/useAriaLabelledBy.js +56 -0
- package/esm/labelable-provider/useLabel.d.ts +25 -0
- package/esm/labelable-provider/useLabel.js +74 -0
- package/esm/labelable-provider/useLabelableId.d.ts +5 -7
- package/esm/labelable-provider/useLabelableId.js +38 -12
- package/esm/menu/arrow/MenuArrow.d.ts +10 -1
- package/esm/menu/arrow/MenuArrow.js +2 -2
- package/esm/menu/arrow/MenuArrowDataAttributes.js +2 -2
- package/esm/menu/backdrop/MenuBackdrop.d.ts +4 -1
- package/esm/menu/backdrop/MenuBackdrop.js +2 -2
- package/esm/menu/checkbox-item/MenuCheckboxItem.d.ts +11 -11
- package/esm/menu/checkbox-item/MenuCheckboxItemContext.js +2 -0
- package/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.d.ts +9 -3
- package/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +3 -3
- package/esm/menu/group/MenuGroup.d.ts +1 -1
- package/esm/menu/group/MenuGroupContext.js +2 -0
- package/esm/menu/group-label/MenuGroupLabel.d.ts +1 -1
- package/esm/menu/index.d.ts +4 -2
- package/esm/menu/index.parts.d.ts +2 -0
- package/esm/menu/index.parts.js +2 -0
- package/esm/menu/item/MenuItem.d.ts +6 -6
- package/esm/menu/item/MenuItem.js +2 -2
- package/esm/menu/item/useMenuItem.d.ts +8 -7
- package/esm/menu/item/useMenuItem.js +16 -54
- package/esm/menu/item/useMenuItemCommonProps.d.ts +46 -0
- package/esm/menu/item/useMenuItemCommonProps.js +80 -0
- package/esm/menu/link-item/MenuLinkItem.d.ts +34 -0
- package/esm/menu/link-item/MenuLinkItem.js +69 -0
- package/esm/menu/link-item/MenuLinkItemDataAttributes.d.ts +6 -0
- package/esm/menu/link-item/MenuLinkItemDataAttributes.js +7 -0
- package/esm/menu/popup/MenuPopup.d.ts +21 -5
- package/esm/menu/popup/MenuPopup.js +6 -3
- package/esm/menu/popup/MenuPopupDataAttributes.d.ts +1 -1
- package/esm/menu/popup/MenuPopupDataAttributes.js +3 -3
- package/esm/menu/portal/MenuPortal.d.ts +4 -5
- package/esm/menu/portal/MenuPortalContext.js +2 -0
- package/esm/menu/positioner/MenuPositioner.d.ts +18 -2
- package/esm/menu/positioner/MenuPositioner.js +64 -17
- package/esm/menu/positioner/MenuPositionerDataAttributes.js +2 -2
- package/esm/menu/radio-group/MenuRadioGroup.d.ts +8 -5
- package/esm/menu/radio-group/MenuRadioGroup.js +2 -2
- package/esm/menu/radio-group/MenuRadioGroupContext.js +2 -0
- package/esm/menu/radio-item/MenuRadioItem.d.ts +8 -8
- package/esm/menu/radio-item/MenuRadioItemContext.js +2 -0
- package/esm/menu/radio-item-indicator/MenuRadioItemIndicator.d.ts +9 -3
- package/esm/menu/radio-item-indicator/MenuRadioItemIndicator.js +3 -3
- package/esm/menu/root/MenuRoot.d.ts +17 -15
- package/esm/menu/root/MenuRoot.js +40 -39
- package/esm/menu/store/MenuStore.d.ts +259 -17
- package/esm/menu/store/MenuStore.js +17 -12
- package/esm/menu/submenu-root/MenuSubmenuRoot.d.ts +2 -2
- package/esm/menu/submenu-root/MenuSubmenuRootContext.js +2 -0
- package/esm/menu/submenu-trigger/MenuSubmenuTrigger.d.ts +22 -22
- package/esm/menu/submenu-trigger/MenuSubmenuTrigger.js +10 -7
- package/esm/menu/trigger/MenuTrigger.d.ts +13 -9
- package/esm/menu/trigger/MenuTrigger.js +4 -3
- package/esm/menu/viewport/MenuViewport.d.ts +30 -0
- package/esm/menu/viewport/MenuViewport.js +60 -0
- package/esm/menu/viewport/MenuViewportCssVars.d.ts +14 -0
- package/esm/menu/viewport/MenuViewportCssVars.js +15 -0
- package/esm/menu/viewport/MenuViewportDataAttributes.d.ts +26 -0
- package/esm/menu/viewport/MenuViewportDataAttributes.js +27 -0
- package/esm/menubar/Menubar.d.ts +5 -5
- package/esm/menubar/Menubar.js +3 -9
- package/esm/meter/indicator/MeterIndicator.d.ts +4 -2
- package/esm/meter/label/MeterLabel.d.ts +4 -2
- package/esm/meter/label/MeterLabel.js +4 -8
- package/esm/meter/root/MeterRoot.d.ts +7 -7
- package/esm/meter/root/MeterRoot.js +13 -12
- package/esm/meter/track/MeterTrack.d.ts +4 -2
- package/esm/meter/value/MeterValue.d.ts +5 -3
- package/esm/navigation-menu/arrow/NavigationMenuArrow.d.ts +10 -1
- package/esm/navigation-menu/arrow/NavigationMenuArrow.js +2 -2
- package/esm/navigation-menu/arrow/NavigationMenuArrowDataAttributes.js +2 -2
- package/esm/navigation-menu/backdrop/NavigationMenuBackdrop.d.ts +1 -1
- package/esm/navigation-menu/backdrop/NavigationMenuBackdrop.js +2 -2
- package/esm/navigation-menu/content/NavigationMenuContent.d.ts +8 -1
- package/esm/navigation-menu/content/NavigationMenuContent.js +37 -5
- package/esm/navigation-menu/icon/NavigationMenuIcon.d.ts +2 -2
- package/esm/navigation-menu/icon/NavigationMenuIcon.js +2 -2
- package/esm/navigation-menu/item/NavigationMenuItem.d.ts +2 -2
- package/esm/navigation-menu/item/NavigationMenuItemContext.js +2 -0
- package/esm/navigation-menu/link/NavigationMenuLink.d.ts +3 -3
- package/esm/navigation-menu/link/NavigationMenuLink.js +2 -2
- package/esm/navigation-menu/list/NavigationMenuDismissContext.js +2 -0
- package/esm/navigation-menu/list/NavigationMenuList.d.ts +2 -2
- package/esm/navigation-menu/list/NavigationMenuList.js +13 -4
- package/esm/navigation-menu/popup/NavigationMenuPopup.d.ts +14 -1
- package/esm/navigation-menu/popup/NavigationMenuPopup.js +2 -2
- package/esm/navigation-menu/popup/NavigationMenuPopupDataAttributes.js +2 -2
- package/esm/navigation-menu/portal/NavigationMenuPortal.d.ts +5 -6
- package/esm/navigation-menu/portal/NavigationMenuPortalContext.js +2 -0
- package/esm/navigation-menu/positioner/NavigationMenuPositioner.d.ts +11 -2
- package/esm/navigation-menu/positioner/NavigationMenuPositioner.js +2 -2
- package/esm/navigation-menu/positioner/NavigationPositionerDataAttributes.js +2 -2
- package/esm/navigation-menu/root/NavigationMenuRoot.d.ts +9 -9
- package/esm/navigation-menu/root/NavigationMenuRoot.js +29 -10
- package/esm/navigation-menu/root/NavigationMenuRootContext.js +2 -0
- package/esm/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -1
- package/esm/navigation-menu/trigger/NavigationMenuTrigger.js +272 -44
- package/esm/navigation-menu/utils/isOutsideMenuEvent.d.ts +1 -1
- package/esm/navigation-menu/viewport/NavigationMenuViewport.d.ts +1 -1
- package/esm/navigation-menu/viewport/NavigationMenuViewport.js +2 -1
- package/esm/number-field/decrement/NumberFieldDecrement.d.ts +3 -3
- package/esm/number-field/group/NumberFieldGroup.d.ts +3 -3
- package/esm/number-field/increment/NumberFieldIncrement.d.ts +3 -3
- package/esm/number-field/input/NumberFieldInput.d.ts +3 -3
- package/esm/number-field/input/NumberFieldInput.js +3 -11
- package/esm/number-field/root/NumberFieldRoot.d.ts +29 -22
- package/esm/number-field/root/NumberFieldRoot.js +23 -8
- package/esm/number-field/root/NumberFieldRootContext.d.ts +4 -4
- package/esm/number-field/root/useNumberFieldButton.d.ts +5 -8
- package/esm/number-field/root/useNumberFieldButton.js +12 -7
- package/esm/number-field/scrub-area/NumberFieldScrubArea.d.ts +5 -5
- package/esm/number-field/scrub-area/NumberFieldScrubArea.js +16 -0
- package/esm/number-field/scrub-area/NumberFieldScrubAreaContext.js +2 -0
- package/esm/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.d.ts +3 -3
- package/esm/number-field/utils/stateAttributesMapping.d.ts +2 -2
- package/esm/number-field/utils/stateAttributesMapping.js +3 -1
- package/esm/number-field/utils/subscribeToVisualViewportResize.d.ts +1 -1
- package/esm/number-field/utils/types.d.ts +5 -5
- package/esm/number-field/utils/validate.d.ts +3 -1
- package/esm/number-field/utils/validate.js +3 -2
- package/esm/popover/arrow/PopoverArrow.d.ts +10 -1
- package/esm/popover/arrow/PopoverArrow.js +2 -2
- package/esm/popover/arrow/PopoverArrowDataAttributes.js +2 -2
- package/esm/popover/backdrop/PopoverBackdrop.d.ts +4 -1
- package/esm/popover/backdrop/PopoverBackdrop.js +2 -2
- package/esm/popover/close/PopoverClose.d.ts +1 -1
- package/esm/popover/close/PopoverClose.js +5 -3
- package/esm/popover/description/PopoverDescription.d.ts +1 -1
- package/esm/popover/popup/PopoverPopup.d.ts +16 -3
- package/esm/popover/popup/PopoverPopup.js +13 -4
- package/esm/popover/portal/PopoverPortal.d.ts +4 -5
- package/esm/popover/portal/PopoverPortal.js +1 -2
- package/esm/popover/portal/PopoverPortalContext.js +2 -0
- package/esm/popover/positioner/PopoverPositioner.d.ts +11 -2
- package/esm/popover/positioner/PopoverPositioner.js +3 -3
- package/esm/popover/positioner/PopoverPositionerDataAttributes.js +2 -2
- package/esm/popover/root/PopoverRoot.d.ts +16 -9
- package/esm/popover/root/PopoverRoot.js +19 -8
- package/esm/popover/store/PopoverStore.d.ts +255 -15
- package/esm/popover/title/PopoverTitle.d.ts +1 -1
- package/esm/popover/trigger/PopoverTrigger.d.ts +7 -7
- package/esm/popover/trigger/PopoverTrigger.js +2 -2
- package/esm/popover/viewport/PopoverViewport.d.ts +16 -4
- package/esm/popover/viewport/PopoverViewport.js +19 -196
- package/esm/popover/viewport/PopoverViewportDataAttributes.d.ts +5 -0
- package/esm/popover/viewport/PopoverViewportDataAttributes.js +5 -0
- package/esm/preview-card/arrow/PreviewCardArrow.d.ts +10 -1
- package/esm/preview-card/arrow/PreviewCardArrow.js +2 -2
- package/esm/preview-card/arrow/PreviewCardArrowDataAttributes.js +2 -2
- package/esm/preview-card/backdrop/PreviewCardBackdrop.d.ts +4 -1
- package/esm/preview-card/backdrop/PreviewCardBackdrop.js +2 -2
- package/esm/preview-card/popup/PreviewCardPopup.d.ts +13 -1
- package/esm/preview-card/popup/PreviewCardPopup.js +2 -2
- package/esm/preview-card/popup/PreviewCardPopupDataAttributes.js +2 -2
- package/esm/preview-card/portal/PreviewCardPortal.d.ts +4 -5
- package/esm/preview-card/portal/PreviewCardPortalContext.js +2 -0
- package/esm/preview-card/positioner/PreviewCardPositioner.d.ts +14 -2
- package/esm/preview-card/positioner/PreviewCardPositioner.js +9 -3
- package/esm/preview-card/positioner/PreviewCardPositionerContext.d.ts +1 -1
- package/esm/preview-card/positioner/PreviewCardPositionerDataAttributes.js +2 -2
- package/esm/preview-card/root/PreviewCardRoot.d.ts +9 -9
- package/esm/preview-card/root/PreviewCardRoot.js +39 -13
- package/esm/preview-card/store/PreviewCardStore.d.ts +255 -15
- package/esm/preview-card/trigger/PreviewCardTrigger.d.ts +5 -5
- package/esm/preview-card/trigger/PreviewCardTrigger.js +2 -2
- package/esm/preview-card/viewport/PreviewCardViewport.d.ts +16 -4
- package/esm/preview-card/viewport/PreviewCardViewport.js +14 -230
- package/esm/progress/indicator/ProgressIndicator.d.ts +4 -2
- package/esm/progress/label/ProgressLabel.d.ts +4 -2
- package/esm/progress/label/ProgressLabel.js +4 -8
- package/esm/progress/root/ProgressRoot.d.ts +10 -7
- package/esm/progress/root/ProgressRoot.js +13 -15
- package/esm/progress/root/ProgressRootContext.d.ts +2 -2
- package/esm/progress/root/stateAttributesMapping.d.ts +2 -2
- package/esm/progress/track/ProgressTrack.d.ts +4 -2
- package/esm/progress/value/ProgressValue.d.ts +5 -3
- package/esm/radio/indicator/RadioIndicator.d.ts +5 -2
- package/esm/radio/indicator/RadioIndicator.js +4 -4
- package/esm/radio/indicator/RadioIndicatorDataAttributes.d.ts +8 -0
- package/esm/radio/indicator/RadioIndicatorDataAttributes.js +10 -1
- package/esm/radio/root/RadioRoot.d.ts +39 -19
- package/esm/radio/root/RadioRoot.js +49 -12
- package/esm/radio-group/RadioGroup.d.ts +20 -14
- package/esm/radio-group/RadioGroup.js +69 -62
- package/esm/radio-group/RadioGroupContext.d.ts +9 -8
- package/esm/radio-group/RadioGroupContext.js +1 -13
- package/esm/scroll-area/content/ScrollAreaContent.d.ts +3 -3
- package/esm/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/esm/scroll-area/root/ScrollAreaRoot.d.ts +27 -9
- package/esm/scroll-area/root/ScrollAreaRoot.js +9 -5
- package/esm/scroll-area/root/ScrollAreaRootContext.d.ts +4 -2
- package/esm/scroll-area/root/ScrollAreaRootContext.js +2 -0
- package/esm/scroll-area/root/ScrollAreaRootDataAttributes.d.ts +4 -0
- package/esm/scroll-area/root/ScrollAreaRootDataAttributes.js +4 -0
- package/esm/scroll-area/root/stateAttributes.d.ts +2 -2
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +14 -8
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.js +6 -3
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbarContext.js +2 -0
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.d.ts +1 -1
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.js +1 -1
- package/esm/scroll-area/thumb/ScrollAreaThumb.d.ts +5 -2
- package/esm/scroll-area/thumb/ScrollAreaThumb.js +5 -3
- package/esm/scroll-area/utils/scrollEdges.d.ts +2 -0
- package/esm/scroll-area/utils/scrollEdges.js +22 -0
- package/esm/scroll-area/viewport/ScrollAreaViewport.d.ts +3 -3
- package/esm/scroll-area/viewport/ScrollAreaViewport.js +64 -42
- package/esm/scroll-area/viewport/ScrollAreaViewportContext.js +2 -0
- package/esm/scroll-area/viewport/ScrollAreaViewportDataAttributes.d.ts +4 -0
- package/esm/scroll-area/viewport/ScrollAreaViewportDataAttributes.js +4 -0
- package/esm/select/arrow/SelectArrow.d.ts +10 -1
- package/esm/select/arrow/SelectArrow.js +2 -2
- package/esm/select/arrow/SelectArrowDataAttributes.js +2 -2
- package/esm/select/backdrop/SelectBackdrop.d.ts +7 -1
- package/esm/select/backdrop/SelectBackdrop.js +2 -2
- package/esm/select/group/SelectGroup.d.ts +1 -1
- package/esm/select/group/SelectGroupContext.js +2 -0
- package/esm/select/group-label/SelectGroupLabel.d.ts +1 -1
- package/esm/select/icon/SelectIcon.d.ts +1 -1
- package/esm/select/icon/SelectIcon.js +2 -2
- package/esm/select/index.d.ts +1 -0
- package/esm/select/index.parts.d.ts +1 -0
- package/esm/select/index.parts.js +1 -0
- package/esm/select/item/SelectItem.d.ts +3 -3
- package/esm/select/item/SelectItem.js +23 -17
- package/esm/select/item/SelectItemContext.js +2 -0
- package/esm/select/item-indicator/SelectItemIndicator.d.ts +11 -3
- package/esm/select/item-indicator/SelectItemIndicator.js +2 -2
- package/esm/select/item-indicator/SelectItemIndicatorDataAttributes.d.ts +10 -0
- package/esm/select/item-indicator/SelectItemIndicatorDataAttributes.js +12 -0
- package/esm/select/item-text/SelectItemText.d.ts +1 -1
- package/esm/select/label/SelectLabel.d.ts +16 -0
- package/esm/select/label/SelectLabel.js +49 -0
- package/esm/select/list/SelectList.d.ts +1 -1
- package/esm/select/popup/SelectPopup.d.ts +24 -1
- package/esm/select/popup/SelectPopup.js +87 -44
- package/esm/select/popup/SelectPopupDataAttributes.js +2 -2
- package/esm/select/portal/SelectPortal.d.ts +3 -4
- package/esm/select/portal/SelectPortalContext.js +2 -0
- package/esm/select/positioner/SelectPositioner.d.ts +15 -3
- package/esm/select/positioner/SelectPositioner.js +14 -11
- package/esm/select/positioner/SelectPositionerContext.d.ts +2 -2
- package/esm/select/positioner/SelectPositionerContext.js +2 -0
- package/esm/select/positioner/SelectPositionerDataAttributes.js +2 -2
- package/esm/select/root/SelectRoot.d.ts +27 -21
- package/esm/select/root/SelectRoot.js +7 -6
- package/esm/select/root/SelectRootContext.d.ts +14 -14
- package/esm/select/root/SelectRootContext.js +2 -0
- package/esm/select/scroll-arrow/SelectScrollArrow.d.ts +14 -2
- package/esm/select/scroll-arrow/SelectScrollArrow.js +2 -2
- package/esm/select/scroll-down-arrow/SelectScrollDownArrow.d.ts +2 -2
- package/esm/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.js +1 -1
- package/esm/select/scroll-up-arrow/SelectScrollUpArrow.d.ts +2 -2
- package/esm/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.js +1 -1
- package/esm/select/store.d.ts +8 -5
- package/esm/select/store.js +4 -3
- package/esm/select/trigger/SelectTrigger.d.ts +7 -5
- package/esm/select/trigger/SelectTrigger.js +7 -4
- package/esm/select/value/SelectValue.d.ts +5 -1
- package/esm/select/value/SelectValue.js +2 -2
- package/esm/separator/Separator.d.ts +2 -2
- package/esm/separator/Separator.js +2 -2
- package/esm/slider/control/SliderControl.d.ts +4 -3
- package/esm/slider/control/SliderControl.js +0 -2
- package/esm/slider/index.d.ts +1 -0
- package/esm/slider/index.parts.d.ts +1 -0
- package/esm/slider/index.parts.js +1 -0
- package/esm/slider/indicator/SliderIndicator.d.ts +4 -2
- package/esm/slider/label/SliderLabel.d.ts +16 -0
- package/esm/slider/label/SliderLabel.js +58 -0
- package/esm/slider/root/SliderRoot.d.ts +26 -20
- package/esm/slider/root/SliderRoot.js +11 -5
- package/esm/slider/root/SliderRootContext.d.ts +6 -4
- package/esm/slider/root/stateAttributesMapping.d.ts +2 -2
- package/esm/slider/root/stateAttributesMapping.js +3 -1
- package/esm/slider/thumb/SliderThumb.d.ts +10 -10
- package/esm/slider/thumb/SliderThumb.js +3 -2
- package/esm/slider/track/SliderTrack.d.ts +4 -2
- package/esm/slider/utils/getPushedThumbValues.d.ts +1 -1
- package/esm/slider/utils/resolveThumbCollision.d.ts +2 -2
- package/esm/slider/value/SliderValue.d.ts +5 -3
- package/esm/switch/root/SwitchRoot.d.ts +14 -14
- package/esm/switch/root/SwitchRoot.js +11 -2
- package/esm/switch/root/SwitchRootContext.d.ts +4 -4
- package/esm/switch/root/SwitchRootContext.js +2 -0
- package/esm/switch/stateAttributesMapping.d.ts +2 -2
- package/esm/switch/thumb/SwitchThumb.d.ts +3 -3
- package/esm/tabs/indicator/TabsIndicator.d.ts +13 -4
- package/esm/tabs/indicator/TabsIndicator.js +7 -16
- package/esm/tabs/indicator/TabsIndicatorCssVars.d.ts +1 -1
- package/esm/tabs/indicator/TabsIndicatorCssVars.js +1 -1
- package/esm/tabs/list/TabsList.d.ts +5 -5
- package/esm/tabs/list/TabsList.js +50 -5
- package/esm/tabs/list/TabsListContext.d.ts +2 -0
- package/esm/tabs/panel/TabsPanel.d.ts +13 -5
- package/esm/tabs/panel/TabsPanel.js +35 -9
- package/esm/tabs/panel/TabsPanelDataAttributes.d.ts +8 -0
- package/esm/tabs/panel/TabsPanelDataAttributes.js +10 -1
- package/esm/tabs/root/TabsRoot.d.ts +11 -5
- package/esm/tabs/root/TabsRootContext.d.ts +1 -1
- package/esm/tabs/root/stateAttributesMapping.d.ts +2 -2
- package/esm/tabs/tab/TabsTab.d.ts +8 -2
- package/esm/tabs/tab/TabsTab.js +12 -3
- package/esm/toast/action/ToastAction.d.ts +1 -1
- package/esm/toast/action/ToastAction.js +2 -2
- package/esm/toast/arrow/ToastArrow.d.ts +10 -1
- package/esm/toast/arrow/ToastArrow.js +2 -2
- package/esm/toast/arrow/ToastArrowDataAttributes.js +4 -3
- package/esm/toast/close/ToastClose.d.ts +1 -1
- package/esm/toast/close/ToastClose.js +6 -8
- package/esm/toast/content/ToastContent.d.ts +1 -1
- package/esm/toast/content/ToastContent.js +2 -2
- package/esm/toast/createToastManager.d.ts +6 -6
- package/esm/toast/createToastManager.js +3 -6
- package/esm/toast/description/ToastDescription.d.ts +1 -1
- package/esm/toast/description/ToastDescription.js +4 -6
- package/esm/toast/portal/ToastPortal.d.ts +3 -4
- package/esm/toast/positioner/ToastPositioner.d.ts +13 -4
- package/esm/toast/positioner/ToastPositioner.js +6 -7
- package/esm/toast/positioner/ToastPositionerDataAttributes.js +2 -2
- package/esm/toast/provider/ToastProvider.d.ts +5 -3
- package/esm/toast/provider/ToastProvider.js +27 -286
- package/esm/toast/provider/ToastProviderContext.d.ts +4 -25
- package/esm/toast/provider/ToastProviderContext.js +3 -1
- package/esm/toast/root/ToastRoot.d.ts +20 -7
- package/esm/toast/root/ToastRoot.js +22 -28
- package/esm/toast/root/ToastRootContext.js +2 -0
- package/esm/toast/store.d.ts +51 -0
- package/esm/toast/store.js +384 -0
- package/esm/toast/title/ToastTitle.d.ts +1 -1
- package/esm/toast/title/ToastTitle.js +4 -6
- package/esm/toast/useToastManager.d.ts +21 -22
- package/esm/toast/useToastManager.js +8 -14
- package/esm/toast/viewport/ToastViewport.d.ts +1 -1
- package/esm/toast/viewport/ToastViewport.js +66 -92
- package/esm/toggle/Toggle.d.ts +10 -8
- package/esm/toggle/Toggle.js +13 -3
- package/esm/toggle-group/ToggleGroup.d.ts +22 -10
- package/esm/toggle-group/ToggleGroup.js +8 -5
- package/esm/toggle-group/ToggleGroupContext.d.ts +10 -5
- package/esm/toolbar/button/ToolbarButton.d.ts +11 -5
- package/esm/toolbar/button/ToolbarButton.js +2 -2
- package/esm/toolbar/group/ToolbarGroup.d.ts +5 -3
- package/esm/toolbar/group/ToolbarGroup.js +2 -2
- package/esm/toolbar/group/ToolbarGroupContext.js +2 -0
- package/esm/toolbar/input/ToolbarInput.d.ts +12 -6
- package/esm/toolbar/input/ToolbarInput.js +2 -2
- package/esm/toolbar/link/ToolbarLink.d.ts +4 -1
- package/esm/toolbar/link/ToolbarLink.js +2 -2
- package/esm/toolbar/root/ToolbarRoot.d.ts +10 -4
- package/esm/toolbar/root/ToolbarRoot.js +2 -2
- package/esm/toolbar/separator/ToolbarSeparator.d.ts +4 -2
- package/esm/tooltip/arrow/TooltipArrow.d.ts +14 -1
- package/esm/tooltip/arrow/TooltipArrow.js +2 -2
- package/esm/tooltip/arrow/TooltipArrowDataAttributes.js +2 -2
- package/esm/tooltip/popup/TooltipPopup.d.ts +13 -1
- package/esm/tooltip/popup/TooltipPopup.js +2 -2
- package/esm/tooltip/popup/TooltipPopupDataAttributes.js +2 -2
- package/esm/tooltip/portal/TooltipPortal.d.ts +4 -5
- package/esm/tooltip/portal/TooltipPortalContext.js +2 -0
- package/esm/tooltip/positioner/TooltipPositioner.d.ts +12 -3
- package/esm/tooltip/positioner/TooltipPositionerContext.d.ts +1 -1
- package/esm/tooltip/positioner/TooltipPositionerDataAttributes.js +2 -2
- package/esm/tooltip/provider/TooltipProvider.d.ts +5 -3
- package/esm/tooltip/provider/TooltipProviderContext.js +2 -0
- package/esm/tooltip/root/TooltipRoot.d.ts +12 -12
- package/esm/tooltip/root/TooltipRoot.js +24 -12
- package/esm/tooltip/store/TooltipStore.d.ts +258 -16
- package/esm/tooltip/store/TooltipStore.js +2 -0
- package/esm/tooltip/trigger/TooltipTrigger.d.ts +17 -5
- package/esm/tooltip/trigger/TooltipTrigger.js +17 -6
- package/esm/tooltip/trigger/TooltipTriggerDataAttributes.d.ts +4 -0
- package/esm/tooltip/trigger/TooltipTriggerDataAttributes.js +4 -0
- package/esm/tooltip/viewport/TooltipViewport.d.ts +16 -4
- package/esm/tooltip/viewport/TooltipViewport.js +14 -195
- package/esm/types/index.d.ts +16 -1
- package/esm/unstable-use-media-query/index.d.ts +7 -5
- package/esm/use-button/useButton.d.ts +12 -9
- package/esm/use-button/useButton.js +56 -22
- package/esm/use-render/useRender.d.ts +14 -12
- package/esm/utils/FloatingPortalLite.d.ts +4 -2
- package/esm/utils/InternalBackdrop.d.ts +3 -1
- package/esm/utils/closePart.d.ts +16 -0
- package/esm/utils/closePart.js +40 -0
- package/esm/utils/constants.d.ts +4 -0
- package/esm/utils/constants.js +4 -0
- package/esm/utils/createBaseUIEventDetails.d.ts +4 -1
- package/esm/utils/formatNumber.d.ts +2 -1
- package/esm/utils/formatNumber.js +11 -0
- package/esm/utils/getDisabledMountTransitionStyles.d.ts +1 -1
- package/esm/utils/getElementAtPoint.d.ts +1 -0
- package/esm/utils/getElementAtPoint.js +3 -0
- package/esm/utils/getPseudoElementBounds.js +1 -1
- package/esm/utils/itemEquality.d.ts +5 -5
- package/esm/utils/itemEquality.js +17 -17
- package/esm/utils/popupStateMapping.d.ts +10 -0
- package/esm/utils/popupStateMapping.js +10 -0
- package/esm/utils/popups/popupStoreUtils.js +2 -0
- package/esm/utils/popups/popupTriggerMap.d.ts +14 -1
- package/esm/utils/popups/popupTriggerMap.js +27 -9
- package/esm/utils/popups/store.d.ts +28 -18
- package/esm/utils/popups/store.js +8 -5
- package/esm/utils/reason-parts.d.ts +3 -0
- package/esm/utils/reason-parts.js +3 -0
- package/esm/utils/resolveAriaLabelledBy.d.ts +2 -0
- package/esm/utils/resolveAriaLabelledBy.js +8 -0
- package/esm/utils/resolveValueLabel.d.ts +4 -4
- package/esm/utils/resolveValueLabel.js +7 -5
- package/esm/utils/scrollable.d.ts +4 -0
- package/esm/utils/scrollable.js +32 -0
- package/esm/utils/types.d.ts +9 -22
- package/esm/utils/useAnchorPositioning.d.ts +68 -33
- package/esm/utils/useAnchorPositioning.js +32 -20
- package/esm/utils/useFocusableWhenDisabled.d.ts +6 -9
- package/esm/utils/useMixedToggleClickHandler.d.ts +3 -5
- package/esm/utils/useMixedToggleClickHandler.js +2 -0
- package/esm/utils/useOpenChangeComplete.d.ts +4 -6
- package/esm/utils/useOpenInteractionType.d.ts +0 -1
- package/esm/utils/useOpenInteractionType.js +7 -5
- package/esm/utils/usePopupAutoResize.d.ts +3 -3
- package/esm/utils/usePopupAutoResize.js +4 -3
- package/esm/utils/usePopupViewport.d.ts +58 -0
- package/esm/utils/usePopupViewport.js +250 -0
- package/esm/utils/useRegisteredLabelId.d.ts +1 -0
- package/esm/utils/useRegisteredLabelId.js +14 -0
- package/esm/utils/useRenderElement.d.ts +11 -14
- package/esm/utils/useRenderElement.js +43 -1
- package/esm/utils/useSwipeDismiss.d.ts +107 -0
- package/esm/utils/useSwipeDismiss.js +945 -0
- package/esm/utils/useValueChanged.js +2 -0
- package/field/control/FieldControl.d.ts +6 -6
- package/field/control/FieldControl.js +21 -20
- package/field/description/FieldDescription.d.ts +3 -3
- package/field/error/FieldError.d.ts +10 -4
- package/field/error/FieldError.js +51 -7
- package/field/error/FieldErrorDataAttributes.d.ts +8 -0
- package/field/error/FieldErrorDataAttributes.js +10 -1
- package/field/item/FieldItem.d.ts +5 -4
- package/field/item/FieldItem.js +2 -2
- package/field/item/FieldItemContext.js +1 -0
- package/field/label/FieldLabel.d.ts +4 -4
- package/field/label/FieldLabel.js +13 -53
- package/field/root/FieldRoot.d.ts +28 -11
- package/field/root/FieldRoot.js +2 -1
- package/field/root/FieldRootContext.d.ts +3 -3
- package/field/root/FieldRootContext.js +5 -12
- package/field/root/useFieldValidation.js +5 -4
- package/field/useField.d.ts +1 -1
- package/field/useField.js +1 -0
- package/field/utils/constants.d.ts +3 -0
- package/field/utils/constants.js +12 -1
- package/field/validity/FieldValidity.d.ts +9 -1
- package/field/validity/FieldValidity.js +9 -3
- package/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/fieldset/legend/FieldsetLegend.js +2 -2
- package/fieldset/root/FieldsetRoot.d.ts +2 -2
- package/fieldset/root/FieldsetRoot.js +3 -3
- package/floating-ui-react/components/FloatingDelayGroup.d.ts +2 -7
- package/floating-ui-react/components/FloatingDelayGroup.js +4 -11
- package/floating-ui-react/components/FloatingFocusManager.d.ts +17 -22
- package/floating-ui-react/components/FloatingFocusManager.js +85 -94
- package/floating-ui-react/components/FloatingPortal.d.ts +12 -11
- package/floating-ui-react/components/FloatingPortal.js +1 -3
- package/floating-ui-react/components/FloatingTree.d.ts +1 -1
- package/floating-ui-react/hooks/useClick.d.ts +12 -6
- package/floating-ui-react/hooks/useClick.js +6 -5
- package/floating-ui-react/hooks/useClientPoint.d.ts +2 -12
- package/floating-ui-react/hooks/useClientPoint.js +4 -16
- package/floating-ui-react/hooks/useDismiss.d.ts +14 -18
- package/floating-ui-react/hooks/useDismiss.js +322 -261
- package/floating-ui-react/hooks/useFloating.js +1 -0
- package/floating-ui-react/hooks/useFloatingRootContext.d.ts +4 -10
- package/floating-ui-react/hooks/useFloatingRootContext.js +4 -3
- package/floating-ui-react/hooks/useFocus.d.ts +2 -8
- package/floating-ui-react/hooks/useFocus.js +9 -11
- package/floating-ui-react/hooks/useHover.d.ts +7 -38
- package/floating-ui-react/hooks/useHover.js +23 -67
- package/floating-ui-react/hooks/useHoverFloatingInteraction.d.ts +3 -9
- package/floating-ui-react/hooks/useHoverFloatingInteraction.js +67 -90
- package/floating-ui-react/hooks/useHoverInteractionSharedState.d.ts +27 -15
- package/floating-ui-react/hooks/useHoverInteractionSharedState.js +67 -33
- package/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +14 -5
- package/floating-ui-react/hooks/useHoverReferenceInteraction.js +93 -119
- package/floating-ui-react/hooks/useHoverShared.d.ts +28 -0
- package/floating-ui-react/hooks/useHoverShared.js +34 -0
- package/floating-ui-react/hooks/useInteractions.d.ts +2 -2
- package/floating-ui-react/hooks/useListNavigation.d.ts +19 -35
- package/floating-ui-react/hooks/useListNavigation.js +18 -14
- package/floating-ui-react/hooks/useRole.d.ts +1 -7
- package/floating-ui-react/hooks/useRole.js +2 -3
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.d.ts +2 -2
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.js +1 -0
- package/floating-ui-react/hooks/useTypeahead.d.ts +12 -16
- package/floating-ui-react/hooks/useTypeahead.js +72 -25
- package/floating-ui-react/middleware/arrow.d.ts +1 -1
- package/floating-ui-react/safePolygon.d.ts +2 -6
- package/floating-ui-react/safePolygon.js +149 -119
- package/floating-ui-react/types.d.ts +16 -15
- package/floating-ui-react/utils/composite.d.ts +6 -5
- package/floating-ui-react/utils/composite.js +130 -132
- package/floating-ui-react/utils/element.d.ts +2 -1
- package/floating-ui-react/utils/element.js +16 -4
- package/floating-ui-react/utils/enqueueFocus.d.ts +3 -3
- package/floating-ui-react/utils/event.js +2 -4
- package/floating-ui-react/utils/markOthers.d.ts +7 -1
- package/floating-ui-react/utils/markOthers.js +120 -82
- package/floating-ui-react/utils/tabbable.js +5 -4
- package/form/Form.d.ts +6 -6
- package/global.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.js +12 -1
- package/input/Input.d.ts +13 -6
- package/labelable-provider/LabelableContext.d.ts +1 -1
- package/labelable-provider/LabelableContext.js +1 -1
- package/labelable-provider/LabelableProvider.d.ts +4 -1
- package/labelable-provider/LabelableProvider.js +35 -4
- package/labelable-provider/useAriaLabelledBy.d.ts +9 -0
- package/labelable-provider/useAriaLabelledBy.js +61 -0
- package/labelable-provider/useLabel.d.ts +25 -0
- package/labelable-provider/useLabel.js +80 -0
- package/labelable-provider/useLabelableId.d.ts +5 -7
- package/labelable-provider/useLabelableId.js +39 -12
- package/menu/arrow/MenuArrow.d.ts +10 -1
- package/menu/arrow/MenuArrow.js +2 -2
- package/menu/arrow/MenuArrowDataAttributes.js +2 -2
- package/menu/backdrop/MenuBackdrop.d.ts +4 -1
- package/menu/backdrop/MenuBackdrop.js +2 -2
- package/menu/checkbox-item/MenuCheckboxItem.d.ts +11 -11
- package/menu/checkbox-item/MenuCheckboxItemContext.js +1 -0
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.d.ts +9 -3
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +3 -3
- package/menu/group/MenuGroup.d.ts +1 -1
- package/menu/group/MenuGroupContext.js +1 -0
- package/menu/group-label/MenuGroupLabel.d.ts +1 -1
- package/menu/index.d.ts +4 -2
- package/menu/index.parts.d.ts +2 -0
- package/menu/index.parts.js +14 -0
- package/menu/item/MenuItem.d.ts +6 -6
- package/menu/item/MenuItem.js +2 -2
- package/menu/item/useMenuItem.d.ts +8 -7
- package/menu/item/useMenuItem.js +16 -54
- package/menu/item/useMenuItemCommonProps.d.ts +46 -0
- package/menu/item/useMenuItemCommonProps.js +86 -0
- package/menu/link-item/MenuLinkItem.d.ts +34 -0
- package/menu/link-item/MenuLinkItem.js +74 -0
- package/menu/link-item/MenuLinkItemDataAttributes.d.ts +6 -0
- package/menu/link-item/MenuLinkItemDataAttributes.js +13 -0
- package/menu/popup/MenuPopup.d.ts +21 -5
- package/menu/popup/MenuPopup.js +6 -3
- package/menu/popup/MenuPopupDataAttributes.d.ts +1 -1
- package/menu/popup/MenuPopupDataAttributes.js +3 -3
- package/menu/portal/MenuPortal.d.ts +4 -5
- package/menu/portal/MenuPortalContext.js +1 -0
- package/menu/positioner/MenuPositioner.d.ts +18 -2
- package/menu/positioner/MenuPositioner.js +62 -16
- package/menu/positioner/MenuPositionerDataAttributes.js +2 -2
- package/menu/radio-group/MenuRadioGroup.d.ts +8 -5
- package/menu/radio-group/MenuRadioGroup.js +2 -2
- package/menu/radio-group/MenuRadioGroupContext.js +1 -0
- package/menu/radio-item/MenuRadioItem.d.ts +8 -8
- package/menu/radio-item/MenuRadioItemContext.js +1 -0
- package/menu/radio-item-indicator/MenuRadioItemIndicator.d.ts +9 -3
- package/menu/radio-item-indicator/MenuRadioItemIndicator.js +3 -3
- package/menu/root/MenuRoot.d.ts +17 -15
- package/menu/root/MenuRoot.js +41 -40
- package/menu/store/MenuStore.d.ts +259 -17
- package/menu/store/MenuStore.js +17 -12
- package/menu/submenu-root/MenuSubmenuRoot.d.ts +2 -2
- package/menu/submenu-root/MenuSubmenuRootContext.js +1 -0
- package/menu/submenu-trigger/MenuSubmenuTrigger.d.ts +22 -22
- package/menu/submenu-trigger/MenuSubmenuTrigger.js +11 -8
- package/menu/trigger/MenuTrigger.d.ts +13 -9
- package/menu/trigger/MenuTrigger.js +5 -4
- package/menu/viewport/MenuViewport.d.ts +30 -0
- package/menu/viewport/MenuViewport.js +66 -0
- package/menu/viewport/MenuViewportCssVars.d.ts +14 -0
- package/menu/viewport/MenuViewportCssVars.js +21 -0
- package/menu/viewport/MenuViewportDataAttributes.d.ts +26 -0
- package/menu/viewport/MenuViewportDataAttributes.js +33 -0
- package/menubar/Menubar.d.ts +5 -5
- package/menubar/Menubar.js +3 -9
- package/meter/indicator/MeterIndicator.d.ts +4 -2
- package/meter/label/MeterLabel.d.ts +4 -2
- package/meter/label/MeterLabel.js +4 -8
- package/meter/root/MeterRoot.d.ts +7 -7
- package/meter/root/MeterRoot.js +11 -11
- package/meter/track/MeterTrack.d.ts +4 -2
- package/meter/value/MeterValue.d.ts +5 -3
- package/navigation-menu/arrow/NavigationMenuArrow.d.ts +10 -1
- package/navigation-menu/arrow/NavigationMenuArrow.js +2 -2
- package/navigation-menu/arrow/NavigationMenuArrowDataAttributes.js +2 -2
- package/navigation-menu/backdrop/NavigationMenuBackdrop.d.ts +1 -1
- package/navigation-menu/backdrop/NavigationMenuBackdrop.js +2 -2
- package/navigation-menu/content/NavigationMenuContent.d.ts +8 -1
- package/navigation-menu/content/NavigationMenuContent.js +37 -5
- package/navigation-menu/icon/NavigationMenuIcon.d.ts +2 -2
- package/navigation-menu/icon/NavigationMenuIcon.js +2 -2
- package/navigation-menu/item/NavigationMenuItem.d.ts +2 -2
- package/navigation-menu/item/NavigationMenuItemContext.js +1 -0
- package/navigation-menu/link/NavigationMenuLink.d.ts +3 -3
- package/navigation-menu/link/NavigationMenuLink.js +2 -2
- package/navigation-menu/list/NavigationMenuDismissContext.js +1 -0
- package/navigation-menu/list/NavigationMenuList.d.ts +2 -2
- package/navigation-menu/list/NavigationMenuList.js +12 -3
- package/navigation-menu/popup/NavigationMenuPopup.d.ts +14 -1
- package/navigation-menu/popup/NavigationMenuPopup.js +2 -2
- package/navigation-menu/popup/NavigationMenuPopupDataAttributes.js +2 -2
- package/navigation-menu/portal/NavigationMenuPortal.d.ts +5 -6
- package/navigation-menu/portal/NavigationMenuPortalContext.js +1 -0
- package/navigation-menu/positioner/NavigationMenuPositioner.d.ts +11 -2
- package/navigation-menu/positioner/NavigationMenuPositioner.js +2 -2
- package/navigation-menu/positioner/NavigationPositionerDataAttributes.js +2 -2
- package/navigation-menu/root/NavigationMenuRoot.d.ts +9 -9
- package/navigation-menu/root/NavigationMenuRoot.js +28 -9
- package/navigation-menu/root/NavigationMenuRootContext.js +1 -0
- package/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -1
- package/navigation-menu/trigger/NavigationMenuTrigger.js +270 -42
- package/navigation-menu/utils/isOutsideMenuEvent.d.ts +1 -1
- package/navigation-menu/viewport/NavigationMenuViewport.d.ts +1 -1
- package/navigation-menu/viewport/NavigationMenuViewport.js +2 -1
- package/number-field/decrement/NumberFieldDecrement.d.ts +3 -3
- package/number-field/group/NumberFieldGroup.d.ts +3 -3
- package/number-field/increment/NumberFieldIncrement.d.ts +3 -3
- package/number-field/input/NumberFieldInput.d.ts +3 -3
- package/number-field/input/NumberFieldInput.js +3 -11
- package/number-field/root/NumberFieldRoot.d.ts +29 -22
- package/number-field/root/NumberFieldRoot.js +23 -8
- package/number-field/root/NumberFieldRootContext.d.ts +4 -4
- package/number-field/root/useNumberFieldButton.d.ts +5 -8
- package/number-field/root/useNumberFieldButton.js +12 -7
- package/number-field/scrub-area/NumberFieldScrubArea.d.ts +5 -5
- package/number-field/scrub-area/NumberFieldScrubArea.js +16 -0
- package/number-field/scrub-area/NumberFieldScrubAreaContext.js +1 -0
- package/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.d.ts +3 -3
- package/number-field/utils/stateAttributesMapping.d.ts +2 -2
- package/number-field/utils/stateAttributesMapping.js +3 -1
- package/number-field/utils/subscribeToVisualViewportResize.d.ts +1 -1
- package/number-field/utils/types.d.ts +5 -5
- package/number-field/utils/validate.d.ts +3 -1
- package/number-field/utils/validate.js +3 -2
- package/package.json +194 -9
- package/popover/arrow/PopoverArrow.d.ts +10 -1
- package/popover/arrow/PopoverArrow.js +2 -2
- package/popover/arrow/PopoverArrowDataAttributes.js +2 -2
- package/popover/backdrop/PopoverBackdrop.d.ts +4 -1
- package/popover/backdrop/PopoverBackdrop.js +2 -2
- package/popover/close/PopoverClose.d.ts +1 -1
- package/popover/close/PopoverClose.js +5 -3
- package/popover/description/PopoverDescription.d.ts +1 -1
- package/popover/popup/PopoverPopup.d.ts +16 -3
- package/popover/popup/PopoverPopup.js +13 -4
- package/popover/portal/PopoverPortal.d.ts +4 -5
- package/popover/portal/PopoverPortal.js +1 -2
- package/popover/portal/PopoverPortalContext.js +1 -0
- package/popover/positioner/PopoverPositioner.d.ts +11 -2
- package/popover/positioner/PopoverPositioner.js +3 -3
- package/popover/positioner/PopoverPositionerDataAttributes.js +2 -2
- package/popover/root/PopoverRoot.d.ts +16 -9
- package/popover/root/PopoverRoot.js +19 -8
- package/popover/store/PopoverStore.d.ts +255 -15
- package/popover/title/PopoverTitle.d.ts +1 -1
- package/popover/trigger/PopoverTrigger.d.ts +7 -7
- package/popover/trigger/PopoverTrigger.js +3 -3
- package/popover/viewport/PopoverViewport.d.ts +16 -4
- package/popover/viewport/PopoverViewport.js +19 -196
- package/popover/viewport/PopoverViewportDataAttributes.d.ts +5 -0
- package/popover/viewport/PopoverViewportDataAttributes.js +5 -0
- package/preview-card/arrow/PreviewCardArrow.d.ts +10 -1
- package/preview-card/arrow/PreviewCardArrow.js +2 -2
- package/preview-card/arrow/PreviewCardArrowDataAttributes.js +2 -2
- package/preview-card/backdrop/PreviewCardBackdrop.d.ts +4 -1
- package/preview-card/backdrop/PreviewCardBackdrop.js +2 -2
- package/preview-card/popup/PreviewCardPopup.d.ts +13 -1
- package/preview-card/popup/PreviewCardPopup.js +2 -2
- package/preview-card/popup/PreviewCardPopupDataAttributes.js +2 -2
- package/preview-card/portal/PreviewCardPortal.d.ts +4 -5
- package/preview-card/portal/PreviewCardPortalContext.js +1 -0
- package/preview-card/positioner/PreviewCardPositioner.d.ts +14 -2
- package/preview-card/positioner/PreviewCardPositioner.js +9 -3
- package/preview-card/positioner/PreviewCardPositionerContext.d.ts +1 -1
- package/preview-card/positioner/PreviewCardPositionerDataAttributes.js +2 -2
- package/preview-card/root/PreviewCardRoot.d.ts +9 -9
- package/preview-card/root/PreviewCardRoot.js +37 -11
- package/preview-card/store/PreviewCardStore.d.ts +255 -15
- package/preview-card/trigger/PreviewCardTrigger.d.ts +5 -5
- package/preview-card/trigger/PreviewCardTrigger.js +3 -3
- package/preview-card/viewport/PreviewCardViewport.d.ts +16 -4
- package/preview-card/viewport/PreviewCardViewport.js +14 -230
- package/progress/indicator/ProgressIndicator.d.ts +4 -2
- package/progress/label/ProgressLabel.d.ts +4 -2
- package/progress/label/ProgressLabel.js +4 -8
- package/progress/root/ProgressRoot.d.ts +10 -7
- package/progress/root/ProgressRoot.js +11 -13
- package/progress/root/ProgressRootContext.d.ts +2 -2
- package/progress/root/stateAttributesMapping.d.ts +2 -2
- package/progress/track/ProgressTrack.d.ts +4 -2
- package/progress/value/ProgressValue.d.ts +5 -3
- package/radio/indicator/RadioIndicator.d.ts +5 -2
- package/radio/indicator/RadioIndicator.js +4 -4
- package/radio/indicator/RadioIndicatorDataAttributes.d.ts +8 -0
- package/radio/indicator/RadioIndicatorDataAttributes.js +10 -1
- package/radio/root/RadioRoot.d.ts +39 -19
- package/radio/root/RadioRoot.js +49 -12
- package/radio-group/RadioGroup.d.ts +20 -14
- package/radio-group/RadioGroup.js +68 -61
- package/radio-group/RadioGroupContext.d.ts +9 -8
- package/radio-group/RadioGroupContext.js +1 -13
- package/scroll-area/content/ScrollAreaContent.d.ts +3 -3
- package/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/scroll-area/root/ScrollAreaRoot.d.ts +27 -9
- package/scroll-area/root/ScrollAreaRoot.js +9 -5
- package/scroll-area/root/ScrollAreaRootContext.d.ts +4 -2
- package/scroll-area/root/ScrollAreaRootContext.js +1 -0
- package/scroll-area/root/ScrollAreaRootDataAttributes.d.ts +4 -0
- package/scroll-area/root/ScrollAreaRootDataAttributes.js +4 -0
- package/scroll-area/root/stateAttributes.d.ts +2 -2
- package/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +14 -8
- package/scroll-area/scrollbar/ScrollAreaScrollbar.js +6 -3
- package/scroll-area/scrollbar/ScrollAreaScrollbarContext.js +1 -0
- package/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.d.ts +1 -1
- package/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.js +1 -1
- package/scroll-area/thumb/ScrollAreaThumb.d.ts +5 -2
- package/scroll-area/thumb/ScrollAreaThumb.js +5 -3
- package/scroll-area/utils/scrollEdges.d.ts +2 -0
- package/scroll-area/utils/scrollEdges.js +29 -0
- package/scroll-area/viewport/ScrollAreaViewport.d.ts +3 -3
- package/scroll-area/viewport/ScrollAreaViewport.js +64 -42
- package/scroll-area/viewport/ScrollAreaViewportContext.js +1 -0
- package/scroll-area/viewport/ScrollAreaViewportDataAttributes.d.ts +4 -0
- package/scroll-area/viewport/ScrollAreaViewportDataAttributes.js +4 -0
- package/select/arrow/SelectArrow.d.ts +10 -1
- package/select/arrow/SelectArrow.js +2 -2
- package/select/arrow/SelectArrowDataAttributes.js +2 -2
- package/select/backdrop/SelectBackdrop.d.ts +7 -1
- package/select/backdrop/SelectBackdrop.js +2 -2
- package/select/group/SelectGroup.d.ts +1 -1
- package/select/group/SelectGroupContext.js +1 -0
- package/select/group-label/SelectGroupLabel.d.ts +1 -1
- package/select/icon/SelectIcon.d.ts +1 -1
- package/select/icon/SelectIcon.js +2 -2
- package/select/index.d.ts +1 -0
- package/select/index.parts.d.ts +1 -0
- package/select/index.parts.js +7 -0
- package/select/item/SelectItem.d.ts +3 -3
- package/select/item/SelectItem.js +23 -17
- package/select/item/SelectItemContext.js +1 -0
- package/select/item-indicator/SelectItemIndicator.d.ts +11 -3
- package/select/item-indicator/SelectItemIndicator.js +2 -2
- package/select/item-indicator/SelectItemIndicatorDataAttributes.d.ts +10 -0
- package/select/item-indicator/SelectItemIndicatorDataAttributes.js +18 -0
- package/select/item-text/SelectItemText.d.ts +1 -1
- package/select/label/SelectLabel.d.ts +16 -0
- package/select/label/SelectLabel.js +54 -0
- package/select/list/SelectList.d.ts +1 -1
- package/select/popup/SelectPopup.d.ts +24 -1
- package/select/popup/SelectPopup.js +90 -47
- package/select/popup/SelectPopupDataAttributes.js +2 -2
- package/select/portal/SelectPortal.d.ts +3 -4
- package/select/portal/SelectPortalContext.js +1 -0
- package/select/positioner/SelectPositioner.d.ts +15 -3
- package/select/positioner/SelectPositioner.js +13 -10
- package/select/positioner/SelectPositionerContext.d.ts +2 -2
- package/select/positioner/SelectPositionerContext.js +1 -0
- package/select/positioner/SelectPositionerDataAttributes.js +2 -2
- package/select/root/SelectRoot.d.ts +27 -21
- package/select/root/SelectRoot.js +7 -6
- package/select/root/SelectRootContext.d.ts +14 -14
- package/select/root/SelectRootContext.js +1 -0
- package/select/scroll-arrow/SelectScrollArrow.d.ts +14 -2
- package/select/scroll-arrow/SelectScrollArrow.js +2 -2
- package/select/scroll-down-arrow/SelectScrollDownArrow.d.ts +2 -2
- package/select/scroll-down-arrow/SelectScrollDownArrowDataAttributes.js +1 -1
- package/select/scroll-up-arrow/SelectScrollUpArrow.d.ts +2 -2
- package/select/scroll-up-arrow/SelectScrollUpArrowDataAttributes.js +1 -1
- package/select/store.d.ts +8 -5
- package/select/store.js +4 -3
- package/select/trigger/SelectTrigger.d.ts +7 -5
- package/select/trigger/SelectTrigger.js +7 -4
- package/select/value/SelectValue.d.ts +5 -1
- package/select/value/SelectValue.js +2 -2
- package/separator/Separator.d.ts +2 -2
- package/separator/Separator.js +2 -2
- package/slider/control/SliderControl.d.ts +4 -3
- package/slider/control/SliderControl.js +0 -2
- package/slider/index.d.ts +1 -0
- package/slider/index.parts.d.ts +1 -0
- package/slider/index.parts.js +7 -0
- package/slider/indicator/SliderIndicator.d.ts +4 -2
- package/slider/label/SliderLabel.d.ts +16 -0
- package/slider/label/SliderLabel.js +63 -0
- package/slider/root/SliderRoot.d.ts +26 -20
- package/slider/root/SliderRoot.js +11 -5
- package/slider/root/SliderRootContext.d.ts +6 -4
- package/slider/root/stateAttributesMapping.d.ts +2 -2
- package/slider/root/stateAttributesMapping.js +3 -1
- package/slider/thumb/SliderThumb.d.ts +10 -10
- package/slider/thumb/SliderThumb.js +3 -2
- package/slider/track/SliderTrack.d.ts +4 -2
- package/slider/utils/getPushedThumbValues.d.ts +1 -1
- package/slider/utils/resolveThumbCollision.d.ts +2 -2
- package/slider/value/SliderValue.d.ts +5 -3
- package/switch/root/SwitchRoot.d.ts +14 -14
- package/switch/root/SwitchRoot.js +11 -2
- package/switch/root/SwitchRootContext.d.ts +4 -4
- package/switch/root/SwitchRootContext.js +1 -0
- package/switch/stateAttributesMapping.d.ts +2 -2
- package/switch/thumb/SwitchThumb.d.ts +3 -3
- package/tabs/indicator/TabsIndicator.d.ts +13 -4
- package/tabs/indicator/TabsIndicator.js +7 -16
- package/tabs/indicator/TabsIndicatorCssVars.d.ts +1 -1
- package/tabs/indicator/TabsIndicatorCssVars.js +1 -1
- package/tabs/list/TabsList.d.ts +5 -5
- package/tabs/list/TabsList.js +50 -5
- package/tabs/list/TabsListContext.d.ts +2 -0
- package/tabs/panel/TabsPanel.d.ts +13 -5
- package/tabs/panel/TabsPanel.js +37 -10
- package/tabs/panel/TabsPanelDataAttributes.d.ts +8 -0
- package/tabs/panel/TabsPanelDataAttributes.js +10 -1
- package/tabs/root/TabsRoot.d.ts +11 -5
- package/tabs/root/TabsRootContext.d.ts +1 -1
- package/tabs/root/stateAttributesMapping.d.ts +2 -2
- package/tabs/tab/TabsTab.d.ts +8 -2
- package/tabs/tab/TabsTab.js +12 -3
- package/toast/action/ToastAction.d.ts +1 -1
- package/toast/action/ToastAction.js +2 -2
- package/toast/arrow/ToastArrow.d.ts +10 -1
- package/toast/arrow/ToastArrow.js +2 -2
- package/toast/arrow/ToastArrowDataAttributes.js +4 -3
- package/toast/close/ToastClose.d.ts +1 -1
- package/toast/close/ToastClose.js +5 -7
- package/toast/content/ToastContent.d.ts +1 -1
- package/toast/content/ToastContent.js +2 -2
- package/toast/createToastManager.d.ts +6 -6
- package/toast/createToastManager.js +3 -6
- package/toast/description/ToastDescription.d.ts +1 -1
- package/toast/description/ToastDescription.js +4 -6
- package/toast/portal/ToastPortal.d.ts +3 -4
- package/toast/positioner/ToastPositioner.d.ts +13 -4
- package/toast/positioner/ToastPositioner.js +5 -6
- package/toast/positioner/ToastPositionerDataAttributes.js +2 -2
- package/toast/provider/ToastProvider.d.ts +5 -3
- package/toast/provider/ToastProvider.js +25 -285
- package/toast/provider/ToastProviderContext.d.ts +4 -25
- package/toast/provider/ToastProviderContext.js +3 -2
- package/toast/root/ToastRoot.d.ts +20 -7
- package/toast/root/ToastRoot.js +21 -27
- package/toast/root/ToastRootContext.js +1 -0
- package/toast/store.d.ts +51 -0
- package/toast/store.js +391 -0
- package/toast/title/ToastTitle.d.ts +1 -1
- package/toast/title/ToastTitle.js +4 -6
- package/toast/useToastManager.d.ts +21 -22
- package/toast/useToastManager.js +8 -14
- package/toast/viewport/ToastViewport.d.ts +1 -1
- package/toast/viewport/ToastViewport.js +65 -91
- package/toggle/Toggle.d.ts +10 -8
- package/toggle/Toggle.js +13 -3
- package/toggle-group/ToggleGroup.d.ts +22 -10
- package/toggle-group/ToggleGroup.js +8 -5
- package/toggle-group/ToggleGroupContext.d.ts +10 -5
- package/toolbar/button/ToolbarButton.d.ts +11 -5
- package/toolbar/button/ToolbarButton.js +2 -2
- package/toolbar/group/ToolbarGroup.d.ts +5 -3
- package/toolbar/group/ToolbarGroup.js +2 -2
- package/toolbar/group/ToolbarGroupContext.js +1 -0
- package/toolbar/input/ToolbarInput.d.ts +12 -6
- package/toolbar/input/ToolbarInput.js +2 -2
- package/toolbar/link/ToolbarLink.d.ts +4 -1
- package/toolbar/link/ToolbarLink.js +2 -2
- package/toolbar/root/ToolbarRoot.d.ts +10 -4
- package/toolbar/root/ToolbarRoot.js +2 -2
- package/toolbar/separator/ToolbarSeparator.d.ts +4 -2
- package/tooltip/arrow/TooltipArrow.d.ts +14 -1
- package/tooltip/arrow/TooltipArrow.js +2 -2
- package/tooltip/arrow/TooltipArrowDataAttributes.js +2 -2
- package/tooltip/popup/TooltipPopup.d.ts +13 -1
- package/tooltip/popup/TooltipPopup.js +2 -2
- package/tooltip/popup/TooltipPopupDataAttributes.js +2 -2
- package/tooltip/portal/TooltipPortal.d.ts +4 -5
- package/tooltip/portal/TooltipPortalContext.js +1 -0
- package/tooltip/positioner/TooltipPositioner.d.ts +12 -3
- package/tooltip/positioner/TooltipPositionerContext.d.ts +1 -1
- package/tooltip/positioner/TooltipPositionerDataAttributes.js +2 -2
- package/tooltip/provider/TooltipProvider.d.ts +5 -3
- package/tooltip/provider/TooltipProviderContext.js +1 -0
- package/tooltip/root/TooltipRoot.d.ts +12 -12
- package/tooltip/root/TooltipRoot.js +24 -12
- package/tooltip/store/TooltipStore.d.ts +258 -16
- package/tooltip/store/TooltipStore.js +2 -0
- package/tooltip/trigger/TooltipTrigger.d.ts +17 -5
- package/tooltip/trigger/TooltipTrigger.js +17 -6
- package/tooltip/trigger/TooltipTriggerDataAttributes.d.ts +4 -0
- package/tooltip/trigger/TooltipTriggerDataAttributes.js +4 -0
- package/tooltip/viewport/TooltipViewport.d.ts +16 -4
- package/tooltip/viewport/TooltipViewport.js +14 -195
- package/types/index.d.ts +16 -1
- package/unstable-use-media-query/index.d.ts +7 -5
- package/use-button/useButton.d.ts +12 -9
- package/use-button/useButton.js +56 -22
- package/use-render/useRender.d.ts +14 -12
- package/utils/FloatingPortalLite.d.ts +4 -2
- package/utils/InternalBackdrop.d.ts +3 -1
- package/utils/closePart.d.ts +16 -0
- package/utils/closePart.js +48 -0
- package/utils/constants.d.ts +4 -0
- package/utils/constants.js +6 -2
- package/utils/createBaseUIEventDetails.d.ts +4 -1
- package/utils/formatNumber.d.ts +2 -1
- package/utils/formatNumber.js +12 -0
- package/utils/getDisabledMountTransitionStyles.d.ts +1 -1
- package/utils/getElementAtPoint.d.ts +1 -0
- package/utils/getElementAtPoint.js +9 -0
- package/utils/getPseudoElementBounds.js +1 -1
- package/utils/itemEquality.d.ts +5 -5
- package/utils/itemEquality.js +18 -18
- package/utils/popupStateMapping.d.ts +10 -0
- package/utils/popupStateMapping.js +10 -0
- package/utils/popups/popupStoreUtils.js +1 -0
- package/utils/popups/popupTriggerMap.d.ts +14 -1
- package/utils/popups/popupTriggerMap.js +27 -10
- package/utils/popups/store.d.ts +28 -18
- package/utils/popups/store.js +8 -5
- package/utils/reason-parts.d.ts +3 -0
- package/utils/reason-parts.js +4 -1
- package/utils/resolveAriaLabelledBy.d.ts +2 -0
- package/utils/resolveAriaLabelledBy.js +14 -0
- package/utils/resolveValueLabel.d.ts +4 -4
- package/utils/resolveValueLabel.js +7 -5
- package/utils/scrollable.d.ts +4 -0
- package/utils/scrollable.js +40 -0
- package/utils/types.d.ts +9 -22
- package/utils/useAnchorPositioning.d.ts +68 -33
- package/utils/useAnchorPositioning.js +32 -20
- package/utils/useFocusableWhenDisabled.d.ts +6 -9
- package/utils/useMixedToggleClickHandler.d.ts +3 -5
- package/utils/useMixedToggleClickHandler.js +1 -0
- package/utils/useOpenChangeComplete.d.ts +4 -6
- package/utils/useOpenInteractionType.d.ts +0 -1
- package/utils/useOpenInteractionType.js +7 -5
- package/utils/usePopupAutoResize.d.ts +3 -3
- package/utils/usePopupAutoResize.js +3 -3
- package/utils/usePopupViewport.d.ts +58 -0
- package/utils/usePopupViewport.js +256 -0
- package/utils/useRegisteredLabelId.d.ts +1 -0
- package/utils/useRegisteredLabelId.js +19 -0
- package/utils/useRenderElement.d.ts +11 -14
- package/utils/useRenderElement.js +43 -1
- package/utils/useSwipeDismiss.d.ts +107 -0
- package/utils/useSwipeDismiss.js +953 -0
- package/utils/useValueChanged.js +1 -0
- package/esm/navigation-menu/utils/setFixedSize.d.ts +0 -1
- package/esm/navigation-menu/utils/setFixedSize.js +0 -11
- package/esm/toast/viewport/ToastViewportContext.d.ts +0 -6
- package/esm/toast/viewport/ToastViewportContext.js +0 -11
- package/navigation-menu/utils/setFixedSize.d.ts +0 -1
- package/navigation-menu/utils/setFixedSize.js +0 -17
- package/toast/viewport/ToastViewportContext.d.ts +0 -6
- package/toast/viewport/ToastViewportContext.js +0 -20
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { SliderRootState } from "../root/SliderRoot.js";
|
|
4
4
|
/**
|
|
5
5
|
* Visualizes the current value of the slider.
|
|
6
6
|
* Renders a `<div>` element.
|
|
@@ -8,7 +8,9 @@ import type { SliderRoot } from "../root/SliderRoot.js";
|
|
|
8
8
|
* Documentation: [Base UI Slider](https://base-ui.com/react/components/slider)
|
|
9
9
|
*/
|
|
10
10
|
export declare const SliderIndicator: React.ForwardRefExoticComponent<Omit<SliderIndicatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export interface
|
|
11
|
+
export interface SliderIndicatorState extends SliderRootState {}
|
|
12
|
+
export interface SliderIndicatorProps extends BaseUIComponentProps<'div', SliderIndicatorState> {}
|
|
12
13
|
export declare namespace SliderIndicator {
|
|
14
|
+
type State = SliderIndicatorState;
|
|
13
15
|
type Props = SliderIndicatorProps;
|
|
14
16
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
3
|
+
import type { SliderRoot } from "../root/SliderRoot.js";
|
|
4
|
+
/**
|
|
5
|
+
* An accessible label that is automatically associated with the slider thumbs.
|
|
6
|
+
* Renders a `<div>` element.
|
|
7
|
+
*
|
|
8
|
+
* Documentation: [Base UI Slider](https://base-ui.com/react/components/slider)
|
|
9
|
+
*/
|
|
10
|
+
export declare const SliderLabel: React.ForwardRefExoticComponent<Omit<SliderLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export type SliderLabelState = SliderRoot.State;
|
|
12
|
+
export interface SliderLabelProps extends Omit<BaseUIComponentProps<'div', SliderLabel.State>, 'id'> {}
|
|
13
|
+
export declare namespace SliderLabel {
|
|
14
|
+
type State = SliderLabelState;
|
|
15
|
+
type Props = SliderLabelProps;
|
|
16
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { isHTMLElement } from '@floating-ui/utils/dom';
|
|
5
|
+
import { ownerDocument } from '@base-ui/utils/owner';
|
|
6
|
+
import { focusElementWithVisible, useLabel } from "../../labelable-provider/useLabel.js";
|
|
7
|
+
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
8
|
+
import { useSliderRootContext } from "../root/SliderRootContext.js";
|
|
9
|
+
import { sliderStateAttributesMapping } from "../root/stateAttributesMapping.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* An accessible label that is automatically associated with the slider thumbs.
|
|
13
|
+
* Renders a `<div>` element.
|
|
14
|
+
*
|
|
15
|
+
* Documentation: [Base UI Slider](https://base-ui.com/react/components/slider)
|
|
16
|
+
*/
|
|
17
|
+
export const SliderLabel = /*#__PURE__*/React.forwardRef(function SliderLabel(componentProps, forwardedRef) {
|
|
18
|
+
const {
|
|
19
|
+
render,
|
|
20
|
+
className,
|
|
21
|
+
...elementProps
|
|
22
|
+
} = componentProps;
|
|
23
|
+
// Keep label id derived from the root and ignore runtime `id` overrides from untyped consumers.
|
|
24
|
+
const elementPropsWithoutId = elementProps;
|
|
25
|
+
delete elementPropsWithoutId.id;
|
|
26
|
+
const {
|
|
27
|
+
state,
|
|
28
|
+
setLabelId,
|
|
29
|
+
controlRef,
|
|
30
|
+
rootLabelId
|
|
31
|
+
} = useSliderRootContext();
|
|
32
|
+
function focusControl(event, controlId) {
|
|
33
|
+
if (controlId) {
|
|
34
|
+
const controlElement = ownerDocument(event.currentTarget).getElementById(controlId);
|
|
35
|
+
if (isHTMLElement(controlElement)) {
|
|
36
|
+
focusElementWithVisible(controlElement);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const fallbackInputs = controlRef.current?.querySelectorAll('input[type="range"]');
|
|
41
|
+
const fallbackInput = fallbackInputs?.length === 1 ? fallbackInputs[0] : null;
|
|
42
|
+
if (isHTMLElement(fallbackInput)) {
|
|
43
|
+
focusElementWithVisible(fallbackInput);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
const labelProps = useLabel({
|
|
47
|
+
id: rootLabelId,
|
|
48
|
+
setLabelId,
|
|
49
|
+
focusControl
|
|
50
|
+
});
|
|
51
|
+
return useRenderElement('div', componentProps, {
|
|
52
|
+
ref: forwardedRef,
|
|
53
|
+
state,
|
|
54
|
+
props: [labelProps, elementProps],
|
|
55
|
+
stateAttributesMapping: sliderStateAttributesMapping
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
if (process.env.NODE_ENV !== "production") SliderLabel.displayName = "SliderLabel";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { BaseUIComponentProps, Orientation } from "../../utils/types.js";
|
|
3
3
|
import { type BaseUIChangeEventDetails, type BaseUIGenericEventDetails } from "../../utils/createBaseUIEventDetails.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { FieldRootState } from "../../field/root/FieldRoot.js";
|
|
5
5
|
import { REASONS } from "../../utils/reasons.js";
|
|
6
6
|
/**
|
|
7
7
|
* Groups all parts of the slider.
|
|
@@ -11,10 +11,10 @@ import { REASONS } from "../../utils/reasons.js";
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const SliderRoot: {
|
|
13
13
|
<Value extends number | readonly number[]>(props: SliderRoot.Props<Value> & {
|
|
14
|
-
ref?: React.Ref<HTMLDivElement
|
|
14
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
15
15
|
}): React.JSX.Element;
|
|
16
16
|
};
|
|
17
|
-
export interface SliderRootState extends
|
|
17
|
+
export interface SliderRootState extends FieldRootState {
|
|
18
18
|
/**
|
|
19
19
|
* The index of the active thumb.
|
|
20
20
|
*/
|
|
@@ -27,7 +27,13 @@ export interface SliderRootState extends FieldRoot.State {
|
|
|
27
27
|
* Whether the thumb is currently being dragged.
|
|
28
28
|
*/
|
|
29
29
|
dragging: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The maximum value.
|
|
32
|
+
*/
|
|
30
33
|
max: number;
|
|
34
|
+
/**
|
|
35
|
+
* The minimum value.
|
|
36
|
+
*/
|
|
31
37
|
min: number;
|
|
32
38
|
/**
|
|
33
39
|
* The minimum steps between values in a range slider.
|
|
@@ -49,65 +55,65 @@ export interface SliderRootState extends FieldRoot.State {
|
|
|
49
55
|
*/
|
|
50
56
|
values: readonly number[];
|
|
51
57
|
}
|
|
52
|
-
export interface SliderRootProps<Value extends number | readonly number[] = number | readonly number[]> extends BaseUIComponentProps<'div',
|
|
58
|
+
export interface SliderRootProps<Value extends number | readonly number[] = number | readonly number[]> extends BaseUIComponentProps<'div', SliderRootState> {
|
|
53
59
|
/**
|
|
54
60
|
* The uncontrolled value of the slider when it’s initially rendered.
|
|
55
61
|
*
|
|
56
62
|
* To render a controlled slider, use the `value` prop instead.
|
|
57
63
|
*/
|
|
58
|
-
defaultValue?: Value;
|
|
64
|
+
defaultValue?: Value | undefined;
|
|
59
65
|
/**
|
|
60
66
|
* Whether the slider should ignore user interaction.
|
|
61
67
|
* @default false
|
|
62
68
|
*/
|
|
63
|
-
disabled?: boolean;
|
|
69
|
+
disabled?: boolean | undefined;
|
|
64
70
|
/**
|
|
65
71
|
* Options to format the input value.
|
|
66
72
|
*/
|
|
67
|
-
format?: Intl.NumberFormatOptions;
|
|
73
|
+
format?: Intl.NumberFormatOptions | undefined;
|
|
68
74
|
/**
|
|
69
75
|
* The locale used by `Intl.NumberFormat` when formatting the value.
|
|
70
76
|
* Defaults to the user's runtime locale.
|
|
71
77
|
*/
|
|
72
|
-
locale?: Intl.LocalesArgument;
|
|
78
|
+
locale?: Intl.LocalesArgument | undefined;
|
|
73
79
|
/**
|
|
74
80
|
* The maximum allowed value of the slider.
|
|
75
81
|
* Should not be equal to min.
|
|
76
82
|
* @default 100
|
|
77
83
|
*/
|
|
78
|
-
max?: number;
|
|
84
|
+
max?: number | undefined;
|
|
79
85
|
/**
|
|
80
86
|
* The minimum allowed value of the slider.
|
|
81
87
|
* Should not be equal to max.
|
|
82
88
|
* @default 0
|
|
83
89
|
*/
|
|
84
|
-
min?: number;
|
|
90
|
+
min?: number | undefined;
|
|
85
91
|
/**
|
|
86
92
|
* The minimum steps between values in a range slider.
|
|
87
93
|
* @default 0
|
|
88
94
|
*/
|
|
89
|
-
minStepsBetweenValues?: number;
|
|
95
|
+
minStepsBetweenValues?: number | undefined;
|
|
90
96
|
/**
|
|
91
97
|
* Identifies the field when a form is submitted.
|
|
92
98
|
*/
|
|
93
|
-
name?: string;
|
|
99
|
+
name?: string | undefined;
|
|
94
100
|
/**
|
|
95
101
|
* The component orientation.
|
|
96
102
|
* @default 'horizontal'
|
|
97
103
|
*/
|
|
98
|
-
orientation?: Orientation;
|
|
104
|
+
orientation?: Orientation | undefined;
|
|
99
105
|
/**
|
|
100
106
|
* The granularity with which the slider can step through values. (A "discrete" slider.)
|
|
101
107
|
* The `min` prop serves as the origin for the valid values.
|
|
102
108
|
* We recommend (max - min) to be evenly divisible by the step.
|
|
103
109
|
* @default 1
|
|
104
110
|
*/
|
|
105
|
-
step?: number;
|
|
111
|
+
step?: number | undefined;
|
|
106
112
|
/**
|
|
107
113
|
* The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down.
|
|
108
114
|
* @default 10
|
|
109
115
|
*/
|
|
110
|
-
largeStep?: number;
|
|
116
|
+
largeStep?: number | undefined;
|
|
111
117
|
/**
|
|
112
118
|
* How the thumb(s) are aligned relative to `Slider.Control` when the value is at `min` or `max`:
|
|
113
119
|
* - `center`: The center of the thumb is aligned with the control edge
|
|
@@ -115,7 +121,7 @@ export interface SliderRootProps<Value extends number | readonly number[] = numb
|
|
|
115
121
|
* - `edge-client-only`: Same as `edge` but renders after React hydration on the client, reducing bundle size in return
|
|
116
122
|
* @default 'center'
|
|
117
123
|
*/
|
|
118
|
-
thumbAlignment?: 'center' | 'edge' | 'edge-client-only';
|
|
124
|
+
thumbAlignment?: 'center' | 'edge' | 'edge-client-only' | undefined;
|
|
119
125
|
/**
|
|
120
126
|
* Controls how thumbs behave when they collide during pointer interactions.
|
|
121
127
|
*
|
|
@@ -125,12 +131,12 @@ export interface SliderRootProps<Value extends number | readonly number[] = numb
|
|
|
125
131
|
*
|
|
126
132
|
* @default 'push'
|
|
127
133
|
*/
|
|
128
|
-
thumbCollisionBehavior?: 'push' | 'swap' | 'none';
|
|
134
|
+
thumbCollisionBehavior?: 'push' | 'swap' | 'none' | undefined;
|
|
129
135
|
/**
|
|
130
136
|
* The value of the slider.
|
|
131
137
|
* For ranged sliders, provide an array with two values.
|
|
132
138
|
*/
|
|
133
|
-
value?: Value;
|
|
139
|
+
value?: Value | undefined;
|
|
134
140
|
/**
|
|
135
141
|
* Callback function that is fired when the slider's value changed.
|
|
136
142
|
* You can pull out the new value by accessing `event.target.value` (any).
|
|
@@ -143,7 +149,7 @@ export interface SliderRootProps<Value extends number | readonly number[] = numb
|
|
|
143
149
|
* - `'keyboard'` for keyboard input
|
|
144
150
|
* - `'none'` when the change is triggered without a specific interaction
|
|
145
151
|
*/
|
|
146
|
-
onValueChange?: (value: Value extends number ? number : Value, eventDetails: SliderRoot.ChangeEventDetails) => void;
|
|
152
|
+
onValueChange?: ((value: Value extends number ? number : Value, eventDetails: SliderRoot.ChangeEventDetails) => void) | undefined;
|
|
147
153
|
/**
|
|
148
154
|
* Callback function that is fired when the `pointerup` is triggered.
|
|
149
155
|
* **Warning**: This is a generic event not a change event.
|
|
@@ -156,7 +162,7 @@ export interface SliderRootProps<Value extends number | readonly number[] = numb
|
|
|
156
162
|
* - `'input-change'` when the hidden range input emits a change event (for example, via form integration)
|
|
157
163
|
* - `'none'` when the commit occurs without a specific interaction
|
|
158
164
|
*/
|
|
159
|
-
onValueCommitted?: (value: Value extends number ? number : Value, eventDetails: SliderRoot.CommitEventDetails) => void;
|
|
165
|
+
onValueCommitted?: ((value: Value extends number ? number : Value, eventDetails: SliderRoot.CommitEventDetails) => void) | undefined;
|
|
160
166
|
}
|
|
161
167
|
export interface SliderRootChangeEventCustomProperties {
|
|
162
168
|
/**
|
|
@@ -19,6 +19,7 @@ import { useField } from "../../field/useField.js";
|
|
|
19
19
|
import { useFieldRootContext } from "../../field/root/FieldRootContext.js";
|
|
20
20
|
import { useFormContext } from "../../form/FormContext.js";
|
|
21
21
|
import { useLabelableContext } from "../../labelable-provider/LabelableContext.js";
|
|
22
|
+
import { resolveAriaLabelledBy, getDefaultLabelId } from "../../utils/resolveAriaLabelledBy.js";
|
|
22
23
|
import { asc } from "../utils/asc.js";
|
|
23
24
|
import { getSliderValue } from "../utils/getSliderValue.js";
|
|
24
25
|
import { validateMinimumDistance } from "../utils/validateMinimumDistance.js";
|
|
@@ -70,6 +71,7 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
70
71
|
...elementProps
|
|
71
72
|
} = componentProps;
|
|
72
73
|
const id = useBaseUiId(idProp);
|
|
74
|
+
const defaultLabelId = getDefaultLabelId(id);
|
|
73
75
|
const onValueChange = useStableCallback(onValueChangeProp);
|
|
74
76
|
const onValueCommitted = useStableCallback(onValueCommittedProp);
|
|
75
77
|
const {
|
|
@@ -86,9 +88,10 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
86
88
|
validation
|
|
87
89
|
} = useFieldRootContext();
|
|
88
90
|
const {
|
|
89
|
-
labelId
|
|
91
|
+
labelId: fieldLabelId
|
|
90
92
|
} = useLabelableContext();
|
|
91
|
-
const
|
|
93
|
+
const [labelId, setLabelId] = React.useState();
|
|
94
|
+
const ariaLabelledby = ariaLabelledByProp ?? resolveAriaLabelledBy(fieldLabelId, labelId);
|
|
92
95
|
const disabled = fieldDisabled || disabledProp;
|
|
93
96
|
const name = fieldName ?? nameProp;
|
|
94
97
|
|
|
@@ -179,8 +182,9 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
179
182
|
// This allows seamless integration with the most popular form libraries.
|
|
180
183
|
// https://github.com/mui/material-ui/issues/13485#issuecomment-676048492
|
|
181
184
|
// Clone the event to not override `target` of the original event.
|
|
182
|
-
|
|
183
|
-
const
|
|
185
|
+
const nativeEvent = changeDetails.event;
|
|
186
|
+
const EventConstructor = nativeEvent.constructor ?? Event;
|
|
187
|
+
const clonedEvent = new EventConstructor(nativeEvent.type, nativeEvent);
|
|
184
188
|
Object.defineProperty(clonedEvent, 'target', {
|
|
185
189
|
writable: true,
|
|
186
190
|
value: {
|
|
@@ -248,6 +252,7 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
248
252
|
indicatorPosition,
|
|
249
253
|
inset: thumbAlignment !== 'center',
|
|
250
254
|
labelId: ariaLabelledby,
|
|
255
|
+
rootLabelId: defaultLabelId,
|
|
251
256
|
largeStep,
|
|
252
257
|
lastUsedThumbIndex,
|
|
253
258
|
lastChangedValueRef,
|
|
@@ -268,6 +273,7 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
268
273
|
setActive,
|
|
269
274
|
setDragging,
|
|
270
275
|
setIndicatorPosition,
|
|
276
|
+
setLabelId,
|
|
271
277
|
setValue,
|
|
272
278
|
state,
|
|
273
279
|
step,
|
|
@@ -275,7 +281,7 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
275
281
|
thumbMap,
|
|
276
282
|
thumbRefs,
|
|
277
283
|
values
|
|
278
|
-
}), [active, controlRef, ariaLabelledby, disabled, dragging, validation, formatOptionsRef, handleInputChange, indicatorPosition, largeStep, lastUsedThumbIndex, lastChangedValueRef, lastChangeReasonRef, locale, max, min, minStepsBetweenValues, name, onValueCommitted, orientation, pressedInputRef, pressedThumbCenterOffsetRef, pressedThumbIndexRef, pressedValuesRef, registerFieldControlRef, setActive, setDragging, setIndicatorPosition, setValue, state, step, thumbCollisionBehavior, thumbAlignment, thumbMap, thumbRefs, values]);
|
|
284
|
+
}), [active, controlRef, ariaLabelledby, defaultLabelId, disabled, dragging, validation, formatOptionsRef, handleInputChange, indicatorPosition, largeStep, lastUsedThumbIndex, lastChangedValueRef, lastChangeReasonRef, locale, max, min, minStepsBetweenValues, name, onValueCommitted, orientation, pressedInputRef, pressedThumbCenterOffsetRef, pressedThumbIndexRef, pressedValuesRef, registerFieldControlRef, setActive, setDragging, setIndicatorPosition, setLabelId, setValue, state, step, thumbCollisionBehavior, thumbAlignment, thumbMap, thumbRefs, values]);
|
|
279
285
|
const element = useRenderElement('div', componentProps, {
|
|
280
286
|
state,
|
|
281
287
|
ref: [forwardedRef, sliderRef],
|
|
@@ -3,7 +3,7 @@ import type { Orientation } from "../../utils/types.js";
|
|
|
3
3
|
import type { CompositeMetadata } from "../../composite/list/CompositeList.js";
|
|
4
4
|
import type { UseFieldValidationReturnValue } from "../../field/root/useFieldValidation.js";
|
|
5
5
|
import type { ThumbMetadata } from "../thumb/SliderThumb.js";
|
|
6
|
-
import type { SliderRoot } from "./SliderRoot.js";
|
|
6
|
+
import type { SliderRoot, SliderRootState } from "./SliderRoot.js";
|
|
7
7
|
export interface SliderRootContext {
|
|
8
8
|
/**
|
|
9
9
|
* The index of the active thumb.
|
|
@@ -21,7 +21,8 @@ export interface SliderRootContext {
|
|
|
21
21
|
handleInputChange: (valueInput: number, index: number, event: React.KeyboardEvent | React.ChangeEvent) => void;
|
|
22
22
|
indicatorPosition: (number | undefined)[];
|
|
23
23
|
inset: boolean;
|
|
24
|
-
labelId?: string;
|
|
24
|
+
labelId?: string | undefined;
|
|
25
|
+
rootLabelId?: string | undefined;
|
|
25
26
|
/**
|
|
26
27
|
* The large step value of the slider when incrementing or decrementing while the shift key is held,
|
|
27
28
|
* or when using Page-Up or Page-Down keys. Snaps to multiples of this value.
|
|
@@ -34,7 +35,7 @@ export interface SliderRootContext {
|
|
|
34
35
|
* The locale used by `Intl.NumberFormat` when formatting the value.
|
|
35
36
|
* Defaults to the user's runtime locale.
|
|
36
37
|
*/
|
|
37
|
-
locale?: Intl.LocalesArgument;
|
|
38
|
+
locale?: Intl.LocalesArgument | undefined;
|
|
38
39
|
/**
|
|
39
40
|
* The maximum allowed value of the slider.
|
|
40
41
|
*/
|
|
@@ -66,11 +67,12 @@ export interface SliderRootContext {
|
|
|
66
67
|
setActive: (index: number) => void;
|
|
67
68
|
setDragging: React.Dispatch<React.SetStateAction<boolean>>;
|
|
68
69
|
setIndicatorPosition: React.Dispatch<React.SetStateAction<(number | undefined)[]>>;
|
|
70
|
+
setLabelId: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
69
71
|
/**
|
|
70
72
|
* Callback fired when dragging and invokes onValueChange.
|
|
71
73
|
*/
|
|
72
74
|
setValue: (newValue: number | number[], details?: SliderRoot.ChangeEventDetails) => void;
|
|
73
|
-
state:
|
|
75
|
+
state: SliderRootState;
|
|
74
76
|
/**
|
|
75
77
|
* The step increment of the slider when incrementing or decrementing. It will snap
|
|
76
78
|
* to multiples of this value. Decimal values are supported.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { StateAttributesMapping } from "../../utils/getStateAttributesProps.js";
|
|
2
|
-
import type {
|
|
3
|
-
export declare const sliderStateAttributesMapping: StateAttributesMapping<
|
|
2
|
+
import type { SliderRootState } from "./SliderRoot.js";
|
|
3
|
+
export declare const sliderStateAttributesMapping: StateAttributesMapping<SliderRootState>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { fieldValidityMapping } from "../../field/utils/constants.js";
|
|
1
2
|
export const sliderStateAttributesMapping = {
|
|
2
3
|
activeThumbIndex: () => null,
|
|
3
4
|
max: () => null,
|
|
4
5
|
min: () => null,
|
|
5
6
|
minStepsBetweenValues: () => null,
|
|
6
7
|
step: () => null,
|
|
7
|
-
values: () => null
|
|
8
|
+
values: () => null,
|
|
9
|
+
...fieldValidityMapping
|
|
8
10
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseUIComponentProps } from "../../utils/types.js";
|
|
3
3
|
import { type LabelableContext } from "../../labelable-provider/LabelableContext.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { SliderRootState } from "../root/SliderRoot.js";
|
|
5
5
|
/**
|
|
6
6
|
* The draggable part of the slider at the tip of the indicator.
|
|
7
7
|
* Renders a `<div>` element and a nested `<input type="range">`.
|
|
@@ -12,22 +12,22 @@ export declare const SliderThumb: React.ForwardRefExoticComponent<Omit<SliderThu
|
|
|
12
12
|
export interface ThumbMetadata {
|
|
13
13
|
inputId: LabelableContext['controlId'];
|
|
14
14
|
}
|
|
15
|
-
export interface SliderThumbState extends
|
|
16
|
-
export interface SliderThumbProps extends Omit<BaseUIComponentProps<'div',
|
|
15
|
+
export interface SliderThumbState extends SliderRootState {}
|
|
16
|
+
export interface SliderThumbProps extends Omit<BaseUIComponentProps<'div', SliderThumbState>, 'onBlur' | 'onFocus'> {
|
|
17
17
|
/**
|
|
18
18
|
* Whether the thumb should ignore user interaction.
|
|
19
19
|
* @default false
|
|
20
20
|
*/
|
|
21
|
-
disabled?: boolean;
|
|
21
|
+
disabled?: boolean | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* A function which returns a string value for the [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label) attribute of the `input`.
|
|
24
24
|
*/
|
|
25
|
-
getAriaLabel?: ((index: number) => string) | null;
|
|
25
|
+
getAriaLabel?: ((index: number) => string) | null | undefined;
|
|
26
26
|
/**
|
|
27
27
|
* A function which returns a string value for the [`aria-valuetext`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-valuetext) attribute of the `input`.
|
|
28
28
|
* This is important for screen reader users.
|
|
29
29
|
*/
|
|
30
|
-
getAriaValueText?: ((formattedValue: string, value: number, index: number) => string) | null;
|
|
30
|
+
getAriaValueText?: ((formattedValue: string, value: number, index: number) => string) | null | undefined;
|
|
31
31
|
/**
|
|
32
32
|
* The index of the thumb which corresponds to the index of its value in the
|
|
33
33
|
* `value` or `defaultValue` array.
|
|
@@ -45,19 +45,19 @@ export interface SliderThumbProps extends Omit<BaseUIComponentProps<'div', Slide
|
|
|
45
45
|
/**
|
|
46
46
|
* A ref to access the nested input element.
|
|
47
47
|
*/
|
|
48
|
-
inputRef?: React.Ref<HTMLInputElement
|
|
48
|
+
inputRef?: React.Ref<HTMLInputElement> | undefined;
|
|
49
49
|
/**
|
|
50
50
|
* A blur handler forwarded to the `input`.
|
|
51
51
|
*/
|
|
52
|
-
onBlur?: React.FocusEventHandler<HTMLInputElement
|
|
52
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
53
53
|
/**
|
|
54
54
|
* A focus handler forwarded to the `input`.
|
|
55
55
|
*/
|
|
56
|
-
onFocus?: React.FocusEventHandler<HTMLInputElement
|
|
56
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
57
57
|
/**
|
|
58
58
|
* Optional tab index attribute forwarded to the `input`.
|
|
59
59
|
*/
|
|
60
|
-
tabIndex?: number;
|
|
60
|
+
tabIndex?: number | undefined;
|
|
61
61
|
}
|
|
62
62
|
export declare namespace SliderThumb {
|
|
63
63
|
type State = SliderThumbState;
|
|
@@ -203,9 +203,10 @@ export const SliderThumb = /*#__PURE__*/React.forwardRef(function SliderThumb(co
|
|
|
203
203
|
if (orientation === 'vertical') {
|
|
204
204
|
cssWritingMode = rtl ? 'vertical-rl' : 'vertical-lr';
|
|
205
205
|
}
|
|
206
|
+
const ariaLabel = typeof getAriaLabelProp === 'function' ? getAriaLabelProp(index) : ariaLabelProp;
|
|
206
207
|
const inputProps = mergeProps({
|
|
207
|
-
'aria-label':
|
|
208
|
-
'aria-labelledby': ariaLabelledByProp ?? labelId,
|
|
208
|
+
'aria-label': ariaLabel,
|
|
209
|
+
'aria-labelledby': ariaLabelledByProp ?? (ariaLabel == null ? labelId : undefined),
|
|
209
210
|
'aria-describedby': ariaDescribedByProp,
|
|
210
211
|
'aria-orientation': orientation,
|
|
211
212
|
'aria-valuenow': thumbValue,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseUIComponentProps } from "../../utils/types.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { SliderRootState } from "../root/SliderRoot.js";
|
|
4
4
|
/**
|
|
5
5
|
* Contains the slider indicator and represents the entire range of the slider.
|
|
6
6
|
* Renders a `<div>` element.
|
|
@@ -8,7 +8,9 @@ import type { SliderRoot } from "../root/SliderRoot.js";
|
|
|
8
8
|
* Documentation: [Base UI Slider](https://base-ui.com/react/components/slider)
|
|
9
9
|
*/
|
|
10
10
|
export declare const SliderTrack: React.ForwardRefExoticComponent<Omit<SliderTrackProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export interface
|
|
11
|
+
export interface SliderTrackState extends SliderRootState {}
|
|
12
|
+
export interface SliderTrackProps extends BaseUIComponentProps<'div', SliderTrackState> {}
|
|
12
13
|
export declare namespace SliderTrack {
|
|
14
|
+
type State = SliderTrackState;
|
|
13
15
|
type Props = SliderTrackProps;
|
|
14
16
|
}
|
|
@@ -6,7 +6,7 @@ interface GetPushedThumbValuesParams {
|
|
|
6
6
|
max: number;
|
|
7
7
|
step: number;
|
|
8
8
|
minStepsBetweenValues: number;
|
|
9
|
-
initialValues?: readonly number[];
|
|
9
|
+
initialValues?: readonly number[] | undefined;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Returns a new array of slider values where attempting to move the thumb at `index`
|
|
@@ -2,8 +2,8 @@ import { SliderRootContext } from "../root/SliderRootContext.js";
|
|
|
2
2
|
export interface ResolveThumbCollisionParams {
|
|
3
3
|
behavior: SliderRootContext['thumbCollisionBehavior'];
|
|
4
4
|
values: readonly number[];
|
|
5
|
-
currentValues?: readonly number[] | null;
|
|
6
|
-
initialValues?: readonly number[] | null;
|
|
5
|
+
currentValues?: readonly number[] | null | undefined;
|
|
6
|
+
initialValues?: readonly number[] | null | undefined;
|
|
7
7
|
pressedIndex: number;
|
|
8
8
|
nextValue: number;
|
|
9
9
|
min: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { SliderRootState } from "../root/SliderRoot.js";
|
|
4
4
|
/**
|
|
5
5
|
* Displays the current value of the slider as text.
|
|
6
6
|
* Renders an `<output>` element.
|
|
@@ -8,9 +8,11 @@ import type { SliderRoot } from "../root/SliderRoot.js";
|
|
|
8
8
|
* Documentation: [Base UI Slider](https://base-ui.com/react/components/slider)
|
|
9
9
|
*/
|
|
10
10
|
export declare const SliderValue: React.ForwardRefExoticComponent<Omit<SliderValueProps, "ref"> & React.RefAttributes<HTMLOutputElement>>;
|
|
11
|
-
export interface
|
|
12
|
-
|
|
11
|
+
export interface SliderValueState extends SliderRootState {}
|
|
12
|
+
export interface SliderValueProps extends Omit<BaseUIComponentProps<'output', SliderValueState>, 'children'> {
|
|
13
|
+
children?: null | ((formattedValues: readonly string[], values: readonly number[]) => React.ReactNode) | undefined;
|
|
13
14
|
}
|
|
14
15
|
export declare namespace SliderValue {
|
|
16
|
+
type State = SliderValueState;
|
|
15
17
|
type Props = SliderValueProps;
|
|
16
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { BaseUIComponentProps, NonNativeButtonProps } from "../../utils/types.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { FieldRootState } from "../../field/root/FieldRoot.js";
|
|
4
4
|
import { REASONS } from "../../utils/reasons.js";
|
|
5
5
|
import type { BaseUIChangeEventDetails } from "../../types/index.js";
|
|
6
6
|
/**
|
|
@@ -10,7 +10,7 @@ import type { BaseUIChangeEventDetails } from "../../types/index.js";
|
|
|
10
10
|
* Documentation: [Base UI Switch](https://base-ui.com/react/components/switch)
|
|
11
11
|
*/
|
|
12
12
|
export declare const SwitchRoot: React.ForwardRefExoticComponent<Omit<SwitchRootProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
13
|
-
export interface SwitchRootState extends
|
|
13
|
+
export interface SwitchRootState extends FieldRootState {
|
|
14
14
|
/**
|
|
15
15
|
* Whether the switch is currently active.
|
|
16
16
|
*/
|
|
@@ -28,61 +28,61 @@ export interface SwitchRootState extends FieldRoot.State {
|
|
|
28
28
|
*/
|
|
29
29
|
required: boolean;
|
|
30
30
|
}
|
|
31
|
-
export interface SwitchRootProps extends NonNativeButtonProps, Omit<BaseUIComponentProps<'span',
|
|
31
|
+
export interface SwitchRootProps extends NonNativeButtonProps, Omit<BaseUIComponentProps<'span', SwitchRootState>, 'onChange'> {
|
|
32
32
|
/**
|
|
33
33
|
* The id of the switch element.
|
|
34
34
|
*/
|
|
35
|
-
id?: string;
|
|
35
|
+
id?: string | undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Whether the switch is currently active.
|
|
38
38
|
*
|
|
39
39
|
* To render an uncontrolled switch, use the `defaultChecked` prop instead.
|
|
40
40
|
*/
|
|
41
|
-
checked?: boolean;
|
|
41
|
+
checked?: boolean | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* Whether the switch is initially active.
|
|
44
44
|
*
|
|
45
45
|
* To render a controlled switch, use the `checked` prop instead.
|
|
46
46
|
* @default false
|
|
47
47
|
*/
|
|
48
|
-
defaultChecked?: boolean;
|
|
48
|
+
defaultChecked?: boolean | undefined;
|
|
49
49
|
/**
|
|
50
50
|
* Whether the component should ignore user interaction.
|
|
51
51
|
* @default false
|
|
52
52
|
*/
|
|
53
|
-
disabled?: boolean;
|
|
53
|
+
disabled?: boolean | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* A ref to access the hidden `<input>` element.
|
|
56
56
|
*/
|
|
57
|
-
inputRef?: React.Ref<HTMLInputElement
|
|
57
|
+
inputRef?: React.Ref<HTMLInputElement> | undefined;
|
|
58
58
|
/**
|
|
59
59
|
* Identifies the field when a form is submitted.
|
|
60
60
|
*/
|
|
61
|
-
name?: string;
|
|
61
|
+
name?: string | undefined;
|
|
62
62
|
/**
|
|
63
63
|
* Event handler called when the switch is activated or deactivated.
|
|
64
64
|
*/
|
|
65
|
-
onCheckedChange?: (checked: boolean, eventDetails: SwitchRoot.ChangeEventDetails) => void;
|
|
65
|
+
onCheckedChange?: ((checked: boolean, eventDetails: SwitchRoot.ChangeEventDetails) => void) | undefined;
|
|
66
66
|
/**
|
|
67
67
|
* Whether the user should be unable to activate or deactivate the switch.
|
|
68
68
|
* @default false
|
|
69
69
|
*/
|
|
70
|
-
readOnly?: boolean;
|
|
70
|
+
readOnly?: boolean | undefined;
|
|
71
71
|
/**
|
|
72
72
|
* Whether the user must activate the switch before submitting a form.
|
|
73
73
|
* @default false
|
|
74
74
|
*/
|
|
75
|
-
required?: boolean;
|
|
75
|
+
required?: boolean | undefined;
|
|
76
76
|
/**
|
|
77
77
|
* The value submitted with the form when the switch is on.
|
|
78
78
|
* By default, switch submits the "on" value, matching native checkbox behavior.
|
|
79
79
|
*/
|
|
80
|
-
value?: string;
|
|
80
|
+
value?: string | undefined;
|
|
81
81
|
/**
|
|
82
82
|
* The value submitted with the form when the switch is off.
|
|
83
83
|
* By default, unchecked switches do not submit any value, matching native checkbox behavior.
|
|
84
84
|
*/
|
|
85
|
-
uncheckedValue?: string;
|
|
85
|
+
uncheckedValue?: string | undefined;
|
|
86
86
|
}
|
|
87
87
|
export type SwitchRootChangeEventReason = typeof REASONS.none;
|
|
88
88
|
export type SwitchRootChangeEventDetails = BaseUIChangeEventDetails<SwitchRoot.ChangeEventReason>;
|
|
@@ -17,6 +17,7 @@ import { useField } from "../../field/useField.js";
|
|
|
17
17
|
import { useFieldRootContext } from "../../field/root/FieldRootContext.js";
|
|
18
18
|
import { useFormContext } from "../../form/FormContext.js";
|
|
19
19
|
import { useLabelableContext } from "../../labelable-provider/LabelableContext.js";
|
|
20
|
+
import { useAriaLabelledBy } from "../../labelable-provider/useAriaLabelledBy.js";
|
|
20
21
|
import { useLabelableId } from "../../labelable-provider/useLabelableId.js";
|
|
21
22
|
import { createChangeEventDetails } from "../../utils/createBaseUIEventDetails.js";
|
|
22
23
|
import { REASONS } from "../../utils/reasons.js";
|
|
@@ -34,6 +35,7 @@ export const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(comp
|
|
|
34
35
|
checked: checkedProp,
|
|
35
36
|
className,
|
|
36
37
|
defaultChecked,
|
|
38
|
+
'aria-labelledby': ariaLabelledByProp,
|
|
37
39
|
id: idProp,
|
|
38
40
|
inputRef: externalInputRef,
|
|
39
41
|
name: nameProp,
|
|
@@ -115,13 +117,14 @@ export const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(comp
|
|
|
115
117
|
disabled,
|
|
116
118
|
native: nativeButton
|
|
117
119
|
});
|
|
120
|
+
const ariaLabelledBy = useAriaLabelledBy(ariaLabelledByProp, labelId, inputRef, !nativeButton, hiddenInputId);
|
|
118
121
|
const rootProps = {
|
|
119
122
|
id: nativeButton ? controlId : id,
|
|
120
123
|
role: 'switch',
|
|
121
124
|
'aria-checked': checked,
|
|
122
125
|
'aria-readonly': readOnly || undefined,
|
|
123
126
|
'aria-required': required || undefined,
|
|
124
|
-
'aria-labelledby':
|
|
127
|
+
'aria-labelledby': ariaLabelledBy,
|
|
125
128
|
onFocus() {
|
|
126
129
|
if (!disabled) {
|
|
127
130
|
setFocused(true);
|
|
@@ -143,7 +146,13 @@ export const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(comp
|
|
|
143
146
|
return;
|
|
144
147
|
}
|
|
145
148
|
event.preventDefault();
|
|
146
|
-
inputRef
|
|
149
|
+
inputRef.current?.dispatchEvent(new PointerEvent('click', {
|
|
150
|
+
bubbles: true,
|
|
151
|
+
shiftKey: event.shiftKey,
|
|
152
|
+
ctrlKey: event.ctrlKey,
|
|
153
|
+
altKey: event.altKey,
|
|
154
|
+
metaKey: event.metaKey
|
|
155
|
+
}));
|
|
147
156
|
}
|
|
148
157
|
};
|
|
149
158
|
const inputProps = React.useMemo(() => mergeProps({
|