maz-ui 3.48.4-beta.0 → 3.48.4-beta.2
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/MazAnimatedCounter.d.ts +6 -0
- package/components/MazAnimatedCounter.mjs +12 -11
- package/components/MazAnimatedElement.d.ts +37 -0
- package/components/MazAnimatedElement.mjs +44 -0
- package/components/MazAnimatedText.d.ts +50 -0
- package/components/MazAnimatedText.mjs +165 -0
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCarousel.mjs +1 -1
- package/components/MazChecklist.d.ts +9 -4
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +19 -18
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +1 -1
- 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/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazSelect.d.ts +7 -2
- package/components/MazSelect.mjs +1 -1
- package/components/MazTable.mjs +1 -1
- package/components/assets/MazAnimatedCounter.css +1 -1
- package/components/assets/MazAnimatedElement.css +1 -0
- package/components/assets/MazAnimatedText.css +1 -0
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazChecklist.css +1 -1
- package/components/assets/MazCircularProgressBar.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/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/chunks/{MazBottomSheet-CMqzf-dT.mjs → MazBottomSheet-CNFupuJS.mjs} +1 -1
- package/components/chunks/{MazBtn-S7EnZYtZ.mjs → MazBtn-BJNzz7YT.mjs} +3 -3
- package/components/chunks/{MazBtn-DCyFSkZo.mjs → MazBtn-BO1U1gVG.mjs} +3 -3
- package/components/chunks/MazBtn-BugQGoO-.mjs +103 -0
- package/components/chunks/{MazBtn-DsGaq_eB.mjs → MazBtn-CKDJOBcC.mjs} +2 -2
- package/components/chunks/{MazBtn-B16x1gSu.mjs → MazBtn-CP-m-KDm.mjs} +3 -3
- package/components/chunks/{MazBtn-CvB-Sf2r.mjs → MazBtn-CUoFOAML.mjs} +3 -3
- package/components/chunks/{MazBtn-Cf-LPT5p.mjs → MazBtn-Cyn7ObTB.mjs} +3 -3
- package/components/chunks/{MazBtn-BcrrOaO_.mjs → MazBtn-D53RC3KP.mjs} +3 -3
- package/components/chunks/{MazBtn-DETtZdlj.mjs → MazBtn-DYURBZtp.mjs} +2 -2
- package/components/chunks/{MazBtn-B7cg2yO2.mjs → MazBtn-DiYly5sp.mjs} +3 -3
- package/components/chunks/{MazBtn-CPwCJ1l-.mjs → MazBtn-Dlx6nLm2.mjs} +3 -3
- package/components/chunks/{MazBtn-BvIoLKMM.mjs → MazBtn-MJYP-poo.mjs} +3 -3
- package/components/chunks/{MazBtn-DnJzOPh9.mjs → MazBtn-MvFibIXn.mjs} +3 -3
- package/components/chunks/{MazBtn-C5sb0470.mjs → MazBtn-tS9ACNLi.mjs} +3 -3
- package/components/chunks/{MazCard-l54W3CUU.mjs → MazCard-D-q6vhWd.mjs} +1 -1
- package/components/chunks/{MazCarousel-C16E1i1T.mjs → MazCarousel-Z4XypOn_.mjs} +1 -1
- package/components/chunks/{MazCheckbox-DKM-G0Pw.mjs → MazCheckbox-BImOZ1aM.mjs} +1 -1
- package/components/chunks/{MazCheckbox-CEsAHbdi.mjs → MazCheckbox-DJi0g4uK.mjs} +1 -1
- package/components/chunks/{MazCheckbox-D-7-TdgO.mjs → MazCheckbox-DafMJoEw.mjs} +1 -1
- package/components/chunks/{MazChecklist-y4axtsRX.mjs → MazChecklist-DaEf6wix.mjs} +50 -49
- package/components/chunks/{MazDialog-DQXX2APp.mjs → MazDialog-PVsds2Mw.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-CD1d5ig-.mjs → MazDialogPromise-BdtiOZGU.mjs} +2 -2
- package/components/chunks/{MazDrawer-BqNLfW4e.mjs → MazDrawer-CMHe_JEh.mjs} +1 -1
- package/components/chunks/{MazDropdown-DNXKdC_3.mjs → MazDropdown-DpGSAqe0.mjs} +1 -1
- package/components/chunks/{MazGallery-CzlKPQFX.mjs → MazGallery-BtuCo-H0.mjs} +2 -2
- package/components/chunks/{MazIcon-BIoDsehI.mjs → MazIcon-Bnebkvf6.mjs} +1 -1
- package/components/chunks/MazIcon-C7ZMosGw.mjs +4 -0
- package/components/chunks/{MazInput-yBii2AFS.mjs → MazInput-C3QweR84.mjs} +1 -1
- package/components/chunks/{MazInput-BWtGbtW0.mjs → MazInput-DjvBbUZl.mjs} +2 -2
- package/components/chunks/{MazInput-DB4HtpCQ.mjs → MazInput-DvaaM9Iq.mjs} +2 -2
- package/components/chunks/{MazInputNumber-DqnLi9-C.mjs → MazInputNumber-D904Pg1R.mjs} +2 -2
- package/components/chunks/{MazInputPrice-Ca8mL53M.mjs → MazInputPrice-CQiJFPWB.mjs} +1 -1
- package/components/chunks/{MazInputTags-Bto9dVQq.mjs → MazInputTags-BPSG1X1a.mjs} +2 -2
- package/components/chunks/{MazLink-DlUG7E5K.mjs → MazLink-DnnBkVEE.mjs} +1 -1
- package/components/chunks/{MazLoadingBar-DBt1Ltm5.mjs → MazLoadingBar-Dm14PSs6.mjs} +1 -1
- package/components/chunks/{MazPagination-sxkvTajI.mjs → MazPagination-CuCKS1Qr.mjs} +2 -2
- package/components/chunks/{MazPhoneNumberInput-ovuoYxd9.mjs → MazPhoneNumberInput-CKpP3yWz.mjs} +379 -378
- package/components/chunks/{MazPicker-B_IP-4P3.mjs → MazPicker-g10_1sY_.mjs} +3 -3
- package/components/chunks/{MazPickerMonthSwitcher-BmHHmSvo.mjs → MazPickerMonthSwitcher-BDxk_Msi.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-BSgRCAAD.mjs → MazPickerShortcuts-DtHvsdEW.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-Cy-WbilD.mjs → MazPickerYearSwitcher-DXkaTXFw.mjs} +1 -1
- package/components/chunks/{MazSelect-CBaOs6va.mjs → MazSelect-VAPsGKXy.mjs} +193 -192
- package/components/chunks/{MazSelect-BwahUlbE.mjs → MazSelect-cthYMQqx.mjs} +277 -276
- package/components/chunks/MazSpinner-94rvbsAk.mjs +34 -0
- package/components/chunks/{MazSpinner-D6PdYOcD.mjs → MazSpinner-B5j5EaKc.mjs} +1 -1
- package/components/chunks/MazSpinner-BLh6PkZJ.mjs +34 -0
- package/components/chunks/MazSpinner-Ba5WXlbx.mjs +34 -0
- package/components/chunks/MazSpinner-C2mutMJX.mjs +34 -0
- package/components/chunks/{MazSpinner-Bb1BgWPD.mjs → MazSpinner-C7TbmneX.mjs} +1 -1
- package/components/chunks/MazSpinner-CcshuKK9.mjs +34 -0
- package/components/chunks/{MazSpinner-CizL97Q2.mjs → MazSpinner-D2J_jdkK.mjs} +1 -1
- package/components/chunks/{MazSpinner-Bs089W1b.mjs → MazSpinner-DIzWfhcT.mjs} +1 -1
- package/components/chunks/{MazSpinner-Bpkl7q5u.mjs → MazSpinner-DLR4lVAu.mjs} +1 -1
- package/components/chunks/MazSpinner-DP019rLG.mjs +34 -0
- package/components/chunks/{MazSpinner-Bc-lfBcQ.mjs → MazSpinner-DXCofnqs.mjs} +1 -1
- package/components/chunks/MazSpinner-DmeOhZXm.mjs +34 -0
- package/components/chunks/{MazSpinner-Cmy2WyWY.mjs → MazSpinner-DtFpBxRT.mjs} +1 -1
- package/components/chunks/{MazSpinner-CCThMV5o.mjs → MazSpinner-SnOek826.mjs} +1 -1
- package/components/chunks/MazSpinner-ZDRUpUqo.mjs +34 -0
- package/components/chunks/{MazSpinner-BVQYjLWp.mjs → MazSpinner-qRqfN8k4.mjs} +1 -1
- package/components/chunks/{MazTable-Soe-MrTW.mjs → MazTable-BuFlCw1p.mjs} +1 -1
- package/components/chunks/{MazTableCell-DtoO9MOe.mjs → MazTableCell-C6oDOvNH.mjs} +1 -1
- package/components/chunks/{MazTableRow-ChFMulaU.mjs → MazTableRow-BBS8sW7w.mjs} +1 -1
- package/components/chunks/{MazTableTitle-D8El-v5p.mjs → MazTableTitle-D7J-0k_j.mjs} +1 -1
- package/components/chunks/{MazTransitionExpand-CRArAQZu.mjs → MazTransitionExpand-BlcqxvGq.mjs} +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.mjs +2 -0
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/chunks/{MazBtn-DoDAW5pU.mjs → MazBtn-BjiQC2PC.mjs} +3 -3
- package/modules/chunks/{MazBtn-BXg6oosO.cjs → MazBtn-BnQrui8R.cjs} +1 -1
- package/modules/chunks/{MazIcon-DPvxTNIQ.cjs → MazIcon-D4oz63T8.cjs} +1 -1
- package/modules/chunks/{MazIcon-0i0FnfM4.mjs → MazIcon-DwFVj44O.mjs} +1 -1
- package/modules/chunks/{MazSpinner-Bkl2lVff.mjs → MazSpinner-7nqeVBxW.mjs} +1 -1
- package/modules/chunks/{MazSpinner-n0cEv2AX.cjs → MazSpinner-B18bQ49b.cjs} +1 -1
- package/modules/chunks/{index-Dx2ZhWwj.mjs → index-D8S1X6Fy.mjs} +4 -4
- package/modules/chunks/{index-pV6oqfJc.cjs → index-IBifh-oY.cjs} +2 -2
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.d.mts +1 -1
- package/nuxt/index.d.ts +1 -1
- package/nuxt/index.json +1 -1
- package/nuxt/index.mjs +1 -1
- package/package.json +1 -1
- package/types/components/MazAnimatedCounter.vue.d.ts +6 -0
- package/types/components/MazAnimatedElement.vue.d.ts +37 -0
- package/types/components/MazAnimatedText.vue.d.ts +50 -0
- package/types/components/MazChecklist.vue.d.ts +9 -4
- package/types/components/MazSelect.vue.d.ts +7 -2
- package/types/components/index.d.ts +2 -0
- package/components/chunks/MazBtn-CuIeT4TK.mjs +0 -103
- package/components/chunks/MazIcon-Gv6n6i4M.mjs +0 -4
- package/components/chunks/MazSpinner-BqgAfyh1.mjs +0 -34
- package/components/chunks/MazSpinner-C1Rr3w9l.mjs +0 -34
- package/components/chunks/MazSpinner-CBHbVSef.mjs +0 -34
- package/components/chunks/MazSpinner-Da-bE-KC.mjs +0 -34
- package/components/chunks/MazSpinner-DoFpeVcl.mjs +0 -34
- package/components/chunks/MazSpinner-Dx-3_EFZ.mjs +0 -34
- package/components/chunks/MazSpinner-PXSS3XT3.mjs +0 -34
- package/components/chunks/MazSpinner-vDZ0VOEK.mjs +0 -34
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { computed as p, useId as
|
|
2
|
-
import '../assets/MazSelect.css';function
|
|
1
|
+
import { computed as p, useId as Te, defineComponent as be, defineAsyncComponent as L, ref as V, onMounted as Ee, useSlots as Oe, openBlock as m, createElementBlock as k, normalizeClass as M, normalizeStyle as ee, unref as g, toDisplayString as Q, createCommentVNode as b, createElementVNode as E, renderSlot as H, createBlock as $, resolveDynamicComponent as ve, withDirectives as ge, mergeProps as ze, toHandlers as Ne, vModelDynamic as De, createTextVNode as Fe, withModifiers as F, withCtx as te, createVNode as P, onBeforeMount as Pe, nextTick as ue, Transition as He, Fragment as ye, renderList as qe } from "vue";
|
|
2
|
+
import '../assets/MazSelect.css';function ke({
|
|
3
3
|
componentName: u,
|
|
4
4
|
providedId: r
|
|
5
5
|
}) {
|
|
6
|
-
return p(() => r ?? `${u}-${
|
|
6
|
+
return p(() => r ?? `${u}-${Te().replace(/:/g, "")}`);
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const Ue = {
|
|
9
9
|
removeAccents: !0,
|
|
10
10
|
caseSensitive: !1,
|
|
11
11
|
replaceSpaces: !0,
|
|
@@ -16,7 +16,7 @@ const qe = {
|
|
|
16
16
|
customNormalizationForms: ["NFC", "NFKD"]
|
|
17
17
|
};
|
|
18
18
|
function oe(u, r) {
|
|
19
|
-
const l = { ...
|
|
19
|
+
const l = { ...Ue, ...r }, t = {
|
|
20
20
|
À: "A",
|
|
21
21
|
Á: "A",
|
|
22
22
|
Â: "A",
|
|
@@ -66,86 +66,86 @@ function oe(u, r) {
|
|
|
66
66
|
ó: "o"
|
|
67
67
|
};
|
|
68
68
|
let s = u.toString();
|
|
69
|
-
if (l.trim && (s = s.trim()), l.normalizeSpaces && (s = s.replaceAll(/\s+/g, " ")), l.replaceSpaces && (s = s.replaceAll(" ", "-")), l.removeNumbers && (s = s.replaceAll(/\d/g, "")), l.removeAccents && (s = s.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g, (
|
|
70
|
-
for (const
|
|
71
|
-
s = s.normalize(
|
|
69
|
+
if (l.trim && (s = s.trim()), l.normalizeSpaces && (s = s.replaceAll(/\s+/g, " ")), l.replaceSpaces && (s = s.replaceAll(" ", "-")), l.removeNumbers && (s = s.replaceAll(/\d/g, "")), l.removeAccents && (s = s.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g, (c) => t[c] || c), s = s.replaceAll(/[\u0300-\u036F]/g, "")), l.caseSensitive === !1 && (s = s.toLowerCase()), l.removeSpecialCharacters && (s = s.replaceAll(/[^\dA-Z-]/gi, "")), l.trim && (s = s.trim()), l.customNormalizationForms)
|
|
70
|
+
for (const c of l.customNormalizationForms)
|
|
71
|
+
s = s.normalize(c);
|
|
72
72
|
return s;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function We(u, r) {
|
|
75
75
|
const l = u.length, t = r.length, s = [];
|
|
76
|
-
for (let
|
|
77
|
-
s[
|
|
78
|
-
for (let
|
|
79
|
-
s[0][
|
|
80
|
-
for (let
|
|
81
|
-
for (let
|
|
82
|
-
const S = u[
|
|
83
|
-
s[
|
|
84
|
-
s[
|
|
85
|
-
s[
|
|
86
|
-
s[
|
|
76
|
+
for (let c = 0; c <= l; c++)
|
|
77
|
+
s[c] = [c];
|
|
78
|
+
for (let c = 0; c <= t; c++)
|
|
79
|
+
s[0][c] = c;
|
|
80
|
+
for (let c = 1; c <= l; c++)
|
|
81
|
+
for (let y = 1; y <= t; y++) {
|
|
82
|
+
const S = u[c - 1] === r[y - 1] ? 0 : 1;
|
|
83
|
+
s[c][y] = Math.min(
|
|
84
|
+
s[c - 1][y] + 1,
|
|
85
|
+
s[c][y - 1] + 1,
|
|
86
|
+
s[c - 1][y - 1] + S
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
return s[l][t];
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
const l =
|
|
91
|
+
function Ve(u, r) {
|
|
92
|
+
const l = We(u, r), t = Math.max(u.length, r.length);
|
|
93
93
|
return 1 - l / t;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
95
|
+
function je(u, r, l = 0.75) {
|
|
96
|
+
return Ve(u, r) >= l;
|
|
97
97
|
}
|
|
98
98
|
function re(u, r, l = 0.75) {
|
|
99
99
|
const t = p(
|
|
100
100
|
() => oe(typeof u == "string" ? u : u.value)
|
|
101
101
|
), s = p(
|
|
102
102
|
() => oe(typeof r == "string" ? r : r.value)
|
|
103
|
-
),
|
|
103
|
+
), c = p(() => typeof l == "number" ? l : l.value), y = p(() => Ve(t.value, s.value));
|
|
104
104
|
return {
|
|
105
105
|
isMatching: p(
|
|
106
|
-
() =>
|
|
106
|
+
() => je(t.value, s.value, c.value)
|
|
107
107
|
),
|
|
108
|
-
score:
|
|
108
|
+
score: y
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
var
|
|
111
|
+
function Ie(u, r, l) {
|
|
112
|
+
var y, S;
|
|
113
113
|
u.stopPropagation();
|
|
114
114
|
const t = typeof l.value == "function" ? l.value : l.value.handler, s = typeof l.value == "object" ? l.value.exclude : void 0;
|
|
115
|
-
let
|
|
115
|
+
let c = !1;
|
|
116
116
|
if (s && s.length > 0) {
|
|
117
|
-
for (const
|
|
118
|
-
if (!
|
|
119
|
-
const z = (
|
|
120
|
-
|
|
117
|
+
for (const O of s)
|
|
118
|
+
if (!c && u.target instanceof HTMLElement) {
|
|
119
|
+
const z = (y = document.querySelector(O)) == null ? void 0 : y.getAttribute("id");
|
|
120
|
+
c = (u.target.getAttribute("id") === z || ((S = document.querySelector(O)) == null ? void 0 : S.contains(u.target))) ?? !1;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
!r.contains(u.target) && !
|
|
123
|
+
!r.contains(u.target) && !c && (t == null || t(u));
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function we() {
|
|
126
126
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
127
127
|
}
|
|
128
|
-
function je(u, r) {
|
|
129
|
-
const l = Ie();
|
|
130
|
-
document.removeEventListener(l, (t) => Ve(t, u, r));
|
|
131
|
-
}
|
|
132
128
|
function Qe(u, r) {
|
|
129
|
+
const l = we();
|
|
130
|
+
document.removeEventListener(l, (t) => Ie(t, u, r));
|
|
131
|
+
}
|
|
132
|
+
function Re(u, r) {
|
|
133
133
|
if (typeof r.value != "function" && typeof r.value == "object" && typeof r.value.handler != "function") {
|
|
134
134
|
console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
const l =
|
|
138
|
-
document.addEventListener(l, (t) =>
|
|
137
|
+
const l = we();
|
|
138
|
+
document.addEventListener(l, (t) => Ie(t, u, r));
|
|
139
139
|
}
|
|
140
|
-
const
|
|
141
|
-
mounted:
|
|
142
|
-
unmounted:
|
|
140
|
+
const Ge = {
|
|
141
|
+
mounted: Re,
|
|
142
|
+
unmounted: Qe
|
|
143
143
|
};
|
|
144
|
-
let
|
|
145
|
-
function Ge(u, r) {
|
|
146
|
-
de && clearTimeout(de), de = setTimeout(u, r);
|
|
147
|
-
}
|
|
144
|
+
let ce = null;
|
|
148
145
|
function Ze(u, r) {
|
|
146
|
+
ce && clearTimeout(ce), ce = setTimeout(u, r);
|
|
147
|
+
}
|
|
148
|
+
function Je(u, r) {
|
|
149
149
|
let l;
|
|
150
150
|
return function(...t) {
|
|
151
151
|
clearTimeout(l), l = setTimeout(() => {
|
|
@@ -153,13 +153,13 @@ function Ze(u, r) {
|
|
|
153
153
|
}, r);
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const Xe = ["for"], Ye = {
|
|
157
157
|
key: 0,
|
|
158
158
|
class: "m-input-wrapper-left"
|
|
159
|
-
},
|
|
159
|
+
}, xe = ["id", "name", "placeholder", "aria-label", "type", "inputmode", "disabled", "readonly", "autocomplete", "required"], _e = { key: 0 }, et = {
|
|
160
160
|
key: 1,
|
|
161
161
|
class: "m-input-wrapper-right"
|
|
162
|
-
},
|
|
162
|
+
}, tt = /* @__PURE__ */ be({
|
|
163
163
|
inheritAttrs: !1,
|
|
164
164
|
__name: "MazInput",
|
|
165
165
|
props: {
|
|
@@ -200,15 +200,15 @@ const Je = ["for"], Xe = {
|
|
|
200
200
|
},
|
|
201
201
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
202
202
|
setup(u, { emit: r }) {
|
|
203
|
-
const l = u, t = r, s =
|
|
203
|
+
const l = u, t = r, s = L(() => import("./MazBtn-D53RC3KP.mjs")), c = L(() => import("./MazIcon-Cq1v4J3r.mjs")), y = L(() => import("./eye-slash-BoO00xzs.mjs")), S = L(() => import("./eye-f8zAUc30.mjs")), O = L(() => import("./check-C9Q_W85g.mjs")), z = V(!1), f = V(!1), N = V(), R = ke({
|
|
204
204
|
componentName: "MazInput",
|
|
205
205
|
providedId: l.id
|
|
206
206
|
});
|
|
207
|
-
|
|
207
|
+
Ee(() => {
|
|
208
208
|
var o;
|
|
209
209
|
l.autoFocus && ((o = N.value) == null || o.focus());
|
|
210
210
|
});
|
|
211
|
-
const
|
|
211
|
+
const G = p(() => l.type === "password"), le = p(() => z.value ? "text" : l.type), I = p(() => {
|
|
212
212
|
if (!l.noBorder) {
|
|
213
213
|
if (l.error)
|
|
214
214
|
return "maz-border-danger";
|
|
@@ -236,51 +236,51 @@ const Je = ["for"], Xe = {
|
|
|
236
236
|
}
|
|
237
237
|
return "--default-border";
|
|
238
238
|
}
|
|
239
|
-
}),
|
|
240
|
-
const { required: o, placeholder:
|
|
241
|
-
if (
|
|
242
|
-
return o ? `${
|
|
243
|
-
}),
|
|
239
|
+
}), q = Oe(), Z = p(() => {
|
|
240
|
+
const { required: o, placeholder: v } = l;
|
|
241
|
+
if (v)
|
|
242
|
+
return o ? `${v} *` : v;
|
|
243
|
+
}), J = p(() => K.value !== void 0 && K.value !== ""), X = Je(
|
|
244
244
|
(o) => {
|
|
245
245
|
t("update:model-value", o);
|
|
246
246
|
},
|
|
247
247
|
typeof l.debounce == "number" ? l.debounce : l.debounceDelay ?? 500
|
|
248
248
|
);
|
|
249
|
-
function
|
|
249
|
+
function T(o) {
|
|
250
250
|
if (l.debounce)
|
|
251
|
-
return
|
|
251
|
+
return X(o);
|
|
252
252
|
t("update:model-value", o);
|
|
253
253
|
}
|
|
254
|
-
const
|
|
254
|
+
const K = p({
|
|
255
255
|
get: () => l.modelValue,
|
|
256
|
-
set: (o) =>
|
|
257
|
-
}),
|
|
258
|
-
function
|
|
259
|
-
return !!
|
|
256
|
+
set: (o) => T(o)
|
|
257
|
+
}), Y = p(() => (!!l.label || !!l.hint) && (f.value || !!J.value || !!l.placeholder || ["date", "month", "week"].includes(l.type))), U = p(() => !!l.label || !!l.hint);
|
|
258
|
+
function x() {
|
|
259
|
+
return !!q["right-icon"] || G.value || !!q["valid-button"] || l.validButton || !!l.rightIcon;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
262
|
-
return !!
|
|
261
|
+
function _() {
|
|
262
|
+
return !!q["left-icon"] || !!l.leftIcon;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function B(o) {
|
|
265
265
|
t("focus", o), f.value = !0;
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function W(o) {
|
|
268
268
|
t("blur", o), f.value = !1;
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function ae(o) {
|
|
271
271
|
return t("change", o);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function ne(o) {
|
|
274
274
|
return t("input", o);
|
|
275
275
|
}
|
|
276
|
-
return (o,
|
|
276
|
+
return (o, v) => (m(), k(
|
|
277
277
|
"div",
|
|
278
278
|
{
|
|
279
|
-
class:
|
|
279
|
+
class: M(["m-input", [
|
|
280
280
|
{
|
|
281
281
|
"--is-focused": f.value || o.borderActive,
|
|
282
|
-
"--should-up":
|
|
283
|
-
"--has-label":
|
|
282
|
+
"--should-up": Y.value,
|
|
283
|
+
"--has-label": U.value,
|
|
284
284
|
"--is-disabled": o.disabled,
|
|
285
285
|
"--is-readonly": o.readonly,
|
|
286
286
|
"--has-z-2": o.error || o.warning || o.success,
|
|
@@ -295,13 +295,13 @@ const Je = ["for"], Xe = {
|
|
|
295
295
|
[
|
|
296
296
|
o.topLabel ? (m(), k("label", {
|
|
297
297
|
key: 0,
|
|
298
|
-
for:
|
|
298
|
+
for: g(R),
|
|
299
299
|
class: "m-input-top-label"
|
|
300
|
-
},
|
|
301
|
-
|
|
300
|
+
}, Q(o.topLabel), 9, Xe)) : b("v-if", !0),
|
|
301
|
+
E(
|
|
302
302
|
"div",
|
|
303
303
|
{
|
|
304
|
-
class:
|
|
304
|
+
class: M(["m-input-wrapper m-reset-css", [
|
|
305
305
|
o.inputClasses,
|
|
306
306
|
I.value,
|
|
307
307
|
o.roundedSize ? `--rounded-${o.roundedSize}` : { "maz-rounded": !o.noRadius },
|
|
@@ -309,30 +309,30 @@ const Je = ["for"], Xe = {
|
|
|
309
309
|
]])
|
|
310
310
|
},
|
|
311
311
|
[
|
|
312
|
-
|
|
313
|
-
o.$slots["left-icon"] || o.leftIcon ?
|
|
314
|
-
typeof o.leftIcon == "string" ? (m(),
|
|
312
|
+
_() ? (m(), k("div", Ye, [
|
|
313
|
+
o.$slots["left-icon"] || o.leftIcon ? H(o.$slots, "left-icon", { key: 0 }, () => [
|
|
314
|
+
typeof o.leftIcon == "string" ? (m(), $(g(c), {
|
|
315
315
|
key: 0,
|
|
316
316
|
name: o.leftIcon,
|
|
317
317
|
class: "maz-text-xl maz-text-muted"
|
|
318
|
-
}, null, 8, ["name"])) : o.leftIcon ? (m(),
|
|
318
|
+
}, null, 8, ["name"])) : o.leftIcon ? (m(), $(ve(o.leftIcon), {
|
|
319
319
|
key: 1,
|
|
320
320
|
class: "maz-text-xl maz-text-muted"
|
|
321
321
|
})) : b("v-if", !0)
|
|
322
322
|
], !0) : b("v-if", !0)
|
|
323
323
|
])) : b("v-if", !0),
|
|
324
|
-
|
|
324
|
+
E(
|
|
325
325
|
"div",
|
|
326
326
|
{
|
|
327
|
-
class:
|
|
327
|
+
class: M(["m-input-wrapper-input", [`--${o.size}`, { "--top-label": !!o.topLabel }]])
|
|
328
328
|
},
|
|
329
329
|
[
|
|
330
|
-
|
|
330
|
+
ge(E("input", ze({ id: g(R) }, o.$attrs, {
|
|
331
331
|
ref_key: "input",
|
|
332
332
|
ref: N,
|
|
333
|
-
"onUpdate:modelValue":
|
|
333
|
+
"onUpdate:modelValue": v[0] || (v[0] = (C) => K.value = C),
|
|
334
334
|
name: o.name,
|
|
335
|
-
placeholder:
|
|
335
|
+
placeholder: Z.value,
|
|
336
336
|
"aria-label": o.label || o.placeholder,
|
|
337
337
|
type: le.value,
|
|
338
338
|
inputmode: o.inputmode,
|
|
@@ -341,21 +341,21 @@ const Je = ["for"], Xe = {
|
|
|
341
341
|
autocomplete: o.autocomplete,
|
|
342
342
|
required: o.required,
|
|
343
343
|
class: "m-input-input"
|
|
344
|
-
},
|
|
345
|
-
blur:
|
|
346
|
-
focus:
|
|
347
|
-
change:
|
|
348
|
-
input:
|
|
344
|
+
}, Ne({
|
|
345
|
+
blur: W,
|
|
346
|
+
focus: B,
|
|
347
|
+
change: ae,
|
|
348
|
+
input: ne
|
|
349
349
|
}, !0), {
|
|
350
|
-
onClick:
|
|
351
|
-
}), null, 16,
|
|
352
|
-
[De,
|
|
350
|
+
onClick: v[1] || (v[1] = (C) => o.$emit("click", C))
|
|
351
|
+
}), null, 16, xe), [
|
|
352
|
+
[De, K.value]
|
|
353
353
|
]),
|
|
354
354
|
o.label || o.hint ? (m(), k(
|
|
355
355
|
"span",
|
|
356
356
|
{
|
|
357
357
|
key: 0,
|
|
358
|
-
class:
|
|
358
|
+
class: M(["m-input-label", [
|
|
359
359
|
{
|
|
360
360
|
"maz-text-danger-600": o.error,
|
|
361
361
|
"maz-text-success-600": o.success,
|
|
@@ -364,12 +364,12 @@ const Je = ["for"], Xe = {
|
|
|
364
364
|
]])
|
|
365
365
|
},
|
|
366
366
|
[
|
|
367
|
-
|
|
368
|
-
|
|
367
|
+
Fe(
|
|
368
|
+
Q(o.hint || o.label) + " ",
|
|
369
369
|
1
|
|
370
370
|
/* TEXT */
|
|
371
371
|
),
|
|
372
|
-
o.required ? (m(), k("sup",
|
|
372
|
+
o.required ? (m(), k("sup", _e, "*")) : b("v-if", !0)
|
|
373
373
|
],
|
|
374
374
|
2
|
|
375
375
|
/* CLASS */
|
|
@@ -378,29 +378,29 @@ const Je = ["for"], Xe = {
|
|
|
378
378
|
2
|
|
379
379
|
/* CLASS */
|
|
380
380
|
),
|
|
381
|
-
|
|
382
|
-
o.$slots["right-icon"] || o.rightIcon ?
|
|
383
|
-
typeof o.rightIcon == "string" ? (m(),
|
|
381
|
+
x() ? (m(), k("div", et, [
|
|
382
|
+
o.$slots["right-icon"] || o.rightIcon ? H(o.$slots, "right-icon", { key: 0 }, () => [
|
|
383
|
+
typeof o.rightIcon == "string" ? (m(), $(g(c), {
|
|
384
384
|
key: 0,
|
|
385
385
|
name: o.rightIcon,
|
|
386
386
|
class: "maz-text-xl maz-text-muted"
|
|
387
|
-
}, null, 8, ["name"])) : o.rightIcon ? (m(),
|
|
387
|
+
}, null, 8, ["name"])) : o.rightIcon ? (m(), $(ve(o.rightIcon), {
|
|
388
388
|
key: 1,
|
|
389
389
|
class: "maz-text-xl maz-text-muted"
|
|
390
390
|
})) : b("v-if", !0)
|
|
391
391
|
], !0) : b("v-if", !0),
|
|
392
|
-
|
|
392
|
+
G.value ? (m(), $(g(s), {
|
|
393
393
|
key: 1,
|
|
394
394
|
color: "transparent",
|
|
395
395
|
tabindex: "-1",
|
|
396
396
|
size: "mini",
|
|
397
|
-
onClick:
|
|
397
|
+
onClick: v[2] || (v[2] = F((C) => z.value = !z.value, ["stop"]))
|
|
398
398
|
}, {
|
|
399
399
|
default: te(() => [
|
|
400
|
-
z.value ? (m(),
|
|
400
|
+
z.value ? (m(), $(g(y), {
|
|
401
401
|
key: 0,
|
|
402
402
|
class: "maz-text-xl maz-text-muted"
|
|
403
|
-
})) : (m(),
|
|
403
|
+
})) : (m(), $(g(S), {
|
|
404
404
|
key: 1,
|
|
405
405
|
class: "maz-text-xl maz-text-muted"
|
|
406
406
|
}))
|
|
@@ -408,8 +408,8 @@ const Je = ["for"], Xe = {
|
|
|
408
408
|
_: 1
|
|
409
409
|
/* STABLE */
|
|
410
410
|
})) : b("v-if", !0),
|
|
411
|
-
o.$slots["valid-button"] || o.validButton ?
|
|
412
|
-
|
|
411
|
+
o.$slots["valid-button"] || o.validButton ? H(o.$slots, "valid-button", { key: 2 }, () => [
|
|
412
|
+
P(g(s), {
|
|
413
413
|
color: "transparent",
|
|
414
414
|
disabled: o.disabled,
|
|
415
415
|
tabindex: "-1",
|
|
@@ -419,7 +419,7 @@ const Je = ["for"], Xe = {
|
|
|
419
419
|
type: "submit"
|
|
420
420
|
}, {
|
|
421
421
|
default: te(() => [
|
|
422
|
-
|
|
422
|
+
P(g(O), { class: "maz-text-2xl maz-text-normal" })
|
|
423
423
|
]),
|
|
424
424
|
_: 1
|
|
425
425
|
/* STABLE */
|
|
@@ -434,7 +434,7 @@ const Je = ["for"], Xe = {
|
|
|
434
434
|
"div",
|
|
435
435
|
{
|
|
436
436
|
key: 1,
|
|
437
|
-
class:
|
|
437
|
+
class: M(["m-input-bottom-text", [
|
|
438
438
|
{
|
|
439
439
|
"maz-text-danger-600": o.error,
|
|
440
440
|
"maz-text-success-600": o.success,
|
|
@@ -443,7 +443,7 @@ const Je = ["for"], Xe = {
|
|
|
443
443
|
}
|
|
444
444
|
]])
|
|
445
445
|
},
|
|
446
|
-
|
|
446
|
+
Q(o.assistiveText),
|
|
447
447
|
3
|
|
448
448
|
/* TEXT, CLASS */
|
|
449
449
|
)) : b("v-if", !0)
|
|
@@ -452,16 +452,16 @@ const Je = ["for"], Xe = {
|
|
|
452
452
|
/* CLASS, STYLE */
|
|
453
453
|
));
|
|
454
454
|
}
|
|
455
|
-
}),
|
|
455
|
+
}), Se = (u, r) => {
|
|
456
456
|
const l = u.__vccOpts || u;
|
|
457
457
|
for (const [t, s] of r)
|
|
458
458
|
l[t] = s;
|
|
459
459
|
return l;
|
|
460
|
-
},
|
|
460
|
+
}, he = /* @__PURE__ */ Se(tt, [["__scopeId", "data-v-04e832e5"]]), ot = ["aria-label"], lt = { class: "m-select-list__no-results" }, at = {
|
|
461
461
|
key: 2,
|
|
462
462
|
class: "m-select-list__scroll-wrapper",
|
|
463
463
|
tabindex: "-1"
|
|
464
|
-
},
|
|
464
|
+
}, nt = { class: "m-select-list-optgroup" }, st = ["onClick"], it = /* @__PURE__ */ be({
|
|
465
465
|
inheritAttrs: !1,
|
|
466
466
|
__name: "MazSelect",
|
|
467
467
|
props: {
|
|
@@ -483,6 +483,7 @@ const Je = ["for"], Xe = {
|
|
|
483
483
|
color: { default: "primary" },
|
|
484
484
|
search: { type: Boolean },
|
|
485
485
|
searchPlaceholder: { default: "Search in options" },
|
|
486
|
+
searchFunction: {},
|
|
486
487
|
searchThreshold: { default: 0.75 },
|
|
487
488
|
open: { type: Boolean },
|
|
488
489
|
multiple: { type: Boolean, default: void 0 },
|
|
@@ -494,33 +495,33 @@ const Je = ["for"], Xe = {
|
|
|
494
495
|
},
|
|
495
496
|
emits: ["close", "open", "blur", "focus", "change", "input", "update:model-value", "selected-option"],
|
|
496
497
|
setup(u, { expose: r, emit: l }) {
|
|
497
|
-
const t = u, s = l,
|
|
498
|
+
const t = u, s = l, c = L(() => import("./MazCheckbox-DJi0g4uK.mjs")), y = L(() => import("./magnifying-glass--nBiyXot.mjs")), S = L(() => import("./chevron-down-BkvtON3b.mjs")), O = L(() => import("./no-symbol-CIgKzsrB.mjs"));
|
|
498
499
|
r({
|
|
499
500
|
/** Method to open the option list */
|
|
500
|
-
openList:
|
|
501
|
+
openList: j,
|
|
501
502
|
/** Method to close the option list */
|
|
502
|
-
closeList:
|
|
503
|
+
closeList: D
|
|
503
504
|
});
|
|
504
505
|
const z = V(!1), f = V(), N = p(
|
|
505
506
|
() => ["black", "transparent", "white"].includes(t.color)
|
|
506
|
-
),
|
|
507
|
+
), R = p(
|
|
507
508
|
() => N.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
|
|
508
|
-
),
|
|
509
|
+
), G = p(
|
|
509
510
|
() => N.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
|
|
510
511
|
), le = p(
|
|
511
512
|
() => N.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
|
|
512
|
-
), I = p(() => z.value || t.open),
|
|
513
|
+
), I = p(() => z.value || t.open), q = ke({
|
|
513
514
|
componentName: "MazSelect",
|
|
514
515
|
providedId: t.id
|
|
515
516
|
});
|
|
516
|
-
function
|
|
517
|
+
function Z(e) {
|
|
517
518
|
return {
|
|
518
519
|
[t.optionValueKey]: e,
|
|
519
520
|
[t.optionLabelKey]: e,
|
|
520
521
|
[t.optionInputValueKey]: e
|
|
521
522
|
};
|
|
522
523
|
}
|
|
523
|
-
function
|
|
524
|
+
function J(e) {
|
|
524
525
|
return {
|
|
525
526
|
...e,
|
|
526
527
|
[t.optionValueKey]: e[t.optionValueKey],
|
|
@@ -528,136 +529,136 @@ const Je = ["for"], Xe = {
|
|
|
528
529
|
[t.optionInputValueKey]: e[t.optionInputValueKey]
|
|
529
530
|
};
|
|
530
531
|
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
if (!((n = t.options) != null && n.length))
|
|
532
|
+
function X(e) {
|
|
533
|
+
const a = [];
|
|
534
|
+
if (!(e != null && e.length))
|
|
535
535
|
return [];
|
|
536
|
-
for (const
|
|
537
|
-
typeof
|
|
538
|
-
{ label:
|
|
539
|
-
...
|
|
540
|
-
(i) => typeof i == "string" || typeof i == "number" || typeof i == "boolean" ?
|
|
536
|
+
for (const n of e)
|
|
537
|
+
typeof n == "string" || typeof n == "number" || typeof n == "boolean" ? a.push(Z(n)) : typeof n == "object" && "options" in n && Array.isArray(n.options) ? a.push(
|
|
538
|
+
{ label: n.label, isOptGroup: !0 },
|
|
539
|
+
...n.options.map(
|
|
540
|
+
(i) => typeof i == "string" || typeof i == "number" || typeof i == "boolean" ? Z(i) : J(i)
|
|
541
541
|
)
|
|
542
|
-
) :
|
|
543
|
-
return
|
|
544
|
-
}
|
|
542
|
+
) : a.push(J(n));
|
|
543
|
+
return a;
|
|
544
|
+
}
|
|
545
|
+
const T = p(() => X(t.options ?? [])), K = p(
|
|
545
546
|
() => {
|
|
546
547
|
var e;
|
|
547
|
-
return ((e =
|
|
548
|
+
return ((e = T.value) == null ? void 0 : e.filter((a) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(a[t.optionValueKey]) && !B(a[t.optionValueKey]) : !1 : t.modelValue === a[t.optionValueKey] && !B(a[t.optionValueKey]))) ?? [];
|
|
548
549
|
}
|
|
549
550
|
);
|
|
550
551
|
Pe(() => {
|
|
551
552
|
var e;
|
|
552
553
|
(e = t.options) != null && e.length || console.warn("[maz-ui](MazSelect) you must provide options"), ie();
|
|
553
554
|
});
|
|
554
|
-
const
|
|
555
|
-
function
|
|
555
|
+
const Y = V(), U = V(), x = V(), _ = V();
|
|
556
|
+
function B(e) {
|
|
556
557
|
return e == null;
|
|
557
558
|
}
|
|
558
|
-
function
|
|
559
|
-
var
|
|
560
|
-
return (((
|
|
559
|
+
function W(e) {
|
|
560
|
+
var n;
|
|
561
|
+
return (((n = K.value) == null ? void 0 : n.some(
|
|
561
562
|
(i) => i[t.optionValueKey] === e[t.optionValueKey]
|
|
562
|
-
)) ?? !1) && !
|
|
563
|
+
)) ?? !1) && !B(e[t.optionValueKey]);
|
|
563
564
|
}
|
|
564
565
|
const ae = p(() => {
|
|
565
|
-
var
|
|
566
|
+
var a;
|
|
566
567
|
if (t.multiple && t.modelValue && Array.isArray(t.modelValue))
|
|
567
568
|
return t.modelValue.map(
|
|
568
|
-
(
|
|
569
|
-
var i,
|
|
570
|
-
return (
|
|
569
|
+
(n) => {
|
|
570
|
+
var i, d;
|
|
571
|
+
return (d = (i = T.value) == null ? void 0 : i.find((h) => h[t.optionValueKey] === n)) == null ? void 0 : d[t.optionInputValueKey];
|
|
571
572
|
}
|
|
572
573
|
).join(", ");
|
|
573
|
-
const e = (
|
|
574
|
-
(
|
|
574
|
+
const e = (a = T.value) == null ? void 0 : a.find(
|
|
575
|
+
(n) => n[t.optionValueKey] === t.modelValue
|
|
575
576
|
);
|
|
576
|
-
return
|
|
577
|
+
return B(t.modelValue) || e == null ? void 0 : e[t.optionInputValueKey];
|
|
577
578
|
}), ne = p(
|
|
578
579
|
() => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
579
|
-
),
|
|
580
|
-
function
|
|
581
|
-
return
|
|
580
|
+
), o = V(""), v = V("");
|
|
581
|
+
function C(e, a) {
|
|
582
|
+
return a && e && oe(e).includes(oe(a));
|
|
582
583
|
}
|
|
583
|
-
function
|
|
584
|
-
var
|
|
585
|
-
return e ? (
|
|
586
|
-
const i =
|
|
587
|
-
return
|
|
588
|
-
}) :
|
|
584
|
+
function de(e) {
|
|
585
|
+
var a;
|
|
586
|
+
return e ? (a = T.value) == null ? void 0 : a.filter((n) => {
|
|
587
|
+
const i = n[t.optionLabelKey], d = n[t.optionValueKey], h = n[t.optionInputValueKey], w = t.searchThreshold;
|
|
588
|
+
return C(i, e) || C(h, e) || C(d, e) || typeof i == "string" && re(i, e, w).isMatching.value || typeof h == "string" && re(h, e, w).isMatching.value || typeof d == "string" && re(d, e, w).isMatching.value;
|
|
589
|
+
}) : T.value;
|
|
589
590
|
}
|
|
590
|
-
const
|
|
591
|
-
async function
|
|
592
|
-
var
|
|
591
|
+
const A = p(() => t.searchFunction && t.search && o.value ? X(t.searchFunction(o.value, t.options ?? []) ?? []) : de(o.value));
|
|
592
|
+
async function D(e) {
|
|
593
|
+
var n, i;
|
|
593
594
|
if (!I.value)
|
|
594
595
|
return;
|
|
595
|
-
if (e && ("relatedTarget" in e && ((
|
|
596
|
+
if (e && ("relatedTarget" in e && ((n = Y.value) != null && n.contains(e.relatedTarget)) || e.type === "keydown"))
|
|
596
597
|
return e.preventDefault();
|
|
597
|
-
const
|
|
598
|
-
if ((i = t.excludeSelectors) != null && i.includes(`#${
|
|
598
|
+
const a = e && "relatedTarget" in e && e.relatedTarget instanceof HTMLElement && e.relatedTarget.getAttribute("id");
|
|
599
|
+
if ((i = t.excludeSelectors) != null && i.includes(`#${a}`))
|
|
599
600
|
return e == null ? void 0 : e.preventDefault();
|
|
600
601
|
await ue(), z.value = !1, f.value = 0, s("close", e);
|
|
601
602
|
}
|
|
602
|
-
async function
|
|
603
|
+
async function j(e) {
|
|
603
604
|
t.disabled || I.value || (e == null || e.preventDefault(), z.value = !0, await se(), s("focus", e), s("open", z.value));
|
|
604
605
|
}
|
|
605
|
-
function
|
|
606
|
-
var e,
|
|
607
|
-
(
|
|
608
|
-
}
|
|
609
|
-
function Se() {
|
|
610
|
-
var e, n;
|
|
611
|
-
(n = ((e = j.value) == null ? void 0 : e.$el).querySelector("input")) == null || n.dispatchEvent(new Event("input"));
|
|
606
|
+
function pe() {
|
|
607
|
+
var e, a;
|
|
608
|
+
(a = ((e = U.value) == null ? void 0 : e.$el).querySelector("input")) == null || a.focus();
|
|
612
609
|
}
|
|
613
|
-
function Ke(
|
|
614
|
-
|
|
610
|
+
function Ke() {
|
|
611
|
+
var e, a;
|
|
612
|
+
(a = ((e = U.value) == null ? void 0 : e.$el).querySelector("input")) == null || a.dispatchEvent(new Event("input"));
|
|
615
613
|
}
|
|
616
614
|
function Ae(e) {
|
|
617
|
-
|
|
618
|
-
T.value = e, (a = ((n = x.value) == null ? void 0 : n.$el).querySelector("input")) == null || a.focus();
|
|
615
|
+
z.value ? D(e) : pe();
|
|
619
616
|
}
|
|
620
617
|
function $e(e) {
|
|
621
|
-
var a;
|
|
622
|
-
e
|
|
623
|
-
const n = E(o.value);
|
|
624
|
-
n != null && n.length && (f.value = (a = K.value) == null ? void 0 : a.findIndex(
|
|
625
|
-
(i) => i[t.optionValueKey] === n[0][t.optionValueKey]
|
|
626
|
-
), typeof f.value == "number" && f.value >= 0 && se(f.value)), Ge(() => {
|
|
627
|
-
o.value = "";
|
|
628
|
-
}, 1e3);
|
|
618
|
+
var a, n;
|
|
619
|
+
o.value = e, (n = ((a = x.value) == null ? void 0 : a.$el).querySelector("input")) == null || n.focus();
|
|
629
620
|
}
|
|
630
621
|
function Le(e) {
|
|
631
|
-
|
|
632
|
-
|
|
622
|
+
var n;
|
|
623
|
+
e === "Backspace" && v.value.length > 0 ? v.value = v.value.slice(0, -1) : v.value += e;
|
|
624
|
+
const a = de(v.value);
|
|
625
|
+
a != null && a.length && (f.value = (n = A.value) == null ? void 0 : n.findIndex(
|
|
626
|
+
(i) => i[t.optionValueKey] === a[0][t.optionValueKey]
|
|
627
|
+
), typeof f.value == "number" && f.value >= 0 && se(f.value)), Ze(() => {
|
|
628
|
+
v.value = "";
|
|
629
|
+
}, 1e3);
|
|
633
630
|
}
|
|
634
|
-
function
|
|
635
|
-
const a = e.
|
|
636
|
-
|
|
631
|
+
function Be(e) {
|
|
632
|
+
const a = e.key;
|
|
633
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(a) ? (e.preventDefault(), j(e), t.search ? $e(a) : Le(a)) : fe(e);
|
|
637
634
|
}
|
|
638
|
-
function
|
|
639
|
-
|
|
635
|
+
function fe(e, a = !0) {
|
|
636
|
+
const n = e.code, i = ["ArrowUp", "ArrowDown"].includes(n), d = (a ? ["Enter", "Space"] : ["Enter"]).includes(n), h = n === "Escape" && I.value;
|
|
637
|
+
i ? Ce(e, f.value) : d ? Me(e, f.value) : h && D(e);
|
|
638
|
+
}
|
|
639
|
+
function Ce(e, a) {
|
|
640
|
+
var d;
|
|
640
641
|
e.preventDefault();
|
|
641
|
-
const
|
|
642
|
-
I.value ||
|
|
643
|
-
const i = (
|
|
644
|
-
i && (typeof
|
|
642
|
+
const n = e.code;
|
|
643
|
+
I.value || j(e);
|
|
644
|
+
const i = (d = A.value) == null ? void 0 : d.length;
|
|
645
|
+
i && (typeof a == "number" ? a === i - 1 && n === "ArrowDown" ? f.value = 0 : a === 0 && n === "ArrowUp" ? f.value = i - 1 : f.value = n === "ArrowDown" ? a + 1 : a - 1 : f.value = n === "ArrowDown" ? 0 : i - 1, se(f.value));
|
|
645
646
|
}
|
|
646
|
-
function
|
|
647
|
-
var i,
|
|
647
|
+
function Me(e, a) {
|
|
648
|
+
var i, d, h;
|
|
648
649
|
if (!I.value)
|
|
649
650
|
return;
|
|
650
651
|
e.preventDefault();
|
|
651
|
-
const
|
|
652
|
-
|
|
652
|
+
const n = a ? ((i = A.value) == null ? void 0 : i[a]) ?? ((d = A.value) == null ? void 0 : d[0]) : (h = A.value) == null ? void 0 : h[0];
|
|
653
|
+
B(n) || me(n);
|
|
653
654
|
}
|
|
654
655
|
async function se(e) {
|
|
655
|
-
var
|
|
656
|
+
var n, i;
|
|
656
657
|
await ue(), typeof e != "number" && ie();
|
|
657
|
-
const
|
|
658
|
-
if (typeof
|
|
659
|
-
const
|
|
660
|
-
(i =
|
|
658
|
+
const a = e ?? f.value;
|
|
659
|
+
if (typeof a == "number" && a >= 0) {
|
|
660
|
+
const d = (n = _.value) == null ? void 0 : n.querySelectorAll(".m-select-list-item");
|
|
661
|
+
(i = d == null ? void 0 : d[a]) == null || i.scrollIntoView({
|
|
661
662
|
behavior: "auto",
|
|
662
663
|
block: "nearest",
|
|
663
664
|
inline: "start"
|
|
@@ -665,43 +666,43 @@ const Je = ["for"], Xe = {
|
|
|
665
666
|
}
|
|
666
667
|
}
|
|
667
668
|
function ie(e) {
|
|
668
|
-
var
|
|
669
|
-
const
|
|
670
|
-
var
|
|
671
|
-
return t.multiple && Array.isArray(t.modelValue) ? e ? e[t.optionValueKey] === i[t.optionValueKey] : [...t.modelValue].reverse()[0] === i[t.optionValueKey] : ((
|
|
669
|
+
var n;
|
|
670
|
+
const a = (n = A.value) == null ? void 0 : n.findIndex((i) => {
|
|
671
|
+
var d, h;
|
|
672
|
+
return t.multiple && Array.isArray(t.modelValue) ? e ? e[t.optionValueKey] === i[t.optionValueKey] : [...t.modelValue].reverse()[0] === i[t.optionValueKey] : ((h = (d = K.value) == null ? void 0 : d[0]) == null ? void 0 : h[t.optionValueKey]) === i[t.optionValueKey];
|
|
672
673
|
});
|
|
673
|
-
f.value =
|
|
674
|
+
f.value = a && a >= 0 ? a : 0;
|
|
674
675
|
}
|
|
675
|
-
function
|
|
676
|
-
var
|
|
677
|
-
|
|
678
|
-
const
|
|
676
|
+
function me(e, a = !0) {
|
|
677
|
+
var h;
|
|
678
|
+
a && !t.multiple && ue(() => D()), o.value = "";
|
|
679
|
+
const n = (h = K.value) == null ? void 0 : h.some(
|
|
679
680
|
(w) => w[t.optionValueKey] === e[t.optionValueKey]
|
|
680
681
|
);
|
|
681
|
-
let i =
|
|
682
|
-
|
|
682
|
+
let i = K.value;
|
|
683
|
+
n && t.multiple ? i = i == null ? void 0 : i.filter(
|
|
683
684
|
(w) => w[t.optionValueKey] !== e[t.optionValueKey]
|
|
684
685
|
) : t.multiple ? i.push(e) : i = [e];
|
|
685
|
-
const
|
|
686
|
-
s("update:model-value", t.multiple ?
|
|
686
|
+
const d = i.map((w) => w[t.optionValueKey]);
|
|
687
|
+
s("update:model-value", t.multiple ? d : d[0]), s("selected-option", e), Ke(), ie(e), pe();
|
|
687
688
|
}
|
|
688
|
-
return (e,
|
|
689
|
+
return (e, a) => ge((m(), k(
|
|
689
690
|
"div",
|
|
690
691
|
{
|
|
691
692
|
ref_key: "mazSelectElement",
|
|
692
|
-
ref:
|
|
693
|
-
class:
|
|
693
|
+
ref: Y,
|
|
694
|
+
class: M(["m-select m-reset-css", [
|
|
694
695
|
{ "--is-open": I.value, "--disabled": e.disabled, "--block": e.block },
|
|
695
696
|
t.class,
|
|
696
697
|
`--${e.size}`
|
|
697
698
|
]]),
|
|
698
|
-
style: ee([e.style, { "--keyboard-selected-bg-color": le.value, "--selected-bg-color":
|
|
699
|
+
style: ee([e.style, { "--keyboard-selected-bg-color": le.value, "--selected-bg-color": G.value, "--selected-text-color": R.value }])
|
|
699
700
|
},
|
|
700
701
|
[
|
|
701
|
-
|
|
702
|
-
id:
|
|
702
|
+
P(he, ze({
|
|
703
|
+
id: g(q),
|
|
703
704
|
ref_key: "mazInputComponent",
|
|
704
|
-
ref:
|
|
705
|
+
ref: U,
|
|
705
706
|
class: "m-select-input"
|
|
706
707
|
}, e.$attrs, {
|
|
707
708
|
required: e.required,
|
|
@@ -712,36 +713,36 @@ const Je = ["for"], Xe = {
|
|
|
712
713
|
block: "",
|
|
713
714
|
autocomplete: e.autocomplete,
|
|
714
715
|
disabled: e.disabled,
|
|
715
|
-
onFocus:
|
|
716
|
-
onBlur:
|
|
717
|
-
onClick:
|
|
718
|
-
onChange:
|
|
719
|
-
onInput:
|
|
720
|
-
onKeydown:
|
|
716
|
+
onFocus: F(j, ["prevent", "stop"]),
|
|
717
|
+
onBlur: F(D, ["prevent", "stop"]),
|
|
718
|
+
onClick: F(j, ["prevent", "stop"]),
|
|
719
|
+
onChange: a[0] || (a[0] = (n) => s("change", n)),
|
|
720
|
+
onInput: a[1] || (a[1] = (n) => s("input", n)),
|
|
721
|
+
onKeydown: Be
|
|
721
722
|
}), {
|
|
722
723
|
"right-icon": te(() => [
|
|
723
|
-
|
|
724
|
+
E("button", {
|
|
724
725
|
tabindex: "-1",
|
|
725
726
|
type: "button",
|
|
726
727
|
class: "m-select-input__toggle-button maz-custom",
|
|
727
728
|
"aria-label": `${I.value ? "collapse" : "expand"} list of options`,
|
|
728
|
-
onClick:
|
|
729
|
+
onClick: F(Ae, ["stop"])
|
|
729
730
|
}, [
|
|
730
|
-
|
|
731
|
-
], 8,
|
|
731
|
+
P(g(S), { class: "m-select-chevron maz-text-xl" })
|
|
732
|
+
], 8, ot)
|
|
732
733
|
]),
|
|
733
734
|
_: 1
|
|
734
735
|
/* STABLE */
|
|
735
736
|
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "autocomplete", "disabled"]),
|
|
736
|
-
|
|
737
|
+
P(He, { name: ne.value }, {
|
|
737
738
|
default: te(() => [
|
|
738
739
|
I.value ? (m(), k(
|
|
739
740
|
"div",
|
|
740
741
|
{
|
|
741
742
|
key: 0,
|
|
742
|
-
ref_key: "
|
|
743
|
+
ref_key: "optionListElement",
|
|
743
744
|
ref: _,
|
|
744
|
-
class:
|
|
745
|
+
class: M(["m-select-list", {
|
|
745
746
|
"--top": e.listPosition.includes("top"),
|
|
746
747
|
"--left": e.listPosition.includes("left"),
|
|
747
748
|
"--right": e.listPosition.includes("right"),
|
|
@@ -755,14 +756,14 @@ const Je = ["for"], Xe = {
|
|
|
755
756
|
})
|
|
756
757
|
},
|
|
757
758
|
[
|
|
758
|
-
e.search ? (m(),
|
|
759
|
+
e.search ? (m(), $(he, {
|
|
759
760
|
key: 0,
|
|
760
761
|
ref_key: "searchInputComponent",
|
|
761
762
|
ref: x,
|
|
762
|
-
modelValue:
|
|
763
|
+
modelValue: o.value,
|
|
763
764
|
"onUpdate:modelValue": [
|
|
764
|
-
|
|
765
|
-
|
|
765
|
+
a[2] || (a[2] = (n) => o.value = n),
|
|
766
|
+
a[4] || (a[4] = (n) => f.value = 0)
|
|
766
767
|
],
|
|
767
768
|
size: "sm",
|
|
768
769
|
color: e.color,
|
|
@@ -773,29 +774,29 @@ const Je = ["for"], Xe = {
|
|
|
773
774
|
autocomplete: "off",
|
|
774
775
|
tabindex: "-1",
|
|
775
776
|
class: "m-select-list__search-input maz-flex-none",
|
|
776
|
-
"left-icon":
|
|
777
|
-
onKeydown:
|
|
777
|
+
"left-icon": g(y),
|
|
778
|
+
onKeydown: a[3] || (a[3] = (n) => fe(n, !1))
|
|
778
779
|
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : b("v-if", !0),
|
|
779
|
-
!
|
|
780
|
-
|
|
781
|
-
|
|
780
|
+
!A.value || A.value.length <= 0 ? H(e.$slots, "no-results", { key: 1 }, () => [
|
|
781
|
+
E("span", lt, [
|
|
782
|
+
P(g(O), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
782
783
|
])
|
|
783
|
-
], !0) : (m(), k("div",
|
|
784
|
+
], !0) : (m(), k("div", at, [
|
|
784
785
|
(m(!0), k(
|
|
785
|
-
|
|
786
|
+
ye,
|
|
786
787
|
null,
|
|
787
|
-
|
|
788
|
-
|
|
788
|
+
qe(A.value, (n, i) => (m(), k(
|
|
789
|
+
ye,
|
|
789
790
|
{ key: i },
|
|
790
791
|
[
|
|
791
|
-
|
|
792
|
+
n.label && n.isOptGroup ? H(e.$slots, "optgroup", {
|
|
792
793
|
key: 0,
|
|
793
|
-
label:
|
|
794
|
+
label: n.label
|
|
794
795
|
}, () => [
|
|
795
|
-
|
|
796
|
+
E(
|
|
796
797
|
"span",
|
|
797
|
-
|
|
798
|
-
|
|
798
|
+
nt,
|
|
799
|
+
Q(n.label),
|
|
799
800
|
1
|
|
800
801
|
/* TEXT */
|
|
801
802
|
)
|
|
@@ -803,36 +804,36 @@ const Je = ["for"], Xe = {
|
|
|
803
804
|
key: 1,
|
|
804
805
|
tabindex: "-1",
|
|
805
806
|
type: "button",
|
|
806
|
-
class:
|
|
807
|
+
class: M(["m-select-list-item maz-custom maz-flex-none", [
|
|
807
808
|
{
|
|
808
809
|
"--is-keyboard-selected": f.value === i,
|
|
809
|
-
"--is-selected":
|
|
810
|
-
"--is-none-value":
|
|
810
|
+
"--is-selected": W(n),
|
|
811
|
+
"--is-none-value": B(n[e.optionValueKey])
|
|
811
812
|
}
|
|
812
813
|
]]),
|
|
813
814
|
style: ee(e.itemHeight ? { height: `${e.itemHeight}px` } : void 0),
|
|
814
|
-
onClick:
|
|
815
|
+
onClick: F((d) => me(n), ["prevent", "stop"])
|
|
815
816
|
}, [
|
|
816
|
-
e.multiple ? (m(),
|
|
817
|
+
e.multiple ? (m(), $(g(c), {
|
|
817
818
|
key: 0,
|
|
818
819
|
tabindex: "-1",
|
|
819
|
-
"model-value":
|
|
820
|
+
"model-value": W(n),
|
|
820
821
|
size: "sm",
|
|
821
822
|
color: e.color
|
|
822
823
|
}, null, 8, ["model-value", "color"])) : b("v-if", !0),
|
|
823
|
-
|
|
824
|
-
option:
|
|
825
|
-
isSelected:
|
|
824
|
+
H(e.$slots, "default", {
|
|
825
|
+
option: n,
|
|
826
|
+
isSelected: W(n)
|
|
826
827
|
}, () => [
|
|
827
|
-
|
|
828
|
+
E(
|
|
828
829
|
"span",
|
|
829
830
|
null,
|
|
830
|
-
|
|
831
|
+
Q(n[e.optionLabelKey]),
|
|
831
832
|
1
|
|
832
833
|
/* TEXT */
|
|
833
834
|
)
|
|
834
835
|
], !0)
|
|
835
|
-
], 14,
|
|
836
|
+
], 14, st))
|
|
836
837
|
],
|
|
837
838
|
64
|
|
838
839
|
/* STABLE_FRAGMENT */
|
|
@@ -853,15 +854,15 @@ const Je = ["for"], Xe = {
|
|
|
853
854
|
6
|
|
854
855
|
/* CLASS, STYLE */
|
|
855
856
|
)), [
|
|
856
|
-
[
|
|
857
|
+
[g(Ge), {
|
|
857
858
|
exclude: e.excludeSelectors,
|
|
858
|
-
handler:
|
|
859
|
+
handler: D
|
|
859
860
|
}]
|
|
860
861
|
]);
|
|
861
862
|
}
|
|
862
|
-
}),
|
|
863
|
+
}), rt = /* @__PURE__ */ Se(it, [["__scopeId", "data-v-98157b75"]]);
|
|
863
864
|
export {
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
865
|
+
rt as M,
|
|
866
|
+
Se as _,
|
|
867
|
+
ke as u
|
|
867
868
|
};
|