@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
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
import { addEventListener } from '@base-ui/utils/addEventListener';
|
|
4
5
|
import { useControlled } from '@base-ui/utils/useControlled';
|
|
5
6
|
import { useStableCallback } from '@base-ui/utils/useStableCallback';
|
|
6
|
-
import { useTimeout } from '@base-ui/utils/useTimeout';
|
|
7
|
-
import { useInterval } from '@base-ui/utils/useInterval';
|
|
8
7
|
import { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';
|
|
9
8
|
import { useValueAsRef } from '@base-ui/utils/useValueAsRef';
|
|
10
9
|
import { useForcedRerendering } from '@base-ui/utils/useForcedRerendering';
|
|
11
10
|
import { useMergedRefs } from '@base-ui/utils/useMergedRefs';
|
|
12
11
|
import { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';
|
|
13
|
-
import { ownerDocument
|
|
12
|
+
import { ownerDocument } from '@base-ui/utils/owner';
|
|
14
13
|
import { isIOS } from '@base-ui/utils/detectBrowser';
|
|
14
|
+
import { activeElement } from "../../floating-ui-react/utils.js";
|
|
15
15
|
import { NumberFieldRootContext } from "./NumberFieldRootContext.js";
|
|
16
16
|
import { useFieldRootContext } from "../../field/root/FieldRootContext.js";
|
|
17
17
|
import { useLabelableId } from "../../labelable-provider/useLabelableId.js";
|
|
@@ -19,9 +19,9 @@ import { stateAttributesMapping } from "../utils/stateAttributesMapping.js";
|
|
|
19
19
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
20
20
|
import { getNumberLocaleDetails, PERMILLE, PERCENTAGES, SPACE_SEPARATOR_RE, BASE_NON_NUMERIC_SYMBOLS, MINUS_SIGNS_WITH_ASCII, PLUS_SIGNS_WITH_ASCII } from "../utils/parse.js";
|
|
21
21
|
import { formatNumber, formatNumberMaxPrecision } from "../../utils/formatNumber.js";
|
|
22
|
-
import {
|
|
22
|
+
import { DEFAULT_STEP } from "../utils/constants.js";
|
|
23
23
|
import { toValidatedNumber } from "../utils/validate.js";
|
|
24
|
-
import { createChangeEventDetails
|
|
24
|
+
import { createChangeEventDetails } from "../../utils/createBaseUIEventDetails.js";
|
|
25
25
|
import { REASONS } from "../../utils/reasons.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -42,6 +42,7 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
42
42
|
required = false,
|
|
43
43
|
disabled: disabledProp = false,
|
|
44
44
|
readOnly = false,
|
|
45
|
+
form,
|
|
45
46
|
name: nameProp,
|
|
46
47
|
defaultValue,
|
|
47
48
|
value: valueProp,
|
|
@@ -55,6 +56,7 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
55
56
|
render,
|
|
56
57
|
className,
|
|
57
58
|
inputRef: inputRefProp,
|
|
59
|
+
style,
|
|
58
60
|
...elementProps
|
|
59
61
|
} = componentProps;
|
|
60
62
|
const {
|
|
@@ -99,14 +101,8 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
99
101
|
hasPendingCommitRef.current = false;
|
|
100
102
|
onValueCommittedProp?.(nextValue, eventDetails);
|
|
101
103
|
});
|
|
102
|
-
const startTickTimeout = useTimeout();
|
|
103
|
-
const tickInterval = useInterval();
|
|
104
|
-
const intentionalTouchCheckTimeout = useTimeout();
|
|
105
|
-
const isPressedRef = React.useRef(false);
|
|
106
|
-
const movesAfterTouchRef = React.useRef(0);
|
|
107
104
|
const allowInputSyncRef = React.useRef(true);
|
|
108
105
|
const lastChangedValueRef = React.useRef(null);
|
|
109
|
-
const unsubscribeFromGlobalContextMenuRef = React.useRef(() => {});
|
|
110
106
|
|
|
111
107
|
// During SSR, the value is formatted on the server, whose locale may differ from the client's
|
|
112
108
|
// locale. This causes a hydration mismatch, which we manually suppress. This is preferable to
|
|
@@ -232,58 +228,6 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
232
228
|
direction
|
|
233
229
|
}));
|
|
234
230
|
});
|
|
235
|
-
const stopAutoChange = useStableCallback(() => {
|
|
236
|
-
intentionalTouchCheckTimeout.clear();
|
|
237
|
-
startTickTimeout.clear();
|
|
238
|
-
tickInterval.clear();
|
|
239
|
-
unsubscribeFromGlobalContextMenuRef.current();
|
|
240
|
-
movesAfterTouchRef.current = 0;
|
|
241
|
-
});
|
|
242
|
-
const startAutoChange = useStableCallback((isIncrement, triggerEvent) => {
|
|
243
|
-
stopAutoChange();
|
|
244
|
-
if (!inputRef.current) {
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
const win = ownerWindow(inputRef.current);
|
|
248
|
-
function handleContextMenu(event) {
|
|
249
|
-
event.preventDefault();
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
// A global context menu is necessary to prevent the context menu from appearing when the touch
|
|
253
|
-
// is slightly outside of the element's hit area.
|
|
254
|
-
win.addEventListener('contextmenu', handleContextMenu);
|
|
255
|
-
unsubscribeFromGlobalContextMenuRef.current = () => {
|
|
256
|
-
win.removeEventListener('contextmenu', handleContextMenu);
|
|
257
|
-
};
|
|
258
|
-
win.addEventListener('pointerup', event => {
|
|
259
|
-
isPressedRef.current = false;
|
|
260
|
-
stopAutoChange();
|
|
261
|
-
const committed = lastChangedValueRef.current ?? valueRef.current;
|
|
262
|
-
const commitReason = isIncrement ? REASONS.incrementPress : REASONS.decrementPress;
|
|
263
|
-
onValueCommitted(committed, createGenericEventDetails(commitReason, event));
|
|
264
|
-
}, {
|
|
265
|
-
once: true
|
|
266
|
-
});
|
|
267
|
-
function tick() {
|
|
268
|
-
const amount = getStepAmount(triggerEvent) ?? DEFAULT_STEP;
|
|
269
|
-
return incrementValue(amount, {
|
|
270
|
-
direction: isIncrement ? 1 : -1,
|
|
271
|
-
event: triggerEvent,
|
|
272
|
-
reason: isIncrement ? 'increment-press' : 'decrement-press'
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
if (!tick()) {
|
|
276
|
-
stopAutoChange();
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
startTickTimeout.start(START_AUTO_CHANGE_DELAY, () => {
|
|
280
|
-
tickInterval.start(CHANGE_VALUE_TICK_DELAY, () => {
|
|
281
|
-
if (!tick()) {
|
|
282
|
-
stopAutoChange();
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
});
|
|
286
|
-
});
|
|
287
231
|
|
|
288
232
|
// We need to update the input value when the external `value` prop changes. This ends up acting
|
|
289
233
|
// as a single source of truth to update the input value, bypassing the need to manually set it in
|
|
@@ -321,9 +265,6 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
321
265
|
}
|
|
322
266
|
setInputMode(computedInputMode);
|
|
323
267
|
}, [minWithDefault, formatStyle]);
|
|
324
|
-
React.useEffect(() => {
|
|
325
|
-
return () => stopAutoChange();
|
|
326
|
-
}, [stopAutoChange]);
|
|
327
268
|
|
|
328
269
|
// The `onWheel` prop can't be prevented, so we need to use a global event listener.
|
|
329
270
|
React.useEffect(function registerElementWheelListener() {
|
|
@@ -334,7 +275,7 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
334
275
|
function handleWheel(event) {
|
|
335
276
|
if (
|
|
336
277
|
// Allow pinch-zooming.
|
|
337
|
-
event.ctrlKey || ownerDocument(inputRef.current)
|
|
278
|
+
event.ctrlKey || activeElement(ownerDocument(inputRef.current)) !== inputRef.current) {
|
|
338
279
|
return;
|
|
339
280
|
}
|
|
340
281
|
|
|
@@ -347,10 +288,7 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
347
288
|
reason: 'wheel'
|
|
348
289
|
});
|
|
349
290
|
}
|
|
350
|
-
|
|
351
|
-
return () => {
|
|
352
|
-
element.removeEventListener('wheel', handleWheel);
|
|
353
|
-
};
|
|
291
|
+
return addEventListener(element, 'wheel', handleWheel);
|
|
354
292
|
}, [allowWheelScrub, incrementValue, disabled, readOnly, largeStep, step, getStepAmount]);
|
|
355
293
|
const state = React.useMemo(() => ({
|
|
356
294
|
...fieldState,
|
|
@@ -365,8 +303,6 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
365
303
|
inputRef,
|
|
366
304
|
inputValue,
|
|
367
305
|
value,
|
|
368
|
-
startAutoChange,
|
|
369
|
-
stopAutoChange,
|
|
370
306
|
minWithDefault,
|
|
371
307
|
maxWithDefault,
|
|
372
308
|
disabled,
|
|
@@ -380,9 +316,6 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
380
316
|
valueRef,
|
|
381
317
|
lastChangedValueRef,
|
|
382
318
|
hasPendingCommitRef,
|
|
383
|
-
isPressedRef,
|
|
384
|
-
intentionalTouchCheckTimeout,
|
|
385
|
-
movesAfterTouchRef,
|
|
386
319
|
name,
|
|
387
320
|
required,
|
|
388
321
|
invalid,
|
|
@@ -396,7 +329,7 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
396
329
|
setIsScrubbing,
|
|
397
330
|
state,
|
|
398
331
|
onValueCommitted
|
|
399
|
-
}), [inputRef, inputValue, value,
|
|
332
|
+
}), [inputRef, inputValue, value, minWithDefault, maxWithDefault, disabled, readOnly, id, setValue, incrementValue, getStepAmount, formatOptionsRef, valueRef, name, required, invalid, inputMode, getAllowedNonNumericKeys, min, max, setInputValue, locale, isScrubbing, state, onValueCommitted]);
|
|
400
333
|
const element = useRenderElement('div', componentProps, {
|
|
401
334
|
ref: forwardedRef,
|
|
402
335
|
state,
|
|
@@ -429,6 +362,7 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
429
362
|
}),
|
|
430
363
|
ref: hiddenInputRef,
|
|
431
364
|
type: "number",
|
|
365
|
+
form: form,
|
|
432
366
|
name: name,
|
|
433
367
|
value: value ?? '',
|
|
434
368
|
min: min,
|
|
@@ -441,7 +375,8 @@ export const NumberFieldRoot = /*#__PURE__*/React.forwardRef(function NumberFiel
|
|
|
441
375
|
required: required,
|
|
442
376
|
"aria-hidden": true,
|
|
443
377
|
tabIndex: -1,
|
|
444
|
-
style: name ? visuallyHiddenInput : visuallyHidden
|
|
378
|
+
style: name ? visuallyHiddenInput : visuallyHidden,
|
|
379
|
+
suppressHydrationWarning: true
|
|
445
380
|
})]
|
|
446
381
|
});
|
|
447
382
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Timeout } from '@base-ui/utils/useTimeout';
|
|
3
2
|
import type { NumberFieldRoot, NumberFieldRootState } from "./NumberFieldRoot.js";
|
|
4
3
|
import { EventWithOptionalKeyState } from "../utils/types.js";
|
|
5
4
|
import type { IncrementValueParameters } from "../utils/types.js";
|
|
@@ -7,8 +6,6 @@ export type InputMode = 'numeric' | 'decimal' | 'text';
|
|
|
7
6
|
export interface NumberFieldRootContext {
|
|
8
7
|
inputValue: string;
|
|
9
8
|
value: number | null;
|
|
10
|
-
startAutoChange: (isIncrement: boolean, event?: React.MouseEvent | Event) => void;
|
|
11
|
-
stopAutoChange: () => void;
|
|
12
9
|
minWithDefault: number;
|
|
13
10
|
maxWithDefault: number;
|
|
14
11
|
disabled: boolean;
|
|
@@ -23,9 +20,6 @@ export interface NumberFieldRootContext {
|
|
|
23
20
|
valueRef: React.RefObject<number | null>;
|
|
24
21
|
lastChangedValueRef: React.RefObject<number | null>;
|
|
25
22
|
hasPendingCommitRef: React.RefObject<boolean>;
|
|
26
|
-
isPressedRef: React.RefObject<boolean | null>;
|
|
27
|
-
intentionalTouchCheckTimeout: Timeout;
|
|
28
|
-
movesAfterTouchRef: React.RefObject<number | null>;
|
|
29
23
|
name: string | undefined;
|
|
30
24
|
required: boolean;
|
|
31
25
|
invalid: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { Timeout } from '@base-ui/utils/useTimeout';
|
|
3
2
|
import type { EventWithOptionalKeyState, IncrementValueParameters } from "../utils/types.js";
|
|
4
3
|
import type { NumberFieldRoot } from "./NumberFieldRoot.js";
|
|
5
4
|
import type { HTMLProps } from "../../utils/types.js";
|
|
@@ -13,15 +12,10 @@ export interface UseNumberFieldButtonParameters {
|
|
|
13
12
|
incrementValue: (amount: number, params: IncrementValueParameters) => boolean;
|
|
14
13
|
inputRef: React.RefObject<HTMLInputElement | null>;
|
|
15
14
|
inputValue: string;
|
|
16
|
-
intentionalTouchCheckTimeout: Timeout;
|
|
17
15
|
isIncrement: boolean;
|
|
18
|
-
isPressedRef: React.RefObject<boolean | null>;
|
|
19
16
|
locale?: Intl.LocalesArgument | undefined;
|
|
20
|
-
movesAfterTouchRef: React.RefObject<number | null>;
|
|
21
17
|
readOnly: boolean;
|
|
22
18
|
setValue: (value: number | null, details: NumberFieldRoot.ChangeEventDetails) => boolean;
|
|
23
|
-
startAutoChange: (isIncrement: boolean, event?: React.MouseEvent | Event) => void;
|
|
24
|
-
stopAutoChange: () => void;
|
|
25
19
|
valueRef: React.RefObject<number | null>;
|
|
26
20
|
lastChangedValueRef: React.RefObject<number | null>;
|
|
27
21
|
onValueCommitted: (value: number | null, eventDetails: NumberFieldRoot.CommitEventDetails) => void;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import { DEFAULT_STEP,
|
|
3
|
+
import { usePressAndHold } from "../../utils/usePressAndHold.js";
|
|
4
|
+
import { DEFAULT_STEP, CHANGE_VALUE_TICK_DELAY, START_AUTO_CHANGE_DELAY, SCROLLING_POINTER_MOVE_DISTANCE } from "../utils/constants.js";
|
|
5
5
|
import { parseNumber } from "../utils/parse.js";
|
|
6
6
|
import { createChangeEventDetails, createGenericEventDetails } from "../../utils/createBaseUIEventDetails.js";
|
|
7
|
+
import { REASONS } from "../../utils/reasons.js";
|
|
8
|
+
|
|
7
9
|
// Treat pen as touch-like to avoid forcing the software keyboard on stylus taps.
|
|
8
10
|
// Linux Chrome may emit "pen" historically for mouse usage due to a bug, but the touch path
|
|
9
11
|
// still works with minor behavioral differences.
|
|
@@ -20,27 +22,15 @@ export function useNumberFieldButton(params) {
|
|
|
20
22
|
incrementValue,
|
|
21
23
|
inputRef,
|
|
22
24
|
inputValue,
|
|
23
|
-
intentionalTouchCheckTimeout,
|
|
24
25
|
isIncrement,
|
|
25
|
-
isPressedRef,
|
|
26
26
|
locale,
|
|
27
|
-
movesAfterTouchRef,
|
|
28
27
|
readOnly,
|
|
29
28
|
setValue,
|
|
30
|
-
startAutoChange,
|
|
31
|
-
stopAutoChange,
|
|
32
29
|
valueRef,
|
|
33
30
|
lastChangedValueRef,
|
|
34
31
|
onValueCommitted
|
|
35
32
|
} = params;
|
|
36
|
-
const
|
|
37
|
-
x: 0,
|
|
38
|
-
y: 0
|
|
39
|
-
});
|
|
40
|
-
const isTouchingButtonRef = React.useRef(false);
|
|
41
|
-
const ignoreClickRef = React.useRef(false);
|
|
42
|
-
const pointerTypeRef = React.useRef('');
|
|
43
|
-
const pressReason = isIncrement ? 'increment-press' : 'decrement-press';
|
|
33
|
+
const pressReason = isIncrement ? REASONS.incrementPress : REASONS.decrementPress;
|
|
44
34
|
function commitValue(nativeEvent) {
|
|
45
35
|
allowInputSyncRef.current = true;
|
|
46
36
|
|
|
@@ -55,6 +45,28 @@ export function useNumberFieldButton(params) {
|
|
|
55
45
|
}));
|
|
56
46
|
}
|
|
57
47
|
}
|
|
48
|
+
const {
|
|
49
|
+
pointerHandlers,
|
|
50
|
+
shouldSkipClick
|
|
51
|
+
} = usePressAndHold({
|
|
52
|
+
disabled: disabled || readOnly,
|
|
53
|
+
elementRef: inputRef,
|
|
54
|
+
tickDelay: CHANGE_VALUE_TICK_DELAY,
|
|
55
|
+
startDelay: START_AUTO_CHANGE_DELAY,
|
|
56
|
+
scrollDistance: SCROLLING_POINTER_MOVE_DISTANCE,
|
|
57
|
+
tick(triggerEvent) {
|
|
58
|
+
const amount = getStepAmount(triggerEvent) ?? DEFAULT_STEP;
|
|
59
|
+
return incrementValue(amount, {
|
|
60
|
+
direction: isIncrement ? 1 : -1,
|
|
61
|
+
event: triggerEvent,
|
|
62
|
+
reason: pressReason
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
onStop(nativeEvent) {
|
|
66
|
+
const committed = lastChangedValueRef.current ?? valueRef.current;
|
|
67
|
+
onValueCommitted(committed, createGenericEventDetails(pressReason, nativeEvent));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
58
70
|
const props = {
|
|
59
71
|
disabled,
|
|
60
72
|
'aria-readonly': readOnly || undefined,
|
|
@@ -68,17 +80,10 @@ export function useNumberFieldButton(params) {
|
|
|
68
80
|
WebkitUserSelect: 'none',
|
|
69
81
|
userSelect: 'none'
|
|
70
82
|
},
|
|
71
|
-
|
|
72
|
-
isTouchingButtonRef.current = true;
|
|
73
|
-
},
|
|
74
|
-
onTouchEnd() {
|
|
75
|
-
isTouchingButtonRef.current = false;
|
|
76
|
-
},
|
|
83
|
+
...pointerHandlers,
|
|
77
84
|
onClick(event) {
|
|
78
85
|
const isDisabled = disabled || readOnly;
|
|
79
|
-
if (event.defaultPrevented || isDisabled || (
|
|
80
|
-
// If it's not a keyboard/virtual click, ignore.
|
|
81
|
-
isTouchLikePointerType(pointerTypeRef.current) ? ignoreClickRef.current : event.detail !== 0)) {
|
|
86
|
+
if (event.defaultPrevented || isDisabled || shouldSkipClick(event)) {
|
|
82
87
|
return;
|
|
83
88
|
}
|
|
84
89
|
commitValue(event.nativeEvent);
|
|
@@ -99,86 +104,14 @@ export function useNumberFieldButton(params) {
|
|
|
99
104
|
if (event.defaultPrevented || readOnly || !isMainButton || disabled) {
|
|
100
105
|
return;
|
|
101
106
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
isPressedRef.current = true;
|
|
105
|
-
incrementDownCoordsRef.current = {
|
|
106
|
-
x: event.clientX,
|
|
107
|
-
y: event.clientY
|
|
108
|
-
};
|
|
107
|
+
|
|
108
|
+
// Sync dirty input value before starting the hold sequence.
|
|
109
109
|
commitValue(event.nativeEvent);
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
event.preventDefault();
|
|
110
|
+
if (!isTouchLikePointerType(event.pointerType)) {
|
|
111
|
+
// Focus the input so the user can continue with keyboard interactions.
|
|
113
112
|
inputRef.current?.focus();
|
|
114
|
-
startAutoChange(isIncrement, event);
|
|
115
|
-
} else {
|
|
116
|
-
// We need to check if the pointerdown was intentional, and not the result of a scroll
|
|
117
|
-
// or pinch-zoom. In that case, we don't want to change the value.
|
|
118
|
-
intentionalTouchCheckTimeout.start(TOUCH_TIMEOUT, () => {
|
|
119
|
-
const moves = movesAfterTouchRef.current;
|
|
120
|
-
movesAfterTouchRef.current = 0;
|
|
121
|
-
// Only start auto-change if the touch is still pressed (prevents races
|
|
122
|
-
// with pointerup occurring before the timeout fires on quick taps).
|
|
123
|
-
const stillPressed = isPressedRef.current;
|
|
124
|
-
if (stillPressed && moves != null && moves < MAX_POINTER_MOVES_AFTER_TOUCH) {
|
|
125
|
-
startAutoChange(isIncrement, event);
|
|
126
|
-
ignoreClickRef.current = true; // synthesized click should be ignored
|
|
127
|
-
} else {
|
|
128
|
-
// No auto-change (simple tap or scroll gesture), allow the click handler
|
|
129
|
-
// to perform a single increment and commit.
|
|
130
|
-
ignoreClickRef.current = false;
|
|
131
|
-
stopAutoChange();
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
onPointerUp(event) {
|
|
137
|
-
// Ensure we mark the press as released for touch flows even if auto-change never started,
|
|
138
|
-
// so the delayed auto-change check won’t start after a quick tap.
|
|
139
|
-
if (isTouchLikePointerType(event.pointerType)) {
|
|
140
|
-
isPressedRef.current = false;
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
onPointerMove(event) {
|
|
144
|
-
const isDisabled = disabled || readOnly;
|
|
145
|
-
if (isDisabled || !isTouchLikePointerType(event.pointerType) || !isPressedRef.current) {
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
if (movesAfterTouchRef.current != null) {
|
|
149
|
-
movesAfterTouchRef.current += 1;
|
|
150
|
-
}
|
|
151
|
-
const {
|
|
152
|
-
x,
|
|
153
|
-
y
|
|
154
|
-
} = incrementDownCoordsRef.current;
|
|
155
|
-
const dx = x - event.clientX;
|
|
156
|
-
const dy = y - event.clientY;
|
|
157
|
-
|
|
158
|
-
// An alternative to this technique is to detect when the NumberField's parent container
|
|
159
|
-
// has been scrolled
|
|
160
|
-
if (dx ** 2 + dy ** 2 > SCROLLING_POINTER_MOVE_DISTANCE ** 2) {
|
|
161
|
-
stopAutoChange();
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
onMouseEnter(event) {
|
|
165
|
-
const isDisabled = disabled || readOnly;
|
|
166
|
-
if (event.defaultPrevented || isDisabled || !isPressedRef.current || isTouchingButtonRef.current || isTouchLikePointerType(pointerTypeRef.current)) {
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
startAutoChange(isIncrement, event);
|
|
170
|
-
},
|
|
171
|
-
onMouseLeave() {
|
|
172
|
-
if (isTouchingButtonRef.current) {
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
stopAutoChange();
|
|
176
|
-
},
|
|
177
|
-
onMouseUp() {
|
|
178
|
-
if (isTouchingButtonRef.current) {
|
|
179
|
-
return;
|
|
180
113
|
}
|
|
181
|
-
|
|
114
|
+
pointerHandlers.onPointerDown(event);
|
|
182
115
|
}
|
|
183
116
|
};
|
|
184
117
|
return props;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as ReactDOM from 'react-dom';
|
|
5
|
+
import { addEventListener } from '@base-ui/utils/addEventListener';
|
|
6
|
+
import { mergeCleanups } from '@base-ui/utils/mergeCleanups';
|
|
5
7
|
import { ownerWindow, ownerDocument } from '@base-ui/utils/owner';
|
|
6
8
|
import { isFirefox, isWebKit } from '@base-ui/utils/detectBrowser';
|
|
7
9
|
import { useStableCallback } from '@base-ui/utils/useStableCallback';
|
|
@@ -15,6 +17,7 @@ import { subscribeToVisualViewportResize } from "../utils/subscribeToVisualViewp
|
|
|
15
17
|
import { DEFAULT_STEP } from "../utils/constants.js";
|
|
16
18
|
import { createGenericEventDetails } from "../../utils/createBaseUIEventDetails.js";
|
|
17
19
|
import { REASONS } from "../../utils/reasons.js";
|
|
20
|
+
import { getTarget } from "../../floating-ui-react/utils.js";
|
|
18
21
|
|
|
19
22
|
/**
|
|
20
23
|
* An interactive area where the user can click and drag to change the field value.
|
|
@@ -30,6 +33,7 @@ export const NumberFieldScrubArea = /*#__PURE__*/React.forwardRef(function Numbe
|
|
|
30
33
|
direction = 'horizontal',
|
|
31
34
|
pixelSensitivity = 2,
|
|
32
35
|
teleportDistance,
|
|
36
|
+
style,
|
|
33
37
|
...elementProps
|
|
34
38
|
} = componentProps;
|
|
35
39
|
const {
|
|
@@ -184,12 +188,10 @@ export const NumberFieldScrubArea = /*#__PURE__*/React.forwardRef(function Numbe
|
|
|
184
188
|
}
|
|
185
189
|
}
|
|
186
190
|
const win = ownerWindow(inputRef.current);
|
|
187
|
-
|
|
188
|
-
win.addEventListener('pointermove', handleScrubPointerMove, true);
|
|
191
|
+
const unsubscribe = mergeCleanups(addEventListener(win, 'pointerup', handleScrubPointerUp, true), addEventListener(win, 'pointermove', handleScrubPointerMove, true));
|
|
189
192
|
return () => {
|
|
190
193
|
exitPointerLockTimeout.clear();
|
|
191
|
-
|
|
192
|
-
win.removeEventListener('pointermove', handleScrubPointerMove, true);
|
|
194
|
+
unsubscribe();
|
|
193
195
|
};
|
|
194
196
|
}, [disabled, readOnly, incrementValue, isScrubbing, getStepAmount, inputRef, onScrubbingChange, onScrub, direction, pixelSensitivity, lastChangedValueRef, onValueCommitted, valueRef, exitPointerLockTimeout]);
|
|
195
197
|
|
|
@@ -204,10 +206,7 @@ export const NumberFieldScrubArea = /*#__PURE__*/React.forwardRef(function Numbe
|
|
|
204
206
|
event.preventDefault();
|
|
205
207
|
}
|
|
206
208
|
}
|
|
207
|
-
|
|
208
|
-
return () => {
|
|
209
|
-
element.removeEventListener('touchstart', handleTouchStart);
|
|
210
|
-
};
|
|
209
|
+
return addEventListener(element, 'touchstart', handleTouchStart);
|
|
211
210
|
}, [disabled, readOnly]);
|
|
212
211
|
const defaultProps = {
|
|
213
212
|
role: 'presentation',
|
|
@@ -229,7 +228,7 @@ export const NumberFieldScrubArea = /*#__PURE__*/React.forwardRef(function Numbe
|
|
|
229
228
|
}
|
|
230
229
|
isScrubbingRef.current = true;
|
|
231
230
|
didMoveRef.current = false;
|
|
232
|
-
pointerDownTargetRef.current = event.
|
|
231
|
+
pointerDownTargetRef.current = getTarget(event.nativeEvent);
|
|
233
232
|
onScrubbingChange(true, event.nativeEvent);
|
|
234
233
|
|
|
235
234
|
// WebKit causes significant layout shift with the native message, so we can't use it.
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export declare const CHANGE_VALUE_TICK_DELAY = 60;
|
|
2
2
|
export declare const START_AUTO_CHANGE_DELAY = 400;
|
|
3
|
-
export declare const TOUCH_TIMEOUT = 50;
|
|
4
|
-
export declare const MAX_POINTER_MOVES_AFTER_TOUCH = 3;
|
|
5
3
|
export declare const SCROLLING_POINTER_MOVE_DISTANCE = 8;
|
|
6
4
|
export declare const DEFAULT_STEP = 1;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { addEventListener } from '@base-ui/utils/addEventListener';
|
|
1
2
|
import { ownerWindow } from '@base-ui/utils/owner';
|
|
2
3
|
|
|
3
4
|
// This lets us invert the scale of the cursor to match the OS scale, in which the cursor doesn't
|
|
@@ -13,8 +14,5 @@ export function subscribeToVisualViewportResize(element, visualScaleRef) {
|
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
handleVisualResize();
|
|
16
|
-
|
|
17
|
-
return () => {
|
|
18
|
-
vV.removeEventListener('resize', handleVisualResize);
|
|
19
|
-
};
|
|
17
|
+
return addEventListener(vV, 'resize', handleVisualResize);
|
|
20
18
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as OTPFieldPreview from "./index.parts.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { BaseUIComponentProps } from "../../utils/types.js";
|
|
3
|
+
import type { OTPFieldRootState } from "../root/OTPFieldRoot.js";
|
|
4
|
+
/**
|
|
5
|
+
* An individual OTP character input.
|
|
6
|
+
* Renders an `<input>` element.
|
|
7
|
+
*
|
|
8
|
+
* Documentation: [Base UI OTP Field](https://base-ui.com/react/components/otp-field)
|
|
9
|
+
*/
|
|
10
|
+
export declare const OTPFieldInput: React.ForwardRefExoticComponent<Omit<OTPFieldInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
11
|
+
export interface OTPFieldInputState extends Omit<OTPFieldRootState, 'filled' | 'value'> {
|
|
12
|
+
/**
|
|
13
|
+
* Whether this input contains a character.
|
|
14
|
+
*/
|
|
15
|
+
filled: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The input index.
|
|
18
|
+
*/
|
|
19
|
+
index: number;
|
|
20
|
+
/**
|
|
21
|
+
* The character rendered in this slot.
|
|
22
|
+
*/
|
|
23
|
+
value: string;
|
|
24
|
+
}
|
|
25
|
+
export interface OTPFieldInputProps extends BaseUIComponentProps<'input', OTPFieldInputState> {}
|
|
26
|
+
export declare namespace OTPFieldInput {
|
|
27
|
+
type State = OTPFieldInputState;
|
|
28
|
+
type Props = OTPFieldInputProps;
|
|
29
|
+
}
|