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.
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/components/button/EpButton.vue.d.ts +6 -6
- 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.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 +2 -2
- 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/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/tabs/tabs.d.ts +1 -1
- 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/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,36 @@
|
|
|
1
|
+
import { defineComponent as c, computed as m, openBlock as p, createElementBlock as l, mergeProps as a, unref as f, renderSlot as u } from "vue";
|
|
2
|
+
import { addUnit as d } from "../../../utils/dom/style.js";
|
|
3
|
+
import { useNamespace as _ } from "../../../hooks/use-namespace/index.js";
|
|
4
|
+
import "../../../hooks/use-size/index.js";
|
|
5
|
+
import "../../../hooks/use-z-index/index.js";
|
|
6
|
+
import "../../../hooks/use-delayed-toggle/index.js";
|
|
7
|
+
import "../../../hooks/use-aria/index.js";
|
|
8
|
+
import "../../../hooks/use-model-toggle/index.js";
|
|
9
|
+
import "../../../hooks/use-empty-values/index.js";
|
|
10
|
+
const g = /* @__PURE__ */ c({
|
|
11
|
+
name: "ElIcon",
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
__name: "icon",
|
|
14
|
+
props: {
|
|
15
|
+
size: {},
|
|
16
|
+
color: {}
|
|
17
|
+
},
|
|
18
|
+
setup(r) {
|
|
19
|
+
const n = r, s = _("icon"), i = m(() => {
|
|
20
|
+
const { size: o, color: t } = n, e = d(o);
|
|
21
|
+
return !e && !t ? {} : {
|
|
22
|
+
fontSize: e,
|
|
23
|
+
"--color": t
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
return (o, t) => (p(), l("i", a({
|
|
27
|
+
class: f(s).b(),
|
|
28
|
+
style: i.value
|
|
29
|
+
}, o.$attrs), [
|
|
30
|
+
u(o.$slots, "default")
|
|
31
|
+
], 16));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
g as default
|
|
36
|
+
};
|
|
@@ -102,14 +102,14 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
102
102
|
}>, {
|
|
103
103
|
readonly mode: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
|
|
104
104
|
readonly persistent: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
105
|
+
readonly collapse: boolean;
|
|
106
|
+
readonly ellipsis: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
105
107
|
readonly showTimeout: number;
|
|
106
108
|
readonly hideTimeout: number;
|
|
107
|
-
readonly collapse: boolean;
|
|
108
109
|
readonly defaultActive: string;
|
|
109
110
|
readonly defaultOpeneds: string[];
|
|
110
111
|
readonly menuTrigger: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "click" | "hover", unknown>;
|
|
111
112
|
readonly collapseTransition: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
112
|
-
readonly ellipsis: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
113
113
|
readonly popperOffset: number;
|
|
114
114
|
readonly ellipsisIcon: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
|
|
115
115
|
readonly popperEffect: import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => "dark" | "light") | (() => "dark" | "light") | (((new (...args: any[]) => "dark" | "light") | (() => "dark" | "light")) | null)[], unknown, unknown>;
|
|
@@ -1,4 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import Popper from './src/popper.vue';
|
|
2
|
+
import ElPopperArrow from './src/arrow.vue';
|
|
3
|
+
import ElPopperTrigger from './src/trigger.vue';
|
|
4
|
+
import ElPopperContent from './src/content.vue';
|
|
5
|
+
import type { SFCWithInstall } from '@element-plus/utils';
|
|
6
|
+
export { ElPopperArrow, ElPopperTrigger, ElPopperContent };
|
|
7
|
+
export declare const ElPopper: SFCWithInstall<typeof Popper>;
|
|
8
|
+
export declare const EpPopper: {
|
|
9
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import(".").PopperProps> & Readonly<{}>, {
|
|
10
|
+
triggerRef: import("vue").Ref<import(".").Measurable | undefined>;
|
|
11
|
+
contentRef: import("vue").Ref<HTMLElement | undefined>;
|
|
12
|
+
popperInstanceRef: import("vue").Ref<import("@popperjs/core").Instance | undefined>;
|
|
13
|
+
referenceRef: import("vue").Ref<import(".").Measurable | undefined>;
|
|
14
|
+
role: import("vue").ComputedRef<string>;
|
|
15
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
16
|
+
role: typeof import(".").roleTypes[number];
|
|
17
|
+
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
18
|
+
P: {};
|
|
19
|
+
B: {};
|
|
20
|
+
D: {};
|
|
21
|
+
C: {};
|
|
22
|
+
M: {};
|
|
23
|
+
Defaults: {};
|
|
24
|
+
}, Readonly<import(".").PopperProps> & Readonly<{}>, {
|
|
25
|
+
triggerRef: import("vue").Ref<import(".").Measurable | undefined>;
|
|
26
|
+
contentRef: import("vue").Ref<HTMLElement | undefined>;
|
|
27
|
+
popperInstanceRef: import("vue").Ref<import("@popperjs/core").Instance | undefined>;
|
|
28
|
+
referenceRef: import("vue").Ref<import(".").Measurable | undefined>;
|
|
29
|
+
role: import("vue").ComputedRef<string>;
|
|
30
|
+
}, {}, {}, {}, {
|
|
31
|
+
role: typeof import(".").roleTypes[number];
|
|
32
|
+
}>;
|
|
33
|
+
__isFragment?: never;
|
|
34
|
+
__isTeleport?: never;
|
|
35
|
+
__isSuspense?: never;
|
|
36
|
+
} & import("vue").ComponentOptionsBase<Readonly<import(".").PopperProps> & Readonly<{}>, {
|
|
37
|
+
triggerRef: import("vue").Ref<import(".").Measurable | undefined>;
|
|
38
|
+
contentRef: import("vue").Ref<HTMLElement | undefined>;
|
|
39
|
+
popperInstanceRef: import("vue").Ref<import("@popperjs/core").Instance | undefined>;
|
|
40
|
+
referenceRef: import("vue").Ref<import(".").Measurable | undefined>;
|
|
41
|
+
role: import("vue").ComputedRef<string>;
|
|
42
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
43
|
+
role: typeof import(".").roleTypes[number];
|
|
44
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
45
|
+
$slots: {
|
|
46
|
+
default?: (props: {}) => any;
|
|
47
|
+
};
|
|
48
|
+
}) & import("vue").Plugin;
|
|
4
49
|
export default EpPopper;
|
|
50
|
+
export * from './src/popper';
|
|
51
|
+
export * from './src/trigger';
|
|
52
|
+
export * from './src/content';
|
|
53
|
+
export * from './src/arrow';
|
|
54
|
+
export * from './src/constants';
|
|
55
|
+
export type { Placement, Options } from '@popperjs/core';
|
|
@@ -1,7 +1,32 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { withInstall as o } from "../../utils/with-install.js";
|
|
2
|
+
import "vue";
|
|
3
|
+
import { withInstall as r } from "../../utils/vue/install.js";
|
|
4
|
+
import p from "./src/popper.vue.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 "../../hooks/use-empty-values/index.js";
|
|
11
|
+
import "../slot/src/only-child.js";
|
|
12
|
+
import "../focus-trap/index.js";
|
|
13
|
+
import "../form/index.js";
|
|
14
|
+
import { popperContentEmits as D, popperContentProps as E, popperContentPropsDefaults as I, popperCoreConfigProps as A, popperCoreConfigPropsDefaults as T } from "./src/content.js";
|
|
15
|
+
import { popperProps as y, roleTypes as $ } from "./src/popper.js";
|
|
16
|
+
import { popperTriggerProps as d } from "./src/trigger.js";
|
|
17
|
+
import { popperArrowProps as k, popperArrowPropsDefaults as q } from "./src/arrow.js";
|
|
18
|
+
const g = r(p), c = o(p, "ep-popper");
|
|
5
19
|
export {
|
|
6
|
-
|
|
20
|
+
g as ElPopper,
|
|
21
|
+
c as EpPopper,
|
|
22
|
+
k as popperArrowProps,
|
|
23
|
+
q as popperArrowPropsDefaults,
|
|
24
|
+
D as popperContentEmits,
|
|
25
|
+
E as popperContentProps,
|
|
26
|
+
I as popperContentPropsDefaults,
|
|
27
|
+
A as popperCoreConfigProps,
|
|
28
|
+
T as popperCoreConfigPropsDefaults,
|
|
29
|
+
y as popperProps,
|
|
30
|
+
d as popperTriggerProps,
|
|
31
|
+
$ as roleTypes
|
|
7
32
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
import type Arrow from './arrow.vue';
|
|
3
|
+
export interface PopperArrowProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description arrow offset
|
|
6
|
+
*/
|
|
7
|
+
arrowOffset?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Removed after 3.0.0, Use `PopperArrowProps` instead.
|
|
11
|
+
*/
|
|
12
|
+
export declare const popperArrowProps: {
|
|
13
|
+
readonly arrowOffset: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 5, boolean>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Removed after 3.0.0, Use `PopperArrowProps` instead.
|
|
17
|
+
*/
|
|
18
|
+
export type PopperArrowPropsPublic = ExtractPublicPropTypes<typeof popperArrowProps>;
|
|
19
|
+
export declare const popperArrowPropsDefaults: {
|
|
20
|
+
readonly arrowOffset: 5;
|
|
21
|
+
};
|
|
22
|
+
export type PopperArrowInstance = InstanceType<typeof Arrow> & unknown;
|
|
23
|
+
/** @deprecated use `popperArrowProps` instead, and it will be deprecated in the next major version */
|
|
24
|
+
export declare const usePopperArrowProps: {
|
|
25
|
+
readonly arrowOffset: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 5, boolean>;
|
|
26
|
+
};
|
|
27
|
+
/** @deprecated use `PopperArrowProps` instead, and it will be deprecated in the next major version */
|
|
28
|
+
export type UsePopperArrowProps = PopperArrowProps;
|
|
29
|
+
/** @deprecated use `PopperArrowInstance` instead, and it will be deprecated in the next major version */
|
|
30
|
+
export type ElPopperArrowInstance = PopperArrowInstance;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { buildProps as r } from "../../../utils/vue/props/runtime.js";
|
|
2
|
+
import "vue";
|
|
3
|
+
const t = r({
|
|
4
|
+
arrowOffset: {
|
|
5
|
+
type: Number,
|
|
6
|
+
default: 5
|
|
7
|
+
}
|
|
8
|
+
}), e = {
|
|
9
|
+
arrowOffset: 5
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
t as popperArrowProps,
|
|
13
|
+
e as popperArrowPropsDefaults
|
|
14
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
/**
|
|
3
|
+
* @description Arrow element
|
|
4
|
+
*/
|
|
5
|
+
arrowRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
6
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent as a, inject as n, onBeforeUnmount as m, openBlock as s, createElementBlock as i, normalizeStyle as l, unref as e, normalizeClass as c } from "vue";
|
|
2
|
+
import { useNamespace as f } from "../../../hooks/use-namespace/index.js";
|
|
3
|
+
import "../../../hooks/use-size/index.js";
|
|
4
|
+
import "../../../hooks/use-z-index/index.js";
|
|
5
|
+
import "../../../hooks/use-delayed-toggle/index.js";
|
|
6
|
+
import "../../../hooks/use-aria/index.js";
|
|
7
|
+
import "../../../hooks/use-model-toggle/index.js";
|
|
8
|
+
import "../../../hooks/use-empty-values/index.js";
|
|
9
|
+
import { POPPER_CONTENT_INJECTION_KEY as _ } from "./constants.js";
|
|
10
|
+
const O = /* @__PURE__ */ a({
|
|
11
|
+
name: "ElPopperArrow",
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
__name: "arrow",
|
|
14
|
+
setup(u, { expose: o }) {
|
|
15
|
+
const t = f("popper"), { arrowRef: r, arrowStyle: p } = n(
|
|
16
|
+
_,
|
|
17
|
+
void 0
|
|
18
|
+
);
|
|
19
|
+
return m(() => {
|
|
20
|
+
r.value = void 0;
|
|
21
|
+
}), o({
|
|
22
|
+
/**
|
|
23
|
+
* @description Arrow element
|
|
24
|
+
*/
|
|
25
|
+
arrowRef: r
|
|
26
|
+
}), (w, E) => (s(), i("span", {
|
|
27
|
+
ref_key: "arrowRef",
|
|
28
|
+
ref: r,
|
|
29
|
+
class: c(e(t).e("arrow")),
|
|
30
|
+
style: l(e(p)),
|
|
31
|
+
"data-popper-arrow": ""
|
|
32
|
+
}, null, 6));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
O as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { CSSProperties, StyleValue } from 'vue';
|
|
2
|
+
import type { UsePopperReturn } from '@element-plus/hooks';
|
|
3
|
+
import type { UsePopperContentReturn } from './use-content';
|
|
4
|
+
import type { PopperContentProps } from '../content';
|
|
5
|
+
export declare const usePopperContentDOM: (props: PopperContentProps, { attributes, styles, role, }: Pick<UsePopperReturn, "attributes" | "styles"> & Pick<UsePopperContentReturn, "role">) => {
|
|
6
|
+
ariaModal: import("vue").ComputedRef<string | undefined>;
|
|
7
|
+
arrowStyle: import("vue").ComputedRef<CSSProperties>;
|
|
8
|
+
contentAttrs: import("vue").ComputedRef<{
|
|
9
|
+
[key: string]: string | boolean;
|
|
10
|
+
}>;
|
|
11
|
+
contentClass: import("vue").ComputedRef<((string | {
|
|
12
|
+
[x: string]: boolean;
|
|
13
|
+
} | (string | {
|
|
14
|
+
[x: string]: boolean;
|
|
15
|
+
} | (string | {
|
|
16
|
+
[x: string]: boolean;
|
|
17
|
+
} | (string | {
|
|
18
|
+
[x: string]: boolean;
|
|
19
|
+
} | (string | {
|
|
20
|
+
[x: string]: boolean;
|
|
21
|
+
} | (string | {
|
|
22
|
+
[x: string]: boolean;
|
|
23
|
+
} | (string | {
|
|
24
|
+
[x: string]: boolean;
|
|
25
|
+
} | (string | {
|
|
26
|
+
[x: string]: boolean;
|
|
27
|
+
} | (string | {
|
|
28
|
+
[x: string]: boolean;
|
|
29
|
+
} | (string | {
|
|
30
|
+
[x: string]: boolean;
|
|
31
|
+
} | (string | {
|
|
32
|
+
[x: string]: boolean;
|
|
33
|
+
} | (string | {
|
|
34
|
+
[x: string]: boolean;
|
|
35
|
+
} | /*elided*/ any)[])[])[])[])[])[])[])[])[])[])[]) | undefined)[]>;
|
|
36
|
+
contentStyle: import("vue").ComputedRef<StyleValue[]>;
|
|
37
|
+
contentZIndex: import("vue").Ref<number, number>;
|
|
38
|
+
updateZIndex: () => void;
|
|
39
|
+
};
|
|
40
|
+
export type UsePopperContentDOMReturn = ReturnType<typeof usePopperContentDOM>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { computed as t, unref as n, ref as f } from "vue";
|
|
2
|
+
import { useNamespace as l } from "../../../../hooks/use-namespace/index.js";
|
|
3
|
+
import { isNumber as d } from "../../../../utils/types.js";
|
|
4
|
+
import "../../../../hooks/use-size/index.js";
|
|
5
|
+
import { useZIndex as z } from "../../../../hooks/use-z-index/index.js";
|
|
6
|
+
import "../../../../hooks/use-delayed-toggle/index.js";
|
|
7
|
+
import "../../../../hooks/use-aria/index.js";
|
|
8
|
+
import "../../../../hooks/use-model-toggle/index.js";
|
|
9
|
+
import "../../../../hooks/use-empty-values/index.js";
|
|
10
|
+
const A = (e, {
|
|
11
|
+
attributes: m,
|
|
12
|
+
styles: p,
|
|
13
|
+
role: a
|
|
14
|
+
}) => {
|
|
15
|
+
const { nextZIndex: c } = z(), o = l("popper"), i = t(() => n(m).popper), r = f(
|
|
16
|
+
d(e.zIndex) ? e.zIndex : c()
|
|
17
|
+
), s = t(() => [
|
|
18
|
+
o.b(),
|
|
19
|
+
o.is("pure", e.pure),
|
|
20
|
+
o.is(e.effect),
|
|
21
|
+
e.popperClass
|
|
22
|
+
]), u = t(() => [
|
|
23
|
+
{ zIndex: n(r) },
|
|
24
|
+
n(p).popper,
|
|
25
|
+
e.popperStyle || {}
|
|
26
|
+
]), x = t(
|
|
27
|
+
() => a.value === "dialog" ? "false" : void 0
|
|
28
|
+
), I = t(
|
|
29
|
+
() => n(p).arrow || {}
|
|
30
|
+
);
|
|
31
|
+
return {
|
|
32
|
+
ariaModal: x,
|
|
33
|
+
arrowStyle: I,
|
|
34
|
+
contentAttrs: i,
|
|
35
|
+
contentClass: s,
|
|
36
|
+
contentStyle: u,
|
|
37
|
+
contentZIndex: r,
|
|
38
|
+
updateZIndex: () => {
|
|
39
|
+
r.value = d(e.zIndex) ? e.zIndex : c();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
A as usePopperContentDOM
|
|
45
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Modifier } from '@popperjs/core';
|
|
2
|
+
import type { PopperContentProps } from '../content';
|
|
3
|
+
export declare const usePopperContent: (props: PopperContentProps) => {
|
|
4
|
+
attributes: import("vue").ComputedRef<{
|
|
5
|
+
[key: string]: {
|
|
6
|
+
[key: string]: string | boolean;
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
9
|
+
arrowRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
10
|
+
contentRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
11
|
+
instanceRef: import("vue").ComputedRef<import("@popperjs/core").Instance | undefined>;
|
|
12
|
+
state: import("vue").ComputedRef<{
|
|
13
|
+
elements?: {
|
|
14
|
+
reference: Element | import("@popperjs/core").VirtualElement;
|
|
15
|
+
popper: HTMLElement;
|
|
16
|
+
arrow?: HTMLElement;
|
|
17
|
+
} | undefined;
|
|
18
|
+
options?: import("@popperjs/core").OptionsGeneric<any> | undefined;
|
|
19
|
+
placement?: import("element-plus").Placement | undefined;
|
|
20
|
+
strategy?: import("@popperjs/core").PositioningStrategy | undefined;
|
|
21
|
+
orderedModifiers?: Modifier<any, any>[] | undefined;
|
|
22
|
+
rects?: import("@popperjs/core").StateRects | undefined;
|
|
23
|
+
scrollParents?: {
|
|
24
|
+
reference: Array<Element | import("@popperjs/core").Window | import("@popperjs/core").VisualViewport>;
|
|
25
|
+
popper: Array<Element | import("@popperjs/core").Window | import("@popperjs/core").VisualViewport>;
|
|
26
|
+
} | undefined;
|
|
27
|
+
styles?: {
|
|
28
|
+
[key: string]: Partial<CSSStyleDeclaration>;
|
|
29
|
+
} | undefined;
|
|
30
|
+
attributes?: {
|
|
31
|
+
[key: string]: {
|
|
32
|
+
[key: string]: string | boolean;
|
|
33
|
+
};
|
|
34
|
+
} | undefined;
|
|
35
|
+
modifiersData?: {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
arrow?: {
|
|
38
|
+
x?: number;
|
|
39
|
+
y?: number;
|
|
40
|
+
centerOffset: number;
|
|
41
|
+
};
|
|
42
|
+
hide?: {
|
|
43
|
+
isReferenceHidden: boolean;
|
|
44
|
+
hasPopperEscaped: boolean;
|
|
45
|
+
referenceClippingOffsets: import("@popperjs/core").SideObject;
|
|
46
|
+
popperEscapeOffsets: import("@popperjs/core").SideObject;
|
|
47
|
+
};
|
|
48
|
+
offset?: {
|
|
49
|
+
top?: import("@popperjs/core").Offsets | undefined;
|
|
50
|
+
bottom?: import("@popperjs/core").Offsets | undefined;
|
|
51
|
+
left?: import("@popperjs/core").Offsets | undefined;
|
|
52
|
+
"top-start"?: import("@popperjs/core").Offsets | undefined;
|
|
53
|
+
"top-end"?: import("@popperjs/core").Offsets | undefined;
|
|
54
|
+
"bottom-start"?: import("@popperjs/core").Offsets | undefined;
|
|
55
|
+
"bottom-end"?: import("@popperjs/core").Offsets | undefined;
|
|
56
|
+
right?: import("@popperjs/core").Offsets | undefined;
|
|
57
|
+
auto?: import("@popperjs/core").Offsets | undefined;
|
|
58
|
+
"auto-start"?: import("@popperjs/core").Offsets | undefined;
|
|
59
|
+
"auto-end"?: import("@popperjs/core").Offsets | undefined;
|
|
60
|
+
"right-start"?: import("@popperjs/core").Offsets | undefined;
|
|
61
|
+
"right-end"?: import("@popperjs/core").Offsets | undefined;
|
|
62
|
+
"left-start"?: import("@popperjs/core").Offsets | undefined;
|
|
63
|
+
"left-end"?: import("@popperjs/core").Offsets | undefined;
|
|
64
|
+
};
|
|
65
|
+
preventOverflow?: import("@popperjs/core").Offsets;
|
|
66
|
+
popperOffsets?: import("@popperjs/core").Offsets;
|
|
67
|
+
} | undefined;
|
|
68
|
+
reset?: boolean | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
styles: import("vue").ComputedRef<{
|
|
71
|
+
[key: string]: Partial<CSSStyleDeclaration>;
|
|
72
|
+
}>;
|
|
73
|
+
role: import("vue").ComputedRef<string>;
|
|
74
|
+
forceUpdate: () => void | undefined;
|
|
75
|
+
update: () => Promise<Partial<import("@popperjs/core").State>> | undefined;
|
|
76
|
+
};
|
|
77
|
+
export type UsePopperContentReturn = ReturnType<typeof usePopperContent>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { inject as U, ref as F, computed as r, unref as o, watch as a, onMounted as M, onBeforeUnmount as _ } from "vue";
|
|
2
|
+
import { useResizeObserver as C } 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 "../../../../hooks/use-size/index.js";
|
|
4
|
+
import { usePopper as I } from "../../../../hooks/use-popper/index.js";
|
|
5
|
+
import "../../../../hooks/use-z-index/index.js";
|
|
6
|
+
import "../../../../hooks/use-delayed-toggle/index.js";
|
|
7
|
+
import "../../../../hooks/use-aria/index.js";
|
|
8
|
+
import "../../../../hooks/use-model-toggle/index.js";
|
|
9
|
+
import "../../../../hooks/use-empty-values/index.js";
|
|
10
|
+
import { POPPER_INJECTION_KEY as L } from "../constants.js";
|
|
11
|
+
import { buildPopperOptions as T, unwrapMeasurableEl as h } from "../utils.js";
|
|
12
|
+
import y from "../../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isUndefined.js";
|
|
13
|
+
const A = 0, G = (n) => {
|
|
14
|
+
const { popperInstanceRef: c, contentRef: s, triggerRef: d, role: l } = U(
|
|
15
|
+
L,
|
|
16
|
+
void 0
|
|
17
|
+
), m = F(), v = r(() => n.arrowOffset), w = r(() => ({
|
|
18
|
+
name: "eventListeners",
|
|
19
|
+
enabled: !!n.visible
|
|
20
|
+
})), E = r(() => {
|
|
21
|
+
const e = o(m), f = o(v) ?? A;
|
|
22
|
+
return {
|
|
23
|
+
name: "arrow",
|
|
24
|
+
enabled: !y(e),
|
|
25
|
+
options: {
|
|
26
|
+
element: e,
|
|
27
|
+
padding: f
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}), R = r(() => ({
|
|
31
|
+
onFirstUpdate: () => {
|
|
32
|
+
i();
|
|
33
|
+
},
|
|
34
|
+
...T(n, [
|
|
35
|
+
o(E),
|
|
36
|
+
o(w)
|
|
37
|
+
])
|
|
38
|
+
})), p = r(
|
|
39
|
+
() => h(n.referenceEl) || o(d)
|
|
40
|
+
), { attributes: P, state: b, styles: g, update: i, forceUpdate: O, instanceRef: u } = I(p, s, R);
|
|
41
|
+
a(u, (e) => c.value = e, {
|
|
42
|
+
flush: "sync"
|
|
43
|
+
}), M(() => {
|
|
44
|
+
a(
|
|
45
|
+
() => {
|
|
46
|
+
var e, f;
|
|
47
|
+
return (f = (e = o(p)) == null ? void 0 : e.getBoundingClientRect) == null ? void 0 : f.call(e);
|
|
48
|
+
},
|
|
49
|
+
() => {
|
|
50
|
+
i();
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
let t;
|
|
55
|
+
return a(
|
|
56
|
+
() => n.visible,
|
|
57
|
+
(e) => {
|
|
58
|
+
t == null || t(), t = void 0, e && (t = C(s, i).stop);
|
|
59
|
+
}
|
|
60
|
+
), _(() => {
|
|
61
|
+
c.value = void 0, t == null || t(), t = void 0;
|
|
62
|
+
}), {
|
|
63
|
+
attributes: P,
|
|
64
|
+
arrowRef: m,
|
|
65
|
+
contentRef: s,
|
|
66
|
+
instanceRef: u,
|
|
67
|
+
state: b,
|
|
68
|
+
styles: g,
|
|
69
|
+
role: l,
|
|
70
|
+
forceUpdate: O,
|
|
71
|
+
update: i
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
G as usePopperContent
|
|
76
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SetupContext } from 'vue';
|
|
2
|
+
import type { PopperContentEmits, PopperContentProps } from '../content';
|
|
3
|
+
export declare const usePopperContentFocusTrap: (props: PopperContentProps, emit: SetupContext<PopperContentEmits>["emit"]) => {
|
|
4
|
+
focusStartRef: import("vue").Ref<HTMLElement | "first" | "container" | undefined, HTMLElement | "first" | "container" | undefined>;
|
|
5
|
+
trapped: import("vue").Ref<boolean, boolean>;
|
|
6
|
+
onFocusAfterReleased: (event: CustomEvent) => void;
|
|
7
|
+
onFocusAfterTrapped: () => void;
|
|
8
|
+
onFocusInTrap: (event: FocusEvent) => void;
|
|
9
|
+
onFocusoutPrevented: (event: CustomEvent) => void;
|
|
10
|
+
onReleaseRequested: () => void;
|
|
11
|
+
};
|
|
12
|
+
export type UsePopperContentFocusTrapReturn = ReturnType<typeof usePopperContentFocusTrap>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ref as r, onBeforeUnmount as p } from "vue";
|
|
2
|
+
const d = (a, s) => {
|
|
3
|
+
const o = r(!1), t = r(), u = () => {
|
|
4
|
+
s("focus");
|
|
5
|
+
}, f = (e) => {
|
|
6
|
+
var n;
|
|
7
|
+
((n = e.detail) == null ? void 0 : n.focusReason) !== "pointer" && (t.value = "first", s("blur"));
|
|
8
|
+
}, c = (e) => {
|
|
9
|
+
a.visible && !o.value && (e.target && (t.value = e.target), o.value = !0);
|
|
10
|
+
}, l = (e) => {
|
|
11
|
+
a.trapping || (e.detail.focusReason === "pointer" && e.preventDefault(), o.value = !1);
|
|
12
|
+
}, i = () => {
|
|
13
|
+
o.value = !1, s("close");
|
|
14
|
+
};
|
|
15
|
+
return p(() => {
|
|
16
|
+
t.value = void 0;
|
|
17
|
+
}), {
|
|
18
|
+
focusStartRef: t,
|
|
19
|
+
trapped: o,
|
|
20
|
+
onFocusAfterReleased: f,
|
|
21
|
+
onFocusAfterTrapped: u,
|
|
22
|
+
onFocusInTrap: c,
|
|
23
|
+
onFocusoutPrevented: l,
|
|
24
|
+
onReleaseRequested: i
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
d as usePopperContentFocusTrap
|
|
29
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CSSProperties, ComputedRef, InjectionKey, Ref } from 'vue';
|
|
2
|
+
import type { Instance } from '@popperjs/core';
|
|
3
|
+
export type Measurable = {
|
|
4
|
+
getBoundingClientRect: () => DOMRect;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* triggerRef indicates the element that triggers popper
|
|
8
|
+
* contentRef indicates the element of popper content
|
|
9
|
+
* referenceRef indicates the element that popper content relative with
|
|
10
|
+
*/
|
|
11
|
+
export type ElPopperInjectionContext = {
|
|
12
|
+
triggerRef: Ref<Measurable | undefined>;
|
|
13
|
+
contentRef: Ref<HTMLElement | undefined>;
|
|
14
|
+
popperInstanceRef: Ref<Instance | undefined>;
|
|
15
|
+
referenceRef: Ref<Measurable | undefined>;
|
|
16
|
+
role: ComputedRef<string>;
|
|
17
|
+
};
|
|
18
|
+
export type ElPopperContentInjectionContext = {
|
|
19
|
+
arrowRef: Ref<HTMLElement | undefined>;
|
|
20
|
+
arrowStyle: ComputedRef<CSSProperties>;
|
|
21
|
+
};
|
|
22
|
+
export declare const POPPER_INJECTION_KEY: InjectionKey<ElPopperInjectionContext>;
|
|
23
|
+
export declare const POPPER_CONTENT_INJECTION_KEY: InjectionKey<ElPopperContentInjectionContext>;
|