akar 2.0.8 → 2.0.10
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/dist/Autocomplete/AutocompleteInput.cjs +12 -16
- package/dist/Autocomplete/AutocompleteInput.cjs.map +1 -1
- package/dist/Autocomplete/AutocompleteInput.js +13 -17
- package/dist/Autocomplete/AutocompleteInput.js.map +1 -1
- package/dist/ColorField/ColorFieldInput.cjs +10 -2
- package/dist/ColorField/ColorFieldInput.cjs.map +1 -1
- package/dist/ColorField/ColorFieldInput.js +10 -2
- package/dist/ColorField/ColorFieldInput.js.map +1 -1
- package/dist/Combobox/ComboboxContent.cjs +4 -0
- package/dist/Combobox/ComboboxContent.cjs.map +1 -1
- package/dist/Combobox/ComboboxContent.js +4 -0
- package/dist/Combobox/ComboboxContent.js.map +1 -1
- package/dist/Combobox/ComboboxContentImpl.cjs +14 -2
- package/dist/Combobox/ComboboxContentImpl.cjs.map +1 -1
- package/dist/Combobox/ComboboxContentImpl.js +14 -2
- package/dist/Combobox/ComboboxContentImpl.js.map +1 -1
- package/dist/Combobox/ComboboxInput.cjs +21 -8
- package/dist/Combobox/ComboboxInput.cjs.map +1 -1
- package/dist/Combobox/ComboboxInput.js +22 -9
- package/dist/Combobox/ComboboxInput.js.map +1 -1
- package/dist/Combobox/ComboboxItem.cjs +11 -2
- package/dist/Combobox/ComboboxItem.cjs.map +1 -1
- package/dist/Combobox/ComboboxItem.js +12 -3
- package/dist/Combobox/ComboboxItem.js.map +1 -1
- package/dist/ContextMenu/ContextMenuContent.cjs +4 -0
- package/dist/ContextMenu/ContextMenuContent.cjs.map +1 -1
- package/dist/ContextMenu/ContextMenuContent.js +4 -0
- package/dist/ContextMenu/ContextMenuContent.js.map +1 -1
- package/dist/ContextMenu/ContextMenuSubContent.cjs +4 -0
- package/dist/ContextMenu/ContextMenuSubContent.cjs.map +1 -1
- package/dist/ContextMenu/ContextMenuSubContent.js +4 -0
- package/dist/ContextMenu/ContextMenuSubContent.js.map +1 -1
- package/dist/DateField/DateFieldInput.cjs +6 -1
- package/dist/DateField/DateFieldInput.cjs.map +1 -1
- package/dist/DateField/DateFieldInput.js +6 -1
- package/dist/DateField/DateFieldInput.js.map +1 -1
- package/dist/DateField/DateFieldRoot.cjs +8 -1
- package/dist/DateField/DateFieldRoot.cjs.map +1 -1
- package/dist/DateField/DateFieldRoot.js +8 -1
- package/dist/DateField/DateFieldRoot.js.map +1 -1
- package/dist/DatePicker/DatePickerContent.cjs +4 -0
- package/dist/DatePicker/DatePickerContent.cjs.map +1 -1
- package/dist/DatePicker/DatePickerContent.js +4 -0
- package/dist/DatePicker/DatePickerContent.js.map +1 -1
- package/dist/DatePicker/DatePickerRoot.cjs +19 -1
- package/dist/DatePicker/DatePickerRoot.cjs.map +1 -1
- package/dist/DatePicker/DatePickerRoot.js +19 -1
- package/dist/DatePicker/DatePickerRoot.js.map +1 -1
- package/dist/DateRangeField/DateRangeFieldInput.cjs +4 -1
- package/dist/DateRangeField/DateRangeFieldInput.cjs.map +1 -1
- package/dist/DateRangeField/DateRangeFieldInput.js +4 -1
- package/dist/DateRangeField/DateRangeFieldInput.js.map +1 -1
- package/dist/DateRangeField/DateRangeFieldRoot.cjs +1 -0
- package/dist/DateRangeField/DateRangeFieldRoot.cjs.map +1 -1
- package/dist/DateRangeField/DateRangeFieldRoot.js +1 -0
- package/dist/DateRangeField/DateRangeFieldRoot.js.map +1 -1
- package/dist/DateRangePicker/DateRangePickerContent.cjs +4 -0
- package/dist/DateRangePicker/DateRangePickerContent.cjs.map +1 -1
- package/dist/DateRangePicker/DateRangePickerContent.js +4 -0
- package/dist/DateRangePicker/DateRangePickerContent.js.map +1 -1
- package/dist/Dialog/DialogContent.cjs +2 -1
- package/dist/Dialog/DialogContent.cjs.map +1 -1
- package/dist/Dialog/DialogContent.js +2 -1
- package/dist/Dialog/DialogContent.js.map +1 -1
- package/dist/Dialog/DialogContentModal.cjs +4 -3
- package/dist/Dialog/DialogContentModal.cjs.map +1 -1
- package/dist/Dialog/DialogContentModal.js +4 -3
- package/dist/Dialog/DialogContentModal.js.map +1 -1
- package/dist/DismissableLayer/DismissableLayer.cjs +10 -9
- package/dist/DismissableLayer/DismissableLayer.cjs.map +1 -1
- package/dist/DismissableLayer/DismissableLayer.js +11 -10
- package/dist/DismissableLayer/DismissableLayer.js.map +1 -1
- package/dist/DropdownMenu/DropdownMenuContent.cjs +4 -0
- package/dist/DropdownMenu/DropdownMenuContent.cjs.map +1 -1
- package/dist/DropdownMenu/DropdownMenuContent.js +4 -0
- package/dist/DropdownMenu/DropdownMenuContent.js.map +1 -1
- package/dist/DropdownMenu/DropdownMenuFilter.cjs +22 -3
- package/dist/DropdownMenu/DropdownMenuFilter.cjs.map +1 -1
- package/dist/DropdownMenu/DropdownMenuFilter.js +22 -3
- package/dist/DropdownMenu/DropdownMenuFilter.js.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubContent.cjs +4 -0
- package/dist/DropdownMenu/DropdownMenuSubContent.cjs.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubContent.js +4 -0
- package/dist/DropdownMenu/DropdownMenuSubContent.js.map +1 -1
- package/dist/HoverCard/HoverCardContent.cjs +4 -0
- package/dist/HoverCard/HoverCardContent.cjs.map +1 -1
- package/dist/HoverCard/HoverCardContent.js +4 -0
- package/dist/HoverCard/HoverCardContent.js.map +1 -1
- package/dist/HoverCard/HoverCardContentImpl.cjs +4 -0
- package/dist/HoverCard/HoverCardContentImpl.cjs.map +1 -1
- package/dist/HoverCard/HoverCardContentImpl.js +4 -0
- package/dist/HoverCard/HoverCardContentImpl.js.map +1 -1
- package/dist/HoverCard/HoverCardRoot.cjs +15 -4
- package/dist/HoverCard/HoverCardRoot.cjs.map +1 -1
- package/dist/HoverCard/HoverCardRoot.js +15 -4
- package/dist/HoverCard/HoverCardRoot.js.map +1 -1
- package/dist/HoverCard/HoverCardTrigger.cjs +6 -0
- package/dist/HoverCard/HoverCardTrigger.cjs.map +1 -1
- package/dist/HoverCard/HoverCardTrigger.js +6 -0
- package/dist/HoverCard/HoverCardTrigger.js.map +1 -1
- package/dist/Listbox/ListboxFilter.cjs +32 -11
- package/dist/Listbox/ListboxFilter.cjs.map +1 -1
- package/dist/Listbox/ListboxFilter.js +33 -12
- package/dist/Listbox/ListboxFilter.js.map +1 -1
- package/dist/Listbox/ListboxRoot.cjs +16 -7
- package/dist/Listbox/ListboxRoot.cjs.map +1 -1
- package/dist/Listbox/ListboxRoot.js +16 -7
- package/dist/Listbox/ListboxRoot.js.map +1 -1
- package/dist/Listbox/ListboxVirtualizer.cjs +7 -3
- package/dist/Listbox/ListboxVirtualizer.cjs.map +1 -1
- package/dist/Listbox/ListboxVirtualizer.js +7 -3
- package/dist/Listbox/ListboxVirtualizer.js.map +1 -1
- package/dist/Menu/MenuContent.cjs +4 -0
- package/dist/Menu/MenuContent.cjs.map +1 -1
- package/dist/Menu/MenuContent.js +4 -0
- package/dist/Menu/MenuContent.js.map +1 -1
- package/dist/Menu/MenuContentImpl.cjs +4 -0
- package/dist/Menu/MenuContentImpl.cjs.map +1 -1
- package/dist/Menu/MenuContentImpl.js +4 -0
- package/dist/Menu/MenuContentImpl.js.map +1 -1
- package/dist/Menu/MenuRootContentModal.cjs +4 -0
- package/dist/Menu/MenuRootContentModal.cjs.map +1 -1
- package/dist/Menu/MenuRootContentModal.js +4 -0
- package/dist/Menu/MenuRootContentModal.js.map +1 -1
- package/dist/Menu/MenuRootContentNonModal.cjs +4 -0
- package/dist/Menu/MenuRootContentNonModal.cjs.map +1 -1
- package/dist/Menu/MenuRootContentNonModal.js +4 -0
- package/dist/Menu/MenuRootContentNonModal.js.map +1 -1
- package/dist/Menu/MenuSubContent.cjs +4 -0
- package/dist/Menu/MenuSubContent.cjs.map +1 -1
- package/dist/Menu/MenuSubContent.js +4 -0
- package/dist/Menu/MenuSubContent.js.map +1 -1
- package/dist/Menubar/MenubarContent.cjs +4 -0
- package/dist/Menubar/MenubarContent.cjs.map +1 -1
- package/dist/Menubar/MenubarContent.js +4 -0
- package/dist/Menubar/MenubarContent.js.map +1 -1
- package/dist/Menubar/MenubarSubContent.cjs +4 -0
- package/dist/Menubar/MenubarSubContent.cjs.map +1 -1
- package/dist/Menubar/MenubarSubContent.js +4 -0
- package/dist/Menubar/MenubarSubContent.js.map +1 -1
- package/dist/NumberField/NumberFieldInput.cjs +45 -13
- package/dist/NumberField/NumberFieldInput.cjs.map +1 -1
- package/dist/NumberField/NumberFieldInput.js +46 -14
- package/dist/NumberField/NumberFieldInput.js.map +1 -1
- package/dist/PinInput/PinInputInput.cjs +37 -2
- package/dist/PinInput/PinInputInput.cjs.map +1 -1
- package/dist/PinInput/PinInputInput.js +37 -2
- package/dist/PinInput/PinInputInput.js.map +1 -1
- package/dist/Popover/PopoverContent.cjs +4 -0
- package/dist/Popover/PopoverContent.cjs.map +1 -1
- package/dist/Popover/PopoverContent.js +4 -0
- package/dist/Popover/PopoverContent.js.map +1 -1
- package/dist/Popover/PopoverContentImpl.cjs +4 -0
- package/dist/Popover/PopoverContentImpl.cjs.map +1 -1
- package/dist/Popover/PopoverContentImpl.js +4 -0
- package/dist/Popover/PopoverContentImpl.js.map +1 -1
- package/dist/Popover/PopoverContentModal.cjs +4 -0
- package/dist/Popover/PopoverContentModal.cjs.map +1 -1
- package/dist/Popover/PopoverContentModal.js +4 -0
- package/dist/Popover/PopoverContentModal.js.map +1 -1
- package/dist/Popover/PopoverContentNonModal.cjs +4 -0
- package/dist/Popover/PopoverContentNonModal.cjs.map +1 -1
- package/dist/Popover/PopoverContentNonModal.js +4 -0
- package/dist/Popover/PopoverContentNonModal.js.map +1 -1
- package/dist/Popper/PopperContent.cjs +36 -3
- package/dist/Popper/PopperContent.cjs.map +1 -1
- package/dist/Popper/PopperContent.js +37 -4
- package/dist/Popper/PopperContent.js.map +1 -1
- package/dist/Select/SelectContent.cjs +4 -0
- package/dist/Select/SelectContent.cjs.map +1 -1
- package/dist/Select/SelectContent.js +4 -0
- package/dist/Select/SelectContent.js.map +1 -1
- package/dist/Select/SelectContentImpl.cjs +4 -0
- package/dist/Select/SelectContentImpl.cjs.map +1 -1
- package/dist/Select/SelectContentImpl.js +4 -0
- package/dist/Select/SelectContentImpl.js.map +1 -1
- package/dist/Select/SelectPopperPosition.cjs +4 -0
- package/dist/Select/SelectPopperPosition.cjs.map +1 -1
- package/dist/Select/SelectPopperPosition.js +4 -0
- package/dist/Select/SelectPopperPosition.js.map +1 -1
- package/dist/Select/SelectRoot.cjs +10 -5
- package/dist/Select/SelectRoot.cjs.map +1 -1
- package/dist/Select/SelectRoot.js +10 -5
- package/dist/Select/SelectRoot.js.map +1 -1
- package/dist/Select/SelectTrigger.cjs +25 -14
- package/dist/Select/SelectTrigger.cjs.map +1 -1
- package/dist/Select/SelectTrigger.js +25 -14
- package/dist/Select/SelectTrigger.js.map +1 -1
- package/dist/Tabs/TabsIndicator.cjs +7 -3
- package/dist/Tabs/TabsIndicator.cjs.map +1 -1
- package/dist/Tabs/TabsIndicator.js +7 -3
- package/dist/Tabs/TabsIndicator.js.map +1 -1
- package/dist/TagsInput/TagsInputInput.cjs +12 -13
- package/dist/TagsInput/TagsInputInput.cjs.map +1 -1
- package/dist/TagsInput/TagsInputInput.js +13 -14
- package/dist/TagsInput/TagsInputInput.js.map +1 -1
- package/dist/TagsInput/TagsInputRoot.cjs +1 -0
- package/dist/TagsInput/TagsInputRoot.cjs.map +1 -1
- package/dist/TagsInput/TagsInputRoot.js +1 -0
- package/dist/TagsInput/TagsInputRoot.js.map +1 -1
- package/dist/TimeField/TimeFieldInput.cjs +4 -1
- package/dist/TimeField/TimeFieldInput.cjs.map +1 -1
- package/dist/TimeField/TimeFieldInput.js +4 -1
- package/dist/TimeField/TimeFieldInput.js.map +1 -1
- package/dist/TimeField/TimeFieldRoot.cjs +1 -0
- package/dist/TimeField/TimeFieldRoot.cjs.map +1 -1
- package/dist/TimeField/TimeFieldRoot.js +1 -0
- package/dist/TimeField/TimeFieldRoot.js.map +1 -1
- package/dist/TimeRangeField/TimeRangeFieldInput.cjs +4 -1
- package/dist/TimeRangeField/TimeRangeFieldInput.cjs.map +1 -1
- package/dist/TimeRangeField/TimeRangeFieldInput.js +4 -1
- package/dist/TimeRangeField/TimeRangeFieldInput.js.map +1 -1
- package/dist/TimeRangeField/TimeRangeFieldRoot.cjs +1 -0
- package/dist/TimeRangeField/TimeRangeFieldRoot.cjs.map +1 -1
- package/dist/TimeRangeField/TimeRangeFieldRoot.js +1 -0
- package/dist/TimeRangeField/TimeRangeFieldRoot.js.map +1 -1
- package/dist/Tree/TreeItem.cjs +18 -2
- package/dist/Tree/TreeItem.cjs.map +1 -1
- package/dist/Tree/TreeItem.js +18 -2
- package/dist/Tree/TreeItem.js.map +1 -1
- package/dist/Tree/TreeVirtualizer.cjs +2 -1
- package/dist/Tree/TreeVirtualizer.cjs.map +1 -1
- package/dist/Tree/TreeVirtualizer.js +2 -1
- package/dist/Tree/TreeVirtualizer.js.map +1 -1
- package/dist/date/useDateField.cjs +38 -0
- package/dist/date/useDateField.cjs.map +1 -1
- package/dist/date/useDateField.js +38 -0
- package/dist/date/useDateField.js.map +1 -1
- package/dist/date/utils.cjs +1 -1
- package/dist/date/utils.cjs.map +1 -1
- package/dist/date/utils.js +1 -1
- package/dist/date/utils.js.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.js +1 -0
- package/dist/index2.d.ts.map +1 -1
- package/dist/index3.d.cts +41 -13
- package/dist/index3.d.cts.map +1 -1
- package/dist/index3.d.ts +37 -8
- package/dist/index3.d.ts.map +1 -1
- package/dist/index4.d.cts +674 -655
- package/dist/index4.d.cts.map +1 -1
- package/dist/index4.d.ts +666 -647
- package/dist/index4.d.ts.map +1 -1
- package/dist/internal.cjs +1 -0
- package/dist/internal.d.cts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +1 -0
- package/dist/shared/useComposing.cjs +30 -0
- package/dist/shared/useComposing.cjs.map +1 -0
- package/dist/shared/useComposing.js +24 -0
- package/dist/shared/useComposing.js.map +1 -0
- package/dist/shared/useEmitAsProps.cjs +4 -0
- package/dist/shared/useEmitAsProps.cjs.map +1 -1
- package/dist/shared/useEmitAsProps.js +4 -0
- package/dist/shared/useEmitAsProps.js.map +1 -1
- package/dist/shared/useForwardPropsEmits.cjs +0 -12
- package/dist/shared/useForwardPropsEmits.cjs.map +1 -1
- package/dist/shared/useForwardPropsEmits.js +0 -12
- package/dist/shared/useForwardPropsEmits.js.map +1 -1
- package/dist/shared/useId.cjs +6 -7
- package/dist/shared/useId.cjs.map +1 -1
- package/dist/shared/useId.js +6 -7
- package/dist/shared/useId.js.map +1 -1
- package/dist/shared.cjs +2 -0
- package/dist/shared.d.cts +2 -2
- package/dist/shared.d.ts +2 -2
- package/dist/shared.js +2 -1
- package/package.json +6 -5
- package/src/Autocomplete/AutocompleteInput.vue +14 -18
- package/src/ColorField/ColorFieldInput.vue +16 -1
- package/src/Combobox/ComboboxContentImpl.vue +21 -4
- package/src/Combobox/ComboboxInput.vue +32 -9
- package/src/Combobox/ComboboxItem.vue +1 -0
- package/src/DateField/DateFieldInput.vue +12 -1
- package/src/DateField/DateFieldRoot.vue +23 -8
- package/src/DatePicker/DatePickerRoot.vue +18 -2
- package/src/DateRangeField/DateRangeFieldInput.vue +6 -0
- package/src/DateRangeField/DateRangeFieldRoot.vue +5 -0
- package/src/Dialog/DialogContent.vue +10 -1
- package/src/Dialog/DialogContentModal.vue +7 -2
- package/src/DismissableLayer/DismissableLayer.vue +39 -21
- package/src/DropdownMenu/DropdownMenuFilter.vue +37 -11
- package/src/HoverCard/HoverCardRoot.vue +13 -3
- package/src/HoverCard/HoverCardTrigger.vue +13 -0
- package/src/Listbox/ListboxFilter.vue +51 -14
- package/src/Listbox/ListboxRoot.vue +27 -8
- package/src/Listbox/ListboxVirtualizer.vue +19 -3
- package/src/NumberField/NumberFieldInput.vue +46 -8
- package/src/PinInput/PinInputInput.vue +50 -1
- package/src/Popper/PopperContent.vue +32 -1
- package/src/Select/SelectRoot.vue +11 -5
- package/src/Select/SelectTrigger.vue +52 -32
- package/src/Tabs/TabsIndicator.vue +5 -0
- package/src/TagsInput/TagsInputInput.vue +19 -14
- package/src/TagsInput/TagsInputRoot.vue +5 -0
- package/src/TimeField/TimeFieldInput.vue +6 -0
- package/src/TimeField/TimeFieldRoot.vue +5 -0
- package/src/TimeRangeField/TimeRangeFieldInput.vue +6 -0
- package/src/TimeRangeField/TimeRangeFieldRoot.vue +5 -0
- package/src/Tree/TreeItem.vue +26 -0
- package/src/Tree/TreeVirtualizer.vue +4 -1
- package/src/shared/date/useDateField.ts +81 -1
- package/src/shared/date/utils.ts +1 -1
- package/src/shared/index.ts +2 -1
- package/src/shared/useComposing.ts +18 -0
- package/src/shared/useEmitAsProps.test-d.ts +79 -0
- package/src/shared/useEmitAsProps.ts +82 -4
- package/src/shared/useForwardProps.ts +1 -1
- package/src/shared/useForwardPropsEmits.ts +17 -2
- package/src/shared/useId.ts +12 -5
package/dist/internal.cjs
CHANGED
|
@@ -11,6 +11,7 @@ require('./shared/trap-focus.cjs');
|
|
|
11
11
|
require('./shared/useArrowNavigation.cjs');
|
|
12
12
|
require('./ConfigProvider/ConfigProvider.cjs');
|
|
13
13
|
require('./shared/useBodyScrollLock.cjs');
|
|
14
|
+
require('./shared/useComposing.cjs');
|
|
14
15
|
require('./date/comparators.cjs');
|
|
15
16
|
require('./date/calendar.cjs');
|
|
16
17
|
require('./date/index.cjs');
|
package/dist/internal.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./index2.cjs";
|
|
2
2
|
import "./index3.cjs";
|
|
3
3
|
import { MenuArrowProps, MenuCheckboxItemEmits, MenuCheckboxItemProps, MenuContentEmits, MenuContentProps, MenuEmits, MenuGroupProps, MenuItemEmits, MenuItemIndicatorProps, MenuItemProps, MenuLabelProps, MenuPortalProps, MenuProps, MenuRadioGroupEmits, MenuRadioGroupProps, MenuRadioItemEmits, MenuRadioItemProps, MenuSeparatorProps, MenuSubContentEmits, MenuSubContentProps, MenuSubEmits, MenuSubProps, MenuSubTriggerProps, PopperAnchorProps, _default$277 as _default$13, _default$278 as _default$8, _default$279 as _default, _default$280 as _default$6, _default$281 as _default$10, _default$282 as _default$3, _default$283 as _default$14, _default$284 as _default$12, _default$285 as _default$2, _default$286 as _default$1, _default$287 as _default$11, _default$288 as _default$7, _default$290 as _default$9, _default$291 as _default$4, _default$292 as _default$5, injectMenuContext, injectMenuRootContext } from "./index4.cjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as vue69 from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/Menu/MenuAnchor.vue.d.ts
|
|
7
7
|
interface MenuAnchorProps extends PopperAnchorProps {}
|
|
@@ -9,7 +9,7 @@ declare var __VLS_8: {};
|
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_8) => any;
|
|
11
11
|
};
|
|
12
|
-
declare const __VLS_base:
|
|
12
|
+
declare const __VLS_base: vue69.DefineComponent<MenuAnchorProps, {}, {}, {}, {}, vue69.ComponentOptionsMixin, vue69.ComponentOptionsMixin, {}, string, vue69.PublicProps, Readonly<MenuAnchorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue69.ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
14
|
declare const _default$15: typeof __VLS_export;
|
|
15
15
|
type __VLS_WithSlots<T, S> = T & {
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./index2.js";
|
|
2
2
|
import "./index3.js";
|
|
3
3
|
import { MenuArrowProps, MenuCheckboxItemEmits, MenuCheckboxItemProps, MenuContentEmits, MenuContentProps, MenuEmits, MenuGroupProps, MenuItemEmits, MenuItemIndicatorProps, MenuItemProps, MenuLabelProps, MenuPortalProps, MenuProps, MenuRadioGroupEmits, MenuRadioGroupProps, MenuRadioItemEmits, MenuRadioItemProps, MenuSeparatorProps, MenuSubContentEmits, MenuSubContentProps, MenuSubEmits, MenuSubProps, MenuSubTriggerProps, PopperAnchorProps, _default$277 as _default$13, _default$278 as _default$8, _default$279 as _default, _default$280 as _default$6, _default$281 as _default$10, _default$282 as _default$3, _default$283 as _default$14, _default$284 as _default$12, _default$285 as _default$2, _default$286 as _default$1, _default$287 as _default$11, _default$288 as _default$7, _default$290 as _default$9, _default$291 as _default$4, _default$292 as _default$5, injectMenuContext, injectMenuRootContext } from "./index4.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as vue23 from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/Menu/MenuAnchor.vue.d.ts
|
|
7
7
|
interface MenuAnchorProps extends PopperAnchorProps {}
|
|
@@ -9,7 +9,7 @@ declare var __VLS_8: {};
|
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_8) => any;
|
|
11
11
|
};
|
|
12
|
-
declare const __VLS_base:
|
|
12
|
+
declare const __VLS_base: vue23.DefineComponent<MenuAnchorProps, {}, {}, {}, {}, vue23.ComponentOptionsMixin, vue23.ComponentOptionsMixin, {}, string, vue23.PublicProps, Readonly<MenuAnchorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue23.ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
14
|
declare const _default$15: typeof __VLS_export;
|
|
15
15
|
type __VLS_WithSlots<T, S> = T & {
|
package/dist/internal.js
CHANGED
|
@@ -11,6 +11,7 @@ import "./shared/trap-focus.js";
|
|
|
11
11
|
import "./shared/useArrowNavigation.js";
|
|
12
12
|
import "./ConfigProvider/ConfigProvider.js";
|
|
13
13
|
import "./shared/useBodyScrollLock.js";
|
|
14
|
+
import "./shared/useComposing.js";
|
|
14
15
|
import "./date/comparators.js";
|
|
15
16
|
import "./date/calendar.js";
|
|
16
17
|
import "./date/index.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../rolldown-runtime.cjs');
|
|
2
|
+
const vue = require_rolldown_runtime.__toESM(require("vue"));
|
|
3
|
+
|
|
4
|
+
//#region src/shared/useComposing.ts
|
|
5
|
+
function useComposing(onEnd) {
|
|
6
|
+
const isComposing = (0, vue.ref)(false);
|
|
7
|
+
function handleCompositionStart() {
|
|
8
|
+
isComposing.value = true;
|
|
9
|
+
}
|
|
10
|
+
function handleCompositionEnd(event) {
|
|
11
|
+
(0, vue.nextTick)(() => {
|
|
12
|
+
isComposing.value = false;
|
|
13
|
+
onEnd?.(event);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
isComposing,
|
|
18
|
+
handleCompositionStart,
|
|
19
|
+
handleCompositionEnd
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
Object.defineProperty(exports, 'useComposing', {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return useComposing;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=useComposing.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useComposing.cjs","names":["onEnd?: (event: CompositionEvent) => void","event: CompositionEvent"],"sources":["../../src/shared/useComposing.ts"],"sourcesContent":[],"mappings":";;;;AAEA,SAAgB,aAAaA,OAA2C;CACtE,MAAM,cAAc,aAAI,MAAM;CAE9B,SAAS,yBAAyB;AAChC,cAAY,QAAQ;CACrB;CAED,SAAS,qBAAqBC,OAAyB;AACrD,oBAAS,MAAM;AACb,eAAY,QAAQ;AACpB,WAAQ,MAAM;EACf,EAAC;CACH;AAED,QAAO;EAAE;EAAa;EAAwB;CAAsB;AACrE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { nextTick, ref } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/shared/useComposing.ts
|
|
4
|
+
function useComposing(onEnd) {
|
|
5
|
+
const isComposing = ref(false);
|
|
6
|
+
function handleCompositionStart() {
|
|
7
|
+
isComposing.value = true;
|
|
8
|
+
}
|
|
9
|
+
function handleCompositionEnd(event) {
|
|
10
|
+
nextTick(() => {
|
|
11
|
+
isComposing.value = false;
|
|
12
|
+
onEnd?.(event);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
isComposing,
|
|
17
|
+
handleCompositionStart,
|
|
18
|
+
handleCompositionEnd
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { useComposing };
|
|
24
|
+
//# sourceMappingURL=useComposing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useComposing.js","names":["onEnd?: (event: CompositionEvent) => void","event: CompositionEvent"],"sources":["../../src/shared/useComposing.ts"],"sourcesContent":[],"mappings":";;;AAEA,SAAgB,aAAaA,OAA2C;CACtE,MAAM,cAAc,IAAI,MAAM;CAE9B,SAAS,yBAAyB;AAChC,cAAY,QAAQ;CACrB;CAED,SAAS,qBAAqBC,OAAyB;AACrD,WAAS,MAAM;AACb,eAAY,QAAQ;AACpB,WAAQ,MAAM;EACf,EAAC;CACH;AAED,QAAO;EAAE;EAAa;EAAwB;CAAsB;AACrE"}
|
|
@@ -5,6 +5,10 @@ const vue = require_rolldown_runtime.__toESM(require("vue"));
|
|
|
5
5
|
/**
|
|
6
6
|
* The `useEmitAsProps` function is a TypeScript utility that converts emitted events into props for a
|
|
7
7
|
* Vue component.
|
|
8
|
+
*
|
|
9
|
+
* @template Name - The event name string union type.
|
|
10
|
+
* @template Fn - The emit function type.
|
|
11
|
+
*
|
|
8
12
|
* @param emit - The `emit` parameter is a function that is used to emit events from a component. It
|
|
9
13
|
* takes two parameters: `name` which is the name of the event to be emitted, and `...args` which are
|
|
10
14
|
* the arguments to be passed along with the event.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmitAsProps.cjs","names":["emit:
|
|
1
|
+
{"version":3,"file":"useEmitAsProps.cjs","names":["emit: Emit<Name, Fn>","result: Record<string, any>"],"sources":["../../src/shared/useEmitAsProps.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;AAkBA,SAAgB,eAA8DA,MAAsB;CAClG,MAAM,KAAK,6BAAoB;CAE/B,MAAM,SAAS,IAAI,KAAK;CACxB,MAAMC,SAA8B,CAAE;AAEtC,MAAK,QAAQ,OACX,SAAQ,KACN,CAAC,gDAAgD,EAAE,IAAI,KAAK,QAAQ,CACrE;AAGH,SAAQ,QAAQ,CAAC,OAAO;AACtB,SAAO,sBAAa,kBAAS,GAAG,CAAC,IAAI,CAAC,GAAG,QAAa,KAAK,IAAI,GAAG,IAAI;CACvE,EAAC;AAEF,QAAO;AACR"}
|
|
@@ -4,6 +4,10 @@ import { camelize, getCurrentInstance, toHandlerKey } from "vue";
|
|
|
4
4
|
/**
|
|
5
5
|
* The `useEmitAsProps` function is a TypeScript utility that converts emitted events into props for a
|
|
6
6
|
* Vue component.
|
|
7
|
+
*
|
|
8
|
+
* @template Name - The event name string union type.
|
|
9
|
+
* @template Fn - The emit function type.
|
|
10
|
+
*
|
|
7
11
|
* @param emit - The `emit` parameter is a function that is used to emit events from a component. It
|
|
8
12
|
* takes two parameters: `name` which is the name of the event to be emitted, and `...args` which are
|
|
9
13
|
* the arguments to be passed along with the event.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmitAsProps.js","names":["emit:
|
|
1
|
+
{"version":3,"file":"useEmitAsProps.js","names":["emit: Emit<Name, Fn>","result: Record<string, any>"],"sources":["../../src/shared/useEmitAsProps.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;AAkBA,SAAgB,eAA8DA,MAAsB;CAClG,MAAM,KAAK,oBAAoB;CAE/B,MAAM,SAAS,IAAI,KAAK;CACxB,MAAMC,SAA8B,CAAE;AAEtC,MAAK,QAAQ,OACX,SAAQ,KACN,CAAC,gDAAgD,EAAE,IAAI,KAAK,QAAQ,CACrE;AAGH,SAAQ,QAAQ,CAAC,OAAO;AACtB,SAAO,aAAa,SAAS,GAAG,CAAC,IAAI,CAAC,GAAG,QAAa,KAAK,IAAI,GAAG,IAAI;CACvE,EAAC;AAEF,QAAO;AACR"}
|
|
@@ -4,18 +4,6 @@ const require_shared_useForwardProps = require('./useForwardProps.cjs');
|
|
|
4
4
|
const vue = require_rolldown_runtime.__toESM(require("vue"));
|
|
5
5
|
|
|
6
6
|
//#region src/shared/useForwardPropsEmits.ts
|
|
7
|
-
/**
|
|
8
|
-
* The function `useForwardPropsEmits` takes in props and an optional emit function, and returns a
|
|
9
|
-
* computed object that combines the parsed props and emits as props.
|
|
10
|
-
* @param props - The `props` parameter is of type `T`, which is a generic type that extends the
|
|
11
|
-
* parameters of the `useForwardProps` function. It represents the props object that is passed to the
|
|
12
|
-
* `useForwardProps` function.
|
|
13
|
-
* @param [emit] - The `emit` parameter is a function that can be used to emit events. It takes two
|
|
14
|
-
* arguments: `name`, which is the name of the event to be emitted, and `args`, which are the arguments
|
|
15
|
-
* to be passed along with the event.
|
|
16
|
-
* @returns a computed property that combines the parsed
|
|
17
|
-
* props and emits as props.
|
|
18
|
-
*/
|
|
19
7
|
function useForwardPropsEmits(props, emit) {
|
|
20
8
|
const parsedProps = require_shared_useForwardProps.useForwardProps(props);
|
|
21
9
|
const emitsAsProps = emit ? require_shared_useEmitAsProps.useEmitAsProps(emit) : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useForwardPropsEmits.cjs","names":["props: MaybeRefOrGetter<T>","emit?:
|
|
1
|
+
{"version":3,"file":"useForwardPropsEmits.cjs","names":["props: MaybeRefOrGetter<T>","emit?: Emit<Name, Fn>"],"sources":["../../src/shared/useForwardPropsEmits.ts"],"sourcesContent":[],"mappings":";;;;;;AA4BA,SAAgB,qBAIdA,OAA4BC,MAAuB;CACnD,MAAM,cAAc,+CAAgB,MAAM;CAC1C,MAAM,eAAe,OAAO,6CAAe,KAAK,GAAG,CAAE;AAErD,QAAO,kBAAS,OAAO;EACrB,GAAG,YAAY;EACf,GAAG;CACJ,GAAE;AACJ"}
|
|
@@ -3,18 +3,6 @@ import { useForwardProps } from "./useForwardProps.js";
|
|
|
3
3
|
import { computed } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/shared/useForwardPropsEmits.ts
|
|
6
|
-
/**
|
|
7
|
-
* The function `useForwardPropsEmits` takes in props and an optional emit function, and returns a
|
|
8
|
-
* computed object that combines the parsed props and emits as props.
|
|
9
|
-
* @param props - The `props` parameter is of type `T`, which is a generic type that extends the
|
|
10
|
-
* parameters of the `useForwardProps` function. It represents the props object that is passed to the
|
|
11
|
-
* `useForwardProps` function.
|
|
12
|
-
* @param [emit] - The `emit` parameter is a function that can be used to emit events. It takes two
|
|
13
|
-
* arguments: `name`, which is the name of the event to be emitted, and `args`, which are the arguments
|
|
14
|
-
* to be passed along with the event.
|
|
15
|
-
* @returns a computed property that combines the parsed
|
|
16
|
-
* props and emits as props.
|
|
17
|
-
*/
|
|
18
6
|
function useForwardPropsEmits(props, emit) {
|
|
19
7
|
const parsedProps = useForwardProps(props);
|
|
20
8
|
const emitsAsProps = emit ? useEmitAsProps(emit) : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useForwardPropsEmits.js","names":["props: MaybeRefOrGetter<T>","emit?:
|
|
1
|
+
{"version":3,"file":"useForwardPropsEmits.js","names":["props: MaybeRefOrGetter<T>","emit?: Emit<Name, Fn>"],"sources":["../../src/shared/useForwardPropsEmits.ts"],"sourcesContent":[],"mappings":";;;;;AA4BA,SAAgB,qBAIdA,OAA4BC,MAAuB;CACnD,MAAM,cAAc,gBAAgB,MAAM;CAC1C,MAAM,eAAe,OAAO,eAAe,KAAK,GAAG,CAAE;AAErD,QAAO,SAAS,OAAO;EACrB,GAAG,YAAY;EACf,GAAG;CACJ,GAAE;AACJ"}
|
package/dist/shared/useId.cjs
CHANGED
|
@@ -6,20 +6,19 @@ const vue = require_rolldown_runtime.__toESM(require("vue"));
|
|
|
6
6
|
let count = 0;
|
|
7
7
|
/**
|
|
8
8
|
* The `useId` function generates a unique identifier using a provided deterministic ID or a default
|
|
9
|
-
*
|
|
9
|
+
* a configured `<ConfigProvider>` ID source, Vue's native `useId`, or a fallback counter.
|
|
10
10
|
* @param [deterministicId] - The `useId` function you provided takes an
|
|
11
11
|
* optional parameter `deterministicId`, which can be a string, null, or undefined. If
|
|
12
12
|
* `deterministicId` is provided, the function will return it. Otherwise, it will generate an id using
|
|
13
|
-
* the
|
|
13
|
+
* the configured ID source.
|
|
14
14
|
*/
|
|
15
15
|
function useId(deterministicId, prefix = "akar") {
|
|
16
16
|
if (deterministicId) return deterministicId;
|
|
17
17
|
let id;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
18
|
+
const configProviderContext = require_ConfigProvider_ConfigProvider.injectConfigProviderContext({ useId: void 0 });
|
|
19
|
+
if (configProviderContext.useId) id = configProviderContext.useId();
|
|
20
|
+
else if ("useId" in vue) id = vue.useId?.();
|
|
21
|
+
else id = `${++count}`;
|
|
23
22
|
return prefix ? `${prefix}-${id}` : id;
|
|
24
23
|
}
|
|
25
24
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useId.cjs","names":["deterministicId?: string | null | undefined","id: string"],"sources":["../../src/shared/useId.ts"],"sourcesContent":[],"mappings":";;;;;AAKA,IAAI,QAAQ;;;;;;;;;AASZ,SAAgB,MAAMA,iBAA6C,SAAS,QAAQ;AAClF,KAAI,gBACF,QAAO;CAGT,IAAIC;
|
|
1
|
+
{"version":3,"file":"useId.cjs","names":["deterministicId?: string | null | undefined","id: string"],"sources":["../../src/shared/useId.ts"],"sourcesContent":[],"mappings":";;;;;AAKA,IAAI,QAAQ;;;;;;;;;AASZ,SAAgB,MAAMA,iBAA6C,SAAS,QAAQ;AAClF,KAAI,gBACF,QAAO;CAGT,IAAIC;CACJ,MAAM,wBAAwB,kEAA4B,EAAE,cAAkB,EAAC;AAM/E,KAAI,sBAAsB,MACxB,MAAK,sBAAsB,OAAO;UACzB,WAAW,IACpB,MAAK,IAAI,SAAS;KAElB,MAAK,GAAG,EAAE,OAAO;AAGnB,QAAO,SAAS,GAAG,OAAO,CAAC,EAAE,IAAI,GAAG;AACrC"}
|
package/dist/shared/useId.js
CHANGED
|
@@ -5,20 +5,19 @@ import * as vue from "vue";
|
|
|
5
5
|
let count = 0;
|
|
6
6
|
/**
|
|
7
7
|
* The `useId` function generates a unique identifier using a provided deterministic ID or a default
|
|
8
|
-
*
|
|
8
|
+
* a configured `<ConfigProvider>` ID source, Vue's native `useId`, or a fallback counter.
|
|
9
9
|
* @param [deterministicId] - The `useId` function you provided takes an
|
|
10
10
|
* optional parameter `deterministicId`, which can be a string, null, or undefined. If
|
|
11
11
|
* `deterministicId` is provided, the function will return it. Otherwise, it will generate an id using
|
|
12
|
-
* the
|
|
12
|
+
* the configured ID source.
|
|
13
13
|
*/
|
|
14
14
|
function useId(deterministicId, prefix = "akar") {
|
|
15
15
|
if (deterministicId) return deterministicId;
|
|
16
16
|
let id;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
17
|
+
const configProviderContext = injectConfigProviderContext({ useId: void 0 });
|
|
18
|
+
if (configProviderContext.useId) id = configProviderContext.useId();
|
|
19
|
+
else if ("useId" in vue) id = vue.useId?.();
|
|
20
|
+
else id = `${++count}`;
|
|
22
21
|
return prefix ? `${prefix}-${id}` : id;
|
|
23
22
|
}
|
|
24
23
|
|
package/dist/shared/useId.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useId.js","names":["deterministicId?: string | null | undefined","id: string"],"sources":["../../src/shared/useId.ts"],"sourcesContent":[],"mappings":";;;;AAKA,IAAI,QAAQ;;;;;;;;;AASZ,SAAgB,MAAMA,iBAA6C,SAAS,QAAQ;AAClF,KAAI,gBACF,QAAO;CAGT,IAAIC;
|
|
1
|
+
{"version":3,"file":"useId.js","names":["deterministicId?: string | null | undefined","id: string"],"sources":["../../src/shared/useId.ts"],"sourcesContent":[],"mappings":";;;;AAKA,IAAI,QAAQ;;;;;;;;;AASZ,SAAgB,MAAMA,iBAA6C,SAAS,QAAQ;AAClF,KAAI,gBACF,QAAO;CAGT,IAAIC;CACJ,MAAM,wBAAwB,4BAA4B,EAAE,cAAkB,EAAC;AAM/E,KAAI,sBAAsB,MACxB,MAAK,sBAAsB,OAAO;UACzB,WAAW,IACpB,MAAK,IAAI,SAAS;KAElB,MAAK,GAAG,EAAE,OAAO;AAGnB,QAAO,SAAS,GAAG,OAAO,CAAC,EAAE,IAAI,GAAG;AACrC"}
|
package/dist/shared.cjs
CHANGED
|
@@ -11,6 +11,7 @@ const require_shared_trap_focus = require('./shared/trap-focus.cjs');
|
|
|
11
11
|
const require_shared_useArrowNavigation = require('./shared/useArrowNavigation.cjs');
|
|
12
12
|
require('./ConfigProvider/ConfigProvider.cjs');
|
|
13
13
|
const require_shared_useBodyScrollLock = require('./shared/useBodyScrollLock.cjs');
|
|
14
|
+
const require_shared_useComposing = require('./shared/useComposing.cjs');
|
|
14
15
|
require('./date/comparators.cjs');
|
|
15
16
|
require('./date/calendar.cjs');
|
|
16
17
|
require('./date/index.cjs');
|
|
@@ -50,6 +51,7 @@ exports.snapValueToStep = require_shared_clamp.snapValueToStep;
|
|
|
50
51
|
exports.trapFocus = require_shared_trap_focus.trapFocus;
|
|
51
52
|
exports.useArrowNavigation = require_shared_useArrowNavigation.useArrowNavigation;
|
|
52
53
|
exports.useBodyScrollLock = require_shared_useBodyScrollLock.useBodyScrollLock;
|
|
54
|
+
exports.useComposing = require_shared_useComposing.useComposing;
|
|
53
55
|
exports.useDateFormatter = require_shared_useDateFormatter.useDateFormatter;
|
|
54
56
|
exports.useDirection = require_shared_useDirection.useDirection;
|
|
55
57
|
exports.useEmitAsProps = require_shared_useEmitAsProps.useEmitAsProps;
|
package/dist/shared.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DateRange, DateStep, DateValue, Formatter, SegmentPart, TimeRange, TimeValue, areEqual, createContext, findValuesBetween, getActiveElement, handleAndDispatchCustomEvent, isValidVNodeElement, isValueEqualOrExist, onFocusOutside, renderSlotFragments, roundToStepPrecision, snapValueToStep, trapFocus, useArrowNavigation, useBodyScrollLock, useDateFormatter, useDirection, useEmitAsProps, useFilter, useFocusGuards, useFormControl, useForwardExpose, useForwardProps, useForwardPropsEmits, useForwardRef, useGraceArea, useHideOthers, useId, useLocale, useSelectionBehavior, useSize, useStateMachine, useTestKbd, useTypeahead, withDefault } from "./index3.cjs";
|
|
2
|
-
export { DateRange, DateStep, DateValue, Formatter, SegmentPart, TimeRange, TimeValue, areEqual, createContext, findValuesBetween, getActiveElement, handleAndDispatchCustomEvent, isValidVNodeElement, isValueEqualOrExist, onFocusOutside, renderSlotFragments, roundToStepPrecision, snapValueToStep, trapFocus, useArrowNavigation, useBodyScrollLock, useDateFormatter, useDirection, useEmitAsProps, useFilter, useFocusGuards, useFormControl, useForwardExpose, useForwardProps, useForwardPropsEmits, useForwardRef, useGraceArea, useHideOthers, useId, useLocale, useSelectionBehavior, useSize, useStateMachine, useTestKbd, useTypeahead, withDefault };
|
|
1
|
+
import { DateRange, DateStep, DateValue, EmitAsProps, Formatter, SegmentPart, TimeRange, TimeValue, areEqual, createContext, findValuesBetween, getActiveElement, handleAndDispatchCustomEvent, isValidVNodeElement, isValueEqualOrExist, onFocusOutside, renderSlotFragments, roundToStepPrecision, snapValueToStep, trapFocus, useArrowNavigation, useBodyScrollLock, useComposing, useDateFormatter, useDirection, useEmitAsProps, useFilter, useFocusGuards, useFormControl, useForwardExpose, useForwardProps, useForwardPropsEmits, useForwardRef, useGraceArea, useHideOthers, useId, useLocale, useSelectionBehavior, useSize, useStateMachine, useTestKbd, useTypeahead, withDefault } from "./index3.cjs";
|
|
2
|
+
export { DateRange, DateStep, DateValue, EmitAsProps, Formatter, SegmentPart, TimeRange, TimeValue, areEqual, createContext, findValuesBetween, getActiveElement, handleAndDispatchCustomEvent, isValidVNodeElement, isValueEqualOrExist, onFocusOutside, renderSlotFragments, roundToStepPrecision, snapValueToStep, trapFocus, useArrowNavigation, useBodyScrollLock, useComposing, useDateFormatter, useDirection, useEmitAsProps, useFilter, useFocusGuards, useFormControl, useForwardExpose, useForwardProps, useForwardPropsEmits, useForwardRef, useGraceArea, useHideOthers, useId, useLocale, useSelectionBehavior, useSize, useStateMachine, useTestKbd, useTypeahead, withDefault };
|
package/dist/shared.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DateRange, DateStep, DateValue, Formatter, SegmentPart, TimeRange, TimeValue, areEqual, createContext, findValuesBetween, getActiveElement, handleAndDispatchCustomEvent, isValidVNodeElement, isValueEqualOrExist, onFocusOutside, renderSlotFragments, roundToStepPrecision, snapValueToStep, trapFocus, useArrowNavigation, useBodyScrollLock, useDateFormatter, useDirection, useEmitAsProps, useFilter, useFocusGuards, useFormControl, useForwardExpose, useForwardProps, useForwardPropsEmits, useForwardRef, useGraceArea, useHideOthers, useId, useLocale, useSelectionBehavior, useSize, useStateMachine, useTestKbd, useTypeahead, withDefault } from "./index3.js";
|
|
2
|
-
export { DateRange, DateStep, DateValue, Formatter, SegmentPart, TimeRange, TimeValue, areEqual, createContext, findValuesBetween, getActiveElement, handleAndDispatchCustomEvent, isValidVNodeElement, isValueEqualOrExist, onFocusOutside, renderSlotFragments, roundToStepPrecision, snapValueToStep, trapFocus, useArrowNavigation, useBodyScrollLock, useDateFormatter, useDirection, useEmitAsProps, useFilter, useFocusGuards, useFormControl, useForwardExpose, useForwardProps, useForwardPropsEmits, useForwardRef, useGraceArea, useHideOthers, useId, useLocale, useSelectionBehavior, useSize, useStateMachine, useTestKbd, useTypeahead, withDefault };
|
|
1
|
+
import { DateRange, DateStep, DateValue, EmitAsProps, Formatter, SegmentPart, TimeRange, TimeValue, areEqual, createContext, findValuesBetween, getActiveElement, handleAndDispatchCustomEvent, isValidVNodeElement, isValueEqualOrExist, onFocusOutside, renderSlotFragments, roundToStepPrecision, snapValueToStep, trapFocus, useArrowNavigation, useBodyScrollLock, useComposing, useDateFormatter, useDirection, useEmitAsProps, useFilter, useFocusGuards, useFormControl, useForwardExpose, useForwardProps, useForwardPropsEmits, useForwardRef, useGraceArea, useHideOthers, useId, useLocale, useSelectionBehavior, useSize, useStateMachine, useTestKbd, useTypeahead, withDefault } from "./index3.js";
|
|
2
|
+
export { DateRange, DateStep, DateValue, EmitAsProps, Formatter, SegmentPart, TimeRange, TimeValue, areEqual, createContext, findValuesBetween, getActiveElement, handleAndDispatchCustomEvent, isValidVNodeElement, isValueEqualOrExist, onFocusOutside, renderSlotFragments, roundToStepPrecision, snapValueToStep, trapFocus, useArrowNavigation, useBodyScrollLock, useComposing, useDateFormatter, useDirection, useEmitAsProps, useFilter, useFocusGuards, useFormControl, useForwardExpose, useForwardProps, useForwardPropsEmits, useForwardRef, useGraceArea, useHideOthers, useId, useLocale, useSelectionBehavior, useSize, useStateMachine, useTestKbd, useTypeahead, withDefault };
|
package/dist/shared.js
CHANGED
|
@@ -11,6 +11,7 @@ import { trapFocus } from "./shared/trap-focus.js";
|
|
|
11
11
|
import { useArrowNavigation } from "./shared/useArrowNavigation.js";
|
|
12
12
|
import "./ConfigProvider/ConfigProvider.js";
|
|
13
13
|
import { useBodyScrollLock } from "./shared/useBodyScrollLock.js";
|
|
14
|
+
import { useComposing } from "./shared/useComposing.js";
|
|
14
15
|
import "./date/comparators.js";
|
|
15
16
|
import "./date/calendar.js";
|
|
16
17
|
import "./date/index.js";
|
|
@@ -36,4 +37,4 @@ import { useTypeahead } from "./shared/useTypeahead.js";
|
|
|
36
37
|
import { withDefault } from "./shared/withDefault.js";
|
|
37
38
|
import "./shared/index.js";
|
|
38
39
|
|
|
39
|
-
export { areEqual, createContext, findValuesBetween, getActiveElement, handleAndDispatchCustomEvent, isValidVNodeElement, isValueEqualOrExist, onFocusOutside, renderSlotFragments, roundToStepPrecision, snapValueToStep, trapFocus, useArrowNavigation, useBodyScrollLock, useDateFormatter, useDirection, useEmitAsProps, useFilter, useFocusGuards, useFormControl, useForwardExpose, useForwardProps, useForwardPropsEmits, useForwardRef, useGraceArea, useHideOthers, useId, useLocale, useSelectionBehavior, useSize, useStateMachine, useTestKbd, useTypeahead, withDefault };
|
|
40
|
+
export { areEqual, createContext, findValuesBetween, getActiveElement, handleAndDispatchCustomEvent, isValidVNodeElement, isValueEqualOrExist, onFocusOutside, renderSlotFragments, roundToStepPrecision, snapValueToStep, trapFocus, useArrowNavigation, useBodyScrollLock, useComposing, useDateFormatter, useDirection, useEmitAsProps, useFilter, useFocusGuards, useFormControl, useForwardExpose, useForwardProps, useForwardPropsEmits, useForwardRef, useGraceArea, useHideOthers, useId, useLocale, useSelectionBehavior, useSize, useStateMachine, useTestKbd, useTypeahead, withDefault };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akar",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.10",
|
|
5
5
|
"description": "Vue UI primitives components",
|
|
6
6
|
"author": "Vinicunca Contributors (https://github.com/vinicunca)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -112,14 +112,15 @@
|
|
|
112
112
|
"@types/jsdom": "^28.0.0",
|
|
113
113
|
"@types/node": "^24.0.13",
|
|
114
114
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
115
|
-
"@vitest/coverage-istanbul": "^3.2.
|
|
116
|
-
"@vue/
|
|
115
|
+
"@vitest/coverage-istanbul": "^3.2.6",
|
|
116
|
+
"@vue/server-renderer": "^3.5.17",
|
|
117
|
+
"@vue/test-utils": "^2.4.11",
|
|
117
118
|
"@vue/tsconfig": "^0.7.0",
|
|
118
119
|
"jsdom": "^26.1.0",
|
|
119
120
|
"size-limit": "^12.0.1",
|
|
120
121
|
"tsdown": "^0.12.9",
|
|
121
|
-
"vite": "^8.0.
|
|
122
|
-
"vitest": "^
|
|
122
|
+
"vite": "^8.0.16",
|
|
123
|
+
"vitest": "^4.1.8",
|
|
123
124
|
"vitest-axe": "0.1.0",
|
|
124
125
|
"vitest-canvas-mock": "^0.3.3",
|
|
125
126
|
"vue": "3.5.17",
|
|
@@ -7,11 +7,12 @@ export interface AutocompleteInputProps extends ListboxFilterProps {}
|
|
|
7
7
|
|
|
8
8
|
<script setup lang="ts">
|
|
9
9
|
import { useVModel } from '@vueuse/core';
|
|
10
|
-
import { nextTick, onMounted,
|
|
10
|
+
import { nextTick, onMounted, watch } from 'vue';
|
|
11
11
|
import { injectComboboxRootContext } from '@/Combobox/ComboboxRoot.vue';
|
|
12
12
|
import { ListboxFilter } from '@/Listbox';
|
|
13
13
|
import { injectListboxRootContext } from '@/Listbox/ListboxRoot.vue';
|
|
14
14
|
import { usePrimitiveElement } from '@/Primitive';
|
|
15
|
+
import { useComposing } from '@/shared';
|
|
15
16
|
import { injectAutocompleteRootContext } from './AutocompleteRoot.vue';
|
|
16
17
|
|
|
17
18
|
const props = withDefaults(defineProps<AutocompleteInputProps>(), {
|
|
@@ -38,24 +39,19 @@ onMounted(() => {
|
|
|
38
39
|
}
|
|
39
40
|
});
|
|
40
41
|
|
|
41
|
-
const isComposing =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
isComposing.value = false;
|
|
48
|
-
const el = currentElement.value as HTMLInputElement;
|
|
49
|
-
if (el) {
|
|
50
|
-
processInputValue(el.value);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
42
|
+
const { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {
|
|
43
|
+
const el = event.target as HTMLInputElement;
|
|
44
|
+
if (el) {
|
|
45
|
+
processInputValue(el.value);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
54
48
|
|
|
55
|
-
function handleKeyDown(
|
|
49
|
+
function handleKeyDown(ev: KeyboardEvent) {
|
|
56
50
|
if (isComposing.value) {
|
|
57
51
|
return;
|
|
58
52
|
}
|
|
53
|
+
|
|
54
|
+
ev.preventDefault();
|
|
59
55
|
if (!rootContext.open.value) {
|
|
60
56
|
rootContext.onOpenChange(true);
|
|
61
57
|
}
|
|
@@ -131,10 +127,10 @@ watch(rootContext.filterState, (_newValue, oldValue) => {
|
|
|
131
127
|
autocomplete="off"
|
|
132
128
|
@click="handleClick"
|
|
133
129
|
@input="handleInput"
|
|
134
|
-
@keydown.down.up
|
|
130
|
+
@keydown.down.up="handleKeyDown"
|
|
135
131
|
@focus="handleFocus"
|
|
136
|
-
@compositionstart="
|
|
137
|
-
@compositionend="
|
|
132
|
+
@compositionstart="handleCompositionStart"
|
|
133
|
+
@compositionend="handleCompositionEnd"
|
|
138
134
|
>
|
|
139
135
|
<slot />
|
|
140
136
|
</ListboxFilter>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { PrimitiveProps } from '@/Primitive';
|
|
3
|
-
import { KEY_CODES } from '@vinicunca/perkakas';
|
|
4
3
|
|
|
5
4
|
const ALLOWED_INPUT_RE = /[\d.-]/;
|
|
6
5
|
|
|
@@ -8,8 +7,10 @@ export interface ColorFieldInputProps extends PrimitiveProps {}
|
|
|
8
7
|
</script>
|
|
9
8
|
|
|
10
9
|
<script setup lang="ts">
|
|
10
|
+
import { KEY_CODES } from '@vinicunca/perkakas';
|
|
11
11
|
import { computed, ref } from 'vue';
|
|
12
12
|
import { Primitive } from '@/Primitive';
|
|
13
|
+
import { useComposing } from '@/shared';
|
|
13
14
|
import { injectColorFieldRootContext } from './ColorFieldRoot.vue';
|
|
14
15
|
|
|
15
16
|
const props = withDefaults(defineProps<ColorFieldInputProps>(), {
|
|
@@ -19,6 +20,7 @@ const props = withDefaults(defineProps<ColorFieldInputProps>(), {
|
|
|
19
20
|
const rootContext = injectColorFieldRootContext();
|
|
20
21
|
|
|
21
22
|
const isFocused = ref(false);
|
|
23
|
+
const { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing();
|
|
22
24
|
|
|
23
25
|
const inputType = computed(() => {
|
|
24
26
|
return rootContext.channel.value ? 'text' : 'text';
|
|
@@ -50,6 +52,13 @@ function handleWheel(event: WheelEvent) {
|
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
function handleKeydown(event: KeyboardEvent) {
|
|
55
|
+
// Don't step/commit mid-composition, keys are used for IME candidate navigation and commit.
|
|
56
|
+
// `isComposing` stays true until the tick after `compositionend`, so the commit keydown
|
|
57
|
+
// (which can report `event.isComposing === false`) is still skipped.
|
|
58
|
+
if (isComposing.value || event.isComposing) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
53
62
|
switch (event.key) {
|
|
54
63
|
case KEY_CODES.ARROW_UP:
|
|
55
64
|
event.preventDefault();
|
|
@@ -84,6 +93,10 @@ function handleKeydown(event: KeyboardEvent) {
|
|
|
84
93
|
|
|
85
94
|
// Handle numeric key validation for channel mode
|
|
86
95
|
function handleBeforeInput(event: InputEvent) {
|
|
96
|
+
if (event.isComposing) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
87
100
|
if (!rootContext.channel.value) {
|
|
88
101
|
return;
|
|
89
102
|
} // No validation for hex mode
|
|
@@ -133,6 +146,8 @@ function handleBeforeInput(event: InputEvent) {
|
|
|
133
146
|
@keydown="handleKeydown"
|
|
134
147
|
@wheel="handleWheel"
|
|
135
148
|
@beforeinput="handleBeforeInput"
|
|
149
|
+
@compositionstart="handleCompositionStart"
|
|
150
|
+
@compositionend="handleCompositionEnd"
|
|
136
151
|
>
|
|
137
152
|
<slot />
|
|
138
153
|
</Primitive>
|
|
@@ -99,6 +99,20 @@ onUnmounted(() => {
|
|
|
99
99
|
rootContext.triggerElement.value?.focus();
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
+
|
|
103
|
+
function isEventTargetWithinCombobox(target: EventTarget | null) {
|
|
104
|
+
if (rootContext.parentElement.value?.contains(target as Node)) {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// A `<label>` associated (via `for`) with an element inside the combobox forwards its
|
|
109
|
+
// click/focus to that control, so interacting with it should not dismiss the content.
|
|
110
|
+
// Without this, clicking such a label while open dismisses on `pointerdown` and the
|
|
111
|
+
// forwarded click/focus immediately re-opens it.
|
|
112
|
+
const label = target instanceof Element ? target.closest('label') : null;
|
|
113
|
+
const control = label?.control;
|
|
114
|
+
return !!control && !!rootContext.parentElement.value?.contains(control);
|
|
115
|
+
}
|
|
102
116
|
</script>
|
|
103
117
|
|
|
104
118
|
<template>
|
|
@@ -113,15 +127,15 @@ onUnmounted(() => {
|
|
|
113
127
|
:disable-outside-pointer-events="disableOutsidePointerEvents"
|
|
114
128
|
@dismiss="rootContext.onOpenChange(false)"
|
|
115
129
|
@focus-outside="(ev) => {
|
|
116
|
-
// if
|
|
117
|
-
if (
|
|
130
|
+
// if focusing inside the combobox (or a label tied to it), prevent dismiss
|
|
131
|
+
if (isEventTargetWithinCombobox(ev.target)) ev.preventDefault()
|
|
118
132
|
emits('focusOutside', ev)
|
|
119
133
|
}"
|
|
120
134
|
@interact-outside="emits('interactOutside', $event)"
|
|
121
135
|
@escape-key-down="emits('escapeKeyDown', $event)"
|
|
122
136
|
@pointer-down-outside="(ev) => {
|
|
123
|
-
// if clicking inside the combobox, prevent dismiss
|
|
124
|
-
if (
|
|
137
|
+
// if clicking inside the combobox (or a label tied to it), prevent dismiss
|
|
138
|
+
if (isEventTargetWithinCombobox(ev.target)) ev.preventDefault()
|
|
125
139
|
emits('pointerDownOutside', ev)
|
|
126
140
|
}"
|
|
127
141
|
>
|
|
@@ -130,6 +144,9 @@ onUnmounted(() => {
|
|
|
130
144
|
v-bind="{ ...$attrs, ...forwardedProps }"
|
|
131
145
|
:id="rootContext.contentId"
|
|
132
146
|
:ref="forwardRef"
|
|
147
|
+
:memo-dependencies="position === 'popper'
|
|
148
|
+
? [rootContext.filterSearch.value, rootContext.filterState.value]
|
|
149
|
+
: undefined"
|
|
133
150
|
:data-state="rootContext.open.value ? 'open' : 'closed'"
|
|
134
151
|
:data-empty="isEmpty ? '' : undefined"
|
|
135
152
|
:style="{
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { ListboxFilterEmits, ListboxFilterProps } from '@/Listbox';
|
|
3
|
-
import { useVModel } from '@vueuse/core';
|
|
4
|
-
import { nextTick, onMounted, watch } from 'vue';
|
|
5
|
-
import { usePrimitiveElement } from '@/Primitive';
|
|
6
3
|
|
|
7
4
|
export type ComboboxInputEmits = ListboxFilterEmits;
|
|
8
5
|
export interface ComboboxInputProps extends ListboxFilterProps {
|
|
@@ -12,8 +9,12 @@ export interface ComboboxInputProps extends ListboxFilterProps {
|
|
|
12
9
|
</script>
|
|
13
10
|
|
|
14
11
|
<script setup lang="ts">
|
|
12
|
+
import { useVModel } from '@vueuse/core';
|
|
13
|
+
import { nextTick, onMounted, watch } from 'vue';
|
|
15
14
|
import { ListboxFilter } from '@/Listbox';
|
|
16
15
|
import { injectListboxRootContext } from '@/Listbox/ListboxRoot.vue';
|
|
16
|
+
import { usePrimitiveElement } from '@/Primitive';
|
|
17
|
+
import { useComposing } from '@/shared';
|
|
17
18
|
import { injectComboboxRootContext } from './ComboboxRoot.vue';
|
|
18
19
|
|
|
19
20
|
const props = withDefaults(defineProps<ComboboxInputProps>(), {
|
|
@@ -35,27 +36,47 @@ onMounted(() => {
|
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
38
|
|
|
39
|
+
const { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {
|
|
40
|
+
const el = event.target as HTMLInputElement;
|
|
41
|
+
if (el) {
|
|
42
|
+
processInputValue(el.value);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
38
46
|
function handleKeyDown(ev: KeyboardEvent) {
|
|
47
|
+
// Don't swallow arrow keys mid-composition, they're used for IME candidate navigation
|
|
48
|
+
if (isComposing.value) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
ev.preventDefault();
|
|
52
|
+
|
|
39
53
|
if (!rootContext.open.value) {
|
|
40
54
|
rootContext.onOpenChange(true);
|
|
41
55
|
}
|
|
42
56
|
}
|
|
43
57
|
|
|
44
|
-
function
|
|
45
|
-
const target = event.target as HTMLInputElement;
|
|
58
|
+
function processInputValue(value: string) {
|
|
46
59
|
if (!rootContext.open.value) {
|
|
47
60
|
rootContext.onOpenChange(true);
|
|
48
61
|
nextTick(() => {
|
|
49
|
-
if (
|
|
50
|
-
rootContext.filterSearch.value =
|
|
62
|
+
if (value) {
|
|
63
|
+
rootContext.filterSearch.value = value;
|
|
51
64
|
listboxContext.highlightFirstItem();
|
|
52
65
|
}
|
|
53
66
|
});
|
|
54
67
|
} else {
|
|
55
|
-
rootContext.filterSearch.value =
|
|
68
|
+
rootContext.filterSearch.value = value;
|
|
56
69
|
}
|
|
57
70
|
}
|
|
58
71
|
|
|
72
|
+
function handleInput(event: InputEvent) {
|
|
73
|
+
if (isComposing.value) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
processInputValue((event.target as HTMLInputElement).value);
|
|
78
|
+
}
|
|
79
|
+
|
|
59
80
|
function handleFocus() {
|
|
60
81
|
if (rootContext.openOnFocus.value && !rootContext.open.value) {
|
|
61
82
|
rootContext.onOpenChange(true);
|
|
@@ -157,9 +178,11 @@ watch(rootContext.filterState, (_newValue, oldValue) => {
|
|
|
157
178
|
autocomplete="off"
|
|
158
179
|
@click="handleClick"
|
|
159
180
|
@input="handleInput"
|
|
160
|
-
@keydown.down.up
|
|
181
|
+
@keydown.down.up="handleKeyDown"
|
|
161
182
|
@focus="handleFocus"
|
|
162
183
|
@blur="handleBlur"
|
|
184
|
+
@compositionstart="handleCompositionStart"
|
|
185
|
+
@compositionend="handleCompositionEnd"
|
|
163
186
|
>
|
|
164
187
|
<slot />
|
|
165
188
|
</ListboxFilter>
|
|
@@ -78,6 +78,7 @@ onUnmounted(() => {
|
|
|
78
78
|
v-bind="props"
|
|
79
79
|
:id="id"
|
|
80
80
|
ref="primitiveElement"
|
|
81
|
+
v-memo="[isRender, rootContext.filterSearch.value, rootContext.disabled.value, disabled, props.value, props.as, props.asChild, ...Object.values($attrs)]"
|
|
81
82
|
:disabled="rootContext.disabled.value || disabled"
|
|
82
83
|
@select="(event) => {
|
|
83
84
|
emits('select', event as any)
|