maz-ui 3.47.1 → 3.47.2-beta.0
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/MazCard.mjs +1 -1
- package/components/MazChart.d.ts +1 -1
- package/components/MazChecklist.mjs +1 -1
- package/components/MazGallery.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/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazSelect.mjs +1 -1
- package/components/MazTable.d.ts +29 -52
- package/components/MazTable.mjs +1 -1
- package/components/MazTabsBar.mjs +1 -1
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazPhoneNumberInput.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/assets/MazTabsBar.css +1 -1
- package/components/chunks/{MazBadge-CNSfzYq-.mjs → MazBadge-CvIiiTdM.mjs} +1 -1
- package/components/chunks/{MazBtn-D6Jxw9Nr.mjs → MazBtn-BO3G90L3.mjs} +2 -2
- package/components/chunks/{MazBtn-BRnLMzhy.mjs → MazBtn-C87UEsVs.mjs} +2 -2
- package/components/chunks/{MazBtn-DlD5m7T4.mjs → MazBtn-C_l3xuAh.mjs} +2 -2
- package/components/chunks/{MazBtn-CnqRnXh_.mjs → MazBtn-DJOUeES7.mjs} +2 -2
- package/components/chunks/{MazBtn-TkePGm5o.mjs → MazBtn-DVkwISlp.mjs} +2 -2
- package/components/chunks/MazBtn-DadFupkY.mjs +118 -0
- package/components/chunks/{MazBtn-Dt8lr0GH.mjs → MazBtn-GGcGrIH4.mjs} +2 -2
- package/components/chunks/{MazCard-CfkvpcGL.mjs → MazCard-FSXmHyhj.mjs} +1 -1
- package/components/chunks/{MazCheckbox-BKCo6EzO.mjs → MazCheckbox-2G4VkxDz.mjs} +1 -1
- package/components/chunks/{MazCheckbox-Byqz8JJB.mjs → MazCheckbox-BmnqBHaY.mjs} +1 -1
- package/components/chunks/{MazCheckbox-CI8ml-P8.mjs → MazCheckbox-Cq9gpTEw.mjs} +1 -1
- package/components/chunks/{MazChecklist-BLxsNHMP.mjs → MazChecklist-CY1Cv70T.mjs} +1 -1
- package/components/chunks/{MazGallery-BMFwld84.mjs → MazGallery-BknvUeo1.mjs} +272 -229
- package/components/chunks/{MazGallery-BKL7gfrz.mjs → MazGallery-CZOokGAt.mjs} +248 -205
- package/components/chunks/{MazIcon-D8V8ixhf.mjs → MazIcon-z-jTiuyI.mjs} +1 -1
- package/components/chunks/{MazInput-CBiCdd0F.mjs → MazInput-BQoQSRyL.mjs} +2 -2
- package/components/chunks/{MazInput-Dx2cCzFS.mjs → MazInput-CJQB68c-.mjs} +22 -22
- package/components/chunks/{MazInput-O6Q41Fm0.mjs → MazInput-oOA7gdLO.mjs} +23 -23
- package/components/chunks/{MazInputNumber-DYPVUz4k.mjs → MazInputNumber-B4mQJcVB.mjs} +2 -2
- package/components/chunks/{MazInputPrice-DZD7ZZpm.mjs → MazInputPrice-BrxE5WVf.mjs} +2 -2
- package/components/chunks/{MazInputTags-CxXBsTdM.mjs → MazInputTags-BVCej_gW.mjs} +233 -232
- package/components/chunks/{MazLoadingBar-Di2OIrPD.mjs → MazLoadingBar-Dwf55oHy.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-C4TX1tGw.mjs → MazPhoneNumberInput-Cd25AzXc.mjs} +10 -10
- package/components/chunks/{MazPicker-BcQ_-AJH.mjs → MazPicker-C78yxilJ.mjs} +3 -3
- package/components/chunks/{MazPickerMonthSwitcher-hCAkEd5r.mjs → MazPickerMonthSwitcher-CyHYx8TT.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-vpLyw1de.mjs → MazPickerShortcuts-Bsi8cnox.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DvC79vrt.mjs → MazPickerYearSwitcher-DLUSMAtz.mjs} +1 -1
- package/components/chunks/{MazSelect-BXzgSKmL.mjs → MazSelect-CQDoUpgp.mjs} +15 -14
- package/components/chunks/{MazSelect-Baj2BQH7.mjs → MazSelect-uCJPMXF-.mjs} +3 -3
- package/components/chunks/{MazSpinner-DwSGm0-X.mjs → MazSpinner-2D0ZmAQz.mjs} +1 -1
- package/components/chunks/MazSpinner-B9OwpEP_.mjs +34 -0
- package/components/chunks/{MazSpinner-C1SiKhfK.mjs → MazSpinner-BT_717pD.mjs} +1 -1
- package/components/chunks/{MazSpinner-Cg26sBU2.mjs → MazSpinner-C1Ip-Dwh.mjs} +1 -1
- package/components/chunks/MazSpinner-C23CZ_Za.mjs +34 -0
- package/components/chunks/{MazSpinner-B5lezvu4.mjs → MazSpinner-CViChjTw.mjs} +1 -1
- package/components/chunks/MazSpinner-CZMBhCOJ.mjs +34 -0
- package/components/chunks/{MazSpinner-DlMKBtyt.mjs → MazSpinner-D4C84xZe.mjs} +1 -1
- package/components/chunks/{MazSpinner-B8akphXs.mjs → MazSpinner-EFo8dM46.mjs} +1 -1
- package/components/chunks/MazSpinner-u8WQTgUR.mjs +34 -0
- package/components/chunks/{MazSpinner-M4r0cykl.mjs → MazSpinner-w-S5uCxg.mjs} +1 -1
- package/components/chunks/{MazTable-CulBGLaj.mjs → MazTable-Cuz5QI08.mjs} +4 -4
- package/components/chunks/{MazTableCell-BXDbkEJq.mjs → MazTableCell-D_OTOJiy.mjs} +1 -1
- package/components/chunks/{MazTableRow-Ds3CDEit.mjs → MazTableRow-BTcVAyOy.mjs} +1 -1
- package/components/chunks/{MazTableTitle-uirsgvk_.mjs → MazTableTitle-BDA9G6Zw.mjs} +1 -1
- package/components/chunks/{MazTabsBar-MZYefBb8.mjs → MazTabsBar-JkRzMDM6.mjs} +9 -10
- package/components/chunks/{MazTransitionExpand-4Ll_5LDO.mjs → MazTransitionExpand-C-FHhOGB.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/{MazBtn-CTqI4qhg.mjs → MazBtn-BSnVxud6.mjs} +2 -2
- package/modules/chunks/{MazBtn-D_CpNgpD.cjs → MazBtn-Bf9Cq5M7.cjs} +1 -1
- package/modules/chunks/{MazIcon-BB0DMfOc.mjs → MazIcon-DllGg8tw.mjs} +1 -1
- package/modules/chunks/{MazIcon-BtomZnkQ.cjs → MazIcon-dhyR9Q8a.cjs} +1 -1
- package/modules/chunks/{MazSpinner-BASKjaLe.cjs → MazSpinner-CiIyZ8gs.cjs} +1 -1
- package/modules/chunks/{MazSpinner-CDJhmIRl.mjs → MazSpinner-bdGjxsu6.mjs} +1 -1
- package/modules/chunks/index-BPqjUr5e.cjs +149 -0
- package/modules/chunks/{index-C2yAjM0P.mjs → index-x2F1l5sr.mjs} +944 -915
- 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/MazChart.vue.d.ts +1 -1
- package/types/components/MazTable.vue.d.ts +29 -52
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +5 -5
- package/types/modules/helpers/check-availability.d.ts +1 -0
- package/components/chunks/MazBtn-igor8wRn.mjs +0 -118
- package/components/chunks/MazSpinner-CvT-9sC7.mjs +0 -34
- package/components/chunks/MazSpinner-DH6C15pU.mjs +0 -34
- package/components/chunks/MazSpinner-cqcpf_FX.mjs +0 -34
- package/components/chunks/MazSpinner-yPkPj7Q8.mjs +0 -34
- package/modules/chunks/index-BIX1NMzX.cjs +0 -149
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { openBlock as s, createElementBlock as
|
|
2
|
-
import '../assets/MazInputTags.css';function U(
|
|
3
|
-
return !!
|
|
1
|
+
import { openBlock as s, createElementBlock as B, createElementVNode as E, defineComponent as q, defineAsyncComponent as S, useAttrs as ae, useSlots as H, computed as i, createBlock as v, resolveDynamicComponent as L, normalizeClass as z, withCtx as P, createCommentVNode as u, renderSlot as M, unref as y, createVNode as O, useId as le, ref as $, onMounted as re, normalizeStyle as K, withDirectives as ie, mergeProps as G, toHandlers as se, vModelDynamic as ue, createTextVNode as J, toDisplayString as Q, withModifiers as W, TransitionGroup as de, Fragment as fe, renderList as ce, withKeys as N } from "vue";
|
|
2
|
+
import '../assets/MazInputTags.css';function U(c) {
|
|
3
|
+
return !!c;
|
|
4
4
|
}
|
|
5
5
|
const me = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9,8 +9,8 @@ const me = {
|
|
|
9
9
|
fill: "none",
|
|
10
10
|
viewBox: "0 0 24 24"
|
|
11
11
|
};
|
|
12
|
-
function pe(
|
|
13
|
-
return s(),
|
|
12
|
+
function pe(c, n) {
|
|
13
|
+
return s(), B("svg", me, n[0] || (n[0] = [
|
|
14
14
|
E(
|
|
15
15
|
"path",
|
|
16
16
|
{
|
|
@@ -53,113 +53,113 @@ const ve = { render: pe }, ye = {
|
|
|
53
53
|
noElevation: { type: Boolean },
|
|
54
54
|
justify: { default: "center" }
|
|
55
55
|
},
|
|
56
|
-
setup(
|
|
57
|
-
const
|
|
58
|
-
() =>
|
|
59
|
-
), m =
|
|
60
|
-
() => (
|
|
61
|
-
),
|
|
62
|
-
return (
|
|
56
|
+
setup(c) {
|
|
57
|
+
const n = c, t = S(() => import("./MazSpinner-CZMBhCOJ.mjs")), f = S(() => import("./MazIcon-BbvBov5G.mjs")), { href: h, to: g } = ae(), b = H(), p = i(() => h ? "a" : g ? "router-link" : "button"), T = i(
|
|
58
|
+
() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`
|
|
59
|
+
), m = i(
|
|
60
|
+
() => (n.loading || n.disabled) && p.value === "button"
|
|
61
|
+
), k = i(() => m.value ? "--cursor-default" : "--cursor-pointer"), V = i(() => `--is-${n.variant}`), D = i(() => n.loading && n.variant === "button"), j = i(() => !!b["left-icon"] || n.leftIcon), F = i(() => !!b["right-icon"] || n.rightIcon), a = i(() => j.value || F.value), l = i(() => n.icon || !!b.icon), d = i(() => p.value === "button" ? n.type : void 0), r = i(() => n.size === "xl" ? "maz-text-3xl" : n.size === "lg" ? "maz-text-2xl" : n.size === "md" ? "maz-text-xl" : n.size === "sm" ? "maz-text-lg" : n.size === "xs" ? "maz-text-base" : n.size === "mini" ? "maz-text-sm" : "md"), w = i(() => n.justify === "start" ? "maz-justify-start" : n.justify === "end" ? "maz-justify-end" : n.justify === "center" ? "maz-justify-center" : n.justify === "between" ? "maz-justify-between" : n.justify === "around" ? "maz-justify-around" : n.justify === "evenly" ? "maz-justify-evenly" : "maz-justify-center");
|
|
62
|
+
return (o, C) => (s(), v(L(p.value), {
|
|
63
63
|
disabled: m.value || void 0,
|
|
64
|
-
class:
|
|
65
|
-
`--${
|
|
66
|
-
!
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
class: z(["m-btn", [
|
|
65
|
+
`--${o.size}`,
|
|
66
|
+
!o.fab && !o.rounded && o.roundedSize && `--rounded-${o.roundedSize}`,
|
|
67
|
+
T.value,
|
|
68
|
+
k.value,
|
|
69
69
|
V.value,
|
|
70
|
-
|
|
70
|
+
w.value,
|
|
71
71
|
{
|
|
72
|
-
"--block":
|
|
73
|
-
"--no-underline":
|
|
74
|
-
"--fab":
|
|
75
|
-
"--loading":
|
|
72
|
+
"--block": o.block,
|
|
73
|
+
"--no-underline": o.noUnderline,
|
|
74
|
+
"--fab": o.fab,
|
|
75
|
+
"--loading": o.loading,
|
|
76
76
|
"--disabled": m.value,
|
|
77
|
-
"--icon":
|
|
78
|
-
"--rounded":
|
|
79
|
-
"--no-rounded":
|
|
80
|
-
"--no-padding":
|
|
81
|
-
"--no-elevation":
|
|
77
|
+
"--icon": a.value,
|
|
78
|
+
"--rounded": o.rounded,
|
|
79
|
+
"--no-rounded": o.noRounded,
|
|
80
|
+
"--no-padding": o.noPadding,
|
|
81
|
+
"--no-elevation": o.noElevation
|
|
82
82
|
}
|
|
83
83
|
]]),
|
|
84
84
|
type: d.value
|
|
85
85
|
}, {
|
|
86
86
|
default: P(() => [
|
|
87
|
-
|
|
87
|
+
u(`
|
|
88
88
|
@slot left-icon - The icon to display on the left of the button
|
|
89
89
|
`),
|
|
90
|
-
M(
|
|
91
|
-
typeof
|
|
90
|
+
M(o.$slots, "left-icon", {}, () => [
|
|
91
|
+
typeof o.leftIcon == "string" ? (s(), v(y(f), {
|
|
92
92
|
key: 0,
|
|
93
|
-
name:
|
|
94
|
-
class:
|
|
95
|
-
}, null, 8, ["name", "class"])) :
|
|
93
|
+
name: o.leftIcon,
|
|
94
|
+
class: z([r.value])
|
|
95
|
+
}, null, 8, ["name", "class"])) : o.leftIcon ? (s(), v(L(o.leftIcon), {
|
|
96
96
|
key: 1,
|
|
97
|
-
class:
|
|
98
|
-
}, null, 8, ["class"])) :
|
|
97
|
+
class: z([r.value])
|
|
98
|
+
}, null, 8, ["class"])) : u("v-if", !0)
|
|
99
99
|
], !0),
|
|
100
|
-
|
|
100
|
+
u(`
|
|
101
101
|
@slot icon - The icon to display on the fab button
|
|
102
102
|
`),
|
|
103
|
-
|
|
104
|
-
typeof
|
|
103
|
+
l.value ? M(o.$slots, "icon", { key: 0 }, () => [
|
|
104
|
+
typeof o.icon == "string" ? (s(), v(y(f), {
|
|
105
105
|
key: 0,
|
|
106
|
-
name:
|
|
107
|
-
class:
|
|
108
|
-
}, null, 8, ["name", "class"])) :
|
|
106
|
+
name: o.icon,
|
|
107
|
+
class: z([r.value])
|
|
108
|
+
}, null, 8, ["name", "class"])) : o.icon ? (s(), v(L(o.icon), {
|
|
109
109
|
key: 1,
|
|
110
|
-
class:
|
|
111
|
-
}, null, 8, ["class"])) :
|
|
112
|
-
], !0) :
|
|
113
|
-
|
|
110
|
+
class: z([r.value])
|
|
111
|
+
}, null, 8, ["class"])) : u("v-if", !0)
|
|
112
|
+
], !0) : u("v-if", !0),
|
|
113
|
+
u(`
|
|
114
114
|
@slot default - The content of the button
|
|
115
115
|
`),
|
|
116
|
-
M(
|
|
117
|
-
|
|
116
|
+
M(o.$slots, "default", {}, void 0, !0),
|
|
117
|
+
u(`
|
|
118
118
|
@slot left-icon - The icon to display on the left of the button
|
|
119
119
|
`),
|
|
120
|
-
|
|
121
|
-
typeof
|
|
120
|
+
F.value ? M(o.$slots, "right-icon", { key: 1 }, () => [
|
|
121
|
+
typeof o.rightIcon == "string" ? (s(), v(y(f), {
|
|
122
122
|
key: 0,
|
|
123
|
-
name:
|
|
124
|
-
class:
|
|
125
|
-
}, null, 8, ["name", "class"])) :
|
|
123
|
+
name: o.rightIcon,
|
|
124
|
+
class: z([r.value])
|
|
125
|
+
}, null, 8, ["name", "class"])) : o.rightIcon ? (s(), v(L(o.rightIcon), {
|
|
126
126
|
key: 1,
|
|
127
|
-
class:
|
|
128
|
-
}, null, 8, ["class"])) :
|
|
129
|
-
], !0) :
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
class: z([r.value])
|
|
128
|
+
}, null, 8, ["class"])) : u("v-if", !0)
|
|
129
|
+
], !0) : u("v-if", !0),
|
|
130
|
+
D.value ? (s(), B("div", ye, [
|
|
131
|
+
O(y(t), {
|
|
132
132
|
size: "2em",
|
|
133
|
-
color:
|
|
133
|
+
color: o.color
|
|
134
134
|
}, null, 8, ["color"])
|
|
135
|
-
])) :
|
|
135
|
+
])) : u("v-if", !0)
|
|
136
136
|
]),
|
|
137
137
|
_: 3
|
|
138
138
|
/* FORWARDED */
|
|
139
139
|
}, 8, ["disabled", "class", "type"]));
|
|
140
140
|
}
|
|
141
|
-
}), R = (
|
|
142
|
-
const
|
|
143
|
-
for (const [
|
|
144
|
-
|
|
145
|
-
return
|
|
141
|
+
}), R = (c, n) => {
|
|
142
|
+
const t = c.__vccOpts || c;
|
|
143
|
+
for (const [f, h] of n)
|
|
144
|
+
t[f] = h;
|
|
145
|
+
return t;
|
|
146
146
|
}, X = /* @__PURE__ */ R(be, [["__scopeId", "data-v-d3a1ed01"]]), ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
147
147
|
__proto__: null,
|
|
148
148
|
default: X
|
|
149
149
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
150
150
|
function ze({
|
|
151
|
-
componentName:
|
|
152
|
-
providedId:
|
|
151
|
+
componentName: c,
|
|
152
|
+
providedId: n
|
|
153
153
|
}) {
|
|
154
|
-
const
|
|
155
|
-
return
|
|
154
|
+
const t = le();
|
|
155
|
+
return i(() => n ?? `${c}-${t}`);
|
|
156
156
|
}
|
|
157
|
-
function he(
|
|
158
|
-
let
|
|
159
|
-
return function(...
|
|
160
|
-
clearTimeout(
|
|
161
|
-
|
|
162
|
-
},
|
|
157
|
+
function he(c, n) {
|
|
158
|
+
let t;
|
|
159
|
+
return function(...f) {
|
|
160
|
+
clearTimeout(t), t = setTimeout(() => {
|
|
161
|
+
c.apply(this, f);
|
|
162
|
+
}, n);
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
165
|
const ke = {
|
|
@@ -205,86 +205,86 @@ const ke = {
|
|
|
205
205
|
block: { type: Boolean }
|
|
206
206
|
},
|
|
207
207
|
emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
|
|
208
|
-
setup(
|
|
209
|
-
const
|
|
208
|
+
setup(c, { emit: n }) {
|
|
209
|
+
const t = c, f = n, h = S(() => Promise.resolve().then(() => ge)), g = S(() => import("./MazIcon-BbvBov5G.mjs")), b = S(() => import("./eye-slash-BoO00xzs.mjs")), p = S(() => import("./eye-f8zAUc30.mjs")), T = S(() => import("./check-BmubdHc_.mjs")), m = $(!1), k = $(!1), V = $(), D = ze({
|
|
210
210
|
componentName: "MazInput",
|
|
211
|
-
providedId:
|
|
211
|
+
providedId: t.id
|
|
212
212
|
});
|
|
213
213
|
re(() => {
|
|
214
214
|
var e;
|
|
215
|
-
|
|
215
|
+
t.autoFocus && ((e = V.value) == null || e.focus());
|
|
216
216
|
});
|
|
217
|
-
const
|
|
218
|
-
if (!
|
|
219
|
-
if (
|
|
217
|
+
const j = i(() => t.type === "password"), F = i(() => m.value ? "text" : t.type), a = i(() => {
|
|
218
|
+
if (!t.noBorder) {
|
|
219
|
+
if (t.error)
|
|
220
220
|
return "maz-border-danger";
|
|
221
|
-
if (
|
|
221
|
+
if (t.success)
|
|
222
222
|
return "maz-border-success";
|
|
223
|
-
if (
|
|
223
|
+
if (t.warning)
|
|
224
224
|
return "maz-border-warning";
|
|
225
|
-
if (
|
|
226
|
-
if (
|
|
225
|
+
if (k.value || t.borderActive) {
|
|
226
|
+
if (t.color === "black")
|
|
227
227
|
return "maz-border-black";
|
|
228
|
-
if (
|
|
228
|
+
if (t.color === "danger")
|
|
229
229
|
return "maz-border-danger";
|
|
230
|
-
if (
|
|
230
|
+
if (t.color === "info")
|
|
231
231
|
return "maz-border-info";
|
|
232
|
-
if (
|
|
232
|
+
if (t.color === "primary")
|
|
233
233
|
return "maz-border-primary";
|
|
234
|
-
if (
|
|
234
|
+
if (t.color === "secondary")
|
|
235
235
|
return "maz-border-secondary";
|
|
236
|
-
if (
|
|
236
|
+
if (t.color === "success")
|
|
237
237
|
return "maz-border-success";
|
|
238
|
-
if (
|
|
238
|
+
if (t.color === "warning")
|
|
239
239
|
return "maz-border-warning";
|
|
240
|
-
if (
|
|
240
|
+
if (t.color === "white")
|
|
241
241
|
return "maz-border-white";
|
|
242
242
|
}
|
|
243
243
|
return "--default-border";
|
|
244
244
|
}
|
|
245
|
-
}),
|
|
246
|
-
const { required: e, placeholder:
|
|
247
|
-
if (
|
|
248
|
-
return e ? `${
|
|
249
|
-
}),
|
|
245
|
+
}), l = H(), d = i(() => {
|
|
246
|
+
const { required: e, placeholder: I } = t;
|
|
247
|
+
if (I)
|
|
248
|
+
return e ? `${I} *` : I;
|
|
249
|
+
}), r = i(() => C.value !== void 0 && C.value !== ""), w = he(
|
|
250
250
|
(e) => {
|
|
251
|
-
|
|
251
|
+
f("update:model-value", e);
|
|
252
252
|
},
|
|
253
|
-
typeof
|
|
253
|
+
typeof t.debounce == "number" ? t.debounce : t.debounceDelay ?? 500
|
|
254
254
|
);
|
|
255
|
-
function
|
|
256
|
-
if (
|
|
257
|
-
return
|
|
258
|
-
|
|
255
|
+
function o(e) {
|
|
256
|
+
if (t.debounce)
|
|
257
|
+
return w(e);
|
|
258
|
+
f("update:model-value", e);
|
|
259
259
|
}
|
|
260
|
-
const
|
|
261
|
-
get: () =>
|
|
262
|
-
set: (e) =>
|
|
263
|
-
}), Y =
|
|
260
|
+
const C = i({
|
|
261
|
+
get: () => t.modelValue,
|
|
262
|
+
set: (e) => o(e)
|
|
263
|
+
}), Y = i(() => (!!t.label || !!t.hint) && (k.value || !!r.value || !!t.placeholder || ["date", "month", "week"].includes(t.type))), Z = i(() => !!t.label || !!t.hint);
|
|
264
264
|
function x() {
|
|
265
|
-
return !!
|
|
265
|
+
return !!l["right-icon"] || j.value || !!l["valid-button"] || t.validButton || !!t.rightIcon;
|
|
266
266
|
}
|
|
267
267
|
function _() {
|
|
268
|
-
return !!
|
|
268
|
+
return !!l["left-icon"] || !!t.leftIcon;
|
|
269
269
|
}
|
|
270
270
|
function ee(e) {
|
|
271
|
-
|
|
272
|
-
}
|
|
273
|
-
function oe(e) {
|
|
274
|
-
c("blur", e), B.value = !1;
|
|
271
|
+
f("focus", e), k.value = !0;
|
|
275
272
|
}
|
|
276
273
|
function te(e) {
|
|
277
|
-
|
|
274
|
+
f("blur", e), k.value = !1;
|
|
275
|
+
}
|
|
276
|
+
function oe(e) {
|
|
277
|
+
return f("change", e);
|
|
278
278
|
}
|
|
279
279
|
function ne(e) {
|
|
280
|
-
return
|
|
280
|
+
return f("input", e);
|
|
281
281
|
}
|
|
282
|
-
return (e,
|
|
282
|
+
return (e, I) => (s(), B(
|
|
283
283
|
"div",
|
|
284
284
|
{
|
|
285
|
-
class:
|
|
285
|
+
class: z(["m-input", [
|
|
286
286
|
{
|
|
287
|
-
"--is-focused":
|
|
287
|
+
"--is-focused": k.value || e.borderActive,
|
|
288
288
|
"--should-up": Y.value,
|
|
289
289
|
"--has-label": Z.value,
|
|
290
290
|
"--is-disabled": e.disabled,
|
|
@@ -293,7 +293,7 @@ const ke = {
|
|
|
293
293
|
"--has-state": e.error || e.warning || e.success,
|
|
294
294
|
"--block": e.block
|
|
295
295
|
},
|
|
296
|
-
|
|
296
|
+
t.class,
|
|
297
297
|
`--${e.color}`,
|
|
298
298
|
`--${e.size}`
|
|
299
299
|
]]),
|
|
@@ -303,35 +303,35 @@ const ke = {
|
|
|
303
303
|
E(
|
|
304
304
|
"div",
|
|
305
305
|
{
|
|
306
|
-
class:
|
|
306
|
+
class: z(["m-input-wrapper", [
|
|
307
307
|
e.inputClasses,
|
|
308
|
-
|
|
308
|
+
a.value,
|
|
309
309
|
e.roundedSize ? `--rounded-${e.roundedSize}` : { "maz-rounded": !e.noRadius }
|
|
310
310
|
]])
|
|
311
311
|
},
|
|
312
312
|
[
|
|
313
|
-
_() ? (s(),
|
|
314
|
-
|
|
313
|
+
_() ? (s(), B("div", ke, [
|
|
314
|
+
u(`
|
|
315
315
|
@slot left-icon - The icon to display on the left of the input
|
|
316
316
|
`),
|
|
317
317
|
e.$slots["left-icon"] || e.leftIcon ? M(e.$slots, "left-icon", { key: 0 }, () => [
|
|
318
|
-
typeof e.leftIcon == "string" ? (s(), v(
|
|
318
|
+
typeof e.leftIcon == "string" ? (s(), v(y(g), {
|
|
319
319
|
key: 0,
|
|
320
320
|
name: e.leftIcon,
|
|
321
321
|
class: "maz-text-xl maz-text-muted"
|
|
322
|
-
}, null, 8, ["name"])) : e.leftIcon ? (s(), v(
|
|
322
|
+
}, null, 8, ["name"])) : e.leftIcon ? (s(), v(L(e.leftIcon), {
|
|
323
323
|
key: 1,
|
|
324
324
|
class: "maz-text-xl maz-text-muted"
|
|
325
|
-
})) :
|
|
326
|
-
], !0) :
|
|
327
|
-
])) :
|
|
325
|
+
})) : u("v-if", !0)
|
|
326
|
+
], !0) : u("v-if", !0)
|
|
327
|
+
])) : u("v-if", !0),
|
|
328
328
|
E("div", Ie, [
|
|
329
|
-
|
|
330
|
-
id:
|
|
329
|
+
ie(E("input", G({
|
|
330
|
+
id: y(D),
|
|
331
331
|
ref_key: "input",
|
|
332
332
|
ref: V,
|
|
333
|
-
"onUpdate:modelValue":
|
|
334
|
-
type:
|
|
333
|
+
"onUpdate:modelValue": I[0] || (I[0] = (A) => C.value = A),
|
|
334
|
+
type: F.value,
|
|
335
335
|
name: e.name
|
|
336
336
|
}, e.$attrs, {
|
|
337
337
|
inputmode: e.inputmode,
|
|
@@ -341,21 +341,21 @@ const ke = {
|
|
|
341
341
|
readonly: e.readonly,
|
|
342
342
|
required: e.required,
|
|
343
343
|
class: "m-input-input"
|
|
344
|
-
},
|
|
345
|
-
blur:
|
|
344
|
+
}, se({
|
|
345
|
+
blur: te,
|
|
346
346
|
focus: ee,
|
|
347
|
-
change:
|
|
347
|
+
change: oe,
|
|
348
348
|
input: ne
|
|
349
349
|
}, !0), {
|
|
350
|
-
onClick:
|
|
350
|
+
onClick: I[1] || (I[1] = (A) => e.$emit("click", A))
|
|
351
351
|
}), null, 16, Be), [
|
|
352
|
-
[ue,
|
|
352
|
+
[ue, C.value]
|
|
353
353
|
]),
|
|
354
|
-
e.label || e.hint ? (s(),
|
|
354
|
+
e.label || e.hint ? (s(), B(
|
|
355
355
|
"span",
|
|
356
356
|
{
|
|
357
357
|
key: 0,
|
|
358
|
-
class:
|
|
358
|
+
class: z(["m-input-label", [
|
|
359
359
|
{
|
|
360
360
|
"maz-text-danger-600": e.error,
|
|
361
361
|
"maz-text-success-600": e.success,
|
|
@@ -369,50 +369,50 @@ const ke = {
|
|
|
369
369
|
1
|
|
370
370
|
/* TEXT */
|
|
371
371
|
),
|
|
372
|
-
e.required ? (s(),
|
|
372
|
+
e.required ? (s(), B("sup", we, "*")) : u("v-if", !0)
|
|
373
373
|
],
|
|
374
374
|
2
|
|
375
375
|
/* CLASS */
|
|
376
|
-
)) :
|
|
376
|
+
)) : u("v-if", !0)
|
|
377
377
|
]),
|
|
378
|
-
x() ? (s(),
|
|
379
|
-
|
|
378
|
+
x() ? (s(), B("div", $e, [
|
|
379
|
+
u(`
|
|
380
380
|
@slot right-icon - The icon to display on the right of the input
|
|
381
381
|
`),
|
|
382
382
|
e.$slots["right-icon"] || e.rightIcon ? M(e.$slots, "right-icon", { key: 0 }, () => [
|
|
383
|
-
typeof e.rightIcon == "string" ? (s(), v(
|
|
383
|
+
typeof e.rightIcon == "string" ? (s(), v(y(g), {
|
|
384
384
|
key: 0,
|
|
385
385
|
name: e.rightIcon,
|
|
386
386
|
class: "maz-text-xl maz-text-muted"
|
|
387
|
-
}, null, 8, ["name"])) : e.rightIcon ? (s(), v(
|
|
387
|
+
}, null, 8, ["name"])) : e.rightIcon ? (s(), v(L(e.rightIcon), {
|
|
388
388
|
key: 1,
|
|
389
389
|
class: "maz-text-xl maz-text-muted"
|
|
390
|
-
})) :
|
|
391
|
-
], !0) :
|
|
392
|
-
|
|
390
|
+
})) : u("v-if", !0)
|
|
391
|
+
], !0) : u("v-if", !0),
|
|
392
|
+
j.value ? (s(), v(y(h), {
|
|
393
393
|
key: 1,
|
|
394
394
|
color: "transparent",
|
|
395
395
|
tabindex: "-1",
|
|
396
396
|
size: "mini",
|
|
397
|
-
onClick:
|
|
397
|
+
onClick: I[2] || (I[2] = W((A) => m.value = !m.value, ["stop"]))
|
|
398
398
|
}, {
|
|
399
399
|
default: P(() => [
|
|
400
|
-
m.value ? (s(), v(b
|
|
400
|
+
m.value ? (s(), v(y(b), {
|
|
401
401
|
key: 0,
|
|
402
402
|
class: "maz-text-xl maz-text-muted"
|
|
403
|
-
})) : (s(), v(
|
|
403
|
+
})) : (s(), v(y(p), {
|
|
404
404
|
key: 1,
|
|
405
405
|
class: "maz-text-xl maz-text-muted"
|
|
406
406
|
}))
|
|
407
407
|
]),
|
|
408
408
|
_: 1
|
|
409
409
|
/* STABLE */
|
|
410
|
-
})) :
|
|
411
|
-
|
|
410
|
+
})) : u("v-if", !0),
|
|
411
|
+
u(`
|
|
412
412
|
@slot valid-button - Replace the valid button by your own
|
|
413
413
|
`),
|
|
414
414
|
e.$slots["valid-button"] || e.validButton ? M(e.$slots, "valid-button", { key: 2 }, () => [
|
|
415
|
-
|
|
415
|
+
O(y(h), {
|
|
416
416
|
color: "transparent",
|
|
417
417
|
disabled: e.disabled,
|
|
418
418
|
tabindex: "-1",
|
|
@@ -422,13 +422,13 @@ const ke = {
|
|
|
422
422
|
type: "submit"
|
|
423
423
|
}, {
|
|
424
424
|
default: P(() => [
|
|
425
|
-
|
|
425
|
+
O(y(T), { class: "maz-text-2xl maz-text-normal" })
|
|
426
426
|
]),
|
|
427
427
|
_: 1
|
|
428
428
|
/* STABLE */
|
|
429
429
|
}, 8, ["disabled", "loading"])
|
|
430
|
-
], !0) :
|
|
431
|
-
])) :
|
|
430
|
+
], !0) : u("v-if", !0)
|
|
431
|
+
])) : u("v-if", !0)
|
|
432
432
|
],
|
|
433
433
|
2
|
|
434
434
|
/* CLASS */
|
|
@@ -438,7 +438,7 @@ const ke = {
|
|
|
438
438
|
/* CLASS, STYLE */
|
|
439
439
|
));
|
|
440
440
|
}
|
|
441
|
-
}), je = /* @__PURE__ */ R(Te, [["__scopeId", "data-v-
|
|
441
|
+
}), je = /* @__PURE__ */ R(Te, [["__scopeId", "data-v-c42aaa7f"]]), Ce = /* @__PURE__ */ q({
|
|
442
442
|
inheritAttrs: !1,
|
|
443
443
|
__name: "MazInputTags",
|
|
444
444
|
props: {
|
|
@@ -458,102 +458,103 @@ const ke = {
|
|
|
458
458
|
hint: {}
|
|
459
459
|
},
|
|
460
460
|
emits: ["update:model-value"],
|
|
461
|
-
setup(
|
|
462
|
-
const
|
|
461
|
+
setup(c, { emit: n }) {
|
|
462
|
+
const t = c, f = n, h = $(!1), g = $(), b = $(), p = $(), T = $(), m = i(
|
|
463
463
|
() => {
|
|
464
|
-
var
|
|
465
|
-
return (
|
|
464
|
+
var a;
|
|
465
|
+
return (a = t.modelValue) == null ? void 0 : a.map((l) => ({
|
|
466
466
|
tag: l,
|
|
467
467
|
id: Math.random().toString(36).slice(2, 11)
|
|
468
468
|
}));
|
|
469
469
|
}
|
|
470
470
|
);
|
|
471
|
-
function
|
|
472
|
-
if (
|
|
473
|
-
p.value = void 0,
|
|
474
|
-
const
|
|
475
|
-
(
|
|
476
|
-
var
|
|
477
|
-
return !((
|
|
471
|
+
function k(a) {
|
|
472
|
+
if (g.value) {
|
|
473
|
+
p.value = void 0, a.preventDefault();
|
|
474
|
+
const d = g.value.trim().split(",").map((r) => r.trim() === "," ? void 0 : r.trim()).filter(U).filter(
|
|
475
|
+
(r) => {
|
|
476
|
+
var w, o;
|
|
477
|
+
return !((o = (w = t.modelValue) == null ? void 0 : w.filter(U)) != null && o.some((C) => C === r));
|
|
478
478
|
}
|
|
479
479
|
);
|
|
480
|
-
|
|
480
|
+
f(
|
|
481
481
|
"update:model-value",
|
|
482
|
-
|
|
483
|
-
),
|
|
482
|
+
t.modelValue ? [...t.modelValue, ...d] : [...d]
|
|
483
|
+
), g.value = void 0;
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
const V =
|
|
487
|
-
if (
|
|
486
|
+
const V = i(() => {
|
|
487
|
+
if (t.error)
|
|
488
488
|
return "maz-border-danger";
|
|
489
|
-
if (
|
|
489
|
+
if (t.success)
|
|
490
490
|
return "maz-border-success";
|
|
491
|
-
if (
|
|
491
|
+
if (t.warning)
|
|
492
492
|
return "maz-border-warning";
|
|
493
|
-
if (
|
|
494
|
-
if (
|
|
493
|
+
if (h.value) {
|
|
494
|
+
if (t.color === "primary")
|
|
495
495
|
return "maz-border-primary";
|
|
496
|
-
if (
|
|
496
|
+
if (t.color === "secondary")
|
|
497
497
|
return "maz-border-secondary";
|
|
498
|
-
if (
|
|
498
|
+
if (t.color === "info")
|
|
499
499
|
return "maz-border-info";
|
|
500
|
-
if (
|
|
500
|
+
if (t.color === "danger")
|
|
501
501
|
return "maz-border-danger";
|
|
502
|
-
if (
|
|
502
|
+
if (t.color === "success")
|
|
503
503
|
return "maz-border-success";
|
|
504
|
-
if (
|
|
504
|
+
if (t.color === "warning")
|
|
505
505
|
return "maz-border-warning";
|
|
506
|
-
if (
|
|
506
|
+
if (t.color === "black")
|
|
507
507
|
return "maz-border-black";
|
|
508
|
-
if (
|
|
508
|
+
if (t.color === "white")
|
|
509
509
|
return "maz-border-white";
|
|
510
510
|
}
|
|
511
511
|
return "maz-border-border dark:maz-border-color-lighter";
|
|
512
512
|
});
|
|
513
|
-
function
|
|
514
|
-
var
|
|
515
|
-
|
|
513
|
+
function D() {
|
|
514
|
+
var a, l, d;
|
|
515
|
+
g.value || m.value && ((a = m.value) == null ? void 0 : a.length) === 0 || (T.value && clearTimeout(T.value), p.value ? (j(p.value), p.value = void 0) : (p.value = (d = (l = m.value) == null ? void 0 : l[m.value.length - 1]) == null ? void 0 : d.id, T.value = setTimeout(() => {
|
|
516
516
|
p.value = void 0;
|
|
517
517
|
}, 2e3)));
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
var
|
|
521
|
-
const l = (
|
|
522
|
-
|
|
519
|
+
function j(a) {
|
|
520
|
+
var d;
|
|
521
|
+
const l = (d = m.value) == null ? void 0 : d.filter((r) => r.id !== a).map((r) => r.tag);
|
|
522
|
+
f("update:model-value", l);
|
|
523
523
|
}
|
|
524
|
-
|
|
524
|
+
const F = i(() => t.size === "mini" || t.size === "xs" ? "mini" : t.size === "sm" ? "xs" : t.size === "md" ? "sm" : t.size === "lg" ? "md" : t.size === "xl" ? "lg" : t.size);
|
|
525
|
+
return (a, l) => (s(), B(
|
|
525
526
|
"div",
|
|
526
527
|
{
|
|
527
|
-
class:
|
|
528
|
-
style: K(
|
|
529
|
-
onFocusCapture: l[4] || (l[4] = (
|
|
530
|
-
onBlurCapture: l[5] || (l[5] = (
|
|
528
|
+
class: z(["m-input-tags", [V.value, `--${a.color}`, `--${a.size}`, t.class, { "--block": a.block }]]),
|
|
529
|
+
style: K(a.style),
|
|
530
|
+
onFocusCapture: l[4] || (l[4] = (d) => h.value = !0),
|
|
531
|
+
onBlurCapture: l[5] || (l[5] = (d) => h.value = !1)
|
|
531
532
|
},
|
|
532
533
|
[
|
|
533
|
-
|
|
534
|
+
O(de, { name: "maz-tags" }, {
|
|
534
535
|
default: P(() => [
|
|
535
|
-
(s(!0),
|
|
536
|
-
|
|
536
|
+
(s(!0), B(
|
|
537
|
+
fe,
|
|
537
538
|
null,
|
|
538
|
-
|
|
539
|
-
key: `tag-${
|
|
539
|
+
ce(m.value, ({ tag: d, id: r }, w) => (s(), B("div", {
|
|
540
|
+
key: `tag-${w}`,
|
|
540
541
|
class: "m-input-tags__wrapper"
|
|
541
542
|
}, [
|
|
542
|
-
|
|
543
|
+
O(X, {
|
|
543
544
|
class: "m-input-tags__tag",
|
|
544
|
-
disabled:
|
|
545
|
-
size:
|
|
546
|
-
color:
|
|
547
|
-
"right-icon":
|
|
548
|
-
onClick: W((
|
|
549
|
-
onMouseenter: (
|
|
550
|
-
onFocus: (
|
|
551
|
-
onMouseleave: l[0] || (l[0] = (
|
|
552
|
-
onBlur: l[1] || (l[1] = (
|
|
545
|
+
disabled: a.disabled,
|
|
546
|
+
size: F.value,
|
|
547
|
+
color: b.value === r || p.value === r ? "danger" : a.color,
|
|
548
|
+
"right-icon": b.value === r || p.value === r ? y(ve) : void 0,
|
|
549
|
+
onClick: W((o) => j(r), ["stop"]),
|
|
550
|
+
onMouseenter: (o) => b.value = r,
|
|
551
|
+
onFocus: (o) => b.value = r,
|
|
552
|
+
onMouseleave: l[0] || (l[0] = (o) => b.value = void 0),
|
|
553
|
+
onBlur: l[1] || (l[1] = (o) => b.value = void 0)
|
|
553
554
|
}, {
|
|
554
555
|
default: P(() => [
|
|
555
556
|
J(
|
|
556
|
-
Q(
|
|
557
|
+
Q(d),
|
|
557
558
|
1
|
|
558
559
|
/* TEXT */
|
|
559
560
|
)
|
|
@@ -569,36 +570,36 @@ const ke = {
|
|
|
569
570
|
_: 1
|
|
570
571
|
/* STABLE */
|
|
571
572
|
}),
|
|
572
|
-
|
|
573
|
+
O(je, G({
|
|
573
574
|
key: "input-tags",
|
|
574
|
-
modelValue:
|
|
575
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
576
|
-
},
|
|
577
|
-
placeholder:
|
|
578
|
-
label:
|
|
579
|
-
"aria-label":
|
|
580
|
-
error:
|
|
581
|
-
hint:
|
|
582
|
-
success:
|
|
583
|
-
warning:
|
|
584
|
-
disabled:
|
|
585
|
-
color:
|
|
586
|
-
block:
|
|
587
|
-
size:
|
|
575
|
+
modelValue: g.value,
|
|
576
|
+
"onUpdate:modelValue": l[2] || (l[2] = (d) => g.value = d)
|
|
577
|
+
}, a.$attrs, {
|
|
578
|
+
placeholder: a.placeholder,
|
|
579
|
+
label: a.label,
|
|
580
|
+
"aria-label": a.label || a.placeholder,
|
|
581
|
+
error: a.error,
|
|
582
|
+
hint: a.hint,
|
|
583
|
+
success: a.success,
|
|
584
|
+
warning: a.warning,
|
|
585
|
+
disabled: a.disabled,
|
|
586
|
+
color: a.color,
|
|
587
|
+
block: a.block,
|
|
588
|
+
size: a.size,
|
|
588
589
|
"no-border": "",
|
|
589
590
|
class: "m-input-tags__input",
|
|
590
591
|
onKeydown: [
|
|
591
|
-
N(
|
|
592
|
-
N(
|
|
592
|
+
N(k, ["enter"]),
|
|
593
|
+
N(D, ["delete"])
|
|
593
594
|
],
|
|
594
|
-
onBlur: l[3] || (l[3] = (
|
|
595
|
+
onBlur: l[3] || (l[3] = (d) => a.addTagsOnBlur ? k(d) : void 0)
|
|
595
596
|
}), null, 16, ["modelValue", "placeholder", "label", "aria-label", "error", "hint", "success", "warning", "disabled", "color", "block", "size"])
|
|
596
597
|
],
|
|
597
598
|
38
|
|
598
599
|
/* CLASS, STYLE, NEED_HYDRATION */
|
|
599
600
|
));
|
|
600
601
|
}
|
|
601
|
-
}), Me = /* @__PURE__ */ R(Ce, [["__scopeId", "data-v-
|
|
602
|
+
}), Me = /* @__PURE__ */ R(Ce, [["__scopeId", "data-v-f5008e65"]]);
|
|
602
603
|
export {
|
|
603
604
|
Me as M,
|
|
604
605
|
R as _
|