maz-ui 3.27.4 → 3.28.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 (31) hide show
  1. package/components/MazAccordion.mjs +1 -1
  2. package/components/MazAvatar.mjs +1 -1
  3. package/components/MazInputNumber.d.ts +3 -2
  4. package/components/MazInputNumber.mjs +2 -98
  5. package/components/MazLazyImg.mjs +1 -1
  6. package/components/MazTabsBar.mjs +23 -23
  7. package/components/assets/MazAccordion.css +1 -1
  8. package/components/assets/MazAvatar.css +1 -1
  9. package/components/assets/MazInputNumber.css +1 -1
  10. package/components/assets/MazLazyImg.css +1 -1
  11. package/components/assets/MazTabsBar.css +1 -1
  12. package/components/chunks/{MazAccordion-posaK9nP.mjs → MazAccordion-pZkwkqAr.mjs} +39 -38
  13. package/components/chunks/{MazAvatar-R8NMQtnF.mjs → MazAvatar-HJMP2asX.mjs} +2 -2
  14. package/components/chunks/MazInputNumber-OAPwOzCG.mjs +596 -0
  15. package/components/chunks/{MazLazyImg-2j5YjrWS.mjs → MazLazyImg-440YmAhx.mjs} +2 -2
  16. package/components/chunks/{MazLazyImg-ZOc12h_Y.mjs → MazLazyImg-65QIsZ1B.mjs} +3 -3
  17. package/components/chunks/{MazSpinner-GCPS0yJL.mjs → MazSpinner-RwIjv6Xr.mjs} +1 -1
  18. package/components/chunks/{MazSpinner-aqN2yL-8.mjs → MazSpinner-W3TVtT8l.mjs} +1 -1
  19. package/components/chunks/{MazSpinner-nDXJSe-h.mjs → MazSpinner-sGO8fGeU.mjs} +1 -1
  20. package/components/chunks/{MazSpinner-NtRhZv9o.mjs → MazSpinner-yYMg5h03.mjs} +1 -1
  21. package/css/main.css +1 -1
  22. package/nuxt/index.json +1 -1
  23. package/package.json +1 -1
  24. package/tailwindcss/variables/utilities.ts +3 -0
  25. package/types/components/MazInputNumber.vue.d.ts +3 -2
  26. package/types/tailwindcss/variables/utilities.d.ts +3 -0
  27. package/components/chunks/MazBtn-tjMMZdlj.mjs +0 -152
  28. package/components/chunks/MazInput-h4Rs2XYn.mjs +0 -283
  29. package/components/chunks/_plugin-vue_export-helper-hUChTQA_.mjs +0 -9
  30. package/components/chunks/minus-thGpw2GG.mjs +0 -30
  31. package/components/chunks/plus-02mftP8S.mjs +0 -30
@@ -1,4 +1,4 @@
1
- import { M as f } from "./chunks/MazAccordion-posaK9nP.mjs";
1
+ import { M as f } from "./chunks/MazAccordion-pZkwkqAr.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { M as f } from "./chunks/MazAvatar-R8NMQtnF.mjs";
1
+ import { M as f } from "./chunks/MazAvatar-HJMP2asX.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{
12
12
  };
13
13
  modelValue: {
14
14
  type: NumberConstructor;
15
- required: true;
15
+ default: undefined;
16
16
  };
17
17
  disabled: {
18
18
  type: BooleanConstructor;
@@ -48,7 +48,7 @@ declare const _default: import("vue").DefineComponent<{
48
48
  };
49
49
  modelValue: {
50
50
  type: NumberConstructor;
51
- required: true;
51
+ default: undefined;
52
52
  };
53
53
  disabled: {
54
54
  type: BooleanConstructor;
@@ -81,5 +81,6 @@ declare const _default: import("vue").DefineComponent<{
81
81
  max: number;
82
82
  min: number;
83
83
  step: number;
84
+ modelValue: number;
84
85
  }, {}>;
85
86
  export default _default;
@@ -1,100 +1,4 @@
1
- import "./assets/MazInputNumber.css";
2
- import { defineComponent as C, defineAsyncComponent as u, computed as m, openBlock as M, createElementBlock as k, normalizeClass as w, normalizeStyle as A, createVNode as a, unref as l, withCtx as f, mergeProps as S, withKeys as y, withModifiers as v } from "vue";
3
- const T = /* @__PURE__ */ C({
4
- inheritAttrs: !1,
5
- __name: "MazInputNumber",
6
- props: {
7
- style: {
8
- type: [String, Array, Object],
9
- default: void 0
10
- },
11
- class: {
12
- type: [String, Array, Object],
13
- default: void 0
14
- },
15
- modelValue: { type: Number, required: !0 },
16
- disabled: { type: Boolean, default: !1 },
17
- max: { type: Number, default: Number.POSITIVE_INFINITY },
18
- min: { type: Number, default: Number.NEGATIVE_INFINITY },
19
- step: { type: Number, default: 1 },
20
- size: {
21
- type: String,
22
- default: "md",
23
- validator: (e) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(e)
24
- }
25
- },
26
- emits: ["update:model-value"],
27
- setup(e, { emit: z }) {
28
- const s = u(() => import("./chunks/MazBtn-tjMMZdlj.mjs")), I = u(() => import("./chunks/MazInput-h4Rs2XYn.mjs")), N = u(() => import("./chunks/plus-02mftP8S.mjs")), x = u(() => import("./chunks/minus-thGpw2GG.mjs")), t = e, V = z, i = m({
29
- get: () => t.modelValue,
30
- set: (n) => r(n)
31
- }), g = (n) => n <= t.min ? t.min : n >= t.max ? t.max : n, r = (n) => {
32
- n = g(n), i.value !== n && V("update:model-value", n);
33
- };
34
- r(i.value);
35
- const d = m(() => t.modelValue >= t.max), o = m(() => t.modelValue <= t.min), c = () => {
36
- t.disabled || d.value || (i.value = i.value + 1 * t.step);
37
- }, b = () => {
38
- t.disabled || o.value || (i.value = i.value - 1 * t.step);
39
- };
40
- return (n, p) => (M(), k(
41
- "div",
42
- {
43
- class: w(["m-input-number maz-align-center", [`m-input-number--${e.size}`, t.class]]),
44
- style: A(e.style)
45
- },
46
- [
47
- a(l(s), {
48
- color: "transparent",
49
- "no-shadow": "",
50
- size: e.size,
51
- class: "m-input-number__button m-input-number__decrement-button",
52
- disabled: o.value || e.disabled,
53
- onClick: b
54
- }, {
55
- default: f(() => [
56
- a(l(x), { class: "m-input-number__button__icon" })
57
- ]),
58
- _: 1
59
- /* STABLE */
60
- }, 8, ["size", "disabled"]),
61
- a(l(I), S({
62
- modelValue: i.value,
63
- "onUpdate:modelValue": p[0] || (p[0] = (h) => i.value = h),
64
- modelModifiers: { number: !0 },
65
- type: "number",
66
- class: "m-input-number__input maz-flex-1",
67
- disabled: e.disabled,
68
- min: e.min,
69
- max: e.max,
70
- step: e.step
71
- }, n.$attrs, {
72
- size: e.size,
73
- onKeydown: [
74
- y(v(c, ["prevent"]), ["up"]),
75
- y(v(b, ["prevent"]), ["down"])
76
- ]
77
- }), null, 16, ["modelValue", "disabled", "min", "max", "step", "size", "onKeydown"]),
78
- a(l(s), {
79
- color: "transparent",
80
- "no-shadow": "",
81
- size: e.size,
82
- class: "m-input-number__button m-input-number__increment-button",
83
- disabled: d.value || e.disabled,
84
- onClick: c
85
- }, {
86
- default: f(() => [
87
- a(l(N), { class: "m-input-number__button__icon" })
88
- ]),
89
- _: 1
90
- /* STABLE */
91
- }, 8, ["size", "disabled"])
92
- ],
93
- 6
94
- /* CLASS, STYLE */
95
- ));
96
- }
97
- });
1
+ import { a as f } from "./chunks/MazInputNumber-OAPwOzCG.mjs";
98
2
  export {
99
- T as default
3
+ f as default
100
4
  };
@@ -1,4 +1,4 @@
1
- import { M as f } from "./chunks/MazLazyImg-2j5YjrWS.mjs";
1
+ import { M as f } from "./chunks/MazLazyImg-440YmAhx.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import "./assets/MazTabsBar.css";
2
- import { inject as w, defineComponent as C, ref as m, computed as v, onBeforeMount as B, onMounted as M, openBlock as f, createElementBlock as d, normalizeClass as y, createElementVNode as S, normalizeStyle as _, Fragment as x, renderList as E, unref as g, toDisplayString as j } from "vue";
2
+ import { inject as w, defineComponent as C, ref as v, computed as b, onBeforeMount as B, onMounted as M, openBlock as f, createElementBlock as d, normalizeClass as y, createElementVNode as S, normalizeStyle as _, Fragment as x, renderList as E, unref as g, toDisplayString as j } from "vue";
3
3
  function A(t, s) {
4
4
  const n = w(t, s);
5
5
  if (!n)
@@ -18,35 +18,35 @@ const L = ["disabled", "href", "onClick"], V = /* @__PURE__ */ C({
18
18
  function s(e) {
19
19
  return e.replaceAll(/([a-z])([A-Z])/g, "$1-$2").replaceAll(/[\s_]+/g, "-").toLowerCase();
20
20
  }
21
- const n = (e, o) => {
21
+ const n = (e, a) => {
22
22
  if (typeof window > "u")
23
- return o;
24
- const c = window.location.hash.replace("#", ""), a = e.findIndex(({ label: l }) => s(l) === c);
25
- return a === -1 ? 1 : a + 1;
26
- }, { currentTab: r, updateCurrentTab: u } = A("maz-tabs"), p = t, z = m(), h = m([]);
23
+ return a;
24
+ const c = window.location.hash.replace("#", ""), o = e.findIndex(({ label: l }) => s(l) === c);
25
+ return o === -1 ? 1 : o + 1;
26
+ }, { currentTab: r, updateCurrentTab: u } = A("maz-tabs"), p = t, z = v(), h = v([]);
27
27
  function T({
28
28
  mazBtn: e,
29
- index: o
29
+ index: a
30
30
  }) {
31
- h.value[o] = e && "$el" in e ? e.$el : e;
31
+ h.value[a] = e && "$el" in e ? e.$el : e;
32
32
  }
33
- const i = v(
33
+ const i = b(
34
34
  () => p.items.map((e) => ({
35
35
  label: typeof e == "string" ? e : e.label,
36
36
  disabled: typeof e == "string" ? !1 : e.disabled ?? !1
37
37
  }))
38
- ), $ = v(() => {
38
+ ), $ = b(() => {
39
39
  if (typeof r.value != "number")
40
40
  return {};
41
- const e = h.value[r.value - 1], o = (e == null ? void 0 : e.offsetWidth) ?? 0, c = (e == null ? void 0 : e.offsetHeight) ?? 0;
41
+ const e = h.value[r.value - 1], a = (e == null ? void 0 : e.offsetWidth) ?? 0, c = (e == null ? void 0 : e.offsetHeight) ?? 0;
42
42
  return {
43
43
  transform: `translateX(${(e == null ? void 0 : e.offsetLeft) ?? 0}px)`,
44
- width: `${o}px`,
44
+ width: `${a}px`,
45
45
  height: `${c}px`
46
46
  };
47
47
  });
48
- function k(e, o) {
49
- return o ? {} : r.value === e ? "color: var(--maz-color-text)" : "color: var(--maz-color-muted)";
48
+ function k(e, a) {
49
+ return a ? {} : r.value === e ? "color: var(--maz-color-text)" : "color: var(--maz-color-muted)";
50
50
  }
51
51
  return B(() => {
52
52
  (r.value < 1 || r.value > i.value.length) && console.error(
@@ -54,7 +54,7 @@ const L = ["disabled", "href", "onClick"], V = /* @__PURE__ */ C({
54
54
  );
55
55
  }), M(async () => {
56
56
  p.useAnchor && u(n(i.value, r.value) ?? 1);
57
- }), (e, o) => (f(), d(
57
+ }), (e, a) => (f(), d(
58
58
  "div",
59
59
  {
60
60
  ref_key: "MazTabsBar",
@@ -77,15 +77,15 @@ const L = ["disabled", "href", "onClick"], V = /* @__PURE__ */ C({
77
77
  (f(!0), d(
78
78
  x,
79
79
  null,
80
- E(i.value, ({ label: c, disabled: a }, l) => (f(), d("button", {
80
+ E(i.value, ({ label: c, disabled: o }, l) => (f(), d("a", {
81
81
  key: l,
82
82
  ref_for: !0,
83
- ref: (b) => T({ mazBtn: b, index: l }),
84
- class: y([{ "--active": g(r) === l, "--disabled": a }, "m-tabs-bar__item"]),
85
- disabled: a,
86
- href: t.useAnchor && !a ? `#${s(c)}` : void 0,
87
- style: _(k(l + 1, a)),
88
- onClick: (b) => g(u)(l + 1)
83
+ ref: (m) => T({ mazBtn: m, index: l }),
84
+ class: y([{ "--active": g(r) === l, "--disabled": o }, "m-tabs-bar__item"]),
85
+ disabled: o,
86
+ href: t.useAnchor && !o ? `#${s(c)}` : void 0,
87
+ style: _(k(l + 1, o)),
88
+ onClick: (m) => o ? void 0 : g(u)(l + 1)
89
89
  }, j(c), 15, L))),
90
90
  128
91
91
  /* KEYED_FRAGMENT */
@@ -100,7 +100,7 @@ const L = ["disabled", "href", "onClick"], V = /* @__PURE__ */ C({
100
100
  for (const [r, u] of s)
101
101
  n[r] = u;
102
102
  return n;
103
- }, R = /* @__PURE__ */ X(V, [["__scopeId", "data-v-00e72436"]]);
103
+ }, R = /* @__PURE__ */ X(V, [["__scopeId", "data-v-99cb4084"]]);
104
104
  export {
105
105
  R as default
106
106
  };