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