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,38 @@
1
+ import { defineComponent as i, ref as e, computed as m, provide as d, renderSlot as u } from "vue";
2
+ import { POPPER_INJECTION_KEY as _ } from "./constants.js";
3
+ const I = /* @__PURE__ */ i({
4
+ name: "ElPopper",
5
+ inheritAttrs: !1,
6
+ __name: "popper",
7
+ props: {
8
+ role: { default: "tooltip" }
9
+ },
10
+ setup(t, { expose: r }) {
11
+ const p = t, n = e(), s = e(), c = e(), f = e(), l = m(() => p.role), o = {
12
+ /**
13
+ * @description trigger element
14
+ */
15
+ triggerRef: n,
16
+ /**
17
+ * @description popperjs instance
18
+ */
19
+ popperInstanceRef: s,
20
+ /**
21
+ * @description popper content element
22
+ */
23
+ contentRef: c,
24
+ /**
25
+ * @description popper reference element
26
+ */
27
+ referenceRef: f,
28
+ /**
29
+ * @description role determines how aria attributes are distributed
30
+ */
31
+ role: l
32
+ };
33
+ return r(o), d(_, o), (a, P) => u(a.$slots, "default");
34
+ }
35
+ });
36
+ export {
37
+ I as default
38
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./popper.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,130 @@
1
+ import type { Measurable } from './constants';
2
+ import type Trigger from './trigger.vue';
3
+ export interface PopperTriggerProps {
4
+ /** @description Indicates the reference element to which the popper is attached */
5
+ virtualRef?: Measurable;
6
+ /** @description Indicates whether virtual triggering is enabled */
7
+ virtualTriggering?: boolean;
8
+ onMouseenter?: (e: MouseEvent) => void;
9
+ onMouseleave?: (e: MouseEvent) => void;
10
+ onClick?: (e: PointerEvent) => void;
11
+ onKeydown?: (e: KeyboardEvent) => void;
12
+ onFocus?: (e: FocusEvent) => void;
13
+ onBlur?: (e: FocusEvent) => void;
14
+ onContextmenu?: (e: PointerEvent) => void;
15
+ id?: string;
16
+ open?: boolean;
17
+ }
18
+ /**
19
+ * @deprecated Removed after 3.0.0, Use `PopperTriggerProps` instead.
20
+ */
21
+ export declare const popperTriggerProps: {
22
+ readonly virtualRef: {
23
+ readonly type: import("vue").PropType<Measurable>;
24
+ readonly required: false;
25
+ readonly validator: ((val: unknown) => boolean) | undefined;
26
+ __epPropKey: true;
27
+ };
28
+ readonly virtualTriggering: BooleanConstructor;
29
+ readonly onMouseenter: {
30
+ readonly type: import("vue").PropType<(e: MouseEvent) => void>;
31
+ readonly required: false;
32
+ readonly validator: ((val: unknown) => boolean) | undefined;
33
+ __epPropKey: true;
34
+ };
35
+ readonly onMouseleave: {
36
+ readonly type: import("vue").PropType<(e: MouseEvent) => void>;
37
+ readonly required: false;
38
+ readonly validator: ((val: unknown) => boolean) | undefined;
39
+ __epPropKey: true;
40
+ };
41
+ readonly onClick: {
42
+ readonly type: import("vue").PropType<(e: PointerEvent) => void>;
43
+ readonly required: false;
44
+ readonly validator: ((val: unknown) => boolean) | undefined;
45
+ __epPropKey: true;
46
+ };
47
+ readonly onKeydown: {
48
+ readonly type: import("vue").PropType<(e: KeyboardEvent) => void>;
49
+ readonly required: false;
50
+ readonly validator: ((val: unknown) => boolean) | undefined;
51
+ __epPropKey: true;
52
+ };
53
+ readonly onFocus: {
54
+ readonly type: import("vue").PropType<(e: FocusEvent) => void>;
55
+ readonly required: false;
56
+ readonly validator: ((val: unknown) => boolean) | undefined;
57
+ __epPropKey: true;
58
+ };
59
+ readonly onBlur: {
60
+ readonly type: import("vue").PropType<(e: FocusEvent) => void>;
61
+ readonly required: false;
62
+ readonly validator: ((val: unknown) => boolean) | undefined;
63
+ __epPropKey: true;
64
+ };
65
+ readonly onContextmenu: {
66
+ readonly type: import("vue").PropType<(e: PointerEvent) => void>;
67
+ readonly required: false;
68
+ readonly validator: ((val: unknown) => boolean) | undefined;
69
+ __epPropKey: true;
70
+ };
71
+ readonly id: StringConstructor;
72
+ readonly open: BooleanConstructor;
73
+ };
74
+ export type PopperTriggerInstance = InstanceType<typeof Trigger> & unknown;
75
+ /** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */
76
+ export declare const usePopperTriggerProps: {
77
+ readonly virtualRef: {
78
+ readonly type: import("vue").PropType<Measurable>;
79
+ readonly required: false;
80
+ readonly validator: ((val: unknown) => boolean) | undefined;
81
+ __epPropKey: true;
82
+ };
83
+ readonly virtualTriggering: BooleanConstructor;
84
+ readonly onMouseenter: {
85
+ readonly type: import("vue").PropType<(e: MouseEvent) => void>;
86
+ readonly required: false;
87
+ readonly validator: ((val: unknown) => boolean) | undefined;
88
+ __epPropKey: true;
89
+ };
90
+ readonly onMouseleave: {
91
+ readonly type: import("vue").PropType<(e: MouseEvent) => void>;
92
+ readonly required: false;
93
+ readonly validator: ((val: unknown) => boolean) | undefined;
94
+ __epPropKey: true;
95
+ };
96
+ readonly onClick: {
97
+ readonly type: import("vue").PropType<(e: PointerEvent) => void>;
98
+ readonly required: false;
99
+ readonly validator: ((val: unknown) => boolean) | undefined;
100
+ __epPropKey: true;
101
+ };
102
+ readonly onKeydown: {
103
+ readonly type: import("vue").PropType<(e: KeyboardEvent) => void>;
104
+ readonly required: false;
105
+ readonly validator: ((val: unknown) => boolean) | undefined;
106
+ __epPropKey: true;
107
+ };
108
+ readonly onFocus: {
109
+ readonly type: import("vue").PropType<(e: FocusEvent) => void>;
110
+ readonly required: false;
111
+ readonly validator: ((val: unknown) => boolean) | undefined;
112
+ __epPropKey: true;
113
+ };
114
+ readonly onBlur: {
115
+ readonly type: import("vue").PropType<(e: FocusEvent) => void>;
116
+ readonly required: false;
117
+ readonly validator: ((val: unknown) => boolean) | undefined;
118
+ __epPropKey: true;
119
+ };
120
+ readonly onContextmenu: {
121
+ readonly type: import("vue").PropType<(e: PointerEvent) => void>;
122
+ readonly required: false;
123
+ readonly validator: ((val: unknown) => boolean) | undefined;
124
+ __epPropKey: true;
125
+ };
126
+ readonly id: StringConstructor;
127
+ readonly open: BooleanConstructor;
128
+ };
129
+ /** @deprecated use `PopperTriggerInstance` instead, and it will be deprecated in the next major version */
130
+ export type ElPopperArrowTrigger = PopperTriggerInstance;
@@ -0,0 +1,36 @@
1
+ import { buildProps as n, definePropType as o } from "../../../utils/vue/props/runtime.js";
2
+ import "vue";
3
+ const i = n({
4
+ /** @description Indicates the reference element to which the popper is attached */
5
+ virtualRef: {
6
+ type: o(Object)
7
+ },
8
+ /** @description Indicates whether virtual triggering is enabled */
9
+ virtualTriggering: Boolean,
10
+ onMouseenter: {
11
+ type: o(Function)
12
+ },
13
+ onMouseleave: {
14
+ type: o(Function)
15
+ },
16
+ onClick: {
17
+ type: o(Function)
18
+ },
19
+ onKeydown: {
20
+ type: o(Function)
21
+ },
22
+ onFocus: {
23
+ type: o(Function)
24
+ },
25
+ onBlur: {
26
+ type: o(Function)
27
+ },
28
+ onContextmenu: {
29
+ type: o(Function)
30
+ },
31
+ id: String,
32
+ open: Boolean
33
+ });
34
+ export {
35
+ i as popperTriggerProps
36
+ };
@@ -0,0 +1,18 @@
1
+ import type { PopperTriggerProps } from './trigger';
2
+ declare var __VLS_6: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_6) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<PopperTriggerProps, {
7
+ /**
8
+ * @description trigger element
9
+ */
10
+ triggerRef: import("vue").Ref<import("./constants").Measurable | undefined, import("./constants").Measurable | undefined>;
11
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PopperTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./trigger2.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,134 @@
1
+ import { defineComponent as h, inject as C, computed as d, onMounted as B, watch as l, onBeforeUnmount as x, openBlock as g, createBlock as w, unref as L, mergeProps as R, withCtx as _, renderSlot as M, createCommentVNode as P } from "vue";
2
+ import { unrefElement as k } from "../../../node_modules/.pnpm/@vueuse_core@14.3.0_vue@3.5.40_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js";
3
+ import { OnlyChild as I } from "../../slot/src/only-child.js";
4
+ import { isElement as c } from "../../../utils/types.js";
5
+ import { isFocusable as b } from "../../../utils/dom/aria.js";
6
+ import "../../../hooks/use-size/index.js";
7
+ import "../../../hooks/use-z-index/index.js";
8
+ import "../../../hooks/use-delayed-toggle/index.js";
9
+ import "../../../hooks/use-aria/index.js";
10
+ import "../../../hooks/use-model-toggle/index.js";
11
+ import { useForwardRef as K } from "../../../hooks/use-forward-ref/index.js";
12
+ import "../../../hooks/use-empty-values/index.js";
13
+ import { POPPER_INJECTION_KEY as O } from "./constants.js";
14
+ import T from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNil.js";
15
+ const Z = /* @__PURE__ */ h({
16
+ name: "ElPopperTrigger",
17
+ inheritAttrs: !1,
18
+ __name: "trigger",
19
+ props: {
20
+ virtualRef: {},
21
+ virtualTriggering: { type: Boolean },
22
+ onMouseenter: { type: Function },
23
+ onMouseleave: { type: Function },
24
+ onClick: { type: Function },
25
+ onKeydown: { type: Function },
26
+ onFocus: { type: Function },
27
+ onBlur: { type: Function },
28
+ onContextmenu: { type: Function },
29
+ id: {},
30
+ open: { type: Boolean }
31
+ },
32
+ setup(m, { expose: F }) {
33
+ const n = m, { role: u, triggerRef: i } = C(O, void 0);
34
+ K(i);
35
+ const f = d(() => s.value ? n.id : void 0), v = d(() => {
36
+ if (u && u.value === "tooltip")
37
+ return n.open && n.id ? n.id : void 0;
38
+ }), s = d(() => {
39
+ if (u && u.value !== "tooltip")
40
+ return u.value;
41
+ }), y = d(() => s.value ? `${n.open}` : void 0);
42
+ let t;
43
+ const p = [
44
+ "onMouseenter",
45
+ "onMouseleave",
46
+ "onClick",
47
+ "onKeydown",
48
+ "onFocus",
49
+ "onBlur",
50
+ "onContextmenu"
51
+ ];
52
+ return B(() => {
53
+ l(
54
+ () => n.virtualRef,
55
+ (e) => {
56
+ e && (i.value = k(e));
57
+ },
58
+ {
59
+ immediate: !0
60
+ }
61
+ ), l(
62
+ i,
63
+ (e, r) => {
64
+ t == null || t(), t = void 0, c(r) && p.forEach((o) => {
65
+ const a = n[o];
66
+ a && r.removeEventListener(
67
+ o.slice(2).toLowerCase(),
68
+ a,
69
+ ["onFocus", "onBlur"].includes(o)
70
+ );
71
+ }), c(e) && (p.forEach((o) => {
72
+ const a = n[o];
73
+ a && e.addEventListener(
74
+ o.slice(2).toLowerCase(),
75
+ a,
76
+ ["onFocus", "onBlur"].includes(o)
77
+ );
78
+ }), b(e) && (t = l(
79
+ [f, v, s, y],
80
+ (o) => {
81
+ [
82
+ "aria-controls",
83
+ "aria-describedby",
84
+ "aria-haspopup",
85
+ "aria-expanded"
86
+ ].forEach((a, E) => {
87
+ T(o[E]) ? e.removeAttribute(a) : e.setAttribute(a, o[E]);
88
+ });
89
+ },
90
+ { immediate: !0 }
91
+ ))), c(r) && b(r) && [
92
+ "aria-controls",
93
+ "aria-describedby",
94
+ "aria-haspopup",
95
+ "aria-expanded"
96
+ ].forEach((o) => r.removeAttribute(o));
97
+ },
98
+ {
99
+ immediate: !0
100
+ }
101
+ );
102
+ }), x(() => {
103
+ if (t == null || t(), t = void 0, i.value && c(i.value)) {
104
+ const e = i.value;
105
+ p.forEach((r) => {
106
+ const o = n[r];
107
+ o && e.removeEventListener(
108
+ r.slice(2).toLowerCase(),
109
+ o,
110
+ ["onFocus", "onBlur"].includes(r)
111
+ );
112
+ }), i.value = void 0;
113
+ }
114
+ }), F({
115
+ /**
116
+ * @description trigger element
117
+ */
118
+ triggerRef: i
119
+ }), (e, r) => m.virtualTriggering ? P("", !0) : (g(), w(L(I), R({ key: 0 }, e.$attrs, {
120
+ "aria-controls": f.value,
121
+ "aria-describedby": v.value,
122
+ "aria-expanded": y.value,
123
+ "aria-haspopup": s.value
124
+ }), {
125
+ default: _(() => [
126
+ M(e.$slots, "default")
127
+ ]),
128
+ _: 3
129
+ }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
130
+ }
131
+ });
132
+ export {
133
+ Z as default
134
+ };
@@ -0,0 +1,48 @@
1
+ import type { ComponentPublicInstance, MaybeRef } from 'vue';
2
+ import type { Modifier } from '@popperjs/core';
3
+ import type { Measurable } from './constants';
4
+ import type { PopperCoreConfigProps } from './content';
5
+ export declare const buildPopperOptions: (props: PopperCoreConfigProps, modifiers?: Modifier<any, any>[]) => {
6
+ modifiers: (Modifier<any, any> | {
7
+ name: string;
8
+ options: {
9
+ offset: number[];
10
+ padding?: undefined;
11
+ fallbackPlacements?: undefined;
12
+ gpuAcceleration?: undefined;
13
+ };
14
+ } | {
15
+ name: string;
16
+ options: {
17
+ padding: {
18
+ top: number;
19
+ bottom: number;
20
+ left: number;
21
+ right: number;
22
+ };
23
+ offset?: undefined;
24
+ fallbackPlacements?: undefined;
25
+ gpuAcceleration?: undefined;
26
+ };
27
+ } | {
28
+ name: string;
29
+ options: {
30
+ padding: number;
31
+ fallbackPlacements: import("element-plus").Placement[] | undefined;
32
+ offset?: undefined;
33
+ gpuAcceleration?: undefined;
34
+ };
35
+ } | {
36
+ name: string;
37
+ options: {
38
+ gpuAcceleration: boolean | undefined;
39
+ offset?: undefined;
40
+ padding?: undefined;
41
+ fallbackPlacements?: undefined;
42
+ };
43
+ })[];
44
+ placement: import("element-plus").Placement | undefined;
45
+ strategy: import("@popperjs/core").PositioningStrategy | undefined;
46
+ onFirstUpdate?: (arg0: Partial<import("@popperjs/core").State>) => void;
47
+ };
48
+ export declare const unwrapMeasurableEl: ($el: MaybeRef<Measurable | undefined | ComponentPublicInstance>) => HTMLElement | undefined;
@@ -0,0 +1,57 @@
1
+ import { unrefElement as f } from "../../../node_modules/.pnpm/@vueuse_core@14.3.0_vue@3.5.40_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js";
2
+ import "vue";
3
+ import { isClient as s } from "../../../node_modules/.pnpm/@vueuse_shared@14.3.0_vue@3.5.40_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js";
4
+ const u = (e, t = []) => {
5
+ const { placement: n, strategy: i, popperOptions: o } = e, r = {
6
+ placement: n,
7
+ strategy: i,
8
+ ...o,
9
+ modifiers: [...m(e), ...t]
10
+ };
11
+ return a(r, o == null ? void 0 : o.modifiers), r;
12
+ }, d = (e) => {
13
+ if (s)
14
+ return f(e);
15
+ };
16
+ function m(e) {
17
+ const { offset: t, gpuAcceleration: n, fallbackPlacements: i } = e;
18
+ return [
19
+ {
20
+ name: "offset",
21
+ options: {
22
+ offset: [0, t ?? 12]
23
+ }
24
+ },
25
+ {
26
+ name: "preventOverflow",
27
+ options: {
28
+ padding: {
29
+ top: 0,
30
+ bottom: 0,
31
+ left: 0,
32
+ right: 0
33
+ }
34
+ }
35
+ },
36
+ {
37
+ name: "flip",
38
+ options: {
39
+ padding: 5,
40
+ fallbackPlacements: i
41
+ }
42
+ },
43
+ {
44
+ name: "computeStyles",
45
+ options: {
46
+ gpuAcceleration: n
47
+ }
48
+ }
49
+ ];
50
+ }
51
+ function a(e, t) {
52
+ t && (e.modifiers = [...e.modifiers, ...t ?? []]);
53
+ }
54
+ export {
55
+ u as buildPopperOptions,
56
+ d as unwrapMeasurableEl
57
+ };
@@ -0,0 +1,3 @@
1
+ import { OnlyChild } from "./src/only-child";
2
+ export { OnlyChild as ElOnlyChild, OnlyChild };
3
+ export * from './src/only-child';
@@ -0,0 +1,7 @@
1
+ import type { Ref, VNode } from 'vue';
2
+ export declare const OnlyChild: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
3
+ [key: string]: any;
4
+ }> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
5
+ export type OnlyChildExpose = {
6
+ forwardRef: Ref<HTMLElement>;
7
+ };
@@ -0,0 +1,55 @@
1
+ import { defineComponent as p, inject as h, withDirectives as g, cloneVNode as C, Comment as u, Fragment as N, Text as O } from "vue";
2
+ import { NOOP as v, isObject as y } from "../../../node_modules/.pnpm/@vue_shared@3.5.40/node_modules/@vue/shared/dist/shared.esm-bundler.js";
3
+ import { debugWarn as f } from "../../../utils/error.js";
4
+ import { useNamespace as E } from "../../../hooks/use-namespace/index.js";
5
+ import "../../../hooks/use-size/index.js";
6
+ import "../../../hooks/use-z-index/index.js";
7
+ import "../../../hooks/use-delayed-toggle/index.js";
8
+ import "../../../hooks/use-aria/index.js";
9
+ import "../../../hooks/use-model-toggle/index.js";
10
+ import { FORWARD_REF_INJECTION_KEY as F, useForwardRefDirective as R } from "../../../hooks/use-forward-ref/index.js";
11
+ import "../../../hooks/use-empty-values/index.js";
12
+ const i = "ElOnlyChild", I = p({
13
+ name: i,
14
+ setup(r, { slots: t, attrs: n }) {
15
+ const e = h(F), a = R(
16
+ (e == null ? void 0 : e.setForwardRef) ?? v
17
+ );
18
+ return () => {
19
+ var l;
20
+ const o = (l = t.default) == null ? void 0 : l.call(t, n);
21
+ if (!o) return null;
22
+ const [c, s] = d(o);
23
+ return c ? (s > 1 && f(i, "requires exact only one valid child."), g(C(c, n), [
24
+ [a]
25
+ ])) : (f(i, "no valid child node found"), null);
26
+ };
27
+ }
28
+ });
29
+ function d(r) {
30
+ if (!r) return [null, 0];
31
+ const t = r, n = t.filter((e) => e.type !== u).length;
32
+ for (const e of t) {
33
+ if (y(e))
34
+ switch (e.type) {
35
+ case u:
36
+ continue;
37
+ case O:
38
+ case "svg":
39
+ return [m(e), n];
40
+ case N:
41
+ return d(e.children);
42
+ default:
43
+ return [e, n];
44
+ }
45
+ return [m(e), n];
46
+ }
47
+ return [null, 0];
48
+ }
49
+ function m(r) {
50
+ const t = E("only-child");
51
+ return /* @__PURE__ */ React.createElement("span", { class: t.e("content") }, r);
52
+ }
53
+ export {
54
+ I as OnlyChild
55
+ };
@@ -102,8 +102,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
102
102
  readonly type: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "card" | "border-card", unknown>;
103
103
  readonly closable: boolean;
104
104
  readonly tabindex: import("element-plus/es/utils/index.mjs").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
105
- readonly editable: boolean;
106
105
  readonly stretch: boolean;
106
+ readonly editable: boolean;
107
107
  readonly addable: boolean;
108
108
  readonly tabPosition: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "top" | "bottom" | "left" | "right", unknown>;
109
109
  readonly beforeLeave: (newName: TabPaneName, oldName: TabPaneName) => import("element-plus/es/utils/typescript.mjs").Awaitable<void | boolean>;
@@ -0,0 +1,96 @@
1
+ import { defineComponent as F, computed as K, openBlock as a, createElementBlock as u, normalizeStyle as C, normalizeClass as l, createElementVNode as m, renderSlot as h, withModifiers as y, unref as t, createVNode as c, withCtx as p, createCommentVNode as $, createBlock as L, Transition as P } from "vue";
2
+ import { Close 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";
3
+ import { ElIcon 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/icon/index.js";
4
+ import { useLocale as q } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-locale/index.js";
5
+ import { useFormSize as A } 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";
6
+ import { tagEmits as D, tagProps as G } from "./tag.js";
7
+ const H = {
8
+ class: /* @__PURE__ */ l("el-tag__content")
9
+ }, J = ["aria-label"], O = {
10
+ class: /* @__PURE__ */ l("el-tag__content")
11
+ }, Q = ["aria-label"], T = "el", z = "tag", v = /* @__PURE__ */ F({
12
+ name: "EpTag",
13
+ __name: "EpTag",
14
+ props: G,
15
+ emits: D,
16
+ setup(V, { emit: N }) {
17
+ const d = j, S = V, b = N, { t: f } = q(), B = A(), M = () => `${T}-${z}`, r = (e) => e ? `${T}-${z}--${e}` : "", i = (e, o = !0) => e && o ? `is-${e}` : "", _ = K(() => {
18
+ const { type: e, hit: o, effect: s, closable: n, round: I } = S;
19
+ return [
20
+ M(),
21
+ i("closable", n),
22
+ r(e || "primary"),
23
+ r(B.value),
24
+ r(s),
25
+ i("hit", o),
26
+ i("round", I)
27
+ ];
28
+ }), k = (e) => {
29
+ b("close", e);
30
+ }, g = (e) => {
31
+ b("click", e);
32
+ }, w = (e) => {
33
+ var o, s, n;
34
+ (n = (s = (o = e == null ? void 0 : e.component) == null ? void 0 : o.subTree) == null ? void 0 : s.component) != null && n.bum && (e.component.subTree.component.bum = null);
35
+ };
36
+ return (e, o) => e.disableTransitions ? (a(), u("span", {
37
+ key: 0,
38
+ class: l(_.value),
39
+ style: C({ backgroundColor: e.color }),
40
+ onClick: g
41
+ }, [
42
+ m("span", H, [
43
+ h(e.$slots, "default")
44
+ ]),
45
+ e.closable ? (a(), u("button", {
46
+ key: 0,
47
+ "aria-label": t(f)("el.tag.close"),
48
+ class: l("el-tag__close"),
49
+ type: "button",
50
+ onClick: y(k, ["stop"])
51
+ }, [
52
+ c(t(d), null, {
53
+ default: p(() => [
54
+ c(t(E))
55
+ ]),
56
+ _: 1
57
+ })
58
+ ], 8, J)) : $("", !0)
59
+ ], 6)) : (a(), L(P, {
60
+ key: 1,
61
+ name: "el-zoom-in-center",
62
+ appear: "",
63
+ onVnodeMounted: w
64
+ }, {
65
+ default: p(() => [
66
+ m("span", {
67
+ class: l(_.value),
68
+ style: C({ backgroundColor: e.color }),
69
+ onClick: g
70
+ }, [
71
+ m("span", O, [
72
+ h(e.$slots, "default")
73
+ ]),
74
+ e.closable ? (a(), u("button", {
75
+ key: 0,
76
+ "aria-label": t(f)("el.tag.close"),
77
+ class: l("el-tag__close"),
78
+ type: "button",
79
+ onClick: y(k, ["stop"])
80
+ }, [
81
+ c(t(d), null, {
82
+ default: p(() => [
83
+ c(t(E))
84
+ ]),
85
+ _: 1
86
+ })
87
+ ], 8, Q)) : $("", !0)
88
+ ], 6)
89
+ ]),
90
+ _: 3
91
+ }, 512));
92
+ }
93
+ });
94
+ export {
95
+ v as default
96
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./EpTag.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,4 +1,4 @@
1
1
  import type { Plugin } from 'vue';
2
- import { ElTag } from 'element-plus';
3
- export declare const EpTag: typeof ElTag & Plugin;
2
+ import _EpTag from './EpTag.vue';
3
+ export declare const EpTag: typeof _EpTag & Plugin;
4
4
  export default EpTag;
@@ -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 { ElTag as a } from "../../node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/tag/index.js";
4
- const o = Object.assign({}, a, { name: "EpTag" }), r = t(o, "ep-tag");
2
+ import o from "./EpTag.vue.js";
3
+ const r = t(o, "ep-tag");
5
4
  export {
6
5
  r as EpTag
7
6
  };