maz-ui 3.37.3 → 3.37.4
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/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.d.ts +2 -2
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.d.ts +2 -0
- package/components/MazCard.mjs +1 -1
- package/components/MazCarousel.mjs +1 -1
- 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.d.ts +4 -4
- package/components/MazInputTags.mjs +1 -1
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +8 -4
- package/components/MazPhoneNumberInput/use-maz-phone-number-input.d.ts +2 -2
- package/components/MazPhoneNumberInput.d.ts +21 -8
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.d.ts +89 -92
- package/components/MazRadio.mjs +67 -73
- package/components/MazRadioButtons.d.ts +84 -62
- package/components/MazRadioButtons.mjs +112 -60
- package/components/MazSelect.d.ts +12 -7
- package/components/MazSelect.mjs +1 -1
- package/components/MazSwitch.d.ts +61 -67
- package/components/MazSwitch.mjs +41 -48
- package/components/MazTable.mjs +1 -1
- package/components/MazTextarea.d.ts +23 -8
- package/components/MazTextarea.mjs +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazCard.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazPagination.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazRadio.css +1 -1
- package/components/assets/MazRadioButtons.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazSwitch.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTextarea.css +1 -1
- package/components/chunks/{MazBottomSheet-DZ1n4bGL.mjs → MazBottomSheet-B9OYmgyx.mjs} +1 -1
- package/components/chunks/{MazBtn-CnZU5zlG.mjs → MazBtn-4stpYG-V.mjs} +8 -8
- package/components/chunks/{MazBtn-BJs3rzUf.mjs → MazBtn-BQZOiUux.mjs} +8 -8
- package/components/chunks/{MazBtn-DLYgzr9e.mjs → MazBtn-Bgt41rUb.mjs} +11 -11
- package/components/chunks/MazBtn-CNyFbl9Y.mjs +151 -0
- package/components/chunks/{MazBtn-BTHDxDz7.mjs → MazBtn-CrNEwd_M.mjs} +8 -8
- package/components/chunks/MazBtn-CyXtFeAh.mjs +151 -0
- package/components/chunks/{MazBtn-CnkBOGKK.mjs → MazBtn-DOtOjQOl.mjs} +11 -11
- package/components/chunks/{MazBtn-IH6bjzah.mjs → MazBtn-DXC8jXNK.mjs} +8 -8
- package/components/chunks/{MazBtn-Dbe098kd.mjs → MazBtn-De3ZeaJJ.mjs} +8 -8
- package/components/chunks/{MazBtn-CDQAW3fg.mjs → MazBtn-g6VJMuer.mjs} +8 -8
- package/components/chunks/MazBtn-v1mwE1O3.mjs +151 -0
- package/components/chunks/{MazBtn-pLRsSxug.mjs → MazBtn-z9IFp0ZS.mjs} +8 -8
- package/components/chunks/{MazCard-CNE9c3L5.mjs → MazCard-E9Eg2VRn.mjs} +10 -8
- package/components/chunks/{MazCarousel-CMJgMJf1.mjs → MazCarousel-CtSpgIm6.mjs} +1 -1
- package/components/chunks/{MazCheckbox-DJBo7Ejt.mjs → MazCheckbox-BE7eLIkK.mjs} +1 -1
- package/components/chunks/{MazCheckbox-CM7mucQa.mjs → MazCheckbox-eSSrvpn9.mjs} +1 -1
- package/components/chunks/{MazDialog-BVqOTysP.mjs → MazDialog-CjsC6fGo.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-BjciKAwR.mjs → MazDialogPromise-Blv60XZR.mjs} +2 -2
- package/components/chunks/{MazGallery-BUUq89aM.mjs → MazGallery-DRgvR7K0.mjs} +2 -2
- package/components/chunks/{MazIcon-BKfQ_rkt.mjs → MazIcon-C_IIdjqr.mjs} +1 -1
- package/components/chunks/{MazInput-Caas-0Nk.mjs → MazInput-Dn4JzYhe.mjs} +1 -1
- package/components/chunks/{MazInputNumber-CnoCQQzg.mjs → MazInputNumber-Df31nPnc.mjs} +2 -2
- package/components/chunks/{MazInputPrice---5nCUKm.mjs → MazInputPrice-DATyEiwP.mjs} +1 -1
- package/components/chunks/{MazInputTags-CipoVBP2.mjs → MazInputTags-DBzwE87F.mjs} +3 -3
- package/components/chunks/{MazPagination-CXw3yqbu.mjs → MazPagination-BU6fSHr2.mjs} +2 -2
- package/components/chunks/MazPhoneNumberInput-D8hP4ZzW.mjs +1419 -0
- package/components/chunks/{MazPicker-CfhI75aw.mjs → MazPicker-D71j9m8h.mjs} +2 -2
- package/components/chunks/{MazPickerCalendar-DnkNE-Am.mjs → MazPickerCalendar-psuBcTR7.mjs} +3 -3
- package/components/chunks/{MazPickerHeader-Vt86yzXS.mjs → MazPickerHeader-BmqHJE0a.mjs} +1 -1
- package/components/chunks/{MazPickerMonthSwitcher-zfKhsjW1.mjs → MazPickerMonthSwitcher-DgU0pLkF.mjs} +2 -2
- package/components/chunks/{MazPickerShortcuts-DUIKfOO8.mjs → MazPickerShortcuts-D9YXi3Ns.mjs} +2 -2
- package/components/chunks/{MazPickerTime-B2znRxr2.mjs → MazPickerTime-8ZqSEb_N.mjs} +2 -2
- package/components/chunks/{MazPickerYearSwitcher-CB339kof.mjs → MazPickerYearSwitcher-D-zu0tMs.mjs} +3 -3
- package/components/chunks/MazSelect-Cc8JAFML.mjs +731 -0
- package/components/chunks/{MazSpinner-DFseK3o_.mjs → MazSpinner-2-OAJWTi.mjs} +1 -1
- package/components/chunks/MazSpinner-B0xEVmcj.mjs +38 -0
- package/components/chunks/{MazSpinner-2fDI3i5h.mjs → MazSpinner-B3Gt0AEt.mjs} +1 -1
- package/components/chunks/MazSpinner-B6Z6X_KC.mjs +38 -0
- package/components/chunks/{MazSpinner-CORsBFCP.mjs → MazSpinner-BVaJBGw5.mjs} +1 -1
- package/components/chunks/{MazSpinner-CVBVegaS.mjs → MazSpinner-BVflp3wp.mjs} +1 -1
- package/components/chunks/MazSpinner-BmqyUsTZ.mjs +38 -0
- package/components/chunks/{MazSpinner-XMLkiLTL.mjs → MazSpinner-Btk7fYzq.mjs} +1 -1
- package/components/chunks/{MazSpinner-BtFWH26r.mjs → MazSpinner-CAQqdZfW.mjs} +1 -1
- package/components/chunks/MazSpinner-COqX5baD.mjs +38 -0
- package/components/chunks/{MazSpinner-Bky73siD.mjs → MazSpinner-CV3h3CKR.mjs} +1 -1
- package/components/chunks/MazSpinner-Cm5GeVV-.mjs +38 -0
- package/components/chunks/{MazSpinner-CkHAaRhk.mjs → MazSpinner-D9uDPRkX.mjs} +1 -1
- package/components/chunks/MazSpinner-DO1id61e.mjs +38 -0
- package/components/chunks/MazSpinner-K26cuR_A.mjs +38 -0
- package/components/chunks/MazSpinner-LCpiZGMP.mjs +38 -0
- package/components/chunks/MazTable-vcm_SC7e.mjs +1846 -0
- package/components/chunks/{MazTransitionExpand-BWsQP7UF.mjs → MazTransitionExpand-DXKtquVe.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/chunks/{MazBtn-BxYYeNGe.mjs → MazBtn-CNsgLyRm.mjs} +8 -8
- package/modules/chunks/{MazBtn-CHUwa3fu.cjs → MazBtn-DmXrGuUE.cjs} +2 -2
- package/modules/chunks/{MazIcon-CnOCvJTw.mjs → MazIcon-DwRWkhhR.mjs} +1 -1
- package/modules/chunks/{MazIcon-DcbutTbM.cjs → MazIcon-rh9PwwaQ.cjs} +1 -1
- package/modules/chunks/{MazSpinner-TL9_4BOs.cjs → MazSpinner-BzucVZXm.cjs} +1 -1
- package/modules/chunks/{MazSpinner-ClFhZyF_.mjs → MazSpinner-mCJd14Kq.mjs} +1 -1
- package/modules/chunks/{index-DksGhf51.cjs → index-DHsybBwE.cjs} +1 -1
- package/modules/chunks/{index-_xAQ9uTd.mjs → index-DrSSNP9y.mjs} +2 -2
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/nuxt/index.mjs +5 -5
- package/package.json +6 -6
- package/types/components/MazBtn.vue.d.ts +2 -2
- package/types/components/MazCard.vue.d.ts +2 -0
- package/types/components/MazInputTags.vue.d.ts +4 -4
- package/types/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +8 -4
- package/types/components/MazPhoneNumberInput/use-maz-phone-number-input.d.ts +2 -2
- package/types/components/MazPhoneNumberInput.vue.d.ts +21 -8
- package/types/components/MazRadio.vue.d.ts +89 -92
- package/types/components/MazRadioButtons.vue.d.ts +84 -62
- package/types/components/MazSelect.vue.d.ts +12 -7
- package/types/components/MazSwitch.vue.d.ts +61 -67
- package/types/components/MazTextarea.vue.d.ts +23 -8
- package/components/chunks/MazBtn-Cpnby6Lb.mjs +0 -151
- package/components/chunks/MazBtn-D5q0p_mK.mjs +0 -151
- package/components/chunks/MazBtn-Koayc6g_.mjs +0 -151
- package/components/chunks/MazPhoneNumberInput-BDiyO_6j.mjs +0 -1423
- package/components/chunks/MazSelect-Cr1xT89o.mjs +0 -767
- package/components/chunks/MazSpinner-CdKm_Lcp.mjs +0 -38
- package/components/chunks/MazSpinner-CkdjTE0y.mjs +0 -38
- package/components/chunks/MazSpinner-CtMh7fIX.mjs +0 -38
- package/components/chunks/MazSpinner-DECa8Pby.mjs +0 -38
- package/components/chunks/MazSpinner-DMBy6mx3.mjs +0 -38
- package/components/chunks/MazSpinner-DPmNDRtT.mjs +0 -38
- package/components/chunks/MazSpinner-Dq4o-_GM.mjs +0 -38
- package/components/chunks/MazSpinner-DyE_USVF.mjs +0 -38
- package/components/chunks/MazTable-CIlP0a61.mjs +0 -1882
|
@@ -1,767 +0,0 @@
|
|
|
1
|
-
import '../assets/MazSelect.css';
|
|
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
|
-
function Qe(i, r) {
|
|
4
|
-
let u;
|
|
5
|
-
return function(...p) {
|
|
6
|
-
clearTimeout(u), u = setTimeout(() => {
|
|
7
|
-
i.apply(this, p);
|
|
8
|
-
}, r);
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
const ke = ({
|
|
12
|
-
componentName: i,
|
|
13
|
-
providedId: r
|
|
14
|
-
}) => {
|
|
15
|
-
const u = De();
|
|
16
|
-
return c(() => r ?? `${i}-${u == null ? void 0 : u.uid}`);
|
|
17
|
-
}, Re = {
|
|
18
|
-
key: 0,
|
|
19
|
-
class: "m-input-wrapper-left"
|
|
20
|
-
}, We = { class: "m-input-wrapper-input" }, je = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], Ge = { key: 0 }, Ze = {
|
|
21
|
-
key: 1,
|
|
22
|
-
class: "m-input-wrapper-right"
|
|
23
|
-
}, Je = /* @__PURE__ */ be({
|
|
24
|
-
inheritAttrs: !1,
|
|
25
|
-
__name: "MazInput",
|
|
26
|
-
props: {
|
|
27
|
-
style: { default: void 0 },
|
|
28
|
-
class: { default: void 0 },
|
|
29
|
-
modelValue: { type: [String, Number, null, Boolean], default: void 0 },
|
|
30
|
-
placeholder: { default: void 0 },
|
|
31
|
-
label: { default: void 0 },
|
|
32
|
-
name: { default: void 0 },
|
|
33
|
-
color: { default: "primary" },
|
|
34
|
-
type: { default: "text" },
|
|
35
|
-
required: { type: Boolean, default: !1 },
|
|
36
|
-
disabled: { type: Boolean, default: !1 },
|
|
37
|
-
readonly: { type: Boolean, default: !1 },
|
|
38
|
-
id: { default: void 0 },
|
|
39
|
-
error: { type: Boolean, default: !1 },
|
|
40
|
-
success: { type: Boolean, default: !1 },
|
|
41
|
-
warning: { type: Boolean, default: !1 },
|
|
42
|
-
hint: { default: void 0 },
|
|
43
|
-
inputClasses: { default: void 0 },
|
|
44
|
-
noBorder: { type: Boolean, default: !1 },
|
|
45
|
-
noRadius: { type: Boolean, default: !1 },
|
|
46
|
-
inputmode: { default: "text" },
|
|
47
|
-
size: { default: "md" },
|
|
48
|
-
debounce: { type: [Boolean, Number], default: !1 },
|
|
49
|
-
debounceDelay: { default: 500 },
|
|
50
|
-
validButton: { type: Boolean, default: !1 },
|
|
51
|
-
validButtonLoading: { type: Boolean, default: !1 },
|
|
52
|
-
autoFocus: { type: Boolean, default: !1 },
|
|
53
|
-
borderActive: { type: Boolean, default: !1 },
|
|
54
|
-
leftIcon: { default: void 0 },
|
|
55
|
-
rightIcon: { default: void 0 },
|
|
56
|
-
roundedSize: { default: void 0 },
|
|
57
|
-
block: { type: Boolean }
|
|
58
|
-
},
|
|
59
|
-
emits: ["update:model-value", "focus", "blur", "click", "change"],
|
|
60
|
-
setup(i, { emit: r }) {
|
|
61
|
-
const u = $(() => import("./MazBtn-BJs3rzUf.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({
|
|
62
|
-
componentName: "MazInput",
|
|
63
|
-
providedId: s.id
|
|
64
|
-
});
|
|
65
|
-
Te(() => {
|
|
66
|
-
var o;
|
|
67
|
-
s.autoFocus && ((o = W.value) == null || o.focus());
|
|
68
|
-
});
|
|
69
|
-
const j = c(() => s.type === "password"), I = c(() => f.value ? "text" : s.type), te = c(() => {
|
|
70
|
-
if (!s.noBorder) {
|
|
71
|
-
if (s.error)
|
|
72
|
-
return "maz-border-danger";
|
|
73
|
-
if (s.success)
|
|
74
|
-
return "maz-border-success";
|
|
75
|
-
if (s.warning)
|
|
76
|
-
return "maz-border-warning";
|
|
77
|
-
if (K.value || s.borderActive) {
|
|
78
|
-
if (s.color === "black")
|
|
79
|
-
return "maz-border-black";
|
|
80
|
-
if (s.color === "danger")
|
|
81
|
-
return "maz-border-danger";
|
|
82
|
-
if (s.color === "info")
|
|
83
|
-
return "maz-border-info";
|
|
84
|
-
if (s.color === "primary")
|
|
85
|
-
return "maz-border-primary";
|
|
86
|
-
if (s.color === "secondary")
|
|
87
|
-
return "maz-border-secondary";
|
|
88
|
-
if (s.color === "success")
|
|
89
|
-
return "maz-border-success";
|
|
90
|
-
if (s.color === "warning")
|
|
91
|
-
return "maz-border-warning";
|
|
92
|
-
if (s.color === "white")
|
|
93
|
-
return "maz-border-white";
|
|
94
|
-
}
|
|
95
|
-
return "--default-border";
|
|
96
|
-
}
|
|
97
|
-
}), N = Ne(), G = c(() => {
|
|
98
|
-
const { required: o, placeholder: z } = s;
|
|
99
|
-
if (z)
|
|
100
|
-
return o ? `${z} *` : z;
|
|
101
|
-
}), M = c(() => S.value !== void 0 && S.value !== ""), E = Qe(
|
|
102
|
-
(o) => {
|
|
103
|
-
S.value = o;
|
|
104
|
-
},
|
|
105
|
-
typeof s.debounce == "number" ? s.debounce : s.debounceDelay ?? 500
|
|
106
|
-
), S = c({
|
|
107
|
-
get: () => s.modelValue,
|
|
108
|
-
set: (o) => {
|
|
109
|
-
if (s.debounce)
|
|
110
|
-
return E(o);
|
|
111
|
-
k("update:model-value", o);
|
|
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);
|
|
114
|
-
function L() {
|
|
115
|
-
return !!N["right-icon"] || j.value || !!N["valid-button"] || s.validButton || !!s.rightIcon;
|
|
116
|
-
}
|
|
117
|
-
function q() {
|
|
118
|
-
return !!N["left-icon"] || !!s.leftIcon;
|
|
119
|
-
}
|
|
120
|
-
function le(o) {
|
|
121
|
-
k("focus", o), K.value = !0;
|
|
122
|
-
}
|
|
123
|
-
function ae(o) {
|
|
124
|
-
k("blur", o), K.value = !1;
|
|
125
|
-
}
|
|
126
|
-
function D(o) {
|
|
127
|
-
return k("change", o);
|
|
128
|
-
}
|
|
129
|
-
return (o, z) => (v(), w(
|
|
130
|
-
"div",
|
|
131
|
-
{
|
|
132
|
-
class: H(["m-input", [
|
|
133
|
-
{
|
|
134
|
-
"--is-focused": K.value || o.borderActive,
|
|
135
|
-
"--should-up": Z.value,
|
|
136
|
-
"--has-label": J.value,
|
|
137
|
-
"--is-disabled": o.disabled,
|
|
138
|
-
"--is-readonly": o.readonly,
|
|
139
|
-
"--has-z-2": o.error || o.warning || o.success,
|
|
140
|
-
"--has-state": o.error || o.warning || o.success,
|
|
141
|
-
"--block": o.block
|
|
142
|
-
},
|
|
143
|
-
s.class,
|
|
144
|
-
`--${o.color}`,
|
|
145
|
-
`--${o.size}`
|
|
146
|
-
]]),
|
|
147
|
-
style: X(o.style)
|
|
148
|
-
},
|
|
149
|
-
[
|
|
150
|
-
T(
|
|
151
|
-
"div",
|
|
152
|
-
{
|
|
153
|
-
class: H(["m-input-wrapper", [
|
|
154
|
-
o.inputClasses,
|
|
155
|
-
te.value,
|
|
156
|
-
o.roundedSize ? `--rounded-${o.roundedSize}` : { "maz-rounded": !o.noRadius }
|
|
157
|
-
]])
|
|
158
|
-
},
|
|
159
|
-
[
|
|
160
|
-
q() ? (v(), w("div", Re, [
|
|
161
|
-
h(`
|
|
162
|
-
@slot left-icon - The icon to display on the left of the input
|
|
163
|
-
`),
|
|
164
|
-
o.$slots["left-icon"] || o.leftIcon ? U(o.$slots, "left-icon", { key: 0 }, () => [
|
|
165
|
-
typeof o.leftIcon == "string" ? (v(), C(g(p), {
|
|
166
|
-
key: 0,
|
|
167
|
-
name: o.leftIcon,
|
|
168
|
-
class: "maz-text-xl maz-text-muted"
|
|
169
|
-
}, null, 8, ["name"])) : o.leftIcon ? (v(), C(me(o.leftIcon), {
|
|
170
|
-
key: 1,
|
|
171
|
-
class: "maz-text-xl maz-text-muted"
|
|
172
|
-
})) : h("v-if", !0)
|
|
173
|
-
], !0) : h("v-if", !0)
|
|
174
|
-
])) : h("v-if", !0),
|
|
175
|
-
T("div", We, [
|
|
176
|
-
ge(T("input", ze({
|
|
177
|
-
id: g(ee),
|
|
178
|
-
ref_key: "input",
|
|
179
|
-
ref: W,
|
|
180
|
-
"onUpdate:modelValue": z[0] || (z[0] = (A) => S.value = A),
|
|
181
|
-
type: I.value,
|
|
182
|
-
name: o.name
|
|
183
|
-
}, o.$attrs, {
|
|
184
|
-
inputmode: o.inputmode,
|
|
185
|
-
placeholder: G.value,
|
|
186
|
-
"aria-label": o.label || o.placeholder,
|
|
187
|
-
disabled: o.disabled,
|
|
188
|
-
readonly: o.readonly,
|
|
189
|
-
required: o.required,
|
|
190
|
-
class: "m-input-input"
|
|
191
|
-
}, Ee({
|
|
192
|
-
blur: ae,
|
|
193
|
-
focus: le,
|
|
194
|
-
change: D
|
|
195
|
-
}, !0), {
|
|
196
|
-
onClick: z[1] || (z[1] = (A) => o.$emit("click", A))
|
|
197
|
-
}), null, 16, je), [
|
|
198
|
-
[Pe, S.value]
|
|
199
|
-
]),
|
|
200
|
-
o.label || o.hint ? (v(), w(
|
|
201
|
-
"span",
|
|
202
|
-
{
|
|
203
|
-
key: 0,
|
|
204
|
-
ref: "label",
|
|
205
|
-
class: H(["m-input-label", [
|
|
206
|
-
{
|
|
207
|
-
"maz-text-danger-600": o.error,
|
|
208
|
-
"maz-text-success-600": o.success,
|
|
209
|
-
"maz-text-warning-600": o.warning
|
|
210
|
-
}
|
|
211
|
-
]])
|
|
212
|
-
},
|
|
213
|
-
[
|
|
214
|
-
Fe(
|
|
215
|
-
ue(o.hint || o.label) + " ",
|
|
216
|
-
1
|
|
217
|
-
/* TEXT */
|
|
218
|
-
),
|
|
219
|
-
o.required ? (v(), w("sup", Ge, "*")) : h("v-if", !0)
|
|
220
|
-
],
|
|
221
|
-
2
|
|
222
|
-
/* CLASS */
|
|
223
|
-
)) : h("v-if", !0)
|
|
224
|
-
]),
|
|
225
|
-
L() ? (v(), w("div", Ze, [
|
|
226
|
-
h(`
|
|
227
|
-
@slot right-icon - The icon to display on the right of the input
|
|
228
|
-
`),
|
|
229
|
-
o.$slots["right-icon"] || o.rightIcon ? U(o.$slots, "right-icon", { key: 0 }, () => [
|
|
230
|
-
typeof o.rightIcon == "string" ? (v(), C(g(p), {
|
|
231
|
-
key: 0,
|
|
232
|
-
name: o.rightIcon,
|
|
233
|
-
class: "maz-text-xl maz-text-muted"
|
|
234
|
-
}, null, 8, ["name"])) : o.rightIcon ? (v(), C(me(o.rightIcon), {
|
|
235
|
-
key: 1,
|
|
236
|
-
class: "maz-text-xl maz-text-muted"
|
|
237
|
-
})) : h("v-if", !0)
|
|
238
|
-
], !0) : h("v-if", !0),
|
|
239
|
-
j.value ? (v(), C(g(u), {
|
|
240
|
-
key: 1,
|
|
241
|
-
color: "transparent",
|
|
242
|
-
tabindex: "-1",
|
|
243
|
-
size: "mini",
|
|
244
|
-
onClick: z[2] || (z[2] = F((A) => f.value = !f.value, ["stop"]))
|
|
245
|
-
}, {
|
|
246
|
-
default: x(() => [
|
|
247
|
-
f.value ? (v(), C(g(y), {
|
|
248
|
-
key: 0,
|
|
249
|
-
class: "maz-text-xl maz-text-muted"
|
|
250
|
-
})) : (v(), C(g(d), {
|
|
251
|
-
key: 1,
|
|
252
|
-
class: "maz-text-xl maz-text-muted"
|
|
253
|
-
}))
|
|
254
|
-
]),
|
|
255
|
-
_: 1
|
|
256
|
-
/* STABLE */
|
|
257
|
-
})) : h("v-if", !0),
|
|
258
|
-
h(`
|
|
259
|
-
@slot valid-button - Replace the valid button by your own
|
|
260
|
-
`),
|
|
261
|
-
o.$slots["valid-button"] || o.validButton ? U(o.$slots, "valid-button", { key: 2 }, () => [
|
|
262
|
-
O(g(u), {
|
|
263
|
-
color: "transparent",
|
|
264
|
-
disabled: o.disabled,
|
|
265
|
-
tabindex: "-1",
|
|
266
|
-
loading: o.validButtonLoading,
|
|
267
|
-
class: "m-input-valid-button",
|
|
268
|
-
size: "mini",
|
|
269
|
-
type: "submit"
|
|
270
|
-
}, {
|
|
271
|
-
default: x(() => [
|
|
272
|
-
O(g(t), { class: "maz-text-2xl maz-text-normal" })
|
|
273
|
-
]),
|
|
274
|
-
_: 1
|
|
275
|
-
/* STABLE */
|
|
276
|
-
}, 8, ["disabled", "loading"])
|
|
277
|
-
], !0) : h("v-if", !0)
|
|
278
|
-
])) : h("v-if", !0)
|
|
279
|
-
],
|
|
280
|
-
2
|
|
281
|
-
/* CLASS */
|
|
282
|
-
)
|
|
283
|
-
],
|
|
284
|
-
6
|
|
285
|
-
/* CLASS, STYLE */
|
|
286
|
-
));
|
|
287
|
-
}
|
|
288
|
-
}), Ve = (i, r) => {
|
|
289
|
-
const u = i.__vccOpts || i;
|
|
290
|
-
for (const [p, y] of r)
|
|
291
|
-
u[p] = y;
|
|
292
|
-
return u;
|
|
293
|
-
}, ye = /* @__PURE__ */ Ve(Je, [["__scopeId", "data-v-78090be8"]]);
|
|
294
|
-
let ie = null;
|
|
295
|
-
function Xe(i, r) {
|
|
296
|
-
ie && clearTimeout(ie), ie = setTimeout(i, r);
|
|
297
|
-
}
|
|
298
|
-
const _ = "__maz-click-outside__", we = () => document.ontouchstart === null ? "touchstart" : "click";
|
|
299
|
-
async function Ie(i, r) {
|
|
300
|
-
try {
|
|
301
|
-
Ke(i);
|
|
302
|
-
const u = r.instance, p = r.value, y = typeof p == "function";
|
|
303
|
-
if (!y)
|
|
304
|
-
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
305
|
-
await Y(), i[_] = (t) => {
|
|
306
|
-
if ((!i || t.target && !i.contains(t.target)) && p && y)
|
|
307
|
-
return p.call(u, t);
|
|
308
|
-
};
|
|
309
|
-
const d = we();
|
|
310
|
-
document.addEventListener(d, i[_], { passive: !0 });
|
|
311
|
-
} catch (u) {
|
|
312
|
-
console.error("[maz-ui](vClickOutside)", u);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
function Ke(i) {
|
|
316
|
-
try {
|
|
317
|
-
const r = we();
|
|
318
|
-
document.removeEventListener(r, i[_], !1), delete i[_];
|
|
319
|
-
} catch (r) {
|
|
320
|
-
console.error("[maz-ui](vClickOutside)", r);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
function Ye(i, r) {
|
|
324
|
-
try {
|
|
325
|
-
if (r.value === r.oldValue)
|
|
326
|
-
return;
|
|
327
|
-
Ie(i, r);
|
|
328
|
-
} catch (u) {
|
|
329
|
-
console.error("[maz-ui](vClickOutside)", u);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
const xe = {
|
|
333
|
-
mounted: Ie,
|
|
334
|
-
updated: Ye,
|
|
335
|
-
unmounted: Ke
|
|
336
|
-
};
|
|
337
|
-
function _e(i, r) {
|
|
338
|
-
const u = i.length, p = r.length, y = [];
|
|
339
|
-
for (let d = 0; d <= u; d++)
|
|
340
|
-
y[d] = [d];
|
|
341
|
-
for (let d = 0; d <= p; d++)
|
|
342
|
-
y[0][d] = d;
|
|
343
|
-
for (let d = 1; d <= u; d++)
|
|
344
|
-
for (let t = 1; t <= p; t++) {
|
|
345
|
-
const s = i[d - 1] === r[t - 1] ? 0 : 1;
|
|
346
|
-
y[d][t] = Math.min(
|
|
347
|
-
y[d - 1][t] + 1,
|
|
348
|
-
y[d][t - 1] + 1,
|
|
349
|
-
y[d - 1][t - 1] + s
|
|
350
|
-
);
|
|
351
|
-
}
|
|
352
|
-
return y[u][p];
|
|
353
|
-
}
|
|
354
|
-
function he(i) {
|
|
355
|
-
return i.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").toLowerCase();
|
|
356
|
-
}
|
|
357
|
-
function Be(i, r) {
|
|
358
|
-
const u = _e(i, r), p = Math.max(i.length, r.length);
|
|
359
|
-
return 1 - u / p;
|
|
360
|
-
}
|
|
361
|
-
function et(i, r, u = 0.75) {
|
|
362
|
-
return Be(i, r) >= u;
|
|
363
|
-
}
|
|
364
|
-
function re(i, r, u = 0.75) {
|
|
365
|
-
const p = c(
|
|
366
|
-
() => he(typeof i == "string" ? i : i.value)
|
|
367
|
-
), y = c(
|
|
368
|
-
() => he(typeof r == "string" ? r : r.value)
|
|
369
|
-
), d = c(() => typeof u == "number" ? u : u.value), t = c(() => Be(p.value, y.value));
|
|
370
|
-
return {
|
|
371
|
-
isMatching: c(
|
|
372
|
-
() => et(p.value, y.value, d.value)
|
|
373
|
-
),
|
|
374
|
-
score: t
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
const tt = ["aria-label"], ot = { class: "m-select-list__no-results" }, lt = {
|
|
378
|
-
key: 2,
|
|
379
|
-
class: "m-select-list__scroll-wrapper",
|
|
380
|
-
tabindex: "-1"
|
|
381
|
-
}, at = { class: "m-select-list-optgroup" }, nt = ["onClick"], st = /* @__PURE__ */ be({
|
|
382
|
-
inheritAttrs: !1,
|
|
383
|
-
__name: "MazSelect",
|
|
384
|
-
props: {
|
|
385
|
-
style: { default: void 0 },
|
|
386
|
-
class: { default: void 0 },
|
|
387
|
-
id: { default: void 0 },
|
|
388
|
-
modelValue: { type: [String, Number, null, Boolean, Array], default: void 0 },
|
|
389
|
-
options: { default: void 0 },
|
|
390
|
-
optionValueKey: { default: "value" },
|
|
391
|
-
optionLabelKey: { default: "label" },
|
|
392
|
-
optionInputValueKey: { default: "label" },
|
|
393
|
-
listPosition: { default: "bottom left" },
|
|
394
|
-
itemHeight: { default: void 0 },
|
|
395
|
-
maxListHeight: { default: 240 },
|
|
396
|
-
maxListWidth: { default: void 0 },
|
|
397
|
-
size: { default: "md" },
|
|
398
|
-
color: { default: "primary" },
|
|
399
|
-
search: { type: Boolean },
|
|
400
|
-
searchPlaceholder: { default: "Search in options" },
|
|
401
|
-
open: { type: Boolean },
|
|
402
|
-
multiple: { type: Boolean },
|
|
403
|
-
required: { type: Boolean },
|
|
404
|
-
disabled: { type: Boolean },
|
|
405
|
-
block: { type: Boolean }
|
|
406
|
-
},
|
|
407
|
-
emits: ["close", "open", "blur", "focus", "change", "update:model-value", "selected-option"],
|
|
408
|
-
setup(i, { emit: r }) {
|
|
409
|
-
Oe((e) => ({
|
|
410
|
-
"4ce1fbd6": j.value,
|
|
411
|
-
"3d1b8a94": W.value,
|
|
412
|
-
"12d1f1fc": ee.value
|
|
413
|
-
}));
|
|
414
|
-
const u = $(() => import("./MazCheckbox-DJBo7Ejt.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(
|
|
415
|
-
() => ["black", "transparent", "white"].includes(t.color)
|
|
416
|
-
), W = c(
|
|
417
|
-
() => K.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
|
|
418
|
-
), ee = c(
|
|
419
|
-
() => K.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
|
|
420
|
-
), j = c(
|
|
421
|
-
() => K.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
|
|
422
|
-
), I = c(() => k.value || t.open), te = ke({
|
|
423
|
-
componentName: "MazSelect",
|
|
424
|
-
providedId: t.id
|
|
425
|
-
});
|
|
426
|
-
function N(e) {
|
|
427
|
-
return {
|
|
428
|
-
[t.optionValueKey]: e,
|
|
429
|
-
[t.optionLabelKey]: e,
|
|
430
|
-
[t.optionInputValueKey]: e
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
function G(e) {
|
|
434
|
-
return {
|
|
435
|
-
...e,
|
|
436
|
-
[t.optionValueKey]: e[t.optionValueKey],
|
|
437
|
-
[t.optionLabelKey]: e[t.optionLabelKey],
|
|
438
|
-
[t.optionInputValueKey]: e[t.optionInputValueKey]
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
const M = c(() => {
|
|
442
|
-
var l;
|
|
443
|
-
const e = [];
|
|
444
|
-
if (!((l = t.options) != null && l.length))
|
|
445
|
-
return [];
|
|
446
|
-
for (const a of t.options)
|
|
447
|
-
typeof a == "string" || typeof a == "number" || typeof a == "boolean" ? e.push(N(a)) : "options" in a && Array.isArray(a.options) ? e.push(
|
|
448
|
-
{ label: a.label, isOptGroup: !0 },
|
|
449
|
-
...a.options.map(
|
|
450
|
-
(n) => typeof n == "string" || typeof n == "number" || typeof n == "boolean" ? N(n) : G(n)
|
|
451
|
-
)
|
|
452
|
-
) : e.push(G(a));
|
|
453
|
-
return e;
|
|
454
|
-
}), E = c(
|
|
455
|
-
() => {
|
|
456
|
-
var e;
|
|
457
|
-
return ((e = M.value) == null ? void 0 : e.filter((l) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(l[t.optionValueKey]) && !L(l[t.optionValueKey]) : !1 : t.modelValue === l[t.optionValueKey] && !L(l[t.optionValueKey]))) ?? [];
|
|
458
|
-
}
|
|
459
|
-
);
|
|
460
|
-
He(() => {
|
|
461
|
-
var e;
|
|
462
|
-
(e = t.options) != null && e.length || console.warn("[maz-ui](MazSelect) you must provide options"), se();
|
|
463
|
-
});
|
|
464
|
-
const oe = V(), S = V(), Z = V(), J = V(), L = (e) => e == null;
|
|
465
|
-
function q(e) {
|
|
466
|
-
var a;
|
|
467
|
-
return (((a = E.value) == null ? void 0 : a.some(
|
|
468
|
-
(n) => n[t.optionValueKey] === e[t.optionValueKey]
|
|
469
|
-
)) ?? !1) && !L(e[t.optionValueKey]);
|
|
470
|
-
}
|
|
471
|
-
const le = c(() => {
|
|
472
|
-
var l;
|
|
473
|
-
if (t.multiple && t.modelValue && Array.isArray(t.modelValue))
|
|
474
|
-
return t.modelValue.map(
|
|
475
|
-
(a) => {
|
|
476
|
-
var n, m;
|
|
477
|
-
return (m = (n = M.value) == null ? void 0 : n.find((b) => b[t.optionValueKey] === a)) == null ? void 0 : m[t.optionInputValueKey];
|
|
478
|
-
}
|
|
479
|
-
).join(", ");
|
|
480
|
-
const e = (l = M.value) == null ? void 0 : l.find(
|
|
481
|
-
(a) => a[t.optionValueKey] === t.modelValue
|
|
482
|
-
);
|
|
483
|
-
return L(t.modelValue) || e == null ? void 0 : e[t.optionInputValueKey];
|
|
484
|
-
}), ae = c(
|
|
485
|
-
() => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
486
|
-
), D = V(""), o = V("");
|
|
487
|
-
function z(e) {
|
|
488
|
-
return e.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").replaceAll(/[^\dA-Za-z\u0400-\u04FF]/g, "");
|
|
489
|
-
}
|
|
490
|
-
const A = (e, l) => l && e && z(e.toString().toLocaleLowerCase().trim()).includes(
|
|
491
|
-
z(l.toLocaleLowerCase().trim())
|
|
492
|
-
);
|
|
493
|
-
function de(e) {
|
|
494
|
-
var l;
|
|
495
|
-
return e ? (l = M.value) == null ? void 0 : l.filter((a) => {
|
|
496
|
-
const n = a[t.optionLabelKey], m = a[t.optionValueKey], b = a[t.optionInputValueKey];
|
|
497
|
-
return A(n, e) || A(b, e) || A(m, e) || typeof n == "string" && re(n, e).isMatching.value || typeof b == "string" && re(b, e).isMatching.value || typeof m == "string" && re(m, e).isMatching.value;
|
|
498
|
-
}) : M.value;
|
|
499
|
-
}
|
|
500
|
-
const B = c(() => de(D.value));
|
|
501
|
-
async function Q(e) {
|
|
502
|
-
var l;
|
|
503
|
-
if (I.value) {
|
|
504
|
-
if (e && ("relatedTarget" in e && ((l = oe.value) != null && l.contains(e.relatedTarget)) || e.type === "keydown"))
|
|
505
|
-
return e.preventDefault();
|
|
506
|
-
await Y(), k.value = !1, f.value = 0, s("close", e);
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
async function R(e) {
|
|
510
|
-
t.disabled || I.value || (e == null || e.preventDefault(), k.value = !0, await ne(), s("focus", e), s("open", k.value));
|
|
511
|
-
}
|
|
512
|
-
function ce() {
|
|
513
|
-
var e, l;
|
|
514
|
-
(l = ((e = S.value) == null ? void 0 : e.$el).querySelector("input")) == null || l.focus();
|
|
515
|
-
}
|
|
516
|
-
function Ce(e) {
|
|
517
|
-
k.value ? Q(e) : ce();
|
|
518
|
-
}
|
|
519
|
-
function $e(e) {
|
|
520
|
-
var l, a;
|
|
521
|
-
D.value = e, (a = ((l = Z.value) == null ? void 0 : l.$el).querySelector("input")) == null || a.focus();
|
|
522
|
-
}
|
|
523
|
-
function Se(e) {
|
|
524
|
-
var a;
|
|
525
|
-
e === "Backspace" && o.value.length > 0 ? o.value = o.value.slice(0, -1) : o.value += e;
|
|
526
|
-
const l = de(o.value);
|
|
527
|
-
l != null && l.length && (f.value = (a = B.value) == null ? void 0 : a.findIndex(
|
|
528
|
-
(n) => n[t.optionValueKey] === l[0][t.optionValueKey]
|
|
529
|
-
), typeof f.value == "number" && f.value >= 0 && ne(f.value)), Xe(() => {
|
|
530
|
-
o.value = "";
|
|
531
|
-
}, 1e3);
|
|
532
|
-
}
|
|
533
|
-
const Le = (e) => {
|
|
534
|
-
const l = e.key;
|
|
535
|
-
/^[\dA-Za-z\u0400-\u04FF]$/.test(l) ? (e.preventDefault(), R(e), t.search ? $e(l) : Se(l)) : pe(e);
|
|
536
|
-
}, pe = (e) => {
|
|
537
|
-
const l = e.code, a = ["ArrowUp", "ArrowDown"].includes(l), n = ["Enter", "Space"].includes(l), m = l === "Escape" && I.value;
|
|
538
|
-
a ? Ae(e, f.value) : n ? Me(e, f.value) : m && Q();
|
|
539
|
-
}, Ae = (e, l) => {
|
|
540
|
-
var m;
|
|
541
|
-
e.preventDefault();
|
|
542
|
-
const a = e.code;
|
|
543
|
-
I.value || R(e);
|
|
544
|
-
const n = (m = B.value) == null ? void 0 : m.length;
|
|
545
|
-
n && (typeof l == "number" ? l === n - 1 && a === "ArrowDown" ? f.value = 0 : l === 0 && a === "ArrowUp" ? f.value = n - 1 : f.value = a === "ArrowDown" ? l + 1 : l - 1 : f.value = a === "ArrowDown" ? 0 : n - 1, ne(f.value));
|
|
546
|
-
}, Me = (e, l) => {
|
|
547
|
-
var n, m, b;
|
|
548
|
-
if (e.preventDefault(), !I.value)
|
|
549
|
-
return R(e);
|
|
550
|
-
const a = l ? ((n = B.value) == null ? void 0 : n[l]) ?? ((m = B.value) == null ? void 0 : m[0]) : (b = B.value) == null ? void 0 : b[0];
|
|
551
|
-
L(a) || fe(a);
|
|
552
|
-
};
|
|
553
|
-
async function ne(e) {
|
|
554
|
-
var a, n;
|
|
555
|
-
await Y(), typeof e != "number" && se();
|
|
556
|
-
const l = e ?? f.value;
|
|
557
|
-
typeof l == "number" && l >= 0 && ((n = (a = J.value) == null ? void 0 : a.querySelectorAll(".m-select-list-item")[l]) == null || n.scrollIntoView({
|
|
558
|
-
behavior: "auto",
|
|
559
|
-
block: "nearest",
|
|
560
|
-
inline: "start"
|
|
561
|
-
}));
|
|
562
|
-
}
|
|
563
|
-
function se(e) {
|
|
564
|
-
var a;
|
|
565
|
-
const l = (a = B.value) == null ? void 0 : a.findIndex((n) => {
|
|
566
|
-
var m, b;
|
|
567
|
-
return t.multiple && Array.isArray(t.modelValue) ? e ? e[t.optionValueKey] === n[t.optionValueKey] : [...t.modelValue].reverse()[0] === n[t.optionValueKey] : ((b = (m = E.value) == null ? void 0 : m[0]) == null ? void 0 : b[t.optionValueKey]) === n[t.optionValueKey];
|
|
568
|
-
});
|
|
569
|
-
f.value = l && l >= 0 ? l : 0;
|
|
570
|
-
}
|
|
571
|
-
const fe = (e, l = !0) => {
|
|
572
|
-
var b;
|
|
573
|
-
l && !t.multiple && Y(() => Q()), D.value = "";
|
|
574
|
-
const a = (b = E.value) == null ? void 0 : b.some(
|
|
575
|
-
(P) => P[t.optionValueKey] === e[t.optionValueKey]
|
|
576
|
-
);
|
|
577
|
-
let n = E.value;
|
|
578
|
-
a && t.multiple ? n = n == null ? void 0 : n.filter(
|
|
579
|
-
(P) => P[t.optionValueKey] !== e[t.optionValueKey]
|
|
580
|
-
) : t.multiple ? n.push(e) : n = [e];
|
|
581
|
-
const m = n.map((P) => P[t.optionValueKey]);
|
|
582
|
-
s("update:model-value", t.multiple ? m : m[0]), s("selected-option", e), se(e), ce();
|
|
583
|
-
};
|
|
584
|
-
return (e, l) => ge((v(), w(
|
|
585
|
-
"div",
|
|
586
|
-
{
|
|
587
|
-
ref_key: "mazSelectElement",
|
|
588
|
-
ref: oe,
|
|
589
|
-
class: H(["m-select", [
|
|
590
|
-
{ "--is-open": I.value, "--disabled": e.disabled, "--block": e.block },
|
|
591
|
-
t.class,
|
|
592
|
-
`--${e.size}`
|
|
593
|
-
]]),
|
|
594
|
-
style: X(e.style)
|
|
595
|
-
},
|
|
596
|
-
[
|
|
597
|
-
O(ye, ze({
|
|
598
|
-
id: g(te),
|
|
599
|
-
ref_key: "mazInputComponent",
|
|
600
|
-
ref: S,
|
|
601
|
-
class: "m-select-input"
|
|
602
|
-
}, e.$attrs, {
|
|
603
|
-
required: e.required,
|
|
604
|
-
"border-active": k.value,
|
|
605
|
-
color: e.color,
|
|
606
|
-
"model-value": le.value,
|
|
607
|
-
autocomplete: "off",
|
|
608
|
-
size: e.size,
|
|
609
|
-
block: "",
|
|
610
|
-
disabled: e.disabled,
|
|
611
|
-
onFocus: F(R, ["prevent", "stop"]),
|
|
612
|
-
onClick: F(R, ["prevent", "stop"]),
|
|
613
|
-
onBlur: F(Q, ["prevent", "stop"]),
|
|
614
|
-
onChange: l[0] || (l[0] = (a) => s("change", a)),
|
|
615
|
-
onKeydown: Le
|
|
616
|
-
}), {
|
|
617
|
-
"right-icon": x(() => [
|
|
618
|
-
T("button", {
|
|
619
|
-
tabindex: "-1",
|
|
620
|
-
type: "button",
|
|
621
|
-
class: "m-select-input__toggle-button maz-custom",
|
|
622
|
-
"aria-label": `${I.value ? "collapse" : "expand"} list of options`,
|
|
623
|
-
onClick: F(Ce, ["stop"])
|
|
624
|
-
}, [
|
|
625
|
-
O(g(y), { class: "m-select-chevron maz-text-xl" })
|
|
626
|
-
], 8, tt)
|
|
627
|
-
]),
|
|
628
|
-
_: 1
|
|
629
|
-
/* STABLE */
|
|
630
|
-
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "disabled"]),
|
|
631
|
-
O(Ue, { name: ae.value }, {
|
|
632
|
-
default: x(() => [
|
|
633
|
-
I.value ? (v(), w(
|
|
634
|
-
"div",
|
|
635
|
-
{
|
|
636
|
-
key: 0,
|
|
637
|
-
ref_key: "optionsListElement",
|
|
638
|
-
ref: J,
|
|
639
|
-
class: H(["m-select-list", {
|
|
640
|
-
"--top": e.listPosition.includes("top"),
|
|
641
|
-
"--left": e.listPosition.includes("left"),
|
|
642
|
-
"--right": e.listPosition.includes("right"),
|
|
643
|
-
"--bottom": e.listPosition.includes("bottom")
|
|
644
|
-
}]),
|
|
645
|
-
style: X({
|
|
646
|
-
maxHeight: `${e.maxListHeight}px`,
|
|
647
|
-
maxWidth: `${e.maxListWidth}px`
|
|
648
|
-
})
|
|
649
|
-
},
|
|
650
|
-
[
|
|
651
|
-
e.search ? (v(), C(ye, {
|
|
652
|
-
key: 0,
|
|
653
|
-
ref_key: "searchInputComponent",
|
|
654
|
-
ref: Z,
|
|
655
|
-
modelValue: D.value,
|
|
656
|
-
"onUpdate:modelValue": [
|
|
657
|
-
l[1] || (l[1] = (a) => D.value = a),
|
|
658
|
-
l[2] || (l[2] = (a) => f.value = 0)
|
|
659
|
-
],
|
|
660
|
-
size: "sm",
|
|
661
|
-
color: e.color,
|
|
662
|
-
placeholder: e.searchPlaceholder,
|
|
663
|
-
name: "search",
|
|
664
|
-
autocomplete: "off",
|
|
665
|
-
tabindex: "-1",
|
|
666
|
-
class: "m-select-list__search-input maz-flex-none",
|
|
667
|
-
"left-icon": g(p),
|
|
668
|
-
onKeydown: pe
|
|
669
|
-
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : h("v-if", !0),
|
|
670
|
-
h(`
|
|
671
|
-
@slot No results slot - Displayed when no results corresponding with search query
|
|
672
|
-
`),
|
|
673
|
-
!B.value || B.value.length <= 0 ? U(e.$slots, "no-results", { key: 1 }, () => [
|
|
674
|
-
T("span", ot, [
|
|
675
|
-
O(g(d), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
676
|
-
])
|
|
677
|
-
], !0) : (v(), w("div", lt, [
|
|
678
|
-
(v(!0), w(
|
|
679
|
-
ve,
|
|
680
|
-
null,
|
|
681
|
-
qe(B.value, (a, n) => (v(), w(
|
|
682
|
-
ve,
|
|
683
|
-
{ key: n },
|
|
684
|
-
[
|
|
685
|
-
h(`
|
|
686
|
-
@slot Custom optgroup label
|
|
687
|
-
@binding {String} label - the label of the optgroup
|
|
688
|
-
`),
|
|
689
|
-
a.label && a.isOptGroup ? U(e.$slots, "optgroup", {
|
|
690
|
-
key: 0,
|
|
691
|
-
label: a.label
|
|
692
|
-
}, () => [
|
|
693
|
-
T(
|
|
694
|
-
"span",
|
|
695
|
-
at,
|
|
696
|
-
ue(a.label),
|
|
697
|
-
1
|
|
698
|
-
/* TEXT */
|
|
699
|
-
)
|
|
700
|
-
], !0) : (v(), w("button", {
|
|
701
|
-
key: 1,
|
|
702
|
-
tabindex: "-1",
|
|
703
|
-
type: "button",
|
|
704
|
-
class: H(["m-select-list-item maz-custom maz-flex-none", [
|
|
705
|
-
{
|
|
706
|
-
"--is-keyboard-selected": f.value === n,
|
|
707
|
-
"--is-selected": q(a),
|
|
708
|
-
"--is-none-value": L(a[e.optionValueKey])
|
|
709
|
-
}
|
|
710
|
-
]]),
|
|
711
|
-
style: X(e.itemHeight ? { height: `${e.itemHeight}px` } : void 0),
|
|
712
|
-
onClick: F((m) => fe(a), ["prevent", "stop"])
|
|
713
|
-
}, [
|
|
714
|
-
e.multiple ? (v(), C(g(u), {
|
|
715
|
-
key: 0,
|
|
716
|
-
tabindex: "-1",
|
|
717
|
-
"model-value": q(a),
|
|
718
|
-
size: "sm",
|
|
719
|
-
color: e.color
|
|
720
|
-
}, null, 8, ["model-value", "color"])) : h("v-if", !0),
|
|
721
|
-
h(`
|
|
722
|
-
@slot Custom option
|
|
723
|
-
@binding {Object} option - the option object
|
|
724
|
-
@binding {Boolean} is-selected - if the option is selected
|
|
725
|
-
`),
|
|
726
|
-
U(e.$slots, "default", {
|
|
727
|
-
option: a,
|
|
728
|
-
isSelected: q(a)
|
|
729
|
-
}, () => [
|
|
730
|
-
T(
|
|
731
|
-
"span",
|
|
732
|
-
null,
|
|
733
|
-
ue(a[e.optionLabelKey]),
|
|
734
|
-
1
|
|
735
|
-
/* TEXT */
|
|
736
|
-
)
|
|
737
|
-
], !0)
|
|
738
|
-
], 14, nt))
|
|
739
|
-
],
|
|
740
|
-
64
|
|
741
|
-
/* STABLE_FRAGMENT */
|
|
742
|
-
))),
|
|
743
|
-
128
|
|
744
|
-
/* KEYED_FRAGMENT */
|
|
745
|
-
))
|
|
746
|
-
]))
|
|
747
|
-
],
|
|
748
|
-
6
|
|
749
|
-
/* CLASS, STYLE */
|
|
750
|
-
)) : h("v-if", !0)
|
|
751
|
-
]),
|
|
752
|
-
_: 3
|
|
753
|
-
/* FORWARDED */
|
|
754
|
-
}, 8, ["name"])
|
|
755
|
-
],
|
|
756
|
-
6
|
|
757
|
-
/* CLASS, STYLE */
|
|
758
|
-
)), [
|
|
759
|
-
[g(xe), Q]
|
|
760
|
-
]);
|
|
761
|
-
}
|
|
762
|
-
}), rt = /* @__PURE__ */ Ve(st, [["__scopeId", "data-v-7a4ba989"]]);
|
|
763
|
-
export {
|
|
764
|
-
rt as M,
|
|
765
|
-
Ve as _,
|
|
766
|
-
ke as u
|
|
767
|
-
};
|