@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
|
@@ -21,22 +21,22 @@ var _constants = require("./constants");
|
|
|
21
21
|
function isDifferentGridRow(index, cols, prevRow) {
|
|
22
22
|
return Math.floor(index / cols) !== prevRow;
|
|
23
23
|
}
|
|
24
|
-
function isIndexOutOfListBounds(
|
|
25
|
-
return index < 0 || index >=
|
|
24
|
+
function isIndexOutOfListBounds(list, index) {
|
|
25
|
+
return index < 0 || index >= list.length;
|
|
26
26
|
}
|
|
27
27
|
function getMinListIndex(listRef, disabledIndices) {
|
|
28
|
-
return findNonDisabledListIndex(listRef, {
|
|
28
|
+
return findNonDisabledListIndex(listRef.current, {
|
|
29
29
|
disabledIndices
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
function getMaxListIndex(listRef, disabledIndices) {
|
|
33
|
-
return findNonDisabledListIndex(listRef, {
|
|
33
|
+
return findNonDisabledListIndex(listRef.current, {
|
|
34
34
|
decrement: true,
|
|
35
35
|
startingIndex: listRef.current.length,
|
|
36
36
|
disabledIndices
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
function findNonDisabledListIndex(
|
|
39
|
+
function findNonDisabledListIndex(list, {
|
|
40
40
|
startingIndex = -1,
|
|
41
41
|
decrement = false,
|
|
42
42
|
disabledIndices,
|
|
@@ -45,13 +45,14 @@ function findNonDisabledListIndex(listRef, {
|
|
|
45
45
|
let index = startingIndex;
|
|
46
46
|
do {
|
|
47
47
|
index += decrement ? -amount : amount;
|
|
48
|
-
} while (index >= 0 && index <=
|
|
48
|
+
} while (index >= 0 && index <= list.length - 1 && isListIndexDisabled(list, index, disabledIndices));
|
|
49
49
|
return index;
|
|
50
50
|
}
|
|
51
|
-
function getGridNavigatedIndex(
|
|
51
|
+
function getGridNavigatedIndex(list, {
|
|
52
52
|
event,
|
|
53
53
|
orientation,
|
|
54
54
|
loopFocus,
|
|
55
|
+
onLoop,
|
|
55
56
|
rtl,
|
|
56
57
|
cols,
|
|
57
58
|
disabledIndices,
|
|
@@ -79,7 +80,7 @@ function getGridNavigatedIndex(listRef, {
|
|
|
79
80
|
{
|
|
80
81
|
let currentRowEl = null;
|
|
81
82
|
let currentRowIndex = -1;
|
|
82
|
-
|
|
83
|
+
list.forEach((el, idx) => {
|
|
83
84
|
if (el == null) {
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
@@ -110,7 +111,7 @@ function getGridNavigatedIndex(listRef, {
|
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
const hasVirtualizedGaps = hasDomRows && visibleItemCount <
|
|
114
|
+
const hasVirtualizedGaps = hasDomRows && visibleItemCount < list.length;
|
|
114
115
|
const verticalCols = inferredDomCols || cols;
|
|
115
116
|
const navigateVertically = direction => {
|
|
116
117
|
if (!hasDomRows || prevIndex === -1) {
|
|
@@ -128,11 +129,17 @@ function getGridNavigatedIndex(listRef, {
|
|
|
128
129
|
return undefined;
|
|
129
130
|
}
|
|
130
131
|
nextRow = nextRow < 0 ? rows.length - 1 : 0;
|
|
132
|
+
if (onLoop) {
|
|
133
|
+
const clampedCol = Math.min(colInRow, rows[nextRow].length - 1);
|
|
134
|
+
const targetItemIndex = rows[nextRow][clampedCol] ?? rows[nextRow][0];
|
|
135
|
+
const returnedItemIndex = onLoop(event, prevIndex, targetItemIndex);
|
|
136
|
+
nextRow = rowIndexMap[returnedItemIndex] ?? nextRow;
|
|
137
|
+
}
|
|
131
138
|
}
|
|
132
139
|
const targetRow = rows[nextRow];
|
|
133
140
|
for (let col = Math.min(colInRow, targetRow.length - 1); col >= 0; col -= 1) {
|
|
134
141
|
const candidate = targetRow[col];
|
|
135
|
-
if (!isListIndexDisabled(
|
|
142
|
+
if (!isListIndexDisabled(list, candidate, disabledIndices)) {
|
|
136
143
|
return candidate;
|
|
137
144
|
}
|
|
138
145
|
}
|
|
@@ -156,7 +163,7 @@ function getGridNavigatedIndex(listRef, {
|
|
|
156
163
|
}
|
|
157
164
|
const rowEnd = Math.min(rowStart + verticalCols - 1, maxIndex);
|
|
158
165
|
for (let candidate = Math.min(rowStart + colInRow, rowEnd); candidate >= rowStart; candidate -= 1) {
|
|
159
|
-
if (!isListIndexDisabled(
|
|
166
|
+
if (!isListIndexDisabled(list, candidate, disabledIndices)) {
|
|
160
167
|
return candidate;
|
|
161
168
|
}
|
|
162
169
|
}
|
|
@@ -172,7 +179,7 @@ function getGridNavigatedIndex(listRef, {
|
|
|
172
179
|
} else if (prevIndex === -1) {
|
|
173
180
|
nextIndex = verticalDirection === 'up' ? maxIndex : minIndex;
|
|
174
181
|
} else {
|
|
175
|
-
nextIndex = findNonDisabledListIndex(
|
|
182
|
+
nextIndex = findNonDisabledListIndex(list, {
|
|
176
183
|
startingIndex: prevIndex,
|
|
177
184
|
amount: verticalCols,
|
|
178
185
|
decrement: verticalDirection === 'up',
|
|
@@ -188,17 +195,23 @@ function getGridNavigatedIndex(listRef, {
|
|
|
188
195
|
} else {
|
|
189
196
|
nextIndex = maxCol > col ? offset : offset - verticalCols;
|
|
190
197
|
}
|
|
198
|
+
if (onLoop) {
|
|
199
|
+
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
200
|
+
}
|
|
191
201
|
}
|
|
192
202
|
if (verticalDirection === 'down' && prevIndex + verticalCols > maxIndex) {
|
|
193
|
-
nextIndex = findNonDisabledListIndex(
|
|
203
|
+
nextIndex = findNonDisabledListIndex(list, {
|
|
194
204
|
startingIndex: prevIndex % verticalCols - verticalCols,
|
|
195
205
|
amount: verticalCols,
|
|
196
206
|
disabledIndices
|
|
197
207
|
});
|
|
208
|
+
if (onLoop) {
|
|
209
|
+
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
210
|
+
}
|
|
198
211
|
}
|
|
199
212
|
}
|
|
200
213
|
}
|
|
201
|
-
if (isIndexOutOfListBounds(
|
|
214
|
+
if (isIndexOutOfListBounds(list, nextIndex)) {
|
|
202
215
|
nextIndex = prevIndex;
|
|
203
216
|
}
|
|
204
217
|
}
|
|
@@ -211,21 +224,27 @@ function getGridNavigatedIndex(listRef, {
|
|
|
211
224
|
(0, _event.stopEvent)(event);
|
|
212
225
|
}
|
|
213
226
|
if (prevIndex % cols !== cols - 1) {
|
|
214
|
-
nextIndex = findNonDisabledListIndex(
|
|
227
|
+
nextIndex = findNonDisabledListIndex(list, {
|
|
215
228
|
startingIndex: prevIndex,
|
|
216
229
|
disabledIndices
|
|
217
230
|
});
|
|
218
231
|
if (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {
|
|
219
|
-
nextIndex = findNonDisabledListIndex(
|
|
232
|
+
nextIndex = findNonDisabledListIndex(list, {
|
|
220
233
|
startingIndex: prevIndex - prevIndex % cols - 1,
|
|
221
234
|
disabledIndices
|
|
222
235
|
});
|
|
236
|
+
if (onLoop) {
|
|
237
|
+
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
238
|
+
}
|
|
223
239
|
}
|
|
224
240
|
} else if (loopFocus) {
|
|
225
|
-
nextIndex = findNonDisabledListIndex(
|
|
241
|
+
nextIndex = findNonDisabledListIndex(list, {
|
|
226
242
|
startingIndex: prevIndex - prevIndex % cols - 1,
|
|
227
243
|
disabledIndices
|
|
228
244
|
});
|
|
245
|
+
if (onLoop) {
|
|
246
|
+
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
247
|
+
}
|
|
229
248
|
}
|
|
230
249
|
if (isDifferentGridRow(nextIndex, cols, prevRow)) {
|
|
231
250
|
nextIndex = prevIndex;
|
|
@@ -236,36 +255,45 @@ function getGridNavigatedIndex(listRef, {
|
|
|
236
255
|
(0, _event.stopEvent)(event);
|
|
237
256
|
}
|
|
238
257
|
if (prevIndex % cols !== 0) {
|
|
239
|
-
nextIndex = findNonDisabledListIndex(
|
|
258
|
+
nextIndex = findNonDisabledListIndex(list, {
|
|
240
259
|
startingIndex: prevIndex,
|
|
241
260
|
decrement: true,
|
|
242
261
|
disabledIndices
|
|
243
262
|
});
|
|
244
263
|
if (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {
|
|
245
|
-
nextIndex = findNonDisabledListIndex(
|
|
264
|
+
nextIndex = findNonDisabledListIndex(list, {
|
|
246
265
|
startingIndex: prevIndex + (cols - prevIndex % cols),
|
|
247
266
|
decrement: true,
|
|
248
267
|
disabledIndices
|
|
249
268
|
});
|
|
269
|
+
if (onLoop) {
|
|
270
|
+
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
271
|
+
}
|
|
250
272
|
}
|
|
251
273
|
} else if (loopFocus) {
|
|
252
|
-
nextIndex = findNonDisabledListIndex(
|
|
274
|
+
nextIndex = findNonDisabledListIndex(list, {
|
|
253
275
|
startingIndex: prevIndex + (cols - prevIndex % cols),
|
|
254
276
|
decrement: true,
|
|
255
277
|
disabledIndices
|
|
256
278
|
});
|
|
279
|
+
if (onLoop) {
|
|
280
|
+
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
281
|
+
}
|
|
257
282
|
}
|
|
258
283
|
if (isDifferentGridRow(nextIndex, cols, prevRow)) {
|
|
259
284
|
nextIndex = prevIndex;
|
|
260
285
|
}
|
|
261
286
|
}
|
|
262
287
|
const lastRow = (0, _utils.floor)(maxIndex / cols) === prevRow;
|
|
263
|
-
if (isIndexOutOfListBounds(
|
|
288
|
+
if (isIndexOutOfListBounds(list, nextIndex)) {
|
|
264
289
|
if (loopFocus && lastRow) {
|
|
265
|
-
nextIndex = event.key === (rtl ? _constants.ARROW_RIGHT : _constants.ARROW_LEFT) ? maxIndex : findNonDisabledListIndex(
|
|
290
|
+
nextIndex = event.key === (rtl ? _constants.ARROW_RIGHT : _constants.ARROW_LEFT) ? maxIndex : findNonDisabledListIndex(list, {
|
|
266
291
|
startingIndex: prevIndex - prevIndex % cols - 1,
|
|
267
292
|
disabledIndices
|
|
268
293
|
});
|
|
294
|
+
if (onLoop) {
|
|
295
|
+
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
296
|
+
}
|
|
269
297
|
} else {
|
|
270
298
|
nextIndex = prevIndex;
|
|
271
299
|
}
|
|
@@ -344,12 +372,12 @@ function getGridCellIndexOfCorner(index, sizes, cellMap, cols, corner) {
|
|
|
344
372
|
function getGridCellIndices(indices, cellMap) {
|
|
345
373
|
return cellMap.flatMap((index, cellIndex) => indices.includes(index) ? [cellIndex] : []);
|
|
346
374
|
}
|
|
347
|
-
function isListIndexDisabled(
|
|
375
|
+
function isListIndexDisabled(list, index, disabledIndices) {
|
|
348
376
|
const isExplicitlyDisabled = typeof disabledIndices === 'function' ? disabledIndices(index) : disabledIndices?.includes(index) ?? false;
|
|
349
377
|
if (isExplicitlyDisabled) {
|
|
350
378
|
return true;
|
|
351
379
|
}
|
|
352
|
-
const element =
|
|
380
|
+
const element = list[index];
|
|
353
381
|
if (!element) {
|
|
354
382
|
return false;
|
|
355
383
|
}
|
|
@@ -359,5 +387,8 @@ function isListIndexDisabled(listRef, index, disabledIndices) {
|
|
|
359
387
|
return !disabledIndices && (element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true');
|
|
360
388
|
}
|
|
361
389
|
function isElementVisible(element) {
|
|
390
|
+
if (typeof element.checkVisibility === 'function') {
|
|
391
|
+
return element.checkVisibility();
|
|
392
|
+
}
|
|
362
393
|
return (0, _dom.getComputedStyle)(element).display !== 'none';
|
|
363
394
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type PopupTriggerMap } from "../../utils/popups/index.js";
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
import { activeElement, contains, getTarget } from "./shadowDom.js";
|
|
3
|
+
export { activeElement, contains, getTarget };
|
|
4
4
|
export declare function isTargetInsideEnabledTrigger(target: EventTarget | null, triggerElements: PopupTriggerMap): boolean;
|
|
5
|
-
export declare function getTarget(event: Event): EventTarget | null;
|
|
6
5
|
export declare function isEventTargetWithin(event: Event, node: Node | null | undefined): boolean;
|
|
7
6
|
export declare function isRootElement(element: Element): boolean;
|
|
8
7
|
export declare function isTypeableElement(element: unknown): boolean;
|
|
8
|
+
export declare function isInteractiveElement(element: Element | null): boolean;
|
|
9
9
|
export declare function isTypeableCombobox(element: Element | null): boolean;
|
|
10
10
|
export declare function matchesFocusVisible(element: Element | null): boolean;
|
|
11
11
|
export declare function getFloatingFocusElement(floatingElement: HTMLElement | null | undefined): HTMLElement | null;
|
|
@@ -3,11 +3,27 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
Object.defineProperty(exports, "activeElement", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _shadowDom.activeElement;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "contains", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _shadowDom.contains;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
8
18
|
exports.getFloatingFocusElement = getFloatingFocusElement;
|
|
9
|
-
exports
|
|
19
|
+
Object.defineProperty(exports, "getTarget", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _shadowDom.getTarget;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
10
25
|
exports.isEventTargetWithin = isEventTargetWithin;
|
|
26
|
+
exports.isInteractiveElement = isInteractiveElement;
|
|
11
27
|
exports.isRootElement = isRootElement;
|
|
12
28
|
exports.isTargetInsideEnabledTrigger = isTargetInsideEnabledTrigger;
|
|
13
29
|
exports.isTypeableCombobox = isTypeableCombobox;
|
|
@@ -16,38 +32,7 @@ exports.matchesFocusVisible = matchesFocusVisible;
|
|
|
16
32
|
var _dom = require("@floating-ui/utils/dom");
|
|
17
33
|
var _detectBrowser = require("@base-ui/utils/detectBrowser");
|
|
18
34
|
var _constants = require("./constants");
|
|
19
|
-
|
|
20
|
-
let element = doc.activeElement;
|
|
21
|
-
while (element?.shadowRoot?.activeElement != null) {
|
|
22
|
-
element = element.shadowRoot.activeElement;
|
|
23
|
-
}
|
|
24
|
-
return element;
|
|
25
|
-
}
|
|
26
|
-
function contains(parent, child) {
|
|
27
|
-
if (!parent || !child) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
const rootNode = child.getRootNode?.();
|
|
31
|
-
|
|
32
|
-
// First, attempt with faster native method
|
|
33
|
-
if (parent.contains(child)) {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// then fallback to custom implementation with Shadow DOM support
|
|
38
|
-
if (rootNode && (0, _dom.isShadowRoot)(rootNode)) {
|
|
39
|
-
let next = child;
|
|
40
|
-
while (next) {
|
|
41
|
-
if (parent === next) {
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
next = next.parentNode || next.host;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Give up, the result is false
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
35
|
+
var _shadowDom = require("./shadowDom");
|
|
51
36
|
function isTargetInsideEnabledTrigger(target, triggerElements) {
|
|
52
37
|
if (!(0, _dom.isElement)(target)) {
|
|
53
38
|
return false;
|
|
@@ -57,21 +42,12 @@ function isTargetInsideEnabledTrigger(target, triggerElements) {
|
|
|
57
42
|
return !targetElement.hasAttribute('data-trigger-disabled');
|
|
58
43
|
}
|
|
59
44
|
for (const [, trigger] of triggerElements.entries()) {
|
|
60
|
-
if (contains(trigger, targetElement)) {
|
|
45
|
+
if ((0, _shadowDom.contains)(trigger, targetElement)) {
|
|
61
46
|
return !trigger.hasAttribute('data-trigger-disabled');
|
|
62
47
|
}
|
|
63
48
|
}
|
|
64
49
|
return false;
|
|
65
50
|
}
|
|
66
|
-
function getTarget(event) {
|
|
67
|
-
if ('composedPath' in event) {
|
|
68
|
-
return event.composedPath()[0];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// TS thinks `event` is of type never as it assumes all browsers support
|
|
72
|
-
// `composedPath()`, but browsers without shadow DOM don't.
|
|
73
|
-
return event.target;
|
|
74
|
-
}
|
|
75
51
|
function isEventTargetWithin(event, node) {
|
|
76
52
|
if (node == null) {
|
|
77
53
|
return false;
|
|
@@ -90,6 +66,9 @@ function isRootElement(element) {
|
|
|
90
66
|
function isTypeableElement(element) {
|
|
91
67
|
return (0, _dom.isHTMLElement)(element) && element.matches(_constants.TYPEABLE_SELECTOR);
|
|
92
68
|
}
|
|
69
|
+
function isInteractiveElement(element) {
|
|
70
|
+
return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${_constants.TYPEABLE_SELECTOR}`) != null;
|
|
71
|
+
}
|
|
93
72
|
function isTypeableCombobox(element) {
|
|
94
73
|
if (!element) {
|
|
95
74
|
return false;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { FocusableElement } from
|
|
1
|
+
import type { FocusableElement } from "./tabbable.js";
|
|
2
|
+
import { NOOP } from "../../utils/noop.js";
|
|
2
3
|
interface Options {
|
|
3
4
|
preventScroll?: boolean | undefined;
|
|
4
5
|
cancelPrevious?: boolean | undefined;
|
|
5
6
|
sync?: boolean | undefined;
|
|
6
7
|
}
|
|
7
|
-
export declare function enqueueFocus(el: FocusableElement | null, options?: Options):
|
|
8
|
+
export declare function enqueueFocus(el: FocusableElement | null, options?: Options): typeof NOOP;
|
|
8
9
|
export {};
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.enqueueFocus = enqueueFocus;
|
|
7
|
+
var _noop = require("../../utils/noop");
|
|
7
8
|
let rafId = 0;
|
|
8
9
|
function enqueueFocus(el, options = {}) {
|
|
9
10
|
const {
|
|
@@ -19,7 +20,14 @@ function enqueueFocus(el, options = {}) {
|
|
|
19
20
|
});
|
|
20
21
|
if (sync) {
|
|
21
22
|
exec();
|
|
22
|
-
|
|
23
|
-
rafId = requestAnimationFrame(exec);
|
|
23
|
+
return _noop.NOOP;
|
|
24
24
|
}
|
|
25
|
+
const currentRafId = requestAnimationFrame(exec);
|
|
26
|
+
rafId = currentRafId;
|
|
27
|
+
return () => {
|
|
28
|
+
if (rafId === currentRafId) {
|
|
29
|
+
cancelAnimationFrame(currentRafId);
|
|
30
|
+
rafId = 0;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
25
33
|
}
|
|
@@ -9,12 +9,13 @@ var _FloatingRootStore = require("../components/FloatingRootStore");
|
|
|
9
9
|
function getEmptyRootContext() {
|
|
10
10
|
return new _FloatingRootStore.FloatingRootStore({
|
|
11
11
|
open: false,
|
|
12
|
+
transitionStatus: undefined,
|
|
12
13
|
floatingElement: null,
|
|
13
14
|
referenceElement: null,
|
|
14
15
|
triggerElements: new _popups.PopupTriggerMap(),
|
|
15
16
|
floatingId: '',
|
|
17
|
+
syncOnly: false,
|
|
16
18
|
nested: false,
|
|
17
|
-
noEmit: false,
|
|
18
19
|
onOpenChange: undefined
|
|
19
20
|
});
|
|
20
21
|
}
|
|
@@ -9,8 +9,8 @@ exports.getNodeChildren = getNodeChildren;
|
|
|
9
9
|
/* eslint-disable @typescript-eslint/no-loop-func */
|
|
10
10
|
|
|
11
11
|
function getNodeChildren(nodes, id, onlyOpenChildren = true) {
|
|
12
|
-
const directChildren = nodes.filter(node => node.parentId === id
|
|
13
|
-
return directChildren.flatMap(child => [child, ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
|
|
12
|
+
const directChildren = nodes.filter(node => node.parentId === id);
|
|
13
|
+
return directChildren.flatMap(child => [...(!onlyOpenChildren || child.context?.open ? [child] : []), ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
|
|
14
14
|
}
|
|
15
15
|
function getDeepestNode(nodes, id) {
|
|
16
16
|
let deepestNodeId;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.activeElement = activeElement;
|
|
7
|
+
exports.contains = contains;
|
|
8
|
+
exports.getTarget = getTarget;
|
|
9
|
+
var _dom = require("@floating-ui/utils/dom");
|
|
10
|
+
function activeElement(doc) {
|
|
11
|
+
let element = doc.activeElement;
|
|
12
|
+
while (element?.shadowRoot?.activeElement != null) {
|
|
13
|
+
element = element.shadowRoot.activeElement;
|
|
14
|
+
}
|
|
15
|
+
return element;
|
|
16
|
+
}
|
|
17
|
+
function contains(parent, child) {
|
|
18
|
+
if (!parent || !child) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
const rootNode = child.getRootNode?.();
|
|
22
|
+
|
|
23
|
+
// First, attempt with the faster native method.
|
|
24
|
+
if (parent.contains(child)) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Then fall back to traversing out of shadow roots when needed.
|
|
29
|
+
if (rootNode && (0, _dom.isShadowRoot)(rootNode)) {
|
|
30
|
+
let next = child;
|
|
31
|
+
while (next) {
|
|
32
|
+
if (parent === next) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
next = next.parentNode || next.host;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
function getTarget(event) {
|
|
41
|
+
if ('composedPath' in event) {
|
|
42
|
+
return event.composedPath()[0];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// TS assumes `composedPath()` always exists, but older browsers without
|
|
46
|
+
// shadow DOM support still fall back to `target`.
|
|
47
|
+
return event.target;
|
|
48
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
1
|
+
export type FocusableElement = HTMLElement | SVGElement;
|
|
2
|
+
export declare function isTabbable(element: Element | null): boolean;
|
|
3
|
+
export declare function focusable(container: Element): FocusableElement[];
|
|
4
|
+
export declare function tabbable(container: Element): FocusableElement[];
|
|
6
5
|
export declare function getNextTabbable(referenceElement: Element | null): FocusableElement | null;
|
|
7
6
|
export declare function getPreviousTabbable(referenceElement: Element | null): FocusableElement | null;
|
|
8
7
|
export declare function getTabbableAfterElement(referenceElement: Element | null): FocusableElement | null;
|
|
@@ -5,26 +5,139 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.disableFocusInside = disableFocusInside;
|
|
7
7
|
exports.enableFocusInside = enableFocusInside;
|
|
8
|
+
exports.focusable = focusable;
|
|
8
9
|
exports.getNextTabbable = getNextTabbable;
|
|
9
10
|
exports.getPreviousTabbable = getPreviousTabbable;
|
|
10
11
|
exports.getTabbableAfterElement = getTabbableAfterElement;
|
|
11
12
|
exports.getTabbableBeforeElement = getTabbableBeforeElement;
|
|
12
|
-
exports.getTabbableOptions = void 0;
|
|
13
13
|
exports.isOutsideEvent = isOutsideEvent;
|
|
14
|
-
|
|
14
|
+
exports.isTabbable = isTabbable;
|
|
15
|
+
exports.tabbable = tabbable;
|
|
16
|
+
var _dom = require("@floating-ui/utils/dom");
|
|
15
17
|
var _owner = require("@base-ui/utils/owner");
|
|
16
18
|
var _element = require("./element");
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
var _composite = require("./composite");
|
|
20
|
+
const CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
|
|
21
|
+
function getParentElement(element) {
|
|
22
|
+
const assignedSlot = element.assignedSlot;
|
|
23
|
+
if (assignedSlot) {
|
|
24
|
+
return assignedSlot;
|
|
25
|
+
}
|
|
26
|
+
if (element.parentElement) {
|
|
27
|
+
return element.parentElement;
|
|
28
|
+
}
|
|
29
|
+
const rootNode = element.getRootNode();
|
|
30
|
+
return (0, _dom.isShadowRoot)(rootNode) ? rootNode.host : null;
|
|
31
|
+
}
|
|
32
|
+
function getDetailsSummary(details) {
|
|
33
|
+
for (const child of Array.from(details.children)) {
|
|
34
|
+
if ((0, _dom.getNodeName)(child) === 'summary') {
|
|
35
|
+
return child;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
function isWithinOpenDetailsSummary(element, details) {
|
|
41
|
+
const summary = getDetailsSummary(details);
|
|
42
|
+
return !!summary && (element === summary || (0, _element.contains)(summary, element));
|
|
43
|
+
}
|
|
44
|
+
function isFocusableCandidate(element) {
|
|
45
|
+
const nodeName = element ? (0, _dom.getNodeName)(element) : '';
|
|
46
|
+
return element != null && element.matches(CANDIDATE_SELECTOR) && (nodeName !== 'summary' || element.parentElement != null && (0, _dom.getNodeName)(element.parentElement) === 'details' && getDetailsSummary(element.parentElement) === element) && (nodeName !== 'details' || getDetailsSummary(element) == null) && (nodeName !== 'input' || element.type !== 'hidden');
|
|
47
|
+
}
|
|
48
|
+
function isFocusableElement(element) {
|
|
49
|
+
if (!isFocusableCandidate(element) || !element.isConnected || element.matches(':disabled')) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
for (let current = element; current; current = getParentElement(current)) {
|
|
53
|
+
const isSlot = (0, _dom.getNodeName)(current) === 'slot';
|
|
54
|
+
if (current.hasAttribute('inert')) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
if (current !== element && (0, _dom.getNodeName)(current) === 'details' && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute('hidden') || !isSlot && !(0, _composite.isElementVisible)(current)) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
function getTabIndex(element) {
|
|
64
|
+
const tabIndex = element.tabIndex;
|
|
65
|
+
if (tabIndex < 0) {
|
|
66
|
+
const nodeName = (0, _dom.getNodeName)(element);
|
|
67
|
+
if (nodeName === 'details' || nodeName === 'audio' || nodeName === 'video' || (0, _dom.isHTMLElement)(element) && element.isContentEditable) {
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return tabIndex;
|
|
72
|
+
}
|
|
73
|
+
function getNamedRadioInput(element) {
|
|
74
|
+
if ((0, _dom.getNodeName)(element) !== 'input') {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
const input = element;
|
|
78
|
+
return input.type === 'radio' && input.name !== '' ? input : null;
|
|
79
|
+
}
|
|
80
|
+
function isTabbableRadio(element, candidates) {
|
|
81
|
+
const input = getNamedRadioInput(element);
|
|
82
|
+
if (!input) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
const checkedRadio = candidates.find(candidate => {
|
|
86
|
+
const radio = getNamedRadioInput(candidate);
|
|
87
|
+
return radio?.name === input.name && radio.form === input.form && radio.checked;
|
|
88
|
+
});
|
|
89
|
+
if (checkedRadio) {
|
|
90
|
+
return checkedRadio === input;
|
|
91
|
+
}
|
|
92
|
+
return candidates.find(candidate => {
|
|
93
|
+
const radio = getNamedRadioInput(candidate);
|
|
94
|
+
return radio?.name === input.name && radio.form === input.form;
|
|
95
|
+
}) === input;
|
|
96
|
+
}
|
|
97
|
+
function getComposedChildren(container) {
|
|
98
|
+
if ((0, _dom.isHTMLElement)(container) && (0, _dom.getNodeName)(container) === 'slot') {
|
|
99
|
+
const assignedElements = container.assignedElements({
|
|
100
|
+
flatten: true
|
|
101
|
+
});
|
|
102
|
+
if (assignedElements.length > 0) {
|
|
103
|
+
return assignedElements;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if ((0, _dom.isHTMLElement)(container) && container.shadowRoot) {
|
|
107
|
+
return Array.from(container.shadowRoot.children);
|
|
108
|
+
}
|
|
109
|
+
return Array.from(container.children);
|
|
110
|
+
}
|
|
111
|
+
function appendCandidates(container, list) {
|
|
112
|
+
getComposedChildren(container).forEach(child => {
|
|
113
|
+
if (isFocusableCandidate(child)) {
|
|
114
|
+
list.push(child);
|
|
115
|
+
}
|
|
116
|
+
appendCandidates(child, list);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function appendMatchingElements(container, selector, list) {
|
|
120
|
+
getComposedChildren(container).forEach(child => {
|
|
121
|
+
if ((0, _dom.isHTMLElement)(child) && child.matches(selector)) {
|
|
122
|
+
list.push(child);
|
|
123
|
+
}
|
|
124
|
+
appendMatchingElements(child, selector, list);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function isTabbable(element) {
|
|
128
|
+
return isFocusableElement(element) && getTabIndex(element) >= 0;
|
|
129
|
+
}
|
|
130
|
+
function focusable(container) {
|
|
131
|
+
const candidates = [];
|
|
132
|
+
appendCandidates(container, candidates);
|
|
133
|
+
return candidates.filter(isFocusableElement);
|
|
134
|
+
}
|
|
135
|
+
function tabbable(container) {
|
|
136
|
+
const candidates = focusable(container);
|
|
137
|
+
return candidates.filter(element => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
|
|
138
|
+
}
|
|
26
139
|
function getTabbableIn(container, dir) {
|
|
27
|
-
const list =
|
|
140
|
+
const list = tabbable(container);
|
|
28
141
|
const len = list.length;
|
|
29
142
|
if (len === 0) {
|
|
30
143
|
return undefined;
|
|
@@ -45,7 +158,7 @@ function getTabbableNearElement(referenceElement, dir) {
|
|
|
45
158
|
if (!referenceElement) {
|
|
46
159
|
return null;
|
|
47
160
|
}
|
|
48
|
-
const list =
|
|
161
|
+
const list = tabbable((0, _owner.ownerDocument)(referenceElement).body);
|
|
49
162
|
const elementCount = list.length;
|
|
50
163
|
if (elementCount === 0) {
|
|
51
164
|
return null;
|
|
@@ -69,14 +182,15 @@ function isOutsideEvent(event, container) {
|
|
|
69
182
|
return !relatedTarget || !(0, _element.contains)(containerElement, relatedTarget);
|
|
70
183
|
}
|
|
71
184
|
function disableFocusInside(container) {
|
|
72
|
-
const tabbableElements =
|
|
185
|
+
const tabbableElements = tabbable(container);
|
|
73
186
|
tabbableElements.forEach(element => {
|
|
74
187
|
element.dataset.tabindex = element.getAttribute('tabindex') || '';
|
|
75
188
|
element.setAttribute('tabindex', '-1');
|
|
76
189
|
});
|
|
77
190
|
}
|
|
78
191
|
function enableFocusInside(container) {
|
|
79
|
-
const elements =
|
|
192
|
+
const elements = [];
|
|
193
|
+
appendMatchingElements(container, '[data-tabindex]', elements);
|
|
80
194
|
elements.forEach(element => {
|
|
81
195
|
const tabindex = element.dataset.tabindex;
|
|
82
196
|
delete element.dataset.tabindex;
|
package/form/Form.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from "./merge-props/index.js";
|
|
|
22
22
|
export * from "./meter/index.js";
|
|
23
23
|
export * from "./navigation-menu/index.js";
|
|
24
24
|
export * from "./number-field/index.js";
|
|
25
|
+
export * from "./otp-field/index.js";
|
|
25
26
|
export * from "./popover/index.js";
|
|
26
27
|
export * from "./preview-card/index.js";
|
|
27
28
|
export * from "./progress/index.js";
|