maz-ui 3.37.0 → 3.37.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/MazCheckbox.d.ts +4 -0
- package/components/MazCheckbox.mjs +31 -24
- package/components/MazInput.d.ts +2 -0
- package/components/MazInput.mjs +1 -1
- package/components/MazInputNumber.d.ts +2 -0
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.d.ts +8 -0
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.d.ts +2 -0
- package/components/MazInputTags.mjs +1 -1
- package/components/MazPhoneNumberInput.d.ts +2 -0
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.d.ts +2 -0
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.d.ts +9 -0
- package/components/MazRadio.mjs +44 -37
- package/components/MazSelect.d.ts +2 -0
- package/components/MazSelect.mjs +1 -1
- package/components/MazTable.mjs +1 -1
- package/components/MazTextarea.mjs +1 -1
- package/components/assets/MazCheckbox.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazRadio.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTextarea.css +1 -1
- package/components/chunks/{MazBtn-C3z_znl5.mjs → MazBtn-Bo51KtKY.mjs} +2 -2
- package/components/chunks/{MazBtn-CuYCQCM2.mjs → MazBtn-CDQAW3fg.mjs} +2 -2
- package/components/chunks/MazBtn-D-Axz-X0.mjs +151 -0
- package/components/chunks/{MazBtn-D7b2VFGB.mjs → MazBtn-Koayc6g_.mjs} +2 -2
- package/components/chunks/{MazBtn-CS2F1-mC.mjs → MazBtn-pLRsSxug.mjs} +2 -2
- package/components/chunks/{MazCheckbox-BTM3Xpxz.mjs → MazCheckbox-CXVe5vda.mjs} +30 -23
- package/components/chunks/{MazCheckbox-COTppi08.mjs → MazCheckbox-DBlQwP82.mjs} +30 -23
- package/components/chunks/{MazIcon-Bspx_Ojq.mjs → MazIcon-BTsi1M-S.mjs} +1 -1
- package/components/chunks/{MazInput-C1r0b8BB.mjs → MazInput-Caas-0Nk.mjs} +19 -17
- package/components/chunks/{MazInputNumber-DJWxTvJ0.mjs → MazInputNumber-CnoCQQzg.mjs} +85 -81
- package/components/chunks/{MazInputPrice-CmX_rC0L.mjs → MazInputPrice---5nCUKm.mjs} +57 -53
- package/components/chunks/{MazInputTags-pm_5HtHM.mjs → MazInputTags-CipoVBP2.mjs} +83 -79
- package/components/chunks/{MazPhoneNumberInput-CVz5eTvG.mjs → MazPhoneNumberInput-CsX6Kqob.mjs} +402 -395
- package/components/chunks/{MazPicker-DP1zd8tt.mjs → MazPicker-CfhI75aw.mjs} +67 -62
- package/components/chunks/{MazPickerCalendar-qjcDNw86.mjs → MazPickerCalendar-DnkNE-Am.mjs} +3 -3
- package/components/chunks/{MazPickerHeader-CozeYkFf.mjs → MazPickerHeader-Vt86yzXS.mjs} +1 -1
- package/components/chunks/{MazPickerMonthSwitcher-aaUELZpE.mjs → MazPickerMonthSwitcher-zfKhsjW1.mjs} +2 -2
- package/components/chunks/{MazPickerShortcuts-ppox8lXf.mjs → MazPickerShortcuts-DUIKfOO8.mjs} +2 -2
- package/components/chunks/{MazPickerTime-DmpypIWr.mjs → MazPickerTime-B2znRxr2.mjs} +2 -2
- package/components/chunks/{MazPickerYearSwitcher-BNBvipzs.mjs → MazPickerYearSwitcher-CB339kof.mjs} +3 -3
- package/components/chunks/{MazSelect-DGEof7R3.mjs → MazSelect-DZeXglR8.mjs} +117 -109
- package/components/chunks/{MazSpinner-CTdeHHNH.mjs → MazSpinner-BAhgxOgg.mjs} +1 -1
- package/components/chunks/{MazSpinner-DmFFdtxB.mjs → MazSpinner-CJaSrYbQ.mjs} +1 -1
- package/components/chunks/{MazSpinner-KKcK5-QF.mjs → MazSpinner-CORsBFCP.mjs} +1 -1
- package/components/chunks/{MazSpinner-DTZHIIMh.mjs → MazSpinner-CVBVegaS.mjs} +1 -1
- package/components/chunks/MazSpinner-CkdjTE0y.mjs +38 -0
- package/components/chunks/{MazSpinner-DZTqt2Yn.mjs → MazSpinner-DECa8Pby.mjs} +1 -1
- package/components/chunks/{MazSpinner-DUVEeU4h.mjs → MazSpinner-Dq4o-_GM.mjs} +1 -1
- package/components/chunks/{MazSpinner-CiPbsWOG.mjs → MazSpinner-DqXjnLKa.mjs} +1 -1
- package/components/chunks/{MazTable-BhDfeDU1.mjs → MazTable-DrFqDO-J.mjs} +214 -199
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazCheckbox.vue.d.ts +4 -0
- package/types/components/MazInput.vue.d.ts +2 -0
- package/types/components/MazInputNumber.vue.d.ts +2 -0
- package/types/components/MazInputPrice.vue.d.ts +8 -0
- package/types/components/MazInputTags.vue.d.ts +2 -0
- package/types/components/MazPhoneNumberInput.vue.d.ts +2 -0
- package/types/components/MazPicker.vue.d.ts +2 -0
- package/types/components/MazRadio.vue.d.ts +9 -0
- package/types/components/MazSelect.vue.d.ts +2 -0
- package/components/chunks/MazBtn-OUDBhJKd.mjs +0 -151
- package/components/chunks/MazSpinner-yPD_Biya.mjs +0 -38
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assets/MazSelect.css';
|
|
2
|
-
import { getCurrentInstance as De, computed as c, defineComponent as be, defineAsyncComponent as
|
|
2
|
+
import { getCurrentInstance as De, computed as c, defineComponent as be, defineAsyncComponent as $, ref as V, onMounted as Te, useSlots as Ne, openBlock as v, createElementBlock as w, normalizeClass as H, normalizeStyle as X, createElementVNode as T, createCommentVNode as h, renderSlot as U, createBlock as C, unref as g, resolveDynamicComponent as me, withDirectives as ge, mergeProps as ze, toHandlers as Ee, vModelDynamic as Pe, createTextVNode as Fe, toDisplayString as ue, withModifiers as F, withCtx as x, createVNode as O, nextTick as Y, useCssVars as Oe, onBeforeMount as He, Transition as Ue, Fragment as ve, renderList as qe } from "vue";
|
|
3
3
|
function Qe(i, r) {
|
|
4
4
|
let u;
|
|
5
5
|
return function(...p) {
|
|
@@ -8,7 +8,7 @@ function Qe(i, r) {
|
|
|
8
8
|
}, r);
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const ke = ({
|
|
12
12
|
componentName: i,
|
|
13
13
|
providedId: r
|
|
14
14
|
}) => {
|
|
@@ -53,11 +53,12 @@ const Ve = ({
|
|
|
53
53
|
borderActive: { type: Boolean, default: !1 },
|
|
54
54
|
leftIcon: { default: void 0 },
|
|
55
55
|
rightIcon: { default: void 0 },
|
|
56
|
-
roundedSize: { default: void 0 }
|
|
56
|
+
roundedSize: { default: void 0 },
|
|
57
|
+
block: { type: Boolean }
|
|
57
58
|
},
|
|
58
59
|
emits: ["update:model-value", "focus", "blur", "click", "change"],
|
|
59
60
|
setup(i, { emit: r }) {
|
|
60
|
-
const u =
|
|
61
|
+
const u = $(() => import("./MazBtn-Bo51KtKY.mjs")), p = $(() => import("./MazIcon-Cxrv3_OK.mjs")), y = $(() => import("./eye-slash-tjfxO0LK.mjs")), d = $(() => import("./eye-DqO_Jx56.mjs")), t = $(() => import("./check-7UA4j2f2.mjs")), s = i, k = r, f = V(!1), K = V(!1), W = V(), ee = ke({
|
|
61
62
|
componentName: "MazInput",
|
|
62
63
|
providedId: s.id
|
|
63
64
|
});
|
|
@@ -107,7 +108,7 @@ const Ve = ({
|
|
|
107
108
|
set: (o) => {
|
|
108
109
|
if (s.debounce)
|
|
109
110
|
return E(o);
|
|
110
|
-
|
|
111
|
+
k("update:model-value", o);
|
|
111
112
|
}
|
|
112
113
|
}), Z = c(() => (!!s.label || !!s.hint) && (K.value || !!M.value || !!s.placeholder || ["date", "month", "week"].includes(s.type))), J = c(() => !!s.label || !!s.hint);
|
|
113
114
|
function L() {
|
|
@@ -117,13 +118,13 @@ const Ve = ({
|
|
|
117
118
|
return !!N["left-icon"] || !!s.leftIcon;
|
|
118
119
|
}
|
|
119
120
|
function le(o) {
|
|
120
|
-
|
|
121
|
+
k("focus", o), K.value = !0;
|
|
121
122
|
}
|
|
122
|
-
function
|
|
123
|
-
|
|
123
|
+
function ne(o) {
|
|
124
|
+
k("blur", o), K.value = !1;
|
|
124
125
|
}
|
|
125
126
|
function D(o) {
|
|
126
|
-
return
|
|
127
|
+
return k("change", o);
|
|
127
128
|
}
|
|
128
129
|
return (o, z) => (v(), w(
|
|
129
130
|
"div",
|
|
@@ -136,7 +137,8 @@ const Ve = ({
|
|
|
136
137
|
"--is-disabled": o.disabled,
|
|
137
138
|
"--is-readonly": o.readonly,
|
|
138
139
|
"--has-z-2": o.error || o.warning || o.success,
|
|
139
|
-
"--has-state": o.error || o.warning || o.success
|
|
140
|
+
"--has-state": o.error || o.warning || o.success,
|
|
141
|
+
"--block": o.block
|
|
140
142
|
},
|
|
141
143
|
s.class,
|
|
142
144
|
`--${o.color}`,
|
|
@@ -160,11 +162,11 @@ const Ve = ({
|
|
|
160
162
|
@slot left-icon - The icon to display on the left of the input
|
|
161
163
|
`),
|
|
162
164
|
o.$slots["left-icon"] || o.leftIcon ? U(o.$slots, "left-icon", { key: 0 }, () => [
|
|
163
|
-
typeof o.leftIcon == "string" ? (v(),
|
|
165
|
+
typeof o.leftIcon == "string" ? (v(), C(g(p), {
|
|
164
166
|
key: 0,
|
|
165
167
|
name: o.leftIcon,
|
|
166
168
|
class: "maz-text-xl maz-text-muted"
|
|
167
|
-
}, null, 8, ["name"])) : o.leftIcon ? (v(),
|
|
169
|
+
}, null, 8, ["name"])) : o.leftIcon ? (v(), C(me(o.leftIcon), {
|
|
168
170
|
key: 1,
|
|
169
171
|
class: "maz-text-xl maz-text-muted"
|
|
170
172
|
})) : h("v-if", !0)
|
|
@@ -187,7 +189,7 @@ const Ve = ({
|
|
|
187
189
|
required: o.required,
|
|
188
190
|
class: "m-input-input"
|
|
189
191
|
}, Ee({
|
|
190
|
-
blur:
|
|
192
|
+
blur: ne,
|
|
191
193
|
focus: le,
|
|
192
194
|
change: D
|
|
193
195
|
}, !0), {
|
|
@@ -225,16 +227,16 @@ const Ve = ({
|
|
|
225
227
|
@slot right-icon - The icon to display on the right of the input
|
|
226
228
|
`),
|
|
227
229
|
o.$slots["right-icon"] || o.rightIcon ? U(o.$slots, "right-icon", { key: 0 }, () => [
|
|
228
|
-
typeof o.rightIcon == "string" ? (v(),
|
|
230
|
+
typeof o.rightIcon == "string" ? (v(), C(g(p), {
|
|
229
231
|
key: 0,
|
|
230
232
|
name: o.rightIcon,
|
|
231
233
|
class: "maz-text-xl maz-text-muted"
|
|
232
|
-
}, null, 8, ["name"])) : o.rightIcon ? (v(),
|
|
234
|
+
}, null, 8, ["name"])) : o.rightIcon ? (v(), C(me(o.rightIcon), {
|
|
233
235
|
key: 1,
|
|
234
236
|
class: "maz-text-xl maz-text-muted"
|
|
235
237
|
})) : h("v-if", !0)
|
|
236
238
|
], !0) : h("v-if", !0),
|
|
237
|
-
j.value ? (v(),
|
|
239
|
+
j.value ? (v(), C(g(u), {
|
|
238
240
|
key: 1,
|
|
239
241
|
color: "transparent",
|
|
240
242
|
tabindex: "-1",
|
|
@@ -242,10 +244,10 @@ const Ve = ({
|
|
|
242
244
|
onClick: z[2] || (z[2] = F((A) => f.value = !f.value, ["stop"]))
|
|
243
245
|
}, {
|
|
244
246
|
default: x(() => [
|
|
245
|
-
f.value ? (v(),
|
|
247
|
+
f.value ? (v(), C(g(y), {
|
|
246
248
|
key: 0,
|
|
247
249
|
class: "maz-text-xl maz-text-muted"
|
|
248
|
-
})) : (v(),
|
|
250
|
+
})) : (v(), C(g(d), {
|
|
249
251
|
key: 1,
|
|
250
252
|
class: "maz-text-xl maz-text-muted"
|
|
251
253
|
}))
|
|
@@ -283,12 +285,12 @@ const Ve = ({
|
|
|
283
285
|
/* CLASS, STYLE */
|
|
284
286
|
));
|
|
285
287
|
}
|
|
286
|
-
}),
|
|
288
|
+
}), Ve = (i, r) => {
|
|
287
289
|
const u = i.__vccOpts || i;
|
|
288
290
|
for (const [p, y] of r)
|
|
289
291
|
u[p] = y;
|
|
290
292
|
return u;
|
|
291
|
-
}, ye = /* @__PURE__ */
|
|
293
|
+
}, ye = /* @__PURE__ */ Ve(Je, [["__scopeId", "data-v-78090be8"]]);
|
|
292
294
|
let ie = null;
|
|
293
295
|
function Xe(i, r) {
|
|
294
296
|
ie && clearTimeout(ie), ie = setTimeout(i, r);
|
|
@@ -352,19 +354,19 @@ function _e(i, r) {
|
|
|
352
354
|
function he(i) {
|
|
353
355
|
return i.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").toLowerCase();
|
|
354
356
|
}
|
|
355
|
-
function
|
|
357
|
+
function Be(i, r) {
|
|
356
358
|
const u = _e(i, r), p = Math.max(i.length, r.length);
|
|
357
359
|
return 1 - u / p;
|
|
358
360
|
}
|
|
359
361
|
function et(i, r, u = 0.75) {
|
|
360
|
-
return
|
|
362
|
+
return Be(i, r) >= u;
|
|
361
363
|
}
|
|
362
364
|
function re(i, r, u = 0.75) {
|
|
363
365
|
const p = c(
|
|
364
366
|
() => he(typeof i == "string" ? i : i.value)
|
|
365
367
|
), y = c(
|
|
366
368
|
() => he(typeof r == "string" ? r : r.value)
|
|
367
|
-
), d = c(() => typeof u == "number" ? u : u.value), t = c(() =>
|
|
369
|
+
), d = c(() => typeof u == "number" ? u : u.value), t = c(() => Be(p.value, y.value));
|
|
368
370
|
return {
|
|
369
371
|
isMatching: c(
|
|
370
372
|
() => et(p.value, y.value, d.value)
|
|
@@ -376,7 +378,7 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
376
378
|
key: 2,
|
|
377
379
|
class: "m-select-list__scroll-wrapper",
|
|
378
380
|
tabindex: "-1"
|
|
379
|
-
},
|
|
381
|
+
}, nt = { class: "m-select-list-optgroup" }, at = ["onClick"], st = /* @__PURE__ */ be({
|
|
380
382
|
inheritAttrs: !1,
|
|
381
383
|
__name: "MazSelect",
|
|
382
384
|
props: {
|
|
@@ -399,16 +401,17 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
399
401
|
open: { type: Boolean },
|
|
400
402
|
multiple: { type: Boolean },
|
|
401
403
|
required: { type: Boolean },
|
|
402
|
-
disabled: { type: Boolean }
|
|
404
|
+
disabled: { type: Boolean },
|
|
405
|
+
block: { type: Boolean }
|
|
403
406
|
},
|
|
404
407
|
emits: ["close", "open", "blur", "focus", "change", "update:model-value", "selected-option"],
|
|
405
408
|
setup(i, { emit: r }) {
|
|
406
409
|
Oe((e) => ({
|
|
407
|
-
"
|
|
408
|
-
|
|
409
|
-
"
|
|
410
|
+
"2223ba14": j.value,
|
|
411
|
+
"619dedd3": W.value,
|
|
412
|
+
"72c218fb": ee.value
|
|
410
413
|
}));
|
|
411
|
-
const u =
|
|
414
|
+
const u = $(() => import("./MazCheckbox-DBlQwP82.mjs")), p = $(() => import("./magnifying-glass-DZGg7953.mjs")), y = $(() => import("./chevron-down-CzMH-gFW.mjs")), d = $(() => import("./no-symbol-QAqP9IlR.mjs")), t = i, s = r, k = V(!1), f = V(), K = c(
|
|
412
415
|
() => ["black", "transparent", "white"].includes(t.color)
|
|
413
416
|
), W = c(
|
|
414
417
|
() => K.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
|
|
@@ -416,7 +419,7 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
416
419
|
() => K.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
|
|
417
420
|
), j = c(
|
|
418
421
|
() => K.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
|
|
419
|
-
), I = c(() =>
|
|
422
|
+
), I = c(() => k.value || t.open), te = ke({
|
|
420
423
|
componentName: "MazSelect",
|
|
421
424
|
providedId: t.id
|
|
422
425
|
});
|
|
@@ -440,13 +443,13 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
440
443
|
const e = [];
|
|
441
444
|
if (!((l = t.options) != null && l.length))
|
|
442
445
|
return [];
|
|
443
|
-
for (const
|
|
444
|
-
typeof
|
|
445
|
-
{ label:
|
|
446
|
-
...
|
|
447
|
-
(
|
|
446
|
+
for (const n of t.options)
|
|
447
|
+
typeof n == "string" || typeof n == "number" || typeof n == "boolean" ? e.push(N(n)) : "options" in n && Array.isArray(n.options) ? e.push(
|
|
448
|
+
{ label: n.label, isOptGroup: !0 },
|
|
449
|
+
...n.options.map(
|
|
450
|
+
(a) => typeof a == "string" || typeof a == "number" || typeof a == "boolean" ? N(a) : G(a)
|
|
448
451
|
)
|
|
449
|
-
) : e.push(G(
|
|
452
|
+
) : e.push(G(n));
|
|
450
453
|
return e;
|
|
451
454
|
}), E = c(
|
|
452
455
|
() => {
|
|
@@ -458,29 +461,29 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
458
461
|
var e;
|
|
459
462
|
(e = t.options) != null && e.length || console.warn("[maz-ui](MazSelect) you must provide options"), se();
|
|
460
463
|
});
|
|
461
|
-
const oe =
|
|
464
|
+
const oe = V(), S = V(), Z = V(), J = V(), L = (e) => e == null;
|
|
462
465
|
function q(e) {
|
|
463
|
-
var
|
|
464
|
-
return (((
|
|
465
|
-
(
|
|
466
|
+
var n;
|
|
467
|
+
return (((n = E.value) == null ? void 0 : n.some(
|
|
468
|
+
(a) => a[t.optionValueKey] === e[t.optionValueKey]
|
|
466
469
|
)) ?? !1) && !L(e[t.optionValueKey]);
|
|
467
470
|
}
|
|
468
471
|
const le = c(() => {
|
|
469
472
|
var l;
|
|
470
473
|
if (t.multiple && t.modelValue && Array.isArray(t.modelValue))
|
|
471
474
|
return t.modelValue.map(
|
|
472
|
-
(
|
|
473
|
-
var
|
|
474
|
-
return (m = (
|
|
475
|
+
(n) => {
|
|
476
|
+
var a, m;
|
|
477
|
+
return (m = (a = M.value) == null ? void 0 : a.find((b) => b[t.optionValueKey] === n)) == null ? void 0 : m[t.optionInputValueKey];
|
|
475
478
|
}
|
|
476
479
|
).join(", ");
|
|
477
480
|
const e = (l = M.value) == null ? void 0 : l.find(
|
|
478
|
-
(
|
|
481
|
+
(n) => n[t.optionValueKey] === t.modelValue
|
|
479
482
|
);
|
|
480
483
|
return L(t.modelValue) || e == null ? void 0 : e[t.optionInputValueKey];
|
|
481
|
-
}),
|
|
484
|
+
}), ne = c(
|
|
482
485
|
() => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
483
|
-
), D =
|
|
486
|
+
), D = V(""), o = V("");
|
|
484
487
|
function z(e) {
|
|
485
488
|
return e.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").replaceAll(/[^\dA-Za-z\u0400-\u04FF]/g, "");
|
|
486
489
|
}
|
|
@@ -489,93 +492,93 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
489
492
|
);
|
|
490
493
|
function de(e) {
|
|
491
494
|
var l;
|
|
492
|
-
return e ? (l = M.value) == null ? void 0 : l.filter((
|
|
493
|
-
const
|
|
494
|
-
return A(
|
|
495
|
+
return e ? (l = M.value) == null ? void 0 : l.filter((n) => {
|
|
496
|
+
const a = n[t.optionLabelKey], m = n[t.optionValueKey], b = n[t.optionInputValueKey];
|
|
497
|
+
return A(a, e) || A(b, e) || A(m, e) || typeof a == "string" && re(a, e).isMatching.value || typeof b == "string" && re(b, e).isMatching.value || typeof m == "string" && re(m, e).isMatching.value;
|
|
495
498
|
}) : M.value;
|
|
496
499
|
}
|
|
497
|
-
const
|
|
500
|
+
const B = c(() => de(D.value));
|
|
498
501
|
async function Q(e) {
|
|
499
502
|
var l;
|
|
500
503
|
if (I.value) {
|
|
501
504
|
if (e && ("relatedTarget" in e && ((l = oe.value) != null && l.contains(e.relatedTarget)) || e.type === "keydown"))
|
|
502
505
|
return e.preventDefault();
|
|
503
|
-
await Y(),
|
|
506
|
+
await Y(), k.value = !1, f.value = 0, s("close", e);
|
|
504
507
|
}
|
|
505
508
|
}
|
|
506
509
|
async function R(e) {
|
|
507
|
-
t.disabled || I.value || (e == null || e.preventDefault(),
|
|
510
|
+
t.disabled || I.value || (e == null || e.preventDefault(), k.value = !0, await ae(), s("focus", e), s("open", k.value));
|
|
508
511
|
}
|
|
509
512
|
function ce() {
|
|
510
513
|
var e, l;
|
|
511
514
|
(l = ((e = S.value) == null ? void 0 : e.$el).querySelector("input")) == null || l.focus();
|
|
512
515
|
}
|
|
513
|
-
function
|
|
514
|
-
|
|
516
|
+
function Ce(e) {
|
|
517
|
+
k.value ? Q(e) : ce();
|
|
515
518
|
}
|
|
516
|
-
function
|
|
517
|
-
var l,
|
|
518
|
-
D.value = e, (
|
|
519
|
+
function $e(e) {
|
|
520
|
+
var l, n;
|
|
521
|
+
D.value = e, (n = ((l = Z.value) == null ? void 0 : l.$el).querySelector("input")) == null || n.focus();
|
|
519
522
|
}
|
|
520
523
|
function Se(e) {
|
|
521
|
-
var
|
|
524
|
+
var n;
|
|
522
525
|
e === "Backspace" && o.value.length > 0 ? o.value = o.value.slice(0, -1) : o.value += e;
|
|
523
526
|
const l = de(o.value);
|
|
524
|
-
l != null && l.length && (f.value = (
|
|
525
|
-
(
|
|
526
|
-
), typeof f.value == "number" && f.value >= 0 &&
|
|
527
|
+
l != null && l.length && (f.value = (n = B.value) == null ? void 0 : n.findIndex(
|
|
528
|
+
(a) => a[t.optionValueKey] === l[0][t.optionValueKey]
|
|
529
|
+
), typeof f.value == "number" && f.value >= 0 && ae(f.value)), Xe(() => {
|
|
527
530
|
o.value = "";
|
|
528
531
|
}, 1e3);
|
|
529
532
|
}
|
|
530
533
|
const Le = (e) => {
|
|
531
534
|
const l = e.key;
|
|
532
|
-
/^[\dA-Za-z\u0400-\u04FF]$/.test(l) ? (e.preventDefault(), R(e), t.search ?
|
|
535
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(l) ? (e.preventDefault(), R(e), t.search ? $e(l) : Se(l)) : pe(e);
|
|
533
536
|
}, pe = (e) => {
|
|
534
|
-
const l = e.code,
|
|
535
|
-
|
|
537
|
+
const l = e.code, n = ["ArrowUp", "ArrowDown"].includes(l), a = ["Enter", "Space"].includes(l), m = l === "Escape" && I.value;
|
|
538
|
+
n ? Ae(e, f.value) : a ? Me(e, f.value) : m && Q();
|
|
536
539
|
}, Ae = (e, l) => {
|
|
537
540
|
var m;
|
|
538
541
|
e.preventDefault();
|
|
539
|
-
const
|
|
542
|
+
const n = e.code;
|
|
540
543
|
I.value || R(e);
|
|
541
|
-
const
|
|
542
|
-
|
|
544
|
+
const a = (m = B.value) == null ? void 0 : m.length;
|
|
545
|
+
a && (typeof l == "number" ? l === a - 1 && n === "ArrowDown" ? f.value = 0 : l === 0 && n === "ArrowUp" ? f.value = a - 1 : f.value = n === "ArrowDown" ? l + 1 : l - 1 : f.value = n === "ArrowDown" ? 0 : a - 1, ae(f.value));
|
|
543
546
|
}, Me = (e, l) => {
|
|
544
|
-
var
|
|
547
|
+
var a, m, b;
|
|
545
548
|
if (e.preventDefault(), !I.value)
|
|
546
549
|
return R(e);
|
|
547
|
-
const
|
|
548
|
-
L(
|
|
550
|
+
const n = l ? ((a = B.value) == null ? void 0 : a[l]) ?? ((m = B.value) == null ? void 0 : m[0]) : (b = B.value) == null ? void 0 : b[0];
|
|
551
|
+
L(n) || fe(n);
|
|
549
552
|
};
|
|
550
|
-
async function
|
|
551
|
-
var
|
|
553
|
+
async function ae(e) {
|
|
554
|
+
var n, a;
|
|
552
555
|
await Y(), typeof e != "number" && se();
|
|
553
556
|
const l = e ?? f.value;
|
|
554
|
-
typeof l == "number" && l >= 0 && ((
|
|
557
|
+
typeof l == "number" && l >= 0 && ((a = (n = J.value) == null ? void 0 : n.querySelectorAll(".m-select-list-item")[l]) == null || a.scrollIntoView({
|
|
555
558
|
behavior: "auto",
|
|
556
559
|
block: "center",
|
|
557
560
|
inline: "center"
|
|
558
561
|
}));
|
|
559
562
|
}
|
|
560
563
|
function se(e) {
|
|
561
|
-
var
|
|
562
|
-
const l = (
|
|
564
|
+
var n;
|
|
565
|
+
const l = (n = B.value) == null ? void 0 : n.findIndex((a) => {
|
|
563
566
|
var m, b;
|
|
564
|
-
return t.multiple && Array.isArray(t.modelValue) ? e ? e[t.optionValueKey] ===
|
|
567
|
+
return t.multiple && Array.isArray(t.modelValue) ? e ? e[t.optionValueKey] === a[t.optionValueKey] : [...t.modelValue].reverse()[0] === a[t.optionValueKey] : ((b = (m = E.value) == null ? void 0 : m[0]) == null ? void 0 : b[t.optionValueKey]) === a[t.optionValueKey];
|
|
565
568
|
});
|
|
566
569
|
f.value = l && l >= 0 ? l : 0;
|
|
567
570
|
}
|
|
568
571
|
const fe = (e, l = !0) => {
|
|
569
572
|
var b;
|
|
570
573
|
l && !t.multiple && Y(() => Q()), D.value = "";
|
|
571
|
-
const
|
|
574
|
+
const n = (b = E.value) == null ? void 0 : b.some(
|
|
572
575
|
(P) => P[t.optionValueKey] === e[t.optionValueKey]
|
|
573
576
|
);
|
|
574
|
-
let
|
|
575
|
-
|
|
577
|
+
let a = E.value;
|
|
578
|
+
n && t.multiple ? a = a == null ? void 0 : a.filter(
|
|
576
579
|
(P) => P[t.optionValueKey] !== e[t.optionValueKey]
|
|
577
|
-
) : t.multiple ?
|
|
578
|
-
const m =
|
|
580
|
+
) : t.multiple ? a.push(e) : a = [e];
|
|
581
|
+
const m = a.map((P) => P[t.optionValueKey]);
|
|
579
582
|
s("update:model-value", t.multiple ? m : m[0]), s("selected-option", e), se(e), ce();
|
|
580
583
|
};
|
|
581
584
|
return (e, l) => ge((v(), w(
|
|
@@ -583,7 +586,11 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
583
586
|
{
|
|
584
587
|
ref_key: "mazSelectElement",
|
|
585
588
|
ref: oe,
|
|
586
|
-
class: H(["m-select", [
|
|
589
|
+
class: H(["m-select", [
|
|
590
|
+
{ "--is-open": I.value, "--disabled": e.disabled, "--block": e.block },
|
|
591
|
+
t.class,
|
|
592
|
+
`--${e.size}`
|
|
593
|
+
]]),
|
|
587
594
|
style: X(e.style)
|
|
588
595
|
},
|
|
589
596
|
[
|
|
@@ -594,16 +601,17 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
594
601
|
class: "m-select-input"
|
|
595
602
|
}, e.$attrs, {
|
|
596
603
|
required: e.required,
|
|
597
|
-
"border-active":
|
|
604
|
+
"border-active": k.value,
|
|
598
605
|
color: e.color,
|
|
599
606
|
"model-value": le.value,
|
|
600
607
|
autocomplete: "off",
|
|
601
608
|
size: e.size,
|
|
609
|
+
block: "",
|
|
602
610
|
disabled: e.disabled,
|
|
603
611
|
onFocus: F(R, ["prevent", "stop"]),
|
|
604
612
|
onClick: F(R, ["prevent", "stop"]),
|
|
605
613
|
onBlur: F(Q, ["prevent", "stop"]),
|
|
606
|
-
onChange: l[0] || (l[0] = (
|
|
614
|
+
onChange: l[0] || (l[0] = (n) => s("change", n)),
|
|
607
615
|
onKeydown: Le
|
|
608
616
|
}), {
|
|
609
617
|
"right-icon": x(() => [
|
|
@@ -612,7 +620,7 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
612
620
|
type: "button",
|
|
613
621
|
class: "m-select-input__toggle-button maz-custom",
|
|
614
622
|
"aria-label": `${I.value ? "collapse" : "expand"} list of options`,
|
|
615
|
-
onClick: F(
|
|
623
|
+
onClick: F(Ce, ["stop"])
|
|
616
624
|
}, [
|
|
617
625
|
O(g(y), { class: "m-select-chevron maz-text-xl" })
|
|
618
626
|
], 8, tt)
|
|
@@ -620,7 +628,7 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
620
628
|
_: 1
|
|
621
629
|
/* STABLE */
|
|
622
630
|
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "disabled"]),
|
|
623
|
-
O(Ue, { name:
|
|
631
|
+
O(Ue, { name: ne.value }, {
|
|
624
632
|
default: x(() => [
|
|
625
633
|
I.value ? (v(), w(
|
|
626
634
|
"div",
|
|
@@ -640,14 +648,14 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
640
648
|
})
|
|
641
649
|
},
|
|
642
650
|
[
|
|
643
|
-
e.search ? (v(),
|
|
651
|
+
e.search ? (v(), C(ye, {
|
|
644
652
|
key: 0,
|
|
645
653
|
ref_key: "searchInputComponent",
|
|
646
654
|
ref: Z,
|
|
647
655
|
modelValue: D.value,
|
|
648
656
|
"onUpdate:modelValue": [
|
|
649
|
-
l[1] || (l[1] = (
|
|
650
|
-
l[2] || (l[2] = (
|
|
657
|
+
l[1] || (l[1] = (n) => D.value = n),
|
|
658
|
+
l[2] || (l[2] = (n) => f.value = 0)
|
|
651
659
|
],
|
|
652
660
|
size: "sm",
|
|
653
661
|
color: e.color,
|
|
@@ -662,7 +670,7 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
662
670
|
h(`
|
|
663
671
|
@slot No results slot - Displayed when no results corresponding with search query
|
|
664
672
|
`),
|
|
665
|
-
!
|
|
673
|
+
!B.value || B.value.length <= 0 ? U(e.$slots, "no-results", { key: 1 }, () => [
|
|
666
674
|
T("span", ot, [
|
|
667
675
|
O(g(d), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
668
676
|
])
|
|
@@ -670,22 +678,22 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
670
678
|
(v(!0), w(
|
|
671
679
|
ve,
|
|
672
680
|
null,
|
|
673
|
-
qe(
|
|
681
|
+
qe(B.value, (n, a) => (v(), w(
|
|
674
682
|
ve,
|
|
675
|
-
{ key:
|
|
683
|
+
{ key: a },
|
|
676
684
|
[
|
|
677
685
|
h(`
|
|
678
686
|
@slot Custom optgroup label
|
|
679
687
|
@binding {String} label - the label of the optgroup
|
|
680
688
|
`),
|
|
681
|
-
|
|
689
|
+
n.label && n.isOptGroup ? U(e.$slots, "optgroup", {
|
|
682
690
|
key: 0,
|
|
683
|
-
label:
|
|
691
|
+
label: n.label
|
|
684
692
|
}, () => [
|
|
685
693
|
T(
|
|
686
694
|
"span",
|
|
687
|
-
|
|
688
|
-
ue(
|
|
695
|
+
nt,
|
|
696
|
+
ue(n.label),
|
|
689
697
|
1
|
|
690
698
|
/* TEXT */
|
|
691
699
|
)
|
|
@@ -695,18 +703,18 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
695
703
|
type: "button",
|
|
696
704
|
class: H(["m-select-list-item maz-custom maz-flex-none", [
|
|
697
705
|
{
|
|
698
|
-
"--is-keyboard-selected": f.value ===
|
|
699
|
-
"--is-selected": q(
|
|
700
|
-
"--is-none-value": L(
|
|
706
|
+
"--is-keyboard-selected": f.value === a,
|
|
707
|
+
"--is-selected": q(n),
|
|
708
|
+
"--is-none-value": L(n[e.optionValueKey])
|
|
701
709
|
}
|
|
702
710
|
]]),
|
|
703
711
|
style: X(e.itemHeight ? { height: `${e.itemHeight}px` } : void 0),
|
|
704
|
-
onClick: F((m) => fe(
|
|
712
|
+
onClick: F((m) => fe(n), ["prevent", "stop"])
|
|
705
713
|
}, [
|
|
706
|
-
e.multiple ? (v(),
|
|
714
|
+
e.multiple ? (v(), C(g(u), {
|
|
707
715
|
key: 0,
|
|
708
716
|
tabindex: "-1",
|
|
709
|
-
"model-value": q(
|
|
717
|
+
"model-value": q(n),
|
|
710
718
|
size: "sm",
|
|
711
719
|
color: e.color
|
|
712
720
|
}, null, 8, ["model-value", "color"])) : h("v-if", !0),
|
|
@@ -716,18 +724,18 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
716
724
|
@binding {Boolean} is-selected - if the option is selected
|
|
717
725
|
`),
|
|
718
726
|
U(e.$slots, "default", {
|
|
719
|
-
option:
|
|
720
|
-
isSelected: q(
|
|
727
|
+
option: n,
|
|
728
|
+
isSelected: q(n)
|
|
721
729
|
}, () => [
|
|
722
730
|
T(
|
|
723
731
|
"span",
|
|
724
732
|
null,
|
|
725
|
-
ue(
|
|
733
|
+
ue(n[e.optionLabelKey]),
|
|
726
734
|
1
|
|
727
735
|
/* TEXT */
|
|
728
736
|
)
|
|
729
737
|
], !0)
|
|
730
|
-
], 14,
|
|
738
|
+
], 14, at))
|
|
731
739
|
],
|
|
732
740
|
64
|
|
733
741
|
/* STABLE_FRAGMENT */
|
|
@@ -751,9 +759,9 @@ const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
|
751
759
|
[g(xe), Q]
|
|
752
760
|
]);
|
|
753
761
|
}
|
|
754
|
-
}), rt = /* @__PURE__ */
|
|
762
|
+
}), rt = /* @__PURE__ */ Ve(st, [["__scopeId", "data-v-7825a2da"]]);
|
|
755
763
|
export {
|
|
756
764
|
rt as M,
|
|
757
|
-
|
|
758
|
-
|
|
765
|
+
Ve as _,
|
|
766
|
+
ke as u
|
|
759
767
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/MazSpinner.css';
|
|
2
2
|
import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as r, createElementVNode as i } from "vue";
|
|
3
|
-
import { _ as p } from "./MazPhoneNumberInput-
|
|
3
|
+
import { _ as p } from "./MazPhoneNumberInput-CsX6Kqob.mjs";
|
|
4
4
|
const a = (e) => (s("data-v-c67298ec"), e = e(), r(), e), d = ["width", "height"], l = /* @__PURE__ */ a(() => /* @__PURE__ */ i(
|
|
5
5
|
"path",
|
|
6
6
|
{ d: "M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/MazSpinner.css';
|
|
2
2
|
import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as r, createElementVNode as i } from "vue";
|
|
3
|
-
import { _ as p } from "./
|
|
3
|
+
import { _ as p } from "./MazTable-DrFqDO-J.mjs";
|
|
4
4
|
const a = (e) => (s("data-v-c67298ec"), e = e(), r(), e), d = ["width", "height"], l = /* @__PURE__ */ a(() => /* @__PURE__ */ i(
|
|
5
5
|
"path",
|
|
6
6
|
{ d: "M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/MazSpinner.css';
|
|
2
2
|
import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as r, createElementVNode as i } from "vue";
|
|
3
|
-
import { _ as p } from "./
|
|
3
|
+
import { _ as p } from "./MazPicker-CfhI75aw.mjs";
|
|
4
4
|
const a = (e) => (s("data-v-c67298ec"), e = e(), r(), e), d = ["width", "height"], l = /* @__PURE__ */ a(() => /* @__PURE__ */ i(
|
|
5
5
|
"path",
|
|
6
6
|
{ d: "M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/MazSpinner.css';
|
|
2
2
|
import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as r, createElementVNode as i } from "vue";
|
|
3
|
-
import { _ as p } from "./
|
|
3
|
+
import { _ as p } from "./MazInput-Caas-0Nk.mjs";
|
|
4
4
|
const a = (e) => (s("data-v-c67298ec"), e = e(), r(), e), d = ["width", "height"], l = /* @__PURE__ */ a(() => /* @__PURE__ */ i(
|
|
5
5
|
"path",
|
|
6
6
|
{ d: "M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" },
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import '../assets/MazSpinner.css';
|
|
2
|
+
import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as r, createElementVNode as i } from "vue";
|
|
3
|
+
import { _ as p } from "./MazInputPrice---5nCUKm.mjs";
|
|
4
|
+
const a = (e) => (s("data-v-c67298ec"), e = e(), r(), e), d = ["width", "height"], l = /* @__PURE__ */ a(() => /* @__PURE__ */ i(
|
|
5
|
+
"path",
|
|
6
|
+
{ d: "M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" },
|
|
7
|
+
null,
|
|
8
|
+
-1
|
|
9
|
+
/* HOISTED */
|
|
10
|
+
)), m = [
|
|
11
|
+
l
|
|
12
|
+
], h = /* @__PURE__ */ t({
|
|
13
|
+
__name: "MazSpinner",
|
|
14
|
+
props: {
|
|
15
|
+
size: { type: String, default: "2em" },
|
|
16
|
+
color: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "primary"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(e) {
|
|
22
|
+
return (_, u) => (o(), c("svg", {
|
|
23
|
+
width: e.size,
|
|
24
|
+
height: e.size,
|
|
25
|
+
version: "1.1",
|
|
26
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
27
|
+
x: "0px",
|
|
28
|
+
y: "0px",
|
|
29
|
+
viewBox: "0 0 50 50",
|
|
30
|
+
"xml:space": "preserve",
|
|
31
|
+
class: n(["m-spinner", `m-spinner--${e.color}`]),
|
|
32
|
+
style: { "enable-background": "new 0 0 50 50" }
|
|
33
|
+
}, m, 10, d));
|
|
34
|
+
}
|
|
35
|
+
}), f = /* @__PURE__ */ p(h, [["__scopeId", "data-v-c67298ec"]]);
|
|
36
|
+
export {
|
|
37
|
+
f as default
|
|
38
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/MazSpinner.css';
|
|
2
2
|
import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as r, createElementVNode as i } from "vue";
|
|
3
|
-
import { _ as p } from "./MazInputTags-
|
|
3
|
+
import { _ as p } from "./MazInputTags-CipoVBP2.mjs";
|
|
4
4
|
const a = (e) => (s("data-v-c67298ec"), e = e(), r(), e), d = ["width", "height"], l = /* @__PURE__ */ a(() => /* @__PURE__ */ i(
|
|
5
5
|
"path",
|
|
6
6
|
{ d: "M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" },
|