maz-ui 3.46.0 → 3.46.1-beta.1
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/components/MazAvatar.d.ts +12 -0
- package/components/MazAvatar.mjs +1 -1
- package/components/MazDropdown.d.ts +39 -9
- package/components/MazDropdown.mjs +226 -236
- package/components/MazLink.d.ts +6 -2
- package/components/MazLink.mjs +3 -3
- package/components/MazPicker.d.ts +2 -2
- package/components/MazTable.d.ts +1 -1
- package/components/assets/MazAvatar.css +1 -1
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazLink.css +1 -1
- package/components/chunks/MazAvatar-BXZpFUaZ.mjs +154 -0
- package/components/chunks/MazBtn-qFUqOv5D.mjs +150 -0
- package/components/chunks/{MazLazyImg-BmmDjOiK.mjs → MazLazyImg-D2seDVoC.mjs} +2 -2
- package/components/chunks/MazLink-CJ1canOj.mjs +79 -0
- package/components/chunks/MazSpinner-SgVUnAHk.mjs +37 -0
- package/components/chunks/{MazSpinner-DfHwN_9D.mjs → MazSpinner-gYRmfrSM.mjs} +1 -1
- package/components/chunks/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazAvatar.vue.d.ts +12 -0
- package/types/components/MazDropdown.vue.d.ts +39 -9
- package/types/components/MazLink.vue.d.ts +6 -2
- package/types/components/MazPicker.vue.d.ts +2 -2
- package/types/components/MazTable.vue.d.ts +1 -1
- package/components/chunks/MazAvatar-DVjTbmNj.mjs +0 -127
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
1
2
|
import type { Color } from './types';
|
|
2
3
|
export type { Color };
|
|
3
4
|
export interface Props {
|
|
5
|
+
/** The style of the component */
|
|
6
|
+
style?: HTMLAttributes['style'];
|
|
7
|
+
/** The class of the component */
|
|
8
|
+
class?: HTMLAttributes['class'];
|
|
4
9
|
/** The source of the image */
|
|
5
10
|
src?: string | null;
|
|
6
11
|
/** The caption of the avatar */
|
|
@@ -44,6 +49,12 @@ export interface Props {
|
|
|
44
49
|
fallbackSrc?: string;
|
|
45
50
|
/** Load the fallback image by default */
|
|
46
51
|
noPhoto?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The loading strategy of the image - lazy, eager or intersecting
|
|
54
|
+
* @default 'intersecting'
|
|
55
|
+
* @values `'lazy' | 'eager' | 'intersecting'`
|
|
56
|
+
*/
|
|
57
|
+
loading?: 'lazy' | 'eager' | 'intersecting';
|
|
47
58
|
}
|
|
48
59
|
declare function __VLS_template(): {
|
|
49
60
|
slots: {
|
|
@@ -72,6 +83,7 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
|
|
|
72
83
|
size: string;
|
|
73
84
|
src: string | null;
|
|
74
85
|
roundedSize: "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
86
|
+
loading: "lazy" | "eager" | "intersecting";
|
|
75
87
|
href: string;
|
|
76
88
|
to: string | Record<string, unknown>;
|
|
77
89
|
target: string;
|
package/components/MazAvatar.mjs
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import type { RouteLocationRaw } from 'vue-router';
|
|
2
2
|
import type { Color } from './MazBtn.vue';
|
|
3
|
+
import type { Props as MazLinkProps } from './MazLink.vue';
|
|
3
4
|
import type { Position } from './types';
|
|
4
5
|
import { type HTMLAttributes } from 'vue';
|
|
5
6
|
export type { Color, Position };
|
|
6
|
-
|
|
7
|
+
type ItemBase = Record<string, unknown> & {
|
|
7
8
|
label: string;
|
|
8
|
-
|
|
9
|
+
class?: unknown;
|
|
10
|
+
color?: Color;
|
|
11
|
+
};
|
|
12
|
+
type LinkItem = ItemBase & MazLinkProps & {
|
|
9
13
|
target?: string;
|
|
10
14
|
href?: string;
|
|
11
15
|
to?: RouteLocationRaw;
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
};
|
|
17
|
+
type ActionItem = ItemBase & {
|
|
18
|
+
action?: () => unknown;
|
|
19
|
+
};
|
|
20
|
+
export type MenuItem = (LinkItem & {
|
|
21
|
+
action?: never;
|
|
22
|
+
}) | (ActionItem & {
|
|
23
|
+
href?: never;
|
|
24
|
+
to?: never;
|
|
25
|
+
target?: never;
|
|
26
|
+
});
|
|
14
27
|
export interface Props {
|
|
15
28
|
style?: HTMLAttributes['style'];
|
|
16
29
|
class?: HTMLAttributes['class'];
|
|
@@ -61,13 +74,30 @@ declare function __VLS_template(): {
|
|
|
61
74
|
item: MenuItem;
|
|
62
75
|
}): any;
|
|
63
76
|
"menuitem-label"?(_: {
|
|
64
|
-
item:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
item: Record<string, unknown> & {
|
|
78
|
+
label: string;
|
|
79
|
+
class?: unknown;
|
|
80
|
+
color?: Color;
|
|
81
|
+
} & MazLinkProps & {
|
|
82
|
+
target?: string;
|
|
83
|
+
href?: string;
|
|
84
|
+
to?: RouteLocationRaw;
|
|
85
|
+
} & {
|
|
86
|
+
action?: never;
|
|
87
|
+
};
|
|
68
88
|
}): any;
|
|
69
89
|
"menuitem-label"?(_: {
|
|
70
|
-
item:
|
|
90
|
+
item: Record<string, unknown> & {
|
|
91
|
+
label: string;
|
|
92
|
+
class?: unknown;
|
|
93
|
+
color?: Color;
|
|
94
|
+
} & {
|
|
95
|
+
action?: () => unknown;
|
|
96
|
+
} & {
|
|
97
|
+
href?: never;
|
|
98
|
+
to?: never;
|
|
99
|
+
target?: never;
|
|
100
|
+
};
|
|
71
101
|
}): any;
|
|
72
102
|
};
|
|
73
103
|
refs: {};
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as ee, getCurrentInstance as oe, nextTick as ne, defineComponent as te, defineAsyncComponent as E, ref as L, watch as T, withDirectives as U, openBlock as v, createElementBlock as w, unref as a, normalizeClass as $, normalizeStyle as re, createElementVNode as h, withModifiers as z, renderSlot as f, createTextVNode as M, toDisplayString as A, createCommentVNode as p, createVNode as N, mergeProps as B, withCtx as O, createBlock as S, Transition as le, Fragment as F, renderList as se, vShow as ie } from "vue";
|
|
2
2
|
import './assets/MazDropdown.css';function ae({
|
|
3
3
|
componentName: t,
|
|
4
|
-
providedId:
|
|
4
|
+
providedId: r
|
|
5
5
|
}) {
|
|
6
|
-
return
|
|
6
|
+
return ee(() => {
|
|
7
7
|
var n;
|
|
8
|
-
return
|
|
8
|
+
return r ?? `${t}-${(n = oe()) == null ? void 0 : n.uid}`;
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
const
|
|
12
|
-
function
|
|
11
|
+
const g = "__maz-click-outside__";
|
|
12
|
+
function V() {
|
|
13
13
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
14
14
|
}
|
|
15
|
-
async function
|
|
15
|
+
async function q(t, r) {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
const n =
|
|
19
|
-
if (!
|
|
17
|
+
H(t);
|
|
18
|
+
const n = r.instance, d = r.value, k = typeof d == "function";
|
|
19
|
+
if (!k)
|
|
20
20
|
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
21
|
-
await
|
|
22
|
-
if ((!t ||
|
|
23
|
-
return
|
|
21
|
+
await ne(), t[g] = (b) => {
|
|
22
|
+
if ((!t || b.target && !t.contains(b.target)) && d && k)
|
|
23
|
+
return d.call(n, b);
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
document.addEventListener(
|
|
25
|
+
const C = V();
|
|
26
|
+
document.addEventListener(C, t[g], { passive: !0 });
|
|
27
27
|
} catch (n) {
|
|
28
28
|
console.error("[maz-ui](vClickOutside)", n);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function H(t) {
|
|
32
32
|
try {
|
|
33
|
-
const
|
|
34
|
-
document.removeEventListener(
|
|
35
|
-
} catch (
|
|
36
|
-
console.error("[maz-ui](vClickOutside)",
|
|
33
|
+
const r = V();
|
|
34
|
+
document.removeEventListener(r, t[g], !1), delete t[g];
|
|
35
|
+
} catch (r) {
|
|
36
|
+
console.error("[maz-ui](vClickOutside)", r);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ue(t, r) {
|
|
40
40
|
try {
|
|
41
|
-
if (
|
|
41
|
+
if (r.value === r.oldValue)
|
|
42
42
|
return;
|
|
43
|
-
|
|
43
|
+
q(t, r);
|
|
44
44
|
} catch (n) {
|
|
45
45
|
console.error("[maz-ui](vClickOutside)", n);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
mounted:
|
|
50
|
-
updated:
|
|
51
|
-
unmounted:
|
|
48
|
+
const de = {
|
|
49
|
+
mounted: q,
|
|
50
|
+
updated: ue,
|
|
51
|
+
unmounted: H
|
|
52
52
|
};
|
|
53
|
-
function
|
|
53
|
+
function ce(t, r) {
|
|
54
54
|
let n;
|
|
55
|
-
return function(...
|
|
55
|
+
return function(...d) {
|
|
56
56
|
clearTimeout(n), n = setTimeout(() => {
|
|
57
|
-
t.apply(this,
|
|
58
|
-
},
|
|
57
|
+
t.apply(this, d);
|
|
58
|
+
}, r);
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const fe = ["id"], pe = ["aria-expanded"], me = ["id"], ve = { class: "button-span" }, be = ["onClick"], ye = /* @__PURE__ */ te({
|
|
62
62
|
inheritAttrs: !1,
|
|
63
63
|
__name: "MazDropdown",
|
|
64
64
|
props: {
|
|
@@ -76,252 +76,242 @@ const ce = ["id"], fe = ["aria-expanded"], pe = ["id"], me = { class: "button-sp
|
|
|
76
76
|
screenReaderDescription: { default: "Open menu dropdown" }
|
|
77
77
|
},
|
|
78
78
|
emits: ["menuitem-clicked", "update:open"],
|
|
79
|
-
setup(t, { emit:
|
|
80
|
-
const n = t,
|
|
79
|
+
setup(t, { emit: r }) {
|
|
80
|
+
const n = t, d = r, k = E(() => import("./chunks/MazBtn-qFUqOv5D.mjs")), C = E(() => import("./chunks/MazLink-CJ1canOj.mjs")), b = E(() => import("./chunks/chevron-down-BkvtON3b.mjs")), y = ae({
|
|
81
81
|
componentName: "MazDropdown",
|
|
82
82
|
providedId: n.id
|
|
83
|
-
}),
|
|
84
|
-
|
|
83
|
+
}), i = L(n.open), s = L(), c = ce((e) => {
|
|
84
|
+
u(e);
|
|
85
85
|
}, 200);
|
|
86
|
-
function
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
function H() {
|
|
90
|
-
i(!a.value);
|
|
86
|
+
function R() {
|
|
87
|
+
i.value && u(!1);
|
|
91
88
|
}
|
|
92
89
|
function _() {
|
|
93
|
-
|
|
90
|
+
u(!i.value);
|
|
94
91
|
}
|
|
95
92
|
function j() {
|
|
96
|
-
["
|
|
93
|
+
["click"].includes(n.trigger) && _();
|
|
97
94
|
}
|
|
98
95
|
function K() {
|
|
99
|
-
["hover", "both"].includes(n.trigger) && (
|
|
96
|
+
["hover", "both"].includes(n.trigger) && u(!0);
|
|
100
97
|
}
|
|
101
98
|
function P() {
|
|
102
|
-
["hover", "both"].includes(n.trigger) &&
|
|
99
|
+
["hover", "both"].includes(n.trigger) && (i.value === !1 ? u(!0) : c(!0));
|
|
103
100
|
}
|
|
104
101
|
function Q() {
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
function i(e) {
|
|
108
|
-
n.disabled || (a.value = e, c("update:open", e));
|
|
102
|
+
["hover", "both"].includes(n.trigger) && c(!1);
|
|
109
103
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
c("menuitem-clicked", s), await ((d = e.action) == null ? void 0 : d.call(e)), n.noCloseOnClick || y();
|
|
104
|
+
function G() {
|
|
105
|
+
c(!1);
|
|
113
106
|
}
|
|
114
|
-
function
|
|
115
|
-
n.
|
|
116
|
-
}
|
|
117
|
-
function O(e) {
|
|
118
|
-
e.key === "Escape" ? (e.preventDefault(), i(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? W(e) : e.key === "Enter" && typeof r.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${f.value} .menuitem`)[r.value].click(), y());
|
|
107
|
+
function u(e) {
|
|
108
|
+
n.disabled || (i.value = e, d("update:open", e));
|
|
119
109
|
}
|
|
120
110
|
function J(e) {
|
|
121
|
-
|
|
111
|
+
return "action" in e;
|
|
122
112
|
}
|
|
123
113
|
function W(e) {
|
|
114
|
+
return "href" in e || "to" in e;
|
|
115
|
+
}
|
|
116
|
+
async function X(e, l) {
|
|
124
117
|
var o;
|
|
118
|
+
d("menuitem-clicked", l), await ((o = e.action) == null ? void 0 : o.call(e)), n.noCloseOnClick || D();
|
|
119
|
+
}
|
|
120
|
+
function D() {
|
|
121
|
+
n.noCloseOnClick === !1 && u(!1);
|
|
122
|
+
}
|
|
123
|
+
function I(e) {
|
|
124
|
+
e.key === "Escape" ? (e.preventDefault(), u(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? Z(e) : e.key === "Enter" && typeof s.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${y.value} .menuitem`)[s.value].click(), D());
|
|
125
|
+
}
|
|
126
|
+
function Y(e) {
|
|
127
|
+
["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && i.value === !1 && (e.preventDefault(), u(!0));
|
|
128
|
+
}
|
|
129
|
+
function Z(e) {
|
|
130
|
+
var m;
|
|
125
131
|
e.preventDefault();
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
132
|
+
const l = e.key;
|
|
133
|
+
i.value || u(!0);
|
|
134
|
+
const o = (m = n.items) == null ? void 0 : m.length;
|
|
135
|
+
o && (typeof s.value == "number" ? s.value === o - 1 && l === "ArrowDown" ? s.value = 0 : s.value === 0 && l === "ArrowUp" ? s.value = o - 1 : s.value = l === "ArrowDown" ? s.value + 1 : s.value - 1 : s.value = l === "ArrowDown" ? 0 : o - 1);
|
|
130
136
|
}
|
|
131
|
-
return
|
|
132
|
-
() =>
|
|
137
|
+
return T(
|
|
138
|
+
() => i.value,
|
|
133
139
|
(e) => {
|
|
134
|
-
e ? document.addEventListener("keydown",
|
|
140
|
+
e ? document.addEventListener("keydown", I) : document.removeEventListener("keydown", I), s.value = void 0;
|
|
135
141
|
}
|
|
136
|
-
),
|
|
142
|
+
), T(
|
|
137
143
|
() => n.open,
|
|
138
|
-
(e) =>
|
|
139
|
-
), (e,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
(e) => u(e)
|
|
145
|
+
), (e, l) => U((v(), w("div", {
|
|
146
|
+
id: a(y),
|
|
147
|
+
class: $(["m-dropdown", [n.class]]),
|
|
148
|
+
style: re(e.style)
|
|
149
|
+
}, [
|
|
150
|
+
h("div", {
|
|
151
|
+
role: "button",
|
|
152
|
+
tabindex: "0",
|
|
153
|
+
class: "m-dropdown__wrapper",
|
|
154
|
+
"aria-expanded": i.value,
|
|
155
|
+
"aria-haspopup": "menu",
|
|
156
|
+
onClick: z(j, ["stop"]),
|
|
157
|
+
onFocus: K,
|
|
158
|
+
onBlur: G,
|
|
159
|
+
onKeydown: Y,
|
|
160
|
+
onMouseenter: P,
|
|
161
|
+
onMouseleave: Q
|
|
145
162
|
}, [
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
class: "m-dropdown__wrapper",
|
|
150
|
-
"aria-expanded": a.value,
|
|
151
|
-
"aria-haspopup": "menu",
|
|
152
|
-
onClick: D(_, ["stop"]),
|
|
153
|
-
onFocus: j,
|
|
154
|
-
onBlur: Q,
|
|
155
|
-
onKeydown: J,
|
|
156
|
-
onMouseenter: K,
|
|
157
|
-
onMouseleave: P
|
|
163
|
+
h("span", {
|
|
164
|
+
id: `${a(y)}-labelspan`,
|
|
165
|
+
class: "maz-sr-only"
|
|
158
166
|
}, [
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
)
|
|
169
|
-
])
|
|
170
|
-
], 8, pe),
|
|
171
|
-
b(`
|
|
167
|
+
f(e.$slots, "screen-reader-description", {}, () => [
|
|
168
|
+
M(
|
|
169
|
+
A(e.screenReaderDescription),
|
|
170
|
+
1
|
|
171
|
+
/* TEXT */
|
|
172
|
+
)
|
|
173
|
+
])
|
|
174
|
+
], 8, me),
|
|
175
|
+
p(`
|
|
172
176
|
@slot Custom Element
|
|
173
177
|
@binding {Boolen} is-open close function
|
|
174
178
|
@default \`<MazBtn />\`
|
|
175
179
|
`),
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
]),
|
|
191
|
-
b(" @slot Menu Label ")
|
|
180
|
+
f(e.$slots, "element", { isOpen: i.value }, () => [
|
|
181
|
+
N(a(k), B({
|
|
182
|
+
color: e.color,
|
|
183
|
+
disabled: e.disabled,
|
|
184
|
+
"aria-labelledby": `${a(y)}-labelspan`
|
|
185
|
+
}, e.$attrs, { tabindex: "-1" }), {
|
|
186
|
+
default: O(() => [
|
|
187
|
+
h("span", ve, [
|
|
188
|
+
p(" @slot Button text "),
|
|
189
|
+
f(e.$slots, "default"),
|
|
190
|
+
e.noChevron ? p("v-if", !0) : (v(), S(a(b), {
|
|
191
|
+
key: 0,
|
|
192
|
+
class: $([{ "maz-rotate-180": i.value }, "chevron-icon"])
|
|
193
|
+
}, null, 8, ["class"]))
|
|
192
194
|
]),
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
[
|
|
221
|
-
|
|
195
|
+
p(" @slot Menu Label ")
|
|
196
|
+
]),
|
|
197
|
+
_: 3
|
|
198
|
+
/* FORWARDED */
|
|
199
|
+
}, 16, ["color", "disabled", "aria-labelledby"])
|
|
200
|
+
])
|
|
201
|
+
], 40, pe),
|
|
202
|
+
N(le, {
|
|
203
|
+
name: "maz-scale-fade",
|
|
204
|
+
persisted: ""
|
|
205
|
+
}, {
|
|
206
|
+
default: O(() => [
|
|
207
|
+
U(h(
|
|
208
|
+
"div",
|
|
209
|
+
{
|
|
210
|
+
role: "menu",
|
|
211
|
+
"aria-label": "Menu",
|
|
212
|
+
class: $(["menu", {
|
|
213
|
+
"--top": e.position.includes("top"),
|
|
214
|
+
"--left": e.position.includes("left"),
|
|
215
|
+
"--right": e.position.includes("right"),
|
|
216
|
+
"--bottom": e.position.includes("bottom")
|
|
217
|
+
}]),
|
|
218
|
+
tabindex: "-1",
|
|
219
|
+
onFocus: l[0] || (l[0] = (o) => a(c)(!0)),
|
|
220
|
+
onBlur: l[1] || (l[1] = (o) => a(c)(!1)),
|
|
221
|
+
onMouseenter: l[2] || (l[2] = (o) => ["hover", "both"].includes(e.trigger) ? a(c)(!0) : void 0),
|
|
222
|
+
onMouseleave: l[3] || (l[3] = (o) => ["hover", "both"].includes(e.trigger) ? a(c)(!1) : void 0)
|
|
223
|
+
},
|
|
224
|
+
[
|
|
225
|
+
p(`
|
|
222
226
|
@slot Custom dropdown panel
|
|
223
227
|
@binding {Array} items - items prop data
|
|
224
228
|
`),
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
229
|
+
f(e.$slots, "dropdown", { items: e.items }, () => [
|
|
230
|
+
(v(!0), w(
|
|
231
|
+
F,
|
|
232
|
+
null,
|
|
233
|
+
se(e.items, (o, m) => (v(), w(
|
|
234
|
+
F,
|
|
235
|
+
{ key: m },
|
|
236
|
+
[
|
|
237
|
+
p(`
|
|
234
238
|
@slot Custom menu item
|
|
235
239
|
@binding {Object} item - menu item
|
|
236
240
|
`),
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
]),
|
|
260
|
-
_: 2
|
|
261
|
-
/* DYNAMIC */
|
|
262
|
-
}, 1032, ["target", "to", "class"])) : o.href ? (v(), h("a", {
|
|
263
|
-
key: 1,
|
|
264
|
-
target: o.href ? o.target ?? "_self" : void 0,
|
|
265
|
-
href: o.href,
|
|
266
|
-
tabindex: "-1",
|
|
267
|
-
class: k(["menuitem", [
|
|
268
|
-
{
|
|
269
|
-
"--is-keyboard-selected": r.value === g
|
|
270
|
-
},
|
|
271
|
-
o.class
|
|
272
|
-
]]),
|
|
273
|
-
onClick: D(y, ["stop"])
|
|
274
|
-
}, [
|
|
275
|
-
p(e.$slots, "menuitem-label", { item: o }, () => [
|
|
276
|
-
E(
|
|
277
|
-
$(o.label),
|
|
278
|
-
1
|
|
279
|
-
/* TEXT */
|
|
280
|
-
)
|
|
281
|
-
])
|
|
282
|
-
], 10, ve)) : o.action ? (v(), h("button", {
|
|
283
|
-
key: 2,
|
|
284
|
-
tabindex: "-1",
|
|
285
|
-
type: "button",
|
|
286
|
-
class: k(["menuitem", [
|
|
287
|
-
{
|
|
288
|
-
"--is-keyboard-selected": r.value === g
|
|
289
|
-
},
|
|
290
|
-
o.class
|
|
291
|
-
]]),
|
|
292
|
-
onClick: D((X) => o.action ? G(o, X) : y(), ["stop"])
|
|
293
|
-
}, [
|
|
294
|
-
p(e.$slots, "menuitem-label", { item: o }, () => [
|
|
295
|
-
E(
|
|
296
|
-
$(o.label),
|
|
241
|
+
f(e.$slots, "menuitem", { item: o }, () => [
|
|
242
|
+
W(o) ? (v(), S(a(C), B({
|
|
243
|
+
key: 0,
|
|
244
|
+
target: o.href ? o.target ?? "_self" : void 0,
|
|
245
|
+
to: o.to,
|
|
246
|
+
href: o.href,
|
|
247
|
+
color: o.color ?? "theme",
|
|
248
|
+
ref_for: !0
|
|
249
|
+
}, o, {
|
|
250
|
+
class: ["menuitem", [
|
|
251
|
+
{
|
|
252
|
+
"--is-keyboard-selected": s.value === m
|
|
253
|
+
},
|
|
254
|
+
o.class
|
|
255
|
+
]],
|
|
256
|
+
tabindex: "-1",
|
|
257
|
+
onClick: z(D, ["stop"])
|
|
258
|
+
}), {
|
|
259
|
+
default: O(() => [
|
|
260
|
+
f(e.$slots, "menuitem-label", { item: o }, () => [
|
|
261
|
+
M(
|
|
262
|
+
A(o.label),
|
|
297
263
|
1
|
|
298
264
|
/* TEXT */
|
|
299
265
|
)
|
|
300
266
|
])
|
|
301
|
-
]
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
267
|
+
]),
|
|
268
|
+
_: 2
|
|
269
|
+
/* DYNAMIC */
|
|
270
|
+
}, 1040, ["target", "to", "href", "color", "class"])) : J(o) ? (v(), w("button", B({
|
|
271
|
+
key: 1,
|
|
272
|
+
tabindex: "-1",
|
|
273
|
+
type: "button",
|
|
274
|
+
ref_for: !0
|
|
275
|
+
}, o, {
|
|
276
|
+
class: ["menuitem menuitem__button", [
|
|
277
|
+
{
|
|
278
|
+
"--is-keyboard-selected": s.value === m
|
|
279
|
+
},
|
|
280
|
+
o.class,
|
|
281
|
+
`--${o.color ?? "theme"}`
|
|
282
|
+
]],
|
|
283
|
+
onClick: z((x) => X(o, x), ["stop"])
|
|
284
|
+
}), [
|
|
285
|
+
f(e.$slots, "menuitem-label", { item: o }, () => [
|
|
286
|
+
M(
|
|
287
|
+
A(o.label),
|
|
288
|
+
1
|
|
289
|
+
/* TEXT */
|
|
290
|
+
)
|
|
291
|
+
])
|
|
292
|
+
], 16, be)) : p("v-if", !0)
|
|
293
|
+
])
|
|
294
|
+
],
|
|
295
|
+
64
|
|
296
|
+
/* STABLE_FRAGMENT */
|
|
297
|
+
))),
|
|
298
|
+
128
|
|
299
|
+
/* KEYED_FRAGMENT */
|
|
300
|
+
))
|
|
301
|
+
])
|
|
302
|
+
],
|
|
303
|
+
34
|
|
304
|
+
/* CLASS, NEED_HYDRATION */
|
|
305
|
+
), [
|
|
306
|
+
[ie, i.value]
|
|
307
|
+
])
|
|
308
|
+
]),
|
|
309
|
+
_: 3
|
|
310
|
+
/* FORWARDED */
|
|
311
|
+
})
|
|
312
|
+
], 14, fe)), [
|
|
313
|
+
[a(de), R]
|
|
314
|
+
]);
|
|
325
315
|
}
|
|
326
316
|
});
|
|
327
317
|
export {
|