maz-ui 3.44.0 → 3.44.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 +25 -25
- package/components/MazAvatar.mjs +1 -1
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCardSpotlight.mjs +9 -9
- package/components/MazCarousel.mjs +1 -1
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +1 -1
- package/components/MazDropzone.mjs +1 -1
- package/components/MazGallery.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLazyImg.mjs +1 -1
- package/components/MazLink.mjs +22 -22
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazReadingProgressBar.mjs +1 -2
- package/components/MazSelect.mjs +1 -1
- package/components/MazTable.mjs +1 -1
- package/components/MazTextarea.mjs +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/assets/MazTabsBar.css +1 -1
- package/components/chunks/{MazAvatar-BU1nJFcV.mjs → MazAvatar-CoT6WIl0.mjs} +1 -1
- package/components/chunks/{MazBottomSheet-DUOIusEi.mjs → MazBottomSheet-DpI8wFgc.mjs} +1 -1
- package/components/chunks/MazBtn-BIVlttu0.mjs +150 -0
- package/components/chunks/MazBtn-BQ7aH6Qe.mjs +158 -0
- package/components/chunks/{MazBtn-5BSKOcqG.mjs → MazBtn-BXDpaXn1.mjs} +44 -44
- package/components/chunks/MazBtn-C7RDTnn-.mjs +150 -0
- package/components/chunks/{MazBtn-BY8WCtM7.mjs → MazBtn-CPkNymJj.mjs} +44 -44
- package/components/chunks/{MazBtn-C5G78zLg.mjs → MazBtn-CQSo596y.mjs} +44 -44
- package/components/chunks/MazBtn-D2tIsob2.mjs +150 -0
- package/components/chunks/MazBtn-DRTBFUgW.mjs +150 -0
- package/components/chunks/{MazBtn-f1mBXJeU.mjs → MazBtn-Dfz-5FeI.mjs} +23 -26
- package/components/chunks/{MazBtn-CeVwyYR5.mjs → MazBtn-Vas62hFD.mjs} +44 -44
- package/components/chunks/MazBtn-gE-drZkE.mjs +150 -0
- package/components/chunks/{MazCard-BWxV_Z-i.mjs → MazCard-BBwohtCJ.mjs} +1 -1
- package/components/chunks/{MazCarousel-D5EmW7Sa.mjs → MazCarousel-DJ_nQfy4.mjs} +1 -1
- package/components/chunks/{MazCheckbox-D3PXkt75.mjs → MazCheckbox-BK1MX0uq.mjs} +1 -1
- package/components/chunks/{MazCheckbox-BWiMbecz.mjs → MazCheckbox-D3Fm-BFu.mjs} +1 -1
- package/components/chunks/{MazDialog-CLWKCphI.mjs → MazDialog-DXaeCp-b.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-DVOJwdVp.mjs → MazDialogPromise-Bgxjg9ss.mjs} +2 -2
- package/components/chunks/{MazDropzone-Dm2IirHm.mjs → MazDropzone-D0W0dlgY.mjs} +2 -3
- package/components/chunks/{MazGallery-Bn9p1gNb.mjs → MazGallery-CBE4wD7D.mjs} +3 -4
- package/components/chunks/{MazGallery-BlfPe8WG.mjs → MazGallery-Din0Z37d.mjs} +4 -5
- package/components/chunks/{MazIcon-D3umgnku.mjs → MazIcon-CTjWIkTp.mjs} +1 -1
- package/components/chunks/{MazIcon-B8A0hQAH.mjs → MazIcon-CUOwXGOK.mjs} +1 -1
- package/components/chunks/{MazInput-BpsE-mdg.mjs → MazInput-D177bUMh.mjs} +44 -44
- package/components/chunks/{MazInputNumber-DGBYbDSX.mjs → MazInputNumber-CstQGS8u.mjs} +121 -121
- package/components/chunks/{MazInputPrice-j2BNMeFp.mjs → MazInputPrice-Bp7ie9jm.mjs} +48 -48
- package/components/chunks/{MazInputTags-CJofVaj5.mjs → MazInputTags-C7nZucYu.mjs} +63 -63
- package/components/chunks/{MazLazyImg-Dboc6Xfz.mjs → MazLazyImg-DADMg49z.mjs} +3 -4
- package/components/chunks/{MazLazyImg-BFG6FIJZ.mjs → MazLazyImg-xLPMdfif.mjs} +4 -5
- package/components/chunks/{MazPagination-C6ZehQSZ.mjs → MazPagination-NbHR41CQ.mjs} +44 -44
- package/components/chunks/{MazPhoneNumberInput-DpWoNQfx.mjs → MazPhoneNumberInput-BGo-vcnD.mjs} +61 -61
- package/components/chunks/{MazPicker-ia2BEmm5.mjs → MazPicker-CJBezF2t.mjs} +173 -198
- package/components/chunks/{MazPickerMonthSwitcher-CKtfZ_m-.mjs → MazPickerMonthSwitcher-DZPHWTJt.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-Cc9VoqBw.mjs → MazPickerShortcuts-CBEmYjPG.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-0b5Wrem9.mjs → MazPickerYearSwitcher-Ynp2qf3F.mjs} +1 -1
- package/components/chunks/{MazSelect-COJoKXbV.mjs → MazSelect-D4TuCHwj.mjs} +29 -29
- package/components/chunks/{MazSpinner-BaAMq7LI.mjs → MazSpinner--h9DYpGx.mjs} +1 -1
- package/components/chunks/{MazSpinner-BZOjTZBN.mjs → MazSpinner-6pxbKImG.mjs} +1 -1
- package/components/chunks/{MazSpinner-RvDGcBng.mjs → MazSpinner-BVd7-OTu.mjs} +1 -1
- package/components/chunks/MazSpinner-C6T_enKo.mjs +37 -0
- package/components/chunks/{MazSpinner-DkXequnp.mjs → MazSpinner-C8x7LsHq.mjs} +1 -1
- package/components/chunks/{MazSpinner-V-bFi71W.mjs → MazSpinner-CLz4ccD0.mjs} +1 -1
- package/components/chunks/MazSpinner-CmJlBqgH.mjs +37 -0
- package/components/chunks/MazSpinner-D4gpZ7vL.mjs +37 -0
- package/components/chunks/{MazSpinner-CNIlbDfg.mjs → MazSpinner-D8k_MENa.mjs} +1 -1
- package/components/chunks/MazSpinner-DGxqly6h.mjs +37 -0
- package/components/chunks/{MazSpinner-9Jue6cel.mjs → MazSpinner-DVkxyBoy.mjs} +1 -1
- package/components/chunks/{MazSpinner-BGPOws6a.mjs → MazSpinner-DjR5FVqo.mjs} +1 -1
- package/components/chunks/MazSpinner-DnVHWljy.mjs +37 -0
- package/components/chunks/{MazSpinner-C41VyUup.mjs → MazSpinner-DneKNmrs.mjs} +1 -1
- package/components/chunks/MazSpinner-Q02SOFkL.mjs +37 -0
- package/components/chunks/{MazSpinner-EA5ejB8F.mjs → MazSpinner-T1t1bpbm.mjs} +1 -1
- package/components/chunks/{MazSpinner-BWYdqSMP.mjs → MazSpinner-dFnsq52G.mjs} +1 -1
- package/components/chunks/MazSpinner-iA4Rz7K5.mjs +37 -0
- package/components/chunks/{MazSpinner-DHQH6Bhz.mjs → MazSpinner-rAqBu92m.mjs} +1 -1
- package/components/chunks/MazSpinner-va5G9enA.mjs +37 -0
- package/components/chunks/{MazTable-DRUj_PZp.mjs → MazTable-BPMuTZbS.mjs} +305 -305
- package/components/chunks/{MazTransitionExpand-B08cSrmL.mjs → MazTransitionExpand-CYyEf_hd.mjs} +1 -1
- package/css/main.css +2 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/MazBtn-1g7UvzQ_.mjs +150 -0
- package/modules/chunks/{MazBtn-BbCGGxkK.cjs → MazBtn-BKk3IsoH.cjs} +2 -2
- package/modules/chunks/{MazIcon-BDSXZYZ8.cjs → MazIcon-BEnQqDG6.cjs} +1 -1
- package/modules/chunks/{MazIcon-C2ch3jUS.mjs → MazIcon-BdDO3aVl.mjs} +1 -1
- package/modules/chunks/{MazSpinner-C9_xSbZZ.mjs → MazSpinner--BVvGFIO.mjs} +1 -1
- package/modules/chunks/{MazSpinner-BiyFRA4w.cjs → MazSpinner-PMlxvkWb.cjs} +1 -1
- package/modules/chunks/index-D5F2dSFa.cjs +124 -0
- package/modules/chunks/{index-Cwbjspv3.mjs → index-D7R1dvsf.mjs} +347 -347
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +3 -3
- package/nuxt/index.mjs +1 -1
- package/nuxt/types.d.mts +6 -12
- package/nuxt/types.d.ts +6 -12
- package/package.json +10 -10
- package/types/modules/composables/use-timer.d.ts +6 -1
- package/types/modules/plugins/toaster/MazToast.vue.d.ts +2 -2
- package/components/chunks/MazBtn-B1-sTc7F.mjs +0 -155
- package/components/chunks/MazBtn-ColLVUca.mjs +0 -150
- package/components/chunks/MazBtn-DJhQqzja.mjs +0 -150
- package/components/chunks/MazBtn-DuY28-0U.mjs +0 -150
- package/components/chunks/MazBtn-h3WmmaEO.mjs +0 -150
- package/components/chunks/MazBtn-zyRLUViT.mjs +0 -150
- package/components/chunks/MazSpinner-Bad2n-0k.mjs +0 -37
- package/components/chunks/MazSpinner-C6StE-Mb.mjs +0 -37
- package/components/chunks/MazSpinner-Cz2DHV6g.mjs +0 -37
- package/components/chunks/MazSpinner-D4CdHpP2.mjs +0 -37
- package/components/chunks/MazSpinner-DRj2VpGA.mjs +0 -37
- package/components/chunks/MazSpinner-aPFlrc5E.mjs +0 -37
- package/components/chunks/MazSpinner-nOD-7_sU.mjs +0 -37
- package/components/chunks/MazSpinner-yZGK-AQe.mjs +0 -37
- package/modules/chunks/MazBtn-UBHTKqaN.mjs +0 -150
- package/modules/chunks/index-tnjajVkX.cjs +0 -124
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as q, defineAsyncComponent as w, useAttrs as ne, useSlots as U, onBeforeMount as te, computed as r, openBlock as a, createBlock as u, resolveDynamicComponent as S, normalizeClass as z, withCtx as F, createElementBlock as v, createCommentVNode as i, renderSlot as C, unref as f, getCurrentInstance as oe, ref as O, onMounted as le, normalizeStyle as K, createElementVNode as T, withDirectives as ae, mergeProps as Y, toHandlers as ie, vModelDynamic as re, createTextVNode as se, toDisplayString as ue, withModifiers as j, createVNode as N, withKeys as L } from "vue";
|
|
2
2
|
import '../assets/MazInputNumber.css';function G(m, l) {
|
|
3
3
|
let n;
|
|
4
4
|
return function(...d) {
|
|
@@ -7,7 +7,7 @@ import '../assets/MazInputNumber.css';function G(m, l) {
|
|
|
7
7
|
}, l);
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
const de = /* @__PURE__ */
|
|
10
|
+
const de = /* @__PURE__ */ q({
|
|
11
11
|
__name: "MazBtn",
|
|
12
12
|
props: {
|
|
13
13
|
variant: { default: "button" },
|
|
@@ -24,48 +24,48 @@ const de = /* @__PURE__ */ L({
|
|
|
24
24
|
loading: { type: Boolean },
|
|
25
25
|
disabled: { type: Boolean },
|
|
26
26
|
fab: { type: Boolean },
|
|
27
|
-
icon: { default: void 0 },
|
|
28
|
-
leftIcon: { default: void 0 },
|
|
29
|
-
rightIcon: { default: void 0 },
|
|
27
|
+
icon: { type: [String, Function, Object], default: void 0 },
|
|
28
|
+
leftIcon: { type: [String, Function, Object], default: void 0 },
|
|
29
|
+
rightIcon: { type: [String, Function, Object], default: void 0 },
|
|
30
30
|
noPadding: { type: Boolean },
|
|
31
31
|
noElevation: { type: Boolean },
|
|
32
32
|
contentClass: { default: void 0 }
|
|
33
33
|
},
|
|
34
34
|
setup(m) {
|
|
35
|
-
const l = m, n = w(() => import("./MazSpinner-
|
|
36
|
-
|
|
35
|
+
const l = m, n = w(() => import("./MazSpinner-DVkxyBoy.mjs")), d = w(() => import("./MazIcon-BDGxCy9M.mjs")), { href: s, to: M } = ne(), k = U();
|
|
36
|
+
te(() => {
|
|
37
37
|
l.icon && !l.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
|
|
38
38
|
});
|
|
39
39
|
const I = r(() => s ? "a" : M ? "router-link" : "button"), B = r(
|
|
40
40
|
() => l.pastel ? `--${l.color}-pastel` : l.outline ? `--${l.color}-outline` : `--${l.color}`
|
|
41
41
|
), b = r(
|
|
42
42
|
() => (l.loading || l.disabled) && I.value === "button"
|
|
43
|
-
), y = r(() => b.value ? "--cursor-default" : "--cursor-pointer"), $ = r(() => `--is-${l.variant}`), h = r(() => l.loading && l.variant === "button"),
|
|
44
|
-
return (
|
|
43
|
+
), y = r(() => b.value ? "--cursor-default" : "--cursor-pointer"), $ = r(() => `--is-${l.variant}`), h = r(() => l.loading && l.variant === "button"), t = r(() => !!k["left-icon"] || l.leftIcon), c = r(() => !!k["right-icon"] || l.rightIcon), p = r(() => t.value || c.value), V = r(() => l.fab && (l.icon || !!k.icon)), E = r(() => I.value === "button" ? l.type : void 0);
|
|
44
|
+
return (o, R) => (a(), u(S(I.value), {
|
|
45
45
|
disabled: b.value || void 0,
|
|
46
46
|
class: z(["m-btn", [
|
|
47
|
-
`--${
|
|
48
|
-
!
|
|
47
|
+
`--${o.size}`,
|
|
48
|
+
!o.fab && o.roundedSize && `--rounded-${o.roundedSize}`,
|
|
49
49
|
B.value,
|
|
50
50
|
y.value,
|
|
51
51
|
$.value,
|
|
52
52
|
{
|
|
53
|
-
"--block":
|
|
54
|
-
"--no-underline":
|
|
55
|
-
"--fab":
|
|
56
|
-
"--loading":
|
|
53
|
+
"--block": o.block,
|
|
54
|
+
"--no-underline": o.noUnderline,
|
|
55
|
+
"--fab": o.fab,
|
|
56
|
+
"--loading": o.loading,
|
|
57
57
|
"--disabled": b.value,
|
|
58
58
|
"--icon": p.value,
|
|
59
|
-
"--rounded":
|
|
60
|
-
"--no-rounded":
|
|
61
|
-
"--no-padding":
|
|
62
|
-
"--no-elevation":
|
|
59
|
+
"--rounded": o.rounded,
|
|
60
|
+
"--no-rounded": o.noRounded,
|
|
61
|
+
"--no-padding": o.noPadding,
|
|
62
|
+
"--no-elevation": o.noElevation
|
|
63
63
|
}
|
|
64
64
|
]]),
|
|
65
|
-
type:
|
|
65
|
+
type: E.value
|
|
66
66
|
}, {
|
|
67
|
-
default:
|
|
68
|
-
|
|
67
|
+
default: F(() => [
|
|
68
|
+
t.value ? (a(), v(
|
|
69
69
|
"div",
|
|
70
70
|
{
|
|
71
71
|
key: 0,
|
|
@@ -75,17 +75,17 @@ const de = /* @__PURE__ */ L({
|
|
|
75
75
|
i(`
|
|
76
76
|
@slot left-icon - The icon to display on the left of the button
|
|
77
77
|
`),
|
|
78
|
-
C(
|
|
79
|
-
typeof
|
|
78
|
+
C(o.$slots, "left-icon", {}, () => [
|
|
79
|
+
typeof o.leftIcon == "string" ? (a(), u(f(d), {
|
|
80
80
|
key: 0,
|
|
81
|
-
name:
|
|
82
|
-
}, null, 8, ["name"])) :
|
|
81
|
+
name: o.leftIcon
|
|
82
|
+
}, null, 8, ["name"])) : o.leftIcon ? (a(), u(S(o.leftIcon), { key: 1 })) : i("v-if", !0)
|
|
83
83
|
], !0)
|
|
84
84
|
],
|
|
85
85
|
2
|
|
86
86
|
/* CLASS */
|
|
87
87
|
)) : i("v-if", !0),
|
|
88
|
-
|
|
88
|
+
V.value ? (a(), v(
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
91
91
|
key: 1,
|
|
@@ -95,32 +95,32 @@ const de = /* @__PURE__ */ L({
|
|
|
95
95
|
i(`
|
|
96
96
|
@slot icon - The icon to display on the fab button
|
|
97
97
|
`),
|
|
98
|
-
C(
|
|
99
|
-
typeof
|
|
98
|
+
C(o.$slots, "icon", {}, () => [
|
|
99
|
+
typeof o.icon == "string" ? (a(), u(f(d), {
|
|
100
100
|
key: 0,
|
|
101
|
-
name:
|
|
102
|
-
}, null, 8, ["name"])) :
|
|
101
|
+
name: o.icon
|
|
102
|
+
}, null, 8, ["name"])) : o.icon ? (a(), u(S(o.icon), { key: 1 })) : i("v-if", !0)
|
|
103
103
|
], !0)
|
|
104
104
|
],
|
|
105
105
|
2
|
|
106
106
|
/* CLASS */
|
|
107
107
|
)) : i("v-if", !0),
|
|
108
|
-
|
|
108
|
+
o.$slots.default ? (a(), v(
|
|
109
109
|
"span",
|
|
110
110
|
{
|
|
111
111
|
key: 2,
|
|
112
|
-
class: z([{ "maz-invisible": h.value },
|
|
112
|
+
class: z([{ "maz-invisible": h.value }, o.contentClass])
|
|
113
113
|
},
|
|
114
114
|
[
|
|
115
115
|
i(`
|
|
116
116
|
@slot default - The content of the button
|
|
117
117
|
`),
|
|
118
|
-
C(
|
|
118
|
+
C(o.$slots, "default", {}, void 0, !0)
|
|
119
119
|
],
|
|
120
120
|
2
|
|
121
121
|
/* CLASS */
|
|
122
122
|
)) : i("v-if", !0),
|
|
123
|
-
|
|
123
|
+
c.value ? (a(), v(
|
|
124
124
|
"div",
|
|
125
125
|
{
|
|
126
126
|
key: 3,
|
|
@@ -130,21 +130,21 @@ const de = /* @__PURE__ */ L({
|
|
|
130
130
|
i(`
|
|
131
131
|
@slot right-icon - The icon to display on the right of the button
|
|
132
132
|
`),
|
|
133
|
-
C(
|
|
134
|
-
typeof
|
|
133
|
+
C(o.$slots, "right-icon", {}, () => [
|
|
134
|
+
typeof o.rightIcon == "string" ? (a(), u(f(d), {
|
|
135
135
|
key: 0,
|
|
136
|
-
name:
|
|
137
|
-
}, null, 8, ["name"])) :
|
|
136
|
+
name: o.rightIcon
|
|
137
|
+
}, null, 8, ["name"])) : o.rightIcon ? (a(), u(S(o.rightIcon), { key: 1 })) : i("v-if", !0)
|
|
138
138
|
], !0)
|
|
139
139
|
],
|
|
140
140
|
2
|
|
141
141
|
/* CLASS */
|
|
142
142
|
)) : i("v-if", !0),
|
|
143
|
-
h.value ? (a(), u(
|
|
143
|
+
h.value ? (a(), u(f(n), {
|
|
144
144
|
key: 4,
|
|
145
145
|
class: "m-btn-loader",
|
|
146
146
|
size: "2em",
|
|
147
|
-
color:
|
|
147
|
+
color: o.color
|
|
148
148
|
}, null, 8, ["color"])) : i("v-if", !0)
|
|
149
149
|
]),
|
|
150
150
|
_: 3
|
|
@@ -156,15 +156,15 @@ const de = /* @__PURE__ */ L({
|
|
|
156
156
|
for (const [d, s] of l)
|
|
157
157
|
n[d] = s;
|
|
158
158
|
return n;
|
|
159
|
-
},
|
|
159
|
+
}, A = /* @__PURE__ */ H(de, [["__scopeId", "data-v-48f14785"]]), ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
160
160
|
__proto__: null,
|
|
161
|
-
default:
|
|
161
|
+
default: A
|
|
162
162
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
163
|
-
function
|
|
163
|
+
function fe({
|
|
164
164
|
componentName: m,
|
|
165
165
|
providedId: l
|
|
166
166
|
}) {
|
|
167
|
-
const n =
|
|
167
|
+
const n = oe();
|
|
168
168
|
return r(() => l ?? `${m}-${n == null ? void 0 : n.uid}`);
|
|
169
169
|
}
|
|
170
170
|
const me = {
|
|
@@ -173,7 +173,7 @@ const me = {
|
|
|
173
173
|
}, pe = { class: "m-input-wrapper-input" }, ve = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], be = { key: 0 }, ye = {
|
|
174
174
|
key: 1,
|
|
175
175
|
class: "m-input-wrapper-right"
|
|
176
|
-
}, he = /* @__PURE__ */
|
|
176
|
+
}, he = /* @__PURE__ */ q({
|
|
177
177
|
inheritAttrs: !1,
|
|
178
178
|
__name: "MazInput",
|
|
179
179
|
props: {
|
|
@@ -204,14 +204,14 @@ const me = {
|
|
|
204
204
|
validButtonLoading: { type: Boolean, default: !1 },
|
|
205
205
|
autoFocus: { type: Boolean, default: !1 },
|
|
206
206
|
borderActive: { type: Boolean, default: !1 },
|
|
207
|
-
leftIcon: { default: void 0 },
|
|
208
|
-
rightIcon: { default: void 0 },
|
|
207
|
+
leftIcon: { type: [String, Function, Object], default: void 0 },
|
|
208
|
+
rightIcon: { type: [String, Function, Object], default: void 0 },
|
|
209
209
|
roundedSize: { default: void 0 },
|
|
210
210
|
block: { type: Boolean }
|
|
211
211
|
},
|
|
212
212
|
emits: ["update:model-value", "focus", "blur", "click", "change"],
|
|
213
213
|
setup(m, { emit: l }) {
|
|
214
|
-
const n = m, d = l, s = w(() => Promise.resolve().then(() =>
|
|
214
|
+
const n = m, d = l, s = w(() => Promise.resolve().then(() => ce)), M = w(() => import("./MazIcon-BDGxCy9M.mjs")), k = w(() => import("./eye-slash-tjfxO0LK.mjs")), I = w(() => import("./eye-DqO_Jx56.mjs")), B = w(() => import("./check-CL-vqe79.mjs")), b = O(!1), y = O(!1), $ = O(), h = fe({
|
|
215
215
|
componentName: "MazInput",
|
|
216
216
|
providedId: n.id
|
|
217
217
|
});
|
|
@@ -219,7 +219,7 @@ const me = {
|
|
|
219
219
|
var e;
|
|
220
220
|
n.autoFocus && ((e = $.value) == null || e.focus());
|
|
221
221
|
});
|
|
222
|
-
const
|
|
222
|
+
const t = r(() => n.type === "password"), c = r(() => b.value ? "text" : n.type), p = r(() => {
|
|
223
223
|
if (!n.noBorder) {
|
|
224
224
|
if (n.error)
|
|
225
225
|
return "maz-border-danger";
|
|
@@ -247,11 +247,11 @@ const me = {
|
|
|
247
247
|
}
|
|
248
248
|
return "--default-border";
|
|
249
249
|
}
|
|
250
|
-
}),
|
|
250
|
+
}), V = U(), E = r(() => {
|
|
251
251
|
const { required: e, placeholder: g } = n;
|
|
252
252
|
if (g)
|
|
253
253
|
return e ? `${g} *` : g;
|
|
254
|
-
}),
|
|
254
|
+
}), o = r(() => P.value !== void 0 && P.value !== ""), R = G(
|
|
255
255
|
(e) => {
|
|
256
256
|
d("update:model-value", e);
|
|
257
257
|
},
|
|
@@ -259,18 +259,18 @@ const me = {
|
|
|
259
259
|
);
|
|
260
260
|
function J(e) {
|
|
261
261
|
if (n.debounce)
|
|
262
|
-
return
|
|
262
|
+
return R(e);
|
|
263
263
|
d("update:model-value", e);
|
|
264
264
|
}
|
|
265
|
-
const
|
|
265
|
+
const P = r({
|
|
266
266
|
get: () => n.modelValue,
|
|
267
267
|
set: (e) => J(e)
|
|
268
|
-
}), Q = r(() => (!!n.label || !!n.hint) && (y.value || !!
|
|
268
|
+
}), Q = r(() => (!!n.label || !!n.hint) && (y.value || !!o.value || !!n.placeholder || ["date", "month", "week"].includes(n.type))), W = r(() => !!n.label || !!n.hint);
|
|
269
269
|
function X() {
|
|
270
|
-
return !!
|
|
270
|
+
return !!V["right-icon"] || t.value || !!V["valid-button"] || n.validButton || !!n.rightIcon;
|
|
271
271
|
}
|
|
272
272
|
function Z() {
|
|
273
|
-
return !!
|
|
273
|
+
return !!V["left-icon"] || !!n.leftIcon;
|
|
274
274
|
}
|
|
275
275
|
function _(e) {
|
|
276
276
|
d("focus", e), y.value = !0;
|
|
@@ -302,7 +302,7 @@ const me = {
|
|
|
302
302
|
style: K(e.style)
|
|
303
303
|
},
|
|
304
304
|
[
|
|
305
|
-
|
|
305
|
+
T(
|
|
306
306
|
"div",
|
|
307
307
|
{
|
|
308
308
|
class: z(["m-input-wrapper", [
|
|
@@ -317,27 +317,27 @@ const me = {
|
|
|
317
317
|
@slot left-icon - The icon to display on the left of the input
|
|
318
318
|
`),
|
|
319
319
|
e.$slots["left-icon"] || e.leftIcon ? C(e.$slots, "left-icon", { key: 0 }, () => [
|
|
320
|
-
typeof e.leftIcon == "string" ? (a(), u(
|
|
320
|
+
typeof e.leftIcon == "string" ? (a(), u(f(M), {
|
|
321
321
|
key: 0,
|
|
322
322
|
name: e.leftIcon,
|
|
323
323
|
class: "maz-text-xl maz-text-muted"
|
|
324
|
-
}, null, 8, ["name"])) : e.leftIcon ? (a(), u(
|
|
324
|
+
}, null, 8, ["name"])) : e.leftIcon ? (a(), u(S(e.leftIcon), {
|
|
325
325
|
key: 1,
|
|
326
326
|
class: "maz-text-xl maz-text-muted"
|
|
327
327
|
})) : i("v-if", !0)
|
|
328
328
|
], !0) : i("v-if", !0)
|
|
329
329
|
])) : i("v-if", !0),
|
|
330
|
-
|
|
331
|
-
ae(
|
|
332
|
-
id:
|
|
330
|
+
T("div", pe, [
|
|
331
|
+
ae(T("input", Y({
|
|
332
|
+
id: f(h),
|
|
333
333
|
ref_key: "input",
|
|
334
334
|
ref: $,
|
|
335
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
336
|
-
type:
|
|
335
|
+
"onUpdate:modelValue": g[0] || (g[0] = (D) => P.value = D),
|
|
336
|
+
type: c.value,
|
|
337
337
|
name: e.name
|
|
338
338
|
}, e.$attrs, {
|
|
339
339
|
inputmode: e.inputmode,
|
|
340
|
-
placeholder:
|
|
340
|
+
placeholder: E.value,
|
|
341
341
|
"aria-label": e.label || e.placeholder,
|
|
342
342
|
disabled: e.disabled,
|
|
343
343
|
readonly: e.readonly,
|
|
@@ -348,9 +348,9 @@ const me = {
|
|
|
348
348
|
focus: _,
|
|
349
349
|
change: ee
|
|
350
350
|
}, !0), {
|
|
351
|
-
onClick: g[1] || (g[1] = (
|
|
351
|
+
onClick: g[1] || (g[1] = (D) => e.$emit("click", D))
|
|
352
352
|
}), null, 16, ve), [
|
|
353
|
-
[re,
|
|
353
|
+
[re, P.value]
|
|
354
354
|
]),
|
|
355
355
|
e.label || e.hint ? (a(), v(
|
|
356
356
|
"span",
|
|
@@ -381,27 +381,27 @@ const me = {
|
|
|
381
381
|
@slot right-icon - The icon to display on the right of the input
|
|
382
382
|
`),
|
|
383
383
|
e.$slots["right-icon"] || e.rightIcon ? C(e.$slots, "right-icon", { key: 0 }, () => [
|
|
384
|
-
typeof e.rightIcon == "string" ? (a(), u(
|
|
384
|
+
typeof e.rightIcon == "string" ? (a(), u(f(M), {
|
|
385
385
|
key: 0,
|
|
386
386
|
name: e.rightIcon,
|
|
387
387
|
class: "maz-text-xl maz-text-muted"
|
|
388
|
-
}, null, 8, ["name"])) : e.rightIcon ? (a(), u(
|
|
388
|
+
}, null, 8, ["name"])) : e.rightIcon ? (a(), u(S(e.rightIcon), {
|
|
389
389
|
key: 1,
|
|
390
390
|
class: "maz-text-xl maz-text-muted"
|
|
391
391
|
})) : i("v-if", !0)
|
|
392
392
|
], !0) : i("v-if", !0),
|
|
393
|
-
|
|
393
|
+
t.value ? (a(), u(f(s), {
|
|
394
394
|
key: 1,
|
|
395
395
|
color: "transparent",
|
|
396
396
|
tabindex: "-1",
|
|
397
397
|
size: "mini",
|
|
398
|
-
onClick: g[2] || (g[2] =
|
|
398
|
+
onClick: g[2] || (g[2] = j((D) => b.value = !b.value, ["stop"]))
|
|
399
399
|
}, {
|
|
400
|
-
default:
|
|
401
|
-
b.value ? (a(), u(
|
|
400
|
+
default: F(() => [
|
|
401
|
+
b.value ? (a(), u(f(k), {
|
|
402
402
|
key: 0,
|
|
403
403
|
class: "maz-text-xl maz-text-muted"
|
|
404
|
-
})) : (a(), u(
|
|
404
|
+
})) : (a(), u(f(I), {
|
|
405
405
|
key: 1,
|
|
406
406
|
class: "maz-text-xl maz-text-muted"
|
|
407
407
|
}))
|
|
@@ -413,7 +413,7 @@ const me = {
|
|
|
413
413
|
@slot valid-button - Replace the valid button by your own
|
|
414
414
|
`),
|
|
415
415
|
e.$slots["valid-button"] || e.validButton ? C(e.$slots, "valid-button", { key: 2 }, () => [
|
|
416
|
-
|
|
416
|
+
N(f(s), {
|
|
417
417
|
color: "transparent",
|
|
418
418
|
disabled: e.disabled,
|
|
419
419
|
tabindex: "-1",
|
|
@@ -422,8 +422,8 @@ const me = {
|
|
|
422
422
|
size: "mini",
|
|
423
423
|
type: "submit"
|
|
424
424
|
}, {
|
|
425
|
-
default:
|
|
426
|
-
|
|
425
|
+
default: F(() => [
|
|
426
|
+
N(f(B), { class: "maz-text-2xl maz-text-normal" })
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
429
429
|
/* STABLE */
|
|
@@ -445,7 +445,7 @@ const me = {
|
|
|
445
445
|
height: "1em",
|
|
446
446
|
fill: "none",
|
|
447
447
|
viewBox: "0 0 24 24"
|
|
448
|
-
}, ke = /* @__PURE__ */
|
|
448
|
+
}, ke = /* @__PURE__ */ T(
|
|
449
449
|
"path",
|
|
450
450
|
{
|
|
451
451
|
stroke: "currentColor",
|
|
@@ -469,7 +469,7 @@ const $e = { render: Be }, we = {
|
|
|
469
469
|
height: "1em",
|
|
470
470
|
fill: "none",
|
|
471
471
|
viewBox: "0 0 24 24"
|
|
472
|
-
}, Ce = /* @__PURE__ */
|
|
472
|
+
}, Ce = /* @__PURE__ */ T(
|
|
473
473
|
"path",
|
|
474
474
|
{
|
|
475
475
|
stroke: "currentColor",
|
|
@@ -484,10 +484,10 @@ const $e = { render: Be }, we = {
|
|
|
484
484
|
), Me = [
|
|
485
485
|
Ce
|
|
486
486
|
];
|
|
487
|
-
function
|
|
487
|
+
function Se(m, l) {
|
|
488
488
|
return a(), v("svg", we, [...Me]);
|
|
489
489
|
}
|
|
490
|
-
const
|
|
490
|
+
const Ve = { render: Se }, Ne = /* @__PURE__ */ q({
|
|
491
491
|
inheritAttrs: !1,
|
|
492
492
|
__name: "MazInputNumber",
|
|
493
493
|
props: {
|
|
@@ -508,18 +508,18 @@ const Te = { render: Ve }, Se = /* @__PURE__ */ L({
|
|
|
508
508
|
setup(m, { emit: l }) {
|
|
509
509
|
const n = m, d = l, s = r({
|
|
510
510
|
get: () => n.modelValue,
|
|
511
|
-
set: (
|
|
511
|
+
set: (t) => B(t)
|
|
512
512
|
});
|
|
513
|
-
function M(
|
|
514
|
-
return Math.round(
|
|
513
|
+
function M(t) {
|
|
514
|
+
return Math.round(t / n.step) * n.step;
|
|
515
515
|
}
|
|
516
|
-
function k(
|
|
517
|
-
if (typeof
|
|
518
|
-
return
|
|
516
|
+
function k(t) {
|
|
517
|
+
if (typeof t == "number")
|
|
518
|
+
return t <= n.min ? n.min : t >= n.max ? n.max : M(t);
|
|
519
519
|
}
|
|
520
|
-
const I = G((
|
|
521
|
-
function B(
|
|
522
|
-
|
|
520
|
+
const I = G((t) => B(t), 300);
|
|
521
|
+
function B(t) {
|
|
522
|
+
t = k(t), s.value !== t && d("update:model-value", t);
|
|
523
523
|
}
|
|
524
524
|
B(s.value);
|
|
525
525
|
const b = r(() => n.modelValue && n.modelValue >= n.max), y = r(() => n.modelValue && n.modelValue <= n.min);
|
|
@@ -541,62 +541,62 @@ const Te = { render: Ve }, Se = /* @__PURE__ */ L({
|
|
|
541
541
|
s.value = (s.value ?? 0) - 1 * n.step;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
return (
|
|
544
|
+
return (t, c) => (a(), v(
|
|
545
545
|
"div",
|
|
546
546
|
{
|
|
547
|
-
class: z(["m-input-number", [`m-input-number--${
|
|
548
|
-
style: K(
|
|
547
|
+
class: z(["m-input-number", [`m-input-number--${t.size}`, n.class, { "--block": t.block }]]),
|
|
548
|
+
style: K(t.style)
|
|
549
549
|
},
|
|
550
550
|
[
|
|
551
|
-
|
|
551
|
+
t.noButtons ? i("v-if", !0) : (a(), u(A, {
|
|
552
552
|
key: 0,
|
|
553
553
|
color: "transparent",
|
|
554
|
-
size:
|
|
554
|
+
size: t.size,
|
|
555
555
|
tabindex: "-1",
|
|
556
556
|
class: "m-input-number__button m-input-number__decrement-button",
|
|
557
|
-
disabled: y.value ||
|
|
557
|
+
disabled: y.value || t.disabled,
|
|
558
558
|
onClick: h
|
|
559
559
|
}, {
|
|
560
|
-
default:
|
|
561
|
-
|
|
560
|
+
default: F(() => [
|
|
561
|
+
N(f(Ve), { class: "m-input-number__button__icon" })
|
|
562
562
|
]),
|
|
563
563
|
_: 1
|
|
564
564
|
/* STABLE */
|
|
565
565
|
}, 8, ["size", "disabled"])),
|
|
566
|
-
|
|
566
|
+
N(ge, Y({
|
|
567
567
|
"model-value": s.value,
|
|
568
568
|
type: "number",
|
|
569
|
-
class: ["m-input-number__input", { "--no-buttons":
|
|
570
|
-
disabled:
|
|
571
|
-
min:
|
|
572
|
-
max:
|
|
573
|
-
step:
|
|
574
|
-
},
|
|
575
|
-
inputmode:
|
|
576
|
-
size:
|
|
569
|
+
class: ["m-input-number__input", { "--no-buttons": t.noButtons, "--text-center": t.textCenter }],
|
|
570
|
+
disabled: t.disabled,
|
|
571
|
+
min: t.min,
|
|
572
|
+
max: t.max,
|
|
573
|
+
step: t.step
|
|
574
|
+
}, t.$attrs, {
|
|
575
|
+
inputmode: t.inputmode,
|
|
576
|
+
size: t.size,
|
|
577
577
|
block: "",
|
|
578
578
|
onKeydown: [
|
|
579
|
-
|
|
580
|
-
|
|
579
|
+
L(j($, ["prevent"]), ["up"]),
|
|
580
|
+
L(j(h, ["prevent"]), ["down"])
|
|
581
581
|
],
|
|
582
|
-
onFocus:
|
|
583
|
-
onChange:
|
|
584
|
-
onBlur:
|
|
585
|
-
onClick:
|
|
586
|
-
"onUpdate:modelValue":
|
|
582
|
+
onFocus: c[0] || (c[0] = (p) => t.$emit("focus", p)),
|
|
583
|
+
onChange: c[1] || (c[1] = (p) => t.$emit("change", p)),
|
|
584
|
+
onBlur: c[2] || (c[2] = (p) => t.$emit("blur", p)),
|
|
585
|
+
onClick: c[3] || (c[3] = (p) => t.$emit("click", p)),
|
|
586
|
+
"onUpdate:modelValue": c[4] || (c[4] = (p) => f(I)(p))
|
|
587
587
|
}), null, 16, ["model-value", "class", "disabled", "min", "max", "step", "inputmode", "size", "onKeydown"]),
|
|
588
|
-
|
|
588
|
+
t.noButtons ? i("v-if", !0) : (a(), u(A, {
|
|
589
589
|
key: 1,
|
|
590
590
|
color: "transparent",
|
|
591
591
|
"no-shadow": "",
|
|
592
592
|
tabindex: "-1",
|
|
593
|
-
size:
|
|
593
|
+
size: t.size,
|
|
594
594
|
class: "m-input-number__button m-input-number__increment-button",
|
|
595
|
-
disabled: b.value ||
|
|
595
|
+
disabled: b.value || t.disabled,
|
|
596
596
|
onClick: $
|
|
597
597
|
}, {
|
|
598
|
-
default:
|
|
599
|
-
|
|
598
|
+
default: F(() => [
|
|
599
|
+
N(f($e), { class: "m-input-number__button__icon" })
|
|
600
600
|
]),
|
|
601
601
|
_: 1
|
|
602
602
|
/* STABLE */
|
|
@@ -609,5 +609,5 @@ const Te = { render: Ve }, Se = /* @__PURE__ */ L({
|
|
|
609
609
|
});
|
|
610
610
|
export {
|
|
611
611
|
H as _,
|
|
612
|
-
|
|
612
|
+
Ne as a
|
|
613
613
|
};
|