maz-ui 3.46.1-beta.5 → 3.46.1-beta.6
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/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.d.ts +5 -0
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- 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/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/MazPullToRefresh.d.ts +2 -2
- package/components/MazSelect.mjs +1 -1
- package/components/MazTable.d.ts +2 -2
- package/components/MazTable.mjs +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazPagination.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/chunks/{MazBottomSheet-s9lLaK1M.mjs → MazBottomSheet-DeAah_or.mjs} +1 -1
- package/components/chunks/MazBtn-BV212IYv.mjs +118 -0
- package/components/chunks/{MazBtn-CHABo63Y.mjs → MazBtn-BXvObcWn.mjs} +21 -19
- package/components/chunks/{MazBtn-BXdap6JU.mjs → MazBtn-C2dJYsnq.mjs} +21 -19
- package/components/chunks/MazBtn-C2htID_X.mjs +118 -0
- package/components/chunks/MazBtn-C4xZC-A2.mjs +118 -0
- package/components/chunks/{MazBtn-CVB5qDjV.mjs → MazBtn-C5IbN0rp.mjs} +34 -32
- package/components/chunks/MazBtn-CEFfMm7k.mjs +118 -0
- package/components/chunks/{MazBtn-BMmuCciQ.mjs → MazBtn-CESOVC-a.mjs} +20 -18
- package/components/chunks/MazBtn-CLFly8Ie.mjs +118 -0
- package/components/chunks/MazBtn-CRpqDW12.mjs +118 -0
- package/components/chunks/MazBtn-D2H26ExI.mjs +118 -0
- package/components/chunks/MazBtn-y4vRRWDg.mjs +118 -0
- package/components/chunks/{MazBtn-DarjZUV4.mjs → MazBtn-zMzxqcCs.mjs} +34 -32
- package/components/chunks/{MazCard-BaJ5Ee3I.mjs → MazCard-BF-2_gZV.mjs} +1 -1
- package/components/chunks/{MazCarousel-Bb4fpVqN.mjs → MazCarousel-DVBUt8NL.mjs} +1 -1
- package/components/chunks/{MazCheckbox-C4diNXJq.mjs → MazCheckbox-CEfJco3U.mjs} +1 -1
- package/components/chunks/MazCheckbox-CeVxgVY8.mjs +146 -0
- package/components/chunks/{MazCheckbox-8n6NtRBb.mjs → MazCheckbox-mgtQBs4K.mjs} +1 -1
- package/components/chunks/{MazDialog-Bv2PzQBz.mjs → MazDialog-fn7vXgBg.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-BZLP9sXZ.mjs → MazDialogPromise-C8dpQb5k.mjs} +2 -2
- package/components/chunks/{MazGallery-C9secrXc.mjs → MazGallery-CXJsK5ve.mjs} +2 -2
- package/components/chunks/{MazIcon-CudB1a0D.mjs → MazIcon-BXX3RaoN.mjs} +1 -1
- package/components/chunks/{MazIcon-BaJm2s8_.mjs → MazIcon-DjMuw8Bz.mjs} +1 -1
- package/components/chunks/MazInput-AcA93-8Q.mjs +291 -0
- package/components/chunks/{MazInput-B3RzuuNv.mjs → MazInput-Dnwxraz4.mjs} +1 -1
- package/components/chunks/{MazInputNumber-mLgq5obR.mjs → MazInputNumber-OY_UqCMs.mjs} +173 -171
- package/components/chunks/{MazInputPrice-DhYRBqTS.mjs → MazInputPrice-DvVAZa12.mjs} +1 -1
- package/components/chunks/{MazInputTags-DinwbXaD.mjs → MazInputTags-DKlGT2IB.mjs} +170 -168
- package/components/chunks/MazLoadingBar-By1umvdC.mjs +32 -0
- package/components/chunks/{MazPagination-Cqnr19iI.mjs → MazPagination-BL9LU84U.mjs} +132 -130
- package/components/chunks/{MazPhoneNumberInput-C3GdtqN2.mjs → MazPhoneNumberInput-C7gUk5lg.mjs} +3 -3
- package/components/chunks/{MazPicker-DA92HhwS.mjs → MazPicker-Dhm3u2MN.mjs} +536 -534
- package/components/chunks/{MazPickerMonthSwitcher-CPWkw0Hq.mjs → MazPickerMonthSwitcher-ck8cl1-N.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-Fwcoqg5M.mjs → MazPickerShortcuts-hEpUqVC-.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DfSXPGfT.mjs → MazPickerYearSwitcher-CmMxOc69.mjs} +1 -1
- package/components/chunks/MazSelect-CGsMRdr7.mjs +568 -0
- package/components/chunks/{MazSelect-DPTuyc26.mjs → MazSelect-ed445MXs.mjs} +2 -2
- package/components/chunks/{MazSpinner-BCQzF6j-.mjs → MazSpinner-Akyx5wgU.mjs} +1 -1
- package/components/chunks/{MazSpinner-B-mc1FWS.mjs → MazSpinner-B2dsE23u.mjs} +1 -1
- package/components/chunks/{MazSpinner-CVBz5HIx.mjs → MazSpinner-BCOeuzTB.mjs} +1 -1
- package/components/chunks/{MazSpinner-BpjK60ul.mjs → MazSpinner-BakExtKd.mjs} +1 -1
- package/components/chunks/{MazSpinner-CFJmcsGl.mjs → MazSpinner-C9meLNrb.mjs} +1 -1
- package/components/chunks/{MazSpinner-C2ok6AlJ.mjs → MazSpinner-CKOy0M1T.mjs} +1 -1
- package/components/chunks/MazSpinner-CL6orjX7.mjs +37 -0
- package/components/chunks/MazSpinner-CQTq0J6f.mjs +37 -0
- package/components/chunks/{MazSpinner-BEqvmPiV.mjs → MazSpinner-CeZk8jA9.mjs} +1 -1
- package/components/chunks/MazSpinner-CqS3onAE.mjs +37 -0
- package/components/chunks/MazSpinner-D1zj-581.mjs +37 -0
- package/components/chunks/MazSpinner-DJ2t85tY.mjs +37 -0
- package/components/chunks/{MazSpinner-DEdQlQr1.mjs → MazSpinner-DbaTlD5B.mjs} +1 -1
- package/components/chunks/MazSpinner-DgJ9tVv_.mjs +37 -0
- package/components/chunks/{MazSpinner-BCHAzmqS.mjs → MazSpinner-DoKvoICM.mjs} +1 -1
- package/components/chunks/MazSpinner-Oy4E193R.mjs +37 -0
- package/components/chunks/MazTable-QwG-Kh88.mjs +692 -0
- package/components/chunks/MazTableCell-BSNyqTSX.mjs +23 -0
- package/components/chunks/MazTableRow-CgubMdrX.mjs +30 -0
- package/components/chunks/MazTableTitle-h4dattYD.mjs +23 -0
- package/components/chunks/{MazTransitionExpand-BoTQeNNf.mjs → MazTransitionExpand-BvqRDM9d.mjs} +1 -1
- package/components/chunks/arrow-up-DjSlktWl.mjs +30 -0
- package/components/chunks/inject-strict-BmiaNiwC.mjs +10 -0
- package/components/chunks/useInstanceUniqId-DW9jO1Sz.mjs +11 -0
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/chunks/{MazBtn-BG2dUdHV.cjs → MazBtn-DeAZcD0R.cjs} +3 -3
- package/{components/chunks/MazBtn-CXxOU7fp.mjs → modules/chunks/MazBtn-DvffpPyV.mjs} +21 -19
- package/modules/chunks/{MazIcon-RkWxQ8JM.cjs → MazIcon-BiwOZEZl.cjs} +1 -1
- package/modules/chunks/{MazIcon-BqfELHOt.mjs → MazIcon-D2B0umvn.mjs} +1 -1
- package/modules/chunks/{MazSpinner-GfL807jq.cjs → MazSpinner-CZIYnX05.cjs} +1 -1
- package/modules/chunks/{MazSpinner-DgSRxVEo.mjs → MazSpinner-Csgl_Uho.mjs} +1 -1
- package/modules/chunks/index-B6Pf_QhC.cjs +149 -0
- package/modules/chunks/{index-aKGx1nxl.mjs → index-C34aEXzu.mjs} +319 -314
- 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/MazBtn.vue.d.ts +5 -0
- package/types/components/MazPullToRefresh.vue.d.ts +2 -2
- package/types/components/MazTable.vue.d.ts +2 -2
- package/components/chunks/MazBtn-CZSXnr3w.mjs +0 -116
- package/components/chunks/MazBtn-CwYBz6QO.mjs +0 -116
- package/components/chunks/MazBtn-DIE2eM-g.mjs +0 -116
- package/components/chunks/MazBtn-DKD-ZMaF.mjs +0 -116
- package/components/chunks/MazBtn-OKT5-Y4s.mjs +0 -116
- package/components/chunks/MazBtn-e3abHT2L.mjs +0 -116
- package/components/chunks/MazSpinner-BoG1T_ZX.mjs +0 -37
- package/components/chunks/MazSpinner-DhHVVBJE.mjs +0 -37
- package/components/chunks/MazSpinner-DuGaC-cw.mjs +0 -37
- package/components/chunks/MazSpinner-Iwon82He.mjs +0 -37
- package/components/chunks/MazSpinner-JbfjMNFL.mjs +0 -37
- package/components/chunks/MazSpinner-QgcgF5j5.mjs +0 -37
- package/components/chunks/MazSpinner-yQGVxaFm.mjs +0 -37
- package/components/chunks/MazTable-CrtVI-dp.mjs +0 -2015
- package/modules/chunks/MazBtn-BeqYSSYI.mjs +0 -116
- package/modules/chunks/index-CE2CsQsx.cjs +0 -149
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { openBlock as
|
|
1
|
+
import { openBlock as r, createElementBlock as z, createElementVNode as F, defineComponent as L, defineAsyncComponent as $, useAttrs as ne, useSlots as K, computed as a, createBlock as d, resolveDynamicComponent as V, normalizeClass as b, withCtx as P, createCommentVNode as i, renderSlot as C, unref as c, createVNode as M, useId as oe, ref as A, onMounted as le, normalizeStyle as Y, withDirectives as ae, mergeProps as G, toHandlers as ie, vModelDynamic as re, createTextVNode as se, toDisplayString as ue, withModifiers as q, withKeys as U } from "vue";
|
|
2
2
|
import '../assets/MazInputNumber.css';function H(m, o) {
|
|
3
|
-
let
|
|
3
|
+
let t;
|
|
4
4
|
return function(...u) {
|
|
5
|
-
clearTimeout(
|
|
5
|
+
clearTimeout(t), t = setTimeout(() => {
|
|
6
6
|
m.apply(this, u);
|
|
7
7
|
}, o);
|
|
8
8
|
};
|
|
@@ -14,8 +14,8 @@ const de = {
|
|
|
14
14
|
fill: "none",
|
|
15
15
|
viewBox: "0 0 24 24"
|
|
16
16
|
};
|
|
17
|
-
function
|
|
18
|
-
return
|
|
17
|
+
function fe(m, o) {
|
|
18
|
+
return r(), z("svg", de, o[0] || (o[0] = [
|
|
19
19
|
F(
|
|
20
20
|
"path",
|
|
21
21
|
{
|
|
@@ -31,7 +31,7 @@ function ce(m, o) {
|
|
|
31
31
|
)
|
|
32
32
|
]));
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const ce = { render: fe }, me = {
|
|
35
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
36
36
|
width: "1em",
|
|
37
37
|
height: "1em",
|
|
@@ -39,7 +39,7 @@ const fe = { render: ce }, me = {
|
|
|
39
39
|
viewBox: "0 0 24 24"
|
|
40
40
|
};
|
|
41
41
|
function pe(m, o) {
|
|
42
|
-
return
|
|
42
|
+
return r(), z("svg", me, o[0] || (o[0] = [
|
|
43
43
|
F(
|
|
44
44
|
"path",
|
|
45
45
|
{
|
|
@@ -58,7 +58,7 @@ function pe(m, o) {
|
|
|
58
58
|
const ve = { render: pe }, be = {
|
|
59
59
|
key: 2,
|
|
60
60
|
class: "m-btn-loader-container"
|
|
61
|
-
}, ye = /* @__PURE__ */
|
|
61
|
+
}, ye = /* @__PURE__ */ L({
|
|
62
62
|
__name: "MazBtn",
|
|
63
63
|
props: {
|
|
64
64
|
variant: { default: "button" },
|
|
@@ -79,15 +79,16 @@ const ve = { render: pe }, be = {
|
|
|
79
79
|
leftIcon: { type: [String, Function, Object], default: void 0 },
|
|
80
80
|
rightIcon: { type: [String, Function, Object], default: void 0 },
|
|
81
81
|
noPadding: { type: Boolean },
|
|
82
|
-
noElevation: { type: Boolean }
|
|
82
|
+
noElevation: { type: Boolean },
|
|
83
|
+
justify: { default: "center" }
|
|
83
84
|
},
|
|
84
85
|
setup(m) {
|
|
85
|
-
const o = m,
|
|
86
|
+
const o = m, t = $(() => import("./MazSpinner-DJ2t85tY.mjs")), u = $(() => import("./MazIcon-BbvBov5G.mjs")), { href: s, to: j } = ne(), k = K(), I = a(() => s ? "a" : j ? "router-link" : "button"), B = a(
|
|
86
87
|
() => o.pastel ? `--${o.color}-pastel` : o.outline ? `--${o.color}-outline` : `--${o.color}`
|
|
87
|
-
), v =
|
|
88
|
+
), v = a(
|
|
88
89
|
() => (o.loading || o.disabled) && I.value === "button"
|
|
89
|
-
), y =
|
|
90
|
-
return (l,
|
|
90
|
+
), y = a(() => v.value ? "--cursor-default" : "--cursor-pointer"), w = a(() => `--is-${o.variant}`), S = a(() => o.loading && o.variant === "button"), n = a(() => !!k["left-icon"] || o.leftIcon), f = a(() => !!k["right-icon"] || o.rightIcon), p = a(() => n.value || f.value), T = a(() => o.icon || !!k.icon), D = a(() => I.value === "button" ? o.type : void 0), g = a(() => o.size === "xl" ? "maz-text-3xl" : o.size === "lg" ? "maz-text-2xl" : o.size === "md" ? "maz-text-xl" : o.size === "sm" ? "maz-text-lg" : o.size === "xs" ? "maz-text-base" : o.size === "mini" ? "maz-text-sm" : "md"), O = a(() => o.justify === "start" ? "maz-justify-start" : o.justify === "end" ? "maz-justify-end" : o.justify === "center" ? "maz-justify-center" : o.justify === "between" ? "maz-justify-between" : o.justify === "around" ? "maz-justify-around" : o.justify === "evenly" ? "maz-justify-evenly" : "maz-justify-center");
|
|
91
|
+
return (l, N) => (r(), d(V(I.value), {
|
|
91
92
|
disabled: v.value || void 0,
|
|
92
93
|
class: b(["m-btn", [
|
|
93
94
|
`--${l.size}`,
|
|
@@ -95,6 +96,7 @@ const ve = { render: pe }, be = {
|
|
|
95
96
|
B.value,
|
|
96
97
|
y.value,
|
|
97
98
|
w.value,
|
|
99
|
+
O.value,
|
|
98
100
|
{
|
|
99
101
|
"--block": l.block,
|
|
100
102
|
"--no-underline": l.noUnderline,
|
|
@@ -108,86 +110,86 @@ const ve = { render: pe }, be = {
|
|
|
108
110
|
"--no-elevation": l.noElevation
|
|
109
111
|
}
|
|
110
112
|
]]),
|
|
111
|
-
type:
|
|
113
|
+
type: D.value
|
|
112
114
|
}, {
|
|
113
115
|
default: P(() => [
|
|
114
|
-
|
|
116
|
+
i(`
|
|
115
117
|
@slot left-icon - The icon to display on the left of the button
|
|
116
118
|
`),
|
|
117
119
|
C(l.$slots, "left-icon", {}, () => [
|
|
118
|
-
typeof l.leftIcon == "string" ? (
|
|
120
|
+
typeof l.leftIcon == "string" ? (r(), d(c(u), {
|
|
119
121
|
key: 0,
|
|
120
122
|
name: l.leftIcon,
|
|
121
|
-
class: b([
|
|
122
|
-
}, null, 8, ["name", "class"])) : l.leftIcon ? (
|
|
123
|
+
class: b([g.value])
|
|
124
|
+
}, null, 8, ["name", "class"])) : l.leftIcon ? (r(), d(V(l.leftIcon), {
|
|
123
125
|
key: 1,
|
|
124
|
-
class: b([
|
|
125
|
-
}, null, 8, ["class"])) :
|
|
126
|
+
class: b([g.value])
|
|
127
|
+
}, null, 8, ["class"])) : i("v-if", !0)
|
|
126
128
|
], !0),
|
|
127
|
-
|
|
129
|
+
i(`
|
|
128
130
|
@slot icon - The icon to display on the fab button
|
|
129
131
|
`),
|
|
130
|
-
|
|
131
|
-
typeof l.icon == "string" ? (
|
|
132
|
+
T.value ? C(l.$slots, "icon", { key: 0 }, () => [
|
|
133
|
+
typeof l.icon == "string" ? (r(), d(c(u), {
|
|
132
134
|
key: 0,
|
|
133
135
|
name: l.icon,
|
|
134
|
-
class: b([
|
|
135
|
-
}, null, 8, ["name", "class"])) : l.icon ? (
|
|
136
|
+
class: b([g.value])
|
|
137
|
+
}, null, 8, ["name", "class"])) : l.icon ? (r(), d(V(l.icon), {
|
|
136
138
|
key: 1,
|
|
137
|
-
class: b([
|
|
138
|
-
}, null, 8, ["class"])) :
|
|
139
|
-
], !0) :
|
|
140
|
-
|
|
139
|
+
class: b([g.value])
|
|
140
|
+
}, null, 8, ["class"])) : i("v-if", !0)
|
|
141
|
+
], !0) : i("v-if", !0),
|
|
142
|
+
i(`
|
|
141
143
|
@slot default - The content of the button
|
|
142
144
|
`),
|
|
143
145
|
C(l.$slots, "default", {}, void 0, !0),
|
|
144
|
-
|
|
146
|
+
i(`
|
|
145
147
|
@slot left-icon - The icon to display on the left of the button
|
|
146
148
|
`),
|
|
147
|
-
|
|
148
|
-
typeof l.rightIcon == "string" ? (
|
|
149
|
+
f.value ? C(l.$slots, "right-icon", { key: 1 }, () => [
|
|
150
|
+
typeof l.rightIcon == "string" ? (r(), d(c(u), {
|
|
149
151
|
key: 0,
|
|
150
152
|
name: l.rightIcon,
|
|
151
|
-
class: b([
|
|
152
|
-
}, null, 8, ["name", "class"])) : l.rightIcon ? (
|
|
153
|
+
class: b([g.value])
|
|
154
|
+
}, null, 8, ["name", "class"])) : l.rightIcon ? (r(), d(V(l.rightIcon), {
|
|
153
155
|
key: 1,
|
|
154
|
-
class: b([
|
|
155
|
-
}, null, 8, ["class"])) :
|
|
156
|
-
], !0) :
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
class: b([g.value])
|
|
157
|
+
}, null, 8, ["class"])) : i("v-if", !0)
|
|
158
|
+
], !0) : i("v-if", !0),
|
|
159
|
+
S.value ? (r(), z("div", be, [
|
|
160
|
+
M(c(t), {
|
|
159
161
|
size: "2em",
|
|
160
162
|
color: l.color
|
|
161
163
|
}, null, 8, ["color"])
|
|
162
|
-
])) :
|
|
164
|
+
])) : i("v-if", !0)
|
|
163
165
|
]),
|
|
164
166
|
_: 3
|
|
165
167
|
/* FORWARDED */
|
|
166
168
|
}, 8, ["disabled", "class", "type"]));
|
|
167
169
|
}
|
|
168
170
|
}), J = (m, o) => {
|
|
169
|
-
const
|
|
171
|
+
const t = m.__vccOpts || m;
|
|
170
172
|
for (const [u, s] of o)
|
|
171
|
-
|
|
172
|
-
return
|
|
173
|
-
},
|
|
173
|
+
t[u] = s;
|
|
174
|
+
return t;
|
|
175
|
+
}, R = /* @__PURE__ */ J(ye, [["__scopeId", "data-v-5aedac30"]]), he = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
174
176
|
__proto__: null,
|
|
175
|
-
default:
|
|
177
|
+
default: R
|
|
176
178
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
177
|
-
function
|
|
179
|
+
function ze({
|
|
178
180
|
componentName: m,
|
|
179
181
|
providedId: o
|
|
180
182
|
}) {
|
|
181
|
-
const
|
|
182
|
-
return
|
|
183
|
+
const t = oe();
|
|
184
|
+
return a(() => o ?? `${m}-${t}`);
|
|
183
185
|
}
|
|
184
|
-
const
|
|
186
|
+
const ge = {
|
|
185
187
|
key: 0,
|
|
186
188
|
class: "m-input-wrapper-left"
|
|
187
189
|
}, ke = { class: "m-input-wrapper-input" }, Ie = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], Be = { key: 0 }, we = {
|
|
188
190
|
key: 1,
|
|
189
191
|
class: "m-input-wrapper-right"
|
|
190
|
-
}, $e = /* @__PURE__ */
|
|
192
|
+
}, $e = /* @__PURE__ */ L({
|
|
191
193
|
inheritAttrs: !1,
|
|
192
194
|
__name: "MazInput",
|
|
193
195
|
props: {
|
|
@@ -225,66 +227,66 @@ const ze = {
|
|
|
225
227
|
},
|
|
226
228
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
227
229
|
setup(m, { emit: o }) {
|
|
228
|
-
const
|
|
230
|
+
const t = m, u = o, s = $(() => Promise.resolve().then(() => he)), j = $(() => import("./MazIcon-BbvBov5G.mjs")), k = $(() => import("./eye-slash-BoO00xzs.mjs")), I = $(() => import("./eye-f8zAUc30.mjs")), B = $(() => import("./check-BmubdHc_.mjs")), v = A(!1), y = A(!1), w = A(), S = ze({
|
|
229
231
|
componentName: "MazInput",
|
|
230
|
-
providedId:
|
|
232
|
+
providedId: t.id
|
|
231
233
|
});
|
|
232
234
|
le(() => {
|
|
233
235
|
var e;
|
|
234
|
-
|
|
236
|
+
t.autoFocus && ((e = w.value) == null || e.focus());
|
|
235
237
|
});
|
|
236
|
-
const
|
|
237
|
-
if (!
|
|
238
|
-
if (
|
|
238
|
+
const n = a(() => t.type === "password"), f = a(() => v.value ? "text" : t.type), p = a(() => {
|
|
239
|
+
if (!t.noBorder) {
|
|
240
|
+
if (t.error)
|
|
239
241
|
return "maz-border-danger";
|
|
240
|
-
if (
|
|
242
|
+
if (t.success)
|
|
241
243
|
return "maz-border-success";
|
|
242
|
-
if (
|
|
244
|
+
if (t.warning)
|
|
243
245
|
return "maz-border-warning";
|
|
244
|
-
if (y.value ||
|
|
245
|
-
if (
|
|
246
|
+
if (y.value || t.borderActive) {
|
|
247
|
+
if (t.color === "black")
|
|
246
248
|
return "maz-border-black";
|
|
247
|
-
if (
|
|
249
|
+
if (t.color === "danger")
|
|
248
250
|
return "maz-border-danger";
|
|
249
|
-
if (
|
|
251
|
+
if (t.color === "info")
|
|
250
252
|
return "maz-border-info";
|
|
251
|
-
if (
|
|
253
|
+
if (t.color === "primary")
|
|
252
254
|
return "maz-border-primary";
|
|
253
|
-
if (
|
|
255
|
+
if (t.color === "secondary")
|
|
254
256
|
return "maz-border-secondary";
|
|
255
|
-
if (
|
|
257
|
+
if (t.color === "success")
|
|
256
258
|
return "maz-border-success";
|
|
257
|
-
if (
|
|
259
|
+
if (t.color === "warning")
|
|
258
260
|
return "maz-border-warning";
|
|
259
|
-
if (
|
|
261
|
+
if (t.color === "white")
|
|
260
262
|
return "maz-border-white";
|
|
261
263
|
}
|
|
262
264
|
return "--default-border";
|
|
263
265
|
}
|
|
264
|
-
}),
|
|
265
|
-
const { required: e, placeholder: h } =
|
|
266
|
+
}), T = K(), D = a(() => {
|
|
267
|
+
const { required: e, placeholder: h } = t;
|
|
266
268
|
if (h)
|
|
267
269
|
return e ? `${h} *` : h;
|
|
268
|
-
}),
|
|
270
|
+
}), g = a(() => N.value !== void 0 && N.value !== ""), O = H(
|
|
269
271
|
(e) => {
|
|
270
272
|
u("update:model-value", e);
|
|
271
273
|
},
|
|
272
|
-
typeof
|
|
274
|
+
typeof t.debounce == "number" ? t.debounce : t.debounceDelay ?? 500
|
|
273
275
|
);
|
|
274
|
-
function
|
|
275
|
-
if (
|
|
276
|
-
return
|
|
276
|
+
function l(e) {
|
|
277
|
+
if (t.debounce)
|
|
278
|
+
return O(e);
|
|
277
279
|
u("update:model-value", e);
|
|
278
280
|
}
|
|
279
|
-
const
|
|
280
|
-
get: () =>
|
|
281
|
-
set: (e) =>
|
|
282
|
-
}), Q =
|
|
281
|
+
const N = a({
|
|
282
|
+
get: () => t.modelValue,
|
|
283
|
+
set: (e) => l(e)
|
|
284
|
+
}), Q = a(() => (!!t.label || !!t.hint) && (y.value || !!g.value || !!t.placeholder || ["date", "month", "week"].includes(t.type))), W = a(() => !!t.label || !!t.hint);
|
|
283
285
|
function X() {
|
|
284
|
-
return !!
|
|
286
|
+
return !!T["right-icon"] || n.value || !!T["valid-button"] || t.validButton || !!t.rightIcon;
|
|
285
287
|
}
|
|
286
288
|
function Z() {
|
|
287
|
-
return !!
|
|
289
|
+
return !!T["left-icon"] || !!t.leftIcon;
|
|
288
290
|
}
|
|
289
291
|
function x(e) {
|
|
290
292
|
u("focus", e), y.value = !0;
|
|
@@ -295,10 +297,10 @@ const ze = {
|
|
|
295
297
|
function ee(e) {
|
|
296
298
|
return u("change", e);
|
|
297
299
|
}
|
|
298
|
-
function
|
|
300
|
+
function te(e) {
|
|
299
301
|
return u("input", e);
|
|
300
302
|
}
|
|
301
|
-
return (e, h) => (
|
|
303
|
+
return (e, h) => (r(), z(
|
|
302
304
|
"div",
|
|
303
305
|
{
|
|
304
306
|
class: b(["m-input", [
|
|
@@ -312,7 +314,7 @@ const ze = {
|
|
|
312
314
|
"--has-state": e.error || e.warning || e.success,
|
|
313
315
|
"--block": e.block
|
|
314
316
|
},
|
|
315
|
-
|
|
317
|
+
t.class,
|
|
316
318
|
`--${e.color}`,
|
|
317
319
|
`--${e.size}`
|
|
318
320
|
]]),
|
|
@@ -329,32 +331,32 @@ const ze = {
|
|
|
329
331
|
]])
|
|
330
332
|
},
|
|
331
333
|
[
|
|
332
|
-
Z() ? (
|
|
333
|
-
|
|
334
|
+
Z() ? (r(), z("div", ge, [
|
|
335
|
+
i(`
|
|
334
336
|
@slot left-icon - The icon to display on the left of the input
|
|
335
337
|
`),
|
|
336
338
|
e.$slots["left-icon"] || e.leftIcon ? C(e.$slots, "left-icon", { key: 0 }, () => [
|
|
337
|
-
typeof e.leftIcon == "string" ? (
|
|
339
|
+
typeof e.leftIcon == "string" ? (r(), d(c(j), {
|
|
338
340
|
key: 0,
|
|
339
341
|
name: e.leftIcon,
|
|
340
342
|
class: "maz-text-xl maz-text-muted"
|
|
341
|
-
}, null, 8, ["name"])) : e.leftIcon ? (
|
|
343
|
+
}, null, 8, ["name"])) : e.leftIcon ? (r(), d(V(e.leftIcon), {
|
|
342
344
|
key: 1,
|
|
343
345
|
class: "maz-text-xl maz-text-muted"
|
|
344
|
-
})) :
|
|
345
|
-
], !0) :
|
|
346
|
-
])) :
|
|
346
|
+
})) : i("v-if", !0)
|
|
347
|
+
], !0) : i("v-if", !0)
|
|
348
|
+
])) : i("v-if", !0),
|
|
347
349
|
F("div", ke, [
|
|
348
350
|
ae(F("input", G({
|
|
349
|
-
id:
|
|
351
|
+
id: c(S),
|
|
350
352
|
ref_key: "input",
|
|
351
353
|
ref: w,
|
|
352
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
353
|
-
type:
|
|
354
|
+
"onUpdate:modelValue": h[0] || (h[0] = (E) => N.value = E),
|
|
355
|
+
type: f.value,
|
|
354
356
|
name: e.name
|
|
355
357
|
}, e.$attrs, {
|
|
356
358
|
inputmode: e.inputmode,
|
|
357
|
-
placeholder:
|
|
359
|
+
placeholder: D.value,
|
|
358
360
|
"aria-label": e.label || e.placeholder,
|
|
359
361
|
disabled: e.disabled,
|
|
360
362
|
readonly: e.readonly,
|
|
@@ -364,13 +366,13 @@ const ze = {
|
|
|
364
366
|
blur: _,
|
|
365
367
|
focus: x,
|
|
366
368
|
change: ee,
|
|
367
|
-
input:
|
|
369
|
+
input: te
|
|
368
370
|
}, !0), {
|
|
369
|
-
onClick: h[1] || (h[1] = (
|
|
371
|
+
onClick: h[1] || (h[1] = (E) => e.$emit("click", E))
|
|
370
372
|
}), null, 16, Ie), [
|
|
371
|
-
[re,
|
|
373
|
+
[re, N.value]
|
|
372
374
|
]),
|
|
373
|
-
e.label || e.hint ? (
|
|
375
|
+
e.label || e.hint ? (r(), z(
|
|
374
376
|
"span",
|
|
375
377
|
{
|
|
376
378
|
key: 0,
|
|
@@ -388,50 +390,50 @@ const ze = {
|
|
|
388
390
|
1
|
|
389
391
|
/* TEXT */
|
|
390
392
|
),
|
|
391
|
-
e.required ? (
|
|
393
|
+
e.required ? (r(), z("sup", Be, "*")) : i("v-if", !0)
|
|
392
394
|
],
|
|
393
395
|
2
|
|
394
396
|
/* CLASS */
|
|
395
|
-
)) :
|
|
397
|
+
)) : i("v-if", !0)
|
|
396
398
|
]),
|
|
397
|
-
X() ? (
|
|
398
|
-
|
|
399
|
+
X() ? (r(), z("div", we, [
|
|
400
|
+
i(`
|
|
399
401
|
@slot right-icon - The icon to display on the right of the input
|
|
400
402
|
`),
|
|
401
403
|
e.$slots["right-icon"] || e.rightIcon ? C(e.$slots, "right-icon", { key: 0 }, () => [
|
|
402
|
-
typeof e.rightIcon == "string" ? (
|
|
404
|
+
typeof e.rightIcon == "string" ? (r(), d(c(j), {
|
|
403
405
|
key: 0,
|
|
404
406
|
name: e.rightIcon,
|
|
405
407
|
class: "maz-text-xl maz-text-muted"
|
|
406
|
-
}, null, 8, ["name"])) : e.rightIcon ? (
|
|
408
|
+
}, null, 8, ["name"])) : e.rightIcon ? (r(), d(V(e.rightIcon), {
|
|
407
409
|
key: 1,
|
|
408
410
|
class: "maz-text-xl maz-text-muted"
|
|
409
|
-
})) :
|
|
410
|
-
], !0) :
|
|
411
|
-
|
|
411
|
+
})) : i("v-if", !0)
|
|
412
|
+
], !0) : i("v-if", !0),
|
|
413
|
+
n.value ? (r(), d(c(s), {
|
|
412
414
|
key: 1,
|
|
413
415
|
color: "transparent",
|
|
414
416
|
tabindex: "-1",
|
|
415
417
|
size: "mini",
|
|
416
|
-
onClick: h[2] || (h[2] =
|
|
418
|
+
onClick: h[2] || (h[2] = q((E) => v.value = !v.value, ["stop"]))
|
|
417
419
|
}, {
|
|
418
420
|
default: P(() => [
|
|
419
|
-
v.value ? (
|
|
421
|
+
v.value ? (r(), d(c(k), {
|
|
420
422
|
key: 0,
|
|
421
423
|
class: "maz-text-xl maz-text-muted"
|
|
422
|
-
})) : (
|
|
424
|
+
})) : (r(), d(c(I), {
|
|
423
425
|
key: 1,
|
|
424
426
|
class: "maz-text-xl maz-text-muted"
|
|
425
427
|
}))
|
|
426
428
|
]),
|
|
427
429
|
_: 1
|
|
428
430
|
/* STABLE */
|
|
429
|
-
})) :
|
|
430
|
-
|
|
431
|
+
})) : i("v-if", !0),
|
|
432
|
+
i(`
|
|
431
433
|
@slot valid-button - Replace the valid button by your own
|
|
432
434
|
`),
|
|
433
435
|
e.$slots["valid-button"] || e.validButton ? C(e.$slots, "valid-button", { key: 2 }, () => [
|
|
434
|
-
|
|
436
|
+
M(c(s), {
|
|
435
437
|
color: "transparent",
|
|
436
438
|
disabled: e.disabled,
|
|
437
439
|
tabindex: "-1",
|
|
@@ -441,13 +443,13 @@ const ze = {
|
|
|
441
443
|
type: "submit"
|
|
442
444
|
}, {
|
|
443
445
|
default: P(() => [
|
|
444
|
-
|
|
446
|
+
M(c(B), { class: "maz-text-2xl maz-text-normal" })
|
|
445
447
|
]),
|
|
446
448
|
_: 1
|
|
447
449
|
/* STABLE */
|
|
448
450
|
}, 8, ["disabled", "loading"])
|
|
449
|
-
], !0) :
|
|
450
|
-
])) :
|
|
451
|
+
], !0) : i("v-if", !0)
|
|
452
|
+
])) : i("v-if", !0)
|
|
451
453
|
],
|
|
452
454
|
2
|
|
453
455
|
/* CLASS */
|
|
@@ -457,7 +459,7 @@ const ze = {
|
|
|
457
459
|
/* CLASS, STYLE */
|
|
458
460
|
));
|
|
459
461
|
}
|
|
460
|
-
}), Ce = /* @__PURE__ */ J($e, [["__scopeId", "data-v-b3e1e126"]]),
|
|
462
|
+
}), Ce = /* @__PURE__ */ J($e, [["__scopeId", "data-v-b3e1e126"]]), Se = /* @__PURE__ */ L({
|
|
461
463
|
inheritAttrs: !1,
|
|
462
464
|
__name: "MazInputNumber",
|
|
463
465
|
props: {
|
|
@@ -480,101 +482,101 @@ const ze = {
|
|
|
480
482
|
},
|
|
481
483
|
emits: ["update:model-value", "focus", "blur", "click", "change"],
|
|
482
484
|
setup(m, { emit: o }) {
|
|
483
|
-
const
|
|
484
|
-
get: () =>
|
|
485
|
-
set: (
|
|
485
|
+
const t = m, u = o, s = a({
|
|
486
|
+
get: () => t.modelValue,
|
|
487
|
+
set: (n) => B(n)
|
|
486
488
|
});
|
|
487
|
-
function
|
|
488
|
-
return Math.round(
|
|
489
|
+
function j(n) {
|
|
490
|
+
return Math.round(n / t.step) * t.step;
|
|
489
491
|
}
|
|
490
|
-
function k(
|
|
491
|
-
if (typeof
|
|
492
|
-
return
|
|
492
|
+
function k(n) {
|
|
493
|
+
if (typeof n == "number")
|
|
494
|
+
return n <= t.min ? t.min : n >= t.max ? t.max : j(n);
|
|
493
495
|
}
|
|
494
|
-
const I = H((
|
|
495
|
-
function B(
|
|
496
|
-
|
|
496
|
+
const I = H((n) => B(n), 300);
|
|
497
|
+
function B(n) {
|
|
498
|
+
n = k(n), s.value !== n && u("update:model-value", n);
|
|
497
499
|
}
|
|
498
500
|
B(s.value);
|
|
499
|
-
const v =
|
|
501
|
+
const v = a(() => t.modelValue && t.modelValue >= t.max), y = a(() => t.modelValue && t.modelValue <= t.min);
|
|
500
502
|
function w() {
|
|
501
|
-
if (!(
|
|
502
|
-
if ((s.value === void 0 || s.value === null) && Number.isFinite(
|
|
503
|
-
s.value =
|
|
503
|
+
if (!(t.disabled || v.value)) {
|
|
504
|
+
if ((s.value === void 0 || s.value === null) && Number.isFinite(t.min)) {
|
|
505
|
+
s.value = t.min;
|
|
504
506
|
return;
|
|
505
507
|
}
|
|
506
|
-
s.value = (s.value ?? 0) + 1 *
|
|
508
|
+
s.value = (s.value ?? 0) + 1 * t.step;
|
|
507
509
|
}
|
|
508
510
|
}
|
|
509
|
-
function
|
|
510
|
-
if (!(
|
|
511
|
-
if ((s.value === void 0 || s.value === null) && Number.isFinite(
|
|
512
|
-
s.value =
|
|
511
|
+
function S() {
|
|
512
|
+
if (!(t.disabled || y.value)) {
|
|
513
|
+
if ((s.value === void 0 || s.value === null) && Number.isFinite(t.min)) {
|
|
514
|
+
s.value = t.min;
|
|
513
515
|
return;
|
|
514
516
|
}
|
|
515
|
-
s.value = (s.value ?? 0) - 1 *
|
|
517
|
+
s.value = (s.value ?? 0) - 1 * t.step;
|
|
516
518
|
}
|
|
517
519
|
}
|
|
518
|
-
return (
|
|
520
|
+
return (n, f) => (r(), z(
|
|
519
521
|
"div",
|
|
520
522
|
{
|
|
521
|
-
class: b(["m-input-number", [`m-input-number--${
|
|
522
|
-
style: Y(
|
|
523
|
+
class: b(["m-input-number", [`m-input-number--${n.size}`, t.class, { "--block": n.block }]]),
|
|
524
|
+
style: Y(n.style)
|
|
523
525
|
},
|
|
524
526
|
[
|
|
525
|
-
|
|
527
|
+
n.noButtons ? i("v-if", !0) : (r(), d(R, {
|
|
526
528
|
key: 0,
|
|
527
529
|
color: "transparent",
|
|
528
|
-
size:
|
|
530
|
+
size: n.size,
|
|
529
531
|
tabindex: "-1",
|
|
530
532
|
class: "m-input-number__button m-input-number__decrement-button",
|
|
531
|
-
disabled: y.value ||
|
|
532
|
-
onClick:
|
|
533
|
+
disabled: y.value || n.disabled,
|
|
534
|
+
onClick: S
|
|
533
535
|
}, {
|
|
534
536
|
default: P(() => [
|
|
535
|
-
|
|
537
|
+
M(c(ce), { class: "m-input-number__button__icon" })
|
|
536
538
|
]),
|
|
537
539
|
_: 1
|
|
538
540
|
/* STABLE */
|
|
539
541
|
}, 8, ["size", "disabled"])),
|
|
540
|
-
|
|
542
|
+
M(Ce, G({
|
|
541
543
|
"model-value": s.value,
|
|
542
544
|
type: "number",
|
|
543
|
-
class: ["m-input-number__input", { "--no-buttons":
|
|
544
|
-
disabled:
|
|
545
|
-
min:
|
|
546
|
-
max:
|
|
547
|
-
step:
|
|
548
|
-
error:
|
|
549
|
-
success:
|
|
550
|
-
warning:
|
|
551
|
-
hint:
|
|
552
|
-
},
|
|
553
|
-
inputmode:
|
|
554
|
-
size:
|
|
545
|
+
class: ["m-input-number__input", { "--no-buttons": n.noButtons, "--text-center": n.textCenter }],
|
|
546
|
+
disabled: n.disabled,
|
|
547
|
+
min: n.min,
|
|
548
|
+
max: n.max,
|
|
549
|
+
step: n.step,
|
|
550
|
+
error: n.error,
|
|
551
|
+
success: n.success,
|
|
552
|
+
warning: n.warning,
|
|
553
|
+
hint: n.hint
|
|
554
|
+
}, n.$attrs, {
|
|
555
|
+
inputmode: n.inputmode,
|
|
556
|
+
size: n.size,
|
|
555
557
|
block: "",
|
|
556
558
|
onKeydown: [
|
|
557
|
-
U(
|
|
558
|
-
U(
|
|
559
|
+
U(q(w, ["prevent"]), ["up"]),
|
|
560
|
+
U(q(S, ["prevent"]), ["down"])
|
|
559
561
|
],
|
|
560
|
-
onFocus:
|
|
561
|
-
onChange:
|
|
562
|
-
onBlur:
|
|
563
|
-
onClick:
|
|
564
|
-
"onUpdate:modelValue":
|
|
562
|
+
onFocus: f[0] || (f[0] = (p) => n.$emit("focus", p)),
|
|
563
|
+
onChange: f[1] || (f[1] = (p) => n.$emit("change", p)),
|
|
564
|
+
onBlur: f[2] || (f[2] = (p) => n.$emit("blur", p)),
|
|
565
|
+
onClick: f[3] || (f[3] = (p) => n.$emit("click", p)),
|
|
566
|
+
"onUpdate:modelValue": f[4] || (f[4] = (p) => c(I)(p))
|
|
565
567
|
}), null, 16, ["model-value", "class", "disabled", "min", "max", "step", "error", "success", "warning", "hint", "inputmode", "size", "onKeydown"]),
|
|
566
|
-
|
|
568
|
+
n.noButtons ? i("v-if", !0) : (r(), d(R, {
|
|
567
569
|
key: 1,
|
|
568
570
|
color: "transparent",
|
|
569
571
|
"no-shadow": "",
|
|
570
572
|
tabindex: "-1",
|
|
571
|
-
size:
|
|
573
|
+
size: n.size,
|
|
572
574
|
class: "m-input-number__button m-input-number__increment-button",
|
|
573
|
-
disabled: v.value ||
|
|
575
|
+
disabled: v.value || n.disabled,
|
|
574
576
|
onClick: w
|
|
575
577
|
}, {
|
|
576
578
|
default: P(() => [
|
|
577
|
-
|
|
579
|
+
M(c(ve), { class: "m-input-number__button__icon" })
|
|
578
580
|
]),
|
|
579
581
|
_: 1
|
|
580
582
|
/* STABLE */
|
|
@@ -587,5 +589,5 @@ const ze = {
|
|
|
587
589
|
});
|
|
588
590
|
export {
|
|
589
591
|
J as _,
|
|
590
|
-
|
|
592
|
+
Se as a
|
|
591
593
|
};
|
|
@@ -113,7 +113,7 @@ const be = {
|
|
|
113
113
|
},
|
|
114
114
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
115
115
|
setup(l, { emit: r }) {
|
|
116
|
-
const t = l, n = r, d = z(() => import("./MazBtn-
|
|
116
|
+
const t = l, n = r, d = z(() => import("./MazBtn-BV212IYv.mjs")), b = z(() => import("./MazIcon-BbvBov5G.mjs")), C = z(() => import("./eye-slash-BoO00xzs.mjs")), I = z(() => import("./eye-f8zAUc30.mjs")), k = z(() => import("./check-BmubdHc_.mjs")), p = w(!1), y = w(!1), h = w(), E = ve({
|
|
117
117
|
componentName: "MazInput",
|
|
118
118
|
providedId: t.id
|
|
119
119
|
});
|