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