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.
Files changed (56) hide show
  1. package/components/MazInput.d.ts +38 -22
  2. package/components/MazInput.mjs +1 -2
  3. package/components/MazInputNumber.mjs +1 -1
  4. package/components/MazInputPrice.mjs +1 -1
  5. package/components/MazInputTags.mjs +1 -1
  6. package/components/MazPhoneNumberInput.d.ts +41 -1
  7. package/components/MazPhoneNumberInput.mjs +1 -1
  8. package/components/MazPicker.mjs +1 -1
  9. package/components/MazSelect.d.ts +33 -1
  10. package/components/MazSelect.mjs +1 -1
  11. package/components/MazTextarea.d.ts +17 -17
  12. package/components/MazTextarea.mjs +7 -8
  13. package/components/assets/MazInput.css +1 -1
  14. package/components/assets/MazInputPrice.css +1 -1
  15. package/components/assets/MazInputTags.css +1 -1
  16. package/components/assets/MazPhoneNumberInput.css +1 -1
  17. package/components/assets/MazSelect.css +1 -1
  18. package/components/assets/MazTextarea.css +1 -1
  19. package/components/chunks/{MazBtn-001d4174.mjs → MazBtn-0e02f0da.mjs} +2 -2
  20. package/components/chunks/{MazBtn-a3a285eb.mjs → MazBtn-2f4fa942.mjs} +2 -2
  21. package/components/chunks/{MazBtn-97d9e521.mjs → MazBtn-30723941.mjs} +2 -2
  22. package/components/chunks/{MazBtn-080c9397.mjs → MazBtn-4e1e116e.mjs} +2 -2
  23. package/components/chunks/{MazBtn-7f413085.mjs → MazBtn-b42e3575.mjs} +2 -2
  24. package/components/chunks/{MazBtn-29a43072.mjs → MazBtn-f48da79c.mjs} +2 -2
  25. package/components/chunks/{MazCheckbox-0595c207.mjs → MazCheckbox-9fa9179a.mjs} +1 -1
  26. package/components/chunks/{MazCheckbox-90f20e7f.mjs → MazCheckbox-e0bbe6ec.mjs} +1 -1
  27. package/components/chunks/MazInput-713b00d0.mjs +326 -0
  28. package/components/chunks/MazInput-b9386887.mjs +341 -0
  29. package/components/chunks/MazInput-c33627dd.mjs +334 -0
  30. package/components/chunks/{MazInputPrice-eb36a7dd.mjs → MazInputPrice-452297f5.mjs} +171 -191
  31. package/components/chunks/{MazInputTags-24164d56.mjs → MazInputTags-7a463b81.mjs} +176 -196
  32. package/components/chunks/{MazPhoneNumberInput-4cec4ade.mjs → MazPhoneNumberInput-31bc05f9.mjs} +241 -226
  33. package/components/chunks/{MazPicker-9f4c724c.mjs → MazPicker-50fc11d1.mjs} +4 -4
  34. package/components/chunks/{MazPickerCalendar-35fe36ab.mjs → MazPickerCalendar-cacb361c.mjs} +5 -5
  35. package/components/chunks/{MazPickerHeader-d8687abf.mjs → MazPickerHeader-63d45179.mjs} +1 -1
  36. package/components/chunks/{MazPickerMonthSwitcher-739ed62a.mjs → MazPickerMonthSwitcher-913c6e2c.mjs} +2 -2
  37. package/components/chunks/{MazPickerShortcuts-68622fe8.mjs → MazPickerShortcuts-c6fabfc6.mjs} +2 -2
  38. package/components/chunks/{MazPickerTime-031062b2.mjs → MazPickerTime-5e4475da.mjs} +2 -2
  39. package/components/chunks/{MazPickerYearSwitcher-2a006a30.mjs → MazPickerYearSwitcher-dd4fa89c.mjs} +3 -3
  40. package/components/chunks/{MazSelect-757bffd7.mjs → MazSelect-2e5cd411.mjs} +199 -206
  41. package/components/chunks/{MazSpinner-d356ad25.mjs → MazSpinner-100c99b8.mjs} +1 -1
  42. package/components/chunks/{MazSpinner-7bd9b831.mjs → MazSpinner-191ad23b.mjs} +1 -1
  43. package/components/chunks/{MazSpinner-89743727.mjs → MazSpinner-339a9006.mjs} +1 -1
  44. package/components/chunks/{MazSpinner-85c86950.mjs → MazSpinner-8859d658.mjs} +1 -1
  45. package/components/chunks/{MazSpinner-d669a3af.mjs → MazSpinner-cb6f99f3.mjs} +1 -1
  46. package/components/chunks/{MazSpinner-ac429216.mjs → MazSpinner-db6fc59d.mjs} +1 -1
  47. package/css/main.css +1 -1
  48. package/nuxt/index.json +1 -1
  49. package/package.json +1 -1
  50. package/types/components/MazInput.vue.d.ts +38 -22
  51. package/types/components/MazPhoneNumberInput.vue.d.ts +41 -1
  52. package/types/components/MazSelect.vue.d.ts +33 -1
  53. package/types/components/MazTextarea.vue.d.ts +17 -17
  54. package/components/chunks/MazInput-12a098d4.mjs +0 -361
  55. package/components/chunks/MazInput-20ea773f.mjs +0 -354
  56. package/components/chunks/MazInput-4313d3cc.mjs +0 -346
@@ -690,9 +690,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
690
690
  },
691
691
  emits: ["update:model-value", "update:calendar-date", "close"],
692
692
  setup(__props, { emit: __emit }) {
693
- const MazPickerTime = defineAsyncComponent(() => import("./MazPickerTime-031062b2.mjs"));
694
- const MazPickerHeader = defineAsyncComponent(() => import("./MazPickerHeader-d8687abf.mjs"));
695
- const MazPickerCalendar = defineAsyncComponent(() => import("./MazPickerCalendar-35fe36ab.mjs").then((n) => n.M));
693
+ const MazPickerTime = defineAsyncComponent(() => import("./MazPickerTime-5e4475da.mjs"));
694
+ const MazPickerHeader = defineAsyncComponent(() => import("./MazPickerHeader-63d45179.mjs"));
695
+ const MazPickerCalendar = defineAsyncComponent(() => import("./MazPickerCalendar-cacb361c.mjs").then((n) => n.M));
696
696
  const props = __props;
697
697
  const emits = __emit;
698
698
  const currentDate = computed({
@@ -938,7 +938,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
938
938
  emits: ["update:model-value", "close"],
939
939
  setup(__props, { emit: __emit }) {
940
940
  const ChevronDownIcon = defineAsyncComponent(() => import("./chevron-down-a78b9604.mjs"));
941
- const MazInput = defineAsyncComponent(() => import("./MazInput-4313d3cc.mjs"));
941
+ const MazInput = defineAsyncComponent(() => import("./MazInput-713b00d0.mjs"));
942
942
  dayjs.extend(customParseFormat);
943
943
  dayjs.extend(isBetween);
944
944
  const defaultInputDateStyle = {
@@ -1,7 +1,7 @@
1
1
  import "../assets/MazPickerCalendar.css";
2
2
  import { openBlock, createElementBlock, createElementVNode, defineComponent, computed, createVNode, withCtx, unref, createTextVNode, toDisplayString, useCssVars, ref, watch, TransitionGroup, Fragment, renderList, normalizeClass, createBlock, defineAsyncComponent, createCommentVNode, Transition } from "vue";
3
- import { d as dayjs, c as capitalize, a as date, _ as _export_sfc, g as getDaysInMonth, b as getFirstDayOfMonth, i as isSameDate, e as isToday, h as isSameDay, j as getDaysOfWeek } from "./MazPicker-9f4c724c.mjs";
4
- import MazBtn from "./MazBtn-a3a285eb.mjs";
3
+ import { d as dayjs, c as capitalize, a as date, _ as _export_sfc, g as getDaysInMonth, b as getFirstDayOfMonth, i as isSameDate, e as isToday, h as isSameDay, j as getDaysOfWeek } from "./MazPicker-50fc11d1.mjs";
4
+ import MazBtn from "./MazBtn-0e02f0da.mjs";
5
5
  import { d as debounce } from "./debounce-7d66ffa9.mjs";
6
6
  const _hoisted_1$3 = {
7
7
  xmlns: "http://www.w3.org/2000/svg",
@@ -568,9 +568,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
568
568
  },
569
569
  emits: ["update:model-value", "update:calendar-date"],
570
570
  setup(__props, { emit: __emit }) {
571
- const MazPickerMonthSwitcher = defineAsyncComponent(() => import("./MazPickerMonthSwitcher-739ed62a.mjs"));
572
- const MazPickerYearSwitcher = defineAsyncComponent(() => import("./MazPickerYearSwitcher-2a006a30.mjs"));
573
- const MazPickerShortcuts = defineAsyncComponent(() => import("./MazPickerShortcuts-68622fe8.mjs"));
571
+ const MazPickerMonthSwitcher = defineAsyncComponent(() => import("./MazPickerMonthSwitcher-913c6e2c.mjs"));
572
+ const MazPickerYearSwitcher = defineAsyncComponent(() => import("./MazPickerYearSwitcher-dd4fa89c.mjs"));
573
+ const MazPickerShortcuts = defineAsyncComponent(() => import("./MazPickerShortcuts-c6fabfc6.mjs"));
574
574
  const props = __props;
575
575
  const emits = __emit;
576
576
  const hoverredDay = ref();
@@ -1,6 +1,6 @@
1
1
  import "../assets/MazPickerHeader.css";
2
2
  import { defineComponent, computed, ref, watch, openBlock, createElementBlock, normalizeClass, createVNode, TransitionGroup, withCtx, Fragment, renderList, toDisplayString, createCommentVNode } from "vue";
3
- import { a as date, c as capitalize, d as dayjs, _ as _export_sfc } from "./MazPicker-9f4c724c.mjs";
3
+ import { a as date, c as capitalize, d as dayjs, _ as _export_sfc } from "./MazPicker-50fc11d1.mjs";
4
4
  const _hoisted_1 = {
5
5
  key: 0,
6
6
  class: "m-picker-header__date"
@@ -1,7 +1,7 @@
1
1
  import "../assets/MazPickerMonthSwitcher.css";
2
2
  import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, createVNode, withModifiers, withCtx, unref, normalizeClass, Fragment, renderList, createBlock, createTextVNode, toDisplayString } from "vue";
3
- import { d as dayjs, c as capitalize, a as date, i as isSameDate, _ as _export_sfc } from "./MazPicker-9f4c724c.mjs";
4
- import MazBtn from "./MazBtn-a3a285eb.mjs";
3
+ import { d as dayjs, c as capitalize, a as date, i as isSameDate, _ as _export_sfc } from "./MazPicker-50fc11d1.mjs";
4
+ import MazBtn from "./MazBtn-0e02f0da.mjs";
5
5
  import { X as XIcon } from "./x-mark-3b05101b.mjs";
6
6
  const _hoisted_1 = { class: "maz-picker-month-switcher" };
7
7
  const _hoisted_2 = { class: "maz-picker-month-switcher__header" };
@@ -1,7 +1,7 @@
1
1
  import "../assets/MazPickerShortcuts.css";
2
2
  import { defineComponent, ref, watch, openBlock, createElementBlock, Fragment, renderList, createBlock, normalizeClass, withModifiers, withCtx, createTextVNode, toDisplayString } from "vue";
3
- import MazBtn from "./MazBtn-a3a285eb.mjs";
4
- import { _ as _export_sfc } from "./MazPicker-9f4c724c.mjs";
3
+ import MazBtn from "./MazBtn-0e02f0da.mjs";
4
+ import { _ as _export_sfc } from "./MazPicker-50fc11d1.mjs";
5
5
  const _hoisted_1 = { class: "maz-picker-shortcuts" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "MazPickerShortcuts",
@@ -1,7 +1,7 @@
1
1
  import "../assets/MazPickerTime.css";
2
2
  import { defineComponent, ref, computed, watch, nextTick, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createElementVNode, normalizeStyle, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString } from "vue";
3
- import { d as dayjs, f as findNearestNumberInList, s as scrollToTarget, _ as _export_sfc } from "./MazPicker-9f4c724c.mjs";
4
- import MazBtn from "./MazBtn-a3a285eb.mjs";
3
+ import { d as dayjs, f as findNearestNumberInList, s as scrollToTarget, _ as _export_sfc } from "./MazPicker-50fc11d1.mjs";
4
+ import MazBtn from "./MazBtn-0e02f0da.mjs";
5
5
  const _hoisted_1 = { class: "m-picker-time__column__items" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "MazPickerTime",
@@ -1,9 +1,9 @@
1
1
  import "../assets/MazPickerYearSwitcher.css";
2
2
  import { defineComponent, ref, computed, openBlock, createElementBlock, createElementVNode, createVNode, withModifiers, withCtx, unref, Fragment, renderList, createBlock, normalizeClass, createTextVNode, toDisplayString } from "vue";
3
- import { d as dayjs, a as date, i as isSameDate, _ as _export_sfc } from "./MazPicker-9f4c724c.mjs";
4
- import MazBtn from "./MazBtn-a3a285eb.mjs";
3
+ import { d as dayjs, a as date, i as isSameDate, _ as _export_sfc } from "./MazPicker-50fc11d1.mjs";
4
+ import MazBtn from "./MazBtn-0e02f0da.mjs";
5
5
  import { X as XIcon } from "./x-mark-3b05101b.mjs";
6
- import { C as ChevronLeftIcon } from "./MazPickerCalendar-35fe36ab.mjs";
6
+ import { C as ChevronLeftIcon } from "./MazPickerCalendar-cacb361c.mjs";
7
7
  const _hoisted_1 = { class: "maz-picker-year-switcher" };
8
8
  const _hoisted_2 = { class: "maz-picker-year-switcher__header" };
9
9
  const _hoisted_3 = { class: "maz-flex maz-space-x-2" };
@@ -1,5 +1,5 @@
1
1
  import "../assets/MazSelect.css";
2
- import { computed, defineAsyncComponent, defineComponent, ref, getCurrentInstance, onMounted, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, createCommentVNode, withDirectives, mergeProps, toHandlers, vModelDynamic, createTextVNode, toDisplayString, createBlock, withModifiers, withCtx, useCssVars, onBeforeMount, watch, unref, Transition, normalizeStyle, Fragment, renderList, nextTick } from "vue";
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, useCssVars, onBeforeMount, watch, Transition, Fragment, renderList, nextTick } from "vue";
3
3
  function debounce(fn, delay) {
4
4
  let timeout2;
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 MazBtn = defineAsyncComponent(() => import("./MazBtn-001d4174.mjs"));
20
- const MazIcon = defineAsyncComponent(() => import("./MazIcon-bda198b4.mjs"));
21
- const EyeOffIcon = defineAsyncComponent(() => import("./eye-slash-342420ff.mjs"));
22
- const EyeIcon = defineAsyncComponent(() => import("./eye-fbb13657.mjs"));
23
- const CheckIcon = defineAsyncComponent(() => import("./check-8da249b1.mjs"));
24
- const _sfc_main$1 = defineComponent({
25
- components: {
26
- MazBtn,
27
- MazIcon,
28
- CheckIcon,
29
- EyeIcon,
30
- EyeOffIcon
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$1 = { key: 0 };
26
+ const _hoisted_5$1 = {
27
+ key: 1,
28
+ class: "m-input-wrapper-right"
29
+ };
30
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
31
+ ...{
32
+ inheritAttrs: false
31
33
  },
32
- inheritAttrs: false,
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(props, { emit, slots }) {
96
+ setup(__props, { emit: __emit }) {
97
+ const MazBtn = defineAsyncComponent(() => import("./MazBtn-2f4fa942.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-8da249b1.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
- emit("focus", event);
174
+ emits("focus", event);
162
175
  isFocused.value = true;
163
176
  };
164
177
  const blur = (event) => {
165
- emit("blur", event);
178
+ emits("blur", event);
166
179
  isFocused.value = false;
167
180
  };
168
- const change = (event) => emit("change", event);
181
+ const change = (event) => emits("change", event);
169
182
  const debounceEmitValue = debounce((value) => {
170
- emit("update:model-value", value);
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
- emit("update:model-value", value);
188
+ emits("update:model-value", value);
176
189
  };
177
- return {
178
- inputValue,
179
- shouldUp,
180
- hasLabel,
181
- computedPlaceholder,
182
- isPasswordType,
183
- inputType,
184
- input,
185
- isFocused,
186
- hasPasswordVisible,
187
- borderStyle,
188
- focus,
189
- blur,
190
- change,
191
- emitValue,
192
- hasRightPart,
193
- hasLeftPart,
194
- instanceId
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$1, "*")) : createCommentVNode("v-if", true)
269
+ ],
270
+ 2
271
+ /* CLASS */
272
+ )) : createCommentVNode("v-if", true)
273
+ ]),
274
+ hasRightPart() ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
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 MazInput_vue_vue_type_style_index_0_scoped_18b53f70_lang = "";
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 _hoisted_1$1 = {
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$1 = { key: 0 };
213
- const _hoisted_5$1 = {
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$1, "*")) : createCommentVNode("v-if", true)
299
- ],
300
- 2
301
- /* CLASS */
302
- )) : createCommentVNode("v-if", true)
303
- ]),
304
- _ctx.hasRightPart() ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
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
  ref("system");
359
339
  ref("system");
360
340
  ref();
@@ -380,8 +360,13 @@ const _hoisted_4 = {
380
360
  };
381
361
  const _hoisted_5 = ["onClick"];
382
362
  const _sfc_main = /* @__PURE__ */ defineComponent({
363
+ ...{
364
+ inheritAttrs: false
365
+ },
383
366
  __name: "MazSelect",
384
367
  props: {
368
+ style: { type: [String, Array, Object], default: void 0 },
369
+ class: { type: String, default: void 0 },
385
370
  modelValue: {
386
371
  type: [Number, String, Boolean, Array],
387
372
  default: void 0
@@ -403,13 +388,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
403
388
  required: { type: Boolean, default: false },
404
389
  disabled: { type: Boolean, default: false },
405
390
  open: { type: Boolean, default: false },
391
+ /** Choose color of the input */
406
392
  color: {
407
393
  type: String,
408
394
  default: "primary"
409
395
  },
396
+ /** Choose the option list item height */
410
397
  itemHeight: { type: Number, default: 40 },
411
398
  maxListHeight: { type: Number, default: 240 },
399
+ /** Add max-width value to option list */
412
400
  maxListWidth: { type: Number, default: void 0 },
401
+ /** Choose size of the input */
413
402
  size: {
414
403
  type: String,
415
404
  default: "md",
@@ -417,8 +406,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
417
406
  return ["mini", "xs", "sm", "md", "lg", "xl"].includes(value);
418
407
  }
419
408
  },
409
+ /** Display search input in option list */
420
410
  search: { type: Boolean, default: false },
411
+ /** Search input placeholder */
421
412
  searchPlaceholder: { type: String, default: "Search in options" },
413
+ /** Enable feature to select multiple values */
422
414
  multiple: { type: Boolean, default: false }
423
415
  },
424
416
  emits: [
@@ -433,11 +425,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
433
425
  ],
434
426
  setup(__props, { emit: __emit }) {
435
427
  useCssVars((_ctx) => ({
436
- "6af9d50f": keyboardSelectedBgColor.value,
437
- "c012bde4": selectedTextColor.value,
438
- "46d74214": selectedBgColor.value
428
+ "0804a86d": keyboardSelectedBgColor.value,
429
+ "4502d2ec": selectedTextColor.value,
430
+ "381f7054": selectedBgColor.value
439
431
  }));
440
- const MazCheckbox = defineAsyncComponent(() => import("./MazCheckbox-90f20e7f.mjs"));
432
+ const MazCheckbox = defineAsyncComponent(() => import("./MazCheckbox-e0bbe6ec.mjs"));
441
433
  const SearchIcon = defineAsyncComponent(() => import("./magnifying-glass-5dffa35e.mjs"));
442
434
  const ChevronDownIcon = defineAsyncComponent(() => import("./chevron-down-a78b9604.mjs"));
443
435
  const NoSymbolIcon = defineAsyncComponent(() => import("./no-symbol-975ce547.mjs"));
@@ -499,11 +491,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
499
491
  return props.modelValue.map(
500
492
  (value) => {
501
493
  var _a2, _b2;
502
- return (_b2 = (_a2 = optionsList.value) == null ? void 0 : _a2.find((option) => option[props.optionValueKey] === value)) == null ? void 0 : _b2[props.optionInputValueKey];
494
+ return (_b2 = (_a2 = props.options) == null ? void 0 : _a2.find((option) => option[props.optionValueKey] === value)) == null ? void 0 : _b2[props.optionInputValueKey];
503
495
  }
504
496
  ).join(", ");
505
497
  }
506
- return (_b = (_a = optionsList.value) == null ? void 0 : _a.find((option) => option[props.optionValueKey] === props.modelValue)) == null ? void 0 : _b[props.optionInputValueKey];
498
+ return (_b = (_a = props.options) == null ? void 0 : _a.find((option) => option[props.optionValueKey] === props.modelValue)) == null ? void 0 : _b[props.optionInputValueKey];
507
499
  });
508
500
  const listTransition = computed(
509
501
  () => props.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
@@ -553,16 +545,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
553
545
  emits("open", listOpened.value);
554
546
  };
555
547
  function focusMainInput() {
556
- var _a;
557
- (_a = mazInputComponent.value) == null ? void 0 : _a.input.focus();
548
+ var _a, _b;
549
+ (_b = ((_a = mazInputComponent.value) == null ? void 0 : _a.$el).querySelector("input")) == null ? void 0 : _b.focus();
558
550
  }
559
551
  function toggleList(event) {
560
552
  listOpened.value ? closeList(event) : focusMainInput();
561
553
  }
562
554
  function focusSearchInputAndSetQuery(q) {
563
- var _a;
555
+ var _a, _b;
564
556
  searchQuery.value = q;
565
- (_a = searchInputComponent.value) == null ? void 0 : _a.input.focus();
557
+ (_b = ((_a = searchInputComponent.value) == null ? void 0 : _a.$el).querySelector("input")) == null ? void 0 : _b.focus();
566
558
  }
567
559
  function searchOptionWithQuery(keyPressed) {
568
560
  var _a;
@@ -703,7 +695,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
703
695
  {
704
696
  ref_key: "mazSelectElement",
705
697
  ref: mazSelectElement,
706
- class: normalizeClass(["m-select", { "--is-open": hasListOpened.value, "--disabled": __props.disabled }]),
698
+ class: normalizeClass(["m-select", [{ "--is-open": hasListOpened.value, "--disabled": __props.disabled }, props.class]]),
699
+ style: normalizeStyle(__props.style),
707
700
  onBlurCapture: closeList
708
701
  },
709
702
  [
@@ -842,14 +835,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
842
835
  /* FORWARDED */
843
836
  }, 8, ["name"])
844
837
  ],
845
- 34
846
- /* CLASS, HYDRATE_EVENTS */
838
+ 38
839
+ /* CLASS, STYLE, HYDRATE_EVENTS */
847
840
  );
848
841
  };
849
842
  }
850
843
  });
851
- const MazSelect_vue_vue_type_style_index_0_scoped_4ee0f4f3_lang = "";
852
- const MazSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4ee0f4f3"]]);
844
+ const MazSelect_vue_vue_type_style_index_0_scoped_c313b4a6_lang = "";
845
+ const MazSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c313b4a6"]]);
853
846
  export {
854
847
  MazSelect as M,
855
848
  _export_sfc as _,
@@ -1,6 +1,6 @@
1
1
  import "../assets/MazSpinner.css";
2
2
  import { defineComponent, openBlock, createElementBlock, normalizeClass, pushScopeId, popScopeId, createElementVNode } from "vue";
3
- import { _ as _export_sfc } from "./MazInput-12a098d4.mjs";
3
+ import { _ as _export_sfc } from "./MazInput-b9386887.mjs";
4
4
  const _withScopeId = (n) => (pushScopeId("data-v-c67298ec"), n = n(), popScopeId(), n);
5
5
  const _hoisted_1 = ["width", "height"];
6
6
  const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(