lkt-menu 2.0.11 → 2.0.13
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/dist/build.css +1 -1
- package/dist/build.d.ts +3 -3
- package/dist/build.js +140 -124
- package/package.json +1 -1
- package/theme/default.css +2 -0
package/dist/build.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.lkt-menu{width:var(--lkt-menu--container--width);overflow:auto;max-height:var(--lkt-menu--container--max-height);display:flex;flex-direction:var(--lkt-menu--container--flex-direction);align-items:var(--lkt-menu--container--align-items)}.lkt-menu-main{background:var(--lkt-menu--background);padding:var(--lkt-menu--padding);max-width:var(--lkt-menu--max-width);width:var(--lkt-menu--width);height:100%;display:var(--lkt-menu--display);flex-direction:var(--lkt-menu--flex-direction);align-items:var(--lkt-menu--align-items);gap:var(--lkt-menu--entry--gap);position:relative}.lkt-menu-entry-toggle-inner{transition:all linear .2s}.lkt-menu-entry-toggle-inner.is-opened{transform:rotate(180deg)}.lkt-entry-content{display:inline-flex;flex-direction:row;gap:var(--lkt-menu--gap)}.lkt-menu-entry-toggle{display:inline-flex;flex-direction:row;align-items:center;justify-content:center}.lkt-menu-entries{align-items:var(--lkt-menu--entries--align-items);background:var(--lkt-menu--entries--background);display:flex;flex-direction:var(--lkt-menu--entries--flex-direction);width:var(--lkt-menu--entries--width)}.lkt-menu-entry{padding:var(--lkt-menu--entry--padding)}.lkt-menu-entry .lkt-anchor{width:100%}.lkt-menu-entry-main{display:flex;justify-content:space-between;position:relative}.lkt-entry-content{font-size:var(--lkt-menu--font-size);width:100%}.lkt-menu-outside{position:absolute;top:0;right:0;left:0;bottom:0;background:var(--lkt-menu--outside--background);z-index:-1}.lkt-menu-entry-children{padding:var(--lkt-menu--children--padding)}.lkt-menu-entry-text{padding:var(--lkt-menu--text-without-icon--padding)}.lkt-menu.has-icon .lkt-menu-entry-text{padding:var(--lkt-menu--text--padding)}.lkt-menu.has-icon .lkt-menu-entry-icon+.lkt-menu-entry-text{padding:var(--lkt-menu--text-with-icon--padding)}.lkt-menu.type-hidden{position:fixed;width:100%;background:var(--lkt-menu--container--background);transition:var(--lkt-menu--container--transition);z-index:400}.lkt-menu.type-hidden.left-hidden,.lkt-menu.type-hidden.right-hidden{top:var(--lkt-menu--container--top);bottom:var(--lkt-menu--container--bottom)}.lkt-menu.type-hidden.bottom-hidden,.lkt-menu.type-hidden.top-hidden{left:var(--lkt-menu--container--left);right:var(--lkt-menu--container--right)}.lkt-menu.type-hidden .lkt-menu-main{z-index:402}.lkt-menu.type-hidden .lkt-menu-outside{z-index:401}.lkt-menu.type-hidden .lkt-menu-outside{opacity:
|
|
1
|
+
.lkt-menu{width:var(--lkt-menu--container--width);overflow:auto;max-height:var(--lkt-menu--container--max-height);display:flex;flex-direction:var(--lkt-menu--container--flex-direction);align-items:var(--lkt-menu--container--align-items)}.lkt-menu-main{background:var(--lkt-menu--background);padding:var(--lkt-menu--padding);max-width:var(--lkt-menu--max-width);width:var(--lkt-menu--width);height:100%;display:var(--lkt-menu--display);flex-direction:var(--lkt-menu--flex-direction);align-items:var(--lkt-menu--align-items);gap:var(--lkt-menu--entry--gap);position:relative}.lkt-menu-entry-toggle-inner{transition:all linear .2s}.lkt-menu-entry-toggle-inner.is-opened{transform:rotate(180deg)}.lkt-entry-content{display:inline-flex;flex-direction:row;gap:var(--lkt-menu--gap)}.lkt-menu-entry-toggle{display:inline-flex;flex-direction:row;align-items:center;justify-content:center}.lkt-menu-entries{align-items:var(--lkt-menu--entries--align-items);background:var(--lkt-menu--entries--background);display:flex;flex-direction:var(--lkt-menu--entries--flex-direction);width:var(--lkt-menu--entries--width)}.lkt-menu-entry{padding:var(--lkt-menu--entry--padding)}.lkt-menu-entry .lkt-anchor{width:100%}.lkt-menu-entry-main{display:flex;justify-content:space-between;position:relative}.lkt-entry-content{font-size:var(--lkt-menu--font-size);width:100%}.lkt-menu-outside{position:absolute;top:0;right:0;left:0;bottom:0;background:var(--lkt-menu--outside--background);z-index:-1}.lkt-menu-entry-children{padding:var(--lkt-menu--children--padding)}.lkt-menu-entry-text{padding:var(--lkt-menu--text-without-icon--padding)}.lkt-menu.has-icon .lkt-menu-entry-text{padding:var(--lkt-menu--text--padding)}.lkt-menu.has-icon .lkt-menu-entry-icon+.lkt-menu-entry-text{padding:var(--lkt-menu--text-with-icon--padding)}.lkt-menu.type-hidden{position:fixed;width:100%;background:var(--lkt-menu--container--background);transition:var(--lkt-menu--container--transition);z-index:400}.lkt-menu.type-hidden.left-hidden,.lkt-menu.type-hidden.right-hidden{top:var(--lkt-menu--container--top);bottom:var(--lkt-menu--container--bottom)}.lkt-menu.type-hidden.bottom-hidden,.lkt-menu.type-hidden.top-hidden{left:var(--lkt-menu--container--left);right:var(--lkt-menu--container--right)}.lkt-menu.type-hidden .lkt-menu-main{z-index:402}.lkt-menu.type-hidden .lkt-menu-outside{z-index:401}.lkt-menu.type-hidden .lkt-menu-outside{opacity:var(--lkt-menu--outside--hidden--opacity);transition:all linear .4s .1s}.lkt-menu.type-hidden.is-visible .lkt-menu-outside{opacity:var(--lkt-menu--outside--visible--opacity)}.lkt-menu.type-hidden.left-hidden{left:-100%}.lkt-menu.type-hidden.left-hidden.is-visible{left:0}.lkt-menu.type-hidden.right-hidden{justify-content:flex-end;right:-100%}.lkt-menu.type-hidden.right-hidden.is-visible{right:0}.lkt-menu.type-hidden.bottom-hidden{justify-content:flex-end;bottom:-100%}.lkt-menu.type-hidden.bottom-hidden.is-visible{bottom:var(--lkt-menu--container--bottom);top:var(--lkt-menu--container--top)}.lkt-menu.type-hidden.bottom-hidden .lkt-menu-main{margin-top:auto;height:auto}.lkt-menu.type-hidden.top-hidden{top:-100%}.lkt-menu.type-hidden.top-hidden.is-visible{top:var(--lkt-menu--container--top)}
|
package/dist/build.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare namespace
|
|
1
|
+
declare namespace Se {
|
|
2
2
|
function install(s: any): void;
|
|
3
3
|
}
|
|
4
|
-
declare function
|
|
5
|
-
export {
|
|
4
|
+
declare function Me(s: any): boolean;
|
|
5
|
+
export { Se as default, Me as setMenuToggleSlot };
|
package/dist/build.js
CHANGED
|
@@ -1,158 +1,172 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { MenuEntryType as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { DataState as
|
|
5
|
-
import { httpCall as
|
|
6
|
-
const G = (s,
|
|
1
|
+
import { defineComponent as Z, ref as L, useSlots as x, computed as c, watch as K, onMounted as ee, resolveComponent as I, createElementBlock as p, openBlock as u, normalizeClass as O, createElementVNode as V, createCommentVNode as C, createBlock as f, unref as r, normalizeProps as W, mergeProps as R, createSlots as q, withCtx as g, renderSlot as k, toDisplayString as le, resolveDynamicComponent as ne, Fragment as te, renderList as P, mergeDefaults as oe } from "vue";
|
|
2
|
+
import { MenuEntryType as T, MenuController as j, MenuType as Y, getDefaultValues as ue, Menu as se } from "lkt-vue-kernel";
|
|
3
|
+
import { useRouter as ie } from "vue-router";
|
|
4
|
+
import { DataState as ae } from "lkt-data-state";
|
|
5
|
+
import { httpCall as re } from "lkt-http-client";
|
|
6
|
+
const G = (s, b) => (b.forEach((o) => {
|
|
7
7
|
o.key && !s.includes(o.key) && s.push(o.key), o.children && o.children.length > 0 && G(s, o.children);
|
|
8
|
-
}), s),
|
|
8
|
+
}), s), U = class U {
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
let
|
|
12
|
-
const
|
|
10
|
+
U.toggleSlot = "", U.debugEnabled = !1;
|
|
11
|
+
let E = U;
|
|
12
|
+
const ce = ["id"], de = { class: "lkt-menu-entry-main" }, ve = { class: "lkt-entry-content" }, pe = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "lkt-menu-entry-icon"
|
|
15
|
-
},
|
|
15
|
+
}, me = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "lkt-menu-entry-text"
|
|
18
|
-
},
|
|
18
|
+
}, ke = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "lkt-menu-entry-children"
|
|
21
|
-
},
|
|
21
|
+
}, ye = /* @__PURE__ */ Z({
|
|
22
22
|
__name: "MenuItem",
|
|
23
23
|
props: {
|
|
24
|
-
modelValue: { default: () => ({}) }
|
|
24
|
+
modelValue: { default: () => ({}) },
|
|
25
|
+
menuKey: {},
|
|
26
|
+
closeOnClickEntry: { type: Boolean }
|
|
25
27
|
},
|
|
26
28
|
emits: [
|
|
27
29
|
"update:modelValue"
|
|
28
30
|
],
|
|
29
|
-
setup(s, { emit:
|
|
30
|
-
const o =
|
|
31
|
+
setup(s, { emit: b }) {
|
|
32
|
+
const o = b, d = s, e = L(d.modelValue), v = x(), a = ie(), A = L(!1), B = () => {
|
|
31
33
|
e.value.isOpened = !e.value.isOpened;
|
|
32
|
-
},
|
|
34
|
+
}, $ = () => {
|
|
33
35
|
var t, l;
|
|
34
|
-
return typeof e.value.children < "u" && ((t = e.value.children) == null ? void 0 : t.length) > 0 && !e.value.keepOpenOnChildClick &&
|
|
36
|
+
return typeof e.value.children < "u" && ((t = e.value.children) == null ? void 0 : t.length) > 0 && !e.value.keepOpenOnChildClick && B(), typeof ((l = e.value.events) == null ? void 0 : l.click) == "function" && e.value.events.click({
|
|
35
37
|
entry: e.value
|
|
36
38
|
}), 1;
|
|
37
|
-
}, D =
|
|
39
|
+
}, D = c(() => v["icon-" + e.value.key] || e.value.icon !== ""), w = c(() => {
|
|
38
40
|
let t = [];
|
|
39
41
|
return D.value && t.push("has-icon"), A.value && t.push("is-active"), e.value.type && t.push(`is-${e.value.type}`), t.join(" ");
|
|
40
|
-
}),
|
|
42
|
+
}), F = c(() => {
|
|
41
43
|
var l;
|
|
42
44
|
return G([], ((l = e.value) == null ? void 0 : l.children) ?? []);
|
|
43
|
-
}),
|
|
45
|
+
}), J = c(() => {
|
|
44
46
|
let t = [];
|
|
45
|
-
for (let l in
|
|
46
|
-
l.startsWith("icon-") &&
|
|
47
|
+
for (let l in v)
|
|
48
|
+
l.startsWith("icon-") && F.value.includes(l.substring(5)) && t.push(l);
|
|
47
49
|
return t;
|
|
48
|
-
}),
|
|
50
|
+
}), z = c(() => e.value.isActive ? !0 : typeof e.value.isActiveChecker == "function" ? !!e.value.isActiveChecker({
|
|
49
51
|
entry: e.value
|
|
50
|
-
}) : !1), N =
|
|
51
|
-
return
|
|
52
|
+
}) : !1), N = c(() => !!E.toggleSlot), n = c(() => E.toggleSlot);
|
|
53
|
+
return K(() => d.modelValue, (t) => {
|
|
52
54
|
e.value = t;
|
|
53
|
-
}, { deep: !0 }),
|
|
55
|
+
}, { deep: !0 }), K(e, (t) => {
|
|
54
56
|
o("update:modelValue", t);
|
|
55
|
-
}, { deep: !0 }),
|
|
57
|
+
}, { deep: !0 }), ee(() => {
|
|
56
58
|
var l, i, m;
|
|
57
59
|
let t = a == null ? void 0 : a.currentRoute;
|
|
58
60
|
if (t) {
|
|
59
61
|
if (t.value.path === ((l = e.value.anchor) == null ? void 0 : l.to))
|
|
60
62
|
e.value.isOpened = !0;
|
|
61
63
|
else if (typeof e.value.children < "u" && ((i = e.value.children) == null ? void 0 : i.length) > 0) {
|
|
62
|
-
let
|
|
63
|
-
(m = e.value.children) == null || m.forEach((
|
|
64
|
-
var
|
|
65
|
-
t.value.path === ((
|
|
66
|
-
}),
|
|
64
|
+
let S = !1;
|
|
65
|
+
(m = e.value.children) == null || m.forEach((H) => {
|
|
66
|
+
var M;
|
|
67
|
+
t.value.path === ((M = H.anchor) == null ? void 0 : M.to) && (S = !0);
|
|
68
|
+
}), S && (e.value.isOpened = !0);
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
}), (t, l) => {
|
|
70
|
-
var
|
|
71
|
-
const i =
|
|
72
|
-
return u(),
|
|
73
|
-
class:
|
|
72
|
+
var M;
|
|
73
|
+
const i = I("lkt-button"), m = I("lkt-header"), S = I("lkt-anchor"), H = I("menu-item", !0);
|
|
74
|
+
return u(), p("div", {
|
|
75
|
+
class: O(["lkt-menu-entry", w.value]),
|
|
74
76
|
id: `entry-${e.value.key}`
|
|
75
77
|
}, [
|
|
76
|
-
|
|
77
|
-
e.value.type ===
|
|
78
|
-
|
|
78
|
+
V("div", de, [
|
|
79
|
+
e.value.type === r(T).Button ? (u(), f(i, W(R({ key: 0 }, e.value.button)), q({ _: 2 }, [
|
|
80
|
+
r(v).tooltip ? {
|
|
79
81
|
name: "tooltip",
|
|
80
|
-
fn:
|
|
82
|
+
fn: g(() => [
|
|
81
83
|
k(t.$slots, "tooltip")
|
|
82
84
|
]),
|
|
83
85
|
key: "0"
|
|
84
86
|
} : void 0,
|
|
85
|
-
|
|
87
|
+
r(v).split ? {
|
|
86
88
|
name: "split",
|
|
87
|
-
fn:
|
|
89
|
+
fn: g(() => [
|
|
88
90
|
k(t.$slots, "split")
|
|
89
91
|
]),
|
|
90
92
|
key: "1"
|
|
91
93
|
} : void 0
|
|
92
|
-
]), 1040)) : e.value.type ===
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
]), 1040)) : e.value.type === r(T).Header ? (u(), f(m, W(R({ key: 1 }, e.value.header)), null, 16)) : e.value.type === r(T).Anchor ? (u(), f(S, W(R({ key: 2 }, {
|
|
95
|
+
...e.value.anchor
|
|
96
|
+
})), null, 16)) : (u(), f(S, R({ key: 3 }, {
|
|
97
|
+
...e.value.anchor,
|
|
98
|
+
events: {
|
|
99
|
+
...e.value.anchor.events,
|
|
100
|
+
click: (y) => {
|
|
101
|
+
var _, h, Q, X;
|
|
102
|
+
t.closeOnClickEntry && r(j).closeMenu(d.menuKey), typeof ((h = (_ = e.value.anchor) == null ? void 0 : _.events) == null ? void 0 : h.click) == "function" && ((X = (Q = e.value.anchor) == null ? void 0 : Q.events) == null || X.click(y));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
"on-click": $,
|
|
107
|
+
"is-active": z.value,
|
|
108
|
+
onActive: l[0] || (l[0] = (y) => A.value = y)
|
|
96
109
|
}), {
|
|
97
|
-
text:
|
|
98
|
-
|
|
99
|
-
D.value ? (u(),
|
|
100
|
-
|
|
110
|
+
text: g(({ text: y }) => [
|
|
111
|
+
V("div", ve, [
|
|
112
|
+
D.value ? (u(), p("div", pe, [
|
|
113
|
+
r(v)["icon-" + e.value.key] ? k(t.$slots, "icon-" + e.value.key, {
|
|
101
114
|
key: e.value.key,
|
|
102
115
|
entry: e.value
|
|
103
|
-
}) : e.value.icon !== "" ? (u(),
|
|
116
|
+
}) : e.value.icon !== "" ? (u(), p("i", {
|
|
104
117
|
key: 1,
|
|
105
|
-
class:
|
|
106
|
-
}, null, 2)) :
|
|
107
|
-
])) :
|
|
108
|
-
|
|
118
|
+
class: O(e.value.icon)
|
|
119
|
+
}, null, 2)) : C("", !0)
|
|
120
|
+
])) : C("", !0),
|
|
121
|
+
y !== "" ? (u(), p("div", me, le(y), 1)) : C("", !0)
|
|
109
122
|
])
|
|
110
123
|
]),
|
|
111
124
|
_: 3
|
|
112
125
|
}, 16, ["is-active"])),
|
|
113
|
-
e.value.type !==
|
|
126
|
+
e.value.type !== r(T).Button && e.value.children && ((M = e.value.children) == null ? void 0 : M.length) > 0 ? (u(), p("div", {
|
|
114
127
|
key: 4,
|
|
115
128
|
class: "lkt-menu-entry-toggle",
|
|
116
|
-
onClick:
|
|
129
|
+
onClick: B
|
|
117
130
|
}, [
|
|
118
|
-
N.value ? (u(),
|
|
131
|
+
N.value ? (u(), f(ne(n.value), {
|
|
119
132
|
key: 0,
|
|
120
|
-
class:
|
|
121
|
-
}, null, 8, ["class"])) : (u(),
|
|
133
|
+
class: O(["lkt-menu-entry-toggle-inner", e.value.isOpened ? "is-opened" : ""])
|
|
134
|
+
}, null, 8, ["class"])) : (u(), p("div", {
|
|
122
135
|
key: 1,
|
|
123
|
-
class:
|
|
136
|
+
class: O(["lkt-menu-entry-toggle-inner", e.value.isOpened ? "is-opened" : ""])
|
|
124
137
|
}, l[1] || (l[1] = [
|
|
125
|
-
|
|
138
|
+
V("i", { class: "lkt-icn-angle-bottom" }, null, -1)
|
|
126
139
|
]), 2))
|
|
127
|
-
])) :
|
|
140
|
+
])) : C("", !0)
|
|
128
141
|
]),
|
|
129
|
-
e.value.isOpened ? (u(),
|
|
130
|
-
(u(!0),
|
|
131
|
-
modelValue: e.value.children[
|
|
132
|
-
"onUpdate:modelValue": (
|
|
133
|
-
key: e.value.children[
|
|
142
|
+
e.value.isOpened ? (u(), p("div", ke, [
|
|
143
|
+
(u(!0), p(te, null, P(e.value.children, (y, _) => (u(), f(H, {
|
|
144
|
+
modelValue: e.value.children[_],
|
|
145
|
+
"onUpdate:modelValue": (h) => e.value.children[_] = h,
|
|
146
|
+
key: e.value.children[_].key
|
|
134
147
|
}, q({ _: 2 }, [
|
|
135
|
-
|
|
136
|
-
name:
|
|
137
|
-
fn:
|
|
138
|
-
k(t.$slots,
|
|
148
|
+
P(J.value, (h) => ({
|
|
149
|
+
name: h,
|
|
150
|
+
fn: g(() => [
|
|
151
|
+
k(t.$slots, h)
|
|
139
152
|
])
|
|
140
153
|
}))
|
|
141
154
|
]), 1032, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
142
|
-
])) :
|
|
143
|
-
], 10,
|
|
155
|
+
])) : C("", !0)
|
|
156
|
+
], 10, ce);
|
|
144
157
|
};
|
|
145
158
|
}
|
|
146
|
-
}),
|
|
159
|
+
}), he = ["role"], fe = { class: "lkt-menu-main" }, ge = { class: "lkt-menu-entries" }, _e = /* @__PURE__ */ Z({
|
|
147
160
|
__name: "LktMenu",
|
|
148
|
-
props: /* @__PURE__ */
|
|
161
|
+
props: /* @__PURE__ */ oe({
|
|
149
162
|
modelValue: {},
|
|
150
163
|
type: {},
|
|
151
164
|
menuKey: { type: [String, Number, Function] },
|
|
152
165
|
hiddenPosition: {},
|
|
153
166
|
closeOnClickOutside: { type: Boolean },
|
|
167
|
+
closeOnClickEntry: { type: Boolean },
|
|
154
168
|
http: {}
|
|
155
|
-
},
|
|
169
|
+
}, ue(se)),
|
|
156
170
|
emits: [
|
|
157
171
|
"update:modelValue",
|
|
158
172
|
"click-outside",
|
|
@@ -161,99 +175,101 @@ const ae = ["id"], re = { class: "lkt-menu-entry-main" }, ce = { class: "lkt-ent
|
|
|
161
175
|
"response",
|
|
162
176
|
"error"
|
|
163
177
|
],
|
|
164
|
-
setup(s, { emit:
|
|
178
|
+
setup(s, { emit: b }) {
|
|
165
179
|
var N;
|
|
166
|
-
const o = s,
|
|
180
|
+
const o = s, d = b, e = L(!1), v = x(), a = L(o.modelValue), A = (n) => {
|
|
167
181
|
let t = {};
|
|
168
182
|
typeof n == "object" && Object.keys(n).length > 0 && (t = JSON.parse(JSON.stringify(n)));
|
|
169
183
|
for (let l in t)
|
|
170
184
|
(Array.isArray(t[l]) || typeof t[l] == "object") && (t[l] = JSON.stringify(t[l]));
|
|
171
185
|
return t;
|
|
172
186
|
};
|
|
173
|
-
|
|
187
|
+
K(() => j.config.value, (n) => {
|
|
174
188
|
}, { deep: !0 });
|
|
175
|
-
const
|
|
189
|
+
const B = c(() => {
|
|
176
190
|
let n = [
|
|
177
191
|
`type-${o.type}`
|
|
178
192
|
];
|
|
179
|
-
return o.menuKey && n.push(o.menuKey), e.value && n.push("is-visible"), o.type ===
|
|
193
|
+
return o.menuKey && n.push(o.menuKey), e.value && n.push("is-visible"), o.type === Y.Hidden && n.push(`${o.hiddenPosition}-hidden`), n.join(" ");
|
|
180
194
|
});
|
|
181
|
-
let
|
|
182
|
-
|
|
183
|
-
const D =
|
|
195
|
+
let $ = new ae({});
|
|
196
|
+
$.increment(A(((N = o.http) == null ? void 0 : N.data) ?? {}));
|
|
197
|
+
const D = c(() => G([], a.value)), w = c(() => {
|
|
184
198
|
let n = [];
|
|
185
|
-
for (let t in
|
|
199
|
+
for (let t in v)
|
|
186
200
|
t.startsWith("icon-") && D.value.includes(t.substring(5)) && n.push(t);
|
|
187
201
|
return n;
|
|
188
|
-
}),
|
|
202
|
+
}), F = () => {
|
|
189
203
|
var t, l;
|
|
190
204
|
if (!((t = o.http) != null && t.resource)) return;
|
|
191
|
-
let n =
|
|
192
|
-
|
|
193
|
-
|
|
205
|
+
let n = $.getData();
|
|
206
|
+
d("loading"), re((l = o.http) == null ? void 0 : l.resource, n).then((i) => {
|
|
207
|
+
$.turnStoredIntoOriginal(), a.value = i.data, d("results", i.data), d("response", i);
|
|
194
208
|
}).catch((i) => {
|
|
195
|
-
|
|
209
|
+
d("error", i);
|
|
196
210
|
});
|
|
197
|
-
},
|
|
198
|
-
o.closeOnClickOutside &&
|
|
211
|
+
}, J = () => {
|
|
212
|
+
o.closeOnClickOutside && j.closeMenu(o.menuKey), d("click-outside");
|
|
199
213
|
};
|
|
200
|
-
|
|
214
|
+
K(() => o.modelValue, (n) => {
|
|
201
215
|
a.value = n;
|
|
202
|
-
}, { deep: !0 }),
|
|
203
|
-
|
|
204
|
-
}, { deep: !0 }),
|
|
205
|
-
|
|
216
|
+
}, { deep: !0 }), K(a, (n) => {
|
|
217
|
+
d("update:modelValue", n);
|
|
218
|
+
}, { deep: !0 }), ee(() => {
|
|
219
|
+
j.addMenu(o.menuKey, e), F();
|
|
206
220
|
});
|
|
207
|
-
const
|
|
208
|
-
if (o.type ===
|
|
221
|
+
const z = c(() => {
|
|
222
|
+
if (o.type === Y.TabList) return "tablist";
|
|
209
223
|
});
|
|
210
|
-
return (n, t) => (u(),
|
|
211
|
-
class:
|
|
212
|
-
role:
|
|
224
|
+
return (n, t) => (u(), p("div", {
|
|
225
|
+
class: O(["lkt-menu", B.value]),
|
|
226
|
+
role: z.value
|
|
213
227
|
}, [
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
(u(!0),
|
|
228
|
+
V("div", fe, [
|
|
229
|
+
r(v).before ? k(n.$slots, "before", { key: 0 }) : C("", !0),
|
|
230
|
+
V("div", ge, [
|
|
231
|
+
(u(!0), p(te, null, P(a.value, (l, i) => (u(), f(ye, {
|
|
218
232
|
modelValue: a.value[i],
|
|
219
233
|
"onUpdate:modelValue": (m) => a.value[i] = m,
|
|
220
|
-
class:
|
|
234
|
+
class: O(l.class),
|
|
235
|
+
"menu-key": n.menuKey,
|
|
236
|
+
"close-on-click-entry": n.closeOnClickEntry
|
|
221
237
|
}, q({ _: 2 }, [
|
|
222
|
-
|
|
238
|
+
P(w.value, (m) => ({
|
|
223
239
|
name: m,
|
|
224
|
-
fn:
|
|
240
|
+
fn: g(() => [
|
|
225
241
|
k(n.$slots, m)
|
|
226
242
|
])
|
|
227
243
|
})),
|
|
228
|
-
|
|
244
|
+
r(v)[`tooltip-${l.key}`] ? {
|
|
229
245
|
name: "tooltip",
|
|
230
|
-
fn:
|
|
246
|
+
fn: g(() => [
|
|
231
247
|
k(n.$slots, `tooltip-${l.key}`)
|
|
232
248
|
]),
|
|
233
249
|
key: "0"
|
|
234
250
|
} : void 0,
|
|
235
|
-
|
|
251
|
+
r(v)[`split-${l.key}`] ? {
|
|
236
252
|
name: "split",
|
|
237
|
-
fn:
|
|
253
|
+
fn: g(() => [
|
|
238
254
|
k(n.$slots, `split-${l.key}`)
|
|
239
255
|
]),
|
|
240
256
|
key: "1"
|
|
241
257
|
} : void 0
|
|
242
|
-
]), 1032, ["modelValue", "onUpdate:modelValue", "class"]))), 256))
|
|
258
|
+
]), 1032, ["modelValue", "onUpdate:modelValue", "class", "menu-key", "close-on-click-entry"]))), 256))
|
|
243
259
|
])
|
|
244
260
|
]),
|
|
245
|
-
|
|
261
|
+
V("div", {
|
|
246
262
|
class: "lkt-menu-outside",
|
|
247
|
-
onClick:
|
|
263
|
+
onClick: J
|
|
248
264
|
})
|
|
249
|
-
], 10,
|
|
265
|
+
], 10, he));
|
|
250
266
|
}
|
|
251
|
-
}),
|
|
267
|
+
}), Se = {
|
|
252
268
|
install: (s) => {
|
|
253
|
-
s.component("lkt-menu") === void 0 && s.component("lkt-menu",
|
|
269
|
+
s.component("lkt-menu") === void 0 && s.component("lkt-menu", _e);
|
|
254
270
|
}
|
|
255
|
-
},
|
|
271
|
+
}, Me = (s) => (E.toggleSlot = s, !0);
|
|
256
272
|
export {
|
|
257
|
-
|
|
258
|
-
|
|
273
|
+
Se as default,
|
|
274
|
+
Me as setMenuToggleSlot
|
|
259
275
|
};
|
package/package.json
CHANGED
package/theme/default.css
CHANGED