maz-ui 3.49.0 → 3.49.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.mjs +78 -73
- package/components/MazAnimatedElement.mjs +12 -12
- package/components/MazAnimatedText.mjs +5 -5
- 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.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +128 -123
- 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.mjs +1 -1
- package/components/MazTable.mjs +1 -1
- package/components/assets/MazAnimatedCounter.css +1 -1
- package/components/assets/MazAnimatedElement.css +1 -1
- package/components/assets/MazAnimatedText.css +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazCard.css +1 -1
- package/components/assets/MazCircularProgressBar.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/MazPagination.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/chunks/{MazBottomSheet-CNFupuJS.mjs → MazBottomSheet-CIXEEUpN.mjs} +1 -1
- package/components/chunks/MazBtn-9Jk8ZkBq.mjs +103 -0
- package/components/chunks/{MazBtn-BJNzz7YT.mjs → MazBtn-BHD7Xbr_.mjs} +3 -3
- package/components/chunks/{MazBtn-CKDJOBcC.mjs → MazBtn-BT4o0zLa.mjs} +2 -2
- package/components/chunks/{MazBtn-D53RC3KP.mjs → MazBtn-Ba8ff2Nu.mjs} +3 -3
- package/components/chunks/{MazBtn-DYURBZtp.mjs → MazBtn-Bdhu8JTk.mjs} +2 -2
- package/components/chunks/{MazBtn-BO1U1gVG.mjs → MazBtn-CbTqLKv1.mjs} +3 -3
- package/components/chunks/MazBtn-DAzJbcTl.mjs +103 -0
- package/components/chunks/{MazBtn-CP-m-KDm.mjs → MazBtn-DCGXwqRM.mjs} +3 -3
- package/components/chunks/MazBtn-DGIjSCP2.mjs +103 -0
- package/components/chunks/{MazBtn-CUoFOAML.mjs → MazBtn-DXinft-p.mjs} +3 -3
- package/components/chunks/MazBtn-DnpSuILi.mjs +103 -0
- package/components/chunks/{MazBtn-BugQGoO-.mjs → MazBtn-GYr50Ap4.mjs} +3 -3
- package/components/chunks/{MazBtn-Cyn7ObTB.mjs → MazBtn-IBh1tCot.mjs} +3 -3
- package/components/chunks/{MazBtn-MvFibIXn.mjs → MazBtn-UDAwHekF.mjs} +3 -3
- package/components/chunks/{MazCard-D-q6vhWd.mjs → MazCard-CQBFy8r_.mjs} +4 -4
- package/components/chunks/{MazCarousel-Z4XypOn_.mjs → MazCarousel-Bcn7nKDo.mjs} +1 -1
- package/components/chunks/{MazCheckbox-DJi0g4uK.mjs → MazCheckbox-B8Rnqa6O.mjs} +1 -1
- package/components/chunks/{MazCheckbox-DafMJoEw.mjs → MazCheckbox-Br41Nrq7.mjs} +1 -1
- package/components/chunks/{MazCheckbox-BImOZ1aM.mjs → MazCheckbox-t4i9eR04.mjs} +1 -1
- package/components/chunks/{MazChecklist-DaEf6wix.mjs → MazChecklist-DLr57bfX.mjs} +1 -1
- package/components/chunks/{MazDialog-PVsds2Mw.mjs → MazDialog-ak7mSNff.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-BdtiOZGU.mjs → MazDialogPromise-JvS9f5Of.mjs} +2 -2
- package/components/chunks/{MazDrawer-CMHe_JEh.mjs → MazDrawer-CTsb4x_4.mjs} +1 -1
- package/components/chunks/{MazDropdown-DpGSAqe0.mjs → MazDropdown-BxMokXYe.mjs} +1 -1
- package/components/chunks/{MazGallery-BtuCo-H0.mjs → MazGallery-C7Zp1iYc.mjs} +2 -2
- package/components/chunks/MazIcon-C47uJeFY.mjs +4 -0
- package/components/chunks/{MazIcon-Bnebkvf6.mjs → MazIcon-mGVzj6Xw.mjs} +1 -1
- package/components/chunks/{MazInput-C3QweR84.mjs → MazInput-BK2OXh6D.mjs} +73 -84
- package/components/chunks/{MazInput-DvaaM9Iq.mjs → MazInput-BWHAOFtO.mjs} +66 -77
- package/components/chunks/{MazInput-DjvBbUZl.mjs → MazInput-C2_KlBtJ.mjs} +67 -78
- package/components/chunks/{MazInputNumber-D904Pg1R.mjs → MazInputNumber-Bw6O0AGT.mjs} +104 -115
- package/components/chunks/{MazInputPrice-CQiJFPWB.mjs → MazInputPrice-BCM9ga_h.mjs} +104 -115
- package/components/chunks/{MazInputTags-BPSG1X1a.mjs → MazInputTags-B0B93sN-.mjs} +127 -138
- package/components/chunks/{MazLink-DnnBkVEE.mjs → MazLink-PEtIzV5x.mjs} +1 -1
- package/components/chunks/{MazLoadingBar-Dm14PSs6.mjs → MazLoadingBar-BjzRnYVR.mjs} +1 -1
- package/components/chunks/{MazPagination-CuCKS1Qr.mjs → MazPagination-DKseqKmF.mjs} +2 -2
- package/components/chunks/{MazPhoneNumberInput-CKpP3yWz.mjs → MazPhoneNumberInput-CPm6LjfT.mjs} +354 -365
- package/components/chunks/MazPicker-BHBE1cC_.mjs +2482 -0
- package/components/chunks/{MazPickerMonthSwitcher-BDxk_Msi.mjs → MazPickerMonthSwitcher-CXfxTBNH.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-DtHvsdEW.mjs → MazPickerShortcuts-BLuYu65Q.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DXkaTXFw.mjs → MazPickerYearSwitcher-CpSOH48Y.mjs} +1 -1
- package/components/chunks/{MazSelect-VAPsGKXy.mjs → MazSelect-CdSRiSW9.mjs} +3 -3
- package/components/chunks/{MazSelect-cthYMQqx.mjs → MazSelect-uHsahxjj.mjs} +188 -199
- package/components/chunks/{MazSpinner-Ba5WXlbx.mjs → MazSpinner-B3mUm5mz.mjs} +1 -1
- package/components/chunks/MazSpinner-B698e0ut.mjs +34 -0
- package/components/chunks/{MazSpinner-B5j5EaKc.mjs → MazSpinner-BEW98Fow.mjs} +1 -1
- package/components/chunks/{MazSpinner-94rvbsAk.mjs → MazSpinner-BqMt92KT.mjs} +1 -1
- package/components/chunks/{MazSpinner-DtFpBxRT.mjs → MazSpinner-Bs8Z0Ewo.mjs} +1 -1
- package/components/chunks/MazSpinner-C2OD6LW3.mjs +34 -0
- package/components/chunks/MazSpinner-C3zQC9oz.mjs +34 -0
- package/components/chunks/MazSpinner-C5pIord0.mjs +34 -0
- package/components/chunks/MazSpinner-C8KOYxzi.mjs +34 -0
- package/components/chunks/{MazSpinner-DLR4lVAu.mjs → MazSpinner-C8zfJPRU.mjs} +1 -1
- package/components/chunks/{MazSpinner-BLh6PkZJ.mjs → MazSpinner-C_uLffb-.mjs} +1 -1
- package/components/chunks/{MazSpinner-C2mutMJX.mjs → MazSpinner-Cu7WoA4N.mjs} +1 -1
- package/components/chunks/MazSpinner-CyqPQ7SW.mjs +34 -0
- package/components/chunks/MazSpinner-DV634NYb.mjs +34 -0
- package/components/chunks/MazSpinner-DW_14RuN.mjs +34 -0
- package/components/chunks/{MazSpinner-SnOek826.mjs → MazSpinner-DwQiUPTZ.mjs} +1 -1
- package/components/chunks/MazSpinner-zV6qnXaD.mjs +34 -0
- package/components/chunks/{MazTable-BuFlCw1p.mjs → MazTable-B5BMpCK1.mjs} +1 -1
- package/components/chunks/{MazTableCell-C6oDOvNH.mjs → MazTableCell-7Ahz87mm.mjs} +1 -1
- package/components/chunks/{MazTableRow-BBS8sW7w.mjs → MazTableRow-B0JiP3mV.mjs} +1 -1
- package/components/chunks/{MazTableTitle-D7J-0k_j.mjs → MazTableTitle-BdajfMLo.mjs} +1 -1
- package/components/chunks/{MazTransitionExpand-BlcqxvGq.mjs → MazTransitionExpand-BO_9-l3g.mjs} +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/chunks/{MazBtn-BjiQC2PC.mjs → MazBtn-CvuJewxV.mjs} +3 -3
- package/modules/chunks/{MazBtn-BnQrui8R.cjs → MazBtn-eZwyrxMU.cjs} +1 -1
- package/modules/chunks/{MazIcon-DwFVj44O.mjs → MazIcon-CeCRHfan.mjs} +1 -1
- package/modules/chunks/{MazIcon-D4oz63T8.cjs → MazIcon-u9VBpDx8.cjs} +1 -1
- package/modules/chunks/{MazSpinner-B18bQ49b.cjs → MazSpinner-BY5lnQ7u.cjs} +1 -1
- package/modules/chunks/{MazSpinner-7nqeVBxW.mjs → MazSpinner-DdDJ5vzJ.mjs} +1 -1
- package/modules/chunks/{index-D8S1X6Fy.mjs → index--62sMUK_.mjs} +4 -4
- package/modules/chunks/{index-IBifh-oY.cjs → index-Bq7zqUSE.cjs} +2 -2
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/components/chunks/MazBtn-DiYly5sp.mjs +0 -103
- package/components/chunks/MazBtn-Dlx6nLm2.mjs +0 -103
- package/components/chunks/MazBtn-MJYP-poo.mjs +0 -103
- package/components/chunks/MazBtn-tS9ACNLi.mjs +0 -103
- package/components/chunks/MazIcon-C7ZMosGw.mjs +0 -4
- package/components/chunks/MazPicker-g10_1sY_.mjs +0 -2493
- package/components/chunks/MazSpinner-C7TbmneX.mjs +0 -34
- package/components/chunks/MazSpinner-CcshuKK9.mjs +0 -34
- package/components/chunks/MazSpinner-D2J_jdkK.mjs +0 -34
- package/components/chunks/MazSpinner-DIzWfhcT.mjs +0 -34
- package/components/chunks/MazSpinner-DP019rLG.mjs +0 -34
- package/components/chunks/MazSpinner-DXCofnqs.mjs +0 -34
- package/components/chunks/MazSpinner-DmeOhZXm.mjs +0 -34
- package/components/chunks/MazSpinner-ZDRUpUqo.mjs +0 -34
- package/components/chunks/MazSpinner-qRqfN8k4.mjs +0 -34
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as p, useId as Te, defineComponent as
|
|
1
|
+
import { computed as p, useId as Te, defineComponent as he, defineAsyncComponent as B, ref as I, onMounted as Ee, useSlots as Oe, openBlock as m, createElementBlock as k, normalizeClass as M, normalizeStyle as ee, unref as b, toDisplayString as Q, createCommentVNode as g, createElementVNode as T, renderSlot as P, createBlock as L, resolveDynamicComponent as ve, withDirectives as ge, mergeProps as ze, toHandlers as De, vModelDynamic as Fe, withModifiers as N, withCtx as te, createVNode as H, onBeforeMount as Ne, nextTick as ue, Transition as He, Fragment as ye, renderList as Pe } from "vue";
|
|
2
2
|
import '../assets/MazSelect.css';function ke({
|
|
3
3
|
componentName: u,
|
|
4
4
|
providedId: r
|
|
@@ -71,28 +71,28 @@ function oe(u, r) {
|
|
|
71
71
|
s = s.normalize(c);
|
|
72
72
|
return s;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function qe(u, r) {
|
|
75
75
|
const l = u.length, t = r.length, s = [];
|
|
76
76
|
for (let c = 0; c <= l; c++)
|
|
77
77
|
s[c] = [c];
|
|
78
78
|
for (let c = 0; c <= t; c++)
|
|
79
79
|
s[0][c] = c;
|
|
80
80
|
for (let c = 1; c <= l; c++)
|
|
81
|
-
for (let
|
|
82
|
-
const
|
|
83
|
-
s[c][
|
|
84
|
-
s[c - 1][
|
|
85
|
-
s[c][
|
|
86
|
-
s[c - 1][
|
|
81
|
+
for (let v = 1; v <= t; v++) {
|
|
82
|
+
const A = u[c - 1] === r[v - 1] ? 0 : 1;
|
|
83
|
+
s[c][v] = Math.min(
|
|
84
|
+
s[c - 1][v] + 1,
|
|
85
|
+
s[c][v - 1] + 1,
|
|
86
|
+
s[c - 1][v - 1] + A
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
return s[l][t];
|
|
90
90
|
}
|
|
91
91
|
function Ve(u, r) {
|
|
92
|
-
const l =
|
|
92
|
+
const l = qe(u, r), t = Math.max(u.length, r.length);
|
|
93
93
|
return 1 - l / t;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function We(u, r, l = 0.75) {
|
|
96
96
|
return Ve(u, r) >= l;
|
|
97
97
|
}
|
|
98
98
|
function re(u, r, l = 0.75) {
|
|
@@ -100,24 +100,24 @@ function re(u, r, l = 0.75) {
|
|
|
100
100
|
() => oe(typeof u == "string" ? u : u.value)
|
|
101
101
|
), s = p(
|
|
102
102
|
() => oe(typeof r == "string" ? r : r.value)
|
|
103
|
-
), c = p(() => typeof l == "number" ? l : l.value),
|
|
103
|
+
), c = p(() => typeof l == "number" ? l : l.value), v = p(() => Ve(t.value, s.value));
|
|
104
104
|
return {
|
|
105
105
|
isMatching: p(
|
|
106
|
-
() =>
|
|
106
|
+
() => We(t.value, s.value, c.value)
|
|
107
107
|
),
|
|
108
|
-
score:
|
|
108
|
+
score: v
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
function Ie(u, r, l) {
|
|
112
|
-
var
|
|
112
|
+
var v, A;
|
|
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
115
|
let c = !1;
|
|
116
116
|
if (s && s.length > 0) {
|
|
117
|
-
for (const
|
|
117
|
+
for (const E of s)
|
|
118
118
|
if (!c && u.target instanceof HTMLElement) {
|
|
119
|
-
const z = (
|
|
120
|
-
c = (u.target.getAttribute("id") === z || ((
|
|
119
|
+
const z = (v = document.querySelector(E)) == null ? void 0 : v.getAttribute("id");
|
|
120
|
+
c = (u.target.getAttribute("id") === z || ((A = document.querySelector(E)) == null ? void 0 : A.contains(u.target))) ?? !1;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
!r.contains(u.target) && !c && (t == null || t(u));
|
|
@@ -125,11 +125,11 @@ function Ie(u, r, l) {
|
|
|
125
125
|
function we() {
|
|
126
126
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function je(u, r) {
|
|
129
129
|
const l = we();
|
|
130
130
|
document.removeEventListener(l, (t) => Ie(t, u, r));
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Qe(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;
|
|
@@ -137,15 +137,15 @@ function Re(u, r) {
|
|
|
137
137
|
const l = we();
|
|
138
138
|
document.addEventListener(l, (t) => Ie(t, u, r));
|
|
139
139
|
}
|
|
140
|
-
const
|
|
141
|
-
mounted:
|
|
142
|
-
unmounted:
|
|
140
|
+
const Re = {
|
|
141
|
+
mounted: Qe,
|
|
142
|
+
unmounted: je
|
|
143
143
|
};
|
|
144
144
|
let ce = null;
|
|
145
|
-
function
|
|
145
|
+
function Ge(u, r) {
|
|
146
146
|
ce && clearTimeout(ce), ce = setTimeout(u, r);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Ze(u, r) {
|
|
149
149
|
let l;
|
|
150
150
|
return function(...t) {
|
|
151
151
|
clearTimeout(l), l = setTimeout(() => {
|
|
@@ -153,13 +153,13 @@ function Je(u, r) {
|
|
|
153
153
|
}, r);
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const Je = ["for"], Xe = {
|
|
157
157
|
key: 0,
|
|
158
158
|
class: "m-input-wrapper-left"
|
|
159
|
-
},
|
|
159
|
+
}, Ye = ["id", "name", "placeholder", "aria-label", "type", "inputmode", "disabled", "readonly", "autocomplete", "required"], xe = {
|
|
160
160
|
key: 1,
|
|
161
161
|
class: "m-input-wrapper-right"
|
|
162
|
-
},
|
|
162
|
+
}, _e = /* @__PURE__ */ he({
|
|
163
163
|
inheritAttrs: !1,
|
|
164
164
|
__name: "MazInput",
|
|
165
165
|
props: {
|
|
@@ -200,15 +200,15 @@ const Xe = ["for"], Ye = {
|
|
|
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 = B(() => import("./MazBtn-DXinft-p.mjs")), c = B(() => import("./MazIcon-Cq1v4J3r.mjs")), v = B(() => import("./eye-slash-BoO00xzs.mjs")), A = B(() => import("./eye-f8zAUc30.mjs")), E = B(() => import("./check-C9Q_W85g.mjs")), z = I(!1), f = I(!1), O = I(), R = ke({
|
|
204
204
|
componentName: "MazInput",
|
|
205
205
|
providedId: l.id
|
|
206
206
|
});
|
|
207
207
|
Ee(() => {
|
|
208
208
|
var o;
|
|
209
|
-
l.autoFocus && ((o =
|
|
209
|
+
l.autoFocus && ((o = O.value) == null || o.focus());
|
|
210
210
|
});
|
|
211
|
-
const G = p(() => l.type === "password"), le = p(() => z.value ? "text" : l.type),
|
|
211
|
+
const G = p(() => l.type === "password"), le = p(() => z.value ? "text" : l.type), w = p(() => {
|
|
212
212
|
if (!l.noBorder) {
|
|
213
213
|
if (l.error)
|
|
214
214
|
return "maz-border-danger";
|
|
@@ -236,51 +236,47 @@ const Xe = ["for"], Ye = {
|
|
|
236
236
|
}
|
|
237
237
|
return "--default-border";
|
|
238
238
|
}
|
|
239
|
-
}),
|
|
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(
|
|
239
|
+
}), U = Oe(), Z = p(() => S.value !== void 0 && S.value !== ""), J = Ze(
|
|
244
240
|
(o) => {
|
|
245
241
|
t("update:model-value", o);
|
|
246
242
|
},
|
|
247
243
|
typeof l.debounce == "number" ? l.debounce : l.debounceDelay ?? 500
|
|
248
244
|
);
|
|
249
|
-
function
|
|
245
|
+
function X(o) {
|
|
250
246
|
if (l.debounce)
|
|
251
|
-
return
|
|
247
|
+
return J(o);
|
|
252
248
|
t("update:model-value", o);
|
|
253
249
|
}
|
|
254
|
-
const
|
|
250
|
+
const S = p({
|
|
255
251
|
get: () => l.modelValue,
|
|
256
|
-
set: (o) =>
|
|
257
|
-
}),
|
|
258
|
-
function
|
|
259
|
-
return !!
|
|
252
|
+
set: (o) => X(o)
|
|
253
|
+
}), D = p(() => (!!l.label || !!l.hint) && (f.value || !!Z.value || !!l.placeholder || ["date", "month", "week"].includes(l.type))), Y = p(() => !!l.label || !!l.hint);
|
|
254
|
+
function q() {
|
|
255
|
+
return !!U["right-icon"] || G.value || !!U["valid-button"] || l.validButton || !!l.rightIcon;
|
|
260
256
|
}
|
|
261
|
-
function
|
|
262
|
-
return !!
|
|
257
|
+
function x() {
|
|
258
|
+
return !!U["left-icon"] || !!l.leftIcon;
|
|
263
259
|
}
|
|
264
|
-
function
|
|
260
|
+
function _(o) {
|
|
265
261
|
t("focus", o), f.value = !0;
|
|
266
262
|
}
|
|
267
|
-
function
|
|
263
|
+
function C(o) {
|
|
268
264
|
t("blur", o), f.value = !1;
|
|
269
265
|
}
|
|
270
|
-
function
|
|
266
|
+
function W(o) {
|
|
271
267
|
return t("change", o);
|
|
272
268
|
}
|
|
273
|
-
function
|
|
269
|
+
function ae(o) {
|
|
274
270
|
return t("input", o);
|
|
275
271
|
}
|
|
276
|
-
return (o,
|
|
272
|
+
return (o, h) => (m(), k(
|
|
277
273
|
"div",
|
|
278
274
|
{
|
|
279
275
|
class: M(["m-input", [
|
|
280
276
|
{
|
|
281
277
|
"--is-focused": f.value || o.borderActive,
|
|
282
|
-
"--should-up":
|
|
283
|
-
"--has-label":
|
|
278
|
+
"--should-up": D.value,
|
|
279
|
+
"--has-label": Y.value,
|
|
284
280
|
"--is-disabled": o.disabled,
|
|
285
281
|
"--is-readonly": o.readonly,
|
|
286
282
|
"--has-z-2": o.error || o.warning || o.success,
|
|
@@ -295,44 +291,44 @@ const Xe = ["for"], Ye = {
|
|
|
295
291
|
[
|
|
296
292
|
o.topLabel ? (m(), k("label", {
|
|
297
293
|
key: 0,
|
|
298
|
-
for:
|
|
294
|
+
for: b(R),
|
|
299
295
|
class: "m-input-top-label"
|
|
300
|
-
}, Q(o.topLabel), 9,
|
|
301
|
-
|
|
296
|
+
}, Q(o.topLabel), 9, Je)) : g("v-if", !0),
|
|
297
|
+
T(
|
|
302
298
|
"div",
|
|
303
299
|
{
|
|
304
300
|
class: M(["m-input-wrapper m-reset-css", [
|
|
305
301
|
o.inputClasses,
|
|
306
|
-
|
|
302
|
+
w.value,
|
|
307
303
|
o.roundedSize ? `--rounded-${o.roundedSize}` : { "maz-rounded": !o.noRadius },
|
|
308
304
|
{ "--block": o.block }
|
|
309
305
|
]])
|
|
310
306
|
},
|
|
311
307
|
[
|
|
312
|
-
|
|
313
|
-
o.$slots["left-icon"] || o.leftIcon ?
|
|
314
|
-
typeof o.leftIcon == "string" ? (m(),
|
|
308
|
+
x() ? (m(), k("div", Xe, [
|
|
309
|
+
o.$slots["left-icon"] || o.leftIcon ? P(o.$slots, "left-icon", { key: 0 }, () => [
|
|
310
|
+
typeof o.leftIcon == "string" ? (m(), L(b(c), {
|
|
315
311
|
key: 0,
|
|
316
312
|
name: o.leftIcon,
|
|
317
313
|
class: "maz-text-xl maz-text-muted"
|
|
318
|
-
}, null, 8, ["name"])) : o.leftIcon ? (m(),
|
|
314
|
+
}, null, 8, ["name"])) : o.leftIcon ? (m(), L(ve(o.leftIcon), {
|
|
319
315
|
key: 1,
|
|
320
316
|
class: "maz-text-xl maz-text-muted"
|
|
321
|
-
})) :
|
|
322
|
-
], !0) :
|
|
323
|
-
])) :
|
|
324
|
-
|
|
317
|
+
})) : g("v-if", !0)
|
|
318
|
+
], !0) : g("v-if", !0)
|
|
319
|
+
])) : g("v-if", !0),
|
|
320
|
+
T(
|
|
325
321
|
"div",
|
|
326
322
|
{
|
|
327
323
|
class: M(["m-input-wrapper-input", [`--${o.size}`, { "--top-label": !!o.topLabel }]])
|
|
328
324
|
},
|
|
329
325
|
[
|
|
330
|
-
ge(
|
|
326
|
+
ge(T("input", ze({ id: b(R) }, o.$attrs, {
|
|
331
327
|
ref_key: "input",
|
|
332
|
-
ref:
|
|
333
|
-
"onUpdate:modelValue":
|
|
328
|
+
ref: O,
|
|
329
|
+
"onUpdate:modelValue": h[0] || (h[0] = (V) => S.value = V),
|
|
334
330
|
name: o.name,
|
|
335
|
-
placeholder:
|
|
331
|
+
placeholder: o.placeholder,
|
|
336
332
|
"aria-label": o.label || o.placeholder,
|
|
337
333
|
type: le.value,
|
|
338
334
|
inputmode: o.inputmode,
|
|
@@ -341,15 +337,15 @@ const Xe = ["for"], Ye = {
|
|
|
341
337
|
autocomplete: o.autocomplete,
|
|
342
338
|
required: o.required,
|
|
343
339
|
class: "m-input-input"
|
|
344
|
-
},
|
|
345
|
-
blur:
|
|
346
|
-
focus:
|
|
347
|
-
change:
|
|
348
|
-
input:
|
|
340
|
+
}, De({
|
|
341
|
+
blur: C,
|
|
342
|
+
focus: _,
|
|
343
|
+
change: W,
|
|
344
|
+
input: ae
|
|
349
345
|
}, !0), {
|
|
350
|
-
onClick:
|
|
351
|
-
}), null, 16,
|
|
352
|
-
[
|
|
346
|
+
onClick: h[1] || (h[1] = (V) => o.$emit("click", V))
|
|
347
|
+
}), null, 16, Ye), [
|
|
348
|
+
[Fe, S.value]
|
|
353
349
|
]),
|
|
354
350
|
o.label || o.hint ? (m(), k(
|
|
355
351
|
"span",
|
|
@@ -363,53 +359,46 @@ const Xe = ["for"], Ye = {
|
|
|
363
359
|
}
|
|
364
360
|
]])
|
|
365
361
|
},
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
/* TEXT */
|
|
371
|
-
),
|
|
372
|
-
o.required ? (m(), k("sup", _e, "*")) : b("v-if", !0)
|
|
373
|
-
],
|
|
374
|
-
2
|
|
375
|
-
/* CLASS */
|
|
376
|
-
)) : b("v-if", !0)
|
|
362
|
+
Q(o.hint || o.label),
|
|
363
|
+
3
|
|
364
|
+
/* TEXT, CLASS */
|
|
365
|
+
)) : g("v-if", !0)
|
|
377
366
|
],
|
|
378
367
|
2
|
|
379
368
|
/* CLASS */
|
|
380
369
|
),
|
|
381
|
-
|
|
382
|
-
o.$slots["right-icon"] || o.rightIcon ?
|
|
383
|
-
typeof o.rightIcon == "string" ? (m(),
|
|
370
|
+
q() ? (m(), k("div", xe, [
|
|
371
|
+
o.$slots["right-icon"] || o.rightIcon ? P(o.$slots, "right-icon", { key: 0 }, () => [
|
|
372
|
+
typeof o.rightIcon == "string" ? (m(), L(b(c), {
|
|
384
373
|
key: 0,
|
|
385
374
|
name: o.rightIcon,
|
|
386
375
|
class: "maz-text-xl maz-text-muted"
|
|
387
|
-
}, null, 8, ["name"])) : o.rightIcon ? (m(),
|
|
376
|
+
}, null, 8, ["name"])) : o.rightIcon ? (m(), L(ve(o.rightIcon), {
|
|
388
377
|
key: 1,
|
|
389
378
|
class: "maz-text-xl maz-text-muted"
|
|
390
|
-
})) :
|
|
391
|
-
], !0) :
|
|
392
|
-
G.value ? (m(),
|
|
379
|
+
})) : g("v-if", !0)
|
|
380
|
+
], !0) : g("v-if", !0),
|
|
381
|
+
G.value ? (m(), L(b(s), {
|
|
393
382
|
key: 1,
|
|
394
383
|
color: "transparent",
|
|
395
384
|
tabindex: "-1",
|
|
396
385
|
size: "mini",
|
|
397
|
-
onClick:
|
|
386
|
+
onClick: h[2] || (h[2] = N((V) => z.value = !z.value, ["stop"]))
|
|
398
387
|
}, {
|
|
399
388
|
default: te(() => [
|
|
400
|
-
z.value ? (m(),
|
|
389
|
+
z.value ? (m(), L(b(v), {
|
|
401
390
|
key: 0,
|
|
402
391
|
class: "maz-text-xl maz-text-muted"
|
|
403
|
-
})) : (m(),
|
|
392
|
+
})) : (m(), L(b(A), {
|
|
404
393
|
key: 1,
|
|
405
394
|
class: "maz-text-xl maz-text-muted"
|
|
406
395
|
}))
|
|
407
396
|
]),
|
|
408
397
|
_: 1
|
|
409
398
|
/* STABLE */
|
|
410
|
-
})) :
|
|
411
|
-
o.$slots["valid-button"] || o.validButton ?
|
|
412
|
-
|
|
399
|
+
})) : g("v-if", !0),
|
|
400
|
+
o.$slots["valid-button"] || o.validButton ? P(o.$slots, "valid-button", { key: 2 }, () => [
|
|
401
|
+
H(b(s), {
|
|
413
402
|
color: "transparent",
|
|
414
403
|
disabled: o.disabled,
|
|
415
404
|
tabindex: "-1",
|
|
@@ -419,13 +408,13 @@ const Xe = ["for"], Ye = {
|
|
|
419
408
|
type: "submit"
|
|
420
409
|
}, {
|
|
421
410
|
default: te(() => [
|
|
422
|
-
|
|
411
|
+
H(b(E), { class: "maz-text-2xl maz-text-normal" })
|
|
423
412
|
]),
|
|
424
413
|
_: 1
|
|
425
414
|
/* STABLE */
|
|
426
415
|
}, 8, ["disabled", "loading"])
|
|
427
|
-
], !0) :
|
|
428
|
-
])) :
|
|
416
|
+
], !0) : g("v-if", !0)
|
|
417
|
+
])) : g("v-if", !0)
|
|
429
418
|
],
|
|
430
419
|
2
|
|
431
420
|
/* CLASS */
|
|
@@ -446,7 +435,7 @@ const Xe = ["for"], Ye = {
|
|
|
446
435
|
Q(o.assistiveText),
|
|
447
436
|
3
|
|
448
437
|
/* TEXT, CLASS */
|
|
449
|
-
)) :
|
|
438
|
+
)) : g("v-if", !0)
|
|
450
439
|
],
|
|
451
440
|
6
|
|
452
441
|
/* CLASS, STYLE */
|
|
@@ -457,11 +446,11 @@ const Xe = ["for"], Ye = {
|
|
|
457
446
|
for (const [t, s] of r)
|
|
458
447
|
l[t] = s;
|
|
459
448
|
return l;
|
|
460
|
-
},
|
|
449
|
+
}, be = /* @__PURE__ */ Se(_e, [["__scopeId", "data-v-8def99c5"]]), et = ["aria-label"], tt = { class: "m-select-list__no-results" }, ot = {
|
|
461
450
|
key: 2,
|
|
462
451
|
class: "m-select-list__scroll-wrapper",
|
|
463
452
|
tabindex: "-1"
|
|
464
|
-
},
|
|
453
|
+
}, lt = { class: "m-select-list-optgroup" }, at = ["onClick"], nt = /* @__PURE__ */ he({
|
|
465
454
|
inheritAttrs: !1,
|
|
466
455
|
__name: "MazSelect",
|
|
467
456
|
props: {
|
|
@@ -495,22 +484,22 @@ const Xe = ["for"], Ye = {
|
|
|
495
484
|
},
|
|
496
485
|
emits: ["close", "open", "blur", "focus", "change", "input", "update:model-value", "selected-option"],
|
|
497
486
|
setup(u, { expose: r, emit: l }) {
|
|
498
|
-
const t = u, s = l, c =
|
|
487
|
+
const t = u, s = l, c = B(() => import("./MazCheckbox-B8Rnqa6O.mjs")), v = B(() => import("./magnifying-glass--nBiyXot.mjs")), A = B(() => import("./chevron-down-BkvtON3b.mjs")), E = B(() => import("./no-symbol-CIgKzsrB.mjs"));
|
|
499
488
|
r({
|
|
500
489
|
/** Method to open the option list */
|
|
501
490
|
openList: j,
|
|
502
491
|
/** Method to close the option list */
|
|
503
|
-
closeList:
|
|
492
|
+
closeList: F
|
|
504
493
|
});
|
|
505
|
-
const z =
|
|
494
|
+
const z = I(!1), f = I(), O = p(
|
|
506
495
|
() => ["black", "transparent", "white"].includes(t.color)
|
|
507
496
|
), R = p(
|
|
508
|
-
() =>
|
|
497
|
+
() => O.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
|
|
509
498
|
), G = p(
|
|
510
|
-
() =>
|
|
499
|
+
() => O.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
|
|
511
500
|
), le = p(
|
|
512
|
-
() =>
|
|
513
|
-
),
|
|
501
|
+
() => O.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
|
|
502
|
+
), w = p(() => z.value || t.open), U = ke({
|
|
514
503
|
componentName: "MazSelect",
|
|
515
504
|
providedId: t.id
|
|
516
505
|
});
|
|
@@ -542,25 +531,25 @@ const Xe = ["for"], Ye = {
|
|
|
542
531
|
) : a.push(J(n));
|
|
543
532
|
return a;
|
|
544
533
|
}
|
|
545
|
-
const
|
|
534
|
+
const S = p(() => X(t.options ?? [])), D = p(
|
|
546
535
|
() => {
|
|
547
536
|
var e;
|
|
548
|
-
return ((e =
|
|
537
|
+
return ((e = S.value) == null ? void 0 : e.filter((a) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(a[t.optionValueKey]) && !C(a[t.optionValueKey]) : !1 : t.modelValue === a[t.optionValueKey] && !C(a[t.optionValueKey]))) ?? [];
|
|
549
538
|
}
|
|
550
539
|
);
|
|
551
|
-
|
|
540
|
+
Ne(() => {
|
|
552
541
|
var e;
|
|
553
542
|
(e = t.options) != null && e.length || console.warn("[maz-ui](MazSelect) you must provide options"), ie();
|
|
554
543
|
});
|
|
555
|
-
const Y =
|
|
556
|
-
function
|
|
544
|
+
const Y = I(), q = I(), x = I(), _ = I();
|
|
545
|
+
function C(e) {
|
|
557
546
|
return e == null;
|
|
558
547
|
}
|
|
559
548
|
function W(e) {
|
|
560
549
|
var n;
|
|
561
|
-
return (((n =
|
|
550
|
+
return (((n = D.value) == null ? void 0 : n.some(
|
|
562
551
|
(i) => i[t.optionValueKey] === e[t.optionValueKey]
|
|
563
|
-
)) ?? !1) && !
|
|
552
|
+
)) ?? !1) && !C(e[t.optionValueKey]);
|
|
564
553
|
}
|
|
565
554
|
const ae = p(() => {
|
|
566
555
|
var a;
|
|
@@ -568,30 +557,30 @@ const Xe = ["for"], Ye = {
|
|
|
568
557
|
return t.modelValue.map(
|
|
569
558
|
(n) => {
|
|
570
559
|
var i, d;
|
|
571
|
-
return (d = (i =
|
|
560
|
+
return (d = (i = S.value) == null ? void 0 : i.find((y) => y[t.optionValueKey] === n)) == null ? void 0 : d[t.optionInputValueKey];
|
|
572
561
|
}
|
|
573
562
|
).join(", ");
|
|
574
|
-
const e = (a =
|
|
563
|
+
const e = (a = S.value) == null ? void 0 : a.find(
|
|
575
564
|
(n) => n[t.optionValueKey] === t.modelValue
|
|
576
565
|
);
|
|
577
|
-
return
|
|
578
|
-
}),
|
|
566
|
+
return C(t.modelValue) || e == null ? void 0 : e[t.optionInputValueKey];
|
|
567
|
+
}), o = p(
|
|
579
568
|
() => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
580
|
-
),
|
|
581
|
-
function
|
|
569
|
+
), h = I(""), V = I("");
|
|
570
|
+
function ne(e, a) {
|
|
582
571
|
return a && e && oe(e).includes(oe(a));
|
|
583
572
|
}
|
|
584
573
|
function de(e) {
|
|
585
574
|
var a;
|
|
586
|
-
return e ? (a =
|
|
587
|
-
const i = n[t.optionLabelKey], d = n[t.optionValueKey],
|
|
588
|
-
return
|
|
589
|
-
}) :
|
|
575
|
+
return e ? (a = S.value) == null ? void 0 : a.filter((n) => {
|
|
576
|
+
const i = n[t.optionLabelKey], d = n[t.optionValueKey], y = n[t.optionInputValueKey], K = t.searchThreshold;
|
|
577
|
+
return ne(i, e) || ne(y, e) || ne(d, e) || typeof i == "string" && re(i, e, K).isMatching.value || typeof y == "string" && re(y, e, K).isMatching.value || typeof d == "string" && re(d, e, K).isMatching.value;
|
|
578
|
+
}) : S.value;
|
|
590
579
|
}
|
|
591
|
-
const
|
|
592
|
-
async function
|
|
580
|
+
const $ = p(() => t.searchFunction && t.search && h.value ? X(t.searchFunction(h.value, t.options ?? []) ?? []) : de(h.value));
|
|
581
|
+
async function F(e) {
|
|
593
582
|
var n, i;
|
|
594
|
-
if (!
|
|
583
|
+
if (!w.value)
|
|
595
584
|
return;
|
|
596
585
|
if (e && ("relatedTarget" in e && ((n = Y.value) != null && n.contains(e.relatedTarget)) || e.type === "keydown"))
|
|
597
586
|
return e.preventDefault();
|
|
@@ -601,31 +590,31 @@ const Xe = ["for"], Ye = {
|
|
|
601
590
|
await ue(), z.value = !1, f.value = 0, s("close", e);
|
|
602
591
|
}
|
|
603
592
|
async function j(e) {
|
|
604
|
-
t.disabled ||
|
|
593
|
+
t.disabled || w.value || (e == null || e.preventDefault(), z.value = !0, await se(), s("focus", e), s("open", z.value));
|
|
605
594
|
}
|
|
606
595
|
function pe() {
|
|
607
596
|
var e, a;
|
|
608
|
-
(a = ((e =
|
|
597
|
+
(a = ((e = q.value) == null ? void 0 : e.$el).querySelector("input")) == null || a.focus();
|
|
609
598
|
}
|
|
610
599
|
function Ke() {
|
|
611
600
|
var e, a;
|
|
612
|
-
(a = ((e =
|
|
601
|
+
(a = ((e = q.value) == null ? void 0 : e.$el).querySelector("input")) == null || a.dispatchEvent(new Event("input"));
|
|
613
602
|
}
|
|
614
603
|
function Ae(e) {
|
|
615
|
-
z.value ?
|
|
604
|
+
z.value ? F(e) : pe();
|
|
616
605
|
}
|
|
617
606
|
function $e(e) {
|
|
618
607
|
var a, n;
|
|
619
|
-
|
|
608
|
+
h.value = e, (n = ((a = x.value) == null ? void 0 : a.$el).querySelector("input")) == null || n.focus();
|
|
620
609
|
}
|
|
621
610
|
function Le(e) {
|
|
622
611
|
var n;
|
|
623
|
-
e === "Backspace" &&
|
|
624
|
-
const a = de(
|
|
625
|
-
a != null && a.length && (f.value = (n =
|
|
612
|
+
e === "Backspace" && V.value.length > 0 ? V.value = V.value.slice(0, -1) : V.value += e;
|
|
613
|
+
const a = de(V.value);
|
|
614
|
+
a != null && a.length && (f.value = (n = $.value) == null ? void 0 : n.findIndex(
|
|
626
615
|
(i) => i[t.optionValueKey] === a[0][t.optionValueKey]
|
|
627
|
-
), typeof f.value == "number" && f.value >= 0 && se(f.value)),
|
|
628
|
-
|
|
616
|
+
), typeof f.value == "number" && f.value >= 0 && se(f.value)), Ge(() => {
|
|
617
|
+
V.value = "";
|
|
629
618
|
}, 1e3);
|
|
630
619
|
}
|
|
631
620
|
function Be(e) {
|
|
@@ -633,24 +622,24 @@ const Xe = ["for"], Ye = {
|
|
|
633
622
|
/^[\dA-Za-z\u0400-\u04FF]$/.test(a) ? (e.preventDefault(), j(e), t.search ? $e(a) : Le(a)) : fe(e);
|
|
634
623
|
}
|
|
635
624
|
function fe(e, a = !0) {
|
|
636
|
-
const n = e.code, i = ["ArrowUp", "ArrowDown"].includes(n), d = (a ? ["Enter", "Space"] : ["Enter"]).includes(n),
|
|
637
|
-
i ? Ce(e, f.value) : d ? Me(e, f.value) :
|
|
625
|
+
const n = e.code, i = ["ArrowUp", "ArrowDown"].includes(n), d = (a ? ["Enter", "Space"] : ["Enter"]).includes(n), y = n === "Escape" && w.value;
|
|
626
|
+
i ? Ce(e, f.value) : d ? Me(e, f.value) : y && F(e);
|
|
638
627
|
}
|
|
639
628
|
function Ce(e, a) {
|
|
640
629
|
var d;
|
|
641
630
|
e.preventDefault();
|
|
642
631
|
const n = e.code;
|
|
643
|
-
|
|
644
|
-
const i = (d =
|
|
632
|
+
w.value || j(e);
|
|
633
|
+
const i = (d = $.value) == null ? void 0 : d.length;
|
|
645
634
|
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));
|
|
646
635
|
}
|
|
647
636
|
function Me(e, a) {
|
|
648
|
-
var i, d,
|
|
649
|
-
if (!
|
|
637
|
+
var i, d, y;
|
|
638
|
+
if (!w.value)
|
|
650
639
|
return;
|
|
651
640
|
e.preventDefault();
|
|
652
|
-
const n = a ? ((i =
|
|
653
|
-
|
|
641
|
+
const n = a ? ((i = $.value) == null ? void 0 : i[a]) ?? ((d = $.value) == null ? void 0 : d[0]) : (y = $.value) == null ? void 0 : y[0];
|
|
642
|
+
C(n) || me(n);
|
|
654
643
|
}
|
|
655
644
|
async function se(e) {
|
|
656
645
|
var n, i;
|
|
@@ -667,23 +656,23 @@ const Xe = ["for"], Ye = {
|
|
|
667
656
|
}
|
|
668
657
|
function ie(e) {
|
|
669
658
|
var n;
|
|
670
|
-
const a = (n =
|
|
671
|
-
var d,
|
|
672
|
-
return t.multiple && Array.isArray(t.modelValue) ? e ? e[t.optionValueKey] === i[t.optionValueKey] : [...t.modelValue].reverse()[0] === i[t.optionValueKey] : ((
|
|
659
|
+
const a = (n = $.value) == null ? void 0 : n.findIndex((i) => {
|
|
660
|
+
var d, y;
|
|
661
|
+
return t.multiple && Array.isArray(t.modelValue) ? e ? e[t.optionValueKey] === i[t.optionValueKey] : [...t.modelValue].reverse()[0] === i[t.optionValueKey] : ((y = (d = D.value) == null ? void 0 : d[0]) == null ? void 0 : y[t.optionValueKey]) === i[t.optionValueKey];
|
|
673
662
|
});
|
|
674
663
|
f.value = a && a >= 0 ? a : 0;
|
|
675
664
|
}
|
|
676
665
|
function me(e, a = !0) {
|
|
677
|
-
var
|
|
678
|
-
a && !t.multiple && ue(() =>
|
|
679
|
-
const n = (
|
|
680
|
-
(
|
|
666
|
+
var y;
|
|
667
|
+
a && !t.multiple && ue(() => F()), h.value = "";
|
|
668
|
+
const n = (y = D.value) == null ? void 0 : y.some(
|
|
669
|
+
(K) => K[t.optionValueKey] === e[t.optionValueKey]
|
|
681
670
|
);
|
|
682
|
-
let i =
|
|
671
|
+
let i = D.value;
|
|
683
672
|
n && t.multiple ? i = i == null ? void 0 : i.filter(
|
|
684
|
-
(
|
|
673
|
+
(K) => K[t.optionValueKey] !== e[t.optionValueKey]
|
|
685
674
|
) : t.multiple ? i.push(e) : i = [e];
|
|
686
|
-
const d = i.map((
|
|
675
|
+
const d = i.map((K) => K[t.optionValueKey]);
|
|
687
676
|
s("update:model-value", t.multiple ? d : d[0]), s("selected-option", e), Ke(), ie(e), pe();
|
|
688
677
|
}
|
|
689
678
|
return (e, a) => ge((m(), k(
|
|
@@ -692,17 +681,17 @@ const Xe = ["for"], Ye = {
|
|
|
692
681
|
ref_key: "mazSelectElement",
|
|
693
682
|
ref: Y,
|
|
694
683
|
class: M(["m-select m-reset-css", [
|
|
695
|
-
{ "--is-open":
|
|
684
|
+
{ "--is-open": w.value, "--disabled": e.disabled, "--block": e.block },
|
|
696
685
|
t.class,
|
|
697
686
|
`--${e.size}`
|
|
698
687
|
]]),
|
|
699
688
|
style: ee([e.style, { "--keyboard-selected-bg-color": le.value, "--selected-bg-color": G.value, "--selected-text-color": R.value }])
|
|
700
689
|
},
|
|
701
690
|
[
|
|
702
|
-
|
|
703
|
-
id:
|
|
691
|
+
H(be, ze({
|
|
692
|
+
id: b(U),
|
|
704
693
|
ref_key: "mazInputComponent",
|
|
705
|
-
ref:
|
|
694
|
+
ref: q,
|
|
706
695
|
class: "m-select-input"
|
|
707
696
|
}, e.$attrs, {
|
|
708
697
|
required: e.required,
|
|
@@ -713,30 +702,30 @@ const Xe = ["for"], Ye = {
|
|
|
713
702
|
block: "",
|
|
714
703
|
autocomplete: e.autocomplete,
|
|
715
704
|
disabled: e.disabled,
|
|
716
|
-
onFocus:
|
|
717
|
-
onBlur: F
|
|
718
|
-
onClick:
|
|
705
|
+
onFocus: N(j, ["prevent", "stop"]),
|
|
706
|
+
onBlur: N(F, ["prevent", "stop"]),
|
|
707
|
+
onClick: N(j, ["prevent", "stop"]),
|
|
719
708
|
onChange: a[0] || (a[0] = (n) => s("change", n)),
|
|
720
709
|
onInput: a[1] || (a[1] = (n) => s("input", n)),
|
|
721
710
|
onKeydown: Be
|
|
722
711
|
}), {
|
|
723
712
|
"right-icon": te(() => [
|
|
724
|
-
|
|
713
|
+
T("button", {
|
|
725
714
|
tabindex: "-1",
|
|
726
715
|
type: "button",
|
|
727
716
|
class: "m-select-input__toggle-button maz-custom",
|
|
728
|
-
"aria-label": `${
|
|
729
|
-
onClick:
|
|
717
|
+
"aria-label": `${w.value ? "collapse" : "expand"} list of options`,
|
|
718
|
+
onClick: N(Ae, ["stop"])
|
|
730
719
|
}, [
|
|
731
|
-
|
|
732
|
-
], 8,
|
|
720
|
+
H(b(A), { class: "m-select-chevron maz-text-xl" })
|
|
721
|
+
], 8, et)
|
|
733
722
|
]),
|
|
734
723
|
_: 1
|
|
735
724
|
/* STABLE */
|
|
736
725
|
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "autocomplete", "disabled"]),
|
|
737
|
-
|
|
726
|
+
H(He, { name: o.value }, {
|
|
738
727
|
default: te(() => [
|
|
739
|
-
|
|
728
|
+
w.value ? (m(), k(
|
|
740
729
|
"div",
|
|
741
730
|
{
|
|
742
731
|
key: 0,
|
|
@@ -756,13 +745,13 @@ const Xe = ["for"], Ye = {
|
|
|
756
745
|
})
|
|
757
746
|
},
|
|
758
747
|
[
|
|
759
|
-
e.search ? (m(),
|
|
748
|
+
e.search ? (m(), L(be, {
|
|
760
749
|
key: 0,
|
|
761
750
|
ref_key: "searchInputComponent",
|
|
762
751
|
ref: x,
|
|
763
|
-
modelValue:
|
|
752
|
+
modelValue: h.value,
|
|
764
753
|
"onUpdate:modelValue": [
|
|
765
|
-
a[2] || (a[2] = (n) =>
|
|
754
|
+
a[2] || (a[2] = (n) => h.value = n),
|
|
766
755
|
a[4] || (a[4] = (n) => f.value = 0)
|
|
767
756
|
],
|
|
768
757
|
size: "sm",
|
|
@@ -774,28 +763,28 @@ const Xe = ["for"], Ye = {
|
|
|
774
763
|
autocomplete: "off",
|
|
775
764
|
tabindex: "-1",
|
|
776
765
|
class: "m-select-list__search-input maz-flex-none",
|
|
777
|
-
"left-icon":
|
|
766
|
+
"left-icon": b(v),
|
|
778
767
|
onKeydown: a[3] || (a[3] = (n) => fe(n, !1))
|
|
779
|
-
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) :
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
768
|
+
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : g("v-if", !0),
|
|
769
|
+
!$.value || $.value.length <= 0 ? P(e.$slots, "no-results", { key: 1 }, () => [
|
|
770
|
+
T("span", tt, [
|
|
771
|
+
H(b(E), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
783
772
|
])
|
|
784
|
-
], !0) : (m(), k("div",
|
|
773
|
+
], !0) : (m(), k("div", ot, [
|
|
785
774
|
(m(!0), k(
|
|
786
775
|
ye,
|
|
787
776
|
null,
|
|
788
|
-
|
|
777
|
+
Pe($.value, (n, i) => (m(), k(
|
|
789
778
|
ye,
|
|
790
779
|
{ key: i },
|
|
791
780
|
[
|
|
792
|
-
n.label && n.isOptGroup ?
|
|
781
|
+
n.label && n.isOptGroup ? P(e.$slots, "optgroup", {
|
|
793
782
|
key: 0,
|
|
794
783
|
label: n.label
|
|
795
784
|
}, () => [
|
|
796
|
-
|
|
785
|
+
T(
|
|
797
786
|
"span",
|
|
798
|
-
|
|
787
|
+
lt,
|
|
799
788
|
Q(n.label),
|
|
800
789
|
1
|
|
801
790
|
/* TEXT */
|
|
@@ -808,24 +797,24 @@ const Xe = ["for"], Ye = {
|
|
|
808
797
|
{
|
|
809
798
|
"--is-keyboard-selected": f.value === i,
|
|
810
799
|
"--is-selected": W(n),
|
|
811
|
-
"--is-none-value":
|
|
800
|
+
"--is-none-value": C(n[e.optionValueKey])
|
|
812
801
|
}
|
|
813
802
|
]]),
|
|
814
803
|
style: ee(e.itemHeight ? { height: `${e.itemHeight}px` } : void 0),
|
|
815
|
-
onClick:
|
|
804
|
+
onClick: N((d) => me(n), ["prevent", "stop"])
|
|
816
805
|
}, [
|
|
817
|
-
e.multiple ? (m(),
|
|
806
|
+
e.multiple ? (m(), L(b(c), {
|
|
818
807
|
key: 0,
|
|
819
808
|
tabindex: "-1",
|
|
820
809
|
"model-value": W(n),
|
|
821
810
|
size: "sm",
|
|
822
811
|
color: e.color
|
|
823
|
-
}, null, 8, ["model-value", "color"])) :
|
|
824
|
-
|
|
812
|
+
}, null, 8, ["model-value", "color"])) : g("v-if", !0),
|
|
813
|
+
P(e.$slots, "default", {
|
|
825
814
|
option: n,
|
|
826
815
|
isSelected: W(n)
|
|
827
816
|
}, () => [
|
|
828
|
-
|
|
817
|
+
T(
|
|
829
818
|
"span",
|
|
830
819
|
null,
|
|
831
820
|
Q(n[e.optionLabelKey]),
|
|
@@ -833,7 +822,7 @@ const Xe = ["for"], Ye = {
|
|
|
833
822
|
/* TEXT */
|
|
834
823
|
)
|
|
835
824
|
], !0)
|
|
836
|
-
], 14,
|
|
825
|
+
], 14, at))
|
|
837
826
|
],
|
|
838
827
|
64
|
|
839
828
|
/* STABLE_FRAGMENT */
|
|
@@ -845,7 +834,7 @@ const Xe = ["for"], Ye = {
|
|
|
845
834
|
],
|
|
846
835
|
6
|
|
847
836
|
/* CLASS, STYLE */
|
|
848
|
-
)) :
|
|
837
|
+
)) : g("v-if", !0)
|
|
849
838
|
]),
|
|
850
839
|
_: 3
|
|
851
840
|
/* FORWARDED */
|
|
@@ -854,15 +843,15 @@ const Xe = ["for"], Ye = {
|
|
|
854
843
|
6
|
|
855
844
|
/* CLASS, STYLE */
|
|
856
845
|
)), [
|
|
857
|
-
[
|
|
846
|
+
[b(Re), {
|
|
858
847
|
exclude: e.excludeSelectors,
|
|
859
|
-
handler:
|
|
848
|
+
handler: F
|
|
860
849
|
}]
|
|
861
850
|
]);
|
|
862
851
|
}
|
|
863
|
-
}),
|
|
852
|
+
}), it = /* @__PURE__ */ Se(nt, [["__scopeId", "data-v-98157b75"]]);
|
|
864
853
|
export {
|
|
865
|
-
|
|
854
|
+
it as M,
|
|
866
855
|
Se as _,
|
|
867
856
|
ke as u
|
|
868
857
|
};
|