maz-ui 3.46.1-beta.4 → 3.46.1-beta.6
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/MazAccordion.d.ts +1 -1
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.d.ts +5 -4
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCardSpotlight.d.ts +1 -1
- package/components/MazCarousel.mjs +1 -1
- package/components/MazCheckbox.mjs +61 -61
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.d.ts +4 -0
- package/components/MazDropdown.mjs +98 -93
- package/components/MazIcon.mjs +55 -67
- package/components/MazInput.mjs +1 -1
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLink.mjs +1 -1
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazPullToRefresh.d.ts +2 -2
- package/components/MazSelect.mjs +1 -1
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.mjs +33 -33
- package/components/MazTable.d.ts +33 -4
- package/components/MazTable.mjs +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazCheckbox.css +1 -1
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazPagination.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazSwitch.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/chunks/{MazBottomSheet-DQTlEDlz.mjs → MazBottomSheet-DeAah_or.mjs} +1 -1
- package/components/chunks/MazBtn-BV212IYv.mjs +118 -0
- package/components/chunks/MazBtn-BXvObcWn.mjs +118 -0
- package/components/chunks/MazBtn-C2dJYsnq.mjs +118 -0
- package/components/chunks/MazBtn-C2htID_X.mjs +118 -0
- package/components/chunks/MazBtn-C4xZC-A2.mjs +118 -0
- package/components/chunks/MazBtn-C5IbN0rp.mjs +123 -0
- package/components/chunks/MazBtn-CEFfMm7k.mjs +118 -0
- package/components/chunks/MazBtn-CESOVC-a.mjs +118 -0
- package/components/chunks/MazBtn-CLFly8Ie.mjs +118 -0
- package/components/chunks/MazBtn-CRpqDW12.mjs +118 -0
- package/components/chunks/MazBtn-D2H26ExI.mjs +118 -0
- package/components/chunks/MazBtn-y4vRRWDg.mjs +118 -0
- package/components/chunks/MazBtn-zMzxqcCs.mjs +126 -0
- package/components/chunks/{MazCard-BapktHxt.mjs → MazCard-BF-2_gZV.mjs} +1 -1
- package/components/chunks/{MazCarousel-DYdWCLk7.mjs → MazCarousel-DVBUt8NL.mjs} +1 -1
- package/components/chunks/{MazCheckbox-m1322Y67.mjs → MazCheckbox-CEfJco3U.mjs} +32 -32
- package/components/chunks/MazCheckbox-CeVxgVY8.mjs +146 -0
- package/components/chunks/{MazCheckbox-DOYkVPMK.mjs → MazCheckbox-mgtQBs4K.mjs} +32 -32
- package/components/chunks/{MazDialog-DbEp5ZrT.mjs → MazDialog-fn7vXgBg.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-B2WdAwbv.mjs → MazDialogPromise-C8dpQb5k.mjs} +2 -2
- package/components/chunks/{MazExpandAnimation-BFyvL-vh.mjs → MazExpandAnimation-Bkw_wFTi.mjs} +1 -1
- package/components/chunks/{MazGallery-HtChfMa_.mjs → MazGallery-CXJsK5ve.mjs} +2 -2
- package/components/chunks/MazIcon-BXX3RaoN.mjs +101 -0
- package/components/chunks/MazIcon-BbvBov5G.mjs +106 -0
- package/components/chunks/MazIcon-DjMuw8Bz.mjs +101 -0
- package/components/chunks/MazInput-AcA93-8Q.mjs +291 -0
- package/components/chunks/{MazInput-fbdOvhry.mjs → MazInput-Dnwxraz4.mjs} +1 -1
- package/components/chunks/MazInputNumber-OY_UqCMs.mjs +593 -0
- package/components/chunks/{MazInputPrice-Y6lalrWq.mjs → MazInputPrice-DvVAZa12.mjs} +1 -1
- package/components/chunks/{MazInputTags-DVYW4SbE.mjs → MazInputTags-DKlGT2IB.mjs} +205 -240
- package/components/chunks/{MazLink-HJI1YmdA.mjs → MazLink-Dl9ePCGm.mjs} +1 -1
- package/components/chunks/MazLoadingBar-By1umvdC.mjs +32 -0
- package/components/chunks/MazPagination-BL9LU84U.mjs +362 -0
- package/components/chunks/{MazPhoneNumberInput-BbeofPj5.mjs → MazPhoneNumberInput-C7gUk5lg.mjs} +3 -3
- package/components/chunks/{MazPicker-BPH4sy2Q.mjs → MazPicker-Dhm3u2MN.mjs} +620 -652
- package/components/chunks/{MazPickerMonthSwitcher-Ca4BqrF-.mjs → MazPickerMonthSwitcher-ck8cl1-N.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-Bs2RMdC_.mjs → MazPickerShortcuts-hEpUqVC-.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-Bg_0ecwk.mjs → MazPickerYearSwitcher-CmMxOc69.mjs} +1 -1
- package/components/chunks/MazSelect-CGsMRdr7.mjs +568 -0
- package/components/chunks/{MazSelect-CUo_OXDp.mjs → MazSelect-ed445MXs.mjs} +2 -2
- package/components/chunks/{MazSpinner-BAHWcgal.mjs → MazSpinner-Akyx5wgU.mjs} +1 -1
- package/components/chunks/MazSpinner-B2dsE23u.mjs +37 -0
- package/components/chunks/{MazSpinner-D9K-TsT7.mjs → MazSpinner-BCOeuzTB.mjs} +1 -1
- package/components/chunks/MazSpinner-BakExtKd.mjs +37 -0
- package/components/chunks/{MazSpinner-Cl4Yy1dv.mjs → MazSpinner-C9meLNrb.mjs} +1 -1
- package/components/chunks/{MazSpinner-CShEq13p.mjs → MazSpinner-CKOy0M1T.mjs} +1 -1
- package/components/chunks/MazSpinner-CL6orjX7.mjs +37 -0
- package/components/chunks/{MazSpinner-2KA4ECS_.mjs → MazSpinner-CQTq0J6f.mjs} +1 -1
- package/components/chunks/{MazSpinner-BLp7sE5i.mjs → MazSpinner-CeZk8jA9.mjs} +1 -1
- package/components/chunks/MazSpinner-CqS3onAE.mjs +37 -0
- package/components/chunks/{MazSpinner-AyzqowuD.mjs → MazSpinner-D1zj-581.mjs} +1 -1
- package/components/chunks/MazSpinner-DJ2t85tY.mjs +37 -0
- package/components/chunks/{MazSpinner-BhFMGOGc.mjs → MazSpinner-DbaTlD5B.mjs} +1 -1
- package/components/chunks/MazSpinner-DgJ9tVv_.mjs +37 -0
- package/components/chunks/{MazSpinner-CLfp6QHS.mjs → MazSpinner-DoKvoICM.mjs} +1 -1
- package/components/chunks/MazSpinner-Oy4E193R.mjs +37 -0
- package/components/chunks/{MazStepper-BmCk5RfP.mjs → MazStepper-DRWtYHZR.mjs} +1 -1
- package/components/chunks/MazTable-QwG-Kh88.mjs +692 -0
- package/components/chunks/MazTableCell-BSNyqTSX.mjs +23 -0
- package/components/chunks/MazTableRow-CgubMdrX.mjs +30 -0
- package/components/chunks/MazTableTitle-h4dattYD.mjs +23 -0
- package/components/chunks/{MazTransitionExpand-D9pcEmUk.mjs → MazTransitionExpand-BvqRDM9d.mjs} +1 -1
- package/components/chunks/arrow-up-DjSlktWl.mjs +30 -0
- package/components/chunks/inject-strict-BmiaNiwC.mjs +10 -0
- package/components/chunks/useInstanceUniqId-DW9jO1Sz.mjs +11 -0
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/chunks/MazBtn-DeAZcD0R.cjs +9 -0
- package/modules/chunks/MazBtn-DvffpPyV.mjs +118 -0
- package/modules/chunks/MazIcon-BiwOZEZl.cjs +1 -0
- package/modules/chunks/MazIcon-D2B0umvn.mjs +101 -0
- package/modules/chunks/{MazSpinner-zX9CPyJB.cjs → MazSpinner-CZIYnX05.cjs} +1 -1
- package/modules/chunks/{MazSpinner-g6fliUmS.mjs → MazSpinner-Csgl_Uho.mjs} +1 -1
- package/modules/chunks/index-B6Pf_QhC.cjs +149 -0
- package/modules/chunks/{index-Bpj_Jr6I.mjs → index-C34aEXzu.mjs} +319 -314
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazAccordion.vue.d.ts +1 -1
- package/types/components/MazBtn.vue.d.ts +5 -4
- package/types/components/MazCardSpotlight.vue.d.ts +1 -1
- package/types/components/MazDropdown.vue.d.ts +4 -0
- package/types/components/MazPullToRefresh.vue.d.ts +2 -2
- package/types/components/MazTable.vue.d.ts +33 -4
- package/components/chunks/MazBtn-B2A4nNWi.mjs +0 -150
- package/components/chunks/MazBtn-BTxqbijR.mjs +0 -158
- package/components/chunks/MazBtn-BYAmxCNV.mjs +0 -150
- package/components/chunks/MazBtn-BkBaNYfi.mjs +0 -150
- package/components/chunks/MazBtn-BkT-9nbu.mjs +0 -150
- package/components/chunks/MazBtn-C6b9OPzf.mjs +0 -150
- package/components/chunks/MazBtn-CAioWjHE.mjs +0 -150
- package/components/chunks/MazBtn-CTDhJ_fQ.mjs +0 -155
- package/components/chunks/MazBtn-CofOhh-q.mjs +0 -150
- package/components/chunks/MazBtn-CwkvhgML.mjs +0 -150
- package/components/chunks/MazBtn-DHFCbHI5.mjs +0 -150
- package/components/chunks/MazBtn-DgmsRNq_.mjs +0 -150
- package/components/chunks/MazIcon-BDGxCy9M.mjs +0 -118
- package/components/chunks/MazIcon-YNJa-F5Z.mjs +0 -113
- package/components/chunks/MazIcon-wDqK0Xre.mjs +0 -113
- package/components/chunks/MazInputNumber-mu9wEfTT.mjs +0 -625
- package/components/chunks/MazPagination-BOUDMaJO.mjs +0 -394
- package/components/chunks/MazSpinner-C91Lm_Xp.mjs +0 -37
- package/components/chunks/MazSpinner-CCIMQLA1.mjs +0 -37
- package/components/chunks/MazSpinner-Ch7Qhq1M.mjs +0 -37
- package/components/chunks/MazSpinner-D7CMPaDb.mjs +0 -37
- package/components/chunks/MazSpinner-D8uk4SQh.mjs +0 -37
- package/components/chunks/MazSpinner-JgB1pud8.mjs +0 -37
- package/components/chunks/MazSpinner-mCkWhiVE.mjs +0 -37
- package/components/chunks/MazTable-CPfwUOOM.mjs +0 -2003
- package/modules/chunks/MazBtn-B5URGSZl.cjs +0 -9
- package/modules/chunks/MazBtn-DRuL8cjg.mjs +0 -150
- package/modules/chunks/MazIcon-BskR2yy9.cjs +0 -1
- package/modules/chunks/MazIcon-CKc-vAA8.mjs +0 -113
- package/modules/chunks/index-BLdtEKD5.cjs +0 -149
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { useId as ne, computed as oe, ref as
|
|
2
|
-
import './assets/MazDropdown.css';function
|
|
1
|
+
import { useId as ne, computed as oe, ref as b, nextTick as te, defineComponent as le, defineAsyncComponent as $, watch as I, withDirectives as T, openBlock as p, createElementBlock as h, unref as a, normalizeClass as E, normalizeStyle as S, createElementVNode as L, withModifiers as B, createCommentVNode as d, renderSlot as v, createTextVNode as M, toDisplayString as z, createVNode as U, mergeProps as A, createSlots as re, withCtx as w, createBlock as N, Transition as se, Fragment as F, renderList as ie, vShow as ae } from "vue";
|
|
2
|
+
import './assets/MazDropdown.css';function ue({
|
|
3
3
|
componentName: t,
|
|
4
|
-
providedId:
|
|
4
|
+
providedId: l
|
|
5
5
|
}) {
|
|
6
6
|
const o = ne();
|
|
7
|
-
return oe(() =>
|
|
7
|
+
return oe(() => l ?? `${t}-${o}`);
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
9
|
+
b("system");
|
|
10
|
+
b("system");
|
|
11
|
+
const C = "__maz-click-outside__";
|
|
12
12
|
function P() {
|
|
13
13
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
14
14
|
}
|
|
15
|
-
async function V(t,
|
|
15
|
+
async function V(t, l) {
|
|
16
16
|
try {
|
|
17
17
|
H(t);
|
|
18
|
-
const o =
|
|
19
|
-
if (!
|
|
18
|
+
const o = l.instance, c = l.value, f = typeof c == "function";
|
|
19
|
+
if (!f)
|
|
20
20
|
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
21
|
-
await te(), t[
|
|
22
|
-
if ((!t ||
|
|
23
|
-
return c.call(o,
|
|
21
|
+
await te(), t[C] = (k) => {
|
|
22
|
+
if ((!t || k.target && !t.contains(k.target)) && c && f)
|
|
23
|
+
return c.call(o, k);
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
document.addEventListener(
|
|
25
|
+
const g = P();
|
|
26
|
+
document.addEventListener(g, t[C], { passive: !0 });
|
|
27
27
|
} catch (o) {
|
|
28
28
|
console.error("[maz-ui](vClickOutside)", o);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
function H(t) {
|
|
32
32
|
try {
|
|
33
|
-
const
|
|
34
|
-
document.removeEventListener(
|
|
35
|
-
} catch (
|
|
36
|
-
console.error("[maz-ui](vClickOutside)",
|
|
33
|
+
const l = P();
|
|
34
|
+
document.removeEventListener(l, t[C], !1), delete t[C];
|
|
35
|
+
} catch (l) {
|
|
36
|
+
console.error("[maz-ui](vClickOutside)", l);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ce(t, l) {
|
|
40
40
|
try {
|
|
41
|
-
if (
|
|
41
|
+
if (l.value === l.oldValue)
|
|
42
42
|
return;
|
|
43
|
-
V(t,
|
|
43
|
+
V(t, l);
|
|
44
44
|
} catch (o) {
|
|
45
45
|
console.error("[maz-ui](vClickOutside)", o);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
const de = {
|
|
49
49
|
mounted: V,
|
|
50
|
-
updated:
|
|
50
|
+
updated: ce,
|
|
51
51
|
unmounted: H
|
|
52
52
|
};
|
|
53
|
-
function
|
|
53
|
+
function fe(t, l) {
|
|
54
54
|
let o;
|
|
55
55
|
return function(...c) {
|
|
56
56
|
clearTimeout(o), o = setTimeout(() => {
|
|
57
57
|
t.apply(this, c);
|
|
58
|
-
},
|
|
58
|
+
}, l);
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const me = {
|
|
62
62
|
cancelText: "Cancel",
|
|
63
63
|
confirmText: "Confirm",
|
|
64
64
|
cancelButton: {
|
|
@@ -70,12 +70,9 @@ const fe = {
|
|
|
70
70
|
color: "success"
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
key: 0,
|
|
77
|
-
class: "button-span"
|
|
78
|
-
}, be = ["onClick"], he = /* @__PURE__ */ re({
|
|
73
|
+
b(me);
|
|
74
|
+
b([]);
|
|
75
|
+
const pe = ["id"], ve = ["aria-expanded"], ye = ["id"], be = ["onClick"], he = /* @__PURE__ */ le({
|
|
79
76
|
inheritAttrs: !1,
|
|
80
77
|
__name: "MazDropdown",
|
|
81
78
|
props: {
|
|
@@ -92,14 +89,15 @@ const me = ["id"], pe = ["aria-expanded"], ve = ["id"], ye = {
|
|
|
92
89
|
noChevron: { type: Boolean },
|
|
93
90
|
screenReaderDescription: { default: "Open menu dropdown" },
|
|
94
91
|
menuPanelClass: {},
|
|
95
|
-
menuPanelStyle: {}
|
|
92
|
+
menuPanelStyle: {},
|
|
93
|
+
block: { type: Boolean }
|
|
96
94
|
},
|
|
97
95
|
emits: ["menuitem-clicked", "update:open"],
|
|
98
|
-
setup(t, { emit:
|
|
99
|
-
const o = t, c =
|
|
96
|
+
setup(t, { emit: l }) {
|
|
97
|
+
const o = t, c = l, f = ue({
|
|
100
98
|
componentName: "MazDropdown",
|
|
101
99
|
providedId: o.id
|
|
102
|
-
}),
|
|
100
|
+
}), g = $(() => import("./chunks/MazBtn-CESOVC-a.mjs")), k = $(() => import("./chunks/MazLink-Dl9ePCGm.mjs")), R = $(() => import("./chunks/chevron-down-BkvtON3b.mjs")), i = b(o.open), s = b(), m = fe((e) => {
|
|
103
101
|
u(e);
|
|
104
102
|
}, 200);
|
|
105
103
|
function q() {
|
|
@@ -115,13 +113,13 @@ const me = ["id"], pe = ["aria-expanded"], ve = ["id"], ye = {
|
|
|
115
113
|
["hover", "both"].includes(o.trigger) && u(!0);
|
|
116
114
|
}
|
|
117
115
|
function G() {
|
|
118
|
-
["hover", "both"].includes(o.trigger) && (i.value === !1 ? u(!0) :
|
|
116
|
+
["hover", "both"].includes(o.trigger) && (i.value === !1 ? u(!0) : m(!0));
|
|
119
117
|
}
|
|
120
118
|
function J() {
|
|
121
|
-
["hover", "both"].includes(o.trigger) &&
|
|
119
|
+
["hover", "both"].includes(o.trigger) && m(!1);
|
|
122
120
|
}
|
|
123
121
|
function W() {
|
|
124
|
-
|
|
122
|
+
m(!1);
|
|
125
123
|
}
|
|
126
124
|
function u(e) {
|
|
127
125
|
o.disabled || (i.value = e, c("update:open", e));
|
|
@@ -132,15 +130,15 @@ const me = ["id"], pe = ["aria-expanded"], ve = ["id"], ye = {
|
|
|
132
130
|
function Y(e) {
|
|
133
131
|
return "href" in e || "to" in e;
|
|
134
132
|
}
|
|
135
|
-
async function Z(e,
|
|
133
|
+
async function Z(e, r) {
|
|
136
134
|
var n;
|
|
137
|
-
c("menuitem-clicked",
|
|
135
|
+
c("menuitem-clicked", r), await ((n = e.action) == null ? void 0 : n.call(e)), o.noCloseOnClick || D();
|
|
138
136
|
}
|
|
139
|
-
function
|
|
137
|
+
function D() {
|
|
140
138
|
o.noCloseOnClick === !1 && u(!1);
|
|
141
139
|
}
|
|
142
140
|
function O(e) {
|
|
143
|
-
e.key === "Escape" ? (e.preventDefault(), u(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? x(e) : e.key === "Enter" && typeof s.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${
|
|
141
|
+
e.key === "Escape" ? (e.preventDefault(), u(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? x(e) : e.key === "Enter" && typeof s.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${f.value} .menuitem`)[s.value].click(), D());
|
|
144
142
|
}
|
|
145
143
|
function _(e) {
|
|
146
144
|
["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && i.value === !1 && (e.preventDefault(), u(!0));
|
|
@@ -148,10 +146,10 @@ const me = ["id"], pe = ["aria-expanded"], ve = ["id"], ye = {
|
|
|
148
146
|
function x(e) {
|
|
149
147
|
var y;
|
|
150
148
|
e.preventDefault();
|
|
151
|
-
const
|
|
149
|
+
const r = e.key;
|
|
152
150
|
i.value || u(!0);
|
|
153
151
|
const n = (y = o.items) == null ? void 0 : y.length;
|
|
154
|
-
n && (typeof s.value == "number" ? s.value === n - 1 &&
|
|
152
|
+
n && (typeof s.value == "number" ? s.value === n - 1 && r === "ArrowDown" ? s.value = 0 : s.value === 0 && r === "ArrowUp" ? s.value = n - 1 : s.value = r === "ArrowDown" ? s.value + 1 : s.value - 1 : s.value = r === "ArrowDown" ? 0 : n - 1);
|
|
155
153
|
}
|
|
156
154
|
return I(
|
|
157
155
|
() => i.value,
|
|
@@ -161,86 +159,93 @@ const me = ["id"], pe = ["aria-expanded"], ve = ["id"], ye = {
|
|
|
161
159
|
), I(
|
|
162
160
|
() => o.open,
|
|
163
161
|
(e) => u(e)
|
|
164
|
-
), (e,
|
|
165
|
-
id: a(
|
|
166
|
-
class:
|
|
167
|
-
style:
|
|
162
|
+
), (e, r) => T((p(), h("div", {
|
|
163
|
+
id: a(f),
|
|
164
|
+
class: E(["m-dropdown", [o.class, { "--block": e.block }]]),
|
|
165
|
+
style: S(e.style)
|
|
168
166
|
}, [
|
|
169
|
-
|
|
167
|
+
L("div", {
|
|
170
168
|
role: "button",
|
|
171
169
|
tabindex: "0",
|
|
172
170
|
class: "m-dropdown__wrapper",
|
|
173
171
|
"aria-expanded": i.value,
|
|
174
172
|
"aria-haspopup": "menu",
|
|
175
|
-
onClick:
|
|
173
|
+
onClick: B(Q, ["stop"]),
|
|
176
174
|
onFocus: j,
|
|
177
175
|
onBlur: W,
|
|
178
176
|
onKeydown: _,
|
|
179
177
|
onMouseenter: G,
|
|
180
178
|
onMouseleave: J
|
|
181
179
|
}, [
|
|
182
|
-
e.screenReaderDescription || e.$slots["screen-reader-description"] ? (
|
|
180
|
+
e.screenReaderDescription || e.$slots["screen-reader-description"] ? (p(), h("span", {
|
|
183
181
|
key: 0,
|
|
184
|
-
id: `${a(
|
|
182
|
+
id: `${a(f)}-labelspan`,
|
|
185
183
|
class: "maz-sr-only"
|
|
186
184
|
}, [
|
|
187
185
|
d(" @slot Description for screen reader (hidden) "),
|
|
188
186
|
v(e.$slots, "screen-reader-description", {}, () => [
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
M(
|
|
188
|
+
z(e.screenReaderDescription),
|
|
191
189
|
1
|
|
192
190
|
/* TEXT */
|
|
193
191
|
)
|
|
194
192
|
])
|
|
195
|
-
], 8,
|
|
193
|
+
], 8, ye)) : d("v-if", !0),
|
|
196
194
|
d(`
|
|
197
195
|
@slot Custom Element
|
|
198
196
|
@binding {Boolen} is-open close function
|
|
199
197
|
@default \`<MazBtn />\`
|
|
200
198
|
`),
|
|
201
199
|
v(e.$slots, "element", { isOpen: i.value }, () => [
|
|
202
|
-
U(a(
|
|
203
|
-
"aria-labelledby": `${a(
|
|
200
|
+
U(a(g), A({
|
|
201
|
+
"aria-labelledby": `${a(f)}-labelspan`,
|
|
204
202
|
color: e.color,
|
|
205
203
|
disabled: e.disabled
|
|
206
|
-
}, { ...e.$attrs }, {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
204
|
+
}, { ...e.$attrs }, {
|
|
205
|
+
tabindex: "-1",
|
|
206
|
+
block: e.block
|
|
207
|
+
}), re({
|
|
208
|
+
default: w(() => [
|
|
209
|
+
v(e.$slots, "default")
|
|
210
|
+
]),
|
|
211
|
+
_: 2
|
|
212
|
+
/* DYNAMIC */
|
|
213
|
+
}, [
|
|
214
|
+
e.noChevron ? void 0 : {
|
|
215
|
+
name: "right-icon",
|
|
216
|
+
fn: w(() => [
|
|
217
|
+
e.noChevron ? d("v-if", !0) : (p(), N(a(R), {
|
|
212
218
|
key: 0,
|
|
213
|
-
class:
|
|
219
|
+
class: E([{ "maz-rotate-180": i.value }, "chevron-icon"])
|
|
214
220
|
}, null, 8, ["class"]))
|
|
215
|
-
])
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}, 16, ["aria-labelledby", "color", "disabled"])
|
|
221
|
+
]),
|
|
222
|
+
key: "0"
|
|
223
|
+
}
|
|
224
|
+
]), 1040, ["aria-labelledby", "color", "disabled", "block"])
|
|
220
225
|
])
|
|
221
|
-
], 40,
|
|
222
|
-
U(
|
|
226
|
+
], 40, ve),
|
|
227
|
+
U(se, {
|
|
223
228
|
name: "maz-scale-fade",
|
|
224
229
|
persisted: ""
|
|
225
230
|
}, {
|
|
226
|
-
default:
|
|
227
|
-
T(
|
|
231
|
+
default: w(() => [
|
|
232
|
+
T(L(
|
|
228
233
|
"div",
|
|
229
234
|
{
|
|
230
235
|
role: "menu",
|
|
231
236
|
"aria-label": "Menu",
|
|
232
|
-
class:
|
|
237
|
+
class: E(["menu", [{
|
|
233
238
|
"--top": e.position.includes("top"),
|
|
234
239
|
"--left": e.position.includes("left"),
|
|
235
240
|
"--right": e.position.includes("right"),
|
|
236
241
|
"--bottom": e.position.includes("bottom")
|
|
237
242
|
}, e.menuPanelClass]]),
|
|
238
243
|
tabindex: "-1",
|
|
239
|
-
style:
|
|
240
|
-
onFocus:
|
|
241
|
-
onBlur:
|
|
242
|
-
onMouseenter:
|
|
243
|
-
onMouseleave:
|
|
244
|
+
style: S(e.menuPanelStyle),
|
|
245
|
+
onFocus: r[0] || (r[0] = (n) => a(m)(!0)),
|
|
246
|
+
onBlur: r[1] || (r[1] = (n) => a(m)(!1)),
|
|
247
|
+
onMouseenter: r[2] || (r[2] = (n) => ["hover", "both"].includes(e.trigger) ? a(m)(!0) : void 0),
|
|
248
|
+
onMouseleave: r[3] || (r[3] = (n) => ["hover", "both"].includes(e.trigger) ? a(m)(!1) : void 0)
|
|
244
249
|
},
|
|
245
250
|
[
|
|
246
251
|
d(`
|
|
@@ -248,10 +253,10 @@ const me = ["id"], pe = ["aria-expanded"], ve = ["id"], ye = {
|
|
|
248
253
|
@binding {Array} items - items prop data
|
|
249
254
|
`),
|
|
250
255
|
v(e.$slots, "dropdown", { items: e.items }, () => [
|
|
251
|
-
(
|
|
256
|
+
(p(!0), h(
|
|
252
257
|
F,
|
|
253
258
|
null,
|
|
254
|
-
|
|
259
|
+
ie(e.items, (n, y) => (p(), h(
|
|
255
260
|
F,
|
|
256
261
|
{ key: y },
|
|
257
262
|
[
|
|
@@ -260,7 +265,7 @@ const me = ["id"], pe = ["aria-expanded"], ve = ["id"], ye = {
|
|
|
260
265
|
@binding {MenuItem} item - menu item
|
|
261
266
|
`),
|
|
262
267
|
v(e.$slots, "menuitem", { item: n }, () => [
|
|
263
|
-
Y(n) ? (
|
|
268
|
+
Y(n) ? (p(), N(a(k), A({
|
|
264
269
|
key: 0,
|
|
265
270
|
target: n.href ? n.target ?? "_self" : void 0,
|
|
266
271
|
to: n.to,
|
|
@@ -276,16 +281,16 @@ const me = ["id"], pe = ["aria-expanded"], ve = ["id"], ye = {
|
|
|
276
281
|
n.class
|
|
277
282
|
]],
|
|
278
283
|
tabindex: "-1",
|
|
279
|
-
onClick:
|
|
284
|
+
onClick: B(D, ["stop"])
|
|
280
285
|
}), {
|
|
281
|
-
default:
|
|
286
|
+
default: w(() => [
|
|
282
287
|
d(`
|
|
283
288
|
@slot Custom label for menu item
|
|
284
289
|
@binding {MenuItem} - item menu item
|
|
285
290
|
`),
|
|
286
291
|
v(e.$slots, "menuitem-label", { item: n }, () => [
|
|
287
|
-
|
|
288
|
-
|
|
292
|
+
M(
|
|
293
|
+
z(n.label),
|
|
289
294
|
1
|
|
290
295
|
/* TEXT */
|
|
291
296
|
)
|
|
@@ -293,7 +298,7 @@ const me = ["id"], pe = ["aria-expanded"], ve = ["id"], ye = {
|
|
|
293
298
|
]),
|
|
294
299
|
_: 2
|
|
295
300
|
/* DYNAMIC */
|
|
296
|
-
}, 1040, ["target", "to", "href", "color", "underline-only-hover", "class"])) : X(n) ? (
|
|
301
|
+
}, 1040, ["target", "to", "href", "color", "underline-only-hover", "class"])) : X(n) ? (p(), h("button", A({
|
|
297
302
|
key: 1,
|
|
298
303
|
tabindex: "-1",
|
|
299
304
|
type: "button",
|
|
@@ -306,11 +311,11 @@ const me = ["id"], pe = ["aria-expanded"], ve = ["id"], ye = {
|
|
|
306
311
|
n.class,
|
|
307
312
|
`--${n.color ?? "theme"}`
|
|
308
313
|
]],
|
|
309
|
-
onClick:
|
|
314
|
+
onClick: B((ee) => Z(n, ee), ["stop"])
|
|
310
315
|
}), [
|
|
311
316
|
v(e.$slots, "menuitem-label", { item: n }, () => [
|
|
312
|
-
|
|
313
|
-
|
|
317
|
+
M(
|
|
318
|
+
z(n.label),
|
|
314
319
|
1
|
|
315
320
|
/* TEXT */
|
|
316
321
|
)
|
|
@@ -329,13 +334,13 @@ const me = ["id"], pe = ["aria-expanded"], ve = ["id"], ye = {
|
|
|
329
334
|
38
|
|
330
335
|
/* CLASS, STYLE, NEED_HYDRATION */
|
|
331
336
|
), [
|
|
332
|
-
[
|
|
337
|
+
[ae, i.value]
|
|
333
338
|
])
|
|
334
339
|
]),
|
|
335
340
|
_: 3
|
|
336
341
|
/* FORWARDED */
|
|
337
342
|
})
|
|
338
|
-
], 14,
|
|
343
|
+
], 14, pe)), [
|
|
339
344
|
[a(de), q]
|
|
340
345
|
]);
|
|
341
346
|
}
|
package/components/MazIcon.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
function H(
|
|
3
|
-
const o =
|
|
1
|
+
import { inject as T, defineComponent as x, ref as m, computed as p, onMounted as L, watchEffect as C, openBlock as P, createElementBlock as _, mergeProps as $, createCommentVNode as A, nextTick as q } from "vue";
|
|
2
|
+
function H(i, c) {
|
|
3
|
+
const o = T(i, c);
|
|
4
4
|
if (!o)
|
|
5
|
-
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${
|
|
5
|
+
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${i}`);
|
|
6
6
|
return o;
|
|
7
7
|
}
|
|
8
|
-
const I = ["innerHTML"],
|
|
8
|
+
const I = ["innerHTML"], V = /* @__PURE__ */ x({
|
|
9
9
|
__name: "MazIcon",
|
|
10
10
|
props: {
|
|
11
11
|
/** The source path of the SVG file - e.g: `/icons/home.svg` */
|
|
@@ -21,98 +21,86 @@ const I = ["innerHTML"], G = /* @__PURE__ */ C({
|
|
|
21
21
|
/** The function to transform the source of the SVG file - e.g: `(svg) => svg` */
|
|
22
22
|
transformSource: {
|
|
23
23
|
type: Function,
|
|
24
|
-
default: (
|
|
24
|
+
default: (i) => i
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
emits: ["loaded", "unloaded", "error"],
|
|
28
|
-
setup(
|
|
29
|
-
const o =
|
|
30
|
-
function
|
|
28
|
+
setup(i, { emit: c }) {
|
|
29
|
+
const o = i, d = c, s = {}, l = m(), f = m();
|
|
30
|
+
function g() {
|
|
31
31
|
try {
|
|
32
32
|
return H("mazIconPath");
|
|
33
33
|
} catch {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
37
|
+
const v = p(() => o.path ?? g()), S = p(() => o.src ? o.src : v.value ? `${v.value}/${o.name}.svg` : `/${o.name}.svg`);
|
|
38
|
+
L(() => {
|
|
39
39
|
!o.name && !o.src && console.error('[maz-ui](MazIcon) you should provide "name" or "src" as prop');
|
|
40
40
|
});
|
|
41
|
-
function
|
|
41
|
+
function h(e, r) {
|
|
42
42
|
const t = e.querySelectorAll("title");
|
|
43
43
|
if (t.length > 0)
|
|
44
|
-
t[0].textContent =
|
|
44
|
+
t[0].textContent = r;
|
|
45
45
|
else {
|
|
46
|
-
const
|
|
47
|
-
|
|
46
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "title");
|
|
47
|
+
n.textContent = r, e.append(n);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
return Object.keys(e).reduce((
|
|
50
|
+
function w(e) {
|
|
51
|
+
return Object.keys(e).reduce((r, t) => (e[t] !== !1 && e[t] !== null && e[t] !== void 0 && (r[t] = e[t]), r), {});
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
const
|
|
53
|
+
function E(e) {
|
|
54
|
+
const r = {}, t = e.attributes;
|
|
55
55
|
if (!t)
|
|
56
|
-
return
|
|
57
|
-
for (let
|
|
58
|
-
|
|
59
|
-
return
|
|
56
|
+
return r;
|
|
57
|
+
for (let n = t.length - 1; n >= 0; n--)
|
|
58
|
+
r[t[n].name] = t[n].value;
|
|
59
|
+
return r;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
let
|
|
63
|
-
return
|
|
61
|
+
function y(e) {
|
|
62
|
+
let r = e.cloneNode(!0);
|
|
63
|
+
return r = o.transformSource(e), o.title && h(r, o.title), e.innerHTML;
|
|
64
64
|
}
|
|
65
|
-
async function
|
|
66
|
-
|
|
65
|
+
async function z(e) {
|
|
66
|
+
s[e] || (s[e] = M(e));
|
|
67
67
|
try {
|
|
68
|
-
|
|
69
|
-
} catch (
|
|
70
|
-
|
|
68
|
+
l.value = await s[e], await q(), d("loaded", f.value);
|
|
69
|
+
} catch (r) {
|
|
70
|
+
l.value && (l.value = void 0, d("unloaded")), delete s[e], d("error", r);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
return new Promise((
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
if (
|
|
73
|
+
function M(e) {
|
|
74
|
+
return new Promise((r, t) => {
|
|
75
|
+
const n = new XMLHttpRequest();
|
|
76
|
+
n.open("GET", e, !0), n.addEventListener("load", () => {
|
|
77
|
+
if (n.status >= 200 && n.status < 400)
|
|
78
78
|
try {
|
|
79
|
-
let
|
|
80
|
-
|
|
81
|
-
} catch (
|
|
82
|
-
t(
|
|
79
|
+
let u = new DOMParser().parseFromString(n.responseText, "text/xml").querySelectorAll("svg")[0];
|
|
80
|
+
u ? (u = o.transformSource(u), r(u)) : t(new Error('Loaded file is not valid SVG"'));
|
|
81
|
+
} catch (a) {
|
|
82
|
+
t(a);
|
|
83
83
|
}
|
|
84
84
|
else
|
|
85
85
|
t(new Error("Error loading SVG"));
|
|
86
|
-
}),
|
|
86
|
+
}), n.addEventListener("error", (a) => t(a)), n.send();
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
-
return
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
...M(i.value),
|
|
103
|
-
...z(e.$attrs)
|
|
104
|
-
}, {
|
|
105
|
-
style: `font-size: ${l.size}`,
|
|
106
|
-
innerHTML: T(i.value)
|
|
107
|
-
}), null, 16, I)) : s("v-if", !0),
|
|
108
|
-
s(" eslint-enable vue/no-v-html "),
|
|
109
|
-
s(" eslint-enable vue/html-self-closing ")
|
|
110
|
-
],
|
|
111
|
-
2112
|
|
112
|
-
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
113
|
-
));
|
|
89
|
+
return C(() => z(S.value)), (e, r) => l.value ? (P(), _("svg", $({
|
|
90
|
+
key: 0,
|
|
91
|
+
ref_key: "svgElem",
|
|
92
|
+
ref: f,
|
|
93
|
+
width: "1em",
|
|
94
|
+
height: "1em"
|
|
95
|
+
}, {
|
|
96
|
+
...E(l.value),
|
|
97
|
+
...w(e.$attrs)
|
|
98
|
+
}, {
|
|
99
|
+
style: `font-size: ${i.size}`,
|
|
100
|
+
innerHTML: y(l.value)
|
|
101
|
+
}), null, 16, I)) : A("v-if", !0);
|
|
114
102
|
}
|
|
115
103
|
});
|
|
116
104
|
export {
|
|
117
|
-
|
|
105
|
+
V as default
|
|
118
106
|
};
|
package/components/MazInput.mjs
CHANGED
package/components/MazLink.mjs
CHANGED
|
@@ -20,7 +20,7 @@ import './assets/MazLink.css';const m = /* @__PURE__ */ p({
|
|
|
20
20
|
setup(a) {
|
|
21
21
|
const i = s(
|
|
22
22
|
() => import("./chunks/arrow-top-right-on-square-jPmYJ34F.mjs")
|
|
23
|
-
), o = s(() => import("./chunks/MazIcon-
|
|
23
|
+
), o = s(() => import("./chunks/MazIcon-BbvBov5G.mjs"));
|
|
24
24
|
return (e, u) => (n(), l(d(e.to ? "router-link" : "a"), c({
|
|
25
25
|
id: e.id,
|
|
26
26
|
class: ["m-link", [
|
package/components/MazPicker.mjs
CHANGED
|
@@ -24,14 +24,14 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
24
24
|
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
25
|
error: (...args: any[]) => void;
|
|
26
26
|
loaded: (...args: any[]) => void;
|
|
27
|
-
response: (...args: any[]) => void;
|
|
28
27
|
start: (...args: any[]) => void;
|
|
28
|
+
response: (...args: any[]) => void;
|
|
29
29
|
finish: (...args: any[]) => void;
|
|
30
30
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
31
31
|
onError?: ((...args: any[]) => any) | undefined;
|
|
32
32
|
onLoaded?: ((...args: any[]) => any) | undefined;
|
|
33
|
-
onResponse?: ((...args: any[]) => any) | undefined;
|
|
34
33
|
onStart?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
onResponse?: ((...args: any[]) => any) | undefined;
|
|
35
35
|
onFinish?: ((...args: any[]) => any) | undefined;
|
|
36
36
|
}>, {
|
|
37
37
|
disabled: boolean;
|
package/components/MazSelect.mjs
CHANGED