ep-craft 0.1.22 → 0.1.23

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 (111) hide show
  1. package/dist/components/affix/affix.d.ts +19 -19
  2. package/dist/components/affix/affix.js +61 -53
  3. package/dist/components/alert/alert.d.ts +71 -17
  4. package/dist/components/alert/alert.js +99 -43
  5. package/dist/components/anchor/anchor.d.ts +19 -19
  6. package/dist/components/anchor/anchor.js +166 -102
  7. package/dist/components/anchor/constants.d.ts +15 -0
  8. package/dist/components/anchor/constants.js +4 -0
  9. package/dist/components/anchor-link/anchor-link.d.ts +1 -1
  10. package/dist/components/anchor-link/anchor-link.js +39 -26
  11. package/dist/components/button/EpButton.vue.d.ts +8 -8
  12. package/dist/components/button/EpButton.vue.js +5 -5
  13. package/dist/components/button/constants.d.ts +7 -0
  14. package/dist/components/button/constants.js +6 -0
  15. package/dist/components/check-tag/EpCheckTag.vue.d.ts +1 -1
  16. package/dist/components/collapse-transition/index.js +2 -2
  17. package/dist/components/config-provider/src/constants.js +4 -0
  18. package/dist/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
  19. package/dist/components/config-provider/src/hooks/use-global-config.js +24 -0
  20. package/dist/components/form/src/constants.js +2 -1
  21. package/dist/components/form/src/hooks/use-form-common-props.d.ts +2 -2
  22. package/dist/components/form/src/hooks/use-form-common-props.js +17 -0
  23. package/dist/components/form/src/hooks/use-form-item.js +51 -0
  24. package/dist/components/icon/index.js +5 -5
  25. package/dist/components/menu/menu-collapse-transition.vue.js +10 -6
  26. package/dist/components/menu/menu.d.ts +47 -47
  27. package/dist/components/menu/menu.js +59 -52
  28. package/dist/components/menu/use-menu-color.d.ts +2 -0
  29. package/dist/components/menu/use-menu-color.js +11 -0
  30. package/dist/components/menu/use-menu-css-var.d.ts +2 -0
  31. package/dist/components/menu/use-menu-css-var.js +30 -0
  32. package/dist/components/menu/utils/menu-bar.d.ts +7 -0
  33. package/dist/components/menu/utils/menu-bar.js +15 -0
  34. package/dist/components/menu/utils/menu-item.d.ts +9 -0
  35. package/dist/components/menu/utils/menu-item.js +50 -0
  36. package/dist/components/menu/utils/submenu.d.ts +11 -0
  37. package/dist/components/menu/utils/submenu.js +49 -0
  38. package/dist/components/menu-item/EpMenuItem.vue.js +17 -13
  39. package/dist/components/menu-item-group/EpMenuItemGroup.vue.js +1 -1
  40. package/dist/components/popper/src/composables/use-content.d.ts +6 -6
  41. package/dist/components/popper/src/content.vue.d.ts +6 -6
  42. package/dist/components/popper/src/popper.d.ts +2 -2
  43. package/dist/components/radio/constants.d.ts +64 -0
  44. package/dist/components/radio/constants.js +4 -0
  45. package/dist/components/radio/radio.d.ts +98 -19
  46. package/dist/components/radio/radio.js +101 -43
  47. package/dist/components/radio/use-radio.d.ts +13 -0
  48. package/dist/components/radio/use-radio.js +43 -0
  49. package/dist/components/radio-button/radio-button.d.ts +46 -16
  50. package/dist/components/radio-button/radio-button.js +37 -29
  51. package/dist/components/radio-group/radio-group.d.ts +142 -28
  52. package/dist/components/radio-group/radio-group.js +136 -55
  53. package/dist/components/sub-menu/sub-menu.d.ts +19 -19
  54. package/dist/components/sub-menu/sub-menu.js +65 -58
  55. package/dist/components/tab-pane/tab-pane.d.ts +45 -8
  56. package/dist/components/tab-pane/tab-pane.js +66 -32
  57. package/dist/components/tabs/composables/use-tab-nav-touch.d.ts +19 -0
  58. package/dist/components/tabs/composables/use-tab-nav-touch.js +58 -0
  59. package/dist/components/tabs/constants.d.ts +63 -0
  60. package/dist/components/tabs/constants.js +4 -0
  61. package/dist/components/tabs/tab-bar.d.ts +97 -0
  62. package/dist/components/tabs/tab-bar.vue.d.ts +14 -0
  63. package/dist/components/tabs/tab-bar.vue.js +80 -0
  64. package/dist/components/tabs/tab-bar2.vue.js +4 -0
  65. package/dist/components/tabs/tab-nav.d.ts +295 -0
  66. package/dist/components/tabs/tab-nav.js +297 -0
  67. package/dist/components/tabs/tabs.d.ts +71 -28
  68. package/dist/components/tabs/tabs.js +165 -93
  69. package/dist/components/tag/EpTag.vue.d.ts +3 -3
  70. package/dist/components/tag/EpTag.vue.js +3 -3
  71. package/dist/components/tooltip/index.d.ts +34 -34
  72. package/dist/components/tooltip/index.js +12 -12
  73. package/dist/components/tooltip/src/content.vue.d.ts +8 -8
  74. package/dist/components/tooltip/src/tooltip.d.ts +2 -2
  75. package/dist/components/tooltip/src/tooltip.vue.d.ts +12 -12
  76. package/dist/components/tooltip/src/trigger.d.ts +1 -1
  77. package/dist/constants/event.js +5 -0
  78. package/dist/directives/click-outside/index.js +49 -0
  79. package/dist/hooks/index.d.ts +1 -0
  80. package/dist/hooks/use-deprecated/index.js +25 -0
  81. package/dist/hooks/use-locale/index.js +24 -0
  82. package/dist/hooks/use-ordered-children/index.js +53 -0
  83. package/dist/hooks/use-popper/index.d.ts +6 -6
  84. package/dist/hooks/use-prop/index.js +11 -0
  85. package/dist/hooks/use-size/index.d.ts +3 -3
  86. package/dist/hooks/use-size/index.js +14 -6
  87. package/dist/hooks/use-wheel/defaults.d.ts +27 -0
  88. package/dist/hooks/use-wheel/defaults.js +4 -0
  89. package/dist/hooks/use-wheel/index.d.ts +13 -0
  90. package/dist/hooks/use-wheel/index.js +26 -0
  91. package/dist/utils/browser.js +6 -5
  92. package/dist/utils/dom/aria.js +13 -6
  93. package/dist/utils/dom/element.js +16 -0
  94. package/dist/utils/dom/position.js +18 -0
  95. package/dist/utils/dom/scroll.js +50 -0
  96. package/dist/utils/dom/style.js +40 -13
  97. package/dist/utils/easings.js +7 -0
  98. package/dist/utils/error.js +11 -7
  99. package/dist/utils/numbers.js +6 -0
  100. package/dist/utils/objects.js +7 -0
  101. package/dist/utils/raf.js +6 -0
  102. package/dist/utils/strings.js +8 -0
  103. package/dist/utils/throttleByRaf.js +15 -0
  104. package/dist/utils/types.js +19 -16
  105. package/dist/utils/typescript.js +4 -0
  106. package/dist/utils/vue/icon.js +20 -0
  107. package/dist/utils/vue/vnode.d.ts +4 -4
  108. package/dist/utils/vue/vnode.js +17 -0
  109. package/dist/vendored-components.d.ts +6 -3
  110. package/dist/vendored-components.js +11 -5
  111. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ import { ref as p, getCurrentInstance as n, inject as e, computed as c } from "vue";
2
+ import "@vue/shared";
3
+ import "lodash-unified";
4
+ import "@vueuse/core";
5
+ import "@element-plus/icons-vue";
6
+ import "../../../../hooks/use-size/index.js";
7
+ import "@popperjs/core";
8
+ import "../../../../hooks/use-z-index/index.js";
9
+ import "../../../../hooks/use-delayed-toggle/index.js";
10
+ import "../../../../hooks/use-aria/index.js";
11
+ import "../../../../hooks/use-model-toggle/index.js";
12
+ import "../../../../hooks/use-empty-values/index.js";
13
+ import { configProviderContextKey as f } from "../constants.js";
14
+ const t = p();
15
+ function I(r, i = void 0) {
16
+ const m = n() ? e(f, t) : t;
17
+ return c(() => {
18
+ var o;
19
+ return ((o = m.value) == null ? void 0 : o[r]) ?? i;
20
+ });
21
+ }
22
+ export {
23
+ I as useGlobalConfig
24
+ };
@@ -1,4 +1,5 @@
1
- const t = Symbol("formItemContextKey");
1
+ const o = Symbol("formContextKey"), t = Symbol("formItemContextKey");
2
2
  export {
3
+ o as formContextKey,
3
4
  t as formItemContextKey
4
5
  };
@@ -1,6 +1,6 @@
1
1
  import type { ComponentSize } from '@element-plus/constants';
2
2
  import type { MaybeRef } from 'vue';
3
- export declare const useFormSize: (fallback?: MaybeRef<ComponentSize | undefined>, ignore?: Partial<Record<"prop" | "form" | "formItem" | "global", boolean>>) => import("vue").ComputedRef<"" | "default" | "small" | "large">;
3
+ export declare const useFormSize: (fallback?: MaybeRef<ComponentSize | undefined>, ignore?: Partial<Record<"prop" | "form" | "formItem" | "global", boolean>>) => import("vue").ComputedRef<"" | "small" | "default" | "large">;
4
4
  export declare const useFormDisabled: (fallback?: MaybeRef<boolean | undefined>) => import("vue").ComputedRef<boolean>;
5
- export declare const useSize: (fallback?: MaybeRef<ComponentSize | undefined>, ignore?: Partial<Record<"prop" | "form" | "formItem" | "global", boolean>>) => import("vue").ComputedRef<"" | "default" | "small" | "large">;
5
+ export declare const useSize: (fallback?: MaybeRef<ComponentSize | undefined>, ignore?: Partial<Record<"prop" | "form" | "formItem" | "global", boolean>>) => import("vue").ComputedRef<"" | "small" | "default" | "large">;
6
6
  export declare const useDisabled: (fallback?: MaybeRef<boolean | undefined>) => import("vue").ComputedRef<boolean>;
@@ -0,0 +1,17 @@
1
+ import { ref as c, inject as r, computed as d, unref as l } from "vue";
2
+ import { useGlobalSize as f } from "../../../../hooks/use-size/index.js";
3
+ import { useProp as m } from "../../../../hooks/use-prop/index.js";
4
+ import { formContextKey as n, formItemContextKey as p } from "../constants.js";
5
+ const y = (t, o = {}) => {
6
+ const e = c(void 0), u = o.prop ? e : m("size"), a = o.global ? e : f(), s = o.form ? { size: void 0 } : r(n, void 0), i = o.formItem ? { size: void 0 } : r(p, void 0);
7
+ return d(
8
+ () => u.value || l(t) || (i == null ? void 0 : i.size) || (s == null ? void 0 : s.size) || a.value || ""
9
+ );
10
+ }, C = (t) => {
11
+ const o = m("disabled"), e = r(n, void 0);
12
+ return d(() => o.value ?? l(t) ?? (e == null ? void 0 : e.disabled) ?? !1);
13
+ };
14
+ export {
15
+ C as useFormDisabled,
16
+ y as useFormSize
17
+ };
@@ -0,0 +1,51 @@
1
+ import { inject as f, ref as s, getCurrentInstance as y, computed as h, onMounted as t, watch as w, toRef as F, onUnmounted as L } from "vue";
2
+ import { useId as E } from "../../../../hooks/use-id/index.js";
3
+ import { formContextKey as K, formItemContextKey as U } from "../constants.js";
4
+ const W = () => {
5
+ const v = f(K, void 0), u = f(U, void 0);
6
+ return {
7
+ form: v,
8
+ formItem: u
9
+ };
10
+ }, k = (v, {
11
+ formItemContext: u,
12
+ disableIdGeneration: c,
13
+ disableIdManagement: l
14
+ }) => {
15
+ c || (c = s(!1)), l || (l = s(!1));
16
+ const e = y(), a = () => {
17
+ let r = e == null ? void 0 : e.parent;
18
+ for (; r; ) {
19
+ if (r.type.name === "ElFormItem")
20
+ return !1;
21
+ if (r.type.name === "ElLabelWrap")
22
+ return !0;
23
+ r = r.parent;
24
+ }
25
+ return !1;
26
+ }, p = s();
27
+ let n;
28
+ const o = h(() => {
29
+ var r;
30
+ return !!(!(v.label || v.ariaLabel) && u && u.inputIds && ((r = u.inputIds) == null ? void 0 : r.length) <= 1);
31
+ });
32
+ return t(() => {
33
+ n = w(
34
+ [F(v, "id"), c],
35
+ ([r, d]) => {
36
+ const i = r ?? (d ? void 0 : E().value);
37
+ i !== p.value && (u != null && u.removeInputId && !a() && (p.value && u.removeInputId(p.value), !(l != null && l.value) && !d && i && u.addInputId(i)), p.value = i);
38
+ },
39
+ { immediate: !0 }
40
+ );
41
+ }), L(() => {
42
+ n && n(), u != null && u.removeInputId && p.value && u.removeInputId(p.value);
43
+ }), {
44
+ isLabeledByFormItem: o,
45
+ inputId: p
46
+ };
47
+ };
48
+ export {
49
+ W as useFormItem,
50
+ k as useFormItemInputId
51
+ };
@@ -1,14 +1,14 @@
1
- import { withInstall as o } from "../../utils/with-install.js";
1
+ import { withInstall as t } from "../../utils/with-install.js";
2
2
  import "@vue/shared";
3
3
  import "lodash-unified";
4
4
  import "@vueuse/core";
5
5
  import "@element-plus/icons-vue";
6
6
  import "vue";
7
7
  import { withInstall as i } from "../../utils/vue/install.js";
8
- import t from "./src/icon.vue.js";
8
+ import o from "./src/icon.vue.js";
9
9
  import "./src/icon.js";
10
- i(t);
11
- const I = o(t, "ep-icon");
10
+ const f = i(o), h = t(o, "ep-icon");
12
11
  export {
13
- I as EpIcon
12
+ f as ElIcon,
13
+ h as EpIcon
14
14
  };
@@ -1,7 +1,11 @@
1
- import { defineComponent as r, openBlock as i, createBlock as l, Transition as c, mergeProps as p, withCtx as d, renderSlot as m } from "vue";
2
- import { useNamespace as f } from "element-plus/es/hooks/use-namespace/index.mjs";
3
- import { addClass as e, hasClass as h, removeClass as a } from "element-plus/es/utils/index.mjs";
4
- const _ = /* @__PURE__ */ r({
1
+ import { defineComponent as r, openBlock as i, createBlock as l, Transition as p, mergeProps as c, withCtx as d, renderSlot as m } from "vue";
2
+ import { useNamespace as f } from "../../hooks/use-namespace/index.js";
3
+ import "@vue/shared";
4
+ import "lodash-unified";
5
+ import "@vueuse/core";
6
+ import { addClass as e, hasClass as h, removeClass as a } from "../../utils/dom/style.js";
7
+ import "@element-plus/icons-vue";
8
+ const x = /* @__PURE__ */ r({
5
9
  name: "EpMenuCollapseTransition",
6
10
  __name: "menu-collapse-transition",
7
11
  setup(u) {
@@ -20,7 +24,7 @@ const _ = /* @__PURE__ */ r({
20
24
  e(t, "horizontal-collapse-transition"), t.style.width = `${t.dataset.scrollWidth}px`;
21
25
  }
22
26
  };
23
- return (t, s) => (i(), l(c, p({ mode: "out-in" }, n), {
27
+ return (t, s) => (i(), l(p, c({ mode: "out-in" }, n), {
24
28
  default: d(() => [
25
29
  m(t.$slots, "default")
26
30
  ]),
@@ -29,5 +33,5 @@ const _ = /* @__PURE__ */ r({
29
33
  }
30
34
  });
31
35
  export {
32
- _ as default
36
+ x as default
33
37
  };
@@ -1,32 +1,32 @@
1
1
  import type { MenuItemClicked } from './types';
2
2
  import type { Component, CSSProperties, ExtractPropTypes, VNode } from 'vue';
3
3
  export declare const menuProps: {
4
- readonly mode: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
5
- readonly defaultActive: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
6
- readonly defaultOpeneds: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
4
+ readonly mode: import("@element-plus/utils").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
5
+ readonly defaultActive: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
6
+ readonly defaultOpeneds: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
7
7
  readonly uniqueOpened: BooleanConstructor;
8
8
  readonly router: BooleanConstructor;
9
- readonly menuTrigger: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
9
+ readonly menuTrigger: import("@element-plus/utils").EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
10
10
  readonly collapse: BooleanConstructor;
11
11
  readonly backgroundColor: StringConstructor;
12
12
  readonly textColor: StringConstructor;
13
13
  readonly activeTextColor: StringConstructor;
14
14
  readonly closeOnClickOutside: BooleanConstructor;
15
- readonly collapseTransition: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
16
- readonly ellipsis: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
17
- readonly popperOffset: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
18
- readonly ellipsisIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
19
- readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown, "dark", boolean>;
15
+ readonly collapseTransition: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
16
+ readonly ellipsis: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
17
+ readonly popperOffset: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
18
+ readonly ellipsisIcon: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
19
+ readonly popperEffect: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown, "dark", boolean>;
20
20
  readonly popperClass: StringConstructor;
21
21
  readonly popperStyle: {
22
- readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
22
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
23
23
  readonly required: false;
24
24
  readonly validator: ((val: unknown) => boolean) | undefined;
25
25
  __epPropKey: true;
26
26
  };
27
- readonly showTimeout: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
28
- readonly hideTimeout: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
29
- readonly persistent: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
27
+ readonly showTimeout: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
28
+ readonly hideTimeout: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
29
+ readonly persistent: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
30
30
  };
31
31
  export type MenuProps = ExtractPropTypes<typeof menuProps>;
32
32
  export declare const menuEmits: {
@@ -36,32 +36,32 @@ export declare const menuEmits: {
36
36
  };
37
37
  export type MenuEmits = typeof menuEmits;
38
38
  declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
39
- readonly mode: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
40
- readonly defaultActive: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
41
- readonly defaultOpeneds: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
39
+ readonly mode: import("@element-plus/utils").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
40
+ readonly defaultActive: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
41
+ readonly defaultOpeneds: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
42
42
  readonly uniqueOpened: BooleanConstructor;
43
43
  readonly router: BooleanConstructor;
44
- readonly menuTrigger: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
44
+ readonly menuTrigger: import("@element-plus/utils").EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
45
45
  readonly collapse: BooleanConstructor;
46
46
  readonly backgroundColor: StringConstructor;
47
47
  readonly textColor: StringConstructor;
48
48
  readonly activeTextColor: StringConstructor;
49
49
  readonly closeOnClickOutside: BooleanConstructor;
50
- readonly collapseTransition: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
51
- readonly ellipsis: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
52
- readonly popperOffset: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
53
- readonly ellipsisIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
54
- readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown, "dark", boolean>;
50
+ readonly collapseTransition: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
51
+ readonly ellipsis: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
52
+ readonly popperOffset: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
53
+ readonly ellipsisIcon: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
54
+ readonly popperEffect: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown, "dark", boolean>;
55
55
  readonly popperClass: StringConstructor;
56
56
  readonly popperStyle: {
57
- readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
57
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
58
58
  readonly required: false;
59
59
  readonly validator: ((val: unknown) => boolean) | undefined;
60
60
  __epPropKey: true;
61
61
  };
62
- readonly showTimeout: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
63
- readonly hideTimeout: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
64
- readonly persistent: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
62
+ readonly showTimeout: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
63
+ readonly hideTimeout: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
64
+ readonly persistent: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
65
65
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
66
66
  [key: string]: any;
67
67
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -69,50 +69,50 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
69
69
  open: (index: string, indexPath: string[]) => boolean;
70
70
  select: (index: string, indexPath: string[], item: MenuItemClicked, routerResult?: Promise<unknown>) => boolean;
71
71
  }, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
72
- readonly mode: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
73
- readonly defaultActive: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
74
- readonly defaultOpeneds: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
72
+ readonly mode: import("@element-plus/utils").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
73
+ readonly defaultActive: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
74
+ readonly defaultOpeneds: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
75
75
  readonly uniqueOpened: BooleanConstructor;
76
76
  readonly router: BooleanConstructor;
77
- readonly menuTrigger: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
77
+ readonly menuTrigger: import("@element-plus/utils").EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
78
78
  readonly collapse: BooleanConstructor;
79
79
  readonly backgroundColor: StringConstructor;
80
80
  readonly textColor: StringConstructor;
81
81
  readonly activeTextColor: StringConstructor;
82
82
  readonly closeOnClickOutside: BooleanConstructor;
83
- readonly collapseTransition: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
84
- readonly ellipsis: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
85
- readonly popperOffset: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
86
- readonly ellipsisIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
87
- readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown, "dark", boolean>;
83
+ readonly collapseTransition: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
84
+ readonly ellipsis: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
85
+ readonly popperOffset: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
86
+ readonly ellipsisIcon: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
87
+ readonly popperEffect: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown, "dark", boolean>;
88
88
  readonly popperClass: StringConstructor;
89
89
  readonly popperStyle: {
90
- readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
90
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
91
91
  readonly required: false;
92
92
  readonly validator: ((val: unknown) => boolean) | undefined;
93
93
  __epPropKey: true;
94
94
  };
95
- readonly showTimeout: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
96
- readonly hideTimeout: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
97
- readonly persistent: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
95
+ readonly showTimeout: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
96
+ readonly hideTimeout: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
97
+ readonly persistent: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
98
98
  }>> & Readonly<{
99
+ onOpen?: ((index: string, indexPath: string[]) => any) | undefined;
99
100
  onSelect?: ((index: string, indexPath: string[], item: MenuItemClicked, routerResult?: Promise<unknown> | undefined) => any) | undefined;
100
101
  onClose?: ((index: string, indexPath: string[]) => any) | undefined;
101
- onOpen?: ((index: string, indexPath: string[]) => any) | undefined;
102
102
  }>, {
103
- readonly mode: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
104
- readonly persistent: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
105
103
  readonly collapse: boolean;
106
- readonly ellipsis: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
104
+ readonly ellipsis: import("@element-plus/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
105
+ readonly mode: import("@element-plus/utils").EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
106
+ readonly persistent: import("@element-plus/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
107
107
  readonly showTimeout: number;
108
108
  readonly hideTimeout: number;
109
109
  readonly defaultActive: string;
110
110
  readonly defaultOpeneds: string[];
111
- readonly menuTrigger: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "click" | "hover", unknown>;
112
- readonly collapseTransition: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
111
+ readonly menuTrigger: import("@element-plus/utils").EpPropMergeType<StringConstructor, "click" | "hover", unknown>;
112
+ readonly collapseTransition: import("@element-plus/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
113
113
  readonly popperOffset: number;
114
- readonly ellipsisIcon: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
115
- readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown>;
114
+ readonly ellipsisIcon: import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
115
+ readonly popperEffect: import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown>;
116
116
  readonly uniqueOpened: boolean;
117
117
  readonly router: boolean;
118
118
  readonly closeOnClickOutside: boolean;
@@ -1,32 +1,39 @@
1
- import { defineComponent as Q, getCurrentInstance as X, ref as f, computed as Z, watch as x, watchEffect as ee, provide as U, reactive as te, onMounted as ne, h as I, withDirectives as le, nextTick as oe } from "vue";
2
- import { ElIcon as ue } from "element-plus/es/components/icon/index.mjs";
3
- import { More as ae } from "@element-plus/icons-vue";
4
- import { buildProps as ie, iconPropType as ce, definePropType as N, mutable as se, flattedChildren as re, isString as C, isObject as de, isArray as fe } from "element-plus/es/utils/index.mjs";
5
- import { useNamespace as j } from "element-plus/es/hooks/use-namespace/index.mjs";
6
- import { ClickOutside as me } from "element-plus/es/directives/index.mjs";
7
- import ve from "element-plus/es/components/menu/src/utils/menu-bar.mjs";
8
- import { useMenuCssVar as pe } from "element-plus/es/components/menu/src/use-menu-css-var.mjs";
1
+ import { defineComponent as Q, getCurrentInstance as X, ref as f, computed as Z, watch as x, watchEffect as ee, provide as U, reactive as te, onMounted as ne, h as I, withDirectives as oe, nextTick as le } from "vue";
2
+ import { ElIcon as ue } from "../icon/index.js";
3
+ import { More as ie } from "@element-plus/icons-vue";
4
+ import { isString as C, isObject as ae, isArray as ce } from "@vue/shared";
5
+ import "lodash-unified";
6
+ import "@vueuse/core";
7
+ import { mutable as se } from "../../utils/typescript.js";
8
+ import { iconPropType as re } from "../../utils/vue/icon.js";
9
+ import { flattedChildren as de } from "../../utils/vue/vnode.js";
10
+ import { buildProps as fe, definePropType as N } from "../../utils/vue/props/runtime.js";
11
+ import { useNamespace as j } from "../../hooks/use-namespace/index.js";
12
+ import me from "../../directives/click-outside/index.js";
13
+ import "normalize-wheel-es";
14
+ import ve from "./utils/menu-bar.js";
15
+ import { useMenuCssVar as pe } from "./use-menu-css-var.js";
9
16
  import he from "./menu-collapse-transition.vue.js";
10
17
  import { MENU_INJECTION_KEY as ge, SUB_MENU_INJECTION_KEY as Me } from "./tokens.js";
11
18
  import be from "../sub-menu/sub-menu.js";
12
19
  const ye = (e) => {
13
- const o = (e == null ? void 0 : e.value) ?? e;
14
- return o && typeof o == "object" && "$el" in o ? o.$el : o;
15
- }, Ie = (e, o) => {
16
- let a;
20
+ const l = (e == null ? void 0 : e.value) ?? e;
21
+ return l && typeof l == "object" && "$el" in l ? l.$el : l;
22
+ }, Ie = (e, l) => {
23
+ let i;
17
24
  const h = x(
18
25
  e,
19
26
  (g) => {
20
- a == null || a.disconnect(), a = void 0, g && typeof ResizeObserver < "u" && (a = new ResizeObserver(o), a.observe(g));
27
+ i == null || i.disconnect(), i = void 0, g && typeof ResizeObserver < "u" && (i = new ResizeObserver(l), i.observe(g));
21
28
  },
22
29
  { immediate: !0 }
23
30
  );
24
31
  return {
25
32
  stop: () => {
26
- a == null || a.disconnect(), h();
33
+ i == null || i.disconnect(), h();
27
34
  }
28
35
  };
29
- }, Se = ie({
36
+ }, Se = fe({
30
37
  /** menu display mode */
31
38
  mode: {
32
39
  type: String,
@@ -80,8 +87,8 @@ const ye = (e) => {
80
87
  },
81
88
  /** custom ellipsis icon (available only in horizontal mode and ellipsis is true) */
82
89
  ellipsisIcon: {
83
- type: ce,
84
- default: () => ae
90
+ type: re,
91
+ default: () => ie
85
92
  },
86
93
  /** Tooltip theme, built-in theme: `dark` / `light` when menu is collapsed */
87
94
  popperEffect: {
@@ -109,15 +116,15 @@ const ye = (e) => {
109
116
  type: Boolean,
110
117
  default: !0
111
118
  }
112
- }), T = (e) => fe(e) && e.every((o) => C(o)), Oe = {
113
- close: (e, o) => C(e) && T(o),
114
- open: (e, o) => C(e) && T(o),
115
- select: (e, o, a, h) => C(e) && T(o) && de(a) && (h === void 0 || h instanceof Promise)
116
- }, F = 64, Ae = Q({
119
+ }), T = (e) => ce(e) && e.every((l) => C(l)), Oe = {
120
+ close: (e, l) => C(e) && T(l),
121
+ open: (e, l) => C(e) && T(l),
122
+ select: (e, l, i, h) => C(e) && T(l) && ae(i) && (h === void 0 || h instanceof Promise)
123
+ }, F = 64, je = Q({
117
124
  name: "EpMenu",
118
125
  props: Se,
119
126
  emits: Oe,
120
- setup(e, { emit: o, slots: a, expose: h }) {
127
+ setup(e, { emit: l, slots: i, expose: h }) {
121
128
  const g = X(), P = g.appContext.config.globalProperties.$router, m = f(), k = f(), S = j("menu"), _ = j("sub-menu");
122
129
  let z = F;
123
130
  const v = f(-1), c = f(
@@ -127,19 +134,19 @@ const ye = (e) => {
127
134
  ), J = () => {
128
135
  const t = d.value && p.value[d.value];
129
136
  if (!t || e.mode === "horizontal" || e.collapse) return;
130
- t.indexPath.forEach((l) => {
131
- const i = M.value[l];
132
- i && O(l, i.indexPath);
137
+ t.indexPath.forEach((o) => {
138
+ const a = M.value[o];
139
+ a && O(o, a.indexPath);
133
140
  });
134
141
  }, O = (t, n) => {
135
142
  c.value.includes(t) || (e.uniqueOpened && (c.value = c.value.filter(
136
- (l) => n.includes(l)
137
- )), c.value.push(t), o("open", t, n));
143
+ (o) => n.includes(o)
144
+ )), c.value.push(t), l("open", t, n));
138
145
  }, R = (t) => {
139
146
  const n = c.value.indexOf(t);
140
147
  n !== -1 && c.value.splice(n, 1);
141
148
  }, w = (t, n) => {
142
- R(t), o("close", t, n);
149
+ R(t), l("close", t, n);
143
150
  }, K = ({
144
151
  index: t,
145
152
  indexPath: n
@@ -147,32 +154,32 @@ const ye = (e) => {
147
154
  c.value.includes(t) ? w(t, n) : O(t, n);
148
155
  }, V = (t) => {
149
156
  (e.mode === "horizontal" || e.collapse) && (c.value = []);
150
- const { index: n, indexPath: l } = t;
151
- if (!(n == null || l == null))
157
+ const { index: n, indexPath: o } = t;
158
+ if (!(n == null || o == null))
152
159
  if (e.router && P) {
153
- const i = t.route || n, u = P.push(i).then((s) => (s || (d.value = n), s));
154
- o("select", n, l, { index: n, indexPath: l, route: i }, u);
160
+ const a = t.route || n, u = P.push(a).then((s) => (s || (d.value = n), s));
161
+ l("select", n, o, { index: n, indexPath: o, route: a }, u);
155
162
  } else
156
- d.value = n, o("select", n, l, { index: n, indexPath: l });
163
+ d.value = n, l("select", n, o, { index: n, indexPath: o });
157
164
  }, A = (t) => {
158
- const n = p.value, l = n[t] || d.value && n[d.value] || n[e.defaultActive];
159
- d.value = (l == null ? void 0 : l.index) ?? t;
165
+ const n = p.value, o = n[t] || d.value && n[d.value] || n[e.defaultActive];
166
+ d.value = (o == null ? void 0 : o.index) ?? t;
160
167
  }, B = (t) => {
161
- const n = getComputedStyle(t), l = Number.parseInt(n.marginLeft, 10), i = Number.parseInt(n.marginRight, 10);
162
- return t.offsetWidth + l + i || 0;
168
+ const n = getComputedStyle(t), o = Number.parseInt(n.marginLeft, 10), a = Number.parseInt(n.marginRight, 10);
169
+ return t.offsetWidth + o + a || 0;
163
170
  }, W = () => {
164
171
  if (!m.value) return -1;
165
172
  const t = Array.from(m.value.childNodes).filter(
166
173
  (r) => r.nodeName !== "#comment" && (r.nodeName !== "#text" || r.nodeValue)
167
- ), n = getComputedStyle(m.value), l = Number.parseInt(n.paddingLeft, 10), i = Number.parseInt(n.paddingRight, 10), u = m.value.clientWidth - l - i;
174
+ ), n = getComputedStyle(m.value), o = Number.parseInt(n.paddingLeft, 10), a = Number.parseInt(n.paddingRight, 10), u = m.value.clientWidth - o - a;
168
175
  let s = 0, b = 0;
169
176
  return t.forEach((r, y) => {
170
177
  s += B(r), s <= u - z && (b = y + 1);
171
178
  }), b === t.length ? -1 : b;
172
179
  }, Y = (t) => M.value[t].indexPath, H = (t, n = 33.34) => {
173
- let l;
180
+ let o;
174
181
  return () => {
175
- l && clearTimeout(l), l = setTimeout(() => {
182
+ o && clearTimeout(o), o = setTimeout(() => {
176
183
  t();
177
184
  }, n);
178
185
  };
@@ -182,7 +189,7 @@ const ye = (e) => {
182
189
  const t = ye(k);
183
190
  if (t && (z = B(t) || F), v.value === W()) return;
184
191
  const n = () => {
185
- v.value = -1, oe(() => {
192
+ v.value = -1, le(() => {
186
193
  v.value = W();
187
194
  });
188
195
  };
@@ -243,8 +250,8 @@ const ye = (e) => {
243
250
  e.mode === "horizontal" && new ve(g.vnode.el, S.namespace.value);
244
251
  }), h({
245
252
  open: (n) => {
246
- const { indexPath: l } = M.value[n];
247
- l.forEach((i) => O(i, l));
253
+ const { indexPath: o } = M.value[n];
254
+ o.forEach((a) => O(a, o));
248
255
  },
249
256
  close: R,
250
257
  updateActiveIndex: A,
@@ -253,10 +260,10 @@ const ye = (e) => {
253
260
  const G = pe(e, 0);
254
261
  return () => {
255
262
  var u;
256
- let t = ((u = a.default) == null ? void 0 : u.call(a)) ?? [];
263
+ let t = ((u = i.default) == null ? void 0 : u.call(i)) ?? [];
257
264
  const n = [];
258
265
  if (e.mode === "horizontal" && m.value) {
259
- const s = re(t).filter((y) => (y == null ? void 0 : y.shapeFlag) !== 8), b = v.value === -1 ? s : s.slice(0, v.value), r = v.value === -1 ? [] : s.slice(v.value);
266
+ const s = de(t).filter((y) => (y == null ? void 0 : y.shapeFlag) !== 8), b = v.value === -1 ? s : s.slice(0, v.value), r = v.value === -1 ? [] : s.slice(v.value);
260
267
  r != null && r.length && e.ellipsis && (t = b, n.push(
261
268
  I(
262
269
  be,
@@ -281,16 +288,16 @@ const ye = (e) => {
281
288
  )
282
289
  ));
283
290
  }
284
- const l = e.closeOnClickOutside ? [
291
+ const o = e.closeOnClickOutside ? [
285
292
  [
286
293
  me,
287
294
  () => {
288
295
  c.value.length && ($.value || (c.value.forEach(
289
- (s) => o("close", s, Y(s))
296
+ (s) => l("close", s, Y(s))
290
297
  ), c.value = []));
291
298
  }
292
299
  ]
293
- ] : [], i = le(
300
+ ] : [], a = oe(
294
301
  I(
295
302
  "ul",
296
303
  {
@@ -306,14 +313,14 @@ const ye = (e) => {
306
313
  },
307
314
  [...t, ...n]
308
315
  ),
309
- l
316
+ o
310
317
  );
311
- return e.collapseTransition && e.mode === "vertical" ? I(he, () => i) : i;
318
+ return e.collapseTransition && e.mode === "vertical" ? I(he, () => a) : a;
312
319
  };
313
320
  }
314
321
  });
315
322
  export {
316
- Ae as default,
323
+ je as default,
317
324
  Oe as menuEmits,
318
325
  Se as menuProps
319
326
  };
@@ -0,0 +1,2 @@
1
+ import type { MenuProps } from './menu';
2
+ export default function useMenuColor(props: MenuProps): import("vue").ComputedRef<string>;
@@ -0,0 +1,11 @@
1
+ import { computed as n } from "vue";
2
+ import { TinyColor as t } from "@ctrl/tinycolor";
3
+ function m(r) {
4
+ return n(() => {
5
+ const o = r.backgroundColor;
6
+ return o ? new t(o).shade(20).toString() : "";
7
+ });
8
+ }
9
+ export {
10
+ m as default
11
+ };
@@ -0,0 +1,2 @@
1
+ import type { MenuProps } from './menu';
2
+ export declare const useMenuCssVar: (props: MenuProps, level: number) => import("vue").ComputedRef<Record<string, string>>;