ep-craft 0.1.22 → 0.1.23
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/components/affix/affix.d.ts +19 -19
- package/dist/components/affix/affix.js +61 -53
- package/dist/components/alert/alert.d.ts +71 -17
- package/dist/components/alert/alert.js +99 -43
- package/dist/components/anchor/anchor.d.ts +19 -19
- package/dist/components/anchor/anchor.js +166 -102
- package/dist/components/anchor/constants.d.ts +15 -0
- package/dist/components/anchor/constants.js +4 -0
- package/dist/components/anchor-link/anchor-link.d.ts +1 -1
- package/dist/components/anchor-link/anchor-link.js +39 -26
- package/dist/components/button/EpButton.vue.d.ts +8 -8
- package/dist/components/button/EpButton.vue.js +5 -5
- package/dist/components/button/constants.d.ts +7 -0
- package/dist/components/button/constants.js +6 -0
- package/dist/components/check-tag/EpCheckTag.vue.d.ts +1 -1
- package/dist/components/collapse-transition/index.js +2 -2
- package/dist/components/config-provider/src/constants.js +4 -0
- package/dist/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
- package/dist/components/config-provider/src/hooks/use-global-config.js +24 -0
- package/dist/components/form/src/constants.js +2 -1
- package/dist/components/form/src/hooks/use-form-common-props.d.ts +2 -2
- package/dist/components/form/src/hooks/use-form-common-props.js +17 -0
- package/dist/components/form/src/hooks/use-form-item.js +51 -0
- package/dist/components/icon/index.js +5 -5
- package/dist/components/menu/menu-collapse-transition.vue.js +10 -6
- package/dist/components/menu/menu.d.ts +47 -47
- package/dist/components/menu/menu.js +59 -52
- package/dist/components/menu/use-menu-color.d.ts +2 -0
- package/dist/components/menu/use-menu-color.js +11 -0
- package/dist/components/menu/use-menu-css-var.d.ts +2 -0
- package/dist/components/menu/use-menu-css-var.js +30 -0
- package/dist/components/menu/utils/menu-bar.d.ts +7 -0
- package/dist/components/menu/utils/menu-bar.js +15 -0
- package/dist/components/menu/utils/menu-item.d.ts +9 -0
- package/dist/components/menu/utils/menu-item.js +50 -0
- package/dist/components/menu/utils/submenu.d.ts +11 -0
- package/dist/components/menu/utils/submenu.js +49 -0
- package/dist/components/menu-item/EpMenuItem.vue.js +17 -13
- package/dist/components/menu-item-group/EpMenuItemGroup.vue.js +1 -1
- package/dist/components/popper/src/composables/use-content.d.ts +6 -6
- package/dist/components/popper/src/content.vue.d.ts +6 -6
- package/dist/components/popper/src/popper.d.ts +2 -2
- package/dist/components/radio/constants.d.ts +64 -0
- package/dist/components/radio/constants.js +4 -0
- package/dist/components/radio/radio.d.ts +98 -19
- package/dist/components/radio/radio.js +101 -43
- package/dist/components/radio/use-radio.d.ts +13 -0
- package/dist/components/radio/use-radio.js +43 -0
- package/dist/components/radio-button/radio-button.d.ts +46 -16
- package/dist/components/radio-button/radio-button.js +37 -29
- package/dist/components/radio-group/radio-group.d.ts +142 -28
- package/dist/components/radio-group/radio-group.js +136 -55
- package/dist/components/sub-menu/sub-menu.d.ts +19 -19
- package/dist/components/sub-menu/sub-menu.js +65 -58
- package/dist/components/tab-pane/tab-pane.d.ts +45 -8
- package/dist/components/tab-pane/tab-pane.js +66 -32
- package/dist/components/tabs/composables/use-tab-nav-touch.d.ts +19 -0
- package/dist/components/tabs/composables/use-tab-nav-touch.js +58 -0
- package/dist/components/tabs/constants.d.ts +63 -0
- package/dist/components/tabs/constants.js +4 -0
- package/dist/components/tabs/tab-bar.d.ts +97 -0
- package/dist/components/tabs/tab-bar.vue.d.ts +14 -0
- package/dist/components/tabs/tab-bar.vue.js +80 -0
- package/dist/components/tabs/tab-bar2.vue.js +4 -0
- package/dist/components/tabs/tab-nav.d.ts +295 -0
- package/dist/components/tabs/tab-nav.js +297 -0
- package/dist/components/tabs/tabs.d.ts +71 -28
- package/dist/components/tabs/tabs.js +165 -93
- package/dist/components/tag/EpTag.vue.d.ts +3 -3
- package/dist/components/tag/EpTag.vue.js +3 -3
- package/dist/components/tooltip/index.d.ts +34 -34
- package/dist/components/tooltip/index.js +12 -12
- package/dist/components/tooltip/src/content.vue.d.ts +8 -8
- package/dist/components/tooltip/src/tooltip.d.ts +2 -2
- package/dist/components/tooltip/src/tooltip.vue.d.ts +12 -12
- package/dist/components/tooltip/src/trigger.d.ts +1 -1
- package/dist/constants/event.js +5 -0
- package/dist/directives/click-outside/index.js +49 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-deprecated/index.js +25 -0
- package/dist/hooks/use-locale/index.js +24 -0
- package/dist/hooks/use-ordered-children/index.js +53 -0
- package/dist/hooks/use-popper/index.d.ts +6 -6
- package/dist/hooks/use-prop/index.js +11 -0
- package/dist/hooks/use-size/index.d.ts +3 -3
- package/dist/hooks/use-size/index.js +14 -6
- package/dist/hooks/use-wheel/defaults.d.ts +27 -0
- package/dist/hooks/use-wheel/defaults.js +4 -0
- package/dist/hooks/use-wheel/index.d.ts +13 -0
- package/dist/hooks/use-wheel/index.js +26 -0
- package/dist/utils/browser.js +6 -5
- package/dist/utils/dom/aria.js +13 -6
- package/dist/utils/dom/element.js +16 -0
- package/dist/utils/dom/position.js +18 -0
- package/dist/utils/dom/scroll.js +50 -0
- package/dist/utils/dom/style.js +40 -13
- package/dist/utils/easings.js +7 -0
- package/dist/utils/error.js +11 -7
- package/dist/utils/numbers.js +6 -0
- package/dist/utils/objects.js +7 -0
- package/dist/utils/raf.js +6 -0
- package/dist/utils/strings.js +8 -0
- package/dist/utils/throttleByRaf.js +15 -0
- package/dist/utils/types.js +19 -16
- package/dist/utils/typescript.js +4 -0
- package/dist/utils/vue/icon.js +20 -0
- package/dist/utils/vue/vnode.d.ts +4 -4
- package/dist/utils/vue/vnode.js +17 -0
- package/dist/vendored-components.d.ts +6 -3
- package/dist/vendored-components.js +11 -5
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { computed as e } from "vue";
|
|
2
|
+
import { useNamespace as m } from "../../hooks/use-namespace/index.js";
|
|
3
|
+
import "@vue/shared";
|
|
4
|
+
import "lodash-unified";
|
|
5
|
+
import "@vueuse/core";
|
|
6
|
+
import "@element-plus/icons-vue";
|
|
7
|
+
import "../../hooks/use-size/index.js";
|
|
8
|
+
import "@popperjs/core";
|
|
9
|
+
import "../../hooks/use-z-index/index.js";
|
|
10
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
11
|
+
import "../../hooks/use-aria/index.js";
|
|
12
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
13
|
+
import "../../hooks/use-empty-values/index.js";
|
|
14
|
+
import i from "./use-menu-color.js";
|
|
15
|
+
const h = (o, r) => {
|
|
16
|
+
const t = m("menu");
|
|
17
|
+
return e(
|
|
18
|
+
() => t.cssVarBlock({
|
|
19
|
+
"text-color": o.textColor || "",
|
|
20
|
+
"hover-text-color": o.textColor || "",
|
|
21
|
+
"bg-color": o.backgroundColor || "",
|
|
22
|
+
"hover-bg-color": i(o).value || "",
|
|
23
|
+
"active-color": o.activeTextColor || "",
|
|
24
|
+
level: `${r}`
|
|
25
|
+
})
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
h as useMenuCssVar
|
|
30
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import i from "./menu-item.js";
|
|
2
|
+
class s {
|
|
3
|
+
constructor(o, e) {
|
|
4
|
+
this.domNode = o, this.init(e);
|
|
5
|
+
}
|
|
6
|
+
init(o) {
|
|
7
|
+
const e = this.domNode.childNodes;
|
|
8
|
+
Array.from(e).forEach((t) => {
|
|
9
|
+
t.nodeType === 1 && new i(t, o);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
s as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import "@vue/shared";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import { triggerEvent as o } from "../../../utils/dom/aria.js";
|
|
5
|
+
import { getEventCode as n } from "../../../utils/dom/event.js";
|
|
6
|
+
import "@element-plus/icons-vue";
|
|
7
|
+
import "vue";
|
|
8
|
+
import { EVENT_CODE as r } from "../../../constants/aria.js";
|
|
9
|
+
import m from "./submenu.js";
|
|
10
|
+
class k {
|
|
11
|
+
constructor(e, t) {
|
|
12
|
+
this.domNode = e, this.submenu = null, this.init(t);
|
|
13
|
+
}
|
|
14
|
+
init(e) {
|
|
15
|
+
this.domNode.setAttribute("tabindex", "0");
|
|
16
|
+
const t = this.domNode.querySelector(`.${e}-menu`);
|
|
17
|
+
t && (this.submenu = new m(this, t)), this.addListeners();
|
|
18
|
+
}
|
|
19
|
+
addListeners() {
|
|
20
|
+
this.domNode.addEventListener("keydown", (e) => {
|
|
21
|
+
var u, i;
|
|
22
|
+
const t = n(e);
|
|
23
|
+
let s = !1;
|
|
24
|
+
switch (t) {
|
|
25
|
+
case r.down: {
|
|
26
|
+
o(e.currentTarget, "mouseenter"), (u = this.submenu) == null || u.gotoSubIndex(0), s = !0;
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
case r.up: {
|
|
30
|
+
o(e.currentTarget, "mouseenter"), (i = this.submenu) == null || i.gotoSubIndex(this.submenu.subMenuItems.length - 1), s = !0;
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
case r.tab: {
|
|
34
|
+
o(e.currentTarget, "mouseleave");
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
case r.enter:
|
|
38
|
+
case r.numpadEnter:
|
|
39
|
+
case r.space: {
|
|
40
|
+
s = !0, e.currentTarget.click();
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
s && e.preventDefault();
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
k as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type MenuItem from './menu-item';
|
|
2
|
+
declare class SubMenu {
|
|
3
|
+
parent: MenuItem;
|
|
4
|
+
domNode: ParentNode;
|
|
5
|
+
subMenuItems: NodeListOf<HTMLLIElement>;
|
|
6
|
+
subIndex: number;
|
|
7
|
+
constructor(parent: MenuItem, domNode: ParentNode);
|
|
8
|
+
gotoSubIndex(idx: number): void;
|
|
9
|
+
addListeners(): void;
|
|
10
|
+
}
|
|
11
|
+
export default SubMenu;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import "@vue/shared";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import { triggerEvent as u } from "../../../utils/dom/aria.js";
|
|
5
|
+
import { getEventCode as a } from "../../../utils/dom/event.js";
|
|
6
|
+
import "@element-plus/icons-vue";
|
|
7
|
+
import "vue";
|
|
8
|
+
import { EVENT_CODE as t } from "../../../constants/aria.js";
|
|
9
|
+
class I {
|
|
10
|
+
constructor(e, o) {
|
|
11
|
+
this.parent = e, this.domNode = o, this.subIndex = 0, this.subMenuItems = this.domNode.querySelectorAll("li"), this.addListeners();
|
|
12
|
+
}
|
|
13
|
+
gotoSubIndex(e) {
|
|
14
|
+
e === this.subMenuItems.length ? e = 0 : e < 0 && (e = this.subMenuItems.length - 1), this.subMenuItems[e].focus(), this.subIndex = e;
|
|
15
|
+
}
|
|
16
|
+
addListeners() {
|
|
17
|
+
const e = this.parent.domNode;
|
|
18
|
+
this.subMenuItems.forEach((o) => {
|
|
19
|
+
o.addEventListener("keydown", (s) => {
|
|
20
|
+
const n = a(s);
|
|
21
|
+
let r = !1;
|
|
22
|
+
switch (n) {
|
|
23
|
+
case t.down: {
|
|
24
|
+
this.gotoSubIndex(this.subIndex + 1), r = !0;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
case t.up: {
|
|
28
|
+
this.gotoSubIndex(this.subIndex - 1), r = !0;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
case t.tab: {
|
|
32
|
+
u(e, "mouseleave");
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
case t.enter:
|
|
36
|
+
case t.numpadEnter:
|
|
37
|
+
case t.space: {
|
|
38
|
+
r = !0, s.currentTarget.click();
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return r && (s.preventDefault(), s.stopPropagation()), !1;
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
I as default
|
|
49
|
+
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { defineComponent as _, getCurrentInstance as $, inject as M, toRef as g, computed as B, reactive as S, onMounted as O, onBeforeUnmount as P, openBlock as a, createElementBlock as E, normalizeClass as I, unref as e, createBlock as T, withCtx as b, createElementVNode as U, renderSlot as i, Fragment as j } from "vue";
|
|
2
|
-
import { ElTooltip as w } from "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { ElTooltip as w } from "../tooltip/index.js";
|
|
3
|
+
import "@vue/shared";
|
|
4
|
+
import "lodash-unified";
|
|
5
|
+
import "@vueuse/core";
|
|
6
|
+
import { throwError as C } from "../../utils/error.js";
|
|
7
|
+
import "@element-plus/icons-vue";
|
|
8
|
+
import { useNamespace as N } from "../../hooks/use-namespace/index.js";
|
|
5
9
|
import J from "../menu/use-menu.js";
|
|
6
10
|
import { menuItemEmits as K, menuItemProps as Y } from "./menu-item.js";
|
|
7
11
|
import { MENU_INJECTION_KEY as z, SUB_MENU_INJECTION_KEY as A } from "../menu/tokens.js";
|
|
8
|
-
const c = "EpMenuItem",
|
|
12
|
+
const c = "EpMenuItem", ee = /* @__PURE__ */ _({
|
|
9
13
|
name: c,
|
|
10
14
|
__name: "EpMenuItem",
|
|
11
15
|
props: Y,
|
|
@@ -13,14 +17,14 @@ const c = "EpMenuItem", Q = /* @__PURE__ */ _({
|
|
|
13
17
|
setup(k, { expose: v, emit: h }) {
|
|
14
18
|
const n = k, x = h, y = $(), t = M(z), u = N("menu"), r = N("menu-item");
|
|
15
19
|
t || C(c, "can not inject root menu");
|
|
16
|
-
const { parentMenu: p, indexPath: d } = J(y, g(n, "index")),
|
|
20
|
+
const { parentMenu: p, indexPath: d } = J(y, g(n, "index")), m = M(
|
|
17
21
|
`${A}${p.value.uid}`
|
|
18
22
|
);
|
|
19
|
-
|
|
20
|
-
const
|
|
23
|
+
m || C(c, "can not inject sub menu");
|
|
24
|
+
const l = B(() => n.index === t.activeIndex), s = S({
|
|
21
25
|
index: n.index,
|
|
22
26
|
indexPath: d,
|
|
23
|
-
active:
|
|
27
|
+
active: l
|
|
24
28
|
}), f = () => {
|
|
25
29
|
n.disabled || (t.handleMenuItemClick({
|
|
26
30
|
index: n.index,
|
|
@@ -29,20 +33,20 @@ const c = "EpMenuItem", Q = /* @__PURE__ */ _({
|
|
|
29
33
|
}), x("click", s));
|
|
30
34
|
};
|
|
31
35
|
return O(() => {
|
|
32
|
-
|
|
36
|
+
m.addSubMenu(s), t.addMenuItem(s);
|
|
33
37
|
}), P(() => {
|
|
34
|
-
|
|
38
|
+
m.removeSubMenu(s), t.removeMenuItem(s);
|
|
35
39
|
}), v({
|
|
36
40
|
parentMenu: p,
|
|
37
41
|
rootMenu: t,
|
|
38
|
-
active:
|
|
42
|
+
active: l,
|
|
39
43
|
nsMenu: u,
|
|
40
44
|
nsMenuItem: r,
|
|
41
45
|
handleClick: f
|
|
42
46
|
}), (o, F) => (a(), E("li", {
|
|
43
47
|
class: I([
|
|
44
48
|
e(r).b(),
|
|
45
|
-
e(r).is("active",
|
|
49
|
+
e(r).is("active", l.value),
|
|
46
50
|
e(r).is("disabled", o.disabled)
|
|
47
51
|
]),
|
|
48
52
|
role: "menuitem",
|
|
@@ -78,5 +82,5 @@ const c = "EpMenuItem", Q = /* @__PURE__ */ _({
|
|
|
78
82
|
}
|
|
79
83
|
});
|
|
80
84
|
export {
|
|
81
|
-
|
|
85
|
+
ee as default
|
|
82
86
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, openBlock as o, createElementBlock as r, normalizeClass as n, unref as s, createElementVNode as l, Fragment as a, createTextVNode as i, toDisplayString as u, renderSlot as m } from "vue";
|
|
2
|
-
import { useNamespace as c } from "
|
|
2
|
+
import { useNamespace as c } from "../../hooks/use-namespace/index.js";
|
|
3
3
|
import { menuItemGroupProps as d } from "./menu-item-group.js";
|
|
4
4
|
const v = /* @__PURE__ */ p({
|
|
5
5
|
name: "EpMenuItemGroup",
|
|
@@ -46,17 +46,17 @@ export declare const usePopperContent: (props: PopperContentProps) => {
|
|
|
46
46
|
popperEscapeOffsets: import("@popperjs/core").SideObject;
|
|
47
47
|
};
|
|
48
48
|
offset?: {
|
|
49
|
-
|
|
50
|
-
bottom?: import("@popperjs/core").Offsets | undefined;
|
|
49
|
+
auto?: import("@popperjs/core").Offsets | undefined;
|
|
51
50
|
left?: import("@popperjs/core").Offsets | undefined;
|
|
51
|
+
right?: import("@popperjs/core").Offsets | undefined;
|
|
52
|
+
bottom?: import("@popperjs/core").Offsets | undefined;
|
|
53
|
+
top?: import("@popperjs/core").Offsets | undefined;
|
|
54
|
+
"auto-start"?: import("@popperjs/core").Offsets | undefined;
|
|
55
|
+
"auto-end"?: import("@popperjs/core").Offsets | undefined;
|
|
52
56
|
"top-start"?: import("@popperjs/core").Offsets | undefined;
|
|
53
57
|
"top-end"?: import("@popperjs/core").Offsets | undefined;
|
|
54
58
|
"bottom-start"?: import("@popperjs/core").Offsets | undefined;
|
|
55
59
|
"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
60
|
"right-start"?: import("@popperjs/core").Offsets | undefined;
|
|
61
61
|
"right-end"?: import("@popperjs/core").Offsets | undefined;
|
|
62
62
|
"left-start"?: import("@popperjs/core").Offsets | undefined;
|
|
@@ -21,22 +21,24 @@ declare const __VLS_component: import("vue").DefineComponent<PopperContentProps,
|
|
|
21
21
|
*/
|
|
22
22
|
contentStyle: import("vue").ComputedRef<import("vue").StyleValue[]>;
|
|
23
23
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
focus: () => void;
|
|
24
25
|
blur: () => void;
|
|
25
26
|
close: () => void;
|
|
26
|
-
focus: () => void;
|
|
27
27
|
mouseenter: (evt: MouseEvent) => void;
|
|
28
28
|
mouseleave: (evt: MouseEvent) => void;
|
|
29
29
|
}, string, import("vue").PublicProps, Readonly<PopperContentProps> & Readonly<{
|
|
30
|
+
onFocus?: (() => any) | undefined;
|
|
30
31
|
onBlur?: (() => any) | undefined;
|
|
31
32
|
onClose?: (() => any) | undefined;
|
|
32
|
-
onFocus?: (() => any) | undefined;
|
|
33
33
|
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
34
34
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
35
35
|
}>, {
|
|
36
|
-
offset: number;
|
|
37
36
|
style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
|
|
38
|
-
effect: import("./popper").PopperEffect;
|
|
39
37
|
visible: boolean;
|
|
38
|
+
offset: number;
|
|
39
|
+
placement: import("element-plus").Placement;
|
|
40
|
+
strategy: "fixed" | "absolute";
|
|
41
|
+
effect: import("./popper").PopperEffect;
|
|
40
42
|
enterable: boolean;
|
|
41
43
|
pure: boolean;
|
|
42
44
|
focusOnShow: boolean;
|
|
@@ -47,9 +49,7 @@ declare const __VLS_component: import("vue").DefineComponent<PopperContentProps,
|
|
|
47
49
|
loop: boolean;
|
|
48
50
|
boundariesPadding: number;
|
|
49
51
|
gpuAcceleration: boolean;
|
|
50
|
-
placement: import("element-plus").Placement;
|
|
51
52
|
popperOptions: Partial<import("element-plus").Options>;
|
|
52
|
-
strategy: "fixed" | "absolute";
|
|
53
53
|
arrowOffset: number;
|
|
54
54
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
55
55
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -19,7 +19,7 @@ export interface PopperProps {
|
|
|
19
19
|
* @deprecated Removed after 3.0.0, Use `PopperProps` instead.
|
|
20
20
|
*/
|
|
21
21
|
export declare const popperProps: {
|
|
22
|
-
readonly role: import("@element-plus/utils").EpPropFinalized<StringConstructor, "
|
|
22
|
+
readonly role: import("@element-plus/utils").EpPropFinalized<StringConstructor, "listbox" | "grid" | "menu" | "tooltip" | "dialog" | "tree" | "group" | "navigation", unknown, "tooltip", boolean>;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* @deprecated Removed after 3.0.0, Use `PopperProps` instead.
|
|
@@ -28,7 +28,7 @@ export type PopperPropsPublic = ExtractPublicPropTypes<typeof popperProps>;
|
|
|
28
28
|
export type PopperInstance = InstanceType<typeof Popper> & unknown;
|
|
29
29
|
/** @deprecated use `popperProps` instead, and it will be deprecated in the next major version */
|
|
30
30
|
export declare const usePopperProps: {
|
|
31
|
-
readonly role: import("@element-plus/utils").EpPropFinalized<StringConstructor, "
|
|
31
|
+
readonly role: import("@element-plus/utils").EpPropFinalized<StringConstructor, "listbox" | "grid" | "menu" | "tooltip" | "dialog" | "tree" | "group" | "navigation", unknown, "tooltip", boolean>;
|
|
32
32
|
};
|
|
33
33
|
/** @deprecated use `PopperProps` instead, and it will be deprecated in the next major version */
|
|
34
34
|
export type UsePopperProps = PopperProps;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
import type { ComponentSize } from '@element-plus/constants';
|
|
3
|
+
/**
|
|
4
|
+
* RadioGroupContext —— 与 element-plus `radio/src/radio-group.ts` 的
|
|
5
|
+
* RadioGroupProps 字段保持一致(本仓库 radio-group 拆分到 ../radio-group,
|
|
6
|
+
* 由任务 6.3 自持后导出自身的 RadioGroupProps;此处内联字段以避免跨任务引用
|
|
7
|
+
* 尚未完成的模块,type-only 不会产生运行时循环依赖)。
|
|
8
|
+
*/
|
|
9
|
+
export interface RadioGroupContext {
|
|
10
|
+
/**
|
|
11
|
+
* @description native `id` attribute
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description the size of radio buttons or bordered radios
|
|
16
|
+
*/
|
|
17
|
+
size?: ComponentSize;
|
|
18
|
+
/**
|
|
19
|
+
* @description whether the nesting radios are disabled
|
|
20
|
+
*/
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @description binding value
|
|
24
|
+
*/
|
|
25
|
+
modelValue?: string | number | boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @description border and background color when button is active
|
|
28
|
+
*/
|
|
29
|
+
fill?: string;
|
|
30
|
+
/**
|
|
31
|
+
* @description font color when button is active
|
|
32
|
+
*/
|
|
33
|
+
textColor?: string;
|
|
34
|
+
/**
|
|
35
|
+
* @description native `name` attribute
|
|
36
|
+
*/
|
|
37
|
+
name?: string;
|
|
38
|
+
/**
|
|
39
|
+
* @description whether to trigger form validation
|
|
40
|
+
*/
|
|
41
|
+
validateEvent?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @description radio options
|
|
44
|
+
*/
|
|
45
|
+
options?: Record<string, any>[];
|
|
46
|
+
/**
|
|
47
|
+
* @description custom prop names for options
|
|
48
|
+
*/
|
|
49
|
+
props?: {
|
|
50
|
+
value?: string;
|
|
51
|
+
label?: string;
|
|
52
|
+
disabled?: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* @description radio type
|
|
56
|
+
*/
|
|
57
|
+
type?: 'radio' | 'button';
|
|
58
|
+
/**
|
|
59
|
+
* @description native `aria-label` attribute
|
|
60
|
+
*/
|
|
61
|
+
ariaLabel?: string;
|
|
62
|
+
changeEvent: (val: RadioGroupContext['modelValue']) => void;
|
|
63
|
+
}
|
|
64
|
+
export declare const radioGroupKey: InjectionKey<RadioGroupContext>;
|
|
@@ -1,24 +1,103 @@
|
|
|
1
|
+
import type { ComponentSize } from '@element-plus/constants';
|
|
2
|
+
/**
|
|
3
|
+
* EpRadio 的 props / emits 定义
|
|
4
|
+
* 从 element-plus radio 源码 vendored 而来(内联到本文件顶部)。
|
|
5
|
+
*/
|
|
6
|
+
export interface RadioPropsBase {
|
|
7
|
+
/**
|
|
8
|
+
* @description binding value
|
|
9
|
+
*/
|
|
10
|
+
modelValue?: string | number | boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @description size of the Radio
|
|
13
|
+
*/
|
|
14
|
+
size?: ComponentSize;
|
|
15
|
+
/**
|
|
16
|
+
* @description whether Radio is disabled
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @description the label of Radio
|
|
21
|
+
*/
|
|
22
|
+
label?: string | number | boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @description the value of Radio
|
|
25
|
+
*/
|
|
26
|
+
value?: string | number | boolean;
|
|
27
|
+
/**
|
|
28
|
+
* @description native `name` attribute
|
|
29
|
+
*/
|
|
30
|
+
name?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface RadioProps extends RadioPropsBase {
|
|
33
|
+
/**
|
|
34
|
+
* @description whether to add a border around Radio
|
|
35
|
+
*/
|
|
36
|
+
border?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare const radioPropsBase: {
|
|
39
|
+
modelValue: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
40
|
+
size: {
|
|
41
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
42
|
+
readonly required: false;
|
|
43
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
44
|
+
__epPropKey: true;
|
|
45
|
+
};
|
|
46
|
+
disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
47
|
+
label: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
48
|
+
value: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
49
|
+
name: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
50
|
+
};
|
|
51
|
+
export declare const radioProps: {
|
|
52
|
+
readonly border: BooleanConstructor;
|
|
53
|
+
readonly modelValue: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
54
|
+
readonly size: {
|
|
55
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
56
|
+
readonly required: false;
|
|
57
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
58
|
+
__epPropKey: true;
|
|
59
|
+
};
|
|
60
|
+
readonly disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
61
|
+
readonly label: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
62
|
+
readonly value: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
63
|
+
readonly name: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
64
|
+
};
|
|
65
|
+
export declare const radioEmits: {
|
|
66
|
+
"update:modelValue": (val: string | number | boolean | undefined) => val is string | number | boolean;
|
|
67
|
+
change: (val: string | number | boolean | undefined) => val is string | number | boolean;
|
|
68
|
+
};
|
|
69
|
+
export type RadioEmits = typeof radioEmits;
|
|
70
|
+
/**
|
|
71
|
+
* @description default values for RadioProps
|
|
72
|
+
*/
|
|
73
|
+
export declare const radioPropsDefaults: {
|
|
74
|
+
readonly modelValue: undefined;
|
|
75
|
+
readonly disabled: undefined;
|
|
76
|
+
readonly label: undefined;
|
|
77
|
+
readonly value: undefined;
|
|
78
|
+
readonly name: undefined;
|
|
79
|
+
readonly border: false;
|
|
80
|
+
};
|
|
1
81
|
/**
|
|
2
82
|
* EpRadio —— 从 element-plus 的 radio 源码 vendored 而来(el -> ep 命名),
|
|
3
83
|
* 样式复用仓库内置的 theme-chalk/src/radio.scss(命名空间为 el)。
|
|
4
84
|
*
|
|
5
85
|
* 注意:radio 通过 inject(radioGroupKey) 识别父级 EpRadioGroup,该 key 与
|
|
6
|
-
* EpRadioGroup
|
|
7
|
-
* 不受组件改名影响。
|
|
86
|
+
* EpRadioGroup 共用本地 constants.ts 中的同一 Symbol,父子识别不受组件改名影响。
|
|
8
87
|
*/
|
|
9
88
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
89
|
readonly border: BooleanConstructor;
|
|
11
|
-
readonly modelValue: import("element-plus/
|
|
90
|
+
readonly modelValue: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
12
91
|
readonly size: {
|
|
13
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
92
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
14
93
|
readonly required: false;
|
|
15
94
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
16
95
|
__epPropKey: true;
|
|
17
96
|
};
|
|
18
|
-
readonly disabled: import("element-plus/
|
|
19
|
-
readonly label: import("element-plus/
|
|
20
|
-
readonly value: import("element-plus/
|
|
21
|
-
readonly name: import("element-plus/
|
|
97
|
+
readonly disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
98
|
+
readonly label: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
99
|
+
readonly value: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
100
|
+
readonly name: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
22
101
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
23
102
|
[key: string]: any;
|
|
24
103
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -26,26 +105,26 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
26
105
|
change: (val: string | number | boolean | undefined) => val is string | number | boolean;
|
|
27
106
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
107
|
readonly border: BooleanConstructor;
|
|
29
|
-
readonly modelValue: import("element-plus/
|
|
108
|
+
readonly modelValue: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
30
109
|
readonly size: {
|
|
31
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
110
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
32
111
|
readonly required: false;
|
|
33
112
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
34
113
|
__epPropKey: true;
|
|
35
114
|
};
|
|
36
|
-
readonly disabled: import("element-plus/
|
|
37
|
-
readonly label: import("element-plus/
|
|
38
|
-
readonly value: import("element-plus/
|
|
39
|
-
readonly name: import("element-plus/
|
|
115
|
+
readonly disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
116
|
+
readonly label: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
117
|
+
readonly value: import("@element-plus/utils").EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
118
|
+
readonly name: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
40
119
|
}>> & Readonly<{
|
|
41
|
-
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
42
120
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
121
|
+
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
43
122
|
}>, {
|
|
44
123
|
readonly name: string;
|
|
45
|
-
readonly label: import("element-plus/es/utils/index.mjs").EpPropMergeType<(BooleanConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
46
|
-
readonly disabled: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
47
|
-
readonly value: import("element-plus/es/utils/index.mjs").EpPropMergeType<(BooleanConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
48
|
-
readonly modelValue: import("element-plus/es/utils/index.mjs").EpPropMergeType<(BooleanConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
49
124
|
readonly border: boolean;
|
|
125
|
+
readonly disabled: import("@element-plus/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
126
|
+
readonly label: import("@element-plus/utils").EpPropMergeType<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>;
|
|
127
|
+
readonly value: import("@element-plus/utils").EpPropMergeType<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>;
|
|
128
|
+
readonly modelValue: import("@element-plus/utils").EpPropMergeType<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>;
|
|
50
129
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
51
130
|
export default _default;
|