maz-ui 3.47.2-beta.6 → 3.47.2-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazAccordion.mjs +91 -98
- package/components/MazAnimatedCounter.mjs +26 -26
- package/components/MazCard.mjs +1 -1
- package/components/MazCardSpotlight.mjs +18 -22
- package/components/MazCheckbox.mjs +74 -70
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +48 -48
- package/components/MazExpandAnimation.mjs +22 -25
- package/components/MazGallery.mjs +1 -1
- package/components/MazInputCode.mjs +36 -39
- package/components/MazLoadingBar.mjs +31 -27
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.d.ts +2 -0
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.mjs +31 -36
- package/components/MazSelect.mjs +1 -1
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.mjs +20 -23
- package/components/MazTable.d.ts +6 -0
- package/components/MazTable.mjs +1 -1
- package/components/MazTableCell.d.ts +5 -1
- package/components/MazTableCell.mjs +22 -19
- package/components/MazTableRow.mjs +1 -1
- package/components/MazTableTitle.d.ts +5 -1
- package/components/MazTableTitle.mjs +16 -13
- package/components/MazTabsBar.mjs +1 -1
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazAnimatedCounter.css +1 -1
- package/components/assets/MazCardSpotlight.css +1 -1
- package/components/assets/MazCheckbox.css +1 -1
- package/components/assets/MazChecklist.css +1 -1
- package/components/assets/MazCircularProgressBar.css +1 -1
- package/components/assets/MazExpandAnimation.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInputCode.css +1 -1
- package/components/assets/MazLoadingBar.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/MazStepper.css +1 -1
- package/components/assets/MazSwitch.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTableCell.css +1 -1
- package/components/assets/MazTableRow.css +1 -1
- package/components/assets/MazTableTitle.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/chunks/{MazBadge-CqppWg2j.mjs → MazBadge-D-0XgPWR.mjs} +1 -1
- package/components/chunks/{MazBtn-BBb9-9O6.mjs → MazBtn-B0Q6Kw8H.mjs} +2 -2
- package/components/chunks/{MazBtn-CfUZ9QSO.mjs → MazBtn-DFLIzh6y.mjs} +2 -2
- package/components/chunks/{MazBtn-Lsac2Q0p.mjs → MazBtn-D_K6k6A7.mjs} +2 -2
- package/components/chunks/{MazBtn-DhEO9uvT.mjs → MazBtn-DnZ_pj-t.mjs} +2 -2
- package/components/chunks/{MazBtn-D7tI764y.mjs → MazBtn-DvfMuN3B.mjs} +2 -2
- package/components/chunks/{MazCard-CAPZoSqv.mjs → MazCard-BkcxQOWL.mjs} +1 -1
- package/components/chunks/{MazCheckbox-BI2um2gY.mjs → MazCheckbox-B9iBXhoG.mjs} +63 -60
- package/components/chunks/{MazCheckbox-DwAd7p8o.mjs → MazCheckbox-BHhDBSbJ.mjs} +63 -58
- package/components/chunks/{MazCheckbox-IhiWZ8D0.mjs → MazCheckbox-BcwWN7iD.mjs} +63 -59
- package/components/chunks/{MazChecklist-Bqd7qTO1.mjs → MazChecklist-DxtYuoEu.mjs} +116 -116
- package/components/chunks/MazExpandAnimation-CUgYZyTw.mjs +54 -0
- package/components/chunks/{MazGallery-CRY5X5zS.mjs → MazGallery-BfdKcDIu.mjs} +39 -42
- package/components/chunks/{MazGallery-CXQiXWFr.mjs → MazGallery-ndO4hRUh.mjs} +38 -41
- package/components/chunks/{MazIcon-D3TB52NM.mjs → MazIcon-DVTWgYB6.mjs} +1 -1
- package/components/chunks/{MazInput-rW-KBJGJ.mjs → MazInput-DnmjeD0Q.mjs} +2 -2
- package/components/chunks/{MazInput-ROgC-JLt.mjs → MazInput-SGx7gJ9r.mjs} +2 -2
- package/components/chunks/MazLoadingBar-CBNuhilE.mjs +36 -0
- package/components/chunks/{MazPhoneNumberInput-Bbr0zHPZ.mjs → MazPhoneNumberInput-rGR80IeJ.mjs} +91 -96
- package/components/chunks/{MazPicker-EMOuyWJy.mjs → MazPicker-CUpQ552W.mjs} +341 -321
- package/components/chunks/{MazPickerMonthSwitcher-DJGgb6BT.mjs → MazPickerMonthSwitcher-duzi8uZ8.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-Cg1uqryw.mjs → MazPickerShortcuts-Coq4ITAj.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-BLUXEs0G.mjs → MazPickerYearSwitcher-vUTntpYE.mjs} +1 -1
- package/components/chunks/{MazSelect-BUETsREx.mjs → MazSelect-DA1D4Aus.mjs} +85 -90
- package/components/chunks/{MazSelect-BDMOrVry.mjs → MazSelect-DpLBpopb.mjs} +40 -45
- package/components/chunks/{MazSpinner--fscjBdL.mjs → MazSpinner-Bbagpn0P.mjs} +1 -1
- package/components/chunks/{MazSpinner-RzOGVi6V.mjs → MazSpinner-Bi3tSdWr.mjs} +1 -1
- package/components/chunks/MazSpinner-Btv2qATX.mjs +34 -0
- package/components/chunks/MazSpinner-CR8HZnWn.mjs +34 -0
- package/components/chunks/{MazSpinner-C0PBSYpC.mjs → MazSpinner-DIPbNESr.mjs} +1 -1
- package/components/chunks/{MazSpinner-C-64WJje.mjs → MazSpinner-a80KrraB.mjs} +1 -1
- package/components/chunks/{MazSpinner-CEgSruvD.mjs → MazSpinner-v0FIBDiy.mjs} +1 -1
- package/components/chunks/MazStepper-DKPl3uIk.mjs +218 -0
- package/components/chunks/{MazTable-CWsaB02U.mjs → MazTable-DBiW_J2i.mjs} +104 -100
- package/components/chunks/MazTableCell-D10vPzyI.mjs +26 -0
- package/components/chunks/{MazTableRow-6KrQQQbm.mjs → MazTableRow-CSxkhwUM.mjs} +8 -8
- package/components/chunks/MazTableTitle-BdRR_MXI.mjs +26 -0
- package/components/chunks/{MazTabsBar-CM-w7V97.mjs → MazTabsBar-BVg2pxLA.mjs} +2 -2
- package/components/chunks/{MazTransitionExpand-BCgH8NZP.mjs → MazTransitionExpand-2Ft7atX1.mjs} +1 -1
- package/css/main.css +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/tailwindcss/variables/colors.ts +2 -0
- package/types/components/MazPicker.vue.d.ts +2 -0
- package/types/components/MazTable.vue.d.ts +6 -0
- package/types/components/MazTableCell.vue.d.ts +5 -1
- package/types/components/MazTableTitle.vue.d.ts +5 -1
- package/types/tailwindcss/variables/colors.d.ts +2 -0
- package/components/chunks/MazExpandAnimation-MDimlZGj.mjs +0 -57
- package/components/chunks/MazLoadingBar-D8a5KF29.mjs +0 -32
- package/components/chunks/MazSpinner-CMMBCwk2.mjs +0 -34
- package/components/chunks/MazSpinner-DebSlkVT.mjs +0 -34
- package/components/chunks/MazStepper-BREfkpUb.mjs +0 -213
- package/components/chunks/MazTableCell-CgiGF3bL.mjs +0 -23
- package/components/chunks/MazTableTitle-C8P3v8b6.mjs +0 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as g, computed as M, openBlock as l, createElementBlock as d, createElementVNode as m, createVNode as u, withModifiers as h, withCtx as p, unref as n, normalizeClass as f, Fragment as v, renderList as w, createBlock as x, createTextVNode as D, toDisplayString as S } from "vue";
|
|
2
|
-
import { d as C, c as s, a as c, M as k, i as z, _ as B } from "./MazPicker-
|
|
2
|
+
import { d as C, c as s, a as c, M as k, i as z, _ as B } from "./MazPicker-CUpQ552W.mjs";
|
|
3
3
|
import { X as q } from "./x-mark-wyoa-ywi.mjs";
|
|
4
4
|
import '../assets/MazPickerMonthSwitcher.css';const $ = { class: "maz-picker-month-switcher" }, N = { class: "maz-picker-month-switcher__header" }, V = /* @__PURE__ */ g({
|
|
5
5
|
__name: "MazPickerMonthSwitcher",
|
package/components/chunks/{MazPickerShortcuts-Cg1uqryw.mjs → MazPickerShortcuts-Coq4ITAj.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as h, ref as f, watch as n, openBlock as l, createElementBlock as d, Fragment as v, renderList as y, createBlock as _, normalizeClass as k, withModifiers as S, withCtx as b, createTextVNode as z, toDisplayString as B } from "vue";
|
|
2
|
-
import { M as g, _ as x } from "./MazPicker-
|
|
2
|
+
import { M as g, _ as x } from "./MazPicker-CUpQ552W.mjs";
|
|
3
3
|
import '../assets/MazPickerShortcuts.css';const C = { class: "maz-picker-shortcuts" }, M = /* @__PURE__ */ h({
|
|
4
4
|
__name: "MazPickerShortcuts",
|
|
5
5
|
props: {
|
package/components/chunks/{MazPickerYearSwitcher-BLUXEs0G.mjs → MazPickerYearSwitcher-vUTntpYE.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as C, ref as b, computed as w, openBlock as u, createElementBlock as _, createElementVNode as m, createVNode as s, withModifiers as l, withCtx as i, unref as o, Fragment as D, renderList as S, createBlock as Y, normalizeClass as M, createTextVNode as B, toDisplayString as q } from "vue";
|
|
2
|
-
import { d as c, a as I, M as d, C as y, i as z, _ as N } from "./MazPicker-
|
|
2
|
+
import { d as c, a as I, M as d, C as y, i as z, _ as N } from "./MazPicker-CUpQ552W.mjs";
|
|
3
3
|
import { X as V } from "./x-mark-wyoa-ywi.mjs";
|
|
4
4
|
import '../assets/MazPickerYearSwitcher.css';const E = { class: "maz-picker-year-switcher" }, L = { class: "maz-picker-year-switcher__header" }, P = { class: "maz-flex maz-space-x-2" }, T = { class: "maz-picker-year-switcher__main" }, X = /* @__PURE__ */ C({
|
|
5
5
|
__name: "MazPickerYearSwitcher",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computed as f, defineComponent as Ie,
|
|
2
|
-
import { u as
|
|
3
|
-
import re from "./MazInput-
|
|
4
|
-
import { _ as
|
|
5
|
-
import '../assets/MazSelect.css';const
|
|
1
|
+
import { computed as f, defineComponent as Ie, 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 Ce, unref as I, withModifiers as M, withCtx as ne, createElementVNode as N, Transition as Me, createBlock as ie, createCommentVNode as Q, renderSlot as G, Fragment as se, renderList as Ee, toDisplayString as ue } from "vue";
|
|
2
|
+
import { u as Te } from "./useInstanceUniqId-DW9jO1Sz.mjs";
|
|
3
|
+
import re from "./MazInput-DnmjeD0Q.mjs";
|
|
4
|
+
import { _ as $e } from "./MazTable-DBiW_J2i.mjs";
|
|
5
|
+
import '../assets/MazSelect.css';const Ne = {
|
|
6
6
|
removeAccents: !0,
|
|
7
7
|
caseSensitive: !1,
|
|
8
8
|
replaceSpaces: !0,
|
|
@@ -13,7 +13,7 @@ import '../assets/MazSelect.css';const Oe = {
|
|
|
13
13
|
customNormalizationForms: ["NFC", "NFKD"]
|
|
14
14
|
};
|
|
15
15
|
function O(r, c) {
|
|
16
|
-
const
|
|
16
|
+
const i = { ...Ne, ...c }, t = {
|
|
17
17
|
À: "A",
|
|
18
18
|
Á: "A",
|
|
19
19
|
Â: "A",
|
|
@@ -63,90 +63,90 @@ function O(r, c) {
|
|
|
63
63
|
ó: "o"
|
|
64
64
|
};
|
|
65
65
|
let n = r.toString();
|
|
66
|
-
if (
|
|
67
|
-
for (const
|
|
68
|
-
n = n.normalize(
|
|
66
|
+
if (i.trim && (n = n.trim()), i.normalizeSpaces && (n = n.replaceAll(/\s+/g, " ")), i.replaceSpaces && (n = n.replaceAll(" ", "-")), i.removeNumbers && (n = n.replaceAll(/\d/g, "")), i.removeAccents && (n = n.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g, (s) => t[s] || s), n = n.replaceAll(/[\u0300-\u036F]/g, "")), i.caseSensitive === !1 && (n = n.toLowerCase()), i.removeSpecialCharacters && (n = n.replaceAll(/[^\dA-Z-]/gi, "")), i.trim && (n = n.trim()), i.customNormalizationForms)
|
|
67
|
+
for (const s of i.customNormalizationForms)
|
|
68
|
+
n = n.normalize(s);
|
|
69
69
|
return n;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
const
|
|
73
|
-
for (let
|
|
74
|
-
n[
|
|
75
|
-
for (let
|
|
76
|
-
n[0][
|
|
77
|
-
for (let
|
|
71
|
+
function Oe(r, c) {
|
|
72
|
+
const i = r.length, t = c.length, n = [];
|
|
73
|
+
for (let s = 0; s <= i; s++)
|
|
74
|
+
n[s] = [s];
|
|
75
|
+
for (let s = 0; s <= t; s++)
|
|
76
|
+
n[0][s] = s;
|
|
77
|
+
for (let s = 1; s <= i; s++)
|
|
78
78
|
for (let m = 1; m <= t; m++) {
|
|
79
|
-
const V = r[
|
|
80
|
-
n[
|
|
81
|
-
n[
|
|
82
|
-
n[
|
|
83
|
-
n[
|
|
79
|
+
const V = r[s - 1] === c[m - 1] ? 0 : 1;
|
|
80
|
+
n[s][m] = Math.min(
|
|
81
|
+
n[s - 1][m] + 1,
|
|
82
|
+
n[s][m - 1] + 1,
|
|
83
|
+
n[s - 1][m - 1] + V
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
|
-
return n[
|
|
86
|
+
return n[i][t];
|
|
87
87
|
}
|
|
88
88
|
function ce(r, c) {
|
|
89
|
-
const
|
|
90
|
-
return 1 -
|
|
89
|
+
const i = Oe(r, c), t = Math.max(r.length, c.length);
|
|
90
|
+
return 1 - i / t;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
return ce(r, c) >=
|
|
92
|
+
function xe(r, c, i = 0.75) {
|
|
93
|
+
return ce(r, c) >= i;
|
|
94
94
|
}
|
|
95
|
-
function Z(r, c,
|
|
95
|
+
function Z(r, c, i = 0.75) {
|
|
96
96
|
const t = f(
|
|
97
97
|
() => O(typeof r == "string" ? r : r.value)
|
|
98
98
|
), n = f(
|
|
99
99
|
() => O(typeof c == "string" ? c : c.value)
|
|
100
|
-
),
|
|
100
|
+
), s = f(() => typeof i == "number" ? i : i.value), m = f(() => ce(t.value, n.value));
|
|
101
101
|
return {
|
|
102
102
|
isMatching: f(
|
|
103
|
-
() =>
|
|
103
|
+
() => xe(t.value, n.value, s.value)
|
|
104
104
|
),
|
|
105
105
|
score: m
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function de(r, c,
|
|
108
|
+
function de(r, c, i) {
|
|
109
109
|
var m;
|
|
110
110
|
r.stopPropagation();
|
|
111
|
-
const t = typeof
|
|
112
|
-
let
|
|
111
|
+
const t = typeof i.value == "function" ? i.value : i.value.handler, n = typeof i.value == "object" ? i.value.exclude : void 0;
|
|
112
|
+
let s = !1;
|
|
113
113
|
if (n && n.length > 0) {
|
|
114
114
|
for (const V of n)
|
|
115
|
-
if (!
|
|
115
|
+
if (!s && r.target instanceof HTMLElement) {
|
|
116
116
|
const x = (m = document.querySelector(V)) == null ? void 0 : m.getAttribute("id");
|
|
117
|
-
|
|
117
|
+
s = r.target.getAttribute("id") === x;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
!c.contains(r.target) && !
|
|
120
|
+
!c.contains(r.target) && !s && (t == null || t());
|
|
121
121
|
}
|
|
122
122
|
function pe() {
|
|
123
123
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
const
|
|
127
|
-
document.removeEventListener(
|
|
125
|
+
function Be(r, c) {
|
|
126
|
+
const i = pe();
|
|
127
|
+
document.removeEventListener(i, (t) => de(t, r, c));
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function De(r, c) {
|
|
130
130
|
if (typeof c.value != "function" && typeof c.value == "object" && typeof c.value.handler != "function") {
|
|
131
131
|
console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
|
-
const
|
|
135
|
-
document.addEventListener(
|
|
134
|
+
const i = pe();
|
|
135
|
+
document.addEventListener(i, (t) => de(t, r, c));
|
|
136
136
|
}
|
|
137
|
-
const
|
|
138
|
-
mounted:
|
|
139
|
-
unmounted:
|
|
137
|
+
const He = {
|
|
138
|
+
mounted: De,
|
|
139
|
+
unmounted: Be
|
|
140
140
|
};
|
|
141
141
|
let R = null;
|
|
142
|
-
function
|
|
142
|
+
function Pe(r, c) {
|
|
143
143
|
R && clearTimeout(R), R = setTimeout(r, c);
|
|
144
144
|
}
|
|
145
|
-
const
|
|
145
|
+
const Fe = ["aria-label"], Ue = { class: "m-select-list__no-results" }, We = {
|
|
146
146
|
key: 2,
|
|
147
147
|
class: "m-select-list__scroll-wrapper",
|
|
148
148
|
tabindex: "-1"
|
|
149
|
-
},
|
|
149
|
+
}, qe = { class: "m-select-list-optgroup" }, je = ["onClick"], Qe = /* @__PURE__ */ Ie({
|
|
150
150
|
inheritAttrs: !1,
|
|
151
151
|
__name: "MazSelect",
|
|
152
152
|
props: {
|
|
@@ -178,16 +178,11 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
178
178
|
autocomplete: { default: "off" }
|
|
179
179
|
},
|
|
180
180
|
emits: ["close", "open", "blur", "focus", "change", "input", "update:model-value", "selected-option"],
|
|
181
|
-
setup(r, { expose: c, emit:
|
|
182
|
-
|
|
183
|
-
fba4bd7a: ve.value,
|
|
184
|
-
"2796b77c": fe.value,
|
|
185
|
-
d1bcc1ac: me.value
|
|
186
|
-
}));
|
|
187
|
-
const t = r, n = s, i = T(() => import("./MazCheckbox-BI2um2gY.mjs")), m = T(() => import("./magnifying-glass--nBiyXot.mjs")), V = T(() => import("./chevron-down-BkvtON3b.mjs")), x = T(() => import("./no-symbol-CIgKzsrB.mjs"));
|
|
181
|
+
setup(r, { expose: c, emit: i }) {
|
|
182
|
+
const t = r, n = i, s = T(() => import("./MazCheckbox-BHhDBSbJ.mjs")), m = T(() => import("./magnifying-glass--nBiyXot.mjs")), V = T(() => import("./chevron-down-BkvtON3b.mjs")), x = T(() => import("./no-symbol-CIgKzsrB.mjs"));
|
|
188
183
|
c({
|
|
189
184
|
/** Method to open the option list */
|
|
190
|
-
openList:
|
|
185
|
+
openList: C,
|
|
191
186
|
/** Method to close the option list */
|
|
192
187
|
closeList: k
|
|
193
188
|
});
|
|
@@ -199,7 +194,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
199
194
|
() => B.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
|
|
200
195
|
), ve = f(
|
|
201
196
|
() => B.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
|
|
202
|
-
), h = f(() => z.value || t.open), ye =
|
|
197
|
+
), h = f(() => z.value || t.open), ye = Te({
|
|
203
198
|
componentName: "MazSelect",
|
|
204
199
|
providedId: t.id
|
|
205
200
|
});
|
|
@@ -218,7 +213,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
218
213
|
[t.optionInputValueKey]: e[t.optionInputValueKey]
|
|
219
214
|
};
|
|
220
215
|
}
|
|
221
|
-
const
|
|
216
|
+
const L = f(() => {
|
|
222
217
|
var o;
|
|
223
218
|
const e = [];
|
|
224
219
|
if (!((o = t.options) != null && o.length))
|
|
@@ -234,7 +229,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
234
229
|
}), E = f(
|
|
235
230
|
() => {
|
|
236
231
|
var e;
|
|
237
|
-
return ((e =
|
|
232
|
+
return ((e = L.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
233
|
}
|
|
239
234
|
);
|
|
240
235
|
Le(() => {
|
|
@@ -257,27 +252,27 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
257
252
|
return t.modelValue.map(
|
|
258
253
|
(a) => {
|
|
259
254
|
var l, u;
|
|
260
|
-
return (u = (l =
|
|
255
|
+
return (u = (l = L.value) == null ? void 0 : l.find((d) => d[t.optionValueKey] === a)) == null ? void 0 : u[t.optionInputValueKey];
|
|
261
256
|
}
|
|
262
257
|
).join(", ");
|
|
263
|
-
const e = (o =
|
|
258
|
+
const e = (o = L.value) == null ? void 0 : o.find(
|
|
264
259
|
(a) => a[t.optionValueKey] === t.modelValue
|
|
265
260
|
);
|
|
266
261
|
return K(t.modelValue) || e == null ? void 0 : e[t.optionInputValueKey];
|
|
267
262
|
}), be = f(
|
|
268
263
|
() => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
269
|
-
),
|
|
264
|
+
), w = b(""), S = b("");
|
|
270
265
|
function P(e, o) {
|
|
271
266
|
return o && e && O(e).includes(O(o));
|
|
272
267
|
}
|
|
273
268
|
function te(e) {
|
|
274
269
|
var o;
|
|
275
|
-
return e ? (o =
|
|
270
|
+
return e ? (o = L.value) == null ? void 0 : o.filter((a) => {
|
|
276
271
|
const l = a[t.optionLabelKey], u = a[t.optionValueKey], d = a[t.optionInputValueKey], v = t.searchThreshold;
|
|
277
272
|
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
|
-
}) :
|
|
273
|
+
}) : L.value;
|
|
279
274
|
}
|
|
280
|
-
const y = f(() => te(
|
|
275
|
+
const y = f(() => te(w.value));
|
|
281
276
|
async function k(e) {
|
|
282
277
|
var a, l;
|
|
283
278
|
if (!h.value)
|
|
@@ -289,7 +284,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
289
284
|
return e == null ? void 0 : e.preventDefault();
|
|
290
285
|
await W(), z.value = !1, p.value = 0, n("close", e);
|
|
291
286
|
}
|
|
292
|
-
async function
|
|
287
|
+
async function C(e) {
|
|
293
288
|
t.disabled || h.value || (e == null || e.preventDefault(), z.value = !0, await F(), n("focus", e), n("open", z.value));
|
|
294
289
|
}
|
|
295
290
|
function oe() {
|
|
@@ -305,7 +300,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
305
300
|
}
|
|
306
301
|
function ze(e) {
|
|
307
302
|
var o, a;
|
|
308
|
-
|
|
303
|
+
w.value = e, (a = ((o = _.value) == null ? void 0 : o.$el).querySelector("input")) == null || a.focus();
|
|
309
304
|
}
|
|
310
305
|
function Ke(e) {
|
|
311
306
|
var a;
|
|
@@ -313,13 +308,13 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
313
308
|
const o = te(S.value);
|
|
314
309
|
o != null && o.length && (p.value = (a = y.value) == null ? void 0 : a.findIndex(
|
|
315
310
|
(l) => l[t.optionValueKey] === o[0][t.optionValueKey]
|
|
316
|
-
), typeof p.value == "number" && p.value >= 0 && F(p.value)),
|
|
311
|
+
), typeof p.value == "number" && p.value >= 0 && F(p.value)), Pe(() => {
|
|
317
312
|
S.value = "";
|
|
318
313
|
}, 1e3);
|
|
319
314
|
}
|
|
320
315
|
function Se(e) {
|
|
321
316
|
const o = e.key;
|
|
322
|
-
/^[\dA-Za-z\u0400-\u04FF]$/.test(o) ? (e.preventDefault(),
|
|
317
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(o) ? (e.preventDefault(), C(e), t.search ? ze(o) : Ke(o)) : le(e);
|
|
323
318
|
}
|
|
324
319
|
function le(e, o = !0) {
|
|
325
320
|
const a = e.code, l = ["ArrowUp", "ArrowDown"].includes(a), u = (o ? ["Enter", "Space"] : ["Enter"]).includes(a), d = a === "Escape" && h.value;
|
|
@@ -329,7 +324,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
329
324
|
var u;
|
|
330
325
|
e.preventDefault();
|
|
331
326
|
const a = e.code;
|
|
332
|
-
h.value ||
|
|
327
|
+
h.value || C(e);
|
|
333
328
|
const l = (u = y.value) == null ? void 0 : u.length;
|
|
334
329
|
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
330
|
}
|
|
@@ -364,7 +359,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
364
359
|
}
|
|
365
360
|
function ae(e, o = !0) {
|
|
366
361
|
var d;
|
|
367
|
-
o && !t.multiple && W(() => k()),
|
|
362
|
+
o && !t.multiple && W(() => k()), w.value = "";
|
|
368
363
|
const a = (d = E.value) == null ? void 0 : d.some(
|
|
369
364
|
(v) => v[t.optionValueKey] === e[t.optionValueKey]
|
|
370
365
|
);
|
|
@@ -387,10 +382,10 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
387
382
|
t.class,
|
|
388
383
|
`--${e.size}`
|
|
389
384
|
]]),
|
|
390
|
-
style: j(e.style)
|
|
385
|
+
style: j([e.style, { "--keyboard-selected-bg-color": ve.value, "--selected-bg-color": me.value, "--selected-text-color": fe.value }])
|
|
391
386
|
},
|
|
392
387
|
[
|
|
393
|
-
$(re,
|
|
388
|
+
$(re, Ce({
|
|
394
389
|
id: I(ye),
|
|
395
390
|
ref_key: "mazInputComponent",
|
|
396
391
|
ref: D,
|
|
@@ -404,9 +399,9 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
404
399
|
block: "",
|
|
405
400
|
autocomplete: e.autocomplete,
|
|
406
401
|
disabled: e.disabled,
|
|
407
|
-
onFocus: M(
|
|
402
|
+
onFocus: M(C, ["prevent", "stop"]),
|
|
408
403
|
onBlur: M(k, ["prevent", "stop"]),
|
|
409
|
-
onClick: M(
|
|
404
|
+
onClick: M(C, ["prevent", "stop"]),
|
|
410
405
|
onChange: o[0] || (o[0] = (l) => n("change", l)),
|
|
411
406
|
onInput: o[1] || (o[1] = (l) => n("input", l)),
|
|
412
407
|
onKeydown: Se
|
|
@@ -420,12 +415,12 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
420
415
|
onClick: M(Ve, ["stop"])
|
|
421
416
|
}, [
|
|
422
417
|
$(I(V), { class: "m-select-chevron maz-text-xl" })
|
|
423
|
-
], 8,
|
|
418
|
+
], 8, Fe)
|
|
424
419
|
]),
|
|
425
420
|
_: 1
|
|
426
421
|
/* STABLE */
|
|
427
422
|
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "autocomplete", "disabled"]),
|
|
428
|
-
$(
|
|
423
|
+
$(Me, { name: be.value }, {
|
|
429
424
|
default: ne(() => [
|
|
430
425
|
h.value ? (g(), A(
|
|
431
426
|
"div",
|
|
@@ -447,13 +442,13 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
447
442
|
})
|
|
448
443
|
},
|
|
449
444
|
[
|
|
450
|
-
e.search ? (g(),
|
|
445
|
+
e.search ? (g(), ie(re, {
|
|
451
446
|
key: 0,
|
|
452
447
|
ref_key: "searchInputComponent",
|
|
453
448
|
ref: _,
|
|
454
|
-
modelValue:
|
|
449
|
+
modelValue: w.value,
|
|
455
450
|
"onUpdate:modelValue": [
|
|
456
|
-
o[2] || (o[2] = (l) =>
|
|
451
|
+
o[2] || (o[2] = (l) => w.value = l),
|
|
457
452
|
o[4] || (o[4] = (l) => p.value = 0)
|
|
458
453
|
],
|
|
459
454
|
size: "sm",
|
|
@@ -468,15 +463,15 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
468
463
|
onKeydown: o[3] || (o[3] = (l) => le(l, !1))
|
|
469
464
|
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : Q("v-if", !0),
|
|
470
465
|
!y.value || y.value.length <= 0 ? G(e.$slots, "no-results", { key: 1 }, () => [
|
|
471
|
-
N("span",
|
|
466
|
+
N("span", Ue, [
|
|
472
467
|
$(I(x), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
473
468
|
])
|
|
474
|
-
], !0) : (g(), A("div",
|
|
469
|
+
], !0) : (g(), A("div", We, [
|
|
475
470
|
(g(!0), A(
|
|
476
|
-
|
|
471
|
+
se,
|
|
477
472
|
null,
|
|
478
|
-
|
|
479
|
-
|
|
473
|
+
Ee(y.value, (l, u) => (g(), A(
|
|
474
|
+
se,
|
|
480
475
|
{ key: u },
|
|
481
476
|
[
|
|
482
477
|
l.label && l.isOptGroup ? G(e.$slots, "optgroup", {
|
|
@@ -485,7 +480,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
485
480
|
}, () => [
|
|
486
481
|
N(
|
|
487
482
|
"span",
|
|
488
|
-
|
|
483
|
+
qe,
|
|
489
484
|
ue(l.label),
|
|
490
485
|
1
|
|
491
486
|
/* TEXT */
|
|
@@ -504,7 +499,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
504
499
|
style: j(e.itemHeight ? { height: `${e.itemHeight}px` } : void 0),
|
|
505
500
|
onClick: M((d) => ae(l), ["prevent", "stop"])
|
|
506
501
|
}, [
|
|
507
|
-
e.multiple ? (g(),
|
|
502
|
+
e.multiple ? (g(), ie(I(s), {
|
|
508
503
|
key: 0,
|
|
509
504
|
tabindex: "-1",
|
|
510
505
|
"model-value": H(l),
|
|
@@ -523,7 +518,7 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
523
518
|
/* TEXT */
|
|
524
519
|
)
|
|
525
520
|
], !0)
|
|
526
|
-
], 14,
|
|
521
|
+
], 14, je))
|
|
527
522
|
],
|
|
528
523
|
64
|
|
529
524
|
/* STABLE_FRAGMENT */
|
|
@@ -544,14 +539,14 @@ const Ue = ["aria-label"], We = { class: "m-select-list__no-results" }, qe = {
|
|
|
544
539
|
6
|
|
545
540
|
/* CLASS, STYLE */
|
|
546
541
|
)), [
|
|
547
|
-
[I(
|
|
542
|
+
[I(He), {
|
|
548
543
|
exclude: (a = e.excludeSelectors) != null && a.length ? e.excludeSelectors : [],
|
|
549
544
|
handler: k
|
|
550
545
|
}]
|
|
551
546
|
]);
|
|
552
547
|
};
|
|
553
548
|
}
|
|
554
|
-
}),
|
|
549
|
+
}), Xe = /* @__PURE__ */ $e(Qe, [["__scopeId", "data-v-27ad6cb9"]]);
|
|
555
550
|
export {
|
|
556
|
-
|
|
551
|
+
Xe as default
|
|
557
552
|
};
|