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
|
@@ -0,0 +1,1846 @@
|
|
|
1
|
+
import '../assets/MazTable.css';
|
|
2
|
+
import { openBlock as s, createElementBlock as b, createElementVNode as C, getCurrentInstance as Je, computed as u, defineComponent as te, defineAsyncComponent as X, ref as O, onMounted as Xe, useSlots as Pe, normalizeClass as B, normalizeStyle as ie, createCommentVNode as i, renderSlot as I, createBlock as S, unref as v, resolveDynamicComponent as ce, withDirectives as xe, mergeProps as Te, toHandlers as eo, vModelDynamic as oo, createTextVNode as re, toDisplayString as J, withModifiers as ve, withCtx as T, createVNode as M, useCssVars as Ve, onBeforeMount as Oe, nextTick as Be, Transition as to, Fragment as he, renderList as $e, useAttrs as lo, inject as ao, pushScopeId as Ue, popScopeId as Re, toRefs as no, provide as so, watch as ke } from "vue";
|
|
3
|
+
const ro = {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: "1em",
|
|
6
|
+
height: "1em",
|
|
7
|
+
fill: "none",
|
|
8
|
+
viewBox: "0 0 24 24"
|
|
9
|
+
}, io = /* @__PURE__ */ C(
|
|
10
|
+
"path",
|
|
11
|
+
{
|
|
12
|
+
stroke: "currentColor",
|
|
13
|
+
"stroke-linecap": "round",
|
|
14
|
+
"stroke-linejoin": "round",
|
|
15
|
+
"stroke-width": "1.5",
|
|
16
|
+
d: "m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"
|
|
17
|
+
},
|
|
18
|
+
null,
|
|
19
|
+
-1
|
|
20
|
+
/* HOISTED */
|
|
21
|
+
), uo = [
|
|
22
|
+
io
|
|
23
|
+
];
|
|
24
|
+
function qe(d, p) {
|
|
25
|
+
return s(), b("svg", ro, [...uo]);
|
|
26
|
+
}
|
|
27
|
+
const Qe = { render: qe }, co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
28
|
+
__proto__: null,
|
|
29
|
+
default: Qe,
|
|
30
|
+
render: qe
|
|
31
|
+
}, Symbol.toStringTag, { value: "Module" })), po = {
|
|
32
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
33
|
+
width: "1em",
|
|
34
|
+
height: "1em",
|
|
35
|
+
fill: "none",
|
|
36
|
+
viewBox: "0 0 24 24"
|
|
37
|
+
}, fo = /* @__PURE__ */ C(
|
|
38
|
+
"path",
|
|
39
|
+
{
|
|
40
|
+
stroke: "currentColor",
|
|
41
|
+
"stroke-linecap": "round",
|
|
42
|
+
"stroke-linejoin": "round",
|
|
43
|
+
"stroke-width": "1.5",
|
|
44
|
+
d: "M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"
|
|
45
|
+
},
|
|
46
|
+
null,
|
|
47
|
+
-1
|
|
48
|
+
/* HOISTED */
|
|
49
|
+
), mo = [
|
|
50
|
+
fo
|
|
51
|
+
];
|
|
52
|
+
function vo(d, p) {
|
|
53
|
+
return s(), b("svg", po, [...mo]);
|
|
54
|
+
}
|
|
55
|
+
const bo = { render: vo }, ho = {
|
|
56
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
57
|
+
width: "1em",
|
|
58
|
+
height: "1em",
|
|
59
|
+
fill: "none",
|
|
60
|
+
viewBox: "0 0 24 24"
|
|
61
|
+
}, yo = /* @__PURE__ */ C(
|
|
62
|
+
"path",
|
|
63
|
+
{
|
|
64
|
+
stroke: "currentColor",
|
|
65
|
+
"stroke-linecap": "round",
|
|
66
|
+
"stroke-linejoin": "round",
|
|
67
|
+
"stroke-width": "1.5",
|
|
68
|
+
d: "M15.75 19.5 8.25 12l7.5-7.5"
|
|
69
|
+
},
|
|
70
|
+
null,
|
|
71
|
+
-1
|
|
72
|
+
/* HOISTED */
|
|
73
|
+
), go = [
|
|
74
|
+
yo
|
|
75
|
+
];
|
|
76
|
+
function zo(d, p) {
|
|
77
|
+
return s(), b("svg", ho, [...go]);
|
|
78
|
+
}
|
|
79
|
+
const je = { render: zo }, ko = {
|
|
80
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
81
|
+
width: "1em",
|
|
82
|
+
height: "1em",
|
|
83
|
+
fill: "none",
|
|
84
|
+
viewBox: "0 0 24 24"
|
|
85
|
+
}, wo = /* @__PURE__ */ C(
|
|
86
|
+
"path",
|
|
87
|
+
{
|
|
88
|
+
stroke: "currentColor",
|
|
89
|
+
"stroke-linecap": "round",
|
|
90
|
+
"stroke-linejoin": "round",
|
|
91
|
+
"stroke-width": "1.5",
|
|
92
|
+
d: "m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"
|
|
93
|
+
},
|
|
94
|
+
null,
|
|
95
|
+
-1
|
|
96
|
+
/* HOISTED */
|
|
97
|
+
), $o = [
|
|
98
|
+
wo
|
|
99
|
+
];
|
|
100
|
+
function Vo(d, p) {
|
|
101
|
+
return s(), b("svg", ko, [...$o]);
|
|
102
|
+
}
|
|
103
|
+
const Ee = { render: Vo };
|
|
104
|
+
function Io(d, p) {
|
|
105
|
+
let t;
|
|
106
|
+
return function(...g) {
|
|
107
|
+
clearTimeout(t), t = setTimeout(() => {
|
|
108
|
+
d.apply(this, g);
|
|
109
|
+
}, p);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
const Ne = ({
|
|
113
|
+
componentName: d,
|
|
114
|
+
providedId: p
|
|
115
|
+
}) => {
|
|
116
|
+
const t = Je();
|
|
117
|
+
return u(() => p ?? `${d}-${t == null ? void 0 : t.uid}`);
|
|
118
|
+
}, So = {
|
|
119
|
+
key: 0,
|
|
120
|
+
class: "m-input-wrapper-left"
|
|
121
|
+
}, Bo = { class: "m-input-wrapper-input" }, Co = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], _o = { key: 0 }, Mo = {
|
|
122
|
+
key: 1,
|
|
123
|
+
class: "m-input-wrapper-right"
|
|
124
|
+
}, Ao = /* @__PURE__ */ te({
|
|
125
|
+
inheritAttrs: !1,
|
|
126
|
+
__name: "MazInput",
|
|
127
|
+
props: {
|
|
128
|
+
style: { default: void 0 },
|
|
129
|
+
class: { default: void 0 },
|
|
130
|
+
modelValue: { type: [String, Number, null, Boolean], default: void 0 },
|
|
131
|
+
placeholder: { default: void 0 },
|
|
132
|
+
label: { default: void 0 },
|
|
133
|
+
name: { default: void 0 },
|
|
134
|
+
color: { default: "primary" },
|
|
135
|
+
type: { default: "text" },
|
|
136
|
+
required: { type: Boolean, default: !1 },
|
|
137
|
+
disabled: { type: Boolean, default: !1 },
|
|
138
|
+
readonly: { type: Boolean, default: !1 },
|
|
139
|
+
id: { default: void 0 },
|
|
140
|
+
error: { type: Boolean, default: !1 },
|
|
141
|
+
success: { type: Boolean, default: !1 },
|
|
142
|
+
warning: { type: Boolean, default: !1 },
|
|
143
|
+
hint: { default: void 0 },
|
|
144
|
+
inputClasses: { default: void 0 },
|
|
145
|
+
noBorder: { type: Boolean, default: !1 },
|
|
146
|
+
noRadius: { type: Boolean, default: !1 },
|
|
147
|
+
inputmode: { default: "text" },
|
|
148
|
+
size: { default: "md" },
|
|
149
|
+
debounce: { type: [Boolean, Number], default: !1 },
|
|
150
|
+
debounceDelay: { default: 500 },
|
|
151
|
+
validButton: { type: Boolean, default: !1 },
|
|
152
|
+
validButtonLoading: { type: Boolean, default: !1 },
|
|
153
|
+
autoFocus: { type: Boolean, default: !1 },
|
|
154
|
+
borderActive: { type: Boolean, default: !1 },
|
|
155
|
+
leftIcon: { default: void 0 },
|
|
156
|
+
rightIcon: { default: void 0 },
|
|
157
|
+
roundedSize: { default: void 0 },
|
|
158
|
+
block: { type: Boolean }
|
|
159
|
+
},
|
|
160
|
+
emits: ["update:model-value", "focus", "blur", "click", "change"],
|
|
161
|
+
setup(d, { emit: p }) {
|
|
162
|
+
const t = X(() => Promise.resolve().then(() => Ho)), g = X(() => import("./MazIcon-C_IIdjqr.mjs")), w = X(() => import("./eye-slash-tjfxO0LK.mjs")), m = X(() => import("./eye-DqO_Jx56.mjs")), y = X(() => Promise.resolve().then(() => ot)), o = d, D = p, A = O(!1), $ = O(!1), F = O(), _ = Ne({
|
|
163
|
+
componentName: "MazInput",
|
|
164
|
+
providedId: o.id
|
|
165
|
+
});
|
|
166
|
+
Xe(() => {
|
|
167
|
+
var a;
|
|
168
|
+
o.autoFocus && ((a = F.value) == null || a.focus());
|
|
169
|
+
});
|
|
170
|
+
const R = u(() => o.type === "password"), z = u(() => A.value ? "text" : o.type), V = u(() => {
|
|
171
|
+
if (!o.noBorder) {
|
|
172
|
+
if (o.error)
|
|
173
|
+
return "maz-border-danger";
|
|
174
|
+
if (o.success)
|
|
175
|
+
return "maz-border-success";
|
|
176
|
+
if (o.warning)
|
|
177
|
+
return "maz-border-warning";
|
|
178
|
+
if ($.value || o.borderActive) {
|
|
179
|
+
if (o.color === "black")
|
|
180
|
+
return "maz-border-black";
|
|
181
|
+
if (o.color === "danger")
|
|
182
|
+
return "maz-border-danger";
|
|
183
|
+
if (o.color === "info")
|
|
184
|
+
return "maz-border-info";
|
|
185
|
+
if (o.color === "primary")
|
|
186
|
+
return "maz-border-primary";
|
|
187
|
+
if (o.color === "secondary")
|
|
188
|
+
return "maz-border-secondary";
|
|
189
|
+
if (o.color === "success")
|
|
190
|
+
return "maz-border-success";
|
|
191
|
+
if (o.color === "warning")
|
|
192
|
+
return "maz-border-warning";
|
|
193
|
+
if (o.color === "white")
|
|
194
|
+
return "maz-border-white";
|
|
195
|
+
}
|
|
196
|
+
return "--default-border";
|
|
197
|
+
}
|
|
198
|
+
}), j = Pe(), W = u(() => {
|
|
199
|
+
const { required: a, placeholder: P } = o;
|
|
200
|
+
if (P)
|
|
201
|
+
return a ? `${P} *` : P;
|
|
202
|
+
}), h = u(() => G.value !== void 0 && G.value !== ""), x = Io(
|
|
203
|
+
(a) => {
|
|
204
|
+
G.value = a;
|
|
205
|
+
},
|
|
206
|
+
typeof o.debounce == "number" ? o.debounce : o.debounceDelay ?? 500
|
|
207
|
+
), G = u({
|
|
208
|
+
get: () => o.modelValue,
|
|
209
|
+
set: (a) => {
|
|
210
|
+
if (o.debounce)
|
|
211
|
+
return x(a);
|
|
212
|
+
D("update:model-value", a);
|
|
213
|
+
}
|
|
214
|
+
}), ee = u(() => (!!o.label || !!o.hint) && ($.value || !!h.value || !!o.placeholder || ["date", "month", "week"].includes(o.type))), ue = u(() => !!o.label || !!o.hint);
|
|
215
|
+
function ae() {
|
|
216
|
+
return !!j["right-icon"] || R.value || !!j["valid-button"] || o.validButton || !!o.rightIcon;
|
|
217
|
+
}
|
|
218
|
+
function U() {
|
|
219
|
+
return !!j["left-icon"] || !!o.leftIcon;
|
|
220
|
+
}
|
|
221
|
+
function se(a) {
|
|
222
|
+
D("focus", a), $.value = !0;
|
|
223
|
+
}
|
|
224
|
+
function pe(a) {
|
|
225
|
+
D("blur", a), $.value = !1;
|
|
226
|
+
}
|
|
227
|
+
function Y(a) {
|
|
228
|
+
return D("change", a);
|
|
229
|
+
}
|
|
230
|
+
return (a, P) => (s(), b(
|
|
231
|
+
"div",
|
|
232
|
+
{
|
|
233
|
+
class: B(["m-input", [
|
|
234
|
+
{
|
|
235
|
+
"--is-focused": $.value || a.borderActive,
|
|
236
|
+
"--should-up": ee.value,
|
|
237
|
+
"--has-label": ue.value,
|
|
238
|
+
"--is-disabled": a.disabled,
|
|
239
|
+
"--is-readonly": a.readonly,
|
|
240
|
+
"--has-z-2": a.error || a.warning || a.success,
|
|
241
|
+
"--has-state": a.error || a.warning || a.success,
|
|
242
|
+
"--block": a.block
|
|
243
|
+
},
|
|
244
|
+
o.class,
|
|
245
|
+
`--${a.color}`,
|
|
246
|
+
`--${a.size}`
|
|
247
|
+
]]),
|
|
248
|
+
style: ie(a.style)
|
|
249
|
+
},
|
|
250
|
+
[
|
|
251
|
+
C(
|
|
252
|
+
"div",
|
|
253
|
+
{
|
|
254
|
+
class: B(["m-input-wrapper", [
|
|
255
|
+
a.inputClasses,
|
|
256
|
+
V.value,
|
|
257
|
+
a.roundedSize ? `--rounded-${a.roundedSize}` : { "maz-rounded": !a.noRadius }
|
|
258
|
+
]])
|
|
259
|
+
},
|
|
260
|
+
[
|
|
261
|
+
U() ? (s(), b("div", So, [
|
|
262
|
+
i(`
|
|
263
|
+
@slot left-icon - The icon to display on the left of the input
|
|
264
|
+
`),
|
|
265
|
+
a.$slots["left-icon"] || a.leftIcon ? I(a.$slots, "left-icon", { key: 0 }, () => [
|
|
266
|
+
typeof a.leftIcon == "string" ? (s(), S(v(g), {
|
|
267
|
+
key: 0,
|
|
268
|
+
name: a.leftIcon,
|
|
269
|
+
class: "maz-text-xl maz-text-muted"
|
|
270
|
+
}, null, 8, ["name"])) : a.leftIcon ? (s(), S(ce(a.leftIcon), {
|
|
271
|
+
key: 1,
|
|
272
|
+
class: "maz-text-xl maz-text-muted"
|
|
273
|
+
})) : i("v-if", !0)
|
|
274
|
+
], !0) : i("v-if", !0)
|
|
275
|
+
])) : i("v-if", !0),
|
|
276
|
+
C("div", Bo, [
|
|
277
|
+
xe(C("input", Te({
|
|
278
|
+
id: v(_),
|
|
279
|
+
ref_key: "input",
|
|
280
|
+
ref: F,
|
|
281
|
+
"onUpdate:modelValue": P[0] || (P[0] = (oe) => G.value = oe),
|
|
282
|
+
type: z.value,
|
|
283
|
+
name: a.name
|
|
284
|
+
}, a.$attrs, {
|
|
285
|
+
inputmode: a.inputmode,
|
|
286
|
+
placeholder: W.value,
|
|
287
|
+
"aria-label": a.label || a.placeholder,
|
|
288
|
+
disabled: a.disabled,
|
|
289
|
+
readonly: a.readonly,
|
|
290
|
+
required: a.required,
|
|
291
|
+
class: "m-input-input"
|
|
292
|
+
}, eo({
|
|
293
|
+
blur: pe,
|
|
294
|
+
focus: se,
|
|
295
|
+
change: Y
|
|
296
|
+
}, !0), {
|
|
297
|
+
onClick: P[1] || (P[1] = (oe) => a.$emit("click", oe))
|
|
298
|
+
}), null, 16, Co), [
|
|
299
|
+
[oo, G.value]
|
|
300
|
+
]),
|
|
301
|
+
a.label || a.hint ? (s(), b(
|
|
302
|
+
"span",
|
|
303
|
+
{
|
|
304
|
+
key: 0,
|
|
305
|
+
ref: "label",
|
|
306
|
+
class: B(["m-input-label", [
|
|
307
|
+
{
|
|
308
|
+
"maz-text-danger-600": a.error,
|
|
309
|
+
"maz-text-success-600": a.success,
|
|
310
|
+
"maz-text-warning-600": a.warning
|
|
311
|
+
}
|
|
312
|
+
]])
|
|
313
|
+
},
|
|
314
|
+
[
|
|
315
|
+
re(
|
|
316
|
+
J(a.hint || a.label) + " ",
|
|
317
|
+
1
|
|
318
|
+
/* TEXT */
|
|
319
|
+
),
|
|
320
|
+
a.required ? (s(), b("sup", _o, "*")) : i("v-if", !0)
|
|
321
|
+
],
|
|
322
|
+
2
|
|
323
|
+
/* CLASS */
|
|
324
|
+
)) : i("v-if", !0)
|
|
325
|
+
]),
|
|
326
|
+
ae() ? (s(), b("div", Mo, [
|
|
327
|
+
i(`
|
|
328
|
+
@slot right-icon - The icon to display on the right of the input
|
|
329
|
+
`),
|
|
330
|
+
a.$slots["right-icon"] || a.rightIcon ? I(a.$slots, "right-icon", { key: 0 }, () => [
|
|
331
|
+
typeof a.rightIcon == "string" ? (s(), S(v(g), {
|
|
332
|
+
key: 0,
|
|
333
|
+
name: a.rightIcon,
|
|
334
|
+
class: "maz-text-xl maz-text-muted"
|
|
335
|
+
}, null, 8, ["name"])) : a.rightIcon ? (s(), S(ce(a.rightIcon), {
|
|
336
|
+
key: 1,
|
|
337
|
+
class: "maz-text-xl maz-text-muted"
|
|
338
|
+
})) : i("v-if", !0)
|
|
339
|
+
], !0) : i("v-if", !0),
|
|
340
|
+
R.value ? (s(), S(v(t), {
|
|
341
|
+
key: 1,
|
|
342
|
+
color: "transparent",
|
|
343
|
+
tabindex: "-1",
|
|
344
|
+
size: "mini",
|
|
345
|
+
onClick: P[2] || (P[2] = ve((oe) => A.value = !A.value, ["stop"]))
|
|
346
|
+
}, {
|
|
347
|
+
default: T(() => [
|
|
348
|
+
A.value ? (s(), S(v(w), {
|
|
349
|
+
key: 0,
|
|
350
|
+
class: "maz-text-xl maz-text-muted"
|
|
351
|
+
})) : (s(), S(v(m), {
|
|
352
|
+
key: 1,
|
|
353
|
+
class: "maz-text-xl maz-text-muted"
|
|
354
|
+
}))
|
|
355
|
+
]),
|
|
356
|
+
_: 1
|
|
357
|
+
/* STABLE */
|
|
358
|
+
})) : i("v-if", !0),
|
|
359
|
+
i(`
|
|
360
|
+
@slot valid-button - Replace the valid button by your own
|
|
361
|
+
`),
|
|
362
|
+
a.$slots["valid-button"] || a.validButton ? I(a.$slots, "valid-button", { key: 2 }, () => [
|
|
363
|
+
M(v(t), {
|
|
364
|
+
color: "transparent",
|
|
365
|
+
disabled: a.disabled,
|
|
366
|
+
tabindex: "-1",
|
|
367
|
+
loading: a.validButtonLoading,
|
|
368
|
+
class: "m-input-valid-button",
|
|
369
|
+
size: "mini",
|
|
370
|
+
type: "submit"
|
|
371
|
+
}, {
|
|
372
|
+
default: T(() => [
|
|
373
|
+
M(v(y), { class: "maz-text-2xl maz-text-normal" })
|
|
374
|
+
]),
|
|
375
|
+
_: 1
|
|
376
|
+
/* STABLE */
|
|
377
|
+
}, 8, ["disabled", "loading"])
|
|
378
|
+
], !0) : i("v-if", !0)
|
|
379
|
+
])) : i("v-if", !0)
|
|
380
|
+
],
|
|
381
|
+
2
|
|
382
|
+
/* CLASS */
|
|
383
|
+
)
|
|
384
|
+
],
|
|
385
|
+
6
|
|
386
|
+
/* CLASS, STYLE */
|
|
387
|
+
));
|
|
388
|
+
}
|
|
389
|
+
}), le = (d, p) => {
|
|
390
|
+
const t = d.__vccOpts || d;
|
|
391
|
+
for (const [g, w] of p)
|
|
392
|
+
t[g] = w;
|
|
393
|
+
return t;
|
|
394
|
+
}, Ke = /* @__PURE__ */ le(Ao, [["__scopeId", "data-v-78090be8"]]);
|
|
395
|
+
let Ce = null;
|
|
396
|
+
function Ko(d, p) {
|
|
397
|
+
Ce && clearTimeout(Ce), Ce = setTimeout(d, p);
|
|
398
|
+
}
|
|
399
|
+
function Lo(d, p) {
|
|
400
|
+
const t = d.length, g = p.length, w = [];
|
|
401
|
+
for (let m = 0; m <= t; m++)
|
|
402
|
+
w[m] = [m];
|
|
403
|
+
for (let m = 0; m <= g; m++)
|
|
404
|
+
w[0][m] = m;
|
|
405
|
+
for (let m = 1; m <= t; m++)
|
|
406
|
+
for (let y = 1; y <= g; y++) {
|
|
407
|
+
const o = d[m - 1] === p[y - 1] ? 0 : 1;
|
|
408
|
+
w[m][y] = Math.min(
|
|
409
|
+
w[m - 1][y] + 1,
|
|
410
|
+
w[m][y - 1] + 1,
|
|
411
|
+
w[m - 1][y - 1] + o
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
return w[t][g];
|
|
415
|
+
}
|
|
416
|
+
function Fe(d) {
|
|
417
|
+
return d.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").toLowerCase();
|
|
418
|
+
}
|
|
419
|
+
function We(d, p) {
|
|
420
|
+
const t = Lo(d, p), g = Math.max(d.length, p.length);
|
|
421
|
+
return 1 - t / g;
|
|
422
|
+
}
|
|
423
|
+
function Po(d, p, t = 0.75) {
|
|
424
|
+
return We(d, p) >= t;
|
|
425
|
+
}
|
|
426
|
+
function _e(d, p, t = 0.75) {
|
|
427
|
+
const g = u(
|
|
428
|
+
() => Fe(typeof d == "string" ? d : d.value)
|
|
429
|
+
), w = u(
|
|
430
|
+
() => Fe(typeof p == "string" ? p : p.value)
|
|
431
|
+
), m = u(() => typeof t == "number" ? t : t.value), y = u(() => We(g.value, w.value));
|
|
432
|
+
return {
|
|
433
|
+
isMatching: u(
|
|
434
|
+
() => Po(g.value, w.value, m.value)
|
|
435
|
+
),
|
|
436
|
+
score: y
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
const To = ["aria-label"], Oo = { class: "m-select-list__no-results" }, No = {
|
|
440
|
+
key: 2,
|
|
441
|
+
class: "m-select-list__scroll-wrapper",
|
|
442
|
+
tabindex: "-1"
|
|
443
|
+
}, Do = { class: "m-select-list-optgroup" }, jo = ["onClick"], Eo = /* @__PURE__ */ te({
|
|
444
|
+
inheritAttrs: !1,
|
|
445
|
+
__name: "MazSelect",
|
|
446
|
+
props: {
|
|
447
|
+
style: { default: void 0 },
|
|
448
|
+
class: { default: void 0 },
|
|
449
|
+
id: { default: void 0 },
|
|
450
|
+
modelValue: { type: [String, Number, null, Boolean, Array], default: void 0 },
|
|
451
|
+
options: { default: void 0 },
|
|
452
|
+
optionValueKey: { default: "value" },
|
|
453
|
+
optionLabelKey: { default: "label" },
|
|
454
|
+
optionInputValueKey: { default: "label" },
|
|
455
|
+
listPosition: { default: "bottom left" },
|
|
456
|
+
itemHeight: { default: void 0 },
|
|
457
|
+
maxListHeight: { default: 240 },
|
|
458
|
+
maxListWidth: { default: void 0 },
|
|
459
|
+
size: { default: "md" },
|
|
460
|
+
color: { default: "primary" },
|
|
461
|
+
search: { type: Boolean },
|
|
462
|
+
searchPlaceholder: { default: "Search in options" },
|
|
463
|
+
open: { type: Boolean },
|
|
464
|
+
multiple: { type: Boolean },
|
|
465
|
+
required: { type: Boolean },
|
|
466
|
+
disabled: { type: Boolean },
|
|
467
|
+
block: { type: Boolean }
|
|
468
|
+
},
|
|
469
|
+
emits: ["close", "open", "blur", "focus", "change", "update:model-value", "selected-option"],
|
|
470
|
+
setup(d, { expose: p, emit: t }) {
|
|
471
|
+
Ve((e) => ({
|
|
472
|
+
b5e9a382: z.value,
|
|
473
|
+
"98e2c384": _.value,
|
|
474
|
+
"4f69e826": R.value
|
|
475
|
+
}));
|
|
476
|
+
const g = X(() => Promise.resolve().then(() => nt)), w = X(() => Promise.resolve().then(() => co)), m = X(() => import("./chevron-down-CzMH-gFW.mjs")), y = X(() => import("./no-symbol-QAqP9IlR.mjs"));
|
|
477
|
+
p({
|
|
478
|
+
openList: E,
|
|
479
|
+
closeList: Q
|
|
480
|
+
});
|
|
481
|
+
const o = d, D = t, A = O(!1), $ = O(), F = u(
|
|
482
|
+
() => ["black", "transparent", "white"].includes(o.color)
|
|
483
|
+
), _ = u(
|
|
484
|
+
() => F.value ? "var(--maz-color-black)" : `var(--maz-color-${o.color}-800)`
|
|
485
|
+
), R = u(
|
|
486
|
+
() => F.value ? "var(--maz-color-muted)" : `var(--maz-color-${o.color}-100)`
|
|
487
|
+
), z = u(
|
|
488
|
+
() => F.value ? "var(--maz-color-muted)" : `var(--maz-color-${o.color}-200)`
|
|
489
|
+
), V = u(() => A.value || o.open), j = Ne({
|
|
490
|
+
componentName: "MazSelect",
|
|
491
|
+
providedId: o.id
|
|
492
|
+
});
|
|
493
|
+
function W(e) {
|
|
494
|
+
return {
|
|
495
|
+
[o.optionValueKey]: e,
|
|
496
|
+
[o.optionLabelKey]: e,
|
|
497
|
+
[o.optionInputValueKey]: e
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
function h(e) {
|
|
501
|
+
return {
|
|
502
|
+
...e,
|
|
503
|
+
[o.optionValueKey]: e[o.optionValueKey],
|
|
504
|
+
[o.optionLabelKey]: e[o.optionLabelKey],
|
|
505
|
+
[o.optionInputValueKey]: e[o.optionInputValueKey]
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
const x = u(() => {
|
|
509
|
+
var n;
|
|
510
|
+
const e = [];
|
|
511
|
+
if (!((n = o.options) != null && n.length))
|
|
512
|
+
return [];
|
|
513
|
+
for (const r of o.options)
|
|
514
|
+
typeof r == "string" || typeof r == "number" || typeof r == "boolean" ? e.push(W(r)) : "options" in r && Array.isArray(r.options) ? e.push(
|
|
515
|
+
{ label: r.label, isOptGroup: !0 },
|
|
516
|
+
...r.options.map(
|
|
517
|
+
(f) => typeof f == "string" || typeof f == "number" || typeof f == "boolean" ? W(f) : h(f)
|
|
518
|
+
)
|
|
519
|
+
) : e.push(h(r));
|
|
520
|
+
return e;
|
|
521
|
+
}), ne = u(
|
|
522
|
+
() => {
|
|
523
|
+
var e;
|
|
524
|
+
return ((e = x.value) == null ? void 0 : e.filter((n) => o.multiple ? Array.isArray(o.modelValue) ? o.modelValue.includes(n[o.optionValueKey]) && !U(n[o.optionValueKey]) : !1 : o.modelValue === n[o.optionValueKey] && !U(n[o.optionValueKey]))) ?? [];
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
Oe(() => {
|
|
528
|
+
var e;
|
|
529
|
+
(e = o.options) != null && e.length || console.warn("[maz-ui](MazSelect) you must provide options"), K();
|
|
530
|
+
});
|
|
531
|
+
const G = O(), ee = O(), ue = O(), ae = O(), U = (e) => e == null;
|
|
532
|
+
function se(e) {
|
|
533
|
+
var r;
|
|
534
|
+
return (((r = ne.value) == null ? void 0 : r.some(
|
|
535
|
+
(f) => f[o.optionValueKey] === e[o.optionValueKey]
|
|
536
|
+
)) ?? !1) && !U(e[o.optionValueKey]);
|
|
537
|
+
}
|
|
538
|
+
const pe = u(() => {
|
|
539
|
+
var n;
|
|
540
|
+
if (o.multiple && o.modelValue && Array.isArray(o.modelValue))
|
|
541
|
+
return o.modelValue.map(
|
|
542
|
+
(r) => {
|
|
543
|
+
var f, L;
|
|
544
|
+
return (L = (f = x.value) == null ? void 0 : f.find((H) => H[o.optionValueKey] === r)) == null ? void 0 : L[o.optionInputValueKey];
|
|
545
|
+
}
|
|
546
|
+
).join(", ");
|
|
547
|
+
const e = (n = x.value) == null ? void 0 : n.find(
|
|
548
|
+
(r) => r[o.optionValueKey] === o.modelValue
|
|
549
|
+
);
|
|
550
|
+
return U(o.modelValue) || e == null ? void 0 : e[o.optionInputValueKey];
|
|
551
|
+
}), Y = u(
|
|
552
|
+
() => o.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
553
|
+
), a = O(""), P = O("");
|
|
554
|
+
function oe(e) {
|
|
555
|
+
return e.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").replaceAll(/[^\dA-Za-z\u0400-\u04FF]/g, "");
|
|
556
|
+
}
|
|
557
|
+
const Z = (e, n) => n && e && oe(e.toString().toLocaleLowerCase().trim()).includes(
|
|
558
|
+
oe(n.toLocaleLowerCase().trim())
|
|
559
|
+
);
|
|
560
|
+
function ye(e) {
|
|
561
|
+
var n;
|
|
562
|
+
return e ? (n = x.value) == null ? void 0 : n.filter((r) => {
|
|
563
|
+
const f = r[o.optionLabelKey], L = r[o.optionValueKey], H = r[o.optionInputValueKey];
|
|
564
|
+
return Z(f, e) || Z(H, e) || Z(L, e) || typeof f == "string" && _e(f, e).isMatching.value || typeof H == "string" && _e(H, e).isMatching.value || typeof L == "string" && _e(L, e).isMatching.value;
|
|
565
|
+
}) : x.value;
|
|
566
|
+
}
|
|
567
|
+
const q = u(() => ye(a.value));
|
|
568
|
+
async function Q(e) {
|
|
569
|
+
var n;
|
|
570
|
+
if (V.value) {
|
|
571
|
+
if (e && ("relatedTarget" in e && ((n = G.value) != null && n.contains(e.relatedTarget)) || e.type === "keydown"))
|
|
572
|
+
return e.preventDefault();
|
|
573
|
+
await Be(), A.value = !1, $.value = 0, D("close", e);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
async function E(e) {
|
|
577
|
+
o.disabled || V.value || (e == null || e.preventDefault(), A.value = !0, await c(), D("focus", e), D("open", A.value));
|
|
578
|
+
}
|
|
579
|
+
function ge() {
|
|
580
|
+
var e, n;
|
|
581
|
+
(n = ((e = ee.value) == null ? void 0 : e.$el).querySelector("input")) == null || n.focus();
|
|
582
|
+
}
|
|
583
|
+
function ze(e) {
|
|
584
|
+
A.value ? Q(e) : ge();
|
|
585
|
+
}
|
|
586
|
+
function Ie(e) {
|
|
587
|
+
var n, r;
|
|
588
|
+
a.value = e, (r = ((n = ue.value) == null ? void 0 : n.$el).querySelector("input")) == null || r.focus();
|
|
589
|
+
}
|
|
590
|
+
function Se(e) {
|
|
591
|
+
var r;
|
|
592
|
+
e === "Backspace" && P.value.length > 0 ? P.value = P.value.slice(0, -1) : P.value += e;
|
|
593
|
+
const n = ye(P.value);
|
|
594
|
+
n != null && n.length && ($.value = (r = q.value) == null ? void 0 : r.findIndex(
|
|
595
|
+
(f) => f[o.optionValueKey] === n[0][o.optionValueKey]
|
|
596
|
+
), typeof $.value == "number" && $.value >= 0 && c($.value)), Ko(() => {
|
|
597
|
+
P.value = "";
|
|
598
|
+
}, 1e3);
|
|
599
|
+
}
|
|
600
|
+
const fe = (e) => {
|
|
601
|
+
const n = e.key;
|
|
602
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(n) ? (e.preventDefault(), E(e), o.search ? Ie(n) : Se(n)) : me(e);
|
|
603
|
+
}, me = (e) => {
|
|
604
|
+
const n = e.code, r = ["ArrowUp", "ArrowDown"].includes(n), f = ["Enter", "Space"].includes(n), L = n === "Escape" && V.value;
|
|
605
|
+
r ? l(e, $.value) : f ? k(e, $.value) : L && Q();
|
|
606
|
+
}, l = (e, n) => {
|
|
607
|
+
var L;
|
|
608
|
+
e.preventDefault();
|
|
609
|
+
const r = e.code;
|
|
610
|
+
V.value || E(e);
|
|
611
|
+
const f = (L = q.value) == null ? void 0 : L.length;
|
|
612
|
+
f && (typeof n == "number" ? n === f - 1 && r === "ArrowDown" ? $.value = 0 : n === 0 && r === "ArrowUp" ? $.value = f - 1 : $.value = r === "ArrowDown" ? n + 1 : n - 1 : $.value = r === "ArrowDown" ? 0 : f - 1, c($.value));
|
|
613
|
+
}, k = (e, n) => {
|
|
614
|
+
var f, L, H;
|
|
615
|
+
if (e.preventDefault(), !V.value)
|
|
616
|
+
return E(e);
|
|
617
|
+
const r = n ? ((f = q.value) == null ? void 0 : f[n]) ?? ((L = q.value) == null ? void 0 : L[0]) : (H = q.value) == null ? void 0 : H[0];
|
|
618
|
+
U(r) || N(r);
|
|
619
|
+
};
|
|
620
|
+
async function c(e) {
|
|
621
|
+
var r, f;
|
|
622
|
+
await Be(), typeof e != "number" && K();
|
|
623
|
+
const n = e ?? $.value;
|
|
624
|
+
typeof n == "number" && n >= 0 && ((f = (r = ae.value) == null ? void 0 : r.querySelectorAll(".m-select-list-item")[n]) == null || f.scrollIntoView({
|
|
625
|
+
behavior: "auto",
|
|
626
|
+
block: "nearest",
|
|
627
|
+
inline: "start"
|
|
628
|
+
}));
|
|
629
|
+
}
|
|
630
|
+
function K(e) {
|
|
631
|
+
var r;
|
|
632
|
+
const n = (r = q.value) == null ? void 0 : r.findIndex((f) => {
|
|
633
|
+
var L, H;
|
|
634
|
+
return o.multiple && Array.isArray(o.modelValue) ? e ? e[o.optionValueKey] === f[o.optionValueKey] : [...o.modelValue].reverse()[0] === f[o.optionValueKey] : ((H = (L = ne.value) == null ? void 0 : L[0]) == null ? void 0 : H[o.optionValueKey]) === f[o.optionValueKey];
|
|
635
|
+
});
|
|
636
|
+
$.value = n && n >= 0 ? n : 0;
|
|
637
|
+
}
|
|
638
|
+
const N = (e, n = !0) => {
|
|
639
|
+
var H;
|
|
640
|
+
n && !o.multiple && Be(() => Q()), a.value = "";
|
|
641
|
+
const r = (H = ne.value) == null ? void 0 : H.some(
|
|
642
|
+
(de) => de[o.optionValueKey] === e[o.optionValueKey]
|
|
643
|
+
);
|
|
644
|
+
let f = ne.value;
|
|
645
|
+
r && o.multiple ? f = f == null ? void 0 : f.filter(
|
|
646
|
+
(de) => de[o.optionValueKey] !== e[o.optionValueKey]
|
|
647
|
+
) : o.multiple ? f.push(e) : f = [e];
|
|
648
|
+
const L = f.map((de) => de[o.optionValueKey]);
|
|
649
|
+
D("update:model-value", o.multiple ? L : L[0]), D("selected-option", e), K(e), ge();
|
|
650
|
+
};
|
|
651
|
+
return (e, n) => (s(), b(
|
|
652
|
+
"div",
|
|
653
|
+
{
|
|
654
|
+
ref_key: "mazSelectElement",
|
|
655
|
+
ref: G,
|
|
656
|
+
class: B(["m-select", [
|
|
657
|
+
{ "--is-open": V.value, "--disabled": e.disabled, "--block": e.block },
|
|
658
|
+
o.class,
|
|
659
|
+
`--${e.size}`
|
|
660
|
+
]]),
|
|
661
|
+
style: ie(e.style),
|
|
662
|
+
onBlurCapture: Q
|
|
663
|
+
},
|
|
664
|
+
[
|
|
665
|
+
M(Ke, Te({
|
|
666
|
+
id: v(j),
|
|
667
|
+
ref_key: "mazInputComponent",
|
|
668
|
+
ref: ee,
|
|
669
|
+
class: "m-select-input"
|
|
670
|
+
}, e.$attrs, {
|
|
671
|
+
required: e.required,
|
|
672
|
+
"border-active": A.value,
|
|
673
|
+
color: e.color,
|
|
674
|
+
"model-value": pe.value,
|
|
675
|
+
autocomplete: "off",
|
|
676
|
+
size: e.size,
|
|
677
|
+
block: "",
|
|
678
|
+
disabled: e.disabled,
|
|
679
|
+
onFocus: ve(E, ["prevent", "stop"]),
|
|
680
|
+
onClick: ve(E, ["prevent", "stop"]),
|
|
681
|
+
onChange: n[0] || (n[0] = (r) => D("change", r)),
|
|
682
|
+
onKeydown: fe
|
|
683
|
+
}), {
|
|
684
|
+
"right-icon": T(() => [
|
|
685
|
+
C("button", {
|
|
686
|
+
tabindex: "-1",
|
|
687
|
+
type: "button",
|
|
688
|
+
class: "m-select-input__toggle-button maz-custom",
|
|
689
|
+
"aria-label": `${V.value ? "collapse" : "expand"} list of options`,
|
|
690
|
+
onClick: ve(ze, ["stop"])
|
|
691
|
+
}, [
|
|
692
|
+
M(v(m), { class: "m-select-chevron maz-text-xl" })
|
|
693
|
+
], 8, To)
|
|
694
|
+
]),
|
|
695
|
+
_: 1
|
|
696
|
+
/* STABLE */
|
|
697
|
+
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "disabled"]),
|
|
698
|
+
M(to, { name: Y.value }, {
|
|
699
|
+
default: T(() => [
|
|
700
|
+
V.value ? (s(), b(
|
|
701
|
+
"div",
|
|
702
|
+
{
|
|
703
|
+
key: 0,
|
|
704
|
+
ref_key: "optionsListElement",
|
|
705
|
+
ref: ae,
|
|
706
|
+
class: B(["m-select-list", {
|
|
707
|
+
"--top": e.listPosition.includes("top"),
|
|
708
|
+
"--left": e.listPosition.includes("left"),
|
|
709
|
+
"--right": e.listPosition.includes("right"),
|
|
710
|
+
"--bottom": e.listPosition.includes("bottom")
|
|
711
|
+
}]),
|
|
712
|
+
style: ie({
|
|
713
|
+
maxHeight: `${e.maxListHeight}px`,
|
|
714
|
+
maxWidth: `${e.maxListWidth}px`
|
|
715
|
+
})
|
|
716
|
+
},
|
|
717
|
+
[
|
|
718
|
+
e.search ? (s(), S(Ke, {
|
|
719
|
+
key: 0,
|
|
720
|
+
ref_key: "searchInputComponent",
|
|
721
|
+
ref: ue,
|
|
722
|
+
modelValue: a.value,
|
|
723
|
+
"onUpdate:modelValue": [
|
|
724
|
+
n[1] || (n[1] = (r) => a.value = r),
|
|
725
|
+
n[2] || (n[2] = (r) => $.value = 0)
|
|
726
|
+
],
|
|
727
|
+
size: "sm",
|
|
728
|
+
color: e.color,
|
|
729
|
+
placeholder: e.searchPlaceholder,
|
|
730
|
+
name: "search",
|
|
731
|
+
autocomplete: "off",
|
|
732
|
+
tabindex: "-1",
|
|
733
|
+
class: "m-select-list__search-input maz-flex-none",
|
|
734
|
+
"left-icon": v(w),
|
|
735
|
+
onKeydown: me
|
|
736
|
+
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : i("v-if", !0),
|
|
737
|
+
i(`
|
|
738
|
+
@slot No results slot - Displayed when no results corresponding with search query
|
|
739
|
+
`),
|
|
740
|
+
!q.value || q.value.length <= 0 ? I(e.$slots, "no-results", { key: 1 }, () => [
|
|
741
|
+
C("span", Oo, [
|
|
742
|
+
M(v(y), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
743
|
+
])
|
|
744
|
+
], !0) : (s(), b("div", No, [
|
|
745
|
+
(s(!0), b(
|
|
746
|
+
he,
|
|
747
|
+
null,
|
|
748
|
+
$e(q.value, (r, f) => (s(), b(
|
|
749
|
+
he,
|
|
750
|
+
{ key: f },
|
|
751
|
+
[
|
|
752
|
+
i(`
|
|
753
|
+
@slot Custom optgroup label
|
|
754
|
+
@binding {String} label - the label of the optgroup
|
|
755
|
+
`),
|
|
756
|
+
r.label && r.isOptGroup ? I(e.$slots, "optgroup", {
|
|
757
|
+
key: 0,
|
|
758
|
+
label: r.label
|
|
759
|
+
}, () => [
|
|
760
|
+
C(
|
|
761
|
+
"span",
|
|
762
|
+
Do,
|
|
763
|
+
J(r.label),
|
|
764
|
+
1
|
|
765
|
+
/* TEXT */
|
|
766
|
+
)
|
|
767
|
+
], !0) : (s(), b("button", {
|
|
768
|
+
key: 1,
|
|
769
|
+
tabindex: "-1",
|
|
770
|
+
type: "button",
|
|
771
|
+
class: B(["m-select-list-item maz-custom maz-flex-none", [
|
|
772
|
+
{
|
|
773
|
+
"--is-keyboard-selected": $.value === f,
|
|
774
|
+
"--is-selected": se(r),
|
|
775
|
+
"--is-none-value": U(r[e.optionValueKey])
|
|
776
|
+
}
|
|
777
|
+
]]),
|
|
778
|
+
style: ie(e.itemHeight ? { height: `${e.itemHeight}px` } : void 0),
|
|
779
|
+
onClick: ve((L) => N(r), ["prevent", "stop"])
|
|
780
|
+
}, [
|
|
781
|
+
e.multiple ? (s(), S(v(g), {
|
|
782
|
+
key: 0,
|
|
783
|
+
tabindex: "-1",
|
|
784
|
+
"model-value": se(r),
|
|
785
|
+
size: "sm",
|
|
786
|
+
color: e.color
|
|
787
|
+
}, null, 8, ["model-value", "color"])) : i("v-if", !0),
|
|
788
|
+
i(`
|
|
789
|
+
@slot Custom option
|
|
790
|
+
@binding {Object} option - the option object
|
|
791
|
+
@binding {Boolean} is-selected - if the option is selected
|
|
792
|
+
`),
|
|
793
|
+
I(e.$slots, "default", {
|
|
794
|
+
option: r,
|
|
795
|
+
isSelected: se(r)
|
|
796
|
+
}, () => [
|
|
797
|
+
C(
|
|
798
|
+
"span",
|
|
799
|
+
null,
|
|
800
|
+
J(r[e.optionLabelKey]),
|
|
801
|
+
1
|
|
802
|
+
/* TEXT */
|
|
803
|
+
)
|
|
804
|
+
], !0)
|
|
805
|
+
], 14, jo))
|
|
806
|
+
],
|
|
807
|
+
64
|
|
808
|
+
/* STABLE_FRAGMENT */
|
|
809
|
+
))),
|
|
810
|
+
128
|
|
811
|
+
/* KEYED_FRAGMENT */
|
|
812
|
+
))
|
|
813
|
+
]))
|
|
814
|
+
],
|
|
815
|
+
6
|
|
816
|
+
/* CLASS, STYLE */
|
|
817
|
+
)) : i("v-if", !0)
|
|
818
|
+
]),
|
|
819
|
+
_: 3
|
|
820
|
+
/* FORWARDED */
|
|
821
|
+
}, 8, ["name"])
|
|
822
|
+
],
|
|
823
|
+
38
|
|
824
|
+
/* CLASS, STYLE, NEED_HYDRATION */
|
|
825
|
+
));
|
|
826
|
+
}
|
|
827
|
+
}), He = /* @__PURE__ */ le(Eo, [["__scopeId", "data-v-03e7398d"]]), Fo = /* @__PURE__ */ te({
|
|
828
|
+
__name: "MazBtn",
|
|
829
|
+
props: {
|
|
830
|
+
variant: { default: "button" },
|
|
831
|
+
size: { default: "md" },
|
|
832
|
+
color: { default: "primary" },
|
|
833
|
+
type: { default: "button" },
|
|
834
|
+
rounded: { type: Boolean },
|
|
835
|
+
noRounded: { type: Boolean },
|
|
836
|
+
outline: { type: Boolean },
|
|
837
|
+
pastel: { type: Boolean },
|
|
838
|
+
block: { type: Boolean },
|
|
839
|
+
noUnderline: { type: Boolean },
|
|
840
|
+
noLeading: { type: Boolean },
|
|
841
|
+
loading: { type: Boolean },
|
|
842
|
+
disabled: { type: Boolean },
|
|
843
|
+
fab: { type: Boolean },
|
|
844
|
+
icon: { default: void 0 },
|
|
845
|
+
leftIcon: { default: void 0 },
|
|
846
|
+
rightIcon: { default: void 0 },
|
|
847
|
+
noPadding: { type: Boolean },
|
|
848
|
+
noElevation: { type: Boolean },
|
|
849
|
+
contentClass: { default: void 0 }
|
|
850
|
+
},
|
|
851
|
+
setup(d) {
|
|
852
|
+
const p = X(() => import("./MazSpinner-CV3h3CKR.mjs")), t = X(() => import("./MazIcon-C_IIdjqr.mjs")), { href: g, to: w } = lo(), m = Pe(), y = d;
|
|
853
|
+
Oe(() => {
|
|
854
|
+
y.icon && !y.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
|
|
855
|
+
});
|
|
856
|
+
const o = u(() => g ? "a" : w ? "router-link" : "button"), D = u(
|
|
857
|
+
() => y.pastel ? `--${y.color}-pastel` : y.outline ? `--${y.color}-outline` : `--${y.color}`
|
|
858
|
+
), A = u(
|
|
859
|
+
() => (y.loading || y.disabled) && o.value === "button"
|
|
860
|
+
), $ = u(() => A.value ? "--cursor-default" : "--cursor-pointer"), F = u(() => `--is-${y.variant}`), _ = u(() => y.loading && y.variant === "button"), R = u(() => !!m["left-icon"] || y.leftIcon), z = u(() => !!m["right-icon"] || y.rightIcon), V = u(() => R.value || z.value), j = u(() => y.fab && (y.icon || !!m.icon)), W = u(() => o.value === "button" ? y.type : void 0);
|
|
861
|
+
return (h, x) => (s(), S(ce(o.value), {
|
|
862
|
+
disabled: A.value,
|
|
863
|
+
class: B(["m-btn", [
|
|
864
|
+
`--${h.size}`,
|
|
865
|
+
D.value,
|
|
866
|
+
$.value,
|
|
867
|
+
F.value,
|
|
868
|
+
{
|
|
869
|
+
"--block": h.block,
|
|
870
|
+
"--no-underline": h.noUnderline,
|
|
871
|
+
"--no-leading": h.noLeading,
|
|
872
|
+
"--fab": h.fab,
|
|
873
|
+
"--loading": h.loading,
|
|
874
|
+
"--disabled": A.value,
|
|
875
|
+
"--icon": V.value,
|
|
876
|
+
"--rounded": h.rounded,
|
|
877
|
+
"--no-rounded": h.noRounded,
|
|
878
|
+
"--no-padding": h.noPadding,
|
|
879
|
+
"--no-elevation": h.noElevation
|
|
880
|
+
}
|
|
881
|
+
]]),
|
|
882
|
+
type: W.value
|
|
883
|
+
}, {
|
|
884
|
+
default: T(() => [
|
|
885
|
+
R.value ? (s(), b(
|
|
886
|
+
"div",
|
|
887
|
+
{
|
|
888
|
+
key: 0,
|
|
889
|
+
class: B(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": _.value }])
|
|
890
|
+
},
|
|
891
|
+
[
|
|
892
|
+
i(`
|
|
893
|
+
@slot left-icon - The icon to display on the left of the button
|
|
894
|
+
`),
|
|
895
|
+
I(h.$slots, "left-icon", {}, () => [
|
|
896
|
+
typeof h.leftIcon == "string" ? (s(), S(v(t), {
|
|
897
|
+
key: 0,
|
|
898
|
+
name: h.leftIcon
|
|
899
|
+
}, null, 8, ["name"])) : h.leftIcon ? (s(), S(ce(h.leftIcon), { key: 1 })) : i("v-if", !0)
|
|
900
|
+
], !0)
|
|
901
|
+
],
|
|
902
|
+
2
|
|
903
|
+
/* CLASS */
|
|
904
|
+
)) : i("v-if", !0),
|
|
905
|
+
j.value ? (s(), b(
|
|
906
|
+
"div",
|
|
907
|
+
{
|
|
908
|
+
key: 1,
|
|
909
|
+
class: B(["m-btn__icon", { "maz-invisible": _.value }])
|
|
910
|
+
},
|
|
911
|
+
[
|
|
912
|
+
i(`
|
|
913
|
+
@slot icon - The icon to display on the fab button
|
|
914
|
+
`),
|
|
915
|
+
I(h.$slots, "icon", {}, () => [
|
|
916
|
+
typeof h.icon == "string" ? (s(), S(v(t), {
|
|
917
|
+
key: 0,
|
|
918
|
+
name: h.icon
|
|
919
|
+
}, null, 8, ["name"])) : h.icon ? (s(), S(ce(h.icon), { key: 1 })) : i("v-if", !0)
|
|
920
|
+
], !0)
|
|
921
|
+
],
|
|
922
|
+
2
|
|
923
|
+
/* CLASS */
|
|
924
|
+
)) : i("v-if", !0),
|
|
925
|
+
h.$slots.default ? (s(), b(
|
|
926
|
+
"span",
|
|
927
|
+
{
|
|
928
|
+
key: 2,
|
|
929
|
+
class: B([{ "maz-invisible": _.value }, h.contentClass])
|
|
930
|
+
},
|
|
931
|
+
[
|
|
932
|
+
i(`
|
|
933
|
+
@slot default - The content of the button
|
|
934
|
+
`),
|
|
935
|
+
I(h.$slots, "default", {}, void 0, !0)
|
|
936
|
+
],
|
|
937
|
+
2
|
|
938
|
+
/* CLASS */
|
|
939
|
+
)) : i("v-if", !0),
|
|
940
|
+
z.value ? (s(), b(
|
|
941
|
+
"div",
|
|
942
|
+
{
|
|
943
|
+
key: 3,
|
|
944
|
+
class: B(["m-btn__icon-right", { "maz-invisible": _.value }])
|
|
945
|
+
},
|
|
946
|
+
[
|
|
947
|
+
i(`
|
|
948
|
+
@slot right-icon - The icon to display on the right of the button
|
|
949
|
+
`),
|
|
950
|
+
I(h.$slots, "right-icon", {}, () => [
|
|
951
|
+
typeof h.rightIcon == "string" ? (s(), S(v(t), {
|
|
952
|
+
key: 0,
|
|
953
|
+
name: h.rightIcon
|
|
954
|
+
}, null, 8, ["name"])) : h.rightIcon ? (s(), S(ce(h.rightIcon), { key: 1 })) : i("v-if", !0)
|
|
955
|
+
], !0)
|
|
956
|
+
],
|
|
957
|
+
2
|
|
958
|
+
/* CLASS */
|
|
959
|
+
)) : i("v-if", !0),
|
|
960
|
+
_.value ? (s(), S(v(p), {
|
|
961
|
+
key: 4,
|
|
962
|
+
class: "m-btn-loader",
|
|
963
|
+
size: "2em",
|
|
964
|
+
color: h.color
|
|
965
|
+
}, null, 8, ["color"])) : i("v-if", !0)
|
|
966
|
+
]),
|
|
967
|
+
_: 3
|
|
968
|
+
/* FORWARDED */
|
|
969
|
+
}, 8, ["disabled", "class", "type"]));
|
|
970
|
+
}
|
|
971
|
+
}), be = /* @__PURE__ */ le(Fo, [["__scopeId", "data-v-be73a6f1"]]), Ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
972
|
+
__proto__: null,
|
|
973
|
+
default: be
|
|
974
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
975
|
+
function De(d, p) {
|
|
976
|
+
const t = ao(d, p);
|
|
977
|
+
if (!t)
|
|
978
|
+
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${d}`);
|
|
979
|
+
return t;
|
|
980
|
+
}
|
|
981
|
+
const Uo = /* @__PURE__ */ te({
|
|
982
|
+
__name: "MazTableRow",
|
|
983
|
+
props: {
|
|
984
|
+
noHoverable: { type: Boolean }
|
|
985
|
+
},
|
|
986
|
+
setup(d) {
|
|
987
|
+
const { hoverable: p, backgroundEven: t, backgroundOdd: g } = De("maz-table");
|
|
988
|
+
return (w, m) => (s(), b(
|
|
989
|
+
"tr",
|
|
990
|
+
{
|
|
991
|
+
class: B(["m-table-row", {
|
|
992
|
+
"--hoverable": v(p) && !w.noHoverable,
|
|
993
|
+
"--background-odd": v(g),
|
|
994
|
+
"--background-even": v(t)
|
|
995
|
+
}])
|
|
996
|
+
},
|
|
997
|
+
[
|
|
998
|
+
I(w.$slots, "default", {}, void 0, !0)
|
|
999
|
+
],
|
|
1000
|
+
2
|
|
1001
|
+
/* CLASS */
|
|
1002
|
+
));
|
|
1003
|
+
}
|
|
1004
|
+
}), Me = /* @__PURE__ */ le(Uo, [["__scopeId", "data-v-57ba9a97"]]), Ro = /* @__PURE__ */ te({
|
|
1005
|
+
__name: "MazTableCell",
|
|
1006
|
+
setup(d) {
|
|
1007
|
+
const { size: p } = De("maz-table");
|
|
1008
|
+
return (t, g) => (s(), b(
|
|
1009
|
+
"td",
|
|
1010
|
+
{
|
|
1011
|
+
class: B(["m-table-cell", `--${v(p)}`])
|
|
1012
|
+
},
|
|
1013
|
+
[
|
|
1014
|
+
I(t.$slots, "default", {}, void 0, !0)
|
|
1015
|
+
],
|
|
1016
|
+
2
|
|
1017
|
+
/* CLASS */
|
|
1018
|
+
));
|
|
1019
|
+
}
|
|
1020
|
+
}), we = /* @__PURE__ */ le(Ro, [["__scopeId", "data-v-0668079a"]]), qo = /* @__PURE__ */ te({
|
|
1021
|
+
__name: "MazTableTitle",
|
|
1022
|
+
setup(d) {
|
|
1023
|
+
const { size: p } = De("maz-table");
|
|
1024
|
+
return (t, g) => (s(), b(
|
|
1025
|
+
"th",
|
|
1026
|
+
{
|
|
1027
|
+
class: B(["m-table-title", `--${v(p)}`])
|
|
1028
|
+
},
|
|
1029
|
+
[
|
|
1030
|
+
I(t.$slots, "default", {}, void 0, !0)
|
|
1031
|
+
],
|
|
1032
|
+
2
|
|
1033
|
+
/* CLASS */
|
|
1034
|
+
));
|
|
1035
|
+
}
|
|
1036
|
+
}), Ae = /* @__PURE__ */ le(qo, [["__scopeId", "data-v-7d02b262"]]), Qo = (d) => (Ue("data-v-26d3bae5"), d = d(), Re(), d), Wo = { class: "m-loading-bar" }, Go = /* @__PURE__ */ Qo(() => /* @__PURE__ */ C(
|
|
1037
|
+
"div",
|
|
1038
|
+
null,
|
|
1039
|
+
null,
|
|
1040
|
+
-1
|
|
1041
|
+
/* HOISTED */
|
|
1042
|
+
)), Yo = [
|
|
1043
|
+
Go
|
|
1044
|
+
], Zo = /* @__PURE__ */ te({
|
|
1045
|
+
__name: "MazLoadingBar",
|
|
1046
|
+
props: {
|
|
1047
|
+
color: { default: "primary" },
|
|
1048
|
+
height: { default: "0.125rem" }
|
|
1049
|
+
},
|
|
1050
|
+
setup(d) {
|
|
1051
|
+
Ve((g) => ({
|
|
1052
|
+
"4d5d421f": g.height,
|
|
1053
|
+
d3c0e8e8: t.value.alpha,
|
|
1054
|
+
ccfba46a: t.value.main
|
|
1055
|
+
}));
|
|
1056
|
+
const p = d, t = u(() => ({
|
|
1057
|
+
alpha: `var(--maz-color-${p.color}-alpha-20)`,
|
|
1058
|
+
main: `var(--maz-color-${p.color})`
|
|
1059
|
+
}));
|
|
1060
|
+
return (g, w) => (s(), b("div", Wo, Yo));
|
|
1061
|
+
}
|
|
1062
|
+
}), Jo = /* @__PURE__ */ le(Zo, [["__scopeId", "data-v-26d3bae5"]]), Xo = {
|
|
1063
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1064
|
+
width: "1em",
|
|
1065
|
+
height: "1em",
|
|
1066
|
+
fill: "none",
|
|
1067
|
+
viewBox: "0 0 24 24"
|
|
1068
|
+
}, xo = /* @__PURE__ */ C(
|
|
1069
|
+
"path",
|
|
1070
|
+
{
|
|
1071
|
+
stroke: "currentColor",
|
|
1072
|
+
"stroke-linecap": "round",
|
|
1073
|
+
"stroke-linejoin": "round",
|
|
1074
|
+
"stroke-width": "1.5",
|
|
1075
|
+
d: "m4.5 12.75 6 6 9-13.5"
|
|
1076
|
+
},
|
|
1077
|
+
null,
|
|
1078
|
+
-1
|
|
1079
|
+
/* HOISTED */
|
|
1080
|
+
), et = [
|
|
1081
|
+
xo
|
|
1082
|
+
];
|
|
1083
|
+
function Ge(d, p) {
|
|
1084
|
+
return s(), b("svg", Xo, [...et]);
|
|
1085
|
+
}
|
|
1086
|
+
const Ye = { render: Ge }, ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1087
|
+
__proto__: null,
|
|
1088
|
+
default: Ye,
|
|
1089
|
+
render: Ge
|
|
1090
|
+
}, Symbol.toStringTag, { value: "Module" })), tt = ["for", "aria-checked"], lt = ["id", "checked", "disabled", "name"], at = /* @__PURE__ */ te({
|
|
1091
|
+
inheritAttrs: !1,
|
|
1092
|
+
__name: "MazCheckbox",
|
|
1093
|
+
props: {
|
|
1094
|
+
style: { default: void 0 },
|
|
1095
|
+
class: { default: void 0 },
|
|
1096
|
+
modelValue: { type: [Boolean, Array], default: void 0 },
|
|
1097
|
+
id: { default: void 0 },
|
|
1098
|
+
color: { default: "primary" },
|
|
1099
|
+
value: { type: [String, Number, Boolean], default: void 0 },
|
|
1100
|
+
name: { default: "m-checkbox" },
|
|
1101
|
+
size: { default: "md" },
|
|
1102
|
+
label: { default: void 0 },
|
|
1103
|
+
disabled: { type: Boolean, default: !1 }
|
|
1104
|
+
},
|
|
1105
|
+
emits: [
|
|
1106
|
+
/* emitted when value change */
|
|
1107
|
+
"update:model-value",
|
|
1108
|
+
/* emited when value change */
|
|
1109
|
+
"change"
|
|
1110
|
+
],
|
|
1111
|
+
setup(d, { emit: p }) {
|
|
1112
|
+
Ve((z) => ({
|
|
1113
|
+
"3eedcc0a": D.value,
|
|
1114
|
+
a3137f46: y.value,
|
|
1115
|
+
"03d4fcac": A.value,
|
|
1116
|
+
"5778d022": $.value
|
|
1117
|
+
}));
|
|
1118
|
+
const t = d, g = p, w = Ne({
|
|
1119
|
+
componentName: "MazCheckbox",
|
|
1120
|
+
providedId: t.id
|
|
1121
|
+
}), m = u(
|
|
1122
|
+
() => typeof t.value != "boolean" && Array.isArray(t.modelValue) ? t.modelValue.includes(t.value) : typeof t.modelValue == "boolean" ? t.modelValue : !1
|
|
1123
|
+
), y = u(() => {
|
|
1124
|
+
switch (t.size) {
|
|
1125
|
+
case "xl":
|
|
1126
|
+
return "2.25rem";
|
|
1127
|
+
case "lg":
|
|
1128
|
+
return "2rem";
|
|
1129
|
+
default:
|
|
1130
|
+
return "1.625rem";
|
|
1131
|
+
case "sm":
|
|
1132
|
+
return "1.425rem";
|
|
1133
|
+
case "xs":
|
|
1134
|
+
return "1.325rem";
|
|
1135
|
+
case "mini":
|
|
1136
|
+
return "1.2rem";
|
|
1137
|
+
}
|
|
1138
|
+
}), o = u(() => {
|
|
1139
|
+
switch (t.size) {
|
|
1140
|
+
case "xl":
|
|
1141
|
+
return "maz-text-2xl";
|
|
1142
|
+
case "lg":
|
|
1143
|
+
return "maz-text-xl";
|
|
1144
|
+
default:
|
|
1145
|
+
return "maz-text-lg";
|
|
1146
|
+
case "sm":
|
|
1147
|
+
return "maz-text-base";
|
|
1148
|
+
case "xs":
|
|
1149
|
+
return "maz-text-sm";
|
|
1150
|
+
case "mini":
|
|
1151
|
+
return "maz-text-xs";
|
|
1152
|
+
}
|
|
1153
|
+
}), D = u(() => `var(--maz-color-${t.color}-contrast)`), A = u(() => `var(--maz-color-${t.color})`), $ = u(
|
|
1154
|
+
() => ["black", "transparent"].includes(t.color) ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-alpha)`
|
|
1155
|
+
);
|
|
1156
|
+
function F(z) {
|
|
1157
|
+
["Space"].includes(z.code) && (z.preventDefault(), R(t.value ?? !t.modelValue));
|
|
1158
|
+
}
|
|
1159
|
+
function _(z) {
|
|
1160
|
+
return typeof z == "boolean" && (typeof t.modelValue == "boolean" || t.modelValue === void 0 || t.modelValue === null) ? !t.modelValue : Array.isArray(t.modelValue) && typeof z != "boolean" ? t.modelValue.includes(z) ? t.modelValue.filter((V) => V !== z) : [...t.modelValue, z] : [z];
|
|
1161
|
+
}
|
|
1162
|
+
function R(z) {
|
|
1163
|
+
const V = _(z);
|
|
1164
|
+
g("update:model-value", V), g("change", V);
|
|
1165
|
+
}
|
|
1166
|
+
return (z, V) => (s(), b("label", {
|
|
1167
|
+
for: v(w),
|
|
1168
|
+
class: B(["m-checkbox", [{ "--disabled": z.disabled }, t.class]]),
|
|
1169
|
+
tabindex: "0",
|
|
1170
|
+
style: ie(z.style),
|
|
1171
|
+
role: "checkbox",
|
|
1172
|
+
"aria-checked": m.value,
|
|
1173
|
+
onKeydown: F
|
|
1174
|
+
}, [
|
|
1175
|
+
C("input", Te({
|
|
1176
|
+
id: v(w),
|
|
1177
|
+
checked: m.value
|
|
1178
|
+
}, z.$attrs, {
|
|
1179
|
+
tabindex: "-1",
|
|
1180
|
+
disabled: z.disabled,
|
|
1181
|
+
name: z.name,
|
|
1182
|
+
type: "checkbox",
|
|
1183
|
+
onChange: V[0] || (V[0] = (j) => {
|
|
1184
|
+
var W;
|
|
1185
|
+
return R(z.value ?? ((W = j == null ? void 0 : j.target) == null ? void 0 : W.checked));
|
|
1186
|
+
})
|
|
1187
|
+
}), null, 16, lt),
|
|
1188
|
+
C("span", null, [
|
|
1189
|
+
M(v(Ye), {
|
|
1190
|
+
class: B(["check-icon", o.value])
|
|
1191
|
+
}, null, 8, ["class"])
|
|
1192
|
+
]),
|
|
1193
|
+
I(z.$slots, "default", {}, () => [
|
|
1194
|
+
re(
|
|
1195
|
+
J(z.label),
|
|
1196
|
+
1
|
|
1197
|
+
/* TEXT */
|
|
1198
|
+
)
|
|
1199
|
+
], !0)
|
|
1200
|
+
], 46, tt));
|
|
1201
|
+
}
|
|
1202
|
+
}), Le = /* @__PURE__ */ le(at, [["__scopeId", "data-v-06d3ee3a"]]), nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1203
|
+
__proto__: null,
|
|
1204
|
+
default: Le
|
|
1205
|
+
}, Symbol.toStringTag, { value: "Module" })), Ze = (d) => (Ue("data-v-04b924e2"), d = d(), Re(), d), st = {
|
|
1206
|
+
key: 0,
|
|
1207
|
+
class: "m-table-header"
|
|
1208
|
+
}, rt = { class: "m-table-spacer" }, it = { class: "m-table-header-title" }, ut = {
|
|
1209
|
+
key: 0,
|
|
1210
|
+
class: "m-table-header-search"
|
|
1211
|
+
}, dt = { key: 0 }, ct = { key: 1 }, pt = {
|
|
1212
|
+
key: 0,
|
|
1213
|
+
class: "m-table-sort-icon-wrapper"
|
|
1214
|
+
}, ft = { class: "maz-text-center maz-text-muted" }, mt = {
|
|
1215
|
+
key: 1,
|
|
1216
|
+
class: "m-table-footer"
|
|
1217
|
+
}, vt = /* @__PURE__ */ Ze(() => /* @__PURE__ */ C(
|
|
1218
|
+
"div",
|
|
1219
|
+
{ class: "m-table-spacer" },
|
|
1220
|
+
null,
|
|
1221
|
+
-1
|
|
1222
|
+
/* HOISTED */
|
|
1223
|
+
)), bt = {
|
|
1224
|
+
key: 0,
|
|
1225
|
+
class: "m-table-footer-pagination"
|
|
1226
|
+
}, ht = { class: "m-table-footer-pagination-items-per-page" }, yt = /* @__PURE__ */ Ze(() => /* @__PURE__ */ C(
|
|
1227
|
+
"span",
|
|
1228
|
+
{ class: "maz-hidden maz-text-sm maz-text-muted tab-s:maz-block" },
|
|
1229
|
+
" Item per page ",
|
|
1230
|
+
-1
|
|
1231
|
+
/* HOISTED */
|
|
1232
|
+
)), gt = {
|
|
1233
|
+
key: 0,
|
|
1234
|
+
class: "maz-whitespace-nowrap maz-text-sm"
|
|
1235
|
+
}, zt = { class: "m-table-footer-pagination-buttons" }, kt = /* @__PURE__ */ te({
|
|
1236
|
+
__name: "MazTable",
|
|
1237
|
+
props: {
|
|
1238
|
+
tableClass: { default: void 0 },
|
|
1239
|
+
tableStyle: { default: void 0 },
|
|
1240
|
+
modelValue: { default: void 0 },
|
|
1241
|
+
size: { default: "md" },
|
|
1242
|
+
title: { default: void 0 },
|
|
1243
|
+
headers: { default: void 0 },
|
|
1244
|
+
sortable: { type: Boolean },
|
|
1245
|
+
headersAlign: { default: "left" },
|
|
1246
|
+
rows: { default: void 0 },
|
|
1247
|
+
hoverable: { type: Boolean },
|
|
1248
|
+
search: { type: Boolean },
|
|
1249
|
+
noSearchInRow: { type: Boolean },
|
|
1250
|
+
searchPlaceholder: { default: "Search" },
|
|
1251
|
+
noSearchBy: { type: Boolean },
|
|
1252
|
+
searchByPlaceholder: { default: "Search by" },
|
|
1253
|
+
searchByAllLabel: { default: "All" },
|
|
1254
|
+
searchQuery: { default: void 0 },
|
|
1255
|
+
backgroundOdd: { type: Boolean },
|
|
1256
|
+
backgroundEven: { type: Boolean },
|
|
1257
|
+
elevation: { type: Boolean },
|
|
1258
|
+
divider: { type: Boolean },
|
|
1259
|
+
caption: { default: void 0 },
|
|
1260
|
+
captionSide: { default: "bottom" },
|
|
1261
|
+
pagination: { type: Boolean },
|
|
1262
|
+
page: { default: 1 },
|
|
1263
|
+
pageSize: { default: 20 },
|
|
1264
|
+
totalPages: { default: void 0 },
|
|
1265
|
+
paginationAllLabel: { default: "All" },
|
|
1266
|
+
noPaginateRows: { type: Boolean },
|
|
1267
|
+
totalItems: { default: void 0 },
|
|
1268
|
+
loading: { type: Boolean },
|
|
1269
|
+
selectable: { type: Boolean },
|
|
1270
|
+
selectedKey: { default: void 0 },
|
|
1271
|
+
tableLayout: { default: void 0 },
|
|
1272
|
+
color: { default: "primary" }
|
|
1273
|
+
},
|
|
1274
|
+
emits: ["update:model-value", "update:search-query", "update:page", "update:page-size"],
|
|
1275
|
+
setup(d, { emit: p }) {
|
|
1276
|
+
Ve((l) => ({
|
|
1277
|
+
"80c1f54c": t.tableLayout,
|
|
1278
|
+
"472efd1f": t.captionSide
|
|
1279
|
+
}));
|
|
1280
|
+
const t = d, g = u(
|
|
1281
|
+
() => t.divider && !t.backgroundEven && !t.backgroundOdd
|
|
1282
|
+
), w = p, { size: m, hoverable: y, backgroundEven: o, backgroundOdd: D } = no(t);
|
|
1283
|
+
so("maz-table", {
|
|
1284
|
+
size: m,
|
|
1285
|
+
hoverable: y,
|
|
1286
|
+
backgroundEven: o,
|
|
1287
|
+
backgroundOdd: D
|
|
1288
|
+
});
|
|
1289
|
+
const A = O(q()), $ = u(() => t.selectable || !!t.selectedKey), F = O(t.page);
|
|
1290
|
+
ke(
|
|
1291
|
+
() => t.page,
|
|
1292
|
+
(l) => {
|
|
1293
|
+
F.value = l;
|
|
1294
|
+
}
|
|
1295
|
+
);
|
|
1296
|
+
const _ = u({
|
|
1297
|
+
get: () => F.value,
|
|
1298
|
+
set: (l) => {
|
|
1299
|
+
F.value = l, w("update:page", l);
|
|
1300
|
+
}
|
|
1301
|
+
}), R = u(() => [
|
|
1302
|
+
{ label: t.paginationAllLabel, value: Number.POSITIVE_INFINITY },
|
|
1303
|
+
{ label: 5, value: 5 },
|
|
1304
|
+
{ label: 10, value: 10 },
|
|
1305
|
+
{ label: 20, value: 20 },
|
|
1306
|
+
{ label: 50, value: 50 },
|
|
1307
|
+
{ label: 100, value: 100 },
|
|
1308
|
+
{ label: 200, value: 200 }
|
|
1309
|
+
]), z = O(t.pageSize);
|
|
1310
|
+
ke(
|
|
1311
|
+
() => t.pageSize,
|
|
1312
|
+
(l) => {
|
|
1313
|
+
z.value = l;
|
|
1314
|
+
}
|
|
1315
|
+
);
|
|
1316
|
+
const V = u({
|
|
1317
|
+
get: () => z.value,
|
|
1318
|
+
set: (l) => {
|
|
1319
|
+
z.value = l, w("update:page-size", l);
|
|
1320
|
+
}
|
|
1321
|
+
}), j = u(() => {
|
|
1322
|
+
var l;
|
|
1323
|
+
return t.totalPages ?? (V.value === Number.POSITIVE_INFINITY || !((l = t.rows) != null && l.length)) ? 1 : Math.ceil(t.rows.length / V.value);
|
|
1324
|
+
});
|
|
1325
|
+
function W() {
|
|
1326
|
+
_.value = 1;
|
|
1327
|
+
}
|
|
1328
|
+
function h() {
|
|
1329
|
+
_.value = j.value;
|
|
1330
|
+
}
|
|
1331
|
+
function x() {
|
|
1332
|
+
_.value = _.value - 1;
|
|
1333
|
+
}
|
|
1334
|
+
function ne() {
|
|
1335
|
+
_.value = _.value + 1;
|
|
1336
|
+
}
|
|
1337
|
+
const G = u(() => {
|
|
1338
|
+
if (!t.pagination || t.noPaginateRows || V.value === Number.POSITIVE_INFINITY)
|
|
1339
|
+
return A.value;
|
|
1340
|
+
const l = (F.value - 1) * V.value, k = l + V.value;
|
|
1341
|
+
return A.value.slice(l, k);
|
|
1342
|
+
});
|
|
1343
|
+
ke(
|
|
1344
|
+
() => [t.rows, t.modelValue],
|
|
1345
|
+
() => {
|
|
1346
|
+
A.value = q();
|
|
1347
|
+
}
|
|
1348
|
+
);
|
|
1349
|
+
const ee = O(), ue = u(() => [
|
|
1350
|
+
// eslint-disable-next-line unicorn/no-null
|
|
1351
|
+
{ label: t.searchByAllLabel, value: null },
|
|
1352
|
+
...Z.value.map((l) => ({
|
|
1353
|
+
label: l.label,
|
|
1354
|
+
value: l.key
|
|
1355
|
+
}))
|
|
1356
|
+
]), ae = O(t.searchQuery);
|
|
1357
|
+
ke(
|
|
1358
|
+
() => t.searchQuery,
|
|
1359
|
+
(l) => {
|
|
1360
|
+
ae.value = l;
|
|
1361
|
+
}
|
|
1362
|
+
);
|
|
1363
|
+
const U = u({
|
|
1364
|
+
get: () => ae.value,
|
|
1365
|
+
set: (l) => {
|
|
1366
|
+
ae.value = l, w("update:search-query", l);
|
|
1367
|
+
}
|
|
1368
|
+
});
|
|
1369
|
+
function se(l) {
|
|
1370
|
+
return [...l].sort((k, c) => {
|
|
1371
|
+
if (Q.value === void 0 || E.value === void 0)
|
|
1372
|
+
return 0;
|
|
1373
|
+
const K = k[Z.value[Q.value].key], N = c[Z.value[Q.value].key];
|
|
1374
|
+
return typeof K == "string" && typeof N == "string" ? E.value === "ASC" ? K.localeCompare(N) : N.localeCompare(K) : E.value === "ASC" ? K - N : N - K;
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
function pe(l) {
|
|
1378
|
+
if (t.noSearchInRow || typeof U.value != "string")
|
|
1379
|
+
return G.value;
|
|
1380
|
+
const k = U.value.toLowerCase();
|
|
1381
|
+
return [...l].filter((c) => ee.value ? String(c[ee.value]).toLowerCase().includes(k) : Object.values(c).some((K) => typeof K == "string" || typeof K == "number" || typeof K == "boolean" ? String(K).toLowerCase().includes(k) : !1));
|
|
1382
|
+
}
|
|
1383
|
+
const Y = u(() => {
|
|
1384
|
+
const l = pe(G.value);
|
|
1385
|
+
return se(l);
|
|
1386
|
+
}), a = Pe(), P = u(() => t.search || !!t.title || !!a.title), oe = u(() => t.pagination), Z = O(ye());
|
|
1387
|
+
function ye() {
|
|
1388
|
+
var l;
|
|
1389
|
+
return ((l = t.headers) == null ? void 0 : l.map(
|
|
1390
|
+
(k) => typeof k == "string" ? { label: k, align: t.headersAlign } : { align: t.headersAlign, thHeaders: k.headers, ...k }
|
|
1391
|
+
)) ?? [];
|
|
1392
|
+
}
|
|
1393
|
+
function q() {
|
|
1394
|
+
var l;
|
|
1395
|
+
return ((l = t.rows) == null ? void 0 : l.map((k) => {
|
|
1396
|
+
var c;
|
|
1397
|
+
return {
|
|
1398
|
+
selected: (c = t.modelValue) == null ? void 0 : c.includes(t.selectedKey ? k[t.selectedKey] : k),
|
|
1399
|
+
...k
|
|
1400
|
+
};
|
|
1401
|
+
})) ?? [];
|
|
1402
|
+
}
|
|
1403
|
+
const Q = O(), E = O();
|
|
1404
|
+
function ge(l) {
|
|
1405
|
+
l === Q.value ? E.value = E.value === void 0 ? "DESC" : E.value === "DESC" ? "ASC" : void 0 : E.value = "DESC", Q.value = E.value === void 0 ? void 0 : l;
|
|
1406
|
+
}
|
|
1407
|
+
const ze = u({
|
|
1408
|
+
get: () => Y.value.every((l) => l.selected) ?? !1,
|
|
1409
|
+
set: Ie
|
|
1410
|
+
});
|
|
1411
|
+
function Ie(l) {
|
|
1412
|
+
for (const k of Y.value)
|
|
1413
|
+
k.selected = l;
|
|
1414
|
+
fe();
|
|
1415
|
+
}
|
|
1416
|
+
function Se(l, k) {
|
|
1417
|
+
Y.value[k].selected = l, fe();
|
|
1418
|
+
}
|
|
1419
|
+
function fe(l) {
|
|
1420
|
+
l = l ?? me();
|
|
1421
|
+
const k = l != null && l.length ? l : void 0;
|
|
1422
|
+
w("update:model-value", k);
|
|
1423
|
+
}
|
|
1424
|
+
function me() {
|
|
1425
|
+
return Y.value.filter((l) => l.selected).map((l) => t.selectedKey ? l[t.selectedKey] : l);
|
|
1426
|
+
}
|
|
1427
|
+
return Oe(() => {
|
|
1428
|
+
const l = me();
|
|
1429
|
+
l != null && l.length && fe(l);
|
|
1430
|
+
}), (l, k) => (s(), b(
|
|
1431
|
+
"div",
|
|
1432
|
+
{
|
|
1433
|
+
class: B(["m-table", { "--has-header": P.value }])
|
|
1434
|
+
},
|
|
1435
|
+
[
|
|
1436
|
+
P.value ? (s(), b("div", st, [
|
|
1437
|
+
C("div", rt, [
|
|
1438
|
+
l.title || l.$slots.title ? I(l.$slots, "title", { key: 0 }, () => [
|
|
1439
|
+
C(
|
|
1440
|
+
"span",
|
|
1441
|
+
it,
|
|
1442
|
+
J(l.title),
|
|
1443
|
+
1
|
|
1444
|
+
/* TEXT */
|
|
1445
|
+
)
|
|
1446
|
+
], !0) : i("v-if", !0)
|
|
1447
|
+
]),
|
|
1448
|
+
l.search ? (s(), b("div", ut, [
|
|
1449
|
+
l.noSearchBy ? i("v-if", !0) : (s(), S(He, {
|
|
1450
|
+
key: 0,
|
|
1451
|
+
modelValue: ee.value,
|
|
1452
|
+
"onUpdate:modelValue": k[0] || (k[0] = (c) => ee.value = c),
|
|
1453
|
+
color: l.color,
|
|
1454
|
+
style: { width: "8rem" },
|
|
1455
|
+
placeholder: l.searchByPlaceholder,
|
|
1456
|
+
size: v(m),
|
|
1457
|
+
options: ue.value
|
|
1458
|
+
}, null, 8, ["modelValue", "color", "placeholder", "size", "options"])),
|
|
1459
|
+
M(Ke, {
|
|
1460
|
+
modelValue: U.value,
|
|
1461
|
+
"onUpdate:modelValue": k[1] || (k[1] = (c) => U.value = c),
|
|
1462
|
+
size: v(m),
|
|
1463
|
+
color: l.color,
|
|
1464
|
+
placeholder: l.searchPlaceholder,
|
|
1465
|
+
"left-icon": v(Qe)
|
|
1466
|
+
}, null, 8, ["modelValue", "size", "color", "placeholder", "left-icon"])
|
|
1467
|
+
])) : i("v-if", !0)
|
|
1468
|
+
])) : i("v-if", !0),
|
|
1469
|
+
C(
|
|
1470
|
+
"table",
|
|
1471
|
+
{
|
|
1472
|
+
class: B([{ "--elevation": l.elevation, "--has-layout": l.tableLayout }, l.tableClass]),
|
|
1473
|
+
style: ie(l.tableStyle)
|
|
1474
|
+
},
|
|
1475
|
+
[
|
|
1476
|
+
l.caption || l.$slots.caption ? (s(), b("caption", dt, [
|
|
1477
|
+
i(`
|
|
1478
|
+
@slot caption - add caption on top or bottom of the table
|
|
1479
|
+
`),
|
|
1480
|
+
I(l.$slots, "caption", {}, () => [
|
|
1481
|
+
re(
|
|
1482
|
+
J(l.caption),
|
|
1483
|
+
1
|
|
1484
|
+
/* TEXT */
|
|
1485
|
+
)
|
|
1486
|
+
], !0)
|
|
1487
|
+
])) : i("v-if", !0),
|
|
1488
|
+
Z.value ? (s(), b("thead", ct, [
|
|
1489
|
+
i(`
|
|
1490
|
+
@slot thead - content in thead element
|
|
1491
|
+
`),
|
|
1492
|
+
I(l.$slots, "thead", {}, () => [
|
|
1493
|
+
M(Me, { "no-hoverable": "" }, {
|
|
1494
|
+
default: T(() => [
|
|
1495
|
+
$.value ? (s(), S(Ae, {
|
|
1496
|
+
key: 0,
|
|
1497
|
+
align: "left",
|
|
1498
|
+
class: B([`--${v(m)}`, "m-table-select-column"])
|
|
1499
|
+
}, {
|
|
1500
|
+
default: T(() => [
|
|
1501
|
+
M(Le, {
|
|
1502
|
+
modelValue: ze.value,
|
|
1503
|
+
"onUpdate:modelValue": k[2] || (k[2] = (c) => ze.value = c),
|
|
1504
|
+
size: "xs"
|
|
1505
|
+
}, null, 8, ["modelValue"])
|
|
1506
|
+
]),
|
|
1507
|
+
_: 1
|
|
1508
|
+
/* STABLE */
|
|
1509
|
+
}, 8, ["class"])) : i("v-if", !0),
|
|
1510
|
+
(s(!0), b(
|
|
1511
|
+
he,
|
|
1512
|
+
null,
|
|
1513
|
+
$e(Z.value, (c, K) => (s(), S(Ae, {
|
|
1514
|
+
key: K,
|
|
1515
|
+
scope: c.scope,
|
|
1516
|
+
align: c.align,
|
|
1517
|
+
rowspan: c.rowspan,
|
|
1518
|
+
colspan: c.colspan,
|
|
1519
|
+
headers: c.thHeaders,
|
|
1520
|
+
style: ie({ width: c.width, textAlign: c.align }),
|
|
1521
|
+
class: B(["maz-group", [
|
|
1522
|
+
{ "--hidden": c.hidden, "--sortable": c.sortable ?? l.sortable },
|
|
1523
|
+
c.classes,
|
|
1524
|
+
`--${v(m)}`
|
|
1525
|
+
]]),
|
|
1526
|
+
onClick: (N) => (c.sortable ?? l.sortable) && ge(K)
|
|
1527
|
+
}, {
|
|
1528
|
+
default: T(() => [
|
|
1529
|
+
C(
|
|
1530
|
+
"span",
|
|
1531
|
+
{
|
|
1532
|
+
class: B({ "maz-sr-only": c.srOnly })
|
|
1533
|
+
},
|
|
1534
|
+
[
|
|
1535
|
+
i(`
|
|
1536
|
+
@slot header - replace column header
|
|
1537
|
+
@binding {Object} header - header data
|
|
1538
|
+
@binding {String} label - header label
|
|
1539
|
+
`),
|
|
1540
|
+
I(l.$slots, "header", {
|
|
1541
|
+
header: c,
|
|
1542
|
+
label: c.label
|
|
1543
|
+
}, () => [
|
|
1544
|
+
i(`
|
|
1545
|
+
@slot header-label-{key} - replace column header label
|
|
1546
|
+
@binding {Object} header - header data
|
|
1547
|
+
@binding {String} label - header label
|
|
1548
|
+
`),
|
|
1549
|
+
I(l.$slots, `header-label-${c.key}`, {
|
|
1550
|
+
header: c,
|
|
1551
|
+
label: c.label
|
|
1552
|
+
}, () => [
|
|
1553
|
+
re(
|
|
1554
|
+
J(c.label),
|
|
1555
|
+
1
|
|
1556
|
+
/* TEXT */
|
|
1557
|
+
)
|
|
1558
|
+
], !0),
|
|
1559
|
+
c.sortable ?? l.sortable ? (s(), b("div", pt, [
|
|
1560
|
+
M(v(bo), {
|
|
1561
|
+
class: B(["m-table-sort-icon maz-hidden group-hover:maz-block", {
|
|
1562
|
+
"--sorted": K === Q.value,
|
|
1563
|
+
"--up": E.value === "DESC",
|
|
1564
|
+
"--down": E.value === "ASC"
|
|
1565
|
+
}])
|
|
1566
|
+
}, null, 8, ["class"])
|
|
1567
|
+
])) : i("v-if", !0)
|
|
1568
|
+
], !0)
|
|
1569
|
+
],
|
|
1570
|
+
2
|
|
1571
|
+
/* CLASS */
|
|
1572
|
+
)
|
|
1573
|
+
]),
|
|
1574
|
+
_: 2
|
|
1575
|
+
/* DYNAMIC */
|
|
1576
|
+
}, 1032, ["scope", "align", "rowspan", "colspan", "headers", "style", "class", "onClick"]))),
|
|
1577
|
+
128
|
|
1578
|
+
/* KEYED_FRAGMENT */
|
|
1579
|
+
)),
|
|
1580
|
+
l.$slots.actions ? (s(), S(Ae, {
|
|
1581
|
+
key: 1,
|
|
1582
|
+
align: "left",
|
|
1583
|
+
class: B(`--${v(m)}`)
|
|
1584
|
+
}, {
|
|
1585
|
+
default: T(() => [
|
|
1586
|
+
i(`
|
|
1587
|
+
@slot actions-header - replace text of actions header
|
|
1588
|
+
`),
|
|
1589
|
+
I(l.$slots, "actions-header", {}, () => [
|
|
1590
|
+
re(" Actions ")
|
|
1591
|
+
], !0)
|
|
1592
|
+
]),
|
|
1593
|
+
_: 3
|
|
1594
|
+
/* FORWARDED */
|
|
1595
|
+
}, 8, ["class"])) : i("v-if", !0)
|
|
1596
|
+
]),
|
|
1597
|
+
_: 3
|
|
1598
|
+
/* FORWARDED */
|
|
1599
|
+
})
|
|
1600
|
+
], !0)
|
|
1601
|
+
])) : i("v-if", !0),
|
|
1602
|
+
l.loading ? (s(), S(Jo, {
|
|
1603
|
+
key: 2,
|
|
1604
|
+
color: l.color,
|
|
1605
|
+
class: "!maz-absolute"
|
|
1606
|
+
}, null, 8, ["color"])) : i("v-if", !0),
|
|
1607
|
+
C(
|
|
1608
|
+
"tbody",
|
|
1609
|
+
{
|
|
1610
|
+
class: B({ "--divider": g.value })
|
|
1611
|
+
},
|
|
1612
|
+
[
|
|
1613
|
+
I(l.$slots, "default", {}, () => [
|
|
1614
|
+
Y.value.length > 0 ? (s(!0), b(
|
|
1615
|
+
he,
|
|
1616
|
+
{ key: 0 },
|
|
1617
|
+
$e(Y.value, (c, K) => (s(), S(Me, {
|
|
1618
|
+
key: K,
|
|
1619
|
+
class: B(c.classes),
|
|
1620
|
+
onClick: (N) => c.action && c.action(c)
|
|
1621
|
+
}, {
|
|
1622
|
+
default: T(() => [
|
|
1623
|
+
$.value ? (s(), S(
|
|
1624
|
+
we,
|
|
1625
|
+
{
|
|
1626
|
+
key: 0,
|
|
1627
|
+
class: "m-table-select-column"
|
|
1628
|
+
},
|
|
1629
|
+
{
|
|
1630
|
+
default: T(() => [
|
|
1631
|
+
i(`
|
|
1632
|
+
@slot select - replace checkbox component
|
|
1633
|
+
@binding {Object} row - row data
|
|
1634
|
+
@binding {Boolean} selected - if selected or not
|
|
1635
|
+
`),
|
|
1636
|
+
I(l.$slots, "select", {
|
|
1637
|
+
row: c,
|
|
1638
|
+
selected: c.selected
|
|
1639
|
+
}, () => [
|
|
1640
|
+
M(Le, {
|
|
1641
|
+
size: "xs",
|
|
1642
|
+
"model-value": c.selected,
|
|
1643
|
+
"onUpdate:modelValue": (N) => Se(N, K)
|
|
1644
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
1645
|
+
], !0)
|
|
1646
|
+
]),
|
|
1647
|
+
_: 2
|
|
1648
|
+
/* DYNAMIC */
|
|
1649
|
+
},
|
|
1650
|
+
1024
|
|
1651
|
+
/* DYNAMIC_SLOTS */
|
|
1652
|
+
)) : i("v-if", !0),
|
|
1653
|
+
(s(!0), b(
|
|
1654
|
+
he,
|
|
1655
|
+
null,
|
|
1656
|
+
$e(Z.value, ({ key: N, align: e, classes: n }, r) => (s(), S(we, {
|
|
1657
|
+
key: r,
|
|
1658
|
+
align: e,
|
|
1659
|
+
class: B(n)
|
|
1660
|
+
}, {
|
|
1661
|
+
default: T(() => [
|
|
1662
|
+
i(`
|
|
1663
|
+
@slot cell - replace all row cells
|
|
1664
|
+
@binding {Object} row - row data
|
|
1665
|
+
@binding {Boolean} value - cell value
|
|
1666
|
+
`),
|
|
1667
|
+
N ? I(l.$slots, "cell", {
|
|
1668
|
+
key: 0,
|
|
1669
|
+
row: c,
|
|
1670
|
+
value: c[N]
|
|
1671
|
+
}, () => [
|
|
1672
|
+
i(`
|
|
1673
|
+
@slot cell-{key} - replace row cells of column
|
|
1674
|
+
@binding {Object} row - row data
|
|
1675
|
+
@binding {Boolean} value - cell value
|
|
1676
|
+
`),
|
|
1677
|
+
I(l.$slots, `cell-${N}`, {
|
|
1678
|
+
row: c,
|
|
1679
|
+
value: c[N]
|
|
1680
|
+
}, () => [
|
|
1681
|
+
re(
|
|
1682
|
+
J(c[N]),
|
|
1683
|
+
1
|
|
1684
|
+
/* TEXT */
|
|
1685
|
+
)
|
|
1686
|
+
], !0)
|
|
1687
|
+
], !0) : i("v-if", !0)
|
|
1688
|
+
]),
|
|
1689
|
+
_: 2
|
|
1690
|
+
/* DYNAMIC */
|
|
1691
|
+
}, 1032, ["align", "class"]))),
|
|
1692
|
+
128
|
|
1693
|
+
/* KEYED_FRAGMENT */
|
|
1694
|
+
)),
|
|
1695
|
+
l.$slots.actions ? (s(), S(
|
|
1696
|
+
we,
|
|
1697
|
+
{ key: 1 },
|
|
1698
|
+
{
|
|
1699
|
+
default: T(() => [
|
|
1700
|
+
i(`
|
|
1701
|
+
@slot actions - will add actions column
|
|
1702
|
+
@binding {Object} row - row data
|
|
1703
|
+
`),
|
|
1704
|
+
I(l.$slots, "actions", { row: c }, void 0, !0)
|
|
1705
|
+
]),
|
|
1706
|
+
_: 2
|
|
1707
|
+
/* DYNAMIC */
|
|
1708
|
+
},
|
|
1709
|
+
1024
|
|
1710
|
+
/* DYNAMIC_SLOTS */
|
|
1711
|
+
)) : i("v-if", !0)
|
|
1712
|
+
]),
|
|
1713
|
+
_: 2
|
|
1714
|
+
/* DYNAMIC */
|
|
1715
|
+
}, 1032, ["class", "onClick"]))),
|
|
1716
|
+
128
|
|
1717
|
+
/* KEYED_FRAGMENT */
|
|
1718
|
+
)) : (s(), S(Me, { key: 1 }, {
|
|
1719
|
+
default: T(() => [
|
|
1720
|
+
M(we, {
|
|
1721
|
+
colspan: Z.value.length + ($.value ? 1 : 0) + (l.$slots.actions ? 1 : 0)
|
|
1722
|
+
}, {
|
|
1723
|
+
default: T(() => [
|
|
1724
|
+
i(`
|
|
1725
|
+
@slot no-results - replace no results
|
|
1726
|
+
`),
|
|
1727
|
+
I(l.$slots, "no-results", {}, () => [
|
|
1728
|
+
C("p", ft, [
|
|
1729
|
+
i(`
|
|
1730
|
+
@slot no-results-text - replace no results test only
|
|
1731
|
+
`),
|
|
1732
|
+
I(l.$slots, "no-results-text", {}, () => [
|
|
1733
|
+
re(" No results ")
|
|
1734
|
+
], !0)
|
|
1735
|
+
])
|
|
1736
|
+
], !0)
|
|
1737
|
+
]),
|
|
1738
|
+
_: 3
|
|
1739
|
+
/* FORWARDED */
|
|
1740
|
+
}, 8, ["colspan"])
|
|
1741
|
+
]),
|
|
1742
|
+
_: 3
|
|
1743
|
+
/* FORWARDED */
|
|
1744
|
+
}))
|
|
1745
|
+
], !0)
|
|
1746
|
+
],
|
|
1747
|
+
2
|
|
1748
|
+
/* CLASS */
|
|
1749
|
+
)
|
|
1750
|
+
],
|
|
1751
|
+
6
|
|
1752
|
+
/* CLASS, STYLE */
|
|
1753
|
+
),
|
|
1754
|
+
oe.value ? (s(), b("div", mt, [
|
|
1755
|
+
vt,
|
|
1756
|
+
l.pagination ? (s(), b("div", bt, [
|
|
1757
|
+
C("div", ht, [
|
|
1758
|
+
yt,
|
|
1759
|
+
M(He, {
|
|
1760
|
+
modelValue: V.value,
|
|
1761
|
+
"onUpdate:modelValue": k[3] || (k[3] = (c) => V.value = c),
|
|
1762
|
+
options: R.value,
|
|
1763
|
+
size: v(m),
|
|
1764
|
+
color: l.color,
|
|
1765
|
+
"list-position": "top",
|
|
1766
|
+
style: { width: "5rem" }
|
|
1767
|
+
}, null, 8, ["modelValue", "options", "size", "color"])
|
|
1768
|
+
]),
|
|
1769
|
+
j.value ? (s(), b(
|
|
1770
|
+
"span",
|
|
1771
|
+
gt,
|
|
1772
|
+
J(_.value) + " - " + J(Y.value.length) + " of " + J(j.value),
|
|
1773
|
+
1
|
|
1774
|
+
/* TEXT */
|
|
1775
|
+
)) : i("v-if", !0),
|
|
1776
|
+
C("div", zt, [
|
|
1777
|
+
M(be, {
|
|
1778
|
+
disabled: _.value === 1,
|
|
1779
|
+
size: v(m),
|
|
1780
|
+
color: "transparent",
|
|
1781
|
+
fab: "",
|
|
1782
|
+
"no-elevation": "",
|
|
1783
|
+
onClick: W
|
|
1784
|
+
}, {
|
|
1785
|
+
default: T(() => [
|
|
1786
|
+
M(v(Ee), { class: "maz-text-base" })
|
|
1787
|
+
]),
|
|
1788
|
+
_: 1
|
|
1789
|
+
/* STABLE */
|
|
1790
|
+
}, 8, ["disabled", "size"]),
|
|
1791
|
+
M(be, {
|
|
1792
|
+
disabled: _.value === 1,
|
|
1793
|
+
size: v(m),
|
|
1794
|
+
color: "transparent",
|
|
1795
|
+
fab: "",
|
|
1796
|
+
"no-elevation": "",
|
|
1797
|
+
onClick: x
|
|
1798
|
+
}, {
|
|
1799
|
+
default: T(() => [
|
|
1800
|
+
M(v(je), { class: "maz-text-base" })
|
|
1801
|
+
]),
|
|
1802
|
+
_: 1
|
|
1803
|
+
/* STABLE */
|
|
1804
|
+
}, 8, ["disabled", "size"]),
|
|
1805
|
+
M(be, {
|
|
1806
|
+
disabled: _.value === j.value,
|
|
1807
|
+
size: v(m),
|
|
1808
|
+
color: "transparent",
|
|
1809
|
+
fab: "",
|
|
1810
|
+
"no-elevation": "",
|
|
1811
|
+
onClick: ne
|
|
1812
|
+
}, {
|
|
1813
|
+
default: T(() => [
|
|
1814
|
+
M(v(je), { class: "maz-rotate-180 maz-text-base" })
|
|
1815
|
+
]),
|
|
1816
|
+
_: 1
|
|
1817
|
+
/* STABLE */
|
|
1818
|
+
}, 8, ["disabled", "size"]),
|
|
1819
|
+
M(be, {
|
|
1820
|
+
disabled: _.value === j.value,
|
|
1821
|
+
size: v(m),
|
|
1822
|
+
color: "transparent",
|
|
1823
|
+
fab: "",
|
|
1824
|
+
"no-elevation": "",
|
|
1825
|
+
onClick: h
|
|
1826
|
+
}, {
|
|
1827
|
+
default: T(() => [
|
|
1828
|
+
M(v(Ee), { class: "maz-rotate-180 maz-text-base" })
|
|
1829
|
+
]),
|
|
1830
|
+
_: 1
|
|
1831
|
+
/* STABLE */
|
|
1832
|
+
}, 8, ["disabled", "size"])
|
|
1833
|
+
])
|
|
1834
|
+
])) : i("v-if", !0)
|
|
1835
|
+
])) : i("v-if", !0)
|
|
1836
|
+
],
|
|
1837
|
+
2
|
|
1838
|
+
/* CLASS */
|
|
1839
|
+
));
|
|
1840
|
+
}
|
|
1841
|
+
}), $t = /* @__PURE__ */ le(kt, [["__scopeId", "data-v-04b924e2"]]);
|
|
1842
|
+
export {
|
|
1843
|
+
$t as M,
|
|
1844
|
+
le as _,
|
|
1845
|
+
De as i
|
|
1846
|
+
};
|