akar 2.0.23 → 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.map +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/DialogContent.cjs.map +1 -1
- package/dist/Dialog/DialogContent.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.map +1 -1
- package/dist/DismissableLayer/DismissableLayer.js.map +1 -1
- package/dist/DismissableLayer/context.cjs +1 -0
- package/dist/DismissableLayer/context.cjs.map +1 -1
- package/dist/DismissableLayer/context.js +1 -0
- 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.map +1 -1
- 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.map +1 -1
- 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/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/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/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/constant.d.ts.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.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index2.d.cts +2 -0
- package/dist/index2.d.cts.map +1 -1
- package/dist/index2.d.ts +2 -0
- package/dist/index2.d.ts.map +1 -1
- package/dist/index3.d.cts +721 -719
- package/dist/index3.d.cts.map +1 -1
- package/dist/index3.d.ts +711 -709
- package/dist/index3.d.ts.map +1 -1
- package/dist/internal.d.cts +2 -2
- package/dist/internal.d.cts.map +1 -1
- package/dist/internal.d.ts +2 -2
- package/dist/shared/bodyPointerEvents.cjs.map +1 -1
- package/dist/shared/bodyPointerEvents.js.map +1 -1
- 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.map +1 -1
- package/dist/shared/useBodyScrollLock.js.map +1 -1
- package/dist/shared/useCalendarKeyboardNavigation.cjs.map +1 -1
- 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/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 +10 -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 +3 -1
- 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 +9 -2
- 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 +3 -1
- 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 +3 -1
- 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/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/ToastRoot.vue +4 -1
- package/src/Toast/ToastRootImpl.vue +19 -5
- 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 +4 -1
- 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 +12 -4
- package/src/shared/useCalendarKeyboardNavigation.ts +30 -8
- 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
|
@@ -159,10 +159,14 @@ const step = computed(() => normalizeDateStep(props));
|
|
|
159
159
|
|
|
160
160
|
const inferredGranularity = computed(() => {
|
|
161
161
|
if (props.granularity) {
|
|
162
|
-
return !hasTime(placeholder.value)
|
|
162
|
+
return !hasTime(placeholder.value)
|
|
163
|
+
? 'day'
|
|
164
|
+
: props.granularity;
|
|
163
165
|
}
|
|
164
166
|
|
|
165
|
-
return hasTime(placeholder.value)
|
|
167
|
+
return hasTime(placeholder.value)
|
|
168
|
+
? 'minute'
|
|
169
|
+
: 'day';
|
|
166
170
|
});
|
|
167
171
|
|
|
168
172
|
const isStartInvalid = computed(() => {
|
|
@@ -234,8 +238,16 @@ const isInvalid = computed(() => {
|
|
|
234
238
|
|
|
235
239
|
const initialSegments = initializeSegmentValues(inferredGranularity.value);
|
|
236
240
|
|
|
237
|
-
const startSegmentValues = ref<SegmentValueObj>(modelValue.value?.start
|
|
238
|
-
|
|
241
|
+
const startSegmentValues = ref<SegmentValueObj>(modelValue.value?.start
|
|
242
|
+
? {
|
|
243
|
+
...syncSegmentValues({ value: modelValue.value.start, formatter }),
|
|
244
|
+
}
|
|
245
|
+
: { ...initialSegments });
|
|
246
|
+
const endSegmentValues = ref<SegmentValueObj>(modelValue.value?.end
|
|
247
|
+
? {
|
|
248
|
+
...syncSegmentValues({ value: modelValue.value.end, formatter }),
|
|
249
|
+
}
|
|
250
|
+
: { ...initialSegments });
|
|
239
251
|
|
|
240
252
|
const startSegmentContent = computed(() => createContent({
|
|
241
253
|
granularity: inferredGranularity.value,
|
|
@@ -262,13 +274,19 @@ const segmentContents = computed(() => ({
|
|
|
262
274
|
end: endSegmentContent.value.arr,
|
|
263
275
|
}));
|
|
264
276
|
|
|
265
|
-
const editableSegmentContents = computed(() => ({
|
|
277
|
+
const editableSegmentContents = computed(() => ({
|
|
278
|
+
start: segmentContents.value.start.filter(({ part }) => part !== 'literal'),
|
|
279
|
+
end: segmentContents.value.end.filter(({ part }) => part !== 'literal'),
|
|
280
|
+
}));
|
|
266
281
|
|
|
267
282
|
const startValue = ref(modelValue.value?.start?.copy()) as Ref<DateValue | undefined>;
|
|
268
283
|
const endValue = ref(modelValue.value?.end?.copy()) as Ref<DateValue | undefined>;
|
|
269
284
|
|
|
270
285
|
watch([startValue, endValue], ([_startValue, _endValue]) => {
|
|
271
|
-
modelValue.value = {
|
|
286
|
+
modelValue.value = {
|
|
287
|
+
start: _startValue?.copy(),
|
|
288
|
+
end: _endValue?.copy(),
|
|
289
|
+
};
|
|
272
290
|
});
|
|
273
291
|
|
|
274
292
|
watch(modelValue, (_modelValue) => {
|
|
@@ -289,7 +307,9 @@ watch(modelValue, (_modelValue) => {
|
|
|
289
307
|
|
|
290
308
|
watch([startValue, locale], ([_startValue]) => {
|
|
291
309
|
if (_startValue !== undefined) {
|
|
292
|
-
startSegmentValues.value = {
|
|
310
|
+
startSegmentValues.value = {
|
|
311
|
+
...syncSegmentValues({ value: _startValue, formatter }),
|
|
312
|
+
};
|
|
293
313
|
} else if (Object.values(startSegmentValues.value).every((value) => value !== null) && _startValue === undefined) {
|
|
294
314
|
// If segment has null value, means that user modified it, thus do not reset the segmentValues
|
|
295
315
|
startSegmentValues.value = { ...initialSegments };
|
|
@@ -318,7 +338,9 @@ watch(modelValue, (_modelValue) => {
|
|
|
318
338
|
|
|
319
339
|
watch([endValue, locale], ([_endValue]) => {
|
|
320
340
|
if (_endValue !== undefined) {
|
|
321
|
-
endSegmentValues.value = {
|
|
341
|
+
endSegmentValues.value = {
|
|
342
|
+
...syncSegmentValues({ value: _endValue, formatter }),
|
|
343
|
+
};
|
|
322
344
|
} else if (Object.values(endSegmentValues.value).every((value) => value !== null) && _endValue === undefined) {
|
|
323
345
|
// If segment has null value, means that user modified it, thus do not reset the segmentValues
|
|
324
346
|
endSegmentValues.value = { ...initialSegments };
|
|
@@ -200,7 +200,10 @@ provideDateRangePickerRootContext({
|
|
|
200
200
|
emits('update:startValue', date);
|
|
201
201
|
},
|
|
202
202
|
onDateChange(date: DateRange) {
|
|
203
|
-
modelValue.value = {
|
|
203
|
+
modelValue.value = {
|
|
204
|
+
start: date.start?.copy(),
|
|
205
|
+
end: date.end?.copy(),
|
|
206
|
+
};
|
|
204
207
|
},
|
|
205
208
|
onPlaceholderChange(date: DateValue) {
|
|
206
209
|
placeholder.value = date.copy();
|
package/src/Dialog/utils.ts
CHANGED
|
@@ -25,7 +25,7 @@ export function useWarning({
|
|
|
25
25
|
|
|
26
26
|
If you want to hide the \`${titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
27
27
|
|
|
28
|
-
For more information, see https://
|
|
28
|
+
For more information, see https://vinicunca.dev/akar/components/${componentLink}`;
|
|
29
29
|
|
|
30
30
|
const DESCRIPTION_MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby="undefined"\` for ${contentName}.`;
|
|
31
31
|
|
|
@@ -175,7 +175,11 @@ onKeyStroke('Escape', (event) => {
|
|
|
175
175
|
// layer would re-run this effect and its cleanup could prematurely restore the
|
|
176
176
|
// body's `pointer-events` while an ancestor layer is still open (#2674).
|
|
177
177
|
watch(
|
|
178
|
-
[
|
|
178
|
+
[
|
|
179
|
+
layerElement,
|
|
180
|
+
() => props.disableOutsidePointerEvents,
|
|
181
|
+
() => props.present,
|
|
182
|
+
],
|
|
179
183
|
([element, disableOutsidePointerEvents, present], _, onCleanup) => {
|
|
180
184
|
if (!element || !present) {
|
|
181
185
|
return;
|
|
@@ -207,7 +211,10 @@ watch(
|
|
|
207
211
|
// Kept separate from the pointer-events watch above so a
|
|
208
212
|
// `disableOutsidePointerEvents` toggle alone never re-orders the stack.
|
|
209
213
|
watch(
|
|
210
|
-
[
|
|
214
|
+
[
|
|
215
|
+
layerElement,
|
|
216
|
+
() => props.present,
|
|
217
|
+
],
|
|
211
218
|
([element, present], _, onCleanup) => {
|
|
212
219
|
if (!element || !present) {
|
|
213
220
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { reactive } from 'vue';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/** Module-level registry shared by every `DismissableLayer` in the app. */
|
|
4
4
|
export const context = reactive({
|
|
5
5
|
layersRoot: new Set<HTMLElement>(),
|
|
6
6
|
layersWithOutsidePointerEventsDisabled: new Set<HTMLElement>(),
|
|
@@ -54,6 +54,7 @@ export function isLayerExist(layerElement: HTMLElement, targetElement: HTMLEleme
|
|
|
54
54
|
layerElement.ownerDocument.querySelectorAll('[data-dismissable-layer]'),
|
|
55
55
|
);
|
|
56
56
|
|
|
57
|
+
// eslint-disable-next-line sonarjs/prefer-single-boolean-return
|
|
57
58
|
if (targetLayer && (mainLayer === targetLayer || nodeList.indexOf(mainLayer) < nodeList.indexOf(targetLayer))) {
|
|
58
59
|
return true;
|
|
59
60
|
} else {
|
|
@@ -88,7 +88,9 @@ function writeSnapPointOffset() {
|
|
|
88
88
|
const offset = activeSnapPointOffset.value;
|
|
89
89
|
if (offset != null) {
|
|
90
90
|
const dir = rootContext.swipeDirection.value;
|
|
91
|
-
const signedOffset = (dir === 'up' || dir === 'left')
|
|
91
|
+
const signedOffset = (dir === 'up' || dir === 'left')
|
|
92
|
+
? -offset
|
|
93
|
+
: offset;
|
|
92
94
|
el.style.setProperty(DRAWER_CSS_VARS.snapPointOffset, `${signedOffset}px`);
|
|
93
95
|
} else {
|
|
94
96
|
el.style.setProperty(DRAWER_CSS_VARS.snapPointOffset, '0px');
|
|
@@ -125,7 +127,12 @@ const swipeDirections = computed<Array<SwipeDirection>>(() => {
|
|
|
125
127
|
return [dismiss];
|
|
126
128
|
}
|
|
127
129
|
// Allow swiping in both directions for snap point navigation
|
|
128
|
-
const opposite: Record<string, SwipeDirection> = {
|
|
130
|
+
const opposite: Record<string, SwipeDirection> = {
|
|
131
|
+
up: 'down',
|
|
132
|
+
down: 'up',
|
|
133
|
+
left: 'right',
|
|
134
|
+
right: 'left',
|
|
135
|
+
};
|
|
129
136
|
return [dismiss, opposite[dismiss]];
|
|
130
137
|
});
|
|
131
138
|
|
|
@@ -168,9 +175,15 @@ const { isSwiping, restore: restoreSwipe } = useSwipeDismiss({
|
|
|
168
175
|
const el = currentElement.value;
|
|
169
176
|
if (el) {
|
|
170
177
|
const dir = rootContext.swipeDirection.value;
|
|
171
|
-
const size = (dir === 'left' || dir === 'right')
|
|
172
|
-
|
|
173
|
-
|
|
178
|
+
const size = (dir === 'left' || dir === 'right')
|
|
179
|
+
? el.offsetWidth
|
|
180
|
+
: el.offsetHeight;
|
|
181
|
+
const axisDelta = (dir === 'left' || dir === 'right')
|
|
182
|
+
? lastRawDelta.x
|
|
183
|
+
: lastRawDelta.y;
|
|
184
|
+
const releaseVelocity = (dir === 'left' || dir === 'right')
|
|
185
|
+
? velocity.x
|
|
186
|
+
: velocity.y;
|
|
174
187
|
const scalar = computeSwipeReleaseScalar({
|
|
175
188
|
direction: dir,
|
|
176
189
|
size,
|
|
@@ -29,7 +29,9 @@ onMounted(() => {
|
|
|
29
29
|
|
|
30
30
|
const sync = () => {
|
|
31
31
|
const { swipeProgress, frontmostHeight } = store.getSnapshot();
|
|
32
|
-
el.style.setProperty(DRAWER_CSS_VARS.swipeProgress, swipeProgress > 0
|
|
32
|
+
el.style.setProperty(DRAWER_CSS_VARS.swipeProgress, swipeProgress > 0
|
|
33
|
+
? `${swipeProgress}`
|
|
34
|
+
: '0');
|
|
33
35
|
if (frontmostHeight > 0) {
|
|
34
36
|
el.style.setProperty(DRAWER_CSS_VARS.height, `${frontmostHeight}px`);
|
|
35
37
|
} else {
|
|
@@ -34,11 +34,15 @@ function createVisualStateStore(): DrawerVisualStateStore {
|
|
|
34
34
|
set(next) {
|
|
35
35
|
// eslint-disable-next-line no-nested-ternary
|
|
36
36
|
const nextProgress = next.swipeProgress !== undefined
|
|
37
|
-
? (Number.isFinite(next.swipeProgress)
|
|
37
|
+
? (Number.isFinite(next.swipeProgress)
|
|
38
|
+
? next.swipeProgress
|
|
39
|
+
: 0)
|
|
38
40
|
: state.swipeProgress;
|
|
39
41
|
// eslint-disable-next-line no-nested-ternary
|
|
40
42
|
const nextHeight = next.frontmostHeight !== undefined
|
|
41
|
-
? (Number.isFinite(next.frontmostHeight)
|
|
43
|
+
? (Number.isFinite(next.frontmostHeight)
|
|
44
|
+
? next.frontmostHeight
|
|
45
|
+
: 0)
|
|
42
46
|
: state.frontmostHeight;
|
|
43
47
|
if (nextProgress === state.swipeProgress && nextHeight === state.frontmostHeight) {
|
|
44
48
|
return;
|
|
@@ -18,7 +18,9 @@ export interface ResolvedSnapPoint {
|
|
|
18
18
|
function parseSnapPoint(value: DrawerSnapPoint, viewportHeight: number, rootFontSize: number): number | null {
|
|
19
19
|
let result: number | null = null;
|
|
20
20
|
if (typeof value === 'number') {
|
|
21
|
-
result = (value >= 0 && value <= 1)
|
|
21
|
+
result = (value >= 0 && value <= 1)
|
|
22
|
+
? value * viewportHeight
|
|
23
|
+
: value;
|
|
22
24
|
} else if (value.endsWith('rem')) {
|
|
23
25
|
result = Number.parseFloat(value) * rootFontSize;
|
|
24
26
|
} else if (value.endsWith('px')) {
|
|
@@ -42,7 +44,9 @@ export function useDrawerSnapPoints(options: {
|
|
|
42
44
|
}) {
|
|
43
45
|
const { snapPoints, activeSnapPoint, popupHeight, onSnapPointChange } = options;
|
|
44
46
|
|
|
45
|
-
const viewportHeight = ref(typeof window !== 'undefined'
|
|
47
|
+
const viewportHeight = ref(typeof window !== 'undefined'
|
|
48
|
+
? window.innerHeight
|
|
49
|
+
: 0);
|
|
46
50
|
const rootFontSize = ref(
|
|
47
51
|
typeof document !== 'undefined'
|
|
48
52
|
? Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16
|
|
@@ -74,7 +78,11 @@ export function useDrawerSnapPoints(options: {
|
|
|
74
78
|
continue;
|
|
75
79
|
}
|
|
76
80
|
const clampedHeight = Math.min(height, Math.min(ph, vh));
|
|
77
|
-
resolved.push({
|
|
81
|
+
resolved.push({
|
|
82
|
+
value: pt,
|
|
83
|
+
height: clampedHeight,
|
|
84
|
+
offset: Math.max(0, ph - clampedHeight),
|
|
85
|
+
});
|
|
78
86
|
}
|
|
79
87
|
return resolved.sort((a, b) => a.height - b.height);
|
|
80
88
|
});
|
|
@@ -128,8 +136,12 @@ export function useDrawerSnapPoints(options: {
|
|
|
128
136
|
// Convert raw velocity into a dismiss-signed scalar:
|
|
129
137
|
// positive = moving in dismiss direction (collapsing)
|
|
130
138
|
// negative = moving in open direction (expanding)
|
|
131
|
-
const axisVel = (direction === 'up' || direction === 'down')
|
|
132
|
-
|
|
139
|
+
const axisVel = (direction === 'up' || direction === 'down')
|
|
140
|
+
? velocity.y
|
|
141
|
+
: velocity.x;
|
|
142
|
+
const velSigned = (direction === 'up' || direction === 'left')
|
|
143
|
+
? -axisVel
|
|
144
|
+
: axisVel;
|
|
133
145
|
|
|
134
146
|
// Current offset (from fully open): 0 = fully open, `ph` = fully closed.
|
|
135
147
|
// Match by value OR parsed-height equivalence so equivalent representations
|
|
@@ -171,7 +183,9 @@ export function useDrawerSnapPoints(options: {
|
|
|
171
183
|
// if (a) velocity direction matches drag direction and is fast enough, OR
|
|
172
184
|
// (b) the projected target has physically crossed the adjacent snap.
|
|
173
185
|
const sorted = [...points].sort((a, b) => a.offset - b.offset);
|
|
174
|
-
const currentIdx = activePoint
|
|
186
|
+
const currentIdx = activePoint
|
|
187
|
+
? sorted.indexOf(activePoint)
|
|
188
|
+
: -1;
|
|
175
189
|
if (currentIdx < 0) {
|
|
176
190
|
onSnapPointChange(closest.value);
|
|
177
191
|
return;
|
|
@@ -191,7 +205,9 @@ export function useDrawerSnapPoints(options: {
|
|
|
191
205
|
const crossed = dragDir > 0
|
|
192
206
|
? targetOffset > adjacent.offset
|
|
193
207
|
: targetOffset < adjacent.offset;
|
|
194
|
-
onSnapPointChange(crossed
|
|
208
|
+
onSnapPointChange(crossed
|
|
209
|
+
? adjacent.value
|
|
210
|
+
: (activeSnapPoint.value ?? closest.value));
|
|
195
211
|
return;
|
|
196
212
|
}
|
|
197
213
|
|
|
@@ -87,21 +87,29 @@ export function resolveKeyboardInputTarget(target: EventTarget | null): HTMLElem
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
if (isKeyboardInputElement(target)) {
|
|
90
|
-
return target.isContentEditable
|
|
90
|
+
return target.isContentEditable
|
|
91
|
+
? getContentEditableHost(target)
|
|
92
|
+
: target;
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
const control = (target.closest('label') as HTMLLabelElement | null)?.control;
|
|
94
|
-
return control instanceof HTMLElement && isKeyboardInputElement(control)
|
|
96
|
+
return control instanceof HTMLElement && isKeyboardInputElement(control)
|
|
97
|
+
? control
|
|
98
|
+
: null;
|
|
95
99
|
}
|
|
96
100
|
|
|
97
101
|
function resolveKeyboardTouchTarget(target: EventTarget | null): KeyboardTouchTarget | null {
|
|
98
102
|
const focusTarget = resolveKeyboardInputTarget(target);
|
|
99
|
-
return focusTarget
|
|
103
|
+
return focusTarget
|
|
104
|
+
? { focusTarget, clickTarget: target as HTMLElement }
|
|
105
|
+
: null;
|
|
100
106
|
}
|
|
101
107
|
|
|
102
108
|
function getElementAtPoint(root: Node, x: number, y: number): Element | null {
|
|
103
109
|
const elementFromPoint = (root as Partial<Document>).elementFromPoint;
|
|
104
|
-
return typeof elementFromPoint === 'function'
|
|
110
|
+
return typeof elementFromPoint === 'function'
|
|
111
|
+
? elementFromPoint.call(root, x, y)
|
|
112
|
+
: null;
|
|
105
113
|
}
|
|
106
114
|
|
|
107
115
|
/**
|
|
@@ -206,7 +214,9 @@ function isVerticallyScrollable(element: HTMLElement, allowOverflowIntent: boole
|
|
|
206
214
|
return false;
|
|
207
215
|
}
|
|
208
216
|
// With intent, a container that overflows only once slack is added counts too.
|
|
209
|
-
return allowOverflowIntent
|
|
217
|
+
return allowOverflowIntent
|
|
218
|
+
? element.clientHeight > 0
|
|
219
|
+
: element.scrollHeight > element.clientHeight;
|
|
210
220
|
}
|
|
211
221
|
|
|
212
222
|
/** The parent in the flat tree: crosses slots and shadow roots. */
|
|
@@ -215,7 +225,9 @@ function getParentNode(node: Node): Node | null {
|
|
|
215
225
|
return node.assignedSlot;
|
|
216
226
|
}
|
|
217
227
|
const parent = node.parentNode;
|
|
218
|
-
return parent instanceof ShadowRoot
|
|
228
|
+
return parent instanceof ShadowRoot
|
|
229
|
+
? parent.host
|
|
230
|
+
: parent;
|
|
219
231
|
}
|
|
220
232
|
|
|
221
233
|
function findScrollableAncestor(
|
|
@@ -230,7 +242,9 @@ function findScrollableAncestor(
|
|
|
230
242
|
}
|
|
231
243
|
node = getParentNode(node);
|
|
232
244
|
}
|
|
233
|
-
return isVerticallyScrollable(root, allowOverflowIntent)
|
|
245
|
+
return isVerticallyScrollable(root, allowOverflowIntent)
|
|
246
|
+
? root
|
|
247
|
+
: null;
|
|
234
248
|
}
|
|
235
249
|
|
|
236
250
|
/**
|
|
@@ -331,7 +345,10 @@ export function useDrawerVirtualKeyboard(options: UseDrawerVirtualKeyboardOption
|
|
|
331
345
|
function animateScroll(element: HTMLElement, scrollTop: number) {
|
|
332
346
|
const win = element.ownerDocument.defaultView ?? window;
|
|
333
347
|
const reducedMotion = win.matchMedia?.('(prefers-reduced-motion: reduce)')?.matches;
|
|
334
|
-
element.scrollTo?.({
|
|
348
|
+
element.scrollTo?.({
|
|
349
|
+
top: scrollTop,
|
|
350
|
+
behavior: reducedMotion ? 'auto' : 'smooth',
|
|
351
|
+
});
|
|
335
352
|
}
|
|
336
353
|
|
|
337
354
|
function cancelPendingAlignment() {
|
|
@@ -403,7 +420,9 @@ export function useDrawerVirtualKeyboard(options: UseDrawerVirtualKeyboardOption
|
|
|
403
420
|
return {
|
|
404
421
|
top,
|
|
405
422
|
// Fixed content already sits above the keyboard, so an inset would lift it twice.
|
|
406
|
-
bottom: layoutFollowsKeyboard
|
|
423
|
+
bottom: layoutFollowsKeyboard
|
|
424
|
+
? layoutHeight
|
|
425
|
+
: Math.min(layoutHeight, top + visualHeight),
|
|
407
426
|
resizing: layoutFollowsKeyboard && Math.abs(layoutHeight - visualHeight) >= 1,
|
|
408
427
|
};
|
|
409
428
|
}
|
|
@@ -541,7 +560,9 @@ export function useDrawerVirtualKeyboard(options: UseDrawerVirtualKeyboardOption
|
|
|
541
560
|
if (!settled) {
|
|
542
561
|
// Commit only once the destination holds across two checks — layout may
|
|
543
562
|
// still be transitioning, and a mid-transition destination overshoots.
|
|
544
|
-
const checks = scrollElement === scrollTarget
|
|
563
|
+
const checks = scrollElement === scrollTarget
|
|
564
|
+
? scrollChecks + 1
|
|
565
|
+
: 1;
|
|
545
566
|
scrollElement = scrollTarget;
|
|
546
567
|
scrollDestination = destination;
|
|
547
568
|
scrollChecks = checks;
|
|
@@ -590,7 +611,9 @@ export function useDrawerVirtualKeyboard(options: UseDrawerVirtualKeyboardOption
|
|
|
590
611
|
const pass = () => {
|
|
591
612
|
align();
|
|
592
613
|
remaining -= 1;
|
|
593
|
-
realignTimer = remaining > 0
|
|
614
|
+
realignTimer = remaining > 0
|
|
615
|
+
? setTimeout(pass, KEYBOARD_REALIGN_INTERVAL)
|
|
616
|
+
: undefined;
|
|
594
617
|
};
|
|
595
618
|
realignTimer = setTimeout(pass, KEYBOARD_REALIGN_INTERVAL);
|
|
596
619
|
}
|
|
@@ -671,7 +694,9 @@ export function useDrawerVirtualKeyboard(options: UseDrawerVirtualKeyboardOption
|
|
|
671
694
|
function onTouchStart(event: TouchEvent) {
|
|
672
695
|
const touch = event.touches[0];
|
|
673
696
|
touchMoved = false;
|
|
674
|
-
touchStart = touch
|
|
697
|
+
touchStart = touch
|
|
698
|
+
? { x: touch.clientX, y: touch.clientY }
|
|
699
|
+
: null;
|
|
675
700
|
}
|
|
676
701
|
|
|
677
702
|
function onTouchMove(event: TouchEvent) {
|
|
@@ -190,7 +190,9 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
|
|
|
190
190
|
if (typeof swipeThresholdProp === 'function') {
|
|
191
191
|
return Math.max(0, swipeThresholdProp({ element: el, direction: dir }));
|
|
192
192
|
}
|
|
193
|
-
return typeof swipeThresholdProp === 'number'
|
|
193
|
+
return typeof swipeThresholdProp === 'number'
|
|
194
|
+
? swipeThresholdProp
|
|
195
|
+
: DEFAULT_SWIPE_THRESHOLD;
|
|
194
196
|
}
|
|
195
197
|
|
|
196
198
|
function setSwiping(next: boolean) {
|
|
@@ -277,7 +279,9 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
|
|
|
277
279
|
* Ported from BaseUI `useSwipeDismiss.ts:applyDirectionalDamping`.
|
|
278
280
|
*/
|
|
279
281
|
function applyDirectionalDamping(deltaX: number, deltaY: number) {
|
|
280
|
-
const exponent = (value: number) => (value >= 0
|
|
282
|
+
const exponent = (value: number) => (value >= 0
|
|
283
|
+
? value ** 0.5
|
|
284
|
+
: -((Math.abs(value)) ** 0.5));
|
|
281
285
|
const dampAxis = (delta: number, allowNegative: boolean, allowPositive: boolean) => {
|
|
282
286
|
if (!allowNegative && delta < 0) {
|
|
283
287
|
return exponent(delta);
|
|
@@ -320,8 +324,12 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
|
|
|
320
324
|
}
|
|
321
325
|
|
|
322
326
|
const isVerticalDrawerAxis = drawerAxis.value === 'vertical';
|
|
323
|
-
const drawerAxisDelta = isVerticalDrawerAxis
|
|
324
|
-
|
|
327
|
+
const drawerAxisDelta = isVerticalDrawerAxis
|
|
328
|
+
? pos.y - dragStartPos.y
|
|
329
|
+
: pos.x - dragStartPos.x;
|
|
330
|
+
const crossAxisDelta = isVerticalDrawerAxis
|
|
331
|
+
? pos.x - dragStartPos.x
|
|
332
|
+
: pos.y - dragStartPos.y;
|
|
325
333
|
const absDrawerAxisDelta = Math.abs(drawerAxisDelta);
|
|
326
334
|
const absCrossAxisDelta = Math.abs(crossAxisDelta);
|
|
327
335
|
|
|
@@ -354,7 +362,9 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
|
|
|
354
362
|
const absX = Math.abs(rawDx);
|
|
355
363
|
const absY = Math.abs(rawDy);
|
|
356
364
|
if (hasVertical.value && hasHorizontal.value) {
|
|
357
|
-
lockedAxis = absX > absY
|
|
365
|
+
lockedAxis = absX > absY
|
|
366
|
+
? 'horizontal'
|
|
367
|
+
: 'vertical';
|
|
358
368
|
} else if (hasVertical.value) {
|
|
359
369
|
lockedAxis = 'vertical';
|
|
360
370
|
} else {
|
|
@@ -363,8 +373,12 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
|
|
|
363
373
|
}
|
|
364
374
|
|
|
365
375
|
// Axis-locked deltas for direction detection
|
|
366
|
-
const dx = lockedAxis === 'vertical'
|
|
367
|
-
|
|
376
|
+
const dx = lockedAxis === 'vertical'
|
|
377
|
+
? 0
|
|
378
|
+
: rawDx;
|
|
379
|
+
const dy = lockedAxis === 'horizontal'
|
|
380
|
+
? 0
|
|
381
|
+
: rawDy;
|
|
368
382
|
|
|
369
383
|
const dir: SwipeDirection | undefined = toValue(directions).find((d) => getDisplacement(d, dx, dy) > 0);
|
|
370
384
|
|
|
@@ -456,8 +470,12 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
|
|
|
456
470
|
const threshold = getThreshold(el, intendedDirection ?? toValue(directions)[0]);
|
|
457
471
|
|
|
458
472
|
const now = performance.now();
|
|
459
|
-
const velAge = lastDragSample
|
|
460
|
-
|
|
473
|
+
const velAge = lastDragSample
|
|
474
|
+
? now - lastDragSample.time
|
|
475
|
+
: Infinity;
|
|
476
|
+
const velocity = velAge > MAX_RELEASE_VELOCITY_AGE_MS
|
|
477
|
+
? { x: 0, y: 0 }
|
|
478
|
+
: lastVelocity;
|
|
461
479
|
|
|
462
480
|
// When onRelease returns true (snap-point release), it owns the open/close
|
|
463
481
|
// and transform outcome — don't run the dismiss-vs-cancel branch, which
|
|
@@ -631,7 +649,9 @@ export function useSwipeDismiss(options: UseSwipeDismissOptions) {
|
|
|
631
649
|
// on `ignoreScrollableAncestors`: that option is about starting a swipe from
|
|
632
650
|
// inside a scroller on the dismiss axis.
|
|
633
651
|
if (drawerAxis.value) {
|
|
634
|
-
const crossAxis = drawerAxis.value === 'vertical'
|
|
652
|
+
const crossAxis = drawerAxis.value === 'vertical'
|
|
653
|
+
? 'horizontal'
|
|
654
|
+
: 'vertical';
|
|
635
655
|
crossAxisScrollable = findScrollableAncestor(target, crossAxis);
|
|
636
656
|
}
|
|
637
657
|
|
package/src/Drawer/utils.ts
CHANGED
|
@@ -104,14 +104,18 @@ export function computeSwipeReleaseScalar(params: {
|
|
|
104
104
|
|
|
105
105
|
const translation = baseOffset + axisDelta;
|
|
106
106
|
const translationAlongDirection
|
|
107
|
-
= (direction === 'left' || direction === 'up')
|
|
107
|
+
= (direction === 'left' || direction === 'up')
|
|
108
|
+
? -translation
|
|
109
|
+
: translation;
|
|
108
110
|
const remainingDistance = Math.max(0, size - translationAlongDirection);
|
|
109
111
|
if (!Number.isFinite(remainingDistance) || remainingDistance <= 0) {
|
|
110
112
|
return null;
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
const directionalVelocity
|
|
114
|
-
= (direction === 'left' || direction === 'up')
|
|
116
|
+
= (direction === 'left' || direction === 'up')
|
|
117
|
+
? -releaseVelocity
|
|
118
|
+
: releaseVelocity;
|
|
115
119
|
if (!Number.isFinite(directionalVelocity) || directionalVelocity <= MIN_SWIPE_RELEASE_VELOCITY) {
|
|
116
120
|
return null;
|
|
117
121
|
}
|
|
@@ -194,7 +198,12 @@ export function registerDrawerCssProperties() {
|
|
|
194
198
|
];
|
|
195
199
|
for (const name of lengthVars) {
|
|
196
200
|
try {
|
|
197
|
-
CSS.registerProperty({
|
|
201
|
+
CSS.registerProperty({
|
|
202
|
+
name,
|
|
203
|
+
syntax: '<length>',
|
|
204
|
+
inherits: false,
|
|
205
|
+
initialValue: '0px',
|
|
206
|
+
});
|
|
198
207
|
} catch {}
|
|
199
208
|
}
|
|
200
209
|
|
|
@@ -204,7 +213,12 @@ export function registerDrawerCssProperties() {
|
|
|
204
213
|
];
|
|
205
214
|
for (const { name, initialValue } of numberVars) {
|
|
206
215
|
try {
|
|
207
|
-
CSS.registerProperty({
|
|
216
|
+
CSS.registerProperty({
|
|
217
|
+
name,
|
|
218
|
+
syntax: '<number>',
|
|
219
|
+
inherits: false,
|
|
220
|
+
initialValue,
|
|
221
|
+
});
|
|
208
222
|
} catch {}
|
|
209
223
|
}
|
|
210
224
|
|
|
@@ -143,7 +143,9 @@ const { primitiveElement, currentElement } = usePrimitiveElement();
|
|
|
143
143
|
const isFormControl = useFormControl(currentElement);
|
|
144
144
|
|
|
145
145
|
const placeholder = computed(() => {
|
|
146
|
-
return isString(propPlaceholder.value)
|
|
146
|
+
return isString(propPlaceholder.value)
|
|
147
|
+
? { edit: propPlaceholder.value, preview: propPlaceholder.value }
|
|
148
|
+
: propPlaceholder.value;
|
|
147
149
|
});
|
|
148
150
|
|
|
149
151
|
const inputValue = ref(modelValue.value);
|
|
@@ -120,7 +120,9 @@ function handleInput() {
|
|
|
120
120
|
// Flushed after render, so the element's value (and validity) is up to date.
|
|
121
121
|
watch(() => props.modelValue, (value, previous) => {
|
|
122
122
|
if (value !== undefined && value !== previous) {
|
|
123
|
-
fieldContext.handleControlInput({
|
|
123
|
+
fieldContext.handleControlInput({
|
|
124
|
+
value: String(value),
|
|
125
|
+
});
|
|
124
126
|
}
|
|
125
127
|
}, { flush: 'post' });
|
|
126
128
|
|
package/src/Field/FieldRoot.vue
CHANGED
|
@@ -243,7 +243,10 @@ const serverError = computed(() => {
|
|
|
243
243
|
// leaves `serverError` unchanged by value, so that watcher alone would never
|
|
244
244
|
// fire. Also watch the parent `errors` object's identity so a fresh object —
|
|
245
245
|
// even with identical contents — re-shows the error.
|
|
246
|
-
watch([
|
|
246
|
+
watch([
|
|
247
|
+
serverError,
|
|
248
|
+
() => formContext?.serverErrors.value,
|
|
249
|
+
], () => {
|
|
247
250
|
clearedServerError.value = false;
|
|
248
251
|
});
|
|
249
252
|
|
|
@@ -251,10 +254,15 @@ const serverErrors = computed(() => {
|
|
|
251
254
|
if (clearedServerError.value || !serverError.value) {
|
|
252
255
|
return [];
|
|
253
256
|
}
|
|
254
|
-
return (Array.isArray(serverError.value)
|
|
257
|
+
return (Array.isArray(serverError.value)
|
|
258
|
+
? serverError.value
|
|
259
|
+
: [serverError.value]).filter(Boolean);
|
|
255
260
|
});
|
|
256
261
|
|
|
257
|
-
const errors = computed(() => [
|
|
262
|
+
const errors = computed(() => [
|
|
263
|
+
...validationErrors.value,
|
|
264
|
+
...serverErrors.value,
|
|
265
|
+
]);
|
|
258
266
|
|
|
259
267
|
// App-controlled invalidity (the `invalid` prop and server errors) applies even
|
|
260
268
|
// while disabled. Computed validity (native constraints and `validate`) doesn't,
|
|
@@ -271,8 +279,12 @@ const validity = computed<FieldValidityState>(() => ({ ...validationValidity.val
|
|
|
271
279
|
|
|
272
280
|
const dataAttributes = computed<FieldDataAttributes>(() => ({
|
|
273
281
|
'data-disabled': disabled.value ? '' : undefined,
|
|
274
|
-
'data-valid': valid.value === true
|
|
275
|
-
|
|
282
|
+
'data-valid': valid.value === true
|
|
283
|
+
? ''
|
|
284
|
+
: undefined,
|
|
285
|
+
'data-invalid': valid.value === false
|
|
286
|
+
? ''
|
|
287
|
+
: undefined,
|
|
276
288
|
'data-dirty': dirty.value ? '' : undefined,
|
|
277
289
|
'data-touched': touched.value ? '' : undefined,
|
|
278
290
|
'data-filled': filled.value ? '' : undefined,
|
|
@@ -281,7 +293,9 @@ const dataAttributes = computed<FieldDataAttributes>(() => ({
|
|
|
281
293
|
|
|
282
294
|
// --- Description / error id accumulation (deterministic: registration order) ---
|
|
283
295
|
const describedByIds = ref<Array<string>>([]);
|
|
284
|
-
const describedBy = computed(() => describedByIds.value.length
|
|
296
|
+
const describedBy = computed(() => describedByIds.value.length
|
|
297
|
+
? describedByIds.value.join(' ')
|
|
298
|
+
: undefined);
|
|
285
299
|
|
|
286
300
|
function registerDescription(id: string) {
|
|
287
301
|
describedByIds.value.push(id);
|
|
@@ -358,7 +372,9 @@ function resolveValue(detail?: FieldControlDetail) {
|
|
|
358
372
|
if (detail) {
|
|
359
373
|
return detail.value;
|
|
360
374
|
}
|
|
361
|
-
return control.value
|
|
375
|
+
return control.value
|
|
376
|
+
? control.value.getValue()
|
|
377
|
+
: lastReportedValue.value;
|
|
362
378
|
}
|
|
363
379
|
|
|
364
380
|
function getValiditySource() {
|