rappel-ui 1.0.38 → 1.0.40
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/cjs/components/dropdown/src/dropdown-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/dropdown/src/dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/dropdown/src/types.d.ts +6 -6
- package/cjs/components/menu/index.d.ts +46 -4
- package/cjs/components/menu/src/loop.vue.d.ts +8 -3
- package/cjs/components/menu/src/loop.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/menu/src/menu-item.vue.d.ts +16 -2
- package/cjs/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/menu/src/menu.vue.d.ts +3 -1
- package/cjs/components/menu/src/menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/menu/src/submenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/menu/src/types.d.ts +17 -13
- package/cjs/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/popover/src/popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/composables/index.d.ts +1 -1
- package/cjs/composables/index.js +1 -1
- package/cjs/composables/{use-slot-node → use-slot-nodes}/index.d.ts +1 -0
- package/cjs/composables/use-slot-nodes/index.js +1 -0
- package/cjs/composables/use-theme/index.js +1 -1
- package/cjs/index.d.ts +44 -3
- package/cjs/index.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.umd.js +9 -9
- package/es/components/dropdown/src/dropdown-item.vue_vue_type_script_setup_true_lang.mjs +20 -20
- package/es/components/dropdown/src/dropdown.vue_vue_type_script_setup_true_lang.mjs +7 -3
- package/es/components/dropdown/src/types.d.ts +6 -6
- package/es/components/menu/index.d.ts +46 -4
- package/es/components/menu/src/loop.vue.d.ts +8 -3
- package/es/components/menu/src/loop.vue_vue_type_script_setup_true_lang.mjs +108 -13
- package/es/components/menu/src/menu-item.vue.d.ts +16 -2
- package/es/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.mjs +169 -195
- package/es/components/menu/src/menu.vue.d.ts +3 -1
- package/es/components/menu/src/menu.vue_vue_type_script_setup_true_lang.mjs +72 -60
- package/es/components/menu/src/submenu.vue_vue_type_script_setup_true_lang.mjs +73 -105
- package/es/components/menu/src/types.d.ts +17 -13
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs +7 -3
- package/es/components/popover/src/popover.vue_vue_type_script_setup_true_lang.mjs +7 -3
- package/es/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/composables/index.d.ts +1 -1
- package/es/composables/index.mjs +2 -2
- package/es/composables/{use-slot-node → use-slot-nodes}/index.d.ts +1 -0
- package/es/composables/use-slot-nodes/index.mjs +14 -0
- package/es/composables/use-theme/index.mjs +1 -1
- package/es/index.d.ts +44 -3
- package/es/index.mjs +70 -70
- package/package.json +7 -3
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/re-menu.css +1 -1
- package/theme-chalk/re-popconfirm.css +1 -1
- package/theme-chalk/re-popover.css +1 -1
- package/theme-chalk/src/css-vars/_menu.scss +1 -0
- package/theme-chalk/src/css-vars/_popconfirm.scss +4 -1
- package/theme-chalk/src/css-vars/_popover.scss +4 -1
- package/theme-chalk/src/menu.scss +12 -0
- package/theme-chalk/src/mixins/_popconfirm.scss +5 -0
- package/theme-chalk/src/mixins/_popover.scss +5 -0
- package/theme-chalk/src/popconfirm.scss +2 -0
- package/theme-chalk/src/popover.scss +2 -0
- package/cjs/composables/use-slot-node/index.js +0 -1
- package/es/composables/use-slot-node/index.mjs +0 -10
|
@@ -6,89 +6,55 @@ import "../../../composables/index.mjs";
|
|
|
6
6
|
import { _menuProvideKey as r } from "./constants.mjs";
|
|
7
7
|
import i from "./menu-item.mjs";
|
|
8
8
|
import a from "./loop.mjs";
|
|
9
|
-
import { Transition as
|
|
9
|
+
import { Transition as ee, computed as o, createBlock as te, createCommentVNode as ne, createElementBlock as re, createSlots as s, createTextVNode as ie, createVNode as c, defineComponent as l, inject as u, mergeProps as d, normalizeClass as f, normalizeStyle as p, onUnmounted as m, openBlock as h, provide as g, ref as _, renderSlot as v, toDisplayString as ae, unref as y, watch as oe, withCtx as b, withModifiers as x } from "vue";
|
|
10
10
|
//#region packages/components/menu/src/submenu.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var
|
|
11
|
+
var S = l({
|
|
12
12
|
name: "ReSubmenu",
|
|
13
13
|
__name: "submenu",
|
|
14
14
|
props: {
|
|
15
15
|
item: { default: () => ({ value: void 0 }) },
|
|
16
16
|
depth: { default: () => void 0 }
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
|
|
20
|
-
let { n: T, ns: ae, is: E } = t("menu"), D = p(r), O = s(() => {
|
|
18
|
+
setup(l) {
|
|
19
|
+
let { n: S, ns: C, is: w } = t("menu"), T = u(r), { currentItem: E, cssDuration: D, transition: se, collapse: O, depth: k, hasOptions: A, direction: j, selectedKey: M, indent: N, accordion: P, topSubMenusKeys: F, theme: I, openedKeys: L, registerDescendant: R, submenuSubscribers: z, unsubscribeSubmenu: B } = T, { currentTheme: V } = n(I.value, !1), H = o(() => {
|
|
21
20
|
var e;
|
|
22
|
-
return
|
|
23
|
-
}),
|
|
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(() => {
|
|
21
|
+
return (e = l.depth) == null ? k.value : e;
|
|
22
|
+
}), U = (e, t) => Array.isArray(e.children) && e.children.length > 0 ? e.children.some((e) => U(e, t)) : e.value === t, W = o(() => {
|
|
57
23
|
var e, t, n;
|
|
58
|
-
let r = (e = (t =
|
|
59
|
-
return (n =
|
|
60
|
-
}),
|
|
24
|
+
let r = (e = (t = E.value) == null ? void 0 : t.value) == null ? M.value : e;
|
|
25
|
+
return (n = l.item.children) != null && n.length ? U(l.item, r) : Z.value;
|
|
26
|
+
}), G = o(() => [w("selected", W.value), w("opened", K.value)]), ce = o(() => [{ "padding-left": e(N.value) }]), le = o(() => {
|
|
61
27
|
var e;
|
|
62
|
-
return (e =
|
|
63
|
-
}), K =
|
|
28
|
+
return (e = l.item) != null && e.disabled || A.value ? !1 : j.value === "horizontal" || j.value === "vertical" && O.value;
|
|
29
|
+
}), K = _(!1), ue = o(() => {
|
|
64
30
|
var e;
|
|
65
|
-
return
|
|
31
|
+
return j.value === "vertical" && (L == null || (e = L.value) == null ? void 0 : e.includes(l.item.value)) && !O.value && !l.item.disabled;
|
|
66
32
|
});
|
|
67
|
-
|
|
33
|
+
oe(() => ue.value, (e) => {
|
|
68
34
|
K.value = !!e;
|
|
69
35
|
}, { immediate: !0 });
|
|
70
|
-
let
|
|
36
|
+
let q = (e) => {
|
|
71
37
|
var t, n;
|
|
72
|
-
let r = (t =
|
|
38
|
+
let r = (t = L == null || (n = L.value) == null ? void 0 : n.indexOf(e)) == null ? -1 : t;
|
|
73
39
|
if (r > -1) {
|
|
74
40
|
var i;
|
|
75
|
-
|
|
41
|
+
L == null || (i = L.value) == null || i.splice(r, 1);
|
|
76
42
|
}
|
|
77
|
-
},
|
|
43
|
+
}, J = () => {
|
|
78
44
|
var e;
|
|
79
|
-
if (!(
|
|
45
|
+
if (!(j.value === "horizontal" || O.value || (e = l.item) != null && e.disabled)) {
|
|
80
46
|
if (K.value = !K.value, K.value) {
|
|
81
47
|
var t;
|
|
82
|
-
if (
|
|
48
|
+
if (P.value && H.value === 0) {
|
|
83
49
|
var n, r;
|
|
84
|
-
|
|
50
|
+
L == null || (n = L.value) == null || n.forEach((e) => {
|
|
85
51
|
var t;
|
|
86
|
-
(t =
|
|
87
|
-
}),
|
|
52
|
+
(t = F.value) != null && t.includes(e) && q(e);
|
|
53
|
+
}), L == null || (r = L.value) == null || r.push(l.item.value);
|
|
88
54
|
return;
|
|
89
55
|
}
|
|
90
|
-
|
|
91
|
-
} else
|
|
56
|
+
L == null || (t = L.value) == null || t.push(l.item.value);
|
|
57
|
+
} else q(l.item.value);
|
|
92
58
|
}
|
|
93
59
|
}, Y = null, X = (e, t) => {
|
|
94
60
|
let n = !1, r = (e) => {
|
|
@@ -100,77 +66,79 @@ var w = f({
|
|
|
100
66
|
};
|
|
101
67
|
Y && (clearTimeout(Y), Y = null), Y = setTimeout(() => {
|
|
102
68
|
n || (i(), Y && (clearTimeout(Y), Y = null));
|
|
103
|
-
},
|
|
104
|
-
},
|
|
69
|
+
}, D.value ? D.value + 20 : 0);
|
|
70
|
+
}, de = (e, t) => {
|
|
105
71
|
e.style.height = "0px", e.offsetHeight, e.style.height = `${e.scrollHeight}px`, X(e, t);
|
|
106
|
-
},
|
|
72
|
+
}, fe = (e) => {
|
|
107
73
|
e.style.height = "auto";
|
|
108
|
-
},
|
|
74
|
+
}, pe = (e, t) => {
|
|
109
75
|
e.style.height = `${e.scrollHeight}px`, e.offsetHeight, e.style.height = "0px", X(e, t);
|
|
110
|
-
},
|
|
76
|
+
}, me = (e) => {
|
|
111
77
|
e.style.height = "";
|
|
112
|
-
}, Z =
|
|
113
|
-
|
|
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,
|
|
78
|
+
}, Z = _(!1), Q = _(new Set()), he = (e) => (Q.value.add(e), ge(), R == null ? void 0 : R(e)), $ = {
|
|
79
|
+
value: l.item.value,
|
|
117
80
|
onSelectChange: (e) => {
|
|
118
81
|
Z.value = Q.value.has(e);
|
|
119
82
|
}
|
|
120
|
-
},
|
|
83
|
+
}, ge = () => {
|
|
121
84
|
var e;
|
|
122
|
-
|
|
85
|
+
A.value || Q.value.has((e = E.value) == null ? void 0 : e.value) && (Z.value = !0);
|
|
123
86
|
};
|
|
124
|
-
return
|
|
125
|
-
...
|
|
126
|
-
registerDescendant:
|
|
127
|
-
depth:
|
|
128
|
-
var e
|
|
129
|
-
return ((e =
|
|
87
|
+
return z == null || z.push($), g(r, {
|
|
88
|
+
...T,
|
|
89
|
+
registerDescendant: he,
|
|
90
|
+
depth: o(() => {
|
|
91
|
+
var e;
|
|
92
|
+
return ((e = k == null ? void 0 : k.value) == null ? 0 : e) + 1;
|
|
130
93
|
})
|
|
131
|
-
}),
|
|
132
|
-
|
|
133
|
-
}), (e, t) => (
|
|
134
|
-
class:
|
|
135
|
-
depth:
|
|
94
|
+
}), m(() => {
|
|
95
|
+
B == null || B($);
|
|
96
|
+
}), (e, t) => (h(), te(i, d(l.item, {
|
|
97
|
+
class: G.value,
|
|
98
|
+
depth: H.value,
|
|
99
|
+
"is-more": e.$attrs["is-more"],
|
|
136
100
|
"has-children": "",
|
|
137
|
-
onClick:
|
|
138
|
-
}),
|
|
139
|
-
submenu:
|
|
140
|
-
name:
|
|
141
|
-
duration:
|
|
101
|
+
onClick: x(J, ["stop"])
|
|
102
|
+
}), s({
|
|
103
|
+
submenu: b(() => [c(ee, {
|
|
104
|
+
name: y(se),
|
|
105
|
+
duration: y(D),
|
|
142
106
|
css: !1,
|
|
143
107
|
appear: "",
|
|
144
|
-
onEnter:
|
|
145
|
-
onAfterEnter:
|
|
146
|
-
onLeave:
|
|
147
|
-
onAfterLeave:
|
|
108
|
+
onEnter: de,
|
|
109
|
+
onAfterEnter: fe,
|
|
110
|
+
onLeave: pe,
|
|
111
|
+
onAfterLeave: me
|
|
148
112
|
}, {
|
|
149
|
-
default:
|
|
113
|
+
default: b(() => {
|
|
150
114
|
var n;
|
|
151
|
-
return [K.value ? (
|
|
115
|
+
return [K.value ? (h(), re("div", {
|
|
152
116
|
key: 0,
|
|
153
|
-
class:
|
|
154
|
-
style:
|
|
155
|
-
onClick: t[0] || (t[0] =
|
|
156
|
-
}, [
|
|
157
|
-
class:
|
|
158
|
-
options: (n =
|
|
117
|
+
class: f([y(C)("submenu")]),
|
|
118
|
+
style: p(ce.value),
|
|
119
|
+
onClick: t[0] || (t[0] = x(() => {}, ["stop"]))
|
|
120
|
+
}, [c(a, {
|
|
121
|
+
class: f([y(S)(), y(w)(y(V), !!y(V))]),
|
|
122
|
+
options: (n = l.item) == null ? void 0 : n.children
|
|
159
123
|
}, {
|
|
160
|
-
default:
|
|
124
|
+
default: b(() => [v(e.$slots, "default")]),
|
|
161
125
|
_: 3
|
|
162
|
-
}, 8, ["class", "options"])], 6)) :
|
|
126
|
+
}, 8, ["class", "options"])], 6)) : ne("", !0)];
|
|
163
127
|
}),
|
|
164
128
|
_: 3
|
|
165
129
|
}, 8, ["name", "duration"])]),
|
|
166
|
-
default:
|
|
130
|
+
default: b(() => [v(e.$slots, "label", {}, () => [ie(ae(l.item.label), 1)])]),
|
|
167
131
|
_: 2
|
|
168
|
-
}, [
|
|
132
|
+
}, [le.value ? {
|
|
169
133
|
name: "item-submenu",
|
|
170
|
-
fn:
|
|
134
|
+
fn: b(() => [v(e.$slots, "default")]),
|
|
171
135
|
key: "0"
|
|
172
|
-
} : void 0]), 1040, [
|
|
136
|
+
} : void 0]), 1040, [
|
|
137
|
+
"class",
|
|
138
|
+
"depth",
|
|
139
|
+
"is-more"
|
|
140
|
+
]));
|
|
173
141
|
}
|
|
174
142
|
});
|
|
175
143
|
//#endregion
|
|
176
|
-
export {
|
|
144
|
+
export { S as default };
|
|
@@ -10,6 +10,7 @@ export interface MenuProps {
|
|
|
10
10
|
cssDuration?: number;
|
|
11
11
|
transition?: string;
|
|
12
12
|
collapse?: boolean;
|
|
13
|
+
ellipsis?: boolean;
|
|
13
14
|
offset?: OffsetOptions;
|
|
14
15
|
submenuOffset?: OffsetOptions;
|
|
15
16
|
closeOnSelect?: boolean;
|
|
@@ -19,6 +20,7 @@ export interface MenuProps {
|
|
|
19
20
|
labelPadding?: number | string;
|
|
20
21
|
accordion?: boolean;
|
|
21
22
|
trigger?: Trigger;
|
|
23
|
+
ellipsisIcon?: string | Component;
|
|
22
24
|
placement?: (direction: MenuDirection, depth: number, hasChild: boolean) => Placement;
|
|
23
25
|
showArrow?: (depth: number) => boolean;
|
|
24
26
|
}
|
|
@@ -34,7 +36,7 @@ export interface MenuOption {
|
|
|
34
36
|
children?: MenuOption[];
|
|
35
37
|
hasChildren?: boolean;
|
|
36
38
|
icon?: string | Component;
|
|
37
|
-
subIcon?: string | Component;
|
|
39
|
+
subIcon?: string | Component | false;
|
|
38
40
|
depth?: number;
|
|
39
41
|
}
|
|
40
42
|
export interface Closer {
|
|
@@ -52,22 +54,24 @@ export interface MenuProvides {
|
|
|
52
54
|
unsubscribeSubmenu: (sub: SubmenuSubscriber) => void;
|
|
53
55
|
registerDescendant?: (value: MenuOption['value']) => void;
|
|
54
56
|
depth: Ref<number>;
|
|
55
|
-
hasOptions
|
|
57
|
+
hasOptions: ComputedRef<boolean>;
|
|
56
58
|
openedKeys: Ref<any[]>;
|
|
57
|
-
offset
|
|
58
|
-
submenuOffset
|
|
59
|
-
closeOnSelect
|
|
60
|
-
submenuClosers
|
|
61
|
-
direction
|
|
62
|
-
selectedKey
|
|
63
|
-
indent
|
|
64
|
-
labelPadding
|
|
65
|
-
accordion
|
|
66
|
-
topSubMenusKeys
|
|
67
|
-
trigger
|
|
59
|
+
offset: ComputedRef<OffsetOptions>;
|
|
60
|
+
submenuOffset: ComputedRef<OffsetOptions>;
|
|
61
|
+
closeOnSelect: ComputedRef<boolean>;
|
|
62
|
+
submenuClosers: Closer[];
|
|
63
|
+
direction: ComputedRef<MenuDirection>;
|
|
64
|
+
selectedKey: Ref<any>;
|
|
65
|
+
indent: ComputedRef<number | string>;
|
|
66
|
+
labelPadding: ComputedRef<number | string>;
|
|
67
|
+
accordion: ComputedRef<boolean>;
|
|
68
|
+
topSubMenusKeys: Ref<any[]>;
|
|
69
|
+
trigger: ComputedRef<Trigger>;
|
|
68
70
|
placement?: (direction: MenuDirection, depth: number, hasChild: boolean) => Placement;
|
|
69
71
|
showArrow?: (depth: number) => boolean;
|
|
70
72
|
theme: ComputedRef<Theme>;
|
|
73
|
+
ellipsis: ComputedRef<boolean>;
|
|
74
|
+
ellipsisIcon?: ComputedRef<string | Component | undefined>;
|
|
71
75
|
}
|
|
72
76
|
export interface SubmenuProps {
|
|
73
77
|
item?: MenuOption;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../composables/use-namespace/index.mjs";
|
|
2
|
-
import { useSlotFirstNode as t } from "../../../composables/use-slot-
|
|
2
|
+
import { useSlotFirstNode as t } from "../../../composables/use-slot-nodes/index.mjs";
|
|
3
3
|
import "../../../composables/index.mjs";
|
|
4
4
|
import { usePopconfirmEmits as n } from "./use-popconfirm-emit.mjs";
|
|
5
5
|
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, normalizeClass as p, openBlock as m, renderSlot as h, resolveComponent as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, useModel as b, useSlots as x, useTemplateRef as S, withCtx as C } from "vue";
|
|
@@ -93,7 +93,10 @@ var E = ["innerHTML"], D = d({
|
|
|
93
93
|
default: !0
|
|
94
94
|
},
|
|
95
95
|
cssDuration: { default: 300 },
|
|
96
|
-
appear: {
|
|
96
|
+
appear: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: !0
|
|
99
|
+
},
|
|
97
100
|
arrowSize: { default: 8 },
|
|
98
101
|
arrowOffset: { default: 4 },
|
|
99
102
|
arrowOptions: { default: () => void 0 },
|
|
@@ -165,6 +168,7 @@ var E = ["innerHTML"], D = d({
|
|
|
165
168
|
"hide-delay": d.hideDelay,
|
|
166
169
|
transition: d.transition,
|
|
167
170
|
"css-duration": d.cssDuration,
|
|
171
|
+
appear: d.appear,
|
|
168
172
|
"css-transition": d.cssTransition,
|
|
169
173
|
"show-arrow": d.showArrow,
|
|
170
174
|
offset: d.offset,
|
|
@@ -259,7 +263,7 @@ var E = ["innerHTML"], D = d({
|
|
|
259
263
|
]),
|
|
260
264
|
default: C(() => [(m(), a(_(H.value)))]),
|
|
261
265
|
_: 3
|
|
262
|
-
}, 8, "visible.width.height.max-width.max-height.floating-class.floating-style.disabled.theme.placement.trigger.reverse-theme.show-delay.hide-delay.transition.css-duration.css-transition.show-arrow.offset.teleported.append-to.persistent.boundary.element-context.alt-boundary.root-boundary.arrow-size.arrow-offset.flip-offset.arrow-options.flip-options.inline-options.is-external.external-ref.is-virtual.virtual-ref.onBeforeEnter.onEnter.onAfterEnter.onBeforeLeave.onLeave.onAfterLeave.onEnterCancelled.onLeaveCancelled".split("."));
|
|
266
|
+
}, 8, "visible.width.height.max-width.max-height.floating-class.floating-style.disabled.theme.placement.trigger.reverse-theme.show-delay.hide-delay.transition.css-duration.appear.css-transition.show-arrow.offset.teleported.append-to.persistent.boundary.element-context.alt-boundary.root-boundary.arrow-size.arrow-offset.flip-offset.arrow-options.flip-options.inline-options.is-external.external-ref.is-virtual.virtual-ref.onBeforeEnter.onEnter.onAfterEnter.onBeforeLeave.onLeave.onAfterLeave.onEnterCancelled.onLeaveCancelled".split("."));
|
|
263
267
|
};
|
|
264
268
|
}
|
|
265
269
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../composables/use-namespace/index.mjs";
|
|
2
|
-
import { useSlotFirstNode as t } from "../../../composables/use-slot-
|
|
2
|
+
import { useSlotFirstNode as t } from "../../../composables/use-slot-nodes/index.mjs";
|
|
3
3
|
import "../../../composables/index.mjs";
|
|
4
4
|
import { usePopoverEmits as n } from "./use-popover-emit.mjs";
|
|
5
5
|
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, defineComponent as s, mergeModels as c, normalizeClass as l, openBlock as u, renderSlot as d, resolveComponent as f, resolveDynamicComponent as p, toDisplayString as m, unref as h, useModel as g, useSlots as _, withCtx as v } from "vue";
|
|
@@ -84,7 +84,10 @@ var y = ["innerHTML"], b = s({
|
|
|
84
84
|
default: !0
|
|
85
85
|
},
|
|
86
86
|
cssDuration: { default: 300 },
|
|
87
|
-
appear: {
|
|
87
|
+
appear: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: !0
|
|
90
|
+
},
|
|
88
91
|
arrowSize: { default: 8 },
|
|
89
92
|
arrowOffset: { default: 4 },
|
|
90
93
|
arrowOptions: { default: () => void 0 },
|
|
@@ -143,6 +146,7 @@ var y = ["innerHTML"], b = s({
|
|
|
143
146
|
transition: s.transition,
|
|
144
147
|
"css-duration": s.cssDuration,
|
|
145
148
|
"css-transition": s.cssTransition,
|
|
149
|
+
appear: s.appear,
|
|
146
150
|
"show-arrow": s.showArrow,
|
|
147
151
|
offset: s.offset,
|
|
148
152
|
teleported: s.teleported,
|
|
@@ -184,7 +188,7 @@ var y = ["innerHTML"], b = s({
|
|
|
184
188
|
}, m(s.content), 3))])]),
|
|
185
189
|
default: v(() => [(u(), i(p(N.value)))]),
|
|
186
190
|
_: 3
|
|
187
|
-
}, 8, "visible.width.height.max-width.max-height.floating-class.floating-style.disabled.theme.placement.trigger.reverse-theme.show-delay.hide-delay.transition.css-duration.css-transition.show-arrow.offset.teleported.append-to.persistent.boundary.element-context.alt-boundary.root-boundary.arrow-size.arrow-offset.flip-offset.arrow-options.flip-options.inline-options.is-external.external-ref.is-virtual.virtual-ref.onBeforeEnter.onEnter.onAfterEnter.onBeforeLeave.onLeave.onAfterLeave.onEnterCancelled.onLeaveCancelled".split("."));
|
|
191
|
+
}, 8, "visible.width.height.max-width.max-height.floating-class.floating-style.disabled.theme.placement.trigger.reverse-theme.show-delay.hide-delay.transition.css-duration.css-transition.appear.show-arrow.offset.teleported.append-to.persistent.boundary.element-context.alt-boundary.root-boundary.arrow-size.arrow-offset.flip-offset.arrow-options.flip-options.inline-options.is-external.external-ref.is-virtual.virtual-ref.onBeforeEnter.onEnter.onAfterEnter.onBeforeLeave.onLeave.onAfterLeave.onEnterCancelled.onLeaveCancelled".split("."));
|
|
188
192
|
};
|
|
189
193
|
}
|
|
190
194
|
});
|
|
@@ -3,7 +3,7 @@ import "../../../utils/index.mjs";
|
|
|
3
3
|
import { useNamespace as n } from "../../../composables/use-namespace/index.mjs";
|
|
4
4
|
import { useZIndex as r } from "../../../composables/use-z-index/index.mjs";
|
|
5
5
|
import { useTheme as ee } from "../../../composables/use-theme/index.mjs";
|
|
6
|
-
import { useSlotFirstNode as te } from "../../../composables/use-slot-
|
|
6
|
+
import { useSlotFirstNode as te } from "../../../composables/use-slot-nodes/index.mjs";
|
|
7
7
|
import "../../../composables/index.mjs";
|
|
8
8
|
import { ReTransition as ne } from "../../transition/index.mjs";
|
|
9
9
|
import { useTooltipEmits as i } from "./use-tooltip-emit.mjs";
|
package/es/composables/index.mjs
CHANGED
|
@@ -6,5 +6,5 @@ import { useWaterFallLayout as i } from "./use-waterfall-layout/index.mjs";
|
|
|
6
6
|
import { useNamespace as a } from "./use-namespace/index.mjs";
|
|
7
7
|
import { useZIndex as o } from "./use-z-index/index.mjs";
|
|
8
8
|
import { useTheme as s } from "./use-theme/index.mjs";
|
|
9
|
-
import { useSlotFirstNode as c } from "./use-slot-
|
|
10
|
-
export { t as useDateFormat, e as useDraggable, a as useNamespace, n as useOnceFn, c as useSlotFirstNode, s as useTheme, r as useTimeNodes, i as useWaterFallLayout, o as useZIndex };
|
|
9
|
+
import { useSlotFirstNode as c, useSlotNodes as l } from "./use-slot-nodes/index.mjs";
|
|
10
|
+
export { t as useDateFormat, e as useDraggable, a as useNamespace, n as useOnceFn, c as useSlotFirstNode, l as useSlotNodes, s as useTheme, r as useTimeNodes, i as useWaterFallLayout, o as useZIndex };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { filterNodeTypes as e } from "../../constants/index.mjs";
|
|
2
|
+
import { h as t, isVNode as n } from "vue";
|
|
3
|
+
//#region packages/composables/use-slot-nodes/index.ts
|
|
4
|
+
function r(t, r = "default") {
|
|
5
|
+
var i;
|
|
6
|
+
return t == null || (i = t[r]) == null || (i = i.call(t)) == null ? void 0 : i.filter((t) => n(t) && !e.includes(t.type.toString()));
|
|
7
|
+
}
|
|
8
|
+
function i(e, n = "default") {
|
|
9
|
+
var i, a;
|
|
10
|
+
let o = (i = r(e, n)) == null ? void 0 : i[0];
|
|
11
|
+
return (o == null || (a = o.type) == null ? void 0 : a.toString()) === "Symbol(v-txt)" ? t("span", {}, o) : o;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { i as useSlotFirstNode, r as useSlotNodes };
|
|
@@ -14,7 +14,7 @@ function o(e = "light", n = !1) {
|
|
|
14
14
|
let i = r(a);
|
|
15
15
|
return {
|
|
16
16
|
isDark: a,
|
|
17
|
-
currentTheme: t(() => e === "auto" ? n ? a.value ? "light" : "dark" :
|
|
17
|
+
currentTheme: t(() => e === "auto" ? n ? a.value ? "light" : "dark" : e : n ? e === "dark" ? "light" : "dark" : e),
|
|
18
18
|
toggle: i
|
|
19
19
|
};
|
|
20
20
|
}
|
package/es/index.d.ts
CHANGED
|
@@ -2054,6 +2054,8 @@ declare const _default: {
|
|
|
2054
2054
|
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
2055
2055
|
$slots: {
|
|
2056
2056
|
default?: (props: {}) => any;
|
|
2057
|
+
} & {
|
|
2058
|
+
'ellipsis-icon'?: (props: {}) => any;
|
|
2057
2059
|
};
|
|
2058
2060
|
});
|
|
2059
2061
|
ReSubmenu: {
|
|
@@ -2078,18 +2080,57 @@ declare const _default: {
|
|
|
2078
2080
|
};
|
|
2079
2081
|
});
|
|
2080
2082
|
ReMenuItem: {
|
|
2081
|
-
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<components.MenuOption> & Readonly<{}>, {
|
|
2083
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<components.MenuOption> & Readonly<{}>, {
|
|
2084
|
+
itemRef: Readonly< ShallowRef<HTMLLIElement | null, HTMLLIElement | null>>;
|
|
2085
|
+
hasChild: ComputedRef<boolean>;
|
|
2086
|
+
showArrow: ComputedRef<boolean>;
|
|
2087
|
+
placement: ComputedRef<components.Placement>;
|
|
2088
|
+
visible: Ref<boolean, boolean>;
|
|
2089
|
+
value: any;
|
|
2090
|
+
label: string | undefined;
|
|
2091
|
+
disabled: boolean | undefined;
|
|
2092
|
+
icon: string | Component;
|
|
2093
|
+
subIcon: string | false | Component | undefined;
|
|
2094
|
+
depth: number;
|
|
2095
|
+
children: components.MenuOption[];
|
|
2096
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
2082
2097
|
P: {};
|
|
2083
2098
|
B: {};
|
|
2084
2099
|
D: {};
|
|
2085
2100
|
C: {};
|
|
2086
2101
|
M: {};
|
|
2087
2102
|
Defaults: {};
|
|
2088
|
-
}, Readonly<components.MenuOption> & Readonly<{}>, {
|
|
2103
|
+
}, Readonly<components.MenuOption> & Readonly<{}>, {
|
|
2104
|
+
itemRef: Readonly< ShallowRef<HTMLLIElement | null, HTMLLIElement | null>>;
|
|
2105
|
+
hasChild: ComputedRef<boolean>;
|
|
2106
|
+
showArrow: ComputedRef<boolean>;
|
|
2107
|
+
placement: ComputedRef<components.Placement>;
|
|
2108
|
+
visible: Ref<boolean, boolean>;
|
|
2109
|
+
value: any;
|
|
2110
|
+
label: string | undefined;
|
|
2111
|
+
disabled: boolean | undefined;
|
|
2112
|
+
icon: string | Component;
|
|
2113
|
+
subIcon: string | false | Component | undefined;
|
|
2114
|
+
depth: number;
|
|
2115
|
+
children: components.MenuOption[];
|
|
2116
|
+
}, {}, {}, {}, {}>;
|
|
2089
2117
|
__isFragment?: never;
|
|
2090
2118
|
__isTeleport?: never;
|
|
2091
2119
|
__isSuspense?: never;
|
|
2092
|
-
} & ComponentOptionsBase<Readonly<components.MenuOption> & Readonly<{}>, {
|
|
2120
|
+
} & ComponentOptionsBase<Readonly<components.MenuOption> & Readonly<{}>, {
|
|
2121
|
+
itemRef: Readonly< ShallowRef<HTMLLIElement | null, HTMLLIElement | null>>;
|
|
2122
|
+
hasChild: ComputedRef<boolean>;
|
|
2123
|
+
showArrow: ComputedRef<boolean>;
|
|
2124
|
+
placement: ComputedRef<components.Placement>;
|
|
2125
|
+
visible: Ref<boolean, boolean>;
|
|
2126
|
+
value: any;
|
|
2127
|
+
label: string | undefined;
|
|
2128
|
+
disabled: boolean | undefined;
|
|
2129
|
+
icon: string | Component;
|
|
2130
|
+
subIcon: string | false | Component | undefined;
|
|
2131
|
+
depth: number;
|
|
2132
|
+
children: components.MenuOption[];
|
|
2133
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
2093
2134
|
$slots: {
|
|
2094
2135
|
icon?: (props: {}) => any;
|
|
2095
2136
|
} & {
|