ep-craft 0.1.20 → 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 (203) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/components/button/EpButton.vue.d.ts +6 -6
  3. package/dist/components/button/EpButton.vue.js +122 -0
  4. package/dist/components/button/EpButton2.vue.js +4 -0
  5. package/dist/components/button/button.d.ts +3 -3
  6. package/dist/components/button/button.js +95 -0
  7. package/dist/components/button/index.d.ts +2 -2
  8. package/dist/components/button/index.js +3 -4
  9. package/dist/components/button/use-button-custom.js +66 -0
  10. package/dist/components/check-tag/EpCheckTag.vue.js +29 -0
  11. package/dist/components/check-tag/EpCheckTag2.vue.js +4 -0
  12. package/dist/components/check-tag/check-tag.js +20 -0
  13. package/dist/components/check-tag/index.d.ts +2 -2
  14. package/dist/components/check-tag/index.js +3 -4
  15. package/dist/components/collapse-transition/index.d.ts +20 -3
  16. package/dist/components/collapse-transition/index.js +6 -4
  17. package/dist/components/collapse-transition/src/collapse-transition.vue.d.ts +12 -0
  18. package/dist/components/collapse-transition/src/collapse-transition.vue.js +55 -0
  19. package/dist/components/collapse-transition/src/collapse-transition2.vue.js +4 -0
  20. package/dist/components/config-provider/src/constants.d.ts +14 -0
  21. package/dist/components/config-provider/src/hooks/use-global-config.d.ts +32 -0
  22. package/dist/components/focus-trap/index.d.ts +81 -0
  23. package/dist/components/focus-trap/index.js +19 -0
  24. package/dist/components/focus-trap/src/focus-trap.vue.d.ts +32 -0
  25. package/dist/components/focus-trap/src/focus-trap.vue.js +10 -0
  26. package/dist/components/focus-trap/src/focus-trap2.vue.js +164 -0
  27. package/dist/components/focus-trap/src/tokens.d.ts +13 -0
  28. package/dist/components/focus-trap/src/tokens.js +17 -0
  29. package/dist/components/focus-trap/src/utils.d.ts +29 -0
  30. package/dist/components/focus-trap/src/utils.js +83 -0
  31. package/dist/components/form/index.d.ts +3 -0
  32. package/dist/components/form/index.js +4 -2
  33. package/dist/components/form/src/constants.d.ts +4 -0
  34. package/dist/components/form/src/constants.js +4 -0
  35. package/dist/components/form/src/hooks/use-form-common-props.d.ts +6 -0
  36. package/dist/components/form/src/hooks/use-form-item.d.ts +19 -0
  37. package/dist/components/form/src/types.d.ts +24 -0
  38. package/dist/components/icon/index.d.ts +21 -3
  39. package/dist/components/icon/index.js +7 -4
  40. package/dist/components/icon/src/icon.d.ts +34 -0
  41. package/dist/components/icon/src/icon.js +16 -0
  42. package/dist/components/icon/src/icon.vue.d.ts +13 -0
  43. package/dist/components/icon/src/icon.vue.js +36 -0
  44. package/dist/components/icon/src/icon2.vue.js +4 -0
  45. package/dist/components/menu/menu.d.ts +2 -2
  46. package/dist/components/popper/index.d.ts +54 -3
  47. package/dist/components/popper/index.js +30 -5
  48. package/dist/components/popper/src/arrow.d.ts +30 -0
  49. package/dist/components/popper/src/arrow.js +14 -0
  50. package/dist/components/popper/src/arrow.vue.d.ts +7 -0
  51. package/dist/components/popper/src/arrow.vue.js +4 -0
  52. package/dist/components/popper/src/arrow2.vue.js +37 -0
  53. package/dist/components/popper/src/composables/index.d.ts +4 -0
  54. package/dist/components/popper/src/composables/use-content-dom.d.ts +40 -0
  55. package/dist/components/popper/src/composables/use-content-dom.js +45 -0
  56. package/dist/components/popper/src/composables/use-content.d.ts +77 -0
  57. package/dist/components/popper/src/composables/use-content.js +76 -0
  58. package/dist/components/popper/src/composables/use-focus-trap.d.ts +12 -0
  59. package/dist/components/popper/src/composables/use-focus-trap.js +29 -0
  60. package/dist/components/popper/src/constants.d.ts +23 -0
  61. package/dist/components/popper/src/constants.js +5 -0
  62. package/dist/components/popper/src/content.d.ts +234 -0
  63. package/dist/components/popper/src/content.js +129 -0
  64. package/dist/components/popper/src/content.vue.d.ts +61 -0
  65. package/dist/components/popper/src/content.vue.js +4 -0
  66. package/dist/components/popper/src/content2.vue.js +151 -0
  67. package/dist/components/popper/src/popper.d.ts +35 -0
  68. package/dist/components/popper/src/popper.js +22 -0
  69. package/dist/components/popper/src/popper.vue.d.ts +22 -0
  70. package/dist/components/popper/src/popper.vue.js +38 -0
  71. package/dist/components/popper/src/popper2.vue.js +4 -0
  72. package/dist/components/popper/src/trigger.d.ts +130 -0
  73. package/dist/components/popper/src/trigger.js +36 -0
  74. package/dist/components/popper/src/trigger.vue.d.ts +18 -0
  75. package/dist/components/popper/src/trigger.vue.js +4 -0
  76. package/dist/components/popper/src/trigger2.vue.js +134 -0
  77. package/dist/components/popper/src/utils.d.ts +48 -0
  78. package/dist/components/popper/src/utils.js +57 -0
  79. package/dist/components/slot/index.d.ts +3 -0
  80. package/dist/components/slot/src/only-child.d.ts +7 -0
  81. package/dist/components/slot/src/only-child.js +55 -0
  82. package/dist/components/tabs/tabs.d.ts +1 -1
  83. package/dist/components/tag/EpTag.vue.js +96 -0
  84. package/dist/components/tag/EpTag2.vue.js +4 -0
  85. package/dist/components/tag/index.d.ts +2 -2
  86. package/dist/components/tag/index.js +2 -3
  87. package/dist/components/tag/tag.js +38 -0
  88. package/dist/components/tooltip/index.d.ts +174 -3
  89. package/dist/components/tooltip/index.js +18 -5
  90. package/dist/components/tooltip/src/constants.d.ts +18 -0
  91. package/dist/components/tooltip/src/constants.js +4 -0
  92. package/dist/components/tooltip/src/content.d.ts +327 -0
  93. package/dist/components/tooltip/src/content.js +72 -0
  94. package/dist/components/tooltip/src/content.vue.d.ts +47 -0
  95. package/dist/components/tooltip/src/content.vue.js +188 -0
  96. package/dist/components/tooltip/src/content2.vue.js +4 -0
  97. package/dist/components/tooltip/src/tooltip.d.ts +346 -0
  98. package/dist/components/tooltip/src/tooltip.js +47 -0
  99. package/dist/components/tooltip/src/tooltip.vue.d.ts +90 -0
  100. package/dist/components/tooltip/src/tooltip.vue.js +236 -0
  101. package/dist/components/tooltip/src/tooltip2.vue.js +4 -0
  102. package/dist/components/tooltip/src/trigger.d.ts +94 -0
  103. package/dist/components/tooltip/src/trigger.js +41 -0
  104. package/dist/components/tooltip/src/trigger.vue.d.ts +26 -0
  105. package/dist/components/tooltip/src/trigger.vue.js +104 -0
  106. package/dist/components/tooltip/src/trigger2.vue.js +4 -0
  107. package/dist/components/tooltip/src/utils.d.ts +5 -0
  108. package/dist/components/tooltip/src/utils.js +9 -0
  109. package/dist/constants/aria.d.ts +17 -0
  110. package/dist/constants/aria.js +24 -0
  111. package/dist/constants/column-alignment.d.ts +2 -0
  112. package/dist/constants/date.d.ts +3 -0
  113. package/dist/constants/event.d.ts +3 -0
  114. package/dist/constants/form.d.ts +2 -0
  115. package/dist/constants/index.d.ts +7 -0
  116. package/dist/constants/key.d.ts +1 -0
  117. package/dist/constants/size.d.ts +7 -0
  118. package/dist/constants/size.js +4 -0
  119. package/dist/directives/click-outside/index.d.ts +3 -0
  120. package/dist/directives/index.d.ts +5 -0
  121. package/dist/directives/mousewheel/index.d.ts +11 -0
  122. package/dist/directives/repeat-click/index.d.ts +17 -0
  123. package/dist/directives/trap-focus/index.d.ts +9 -0
  124. package/dist/hooks/index.d.ts +17 -0
  125. package/dist/hooks/use-aria/index.d.ts +37 -0
  126. package/dist/hooks/use-aria/index.js +24 -0
  127. package/dist/hooks/use-delayed-toggle/index.d.ts +36 -0
  128. package/dist/hooks/use-delayed-toggle/index.js +63 -0
  129. package/dist/hooks/use-deprecated/index.d.ts +11 -0
  130. package/dist/hooks/use-empty-values/index.d.ts +29 -0
  131. package/dist/hooks/use-empty-values/index.js +23 -0
  132. package/dist/hooks/use-escape-keydown/index.d.ts +1 -0
  133. package/dist/hooks/use-escape-keydown/index.js +21 -0
  134. package/dist/hooks/use-forward-ref/index.d.ts +9 -0
  135. package/dist/hooks/use-forward-ref/index.js +23 -0
  136. package/dist/hooks/use-id/index.d.ts +8 -0
  137. package/dist/hooks/use-id/index.js +27 -0
  138. package/dist/hooks/use-locale/index.d.ts +17 -0
  139. package/dist/hooks/use-model-toggle/index.d.ts +46 -0
  140. package/dist/hooks/use-model-toggle/index.js +67 -0
  141. package/dist/hooks/use-namespace/index.d.ts +23 -0
  142. package/dist/hooks/use-namespace/index.js +45 -0
  143. package/dist/hooks/use-ordered-children/index.d.ts +14 -0
  144. package/dist/hooks/use-popper/index.d.ts +78 -0
  145. package/dist/hooks/use-popper/index.js +97 -0
  146. package/dist/hooks/use-popper-container/index.d.ts +8 -0
  147. package/dist/hooks/use-popper-container/index.js +26 -0
  148. package/dist/hooks/use-prop/index.d.ts +2 -0
  149. package/dist/hooks/use-size/index.d.ts +21 -0
  150. package/dist/hooks/use-size/index.js +8 -0
  151. package/dist/hooks/use-timeout/index.d.ts +4 -0
  152. package/dist/hooks/use-timeout/index.js +16 -0
  153. package/dist/hooks/use-z-index/index.d.ts +13 -0
  154. package/dist/hooks/use-z-index/index.js +27 -0
  155. 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
  156. package/dist/resolver.js +13 -12
  157. package/dist/utils/arrays.d.ts +6 -0
  158. package/dist/utils/arrays.js +5 -0
  159. package/dist/utils/browser.d.ts +4 -0
  160. package/dist/utils/browser.js +6 -0
  161. package/dist/utils/dom/aria.d.ts +26 -0
  162. package/dist/utils/dom/aria.js +26 -0
  163. package/dist/utils/dom/element.d.ts +3 -0
  164. package/dist/utils/dom/event.d.ts +8 -0
  165. package/dist/utils/dom/event.js +32 -0
  166. package/dist/utils/dom/index.d.ts +7 -0
  167. package/dist/utils/dom/position.d.ts +7 -0
  168. package/dist/utils/dom/scroll.d.ts +11 -0
  169. package/dist/utils/dom/style.d.ts +9 -0
  170. package/dist/utils/dom/style.js +15 -0
  171. package/dist/utils/easings.d.ts +1 -0
  172. package/dist/utils/error.d.ts +3 -0
  173. package/dist/utils/error.js +15 -0
  174. package/dist/utils/functions.d.ts +2 -0
  175. package/dist/utils/i18n.d.ts +4 -0
  176. package/dist/utils/index.d.ts +31 -0
  177. package/dist/utils/numbers.d.ts +6 -0
  178. package/dist/utils/objects.d.ts +7 -0
  179. package/dist/utils/raf.d.ts +2 -0
  180. package/dist/utils/rand.d.ts +12 -0
  181. package/dist/utils/strings.d.ts +8 -0
  182. package/dist/utils/throttleByRaf.d.ts +4 -0
  183. package/dist/utils/types.d.ts +9 -0
  184. package/dist/utils/types.js +16 -0
  185. package/dist/utils/typescript.d.ts +93 -0
  186. package/dist/utils/vue/global-node.d.ts +3 -0
  187. package/dist/utils/vue/icon.d.ts +27 -0
  188. package/dist/utils/vue/index.d.ts +9 -0
  189. package/dist/utils/vue/install.d.ts +7 -0
  190. package/dist/utils/vue/install.js +34 -0
  191. package/dist/utils/vue/props/index.d.ts +2 -0
  192. package/dist/utils/vue/props/runtime.d.ts +29 -0
  193. package/dist/utils/vue/props/runtime.js +36 -0
  194. package/dist/utils/vue/props/types.d.ts +85 -0
  195. package/dist/utils/vue/props/util.d.ts +7 -0
  196. package/dist/utils/vue/refs.d.ts +2 -0
  197. package/dist/utils/vue/size.d.ts +2 -0
  198. package/dist/utils/vue/typescript.d.ts +25 -0
  199. package/dist/utils/vue/validator.d.ts +3 -0
  200. package/dist/utils/vue/vnode.d.ts +48 -0
  201. package/dist/vendored-components.d.ts +13 -0
  202. package/dist/vendored-components.js +22 -0
  203. package/package.json +11 -3
@@ -0,0 +1,9 @@
1
+ const s = (t, e) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [r, c] of e)
4
+ o[r] = c;
5
+ return o;
6
+ };
7
+ export {
8
+ s as default
9
+ };
@@ -17,8 +17,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
17
17
  };
18
18
  readonly type: {
19
19
  readonly type: import("vue").PropType<typeof import("./button").buttonTypes[number]>;
20
- readonly values: readonly ["primary", "success", "warning", "info", "danger", "text"];
21
- readonly default: "primary";
20
+ readonly values: readonly ["default", "primary", "success", "warning", "info", "danger", "text", ""];
21
+ readonly default: "";
22
22
  };
23
23
  readonly icon: {
24
24
  readonly type: import("vue").PropType<any>;
@@ -66,7 +66,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
66
66
  }>, {
67
67
  ref: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
68
68
  size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
69
- type: import("vue").ComputedRef<"text" | "primary" | "success" | "info" | "warning" | "danger">;
69
+ type: import("vue").ComputedRef<any>;
70
70
  disabled: import("vue").ComputedRef<boolean>;
71
71
  shouldAddSpace: import("vue").ComputedRef<boolean>;
72
72
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -82,8 +82,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
82
82
  };
83
83
  readonly type: {
84
84
  readonly type: import("vue").PropType<typeof import("./button").buttonTypes[number]>;
85
- readonly values: readonly ["primary", "success", "warning", "info", "danger", "text"];
86
- readonly default: "primary";
85
+ readonly values: readonly ["default", "primary", "success", "warning", "info", "danger", "text", ""];
86
+ readonly default: "";
87
87
  };
88
88
  readonly icon: {
89
89
  readonly type: import("vue").PropType<any>;
@@ -131,7 +131,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
131
131
  }>> & Readonly<{
132
132
  onClick?: ((evt: MouseEvent) => any) | undefined;
133
133
  }>, {
134
- readonly type: "text" | "primary" | "success" | "info" | "warning" | "danger";
134
+ readonly type: "" | "default" | "text" | "primary" | "success" | "info" | "warning" | "danger";
135
135
  readonly link: boolean;
136
136
  readonly disabled: boolean;
137
137
  readonly circle: boolean;
@@ -0,0 +1,122 @@
1
+ import { defineComponent as L, useSlots as M, inject as O, computed as o, ref as Q, Text as R, openBlock as n, createBlock as u, resolveDynamicComponent as m, mergeProps as W, unref as f, withCtx as v, createElementBlock as E, Fragment as X, renderSlot as g, normalizeClass as z, createCommentVNode as F } from "vue";
2
+ import { ElIcon as Y } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/icon/index.js";
3
+ import { useFormSize as Z, useFormDisabled as G } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/form/src/hooks/use-form-common-props.js";
4
+ import { useFormItem as x } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/form/src/hooks/use-form-item.js";
5
+ import { useGlobalConfig as ee } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/config-provider/src/hooks/use-global-config.js";
6
+ import { buttonGroupContextKey as te } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/button/src/constants.js";
7
+ import { buttonEmits as oe, buttonProps as se } from "./button.js";
8
+ import { useButtonCustomStyle as ne } from "./use-button-custom.js";
9
+ const y = "el", b = "button", me = /* @__PURE__ */ L({
10
+ name: "EpButton",
11
+ __name: "EpButton",
12
+ props: se,
13
+ emits: oe,
14
+ setup(D, { expose: P, emit: T }) {
15
+ const $ = Y, t = D, K = T, d = M(), j = (e = "") => e ? `${y}-${b}-${e}` : `${y}-${b}`, k = (e) => e ? `${y}-${b}--${e}` : "", s = (e, r = !0) => e && r ? `is-${e}` : "", a = O(te, void 0), l = ee("button"), { form: p } = x(), h = Z(o(() => a == null ? void 0 : a.size)), i = G(), _ = Q(), C = o(
16
+ () => {
17
+ var e;
18
+ return t.type || (a == null ? void 0 : a.type) || ((e = l.value) == null ? void 0 : e.type) || "";
19
+ }
20
+ ), w = o(
21
+ () => {
22
+ var e;
23
+ return t.autoInsertSpace ?? ((e = l.value) == null ? void 0 : e.autoInsertSpace) ?? !1;
24
+ }
25
+ ), I = o(() => {
26
+ var e;
27
+ return t.plain ?? ((e = l.value) == null ? void 0 : e.plain) ?? !1;
28
+ }), A = o(() => {
29
+ var e;
30
+ return t.round ?? ((e = l.value) == null ? void 0 : e.round) ?? !1;
31
+ }), S = o(() => {
32
+ var e;
33
+ return t.text ?? ((e = l.value) == null ? void 0 : e.text) ?? !1;
34
+ }), N = o(() => {
35
+ var e;
36
+ return t.dashed ?? ((e = l.value) == null ? void 0 : e.dashed) ?? !1;
37
+ }), U = o(() => t.tag === "button" ? {
38
+ ariaDisabled: i.value || t.loading,
39
+ disabled: i.value || t.loading,
40
+ autofocus: t.autofocus,
41
+ type: t.nativeType
42
+ } : {}), B = o(() => {
43
+ var r;
44
+ const e = (r = d.default) == null ? void 0 : r.call(d);
45
+ if (w.value && (e == null ? void 0 : e.length) === 1) {
46
+ const c = e[0];
47
+ if ((c == null ? void 0 : c.type) === R) {
48
+ const J = c.children;
49
+ return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(J.trim());
50
+ }
51
+ }
52
+ return !1;
53
+ }), V = (e) => {
54
+ if (i.value || t.loading) {
55
+ e.stopPropagation();
56
+ return;
57
+ }
58
+ t.nativeType === "reset" && (p == null || p.resetFields()), K("click", e);
59
+ }, q = ne({
60
+ props: t,
61
+ plain: I,
62
+ text: S,
63
+ disabled: i
64
+ }), H = o(() => [
65
+ j(),
66
+ k(C.value),
67
+ k(h.value),
68
+ s("disabled", i.value),
69
+ s("loading", t.loading),
70
+ s("plain", I.value),
71
+ s("round", A.value),
72
+ s("circle", t.circle),
73
+ s("text", S.value),
74
+ s("dashed", N.value),
75
+ s("link", t.link),
76
+ s("has-bg", t.bg)
77
+ ]);
78
+ return P({
79
+ ref: _,
80
+ size: h,
81
+ type: C,
82
+ disabled: i,
83
+ shouldAddSpace: B
84
+ }), (e, r) => (n(), u(m(e.tag), W({
85
+ ref_key: "_ref",
86
+ ref: _
87
+ }, U.value, {
88
+ class: H.value,
89
+ style: f(q),
90
+ onClick: V
91
+ }), {
92
+ default: v(() => [
93
+ e.loading ? (n(), E(X, { key: 0 }, [
94
+ e.$slots.loading ? g(e.$slots, "loading", {}, void 0, void 0, 0) : (n(), u(f($), {
95
+ key: 1,
96
+ class: z("is-loading")
97
+ }, {
98
+ default: v(() => [
99
+ (n(), u(m(e.loadingIcon)))
100
+ ]),
101
+ _: 1
102
+ }))
103
+ ], 64)) : e.icon || e.$slots.icon ? (n(), u(f($), { key: 1 }, {
104
+ default: v(() => [
105
+ e.icon ? (n(), u(m(e.icon), { key: 0 })) : g(e.$slots, "icon", {}, void 0, void 0, 1)
106
+ ]),
107
+ _: 3
108
+ })) : F("", !0),
109
+ e.$slots.default ? (n(), E("span", {
110
+ key: 2,
111
+ class: z({ "el-button__text--expand": B.value })
112
+ }, [
113
+ g(e.$slots, "default")
114
+ ], 2)) : F("", !0)
115
+ ]),
116
+ _: 3
117
+ }, 16, ["class", "style"]));
118
+ }
119
+ });
120
+ export {
121
+ me as default
122
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./EpButton.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -3,7 +3,7 @@ import type { ExtractPropTypes, PropType } from 'vue';
3
3
  * EpButton 的 props / emits / 常量定义
4
4
  * 从 element-plus 按钮源码 vendored 而来,可直接修改。
5
5
  */
6
- export declare const buttonTypes: readonly ["primary", "success", "warning", "info", "danger", "text"];
6
+ export declare const buttonTypes: readonly ["default", "primary", "success", "warning", "info", "danger", "text", ""];
7
7
  export declare const buttonNativeTypes: readonly ["button", "submit", "reset"];
8
8
  export declare const buttonProps: {
9
9
  /** 按钮尺寸 */
@@ -19,8 +19,8 @@ export declare const buttonProps: {
19
19
  /** 按钮类型 */
20
20
  readonly type: {
21
21
  readonly type: PropType<(typeof buttonTypes)[number]>;
22
- readonly values: readonly ["primary", "success", "warning", "info", "danger", "text"];
23
- readonly default: "primary";
22
+ readonly values: readonly ["default", "primary", "success", "warning", "info", "danger", "text", ""];
23
+ readonly default: "";
24
24
  };
25
25
  /** 图标组件 */
26
26
  readonly icon: {
@@ -0,0 +1,95 @@
1
+ import { Loading as e } from "../../node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.40_typescript@5.9.3_/node_modules/@element-plus/icons-vue/dist/index.js";
2
+ const o = [
3
+ "default",
4
+ "primary",
5
+ "success",
6
+ "warning",
7
+ "info",
8
+ "danger",
9
+ "text",
10
+ ""
11
+ ], n = ["button", "submit", "reset"], l = {
12
+ /** 按钮尺寸 */
13
+ size: {
14
+ type: String,
15
+ values: ["", "large", "default", "small", "mini"]
16
+ },
17
+ /** 是否禁用 */
18
+ disabled: {
19
+ type: Boolean,
20
+ default: void 0
21
+ },
22
+ /** 按钮类型 */
23
+ type: {
24
+ type: String,
25
+ values: o,
26
+ default: ""
27
+ },
28
+ /** 图标组件 */
29
+ icon: {
30
+ type: [String, Object, Function]
31
+ },
32
+ /** 原生 button 类型 */
33
+ nativeType: {
34
+ type: String,
35
+ values: n,
36
+ default: "button"
37
+ },
38
+ /** 是否为加载中状态 */
39
+ loading: Boolean,
40
+ /** 自定义加载中图标组件 */
41
+ loadingIcon: {
42
+ type: [String, Object, Function],
43
+ default: () => e
44
+ },
45
+ /** 是否为朴素按钮 */
46
+ plain: {
47
+ type: Boolean,
48
+ default: void 0
49
+ },
50
+ /** 是否为文字按钮 */
51
+ text: {
52
+ type: Boolean,
53
+ default: void 0
54
+ },
55
+ /** 是否为链接按钮 */
56
+ link: Boolean,
57
+ /** 文字按钮背景色是否常亮 */
58
+ bg: Boolean,
59
+ /** 原生 autofocus */
60
+ autofocus: Boolean,
61
+ /** 是否为圆角按钮 */
62
+ round: {
63
+ type: Boolean,
64
+ default: void 0
65
+ },
66
+ /** 是否为圆形按钮 */
67
+ circle: Boolean,
68
+ /** 是否为虚线按钮 */
69
+ dashed: {
70
+ type: Boolean,
71
+ default: void 0
72
+ },
73
+ /** 自定义按钮颜色,自动计算 hover 和 active 颜色 */
74
+ color: String,
75
+ /** 暗黑模式,将 color 自动转换为暗黑模式颜色 */
76
+ dark: Boolean,
77
+ /** 是否在两个中文字符之间自动插入空格 */
78
+ autoInsertSpace: {
79
+ type: Boolean,
80
+ default: void 0
81
+ },
82
+ /** 自定义元素标签 */
83
+ tag: {
84
+ type: [String, Object],
85
+ default: "button"
86
+ }
87
+ }, i = {
88
+ click: (t) => t instanceof MouseEvent
89
+ };
90
+ export {
91
+ i as buttonEmits,
92
+ n as buttonNativeTypes,
93
+ l as buttonProps,
94
+ o as buttonTypes
95
+ };
@@ -1,4 +1,4 @@
1
1
  import type { Plugin } from 'vue';
2
- import { ElButton } from 'element-plus';
3
- export declare const EpButton: typeof ElButton & Plugin;
2
+ import _EpButton from './EpButton.vue';
3
+ export declare const EpButton: typeof _EpButton & Plugin;
4
4
  export default EpButton;
@@ -1,7 +1,6 @@
1
- import "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/index.js";
2
1
  import { withInstall as t } from "../../utils/with-install.js";
3
- import { ElButton as o } from "../../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";
4
- const n = Object.assign({}, o, { name: "EpButton" }), i = t(n, "ep-button");
2
+ import o from "./EpButton.vue.js";
3
+ const p = t(o, "ep-button");
5
4
  export {
6
- i as EpButton
5
+ p as EpButton
7
6
  };
@@ -0,0 +1,66 @@
1
+ import { computed as m } from "vue";
2
+ import { TinyColor as x } from "../../node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/index.js";
3
+ const h = "el", f = "button", e = (o) => `--${h}-${f}-${o}`, b = (o) => `--${h}-${o}`, g = (o) => {
4
+ const n = {};
5
+ for (const a in o) o[a] && (n[e(a)] = o[a]);
6
+ return n;
7
+ };
8
+ function c(o, n = 20) {
9
+ return o.mix("#141414", n).toString();
10
+ }
11
+ function $({
12
+ props: o,
13
+ plain: n,
14
+ text: a,
15
+ disabled: v
16
+ }) {
17
+ return m(() => {
18
+ let r = {}, l = o.color;
19
+ if (!l) return r;
20
+ const u = l.match(/var\((.*?)\)/);
21
+ u && (l = window.getComputedStyle(window.document.documentElement).getPropertyValue(u[1]));
22
+ const t = new x(l), i = o.dark ? t.tint(20).toString() : c(t, 20);
23
+ if (n.value)
24
+ r = g({
25
+ "bg-color": o.dark ? c(t, 90) : t.tint(90).toString(),
26
+ "text-color": l,
27
+ "border-color": o.dark ? c(t, 50) : t.tint(50).toString(),
28
+ "hover-text-color": `var(${b("color-white")})`,
29
+ "hover-bg-color": l,
30
+ "hover-border-color": l,
31
+ "active-bg-color": i,
32
+ "active-text-color": `var(${b("color-white")})`,
33
+ "active-border-color": i
34
+ }), v.value && (r[e("disabled-bg-color")] = o.dark ? c(t, 90) : t.tint(90).toString(), r[e("disabled-text-color")] = o.dark ? c(t, 50) : t.tint(50).toString(), r[e("disabled-border-color")] = o.dark ? c(t, 80) : t.tint(80).toString());
35
+ else if (o.link || a.value) {
36
+ const d = o.dark ? c(t, 30) : t.tint(30).toString();
37
+ if (r = g({
38
+ "text-color": l,
39
+ "hover-text-color": d,
40
+ "active-text-color": i
41
+ }), o.link && (r[e("hover-link-text-color")] = d, r[e("active-color")] = i), v.value) {
42
+ const s = o.dark ? c(t, 50) : t.tint(50).toString();
43
+ r[e("disabled-bg-color")] = "transparent", r[e("disabled-text-color")] = s, r[e("disabled-border-color")] = "transparent";
44
+ }
45
+ } else {
46
+ const d = o.dark ? c(t, 30) : t.tint(30).toString(), s = t.isDark() ? `var(${b("color-white")})` : `var(${b("color-black")})`;
47
+ if (r = g({
48
+ "bg-color": l,
49
+ "text-color": s,
50
+ "border-color": l,
51
+ "hover-bg-color": d,
52
+ "hover-text-color": s,
53
+ "hover-border-color": d,
54
+ "active-bg-color": i,
55
+ "active-border-color": i
56
+ }), v.value) {
57
+ const k = o.dark ? c(t, 50) : t.tint(50).toString();
58
+ r[e("disabled-bg-color")] = k, r[e("disabled-text-color")] = o.dark ? "rgba(255, 255, 255, 0.5)" : `var(${b("color-white")})`, r[e("disabled-border-color")] = k;
59
+ }
60
+ }
61
+ return r;
62
+ });
63
+ }
64
+ export {
65
+ $ as useButtonCustomStyle
66
+ };
@@ -0,0 +1,29 @@
1
+ import { defineComponent as h, computed as k, openBlock as u, createElementBlock as g, normalizeClass as $, renderSlot as f } from "vue";
2
+ import { checkTagEmits as C, checkTagProps as b } from "./check-tag.js";
3
+ const o = "el", a = "check-tag", T = /* @__PURE__ */ h({
4
+ name: "EpCheckTag",
5
+ __name: "EpCheckTag",
6
+ props: b,
7
+ emits: C,
8
+ setup(r, { emit: l }) {
9
+ const c = r, t = l, p = () => `${o}-${a}`, d = (e) => e ? `${o}-${a}--${e}` : "", s = (e, n = !0) => e && n ? `is-${e}` : "", i = k(() => [
10
+ p(),
11
+ s("checked", c.checked),
12
+ s("disabled", c.disabled),
13
+ d(c.type || "primary")
14
+ ]), m = () => {
15
+ if (c.disabled) return;
16
+ const e = !c.checked;
17
+ t("change", e), t("update:checked", e);
18
+ };
19
+ return (e, n) => (u(), g("span", {
20
+ class: $(i.value),
21
+ onClick: m
22
+ }, [
23
+ f(e.$slots, "default")
24
+ ], 2));
25
+ }
26
+ });
27
+ export {
28
+ T as default
29
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./EpCheckTag.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,20 @@
1
+ const a = ["primary", "success", "info", "warning", "danger"], c = {
2
+ /** 是否被选中 */
3
+ checked: Boolean,
4
+ /** 是否禁用 */
5
+ disabled: Boolean,
6
+ /** 标签类型 */
7
+ type: {
8
+ type: String,
9
+ values: a,
10
+ default: "primary"
11
+ }
12
+ }, o = {
13
+ "update:checked": (e) => typeof e == "boolean",
14
+ change: (e) => typeof e == "boolean"
15
+ };
16
+ export {
17
+ o as checkTagEmits,
18
+ c as checkTagProps,
19
+ a as checkTagTypes
20
+ };
@@ -1,4 +1,4 @@
1
1
  import type { Plugin } from 'vue';
2
- import { ElCheckTag } from 'element-plus';
3
- export declare const EpCheckTag: typeof ElCheckTag & Plugin;
2
+ import _EpCheckTag from './EpCheckTag.vue';
3
+ export declare const EpCheckTag: typeof _EpCheckTag & Plugin;
4
4
  export default EpCheckTag;
@@ -1,7 +1,6 @@
1
- import "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/index.js";
2
1
  import { withInstall as t } from "../../utils/with-install.js";
3
- import { ElCheckTag as c } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/check-tag/index.js";
4
- const e = Object.assign({}, c, { name: "EpCheckTag" }), g = t(e, "ep-check-tag");
2
+ import o from "./EpCheckTag.vue.js";
3
+ const p = t(o, "ep-check-tag");
5
4
  export {
6
- g as EpCheckTag
5
+ p as EpCheckTag
7
6
  };
@@ -1,4 +1,21 @@
1
- import type { Plugin } from 'vue';
2
- import { ElCollapseTransition } from 'element-plus';
3
- export declare const EpCollapseTransition: typeof ElCollapseTransition & Plugin;
1
+ import CollapseTransition from './src/collapse-transition.vue';
2
+ import type { SFCWithInstall } from '@element-plus/utils';
3
+ export declare const ElCollapseTransition: SFCWithInstall<typeof CollapseTransition>;
4
+ export declare const EpCollapseTransition: {
5
+ 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, {
6
+ P: {};
7
+ B: {};
8
+ D: {};
9
+ C: {};
10
+ M: {};
11
+ Defaults: {};
12
+ }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
13
+ __isFragment?: never;
14
+ __isTeleport?: never;
15
+ __isSuspense?: never;
16
+ } & 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 & (new () => {
17
+ $slots: {
18
+ default?: (props: {}) => any;
19
+ };
20
+ }) & import("vue").Plugin;
4
21
  export default EpCollapseTransition;
@@ -1,7 +1,9 @@
1
- import "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/index.js";
2
1
  import { withInstall as o } from "../../utils/with-install.js";
3
- import { ElCollapseTransition as i } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/collapse-transition/index.js";
4
- const n = Object.assign({}, i, { name: "EpCollapseTransition" }), l = o(n, "ep-collapse-transition");
2
+ import "vue";
3
+ import { withInstall as i } from "../../utils/vue/install.js";
4
+ import t from "./src/collapse-transition.vue.js";
5
+ i(t);
6
+ const n = o(t, "ep-collapse-transition");
5
7
  export {
6
- l as EpCollapseTransition
8
+ n as EpCollapseTransition
7
9
  };
@@ -0,0 +1,12 @@
1
+ declare var __VLS_5: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_5) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
@@ -0,0 +1,55 @@
1
+ import { defineComponent as d, openBlock as s, createBlock as i, Transition as n, mergeProps as r, unref as p, toHandlers as l, withCtx as g, renderSlot as m } from "vue";
2
+ import { useNamespace as f } from "../../../hooks/use-namespace/index.js";
3
+ import "../../../hooks/use-size/index.js";
4
+ import "../../../hooks/use-z-index/index.js";
5
+ import "../../../hooks/use-delayed-toggle/index.js";
6
+ import "../../../hooks/use-aria/index.js";
7
+ import "../../../hooks/use-model-toggle/index.js";
8
+ import "../../../hooks/use-empty-values/index.js";
9
+ const P = /* @__PURE__ */ d({
10
+ name: "ElCollapseTransition",
11
+ __name: "collapse-transition",
12
+ setup(y) {
13
+ const a = f("collapse-transition"), o = (t) => {
14
+ t.style.maxHeight = "", t.style.overflow = t.dataset.oldOverflow, t.style.paddingTop = t.dataset.oldPaddingTop, t.style.paddingBottom = t.dataset.oldPaddingBottom;
15
+ }, e = {
16
+ beforeEnter(t) {
17
+ t.dataset || (t.dataset = {}), t.dataset.oldPaddingTop = t.style.paddingTop, t.dataset.oldPaddingBottom = t.style.paddingBottom, t.style.height && (t.dataset.elExistsHeight = t.style.height), t.style.maxHeight = 0, t.style.paddingTop = 0, t.style.paddingBottom = 0;
18
+ },
19
+ enter(t) {
20
+ requestAnimationFrame(() => {
21
+ t.dataset.oldOverflow = t.style.overflow, t.dataset.elExistsHeight ? t.style.maxHeight = t.dataset.elExistsHeight : t.scrollHeight !== 0 ? t.style.maxHeight = `${t.scrollHeight}px` : t.style.maxHeight = 0, t.style.paddingTop = t.dataset.oldPaddingTop, t.style.paddingBottom = t.dataset.oldPaddingBottom, t.style.overflow = "hidden";
22
+ });
23
+ },
24
+ afterEnter(t) {
25
+ t.style.maxHeight = "", t.style.overflow = t.dataset.oldOverflow;
26
+ },
27
+ enterCancelled(t) {
28
+ o(t);
29
+ },
30
+ beforeLeave(t) {
31
+ t.dataset || (t.dataset = {}), t.dataset.oldPaddingTop = t.style.paddingTop, t.dataset.oldPaddingBottom = t.style.paddingBottom, t.dataset.oldOverflow = t.style.overflow, t.style.maxHeight = `${t.scrollHeight}px`, t.style.overflow = "hidden";
32
+ },
33
+ leave(t) {
34
+ t.scrollHeight !== 0 && (t.style.maxHeight = 0, t.style.paddingTop = 0, t.style.paddingBottom = 0);
35
+ },
36
+ afterLeave(t) {
37
+ o(t);
38
+ },
39
+ leaveCancelled(t) {
40
+ o(t);
41
+ }
42
+ };
43
+ return (t, h) => (s(), i(n, r({
44
+ name: p(a).b()
45
+ }, l(e)), {
46
+ default: g(() => [
47
+ m(t.$slots, "default")
48
+ ]),
49
+ _: 3
50
+ }, 16, ["name"]));
51
+ }
52
+ });
53
+ export {
54
+ P as default
55
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./collapse-transition.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,14 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ import type { Language } from '@element-plus/locale';
3
+ import type { ComponentSize } from '@element-plus/constants';
4
+ import type { UseEmptyValuesProps } from '@element-plus/hooks';
5
+ export type ConfigProviderContext = {
6
+ namespace?: string;
7
+ locale?: Language;
8
+ size?: ComponentSize;
9
+ zIndex?: number;
10
+ emptyValues?: UseEmptyValuesProps['emptyValues'];
11
+ valueOnClear?: UseEmptyValuesProps['valueOnClear'];
12
+ [key: string]: any;
13
+ };
14
+ export declare const configProviderContextKey: InjectionKey<Ref<ConfigProviderContext>>;
@@ -0,0 +1,32 @@
1
+ import type { App, MaybeRef, Ref } from 'vue';
2
+ import type { ConfigProviderContext } from '../constants';
3
+ export declare function useGlobalConfig<K extends keyof ConfigProviderContext, D extends ConfigProviderContext[K]>(key: K, defaultValue?: D): Ref<Exclude<ConfigProviderContext[K], undefined> | D>;
4
+ export declare function useGlobalConfig(): Ref<ConfigProviderContext>;
5
+ export declare function useGlobalComponentSettings(block: string, sizeFallback?: MaybeRef<ConfigProviderContext['size']>): {
6
+ ns: {
7
+ namespace: import("vue").ComputedRef<string>;
8
+ b: (blockSuffix?: string) => string;
9
+ e: (element?: string) => string;
10
+ m: (modifier?: string) => string;
11
+ be: (blockSuffix?: string, element?: string) => string;
12
+ em: (element?: string, modifier?: string) => string;
13
+ bm: (blockSuffix?: string, modifier?: string) => string;
14
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
15
+ is: {
16
+ (name: string, state: boolean | undefined): string;
17
+ (name: string): string;
18
+ };
19
+ cssVar: (object: Record<string, string>) => Record<string, string>;
20
+ cssVarName: (name: string) => string;
21
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
22
+ cssVarBlockName: (name: string) => string;
23
+ };
24
+ locale: import("@element-plus/hooks").LocaleContext;
25
+ zIndex: {
26
+ initialZIndex: import("vue").ComputedRef<number>;
27
+ currentZIndex: import("vue").ComputedRef<number>;
28
+ nextZIndex: () => number;
29
+ };
30
+ size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
31
+ };
32
+ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContext>, app?: App, global?: boolean) => import("vue").ComputedRef<ConfigProviderContext> | undefined;