maz-ui 3.47.2-beta.6 → 3.47.2-beta.8
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/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCardSpotlight.mjs +18 -22
- package/components/MazCarousel.mjs +1 -1
- package/components/MazCheckbox.mjs +74 -70
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +48 -48
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +1 -1
- package/components/MazExpandAnimation.mjs +22 -25
- package/components/MazGallery.mjs +1 -1
- package/components/MazIcon.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.mjs +36 -39
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLink.mjs +1 -1
- package/components/MazLoadingBar.mjs +31 -27
- package/components/MazPagination.mjs +1 -1
- 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 +3 -2
- package/components/MazTableCell.mjs +12 -12
- package/components/MazTableRow.mjs +16 -16
- package/components/MazTableTitle.mjs +18 -18
- package/components/MazTabsBar.mjs +1 -1
- package/components/MazTabsContent.mjs +4 -4
- package/components/MazTabsContentItem.mjs +7 -7
- 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/MazDropdown.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-qdgVtKdQ.mjs} +1 -1
- package/components/chunks/{MazBottomSheet-C9GWCGys.mjs → MazBottomSheet-DX3dl16f.mjs} +1 -1
- package/components/chunks/{MazBtn-CMyQNKuk.mjs → MazBtn-B1DhLzSq.mjs} +2 -2
- package/components/chunks/{MazBtn-DA2lg-5s.mjs → MazBtn-B6xyipje.mjs} +1 -1
- package/components/chunks/{MazBtn-D7tI764y.mjs → MazBtn-BE_bHLkT.mjs} +2 -2
- package/components/chunks/MazBtn-Blj3kViZ.mjs +105 -0
- package/components/chunks/{MazBtn-BBb9-9O6.mjs → MazBtn-BtmrmjP3.mjs} +2 -2
- package/components/chunks/{MazBtn-CfUZ9QSO.mjs → MazBtn-C0fZIwfM.mjs} +2 -2
- package/components/chunks/MazBtn-CFf5L0DS.mjs +105 -0
- package/components/chunks/MazBtn-CiiCndWt.mjs +105 -0
- package/components/chunks/{MazBtn-DHfi8M3z.mjs → MazBtn-DMcVZ1r9.mjs} +2 -2
- package/components/chunks/{MazBtn-DZb-6vcl.mjs → MazBtn-DWVb9GQ3.mjs} +1 -1
- package/components/chunks/{MazBtn-VU3XSEv8.mjs → MazBtn-DanmhP4R.mjs} +1 -1
- package/components/chunks/{MazBtn-DKyz5Hc0.mjs → MazBtn-DzheqNTG.mjs} +2 -2
- package/components/chunks/MazBtn-FtH-ADjY.mjs +105 -0
- package/components/chunks/{MazBtn-DER-sPjl.mjs → MazBtn-pNpaQRRG.mjs} +2 -2
- package/components/chunks/{MazCard-CAPZoSqv.mjs → MazCard-DMDzDjHR.mjs} +1 -1
- package/components/chunks/{MazCarousel-CSv4VpC9.mjs → MazCarousel-BjBQQBFN.mjs} +1 -1
- package/components/chunks/{MazCheckbox-DwAd7p8o.mjs → MazCheckbox-9R4fuM8t.mjs} +63 -58
- package/components/chunks/{MazCheckbox-IhiWZ8D0.mjs → MazCheckbox-DXcpsRU4.mjs} +63 -59
- package/components/chunks/{MazCheckbox-BI2um2gY.mjs → MazCheckbox-Dgn0lw5f.mjs} +63 -60
- package/components/chunks/{MazChecklist-Bqd7qTO1.mjs → MazChecklist-D_IebAis.mjs} +116 -116
- package/components/chunks/{MazDialog-xPCkmhrE.mjs → MazDialog-Cyo_BtT4.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-dIHWE8dO.mjs → MazDialogPromise-CHyri_Q5.mjs} +2 -2
- package/components/chunks/{MazDropdown-7WqbXnPN.mjs → MazDropdown-urkh4dW3.mjs} +87 -103
- package/components/chunks/MazExpandAnimation-CWDhei53.mjs +54 -0
- package/components/chunks/{MazGallery-CRY5X5zS.mjs → MazGallery-DNN_xBeg.mjs} +39 -42
- package/components/chunks/{MazGallery-CXQiXWFr.mjs → MazGallery-ndO4hRUh.mjs} +38 -41
- package/components/chunks/{MazIcon-BbvBov5G.mjs → MazIcon-B4CDdmqe.mjs} +1 -1
- package/components/chunks/{MazIcon-DjMuw8Bz.mjs → MazIcon-B7Mn8F75.mjs} +1 -1
- package/components/chunks/MazIcon-BK45d_-V.mjs +4 -0
- package/components/chunks/{MazIcon-D3TB52NM.mjs → MazIcon-BSgK89NE.mjs} +1 -1
- package/components/chunks/{MazInput-DG-grU7m.mjs → MazInput-CyWYuOsl.mjs} +1 -1
- package/components/chunks/{MazInput-ROgC-JLt.mjs → MazInput-DFDzf7C1.mjs} +2 -2
- package/components/chunks/{MazInput-rW-KBJGJ.mjs → MazInput-LS_VhQAg.mjs} +2 -2
- package/components/chunks/{MazInputNumber-DoeT5Lcu.mjs → MazInputNumber-qQ6MrK-y.mjs} +2 -2
- package/components/chunks/{MazInputPrice-CZiypHp3.mjs → MazInputPrice-C207E4RH.mjs} +1 -1
- package/components/chunks/{MazInputTags-DGAglIQb.mjs → MazInputTags-a57ZPojk.mjs} +2 -2
- package/components/chunks/{MazLink-yKgOtTlk.mjs → MazLink-Ch-w_Lf_.mjs} +1 -1
- package/components/chunks/MazLoadingBar-rusnhtnI.mjs +36 -0
- package/components/chunks/{MazPagination-eJFyS5Nn.mjs → MazPagination-CJEC7Y4E.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-Bbr0zHPZ.mjs → MazPhoneNumberInput-BUe2kgX6.mjs} +92 -97
- package/components/chunks/{MazPicker-EMOuyWJy.mjs → MazPicker-DteyWEwr.mjs} +279 -277
- package/components/chunks/{MazPickerMonthSwitcher-DJGgb6BT.mjs → MazPickerMonthSwitcher-D46P6nV5.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-Cg1uqryw.mjs → MazPickerShortcuts-C50DAlfT.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-BLUXEs0G.mjs → MazPickerYearSwitcher-5EW9ebYR.mjs} +1 -1
- package/components/chunks/{MazSelect-BUETsREx.mjs → MazSelect-C0rk6m_5.mjs} +85 -90
- package/components/chunks/{MazSelect-BDMOrVry.mjs → MazSelect-CJnsMuMG.mjs} +40 -45
- package/components/chunks/MazSpinner-B2mZYoLS.mjs +34 -0
- package/components/chunks/{MazSpinner-CQpzVTYF.mjs → MazSpinner-BxlN_quv.mjs} +1 -1
- package/components/chunks/{MazSpinner-CLlK6hHp.mjs → MazSpinner-CAR4Mm9l.mjs} +1 -1
- package/components/chunks/{MazSpinner-C0PBSYpC.mjs → MazSpinner-CQAyxmwJ.mjs} +1 -1
- package/components/chunks/{MazSpinner-BODHZQ9h.mjs → MazSpinner-CbuG6vB-.mjs} +1 -1
- package/components/chunks/MazSpinner-Cef473zM.mjs +34 -0
- package/components/chunks/{MazSpinner--fscjBdL.mjs → MazSpinner-CkOG2EM9.mjs} +1 -1
- package/components/chunks/MazSpinner-CksMqwXP.mjs +34 -0
- package/components/chunks/{MazSpinner-BdOKUqKA.mjs → MazSpinner-CqpyUTWh.mjs} +1 -1
- package/components/chunks/MazSpinner-CtZfuEKt.mjs +34 -0
- package/components/chunks/{MazSpinner-DJM02T-b.mjs → MazSpinner-CyvYTwaV.mjs} +1 -1
- package/components/chunks/{MazSpinner-CEgSruvD.mjs → MazSpinner-DCBUvJ_o.mjs} +1 -1
- package/components/chunks/MazSpinner-DPdh6vtw.mjs +34 -0
- package/components/chunks/MazSpinner-D_6j7BO6.mjs +34 -0
- package/components/chunks/{MazSpinner-B8vOa-3i.mjs → MazSpinner-DqZc3-_U.mjs} +1 -1
- package/components/chunks/MazSpinner-XikQHrkW.mjs +34 -0
- package/components/chunks/{MazSpinner-C-64WJje.mjs → MazSpinner-a80KrraB.mjs} +1 -1
- package/components/chunks/MazSpinner-q-AqkAjI.mjs +34 -0
- package/components/chunks/MazStepper-BWyXIppj.mjs +218 -0
- package/components/chunks/{MazTable-CWsaB02U.mjs → MazTable-BpIXKltC.mjs} +85 -81
- package/components/chunks/MazTableCell-DQAaVtw4.mjs +23 -0
- package/components/chunks/MazTableRow-CN415w3y.mjs +30 -0
- package/components/chunks/{MazTableTitle-C8P3v8b6.mjs → MazTableTitle-DbCN1l2O.mjs} +4 -4
- package/components/chunks/{MazTabsBar-CM-w7V97.mjs → MazTabsBar-jlclO5zk.mjs} +61 -77
- package/components/chunks/{MazTransitionExpand-BCgH8NZP.mjs → MazTransitionExpand-B2jKLvyg.mjs} +1 -1
- package/components/chunks/{inject-strict-BmiaNiwC.mjs → inject-strict-DEDSuzCz.mjs} +3 -3
- package/css/main.css +1 -1
- package/modules/chunks/{MazBtn-SZHtOzgz.cjs → MazBtn-BLjl_mR0.cjs} +1 -1
- package/modules/chunks/{MazBtn-y5LW9A2T.mjs → MazBtn-D6K3B6XM.mjs} +2 -2
- package/modules/chunks/{MazIcon-BpVDZGXl.cjs → MazIcon--UTNvIe4.cjs} +1 -1
- package/modules/chunks/{MazIcon-Dj66ziAh.mjs → MazIcon-BRGZkufX.mjs} +1 -1
- package/modules/chunks/{MazSpinner-uMrdk_99.mjs → MazSpinner-9EkSWhvP.mjs} +1 -1
- package/modules/chunks/{MazSpinner-CPT6UF2e.cjs → MazSpinner-B82Q3oFJ.cjs} +1 -1
- package/modules/chunks/{index-BG6gPie5.mjs → index-7UZ6u--K.mjs} +5 -5
- package/modules/chunks/index-fosopmwd.cjs +124 -0
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +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/modules/helpers/inject-strict.d.ts +2 -1
- package/types/tailwindcss/variables/colors.d.ts +2 -0
- package/components/chunks/MazBtn-DhEO9uvT.mjs +0 -105
- package/components/chunks/MazBtn-DpFjxnMy.mjs +0 -105
- package/components/chunks/MazBtn-IPfW92RY.mjs +0 -105
- package/components/chunks/MazBtn-Lsac2Q0p.mjs +0 -105
- package/components/chunks/MazExpandAnimation-MDimlZGj.mjs +0 -57
- package/components/chunks/MazIcon-B3gy-jQ6.mjs +0 -4
- package/components/chunks/MazLoadingBar-D8a5KF29.mjs +0 -32
- package/components/chunks/MazSpinner-CMMBCwk2.mjs +0 -34
- package/components/chunks/MazSpinner-ChqoF_fX.mjs +0 -34
- package/components/chunks/MazSpinner-D5ciNjTR.mjs +0 -34
- package/components/chunks/MazSpinner-DebSlkVT.mjs +0 -34
- package/components/chunks/MazSpinner-RzOGVi6V.mjs +0 -34
- package/components/chunks/MazSpinner-VN2Vol2B.mjs +0 -34
- package/components/chunks/MazSpinner-dm4RUkiD.mjs +0 -34
- package/components/chunks/MazSpinner-oLVdOGaR.mjs +0 -34
- package/components/chunks/MazStepper-BREfkpUb.mjs +0 -213
- package/components/chunks/MazTableCell-CgiGF3bL.mjs +0 -23
- package/components/chunks/MazTableRow-6KrQQQbm.mjs +0 -30
- package/modules/chunks/index-BTegnVLg.cjs +0 -124
|
@@ -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
|
};
|
package/components/MazLink.mjs
CHANGED
|
@@ -20,7 +20,7 @@ import './assets/MazLink.css';const c = /* @__PURE__ */ p({
|
|
|
20
20
|
setup(l) {
|
|
21
21
|
const a = s(
|
|
22
22
|
() => import("./chunks/arrow-top-right-on-square-jPmYJ34F.mjs")
|
|
23
|
-
), o = s(() => import("./chunks/MazIcon-
|
|
23
|
+
), o = s(() => import("./chunks/MazIcon-B4CDdmqe.mjs"));
|
|
24
24
|
return (e, f) => (t(), n(i(e.to ? "router-link" : "a"), v({
|
|
25
25
|
id: e.id,
|
|
26
26
|
class: ["m-link", [
|
|
@@ -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,6 +130,11 @@ 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 scrollable on table
|
|
135
|
+
* @default `false`
|
|
136
|
+
*/
|
|
137
|
+
scrollable?: boolean;
|
|
133
138
|
}
|
|
134
139
|
export interface MazTableProvide {
|
|
135
140
|
size: Ref<Size>;
|
|
@@ -137,6 +142,7 @@ export interface MazTableProvide {
|
|
|
137
142
|
backgroundEven: Ref<boolean>;
|
|
138
143
|
backgroundOdd: Ref<boolean>;
|
|
139
144
|
}
|
|
145
|
+
export declare const mazTableKey = "maz-table";
|
|
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<{
|
|
142
148
|
readonly "onUpdate:model-value"?: ((value: (string | number | boolean | Row<T>)[] | undefined) => any) | undefined;
|
package/components/MazTable.mjs
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { inject as c, defineComponent as l, openBlock as a, createElementBlock as s, normalizeClass as i, unref as _, renderSlot as u } from "vue";
|
|
2
|
-
import './assets/MazTableCell.css';function
|
|
2
|
+
import './assets/MazTableCell.css';function m(t, o) {
|
|
3
3
|
const e = c(t, o);
|
|
4
4
|
if (!e)
|
|
5
|
-
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${t}`);
|
|
5
|
+
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${t.toString()}`);
|
|
6
6
|
return e;
|
|
7
7
|
}
|
|
8
|
-
const d =
|
|
8
|
+
const p = "maz-table", d = (t, o) => {
|
|
9
|
+
const e = t.__vccOpts || t;
|
|
10
|
+
for (const [n, r] of o)
|
|
11
|
+
e[n] = r;
|
|
12
|
+
return e;
|
|
13
|
+
}, f = /* @__PURE__ */ l({
|
|
9
14
|
__name: "MazTableCell",
|
|
10
15
|
setup(t) {
|
|
11
|
-
const { size: o } = p
|
|
12
|
-
return (e,
|
|
16
|
+
const { size: o } = m(p);
|
|
17
|
+
return (e, n) => (a(), s(
|
|
13
18
|
"td",
|
|
14
19
|
{
|
|
15
|
-
class: i(["m-table-cell", `--${_(o)}`])
|
|
20
|
+
class: i(["m-table-cell", [`--${_(o)}`]])
|
|
16
21
|
},
|
|
17
22
|
[
|
|
18
23
|
u(e.$slots, "default", {}, void 0, !0)
|
|
@@ -21,12 +26,7 @@ const d = /* @__PURE__ */ l({
|
|
|
21
26
|
/* CLASS */
|
|
22
27
|
));
|
|
23
28
|
}
|
|
24
|
-
}),
|
|
25
|
-
const e = t.__vccOpts || t;
|
|
26
|
-
for (const [r, n] of o)
|
|
27
|
-
e[r] = n;
|
|
28
|
-
return e;
|
|
29
|
-
}, v = /* @__PURE__ */ f(d, [["__scopeId", "data-v-15457736"]]);
|
|
29
|
+
}), v = /* @__PURE__ */ d(f, [["__scopeId", "data-v-ce80193e"]]);
|
|
30
30
|
export {
|
|
31
31
|
v as default
|
|
32
32
|
};
|