vft 0.0.310 → 0.0.312
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/es/components/affix/affix.d.ts +1 -1
- package/es/components/affix/affix.vue.d.ts +3 -3
- package/es/components/affix/index.d.ts +6 -6
- package/es/components/autocomplete/autocomplete.vue.d.ts +7 -7
- package/es/components/autocomplete/index.d.ts +20 -20
- package/es/components/avatar/index.d.ts +3 -3
- package/es/components/button/button.vue.d.ts +1 -1
- package/es/components/button/index.d.ts +21 -21
- package/es/components/button/use-button.d.ts +1 -1
- package/es/components/cascader/cascader.d.ts +2 -2
- package/es/components/cascader/cascader.vue.d.ts +6 -6
- package/es/components/checkbox/index.d.ts +36 -36
- package/es/components/col/col.vue.d.ts +1 -1
- package/es/components/col/index.d.ts +9 -9
- package/es/components/collapse/collapse-item.vue.d.ts +1 -1
- package/es/components/color-picker/index.d.ts +6 -6
- package/es/components/date-picker/date-picker.d.ts +6 -6
- package/es/components/date-picker/index.d.ts +12 -12
- package/es/components/date-picker/props/date-picker.d.ts +2 -2
- package/es/components/divider/index.d.ts +3 -3
- package/es/components/dropdown/dropdown-item-impl.vue.d.ts +59 -101
- package/es/components/dropdown/dropdown-item-impl.vue.js +2 -31
- package/es/components/dropdown/dropdown-item-impl.vue2.js +71 -57
- package/es/components/dropdown/dropdown-item.vue.d.ts +61 -0
- package/es/components/dropdown/dropdown-item.vue.js +2 -33
- package/es/components/dropdown/dropdown-item.vue2.js +60 -51
- package/es/components/dropdown/dropdown-menu.vue.d.ts +21 -20
- package/es/components/dropdown/dropdown-menu.vue.js +2 -22
- package/es/components/dropdown/dropdown-menu.vue2.js +70 -65
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/index.d.ts +596 -0
- package/es/components/dropdown/index.js +8 -8
- package/es/components/form/form-item.vue.d.ts +1 -1
- package/es/components/form/index.d.ts +39 -39
- package/es/components/input/index.d.ts +8 -8
- package/es/components/input/input.vue.d.ts +2 -2
- package/es/components/input-number/index.d.ts +3 -3
- package/es/components/input-number/input-number.vue.d.ts +1 -1
- package/es/components/input-tag/input-tag.d.ts +1 -1
- package/es/components/input-tag/input-tag.vue.d.ts +4 -4
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/popper/composables/use-content.d.ts +3 -3
- package/es/components/radio/index.d.ts +42 -42
- package/es/components/radio/radio.d.ts +1 -1
- package/es/components/radio/radio.vue.d.ts +5 -5
- package/es/components/roving-focus-group/roving-focus-group-impl.vue.d.ts +2 -2
- package/es/components/search/index.d.ts +3 -3
- package/es/components/search/search.vue.d.ts +1 -1
- package/es/components/segmented/index.d.ts +6 -6
- package/es/components/segmented/segmented.d.ts +1 -1
- package/es/components/segmented/segmented.vue.d.ts +3 -3
- package/es/components/select/index.d.ts +9 -9
- package/es/components/select/select.vue.d.ts +9 -9
- package/es/components/select/useSelect.d.ts +8 -8
- package/es/components/slider/index.d.ts +1 -1
- package/es/components/slider/slider.vue.d.ts +1 -1
- package/es/components/space/index.d.ts +3 -3
- package/es/components/space/space.d.ts +4 -4
- package/es/components/switch/index.d.ts +15 -15
- package/es/components/switch/switch.vue.d.ts +3 -3
- package/es/components/tabs/index.d.ts +2 -2
- package/es/components/time-picker/common/picker-range-trigger.vue.d.ts +2 -2
- package/es/components/time-picker/common/picker.vue.d.ts +6 -6
- package/es/components/time-picker/common/props.d.ts +2 -2
- package/es/components/time-picker/index.d.ts +12 -12
- package/es/components/time-picker/time-picker.d.ts +6 -6
- package/es/components/time-select/time-select.vue.d.ts +1 -1
- package/es/components/timeline/index.d.ts +6 -6
- package/es/components/tree/tree-node.vue.d.ts +27 -27
- package/es/components/upload/index.d.ts +18 -18
- package/es/hooks/use-popper/index.d.ts +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/affix/affix.d.ts +1 -1
- package/lib/components/affix/affix.vue.d.ts +3 -3
- package/lib/components/affix/index.d.ts +6 -6
- package/lib/components/autocomplete/autocomplete.vue.d.ts +7 -7
- package/lib/components/autocomplete/index.d.ts +20 -20
- package/lib/components/avatar/index.d.ts +3 -3
- package/lib/components/button/button.vue.d.ts +1 -1
- package/lib/components/button/index.d.ts +21 -21
- package/lib/components/button/use-button.d.ts +1 -1
- package/lib/components/cascader/cascader.d.ts +2 -2
- package/lib/components/cascader/cascader.vue.d.ts +6 -6
- package/lib/components/checkbox/index.d.ts +36 -36
- package/lib/components/col/col.vue.d.ts +1 -1
- package/lib/components/col/index.d.ts +9 -9
- package/lib/components/collapse/collapse-item.vue.d.ts +1 -1
- package/lib/components/color-picker/index.d.ts +6 -6
- package/lib/components/date-picker/date-picker.d.ts +6 -6
- package/lib/components/date-picker/index.d.ts +12 -12
- package/lib/components/date-picker/props/date-picker.d.ts +2 -2
- package/lib/components/divider/index.d.ts +3 -3
- package/lib/components/dropdown/dropdown-item-impl.vue.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +59 -101
- package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item.vue.cjs +1 -1
- package/lib/components/dropdown/dropdown-item.vue.d.ts +61 -0
- package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-menu.vue.cjs +1 -1
- package/lib/components/dropdown/dropdown-menu.vue.d.ts +21 -20
- package/lib/components/dropdown/dropdown-menu.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/index.cjs +1 -1
- package/lib/components/dropdown/index.d.ts +596 -0
- package/lib/components/form/form-item.vue.d.ts +1 -1
- package/lib/components/form/index.d.ts +39 -39
- package/lib/components/input/index.d.ts +8 -8
- package/lib/components/input/input.vue.d.ts +2 -2
- package/lib/components/input-number/index.d.ts +3 -3
- package/lib/components/input-number/input-number.vue.d.ts +1 -1
- package/lib/components/input-tag/input-tag.d.ts +1 -1
- package/lib/components/input-tag/input-tag.vue.d.ts +4 -4
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/popper/composables/use-content.d.ts +3 -3
- package/lib/components/radio/index.d.ts +42 -42
- package/lib/components/radio/radio.d.ts +1 -1
- package/lib/components/radio/radio.vue.d.ts +5 -5
- package/lib/components/roving-focus-group/roving-focus-group-impl.vue.d.ts +2 -2
- package/lib/components/search/index.d.ts +3 -3
- package/lib/components/search/search.vue.d.ts +1 -1
- package/lib/components/segmented/index.d.ts +6 -6
- package/lib/components/segmented/segmented.d.ts +1 -1
- package/lib/components/segmented/segmented.vue.d.ts +3 -3
- package/lib/components/select/index.d.ts +9 -9
- package/lib/components/select/select.vue.d.ts +9 -9
- package/lib/components/select/useSelect.d.ts +8 -8
- package/lib/components/slider/index.d.ts +1 -1
- package/lib/components/slider/slider.vue.d.ts +1 -1
- package/lib/components/space/index.d.ts +3 -3
- package/lib/components/space/space.d.ts +4 -4
- package/lib/components/switch/index.d.ts +15 -15
- package/lib/components/switch/switch.vue.d.ts +3 -3
- package/lib/components/tabs/index.d.ts +2 -2
- package/lib/components/time-picker/common/picker-range-trigger.vue.d.ts +2 -2
- package/lib/components/time-picker/common/picker.vue.d.ts +6 -6
- package/lib/components/time-picker/common/props.d.ts +2 -2
- package/lib/components/time-picker/index.d.ts +12 -12
- package/lib/components/time-picker/time-picker.d.ts +6 -6
- package/lib/components/time-select/time-select.vue.d.ts +1 -1
- package/lib/components/timeline/index.d.ts +6 -6
- package/lib/components/tree/tree-node.vue.d.ts +27 -27
- package/lib/components/upload/index.d.ts +18 -18
- package/lib/hooks/use-popper/index.d.ts +3 -3
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/web-types.json +1 -1
|
@@ -1,105 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
command
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
role: import("vue").ComputedRef<string>;
|
|
34
|
-
tabIndex: import("vue").Ref<number, number>;
|
|
35
|
-
handleFocus: (e: Event) => void;
|
|
36
|
-
handleKeydown: (event: KeyboardEvent) => void;
|
|
37
|
-
handleMousedown: (e: Event) => void;
|
|
38
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "pointerleave" | "pointermove" | "clickimpl")[], "click" | "pointerleave" | "pointermove" | "clickimpl", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
|
-
command: {
|
|
40
|
-
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
41
|
-
default: () => {};
|
|
42
|
-
};
|
|
43
|
-
disabled: BooleanConstructor;
|
|
44
|
-
divided: BooleanConstructor;
|
|
45
|
-
textValue: StringConstructor;
|
|
46
|
-
icon: StringConstructor;
|
|
47
|
-
}>> & Readonly<{
|
|
48
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
49
|
-
onPointerleave?: ((...args: any[]) => any) | undefined;
|
|
50
|
-
onPointermove?: ((...args: any[]) => any) | undefined;
|
|
51
|
-
onClickimpl?: ((...args: any[]) => any) | undefined;
|
|
1
|
+
interface Props {
|
|
2
|
+
command?: object | string | number;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
divided?: boolean;
|
|
5
|
+
textValue?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
12
|
+
command: () => {};
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
divided: boolean;
|
|
15
|
+
textValue: string;
|
|
16
|
+
icon: string;
|
|
17
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
pointermove: (event: PointerEvent) => void;
|
|
19
|
+
pointerleave: (event: PointerEvent) => void;
|
|
20
|
+
click: (event: MouseEvent) => void;
|
|
21
|
+
clickimpl: (event: MouseEvent) => void;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
23
|
+
command: () => {};
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
divided: boolean;
|
|
26
|
+
textValue: string;
|
|
27
|
+
icon: string;
|
|
28
|
+
}>>> & Readonly<{
|
|
29
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
30
|
+
onPointerleave?: ((event: PointerEvent) => any) | undefined;
|
|
31
|
+
onPointermove?: ((event: PointerEvent) => any) | undefined;
|
|
32
|
+
onClickimpl?: ((event: MouseEvent) => any) | undefined;
|
|
52
33
|
}>, {
|
|
53
34
|
disabled: boolean;
|
|
54
|
-
|
|
35
|
+
icon: string;
|
|
36
|
+
command: object | string | number;
|
|
55
37
|
divided: boolean;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
type: import("vue").PropType<string>;
|
|
60
|
-
required: true;
|
|
61
|
-
};
|
|
62
|
-
size: {
|
|
63
|
-
type: import("vue").PropType<string | number>;
|
|
64
|
-
};
|
|
65
|
-
color: {
|
|
66
|
-
type: import("vue").PropType<string>;
|
|
67
|
-
};
|
|
68
|
-
rotate: {
|
|
69
|
-
type: import("vue").PropType<boolean>;
|
|
70
|
-
};
|
|
71
|
-
rotateSpeed: {
|
|
72
|
-
type: import("vue").PropType<number>;
|
|
73
|
-
};
|
|
74
|
-
pointer: {
|
|
75
|
-
type: import("vue").PropType<boolean>;
|
|
76
|
-
};
|
|
77
|
-
hoverColor: {
|
|
78
|
-
type: import("vue").PropType<string>;
|
|
79
|
-
};
|
|
80
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
81
|
-
icon: {
|
|
82
|
-
type: import("vue").PropType<string>;
|
|
83
|
-
required: true;
|
|
84
|
-
};
|
|
85
|
-
size: {
|
|
86
|
-
type: import("vue").PropType<string | number>;
|
|
87
|
-
};
|
|
88
|
-
color: {
|
|
89
|
-
type: import("vue").PropType<string>;
|
|
90
|
-
};
|
|
91
|
-
rotate: {
|
|
92
|
-
type: import("vue").PropType<boolean>;
|
|
93
|
-
};
|
|
94
|
-
rotateSpeed: {
|
|
95
|
-
type: import("vue").PropType<number>;
|
|
96
|
-
};
|
|
97
|
-
pointer: {
|
|
98
|
-
type: import("vue").PropType<boolean>;
|
|
99
|
-
};
|
|
100
|
-
hoverColor: {
|
|
101
|
-
type: import("vue").PropType<string>;
|
|
102
|
-
};
|
|
103
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
104
|
-
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
textValue: string;
|
|
39
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
40
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
105
41
|
export default _default;
|
|
42
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
43
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
44
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
45
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
46
|
+
} : {
|
|
47
|
+
type: import('vue').PropType<T[K]>;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
type __VLS_WithDefaults<P, D> = {
|
|
52
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
53
|
+
default: D[K];
|
|
54
|
+
}> : P[K];
|
|
55
|
+
};
|
|
56
|
+
type __VLS_Prettify<T> = {
|
|
57
|
+
[K in keyof T]: T[K];
|
|
58
|
+
} & {};
|
|
59
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
60
|
+
new (): {
|
|
61
|
+
$slots: S;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as a, createElementBlock as i, openBlock as r, Fragment as t, createCommentVNode as l, createElementVNode as p, mergeProps as d, withModifiers as u, createBlock as f, renderSlot as b, normalizeProps as $ } from "vue";
|
|
3
|
-
import w from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const k = ["aria-disabled", "tabindex", "role"];
|
|
5
|
-
function v(e, o, y, F, M, P) {
|
|
6
|
-
const s = a("drop-icon");
|
|
7
|
-
return r(), i(t, null, [
|
|
8
|
-
e.divided ? (r(), i("li", d({
|
|
9
|
-
key: 0,
|
|
10
|
-
role: "separator",
|
|
11
|
-
class: e.ns.bem("menu", "item", "divided")
|
|
12
|
-
}, e.$attrs), null, 16)) : l("", !0),
|
|
13
|
-
p("li", d({ ref: e.itemRef }, { ...e.dataset, ...e.$attrs }, {
|
|
14
|
-
"aria-disabled": e.disabled,
|
|
15
|
-
class: [e.ns.be("menu", "item"), e.ns.is("disabled", e.disabled)],
|
|
16
|
-
tabindex: e.tabIndex,
|
|
17
|
-
role: e.role,
|
|
18
|
-
onClick: o[0] || (o[0] = (n) => e.$emit("clickimpl", n)),
|
|
19
|
-
onFocus: o[1] || (o[1] = (...n) => e.handleFocus && e.handleFocus(...n)),
|
|
20
|
-
onKeydown: o[2] || (o[2] = u((...n) => e.handleKeydown && e.handleKeydown(...n), ["self"])),
|
|
21
|
-
onMousedown: o[3] || (o[3] = (...n) => e.handleMousedown && e.handleMousedown(...n)),
|
|
22
|
-
onPointermove: o[4] || (o[4] = (n) => e.$emit("pointermove", n)),
|
|
23
|
-
onPointerleave: o[5] || (o[5] = (n) => e.$emit("pointerleave", n))
|
|
24
|
-
}), [
|
|
25
|
-
e.icon ? (r(), f(s, $(d({ key: 0 }, e.icon)), null, 16)) : l("", !0),
|
|
26
|
-
b(e.$slots, "default")
|
|
27
|
-
], 16, k)
|
|
28
|
-
], 64);
|
|
29
|
-
}
|
|
30
|
-
const K = /* @__PURE__ */ w(m, [["render", v]]);
|
|
1
|
+
import f from "./dropdown-item-impl.vue2.js";
|
|
31
2
|
export {
|
|
32
|
-
|
|
3
|
+
f as default
|
|
33
4
|
};
|
|
@@ -1,76 +1,90 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as c, computed as m, inject as i, createElementBlock as f, openBlock as l, Fragment as y, createCommentVNode as I, createElementVNode as P, mergeProps as s, unref as t, withModifiers as g, createBlock as D, renderSlot as F, normalizeProps as V } from "vue";
|
|
2
|
+
import { COLLECTION_ITEM_SIGN as $ } from "../collection/collection.js";
|
|
3
|
+
import { VftIcon as J } from "../icon/index.js";
|
|
3
4
|
import "../roving-focus-group/roving-focus-group.vue2.js";
|
|
4
|
-
import { defineComponent as N, inject as e, computed as C } from "vue";
|
|
5
5
|
import "../roving-focus-group/roving-focus-group-impl.vue2.js";
|
|
6
6
|
import "../roving-focus-group/roving-focus-item.vue2.js";
|
|
7
|
-
import { ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY as
|
|
8
|
-
import { ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY as
|
|
9
|
-
import { EVENT_CODE as
|
|
7
|
+
import { ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY as Y } from "../roving-focus-group/types.js";
|
|
8
|
+
import { ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY as B } from "../roving-focus-group/tokens.js";
|
|
9
|
+
import { EVENT_CODE as E } from "../../constants/aria.js";
|
|
10
10
|
import "@vueuse/core";
|
|
11
|
-
import "@vft/utils";
|
|
12
|
-
import { composeEventHandlers as
|
|
11
|
+
import { singleAttrToObj as G } from "@vft/utils";
|
|
12
|
+
import { composeEventHandlers as S } from "../../utils/event.js";
|
|
13
13
|
import "../../utils/ns-cover.js";
|
|
14
14
|
import "lodash-es";
|
|
15
|
-
import { composeRefs as
|
|
16
|
-
import { useNamespace as
|
|
15
|
+
import { composeRefs as U } from "../../utils/vue/refs.js";
|
|
16
|
+
import { useNamespace as j } from "../../hooks/use-namespace/index.js";
|
|
17
17
|
import "../../hooks/use-model-toggle/index.js";
|
|
18
18
|
import "@popperjs/core";
|
|
19
19
|
import "../../hooks/use-z-index/index.js";
|
|
20
|
-
import { DROPDOWN_INJECTION_KEY as
|
|
21
|
-
import { DROPDOWN_COLLECTION_ITEM_INJECTION_KEY as
|
|
22
|
-
const A =
|
|
23
|
-
name: "DropdownItemImpl"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
20
|
+
import { DROPDOWN_INJECTION_KEY as W } from "./tokens.js";
|
|
21
|
+
import { DROPDOWN_COLLECTION_ITEM_INJECTION_KEY as z } from "./types.js";
|
|
22
|
+
const A = ["aria-disabled", "tabindex", "role"], H = c({
|
|
23
|
+
name: "DropdownItemImpl"
|
|
24
|
+
}), Ee = /* @__PURE__ */ c({
|
|
25
|
+
...H,
|
|
27
26
|
props: {
|
|
28
|
-
command: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
divided: Boolean,
|
|
34
|
-
textValue: String,
|
|
35
|
-
icon: String
|
|
27
|
+
command: { default: () => ({}) },
|
|
28
|
+
disabled: { type: Boolean, default: !1 },
|
|
29
|
+
divided: { type: Boolean, default: !1 },
|
|
30
|
+
textValue: { default: "" },
|
|
31
|
+
icon: { default: "" }
|
|
36
32
|
},
|
|
37
33
|
emits: ["pointermove", "pointerleave", "click", "clickimpl"],
|
|
38
|
-
setup(
|
|
39
|
-
const
|
|
40
|
-
|
|
34
|
+
setup(O, { emit: N }) {
|
|
35
|
+
const C = O, v = N, r = j("dropdown"), T = m(() => G(C.icon, "icon")), { role: d } = i(W, void 0), { collectionItemRef: _ } = i(
|
|
36
|
+
z,
|
|
41
37
|
void 0
|
|
42
|
-
), { collectionItemRef:
|
|
43
|
-
|
|
38
|
+
), { collectionItemRef: b } = i(
|
|
39
|
+
Y,
|
|
44
40
|
void 0
|
|
45
41
|
), {
|
|
46
|
-
rovingFocusGroupItemRef:
|
|
47
|
-
tabIndex:
|
|
48
|
-
handleFocus:
|
|
49
|
-
handleKeydown:
|
|
50
|
-
handleMousedown:
|
|
51
|
-
} =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
),
|
|
56
|
-
const { code:
|
|
57
|
-
if (
|
|
58
|
-
return
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
42
|
+
rovingFocusGroupItemRef: R,
|
|
43
|
+
tabIndex: k,
|
|
44
|
+
handleFocus: a,
|
|
45
|
+
handleKeydown: w,
|
|
46
|
+
handleMousedown: p
|
|
47
|
+
} = i(B, void 0), K = U(
|
|
48
|
+
_,
|
|
49
|
+
b,
|
|
50
|
+
R
|
|
51
|
+
), L = m(() => d.value === "menu" ? "menuitem" : d.value === "navigation" ? "link" : "button"), u = S((e) => {
|
|
52
|
+
const { code: o } = e;
|
|
53
|
+
if (o === E.enter || o === E.space)
|
|
54
|
+
return e.preventDefault(), e.stopImmediatePropagation(), v("clickimpl", e), !0;
|
|
55
|
+
}, w), M = m(() => ({
|
|
56
|
+
[$]: ""
|
|
57
|
+
}));
|
|
58
|
+
return (e, o) => (l(), f(y, null, [
|
|
59
|
+
e.divided ? (l(), f("li", s({
|
|
60
|
+
key: 0,
|
|
61
|
+
role: "separator",
|
|
62
|
+
class: t(r).bem("menu", "item", "divided")
|
|
63
|
+
}, e.$attrs), null, 16)) : I("", !0),
|
|
64
|
+
P("li", s({ ref: t(K) }, { ...M.value, ...e.$attrs }, {
|
|
65
|
+
"aria-disabled": e.disabled,
|
|
66
|
+
class: [t(r).be("menu", "item"), t(r).is("disabled", e.disabled)],
|
|
67
|
+
tabindex: t(k),
|
|
68
|
+
role: L.value,
|
|
69
|
+
onClick: o[0] || (o[0] = (n) => e.$emit("clickimpl", n)),
|
|
70
|
+
onFocus: o[1] || (o[1] = //@ts-ignore
|
|
71
|
+
(...n) => t(a) && t(a)(...n)),
|
|
72
|
+
onKeydown: o[2] || (o[2] = g(
|
|
73
|
+
//@ts-ignore
|
|
74
|
+
(...n) => t(u) && t(u)(...n),
|
|
75
|
+
["self"]
|
|
76
|
+
)),
|
|
77
|
+
onMousedown: o[3] || (o[3] = //@ts-ignore
|
|
78
|
+
(...n) => t(p) && t(p)(...n)),
|
|
79
|
+
onPointermove: o[4] || (o[4] = (n) => e.$emit("pointermove", n)),
|
|
80
|
+
onPointerleave: o[5] || (o[5] = (n) => e.$emit("pointerleave", n))
|
|
81
|
+
}), [
|
|
82
|
+
e.icon ? (l(), D(t(J), V(s({ key: 0 }, T.value)), null, 16)) : I("", !0),
|
|
83
|
+
F(e.$slots, "default")
|
|
84
|
+
], 16, A)
|
|
85
|
+
], 64));
|
|
72
86
|
}
|
|
73
87
|
});
|
|
74
88
|
export {
|
|
75
|
-
|
|
89
|
+
Ee as default
|
|
76
90
|
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
command?: object | string | number;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
divided?: boolean;
|
|
5
|
+
textValue?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
12
|
+
command: () => {};
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
divided: boolean;
|
|
15
|
+
textValue: string;
|
|
16
|
+
icon: string;
|
|
17
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
pointermove: (event: PointerEvent) => void;
|
|
19
|
+
pointerleave: (event: PointerEvent) => void;
|
|
20
|
+
click: (event: PointerEvent) => void;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
22
|
+
command: () => {};
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
divided: boolean;
|
|
25
|
+
textValue: string;
|
|
26
|
+
icon: string;
|
|
27
|
+
}>>> & Readonly<{
|
|
28
|
+
onClick?: ((event: PointerEvent) => any) | undefined;
|
|
29
|
+
onPointerleave?: ((event: PointerEvent) => any) | undefined;
|
|
30
|
+
onPointermove?: ((event: PointerEvent) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
icon: string;
|
|
34
|
+
command: object | string | number;
|
|
35
|
+
divided: boolean;
|
|
36
|
+
textValue: string;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
41
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
42
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
43
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
44
|
+
} : {
|
|
45
|
+
type: import('vue').PropType<T[K]>;
|
|
46
|
+
required: true;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
type __VLS_WithDefaults<P, D> = {
|
|
50
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
51
|
+
default: D[K];
|
|
52
|
+
}> : P[K];
|
|
53
|
+
};
|
|
54
|
+
type __VLS_Prettify<T> = {
|
|
55
|
+
[K in keyof T]: T[K];
|
|
56
|
+
} & {};
|
|
57
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -1,35 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as o, createBlock as a, openBlock as p, withCtx as n, createVNode as t, mergeProps as m, renderSlot as s } from "vue";
|
|
3
|
-
import c from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
function f(e, u, _, v, P, b) {
|
|
5
|
-
const r = o("dropdown-item-impl"), l = o("roving-focus-item"), i = o("dropdown-collection-item");
|
|
6
|
-
return p(), a(i, {
|
|
7
|
-
disabled: e.disabled,
|
|
8
|
-
"text-value": e.textValue ?? e.textContent
|
|
9
|
-
}, {
|
|
10
|
-
default: n(() => [
|
|
11
|
-
t(l, {
|
|
12
|
-
focusable: !e.disabled
|
|
13
|
-
}, {
|
|
14
|
-
default: n(() => [
|
|
15
|
-
t(r, m(e.propsAndAttrs, {
|
|
16
|
-
onPointerleave: e.handlePointerLeave,
|
|
17
|
-
onPointermove: e.handlePointerMove,
|
|
18
|
-
onClickimpl: e.handleClick
|
|
19
|
-
}), {
|
|
20
|
-
default: n(() => [
|
|
21
|
-
s(e.$slots, "default")
|
|
22
|
-
]),
|
|
23
|
-
_: 3
|
|
24
|
-
}, 16, ["onPointerleave", "onPointermove", "onClickimpl"])
|
|
25
|
-
]),
|
|
26
|
-
_: 3
|
|
27
|
-
}, 8, ["focusable"])
|
|
28
|
-
]),
|
|
29
|
-
_: 3
|
|
30
|
-
}, 8, ["disabled", "text-value"]);
|
|
31
|
-
}
|
|
32
|
-
const k = /* @__PURE__ */ c(d, [["render", f]]);
|
|
1
|
+
import f from "./dropdown-item.vue2.js";
|
|
33
2
|
export {
|
|
34
|
-
|
|
3
|
+
f as default
|
|
35
4
|
};
|
|
@@ -1,77 +1,86 @@
|
|
|
1
|
+
import { defineComponent as u, useAttrs as w, getCurrentInstance as E, ref as x, computed as m, unref as t, inject as D, createBlock as V, openBlock as y, withCtx as a, createVNode as s, mergeProps as A, renderSlot as B } from "vue";
|
|
1
2
|
import "../roving-focus-group/roving-focus-group.vue2.js";
|
|
2
|
-
import { defineComponent as g, getCurrentInstance as P, ref as h, computed as d, unref as w, inject as D } from "vue";
|
|
3
3
|
import "../roving-focus-group/roving-focus-group-impl.vue2.js";
|
|
4
|
-
import
|
|
4
|
+
import N from "../roving-focus-group/roving-focus-item.vue.js";
|
|
5
5
|
import "../roving-focus-group/types.js";
|
|
6
6
|
import "@vueuse/core";
|
|
7
7
|
import "@vft/utils";
|
|
8
|
-
import { composeEventHandlers as
|
|
8
|
+
import { composeEventHandlers as l, whenMouse as c } from "../../utils/event.js";
|
|
9
9
|
import "../../utils/ns-cover.js";
|
|
10
10
|
import "lodash-es";
|
|
11
|
-
import
|
|
12
|
-
import { DROPDOWN_INJECTION_KEY as
|
|
13
|
-
import { VftCollectionItem as
|
|
14
|
-
import { useDropdown as
|
|
15
|
-
const
|
|
11
|
+
import O from "./dropdown-item-impl.vue2.js";
|
|
12
|
+
import { DROPDOWN_INJECTION_KEY as R } from "./tokens.js";
|
|
13
|
+
import { VftCollectionItem as H } from "./types.js";
|
|
14
|
+
import { useDropdown as L } from "./useDropdown.js";
|
|
15
|
+
const M = u({
|
|
16
16
|
name: "VftDropdownItem",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
DropdownItemImpl: k
|
|
21
|
-
},
|
|
22
|
-
inheritAttrs: !1,
|
|
17
|
+
inheritAttrs: !1
|
|
18
|
+
}), X = /* @__PURE__ */ u({
|
|
19
|
+
...M,
|
|
23
20
|
props: {
|
|
24
|
-
command: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
divided: Boolean,
|
|
30
|
-
textValue: String,
|
|
31
|
-
icon: String
|
|
21
|
+
command: { default: () => ({}) },
|
|
22
|
+
disabled: { type: Boolean, default: !1 },
|
|
23
|
+
divided: { type: Boolean, default: !1 },
|
|
24
|
+
textValue: { default: "" },
|
|
25
|
+
icon: { default: "" }
|
|
32
26
|
},
|
|
33
27
|
emits: ["pointermove", "pointerleave", "click"],
|
|
34
|
-
setup(
|
|
35
|
-
const { elDropdown:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
a((e) => {
|
|
41
|
-
if (t.disabled) {
|
|
42
|
-
m(e);
|
|
28
|
+
setup(f, { emit: p }) {
|
|
29
|
+
const o = f, r = p, v = w(), { elDropdown: i } = L(), P = E(), C = x(null), _ = m(() => t(C)?.textContent ?? ""), { onItemEnter: b, onItemLeave: d } = D(R, void 0), k = l(
|
|
30
|
+
(e) => (r("pointermove", e), e.defaultPrevented),
|
|
31
|
+
c((e) => {
|
|
32
|
+
if (o.disabled) {
|
|
33
|
+
d(e);
|
|
43
34
|
return;
|
|
44
35
|
}
|
|
45
|
-
const
|
|
46
|
-
|
|
36
|
+
const n = e.currentTarget;
|
|
37
|
+
n === document.activeElement || n.contains(document.activeElement) || (b(e), e.defaultPrevented || n?.focus());
|
|
47
38
|
})
|
|
48
|
-
),
|
|
49
|
-
(e) => (
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
), h = l(
|
|
40
|
+
(e) => (r("pointerleave", e), e.defaultPrevented),
|
|
41
|
+
c((e) => {
|
|
42
|
+
d(e);
|
|
52
43
|
})
|
|
53
|
-
), I =
|
|
44
|
+
), I = l(
|
|
54
45
|
(e) => {
|
|
55
|
-
if (!
|
|
56
|
-
return
|
|
46
|
+
if (!o.disabled)
|
|
47
|
+
return r("click", e), e.type !== "keydown" && e.defaultPrevented;
|
|
57
48
|
},
|
|
58
49
|
(e) => {
|
|
59
|
-
if (
|
|
50
|
+
if (o.disabled) {
|
|
60
51
|
e.stopImmediatePropagation();
|
|
61
52
|
return;
|
|
62
53
|
}
|
|
63
|
-
|
|
54
|
+
i?.hideOnClick?.value && i.handleClick?.(), i.commandHandler?.(o.command, P, e);
|
|
64
55
|
}
|
|
65
|
-
),
|
|
66
|
-
return {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
56
|
+
), g = m(() => ({ ...o, ...v }));
|
|
57
|
+
return (e, n) => (y(), V(t(H), {
|
|
58
|
+
disabled: e.disabled,
|
|
59
|
+
"text-value": e.textValue ?? _.value
|
|
60
|
+
}, {
|
|
61
|
+
default: a(() => [
|
|
62
|
+
s(t(N), {
|
|
63
|
+
focusable: !e.disabled
|
|
64
|
+
}, {
|
|
65
|
+
default: a(() => [
|
|
66
|
+
s(O, A(g.value, {
|
|
67
|
+
onPointerleave: t(h),
|
|
68
|
+
onPointermove: t(k),
|
|
69
|
+
onClickimpl: t(I)
|
|
70
|
+
}), {
|
|
71
|
+
default: a(() => [
|
|
72
|
+
B(e.$slots, "default")
|
|
73
|
+
]),
|
|
74
|
+
_: 3
|
|
75
|
+
}, 16, ["onPointerleave", "onPointermove", "onClickimpl"])
|
|
76
|
+
]),
|
|
77
|
+
_: 3
|
|
78
|
+
}, 8, ["focusable"])
|
|
79
|
+
]),
|
|
80
|
+
_: 3
|
|
81
|
+
}, 8, ["disabled", "text-value"]));
|
|
73
82
|
}
|
|
74
83
|
});
|
|
75
84
|
export {
|
|
76
|
-
|
|
85
|
+
X as default
|
|
77
86
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
onKeydown:
|
|
3
|
-
|
|
1
|
+
interface Props {
|
|
2
|
+
onKeydown?: (e: KeyboardEvent) => void;
|
|
3
|
+
}
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
12
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
13
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
14
|
+
} : {
|
|
15
|
+
type: import('vue').PropType<T[K]>;
|
|
16
|
+
required: true;
|
|
4
17
|
};
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
dropdownKls: import("vue").ComputedRef<string[]>;
|
|
10
|
-
role: import("vue").ComputedRef<string>;
|
|
11
|
-
triggerId: import("vue").ComputedRef<string>;
|
|
12
|
-
dropdownListWrapperRef: (el: Element | import("vue").ComponentPublicInstance | null) => void;
|
|
13
|
-
handleKeydown: (e: KeyboardEvent) => void;
|
|
14
|
-
onBlur: (e: Event) => void;
|
|
15
|
-
onFocus: (e: FocusEvent) => void;
|
|
16
|
-
onMousedown: (e: Event) => void;
|
|
17
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
-
onKeydown: {
|
|
19
|
-
type: FunctionConstructor;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
20
22
|
};
|
|
21
|
-
}
|
|
22
|
-
export default _default;
|
|
23
|
+
};
|