maz-ui 3.31.0 → 3.31.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/components/MazAccordion.d.ts +2 -2
- package/components/MazAccordion.mjs +1 -1
- package/components/MazDropdown.d.ts +2 -2
- package/components/MazDropdown.mjs +16 -16
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazSelect.d.ts +2 -2
- package/components/MazSelect.mjs +1 -1
- package/components/MazTable.d.ts +8 -0
- package/components/MazTable.mjs +1 -1
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/chunks/{MazAccordion-wRHTLK7X.mjs → MazAccordion-3KSb_aBw.mjs} +37 -37
- package/components/chunks/{MazBtn-bL_VYiL1.mjs → MazBtn-M7Pnxit5.mjs} +2 -2
- package/components/chunks/{MazBtn-A_B9pbiE.mjs → MazBtn-WsXG0JB8.mjs} +2 -2
- package/components/chunks/{MazCheckbox-eI5DclIt.mjs → MazCheckbox-4gr5TnSK.mjs} +1 -1
- package/components/chunks/{MazCheckbox-GE-RvDQj.mjs → MazCheckbox-EadIf3L9.mjs} +1 -1
- package/components/chunks/{MazIcon-icjrWrvA.mjs → MazIcon-002AxbwZ.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-BiFGrTa7.mjs → MazPhoneNumberInput-TdklZIjq.mjs} +155 -159
- package/components/chunks/{MazSelect-nwyPkcJ-.mjs → MazSelect-ABbMoI-M.mjs} +173 -177
- package/components/chunks/{MazSpinner-Q96BIyG0.mjs → MazSpinner-1Sy8XBOO.mjs} +1 -1
- package/components/chunks/{MazSpinner-OKizZUdU.mjs → MazSpinner-B2tSR6e8.mjs} +1 -1
- package/components/chunks/{MazSpinner-LpsGR4tG.mjs → MazSpinner-eGQPU8Yp.mjs} +1 -1
- package/components/chunks/{MazSpinner-kv0RbQpi.mjs → MazSpinner-liomP-Gb.mjs} +1 -1
- package/components/chunks/{MazTable-rnu9lv5r.mjs → MazTable-4_j2qksi.mjs} +611 -610
- package/nuxt/index.json +1 -1
- package/nuxt/index.mjs +2 -2
- package/nuxt/types.d.mts +2 -2
- package/package.json +4 -4
- package/resolvers/unplugin-vue-components-resolver.d.ts +1 -1
- package/types/components/MazAccordion.vue.d.ts +2 -2
- package/types/components/MazDropdown.vue.d.ts +2 -2
- package/types/components/MazSelect.vue.d.ts +2 -2
- package/types/components/MazTable.vue.d.ts +8 -0
- package/types/resolvers/unplugin-vue-components-resolver.d.ts +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../assets/MazTable.css";
|
|
2
|
-
import { openBlock as s, createElementBlock as b, createElementVNode as
|
|
2
|
+
import { openBlock as s, createElementBlock as b, createElementVNode as I, computed as u, defineComponent as X, defineAsyncComponent as U, ref as M, getCurrentInstance as Ke, onMounted as We, useSlots as Me, normalizeClass as V, normalizeStyle as ne, createCommentVNode as r, renderSlot as $, createBlock as k, unref as f, resolveDynamicComponent as de, withDirectives as Ye, mergeProps as Le, toHandlers as Ze, vModelDynamic as Ge, createTextVNode as ue, toDisplayString as J, withModifiers as me, withCtx as P, createVNode as _, inject as Je, useCssVars as we, onBeforeMount as Te, Transition as Xe, Fragment as ze, renderList as ke, nextTick as Ie, useAttrs as xe, pushScopeId as Ee, popScopeId as Fe, toRefs as et, provide as tt, watch as ye } from "vue";
|
|
3
3
|
const lt = {
|
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5
5
|
width: "1em",
|
|
6
6
|
height: "1em",
|
|
7
7
|
fill: "none",
|
|
8
8
|
viewBox: "0 0 24 24"
|
|
9
|
-
}, ot = /* @__PURE__ */
|
|
9
|
+
}, ot = /* @__PURE__ */ I(
|
|
10
10
|
"path",
|
|
11
11
|
{
|
|
12
12
|
stroke: "currentColor",
|
|
@@ -21,20 +21,20 @@ const lt = {
|
|
|
21
21
|
), at = [
|
|
22
22
|
ot
|
|
23
23
|
];
|
|
24
|
-
function
|
|
24
|
+
function He(c, h) {
|
|
25
25
|
return s(), b("svg", lt, [...at]);
|
|
26
26
|
}
|
|
27
|
-
const
|
|
27
|
+
const qe = { render: He }, nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
28
28
|
__proto__: null,
|
|
29
|
-
default:
|
|
30
|
-
render:
|
|
29
|
+
default: qe,
|
|
30
|
+
render: He
|
|
31
31
|
}, Symbol.toStringTag, { value: "Module" })), st = {
|
|
32
32
|
xmlns: "http://www.w3.org/2000/svg",
|
|
33
33
|
width: "1em",
|
|
34
34
|
height: "1em",
|
|
35
35
|
fill: "none",
|
|
36
36
|
viewBox: "0 0 24 24"
|
|
37
|
-
}, rt = /* @__PURE__ */
|
|
37
|
+
}, rt = /* @__PURE__ */ I(
|
|
38
38
|
"path",
|
|
39
39
|
{
|
|
40
40
|
stroke: "currentColor",
|
|
@@ -58,7 +58,7 @@ const dt = { render: ut }, ct = {
|
|
|
58
58
|
height: "1em",
|
|
59
59
|
fill: "none",
|
|
60
60
|
viewBox: "0 0 24 24"
|
|
61
|
-
}, pt = /* @__PURE__ */
|
|
61
|
+
}, pt = /* @__PURE__ */ I(
|
|
62
62
|
"path",
|
|
63
63
|
{
|
|
64
64
|
stroke: "currentColor",
|
|
@@ -73,16 +73,16 @@ const dt = { render: ut }, ct = {
|
|
|
73
73
|
), mt = [
|
|
74
74
|
pt
|
|
75
75
|
];
|
|
76
|
-
function
|
|
76
|
+
function ft(c, h) {
|
|
77
77
|
return s(), b("svg", ct, [...mt]);
|
|
78
78
|
}
|
|
79
|
-
const Ne = { render:
|
|
79
|
+
const Ne = { render: ft }, vt = {
|
|
80
80
|
xmlns: "http://www.w3.org/2000/svg",
|
|
81
81
|
width: "1em",
|
|
82
82
|
height: "1em",
|
|
83
83
|
fill: "none",
|
|
84
84
|
viewBox: "0 0 24 24"
|
|
85
|
-
}, bt = /* @__PURE__ */
|
|
85
|
+
}, bt = /* @__PURE__ */ I(
|
|
86
86
|
"path",
|
|
87
87
|
{
|
|
88
88
|
stroke: "currentColor",
|
|
@@ -98,7 +98,7 @@ const Ne = { render: vt }, ft = {
|
|
|
98
98
|
bt
|
|
99
99
|
];
|
|
100
100
|
function yt(c, h) {
|
|
101
|
-
return s(), b("svg",
|
|
101
|
+
return s(), b("svg", vt, [...ht]);
|
|
102
102
|
}
|
|
103
103
|
const je = { render: yt };
|
|
104
104
|
function gt(c, h) {
|
|
@@ -109,7 +109,7 @@ function gt(c, h) {
|
|
|
109
109
|
}, h);
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
const
|
|
112
|
+
const Pe = ({
|
|
113
113
|
componentName: c,
|
|
114
114
|
instance: h,
|
|
115
115
|
providedId: n
|
|
@@ -155,178 +155,178 @@ const Te = ({
|
|
|
155
155
|
},
|
|
156
156
|
emits: ["focus", "blur", "update:model-value", "click", "change"],
|
|
157
157
|
setup(c, { emit: h }) {
|
|
158
|
-
const n =
|
|
158
|
+
const n = U(() => Promise.resolve().then(() => Mt)), p = U(() => import("./MazIcon-002AxbwZ.mjs")), L = U(() => import("./eye-slash-rdPLIzFI.mjs")), S = U(() => import("./eye-3jm1b22X.mjs")), w = U(() => Promise.resolve().then(() => Rt)), l = c, O = h, A = M(!1), z = M(!1), D = M(), B = Ke(), R = Pe({
|
|
159
159
|
componentName: "MazInput",
|
|
160
|
-
instance:
|
|
161
|
-
providedId:
|
|
160
|
+
instance: B,
|
|
161
|
+
providedId: l.id
|
|
162
162
|
});
|
|
163
163
|
We(() => {
|
|
164
|
-
var
|
|
165
|
-
|
|
164
|
+
var a;
|
|
165
|
+
l.autoFocus && ((a = D.value) == null || a.focus());
|
|
166
166
|
});
|
|
167
|
-
const
|
|
168
|
-
if (!
|
|
169
|
-
if (
|
|
167
|
+
const F = u(() => l.type === "password"), y = u(() => A.value ? "text" : l.type), T = u(() => {
|
|
168
|
+
if (!l.noBorder) {
|
|
169
|
+
if (l.error)
|
|
170
170
|
return "maz-border-danger";
|
|
171
|
-
if (
|
|
171
|
+
if (l.success)
|
|
172
172
|
return "maz-border-success";
|
|
173
|
-
if (
|
|
173
|
+
if (l.warning)
|
|
174
174
|
return "maz-border-warning";
|
|
175
|
-
if (z.value ||
|
|
176
|
-
if (
|
|
175
|
+
if (z.value || l.borderActive) {
|
|
176
|
+
if (l.color === "black")
|
|
177
177
|
return "maz-border-black";
|
|
178
|
-
if (
|
|
178
|
+
if (l.color === "danger")
|
|
179
179
|
return "maz-border-danger";
|
|
180
|
-
if (
|
|
180
|
+
if (l.color === "info")
|
|
181
181
|
return "maz-border-info";
|
|
182
|
-
if (
|
|
182
|
+
if (l.color === "primary")
|
|
183
183
|
return "maz-border-primary";
|
|
184
|
-
if (
|
|
184
|
+
if (l.color === "secondary")
|
|
185
185
|
return "maz-border-secondary";
|
|
186
|
-
if (
|
|
186
|
+
if (l.color === "success")
|
|
187
187
|
return "maz-border-success";
|
|
188
|
-
if (
|
|
188
|
+
if (l.color === "warning")
|
|
189
189
|
return "maz-border-warning";
|
|
190
|
-
if (
|
|
190
|
+
if (l.color === "white")
|
|
191
191
|
return "maz-border-white";
|
|
192
192
|
}
|
|
193
193
|
return "--default-border";
|
|
194
194
|
}
|
|
195
|
-
}),
|
|
196
|
-
const { required:
|
|
197
|
-
if (
|
|
198
|
-
return
|
|
199
|
-
}), le = u(() =>
|
|
200
|
-
get: () =>
|
|
201
|
-
set: (
|
|
202
|
-
}), ae = u(() => (!!
|
|
203
|
-
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
},
|
|
209
|
-
if (
|
|
210
|
-
return
|
|
211
|
-
|
|
195
|
+
}), N = Me(), m = u(() => {
|
|
196
|
+
const { required: a, placeholder: E } = l;
|
|
197
|
+
if (E)
|
|
198
|
+
return a ? `${E} *` : E;
|
|
199
|
+
}), le = u(() => l.modelValue !== void 0 && l.modelValue !== ""), oe = u({
|
|
200
|
+
get: () => l.modelValue,
|
|
201
|
+
set: (a) => se(a)
|
|
202
|
+
}), ae = u(() => (!!l.label || !!l.hint) && (z.value || !!le.value || !!l.placeholder || ["date", "month", "week"].includes(l.type))), Q = u(() => !!l.label || !!l.hint), W = () => !!N["right-icon"] || F.value || !!N["valid-button"] || l.validButton || !!l.rightIcon, Y = () => !!N["left-icon"] || !!l.leftIcon, ee = (a) => {
|
|
203
|
+
O("focus", a), z.value = !0;
|
|
204
|
+
}, ce = (a) => {
|
|
205
|
+
O("blur", a), z.value = !1;
|
|
206
|
+
}, Z = (a) => O("change", a), j = gt((a) => {
|
|
207
|
+
O("update:model-value", a);
|
|
208
|
+
}, l.debounceDelay), se = (a) => {
|
|
209
|
+
if (l.debounce)
|
|
210
|
+
return j(a);
|
|
211
|
+
O("update:model-value", a);
|
|
212
212
|
};
|
|
213
|
-
return (
|
|
213
|
+
return (a, E) => (s(), b(
|
|
214
214
|
"div",
|
|
215
215
|
{
|
|
216
|
-
class:
|
|
216
|
+
class: V(["m-input", [
|
|
217
217
|
{
|
|
218
|
-
"--is-focused": z.value ||
|
|
218
|
+
"--is-focused": z.value || a.borderActive,
|
|
219
219
|
"--should-up": ae.value,
|
|
220
|
-
"--has-label":
|
|
221
|
-
"--is-disabled":
|
|
222
|
-
"--is-readonly":
|
|
223
|
-
"--has-z-2":
|
|
224
|
-
"--has-state":
|
|
220
|
+
"--has-label": Q.value,
|
|
221
|
+
"--is-disabled": a.disabled,
|
|
222
|
+
"--is-readonly": a.readonly,
|
|
223
|
+
"--has-z-2": a.error || a.warning || a.success,
|
|
224
|
+
"--has-state": a.error || a.warning || a.success
|
|
225
225
|
},
|
|
226
|
-
|
|
227
|
-
`--${
|
|
228
|
-
`--${
|
|
226
|
+
l.class,
|
|
227
|
+
`--${a.color}`,
|
|
228
|
+
`--${a.size}`
|
|
229
229
|
]]),
|
|
230
|
-
style:
|
|
230
|
+
style: ne(a.style)
|
|
231
231
|
},
|
|
232
232
|
[
|
|
233
|
-
|
|
233
|
+
I(
|
|
234
234
|
"div",
|
|
235
235
|
{
|
|
236
|
-
class:
|
|
236
|
+
class: V(["m-input-wrapper", [a.inputClasses, T.value, { "maz-rounded": !a.noRadius }]])
|
|
237
237
|
},
|
|
238
238
|
[
|
|
239
|
-
|
|
239
|
+
Y() ? (s(), b("div", zt, [
|
|
240
240
|
r(`
|
|
241
241
|
@slot left-icon - The icon to display on the left of the input
|
|
242
242
|
`),
|
|
243
|
-
|
|
244
|
-
typeof
|
|
243
|
+
a.$slots["left-icon"] || a.leftIcon ? $(a.$slots, "left-icon", { key: 0 }, () => [
|
|
244
|
+
typeof a.leftIcon == "string" ? (s(), k(f(p), {
|
|
245
245
|
key: 0,
|
|
246
|
-
name:
|
|
246
|
+
name: a.leftIcon,
|
|
247
247
|
class: "maz-text-xl maz-text-muted"
|
|
248
|
-
}, null, 8, ["name"])) :
|
|
248
|
+
}, null, 8, ["name"])) : a.leftIcon ? (s(), k(de(a.leftIcon), {
|
|
249
249
|
key: 1,
|
|
250
250
|
class: "maz-text-xl maz-text-muted"
|
|
251
251
|
})) : r("v-if", !0)
|
|
252
252
|
], !0) : r("v-if", !0)
|
|
253
253
|
])) : r("v-if", !0),
|
|
254
|
-
|
|
255
|
-
Ye(
|
|
256
|
-
id:
|
|
254
|
+
I("div", kt, [
|
|
255
|
+
Ye(I("input", Le({
|
|
256
|
+
id: f(R),
|
|
257
257
|
ref_key: "input",
|
|
258
|
-
ref:
|
|
259
|
-
"onUpdate:modelValue":
|
|
258
|
+
ref: D,
|
|
259
|
+
"onUpdate:modelValue": E[0] || (E[0] = (C) => oe.value = C),
|
|
260
260
|
type: y.value,
|
|
261
|
-
name:
|
|
262
|
-
},
|
|
263
|
-
inputmode:
|
|
261
|
+
name: a.name
|
|
262
|
+
}, a.$attrs, {
|
|
263
|
+
inputmode: a.inputmode,
|
|
264
264
|
placeholder: m.value,
|
|
265
|
-
"aria-label":
|
|
266
|
-
disabled:
|
|
267
|
-
readonly:
|
|
268
|
-
required:
|
|
265
|
+
"aria-label": a.label || a.placeholder,
|
|
266
|
+
disabled: a.disabled,
|
|
267
|
+
readonly: a.readonly,
|
|
268
|
+
required: a.required,
|
|
269
269
|
class: "m-input-input"
|
|
270
270
|
}, Ze({
|
|
271
|
-
blur:
|
|
271
|
+
blur: ce,
|
|
272
272
|
focus: ee,
|
|
273
|
-
change:
|
|
273
|
+
change: Z
|
|
274
274
|
}, !0), {
|
|
275
|
-
onClick:
|
|
275
|
+
onClick: E[1] || (E[1] = (C) => a.$emit("click", C))
|
|
276
276
|
}), null, 16, wt), [
|
|
277
277
|
[Ge, oe.value]
|
|
278
278
|
]),
|
|
279
|
-
|
|
279
|
+
a.label || a.hint ? (s(), b(
|
|
280
280
|
"span",
|
|
281
281
|
{
|
|
282
282
|
key: 0,
|
|
283
283
|
ref: "label",
|
|
284
|
-
class:
|
|
284
|
+
class: V(["m-input-label", [
|
|
285
285
|
{
|
|
286
|
-
"maz-text-danger-600":
|
|
287
|
-
"maz-text-success-600":
|
|
288
|
-
"maz-text-warning-600":
|
|
286
|
+
"maz-text-danger-600": a.error,
|
|
287
|
+
"maz-text-success-600": a.success,
|
|
288
|
+
"maz-text-warning-600": a.warning
|
|
289
289
|
}
|
|
290
290
|
]])
|
|
291
291
|
},
|
|
292
292
|
[
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
ue(
|
|
294
|
+
J(a.hint || a.label) + " ",
|
|
295
295
|
1
|
|
296
296
|
/* TEXT */
|
|
297
297
|
),
|
|
298
|
-
|
|
298
|
+
a.required ? (s(), b("sup", $t, "*")) : r("v-if", !0)
|
|
299
299
|
],
|
|
300
300
|
2
|
|
301
301
|
/* CLASS */
|
|
302
302
|
)) : r("v-if", !0)
|
|
303
303
|
]),
|
|
304
|
-
|
|
304
|
+
W() ? (s(), b("div", Vt, [
|
|
305
305
|
r(`
|
|
306
306
|
@slot right-icon - The icon to display on the right of the input
|
|
307
307
|
`),
|
|
308
|
-
|
|
309
|
-
typeof
|
|
308
|
+
a.$slots["right-icon"] || a.rightIcon ? $(a.$slots, "right-icon", { key: 0 }, () => [
|
|
309
|
+
typeof a.rightIcon == "string" ? (s(), k(f(p), {
|
|
310
310
|
key: 0,
|
|
311
|
-
name:
|
|
311
|
+
name: a.rightIcon,
|
|
312
312
|
class: "maz-text-xl maz-text-muted"
|
|
313
|
-
}, null, 8, ["name"])) :
|
|
313
|
+
}, null, 8, ["name"])) : a.rightIcon ? (s(), k(de(a.rightIcon), {
|
|
314
314
|
key: 1,
|
|
315
315
|
class: "maz-text-xl maz-text-muted"
|
|
316
316
|
})) : r("v-if", !0)
|
|
317
317
|
], !0) : r("v-if", !0),
|
|
318
|
-
|
|
318
|
+
F.value ? (s(), k(f(n), {
|
|
319
319
|
key: 1,
|
|
320
320
|
color: "transparent",
|
|
321
321
|
tabindex: "-1",
|
|
322
322
|
size: "mini",
|
|
323
|
-
onClick:
|
|
323
|
+
onClick: E[2] || (E[2] = me((C) => A.value = !A.value, ["stop"]))
|
|
324
324
|
}, {
|
|
325
|
-
default:
|
|
326
|
-
|
|
325
|
+
default: P(() => [
|
|
326
|
+
A.value ? (s(), k(f(L), {
|
|
327
327
|
key: 0,
|
|
328
328
|
class: "maz-text-xl maz-text-muted"
|
|
329
|
-
})) : (s(),
|
|
329
|
+
})) : (s(), k(f(S), {
|
|
330
330
|
key: 1,
|
|
331
331
|
class: "maz-text-xl maz-text-muted"
|
|
332
332
|
}))
|
|
@@ -337,18 +337,18 @@ const Te = ({
|
|
|
337
337
|
r(`
|
|
338
338
|
@slot valid-button - Replace the valid button by your own
|
|
339
339
|
`),
|
|
340
|
-
|
|
341
|
-
|
|
340
|
+
a.$slots["valid-button"] || a.validButton ? $(a.$slots, "valid-button", { key: 2 }, () => [
|
|
341
|
+
_(f(n), {
|
|
342
342
|
color: "transparent",
|
|
343
|
-
disabled:
|
|
343
|
+
disabled: a.disabled,
|
|
344
344
|
tabindex: "-1",
|
|
345
|
-
loading:
|
|
345
|
+
loading: a.validButtonLoading,
|
|
346
346
|
class: "m-input-valid-button",
|
|
347
347
|
size: "mini",
|
|
348
348
|
type: "submit"
|
|
349
349
|
}, {
|
|
350
|
-
default:
|
|
351
|
-
|
|
350
|
+
default: P(() => [
|
|
351
|
+
_(f(w), { class: "maz-text-2xl maz-text-normal" })
|
|
352
352
|
]),
|
|
353
353
|
_: 1
|
|
354
354
|
/* STABLE */
|
|
@@ -370,9 +370,9 @@ const Te = ({
|
|
|
370
370
|
n[p] = L;
|
|
371
371
|
return n;
|
|
372
372
|
}, _e = /* @__PURE__ */ x(It, [["__scopeId", "data-v-e9e7fe2d"]]);
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
function
|
|
373
|
+
M("system");
|
|
374
|
+
M("system");
|
|
375
|
+
function Oe(c, h) {
|
|
376
376
|
const n = Je(c, h);
|
|
377
377
|
if (!n)
|
|
378
378
|
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${c}`);
|
|
@@ -382,15 +382,11 @@ let Se = null;
|
|
|
382
382
|
function St(c, h) {
|
|
383
383
|
Se && clearTimeout(Se), Se = setTimeout(c, h);
|
|
384
384
|
}
|
|
385
|
-
const Bt = {
|
|
386
|
-
key: 0,
|
|
387
|
-
tabindex: "-1",
|
|
388
|
-
class: "m-select-list__search-wrapper"
|
|
389
|
-
}, Ct = { class: "m-select-list__no-results" }, _t = {
|
|
385
|
+
const Bt = { class: "m-select-list__no-results" }, Ct = {
|
|
390
386
|
key: 2,
|
|
391
387
|
class: "m-select-list__scroll-wrapper",
|
|
392
388
|
tabindex: "-1"
|
|
393
|
-
},
|
|
389
|
+
}, _t = ["onClick"], At = /* @__PURE__ */ X({
|
|
394
390
|
inheritAttrs: !1,
|
|
395
391
|
__name: "MazSelect",
|
|
396
392
|
props: {
|
|
@@ -403,7 +399,7 @@ const Bt = {
|
|
|
403
399
|
optionLabelKey: { default: "label" },
|
|
404
400
|
optionInputValueKey: { default: "label" },
|
|
405
401
|
listPosition: { default: "bottom left" },
|
|
406
|
-
itemHeight: { default:
|
|
402
|
+
itemHeight: { default: void 0 },
|
|
407
403
|
maxListHeight: { default: 240 },
|
|
408
404
|
maxListWidth: { default: void 0 },
|
|
409
405
|
size: { default: "md" },
|
|
@@ -417,269 +413,269 @@ const Bt = {
|
|
|
417
413
|
},
|
|
418
414
|
emits: ["close", "open", "blur", "focus", "change", "update:model-value", "selected-option"],
|
|
419
415
|
setup(c, { emit: h }) {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
"
|
|
416
|
+
we((e) => ({
|
|
417
|
+
"5e7d1dfe": F.value,
|
|
418
|
+
b3b9ed86: B.value,
|
|
419
|
+
"55cb06e5": R.value
|
|
424
420
|
}));
|
|
425
|
-
const n =
|
|
426
|
-
() => ["black", "transparent", "white"].includes(
|
|
427
|
-
),
|
|
428
|
-
() =>
|
|
429
|
-
),
|
|
430
|
-
() =>
|
|
431
|
-
),
|
|
432
|
-
() =>
|
|
433
|
-
), y = u(() =>
|
|
421
|
+
const n = U(() => Promise.resolve().then(() => Zt)), p = U(() => Promise.resolve().then(() => nt)), L = U(() => import("./chevron-down-bC0s_0yH.mjs")), S = U(() => import("./no-symbol-JnXtUaU-.mjs")), w = Ke(), l = c, O = h, A = M(!1), z = M(), D = u(
|
|
422
|
+
() => ["black", "transparent", "white"].includes(l.color)
|
|
423
|
+
), B = u(
|
|
424
|
+
() => D.value ? "var(--maz-color-black)" : `var(--maz-color-${l.color}-800)`
|
|
425
|
+
), R = u(
|
|
426
|
+
() => D.value ? "var(--maz-color-muted)" : `var(--maz-color-${l.color}-100)`
|
|
427
|
+
), F = u(
|
|
428
|
+
() => D.value ? "var(--maz-color-muted)" : `var(--maz-color-${l.color}-200)`
|
|
429
|
+
), y = u(() => A.value || l.open), T = Pe({
|
|
434
430
|
componentName: "MazSelect",
|
|
435
|
-
instance:
|
|
436
|
-
providedId:
|
|
437
|
-
}),
|
|
431
|
+
instance: w,
|
|
432
|
+
providedId: l.id
|
|
433
|
+
}), N = u(
|
|
438
434
|
() => {
|
|
439
435
|
var e;
|
|
440
|
-
return (e =
|
|
441
|
-
[
|
|
442
|
-
[
|
|
443
|
-
[
|
|
436
|
+
return (e = l.options) == null ? void 0 : e.map((o) => typeof o == "string" || typeof o == "number" || typeof o == "boolean" ? {
|
|
437
|
+
[l.optionValueKey]: o,
|
|
438
|
+
[l.optionLabelKey]: o,
|
|
439
|
+
[l.optionInputValueKey]: o
|
|
444
440
|
} : {
|
|
445
|
-
|
|
446
|
-
[
|
|
447
|
-
[
|
|
441
|
+
...o,
|
|
442
|
+
[l.optionValueKey]: o[l.optionValueKey],
|
|
443
|
+
[l.optionLabelKey]: o[l.optionLabelKey],
|
|
444
|
+
[l.optionInputValueKey]: o[l.optionInputValueKey]
|
|
448
445
|
});
|
|
449
446
|
}
|
|
450
447
|
), m = u(
|
|
451
448
|
() => {
|
|
452
449
|
var e;
|
|
453
|
-
return ((e =
|
|
450
|
+
return ((e = N.value) == null ? void 0 : e.filter((o) => l.multiple ? Array.isArray(l.modelValue) ? l.modelValue.includes(o[l.optionValueKey]) && !W(o[l.optionValueKey]) : !1 : l.modelValue === o[l.optionValueKey] && !W(o[l.optionValueKey]))) ?? [];
|
|
454
451
|
}
|
|
455
452
|
);
|
|
456
|
-
|
|
453
|
+
Te(() => {
|
|
457
454
|
var e;
|
|
458
|
-
(e =
|
|
455
|
+
(e = l.options) != null && e.length || console.warn("[maz-ui](MazSelect) you must provide options"), g();
|
|
459
456
|
});
|
|
460
|
-
const le =
|
|
461
|
-
function
|
|
457
|
+
const le = M(), oe = M(), ae = M(), Q = M(), W = (e) => e == null;
|
|
458
|
+
function Y(e) {
|
|
462
459
|
var d;
|
|
463
460
|
return (((d = m.value) == null ? void 0 : d.some(
|
|
464
|
-
(
|
|
465
|
-
)) ?? !1) && !
|
|
461
|
+
(v) => v[l.optionValueKey] === e[l.optionValueKey]
|
|
462
|
+
)) ?? !1) && !W(e[l.optionValueKey]);
|
|
466
463
|
}
|
|
467
464
|
const ee = u(() => {
|
|
468
|
-
var e,
|
|
469
|
-
return
|
|
465
|
+
var e, o;
|
|
466
|
+
return l.multiple && l.modelValue && Array.isArray(l.modelValue) ? l.modelValue.map(
|
|
470
467
|
(d) => {
|
|
471
|
-
var
|
|
472
|
-
return (
|
|
468
|
+
var v, K;
|
|
469
|
+
return (K = (v = N.value) == null ? void 0 : v.find((q) => q[l.optionValueKey] === d)) == null ? void 0 : K[l.optionInputValueKey];
|
|
473
470
|
}
|
|
474
|
-
).join(", ") : (
|
|
475
|
-
(d) => d[
|
|
476
|
-
)) == null ? void 0 :
|
|
477
|
-
}),
|
|
478
|
-
() =>
|
|
479
|
-
),
|
|
480
|
-
function
|
|
471
|
+
).join(", ") : (o = (e = N.value) == null ? void 0 : e.find(
|
|
472
|
+
(d) => d[l.optionValueKey] === l.modelValue
|
|
473
|
+
)) == null ? void 0 : o[l.optionInputValueKey];
|
|
474
|
+
}), ce = u(
|
|
475
|
+
() => l.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
476
|
+
), Z = M(""), j = M("");
|
|
477
|
+
function se(e) {
|
|
481
478
|
return e.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").replaceAll(/[^\dA-Za-z\u0400-\u04FF]/g, "");
|
|
482
479
|
}
|
|
483
|
-
const
|
|
484
|
-
|
|
480
|
+
const a = (e, o) => o && e && se(e.toString().toLocaleLowerCase().trim()).includes(
|
|
481
|
+
se(o.toLocaleLowerCase().trim())
|
|
485
482
|
);
|
|
486
|
-
function
|
|
487
|
-
var
|
|
488
|
-
return e ? (
|
|
489
|
-
const
|
|
490
|
-
return
|
|
491
|
-
}) :
|
|
483
|
+
function E(e) {
|
|
484
|
+
var o;
|
|
485
|
+
return e ? (o = N.value) == null ? void 0 : o.filter((d) => {
|
|
486
|
+
const v = d[l.optionLabelKey], K = d[l.optionValueKey], q = d[l.optionInputValueKey];
|
|
487
|
+
return a(v, e) || a(K, e) || a(q, e);
|
|
488
|
+
}) : N.value;
|
|
492
489
|
}
|
|
493
|
-
const
|
|
494
|
-
var
|
|
495
|
-
if (e && ("relatedTarget" in e && ((
|
|
490
|
+
const C = u(() => E(Z.value)), re = async (e) => {
|
|
491
|
+
var o;
|
|
492
|
+
if (e && ("relatedTarget" in e && ((o = le.value) != null && o.contains(e.relatedTarget)) || e.type === "keydown"))
|
|
496
493
|
return e.preventDefault();
|
|
497
|
-
await Ie(),
|
|
498
|
-
},
|
|
499
|
-
|
|
494
|
+
await Ie(), A.value = !1, z.value = 0, O("close", e);
|
|
495
|
+
}, te = async (e) => {
|
|
496
|
+
l.disabled || y.value || (e == null || e.preventDefault(), A.value = !0, await t(), O("focus", e), O("open", A.value));
|
|
500
497
|
};
|
|
501
|
-
function
|
|
502
|
-
var e,
|
|
503
|
-
(
|
|
504
|
-
}
|
|
505
|
-
function we(e) {
|
|
506
|
-
_.value ? se(e) : q();
|
|
498
|
+
function G() {
|
|
499
|
+
var e, o;
|
|
500
|
+
(o = ((e = oe.value) == null ? void 0 : e.$el).querySelector("input")) == null || o.focus();
|
|
507
501
|
}
|
|
508
|
-
function
|
|
509
|
-
|
|
510
|
-
J.value = e, (d = ((a = ae.value) == null ? void 0 : a.$el).querySelector("input")) == null || d.focus();
|
|
502
|
+
function H(e) {
|
|
503
|
+
A.value ? re(e) : G();
|
|
511
504
|
}
|
|
512
505
|
function $e(e) {
|
|
506
|
+
var o, d;
|
|
507
|
+
Z.value = e, (d = ((o = ae.value) == null ? void 0 : o.$el).querySelector("input")) == null || d.focus();
|
|
508
|
+
}
|
|
509
|
+
function ve(e) {
|
|
513
510
|
var d;
|
|
514
|
-
e === "Backspace" &&
|
|
515
|
-
const
|
|
516
|
-
|
|
517
|
-
(
|
|
518
|
-
), typeof z.value == "number" && z.value >= 0 &&
|
|
519
|
-
|
|
511
|
+
e === "Backspace" && j.value.length > 0 ? j.value = j.value.slice(0, -1) : j.value += e;
|
|
512
|
+
const o = E(j.value);
|
|
513
|
+
o != null && o.length && (z.value = (d = C.value) == null ? void 0 : d.findIndex(
|
|
514
|
+
(v) => v[l.optionValueKey] === o[0][l.optionValueKey]
|
|
515
|
+
), typeof z.value == "number" && z.value >= 0 && t(z.value)), St(() => {
|
|
516
|
+
j.value = "";
|
|
520
517
|
}, 1e3);
|
|
521
518
|
}
|
|
522
519
|
const Ve = (e) => {
|
|
523
|
-
const
|
|
524
|
-
/^[\dA-Za-z\u0400-\u04FF]$/.test(
|
|
525
|
-
},
|
|
526
|
-
const
|
|
527
|
-
d ?
|
|
528
|
-
},
|
|
529
|
-
var
|
|
520
|
+
const o = e.key;
|
|
521
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(o) ? (e.preventDefault(), te(e), l.search ? $e(o) : ve(o)) : be(e);
|
|
522
|
+
}, be = (e) => {
|
|
523
|
+
const o = e.code, d = ["ArrowUp", "ArrowDown"].includes(o), v = ["Enter", "Space"].includes(o), K = o === "Escape" && y.value;
|
|
524
|
+
d ? pe(e, z.value) : v ? he(e, z.value) : K && re();
|
|
525
|
+
}, pe = (e, o) => {
|
|
526
|
+
var K;
|
|
530
527
|
e.preventDefault();
|
|
531
528
|
const d = e.code;
|
|
532
|
-
y.value ||
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
},
|
|
536
|
-
var
|
|
529
|
+
y.value || te(e);
|
|
530
|
+
const v = (K = C.value) == null ? void 0 : K.length;
|
|
531
|
+
v && (typeof o == "number" ? o === v - 1 && d === "ArrowDown" ? z.value = 0 : o === 0 && d === "ArrowUp" ? z.value = v - 1 : z.value = d === "ArrowDown" ? o + 1 : o - 1 : z.value = d === "ArrowDown" ? 0 : v - 1, t(z.value));
|
|
532
|
+
}, he = (e, o) => {
|
|
533
|
+
var v, K, q;
|
|
537
534
|
if (e.preventDefault(), !y.value)
|
|
538
|
-
return
|
|
539
|
-
const d =
|
|
540
|
-
|
|
535
|
+
return te(e);
|
|
536
|
+
const d = o ? ((v = C.value) == null ? void 0 : v[o]) ?? ((K = C.value) == null ? void 0 : K[0]) : (q = C.value) == null ? void 0 : q[0];
|
|
537
|
+
W(d) || i(d);
|
|
541
538
|
};
|
|
542
|
-
async function
|
|
543
|
-
var d,
|
|
544
|
-
await Ie(), typeof e != "number" &&
|
|
545
|
-
const
|
|
546
|
-
typeof
|
|
539
|
+
async function t(e) {
|
|
540
|
+
var d, v;
|
|
541
|
+
await Ie(), typeof e != "number" && g();
|
|
542
|
+
const o = e ?? z.value;
|
|
543
|
+
typeof o == "number" && o >= 0 && ((v = (d = Q.value) == null ? void 0 : d.querySelectorAll(".m-select-list-item")[o]) == null || v.scrollIntoView({
|
|
547
544
|
behavior: "auto",
|
|
548
545
|
block: "nearest",
|
|
549
546
|
inline: "start"
|
|
550
547
|
}));
|
|
551
548
|
}
|
|
552
|
-
function
|
|
549
|
+
function g(e) {
|
|
553
550
|
var d;
|
|
554
|
-
const
|
|
555
|
-
var
|
|
556
|
-
return
|
|
551
|
+
const o = (d = C.value) == null ? void 0 : d.findIndex((v) => {
|
|
552
|
+
var K, q;
|
|
553
|
+
return l.multiple && Array.isArray(l.modelValue) ? e ? e[l.optionValueKey] === v[l.optionValueKey] : [...l.modelValue].reverse()[0] === v[l.optionValueKey] : ((q = (K = m.value) == null ? void 0 : K[0]) == null ? void 0 : q[l.optionValueKey]) === v[l.optionValueKey];
|
|
557
554
|
});
|
|
558
|
-
z.value =
|
|
555
|
+
z.value = o && o >= 0 ? o : 0;
|
|
559
556
|
}
|
|
560
|
-
const
|
|
561
|
-
var
|
|
562
|
-
|
|
563
|
-
const d = (
|
|
564
|
-
(
|
|
557
|
+
const i = (e, o = !0) => {
|
|
558
|
+
var q;
|
|
559
|
+
o && !l.multiple && Ie(() => re()), Z.value = "";
|
|
560
|
+
const d = (q = m.value) == null ? void 0 : q.some(
|
|
561
|
+
(ie) => ie[l.optionValueKey] === e[l.optionValueKey]
|
|
565
562
|
);
|
|
566
|
-
let
|
|
567
|
-
d &&
|
|
568
|
-
(
|
|
569
|
-
) :
|
|
570
|
-
const
|
|
571
|
-
|
|
563
|
+
let v = m.value;
|
|
564
|
+
d && l.multiple ? v = v == null ? void 0 : v.filter(
|
|
565
|
+
(ie) => ie[l.optionValueKey] !== e[l.optionValueKey]
|
|
566
|
+
) : l.multiple ? v.push(e) : v = [e];
|
|
567
|
+
const K = v.map((ie) => ie[l.optionValueKey]);
|
|
568
|
+
O("update:model-value", l.multiple ? K : K[0]), O("selected-option", e), g(e), G();
|
|
572
569
|
};
|
|
573
|
-
return (e,
|
|
570
|
+
return (e, o) => (s(), b(
|
|
574
571
|
"div",
|
|
575
572
|
{
|
|
576
573
|
ref_key: "mazSelectElement",
|
|
577
574
|
ref: le,
|
|
578
|
-
class:
|
|
579
|
-
style:
|
|
580
|
-
onBlurCapture:
|
|
575
|
+
class: V(["m-select", [{ "--is-open": y.value, "--disabled": e.disabled }, l.class, `--${e.size}`]]),
|
|
576
|
+
style: ne(e.style),
|
|
577
|
+
onBlurCapture: re
|
|
581
578
|
},
|
|
582
579
|
[
|
|
583
|
-
|
|
584
|
-
id:
|
|
580
|
+
_(_e, Le({
|
|
581
|
+
id: f(T),
|
|
585
582
|
ref_key: "mazInputComponent",
|
|
586
583
|
ref: oe,
|
|
587
584
|
class: "m-select-input"
|
|
588
585
|
}, e.$attrs, {
|
|
589
586
|
required: e.required,
|
|
590
|
-
"border-active":
|
|
587
|
+
"border-active": A.value,
|
|
591
588
|
color: e.color,
|
|
592
589
|
"model-value": ee.value,
|
|
593
590
|
autocomplete: "off",
|
|
594
591
|
size: e.size,
|
|
595
592
|
disabled: e.disabled,
|
|
596
|
-
onFocus: me(
|
|
597
|
-
onClick: me(
|
|
598
|
-
onChange:
|
|
593
|
+
onFocus: me(te, ["prevent", "stop"]),
|
|
594
|
+
onClick: me(te, ["prevent", "stop"]),
|
|
595
|
+
onChange: o[0] || (o[0] = (d) => O("change", d)),
|
|
599
596
|
onKeydown: Ve
|
|
600
597
|
}), {
|
|
601
|
-
"right-icon":
|
|
602
|
-
|
|
598
|
+
"right-icon": P(() => [
|
|
599
|
+
I("button", {
|
|
603
600
|
tabindex: "-1",
|
|
604
601
|
type: "button",
|
|
605
602
|
class: "m-select-input__toggle-button maz-custom",
|
|
606
|
-
onClick: me(
|
|
603
|
+
onClick: me(H, ["stop"])
|
|
607
604
|
}, [
|
|
608
|
-
|
|
605
|
+
_(f(L), { class: "m-select-chevron maz-text-xl" })
|
|
609
606
|
])
|
|
610
607
|
]),
|
|
611
608
|
_: 1
|
|
612
609
|
/* STABLE */
|
|
613
610
|
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "disabled"]),
|
|
614
|
-
|
|
615
|
-
default:
|
|
611
|
+
_(Xe, { name: ce.value }, {
|
|
612
|
+
default: P(() => [
|
|
616
613
|
y.value ? (s(), b(
|
|
617
614
|
"div",
|
|
618
615
|
{
|
|
619
616
|
key: 0,
|
|
620
617
|
ref_key: "optionsListElement",
|
|
621
|
-
ref:
|
|
622
|
-
class:
|
|
618
|
+
ref: Q,
|
|
619
|
+
class: V(["m-select-list", {
|
|
623
620
|
"--top": e.listPosition.includes("top"),
|
|
624
621
|
"--left": e.listPosition.includes("left"),
|
|
625
622
|
"--right": e.listPosition.includes("right"),
|
|
626
623
|
"--bottom": e.listPosition.includes("bottom")
|
|
627
624
|
}]),
|
|
628
|
-
style:
|
|
625
|
+
style: ne({
|
|
629
626
|
maxHeight: `${e.maxListHeight}px`,
|
|
630
627
|
maxWidth: `${e.maxListWidth}px`
|
|
631
628
|
})
|
|
632
629
|
},
|
|
633
630
|
[
|
|
634
|
-
e.search ? (s(),
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
])) : r("v-if", !0),
|
|
631
|
+
e.search ? (s(), k(_e, {
|
|
632
|
+
key: 0,
|
|
633
|
+
ref_key: "searchInputComponent",
|
|
634
|
+
ref: ae,
|
|
635
|
+
modelValue: Z.value,
|
|
636
|
+
"onUpdate:modelValue": [
|
|
637
|
+
o[1] || (o[1] = (d) => Z.value = d),
|
|
638
|
+
o[2] || (o[2] = (d) => z.value = 0)
|
|
639
|
+
],
|
|
640
|
+
size: "sm",
|
|
641
|
+
color: e.color,
|
|
642
|
+
placeholder: e.searchPlaceholder,
|
|
643
|
+
name: "search",
|
|
644
|
+
autocomplete: "off",
|
|
645
|
+
tabindex: "-1",
|
|
646
|
+
class: "m-select-list__search-input maz-flex-none",
|
|
647
|
+
"left-icon": f(p),
|
|
648
|
+
onKeydown: be
|
|
649
|
+
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : r("v-if", !0),
|
|
654
650
|
r(`
|
|
655
651
|
@slot No results slot - Displayed when no results corresponding with search query
|
|
656
652
|
`),
|
|
657
|
-
!
|
|
658
|
-
|
|
659
|
-
|
|
653
|
+
!C.value || C.value.length <= 0 ? $(e.$slots, "no-results", { key: 1 }, () => [
|
|
654
|
+
I("span", Bt, [
|
|
655
|
+
_(f(S), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
660
656
|
])
|
|
661
|
-
], !0) : (s(), b("div",
|
|
657
|
+
], !0) : (s(), b("div", Ct, [
|
|
662
658
|
(s(!0), b(
|
|
663
|
-
|
|
659
|
+
ze,
|
|
664
660
|
null,
|
|
665
|
-
|
|
666
|
-
key:
|
|
661
|
+
ke(C.value, (d, v) => (s(), b("button", {
|
|
662
|
+
key: v,
|
|
667
663
|
tabindex: "-1",
|
|
668
664
|
type: "button",
|
|
669
|
-
class:
|
|
665
|
+
class: V(["m-select-list-item maz-custom maz-flex-none", [
|
|
670
666
|
{
|
|
671
|
-
"--is-keyboard-selected": z.value ===
|
|
672
|
-
"--is-selected":
|
|
673
|
-
"--is-none-value":
|
|
667
|
+
"--is-keyboard-selected": z.value === v,
|
|
668
|
+
"--is-selected": Y(d),
|
|
669
|
+
"--is-none-value": W(d[e.optionValueKey])
|
|
674
670
|
}
|
|
675
671
|
]]),
|
|
676
|
-
style:
|
|
677
|
-
onClick: me((
|
|
672
|
+
style: ne(e.itemHeight ? { minHeight: `${e.itemHeight}px` } : void 0),
|
|
673
|
+
onClick: me((K) => i(d), ["prevent", "stop"])
|
|
678
674
|
}, [
|
|
679
|
-
e.multiple ? (s(),
|
|
675
|
+
e.multiple ? (s(), k(f(n), {
|
|
680
676
|
key: 0,
|
|
681
677
|
tabindex: "-1",
|
|
682
|
-
"model-value":
|
|
678
|
+
"model-value": Y(d),
|
|
683
679
|
size: "sm",
|
|
684
680
|
color: e.color
|
|
685
681
|
}, null, 8, ["model-value", "color"])) : r("v-if", !0),
|
|
@@ -688,19 +684,19 @@ const Bt = {
|
|
|
688
684
|
@binding {Object} option
|
|
689
685
|
@binding {Boolean} is-selected
|
|
690
686
|
`),
|
|
691
|
-
|
|
687
|
+
$(e.$slots, "default", {
|
|
692
688
|
option: d,
|
|
693
|
-
isSelected:
|
|
689
|
+
isSelected: Y(d)
|
|
694
690
|
}, () => [
|
|
695
|
-
|
|
691
|
+
I(
|
|
696
692
|
"span",
|
|
697
693
|
null,
|
|
698
|
-
|
|
694
|
+
J(d[e.optionLabelKey]),
|
|
699
695
|
1
|
|
700
696
|
/* TEXT */
|
|
701
697
|
)
|
|
702
698
|
], !0)
|
|
703
|
-
], 14,
|
|
699
|
+
], 14, _t))),
|
|
704
700
|
128
|
|
705
701
|
/* KEYED_FRAGMENT */
|
|
706
702
|
))
|
|
@@ -718,7 +714,7 @@ const Bt = {
|
|
|
718
714
|
/* CLASS, STYLE, NEED_HYDRATION */
|
|
719
715
|
));
|
|
720
716
|
}
|
|
721
|
-
}), De = /* @__PURE__ */ x(
|
|
717
|
+
}), De = /* @__PURE__ */ x(At, [["__scopeId", "data-v-8272b643"]]), Kt = /* @__PURE__ */ X({
|
|
722
718
|
__name: "MazBtn",
|
|
723
719
|
props: {
|
|
724
720
|
variant: { default: "button" },
|
|
@@ -743,29 +739,29 @@ const Bt = {
|
|
|
743
739
|
contentClass: { default: void 0 }
|
|
744
740
|
},
|
|
745
741
|
setup(c) {
|
|
746
|
-
const h =
|
|
747
|
-
|
|
748
|
-
|
|
742
|
+
const h = U(() => import("./MazSpinner-1Sy8XBOO.mjs")), n = U(() => import("./MazIcon-002AxbwZ.mjs")), { href: p, to: L } = xe(), S = Me(), w = c;
|
|
743
|
+
Te(() => {
|
|
744
|
+
w.icon && !w.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
|
|
749
745
|
});
|
|
750
|
-
const
|
|
751
|
-
() =>
|
|
752
|
-
),
|
|
753
|
-
() => (
|
|
754
|
-
), z = u(() =>
|
|
755
|
-
return (m, le) => (s(),
|
|
756
|
-
disabled:
|
|
757
|
-
class:
|
|
746
|
+
const l = u(() => p ? "a" : L ? "router-link" : "button"), O = u(
|
|
747
|
+
() => w.pastel ? `--${w.color}-pastel` : w.outline ? `--${w.color}-outline` : `--${w.color}`
|
|
748
|
+
), A = u(
|
|
749
|
+
() => (w.loading || w.disabled) && l.value === "button"
|
|
750
|
+
), z = u(() => A.value ? "--cursor-default" : "--cursor-pointer"), D = u(() => `--is-${w.variant}`), B = u(() => w.loading && w.variant === "button"), R = u(() => !!S["left-icon"] || w.leftIcon), F = u(() => !!S["right-icon"] || w.rightIcon), y = u(() => R.value || F.value), T = u(() => w.fab && (w.icon || !!S.icon)), N = u(() => l.value === "button" ? w.type : void 0);
|
|
751
|
+
return (m, le) => (s(), k(de(l.value), {
|
|
752
|
+
disabled: A.value,
|
|
753
|
+
class: V(["m-btn", [
|
|
758
754
|
`--${m.size}`,
|
|
759
|
-
|
|
755
|
+
O.value,
|
|
760
756
|
z.value,
|
|
761
|
-
|
|
757
|
+
D.value,
|
|
762
758
|
{
|
|
763
759
|
"--block": m.block,
|
|
764
760
|
"--no-underline": m.noUnderline,
|
|
765
761
|
"--no-leading": m.noLeading,
|
|
766
762
|
"--fab": m.fab,
|
|
767
763
|
"--loading": m.loading,
|
|
768
|
-
"--disabled":
|
|
764
|
+
"--disabled": A.value,
|
|
769
765
|
"--icon": y.value,
|
|
770
766
|
"--rounded": m.rounded,
|
|
771
767
|
"--no-rounded": m.noRounded,
|
|
@@ -773,24 +769,24 @@ const Bt = {
|
|
|
773
769
|
"--no-elevation": m.noElevation
|
|
774
770
|
}
|
|
775
771
|
]]),
|
|
776
|
-
type:
|
|
772
|
+
type: N.value
|
|
777
773
|
}, {
|
|
778
|
-
default:
|
|
779
|
-
|
|
774
|
+
default: P(() => [
|
|
775
|
+
R.value ? (s(), b(
|
|
780
776
|
"div",
|
|
781
777
|
{
|
|
782
778
|
key: 0,
|
|
783
|
-
class:
|
|
779
|
+
class: V(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": B.value }])
|
|
784
780
|
},
|
|
785
781
|
[
|
|
786
782
|
r(`
|
|
787
783
|
@slot left-icon - The icon to display on the left of the button
|
|
788
784
|
`),
|
|
789
|
-
|
|
790
|
-
typeof m.leftIcon == "string" ? (s(),
|
|
785
|
+
$(m.$slots, "left-icon", {}, () => [
|
|
786
|
+
typeof m.leftIcon == "string" ? (s(), k(f(n), {
|
|
791
787
|
key: 0,
|
|
792
788
|
name: m.leftIcon
|
|
793
|
-
}, null, 8, ["name"])) : m.leftIcon ? (s(),
|
|
789
|
+
}, null, 8, ["name"])) : m.leftIcon ? (s(), k(de(m.leftIcon), { key: 1 })) : r("v-if", !0)
|
|
794
790
|
], !0)
|
|
795
791
|
],
|
|
796
792
|
2
|
|
@@ -800,17 +796,17 @@ const Bt = {
|
|
|
800
796
|
"div",
|
|
801
797
|
{
|
|
802
798
|
key: 1,
|
|
803
|
-
class:
|
|
799
|
+
class: V(["m-btn__icon", { "maz-invisible": B.value }])
|
|
804
800
|
},
|
|
805
801
|
[
|
|
806
802
|
r(`
|
|
807
803
|
@slot icon - The icon to display on the fab button
|
|
808
804
|
`),
|
|
809
|
-
|
|
810
|
-
typeof m.icon == "string" ? (s(),
|
|
805
|
+
$(m.$slots, "icon", {}, () => [
|
|
806
|
+
typeof m.icon == "string" ? (s(), k(f(n), {
|
|
811
807
|
key: 0,
|
|
812
808
|
name: m.icon
|
|
813
|
-
}, null, 8, ["name"])) : m.icon ? (s(),
|
|
809
|
+
}, null, 8, ["name"])) : m.icon ? (s(), k(de(m.icon), { key: 1 })) : r("v-if", !0)
|
|
814
810
|
], !0)
|
|
815
811
|
],
|
|
816
812
|
2
|
|
@@ -820,38 +816,38 @@ const Bt = {
|
|
|
820
816
|
"span",
|
|
821
817
|
{
|
|
822
818
|
key: 2,
|
|
823
|
-
class:
|
|
819
|
+
class: V([{ "maz-invisible": B.value }, m.contentClass])
|
|
824
820
|
},
|
|
825
821
|
[
|
|
826
822
|
r(`
|
|
827
823
|
@slot default - The content of the button
|
|
828
824
|
`),
|
|
829
|
-
|
|
825
|
+
$(m.$slots, "default", {}, void 0, !0)
|
|
830
826
|
],
|
|
831
827
|
2
|
|
832
828
|
/* CLASS */
|
|
833
829
|
)) : r("v-if", !0),
|
|
834
|
-
|
|
830
|
+
F.value ? (s(), b(
|
|
835
831
|
"div",
|
|
836
832
|
{
|
|
837
833
|
key: 3,
|
|
838
|
-
class:
|
|
834
|
+
class: V(["m-btn__icon-right", { "maz-invisible": B.value }])
|
|
839
835
|
},
|
|
840
836
|
[
|
|
841
837
|
r(`
|
|
842
838
|
@slot right-icon - The icon to display on the right of the button
|
|
843
839
|
`),
|
|
844
|
-
|
|
845
|
-
typeof m.rightIcon == "string" ? (s(),
|
|
840
|
+
$(m.$slots, "right-icon", {}, () => [
|
|
841
|
+
typeof m.rightIcon == "string" ? (s(), k(f(n), {
|
|
846
842
|
key: 0,
|
|
847
843
|
name: m.rightIcon
|
|
848
|
-
}, null, 8, ["name"])) : m.rightIcon ? (s(),
|
|
844
|
+
}, null, 8, ["name"])) : m.rightIcon ? (s(), k(de(m.rightIcon), { key: 1 })) : r("v-if", !0)
|
|
849
845
|
], !0)
|
|
850
846
|
],
|
|
851
847
|
2
|
|
852
848
|
/* CLASS */
|
|
853
849
|
)) : r("v-if", !0),
|
|
854
|
-
|
|
850
|
+
B.value ? (s(), k(f(h), {
|
|
855
851
|
key: 4,
|
|
856
852
|
class: "m-btn-loader",
|
|
857
853
|
size: "2em",
|
|
@@ -862,80 +858,80 @@ const Bt = {
|
|
|
862
858
|
/* FORWARDED */
|
|
863
859
|
}, 8, ["disabled", "class", "type"]));
|
|
864
860
|
}
|
|
865
|
-
}),
|
|
861
|
+
}), fe = /* @__PURE__ */ x(Kt, [["__scopeId", "data-v-0caaaef5"]]), Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
866
862
|
__proto__: null,
|
|
867
|
-
default:
|
|
868
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
863
|
+
default: fe
|
|
864
|
+
}, Symbol.toStringTag, { value: "Module" })), Lt = /* @__PURE__ */ X({
|
|
869
865
|
__name: "MazTableRow",
|
|
870
866
|
props: {
|
|
871
867
|
noHoverable: { type: Boolean }
|
|
872
868
|
},
|
|
873
869
|
setup(c) {
|
|
874
|
-
const { hoverable: h, backgroundEven: n, backgroundOdd: p } =
|
|
875
|
-
return (L,
|
|
870
|
+
const { hoverable: h, backgroundEven: n, backgroundOdd: p } = Oe("maz-table");
|
|
871
|
+
return (L, S) => (s(), b(
|
|
876
872
|
"tr",
|
|
877
873
|
{
|
|
878
|
-
class:
|
|
879
|
-
"--hoverable":
|
|
880
|
-
"--background-odd":
|
|
881
|
-
"--background-even":
|
|
874
|
+
class: V(["m-table-row", {
|
|
875
|
+
"--hoverable": f(h) && !L.noHoverable,
|
|
876
|
+
"--background-odd": f(p),
|
|
877
|
+
"--background-even": f(n)
|
|
882
878
|
}])
|
|
883
879
|
},
|
|
884
880
|
[
|
|
885
|
-
|
|
881
|
+
$(L.$slots, "default", {}, void 0, !0)
|
|
886
882
|
],
|
|
887
883
|
2
|
|
888
884
|
/* CLASS */
|
|
889
885
|
));
|
|
890
886
|
}
|
|
891
|
-
}), Be = /* @__PURE__ */ x(
|
|
887
|
+
}), Be = /* @__PURE__ */ x(Lt, [["__scopeId", "data-v-b0217878"]]), Tt = /* @__PURE__ */ X({
|
|
892
888
|
__name: "MazTableCell",
|
|
893
889
|
setup(c) {
|
|
894
|
-
const { size: h } =
|
|
890
|
+
const { size: h } = Oe("maz-table");
|
|
895
891
|
return (n, p) => (s(), b(
|
|
896
892
|
"td",
|
|
897
893
|
{
|
|
898
|
-
class:
|
|
894
|
+
class: V(["m-table-cell", `--${f(h)}`])
|
|
899
895
|
},
|
|
900
896
|
[
|
|
901
|
-
|
|
897
|
+
$(n.$slots, "default", {}, void 0, !0)
|
|
902
898
|
],
|
|
903
899
|
2
|
|
904
900
|
/* CLASS */
|
|
905
901
|
));
|
|
906
902
|
}
|
|
907
|
-
}),
|
|
903
|
+
}), ge = /* @__PURE__ */ x(Tt, [["__scopeId", "data-v-0668079a"]]), Pt = /* @__PURE__ */ X({
|
|
908
904
|
__name: "MazTableTitle",
|
|
909
905
|
setup(c) {
|
|
910
|
-
const { size: h } =
|
|
906
|
+
const { size: h } = Oe("maz-table");
|
|
911
907
|
return (n, p) => (s(), b(
|
|
912
908
|
"th",
|
|
913
909
|
{
|
|
914
|
-
class:
|
|
910
|
+
class: V(["m-table-title", `--${f(h)}`])
|
|
915
911
|
},
|
|
916
912
|
[
|
|
917
|
-
|
|
913
|
+
$(n.$slots, "default", {}, void 0, !0)
|
|
918
914
|
],
|
|
919
915
|
2
|
|
920
916
|
/* CLASS */
|
|
921
917
|
));
|
|
922
918
|
}
|
|
923
|
-
}), Ce = /* @__PURE__ */ x(
|
|
919
|
+
}), Ce = /* @__PURE__ */ x(Pt, [["__scopeId", "data-v-7d02b262"]]), Ot = (c) => (Ee("data-v-e73a9507"), c = c(), Fe(), c), Nt = { class: "m-loading-bar" }, jt = /* @__PURE__ */ Ot(() => /* @__PURE__ */ I(
|
|
924
920
|
"div",
|
|
925
921
|
null,
|
|
926
922
|
null,
|
|
927
923
|
-1
|
|
928
924
|
/* HOISTED */
|
|
929
|
-
)),
|
|
930
|
-
|
|
931
|
-
],
|
|
925
|
+
)), Dt = [
|
|
926
|
+
jt
|
|
927
|
+
], Et = /* @__PURE__ */ X({
|
|
932
928
|
__name: "MazLoadingBar",
|
|
933
929
|
props: {
|
|
934
930
|
color: { default: "primary" },
|
|
935
931
|
height: { default: "0.125rem" }
|
|
936
932
|
},
|
|
937
933
|
setup(c) {
|
|
938
|
-
|
|
934
|
+
we((p) => ({
|
|
939
935
|
60623600: p.height,
|
|
940
936
|
"7a594c6d": n.value.alpha,
|
|
941
937
|
"568c4cca": n.value.main
|
|
@@ -944,15 +940,15 @@ const Bt = {
|
|
|
944
940
|
alpha: `var(--maz-color-${h.color}-alpha-20)`,
|
|
945
941
|
main: `var(--maz-color-${h.color})`
|
|
946
942
|
}));
|
|
947
|
-
return (p, L) => (s(), b("div",
|
|
943
|
+
return (p, L) => (s(), b("div", Nt, Dt));
|
|
948
944
|
}
|
|
949
|
-
}),
|
|
945
|
+
}), Ft = /* @__PURE__ */ x(Et, [["__scopeId", "data-v-e73a9507"]]), Ht = {
|
|
950
946
|
xmlns: "http://www.w3.org/2000/svg",
|
|
951
947
|
width: "1em",
|
|
952
948
|
height: "1em",
|
|
953
949
|
fill: "none",
|
|
954
950
|
viewBox: "0 0 24 24"
|
|
955
|
-
},
|
|
951
|
+
}, qt = /* @__PURE__ */ I(
|
|
956
952
|
"path",
|
|
957
953
|
{
|
|
958
954
|
stroke: "currentColor",
|
|
@@ -964,17 +960,17 @@ const Bt = {
|
|
|
964
960
|
null,
|
|
965
961
|
-1
|
|
966
962
|
/* HOISTED */
|
|
967
|
-
),
|
|
968
|
-
|
|
963
|
+
), Ut = [
|
|
964
|
+
qt
|
|
969
965
|
];
|
|
970
|
-
function
|
|
971
|
-
return s(), b("svg",
|
|
966
|
+
function Ue(c, h) {
|
|
967
|
+
return s(), b("svg", Ht, [...Ut]);
|
|
972
968
|
}
|
|
973
|
-
const
|
|
969
|
+
const Re = { render: Ue }, Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
974
970
|
__proto__: null,
|
|
975
|
-
default:
|
|
976
|
-
render:
|
|
977
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
971
|
+
default: Re,
|
|
972
|
+
render: Ue
|
|
973
|
+
}, Symbol.toStringTag, { value: "Module" })), Qt = ["for", "aria-checked"], Wt = ["id", "checked", "disabled", "name"], Yt = /* @__PURE__ */ X({
|
|
978
974
|
inheritAttrs: !1,
|
|
979
975
|
__name: "MazCheckbox",
|
|
980
976
|
props: {
|
|
@@ -1007,19 +1003,19 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1007
1003
|
"change"
|
|
1008
1004
|
],
|
|
1009
1005
|
setup(c, { emit: h }) {
|
|
1010
|
-
|
|
1011
|
-
"3a21591b":
|
|
1012
|
-
"4953c77d":
|
|
1006
|
+
we((y) => ({
|
|
1007
|
+
"3a21591b": A.value,
|
|
1008
|
+
"4953c77d": l.value,
|
|
1013
1009
|
d5250ce8: z.value,
|
|
1014
|
-
"105d84cf":
|
|
1010
|
+
"105d84cf": D.value
|
|
1015
1011
|
}));
|
|
1016
|
-
const n = Ke(), p = c, L = h,
|
|
1012
|
+
const n = Ke(), p = c, L = h, S = Pe({
|
|
1017
1013
|
componentName: "MazCheckbox",
|
|
1018
1014
|
instance: n,
|
|
1019
1015
|
providedId: p.id
|
|
1020
|
-
}),
|
|
1016
|
+
}), w = u(
|
|
1021
1017
|
() => typeof p.value != "boolean" && Array.isArray(p.modelValue) ? p.modelValue.includes(p.value) : typeof p.modelValue == "boolean" ? p.modelValue : !1
|
|
1022
|
-
),
|
|
1018
|
+
), l = u(() => {
|
|
1023
1019
|
switch (p.size) {
|
|
1024
1020
|
case "xl":
|
|
1025
1021
|
return "2.25rem";
|
|
@@ -1034,7 +1030,7 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1034
1030
|
case "mini":
|
|
1035
1031
|
return "1.2rem";
|
|
1036
1032
|
}
|
|
1037
|
-
}),
|
|
1033
|
+
}), O = u(() => {
|
|
1038
1034
|
switch (p.size) {
|
|
1039
1035
|
case "xl":
|
|
1040
1036
|
return "maz-text-2xl";
|
|
@@ -1049,62 +1045,56 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1049
1045
|
case "mini":
|
|
1050
1046
|
return "maz-text-xs";
|
|
1051
1047
|
}
|
|
1052
|
-
}),
|
|
1048
|
+
}), A = u(() => `var(--maz-color-${p.color}-contrast)`), z = u(() => `var(--maz-color-${p.color})`), D = u(
|
|
1053
1049
|
() => ["black", "transparent"].includes(p.color) ? "var(--maz-color-muted)" : `var(--maz-color-${p.color}-alpha)`
|
|
1054
1050
|
);
|
|
1055
|
-
function
|
|
1056
|
-
["Space"].includes(y.code) && (y.preventDefault(),
|
|
1051
|
+
function B(y) {
|
|
1052
|
+
["Space"].includes(y.code) && (y.preventDefault(), F(p.value ?? !p.modelValue));
|
|
1057
1053
|
}
|
|
1058
|
-
function
|
|
1054
|
+
function R(y) {
|
|
1059
1055
|
return typeof y == "boolean" && (typeof p.modelValue == "boolean" || p.modelValue === void 0 || p.modelValue === null) ? !p.modelValue : Array.isArray(p.modelValue) && typeof y != "boolean" ? p.modelValue.includes(y) ? p.modelValue.filter((T) => T !== y) : [...p.modelValue, y] : [y];
|
|
1060
1056
|
}
|
|
1061
|
-
function
|
|
1062
|
-
const T =
|
|
1057
|
+
function F(y) {
|
|
1058
|
+
const T = R(y);
|
|
1063
1059
|
L("update:model-value", T), L("change", T);
|
|
1064
1060
|
}
|
|
1065
1061
|
return (y, T) => (s(), b("label", {
|
|
1066
|
-
for:
|
|
1067
|
-
class:
|
|
1062
|
+
for: f(S),
|
|
1063
|
+
class: V(["m-checkbox", [{ "--disabled": c.disabled }, p.class]]),
|
|
1068
1064
|
tabindex: "0",
|
|
1069
|
-
style:
|
|
1065
|
+
style: ne(c.style),
|
|
1070
1066
|
role: "checkbox",
|
|
1071
|
-
"aria-checked":
|
|
1072
|
-
onKeydown:
|
|
1067
|
+
"aria-checked": w.value,
|
|
1068
|
+
onKeydown: B
|
|
1073
1069
|
}, [
|
|
1074
|
-
|
|
1075
|
-
id:
|
|
1076
|
-
checked:
|
|
1070
|
+
I("input", Le({
|
|
1071
|
+
id: f(S),
|
|
1072
|
+
checked: w.value
|
|
1077
1073
|
}, y.$attrs, {
|
|
1078
1074
|
tabindex: "-1",
|
|
1079
1075
|
disabled: c.disabled,
|
|
1080
1076
|
name: c.name,
|
|
1081
1077
|
type: "checkbox",
|
|
1082
|
-
onChange: T[0] || (T[0] = (
|
|
1078
|
+
onChange: T[0] || (T[0] = (N) => {
|
|
1083
1079
|
var m;
|
|
1084
|
-
return
|
|
1080
|
+
return F(c.value ?? ((m = N == null ? void 0 : N.target) == null ? void 0 : m.checked));
|
|
1085
1081
|
})
|
|
1086
|
-
}), null, 16,
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
class:
|
|
1082
|
+
}), null, 16, Wt),
|
|
1083
|
+
I("span", null, [
|
|
1084
|
+
_(f(Re), {
|
|
1085
|
+
class: V(["check-icon", O.value])
|
|
1090
1086
|
}, null, 8, ["class"])
|
|
1091
1087
|
]),
|
|
1092
|
-
|
|
1093
|
-
], 46,
|
|
1088
|
+
$(y.$slots, "default", {}, void 0, !0)
|
|
1089
|
+
], 46, Qt));
|
|
1094
1090
|
}
|
|
1095
|
-
}), Ae = /* @__PURE__ */ x(
|
|
1091
|
+
}), Ae = /* @__PURE__ */ x(Yt, [["__scopeId", "data-v-05f6558f"]]), Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1096
1092
|
__proto__: null,
|
|
1097
1093
|
default: Ae
|
|
1098
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1094
|
+
}, Symbol.toStringTag, { value: "Module" })), Qe = (c) => (Ee("data-v-8df44d41"), c = c(), Fe(), c), Gt = {
|
|
1099
1095
|
key: 0,
|
|
1100
1096
|
class: "m-table-header"
|
|
1101
|
-
},
|
|
1102
|
-
"div",
|
|
1103
|
-
{ class: "m-table-spacer" },
|
|
1104
|
-
null,
|
|
1105
|
-
-1
|
|
1106
|
-
/* HOISTED */
|
|
1107
|
-
)), xt = {
|
|
1097
|
+
}, Jt = { class: "m-table-spacer" }, Xt = { class: "m-table-header-title" }, xt = {
|
|
1108
1098
|
key: 0,
|
|
1109
1099
|
class: "m-table-header-search"
|
|
1110
1100
|
}, el = { key: 0 }, tl = { key: 1 }, ll = {
|
|
@@ -1113,7 +1103,7 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1113
1103
|
}, ol = { class: "maz-text-center maz-text-muted" }, al = {
|
|
1114
1104
|
key: 1,
|
|
1115
1105
|
class: "m-table-footer"
|
|
1116
|
-
}, nl = /* @__PURE__ */
|
|
1106
|
+
}, nl = /* @__PURE__ */ Qe(() => /* @__PURE__ */ I(
|
|
1117
1107
|
"div",
|
|
1118
1108
|
{ class: "m-table-spacer" },
|
|
1119
1109
|
null,
|
|
@@ -1122,7 +1112,7 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1122
1112
|
)), sl = {
|
|
1123
1113
|
key: 0,
|
|
1124
1114
|
class: "m-table-footer-pagination"
|
|
1125
|
-
}, rl = { class: "m-table-footer-pagination-items-per-page" }, il = /* @__PURE__ */
|
|
1115
|
+
}, rl = { class: "m-table-footer-pagination-items-per-page" }, il = /* @__PURE__ */ Qe(() => /* @__PURE__ */ I(
|
|
1126
1116
|
"span",
|
|
1127
1117
|
{ class: "maz-hidden maz-text-sm maz-text-muted tab-s:maz-block" },
|
|
1128
1118
|
" Item per page ",
|
|
@@ -1138,6 +1128,7 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1138
1128
|
tableStyle: { default: void 0 },
|
|
1139
1129
|
modelValue: { default: void 0 },
|
|
1140
1130
|
size: { default: "md" },
|
|
1131
|
+
title: { default: void 0 },
|
|
1141
1132
|
headers: { default: void 0 },
|
|
1142
1133
|
sortable: { type: Boolean },
|
|
1143
1134
|
headersAlign: { default: "left" },
|
|
@@ -1171,32 +1162,32 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1171
1162
|
},
|
|
1172
1163
|
emits: ["update:model-value", "update:search-query", "update:page", "update:page-size"],
|
|
1173
1164
|
setup(c, { emit: h }) {
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1165
|
+
we((t) => ({
|
|
1166
|
+
"0ef17bdd": n.tableLayout,
|
|
1167
|
+
d2fd18bc: n.captionSide
|
|
1177
1168
|
}));
|
|
1178
1169
|
const n = c, p = u(
|
|
1179
1170
|
() => n.divider && !n.backgroundEven && !n.backgroundOdd
|
|
1180
|
-
), L = h, { size:
|
|
1171
|
+
), L = h, { size: S, hoverable: w, backgroundEven: l, backgroundOdd: O } = et(n);
|
|
1181
1172
|
tt("maz-table", {
|
|
1182
|
-
size:
|
|
1183
|
-
hoverable:
|
|
1184
|
-
backgroundEven:
|
|
1185
|
-
backgroundOdd:
|
|
1173
|
+
size: S,
|
|
1174
|
+
hoverable: w,
|
|
1175
|
+
backgroundEven: l,
|
|
1176
|
+
backgroundOdd: O
|
|
1186
1177
|
});
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1178
|
+
const A = M(te()), z = u(() => n.selectable || !!n.selectedKey), D = M(n.page);
|
|
1179
|
+
ye(
|
|
1189
1180
|
() => n.page,
|
|
1190
|
-
(
|
|
1191
|
-
|
|
1181
|
+
(t) => {
|
|
1182
|
+
D.value = t;
|
|
1192
1183
|
}
|
|
1193
1184
|
);
|
|
1194
|
-
const
|
|
1195
|
-
get: () =>
|
|
1196
|
-
set: (
|
|
1197
|
-
|
|
1185
|
+
const B = u({
|
|
1186
|
+
get: () => D.value,
|
|
1187
|
+
set: (t) => {
|
|
1188
|
+
D.value = t, L("update:page", t);
|
|
1198
1189
|
}
|
|
1199
|
-
}),
|
|
1190
|
+
}), R = u(() => [
|
|
1200
1191
|
{ label: n.paginationAllLabel, value: Number.POSITIVE_INFINITY },
|
|
1201
1192
|
{ label: 5, value: 5 },
|
|
1202
1193
|
{ label: 10, value: 10 },
|
|
@@ -1204,93 +1195,93 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1204
1195
|
{ label: 50, value: 50 },
|
|
1205
1196
|
{ label: 100, value: 100 },
|
|
1206
1197
|
{ label: 200, value: 200 }
|
|
1207
|
-
]),
|
|
1208
|
-
|
|
1198
|
+
]), F = M(n.pageSize);
|
|
1199
|
+
ye(
|
|
1209
1200
|
() => n.pageSize,
|
|
1210
|
-
(
|
|
1211
|
-
|
|
1201
|
+
(t) => {
|
|
1202
|
+
F.value = t;
|
|
1212
1203
|
}
|
|
1213
1204
|
);
|
|
1214
1205
|
const y = u({
|
|
1215
|
-
get: () =>
|
|
1216
|
-
set: (
|
|
1217
|
-
|
|
1206
|
+
get: () => F.value,
|
|
1207
|
+
set: (t) => {
|
|
1208
|
+
F.value = t, L("update:page-size", t);
|
|
1218
1209
|
}
|
|
1219
1210
|
}), T = u(() => {
|
|
1220
|
-
var
|
|
1221
|
-
return n.totalPages ?? (y.value === Number.POSITIVE_INFINITY || !((
|
|
1211
|
+
var t;
|
|
1212
|
+
return n.totalPages ?? (y.value === Number.POSITIVE_INFINITY || !((t = n.rows) != null && t.length)) ? 1 : Math.ceil(n.rows.length / y.value);
|
|
1222
1213
|
});
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1214
|
+
function N() {
|
|
1215
|
+
B.value = 1;
|
|
1225
1216
|
}
|
|
1226
1217
|
function m() {
|
|
1227
|
-
|
|
1218
|
+
B.value = T.value;
|
|
1228
1219
|
}
|
|
1229
1220
|
function le() {
|
|
1230
|
-
|
|
1221
|
+
B.value = B.value - 1;
|
|
1231
1222
|
}
|
|
1232
1223
|
function oe() {
|
|
1233
|
-
|
|
1224
|
+
B.value = B.value + 1;
|
|
1234
1225
|
}
|
|
1235
1226
|
const ae = u(() => {
|
|
1236
1227
|
if (!n.pagination || n.noPaginateRows || y.value === Number.POSITIVE_INFINITY)
|
|
1237
|
-
return
|
|
1238
|
-
const
|
|
1239
|
-
return
|
|
1228
|
+
return A.value;
|
|
1229
|
+
const t = (D.value - 1) * y.value, g = t + y.value;
|
|
1230
|
+
return A.value.slice(t, g);
|
|
1240
1231
|
});
|
|
1241
|
-
|
|
1232
|
+
ye(
|
|
1242
1233
|
() => [n.rows, n.modelValue],
|
|
1243
1234
|
() => {
|
|
1244
|
-
|
|
1235
|
+
A.value = te();
|
|
1245
1236
|
}
|
|
1246
1237
|
);
|
|
1247
|
-
const
|
|
1238
|
+
const Q = M(), W = u(() => [
|
|
1248
1239
|
// eslint-disable-next-line unicorn/no-null
|
|
1249
1240
|
{ label: n.searchByAllLabel, value: null },
|
|
1250
|
-
...
|
|
1251
|
-
label:
|
|
1252
|
-
value:
|
|
1241
|
+
...C.value.map((t) => ({
|
|
1242
|
+
label: t.label,
|
|
1243
|
+
value: t.key
|
|
1253
1244
|
}))
|
|
1254
|
-
]),
|
|
1255
|
-
|
|
1245
|
+
]), Y = M(n.searchQuery);
|
|
1246
|
+
ye(
|
|
1256
1247
|
() => n.searchQuery,
|
|
1257
|
-
(
|
|
1258
|
-
|
|
1248
|
+
(t) => {
|
|
1249
|
+
Y.value = t;
|
|
1259
1250
|
}
|
|
1260
1251
|
);
|
|
1261
1252
|
const ee = u({
|
|
1262
|
-
get: () =>
|
|
1263
|
-
set: (
|
|
1264
|
-
|
|
1253
|
+
get: () => Y.value,
|
|
1254
|
+
set: (t) => {
|
|
1255
|
+
Y.value = t, L("update:search-query", t);
|
|
1265
1256
|
}
|
|
1266
1257
|
});
|
|
1267
|
-
function
|
|
1268
|
-
return [...
|
|
1269
|
-
if (
|
|
1258
|
+
function ce(t) {
|
|
1259
|
+
return [...t].sort((g, i) => {
|
|
1260
|
+
if (G.value === void 0 || H.value === void 0)
|
|
1270
1261
|
return 0;
|
|
1271
|
-
const
|
|
1272
|
-
return typeof
|
|
1262
|
+
const e = g[C.value[G.value].key], o = i[C.value[G.value].key];
|
|
1263
|
+
return typeof e == "string" && typeof o == "string" ? H.value === "ASC" ? e.localeCompare(o) : o.localeCompare(e) : H.value === "ASC" ? e - o : o - e;
|
|
1273
1264
|
});
|
|
1274
1265
|
}
|
|
1275
|
-
function
|
|
1266
|
+
function Z(t) {
|
|
1276
1267
|
if (n.noSearchInRow || typeof ee.value != "string")
|
|
1277
1268
|
return ae.value;
|
|
1278
1269
|
const g = ee.value.toLowerCase();
|
|
1279
|
-
return [...
|
|
1270
|
+
return [...t].filter((i) => Q.value ? String(i[Q.value]).toLowerCase().includes(g) : Object.values(i).some((e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e).toLowerCase().includes(g) : !1));
|
|
1280
1271
|
}
|
|
1281
|
-
const
|
|
1282
|
-
const
|
|
1283
|
-
return
|
|
1284
|
-
}),
|
|
1285
|
-
function
|
|
1286
|
-
var
|
|
1287
|
-
return ((
|
|
1272
|
+
const j = u(() => {
|
|
1273
|
+
const t = Z(ae.value);
|
|
1274
|
+
return ce(t);
|
|
1275
|
+
}), se = Me(), a = u(() => n.search || !!n.title || !!se.title), E = u(() => n.pagination), C = M(re());
|
|
1276
|
+
function re() {
|
|
1277
|
+
var t;
|
|
1278
|
+
return ((t = n.headers) == null ? void 0 : t.map(
|
|
1288
1279
|
(g) => typeof g == "string" ? { label: g, align: n.headersAlign } : { align: n.headersAlign, thHeaders: g.headers, ...g }
|
|
1289
1280
|
)) ?? [];
|
|
1290
1281
|
}
|
|
1291
|
-
function
|
|
1292
|
-
var
|
|
1293
|
-
return ((
|
|
1282
|
+
function te() {
|
|
1283
|
+
var t;
|
|
1284
|
+
return ((t = n.rows) == null ? void 0 : t.map((g) => {
|
|
1294
1285
|
var i;
|
|
1295
1286
|
return {
|
|
1296
1287
|
selected: (i = n.modelValue) == null ? void 0 : i.includes(n.selectedKey ? g[n.selectedKey] : g),
|
|
@@ -1298,97 +1289,107 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1298
1289
|
};
|
|
1299
1290
|
})) ?? [];
|
|
1300
1291
|
}
|
|
1301
|
-
const
|
|
1302
|
-
function
|
|
1303
|
-
|
|
1292
|
+
const G = M(), H = M();
|
|
1293
|
+
function $e(t) {
|
|
1294
|
+
t === G.value ? H.value = H.value === void 0 ? "DESC" : H.value === "DESC" ? "ASC" : void 0 : H.value = "DESC", G.value = H.value === void 0 ? void 0 : t;
|
|
1304
1295
|
}
|
|
1305
|
-
const
|
|
1306
|
-
get: () =>
|
|
1307
|
-
set:
|
|
1296
|
+
const ve = u({
|
|
1297
|
+
get: () => j.value.every((t) => t.selected) ?? !1,
|
|
1298
|
+
set: Ve
|
|
1308
1299
|
});
|
|
1309
|
-
function
|
|
1310
|
-
for (const g of
|
|
1311
|
-
g.selected =
|
|
1312
|
-
|
|
1300
|
+
function Ve(t) {
|
|
1301
|
+
for (const g of j.value)
|
|
1302
|
+
g.selected = t;
|
|
1303
|
+
pe();
|
|
1313
1304
|
}
|
|
1314
|
-
function
|
|
1315
|
-
|
|
1305
|
+
function be(t, g) {
|
|
1306
|
+
j.value[g].selected = t, pe();
|
|
1316
1307
|
}
|
|
1317
|
-
function
|
|
1318
|
-
|
|
1319
|
-
const g =
|
|
1308
|
+
function pe(t) {
|
|
1309
|
+
t = t ?? he();
|
|
1310
|
+
const g = t != null && t.length ? t : void 0;
|
|
1320
1311
|
L("update:model-value", g);
|
|
1321
1312
|
}
|
|
1322
|
-
function
|
|
1323
|
-
return
|
|
1313
|
+
function he() {
|
|
1314
|
+
return j.value.filter((t) => t.selected).map((t) => n.selectedKey ? t[n.selectedKey] : t);
|
|
1324
1315
|
}
|
|
1325
|
-
return
|
|
1326
|
-
const
|
|
1327
|
-
|
|
1328
|
-
}), (
|
|
1316
|
+
return Te(() => {
|
|
1317
|
+
const t = he();
|
|
1318
|
+
t != null && t.length && pe(t);
|
|
1319
|
+
}), (t, g) => (s(), b(
|
|
1329
1320
|
"div",
|
|
1330
1321
|
{
|
|
1331
|
-
class:
|
|
1322
|
+
class: V(["m-table", { "--has-header": a.value }])
|
|
1332
1323
|
},
|
|
1333
1324
|
[
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1325
|
+
a.value ? (s(), b("div", Gt, [
|
|
1326
|
+
I("div", Jt, [
|
|
1327
|
+
t.title || t.$slots.title ? $(t.$slots, "title", { key: 0 }, () => [
|
|
1328
|
+
I(
|
|
1329
|
+
"span",
|
|
1330
|
+
Xt,
|
|
1331
|
+
J(t.title),
|
|
1332
|
+
1
|
|
1333
|
+
/* TEXT */
|
|
1334
|
+
)
|
|
1335
|
+
], !0) : r("v-if", !0)
|
|
1336
|
+
]),
|
|
1337
|
+
t.search ? (s(), b("div", xt, [
|
|
1338
|
+
t.noSearchBy ? r("v-if", !0) : (s(), k(De, {
|
|
1338
1339
|
key: 0,
|
|
1339
|
-
modelValue:
|
|
1340
|
-
"onUpdate:modelValue": g[0] || (g[0] = (i) =>
|
|
1341
|
-
color:
|
|
1340
|
+
modelValue: Q.value,
|
|
1341
|
+
"onUpdate:modelValue": g[0] || (g[0] = (i) => Q.value = i),
|
|
1342
|
+
color: t.color,
|
|
1342
1343
|
style: { width: "8rem" },
|
|
1343
|
-
placeholder:
|
|
1344
|
-
size:
|
|
1345
|
-
options:
|
|
1344
|
+
placeholder: t.searchByPlaceholder,
|
|
1345
|
+
size: f(S),
|
|
1346
|
+
options: W.value
|
|
1346
1347
|
}, null, 8, ["modelValue", "color", "placeholder", "size", "options"])),
|
|
1347
|
-
|
|
1348
|
+
_(_e, {
|
|
1348
1349
|
modelValue: ee.value,
|
|
1349
1350
|
"onUpdate:modelValue": g[1] || (g[1] = (i) => ee.value = i),
|
|
1350
|
-
size:
|
|
1351
|
-
color:
|
|
1352
|
-
placeholder:
|
|
1353
|
-
"left-icon":
|
|
1351
|
+
size: f(S),
|
|
1352
|
+
color: t.color,
|
|
1353
|
+
placeholder: t.searchPlaceholder,
|
|
1354
|
+
"left-icon": f(qe)
|
|
1354
1355
|
}, null, 8, ["modelValue", "size", "color", "placeholder", "left-icon"])
|
|
1355
1356
|
])) : r("v-if", !0)
|
|
1356
1357
|
])) : r("v-if", !0),
|
|
1357
|
-
|
|
1358
|
+
I(
|
|
1358
1359
|
"table",
|
|
1359
1360
|
{
|
|
1360
|
-
class:
|
|
1361
|
-
style:
|
|
1361
|
+
class: V([{ "--elevation": t.elevation, "--has-layout": t.tableLayout }, t.tableClass]),
|
|
1362
|
+
style: ne(t.tableStyle)
|
|
1362
1363
|
},
|
|
1363
1364
|
[
|
|
1364
|
-
|
|
1365
|
+
t.caption || t.$slots.caption ? (s(), b("caption", el, [
|
|
1365
1366
|
r(`
|
|
1366
1367
|
@slot caption - add caption on top or bottom of the table
|
|
1367
1368
|
`),
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1369
|
+
$(t.$slots, "caption", {}, () => [
|
|
1370
|
+
ue(
|
|
1371
|
+
J(t.caption),
|
|
1371
1372
|
1
|
|
1372
1373
|
/* TEXT */
|
|
1373
1374
|
)
|
|
1374
1375
|
], !0)
|
|
1375
1376
|
])) : r("v-if", !0),
|
|
1376
|
-
|
|
1377
|
+
C.value ? (s(), b("thead", tl, [
|
|
1377
1378
|
r(`
|
|
1378
1379
|
@slot thead - content in thead element
|
|
1379
1380
|
`),
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
default:
|
|
1383
|
-
z.value ? (s(),
|
|
1381
|
+
$(t.$slots, "thead", {}, () => [
|
|
1382
|
+
_(Be, { "no-hoverable": "" }, {
|
|
1383
|
+
default: P(() => [
|
|
1384
|
+
z.value ? (s(), k(Ce, {
|
|
1384
1385
|
key: 0,
|
|
1385
1386
|
align: "left",
|
|
1386
|
-
class:
|
|
1387
|
+
class: V([`--${f(S)}`, "m-table-select-column"])
|
|
1387
1388
|
}, {
|
|
1388
|
-
default:
|
|
1389
|
-
|
|
1390
|
-
modelValue:
|
|
1391
|
-
"onUpdate:modelValue": g[2] || (g[2] = (i) =>
|
|
1389
|
+
default: P(() => [
|
|
1390
|
+
_(Ae, {
|
|
1391
|
+
modelValue: ve.value,
|
|
1392
|
+
"onUpdate:modelValue": g[2] || (g[2] = (i) => ve.value = i),
|
|
1392
1393
|
size: "xs"
|
|
1393
1394
|
}, null, 8, ["modelValue"])
|
|
1394
1395
|
]),
|
|
@@ -1396,28 +1397,28 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1396
1397
|
/* STABLE */
|
|
1397
1398
|
}, 8, ["class"])) : r("v-if", !0),
|
|
1398
1399
|
(s(!0), b(
|
|
1399
|
-
|
|
1400
|
+
ze,
|
|
1400
1401
|
null,
|
|
1401
|
-
|
|
1402
|
-
key:
|
|
1402
|
+
ke(C.value, (i, e) => (s(), k(Ce, {
|
|
1403
|
+
key: e,
|
|
1403
1404
|
scope: i.scope,
|
|
1404
1405
|
align: i.align,
|
|
1405
1406
|
rowspan: i.rowspan,
|
|
1406
1407
|
colspan: i.colspan,
|
|
1407
1408
|
headers: i.thHeaders,
|
|
1408
|
-
style:
|
|
1409
|
-
class:
|
|
1410
|
-
{ "--hidden": i.hidden, "--sortable": i.sortable ??
|
|
1409
|
+
style: ne({ width: i.width, textAlign: i.align }),
|
|
1410
|
+
class: V(["maz-group", [
|
|
1411
|
+
{ "--hidden": i.hidden, "--sortable": i.sortable ?? t.sortable },
|
|
1411
1412
|
i.classes,
|
|
1412
|
-
`--${
|
|
1413
|
+
`--${f(S)}`
|
|
1413
1414
|
]]),
|
|
1414
|
-
onClick: (
|
|
1415
|
+
onClick: (o) => (i.sortable ?? t.sortable) && $e(e)
|
|
1415
1416
|
}, {
|
|
1416
|
-
default:
|
|
1417
|
-
|
|
1417
|
+
default: P(() => [
|
|
1418
|
+
I(
|
|
1418
1419
|
"span",
|
|
1419
1420
|
{
|
|
1420
|
-
class:
|
|
1421
|
+
class: V({ "maz-sr-only": i.srOnly })
|
|
1421
1422
|
},
|
|
1422
1423
|
[
|
|
1423
1424
|
r(`
|
|
@@ -1425,7 +1426,7 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1425
1426
|
@binding {Object} header - header data
|
|
1426
1427
|
@binding {String} label - header label
|
|
1427
1428
|
`),
|
|
1428
|
-
|
|
1429
|
+
$(t.$slots, "header", {
|
|
1429
1430
|
header: i,
|
|
1430
1431
|
label: i.label
|
|
1431
1432
|
}, () => [
|
|
@@ -1434,22 +1435,22 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1434
1435
|
@binding {Object} header - header data
|
|
1435
1436
|
@binding {String} label - header label
|
|
1436
1437
|
`),
|
|
1437
|
-
|
|
1438
|
+
$(t.$slots, `header-label-${i.key}`, {
|
|
1438
1439
|
header: i,
|
|
1439
1440
|
label: i.label
|
|
1440
1441
|
}, () => [
|
|
1441
|
-
|
|
1442
|
-
|
|
1442
|
+
ue(
|
|
1443
|
+
J(i.label),
|
|
1443
1444
|
1
|
|
1444
1445
|
/* TEXT */
|
|
1445
1446
|
)
|
|
1446
1447
|
], !0),
|
|
1447
|
-
i.sortable ??
|
|
1448
|
-
|
|
1449
|
-
class:
|
|
1450
|
-
"--sorted":
|
|
1451
|
-
"--up":
|
|
1452
|
-
"--down":
|
|
1448
|
+
i.sortable ?? t.sortable ? (s(), b("div", ll, [
|
|
1449
|
+
_(f(dt), {
|
|
1450
|
+
class: V(["m-table-sort-icon maz-hidden group-hover:maz-block", {
|
|
1451
|
+
"--sorted": e === G.value,
|
|
1452
|
+
"--up": H.value === "DESC",
|
|
1453
|
+
"--down": H.value === "ASC"
|
|
1453
1454
|
}])
|
|
1454
1455
|
}, null, 8, ["class"])
|
|
1455
1456
|
])) : r("v-if", !0)
|
|
@@ -1465,17 +1466,17 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1465
1466
|
128
|
|
1466
1467
|
/* KEYED_FRAGMENT */
|
|
1467
1468
|
)),
|
|
1468
|
-
|
|
1469
|
+
t.$slots.actions ? (s(), k(Ce, {
|
|
1469
1470
|
key: 1,
|
|
1470
1471
|
align: "left",
|
|
1471
|
-
class:
|
|
1472
|
+
class: V(`--${f(S)}`)
|
|
1472
1473
|
}, {
|
|
1473
|
-
default:
|
|
1474
|
+
default: P(() => [
|
|
1474
1475
|
r(`
|
|
1475
1476
|
@slot actions-header - replace text of actions header
|
|
1476
1477
|
`),
|
|
1477
|
-
|
|
1478
|
-
|
|
1478
|
+
$(t.$slots, "actions-header", {}, () => [
|
|
1479
|
+
ue(" Actions ")
|
|
1479
1480
|
], !0)
|
|
1480
1481
|
]),
|
|
1481
1482
|
_: 3
|
|
@@ -1487,48 +1488,48 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1487
1488
|
})
|
|
1488
1489
|
], !0)
|
|
1489
1490
|
])) : r("v-if", !0),
|
|
1490
|
-
|
|
1491
|
+
t.loading ? (s(), k(Ft, {
|
|
1491
1492
|
key: 2,
|
|
1492
|
-
color:
|
|
1493
|
+
color: t.color,
|
|
1493
1494
|
class: "!maz-absolute"
|
|
1494
1495
|
}, null, 8, ["color"])) : r("v-if", !0),
|
|
1495
|
-
|
|
1496
|
+
I(
|
|
1496
1497
|
"tbody",
|
|
1497
1498
|
{
|
|
1498
|
-
class:
|
|
1499
|
+
class: V({ "--divider": p.value })
|
|
1499
1500
|
},
|
|
1500
1501
|
[
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1502
|
+
$(t.$slots, "default", {}, () => [
|
|
1503
|
+
j.value.length > 0 ? (s(!0), b(
|
|
1504
|
+
ze,
|
|
1504
1505
|
{ key: 0 },
|
|
1505
|
-
|
|
1506
|
-
key:
|
|
1507
|
-
class:
|
|
1508
|
-
onClick: (
|
|
1506
|
+
ke(j.value, (i, e) => (s(), k(Be, {
|
|
1507
|
+
key: e,
|
|
1508
|
+
class: V(i.classes),
|
|
1509
|
+
onClick: (o) => i.action && i.action(i)
|
|
1509
1510
|
}, {
|
|
1510
|
-
default:
|
|
1511
|
-
z.value ? (s(),
|
|
1512
|
-
|
|
1511
|
+
default: P(() => [
|
|
1512
|
+
z.value ? (s(), k(
|
|
1513
|
+
ge,
|
|
1513
1514
|
{
|
|
1514
1515
|
key: 0,
|
|
1515
1516
|
class: "m-table-select-column"
|
|
1516
1517
|
},
|
|
1517
1518
|
{
|
|
1518
|
-
default:
|
|
1519
|
+
default: P(() => [
|
|
1519
1520
|
r(`
|
|
1520
1521
|
@slot select - replace checkbox component
|
|
1521
1522
|
@binding {Object} row - row data
|
|
1522
1523
|
@binding {Boolean} selected - if selected or not
|
|
1523
1524
|
`),
|
|
1524
|
-
|
|
1525
|
+
$(t.$slots, "select", {
|
|
1525
1526
|
row: i,
|
|
1526
1527
|
selected: i.selected
|
|
1527
1528
|
}, () => [
|
|
1528
|
-
|
|
1529
|
+
_(Ae, {
|
|
1529
1530
|
size: "xs",
|
|
1530
1531
|
"model-value": i.selected,
|
|
1531
|
-
"onUpdate:modelValue": (
|
|
1532
|
+
"onUpdate:modelValue": (o) => be(o, e)
|
|
1532
1533
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
1533
1534
|
], !0)
|
|
1534
1535
|
]),
|
|
@@ -1539,35 +1540,35 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1539
1540
|
/* DYNAMIC_SLOTS */
|
|
1540
1541
|
)) : r("v-if", !0),
|
|
1541
1542
|
(s(!0), b(
|
|
1542
|
-
|
|
1543
|
+
ze,
|
|
1543
1544
|
null,
|
|
1544
|
-
|
|
1545
|
-
key:
|
|
1546
|
-
align:
|
|
1547
|
-
class:
|
|
1545
|
+
ke(C.value, ({ key: o, align: d, classes: v }, K) => (s(), k(ge, {
|
|
1546
|
+
key: K,
|
|
1547
|
+
align: d,
|
|
1548
|
+
class: V(v)
|
|
1548
1549
|
}, {
|
|
1549
|
-
default:
|
|
1550
|
+
default: P(() => [
|
|
1550
1551
|
r(`
|
|
1551
1552
|
@slot cell - replace all row cells
|
|
1552
1553
|
@binding {Object} row - row data
|
|
1553
1554
|
@binding {Boolean} value - cell value
|
|
1554
1555
|
`),
|
|
1555
|
-
|
|
1556
|
+
o ? $(t.$slots, "cell", {
|
|
1556
1557
|
key: 0,
|
|
1557
1558
|
row: i,
|
|
1558
|
-
value: i[
|
|
1559
|
+
value: i[o]
|
|
1559
1560
|
}, () => [
|
|
1560
1561
|
r(`
|
|
1561
1562
|
@slot cell-{key} - replace row cells of column
|
|
1562
1563
|
@binding {Object} row - row data
|
|
1563
1564
|
@binding {Boolean} value - cell value
|
|
1564
1565
|
`),
|
|
1565
|
-
|
|
1566
|
+
$(t.$slots, `cell-${o}`, {
|
|
1566
1567
|
row: i,
|
|
1567
|
-
value: i[
|
|
1568
|
+
value: i[o]
|
|
1568
1569
|
}, () => [
|
|
1569
|
-
|
|
1570
|
-
|
|
1570
|
+
ue(
|
|
1571
|
+
J(i[o]),
|
|
1571
1572
|
1
|
|
1572
1573
|
/* TEXT */
|
|
1573
1574
|
)
|
|
@@ -1580,12 +1581,12 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1580
1581
|
128
|
|
1581
1582
|
/* KEYED_FRAGMENT */
|
|
1582
1583
|
)),
|
|
1583
|
-
|
|
1584
|
-
default:
|
|
1584
|
+
t.$slots.actions ? (s(), k(ge, { key: 1 }, {
|
|
1585
|
+
default: P(() => [
|
|
1585
1586
|
r(`
|
|
1586
1587
|
@slot actions - will add actions column
|
|
1587
1588
|
`),
|
|
1588
|
-
|
|
1589
|
+
$(t.$slots, "actions", {}, void 0, !0)
|
|
1589
1590
|
]),
|
|
1590
1591
|
_: 3
|
|
1591
1592
|
/* FORWARDED */
|
|
@@ -1596,22 +1597,22 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1596
1597
|
}, 1032, ["class", "onClick"]))),
|
|
1597
1598
|
128
|
|
1598
1599
|
/* KEYED_FRAGMENT */
|
|
1599
|
-
)) : (s(),
|
|
1600
|
-
default:
|
|
1601
|
-
|
|
1602
|
-
colspan:
|
|
1600
|
+
)) : (s(), k(Be, { key: 1 }, {
|
|
1601
|
+
default: P(() => [
|
|
1602
|
+
_(ge, {
|
|
1603
|
+
colspan: C.value.length + (z.value ? 1 : 0) + (t.$slots.actions ? 1 : 0)
|
|
1603
1604
|
}, {
|
|
1604
|
-
default:
|
|
1605
|
+
default: P(() => [
|
|
1605
1606
|
r(`
|
|
1606
1607
|
@slot no-results - replace no results
|
|
1607
1608
|
`),
|
|
1608
|
-
|
|
1609
|
-
|
|
1609
|
+
$(t.$slots, "no-results", {}, () => [
|
|
1610
|
+
I("p", ol, [
|
|
1610
1611
|
r(`
|
|
1611
1612
|
@slot no-results-text - replace no results test only
|
|
1612
1613
|
`),
|
|
1613
|
-
|
|
1614
|
-
|
|
1614
|
+
$(t.$slots, "no-results-text", {}, () => [
|
|
1615
|
+
ue(" No results ")
|
|
1615
1616
|
], !0)
|
|
1616
1617
|
])
|
|
1617
1618
|
], !0)
|
|
@@ -1632,17 +1633,17 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1632
1633
|
6
|
|
1633
1634
|
/* CLASS, STYLE */
|
|
1634
1635
|
),
|
|
1635
|
-
|
|
1636
|
+
E.value ? (s(), b("div", al, [
|
|
1636
1637
|
nl,
|
|
1637
|
-
|
|
1638
|
-
|
|
1638
|
+
t.pagination ? (s(), b("div", sl, [
|
|
1639
|
+
I("div", rl, [
|
|
1639
1640
|
il,
|
|
1640
|
-
|
|
1641
|
+
_(De, {
|
|
1641
1642
|
modelValue: y.value,
|
|
1642
1643
|
"onUpdate:modelValue": g[3] || (g[3] = (i) => y.value = i),
|
|
1643
|
-
options:
|
|
1644
|
-
size:
|
|
1645
|
-
color:
|
|
1644
|
+
options: R.value,
|
|
1645
|
+
size: f(S),
|
|
1646
|
+
color: t.color,
|
|
1646
1647
|
"list-position": "top",
|
|
1647
1648
|
style: { width: "5rem" }
|
|
1648
1649
|
}, null, 8, ["modelValue", "options", "size", "color"])
|
|
@@ -1650,63 +1651,63 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1650
1651
|
T.value ? (s(), b(
|
|
1651
1652
|
"span",
|
|
1652
1653
|
ul,
|
|
1653
|
-
|
|
1654
|
+
J(B.value) + " - " + J(j.value.length) + " of " + J(T.value),
|
|
1654
1655
|
1
|
|
1655
1656
|
/* TEXT */
|
|
1656
1657
|
)) : r("v-if", !0),
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
disabled:
|
|
1660
|
-
size:
|
|
1658
|
+
I("div", dl, [
|
|
1659
|
+
_(fe, {
|
|
1660
|
+
disabled: B.value === 1,
|
|
1661
|
+
size: f(S),
|
|
1661
1662
|
color: "transparent",
|
|
1662
1663
|
fab: "",
|
|
1663
1664
|
"no-elevation": "",
|
|
1664
|
-
onClick:
|
|
1665
|
+
onClick: N
|
|
1665
1666
|
}, {
|
|
1666
|
-
default:
|
|
1667
|
-
|
|
1667
|
+
default: P(() => [
|
|
1668
|
+
_(f(je), { class: "maz-text-base" })
|
|
1668
1669
|
]),
|
|
1669
1670
|
_: 1
|
|
1670
1671
|
/* STABLE */
|
|
1671
1672
|
}, 8, ["disabled", "size"]),
|
|
1672
|
-
|
|
1673
|
-
disabled:
|
|
1674
|
-
size:
|
|
1673
|
+
_(fe, {
|
|
1674
|
+
disabled: B.value === 1,
|
|
1675
|
+
size: f(S),
|
|
1675
1676
|
color: "transparent",
|
|
1676
1677
|
fab: "",
|
|
1677
1678
|
"no-elevation": "",
|
|
1678
1679
|
onClick: le
|
|
1679
1680
|
}, {
|
|
1680
|
-
default:
|
|
1681
|
-
|
|
1681
|
+
default: P(() => [
|
|
1682
|
+
_(f(Ne), { class: "maz-text-base" })
|
|
1682
1683
|
]),
|
|
1683
1684
|
_: 1
|
|
1684
1685
|
/* STABLE */
|
|
1685
1686
|
}, 8, ["disabled", "size"]),
|
|
1686
|
-
|
|
1687
|
-
disabled:
|
|
1688
|
-
size:
|
|
1687
|
+
_(fe, {
|
|
1688
|
+
disabled: B.value === T.value,
|
|
1689
|
+
size: f(S),
|
|
1689
1690
|
color: "transparent",
|
|
1690
1691
|
fab: "",
|
|
1691
1692
|
"no-elevation": "",
|
|
1692
1693
|
onClick: oe
|
|
1693
1694
|
}, {
|
|
1694
|
-
default:
|
|
1695
|
-
|
|
1695
|
+
default: P(() => [
|
|
1696
|
+
_(f(Ne), { class: "maz-rotate-180 maz-text-base" })
|
|
1696
1697
|
]),
|
|
1697
1698
|
_: 1
|
|
1698
1699
|
/* STABLE */
|
|
1699
1700
|
}, 8, ["disabled", "size"]),
|
|
1700
|
-
|
|
1701
|
-
disabled:
|
|
1702
|
-
size:
|
|
1701
|
+
_(fe, {
|
|
1702
|
+
disabled: B.value === T.value,
|
|
1703
|
+
size: f(S),
|
|
1703
1704
|
color: "transparent",
|
|
1704
1705
|
fab: "",
|
|
1705
1706
|
"no-elevation": "",
|
|
1706
1707
|
onClick: m
|
|
1707
1708
|
}, {
|
|
1708
|
-
default:
|
|
1709
|
-
|
|
1709
|
+
default: P(() => [
|
|
1710
|
+
_(f(je), { class: "maz-rotate-180 maz-text-base" })
|
|
1710
1711
|
]),
|
|
1711
1712
|
_: 1
|
|
1712
1713
|
/* STABLE */
|
|
@@ -1719,9 +1720,9 @@ const Qe = { render: Re }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
1719
1720
|
/* CLASS */
|
|
1720
1721
|
));
|
|
1721
1722
|
}
|
|
1722
|
-
}),
|
|
1723
|
+
}), fl = /* @__PURE__ */ x(cl, [["__scopeId", "data-v-8df44d41"]]);
|
|
1723
1724
|
export {
|
|
1724
|
-
|
|
1725
|
+
fl as M,
|
|
1725
1726
|
x as _,
|
|
1726
|
-
|
|
1727
|
+
Oe as i
|
|
1727
1728
|
};
|