maz-ui 3.28.0 → 3.28.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 +1 -1
- package/components/MazInputNumber.d.ts +3 -2
- package/components/MazInputNumber.mjs +2 -98
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/chunks/{MazAccordion-posaK9nP.mjs → MazAccordion-pZkwkqAr.mjs} +39 -38
- package/components/chunks/MazInputNumber-OAPwOzCG.mjs +596 -0
- package/components/chunks/{MazSpinner-GCPS0yJL.mjs → MazSpinner-RwIjv6Xr.mjs} +1 -1
- package/components/chunks/{MazSpinner-NtRhZv9o.mjs → MazSpinner-yYMg5h03.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/chunks/{MazBtn-BjjqJeyy.cjs → MazBtn-pl1zplR1.cjs} +1 -1
- package/modules/chunks/{MazBtn-i7A6854I.mjs → MazBtn-vQMWTV0k.mjs} +2 -2
- package/modules/chunks/{MazIcon-mZNgyUkv.cjs → MazIcon-PpF58JqR.cjs} +1 -1
- package/modules/chunks/{MazIcon-_zmW6Z2N.mjs → MazIcon-iHejQyeA.mjs} +1 -1
- package/modules/chunks/{MazSpinner-mn9MhxbV.cjs → MazSpinner-4FGq9uY1.cjs} +1 -1
- package/modules/chunks/{MazSpinner-zUQyynC3.mjs → MazSpinner-DJzZmr-v.mjs} +1 -1
- package/modules/chunks/{index-ezXyG63J.mjs → index-bXD69qtB.mjs} +111 -104
- package/modules/chunks/{index-DCZgntsf.cjs → index-eNQnoHF9.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/tailwindcss/variables/utilities.ts +3 -0
- package/types/components/MazInputNumber.vue.d.ts +3 -2
- package/types/tailwindcss/variables/utilities.d.ts +3 -0
- package/components/chunks/MazBtn-tjMMZdlj.mjs +0 -152
- package/components/chunks/MazInput-h4Rs2XYn.mjs +0 -283
- package/components/chunks/_plugin-vue_export-helper-hUChTQA_.mjs +0 -9
- package/components/chunks/minus-thGpw2GG.mjs +0 -30
- package/components/chunks/plus-02mftP8S.mjs +0 -30
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
import "../assets/MazInput.css";
|
|
2
|
-
import { computed as n, defineComponent as J, defineAsyncComponent as m, ref as h, getCurrentInstance as K, onMounted as Q, useSlots as W, openBlock as o, createElementBlock as f, normalizeClass as z, normalizeStyle as X, createElementVNode as B, renderSlot as w, createVNode as g, unref as r, createCommentVNode as i, withDirectives as Y, mergeProps as Z, toHandlers as _, vModelDynamic as ee, createTextVNode as te, toDisplayString as ae, createBlock as k, withModifiers as le, withCtx as V } from "vue";
|
|
3
|
-
import { _ as ne } from "./_plugin-vue_export-helper-hUChTQA_.mjs";
|
|
4
|
-
function oe(e, u) {
|
|
5
|
-
let d;
|
|
6
|
-
return function(...y) {
|
|
7
|
-
clearTimeout(d), d = setTimeout(() => {
|
|
8
|
-
e.apply(this, y);
|
|
9
|
-
}, u);
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
const re = ({
|
|
13
|
-
componentName: e,
|
|
14
|
-
instance: u,
|
|
15
|
-
providedId: d
|
|
16
|
-
}) => n(() => d ?? `${e}-${u == null ? void 0 : u.uid}`), ie = {
|
|
17
|
-
key: 0,
|
|
18
|
-
class: "m-input-wrapper-left"
|
|
19
|
-
}, ue = { class: "m-input-wrapper-input" }, de = ["id", "type", "name", "placeholder", "aria-label", "disabled", "readonly", "required"], se = { key: 0 }, ce = {
|
|
20
|
-
key: 1,
|
|
21
|
-
class: "m-input-wrapper-right"
|
|
22
|
-
}, me = /* @__PURE__ */ J({
|
|
23
|
-
inheritAttrs: !1,
|
|
24
|
-
__name: "MazInput",
|
|
25
|
-
props: {
|
|
26
|
-
style: {
|
|
27
|
-
type: [String, Array, Object],
|
|
28
|
-
default: void 0
|
|
29
|
-
},
|
|
30
|
-
class: {
|
|
31
|
-
type: [String, Array, Object],
|
|
32
|
-
default: void 0
|
|
33
|
-
},
|
|
34
|
-
modelValue: {
|
|
35
|
-
type: [String, Number, Boolean],
|
|
36
|
-
default: void 0
|
|
37
|
-
},
|
|
38
|
-
placeholder: { type: String, default: void 0 },
|
|
39
|
-
color: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: "primary"
|
|
42
|
-
},
|
|
43
|
-
label: { type: String, default: void 0 },
|
|
44
|
-
name: { type: String, default: "input" },
|
|
45
|
-
type: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: "text",
|
|
48
|
-
validator: (e) => [
|
|
49
|
-
"text",
|
|
50
|
-
"date",
|
|
51
|
-
"number",
|
|
52
|
-
"tel",
|
|
53
|
-
"search",
|
|
54
|
-
"url",
|
|
55
|
-
"password",
|
|
56
|
-
"month",
|
|
57
|
-
"time",
|
|
58
|
-
"week",
|
|
59
|
-
"email"
|
|
60
|
-
].includes(e)
|
|
61
|
-
},
|
|
62
|
-
required: { type: Boolean, default: !1 },
|
|
63
|
-
disabled: { type: Boolean, default: !1 },
|
|
64
|
-
readonly: { type: Boolean, default: !1 },
|
|
65
|
-
id: { type: String, default: void 0 },
|
|
66
|
-
error: { type: Boolean, default: !1 },
|
|
67
|
-
success: { type: Boolean, default: !1 },
|
|
68
|
-
warning: { type: Boolean, default: !1 },
|
|
69
|
-
hint: { type: String, default: void 0 },
|
|
70
|
-
inputClasses: { type: String, default: void 0 },
|
|
71
|
-
noBorder: { type: Boolean, default: !1 },
|
|
72
|
-
noRadius: { type: Boolean, default: !1 },
|
|
73
|
-
size: {
|
|
74
|
-
type: String,
|
|
75
|
-
default: "md",
|
|
76
|
-
validator: (e) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(e)
|
|
77
|
-
},
|
|
78
|
-
debounce: { type: Boolean, default: !1 },
|
|
79
|
-
debounceDelay: { type: Number, default: 500 },
|
|
80
|
-
validButton: { type: Boolean, default: !1 },
|
|
81
|
-
validButtonLoading: { type: Boolean, default: !1 },
|
|
82
|
-
autoFocus: { type: Boolean, default: !1 },
|
|
83
|
-
borderActive: { type: Boolean, default: !1 },
|
|
84
|
-
leftIcon: { type: String, default: void 0 },
|
|
85
|
-
rightIcon: { type: String, default: void 0 }
|
|
86
|
-
},
|
|
87
|
-
emits: ["focus", "blur", "update:model-value", "click", "change", "update"],
|
|
88
|
-
setup(e, { emit: u }) {
|
|
89
|
-
const d = m(() => import("./MazBtn-tjMMZdlj.mjs")), y = m(() => import("./MazIcon-RrJDzX3V.mjs")), $ = m(() => import("./eye-slash-UoWe3WK1.mjs")), C = m(() => import("./eye-3jm1b22X.mjs")), M = m(() => import("./check-JxWJRZYz.mjs")), t = e, s = u, v = h(!1), c = h(!1), x = h(), q = K(), A = re({
|
|
90
|
-
componentName: "MazInput",
|
|
91
|
-
instance: q,
|
|
92
|
-
providedId: t.id
|
|
93
|
-
});
|
|
94
|
-
Q(() => {
|
|
95
|
-
var a;
|
|
96
|
-
t.autoFocus && ((a = x.value) == null || a.focus());
|
|
97
|
-
});
|
|
98
|
-
const I = n(() => t.type === "password"), N = n(() => v.value ? "text" : t.type), P = n(() => {
|
|
99
|
-
if (!t.noBorder) {
|
|
100
|
-
if (t.error)
|
|
101
|
-
return "maz-border-danger";
|
|
102
|
-
if (t.success)
|
|
103
|
-
return "maz-border-success";
|
|
104
|
-
if (t.warning)
|
|
105
|
-
return "maz-border-warning";
|
|
106
|
-
if (c.value || t.borderActive) {
|
|
107
|
-
if (t.color === "black")
|
|
108
|
-
return "maz-border-black";
|
|
109
|
-
if (t.color === "danger")
|
|
110
|
-
return "maz-border-danger";
|
|
111
|
-
if (t.color === "info")
|
|
112
|
-
return "maz-border-info";
|
|
113
|
-
if (t.color === "primary")
|
|
114
|
-
return "maz-border-primary";
|
|
115
|
-
if (t.color === "secondary")
|
|
116
|
-
return "maz-border-secondary";
|
|
117
|
-
if (t.color === "success")
|
|
118
|
-
return "maz-border-success";
|
|
119
|
-
if (t.color === "warning")
|
|
120
|
-
return "maz-border-warning";
|
|
121
|
-
if (t.color === "white")
|
|
122
|
-
return "maz-border-white";
|
|
123
|
-
}
|
|
124
|
-
return "--default-border";
|
|
125
|
-
}
|
|
126
|
-
}), p = W(), D = n(() => {
|
|
127
|
-
const { required: a, placeholder: l } = t;
|
|
128
|
-
if (l)
|
|
129
|
-
return a ? `${l} *` : l;
|
|
130
|
-
}), E = n(() => t.modelValue !== void 0 && t.modelValue !== ""), S = n({
|
|
131
|
-
get: () => t.modelValue,
|
|
132
|
-
set: (a) => G(a)
|
|
133
|
-
}), T = n(() => (!!t.label || !!t.hint) && (c.value || !!E.value || !!t.placeholder || ["date", "month", "week"].includes(t.type))), L = n(() => !!t.label || !!t.hint), F = () => !!p["right-icon"] || I.value || !!p["valid-button"] || t.validButton || !!t.rightIcon, O = () => !!p["left-icon"] || !!t.leftIcon, R = (a) => {
|
|
134
|
-
s("focus", a), c.value = !0;
|
|
135
|
-
}, U = (a) => {
|
|
136
|
-
s("blur", a), c.value = !1;
|
|
137
|
-
}, j = (a) => s("change", a), H = oe((a) => {
|
|
138
|
-
s("update:model-value", a);
|
|
139
|
-
}, t.debounceDelay), G = (a) => {
|
|
140
|
-
if (t.debounce)
|
|
141
|
-
return H(a);
|
|
142
|
-
s("update:model-value", a);
|
|
143
|
-
};
|
|
144
|
-
return (a, l) => (o(), f(
|
|
145
|
-
"div",
|
|
146
|
-
{
|
|
147
|
-
class: z(["m-input", [
|
|
148
|
-
{
|
|
149
|
-
"--is-focused": c.value || e.borderActive,
|
|
150
|
-
"--should-up": T.value,
|
|
151
|
-
"--has-label": L.value,
|
|
152
|
-
"--is-disabled": e.disabled,
|
|
153
|
-
"--is-readonly": e.readonly,
|
|
154
|
-
"--has-z-2": e.error || e.warning || e.success,
|
|
155
|
-
"--has-state": e.error || e.warning || e.success
|
|
156
|
-
},
|
|
157
|
-
t.class,
|
|
158
|
-
`--${e.color}`,
|
|
159
|
-
`--${e.size}`
|
|
160
|
-
]]),
|
|
161
|
-
style: X(e.style)
|
|
162
|
-
},
|
|
163
|
-
[
|
|
164
|
-
B(
|
|
165
|
-
"div",
|
|
166
|
-
{
|
|
167
|
-
class: z(["m-input-wrapper", [e.inputClasses, P.value, { "maz-rounded": !e.noRadius }]])
|
|
168
|
-
},
|
|
169
|
-
[
|
|
170
|
-
O() ? (o(), f("div", ie, [
|
|
171
|
-
a.$slots["left-icon"] || e.leftIcon ? w(a.$slots, "left-icon", { key: 0 }, () => [
|
|
172
|
-
g(r(y), {
|
|
173
|
-
name: e.leftIcon,
|
|
174
|
-
class: "maz-text-xl maz-text-muted"
|
|
175
|
-
}, null, 8, ["name"])
|
|
176
|
-
], !0) : i("v-if", !0)
|
|
177
|
-
])) : i("v-if", !0),
|
|
178
|
-
B("div", ue, [
|
|
179
|
-
Y(B("input", Z({
|
|
180
|
-
id: r(A),
|
|
181
|
-
ref_key: "input",
|
|
182
|
-
ref: x,
|
|
183
|
-
"onUpdate:modelValue": l[0] || (l[0] = (b) => S.value = b),
|
|
184
|
-
type: N.value,
|
|
185
|
-
name: e.name
|
|
186
|
-
}, a.$attrs, {
|
|
187
|
-
placeholder: D.value,
|
|
188
|
-
"aria-label": e.label || e.placeholder,
|
|
189
|
-
disabled: e.disabled,
|
|
190
|
-
readonly: e.readonly,
|
|
191
|
-
required: e.required,
|
|
192
|
-
class: "m-input-input"
|
|
193
|
-
}, _({
|
|
194
|
-
blur: U,
|
|
195
|
-
focus: R,
|
|
196
|
-
change: j
|
|
197
|
-
}, !0), {
|
|
198
|
-
onClick: l[1] || (l[1] = (b) => a.$emit("click", b))
|
|
199
|
-
}), null, 16, de), [
|
|
200
|
-
[ee, S.value]
|
|
201
|
-
]),
|
|
202
|
-
e.label || e.hint ? (o(), f(
|
|
203
|
-
"span",
|
|
204
|
-
{
|
|
205
|
-
key: 0,
|
|
206
|
-
ref: "label",
|
|
207
|
-
class: z(["m-input-label", [
|
|
208
|
-
{
|
|
209
|
-
"maz-text-danger-600": e.error,
|
|
210
|
-
"maz-text-success-600": e.success,
|
|
211
|
-
"maz-text-warning-600": e.warning
|
|
212
|
-
}
|
|
213
|
-
]])
|
|
214
|
-
},
|
|
215
|
-
[
|
|
216
|
-
te(
|
|
217
|
-
ae(e.hint || e.label) + " ",
|
|
218
|
-
1
|
|
219
|
-
/* TEXT */
|
|
220
|
-
),
|
|
221
|
-
e.required ? (o(), f("sup", se, "*")) : i("v-if", !0)
|
|
222
|
-
],
|
|
223
|
-
2
|
|
224
|
-
/* CLASS */
|
|
225
|
-
)) : i("v-if", !0)
|
|
226
|
-
]),
|
|
227
|
-
F() ? (o(), f("div", ce, [
|
|
228
|
-
a.$slots["right-icon"] || e.rightIcon ? w(a.$slots, "right-icon", { key: 0 }, () => [
|
|
229
|
-
g(r(y), {
|
|
230
|
-
name: e.rightIcon,
|
|
231
|
-
class: "maz-text-xl maz-text-muted"
|
|
232
|
-
}, null, 8, ["name"])
|
|
233
|
-
], !0) : i("v-if", !0),
|
|
234
|
-
I.value ? (o(), k(r(d), {
|
|
235
|
-
key: 1,
|
|
236
|
-
color: "transparent",
|
|
237
|
-
tabindex: "-1",
|
|
238
|
-
size: "mini",
|
|
239
|
-
onClick: l[2] || (l[2] = le((b) => v.value = !v.value, ["stop"]))
|
|
240
|
-
}, {
|
|
241
|
-
default: V(() => [
|
|
242
|
-
v.value ? (o(), k(r($), {
|
|
243
|
-
key: 0,
|
|
244
|
-
class: "maz-text-xl maz-text-muted"
|
|
245
|
-
})) : (o(), k(r(C), {
|
|
246
|
-
key: 1,
|
|
247
|
-
class: "maz-text-xl maz-text-muted"
|
|
248
|
-
}))
|
|
249
|
-
]),
|
|
250
|
-
_: 1
|
|
251
|
-
/* STABLE */
|
|
252
|
-
})) : i("v-if", !0),
|
|
253
|
-
a.$slots["valid-button"] || e.validButton ? w(a.$slots, "valid-button", { key: 2 }, () => [
|
|
254
|
-
g(r(d), {
|
|
255
|
-
color: "transparent",
|
|
256
|
-
disabled: e.disabled,
|
|
257
|
-
tabindex: "-1",
|
|
258
|
-
loading: e.validButtonLoading,
|
|
259
|
-
class: "m-input-valid-button",
|
|
260
|
-
size: "mini",
|
|
261
|
-
type: "submit"
|
|
262
|
-
}, {
|
|
263
|
-
default: V(() => [
|
|
264
|
-
g(r(M), { class: "maz-text-2xl maz-text-normal" })
|
|
265
|
-
]),
|
|
266
|
-
_: 1
|
|
267
|
-
/* STABLE */
|
|
268
|
-
}, 8, ["disabled", "loading"])
|
|
269
|
-
], !0) : i("v-if", !0)
|
|
270
|
-
])) : i("v-if", !0)
|
|
271
|
-
],
|
|
272
|
-
2
|
|
273
|
-
/* CLASS */
|
|
274
|
-
)
|
|
275
|
-
],
|
|
276
|
-
6
|
|
277
|
-
/* CLASS, STYLE */
|
|
278
|
-
));
|
|
279
|
-
}
|
|
280
|
-
}), be = /* @__PURE__ */ ne(me, [["__scopeId", "data-v-acaa27d2"]]);
|
|
281
|
-
export {
|
|
282
|
-
be as default
|
|
283
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { openBlock as e, createElementBlock as t, createElementVNode as o } from "vue";
|
|
2
|
-
const n = {
|
|
3
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
-
width: "1em",
|
|
5
|
-
height: "1em",
|
|
6
|
-
fill: "none",
|
|
7
|
-
viewBox: "0 0 24 24"
|
|
8
|
-
}, r = /* @__PURE__ */ o(
|
|
9
|
-
"path",
|
|
10
|
-
{
|
|
11
|
-
stroke: "currentColor",
|
|
12
|
-
"stroke-linecap": "round",
|
|
13
|
-
"stroke-linejoin": "round",
|
|
14
|
-
"stroke-width": "1.5",
|
|
15
|
-
d: "M19.5 12h-15"
|
|
16
|
-
},
|
|
17
|
-
null,
|
|
18
|
-
-1
|
|
19
|
-
/* HOISTED */
|
|
20
|
-
), s = [
|
|
21
|
-
r
|
|
22
|
-
];
|
|
23
|
-
function c(i, l) {
|
|
24
|
-
return e(), t("svg", n, [...s]);
|
|
25
|
-
}
|
|
26
|
-
const h = { render: c };
|
|
27
|
-
export {
|
|
28
|
-
h as default,
|
|
29
|
-
c as render
|
|
30
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { openBlock as e, createElementBlock as t, createElementVNode as o } from "vue";
|
|
2
|
-
const n = {
|
|
3
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
-
width: "1em",
|
|
5
|
-
height: "1em",
|
|
6
|
-
fill: "none",
|
|
7
|
-
viewBox: "0 0 24 24"
|
|
8
|
-
}, r = /* @__PURE__ */ o(
|
|
9
|
-
"path",
|
|
10
|
-
{
|
|
11
|
-
stroke: "currentColor",
|
|
12
|
-
"stroke-linecap": "round",
|
|
13
|
-
"stroke-linejoin": "round",
|
|
14
|
-
"stroke-width": "1.5",
|
|
15
|
-
d: "M12 4.5v15m7.5-7.5h-15"
|
|
16
|
-
},
|
|
17
|
-
null,
|
|
18
|
-
-1
|
|
19
|
-
/* HOISTED */
|
|
20
|
-
), s = [
|
|
21
|
-
r
|
|
22
|
-
];
|
|
23
|
-
function c(l, i) {
|
|
24
|
-
return e(), t("svg", n, [...s]);
|
|
25
|
-
}
|
|
26
|
-
const h = { render: c };
|
|
27
|
-
export {
|
|
28
|
-
h as default,
|
|
29
|
-
c as render
|
|
30
|
-
};
|