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.
Files changed (61) hide show
  1. package/cjs/components/dropdown/src/dropdown-item.vue_vue_type_script_setup_true_lang.js +1 -1
  2. package/cjs/components/dropdown/src/dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
  3. package/cjs/components/dropdown/src/types.d.ts +6 -6
  4. package/cjs/components/menu/index.d.ts +46 -4
  5. package/cjs/components/menu/src/loop.vue.d.ts +8 -3
  6. package/cjs/components/menu/src/loop.vue_vue_type_script_setup_true_lang.js +1 -1
  7. package/cjs/components/menu/src/menu-item.vue.d.ts +16 -2
  8. package/cjs/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.js +1 -1
  9. package/cjs/components/menu/src/menu.vue.d.ts +3 -1
  10. package/cjs/components/menu/src/menu.vue_vue_type_script_setup_true_lang.js +1 -1
  11. package/cjs/components/menu/src/submenu.vue_vue_type_script_setup_true_lang.js +1 -1
  12. package/cjs/components/menu/src/types.d.ts +17 -13
  13. package/cjs/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.js +1 -1
  14. package/cjs/components/popover/src/popover.vue_vue_type_script_setup_true_lang.js +1 -1
  15. package/cjs/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
  16. package/cjs/composables/index.d.ts +1 -1
  17. package/cjs/composables/index.js +1 -1
  18. package/cjs/composables/{use-slot-node → use-slot-nodes}/index.d.ts +1 -0
  19. package/cjs/composables/use-slot-nodes/index.js +1 -0
  20. package/cjs/composables/use-theme/index.js +1 -1
  21. package/cjs/index.d.ts +44 -3
  22. package/cjs/index.js +1 -1
  23. package/dist/index.css +1 -1
  24. package/dist/index.umd.js +9 -9
  25. package/es/components/dropdown/src/dropdown-item.vue_vue_type_script_setup_true_lang.mjs +20 -20
  26. package/es/components/dropdown/src/dropdown.vue_vue_type_script_setup_true_lang.mjs +7 -3
  27. package/es/components/dropdown/src/types.d.ts +6 -6
  28. package/es/components/menu/index.d.ts +46 -4
  29. package/es/components/menu/src/loop.vue.d.ts +8 -3
  30. package/es/components/menu/src/loop.vue_vue_type_script_setup_true_lang.mjs +108 -13
  31. package/es/components/menu/src/menu-item.vue.d.ts +16 -2
  32. package/es/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.mjs +169 -195
  33. package/es/components/menu/src/menu.vue.d.ts +3 -1
  34. package/es/components/menu/src/menu.vue_vue_type_script_setup_true_lang.mjs +72 -60
  35. package/es/components/menu/src/submenu.vue_vue_type_script_setup_true_lang.mjs +73 -105
  36. package/es/components/menu/src/types.d.ts +17 -13
  37. package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs +7 -3
  38. package/es/components/popover/src/popover.vue_vue_type_script_setup_true_lang.mjs +7 -3
  39. package/es/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.mjs +1 -1
  40. package/es/composables/index.d.ts +1 -1
  41. package/es/composables/index.mjs +2 -2
  42. package/es/composables/{use-slot-node → use-slot-nodes}/index.d.ts +1 -0
  43. package/es/composables/use-slot-nodes/index.mjs +14 -0
  44. package/es/composables/use-theme/index.mjs +1 -1
  45. package/es/index.d.ts +44 -3
  46. package/es/index.mjs +70 -70
  47. package/package.json +7 -3
  48. package/theme-chalk/index.css +1 -1
  49. package/theme-chalk/re-menu.css +1 -1
  50. package/theme-chalk/re-popconfirm.css +1 -1
  51. package/theme-chalk/re-popover.css +1 -1
  52. package/theme-chalk/src/css-vars/_menu.scss +1 -0
  53. package/theme-chalk/src/css-vars/_popconfirm.scss +4 -1
  54. package/theme-chalk/src/css-vars/_popover.scss +4 -1
  55. package/theme-chalk/src/menu.scss +12 -0
  56. package/theme-chalk/src/mixins/_popconfirm.scss +5 -0
  57. package/theme-chalk/src/mixins/_popover.scss +5 -0
  58. package/theme-chalk/src/popconfirm.scss +2 -0
  59. package/theme-chalk/src/popover.scss +2 -0
  60. package/cjs/composables/use-slot-node/index.js +0 -1
  61. 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 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";
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 w = f({
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(f) {
19
- var w;
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 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(() => {
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 = 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(() => {
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 = f.item) != null && e.disabled || N.value ? !1 : P.value === "horizontal" || P.value === "vertical" && j.value;
63
- }), K = v(!1), q = s(() => {
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 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;
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
- ie(() => q.value, (e) => {
33
+ oe(() => ue.value, (e) => {
68
34
  K.value = !!e;
69
35
  }, { immediate: !0 });
70
- let J = (e) => {
36
+ let q = (e) => {
71
37
  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;
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
- D == null || (i = D.openedKeys) == null || (i = i.value) == null || i.splice(r, 1);
41
+ L == null || (i = L.value) == null || i.splice(r, 1);
76
42
  }
77
- }, se = () => {
43
+ }, J = () => {
78
44
  var e;
79
- if (!(P.value === "horizontal" || j.value || (e = f.item) != null && e.disabled)) {
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 (L.value && V.value === 0) {
48
+ if (P.value && H.value === 0) {
83
49
  var n, r;
84
- D == null || (n = D.openedKeys) == null || (n = n.value) == null || n.forEach((e) => {
50
+ L == null || (n = L.value) == null || n.forEach((e) => {
85
51
  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);
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
- D == null || (t = D.openedKeys) == null || (t = t.value) == null || t.push(f.item.value);
91
- } else J(f.item.value);
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
- }, k.value ? k.value + 20 : 0);
104
- }, ce = (e, t) => {
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
- }, le = (e) => {
72
+ }, fe = (e) => {
107
73
  e.style.height = "auto";
108
- }, ue = (e, t) => {
74
+ }, pe = (e, t) => {
109
75
  e.style.height = `${e.scrollHeight}px`, e.offsetHeight, e.style.height = "0px", X(e, t);
110
- }, de = (e) => {
76
+ }, me = (e) => {
111
77
  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,
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
- }, pe = () => {
83
+ }, ge = () => {
121
84
  var e;
122
- N.value || Q.value.has((e = O.value) == null ? void 0 : e.value) && (Z.value = !0);
85
+ A.value || Q.value.has((e = E.value) == null ? void 0 : e.value) && (Z.value = !0);
123
86
  };
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;
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
- }), ne(() => {
132
- D == null || D.unsubscribeSubmenu($);
133
- }), (e, t) => (_(), c(i, m(f.item, {
134
- class: oe.value,
135
- depth: V.value,
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: C(se, ["stop"])
138
- }), u({
139
- submenu: S(() => [d(o, {
140
- name: A.value,
141
- duration: k.value,
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: ce,
145
- onAfterEnter: le,
146
- onLeave: ue,
147
- onAfterLeave: de
108
+ onEnter: de,
109
+ onAfterEnter: fe,
110
+ onLeave: pe,
111
+ onAfterLeave: me
148
112
  }, {
149
- default: S(() => {
113
+ default: b(() => {
150
114
  var n;
151
- return [K.value ? (_(), l("div", {
115
+ return [K.value ? (h(), re("div", {
152
116
  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
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: S(() => [y(e.$slots, "default")]),
124
+ default: b(() => [v(e.$slots, "default")]),
161
125
  _: 3
162
- }, 8, ["class", "options"])], 6)) : ee("", !0)];
126
+ }, 8, ["class", "options"])], 6)) : ne("", !0)];
163
127
  }),
164
128
  _: 3
165
129
  }, 8, ["name", "duration"])]),
166
- default: S(() => [y(e.$slots, "label", {}, () => [te(b(f.item.label), 1)])]),
130
+ default: b(() => [v(e.$slots, "label", {}, () => [ie(ae(l.item.label), 1)])]),
167
131
  _: 2
168
- }, [G.value ? {
132
+ }, [le.value ? {
169
133
  name: "item-submenu",
170
- fn: S(() => [y(e.$slots, "default")]),
134
+ fn: b(() => [v(e.$slots, "default")]),
171
135
  key: "0"
172
- } : void 0]), 1040, ["class", "depth"]));
136
+ } : void 0]), 1040, [
137
+ "class",
138
+ "depth",
139
+ "is-more"
140
+ ]));
173
141
  }
174
142
  });
175
143
  //#endregion
176
- export { w as default };
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?: ComputedRef<boolean>;
57
+ hasOptions: ComputedRef<boolean>;
56
58
  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>;
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-node/index.mjs";
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: { type: Boolean },
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-node/index.mjs";
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: { type: Boolean },
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-node/index.mjs";
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";
@@ -6,4 +6,4 @@ export * from './use-waterfall-layout';
6
6
  export * from './use-namespace';
7
7
  export * from './use-z-index';
8
8
  export * from './use-theme';
9
- export * from './use-slot-node';
9
+ export * from './use-slot-nodes';
@@ -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-node/index.mjs";
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 };
@@ -1,2 +1,3 @@
1
1
  import { VNode, Slots, Slot } from 'vue';
2
+ export declare function useSlotNodes(slots: Slots, name?: string): Slots | VNode[] | undefined;
2
3
  export declare function useSlotFirstNode(slots: Slots, name?: string): Slot | VNode | undefined;
@@ -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" : a.value ? "dark" : "light" : n ? e === "dark" ? "light" : "dark" : e),
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<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
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<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
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
  } & {