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,16 +1,16 @@
|
|
|
1
|
-
import { openBlock as
|
|
1
|
+
import { openBlock as s, createElementBlock as $, createElementVNode as E, defineComponent as q, defineAsyncComponent as S, useAttrs as ae, useSlots as H, computed as r, createBlock as v, resolveDynamicComponent as F, normalizeClass as k, withCtx as P, createCommentVNode as i, renderSlot as M, unref as b, createVNode as L, useId as le, ref as T, onMounted as re, normalizeStyle as K, withDirectives as se, mergeProps as G, toHandlers as ie, vModelDynamic as ue, createTextVNode as J, toDisplayString as Q, withModifiers as W, TransitionGroup as de, Fragment as ce, renderList as fe, withKeys as N } from "vue";
|
|
2
2
|
import '../assets/MazInputTags.css';function U(f) {
|
|
3
3
|
return !!f;
|
|
4
4
|
}
|
|
5
|
-
const
|
|
5
|
+
const me = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: "1em",
|
|
8
8
|
height: "1em",
|
|
9
9
|
fill: "none",
|
|
10
10
|
viewBox: "0 0 24 24"
|
|
11
11
|
};
|
|
12
|
-
function
|
|
13
|
-
return
|
|
12
|
+
function pe(f, t) {
|
|
13
|
+
return s(), $("svg", me, t[0] || (t[0] = [
|
|
14
14
|
E(
|
|
15
15
|
"path",
|
|
16
16
|
{
|
|
@@ -26,10 +26,10 @@ function me(f, l) {
|
|
|
26
26
|
)
|
|
27
27
|
]));
|
|
28
28
|
}
|
|
29
|
-
const ve = { render:
|
|
29
|
+
const ve = { render: pe }, ye = {
|
|
30
30
|
key: 2,
|
|
31
31
|
class: "m-btn-loader-container"
|
|
32
|
-
},
|
|
32
|
+
}, be = /* @__PURE__ */ q({
|
|
33
33
|
__name: "MazBtn",
|
|
34
34
|
props: {
|
|
35
35
|
variant: { default: "button" },
|
|
@@ -50,114 +50,116 @@ const ve = { render: me }, be = {
|
|
|
50
50
|
leftIcon: { type: [String, Function, Object], default: void 0 },
|
|
51
51
|
rightIcon: { type: [String, Function, Object], default: void 0 },
|
|
52
52
|
noPadding: { type: Boolean },
|
|
53
|
-
noElevation: { type: Boolean }
|
|
53
|
+
noElevation: { type: Boolean },
|
|
54
|
+
justify: { default: "center" }
|
|
54
55
|
},
|
|
55
56
|
setup(f) {
|
|
56
|
-
const
|
|
57
|
-
() =>
|
|
58
|
-
),
|
|
59
|
-
() => (
|
|
60
|
-
),
|
|
61
|
-
return (
|
|
62
|
-
disabled:
|
|
63
|
-
class:
|
|
64
|
-
`--${
|
|
65
|
-
!
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
const t = f, o = S(() => import("./MazSpinner-D1zj-581.mjs")), c = S(() => import("./MazIcon-BbvBov5G.mjs")), { href: I, to: z } = ae(), g = H(), p = r(() => I ? "a" : z ? "router-link" : "button"), j = r(
|
|
58
|
+
() => t.pastel ? `--${t.color}-pastel` : t.outline ? `--${t.color}-outline` : `--${t.color}`
|
|
59
|
+
), m = r(
|
|
60
|
+
() => (t.loading || t.disabled) && p.value === "button"
|
|
61
|
+
), B = r(() => m.value ? "--cursor-default" : "--cursor-pointer"), V = r(() => `--is-${t.variant}`), O = r(() => t.loading && t.variant === "button"), C = r(() => !!g["left-icon"] || t.leftIcon), n = r(() => !!g["right-icon"] || t.rightIcon), l = r(() => C.value || n.value), u = r(() => t.icon || !!g.icon), d = r(() => p.value === "button" ? t.type : void 0), y = r(() => t.size === "xl" ? "maz-text-3xl" : t.size === "lg" ? "maz-text-2xl" : t.size === "md" ? "maz-text-xl" : t.size === "sm" ? "maz-text-lg" : t.size === "xs" ? "maz-text-base" : t.size === "mini" ? "maz-text-sm" : "md"), h = r(() => t.justify === "start" ? "maz-justify-start" : t.justify === "end" ? "maz-justify-end" : t.justify === "center" ? "maz-justify-center" : t.justify === "between" ? "maz-justify-between" : t.justify === "around" ? "maz-justify-around" : t.justify === "evenly" ? "maz-justify-evenly" : "maz-justify-center");
|
|
62
|
+
return (a, D) => (s(), v(F(p.value), {
|
|
63
|
+
disabled: m.value || void 0,
|
|
64
|
+
class: k(["m-btn", [
|
|
65
|
+
`--${a.size}`,
|
|
66
|
+
!a.fab && !a.rounded && a.roundedSize && `--rounded-${a.roundedSize}`,
|
|
67
|
+
j.value,
|
|
68
|
+
B.value,
|
|
68
69
|
V.value,
|
|
70
|
+
h.value,
|
|
69
71
|
{
|
|
70
|
-
"--block":
|
|
71
|
-
"--no-underline":
|
|
72
|
-
"--fab":
|
|
73
|
-
"--loading":
|
|
74
|
-
"--disabled":
|
|
75
|
-
"--icon":
|
|
76
|
-
"--rounded":
|
|
77
|
-
"--no-rounded":
|
|
78
|
-
"--no-padding":
|
|
79
|
-
"--no-elevation":
|
|
72
|
+
"--block": a.block,
|
|
73
|
+
"--no-underline": a.noUnderline,
|
|
74
|
+
"--fab": a.fab,
|
|
75
|
+
"--loading": a.loading,
|
|
76
|
+
"--disabled": m.value,
|
|
77
|
+
"--icon": l.value,
|
|
78
|
+
"--rounded": a.rounded,
|
|
79
|
+
"--no-rounded": a.noRounded,
|
|
80
|
+
"--no-padding": a.noPadding,
|
|
81
|
+
"--no-elevation": a.noElevation
|
|
80
82
|
}
|
|
81
83
|
]]),
|
|
82
84
|
type: d.value
|
|
83
85
|
}, {
|
|
84
|
-
default:
|
|
85
|
-
|
|
86
|
+
default: P(() => [
|
|
87
|
+
i(`
|
|
86
88
|
@slot left-icon - The icon to display on the left of the button
|
|
87
89
|
`),
|
|
88
|
-
M(
|
|
89
|
-
typeof
|
|
90
|
+
M(a.$slots, "left-icon", {}, () => [
|
|
91
|
+
typeof a.leftIcon == "string" ? (s(), v(b(c), {
|
|
90
92
|
key: 0,
|
|
91
|
-
name:
|
|
92
|
-
class:
|
|
93
|
-
}, null, 8, ["name", "class"])) :
|
|
93
|
+
name: a.leftIcon,
|
|
94
|
+
class: k([y.value])
|
|
95
|
+
}, null, 8, ["name", "class"])) : a.leftIcon ? (s(), v(F(a.leftIcon), {
|
|
94
96
|
key: 1,
|
|
95
|
-
class:
|
|
96
|
-
}, null, 8, ["class"])) :
|
|
97
|
+
class: k([y.value])
|
|
98
|
+
}, null, 8, ["class"])) : i("v-if", !0)
|
|
97
99
|
], !0),
|
|
98
|
-
|
|
100
|
+
i(`
|
|
99
101
|
@slot icon - The icon to display on the fab button
|
|
100
102
|
`),
|
|
101
|
-
u.value ? M(
|
|
102
|
-
typeof
|
|
103
|
+
u.value ? M(a.$slots, "icon", { key: 0 }, () => [
|
|
104
|
+
typeof a.icon == "string" ? (s(), v(b(c), {
|
|
103
105
|
key: 0,
|
|
104
|
-
name:
|
|
105
|
-
class:
|
|
106
|
-
}, null, 8, ["name", "class"])) :
|
|
106
|
+
name: a.icon,
|
|
107
|
+
class: k([y.value])
|
|
108
|
+
}, null, 8, ["name", "class"])) : a.icon ? (s(), v(F(a.icon), {
|
|
107
109
|
key: 1,
|
|
108
|
-
class:
|
|
109
|
-
}, null, 8, ["class"])) :
|
|
110
|
-
], !0) :
|
|
111
|
-
|
|
110
|
+
class: k([y.value])
|
|
111
|
+
}, null, 8, ["class"])) : i("v-if", !0)
|
|
112
|
+
], !0) : i("v-if", !0),
|
|
113
|
+
i(`
|
|
112
114
|
@slot default - The content of the button
|
|
113
115
|
`),
|
|
114
|
-
M(
|
|
115
|
-
|
|
116
|
+
M(a.$slots, "default", {}, void 0, !0),
|
|
117
|
+
i(`
|
|
116
118
|
@slot left-icon - The icon to display on the left of the button
|
|
117
119
|
`),
|
|
118
|
-
n.value ? M(
|
|
119
|
-
typeof
|
|
120
|
+
n.value ? M(a.$slots, "right-icon", { key: 1 }, () => [
|
|
121
|
+
typeof a.rightIcon == "string" ? (s(), v(b(c), {
|
|
120
122
|
key: 0,
|
|
121
|
-
name:
|
|
122
|
-
class:
|
|
123
|
-
}, null, 8, ["name", "class"])) :
|
|
123
|
+
name: a.rightIcon,
|
|
124
|
+
class: k([y.value])
|
|
125
|
+
}, null, 8, ["name", "class"])) : a.rightIcon ? (s(), v(F(a.rightIcon), {
|
|
124
126
|
key: 1,
|
|
125
|
-
class:
|
|
126
|
-
}, null, 8, ["class"])) :
|
|
127
|
-
], !0) :
|
|
128
|
-
O.value ? (
|
|
129
|
-
L(
|
|
127
|
+
class: k([y.value])
|
|
128
|
+
}, null, 8, ["class"])) : i("v-if", !0)
|
|
129
|
+
], !0) : i("v-if", !0),
|
|
130
|
+
O.value ? (s(), $("div", ye, [
|
|
131
|
+
L(b(o), {
|
|
130
132
|
size: "2em",
|
|
131
|
-
color:
|
|
133
|
+
color: a.color
|
|
132
134
|
}, null, 8, ["color"])
|
|
133
|
-
])) :
|
|
135
|
+
])) : i("v-if", !0)
|
|
134
136
|
]),
|
|
135
137
|
_: 3
|
|
136
138
|
/* FORWARDED */
|
|
137
139
|
}, 8, ["disabled", "class", "type"]));
|
|
138
140
|
}
|
|
139
|
-
}), R = (f,
|
|
141
|
+
}), R = (f, t) => {
|
|
140
142
|
const o = f.__vccOpts || f;
|
|
141
|
-
for (const [c,
|
|
142
|
-
o[c] =
|
|
143
|
+
for (const [c, I] of t)
|
|
144
|
+
o[c] = I;
|
|
143
145
|
return o;
|
|
144
|
-
}, X = /* @__PURE__ */ R(
|
|
146
|
+
}, X = /* @__PURE__ */ R(be, [["__scopeId", "data-v-5aedac30"]]), ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
145
147
|
__proto__: null,
|
|
146
148
|
default: X
|
|
147
149
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
148
|
-
function
|
|
150
|
+
function ze({
|
|
149
151
|
componentName: f,
|
|
150
|
-
providedId:
|
|
152
|
+
providedId: t
|
|
151
153
|
}) {
|
|
152
|
-
const o =
|
|
153
|
-
return
|
|
154
|
+
const o = le();
|
|
155
|
+
return r(() => t ?? `${f}-${o}`);
|
|
154
156
|
}
|
|
155
|
-
function
|
|
157
|
+
function he(f, t) {
|
|
156
158
|
let o;
|
|
157
159
|
return function(...c) {
|
|
158
160
|
clearTimeout(o), o = setTimeout(() => {
|
|
159
161
|
f.apply(this, c);
|
|
160
|
-
},
|
|
162
|
+
}, t);
|
|
161
163
|
};
|
|
162
164
|
}
|
|
163
165
|
const ke = {
|
|
@@ -203,8 +205,8 @@ const ke = {
|
|
|
203
205
|
block: { type: Boolean }
|
|
204
206
|
},
|
|
205
207
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
206
|
-
setup(f, { emit:
|
|
207
|
-
const o = f, c =
|
|
208
|
+
setup(f, { emit: t }) {
|
|
209
|
+
const o = f, c = t, I = S(() => Promise.resolve().then(() => ge)), z = S(() => import("./MazIcon-BbvBov5G.mjs")), g = S(() => import("./eye-slash-BoO00xzs.mjs")), p = S(() => import("./eye-f8zAUc30.mjs")), j = S(() => import("./check-BmubdHc_.mjs")), m = T(!1), B = T(!1), V = T(), O = ze({
|
|
208
210
|
componentName: "MazInput",
|
|
209
211
|
providedId: o.id
|
|
210
212
|
});
|
|
@@ -212,7 +214,7 @@ const ke = {
|
|
|
212
214
|
var e;
|
|
213
215
|
o.autoFocus && ((e = V.value) == null || e.focus());
|
|
214
216
|
});
|
|
215
|
-
const C =
|
|
217
|
+
const C = r(() => o.type === "password"), n = r(() => m.value ? "text" : o.type), l = r(() => {
|
|
216
218
|
if (!o.noBorder) {
|
|
217
219
|
if (o.error)
|
|
218
220
|
return "maz-border-danger";
|
|
@@ -220,7 +222,7 @@ const ke = {
|
|
|
220
222
|
return "maz-border-success";
|
|
221
223
|
if (o.warning)
|
|
222
224
|
return "maz-border-warning";
|
|
223
|
-
if (
|
|
225
|
+
if (B.value || o.borderActive) {
|
|
224
226
|
if (o.color === "black")
|
|
225
227
|
return "maz-border-black";
|
|
226
228
|
if (o.color === "danger")
|
|
@@ -240,25 +242,25 @@ const ke = {
|
|
|
240
242
|
}
|
|
241
243
|
return "--default-border";
|
|
242
244
|
}
|
|
243
|
-
}), u = H(), d =
|
|
244
|
-
const { required: e, placeholder:
|
|
245
|
-
if (
|
|
246
|
-
return e ? `${
|
|
247
|
-
}),
|
|
245
|
+
}), u = H(), d = r(() => {
|
|
246
|
+
const { required: e, placeholder: w } = o;
|
|
247
|
+
if (w)
|
|
248
|
+
return e ? `${w} *` : w;
|
|
249
|
+
}), y = r(() => D.value !== void 0 && D.value !== ""), h = he(
|
|
248
250
|
(e) => {
|
|
249
251
|
c("update:model-value", e);
|
|
250
252
|
},
|
|
251
253
|
typeof o.debounce == "number" ? o.debounce : o.debounceDelay ?? 500
|
|
252
254
|
);
|
|
253
|
-
function
|
|
255
|
+
function a(e) {
|
|
254
256
|
if (o.debounce)
|
|
255
|
-
return
|
|
257
|
+
return h(e);
|
|
256
258
|
c("update:model-value", e);
|
|
257
259
|
}
|
|
258
|
-
const
|
|
260
|
+
const D = r({
|
|
259
261
|
get: () => o.modelValue,
|
|
260
|
-
set: (e) =>
|
|
261
|
-
}), Y =
|
|
262
|
+
set: (e) => a(e)
|
|
263
|
+
}), Y = r(() => (!!o.label || !!o.hint) && (B.value || !!y.value || !!o.placeholder || ["date", "month", "week"].includes(o.type))), Z = r(() => !!o.label || !!o.hint);
|
|
262
264
|
function x() {
|
|
263
265
|
return !!u["right-icon"] || C.value || !!u["valid-button"] || o.validButton || !!o.rightIcon;
|
|
264
266
|
}
|
|
@@ -266,10 +268,10 @@ const ke = {
|
|
|
266
268
|
return !!u["left-icon"] || !!o.leftIcon;
|
|
267
269
|
}
|
|
268
270
|
function ee(e) {
|
|
269
|
-
c("focus", e),
|
|
271
|
+
c("focus", e), B.value = !0;
|
|
270
272
|
}
|
|
271
273
|
function oe(e) {
|
|
272
|
-
c("blur", e),
|
|
274
|
+
c("blur", e), B.value = !1;
|
|
273
275
|
}
|
|
274
276
|
function te(e) {
|
|
275
277
|
return c("change", e);
|
|
@@ -277,12 +279,12 @@ const ke = {
|
|
|
277
279
|
function ne(e) {
|
|
278
280
|
return c("input", e);
|
|
279
281
|
}
|
|
280
|
-
return (e,
|
|
282
|
+
return (e, w) => (s(), $(
|
|
281
283
|
"div",
|
|
282
284
|
{
|
|
283
|
-
class:
|
|
285
|
+
class: k(["m-input", [
|
|
284
286
|
{
|
|
285
|
-
"--is-focused":
|
|
287
|
+
"--is-focused": B.value || e.borderActive,
|
|
286
288
|
"--should-up": Y.value,
|
|
287
289
|
"--has-label": Z.value,
|
|
288
290
|
"--is-disabled": e.disabled,
|
|
@@ -301,34 +303,34 @@ const ke = {
|
|
|
301
303
|
E(
|
|
302
304
|
"div",
|
|
303
305
|
{
|
|
304
|
-
class:
|
|
306
|
+
class: k(["m-input-wrapper", [
|
|
305
307
|
e.inputClasses,
|
|
306
|
-
|
|
308
|
+
l.value,
|
|
307
309
|
e.roundedSize ? `--rounded-${e.roundedSize}` : { "maz-rounded": !e.noRadius }
|
|
308
310
|
]])
|
|
309
311
|
},
|
|
310
312
|
[
|
|
311
|
-
_() ? (
|
|
312
|
-
|
|
313
|
+
_() ? (s(), $("div", ke, [
|
|
314
|
+
i(`
|
|
313
315
|
@slot left-icon - The icon to display on the left of the input
|
|
314
316
|
`),
|
|
315
317
|
e.$slots["left-icon"] || e.leftIcon ? M(e.$slots, "left-icon", { key: 0 }, () => [
|
|
316
|
-
typeof e.leftIcon == "string" ? (
|
|
318
|
+
typeof e.leftIcon == "string" ? (s(), v(b(z), {
|
|
317
319
|
key: 0,
|
|
318
320
|
name: e.leftIcon,
|
|
319
321
|
class: "maz-text-xl maz-text-muted"
|
|
320
|
-
}, null, 8, ["name"])) : e.leftIcon ? (
|
|
322
|
+
}, null, 8, ["name"])) : e.leftIcon ? (s(), v(F(e.leftIcon), {
|
|
321
323
|
key: 1,
|
|
322
324
|
class: "maz-text-xl maz-text-muted"
|
|
323
|
-
})) :
|
|
324
|
-
], !0) :
|
|
325
|
-
])) :
|
|
325
|
+
})) : i("v-if", !0)
|
|
326
|
+
], !0) : i("v-if", !0)
|
|
327
|
+
])) : i("v-if", !0),
|
|
326
328
|
E("div", Ie, [
|
|
327
329
|
se(E("input", G({
|
|
328
|
-
id:
|
|
330
|
+
id: b(O),
|
|
329
331
|
ref_key: "input",
|
|
330
332
|
ref: V,
|
|
331
|
-
"onUpdate:modelValue":
|
|
333
|
+
"onUpdate:modelValue": w[0] || (w[0] = (A) => D.value = A),
|
|
332
334
|
type: n.value,
|
|
333
335
|
name: e.name
|
|
334
336
|
}, e.$attrs, {
|
|
@@ -345,15 +347,15 @@ const ke = {
|
|
|
345
347
|
change: te,
|
|
346
348
|
input: ne
|
|
347
349
|
}, !0), {
|
|
348
|
-
onClick:
|
|
350
|
+
onClick: w[1] || (w[1] = (A) => e.$emit("click", A))
|
|
349
351
|
}), null, 16, Be), [
|
|
350
|
-
[ue,
|
|
352
|
+
[ue, D.value]
|
|
351
353
|
]),
|
|
352
|
-
e.label || e.hint ? (
|
|
354
|
+
e.label || e.hint ? (s(), $(
|
|
353
355
|
"span",
|
|
354
356
|
{
|
|
355
357
|
key: 0,
|
|
356
|
-
class:
|
|
358
|
+
class: k(["m-input-label", [
|
|
357
359
|
{
|
|
358
360
|
"maz-text-danger-600": e.error,
|
|
359
361
|
"maz-text-success-600": e.success,
|
|
@@ -367,50 +369,50 @@ const ke = {
|
|
|
367
369
|
1
|
|
368
370
|
/* TEXT */
|
|
369
371
|
),
|
|
370
|
-
e.required ? (
|
|
372
|
+
e.required ? (s(), $("sup", we, "*")) : i("v-if", !0)
|
|
371
373
|
],
|
|
372
374
|
2
|
|
373
375
|
/* CLASS */
|
|
374
|
-
)) :
|
|
376
|
+
)) : i("v-if", !0)
|
|
375
377
|
]),
|
|
376
|
-
x() ? (
|
|
377
|
-
|
|
378
|
+
x() ? (s(), $("div", $e, [
|
|
379
|
+
i(`
|
|
378
380
|
@slot right-icon - The icon to display on the right of the input
|
|
379
381
|
`),
|
|
380
382
|
e.$slots["right-icon"] || e.rightIcon ? M(e.$slots, "right-icon", { key: 0 }, () => [
|
|
381
|
-
typeof e.rightIcon == "string" ? (
|
|
383
|
+
typeof e.rightIcon == "string" ? (s(), v(b(z), {
|
|
382
384
|
key: 0,
|
|
383
385
|
name: e.rightIcon,
|
|
384
386
|
class: "maz-text-xl maz-text-muted"
|
|
385
|
-
}, null, 8, ["name"])) : e.rightIcon ? (
|
|
387
|
+
}, null, 8, ["name"])) : e.rightIcon ? (s(), v(F(e.rightIcon), {
|
|
386
388
|
key: 1,
|
|
387
389
|
class: "maz-text-xl maz-text-muted"
|
|
388
|
-
})) :
|
|
389
|
-
], !0) :
|
|
390
|
-
C.value ? (
|
|
390
|
+
})) : i("v-if", !0)
|
|
391
|
+
], !0) : i("v-if", !0),
|
|
392
|
+
C.value ? (s(), v(b(I), {
|
|
391
393
|
key: 1,
|
|
392
394
|
color: "transparent",
|
|
393
395
|
tabindex: "-1",
|
|
394
396
|
size: "mini",
|
|
395
|
-
onClick:
|
|
397
|
+
onClick: w[2] || (w[2] = W((A) => m.value = !m.value, ["stop"]))
|
|
396
398
|
}, {
|
|
397
|
-
default:
|
|
398
|
-
|
|
399
|
+
default: P(() => [
|
|
400
|
+
m.value ? (s(), v(b(g), {
|
|
399
401
|
key: 0,
|
|
400
402
|
class: "maz-text-xl maz-text-muted"
|
|
401
|
-
})) : (
|
|
403
|
+
})) : (s(), v(b(p), {
|
|
402
404
|
key: 1,
|
|
403
405
|
class: "maz-text-xl maz-text-muted"
|
|
404
406
|
}))
|
|
405
407
|
]),
|
|
406
408
|
_: 1
|
|
407
409
|
/* STABLE */
|
|
408
|
-
})) :
|
|
409
|
-
|
|
410
|
+
})) : i("v-if", !0),
|
|
411
|
+
i(`
|
|
410
412
|
@slot valid-button - Replace the valid button by your own
|
|
411
413
|
`),
|
|
412
414
|
e.$slots["valid-button"] || e.validButton ? M(e.$slots, "valid-button", { key: 2 }, () => [
|
|
413
|
-
L(
|
|
415
|
+
L(b(I), {
|
|
414
416
|
color: "transparent",
|
|
415
417
|
disabled: e.disabled,
|
|
416
418
|
tabindex: "-1",
|
|
@@ -419,14 +421,14 @@ const ke = {
|
|
|
419
421
|
size: "mini",
|
|
420
422
|
type: "submit"
|
|
421
423
|
}, {
|
|
422
|
-
default:
|
|
423
|
-
L(
|
|
424
|
+
default: P(() => [
|
|
425
|
+
L(b(j), { class: "maz-text-2xl maz-text-normal" })
|
|
424
426
|
]),
|
|
425
427
|
_: 1
|
|
426
428
|
/* STABLE */
|
|
427
429
|
}, 8, ["disabled", "loading"])
|
|
428
|
-
], !0) :
|
|
429
|
-
])) :
|
|
430
|
+
], !0) : i("v-if", !0)
|
|
431
|
+
])) : i("v-if", !0)
|
|
430
432
|
],
|
|
431
433
|
2
|
|
432
434
|
/* CLASS */
|
|
@@ -436,7 +438,7 @@ const ke = {
|
|
|
436
438
|
/* CLASS, STYLE */
|
|
437
439
|
));
|
|
438
440
|
}
|
|
439
|
-
}),
|
|
441
|
+
}), je = /* @__PURE__ */ R(Te, [["__scopeId", "data-v-b3e1e126"]]), Ce = /* @__PURE__ */ q({
|
|
440
442
|
inheritAttrs: !1,
|
|
441
443
|
__name: "MazInputTags",
|
|
442
444
|
props: {
|
|
@@ -456,39 +458,39 @@ const ke = {
|
|
|
456
458
|
hint: {}
|
|
457
459
|
},
|
|
458
460
|
emits: ["update:model-value"],
|
|
459
|
-
setup(f, { emit:
|
|
460
|
-
const o = f, c =
|
|
461
|
+
setup(f, { emit: t }) {
|
|
462
|
+
const o = f, c = t, I = T(!1), z = T(), g = T(), p = T(), j = T(), m = r(
|
|
461
463
|
() => {
|
|
462
464
|
var n;
|
|
463
|
-
return (n = o.modelValue) == null ? void 0 : n.map((
|
|
464
|
-
tag:
|
|
465
|
+
return (n = o.modelValue) == null ? void 0 : n.map((l) => ({
|
|
466
|
+
tag: l,
|
|
465
467
|
id: Math.random().toString(36).slice(2, 11)
|
|
466
468
|
}));
|
|
467
469
|
}
|
|
468
470
|
);
|
|
469
|
-
function
|
|
470
|
-
if (
|
|
471
|
-
|
|
472
|
-
const u =
|
|
471
|
+
function B(n) {
|
|
472
|
+
if (z.value) {
|
|
473
|
+
p.value = void 0, n.preventDefault();
|
|
474
|
+
const u = z.value.trim().split(",").map((d) => d.trim() === "," ? void 0 : d.trim()).filter(U).filter(
|
|
473
475
|
(d) => {
|
|
474
|
-
var
|
|
475
|
-
return !((
|
|
476
|
+
var y, h;
|
|
477
|
+
return !((h = (y = o.modelValue) == null ? void 0 : y.filter(U)) != null && h.some((a) => a === d));
|
|
476
478
|
}
|
|
477
479
|
);
|
|
478
480
|
c(
|
|
479
481
|
"update:model-value",
|
|
480
482
|
o.modelValue ? [...o.modelValue, ...u] : [...u]
|
|
481
|
-
),
|
|
483
|
+
), z.value = void 0;
|
|
482
484
|
}
|
|
483
485
|
}
|
|
484
|
-
const V =
|
|
486
|
+
const V = r(() => {
|
|
485
487
|
if (o.error)
|
|
486
488
|
return "maz-border-danger";
|
|
487
489
|
if (o.success)
|
|
488
490
|
return "maz-border-success";
|
|
489
491
|
if (o.warning)
|
|
490
492
|
return "maz-border-warning";
|
|
491
|
-
if (
|
|
493
|
+
if (I.value) {
|
|
492
494
|
if (o.color === "primary")
|
|
493
495
|
return "maz-border-primary";
|
|
494
496
|
if (o.color === "secondary")
|
|
@@ -509,47 +511,47 @@ const ke = {
|
|
|
509
511
|
return "maz-border-border dark:maz-border-color-lighter";
|
|
510
512
|
});
|
|
511
513
|
function O() {
|
|
512
|
-
var n,
|
|
513
|
-
|
|
514
|
-
|
|
514
|
+
var n, l, u;
|
|
515
|
+
z.value || m.value && ((n = m.value) == null ? void 0 : n.length) === 0 || (j.value && clearTimeout(j.value), p.value ? (C(p.value), p.value = void 0) : (p.value = (u = (l = m.value) == null ? void 0 : l[m.value.length - 1]) == null ? void 0 : u.id, j.value = setTimeout(() => {
|
|
516
|
+
p.value = void 0;
|
|
515
517
|
}, 2e3)));
|
|
516
518
|
}
|
|
517
519
|
function C(n) {
|
|
518
520
|
var u;
|
|
519
|
-
const
|
|
520
|
-
c("update:model-value",
|
|
521
|
+
const l = (u = m.value) == null ? void 0 : u.filter((d) => d.id !== n).map((d) => d.tag);
|
|
522
|
+
c("update:model-value", l);
|
|
521
523
|
}
|
|
522
|
-
return (n,
|
|
524
|
+
return (n, l) => (s(), $(
|
|
523
525
|
"div",
|
|
524
526
|
{
|
|
525
|
-
class:
|
|
527
|
+
class: k(["m-input-tags", [V.value, `--${n.color}`, `--${n.size}`, o.class, { "--block": n.block }]]),
|
|
526
528
|
style: K(n.style),
|
|
527
|
-
onFocusCapture:
|
|
528
|
-
onBlurCapture:
|
|
529
|
+
onFocusCapture: l[4] || (l[4] = (u) => I.value = !0),
|
|
530
|
+
onBlurCapture: l[5] || (l[5] = (u) => I.value = !1)
|
|
529
531
|
},
|
|
530
532
|
[
|
|
531
533
|
L(de, { name: "maz-tags" }, {
|
|
532
|
-
default:
|
|
533
|
-
(
|
|
534
|
+
default: P(() => [
|
|
535
|
+
(s(!0), $(
|
|
534
536
|
ce,
|
|
535
537
|
null,
|
|
536
|
-
fe(
|
|
537
|
-
key: `tag-${
|
|
538
|
+
fe(m.value, ({ tag: u, id: d }, y) => (s(), $("div", {
|
|
539
|
+
key: `tag-${y}`,
|
|
538
540
|
class: "m-input-tags__wrapper"
|
|
539
541
|
}, [
|
|
540
542
|
L(X, {
|
|
541
543
|
class: "m-input-tags__tag",
|
|
542
544
|
disabled: n.disabled,
|
|
543
545
|
size: n.size,
|
|
544
|
-
color: g.value === d ||
|
|
545
|
-
"right-icon": g.value === d ||
|
|
546
|
-
onClick: W((
|
|
547
|
-
onMouseenter: (
|
|
548
|
-
onFocus: (
|
|
549
|
-
onMouseleave:
|
|
550
|
-
onBlur:
|
|
546
|
+
color: g.value === d || p.value === d ? "danger" : n.color,
|
|
547
|
+
"right-icon": g.value === d || p.value === d ? b(ve) : void 0,
|
|
548
|
+
onClick: W((h) => C(d), ["stop"]),
|
|
549
|
+
onMouseenter: (h) => g.value = d,
|
|
550
|
+
onFocus: (h) => g.value = d,
|
|
551
|
+
onMouseleave: l[0] || (l[0] = (h) => g.value = void 0),
|
|
552
|
+
onBlur: l[1] || (l[1] = (h) => g.value = void 0)
|
|
551
553
|
}, {
|
|
552
|
-
default:
|
|
554
|
+
default: P(() => [
|
|
553
555
|
J(
|
|
554
556
|
Q(u),
|
|
555
557
|
1
|
|
@@ -567,10 +569,10 @@ const ke = {
|
|
|
567
569
|
_: 1
|
|
568
570
|
/* STABLE */
|
|
569
571
|
}),
|
|
570
|
-
L(
|
|
572
|
+
L(je, G({
|
|
571
573
|
key: "input-tags",
|
|
572
|
-
modelValue:
|
|
573
|
-
"onUpdate:modelValue":
|
|
574
|
+
modelValue: z.value,
|
|
575
|
+
"onUpdate:modelValue": l[2] || (l[2] = (u) => z.value = u)
|
|
574
576
|
}, n.$attrs, {
|
|
575
577
|
placeholder: n.placeholder,
|
|
576
578
|
label: n.label,
|
|
@@ -586,18 +588,18 @@ const ke = {
|
|
|
586
588
|
"no-border": "",
|
|
587
589
|
class: "m-input-tags__input",
|
|
588
590
|
onKeydown: [
|
|
589
|
-
N(
|
|
591
|
+
N(B, ["enter"]),
|
|
590
592
|
N(O, ["delete"])
|
|
591
593
|
],
|
|
592
|
-
onBlur:
|
|
594
|
+
onBlur: l[3] || (l[3] = (u) => n.addTagsOnBlur ? B(u) : void 0)
|
|
593
595
|
}), null, 16, ["modelValue", "placeholder", "label", "aria-label", "error", "hint", "success", "warning", "disabled", "color", "block", "size"])
|
|
594
596
|
],
|
|
595
597
|
38
|
|
596
598
|
/* CLASS, STYLE, NEED_HYDRATION */
|
|
597
599
|
));
|
|
598
600
|
}
|
|
599
|
-
}),
|
|
601
|
+
}), Me = /* @__PURE__ */ R(Ce, [["__scopeId", "data-v-f8b854e9"]]);
|
|
600
602
|
export {
|
|
601
|
-
|
|
603
|
+
Me as M,
|
|
602
604
|
R as _
|
|
603
605
|
};
|