rappel-ui 1.0.39 → 1.0.41

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 (50) 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/index.d.ts +44 -3
  21. package/cjs/index.js +1 -1
  22. package/dist/index.css +1 -1
  23. package/dist/index.umd.js +9 -9
  24. package/es/components/dropdown/src/dropdown-item.vue_vue_type_script_setup_true_lang.mjs +20 -20
  25. package/es/components/dropdown/src/dropdown.vue_vue_type_script_setup_true_lang.mjs +1 -1
  26. package/es/components/dropdown/src/types.d.ts +6 -6
  27. package/es/components/menu/index.d.ts +46 -4
  28. package/es/components/menu/src/loop.vue.d.ts +8 -3
  29. package/es/components/menu/src/loop.vue_vue_type_script_setup_true_lang.mjs +102 -13
  30. package/es/components/menu/src/menu-item.vue.d.ts +16 -2
  31. package/es/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.mjs +169 -195
  32. package/es/components/menu/src/menu.vue.d.ts +3 -1
  33. package/es/components/menu/src/menu.vue_vue_type_script_setup_true_lang.mjs +72 -60
  34. package/es/components/menu/src/submenu.vue_vue_type_script_setup_true_lang.mjs +73 -105
  35. package/es/components/menu/src/types.d.ts +17 -13
  36. package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs +1 -1
  37. package/es/components/popover/src/popover.vue_vue_type_script_setup_true_lang.mjs +1 -1
  38. package/es/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.mjs +1 -1
  39. package/es/composables/index.d.ts +1 -1
  40. package/es/composables/index.mjs +2 -2
  41. package/es/composables/{use-slot-node → use-slot-nodes}/index.d.ts +1 -0
  42. package/es/composables/use-slot-nodes/index.mjs +14 -0
  43. package/es/index.d.ts +44 -3
  44. package/es/index.mjs +70 -70
  45. package/package.json +2 -2
  46. package/theme-chalk/index.css +1 -1
  47. package/theme-chalk/re-menu.css +1 -1
  48. package/theme-chalk/src/menu.scss +12 -0
  49. package/cjs/composables/use-slot-node/index.js +0 -1
  50. package/es/composables/use-slot-node/index.mjs +0 -10
@@ -24,7 +24,10 @@ var E = ["depth"], D = p({
24
24
  default: () => void 0
25
25
  },
26
26
  icon: { default: "" },
27
- subIcon: { default: () => w },
27
+ subIcon: {
28
+ type: [String, Boolean],
29
+ default: () => w
30
+ },
28
31
  depth: { default: () => void 0 }
29
32
  },
30
33
  setup(p) {
@@ -37,12 +40,9 @@ var E = ["depth"], D = p({
37
40
  k("children", A.value)
38
41
  ]), M = o(() => {
39
42
  var e;
40
- return (e = p.depth) == null ? F.value : e;
41
- }), N = o(() => !A.value || p.disabled), P = m(r, null), F = o(() => P == null ? void 0 : P.depth.value), I = o(() => P.theme.value), L = o(() => P.reverseTheme.value), R = o(() => {
42
- var e;
43
- return P == null || (e = P.submenuOffset) == null ? void 0 : e.value;
44
- }), z = (e) => {
45
- e.stopPropagation(), !(A.value || p.disabled) && (P == null || P.select(p.value, {
43
+ return (e = p.depth) == null ? P.value : e;
44
+ }), N = o(() => !A.value || p.disabled), { depth: P, theme: F, reverseTheme: I, submenuOffset: L, select: R } = m(r), z = (e) => {
45
+ e.stopPropagation(), !(A.value || p.disabled) && R(p.value, {
46
46
  label: p.label,
47
47
  disabled: p.disabled,
48
48
  value: p.value,
@@ -51,12 +51,12 @@ var E = ["depth"], D = p({
51
51
  icon: p.icon,
52
52
  subIcon: p.subIcon,
53
53
  depth: M.value
54
- }));
55
- }, B = C(async () => await T(p.icon)), V = C(async () => await T(p.subIcon)), H = x("tooltipRef"), U = o(() => {
54
+ });
55
+ }, B = C(async () => await T(p.icon)), V = C(async () => await T(p.subIcon || "")), H = x("tooltipRef"), U = o(() => {
56
56
  var e;
57
57
  let t = (e = H.value) == null ? void 0 : e.floatingPlacement;
58
58
  return [{ "transform-origin": i[t] }];
59
- }), { currentTheme: W } = t(I.value, L.value);
59
+ }), { currentTheme: W } = t(F.value, I.value);
60
60
  return (e, t) => (g(), l("li", {
61
61
  class: h(j.value),
62
62
  depth: M.value,
@@ -72,9 +72,9 @@ var E = ["depth"], D = p({
72
72
  "show-arrow": !1,
73
73
  transform: !1,
74
74
  transition: "dropdown",
75
- offset: R.value,
76
- theme: I.value,
77
- "reverse-theme": L.value
75
+ offset: b(L),
76
+ theme: b(F),
77
+ "reverse-theme": b(I)
78
78
  }, {
79
79
  content: S(() => {
80
80
  var t;
@@ -91,29 +91,29 @@ var E = ["depth"], D = p({
91
91
  }, null, 8, ["class", "options"])) : _(e.$slots, "default", {}, () => [d(y(p.label), 1)], void 0, 2)];
92
92
  }),
93
93
  default: S(() => [u("div", { class: h([b(D)("label-wrap")]) }, [
94
- p.icon ? (g(), l("div", {
94
+ _(e.$slots, "icon", {}, () => [p.icon ? (g(), l("div", {
95
95
  key: 0,
96
96
  class: h([b(D)("icon")])
97
- }, [_(e.$slots, "icon", {}, () => [typeof b(B) == "string" ? (g(), l("i", {
97
+ }, [typeof b(B) == "string" ? (g(), l("i", {
98
98
  key: 0,
99
99
  class: h([b(B)]),
100
100
  "aria-hidden": "true"
101
101
  }, null, 2)) : (g(), s(v(b(B)), {
102
102
  key: 1,
103
103
  "aria-hidden": "true"
104
- }))])], 2)) : c("", !0),
104
+ }))], 2)) : c("", !0)]),
105
105
  u("div", { class: h([b(D)("label")]) }, [_(e.$slots, "default", {}, () => [d(y(p.label), 1)])], 2),
106
- p.subIcon && A.value ? (g(), l("div", {
107
- key: 1,
106
+ _(e.$slots, "sub-icon", {}, () => [p.subIcon && A.value ? (g(), l("div", {
107
+ key: 0,
108
108
  class: h([b(D)("subicon")])
109
- }, [_(e.$slots, "sub-icon", {}, () => [typeof b(V) == "string" ? (g(), l("i", {
109
+ }, [typeof b(V) == "string" ? (g(), l("i", {
110
110
  key: 0,
111
111
  class: h([b(V)]),
112
112
  "aria-hidden": "true"
113
113
  }, null, 2)) : (g(), s(v(b(V)), {
114
114
  key: 1,
115
115
  "aria-hidden": "true"
116
- }))])], 2)) : c("", !0)
116
+ }))], 2)) : c("", !0)])
117
117
  ], 2)]),
118
118
  _: 3
119
119
  }, 8, [
@@ -1,7 +1,7 @@
1
1
  import { normalizeOptions as e } from "../../../utils/util.mjs";
2
2
  import "../../../utils/index.mjs";
3
3
  import { useNamespace as t } from "../../../composables/use-namespace/index.mjs";
4
- import { useSlotFirstNode as n } from "../../../composables/use-slot-node/index.mjs";
4
+ import { useSlotFirstNode as n } from "../../../composables/use-slot-nodes/index.mjs";
5
5
  import "../../../composables/index.mjs";
6
6
  import { ReTooltip as r } from "../../tooltip/index.mjs";
7
7
  import { _dropdownProvideKey as i, originsMap as a } from "./constants.mjs";
@@ -19,17 +19,17 @@ export interface DropdownOption {
19
19
  children?: DropdownOption[];
20
20
  hasChildren?: boolean;
21
21
  icon?: string | Component;
22
- subIcon?: string | Component;
22
+ subIcon?: string | Component | false;
23
23
  depth?: number;
24
24
  }
25
25
  export interface DropdownProvides {
26
26
  select: (value: any, item: DropdownOption) => void;
27
27
  depth: Ref<number>;
28
- hasOptions?: ComputedRef<boolean>;
29
- cssDuration?: ComputedRef<number>;
30
- theme?: ComputedRef<Theme>;
31
- reverseTheme?: ComputedRef<boolean>;
32
- submenuOffset?: ComputedRef<OffsetOptions>;
28
+ hasOptions: ComputedRef<boolean>;
29
+ cssDuration: ComputedRef<number>;
30
+ theme: ComputedRef<Theme>;
31
+ reverseTheme: ComputedRef<boolean>;
32
+ submenuOffset: ComputedRef<OffsetOptions>;
33
33
  }
34
34
  export interface DropdownSubmenuProps {
35
35
  item?: DropdownOption;
@@ -1,5 +1,6 @@
1
- import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
1
+ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, ShallowRef, ComputedRef, Ref, Component } from 'vue';
2
2
  import { MenuProps, MenuOption, SubmenuProps } from './index.ts';
3
+ import { Placement } from '@floating-ui/vue';
3
4
  export * from './src/types.ts';
4
5
  export * from './src/use-menu-emit.ts';
5
6
  export declare const ReMenu: {
@@ -33,6 +34,8 @@ export declare const ReMenu: {
33
34
  }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
34
35
  $slots: {
35
36
  default?: (props: {}) => any;
37
+ } & {
38
+ 'ellipsis-icon'?: (props: {}) => any;
36
39
  };
37
40
  });
38
41
  export declare const ReSubmenu: {
@@ -57,18 +60,57 @@ export declare const ReSubmenu: {
57
60
  };
58
61
  });
59
62
  export declare const ReMenuItem: {
60
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< MenuOption> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
63
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< MenuOption> & Readonly<{}>, {
64
+ itemRef: Readonly< ShallowRef<HTMLLIElement | null, HTMLLIElement | null>>;
65
+ hasChild: ComputedRef<boolean>;
66
+ showArrow: ComputedRef<boolean>;
67
+ placement: ComputedRef<Placement>;
68
+ visible: Ref<boolean, boolean>;
69
+ value: any;
70
+ label: string | undefined;
71
+ disabled: boolean | undefined;
72
+ icon: string | Component;
73
+ subIcon: string | false | Component | undefined;
74
+ depth: number;
75
+ children: MenuOption[];
76
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
61
77
  P: {};
62
78
  B: {};
63
79
  D: {};
64
80
  C: {};
65
81
  M: {};
66
82
  Defaults: {};
67
- }, Readonly< MenuOption> & Readonly<{}>, {}, {}, {}, {}, {}>;
83
+ }, Readonly< MenuOption> & Readonly<{}>, {
84
+ itemRef: Readonly< ShallowRef<HTMLLIElement | null, HTMLLIElement | null>>;
85
+ hasChild: ComputedRef<boolean>;
86
+ showArrow: ComputedRef<boolean>;
87
+ placement: ComputedRef<Placement>;
88
+ visible: Ref<boolean, boolean>;
89
+ value: any;
90
+ label: string | undefined;
91
+ disabled: boolean | undefined;
92
+ icon: string | Component;
93
+ subIcon: string | false | Component | undefined;
94
+ depth: number;
95
+ children: MenuOption[];
96
+ }, {}, {}, {}, {}>;
68
97
  __isFragment?: never;
69
98
  __isTeleport?: never;
70
99
  __isSuspense?: never;
71
- } & ComponentOptionsBase<Readonly< MenuOption> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
100
+ } & ComponentOptionsBase<Readonly< MenuOption> & Readonly<{}>, {
101
+ itemRef: Readonly< ShallowRef<HTMLLIElement | null, HTMLLIElement | null>>;
102
+ hasChild: ComputedRef<boolean>;
103
+ showArrow: ComputedRef<boolean>;
104
+ placement: ComputedRef<Placement>;
105
+ visible: Ref<boolean, boolean>;
106
+ value: any;
107
+ label: string | undefined;
108
+ disabled: boolean | undefined;
109
+ icon: string | Component;
110
+ subIcon: string | false | Component | undefined;
111
+ depth: number;
112
+ children: MenuOption[];
113
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
72
114
  $slots: {
73
115
  icon?: (props: {}) => any;
74
116
  } & {
@@ -1,13 +1,18 @@
1
1
  import { MenuOption } from './types';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { DefineComponent, ShallowRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  type __VLS_Props = {
4
4
  options?: MenuOption[];
5
5
  };
6
- declare var __VLS_1: {};
6
+ declare var __VLS_1: {}, __VLS_28: {};
7
7
  type __VLS_Slots = {} & {
8
8
  default?: (props: typeof __VLS_1) => any;
9
+ } & {
10
+ 'ellipsis-icon'?: (props: typeof __VLS_28) => any;
9
11
  };
10
- declare const __VLS_base: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_base: DefineComponent<__VLS_Props, {
13
+ loopRef: Readonly< ShallowRef<HTMLUListElement | null>>;
14
+ update: () => Promise<void>;
15
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
11
16
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
17
  declare const _default: typeof __VLS_export;
13
18
  export default _default;
@@ -1,22 +1,111 @@
1
- import e from "./menu-item.mjs";
2
- import t from "./submenu.mjs";
3
- import { Fragment as n, createBlock as r, createElementBlock as i, defineComponent as a, mergeProps as o, openBlock as s, renderList as c, renderSlot as l } from "vue";
1
+ import { useSlotNodes as e } from "../../../composables/use-slot-nodes/index.mjs";
2
+ import "../../../composables/index.mjs";
3
+ import { _menuProvideKey as t } from "./constants.mjs";
4
+ import n from "./menu-item.mjs";
5
+ import r from "./submenu.mjs";
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 v, renderList as y, renderSlot as b, resolveDynamicComponent as ee, 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";
4
9
  //#region packages/components/menu/src/loop.vue?vue&type=script&setup=true&lang.ts
5
- var u = a({
10
+ var j = d({
6
11
  __name: "loop",
7
12
  props: { options: { default: () => void 0 } },
8
- setup(a) {
9
- return (u, d) => (s(), i("ul", null, [l(u.$slots, "default", {}, () => [(s(!0), i(n, null, c(a.options, (a) => {
10
- var c;
11
- return s(), i(n, { key: typeof a.value == "boolean" ? a.label : a.value }, [a != null && (c = a.children) != null && c.length ? (s(), r(t, {
13
+ setup(d, { expose: j }) {
14
+ let M = w("loopRef"), N = w("moreRef"), P = x([]), F = x([]), I = v([]), { depth: L, hasOptions: R, direction: z, ellipsis: B, ellipsisIcon: V } = f(t), H = o(() => {
15
+ var e;
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
+ return e ? e.scrollWidth > e.clientWidth : !1;
20
+ }, K = C(), q = () => {
21
+ var e, t;
22
+ let n = (e = (t = N.value) == null ? void 0 : t.itemRef) == null ? N.value : e, r = M.value;
23
+ if (!n || !r) return -1;
24
+ let i = r.offsetWidth, a = Array.from(r.children), o = n.offsetWidth;
25
+ return a.findIndex((e) => (o += e.offsetWidth, o > i));
26
+ }, J = (e, t) => {
27
+ F.value = e.splice(t, e.length - t);
28
+ }, Y = (t, n) => {
29
+ var r, i, o;
30
+ 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;
31
+ for (let e = n; e < l; e++) {
32
+ var u;
33
+ (u = M.value) == null || u.children[e].setAttribute("is-hidden", "true");
34
+ }
35
+ I.value = c.slice(n).map((e) => a(e, { "is-more": !0 }));
36
+ }, X = async () => {
37
+ var e;
38
+ if (P.value = [...(e = d.options) == null ? [] : e], L.value === 0 && z.value !== "vertical" && B.value) {
39
+ if (!R.value && M.value && M.value.querySelectorAll("li[is-hidden=\"true\"]").forEach((e) => {
40
+ e.setAttribute("is-hidden", "false");
41
+ }), await m(), G()) {
42
+ W.value = !0, await m();
43
+ let e = q();
44
+ if (e === -1) return;
45
+ R.value ? J(P.value, e) : Y(K, e);
46
+ } else W.value = !1, I.value = [], F.value = [];
47
+ }
48
+ }, Z = O(X, 100), Q = () => {
49
+ let e = [];
50
+ if (B.value) {
51
+ let { width: t, stop: n } = k(M.value), { stop: r } = T(t, () => {
52
+ Z();
53
+ });
54
+ e.push(n, r);
55
+ }
56
+ return { cleanup: () => {
57
+ e.forEach((e) => e());
58
+ } };
59
+ }, $ = [], te = () => {
60
+ $.forEach((e) => e());
61
+ }, ne = async () => {
62
+ if (B.value) {
63
+ await X();
64
+ let { cleanup: e } = Q();
65
+ $.push(e);
66
+ }
67
+ };
68
+ return h(() => {
69
+ ne();
70
+ }), g(() => {
71
+ te();
72
+ }), j({
73
+ loopRef: M,
74
+ update: X
75
+ }), (e, t) => (_(), l("ul", {
76
+ ref_key: "loopRef",
77
+ ref: M
78
+ }, [b(e.$slots, "default", {}, () => [(_(!0), l(i, null, y(H.value, (t) => {
79
+ var a;
80
+ return _(), l(i, { key: typeof t.value == "boolean" ? t.label : t.value }, [t != null && (a = t.children) != null && a.length ? (_(), s(r, {
12
81
  key: 0,
13
- item: a
14
- }, null, 8, ["item"])) : (s(), r(e, o({
82
+ item: t,
83
+ "is-more": e.$attrs["is-more"]
84
+ }, null, 8, ["item", "is-more"])) : (_(), s(n, p({
15
85
  key: 1,
16
86
  ref_for: !0
17
- }, a), null, 16))], 64);
18
- }), 128))])]));
87
+ }, t, { "is-more": e.$attrs["is-more"] }), null, 16, ["is-more"]))], 64);
88
+ }), 128))]), W.value ? (_(), s(n, {
89
+ key: 0,
90
+ ref_key: "moreRef",
91
+ ref: N,
92
+ value: "more",
93
+ children: F.value,
94
+ "has-children": "",
95
+ "sub-icon": !1,
96
+ depth: -1,
97
+ "is-more": !0,
98
+ class: "is-more",
99
+ icon: S(U)
100
+ }, u({
101
+ icon: E(() => [b(e.$slots, "ellipsis-icon")]),
102
+ _: 2
103
+ }, [S(R) ? void 0 : {
104
+ name: "item-submenu",
105
+ fn: E(() => [(_(!0), l(i, null, y(I.value, (e) => (_(), s(ee(e), { key: e.key }))), 128))]),
106
+ key: "0"
107
+ }]), 1032, ["children", "icon"])) : c("", !0)], 512));
19
108
  }
20
109
  });
21
110
  //#endregion
22
- export { u as default };
111
+ export { j as default };
@@ -1,5 +1,6 @@
1
1
  import { MenuOption } from './types';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { DefineComponent, ShallowRef, ComputedRef, Ref, Component, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ import { Placement } from '@floating-ui/vue';
3
4
  declare var __VLS_7: {}, __VLS_14: {}, __VLS_16: {}, __VLS_30: {}, __VLS_37: {}, __VLS_39: {};
4
5
  type __VLS_Slots = {} & {
5
6
  icon?: (props: typeof __VLS_7) => any;
@@ -14,7 +15,20 @@ type __VLS_Slots = {} & {
14
15
  } & {
15
16
  submenu?: (props: typeof __VLS_39) => any;
16
17
  };
17
- declare const __VLS_base: DefineComponent<MenuOption, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<MenuOption> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_base: DefineComponent<MenuOption, {
19
+ itemRef: Readonly< ShallowRef<HTMLLIElement | null, HTMLLIElement | null>>;
20
+ hasChild: ComputedRef<boolean>;
21
+ showArrow: ComputedRef<boolean>;
22
+ placement: ComputedRef<Placement>;
23
+ visible: Ref<boolean, boolean>;
24
+ value: any;
25
+ label: string | undefined;
26
+ disabled: boolean | undefined;
27
+ icon: string | Component;
28
+ subIcon: string | false | Component | undefined;
29
+ depth: number;
30
+ children: MenuOption[];
31
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<MenuOption> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
18
32
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
33
  declare const _default: typeof __VLS_export;
20
34
  export default _default;