@element-plus/nightly 0.0.20241205 → 0.0.20241206
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.full.js +6 -12
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +6 -12
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/alert/src/alert2.mjs +4 -10
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -53
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +53 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/index.mjs +4 -4
- package/es/components/pagination/src/components/next.mjs +18 -35
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +35 -18
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +64 -110
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +110 -64
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs +1 -1
- package/es/components/radio/src/radio.mjs +32 -73
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +73 -32
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +72 -14
- package/es/components/tooltip/src/trigger.mjs.map +1 -1
- package/es/components/tooltip/src/trigger2.mjs +14 -72
- package/es/components/tooltip/src/trigger2.mjs.map +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +4 -4
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/src/alert2.js +4 -10
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -53
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +53 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/index.js +4 -4
- package/lib/components/pagination/src/components/next.js +18 -35
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +35 -18
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +65 -110
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +110 -65
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group.js +1 -1
- package/lib/components/radio/src/radio.js +34 -73
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +73 -34
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip/src/trigger.js +72 -14
- package/lib/components/tooltip/src/trigger.js.map +1 -1
- package/lib/components/tooltip/src/trigger2.js +14 -72
- package/lib/components/tooltip/src/trigger2.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +4 -4
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
- package/es/components/form/mocks/mock-data.d.ts +0 -13
- package/lib/components/form/mocks/mock-data.d.ts +0 -13
@@ -1,78 +1,37 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
import {
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
2
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
3
|
+
import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
|
4
|
+
import { isString } from '@vue/shared';
|
5
|
+
import { isNumber, isBoolean } from '../../../utils/types.mjs';
|
6
6
|
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
unref(ns).b(),
|
26
|
-
unref(ns).is("disabled", unref(disabled)),
|
27
|
-
unref(ns).is("focus", unref(focus)),
|
28
|
-
unref(ns).is("bordered", _ctx.border),
|
29
|
-
unref(ns).is("checked", unref(modelValue) === unref(actualValue)),
|
30
|
-
unref(ns).m(unref(size))
|
31
|
-
])
|
32
|
-
}, [
|
33
|
-
createElementVNode("span", {
|
34
|
-
class: normalizeClass([
|
35
|
-
unref(ns).e("input"),
|
36
|
-
unref(ns).is("disabled", unref(disabled)),
|
37
|
-
unref(ns).is("checked", unref(modelValue) === unref(actualValue))
|
38
|
-
])
|
39
|
-
}, [
|
40
|
-
withDirectives(createElementVNode("input", {
|
41
|
-
ref_key: "radioRef",
|
42
|
-
ref: radioRef,
|
43
|
-
"onUpdate:modelValue": ($event) => isRef(modelValue) ? modelValue.value = $event : null,
|
44
|
-
class: normalizeClass(unref(ns).e("original")),
|
45
|
-
value: unref(actualValue),
|
46
|
-
name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
|
47
|
-
disabled: unref(disabled),
|
48
|
-
checked: unref(modelValue) === unref(actualValue),
|
49
|
-
type: "radio",
|
50
|
-
onFocus: ($event) => focus.value = true,
|
51
|
-
onBlur: ($event) => focus.value = false,
|
52
|
-
onChange: handleChange,
|
53
|
-
onClick: withModifiers(() => {
|
54
|
-
}, ["stop"])
|
55
|
-
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
|
56
|
-
[vModelRadio, unref(modelValue)]
|
57
|
-
]),
|
58
|
-
createElementVNode("span", {
|
59
|
-
class: normalizeClass(unref(ns).e("inner"))
|
60
|
-
}, null, 2)
|
61
|
-
], 2),
|
62
|
-
createElementVNode("span", {
|
63
|
-
class: normalizeClass(unref(ns).e("label")),
|
64
|
-
onKeydown: withModifiers(() => {
|
65
|
-
}, ["stop"])
|
66
|
-
}, [
|
67
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
68
|
-
createTextVNode(toDisplayString(_ctx.label), 1)
|
69
|
-
])
|
70
|
-
], 42, ["onKeydown"])
|
71
|
-
], 2);
|
72
|
-
};
|
7
|
+
const radioPropsBase = buildProps({
|
8
|
+
modelValue: {
|
9
|
+
type: [String, Number, Boolean],
|
10
|
+
default: void 0
|
11
|
+
},
|
12
|
+
size: useSizeProp,
|
13
|
+
disabled: Boolean,
|
14
|
+
label: {
|
15
|
+
type: [String, Number, Boolean],
|
16
|
+
default: void 0
|
17
|
+
},
|
18
|
+
value: {
|
19
|
+
type: [String, Number, Boolean],
|
20
|
+
default: void 0
|
21
|
+
},
|
22
|
+
name: {
|
23
|
+
type: String,
|
24
|
+
default: void 0
|
73
25
|
}
|
74
26
|
});
|
75
|
-
|
27
|
+
const radioProps = buildProps({
|
28
|
+
...radioPropsBase,
|
29
|
+
border: Boolean
|
30
|
+
});
|
31
|
+
const radioEmits = {
|
32
|
+
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
|
33
|
+
[CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
|
34
|
+
};
|
76
35
|
|
77
|
-
export {
|
36
|
+
export { radioEmits, radioProps, radioPropsBase };
|
78
37
|
//# sourceMappingURL=radio.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"radio.mjs","sources":["../../../../../../packages/components/radio/src/radio.
|
1
|
+
{"version":3,"file":"radio.mjs","sources":["../../../../../../packages/components/radio/src/radio.ts"],"sourcesContent":["import { buildProps, isBoolean, isNumber, isString } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type { ExtractPropTypes } from 'vue'\nimport type Radio from './radio.vue'\n\nexport const radioPropsBase = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description size of the Radio\n */\n size: useSizeProp,\n /**\n * @description whether Radio is disabled\n */\n disabled: Boolean,\n /**\n * @description the label of Radio\n */\n label: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description the value of Radio\n */\n value: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n})\n\nexport const radioProps = buildProps({\n ...radioPropsBase,\n /**\n * @description whether to add a border around Radio\n */\n border: Boolean,\n} as const)\n\nexport const radioEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type RadioProps = ExtractPropTypes<typeof radioProps>\nexport type RadioEmits = typeof radioEmits\nexport type RadioInstance = InstanceType<typeof Radio>\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,GAAG,cAAc;AACnB,EAAE,MAAM,EAAE,OAAO;AACjB,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACjF,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AAC3E;;;;"}
|
@@ -1,37 +1,78 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
import {
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, withDirectives, isRef, withModifiers, vModelRadio, renderSlot, createTextVNode, toDisplayString, nextTick } from 'vue';
|
2
|
+
import { radioProps, radioEmits } from './radio.mjs';
|
3
|
+
import { useRadio } from './use-radio.mjs';
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
6
6
|
|
7
|
-
const
|
8
|
-
|
9
|
-
type: [String, Number, Boolean],
|
10
|
-
default: void 0
|
11
|
-
},
|
12
|
-
size: useSizeProp,
|
13
|
-
disabled: Boolean,
|
14
|
-
label: {
|
15
|
-
type: [String, Number, Boolean],
|
16
|
-
default: void 0
|
17
|
-
},
|
18
|
-
value: {
|
19
|
-
type: [String, Number, Boolean],
|
20
|
-
default: void 0
|
21
|
-
},
|
22
|
-
name: {
|
23
|
-
type: String,
|
24
|
-
default: void 0
|
25
|
-
}
|
7
|
+
const __default__ = defineComponent({
|
8
|
+
name: "ElRadio"
|
26
9
|
});
|
27
|
-
const
|
28
|
-
...
|
29
|
-
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
11
|
+
...__default__,
|
12
|
+
props: radioProps,
|
13
|
+
emits: radioEmits,
|
14
|
+
setup(__props, { emit }) {
|
15
|
+
const props = __props;
|
16
|
+
const ns = useNamespace("radio");
|
17
|
+
const { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } = useRadio(props, emit);
|
18
|
+
function handleChange() {
|
19
|
+
nextTick(() => emit("change", modelValue.value));
|
20
|
+
}
|
21
|
+
return (_ctx, _cache) => {
|
22
|
+
var _a;
|
23
|
+
return openBlock(), createElementBlock("label", {
|
24
|
+
class: normalizeClass([
|
25
|
+
unref(ns).b(),
|
26
|
+
unref(ns).is("disabled", unref(disabled)),
|
27
|
+
unref(ns).is("focus", unref(focus)),
|
28
|
+
unref(ns).is("bordered", _ctx.border),
|
29
|
+
unref(ns).is("checked", unref(modelValue) === unref(actualValue)),
|
30
|
+
unref(ns).m(unref(size))
|
31
|
+
])
|
32
|
+
}, [
|
33
|
+
createElementVNode("span", {
|
34
|
+
class: normalizeClass([
|
35
|
+
unref(ns).e("input"),
|
36
|
+
unref(ns).is("disabled", unref(disabled)),
|
37
|
+
unref(ns).is("checked", unref(modelValue) === unref(actualValue))
|
38
|
+
])
|
39
|
+
}, [
|
40
|
+
withDirectives(createElementVNode("input", {
|
41
|
+
ref_key: "radioRef",
|
42
|
+
ref: radioRef,
|
43
|
+
"onUpdate:modelValue": ($event) => isRef(modelValue) ? modelValue.value = $event : null,
|
44
|
+
class: normalizeClass(unref(ns).e("original")),
|
45
|
+
value: unref(actualValue),
|
46
|
+
name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
|
47
|
+
disabled: unref(disabled),
|
48
|
+
checked: unref(modelValue) === unref(actualValue),
|
49
|
+
type: "radio",
|
50
|
+
onFocus: ($event) => focus.value = true,
|
51
|
+
onBlur: ($event) => focus.value = false,
|
52
|
+
onChange: handleChange,
|
53
|
+
onClick: withModifiers(() => {
|
54
|
+
}, ["stop"])
|
55
|
+
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
|
56
|
+
[vModelRadio, unref(modelValue)]
|
57
|
+
]),
|
58
|
+
createElementVNode("span", {
|
59
|
+
class: normalizeClass(unref(ns).e("inner"))
|
60
|
+
}, null, 2)
|
61
|
+
], 2),
|
62
|
+
createElementVNode("span", {
|
63
|
+
class: normalizeClass(unref(ns).e("label")),
|
64
|
+
onKeydown: withModifiers(() => {
|
65
|
+
}, ["stop"])
|
66
|
+
}, [
|
67
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
68
|
+
createTextVNode(toDisplayString(_ctx.label), 1)
|
69
|
+
])
|
70
|
+
], 42, ["onKeydown"])
|
71
|
+
], 2);
|
72
|
+
};
|
73
|
+
}
|
30
74
|
});
|
31
|
-
|
32
|
-
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
|
33
|
-
[CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
|
34
|
-
};
|
75
|
+
var Radio = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "radio.vue"]]);
|
35
76
|
|
36
|
-
export {
|
77
|
+
export { Radio as default };
|
37
78
|
//# sourceMappingURL=radio2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"radio2.mjs","sources":["../../../../../../packages/components/radio/src/radio.
|
1
|
+
{"version":3,"file":"radio2.mjs","sources":["../../../../../../packages/components/radio/src/radio.vue"],"sourcesContent":["<template>\n <label\n :class=\"[\n ns.b(),\n ns.is('disabled', disabled),\n ns.is('focus', focus),\n ns.is('bordered', border),\n ns.is('checked', modelValue === actualValue),\n ns.m(size),\n ]\"\n >\n <span\n :class=\"[\n ns.e('input'),\n ns.is('disabled', disabled),\n ns.is('checked', modelValue === actualValue),\n ]\"\n >\n <input\n ref=\"radioRef\"\n v-model=\"modelValue\"\n :class=\"ns.e('original')\"\n :value=\"actualValue\"\n :name=\"name || radioGroup?.name\"\n :disabled=\"disabled\"\n :checked=\"modelValue === actualValue\"\n type=\"radio\"\n @focus=\"focus = true\"\n @blur=\"focus = false\"\n @change=\"handleChange\"\n @click.stop\n />\n <span :class=\"ns.e('inner')\" />\n </span>\n <span :class=\"ns.e('label')\" @keydown.stop>\n <slot>\n {{ label }}\n </slot>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\" setup>\nimport { nextTick } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { radioEmits, radioProps } from './radio'\nimport { useRadio } from './use-radio'\n\ndefineOptions({\n name: 'ElRadio',\n})\n\nconst props = defineProps(radioProps)\nconst emit = defineEmits(radioEmits)\n\nconst ns = useNamespace('radio')\nconst { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } =\n useRadio(props, emit)\n\nfunction handleChange() {\n nextTick(() => emit('change', modelValue.value))\n}\n</script>\n"],"names":[],"mappings":";;;;;;mCAgDc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,QAAU,EAAA,UAAA,EAAY,KAAO,EAAA,IAAA,EAAM,QAAU,EAAA,UAAA,EAAY,WAAY,EAAA,GAC3E,QAAS,CAAA,KAAA,EAAO,IAAI,CAAA,CAAA;AAEtB,IAAA,SAAS,YAAe,GAAA;AACtB,MAAA,QAAA,CAAS,MAAM,IAAA,CAAK,QAAU,EAAA,UAAA,CAAW,KAAK,CAAC,CAAA,CAAA;AAAA,KACjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import Tooltip from './src/tooltip2.mjs';
|
2
2
|
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './src/tooltip.mjs';
|
3
|
-
export { useTooltipTriggerProps } from './src/
|
3
|
+
export { useTooltipTriggerProps } from './src/trigger2.mjs';
|
4
4
|
export { useTooltipContentProps } from './src/content.mjs';
|
5
5
|
export { TOOLTIP_INJECTION_KEY } from './src/constants.mjs';
|
6
6
|
import { withInstall } from '../../utils/vue/install.mjs';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useTooltipContentProps } from './content.mjs';
|
2
|
-
import { useTooltipTriggerProps } from './
|
2
|
+
import { useTooltipTriggerProps } from './trigger2.mjs';
|
3
3
|
import { popperProps } from '../../popper/src/popper.mjs';
|
4
4
|
import { popperArrowProps } from '../../popper/src/arrow.mjs';
|
5
5
|
import { createModelToggleComposable } from '../../../hooks/use-model-toggle/index.mjs';
|
@@ -2,7 +2,7 @@ import { defineComponent, ref, toRef, computed, provide, readonly, unref, watch,
|
|
2
2
|
import { ElPopper } from '../../popper/index.mjs';
|
3
3
|
import { TOOLTIP_INJECTION_KEY } from './constants.mjs';
|
4
4
|
import { useTooltipProps, tooltipEmits, useTooltipModelToggle } from './tooltip.mjs';
|
5
|
-
import ElTooltipTrigger from './
|
5
|
+
import ElTooltipTrigger from './trigger.mjs';
|
6
6
|
import ElTooltipContent from './content2.mjs';
|
7
7
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
8
8
|
import { usePopperContainer } from '../../../hooks/use-popper-container/index.mjs';
|
@@ -1,19 +1,77 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
import {
|
1
|
+
import { defineComponent, inject, ref, toRef, openBlock, createBlock, unref, normalizeClass, withCtx, renderSlot } from 'vue';
|
2
|
+
import '../../popper/index.mjs';
|
3
|
+
import { TOOLTIP_INJECTION_KEY } from './constants.mjs';
|
4
|
+
import { useTooltipTriggerProps } from './trigger2.mjs';
|
5
|
+
import { whenTrigger } from './utils.mjs';
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
7
|
+
import ElPopperTrigger from '../../popper/src/trigger2.mjs';
|
8
|
+
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
9
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
4
10
|
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
const __default__ = defineComponent({
|
12
|
+
name: "ElTooltipTrigger"
|
13
|
+
});
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
15
|
+
...__default__,
|
16
|
+
props: useTooltipTriggerProps,
|
17
|
+
setup(__props, { expose }) {
|
18
|
+
const props = __props;
|
19
|
+
const ns = useNamespace("tooltip");
|
20
|
+
const { controlled, id, open, onOpen, onClose, onToggle } = inject(TOOLTIP_INJECTION_KEY, void 0);
|
21
|
+
const triggerRef = ref(null);
|
22
|
+
const stopWhenControlledOrDisabled = () => {
|
23
|
+
if (unref(controlled) || props.disabled) {
|
24
|
+
return true;
|
25
|
+
}
|
26
|
+
};
|
27
|
+
const trigger = toRef(props, "trigger");
|
28
|
+
const onMouseenter = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onOpen));
|
29
|
+
const onMouseleave = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onClose));
|
30
|
+
const onClick = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "click", (e) => {
|
31
|
+
if (e.button === 0) {
|
32
|
+
onToggle(e);
|
33
|
+
}
|
34
|
+
}));
|
35
|
+
const onFocus = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onOpen));
|
36
|
+
const onBlur = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onClose));
|
37
|
+
const onContextMenu = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "contextmenu", (e) => {
|
38
|
+
e.preventDefault();
|
39
|
+
onToggle(e);
|
40
|
+
}));
|
41
|
+
const onKeydown = composeEventHandlers(stopWhenControlledOrDisabled, (e) => {
|
42
|
+
const { code } = e;
|
43
|
+
if (props.triggerKeys.includes(code)) {
|
44
|
+
e.preventDefault();
|
45
|
+
onToggle(e);
|
46
|
+
}
|
47
|
+
});
|
48
|
+
expose({
|
49
|
+
triggerRef
|
50
|
+
});
|
51
|
+
return (_ctx, _cache) => {
|
52
|
+
return openBlock(), createBlock(unref(ElPopperTrigger), {
|
53
|
+
id: unref(id),
|
54
|
+
"virtual-ref": _ctx.virtualRef,
|
55
|
+
open: unref(open),
|
56
|
+
"virtual-triggering": _ctx.virtualTriggering,
|
57
|
+
class: normalizeClass(unref(ns).e("trigger")),
|
58
|
+
onBlur: unref(onBlur),
|
59
|
+
onClick: unref(onClick),
|
60
|
+
onContextmenu: unref(onContextMenu),
|
61
|
+
onFocus: unref(onFocus),
|
62
|
+
onMouseenter: unref(onMouseenter),
|
63
|
+
onMouseleave: unref(onMouseleave),
|
64
|
+
onKeydown: unref(onKeydown)
|
65
|
+
}, {
|
66
|
+
default: withCtx(() => [
|
67
|
+
renderSlot(_ctx.$slots, "default")
|
68
|
+
]),
|
69
|
+
_: 3
|
70
|
+
}, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]);
|
71
|
+
};
|
15
72
|
}
|
16
73
|
});
|
74
|
+
var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "trigger.vue"]]);
|
17
75
|
|
18
|
-
export {
|
76
|
+
export { ElTooltipTrigger as default };
|
19
77
|
//# sourceMappingURL=trigger.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"trigger.mjs","sources":["../../../../../../packages/components/tooltip/src/trigger.
|
1
|
+
{"version":3,"file":"trigger.mjs","sources":["../../../../../../packages/components/tooltip/src/trigger.vue"],"sourcesContent":["<template>\n <el-popper-trigger\n :id=\"id\"\n :virtual-ref=\"virtualRef\"\n :open=\"open\"\n :virtual-triggering=\"virtualTriggering\"\n :class=\"ns.e('trigger')\"\n @blur=\"onBlur\"\n @click=\"onClick\"\n @contextmenu=\"onContextMenu\"\n @focus=\"onFocus\"\n @mouseenter=\"onMouseenter\"\n @mouseleave=\"onMouseleave\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </el-popper-trigger>\n</template>\n<script lang=\"ts\" setup>\nimport { inject, ref, toRef, unref } from 'vue'\nimport { ElPopperTrigger } from '@element-plus/components/popper'\nimport { composeEventHandlers } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { TOOLTIP_INJECTION_KEY } from './constants'\nimport { useTooltipTriggerProps } from './trigger'\nimport { whenTrigger } from './utils'\nimport type { OnlyChildExpose } from '@element-plus/components/slot'\n\ndefineOptions({\n name: 'ElTooltipTrigger',\n})\n\nconst props = defineProps(useTooltipTriggerProps)\n\nconst ns = useNamespace('tooltip')\nconst { controlled, id, open, onOpen, onClose, onToggle } = inject(\n TOOLTIP_INJECTION_KEY,\n undefined\n)!\n\nconst triggerRef = ref<OnlyChildExpose | null>(null)\n\nconst stopWhenControlledOrDisabled = () => {\n if (unref(controlled) || props.disabled) {\n return true\n }\n}\nconst trigger = toRef(props, 'trigger')\nconst onMouseenter = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'hover', onOpen)\n)\nconst onMouseleave = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'hover', onClose)\n)\nconst onClick = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'click', (e) => {\n // distinguish left click\n if ((e as MouseEvent).button === 0) {\n onToggle(e)\n }\n })\n)\n\nconst onFocus = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'focus', onOpen)\n)\n\nconst onBlur = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'focus', onClose)\n)\n\nconst onContextMenu = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'contextmenu', (e: Event) => {\n e.preventDefault()\n onToggle(e)\n })\n)\n\nconst onKeydown = composeEventHandlers(\n stopWhenControlledOrDisabled,\n (e: KeyboardEvent) => {\n const { code } = e\n if (props.triggerKeys.includes(code)) {\n e.preventDefault()\n onToggle(e)\n }\n }\n)\n\ndefineExpose({\n /**\n * @description trigger element\n */\n triggerRef,\n})\n</script>\n"],"names":["_openBlock","_createBlock","_unref","_normalizeClass","_withCtx","_renderSlot"],"mappings":"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"}
|
@@ -1,77 +1,19 @@
|
|
1
|
-
import {
|
2
|
-
import '
|
3
|
-
import {
|
4
|
-
import { useTooltipTriggerProps } from './trigger.mjs';
|
5
|
-
import { whenTrigger } from './utils.mjs';
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
7
|
-
import ElPopperTrigger from '../../popper/src/trigger2.mjs';
|
8
|
-
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
9
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
1
|
+
import { popperTriggerProps } from '../../popper/src/trigger.mjs';
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
3
|
+
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
10
4
|
|
11
|
-
const
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
const triggerRef = ref(null);
|
22
|
-
const stopWhenControlledOrDisabled = () => {
|
23
|
-
if (unref(controlled) || props.disabled) {
|
24
|
-
return true;
|
25
|
-
}
|
26
|
-
};
|
27
|
-
const trigger = toRef(props, "trigger");
|
28
|
-
const onMouseenter = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onOpen));
|
29
|
-
const onMouseleave = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onClose));
|
30
|
-
const onClick = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "click", (e) => {
|
31
|
-
if (e.button === 0) {
|
32
|
-
onToggle(e);
|
33
|
-
}
|
34
|
-
}));
|
35
|
-
const onFocus = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onOpen));
|
36
|
-
const onBlur = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onClose));
|
37
|
-
const onContextMenu = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "contextmenu", (e) => {
|
38
|
-
e.preventDefault();
|
39
|
-
onToggle(e);
|
40
|
-
}));
|
41
|
-
const onKeydown = composeEventHandlers(stopWhenControlledOrDisabled, (e) => {
|
42
|
-
const { code } = e;
|
43
|
-
if (props.triggerKeys.includes(code)) {
|
44
|
-
e.preventDefault();
|
45
|
-
onToggle(e);
|
46
|
-
}
|
47
|
-
});
|
48
|
-
expose({
|
49
|
-
triggerRef
|
50
|
-
});
|
51
|
-
return (_ctx, _cache) => {
|
52
|
-
return openBlock(), createBlock(unref(ElPopperTrigger), {
|
53
|
-
id: unref(id),
|
54
|
-
"virtual-ref": _ctx.virtualRef,
|
55
|
-
open: unref(open),
|
56
|
-
"virtual-triggering": _ctx.virtualTriggering,
|
57
|
-
class: normalizeClass(unref(ns).e("trigger")),
|
58
|
-
onBlur: unref(onBlur),
|
59
|
-
onClick: unref(onClick),
|
60
|
-
onContextmenu: unref(onContextMenu),
|
61
|
-
onFocus: unref(onFocus),
|
62
|
-
onMouseenter: unref(onMouseenter),
|
63
|
-
onMouseleave: unref(onMouseleave),
|
64
|
-
onKeydown: unref(onKeydown)
|
65
|
-
}, {
|
66
|
-
default: withCtx(() => [
|
67
|
-
renderSlot(_ctx.$slots, "default")
|
68
|
-
]),
|
69
|
-
_: 3
|
70
|
-
}, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]);
|
71
|
-
};
|
5
|
+
const useTooltipTriggerProps = buildProps({
|
6
|
+
...popperTriggerProps,
|
7
|
+
disabled: Boolean,
|
8
|
+
trigger: {
|
9
|
+
type: definePropType([String, Array]),
|
10
|
+
default: "hover"
|
11
|
+
},
|
12
|
+
triggerKeys: {
|
13
|
+
type: definePropType(Array),
|
14
|
+
default: () => [EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space]
|
72
15
|
}
|
73
16
|
});
|
74
|
-
var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "trigger.vue"]]);
|
75
17
|
|
76
|
-
export {
|
18
|
+
export { useTooltipTriggerProps };
|
77
19
|
//# sourceMappingURL=trigger2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"trigger2.mjs","sources":["../../../../../../packages/components/tooltip/src/trigger.
|
1
|
+
{"version":3,"file":"trigger2.mjs","sources":["../../../../../../packages/components/tooltip/src/trigger.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperTriggerProps } from '@element-plus/components/popper'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type TooltipTriggerType = 'hover' | 'focus' | 'click' | 'contextmenu'\n\nexport const useTooltipTriggerProps = buildProps({\n ...popperTriggerProps,\n /**\n * @description whether Tooltip is disabled\n */\n disabled: Boolean,\n /**\n * @description How should the tooltip be triggered (to show)\n */\n trigger: {\n type: definePropType<Arrayable<TooltipTriggerType>>([String, Array]),\n default: 'hover',\n },\n /**\n * @description When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of tooltip through the keyboard\n */\n triggerKeys: {\n type: definePropType<string[]>(Array),\n default: () => [EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space],\n },\n} as const)\n\nexport type ElTooltipTriggerProps = ExtractPropTypes<\n typeof useTooltipTriggerProps\n>\n"],"names":[],"mappings":";;;;AAGY,MAAC,sBAAsB,GAAG,UAAU,CAAC;AACjD,EAAE,GAAG,kBAAkB;AACvB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,CAAC;AAC/E,GAAG;AACH,CAAC;;;;"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { getCurrentInstance, shallowRef, ref, watch, onMounted } from 'vue';
|
2
2
|
import { useEventListener } from '@vueuse/core';
|
3
|
-
import { isFunction } from '@vue/shared';
|
4
3
|
import { isElement } from '../../utils/types.mjs';
|
4
|
+
import { isFunction } from '@vue/shared';
|
5
5
|
|
6
6
|
function useFocusController(target, {
|
7
7
|
beforeFocus,
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { isRef, computed, watch, onScopeDispose } from 'vue';
|
2
2
|
import { useNamespace } from '../use-namespace/index.mjs';
|
3
3
|
import { throwError } from '../../utils/error.mjs';
|
4
|
+
import { isClient } from '@vueuse/core';
|
4
5
|
import { hasClass, getStyle, addClass, removeClass } from '../../utils/dom/style.mjs';
|
5
6
|
import { getScrollBarWidth } from '../../utils/dom/scroll.mjs';
|
6
|
-
import { isClient } from '@vueuse/core';
|
7
7
|
|
8
8
|
const useLockscreen = (trigger, options = {}) => {
|
9
9
|
if (!isRef(trigger)) {
|
package/es/index.mjs
CHANGED
@@ -10,7 +10,7 @@ export { autocompleteEmits, autocompleteProps } from './components/autocomplete/
|
|
10
10
|
export { ElAutocomplete } from './components/autocomplete/index.mjs';
|
11
11
|
export { avatarEmits, avatarProps } from './components/avatar/src/avatar.mjs';
|
12
12
|
export { ElAvatar } from './components/avatar/index.mjs';
|
13
|
-
export { backtopEmits, backtopProps } from './components/backtop/src/
|
13
|
+
export { backtopEmits, backtopProps } from './components/backtop/src/backtop.mjs';
|
14
14
|
export { ElBacktop } from './components/backtop/index.mjs';
|
15
15
|
export { badgeProps } from './components/badge/src/badge.mjs';
|
16
16
|
export { ElBadge } from './components/badge/index.mjs';
|
@@ -121,7 +121,7 @@ export { default as ElPopperContent } from './components/popper/src/content2.mjs
|
|
121
121
|
export { ElPopper } from './components/popper/index.mjs';
|
122
122
|
export { progressProps } from './components/progress/src/progress.mjs';
|
123
123
|
export { ElProgress } from './components/progress/index.mjs';
|
124
|
-
export { radioEmits, radioProps, radioPropsBase } from './components/radio/src/
|
124
|
+
export { radioEmits, radioProps, radioPropsBase } from './components/radio/src/radio.mjs';
|
125
125
|
export { radioGroupEmits, radioGroupProps } from './components/radio/src/radio-group.mjs';
|
126
126
|
export { radioButtonProps } from './components/radio/src/radio-button.mjs';
|
127
127
|
export { radioGroupKey } from './components/radio/src/constants.mjs';
|
@@ -188,7 +188,7 @@ export { ElTimeSelect } from './components/time-select/index.mjs';
|
|
188
188
|
export { timelineItemProps } from './components/timeline/src/timeline-item.mjs';
|
189
189
|
export { ElTimeline, ElTimelineItem } from './components/timeline/index.mjs';
|
190
190
|
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './components/tooltip/src/tooltip.mjs';
|
191
|
-
export { useTooltipTriggerProps } from './components/tooltip/src/
|
191
|
+
export { useTooltipTriggerProps } from './components/tooltip/src/trigger2.mjs';
|
192
192
|
export { useTooltipContentProps } from './components/tooltip/src/content.mjs';
|
193
193
|
export { TOOLTIP_INJECTION_KEY } from './components/tooltip/src/constants.mjs';
|
194
194
|
export { ElTooltip } from './components/tooltip/index.mjs';
|
@@ -229,7 +229,7 @@ export { ElMessage } from './components/message/index.mjs';
|
|
229
229
|
export { ElMessageBox } from './components/message-box/index.mjs';
|
230
230
|
export { notificationEmits, notificationProps, notificationTypes } from './components/notification/src/notification.mjs';
|
231
231
|
export { ElNotification } from './components/notification/index.mjs';
|
232
|
-
export { popoverEmits, popoverProps } from './components/popover/src/
|
232
|
+
export { popoverEmits, popoverProps } from './components/popover/src/popover.mjs';
|
233
233
|
export { ElPopover, ElPopoverDirective } from './components/popover/index.mjs';
|
234
234
|
export { EVENT_CODE } from './constants/aria.mjs';
|
235
235
|
export { WEEK_DAYS, datePickTypes } from './constants/date.mjs';
|
package/es/version.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const version = "0.0.
|
1
|
+
export declare const version = "0.0.20241206";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20241206'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|