@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
@@ -2,118 +2,73 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var
|
8
|
-
var
|
9
|
-
var
|
10
|
-
var style = require('../../../utils/dom/style.js');
|
5
|
+
var dropdown = require('../../dropdown/src/dropdown.js');
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
7
|
+
var trigger = require('../../tooltip/src/trigger2.js');
|
8
|
+
var content = require('../../tooltip/src/content.js');
|
9
|
+
var types = require('../../../utils/types.js');
|
11
10
|
|
12
|
-
const
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
popperRef,
|
64
|
-
hide
|
65
|
-
});
|
66
|
-
return (_ctx, _cache) => {
|
67
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$1.ElTooltip), vue.mergeProps({
|
68
|
-
ref_key: "tooltipRef",
|
69
|
-
ref: tooltipRef
|
70
|
-
}, _ctx.$attrs, {
|
71
|
-
trigger: _ctx.trigger,
|
72
|
-
placement: _ctx.placement,
|
73
|
-
disabled: _ctx.disabled,
|
74
|
-
visible: _ctx.visible,
|
75
|
-
transition: _ctx.transition,
|
76
|
-
"popper-options": _ctx.popperOptions,
|
77
|
-
tabindex: _ctx.tabindex,
|
78
|
-
content: _ctx.content,
|
79
|
-
offset: _ctx.offset,
|
80
|
-
"show-after": _ctx.showAfter,
|
81
|
-
"hide-after": _ctx.hideAfter,
|
82
|
-
"auto-close": _ctx.autoClose,
|
83
|
-
"show-arrow": _ctx.showArrow,
|
84
|
-
"aria-label": _ctx.title,
|
85
|
-
effect: _ctx.effect,
|
86
|
-
enterable: _ctx.enterable,
|
87
|
-
"popper-class": vue.unref(kls),
|
88
|
-
"popper-style": vue.unref(style$1),
|
89
|
-
teleported: _ctx.teleported,
|
90
|
-
persistent: _ctx.persistent,
|
91
|
-
"gpu-acceleration": vue.unref(gpuAcceleration),
|
92
|
-
"onUpdate:visible": vue.unref(onUpdateVisible),
|
93
|
-
onBeforeShow: beforeEnter,
|
94
|
-
onBeforeHide: beforeLeave,
|
95
|
-
onShow: afterEnter,
|
96
|
-
onHide: afterLeave
|
97
|
-
}), {
|
98
|
-
content: vue.withCtx(() => [
|
99
|
-
_ctx.title ? (vue.openBlock(), vue.createElementBlock("div", {
|
100
|
-
key: 0,
|
101
|
-
class: vue.normalizeClass(vue.unref(ns).e("title")),
|
102
|
-
role: "title"
|
103
|
-
}, vue.toDisplayString(_ctx.title), 3)) : vue.createCommentVNode("v-if", true),
|
104
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
105
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.content), 1)
|
106
|
-
])
|
107
|
-
]),
|
108
|
-
default: vue.withCtx(() => [
|
109
|
-
_ctx.$slots.reference ? vue.renderSlot(_ctx.$slots, "reference", { key: 0 }) : vue.createCommentVNode("v-if", true)
|
110
|
-
]),
|
111
|
-
_: 3
|
112
|
-
}, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"]);
|
113
|
-
};
|
11
|
+
const popoverProps = runtime.buildProps({
|
12
|
+
trigger: trigger.useTooltipTriggerProps.trigger,
|
13
|
+
placement: dropdown.dropdownProps.placement,
|
14
|
+
disabled: trigger.useTooltipTriggerProps.disabled,
|
15
|
+
visible: content.useTooltipContentProps.visible,
|
16
|
+
transition: content.useTooltipContentProps.transition,
|
17
|
+
popperOptions: dropdown.dropdownProps.popperOptions,
|
18
|
+
tabindex: dropdown.dropdownProps.tabindex,
|
19
|
+
content: content.useTooltipContentProps.content,
|
20
|
+
popperStyle: content.useTooltipContentProps.popperStyle,
|
21
|
+
popperClass: content.useTooltipContentProps.popperClass,
|
22
|
+
enterable: {
|
23
|
+
...content.useTooltipContentProps.enterable,
|
24
|
+
default: true
|
25
|
+
},
|
26
|
+
effect: {
|
27
|
+
...content.useTooltipContentProps.effect,
|
28
|
+
default: "light"
|
29
|
+
},
|
30
|
+
teleported: content.useTooltipContentProps.teleported,
|
31
|
+
title: String,
|
32
|
+
width: {
|
33
|
+
type: [String, Number],
|
34
|
+
default: 150
|
35
|
+
},
|
36
|
+
offset: {
|
37
|
+
type: Number,
|
38
|
+
default: void 0
|
39
|
+
},
|
40
|
+
showAfter: {
|
41
|
+
type: Number,
|
42
|
+
default: 0
|
43
|
+
},
|
44
|
+
hideAfter: {
|
45
|
+
type: Number,
|
46
|
+
default: 200
|
47
|
+
},
|
48
|
+
autoClose: {
|
49
|
+
type: Number,
|
50
|
+
default: 0
|
51
|
+
},
|
52
|
+
showArrow: {
|
53
|
+
type: Boolean,
|
54
|
+
default: true
|
55
|
+
},
|
56
|
+
persistent: {
|
57
|
+
type: Boolean,
|
58
|
+
default: true
|
59
|
+
},
|
60
|
+
"onUpdate:visible": {
|
61
|
+
type: Function
|
114
62
|
}
|
115
63
|
});
|
116
|
-
|
64
|
+
const popoverEmits = {
|
65
|
+
"update:visible": (value) => types.isBoolean(value),
|
66
|
+
"before-enter": () => true,
|
67
|
+
"before-leave": () => true,
|
68
|
+
"after-enter": () => true,
|
69
|
+
"after-leave": () => true
|
70
|
+
};
|
117
71
|
|
118
|
-
exports
|
72
|
+
exports.popoverEmits = popoverEmits;
|
73
|
+
exports.popoverProps = popoverProps;
|
119
74
|
//# sourceMappingURL=popover.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"popover.js","sources":["../../../../../../packages/components/popover/src/popover.
|
1
|
+
{"version":3,"file":"popover.js","sources":["../../../../../../packages/components/popover/src/popover.ts"],"sourcesContent":["import { buildProps, isBoolean } from '@element-plus/utils'\nimport {\n useTooltipContentProps,\n useTooltipTriggerProps,\n} from '@element-plus/components/tooltip'\nimport { dropdownProps } from '@element-plus/components/dropdown'\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport type Popover from './popover.vue'\n\nexport const popoverProps = buildProps({\n /**\n * @description how the popover is triggered\n */\n trigger: useTooltipTriggerProps.trigger,\n /**\n * @description popover placement\n */\n placement: dropdownProps.placement,\n /**\n * @description whether Popover is disabled\n */\n disabled: useTooltipTriggerProps.disabled,\n /**\n * @description whether popover is visible\n */\n visible: useTooltipContentProps.visible,\n /**\n * @description popover transition animation\n */\n transition: useTooltipContentProps.transition,\n /**\n * @description parameters for [popper.js](https://popper.js.org/docs/v2/)\n */\n popperOptions: dropdownProps.popperOptions,\n /**\n * @description [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of Popover\n */\n tabindex: dropdownProps.tabindex,\n /**\n * @description popover content, can be replaced with a default `slot`\n */\n content: useTooltipContentProps.content,\n /**\n * @description custom style for popover\n */\n popperStyle: useTooltipContentProps.popperStyle,\n /**\n * @description custom class name for popover\n */\n popperClass: useTooltipContentProps.popperClass,\n enterable: {\n ...useTooltipContentProps.enterable,\n default: true,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n ...useTooltipContentProps.effect,\n default: 'light',\n },\n /**\n * @description whether popover dropdown is teleported to the body\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description popover title\n */\n title: String,\n /**\n * @description popover width\n */\n width: {\n type: [String, Number],\n default: 150,\n },\n /**\n * @description popover offset\n */\n offset: {\n type: Number,\n default: undefined,\n },\n /**\n * @description delay of appearance, in millisecond\n */\n showAfter: {\n type: Number,\n default: 0,\n },\n /**\n * @description delay of disappear, in millisecond\n */\n hideAfter: {\n type: Number,\n default: 200,\n },\n /**\n * @description timeout in milliseconds to hide tooltip\n */\n autoClose: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether a tooltip arrow is displayed or not. For more info, please refer to [ElPopper](https://github.com/element-plus/element-plus/tree/dev/packages/components/popper)\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description when popover inactive and `persistent` is `false` , popover will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n 'onUpdate:visible': {\n type: Function as PropType<(visible: boolean) => void>,\n },\n} as const)\nexport type PopoverProps = ExtractPropTypes<typeof popoverProps>\n\nexport const popoverEmits = {\n 'update:visible': (value: boolean) => isBoolean(value),\n 'before-enter': () => true,\n 'before-leave': () => true,\n 'after-enter': () => true,\n 'after-leave': () => true,\n}\nexport type PopoverEmits = typeof popoverEmits\n\nexport type PopoverInstance = InstanceType<typeof Popover>\n"],"names":["buildProps","useTooltipTriggerProps","dropdownProps","useTooltipContentProps","isBoolean"],"mappings":";;;;;;;;;;AAMY,MAAC,YAAY,GAAGA,kBAAU,CAAC;AACvC,EAAE,OAAO,EAAEC,8BAAsB,CAAC,OAAO;AACzC,EAAE,SAAS,EAAEC,sBAAa,CAAC,SAAS;AACpC,EAAE,QAAQ,EAAED,8BAAsB,CAAC,QAAQ;AAC3C,EAAE,OAAO,EAAEE,8BAAsB,CAAC,OAAO;AACzC,EAAE,UAAU,EAAEA,8BAAsB,CAAC,UAAU;AAC/C,EAAE,aAAa,EAAED,sBAAa,CAAC,aAAa;AAC5C,EAAE,QAAQ,EAAEA,sBAAa,CAAC,QAAQ;AAClC,EAAE,OAAO,EAAEC,8BAAsB,CAAC,OAAO;AACzC,EAAE,WAAW,EAAEA,8BAAsB,CAAC,WAAW;AACjD,EAAE,WAAW,EAAEA,8BAAsB,CAAC,WAAW;AACjD,EAAE,SAAS,EAAE;AACb,IAAI,GAAGA,8BAAsB,CAAC,SAAS;AACvC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,GAAGA,8BAAsB,CAAC,MAAM;AACpC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,UAAU,EAAEA,8BAAsB,CAAC,UAAU;AAC/C,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,QAAQ;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,gBAAgB,EAAE,CAAC,KAAK,KAAKC,eAAS,CAAC,KAAK,CAAC;AAC/C,EAAE,cAAc,EAAE,MAAM,IAAI;AAC5B,EAAE,cAAc,EAAE,MAAM,IAAI;AAC5B,EAAE,aAAa,EAAE,MAAM,IAAI;AAC3B,EAAE,aAAa,EAAE,MAAM,IAAI;AAC3B;;;;;"}
|
@@ -2,73 +2,118 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var
|
8
|
-
var
|
9
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var index$1 = require('../../tooltip/index.js');
|
7
|
+
var popover = require('./popover.js');
|
8
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
9
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
10
|
+
var style = require('../../../utils/dom/style.js');
|
10
11
|
|
11
|
-
const
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
12
|
+
const updateEventKeyRaw = `onUpdate:visible`;
|
13
|
+
const __default__ = vue.defineComponent({
|
14
|
+
name: "ElPopover"
|
15
|
+
});
|
16
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
17
|
+
...__default__,
|
18
|
+
props: popover.popoverProps,
|
19
|
+
emits: popover.popoverEmits,
|
20
|
+
setup(__props, { expose, emit }) {
|
21
|
+
const props = __props;
|
22
|
+
const onUpdateVisible = vue.computed(() => {
|
23
|
+
return props[updateEventKeyRaw];
|
24
|
+
});
|
25
|
+
const ns = index.useNamespace("popover");
|
26
|
+
const tooltipRef = vue.ref();
|
27
|
+
const popperRef = vue.computed(() => {
|
28
|
+
var _a;
|
29
|
+
return (_a = vue.unref(tooltipRef)) == null ? void 0 : _a.popperRef;
|
30
|
+
});
|
31
|
+
const style$1 = vue.computed(() => {
|
32
|
+
return [
|
33
|
+
{
|
34
|
+
width: style.addUnit(props.width)
|
35
|
+
},
|
36
|
+
props.popperStyle
|
37
|
+
];
|
38
|
+
});
|
39
|
+
const kls = vue.computed(() => {
|
40
|
+
return [ns.b(), props.popperClass, { [ns.m("plain")]: !!props.content }];
|
41
|
+
});
|
42
|
+
const gpuAcceleration = vue.computed(() => {
|
43
|
+
return props.transition === `${ns.namespace.value}-fade-in-linear`;
|
44
|
+
});
|
45
|
+
const hide = () => {
|
46
|
+
var _a;
|
47
|
+
(_a = tooltipRef.value) == null ? void 0 : _a.hide();
|
48
|
+
};
|
49
|
+
const beforeEnter = () => {
|
50
|
+
emit("before-enter");
|
51
|
+
};
|
52
|
+
const beforeLeave = () => {
|
53
|
+
emit("before-leave");
|
54
|
+
};
|
55
|
+
const afterEnter = () => {
|
56
|
+
emit("after-enter");
|
57
|
+
};
|
58
|
+
const afterLeave = () => {
|
59
|
+
emit("update:visible", false);
|
60
|
+
emit("after-leave");
|
61
|
+
};
|
62
|
+
expose({
|
63
|
+
popperRef,
|
64
|
+
hide
|
65
|
+
});
|
66
|
+
return (_ctx, _cache) => {
|
67
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$1.ElTooltip), vue.mergeProps({
|
68
|
+
ref_key: "tooltipRef",
|
69
|
+
ref: tooltipRef
|
70
|
+
}, _ctx.$attrs, {
|
71
|
+
trigger: _ctx.trigger,
|
72
|
+
placement: _ctx.placement,
|
73
|
+
disabled: _ctx.disabled,
|
74
|
+
visible: _ctx.visible,
|
75
|
+
transition: _ctx.transition,
|
76
|
+
"popper-options": _ctx.popperOptions,
|
77
|
+
tabindex: _ctx.tabindex,
|
78
|
+
content: _ctx.content,
|
79
|
+
offset: _ctx.offset,
|
80
|
+
"show-after": _ctx.showAfter,
|
81
|
+
"hide-after": _ctx.hideAfter,
|
82
|
+
"auto-close": _ctx.autoClose,
|
83
|
+
"show-arrow": _ctx.showArrow,
|
84
|
+
"aria-label": _ctx.title,
|
85
|
+
effect: _ctx.effect,
|
86
|
+
enterable: _ctx.enterable,
|
87
|
+
"popper-class": vue.unref(kls),
|
88
|
+
"popper-style": vue.unref(style$1),
|
89
|
+
teleported: _ctx.teleported,
|
90
|
+
persistent: _ctx.persistent,
|
91
|
+
"gpu-acceleration": vue.unref(gpuAcceleration),
|
92
|
+
"onUpdate:visible": vue.unref(onUpdateVisible),
|
93
|
+
onBeforeShow: beforeEnter,
|
94
|
+
onBeforeHide: beforeLeave,
|
95
|
+
onShow: afterEnter,
|
96
|
+
onHide: afterLeave
|
97
|
+
}), {
|
98
|
+
content: vue.withCtx(() => [
|
99
|
+
_ctx.title ? (vue.openBlock(), vue.createElementBlock("div", {
|
100
|
+
key: 0,
|
101
|
+
class: vue.normalizeClass(vue.unref(ns).e("title")),
|
102
|
+
role: "title"
|
103
|
+
}, vue.toDisplayString(_ctx.title), 3)) : vue.createCommentVNode("v-if", true),
|
104
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
105
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.content), 1)
|
106
|
+
])
|
107
|
+
]),
|
108
|
+
default: vue.withCtx(() => [
|
109
|
+
_ctx.$slots.reference ? vue.renderSlot(_ctx.$slots, "reference", { key: 0 }) : vue.createCommentVNode("v-if", true)
|
110
|
+
]),
|
111
|
+
_: 3
|
112
|
+
}, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"]);
|
113
|
+
};
|
62
114
|
}
|
63
115
|
});
|
64
|
-
|
65
|
-
"update:visible": (value) => types.isBoolean(value),
|
66
|
-
"before-enter": () => true,
|
67
|
-
"before-leave": () => true,
|
68
|
-
"after-enter": () => true,
|
69
|
-
"after-leave": () => true
|
70
|
-
};
|
116
|
+
var Popover = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "popover.vue"]]);
|
71
117
|
|
72
|
-
exports
|
73
|
-
exports.popoverProps = popoverProps;
|
118
|
+
exports["default"] = Popover;
|
74
119
|
//# sourceMappingURL=popover2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"popover2.js","sources":["../../../../../../packages/components/popover/src/popover.
|
1
|
+
{"version":3,"file":"popover2.js","sources":["../../../../../../packages/components/popover/src/popover.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltipRef\"\n v-bind=\"$attrs\"\n :trigger=\"trigger\"\n :placement=\"placement\"\n :disabled=\"disabled\"\n :visible=\"visible\"\n :transition=\"transition\"\n :popper-options=\"popperOptions\"\n :tabindex=\"tabindex\"\n :content=\"content\"\n :offset=\"offset\"\n :show-after=\"showAfter\"\n :hide-after=\"hideAfter\"\n :auto-close=\"autoClose\"\n :show-arrow=\"showArrow\"\n :aria-label=\"title\"\n :effect=\"effect\"\n :enterable=\"enterable\"\n :popper-class=\"kls\"\n :popper-style=\"style\"\n :teleported=\"teleported\"\n :persistent=\"persistent\"\n :gpu-acceleration=\"gpuAcceleration\"\n @update:visible=\"onUpdateVisible\"\n @before-show=\"beforeEnter\"\n @before-hide=\"beforeLeave\"\n @show=\"afterEnter\"\n @hide=\"afterLeave\"\n >\n <template v-if=\"$slots.reference\">\n <slot name=\"reference\" />\n </template>\n\n <template #content>\n <div v-if=\"title\" :class=\"ns.e('title')\" role=\"title\">\n {{ title }}\n </div>\n <slot>\n {{ content }}\n </slot>\n </template>\n </el-tooltip>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, ref, unref } from 'vue'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { addUnit } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { popoverEmits, popoverProps } from './popover'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\ndefineOptions({\n name: 'ElPopover',\n})\n\nconst props = defineProps(popoverProps)\nconst emit = defineEmits(popoverEmits)\n\nconst updateEventKeyRaw = `onUpdate:visible` as const\n\nconst onUpdateVisible = computed(() => {\n return props[updateEventKeyRaw]\n})\n\nconst ns = useNamespace('popover')\nconst tooltipRef = ref<TooltipInstance>()\nconst popperRef = computed(() => {\n return unref(tooltipRef)?.popperRef\n})\n\nconst style = computed(() => {\n return [\n {\n width: addUnit(props.width),\n },\n props.popperStyle!,\n ]\n})\n\nconst kls = computed(() => {\n return [ns.b(), props.popperClass!, { [ns.m('plain')]: !!props.content }]\n})\n\nconst gpuAcceleration = computed(() => {\n return props.transition === `${ns.namespace.value}-fade-in-linear`\n})\n\nconst hide = () => {\n tooltipRef.value?.hide()\n}\n\nconst beforeEnter = () => {\n emit('before-enter')\n}\nconst beforeLeave = () => {\n emit('before-leave')\n}\n\nconst afterEnter = () => {\n emit('after-enter')\n}\n\nconst afterLeave = () => {\n emit('update:visible', false)\n emit('after-leave')\n}\n\ndefineExpose({\n /** @description popper ref */\n popperRef,\n /** @description hide popover */\n hide,\n})\n</script>\n"],"names":["computed","useNamespace","ref","unref","style","addUnit"],"mappings":";;;;;;;;;;;;uCAqDc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR;;;;;;;AAOA,IAAM,MAAA,eAAA,GAAkBA,aAAS,MAAM;AACrC,MAAA,OAAO,MAAM,iBAAiB,CAAA,CAAA;AAAA,KAC/B,CAAA,CAAA;AAED,IAAM,MAAA,EAAA,GAAKC,mBAAa,SAAS,CAAA,CAAA;AACjC,IAAA,MAAM,aAAaC,OAAqB,EAAA,CAAA;AACxC,IAAM,MAAA,SAAA,GAAYF,aAAS,MAAM;AAC/B,MAAO,IAAA,EAAA,CAAA;AAAmB,MAC3B,OAAA,CAAA,EAAA,GAAAG,SAAA,CAAA,UAAA,CAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,CAAA;AAED,KAAM,CAAA,CAAA;AACJ,IAAO,MAAAC,OAAA,GAAAJ,YAAA,CAAA,MAAA;AAAA,MACL,OAAA;AAAA,QACE;AAA0B,UAC5B,KAAA,EAAAK,aAAA,CAAA,KAAA,CAAA,KAAA,CAAA;AAAA,SACM;AAAA,QACR,KAAA,CAAA,WAAA;AAAA,OACD,CAAA;AAED,KAAM,CAAA,CAAA;AACJ,IAAA,MAAA,GAAO,GAAIL,YAAK,CAAA;AAAwD,MACzE,OAAA,CAAA,EAAA,CAAA,CAAA,EAAA,EAAA,KAAA,CAAA,WAAA,EAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,KAAA,CAAA,OAAA,EAAA,CAAA,CAAA;AAED,KAAM,CAAA,CAAA;AACJ,IAAA,MAAA,eAAa,GAAAA,YAAkB,CAAA;AAAkB,MAClD,OAAA,KAAA,CAAA,UAAA,KAAA,CAAA,EAAA,EAAA,CAAA,SAAA,CAAA,KAAA,CAAA,eAAA,CAAA,CAAA;AAED,KAAA,CAAA,CAAA;AACE,IAAA,MAAA,IAAA,GAAW;AAAY,MACzB,IAAA,EAAA,CAAA;AAEA,MAAA,CAAA,EAAA,mBAA0B,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,EAAA,CAAA;AACxB,KAAA,CAAA;AAAmB,IACrB,MAAA,WAAA,GAAA,MAAA;AACA,MAAA,IAAM,eAAoB,CAAA,CAAA;AACxB,KAAA,CAAA;AAAmB,IACrB,MAAA,WAAA,GAAA,MAAA;AAEA,MAAA,IAAM,eAAmB,CAAA,CAAA;AACvB,KAAA,CAAA;AAAkB,IACpB,MAAA,UAAA,GAAA,MAAA;AAEA,MAAA,IAAM,cAAmB,CAAA,CAAA;AACvB,KAAA,CAAA;AACA,IAAA,MAAA,UAAkB,GAAA,MAAA;AAAA,MACpB,IAAA,CAAA,gBAAA,EAAA,KAAA,CAAA,CAAA;AAEA,MAAa,IAAA,CAAA,aAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,IAEX,MAAA,CAAA;AAAA,MAAA,SAAA;AAAA,MAEA,IAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var radio$1 = require('./src/
|
5
|
+
var radio$1 = require('./src/radio2.js');
|
6
6
|
var radioButton$1 = require('./src/radio-button2.js');
|
7
7
|
var radioGroup$1 = require('./src/radio-group2.js');
|
8
|
-
var radio = require('./src/
|
8
|
+
var radio = require('./src/radio.js');
|
9
9
|
var radioGroup = require('./src/radio-group.js');
|
10
10
|
var radioButton = require('./src/radio-button.js');
|
11
11
|
var constants = require('./src/constants.js');
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var radio = require('./
|
5
|
+
var radio = require('./radio.js');
|
6
6
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
7
7
|
var index = require('../../../hooks/use-size/index.js');
|
8
8
|
var index$1 = require('../../../hooks/use-aria/index.js');
|
@@ -2,81 +2,42 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var
|
8
|
-
var
|
9
|
-
var
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
6
|
+
var index = require('../../../hooks/use-size/index.js');
|
7
|
+
var event = require('../../../constants/event.js');
|
8
|
+
var shared = require('@vue/shared');
|
9
|
+
var types = require('../../../utils/types.js');
|
10
10
|
|
11
|
-
const
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
vue.unref(ns).b(),
|
30
|
-
vue.unref(ns).is("disabled", vue.unref(disabled)),
|
31
|
-
vue.unref(ns).is("focus", vue.unref(focus)),
|
32
|
-
vue.unref(ns).is("bordered", _ctx.border),
|
33
|
-
vue.unref(ns).is("checked", vue.unref(modelValue) === vue.unref(actualValue)),
|
34
|
-
vue.unref(ns).m(vue.unref(size))
|
35
|
-
])
|
36
|
-
}, [
|
37
|
-
vue.createElementVNode("span", {
|
38
|
-
class: vue.normalizeClass([
|
39
|
-
vue.unref(ns).e("input"),
|
40
|
-
vue.unref(ns).is("disabled", vue.unref(disabled)),
|
41
|
-
vue.unref(ns).is("checked", vue.unref(modelValue) === vue.unref(actualValue))
|
42
|
-
])
|
43
|
-
}, [
|
44
|
-
vue.withDirectives(vue.createElementVNode("input", {
|
45
|
-
ref_key: "radioRef",
|
46
|
-
ref: radioRef,
|
47
|
-
"onUpdate:modelValue": ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null,
|
48
|
-
class: vue.normalizeClass(vue.unref(ns).e("original")),
|
49
|
-
value: vue.unref(actualValue),
|
50
|
-
name: _ctx.name || ((_a = vue.unref(radioGroup)) == null ? void 0 : _a.name),
|
51
|
-
disabled: vue.unref(disabled),
|
52
|
-
checked: vue.unref(modelValue) === vue.unref(actualValue),
|
53
|
-
type: "radio",
|
54
|
-
onFocus: ($event) => focus.value = true,
|
55
|
-
onBlur: ($event) => focus.value = false,
|
56
|
-
onChange: handleChange,
|
57
|
-
onClick: vue.withModifiers(() => {
|
58
|
-
}, ["stop"])
|
59
|
-
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
|
60
|
-
[vue.vModelRadio, vue.unref(modelValue)]
|
61
|
-
]),
|
62
|
-
vue.createElementVNode("span", {
|
63
|
-
class: vue.normalizeClass(vue.unref(ns).e("inner"))
|
64
|
-
}, null, 2)
|
65
|
-
], 2),
|
66
|
-
vue.createElementVNode("span", {
|
67
|
-
class: vue.normalizeClass(vue.unref(ns).e("label")),
|
68
|
-
onKeydown: vue.withModifiers(() => {
|
69
|
-
}, ["stop"])
|
70
|
-
}, [
|
71
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
72
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
|
73
|
-
])
|
74
|
-
], 42, ["onKeydown"])
|
75
|
-
], 2);
|
76
|
-
};
|
11
|
+
const radioPropsBase = runtime.buildProps({
|
12
|
+
modelValue: {
|
13
|
+
type: [String, Number, Boolean],
|
14
|
+
default: void 0
|
15
|
+
},
|
16
|
+
size: index.useSizeProp,
|
17
|
+
disabled: Boolean,
|
18
|
+
label: {
|
19
|
+
type: [String, Number, Boolean],
|
20
|
+
default: void 0
|
21
|
+
},
|
22
|
+
value: {
|
23
|
+
type: [String, Number, Boolean],
|
24
|
+
default: void 0
|
25
|
+
},
|
26
|
+
name: {
|
27
|
+
type: String,
|
28
|
+
default: void 0
|
77
29
|
}
|
78
30
|
});
|
79
|
-
|
31
|
+
const radioProps = runtime.buildProps({
|
32
|
+
...radioPropsBase,
|
33
|
+
border: Boolean
|
34
|
+
});
|
35
|
+
const radioEmits = {
|
36
|
+
[event.UPDATE_MODEL_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val),
|
37
|
+
[event.CHANGE_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val)
|
38
|
+
};
|
80
39
|
|
81
|
-
exports
|
40
|
+
exports.radioEmits = radioEmits;
|
41
|
+
exports.radioProps = radioProps;
|
42
|
+
exports.radioPropsBase = radioPropsBase;
|
82
43
|
//# sourceMappingURL=radio.js.map
|