maz-ui 3.25.0 → 3.25.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/MazDropdown.mjs +13 -13
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./assets/MazDropdown.css";
|
|
2
|
-
import { computed as K, defineComponent as P, defineAsyncComponent as M, getCurrentInstance as G, ref as B, watch as E, openBlock as f, createElementBlock as v, unref as u, normalizeClass as b, normalizeStyle as J, createElementVNode as
|
|
2
|
+
import { computed as K, defineComponent as P, defineAsyncComponent as M, getCurrentInstance as G, ref as B, watch as E, openBlock as f, createElementBlock as v, unref as u, normalizeClass as b, normalizeStyle as J, createElementVNode as k, withModifiers as A, createCommentVNode as d, toDisplayString as $, renderSlot as y, createVNode as O, mergeProps as Q, withCtx as h, createBlock as I, Transition as W, Fragment as L, renderList as X, resolveDynamicComponent as Y, createTextVNode as Z } from "vue";
|
|
3
3
|
const x = ({
|
|
4
4
|
componentName: m,
|
|
5
5
|
instance: i,
|
|
@@ -7,9 +7,9 @@ const x = ({
|
|
|
7
7
|
}) => K(() => c ?? `${m}-${i == null ? void 0 : i.uid}`);
|
|
8
8
|
function _(m, i) {
|
|
9
9
|
let c;
|
|
10
|
-
return function(...
|
|
10
|
+
return function(...w) {
|
|
11
11
|
clearTimeout(c), c = setTimeout(() => {
|
|
12
|
-
m.apply(this,
|
|
12
|
+
m.apply(this, w);
|
|
13
13
|
}, i);
|
|
14
14
|
};
|
|
15
15
|
}
|
|
@@ -43,7 +43,7 @@ const ee = ["id"], oe = ["aria-expanded", "onClick"], ne = { class: "maz-sr-only
|
|
|
43
43
|
"update:open"
|
|
44
44
|
],
|
|
45
45
|
setup(m, { emit: i }) {
|
|
46
|
-
const c = M(() => import("./chunks/MazBtn-SmJwJsv2.mjs").then((e) => e.M)),
|
|
46
|
+
const c = M(() => import("./chunks/MazBtn-SmJwJsv2.mjs").then((e) => e.M)), w = M(() => import("./chunks/chevron-down-bC0s_0yH.mjs")), l = m, C = i, D = x({
|
|
47
47
|
componentName: "MazCheckbox",
|
|
48
48
|
instance: G(),
|
|
49
49
|
providedId: l.id
|
|
@@ -73,13 +73,13 @@ const ee = ["id"], oe = ["aria-expanded", "onClick"], ne = { class: "maz-sr-only
|
|
|
73
73
|
}, 200);
|
|
74
74
|
async function j(e, n) {
|
|
75
75
|
var o;
|
|
76
|
-
C("menuitem-clicked", n), await ((o = e.action) == null ? void 0 : o.call(e)), l.noCloseOnClick ||
|
|
76
|
+
C("menuitem-clicked", n), await ((o = e.action) == null ? void 0 : o.call(e)), l.noCloseOnClick || g();
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function g() {
|
|
79
79
|
l.noCloseOnClick === !1 && s(!1);
|
|
80
80
|
}
|
|
81
81
|
function z(e) {
|
|
82
|
-
e.key === "Escape" ? (e.preventDefault(), s(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? H(e) : e.key === "Enter" && typeof t.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${D.value} .menuitem`)[t.value].click(),
|
|
82
|
+
e.key === "Escape" ? (e.preventDefault(), s(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? H(e) : e.key === "Enter" && typeof t.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${D.value} .menuitem`)[t.value].click(), g());
|
|
83
83
|
}
|
|
84
84
|
function q(e) {
|
|
85
85
|
["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && r.value === !1 && (e.preventDefault(), s(!0));
|
|
@@ -105,10 +105,10 @@ const ee = ["id"], oe = ["aria-expanded", "onClick"], ne = { class: "maz-sr-only
|
|
|
105
105
|
class: b(["m-dropdown", [l.class]]),
|
|
106
106
|
style: J(e.style)
|
|
107
107
|
}, [
|
|
108
|
-
|
|
108
|
+
k("div", {
|
|
109
109
|
role: "button",
|
|
110
110
|
tabindex: "0",
|
|
111
|
-
class: "maz-outline-none",
|
|
111
|
+
class: "maz-h-full maz-w-full maz-outline-none",
|
|
112
112
|
"aria-expanded": r.value,
|
|
113
113
|
"aria-haspopup": "menu",
|
|
114
114
|
onClick: A(S, ["stop"]),
|
|
@@ -123,7 +123,7 @@ const ee = ["id"], oe = ["aria-expanded", "onClick"], ne = { class: "maz-sr-only
|
|
|
123
123
|
@binding {Boolen} is-open close function
|
|
124
124
|
@default \`<MazBtn />\`
|
|
125
125
|
`),
|
|
126
|
-
|
|
126
|
+
k(
|
|
127
127
|
"span",
|
|
128
128
|
ne,
|
|
129
129
|
$(e.screenReaderDescription),
|
|
@@ -136,10 +136,10 @@ const ee = ["id"], oe = ["aria-expanded", "onClick"], ne = { class: "maz-sr-only
|
|
|
136
136
|
disabled: e.disabled
|
|
137
137
|
}, e.$attrs, { tabindex: "-1" }), {
|
|
138
138
|
default: h(() => [
|
|
139
|
-
|
|
139
|
+
k("span", te, [
|
|
140
140
|
d(" @slot Button text "),
|
|
141
141
|
y(e.$slots, "default"),
|
|
142
|
-
e.noChevron ? d("v-if", !0) : (f(), I(u(
|
|
142
|
+
e.noChevron ? d("v-if", !0) : (f(), I(u(w), {
|
|
143
143
|
key: 0,
|
|
144
144
|
class: b([{ "maz-rotate-180": r.value }, "maz-text-lg maz-transition-transform maz-duration-200 maz-ease-in-out"])
|
|
145
145
|
}, null, 8, ["class"]))
|
|
@@ -197,7 +197,7 @@ const ee = ["id"], oe = ["aria-expanded", "onClick"], ne = { class: "maz-sr-only
|
|
|
197
197
|
o.class
|
|
198
198
|
], "menuitem"]),
|
|
199
199
|
to: o.to,
|
|
200
|
-
onClick: A((R) => o.action ? j(o, R) :
|
|
200
|
+
onClick: A((R) => o.action ? j(o, R) : g(), ["stop"])
|
|
201
201
|
}, {
|
|
202
202
|
default: h(() => [
|
|
203
203
|
d(`
|
package/nuxt/index.json
CHANGED