maz-ui 3.47.2-beta.0 → 3.47.2-beta.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/components/MazAccordion.mjs +36 -37
- package/components/MazAnimatedCounter.mjs +14 -16
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCarousel.mjs +1 -1
- package/components/MazChart.mjs +23 -32
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +66 -71
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +162 -185
- package/components/MazExpandAnimation.mjs +20 -21
- package/components/MazGallery.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.mjs +30 -31
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLink.mjs +18 -30
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.mjs +37 -42
- package/components/MazRadioButtons.mjs +61 -66
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider.mjs +107 -116
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.mjs +24 -28
- package/components/MazTable.d.ts +6 -6
- package/components/MazTable.mjs +1 -1
- package/components/MazTabsBar.mjs +1 -1
- package/components/MazTextarea.mjs +32 -34
- package/components/assets/MazLink.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/chunks/{MazBadge-CvIiiTdM.mjs → MazBadge-CqppWg2j.mjs} +1 -1
- package/components/chunks/{MazBottomSheet-DqK0EOsq.mjs → MazBottomSheet-CGRvZmGd.mjs} +28 -29
- package/{modules/chunks/MazBtn-BSnVxud6.mjs → components/chunks/MazBtn-2VKM1wZu.mjs} +37 -49
- package/components/chunks/{MazBtn-DVkwISlp.mjs → MazBtn-40lm8-AL.mjs} +37 -49
- package/components/chunks/{MazBtn-DzBXfedt.mjs → MazBtn-BB1FyYWv.mjs} +35 -44
- package/components/chunks/{MazBtn-BO3G90L3.mjs → MazBtn-BMYXMZuX.mjs} +37 -49
- package/components/chunks/{MazBtn-DJOUeES7.mjs → MazBtn-BijEMn4r.mjs} +37 -49
- package/components/chunks/MazBtn-BmrcK2af.mjs +106 -0
- package/components/chunks/MazBtn-C72_1uvu.mjs +106 -0
- package/components/chunks/MazBtn-CWloP6MI.mjs +111 -0
- package/components/chunks/MazBtn-CcyV4DCc.mjs +106 -0
- package/components/chunks/MazBtn-DENEMy-c.mjs +106 -0
- package/components/chunks/MazBtn-DfqRZvbB.mjs +106 -0
- package/components/chunks/MazBtn-UnZQuu6P.mjs +106 -0
- package/components/chunks/MazBtn-cDJlUVVY.mjs +106 -0
- package/components/chunks/MazBtn-hUslV7wO.mjs +106 -0
- package/components/chunks/{MazCard-FSXmHyhj.mjs → MazCard-BYB8y1_u.mjs} +18 -19
- package/components/chunks/{MazCarousel-BEl86YGW.mjs → MazCarousel-DccWVW8H.mjs} +20 -21
- package/components/chunks/{MazCheckbox-2G4VkxDz.mjs → MazCheckbox-B22OcHt8.mjs} +1 -1
- package/components/chunks/{MazCheckbox-Cq9gpTEw.mjs → MazCheckbox-DMogZVHl.mjs} +1 -1
- package/components/chunks/{MazCheckbox-BmnqBHaY.mjs → MazCheckbox-Db6sPUbV.mjs} +1 -1
- package/components/chunks/{MazChecklist-CY1Cv70T.mjs → MazChecklist-C95Y4Hb-.mjs} +112 -118
- package/components/chunks/{MazDialog-CPgFpAlq.mjs → MazDialog-khofH-7I.mjs} +66 -81
- package/components/chunks/MazDialogPromise-ZRA2ZrO4.mjs +488 -0
- package/components/chunks/{MazExpandAnimation-Bkw_wFTi.mjs → MazExpandAnimation-MDimlZGj.mjs} +7 -8
- package/components/chunks/{MazGallery-BknvUeo1.mjs → MazGallery-CXQiXWFr.mjs} +32 -33
- package/components/chunks/{MazGallery-CZOokGAt.mjs → MazGallery-VTZUhBKC.mjs} +33 -34
- package/components/chunks/{MazIcon-z-jTiuyI.mjs → MazIcon-BF5TFzse.mjs} +1 -1
- package/components/chunks/{MazInput-oOA7gdLO.mjs → MazInput-DC3S-CVu.mjs} +44 -53
- package/components/chunks/{MazInput-BQoQSRyL.mjs → MazInput-DzWkS-g8.mjs} +40 -49
- package/components/chunks/{MazInput-CJQB68c-.mjs → MazInput-NE6H-10w.mjs} +42 -51
- package/components/chunks/{MazInputNumber-B4mQJcVB.mjs → MazInputNumber-DRXQXHRv.mjs} +168 -189
- package/components/chunks/{MazInputPrice-BrxE5WVf.mjs → MazInputPrice-DoTnDDIN.mjs} +49 -58
- package/components/chunks/{MazInputTags-BVCej_gW.mjs → MazInputTags-Dj3sW-e5.mjs} +181 -202
- package/components/chunks/{MazLink-Dl9ePCGm.mjs → MazLink-C_3Wya94.mjs} +19 -31
- package/components/chunks/{MazLoadingBar-Dwf55oHy.mjs → MazLoadingBar-DdjHRC7g.mjs} +1 -1
- package/components/chunks/MazPagination-BkT4_LLW.mjs +330 -0
- package/components/chunks/{MazPhoneNumberInput-Cd25AzXc.mjs → MazPhoneNumberInput-BbssOUzo.mjs} +500 -544
- package/components/chunks/{MazPicker-C78yxilJ.mjs → MazPicker-DwWiIYAR.mjs} +243 -264
- package/components/chunks/{MazPickerMonthSwitcher-CyHYx8TT.mjs → MazPickerMonthSwitcher-CmFFQoPA.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-Bsi8cnox.mjs → MazPickerShortcuts-DaELz7aq.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DLUSMAtz.mjs → MazPickerYearSwitcher-m1_KXnpA.mjs} +1 -1
- package/components/chunks/{MazSelect-CQDoUpgp.mjs → MazSelect-BJ07NVXQ.mjs} +149 -170
- package/components/chunks/{MazSelect-uCJPMXF-.mjs → MazSelect-CDV9Fx6m.mjs} +124 -136
- package/components/chunks/{MazSpinner-Bvb-lKER.mjs → MazSpinner-Bb3f2t6w.mjs} +1 -1
- package/components/chunks/{MazSpinner-Cqp-BMvL.mjs → MazSpinner-BcB0szZB.mjs} +1 -1
- package/components/chunks/{MazSpinner-BT_717pD.mjs → MazSpinner-BpkPcfCt.mjs} +1 -1
- package/components/chunks/{MazSpinner-CAbYLlEZ.mjs → MazSpinner-BsYJDmi9.mjs} +1 -1
- package/components/chunks/{MazSpinner-B9OwpEP_.mjs → MazSpinner-BymqEMBk.mjs} +1 -1
- package/components/chunks/MazSpinner-C-64WJje.mjs +34 -0
- package/components/chunks/MazSpinner-CEFbkZkM.mjs +34 -0
- package/components/chunks/{MazSpinner-EFo8dM46.mjs → MazSpinner-CfiIXW8y.mjs} +1 -1
- package/components/chunks/MazSpinner-CykRbNHD.mjs +34 -0
- package/components/chunks/{MazSpinner-C-z3-68w.mjs → MazSpinner-D3-pqOh3.mjs} +1 -1
- package/components/chunks/MazSpinner-DS58mtzm.mjs +34 -0
- package/components/chunks/{MazSpinner-2D0ZmAQz.mjs → MazSpinner-DmiLBQgR.mjs} +1 -1
- package/components/chunks/{MazSpinner-C1Ip-Dwh.mjs → MazSpinner-Dmkr_r9u.mjs} +1 -1
- package/components/chunks/MazSpinner-DoRGA1RI.mjs +34 -0
- package/components/chunks/MazSpinner-eC03bFP5.mjs +34 -0
- package/components/chunks/{MazSpinner-Cb3_S0zT.mjs → MazSpinner-edxn0ncQ.mjs} +1 -1
- package/components/chunks/MazSpinner-f2Mc2eRO.mjs +34 -0
- package/components/chunks/MazSpinner-n4Dp5ZsH.mjs +34 -0
- package/components/chunks/MazStepper-BREfkpUb.mjs +213 -0
- package/components/chunks/{MazTable-Cuz5QI08.mjs → MazTable-BJDPdIJB.mjs} +183 -227
- package/components/chunks/{MazTableCell-D_OTOJiy.mjs → MazTableCell-DILuUCTe.mjs} +1 -1
- package/components/chunks/{MazTableRow-BTcVAyOy.mjs → MazTableRow-D6H6-c8J.mjs} +1 -1
- package/components/chunks/{MazTableTitle-BDA9G6Zw.mjs → MazTableTitle-Ch-nyY1E.mjs} +1 -1
- package/components/chunks/MazTabsBar-CM-w7V97.mjs +193 -0
- package/components/chunks/{MazTransitionExpand-C-FHhOGB.mjs → MazTransitionExpand-PmUDa51_.mjs} +1 -1
- package/modules/chunks/MazBtn-B_Xlvgbg.cjs +1 -0
- package/modules/chunks/MazBtn-Dsr06Zgg.mjs +106 -0
- package/modules/chunks/{MazIcon-dhyR9Q8a.cjs → MazIcon-CkuzyufF.cjs} +1 -1
- package/modules/chunks/{MazIcon-DllGg8tw.mjs → MazIcon-DEgoQbMj.mjs} +1 -1
- package/modules/chunks/{MazSpinner-bdGjxsu6.mjs → MazSpinner-BurN-1pb.mjs} +1 -1
- package/modules/chunks/{MazSpinner-CiIyZ8gs.cjs → MazSpinner-jP4QsCNE.cjs} +1 -1
- package/modules/chunks/index-CUNN0eIB.cjs +124 -0
- package/modules/chunks/{index-x2F1l5sr.mjs → index-CxFUggmu.mjs} +257 -292
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazTable.vue.d.ts +6 -6
- package/types/modules/composables/useFormValidator/types.d.ts +5 -1
- package/types/modules/composables/useFormValidator/useFormField.d.ts +3 -3
- package/types/modules/composables/useFormValidator/useFormValidator.d.ts +2 -2
- package/types/modules/composables/useFormValidator/utils.d.ts +12 -12
- package/components/chunks/MazBtn-BRUaoP8j.mjs +0 -126
- package/components/chunks/MazBtn-BhnOApJu.mjs +0 -118
- package/components/chunks/MazBtn-C28vKP_v.mjs +0 -118
- package/components/chunks/MazBtn-C87UEsVs.mjs +0 -118
- package/components/chunks/MazBtn-C_l3xuAh.mjs +0 -118
- package/components/chunks/MazBtn-CweCwE_4.mjs +0 -118
- package/components/chunks/MazBtn-D7IKoL2c.mjs +0 -118
- package/components/chunks/MazBtn-DadFupkY.mjs +0 -118
- package/components/chunks/MazBtn-GGcGrIH4.mjs +0 -118
- package/components/chunks/MazBtn-Mu18egu5.mjs +0 -118
- package/components/chunks/MazDialogPromise-BCCdkrea.mjs +0 -522
- package/components/chunks/MazPagination-CHTMRRqE.mjs +0 -362
- package/components/chunks/MazSpinner-C23CZ_Za.mjs +0 -34
- package/components/chunks/MazSpinner-CViChjTw.mjs +0 -34
- package/components/chunks/MazSpinner-CZMBhCOJ.mjs +0 -34
- package/components/chunks/MazSpinner-D4C84xZe.mjs +0 -34
- package/components/chunks/MazSpinner-Dyf9yb51.mjs +0 -34
- package/components/chunks/MazSpinner-QHjOczon.mjs +0 -34
- package/components/chunks/MazSpinner-u8WQTgUR.mjs +0 -34
- package/components/chunks/MazSpinner-w-S5uCxg.mjs +0 -34
- package/components/chunks/MazStepper-DRWtYHZR.mjs +0 -232
- package/components/chunks/MazTabsBar-JkRzMDM6.mjs +0 -203
- package/modules/chunks/MazBtn-Bf9Cq5M7.cjs +0 -9
- package/modules/chunks/index-BPqjUr5e.cjs +0 -149
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as N, useCssVars as M, ref as z, watch as P, computed as m, openBlock as g, createElementBlock as v, normalizeClass as h, normalizeStyle as $, createElementVNode as y, Fragment as q, renderList as D,
|
|
2
|
-
import './assets/MazInputCode.css';const
|
|
1
|
+
import { defineComponent as N, useCssVars as M, ref as z, watch as P, computed as m, openBlock as g, createElementBlock as v, normalizeClass as h, normalizeStyle as $, createElementVNode as y, Fragment as q, renderList as D, mergeProps as E, toDisplayString as F } from "vue";
|
|
2
|
+
import './assets/MazInputCode.css';const K = ["disabled"], T = { class: "m-input-code__wrapper" }, O = ["inputmode", "pattern", "required", "value", "onInput", "onKeydown", "onClick"], W = /* @__PURE__ */ N({
|
|
3
3
|
inheritAttrs: !1,
|
|
4
4
|
__name: "MazInputCode",
|
|
5
5
|
props: {
|
|
@@ -19,11 +19,11 @@ import './assets/MazInputCode.css';const T = ["disabled"], j = { class: "m-input
|
|
|
19
19
|
hint: {}
|
|
20
20
|
},
|
|
21
21
|
emits: ["update:model-value", "completed"],
|
|
22
|
-
setup(
|
|
22
|
+
setup(i, { emit: p }) {
|
|
23
23
|
M((e) => ({
|
|
24
24
|
"0b343ce5": S.value
|
|
25
25
|
}));
|
|
26
|
-
const n =
|
|
26
|
+
const n = i, d = p, u = z([]), r = z(/* @__PURE__ */ new Map());
|
|
27
27
|
P(
|
|
28
28
|
() => n.modelValue,
|
|
29
29
|
(e, t) => {
|
|
@@ -40,7 +40,7 @@ import './assets/MazInputCode.css';const T = ["disabled"], j = { class: "m-input
|
|
|
40
40
|
});
|
|
41
41
|
function I(e = n.modelValue) {
|
|
42
42
|
const t = /* @__PURE__ */ new Map();
|
|
43
|
-
for (const o of Array.from({ length: n.codeLength }, (a,
|
|
43
|
+
for (const o of Array.from({ length: n.codeLength }, (a, s) => s))
|
|
44
44
|
if (e === void 0)
|
|
45
45
|
t.set(o + 1, void 0);
|
|
46
46
|
else {
|
|
@@ -51,22 +51,22 @@ import './assets/MazInputCode.css';const T = ["disabled"], j = { class: "m-input
|
|
|
51
51
|
}
|
|
52
52
|
function L(e, t) {
|
|
53
53
|
var a;
|
|
54
|
-
const o =
|
|
55
|
-
f.value = r.value.set(t, o), o &&
|
|
54
|
+
const o = w((a = e.target) == null ? void 0 : a.value);
|
|
55
|
+
f.value = r.value.set(t, o), o && c(t);
|
|
56
56
|
}
|
|
57
57
|
function _(e) {
|
|
58
58
|
const t = [...e.values()].join("");
|
|
59
59
|
return n.type === "text" ? t : t && !Number.isNaN(Number(t)) ? Number(t) : void 0;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function w(e) {
|
|
62
62
|
var t;
|
|
63
63
|
return (t = n.acceptAlpha ? e.match(/^[\w.]$/) : e.match(/\d+/g)) == null ? void 0 : t.toString();
|
|
64
64
|
}
|
|
65
65
|
function B(e, t) {
|
|
66
66
|
const o = r.value.get(t);
|
|
67
|
-
if (e.key === "ArrowRight" &&
|
|
67
|
+
if (e.key === "ArrowRight" && c(t), e.key === "ArrowLeft" && c(t - 2), e.key === "Backspace" && !o) {
|
|
68
68
|
const a = t - 1 < 0 ? 0 : t - 1;
|
|
69
|
-
f.value = r.value.set(a, void 0),
|
|
69
|
+
f.value = r.value.set(a, void 0), c(a - 1);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
function A(e) {
|
|
@@ -74,29 +74,29 @@ import './assets/MazInputCode.css';const T = ["disabled"], j = { class: "m-input
|
|
|
74
74
|
const t = (a = e.clipboardData) == null ? void 0 : a.getData("text");
|
|
75
75
|
if (!t)
|
|
76
76
|
return;
|
|
77
|
-
const o = Array.from({ length: n.codeLength }, (
|
|
78
|
-
index:
|
|
79
|
-
value: [...t.toString()][
|
|
77
|
+
const o = Array.from({ length: n.codeLength }, (s, l) => ({
|
|
78
|
+
index: l + 1,
|
|
79
|
+
value: [...t.toString()][l] ?? void 0
|
|
80
80
|
}));
|
|
81
|
-
for (const { index:
|
|
82
|
-
const V =
|
|
83
|
-
V && r.value.set(
|
|
81
|
+
for (const { index: s, value: l } of o) {
|
|
82
|
+
const V = l ? w(l) : void 0;
|
|
83
|
+
V && r.value.set(s, V);
|
|
84
84
|
}
|
|
85
85
|
setTimeout(() => {
|
|
86
|
-
const
|
|
87
|
-
|
|
86
|
+
const s = k(), l = s >= n.codeLength ? n.codeLength - 1 : s;
|
|
87
|
+
c(l, !1);
|
|
88
88
|
}, 0);
|
|
89
89
|
}
|
|
90
90
|
function k() {
|
|
91
91
|
return [...r.value.values()].filter(Boolean).length;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function c(e, t = !0) {
|
|
94
94
|
setTimeout(() => {
|
|
95
95
|
const o = u.value[e];
|
|
96
|
-
e + 1 > n.codeLength || !o || (o.focus(), t &&
|
|
96
|
+
e + 1 > n.codeLength || !o || (o.focus(), t && b(e));
|
|
97
97
|
}, 0);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function b(e) {
|
|
100
100
|
const t = u.value[e];
|
|
101
101
|
e + 1 > n.codeLength || !t || t.select();
|
|
102
102
|
}
|
|
@@ -106,7 +106,7 @@ import './assets/MazInputCode.css';const T = ["disabled"], j = { class: "m-input
|
|
|
106
106
|
disabled: e.disabled,
|
|
107
107
|
style: $(e.style)
|
|
108
108
|
}, [
|
|
109
|
-
y("div",
|
|
109
|
+
y("div", T, [
|
|
110
110
|
(g(!0), v(
|
|
111
111
|
q,
|
|
112
112
|
null,
|
|
@@ -117,8 +117,7 @@ import './assets/MazInputCode.css';const T = ["disabled"], j = { class: "m-input
|
|
|
117
117
|
class: h(["input-wrapper", C.value])
|
|
118
118
|
},
|
|
119
119
|
[
|
|
120
|
-
|
|
121
|
-
y("input", F({
|
|
120
|
+
y("input", E({
|
|
122
121
|
ref_for: !0,
|
|
123
122
|
ref: (a) => {
|
|
124
123
|
u.value[o - 1] = a;
|
|
@@ -134,7 +133,7 @@ import './assets/MazInputCode.css';const T = ["disabled"], j = { class: "m-input
|
|
|
134
133
|
value: f.value.get(o),
|
|
135
134
|
onInput: (a) => L(a, o),
|
|
136
135
|
onKeydown: (a) => B(a, o),
|
|
137
|
-
onClick: (a) =>
|
|
136
|
+
onClick: (a) => b(o - 1),
|
|
138
137
|
onPaste: A
|
|
139
138
|
}), null, 16, O)
|
|
140
139
|
],
|
|
@@ -154,18 +153,18 @@ import './assets/MazInputCode.css';const T = ["disabled"], j = { class: "m-input
|
|
|
154
153
|
"--warning": e.warning
|
|
155
154
|
}])
|
|
156
155
|
},
|
|
157
|
-
|
|
156
|
+
F(e.hint),
|
|
158
157
|
3
|
|
159
158
|
/* TEXT, CLASS */
|
|
160
159
|
)
|
|
161
|
-
], 14,
|
|
160
|
+
], 14, K));
|
|
162
161
|
}
|
|
163
|
-
}),
|
|
164
|
-
const n =
|
|
162
|
+
}), j = (i, p) => {
|
|
163
|
+
const n = i.__vccOpts || i;
|
|
165
164
|
for (const [d, u] of p)
|
|
166
165
|
n[d] = u;
|
|
167
166
|
return n;
|
|
168
|
-
},
|
|
167
|
+
}, Z = /* @__PURE__ */ j(W, [["__scopeId", "data-v-82b63deb"]]);
|
|
169
168
|
export {
|
|
170
|
-
|
|
169
|
+
Z as default
|
|
171
170
|
};
|
package/components/MazLink.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as p, defineAsyncComponent as s, openBlock as
|
|
2
|
-
import './assets/MazLink.css';const
|
|
1
|
+
import { defineComponent as p, defineAsyncComponent as s, openBlock as t, createBlock as n, resolveDynamicComponent as i, mergeProps as v, withCtx as m, renderSlot as r, unref as d, createCommentVNode as u, createVNode as y } from "vue";
|
|
2
|
+
import './assets/MazLink.css';const c = /* @__PURE__ */ p({
|
|
3
3
|
__name: "MazLink",
|
|
4
4
|
props: {
|
|
5
5
|
id: { default: void 0 },
|
|
6
6
|
title: { default: void 0 },
|
|
7
|
-
href: { default:
|
|
7
|
+
href: { default: void 0 },
|
|
8
8
|
to: { default: void 0 },
|
|
9
9
|
color: { default: "primary" },
|
|
10
10
|
target: { default: "_self" },
|
|
@@ -17,11 +17,11 @@ import './assets/MazLink.css';const m = /* @__PURE__ */ p({
|
|
|
17
17
|
leftIcon: { type: [String, Function, Object], default: void 0 },
|
|
18
18
|
rightIcon: { type: [String, Function, Object], default: void 0 }
|
|
19
19
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
20
|
+
setup(l) {
|
|
21
|
+
const a = s(
|
|
22
22
|
() => import("./chunks/arrow-top-right-on-square-jPmYJ34F.mjs")
|
|
23
23
|
), o = s(() => import("./chunks/MazIcon-BbvBov5G.mjs"));
|
|
24
|
-
return (e,
|
|
24
|
+
return (e, f) => (t(), n(i(e.to ? "router-link" : "a"), v({
|
|
25
25
|
id: e.id,
|
|
26
26
|
class: ["m-link", [
|
|
27
27
|
{
|
|
@@ -38,46 +38,34 @@ import './assets/MazLink.css';const m = /* @__PURE__ */ p({
|
|
|
38
38
|
download: e.download,
|
|
39
39
|
"aria-label": e.ariaLabel
|
|
40
40
|
}, e.$attrs), {
|
|
41
|
-
default:
|
|
42
|
-
t(`
|
|
43
|
-
@slot left-icon - The icon to display on the left of the text
|
|
44
|
-
`),
|
|
41
|
+
default: m(() => [
|
|
45
42
|
r(e.$slots, "left-icon", {}, () => [
|
|
46
|
-
typeof e.leftIcon == "string" ? (
|
|
43
|
+
typeof e.leftIcon == "string" ? (t(), n(d(o), {
|
|
47
44
|
key: 0,
|
|
48
45
|
name: e.leftIcon
|
|
49
|
-
}, null, 8, ["name"])) : e.leftIcon ? (
|
|
46
|
+
}, null, 8, ["name"])) : e.leftIcon ? (t(), n(i(e.leftIcon), { key: 1 })) : u("v-if", !0)
|
|
50
47
|
], !0),
|
|
51
|
-
t(`
|
|
52
|
-
@slot Text of the link
|
|
53
|
-
`),
|
|
54
48
|
r(e.$slots, "default", {}, void 0, !0),
|
|
55
|
-
t(`
|
|
56
|
-
@slot right-icon - The icon to display on the left of the text
|
|
57
|
-
`),
|
|
58
49
|
r(e.$slots, "right-icon", {}, () => [
|
|
59
|
-
typeof e.rightIcon == "string" ? (
|
|
50
|
+
typeof e.rightIcon == "string" ? (t(), n(d(o), {
|
|
60
51
|
key: 0,
|
|
61
52
|
name: e.rightIcon
|
|
62
|
-
}, null, 8, ["name"])) : e.rightIcon ? (
|
|
53
|
+
}, null, 8, ["name"])) : e.rightIcon ? (t(), n(i(e.rightIcon), { key: 1 })) : u("v-if", !0)
|
|
63
54
|
], !0),
|
|
64
|
-
t(`
|
|
65
|
-
@slot external-icon - Replace the default external icon
|
|
66
|
-
`),
|
|
67
55
|
e.autoExternal && e.target === "_blank" ? r(e.$slots, "external-icon", { key: 0 }, () => [
|
|
68
|
-
y(
|
|
69
|
-
], !0) :
|
|
56
|
+
y(d(a))
|
|
57
|
+
], !0) : u("v-if", !0)
|
|
70
58
|
]),
|
|
71
59
|
_: 3
|
|
72
60
|
/* FORWARDED */
|
|
73
61
|
}, 16, ["id", "class", "to", "href", "title", "target", "rel", "download", "aria-label"]));
|
|
74
62
|
}
|
|
75
|
-
}),
|
|
76
|
-
const o =
|
|
77
|
-
for (const [e,
|
|
78
|
-
o[e] =
|
|
63
|
+
}), g = (l, a) => {
|
|
64
|
+
const o = l.__vccOpts || l;
|
|
65
|
+
for (const [e, f] of a)
|
|
66
|
+
o[e] = f;
|
|
79
67
|
return o;
|
|
80
|
-
}, k = /* @__PURE__ */
|
|
68
|
+
}, k = /* @__PURE__ */ g(c, [["__scopeId", "data-v-40bf35c6"]]);
|
|
81
69
|
export {
|
|
82
70
|
k as default
|
|
83
71
|
};
|
package/components/MazPicker.mjs
CHANGED
package/components/MazRadio.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useId as S, computed as l, defineComponent as
|
|
1
|
+
import { useId as S, computed as l, defineComponent as B, useCssVars as V, ref as $, openBlock as m, createElementBlock as f, unref as v, normalizeClass as p, normalizeStyle as C, createElementVNode as u, mergeProps as E, renderSlot as I, createTextVNode as R, toDisplayString as b, createCommentVNode as N } from "vue";
|
|
2
2
|
import './assets/MazRadio.css';function M({
|
|
3
|
-
componentName:
|
|
3
|
+
componentName: o,
|
|
4
4
|
providedId: s
|
|
5
5
|
}) {
|
|
6
6
|
const a = S();
|
|
7
|
-
return l(() => s ?? `${
|
|
7
|
+
return l(() => s ?? `${o}-${a}`);
|
|
8
8
|
}
|
|
9
|
-
const _ = ["for", "aria-checked"], D = ["id", "value", "disabled", "name", "checked"],
|
|
9
|
+
const _ = ["for", "aria-checked"], D = ["id", "value", "disabled", "name", "checked"], q = { class: "m-radio__text" }, F = /* @__PURE__ */ B({
|
|
10
10
|
__name: "MazRadio",
|
|
11
11
|
props: {
|
|
12
12
|
style: { default: void 0 },
|
|
@@ -25,16 +25,16 @@ 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(
|
|
28
|
+
setup(o, { emit: s }) {
|
|
29
29
|
V((e) => ({
|
|
30
|
-
"172f8336":
|
|
30
|
+
"172f8336": h.value,
|
|
31
31
|
"5ca6ddf3": y.value,
|
|
32
|
-
"094f34b6":
|
|
32
|
+
"094f34b6": g.value
|
|
33
33
|
}));
|
|
34
|
-
const a =
|
|
34
|
+
const a = o, n = s, t = M({
|
|
35
35
|
componentName: "MazRadio",
|
|
36
36
|
providedId: a.id
|
|
37
|
-
}), d = l(() => a.modelValue === a.value),
|
|
37
|
+
}), d = l(() => a.modelValue === a.value), h = l(() => {
|
|
38
38
|
switch (a.size) {
|
|
39
39
|
case "xl":
|
|
40
40
|
return "2.25rem";
|
|
@@ -49,37 +49,37 @@ const _ = ["for", "aria-checked"], D = ["id", "value", "disabled", "name", "chec
|
|
|
49
49
|
default:
|
|
50
50
|
return "1.625rem";
|
|
51
51
|
}
|
|
52
|
-
}), y = l(() => `var(--maz-color-${a.color})`),
|
|
53
|
-
function
|
|
52
|
+
}), y = l(() => `var(--maz-color-${a.color})`), g = l(() => a.error ? "var(--maz-color-danger)" : a.warning ? "var(--maz-color-warning)" : a.success ? "var(--maz-color-success)" : ["black", "transparent"].includes(a.color) ? "var(--maz-color-muted)" : `var(--maz-color-${a.color}-alpha)`);
|
|
53
|
+
function z(e) {
|
|
54
54
|
["Space"].includes(e.code) && (e.preventDefault(), c());
|
|
55
55
|
}
|
|
56
56
|
function c() {
|
|
57
57
|
n("update:model-value", a.value), n("change", a.value);
|
|
58
58
|
}
|
|
59
|
-
const
|
|
60
|
-
function
|
|
61
|
-
var
|
|
62
|
-
(
|
|
59
|
+
const i = $();
|
|
60
|
+
function w(e) {
|
|
61
|
+
var r;
|
|
62
|
+
(r = i.value) == null || r.dispatchEvent(new Event("blur")), n("blur", e);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
var
|
|
66
|
-
(
|
|
64
|
+
function k(e) {
|
|
65
|
+
var r;
|
|
66
|
+
(r = i.value) == null || r.dispatchEvent(new Event("focus")), n("focus", e);
|
|
67
67
|
}
|
|
68
|
-
return (e,
|
|
68
|
+
return (e, r) => (m(), f("label", {
|
|
69
69
|
for: v(t),
|
|
70
70
|
class: p(["m-radio", [{ "--disabled": e.disabled, "--selected": d.value, "--error": e.error, "--warning": e.warning, "--success": e.success }, a.class]]),
|
|
71
71
|
tabindex: "0",
|
|
72
72
|
role: "radio",
|
|
73
73
|
style: C(e.style),
|
|
74
74
|
"aria-checked": d.value,
|
|
75
|
-
onBlur:
|
|
76
|
-
onFocus:
|
|
77
|
-
onKeydown:
|
|
75
|
+
onBlur: w,
|
|
76
|
+
onFocus: k,
|
|
77
|
+
onKeydown: z
|
|
78
78
|
}, [
|
|
79
|
-
|
|
79
|
+
u("input", E({
|
|
80
80
|
id: v(t),
|
|
81
81
|
ref_key: "inputRef",
|
|
82
|
-
ref:
|
|
82
|
+
ref: i,
|
|
83
83
|
value: e.value
|
|
84
84
|
}, e.$attrs, {
|
|
85
85
|
tabindex: "-1",
|
|
@@ -87,29 +87,24 @@ const _ = ["for", "aria-checked"], D = ["id", "value", "disabled", "name", "chec
|
|
|
87
87
|
name: e.name,
|
|
88
88
|
type: "radio",
|
|
89
89
|
checked: d.value,
|
|
90
|
-
onChange:
|
|
90
|
+
onChange: r[0] || (r[0] = (K) => c())
|
|
91
91
|
}), null, 16, D),
|
|
92
|
-
|
|
92
|
+
r[1] || (r[1] = u(
|
|
93
93
|
"span",
|
|
94
94
|
null,
|
|
95
95
|
[
|
|
96
|
-
|
|
96
|
+
u("span", { class: "round" })
|
|
97
97
|
],
|
|
98
98
|
-1
|
|
99
99
|
/* HOISTED */
|
|
100
100
|
)),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
@binding {Boolean} is-selected - If the radio is selected
|
|
104
|
-
@binding {string | number | boolean} value - The value of the radio
|
|
105
|
-
`),
|
|
106
|
-
i("div", T, [
|
|
107
|
-
R(e.$slots, "default", {
|
|
101
|
+
u("div", q, [
|
|
102
|
+
I(e.$slots, "default", {
|
|
108
103
|
isSelected: d.value,
|
|
109
104
|
value: e.value
|
|
110
105
|
}, () => [
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
R(
|
|
107
|
+
b(e.label),
|
|
113
108
|
1
|
|
114
109
|
/* TEXT */
|
|
115
110
|
)
|
|
@@ -124,19 +119,19 @@ const _ = ["for", "aria-checked"], D = ["id", "value", "disabled", "name", "chec
|
|
|
124
119
|
"--warning": e.warning
|
|
125
120
|
}])
|
|
126
121
|
},
|
|
127
|
-
|
|
122
|
+
b(e.hint),
|
|
128
123
|
3
|
|
129
124
|
/* TEXT, CLASS */
|
|
130
|
-
)) :
|
|
125
|
+
)) : N("v-if", !0)
|
|
131
126
|
])
|
|
132
127
|
], 46, _));
|
|
133
128
|
}
|
|
134
|
-
}),
|
|
135
|
-
const a =
|
|
129
|
+
}), H = (o, s) => {
|
|
130
|
+
const a = o.__vccOpts || o;
|
|
136
131
|
for (const [n, t] of s)
|
|
137
132
|
a[n] = t;
|
|
138
133
|
return a;
|
|
139
|
-
},
|
|
134
|
+
}, P = /* @__PURE__ */ H(F, [["__scopeId", "data-v-8cc8aee1"]]);
|
|
140
135
|
export {
|
|
141
|
-
|
|
136
|
+
P as default
|
|
142
137
|
};
|