rappel-ui 1.0.34 → 1.0.36
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/README.md +1 -0
- package/cjs/components/dropdown/index.d.ts +11 -98
- package/cjs/components/dropdown/src/dropdown-item.vue.d.ts +9 -7
- package/cjs/components/dropdown/src/dropdown-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/dropdown/src/dropdown-submenu.vue.d.ts +4 -2
- package/cjs/components/dropdown/src/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/dropdown/src/dropdown.vue.d.ts +343 -11
- package/cjs/components/dropdown/src/dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/dropdown/src/loop.js +1 -0
- package/cjs/components/dropdown/src/loop.vue.d.ts +18 -0
- package/cjs/components/dropdown/src/loop.vue_vue_type_script_setup_true_lang.js +1 -0
- package/cjs/components/dropdown/src/types.d.ts +21 -14
- package/cjs/components/dropdown/src/use-dropdown-emit.d.ts +4 -4
- package/cjs/components/index.d.ts +1 -0
- package/cjs/components/index.js +1 -1
- package/cjs/components/menu/index.d.ts +86 -0
- package/cjs/components/menu/index.js +1 -0
- package/cjs/components/menu/src/constants.d.ts +1 -0
- package/cjs/components/menu/src/constants.js +1 -0
- package/cjs/components/menu/src/loop.js +1 -0
- package/cjs/components/menu/src/loop.vue.d.ts +18 -0
- package/cjs/components/menu/src/loop.vue_vue_type_script_setup_true_lang.js +1 -0
- package/cjs/components/menu/src/menu-item.js +1 -0
- package/cjs/components/menu/src/menu-item.vue.d.ts +25 -0
- package/cjs/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.js +1 -0
- package/cjs/components/menu/src/menu.js +1 -0
- package/cjs/components/menu/src/menu.vue.d.ts +21 -0
- package/cjs/components/menu/src/menu.vue_vue_type_script_setup_true_lang.js +1 -0
- package/cjs/components/menu/src/submenu.js +1 -0
- package/cjs/components/menu/src/submenu.vue.d.ts +19 -0
- package/cjs/components/menu/src/submenu.vue_vue_type_script_setup_true_lang.js +1 -0
- package/cjs/components/menu/src/types.d.ts +79 -0
- package/cjs/components/menu/src/use-menu-emit.d.ts +5 -0
- package/cjs/components/menu/src/use-menu-emit.js +1 -0
- package/cjs/components/menu/style/css.d.ts +0 -0
- package/cjs/components/menu/style/css.js +2 -0
- package/cjs/components/menu/style/index.d.ts +0 -0
- package/cjs/components/menu/style/index.js +2 -0
- package/cjs/components/message/src/create-message.js +1 -1
- package/cjs/components/message/src/use-message-emit.d.ts +2 -2
- package/cjs/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/popconfirm/src/use-popconfirm-emit.d.ts +2 -2
- package/cjs/components/popover/src/popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/popover/src/types.d.ts +1 -0
- package/cjs/components/popover/src/use-popover-emit.d.ts +2 -2
- package/cjs/components/tooltip/src/constants.d.ts +0 -1
- package/cjs/components/tooltip/src/constants.js +1 -1
- package/cjs/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/tooltip/src/types.d.ts +1 -0
- package/cjs/components/tooltip/src/use-tooltip-emit.d.ts +2 -2
- package/cjs/components/tooltip/src/use-tooltip.js +1 -1
- package/cjs/components/transition/src/use-transition-emit.d.ts +2 -2
- package/cjs/composables/index.d.ts +1 -0
- package/cjs/composables/index.js +1 -1
- package/cjs/composables/use-slot-node/index.d.ts +2 -0
- package/cjs/composables/use-slot-node/index.js +1 -0
- package/cjs/composables/use-theme/index.js +1 -1
- package/cjs/constants/index.d.ts +1 -0
- package/cjs/constants/index.js +1 -0
- package/cjs/index.d.ts +183 -186
- package/cjs/index.js +1 -1
- package/cjs/svg-icons/create-icon.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-backward.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-down.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-downward.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-forward.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-left.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-right.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-up.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-upward.d.ts +2 -2
- package/cjs/svg-icons/src/check-circle.d.ts +2 -2
- package/cjs/svg-icons/src/check-fill.d.ts +2 -2
- package/cjs/svg-icons/src/check.d.ts +2 -2
- package/cjs/svg-icons/src/close-circle.d.ts +2 -2
- package/cjs/svg-icons/src/close-fill.d.ts +2 -2
- package/cjs/svg-icons/src/close-short.d.ts +2 -2
- package/cjs/svg-icons/src/close.d.ts +2 -2
- package/cjs/svg-icons/src/copy-closure.d.ts +2 -2
- package/cjs/svg-icons/src/copy.d.ts +2 -2
- package/cjs/svg-icons/src/delete.d.ts +2 -2
- package/cjs/svg-icons/src/exclam-fill.d.ts +2 -2
- package/cjs/svg-icons/src/exclam.d.ts +2 -2
- package/cjs/svg-icons/src/help.d.ts +2 -2
- package/cjs/svg-icons/src/info-circle.d.ts +2 -2
- package/cjs/svg-icons/src/info-fill.d.ts +2 -2
- package/cjs/svg-icons/src/loading.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-circle-horizontal.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-circle-outline-horizontal.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-circle-outline-vertical.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-circle.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-square-horizontal.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-square.d.ts +2 -2
- package/cjs/svg-icons/src/more-line.d.ts +2 -2
- package/cjs/svg-icons/src/play.d.ts +2 -2
- package/cjs/svg-icons/src/search-bold.d.ts +2 -2
- package/cjs/svg-icons/src/search.d.ts +2 -2
- package/cjs/svg-icons/src/star-fill.d.ts +2 -2
- package/cjs/svg-icons/src/star.d.ts +2 -2
- package/cjs/svg-icons/src/triangle-backward-fill.d.ts +2 -2
- package/cjs/svg-icons/src/triangle-downward-fill.d.ts +2 -2
- package/cjs/svg-icons/src/triangle-forward-fill.d.ts +2 -2
- package/cjs/svg-icons/src/triangle-upward-fill.d.ts +2 -2
- package/cjs/types/common.d.ts +16 -0
- package/cjs/types/component.d.ts +2 -1
- package/cjs/types/theme.d.ts +1 -1
- package/cjs/utils/index.js +1 -1
- package/cjs/utils/util.d.ts +15 -0
- package/cjs/utils/util.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.umd.js +13 -13
- package/es/components/dropdown/index.d.ts +11 -98
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +9 -7
- package/es/components/dropdown/src/dropdown-item.vue_vue_type_script_setup_true_lang.mjs +103 -43
- package/es/components/dropdown/src/dropdown-submenu.vue.d.ts +4 -2
- package/es/components/dropdown/src/dropdown-submenu.vue_vue_type_script_setup_true_lang.mjs +42 -32
- package/es/components/dropdown/src/dropdown.vue.d.ts +343 -11
- package/es/components/dropdown/src/dropdown.vue_vue_type_script_setup_true_lang.mjs +105 -107
- package/es/components/dropdown/src/loop.mjs +5 -0
- package/es/components/dropdown/src/loop.vue.d.ts +18 -0
- package/es/components/dropdown/src/loop.vue_vue_type_script_setup_true_lang.mjs +26 -0
- package/es/components/dropdown/src/types.d.ts +21 -14
- package/es/components/dropdown/src/use-dropdown-emit.d.ts +4 -4
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +8 -2
- package/es/components/menu/index.d.ts +86 -0
- package/es/components/menu/index.mjs +13 -0
- package/es/components/menu/src/constants.d.ts +1 -0
- package/es/components/menu/src/constants.mjs +4 -0
- package/es/components/menu/src/loop.mjs +5 -0
- package/es/components/menu/src/loop.vue.d.ts +18 -0
- package/es/components/menu/src/loop.vue_vue_type_script_setup_true_lang.mjs +22 -0
- package/es/components/menu/src/menu-item.mjs +5 -0
- package/es/components/menu/src/menu-item.vue.d.ts +25 -0
- package/es/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.mjs +232 -0
- package/es/components/menu/src/menu.mjs +5 -0
- package/es/components/menu/src/menu.vue.d.ts +21 -0
- package/es/components/menu/src/menu.vue_vue_type_script_setup_true_lang.mjs +119 -0
- package/es/components/menu/src/submenu.mjs +5 -0
- package/es/components/menu/src/submenu.vue.d.ts +19 -0
- package/es/components/menu/src/submenu.vue_vue_type_script_setup_true_lang.mjs +176 -0
- package/es/components/menu/src/types.d.ts +79 -0
- package/es/components/menu/src/use-menu-emit.d.ts +5 -0
- package/es/components/menu/src/use-menu-emit.mjs +6 -0
- package/es/components/menu/style/css.d.ts +0 -0
- package/es/components/menu/style/css.mjs +2 -0
- package/es/components/menu/style/index.d.ts +0 -0
- package/es/components/menu/style/index.mjs +2 -0
- package/es/components/message/src/create-message.mjs +44 -43
- package/es/components/message/src/use-message-emit.d.ts +2 -2
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs +62 -65
- package/es/components/popconfirm/src/use-popconfirm-emit.d.ts +2 -2
- package/es/components/popover/src/popover.vue_vue_type_script_setup_true_lang.mjs +36 -32
- package/es/components/popover/src/types.d.ts +1 -0
- package/es/components/popover/src/use-popover-emit.d.ts +2 -2
- package/es/components/tooltip/src/constants.d.ts +0 -1
- package/es/components/tooltip/src/constants.mjs +2 -6
- package/es/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.mjs +85 -82
- package/es/components/tooltip/src/types.d.ts +1 -0
- package/es/components/tooltip/src/use-tooltip-emit.d.ts +2 -2
- package/es/components/tooltip/src/use-tooltip.mjs +5 -5
- package/es/components/transition/src/use-transition-emit.d.ts +2 -2
- package/es/composables/index.d.ts +1 -0
- package/es/composables/index.mjs +2 -1
- package/es/composables/use-slot-node/index.d.ts +2 -0
- package/es/composables/use-slot-node/index.mjs +10 -0
- package/es/composables/use-theme/index.mjs +1 -1
- package/es/constants/index.d.ts +1 -0
- package/es/constants/index.mjs +9 -0
- package/es/index.d.ts +183 -186
- package/es/index.mjs +81 -77
- package/es/svg-icons/create-icon.d.ts +2 -2
- package/es/svg-icons/src/arrow-backward.d.ts +2 -2
- package/es/svg-icons/src/arrow-down.d.ts +2 -2
- package/es/svg-icons/src/arrow-downward.d.ts +2 -2
- package/es/svg-icons/src/arrow-forward.d.ts +2 -2
- package/es/svg-icons/src/arrow-left.d.ts +2 -2
- package/es/svg-icons/src/arrow-right.d.ts +2 -2
- package/es/svg-icons/src/arrow-up.d.ts +2 -2
- package/es/svg-icons/src/arrow-upward.d.ts +2 -2
- package/es/svg-icons/src/check-circle.d.ts +2 -2
- package/es/svg-icons/src/check-fill.d.ts +2 -2
- package/es/svg-icons/src/check.d.ts +2 -2
- package/es/svg-icons/src/close-circle.d.ts +2 -2
- package/es/svg-icons/src/close-fill.d.ts +2 -2
- package/es/svg-icons/src/close-short.d.ts +2 -2
- package/es/svg-icons/src/close.d.ts +2 -2
- package/es/svg-icons/src/copy-closure.d.ts +2 -2
- package/es/svg-icons/src/copy.d.ts +2 -2
- package/es/svg-icons/src/delete.d.ts +2 -2
- package/es/svg-icons/src/exclam-fill.d.ts +2 -2
- package/es/svg-icons/src/exclam.d.ts +2 -2
- package/es/svg-icons/src/help.d.ts +2 -2
- package/es/svg-icons/src/info-circle.d.ts +2 -2
- package/es/svg-icons/src/info-fill.d.ts +2 -2
- package/es/svg-icons/src/loading.d.ts +2 -2
- package/es/svg-icons/src/more-dot-circle-horizontal.d.ts +2 -2
- package/es/svg-icons/src/more-dot-circle-outline-horizontal.d.ts +2 -2
- package/es/svg-icons/src/more-dot-circle-outline-vertical.d.ts +2 -2
- package/es/svg-icons/src/more-dot-circle.d.ts +2 -2
- package/es/svg-icons/src/more-dot-square-horizontal.d.ts +2 -2
- package/es/svg-icons/src/more-dot-square.d.ts +2 -2
- package/es/svg-icons/src/more-line.d.ts +2 -2
- package/es/svg-icons/src/play.d.ts +2 -2
- package/es/svg-icons/src/search-bold.d.ts +2 -2
- package/es/svg-icons/src/search.d.ts +2 -2
- package/es/svg-icons/src/star-fill.d.ts +2 -2
- package/es/svg-icons/src/star.d.ts +2 -2
- package/es/svg-icons/src/triangle-backward-fill.d.ts +2 -2
- package/es/svg-icons/src/triangle-downward-fill.d.ts +2 -2
- package/es/svg-icons/src/triangle-forward-fill.d.ts +2 -2
- package/es/svg-icons/src/triangle-upward-fill.d.ts +2 -2
- package/es/types/common.d.ts +16 -0
- package/es/types/component.d.ts +2 -1
- package/es/types/theme.d.ts +1 -1
- package/es/utils/index.mjs +2 -2
- package/es/utils/util.d.ts +15 -0
- package/es/utils/util.mjs +13 -3
- package/package.json +2 -2
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/re-dropdown.css +1 -1
- package/theme-chalk/re-menu.css +1 -0
- package/theme-chalk/re-popconfirm.css +1 -1
- package/theme-chalk/re-popover.css +1 -1
- package/theme-chalk/re-tooltip.css +1 -1
- package/theme-chalk/src/css-vars/_dropdown.scss +44 -0
- package/theme-chalk/src/css-vars/_menu.scss +44 -0
- package/theme-chalk/src/css-vars/_popconfirm.scss +15 -0
- package/theme-chalk/src/css-vars/_popover.scss +24 -0
- package/theme-chalk/src/css-vars/_tooltip.scss +10 -5
- package/theme-chalk/src/dropdown.scss +44 -28
- package/theme-chalk/src/index.scss +1 -0
- package/theme-chalk/src/menu.scss +215 -0
- package/theme-chalk/src/mixins/_dropdown.scss +78 -0
- package/theme-chalk/src/mixins/_menu.scss +99 -0
- package/theme-chalk/src/mixins/_popconfirm.scss +21 -2
- package/theme-chalk/src/mixins/_popover.scss +26 -0
- package/theme-chalk/src/mixins/index.scss +9 -0
- package/theme-chalk/src/popconfirm.scss +7 -1
- package/theme-chalk/src/popover.scss +8 -0
- package/theme-chalk/src/tooltip.scss +1 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { normalizeOptions as e } from "../../../utils/util.mjs";
|
|
2
|
+
import "../../../utils/index.mjs";
|
|
3
|
+
import { useNamespace as t } from "../../../composables/use-namespace/index.mjs";
|
|
4
|
+
import { useTheme as n } from "../../../composables/use-theme/index.mjs";
|
|
5
|
+
import "../../../composables/index.mjs";
|
|
6
|
+
import { _menuProvideKey as r } from "./constants.mjs";
|
|
7
|
+
import i from "./loop.mjs";
|
|
8
|
+
import { useMenuEmits as a } from "./use-menu-emit.mjs";
|
|
9
|
+
import { computed as o, createBlock as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, openBlock as d, provide as f, ref as p, renderSlot as m, withCtx as h } from "vue";
|
|
10
|
+
//#region packages/components/menu/src/menu.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
+
var g = c({
|
|
12
|
+
name: "ReMenu",
|
|
13
|
+
__name: "menu",
|
|
14
|
+
props: {
|
|
15
|
+
options: { default: () => void 0 },
|
|
16
|
+
mapper: { default: () => void 0 },
|
|
17
|
+
direction: { default: "vertical" },
|
|
18
|
+
theme: { default: "auto" },
|
|
19
|
+
cssDuration: { default: 200 },
|
|
20
|
+
transition: { default: "menu" },
|
|
21
|
+
collapse: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
offset: { default: 10 },
|
|
26
|
+
submenuOffset: { default: () => ({
|
|
27
|
+
mainAxis: 0,
|
|
28
|
+
crossAxis: 0
|
|
29
|
+
}) },
|
|
30
|
+
closeOnSelect: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !0
|
|
33
|
+
},
|
|
34
|
+
openedKeys: { default: () => [] },
|
|
35
|
+
selectedKey: { default: () => void 0 },
|
|
36
|
+
indent: { default: 12 },
|
|
37
|
+
labelPadding: { default: 20 },
|
|
38
|
+
accordion: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
trigger: { default: "hover" },
|
|
43
|
+
placement: {
|
|
44
|
+
type: Function,
|
|
45
|
+
default: void 0
|
|
46
|
+
},
|
|
47
|
+
showArrow: {
|
|
48
|
+
type: Function,
|
|
49
|
+
default: void 0
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
emits: ["select"],
|
|
53
|
+
setup(c, { expose: g, emit: _ }) {
|
|
54
|
+
let { select: v } = a(_), { n: y, nm: b, is: x } = t("menu"), { currentTheme: S } = n(c.theme, !1), C = o(() => [
|
|
55
|
+
y(),
|
|
56
|
+
x(S.value, !!S.value),
|
|
57
|
+
x("collapse", c.collapse),
|
|
58
|
+
b(c.direction)
|
|
59
|
+
]), w = o(() => ({ "--menu-transition-duration": `${c.cssDuration}ms` })), T = p(null), E = (e, t, n = !0) => {
|
|
60
|
+
t.disabled || (T.value = t, n && (v(e, t), L.value = void 0), j(e));
|
|
61
|
+
}, D = Object.assign({}, {
|
|
62
|
+
label: "label",
|
|
63
|
+
value: "value",
|
|
64
|
+
disabled: "disabled",
|
|
65
|
+
children: "children"
|
|
66
|
+
}, c.mapper || {}), O = (e) => ({
|
|
67
|
+
...e,
|
|
68
|
+
label: e[D.label],
|
|
69
|
+
value: e[D.value],
|
|
70
|
+
disabled: e[D.disabled],
|
|
71
|
+
children: e[D.children]
|
|
72
|
+
}), k = o(() => e(c.options, O)), A = [], j = (e) => {
|
|
73
|
+
A.forEach((t) => t.onSelectChange(e));
|
|
74
|
+
}, M = (e) => {
|
|
75
|
+
let t = A.indexOf(e);
|
|
76
|
+
t > -1 && A.splice(t, 1);
|
|
77
|
+
}, N = p(0), P = p(c.openedKeys), F = p([]), I = [], L = p(c.selectedKey);
|
|
78
|
+
return f(r, {
|
|
79
|
+
select: E,
|
|
80
|
+
currentItem: T,
|
|
81
|
+
cssDuration: o(() => c.cssDuration),
|
|
82
|
+
transition: o(() => c.transition),
|
|
83
|
+
collapse: o(() => c.collapse),
|
|
84
|
+
submenuSubscribers: A,
|
|
85
|
+
broadcastSelect: j,
|
|
86
|
+
unsubscribeSubmenu: M,
|
|
87
|
+
depth: N,
|
|
88
|
+
hasOptions: o(() => !!c.options),
|
|
89
|
+
openedKeys: P,
|
|
90
|
+
offset: o(() => c.offset),
|
|
91
|
+
submenuOffset: o(() => c.submenuOffset),
|
|
92
|
+
closeOnSelect: o(() => c.closeOnSelect),
|
|
93
|
+
submenuClosers: I,
|
|
94
|
+
direction: o(() => c.direction),
|
|
95
|
+
selectedKey: L,
|
|
96
|
+
indent: o(() => c.indent),
|
|
97
|
+
labelPadding: o(() => c.labelPadding),
|
|
98
|
+
accordion: o(() => c.accordion),
|
|
99
|
+
topSubMenusKeys: F,
|
|
100
|
+
trigger: o(() => c.trigger),
|
|
101
|
+
placement: c.placement,
|
|
102
|
+
showArrow: c.showArrow,
|
|
103
|
+
theme: o(() => c.theme)
|
|
104
|
+
}), g({ select: E }), (e, t) => (d(), s(i, {
|
|
105
|
+
class: l(C.value),
|
|
106
|
+
style: u(w.value),
|
|
107
|
+
options: c.options ? k.value : void 0
|
|
108
|
+
}, {
|
|
109
|
+
default: h(() => [m(e.$slots, "default")]),
|
|
110
|
+
_: 3
|
|
111
|
+
}, 8, [
|
|
112
|
+
"class",
|
|
113
|
+
"style",
|
|
114
|
+
"options"
|
|
115
|
+
]));
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
//#endregion
|
|
119
|
+
export { g as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SubmenuProps } from './types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare var __VLS_10: {}, __VLS_13: {}, __VLS_33: {};
|
|
4
|
+
type __VLS_Slots = {} & {
|
|
5
|
+
label?: (props: typeof __VLS_10) => any;
|
|
6
|
+
} & {
|
|
7
|
+
default?: (props: typeof __VLS_13) => any;
|
|
8
|
+
} & {
|
|
9
|
+
default?: (props: typeof __VLS_33) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: DefineComponent<SubmenuProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SubmenuProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { toPx as e } from "../../../utils/util.mjs";
|
|
2
|
+
import "../../../utils/index.mjs";
|
|
3
|
+
import { useNamespace as t } from "../../../composables/use-namespace/index.mjs";
|
|
4
|
+
import { useTheme as n } from "../../../composables/use-theme/index.mjs";
|
|
5
|
+
import "../../../composables/index.mjs";
|
|
6
|
+
import { _menuProvideKey as r } from "./constants.mjs";
|
|
7
|
+
import i from "./menu-item.mjs";
|
|
8
|
+
import a from "./loop.mjs";
|
|
9
|
+
import { Transition as o, computed as s, createBlock as c, createCommentVNode as ee, createElementBlock as l, createSlots as u, createTextVNode as te, createVNode as d, defineComponent as f, inject as p, mergeProps as m, normalizeClass as h, normalizeStyle as g, onUnmounted as ne, openBlock as _, provide as re, ref as v, renderSlot as y, toDisplayString as b, unref as x, watch as ie, withCtx as S, withModifiers as C } from "vue";
|
|
10
|
+
//#region packages/components/menu/src/submenu.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
+
var w = f({
|
|
12
|
+
name: "ReSubmenu",
|
|
13
|
+
__name: "submenu",
|
|
14
|
+
props: {
|
|
15
|
+
item: { default: () => ({ value: void 0 }) },
|
|
16
|
+
depth: { default: () => void 0 }
|
|
17
|
+
},
|
|
18
|
+
setup(f) {
|
|
19
|
+
var w;
|
|
20
|
+
let { n: T, ns: ae, is: E } = t("menu"), D = p(r), O = s(() => {
|
|
21
|
+
var e;
|
|
22
|
+
return D == null || (e = D.currentItem) == null ? void 0 : e.value;
|
|
23
|
+
}), k = s(() => {
|
|
24
|
+
var e;
|
|
25
|
+
return D == null || (e = D.cssDuration) == null ? void 0 : e.value;
|
|
26
|
+
}), A = s(() => {
|
|
27
|
+
var e;
|
|
28
|
+
return D == null || (e = D.transition) == null ? void 0 : e.value;
|
|
29
|
+
}), j = s(() => {
|
|
30
|
+
var e;
|
|
31
|
+
return D == null || (e = D.collapse) == null ? void 0 : e.value;
|
|
32
|
+
}), M = s(() => {
|
|
33
|
+
var e;
|
|
34
|
+
return D == null || (e = D.depth) == null ? void 0 : e.value;
|
|
35
|
+
}), N = s(() => {
|
|
36
|
+
var e;
|
|
37
|
+
return D == null || (e = D.hasOptions) == null ? void 0 : e.value;
|
|
38
|
+
}), P = s(() => {
|
|
39
|
+
var e;
|
|
40
|
+
return D == null || (e = D.direction) == null ? void 0 : e.value;
|
|
41
|
+
}), F = s(() => {
|
|
42
|
+
var e;
|
|
43
|
+
return D == null || (e = D.selectedKey) == null ? void 0 : e.value;
|
|
44
|
+
}), I = s(() => {
|
|
45
|
+
var e;
|
|
46
|
+
return D == null || (e = D.indent) == null ? void 0 : e.value;
|
|
47
|
+
}), L = s(() => {
|
|
48
|
+
var e;
|
|
49
|
+
return D == null || (e = D.accordion) == null ? void 0 : e.value;
|
|
50
|
+
}), R = s(() => {
|
|
51
|
+
var e;
|
|
52
|
+
return D == null || (e = D.topSubMenusKeys) == null ? void 0 : e.value;
|
|
53
|
+
}), z = s(() => D.theme.value), { currentTheme: B } = n(z.value, !1), V = s(() => {
|
|
54
|
+
var e;
|
|
55
|
+
return (e = f.depth) == null ? M.value : e;
|
|
56
|
+
}), H = (e, t) => Array.isArray(e.children) && e.children.length > 0 ? e.children.some((e) => H(e, t)) : e.value === t, U = s(() => {
|
|
57
|
+
var e, t, n;
|
|
58
|
+
let r = (e = (t = O.value) == null ? void 0 : t.value) == null ? F.value : e;
|
|
59
|
+
return (n = f.item.children) != null && n.length ? H(f.item, r) : Z.value;
|
|
60
|
+
}), oe = s(() => [E("selected", U.value), E("opened", K.value)]), W = s(() => [{ "padding-left": e(I.value) }]), G = s(() => {
|
|
61
|
+
var e;
|
|
62
|
+
return (e = f.item) != null && e.disabled || N.value ? !1 : P.value === "horizontal" || P.value === "vertical" && j.value;
|
|
63
|
+
}), K = v(!1), q = s(() => {
|
|
64
|
+
var e;
|
|
65
|
+
return P.value === "vertical" && (D == null || (e = D.openedKeys) == null || (e = e.value) == null ? void 0 : e.includes(f.item.value)) && !j.value && !f.item.disabled;
|
|
66
|
+
});
|
|
67
|
+
ie(() => q.value, (e) => {
|
|
68
|
+
K.value = !!e;
|
|
69
|
+
}, { immediate: !0 });
|
|
70
|
+
let J = (e) => {
|
|
71
|
+
var t, n;
|
|
72
|
+
let r = (t = D == null || (n = D.openedKeys) == null || (n = n.value) == null ? void 0 : n.indexOf(e)) == null ? -1 : t;
|
|
73
|
+
if (r > -1) {
|
|
74
|
+
var i;
|
|
75
|
+
D == null || (i = D.openedKeys) == null || (i = i.value) == null || i.splice(r, 1);
|
|
76
|
+
}
|
|
77
|
+
}, se = () => {
|
|
78
|
+
var e;
|
|
79
|
+
if (!(P.value === "horizontal" || j.value || (e = f.item) != null && e.disabled)) {
|
|
80
|
+
if (K.value = !K.value, K.value) {
|
|
81
|
+
var t;
|
|
82
|
+
if (L.value && V.value === 0) {
|
|
83
|
+
var n, r;
|
|
84
|
+
D == null || (n = D.openedKeys) == null || (n = n.value) == null || n.forEach((e) => {
|
|
85
|
+
var t;
|
|
86
|
+
(t = R.value) != null && t.includes(e) && J(e);
|
|
87
|
+
}), D == null || (r = D.openedKeys) == null || (r = r.value) == null || r.push(f.item.value);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
D == null || (t = D.openedKeys) == null || (t = t.value) == null || t.push(f.item.value);
|
|
91
|
+
} else J(f.item.value);
|
|
92
|
+
}
|
|
93
|
+
}, Y = null, X = (e, t) => {
|
|
94
|
+
let n = !1, r = (e) => {
|
|
95
|
+
e.propertyName === "height" && i();
|
|
96
|
+
};
|
|
97
|
+
e.addEventListener("transitionend", r);
|
|
98
|
+
let i = () => {
|
|
99
|
+
n = !0, e.removeEventListener("transitionend", r), t();
|
|
100
|
+
};
|
|
101
|
+
Y && (clearTimeout(Y), Y = null), Y = setTimeout(() => {
|
|
102
|
+
n || (i(), Y && (clearTimeout(Y), Y = null));
|
|
103
|
+
}, k.value ? k.value + 20 : 0);
|
|
104
|
+
}, ce = (e, t) => {
|
|
105
|
+
e.style.height = "0px", e.offsetHeight, e.style.height = `${e.scrollHeight}px`, X(e, t);
|
|
106
|
+
}, le = (e) => {
|
|
107
|
+
e.style.height = "auto";
|
|
108
|
+
}, ue = (e, t) => {
|
|
109
|
+
e.style.height = `${e.scrollHeight}px`, e.offsetHeight, e.style.height = "0px", X(e, t);
|
|
110
|
+
}, de = (e) => {
|
|
111
|
+
e.style.height = "";
|
|
112
|
+
}, Z = v(!1), Q = v(new Set()), fe = (e) => {
|
|
113
|
+
var t;
|
|
114
|
+
return Q.value.add(e), pe(), D == null || (t = D.registerDescendant) == null ? void 0 : t.call(D, e);
|
|
115
|
+
}, $ = {
|
|
116
|
+
value: f.item.value,
|
|
117
|
+
onSelectChange: (e) => {
|
|
118
|
+
Z.value = Q.value.has(e);
|
|
119
|
+
}
|
|
120
|
+
}, pe = () => {
|
|
121
|
+
var e;
|
|
122
|
+
N.value || Q.value.has((e = O.value) == null ? void 0 : e.value) && (Z.value = !0);
|
|
123
|
+
};
|
|
124
|
+
return D == null || (w = D.submenuSubscribers) == null || w.push($), re(r, {
|
|
125
|
+
...D,
|
|
126
|
+
registerDescendant: fe,
|
|
127
|
+
depth: s(() => {
|
|
128
|
+
var e, t;
|
|
129
|
+
return ((e = D == null || (t = D.depth) == null ? void 0 : t.value) == null ? 0 : e) + 1;
|
|
130
|
+
})
|
|
131
|
+
}), ne(() => {
|
|
132
|
+
D == null || D.unsubscribeSubmenu($);
|
|
133
|
+
}), (e, t) => (_(), c(i, m(f.item, {
|
|
134
|
+
class: oe.value,
|
|
135
|
+
depth: V.value,
|
|
136
|
+
"has-children": "",
|
|
137
|
+
onClick: C(se, ["stop"])
|
|
138
|
+
}), u({
|
|
139
|
+
submenu: S(() => [d(o, {
|
|
140
|
+
name: A.value,
|
|
141
|
+
duration: k.value,
|
|
142
|
+
css: !1,
|
|
143
|
+
appear: "",
|
|
144
|
+
onEnter: ce,
|
|
145
|
+
onAfterEnter: le,
|
|
146
|
+
onLeave: ue,
|
|
147
|
+
onAfterLeave: de
|
|
148
|
+
}, {
|
|
149
|
+
default: S(() => {
|
|
150
|
+
var n;
|
|
151
|
+
return [K.value ? (_(), l("div", {
|
|
152
|
+
key: 0,
|
|
153
|
+
class: h([x(ae)("submenu")]),
|
|
154
|
+
style: g(W.value),
|
|
155
|
+
onClick: t[0] || (t[0] = C(() => {}, ["stop"]))
|
|
156
|
+
}, [d(a, {
|
|
157
|
+
class: h([x(T)(), x(E)(x(B), !!x(B))]),
|
|
158
|
+
options: (n = f.item) == null ? void 0 : n.children
|
|
159
|
+
}, {
|
|
160
|
+
default: S(() => [y(e.$slots, "default")]),
|
|
161
|
+
_: 3
|
|
162
|
+
}, 8, ["class", "options"])], 6)) : ee("", !0)];
|
|
163
|
+
}),
|
|
164
|
+
_: 3
|
|
165
|
+
}, 8, ["name", "duration"])]),
|
|
166
|
+
default: S(() => [y(e.$slots, "label", {}, () => [te(b(f.item.label), 1)])]),
|
|
167
|
+
_: 2
|
|
168
|
+
}, [G.value ? {
|
|
169
|
+
name: "item-submenu",
|
|
170
|
+
fn: S(() => [y(e.$slots, "default")]),
|
|
171
|
+
key: "0"
|
|
172
|
+
} : void 0]), 1040, ["class", "depth"]));
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
//#endregion
|
|
176
|
+
export { w as default };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Component, ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { BaseMapper, Theme } from '../../../types';
|
|
3
|
+
import { OffsetOptions, Trigger, Placement } from '../../tooltip';
|
|
4
|
+
export type MenuDirection = 'vertical' | 'horizontal';
|
|
5
|
+
export interface MenuProps {
|
|
6
|
+
options?: MenuOption[];
|
|
7
|
+
mapper?: MenuMapper;
|
|
8
|
+
direction?: MenuDirection;
|
|
9
|
+
theme?: Theme;
|
|
10
|
+
cssDuration?: number;
|
|
11
|
+
transition?: string;
|
|
12
|
+
collapse?: boolean;
|
|
13
|
+
offset?: OffsetOptions;
|
|
14
|
+
submenuOffset?: OffsetOptions;
|
|
15
|
+
closeOnSelect?: boolean;
|
|
16
|
+
openedKeys?: any[];
|
|
17
|
+
selectedKey?: any;
|
|
18
|
+
indent?: number | string;
|
|
19
|
+
labelPadding?: number | string;
|
|
20
|
+
accordion?: boolean;
|
|
21
|
+
trigger?: Trigger;
|
|
22
|
+
placement?: (direction: MenuDirection, depth: number, hasChild: boolean) => Placement;
|
|
23
|
+
showArrow?: (depth: number) => boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface MenuMapper extends BaseMapper {
|
|
26
|
+
}
|
|
27
|
+
export interface MenuEmits {
|
|
28
|
+
select: [value: any, item: MenuOption];
|
|
29
|
+
}
|
|
30
|
+
export interface MenuOption {
|
|
31
|
+
value: any;
|
|
32
|
+
label?: string;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
children?: MenuOption[];
|
|
35
|
+
hasChildren?: boolean;
|
|
36
|
+
icon?: string | Component;
|
|
37
|
+
subIcon?: string | Component;
|
|
38
|
+
depth?: number;
|
|
39
|
+
}
|
|
40
|
+
export interface Closer {
|
|
41
|
+
value: any;
|
|
42
|
+
close: () => void;
|
|
43
|
+
}
|
|
44
|
+
export interface MenuProvides {
|
|
45
|
+
select: (value: any, item: MenuOption, exeEmit?: boolean) => void;
|
|
46
|
+
currentItem: Ref<MenuOption | null>;
|
|
47
|
+
cssDuration: ComputedRef<number>;
|
|
48
|
+
transition: ComputedRef<string>;
|
|
49
|
+
collapse: ComputedRef<boolean>;
|
|
50
|
+
submenuSubscribers: SubmenuSubscriber[];
|
|
51
|
+
broadcastSelect: (val: any) => void;
|
|
52
|
+
unsubscribeSubmenu: (sub: SubmenuSubscriber) => void;
|
|
53
|
+
registerDescendant?: (value: MenuOption['value']) => void;
|
|
54
|
+
depth: Ref<number>;
|
|
55
|
+
hasOptions?: ComputedRef<boolean>;
|
|
56
|
+
openedKeys: Ref<any[]>;
|
|
57
|
+
offset?: ComputedRef<OffsetOptions>;
|
|
58
|
+
submenuOffset?: ComputedRef<OffsetOptions>;
|
|
59
|
+
closeOnSelect?: ComputedRef<boolean>;
|
|
60
|
+
submenuClosers?: Closer[];
|
|
61
|
+
direction?: ComputedRef<MenuDirection>;
|
|
62
|
+
selectedKey?: Ref<any>;
|
|
63
|
+
indent?: ComputedRef<number | string>;
|
|
64
|
+
labelPadding?: ComputedRef<number | string>;
|
|
65
|
+
accordion?: ComputedRef<boolean>;
|
|
66
|
+
topSubMenusKeys?: Ref<any[]>;
|
|
67
|
+
trigger?: ComputedRef<Trigger>;
|
|
68
|
+
placement?: (direction: MenuDirection, depth: number, hasChild: boolean) => Placement;
|
|
69
|
+
showArrow?: (depth: number) => boolean;
|
|
70
|
+
theme: ComputedRef<Theme>;
|
|
71
|
+
}
|
|
72
|
+
export interface SubmenuProps {
|
|
73
|
+
item?: MenuOption;
|
|
74
|
+
depth?: number;
|
|
75
|
+
}
|
|
76
|
+
export type SubmenuSubscriber = {
|
|
77
|
+
value: MenuOption['value'];
|
|
78
|
+
onSelectChange: (selectedValue: any) => void;
|
|
79
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -4,20 +4,19 @@ import { useNamespace as t } from "../../../composables/use-namespace/index.mjs"
|
|
|
4
4
|
import "../../../composables/index.mjs";
|
|
5
5
|
import { messageTypes as n, verticalPlacement as r } from "./constants.mjs";
|
|
6
6
|
import i from "./message.mjs";
|
|
7
|
-
import { createVNode as a, nextTick as o, render as s
|
|
8
|
-
import { useElementSize as l } from "@vueuse/core";
|
|
7
|
+
import { createVNode as a, nextTick as o, render as s } from "vue";
|
|
9
8
|
//#region packages/components/message/src/create-message.ts
|
|
10
|
-
var { ng:
|
|
11
|
-
let n =
|
|
9
|
+
var { ng: c } = t("message"), l = 0, u = {}, d = {}, f = (e, t) => {
|
|
10
|
+
let n = d[e] || [], r = t;
|
|
12
11
|
n.forEach((e) => {
|
|
13
12
|
var t;
|
|
14
13
|
(t = e.vnode) != null && (t = t.component) != null && (t = t.exposed) != null && t.setOffset && (e.vnode.component.exposed.setOffset(r), r += e.offset);
|
|
15
14
|
});
|
|
16
|
-
},
|
|
17
|
-
let a = n.getBoundingClientRect(), o =
|
|
15
|
+
}, p = (e, t, n, i) => {
|
|
16
|
+
let a = n.getBoundingClientRect(), o = u[e];
|
|
18
17
|
if (!o) return;
|
|
19
18
|
let { vnode: s } = o, c = r.includes(t) ? t : t.split("-")[0];
|
|
20
|
-
switch (
|
|
19
|
+
switch (d[t] || (d[t] = []), c) {
|
|
21
20
|
case "left-top":
|
|
22
21
|
case "left-bottom":
|
|
23
22
|
case "right-top":
|
|
@@ -25,7 +24,7 @@ var { ng: u } = t("message"), d = 0, f = {}, p = {}, m = (e, t) => {
|
|
|
25
24
|
case "top":
|
|
26
25
|
case "bottom": {
|
|
27
26
|
let n = i + a.height;
|
|
28
|
-
|
|
27
|
+
d[t].push({
|
|
29
28
|
offset: n,
|
|
30
29
|
id: e,
|
|
31
30
|
vnode: s
|
|
@@ -35,7 +34,7 @@ var { ng: u } = t("message"), d = 0, f = {}, p = {}, m = (e, t) => {
|
|
|
35
34
|
case "left":
|
|
36
35
|
case "right": {
|
|
37
36
|
let n = i + a.width;
|
|
38
|
-
|
|
37
|
+
d[t].push({
|
|
39
38
|
offset: n,
|
|
40
39
|
id: e,
|
|
41
40
|
vnode: s
|
|
@@ -43,16 +42,16 @@ var { ng: u } = t("message"), d = 0, f = {}, p = {}, m = (e, t) => {
|
|
|
43
42
|
break;
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
let n =
|
|
45
|
+
f(t, i);
|
|
46
|
+
}, m = (e, t) => {
|
|
47
|
+
let n = u[e];
|
|
49
48
|
if (!n || !n.placement) return;
|
|
50
|
-
let r =
|
|
49
|
+
let r = d[n.placement];
|
|
51
50
|
if (!r) return;
|
|
52
51
|
let i = r.findIndex((t) => t.id === e);
|
|
53
|
-
i > -1 && r.splice(i, 1),
|
|
54
|
-
},
|
|
55
|
-
let a =
|
|
52
|
+
i > -1 && r.splice(i, 1), f(n.placement, t), r.length === 0 && delete d[n.placement];
|
|
53
|
+
}, h = (e, t = 20) => (d[e] || []).reduce((e, t) => e + t.offset, 0) + t, g = (e, t, n, i) => {
|
|
54
|
+
let a = d[n];
|
|
56
55
|
if (!a) return;
|
|
57
56
|
let o = a.find((e) => e.id === t);
|
|
58
57
|
if (o) {
|
|
@@ -69,26 +68,28 @@ var { ng: u } = t("message"), d = 0, f = {}, p = {}, m = (e, t) => {
|
|
|
69
68
|
case "left":
|
|
70
69
|
case "right": o.offset = i + a.width;
|
|
71
70
|
}
|
|
72
|
-
|
|
71
|
+
f(n, i);
|
|
73
72
|
}
|
|
74
|
-
},
|
|
75
|
-
let
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
}, _ = (e, t, n, r) => {
|
|
74
|
+
let i = new ResizeObserver(() => {
|
|
75
|
+
g(e, t, n, r);
|
|
76
|
+
});
|
|
77
|
+
return i.observe(e), { stop: () => {
|
|
78
|
+
i && (i.disconnect(), i = null);
|
|
78
79
|
} };
|
|
79
|
-
},
|
|
80
|
+
}, v = (e) => {
|
|
80
81
|
var t;
|
|
81
82
|
let n = Object.assign({}, {
|
|
82
83
|
placement: "top",
|
|
83
84
|
offset: 16
|
|
84
|
-
},
|
|
85
|
+
}, y(e || {})), r = document.createElement("div"), d = c(`${l++}`), f = parseFloat(n.offset), g = h(n.placement, f), v = null, b = a(i, {
|
|
85
86
|
...n,
|
|
86
|
-
id:
|
|
87
|
-
offset:
|
|
87
|
+
id: d,
|
|
88
|
+
offset: g,
|
|
88
89
|
onBeforeEnter(e) {
|
|
89
90
|
var t;
|
|
90
91
|
o(() => {
|
|
91
|
-
|
|
92
|
+
p(d, n.placement, e, f), v = _(e, d, n.placement, f);
|
|
92
93
|
}), n == null || (t = n.onShow) == null || t.call(n, e);
|
|
93
94
|
},
|
|
94
95
|
onAfterEnter(e) {
|
|
@@ -97,41 +98,41 @@ var { ng: u } = t("message"), d = 0, f = {}, p = {}, m = (e, t) => {
|
|
|
97
98
|
},
|
|
98
99
|
onBeforeLeave(e) {
|
|
99
100
|
var t;
|
|
100
|
-
n == null || (t = n.onClose) == null || t.call(n, e),
|
|
101
|
+
n == null || (t = n.onClose) == null || t.call(n, e), m(d, f);
|
|
101
102
|
},
|
|
102
103
|
onAfterLeave(e) {
|
|
103
104
|
var t, i;
|
|
104
|
-
s(null, r), delete
|
|
105
|
+
s(null, r), delete u[d], n == null || (t = n.onClosed) == null || t.call(n, e), v == null || (i = v.stop) == null || i.call(v);
|
|
105
106
|
}
|
|
106
107
|
});
|
|
107
|
-
return s(
|
|
108
|
-
id:
|
|
108
|
+
return s(b, r), u[d] = {
|
|
109
|
+
id: d,
|
|
109
110
|
container: r,
|
|
110
|
-
vnode:
|
|
111
|
-
props: (
|
|
111
|
+
vnode: b,
|
|
112
|
+
props: (b == null || (t = b.component) == null ? void 0 : t.props) || {},
|
|
112
113
|
placement: n.placement,
|
|
113
|
-
actualOffset:
|
|
114
|
+
actualOffset: g,
|
|
114
115
|
close() {
|
|
115
116
|
var e;
|
|
116
|
-
(e =
|
|
117
|
+
(e = b.component) == null || (e = e.exposed) == null || e.close();
|
|
117
118
|
},
|
|
118
119
|
show() {
|
|
119
120
|
var e;
|
|
120
|
-
(e =
|
|
121
|
+
(e = b.component) == null || (e = e.exposed) == null || e.show();
|
|
121
122
|
}
|
|
122
|
-
},
|
|
123
|
-
},
|
|
123
|
+
}, u[d];
|
|
124
|
+
}, y = (t) => typeof t == "string" ? { content: t } : e(t) ? t : {};
|
|
124
125
|
n.forEach((e) => {
|
|
125
|
-
|
|
126
|
-
...
|
|
126
|
+
v[e] = (t) => v({
|
|
127
|
+
...y(t),
|
|
127
128
|
type: e
|
|
128
129
|
});
|
|
129
|
-
}),
|
|
130
|
-
Object.values(
|
|
130
|
+
}), v.closeAll = () => {
|
|
131
|
+
Object.values(u).forEach((e) => {
|
|
131
132
|
var t;
|
|
132
133
|
e == null || (t = e.close) == null || t.call(e);
|
|
133
134
|
});
|
|
134
135
|
};
|
|
135
|
-
var
|
|
136
|
+
var b = v;
|
|
136
137
|
//#endregion
|
|
137
|
-
export {
|
|
138
|
+
export { b as createMessage };
|
|
@@ -2,11 +2,11 @@ import { EmitFn } from 'vue';
|
|
|
2
2
|
import { MessageEmits } from './types';
|
|
3
3
|
export declare function useMessageEmits(emits: EmitFn<MessageEmits>): {
|
|
4
4
|
beforeEnter: (el: HTMLElement) => void;
|
|
5
|
-
enter: (el: HTMLElement, done:
|
|
5
|
+
enter: (el: HTMLElement, done: () => void) => void;
|
|
6
6
|
enterCancelled: (el: HTMLElement) => void;
|
|
7
7
|
afterEnter: (el: HTMLElement) => void;
|
|
8
8
|
beforeLeave: (el: HTMLElement) => void;
|
|
9
|
-
leave: (el: HTMLElement, done:
|
|
9
|
+
leave: (el: HTMLElement, done: () => void) => void;
|
|
10
10
|
leaveCancelled: (el: HTMLElement) => void;
|
|
11
11
|
afterLeave: (el: HTMLElement) => void;
|
|
12
12
|
};
|