ep-craft 0.1.19 → 0.1.21

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 (226) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/components/affix/affix.d.ts +55 -0
  3. package/dist/components/affix/affix.js +199 -0
  4. package/dist/components/affix/index.d.ts +2 -2
  5. package/dist/components/affix/index.js +3 -4
  6. package/dist/components/alert/alert.d.ts +39 -0
  7. package/dist/components/alert/alert.js +94 -0
  8. package/dist/components/alert/index.d.ts +2 -2
  9. package/dist/components/alert/index.js +3 -4
  10. package/dist/components/anchor/anchor.d.ts +54 -0
  11. package/dist/components/anchor/anchor.js +153 -0
  12. package/dist/components/anchor/index.d.ts +2 -2
  13. package/dist/components/anchor/index.js +3 -4
  14. package/dist/components/anchor-link/anchor-link.d.ts +17 -0
  15. package/dist/components/anchor-link/anchor-link.js +51 -0
  16. package/dist/components/anchor-link/index.d.ts +2 -2
  17. package/dist/components/anchor-link/index.js +6 -4
  18. package/dist/components/button/EpButton.vue.d.ts +11 -11
  19. package/dist/components/button/EpButton.vue.js +122 -0
  20. package/dist/components/button/EpButton2.vue.js +4 -0
  21. package/dist/components/button/button.d.ts +3 -3
  22. package/dist/components/button/button.js +95 -0
  23. package/dist/components/button/index.d.ts +2 -2
  24. package/dist/components/button/index.js +3 -4
  25. package/dist/components/button/use-button-custom.js +66 -0
  26. package/dist/components/check-tag/EpCheckTag.vue.d.ts +1 -1
  27. package/dist/components/check-tag/EpCheckTag.vue.js +29 -0
  28. package/dist/components/check-tag/EpCheckTag2.vue.js +4 -0
  29. package/dist/components/check-tag/check-tag.js +20 -0
  30. package/dist/components/check-tag/index.d.ts +2 -2
  31. package/dist/components/check-tag/index.js +3 -4
  32. package/dist/components/collapse-transition/index.d.ts +20 -3
  33. package/dist/components/collapse-transition/index.js +6 -4
  34. package/dist/components/collapse-transition/src/collapse-transition.vue.d.ts +12 -0
  35. package/dist/components/collapse-transition/src/collapse-transition.vue.js +55 -0
  36. package/dist/components/collapse-transition/src/collapse-transition2.vue.js +4 -0
  37. package/dist/components/config-provider/src/constants.d.ts +14 -0
  38. package/dist/components/config-provider/src/hooks/use-global-config.d.ts +32 -0
  39. package/dist/components/focus-trap/index.d.ts +81 -0
  40. package/dist/components/focus-trap/index.js +19 -0
  41. package/dist/components/focus-trap/src/focus-trap.vue.d.ts +32 -0
  42. package/dist/components/focus-trap/src/focus-trap.vue.js +10 -0
  43. package/dist/components/focus-trap/src/focus-trap2.vue.js +164 -0
  44. package/dist/components/focus-trap/src/tokens.d.ts +13 -0
  45. package/dist/components/focus-trap/src/tokens.js +17 -0
  46. package/dist/components/focus-trap/src/utils.d.ts +29 -0
  47. package/dist/components/focus-trap/src/utils.js +83 -0
  48. package/dist/components/form/index.d.ts +3 -0
  49. package/dist/components/form/index.js +4 -2
  50. package/dist/components/form/src/constants.d.ts +4 -0
  51. package/dist/components/form/src/constants.js +4 -0
  52. package/dist/components/form/src/hooks/use-form-common-props.d.ts +6 -0
  53. package/dist/components/form/src/hooks/use-form-item.d.ts +19 -0
  54. package/dist/components/form/src/types.d.ts +24 -0
  55. package/dist/components/icon/index.d.ts +21 -3
  56. package/dist/components/icon/index.js +7 -4
  57. package/dist/components/icon/src/icon.d.ts +34 -0
  58. package/dist/components/icon/src/icon.js +16 -0
  59. package/dist/components/icon/src/icon.vue.d.ts +13 -0
  60. package/dist/components/icon/src/icon.vue.js +36 -0
  61. package/dist/components/icon/src/icon2.vue.js +4 -0
  62. package/dist/components/menu/menu.d.ts +8 -8
  63. package/dist/components/popper/index.d.ts +54 -3
  64. package/dist/components/popper/index.js +30 -5
  65. package/dist/components/popper/src/arrow.d.ts +30 -0
  66. package/dist/components/popper/src/arrow.js +14 -0
  67. package/dist/components/popper/src/arrow.vue.d.ts +7 -0
  68. package/dist/components/popper/src/arrow.vue.js +4 -0
  69. package/dist/components/popper/src/arrow2.vue.js +37 -0
  70. package/dist/components/popper/src/composables/index.d.ts +4 -0
  71. package/dist/components/popper/src/composables/use-content-dom.d.ts +40 -0
  72. package/dist/components/popper/src/composables/use-content-dom.js +45 -0
  73. package/dist/components/popper/src/composables/use-content.d.ts +77 -0
  74. package/dist/components/popper/src/composables/use-content.js +76 -0
  75. package/dist/components/popper/src/composables/use-focus-trap.d.ts +12 -0
  76. package/dist/components/popper/src/composables/use-focus-trap.js +29 -0
  77. package/dist/components/popper/src/constants.d.ts +23 -0
  78. package/dist/components/popper/src/constants.js +5 -0
  79. package/dist/components/popper/src/content.d.ts +234 -0
  80. package/dist/components/popper/src/content.js +129 -0
  81. package/dist/components/popper/src/content.vue.d.ts +61 -0
  82. package/dist/components/popper/src/content.vue.js +4 -0
  83. package/dist/components/popper/src/content2.vue.js +151 -0
  84. package/dist/components/popper/src/popper.d.ts +35 -0
  85. package/dist/components/popper/src/popper.js +22 -0
  86. package/dist/components/popper/src/popper.vue.d.ts +22 -0
  87. package/dist/components/popper/src/popper.vue.js +38 -0
  88. package/dist/components/popper/src/popper2.vue.js +4 -0
  89. package/dist/components/popper/src/trigger.d.ts +130 -0
  90. package/dist/components/popper/src/trigger.js +36 -0
  91. package/dist/components/popper/src/trigger.vue.d.ts +18 -0
  92. package/dist/components/popper/src/trigger.vue.js +4 -0
  93. package/dist/components/popper/src/trigger2.vue.js +134 -0
  94. package/dist/components/popper/src/utils.d.ts +48 -0
  95. package/dist/components/popper/src/utils.js +57 -0
  96. package/dist/components/radio/radio.d.ts +2 -2
  97. package/dist/components/radio-button/radio-button.d.ts +2 -2
  98. package/dist/components/radio-group/radio-group.d.ts +2 -2
  99. package/dist/components/slot/index.d.ts +3 -0
  100. package/dist/components/slot/src/only-child.d.ts +7 -0
  101. package/dist/components/slot/src/only-child.js +55 -0
  102. package/dist/components/tab-pane/tab-pane.d.ts +2 -2
  103. package/dist/components/tabs/tabs.d.ts +2 -2
  104. package/dist/components/tag/EpTag.vue.d.ts +4 -4
  105. package/dist/components/tag/EpTag.vue.js +96 -0
  106. package/dist/components/tag/EpTag2.vue.js +4 -0
  107. package/dist/components/tag/index.d.ts +2 -2
  108. package/dist/components/tag/index.js +2 -3
  109. package/dist/components/tag/tag.js +38 -0
  110. package/dist/components/tooltip/index.d.ts +174 -3
  111. package/dist/components/tooltip/index.js +18 -5
  112. package/dist/components/tooltip/src/constants.d.ts +18 -0
  113. package/dist/components/tooltip/src/constants.js +4 -0
  114. package/dist/components/tooltip/src/content.d.ts +327 -0
  115. package/dist/components/tooltip/src/content.js +72 -0
  116. package/dist/components/tooltip/src/content.vue.d.ts +47 -0
  117. package/dist/components/tooltip/src/content.vue.js +188 -0
  118. package/dist/components/tooltip/src/content2.vue.js +4 -0
  119. package/dist/components/tooltip/src/tooltip.d.ts +346 -0
  120. package/dist/components/tooltip/src/tooltip.js +47 -0
  121. package/dist/components/tooltip/src/tooltip.vue.d.ts +90 -0
  122. package/dist/components/tooltip/src/tooltip.vue.js +236 -0
  123. package/dist/components/tooltip/src/tooltip2.vue.js +4 -0
  124. package/dist/components/tooltip/src/trigger.d.ts +94 -0
  125. package/dist/components/tooltip/src/trigger.js +41 -0
  126. package/dist/components/tooltip/src/trigger.vue.d.ts +26 -0
  127. package/dist/components/tooltip/src/trigger.vue.js +104 -0
  128. package/dist/components/tooltip/src/trigger2.vue.js +4 -0
  129. package/dist/components/tooltip/src/utils.d.ts +5 -0
  130. package/dist/components/tooltip/src/utils.js +9 -0
  131. package/dist/constants/aria.d.ts +17 -0
  132. package/dist/constants/aria.js +24 -0
  133. package/dist/constants/column-alignment.d.ts +2 -0
  134. package/dist/constants/date.d.ts +3 -0
  135. package/dist/constants/event.d.ts +3 -0
  136. package/dist/constants/form.d.ts +2 -0
  137. package/dist/constants/index.d.ts +7 -0
  138. package/dist/constants/key.d.ts +1 -0
  139. package/dist/constants/size.d.ts +7 -0
  140. package/dist/constants/size.js +4 -0
  141. package/dist/directives/click-outside/index.d.ts +3 -0
  142. package/dist/directives/index.d.ts +5 -0
  143. package/dist/directives/mousewheel/index.d.ts +11 -0
  144. package/dist/directives/repeat-click/index.d.ts +17 -0
  145. package/dist/directives/trap-focus/index.d.ts +9 -0
  146. package/dist/hooks/index.d.ts +17 -0
  147. package/dist/hooks/use-aria/index.d.ts +37 -0
  148. package/dist/hooks/use-aria/index.js +24 -0
  149. package/dist/hooks/use-delayed-toggle/index.d.ts +36 -0
  150. package/dist/hooks/use-delayed-toggle/index.js +63 -0
  151. package/dist/hooks/use-deprecated/index.d.ts +11 -0
  152. package/dist/hooks/use-empty-values/index.d.ts +29 -0
  153. package/dist/hooks/use-empty-values/index.js +23 -0
  154. package/dist/hooks/use-escape-keydown/index.d.ts +1 -0
  155. package/dist/hooks/use-escape-keydown/index.js +21 -0
  156. package/dist/hooks/use-forward-ref/index.d.ts +9 -0
  157. package/dist/hooks/use-forward-ref/index.js +23 -0
  158. package/dist/hooks/use-id/index.d.ts +8 -0
  159. package/dist/hooks/use-id/index.js +27 -0
  160. package/dist/hooks/use-locale/index.d.ts +17 -0
  161. package/dist/hooks/use-model-toggle/index.d.ts +46 -0
  162. package/dist/hooks/use-model-toggle/index.js +67 -0
  163. package/dist/hooks/use-namespace/index.d.ts +23 -0
  164. package/dist/hooks/use-namespace/index.js +45 -0
  165. package/dist/hooks/use-ordered-children/index.d.ts +14 -0
  166. package/dist/hooks/use-popper/index.d.ts +78 -0
  167. package/dist/hooks/use-popper/index.js +97 -0
  168. package/dist/hooks/use-popper-container/index.d.ts +8 -0
  169. package/dist/hooks/use-popper-container/index.js +26 -0
  170. package/dist/hooks/use-prop/index.d.ts +2 -0
  171. package/dist/hooks/use-size/index.d.ts +21 -0
  172. package/dist/hooks/use-size/index.js +8 -0
  173. package/dist/hooks/use-timeout/index.d.ts +4 -0
  174. package/dist/hooks/use-timeout/index.js +16 -0
  175. package/dist/hooks/use-z-index/index.d.ts +13 -0
  176. package/dist/hooks/use-z-index/index.js +27 -0
  177. package/dist/node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/anchor.vue_vue_type_script_setup_true_lang.js +8 -8
  178. package/dist/node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/button/index.js +2 -2
  179. package/dist/resolver.js +13 -12
  180. package/dist/utils/arrays.d.ts +6 -0
  181. package/dist/utils/arrays.js +5 -0
  182. package/dist/utils/browser.d.ts +4 -0
  183. package/dist/utils/browser.js +6 -0
  184. package/dist/utils/dom/aria.d.ts +26 -0
  185. package/dist/utils/dom/aria.js +26 -0
  186. package/dist/utils/dom/element.d.ts +3 -0
  187. package/dist/utils/dom/event.d.ts +8 -0
  188. package/dist/utils/dom/event.js +32 -0
  189. package/dist/utils/dom/index.d.ts +7 -0
  190. package/dist/utils/dom/position.d.ts +7 -0
  191. package/dist/utils/dom/scroll.d.ts +11 -0
  192. package/dist/utils/dom/style.d.ts +9 -0
  193. package/dist/utils/dom/style.js +15 -0
  194. package/dist/utils/easings.d.ts +1 -0
  195. package/dist/utils/error.d.ts +3 -0
  196. package/dist/utils/error.js +15 -0
  197. package/dist/utils/functions.d.ts +2 -0
  198. package/dist/utils/i18n.d.ts +4 -0
  199. package/dist/utils/index.d.ts +31 -0
  200. package/dist/utils/numbers.d.ts +6 -0
  201. package/dist/utils/objects.d.ts +7 -0
  202. package/dist/utils/raf.d.ts +2 -0
  203. package/dist/utils/rand.d.ts +12 -0
  204. package/dist/utils/strings.d.ts +8 -0
  205. package/dist/utils/throttleByRaf.d.ts +4 -0
  206. package/dist/utils/types.d.ts +9 -0
  207. package/dist/utils/types.js +16 -0
  208. package/dist/utils/typescript.d.ts +93 -0
  209. package/dist/utils/vue/global-node.d.ts +3 -0
  210. package/dist/utils/vue/icon.d.ts +27 -0
  211. package/dist/utils/vue/index.d.ts +9 -0
  212. package/dist/utils/vue/install.d.ts +7 -0
  213. package/dist/utils/vue/install.js +34 -0
  214. package/dist/utils/vue/props/index.d.ts +2 -0
  215. package/dist/utils/vue/props/runtime.d.ts +29 -0
  216. package/dist/utils/vue/props/runtime.js +36 -0
  217. package/dist/utils/vue/props/types.d.ts +85 -0
  218. package/dist/utils/vue/props/util.d.ts +7 -0
  219. package/dist/utils/vue/refs.d.ts +2 -0
  220. package/dist/utils/vue/size.d.ts +2 -0
  221. package/dist/utils/vue/typescript.d.ts +25 -0
  222. package/dist/utils/vue/validator.d.ts +3 -0
  223. package/dist/utils/vue/vnode.d.ts +48 -0
  224. package/dist/vendored-components.d.ts +13 -0
  225. package/dist/vendored-components.js +22 -0
  226. package/package.json +11 -3
@@ -0,0 +1,97 @@
1
+ import { computed as n, unref as e, shallowRef as b, ref as v, watch as f, onBeforeUnmount as w } from "vue";
2
+ import { createPopper as S } from "../../node_modules/.pnpm/@sxzz_popperjs-es@2.11.8/node_modules/@sxzz/popperjs-es/dist/index.js";
3
+ import d from "../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/fromPairs.js";
4
+ const P = (r, i, p = {}) => {
5
+ const u = {
6
+ name: "updateState",
7
+ enabled: !0,
8
+ phase: "write",
9
+ fn: ({ state: t }) => {
10
+ const a = U(t);
11
+ Object.assign(c.value, a);
12
+ },
13
+ requires: ["computeStyles"]
14
+ }, s = n(() => {
15
+ const { onFirstUpdate: t, placement: a, strategy: m, modifiers: y } = e(p);
16
+ return {
17
+ onFirstUpdate: t,
18
+ placement: a || "bottom",
19
+ strategy: m || "absolute",
20
+ modifiers: [
21
+ ...y || [],
22
+ u,
23
+ { name: "applyStyles", enabled: !1 }
24
+ ]
25
+ };
26
+ }), o = b(), c = v({
27
+ styles: {
28
+ popper: {
29
+ position: e(s).strategy,
30
+ left: "0",
31
+ top: "0"
32
+ },
33
+ arrow: {
34
+ position: "absolute"
35
+ }
36
+ },
37
+ attributes: {}
38
+ }), l = () => {
39
+ o.value && (o.value.destroy(), o.value = void 0);
40
+ };
41
+ return f(
42
+ s,
43
+ (t) => {
44
+ const a = e(o);
45
+ a && a.setOptions(t);
46
+ },
47
+ {
48
+ deep: !0
49
+ }
50
+ ), f(
51
+ [r, i],
52
+ ([t, a]) => {
53
+ l(), !(!t || !a) && (o.value = S(
54
+ t,
55
+ a,
56
+ e(s)
57
+ ));
58
+ }
59
+ ), w(() => {
60
+ l();
61
+ }), {
62
+ state: n(() => {
63
+ var t;
64
+ return { ...((t = e(o)) == null ? void 0 : t.state) || {} };
65
+ }),
66
+ styles: n(() => e(c).styles),
67
+ attributes: n(() => e(c).attributes),
68
+ update: () => {
69
+ var t;
70
+ return (t = e(o)) == null ? void 0 : t.update();
71
+ },
72
+ forceUpdate: () => {
73
+ var t;
74
+ return (t = e(o)) == null ? void 0 : t.forceUpdate();
75
+ },
76
+ // Preventing end users from modifying the instance.
77
+ instanceRef: n(() => e(o))
78
+ };
79
+ };
80
+ function U(r) {
81
+ const i = Object.keys(r.elements), p = d(
82
+ i.map(
83
+ (s) => [s, r.styles[s] || {}]
84
+ )
85
+ ), u = d(
86
+ i.map(
87
+ (s) => [s, r.attributes[s]]
88
+ )
89
+ );
90
+ return {
91
+ styles: p,
92
+ attributes: u
93
+ };
94
+ }
95
+ export {
96
+ P as usePopper
97
+ };
@@ -0,0 +1,8 @@
1
+ export declare const usePopperContainerId: () => {
2
+ id: import("vue").ComputedRef<string>;
3
+ selector: import("vue").ComputedRef<string>;
4
+ };
5
+ export declare const usePopperContainer: () => {
6
+ id: import("vue").ComputedRef<string>;
7
+ selector: import("vue").ComputedRef<string>;
8
+ };
@@ -0,0 +1,26 @@
1
+ import { onBeforeMount as c, computed as n } from "vue";
2
+ import { useGetDerivedNamespace as i } from "../use-namespace/index.js";
3
+ import { useIdInjection as s } from "../use-id/index.js";
4
+ import { isClient as p } from "../../node_modules/.pnpm/@vueuse_shared@14.3.0_vue@3.5.40_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js";
5
+ const u = () => {
6
+ const o = i(), e = s(), t = n(() => `${o.value}-popper-container-${e.prefix}`), r = n(() => `#${t.value}`);
7
+ return {
8
+ id: t,
9
+ selector: r
10
+ };
11
+ }, a = (o) => {
12
+ const e = document.createElement("div");
13
+ return e.id = o, document.body.appendChild(e), e;
14
+ }, v = () => {
15
+ const { id: o, selector: e } = u();
16
+ return c(() => {
17
+ p && (process.env.NODE_ENV === "test" || !document.body.querySelector(e.value)) && a(o.value);
18
+ }), {
19
+ id: o,
20
+ selector: e
21
+ };
22
+ };
23
+ export {
24
+ v as usePopperContainer,
25
+ u as usePopperContainerId
26
+ };
@@ -0,0 +1,2 @@
1
+ import type { ComputedRef } from 'vue';
2
+ export declare const useProp: <T>(name: string) => ComputedRef<T | undefined>;
@@ -0,0 +1,21 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ import type { ComponentSize } from '@element-plus/constants';
3
+ export declare const useSizeProp: {
4
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
5
+ readonly required: false;
6
+ readonly validator: ((val: unknown) => boolean) | undefined;
7
+ __epPropKey: true;
8
+ };
9
+ export declare const useSizeProps: {
10
+ size: {
11
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
12
+ readonly required: false;
13
+ readonly validator: ((val: unknown) => boolean) | undefined;
14
+ __epPropKey: true;
15
+ };
16
+ };
17
+ export interface SizeContext {
18
+ size: Ref<ComponentSize>;
19
+ }
20
+ export declare const SIZE_INJECTION_KEY: InjectionKey<SizeContext>;
21
+ export declare const useGlobalSize: () => import("vue").ComputedRef<"" | "default" | "small" | "large">;
@@ -0,0 +1,8 @@
1
+ import "vue";
2
+ import { componentSizes as r } from "../../constants/size.js";
3
+ import { buildProp as o } from "../../utils/vue/props/runtime.js";
4
+ o({
5
+ type: String,
6
+ values: r,
7
+ required: !1
8
+ });
@@ -0,0 +1,4 @@
1
+ export declare function useTimeout(): {
2
+ registerTimeout: (fn: (...args: any[]) => any, delay: number) => void;
3
+ cancelTimeout: () => void;
4
+ };
@@ -0,0 +1,16 @@
1
+ import { tryOnScopeDispose as u } from "../../node_modules/.pnpm/@vueuse_shared@14.3.0_vue@3.5.40_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js";
2
+ function s() {
3
+ let e;
4
+ const t = (i, r) => {
5
+ o(), e = globalThis.setTimeout(i, r);
6
+ }, o = () => {
7
+ e !== void 0 && (globalThis.clearTimeout(e), e = void 0);
8
+ };
9
+ return u(() => o()), {
10
+ registerTimeout: t,
11
+ cancelTimeout: o
12
+ };
13
+ }
14
+ export {
15
+ s as useTimeout
16
+ };
@@ -0,0 +1,13 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ export interface ElZIndexInjectionContext {
3
+ current: number;
4
+ }
5
+ export declare const defaultInitialZIndex = 2000;
6
+ export declare const ZINDEX_INJECTION_KEY: InjectionKey<ElZIndexInjectionContext>;
7
+ export declare const zIndexContextKey: InjectionKey<Ref<number | undefined>>;
8
+ export declare const useZIndex: (zIndexOverrides?: Ref<number>) => {
9
+ initialZIndex: import("vue").ComputedRef<number>;
10
+ currentZIndex: import("vue").ComputedRef<number>;
11
+ nextZIndex: () => number;
12
+ };
13
+ export type UseZIndexReturn = ReturnType<typeof useZIndex>;
@@ -0,0 +1,27 @@
1
+ import { ref as a, getCurrentInstance as i, inject as e, computed as c, unref as m } from "vue";
2
+ import { isNumber as l } from "../../utils/types.js";
3
+ import { debugWarn as p } from "../../utils/error.js";
4
+ import { isClient as v } from "../../node_modules/.pnpm/@vueuse_shared@14.3.0_vue@3.5.40_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js";
5
+ const s = {
6
+ current: 0
7
+ }, d = a(0), Z = 2e3, u = Symbol("elZIndexContextKey"), f = Symbol("zIndexContextKey"), E = (y) => {
8
+ const n = i() ? e(u, s) : s, I = i() ? e(f, void 0) : void 0, t = c(() => {
9
+ const o = m(I);
10
+ return l(o) ? o : Z;
11
+ }), r = c(() => t.value + d.value), x = () => (n.current++, d.value = n.current, r.value);
12
+ return !v && !e(u) && p(
13
+ "ZIndexInjection",
14
+ `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
15
+ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`
16
+ ), {
17
+ initialZIndex: t,
18
+ currentZIndex: r,
19
+ nextZIndex: x
20
+ };
21
+ };
22
+ export {
23
+ u as ZINDEX_INJECTION_KEY,
24
+ Z as defaultInitialZIndex,
25
+ E as useZIndex,
26
+ f as zIndexContextKey
27
+ };
@@ -1,7 +1,7 @@
1
1
  import { CHANGE_EVENT as K } from "../../../constants/event.js";
2
2
  import { getOffsetTopDistance as B } from "../../../utils/dom/position.js";
3
- import { isWindow as P, isUndefined as W } from "../../../utils/types.js";
4
- import { getScrollElement as H, animateScrollTo as q, getScrollTop as L } from "../../../utils/dom/scroll.js";
3
+ import { isUndefined as P, isWindow as W } from "../../../utils/types.js";
4
+ import { getScrollTop as H, getScrollElement as L, animateScrollTo as q } from "../../../utils/dom/scroll.js";
5
5
  import { getElement as m } from "../../../utils/dom/element.js";
6
6
  import { throttleByRaf as F } from "../../../utils/throttleByRaf.js";
7
7
  import { useNamespace as J } from "../../../hooks/use-namespace/index.js";
@@ -38,7 +38,7 @@ var Te = /* @__PURE__ */ ee({
38
38
  g();
39
39
  }
40
40
  k = e, h = !0;
41
- const o = H(t, l.value), n = B(t, o), s = o.scrollHeight - o.clientHeight, I = Math.min(n - r.offset, s);
41
+ const o = L(t, l.value), n = B(t, o), s = o.scrollHeight - o.clientHeight, I = Math.min(n - r.offset, s);
42
42
  g = q(l.value, S, I, r.duration, () => {
43
43
  setTimeout(() => {
44
44
  h = !1, k = "";
@@ -49,16 +49,16 @@ var Te = /* @__PURE__ */ ee({
49
49
  }, D = (e, t) => {
50
50
  R("click", e, t), y(t);
51
51
  }, w = F(() => {
52
- l.value && (S = L(l.value));
52
+ l.value && (S = H(l.value));
53
53
  const e = G();
54
- h || W(e) || _(e);
54
+ h || P(e) || _(e);
55
55
  }), G = () => {
56
56
  if (!l.value) return;
57
- const e = L(l.value), t = [];
57
+ const e = H(l.value), t = [];
58
58
  for (const o of Object.keys(f)) {
59
59
  const n = m(o);
60
60
  if (!n) continue;
61
- const s = B(n, H(n, l.value));
61
+ const s = B(n, L(n, l.value));
62
62
  t.push({
63
63
  top: s - r.offset - r.bound,
64
64
  href: o
@@ -72,7 +72,7 @@ var Te = /* @__PURE__ */ ee({
72
72
  }
73
73
  }, x = () => {
74
74
  const e = m(r.container);
75
- !e || P(e) ? l.value = window : l.value = e;
75
+ !e || W(e) ? l.value = window : l.value = e;
76
76
  };
77
77
  Z(l, "scroll", w);
78
78
  const A = () => {
@@ -1,7 +1,7 @@
1
- import { withInstall as o, withNoopInstall as u } from "../../utils/vue/install.js";
1
+ import { withNoopInstall as o, withInstall as u } from "../../utils/vue/install.js";
2
2
  import r from "./src/button2.js";
3
3
  import t from "./src/button-group2.js";
4
- const a = o(r, { ButtonGroup: t }), f = u(t);
4
+ const a = u(r, { ButtonGroup: t }), f = o(t);
5
5
  export {
6
6
  a as ElButton,
7
7
  f as ElButtonGroup,
package/dist/resolver.js CHANGED
@@ -1,23 +1,24 @@
1
- function o(s = {}) {
2
- const { importStyle: r = !0 } = s;
1
+ import { isVendored as i } from "./vendored-components.js";
2
+ function c(s = {}) {
3
+ const { importStyle: t = !0 } = s;
3
4
  return {
4
5
  type: "component",
5
- resolve: (t) => {
6
- if (!t.startsWith("Ep")) return;
7
- const e = t.slice(2);
8
- return e === "Button" || e === "ButtonGroup" || e === "Tag" || e === "CheckTag" || e === "Menu" || e === "MenuItem" || e === "MenuItemGroup" || e === "SubMenu" ? {
9
- name: t,
6
+ resolve: (e) => {
7
+ if (!e.startsWith("Ep")) return;
8
+ const r = e.slice(2);
9
+ return i(r) ? {
10
+ name: e,
10
11
  from: "ep-craft",
11
- sideEffects: r ? ["ep-craft/dist/index.css"] : void 0
12
+ sideEffects: t ? ["ep-craft/dist/index.css"] : void 0
12
13
  } : {
13
- name: `El${e}`,
14
+ name: `El${r}`,
14
15
  from: "ep-craft",
15
- sideEffects: r ? ["ep-craft/dist/index.css"] : void 0
16
+ sideEffects: t ? ["ep-craft/dist/index.css"] : void 0
16
17
  };
17
18
  }
18
19
  };
19
20
  }
20
21
  export {
21
- o as EpCraftResolver,
22
- o as default
22
+ c as EpCraftResolver,
23
+ c as default
23
24
  };
@@ -0,0 +1,6 @@
1
+ export declare const unique: <T>(arr: T[]) => T[];
2
+ export declare const extractFirst: <T>(arr: T | T[]) => T;
3
+ type Many<T> = T | ReadonlyArray<T>;
4
+ /** like `_.castArray`, except falsy value returns empty array. */
5
+ export declare const castArray: <T>(arr: Many<T>) => T[];
6
+ export { castArray as ensureArray } from 'lodash-unified';
@@ -0,0 +1,5 @@
1
+ import { isArray as o } from "../node_modules/.pnpm/@vue_shared@3.5.40/node_modules/@vue/shared/dist/shared.esm-bundler.js";
2
+ const i = (t) => !t && t !== 0 ? [] : o(t) ? t : [t];
3
+ export {
4
+ i as castArray
5
+ };
@@ -0,0 +1,4 @@
1
+ import { isClient, isIOS } from '@vueuse/core';
2
+ export declare const isFirefox: () => boolean;
3
+ export declare const isAndroid: () => boolean;
4
+ export { isClient, isIOS };
@@ -0,0 +1,6 @@
1
+ import { isClient as i } from "../node_modules/.pnpm/@vueuse_shared@14.3.0_vue@3.5.40_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js";
2
+ const t = () => i && /android/i.test(window.navigator.userAgent);
3
+ export {
4
+ t as isAndroid,
5
+ i as isClient
6
+ };
@@ -0,0 +1,26 @@
1
+ export declare const isShadowRoot: (e: unknown) => e is ShadowRoot;
2
+ /**
3
+ * Determine if the testing element is visible on screen no matter if its on the viewport or not
4
+ */
5
+ export declare const isVisible: (element: HTMLElement) => boolean;
6
+ export declare const obtainAllFocusableElements: (element: HTMLElement) => HTMLElement[];
7
+ /**
8
+ * @desc Determine if target element is focusable
9
+ * @param element {HTMLElement}
10
+ * @returns {Boolean} true if it is focusable
11
+ */
12
+ export declare const isFocusable: (element: HTMLElement) => boolean;
13
+ /**
14
+ * Trigger an event
15
+ * mouseenter, mouseleave, mouseover, keyup, change, click, etc.
16
+ * @param {HTMLElement} elm
17
+ * @param {String} name
18
+ * @param {*} opts
19
+ */
20
+ export declare const triggerEvent: (elm: HTMLElement, name: string, ...opts: Array<boolean>) => HTMLElement;
21
+ export declare const isLeaf: (el: HTMLElement) => boolean;
22
+ export declare const getSibling: (el: HTMLElement, distance: number, elClass: string) => Element | null;
23
+ export declare const focusElement: (el?: HTMLElement | {
24
+ focus: () => void;
25
+ } | null, options?: FocusOptions) => void;
26
+ export declare const focusNode: (el: HTMLElement) => void;
@@ -0,0 +1,26 @@
1
+ const e = (t) => typeof Element > "u" ? !1 : t instanceof Element, a = (t) => {
2
+ if (t.tabIndex > 0 || t.tabIndex === 0 && t.getAttribute("tabIndex") !== null)
3
+ return !0;
4
+ if (t.tabIndex < 0 || t.hasAttribute("disabled") || t.getAttribute("aria-disabled") === "true")
5
+ return !1;
6
+ switch (t.nodeName) {
7
+ case "A":
8
+ return !!t.href && t.rel !== "ignore";
9
+ case "INPUT":
10
+ return !(t.type === "hidden" || t.type === "file");
11
+ case "BUTTON":
12
+ case "SELECT":
13
+ case "TEXTAREA":
14
+ return !0;
15
+ default:
16
+ return !1;
17
+ }
18
+ }, i = (t, u) => {
19
+ if (!t || !t.focus) return;
20
+ let r = !1;
21
+ e(t) && !a(t) && !t.getAttribute("tabindex") && (t.setAttribute("tabindex", "-1"), r = !0), t.focus(u), e(t) && r && t.removeAttribute("tabindex");
22
+ };
23
+ export {
24
+ i as focusElement,
25
+ a as isFocusable
26
+ };
@@ -0,0 +1,3 @@
1
+ type GetElement = <T extends string | HTMLElement | Window | null | undefined>(target: T) => T extends string ? HTMLElement | null : T;
2
+ export declare const getElement: GetElement;
3
+ export {};
@@ -0,0 +1,8 @@
1
+ export declare const composeEventHandlers: <E>(theirsHandler?: (event: E) => boolean | void, oursHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
2
+ checkForDefaultPrevented?: boolean | undefined;
3
+ }) => (event: E) => void;
4
+ type WhenMouseHandler = (e: PointerEvent) => any;
5
+ export declare const whenMouse: (handler: WhenMouseHandler) => WhenMouseHandler;
6
+ export declare const getEventCode: (event: KeyboardEvent) => string;
7
+ export declare const getEventKey: (event: KeyboardEvent) => string;
8
+ export {};
@@ -0,0 +1,32 @@
1
+ import { EVENT_CODE as n } from "../../constants/aria.js";
2
+ import { isAndroid as r } from "../browser.js";
3
+ const y = (t, e, { checkForDefaultPrevented: c = !0 } = {}) => (o) => {
4
+ const i = t == null ? void 0 : t(o);
5
+ if (c === !1 || !i)
6
+ return e == null ? void 0 : e(o);
7
+ }, E = (t) => {
8
+ if (t.code && t.code !== "Unidentified") return t.code;
9
+ const e = f(t);
10
+ if (e) {
11
+ if (Object.values(n).includes(e)) return e;
12
+ switch (e) {
13
+ case " ":
14
+ return n.space;
15
+ default:
16
+ return "";
17
+ }
18
+ }
19
+ return "";
20
+ }, f = (t) => {
21
+ let e = t.key && t.key !== "Unidentified" ? t.key : "";
22
+ if (!e && t.type === "keyup" && r()) {
23
+ const c = t.target;
24
+ e = c.value.charAt(c.selectionStart - 1);
25
+ }
26
+ return e;
27
+ };
28
+ export {
29
+ y as composeEventHandlers,
30
+ E as getEventCode,
31
+ f as getEventKey
32
+ };
@@ -0,0 +1,7 @@
1
+ import { focusElement, focusNode, getSibling, isFocusable, isLeaf, isShadowRoot, isVisible, obtainAllFocusableElements, triggerEvent } from "./aria";
2
+ import { composeEventHandlers, getEventCode, getEventKey, whenMouse } from "./event";
3
+ import { getClientXY, getOffsetTop, getOffsetTopDistance, isInContainer } from "./position";
4
+ import { addClass, addUnit, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle } from "./style";
5
+ import { animateScrollTo, getScrollBarWidth, getScrollContainer, getScrollElement, getScrollTop, isScroll, scrollIntoView } from "./scroll";
6
+ import { getElement } from "./element";
7
+ export { addClass, addUnit, animateScrollTo, classNameToArray, composeEventHandlers, focusElement, focusNode, getClientXY, getElement, getEventCode, getEventKey, getOffsetTop, getOffsetTopDistance, getScrollBarWidth, getScrollContainer, getScrollElement, getScrollTop, getSibling, getStyle, hasClass, isFocusable, isInContainer, isLeaf, isScroll, isShadowRoot, isVisible, obtainAllFocusableElements, removeClass, removeStyle, scrollIntoView, setStyle, triggerEvent, whenMouse };
@@ -0,0 +1,7 @@
1
+ export declare const isInContainer: (el?: Element, container?: Element | Window) => boolean;
2
+ export declare const getOffsetTop: (el: HTMLElement) => number;
3
+ export declare const getOffsetTopDistance: (el: HTMLElement, containerEl: HTMLElement) => number;
4
+ export declare const getClientXY: (event: MouseEvent | TouchEvent) => {
5
+ clientX: number;
6
+ clientY: number;
7
+ };
@@ -0,0 +1,11 @@
1
+ export declare const isScroll: (el: HTMLElement, isVertical?: boolean) => boolean;
2
+ export declare const getScrollContainer: (el: HTMLElement, isVertical?: boolean) => Window | HTMLElement | undefined;
3
+ export declare const getScrollBarWidth: (namespace: string) => number;
4
+ /**
5
+ * Scroll with in the container element, positioning the **selected** element at the top
6
+ * of the container
7
+ */
8
+ export declare function scrollIntoView(container: HTMLElement, selected: HTMLElement): void;
9
+ export declare function animateScrollTo(container: HTMLElement | Window, from: number, to: number, duration: number, callback?: unknown): () => void;
10
+ export declare const getScrollElement: (target: HTMLElement, container: HTMLElement | Window) => HTMLElement;
11
+ export declare const getScrollTop: (container: HTMLElement | Window) => number;
@@ -0,0 +1,9 @@
1
+ import type { CSSProperties } from 'vue';
2
+ export declare const classNameToArray: (cls?: string) => string[];
3
+ export declare const hasClass: (el: Element, cls: string) => boolean;
4
+ export declare const addClass: (el: Element, cls: string) => void;
5
+ export declare const removeClass: (el: Element, cls: string) => void;
6
+ export declare const getStyle: (element: HTMLElement, styleName: keyof CSSProperties) => string;
7
+ export declare const setStyle: (element: HTMLElement, styleName: CSSProperties | keyof CSSProperties, value?: string | number) => void;
8
+ export declare const removeStyle: (element: HTMLElement, style: CSSProperties | keyof CSSProperties) => void;
9
+ export declare function addUnit(value?: string | number, defaultUnit?: string): string | undefined;
@@ -0,0 +1,15 @@
1
+ import { isNumber as t, isStringNumber as n } from "../types.js";
2
+ import { isString as m } from "../../node_modules/.pnpm/@vue_shared@3.5.40/node_modules/@vue/shared/dist/shared.esm-bundler.js";
3
+ import { debugWarn as o } from "../error.js";
4
+ const s = "utils/dom/style";
5
+ function d(r, i = "px") {
6
+ if (!r && r !== 0) return "";
7
+ if (t(r) || n(r))
8
+ return `${r}${i}`;
9
+ if (m(r))
10
+ return r;
11
+ o(s, "binding value must be a string or number");
12
+ }
13
+ export {
14
+ d as addUnit
15
+ };
@@ -0,0 +1 @@
1
+ export declare function easeInOutCubic(t: number, b: number, c: number, d: number): number;
@@ -0,0 +1,3 @@
1
+ export declare function throwError(scope: string, m: string): never;
2
+ export declare function debugWarn(err: Error): void;
3
+ export declare function debugWarn(scope: string, message: string): void;
@@ -0,0 +1,15 @@
1
+ import { isString as e } from "../node_modules/.pnpm/@vue_shared@3.5.40/node_modules/@vue/shared/dist/shared.esm-bundler.js";
2
+ class t extends Error {
3
+ constructor(n) {
4
+ super(n), this.name = "ElementPlusError";
5
+ }
6
+ }
7
+ function i(r, n) {
8
+ if (process.env.NODE_ENV !== "production") {
9
+ const o = e(r) ? new t(`[${r}] ${n}`) : r;
10
+ console.warn(o);
11
+ }
12
+ }
13
+ export {
14
+ i as debugWarn
15
+ };
@@ -0,0 +1,2 @@
1
+ import { NOOP, toRawType } from '@vue/shared';
2
+ export { NOOP, toRawType };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @deprecated This function is deprecated and will be removed in future versions.
3
+ */
4
+ export declare const isKorean: (text: string) => boolean;
@@ -0,0 +1,31 @@
1
+ export * from './arrays';
2
+ export * from './browser';
3
+ export * from './easings';
4
+ export * from './error';
5
+ export * from './functions';
6
+ export * from './i18n';
7
+ export * from './numbers';
8
+ export * from './objects';
9
+ export * from './raf';
10
+ export * from './rand';
11
+ export * from './strings';
12
+ export * from './throttleByRaf';
13
+ export * from './types';
14
+ export * from './typescript';
15
+ export * from './dom/aria';
16
+ export * from './dom/element';
17
+ export * from './dom/event';
18
+ export * from './dom/position';
19
+ export * from './dom/scroll';
20
+ export * from './dom/style';
21
+ export * from './vue/global-node';
22
+ export * from './vue/icon';
23
+ export * from './vue/install';
24
+ export * from './vue/refs';
25
+ export * from './vue/size';
26
+ export * from './vue/typescript';
27
+ export * from './vue/validator';
28
+ export * from './vue/vnode';
29
+ export * from './vue/props/runtime';
30
+ export * from './vue/props/types';
31
+ export * from './vue/props/util';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Due to browser rendering and calculation precision loss issues,
3
+ * boundary checks cannot be based solely on value equality;
4
+ * a certain range of fluctuation is permissible.
5
+ */
6
+ export declare function isGreaterThan(a: number, b: number, epsilon?: number): boolean;
@@ -0,0 +1,7 @@
1
+ import type { Arrayable } from '.';
2
+ export declare const keysOf: <T extends object>(arr: T) => Array<keyof T>;
3
+ export declare const entriesOf: <T extends object>(arr: T) => [keyof T, T[keyof T]][];
4
+ export { hasOwn } from '@vue/shared';
5
+ export declare const getProp: <T = any>(obj: Record<string, any>, path: Arrayable<string>, defaultValue?: any) => {
6
+ value: T;
7
+ };
@@ -0,0 +1,2 @@
1
+ export declare const rAF: (fn: () => void) => number;
2
+ export declare const cAF: (handle: number) => void;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @deprecated Use `useId` `useIdInjection` instead
3
+ * Generate random number in range [0, 1000]
4
+ * Maybe replace with [uuid](https://www.npmjs.com/package/uuid)
5
+ */
6
+ export declare const generateId: () => number;
7
+ /**
8
+ * @deprecated
9
+ * Generating a random int in range (0, max - 1)
10
+ * @param max {number}
11
+ */
12
+ export declare const getRandomInt: (max: number) => number;
@@ -0,0 +1,8 @@
1
+ import { camelize, hyphenate } from '@vue/shared';
2
+ export { camelize, hyphenate };
3
+ export declare const kebabCase: (str: string) => string;
4
+ /**
5
+ * fork from {@link https://github.com/sindresorhus/escape-string-regexp}
6
+ */
7
+ export declare const escapeStringRegexp: (string?: string) => string;
8
+ export declare const capitalize: <T extends string>(str: T) => Capitalize<T>;
@@ -0,0 +1,4 @@
1
+ export declare function throttleByRaf(cb: (...args: any[]) => void): {
2
+ (...args: any[]): void;
3
+ cancel(): void;
4
+ };