@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
|
@@ -5,6 +5,7 @@ import { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidd
|
|
|
5
5
|
import { useMergedRefs } from '@base-ui/utils/useMergedRefs';
|
|
6
6
|
import { useRefWithInit } from '@base-ui/utils/useRefWithInit';
|
|
7
7
|
import { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';
|
|
8
|
+
import { usePreviousValue } from '@base-ui/utils/usePreviousValue';
|
|
8
9
|
import { useControlled } from '@base-ui/utils/useControlled';
|
|
9
10
|
import { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';
|
|
10
11
|
import { useStableCallback } from '@base-ui/utils/useStableCallback';
|
|
@@ -13,6 +14,7 @@ import { useStore, Store } from '@base-ui/utils/store';
|
|
|
13
14
|
import { useClick, useDismiss, useFloatingRootContext, useInteractions, useListNavigation, useTypeahead } from "../../floating-ui-react/index.js";
|
|
14
15
|
import { SelectRootContext, SelectFloatingContext } from "./SelectRootContext.js";
|
|
15
16
|
import { useFieldRootContext } from "../../field/root/FieldRootContext.js";
|
|
17
|
+
import { useRegisterFieldControl } from "../../field/root/useRegisterFieldControl.js";
|
|
16
18
|
import { useLabelableId } from "../../labelable-provider/useLabelableId.js";
|
|
17
19
|
import { useTransitionStatus } from "../../utils/useTransitionStatus.js";
|
|
18
20
|
import { selectors } from "../store.js";
|
|
@@ -20,17 +22,17 @@ import { createChangeEventDetails } from "../../utils/createBaseUIEventDetails.j
|
|
|
20
22
|
import { REASONS } from "../../utils/reasons.js";
|
|
21
23
|
import { useOpenChangeComplete } from "../../utils/useOpenChangeComplete.js";
|
|
22
24
|
import { useFormContext } from "../../form/FormContext.js";
|
|
23
|
-
import {
|
|
24
|
-
import { stringifyAsValue } from "../../utils/resolveValueLabel.js";
|
|
25
|
+
import { stringifyAsLabel, stringifyAsValue } from "../../utils/resolveValueLabel.js";
|
|
25
26
|
import { EMPTY_ARRAY, EMPTY_OBJECT } from "../../utils/constants.js";
|
|
26
27
|
import { defaultItemEquality, findItemIndex } from "../../utils/itemEquality.js";
|
|
27
28
|
import { useValueChanged } from "../../utils/useValueChanged.js";
|
|
28
29
|
import { useOpenInteractionType } from "../../utils/useOpenInteractionType.js";
|
|
30
|
+
import { getMaxScrollOffset, normalizeScrollOffset } from "../../utils/scrollEdges.js";
|
|
29
31
|
import { mergeProps } from "../../merge-props/index.js";
|
|
30
32
|
|
|
31
33
|
/**
|
|
32
34
|
* Groups all parts of the select.
|
|
33
|
-
* Doesn
|
|
35
|
+
* Doesn't render its own HTML element.
|
|
34
36
|
*
|
|
35
37
|
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
36
38
|
*/
|
|
@@ -45,6 +47,7 @@ export function SelectRoot(props) {
|
|
|
45
47
|
defaultOpen = false,
|
|
46
48
|
onOpenChange,
|
|
47
49
|
name: nameProp,
|
|
50
|
+
form,
|
|
48
51
|
autoComplete,
|
|
49
52
|
disabled: disabledProp = false,
|
|
50
53
|
readOnly = false,
|
|
@@ -147,6 +150,8 @@ export function SelectRoot(props) {
|
|
|
147
150
|
const selectedIndex = useStore(store, selectors.selectedIndex);
|
|
148
151
|
const triggerElement = useStore(store, selectors.triggerElement);
|
|
149
152
|
const positionerElement = useStore(store, selectors.positionerElement);
|
|
153
|
+
const previousOpenMethod = usePreviousValue(openMethod);
|
|
154
|
+
const renderedOpenMethod = openMethod ?? previousOpenMethod;
|
|
150
155
|
const serializedValue = React.useMemo(() => {
|
|
151
156
|
if (multiple && Array.isArray(value) && value.length === 0) {
|
|
152
157
|
return '';
|
|
@@ -160,13 +165,11 @@ export function SelectRoot(props) {
|
|
|
160
165
|
return stringifyAsValue(value, itemToStringValue);
|
|
161
166
|
}, [multiple, value, itemToStringValue]);
|
|
162
167
|
const controlRef = useValueAsRef(store.state.triggerElement);
|
|
163
|
-
|
|
168
|
+
const getFieldValue = useStableCallback(() => fieldStringValue);
|
|
169
|
+
useRegisterFieldControl(controlRef, {
|
|
164
170
|
id: generatedId,
|
|
165
|
-
commit: validation.commit,
|
|
166
171
|
value,
|
|
167
|
-
|
|
168
|
-
name,
|
|
169
|
-
getValue: () => fieldStringValue
|
|
172
|
+
getValue: getFieldValue
|
|
170
173
|
});
|
|
171
174
|
const initialValueRef = React.useRef(value);
|
|
172
175
|
useIsoLayoutEffect(() => {
|
|
@@ -236,7 +239,10 @@ export function SelectRoot(props) {
|
|
|
236
239
|
});
|
|
237
240
|
const handleUnmount = useStableCallback(() => {
|
|
238
241
|
setMounted(false);
|
|
239
|
-
store.
|
|
242
|
+
store.update({
|
|
243
|
+
activeIndex: null,
|
|
244
|
+
openMethod: null
|
|
245
|
+
});
|
|
240
246
|
onOpenChangeComplete?.(false);
|
|
241
247
|
});
|
|
242
248
|
useOpenChangeComplete({
|
|
@@ -264,10 +270,10 @@ export function SelectRoot(props) {
|
|
|
264
270
|
if (!scroller) {
|
|
265
271
|
return;
|
|
266
272
|
}
|
|
267
|
-
const
|
|
268
|
-
const
|
|
269
|
-
const shouldShowUp =
|
|
270
|
-
const shouldShowDown =
|
|
273
|
+
const maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);
|
|
274
|
+
const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop);
|
|
275
|
+
const shouldShowUp = scrollTop > 0;
|
|
276
|
+
const shouldShowDown = scrollTop < maxScrollTop;
|
|
271
277
|
if (store.state.scrollUpArrowVisible !== shouldShowUp) {
|
|
272
278
|
store.set('scrollUpArrowVisible', shouldShowUp);
|
|
273
279
|
}
|
|
@@ -303,9 +309,7 @@ export function SelectRoot(props) {
|
|
|
303
309
|
}
|
|
304
310
|
store.set('activeIndex', nextActiveIndex);
|
|
305
311
|
},
|
|
306
|
-
|
|
307
|
-
// the `alignItemWithTrigger=true`, causing a performance issue on Chrome.
|
|
308
|
-
focusItemOnHover: false
|
|
312
|
+
focusItemOnHover: highlightItemOnHover
|
|
309
313
|
});
|
|
310
314
|
const typeahead = useTypeahead(floatingContext, {
|
|
311
315
|
enabled: !readOnly && !disabled && (open || !multiple),
|
|
@@ -354,9 +358,9 @@ export function SelectRoot(props) {
|
|
|
354
358
|
itemToStringLabel,
|
|
355
359
|
itemToStringValue,
|
|
356
360
|
isItemEqualToValue,
|
|
357
|
-
openMethod
|
|
361
|
+
openMethod: renderedOpenMethod
|
|
358
362
|
});
|
|
359
|
-
}, [store, generatedId, modal, multiple, value, open, mounted, transitionStatus, getFloatingProps, mergedTriggerProps, items, itemToStringLabel, itemToStringValue, isItemEqualToValue,
|
|
363
|
+
}, [store, generatedId, modal, multiple, value, open, mounted, transitionStatus, getFloatingProps, mergedTriggerProps, items, itemToStringLabel, itemToStringValue, isItemEqualToValue, renderedOpenMethod]);
|
|
360
364
|
const contextValue = React.useMemo(() => ({
|
|
361
365
|
store,
|
|
362
366
|
name,
|
|
@@ -399,11 +403,12 @@ export function SelectRoot(props) {
|
|
|
399
403
|
const currentSerializedValue = stringifyAsValue(v, itemToStringValue);
|
|
400
404
|
return /*#__PURE__*/_jsx("input", {
|
|
401
405
|
type: "hidden",
|
|
406
|
+
form: form,
|
|
402
407
|
name: name,
|
|
403
408
|
value: currentSerializedValue
|
|
404
409
|
}, currentSerializedValue);
|
|
405
410
|
});
|
|
406
|
-
}, [multiple, value, name, itemToStringValue]);
|
|
411
|
+
}, [multiple, value, form, name, itemToStringValue]);
|
|
407
412
|
return /*#__PURE__*/_jsx(SelectRootContext.Provider, {
|
|
408
413
|
value: contextValue,
|
|
409
414
|
children: /*#__PURE__*/_jsxs(SelectFloatingContext.Provider, {
|
|
@@ -414,7 +419,6 @@ export function SelectRoot(props) {
|
|
|
414
419
|
// Move focus to the trigger element when the hidden input is focused.
|
|
415
420
|
store.state.triggerElement?.focus({
|
|
416
421
|
// Supported in Chrome from 144 (January 2026)
|
|
417
|
-
// @ts-expect-error - focusVisible is not yet in the lib.dom.d.ts
|
|
418
422
|
focusVisible: true
|
|
419
423
|
});
|
|
420
424
|
},
|
|
@@ -424,7 +428,7 @@ export function SelectRoot(props) {
|
|
|
424
428
|
if (event.nativeEvent.defaultPrevented) {
|
|
425
429
|
return;
|
|
426
430
|
}
|
|
427
|
-
const nextValue = event.
|
|
431
|
+
const nextValue = event.currentTarget.value;
|
|
428
432
|
const details = createChangeEventDetails(REASONS.none, event.nativeEvent);
|
|
429
433
|
function handleChange() {
|
|
430
434
|
if (multiple) {
|
|
@@ -434,8 +438,15 @@ export function SelectRoot(props) {
|
|
|
434
438
|
|
|
435
439
|
// Handle single selection: match against registered values using serialization
|
|
436
440
|
const matchingValue = valuesRef.current.find(v => {
|
|
437
|
-
|
|
438
|
-
|
|
441
|
+
// Try matching by value first (e.g., "US" for country code)
|
|
442
|
+
const candidateValue = stringifyAsValue(v, itemToStringValue);
|
|
443
|
+
if (candidateValue.toLowerCase() === nextValue.toLowerCase()) {
|
|
444
|
+
return true;
|
|
445
|
+
}
|
|
446
|
+
// Also try matching by label for browser autofill compatibility
|
|
447
|
+
// (browsers autofill with displayed text like "United States", not the underlying value)
|
|
448
|
+
const candidateLabel = stringifyAsLabel(v, itemToStringLabel);
|
|
449
|
+
if (candidateLabel.toLowerCase() === nextValue.toLowerCase()) {
|
|
439
450
|
return true;
|
|
440
451
|
}
|
|
441
452
|
return false;
|
|
@@ -453,6 +464,7 @@ export function SelectRoot(props) {
|
|
|
453
464
|
}
|
|
454
465
|
}),
|
|
455
466
|
id: generatedId && hiddenInputName == null ? `${generatedId}-hidden-input` : undefined,
|
|
467
|
+
form: form,
|
|
456
468
|
name: hiddenInputName,
|
|
457
469
|
autoComplete: autoComplete,
|
|
458
470
|
value: serializedValue,
|
|
@@ -462,7 +474,8 @@ export function SelectRoot(props) {
|
|
|
462
474
|
ref: ref,
|
|
463
475
|
style: name ? visuallyHiddenInput : visuallyHidden,
|
|
464
476
|
tabIndex: -1,
|
|
465
|
-
"aria-hidden": true
|
|
477
|
+
"aria-hidden": true,
|
|
478
|
+
suppressHydrationWarning: true
|
|
466
479
|
}), hiddenInputs]
|
|
467
480
|
})
|
|
468
481
|
});
|
|
@@ -9,6 +9,7 @@ import { useSelectPositionerContext } from "../positioner/SelectPositionerContex
|
|
|
9
9
|
import { useTransitionStatus } from "../../utils/useTransitionStatus.js";
|
|
10
10
|
import { useOpenChangeComplete } from "../../utils/useOpenChangeComplete.js";
|
|
11
11
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
12
|
+
import { getMaxScrollOffset, normalizeScrollOffset, SCROLL_EDGE_TOLERANCE_PX } from "../../utils/scrollEdges.js";
|
|
12
13
|
import { selectors } from "../store.js";
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -18,10 +19,12 @@ export const SelectScrollArrow = /*#__PURE__*/React.forwardRef(function SelectSc
|
|
|
18
19
|
const {
|
|
19
20
|
render,
|
|
20
21
|
className,
|
|
22
|
+
style,
|
|
21
23
|
direction,
|
|
22
24
|
keepMounted = false,
|
|
23
25
|
...elementProps
|
|
24
26
|
} = componentProps;
|
|
27
|
+
const isUp = direction === 'up';
|
|
25
28
|
const {
|
|
26
29
|
store,
|
|
27
30
|
popupRef,
|
|
@@ -34,14 +37,14 @@ export const SelectScrollArrow = /*#__PURE__*/React.forwardRef(function SelectSc
|
|
|
34
37
|
scrollDownArrowRef,
|
|
35
38
|
scrollUpArrowRef
|
|
36
39
|
} = useSelectPositionerContext();
|
|
37
|
-
const visibleSelector =
|
|
40
|
+
const visibleSelector = isUp ? selectors.scrollUpArrowVisible : selectors.scrollDownArrowVisible;
|
|
38
41
|
const stateVisible = useStore(store, visibleSelector);
|
|
39
42
|
const openMethod = useStore(store, selectors.openMethod);
|
|
40
43
|
|
|
41
44
|
// Scroll arrows are disabled for touch modality as they are a hover-only element.
|
|
42
45
|
const visible = stateVisible && openMethod !== 'touch';
|
|
43
46
|
const timeout = useTimeout();
|
|
44
|
-
const scrollArrowRef =
|
|
47
|
+
const scrollArrowRef = isUp ? scrollUpArrowRef : scrollDownArrowRef;
|
|
45
48
|
const {
|
|
46
49
|
transitionStatus,
|
|
47
50
|
setMounted
|
|
@@ -75,7 +78,7 @@ export const SelectScrollArrow = /*#__PURE__*/React.forwardRef(function SelectSc
|
|
|
75
78
|
};
|
|
76
79
|
const defaultProps = {
|
|
77
80
|
'aria-hidden': true,
|
|
78
|
-
children:
|
|
81
|
+
children: isUp ? '▲' : '▼',
|
|
79
82
|
style: {
|
|
80
83
|
position: 'absolute'
|
|
81
84
|
},
|
|
@@ -91,72 +94,25 @@ export const SelectScrollArrow = /*#__PURE__*/React.forwardRef(function SelectSc
|
|
|
91
94
|
}
|
|
92
95
|
store.set('activeIndex', null);
|
|
93
96
|
handleScrollArrowVisibility();
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
+
const maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);
|
|
98
|
+
const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop);
|
|
99
|
+
const isScrolledToEdge = scrollTop === (isUp ? 0 : maxScrollTop);
|
|
100
|
+
const items = listRef.current;
|
|
101
|
+
if (scrollTop !== scroller.scrollTop) {
|
|
102
|
+
scroller.scrollTop = scrollTop;
|
|
103
|
+
}
|
|
97
104
|
|
|
98
105
|
// Fallback when there are no items registered yet.
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
store.set('scrollUpArrowVisible', !isScrolledToTop);
|
|
102
|
-
} else {
|
|
103
|
-
store.set('scrollDownArrowVisible', !isScrolledToBottom);
|
|
104
|
-
}
|
|
106
|
+
if (items.length === 0) {
|
|
107
|
+
store.set(isUp ? 'scrollUpArrowVisible' : 'scrollDownArrowVisible', !isScrolledToEdge);
|
|
105
108
|
}
|
|
106
|
-
if (
|
|
109
|
+
if (isScrolledToEdge) {
|
|
107
110
|
timeout.clear();
|
|
108
111
|
return;
|
|
109
112
|
}
|
|
110
|
-
if (
|
|
111
|
-
const items = listRef.current;
|
|
113
|
+
if (items.length > 0) {
|
|
112
114
|
const scrollArrowHeight = scrollArrowRef.current?.offsetHeight || 0;
|
|
113
|
-
|
|
114
|
-
let firstVisibleIndex = 0;
|
|
115
|
-
const scrollTop = scroller.scrollTop + scrollArrowHeight;
|
|
116
|
-
for (let i = 0; i < items.length; i += 1) {
|
|
117
|
-
const item = items[i];
|
|
118
|
-
if (item) {
|
|
119
|
-
const itemTop = item.offsetTop;
|
|
120
|
-
if (itemTop >= scrollTop) {
|
|
121
|
-
firstVisibleIndex = i;
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
const targetIndex = Math.max(0, firstVisibleIndex - 1);
|
|
127
|
-
if (targetIndex < firstVisibleIndex) {
|
|
128
|
-
const targetItem = items[targetIndex];
|
|
129
|
-
if (targetItem) {
|
|
130
|
-
scroller.scrollTop = Math.max(0, targetItem.offsetTop - scrollArrowHeight);
|
|
131
|
-
}
|
|
132
|
-
} else {
|
|
133
|
-
// Already at the first item; ensure we reach the absolute top to account for group labels.
|
|
134
|
-
scroller.scrollTop = 0;
|
|
135
|
-
}
|
|
136
|
-
} else {
|
|
137
|
-
let lastVisibleIndex = items.length - 1;
|
|
138
|
-
const scrollBottom = scroller.scrollTop + scroller.clientHeight - scrollArrowHeight;
|
|
139
|
-
for (let i = 0; i < items.length; i += 1) {
|
|
140
|
-
const item = items[i];
|
|
141
|
-
if (item) {
|
|
142
|
-
const itemBottom = item.offsetTop + item.offsetHeight;
|
|
143
|
-
if (itemBottom > scrollBottom) {
|
|
144
|
-
lastVisibleIndex = Math.max(0, i - 1);
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
const targetIndex = Math.min(items.length - 1, lastVisibleIndex + 1);
|
|
150
|
-
if (targetIndex > lastVisibleIndex) {
|
|
151
|
-
const targetItem = items[targetIndex];
|
|
152
|
-
if (targetItem) {
|
|
153
|
-
scroller.scrollTop = targetItem.offsetTop + targetItem.offsetHeight - scroller.clientHeight + scrollArrowHeight;
|
|
154
|
-
}
|
|
155
|
-
} else {
|
|
156
|
-
// Already at the last item; ensure we reach the true bottom.
|
|
157
|
-
scroller.scrollTop = scroller.scrollHeight - scroller.clientHeight;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
115
|
+
scroller.scrollTop = getTargetScrollTop(items, isUp, scrollTop, scroller.clientHeight, scrollArrowHeight, maxScrollTop);
|
|
160
116
|
}
|
|
161
117
|
timeout.start(40, scrollNextItem);
|
|
162
118
|
}
|
|
@@ -177,4 +133,32 @@ export const SelectScrollArrow = /*#__PURE__*/React.forwardRef(function SelectSc
|
|
|
177
133
|
}
|
|
178
134
|
return element;
|
|
179
135
|
});
|
|
180
|
-
if (process.env.NODE_ENV !== "production") SelectScrollArrow.displayName = "SelectScrollArrow";
|
|
136
|
+
if (process.env.NODE_ENV !== "production") SelectScrollArrow.displayName = "SelectScrollArrow";
|
|
137
|
+
function getTargetScrollTop(items, isUp, scrollTop, clientHeight, scrollArrowHeight, maxScrollTop) {
|
|
138
|
+
if (isUp) {
|
|
139
|
+
let firstVisibleIndex = 0;
|
|
140
|
+
const visibleTop = scrollTop + scrollArrowHeight - SCROLL_EDGE_TOLERANCE_PX;
|
|
141
|
+
for (let i = 0; i < items.length; i += 1) {
|
|
142
|
+
const item = items[i];
|
|
143
|
+
if (item && item.offsetTop >= visibleTop) {
|
|
144
|
+
firstVisibleIndex = i;
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
const targetIndex = Math.max(0, firstVisibleIndex - 1);
|
|
149
|
+
const targetItem = items[targetIndex];
|
|
150
|
+
return targetIndex < firstVisibleIndex && targetItem ? normalizeScrollOffset(targetItem.offsetTop - scrollArrowHeight, maxScrollTop) : 0;
|
|
151
|
+
}
|
|
152
|
+
let lastVisibleIndex = items.length - 1;
|
|
153
|
+
const visibleBottom = scrollTop + clientHeight - scrollArrowHeight + SCROLL_EDGE_TOLERANCE_PX;
|
|
154
|
+
for (let i = 0; i < items.length; i += 1) {
|
|
155
|
+
const item = items[i];
|
|
156
|
+
if (item && item.offsetTop + item.offsetHeight > visibleBottom) {
|
|
157
|
+
lastVisibleIndex = Math.max(0, i - 1);
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const targetIndex = Math.min(items.length - 1, lastVisibleIndex + 1);
|
|
162
|
+
const targetItem = items[targetIndex];
|
|
163
|
+
return targetIndex > lastVisibleIndex && targetItem ? normalizeScrollOffset(targetItem.offsetTop + targetItem.offsetHeight - clientHeight + scrollArrowHeight, maxScrollTop) : maxScrollTop;
|
|
164
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export let SeparatorDataAttributes = /*#__PURE__*/function (SeparatorDataAttributes) {
|
|
2
|
+
/**
|
|
3
|
+
* Indicates the orientation of the separator.
|
|
4
|
+
* @type {'horizontal' | 'vertical'}
|
|
5
|
+
*/
|
|
6
|
+
SeparatorDataAttributes["orientation"] = "data-orientation";
|
|
7
|
+
return SeparatorDataAttributes;
|
|
8
|
+
}({});
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { isElement } from '@floating-ui/utils/dom';
|
|
5
|
+
import { addEventListener } from '@base-ui/utils/addEventListener';
|
|
5
6
|
import { ownerDocument } from '@base-ui/utils/owner';
|
|
6
7
|
import { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';
|
|
7
8
|
import { useStableCallback } from '@base-ui/utils/useStableCallback';
|
|
8
9
|
import { useValueAsRef } from '@base-ui/utils/useValueAsRef';
|
|
9
|
-
import { activeElement, contains } from "../../floating-ui-react/utils.js";
|
|
10
|
+
import { activeElement, contains, getTarget } from "../../floating-ui-react/utils.js";
|
|
10
11
|
import { clamp } from "../../utils/clamp.js";
|
|
11
12
|
import { createChangeEventDetails, createGenericEventDetails } from "../../utils/createBaseUIEventDetails.js";
|
|
12
13
|
import { REASONS } from "../../utils/reasons.js";
|
|
@@ -70,6 +71,7 @@ export const SliderControl = /*#__PURE__*/React.forwardRef(function SliderContro
|
|
|
70
71
|
const {
|
|
71
72
|
render: renderProp,
|
|
72
73
|
className,
|
|
74
|
+
style,
|
|
73
75
|
...elementProps
|
|
74
76
|
} = componentProps;
|
|
75
77
|
const {
|
|
@@ -228,8 +230,15 @@ export const SliderControl = /*#__PURE__*/React.forwardRef(function SliderContro
|
|
|
228
230
|
}
|
|
229
231
|
});
|
|
230
232
|
const focusThumb = useStableCallback(thumbIndex => {
|
|
231
|
-
thumbRefs.current?.[thumbIndex]?.querySelector('input[type="range"]')
|
|
232
|
-
|
|
233
|
+
const input = thumbRefs.current?.[thumbIndex]?.querySelector('input[type="range"]');
|
|
234
|
+
if (!input) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
input.focus({
|
|
238
|
+
preventScroll: true,
|
|
239
|
+
// Prevent pointer-driven focus rings in browsers that support this option.
|
|
240
|
+
// Supported in Chrome from 144+.
|
|
241
|
+
focusVisible: false
|
|
233
242
|
});
|
|
234
243
|
});
|
|
235
244
|
const handleTouchMove = useStableCallback(nativeEvent => {
|
|
@@ -328,11 +337,11 @@ export const SliderControl = /*#__PURE__*/React.forwardRef(function SliderContro
|
|
|
328
337
|
if (!control) {
|
|
329
338
|
return () => stopListening();
|
|
330
339
|
}
|
|
331
|
-
|
|
340
|
+
const unsubscribeTouchStart = addEventListener(control, 'touchstart', handleTouchStart, {
|
|
332
341
|
passive: true
|
|
333
342
|
});
|
|
334
343
|
return () => {
|
|
335
|
-
|
|
344
|
+
unsubscribeTouchStart();
|
|
336
345
|
focusFrame.cancel();
|
|
337
346
|
stopListening();
|
|
338
347
|
};
|
|
@@ -349,7 +358,8 @@ export const SliderControl = /*#__PURE__*/React.forwardRef(function SliderContro
|
|
|
349
358
|
['data-base-ui-slider-control']: renderBeforeHydration ? '' : undefined,
|
|
350
359
|
onPointerDown(event) {
|
|
351
360
|
const control = controlRef.current;
|
|
352
|
-
|
|
361
|
+
const target = getTarget(event.nativeEvent);
|
|
362
|
+
if (!control || disabled || event.defaultPrevented || !isElement(target) ||
|
|
353
363
|
// Only handle left clicks
|
|
354
364
|
event.button !== 0) {
|
|
355
365
|
return;
|
|
@@ -392,8 +402,7 @@ export const SliderControl = /*#__PURE__*/React.forwardRef(function SliderContro
|
|
|
392
402
|
doc.addEventListener('pointerup', handleTouchEnd, {
|
|
393
403
|
once: true
|
|
394
404
|
});
|
|
395
|
-
}
|
|
396
|
-
tabIndex: -1
|
|
405
|
+
}
|
|
397
406
|
}, elementProps],
|
|
398
407
|
stateAttributesMapping: sliderStateAttributesMapping
|
|
399
408
|
});
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { useOnMount } from '@base-ui/utils/useOnMount';
|
|
5
4
|
import { valueToPercent } from "../../utils/valueToPercent.js";
|
|
5
|
+
import { useIsHydrating } from "../../utils/useIsHydrating.js";
|
|
6
6
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
7
7
|
import { useSliderRootContext } from "../root/SliderRootContext.js";
|
|
8
8
|
import { sliderStateAttributesMapping } from "../root/stateAttributesMapping.js";
|
|
9
|
-
function getInsetStyles(vertical, range, start, end, renderBeforeHydration,
|
|
9
|
+
function getInsetStyles(vertical, range, start, end, renderBeforeHydration, hydrating) {
|
|
10
10
|
const visibility = start === undefined || range && end === undefined ? 'hidden' : undefined;
|
|
11
11
|
const startEdge = vertical ? 'bottom' : 'insetInlineStart';
|
|
12
12
|
const mainSide = vertical ? 'height' : 'width';
|
|
13
13
|
const crossSide = vertical ? 'width' : 'height';
|
|
14
14
|
const styles = {
|
|
15
|
-
visibility: renderBeforeHydration &&
|
|
15
|
+
visibility: renderBeforeHydration && hydrating ? 'hidden' : visibility,
|
|
16
16
|
position: vertical ? 'absolute' : 'relative',
|
|
17
17
|
[crossSide]: 'inherit'
|
|
18
18
|
};
|
|
@@ -56,6 +56,7 @@ export const SliderIndicator = /*#__PURE__*/React.forwardRef(function SliderIndi
|
|
|
56
56
|
const {
|
|
57
57
|
render,
|
|
58
58
|
className,
|
|
59
|
+
style: styleProp,
|
|
59
60
|
...elementProps
|
|
60
61
|
} = componentProps;
|
|
61
62
|
const {
|
|
@@ -68,11 +69,10 @@ export const SliderIndicator = /*#__PURE__*/React.forwardRef(function SliderIndi
|
|
|
68
69
|
state,
|
|
69
70
|
values
|
|
70
71
|
} = useSliderRootContext();
|
|
71
|
-
const
|
|
72
|
-
useOnMount(() => setIsMounted(true));
|
|
72
|
+
const isHydrating = useIsHydrating();
|
|
73
73
|
const vertical = orientation === 'vertical';
|
|
74
74
|
const range = values.length > 1;
|
|
75
|
-
const style = inset ? getInsetStyles(vertical, range, indicatorPosition[0], indicatorPosition[1], renderBeforeHydration,
|
|
75
|
+
const style = inset ? getInsetStyles(vertical, range, indicatorPosition[0], indicatorPosition[1], renderBeforeHydration, isHydrating) : getCenteredStyles(vertical, range, valueToPercent(values[0], min, max), valueToPercent(values[values.length - 1], min, max));
|
|
76
76
|
const element = useRenderElement('div', componentProps, {
|
|
77
77
|
state,
|
|
78
78
|
ref: forwardedRef,
|
|
@@ -18,6 +18,7 @@ export const SliderLabel = /*#__PURE__*/React.forwardRef(function SliderLabel(co
|
|
|
18
18
|
const {
|
|
19
19
|
render,
|
|
20
20
|
className,
|
|
21
|
+
style,
|
|
21
22
|
...elementProps
|
|
22
23
|
} = componentProps;
|
|
23
24
|
// Keep label id derived from the root and ignore runtime `id` overrides from untyped consumers.
|
|
@@ -57,7 +57,7 @@ export interface SliderRootState extends FieldRootState {
|
|
|
57
57
|
}
|
|
58
58
|
export interface SliderRootProps<Value extends number | readonly number[] = number | readonly number[]> extends BaseUIComponentProps<'div', SliderRootState> {
|
|
59
59
|
/**
|
|
60
|
-
* The uncontrolled value of the slider when it
|
|
60
|
+
* The uncontrolled value of the slider when it's initially rendered.
|
|
61
61
|
*
|
|
62
62
|
* To render a controlled slider, use the `value` prop instead.
|
|
63
63
|
*/
|
|
@@ -97,6 +97,11 @@ export interface SliderRootProps<Value extends number | readonly number[] = numb
|
|
|
97
97
|
* Identifies the field when a form is submitted.
|
|
98
98
|
*/
|
|
99
99
|
name?: string | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Identifies the form that owns the slider inputs.
|
|
102
|
+
* Useful when the slider is rendered outside the form.
|
|
103
|
+
*/
|
|
104
|
+
form?: string | undefined;
|
|
100
105
|
/**
|
|
101
106
|
* The component orientation.
|
|
102
107
|
* @default 'horizontal'
|
|
@@ -13,10 +13,10 @@ import { useBaseUiId } from "../../utils/useBaseUiId.js";
|
|
|
13
13
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
14
14
|
import { clamp } from "../../utils/clamp.js";
|
|
15
15
|
import { areArraysEqual } from "../../utils/areArraysEqual.js";
|
|
16
|
-
import { activeElement } from "../../floating-ui-react/utils.js";
|
|
16
|
+
import { activeElement, contains } from "../../floating-ui-react/utils.js";
|
|
17
17
|
import { CompositeList } from "../../composite/list/CompositeList.js";
|
|
18
|
-
import { useField } from "../../field/useField.js";
|
|
19
18
|
import { useFieldRootContext } from "../../field/root/FieldRootContext.js";
|
|
19
|
+
import { useRegisterFieldControl } from "../../field/root/useRegisterFieldControl.js";
|
|
20
20
|
import { useFormContext } from "../../form/FormContext.js";
|
|
21
21
|
import { useLabelableContext } from "../../labelable-provider/LabelableContext.js";
|
|
22
22
|
import { resolveAriaLabelledBy, getDefaultLabelId } from "../../utils/resolveAriaLabelledBy.js";
|
|
@@ -60,6 +60,7 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
60
60
|
max = 100,
|
|
61
61
|
min = 0,
|
|
62
62
|
minStepsBetweenValues = 0,
|
|
63
|
+
form,
|
|
63
64
|
name: nameProp,
|
|
64
65
|
onValueChange: onValueChangeProp,
|
|
65
66
|
onValueCommitted: onValueCommittedProp,
|
|
@@ -68,6 +69,7 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
68
69
|
thumbCollisionBehavior = 'push',
|
|
69
70
|
thumbAlignment = 'center',
|
|
70
71
|
value: valueProp,
|
|
72
|
+
style,
|
|
71
73
|
...elementProps
|
|
72
74
|
} = componentProps;
|
|
73
75
|
const id = useBaseUiId(idProp);
|
|
@@ -133,13 +135,9 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
133
135
|
setLastUsedThumbIndex(value);
|
|
134
136
|
}
|
|
135
137
|
});
|
|
136
|
-
|
|
138
|
+
useRegisterFieldControl(controlRef, {
|
|
137
139
|
id,
|
|
138
|
-
|
|
139
|
-
value: valueUnwrapped,
|
|
140
|
-
controlRef,
|
|
141
|
-
name,
|
|
142
|
-
getValue: () => valueUnwrapped
|
|
140
|
+
value: valueUnwrapped
|
|
143
141
|
});
|
|
144
142
|
useValueChanged(valueUnwrapped, () => {
|
|
145
143
|
clearErrors(name);
|
|
@@ -219,7 +217,7 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
219
217
|
}
|
|
220
218
|
useIsoLayoutEffect(() => {
|
|
221
219
|
const activeEl = activeElement(ownerDocument(sliderRef.current));
|
|
222
|
-
if (disabled &&
|
|
220
|
+
if (disabled && contains(sliderRef.current, activeEl)) {
|
|
223
221
|
// This is necessary because Firefox and Safari will keep focus
|
|
224
222
|
// on a disabled element:
|
|
225
223
|
// https://codesandbox.io/p/sandbox/mui-pr-22247-forked-h151h?file=/src/App.js
|
|
@@ -257,6 +255,7 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
257
255
|
lastUsedThumbIndex,
|
|
258
256
|
lastChangedValueRef,
|
|
259
257
|
lastChangeReasonRef,
|
|
258
|
+
form,
|
|
260
259
|
locale,
|
|
261
260
|
max,
|
|
262
261
|
min,
|
|
@@ -281,7 +280,7 @@ export const SliderRoot = /*#__PURE__*/React.forwardRef(function SliderRoot(comp
|
|
|
281
280
|
thumbMap,
|
|
282
281
|
thumbRefs,
|
|
283
282
|
values
|
|
284
|
-
}), [active, controlRef, ariaLabelledby, defaultLabelId, disabled, dragging, validation, formatOptionsRef, handleInputChange, indicatorPosition, largeStep, lastUsedThumbIndex, lastChangedValueRef, lastChangeReasonRef, locale, max, min, minStepsBetweenValues, name, onValueCommitted, orientation, pressedInputRef, pressedThumbCenterOffsetRef, pressedThumbIndexRef, pressedValuesRef, registerFieldControlRef, setActive, setDragging, setIndicatorPosition, setLabelId, setValue, state, step, thumbCollisionBehavior, thumbAlignment, thumbMap, thumbRefs, values]);
|
|
283
|
+
}), [active, controlRef, ariaLabelledby, defaultLabelId, disabled, dragging, validation, formatOptionsRef, handleInputChange, indicatorPosition, largeStep, lastUsedThumbIndex, lastChangedValueRef, lastChangeReasonRef, form, locale, max, min, minStepsBetweenValues, name, onValueCommitted, orientation, pressedInputRef, pressedThumbCenterOffsetRef, pressedThumbIndexRef, pressedValuesRef, registerFieldControlRef, setActive, setDragging, setIndicatorPosition, setLabelId, setValue, state, step, thumbCollisionBehavior, thumbAlignment, thumbMap, thumbRefs, values]);
|
|
285
284
|
const element = useRenderElement('div', componentProps, {
|
|
286
285
|
state,
|
|
287
286
|
ref: [forwardedRef, sliderRef],
|
|
@@ -48,6 +48,7 @@ export interface SliderRootContext {
|
|
|
48
48
|
* The minimum steps between values in a range slider.
|
|
49
49
|
*/
|
|
50
50
|
minStepsBetweenValues: number;
|
|
51
|
+
form: string | undefined;
|
|
51
52
|
name: string | undefined;
|
|
52
53
|
/**
|
|
53
54
|
* Function to be called when drag ends and the pointer is released.
|