akar 2.0.22 → 2.0.24
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/README.md +8 -6
- package/dist/Avatar/utils.cjs.map +1 -1
- package/dist/Avatar/utils.js.map +1 -1
- package/dist/Calendar/CalendarCellTrigger.cjs.map +1 -1
- package/dist/Calendar/CalendarCellTrigger.js.map +1 -1
- package/dist/Calendar/CalendarRoot.cjs.map +1 -1
- package/dist/Calendar/CalendarRoot.js.map +1 -1
- package/dist/Calendar/useCalendar.cjs.map +1 -1
- package/dist/Calendar/useCalendar.js.map +1 -1
- package/dist/Checkbox/CheckboxGroupRoot.cjs.map +1 -1
- package/dist/Checkbox/CheckboxGroupRoot.js.map +1 -1
- package/dist/Checkbox/CheckboxRoot.cjs.map +1 -1
- package/dist/Checkbox/CheckboxRoot.js.map +1 -1
- package/dist/Checkbox/utils.cjs.map +1 -1
- package/dist/Checkbox/utils.js.map +1 -1
- package/dist/Collection/Collection.cjs.map +1 -1
- package/dist/Collection/Collection.js.map +1 -1
- package/dist/ColorArea/ColorAreaArea.cjs +1 -1
- package/dist/ColorArea/ColorAreaArea.cjs.map +1 -1
- package/dist/ColorArea/ColorAreaArea.js +1 -1
- package/dist/ColorArea/ColorAreaArea.js.map +1 -1
- package/dist/ColorArea/ColorAreaRoot.cjs.map +1 -1
- package/dist/ColorArea/ColorAreaRoot.js.map +1 -1
- package/dist/ColorArea/utils.cjs +1 -0
- package/dist/ColorArea/utils.cjs.map +1 -1
- package/dist/ColorArea/utils.js +1 -0
- package/dist/ColorArea/utils.js.map +1 -1
- package/dist/ColorSlider/ColorSliderRoot.cjs.map +1 -1
- package/dist/ColorSlider/ColorSliderRoot.js.map +1 -1
- package/dist/ColorSwatchPicker/ColorSwatchPickerRoot.cjs.map +1 -1
- package/dist/ColorSwatchPicker/ColorSwatchPickerRoot.js.map +1 -1
- package/dist/Combobox/ComboboxCancel.cjs +1 -1
- package/dist/Combobox/ComboboxCancel.cjs.map +1 -1
- package/dist/Combobox/ComboboxCancel.js +1 -1
- package/dist/Combobox/ComboboxCancel.js.map +1 -1
- package/dist/Combobox/ComboboxContentImpl.cjs.map +1 -1
- package/dist/Combobox/ComboboxContentImpl.js.map +1 -1
- package/dist/Combobox/ComboboxGroup.cjs.map +1 -1
- package/dist/Combobox/ComboboxGroup.js.map +1 -1
- package/dist/Combobox/ComboboxRoot.cjs.map +1 -1
- package/dist/Combobox/ComboboxRoot.js.map +1 -1
- package/dist/DateField/DateFieldRoot.cjs +3 -1
- package/dist/DateField/DateFieldRoot.cjs.map +1 -1
- package/dist/DateField/DateFieldRoot.js +3 -1
- package/dist/DateField/DateFieldRoot.js.map +1 -1
- package/dist/DatePicker/DatePickerRoot.cjs.map +1 -1
- package/dist/DatePicker/DatePickerRoot.js.map +1 -1
- package/dist/DateRangeField/DateRangeFieldInput.cjs.map +1 -1
- package/dist/DateRangeField/DateRangeFieldInput.js.map +1 -1
- package/dist/DateRangeField/DateRangeFieldRoot.cjs.map +1 -1
- package/dist/DateRangeField/DateRangeFieldRoot.js.map +1 -1
- package/dist/DateRangePicker/DateRangePickerRoot.cjs.map +1 -1
- package/dist/DateRangePicker/DateRangePickerRoot.js.map +1 -1
- package/dist/Dialog/utils.cjs +1 -1
- package/dist/Dialog/utils.cjs.map +1 -1
- package/dist/Dialog/utils.js +1 -1
- package/dist/Dialog/utils.js.map +1 -1
- package/dist/DismissableLayer/DismissableLayer.cjs +6 -8
- package/dist/DismissableLayer/DismissableLayer.cjs.map +1 -1
- package/dist/DismissableLayer/DismissableLayer.js +6 -8
- package/dist/DismissableLayer/DismissableLayer.js.map +1 -1
- package/dist/DismissableLayer/DismissableLayerBranch.cjs +1 -1
- package/dist/DismissableLayer/DismissableLayerBranch.js +1 -1
- package/dist/DismissableLayer/context.cjs +1 -1
- package/dist/DismissableLayer/context.cjs.map +1 -1
- package/dist/DismissableLayer/context.js +1 -1
- package/dist/DismissableLayer/context.js.map +1 -1
- package/dist/DismissableLayer/utils.cjs.map +1 -1
- package/dist/DismissableLayer/utils.js.map +1 -1
- package/dist/Drawer/DrawerContent.cjs.map +1 -1
- package/dist/Drawer/DrawerContent.js.map +1 -1
- package/dist/Drawer/DrawerContentImpl.cjs.map +1 -1
- package/dist/Drawer/DrawerContentImpl.js.map +1 -1
- package/dist/Drawer/DrawerIndent.cjs.map +1 -1
- package/dist/Drawer/DrawerIndent.js.map +1 -1
- package/dist/Drawer/DrawerProvider.cjs.map +1 -1
- package/dist/Drawer/DrawerProvider.js.map +1 -1
- package/dist/Drawer/utils.cjs.map +1 -1
- package/dist/Drawer/utils.js.map +1 -1
- package/dist/Editable/EditableRoot.cjs.map +1 -1
- package/dist/Editable/EditableRoot.js.map +1 -1
- package/dist/Field/FieldControl.cjs.map +1 -1
- package/dist/Field/FieldControl.js.map +1 -1
- package/dist/Field/FieldRoot.cjs.map +1 -1
- package/dist/Field/FieldRoot.js.map +1 -1
- package/dist/Field/useFieldValidation.cjs.map +1 -1
- package/dist/Field/useFieldValidation.js.map +1 -1
- package/dist/FocusScope/FocusScope.cjs.map +1 -1
- package/dist/FocusScope/FocusScope.js.map +1 -1
- package/dist/HoverCard/HoverCardContentImpl.cjs +3 -1
- package/dist/HoverCard/HoverCardContentImpl.cjs.map +1 -1
- package/dist/HoverCard/HoverCardContentImpl.js +3 -1
- package/dist/HoverCard/HoverCardContentImpl.js.map +1 -1
- package/dist/HoverCard/utils.cjs.map +1 -1
- package/dist/HoverCard/utils.js.map +1 -1
- package/dist/Listbox/ListboxRoot.cjs.map +1 -1
- package/dist/Listbox/ListboxRoot.js.map +1 -1
- package/dist/Listbox/ListboxVirtualizer.cjs.map +1 -1
- package/dist/Listbox/ListboxVirtualizer.js.map +1 -1
- package/dist/Menu/MenuContentImpl.cjs +1 -1
- package/dist/Menu/MenuContentImpl.cjs.map +1 -1
- package/dist/Menu/MenuContentImpl.js +2 -2
- package/dist/Menu/MenuContentImpl.js.map +1 -1
- package/dist/Menu/MenuSub.cjs +3 -1
- package/dist/Menu/MenuSub.cjs.map +1 -1
- package/dist/Menu/MenuSub.js +3 -1
- package/dist/Menu/MenuSub.js.map +1 -1
- package/dist/Menu/MenuSubTrigger.cjs +4 -2
- package/dist/Menu/MenuSubTrigger.cjs.map +1 -1
- package/dist/Menu/MenuSubTrigger.js +4 -2
- package/dist/Menu/MenuSubTrigger.js.map +1 -1
- package/dist/Menu/utils.cjs +4 -0
- package/dist/Menu/utils.cjs.map +1 -1
- package/dist/Menu/utils.js +4 -0
- package/dist/Menu/utils.js.map +1 -1
- package/dist/Menubar/MenubarContent.cjs.map +1 -1
- package/dist/Menubar/MenubarContent.js.map +1 -1
- package/dist/MonthPicker/MonthPickerCellTrigger.cjs.map +1 -1
- package/dist/MonthPicker/MonthPickerCellTrigger.js.map +1 -1
- package/dist/MonthPicker/MonthPickerRoot.cjs.map +1 -1
- package/dist/MonthPicker/MonthPickerRoot.js.map +1 -1
- package/dist/MonthPicker/useMonthPicker.cjs.map +1 -1
- package/dist/MonthPicker/useMonthPicker.js.map +1 -1
- package/dist/MonthRangePicker/MonthRangePickerCellTrigger.cjs.map +1 -1
- package/dist/MonthRangePicker/MonthRangePickerCellTrigger.js.map +1 -1
- package/dist/MonthRangePicker/MonthRangePickerRoot.cjs.map +1 -1
- package/dist/MonthRangePicker/MonthRangePickerRoot.js.map +1 -1
- package/dist/MonthRangePicker/useRangeMonthPicker.cjs.map +1 -1
- package/dist/MonthRangePicker/useRangeMonthPicker.js.map +1 -1
- package/dist/NavigationMenu/NavigationMenuContentImpl.cjs.map +1 -1
- package/dist/NavigationMenu/NavigationMenuContentImpl.js.map +1 -1
- package/dist/NavigationMenu/NavigationMenuItem.cjs +17 -10
- package/dist/NavigationMenu/NavigationMenuItem.cjs.map +1 -1
- package/dist/NavigationMenu/NavigationMenuItem.js +17 -10
- package/dist/NavigationMenu/NavigationMenuItem.js.map +1 -1
- package/dist/NavigationMenu/NavigationMenuTrigger.cjs +1 -1
- package/dist/NavigationMenu/NavigationMenuTrigger.cjs.map +1 -1
- package/dist/NavigationMenu/NavigationMenuTrigger.js +1 -1
- package/dist/NavigationMenu/NavigationMenuTrigger.js.map +1 -1
- package/dist/NavigationMenu/utils.cjs.map +1 -1
- package/dist/NavigationMenu/utils.js.map +1 -1
- package/dist/NumberField/NumberFieldInput.cjs.map +1 -1
- package/dist/NumberField/NumberFieldInput.js.map +1 -1
- package/dist/NumberField/NumberFieldRoot.cjs.map +1 -1
- package/dist/NumberField/NumberFieldRoot.js.map +1 -1
- package/dist/NumberField/utils.cjs.map +1 -1
- package/dist/NumberField/utils.js.map +1 -1
- package/dist/Pagination/utils.cjs.map +1 -1
- package/dist/Pagination/utils.js.map +1 -1
- package/dist/PinInput/PinInputInput.cjs.map +1 -1
- package/dist/PinInput/PinInputInput.js.map +1 -1
- package/dist/PinInput/PinInputRoot.cjs.map +1 -1
- package/dist/PinInput/PinInputRoot.js.map +1 -1
- package/dist/Popper/PopperContent.cjs.map +1 -1
- package/dist/Popper/PopperContent.js.map +1 -1
- package/dist/Popper/PopperRoot.cjs +3 -1
- package/dist/Popper/PopperRoot.cjs.map +1 -1
- package/dist/Popper/PopperRoot.js +3 -1
- package/dist/Popper/PopperRoot.js.map +1 -1
- package/dist/Popper/utils.cjs.map +1 -1
- package/dist/Popper/utils.js.map +1 -1
- package/dist/Presence/usePresence.cjs.map +1 -1
- package/dist/Presence/usePresence.js.map +1 -1
- package/dist/Primitive/usePrimitiveElement.cjs.map +1 -1
- package/dist/Primitive/usePrimitiveElement.js.map +1 -1
- package/dist/Progress/ProgressRoot.cjs.map +1 -1
- package/dist/Progress/ProgressRoot.js.map +1 -1
- package/dist/RadioGroup/Radio.cjs.map +1 -1
- package/dist/RadioGroup/Radio.js.map +1 -1
- package/dist/RadioGroup/RadioGroupItem.cjs.map +1 -1
- package/dist/RadioGroup/RadioGroupItem.js.map +1 -1
- package/dist/RangeCalendar/RangeCalendarCellTrigger.cjs.map +1 -1
- package/dist/RangeCalendar/RangeCalendarCellTrigger.js.map +1 -1
- package/dist/RangeCalendar/RangeCalendarRoot.cjs.map +1 -1
- package/dist/RangeCalendar/RangeCalendarRoot.js.map +1 -1
- package/dist/RangeCalendar/useRangeCalendar.cjs.map +1 -1
- package/dist/RangeCalendar/useRangeCalendar.js.map +1 -1
- package/dist/RovingFocus/RovingFocusGroup.cjs.map +1 -1
- package/dist/RovingFocus/RovingFocusGroup.js.map +1 -1
- package/dist/RovingFocus/RovingFocusItem.cjs +13 -2
- package/dist/RovingFocus/RovingFocusItem.cjs.map +1 -1
- package/dist/RovingFocus/RovingFocusItem.js +14 -3
- package/dist/RovingFocus/RovingFocusItem.js.map +1 -1
- package/dist/RovingFocus/utils.cjs.map +1 -1
- package/dist/RovingFocus/utils.js.map +1 -1
- package/dist/ScrollArea/ScrollAreaThumb.cjs +1 -1
- package/dist/ScrollArea/ScrollAreaThumb.cjs.map +1 -1
- package/dist/ScrollArea/ScrollAreaThumb.js +1 -1
- package/dist/ScrollArea/ScrollAreaThumb.js.map +1 -1
- package/dist/ScrollArea/utils.cjs +4 -0
- package/dist/ScrollArea/utils.cjs.map +1 -1
- package/dist/ScrollArea/utils.js +4 -0
- package/dist/ScrollArea/utils.js.map +1 -1
- package/dist/Select/SelectItemAlignedPosition.cjs.map +1 -1
- package/dist/Select/SelectItemAlignedPosition.js.map +1 -1
- package/dist/Select/SelectRoot.cjs.map +1 -1
- package/dist/Select/SelectRoot.js.map +1 -1
- package/dist/Select/SelectValue.cjs.map +1 -1
- package/dist/Select/SelectValue.js.map +1 -1
- package/dist/Select/SelectViewport.cjs.map +1 -1
- package/dist/Select/SelectViewport.js.map +1 -1
- package/dist/Slider/SliderHorizontal.cjs.map +1 -1
- package/dist/Slider/SliderHorizontal.js.map +1 -1
- package/dist/Slider/SliderRange.cjs.map +1 -1
- package/dist/Slider/SliderRange.js.map +1 -1
- package/dist/Slider/SliderRoot.cjs.map +1 -1
- package/dist/Slider/SliderRoot.js.map +1 -1
- package/dist/Slider/SliderThumb.cjs.map +1 -1
- package/dist/Slider/SliderThumb.js.map +1 -1
- package/dist/Slider/SliderThumbImpl.cjs.map +1 -1
- package/dist/Slider/SliderThumbImpl.js.map +1 -1
- package/dist/Slider/SliderVertical.cjs.map +1 -1
- package/dist/Slider/SliderVertical.js.map +1 -1
- package/dist/Slider/utils.cjs +1 -0
- package/dist/Slider/utils.cjs.map +1 -1
- package/dist/Slider/utils.js +1 -0
- package/dist/Slider/utils.js.map +1 -1
- package/dist/Splitter/SplitterGroup.cjs.map +1 -1
- package/dist/Splitter/SplitterGroup.js.map +1 -1
- package/dist/Stepper/StepperRoot.cjs.map +1 -1
- package/dist/Stepper/StepperRoot.js.map +1 -1
- package/dist/Stepper/StepperTrigger.cjs.map +1 -1
- package/dist/Stepper/StepperTrigger.js.map +1 -1
- package/dist/Switch/SwitchRoot.cjs.map +1 -1
- package/dist/Switch/SwitchRoot.js.map +1 -1
- package/dist/Tabs/TabsTrigger.cjs.map +1 -1
- package/dist/Tabs/TabsTrigger.js.map +1 -1
- package/dist/TagGroup/TagGroupItemDelete.cjs.map +1 -1
- package/dist/TagGroup/TagGroupItemDelete.js.map +1 -1
- package/dist/TagGroup/TagGroupRoot.cjs.map +1 -1
- package/dist/TagGroup/TagGroupRoot.js.map +1 -1
- package/dist/TagsInput/TagsInputInput.cjs +2 -1
- package/dist/TagsInput/TagsInputInput.cjs.map +1 -1
- package/dist/TagsInput/TagsInputInput.js +2 -1
- package/dist/TagsInput/TagsInputInput.js.map +1 -1
- package/dist/TagsInput/TagsInputRoot.cjs.map +1 -1
- package/dist/TagsInput/TagsInputRoot.js.map +1 -1
- package/dist/TimeField/TimeFieldRoot.cjs.map +1 -1
- package/dist/TimeField/TimeFieldRoot.js.map +1 -1
- package/dist/TimeRangeField/TimeRangeFieldInput.cjs.map +1 -1
- package/dist/TimeRangeField/TimeRangeFieldInput.js.map +1 -1
- package/dist/TimeRangeField/TimeRangeFieldRoot.cjs.map +1 -1
- package/dist/TimeRangeField/TimeRangeFieldRoot.js.map +1 -1
- package/dist/Toast/ToastAction.cjs +1 -1
- package/dist/Toast/ToastAction.cjs.map +1 -1
- package/dist/Toast/ToastAction.js +1 -1
- package/dist/Toast/ToastAction.js.map +1 -1
- package/dist/Toast/ToastDescription.cjs +2 -2
- package/dist/Toast/ToastDescription.cjs.map +1 -1
- package/dist/Toast/ToastDescription.js +3 -3
- package/dist/Toast/ToastDescription.js.map +1 -1
- package/dist/Toast/ToastRoot.cjs.map +1 -1
- package/dist/Toast/ToastRoot.js.map +1 -1
- package/dist/Toast/ToastRootImpl.cjs.map +1 -1
- package/dist/Toast/ToastRootImpl.js.map +1 -1
- package/dist/Toast/ToastTitle.cjs +2 -2
- package/dist/Toast/ToastTitle.cjs.map +1 -1
- package/dist/Toast/ToastTitle.js +3 -3
- package/dist/Toast/ToastTitle.js.map +1 -1
- package/dist/Toast/ToastViewport.cjs.map +1 -1
- package/dist/Toast/ToastViewport.js.map +1 -1
- package/dist/Toast/createToastManager.cjs.map +1 -1
- package/dist/Toast/createToastManager.js.map +1 -1
- package/dist/Toast/useToastStore.cjs +3 -1
- package/dist/Toast/useToastStore.cjs.map +1 -1
- package/dist/Toast/useToastStore.js +3 -1
- package/dist/Toast/useToastStore.js.map +1 -1
- package/dist/Tree/TreeItem.cjs.map +1 -1
- package/dist/Tree/TreeItem.js.map +1 -1
- package/dist/Tree/TreeRoot.cjs.map +1 -1
- package/dist/Tree/TreeRoot.js.map +1 -1
- package/dist/Tree/TreeVirtualizer.cjs.map +1 -1
- package/dist/Tree/TreeVirtualizer.js.map +1 -1
- package/dist/VisuallyHidden/VisuallyHiddenInput.cjs.map +1 -1
- package/dist/VisuallyHidden/VisuallyHiddenInput.js.map +1 -1
- package/dist/YearPicker/YearPickerCellTrigger.cjs.map +1 -1
- package/dist/YearPicker/YearPickerCellTrigger.js.map +1 -1
- package/dist/YearPicker/YearPickerRoot.cjs.map +1 -1
- package/dist/YearPicker/YearPickerRoot.js.map +1 -1
- package/dist/YearPicker/useYearPicker.cjs.map +1 -1
- package/dist/YearPicker/useYearPicker.js.map +1 -1
- package/dist/YearRangePicker/YearRangePickerCellTrigger.cjs.map +1 -1
- package/dist/YearRangePicker/YearRangePickerCellTrigger.js.map +1 -1
- package/dist/YearRangePicker/YearRangePickerRoot.cjs.map +1 -1
- package/dist/YearRangePicker/YearRangePickerRoot.js.map +1 -1
- package/dist/YearRangePicker/useRangeYearPicker.cjs.map +1 -1
- package/dist/YearRangePicker/useRangeYearPicker.js.map +1 -1
- package/dist/color/channel.cjs.map +1 -1
- package/dist/color/channel.js.map +1 -1
- package/dist/color/convert.cjs.map +1 -1
- package/dist/color/convert.js.map +1 -1
- package/dist/color/gradient.cjs +2 -2
- package/dist/color/gradient.cjs.map +1 -1
- package/dist/color/gradient.js +2 -2
- package/dist/color/gradient.js.map +1 -1
- package/dist/color/parse.cjs.map +1 -1
- package/dist/color/parse.js.map +1 -1
- package/dist/color/utils.cjs.map +1 -1
- package/dist/color/utils.js.map +1 -1
- package/dist/component/BaseSeparator.cjs.map +1 -1
- package/dist/component/BaseSeparator.js.map +1 -1
- package/dist/composables/useDrawerSnapPoints.cjs.map +1 -1
- package/dist/composables/useDrawerSnapPoints.js.map +1 -1
- package/dist/composables/useDrawerVirtualKeyboard.cjs.map +1 -1
- package/dist/composables/useDrawerVirtualKeyboard.js.map +1 -1
- package/dist/composables/useSwipeDismiss.cjs.map +1 -1
- package/dist/composables/useSwipeDismiss.js.map +1 -1
- package/dist/composables/useWindowSplitterBehavior.cjs +1 -0
- package/dist/composables/useWindowSplitterBehavior.cjs.map +1 -1
- package/dist/composables/useWindowSplitterBehavior.js +1 -0
- package/dist/composables/useWindowSplitterBehavior.js.map +1 -1
- package/dist/composables/useWindowSplitterPanelGroupBehavior.cjs +7 -4
- package/dist/composables/useWindowSplitterPanelGroupBehavior.cjs.map +1 -1
- package/dist/composables/useWindowSplitterPanelGroupBehavior.js +7 -4
- package/dist/composables/useWindowSplitterPanelGroupBehavior.js.map +1 -1
- package/dist/date/calendar.cjs.map +1 -1
- package/dist/date/calendar.js.map +1 -1
- package/dist/date/comparators.cjs.map +1 -1
- package/dist/date/comparators.js.map +1 -1
- package/dist/date/parser.cjs.map +1 -1
- package/dist/date/parser.js.map +1 -1
- package/dist/date/parts.cjs.map +1 -1
- package/dist/date/parts.js.map +1 -1
- package/dist/date/useDateField.cjs.map +1 -1
- package/dist/date/useDateField.js.map +1 -1
- package/dist/date/useSegmentNavigation.cjs.map +1 -1
- package/dist/date/useSegmentNavigation.js.map +1 -1
- package/dist/date/utils.cjs.map +1 -1
- package/dist/date/utils.js.map +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/index2.d.cts +18 -16
- package/dist/index2.d.cts.map +1 -1
- package/dist/index2.d.ts +14 -12
- package/dist/index2.d.ts.map +1 -1
- package/dist/index3.d.cts +706 -703
- package/dist/index3.d.cts.map +1 -1
- package/dist/index3.d.ts +733 -730
- package/dist/index3.d.ts.map +1 -1
- package/dist/internal.cjs +2 -1
- package/dist/internal.d.cts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +2 -1
- package/dist/shared/bodyPointerEvents.cjs +46 -0
- package/dist/shared/bodyPointerEvents.cjs.map +1 -0
- package/dist/shared/bodyPointerEvents.js +34 -0
- package/dist/shared/bodyPointerEvents.js.map +1 -0
- package/dist/shared/clamp.cjs.map +1 -1
- package/dist/shared/clamp.js.map +1 -1
- package/dist/shared/useArrowNavigation.cjs.map +1 -1
- package/dist/shared/useArrowNavigation.js.map +1 -1
- package/dist/shared/useBodyScrollLock.cjs +8 -7
- package/dist/shared/useBodyScrollLock.cjs.map +1 -1
- package/dist/shared/useBodyScrollLock.js +8 -7
- package/dist/shared/useBodyScrollLock.js.map +1 -1
- package/dist/shared/useCalendarKeyboardNavigation.cjs +21 -2
- package/dist/shared/useCalendarKeyboardNavigation.cjs.map +1 -1
- package/dist/shared/useCalendarKeyboardNavigation.js +21 -2
- package/dist/shared/useCalendarKeyboardNavigation.js.map +1 -1
- package/dist/shared/useComposing.cjs.map +1 -1
- package/dist/shared/useComposing.js.map +1 -1
- package/dist/shared/useDateFormatter.cjs.map +1 -1
- package/dist/shared/useDateFormatter.js.map +1 -1
- package/dist/shared/useFocusGuards.cjs +3 -1
- package/dist/shared/useFocusGuards.cjs.map +1 -1
- package/dist/shared/useFocusGuards.js +3 -1
- package/dist/shared/useFocusGuards.js.map +1 -1
- package/dist/shared/useFormControl.cjs.map +1 -1
- package/dist/shared/useFormControl.js.map +1 -1
- package/dist/shared/useForwardExpose.cjs.map +1 -1
- package/dist/shared/useForwardExpose.js.map +1 -1
- package/dist/shared/useForwardProps.cjs.map +1 -1
- package/dist/shared/useForwardProps.js.map +1 -1
- package/dist/shared/useForwardPropsEmits.cjs.map +1 -1
- package/dist/shared/useForwardPropsEmits.js.map +1 -1
- package/dist/shared/useForwardScopeId.cjs.map +1 -1
- package/dist/shared/useForwardScopeId.js.map +1 -1
- package/dist/shared/useGraceArea.cjs.map +1 -1
- package/dist/shared/useGraceArea.js.map +1 -1
- package/dist/shared/useId.cjs.map +1 -1
- package/dist/shared/useId.js.map +1 -1
- package/dist/shared/useSelectionBehavior.cjs.map +1 -1
- package/dist/shared/useSelectionBehavior.js.map +1 -1
- package/dist/shared/useSingleOrMultipleValue.cjs.map +1 -1
- package/dist/shared/useSingleOrMultipleValue.js.map +1 -1
- package/dist/shared/useTypeahead.cjs.map +1 -1
- package/dist/shared/useTypeahead.js.map +1 -1
- package/dist/shared/withDefault.cjs.map +1 -1
- package/dist/shared/withDefault.js.map +1 -1
- package/dist/shared.cjs +1 -1
- package/dist/shared.js +1 -1
- package/dist/utils/calculate.cjs +1 -0
- package/dist/utils/calculate.cjs.map +1 -1
- package/dist/utils/calculate.js +1 -0
- package/dist/utils/calculate.js.map +1 -1
- package/dist/utils/callPanelCallbacks.cjs +1 -0
- package/dist/utils/callPanelCallbacks.cjs.map +1 -1
- package/dist/utils/callPanelCallbacks.js +1 -0
- package/dist/utils/callPanelCallbacks.js.map +1 -1
- package/dist/utils/compare.cjs.map +1 -1
- package/dist/utils/compare.js.map +1 -1
- package/dist/utils/dom.cjs.map +1 -1
- package/dist/utils/dom.js.map +1 -1
- package/dist/utils/layout.cjs +1 -0
- package/dist/utils/layout.cjs.map +1 -1
- package/dist/utils/layout.js +1 -0
- package/dist/utils/layout.js.map +1 -1
- package/dist/utils/pivot.cjs.map +1 -1
- package/dist/utils/pivot.js.map +1 -1
- package/dist/utils/registry.cjs.map +1 -1
- package/dist/utils/registry.js.map +1 -1
- package/dist/utils/resizePanel.cjs +1 -0
- package/dist/utils/resizePanel.cjs.map +1 -1
- package/dist/utils/resizePanel.js +1 -0
- package/dist/utils/resizePanel.js.map +1 -1
- package/dist/utils/stackingOrder.cjs +10 -10
- package/dist/utils/stackingOrder.cjs.map +1 -1
- package/dist/utils/stackingOrder.js +10 -10
- package/dist/utils/stackingOrder.js.map +1 -1
- package/dist/utils/storage.cjs +7 -1
- package/dist/utils/storage.cjs.map +1 -1
- package/dist/utils/storage.js +7 -1
- package/dist/utils/storage.js.map +1 -1
- package/dist/utils/style.cjs +1 -0
- package/dist/utils/style.cjs.map +1 -1
- package/dist/utils/style.js +1 -0
- package/dist/utils/style.js.map +1 -1
- package/dist/utils/units.cjs +0 -1
- package/dist/utils/units.cjs.map +1 -1
- package/dist/utils/units.js +0 -1
- package/dist/utils/units.js.map +1 -1
- package/dist/utils/validation.cjs +1 -0
- package/dist/utils/validation.cjs.map +1 -1
- package/dist/utils/validation.js +1 -0
- package/dist/utils/validation.js.map +1 -1
- package/package.json +13 -10
- package/src/Avatar/utils.ts +3 -1
- package/src/Calendar/CalendarCellTrigger.vue +3 -1
- package/src/Calendar/CalendarRoot.vue +3 -1
- package/src/Calendar/useCalendar.ts +18 -5
- package/src/Checkbox/CheckboxGroupRoot.vue +3 -1
- package/src/Checkbox/CheckboxRoot.test-d.ts +91 -0
- package/src/Checkbox/CheckboxRoot.vue +19 -15
- package/src/Checkbox/utils.ts +3 -1
- package/src/Collection/Collection.ts +11 -2
- package/src/ColorArea/ColorAreaArea.vue +1 -1
- package/src/ColorArea/ColorAreaRoot.vue +14 -2
- package/src/ColorArea/utils.ts +1 -1
- package/src/ColorSlider/ColorSliderRoot.vue +3 -1
- package/src/ColorSlider/utils.ts +31 -6
- package/src/ColorSwatchPicker/ColorSwatchPickerRoot.vue +3 -1
- package/src/Combobox/ComboboxCancel.vue +7 -4
- package/src/Combobox/ComboboxContentImpl.vue +7 -2
- package/src/Combobox/ComboboxGroup.vue +5 -1
- package/src/Combobox/ComboboxRoot.vue +3 -1
- package/src/DateField/DateFieldRoot.vue +24 -7
- package/src/DatePicker/DatePickerRoot.vue +6 -1
- package/src/DateRangeField/DateRangeFieldInput.vue +3 -1
- package/src/DateRangeField/DateRangeFieldRoot.vue +30 -8
- package/src/DateRangePicker/DateRangePickerRoot.vue +4 -1
- package/src/Dialog/utils.ts +1 -1
- package/src/DismissableLayer/DismissableLayer.vue +30 -29
- package/src/DismissableLayer/context.ts +1 -1
- package/src/DismissableLayer/utils.ts +1 -0
- package/src/Drawer/DrawerContentImpl.vue +18 -5
- package/src/Drawer/DrawerIndent.vue +3 -1
- package/src/Drawer/DrawerProvider.vue +6 -2
- package/src/Drawer/composables/useDrawerSnapPoints.ts +23 -7
- package/src/Drawer/composables/useDrawerVirtualKeyboard.ts +37 -12
- package/src/Drawer/composables/useSwipeDismiss.ts +30 -10
- package/src/Drawer/utils.ts +18 -4
- package/src/Editable/EditableRoot.vue +3 -1
- package/src/Field/FieldControl.vue +3 -1
- package/src/Field/FieldRoot.vue +23 -7
- package/src/Field/useFieldValidation.ts +31 -9
- package/src/FocusScope/FocusScope.vue +3 -1
- package/src/HoverCard/HoverCardContentImpl.vue +3 -1
- package/src/HoverCard/index.ts +1 -0
- package/src/HoverCard/utils.ts +6 -2
- package/src/Listbox/ListboxRoot.vue +24 -8
- package/src/Listbox/ListboxVirtualizer.vue +9 -3
- package/src/Menu/MenuContentImpl.vue +9 -3
- package/src/Menu/MenuSub.vue +3 -1
- package/src/Menu/MenuSubTrigger.vue +13 -5
- package/src/Menu/utils.ts +8 -3
- package/src/Menubar/MenubarContent.vue +3 -1
- package/src/MonthPicker/MonthPickerCellTrigger.vue +3 -1
- package/src/MonthPicker/MonthPickerRoot.vue +7 -2
- package/src/MonthPicker/useMonthPicker.ts +3 -1
- package/src/MonthRangePicker/MonthRangePickerCellTrigger.vue +6 -2
- package/src/MonthRangePicker/MonthRangePickerRoot.vue +20 -5
- package/src/MonthRangePicker/useRangeMonthPicker.ts +12 -4
- package/src/NavigationMenu/NavigationMenuContentImpl.vue +6 -2
- package/src/NavigationMenu/NavigationMenuItem.vue +15 -4
- package/src/NavigationMenu/NavigationMenuTrigger.vue +4 -2
- package/src/NavigationMenu/utils.ts +3 -1
- package/src/NumberField/NumberFieldInput.vue +6 -2
- package/src/NumberField/NumberFieldRoot.vue +15 -5
- package/src/NumberField/utils.ts +6 -2
- package/src/Pagination/utils.ts +7 -1
- package/src/PinInput/PinInputInput.vue +3 -1
- package/src/PinInput/PinInputRoot.vue +3 -1
- package/src/Popper/PopperContent.vue +13 -3
- package/src/Popper/PopperRoot.vue +3 -1
- package/src/Popper/utils.ts +21 -7
- package/src/Presence/usePresence.ts +9 -3
- package/src/Primitive/Primitive.ts +1 -1
- package/src/Primitive/usePrimitiveElement.ts +3 -1
- package/src/Progress/ProgressRoot.vue +3 -1
- package/src/RadioGroup/Radio.vue +3 -1
- package/src/RadioGroup/RadioGroupItem.vue +6 -1
- package/src/RangeCalendar/RangeCalendarCellTrigger.vue +3 -1
- package/src/RangeCalendar/RangeCalendarRoot.vue +20 -5
- package/src/RangeCalendar/useRangeCalendar.ts +11 -3
- package/src/RovingFocus/RovingFocusGroup.vue +6 -1
- package/src/RovingFocus/RovingFocusItem.vue +27 -17
- package/src/RovingFocus/utils.ts +1 -0
- package/src/ScrollArea/ScrollAreaThumb.vue +1 -1
- package/src/ScrollArea/utils.ts +16 -6
- package/src/Select/SelectItemAlignedPosition.vue +8 -2
- package/src/Select/SelectRoot.vue +12 -4
- package/src/Select/SelectValue.vue +3 -1
- package/src/Select/SelectViewport.vue +3 -1
- package/src/Slider/SliderHorizontal.vue +9 -3
- package/src/Slider/SliderRange.vue +3 -1
- package/src/Slider/SliderRoot.vue +3 -1
- package/src/Slider/SliderThumb.vue +3 -1
- package/src/Slider/SliderThumbImpl.vue +3 -1
- package/src/Slider/SliderVertical.vue +9 -3
- package/src/Slider/utils.ts +31 -6
- package/src/Splitter/SplitterGroup.vue +18 -6
- package/src/Splitter/utils/calculate.ts +7 -3
- package/src/Splitter/utils/callPanelCallbacks.ts +1 -1
- package/src/Splitter/utils/compare.ts +3 -1
- package/src/Splitter/utils/composables/useWindowSplitterBehavior.ts +2 -2
- package/src/Splitter/utils/composables/useWindowSplitterPanelGroupBehavior.ts +7 -5
- package/src/Splitter/utils/dom.ts +3 -1
- package/src/Splitter/utils/layout.ts +32 -11
- package/src/Splitter/utils/pivot.ts +3 -1
- package/src/Splitter/utils/registry.ts +3 -1
- package/src/Splitter/utils/resizePanel.ts +1 -1
- package/src/Splitter/utils/stackingOrder.ts +10 -10
- package/src/Splitter/utils/storage.ts +7 -5
- package/src/Splitter/utils/style.ts +7 -3
- package/src/Splitter/utils/units.ts +0 -2
- package/src/Splitter/utils/validation.ts +4 -2
- package/src/Stepper/StepperRoot.vue +18 -6
- package/src/Stepper/StepperTrigger.vue +6 -1
- package/src/Switch/SwitchRoot.test-d.ts +87 -0
- package/src/Switch/SwitchRoot.vue +15 -13
- package/src/Tabs/TabsTrigger.vue +3 -1
- package/src/TagGroup/TagGroupItemDelete.vue +3 -1
- package/src/TagGroup/TagGroupRoot.vue +25 -7
- package/src/TagsInput/TagsInputInput.vue +11 -5
- package/src/TagsInput/TagsInputRoot.vue +12 -4
- package/src/TimeField/TimeFieldRoot.vue +29 -8
- package/src/TimeRangeField/TimeRangeFieldInput.vue +3 -1
- package/src/TimeRangeField/TimeRangeFieldRoot.vue +39 -11
- package/src/Toast/ToastAction.vue +2 -1
- package/src/Toast/ToastDescription.vue +3 -1
- package/src/Toast/ToastRoot.vue +4 -1
- package/src/Toast/ToastRootImpl.vue +20 -6
- package/src/Toast/ToastTitle.vue +3 -1
- package/src/Toast/ToastViewport.vue +7 -2
- package/src/Toast/createToastManager.ts +21 -6
- package/src/Toast/useToastStore.ts +36 -8
- package/src/Tree/TreeItem.vue +12 -2
- package/src/Tree/TreeRoot.vue +16 -5
- package/src/Tree/TreeVirtualizer.vue +15 -5
- package/src/VisuallyHidden/VisuallyHiddenInput.vue +3 -1
- package/src/YearPicker/YearPickerCellTrigger.vue +6 -2
- package/src/YearPicker/YearPickerRoot.vue +7 -2
- package/src/YearPicker/useYearPicker.ts +3 -1
- package/src/YearRangePicker/YearRangePickerCellTrigger.vue +6 -2
- package/src/YearRangePicker/YearRangePickerRoot.vue +20 -5
- package/src/YearRangePicker/useRangeYearPicker.ts +12 -4
- package/src/date/calendar.ts +13 -3
- package/src/date/comparators.ts +6 -2
- package/src/shared/bodyPointerEvents.ts +41 -0
- package/src/shared/clamp.ts +6 -2
- package/src/shared/color/channel.ts +57 -16
- package/src/shared/color/convert.ts +27 -9
- package/src/shared/color/gradient.ts +166 -33
- package/src/shared/color/parse.ts +10 -4
- package/src/shared/color/utils.ts +9 -3
- package/src/shared/component/BaseSeparator.vue +6 -2
- package/src/shared/date/parser.ts +15 -4
- package/src/shared/date/parts.ts +10 -2
- package/src/shared/date/segment.ts +1 -1
- package/src/shared/date/types.ts +2 -2
- package/src/shared/date/useDateField.ts +113 -28
- package/src/shared/date/useSegmentNavigation.ts +12 -4
- package/src/shared/date/utils.ts +12 -4
- package/src/shared/useArrowNavigation.ts +15 -4
- package/src/shared/useBodyScrollLock.ts +19 -14
- package/src/shared/useCalendarKeyboardNavigation.ts +49 -11
- package/src/shared/useComposing.ts +7 -1
- package/src/shared/useDateFormatter.ts +38 -9
- package/src/shared/useEmitAsProps.test-d.ts +0 -1
- package/src/shared/useFocusGuards.ts +3 -1
- package/src/shared/useFormControl.ts +3 -1
- package/src/shared/useForwardExpose.ts +4 -1
- package/src/shared/useForwardProps.ts +4 -1
- package/src/shared/useForwardPropsEmits.ts +3 -1
- package/src/shared/useForwardScopeId.ts +3 -1
- package/src/shared/useGraceArea.ts +4 -1
- package/src/shared/useId.ts +3 -1
- package/src/shared/useSelectionBehavior.ts +2 -3
- package/src/shared/useSingleOrMultipleValue.ts +14 -4
- package/src/shared/useTypeahead.ts +6 -2
- package/src/shared/withDefault.ts +5 -3
|
@@ -4,8 +4,7 @@ import { watchEffect } from 'vue';
|
|
|
4
4
|
import { assert } from '../assert';
|
|
5
5
|
import { getResizeHandleElement, getResizeHandleElementIndex, getResizeHandleElementsForGroup } from '../dom';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/** https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/ */
|
|
9
8
|
export function useWindowSplitterResizeHandlerBehavior({
|
|
10
9
|
disabled,
|
|
11
10
|
handleId,
|
|
@@ -63,6 +62,7 @@ export function useWindowSplitterResizeHandlerBehavior({
|
|
|
63
62
|
|
|
64
63
|
assert(index !== null);
|
|
65
64
|
|
|
65
|
+
// eslint-disable-next-line no-nested-ternary
|
|
66
66
|
const nextIndex = event.shiftKey
|
|
67
67
|
? index > 0
|
|
68
68
|
? index - 1
|
|
@@ -8,13 +8,11 @@ import { getPanelGroupElement, getResizeHandleElementsForGroup, getResizeHandleP
|
|
|
8
8
|
import { adjustLayoutByDelta } from '../layout';
|
|
9
9
|
import { determinePivotIndices } from '../pivot';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/** https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/ */
|
|
13
12
|
export function useWindowSplitterPanelGroupBehavior({
|
|
14
13
|
eagerValuesRef,
|
|
15
14
|
groupId,
|
|
16
15
|
layout,
|
|
17
|
-
panelDataArray,
|
|
18
16
|
panelGroupElement,
|
|
19
17
|
setLayout,
|
|
20
18
|
getPanelDataWithPercentConstraints,
|
|
@@ -72,7 +70,9 @@ export function useWindowSplitterPanelGroupBehavior({
|
|
|
72
70
|
);
|
|
73
71
|
resizeHandleElement.setAttribute(
|
|
74
72
|
'aria-valuenow',
|
|
75
|
-
valueNow != null
|
|
73
|
+
valueNow != null
|
|
74
|
+
? `${Math.round(valueNow)}`
|
|
75
|
+
: '',
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -179,7 +179,9 @@ export function useWindowSplitterPanelGroupBehavior({
|
|
|
179
179
|
});
|
|
180
180
|
|
|
181
181
|
onCleanup(() => {
|
|
182
|
-
cleanupFunctions.forEach((cleanupFunction) =>
|
|
182
|
+
cleanupFunctions.forEach((cleanupFunction) => {
|
|
183
|
+
cleanupFunction();
|
|
184
|
+
});
|
|
183
185
|
});
|
|
184
186
|
});
|
|
185
187
|
}
|
|
@@ -106,7 +106,9 @@ export function getResizeHandlePanelIds(
|
|
|
106
106
|
): [idBefore: string | null, idAfter: string | null] {
|
|
107
107
|
const handle = getResizeHandleElement(handleId, scope);
|
|
108
108
|
const handles = getResizeHandleElementsForGroup(groupId, scope);
|
|
109
|
-
const index = handle
|
|
109
|
+
const index = handle
|
|
110
|
+
? handles.indexOf(handle)
|
|
111
|
+
: -1;
|
|
110
112
|
|
|
111
113
|
const idBefore: string | null = panelsArray[index]?.id ?? null;
|
|
112
114
|
const idAfter: string | null = panelsArray[index + 1]?.id ?? null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable sonarjs/no-commented-code */
|
|
1
2
|
/* eslint-disable no-lone-blocks */
|
|
2
3
|
import type { PanelConstraints } from '../SplitterPanel.vue';
|
|
3
4
|
import { assert } from './assert';
|
|
@@ -17,7 +18,7 @@ export function compareLayouts(a: Array<number>, b: Array<number>) {
|
|
|
17
18
|
return true;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
/** All units must be in percentages; pixel values should be pre-converted */
|
|
21
22
|
export function adjustLayoutByDelta({
|
|
22
23
|
delta,
|
|
23
24
|
layout: prevLayout,
|
|
@@ -64,7 +65,9 @@ export function adjustLayoutByDelta({
|
|
|
64
65
|
if (trigger === 'keyboard') {
|
|
65
66
|
{
|
|
66
67
|
// Check if we should expand a collapsed panel
|
|
67
|
-
const index = delta < 0
|
|
68
|
+
const index = delta < 0
|
|
69
|
+
? secondPivotIndex
|
|
70
|
+
: firstPivotIndex;
|
|
68
71
|
const panelConstraints = panelConstraintsArray[index];
|
|
69
72
|
assert(panelConstraints);
|
|
70
73
|
|
|
@@ -83,7 +86,9 @@ export function adjustLayoutByDelta({
|
|
|
83
86
|
// DEBUG.push(` -> expand delta: ${localDelta}`);
|
|
84
87
|
|
|
85
88
|
if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) {
|
|
86
|
-
delta = delta < 0
|
|
89
|
+
delta = delta < 0
|
|
90
|
+
? 0 - localDelta
|
|
91
|
+
: localDelta;
|
|
87
92
|
}
|
|
88
93
|
// DEBUG.push(` -> delta: ${delta}`);
|
|
89
94
|
}
|
|
@@ -92,7 +97,9 @@ export function adjustLayoutByDelta({
|
|
|
92
97
|
|
|
93
98
|
{
|
|
94
99
|
// Check if we should collapse a panel at its minimum size
|
|
95
|
-
const index = delta < 0
|
|
100
|
+
const index = delta < 0
|
|
101
|
+
? firstPivotIndex
|
|
102
|
+
: secondPivotIndex;
|
|
96
103
|
const panelConstraints = panelConstraintsArray[index];
|
|
97
104
|
assert(panelConstraints);
|
|
98
105
|
const { collapsible } = panelConstraints;
|
|
@@ -112,7 +119,9 @@ export function adjustLayoutByDelta({
|
|
|
112
119
|
// DEBUG.push(` -> expand delta: ${localDelta}`);
|
|
113
120
|
|
|
114
121
|
if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) {
|
|
115
|
-
delta = delta < 0
|
|
122
|
+
delta = delta < 0
|
|
123
|
+
? 0 - localDelta
|
|
124
|
+
: localDelta;
|
|
116
125
|
}
|
|
117
126
|
// DEBUG.push(` -> delta: ${delta}`);
|
|
118
127
|
}
|
|
@@ -129,9 +138,13 @@ export function adjustLayoutByDelta({
|
|
|
129
138
|
// If this amount is greater than the requested delta, that's useful information too–
|
|
130
139
|
// as an expanding panel might change from collapsed to min size.
|
|
131
140
|
|
|
132
|
-
const increment = delta < 0
|
|
141
|
+
const increment = delta < 0
|
|
142
|
+
? 1
|
|
143
|
+
: -1;
|
|
133
144
|
|
|
134
|
-
let index = delta < 0
|
|
145
|
+
let index = delta < 0
|
|
146
|
+
? secondPivotIndex
|
|
147
|
+
: firstPivotIndex;
|
|
135
148
|
let maxAvailableDelta = 0;
|
|
136
149
|
|
|
137
150
|
// DEBUG.push("pre calc...");
|
|
@@ -157,7 +170,9 @@ export function adjustLayoutByDelta({
|
|
|
157
170
|
|
|
158
171
|
// DEBUG.push(` -> max available delta: ${maxAvailableDelta}`);
|
|
159
172
|
const minAbsDelta = Math.min(Math.abs(delta), Math.abs(maxAvailableDelta));
|
|
160
|
-
delta = delta < 0
|
|
173
|
+
delta = delta < 0
|
|
174
|
+
? 0 - minAbsDelta
|
|
175
|
+
: minAbsDelta;
|
|
161
176
|
// DEBUG.push(` -> adjusted delta: ${delta}`);
|
|
162
177
|
// DEBUG.push("");
|
|
163
178
|
}
|
|
@@ -165,7 +180,9 @@ export function adjustLayoutByDelta({
|
|
|
165
180
|
{
|
|
166
181
|
// Delta added to a panel needs to be subtracted from other panels (within the constraints that those panels allow).
|
|
167
182
|
|
|
168
|
-
const pivotIndex = delta < 0
|
|
183
|
+
const pivotIndex = delta < 0
|
|
184
|
+
? firstPivotIndex
|
|
185
|
+
: secondPivotIndex;
|
|
169
186
|
let index = pivotIndex;
|
|
170
187
|
while (index >= 0 && index < panelConstraintsArray.length) {
|
|
171
188
|
const deltaRemaining = Math.abs(delta) - Math.abs(deltaApplied);
|
|
@@ -216,7 +233,9 @@ export function adjustLayoutByDelta({
|
|
|
216
233
|
|
|
217
234
|
{
|
|
218
235
|
// Now distribute the applied delta to the panels in the other direction
|
|
219
|
-
const pivotIndex = delta < 0
|
|
236
|
+
const pivotIndex = delta < 0
|
|
237
|
+
? secondPivotIndex
|
|
238
|
+
: firstPivotIndex;
|
|
220
239
|
|
|
221
240
|
const prevSize = prevLayout[pivotIndex];
|
|
222
241
|
assert(prevSize != null);
|
|
@@ -235,7 +254,9 @@ export function adjustLayoutByDelta({
|
|
|
235
254
|
if (!fuzzyNumbersEqual(safeSize, unsafeSize)) {
|
|
236
255
|
let deltaRemaining = unsafeSize - safeSize;
|
|
237
256
|
|
|
238
|
-
const pivotIndex = delta < 0
|
|
257
|
+
const pivotIndex = delta < 0
|
|
258
|
+
? secondPivotIndex
|
|
259
|
+
: firstPivotIndex;
|
|
239
260
|
let index = pivotIndex;
|
|
240
261
|
while (index >= 0 && index < panelConstraintsArray.length) {
|
|
241
262
|
const prevSize = nextLayout[index];
|
|
@@ -32,7 +32,9 @@ export const EXCEEDED_VERTICAL_MAX = 0b1000;
|
|
|
32
32
|
|
|
33
33
|
function getInputType(): 'coarse' | 'fine' | undefined {
|
|
34
34
|
if (typeof matchMedia === 'function') {
|
|
35
|
-
return matchMedia('(pointer:coarse)').matches
|
|
35
|
+
return matchMedia('(pointer:coarse)').matches
|
|
36
|
+
? 'coarse'
|
|
37
|
+
: 'fine';
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -3,7 +3,7 @@ import { assert } from './assert';
|
|
|
3
3
|
import { fuzzyCompareNumbers } from './compare';
|
|
4
4
|
import { PRECISION } from './constants';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/** Panel size must be in percentages; pixel values should be pre-converted */
|
|
7
7
|
export function resizePanel({
|
|
8
8
|
panelConstraints: panelConstraintsArray,
|
|
9
9
|
panelIndex,
|
|
@@ -19,27 +19,27 @@ export function compare(a: HTMLElement, b: HTMLElement): number {
|
|
|
19
19
|
b: getAncestors(b),
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
let
|
|
22
|
+
let commonAncestor;
|
|
23
23
|
|
|
24
24
|
// remove shared ancestors
|
|
25
25
|
while (ancestors.a.at(-1) === ancestors.b.at(-1)) {
|
|
26
26
|
a = ancestors.a.pop() as HTMLElement;
|
|
27
27
|
b = ancestors.b.pop() as HTMLElement;
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
commonAncestor = a;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
assert(
|
|
32
|
+
assert(commonAncestor);
|
|
33
33
|
|
|
34
|
-
const
|
|
34
|
+
const zIndexes = {
|
|
35
35
|
a: getZIndex(findStackingContext(ancestors.a)),
|
|
36
36
|
b: getZIndex(findStackingContext(ancestors.b)),
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
if (
|
|
40
|
-
const children =
|
|
39
|
+
if (zIndexes.a === zIndexes.b) {
|
|
40
|
+
const children = commonAncestor.childNodes;
|
|
41
41
|
|
|
42
|
-
const
|
|
42
|
+
const furthestAncestors = {
|
|
43
43
|
a: ancestors.a.at(-1),
|
|
44
44
|
b: ancestors.b.at(-1),
|
|
45
45
|
};
|
|
@@ -47,16 +47,16 @@ export function compare(a: HTMLElement, b: HTMLElement): number {
|
|
|
47
47
|
let i = children.length;
|
|
48
48
|
while (i--) {
|
|
49
49
|
const child = children[i];
|
|
50
|
-
if (child ===
|
|
50
|
+
if (child === furthestAncestors.a) {
|
|
51
51
|
return 1;
|
|
52
52
|
}
|
|
53
|
-
if (child ===
|
|
53
|
+
if (child === furthestAncestors.b) {
|
|
54
54
|
return -1;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
return Math.sign(
|
|
59
|
+
return Math.sign(zIndexes.a - zIndexes.b);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
const props
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { PanelGroupStorage } from '../SplitterGroup.vue';
|
|
2
2
|
import type { PanelData } from '../SplitterPanel.vue';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/**
|
|
5
|
+
* PanelGroup might be rendering in a server-side environment where localStorage is not available
|
|
6
|
+
* or on a browser with cookies/storage disabled.
|
|
7
|
+
* In either case, this function avoids accessing localStorage until needed,
|
|
8
|
+
* and avoids throwing user-visible errors.
|
|
9
|
+
*/
|
|
8
10
|
export function initializeDefaultStorage(storageObject: PanelGroupStorage) {
|
|
9
11
|
try {
|
|
10
12
|
if (typeof localStorage !== 'undefined') {
|
|
@@ -77,7 +79,7 @@ function loadSerializedPanelGroupState(
|
|
|
77
79
|
return parsed as SerializedPanelGroupState;
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
|
-
} catch
|
|
82
|
+
} catch {}
|
|
81
83
|
|
|
82
84
|
return null;
|
|
83
85
|
}
|
|
@@ -89,7 +89,7 @@ export function setGlobalCursorStyle(
|
|
|
89
89
|
styleElement.textContent = `*{cursor: ${style}!important;}`;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
/** the % of the group's overall space this panel should occupy. */
|
|
93
93
|
export function computePanelFlexBoxStyle({
|
|
94
94
|
defaultSize,
|
|
95
95
|
dragState,
|
|
@@ -112,7 +112,9 @@ export function computePanelFlexBoxStyle({
|
|
|
112
112
|
// Initial render (before panels have registered themselves)
|
|
113
113
|
// In order to support server rendering, fall back to default size if provided
|
|
114
114
|
flexGrow
|
|
115
|
-
= defaultSize !== undefined
|
|
115
|
+
= defaultSize !== undefined
|
|
116
|
+
? defaultSize.toPrecision(precision)
|
|
117
|
+
: '1';
|
|
116
118
|
} else if (panelData.length === 1) {
|
|
117
119
|
// Special case: Single panel group should always fill full width/height
|
|
118
120
|
flexGrow = '1';
|
|
@@ -130,6 +132,8 @@ export function computePanelFlexBoxStyle({
|
|
|
130
132
|
|
|
131
133
|
// Disable pointer events inside of a panel during resize
|
|
132
134
|
// This avoid edge cases like nested iframes
|
|
133
|
-
pointerEvents: dragState !== null
|
|
135
|
+
pointerEvents: dragState !== null
|
|
136
|
+
? 'none'
|
|
137
|
+
: undefined,
|
|
134
138
|
};
|
|
135
139
|
}
|
|
@@ -128,8 +128,6 @@ export function recalculateLayoutForPixelPanels({
|
|
|
128
128
|
|
|
129
129
|
const nextLayout = layout.map((size) => size ?? 0);
|
|
130
130
|
|
|
131
|
-
const prevPercentForPixelPanels = pixelPanelIndices.reduce((sum, index) => sum + (layout[index] ?? 0), 0);
|
|
132
|
-
|
|
133
131
|
const nextPixelPercents = pixelPanelIndices.map((index) => {
|
|
134
132
|
const prevPercent = layout[index] ?? 0;
|
|
135
133
|
const prevPixelSize = (prevPercent / 100) * prevGroupSize;
|
|
@@ -3,7 +3,7 @@ import { assert } from './assert';
|
|
|
3
3
|
import { fuzzyNumbersEqual } from './compare';
|
|
4
4
|
import { resizePanel } from './resizePanel';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/** All units must be in percentages; pixel values should be pre-converted */
|
|
7
7
|
export function validatePanelGroupLayout({
|
|
8
8
|
layout: prevLayout,
|
|
9
9
|
panelConstraints,
|
|
@@ -147,7 +147,9 @@ export function validatePanelConstraints({
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
if (warnings.length > 0) {
|
|
150
|
-
const name = panelId != null
|
|
150
|
+
const name = panelId != null
|
|
151
|
+
? `Panel "${panelId}"`
|
|
152
|
+
: 'Panel';
|
|
151
153
|
console.warn(
|
|
152
154
|
`${name} has an invalid configuration:\n\n${warnings.join('\n')}`,
|
|
153
155
|
);
|
|
@@ -137,19 +137,31 @@ function hasPrev() {
|
|
|
137
137
|
|
|
138
138
|
const nextStepperItem = ref<HTMLElement | null>(null);
|
|
139
139
|
const prevStepperItem = ref<HTMLElement | null>(null);
|
|
140
|
-
const isNextDisabled = computed(() => nextStepperItem.value
|
|
141
|
-
|
|
140
|
+
const isNextDisabled = computed(() => nextStepperItem.value
|
|
141
|
+
? nextStepperItem.value.getAttribute('disabled') === ''
|
|
142
|
+
: true);
|
|
143
|
+
const isPrevDisabled = computed(() => prevStepperItem.value
|
|
144
|
+
? prevStepperItem.value.getAttribute('disabled') === ''
|
|
145
|
+
: true);
|
|
142
146
|
|
|
143
147
|
watch(modelValue, async () => {
|
|
144
148
|
await nextTick(() => {
|
|
145
|
-
nextStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! < totalStepperItemsArray.value.length
|
|
146
|
-
|
|
149
|
+
nextStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! < totalStepperItemsArray.value.length
|
|
150
|
+
? totalStepperItemsArray.value[modelValue.value!]
|
|
151
|
+
: null;
|
|
152
|
+
prevStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! > 1
|
|
153
|
+
? totalStepperItemsArray.value[modelValue.value! - 2]
|
|
154
|
+
: null;
|
|
147
155
|
});
|
|
148
156
|
});
|
|
149
157
|
watch(totalStepperItemsArray, async () => {
|
|
150
158
|
await nextTick(() => {
|
|
151
|
-
nextStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! < totalStepperItemsArray.value.length
|
|
152
|
-
|
|
159
|
+
nextStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! < totalStepperItemsArray.value.length
|
|
160
|
+
? totalStepperItemsArray.value[modelValue.value!]
|
|
161
|
+
: null;
|
|
162
|
+
prevStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! > 1
|
|
163
|
+
? totalStepperItemsArray.value[modelValue.value! - 2]
|
|
164
|
+
: null;
|
|
153
165
|
});
|
|
154
166
|
});
|
|
155
167
|
|
|
@@ -55,7 +55,12 @@ function handleKeyDown(event: KeyboardEvent) {
|
|
|
55
55
|
rootContext.changeModelValue(itemContext.step.value);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
if (isIncludedIn(event.key, [
|
|
58
|
+
if (isIncludedIn(event.key, [
|
|
59
|
+
KEY_CODES.ARROW_LEFT,
|
|
60
|
+
KEY_CODES.ARROW_RIGHT,
|
|
61
|
+
KEY_CODES.ARROW_UP,
|
|
62
|
+
KEY_CODES.ARROW_DOWN,
|
|
63
|
+
])) {
|
|
59
64
|
useArrowNavigation(event, getActiveElement() as HTMLElement, undefined, {
|
|
60
65
|
itemsArray: stepperItems.value,
|
|
61
66
|
focus: true,
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile-time type tests for the generic `SwitchRoot`, validated by `vue-tsc`
|
|
3
|
+
* (see `shared/useEmitAsProps.test-d.ts`).
|
|
4
|
+
*
|
|
5
|
+
* The component is called the way `vue-tsc` checks a template usage, so the
|
|
6
|
+
* `TrueValue` / `FalseValue` generics are inferred exactly as in
|
|
7
|
+
* `<SwitchRoot ... />`. They must be inferred from `trueValue` / `falseValue`
|
|
8
|
+
* only (or fall back to `true` / `false`, the runtime defaults), never from
|
|
9
|
+
* `modelValue` / `defaultValue`.
|
|
10
|
+
*/
|
|
11
|
+
import type { SwitchRootEmits, SwitchRootProps } from './SwitchRoot.vue';
|
|
12
|
+
import SwitchRoot from './SwitchRoot.vue';
|
|
13
|
+
|
|
14
|
+
// Assertion helpers
|
|
15
|
+
type Expect<T extends true> = T;
|
|
16
|
+
type Equal<A, B>
|
|
17
|
+
= (<T>() => T extends A ? 1 : 2) extends (<T>() => T extends B ? 1 : 2) ? true : false;
|
|
18
|
+
|
|
19
|
+
type Payload<E> = E extends { 'update:modelValue': [payload: infer P] } ? P : never;
|
|
20
|
+
|
|
21
|
+
// Public types: `trueValue` and `falseValue` can have different types
|
|
22
|
+
type _propsDefault = Expect<Equal<NonNullable<SwitchRootProps['modelValue']>, boolean>>;
|
|
23
|
+
// A single type argument keeps its previous meaning: both values share it
|
|
24
|
+
type _propsSingle = Expect<Equal<NonNullable<SwitchRootProps<string>['modelValue']>, string>>;
|
|
25
|
+
type _propsMixed = Expect<Equal<NonNullable<SwitchRootProps<'on', 0>['modelValue']>, 'on' | 0>>;
|
|
26
|
+
type _emitsDefault = Expect<Equal<Payload<SwitchRootEmits>, boolean>>;
|
|
27
|
+
type _emitsSingle = Expect<Equal<Payload<SwitchRootEmits<string>>, string>>;
|
|
28
|
+
type _emitsMixed = Expect<Equal<Payload<SwitchRootEmits<'on', 0>>, 'on' | 0>>;
|
|
29
|
+
|
|
30
|
+
declare const bool: boolean;
|
|
31
|
+
declare const str: string;
|
|
32
|
+
declare const num: number;
|
|
33
|
+
declare const onOff: 'on' | 'off';
|
|
34
|
+
declare const strOrNum: string | number;
|
|
35
|
+
declare const strOrFalse: string | false;
|
|
36
|
+
|
|
37
|
+
/** Never executed: only type-checked */
|
|
38
|
+
export function _switchRootTypeTests() {
|
|
39
|
+
// No `trueValue` / `falseValue`: boolean
|
|
40
|
+
SwitchRoot({
|
|
41
|
+
'modelValue': bool,
|
|
42
|
+
'onUpdate:modelValue': (v) => {
|
|
43
|
+
type _ = Expect<Equal<typeof v, boolean>>;
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// `trueValue` and `falseValue` of different types
|
|
48
|
+
SwitchRoot({
|
|
49
|
+
'trueValue': 'on',
|
|
50
|
+
'falseValue': 0,
|
|
51
|
+
'modelValue': strOrNum,
|
|
52
|
+
'onUpdate:modelValue': (v) => {
|
|
53
|
+
type _ = Expect<Equal<typeof v, string | number>>;
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// Only `trueValue`: the emitted value still includes `false`
|
|
58
|
+
SwitchRoot({
|
|
59
|
+
'trueValue': 'on',
|
|
60
|
+
'modelValue': strOrFalse,
|
|
61
|
+
'onUpdate:modelValue': (v) => {
|
|
62
|
+
type _ = Expect<Equal<typeof v, string | false>>;
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// Widened refs bound with v-model are accepted (e.g. `ref('off')`, `ref(0)`)
|
|
67
|
+
SwitchRoot({
|
|
68
|
+
'trueValue': 'on',
|
|
69
|
+
'falseValue': 'off',
|
|
70
|
+
'modelValue': str,
|
|
71
|
+
'onUpdate:modelValue': (v) => {
|
|
72
|
+
type _ = Expect<Equal<typeof v, string>>;
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
SwitchRoot({ trueValue: 1, falseValue: 0, modelValue: num });
|
|
76
|
+
SwitchRoot({ trueValue: 'on', falseValue: 'off', modelValue: onOff });
|
|
77
|
+
|
|
78
|
+
// `modelValue` must not drive inference (`NoInfer`): the runtime emits `true` / `false` here
|
|
79
|
+
// @ts-expect-error 'on' | 'off' is not assignable to boolean
|
|
80
|
+
SwitchRoot({ modelValue: onOff });
|
|
81
|
+
|
|
82
|
+
// @ts-expect-error the runtime emits `false`, not a number
|
|
83
|
+
SwitchRoot({ trueValue: 'on', modelValue: num });
|
|
84
|
+
|
|
85
|
+
// @ts-expect-error `defaultValue` must match the type of `trueValue` or `falseValue`
|
|
86
|
+
SwitchRoot({ trueValue: 1, falseValue: 0, defaultValue: 'off' });
|
|
87
|
+
}
|
|
@@ -4,11 +4,11 @@ import type { PrimitiveProps } from '@/Primitive';
|
|
|
4
4
|
import type { FormFieldProps } from '@/shared/types';
|
|
5
5
|
import { createContext, useFormControl, useForwardExpose, useForwardScopeId } from '@/shared';
|
|
6
6
|
|
|
7
|
-
export interface SwitchRootProps<
|
|
7
|
+
export interface SwitchRootProps<TrueValue = boolean, FalseValue = TrueValue> extends PrimitiveProps, FormFieldProps {
|
|
8
8
|
/** The state of the switch when it is initially rendered. Use when you do not need to control its state. */
|
|
9
|
-
defaultValue?:
|
|
9
|
+
defaultValue?: NoInfer<TrueValue | FalseValue>;
|
|
10
10
|
/** The controlled state of the switch. Can be bind as `v-model`. */
|
|
11
|
-
modelValue?:
|
|
11
|
+
modelValue?: NoInfer<TrueValue | FalseValue> | null;
|
|
12
12
|
/** When `true`, prevents the user from interacting with the switch. */
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
id?: string;
|
|
@@ -17,16 +17,16 @@ export interface SwitchRootProps<T = boolean> extends PrimitiveProps, FormFieldP
|
|
|
17
17
|
/**
|
|
18
18
|
* The value used when the switch is on. Defaults to `true`.
|
|
19
19
|
*/
|
|
20
|
-
trueValue?:
|
|
20
|
+
trueValue?: TrueValue;
|
|
21
21
|
/**
|
|
22
22
|
* The value used when the switch is off. Defaults to `false`.
|
|
23
23
|
*/
|
|
24
|
-
falseValue?:
|
|
24
|
+
falseValue?: FalseValue;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export type SwitchRootEmits<
|
|
27
|
+
export type SwitchRootEmits<TrueValue = boolean, FalseValue = TrueValue> = {
|
|
28
28
|
/** Event handler called when the value of the switch changes. */
|
|
29
|
-
'update:modelValue': [payload:
|
|
29
|
+
'update:modelValue': [payload: TrueValue | FalseValue];
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
export interface SwitchRootContext {
|
|
@@ -39,7 +39,7 @@ export const [injectSwitchRootContext, provideSwitchRootContext]
|
|
|
39
39
|
= createContext<SwitchRootContext>('SwitchRoot');
|
|
40
40
|
</script>
|
|
41
41
|
|
|
42
|
-
<script setup lang="ts" generic="
|
|
42
|
+
<script setup lang="ts" generic="TrueValue = true, FalseValue = false">
|
|
43
43
|
import { useVModel } from '@vueuse/core';
|
|
44
44
|
import { computed, toRefs } from 'vue';
|
|
45
45
|
import { Primitive } from '@/Primitive';
|
|
@@ -50,7 +50,7 @@ defineOptions({
|
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
const props = withDefaults(
|
|
53
|
-
defineProps<SwitchRootProps<
|
|
53
|
+
defineProps<SwitchRootProps<TrueValue, FalseValue>>(),
|
|
54
54
|
{
|
|
55
55
|
as: 'button',
|
|
56
56
|
modelValue: undefined,
|
|
@@ -59,7 +59,7 @@ const props = withDefaults(
|
|
|
59
59
|
falseValue: (() => false) as unknown as undefined,
|
|
60
60
|
},
|
|
61
61
|
);
|
|
62
|
-
const emit = defineEmits<SwitchRootEmits<
|
|
62
|
+
const emit = defineEmits<SwitchRootEmits<TrueValue, FalseValue>>();
|
|
63
63
|
|
|
64
64
|
defineSlots<{
|
|
65
65
|
default?: (props: {
|
|
@@ -75,7 +75,7 @@ const { disabled } = toRefs(props);
|
|
|
75
75
|
const modelValue = useVModel(props as any, 'modelValue', emit as any, {
|
|
76
76
|
defaultValue: props.defaultValue ?? props.falseValue,
|
|
77
77
|
passive: (props.modelValue === undefined) as false,
|
|
78
|
-
}) as Ref<
|
|
78
|
+
}) as Ref<TrueValue | FalseValue>;
|
|
79
79
|
|
|
80
80
|
const checked = computed(() => modelValue.value === props.trueValue);
|
|
81
81
|
|
|
@@ -84,7 +84,7 @@ function toggleCheck() {
|
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
modelValue.value = checked.value ? props.falseValue as
|
|
87
|
+
modelValue.value = checked.value ? props.falseValue as FalseValue : props.trueValue as TrueValue;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
const { forwardRef, currentElement } = useForwardExpose();
|
|
@@ -92,7 +92,9 @@ const isFormControl = useFormControl(currentElement);
|
|
|
92
92
|
// Hidden form input is a sibling (not nested) of the control to avoid the
|
|
93
93
|
// `nested-interactive` a11y violation; forward the parent scope id for scoped styles.
|
|
94
94
|
const scopeIdAttrs = useForwardScopeId();
|
|
95
|
-
const ariaLabel = computed(() => props.id && currentElement.value
|
|
95
|
+
const ariaLabel = computed(() => props.id && currentElement.value
|
|
96
|
+
? (document.querySelector(`[for="${props.id}"]`) as HTMLLabelElement)?.innerText
|
|
97
|
+
: undefined);
|
|
96
98
|
|
|
97
99
|
provideSwitchRootContext({
|
|
98
100
|
checked,
|
package/src/Tabs/TabsTrigger.vue
CHANGED
|
@@ -27,7 +27,9 @@ const { forwardRef } = useForwardExpose();
|
|
|
27
27
|
const rootContext = injectTabsRootContext();
|
|
28
28
|
|
|
29
29
|
const triggerId = computed(() => makeTriggerId(rootContext.baseId, props.value));
|
|
30
|
-
const contentId = computed(() => rootContext.contentIds.value.has(props.value)
|
|
30
|
+
const contentId = computed(() => rootContext.contentIds.value.has(props.value)
|
|
31
|
+
? makeContentId(rootContext.baseId, props.value)
|
|
32
|
+
: undefined);
|
|
31
33
|
|
|
32
34
|
const isSelected = computed(() => props.value === rootContext.modelValue.value);
|
|
33
35
|
</script>
|
|
@@ -25,7 +25,9 @@ const disabled = computed(() => itemContext.disabled.value || props.disabled);
|
|
|
25
25
|
|
|
26
26
|
// Only the focused tag's button is tabbable, so Tab moves from a tag to its
|
|
27
27
|
// delete button and then out of the group, like React Aria.
|
|
28
|
-
const tabindex = computed(() => itemContext.isTabStop.value
|
|
28
|
+
const tabindex = computed(() => itemContext.isTabStop.value
|
|
29
|
+
? 0
|
|
30
|
+
: -1);
|
|
29
31
|
|
|
30
32
|
function handleClick(event: MouseEvent) {
|
|
31
33
|
// The tag itself toggles selection on click.
|