@base-ui/react 1.3.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 +131 -0
- package/accordion/header/AccordionHeader.js +1 -0
- package/accordion/item/AccordionItem.js +1 -0
- package/accordion/panel/AccordionPanel.js +2 -1
- package/accordion/root/AccordionRoot.d.ts +1 -1
- package/accordion/root/AccordionRoot.js +1 -0
- package/accordion/trigger/AccordionTrigger.js +2 -1
- package/alert-dialog/index.d.ts +9 -1
- package/alert-dialog/root/AlertDialogRoot.d.ts +1 -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 -5
- package/autocomplete/index.parts.d.ts +3 -3
- package/autocomplete/index.parts.js +6 -6
- 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/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.js +1 -0
- package/avatar/image/AvatarImage.js +1 -0
- package/avatar/image/useImageLoadingStatus.js +5 -0
- 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.js +1 -0
- package/checkbox/root/CheckboxRoot.d.ts +5 -0
- package/checkbox/root/CheckboxRoot.js +15 -10
- package/checkbox-group/CheckboxGroup.js +13 -10
- package/collapsible/panel/CollapsiblePanel.d.ts +1 -1
- package/collapsible/panel/CollapsiblePanel.js +2 -1
- package/collapsible/panel/useCollapsiblePanel.d.ts +4 -2
- package/collapsible/panel/useCollapsiblePanel.js +2 -4
- package/collapsible/root/CollapsibleRoot.js +1 -0
- package/collapsible/root/useCollapsibleRoot.d.ts +4 -2
- package/collapsible/root/useCollapsibleRoot.js +5 -4
- package/collapsible/trigger/CollapsibleTrigger.js +1 -0
- package/combobox/arrow/ComboboxArrow.d.ts +2 -0
- package/combobox/arrow/ComboboxArrow.js +3 -0
- package/combobox/backdrop/ComboboxBackdrop.d.ts +2 -0
- package/combobox/backdrop/ComboboxBackdrop.js +3 -0
- package/combobox/chip/ComboboxChip.d.ts +2 -0
- package/combobox/chip/ComboboxChip.js +4 -11
- package/combobox/chip-remove/ComboboxChipRemove.d.ts +2 -0
- package/combobox/chip-remove/ComboboxChipRemove.js +6 -0
- package/combobox/chips/ComboboxChips.d.ts +3 -1
- package/combobox/chips/ComboboxChips.js +9 -1
- package/combobox/clear/ComboboxClear.d.ts +2 -0
- package/combobox/clear/ComboboxClear.js +3 -0
- package/combobox/collection/ComboboxCollection.d.ts +2 -0
- package/combobox/collection/ComboboxCollection.js +2 -0
- package/combobox/empty/ComboboxEmpty.d.ts +6 -0
- package/combobox/empty/ComboboxEmpty.js +10 -1
- package/combobox/group/ComboboxGroup.d.ts +2 -0
- package/combobox/group/ComboboxGroup.js +3 -0
- package/combobox/group-label/ComboboxGroupLabel.d.ts +2 -0
- package/combobox/group-label/ComboboxGroupLabel.js +3 -0
- package/combobox/icon/ComboboxIcon.d.ts +2 -0
- package/combobox/icon/ComboboxIcon.js +3 -0
- package/combobox/input/ComboboxInput.d.ts +2 -0
- package/combobox/input/ComboboxInput.js +11 -4
- package/combobox/input-group/ComboboxInputGroup.d.ts +3 -1
- package/combobox/input-group/ComboboxInputGroup.js +13 -4
- package/combobox/item/ComboboxItem.d.ts +2 -0
- package/combobox/item/ComboboxItem.js +8 -0
- package/combobox/item-indicator/ComboboxItemIndicator.d.ts +2 -0
- package/combobox/item-indicator/ComboboxItemIndicator.js +3 -0
- package/combobox/label/ComboboxLabel.js +1 -0
- package/combobox/list/ComboboxList.d.ts +2 -0
- package/combobox/list/ComboboxList.js +8 -9
- package/combobox/popup/ComboboxPopup.d.ts +2 -0
- package/combobox/popup/ComboboxPopup.js +3 -0
- package/combobox/portal/ComboboxPortal.d.ts +2 -0
- package/combobox/portal/ComboboxPortal.js +2 -0
- package/combobox/positioner/ComboboxPositioner.d.ts +2 -0
- package/combobox/positioner/ComboboxPositioner.js +15 -33
- package/combobox/positioner/ComboboxPositionerContext.d.ts +2 -10
- package/combobox/root/AriaCombobox.d.ts +5 -0
- package/combobox/root/AriaCombobox.js +33 -20
- package/combobox/root/utils/useFilter.d.ts +9 -0
- package/combobox/row/ComboboxRow.d.ts +2 -0
- package/combobox/row/ComboboxRow.js +3 -0
- package/combobox/status/ComboboxStatus.d.ts +6 -0
- package/combobox/status/ComboboxStatus.js +12 -1
- package/combobox/store.d.ts +2 -14
- package/combobox/store.js +1 -14
- package/combobox/trigger/ComboboxTrigger.d.ts +2 -0
- package/combobox/trigger/ComboboxTrigger.js +4 -1
- 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 +1 -1
- package/composite/item/CompositeItem.js +1 -0
- package/composite/root/CompositeRoot.d.ts +4 -2
- package/composite/root/CompositeRoot.js +3 -0
- package/composite/root/useCompositeRoot.d.ts +1 -0
- 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.js +4 -5
- package/dialog/backdrop/DialogBackdrop.js +1 -0
- package/dialog/close/DialogClose.js +1 -0
- package/dialog/description/DialogDescription.js +1 -0
- package/dialog/popup/DialogPopup.js +1 -0
- package/dialog/root/DialogRoot.d.ts +3 -2
- package/dialog/root/DialogRoot.js +24 -18
- package/dialog/root/useDialogRoot.d.ts +1 -0
- package/dialog/root/useDialogRoot.js +13 -9
- package/dialog/store/DialogStore.d.ts +4 -1
- package/dialog/store/DialogStore.js +11 -7
- package/dialog/title/DialogTitle.js +1 -0
- package/dialog/trigger/DialogTrigger.js +1 -0
- package/dialog/viewport/DialogViewport.js +1 -0
- package/drawer/backdrop/DrawerBackdrop.js +1 -0
- package/drawer/content/DrawerContent.js +1 -0
- package/drawer/indent/DrawerIndent.js +1 -0
- package/drawer/indent-background/DrawerIndentBackground.js +1 -0
- package/drawer/popup/DrawerPopup.js +17 -3
- package/drawer/root/DrawerRoot.d.ts +1 -1
- package/drawer/root/DrawerRoot.js +19 -14
- package/drawer/root/DrawerRootContext.d.ts +4 -4
- package/drawer/swipe-area/DrawerSwipeArea.js +17 -12
- package/drawer/viewport/DrawerViewport.js +34 -22
- package/esm/accordion/header/AccordionHeader.js +1 -0
- package/esm/accordion/item/AccordionItem.js +1 -0
- package/esm/accordion/panel/AccordionPanel.js +2 -1
- package/esm/accordion/root/AccordionRoot.d.ts +1 -1
- package/esm/accordion/root/AccordionRoot.js +1 -0
- package/esm/accordion/trigger/AccordionTrigger.js +2 -1
- package/esm/alert-dialog/index.d.ts +9 -1
- package/esm/alert-dialog/root/AlertDialogRoot.d.ts +1 -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 -5
- package/esm/autocomplete/index.parts.d.ts +3 -3
- package/esm/autocomplete/index.parts.js +3 -3
- 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/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.js +1 -0
- package/esm/avatar/image/AvatarImage.js +1 -0
- package/esm/avatar/image/useImageLoadingStatus.js +5 -0
- 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.js +1 -0
- package/esm/checkbox/root/CheckboxRoot.d.ts +5 -0
- package/esm/checkbox/root/CheckboxRoot.js +15 -10
- package/esm/checkbox-group/CheckboxGroup.js +13 -10
- package/esm/collapsible/panel/CollapsiblePanel.d.ts +1 -1
- package/esm/collapsible/panel/CollapsiblePanel.js +2 -1
- package/esm/collapsible/panel/useCollapsiblePanel.d.ts +4 -2
- package/esm/collapsible/panel/useCollapsiblePanel.js +2 -4
- package/esm/collapsible/root/CollapsibleRoot.js +1 -0
- package/esm/collapsible/root/useCollapsibleRoot.d.ts +4 -2
- package/esm/collapsible/root/useCollapsibleRoot.js +5 -4
- package/esm/collapsible/trigger/CollapsibleTrigger.js +1 -0
- package/esm/combobox/arrow/ComboboxArrow.d.ts +2 -0
- package/esm/combobox/arrow/ComboboxArrow.js +3 -0
- package/esm/combobox/backdrop/ComboboxBackdrop.d.ts +2 -0
- package/esm/combobox/backdrop/ComboboxBackdrop.js +3 -0
- package/esm/combobox/chip/ComboboxChip.d.ts +2 -0
- package/esm/combobox/chip/ComboboxChip.js +4 -11
- package/esm/combobox/chip-remove/ComboboxChipRemove.d.ts +2 -0
- package/esm/combobox/chip-remove/ComboboxChipRemove.js +6 -0
- package/esm/combobox/chips/ComboboxChips.d.ts +3 -1
- package/esm/combobox/chips/ComboboxChips.js +9 -1
- package/esm/combobox/clear/ComboboxClear.d.ts +2 -0
- package/esm/combobox/clear/ComboboxClear.js +3 -0
- package/esm/combobox/collection/ComboboxCollection.d.ts +2 -0
- package/esm/combobox/collection/ComboboxCollection.js +2 -0
- package/esm/combobox/empty/ComboboxEmpty.d.ts +6 -0
- package/esm/combobox/empty/ComboboxEmpty.js +10 -1
- package/esm/combobox/group/ComboboxGroup.d.ts +2 -0
- package/esm/combobox/group/ComboboxGroup.js +3 -0
- package/esm/combobox/group-label/ComboboxGroupLabel.d.ts +2 -0
- package/esm/combobox/group-label/ComboboxGroupLabel.js +3 -0
- package/esm/combobox/icon/ComboboxIcon.d.ts +2 -0
- package/esm/combobox/icon/ComboboxIcon.js +3 -0
- package/esm/combobox/input/ComboboxInput.d.ts +2 -0
- package/esm/combobox/input/ComboboxInput.js +11 -4
- package/esm/combobox/input-group/ComboboxInputGroup.d.ts +3 -1
- package/esm/combobox/input-group/ComboboxInputGroup.js +13 -4
- package/esm/combobox/item/ComboboxItem.d.ts +2 -0
- package/esm/combobox/item/ComboboxItem.js +8 -0
- package/esm/combobox/item-indicator/ComboboxItemIndicator.d.ts +2 -0
- package/esm/combobox/item-indicator/ComboboxItemIndicator.js +3 -0
- package/esm/combobox/label/ComboboxLabel.js +1 -0
- package/esm/combobox/list/ComboboxList.d.ts +2 -0
- package/esm/combobox/list/ComboboxList.js +8 -9
- package/esm/combobox/popup/ComboboxPopup.d.ts +2 -0
- package/esm/combobox/popup/ComboboxPopup.js +3 -0
- package/esm/combobox/portal/ComboboxPortal.d.ts +2 -0
- package/esm/combobox/portal/ComboboxPortal.js +2 -0
- package/esm/combobox/positioner/ComboboxPositioner.d.ts +2 -0
- package/esm/combobox/positioner/ComboboxPositioner.js +15 -33
- package/esm/combobox/positioner/ComboboxPositionerContext.d.ts +2 -10
- package/esm/combobox/root/AriaCombobox.d.ts +5 -0
- package/esm/combobox/root/AriaCombobox.js +33 -20
- package/esm/combobox/root/utils/useFilter.d.ts +9 -0
- package/esm/combobox/row/ComboboxRow.d.ts +2 -0
- package/esm/combobox/row/ComboboxRow.js +3 -0
- package/esm/combobox/status/ComboboxStatus.d.ts +6 -0
- package/esm/combobox/status/ComboboxStatus.js +12 -1
- package/esm/combobox/store.d.ts +2 -14
- package/esm/combobox/store.js +1 -14
- package/esm/combobox/trigger/ComboboxTrigger.d.ts +2 -0
- package/esm/combobox/trigger/ComboboxTrigger.js +4 -1
- 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 +1 -1
- package/esm/composite/item/CompositeItem.js +1 -0
- package/esm/composite/root/CompositeRoot.d.ts +4 -2
- package/esm/composite/root/CompositeRoot.js +3 -0
- package/esm/composite/root/useCompositeRoot.d.ts +1 -0
- 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.js +4 -5
- package/esm/dialog/backdrop/DialogBackdrop.js +1 -0
- package/esm/dialog/close/DialogClose.js +1 -0
- package/esm/dialog/description/DialogDescription.js +1 -0
- package/esm/dialog/popup/DialogPopup.js +1 -0
- package/esm/dialog/root/DialogRoot.d.ts +3 -2
- package/esm/dialog/root/DialogRoot.js +23 -18
- package/esm/dialog/root/useDialogRoot.d.ts +1 -0
- package/esm/dialog/root/useDialogRoot.js +13 -9
- package/esm/dialog/store/DialogStore.d.ts +4 -1
- package/esm/dialog/store/DialogStore.js +11 -7
- package/esm/dialog/title/DialogTitle.js +1 -0
- package/esm/dialog/trigger/DialogTrigger.js +1 -0
- package/esm/dialog/viewport/DialogViewport.js +1 -0
- package/esm/drawer/backdrop/DrawerBackdrop.js +1 -0
- package/esm/drawer/content/DrawerContent.js +1 -0
- package/esm/drawer/indent/DrawerIndent.js +1 -0
- package/esm/drawer/indent-background/DrawerIndentBackground.js +1 -0
- package/esm/drawer/popup/DrawerPopup.js +17 -3
- package/esm/drawer/root/DrawerRoot.d.ts +1 -1
- package/esm/drawer/root/DrawerRoot.js +19 -14
- package/esm/drawer/root/DrawerRootContext.d.ts +4 -4
- package/esm/drawer/swipe-area/DrawerSwipeArea.js +17 -12
- package/esm/drawer/viewport/DrawerViewport.js +35 -23
- package/esm/field/control/FieldControl.js +6 -6
- package/esm/field/description/FieldDescription.js +1 -0
- package/esm/field/error/FieldError.d.ts +1 -1
- package/esm/field/error/FieldError.js +8 -5
- package/esm/field/item/FieldItem.js +1 -0
- package/esm/field/label/FieldLabel.d.ts +1 -1
- package/esm/field/label/FieldLabel.js +1 -0
- package/esm/field/root/FieldRoot.js +12 -1
- package/esm/field/root/FieldRootContext.d.ts +2 -0
- package/esm/field/root/FieldRootContext.js +1 -0
- package/esm/field/root/useFieldControlRegistration.d.ts +17 -0
- package/esm/field/root/useFieldControlRegistration.js +125 -0
- package/esm/field/root/useRegisterFieldControl.d.ts +5 -0
- package/esm/field/root/useRegisterFieldControl.js +35 -0
- package/esm/field/validity/FieldValidity.d.ts +1 -1
- package/esm/field/validity/FieldValidity.js +1 -1
- package/esm/fieldset/legend/FieldsetLegend.js +1 -0
- package/esm/fieldset/root/FieldsetRoot.js +1 -0
- package/esm/floating-ui-react/components/FloatingFocusManager.js +47 -79
- 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.js +5 -3
- package/esm/floating-ui-react/hooks/useClientPoint.js +6 -5
- package/esm/floating-ui-react/hooks/useDismiss.js +26 -63
- package/esm/floating-ui-react/hooks/useFloating.js +4 -3
- package/esm/floating-ui-react/hooks/useFloatingRootContext.js +3 -3
- package/esm/floating-ui-react/hooks/useFocus.js +5 -14
- package/esm/floating-ui-react/hooks/useHover.d.ts +1 -1
- package/esm/floating-ui-react/hooks/useHover.js +8 -46
- package/esm/floating-ui-react/hooks/useHoverFloatingInteraction.d.ts +5 -0
- package/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js +15 -15
- package/esm/floating-ui-react/hooks/useHoverInteractionSharedState.d.ts +3 -3
- package/esm/floating-ui-react/hooks/useHoverInteractionSharedState.js +15 -8
- package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +1 -0
- package/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js +64 -26
- package/esm/floating-ui-react/hooks/useHoverShared.js +1 -1
- package/esm/floating-ui-react/hooks/useListNavigation.d.ts +4 -4
- package/esm/floating-ui-react/hooks/useListNavigation.js +32 -28
- 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.js +3 -1
- package/esm/floating-ui-react/safePolygon.js +1 -0
- package/esm/floating-ui-react/utils/composite.d.ts +6 -4
- package/esm/floating-ui-react/utils/composite.js +55 -24
- 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/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.js +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +6 -1
- package/esm/input/Input.d.ts +1 -1
- package/esm/labelable-provider/useLabel.js +0 -1
- 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.js +1 -0
- package/esm/menu/backdrop/MenuBackdrop.js +1 -0
- package/esm/menu/checkbox-item/MenuCheckboxItem.js +2 -1
- package/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +1 -0
- package/esm/menu/group/MenuGroup.js +1 -0
- package/esm/menu/group-label/MenuGroupLabel.js +1 -0
- package/esm/menu/item/MenuItem.js +2 -1
- package/esm/menu/item/useMenuItem.d.ts +1 -1
- package/esm/menu/link-item/MenuLinkItem.js +2 -1
- package/esm/menu/popup/MenuPopup.js +1 -0
- package/esm/menu/positioner/MenuPositioner.js +15 -31
- package/esm/menu/positioner/MenuPositionerContext.d.ts +2 -15
- package/esm/menu/radio-group/MenuRadioGroup.js +1 -0
- package/esm/menu/radio-item/MenuRadioItem.js +2 -1
- package/esm/menu/radio-item-indicator/MenuRadioItemIndicator.js +1 -0
- package/esm/menu/root/MenuRoot.d.ts +2 -2
- package/esm/menu/root/MenuRoot.js +8 -17
- package/esm/menu/store/MenuStore.d.ts +3 -0
- package/esm/menu/store/MenuStore.js +2 -0
- 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 +18 -2
- package/esm/menu/trigger/MenuTrigger.js +11 -31
- package/esm/menu/viewport/MenuViewport.js +1 -0
- package/esm/menubar/Menubar.js +7 -11
- 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.js +1 -0
- package/esm/meter/label/MeterLabel.js +1 -0
- package/esm/meter/root/MeterRoot.js +1 -0
- package/esm/meter/track/MeterTrack.js +1 -0
- package/esm/meter/value/MeterValue.js +1 -0
- package/esm/navigation-menu/arrow/NavigationMenuArrow.js +1 -0
- package/esm/navigation-menu/backdrop/NavigationMenuBackdrop.js +1 -0
- package/esm/navigation-menu/content/NavigationMenuContent.js +3 -0
- package/esm/navigation-menu/icon/NavigationMenuIcon.js +1 -0
- package/esm/navigation-menu/item/NavigationMenuItem.js +1 -0
- package/esm/navigation-menu/link/NavigationMenuLink.js +2 -0
- package/esm/navigation-menu/list/NavigationMenuList.js +10 -6
- package/esm/navigation-menu/popup/NavigationMenuPopup.js +1 -0
- package/esm/navigation-menu/positioner/NavigationMenuPositioner.js +13 -32
- package/esm/navigation-menu/root/NavigationMenuRoot.d.ts +9 -6
- package/esm/navigation-menu/root/NavigationMenuRoot.js +8 -0
- package/esm/navigation-menu/root/NavigationMenuRootContext.d.ts +11 -6
- package/esm/navigation-menu/trigger/NavigationMenuTrigger.js +66 -31
- package/esm/navigation-menu/viewport/NavigationMenuViewport.js +1 -0
- package/esm/number-field/decrement/NumberFieldDecrement.js +1 -10
- package/esm/number-field/group/NumberFieldGroup.js +1 -0
- package/esm/number-field/increment/NumberFieldIncrement.js +1 -10
- package/esm/number-field/input/NumberFieldInput.js +6 -10
- package/esm/number-field/root/NumberFieldRoot.d.ts +6 -1
- package/esm/number-field/root/NumberFieldRoot.js +13 -78
- package/esm/number-field/root/NumberFieldRootContext.d.ts +0 -6
- package/esm/number-field/root/useNumberFieldButton.d.ts +0 -6
- package/esm/number-field/root/useNumberFieldButton.js +34 -101
- package/esm/number-field/scrub-area/NumberFieldScrubArea.js +8 -9
- 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/subscribeToVisualViewportResize.js +2 -4
- 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.js +1 -0
- package/esm/popover/backdrop/PopoverBackdrop.js +1 -0
- package/esm/popover/close/PopoverClose.js +1 -0
- package/esm/popover/description/PopoverDescription.js +1 -0
- package/esm/popover/popup/PopoverPopup.js +2 -0
- package/esm/popover/positioner/PopoverPositioner.js +16 -30
- package/esm/popover/root/PopoverRoot.d.ts +2 -2
- package/esm/popover/root/PopoverRoot.js +1 -5
- package/esm/popover/store/PopoverStore.d.ts +2 -0
- package/esm/popover/store/PopoverStore.js +3 -9
- package/esm/popover/title/PopoverTitle.js +1 -0
- package/esm/popover/trigger/PopoverTrigger.js +11 -33
- package/esm/popover/viewport/PopoverViewport.js +1 -0
- package/esm/preview-card/arrow/PreviewCardArrow.js +1 -0
- package/esm/preview-card/backdrop/PreviewCardBackdrop.js +1 -0
- package/esm/preview-card/index.d.ts +1 -0
- package/esm/preview-card/popup/PreviewCardPopup.js +1 -0
- package/esm/preview-card/positioner/PreviewCardPositioner.js +10 -30
- package/esm/preview-card/positioner/PreviewCardPositionerContext.d.ts +2 -8
- package/esm/preview-card/root/PreviewCardRoot.d.ts +2 -2
- package/esm/preview-card/root/PreviewCardRoot.js +2 -2
- package/esm/preview-card/store/PreviewCardStore.js +1 -0
- package/esm/preview-card/trigger/PreviewCardTrigger.js +3 -1
- package/esm/preview-card/viewport/PreviewCardViewport.js +1 -0
- 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.js +1 -0
- package/esm/progress/label/ProgressLabelDataAttributes.d.ts +1 -1
- package/esm/progress/label/ProgressLabelDataAttributes.js +1 -1
- package/esm/progress/root/ProgressRoot.js +1 -0
- package/esm/progress/root/ProgressRootDataAttributes.d.ts +1 -1
- package/esm/progress/root/ProgressRootDataAttributes.js +1 -1
- 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.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.js +1 -0
- package/esm/radio/root/RadioRoot.js +7 -1
- package/esm/radio-group/RadioGroup.d.ts +5 -0
- package/esm/radio-group/RadioGroup.js +9 -7
- package/esm/radio-group/RadioGroupContext.d.ts +1 -0
- package/esm/scroll-area/content/ScrollAreaContent.js +1 -0
- package/esm/scroll-area/corner/ScrollAreaCorner.js +1 -0
- package/esm/scroll-area/root/ScrollAreaRoot.js +1 -0
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +1 -1
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.js +9 -6
- package/esm/scroll-area/thumb/ScrollAreaThumb.js +1 -0
- package/esm/scroll-area/viewport/ScrollAreaViewport.js +5 -13
- package/esm/select/arrow/SelectArrow.js +1 -0
- package/esm/select/backdrop/SelectBackdrop.js +1 -0
- package/esm/select/group/SelectGroup.js +1 -0
- package/esm/select/group-label/SelectGroupLabel.js +1 -0
- package/esm/select/icon/SelectIcon.js +1 -0
- package/esm/select/item/SelectItem.js +9 -34
- package/esm/select/item-indicator/SelectItemIndicator.js +1 -0
- package/esm/select/item-text/SelectItemText.js +1 -0
- package/esm/select/label/SelectLabel.js +1 -0
- package/esm/select/list/SelectList.js +1 -0
- package/esm/select/popup/SelectPopup.js +140 -168
- package/esm/select/positioner/SelectPositioner.js +11 -24
- package/esm/select/root/SelectRoot.d.ts +7 -2
- package/esm/select/root/SelectRoot.js +37 -24
- package/esm/select/scroll-arrow/SelectScrollArrow.js +47 -63
- package/esm/select/trigger/SelectTrigger.js +1 -0
- package/esm/select/value/SelectValue.js +1 -0
- 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.js +17 -8
- package/esm/slider/indicator/SliderIndicator.js +6 -6
- package/esm/slider/label/SliderLabel.js +1 -0
- package/esm/slider/root/SliderRoot.d.ts +6 -1
- package/esm/slider/root/SliderRoot.js +9 -10
- package/esm/slider/root/SliderRootContext.d.ts +1 -0
- package/esm/slider/thumb/SliderThumb.js +64 -22
- package/esm/slider/track/SliderTrack.js +1 -0
- package/esm/slider/utils/roundValueToStep.d.ts +1 -0
- package/esm/slider/utils/roundValueToStep.js +6 -2
- package/esm/slider/value/SliderValue.js +1 -0
- package/esm/switch/root/SwitchRoot.d.ts +5 -0
- package/esm/switch/root/SwitchRoot.js +15 -10
- package/esm/switch/thumb/SwitchThumb.js +1 -0
- package/esm/tabs/indicator/TabsIndicator.d.ts +1 -1
- package/esm/tabs/indicator/TabsIndicator.js +4 -4
- package/esm/tabs/list/TabsList.js +3 -85
- package/esm/tabs/panel/TabsPanel.js +1 -0
- package/esm/tabs/root/TabsRoot.js +115 -22
- package/esm/tabs/tab/TabsTab.js +1 -0
- 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.js +1 -0
- package/esm/toast/arrow/ToastArrow.js +1 -0
- package/esm/toast/close/ToastClose.js +1 -0
- package/esm/toast/content/ToastContent.js +1 -0
- package/esm/toast/description/ToastDescription.js +1 -0
- package/esm/toast/positioner/ToastPositioner.js +11 -26
- package/esm/toast/positioner/ToastPositionerContext.d.ts +2 -8
- package/esm/toast/root/ToastRoot.js +20 -7
- package/esm/toast/root/ToastRootDataAttributes.js +4 -3
- package/esm/toast/store.d.ts +9 -2
- package/esm/toast/store.js +37 -12
- package/esm/toast/title/ToastTitle.js +1 -0
- package/esm/toast/useToastManager.d.ts +10 -2
- package/esm/toast/viewport/ToastViewport.js +36 -26
- package/esm/toggle/Toggle.js +2 -0
- package/esm/toggle-group/ToggleGroup.js +4 -1
- package/esm/toolbar/button/ToolbarButton.d.ts +1 -1
- package/esm/toolbar/button/ToolbarButton.js +2 -0
- package/esm/toolbar/group/ToolbarGroup.js +1 -0
- package/esm/toolbar/input/ToolbarInput.d.ts +1 -1
- package/esm/toolbar/input/ToolbarInput.js +2 -0
- package/esm/toolbar/link/ToolbarLink.js +2 -0
- package/esm/toolbar/root/ToolbarRoot.js +2 -0
- package/esm/tooltip/arrow/TooltipArrow.js +2 -1
- package/esm/tooltip/index.d.ts +1 -0
- package/esm/tooltip/popup/TooltipPopup.js +1 -0
- package/esm/tooltip/positioner/TooltipPositioner.js +10 -29
- package/esm/tooltip/positioner/TooltipPositionerContext.d.ts +2 -9
- package/esm/tooltip/root/TooltipRoot.d.ts +2 -2
- package/esm/tooltip/root/TooltipRoot.js +2 -2
- package/esm/tooltip/store/TooltipStore.js +1 -0
- package/esm/tooltip/trigger/TooltipTrigger.js +3 -1
- package/esm/tooltip/viewport/TooltipViewport.js +1 -0
- 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.js +2 -6
- package/esm/use-render/useRender.d.ts +1 -1
- package/esm/utils/FloatingPortalLite.js +1 -0
- package/esm/utils/InternalBackdrop.js +2 -13
- package/esm/utils/createBaseUIEventDetails.d.ts +2 -2
- 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/{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 +11 -5
- package/esm/utils/useAnchorPositioning.js +10 -4
- 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/useIsHydrating.d.ts +5 -0
- package/esm/utils/useIsHydrating.js +19 -0
- package/esm/utils/usePopupViewport.js +2 -1
- 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/useRenderElement.js +18 -3
- package/esm/utils/useSwipeDismiss.d.ts +1 -0
- package/esm/utils/useSwipeDismiss.js +4 -2
- package/esm/utils/useTransitionStatus.js +3 -3
- package/field/control/FieldControl.js +6 -6
- package/field/description/FieldDescription.js +1 -0
- package/field/error/FieldError.d.ts +1 -1
- package/field/error/FieldError.js +8 -5
- package/field/item/FieldItem.js +1 -0
- package/field/label/FieldLabel.d.ts +1 -1
- package/field/label/FieldLabel.js +1 -0
- package/field/root/FieldRoot.js +12 -1
- package/field/root/FieldRootContext.d.ts +2 -0
- package/field/root/FieldRootContext.js +1 -0
- package/field/root/useFieldControlRegistration.d.ts +17 -0
- package/field/root/useFieldControlRegistration.js +131 -0
- package/field/root/useRegisterFieldControl.d.ts +5 -0
- package/field/root/useRegisterFieldControl.js +41 -0
- package/field/validity/FieldValidity.d.ts +1 -1
- package/field/validity/FieldValidity.js +1 -1
- package/fieldset/legend/FieldsetLegend.js +1 -0
- package/fieldset/root/FieldsetRoot.js +1 -0
- package/floating-ui-react/components/FloatingFocusManager.js +72 -104
- 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.js +8 -6
- package/floating-ui-react/hooks/useClientPoint.js +9 -8
- package/floating-ui-react/hooks/useDismiss.js +42 -79
- package/floating-ui-react/hooks/useFloating.js +4 -3
- package/floating-ui-react/hooks/useFloatingRootContext.js +3 -3
- package/floating-ui-react/hooks/useFocus.js +12 -21
- package/floating-ui-react/hooks/useHover.d.ts +1 -1
- package/floating-ui-react/hooks/useHover.js +8 -46
- package/floating-ui-react/hooks/useHoverFloatingInteraction.d.ts +5 -0
- package/floating-ui-react/hooks/useHoverFloatingInteraction.js +19 -19
- package/floating-ui-react/hooks/useHoverInteractionSharedState.d.ts +3 -3
- package/floating-ui-react/hooks/useHoverInteractionSharedState.js +20 -9
- package/floating-ui-react/hooks/useHoverReferenceInteraction.d.ts +1 -0
- package/floating-ui-react/hooks/useHoverReferenceInteraction.js +69 -31
- package/floating-ui-react/hooks/useHoverShared.js +2 -2
- package/floating-ui-react/hooks/useListNavigation.d.ts +4 -4
- package/floating-ui-react/hooks/useListNavigation.js +56 -52
- 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.js +8 -6
- package/floating-ui-react/safePolygon.js +1 -0
- package/floating-ui-react/utils/composite.d.ts +6 -4
- package/floating-ui-react/utils/composite.js +55 -24
- 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/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.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +12 -1
- package/input/Input.d.ts +1 -1
- package/labelable-provider/useLabel.js +0 -1
- 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.js +1 -0
- package/menu/backdrop/MenuBackdrop.js +1 -0
- package/menu/checkbox-item/MenuCheckboxItem.js +2 -1
- package/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +1 -0
- package/menu/group/MenuGroup.js +1 -0
- package/menu/group-label/MenuGroupLabel.js +1 -0
- package/menu/item/MenuItem.js +2 -1
- package/menu/item/useMenuItem.d.ts +1 -1
- package/menu/link-item/MenuLinkItem.js +2 -1
- package/menu/popup/MenuPopup.js +1 -0
- package/menu/positioner/MenuPositioner.js +15 -31
- package/menu/positioner/MenuPositionerContext.d.ts +2 -15
- package/menu/radio-group/MenuRadioGroup.js +1 -0
- package/menu/radio-item/MenuRadioItem.js +2 -1
- package/menu/radio-item-indicator/MenuRadioItemIndicator.js +1 -0
- package/menu/root/MenuRoot.d.ts +2 -2
- package/menu/root/MenuRoot.js +8 -17
- package/menu/store/MenuStore.d.ts +3 -0
- package/menu/store/MenuStore.js +2 -0
- package/menu/submenu-root/MenuSubmenuRoot.d.ts +1 -1
- package/menu/submenu-root/MenuSubmenuRoot.js +1 -1
- package/menu/submenu-trigger/MenuSubmenuTrigger.js +18 -2
- package/menu/trigger/MenuTrigger.js +10 -30
- package/menu/viewport/MenuViewport.js +1 -0
- package/menubar/Menubar.js +7 -11
- 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.js +1 -0
- package/meter/label/MeterLabel.js +1 -0
- package/meter/root/MeterRoot.js +1 -0
- package/meter/track/MeterTrack.js +1 -0
- package/meter/value/MeterValue.js +1 -0
- package/navigation-menu/arrow/NavigationMenuArrow.js +1 -0
- package/navigation-menu/backdrop/NavigationMenuBackdrop.js +1 -0
- package/navigation-menu/content/NavigationMenuContent.js +3 -0
- package/navigation-menu/icon/NavigationMenuIcon.js +1 -0
- package/navigation-menu/item/NavigationMenuItem.js +1 -0
- package/navigation-menu/link/NavigationMenuLink.js +2 -0
- package/navigation-menu/list/NavigationMenuList.js +9 -5
- package/navigation-menu/popup/NavigationMenuPopup.js +1 -0
- package/navigation-menu/positioner/NavigationMenuPositioner.js +13 -32
- package/navigation-menu/root/NavigationMenuRoot.d.ts +9 -6
- package/navigation-menu/root/NavigationMenuRoot.js +8 -0
- package/navigation-menu/root/NavigationMenuRootContext.d.ts +11 -6
- package/navigation-menu/trigger/NavigationMenuTrigger.js +66 -31
- package/navigation-menu/viewport/NavigationMenuViewport.js +1 -0
- package/number-field/decrement/NumberFieldDecrement.js +1 -10
- package/number-field/group/NumberFieldGroup.js +1 -0
- package/number-field/increment/NumberFieldIncrement.js +1 -10
- package/number-field/input/NumberFieldInput.js +6 -10
- package/number-field/root/NumberFieldRoot.d.ts +6 -1
- package/number-field/root/NumberFieldRoot.js +10 -75
- package/number-field/root/NumberFieldRootContext.d.ts +0 -6
- package/number-field/root/useNumberFieldButton.d.ts +0 -6
- package/number-field/root/useNumberFieldButton.js +32 -101
- package/number-field/scrub-area/NumberFieldScrubArea.js +8 -9
- 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/subscribeToVisualViewportResize.js +2 -4
- 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 +21 -5
- package/popover/arrow/PopoverArrow.js +1 -0
- package/popover/backdrop/PopoverBackdrop.js +1 -0
- package/popover/close/PopoverClose.js +1 -0
- package/popover/description/PopoverDescription.js +1 -0
- package/popover/popup/PopoverPopup.js +2 -0
- package/popover/positioner/PopoverPositioner.js +16 -30
- package/popover/root/PopoverRoot.d.ts +2 -2
- package/popover/root/PopoverRoot.js +1 -5
- package/popover/store/PopoverStore.d.ts +2 -0
- package/popover/store/PopoverStore.js +3 -9
- package/popover/title/PopoverTitle.js +1 -0
- package/popover/trigger/PopoverTrigger.js +11 -33
- package/popover/viewport/PopoverViewport.js +1 -0
- package/preview-card/arrow/PreviewCardArrow.js +1 -0
- package/preview-card/backdrop/PreviewCardBackdrop.js +1 -0
- package/preview-card/index.d.ts +1 -0
- package/preview-card/popup/PreviewCardPopup.js +1 -0
- package/preview-card/positioner/PreviewCardPositioner.js +10 -30
- package/preview-card/positioner/PreviewCardPositionerContext.d.ts +2 -8
- package/preview-card/root/PreviewCardRoot.d.ts +2 -2
- package/preview-card/root/PreviewCardRoot.js +2 -2
- package/preview-card/store/PreviewCardStore.js +1 -0
- package/preview-card/trigger/PreviewCardTrigger.js +3 -1
- package/preview-card/viewport/PreviewCardViewport.js +1 -0
- 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.js +1 -0
- package/progress/label/ProgressLabelDataAttributes.d.ts +1 -1
- package/progress/label/ProgressLabelDataAttributes.js +1 -1
- package/progress/root/ProgressRoot.js +1 -0
- package/progress/root/ProgressRootDataAttributes.d.ts +1 -1
- package/progress/root/ProgressRootDataAttributes.js +1 -1
- 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.js +1 -0
- package/progress/value/ProgressValueDataAttributes.d.ts +1 -1
- package/progress/value/ProgressValueDataAttributes.js +1 -1
- package/radio/indicator/RadioIndicator.js +1 -0
- package/radio/root/RadioRoot.js +7 -1
- package/radio-group/RadioGroup.d.ts +5 -0
- package/radio-group/RadioGroup.js +9 -7
- package/radio-group/RadioGroupContext.d.ts +1 -0
- package/scroll-area/content/ScrollAreaContent.js +1 -0
- package/scroll-area/corner/ScrollAreaCorner.js +1 -0
- package/scroll-area/root/ScrollAreaRoot.js +1 -0
- package/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +1 -1
- package/scroll-area/scrollbar/ScrollAreaScrollbar.js +9 -6
- package/scroll-area/thumb/ScrollAreaThumb.js +1 -0
- package/scroll-area/viewport/ScrollAreaViewport.js +5 -13
- package/select/arrow/SelectArrow.js +1 -0
- package/select/backdrop/SelectBackdrop.js +1 -0
- package/select/group/SelectGroup.js +1 -0
- package/select/group-label/SelectGroupLabel.js +1 -0
- package/select/icon/SelectIcon.js +1 -0
- package/select/item/SelectItem.js +9 -34
- package/select/item-indicator/SelectItemIndicator.js +1 -0
- package/select/item-text/SelectItemText.js +1 -0
- package/select/label/SelectLabel.js +1 -0
- package/select/list/SelectList.js +1 -0
- package/select/popup/SelectPopup.js +140 -168
- package/select/positioner/SelectPositioner.js +11 -24
- package/select/root/SelectRoot.d.ts +7 -2
- package/select/root/SelectRoot.js +36 -23
- package/select/scroll-arrow/SelectScrollArrow.js +47 -63
- package/select/trigger/SelectTrigger.js +1 -0
- package/select/value/SelectValue.js +1 -0
- package/separator/Separator.js +1 -0
- package/separator/SeparatorDataAttributes.d.ts +7 -0
- package/separator/SeparatorDataAttributes.js +14 -0
- package/slider/control/SliderControl.js +16 -7
- package/slider/indicator/SliderIndicator.js +6 -6
- package/slider/label/SliderLabel.js +1 -0
- package/slider/root/SliderRoot.d.ts +6 -1
- package/slider/root/SliderRoot.js +8 -9
- package/slider/root/SliderRootContext.d.ts +1 -0
- package/slider/thumb/SliderThumb.js +65 -23
- package/slider/track/SliderTrack.js +1 -0
- package/slider/utils/roundValueToStep.d.ts +1 -0
- package/slider/utils/roundValueToStep.js +6 -1
- package/slider/value/SliderValue.js +1 -0
- package/switch/root/SwitchRoot.d.ts +5 -0
- package/switch/root/SwitchRoot.js +15 -10
- package/switch/thumb/SwitchThumb.js +1 -0
- package/tabs/indicator/TabsIndicator.d.ts +1 -1
- package/tabs/indicator/TabsIndicator.js +4 -4
- package/tabs/list/TabsList.js +3 -85
- package/tabs/panel/TabsPanel.js +1 -0
- package/tabs/root/TabsRoot.js +115 -22
- package/tabs/tab/TabsTab.js +1 -0
- 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.js +1 -0
- package/toast/arrow/ToastArrow.js +1 -0
- package/toast/close/ToastClose.js +1 -0
- package/toast/content/ToastContent.js +1 -0
- package/toast/description/ToastDescription.js +1 -0
- package/toast/positioner/ToastPositioner.js +11 -26
- package/toast/positioner/ToastPositionerContext.d.ts +2 -8
- package/toast/root/ToastRoot.js +19 -6
- package/toast/root/ToastRootDataAttributes.js +4 -3
- package/toast/store.d.ts +9 -2
- package/toast/store.js +37 -12
- package/toast/title/ToastTitle.js +1 -0
- package/toast/useToastManager.d.ts +10 -2
- package/toast/viewport/ToastViewport.js +36 -26
- package/toggle/Toggle.js +2 -0
- package/toggle-group/ToggleGroup.js +4 -1
- package/toolbar/button/ToolbarButton.d.ts +1 -1
- package/toolbar/button/ToolbarButton.js +2 -0
- package/toolbar/group/ToolbarGroup.js +1 -0
- package/toolbar/input/ToolbarInput.d.ts +1 -1
- package/toolbar/input/ToolbarInput.js +2 -0
- package/toolbar/link/ToolbarLink.js +2 -0
- package/toolbar/root/ToolbarRoot.js +2 -0
- package/tooltip/arrow/TooltipArrow.js +2 -1
- package/tooltip/index.d.ts +1 -0
- package/tooltip/popup/TooltipPopup.js +1 -0
- package/tooltip/positioner/TooltipPositioner.js +10 -29
- package/tooltip/positioner/TooltipPositionerContext.d.ts +2 -9
- package/tooltip/root/TooltipRoot.d.ts +2 -2
- package/tooltip/root/TooltipRoot.js +2 -2
- package/tooltip/store/TooltipStore.js +1 -0
- package/tooltip/trigger/TooltipTrigger.js +3 -1
- package/tooltip/viewport/TooltipViewport.js +1 -0
- 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.js +2 -6
- package/use-render/useRender.d.ts +1 -1
- package/utils/FloatingPortalLite.js +1 -0
- package/utils/InternalBackdrop.js +2 -13
- package/utils/createBaseUIEventDetails.d.ts +2 -2
- 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/{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 +11 -5
- package/utils/useAnchorPositioning.js +9 -3
- package/utils/useAnchoredPopupScrollLock.d.ts +6 -0
- package/utils/useAnchoredPopupScrollLock.js +36 -0
- package/utils/useAnimationsFinished.js +48 -51
- package/utils/useIsHydrating.d.ts +5 -0
- package/utils/useIsHydrating.js +25 -0
- package/utils/usePopupViewport.js +2 -1
- 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/useRenderElement.js +18 -3
- package/utils/useSwipeDismiss.d.ts +1 -0
- package/utils/useSwipeDismiss.js +3 -1
- package/utils/useTransitionStatus.js +3 -3
- package/esm/field/useField.d.ts +0 -14
- package/esm/field/useField.js +0 -75
- 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/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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.useAnchoredPopupScrollLock = useAnchoredPopupScrollLock;
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _owner = require("@base-ui/utils/owner");
|
|
11
|
+
var _useScrollLock = require("@base-ui/utils/useScrollLock");
|
|
12
|
+
var _useIsoLayoutEffect = require("@base-ui/utils/useIsoLayoutEffect");
|
|
13
|
+
// Touch-opened popups normally avoid scroll locking so users can still swipe outside to dismiss.
|
|
14
|
+
// This hook re-enables scroll lock only when the popup is effectively full-width.
|
|
15
|
+
// Treat popups with up to 20px of total horizontal gutter as full-width so common ~10px side
|
|
16
|
+
// padding still locks scroll, since that leaves too little outside space for a reliable swipe.
|
|
17
|
+
const VIEWPORT_WIDTH_TOLERANCE_PX = 20;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Manages scroll lock for anchored popups. For non-touch opens, scroll lock is applied when
|
|
21
|
+
* enabled. For touch opens, scroll lock is applied only when the positioner width is effectively
|
|
22
|
+
* viewport-sized.
|
|
23
|
+
*/
|
|
24
|
+
function useAnchoredPopupScrollLock(enabled, touchOpen, positionerElement, referenceElement) {
|
|
25
|
+
const [touchOpenShouldLockScroll, setTouchOpenShouldLockScroll] = React.useState(false);
|
|
26
|
+
(0, _useIsoLayoutEffect.useIsoLayoutEffect)(() => {
|
|
27
|
+
if (!enabled || !touchOpen || positionerElement == null) {
|
|
28
|
+
setTouchOpenShouldLockScroll(false);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const viewportWidth = (0, _owner.ownerDocument)(positionerElement).documentElement.clientWidth;
|
|
32
|
+
const popupWidth = positionerElement.offsetWidth;
|
|
33
|
+
setTouchOpenShouldLockScroll(viewportWidth > 0 && popupWidth > 0 && popupWidth >= viewportWidth - VIEWPORT_WIDTH_TOLERANCE_PX);
|
|
34
|
+
}, [enabled, touchOpen, positionerElement]);
|
|
35
|
+
(0, _useScrollLock.useScrollLock)(enabled && (!touchOpen || touchOpenShouldLockScroll), referenceElement);
|
|
36
|
+
}
|
|
@@ -29,69 +29,66 @@ function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false
|
|
|
29
29
|
*/
|
|
30
30
|
signal = null) => {
|
|
31
31
|
frame.cancel();
|
|
32
|
-
function done() {
|
|
33
|
-
// Synchronously flush the unmounting of the component so that the browser doesn't
|
|
34
|
-
// paint: https://github.com/mui/base-ui/issues/979
|
|
35
|
-
ReactDOM.flushSync(fnToExecute);
|
|
36
|
-
}
|
|
37
32
|
const element = (0, _resolveRef.resolveRef)(elementOrRef);
|
|
38
33
|
if (element == null) {
|
|
39
34
|
return;
|
|
40
35
|
}
|
|
41
36
|
const resolvedElement = element;
|
|
37
|
+
const done = () => {
|
|
38
|
+
// Synchronously flush the unmounting of the component so that the browser doesn't
|
|
39
|
+
// paint: https://github.com/mui/base-ui/issues/979
|
|
40
|
+
ReactDOM.flushSync(fnToExecute);
|
|
41
|
+
};
|
|
42
42
|
if (typeof resolvedElement.getAnimations !== 'function' || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
|
|
43
43
|
fnToExecute();
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// to give "open" animations a chance to be registered.
|
|
50
|
-
if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
|
|
51
|
-
frame.request(exec);
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Wait for `[data-starting-style]` to have been removed.
|
|
56
|
-
const attributeObserver = new MutationObserver(() => {
|
|
57
|
-
if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
|
|
58
|
-
attributeObserver.disconnect();
|
|
59
|
-
exec();
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
attributeObserver.observe(resolvedElement, {
|
|
63
|
-
attributes: true,
|
|
64
|
-
attributeFilter: [startingStyleAttribute]
|
|
65
|
-
});
|
|
66
|
-
signal?.addEventListener('abort', () => attributeObserver.disconnect(), {
|
|
67
|
-
once: true
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function exec() {
|
|
71
|
-
Promise.all(resolvedElement.getAnimations().map(anim => anim.finished)).then(() => {
|
|
72
|
-
if (signal?.aborted) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
function exec() {
|
|
47
|
+
Promise.all(resolvedElement.getAnimations().map(animation => animation.finished)).then(() => {
|
|
48
|
+
if (!signal?.aborted) {
|
|
75
49
|
done();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
50
|
+
}
|
|
51
|
+
}).catch(() => {
|
|
52
|
+
if (treatAbortedAsFinished) {
|
|
53
|
+
if (!signal?.aborted) {
|
|
82
54
|
done();
|
|
83
|
-
} else if (currentAnimations.length > 0 && currentAnimations.some(anim => anim.pending || anim.playState !== 'finished')) {
|
|
84
|
-
// Sometimes animations can be aborted because a property they depend on changes while the animation plays.
|
|
85
|
-
// In such cases, we need to re-check if any new animations have started.
|
|
86
|
-
exec();
|
|
87
55
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const currentAnimations = resolvedElement.getAnimations();
|
|
59
|
+
if (!signal?.aborted && currentAnimations.length > 0 && currentAnimations.some(animation => animation.pending || animation.playState !== 'finished')) {
|
|
60
|
+
// Sometimes animations can be aborted because a property they depend on changes while the animation plays.
|
|
61
|
+
// In such cases, we need to re-check if any new animations have started.
|
|
62
|
+
exec();
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (waitForStartingStyleRemoved) {
|
|
67
|
+
const startingStyleAttribute = _stateAttributesMapping.TransitionStatusDataAttributes.startingStyle;
|
|
68
|
+
|
|
69
|
+
// If `[data-starting-style]` isn't present, fall back to waiting one more frame
|
|
70
|
+
// to give "open" animations a chance to be registered.
|
|
71
|
+
if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
|
|
72
|
+
frame.request(exec);
|
|
92
73
|
return;
|
|
93
74
|
}
|
|
94
|
-
|
|
75
|
+
|
|
76
|
+
// Wait for `[data-starting-style]` to have been removed.
|
|
77
|
+
const attributeObserver = new MutationObserver(() => {
|
|
78
|
+
if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
|
|
79
|
+
attributeObserver.disconnect();
|
|
80
|
+
exec();
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
attributeObserver.observe(resolvedElement, {
|
|
84
|
+
attributes: true,
|
|
85
|
+
attributeFilter: [startingStyleAttribute]
|
|
86
|
+
});
|
|
87
|
+
signal?.addEventListener('abort', () => attributeObserver.disconnect(), {
|
|
88
|
+
once: true
|
|
89
|
+
});
|
|
90
|
+
return;
|
|
95
91
|
}
|
|
92
|
+
frame.request(exec);
|
|
96
93
|
});
|
|
97
94
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useIsHydrating = useIsHydrating;
|
|
7
|
+
var _shim = require("use-sync-external-store/shim");
|
|
8
|
+
var _noop = require("./noop");
|
|
9
|
+
function subscribe() {
|
|
10
|
+
return _noop.NOOP;
|
|
11
|
+
}
|
|
12
|
+
function getSnapshot() {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
function getServerSnapshot() {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Returns `true` while React is hydrating server-rendered markup and `false`
|
|
21
|
+
* for fresh client-only mounts.
|
|
22
|
+
*/
|
|
23
|
+
function useIsHydrating() {
|
|
24
|
+
return (0, _shim.useSyncExternalStore)(subscribe, getSnapshot, getServerSnapshot);
|
|
25
|
+
}
|
|
@@ -13,6 +13,7 @@ var _useAnimationFrame = require("@base-ui/utils/useAnimationFrame");
|
|
|
13
13
|
var _usePreviousValue = require("@base-ui/utils/usePreviousValue");
|
|
14
14
|
var _useIsoLayoutEffect = require("@base-ui/utils/useIsoLayoutEffect");
|
|
15
15
|
var _useStableCallback = require("@base-ui/utils/useStableCallback");
|
|
16
|
+
var _owner = require("@base-ui/utils/owner");
|
|
16
17
|
var _useAnimationsFinished = require("./useAnimationsFinished");
|
|
17
18
|
var _usePopupAutoResize = require("./usePopupAutoResize");
|
|
18
19
|
var _directionProvider = require("../direction-provider");
|
|
@@ -107,7 +108,7 @@ function usePopupViewport(parameters) {
|
|
|
107
108
|
if (!source) {
|
|
108
109
|
return;
|
|
109
110
|
}
|
|
110
|
-
const wrapper =
|
|
111
|
+
const wrapper = (0, _owner.ownerDocument)(source).createElement('div');
|
|
111
112
|
for (const child of Array.from(source.childNodes)) {
|
|
112
113
|
wrapper.appendChild(child.cloneNode(true));
|
|
113
114
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type UseRenderElementComponentProps } from "./useRenderElement.js";
|
|
2
|
+
import type { TransitionStatus } from "./useTransitionStatus.js";
|
|
3
|
+
interface UsePositionerOptions {
|
|
4
|
+
styles: React.CSSProperties;
|
|
5
|
+
transitionStatus: TransitionStatus;
|
|
6
|
+
props?: React.ComponentProps<'div'> | undefined;
|
|
7
|
+
refs?: React.Ref<HTMLDivElement> | (React.Ref<HTMLDivElement> | undefined)[] | undefined;
|
|
8
|
+
hidden?: boolean | undefined;
|
|
9
|
+
inert?: boolean | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Renders the shared outer Positioner element used by popup components.
|
|
13
|
+
* Applies the common role, hidden state, transition styles, state attributes, and optional inert styling.
|
|
14
|
+
*/
|
|
15
|
+
export declare function usePositioner<State extends Record<string, any>>(componentProps: UseRenderElementComponentProps<State>, state: State, {
|
|
16
|
+
styles,
|
|
17
|
+
transitionStatus,
|
|
18
|
+
props,
|
|
19
|
+
refs,
|
|
20
|
+
hidden,
|
|
21
|
+
inert
|
|
22
|
+
}: UsePositionerOptions): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.usePositioner = usePositioner;
|
|
8
|
+
var _popupStateMapping = require("./popupStateMapping");
|
|
9
|
+
var _useRenderElement = require("./useRenderElement");
|
|
10
|
+
var _getDisabledMountTransitionStyles = require("./getDisabledMountTransitionStyles");
|
|
11
|
+
/**
|
|
12
|
+
* Renders the shared outer Positioner element used by popup components.
|
|
13
|
+
* Applies the common role, hidden state, transition styles, state attributes, and optional inert styling.
|
|
14
|
+
*/
|
|
15
|
+
function usePositioner(componentProps, state, {
|
|
16
|
+
styles,
|
|
17
|
+
transitionStatus,
|
|
18
|
+
props,
|
|
19
|
+
refs,
|
|
20
|
+
hidden,
|
|
21
|
+
inert = false
|
|
22
|
+
}) {
|
|
23
|
+
const style = {
|
|
24
|
+
...styles
|
|
25
|
+
};
|
|
26
|
+
if (inert) {
|
|
27
|
+
style.pointerEvents = 'none';
|
|
28
|
+
}
|
|
29
|
+
return (0, _useRenderElement.useRenderElement)('div', componentProps, {
|
|
30
|
+
state,
|
|
31
|
+
ref: refs,
|
|
32
|
+
props: [{
|
|
33
|
+
role: 'presentation',
|
|
34
|
+
hidden,
|
|
35
|
+
style
|
|
36
|
+
}, (0, _getDisabledMountTransitionStyles.getDisabledMountTransitionStyles)(transitionStatus), props],
|
|
37
|
+
stateAttributesMapping: _popupStateMapping.popupStateMapping
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface UsePressAndHoldParameters {
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
readOnly?: boolean | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Called on each tick during a hold. Return `false` to stop the auto-change sequence.
|
|
7
|
+
*/
|
|
8
|
+
tick: (triggerEvent?: Event) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Called when the hold ends via the global `pointerup` event.
|
|
11
|
+
*/
|
|
12
|
+
onStop?: ((nativeEvent: PointerEvent) => void) | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Interval between ticks once the hold is active.
|
|
15
|
+
* @default 60
|
|
16
|
+
*/
|
|
17
|
+
tickDelay?: number | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Delay before the repeating ticks start after the initial hold.
|
|
20
|
+
* @default 400
|
|
21
|
+
*/
|
|
22
|
+
startDelay?: number | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Pointer movement distance (px) that cancels the hold and is treated as scrolling.
|
|
25
|
+
* @default 8
|
|
26
|
+
*/
|
|
27
|
+
scrollDistance?: number | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Ref to the anchor element used to resolve `ownerWindow`.
|
|
30
|
+
*/
|
|
31
|
+
elementRef: React.RefObject<HTMLElement | null>;
|
|
32
|
+
}
|
|
33
|
+
export interface UsePressAndHoldReturnValue {
|
|
34
|
+
pointerHandlers: {
|
|
35
|
+
onTouchStart: React.TouchEventHandler<HTMLElement>;
|
|
36
|
+
onTouchEnd: React.TouchEventHandler<HTMLElement>;
|
|
37
|
+
onPointerDown: React.PointerEventHandler<HTMLElement>;
|
|
38
|
+
onPointerUp: React.PointerEventHandler<HTMLElement>;
|
|
39
|
+
onPointerMove: React.PointerEventHandler<HTMLElement>;
|
|
40
|
+
onMouseEnter: React.MouseEventHandler<HTMLElement>;
|
|
41
|
+
onMouseLeave: React.MouseEventHandler<HTMLElement>;
|
|
42
|
+
onMouseUp: React.MouseEventHandler<HTMLElement>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Returns `true` if the `onClick` handler should be skipped.
|
|
46
|
+
* Use this in the element's `onClick` to prevent double-firing on mouse clicks
|
|
47
|
+
* (already handled by `onPointerDown`) and to suppress the synthesized click
|
|
48
|
+
* that browsers fire after a touch hold.
|
|
49
|
+
*/
|
|
50
|
+
shouldSkipClick: (event: React.MouseEvent) => boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Adds press-and-hold behavior to a button element.
|
|
54
|
+
* On pointer down, performs one action immediately, then after a delay starts
|
|
55
|
+
* continuous repeated actions at a fixed interval. Handles mouse, touch, and pen
|
|
56
|
+
* inputs correctly, including Android-specific quirks.
|
|
57
|
+
*/
|
|
58
|
+
export declare function usePressAndHold(params: UsePressAndHoldParameters): UsePressAndHoldReturnValue;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.usePressAndHold = usePressAndHold;
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _addEventListener = require("@base-ui/utils/addEventListener");
|
|
11
|
+
var _useTimeout = require("@base-ui/utils/useTimeout");
|
|
12
|
+
var _useInterval = require("@base-ui/utils/useInterval");
|
|
13
|
+
var _useStableCallback = require("@base-ui/utils/useStableCallback");
|
|
14
|
+
var _owner = require("@base-ui/utils/owner");
|
|
15
|
+
const DEFAULT_TICK_DELAY = 60;
|
|
16
|
+
const DEFAULT_START_DELAY = 400;
|
|
17
|
+
const DEFAULT_SCROLL_DISTANCE = 8;
|
|
18
|
+
const TOUCH_TIMEOUT = 50;
|
|
19
|
+
const MAX_POINTER_MOVES_AFTER_TOUCH = 3;
|
|
20
|
+
|
|
21
|
+
// Treat pen as touch-like to avoid forcing the software keyboard on stylus taps.
|
|
22
|
+
// Linux Chrome may emit "pen" historically for mouse usage due to a bug, but the touch path
|
|
23
|
+
// still works with minor behavioral differences.
|
|
24
|
+
function isTouchLikePointerType(pointerType) {
|
|
25
|
+
return pointerType === 'touch' || pointerType === 'pen';
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Adds press-and-hold behavior to a button element.
|
|
29
|
+
* On pointer down, performs one action immediately, then after a delay starts
|
|
30
|
+
* continuous repeated actions at a fixed interval. Handles mouse, touch, and pen
|
|
31
|
+
* inputs correctly, including Android-specific quirks.
|
|
32
|
+
*/
|
|
33
|
+
function usePressAndHold(params) {
|
|
34
|
+
const {
|
|
35
|
+
disabled,
|
|
36
|
+
readOnly = false,
|
|
37
|
+
tick,
|
|
38
|
+
onStop,
|
|
39
|
+
tickDelay = DEFAULT_TICK_DELAY,
|
|
40
|
+
startDelay = DEFAULT_START_DELAY,
|
|
41
|
+
scrollDistance = DEFAULT_SCROLL_DISTANCE,
|
|
42
|
+
elementRef
|
|
43
|
+
} = params;
|
|
44
|
+
const startTickTimeout = (0, _useTimeout.useTimeout)();
|
|
45
|
+
const tickInterval = (0, _useInterval.useInterval)();
|
|
46
|
+
const intentionalTouchCheckTimeout = (0, _useTimeout.useTimeout)();
|
|
47
|
+
const isPressedRef = React.useRef(false);
|
|
48
|
+
const movesAfterTouchRef = React.useRef(0);
|
|
49
|
+
const downCoordsRef = React.useRef({
|
|
50
|
+
x: 0,
|
|
51
|
+
y: 0
|
|
52
|
+
});
|
|
53
|
+
const isTouchingButtonRef = React.useRef(false);
|
|
54
|
+
const ignoreClickRef = React.useRef(false);
|
|
55
|
+
const pointerTypeRef = React.useRef('');
|
|
56
|
+
const unsubscribeFromGlobalContextMenuRef = React.useRef(() => {});
|
|
57
|
+
const stopAutoChange = (0, _useStableCallback.useStableCallback)(() => {
|
|
58
|
+
intentionalTouchCheckTimeout.clear();
|
|
59
|
+
startTickTimeout.clear();
|
|
60
|
+
tickInterval.clear();
|
|
61
|
+
unsubscribeFromGlobalContextMenuRef.current();
|
|
62
|
+
movesAfterTouchRef.current = 0;
|
|
63
|
+
});
|
|
64
|
+
const startAutoChange = (0, _useStableCallback.useStableCallback)(triggerNativeEvent => {
|
|
65
|
+
stopAutoChange();
|
|
66
|
+
const element = elementRef.current;
|
|
67
|
+
if (!element) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const win = (0, _owner.ownerWindow)(element);
|
|
71
|
+
function handleContextMenu(event) {
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// A global context menu listener is necessary to prevent the context menu from
|
|
76
|
+
// appearing when the touch is slightly outside of the element's hit area.
|
|
77
|
+
unsubscribeFromGlobalContextMenuRef.current = (0, _addEventListener.addEventListener)(win, 'contextmenu', handleContextMenu);
|
|
78
|
+
(0, _addEventListener.addEventListener)(win, 'pointerup', event => {
|
|
79
|
+
isPressedRef.current = false;
|
|
80
|
+
stopAutoChange();
|
|
81
|
+
onStop?.(event);
|
|
82
|
+
}, {
|
|
83
|
+
once: true
|
|
84
|
+
});
|
|
85
|
+
if (!tick(triggerNativeEvent)) {
|
|
86
|
+
stopAutoChange();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
startTickTimeout.start(startDelay, () => {
|
|
90
|
+
tickInterval.start(tickDelay, () => {
|
|
91
|
+
if (!tick(triggerNativeEvent)) {
|
|
92
|
+
stopAutoChange();
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
React.useEffect(() => () => stopAutoChange(), [stopAutoChange]);
|
|
98
|
+
const pointerHandlers = {
|
|
99
|
+
onTouchStart() {
|
|
100
|
+
isTouchingButtonRef.current = true;
|
|
101
|
+
},
|
|
102
|
+
onTouchEnd() {
|
|
103
|
+
isTouchingButtonRef.current = false;
|
|
104
|
+
},
|
|
105
|
+
onPointerDown(event) {
|
|
106
|
+
const isMainButton = !event.button || event.button === 0;
|
|
107
|
+
if (event.defaultPrevented || !isMainButton || disabled || readOnly) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
pointerTypeRef.current = event.pointerType;
|
|
111
|
+
ignoreClickRef.current = false;
|
|
112
|
+
isPressedRef.current = true;
|
|
113
|
+
downCoordsRef.current = {
|
|
114
|
+
x: event.clientX,
|
|
115
|
+
y: event.clientY
|
|
116
|
+
};
|
|
117
|
+
const isTouchPointer = isTouchLikePointerType(event.pointerType);
|
|
118
|
+
if (!isTouchPointer) {
|
|
119
|
+
event.preventDefault();
|
|
120
|
+
startAutoChange(event.nativeEvent);
|
|
121
|
+
} else {
|
|
122
|
+
// Check if the pointerdown was intentional and not the result of a scroll or
|
|
123
|
+
// pinch-zoom. In that case, we don't want to start the auto-change sequence.
|
|
124
|
+
intentionalTouchCheckTimeout.start(TOUCH_TIMEOUT, () => {
|
|
125
|
+
const moves = movesAfterTouchRef.current;
|
|
126
|
+
movesAfterTouchRef.current = 0;
|
|
127
|
+
// Only start auto-change if the touch is still pressed (prevents races
|
|
128
|
+
// with pointerup occurring before the timeout fires on quick taps).
|
|
129
|
+
const stillPressed = isPressedRef.current;
|
|
130
|
+
if (stillPressed && moves < MAX_POINTER_MOVES_AFTER_TOUCH) {
|
|
131
|
+
startAutoChange(event.nativeEvent);
|
|
132
|
+
ignoreClickRef.current = true; // synthesized click after hold should be ignored
|
|
133
|
+
} else {
|
|
134
|
+
// No auto-change (simple tap or scroll gesture), allow the click handler
|
|
135
|
+
// to perform a single action.
|
|
136
|
+
ignoreClickRef.current = false;
|
|
137
|
+
stopAutoChange();
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
onPointerUp(event) {
|
|
143
|
+
// Ensure we mark the press as released for touch flows even if auto-change never
|
|
144
|
+
// started, so the delayed auto-change check won't start after a quick tap.
|
|
145
|
+
if (isTouchLikePointerType(event.pointerType)) {
|
|
146
|
+
isPressedRef.current = false;
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
onPointerMove(event) {
|
|
150
|
+
if (disabled || readOnly || !isTouchLikePointerType(event.pointerType) || !isPressedRef.current) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (movesAfterTouchRef.current != null) {
|
|
154
|
+
movesAfterTouchRef.current += 1;
|
|
155
|
+
}
|
|
156
|
+
const {
|
|
157
|
+
x,
|
|
158
|
+
y
|
|
159
|
+
} = downCoordsRef.current;
|
|
160
|
+
const dx = x - event.clientX;
|
|
161
|
+
const dy = y - event.clientY;
|
|
162
|
+
if (dx ** 2 + dy ** 2 > scrollDistance ** 2) {
|
|
163
|
+
stopAutoChange();
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
onMouseEnter(event) {
|
|
167
|
+
if (event.defaultPrevented || disabled || readOnly || !isPressedRef.current || isTouchingButtonRef.current || isTouchLikePointerType(pointerTypeRef.current)) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
startAutoChange(event.nativeEvent);
|
|
171
|
+
},
|
|
172
|
+
onMouseLeave() {
|
|
173
|
+
if (isTouchingButtonRef.current) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
stopAutoChange();
|
|
177
|
+
},
|
|
178
|
+
onMouseUp() {
|
|
179
|
+
if (isTouchingButtonRef.current) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
stopAutoChange();
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const shouldSkipClick = (0, _useStableCallback.useStableCallback)(event => {
|
|
186
|
+
if (event.defaultPrevented) {
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
if (isTouchLikePointerType(pointerTypeRef.current)) {
|
|
190
|
+
return ignoreClickRef.current;
|
|
191
|
+
}
|
|
192
|
+
return event.detail !== 0;
|
|
193
|
+
});
|
|
194
|
+
return {
|
|
195
|
+
pointerHandlers,
|
|
196
|
+
shouldSkipClick
|
|
197
|
+
};
|
|
198
|
+
}
|
|
@@ -54,7 +54,12 @@ function useRenderElementProps(componentProps, params = {}) {
|
|
|
54
54
|
const className = enabled ? (0, _resolveClassName.resolveClassName)(classNameProp, state) : undefined;
|
|
55
55
|
const style = enabled ? (0, _resolveStyle.resolveStyle)(styleProp, state) : undefined;
|
|
56
56
|
const stateProps = enabled ? (0, _getStateAttributesProps.getStateAttributesProps)(state, stateAttributesMapping) : _constants.EMPTY_OBJECT;
|
|
57
|
-
const
|
|
57
|
+
const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : undefined;
|
|
58
|
+
|
|
59
|
+
// Ensure outProps is always a new mutable object when enabled, never EMPTY_OBJECT.
|
|
60
|
+
// This prevents potential TypeError when setting ref, className, or style properties,
|
|
61
|
+
// since EMPTY_OBJECT is frozen and mutations would fail in strict mode.
|
|
62
|
+
const outProps = enabled ? (0, _mergeObjects.mergeObjects)(stateProps, resolvedProps) ?? {} : _constants.EMPTY_OBJECT;
|
|
58
63
|
|
|
59
64
|
// SAFETY: The `useMergedRefs` functions use a single hook to store the same value,
|
|
60
65
|
// switching between them at runtime is safe. If this assertion fails, React will
|
|
@@ -82,12 +87,20 @@ function useRenderElementProps(componentProps, params = {}) {
|
|
|
82
87
|
}
|
|
83
88
|
return outProps;
|
|
84
89
|
}
|
|
90
|
+
function resolveRenderFunctionProps(props) {
|
|
91
|
+
if (Array.isArray(props)) {
|
|
92
|
+
return (0, _mergeProps.mergePropsN)(props);
|
|
93
|
+
}
|
|
94
|
+
return (0, _mergeProps.mergeProps)(undefined, props);
|
|
95
|
+
}
|
|
85
96
|
|
|
86
97
|
// The symbol React uses internally for lazy components
|
|
87
98
|
// https://github.com/facebook/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/shared/ReactSymbols.js#L31
|
|
88
99
|
//
|
|
89
100
|
// TODO delete once https://github.com/facebook/react/issues/32392 is fixed
|
|
90
101
|
const REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
102
|
+
const COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
|
|
103
|
+
const LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
|
|
91
104
|
function evaluateRenderProp(element, render, props, state) {
|
|
92
105
|
if (render) {
|
|
93
106
|
if (typeof render === 'function') {
|
|
@@ -135,8 +148,10 @@ function warnIfRenderPropLooksLikeComponent(renderFn) {
|
|
|
135
148
|
if (functionName.length === 0) {
|
|
136
149
|
return;
|
|
137
150
|
}
|
|
138
|
-
|
|
139
|
-
|
|
151
|
+
if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
|
|
140
155
|
return;
|
|
141
156
|
}
|
|
142
157
|
(0, _warn.warn)(`The \`render\` prop received a function named \`${functionName}\` that starts with an uppercase letter.`, 'This usually means a React component was passed directly as `render={Component}`.', 'Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.', 'If this is an intentional render callback, rename it to start with a lowercase letter.', 'Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.', 'https://base-ui.com/r/invalid-render-prop');
|
|
@@ -63,6 +63,7 @@ export interface UseSwipeDismissOptions {
|
|
|
63
63
|
trackDrag?: boolean | undefined;
|
|
64
64
|
onSwipeStart?: ((event: PointerEvent | TouchEvent) => void) | undefined;
|
|
65
65
|
onProgress?: ((progress: number, details?: UseSwipeDismissProgressDetails) => void) | undefined;
|
|
66
|
+
onCancel?: ((event: PointerEvent | TouchEvent) => void) | undefined;
|
|
66
67
|
/**
|
|
67
68
|
* Called when the swipe interaction starts or ends.
|
|
68
69
|
*/
|
package/utils/useSwipeDismiss.js
CHANGED
|
@@ -37,7 +37,7 @@ function getDisplacement(direction, deltaX, deltaY) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
function getElementTransform(element) {
|
|
40
|
-
const computedStyle =
|
|
40
|
+
const computedStyle = (0, _owner.ownerWindow)(element).getComputedStyle(element);
|
|
41
41
|
const transform = computedStyle.transform;
|
|
42
42
|
let translateX = 0;
|
|
43
43
|
let translateY = 0;
|
|
@@ -95,6 +95,7 @@ function useSwipeDismiss(options) {
|
|
|
95
95
|
swipeThreshold: swipeThresholdProp,
|
|
96
96
|
onDismiss,
|
|
97
97
|
onProgress,
|
|
98
|
+
onCancel,
|
|
98
99
|
onSwipeStart,
|
|
99
100
|
onRelease,
|
|
100
101
|
onSwipingChange,
|
|
@@ -430,6 +431,7 @@ function useSwipeDismiss(options) {
|
|
|
430
431
|
deltaY: 0,
|
|
431
432
|
direction: undefined
|
|
432
433
|
});
|
|
434
|
+
onCancel?.(event.nativeEvent);
|
|
433
435
|
}
|
|
434
436
|
function applyDirectionalDamping(deltaX, deltaY) {
|
|
435
437
|
const exponent = value => value >= 0 ? value ** 0.5 : -(Math.abs(value) ** 0.5);
|
|
@@ -64,10 +64,10 @@ function useTransitionStatus(open, enableIdleState = false, deferEndingState = f
|
|
|
64
64
|
return () => {
|
|
65
65
|
_useAnimationFrame.AnimationFrame.cancel(frame);
|
|
66
66
|
};
|
|
67
|
-
}, [enableIdleState, open, mounted,
|
|
68
|
-
return
|
|
67
|
+
}, [enableIdleState, open, mounted, transitionStatus]);
|
|
68
|
+
return {
|
|
69
69
|
mounted,
|
|
70
70
|
setMounted,
|
|
71
71
|
transitionStatus
|
|
72
|
-
}
|
|
72
|
+
};
|
|
73
73
|
}
|
package/esm/field/useField.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare function useField(params: UseFieldParameters): void;
|
|
2
|
-
export interface UseFieldParameters {
|
|
3
|
-
enabled?: boolean | undefined;
|
|
4
|
-
value: unknown;
|
|
5
|
-
getValue?: (() => unknown) | undefined;
|
|
6
|
-
id: string | undefined;
|
|
7
|
-
name?: string | undefined;
|
|
8
|
-
commit: (value: unknown) => void;
|
|
9
|
-
/**
|
|
10
|
-
* A ref to a focusable element that receives focus when the field fails
|
|
11
|
-
* validation during form submission.
|
|
12
|
-
*/
|
|
13
|
-
controlRef: React.RefObject<any>;
|
|
14
|
-
}
|