maz-ui 3.22.0 → 3.22.1
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/MazInput.d.ts +38 -22
- package/components/MazInput.mjs +1 -2
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazPhoneNumberInput.d.ts +41 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazSelect.d.ts +33 -1
- package/components/MazSelect.mjs +1 -1
- package/components/MazTextarea.d.ts +17 -17
- package/components/MazTextarea.mjs +7 -8
- package/components/assets/MazInput.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/MazSelect.css +1 -1
- package/components/assets/MazTextarea.css +1 -1
- package/components/chunks/{MazBtn-001d4174.mjs → MazBtn-0e02f0da.mjs} +2 -2
- package/components/chunks/{MazBtn-a3a285eb.mjs → MazBtn-2f4fa942.mjs} +2 -2
- package/components/chunks/{MazBtn-97d9e521.mjs → MazBtn-30723941.mjs} +2 -2
- package/components/chunks/{MazBtn-080c9397.mjs → MazBtn-4e1e116e.mjs} +2 -2
- package/components/chunks/{MazBtn-7f413085.mjs → MazBtn-b42e3575.mjs} +2 -2
- package/components/chunks/{MazBtn-29a43072.mjs → MazBtn-f48da79c.mjs} +2 -2
- package/components/chunks/{MazCheckbox-0595c207.mjs → MazCheckbox-9fa9179a.mjs} +1 -1
- package/components/chunks/{MazCheckbox-90f20e7f.mjs → MazCheckbox-e0bbe6ec.mjs} +1 -1
- package/components/chunks/MazInput-713b00d0.mjs +326 -0
- package/components/chunks/MazInput-b9386887.mjs +341 -0
- package/components/chunks/MazInput-c33627dd.mjs +334 -0
- package/components/chunks/{MazInputPrice-eb36a7dd.mjs → MazInputPrice-452297f5.mjs} +171 -191
- package/components/chunks/{MazInputTags-24164d56.mjs → MazInputTags-7a463b81.mjs} +176 -196
- package/components/chunks/{MazPhoneNumberInput-4cec4ade.mjs → MazPhoneNumberInput-31bc05f9.mjs} +241 -226
- package/components/chunks/{MazPicker-9f4c724c.mjs → MazPicker-50fc11d1.mjs} +4 -4
- package/components/chunks/{MazPickerCalendar-35fe36ab.mjs → MazPickerCalendar-cacb361c.mjs} +5 -5
- package/components/chunks/{MazPickerHeader-d8687abf.mjs → MazPickerHeader-63d45179.mjs} +1 -1
- package/components/chunks/{MazPickerMonthSwitcher-739ed62a.mjs → MazPickerMonthSwitcher-913c6e2c.mjs} +2 -2
- package/components/chunks/{MazPickerShortcuts-68622fe8.mjs → MazPickerShortcuts-c6fabfc6.mjs} +2 -2
- package/components/chunks/{MazPickerTime-031062b2.mjs → MazPickerTime-5e4475da.mjs} +2 -2
- package/components/chunks/{MazPickerYearSwitcher-2a006a30.mjs → MazPickerYearSwitcher-dd4fa89c.mjs} +3 -3
- package/components/chunks/{MazSelect-757bffd7.mjs → MazSelect-2e5cd411.mjs} +199 -206
- package/components/chunks/{MazSpinner-d356ad25.mjs → MazSpinner-100c99b8.mjs} +1 -1
- package/components/chunks/{MazSpinner-7bd9b831.mjs → MazSpinner-191ad23b.mjs} +1 -1
- package/components/chunks/{MazSpinner-89743727.mjs → MazSpinner-339a9006.mjs} +1 -1
- package/components/chunks/{MazSpinner-85c86950.mjs → MazSpinner-8859d658.mjs} +1 -1
- package/components/chunks/{MazSpinner-d669a3af.mjs → MazSpinner-cb6f99f3.mjs} +1 -1
- package/components/chunks/{MazSpinner-ac429216.mjs → MazSpinner-db6fc59d.mjs} +1 -1
- package/css/main.css +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazInput.vue.d.ts +38 -22
- package/types/components/MazPhoneNumberInput.vue.d.ts +41 -1
- package/types/components/MazSelect.vue.d.ts +33 -1
- package/types/components/MazTextarea.vue.d.ts +17 -17
- package/components/chunks/MazInput-12a098d4.mjs +0 -361
- package/components/chunks/MazInput-20ea773f.mjs +0 -354
- package/components/chunks/MazInput-4313d3cc.mjs +0 -346
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../assets/MazInputTags.css";
|
|
2
|
-
import { computed,
|
|
2
|
+
import { computed, defineComponent, defineAsyncComponent, ref, getCurrentInstance, onMounted, useSlots, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createVNode, unref, createCommentVNode, withDirectives, mergeProps, toHandlers, vModelDynamic, createTextVNode, toDisplayString, createBlock, withModifiers, withCtx, TransitionGroup, Fragment, renderList, withKeys } from "vue";
|
|
3
3
|
function debounce(fn, delay) {
|
|
4
4
|
let timeout;
|
|
5
5
|
return function(...args) {
|
|
@@ -16,21 +16,25 @@ const useInstanceUniqId = ({
|
|
|
16
16
|
}) => {
|
|
17
17
|
return computed(() => providedId ?? `${componentName}-${instance == null ? void 0 : instance.uid}`);
|
|
18
18
|
};
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
const _hoisted_1$1 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "m-input-wrapper-left"
|
|
22
|
+
};
|
|
23
|
+
const _hoisted_2$1 = { class: "m-input-wrapper-input" };
|
|
24
|
+
const _hoisted_3$1 = ["id", "type", "name", "placeholder", "aria-label", "disabled", "readonly", "required"];
|
|
25
|
+
const _hoisted_4 = { key: 0 };
|
|
26
|
+
const _hoisted_5 = {
|
|
27
|
+
key: 1,
|
|
28
|
+
class: "m-input-wrapper-right"
|
|
29
|
+
};
|
|
30
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
31
|
+
...{
|
|
32
|
+
inheritAttrs: false
|
|
31
33
|
},
|
|
32
|
-
|
|
34
|
+
__name: "MazInput",
|
|
33
35
|
props: {
|
|
36
|
+
style: { type: [String, Array, Object], default: void 0 },
|
|
37
|
+
class: { type: String, default: void 0 },
|
|
34
38
|
modelValue: {
|
|
35
39
|
type: [String, Number, Boolean],
|
|
36
40
|
default: void 0
|
|
@@ -89,7 +93,14 @@ const _sfc_main$1 = defineComponent({
|
|
|
89
93
|
rightIcon: { type: String, default: void 0 }
|
|
90
94
|
},
|
|
91
95
|
emits: ["focus", "blur", "update:model-value", "click", "change", "update"],
|
|
92
|
-
setup(
|
|
96
|
+
setup(__props, { emit: __emit }) {
|
|
97
|
+
const MazBtn = defineAsyncComponent(() => import("./MazBtn-b42e3575.mjs"));
|
|
98
|
+
const MazIcon = defineAsyncComponent(() => import("./MazIcon-bda198b4.mjs"));
|
|
99
|
+
const EyeOffIcon = defineAsyncComponent(() => import("./eye-slash-342420ff.mjs"));
|
|
100
|
+
const EyeIcon = defineAsyncComponent(() => import("./eye-fbb13657.mjs"));
|
|
101
|
+
const CheckIcon = defineAsyncComponent(() => import("./check-f2fcce10.mjs"));
|
|
102
|
+
const props = __props;
|
|
103
|
+
const emits = __emit;
|
|
93
104
|
const hasPasswordVisible = ref(false);
|
|
94
105
|
const isFocused = ref(false);
|
|
95
106
|
const input = ref();
|
|
@@ -105,6 +116,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
105
116
|
(_a = input.value) == null ? void 0 : _a.focus();
|
|
106
117
|
}
|
|
107
118
|
});
|
|
119
|
+
const inheritClasses = computed(() => props.class);
|
|
108
120
|
const isPasswordType = computed(() => props.type === "password");
|
|
109
121
|
const inputType = computed(() => hasPasswordVisible.value ? "text" : props.type);
|
|
110
122
|
const borderStyle = computed(() => {
|
|
@@ -136,6 +148,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
136
148
|
}
|
|
137
149
|
return "--default-border";
|
|
138
150
|
});
|
|
151
|
+
const slots = useSlots();
|
|
139
152
|
const computedPlaceholder = computed(() => {
|
|
140
153
|
const { required, placeholder } = props;
|
|
141
154
|
if (!placeholder)
|
|
@@ -158,44 +171,162 @@ const _sfc_main$1 = defineComponent({
|
|
|
158
171
|
return !!slots["left-icon"] || !!props.leftIcon;
|
|
159
172
|
};
|
|
160
173
|
const focus = (event) => {
|
|
161
|
-
|
|
174
|
+
emits("focus", event);
|
|
162
175
|
isFocused.value = true;
|
|
163
176
|
};
|
|
164
177
|
const blur = (event) => {
|
|
165
|
-
|
|
178
|
+
emits("blur", event);
|
|
166
179
|
isFocused.value = false;
|
|
167
180
|
};
|
|
168
|
-
const change = (event) =>
|
|
181
|
+
const change = (event) => emits("change", event);
|
|
169
182
|
const debounceEmitValue = debounce((value) => {
|
|
170
|
-
|
|
183
|
+
emits("update:model-value", value);
|
|
171
184
|
}, props.debounceDelay);
|
|
172
185
|
const emitValue = (value) => {
|
|
173
186
|
if (props.debounce)
|
|
174
187
|
return debounceEmitValue(value);
|
|
175
|
-
|
|
188
|
+
emits("update:model-value", value);
|
|
176
189
|
};
|
|
177
|
-
return {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
190
|
+
return (_ctx, _cache) => {
|
|
191
|
+
return openBlock(), createElementBlock(
|
|
192
|
+
"div",
|
|
193
|
+
{
|
|
194
|
+
class: normalizeClass(["m-input", [
|
|
195
|
+
{
|
|
196
|
+
"--is-focused": isFocused.value || __props.borderActive,
|
|
197
|
+
"--should-up": shouldUp.value,
|
|
198
|
+
"--has-label": hasLabel.value,
|
|
199
|
+
"--is-disabled": __props.disabled,
|
|
200
|
+
"--is-readonly": __props.readonly,
|
|
201
|
+
"--has-z-2": __props.error || __props.warning || __props.success,
|
|
202
|
+
"--has-state": __props.error || __props.warning || __props.success
|
|
203
|
+
},
|
|
204
|
+
inheritClasses.value,
|
|
205
|
+
`--${__props.color}`,
|
|
206
|
+
`--${__props.size}`
|
|
207
|
+
]]),
|
|
208
|
+
style: normalizeStyle(__props.style)
|
|
209
|
+
},
|
|
210
|
+
[
|
|
211
|
+
createElementVNode(
|
|
212
|
+
"div",
|
|
213
|
+
{
|
|
214
|
+
class: normalizeClass(["m-input-wrapper", [__props.inputClasses, borderStyle.value, { "maz-rounded": !__props.noRadius }]])
|
|
215
|
+
},
|
|
216
|
+
[
|
|
217
|
+
hasLeftPart() ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
218
|
+
_ctx.$slots["left-icon"] || __props.leftIcon ? renderSlot(_ctx.$slots, "left-icon", { key: 0 }, () => [
|
|
219
|
+
createVNode(unref(MazIcon), {
|
|
220
|
+
name: __props.leftIcon,
|
|
221
|
+
class: "maz-text-xl maz-text-muted"
|
|
222
|
+
}, null, 8, ["name"])
|
|
223
|
+
], true) : createCommentVNode("v-if", true)
|
|
224
|
+
])) : createCommentVNode("v-if", true),
|
|
225
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
226
|
+
withDirectives(createElementVNode("input", mergeProps({
|
|
227
|
+
id: unref(instanceId),
|
|
228
|
+
ref_key: "input",
|
|
229
|
+
ref: input,
|
|
230
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
231
|
+
type: inputType.value,
|
|
232
|
+
name: __props.name
|
|
233
|
+
}, _ctx.$attrs, {
|
|
234
|
+
placeholder: computedPlaceholder.value,
|
|
235
|
+
"aria-label": __props.label || __props.placeholder,
|
|
236
|
+
disabled: __props.disabled,
|
|
237
|
+
readonly: __props.readonly,
|
|
238
|
+
required: __props.required,
|
|
239
|
+
class: "m-input-input"
|
|
240
|
+
}, toHandlers({
|
|
241
|
+
blur,
|
|
242
|
+
focus,
|
|
243
|
+
change
|
|
244
|
+
}, true), {
|
|
245
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("click", $event))
|
|
246
|
+
}), null, 16, _hoisted_3$1), [
|
|
247
|
+
[vModelDynamic, inputValue.value]
|
|
248
|
+
]),
|
|
249
|
+
__props.label || __props.hint ? (openBlock(), createElementBlock(
|
|
250
|
+
"span",
|
|
251
|
+
{
|
|
252
|
+
key: 0,
|
|
253
|
+
ref: "label",
|
|
254
|
+
class: normalizeClass(["m-input-label", [
|
|
255
|
+
{
|
|
256
|
+
"maz-text-danger-600": __props.error,
|
|
257
|
+
"maz-text-success-600": __props.success,
|
|
258
|
+
"maz-text-warning-600": __props.warning
|
|
259
|
+
}
|
|
260
|
+
]])
|
|
261
|
+
},
|
|
262
|
+
[
|
|
263
|
+
createTextVNode(
|
|
264
|
+
toDisplayString(__props.hint || __props.label) + " ",
|
|
265
|
+
1
|
|
266
|
+
/* TEXT */
|
|
267
|
+
),
|
|
268
|
+
__props.required ? (openBlock(), createElementBlock("sup", _hoisted_4, "*")) : createCommentVNode("v-if", true)
|
|
269
|
+
],
|
|
270
|
+
2
|
|
271
|
+
/* CLASS */
|
|
272
|
+
)) : createCommentVNode("v-if", true)
|
|
273
|
+
]),
|
|
274
|
+
hasRightPart() ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
275
|
+
_ctx.$slots["right-icon"] || __props.rightIcon ? renderSlot(_ctx.$slots, "right-icon", { key: 0 }, () => [
|
|
276
|
+
createVNode(unref(MazIcon), {
|
|
277
|
+
name: __props.rightIcon,
|
|
278
|
+
class: "maz-text-xl maz-text-muted"
|
|
279
|
+
}, null, 8, ["name"])
|
|
280
|
+
], true) : createCommentVNode("v-if", true),
|
|
281
|
+
isPasswordType.value ? (openBlock(), createBlock(unref(MazBtn), {
|
|
282
|
+
key: 1,
|
|
283
|
+
color: "transparent",
|
|
284
|
+
tabindex: "-1",
|
|
285
|
+
size: "mini",
|
|
286
|
+
onClick: _cache[2] || (_cache[2] = withModifiers(($event) => hasPasswordVisible.value = !hasPasswordVisible.value, ["stop"]))
|
|
287
|
+
}, {
|
|
288
|
+
default: withCtx(() => [
|
|
289
|
+
hasPasswordVisible.value ? (openBlock(), createBlock(unref(EyeOffIcon), {
|
|
290
|
+
key: 0,
|
|
291
|
+
class: "maz-text-xl maz-text-muted"
|
|
292
|
+
})) : (openBlock(), createBlock(unref(EyeIcon), {
|
|
293
|
+
key: 1,
|
|
294
|
+
class: "maz-text-xl maz-text-muted"
|
|
295
|
+
}))
|
|
296
|
+
]),
|
|
297
|
+
_: 1
|
|
298
|
+
/* STABLE */
|
|
299
|
+
})) : createCommentVNode("v-if", true),
|
|
300
|
+
_ctx.$slots["valid-button"] || __props.validButton ? renderSlot(_ctx.$slots, "valid-button", { key: 2 }, () => [
|
|
301
|
+
createVNode(unref(MazBtn), {
|
|
302
|
+
color: "transparent",
|
|
303
|
+
disabled: __props.disabled,
|
|
304
|
+
tabindex: "-1",
|
|
305
|
+
loading: __props.validButtonLoading,
|
|
306
|
+
class: "m-input-valid-button",
|
|
307
|
+
size: "mini",
|
|
308
|
+
type: "submit"
|
|
309
|
+
}, {
|
|
310
|
+
default: withCtx(() => [
|
|
311
|
+
createVNode(unref(CheckIcon), { class: "maz-text-2xl maz-text-normal" })
|
|
312
|
+
]),
|
|
313
|
+
_: 1
|
|
314
|
+
/* STABLE */
|
|
315
|
+
}, 8, ["disabled", "loading"])
|
|
316
|
+
], true) : createCommentVNode("v-if", true)
|
|
317
|
+
])) : createCommentVNode("v-if", true)
|
|
318
|
+
],
|
|
319
|
+
2
|
|
320
|
+
/* CLASS */
|
|
321
|
+
)
|
|
322
|
+
],
|
|
323
|
+
6
|
|
324
|
+
/* CLASS, STYLE */
|
|
325
|
+
);
|
|
195
326
|
};
|
|
196
327
|
}
|
|
197
328
|
});
|
|
198
|
-
const
|
|
329
|
+
const MazInput_vue_vue_type_style_index_0_scoped_32fa5093_lang = "";
|
|
199
330
|
const _export_sfc = (sfc, props) => {
|
|
200
331
|
const target = sfc.__vccOpts || sfc;
|
|
201
332
|
for (const [key, val] of props) {
|
|
@@ -203,158 +334,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
203
334
|
}
|
|
204
335
|
return target;
|
|
205
336
|
};
|
|
206
|
-
const
|
|
207
|
-
key: 0,
|
|
208
|
-
class: "m-input-wrapper-left"
|
|
209
|
-
};
|
|
210
|
-
const _hoisted_2$1 = { class: "m-input-wrapper-input" };
|
|
211
|
-
const _hoisted_3$1 = ["id", "type", "name", "placeholder", "aria-label", "disabled", "readonly", "required"];
|
|
212
|
-
const _hoisted_4 = { key: 0 };
|
|
213
|
-
const _hoisted_5 = {
|
|
214
|
-
key: 1,
|
|
215
|
-
class: "m-input-wrapper-right"
|
|
216
|
-
};
|
|
217
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
218
|
-
const _component_MazIcon = resolveComponent("MazIcon");
|
|
219
|
-
const _component_EyeOffIcon = resolveComponent("EyeOffIcon");
|
|
220
|
-
const _component_EyeIcon = resolveComponent("EyeIcon");
|
|
221
|
-
const _component_MazBtn = resolveComponent("MazBtn");
|
|
222
|
-
const _component_CheckIcon = resolveComponent("CheckIcon");
|
|
223
|
-
return openBlock(), createElementBlock(
|
|
224
|
-
"div",
|
|
225
|
-
{
|
|
226
|
-
class: normalizeClass(["m-input", [
|
|
227
|
-
{
|
|
228
|
-
"--is-focused": _ctx.isFocused || _ctx.borderActive,
|
|
229
|
-
"--should-up": _ctx.shouldUp,
|
|
230
|
-
"--has-label": _ctx.hasLabel,
|
|
231
|
-
"--is-disabled": _ctx.disabled,
|
|
232
|
-
"--is-readonly": _ctx.readonly,
|
|
233
|
-
"--has-z-2": _ctx.error || _ctx.warning || _ctx.success,
|
|
234
|
-
"--has-state": _ctx.error || _ctx.warning || _ctx.success
|
|
235
|
-
},
|
|
236
|
-
_ctx.$attrs.class,
|
|
237
|
-
`--${_ctx.color}`,
|
|
238
|
-
`--${_ctx.size}`
|
|
239
|
-
]])
|
|
240
|
-
},
|
|
241
|
-
[
|
|
242
|
-
createElementVNode(
|
|
243
|
-
"div",
|
|
244
|
-
{
|
|
245
|
-
class: normalizeClass(["m-input-wrapper", [_ctx.inputClasses, _ctx.borderStyle, { "maz-rounded": !_ctx.noRadius }]])
|
|
246
|
-
},
|
|
247
|
-
[
|
|
248
|
-
_ctx.hasLeftPart() ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
249
|
-
_ctx.$slots["left-icon"] || _ctx.leftIcon ? renderSlot(_ctx.$slots, "left-icon", { key: 0 }, () => [
|
|
250
|
-
createVNode(_component_MazIcon, {
|
|
251
|
-
name: _ctx.leftIcon,
|
|
252
|
-
class: "maz-text-xl maz-text-muted"
|
|
253
|
-
}, null, 8, ["name"])
|
|
254
|
-
], true) : createCommentVNode("v-if", true)
|
|
255
|
-
])) : createCommentVNode("v-if", true),
|
|
256
|
-
createElementVNode("div", _hoisted_2$1, [
|
|
257
|
-
withDirectives(createElementVNode("input", mergeProps({
|
|
258
|
-
id: _ctx.instanceId,
|
|
259
|
-
ref: "input",
|
|
260
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.inputValue = $event),
|
|
261
|
-
type: _ctx.inputType,
|
|
262
|
-
name: _ctx.name
|
|
263
|
-
}, _ctx.$attrs, {
|
|
264
|
-
placeholder: _ctx.computedPlaceholder,
|
|
265
|
-
"aria-label": _ctx.label || _ctx.placeholder,
|
|
266
|
-
disabled: _ctx.disabled,
|
|
267
|
-
readonly: _ctx.readonly,
|
|
268
|
-
required: _ctx.required,
|
|
269
|
-
class: "m-input-input"
|
|
270
|
-
}, toHandlers({
|
|
271
|
-
blur: _ctx.blur,
|
|
272
|
-
focus: _ctx.focus,
|
|
273
|
-
change: _ctx.change
|
|
274
|
-
}, true), {
|
|
275
|
-
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("click", $event))
|
|
276
|
-
}), null, 16, _hoisted_3$1), [
|
|
277
|
-
[vModelDynamic, _ctx.inputValue]
|
|
278
|
-
]),
|
|
279
|
-
_ctx.label || _ctx.hint ? (openBlock(), createElementBlock(
|
|
280
|
-
"span",
|
|
281
|
-
{
|
|
282
|
-
key: 0,
|
|
283
|
-
ref: "label",
|
|
284
|
-
class: normalizeClass(["m-input-label", [
|
|
285
|
-
{
|
|
286
|
-
"maz-text-danger-600": _ctx.error,
|
|
287
|
-
"maz-text-success-600": _ctx.success,
|
|
288
|
-
"maz-text-warning-600": _ctx.warning
|
|
289
|
-
}
|
|
290
|
-
]])
|
|
291
|
-
},
|
|
292
|
-
[
|
|
293
|
-
createTextVNode(
|
|
294
|
-
toDisplayString(_ctx.hint || _ctx.label) + " ",
|
|
295
|
-
1
|
|
296
|
-
/* TEXT */
|
|
297
|
-
),
|
|
298
|
-
_ctx.required ? (openBlock(), createElementBlock("sup", _hoisted_4, "*")) : createCommentVNode("v-if", true)
|
|
299
|
-
],
|
|
300
|
-
2
|
|
301
|
-
/* CLASS */
|
|
302
|
-
)) : createCommentVNode("v-if", true)
|
|
303
|
-
]),
|
|
304
|
-
_ctx.hasRightPart() ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
305
|
-
_ctx.$slots["right-icon"] || _ctx.rightIcon ? renderSlot(_ctx.$slots, "right-icon", { key: 0 }, () => [
|
|
306
|
-
createVNode(_component_MazIcon, {
|
|
307
|
-
name: _ctx.rightIcon,
|
|
308
|
-
class: "maz-text-xl maz-text-muted"
|
|
309
|
-
}, null, 8, ["name"])
|
|
310
|
-
], true) : createCommentVNode("v-if", true),
|
|
311
|
-
_ctx.isPasswordType ? (openBlock(), createBlock(_component_MazBtn, {
|
|
312
|
-
key: 1,
|
|
313
|
-
color: "transparent",
|
|
314
|
-
tabindex: "-1",
|
|
315
|
-
size: "mini",
|
|
316
|
-
onClick: _cache[2] || (_cache[2] = withModifiers(($event) => _ctx.hasPasswordVisible = !_ctx.hasPasswordVisible, ["stop"]))
|
|
317
|
-
}, {
|
|
318
|
-
default: withCtx(() => [
|
|
319
|
-
_ctx.hasPasswordVisible ? (openBlock(), createBlock(_component_EyeOffIcon, {
|
|
320
|
-
key: 0,
|
|
321
|
-
class: "maz-text-xl maz-text-muted"
|
|
322
|
-
})) : (openBlock(), createBlock(_component_EyeIcon, {
|
|
323
|
-
key: 1,
|
|
324
|
-
class: "maz-text-xl maz-text-muted"
|
|
325
|
-
}))
|
|
326
|
-
]),
|
|
327
|
-
_: 1
|
|
328
|
-
/* STABLE */
|
|
329
|
-
})) : createCommentVNode("v-if", true),
|
|
330
|
-
_ctx.$slots["valid-button"] || _ctx.validButton ? renderSlot(_ctx.$slots, "valid-button", { key: 2 }, () => [
|
|
331
|
-
createVNode(_component_MazBtn, {
|
|
332
|
-
color: "transparent",
|
|
333
|
-
disabled: _ctx.disabled,
|
|
334
|
-
tabindex: "-1",
|
|
335
|
-
loading: _ctx.validButtonLoading,
|
|
336
|
-
class: "m-input-valid-button",
|
|
337
|
-
size: "mini",
|
|
338
|
-
type: "submit"
|
|
339
|
-
}, {
|
|
340
|
-
default: withCtx(() => [
|
|
341
|
-
createVNode(_component_CheckIcon, { class: "maz-text-2xl maz-text-normal" })
|
|
342
|
-
]),
|
|
343
|
-
_: 1
|
|
344
|
-
/* STABLE */
|
|
345
|
-
}, 8, ["disabled", "loading"])
|
|
346
|
-
], true) : createCommentVNode("v-if", true)
|
|
347
|
-
])) : createCommentVNode("v-if", true)
|
|
348
|
-
],
|
|
349
|
-
2
|
|
350
|
-
/* CLASS */
|
|
351
|
-
)
|
|
352
|
-
],
|
|
353
|
-
2
|
|
354
|
-
/* CLASS */
|
|
355
|
-
);
|
|
356
|
-
}
|
|
357
|
-
const MazInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-18b53f70"]]);
|
|
337
|
+
const MazInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-32fa5093"]]);
|
|
358
338
|
const _hoisted_1 = {
|
|
359
339
|
xmlns: "http://www.w3.org/2000/svg",
|
|
360
340
|
width: "1em",
|
|
@@ -413,7 +393,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
413
393
|
},
|
|
414
394
|
emits: ["update:model-value"],
|
|
415
395
|
setup(__props, { emit: __emit }) {
|
|
416
|
-
const
|
|
396
|
+
const MazBtn = defineAsyncComponent(() => import("./MazBtn-b42e3575.mjs"));
|
|
417
397
|
const props = __props;
|
|
418
398
|
const isFocused = ref(false);
|
|
419
399
|
const inputValue = ref();
|
|
@@ -451,7 +431,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
451
431
|
if (props.color === "white")
|
|
452
432
|
return "maz-border-white";
|
|
453
433
|
}
|
|
454
|
-
return "maz-border-
|
|
434
|
+
return "maz-border-gray-200";
|
|
455
435
|
});
|
|
456
436
|
const removeLastTag = () => {
|
|
457
437
|
if (!inputValue.value || inputValue.value === "") {
|
|
@@ -483,7 +463,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
483
463
|
return openBlock(), createElementBlock("div", {
|
|
484
464
|
key: `tag-${i}`
|
|
485
465
|
}, [
|
|
486
|
-
createVNode(unref(
|
|
466
|
+
createVNode(unref(MazBtn), {
|
|
487
467
|
class: "m-input-tags__tag",
|
|
488
468
|
disabled: __props.disabled,
|
|
489
469
|
size: __props.size,
|
|
@@ -538,8 +518,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
538
518
|
};
|
|
539
519
|
}
|
|
540
520
|
});
|
|
541
|
-
const
|
|
542
|
-
const MazInputTags = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
521
|
+
const MazInputTags_vue_vue_type_style_index_0_scoped_82c91368_lang = "";
|
|
522
|
+
const MazInputTags = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-82c91368"]]);
|
|
543
523
|
export {
|
|
544
524
|
MazInputTags as M,
|
|
545
525
|
_export_sfc as _
|