@element-plus/nightly 0.0.20240329 → 0.0.20240401
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/index.full.js +2 -2
- 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 +2 -2
- 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/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/index.mjs +2 -2
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +67 -149
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +149 -67
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/scrollbar/src/bar.mjs +11 -64
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +64 -11
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +152 -69
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +69 -152
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/index.mjs +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/index.js +2 -2
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +68 -148
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +148 -68
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/scrollbar/src/bar.js +11 -64
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +64 -11
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +151 -69
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +69 -151
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1,158 +1,75 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, toRef, watch, useSlots, provide, openBlock, createElementBlock, Fragment, createBlock, Teleport, createElementVNode, mergeProps, unref, createVNode, normalizeStyle, withCtx, renderSlot, createCommentVNode } from 'vue';
|
|
2
|
-
import { useVModel } from '@vueuse/core';
|
|
3
|
-
import '../../../hooks/index.mjs';
|
|
4
1
|
import '../../../utils/index.mjs';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
12
|
-
import { isBoolean } from '../../../utils/types.mjs';
|
|
13
|
-
import { useZIndex } from '../../../hooks/use-z-index/index.mjs';
|
|
2
|
+
import '../../../constants/index.mjs';
|
|
3
|
+
import { tourContentProps } from './content.mjs';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
6
|
+
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
7
|
+
import { isBoolean, isNumber } from '../../../utils/types.mjs';
|
|
14
8
|
|
|
15
|
-
const
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const { mergedPosInfo: pos, triggerTarget } = useTarget(currentTarget, toRef(props, "modelValue"), toRef(props, "gap"), mergedMask, mergedScrollIntoViewOptions);
|
|
71
|
-
watch(() => props.modelValue, (val) => {
|
|
72
|
-
if (!val) {
|
|
73
|
-
current.value = 0;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const onEscClose = () => {
|
|
77
|
-
if (props.closeOnPressEscape) {
|
|
78
|
-
emit("update:modelValue", false);
|
|
79
|
-
emit("close", current.value);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const onUpdateTotal = (val) => {
|
|
83
|
-
total.value = val;
|
|
84
|
-
};
|
|
85
|
-
const slots = useSlots();
|
|
86
|
-
provide(tourKey, {
|
|
87
|
-
currentStep,
|
|
88
|
-
current,
|
|
89
|
-
total,
|
|
90
|
-
showClose: toRef(props, "showClose"),
|
|
91
|
-
closeIcon: toRef(props, "closeIcon"),
|
|
92
|
-
mergedType,
|
|
93
|
-
ns,
|
|
94
|
-
slots,
|
|
95
|
-
updateModelValue(modelValue) {
|
|
96
|
-
emit("update:modelValue", modelValue);
|
|
97
|
-
},
|
|
98
|
-
onClose() {
|
|
99
|
-
emit("close", current.value);
|
|
100
|
-
},
|
|
101
|
-
onFinish() {
|
|
102
|
-
emit("finish");
|
|
103
|
-
},
|
|
104
|
-
onChange() {
|
|
105
|
-
emit("change", current.value);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
return (_ctx, _cache) => {
|
|
109
|
-
var _a, _b;
|
|
110
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
111
|
-
(openBlock(), createBlock(Teleport, { to: _ctx.appendTo }, [
|
|
112
|
-
createElementVNode("div", mergeProps({ class: unref(kls) }, _ctx.$attrs), [
|
|
113
|
-
createVNode(ElTourMask, {
|
|
114
|
-
visible: unref(mergedShowMask),
|
|
115
|
-
fill: (_a = unref(mergedMaskStyle)) == null ? void 0 : _a.color,
|
|
116
|
-
style: normalizeStyle((_b = unref(mergedMaskStyle)) == null ? void 0 : _b.style),
|
|
117
|
-
pos: unref(pos),
|
|
118
|
-
"z-index": unref(mergedZIndex),
|
|
119
|
-
"target-area-clickable": _ctx.targetAreaClickable
|
|
120
|
-
}, null, 8, ["visible", "fill", "style", "pos", "z-index", "target-area-clickable"]),
|
|
121
|
-
_ctx.modelValue ? (openBlock(), createBlock(ElTourContent, {
|
|
122
|
-
key: unref(current),
|
|
123
|
-
reference: unref(triggerTarget),
|
|
124
|
-
placement: unref(mergedPlacement),
|
|
125
|
-
"show-arrow": unref(mergedShowArrow),
|
|
126
|
-
"z-index": unref(mergedZIndex),
|
|
127
|
-
style: normalizeStyle(unref(mergedContentStyle)),
|
|
128
|
-
onClose: onEscClose
|
|
129
|
-
}, {
|
|
130
|
-
default: withCtx(() => [
|
|
131
|
-
createVNode(unref(ElTourSteps), {
|
|
132
|
-
current: unref(current),
|
|
133
|
-
onUpdateTotal
|
|
134
|
-
}, {
|
|
135
|
-
default: withCtx(() => [
|
|
136
|
-
renderSlot(_ctx.$slots, "default")
|
|
137
|
-
]),
|
|
138
|
-
_: 3
|
|
139
|
-
}, 8, ["current"])
|
|
140
|
-
]),
|
|
141
|
-
_: 3
|
|
142
|
-
}, 8, ["reference", "placement", "show-arrow", "z-index", "style"])) : createCommentVNode("v-if", true)
|
|
143
|
-
], 16)
|
|
144
|
-
], 8, ["to"])),
|
|
145
|
-
createCommentVNode(" just for IDE "),
|
|
146
|
-
false ? renderSlot(_ctx.$slots, "indicators", {
|
|
147
|
-
key: 0,
|
|
148
|
-
current: unref(current) + 1,
|
|
149
|
-
total: total.value
|
|
150
|
-
}) : createCommentVNode("v-if", true)
|
|
151
|
-
], 64);
|
|
152
|
-
};
|
|
9
|
+
const tourProps = buildProps({
|
|
10
|
+
modelValue: Boolean,
|
|
11
|
+
current: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 0
|
|
14
|
+
},
|
|
15
|
+
showArrow: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: true
|
|
18
|
+
},
|
|
19
|
+
showClose: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: true
|
|
22
|
+
},
|
|
23
|
+
closeIcon: {
|
|
24
|
+
type: iconPropType
|
|
25
|
+
},
|
|
26
|
+
placement: tourContentProps.placement,
|
|
27
|
+
contentStyle: {
|
|
28
|
+
type: definePropType([Object])
|
|
29
|
+
},
|
|
30
|
+
mask: {
|
|
31
|
+
type: definePropType([Boolean, Object]),
|
|
32
|
+
default: true
|
|
33
|
+
},
|
|
34
|
+
gap: {
|
|
35
|
+
type: definePropType(Object),
|
|
36
|
+
default: () => ({
|
|
37
|
+
offset: 6,
|
|
38
|
+
radius: 2
|
|
39
|
+
})
|
|
40
|
+
},
|
|
41
|
+
zIndex: {
|
|
42
|
+
type: Number
|
|
43
|
+
},
|
|
44
|
+
scrollIntoViewOptions: {
|
|
45
|
+
type: definePropType([Boolean, Object]),
|
|
46
|
+
default: () => ({
|
|
47
|
+
block: "center"
|
|
48
|
+
})
|
|
49
|
+
},
|
|
50
|
+
type: {
|
|
51
|
+
type: definePropType(String)
|
|
52
|
+
},
|
|
53
|
+
appendTo: {
|
|
54
|
+
type: definePropType([String, Object]),
|
|
55
|
+
default: "body"
|
|
56
|
+
},
|
|
57
|
+
closeOnPressEscape: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: true
|
|
60
|
+
},
|
|
61
|
+
targetAreaClickable: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: true
|
|
153
64
|
}
|
|
154
65
|
});
|
|
155
|
-
|
|
66
|
+
const tourEmits = {
|
|
67
|
+
[UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
|
|
68
|
+
["update:current"]: (current) => isNumber(current),
|
|
69
|
+
close: (current) => isNumber(current),
|
|
70
|
+
finish: () => true,
|
|
71
|
+
change: (current) => isNumber(current)
|
|
72
|
+
};
|
|
156
73
|
|
|
157
|
-
export {
|
|
74
|
+
export { tourEmits, tourProps };
|
|
158
75
|
//# sourceMappingURL=tour2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tour2.mjs","sources":["../../../../../../packages/components/tour/src/tour.
|
|
1
|
+
{"version":3,"file":"tour2.mjs","sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { tourContentProps } from './content'\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom close icon\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'default' | 'primary'>(String),\n },\n /**\n * @description which element the TourContent appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n default: 'body',\n },\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type TourProps = ExtractPropTypes<typeof tourProps>\nexport type TourInstance = InstanceType<typeof Tour>\n\nexport const tourEmits = {\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n ['update:current']: (current: number) => isNumber(current),\n close: (current: number) => isNumber(current),\n finish: () => true,\n change: (current: number) => isNumber(current),\n}\nexport type TourEmits = typeof tourEmits\n"],"names":[],"mappings":";;;;;;;;AASY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,OAAO,EAAE;AACX,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,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,SAAS,EAAE,gBAAgB,CAAC,SAAS;AACvC,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAClC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,MAAM,MAAM,EAAE,CAAC;AACf,MAAM,MAAM,EAAE,CAAC;AACf,KAAK,CAAC;AACN,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,qBAAqB,EAAE;AACzB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,IAAI,OAAO,EAAE,OAAO;AACpB,MAAM,KAAK,EAAE,QAAQ;AACrB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,SAAS,GAAG;AACzB,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AACnD,EAAE,CAAC,gBAAgB,GAAG,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,CAAC;AACpD,EAAE,KAAK,EAAE,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,CAAC;AACvC,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,MAAM,EAAE,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,CAAC;AACxC;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -209,7 +209,7 @@ export { default as DynamicSizeGrid } from './components/virtual-list/src/compon
|
|
|
209
209
|
export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './components/virtual-list/src/props.mjs';
|
|
210
210
|
export { watermarkProps } from './components/watermark/src/watermark.mjs';
|
|
211
211
|
export { ElWatermark } from './components/watermark/index.mjs';
|
|
212
|
-
export { tourEmits, tourProps } from './components/tour/src/
|
|
212
|
+
export { tourEmits, tourProps } from './components/tour/src/tour2.mjs';
|
|
213
213
|
export { ElTour, ElTourStep } from './components/tour/index.mjs';
|
|
214
214
|
export { anchorEmits, anchorProps } from './components/anchor/src/anchor.mjs';
|
|
215
215
|
export { ElAnchor, ElAnchorLink } from './components/anchor/index.mjs';
|
|
@@ -220,7 +220,7 @@ export { Loading as ElLoadingService } from './components/loading/src/service.mj
|
|
|
220
220
|
export { messageDefaults, messageEmits, messageProps, messageTypes } from './components/message/src/message.mjs';
|
|
221
221
|
export { ElMessage } from './components/message/index.mjs';
|
|
222
222
|
export { ElMessageBox } from './components/message-box/index.mjs';
|
|
223
|
-
export { notificationEmits, notificationProps, notificationTypes } from './components/notification/src/
|
|
223
|
+
export { notificationEmits, notificationProps, notificationTypes } from './components/notification/src/notification.mjs';
|
|
224
224
|
export { ElNotification } from './components/notification/index.mjs';
|
|
225
225
|
export { popoverEmits, popoverProps } from './components/popover/src/popover.mjs';
|
|
226
226
|
export { ElPopover, ElPopoverDirective } from './components/popover/index.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20240401";
|
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.20240401'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
package/lib/components/index.js
CHANGED
|
@@ -214,12 +214,12 @@ var fixedSizeGrid = require('./virtual-list/src/components/fixed-size-grid.js');
|
|
|
214
214
|
var dynamicSizeGrid = require('./virtual-list/src/components/dynamic-size-grid.js');
|
|
215
215
|
var props$1 = require('./virtual-list/src/props.js');
|
|
216
216
|
var watermark = require('./watermark/src/watermark.js');
|
|
217
|
-
var tour = require('./tour/src/
|
|
217
|
+
var tour = require('./tour/src/tour2.js');
|
|
218
218
|
var anchor = require('./anchor/src/anchor.js');
|
|
219
219
|
var directive = require('./loading/src/directive.js');
|
|
220
220
|
var service = require('./loading/src/service.js');
|
|
221
221
|
var message = require('./message/src/message.js');
|
|
222
|
-
var notification = require('./notification/src/
|
|
222
|
+
var notification = require('./notification/src/notification.js');
|
|
223
223
|
var popover = require('./popover/src/popover.js');
|
|
224
224
|
|
|
225
225
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var notify = require('./src/notify.js');
|
|
7
|
-
var notification = require('./src/
|
|
7
|
+
var notification = require('./src/notification.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElNotification = install.withInstallFunction(notify["default"], "$notify");
|
|
@@ -2,157 +2,77 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var core = require('@vueuse/core');
|
|
7
5
|
require('../../../utils/index.js');
|
|
8
|
-
require('../../../
|
|
9
|
-
var index = require('../../icon/index.js');
|
|
10
|
-
require('../../config-provider/index.js');
|
|
11
|
-
var notification = require('./notification2.js');
|
|
12
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
13
|
-
var useGlobalConfig = require('../../config-provider/src/hooks/use-global-config.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
14
7
|
var icon = require('../../../utils/vue/icon.js');
|
|
15
|
-
var aria = require('../../../constants/aria.js');
|
|
16
8
|
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
const notificationTypes = [
|
|
10
|
+
"success",
|
|
11
|
+
"info",
|
|
12
|
+
"warning",
|
|
13
|
+
"error"
|
|
14
|
+
];
|
|
15
|
+
const notificationProps = runtime.buildProps({
|
|
16
|
+
customClass: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
dangerouslyUseHTMLString: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
duration: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 4500
|
|
27
|
+
},
|
|
28
|
+
icon: {
|
|
29
|
+
type: icon.iconPropType
|
|
30
|
+
},
|
|
31
|
+
id: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
message: {
|
|
36
|
+
type: runtime.definePropType([String, Object]),
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
offset: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 0
|
|
42
|
+
},
|
|
43
|
+
onClick: {
|
|
44
|
+
type: runtime.definePropType(Function),
|
|
45
|
+
default: () => void 0
|
|
46
|
+
},
|
|
47
|
+
onClose: {
|
|
48
|
+
type: runtime.definePropType(Function),
|
|
49
|
+
required: true
|
|
50
|
+
},
|
|
51
|
+
position: {
|
|
52
|
+
type: String,
|
|
53
|
+
values: ["top-right", "top-left", "bottom-right", "bottom-left"],
|
|
54
|
+
default: "top-right"
|
|
55
|
+
},
|
|
56
|
+
showClose: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: true
|
|
59
|
+
},
|
|
60
|
+
title: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: ""
|
|
63
|
+
},
|
|
64
|
+
type: {
|
|
65
|
+
type: String,
|
|
66
|
+
values: [...notificationTypes, ""],
|
|
67
|
+
default: ""
|
|
68
|
+
},
|
|
69
|
+
zIndex: Number
|
|
23
70
|
});
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
emits: notification.notificationEmits,
|
|
28
|
-
setup(__props, { expose }) {
|
|
29
|
-
const props = __props;
|
|
30
|
-
const { ns, zIndex } = useGlobalConfig.useGlobalComponentSettings("notification");
|
|
31
|
-
const { nextZIndex, currentZIndex } = zIndex;
|
|
32
|
-
const { Close } = icon.CloseComponents;
|
|
33
|
-
const visible = vue.ref(false);
|
|
34
|
-
let timer = void 0;
|
|
35
|
-
const typeClass = vue.computed(() => {
|
|
36
|
-
const type = props.type;
|
|
37
|
-
return type && icon.TypeComponentsMap[props.type] ? ns.m(type) : "";
|
|
38
|
-
});
|
|
39
|
-
const iconComponent = vue.computed(() => {
|
|
40
|
-
if (!props.type)
|
|
41
|
-
return props.icon;
|
|
42
|
-
return icon.TypeComponentsMap[props.type] || props.icon;
|
|
43
|
-
});
|
|
44
|
-
const horizontalClass = vue.computed(() => props.position.endsWith("right") ? "right" : "left");
|
|
45
|
-
const verticalProperty = vue.computed(() => props.position.startsWith("top") ? "top" : "bottom");
|
|
46
|
-
const positionStyle = vue.computed(() => {
|
|
47
|
-
var _a;
|
|
48
|
-
return {
|
|
49
|
-
[verticalProperty.value]: `${props.offset}px`,
|
|
50
|
-
zIndex: (_a = props.zIndex) != null ? _a : currentZIndex.value
|
|
51
|
-
};
|
|
52
|
-
});
|
|
53
|
-
function startTimer() {
|
|
54
|
-
if (props.duration > 0) {
|
|
55
|
-
;
|
|
56
|
-
({ stop: timer } = core.useTimeoutFn(() => {
|
|
57
|
-
if (visible.value)
|
|
58
|
-
close();
|
|
59
|
-
}, props.duration));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function clearTimer() {
|
|
63
|
-
timer == null ? void 0 : timer();
|
|
64
|
-
}
|
|
65
|
-
function close() {
|
|
66
|
-
visible.value = false;
|
|
67
|
-
}
|
|
68
|
-
function onKeydown({ code }) {
|
|
69
|
-
if (code === aria.EVENT_CODE.delete || code === aria.EVENT_CODE.backspace) {
|
|
70
|
-
clearTimer();
|
|
71
|
-
} else if (code === aria.EVENT_CODE.esc) {
|
|
72
|
-
if (visible.value) {
|
|
73
|
-
close();
|
|
74
|
-
}
|
|
75
|
-
} else {
|
|
76
|
-
startTimer();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
vue.onMounted(() => {
|
|
80
|
-
startTimer();
|
|
81
|
-
nextZIndex();
|
|
82
|
-
visible.value = true;
|
|
83
|
-
});
|
|
84
|
-
core.useEventListener(document, "keydown", onKeydown);
|
|
85
|
-
expose({
|
|
86
|
-
visible,
|
|
87
|
-
close
|
|
88
|
-
});
|
|
89
|
-
return (_ctx, _cache) => {
|
|
90
|
-
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
91
|
-
name: vue.unref(ns).b("fade"),
|
|
92
|
-
onBeforeLeave: _ctx.onClose,
|
|
93
|
-
onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
|
|
94
|
-
persisted: ""
|
|
95
|
-
}, {
|
|
96
|
-
default: vue.withCtx(() => [
|
|
97
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
98
|
-
id: _ctx.id,
|
|
99
|
-
class: vue.normalizeClass([vue.unref(ns).b(), _ctx.customClass, vue.unref(horizontalClass)]),
|
|
100
|
-
style: vue.normalizeStyle(vue.unref(positionStyle)),
|
|
101
|
-
role: "alert",
|
|
102
|
-
onMouseenter: clearTimer,
|
|
103
|
-
onMouseleave: startTimer,
|
|
104
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
105
|
-
}, [
|
|
106
|
-
vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
|
|
107
|
-
key: 0,
|
|
108
|
-
class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(typeClass)])
|
|
109
|
-
}, {
|
|
110
|
-
default: vue.withCtx(() => [
|
|
111
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
112
|
-
]),
|
|
113
|
-
_: 1
|
|
114
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
115
|
-
vue.createElementVNode("div", {
|
|
116
|
-
class: vue.normalizeClass(vue.unref(ns).e("group"))
|
|
117
|
-
}, [
|
|
118
|
-
vue.createElementVNode("h2", {
|
|
119
|
-
class: vue.normalizeClass(vue.unref(ns).e("title")),
|
|
120
|
-
textContent: vue.toDisplayString(_ctx.title)
|
|
121
|
-
}, null, 10, _hoisted_2),
|
|
122
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
123
|
-
class: vue.normalizeClass(vue.unref(ns).e("content")),
|
|
124
|
-
style: vue.normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
|
|
125
|
-
}, [
|
|
126
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
127
|
-
!_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
128
|
-
vue.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
|
|
129
|
-
vue.createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
|
|
130
|
-
], 2112))
|
|
131
|
-
])
|
|
132
|
-
], 6), [
|
|
133
|
-
[vue.vShow, _ctx.message]
|
|
134
|
-
]),
|
|
135
|
-
_ctx.showClose ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
|
|
136
|
-
key: 0,
|
|
137
|
-
class: vue.normalizeClass(vue.unref(ns).e("closeBtn")),
|
|
138
|
-
onClick: vue.withModifiers(close, ["stop"])
|
|
139
|
-
}, {
|
|
140
|
-
default: vue.withCtx(() => [
|
|
141
|
-
vue.createVNode(vue.unref(Close))
|
|
142
|
-
]),
|
|
143
|
-
_: 1
|
|
144
|
-
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
145
|
-
], 2)
|
|
146
|
-
], 46, _hoisted_1), [
|
|
147
|
-
[vue.vShow, visible.value]
|
|
148
|
-
])
|
|
149
|
-
]),
|
|
150
|
-
_: 3
|
|
151
|
-
}, 8, ["name", "onBeforeLeave"]);
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
var NotificationConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "notification.vue"]]);
|
|
71
|
+
const notificationEmits = {
|
|
72
|
+
destroy: () => true
|
|
73
|
+
};
|
|
156
74
|
|
|
157
|
-
exports
|
|
75
|
+
exports.notificationEmits = notificationEmits;
|
|
76
|
+
exports.notificationProps = notificationProps;
|
|
77
|
+
exports.notificationTypes = notificationTypes;
|
|
158
78
|
//# sourceMappingURL=notification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","sources":["../../../../../../packages/components/notification/src/notification.
|
|
1
|
+
{"version":3,"file":"notification.js","sources":["../../../../../../packages/components/notification/src/notification.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, VNode } from 'vue'\nimport type Notification from './notification.vue'\n\nexport const notificationTypes = [\n 'success',\n 'info',\n 'warning',\n 'error',\n] as const\n\nexport const notificationProps = buildProps({\n /**\n * @description custom class name for Notification\n */\n customClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether `message` is treated as HTML string\n */\n dangerouslyUseHTMLString: {\n type: Boolean,\n default: false,\n },\n /**\n * @description duration before close. It will not automatically close if set 0\n */\n duration: {\n type: Number,\n default: 4500,\n },\n /**\n * @description custom icon component. It will be overridden by `type`\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description notification dom id\n */\n id: {\n type: String,\n default: '',\n },\n /**\n * @description description text\n */\n message: {\n type: definePropType<string | VNode>([String, Object]),\n default: '',\n },\n /**\n * @description offset from the top edge of the screen. Every Notification instance of the same moment should have the same offset\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description callback function when notification clicked\n */\n onClick: {\n type: definePropType<() => void>(Function),\n default: () => undefined,\n },\n /**\n * @description callback function when closed\n */\n onClose: {\n type: definePropType<() => void>(Function),\n required: true,\n },\n /**\n * @description custom position\n */\n position: {\n type: String,\n values: ['top-right', 'top-left', 'bottom-right', 'bottom-left'],\n default: 'top-right',\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description notification type\n */\n type: {\n type: String,\n values: [...notificationTypes, ''],\n default: '',\n },\n /**\n * @description initial zIndex\n */\n zIndex: Number,\n} as const)\nexport type NotificationProps = ExtractPropTypes<typeof notificationProps>\n\nexport const notificationEmits = {\n destroy: () => true,\n}\nexport type NotificationEmits = typeof notificationEmits\n\nexport type NotificationInstance = InstanceType<typeof Notification>\n\nexport type NotificationOptions = Omit<NotificationProps, 'id'> & {\n /**\n * @description set the root element for the notification, default to `document.body`\n */\n appendTo?: HTMLElement | string\n}\nexport type NotificationOptionsTyped = Omit<NotificationOptions, 'type'>\n\nexport interface NotificationHandle {\n close: () => void\n}\n\nexport type NotificationParams = Partial<NotificationOptions> | string | VNode\nexport type NotificationParamsTyped =\n | Partial<NotificationOptionsTyped>\n | string\n | VNode\n\nexport type NotifyFn = ((\n options?: NotificationParams\n) => NotificationHandle) & { closeAll: () => void }\n\nexport type NotifyTypedFn = (\n options?: NotificationParamsTyped\n) => NotificationHandle\n\nexport interface Notify extends NotifyFn {\n success: NotifyTypedFn\n warning: NotifyTypedFn\n error: NotifyTypedFn\n info: NotifyTypedFn\n}\n\nexport interface NotificationQueueItem {\n vm: VNode\n}\n\nexport type NotificationQueue = NotificationQueueItem[]\n"],"names":["buildProps","iconPropType","definePropType"],"mappings":";;;;;;;;AACY,MAAC,iBAAiB,GAAG;AACjC,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,SAAS;AACX,EAAE,OAAO;AACT,EAAE;AACU,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,wBAAwB,EAAE;AAC5B,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,MAAM,KAAK,CAAC;AACzB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,CAAC;AACpE,IAAI,OAAO,EAAE,WAAW;AACxB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,GAAG,iBAAiB,EAAE,EAAE,CAAC;AACtC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,CAAC,EAAE;AACS,MAAC,iBAAiB,GAAG;AACjC,EAAE,OAAO,EAAE,MAAM,IAAI;AACrB;;;;;;"}
|