maz-ui 3.47.2-beta.3 → 3.47.2-beta.5
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/MazChecklist.d.ts +1 -4
- package/components/MazChecklist.mjs +1 -1
- package/components/MazDropdown.d.ts +2 -1
- package/components/MazDropdown.mjs +2 -325
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazSelect.mjs +1 -1
- package/components/MazTable.mjs +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/chunks/{MazBtn-cDJlUVVY.mjs → MazBtn-BJxI5VQw.mjs} +1 -1
- package/components/chunks/{MazBtn-BMYXMZuX.mjs → MazBtn-C_BULYqZ.mjs} +2 -2
- package/components/chunks/{MazBtn-2VKM1wZu.mjs → MazBtn-Sj-Pq0YV.mjs} +2 -2
- package/components/chunks/{MazBtn-DfqRZvbB.mjs → MazBtn-cUQ1Tykp.mjs} +2 -2
- package/components/chunks/{MazBtn-BijEMn4r.mjs → MazBtn-psosbsi3.mjs} +2 -2
- package/components/chunks/{MazCheckbox-DMogZVHl.mjs → MazCheckbox-BBL0vgqe.mjs} +1 -1
- package/components/chunks/{MazCheckbox-Db6sPUbV.mjs → MazCheckbox-BTl370Qq.mjs} +1 -1
- package/components/chunks/{MazCheckbox-B22OcHt8.mjs → MazCheckbox-DTU2jEkC.mjs} +1 -1
- package/components/chunks/{MazChecklist-C95Y4Hb-.mjs → MazChecklist-CQv-sXP1.mjs} +79 -79
- package/components/chunks/MazDropdown-peYVJsXv.mjs +441 -0
- package/components/chunks/{MazIcon-BF5TFzse.mjs → MazIcon-BdQtfzuy.mjs} +1 -1
- package/components/chunks/MazIcon-Bk4mYF1h.mjs +4 -0
- package/components/chunks/{MazInput-DC3S-CVu.mjs → MazInput-eOtg1L9F.mjs} +2 -2
- package/components/chunks/{MazInput-NE6H-10w.mjs → MazInput-geBqeT4i.mjs} +2 -2
- package/components/chunks/{MazLink-C_3Wya94.mjs → MazLink-Cd4MwIC9.mjs} +1 -1
- package/components/chunks/{MazLoadingBar-DdjHRC7g.mjs → MazLoadingBar-DHcYPXlE.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-BbssOUzo.mjs → MazPhoneNumberInput-BTm8A0bL.mjs} +33 -32
- package/components/chunks/{MazSelect-CDV9Fx6m.mjs → MazSelect-Cnz3p3n2.mjs} +41 -40
- package/components/chunks/{MazSelect-BJ07NVXQ.mjs → MazSelect-DOiqBTNY.mjs} +57 -56
- package/components/chunks/{MazSpinner-CykRbNHD.mjs → MazSpinner-B1PXhYRx.mjs} +1 -1
- package/components/chunks/{MazSpinner-CEFbkZkM.mjs → MazSpinner-B7tPZpHw.mjs} +1 -1
- package/components/chunks/{MazSpinner-Dmkr_r9u.mjs → MazSpinner-DOSj2BnX.mjs} +1 -1
- package/components/chunks/{MazSpinner-CfiIXW8y.mjs → MazSpinner-Dhg-s-9s.mjs} +1 -1
- package/components/chunks/{MazTable-BJDPdIJB.mjs → MazTable-BKdEx63E.mjs} +1 -1
- package/components/chunks/{MazTableCell-DILuUCTe.mjs → MazTableCell-CozcugiL.mjs} +1 -1
- package/components/chunks/{MazTableRow-D6H6-c8J.mjs → MazTableRow-bLFpjzu1.mjs} +1 -1
- package/components/chunks/{MazTableTitle-Ch-nyY1E.mjs → MazTableTitle-Qk239mu9.mjs} +1 -1
- package/modules/chunks/{MazBtn-R7z-Hxp-.cjs → MazBtn-D7el03Rl.cjs} +1 -1
- package/modules/chunks/{MazBtn-QVmZ90t5.mjs → MazBtn-D8uOirkn.mjs} +2 -2
- package/modules/chunks/{MazIcon-CKCoY05P.cjs → MazIcon-B8BoiF7R.cjs} +1 -1
- package/modules/chunks/{MazIcon-DJfEPmBG.mjs → MazIcon-C6zDSPgJ.mjs} +1 -1
- package/modules/chunks/{MazSpinner-DYT43E6e.cjs → MazSpinner-B-4tL9pK.cjs} +1 -1
- package/modules/chunks/{MazSpinner-C95OqwKl.mjs → MazSpinner-BvJydaeF.mjs} +1 -1
- package/modules/chunks/{index-CjsYU5rv.mjs → index-Bf4X7amE.mjs} +29 -23
- package/modules/chunks/index-F0B533E8.cjs +124 -0
- 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/MazChecklist.vue.d.ts +1 -4
- package/types/components/MazDropdown.vue.d.ts +2 -1
- package/types/modules/composables/useFormValidator/types.d.ts +6 -6
- package/types/modules/composables/useFormValidator/useFormField.d.ts +2 -2
- package/types/modules/composables/useFormValidator/useFormValidator.d.ts +3 -3
- package/types/modules/composables/useFormValidator/utils.d.ts +5 -5
- package/modules/chunks/index-oVi9-l4o.cjs +0 -124
package/components/chunks/{MazPhoneNumberInput-BbssOUzo.mjs → MazPhoneNumberInput-BTm8A0bL.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assets/MazPhoneNumberInput.css';var Ge = Object.defineProperty;
|
|
2
2
|
var Je = (a, o, e) => o in a ? Ge(a, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[o] = e;
|
|
3
3
|
var _ = (a, o, e) => Je(a, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
-
import { useId as Ze, computed as h, inject as Xe, defineComponent as
|
|
4
|
+
import { useId as Ze, computed as h, inject as Xe, defineComponent as se, defineAsyncComponent as q, withDirectives as ze, openBlock as b, createElementBlock as E, normalizeClass as F, normalizeStyle as ee, Fragment as be, renderList as Be, createElementVNode as j, mergeProps as oe, createVNode as H, unref as P, createCommentVNode as $, renderSlot as N, ref as k, onMounted as Ie, useSlots as xe, createBlock as U, resolveDynamicComponent as Pe, toHandlers as _e, vModelDynamic as eo, createTextVNode as oo, toDisplayString as ue, withModifiers as ae, withCtx as G, useCssVars as to, onBeforeMount as lo, nextTick as ie, Transition as ao, mergeModels as ke, useModel as so, provide as no, watch as he } from "vue";
|
|
5
5
|
import { getCountries as Oe, getCountryCallingCode as ce, isSupportedCountry as ro, parsePhoneNumberFromString as io, AsYouType as uo, getExampleNumber as co } from "libphonenumber-js";
|
|
6
6
|
function Ae({
|
|
7
7
|
componentName: a,
|
|
@@ -204,7 +204,7 @@ const vo = {
|
|
|
204
204
|
}, yo = ["data-lazy-srcset", "media"], go = ["alt"], bo = {
|
|
205
205
|
key: 0,
|
|
206
206
|
class: "m-lazy-img-component-loader"
|
|
207
|
-
}, Co = /* @__PURE__ */
|
|
207
|
+
}, Co = /* @__PURE__ */ se({
|
|
208
208
|
inheritAttrs: !1,
|
|
209
209
|
__name: "MazLazyImg",
|
|
210
210
|
props: {
|
|
@@ -225,7 +225,7 @@ const vo = {
|
|
|
225
225
|
},
|
|
226
226
|
emits: ["intersecting", "loading", "loaded", "error"],
|
|
227
227
|
setup(a) {
|
|
228
|
-
const o = a, e = q(() => import("./MazSpinner-
|
|
228
|
+
const o = a, e = q(() => import("./MazSpinner-B7tPZpHw.mjs")), t = h(() => o.image || o.src), r = h(() => {
|
|
229
229
|
var u;
|
|
230
230
|
return typeof t.value == "string" ? [{ srcset: t.value }] : (u = t.value) == null ? void 0 : u.sources;
|
|
231
231
|
});
|
|
@@ -274,12 +274,12 @@ const vo = {
|
|
|
274
274
|
}]
|
|
275
275
|
]);
|
|
276
276
|
}
|
|
277
|
-
}),
|
|
277
|
+
}), ne = (a, o) => {
|
|
278
278
|
const e = a.__vccOpts || a;
|
|
279
279
|
for (const [t, r] of o)
|
|
280
280
|
e[t] = r;
|
|
281
281
|
return e;
|
|
282
|
-
}, Le = /* @__PURE__ */
|
|
282
|
+
}, Le = /* @__PURE__ */ ne(Co, [["__scopeId", "data-v-83e40430"]]), zo = {
|
|
283
283
|
removeAccents: !0,
|
|
284
284
|
caseSensitive: !1,
|
|
285
285
|
replaceSpaces: !0,
|
|
@@ -433,7 +433,7 @@ const Eo = {
|
|
|
433
433
|
}, Lo = { class: "m-input-wrapper-input" }, $o = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], Bo = { key: 0 }, Oo = {
|
|
434
434
|
key: 1,
|
|
435
435
|
class: "m-input-wrapper-right"
|
|
436
|
-
}, Mo = /* @__PURE__ */
|
|
436
|
+
}, Mo = /* @__PURE__ */ se({
|
|
437
437
|
inheritAttrs: !1,
|
|
438
438
|
__name: "MazInput",
|
|
439
439
|
props: {
|
|
@@ -471,7 +471,7 @@ const Eo = {
|
|
|
471
471
|
},
|
|
472
472
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
473
473
|
setup(a, { emit: o }) {
|
|
474
|
-
const e = a, t = o, r = q(() => import("./MazBtn-
|
|
474
|
+
const e = a, t = o, r = q(() => import("./MazBtn-Sj-Pq0YV.mjs")), u = q(() => import("./MazIcon-BdQtfzuy.mjs")), v = q(() => import("./eye-slash-BoO00xzs.mjs")), f = q(() => import("./eye-f8zAUc30.mjs")), O = q(() => import("./check-C9Q_W85g.mjs")), L = k(!1), y = k(!1), V = k(), i = Ae({
|
|
475
475
|
componentName: "MazInput",
|
|
476
476
|
providedId: e.id
|
|
477
477
|
});
|
|
@@ -653,7 +653,7 @@ const Eo = {
|
|
|
653
653
|
color: "transparent",
|
|
654
654
|
tabindex: "-1",
|
|
655
655
|
size: "mini",
|
|
656
|
-
onClick: M[2] || (M[2] =
|
|
656
|
+
onClick: M[2] || (M[2] = ae((x) => L.value = !L.value, ["stop"]))
|
|
657
657
|
}, {
|
|
658
658
|
default: G(() => [
|
|
659
659
|
L.value ? (b(), U(P(v), {
|
|
@@ -694,11 +694,11 @@ const Eo = {
|
|
|
694
694
|
/* CLASS, STYLE */
|
|
695
695
|
));
|
|
696
696
|
}
|
|
697
|
-
}), Ce = /* @__PURE__ */
|
|
697
|
+
}), Ce = /* @__PURE__ */ ne(Mo, [["__scopeId", "data-v-c42aaa7f"]]), To = ["aria-label"], Fo = { class: "m-select-list__no-results" }, No = {
|
|
698
698
|
key: 2,
|
|
699
699
|
class: "m-select-list__scroll-wrapper",
|
|
700
700
|
tabindex: "-1"
|
|
701
|
-
}, Ko = { class: "m-select-list-optgroup" }, Uo = ["onClick"], Ho = /* @__PURE__ */
|
|
701
|
+
}, Ko = { class: "m-select-list-optgroup" }, Uo = ["onClick"], Ho = /* @__PURE__ */ se({
|
|
702
702
|
inheritAttrs: !1,
|
|
703
703
|
__name: "MazSelect",
|
|
704
704
|
props: {
|
|
@@ -732,14 +732,14 @@ const Eo = {
|
|
|
732
732
|
emits: ["close", "open", "blur", "focus", "change", "input", "update:model-value", "selected-option"],
|
|
733
733
|
setup(a, { expose: o, emit: e }) {
|
|
734
734
|
to((l) => ({
|
|
735
|
-
|
|
736
|
-
"
|
|
737
|
-
|
|
735
|
+
fba4bd7a: z.value,
|
|
736
|
+
"2796b77c": i.value,
|
|
737
|
+
d1bcc1ac: p.value
|
|
738
738
|
}));
|
|
739
|
-
const t = a, r = e, u = q(() => import("./MazCheckbox-
|
|
739
|
+
const t = a, r = e, u = q(() => import("./MazCheckbox-DTU2jEkC.mjs")), v = q(() => import("./magnifying-glass--nBiyXot.mjs")), f = q(() => import("./chevron-down-BkvtON3b.mjs")), O = q(() => import("./no-symbol-CIgKzsrB.mjs"));
|
|
740
740
|
o({
|
|
741
741
|
/** Method to open the option list */
|
|
742
|
-
openList:
|
|
742
|
+
openList: re,
|
|
743
743
|
/** Method to close the option list */
|
|
744
744
|
closeList: le
|
|
745
745
|
});
|
|
@@ -841,7 +841,7 @@ const Eo = {
|
|
|
841
841
|
return l == null ? void 0 : l.preventDefault();
|
|
842
842
|
await ie(), L.value = !1, y.value = 0, r("close", l);
|
|
843
843
|
}
|
|
844
|
-
async function
|
|
844
|
+
async function re(l) {
|
|
845
845
|
t.disabled || w.value || (l == null || l.preventDefault(), L.value = !0, await fe(), r("focus", l), r("open", L.value));
|
|
846
846
|
}
|
|
847
847
|
function we() {
|
|
@@ -871,7 +871,7 @@ const Eo = {
|
|
|
871
871
|
}
|
|
872
872
|
function Ye(l) {
|
|
873
873
|
const d = l.key;
|
|
874
|
-
/^[\dA-Za-z\u0400-\u04FF]$/.test(d) ? (l.preventDefault(),
|
|
874
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(d) ? (l.preventDefault(), re(l), t.search ? qe(d) : je(d)) : Se(l);
|
|
875
875
|
}
|
|
876
876
|
function Se(l, d = !0) {
|
|
877
877
|
const m = l.code, c = ["ArrowUp", "ArrowDown"].includes(m), I = (d ? ["Enter", "Space"] : ["Enter"]).includes(m), B = m === "Escape" && w.value;
|
|
@@ -881,14 +881,15 @@ const Eo = {
|
|
|
881
881
|
var I;
|
|
882
882
|
l.preventDefault();
|
|
883
883
|
const m = l.code;
|
|
884
|
-
w.value ||
|
|
884
|
+
w.value || re(l);
|
|
885
885
|
const c = (I = Q.value) == null ? void 0 : I.length;
|
|
886
886
|
c && (typeof d == "number" ? d === c - 1 && m === "ArrowDown" ? y.value = 0 : d === 0 && m === "ArrowUp" ? y.value = c - 1 : y.value = m === "ArrowDown" ? d + 1 : d - 1 : y.value = m === "ArrowDown" ? 0 : c - 1, fe(y.value));
|
|
887
887
|
}
|
|
888
888
|
function Qe(l, d) {
|
|
889
889
|
var c, I, B;
|
|
890
|
-
if (
|
|
891
|
-
return
|
|
890
|
+
if (!w.value)
|
|
891
|
+
return;
|
|
892
|
+
l.preventDefault();
|
|
892
893
|
const m = d ? ((c = Q.value) == null ? void 0 : c[d]) ?? ((I = Q.value) == null ? void 0 : I[0]) : (B = Q.value) == null ? void 0 : B[0];
|
|
893
894
|
A(m) || Ve(m);
|
|
894
895
|
}
|
|
@@ -955,9 +956,9 @@ const Eo = {
|
|
|
955
956
|
block: "",
|
|
956
957
|
autocomplete: l.autocomplete,
|
|
957
958
|
disabled: l.disabled,
|
|
958
|
-
onFocus:
|
|
959
|
-
onBlur:
|
|
960
|
-
onClick:
|
|
959
|
+
onFocus: ae(re, ["prevent", "stop"]),
|
|
960
|
+
onBlur: ae(le, ["prevent", "stop"]),
|
|
961
|
+
onClick: ae(re, ["prevent", "stop"]),
|
|
961
962
|
onChange: d[0] || (d[0] = (c) => r("change", c)),
|
|
962
963
|
onInput: d[1] || (d[1] = (c) => r("input", c)),
|
|
963
964
|
onKeydown: Ye
|
|
@@ -968,7 +969,7 @@ const Eo = {
|
|
|
968
969
|
type: "button",
|
|
969
970
|
class: "m-select-input__toggle-button maz-custom",
|
|
970
971
|
"aria-label": `${w.value ? "collapse" : "expand"} list of options`,
|
|
971
|
-
onClick:
|
|
972
|
+
onClick: ae(Re, ["stop"])
|
|
972
973
|
}, [
|
|
973
974
|
H(P(f), { class: "m-select-chevron maz-text-xl" })
|
|
974
975
|
], 8, To)
|
|
@@ -1053,7 +1054,7 @@ const Eo = {
|
|
|
1053
1054
|
}
|
|
1054
1055
|
]]),
|
|
1055
1056
|
style: ee(l.itemHeight ? { height: `${l.itemHeight}px` } : void 0),
|
|
1056
|
-
onClick:
|
|
1057
|
+
onClick: ae((B) => Ve(c), ["prevent", "stop"])
|
|
1057
1058
|
}, [
|
|
1058
1059
|
l.multiple ? (b(), U(P(u), {
|
|
1059
1060
|
key: 0,
|
|
@@ -1102,7 +1103,7 @@ const Eo = {
|
|
|
1102
1103
|
]);
|
|
1103
1104
|
};
|
|
1104
1105
|
}
|
|
1105
|
-
}), Do = /* @__PURE__ */
|
|
1106
|
+
}), Do = /* @__PURE__ */ ne(Ho, [["__scopeId", "data-v-3b483b12"]]);
|
|
1106
1107
|
function Ke() {
|
|
1107
1108
|
if (typeof window > "u")
|
|
1108
1109
|
return;
|
|
@@ -1164,7 +1165,7 @@ function Ue() {
|
|
|
1164
1165
|
const Wo = ["id"], Qo = {
|
|
1165
1166
|
key: 0,
|
|
1166
1167
|
class: "m-country-selector__select__item__flag-container"
|
|
1167
|
-
}, Go = /* @__PURE__ */
|
|
1168
|
+
}, Go = /* @__PURE__ */ se({
|
|
1168
1169
|
__name: "CountrySelector",
|
|
1169
1170
|
props: {
|
|
1170
1171
|
style: { default: void 0 },
|
|
@@ -1351,7 +1352,7 @@ const Wo = ["id"], Qo = {
|
|
|
1351
1352
|
/* CLASS, STYLE */
|
|
1352
1353
|
));
|
|
1353
1354
|
}
|
|
1354
|
-
}), Jo = /* @__PURE__ */
|
|
1355
|
+
}), Jo = /* @__PURE__ */ ne(Go, [["__scopeId", "data-v-382b69af"]]), Zo = {
|
|
1355
1356
|
countrySelector: {
|
|
1356
1357
|
placeholder: "Country code",
|
|
1357
1358
|
error: "Choose country",
|
|
@@ -1433,7 +1434,7 @@ function He() {
|
|
|
1433
1434
|
getCountryCallingCode: ce
|
|
1434
1435
|
};
|
|
1435
1436
|
}
|
|
1436
|
-
const tt = /* @__PURE__ */
|
|
1437
|
+
const tt = /* @__PURE__ */ se({
|
|
1437
1438
|
__name: "PhoneInput",
|
|
1438
1439
|
props: /* @__PURE__ */ ke({
|
|
1439
1440
|
id: {},
|
|
@@ -1517,7 +1518,7 @@ const tt = /* @__PURE__ */ ne({
|
|
|
1517
1518
|
"onUpdate:modelValue": S[2] || (S[2] = (C) => Y(C))
|
|
1518
1519
|
}), null, 16, ["id", "model-value", "disabled", "color", "error", "size", "success", "class"]));
|
|
1519
1520
|
}
|
|
1520
|
-
}), lt = /* @__PURE__ */
|
|
1521
|
+
}), lt = /* @__PURE__ */ ne(tt, [["__scopeId", "data-v-ebe8f08f"]]), at = /* @__PURE__ */ se({
|
|
1521
1522
|
name: "MazPhoneNumberInput",
|
|
1522
1523
|
inheritAttrs: !1,
|
|
1523
1524
|
__name: "MazPhoneNumberInput",
|
|
@@ -1769,10 +1770,10 @@ const tt = /* @__PURE__ */ ne({
|
|
|
1769
1770
|
);
|
|
1770
1771
|
};
|
|
1771
1772
|
}
|
|
1772
|
-
}), it = /* @__PURE__ */
|
|
1773
|
+
}), it = /* @__PURE__ */ ne(at, [["__scopeId", "data-v-420d6d4a"]]);
|
|
1773
1774
|
export {
|
|
1774
1775
|
it as M,
|
|
1775
|
-
|
|
1776
|
+
ne as _,
|
|
1776
1777
|
Me as i,
|
|
1777
1778
|
Ae as u
|
|
1778
1779
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { computed as f, defineComponent as Ie, useCssVars as Ce, defineAsyncComponent as T, ref as b, onBeforeMount as Le, nextTick as W, withDirectives as we, openBlock as g, createElementBlock as
|
|
1
|
+
import { computed as f, defineComponent as Ie, useCssVars as Ce, defineAsyncComponent as T, ref as b, onBeforeMount as Le, nextTick as W, withDirectives as we, openBlock as g, createElementBlock as A, normalizeClass as q, normalizeStyle as j, createVNode as $, mergeProps as Me, unref as I, withModifiers as M, withCtx as ne, createElementVNode as N, Transition as Ee, createBlock as se, createCommentVNode as Q, renderSlot as G, Fragment as ie, renderList as Te, toDisplayString as ue } from "vue";
|
|
2
2
|
import { u as $e } from "./useInstanceUniqId-DW9jO1Sz.mjs";
|
|
3
|
-
import re from "./MazInput-
|
|
4
|
-
import { _ as Ne } from "./MazTable-
|
|
3
|
+
import re from "./MazInput-eOtg1L9F.mjs";
|
|
4
|
+
import { _ as Ne } from "./MazTable-BKdEx63E.mjs";
|
|
5
5
|
import '../assets/MazSelect.css';const Oe = {
|
|
6
6
|
removeAccents: !0,
|
|
7
7
|
caseSensitive: !1,
|
|
@@ -180,14 +180,14 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
180
180
|
emits: ["close", "open", "blur", "focus", "change", "input", "update:model-value", "selected-option"],
|
|
181
181
|
setup(r, { expose: c, emit: s }) {
|
|
182
182
|
Ce((e) => ({
|
|
183
|
-
|
|
184
|
-
"
|
|
185
|
-
|
|
183
|
+
fba4bd7a: ve.value,
|
|
184
|
+
"2796b77c": fe.value,
|
|
185
|
+
d1bcc1ac: me.value
|
|
186
186
|
}));
|
|
187
|
-
const t = r, n = s, i = T(() => import("./MazCheckbox-
|
|
187
|
+
const t = r, n = s, i = T(() => import("./MazCheckbox-BTl370Qq.mjs")), m = T(() => import("./magnifying-glass--nBiyXot.mjs")), V = T(() => import("./chevron-down-BkvtON3b.mjs")), x = T(() => import("./no-symbol-CIgKzsrB.mjs"));
|
|
188
188
|
c({
|
|
189
189
|
/** Method to open the option list */
|
|
190
|
-
openList:
|
|
190
|
+
openList: w,
|
|
191
191
|
/** Method to close the option list */
|
|
192
192
|
closeList: k
|
|
193
193
|
});
|
|
@@ -218,7 +218,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
218
218
|
[t.optionInputValueKey]: e[t.optionInputValueKey]
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
|
-
const
|
|
221
|
+
const C = f(() => {
|
|
222
222
|
var o;
|
|
223
223
|
const e = [];
|
|
224
224
|
if (!((o = t.options) != null && o.length))
|
|
@@ -234,7 +234,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
234
234
|
}), E = f(
|
|
235
235
|
() => {
|
|
236
236
|
var e;
|
|
237
|
-
return ((e =
|
|
237
|
+
return ((e = C.value) == null ? void 0 : e.filter((o) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(o[t.optionValueKey]) && !K(o[t.optionValueKey]) : !1 : t.modelValue === o[t.optionValueKey] && !K(o[t.optionValueKey]))) ?? [];
|
|
238
238
|
}
|
|
239
239
|
);
|
|
240
240
|
Le(() => {
|
|
@@ -257,27 +257,27 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
257
257
|
return t.modelValue.map(
|
|
258
258
|
(a) => {
|
|
259
259
|
var l, u;
|
|
260
|
-
return (u = (l =
|
|
260
|
+
return (u = (l = C.value) == null ? void 0 : l.find((d) => d[t.optionValueKey] === a)) == null ? void 0 : u[t.optionInputValueKey];
|
|
261
261
|
}
|
|
262
262
|
).join(", ");
|
|
263
|
-
const e = (o =
|
|
263
|
+
const e = (o = C.value) == null ? void 0 : o.find(
|
|
264
264
|
(a) => a[t.optionValueKey] === t.modelValue
|
|
265
265
|
);
|
|
266
266
|
return K(t.modelValue) || e == null ? void 0 : e[t.optionInputValueKey];
|
|
267
267
|
}), be = f(
|
|
268
268
|
() => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
269
|
-
),
|
|
269
|
+
), L = b(""), S = b("");
|
|
270
270
|
function P(e, o) {
|
|
271
271
|
return o && e && O(e).includes(O(o));
|
|
272
272
|
}
|
|
273
273
|
function te(e) {
|
|
274
274
|
var o;
|
|
275
|
-
return e ? (o =
|
|
275
|
+
return e ? (o = C.value) == null ? void 0 : o.filter((a) => {
|
|
276
276
|
const l = a[t.optionLabelKey], u = a[t.optionValueKey], d = a[t.optionInputValueKey], v = t.searchThreshold;
|
|
277
277
|
return P(l, e) || P(d, e) || P(u, e) || typeof l == "string" && Z(l, e, v).isMatching.value || typeof d == "string" && Z(d, e, v).isMatching.value || typeof u == "string" && Z(u, e, v).isMatching.value;
|
|
278
|
-
}) :
|
|
278
|
+
}) : C.value;
|
|
279
279
|
}
|
|
280
|
-
const y = f(() => te(
|
|
280
|
+
const y = f(() => te(L.value));
|
|
281
281
|
async function k(e) {
|
|
282
282
|
var a, l;
|
|
283
283
|
if (!h.value)
|
|
@@ -289,7 +289,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
289
289
|
return e == null ? void 0 : e.preventDefault();
|
|
290
290
|
await W(), z.value = !1, p.value = 0, n("close", e);
|
|
291
291
|
}
|
|
292
|
-
async function
|
|
292
|
+
async function w(e) {
|
|
293
293
|
t.disabled || h.value || (e == null || e.preventDefault(), z.value = !0, await F(), n("focus", e), n("open", z.value));
|
|
294
294
|
}
|
|
295
295
|
function oe() {
|
|
@@ -305,7 +305,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
305
305
|
}
|
|
306
306
|
function ze(e) {
|
|
307
307
|
var o, a;
|
|
308
|
-
|
|
308
|
+
L.value = e, (a = ((o = _.value) == null ? void 0 : o.$el).querySelector("input")) == null || a.focus();
|
|
309
309
|
}
|
|
310
310
|
function Ke(e) {
|
|
311
311
|
var a;
|
|
@@ -319,7 +319,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
319
319
|
}
|
|
320
320
|
function Se(e) {
|
|
321
321
|
const o = e.key;
|
|
322
|
-
/^[\dA-Za-z\u0400-\u04FF]$/.test(o) ? (e.preventDefault(),
|
|
322
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(o) ? (e.preventDefault(), w(e), t.search ? ze(o) : Ke(o)) : le(e);
|
|
323
323
|
}
|
|
324
324
|
function le(e, o = !0) {
|
|
325
325
|
const a = e.code, l = ["ArrowUp", "ArrowDown"].includes(a), u = (o ? ["Enter", "Space"] : ["Enter"]).includes(a), d = a === "Escape" && h.value;
|
|
@@ -329,14 +329,15 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
329
329
|
var u;
|
|
330
330
|
e.preventDefault();
|
|
331
331
|
const a = e.code;
|
|
332
|
-
h.value ||
|
|
332
|
+
h.value || w(e);
|
|
333
333
|
const l = (u = y.value) == null ? void 0 : u.length;
|
|
334
334
|
l && (typeof o == "number" ? o === l - 1 && a === "ArrowDown" ? p.value = 0 : o === 0 && a === "ArrowUp" ? p.value = l - 1 : p.value = a === "ArrowDown" ? o + 1 : o - 1 : p.value = a === "ArrowDown" ? 0 : l - 1, F(p.value));
|
|
335
335
|
}
|
|
336
336
|
function Ae(e, o) {
|
|
337
337
|
var l, u, d;
|
|
338
|
-
if (
|
|
339
|
-
return
|
|
338
|
+
if (!h.value)
|
|
339
|
+
return;
|
|
340
|
+
e.preventDefault();
|
|
340
341
|
const a = o ? ((l = y.value) == null ? void 0 : l[o]) ?? ((u = y.value) == null ? void 0 : u[0]) : (d = y.value) == null ? void 0 : d[0];
|
|
341
342
|
K(a) || ae(a);
|
|
342
343
|
}
|
|
@@ -363,7 +364,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
363
364
|
}
|
|
364
365
|
function ae(e, o = !0) {
|
|
365
366
|
var d;
|
|
366
|
-
o && !t.multiple && W(() => k()),
|
|
367
|
+
o && !t.multiple && W(() => k()), L.value = "";
|
|
367
368
|
const a = (d = E.value) == null ? void 0 : d.some(
|
|
368
369
|
(v) => v[t.optionValueKey] === e[t.optionValueKey]
|
|
369
370
|
);
|
|
@@ -376,7 +377,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
376
377
|
}
|
|
377
378
|
return (e, o) => {
|
|
378
379
|
var a;
|
|
379
|
-
return we((g(),
|
|
380
|
+
return we((g(), A(
|
|
380
381
|
"div",
|
|
381
382
|
{
|
|
382
383
|
ref_key: "mazSelectElement",
|
|
@@ -390,7 +391,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
390
391
|
},
|
|
391
392
|
[
|
|
392
393
|
$(re, Me({
|
|
393
|
-
id:
|
|
394
|
+
id: I(ye),
|
|
394
395
|
ref_key: "mazInputComponent",
|
|
395
396
|
ref: D,
|
|
396
397
|
class: "m-select-input"
|
|
@@ -403,9 +404,9 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
403
404
|
block: "",
|
|
404
405
|
autocomplete: e.autocomplete,
|
|
405
406
|
disabled: e.disabled,
|
|
406
|
-
onFocus: M(
|
|
407
|
+
onFocus: M(w, ["prevent", "stop"]),
|
|
407
408
|
onBlur: M(k, ["prevent", "stop"]),
|
|
408
|
-
onClick: M(
|
|
409
|
+
onClick: M(w, ["prevent", "stop"]),
|
|
409
410
|
onChange: o[0] || (o[0] = (l) => n("change", l)),
|
|
410
411
|
onInput: o[1] || (o[1] = (l) => n("input", l)),
|
|
411
412
|
onKeydown: Se
|
|
@@ -418,7 +419,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
418
419
|
"aria-label": `${h.value ? "collapse" : "expand"} list of options`,
|
|
419
420
|
onClick: M(Ve, ["stop"])
|
|
420
421
|
}, [
|
|
421
|
-
$(
|
|
422
|
+
$(I(V), { class: "m-select-chevron maz-text-xl" })
|
|
422
423
|
], 8, Ue)
|
|
423
424
|
]),
|
|
424
425
|
_: 1
|
|
@@ -426,7 +427,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
426
427
|
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "autocomplete", "disabled"]),
|
|
427
428
|
$(Ee, { name: be.value }, {
|
|
428
429
|
default: ne(() => [
|
|
429
|
-
h.value ? (g(),
|
|
430
|
+
h.value ? (g(), A(
|
|
430
431
|
"div",
|
|
431
432
|
{
|
|
432
433
|
key: 0,
|
|
@@ -450,9 +451,9 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
450
451
|
key: 0,
|
|
451
452
|
ref_key: "searchInputComponent",
|
|
452
453
|
ref: _,
|
|
453
|
-
modelValue:
|
|
454
|
+
modelValue: L.value,
|
|
454
455
|
"onUpdate:modelValue": [
|
|
455
|
-
o[2] || (o[2] = (l) =>
|
|
456
|
+
o[2] || (o[2] = (l) => L.value = l),
|
|
456
457
|
o[4] || (o[4] = (l) => p.value = 0)
|
|
457
458
|
],
|
|
458
459
|
size: "sm",
|
|
@@ -463,18 +464,18 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
463
464
|
autocomplete: "off",
|
|
464
465
|
tabindex: "-1",
|
|
465
466
|
class: "m-select-list__search-input maz-flex-none",
|
|
466
|
-
"left-icon":
|
|
467
|
+
"left-icon": I(m),
|
|
467
468
|
onKeydown: o[3] || (o[3] = (l) => le(l, !1))
|
|
468
469
|
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : Q("v-if", !0),
|
|
469
470
|
!y.value || y.value.length <= 0 ? G(e.$slots, "no-results", { key: 1 }, () => [
|
|
470
471
|
N("span", We, [
|
|
471
|
-
$(
|
|
472
|
+
$(I(x), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
472
473
|
])
|
|
473
|
-
], !0) : (g(),
|
|
474
|
-
(g(!0),
|
|
474
|
+
], !0) : (g(), A("div", qe, [
|
|
475
|
+
(g(!0), A(
|
|
475
476
|
ie,
|
|
476
477
|
null,
|
|
477
|
-
Te(y.value, (l, u) => (g(),
|
|
478
|
+
Te(y.value, (l, u) => (g(), A(
|
|
478
479
|
ie,
|
|
479
480
|
{ key: u },
|
|
480
481
|
[
|
|
@@ -489,7 +490,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
489
490
|
1
|
|
490
491
|
/* TEXT */
|
|
491
492
|
)
|
|
492
|
-
], !0) : (g(),
|
|
493
|
+
], !0) : (g(), A("button", {
|
|
493
494
|
key: 1,
|
|
494
495
|
tabindex: "-1",
|
|
495
496
|
type: "button",
|
|
@@ -503,7 +504,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
503
504
|
style: j(e.itemHeight ? { height: `${e.itemHeight}px` } : void 0),
|
|
504
505
|
onClick: M((d) => ae(l), ["prevent", "stop"])
|
|
505
506
|
}, [
|
|
506
|
-
e.multiple ? (g(), se(
|
|
507
|
+
e.multiple ? (g(), se(I(i), {
|
|
507
508
|
key: 0,
|
|
508
509
|
tabindex: "-1",
|
|
509
510
|
"model-value": H(l),
|
|
@@ -543,14 +544,14 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
543
544
|
6
|
|
544
545
|
/* CLASS, STYLE */
|
|
545
546
|
)), [
|
|
546
|
-
[
|
|
547
|
+
[I(Pe), {
|
|
547
548
|
exclude: (a = e.excludeSelectors) != null && a.length ? e.excludeSelectors : [],
|
|
548
549
|
handler: k
|
|
549
550
|
}]
|
|
550
551
|
]);
|
|
551
552
|
};
|
|
552
553
|
}
|
|
553
|
-
}), Ye = /* @__PURE__ */ Ne(Ge, [["__scopeId", "data-v-
|
|
554
|
+
}), Ye = /* @__PURE__ */ Ne(Ge, [["__scopeId", "data-v-3b483b12"]]);
|
|
554
555
|
export {
|
|
555
556
|
Ye as default
|
|
556
557
|
};
|