maz-ui 3.47.2-beta.6 → 3.47.2-beta.7
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/MazAccordion.mjs +91 -98
- package/components/MazAnimatedCounter.mjs +26 -26
- package/components/MazCard.mjs +1 -1
- package/components/MazCardSpotlight.mjs +18 -22
- package/components/MazCheckbox.mjs +74 -70
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +48 -48
- package/components/MazExpandAnimation.mjs +22 -25
- package/components/MazGallery.mjs +1 -1
- package/components/MazInputCode.mjs +36 -39
- package/components/MazLoadingBar.mjs +31 -27
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.d.ts +2 -0
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.mjs +31 -36
- package/components/MazSelect.mjs +1 -1
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.mjs +20 -23
- package/components/MazTable.d.ts +6 -0
- package/components/MazTable.mjs +1 -1
- package/components/MazTableCell.d.ts +5 -1
- package/components/MazTableCell.mjs +22 -19
- package/components/MazTableRow.mjs +1 -1
- package/components/MazTableTitle.d.ts +5 -1
- package/components/MazTableTitle.mjs +16 -13
- package/components/MazTabsBar.mjs +1 -1
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazAnimatedCounter.css +1 -1
- package/components/assets/MazCardSpotlight.css +1 -1
- package/components/assets/MazCheckbox.css +1 -1
- package/components/assets/MazChecklist.css +1 -1
- package/components/assets/MazCircularProgressBar.css +1 -1
- package/components/assets/MazExpandAnimation.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInputCode.css +1 -1
- package/components/assets/MazLoadingBar.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazRadio.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazStepper.css +1 -1
- package/components/assets/MazSwitch.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTableCell.css +1 -1
- package/components/assets/MazTableRow.css +1 -1
- package/components/assets/MazTableTitle.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/chunks/{MazBadge-CqppWg2j.mjs → MazBadge-D-0XgPWR.mjs} +1 -1
- package/components/chunks/{MazBtn-BBb9-9O6.mjs → MazBtn-B0Q6Kw8H.mjs} +2 -2
- package/components/chunks/{MazBtn-CfUZ9QSO.mjs → MazBtn-DFLIzh6y.mjs} +2 -2
- package/components/chunks/{MazBtn-Lsac2Q0p.mjs → MazBtn-D_K6k6A7.mjs} +2 -2
- package/components/chunks/{MazBtn-DhEO9uvT.mjs → MazBtn-DnZ_pj-t.mjs} +2 -2
- package/components/chunks/{MazBtn-D7tI764y.mjs → MazBtn-DvfMuN3B.mjs} +2 -2
- package/components/chunks/{MazCard-CAPZoSqv.mjs → MazCard-BkcxQOWL.mjs} +1 -1
- package/components/chunks/{MazCheckbox-BI2um2gY.mjs → MazCheckbox-B9iBXhoG.mjs} +63 -60
- package/components/chunks/{MazCheckbox-DwAd7p8o.mjs → MazCheckbox-BHhDBSbJ.mjs} +63 -58
- package/components/chunks/{MazCheckbox-IhiWZ8D0.mjs → MazCheckbox-BcwWN7iD.mjs} +63 -59
- package/components/chunks/{MazChecklist-Bqd7qTO1.mjs → MazChecklist-DxtYuoEu.mjs} +116 -116
- package/components/chunks/MazExpandAnimation-CUgYZyTw.mjs +54 -0
- package/components/chunks/{MazGallery-CRY5X5zS.mjs → MazGallery-BfdKcDIu.mjs} +39 -42
- package/components/chunks/{MazGallery-CXQiXWFr.mjs → MazGallery-ndO4hRUh.mjs} +38 -41
- package/components/chunks/{MazIcon-D3TB52NM.mjs → MazIcon-DVTWgYB6.mjs} +1 -1
- package/components/chunks/{MazInput-rW-KBJGJ.mjs → MazInput-DnmjeD0Q.mjs} +2 -2
- package/components/chunks/{MazInput-ROgC-JLt.mjs → MazInput-SGx7gJ9r.mjs} +2 -2
- package/components/chunks/MazLoadingBar-CBNuhilE.mjs +36 -0
- package/components/chunks/{MazPhoneNumberInput-Bbr0zHPZ.mjs → MazPhoneNumberInput-rGR80IeJ.mjs} +91 -96
- package/components/chunks/{MazPicker-EMOuyWJy.mjs → MazPicker-CUpQ552W.mjs} +341 -321
- package/components/chunks/{MazPickerMonthSwitcher-DJGgb6BT.mjs → MazPickerMonthSwitcher-duzi8uZ8.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-Cg1uqryw.mjs → MazPickerShortcuts-Coq4ITAj.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-BLUXEs0G.mjs → MazPickerYearSwitcher-vUTntpYE.mjs} +1 -1
- package/components/chunks/{MazSelect-BUETsREx.mjs → MazSelect-DA1D4Aus.mjs} +85 -90
- package/components/chunks/{MazSelect-BDMOrVry.mjs → MazSelect-DpLBpopb.mjs} +40 -45
- package/components/chunks/{MazSpinner--fscjBdL.mjs → MazSpinner-Bbagpn0P.mjs} +1 -1
- package/components/chunks/{MazSpinner-RzOGVi6V.mjs → MazSpinner-Bi3tSdWr.mjs} +1 -1
- package/components/chunks/MazSpinner-Btv2qATX.mjs +34 -0
- package/components/chunks/MazSpinner-CR8HZnWn.mjs +34 -0
- package/components/chunks/{MazSpinner-C0PBSYpC.mjs → MazSpinner-DIPbNESr.mjs} +1 -1
- package/components/chunks/{MazSpinner-C-64WJje.mjs → MazSpinner-a80KrraB.mjs} +1 -1
- package/components/chunks/{MazSpinner-CEgSruvD.mjs → MazSpinner-v0FIBDiy.mjs} +1 -1
- package/components/chunks/MazStepper-DKPl3uIk.mjs +218 -0
- package/components/chunks/{MazTable-CWsaB02U.mjs → MazTable-DBiW_J2i.mjs} +104 -100
- package/components/chunks/MazTableCell-D10vPzyI.mjs +26 -0
- package/components/chunks/{MazTableRow-6KrQQQbm.mjs → MazTableRow-CSxkhwUM.mjs} +8 -8
- package/components/chunks/MazTableTitle-BdRR_MXI.mjs +26 -0
- package/components/chunks/{MazTabsBar-CM-w7V97.mjs → MazTabsBar-BVg2pxLA.mjs} +2 -2
- package/components/chunks/{MazTransitionExpand-BCgH8NZP.mjs → MazTransitionExpand-2Ft7atX1.mjs} +1 -1
- package/css/main.css +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/tailwindcss/variables/colors.ts +2 -0
- package/types/components/MazPicker.vue.d.ts +2 -0
- package/types/components/MazTable.vue.d.ts +6 -0
- package/types/components/MazTableCell.vue.d.ts +5 -1
- package/types/components/MazTableTitle.vue.d.ts +5 -1
- package/types/tailwindcss/variables/colors.d.ts +2 -0
- package/components/chunks/MazExpandAnimation-MDimlZGj.mjs +0 -57
- package/components/chunks/MazLoadingBar-D8a5KF29.mjs +0 -32
- package/components/chunks/MazSpinner-CMMBCwk2.mjs +0 -34
- package/components/chunks/MazSpinner-DebSlkVT.mjs +0 -34
- package/components/chunks/MazStepper-BREfkpUb.mjs +0 -213
- package/components/chunks/MazTableCell-CgiGF3bL.mjs +0 -23
- package/components/chunks/MazTableTitle-C8P3v8b6.mjs +0 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as N,
|
|
2
|
-
import './assets/MazInputCode.css';const
|
|
1
|
+
import { defineComponent as N, ref as z, watch as M, computed as m, openBlock as g, createElementBlock as v, normalizeClass as h, normalizeStyle as P, createElementVNode as y, Fragment as $, renderList as q, mergeProps as D, toDisplayString as E } from "vue";
|
|
2
|
+
import './assets/MazInputCode.css';const F = ["disabled"], K = { class: "m-input-code__wrapper" }, T = ["inputmode", "pattern", "required", "value", "onInput", "onKeydown", "onClick"], O = /* @__PURE__ */ N({
|
|
3
3
|
inheritAttrs: !1,
|
|
4
4
|
__name: "MazInputCode",
|
|
5
5
|
props: {
|
|
@@ -19,12 +19,9 @@ import './assets/MazInputCode.css';const K = ["disabled"], T = { class: "m-input
|
|
|
19
19
|
hint: {}
|
|
20
20
|
},
|
|
21
21
|
emits: ["update:model-value", "completed"],
|
|
22
|
-
setup(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}));
|
|
26
|
-
const n = i, d = p, u = z([]), r = z(/* @__PURE__ */ new Map());
|
|
27
|
-
P(
|
|
22
|
+
setup(c, { emit: p }) {
|
|
23
|
+
const n = c, d = p, u = z([]), r = z(/* @__PURE__ */ new Map());
|
|
24
|
+
M(
|
|
28
25
|
() => n.modelValue,
|
|
29
26
|
(e, t) => {
|
|
30
27
|
e !== t && (r.value = I());
|
|
@@ -34,13 +31,13 @@ import './assets/MazInputCode.css';const K = ["disabled"], T = { class: "m-input
|
|
|
34
31
|
const f = m({
|
|
35
32
|
get: () => r.value,
|
|
36
33
|
set: (e) => {
|
|
37
|
-
const t =
|
|
34
|
+
const t = B(e);
|
|
38
35
|
d("update:model-value", t), (t == null ? void 0 : t.toString().length) === n.codeLength && d("completed");
|
|
39
36
|
}
|
|
40
37
|
});
|
|
41
38
|
function I(e = n.modelValue) {
|
|
42
39
|
const t = /* @__PURE__ */ new Map();
|
|
43
|
-
for (const o of Array.from({ length: n.codeLength }, (a,
|
|
40
|
+
for (const o of Array.from({ length: n.codeLength }, (a, l) => l))
|
|
44
41
|
if (e === void 0)
|
|
45
42
|
t.set(o + 1, void 0);
|
|
46
43
|
else {
|
|
@@ -52,9 +49,9 @@ import './assets/MazInputCode.css';const K = ["disabled"], T = { class: "m-input
|
|
|
52
49
|
function L(e, t) {
|
|
53
50
|
var a;
|
|
54
51
|
const o = w((a = e.target) == null ? void 0 : a.value);
|
|
55
|
-
f.value = r.value.set(t, o), o &&
|
|
52
|
+
f.value = r.value.set(t, o), o && i(t);
|
|
56
53
|
}
|
|
57
|
-
function
|
|
54
|
+
function B(e) {
|
|
58
55
|
const t = [...e.values()].join("");
|
|
59
56
|
return n.type === "text" ? t : t && !Number.isNaN(Number(t)) ? Number(t) : void 0;
|
|
60
57
|
}
|
|
@@ -62,11 +59,11 @@ import './assets/MazInputCode.css';const K = ["disabled"], T = { class: "m-input
|
|
|
62
59
|
var t;
|
|
63
60
|
return (t = n.acceptAlpha ? e.match(/^[\w.]$/) : e.match(/\d+/g)) == null ? void 0 : t.toString();
|
|
64
61
|
}
|
|
65
|
-
function
|
|
62
|
+
function _(e, t) {
|
|
66
63
|
const o = r.value.get(t);
|
|
67
|
-
if (e.key === "ArrowRight" &&
|
|
64
|
+
if (e.key === "ArrowRight" && i(t), e.key === "ArrowLeft" && i(t - 2), e.key === "Backspace" && !o) {
|
|
68
65
|
const a = t - 1 < 0 ? 0 : t - 1;
|
|
69
|
-
f.value = r.value.set(a, void 0),
|
|
66
|
+
f.value = r.value.set(a, void 0), i(a - 1);
|
|
70
67
|
}
|
|
71
68
|
}
|
|
72
69
|
function A(e) {
|
|
@@ -74,23 +71,23 @@ import './assets/MazInputCode.css';const K = ["disabled"], T = { class: "m-input
|
|
|
74
71
|
const t = (a = e.clipboardData) == null ? void 0 : a.getData("text");
|
|
75
72
|
if (!t)
|
|
76
73
|
return;
|
|
77
|
-
const o = Array.from({ length: n.codeLength }, (
|
|
78
|
-
index:
|
|
79
|
-
value: [...t.toString()][
|
|
74
|
+
const o = Array.from({ length: n.codeLength }, (l, s) => ({
|
|
75
|
+
index: s + 1,
|
|
76
|
+
value: [...t.toString()][s] ?? void 0
|
|
80
77
|
}));
|
|
81
|
-
for (const { index:
|
|
82
|
-
const V =
|
|
83
|
-
V && r.value.set(
|
|
78
|
+
for (const { index: l, value: s } of o) {
|
|
79
|
+
const V = s ? w(s) : void 0;
|
|
80
|
+
V && r.value.set(l, V);
|
|
84
81
|
}
|
|
85
82
|
setTimeout(() => {
|
|
86
|
-
const
|
|
87
|
-
|
|
83
|
+
const l = k(), s = l >= n.codeLength ? n.codeLength - 1 : l;
|
|
84
|
+
i(s, !1);
|
|
88
85
|
}, 0);
|
|
89
86
|
}
|
|
90
87
|
function k() {
|
|
91
88
|
return [...r.value.values()].filter(Boolean).length;
|
|
92
89
|
}
|
|
93
|
-
function
|
|
90
|
+
function i(e, t = !0) {
|
|
94
91
|
setTimeout(() => {
|
|
95
92
|
const o = u.value[e];
|
|
96
93
|
e + 1 > n.codeLength || !o || (o.focus(), t && b(e));
|
|
@@ -100,24 +97,24 @@ import './assets/MazInputCode.css';const K = ["disabled"], T = { class: "m-input
|
|
|
100
97
|
const t = u.value[e];
|
|
101
98
|
e + 1 > n.codeLength || !t || t.select();
|
|
102
99
|
}
|
|
103
|
-
const
|
|
100
|
+
const S = m(() => n.error ? "!maz-border-danger" : n.success ? "!maz-border-success" : n.warning ? "!maz-border-warning" : ""), C = m(() => `var(--maz-color-${n.color})`);
|
|
104
101
|
return (e, t) => (g(), v("fieldset", {
|
|
105
102
|
class: h(["m-input-code", [e.size ? `--${e.size}` : void 0, n.class]]),
|
|
106
103
|
disabled: e.disabled,
|
|
107
|
-
style:
|
|
104
|
+
style: P([e.style, { "--input-border-color": C.value }])
|
|
108
105
|
}, [
|
|
109
|
-
y("div",
|
|
106
|
+
y("div", K, [
|
|
110
107
|
(g(!0), v(
|
|
111
|
-
|
|
108
|
+
$,
|
|
112
109
|
null,
|
|
113
|
-
|
|
110
|
+
q(e.codeLength, (o) => (g(), v(
|
|
114
111
|
"div",
|
|
115
112
|
{
|
|
116
113
|
key: o,
|
|
117
|
-
class: h(["input-wrapper",
|
|
114
|
+
class: h(["input-wrapper", S.value])
|
|
118
115
|
},
|
|
119
116
|
[
|
|
120
|
-
y("input",
|
|
117
|
+
y("input", D({
|
|
121
118
|
ref_for: !0,
|
|
122
119
|
ref: (a) => {
|
|
123
120
|
u.value[o - 1] = a;
|
|
@@ -132,10 +129,10 @@ import './assets/MazInputCode.css';const K = ["disabled"], T = { class: "m-input
|
|
|
132
129
|
}, e.$attrs, {
|
|
133
130
|
value: f.value.get(o),
|
|
134
131
|
onInput: (a) => L(a, o),
|
|
135
|
-
onKeydown: (a) =>
|
|
132
|
+
onKeydown: (a) => _(a, o),
|
|
136
133
|
onClick: (a) => b(o - 1),
|
|
137
134
|
onPaste: A
|
|
138
|
-
}), null, 16,
|
|
135
|
+
}), null, 16, T)
|
|
139
136
|
],
|
|
140
137
|
2
|
|
141
138
|
/* CLASS */
|
|
@@ -153,18 +150,18 @@ import './assets/MazInputCode.css';const K = ["disabled"], T = { class: "m-input
|
|
|
153
150
|
"--warning": e.warning
|
|
154
151
|
}])
|
|
155
152
|
},
|
|
156
|
-
|
|
153
|
+
E(e.hint),
|
|
157
154
|
3
|
|
158
155
|
/* TEXT, CLASS */
|
|
159
156
|
)
|
|
160
|
-
], 14,
|
|
157
|
+
], 14, F));
|
|
161
158
|
}
|
|
162
|
-
}),
|
|
163
|
-
const n =
|
|
159
|
+
}), W = (c, p) => {
|
|
160
|
+
const n = c.__vccOpts || c;
|
|
164
161
|
for (const [d, u] of p)
|
|
165
162
|
n[d] = u;
|
|
166
163
|
return n;
|
|
167
|
-
},
|
|
164
|
+
}, R = /* @__PURE__ */ W(O, [["__scopeId", "data-v-594f962b"]]);
|
|
168
165
|
export {
|
|
169
|
-
|
|
166
|
+
R as default
|
|
170
167
|
};
|
|
@@ -1,36 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import './assets/MazLoadingBar.css';const
|
|
1
|
+
import { defineComponent as t, computed as n, openBlock as c, createElementBlock as i, normalizeStyle as d, createElementVNode as s } from "vue";
|
|
2
|
+
import './assets/MazLoadingBar.css';const m = /* @__PURE__ */ t({
|
|
3
3
|
__name: "MazLoadingBar",
|
|
4
4
|
props: {
|
|
5
5
|
color: { default: "primary" },
|
|
6
6
|
height: { default: "0.125rem" }
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
n((
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"943cd45e": o.value.main
|
|
8
|
+
setup(o) {
|
|
9
|
+
const r = o, a = n(() => ({
|
|
10
|
+
alpha: `var(--maz-color-${r.color}-alpha-20)`,
|
|
11
|
+
main: `var(--maz-color-${r.color})`
|
|
13
12
|
}));
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
return (l, e) => (c(), i(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
class: "m-loading-bar",
|
|
17
|
+
style: d([{ "--loading-bar-height": l.height, "--loading-bar-color": a.value.alpha, "--loading-bar-main-color": a.value.main }])
|
|
18
|
+
},
|
|
19
|
+
e[0] || (e[0] = [
|
|
20
|
+
s(
|
|
21
|
+
"div",
|
|
22
|
+
null,
|
|
23
|
+
null,
|
|
24
|
+
-1
|
|
25
|
+
/* HOISTED */
|
|
26
|
+
)
|
|
27
|
+
]),
|
|
28
|
+
4
|
|
29
|
+
/* STYLE */
|
|
30
|
+
));
|
|
27
31
|
}
|
|
28
|
-
}),
|
|
29
|
-
const
|
|
30
|
-
for (const [
|
|
31
|
-
|
|
32
|
-
return
|
|
33
|
-
},
|
|
32
|
+
}), p = (o, r) => {
|
|
33
|
+
const a = o.__vccOpts || o;
|
|
34
|
+
for (const [l, e] of r)
|
|
35
|
+
a[l] = e;
|
|
36
|
+
return a;
|
|
37
|
+
}, g = /* @__PURE__ */ p(m, [["__scopeId", "data-v-ada02d7b"]]);
|
|
34
38
|
export {
|
|
35
|
-
|
|
39
|
+
g as default
|
|
36
40
|
};
|
|
@@ -3,6 +3,8 @@ import type { Color, Position } from './types';
|
|
|
3
3
|
import { type HTMLAttributes } from 'vue';
|
|
4
4
|
export type { Color, PickerShortcut, PickerValue, Position };
|
|
5
5
|
export interface Props {
|
|
6
|
+
/** The id of the component */
|
|
7
|
+
id?: string;
|
|
6
8
|
/** The style of the component */
|
|
7
9
|
style?: HTMLAttributes['style'];
|
|
8
10
|
/** The class of the component */
|
package/components/MazPicker.mjs
CHANGED
package/components/MazRadio.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useId as S, computed as l, defineComponent as B,
|
|
2
|
-
import './assets/MazRadio.css';function
|
|
3
|
-
componentName:
|
|
1
|
+
import { useId as S, computed as l, defineComponent as B, ref as $, openBlock as m, createElementBlock as v, unref as f, normalizeClass as p, normalizeStyle as E, createElementVNode as i, mergeProps as I, renderSlot as V, createTextVNode as C, toDisplayString as b, createCommentVNode as R } from "vue";
|
|
2
|
+
import './assets/MazRadio.css';function N({
|
|
3
|
+
componentName: r,
|
|
4
4
|
providedId: s
|
|
5
5
|
}) {
|
|
6
6
|
const a = S();
|
|
7
|
-
return l(() => s ?? `${
|
|
7
|
+
return l(() => s ?? `${r}-${a}`);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const M = ["for", "aria-checked"], D = ["id", "value", "disabled", "name", "checked"], _ = { class: "m-radio__text" }, q = /* @__PURE__ */ B({
|
|
10
10
|
__name: "MazRadio",
|
|
11
11
|
props: {
|
|
12
12
|
style: { default: void 0 },
|
|
@@ -25,13 +25,8 @@ const _ = ["for", "aria-checked"], D = ["id", "value", "disabled", "name", "chec
|
|
|
25
25
|
hint: {}
|
|
26
26
|
},
|
|
27
27
|
emits: ["update:model-value", "change", "blur", "focus"],
|
|
28
|
-
setup(
|
|
29
|
-
|
|
30
|
-
"172f8336": h.value,
|
|
31
|
-
"5ca6ddf3": y.value,
|
|
32
|
-
"094f34b6": g.value
|
|
33
|
-
}));
|
|
34
|
-
const a = o, n = s, t = M({
|
|
28
|
+
setup(r, { emit: s }) {
|
|
29
|
+
const a = r, n = s, t = N({
|
|
35
30
|
componentName: "MazRadio",
|
|
36
31
|
providedId: a.id
|
|
37
32
|
}), d = l(() => a.modelValue === a.value), h = l(() => {
|
|
@@ -56,30 +51,30 @@ const _ = ["for", "aria-checked"], D = ["id", "value", "disabled", "name", "chec
|
|
|
56
51
|
function c() {
|
|
57
52
|
n("update:model-value", a.value), n("change", a.value);
|
|
58
53
|
}
|
|
59
|
-
const
|
|
54
|
+
const u = $();
|
|
60
55
|
function w(e) {
|
|
61
|
-
var
|
|
62
|
-
(
|
|
56
|
+
var o;
|
|
57
|
+
(o = u.value) == null || o.dispatchEvent(new Event("blur")), n("blur", e);
|
|
63
58
|
}
|
|
64
59
|
function k(e) {
|
|
65
|
-
var
|
|
66
|
-
(
|
|
60
|
+
var o;
|
|
61
|
+
(o = u.value) == null || o.dispatchEvent(new Event("focus")), n("focus", e);
|
|
67
62
|
}
|
|
68
|
-
return (e,
|
|
69
|
-
for:
|
|
63
|
+
return (e, o) => (m(), v("label", {
|
|
64
|
+
for: f(t),
|
|
70
65
|
class: p(["m-radio", [{ "--disabled": e.disabled, "--selected": d.value, "--error": e.error, "--warning": e.warning, "--success": e.success }, a.class]]),
|
|
71
66
|
tabindex: "0",
|
|
72
67
|
role: "radio",
|
|
73
|
-
style:
|
|
68
|
+
style: E([e.style, { "--radio-size": h.value, "--radio-selected-color": y.value, "--radio-box-shadow": g.value }]),
|
|
74
69
|
"aria-checked": d.value,
|
|
75
70
|
onBlur: w,
|
|
76
71
|
onFocus: k,
|
|
77
72
|
onKeydown: z
|
|
78
73
|
}, [
|
|
79
|
-
|
|
80
|
-
id:
|
|
74
|
+
i("input", I({
|
|
75
|
+
id: f(t),
|
|
81
76
|
ref_key: "inputRef",
|
|
82
|
-
ref:
|
|
77
|
+
ref: u,
|
|
83
78
|
value: e.value
|
|
84
79
|
}, e.$attrs, {
|
|
85
80
|
tabindex: "-1",
|
|
@@ -87,29 +82,29 @@ const _ = ["for", "aria-checked"], D = ["id", "value", "disabled", "name", "chec
|
|
|
87
82
|
name: e.name,
|
|
88
83
|
type: "radio",
|
|
89
84
|
checked: d.value,
|
|
90
|
-
onChange:
|
|
85
|
+
onChange: o[0] || (o[0] = (H) => c())
|
|
91
86
|
}), null, 16, D),
|
|
92
|
-
|
|
87
|
+
o[1] || (o[1] = i(
|
|
93
88
|
"span",
|
|
94
89
|
null,
|
|
95
90
|
[
|
|
96
|
-
|
|
91
|
+
i("span", { class: "round" })
|
|
97
92
|
],
|
|
98
93
|
-1
|
|
99
94
|
/* HOISTED */
|
|
100
95
|
)),
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
i("div", _, [
|
|
97
|
+
V(e.$slots, "default", {
|
|
103
98
|
isSelected: d.value,
|
|
104
99
|
value: e.value
|
|
105
100
|
}, () => [
|
|
106
|
-
|
|
101
|
+
C(
|
|
107
102
|
b(e.label),
|
|
108
103
|
1
|
|
109
104
|
/* TEXT */
|
|
110
105
|
)
|
|
111
106
|
], !0),
|
|
112
|
-
e.hint ? (m(),
|
|
107
|
+
e.hint ? (m(), v(
|
|
113
108
|
"span",
|
|
114
109
|
{
|
|
115
110
|
key: 0,
|
|
@@ -122,16 +117,16 @@ const _ = ["for", "aria-checked"], D = ["id", "value", "disabled", "name", "chec
|
|
|
122
117
|
b(e.hint),
|
|
123
118
|
3
|
|
124
119
|
/* TEXT, CLASS */
|
|
125
|
-
)) :
|
|
120
|
+
)) : R("v-if", !0)
|
|
126
121
|
])
|
|
127
|
-
], 46,
|
|
122
|
+
], 46, M));
|
|
128
123
|
}
|
|
129
|
-
}),
|
|
130
|
-
const a =
|
|
124
|
+
}), F = (r, s) => {
|
|
125
|
+
const a = r.__vccOpts || r;
|
|
131
126
|
for (const [n, t] of s)
|
|
132
127
|
a[n] = t;
|
|
133
128
|
return a;
|
|
134
|
-
},
|
|
129
|
+
}, O = /* @__PURE__ */ F(q, [["__scopeId", "data-v-016d293e"]]);
|
|
135
130
|
export {
|
|
136
|
-
|
|
131
|
+
O as default
|
|
137
132
|
};
|
package/components/MazSelect.mjs
CHANGED
package/components/MazSwitch.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { useId as k, computed as b, defineComponent as V,
|
|
2
|
-
import './assets/MazSwitch.css';function
|
|
1
|
+
import { useId as k, computed as b, defineComponent as V, ref as B, openBlock as i, createElementBlock as r, unref as c, normalizeClass as m, normalizeStyle as z, createElementVNode as f, mergeProps as C, renderSlot as E, createTextVNode as S, toDisplayString as p, createCommentVNode as h } from "vue";
|
|
2
|
+
import './assets/MazSwitch.css';function $({
|
|
3
3
|
componentName: n,
|
|
4
|
-
providedId:
|
|
4
|
+
providedId: t
|
|
5
5
|
}) {
|
|
6
6
|
const a = k();
|
|
7
|
-
return b(() =>
|
|
7
|
+
return b(() => t ?? `${n}-${a}`);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const I = ["for", "aria-checked"], N = ["id", "name", "checked", "aria-label", "disabled"], D = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "m-switch__text"
|
|
12
|
-
},
|
|
12
|
+
}, R = /* @__PURE__ */ V({
|
|
13
13
|
inheritAttrs: !1,
|
|
14
14
|
__name: "MazSwitch",
|
|
15
15
|
props: {
|
|
@@ -27,43 +27,40 @@ const N = ["for", "aria-checked"], D = ["id", "name", "checked", "aria-label", "
|
|
|
27
27
|
hint: {}
|
|
28
28
|
},
|
|
29
29
|
emits: ["update:model-value", "change", "blur", "focus"],
|
|
30
|
-
setup(n, { emit:
|
|
31
|
-
|
|
32
|
-
"5d846531": v.value
|
|
33
|
-
}));
|
|
34
|
-
const a = n, o = s, d = I({
|
|
30
|
+
setup(n, { emit: t }) {
|
|
31
|
+
const a = n, o = t, d = $({
|
|
35
32
|
componentName: "MazSwitch",
|
|
36
33
|
providedId: a.id
|
|
37
34
|
}), v = b(() => a.color === "theme" ? "var(--maz-color-bg-theme)" : `var(--maz-color-${a.color}-alpha)`);
|
|
38
35
|
function u() {
|
|
39
36
|
o("update:model-value", !a.modelValue), o("change", !a.modelValue);
|
|
40
37
|
}
|
|
41
|
-
const
|
|
38
|
+
const s = B();
|
|
42
39
|
function y(e) {
|
|
43
40
|
["Space"].includes(e.code) && (e.preventDefault(), u());
|
|
44
41
|
}
|
|
45
42
|
function w(e) {
|
|
46
43
|
var l;
|
|
47
|
-
(l =
|
|
44
|
+
(l = s.value) == null || l.dispatchEvent(new Event("blur")), o("blur", e);
|
|
48
45
|
}
|
|
49
46
|
function g(e) {
|
|
50
47
|
var l;
|
|
51
|
-
(l =
|
|
48
|
+
(l = s.value) == null || l.dispatchEvent(new Event("focus")), o("focus", e);
|
|
52
49
|
}
|
|
53
50
|
return (e, l) => (i(), r("label", {
|
|
54
51
|
for: c(d),
|
|
55
52
|
class: m(["m-switch", [{ "--is-disabled": e.disabled }, a.class]]),
|
|
56
53
|
role: "switch",
|
|
57
|
-
style: z(e.style),
|
|
54
|
+
style: z([e.style, { "--switch-color": v.value }]),
|
|
58
55
|
"aria-checked": e.modelValue,
|
|
59
56
|
tabindex: "0",
|
|
60
57
|
onBlur: w,
|
|
61
58
|
onFocus: g,
|
|
62
59
|
onKeydown: y
|
|
63
60
|
}, [
|
|
64
|
-
f("input",
|
|
61
|
+
f("input", C({ id: c(d) }, e.$attrs, {
|
|
65
62
|
ref_key: "inputRef",
|
|
66
|
-
ref:
|
|
63
|
+
ref: s,
|
|
67
64
|
type: "checkbox",
|
|
68
65
|
name: e.name,
|
|
69
66
|
tabindex: "-1",
|
|
@@ -72,7 +69,7 @@ const N = ["for", "aria-checked"], D = ["id", "name", "checked", "aria-label", "
|
|
|
72
69
|
disabled: e.disabled,
|
|
73
70
|
class: "m-switch__input",
|
|
74
71
|
onChange: u
|
|
75
|
-
}), null, 16,
|
|
72
|
+
}), null, 16, N),
|
|
76
73
|
l[0] || (l[0] = f(
|
|
77
74
|
"span",
|
|
78
75
|
{ class: "m-switch__toggle" },
|
|
@@ -80,9 +77,9 @@ const N = ["for", "aria-checked"], D = ["id", "name", "checked", "aria-label", "
|
|
|
80
77
|
-1
|
|
81
78
|
/* HOISTED */
|
|
82
79
|
)),
|
|
83
|
-
e.$slots.default || e.label || e.hint ? (i(), r("span",
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
e.$slots.default || e.label || e.hint ? (i(), r("span", D, [
|
|
81
|
+
E(e.$slots, "default", { value: e.modelValue }, () => [
|
|
82
|
+
S(
|
|
86
83
|
p(e.label),
|
|
87
84
|
1
|
|
88
85
|
/* TEXT */
|
|
@@ -103,9 +100,9 @@ const N = ["for", "aria-checked"], D = ["id", "name", "checked", "aria-label", "
|
|
|
103
100
|
/* TEXT, CLASS */
|
|
104
101
|
)) : h("v-if", !0)
|
|
105
102
|
])) : h("v-if", !0)
|
|
106
|
-
], 46,
|
|
103
|
+
], 46, I));
|
|
107
104
|
}
|
|
108
105
|
});
|
|
109
106
|
export {
|
|
110
|
-
|
|
107
|
+
R as default
|
|
111
108
|
};
|
package/components/MazTable.d.ts
CHANGED
|
@@ -130,12 +130,18 @@ export interface MazTableProps<T extends Row<T>> {
|
|
|
130
130
|
* @default 'lg'
|
|
131
131
|
*/
|
|
132
132
|
roundedSize?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
133
|
+
/**
|
|
134
|
+
* Enable truncate on cells
|
|
135
|
+
* @default `true`
|
|
136
|
+
*/
|
|
137
|
+
truncate?: boolean;
|
|
133
138
|
}
|
|
134
139
|
export interface MazTableProvide {
|
|
135
140
|
size: Ref<Size>;
|
|
136
141
|
hoverable: Ref<boolean>;
|
|
137
142
|
backgroundEven: Ref<boolean>;
|
|
138
143
|
backgroundOdd: Ref<boolean>;
|
|
144
|
+
truncate: Ref<boolean>;
|
|
139
145
|
}
|
|
140
146
|
declare const _default: <T extends Row<T>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
141
147
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
package/components/MazTable.mjs
CHANGED
|
@@ -6,7 +6,11 @@ declare function __VLS_template(): {
|
|
|
6
6
|
attrs: Partial<{}>;
|
|
7
7
|
};
|
|
8
8
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
-
declare const __VLS_component: import("vue").DefineComponent<{
|
|
9
|
+
declare const __VLS_component: import("vue").DefineComponent<{
|
|
10
|
+
truncate?: boolean;
|
|
11
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
12
|
+
truncate?: boolean;
|
|
13
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
14
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
11
15
|
export default _default;
|
|
12
16
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import './assets/MazTableCell.css';function
|
|
3
|
-
const
|
|
4
|
-
if (!
|
|
5
|
-
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${
|
|
6
|
-
return
|
|
1
|
+
import { inject as o, defineComponent as c, computed as l, openBlock as s, createElementBlock as u, normalizeClass as i, unref as d, renderSlot as p } from "vue";
|
|
2
|
+
import './assets/MazTableCell.css';function f(e, a) {
|
|
3
|
+
const t = o(e, a);
|
|
4
|
+
if (!t)
|
|
5
|
+
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${e}`);
|
|
6
|
+
return t;
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const m = /* @__PURE__ */ c({
|
|
9
9
|
__name: "MazTableCell",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
props: {
|
|
11
|
+
truncate: { type: Boolean, default: !0 }
|
|
12
|
+
},
|
|
13
|
+
setup(e) {
|
|
14
|
+
const { size: a, truncate: t } = f("maz-table"), n = l(() => e.truncate || t.value);
|
|
15
|
+
return (r, v) => (s(), u(
|
|
13
16
|
"td",
|
|
14
17
|
{
|
|
15
|
-
class: i(["m-table-cell", `--${
|
|
18
|
+
class: i(["m-table-cell", [`--${d(a)}`, { "--truncate": n.value }]])
|
|
16
19
|
},
|
|
17
20
|
[
|
|
18
|
-
|
|
21
|
+
p(r.$slots, "default", {}, void 0, !0)
|
|
19
22
|
],
|
|
20
23
|
2
|
|
21
24
|
/* CLASS */
|
|
22
25
|
));
|
|
23
26
|
}
|
|
24
|
-
}),
|
|
25
|
-
const
|
|
26
|
-
for (const [
|
|
27
|
-
|
|
28
|
-
return
|
|
29
|
-
},
|
|
27
|
+
}), _ = (e, a) => {
|
|
28
|
+
const t = e.__vccOpts || e;
|
|
29
|
+
for (const [n, r] of a)
|
|
30
|
+
t[n] = r;
|
|
31
|
+
return t;
|
|
32
|
+
}, b = /* @__PURE__ */ _(m, [["__scopeId", "data-v-7a2d23aa"]]);
|
|
30
33
|
export {
|
|
31
|
-
|
|
34
|
+
b as default
|
|
32
35
|
};
|
|
@@ -6,7 +6,11 @@ declare function __VLS_template(): {
|
|
|
6
6
|
attrs: Partial<{}>;
|
|
7
7
|
};
|
|
8
8
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
-
declare const __VLS_component: import("vue").DefineComponent<{
|
|
9
|
+
declare const __VLS_component: import("vue").DefineComponent<{
|
|
10
|
+
truncate?: boolean;
|
|
11
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
12
|
+
truncate?: boolean;
|
|
13
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
14
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
11
15
|
export default _default;
|
|
12
16
|
type __VLS_WithTemplateSlots<T, S> = T & {
|