maz-ui 3.47.2-beta.0 → 3.47.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazAccordion.mjs +36 -37
- package/components/MazAnimatedCounter.mjs +14 -16
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCarousel.mjs +1 -1
- package/components/MazChart.mjs +23 -32
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +66 -71
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +162 -185
- package/components/MazExpandAnimation.mjs +20 -21
- package/components/MazGallery.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.mjs +30 -31
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLink.mjs +18 -30
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.mjs +37 -42
- package/components/MazRadioButtons.mjs +61 -66
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider.mjs +107 -116
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.mjs +24 -28
- package/components/MazTable.d.ts +6 -6
- package/components/MazTable.mjs +1 -1
- package/components/MazTabsBar.mjs +1 -1
- package/components/MazTextarea.mjs +32 -34
- package/components/assets/MazLink.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/chunks/{MazBadge-CvIiiTdM.mjs → MazBadge-CqppWg2j.mjs} +1 -1
- package/components/chunks/{MazBottomSheet-DqK0EOsq.mjs → MazBottomSheet-CGRvZmGd.mjs} +28 -29
- package/{modules/chunks/MazBtn-BSnVxud6.mjs → components/chunks/MazBtn-2VKM1wZu.mjs} +37 -49
- package/components/chunks/{MazBtn-DVkwISlp.mjs → MazBtn-40lm8-AL.mjs} +37 -49
- package/components/chunks/{MazBtn-DzBXfedt.mjs → MazBtn-BB1FyYWv.mjs} +35 -44
- package/components/chunks/{MazBtn-BO3G90L3.mjs → MazBtn-BMYXMZuX.mjs} +37 -49
- package/components/chunks/{MazBtn-DJOUeES7.mjs → MazBtn-BijEMn4r.mjs} +37 -49
- package/components/chunks/MazBtn-BmrcK2af.mjs +106 -0
- package/components/chunks/MazBtn-C72_1uvu.mjs +106 -0
- package/components/chunks/MazBtn-CWloP6MI.mjs +111 -0
- package/components/chunks/MazBtn-CcyV4DCc.mjs +106 -0
- package/components/chunks/MazBtn-DENEMy-c.mjs +106 -0
- package/components/chunks/MazBtn-DfqRZvbB.mjs +106 -0
- package/components/chunks/MazBtn-UnZQuu6P.mjs +106 -0
- package/components/chunks/MazBtn-cDJlUVVY.mjs +106 -0
- package/components/chunks/MazBtn-hUslV7wO.mjs +106 -0
- package/components/chunks/{MazCard-FSXmHyhj.mjs → MazCard-BYB8y1_u.mjs} +18 -19
- package/components/chunks/{MazCarousel-BEl86YGW.mjs → MazCarousel-DccWVW8H.mjs} +20 -21
- package/components/chunks/{MazCheckbox-2G4VkxDz.mjs → MazCheckbox-B22OcHt8.mjs} +1 -1
- package/components/chunks/{MazCheckbox-Cq9gpTEw.mjs → MazCheckbox-DMogZVHl.mjs} +1 -1
- package/components/chunks/{MazCheckbox-BmnqBHaY.mjs → MazCheckbox-Db6sPUbV.mjs} +1 -1
- package/components/chunks/{MazChecklist-CY1Cv70T.mjs → MazChecklist-C95Y4Hb-.mjs} +112 -118
- package/components/chunks/{MazDialog-CPgFpAlq.mjs → MazDialog-khofH-7I.mjs} +66 -81
- package/components/chunks/MazDialogPromise-ZRA2ZrO4.mjs +488 -0
- package/components/chunks/{MazExpandAnimation-Bkw_wFTi.mjs → MazExpandAnimation-MDimlZGj.mjs} +7 -8
- package/components/chunks/{MazGallery-BknvUeo1.mjs → MazGallery-CXQiXWFr.mjs} +32 -33
- package/components/chunks/{MazGallery-CZOokGAt.mjs → MazGallery-VTZUhBKC.mjs} +33 -34
- package/components/chunks/{MazIcon-z-jTiuyI.mjs → MazIcon-BF5TFzse.mjs} +1 -1
- package/components/chunks/{MazInput-oOA7gdLO.mjs → MazInput-DC3S-CVu.mjs} +44 -53
- package/components/chunks/{MazInput-BQoQSRyL.mjs → MazInput-DzWkS-g8.mjs} +40 -49
- package/components/chunks/{MazInput-CJQB68c-.mjs → MazInput-NE6H-10w.mjs} +42 -51
- package/components/chunks/{MazInputNumber-B4mQJcVB.mjs → MazInputNumber-DRXQXHRv.mjs} +168 -189
- package/components/chunks/{MazInputPrice-BrxE5WVf.mjs → MazInputPrice-DoTnDDIN.mjs} +49 -58
- package/components/chunks/{MazInputTags-BVCej_gW.mjs → MazInputTags-Dj3sW-e5.mjs} +181 -202
- package/components/chunks/{MazLink-Dl9ePCGm.mjs → MazLink-C_3Wya94.mjs} +19 -31
- package/components/chunks/{MazLoadingBar-Dwf55oHy.mjs → MazLoadingBar-DdjHRC7g.mjs} +1 -1
- package/components/chunks/MazPagination-BkT4_LLW.mjs +330 -0
- package/components/chunks/{MazPhoneNumberInput-Cd25AzXc.mjs → MazPhoneNumberInput-BbssOUzo.mjs} +500 -544
- package/components/chunks/{MazPicker-C78yxilJ.mjs → MazPicker-DwWiIYAR.mjs} +243 -264
- package/components/chunks/{MazPickerMonthSwitcher-CyHYx8TT.mjs → MazPickerMonthSwitcher-CmFFQoPA.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-Bsi8cnox.mjs → MazPickerShortcuts-DaELz7aq.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DLUSMAtz.mjs → MazPickerYearSwitcher-m1_KXnpA.mjs} +1 -1
- package/components/chunks/{MazSelect-CQDoUpgp.mjs → MazSelect-BJ07NVXQ.mjs} +149 -170
- package/components/chunks/{MazSelect-uCJPMXF-.mjs → MazSelect-CDV9Fx6m.mjs} +124 -136
- package/components/chunks/{MazSpinner-Bvb-lKER.mjs → MazSpinner-Bb3f2t6w.mjs} +1 -1
- package/components/chunks/{MazSpinner-Cqp-BMvL.mjs → MazSpinner-BcB0szZB.mjs} +1 -1
- package/components/chunks/{MazSpinner-BT_717pD.mjs → MazSpinner-BpkPcfCt.mjs} +1 -1
- package/components/chunks/{MazSpinner-CAbYLlEZ.mjs → MazSpinner-BsYJDmi9.mjs} +1 -1
- package/components/chunks/{MazSpinner-B9OwpEP_.mjs → MazSpinner-BymqEMBk.mjs} +1 -1
- package/components/chunks/MazSpinner-C-64WJje.mjs +34 -0
- package/components/chunks/MazSpinner-CEFbkZkM.mjs +34 -0
- package/components/chunks/{MazSpinner-EFo8dM46.mjs → MazSpinner-CfiIXW8y.mjs} +1 -1
- package/components/chunks/MazSpinner-CykRbNHD.mjs +34 -0
- package/components/chunks/{MazSpinner-C-z3-68w.mjs → MazSpinner-D3-pqOh3.mjs} +1 -1
- package/components/chunks/MazSpinner-DS58mtzm.mjs +34 -0
- package/components/chunks/{MazSpinner-2D0ZmAQz.mjs → MazSpinner-DmiLBQgR.mjs} +1 -1
- package/components/chunks/{MazSpinner-C1Ip-Dwh.mjs → MazSpinner-Dmkr_r9u.mjs} +1 -1
- package/components/chunks/MazSpinner-DoRGA1RI.mjs +34 -0
- package/components/chunks/MazSpinner-eC03bFP5.mjs +34 -0
- package/components/chunks/{MazSpinner-Cb3_S0zT.mjs → MazSpinner-edxn0ncQ.mjs} +1 -1
- package/components/chunks/MazSpinner-f2Mc2eRO.mjs +34 -0
- package/components/chunks/MazSpinner-n4Dp5ZsH.mjs +34 -0
- package/components/chunks/MazStepper-BREfkpUb.mjs +213 -0
- package/components/chunks/{MazTable-Cuz5QI08.mjs → MazTable-BJDPdIJB.mjs} +183 -227
- package/components/chunks/{MazTableCell-D_OTOJiy.mjs → MazTableCell-DILuUCTe.mjs} +1 -1
- package/components/chunks/{MazTableRow-BTcVAyOy.mjs → MazTableRow-D6H6-c8J.mjs} +1 -1
- package/components/chunks/{MazTableTitle-BDA9G6Zw.mjs → MazTableTitle-Ch-nyY1E.mjs} +1 -1
- package/components/chunks/MazTabsBar-CM-w7V97.mjs +193 -0
- package/components/chunks/{MazTransitionExpand-C-FHhOGB.mjs → MazTransitionExpand-PmUDa51_.mjs} +1 -1
- package/modules/chunks/MazBtn-B_Xlvgbg.cjs +1 -0
- package/modules/chunks/MazBtn-Dsr06Zgg.mjs +106 -0
- package/modules/chunks/{MazIcon-dhyR9Q8a.cjs → MazIcon-CkuzyufF.cjs} +1 -1
- package/modules/chunks/{MazIcon-DllGg8tw.mjs → MazIcon-DEgoQbMj.mjs} +1 -1
- package/modules/chunks/{MazSpinner-bdGjxsu6.mjs → MazSpinner-BurN-1pb.mjs} +1 -1
- package/modules/chunks/{MazSpinner-CiIyZ8gs.cjs → MazSpinner-jP4QsCNE.cjs} +1 -1
- package/modules/chunks/index-CUNN0eIB.cjs +124 -0
- package/modules/chunks/{index-x2F1l5sr.mjs → index-CxFUggmu.mjs} +257 -292
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazTable.vue.d.ts +6 -6
- package/types/modules/composables/useFormValidator/types.d.ts +5 -1
- package/types/modules/composables/useFormValidator/useFormField.d.ts +3 -3
- package/types/modules/composables/useFormValidator/useFormValidator.d.ts +2 -2
- package/types/modules/composables/useFormValidator/utils.d.ts +12 -12
- package/components/chunks/MazBtn-BRUaoP8j.mjs +0 -126
- package/components/chunks/MazBtn-BhnOApJu.mjs +0 -118
- package/components/chunks/MazBtn-C28vKP_v.mjs +0 -118
- package/components/chunks/MazBtn-C87UEsVs.mjs +0 -118
- package/components/chunks/MazBtn-C_l3xuAh.mjs +0 -118
- package/components/chunks/MazBtn-CweCwE_4.mjs +0 -118
- package/components/chunks/MazBtn-D7IKoL2c.mjs +0 -118
- package/components/chunks/MazBtn-DadFupkY.mjs +0 -118
- package/components/chunks/MazBtn-GGcGrIH4.mjs +0 -118
- package/components/chunks/MazBtn-Mu18egu5.mjs +0 -118
- package/components/chunks/MazDialogPromise-BCCdkrea.mjs +0 -522
- package/components/chunks/MazPagination-CHTMRRqE.mjs +0 -362
- package/components/chunks/MazSpinner-C23CZ_Za.mjs +0 -34
- package/components/chunks/MazSpinner-CViChjTw.mjs +0 -34
- package/components/chunks/MazSpinner-CZMBhCOJ.mjs +0 -34
- package/components/chunks/MazSpinner-D4C84xZe.mjs +0 -34
- package/components/chunks/MazSpinner-Dyf9yb51.mjs +0 -34
- package/components/chunks/MazSpinner-QHjOczon.mjs +0 -34
- package/components/chunks/MazSpinner-u8WQTgUR.mjs +0 -34
- package/components/chunks/MazSpinner-w-S5uCxg.mjs +0 -34
- package/components/chunks/MazStepper-DRWtYHZR.mjs +0 -232
- package/components/chunks/MazTabsBar-JkRzMDM6.mjs +0 -203
- package/modules/chunks/MazBtn-Bf9Cq5M7.cjs +0 -9
- package/modules/chunks/index-BPqjUr5e.cjs +0 -149
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { openBlock as r, createElementBlock as
|
|
2
|
-
import '../assets/MazInputNumber.css';function H(
|
|
3
|
-
let
|
|
1
|
+
import { openBlock as r, createElementBlock as g, createElementVNode as P, defineComponent as R, defineAsyncComponent as $, useAttrs as te, useSlots as K, computed as a, createBlock as d, resolveDynamicComponent as V, normalizeClass as b, withCtx as E, renderSlot as C, unref as m, createCommentVNode as s, createVNode as M, useId as oe, ref as A, onMounted as le, normalizeStyle as Y, withDirectives as ae, mergeProps as G, toHandlers as re, vModelDynamic as ie, createTextVNode as se, toDisplayString as ue, withModifiers as q, withKeys as U } from "vue";
|
|
2
|
+
import '../assets/MazInputNumber.css';function H(c, o) {
|
|
3
|
+
let n;
|
|
4
4
|
return function(...u) {
|
|
5
|
-
clearTimeout(
|
|
6
|
-
|
|
5
|
+
clearTimeout(n), n = setTimeout(() => {
|
|
6
|
+
c.apply(this, u);
|
|
7
7
|
}, o);
|
|
8
8
|
};
|
|
9
9
|
}
|
|
@@ -14,9 +14,9 @@ const de = {
|
|
|
14
14
|
fill: "none",
|
|
15
15
|
viewBox: "0 0 24 24"
|
|
16
16
|
};
|
|
17
|
-
function fe(
|
|
18
|
-
return r(),
|
|
19
|
-
|
|
17
|
+
function fe(c, o) {
|
|
18
|
+
return r(), g("svg", de, o[0] || (o[0] = [
|
|
19
|
+
P(
|
|
20
20
|
"path",
|
|
21
21
|
{
|
|
22
22
|
stroke: "currentColor",
|
|
@@ -31,16 +31,16 @@ function fe(m, o) {
|
|
|
31
31
|
)
|
|
32
32
|
]));
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const me = { render: fe }, ce = {
|
|
35
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
36
36
|
width: "1em",
|
|
37
37
|
height: "1em",
|
|
38
38
|
fill: "none",
|
|
39
39
|
viewBox: "0 0 24 24"
|
|
40
40
|
};
|
|
41
|
-
function pe(
|
|
42
|
-
return r(),
|
|
43
|
-
|
|
41
|
+
function pe(c, o) {
|
|
42
|
+
return r(), g("svg", ce, o[0] || (o[0] = [
|
|
43
|
+
P(
|
|
44
44
|
"path",
|
|
45
45
|
{
|
|
46
46
|
stroke: "currentColor",
|
|
@@ -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__ */ R({
|
|
62
62
|
__name: "MazBtn",
|
|
63
63
|
props: {
|
|
64
64
|
variant: { default: "button" },
|
|
@@ -82,13 +82,13 @@ const ve = { render: pe }, be = {
|
|
|
82
82
|
noElevation: { type: Boolean },
|
|
83
83
|
justify: { default: "center" }
|
|
84
84
|
},
|
|
85
|
-
setup(
|
|
86
|
-
const o =
|
|
85
|
+
setup(c) {
|
|
86
|
+
const o = c, n = $(() => import("./MazSpinner-eC03bFP5.mjs")), u = $(() => import("./MazIcon-BbvBov5G.mjs")), { href: i, to: j } = te(), k = K(), I = a(() => i ? "a" : j ? "router-link" : "button"), B = a(
|
|
87
87
|
() => o.pastel ? `--${o.color}-pastel` : o.outline ? `--${o.color}-outline` : `--${o.color}`
|
|
88
88
|
), v = a(
|
|
89
89
|
() => (o.loading || o.disabled) && I.value === "button"
|
|
90
|
-
), y = a(() => v.value ? "--cursor-default" : "--cursor-pointer"), w = a(() => `--is-${o.variant}`), S = a(() => o.loading && o.variant === "button"),
|
|
91
|
-
return (l,
|
|
90
|
+
), y = a(() => v.value ? "--cursor-default" : "--cursor-pointer"), w = a(() => `--is-${o.variant}`), S = a(() => o.loading && o.variant === "button"), t = a(() => !!k["left-icon"] || o.leftIcon), f = a(() => !!k["right-icon"] || o.rightIcon), p = a(() => t.value || f.value), N = a(() => o.icon || !!k.icon), D = a(() => I.value === "button" ? o.type : void 0), h = 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, F) => (r(), d(V(I.value), {
|
|
92
92
|
disabled: v.value || void 0,
|
|
93
93
|
class: b(["m-btn", [
|
|
94
94
|
`--${l.size}`,
|
|
@@ -112,84 +112,72 @@ const ve = { render: pe }, be = {
|
|
|
112
112
|
]]),
|
|
113
113
|
type: D.value
|
|
114
114
|
}, {
|
|
115
|
-
default:
|
|
116
|
-
i(`
|
|
117
|
-
@slot left-icon - The icon to display on the left of the button
|
|
118
|
-
`),
|
|
115
|
+
default: E(() => [
|
|
119
116
|
C(l.$slots, "left-icon", {}, () => [
|
|
120
|
-
typeof l.leftIcon == "string" ? (r(), d(
|
|
117
|
+
typeof l.leftIcon == "string" ? (r(), d(m(u), {
|
|
121
118
|
key: 0,
|
|
122
119
|
name: l.leftIcon,
|
|
123
|
-
class: b([
|
|
120
|
+
class: b([h.value])
|
|
124
121
|
}, null, 8, ["name", "class"])) : l.leftIcon ? (r(), d(V(l.leftIcon), {
|
|
125
122
|
key: 1,
|
|
126
|
-
class: b([
|
|
127
|
-
}, null, 8, ["class"])) :
|
|
123
|
+
class: b([h.value])
|
|
124
|
+
}, null, 8, ["class"])) : s("v-if", !0)
|
|
128
125
|
], !0),
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
`),
|
|
132
|
-
T.value ? C(l.$slots, "icon", { key: 0 }, () => [
|
|
133
|
-
typeof l.icon == "string" ? (r(), d(c(u), {
|
|
126
|
+
N.value ? C(l.$slots, "icon", { key: 0 }, () => [
|
|
127
|
+
typeof l.icon == "string" ? (r(), d(m(u), {
|
|
134
128
|
key: 0,
|
|
135
129
|
name: l.icon,
|
|
136
|
-
class: b([
|
|
130
|
+
class: b([h.value])
|
|
137
131
|
}, null, 8, ["name", "class"])) : l.icon ? (r(), d(V(l.icon), {
|
|
138
132
|
key: 1,
|
|
139
|
-
class: b([
|
|
140
|
-
}, null, 8, ["class"])) :
|
|
141
|
-
], !0) :
|
|
142
|
-
i(`
|
|
143
|
-
@slot default - The content of the button
|
|
144
|
-
`),
|
|
133
|
+
class: b([h.value])
|
|
134
|
+
}, null, 8, ["class"])) : s("v-if", !0)
|
|
135
|
+
], !0) : s("v-if", !0),
|
|
145
136
|
C(l.$slots, "default", {}, void 0, !0),
|
|
146
|
-
i(`
|
|
147
|
-
@slot left-icon - The icon to display on the left of the button
|
|
148
|
-
`),
|
|
149
137
|
f.value ? C(l.$slots, "right-icon", { key: 1 }, () => [
|
|
150
|
-
typeof l.rightIcon == "string" ? (r(), d(
|
|
138
|
+
typeof l.rightIcon == "string" ? (r(), d(m(u), {
|
|
151
139
|
key: 0,
|
|
152
140
|
name: l.rightIcon,
|
|
153
|
-
class: b([
|
|
141
|
+
class: b([h.value])
|
|
154
142
|
}, null, 8, ["name", "class"])) : l.rightIcon ? (r(), d(V(l.rightIcon), {
|
|
155
143
|
key: 1,
|
|
156
|
-
class: b([
|
|
157
|
-
}, null, 8, ["class"])) :
|
|
158
|
-
], !0) :
|
|
159
|
-
S.value ? (r(),
|
|
160
|
-
M(
|
|
144
|
+
class: b([h.value])
|
|
145
|
+
}, null, 8, ["class"])) : s("v-if", !0)
|
|
146
|
+
], !0) : s("v-if", !0),
|
|
147
|
+
S.value ? (r(), g("div", be, [
|
|
148
|
+
M(m(n), {
|
|
161
149
|
size: "2em",
|
|
162
150
|
color: l.color
|
|
163
151
|
}, null, 8, ["color"])
|
|
164
|
-
])) :
|
|
152
|
+
])) : s("v-if", !0)
|
|
165
153
|
]),
|
|
166
154
|
_: 3
|
|
167
155
|
/* FORWARDED */
|
|
168
156
|
}, 8, ["disabled", "class", "type"]));
|
|
169
157
|
}
|
|
170
|
-
}), J = (
|
|
171
|
-
const
|
|
172
|
-
for (const [u,
|
|
173
|
-
|
|
174
|
-
return
|
|
175
|
-
},
|
|
158
|
+
}), J = (c, o) => {
|
|
159
|
+
const n = c.__vccOpts || c;
|
|
160
|
+
for (const [u, i] of o)
|
|
161
|
+
n[u] = i;
|
|
162
|
+
return n;
|
|
163
|
+
}, L = /* @__PURE__ */ J(ye, [["__scopeId", "data-v-d3a1ed01"]]), ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
176
164
|
__proto__: null,
|
|
177
|
-
default:
|
|
165
|
+
default: L
|
|
178
166
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
179
|
-
function
|
|
180
|
-
componentName:
|
|
167
|
+
function ge({
|
|
168
|
+
componentName: c,
|
|
181
169
|
providedId: o
|
|
182
170
|
}) {
|
|
183
|
-
const
|
|
184
|
-
return a(() => o ?? `${
|
|
171
|
+
const n = oe();
|
|
172
|
+
return a(() => o ?? `${c}-${n}`);
|
|
185
173
|
}
|
|
186
|
-
const
|
|
174
|
+
const he = {
|
|
187
175
|
key: 0,
|
|
188
176
|
class: "m-input-wrapper-left"
|
|
189
177
|
}, ke = { class: "m-input-wrapper-input" }, Ie = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], Be = { key: 0 }, we = {
|
|
190
178
|
key: 1,
|
|
191
179
|
class: "m-input-wrapper-right"
|
|
192
|
-
}, $e = /* @__PURE__ */
|
|
180
|
+
}, $e = /* @__PURE__ */ R({
|
|
193
181
|
inheritAttrs: !1,
|
|
194
182
|
__name: "MazInput",
|
|
195
183
|
props: {
|
|
@@ -226,67 +214,67 @@ const ge = {
|
|
|
226
214
|
block: { type: Boolean }
|
|
227
215
|
},
|
|
228
216
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
229
|
-
setup(
|
|
230
|
-
const
|
|
217
|
+
setup(c, { emit: o }) {
|
|
218
|
+
const n = c, u = o, i = $(() => Promise.resolve().then(() => ze)), 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 = ge({
|
|
231
219
|
componentName: "MazInput",
|
|
232
|
-
providedId:
|
|
220
|
+
providedId: n.id
|
|
233
221
|
});
|
|
234
222
|
le(() => {
|
|
235
223
|
var e;
|
|
236
|
-
|
|
224
|
+
n.autoFocus && ((e = w.value) == null || e.focus());
|
|
237
225
|
});
|
|
238
|
-
const
|
|
239
|
-
if (!
|
|
240
|
-
if (
|
|
226
|
+
const t = a(() => n.type === "password"), f = a(() => v.value ? "text" : n.type), p = a(() => {
|
|
227
|
+
if (!n.noBorder) {
|
|
228
|
+
if (n.error)
|
|
241
229
|
return "maz-border-danger";
|
|
242
|
-
if (
|
|
230
|
+
if (n.success)
|
|
243
231
|
return "maz-border-success";
|
|
244
|
-
if (
|
|
232
|
+
if (n.warning)
|
|
245
233
|
return "maz-border-warning";
|
|
246
|
-
if (y.value ||
|
|
247
|
-
if (
|
|
234
|
+
if (y.value || n.borderActive) {
|
|
235
|
+
if (n.color === "black")
|
|
248
236
|
return "maz-border-black";
|
|
249
|
-
if (
|
|
237
|
+
if (n.color === "danger")
|
|
250
238
|
return "maz-border-danger";
|
|
251
|
-
if (
|
|
239
|
+
if (n.color === "info")
|
|
252
240
|
return "maz-border-info";
|
|
253
|
-
if (
|
|
241
|
+
if (n.color === "primary")
|
|
254
242
|
return "maz-border-primary";
|
|
255
|
-
if (
|
|
243
|
+
if (n.color === "secondary")
|
|
256
244
|
return "maz-border-secondary";
|
|
257
|
-
if (
|
|
245
|
+
if (n.color === "success")
|
|
258
246
|
return "maz-border-success";
|
|
259
|
-
if (
|
|
247
|
+
if (n.color === "warning")
|
|
260
248
|
return "maz-border-warning";
|
|
261
|
-
if (
|
|
249
|
+
if (n.color === "white")
|
|
262
250
|
return "maz-border-white";
|
|
263
251
|
}
|
|
264
252
|
return "--default-border";
|
|
265
253
|
}
|
|
266
|
-
}),
|
|
267
|
-
const { required: e, placeholder:
|
|
268
|
-
if (
|
|
269
|
-
return e ? `${
|
|
270
|
-
}),
|
|
254
|
+
}), N = K(), D = a(() => {
|
|
255
|
+
const { required: e, placeholder: z } = n;
|
|
256
|
+
if (z)
|
|
257
|
+
return e ? `${z} *` : z;
|
|
258
|
+
}), h = a(() => F.value !== void 0 && F.value !== ""), O = H(
|
|
271
259
|
(e) => {
|
|
272
260
|
u("update:model-value", e);
|
|
273
261
|
},
|
|
274
|
-
typeof
|
|
262
|
+
typeof n.debounce == "number" ? n.debounce : n.debounceDelay ?? 500
|
|
275
263
|
);
|
|
276
264
|
function l(e) {
|
|
277
|
-
if (
|
|
265
|
+
if (n.debounce)
|
|
278
266
|
return O(e);
|
|
279
267
|
u("update:model-value", e);
|
|
280
268
|
}
|
|
281
|
-
const
|
|
282
|
-
get: () =>
|
|
269
|
+
const F = a({
|
|
270
|
+
get: () => n.modelValue,
|
|
283
271
|
set: (e) => l(e)
|
|
284
|
-
}), Q = a(() => (!!
|
|
272
|
+
}), Q = a(() => (!!n.label || !!n.hint) && (y.value || !!h.value || !!n.placeholder || ["date", "month", "week"].includes(n.type))), W = a(() => !!n.label || !!n.hint);
|
|
285
273
|
function X() {
|
|
286
|
-
return !!
|
|
274
|
+
return !!N["right-icon"] || t.value || !!N["valid-button"] || n.validButton || !!n.rightIcon;
|
|
287
275
|
}
|
|
288
276
|
function Z() {
|
|
289
|
-
return !!
|
|
277
|
+
return !!N["left-icon"] || !!n.leftIcon;
|
|
290
278
|
}
|
|
291
279
|
function x(e) {
|
|
292
280
|
u("focus", e), y.value = !0;
|
|
@@ -297,10 +285,10 @@ const ge = {
|
|
|
297
285
|
function ee(e) {
|
|
298
286
|
return u("change", e);
|
|
299
287
|
}
|
|
300
|
-
function
|
|
288
|
+
function ne(e) {
|
|
301
289
|
return u("input", e);
|
|
302
290
|
}
|
|
303
|
-
return (e,
|
|
291
|
+
return (e, z) => (r(), g(
|
|
304
292
|
"div",
|
|
305
293
|
{
|
|
306
294
|
class: b(["m-input", [
|
|
@@ -314,14 +302,14 @@ const ge = {
|
|
|
314
302
|
"--has-state": e.error || e.warning || e.success,
|
|
315
303
|
"--block": e.block
|
|
316
304
|
},
|
|
317
|
-
|
|
305
|
+
n.class,
|
|
318
306
|
`--${e.color}`,
|
|
319
307
|
`--${e.size}`
|
|
320
308
|
]]),
|
|
321
309
|
style: Y(e.style)
|
|
322
310
|
},
|
|
323
311
|
[
|
|
324
|
-
|
|
312
|
+
P(
|
|
325
313
|
"div",
|
|
326
314
|
{
|
|
327
315
|
class: b(["m-input-wrapper", [
|
|
@@ -331,27 +319,24 @@ const ge = {
|
|
|
331
319
|
]])
|
|
332
320
|
},
|
|
333
321
|
[
|
|
334
|
-
Z() ? (r(),
|
|
335
|
-
i(`
|
|
336
|
-
@slot left-icon - The icon to display on the left of the input
|
|
337
|
-
`),
|
|
322
|
+
Z() ? (r(), g("div", he, [
|
|
338
323
|
e.$slots["left-icon"] || e.leftIcon ? C(e.$slots, "left-icon", { key: 0 }, () => [
|
|
339
|
-
typeof e.leftIcon == "string" ? (r(), d(
|
|
324
|
+
typeof e.leftIcon == "string" ? (r(), d(m(j), {
|
|
340
325
|
key: 0,
|
|
341
326
|
name: e.leftIcon,
|
|
342
327
|
class: "maz-text-xl maz-text-muted"
|
|
343
328
|
}, null, 8, ["name"])) : e.leftIcon ? (r(), d(V(e.leftIcon), {
|
|
344
329
|
key: 1,
|
|
345
330
|
class: "maz-text-xl maz-text-muted"
|
|
346
|
-
})) :
|
|
347
|
-
], !0) :
|
|
348
|
-
])) :
|
|
349
|
-
|
|
350
|
-
ae(
|
|
351
|
-
id:
|
|
331
|
+
})) : s("v-if", !0)
|
|
332
|
+
], !0) : s("v-if", !0)
|
|
333
|
+
])) : s("v-if", !0),
|
|
334
|
+
P("div", ke, [
|
|
335
|
+
ae(P("input", G({
|
|
336
|
+
id: m(S),
|
|
352
337
|
ref_key: "input",
|
|
353
338
|
ref: w,
|
|
354
|
-
"onUpdate:modelValue":
|
|
339
|
+
"onUpdate:modelValue": z[0] || (z[0] = (T) => F.value = T),
|
|
355
340
|
type: f.value,
|
|
356
341
|
name: e.name
|
|
357
342
|
}, e.$attrs, {
|
|
@@ -362,17 +347,17 @@ const ge = {
|
|
|
362
347
|
readonly: e.readonly,
|
|
363
348
|
required: e.required,
|
|
364
349
|
class: "m-input-input"
|
|
365
|
-
},
|
|
350
|
+
}, re({
|
|
366
351
|
blur: _,
|
|
367
352
|
focus: x,
|
|
368
353
|
change: ee,
|
|
369
|
-
input:
|
|
354
|
+
input: ne
|
|
370
355
|
}, !0), {
|
|
371
|
-
onClick:
|
|
356
|
+
onClick: z[1] || (z[1] = (T) => e.$emit("click", T))
|
|
372
357
|
}), null, 16, Ie), [
|
|
373
|
-
[
|
|
358
|
+
[ie, F.value]
|
|
374
359
|
]),
|
|
375
|
-
e.label || e.hint ? (r(),
|
|
360
|
+
e.label || e.hint ? (r(), g(
|
|
376
361
|
"span",
|
|
377
362
|
{
|
|
378
363
|
key: 0,
|
|
@@ -390,50 +375,44 @@ const ge = {
|
|
|
390
375
|
1
|
|
391
376
|
/* TEXT */
|
|
392
377
|
),
|
|
393
|
-
e.required ? (r(),
|
|
378
|
+
e.required ? (r(), g("sup", Be, "*")) : s("v-if", !0)
|
|
394
379
|
],
|
|
395
380
|
2
|
|
396
381
|
/* CLASS */
|
|
397
|
-
)) :
|
|
382
|
+
)) : s("v-if", !0)
|
|
398
383
|
]),
|
|
399
|
-
X() ? (r(),
|
|
400
|
-
i(`
|
|
401
|
-
@slot right-icon - The icon to display on the right of the input
|
|
402
|
-
`),
|
|
384
|
+
X() ? (r(), g("div", we, [
|
|
403
385
|
e.$slots["right-icon"] || e.rightIcon ? C(e.$slots, "right-icon", { key: 0 }, () => [
|
|
404
|
-
typeof e.rightIcon == "string" ? (r(), d(
|
|
386
|
+
typeof e.rightIcon == "string" ? (r(), d(m(j), {
|
|
405
387
|
key: 0,
|
|
406
388
|
name: e.rightIcon,
|
|
407
389
|
class: "maz-text-xl maz-text-muted"
|
|
408
390
|
}, null, 8, ["name"])) : e.rightIcon ? (r(), d(V(e.rightIcon), {
|
|
409
391
|
key: 1,
|
|
410
392
|
class: "maz-text-xl maz-text-muted"
|
|
411
|
-
})) :
|
|
412
|
-
], !0) :
|
|
413
|
-
|
|
393
|
+
})) : s("v-if", !0)
|
|
394
|
+
], !0) : s("v-if", !0),
|
|
395
|
+
t.value ? (r(), d(m(i), {
|
|
414
396
|
key: 1,
|
|
415
397
|
color: "transparent",
|
|
416
398
|
tabindex: "-1",
|
|
417
399
|
size: "mini",
|
|
418
|
-
onClick:
|
|
400
|
+
onClick: z[2] || (z[2] = q((T) => v.value = !v.value, ["stop"]))
|
|
419
401
|
}, {
|
|
420
|
-
default:
|
|
421
|
-
v.value ? (r(), d(
|
|
402
|
+
default: E(() => [
|
|
403
|
+
v.value ? (r(), d(m(k), {
|
|
422
404
|
key: 0,
|
|
423
405
|
class: "maz-text-xl maz-text-muted"
|
|
424
|
-
})) : (r(), d(
|
|
406
|
+
})) : (r(), d(m(I), {
|
|
425
407
|
key: 1,
|
|
426
408
|
class: "maz-text-xl maz-text-muted"
|
|
427
409
|
}))
|
|
428
410
|
]),
|
|
429
411
|
_: 1
|
|
430
412
|
/* STABLE */
|
|
431
|
-
})) :
|
|
432
|
-
i(`
|
|
433
|
-
@slot valid-button - Replace the valid button by your own
|
|
434
|
-
`),
|
|
413
|
+
})) : s("v-if", !0),
|
|
435
414
|
e.$slots["valid-button"] || e.validButton ? C(e.$slots, "valid-button", { key: 2 }, () => [
|
|
436
|
-
M(
|
|
415
|
+
M(m(i), {
|
|
437
416
|
color: "transparent",
|
|
438
417
|
disabled: e.disabled,
|
|
439
418
|
tabindex: "-1",
|
|
@@ -442,14 +421,14 @@ const ge = {
|
|
|
442
421
|
size: "mini",
|
|
443
422
|
type: "submit"
|
|
444
423
|
}, {
|
|
445
|
-
default:
|
|
446
|
-
M(
|
|
424
|
+
default: E(() => [
|
|
425
|
+
M(m(B), { class: "maz-text-2xl maz-text-normal" })
|
|
447
426
|
]),
|
|
448
427
|
_: 1
|
|
449
428
|
/* STABLE */
|
|
450
429
|
}, 8, ["disabled", "loading"])
|
|
451
|
-
], !0) :
|
|
452
|
-
])) :
|
|
430
|
+
], !0) : s("v-if", !0)
|
|
431
|
+
])) : s("v-if", !0)
|
|
453
432
|
],
|
|
454
433
|
2
|
|
455
434
|
/* CLASS */
|
|
@@ -459,7 +438,7 @@ const ge = {
|
|
|
459
438
|
/* CLASS, STYLE */
|
|
460
439
|
));
|
|
461
440
|
}
|
|
462
|
-
}), Ce = /* @__PURE__ */ J($e, [["__scopeId", "data-v-c42aaa7f"]]), Se = /* @__PURE__ */
|
|
441
|
+
}), Ce = /* @__PURE__ */ J($e, [["__scopeId", "data-v-c42aaa7f"]]), Se = /* @__PURE__ */ R({
|
|
463
442
|
inheritAttrs: !1,
|
|
464
443
|
__name: "MazInputNumber",
|
|
465
444
|
props: {
|
|
@@ -481,102 +460,102 @@ const ge = {
|
|
|
481
460
|
warning: { type: Boolean }
|
|
482
461
|
},
|
|
483
462
|
emits: ["update:model-value", "focus", "blur", "click", "change"],
|
|
484
|
-
setup(
|
|
485
|
-
const
|
|
486
|
-
get: () =>
|
|
487
|
-
set: (
|
|
463
|
+
setup(c, { emit: o }) {
|
|
464
|
+
const n = c, u = o, i = a({
|
|
465
|
+
get: () => n.modelValue,
|
|
466
|
+
set: (t) => B(t)
|
|
488
467
|
});
|
|
489
|
-
function j(
|
|
490
|
-
return Math.round(
|
|
468
|
+
function j(t) {
|
|
469
|
+
return Math.round(t / n.step) * n.step;
|
|
491
470
|
}
|
|
492
|
-
function k(
|
|
493
|
-
if (typeof
|
|
494
|
-
return
|
|
471
|
+
function k(t) {
|
|
472
|
+
if (typeof t == "number")
|
|
473
|
+
return t <= n.min ? n.min : t >= n.max ? n.max : j(t);
|
|
495
474
|
}
|
|
496
|
-
const I = H((
|
|
497
|
-
function B(
|
|
498
|
-
|
|
475
|
+
const I = H((t) => B(t), 300);
|
|
476
|
+
function B(t) {
|
|
477
|
+
t = k(t), i.value !== t && u("update:model-value", t);
|
|
499
478
|
}
|
|
500
|
-
B(
|
|
501
|
-
const v = a(() =>
|
|
479
|
+
B(i.value);
|
|
480
|
+
const v = a(() => n.modelValue && n.modelValue >= n.max), y = a(() => n.modelValue && n.modelValue <= n.min);
|
|
502
481
|
function w() {
|
|
503
|
-
if (!(
|
|
504
|
-
if ((
|
|
505
|
-
|
|
482
|
+
if (!(n.disabled || v.value)) {
|
|
483
|
+
if ((i.value === void 0 || i.value === null) && Number.isFinite(n.min)) {
|
|
484
|
+
i.value = n.min;
|
|
506
485
|
return;
|
|
507
486
|
}
|
|
508
|
-
|
|
487
|
+
i.value = (i.value ?? 0) + 1 * n.step;
|
|
509
488
|
}
|
|
510
489
|
}
|
|
511
490
|
function S() {
|
|
512
|
-
if (!(
|
|
513
|
-
if ((
|
|
514
|
-
|
|
491
|
+
if (!(n.disabled || y.value)) {
|
|
492
|
+
if ((i.value === void 0 || i.value === null) && Number.isFinite(n.min)) {
|
|
493
|
+
i.value = n.min;
|
|
515
494
|
return;
|
|
516
495
|
}
|
|
517
|
-
|
|
496
|
+
i.value = (i.value ?? 0) - 1 * n.step;
|
|
518
497
|
}
|
|
519
498
|
}
|
|
520
|
-
return (
|
|
499
|
+
return (t, f) => (r(), g(
|
|
521
500
|
"div",
|
|
522
501
|
{
|
|
523
|
-
class: b(["m-input-number", [`m-input-number--${
|
|
524
|
-
style: Y(
|
|
502
|
+
class: b(["m-input-number", [`m-input-number--${t.size}`, n.class, { "--block": t.block }]]),
|
|
503
|
+
style: Y(t.style)
|
|
525
504
|
},
|
|
526
505
|
[
|
|
527
|
-
|
|
506
|
+
t.noButtons ? s("v-if", !0) : (r(), d(L, {
|
|
528
507
|
key: 0,
|
|
529
508
|
color: "transparent",
|
|
530
|
-
size:
|
|
509
|
+
size: t.size,
|
|
531
510
|
tabindex: "-1",
|
|
532
511
|
class: "m-input-number__button m-input-number__decrement-button",
|
|
533
|
-
disabled: y.value ||
|
|
512
|
+
disabled: y.value || t.disabled,
|
|
534
513
|
onClick: S
|
|
535
514
|
}, {
|
|
536
|
-
default:
|
|
537
|
-
M(
|
|
515
|
+
default: E(() => [
|
|
516
|
+
M(m(me), { class: "m-input-number__button__icon" })
|
|
538
517
|
]),
|
|
539
518
|
_: 1
|
|
540
519
|
/* STABLE */
|
|
541
520
|
}, 8, ["size", "disabled"])),
|
|
542
521
|
M(Ce, G({
|
|
543
|
-
"model-value":
|
|
522
|
+
"model-value": i.value,
|
|
544
523
|
type: "number",
|
|
545
|
-
class: ["m-input-number__input", { "--no-buttons":
|
|
546
|
-
disabled:
|
|
547
|
-
min:
|
|
548
|
-
max:
|
|
549
|
-
step:
|
|
550
|
-
error:
|
|
551
|
-
success:
|
|
552
|
-
warning:
|
|
553
|
-
hint:
|
|
554
|
-
},
|
|
555
|
-
inputmode:
|
|
556
|
-
size:
|
|
524
|
+
class: ["m-input-number__input", { "--no-buttons": t.noButtons, "--text-center": t.textCenter }],
|
|
525
|
+
disabled: t.disabled,
|
|
526
|
+
min: t.min,
|
|
527
|
+
max: t.max,
|
|
528
|
+
step: t.step,
|
|
529
|
+
error: t.error,
|
|
530
|
+
success: t.success,
|
|
531
|
+
warning: t.warning,
|
|
532
|
+
hint: t.hint
|
|
533
|
+
}, t.$attrs, {
|
|
534
|
+
inputmode: t.inputmode,
|
|
535
|
+
size: t.size,
|
|
557
536
|
block: "",
|
|
558
537
|
onKeydown: [
|
|
559
538
|
U(q(w, ["prevent"]), ["up"]),
|
|
560
539
|
U(q(S, ["prevent"]), ["down"])
|
|
561
540
|
],
|
|
562
|
-
onFocus: f[0] || (f[0] = (p) =>
|
|
563
|
-
onChange: f[1] || (f[1] = (p) =>
|
|
564
|
-
onBlur: f[2] || (f[2] = (p) =>
|
|
565
|
-
onClick: f[3] || (f[3] = (p) =>
|
|
566
|
-
"onUpdate:modelValue": f[4] || (f[4] = (p) =>
|
|
541
|
+
onFocus: f[0] || (f[0] = (p) => t.$emit("focus", p)),
|
|
542
|
+
onChange: f[1] || (f[1] = (p) => t.$emit("change", p)),
|
|
543
|
+
onBlur: f[2] || (f[2] = (p) => t.$emit("blur", p)),
|
|
544
|
+
onClick: f[3] || (f[3] = (p) => t.$emit("click", p)),
|
|
545
|
+
"onUpdate:modelValue": f[4] || (f[4] = (p) => m(I)(p))
|
|
567
546
|
}), null, 16, ["model-value", "class", "disabled", "min", "max", "step", "error", "success", "warning", "hint", "inputmode", "size", "onKeydown"]),
|
|
568
|
-
|
|
547
|
+
t.noButtons ? s("v-if", !0) : (r(), d(L, {
|
|
569
548
|
key: 1,
|
|
570
549
|
color: "transparent",
|
|
571
550
|
"no-shadow": "",
|
|
572
551
|
tabindex: "-1",
|
|
573
|
-
size:
|
|
552
|
+
size: t.size,
|
|
574
553
|
class: "m-input-number__button m-input-number__increment-button",
|
|
575
|
-
disabled: v.value ||
|
|
554
|
+
disabled: v.value || t.disabled,
|
|
576
555
|
onClick: w
|
|
577
556
|
}, {
|
|
578
|
-
default:
|
|
579
|
-
M(
|
|
557
|
+
default: E(() => [
|
|
558
|
+
M(m(ve), { class: "m-input-number__button__icon" })
|
|
580
559
|
]),
|
|
581
560
|
_: 1
|
|
582
561
|
/* STABLE */
|