maz-ui 3.49.0 → 3.49.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/MazAnimatedCounter.mjs +78 -73
- package/components/MazAnimatedElement.mjs +12 -12
- package/components/MazAnimatedText.mjs +5 -5
- 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/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +128 -123
- 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/MazInput.mjs +1 -1
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazSelect.mjs +1 -1
- package/components/MazTable.mjs +1 -1
- package/components/assets/MazAnimatedCounter.css +1 -1
- package/components/assets/MazAnimatedElement.css +1 -1
- package/components/assets/MazAnimatedText.css +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazCard.css +1 -1
- package/components/assets/MazCircularProgressBar.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazPagination.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/chunks/{MazBottomSheet-CNFupuJS.mjs → MazBottomSheet-CIXEEUpN.mjs} +1 -1
- package/components/chunks/MazBtn-9Jk8ZkBq.mjs +103 -0
- package/components/chunks/{MazBtn-BJNzz7YT.mjs → MazBtn-BHD7Xbr_.mjs} +3 -3
- package/components/chunks/{MazBtn-CKDJOBcC.mjs → MazBtn-BT4o0zLa.mjs} +2 -2
- package/components/chunks/{MazBtn-D53RC3KP.mjs → MazBtn-Ba8ff2Nu.mjs} +3 -3
- package/components/chunks/{MazBtn-DYURBZtp.mjs → MazBtn-Bdhu8JTk.mjs} +2 -2
- package/components/chunks/{MazBtn-BO1U1gVG.mjs → MazBtn-CbTqLKv1.mjs} +3 -3
- package/components/chunks/MazBtn-DAzJbcTl.mjs +103 -0
- package/components/chunks/{MazBtn-CP-m-KDm.mjs → MazBtn-DCGXwqRM.mjs} +3 -3
- package/components/chunks/MazBtn-DGIjSCP2.mjs +103 -0
- package/components/chunks/{MazBtn-CUoFOAML.mjs → MazBtn-DXinft-p.mjs} +3 -3
- package/components/chunks/MazBtn-DnpSuILi.mjs +103 -0
- package/components/chunks/{MazBtn-BugQGoO-.mjs → MazBtn-GYr50Ap4.mjs} +3 -3
- package/components/chunks/{MazBtn-Cyn7ObTB.mjs → MazBtn-IBh1tCot.mjs} +3 -3
- package/components/chunks/{MazBtn-MvFibIXn.mjs → MazBtn-UDAwHekF.mjs} +3 -3
- package/components/chunks/{MazCard-D-q6vhWd.mjs → MazCard-CQBFy8r_.mjs} +4 -4
- package/components/chunks/{MazCarousel-Z4XypOn_.mjs → MazCarousel-Bcn7nKDo.mjs} +1 -1
- package/components/chunks/{MazCheckbox-DJi0g4uK.mjs → MazCheckbox-B8Rnqa6O.mjs} +1 -1
- package/components/chunks/{MazCheckbox-DafMJoEw.mjs → MazCheckbox-Br41Nrq7.mjs} +1 -1
- package/components/chunks/{MazCheckbox-BImOZ1aM.mjs → MazCheckbox-t4i9eR04.mjs} +1 -1
- package/components/chunks/{MazChecklist-DaEf6wix.mjs → MazChecklist-DLr57bfX.mjs} +1 -1
- package/components/chunks/{MazDialog-PVsds2Mw.mjs → MazDialog-ak7mSNff.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-BdtiOZGU.mjs → MazDialogPromise-JvS9f5Of.mjs} +2 -2
- package/components/chunks/{MazDrawer-CMHe_JEh.mjs → MazDrawer-CTsb4x_4.mjs} +1 -1
- package/components/chunks/{MazDropdown-DpGSAqe0.mjs → MazDropdown-BxMokXYe.mjs} +1 -1
- package/components/chunks/{MazGallery-BtuCo-H0.mjs → MazGallery-C7Zp1iYc.mjs} +2 -2
- package/components/chunks/MazIcon-C47uJeFY.mjs +4 -0
- package/components/chunks/{MazIcon-Bnebkvf6.mjs → MazIcon-mGVzj6Xw.mjs} +1 -1
- package/components/chunks/{MazInput-C3QweR84.mjs → MazInput-BK2OXh6D.mjs} +73 -84
- package/components/chunks/{MazInput-DvaaM9Iq.mjs → MazInput-BWHAOFtO.mjs} +66 -77
- package/components/chunks/{MazInput-DjvBbUZl.mjs → MazInput-C2_KlBtJ.mjs} +67 -78
- package/components/chunks/{MazInputNumber-D904Pg1R.mjs → MazInputNumber-Bw6O0AGT.mjs} +104 -115
- package/components/chunks/{MazInputPrice-CQiJFPWB.mjs → MazInputPrice-BCM9ga_h.mjs} +104 -115
- package/components/chunks/{MazInputTags-BPSG1X1a.mjs → MazInputTags-B0B93sN-.mjs} +127 -138
- package/components/chunks/{MazLink-DnnBkVEE.mjs → MazLink-PEtIzV5x.mjs} +1 -1
- package/components/chunks/{MazLoadingBar-Dm14PSs6.mjs → MazLoadingBar-BjzRnYVR.mjs} +1 -1
- package/components/chunks/{MazPagination-CuCKS1Qr.mjs → MazPagination-DKseqKmF.mjs} +2 -2
- package/components/chunks/{MazPhoneNumberInput-CKpP3yWz.mjs → MazPhoneNumberInput-CPm6LjfT.mjs} +354 -365
- package/components/chunks/MazPicker-BHBE1cC_.mjs +2482 -0
- package/components/chunks/{MazPickerMonthSwitcher-BDxk_Msi.mjs → MazPickerMonthSwitcher-CXfxTBNH.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-DtHvsdEW.mjs → MazPickerShortcuts-BLuYu65Q.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DXkaTXFw.mjs → MazPickerYearSwitcher-CpSOH48Y.mjs} +1 -1
- package/components/chunks/{MazSelect-VAPsGKXy.mjs → MazSelect-CdSRiSW9.mjs} +3 -3
- package/components/chunks/{MazSelect-cthYMQqx.mjs → MazSelect-uHsahxjj.mjs} +188 -199
- package/components/chunks/{MazSpinner-Ba5WXlbx.mjs → MazSpinner-B3mUm5mz.mjs} +1 -1
- package/components/chunks/MazSpinner-B698e0ut.mjs +34 -0
- package/components/chunks/{MazSpinner-B5j5EaKc.mjs → MazSpinner-BEW98Fow.mjs} +1 -1
- package/components/chunks/{MazSpinner-94rvbsAk.mjs → MazSpinner-BqMt92KT.mjs} +1 -1
- package/components/chunks/{MazSpinner-DtFpBxRT.mjs → MazSpinner-Bs8Z0Ewo.mjs} +1 -1
- package/components/chunks/MazSpinner-C2OD6LW3.mjs +34 -0
- package/components/chunks/MazSpinner-C3zQC9oz.mjs +34 -0
- package/components/chunks/MazSpinner-C5pIord0.mjs +34 -0
- package/components/chunks/MazSpinner-C8KOYxzi.mjs +34 -0
- package/components/chunks/{MazSpinner-DLR4lVAu.mjs → MazSpinner-C8zfJPRU.mjs} +1 -1
- package/components/chunks/{MazSpinner-BLh6PkZJ.mjs → MazSpinner-C_uLffb-.mjs} +1 -1
- package/components/chunks/{MazSpinner-C2mutMJX.mjs → MazSpinner-Cu7WoA4N.mjs} +1 -1
- package/components/chunks/MazSpinner-CyqPQ7SW.mjs +34 -0
- package/components/chunks/MazSpinner-DV634NYb.mjs +34 -0
- package/components/chunks/MazSpinner-DW_14RuN.mjs +34 -0
- package/components/chunks/{MazSpinner-SnOek826.mjs → MazSpinner-DwQiUPTZ.mjs} +1 -1
- package/components/chunks/MazSpinner-zV6qnXaD.mjs +34 -0
- package/components/chunks/{MazTable-BuFlCw1p.mjs → MazTable-B5BMpCK1.mjs} +1 -1
- package/components/chunks/{MazTableCell-C6oDOvNH.mjs → MazTableCell-7Ahz87mm.mjs} +1 -1
- package/components/chunks/{MazTableRow-BBS8sW7w.mjs → MazTableRow-B0JiP3mV.mjs} +1 -1
- package/components/chunks/{MazTableTitle-D7J-0k_j.mjs → MazTableTitle-BdajfMLo.mjs} +1 -1
- package/components/chunks/{MazTransitionExpand-BlcqxvGq.mjs → MazTransitionExpand-BO_9-l3g.mjs} +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/chunks/{MazBtn-BjiQC2PC.mjs → MazBtn-CvuJewxV.mjs} +3 -3
- package/modules/chunks/{MazBtn-BnQrui8R.cjs → MazBtn-eZwyrxMU.cjs} +1 -1
- package/modules/chunks/{MazIcon-DwFVj44O.mjs → MazIcon-CeCRHfan.mjs} +1 -1
- package/modules/chunks/{MazIcon-D4oz63T8.cjs → MazIcon-u9VBpDx8.cjs} +1 -1
- package/modules/chunks/{MazSpinner-B18bQ49b.cjs → MazSpinner-BY5lnQ7u.cjs} +1 -1
- package/modules/chunks/{MazSpinner-7nqeVBxW.mjs → MazSpinner-DdDJ5vzJ.mjs} +1 -1
- package/modules/chunks/{index-D8S1X6Fy.mjs → index--62sMUK_.mjs} +4 -4
- package/modules/chunks/{index-IBifh-oY.cjs → index-Bq7zqUSE.cjs} +2 -2
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/components/chunks/MazBtn-DiYly5sp.mjs +0 -103
- package/components/chunks/MazBtn-Dlx6nLm2.mjs +0 -103
- package/components/chunks/MazBtn-MJYP-poo.mjs +0 -103
- package/components/chunks/MazBtn-tS9ACNLi.mjs +0 -103
- package/components/chunks/MazIcon-C7ZMosGw.mjs +0 -4
- package/components/chunks/MazPicker-g10_1sY_.mjs +0 -2493
- package/components/chunks/MazSpinner-C7TbmneX.mjs +0 -34
- package/components/chunks/MazSpinner-CcshuKK9.mjs +0 -34
- package/components/chunks/MazSpinner-D2J_jdkK.mjs +0 -34
- package/components/chunks/MazSpinner-DIzWfhcT.mjs +0 -34
- package/components/chunks/MazSpinner-DP019rLG.mjs +0 -34
- package/components/chunks/MazSpinner-DXCofnqs.mjs +0 -34
- package/components/chunks/MazSpinner-DmeOhZXm.mjs +0 -34
- package/components/chunks/MazSpinner-ZDRUpUqo.mjs +0 -34
- package/components/chunks/MazSpinner-qRqfN8k4.mjs +0 -34
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { _ as
|
|
4
|
-
import '../assets/MazInput.css';function
|
|
1
|
+
import { defineComponent as Q, defineAsyncComponent as f, ref as h, onMounted as W, computed as r, useSlots as X, openBlock as o, createElementBlock as u, normalizeClass as m, normalizeStyle as Y, unref as l, toDisplayString as g, createCommentVNode as a, createElementVNode as k, renderSlot as I, createBlock as s, resolveDynamicComponent as V, withDirectives as Z, mergeProps as x, toHandlers as _, vModelDynamic as ee, withModifiers as te, withCtx as L, createVNode as M } from "vue";
|
|
2
|
+
import { u as oe } from "./useInstanceUniqId-BkOfxhk8.mjs";
|
|
3
|
+
import { _ as ae } from "./MazTable-B5BMpCK1.mjs";
|
|
4
|
+
import '../assets/MazInput.css';function le(b, y) {
|
|
5
5
|
let t;
|
|
6
|
-
return function(...
|
|
6
|
+
return function(...n) {
|
|
7
7
|
clearTimeout(t), t = setTimeout(() => {
|
|
8
|
-
b.apply(this,
|
|
8
|
+
b.apply(this, n);
|
|
9
9
|
}, y);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const ne = ["for"], re = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "m-input-wrapper-left"
|
|
15
|
-
},
|
|
15
|
+
}, se = ["id", "name", "placeholder", "aria-label", "type", "inputmode", "disabled", "readonly", "autocomplete", "required"], ie = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "m-input-wrapper-right"
|
|
18
|
-
},
|
|
18
|
+
}, ue = /* @__PURE__ */ Q({
|
|
19
19
|
inheritAttrs: !1,
|
|
20
20
|
__name: "MazInput",
|
|
21
21
|
props: {
|
|
@@ -56,15 +56,15 @@ const ie = ["for"], se = {
|
|
|
56
56
|
},
|
|
57
57
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
58
58
|
setup(b, { emit: y }) {
|
|
59
|
-
const t = b,
|
|
59
|
+
const t = b, n = y, w = f(() => import("./MazBtn-IBh1tCot.mjs")), B = f(() => import("./MazIcon-DQXhsxp8.mjs")), T = f(() => import("./eye-slash-BoO00xzs.mjs")), D = f(() => import("./eye-f8zAUc30.mjs")), E = f(() => import("./check-C9Q_W85g.mjs")), p = h(!1), d = h(!1), $ = h(), C = oe({
|
|
60
60
|
componentName: "MazInput",
|
|
61
61
|
providedId: t.id
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
W(() => {
|
|
64
64
|
var e;
|
|
65
65
|
t.autoFocus && ((e = $.value) == null || e.focus());
|
|
66
66
|
});
|
|
67
|
-
const
|
|
67
|
+
const S = r(() => t.type === "password"), q = r(() => p.value ? "text" : t.type), A = r(() => {
|
|
68
68
|
if (!t.noBorder) {
|
|
69
69
|
if (t.error)
|
|
70
70
|
return "maz-border-danger";
|
|
@@ -92,51 +92,47 @@ const ie = ["for"], se = {
|
|
|
92
92
|
}
|
|
93
93
|
return "--default-border";
|
|
94
94
|
}
|
|
95
|
-
}), z =
|
|
96
|
-
const { required: e, placeholder: n } = t;
|
|
97
|
-
if (n)
|
|
98
|
-
return e ? `${n} *` : n;
|
|
99
|
-
}), A = i(() => c.value !== void 0 && c.value !== ""), F = re(
|
|
95
|
+
}), z = X(), F = r(() => c.value !== void 0 && c.value !== ""), N = le(
|
|
100
96
|
(e) => {
|
|
101
|
-
|
|
97
|
+
n("update:model-value", e);
|
|
102
98
|
},
|
|
103
99
|
typeof t.debounce == "number" ? t.debounce : t.debounceDelay ?? 500
|
|
104
100
|
);
|
|
105
|
-
function
|
|
101
|
+
function P(e) {
|
|
106
102
|
if (t.debounce)
|
|
107
|
-
return
|
|
108
|
-
|
|
103
|
+
return N(e);
|
|
104
|
+
n("update:model-value", e);
|
|
109
105
|
}
|
|
110
|
-
const c =
|
|
106
|
+
const c = r({
|
|
111
107
|
get: () => t.modelValue,
|
|
112
|
-
set: (e) =>
|
|
113
|
-
}),
|
|
114
|
-
function
|
|
115
|
-
return !!z["right-icon"] ||
|
|
108
|
+
set: (e) => P(e)
|
|
109
|
+
}), O = r(() => (!!t.label || !!t.hint) && (d.value || !!F.value || !!t.placeholder || ["date", "month", "week"].includes(t.type))), R = r(() => !!t.label || !!t.hint);
|
|
110
|
+
function U() {
|
|
111
|
+
return !!z["right-icon"] || S.value || !!z["valid-button"] || t.validButton || !!t.rightIcon;
|
|
116
112
|
}
|
|
117
|
-
function
|
|
113
|
+
function j() {
|
|
118
114
|
return !!z["left-icon"] || !!t.leftIcon;
|
|
119
115
|
}
|
|
116
|
+
function H(e) {
|
|
117
|
+
n("focus", e), d.value = !0;
|
|
118
|
+
}
|
|
120
119
|
function G(e) {
|
|
121
|
-
|
|
120
|
+
n("blur", e), d.value = !1;
|
|
122
121
|
}
|
|
123
122
|
function J(e) {
|
|
124
|
-
|
|
123
|
+
return n("change", e);
|
|
125
124
|
}
|
|
126
125
|
function K(e) {
|
|
127
|
-
return
|
|
128
|
-
}
|
|
129
|
-
function Q(e) {
|
|
130
|
-
return r("input", e);
|
|
126
|
+
return n("input", e);
|
|
131
127
|
}
|
|
132
|
-
return (e,
|
|
128
|
+
return (e, i) => (o(), u(
|
|
133
129
|
"div",
|
|
134
130
|
{
|
|
135
131
|
class: m(["m-input", [
|
|
136
132
|
{
|
|
137
133
|
"--is-focused": d.value || e.borderActive,
|
|
138
|
-
"--should-up":
|
|
139
|
-
"--has-label":
|
|
134
|
+
"--should-up": O.value,
|
|
135
|
+
"--has-label": R.value,
|
|
140
136
|
"--is-disabled": e.disabled,
|
|
141
137
|
"--is-readonly": e.readonly,
|
|
142
138
|
"--has-z-2": e.error || e.warning || e.success,
|
|
@@ -146,32 +142,32 @@ const ie = ["for"], se = {
|
|
|
146
142
|
t.class,
|
|
147
143
|
`--${e.color}`
|
|
148
144
|
]]),
|
|
149
|
-
style:
|
|
145
|
+
style: Y(e.style)
|
|
150
146
|
},
|
|
151
147
|
[
|
|
152
|
-
e.topLabel ? (o(),
|
|
148
|
+
e.topLabel ? (o(), u("label", {
|
|
153
149
|
key: 0,
|
|
154
150
|
for: l(C),
|
|
155
151
|
class: "m-input-top-label"
|
|
156
|
-
}, g(e.topLabel), 9,
|
|
152
|
+
}, g(e.topLabel), 9, ne)) : a("v-if", !0),
|
|
157
153
|
k(
|
|
158
154
|
"div",
|
|
159
155
|
{
|
|
160
156
|
class: m(["m-input-wrapper m-reset-css", [
|
|
161
157
|
e.inputClasses,
|
|
162
|
-
|
|
158
|
+
A.value,
|
|
163
159
|
e.roundedSize ? `--rounded-${e.roundedSize}` : { "maz-rounded": !e.noRadius },
|
|
164
160
|
{ "--block": e.block }
|
|
165
161
|
]])
|
|
166
162
|
},
|
|
167
163
|
[
|
|
168
|
-
|
|
164
|
+
j() ? (o(), u("div", re, [
|
|
169
165
|
e.$slots["left-icon"] || e.leftIcon ? I(e.$slots, "left-icon", { key: 0 }, () => [
|
|
170
|
-
typeof e.leftIcon == "string" ? (o(),
|
|
166
|
+
typeof e.leftIcon == "string" ? (o(), s(l(B), {
|
|
171
167
|
key: 0,
|
|
172
168
|
name: e.leftIcon,
|
|
173
169
|
class: "maz-text-xl maz-text-muted"
|
|
174
|
-
}, null, 8, ["name"])) : e.leftIcon ? (o(),
|
|
170
|
+
}, null, 8, ["name"])) : e.leftIcon ? (o(), s(V(e.leftIcon), {
|
|
175
171
|
key: 1,
|
|
176
172
|
class: "maz-text-xl maz-text-muted"
|
|
177
173
|
})) : a("v-if", !0)
|
|
@@ -183,31 +179,31 @@ const ie = ["for"], se = {
|
|
|
183
179
|
class: m(["m-input-wrapper-input", [`--${e.size}`, { "--top-label": !!e.topLabel }]])
|
|
184
180
|
},
|
|
185
181
|
[
|
|
186
|
-
|
|
182
|
+
Z(k("input", x({ id: l(C) }, e.$attrs, {
|
|
187
183
|
ref_key: "input",
|
|
188
184
|
ref: $,
|
|
189
|
-
"onUpdate:modelValue":
|
|
185
|
+
"onUpdate:modelValue": i[0] || (i[0] = (v) => c.value = v),
|
|
190
186
|
name: e.name,
|
|
191
|
-
placeholder:
|
|
187
|
+
placeholder: e.placeholder,
|
|
192
188
|
"aria-label": e.label || e.placeholder,
|
|
193
|
-
type:
|
|
189
|
+
type: q.value,
|
|
194
190
|
inputmode: e.inputmode,
|
|
195
191
|
disabled: e.disabled,
|
|
196
192
|
readonly: e.readonly,
|
|
197
193
|
autocomplete: e.autocomplete,
|
|
198
194
|
required: e.required,
|
|
199
195
|
class: "m-input-input"
|
|
200
|
-
},
|
|
201
|
-
blur:
|
|
202
|
-
focus:
|
|
203
|
-
change:
|
|
204
|
-
input:
|
|
196
|
+
}, _({
|
|
197
|
+
blur: G,
|
|
198
|
+
focus: H,
|
|
199
|
+
change: J,
|
|
200
|
+
input: K
|
|
205
201
|
}, !0), {
|
|
206
|
-
onClick:
|
|
207
|
-
}), null, 16,
|
|
208
|
-
[
|
|
202
|
+
onClick: i[1] || (i[1] = (v) => e.$emit("click", v))
|
|
203
|
+
}), null, 16, se), [
|
|
204
|
+
[ee, c.value]
|
|
209
205
|
]),
|
|
210
|
-
e.label || e.hint ? (o(),
|
|
206
|
+
e.label || e.hint ? (o(), u(
|
|
211
207
|
"span",
|
|
212
208
|
{
|
|
213
209
|
key: 0,
|
|
@@ -219,44 +215,37 @@ const ie = ["for"], se = {
|
|
|
219
215
|
}
|
|
220
216
|
]])
|
|
221
217
|
},
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
1
|
|
226
|
-
/* TEXT */
|
|
227
|
-
),
|
|
228
|
-
e.required ? (o(), s("sup", de, "*")) : a("v-if", !0)
|
|
229
|
-
],
|
|
230
|
-
2
|
|
231
|
-
/* CLASS */
|
|
218
|
+
g(e.hint || e.label),
|
|
219
|
+
3
|
|
220
|
+
/* TEXT, CLASS */
|
|
232
221
|
)) : a("v-if", !0)
|
|
233
222
|
],
|
|
234
223
|
2
|
|
235
224
|
/* CLASS */
|
|
236
225
|
),
|
|
237
|
-
|
|
226
|
+
U() ? (o(), u("div", ie, [
|
|
238
227
|
e.$slots["right-icon"] || e.rightIcon ? I(e.$slots, "right-icon", { key: 0 }, () => [
|
|
239
|
-
typeof e.rightIcon == "string" ? (o(),
|
|
228
|
+
typeof e.rightIcon == "string" ? (o(), s(l(B), {
|
|
240
229
|
key: 0,
|
|
241
230
|
name: e.rightIcon,
|
|
242
231
|
class: "maz-text-xl maz-text-muted"
|
|
243
|
-
}, null, 8, ["name"])) : e.rightIcon ? (o(),
|
|
232
|
+
}, null, 8, ["name"])) : e.rightIcon ? (o(), s(V(e.rightIcon), {
|
|
244
233
|
key: 1,
|
|
245
234
|
class: "maz-text-xl maz-text-muted"
|
|
246
235
|
})) : a("v-if", !0)
|
|
247
236
|
], !0) : a("v-if", !0),
|
|
248
|
-
|
|
237
|
+
S.value ? (o(), s(l(w), {
|
|
249
238
|
key: 1,
|
|
250
239
|
color: "transparent",
|
|
251
240
|
tabindex: "-1",
|
|
252
241
|
size: "mini",
|
|
253
|
-
onClick:
|
|
242
|
+
onClick: i[2] || (i[2] = te((v) => p.value = !p.value, ["stop"]))
|
|
254
243
|
}, {
|
|
255
244
|
default: L(() => [
|
|
256
|
-
p.value ? (o(),
|
|
245
|
+
p.value ? (o(), s(l(T), {
|
|
257
246
|
key: 0,
|
|
258
247
|
class: "maz-text-xl maz-text-muted"
|
|
259
|
-
})) : (o(),
|
|
248
|
+
})) : (o(), s(l(D), {
|
|
260
249
|
key: 1,
|
|
261
250
|
class: "maz-text-xl maz-text-muted"
|
|
262
251
|
}))
|
|
@@ -275,7 +264,7 @@ const ie = ["for"], se = {
|
|
|
275
264
|
type: "submit"
|
|
276
265
|
}, {
|
|
277
266
|
default: L(() => [
|
|
278
|
-
M(l(
|
|
267
|
+
M(l(E), { class: "maz-text-2xl maz-text-normal" })
|
|
279
268
|
]),
|
|
280
269
|
_: 1
|
|
281
270
|
/* STABLE */
|
|
@@ -286,7 +275,7 @@ const ie = ["for"], se = {
|
|
|
286
275
|
2
|
|
287
276
|
/* CLASS */
|
|
288
277
|
),
|
|
289
|
-
e.assistiveText ? (o(),
|
|
278
|
+
e.assistiveText ? (o(), u(
|
|
290
279
|
"div",
|
|
291
280
|
{
|
|
292
281
|
key: 1,
|
|
@@ -308,7 +297,7 @@ const ie = ["for"], se = {
|
|
|
308
297
|
/* CLASS, STYLE */
|
|
309
298
|
));
|
|
310
299
|
}
|
|
311
|
-
}),
|
|
300
|
+
}), pe = /* @__PURE__ */ ae(ue, [["__scopeId", "data-v-8def99c5"]]);
|
|
312
301
|
export {
|
|
313
|
-
|
|
302
|
+
pe as default
|
|
314
303
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import '../assets/MazInput.css';function
|
|
1
|
+
import { defineComponent as Q, defineAsyncComponent as f, ref as h, onMounted as W, computed as r, useSlots as X, openBlock as o, createElementBlock as u, normalizeClass as m, normalizeStyle as Y, unref as n, toDisplayString as g, createCommentVNode as a, createElementVNode as k, renderSlot as I, createBlock as s, resolveDynamicComponent as V, withDirectives as Z, mergeProps as x, toHandlers as _, vModelDynamic as ee, withModifiers as te, withCtx as L, createVNode as M } from "vue";
|
|
2
|
+
import { u as oe, _ as ae } from "./MazChecklist-DLr57bfX.mjs";
|
|
3
|
+
import '../assets/MazInput.css';function ne(b, y) {
|
|
4
4
|
let t;
|
|
5
|
-
return function(...
|
|
5
|
+
return function(...l) {
|
|
6
6
|
clearTimeout(t), t = setTimeout(() => {
|
|
7
|
-
b.apply(this,
|
|
7
|
+
b.apply(this, l);
|
|
8
8
|
}, y);
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const le = ["for"], re = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "m-input-wrapper-left"
|
|
14
|
-
},
|
|
14
|
+
}, se = ["id", "name", "placeholder", "aria-label", "type", "inputmode", "disabled", "readonly", "autocomplete", "required"], ie = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "m-input-wrapper-right"
|
|
17
|
-
},
|
|
17
|
+
}, ue = /* @__PURE__ */ Q({
|
|
18
18
|
inheritAttrs: !1,
|
|
19
19
|
__name: "MazInput",
|
|
20
20
|
props: {
|
|
@@ -55,15 +55,15 @@ const se = ["for"], ie = {
|
|
|
55
55
|
},
|
|
56
56
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
57
57
|
setup(b, { emit: y }) {
|
|
58
|
-
const t = b,
|
|
58
|
+
const t = b, l = y, w = f(() => import("./MazBtn-DAzJbcTl.mjs")), B = f(() => import("./MazIcon-Cq1v4J3r.mjs")), T = f(() => import("./eye-slash-BoO00xzs.mjs")), D = f(() => import("./eye-f8zAUc30.mjs")), E = f(() => import("./MazChecklist-DLr57bfX.mjs").then((e) => e.c)), p = h(!1), d = h(!1), $ = h(), C = oe({
|
|
59
59
|
componentName: "MazInput",
|
|
60
60
|
providedId: t.id
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
W(() => {
|
|
63
63
|
var e;
|
|
64
64
|
t.autoFocus && ((e = $.value) == null || e.focus());
|
|
65
65
|
});
|
|
66
|
-
const
|
|
66
|
+
const S = r(() => t.type === "password"), q = r(() => p.value ? "text" : t.type), A = r(() => {
|
|
67
67
|
if (!t.noBorder) {
|
|
68
68
|
if (t.error)
|
|
69
69
|
return "maz-border-danger";
|
|
@@ -91,51 +91,47 @@ const se = ["for"], ie = {
|
|
|
91
91
|
}
|
|
92
92
|
return "--default-border";
|
|
93
93
|
}
|
|
94
|
-
}), z =
|
|
95
|
-
const { required: e, placeholder: n } = t;
|
|
96
|
-
if (n)
|
|
97
|
-
return e ? `${n} *` : n;
|
|
98
|
-
}), A = s(() => c.value !== void 0 && c.value !== ""), F = re(
|
|
94
|
+
}), z = X(), F = r(() => c.value !== void 0 && c.value !== ""), N = ne(
|
|
99
95
|
(e) => {
|
|
100
|
-
|
|
96
|
+
l("update:model-value", e);
|
|
101
97
|
},
|
|
102
98
|
typeof t.debounce == "number" ? t.debounce : t.debounceDelay ?? 500
|
|
103
99
|
);
|
|
104
|
-
function
|
|
100
|
+
function P(e) {
|
|
105
101
|
if (t.debounce)
|
|
106
|
-
return
|
|
107
|
-
|
|
102
|
+
return N(e);
|
|
103
|
+
l("update:model-value", e);
|
|
108
104
|
}
|
|
109
|
-
const c =
|
|
105
|
+
const c = r({
|
|
110
106
|
get: () => t.modelValue,
|
|
111
|
-
set: (e) =>
|
|
112
|
-
}),
|
|
113
|
-
function
|
|
114
|
-
return !!z["right-icon"] ||
|
|
107
|
+
set: (e) => P(e)
|
|
108
|
+
}), O = r(() => (!!t.label || !!t.hint) && (d.value || !!F.value || !!t.placeholder || ["date", "month", "week"].includes(t.type))), R = r(() => !!t.label || !!t.hint);
|
|
109
|
+
function U() {
|
|
110
|
+
return !!z["right-icon"] || S.value || !!z["valid-button"] || t.validButton || !!t.rightIcon;
|
|
115
111
|
}
|
|
116
|
-
function
|
|
112
|
+
function j() {
|
|
117
113
|
return !!z["left-icon"] || !!t.leftIcon;
|
|
118
114
|
}
|
|
115
|
+
function H(e) {
|
|
116
|
+
l("focus", e), d.value = !0;
|
|
117
|
+
}
|
|
119
118
|
function G(e) {
|
|
120
|
-
|
|
119
|
+
l("blur", e), d.value = !1;
|
|
121
120
|
}
|
|
122
121
|
function J(e) {
|
|
123
|
-
|
|
122
|
+
return l("change", e);
|
|
124
123
|
}
|
|
125
124
|
function K(e) {
|
|
126
|
-
return
|
|
127
|
-
}
|
|
128
|
-
function Q(e) {
|
|
129
|
-
return r("input", e);
|
|
125
|
+
return l("input", e);
|
|
130
126
|
}
|
|
131
|
-
return (e,
|
|
127
|
+
return (e, i) => (o(), u(
|
|
132
128
|
"div",
|
|
133
129
|
{
|
|
134
130
|
class: m(["m-input", [
|
|
135
131
|
{
|
|
136
132
|
"--is-focused": d.value || e.borderActive,
|
|
137
|
-
"--should-up":
|
|
138
|
-
"--has-label":
|
|
133
|
+
"--should-up": O.value,
|
|
134
|
+
"--has-label": R.value,
|
|
139
135
|
"--is-disabled": e.disabled,
|
|
140
136
|
"--is-readonly": e.readonly,
|
|
141
137
|
"--has-z-2": e.error || e.warning || e.success,
|
|
@@ -145,32 +141,32 @@ const se = ["for"], ie = {
|
|
|
145
141
|
t.class,
|
|
146
142
|
`--${e.color}`
|
|
147
143
|
]]),
|
|
148
|
-
style:
|
|
144
|
+
style: Y(e.style)
|
|
149
145
|
},
|
|
150
146
|
[
|
|
151
|
-
e.topLabel ? (o(),
|
|
147
|
+
e.topLabel ? (o(), u("label", {
|
|
152
148
|
key: 0,
|
|
153
|
-
for:
|
|
149
|
+
for: n(C),
|
|
154
150
|
class: "m-input-top-label"
|
|
155
|
-
}, g(e.topLabel), 9,
|
|
151
|
+
}, g(e.topLabel), 9, le)) : a("v-if", !0),
|
|
156
152
|
k(
|
|
157
153
|
"div",
|
|
158
154
|
{
|
|
159
155
|
class: m(["m-input-wrapper m-reset-css", [
|
|
160
156
|
e.inputClasses,
|
|
161
|
-
|
|
157
|
+
A.value,
|
|
162
158
|
e.roundedSize ? `--rounded-${e.roundedSize}` : { "maz-rounded": !e.noRadius },
|
|
163
159
|
{ "--block": e.block }
|
|
164
160
|
]])
|
|
165
161
|
},
|
|
166
162
|
[
|
|
167
|
-
|
|
163
|
+
j() ? (o(), u("div", re, [
|
|
168
164
|
e.$slots["left-icon"] || e.leftIcon ? I(e.$slots, "left-icon", { key: 0 }, () => [
|
|
169
|
-
typeof e.leftIcon == "string" ? (o(),
|
|
165
|
+
typeof e.leftIcon == "string" ? (o(), s(n(B), {
|
|
170
166
|
key: 0,
|
|
171
167
|
name: e.leftIcon,
|
|
172
168
|
class: "maz-text-xl maz-text-muted"
|
|
173
|
-
}, null, 8, ["name"])) : e.leftIcon ? (o(),
|
|
169
|
+
}, null, 8, ["name"])) : e.leftIcon ? (o(), s(V(e.leftIcon), {
|
|
174
170
|
key: 1,
|
|
175
171
|
class: "maz-text-xl maz-text-muted"
|
|
176
172
|
})) : a("v-if", !0)
|
|
@@ -182,31 +178,31 @@ const se = ["for"], ie = {
|
|
|
182
178
|
class: m(["m-input-wrapper-input", [`--${e.size}`, { "--top-label": !!e.topLabel }]])
|
|
183
179
|
},
|
|
184
180
|
[
|
|
185
|
-
|
|
181
|
+
Z(k("input", x({ id: n(C) }, e.$attrs, {
|
|
186
182
|
ref_key: "input",
|
|
187
183
|
ref: $,
|
|
188
|
-
"onUpdate:modelValue":
|
|
184
|
+
"onUpdate:modelValue": i[0] || (i[0] = (v) => c.value = v),
|
|
189
185
|
name: e.name,
|
|
190
|
-
placeholder:
|
|
186
|
+
placeholder: e.placeholder,
|
|
191
187
|
"aria-label": e.label || e.placeholder,
|
|
192
|
-
type:
|
|
188
|
+
type: q.value,
|
|
193
189
|
inputmode: e.inputmode,
|
|
194
190
|
disabled: e.disabled,
|
|
195
191
|
readonly: e.readonly,
|
|
196
192
|
autocomplete: e.autocomplete,
|
|
197
193
|
required: e.required,
|
|
198
194
|
class: "m-input-input"
|
|
199
|
-
},
|
|
200
|
-
blur:
|
|
201
|
-
focus:
|
|
202
|
-
change:
|
|
203
|
-
input:
|
|
195
|
+
}, _({
|
|
196
|
+
blur: G,
|
|
197
|
+
focus: H,
|
|
198
|
+
change: J,
|
|
199
|
+
input: K
|
|
204
200
|
}, !0), {
|
|
205
|
-
onClick:
|
|
206
|
-
}), null, 16,
|
|
207
|
-
[
|
|
201
|
+
onClick: i[1] || (i[1] = (v) => e.$emit("click", v))
|
|
202
|
+
}), null, 16, se), [
|
|
203
|
+
[ee, c.value]
|
|
208
204
|
]),
|
|
209
|
-
e.label || e.hint ? (o(),
|
|
205
|
+
e.label || e.hint ? (o(), u(
|
|
210
206
|
"span",
|
|
211
207
|
{
|
|
212
208
|
key: 0,
|
|
@@ -218,44 +214,37 @@ const se = ["for"], ie = {
|
|
|
218
214
|
}
|
|
219
215
|
]])
|
|
220
216
|
},
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
1
|
|
225
|
-
/* TEXT */
|
|
226
|
-
),
|
|
227
|
-
e.required ? (o(), i("sup", de, "*")) : a("v-if", !0)
|
|
228
|
-
],
|
|
229
|
-
2
|
|
230
|
-
/* CLASS */
|
|
217
|
+
g(e.hint || e.label),
|
|
218
|
+
3
|
|
219
|
+
/* TEXT, CLASS */
|
|
231
220
|
)) : a("v-if", !0)
|
|
232
221
|
],
|
|
233
222
|
2
|
|
234
223
|
/* CLASS */
|
|
235
224
|
),
|
|
236
|
-
|
|
225
|
+
U() ? (o(), u("div", ie, [
|
|
237
226
|
e.$slots["right-icon"] || e.rightIcon ? I(e.$slots, "right-icon", { key: 0 }, () => [
|
|
238
|
-
typeof e.rightIcon == "string" ? (o(),
|
|
227
|
+
typeof e.rightIcon == "string" ? (o(), s(n(B), {
|
|
239
228
|
key: 0,
|
|
240
229
|
name: e.rightIcon,
|
|
241
230
|
class: "maz-text-xl maz-text-muted"
|
|
242
|
-
}, null, 8, ["name"])) : e.rightIcon ? (o(),
|
|
231
|
+
}, null, 8, ["name"])) : e.rightIcon ? (o(), s(V(e.rightIcon), {
|
|
243
232
|
key: 1,
|
|
244
233
|
class: "maz-text-xl maz-text-muted"
|
|
245
234
|
})) : a("v-if", !0)
|
|
246
235
|
], !0) : a("v-if", !0),
|
|
247
|
-
|
|
236
|
+
S.value ? (o(), s(n(w), {
|
|
248
237
|
key: 1,
|
|
249
238
|
color: "transparent",
|
|
250
239
|
tabindex: "-1",
|
|
251
240
|
size: "mini",
|
|
252
|
-
onClick:
|
|
241
|
+
onClick: i[2] || (i[2] = te((v) => p.value = !p.value, ["stop"]))
|
|
253
242
|
}, {
|
|
254
243
|
default: L(() => [
|
|
255
|
-
p.value ? (o(),
|
|
244
|
+
p.value ? (o(), s(n(T), {
|
|
256
245
|
key: 0,
|
|
257
246
|
class: "maz-text-xl maz-text-muted"
|
|
258
|
-
})) : (o(),
|
|
247
|
+
})) : (o(), s(n(D), {
|
|
259
248
|
key: 1,
|
|
260
249
|
class: "maz-text-xl maz-text-muted"
|
|
261
250
|
}))
|
|
@@ -264,7 +253,7 @@ const se = ["for"], ie = {
|
|
|
264
253
|
/* STABLE */
|
|
265
254
|
})) : a("v-if", !0),
|
|
266
255
|
e.$slots["valid-button"] || e.validButton ? I(e.$slots, "valid-button", { key: 2 }, () => [
|
|
267
|
-
M(
|
|
256
|
+
M(n(w), {
|
|
268
257
|
color: "transparent",
|
|
269
258
|
disabled: e.disabled,
|
|
270
259
|
tabindex: "-1",
|
|
@@ -274,7 +263,7 @@ const se = ["for"], ie = {
|
|
|
274
263
|
type: "submit"
|
|
275
264
|
}, {
|
|
276
265
|
default: L(() => [
|
|
277
|
-
M(
|
|
266
|
+
M(n(E), { class: "maz-text-2xl maz-text-normal" })
|
|
278
267
|
]),
|
|
279
268
|
_: 1
|
|
280
269
|
/* STABLE */
|
|
@@ -285,7 +274,7 @@ const se = ["for"], ie = {
|
|
|
285
274
|
2
|
|
286
275
|
/* CLASS */
|
|
287
276
|
),
|
|
288
|
-
e.assistiveText ? (o(),
|
|
277
|
+
e.assistiveText ? (o(), u(
|
|
289
278
|
"div",
|
|
290
279
|
{
|
|
291
280
|
key: 1,
|
|
@@ -307,7 +296,7 @@ const se = ["for"], ie = {
|
|
|
307
296
|
/* CLASS, STYLE */
|
|
308
297
|
));
|
|
309
298
|
}
|
|
310
|
-
}),
|
|
299
|
+
}), me = /* @__PURE__ */ ae(ue, [["__scopeId", "data-v-8def99c5"]]);
|
|
311
300
|
export {
|
|
312
|
-
|
|
301
|
+
me as default
|
|
313
302
|
};
|