@base-ui/react 1.2.0 → 1.4.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 +279 -1
- package/accordion/header/AccordionHeader.d.ts +4 -2
- package/accordion/header/AccordionHeader.js +1 -0
- package/accordion/item/AccordionItem.d.ts +10 -4
- package/accordion/item/AccordionItem.js +1 -0
- package/accordion/item/AccordionItemContext.d.ts +2 -2
- package/accordion/item/stateAttributesMapping.d.ts +2 -2
- package/accordion/panel/AccordionPanel.d.ts +6 -3
- package/accordion/panel/AccordionPanel.js +2 -1
- package/accordion/root/AccordionRoot.d.ts +20 -11
- package/accordion/root/AccordionRoot.js +1 -0
- package/accordion/root/AccordionRootContext.d.ts +7 -7
- package/accordion/trigger/AccordionTrigger.d.ts +4 -2
- package/accordion/trigger/AccordionTrigger.js +5 -2
- package/alert-dialog/index.d.ts +9 -1
- package/alert-dialog/root/AlertDialogRoot.d.ts +3 -1
- package/alert-dialog/root/AlertDialogRoot.js +22 -20
- package/autocomplete/clear/AutocompleteClearDataAttributes.d.ts +1 -0
- package/autocomplete/clear/AutocompleteClearDataAttributes.js +12 -0
- package/autocomplete/index.d.ts +8 -4
- package/autocomplete/index.parts.d.ts +3 -2
- package/autocomplete/index.parts.js +11 -4
- package/autocomplete/input-group/AutocompleteInputGroup.d.ts +41 -0
- package/autocomplete/input-group/AutocompleteInputGroup.js +15 -0
- package/autocomplete/input-group/AutocompleteInputGroupDataAttributes.d.ts +51 -0
- package/autocomplete/input-group/AutocompleteInputGroupDataAttributes.js +58 -0
- package/autocomplete/item/AutocompleteItem.d.ts +48 -0
- package/autocomplete/item/AutocompleteItem.js +15 -0
- package/autocomplete/item/AutocompleteItemDataAttributes.d.ts +10 -0
- package/autocomplete/item/AutocompleteItemDataAttributes.js +18 -0
- package/autocomplete/root/AutocompleteRoot.d.ts +4 -4
- package/autocomplete/root/AutocompleteRoot.js +4 -1
- package/autocomplete/trigger/AutocompleteTrigger.d.ts +43 -0
- package/autocomplete/trigger/AutocompleteTrigger.js +15 -0
- package/autocomplete/trigger/AutocompleteTriggerDataAttributes.d.ts +55 -0
- package/autocomplete/trigger/AutocompleteTriggerDataAttributes.js +63 -0
- package/avatar/fallback/AvatarFallback.d.ts +3 -6
- package/avatar/fallback/AvatarFallback.js +5 -32
- package/avatar/image/AvatarImage.d.ts +6 -3
- package/avatar/image/AvatarImage.js +3 -3
- package/avatar/image/AvatarImageDataAttributes.d.ts +10 -0
- package/avatar/image/AvatarImageDataAttributes.js +18 -0
- package/avatar/image/useImageLoadingStatus.js +5 -0
- package/avatar/root/AvatarRoot.d.ts +4 -1
- package/avatar/root/AvatarRoot.js +1 -0
- package/button/Button.js +1 -0
- package/calendar/day-button/CalendarDayButton.d.ts +47 -0
- package/calendar/day-button/CalendarDayButton.js +130 -0
- package/calendar/day-button/CalendarDayButtonDataAttributes.d.ts +22 -0
- package/calendar/day-button/CalendarDayButtonDataAttributes.js +29 -0
- package/calendar/day-grid/CalendarDayGrid.d.ts +15 -0
- package/calendar/day-grid/CalendarDayGrid.js +32 -0
- package/calendar/day-grid-body/CalendarDayGridBody.d.ts +16 -0
- package/calendar/day-grid-body/CalendarDayGridBody.js +53 -0
- package/calendar/day-grid-body/SharedCalendarDayGridBodyContext.d.ts +14 -0
- package/calendar/day-grid-body/SharedCalendarDayGridBodyContext.js +21 -0
- package/calendar/day-grid-body/useSharedCalendarDayGridBody.d.ts +45 -0
- package/calendar/day-grid-body/useSharedCalendarDayGridBody.js +285 -0
- package/calendar/day-grid-cell/CalendarDayGridCell.d.ts +16 -0
- package/calendar/day-grid-cell/CalendarDayGridCell.js +46 -0
- package/calendar/day-grid-cell/SharedCalendarDayGridCellContext.d.ts +22 -0
- package/calendar/day-grid-cell/SharedCalendarDayGridCellContext.js +21 -0
- package/calendar/day-grid-cell/useSharedCalendarDayGridCell.d.ts +17 -0
- package/calendar/day-grid-cell/useSharedCalendarDayGridCell.js +40 -0
- package/calendar/day-grid-header/CalendarDayGridHeader.d.ts +15 -0
- package/calendar/day-grid-header/CalendarDayGridHeader.js +32 -0
- package/calendar/day-grid-header-cell/CalendarDayGridHeaderCell.d.ts +25 -0
- package/calendar/day-grid-header-cell/CalendarDayGridHeaderCell.js +41 -0
- package/calendar/day-grid-header-row/CalendarDayGridHeaderRow.d.ts +22 -0
- package/calendar/day-grid-header-row/CalendarDayGridHeaderRow.js +47 -0
- package/calendar/day-grid-row/CalendarDayGridRow.d.ts +26 -0
- package/calendar/day-grid-row/CalendarDayGridRow.js +46 -0
- package/calendar/decrement-month/CalendarDecrementMonth.d.ts +20 -0
- package/calendar/decrement-month/CalendarDecrementMonth.js +80 -0
- package/calendar/decrement-month/CalendarDecrementMonthDataAttributes.d.ts +6 -0
- package/calendar/decrement-month/CalendarDecrementMonthDataAttributes.js +13 -0
- package/calendar/increment-month/CalendarIncrementMonth.d.ts +20 -0
- package/calendar/increment-month/CalendarIncrementMonth.js +79 -0
- package/calendar/increment-month/CalendarIncrementMonthDataAttributes.d.ts +6 -0
- package/calendar/increment-month/CalendarIncrementMonthDataAttributes.js +13 -0
- package/calendar/index.d.ts +14 -0
- package/calendar/index.js +9 -0
- package/calendar/index.parts.d.ts +15 -0
- package/calendar/index.parts.js +110 -0
- package/calendar/root/CalendarRoot.d.ts +36 -0
- package/calendar/root/CalendarRoot.js +147 -0
- package/calendar/root/CalendarRootDataAttributes.d.ts +23 -0
- package/calendar/root/CalendarRootDataAttributes.js +30 -0
- package/calendar/root/SharedCalendarRootContext.d.ts +5 -0
- package/calendar/root/SharedCalendarRootContext.js +21 -0
- package/calendar/store/SharedCalendarState.d.ts +78 -0
- package/calendar/store/SharedCalendarState.js +5 -0
- package/calendar/store/SharedCalendarStore.d.ts +144 -0
- package/calendar/store/SharedCalendarStore.js +144 -0
- package/calendar/store/index.d.ts +3 -0
- package/calendar/store/index.js +38 -0
- package/calendar/store/selectors.d.ts +104 -0
- package/calendar/store/selectors.js +198 -0
- package/calendar/use-context/CalendarContext.d.ts +6 -0
- package/calendar/use-context/CalendarContext.js +20 -0
- package/calendar/use-day-list/getDayList.d.ts +9 -0
- package/calendar/use-day-list/getDayList.js +40 -0
- package/calendar/use-day-list/useCalendarDayList.d.ts +12 -0
- package/calendar/use-day-list/useCalendarDayList.js +14 -0
- package/calendar/use-week-list/getWeekList.d.ts +9 -0
- package/calendar/use-week-list/getWeekList.js +40 -0
- package/calendar/use-week-list/useCalendarWeekList.d.ts +17 -0
- package/calendar/use-week-list/useCalendarWeekList.js +14 -0
- package/calendar/utils/computeMonthDayGrid.d.ts +6 -0
- package/calendar/utils/computeMonthDayGrid.js +22 -0
- package/calendar/utils/useCalendarMonthButton.d.ts +31 -0
- package/calendar/utils/useCalendarMonthButton.js +53 -0
- package/calendar/viewport/CalendarViewport.d.ts +30 -0
- package/calendar/viewport/CalendarViewport.js +171 -0
- package/calendar/viewport/CalendarViewportDataAttributes.d.ts +23 -0
- package/calendar/viewport/CalendarViewportDataAttributes.js +31 -0
- package/checkbox/indicator/CheckboxIndicator.d.ts +6 -3
- package/checkbox/indicator/CheckboxIndicator.js +1 -0
- package/checkbox/root/CheckboxRoot.d.ts +8 -3
- package/checkbox/root/CheckboxRoot.js +19 -11
- package/checkbox/root/CheckboxRootContext.d.ts +4 -4
- package/checkbox/utils/useStateAttributesMapping.d.ts +2 -2
- package/checkbox-group/CheckboxGroup.d.ts +3 -3
- package/checkbox-group/CheckboxGroup.js +13 -10
- package/checkbox-group/CheckboxGroupContext.d.ts +2 -2
- package/checkbox-group/useCheckboxGroupParent.d.ts +2 -5
- package/collapsible/panel/CollapsiblePanel.d.ts +7 -4
- package/collapsible/panel/CollapsiblePanel.js +2 -1
- package/collapsible/panel/useCollapsiblePanel.d.ts +6 -7
- package/collapsible/panel/useCollapsiblePanel.js +2 -4
- package/collapsible/root/CollapsibleRoot.d.ts +3 -3
- package/collapsible/root/CollapsibleRoot.js +1 -0
- package/collapsible/root/CollapsibleRootContext.d.ts +4 -4
- package/collapsible/root/stateAttributesMapping.d.ts +2 -2
- package/collapsible/root/useCollapsibleRoot.d.ts +6 -7
- package/collapsible/root/useCollapsibleRoot.js +5 -4
- package/collapsible/trigger/CollapsibleTrigger.d.ts +4 -2
- package/collapsible/trigger/CollapsibleTrigger.js +1 -0
- package/combobox/arrow/ComboboxArrow.d.ts +12 -1
- package/combobox/arrow/ComboboxArrow.js +3 -0
- package/combobox/backdrop/ComboboxBackdrop.d.ts +6 -1
- package/combobox/backdrop/ComboboxBackdrop.js +3 -0
- package/combobox/chip/ComboboxChip.d.ts +3 -1
- package/combobox/chip/ComboboxChip.js +4 -11
- package/combobox/chip-remove/ComboboxChipRemove.d.ts +3 -1
- package/combobox/chip-remove/ComboboxChipRemove.js +6 -0
- package/combobox/chips/ComboboxChips.d.ts +4 -2
- package/combobox/chips/ComboboxChips.js +9 -1
- package/combobox/clear/ComboboxClear.d.ts +6 -1
- package/combobox/clear/ComboboxClear.js +3 -0
- package/combobox/collection/ComboboxCollection.d.ts +4 -0
- package/combobox/collection/ComboboxCollection.js +2 -0
- package/combobox/empty/ComboboxEmpty.d.ts +7 -1
- package/combobox/empty/ComboboxEmpty.js +10 -1
- package/combobox/group/ComboboxGroup.d.ts +3 -1
- package/combobox/group/ComboboxGroup.js +3 -0
- package/combobox/group-label/ComboboxGroupLabel.d.ts +3 -1
- package/combobox/group-label/ComboboxGroupLabel.js +3 -0
- package/combobox/icon/ComboboxIcon.d.ts +3 -1
- package/combobox/icon/ComboboxIcon.js +3 -0
- package/combobox/index.d.ts +2 -0
- package/combobox/index.parts.d.ts +2 -0
- package/combobox/index.parts.js +14 -0
- package/combobox/input/ComboboxInput.d.ts +5 -3
- package/combobox/input/ComboboxInput.js +33 -9
- package/combobox/input-group/ComboboxInputGroup.d.ts +42 -0
- package/combobox/input-group/ComboboxInputGroup.js +77 -0
- package/combobox/input-group/ComboboxInputGroupDataAttributes.d.ts +55 -0
- package/combobox/input-group/ComboboxInputGroupDataAttributes.js +62 -0
- package/combobox/item/ComboboxItem.d.ts +3 -1
- package/combobox/item/ComboboxItem.js +10 -1
- package/combobox/item-indicator/ComboboxItemIndicator.d.ts +9 -1
- package/combobox/item-indicator/ComboboxItemIndicator.js +3 -0
- 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 +69 -0
- package/combobox/list/ComboboxList.d.ts +3 -1
- package/combobox/list/ComboboxList.js +8 -9
- package/combobox/popup/ComboboxPopup.d.ts +23 -3
- package/combobox/popup/ComboboxPopup.js +13 -2
- package/combobox/portal/ComboboxPortal.d.ts +5 -4
- package/combobox/portal/ComboboxPortal.js +2 -0
- package/combobox/positioner/ComboboxPositioner.d.ts +16 -2
- package/combobox/positioner/ComboboxPositioner.js +18 -35
- package/combobox/positioner/ComboboxPositionerContext.d.ts +2 -10
- package/combobox/root/AriaCombobox.d.ts +14 -8
- package/combobox/root/AriaCombobox.js +47 -26
- package/combobox/root/ComboboxRoot.d.ts +4 -4
- package/combobox/root/utils/useFilter.d.ts +9 -0
- package/combobox/row/ComboboxRow.d.ts +3 -1
- package/combobox/row/ComboboxRow.js +3 -0
- package/combobox/status/ComboboxStatus.d.ts +7 -1
- package/combobox/status/ComboboxStatus.js +12 -1
- package/combobox/store.d.ts +12 -18
- package/combobox/store.js +3 -14
- package/combobox/trigger/ComboboxTrigger.d.ts +5 -3
- package/combobox/trigger/ComboboxTrigger.js +9 -3
- package/combobox/utils/ComboboxInternalDismissButton.d.ts +5 -0
- package/combobox/utils/ComboboxInternalDismissButton.js +44 -0
- package/combobox/utils/handleInputPress.d.ts +5 -0
- package/combobox/utils/handleInputPress.js +28 -0
- package/combobox/utils/useInitialLiveRegionTextMutation.d.ts +3 -0
- package/combobox/utils/useInitialLiveRegionTextMutation.js +61 -0
- package/composite/composite.d.ts +2 -0
- package/composite/composite.js +3 -1
- package/composite/item/CompositeItem.d.ts +4 -2
- package/composite/item/CompositeItem.js +1 -0
- package/composite/list/CompositeList.d.ts +3 -1
- package/composite/list/useCompositeListItem.d.ts +1 -1
- package/composite/root/CompositeRoot.d.ts +8 -4
- package/composite/root/CompositeRoot.js +3 -0
- package/composite/root/useCompositeRoot.d.ts +2 -1
- package/composite/root/useCompositeRoot.js +30 -15
- package/context-menu/index.d.ts +1 -1
- package/context-menu/root/ContextMenuRoot.d.ts +3 -1
- package/context-menu/root/ContextMenuRoot.js +1 -1
- package/context-menu/trigger/ContextMenuTrigger.d.ts +3 -3
- package/context-menu/trigger/ContextMenuTrigger.js +4 -5
- package/dialog/backdrop/DialogBackdrop.d.ts +4 -1
- package/dialog/backdrop/DialogBackdrop.js +1 -0
- package/dialog/close/DialogClose.d.ts +1 -1
- package/dialog/close/DialogClose.js +1 -0
- package/dialog/description/DialogDescription.d.ts +1 -1
- package/dialog/description/DialogDescription.js +1 -0
- package/dialog/popup/DialogPopup.d.ts +6 -3
- package/dialog/popup/DialogPopup.js +1 -0
- package/dialog/portal/DialogPortal.d.ts +4 -5
- package/dialog/root/DialogRoot.d.ts +11 -5
- package/dialog/root/DialogRoot.js +24 -18
- package/dialog/root/useDialogRoot.d.ts +4 -7
- package/dialog/root/useDialogRoot.js +15 -14
- package/dialog/store/DialogStore.d.ts +4 -1
- package/dialog/store/DialogStore.js +11 -7
- package/dialog/title/DialogTitle.d.ts +1 -1
- package/dialog/title/DialogTitle.js +1 -0
- package/dialog/trigger/DialogTrigger.d.ts +1 -1
- package/dialog/trigger/DialogTrigger.js +1 -0
- package/dialog/viewport/DialogViewport.d.ts +3 -0
- package/dialog/viewport/DialogViewport.js +1 -0
- package/direction-provider/DirectionProvider.d.ts +2 -0
- package/drawer/backdrop/DrawerBackdrop.d.ts +4 -1
- package/drawer/backdrop/DrawerBackdrop.js +1 -0
- package/drawer/backdrop/DrawerBackdropDataAttributes.d.ts +18 -0
- package/drawer/backdrop/DrawerBackdropDataAttributes.js +26 -0
- package/drawer/close/DrawerClose.d.ts +1 -1
- package/drawer/content/DrawerContent.d.ts +1 -1
- package/drawer/content/DrawerContent.js +3 -1
- package/drawer/content/DrawerContentDataAttributes.d.ts +1 -0
- package/drawer/content/DrawerContentDataAttributes.js +7 -0
- package/drawer/description/DrawerDescription.d.ts +1 -1
- package/drawer/indent/DrawerIndent.d.ts +3 -2
- package/drawer/indent/DrawerIndent.js +3 -1
- package/drawer/indent-background/DrawerIndentBackground.d.ts +5 -3
- package/drawer/indent-background/DrawerIndentBackground.js +5 -2
- package/drawer/index.d.ts +2 -1
- package/drawer/index.js +3 -3
- package/drawer/index.parts.d.ts +1 -0
- package/drawer/index.parts.js +7 -0
- package/drawer/popup/DrawerPopup.d.ts +6 -3
- package/drawer/popup/DrawerPopup.js +76 -5
- package/drawer/popup/DrawerPopupDataAttributes.d.ts +16 -0
- package/drawer/popup/DrawerPopupDataAttributes.js +18 -1
- package/drawer/portal/DrawerPortal.d.ts +2 -2
- package/drawer/provider/DrawerProvider.d.ts +2 -2
- package/drawer/provider/DrawerProvider.js +2 -2
- package/drawer/root/DrawerRoot.d.ts +6 -4
- package/drawer/root/DrawerRoot.js +25 -16
- package/drawer/root/DrawerRootContext.d.ts +4 -4
- package/drawer/swipe-area/DrawerSwipeArea.d.ts +1 -1
- package/drawer/swipe-area/DrawerSwipeArea.js +29 -22
- package/drawer/swipe-area/DrawerSwipeAreaDataAttributes.d.ts +23 -0
- package/drawer/swipe-area/DrawerSwipeAreaDataAttributes.js +31 -0
- package/drawer/title/DrawerTitle.d.ts +1 -1
- package/drawer/trigger/DrawerTrigger.d.ts +1 -1
- package/drawer/viewport/DrawerViewport.d.ts +4 -1
- package/drawer/viewport/DrawerViewport.js +194 -60
- 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/header/AccordionHeader.js +1 -0
- package/esm/accordion/item/AccordionItem.d.ts +10 -4
- package/esm/accordion/item/AccordionItem.js +1 -0
- package/esm/accordion/item/AccordionItemContext.d.ts +2 -2
- package/esm/accordion/item/stateAttributesMapping.d.ts +2 -2
- package/esm/accordion/panel/AccordionPanel.d.ts +6 -3
- package/esm/accordion/panel/AccordionPanel.js +2 -1
- package/esm/accordion/root/AccordionRoot.d.ts +20 -11
- package/esm/accordion/root/AccordionRoot.js +1 -0
- package/esm/accordion/root/AccordionRootContext.d.ts +7 -7
- package/esm/accordion/trigger/AccordionTrigger.d.ts +4 -2
- package/esm/accordion/trigger/AccordionTrigger.js +5 -2
- package/esm/alert-dialog/index.d.ts +9 -1
- package/esm/alert-dialog/root/AlertDialogRoot.d.ts +3 -1
- package/esm/alert-dialog/root/AlertDialogRoot.js +22 -20
- package/esm/autocomplete/clear/AutocompleteClearDataAttributes.d.ts +1 -0
- package/esm/autocomplete/clear/AutocompleteClearDataAttributes.js +1 -0
- package/esm/autocomplete/index.d.ts +8 -4
- package/esm/autocomplete/index.parts.d.ts +3 -2
- package/esm/autocomplete/index.parts.js +3 -2
- package/esm/autocomplete/input-group/AutocompleteInputGroup.d.ts +41 -0
- package/esm/autocomplete/input-group/AutocompleteInputGroup.js +10 -0
- package/esm/autocomplete/input-group/AutocompleteInputGroupDataAttributes.d.ts +51 -0
- package/esm/autocomplete/input-group/AutocompleteInputGroupDataAttributes.js +52 -0
- package/esm/autocomplete/item/AutocompleteItem.d.ts +48 -0
- package/esm/autocomplete/item/AutocompleteItem.js +10 -0
- package/esm/autocomplete/item/AutocompleteItemDataAttributes.d.ts +10 -0
- package/esm/autocomplete/item/AutocompleteItemDataAttributes.js +12 -0
- package/esm/autocomplete/root/AutocompleteRoot.d.ts +4 -4
- package/esm/autocomplete/root/AutocompleteRoot.js +4 -1
- package/esm/autocomplete/trigger/AutocompleteTrigger.d.ts +43 -0
- package/esm/autocomplete/trigger/AutocompleteTrigger.js +10 -0
- package/esm/autocomplete/trigger/AutocompleteTriggerDataAttributes.d.ts +55 -0
- package/esm/autocomplete/trigger/AutocompleteTriggerDataAttributes.js +57 -0
- package/esm/avatar/fallback/AvatarFallback.d.ts +3 -6
- package/esm/avatar/fallback/AvatarFallback.js +5 -31
- package/esm/avatar/image/AvatarImage.d.ts +6 -3
- package/esm/avatar/image/AvatarImage.js +3 -3
- package/esm/avatar/image/AvatarImageDataAttributes.d.ts +10 -0
- package/esm/avatar/image/AvatarImageDataAttributes.js +12 -0
- package/esm/avatar/image/useImageLoadingStatus.js +5 -0
- package/esm/avatar/root/AvatarRoot.d.ts +4 -1
- package/esm/avatar/root/AvatarRoot.js +1 -0
- package/esm/button/Button.js +1 -0
- package/esm/calendar/day-button/CalendarDayButton.d.ts +47 -0
- package/esm/calendar/day-button/CalendarDayButton.js +124 -0
- package/esm/calendar/day-button/CalendarDayButtonDataAttributes.d.ts +22 -0
- package/esm/calendar/day-button/CalendarDayButtonDataAttributes.js +23 -0
- package/esm/calendar/day-grid/CalendarDayGrid.d.ts +15 -0
- package/esm/calendar/day-grid/CalendarDayGrid.js +27 -0
- package/esm/calendar/day-grid-body/CalendarDayGridBody.d.ts +16 -0
- package/esm/calendar/day-grid-body/CalendarDayGridBody.js +48 -0
- package/esm/calendar/day-grid-body/SharedCalendarDayGridBodyContext.d.ts +14 -0
- package/esm/calendar/day-grid-body/SharedCalendarDayGridBodyContext.js +13 -0
- package/esm/calendar/day-grid-body/useSharedCalendarDayGridBody.d.ts +45 -0
- package/esm/calendar/day-grid-body/useSharedCalendarDayGridBody.js +279 -0
- package/esm/calendar/day-grid-cell/CalendarDayGridCell.d.ts +16 -0
- package/esm/calendar/day-grid-cell/CalendarDayGridCell.js +40 -0
- package/esm/calendar/day-grid-cell/SharedCalendarDayGridCellContext.d.ts +22 -0
- package/esm/calendar/day-grid-cell/SharedCalendarDayGridCellContext.js +13 -0
- package/esm/calendar/day-grid-cell/useSharedCalendarDayGridCell.d.ts +17 -0
- package/esm/calendar/day-grid-cell/useSharedCalendarDayGridCell.js +33 -0
- package/esm/calendar/day-grid-header/CalendarDayGridHeader.d.ts +15 -0
- package/esm/calendar/day-grid-header/CalendarDayGridHeader.js +27 -0
- package/esm/calendar/day-grid-header-cell/CalendarDayGridHeaderCell.d.ts +25 -0
- package/esm/calendar/day-grid-header-cell/CalendarDayGridHeaderCell.js +35 -0
- package/esm/calendar/day-grid-header-row/CalendarDayGridHeaderRow.d.ts +22 -0
- package/esm/calendar/day-grid-header-row/CalendarDayGridHeaderRow.js +42 -0
- package/esm/calendar/day-grid-row/CalendarDayGridRow.d.ts +26 -0
- package/esm/calendar/day-grid-row/CalendarDayGridRow.js +41 -0
- package/esm/calendar/decrement-month/CalendarDecrementMonth.d.ts +20 -0
- package/esm/calendar/decrement-month/CalendarDecrementMonth.js +75 -0
- package/esm/calendar/decrement-month/CalendarDecrementMonthDataAttributes.d.ts +6 -0
- package/esm/calendar/decrement-month/CalendarDecrementMonthDataAttributes.js +7 -0
- package/esm/calendar/increment-month/CalendarIncrementMonth.d.ts +20 -0
- package/esm/calendar/increment-month/CalendarIncrementMonth.js +74 -0
- package/esm/calendar/increment-month/CalendarIncrementMonthDataAttributes.d.ts +6 -0
- package/esm/calendar/increment-month/CalendarIncrementMonthDataAttributes.js +7 -0
- package/esm/calendar/index.d.ts +14 -0
- package/esm/calendar/index.js +1 -0
- package/esm/calendar/index.parts.d.ts +15 -0
- package/esm/calendar/index.parts.js +21 -0
- package/esm/calendar/root/CalendarRoot.d.ts +36 -0
- package/esm/calendar/root/CalendarRoot.js +141 -0
- package/esm/calendar/root/CalendarRootDataAttributes.d.ts +23 -0
- package/esm/calendar/root/CalendarRootDataAttributes.js +24 -0
- package/esm/calendar/root/SharedCalendarRootContext.d.ts +5 -0
- package/esm/calendar/root/SharedCalendarRootContext.js +13 -0
- package/esm/calendar/store/SharedCalendarState.d.ts +78 -0
- package/esm/calendar/store/SharedCalendarState.js +1 -0
- package/esm/calendar/store/SharedCalendarStore.d.ts +144 -0
- package/esm/calendar/store/SharedCalendarStore.js +137 -0
- package/esm/calendar/store/index.d.ts +3 -0
- package/esm/calendar/store/index.js +3 -0
- package/esm/calendar/store/selectors.d.ts +104 -0
- package/esm/calendar/store/selectors.js +192 -0
- package/esm/calendar/use-context/CalendarContext.d.ts +6 -0
- package/esm/calendar/use-context/CalendarContext.js +14 -0
- package/esm/calendar/use-day-list/getDayList.d.ts +9 -0
- package/esm/calendar/use-day-list/getDayList.js +34 -0
- package/esm/calendar/use-day-list/useCalendarDayList.d.ts +12 -0
- package/esm/calendar/use-day-list/useCalendarDayList.js +7 -0
- package/esm/calendar/use-week-list/getWeekList.d.ts +9 -0
- package/esm/calendar/use-week-list/getWeekList.js +34 -0
- package/esm/calendar/use-week-list/useCalendarWeekList.d.ts +17 -0
- package/esm/calendar/use-week-list/useCalendarWeekList.js +7 -0
- package/esm/calendar/utils/computeMonthDayGrid.d.ts +6 -0
- package/esm/calendar/utils/computeMonthDayGrid.js +17 -0
- package/esm/calendar/utils/useCalendarMonthButton.d.ts +31 -0
- package/esm/calendar/utils/useCalendarMonthButton.js +47 -0
- package/esm/calendar/viewport/CalendarViewport.d.ts +30 -0
- package/esm/calendar/viewport/CalendarViewport.js +165 -0
- package/esm/calendar/viewport/CalendarViewportDataAttributes.d.ts +23 -0
- package/esm/calendar/viewport/CalendarViewportDataAttributes.js +25 -0
- package/esm/checkbox/indicator/CheckboxIndicator.d.ts +6 -3
- package/esm/checkbox/indicator/CheckboxIndicator.js +1 -0
- package/esm/checkbox/root/CheckboxRoot.d.ts +8 -3
- package/esm/checkbox/root/CheckboxRoot.js +19 -11
- 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 +3 -3
- package/esm/checkbox-group/CheckboxGroup.js +13 -10
- package/esm/checkbox-group/CheckboxGroupContext.d.ts +2 -2
- package/esm/checkbox-group/useCheckboxGroupParent.d.ts +2 -5
- package/esm/collapsible/panel/CollapsiblePanel.d.ts +7 -4
- package/esm/collapsible/panel/CollapsiblePanel.js +2 -1
- package/esm/collapsible/panel/useCollapsiblePanel.d.ts +6 -7
- package/esm/collapsible/panel/useCollapsiblePanel.js +2 -4
- package/esm/collapsible/root/CollapsibleRoot.d.ts +3 -3
- package/esm/collapsible/root/CollapsibleRoot.js +1 -0
- 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 +6 -7
- package/esm/collapsible/root/useCollapsibleRoot.js +5 -4
- package/esm/collapsible/trigger/CollapsibleTrigger.d.ts +4 -2
- package/esm/collapsible/trigger/CollapsibleTrigger.js +1 -0
- package/esm/combobox/arrow/ComboboxArrow.d.ts +12 -1
- package/esm/combobox/arrow/ComboboxArrow.js +3 -0
- package/esm/combobox/backdrop/ComboboxBackdrop.d.ts +6 -1
- package/esm/combobox/backdrop/ComboboxBackdrop.js +3 -0
- package/esm/combobox/chip/ComboboxChip.d.ts +3 -1
- package/esm/combobox/chip/ComboboxChip.js +4 -11
- package/esm/combobox/chip-remove/ComboboxChipRemove.d.ts +3 -1
- package/esm/combobox/chip-remove/ComboboxChipRemove.js +6 -0
- package/esm/combobox/chips/ComboboxChips.d.ts +4 -2
- package/esm/combobox/chips/ComboboxChips.js +9 -1
- package/esm/combobox/clear/ComboboxClear.d.ts +6 -1
- package/esm/combobox/clear/ComboboxClear.js +3 -0
- package/esm/combobox/collection/ComboboxCollection.d.ts +4 -0
- package/esm/combobox/collection/ComboboxCollection.js +2 -0
- package/esm/combobox/empty/ComboboxEmpty.d.ts +7 -1
- package/esm/combobox/empty/ComboboxEmpty.js +10 -1
- package/esm/combobox/group/ComboboxGroup.d.ts +3 -1
- package/esm/combobox/group/ComboboxGroup.js +3 -0
- package/esm/combobox/group-label/ComboboxGroupLabel.d.ts +3 -1
- package/esm/combobox/group-label/ComboboxGroupLabel.js +3 -0
- package/esm/combobox/icon/ComboboxIcon.d.ts +3 -1
- package/esm/combobox/icon/ComboboxIcon.js +3 -0
- package/esm/combobox/index.d.ts +2 -0
- package/esm/combobox/index.parts.d.ts +2 -0
- package/esm/combobox/index.parts.js +2 -0
- package/esm/combobox/input/ComboboxInput.d.ts +5 -3
- package/esm/combobox/input/ComboboxInput.js +33 -9
- package/esm/combobox/input-group/ComboboxInputGroup.d.ts +42 -0
- package/esm/combobox/input-group/ComboboxInputGroup.js +72 -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 +3 -1
- package/esm/combobox/item/ComboboxItem.js +10 -1
- package/esm/combobox/item-indicator/ComboboxItemIndicator.d.ts +9 -1
- package/esm/combobox/item-indicator/ComboboxItemIndicator.js +3 -0
- 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 +64 -0
- package/esm/combobox/list/ComboboxList.d.ts +3 -1
- package/esm/combobox/list/ComboboxList.js +8 -9
- package/esm/combobox/popup/ComboboxPopup.d.ts +23 -3
- package/esm/combobox/popup/ComboboxPopup.js +14 -3
- package/esm/combobox/portal/ComboboxPortal.d.ts +5 -4
- package/esm/combobox/portal/ComboboxPortal.js +2 -0
- package/esm/combobox/positioner/ComboboxPositioner.d.ts +16 -2
- package/esm/combobox/positioner/ComboboxPositioner.js +18 -35
- package/esm/combobox/positioner/ComboboxPositionerContext.d.ts +2 -10
- package/esm/combobox/root/AriaCombobox.d.ts +14 -8
- package/esm/combobox/root/AriaCombobox.js +47 -26
- package/esm/combobox/root/ComboboxRoot.d.ts +4 -4
- package/esm/combobox/root/utils/useFilter.d.ts +9 -0
- package/esm/combobox/row/ComboboxRow.d.ts +3 -1
- package/esm/combobox/row/ComboboxRow.js +3 -0
- package/esm/combobox/status/ComboboxStatus.d.ts +7 -1
- package/esm/combobox/status/ComboboxStatus.js +12 -1
- package/esm/combobox/store.d.ts +12 -18
- package/esm/combobox/store.js +3 -14
- package/esm/combobox/trigger/ComboboxTrigger.d.ts +5 -3
- package/esm/combobox/trigger/ComboboxTrigger.js +9 -3
- package/esm/combobox/utils/ComboboxInternalDismissButton.d.ts +5 -0
- package/esm/combobox/utils/ComboboxInternalDismissButton.js +38 -0
- package/esm/combobox/utils/handleInputPress.d.ts +5 -0
- package/esm/combobox/utils/handleInputPress.js +22 -0
- package/esm/combobox/utils/useInitialLiveRegionTextMutation.d.ts +3 -0
- package/esm/combobox/utils/useInitialLiveRegionTextMutation.js +55 -0
- package/esm/composite/composite.d.ts +2 -0
- package/esm/composite/composite.js +2 -0
- package/esm/composite/item/CompositeItem.d.ts +4 -2
- package/esm/composite/item/CompositeItem.js +1 -0
- package/esm/composite/list/CompositeList.d.ts +3 -1
- package/esm/composite/list/useCompositeListItem.d.ts +1 -1
- package/esm/composite/root/CompositeRoot.d.ts +8 -4
- package/esm/composite/root/CompositeRoot.js +3 -0
- package/esm/composite/root/useCompositeRoot.d.ts +2 -1
- package/esm/composite/root/useCompositeRoot.js +30 -15
- package/esm/context-menu/index.d.ts +1 -1
- package/esm/context-menu/root/ContextMenuRoot.d.ts +3 -1
- package/esm/context-menu/root/ContextMenuRoot.js +1 -1
- package/esm/context-menu/trigger/ContextMenuTrigger.d.ts +3 -3
- package/esm/context-menu/trigger/ContextMenuTrigger.js +4 -5
- package/esm/dialog/backdrop/DialogBackdrop.d.ts +4 -1
- package/esm/dialog/backdrop/DialogBackdrop.js +1 -0
- package/esm/dialog/close/DialogClose.d.ts +1 -1
- package/esm/dialog/close/DialogClose.js +1 -0
- package/esm/dialog/description/DialogDescription.d.ts +1 -1
- package/esm/dialog/description/DialogDescription.js +1 -0
- package/esm/dialog/popup/DialogPopup.d.ts +6 -3
- package/esm/dialog/popup/DialogPopup.js +1 -0
- package/esm/dialog/portal/DialogPortal.d.ts +4 -5
- package/esm/dialog/root/DialogRoot.d.ts +11 -5
- package/esm/dialog/root/DialogRoot.js +23 -18
- package/esm/dialog/root/useDialogRoot.d.ts +4 -7
- package/esm/dialog/root/useDialogRoot.js +15 -14
- package/esm/dialog/store/DialogStore.d.ts +4 -1
- package/esm/dialog/store/DialogStore.js +11 -7
- package/esm/dialog/title/DialogTitle.d.ts +1 -1
- package/esm/dialog/title/DialogTitle.js +1 -0
- package/esm/dialog/trigger/DialogTrigger.d.ts +1 -1
- package/esm/dialog/trigger/DialogTrigger.js +1 -0
- package/esm/dialog/viewport/DialogViewport.d.ts +3 -0
- package/esm/dialog/viewport/DialogViewport.js +1 -0
- package/esm/direction-provider/DirectionProvider.d.ts +2 -0
- package/esm/drawer/backdrop/DrawerBackdrop.d.ts +4 -1
- package/esm/drawer/backdrop/DrawerBackdrop.js +1 -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 +1 -1
- package/esm/drawer/content/DrawerContent.d.ts +1 -1
- package/esm/drawer/content/DrawerContent.js +3 -1
- package/esm/drawer/content/DrawerContentDataAttributes.d.ts +1 -0
- package/esm/drawer/content/DrawerContentDataAttributes.js +1 -0
- package/esm/drawer/description/DrawerDescription.d.ts +1 -1
- package/esm/drawer/indent/DrawerIndent.d.ts +3 -2
- package/esm/drawer/indent/DrawerIndent.js +3 -1
- package/esm/drawer/indent-background/DrawerIndentBackground.d.ts +5 -3
- package/esm/drawer/indent-background/DrawerIndentBackground.js +5 -2
- package/esm/drawer/index.d.ts +2 -1
- package/esm/drawer/index.js +1 -1
- package/esm/drawer/index.parts.d.ts +1 -0
- package/esm/drawer/index.parts.js +1 -0
- package/esm/drawer/popup/DrawerPopup.d.ts +6 -3
- package/esm/drawer/popup/DrawerPopup.js +76 -5
- package/esm/drawer/popup/DrawerPopupDataAttributes.d.ts +16 -0
- package/esm/drawer/popup/DrawerPopupDataAttributes.js +18 -1
- package/esm/drawer/portal/DrawerPortal.d.ts +2 -2
- package/esm/drawer/provider/DrawerProvider.d.ts +2 -2
- package/esm/drawer/provider/DrawerProvider.js +2 -2
- package/esm/drawer/root/DrawerRoot.d.ts +6 -4
- package/esm/drawer/root/DrawerRoot.js +25 -16
- package/esm/drawer/root/DrawerRootContext.d.ts +4 -4
- package/esm/drawer/swipe-area/DrawerSwipeArea.d.ts +1 -1
- package/esm/drawer/swipe-area/DrawerSwipeArea.js +29 -22
- 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 +1 -1
- package/esm/drawer/trigger/DrawerTrigger.d.ts +1 -1
- package/esm/drawer/viewport/DrawerViewport.d.ts +4 -1
- package/esm/drawer/viewport/DrawerViewport.js +195 -61
- package/esm/drawer/viewport/DrawerViewportDataAttributes.d.ts +22 -0
- package/esm/drawer/viewport/DrawerViewportDataAttributes.js +24 -0
- package/esm/field/control/FieldControl.d.ts +3 -3
- package/esm/field/control/FieldControl.js +6 -6
- package/esm/field/description/FieldDescription.d.ts +3 -3
- package/esm/field/description/FieldDescription.js +1 -0
- package/esm/field/error/FieldError.d.ts +8 -5
- package/esm/field/error/FieldError.js +8 -5
- package/esm/field/error/FieldErrorDataAttributes.d.ts +8 -0
- package/esm/field/error/FieldErrorDataAttributes.js +10 -1
- package/esm/field/item/FieldItem.d.ts +4 -3
- package/esm/field/item/FieldItem.js +3 -2
- package/esm/field/label/FieldLabel.d.ts +4 -4
- package/esm/field/label/FieldLabel.js +7 -51
- package/esm/field/root/FieldRoot.d.ts +19 -2
- package/esm/field/root/FieldRoot.js +14 -2
- package/esm/field/root/FieldRootContext.d.ts +4 -2
- package/esm/field/root/FieldRootContext.js +7 -13
- package/esm/field/root/useFieldControlRegistration.d.ts +17 -0
- package/esm/field/root/useFieldControlRegistration.js +125 -0
- package/esm/field/root/useFieldValidation.js +5 -4
- package/esm/field/root/useRegisterFieldControl.d.ts +5 -0
- package/esm/field/root/useRegisterFieldControl.js +35 -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 +8 -2
- package/esm/field/validity/FieldValidity.js +1 -1
- package/esm/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/esm/fieldset/legend/FieldsetLegend.js +1 -0
- package/esm/fieldset/root/FieldsetRoot.d.ts +1 -1
- package/esm/fieldset/root/FieldsetRoot.js +1 -0
- package/esm/floating-ui-react/components/FloatingDelayGroup.js +1 -1
- package/esm/floating-ui-react/components/FloatingFocusManager.d.ts +12 -7
- package/esm/floating-ui-react/components/FloatingFocusManager.js +77 -105
- package/esm/floating-ui-react/components/FloatingPortal.d.ts +6 -4
- package/esm/floating-ui-react/components/FloatingPortal.js +17 -11
- package/esm/floating-ui-react/components/FloatingRootStore.d.ts +18 -2
- package/esm/floating-ui-react/components/FloatingRootStore.js +34 -17
- package/esm/floating-ui-react/hooks/useClick.d.ts +2 -2
- package/esm/floating-ui-react/hooks/useClick.js +5 -3
- package/esm/floating-ui-react/hooks/useClientPoint.d.ts +1 -1
- package/esm/floating-ui-react/hooks/useClientPoint.js +6 -5
- package/esm/floating-ui-react/hooks/useDismiss.d.ts +8 -12
- package/esm/floating-ui-react/hooks/useDismiss.js +304 -282
- package/esm/floating-ui-react/hooks/useFloating.js +4 -3
- package/esm/floating-ui-react/hooks/useFloatingRootContext.d.ts +2 -2
- package/esm/floating-ui-react/hooks/useFloatingRootContext.js +3 -3
- package/esm/floating-ui-react/hooks/useFocus.d.ts +1 -1
- package/esm/floating-ui-react/hooks/useFocus.js +5 -14
- package/esm/floating-ui-react/hooks/useHover.d.ts +7 -15
- package/esm/floating-ui-react/hooks/useHover.js +9 -72
- package/esm/floating-ui-react/hooks/useHoverFloatingInteraction.d.ts +7 -3
- package/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js +68 -84
- package/esm/floating-ui-react/hooks/useHoverInteractionSharedState.d.ts +12 -3
- package/esm/floating-ui-react/hooks/useHoverInteractionSharedState.js +42 -8
- package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +9 -3
- package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js +114 -98
- 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/useListNavigation.d.ts +8 -8
- package/esm/floating-ui-react/hooks/useListNavigation.js +39 -31
- package/esm/floating-ui-react/hooks/useRole.d.ts +1 -1
- package/esm/floating-ui-react/hooks/useRole.js +1 -1
- package/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.d.ts +0 -4
- package/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js +3 -4
- package/esm/floating-ui-react/hooks/useTypeahead.d.ts +7 -1
- package/esm/floating-ui-react/hooks/useTypeahead.js +32 -14
- package/esm/floating-ui-react/safePolygon.d.ts +2 -6
- package/esm/floating-ui-react/safePolygon.js +150 -119
- package/esm/floating-ui-react/types.d.ts +5 -4
- package/esm/floating-ui-react/utils/composite.d.ts +7 -4
- package/esm/floating-ui-react/utils/composite.js +177 -147
- package/esm/floating-ui-react/utils/element.d.ts +3 -3
- package/esm/floating-ui-react/utils/element.js +6 -42
- package/esm/floating-ui-react/utils/enqueueFocus.d.ts +3 -2
- package/esm/floating-ui-react/utils/enqueueFocus.js +10 -2
- package/esm/floating-ui-react/utils/getEmptyRootContext.js +2 -1
- package/esm/floating-ui-react/utils/markOthers.d.ts +7 -1
- package/esm/floating-ui-react/utils/markOthers.js +119 -81
- package/esm/floating-ui-react/utils/nodes.js +2 -2
- package/esm/floating-ui-react/utils/shadowDom.d.ts +3 -0
- package/esm/floating-ui-react/utils/shadowDom.js +40 -0
- package/esm/floating-ui-react/utils/tabbable.d.ts +4 -5
- package/esm/floating-ui-react/utils/tabbable.js +126 -13
- package/esm/form/Form.d.ts +1 -1
- package/esm/form/Form.js +1 -0
- package/esm/global.d.ts +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +6 -1
- package/esm/input/Input.d.ts +11 -4
- package/esm/labelable-provider/LabelableProvider.d.ts +4 -1
- package/esm/labelable-provider/LabelableProvider.js +3 -2
- 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 +73 -0
- package/esm/labelable-provider/useLabelableId.d.ts +2 -5
- package/esm/localization-provider/LocalizationContext.d.ts +10 -0
- package/esm/localization-provider/LocalizationContext.js +16 -0
- package/esm/localization-provider/LocalizationProvider.d.ts +20 -0
- package/esm/localization-provider/LocalizationProvider.js +37 -0
- package/esm/localization-provider/index.d.ts +2 -0
- package/esm/localization-provider/index.js +2 -0
- package/esm/menu/arrow/MenuArrow.d.ts +10 -1
- package/esm/menu/arrow/MenuArrow.js +1 -0
- package/esm/menu/backdrop/MenuBackdrop.d.ts +4 -1
- package/esm/menu/backdrop/MenuBackdrop.js +1 -0
- package/esm/menu/checkbox-item/MenuCheckboxItem.d.ts +3 -3
- package/esm/menu/checkbox-item/MenuCheckboxItem.js +2 -1
- package/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.d.ts +7 -1
- package/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +1 -0
- package/esm/menu/group/MenuGroup.d.ts +1 -1
- package/esm/menu/group/MenuGroup.js +1 -0
- package/esm/menu/group-label/MenuGroupLabel.d.ts +1 -1
- package/esm/menu/group-label/MenuGroupLabel.js +1 -0
- package/esm/menu/index.d.ts +2 -1
- package/esm/menu/index.parts.d.ts +1 -0
- package/esm/menu/index.parts.js +1 -0
- package/esm/menu/item/MenuItem.d.ts +1 -1
- package/esm/menu/item/MenuItem.js +2 -1
- package/esm/menu/item/useMenuItem.d.ts +9 -8
- package/esm/menu/item/useMenuItem.js +5 -7
- package/esm/menu/item/useMenuItemCommonProps.d.ts +7 -4
- package/esm/menu/item/useMenuItemCommonProps.js +16 -2
- package/esm/menu/link-item/MenuLinkItem.d.ts +1 -1
- package/esm/menu/link-item/MenuLinkItem.js +18 -3
- package/esm/menu/popup/MenuPopup.d.ts +20 -5
- package/esm/menu/popup/MenuPopup.js +5 -1
- package/esm/menu/popup/MenuPopupDataAttributes.d.ts +1 -1
- package/esm/menu/popup/MenuPopupDataAttributes.js +1 -1
- package/esm/menu/portal/MenuPortal.d.ts +3 -4
- package/esm/menu/positioner/MenuPositioner.d.ts +18 -2
- package/esm/menu/positioner/MenuPositioner.js +73 -36
- package/esm/menu/positioner/MenuPositionerContext.d.ts +2 -15
- package/esm/menu/radio-group/MenuRadioGroup.d.ts +6 -3
- package/esm/menu/radio-group/MenuRadioGroup.js +1 -0
- package/esm/menu/radio-item/MenuRadioItem.d.ts +3 -3
- package/esm/menu/radio-item/MenuRadioItem.js +2 -1
- package/esm/menu/radio-item-indicator/MenuRadioItemIndicator.d.ts +7 -1
- package/esm/menu/radio-item-indicator/MenuRadioItemIndicator.js +1 -0
- package/esm/menu/root/MenuRoot.d.ts +6 -4
- package/esm/menu/root/MenuRoot.js +9 -19
- package/esm/menu/store/MenuStore.d.ts +7 -2
- package/esm/menu/store/MenuStore.js +17 -1
- package/esm/menu/submenu-root/MenuSubmenuRoot.d.ts +1 -1
- package/esm/menu/submenu-root/MenuSubmenuRoot.js +1 -1
- package/esm/menu/submenu-trigger/MenuSubmenuTrigger.js +19 -2
- package/esm/menu/trigger/MenuTrigger.d.ts +3 -3
- package/esm/menu/trigger/MenuTrigger.js +11 -31
- package/esm/menu/viewport/MenuViewport.d.ts +30 -0
- package/esm/menu/viewport/MenuViewport.js +61 -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 +1 -1
- package/esm/menubar/Menubar.js +7 -17
- package/esm/menubar/MenubarDataAttributes.d.ts +6 -3
- package/esm/menubar/MenubarDataAttributes.js +9 -6
- package/esm/merge-props/mergeProps.d.ts +1 -1
- package/esm/merge-props/mergeProps.js +53 -18
- package/esm/meter/indicator/MeterIndicator.d.ts +4 -2
- package/esm/meter/indicator/MeterIndicator.js +1 -0
- package/esm/meter/label/MeterLabel.d.ts +4 -2
- package/esm/meter/label/MeterLabel.js +5 -8
- package/esm/meter/root/MeterRoot.d.ts +1 -1
- package/esm/meter/root/MeterRoot.js +12 -2
- package/esm/meter/track/MeterTrack.d.ts +4 -2
- package/esm/meter/track/MeterTrack.js +1 -0
- package/esm/meter/value/MeterValue.d.ts +5 -3
- package/esm/meter/value/MeterValue.js +1 -0
- package/esm/navigation-menu/arrow/NavigationMenuArrow.d.ts +10 -1
- package/esm/navigation-menu/arrow/NavigationMenuArrow.js +1 -0
- package/esm/navigation-menu/backdrop/NavigationMenuBackdrop.d.ts +1 -1
- package/esm/navigation-menu/backdrop/NavigationMenuBackdrop.js +1 -0
- package/esm/navigation-menu/content/NavigationMenuContent.d.ts +1 -1
- package/esm/navigation-menu/content/NavigationMenuContent.js +14 -0
- package/esm/navigation-menu/icon/NavigationMenuIcon.d.ts +1 -1
- package/esm/navigation-menu/icon/NavigationMenuIcon.js +1 -0
- package/esm/navigation-menu/item/NavigationMenuItem.d.ts +1 -1
- package/esm/navigation-menu/item/NavigationMenuItem.js +1 -0
- package/esm/navigation-menu/link/NavigationMenuLink.d.ts +1 -1
- package/esm/navigation-menu/link/NavigationMenuLink.js +2 -0
- package/esm/navigation-menu/list/NavigationMenuList.d.ts +1 -1
- package/esm/navigation-menu/list/NavigationMenuList.js +17 -4
- package/esm/navigation-menu/popup/NavigationMenuPopup.d.ts +1 -1
- package/esm/navigation-menu/popup/NavigationMenuPopup.js +1 -0
- package/esm/navigation-menu/portal/NavigationMenuPortal.d.ts +4 -5
- package/esm/navigation-menu/positioner/NavigationMenuPositioner.d.ts +11 -2
- package/esm/navigation-menu/positioner/NavigationMenuPositioner.js +13 -32
- package/esm/navigation-menu/root/NavigationMenuRoot.d.ts +12 -9
- package/esm/navigation-menu/root/NavigationMenuRoot.js +35 -8
- package/esm/navigation-menu/root/NavigationMenuRootContext.d.ts +11 -6
- package/esm/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -1
- package/esm/navigation-menu/trigger/NavigationMenuTrigger.js +402 -23
- 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 +1 -19
- package/esm/number-field/decrement/NumberFieldDecrement.d.ts +3 -3
- package/esm/number-field/decrement/NumberFieldDecrement.js +1 -10
- package/esm/number-field/group/NumberFieldGroup.d.ts +3 -3
- package/esm/number-field/group/NumberFieldGroup.js +1 -0
- package/esm/number-field/increment/NumberFieldIncrement.d.ts +3 -3
- package/esm/number-field/increment/NumberFieldIncrement.js +1 -10
- package/esm/number-field/input/NumberFieldInput.d.ts +3 -3
- package/esm/number-field/input/NumberFieldInput.js +6 -10
- package/esm/number-field/root/NumberFieldRoot.d.ts +10 -5
- package/esm/number-field/root/NumberFieldRoot.js +13 -78
- package/esm/number-field/root/NumberFieldRootContext.d.ts +2 -8
- package/esm/number-field/root/useNumberFieldButton.d.ts +2 -11
- package/esm/number-field/root/useNumberFieldButton.js +34 -101
- package/esm/number-field/scrub-area/NumberFieldScrubArea.d.ts +4 -4
- package/esm/number-field/scrub-area/NumberFieldScrubArea.js +8 -9
- package/esm/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.d.ts +3 -3
- package/esm/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.js +1 -0
- package/esm/number-field/utils/constants.d.ts +0 -2
- package/esm/number-field/utils/constants.js +0 -2
- package/esm/number-field/utils/stateAttributesMapping.d.ts +2 -2
- package/esm/number-field/utils/subscribeToVisualViewportResize.js +2 -4
- package/esm/number-field/utils/types.d.ts +2 -2
- package/esm/otp-field/index.d.ts +3 -0
- package/esm/otp-field/index.js +1 -0
- package/esm/otp-field/index.parts.d.ts +3 -0
- package/esm/otp-field/index.parts.js +3 -0
- package/esm/otp-field/input/OTPFieldInput.d.ts +29 -0
- package/esm/otp-field/input/OTPFieldInput.js +237 -0
- package/esm/otp-field/input/OTPFieldInputDataAttributes.d.ts +42 -0
- package/esm/otp-field/input/OTPFieldInputDataAttributes.js +43 -0
- package/esm/otp-field/root/OTPFieldRoot.d.ts +159 -0
- package/esm/otp-field/root/OTPFieldRoot.js +408 -0
- package/esm/otp-field/root/OTPFieldRootContext.d.ts +31 -0
- package/esm/otp-field/root/OTPFieldRootContext.js +21 -0
- package/esm/otp-field/root/OTPFieldRootDataAttributes.d.ts +42 -0
- package/esm/otp-field/root/OTPFieldRootDataAttributes.js +43 -0
- package/esm/otp-field/utils/otp.d.ts +21 -0
- package/esm/otp-field/utils/otp.js +66 -0
- package/esm/otp-field/utils/stateAttributesMapping.d.ts +5 -0
- package/esm/otp-field/utils/stateAttributesMapping.js +11 -0
- package/esm/popover/arrow/PopoverArrow.d.ts +10 -1
- package/esm/popover/arrow/PopoverArrow.js +1 -0
- package/esm/popover/backdrop/PopoverBackdrop.d.ts +4 -1
- package/esm/popover/backdrop/PopoverBackdrop.js +1 -0
- package/esm/popover/close/PopoverClose.d.ts +1 -1
- package/esm/popover/close/PopoverClose.js +6 -3
- package/esm/popover/description/PopoverDescription.d.ts +1 -1
- package/esm/popover/description/PopoverDescription.js +1 -0
- package/esm/popover/popup/PopoverPopup.d.ts +15 -3
- package/esm/popover/popup/PopoverPopup.js +13 -2
- package/esm/popover/portal/PopoverPortal.d.ts +3 -4
- package/esm/popover/positioner/PopoverPositioner.d.ts +11 -2
- package/esm/popover/positioner/PopoverPositioner.js +16 -30
- package/esm/popover/root/PopoverRoot.d.ts +12 -5
- package/esm/popover/root/PopoverRoot.js +2 -8
- package/esm/popover/store/PopoverStore.d.ts +2 -0
- package/esm/popover/store/PopoverStore.js +3 -9
- package/esm/popover/title/PopoverTitle.d.ts +1 -1
- package/esm/popover/title/PopoverTitle.js +1 -0
- package/esm/popover/trigger/PopoverTrigger.js +11 -33
- package/esm/popover/viewport/PopoverViewport.d.ts +16 -12
- package/esm/popover/viewport/PopoverViewport.js +1 -0
- package/esm/preview-card/arrow/PreviewCardArrow.d.ts +10 -1
- package/esm/preview-card/arrow/PreviewCardArrow.js +1 -0
- package/esm/preview-card/backdrop/PreviewCardBackdrop.d.ts +4 -1
- package/esm/preview-card/backdrop/PreviewCardBackdrop.js +1 -0
- package/esm/preview-card/index.d.ts +1 -0
- package/esm/preview-card/popup/PreviewCardPopup.d.ts +13 -1
- package/esm/preview-card/popup/PreviewCardPopup.js +1 -0
- package/esm/preview-card/portal/PreviewCardPortal.d.ts +3 -4
- package/esm/preview-card/positioner/PreviewCardPositioner.d.ts +14 -2
- package/esm/preview-card/positioner/PreviewCardPositioner.js +17 -31
- package/esm/preview-card/positioner/PreviewCardPositionerContext.d.ts +2 -8
- package/esm/preview-card/root/PreviewCardRoot.d.ts +5 -5
- package/esm/preview-card/root/PreviewCardRoot.js +23 -10
- package/esm/preview-card/store/PreviewCardStore.js +1 -0
- package/esm/preview-card/trigger/PreviewCardTrigger.d.ts +1 -1
- package/esm/preview-card/trigger/PreviewCardTrigger.js +3 -1
- package/esm/preview-card/viewport/PreviewCardViewport.d.ts +16 -9
- package/esm/preview-card/viewport/PreviewCardViewport.js +1 -0
- package/esm/progress/indicator/ProgressIndicator.d.ts +4 -2
- package/esm/progress/indicator/ProgressIndicator.js +1 -0
- package/esm/progress/indicator/ProgressIndicatorDataAttributes.d.ts +1 -1
- package/esm/progress/indicator/ProgressIndicatorDataAttributes.js +1 -1
- package/esm/progress/label/ProgressLabel.d.ts +4 -2
- package/esm/progress/label/ProgressLabel.js +5 -8
- package/esm/progress/label/ProgressLabelDataAttributes.d.ts +1 -1
- package/esm/progress/label/ProgressLabelDataAttributes.js +1 -1
- package/esm/progress/root/ProgressRoot.d.ts +4 -1
- package/esm/progress/root/ProgressRoot.js +12 -2
- package/esm/progress/root/ProgressRootContext.d.ts +2 -2
- package/esm/progress/root/ProgressRootDataAttributes.d.ts +1 -1
- package/esm/progress/root/ProgressRootDataAttributes.js +1 -1
- package/esm/progress/root/stateAttributesMapping.d.ts +2 -2
- package/esm/progress/track/ProgressTrack.d.ts +4 -2
- package/esm/progress/track/ProgressTrack.js +1 -0
- package/esm/progress/track/ProgressTrackDataAttributes.d.ts +1 -1
- package/esm/progress/track/ProgressTrackDataAttributes.js +1 -1
- package/esm/progress/value/ProgressValue.d.ts +5 -3
- package/esm/progress/value/ProgressValue.js +1 -0
- package/esm/progress/value/ProgressValueDataAttributes.d.ts +1 -1
- package/esm/progress/value/ProgressValueDataAttributes.js +1 -1
- package/esm/radio/indicator/RadioIndicator.d.ts +4 -1
- package/esm/radio/indicator/RadioIndicator.js +1 -0
- package/esm/radio/indicator/RadioIndicatorDataAttributes.d.ts +8 -0
- package/esm/radio/indicator/RadioIndicatorDataAttributes.js +10 -1
- package/esm/radio/root/RadioRoot.d.ts +3 -3
- package/esm/radio/root/RadioRoot.js +11 -2
- package/esm/radio-group/RadioGroup.d.ts +8 -3
- package/esm/radio-group/RadioGroup.js +9 -7
- package/esm/radio-group/RadioGroupContext.d.ts +1 -0
- package/esm/scroll-area/content/ScrollAreaContent.d.ts +3 -3
- package/esm/scroll-area/content/ScrollAreaContent.js +1 -0
- package/esm/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/esm/scroll-area/corner/ScrollAreaCorner.js +1 -0
- package/esm/scroll-area/root/ScrollAreaRoot.d.ts +27 -11
- package/esm/scroll-area/root/ScrollAreaRoot.js +8 -4
- package/esm/scroll-area/root/ScrollAreaRootContext.d.ts +4 -2
- 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 +13 -7
- package/esm/scroll-area/thumb/ScrollAreaThumb.d.ts +5 -2
- package/esm/scroll-area/thumb/ScrollAreaThumb.js +4 -1
- package/esm/scroll-area/viewport/ScrollAreaViewport.d.ts +3 -3
- package/esm/scroll-area/viewport/ScrollAreaViewport.js +45 -34
- package/esm/select/arrow/SelectArrow.d.ts +10 -1
- package/esm/select/arrow/SelectArrow.js +1 -0
- package/esm/select/backdrop/SelectBackdrop.d.ts +7 -1
- package/esm/select/backdrop/SelectBackdrop.js +1 -0
- package/esm/select/group/SelectGroup.d.ts +1 -1
- package/esm/select/group/SelectGroup.js +1 -0
- package/esm/select/group-label/SelectGroupLabel.d.ts +1 -1
- package/esm/select/group-label/SelectGroupLabel.js +1 -0
- package/esm/select/icon/SelectIcon.d.ts +1 -1
- package/esm/select/icon/SelectIcon.js +1 -0
- 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 +1 -1
- package/esm/select/item/SelectItem.js +19 -38
- package/esm/select/item-indicator/SelectItemIndicator.d.ts +10 -2
- package/esm/select/item-indicator/SelectItemIndicator.js +1 -0
- 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/item-text/SelectItemText.js +1 -0
- package/esm/select/label/SelectLabel.d.ts +16 -0
- package/esm/select/label/SelectLabel.js +50 -0
- package/esm/select/list/SelectList.d.ts +1 -1
- package/esm/select/list/SelectList.js +1 -0
- package/esm/select/popup/SelectPopup.d.ts +14 -2
- package/esm/select/popup/SelectPopup.js +150 -164
- package/esm/select/portal/SelectPortal.d.ts +3 -4
- package/esm/select/positioner/SelectPositioner.d.ts +14 -2
- package/esm/select/positioner/SelectPositioner.js +11 -24
- package/esm/select/positioner/SelectPositionerContext.d.ts +2 -2
- package/esm/select/root/SelectRoot.d.ts +12 -6
- package/esm/select/root/SelectRoot.js +42 -30
- package/esm/select/scroll-arrow/SelectScrollArrow.d.ts +13 -1
- package/esm/select/scroll-arrow/SelectScrollArrow.js +47 -63
- package/esm/select/scroll-down-arrow/SelectScrollDownArrow.d.ts +1 -1
- package/esm/select/scroll-up-arrow/SelectScrollUpArrow.d.ts +1 -1
- package/esm/select/store.d.ts +5 -2
- package/esm/select/store.js +1 -0
- package/esm/select/trigger/SelectTrigger.d.ts +6 -4
- package/esm/select/trigger/SelectTrigger.js +6 -2
- package/esm/select/value/SelectValue.d.ts +1 -1
- package/esm/select/value/SelectValue.js +1 -0
- package/esm/separator/Separator.d.ts +1 -1
- package/esm/separator/Separator.js +1 -0
- package/esm/separator/SeparatorDataAttributes.d.ts +7 -0
- package/esm/separator/SeparatorDataAttributes.js +8 -0
- package/esm/slider/control/SliderControl.d.ts +4 -3
- package/esm/slider/control/SliderControl.js +17 -10
- 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/indicator/SliderIndicator.js +6 -6
- package/esm/slider/label/SliderLabel.d.ts +16 -0
- package/esm/slider/label/SliderLabel.js +59 -0
- package/esm/slider/root/SliderRoot.d.ts +17 -6
- package/esm/slider/root/SliderRoot.js +16 -12
- package/esm/slider/root/SliderRootContext.d.ts +5 -2
- package/esm/slider/root/stateAttributesMapping.d.ts +2 -2
- package/esm/slider/thumb/SliderThumb.d.ts +5 -5
- package/esm/slider/thumb/SliderThumb.js +67 -24
- package/esm/slider/track/SliderTrack.d.ts +4 -2
- package/esm/slider/track/SliderTrack.js +1 -0
- package/esm/slider/utils/resolveThumbCollision.d.ts +2 -2
- package/esm/slider/utils/roundValueToStep.d.ts +1 -0
- package/esm/slider/utils/roundValueToStep.js +6 -2
- package/esm/slider/value/SliderValue.d.ts +5 -3
- package/esm/slider/value/SliderValue.js +1 -0
- package/esm/switch/root/SwitchRoot.d.ts +8 -3
- package/esm/switch/root/SwitchRoot.js +19 -11
- package/esm/switch/root/SwitchRootContext.d.ts +4 -4
- package/esm/switch/stateAttributesMapping.d.ts +2 -2
- package/esm/switch/thumb/SwitchThumb.d.ts +3 -3
- package/esm/switch/thumb/SwitchThumb.js +1 -0
- package/esm/tabs/indicator/TabsIndicator.d.ts +13 -4
- package/esm/tabs/indicator/TabsIndicator.js +9 -18
- package/esm/tabs/indicator/TabsIndicatorCssVars.d.ts +1 -1
- package/esm/tabs/indicator/TabsIndicatorCssVars.js +1 -1
- package/esm/tabs/list/TabsList.d.ts +3 -3
- package/esm/tabs/list/TabsList.js +51 -88
- package/esm/tabs/list/TabsListContext.d.ts +2 -0
- package/esm/tabs/panel/TabsPanel.d.ts +9 -3
- package/esm/tabs/panel/TabsPanel.js +1 -0
- package/esm/tabs/panel/TabsPanelDataAttributes.d.ts +8 -0
- package/esm/tabs/panel/TabsPanelDataAttributes.js +10 -1
- package/esm/tabs/root/TabsRoot.d.ts +7 -1
- package/esm/tabs/root/TabsRoot.js +115 -22
- 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 +7 -1
- package/esm/tabs/tab/TabsTab.js +11 -1
- package/esm/temporal-adapter-date-fns/TemporalAdapterDateFns.d.ts +93 -0
- package/esm/temporal-adapter-date-fns/TemporalAdapterDateFns.js +352 -0
- package/esm/temporal-adapter-date-fns/index.d.ts +1 -0
- package/esm/temporal-adapter-date-fns/index.js +1 -0
- package/esm/temporal-adapter-luxon/TemporalAdapterLuxon.d.ts +89 -0
- package/esm/temporal-adapter-luxon/TemporalAdapterLuxon.js +327 -0
- package/esm/temporal-adapter-luxon/index.d.ts +1 -0
- package/esm/temporal-adapter-luxon/index.js +1 -0
- package/esm/temporal-adapter-provider/TemporalAdapterContext.d.ts +10 -0
- package/esm/temporal-adapter-provider/TemporalAdapterContext.js +19 -0
- package/esm/temporal-adapter-provider/TemporalAdapterProvider.d.ts +15 -0
- package/esm/temporal-adapter-provider/TemporalAdapterProvider.js +23 -0
- package/esm/temporal-adapter-provider/index.d.ts +1 -0
- package/esm/temporal-adapter-provider/index.js +1 -0
- package/esm/toast/action/ToastAction.d.ts +1 -1
- package/esm/toast/action/ToastAction.js +1 -0
- package/esm/toast/arrow/ToastArrow.d.ts +10 -1
- package/esm/toast/arrow/ToastArrow.js +1 -0
- package/esm/toast/close/ToastClose.d.ts +1 -1
- package/esm/toast/close/ToastClose.js +1 -0
- package/esm/toast/content/ToastContent.d.ts +1 -1
- package/esm/toast/content/ToastContent.js +1 -0
- package/esm/toast/createToastManager.d.ts +1 -1
- package/esm/toast/description/ToastDescription.d.ts +1 -1
- package/esm/toast/description/ToastDescription.js +1 -0
- package/esm/toast/portal/ToastPortal.d.ts +3 -4
- package/esm/toast/positioner/ToastPositioner.d.ts +12 -3
- package/esm/toast/positioner/ToastPositioner.js +11 -26
- package/esm/toast/positioner/ToastPositionerContext.d.ts +2 -8
- package/esm/toast/provider/ToastProvider.d.ts +2 -0
- package/esm/toast/provider/ToastProvider.js +1 -1
- package/esm/toast/root/ToastRoot.d.ts +20 -7
- package/esm/toast/root/ToastRoot.js +23 -8
- package/esm/toast/root/ToastRootDataAttributes.js +4 -3
- package/esm/toast/store.d.ts +10 -3
- package/esm/toast/store.js +74 -20
- package/esm/toast/title/ToastTitle.d.ts +1 -1
- package/esm/toast/title/ToastTitle.js +1 -0
- package/esm/toast/useToastManager.d.ts +13 -5
- package/esm/toast/viewport/ToastViewport.d.ts +1 -1
- package/esm/toast/viewport/ToastViewport.js +36 -26
- package/esm/toggle/Toggle.d.ts +1 -1
- package/esm/toggle/Toggle.js +2 -0
- package/esm/toggle-group/ToggleGroup.d.ts +1 -1
- package/esm/toggle-group/ToggleGroup.js +4 -1
- package/esm/toolbar/button/ToolbarButton.d.ts +10 -4
- package/esm/toolbar/button/ToolbarButton.js +2 -0
- package/esm/toolbar/group/ToolbarGroup.d.ts +4 -2
- package/esm/toolbar/group/ToolbarGroup.js +1 -0
- package/esm/toolbar/input/ToolbarInput.d.ts +10 -4
- package/esm/toolbar/input/ToolbarInput.js +2 -0
- package/esm/toolbar/link/ToolbarLink.d.ts +4 -1
- package/esm/toolbar/link/ToolbarLink.js +2 -0
- package/esm/toolbar/root/ToolbarRoot.d.ts +7 -1
- package/esm/toolbar/root/ToolbarRoot.js +2 -0
- package/esm/toolbar/separator/ToolbarSeparator.d.ts +4 -2
- package/esm/tooltip/arrow/TooltipArrow.d.ts +13 -1
- package/esm/tooltip/arrow/TooltipArrow.js +2 -1
- package/esm/tooltip/index.d.ts +1 -0
- package/esm/tooltip/popup/TooltipPopup.d.ts +13 -1
- package/esm/tooltip/popup/TooltipPopup.js +1 -0
- package/esm/tooltip/portal/TooltipPortal.d.ts +3 -4
- package/esm/tooltip/positioner/TooltipPositioner.d.ts +11 -2
- package/esm/tooltip/positioner/TooltipPositioner.js +10 -29
- package/esm/tooltip/positioner/TooltipPositionerContext.d.ts +2 -9
- package/esm/tooltip/provider/TooltipProvider.d.ts +2 -0
- package/esm/tooltip/root/TooltipRoot.d.ts +5 -5
- package/esm/tooltip/root/TooltipRoot.js +3 -3
- package/esm/tooltip/store/TooltipStore.d.ts +2 -0
- package/esm/tooltip/store/TooltipStore.js +3 -0
- package/esm/tooltip/trigger/TooltipTrigger.d.ts +6 -1
- package/esm/tooltip/trigger/TooltipTrigger.js +8 -1
- package/esm/tooltip/viewport/TooltipViewport.d.ts +16 -12
- package/esm/tooltip/viewport/TooltipViewport.js +1 -0
- package/esm/types/index.d.ts +16 -1
- package/esm/types/temporal/index.d.ts +2 -0
- package/esm/types/temporal/index.js +2 -0
- package/esm/types/temporal/temporal-adapter.d.ts +371 -0
- package/esm/types/temporal/temporal-adapter.js +1 -0
- package/esm/types/temporal/temporal.d.ts +35 -0
- package/esm/types/temporal/temporal.js +1 -0
- package/esm/unstable-use-media-query/index.d.ts +2 -0
- package/esm/unstable-use-media-query/index.js +2 -6
- package/esm/use-button/useButton.d.ts +8 -5
- package/esm/use-button/useButton.js +49 -20
- package/esm/use-render/useRender.d.ts +8 -6
- package/esm/utils/FloatingPortalLite.d.ts +4 -2
- package/esm/utils/FloatingPortalLite.js +1 -0
- package/esm/utils/InternalBackdrop.d.ts +3 -1
- package/esm/utils/InternalBackdrop.js +2 -13
- 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 +3 -3
- package/esm/utils/getElementAtPoint.d.ts +1 -0
- package/esm/utils/getElementAtPoint.js +3 -0
- package/esm/utils/getPseudoElementBounds.js +4 -2
- package/esm/utils/popups/store.js +1 -1
- package/esm/utils/popups/useTriggerFocusGuards.d.ts +28 -0
- package/esm/utils/popups/useTriggerFocusGuards.js +55 -0
- package/esm/utils/reason-parts.d.ts +4 -1
- package/esm/utils/reason-parts.js +4 -1
- 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/{scroll-area/utils → utils}/scrollEdges.d.ts +1 -0
- package/esm/{scroll-area/utils → utils}/scrollEdges.js +4 -1
- package/esm/utils/temporal/date-helpers.d.ts +15 -0
- package/esm/utils/temporal/date-helpers.js +43 -0
- package/esm/utils/temporal/getDateManager.d.ts +5 -0
- package/esm/utils/temporal/getDateManager.js +19 -0
- package/esm/utils/temporal/getInitialReferenceDate.d.ts +27 -0
- package/esm/utils/temporal/getInitialReferenceDate.js +28 -0
- package/esm/utils/temporal/types.d.ts +65 -0
- package/esm/utils/temporal/types.js +1 -0
- package/esm/utils/temporal/validateDate.d.ts +27 -0
- package/esm/utils/temporal/validateDate.js +25 -0
- package/esm/utils/types.d.ts +18 -25
- package/esm/utils/useAnchorPositioning.d.ts +53 -18
- package/esm/utils/useAnchorPositioning.js +24 -9
- package/esm/utils/useAnchoredPopupScrollLock.d.ts +6 -0
- package/esm/utils/useAnchoredPopupScrollLock.js +31 -0
- package/esm/utils/useAnimationsFinished.js +48 -51
- package/esm/utils/useFocusableWhenDisabled.d.ts +2 -5
- package/esm/utils/useIsHydrating.d.ts +5 -0
- package/esm/utils/useIsHydrating.js +19 -0
- package/esm/utils/useMixedToggleClickHandler.d.ts +2 -4
- package/esm/utils/useOpenChangeComplete.d.ts +2 -4
- package/esm/utils/useOpenInteractionType.d.ts +0 -1
- package/esm/utils/useOpenInteractionType.js +7 -5
- package/esm/utils/usePopupAutoResize.js +1 -2
- package/esm/utils/usePopupViewport.js +13 -9
- package/esm/utils/usePositioner.d.ts +23 -0
- package/esm/utils/usePositioner.js +34 -0
- package/esm/utils/usePressAndHold.d.ts +58 -0
- package/esm/utils/usePressAndHold.js +192 -0
- package/esm/utils/useRegisteredLabelId.d.ts +1 -0
- package/esm/utils/useRegisteredLabelId.js +14 -0
- package/esm/utils/useRenderElement.d.ts +6 -9
- package/esm/utils/useRenderElement.js +31 -1
- package/esm/utils/useSwipeDismiss.d.ts +92 -92
- package/esm/utils/useSwipeDismiss.js +6 -3
- package/esm/utils/useTransitionStatus.js +3 -3
- package/field/control/FieldControl.d.ts +3 -3
- package/field/control/FieldControl.js +6 -6
- package/field/description/FieldDescription.d.ts +3 -3
- package/field/description/FieldDescription.js +1 -0
- package/field/error/FieldError.d.ts +8 -5
- package/field/error/FieldError.js +8 -5
- package/field/error/FieldErrorDataAttributes.d.ts +8 -0
- package/field/error/FieldErrorDataAttributes.js +10 -1
- package/field/item/FieldItem.d.ts +4 -3
- package/field/item/FieldItem.js +3 -2
- package/field/label/FieldLabel.d.ts +4 -4
- package/field/label/FieldLabel.js +7 -51
- package/field/root/FieldRoot.d.ts +19 -2
- package/field/root/FieldRoot.js +14 -2
- package/field/root/FieldRootContext.d.ts +4 -2
- package/field/root/FieldRootContext.js +6 -12
- package/field/root/useFieldControlRegistration.d.ts +17 -0
- package/field/root/useFieldControlRegistration.js +131 -0
- package/field/root/useFieldValidation.js +5 -4
- package/field/root/useRegisterFieldControl.d.ts +5 -0
- package/field/root/useRegisterFieldControl.js +41 -0
- package/field/utils/constants.d.ts +3 -0
- package/field/utils/constants.js +12 -1
- package/field/validity/FieldValidity.d.ts +8 -2
- package/field/validity/FieldValidity.js +1 -1
- package/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/fieldset/legend/FieldsetLegend.js +1 -0
- package/fieldset/root/FieldsetRoot.d.ts +1 -1
- package/fieldset/root/FieldsetRoot.js +1 -0
- package/floating-ui-react/components/FloatingDelayGroup.js +2 -2
- package/floating-ui-react/components/FloatingFocusManager.d.ts +12 -7
- package/floating-ui-react/components/FloatingFocusManager.js +97 -125
- package/floating-ui-react/components/FloatingPortal.d.ts +6 -4
- package/floating-ui-react/components/FloatingPortal.js +23 -17
- package/floating-ui-react/components/FloatingRootStore.d.ts +18 -2
- package/floating-ui-react/components/FloatingRootStore.js +34 -17
- package/floating-ui-react/hooks/useClick.d.ts +2 -2
- package/floating-ui-react/hooks/useClick.js +8 -6
- package/floating-ui-react/hooks/useClientPoint.d.ts +1 -1
- package/floating-ui-react/hooks/useClientPoint.js +9 -8
- package/floating-ui-react/hooks/useDismiss.d.ts +8 -12
- package/floating-ui-react/hooks/useDismiss.js +306 -284
- package/floating-ui-react/hooks/useFloating.js +4 -3
- package/floating-ui-react/hooks/useFloatingRootContext.d.ts +2 -2
- package/floating-ui-react/hooks/useFloatingRootContext.js +3 -3
- package/floating-ui-react/hooks/useFocus.d.ts +1 -1
- package/floating-ui-react/hooks/useFocus.js +12 -21
- package/floating-ui-react/hooks/useHover.d.ts +7 -15
- package/floating-ui-react/hooks/useHover.js +14 -78
- package/floating-ui-react/hooks/useHoverFloatingInteraction.d.ts +7 -3
- package/floating-ui-react/hooks/useHoverFloatingInteraction.js +69 -86
- package/floating-ui-react/hooks/useHoverInteractionSharedState.d.ts +12 -3
- package/floating-ui-react/hooks/useHoverInteractionSharedState.js +49 -10
- package/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +9 -3
- package/floating-ui-react/hooks/useHoverReferenceInteraction.js +119 -103
- package/floating-ui-react/hooks/useHoverShared.d.ts +28 -0
- package/floating-ui-react/hooks/useHoverShared.js +34 -0
- package/floating-ui-react/hooks/useListNavigation.d.ts +8 -8
- package/floating-ui-react/hooks/useListNavigation.js +61 -53
- package/floating-ui-react/hooks/useRole.d.ts +1 -1
- package/floating-ui-react/hooks/useRole.js +2 -2
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.d.ts +0 -4
- package/floating-ui-react/hooks/useSyncedFloatingRootContext.js +3 -4
- package/floating-ui-react/hooks/useTypeahead.d.ts +7 -1
- package/floating-ui-react/hooks/useTypeahead.js +35 -17
- package/floating-ui-react/safePolygon.d.ts +2 -6
- package/floating-ui-react/safePolygon.js +150 -119
- package/floating-ui-react/types.d.ts +5 -4
- package/floating-ui-react/utils/composite.d.ts +7 -4
- package/floating-ui-react/utils/composite.js +178 -147
- package/floating-ui-react/utils/element.d.ts +3 -3
- package/floating-ui-react/utils/element.js +24 -45
- package/floating-ui-react/utils/enqueueFocus.d.ts +3 -2
- package/floating-ui-react/utils/enqueueFocus.js +10 -2
- package/floating-ui-react/utils/getEmptyRootContext.js +2 -1
- package/floating-ui-react/utils/markOthers.d.ts +7 -1
- package/floating-ui-react/utils/markOthers.js +118 -80
- package/floating-ui-react/utils/nodes.js +2 -2
- package/floating-ui-react/utils/shadowDom.d.ts +3 -0
- package/floating-ui-react/utils/shadowDom.js +48 -0
- package/floating-ui-react/utils/tabbable.d.ts +4 -5
- package/floating-ui-react/utils/tabbable.js +129 -15
- package/form/Form.d.ts +1 -1
- package/form/Form.js +1 -0
- package/global.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.js +12 -1
- package/input/Input.d.ts +11 -4
- package/labelable-provider/LabelableProvider.d.ts +4 -1
- package/labelable-provider/LabelableProvider.js +3 -2
- 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 +79 -0
- package/labelable-provider/useLabelableId.d.ts +2 -5
- package/localization-provider/LocalizationContext.d.ts +10 -0
- package/localization-provider/LocalizationContext.js +24 -0
- package/localization-provider/LocalizationProvider.d.ts +20 -0
- package/localization-provider/LocalizationProvider.js +42 -0
- package/localization-provider/index.d.ts +2 -0
- package/localization-provider/index.js +19 -0
- package/menu/arrow/MenuArrow.d.ts +10 -1
- package/menu/arrow/MenuArrow.js +1 -0
- package/menu/backdrop/MenuBackdrop.d.ts +4 -1
- package/menu/backdrop/MenuBackdrop.js +1 -0
- package/menu/checkbox-item/MenuCheckboxItem.d.ts +3 -3
- package/menu/checkbox-item/MenuCheckboxItem.js +2 -1
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.d.ts +7 -1
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +1 -0
- package/menu/group/MenuGroup.d.ts +1 -1
- package/menu/group/MenuGroup.js +1 -0
- package/menu/group-label/MenuGroupLabel.d.ts +1 -1
- package/menu/group-label/MenuGroupLabel.js +1 -0
- package/menu/index.d.ts +2 -1
- package/menu/index.parts.d.ts +1 -0
- package/menu/index.parts.js +7 -0
- package/menu/item/MenuItem.d.ts +1 -1
- package/menu/item/MenuItem.js +2 -1
- package/menu/item/useMenuItem.d.ts +9 -8
- package/menu/item/useMenuItem.js +5 -7
- package/menu/item/useMenuItemCommonProps.d.ts +7 -4
- package/menu/item/useMenuItemCommonProps.js +16 -2
- package/menu/link-item/MenuLinkItem.d.ts +1 -1
- package/menu/link-item/MenuLinkItem.js +18 -3
- package/menu/popup/MenuPopup.d.ts +20 -5
- package/menu/popup/MenuPopup.js +5 -1
- package/menu/popup/MenuPopupDataAttributes.d.ts +1 -1
- package/menu/popup/MenuPopupDataAttributes.js +1 -1
- package/menu/portal/MenuPortal.d.ts +3 -4
- package/menu/positioner/MenuPositioner.d.ts +18 -2
- package/menu/positioner/MenuPositioner.js +71 -35
- package/menu/positioner/MenuPositionerContext.d.ts +2 -15
- package/menu/radio-group/MenuRadioGroup.d.ts +6 -3
- package/menu/radio-group/MenuRadioGroup.js +1 -0
- package/menu/radio-item/MenuRadioItem.d.ts +3 -3
- package/menu/radio-item/MenuRadioItem.js +2 -1
- package/menu/radio-item-indicator/MenuRadioItemIndicator.d.ts +7 -1
- package/menu/radio-item-indicator/MenuRadioItemIndicator.js +1 -0
- package/menu/root/MenuRoot.d.ts +6 -4
- package/menu/root/MenuRoot.js +9 -19
- package/menu/store/MenuStore.d.ts +7 -2
- package/menu/store/MenuStore.js +17 -1
- package/menu/submenu-root/MenuSubmenuRoot.d.ts +1 -1
- package/menu/submenu-root/MenuSubmenuRoot.js +1 -1
- package/menu/submenu-trigger/MenuSubmenuTrigger.js +19 -2
- package/menu/trigger/MenuTrigger.d.ts +3 -3
- package/menu/trigger/MenuTrigger.js +10 -30
- package/menu/viewport/MenuViewport.d.ts +30 -0
- package/menu/viewport/MenuViewport.js +67 -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 +1 -1
- package/menubar/Menubar.js +7 -17
- package/menubar/MenubarDataAttributes.d.ts +6 -3
- package/menubar/MenubarDataAttributes.js +10 -7
- package/merge-props/mergeProps.d.ts +1 -1
- package/merge-props/mergeProps.js +53 -18
- package/meter/indicator/MeterIndicator.d.ts +4 -2
- package/meter/indicator/MeterIndicator.js +1 -0
- package/meter/label/MeterLabel.d.ts +4 -2
- package/meter/label/MeterLabel.js +5 -8
- package/meter/root/MeterRoot.d.ts +1 -1
- package/meter/root/MeterRoot.js +11 -1
- package/meter/track/MeterTrack.d.ts +4 -2
- package/meter/track/MeterTrack.js +1 -0
- package/meter/value/MeterValue.d.ts +5 -3
- package/meter/value/MeterValue.js +1 -0
- package/navigation-menu/arrow/NavigationMenuArrow.d.ts +10 -1
- package/navigation-menu/arrow/NavigationMenuArrow.js +1 -0
- package/navigation-menu/backdrop/NavigationMenuBackdrop.d.ts +1 -1
- package/navigation-menu/backdrop/NavigationMenuBackdrop.js +1 -0
- package/navigation-menu/content/NavigationMenuContent.d.ts +1 -1
- package/navigation-menu/content/NavigationMenuContent.js +14 -0
- package/navigation-menu/icon/NavigationMenuIcon.d.ts +1 -1
- package/navigation-menu/icon/NavigationMenuIcon.js +1 -0
- package/navigation-menu/item/NavigationMenuItem.d.ts +1 -1
- package/navigation-menu/item/NavigationMenuItem.js +1 -0
- package/navigation-menu/link/NavigationMenuLink.d.ts +1 -1
- package/navigation-menu/link/NavigationMenuLink.js +2 -0
- package/navigation-menu/list/NavigationMenuList.d.ts +1 -1
- package/navigation-menu/list/NavigationMenuList.js +15 -2
- package/navigation-menu/popup/NavigationMenuPopup.d.ts +1 -1
- package/navigation-menu/popup/NavigationMenuPopup.js +1 -0
- package/navigation-menu/portal/NavigationMenuPortal.d.ts +4 -5
- package/navigation-menu/positioner/NavigationMenuPositioner.d.ts +11 -2
- package/navigation-menu/positioner/NavigationMenuPositioner.js +13 -32
- package/navigation-menu/root/NavigationMenuRoot.d.ts +12 -9
- package/navigation-menu/root/NavigationMenuRoot.js +34 -7
- package/navigation-menu/root/NavigationMenuRootContext.d.ts +11 -6
- package/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -1
- package/navigation-menu/trigger/NavigationMenuTrigger.js +400 -20
- package/navigation-menu/utils/isOutsideMenuEvent.d.ts +1 -1
- package/navigation-menu/viewport/NavigationMenuViewport.d.ts +1 -1
- package/navigation-menu/viewport/NavigationMenuViewport.js +1 -19
- package/number-field/decrement/NumberFieldDecrement.d.ts +3 -3
- package/number-field/decrement/NumberFieldDecrement.js +1 -10
- package/number-field/group/NumberFieldGroup.d.ts +3 -3
- package/number-field/group/NumberFieldGroup.js +1 -0
- package/number-field/increment/NumberFieldIncrement.d.ts +3 -3
- package/number-field/increment/NumberFieldIncrement.js +1 -10
- package/number-field/input/NumberFieldInput.d.ts +3 -3
- package/number-field/input/NumberFieldInput.js +6 -10
- package/number-field/root/NumberFieldRoot.d.ts +10 -5
- package/number-field/root/NumberFieldRoot.js +10 -75
- package/number-field/root/NumberFieldRootContext.d.ts +2 -8
- package/number-field/root/useNumberFieldButton.d.ts +2 -11
- package/number-field/root/useNumberFieldButton.js +32 -101
- package/number-field/scrub-area/NumberFieldScrubArea.d.ts +4 -4
- package/number-field/scrub-area/NumberFieldScrubArea.js +8 -9
- package/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.d.ts +3 -3
- package/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.js +1 -0
- package/number-field/utils/constants.d.ts +0 -2
- package/number-field/utils/constants.js +1 -3
- package/number-field/utils/stateAttributesMapping.d.ts +2 -2
- package/number-field/utils/subscribeToVisualViewportResize.js +2 -4
- package/number-field/utils/types.d.ts +2 -2
- package/otp-field/index.d.ts +3 -0
- package/otp-field/index.js +9 -0
- package/otp-field/index.parts.d.ts +3 -0
- package/otp-field/index.parts.js +26 -0
- package/otp-field/input/OTPFieldInput.d.ts +29 -0
- package/otp-field/input/OTPFieldInput.js +242 -0
- package/otp-field/input/OTPFieldInputDataAttributes.d.ts +42 -0
- package/otp-field/input/OTPFieldInputDataAttributes.js +49 -0
- package/otp-field/root/OTPFieldRoot.d.ts +159 -0
- package/otp-field/root/OTPFieldRoot.js +413 -0
- package/otp-field/root/OTPFieldRootContext.d.ts +31 -0
- package/otp-field/root/OTPFieldRootContext.js +30 -0
- package/otp-field/root/OTPFieldRootDataAttributes.d.ts +42 -0
- package/otp-field/root/OTPFieldRootDataAttributes.js +49 -0
- package/otp-field/utils/otp.d.ts +21 -0
- package/otp-field/utils/otp.js +76 -0
- package/otp-field/utils/stateAttributesMapping.d.ts +5 -0
- package/otp-field/utils/stateAttributesMapping.js +17 -0
- package/package.json +202 -10
- package/popover/arrow/PopoverArrow.d.ts +10 -1
- package/popover/arrow/PopoverArrow.js +1 -0
- package/popover/backdrop/PopoverBackdrop.d.ts +4 -1
- package/popover/backdrop/PopoverBackdrop.js +1 -0
- package/popover/close/PopoverClose.d.ts +1 -1
- package/popover/close/PopoverClose.js +6 -3
- package/popover/description/PopoverDescription.d.ts +1 -1
- package/popover/description/PopoverDescription.js +1 -0
- package/popover/popup/PopoverPopup.d.ts +15 -3
- package/popover/popup/PopoverPopup.js +13 -2
- package/popover/portal/PopoverPortal.d.ts +3 -4
- package/popover/positioner/PopoverPositioner.d.ts +11 -2
- package/popover/positioner/PopoverPositioner.js +16 -30
- package/popover/root/PopoverRoot.d.ts +12 -5
- package/popover/root/PopoverRoot.js +2 -8
- package/popover/store/PopoverStore.d.ts +2 -0
- package/popover/store/PopoverStore.js +3 -9
- package/popover/title/PopoverTitle.d.ts +1 -1
- package/popover/title/PopoverTitle.js +1 -0
- package/popover/trigger/PopoverTrigger.js +11 -33
- package/popover/viewport/PopoverViewport.d.ts +16 -12
- package/popover/viewport/PopoverViewport.js +1 -0
- package/preview-card/arrow/PreviewCardArrow.d.ts +10 -1
- package/preview-card/arrow/PreviewCardArrow.js +1 -0
- package/preview-card/backdrop/PreviewCardBackdrop.d.ts +4 -1
- package/preview-card/backdrop/PreviewCardBackdrop.js +1 -0
- package/preview-card/index.d.ts +1 -0
- package/preview-card/popup/PreviewCardPopup.d.ts +13 -1
- package/preview-card/popup/PreviewCardPopup.js +1 -0
- package/preview-card/portal/PreviewCardPortal.d.ts +3 -4
- package/preview-card/positioner/PreviewCardPositioner.d.ts +14 -2
- package/preview-card/positioner/PreviewCardPositioner.js +17 -31
- package/preview-card/positioner/PreviewCardPositionerContext.d.ts +2 -8
- package/preview-card/root/PreviewCardRoot.d.ts +5 -5
- package/preview-card/root/PreviewCardRoot.js +21 -8
- package/preview-card/store/PreviewCardStore.js +1 -0
- package/preview-card/trigger/PreviewCardTrigger.d.ts +1 -1
- package/preview-card/trigger/PreviewCardTrigger.js +3 -1
- package/preview-card/viewport/PreviewCardViewport.d.ts +16 -9
- package/preview-card/viewport/PreviewCardViewport.js +1 -0
- package/progress/indicator/ProgressIndicator.d.ts +4 -2
- package/progress/indicator/ProgressIndicator.js +1 -0
- package/progress/indicator/ProgressIndicatorDataAttributes.d.ts +1 -1
- package/progress/indicator/ProgressIndicatorDataAttributes.js +1 -1
- package/progress/label/ProgressLabel.d.ts +4 -2
- package/progress/label/ProgressLabel.js +5 -8
- package/progress/label/ProgressLabelDataAttributes.d.ts +1 -1
- package/progress/label/ProgressLabelDataAttributes.js +1 -1
- package/progress/root/ProgressRoot.d.ts +4 -1
- package/progress/root/ProgressRoot.js +11 -1
- package/progress/root/ProgressRootContext.d.ts +2 -2
- package/progress/root/ProgressRootDataAttributes.d.ts +1 -1
- package/progress/root/ProgressRootDataAttributes.js +1 -1
- package/progress/root/stateAttributesMapping.d.ts +2 -2
- package/progress/track/ProgressTrack.d.ts +4 -2
- package/progress/track/ProgressTrack.js +1 -0
- package/progress/track/ProgressTrackDataAttributes.d.ts +1 -1
- package/progress/track/ProgressTrackDataAttributes.js +1 -1
- package/progress/value/ProgressValue.d.ts +5 -3
- package/progress/value/ProgressValue.js +1 -0
- package/progress/value/ProgressValueDataAttributes.d.ts +1 -1
- package/progress/value/ProgressValueDataAttributes.js +1 -1
- package/radio/indicator/RadioIndicator.d.ts +4 -1
- package/radio/indicator/RadioIndicator.js +1 -0
- package/radio/indicator/RadioIndicatorDataAttributes.d.ts +8 -0
- package/radio/indicator/RadioIndicatorDataAttributes.js +10 -1
- package/radio/root/RadioRoot.d.ts +3 -3
- package/radio/root/RadioRoot.js +11 -2
- package/radio-group/RadioGroup.d.ts +8 -3
- package/radio-group/RadioGroup.js +9 -7
- package/radio-group/RadioGroupContext.d.ts +1 -0
- package/scroll-area/content/ScrollAreaContent.d.ts +3 -3
- package/scroll-area/content/ScrollAreaContent.js +1 -0
- package/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/scroll-area/corner/ScrollAreaCorner.js +1 -0
- package/scroll-area/root/ScrollAreaRoot.d.ts +27 -11
- package/scroll-area/root/ScrollAreaRoot.js +8 -4
- package/scroll-area/root/ScrollAreaRootContext.d.ts +4 -2
- package/scroll-area/root/stateAttributes.d.ts +2 -2
- package/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +14 -8
- package/scroll-area/scrollbar/ScrollAreaScrollbar.js +13 -7
- package/scroll-area/thumb/ScrollAreaThumb.d.ts +5 -2
- package/scroll-area/thumb/ScrollAreaThumb.js +4 -1
- package/scroll-area/viewport/ScrollAreaViewport.d.ts +3 -3
- package/scroll-area/viewport/ScrollAreaViewport.js +45 -34
- package/select/arrow/SelectArrow.d.ts +10 -1
- package/select/arrow/SelectArrow.js +1 -0
- package/select/backdrop/SelectBackdrop.d.ts +7 -1
- package/select/backdrop/SelectBackdrop.js +1 -0
- package/select/group/SelectGroup.d.ts +1 -1
- package/select/group/SelectGroup.js +1 -0
- package/select/group-label/SelectGroupLabel.d.ts +1 -1
- package/select/group-label/SelectGroupLabel.js +1 -0
- package/select/icon/SelectIcon.d.ts +1 -1
- package/select/icon/SelectIcon.js +1 -0
- 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 +1 -1
- package/select/item/SelectItem.js +19 -38
- package/select/item-indicator/SelectItemIndicator.d.ts +10 -2
- package/select/item-indicator/SelectItemIndicator.js +1 -0
- 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/item-text/SelectItemText.js +1 -0
- package/select/label/SelectLabel.d.ts +16 -0
- package/select/label/SelectLabel.js +55 -0
- package/select/list/SelectList.d.ts +1 -1
- package/select/list/SelectList.js +1 -0
- package/select/popup/SelectPopup.d.ts +14 -2
- package/select/popup/SelectPopup.js +152 -166
- package/select/portal/SelectPortal.d.ts +3 -4
- package/select/positioner/SelectPositioner.d.ts +14 -2
- package/select/positioner/SelectPositioner.js +11 -24
- package/select/positioner/SelectPositionerContext.d.ts +2 -2
- package/select/root/SelectRoot.d.ts +12 -6
- package/select/root/SelectRoot.js +41 -29
- package/select/scroll-arrow/SelectScrollArrow.d.ts +13 -1
- package/select/scroll-arrow/SelectScrollArrow.js +47 -63
- package/select/scroll-down-arrow/SelectScrollDownArrow.d.ts +1 -1
- package/select/scroll-up-arrow/SelectScrollUpArrow.d.ts +1 -1
- package/select/store.d.ts +5 -2
- package/select/store.js +1 -0
- package/select/trigger/SelectTrigger.d.ts +6 -4
- package/select/trigger/SelectTrigger.js +6 -2
- package/select/value/SelectValue.d.ts +1 -1
- package/select/value/SelectValue.js +1 -0
- package/separator/Separator.d.ts +1 -1
- package/separator/Separator.js +1 -0
- package/separator/SeparatorDataAttributes.d.ts +7 -0
- package/separator/SeparatorDataAttributes.js +14 -0
- package/slider/control/SliderControl.d.ts +4 -3
- package/slider/control/SliderControl.js +16 -9
- 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/indicator/SliderIndicator.js +6 -6
- package/slider/label/SliderLabel.d.ts +16 -0
- package/slider/label/SliderLabel.js +64 -0
- package/slider/root/SliderRoot.d.ts +17 -6
- package/slider/root/SliderRoot.js +15 -11
- package/slider/root/SliderRootContext.d.ts +5 -2
- package/slider/root/stateAttributesMapping.d.ts +2 -2
- package/slider/thumb/SliderThumb.d.ts +5 -5
- package/slider/thumb/SliderThumb.js +68 -25
- package/slider/track/SliderTrack.d.ts +4 -2
- package/slider/track/SliderTrack.js +1 -0
- package/slider/utils/resolveThumbCollision.d.ts +2 -2
- package/slider/utils/roundValueToStep.d.ts +1 -0
- package/slider/utils/roundValueToStep.js +6 -1
- package/slider/value/SliderValue.d.ts +5 -3
- package/slider/value/SliderValue.js +1 -0
- package/switch/root/SwitchRoot.d.ts +8 -3
- package/switch/root/SwitchRoot.js +19 -11
- package/switch/root/SwitchRootContext.d.ts +4 -4
- package/switch/stateAttributesMapping.d.ts +2 -2
- package/switch/thumb/SwitchThumb.d.ts +3 -3
- package/switch/thumb/SwitchThumb.js +1 -0
- package/tabs/indicator/TabsIndicator.d.ts +13 -4
- package/tabs/indicator/TabsIndicator.js +9 -18
- package/tabs/indicator/TabsIndicatorCssVars.d.ts +1 -1
- package/tabs/indicator/TabsIndicatorCssVars.js +1 -1
- package/tabs/list/TabsList.d.ts +3 -3
- package/tabs/list/TabsList.js +51 -88
- package/tabs/list/TabsListContext.d.ts +2 -0
- package/tabs/panel/TabsPanel.d.ts +9 -3
- package/tabs/panel/TabsPanel.js +1 -0
- package/tabs/panel/TabsPanelDataAttributes.d.ts +8 -0
- package/tabs/panel/TabsPanelDataAttributes.js +10 -1
- package/tabs/root/TabsRoot.d.ts +7 -1
- package/tabs/root/TabsRoot.js +115 -22
- package/tabs/root/TabsRootContext.d.ts +1 -1
- package/tabs/root/stateAttributesMapping.d.ts +2 -2
- package/tabs/tab/TabsTab.d.ts +7 -1
- package/tabs/tab/TabsTab.js +11 -1
- package/temporal-adapter-date-fns/TemporalAdapterDateFns.d.ts +93 -0
- package/temporal-adapter-date-fns/TemporalAdapterDateFns.js +358 -0
- package/temporal-adapter-date-fns/index.d.ts +1 -0
- package/temporal-adapter-date-fns/index.js +12 -0
- package/temporal-adapter-luxon/TemporalAdapterLuxon.d.ts +89 -0
- package/temporal-adapter-luxon/TemporalAdapterLuxon.js +333 -0
- package/temporal-adapter-luxon/index.d.ts +1 -0
- package/temporal-adapter-luxon/index.js +12 -0
- package/temporal-adapter-provider/TemporalAdapterContext.d.ts +10 -0
- package/temporal-adapter-provider/TemporalAdapterContext.js +27 -0
- package/temporal-adapter-provider/TemporalAdapterProvider.d.ts +15 -0
- package/temporal-adapter-provider/TemporalAdapterProvider.js +28 -0
- package/temporal-adapter-provider/index.d.ts +1 -0
- package/temporal-adapter-provider/index.js +12 -0
- package/toast/action/ToastAction.d.ts +1 -1
- package/toast/action/ToastAction.js +1 -0
- package/toast/arrow/ToastArrow.d.ts +10 -1
- package/toast/arrow/ToastArrow.js +1 -0
- package/toast/close/ToastClose.d.ts +1 -1
- package/toast/close/ToastClose.js +1 -0
- package/toast/content/ToastContent.d.ts +1 -1
- package/toast/content/ToastContent.js +1 -0
- package/toast/createToastManager.d.ts +1 -1
- package/toast/description/ToastDescription.d.ts +1 -1
- package/toast/description/ToastDescription.js +1 -0
- package/toast/portal/ToastPortal.d.ts +3 -4
- package/toast/positioner/ToastPositioner.d.ts +12 -3
- package/toast/positioner/ToastPositioner.js +11 -26
- package/toast/positioner/ToastPositionerContext.d.ts +2 -8
- package/toast/provider/ToastProvider.d.ts +2 -0
- package/toast/provider/ToastProvider.js +1 -1
- package/toast/root/ToastRoot.d.ts +20 -7
- package/toast/root/ToastRoot.js +22 -7
- package/toast/root/ToastRootDataAttributes.js +4 -3
- package/toast/store.d.ts +10 -3
- package/toast/store.js +74 -20
- package/toast/title/ToastTitle.d.ts +1 -1
- package/toast/title/ToastTitle.js +1 -0
- package/toast/useToastManager.d.ts +13 -5
- package/toast/viewport/ToastViewport.d.ts +1 -1
- package/toast/viewport/ToastViewport.js +36 -26
- package/toggle/Toggle.d.ts +1 -1
- package/toggle/Toggle.js +2 -0
- package/toggle-group/ToggleGroup.d.ts +1 -1
- package/toggle-group/ToggleGroup.js +4 -1
- package/toolbar/button/ToolbarButton.d.ts +10 -4
- package/toolbar/button/ToolbarButton.js +2 -0
- package/toolbar/group/ToolbarGroup.d.ts +4 -2
- package/toolbar/group/ToolbarGroup.js +1 -0
- package/toolbar/input/ToolbarInput.d.ts +10 -4
- package/toolbar/input/ToolbarInput.js +2 -0
- package/toolbar/link/ToolbarLink.d.ts +4 -1
- package/toolbar/link/ToolbarLink.js +2 -0
- package/toolbar/root/ToolbarRoot.d.ts +7 -1
- package/toolbar/root/ToolbarRoot.js +2 -0
- package/toolbar/separator/ToolbarSeparator.d.ts +4 -2
- package/tooltip/arrow/TooltipArrow.d.ts +13 -1
- package/tooltip/arrow/TooltipArrow.js +2 -1
- package/tooltip/index.d.ts +1 -0
- package/tooltip/popup/TooltipPopup.d.ts +13 -1
- package/tooltip/popup/TooltipPopup.js +1 -0
- package/tooltip/portal/TooltipPortal.d.ts +3 -4
- package/tooltip/positioner/TooltipPositioner.d.ts +11 -2
- package/tooltip/positioner/TooltipPositioner.js +10 -29
- package/tooltip/positioner/TooltipPositionerContext.d.ts +2 -9
- package/tooltip/provider/TooltipProvider.d.ts +2 -0
- package/tooltip/root/TooltipRoot.d.ts +5 -5
- package/tooltip/root/TooltipRoot.js +3 -3
- package/tooltip/store/TooltipStore.d.ts +2 -0
- package/tooltip/store/TooltipStore.js +3 -0
- package/tooltip/trigger/TooltipTrigger.d.ts +6 -1
- package/tooltip/trigger/TooltipTrigger.js +8 -1
- package/tooltip/viewport/TooltipViewport.d.ts +16 -12
- package/tooltip/viewport/TooltipViewport.js +1 -0
- package/types/index.d.ts +16 -1
- package/types/temporal/index.d.ts +2 -0
- package/types/temporal/index.js +27 -0
- package/types/temporal/temporal-adapter.d.ts +371 -0
- package/types/temporal/temporal-adapter.js +5 -0
- package/types/temporal/temporal.d.ts +35 -0
- package/types/temporal/temporal.js +5 -0
- package/unstable-use-media-query/index.d.ts +2 -0
- package/unstable-use-media-query/index.js +2 -6
- package/use-button/useButton.d.ts +8 -5
- package/use-button/useButton.js +49 -20
- package/use-render/useRender.d.ts +8 -6
- package/utils/FloatingPortalLite.d.ts +4 -2
- package/utils/FloatingPortalLite.js +1 -0
- package/utils/InternalBackdrop.d.ts +3 -1
- package/utils/InternalBackdrop.js +2 -13
- 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 +3 -3
- package/utils/getElementAtPoint.d.ts +1 -0
- package/utils/getElementAtPoint.js +9 -0
- package/utils/getPseudoElementBounds.js +4 -2
- package/utils/popups/store.js +1 -1
- package/utils/popups/useTriggerFocusGuards.d.ts +28 -0
- package/utils/popups/useTriggerFocusGuards.js +60 -0
- package/utils/reason-parts.d.ts +4 -1
- package/utils/reason-parts.js +5 -2
- 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/{scroll-area/utils → utils}/scrollEdges.d.ts +1 -0
- package/{scroll-area/utils → utils}/scrollEdges.js +5 -1
- package/utils/temporal/date-helpers.d.ts +15 -0
- package/utils/temporal/date-helpers.js +54 -0
- package/utils/temporal/getDateManager.d.ts +5 -0
- package/utils/temporal/getDateManager.js +25 -0
- package/utils/temporal/getInitialReferenceDate.d.ts +27 -0
- package/utils/temporal/getInitialReferenceDate.js +34 -0
- package/utils/temporal/types.d.ts +65 -0
- package/utils/temporal/types.js +5 -0
- package/utils/temporal/validateDate.d.ts +27 -0
- package/utils/temporal/validateDate.js +31 -0
- package/utils/types.d.ts +18 -25
- package/utils/useAnchorPositioning.d.ts +53 -18
- package/utils/useAnchorPositioning.js +23 -8
- package/utils/useAnchoredPopupScrollLock.d.ts +6 -0
- package/utils/useAnchoredPopupScrollLock.js +36 -0
- package/utils/useAnimationsFinished.js +48 -51
- package/utils/useFocusableWhenDisabled.d.ts +2 -5
- package/utils/useIsHydrating.d.ts +5 -0
- package/utils/useIsHydrating.js +25 -0
- package/utils/useMixedToggleClickHandler.d.ts +2 -4
- package/utils/useOpenChangeComplete.d.ts +2 -4
- package/utils/useOpenInteractionType.d.ts +0 -1
- package/utils/useOpenInteractionType.js +7 -5
- package/utils/usePopupAutoResize.js +1 -2
- package/utils/usePopupViewport.js +13 -9
- package/utils/usePositioner.d.ts +23 -0
- package/utils/usePositioner.js +39 -0
- package/utils/usePressAndHold.d.ts +58 -0
- package/utils/usePressAndHold.js +198 -0
- package/utils/useRegisteredLabelId.d.ts +1 -0
- package/utils/useRegisteredLabelId.js +19 -0
- package/utils/useRenderElement.d.ts +6 -9
- package/utils/useRenderElement.js +31 -1
- package/utils/useSwipeDismiss.d.ts +92 -92
- package/utils/useSwipeDismiss.js +5 -2
- package/utils/useTransitionStatus.js +3 -3
- package/esm/field/useField.d.ts +0 -14
- package/esm/field/useField.js +0 -75
- package/esm/navigation-menu/utils/setFixedSize.d.ts +0 -1
- package/esm/navigation-menu/utils/setFixedSize.js +0 -11
- package/esm/scroll-area/utils/onVisible.d.ts +0 -4
- package/esm/scroll-area/utils/onVisible.js +0 -20
- package/field/useField.d.ts +0 -14
- package/field/useField.js +0 -81
- package/navigation-menu/utils/setFixedSize.d.ts +0 -1
- package/navigation-menu/utils/setFixedSize.js +0 -17
- package/scroll-area/utils/onVisible.d.ts +0 -4
- package/scroll-area/utils/onVisible.js +0 -26
- /package/combobox/clear/{ComboboxClearDataAtributes.d.ts → ComboboxClearDataAttributes.d.ts} +0 -0
- /package/combobox/clear/{ComboboxClearDataAtributes.js → ComboboxClearDataAttributes.js} +0 -0
- /package/combobox/item/{ComboboxtemDataAttributes.d.ts → ComboboxItemDataAttributes.d.ts} +0 -0
- /package/combobox/item/{ComboboxtemDataAttributes.js → ComboboxItemDataAttributes.js} +0 -0
- /package/esm/combobox/clear/{ComboboxClearDataAtributes.d.ts → ComboboxClearDataAttributes.d.ts} +0 -0
- /package/esm/combobox/clear/{ComboboxClearDataAtributes.js → ComboboxClearDataAttributes.js} +0 -0
- /package/esm/combobox/item/{ComboboxtemDataAttributes.d.ts → ComboboxItemDataAttributes.d.ts} +0 -0
- /package/esm/combobox/item/{ComboboxtemDataAttributes.js → ComboboxItemDataAttributes.js} +0 -0
- /package/esm/navigation-menu/link/{NavigationMenuLinikDataAttributes.d.ts → NavigationMenuLinkDataAttributes.d.ts} +0 -0
- /package/esm/navigation-menu/link/{NavigationMenuLinikDataAttributes.js → NavigationMenuLinkDataAttributes.js} +0 -0
- /package/esm/navigation-menu/positioner/{NavigationPositionerDataAttributes.d.ts → NavigationMenuPositionerDataAttributes.d.ts} +0 -0
- /package/esm/navigation-menu/positioner/{NavigationPositionerDataAttributes.js → NavigationMenuPositionerDataAttributes.js} +0 -0
- /package/navigation-menu/link/{NavigationMenuLinikDataAttributes.d.ts → NavigationMenuLinkDataAttributes.d.ts} +0 -0
- /package/navigation-menu/link/{NavigationMenuLinikDataAttributes.js → NavigationMenuLinkDataAttributes.js} +0 -0
- /package/navigation-menu/positioner/{NavigationPositionerDataAttributes.d.ts → NavigationMenuPositionerDataAttributes.d.ts} +0 -0
- /package/navigation-menu/positioner/{NavigationPositionerDataAttributes.js → NavigationMenuPositionerDataAttributes.js} +0 -0
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as ReactDOM from 'react-dom';
|
|
5
|
-
import {
|
|
5
|
+
import { isHTMLElement } from '@floating-ui/utils/dom';
|
|
6
|
+
import { addEventListener } from '@base-ui/utils/addEventListener';
|
|
6
7
|
import { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';
|
|
8
|
+
import { ownerWindow } from '@base-ui/utils/owner';
|
|
9
|
+
import { useStableCallback } from '@base-ui/utils/useStableCallback';
|
|
7
10
|
import { useTimeout } from '@base-ui/utils/useTimeout';
|
|
8
11
|
import { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
12
|
+
import { useValueAsRef } from '@base-ui/utils/useValueAsRef';
|
|
13
|
+
import { safePolygon, useClick, useFloatingRootContext, useFloatingTree, useHoverReferenceInteraction, useInteractions } from "../../floating-ui-react/index.js";
|
|
14
|
+
import { applySafePolygonPointerEventsMutation, clearSafePolygonPointerEventsMutation, useHoverInteractionSharedState } from "../../floating-ui-react/hooks/useHoverInteractionSharedState.js";
|
|
15
|
+
import { contains, getTabbableAfterElement, getNextTabbable, getPreviousTabbable, isOutsideEvent, stopEvent } from "../../floating-ui-react/utils.js";
|
|
11
16
|
import { useNavigationMenuItemContext } from "../item/NavigationMenuItemContext.js";
|
|
12
17
|
import { useNavigationMenuRootContext, useNavigationMenuTreeContext } from "../root/NavigationMenuRootContext.js";
|
|
13
18
|
import { createChangeEventDetails } from "../../utils/createBaseUIEventDetails.js";
|
|
@@ -15,11 +20,21 @@ import { REASONS } from "../../utils/reasons.js";
|
|
|
15
20
|
import { EMPTY_ARRAY, ownerVisuallyHidden, PATIENT_CLICK_THRESHOLD } from "../../utils/constants.js";
|
|
16
21
|
import { FocusGuard } from "../../utils/FocusGuard.js";
|
|
17
22
|
import { pressableTriggerOpenStateMapping } from "../../utils/popupStateMapping.js";
|
|
23
|
+
import { TransitionStatusDataAttributes } from "../../utils/stateAttributesMapping.js";
|
|
18
24
|
import { isOutsideMenuEvent } from "../utils/isOutsideMenuEvent.js";
|
|
19
25
|
import { CompositeItem } from "../../composite/item/CompositeItem.js";
|
|
20
26
|
import { useButton } from "../../use-button/index.js";
|
|
27
|
+
import { useAnimationsFinished } from "../../utils/useAnimationsFinished.js";
|
|
28
|
+
import { getCssDimensions } from "../../utils/getCssDimensions.js";
|
|
21
29
|
import { NAVIGATION_MENU_TRIGGER_IDENTIFIER } from "../utils/constants.js";
|
|
22
30
|
import { useNavigationMenuDismissContext } from "../list/NavigationMenuDismissContext.js";
|
|
31
|
+
import { NavigationMenuPopupCssVars } from "../popup/NavigationMenuPopupCssVars.js";
|
|
32
|
+
import { NavigationMenuPositionerCssVars } from "../positioner/NavigationMenuPositionerCssVars.js";
|
|
33
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
34
|
+
const DEFAULT_SIZE = {
|
|
35
|
+
width: 0,
|
|
36
|
+
height: 0
|
|
37
|
+
};
|
|
23
38
|
|
|
24
39
|
/**
|
|
25
40
|
* Opens the navigation menu popup when hovered or clicked, revealing the
|
|
@@ -28,13 +43,13 @@ import { useNavigationMenuDismissContext } from "../list/NavigationMenuDismissCo
|
|
|
28
43
|
*
|
|
29
44
|
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
30
45
|
*/
|
|
31
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
32
46
|
export const NavigationMenuTrigger = /*#__PURE__*/React.forwardRef(function NavigationMenuTrigger(componentProps, forwardedRef) {
|
|
33
47
|
const {
|
|
34
48
|
className,
|
|
35
49
|
render,
|
|
36
50
|
nativeButton = true,
|
|
37
51
|
disabled,
|
|
52
|
+
style,
|
|
38
53
|
...elementProps
|
|
39
54
|
} = componentProps;
|
|
40
55
|
const {
|
|
@@ -47,12 +62,15 @@ export const NavigationMenuTrigger = /*#__PURE__*/React.forwardRef(function Navi
|
|
|
47
62
|
setFloatingRootContext,
|
|
48
63
|
popupElement,
|
|
49
64
|
viewportElement,
|
|
65
|
+
transitionStatus,
|
|
50
66
|
rootRef,
|
|
51
67
|
beforeOutsideRef,
|
|
52
68
|
afterOutsideRef,
|
|
53
69
|
afterInsideRef,
|
|
54
70
|
beforeInsideRef,
|
|
55
71
|
prevTriggerElementRef,
|
|
72
|
+
popupAutoSizeResetRef,
|
|
73
|
+
currentContentRef,
|
|
56
74
|
delay,
|
|
57
75
|
closeDelay,
|
|
58
76
|
orientation,
|
|
@@ -67,17 +85,256 @@ export const NavigationMenuTrigger = /*#__PURE__*/React.forwardRef(function Navi
|
|
|
67
85
|
const dismissProps = useNavigationMenuDismissContext();
|
|
68
86
|
const stickIfOpenTimeout = useTimeout();
|
|
69
87
|
const focusFrame = useAnimationFrame();
|
|
88
|
+
const mutationFrame = useAnimationFrame();
|
|
89
|
+
const resizeFrame = useAnimationFrame();
|
|
90
|
+
const sizeFrame = useAnimationFrame();
|
|
70
91
|
const [triggerElement, setTriggerElement] = React.useState(null);
|
|
71
92
|
const [stickIfOpen, setStickIfOpen] = React.useState(true);
|
|
72
93
|
const [pointerType, setPointerType] = React.useState('');
|
|
94
|
+
const triggerElementRef = React.useRef(null);
|
|
73
95
|
const allowFocusRef = React.useRef(false);
|
|
96
|
+
const prevSizeRef = React.useRef(DEFAULT_SIZE);
|
|
97
|
+
const skipAutoSizeSyncRef = React.useRef(false);
|
|
74
98
|
const isActiveItem = open && value === itemValue;
|
|
99
|
+
const isActiveItemRef = useValueAsRef(isActiveItem);
|
|
75
100
|
const interactionsEnabled = positionerElement ? true : !value;
|
|
101
|
+
const hoverFloatingElement = positionerElement || viewportElement;
|
|
102
|
+
const hoverInteractionsEnabled = hoverFloatingElement ? true : !value;
|
|
103
|
+
const runOnceAnimationsFinish = useAnimationsFinished(popupElement, false, false);
|
|
104
|
+
const handleTriggerElement = React.useCallback(element => {
|
|
105
|
+
triggerElementRef.current = element;
|
|
106
|
+
setTriggerElement(element);
|
|
107
|
+
}, []);
|
|
108
|
+
const cancelAutoSizeReset = useStableCallback((force = false) => {
|
|
109
|
+
if (!force && popupAutoSizeResetRef.current.owner !== itemValue) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
popupAutoSizeResetRef.current.abortController?.abort();
|
|
113
|
+
popupAutoSizeResetRef.current.abortController = null;
|
|
114
|
+
popupAutoSizeResetRef.current.owner = null;
|
|
115
|
+
});
|
|
116
|
+
React.useEffect(cancelAutoSizeReset, [isActiveItem, cancelAutoSizeReset]);
|
|
117
|
+
function setAutoSizes() {
|
|
118
|
+
if (!popupElement) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupWidth, 'auto');
|
|
122
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupHeight, 'auto');
|
|
123
|
+
}
|
|
124
|
+
function clearFixedSizes() {
|
|
125
|
+
if (!popupElement || !positionerElement) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
popupElement.style.removeProperty(NavigationMenuPopupCssVars.popupWidth);
|
|
129
|
+
popupElement.style.removeProperty(NavigationMenuPopupCssVars.popupHeight);
|
|
130
|
+
positionerElement.style.removeProperty(NavigationMenuPositionerCssVars.positionerWidth);
|
|
131
|
+
positionerElement.style.removeProperty(NavigationMenuPositionerCssVars.positionerHeight);
|
|
132
|
+
}
|
|
133
|
+
function setSharedFixedSizes(width, height) {
|
|
134
|
+
if (!popupElement || !positionerElement) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupWidth, `${width}px`);
|
|
138
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupHeight, `${height}px`);
|
|
139
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerWidth, `${width}px`);
|
|
140
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerHeight, `${height}px`);
|
|
141
|
+
}
|
|
142
|
+
function scheduleAutoSizeReset() {
|
|
143
|
+
cancelAutoSizeReset(true);
|
|
144
|
+
const abortController = new AbortController();
|
|
145
|
+
popupAutoSizeResetRef.current.abortController = abortController;
|
|
146
|
+
popupAutoSizeResetRef.current.owner = itemValue;
|
|
147
|
+
runOnceAnimationsFinish(() => {
|
|
148
|
+
if (popupAutoSizeResetRef.current.abortController !== abortController || popupAutoSizeResetRef.current.owner !== itemValue) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
popupAutoSizeResetRef.current.abortController = null;
|
|
152
|
+
popupAutoSizeResetRef.current.owner = null;
|
|
153
|
+
setAutoSizes();
|
|
154
|
+
}, abortController.signal);
|
|
155
|
+
}
|
|
156
|
+
const handleValueChange = useStableCallback((currentWidth, currentHeight, options = {}) => {
|
|
157
|
+
if (!popupElement || !positionerElement) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
cancelAutoSizeReset(true);
|
|
161
|
+
const {
|
|
162
|
+
syncPositioner = false
|
|
163
|
+
} = options;
|
|
164
|
+
clearFixedSizes();
|
|
165
|
+
const {
|
|
166
|
+
width,
|
|
167
|
+
height
|
|
168
|
+
} = getCssDimensions(popupElement);
|
|
169
|
+
const measuredWidth = width || prevSizeRef.current.width;
|
|
170
|
+
const measuredHeight = height || prevSizeRef.current.height;
|
|
171
|
+
if (currentHeight === 0 || currentWidth === 0) {
|
|
172
|
+
currentWidth = measuredWidth;
|
|
173
|
+
currentHeight = measuredHeight;
|
|
174
|
+
}
|
|
175
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupWidth, `${currentWidth}px`);
|
|
176
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupHeight, `${currentHeight}px`);
|
|
177
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerWidth, `${syncPositioner ? currentWidth : measuredWidth}px`);
|
|
178
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerHeight, `${syncPositioner ? currentHeight : measuredHeight}px`);
|
|
179
|
+
sizeFrame.request(() => {
|
|
180
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupWidth, `${measuredWidth}px`);
|
|
181
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupHeight, `${measuredHeight}px`);
|
|
182
|
+
if (syncPositioner) {
|
|
183
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerWidth, `${measuredWidth}px`);
|
|
184
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerHeight, `${measuredHeight}px`);
|
|
185
|
+
}
|
|
186
|
+
scheduleAutoSizeReset();
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
const handleInterruptedMutationResize = useStableCallback((currentWidth, currentHeight) => {
|
|
190
|
+
if (!popupElement || !positionerElement) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
sizeFrame.cancel();
|
|
194
|
+
mutationFrame.cancel();
|
|
195
|
+
cancelAutoSizeReset(true);
|
|
196
|
+
if (currentWidth === 0 || currentHeight === 0) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
setSharedFixedSizes(currentWidth, currentHeight);
|
|
200
|
+
mutationFrame.request(() => {
|
|
201
|
+
mutationFrame.request(() => {
|
|
202
|
+
clearFixedSizes();
|
|
203
|
+
const {
|
|
204
|
+
width,
|
|
205
|
+
height
|
|
206
|
+
} = getCssDimensions(popupElement);
|
|
207
|
+
const measuredWidth = width || currentWidth || prevSizeRef.current.width;
|
|
208
|
+
const measuredHeight = height || currentHeight || prevSizeRef.current.height;
|
|
209
|
+
setSharedFixedSizes(currentWidth, currentHeight);
|
|
210
|
+
sizeFrame.request(() => {
|
|
211
|
+
setSharedFixedSizes(measuredWidth, measuredHeight);
|
|
212
|
+
scheduleAutoSizeReset();
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
const syncCurrentSize = useStableCallback(() => {
|
|
218
|
+
if (!popupElement || !positionerElement) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
sizeFrame.cancel();
|
|
222
|
+
cancelAutoSizeReset(true);
|
|
223
|
+
clearFixedSizes();
|
|
224
|
+
const {
|
|
225
|
+
width,
|
|
226
|
+
height
|
|
227
|
+
} = getCssDimensions(popupElement);
|
|
228
|
+
if (width === 0 || height === 0) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
prevSizeRef.current = {
|
|
232
|
+
width,
|
|
233
|
+
height
|
|
234
|
+
};
|
|
235
|
+
setAutoSizes();
|
|
236
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerWidth, `${width}px`);
|
|
237
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerHeight, `${height}px`);
|
|
238
|
+
});
|
|
239
|
+
const getMutationBaseline = useStableCallback(() => {
|
|
240
|
+
if (!popupElement) {
|
|
241
|
+
return {
|
|
242
|
+
size: prevSizeRef.current,
|
|
243
|
+
syncPositioner: false
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
const popupWidth = popupElement.style.getPropertyValue(NavigationMenuPopupCssVars.popupWidth);
|
|
247
|
+
const popupHeight = popupElement.style.getPropertyValue(NavigationMenuPopupCssVars.popupHeight);
|
|
248
|
+
const isResizing = popupWidth !== '' && popupWidth !== 'auto' && popupHeight !== '' && popupHeight !== 'auto';
|
|
249
|
+
if (!isResizing) {
|
|
250
|
+
return {
|
|
251
|
+
size: prevSizeRef.current,
|
|
252
|
+
syncPositioner: false
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
return {
|
|
256
|
+
size: {
|
|
257
|
+
width: popupElement.offsetWidth || prevSizeRef.current.width,
|
|
258
|
+
height: popupElement.offsetHeight || prevSizeRef.current.height
|
|
259
|
+
},
|
|
260
|
+
syncPositioner: true
|
|
261
|
+
};
|
|
262
|
+
});
|
|
76
263
|
React.useEffect(() => {
|
|
77
264
|
if (!open) {
|
|
78
265
|
stickIfOpenTimeout.clear();
|
|
266
|
+
mutationFrame.cancel();
|
|
267
|
+
resizeFrame.cancel();
|
|
268
|
+
sizeFrame.cancel();
|
|
269
|
+
cancelAutoSizeReset(true);
|
|
270
|
+
skipAutoSizeSyncRef.current = false;
|
|
271
|
+
setPointerType('');
|
|
272
|
+
}
|
|
273
|
+
}, [stickIfOpenTimeout, open, mutationFrame, resizeFrame, sizeFrame, cancelAutoSizeReset]);
|
|
274
|
+
React.useEffect(() => {
|
|
275
|
+
if (!mounted) {
|
|
276
|
+
prevSizeRef.current = DEFAULT_SIZE;
|
|
277
|
+
}
|
|
278
|
+
}, [mounted]);
|
|
279
|
+
React.useEffect(() => {
|
|
280
|
+
if (!popupElement || typeof ResizeObserver !== 'function') {
|
|
281
|
+
return undefined;
|
|
79
282
|
}
|
|
80
|
-
|
|
283
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
284
|
+
prevSizeRef.current = {
|
|
285
|
+
width: popupElement.offsetWidth,
|
|
286
|
+
height: popupElement.offsetHeight
|
|
287
|
+
};
|
|
288
|
+
});
|
|
289
|
+
resizeObserver.observe(popupElement);
|
|
290
|
+
return () => {
|
|
291
|
+
resizeObserver.disconnect();
|
|
292
|
+
};
|
|
293
|
+
}, [popupElement]);
|
|
294
|
+
React.useEffect(() => {
|
|
295
|
+
if (!open || !isActiveItem || !popupElement || !positionerElement) {
|
|
296
|
+
return undefined;
|
|
297
|
+
}
|
|
298
|
+
const win = ownerWindow(positionerElement);
|
|
299
|
+
function handleResize() {
|
|
300
|
+
resizeFrame.cancel();
|
|
301
|
+
resizeFrame.request(syncCurrentSize);
|
|
302
|
+
}
|
|
303
|
+
const unsubscribe = addEventListener(win, 'resize', handleResize);
|
|
304
|
+
return () => {
|
|
305
|
+
resizeFrame.cancel();
|
|
306
|
+
unsubscribe();
|
|
307
|
+
};
|
|
308
|
+
}, [open, isActiveItem, popupElement, positionerElement, resizeFrame, syncCurrentSize]);
|
|
309
|
+
React.useEffect(() => {
|
|
310
|
+
const observedElement = currentContentRef.current;
|
|
311
|
+
if (!observedElement || !popupElement || !isActiveItem || typeof MutationObserver !== 'function') {
|
|
312
|
+
return undefined;
|
|
313
|
+
}
|
|
314
|
+
const mutationObserver = new MutationObserver(() => {
|
|
315
|
+
if (transitionStatus === 'starting' || popupElement.hasAttribute(TransitionStatusDataAttributes.startingStyle)) {
|
|
316
|
+
syncCurrentSize();
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
const {
|
|
320
|
+
size,
|
|
321
|
+
syncPositioner
|
|
322
|
+
} = getMutationBaseline();
|
|
323
|
+
if (syncPositioner) {
|
|
324
|
+
handleInterruptedMutationResize(size.width, size.height);
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
handleValueChange(size.width, size.height);
|
|
328
|
+
});
|
|
329
|
+
mutationObserver.observe(observedElement, {
|
|
330
|
+
childList: true,
|
|
331
|
+
subtree: true,
|
|
332
|
+
characterData: true
|
|
333
|
+
});
|
|
334
|
+
return () => {
|
|
335
|
+
mutationObserver.disconnect();
|
|
336
|
+
};
|
|
337
|
+
}, [currentContentRef, popupElement, isActiveItem, transitionStatus, getMutationBaseline, handleInterruptedMutationResize, handleValueChange, syncCurrentSize]);
|
|
81
338
|
React.useEffect(() => {
|
|
82
339
|
if (isActiveItem && open && popupElement && allowFocusRef.current) {
|
|
83
340
|
allowFocusRef.current = false;
|
|
@@ -89,6 +346,29 @@ export const NavigationMenuTrigger = /*#__PURE__*/React.forwardRef(function Navi
|
|
|
89
346
|
focusFrame.cancel();
|
|
90
347
|
};
|
|
91
348
|
}, [beforeOutsideRef, focusFrame, isActiveItem, open, popupElement]);
|
|
349
|
+
useIsoLayoutEffect(() => {
|
|
350
|
+
if (isActiveItemRef.current && open && popupElement) {
|
|
351
|
+
if (transitionStatus === 'starting') {
|
|
352
|
+
const hasNestedMenu = currentContentRef.current?.querySelector('[data-nested]') != null;
|
|
353
|
+
if (hasNestedMenu) {
|
|
354
|
+
sizeFrame.request(syncCurrentSize);
|
|
355
|
+
return () => {
|
|
356
|
+
sizeFrame.cancel();
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
if (skipAutoSizeSyncRef.current) {
|
|
361
|
+
skipAutoSizeSyncRef.current = false;
|
|
362
|
+
return undefined;
|
|
363
|
+
}
|
|
364
|
+
const {
|
|
365
|
+
width,
|
|
366
|
+
height
|
|
367
|
+
} = getCssDimensions(popupElement);
|
|
368
|
+
handleValueChange(width, height);
|
|
369
|
+
}
|
|
370
|
+
return undefined;
|
|
371
|
+
}, [currentContentRef, handleValueChange, isActiveItemRef, open, popupElement, sizeFrame, syncCurrentSize, transitionStatus]);
|
|
92
372
|
function handleOpenChange(nextOpen, eventDetails) {
|
|
93
373
|
const isHover = eventDetails.reason === REASONS.triggerHover;
|
|
94
374
|
if (!interactionsEnabled) {
|
|
@@ -128,35 +408,68 @@ export const NavigationMenuTrigger = /*#__PURE__*/React.forwardRef(function Navi
|
|
|
128
408
|
onOpenChange: handleOpenChange,
|
|
129
409
|
elements: {
|
|
130
410
|
reference: triggerElement,
|
|
131
|
-
floating:
|
|
411
|
+
floating: hoverFloatingElement
|
|
132
412
|
}
|
|
133
413
|
});
|
|
134
|
-
const
|
|
414
|
+
const hoverInteractionState = useHoverInteractionSharedState(context);
|
|
415
|
+
const shouldBlockSafePolygonPointerEvents = pointerType !== 'touch';
|
|
416
|
+
React.useEffect(() => {
|
|
417
|
+
if (!open) {
|
|
418
|
+
context.context.dataRef.current.openEvent = undefined;
|
|
419
|
+
hoverInteractionState.pointerType = undefined;
|
|
420
|
+
hoverInteractionState.interactedInside = false;
|
|
421
|
+
hoverInteractionState.restTimeoutPending = false;
|
|
422
|
+
hoverInteractionState.openChangeTimeout.clear();
|
|
423
|
+
hoverInteractionState.restTimeout.clear();
|
|
424
|
+
clearSafePolygonPointerEventsMutation(hoverInteractionState);
|
|
425
|
+
}
|
|
426
|
+
}, [context, hoverInteractionState, open]);
|
|
427
|
+
const getInlineHandleCloseContext = useStableCallback(() => {
|
|
428
|
+
if (!nested || positionerElement || !triggerElementRef.current || !hoverFloatingElement) {
|
|
429
|
+
return null;
|
|
430
|
+
}
|
|
431
|
+
return getHandleCloseContext(triggerElementRef.current, hoverFloatingElement, nodeId);
|
|
432
|
+
});
|
|
433
|
+
function getScope() {
|
|
434
|
+
if (!nested || !positionerElement) {
|
|
435
|
+
return triggerElementRef.current?.closest('ul') ?? null;
|
|
436
|
+
}
|
|
437
|
+
return null;
|
|
438
|
+
}
|
|
439
|
+
const hoverProps = useHoverReferenceInteraction(context, {
|
|
440
|
+
enabled: hoverInteractionsEnabled,
|
|
135
441
|
move: false,
|
|
136
442
|
handleClose: safePolygon({
|
|
137
|
-
blockPointerEvents:
|
|
443
|
+
blockPointerEvents: shouldBlockSafePolygonPointerEvents,
|
|
444
|
+
getScope
|
|
138
445
|
}),
|
|
139
446
|
restMs: mounted && positionerElement ? 0 : delay,
|
|
140
447
|
delay: {
|
|
141
448
|
close: closeDelay
|
|
142
|
-
}
|
|
449
|
+
},
|
|
450
|
+
triggerElementRef,
|
|
451
|
+
getHandleCloseContext: getInlineHandleCloseContext
|
|
143
452
|
});
|
|
453
|
+
const hover = React.useMemo(() => hoverProps ? {
|
|
454
|
+
reference: hoverProps
|
|
455
|
+
} : undefined, [hoverProps]);
|
|
144
456
|
const click = useClick(context, {
|
|
145
457
|
enabled: interactionsEnabled,
|
|
146
458
|
stickIfOpen,
|
|
147
459
|
toggle: isActiveItem
|
|
148
460
|
});
|
|
461
|
+
const {
|
|
462
|
+
getReferenceProps
|
|
463
|
+
} = useInteractions([hover, click]);
|
|
149
464
|
useIsoLayoutEffect(() => {
|
|
150
465
|
if (isActiveItem) {
|
|
151
466
|
setFloatingRootContext(context);
|
|
152
467
|
prevTriggerElementRef.current = triggerElement;
|
|
153
468
|
}
|
|
154
469
|
}, [isActiveItem, context, setFloatingRootContext, prevTriggerElementRef, triggerElement]);
|
|
155
|
-
const {
|
|
156
|
-
getReferenceProps
|
|
157
|
-
} = useInteractions([hover, click]);
|
|
158
470
|
function handleActivation(event) {
|
|
159
471
|
ReactDOM.flushSync(() => {
|
|
472
|
+
const currentTarget = isHTMLElement(event.currentTarget) ? event.currentTarget : null;
|
|
160
473
|
const prevTriggerRect = prevTriggerElementRef.current?.getBoundingClientRect();
|
|
161
474
|
if (mounted && prevTriggerRect && triggerElement) {
|
|
162
475
|
const nextTriggerRect = triggerElement.getBoundingClientRect();
|
|
@@ -172,7 +485,7 @@ export const NavigationMenuTrigger = /*#__PURE__*/React.forwardRef(function Navi
|
|
|
172
485
|
// Reset the `openEvent` to `undefined` when the active item changes so that a
|
|
173
486
|
// `click` -> `hover` on new trigger -> `hover` back to old trigger doesn't unexpectedly
|
|
174
487
|
// cause the popup to remain stuck open when leaving the old trigger.
|
|
175
|
-
if (event.type !== 'click') {
|
|
488
|
+
if (event.type !== 'click' && value != null) {
|
|
176
489
|
context.context.dataRef.current.openEvent = undefined;
|
|
177
490
|
}
|
|
178
491
|
if (pointerType === 'touch' && event.type !== 'click') {
|
|
@@ -181,20 +494,55 @@ export const NavigationMenuTrigger = /*#__PURE__*/React.forwardRef(function Navi
|
|
|
181
494
|
if (value != null) {
|
|
182
495
|
setValue(itemValue, createChangeEventDetails(event.type === 'mouseenter' ? REASONS.triggerHover : REASONS.triggerPress, event.nativeEvent));
|
|
183
496
|
}
|
|
497
|
+
if (event.type === 'mouseenter' && shouldBlockSafePolygonPointerEvents && (!nested || !positionerElement) && hoverFloatingElement && currentTarget) {
|
|
498
|
+
const applyPointerEventsMutation = () => {
|
|
499
|
+
const scopeElement = getScope() ?? currentTarget.ownerDocument.body;
|
|
500
|
+
applySafePolygonPointerEventsMutation(hoverInteractionState, {
|
|
501
|
+
scopeElement,
|
|
502
|
+
referenceElement: currentTarget,
|
|
503
|
+
floatingElement: hoverFloatingElement
|
|
504
|
+
});
|
|
505
|
+
};
|
|
506
|
+
if (value != null && value !== itemValue) {
|
|
507
|
+
queueMicrotask(applyPointerEventsMutation);
|
|
508
|
+
} else {
|
|
509
|
+
applyPointerEventsMutation();
|
|
510
|
+
}
|
|
511
|
+
}
|
|
184
512
|
});
|
|
185
513
|
}
|
|
514
|
+
const handleOpenEvent = useStableCallback(event => {
|
|
515
|
+
if (!popupElement || !positionerElement) {
|
|
516
|
+
handleActivation(event);
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
const {
|
|
520
|
+
width,
|
|
521
|
+
height
|
|
522
|
+
} = getCssDimensions(popupElement);
|
|
523
|
+
const shouldSkipAutoSizeSync = value != null && value !== itemValue && (event.type === 'click' || pointerType !== 'touch');
|
|
524
|
+
handleActivation(event);
|
|
525
|
+
if (shouldSkipAutoSizeSync) {
|
|
526
|
+
skipAutoSizeSyncRef.current = true;
|
|
527
|
+
}
|
|
528
|
+
handleValueChange(width, height);
|
|
529
|
+
});
|
|
186
530
|
const state = {
|
|
187
531
|
open: isActiveItem
|
|
188
532
|
};
|
|
189
533
|
function handleSetPointerType(event) {
|
|
190
534
|
setPointerType(event.pointerType);
|
|
191
535
|
}
|
|
536
|
+
function handleTriggerPointerDown(event) {
|
|
537
|
+
handleSetPointerType(event);
|
|
538
|
+
clearSafePolygonPointerEventsMutation(hoverInteractionState);
|
|
539
|
+
}
|
|
192
540
|
const defaultProps = {
|
|
193
541
|
tabIndex: 0,
|
|
194
|
-
onMouseEnter:
|
|
195
|
-
onClick:
|
|
542
|
+
onMouseEnter: handleOpenEvent,
|
|
543
|
+
onClick: handleOpenEvent,
|
|
196
544
|
onPointerEnter: handleSetPointerType,
|
|
197
|
-
onPointerDown:
|
|
545
|
+
onPointerDown: handleTriggerPointerDown,
|
|
198
546
|
'aria-expanded': isActiveItem,
|
|
199
547
|
'aria-controls': isActiveItem ? popupElement?.id : undefined,
|
|
200
548
|
[NAVIGATION_MENU_TRIGGER_IDENTIFIER]: '',
|
|
@@ -220,7 +568,7 @@ export const NavigationMenuTrigger = /*#__PURE__*/React.forwardRef(function Navi
|
|
|
220
568
|
const openVertical = orientation === 'vertical' && event.key === 'ArrowRight';
|
|
221
569
|
if (openHorizontal || openVertical) {
|
|
222
570
|
setValue(itemValue, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent));
|
|
223
|
-
|
|
571
|
+
handleOpenEvent(event);
|
|
224
572
|
stopEvent(event);
|
|
225
573
|
}
|
|
226
574
|
},
|
|
@@ -246,15 +594,16 @@ export const NavigationMenuTrigger = /*#__PURE__*/React.forwardRef(function Navi
|
|
|
246
594
|
focusableWhenDisabled: true,
|
|
247
595
|
native: nativeButton
|
|
248
596
|
});
|
|
249
|
-
const referenceElement =
|
|
597
|
+
const referenceElement = hoverFloatingElement;
|
|
250
598
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
251
599
|
children: [/*#__PURE__*/_jsx(CompositeItem, {
|
|
252
600
|
tag: "button",
|
|
253
601
|
render: render,
|
|
254
602
|
className: className,
|
|
603
|
+
style: style,
|
|
255
604
|
state: state,
|
|
256
605
|
stateAttributesMapping: pressableTriggerOpenStateMapping,
|
|
257
|
-
refs: [forwardedRef,
|
|
606
|
+
refs: [forwardedRef, handleTriggerElement, buttonRef],
|
|
258
607
|
props: [getReferenceProps, dismissProps?.reference || EMPTY_ARRAY, defaultProps, elementProps, getButtonProps]
|
|
259
608
|
}), isActiveItem && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
260
609
|
children: [/*#__PURE__*/_jsx(FocusGuard, {
|
|
@@ -274,12 +623,18 @@ export const NavigationMenuTrigger = /*#__PURE__*/React.forwardRef(function Navi
|
|
|
274
623
|
ref: afterOutsideRef,
|
|
275
624
|
onFocus: event => {
|
|
276
625
|
if (referenceElement && isOutsideEvent(event, referenceElement)) {
|
|
277
|
-
|
|
626
|
+
ReactDOM.flushSync(() => {
|
|
627
|
+
setViewportInert(false);
|
|
628
|
+
});
|
|
629
|
+
const elementToFocus = afterInsideRef.current || triggerElement;
|
|
278
630
|
elementToFocus?.focus();
|
|
279
631
|
} else {
|
|
280
|
-
|
|
632
|
+
let nextTabbable = getNextTabbable(triggerElement);
|
|
633
|
+
if (nested && !positionerElement && referenceElement && nextTabbable && contains(referenceElement, nextTabbable)) {
|
|
634
|
+
nextTabbable = getTabbableAfterElement(afterInsideRef.current);
|
|
635
|
+
}
|
|
281
636
|
nextTabbable?.focus();
|
|
282
|
-
if (!contains(rootRef.current, nextTabbable)) {
|
|
637
|
+
if ((!nested || positionerElement) && !contains(rootRef.current, nextTabbable)) {
|
|
283
638
|
setValue(null, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));
|
|
284
639
|
}
|
|
285
640
|
}
|
|
@@ -288,4 +643,28 @@ export const NavigationMenuTrigger = /*#__PURE__*/React.forwardRef(function Navi
|
|
|
288
643
|
})]
|
|
289
644
|
});
|
|
290
645
|
});
|
|
291
|
-
if (process.env.NODE_ENV !== "production") NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
|
|
646
|
+
if (process.env.NODE_ENV !== "production") NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
|
|
647
|
+
function getPlacementFromElements(domReferenceElement, floatingElement) {
|
|
648
|
+
const referenceRect = domReferenceElement.getBoundingClientRect();
|
|
649
|
+
const floatingRect = floatingElement.getBoundingClientRect();
|
|
650
|
+
const referenceCenterX = referenceRect.left + referenceRect.width / 2;
|
|
651
|
+
const referenceCenterY = referenceRect.top + referenceRect.height / 2;
|
|
652
|
+
const floatingCenterX = floatingRect.left + floatingRect.width / 2;
|
|
653
|
+
const floatingCenterY = floatingRect.top + floatingRect.height / 2;
|
|
654
|
+
const deltaX = floatingCenterX - referenceCenterX;
|
|
655
|
+
const deltaY = floatingCenterY - referenceCenterY;
|
|
656
|
+
if (Math.abs(deltaX) >= Math.abs(deltaY)) {
|
|
657
|
+
return deltaX >= 0 ? 'right' : 'left';
|
|
658
|
+
}
|
|
659
|
+
return deltaY >= 0 ? 'bottom' : 'top';
|
|
660
|
+
}
|
|
661
|
+
function getHandleCloseContext(domReferenceElement, floatingElement, nodeId) {
|
|
662
|
+
return {
|
|
663
|
+
placement: getPlacementFromElements(domReferenceElement, floatingElement),
|
|
664
|
+
elements: {
|
|
665
|
+
domReference: domReferenceElement,
|
|
666
|
+
floating: floatingElement
|
|
667
|
+
},
|
|
668
|
+
nodeId
|
|
669
|
+
};
|
|
670
|
+
}
|
|
@@ -5,7 +5,7 @@ interface Targets {
|
|
|
5
5
|
}
|
|
6
6
|
interface Params {
|
|
7
7
|
popupElement: HTMLElement | null;
|
|
8
|
-
viewportElement?:
|
|
8
|
+
viewportElement?: HTMLElement | null | undefined;
|
|
9
9
|
rootRef: React.RefObject<HTMLDivElement | null>;
|
|
10
10
|
tree: FloatingTreeType | null;
|
|
11
11
|
nodeId: string | undefined;
|
|
@@ -8,7 +8,7 @@ import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const NavigationMenuViewport: React.ForwardRefExoticComponent<Omit<NavigationMenuViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export interface NavigationMenuViewportState {}
|
|
11
|
-
export interface NavigationMenuViewportProps extends BaseUIComponentProps<'div',
|
|
11
|
+
export interface NavigationMenuViewportProps extends BaseUIComponentProps<'div', NavigationMenuViewportState> {}
|
|
12
12
|
export declare namespace NavigationMenuViewport {
|
|
13
13
|
type State = NavigationMenuViewportState;
|
|
14
14
|
type Props = NavigationMenuViewportProps;
|
|
@@ -4,15 +4,12 @@ import * as React from 'react';
|
|
|
4
4
|
import { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';
|
|
5
5
|
import { useId } from '@base-ui/utils/useId';
|
|
6
6
|
import { inertValue } from '@base-ui/utils/inertValue';
|
|
7
|
-
import { useStableCallback } from '@base-ui/utils/useStableCallback';
|
|
8
7
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
9
8
|
import { useNavigationMenuRootContext } from "../root/NavigationMenuRootContext.js";
|
|
10
9
|
import { FocusGuard } from "../../utils/FocusGuard.js";
|
|
11
|
-
import { usePopupAutoResize } from "../../utils/usePopupAutoResize.js";
|
|
12
10
|
import { getNextTabbable, getPreviousTabbable, isOutsideEvent, contains } from "../../floating-ui-react/utils.js";
|
|
13
11
|
import { getEmptyRootContext } from "../../floating-ui-react/utils/getEmptyRootContext.js";
|
|
14
12
|
import { useNavigationMenuPositionerContext } from "../positioner/NavigationMenuPositionerContext.js";
|
|
15
|
-
import { useDirection } from "../../direction-provider/DirectionContext.js";
|
|
16
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
14
|
const EMPTY_ROOT_CONTEXT = getEmptyRootContext();
|
|
18
15
|
function Guards({
|
|
@@ -68,15 +65,11 @@ export const NavigationMenuViewport = /*#__PURE__*/React.forwardRef(function Nav
|
|
|
68
65
|
render,
|
|
69
66
|
children,
|
|
70
67
|
id: idProp,
|
|
68
|
+
style,
|
|
71
69
|
...elementProps
|
|
72
70
|
} = componentProps;
|
|
73
71
|
const id = useId(idProp);
|
|
74
72
|
const {
|
|
75
|
-
open,
|
|
76
|
-
mounted,
|
|
77
|
-
value,
|
|
78
|
-
popupElement,
|
|
79
|
-
positionerElement,
|
|
80
73
|
setViewportElement,
|
|
81
74
|
setViewportTargetElement,
|
|
82
75
|
floatingRootContext,
|
|
@@ -86,17 +79,6 @@ export const NavigationMenuViewport = /*#__PURE__*/React.forwardRef(function Nav
|
|
|
86
79
|
} = useNavigationMenuRootContext();
|
|
87
80
|
const positioning = useNavigationMenuPositionerContext(true);
|
|
88
81
|
const hasPositioner = Boolean(positioning);
|
|
89
|
-
const direction = useDirection();
|
|
90
|
-
const enableAutoResize = useStableCallback(() => open);
|
|
91
|
-
usePopupAutoResize({
|
|
92
|
-
popupElement,
|
|
93
|
-
positionerElement,
|
|
94
|
-
mounted,
|
|
95
|
-
content: value,
|
|
96
|
-
enabled: enableAutoResize,
|
|
97
|
-
side: positioning?.side ?? 'bottom',
|
|
98
|
-
direction
|
|
99
|
-
});
|
|
100
82
|
const domReference = (floatingRootContext || EMPTY_ROOT_CONTEXT).useState('domReferenceElement');
|
|
101
83
|
useIsoLayoutEffect(() => {
|
|
102
84
|
if (domReference) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseUIComponentProps, NativeButtonProps } from "../../utils/types.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { NumberFieldRootState } from "../root/NumberFieldRoot.js";
|
|
4
4
|
/**
|
|
5
5
|
* A stepper button that decreases the field value when clicked.
|
|
6
6
|
* Renders an `<button>` element.
|
|
@@ -8,8 +8,8 @@ import type { NumberFieldRoot } from "../root/NumberFieldRoot.js";
|
|
|
8
8
|
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
9
9
|
*/
|
|
10
10
|
export declare const NumberFieldDecrement: React.ForwardRefExoticComponent<Omit<NumberFieldDecrementProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
export interface NumberFieldDecrementState extends
|
|
12
|
-
export interface NumberFieldDecrementProps extends NativeButtonProps, BaseUIComponentProps<'button',
|
|
11
|
+
export interface NumberFieldDecrementState extends NumberFieldRootState {}
|
|
12
|
+
export interface NumberFieldDecrementProps extends NativeButtonProps, BaseUIComponentProps<'button', NumberFieldDecrementState> {}
|
|
13
13
|
export declare namespace NumberFieldDecrement {
|
|
14
14
|
type State = NumberFieldDecrementState;
|
|
15
15
|
type Props = NumberFieldDecrementProps;
|