ep-craft 0.1.33 → 0.1.34

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.
Files changed (121) hide show
  1. package/dist/components/button/index.d.ts +12 -0
  2. package/dist/components/button-group/index.d.ts +3 -2
  3. package/dist/components/button-group/index.js +7 -3
  4. package/dist/components/button-group/src/button-group.d.ts +48 -0
  5. package/dist/components/button-group/src/button-group.js +7 -0
  6. package/dist/components/button-group/src/button-group.vue.d.ts +16 -0
  7. package/dist/components/button-group/src/button-group.vue.js +42 -0
  8. package/dist/components/button-group/src/button-group2.vue.js +4 -0
  9. package/dist/components/collection/index.d.ts +8 -0
  10. package/dist/components/collection/src/collection-item.vue.d.ts +2 -0
  11. package/dist/components/collection/src/collection-item.vue.js +10 -0
  12. package/dist/components/collection/src/collection-item2.vue.js +8 -0
  13. package/dist/components/collection/src/collection.d.ts +39 -0
  14. package/dist/components/collection/src/collection.js +52 -0
  15. package/dist/components/collection/src/collection.vue.d.ts +2 -0
  16. package/dist/components/collection/src/collection.vue.js +10 -0
  17. package/dist/components/collection/src/collection2.vue.js +7 -0
  18. package/dist/components/collection/src/tokens.d.ts +18 -0
  19. package/dist/components/divider/index.d.ts +24 -2
  20. package/dist/components/divider/index.js +8 -3
  21. package/dist/components/divider/src/divider.d.ts +30 -0
  22. package/dist/components/divider/src/divider.js +34 -0
  23. package/dist/components/divider/src/divider.vue.d.ts +24 -0
  24. package/dist/components/divider/src/divider.vue.js +39 -0
  25. package/dist/components/divider/src/divider2.vue.js +4 -0
  26. package/dist/components/dropdown/index.d.ts +3017 -3
  27. package/dist/components/dropdown/index.js +23 -3
  28. package/dist/components/dropdown/src/dropdown-item-impl.vue.d.ts +79 -0
  29. package/dist/components/dropdown/src/dropdown-item-impl.vue.js +40 -0
  30. package/dist/components/dropdown/src/dropdown-item-impl2.vue.js +68 -0
  31. package/dist/components/dropdown/src/dropdown-item.vue.d.ts +169 -0
  32. package/dist/components/dropdown/src/dropdown-item.vue.js +35 -0
  33. package/dist/components/dropdown/src/dropdown-item2.vue.js +63 -0
  34. package/dist/components/dropdown/src/dropdown-menu.vue.d.ts +27 -0
  35. package/dist/components/dropdown/src/dropdown-menu.vue.js +24 -0
  36. package/dist/components/dropdown/src/dropdown-menu2.vue.js +75 -0
  37. package/dist/components/dropdown/src/dropdown.d.ts +200 -0
  38. package/dist/components/dropdown/src/dropdown.js +201 -0
  39. package/dist/components/dropdown/src/dropdown.vue.d.ts +1126 -0
  40. package/dist/components/dropdown/src/dropdown.vue.js +127 -0
  41. package/dist/components/dropdown/src/dropdown2.vue.js +127 -0
  42. package/dist/components/dropdown/src/instance.d.ts +2 -0
  43. package/dist/components/dropdown/src/tokens.d.ts +13 -0
  44. package/dist/components/dropdown/src/tokens.js +5 -0
  45. package/dist/components/dropdown/src/useDropdown.d.ts +5 -0
  46. package/dist/components/dropdown/src/useDropdown.js +15 -0
  47. package/dist/components/dropdown-item/index.d.ts +1 -4
  48. package/dist/components/dropdown-menu/index.d.ts +1 -4
  49. package/dist/components/index.js +129 -131
  50. package/dist/components/popover/index.d.ts +121 -3
  51. package/dist/components/popover/index.js +19 -4
  52. package/dist/components/popover/src/directive.d.ts +4 -0
  53. package/dist/components/popover/src/directive.js +15 -0
  54. package/dist/components/popover/src/popover.d.ts +291 -0
  55. package/dist/components/popover/src/popover.js +168 -0
  56. package/dist/components/popover/src/popover.vue.d.ts +53 -0
  57. package/dist/components/popover/src/popover.vue.js +125 -0
  58. package/dist/components/popover/src/popover2.vue.js +4 -0
  59. package/dist/components/progress/index.d.ts +35 -2
  60. package/dist/components/progress/index.js +10 -4
  61. package/dist/components/progress/src/progress.d.ts +97 -0
  62. package/dist/components/progress/src/progress.js +104 -0
  63. package/dist/components/progress/src/progress.vue.d.ts +30 -0
  64. package/dist/components/progress/src/progress.vue.js +179 -0
  65. package/dist/components/progress/src/progress2.vue.js +4 -0
  66. package/dist/components/roving-focus-group/index.d.ts +14 -0
  67. package/dist/components/roving-focus-group/index.js +15 -0
  68. package/dist/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +50 -0
  69. package/dist/components/roving-focus-group/src/roving-focus-group-impl.vue.js +10 -0
  70. package/dist/components/roving-focus-group/src/roving-focus-group-impl2.vue.js +115 -0
  71. package/dist/components/roving-focus-group/src/roving-focus-group.d.ts +56 -0
  72. package/dist/components/roving-focus-group/src/roving-focus-group.js +43 -0
  73. package/dist/components/roving-focus-group/src/roving-focus-group.vue.d.ts +67 -0
  74. package/dist/components/roving-focus-group/src/roving-focus-group.vue.js +13 -0
  75. package/dist/components/roving-focus-group/src/roving-focus-group2.vue.js +21 -0
  76. package/dist/components/roving-focus-group/src/roving-focus-item.vue.d.ts +43 -0
  77. package/dist/components/roving-focus-group/src/roving-focus-item.vue.js +20 -0
  78. package/dist/components/roving-focus-group/src/roving-focus-item2.vue.js +78 -0
  79. package/dist/components/roving-focus-group/src/tokens.d.ts +28 -0
  80. package/dist/components/roving-focus-group/src/tokens.js +5 -0
  81. package/dist/components/roving-focus-group/src/utils.d.ts +8 -0
  82. package/dist/components/roving-focus-group/src/utils.js +28 -0
  83. package/dist/components/upload/index.d.ts +45 -2
  84. package/dist/components/upload/index.js +23 -4
  85. package/dist/components/upload/src/ajax.d.ts +9 -0
  86. package/dist/components/upload/src/ajax.js +58 -0
  87. package/dist/components/upload/src/constants.d.ts +5 -0
  88. package/dist/components/upload/src/constants.js +4 -0
  89. package/dist/components/upload/src/upload-content.d.ts +136 -0
  90. package/dist/components/upload/src/upload-content.js +53 -0
  91. package/dist/components/upload/src/upload-content.vue.d.ts +38 -0
  92. package/dist/components/upload/src/upload-content.vue.js +186 -0
  93. package/dist/components/upload/src/upload-content2.vue.js +4 -0
  94. package/dist/components/upload/src/upload-dragger.d.ts +22 -0
  95. package/dist/components/upload/src/upload-dragger.js +19 -0
  96. package/dist/components/upload/src/upload-dragger.vue.d.ts +19 -0
  97. package/dist/components/upload/src/upload-dragger.vue.js +91 -0
  98. package/dist/components/upload/src/upload-dragger2.vue.js +4 -0
  99. package/dist/components/upload/src/upload-list.d.ts +45 -0
  100. package/dist/components/upload/src/upload-list.js +39 -0
  101. package/dist/components/upload/src/upload-list.vue.d.ts +28 -0
  102. package/dist/components/upload/src/upload-list.vue.js +182 -0
  103. package/dist/components/upload/src/upload-list2.vue.js +4 -0
  104. package/dist/components/upload/src/upload.d.ts +361 -0
  105. package/dist/components/upload/src/upload.js +216 -0
  106. package/dist/components/upload/src/upload.vue.d.ts +64 -0
  107. package/dist/components/upload/src/upload.vue.js +150 -0
  108. package/dist/components/upload/src/upload2.vue.js +4 -0
  109. package/dist/components/upload/src/use-handlers.d.ts +60 -0
  110. package/dist/components/upload/src/use-handlers.js +111 -0
  111. package/dist/ep-craft.js +275 -238
  112. package/dist/index.d.ts +43 -0
  113. package/dist/utils/dom/event.js +12 -11
  114. package/dist/utils/objects.js +10 -9
  115. package/dist/utils/vue/install.js +21 -18
  116. package/dist/utils/vue/refs.js +8 -0
  117. package/dist/vendored-components.d.ts +1 -1
  118. package/dist/vendored-components.js +33 -4
  119. package/package.json +1 -1
  120. package/dist/components/dropdown-item/index.js +0 -6
  121. package/dist/components/dropdown-menu/index.js +0 -6
@@ -1,6 +1,26 @@
1
- import { ElDropdown as o } from "element-plus";
2
1
  import { withInstall as p } from "../../utils/with-install.js";
3
- const n = Object.assign({}, o, { name: "EpDropdown" }), d = p(n, "ep-dropdown");
2
+ import e from "./src/dropdown.vue.js";
3
+ import t from "./src/dropdown-item.vue.js";
4
+ import m from "./src/dropdown-menu.vue.js";
5
+ import { FIRST_KEYS as I, FIRST_LAST_KEYS as S, LAST_KEYS as _, dropdownItemProps as u, dropdownMenuProps as f, dropdownProps as l } from "./src/dropdown.js";
6
+ const r = p(t, "ep-dropdown-item"), d = p(m, "ep-dropdown-menu"), n = Object.assign(
7
+ p(e, "ep-dropdown"),
8
+ {
9
+ DropdownItem: r,
10
+ DropdownMenu: d
11
+ }
12
+ );
13
+ n.install = (o) => {
14
+ o.component("ep-dropdown", n), o.component("ep-dropdown-item", r), o.component("ep-dropdown-menu", d);
15
+ };
4
16
  export {
5
- d as EpDropdown
17
+ n as EpDropdown,
18
+ r as EpDropdownItem,
19
+ d as EpDropdownMenu,
20
+ I as FIRST_KEYS,
21
+ S as FIRST_LAST_KEYS,
22
+ _ as LAST_KEYS,
23
+ u as dropdownItemProps,
24
+ f as dropdownMenuProps,
25
+ l as dropdownProps
6
26
  };
@@ -0,0 +1,79 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ readonly command: import("@element-plus/utils").EpPropFinalized<readonly [ObjectConstructor, StringConstructor, NumberConstructor], unknown, unknown, () => {}, boolean>;
3
+ readonly disabled: BooleanConstructor;
4
+ readonly divided: BooleanConstructor;
5
+ readonly textValue: StringConstructor;
6
+ readonly icon: {
7
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
8
+ readonly required: false;
9
+ readonly validator: ((val: unknown) => boolean) | undefined;
10
+ __epPropKey: true;
11
+ };
12
+ }>, {
13
+ ns: {
14
+ namespace: import("vue").ComputedRef<string>;
15
+ b: (blockSuffix?: string) => string;
16
+ e: (element?: string) => string;
17
+ m: (modifier?: string) => string;
18
+ be: (blockSuffix?: string, element?: string) => string;
19
+ em: (element?: string, modifier?: string) => string;
20
+ bm: (blockSuffix?: string, modifier?: string) => string;
21
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
22
+ is: {
23
+ (name: string, state: boolean | undefined): string;
24
+ (name: string): string;
25
+ };
26
+ cssVar: (object: Record<string, string>) => Record<string, string>;
27
+ cssVarName: (name: string) => string;
28
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
29
+ cssVarBlockName: (name: string) => string;
30
+ };
31
+ itemRef: (el: Element | import("vue").ComponentPublicInstance | null) => void;
32
+ dataset: {
33
+ "data-el-collection-item": string;
34
+ };
35
+ role: import("vue").ComputedRef<string>;
36
+ tabIndex: import("vue").Ref<number, number>;
37
+ handleFocus: (e: Event) => void;
38
+ handleKeydown: (event: KeyboardEvent) => void;
39
+ handleMousedown: (e: Event) => void;
40
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "pointerleave" | "pointermove" | "clickimpl")[], "click" | "pointerleave" | "pointermove" | "clickimpl", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
41
+ readonly command: import("@element-plus/utils").EpPropFinalized<readonly [ObjectConstructor, StringConstructor, NumberConstructor], unknown, unknown, () => {}, boolean>;
42
+ readonly disabled: BooleanConstructor;
43
+ readonly divided: BooleanConstructor;
44
+ readonly textValue: StringConstructor;
45
+ readonly icon: {
46
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
47
+ readonly required: false;
48
+ readonly validator: ((val: unknown) => boolean) | undefined;
49
+ __epPropKey: true;
50
+ };
51
+ }>> & Readonly<{
52
+ onClick?: ((...args: any[]) => any) | undefined;
53
+ onPointerleave?: ((...args: any[]) => any) | undefined;
54
+ onPointermove?: ((...args: any[]) => any) | undefined;
55
+ onClickimpl?: ((...args: any[]) => any) | undefined;
56
+ }>, {
57
+ readonly disabled: boolean;
58
+ readonly command: import("@element-plus/utils").EpPropMergeType<readonly [ObjectConstructor, StringConstructor, NumberConstructor], unknown, unknown>;
59
+ readonly divided: boolean;
60
+ }, {}, {
61
+ ElIcon: import("@element-plus/utils").SFCWithInstall<{
62
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("@element-plus/components/icon").IconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
63
+ P: {};
64
+ B: {};
65
+ D: {};
66
+ C: {};
67
+ M: {};
68
+ Defaults: {};
69
+ }, Readonly<import("@element-plus/components/icon").IconProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
70
+ __isFragment?: never;
71
+ __isTeleport?: never;
72
+ __isSuspense?: never;
73
+ } & import("vue").ComponentOptionsBase<Readonly<import("@element-plus/components/icon").IconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
74
+ $slots: {
75
+ default?: (props: {}) => any;
76
+ };
77
+ })>;
78
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
79
+ export default _default;
@@ -0,0 +1,40 @@
1
+ import t from "./dropdown-item-impl2.vue.js";
2
+ import { resolveComponent as a, openBlock as l, createElementBlock as i, Fragment as p, normalizeClass as u, createCommentVNode as s, createElementVNode as f, mergeProps as $, withModifiers as b, createBlock as r, withCtx as w, renderSlot as d, resolveDynamicComponent as v } from "vue";
3
+ import k from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const y = ["aria-disabled", "tabindex", "role"];
5
+ function C(e, o, F, M, B, E) {
6
+ const m = a("el-icon");
7
+ return l(), i(p, null, [
8
+ e.divided ? (l(), i("li", {
9
+ key: 0,
10
+ role: "separator",
11
+ class: u(e.ns.bem("menu", "item", "divided"))
12
+ }, null, 2)) : s("", !0),
13
+ f("li", $({ 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] = b((...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 || e.$slots.icon ? (l(), r(m, { key: 0 }, {
26
+ default: w(() => [
27
+ d(e.$slots, "icon", {}, () => [
28
+ (l(), r(v(e.icon)))
29
+ ])
30
+ ]),
31
+ _: 3
32
+ })) : s("", !0),
33
+ d(e.$slots, "default")
34
+ ], 16, y)
35
+ ], 64);
36
+ }
37
+ const g = /* @__PURE__ */ k(t, [["render", C]]);
38
+ export {
39
+ g as default
40
+ };
@@ -0,0 +1,68 @@
1
+ import { defineComponent as E, inject as e, computed as _ } from "vue";
2
+ import "../../roving-focus-group/src/roving-focus-group.vue.js";
3
+ import "../../roving-focus-group/src/roving-focus-item2.vue.js";
4
+ import { ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY as O } from "../../roving-focus-group/src/tokens.js";
5
+ import { EVENT_CODE as t } from "../../../constants/aria.js";
6
+ import "@vue/shared";
7
+ import "lodash-unified";
8
+ import "@vueuse/core";
9
+ import { composeEventHandlers as N, getEventCode as C } from "../../../utils/dom/event.js";
10
+ import "@element-plus/icons-vue";
11
+ import { composeRefs as v } from "../../../utils/vue/refs.js";
12
+ import { ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY as T } from "../../roving-focus-group/src/roving-focus-group.js";
13
+ import { COLLECTION_ITEM_SIGN as R } from "../../collection/src/collection.js";
14
+ import { ElIcon as w } from "../../icon/index.js";
15
+ import { useNamespace as K } from "../../../hooks/use-namespace/index.js";
16
+ import "../../../hooks/use-size/index.js";
17
+ import "@popperjs/core";
18
+ import "../../../hooks/use-z-index/index.js";
19
+ import "../../../hooks/use-delayed-toggle/index.js";
20
+ import "../../../hooks/use-aria/index.js";
21
+ import "../../../hooks/use-model-toggle/index.js";
22
+ import "../../../hooks/use-empty-values/index.js";
23
+ import { dropdownItemProps as L } from "./dropdown.js";
24
+ import { DROPDOWN_INJECTION_KEY as g } from "./tokens.js";
25
+ const $ = E({
26
+ name: "EpDropdownItemImpl",
27
+ components: {
28
+ ElIcon: w
29
+ },
30
+ props: L,
31
+ emits: ["pointermove", "pointerleave", "click", "clickimpl"],
32
+ setup(h, { emit: m }) {
33
+ const n = K("dropdown"), { role: r } = e(g, void 0), { collectionItemRef: i } = e(
34
+ T,
35
+ void 0
36
+ ), {
37
+ rovingFocusGroupItemRef: p,
38
+ tabIndex: s,
39
+ handleFocus: c,
40
+ handleKeydown: d,
41
+ handleMousedown: l
42
+ } = e(O, void 0), I = v(
43
+ i,
44
+ p
45
+ ), a = _(() => r.value === "menu" ? "menuitem" : r.value === "navigation" ? "link" : "button"), u = N((o) => {
46
+ const f = C(o);
47
+ if ([t.enter, t.numpadEnter, t.space].includes(
48
+ f
49
+ ))
50
+ return o.preventDefault(), o.stopImmediatePropagation(), m("clickimpl", o), !0;
51
+ }, d);
52
+ return {
53
+ ns: n,
54
+ itemRef: I,
55
+ dataset: {
56
+ [R]: ""
57
+ },
58
+ role: a,
59
+ tabIndex: s,
60
+ handleFocus: c,
61
+ handleKeydown: u,
62
+ handleMousedown: l
63
+ };
64
+ }
65
+ });
66
+ export {
67
+ $ as default
68
+ };
@@ -0,0 +1,169 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ readonly command: import("@element-plus/utils").EpPropFinalized<readonly [ObjectConstructor, StringConstructor, NumberConstructor], unknown, unknown, () => {}, boolean>;
3
+ readonly disabled: BooleanConstructor;
4
+ readonly divided: BooleanConstructor;
5
+ readonly textValue: StringConstructor;
6
+ readonly icon: {
7
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
8
+ readonly required: false;
9
+ readonly validator: ((val: unknown) => boolean) | undefined;
10
+ __epPropKey: true;
11
+ };
12
+ }>, {
13
+ handleClick: (event: PointerEvent) => void;
14
+ handlePointerMove: (event: PointerEvent) => void;
15
+ handlePointerLeave: (event: PointerEvent) => void;
16
+ propsAndAttrs: import("vue").ComputedRef<{
17
+ class?: import("vue").ClassValue;
18
+ style?: import("vue").StyleValue;
19
+ disabled: boolean;
20
+ command: import("@element-plus/utils").EpPropMergeType<readonly [ObjectConstructor, StringConstructor, NumberConstructor], unknown, unknown>;
21
+ divided: boolean;
22
+ icon: import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown> | undefined;
23
+ textValue: string | undefined;
24
+ onClick: ((...args: any[]) => any) | undefined;
25
+ onPointerleave: ((...args: any[]) => any) | undefined;
26
+ onPointermove: ((...args: any[]) => any) | undefined;
27
+ }>;
28
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "pointerleave" | "pointermove")[], "click" | "pointerleave" | "pointermove", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
29
+ readonly command: import("@element-plus/utils").EpPropFinalized<readonly [ObjectConstructor, StringConstructor, NumberConstructor], unknown, unknown, () => {}, boolean>;
30
+ readonly disabled: BooleanConstructor;
31
+ readonly divided: BooleanConstructor;
32
+ readonly textValue: StringConstructor;
33
+ readonly icon: {
34
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
35
+ readonly required: false;
36
+ readonly validator: ((val: unknown) => boolean) | undefined;
37
+ __epPropKey: true;
38
+ };
39
+ }>> & Readonly<{
40
+ onClick?: ((...args: any[]) => any) | undefined;
41
+ onPointerleave?: ((...args: any[]) => any) | undefined;
42
+ onPointermove?: ((...args: any[]) => any) | undefined;
43
+ }>, {
44
+ readonly disabled: boolean;
45
+ readonly command: import("@element-plus/utils").EpPropMergeType<readonly [ObjectConstructor, StringConstructor, NumberConstructor], unknown, unknown>;
46
+ readonly divided: boolean;
47
+ }, {}, {
48
+ ElRovingFocusItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
49
+ focusable: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ };
53
+ active: BooleanConstructor;
54
+ }>, {
55
+ id: import("vue").Ref<string, string>;
56
+ handleKeydown: (event: Event) => void;
57
+ handleFocus: (event: Event) => void;
58
+ handleMousedown: (event: Event) => void;
59
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "keydown" | "mousedown")[], "focus" | "keydown" | "mousedown", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
60
+ focusable: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
64
+ active: BooleanConstructor;
65
+ }>> & Readonly<{
66
+ onFocus?: ((...args: any[]) => any) | undefined;
67
+ onKeydown?: ((...args: any[]) => any) | undefined;
68
+ onMousedown?: ((...args: any[]) => any) | undefined;
69
+ }>, {
70
+ active: boolean;
71
+ focusable: boolean;
72
+ }, {}, {
73
+ ElRovingFocusCollectionItem: {
74
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
75
+ P: {};
76
+ B: {};
77
+ D: {};
78
+ C: {};
79
+ M: {};
80
+ Defaults: {};
81
+ }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
82
+ __isFragment?: never;
83
+ __isTeleport?: never;
84
+ __isSuspense?: never;
85
+ } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
86
+ name: string;
87
+ setup(_: unknown, { attrs }: import("vue").SetupContext): void;
88
+ };
89
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
90
+ ElDropdownItemImpl: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
91
+ readonly command: import("@element-plus/utils").EpPropFinalized<readonly [ObjectConstructor, StringConstructor, NumberConstructor], unknown, unknown, () => {}, boolean>;
92
+ readonly disabled: BooleanConstructor;
93
+ readonly divided: BooleanConstructor;
94
+ readonly textValue: StringConstructor;
95
+ readonly icon: {
96
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
97
+ readonly required: false;
98
+ readonly validator: ((val: unknown) => boolean) | undefined;
99
+ __epPropKey: true;
100
+ };
101
+ }>, {
102
+ ns: {
103
+ namespace: import("vue").ComputedRef<string>;
104
+ b: (blockSuffix?: string) => string;
105
+ e: (element?: string) => string;
106
+ m: (modifier?: string) => string;
107
+ be: (blockSuffix?: string, element?: string) => string;
108
+ em: (element?: string, modifier?: string) => string;
109
+ bm: (blockSuffix?: string, modifier?: string) => string;
110
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
111
+ is: {
112
+ (name: string, state: boolean | undefined): string;
113
+ (name: string): string;
114
+ };
115
+ cssVar: (object: Record<string, string>) => Record<string, string>;
116
+ cssVarName: (name: string) => string;
117
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
118
+ cssVarBlockName: (name: string) => string;
119
+ };
120
+ itemRef: (el: Element | import("vue").ComponentPublicInstance | null) => void;
121
+ dataset: {
122
+ "data-el-collection-item": string;
123
+ };
124
+ role: import("vue").ComputedRef<string>;
125
+ tabIndex: import("vue").Ref<number, number>;
126
+ handleFocus: (e: Event) => void;
127
+ handleKeydown: (event: KeyboardEvent) => void;
128
+ handleMousedown: (e: Event) => void;
129
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "pointerleave" | "pointermove" | "clickimpl")[], "click" | "pointerleave" | "pointermove" | "clickimpl", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
130
+ readonly command: import("@element-plus/utils").EpPropFinalized<readonly [ObjectConstructor, StringConstructor, NumberConstructor], unknown, unknown, () => {}, boolean>;
131
+ readonly disabled: BooleanConstructor;
132
+ readonly divided: BooleanConstructor;
133
+ readonly textValue: StringConstructor;
134
+ readonly icon: {
135
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
136
+ readonly required: false;
137
+ readonly validator: ((val: unknown) => boolean) | undefined;
138
+ __epPropKey: true;
139
+ };
140
+ }>> & Readonly<{
141
+ onClick?: ((...args: any[]) => any) | undefined;
142
+ onPointerleave?: ((...args: any[]) => any) | undefined;
143
+ onPointermove?: ((...args: any[]) => any) | undefined;
144
+ onClickimpl?: ((...args: any[]) => any) | undefined;
145
+ }>, {
146
+ readonly disabled: boolean;
147
+ readonly command: import("@element-plus/utils").EpPropMergeType<readonly [ObjectConstructor, StringConstructor, NumberConstructor], unknown, unknown>;
148
+ readonly divided: boolean;
149
+ }, {}, {
150
+ ElIcon: import("@element-plus/utils").SFCWithInstall<{
151
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../../icon/index.js").IconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
152
+ P: {};
153
+ B: {};
154
+ D: {};
155
+ C: {};
156
+ M: {};
157
+ Defaults: {};
158
+ }, Readonly<import("../../icon/index.js").IconProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
159
+ __isFragment?: never;
160
+ __isTeleport?: never;
161
+ __isSuspense?: never;
162
+ } & import("vue").ComponentOptionsBase<Readonly<import("../../icon/index.js").IconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
163
+ $slots: {
164
+ default?: (props: {}) => any;
165
+ };
166
+ })>;
167
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
168
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
169
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import l from "./dropdown-item2.vue.js";
2
+ import { resolveComponent as n, openBlock as s, createBlock as p, withCtx as e, createVNode as m, mergeProps as a, createSlots as d, renderSlot as r } from "vue";
3
+ import c from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ function f(o, _, u, v, P, $) {
5
+ const t = n("el-dropdown-item-impl"), i = n("el-roving-focus-item");
6
+ return s(), p(i, {
7
+ focusable: !o.disabled
8
+ }, {
9
+ default: e(() => [
10
+ m(t, a(o.propsAndAttrs, {
11
+ onPointerleave: o.handlePointerLeave,
12
+ onPointermove: o.handlePointerMove,
13
+ onClickimpl: o.handleClick
14
+ }), d({
15
+ default: e(() => [
16
+ r(o.$slots, "default")
17
+ ]),
18
+ _: 2
19
+ }, [
20
+ o.$slots.icon ? {
21
+ name: "icon",
22
+ fn: e(() => [
23
+ r(o.$slots, "icon")
24
+ ]),
25
+ key: "0"
26
+ } : void 0
27
+ ]), 1040, ["onPointerleave", "onPointermove", "onClickimpl"])
28
+ ]),
29
+ _: 3
30
+ }, 8, ["focusable"]);
31
+ }
32
+ const w = /* @__PURE__ */ c(l, [["render", f]]);
33
+ export {
34
+ w as default
35
+ };
@@ -0,0 +1,63 @@
1
+ import { defineComponent as E, getCurrentInstance as P, inject as h, computed as k } from "vue";
2
+ import "../../roving-focus-group/src/roving-focus-group.vue.js";
3
+ import C from "../../roving-focus-group/src/roving-focus-item.vue.js";
4
+ import "@vue/shared";
5
+ import "lodash-unified";
6
+ import "@vueuse/core";
7
+ import { composeEventHandlers as i, whenMouse as d } from "../../../utils/dom/event.js";
8
+ import "@element-plus/icons-vue";
9
+ import "../../roving-focus-group/src/roving-focus-group.js";
10
+ import _ from "./dropdown-item-impl.vue.js";
11
+ import { useDropdown as O } from "./useDropdown.js";
12
+ import { dropdownItemProps as b } from "./dropdown.js";
13
+ import { DROPDOWN_INJECTION_KEY as g } from "./tokens.js";
14
+ const K = E({
15
+ name: "EpDropdownItem",
16
+ components: {
17
+ ElRovingFocusItem: C,
18
+ ElDropdownItemImpl: _
19
+ },
20
+ inheritAttrs: !1,
21
+ props: b,
22
+ emits: ["pointermove", "pointerleave", "click"],
23
+ setup(o, { emit: r, attrs: s }) {
24
+ const { elDropdown: t } = O(), l = P(), { onItemEnter: p, onItemLeave: m } = h(
25
+ g,
26
+ void 0
27
+ ), u = i(
28
+ (e) => (r("pointermove", e), e.defaultPrevented),
29
+ d((e) => {
30
+ if (o.disabled) {
31
+ m(e);
32
+ return;
33
+ }
34
+ const n = e.currentTarget;
35
+ n === document.activeElement || n.contains(document.activeElement) || (p(e), e.defaultPrevented || n == null || n.focus({
36
+ preventScroll: !0
37
+ }));
38
+ })
39
+ ), f = i((e) => (r("pointerleave", e), e.defaultPrevented), d(m)), v = i(
40
+ (e) => {
41
+ if (!o.disabled)
42
+ return r("click", e), e.type !== "keydown" && e.defaultPrevented;
43
+ },
44
+ (e) => {
45
+ var n, c, a;
46
+ if (o.disabled) {
47
+ e.stopImmediatePropagation();
48
+ return;
49
+ }
50
+ (n = t == null ? void 0 : t.hideOnClick) != null && n.value && ((c = t.handleClick) == null || c.call(t)), (a = t.commandHandler) == null || a.call(t, o.command, l, e);
51
+ }
52
+ ), I = k(() => ({ ...o, ...s }));
53
+ return {
54
+ handleClick: v,
55
+ handlePointerMove: u,
56
+ handlePointerLeave: f,
57
+ propsAndAttrs: I
58
+ };
59
+ }
60
+ });
61
+ export {
62
+ K as default
63
+ };
@@ -0,0 +1,27 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ onKeydown: {
3
+ readonly type: import("vue").PropType<(e: KeyboardEvent) => void>;
4
+ readonly required: false;
5
+ readonly validator: ((val: unknown) => boolean) | undefined;
6
+ __epPropKey: true;
7
+ };
8
+ }>, {
9
+ size: import("vue").ComputedRef<string> | undefined;
10
+ rovingFocusGroupRootStyle: import("vue").Ref<import("vue").StyleValue, import("vue").StyleValue>;
11
+ dropdownKls: import("vue").ComputedRef<string[]>;
12
+ role: import("vue").ComputedRef<"listbox" | "grid" | "menu" | "tooltip" | "dialog" | "tree" | "group" | "navigation" | undefined>;
13
+ triggerId: import("vue").ComputedRef<string>;
14
+ dropdownListWrapperRef: (el: Element | import("vue").ComponentPublicInstance | null) => void;
15
+ handleKeydown: (event: KeyboardEvent) => void;
16
+ onBlur: (e: Event) => void;
17
+ handleFocus: (e: FocusEvent) => void;
18
+ onMousedown: (e: Event) => void;
19
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
20
+ onKeydown: {
21
+ readonly type: import("vue").PropType<(e: KeyboardEvent) => void>;
22
+ readonly required: false;
23
+ readonly validator: ((val: unknown) => boolean) | undefined;
24
+ __epPropKey: true;
25
+ };
26
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
27
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import l from "./dropdown-menu2.vue.js";
2
+ import { openBlock as s, createElementBlock as d, withModifiers as r, normalizeStyle as i, normalizeClass as u, renderSlot as p } from "vue";
3
+ import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const t = ["role", "aria-labelledby"];
5
+ function f(o, e, m, w, y, b) {
6
+ return s(), d("ul", {
7
+ ref: o.dropdownListWrapperRef,
8
+ class: u(o.dropdownKls),
9
+ style: i(o.rovingFocusGroupRootStyle),
10
+ tabindex: -1,
11
+ role: o.role,
12
+ "aria-labelledby": o.triggerId,
13
+ onFocusin: e[0] || (e[0] = (...n) => o.handleFocus && o.handleFocus(...n)),
14
+ onFocusout: e[1] || (e[1] = (...n) => o.onBlur && o.onBlur(...n)),
15
+ onKeydown: e[2] || (e[2] = r((...n) => o.handleKeydown && o.handleKeydown(...n), ["self"])),
16
+ onMousedown: e[3] || (e[3] = r((...n) => o.onMousedown && o.onMousedown(...n), ["self"]))
17
+ }, [
18
+ p(o.$slots, "default")
19
+ ], 46, t);
20
+ }
21
+ const B = /* @__PURE__ */ a(l, [["render", f]]);
22
+ export {
23
+ B as default
24
+ };
@@ -0,0 +1,75 @@
1
+ import { defineComponent as K, inject as e, computed as T } from "vue";
2
+ import "@vue/shared";
3
+ import "lodash-unified";
4
+ import "@vueuse/core";
5
+ import { composeEventHandlers as F, getEventCode as D } from "../../../utils/dom/event.js";
6
+ import "@element-plus/icons-vue";
7
+ import { composeRefs as G } from "../../../utils/vue/refs.js";
8
+ import { EVENT_CODE as y } from "../../../constants/aria.js";
9
+ import "../../roving-focus-group/src/roving-focus-group.vue.js";
10
+ import "../../roving-focus-group/src/roving-focus-item2.vue.js";
11
+ import { ROVING_FOCUS_GROUP_INJECTION_KEY as L } from "../../roving-focus-group/src/tokens.js";
12
+ import { ROVING_FOCUS_COLLECTION_INJECTION_KEY as b } from "../../roving-focus-group/src/roving-focus-group.js";
13
+ import { useNamespace as J } from "../../../hooks/use-namespace/index.js";
14
+ import "../../../hooks/use-size/index.js";
15
+ import "@popperjs/core";
16
+ import "../../../hooks/use-z-index/index.js";
17
+ import "../../../hooks/use-delayed-toggle/index.js";
18
+ import "../../../hooks/use-aria/index.js";
19
+ import "../../../hooks/use-model-toggle/index.js";
20
+ import "../../../hooks/use-empty-values/index.js";
21
+ import { DROPDOWN_INJECTION_KEY as S } from "./tokens.js";
22
+ import { dropdownMenuProps as U } from "./dropdown.js";
23
+ import { useDropdown as Y } from "./useDropdown.js";
24
+ const io = K({
25
+ name: "EpDropdownMenu",
26
+ props: U,
27
+ setup(n) {
28
+ const m = J("dropdown"), { _elDropdownSize: i } = Y(), r = i.value, { contentRef: p, role: s, triggerId: c, isUsingKeyboard: d, handleClose: u } = e(S, void 0), {
29
+ rovingFocusGroupRef: f,
30
+ rovingFocusGroupRootStyle: a,
31
+ onBlur: l,
32
+ onFocus: E,
33
+ onKeydown: O,
34
+ onMousedown: _
35
+ } = e(L, void 0), { collectionRef: C } = e(
36
+ b,
37
+ void 0
38
+ ), N = T(() => [m.b("menu"), m.bm("menu", r == null ? void 0 : r.value)]), I = G(
39
+ p,
40
+ f,
41
+ C
42
+ ), v = F(
43
+ (o) => {
44
+ var t;
45
+ (t = n.onKeydown) == null || t.call(n, o);
46
+ },
47
+ (o) => {
48
+ const { currentTarget: t, target: R } = o, g = D(o);
49
+ if (t.contains(
50
+ R
51
+ ), y.tab === g)
52
+ return u();
53
+ O(o);
54
+ }
55
+ );
56
+ function w(o) {
57
+ d.value && E(o);
58
+ }
59
+ return {
60
+ size: r,
61
+ rovingFocusGroupRootStyle: a,
62
+ dropdownKls: N,
63
+ role: s,
64
+ triggerId: c,
65
+ dropdownListWrapperRef: I,
66
+ handleKeydown: v,
67
+ onBlur: l,
68
+ handleFocus: w,
69
+ onMousedown: _
70
+ };
71
+ }
72
+ });
73
+ export {
74
+ io as default
75
+ };