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
@@ -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 o } from "../../utils/with-install.js";
3
- import { ElAnchor as r } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/index.js";
4
- const n = Object.assign({}, r, { name: "EpAnchor" }), h = o(n, "ep-anchor");
2
+ import r from "./anchor.js";
3
+ const n = o(r, "ep-anchor");
5
4
  export {
6
- h as EpAnchor
5
+ n as EpAnchor
7
6
  };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * EpAnchorLink —— 从 element-plus 的 anchor-link 源码 vendored 而来(el -> ep 命名),
3
+ * 样式复用仓库内置的 theme-chalk/src/anchor.scss(命名空间为 el)。
4
+ *
5
+ * 通过 inject(anchorKey) 识别父级 EpAnchor,anchorKey 与 EpAnchor 共用
6
+ * element-plus constants.mjs 中的同一 Symbol,父子识别不受组件改名影响。
7
+ */
8
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
9
+ title: StringConstructor;
10
+ href: StringConstructor;
11
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ [key: string]: any;
13
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
+ title: StringConstructor;
15
+ href: StringConstructor;
16
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
17
+ export default _default;
@@ -0,0 +1,51 @@
1
+ import { defineComponent as m, ref as v, inject as C, computed as L, watch as x, nextTick as A, onMounted as b, onBeforeUnmount as E, h as r, renderSlot as a } from "vue";
2
+ import { anchorKey as j } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/constants.js";
3
+ import { anchorLinkProps as w } from "../../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-link.js";
4
+ const K = m({
5
+ name: "EpAnchorLink",
6
+ props: w,
7
+ setup(n, { slots: t }) {
8
+ const c = v(), {
9
+ ns: i,
10
+ direction: h,
11
+ currentAnchor: u,
12
+ addLink: o,
13
+ removeLink: l,
14
+ handleClick: k
15
+ } = C(j), d = L(() => [
16
+ i.e("link"),
17
+ i.is("active", u.value === n.href)
18
+ ]), s = (e) => {
19
+ k(e, n.href);
20
+ };
21
+ return x(
22
+ () => n.href,
23
+ (e, f) => {
24
+ A(() => {
25
+ f && l(f), e && o({ href: e, el: c.value });
26
+ });
27
+ }
28
+ ), b(() => {
29
+ const { href: e } = n;
30
+ e && o({ href: e, el: c.value });
31
+ }), E(() => {
32
+ const { href: e } = n;
33
+ e && l(e);
34
+ }), () => r("div", { class: i.e("item") }, [
35
+ r(
36
+ "a",
37
+ {
38
+ ref: c,
39
+ class: d.value,
40
+ href: n.href,
41
+ onClick: s
42
+ },
43
+ [a(t, "default", {}, () => [n.title])]
44
+ ),
45
+ t["sub-link"] && h === "vertical" ? r("div", { class: i.e("list") }, [a(t, "sub-link")]) : null
46
+ ]);
47
+ }
48
+ });
49
+ export {
50
+ K as default
51
+ };
@@ -1,4 +1,4 @@
1
1
  import type { Plugin } from 'vue';
2
- import { ElAnchorLink } from 'element-plus';
3
- export declare const EpAnchorLink: typeof ElAnchorLink & Plugin;
2
+ import _EpAnchorLink from './anchor-link';
3
+ export declare const EpAnchorLink: typeof _EpAnchorLink & Plugin;
4
4
  export default EpAnchorLink;
@@ -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
- import { withInstall as n } from "../../utils/with-install.js";
3
- import { ElAnchorLink 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/anchor/index.js";
4
- const r = Object.assign({}, o, { name: "EpAnchorLink" }), p = n(r, "ep-anchor-link");
1
+ import { withInstall as o } from "../../utils/with-install.js";
2
+ import n from "./anchor-link.js";
3
+ const p = o(
4
+ n,
5
+ "ep-anchor-link"
6
+ );
5
7
  export {
6
8
  p as EpAnchorLink
7
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<"primary" | "success" | "warning" | "info" | "text" | "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,17 +131,17 @@ 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: "primary" | "success" | "warning" | "info" | "text" | "danger";
135
- readonly dark: boolean;
134
+ readonly type: "" | "default" | "text" | "primary" | "success" | "info" | "warning" | "danger";
135
+ readonly link: boolean;
136
136
  readonly disabled: boolean;
137
- readonly autofocus: boolean;
137
+ readonly circle: boolean;
138
138
  readonly text: boolean;
139
+ readonly dark: boolean;
140
+ readonly autofocus: boolean;
139
141
  readonly loading: boolean;
140
- readonly circle: boolean;
141
- readonly nativeType: "button" | "submit" | "reset";
142
+ readonly nativeType: "button" | "reset" | "submit";
142
143
  readonly loadingIcon: any;
143
144
  readonly plain: boolean;
144
- readonly link: boolean;
145
145
  readonly bg: boolean;
146
146
  readonly round: boolean;
147
147
  readonly dashed: 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
+ };
@@ -25,7 +25,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
25
25
  onChange?: ((value: boolean) => any) | undefined;
26
26
  "onUpdate:checked"?: ((value: boolean) => any) | undefined;
27
27
  }>, {
28
- readonly type: "primary" | "success" | "warning" | "info" | "danger";
28
+ readonly type: "primary" | "success" | "info" | "warning" | "danger";
29
29
  readonly disabled: boolean;
30
30
  readonly checked: boolean;
31
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -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
+ };