rappel-ui 1.0.40 → 1.0.42

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 (51) hide show
  1. package/cjs/components/ellipsis-menu/index.d.ts +65 -0
  2. package/cjs/components/ellipsis-menu/index.js +1 -0
  3. package/cjs/components/ellipsis-menu/src/ellipsis-menu.js +1 -0
  4. package/cjs/components/ellipsis-menu/src/ellipsis-menu.vue.d.ts +33 -0
  5. package/cjs/components/ellipsis-menu/src/ellipsis-menu.vue_vue_type_script_setup_true_lang.js +1 -0
  6. package/cjs/components/ellipsis-menu/src/types.d.ts +13 -0
  7. package/cjs/components/ellipsis-menu/style/css.d.ts +0 -0
  8. package/cjs/components/ellipsis-menu/style/css.js +2 -0
  9. package/cjs/components/ellipsis-menu/style/index.d.ts +0 -0
  10. package/cjs/components/ellipsis-menu/style/index.js +2 -0
  11. package/cjs/components/index.d.ts +1 -0
  12. package/cjs/components/index.js +1 -1
  13. package/cjs/components/menu/src/loop.vue_vue_type_script_setup_true_lang.js +1 -1
  14. package/cjs/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.js +1 -1
  15. package/cjs/composables/index.d.ts +1 -0
  16. package/cjs/composables/index.js +1 -1
  17. package/cjs/composables/use-resizable/index.d.ts +4 -0
  18. package/cjs/composables/use-resizable/index.js +1 -0
  19. package/cjs/directives/vResizable.d.ts +30 -2
  20. package/cjs/directives/vResizable.js +11 -8
  21. package/cjs/index.d.ts +61 -0
  22. package/cjs/index.js +1 -1
  23. package/dist/index.css +1 -1
  24. package/dist/index.umd.js +17 -14
  25. package/es/components/ellipsis-menu/index.d.ts +65 -0
  26. package/es/components/ellipsis-menu/index.mjs +7 -0
  27. package/es/components/ellipsis-menu/src/ellipsis-menu.mjs +5 -0
  28. package/es/components/ellipsis-menu/src/ellipsis-menu.vue.d.ts +33 -0
  29. package/es/components/ellipsis-menu/src/ellipsis-menu.vue_vue_type_script_setup_true_lang.mjs +133 -0
  30. package/es/components/ellipsis-menu/src/types.d.ts +13 -0
  31. package/es/components/ellipsis-menu/style/css.d.ts +0 -0
  32. package/es/components/ellipsis-menu/style/css.mjs +2 -0
  33. package/es/components/ellipsis-menu/style/index.d.ts +0 -0
  34. package/es/components/ellipsis-menu/style/index.mjs +2 -0
  35. package/es/components/index.d.ts +1 -0
  36. package/es/components/index.mjs +4 -2
  37. package/es/components/menu/src/loop.vue_vue_type_script_setup_true_lang.mjs +65 -68
  38. package/es/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.mjs +74 -74
  39. package/es/composables/index.d.ts +1 -0
  40. package/es/composables/index.mjs +2 -1
  41. package/es/composables/use-resizable/index.d.ts +4 -0
  42. package/es/composables/use-resizable/index.mjs +8 -0
  43. package/es/directives/vResizable.d.ts +30 -2
  44. package/es/directives/vResizable.mjs +101 -68
  45. package/es/index.d.ts +61 -0
  46. package/es/index.mjs +72 -70
  47. package/package.json +1 -1
  48. package/theme-chalk/index.css +1 -1
  49. package/theme-chalk/re-ellipsis-menu.css +1 -0
  50. package/theme-chalk/src/ellipsis-menu.scss +39 -0
  51. package/theme-chalk/src/index.scss +1 -0
@@ -0,0 +1,65 @@
1
+ import { CreateComponentPublicInstanceWithMixins, VNode, ShallowRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
2
+ import { EllipsisMenuProps } from './index.ts';
3
+ export * from './src/types.ts';
4
+ export declare const ReEllipsisMenu: {
5
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< EllipsisMenuProps> & Readonly<{
6
+ onUpdated?: ((args_0: {
7
+ showMore: boolean;
8
+ moreSlots: VNode[];
9
+ splitIndex: number;
10
+ }) => any) | undefined;
11
+ }>, {
12
+ wrapper: Readonly< ShallowRef<HTMLElement | null>>;
13
+ moreRef: Readonly< ShallowRef<HTMLElement | null>>;
14
+ update: () => Promise<void>;
15
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
16
+ updated: (args_0: {
17
+ showMore: boolean;
18
+ moreSlots: VNode[];
19
+ splitIndex: number;
20
+ }) => any;
21
+ }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
22
+ P: {};
23
+ B: {};
24
+ D: {};
25
+ C: {};
26
+ M: {};
27
+ Defaults: {};
28
+ }, Readonly< EllipsisMenuProps> & Readonly<{
29
+ onUpdated?: ((args_0: {
30
+ showMore: boolean;
31
+ moreSlots: VNode[];
32
+ splitIndex: number;
33
+ }) => any) | undefined;
34
+ }>, {
35
+ wrapper: Readonly< ShallowRef<HTMLElement | null>>;
36
+ moreRef: Readonly< ShallowRef<HTMLElement | null>>;
37
+ update: () => Promise<void>;
38
+ }, {}, {}, {}, {}>;
39
+ __isFragment?: never;
40
+ __isTeleport?: never;
41
+ __isSuspense?: never;
42
+ } & ComponentOptionsBase<Readonly< EllipsisMenuProps> & Readonly<{
43
+ onUpdated?: ((args_0: {
44
+ showMore: boolean;
45
+ moreSlots: VNode[];
46
+ splitIndex: number;
47
+ }) => any) | undefined;
48
+ }>, {
49
+ wrapper: Readonly< ShallowRef<HTMLElement | null>>;
50
+ moreRef: Readonly< ShallowRef<HTMLElement | null>>;
51
+ update: () => Promise<void>;
52
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
53
+ updated: (args_0: {
54
+ showMore: boolean;
55
+ moreSlots: VNode[];
56
+ splitIndex: number;
57
+ }) => any;
58
+ }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
59
+ $slots: {
60
+ default?: (props: {}) => any;
61
+ } & {
62
+ icon?: (props: {}) => any;
63
+ };
64
+ });
65
+ export default ReEllipsisMenu;
@@ -0,0 +1,7 @@
1
+ import { withInstall as e } from "../../utils/vue/index.mjs";
2
+ import "../../utils/index.mjs";
3
+ import t from "./src/ellipsis-menu.mjs";
4
+ //#region packages/components/ellipsis-menu/index.ts
5
+ var n = e(t);
6
+ //#endregion
7
+ export { n as ReEllipsisMenu, n as default };
@@ -0,0 +1,5 @@
1
+ import e from "./ellipsis-menu.vue_vue_type_script_setup_true_lang.mjs";
2
+ //#region packages/components/ellipsis-menu/src/ellipsis-menu.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,33 @@
1
+ import { VNode, DefineComponent, ShallowRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { EllipsisMenuProps } from './types';
3
+ declare var __VLS_1: {}, __VLS_9: {};
4
+ type __VLS_Slots = {} & {
5
+ default?: (props: typeof __VLS_1) => any;
6
+ } & {
7
+ icon?: (props: typeof __VLS_9) => any;
8
+ };
9
+ declare const __VLS_base: DefineComponent<EllipsisMenuProps, {
10
+ wrapper: Readonly< ShallowRef<HTMLElement | null>>;
11
+ moreRef: Readonly< ShallowRef<HTMLElement | null>>;
12
+ update: () => Promise<void>;
13
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
14
+ updated: (args_0: {
15
+ showMore: boolean;
16
+ moreSlots: VNode[];
17
+ splitIndex: number;
18
+ }) => any;
19
+ }, string, PublicProps, Readonly<EllipsisMenuProps> & Readonly<{
20
+ onUpdated?: ((args_0: {
21
+ showMore: boolean;
22
+ moreSlots: VNode[];
23
+ splitIndex: number;
24
+ }) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
26
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,133 @@
1
+ import { useNamespace as e } from "../../../composables/use-namespace/index.mjs";
2
+ import { useSlotNodes as t } from "../../../composables/use-slot-nodes/index.mjs";
3
+ import "../../../composables/index.mjs";
4
+ import { ReDropdown as n, ReDropdownItem as r, ReDropdownMenu as i } from "../../dropdown/index.mjs";
5
+ import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, nextTick as p, normalizeClass as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveDynamicComponent as x, unref as S, useSlots as C, useTemplateRef as w, watch as T, withCtx as E } from "vue";
6
+ import { useDebounceFn as D, useElementSize as O } from "@vueuse/core";
7
+ import { MoreDotCircleHorizontal as k } from "@rappel-ui/svg-icons";
8
+ //#region packages/components/ellipsis-menu/src/ellipsis-menu.vue?vue&type=script&setup=true&lang.ts
9
+ var A = f({
10
+ __name: "ellipsis-menu",
11
+ props: {
12
+ icon: { default: () => k },
13
+ trigger: { default: "hover" },
14
+ placement: { default: "bottom-end" },
15
+ debounce: { default: 150 },
16
+ showArrow: {
17
+ type: Boolean,
18
+ default: !0
19
+ },
20
+ offset: { default: 10 },
21
+ gap: { default: 0 },
22
+ floatingClass: {}
23
+ },
24
+ emits: ["updated"],
25
+ setup(f, { expose: k, emit: A }) {
26
+ var j;
27
+ let M = A, { n: N, ns: P, nm: F } = e("ellipsis-menu"), I = w("wrapper"), L = w("moreRef"), R = v([]), z = v(!1), B = o(() => [N()]), V = o(() => [F("dropdown"), f.floatingClass]), H = C(), U = () => {
28
+ let e = I.value;
29
+ return e ? e.scrollWidth > e.clientWidth : !1;
30
+ }, W = () => {
31
+ let e = L.value, t = I.value;
32
+ if (!e || !t) return -1;
33
+ let n = t.offsetWidth, r = Array.from(t.children), i = e.offsetWidth;
34
+ return r.findIndex((e) => {
35
+ let t = getComputedStyle(e);
36
+ return i += e.offsetWidth + f.gap + parseFloat(t.marginLeft) + parseFloat(t.marginRight), i - f.gap > n;
37
+ });
38
+ }, G = (e, n) => {
39
+ var r;
40
+ let i = t(e), a = i == null ? [] : i, o = (r = a == null ? void 0 : a.length) == null ? 0 : r;
41
+ for (let e = n; e < o; e++) {
42
+ var s;
43
+ (s = I.value) == null || s.children[e].setAttribute("is-hidden", "true");
44
+ }
45
+ R.value = a.slice(n);
46
+ }, K = async () => {
47
+ if (z.value = !1, I.value) {
48
+ if (I.value.querySelectorAll("[is-hidden=\"true\"]").forEach((e) => {
49
+ e.removeAttribute("is-hidden");
50
+ }), await p(), U()) {
51
+ z.value = !0, await p();
52
+ let e = W();
53
+ if (e === -1) return;
54
+ G(H, e), M("updated", {
55
+ showMore: z.value,
56
+ moreSlots: R.value,
57
+ splitIndex: e
58
+ });
59
+ } else z.value = !1, R.value = [], M("updated", {
60
+ showMore: z.value,
61
+ moreSlots: R.value,
62
+ splitIndex: -1
63
+ });
64
+ }
65
+ }, q = D(K, (j = f.debounce) == null ? 0 : j), J = () => {
66
+ let e = [], { width: t, stop: n } = O(I), { stop: r } = T(t, q);
67
+ return e.push(n, r), { cleanup: () => {
68
+ e.forEach((e) => e());
69
+ } };
70
+ }, Y = [], X = () => {
71
+ Y.forEach((e) => e());
72
+ }, Z = async () => {
73
+ await K();
74
+ let { cleanup: e } = J(), { stop: t } = T(() => H == null ? void 0 : H.default, q);
75
+ Y.push(e, t);
76
+ };
77
+ return h(() => {
78
+ Z();
79
+ }), g(() => {
80
+ X();
81
+ }), k({
82
+ wrapper: I,
83
+ moreRef: L,
84
+ update: K
85
+ }), (e, t) => (_(), l("div", {
86
+ ref_key: "wrapper",
87
+ ref: I,
88
+ class: m(B.value)
89
+ }, [b(e.$slots, "default"), z.value ? (_(), s(S(n), {
90
+ key: 0,
91
+ trigger: f.trigger,
92
+ placement: f.placement,
93
+ "show-arrow": f.showArrow,
94
+ offset: f.offset,
95
+ "floating-class": V.value
96
+ }, {
97
+ menu: E(() => [d(S(i), null, {
98
+ default: E(() => [(_(!0), l(a, null, y(R.value, (e) => {
99
+ var t, n;
100
+ return _(), s(S(r), {
101
+ key: e == null || (t = e.props) == null ? void 0 : t.value,
102
+ value: e == null || (n = e.props) == null ? void 0 : n.value
103
+ }, {
104
+ default: E(() => [(_(), s(x(e), { key: e.key }))]),
105
+ _: 2
106
+ }, 1032, ["value"]);
107
+ }), 128))]),
108
+ _: 1
109
+ })]),
110
+ default: E(() => [u("span", {
111
+ ref_key: "moreRef",
112
+ ref: L,
113
+ class: m([S(P)("icon")])
114
+ }, [b(e.$slots, "icon", {}, () => [f.icon ? (_(), l(a, { key: 0 }, [typeof f.icon == "string" ? (_(), l("i", {
115
+ key: 0,
116
+ class: m([f.icon]),
117
+ "aria-hidden": "true"
118
+ }, null, 2)) : (_(), s(x(f.icon), {
119
+ key: 1,
120
+ "aria-hidden": "true"
121
+ }))], 64)) : c("", !0)])], 2)]),
122
+ _: 3
123
+ }, 8, [
124
+ "trigger",
125
+ "placement",
126
+ "show-arrow",
127
+ "offset",
128
+ "floating-class"
129
+ ])) : c("", !0)], 2));
130
+ }
131
+ });
132
+ //#endregion
133
+ export { A as default };
@@ -0,0 +1,13 @@
1
+ import { Component } from 'vue';
2
+ import { MaybeClass } from '../../../types';
3
+ import { Placement, Trigger } from '../../tooltip';
4
+ export interface EllipsisMenuProps {
5
+ icon?: string | Component;
6
+ trigger?: Trigger;
7
+ placement?: Placement;
8
+ debounce?: number;
9
+ showArrow?: boolean;
10
+ offset?: number;
11
+ gap?: number;
12
+ floatingClass?: MaybeClass;
13
+ }
File without changes
@@ -0,0 +1,2 @@
1
+ import '../../../../theme-chalk/base.css'
2
+ import '../../../../theme-chalk/re-ellipsis-menu.css'
File without changes
@@ -0,0 +1,2 @@
1
+ import '../../../../theme-chalk/src/base.scss'
2
+ import '../../../../theme-chalk/src/ellipsis-menu.scss'
@@ -13,3 +13,4 @@ export * from './popconfirm';
13
13
  export * from './message';
14
14
  export * from './dropdown';
15
15
  export * from './menu';
16
+ export * from './ellipsis-menu';
@@ -21,14 +21,16 @@ import { useDropdownEmits as C } from "./dropdown/src/use-dropdown-emit.mjs";
21
21
  import { ReDropdown as w, ReDropdownItem as T, ReDropdownMenu as E, ReDropdownSubmenu as D } from "./dropdown/index.mjs";
22
22
  import { useMenuEmits as O } from "./menu/src/use-menu-emit.mjs";
23
23
  import { ReMenu as k, ReMenuItem as A, ReSubmenu as j } from "./menu/index.mjs";
24
+ import { ReEllipsisMenu as M } from "./ellipsis-menu/index.mjs";
24
25
  //#region packages/components/index.ts
25
- var M = e({
26
+ var N = e({
26
27
  ReButton: () => a,
27
28
  ReButtonGroup: () => o,
28
29
  ReDropdown: () => w,
29
30
  ReDropdownItem: () => T,
30
31
  ReDropdownMenu: () => E,
31
32
  ReDropdownSubmenu: () => D,
33
+ ReEllipsisMenu: () => M,
32
34
  ReFilterPanel: () => f,
33
35
  ReInput: () => s,
34
36
  ReMenu: () => k,
@@ -56,4 +58,4 @@ var M = e({
56
58
  useTransitionEmits: () => m
57
59
  });
58
60
  //#endregion
59
- export { a as ReButton, o as ReButtonGroup, w as ReDropdown, T as ReDropdownItem, E as ReDropdownMenu, D as ReDropdownSubmenu, f as ReFilterPanel, s as ReInput, k as ReMenu, A as ReMenuItem, S as ReMessage, d as ReNeutralColor, b as RePopconfirm, y as RePopover, l as RePrimaryColor, u as ReSecondaryColor, j as ReSubmenu, p as ReSvgIcon, c as ReTabs, _ as ReTooltip, h as ReTransition, t as _buttonGroupProvideKey, n as buttonNativeTypes, r as buttonSizes, i as buttonTypes, M as components_exports, x as createMessage, C as useDropdownEmits, O as useMenuEmits, v as usePopoverEmits, g as useTooltipEmits, m as useTransitionEmits };
61
+ export { a as ReButton, o as ReButtonGroup, w as ReDropdown, T as ReDropdownItem, E as ReDropdownMenu, D as ReDropdownSubmenu, M as ReEllipsisMenu, f as ReFilterPanel, s as ReInput, k as ReMenu, A as ReMenuItem, S as ReMessage, d as ReNeutralColor, b as RePopconfirm, y as RePopover, l as RePrimaryColor, u as ReSecondaryColor, j as ReSubmenu, p as ReSvgIcon, c as ReTabs, _ as ReTooltip, h as ReTransition, t as _buttonGroupProvideKey, n as buttonNativeTypes, r as buttonSizes, i as buttonTypes, N as components_exports, x as createMessage, C as useDropdownEmits, O as useMenuEmits, v as usePopoverEmits, g as useTooltipEmits, m as useTransitionEmits };
@@ -3,115 +3,112 @@ import "../../../composables/index.mjs";
3
3
  import { _menuProvideKey as t } from "./constants.mjs";
4
4
  import n from "./menu-item.mjs";
5
5
  import r from "./submenu.mjs";
6
- import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createSlots as l, defineComponent as u, inject as d, mergeProps as f, nextTick as p, onMounted as m, onUnmounted as h, openBlock as g, renderList as _, renderSlot as v, resolveDynamicComponent as y, shallowRef as b, unref as x, useSlots as S, useTemplateRef as C, watch as w, withCtx as T } from "vue";
7
- import { computedAsync as E, useDebounceFn as D, useElementSize as O } from "@vueuse/core";
8
- import { getAsyncIcon as k } from "@rappel-ui/svg-icons";
6
+ import { Fragment as i, cloneVNode as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createSlots as u, defineComponent as d, inject as f, mergeProps as p, nextTick as m, onMounted as h, onUnmounted as g, openBlock as _, ref as ee, renderList as v, renderSlot as y, resolveDynamicComponent as b, shallowRef as x, unref as S, useSlots as C, useTemplateRef as w, watch as T, withCtx as E } from "vue";
7
+ import { computedAsync as D, useDebounceFn as O, useElementSize as k } from "@vueuse/core";
8
+ import { getAsyncIcon as A } from "@rappel-ui/svg-icons";
9
9
  //#region packages/components/menu/src/loop.vue?vue&type=script&setup=true&lang.ts
10
- var A = u({
10
+ var j = d({
11
11
  __name: "loop",
12
12
  props: { options: { default: () => void 0 } },
13
- setup(u, { expose: A }) {
14
- let j = C("loopRef"), M = C("moreRef"), N = b([]), P = b([]), F = b([]), { depth: I, hasOptions: L, direction: R, ellipsis: z, ellipsisIcon: B } = d(t), V = a(() => {
13
+ setup(d, { expose: j }) {
14
+ let M = w("loopRef"), N = w("moreRef"), P = x([]), F = x([]), I = ee([]), { depth: L, hasOptions: R, direction: z, ellipsis: B, ellipsisIcon: V } = f(t), H = o(() => {
15
15
  var e;
16
- return R.value === "horizontal" && z != null && z.value ? N.value : (e = u.options) == null ? [] : e;
17
- }), H = E(async () => await k(B == null ? void 0 : B.value) || ""), U = b(!1), W = () => {
18
- let e = j.value;
16
+ return z.value === "horizontal" && B != null && B.value ? P.value : (e = d.options) == null ? [] : e;
17
+ }), U = D(async () => await A(V == null ? void 0 : V.value) || ""), W = x(!1), G = () => {
18
+ let e = M.value;
19
19
  return e ? e.scrollWidth > e.clientWidth : !1;
20
- }, G = S(), K = () => {
20
+ }, K = C(), q = () => {
21
21
  var e, t;
22
- let n = (e = (t = M.value) == null ? void 0 : t.itemRef) == null ? M.value : e, r = j.value;
22
+ let n = (e = (t = N.value) == null ? void 0 : t.itemRef) == null ? N.value : e, r = M.value;
23
23
  if (!n || !r) return -1;
24
24
  let i = r.offsetWidth, a = Array.from(r.children), o = n.offsetWidth;
25
- return a.findIndex((e) => (o += e.offsetWidth, o > i));
26
- }, q = (e, t) => {
27
- P.value = e.splice(t, e.length - t);
28
- }, J = (t, n) => {
29
- var r, i, a;
30
- let o = e(t), s = (r = o == null || (i = o[0]) == null ? void 0 : i.children) == null ? [] : r, c = (a = s == null ? void 0 : s.length) == null ? 0 : a;
31
- for (let e = n; e < c; e++) {
32
- var l;
33
- (l = j.value) == null || l.children[e].setAttribute("is-hidden", "true");
25
+ return a.findIndex((e) => {
26
+ let t = getComputedStyle(e);
27
+ return o += e.offsetWidth + parseFloat(t.marginLeft) + parseFloat(t.marginRight), o > i;
28
+ });
29
+ }, J = (e, t) => {
30
+ F.value = e.splice(t, e.length - t);
31
+ }, Y = (t, n) => {
32
+ var r, i, o;
33
+ let s = e(t), c = (r = s == null || (i = s[0]) == null ? void 0 : i.children) == null ? [] : r, l = (o = c == null ? void 0 : c.length) == null ? 0 : o;
34
+ for (let e = n; e < l; e++) {
35
+ var u;
36
+ (u = M.value) == null || u.children[e].setAttribute("is-hidden", "true");
34
37
  }
35
- F.value = s.splice(n, s.length - n).map((e) => ({
36
- ...e,
37
- props: {
38
- ...e.props,
39
- "is-more": !0
40
- }
41
- }));
42
- }, Y = async () => {
38
+ I.value = c.slice(n).map((e) => a(e, { "is-more": !0 }));
39
+ }, X = async () => {
43
40
  var e;
44
- if (N.value = [...(e = u.options) == null ? [] : e], I.value === 0 && R.value !== "vertical" && z.value) {
45
- if (!L.value && j.value && j.value.querySelectorAll("li[is-hidden=\"true\"]").forEach((e) => {
41
+ if (W.value = !1, P.value = [...(e = d.options) == null ? [] : e], L.value === 0 && z.value !== "vertical" && B.value) {
42
+ if (!R.value && M.value && M.value.querySelectorAll("li[is-hidden=\"true\"]").forEach((e) => {
46
43
  e.setAttribute("is-hidden", "false");
47
- }), await p(), W()) {
48
- U.value = !0, await p();
49
- let e = K();
44
+ }), await m(), G()) {
45
+ W.value = !0, await m();
46
+ let e = q();
50
47
  if (e === -1) return;
51
- L.value ? q(N.value, e) : J(G, e);
52
- } else U.value = !1, F.value = [], P.value = [];
48
+ R.value ? J(P.value, e) : Y(K, e);
49
+ } else W.value = !1, I.value = [], F.value = [];
53
50
  }
54
- }, X = D(Y, 100), Z = () => {
51
+ }, Z = O(X, 100), Q = () => {
55
52
  let e = [];
56
- if (z.value) {
57
- let { width: t, stop: n } = O(j.value), { stop: r } = w(t, () => {
58
- X();
53
+ if (B.value) {
54
+ let { width: t, stop: n } = k(M), { stop: r } = T(t, () => {
55
+ Z();
59
56
  });
60
57
  e.push(n, r);
61
58
  }
62
59
  return { cleanup: () => {
63
60
  e.forEach((e) => e());
64
61
  } };
65
- }, Q = [], $ = () => {
66
- Q.forEach((e) => e());
67
- }, ee = async () => {
68
- if (z.value) {
69
- await Y();
70
- let { cleanup: e } = Z();
71
- Q.push(e);
62
+ }, $ = [], te = () => {
63
+ $.forEach((e) => e());
64
+ }, ne = async () => {
65
+ if (B.value) {
66
+ await X();
67
+ let { cleanup: e } = Q(), { stop: t } = T(() => K == null ? void 0 : K.default, Z);
68
+ $.push(e, t);
72
69
  }
73
70
  };
74
- return m(() => {
75
- ee();
76
- }), h(() => {
77
- $();
78
- }), A({
79
- loopRef: j,
80
- update: Y
81
- }), (e, t) => (g(), c("ul", {
71
+ return h(() => {
72
+ ne();
73
+ }), g(() => {
74
+ te();
75
+ }), j({
76
+ loopRef: M,
77
+ update: X
78
+ }), (e, t) => (_(), l("ul", {
82
79
  ref_key: "loopRef",
83
- ref: j
84
- }, [v(e.$slots, "default", {}, () => [(g(!0), c(i, null, _(V.value, (t) => {
80
+ ref: M
81
+ }, [y(e.$slots, "default", {}, () => [(_(!0), l(i, null, v(H.value, (t) => {
85
82
  var a;
86
- return g(), c(i, { key: typeof t.value == "boolean" ? t.label : t.value }, [t != null && (a = t.children) != null && a.length ? (g(), o(r, {
83
+ return _(), l(i, { key: typeof t.value == "boolean" ? t.label : t.value }, [t != null && (a = t.children) != null && a.length ? (_(), s(r, {
87
84
  key: 0,
88
85
  item: t,
89
86
  "is-more": e.$attrs["is-more"]
90
- }, null, 8, ["item", "is-more"])) : (g(), o(n, f({
87
+ }, null, 8, ["item", "is-more"])) : (_(), s(n, p({
91
88
  key: 1,
92
89
  ref_for: !0
93
90
  }, t, { "is-more": e.$attrs["is-more"] }), null, 16, ["is-more"]))], 64);
94
- }), 128))]), U.value ? (g(), o(n, {
91
+ }), 128))]), W.value ? (_(), s(n, {
95
92
  key: 0,
96
93
  ref_key: "moreRef",
97
- ref: M,
94
+ ref: N,
98
95
  value: "more",
99
- children: P.value,
96
+ children: F.value,
100
97
  "has-children": "",
101
98
  "sub-icon": !1,
102
99
  depth: -1,
103
100
  "is-more": !0,
104
101
  class: "is-more",
105
- icon: x(H)
106
- }, l({
107
- icon: T(() => [v(e.$slots, "ellipsis-icon")]),
102
+ icon: S(U)
103
+ }, u({
104
+ icon: E(() => [y(e.$slots, "ellipsis-icon")]),
108
105
  _: 2
109
- }, [x(L) ? void 0 : {
106
+ }, [S(R) ? void 0 : {
110
107
  name: "item-submenu",
111
- fn: T(() => [(g(), o(y(() => F.value)))]),
108
+ fn: E(() => [(_(!0), l(i, null, v(I.value, (e) => (_(), s(b(e), { key: e.key }))), 128))]),
112
109
  key: "0"
113
- }]), 1032, ["children", "icon"])) : s("", !0)], 512));
110
+ }]), 1032, ["children", "icon"])) : c("", !0)], 512));
114
111
  }
115
112
  });
116
113
  //#endregion
117
- export { A as default };
114
+ export { j as default };