maz-ui 3.25.0 → 3.25.2

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 (45) hide show
  1. package/components/MazBadge.mjs +6 -6
  2. package/components/MazCard.d.ts +3 -1
  3. package/components/MazCard.mjs +1 -1
  4. package/components/MazCheckbox.mjs +10 -10
  5. package/components/MazDropdown.mjs +13 -13
  6. package/components/MazPhoneNumberInput.mjs +1 -1
  7. package/components/MazSelect.mjs +1 -1
  8. package/components/MazTabsBar.d.ts +3 -3
  9. package/components/MazTabsBar.mjs +104 -2
  10. package/components/assets/MazBadge.css +1 -1
  11. package/components/assets/MazCard.css +1 -1
  12. package/components/assets/MazCheckbox.css +1 -1
  13. package/components/assets/MazTabsBar.css +1 -1
  14. package/components/chunks/{MazBtn-V74h4t6N.mjs → MazBtn-E_7uvjFN.mjs} +2 -2
  15. package/components/chunks/{MazBtn-8jL2kd1s.mjs → MazBtn-fgZZAln0.mjs} +2 -2
  16. package/components/chunks/{MazBtn-JxVNeBVQ.mjs → MazBtn-wAxVJRSU.mjs} +2 -2
  17. package/components/chunks/{MazCard-kNaVJd_g.mjs → MazCard-AcRp4dYY.mjs} +17 -15
  18. package/components/chunks/{MazCheckbox-jW6eRxo-.mjs → MazCheckbox-Ur6iYj4S.mjs} +9 -9
  19. package/components/chunks/{MazCheckbox-PPOcnk4M.mjs → MazCheckbox-jGECM3j3.mjs} +9 -9
  20. package/components/chunks/{MazGallery-FIb-5maS.mjs → MazGallery-p-vm15yn.mjs} +1 -1
  21. package/components/chunks/{MazPhoneNumberInput--P0rJeR6.mjs → MazPhoneNumberInput-UpZj2xCt.mjs} +2 -2
  22. package/components/chunks/{MazSelect-mFss30EN.mjs → MazSelect-0T1qVxT5.mjs} +2 -2
  23. package/components/chunks/{MazSpinner-hj4vBKGe.mjs → MazSpinner-0anK9siv.mjs} +1 -1
  24. package/components/chunks/{MazSpinner-0_bDB0ly.mjs → MazSpinner-GDyFbUT-.mjs} +1 -1
  25. package/components/chunks/{MazSpinner-e-wVuIa6.mjs → MazSpinner-ymiFQY_u.mjs} +1 -1
  26. package/components/chunks/{MazTransitionExpand-k3LqGgNc.mjs → MazTransitionExpand-H8rF9skG.mjs} +1 -1
  27. package/css/main.css +1 -1
  28. package/modules/chunks/{MazBtn-Dh9CWXCs.mjs → MazBtn-JRiYAnNE.mjs} +2 -2
  29. package/modules/chunks/{MazBtn-7fc6CaEx.cjs → MazBtn-XlYmCiY7.cjs} +1 -1
  30. package/modules/chunks/{MazIcon-rmruhJWI.cjs → MazIcon-1rUbp3IR.cjs} +1 -1
  31. package/modules/chunks/{MazIcon-O2qhlLgd.mjs → MazIcon-jN7MCOTm.mjs} +1 -1
  32. package/modules/chunks/{MazSpinner-D_vmUW7o.cjs → MazSpinner-9nuTFEMU.cjs} +1 -1
  33. package/modules/chunks/{MazSpinner-NY1ndqV7.mjs → MazSpinner-U-92TzUo.mjs} +1 -1
  34. package/modules/chunks/{index-A4ZKAAN1.mjs → index-0wbCxej8.mjs} +3 -3
  35. package/modules/chunks/{index-4-P6-Fmb.cjs → index-fNfaYOpu.cjs} +2 -2
  36. package/modules/index.cjs +1 -1
  37. package/modules/index.mjs +1 -1
  38. package/nuxt/index.json +1 -1
  39. package/package.json +1 -1
  40. package/types/components/MazCard.vue.d.ts +3 -1
  41. package/types/components/MazTabsBar.vue.d.ts +3 -3
  42. package/components/chunks/MazBtn-Qa9DSsQk.mjs +0 -152
  43. package/components/chunks/MazIcon-4RyBw86a.mjs +0 -96
  44. package/components/chunks/MazSpinner-o7NBR-qR.mjs +0 -38
  45. package/components/chunks/MazTabsBar-WKO9upP5.mjs +0 -131
@@ -1,131 +0,0 @@
1
- import "../assets/MazTabsBar.css";
2
- import { inject as M, defineComponent as k, defineAsyncComponent as S, ref as h, computed as _, onBeforeMount as x, onMounted as A, openBlock as f, createElementBlock as g, normalizeClass as z, Fragment as E, renderList as R, createBlock as V, unref as p, normalizeStyle as m, withCtx as j, createTextVNode as I, toDisplayString as L, createElementVNode as C } from "vue";
3
- function X(t, s) {
4
- const r = M(t, s);
5
- if (!r)
6
- throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${t}`);
7
- return r;
8
- }
9
- const N = /* @__PURE__ */ k({
10
- __name: "MazTabsBar",
11
- props: {
12
- items: { type: Array, required: !0 },
13
- useAnchor: { type: Boolean, default: !1 },
14
- color: { type: String, default: "primary" },
15
- noRounded: { type: Boolean, default: !1 }
16
- },
17
- setup(t) {
18
- const s = S(() => import("./MazBtn-Qa9DSsQk.mjs"));
19
- function r(e) {
20
- return e.replaceAll(/([a-z])([A-Z])/g, "$1-$2").replaceAll(/[\s_]+/g, "-").toLowerCase();
21
- }
22
- const i = (e, a) => {
23
- if (typeof window > "u")
24
- return a;
25
- const c = window.location.hash.replace("#", ""), l = e.findIndex(({ label: n }) => r(n) === c);
26
- return l === -1 ? 1 : l + 1;
27
- }, { currentTab: o, updateCurrentTab: b } = X("maz-tabs"), d = t, T = h(), v = h([]);
28
- function $({
29
- mazBtn: e,
30
- index: a
31
- }) {
32
- e && "$el" in e && (v.value[a] = e.$el);
33
- }
34
- const u = _(
35
- () => d.items.map((e) => ({
36
- label: typeof e == "string" ? e : e.label,
37
- disabled: typeof e == "string" ? !1 : e.disabled ?? !1
38
- }))
39
- ), w = _(() => {
40
- if (typeof o.value != "number")
41
- return {};
42
- const e = v.value[o.value - 1], a = (e == null ? void 0 : e.clientWidth) ?? 0;
43
- return {
44
- transform: `translateX(${(e == null ? void 0 : e.offsetLeft) ?? 0}px)`,
45
- width: `${a}px`
46
- };
47
- });
48
- function B(e) {
49
- return o.value === e ? `color: var(--maz-color-${d.color})` : "";
50
- }
51
- return x(() => {
52
- (o.value < 1 || o.value > u.value.length) && console.error(
53
- `[maz-ui](MazTabsBar) The model-value should be between 1 and ${u.value.length}`
54
- );
55
- }), A(async () => {
56
- d.useAnchor && b(i(u.value, o.value) ?? 1);
57
- }), (e, a) => (f(), g(
58
- "div",
59
- {
60
- ref_key: "MazTabsBar",
61
- ref: T,
62
- class: z(["m-tabs-bar", {
63
- "--no-rounded": t.noRounded
64
- }])
65
- },
66
- [
67
- (f(!0), g(
68
- E,
69
- null,
70
- R(u.value, ({ label: c, disabled: l }, n) => (f(), V(p(s), {
71
- key: n,
72
- ref_for: !0,
73
- ref: (y) => $({ mazBtn: y, index: n }),
74
- color: "transparent",
75
- class: z([{ "--active": p(o) === n, "--disabled": l }, "m-tabs-bar__item --no-styling"]),
76
- disabled: l,
77
- to: t.useAnchor && !l ? `#${r(c)}` : void 0,
78
- style: m(B(n + 1)),
79
- "no-rounded": "",
80
- onClick: (y) => p(b)(n + 1)
81
- }, {
82
- default: j(() => [
83
- I(
84
- L(c),
85
- 1
86
- /* TEXT */
87
- )
88
- ]),
89
- _: 2
90
- /* DYNAMIC */
91
- }, 1032, ["class", "disabled", "to", "style", "onClick"]))),
92
- 128
93
- /* KEYED_FRAGMENT */
94
- )),
95
- C(
96
- "div",
97
- {
98
- style: m(w.value),
99
- class: "m-tabs-bar__indicator"
100
- },
101
- [
102
- C(
103
- "div",
104
- {
105
- class: "m-sub-bar",
106
- style: m({ backgroundColor: `var(--maz-color-${t.color})` })
107
- },
108
- null,
109
- 4
110
- /* STYLE */
111
- )
112
- ],
113
- 4
114
- /* STYLE */
115
- )
116
- ],
117
- 2
118
- /* CLASS */
119
- ));
120
- }
121
- }), O = (t, s) => {
122
- const r = t.__vccOpts || t;
123
- for (const [i, o] of s)
124
- r[i] = o;
125
- return r;
126
- }, D = /* @__PURE__ */ O(N, [["__scopeId", "data-v-784ac8f6"]]);
127
- export {
128
- D as M,
129
- O as _,
130
- X as i
131
- };