maz-ui 3.27.2 → 3.27.3

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 (110) hide show
  1. package/components/MazAvatar.d.ts +9 -0
  2. package/components/MazAvatar.mjs +1 -1
  3. package/components/MazBottomSheet.mjs +1 -1
  4. package/components/MazBtn.mjs +1 -1
  5. package/components/MazCard.mjs +1 -1
  6. package/components/MazCarousel.mjs +1 -1
  7. package/components/MazDialog.mjs +1 -1
  8. package/components/MazDialogPromise.mjs +1 -1
  9. package/components/MazDrawer.mjs +1 -1
  10. package/components/MazDropdown.mjs +1 -1
  11. package/components/MazInput.mjs +1 -1
  12. package/components/MazInputNumber.mjs +1 -1
  13. package/components/MazInputPrice.mjs +1 -1
  14. package/components/MazInputTags.mjs +1 -1
  15. package/components/MazPhoneNumberInput.mjs +1 -1
  16. package/components/MazPicker.mjs +1 -1
  17. package/components/MazSelect.mjs +1 -1
  18. package/components/MazTabsBar.mjs +1 -1
  19. package/components/assets/MazAccordion.css +1 -1
  20. package/components/assets/MazAvatar.css +1 -1
  21. package/components/assets/MazBtn.css +1 -1
  22. package/components/assets/MazInput.css +1 -1
  23. package/components/assets/MazInputPrice.css +1 -1
  24. package/components/assets/MazInputTags.css +1 -1
  25. package/components/assets/MazPhoneNumberInput.css +1 -1
  26. package/components/assets/MazSelect.css +1 -1
  27. package/components/assets/MazTabsBar.css +1 -1
  28. package/components/chunks/MazAvatar-R8NMQtnF.mjs +127 -0
  29. package/components/chunks/{MazBottomSheet-xBiP2XHS.mjs → MazBottomSheet-drApWHKD.mjs} +1 -1
  30. package/components/chunks/{MazBtn-qSZOL-5_.mjs → MazBtn-0G720KFq.mjs} +2 -2
  31. package/components/chunks/MazBtn-73oIPj7p.mjs +152 -0
  32. package/components/chunks/{MazBtn-y1-B6bAs.mjs → MazBtn-95KJ9tBu.mjs} +1 -1
  33. package/components/chunks/{MazBtn-0YAZPugZ.mjs → MazBtn-Em4ZfNtB.mjs} +3 -3
  34. package/components/chunks/{MazBtn-LExLZ_5E.mjs → MazBtn-IgbmV5Ee.mjs} +3 -3
  35. package/components/chunks/{MazBtn-8RfdQqKD.mjs → MazBtn-SGGl5Y2V.mjs} +3 -3
  36. package/components/chunks/MazBtn-Y-4Wyhxt.mjs +152 -0
  37. package/components/chunks/{MazBtn-MFxzrbrk.mjs → MazBtn-eAtf8962.mjs} +3 -3
  38. package/components/chunks/{MazBtn-oAmpwHES.mjs → MazBtn-fZS7THSf.mjs} +3 -3
  39. package/components/chunks/{MazBtn-0I3mOlOJ.mjs → MazBtn-ggfhWpbM.mjs} +3 -3
  40. package/components/chunks/{MazBtn-SmJwJsv2.mjs → MazBtn-oJQ1RO5m.mjs} +2 -2
  41. package/components/chunks/{MazBtn--_QbzFEn.mjs → MazBtn-sGPOyYvj.mjs} +3 -3
  42. package/components/chunks/MazBtn-uw-YkQ80.mjs +152 -0
  43. package/components/chunks/MazBtn-wUxQs39Y.mjs +152 -0
  44. package/components/chunks/{MazCard-W8HKEJ8d.mjs → MazCard-znS4eBr9.mjs} +1 -1
  45. package/components/chunks/{MazCarousel--9EpK5a7.mjs → MazCarousel-yAhPk8-A.mjs} +1 -1
  46. package/components/chunks/{MazCheckbox-C5TE5LKf.mjs → MazCheckbox-040sZ9b7.mjs} +1 -1
  47. package/components/chunks/{MazCheckbox-SfV0UBCp.mjs → MazCheckbox-BteTmQpl.mjs} +1 -1
  48. package/components/chunks/{MazDialog-VkT6NGk2.mjs → MazDialog-EZjFsf0O.mjs} +1 -1
  49. package/components/chunks/{MazDialogPromise-l3UFldnD.mjs → MazDialogPromise-yoXSjvLK.mjs} +2 -2
  50. package/components/chunks/{MazDrawer-3F4gXWn3.mjs → MazDrawer-ZR2j8Mqv.mjs} +1 -1
  51. package/components/chunks/{MazGallery-xTmpaIFo.mjs → MazGallery-jZ9ajNeH.mjs} +1 -1
  52. package/components/chunks/{MazInput-JBsukk0T.mjs → MazInput-LCCiCc7N.mjs} +14 -14
  53. package/components/chunks/{MazInput-6Q9hJNva.mjs → MazInput-q3iDdMgc.mjs} +9 -9
  54. package/components/chunks/{MazInput-sZWYXVcu.mjs → MazInput-zNyOjGAR.mjs} +2 -2
  55. package/components/chunks/{MazInputPrice-A7UEFWHD.mjs → MazInputPrice-ONXFfwa4.mjs} +2 -2
  56. package/components/chunks/{MazInputTags-3yh4LQ9s.mjs → MazInputTags-w6pWjo55.mjs} +3 -3
  57. package/components/chunks/{MazLazyImg-Fca-bx9H.mjs → MazLazyImg-ZOc12h_Y.mjs} +2 -2
  58. package/components/chunks/{MazPhoneNumberInput-v9rbDA6q.mjs → MazPhoneNumberInput-4OkEx4jv.mjs} +3 -3
  59. package/components/chunks/{MazPicker-mJ6cn2Bn.mjs → MazPicker-UBR0lHof.mjs} +2 -2
  60. package/components/chunks/{MazPickerCalendar-F6_w9LqU.mjs → MazPickerCalendar-Xy4G6r6A.mjs} +3 -3
  61. package/components/chunks/{MazPickerHeader-VgRynRUP.mjs → MazPickerHeader-DiF0_JE9.mjs} +1 -1
  62. package/components/chunks/{MazPickerMonthSwitcher-4pKbCK04.mjs → MazPickerMonthSwitcher-VndGziD8.mjs} +2 -2
  63. package/components/chunks/{MazPickerShortcuts-N6Uci35g.mjs → MazPickerShortcuts-8IpuBoq1.mjs} +2 -2
  64. package/components/chunks/{MazPickerTime-CHrTTUTu.mjs → MazPickerTime-Qz5fvLJ-.mjs} +2 -2
  65. package/components/chunks/{MazPickerYearSwitcher-gtNIVerE.mjs → MazPickerYearSwitcher-zm5oZkNy.mjs} +3 -3
  66. package/components/chunks/{MazSelect-J-Ww10JN.mjs → MazSelect-5x7-tPsR.mjs} +63 -63
  67. package/components/chunks/MazSpinner-2AK60imc.mjs +38 -0
  68. package/components/chunks/{MazSpinner-E1f0p5Od.mjs → MazSpinner-7Vna5BJr.mjs} +1 -1
  69. package/components/chunks/MazSpinner-9u_-L8ML.mjs +38 -0
  70. package/components/chunks/{MazSpinner-T09dmF-u.mjs → MazSpinner-A7gRQVNG.mjs} +1 -1
  71. package/components/chunks/MazSpinner-Dn7COlhQ.mjs +38 -0
  72. package/components/chunks/MazSpinner-GJGAn0qK.mjs +38 -0
  73. package/components/chunks/{MazSpinner-EKy-ECIw.mjs → MazSpinner-JXdItxJj.mjs} +1 -1
  74. package/components/chunks/{MazSpinner-jtNGqgdh.mjs → MazSpinner-JhfMzwsy.mjs} +1 -1
  75. package/components/chunks/MazSpinner-K1fdNrVH.mjs +38 -0
  76. package/components/chunks/{MazSpinner-dusYVMdB.mjs → MazSpinner-OW4qLm4s.mjs} +1 -1
  77. package/components/chunks/{MazSpinner-HxbToZa8.mjs → MazSpinner-Vv3pXh18.mjs} +1 -1
  78. package/components/chunks/MazSpinner-aqN2yL-8.mjs +38 -0
  79. package/components/chunks/{MazSpinner-Gtge6X2k.mjs → MazSpinner-nP10KfBk.mjs} +1 -1
  80. package/components/chunks/MazSpinner-owcOzkqd.mjs +38 -0
  81. package/components/chunks/MazSpinner-rKuiVIIl.mjs +38 -0
  82. package/components/chunks/{MazTransitionExpand-sx0zlvrd.mjs → MazTransitionExpand-1uzTVgwH.mjs} +1 -1
  83. package/css/main.css +1 -1
  84. package/modules/assets/MazBtn.css +1 -1
  85. package/modules/chunks/{MazBtn-DUWSBfcR.cjs → MazBtn-3TYxMkGZ.cjs} +1 -1
  86. package/modules/chunks/{MazBtn-7K12yZ6I.mjs → MazBtn-wOqW0bFf.mjs} +3 -3
  87. package/modules/chunks/{MazIcon-Oj1DZi0J.cjs → MazIcon-32UkLi-M.cjs} +1 -1
  88. package/modules/chunks/{MazIcon-jV2j5-vQ.mjs → MazIcon-TFXJ2PBi.mjs} +1 -1
  89. package/modules/chunks/{MazSpinner-JIi1LXux.mjs → MazSpinner-6RF2OtIj.mjs} +1 -1
  90. package/modules/chunks/{MazSpinner-FvaDeIHB.cjs → MazSpinner-TJZrBgdd.cjs} +1 -1
  91. package/modules/chunks/{index-2ztHYBiq.cjs → index-nQuj1wnX.cjs} +1 -1
  92. package/modules/chunks/{index-wZ3oEJrJ.mjs → index-pnkqarBd.mjs} +2 -2
  93. package/modules/index.cjs +1 -1
  94. package/modules/index.mjs +1 -1
  95. package/nuxt/index.json +1 -1
  96. package/package.json +1 -1
  97. package/types/components/MazAvatar.vue.d.ts +9 -0
  98. package/components/chunks/MazAvatar-RHmR_HKk.mjs +0 -126
  99. package/components/chunks/MazBtn-NKLCh3K0.mjs +0 -152
  100. package/components/chunks/MazBtn-R9twVXzi.mjs +0 -152
  101. package/components/chunks/MazBtn-V4TdQPvz.mjs +0 -152
  102. package/components/chunks/MazBtn-VJ6PjVgq.mjs +0 -152
  103. package/components/chunks/MazSpinner-VNu4q7AS.mjs +0 -38
  104. package/components/chunks/MazSpinner-_iylCUmE.mjs +0 -38
  105. package/components/chunks/MazSpinner-hl5p2Ja0.mjs +0 -38
  106. package/components/chunks/MazSpinner-iL3UOtWy.mjs +0 -38
  107. package/components/chunks/MazSpinner-jit3i4WQ.mjs +0 -38
  108. package/components/chunks/MazSpinner-osfOp0qm.mjs +0 -38
  109. package/components/chunks/MazSpinner-q4I09Hr8.mjs +0 -38
  110. package/components/chunks/MazSpinner-riqwp9Ow.mjs +0 -38
@@ -1,126 +0,0 @@
1
- import "../assets/MazAvatar.css";
2
- import { defineComponent as z, defineAsyncComponent as f, computed as m, openBlock as c, createBlock as v, resolveDynamicComponent as B, normalizeStyle as y, normalizeClass as k, withCtx as S, createElementVNode as b, unref as g, createCommentVNode as l, renderSlot as d, toDisplayString as h, createElementBlock as C, createVNode as $ } from "vue";
3
- const w = ["tabindex"], I = { class: "m-avatar__initial" }, L = {
4
- key: 0,
5
- class: "m-avatar__caption"
6
- }, x = /* @__PURE__ */ z({
7
- __name: "MazAvatar",
8
- props: {
9
- src: {
10
- type: String,
11
- default: void 0
12
- },
13
- caption: {
14
- type: String,
15
- default: void 0
16
- },
17
- href: { type: String, default: void 0 },
18
- to: { type: Object, default: void 0 },
19
- alt: { type: String, default: "avatar image" },
20
- target: { type: String, default: "_self" },
21
- size: { type: String, default: void 0 },
22
- bordered: { type: Boolean, default: !1 },
23
- clickable: { type: Boolean, default: !1 },
24
- square: { type: Boolean, default: !1 },
25
- noElevation: { type: Boolean, default: !1 },
26
- showCaption: { type: Boolean, default: !1 },
27
- imageHeightFull: { type: Boolean, default: !1 },
28
- noLoader: { type: Boolean, default: !1 },
29
- buttonColor: {
30
- type: String,
31
- default: "info"
32
- },
33
- /** Remove the icon on hover when component is clickable */
34
- noClickableIcon: { type: Boolean, default: !1 }
35
- },
36
- emits: ["click"],
37
- setup(e) {
38
- const r = f(() => import("./MazLazyImg-Fca-bx9H.mjs")), n = f(() => import("./pencil-laNW5qNQ.mjs")), t = e, s = m(() => t.to ? "RouterLink" : t.href ? "a" : "div"), u = m(() => !!t.to || !!t.href);
39
- return (o, i) => (c(), v(B(s.value), {
40
- style: y({ fontSize: e.size }),
41
- class: k(["m-avatar", [
42
- {
43
- "--has-link": u.value
44
- }
45
- ]]),
46
- href: e.href,
47
- to: e.to,
48
- target: u.value ? e.target : void 0
49
- }, {
50
- default: S(() => [
51
- b("div", {
52
- class: k(["m-avatar__wrapper", {
53
- "--has-shadow": !e.noElevation,
54
- "--bordered": e.bordered,
55
- "--clickable": e.clickable,
56
- "--square": e.square,
57
- "--has-initial": !e.src && e.caption
58
- }]),
59
- tabindex: e.clickable ? 0 : -1
60
- }, [
61
- e.src ? (c(), v(g(r), {
62
- key: 0,
63
- class: "m-avatar__picture maz-max-w-full",
64
- image: e.src,
65
- alt: e.alt,
66
- "image-height-full": "",
67
- "no-loader": e.noLoader,
68
- onClick: i[0] || (i[0] = (a) => e.clickable ? o.$emit("click", a) : null)
69
- }, null, 8, ["image", "alt", "no-loader"])) : l("v-if", !0),
70
- e.caption && !e.src ? d(o.$slots, "round-text", { key: 1 }, () => {
71
- var a;
72
- return [
73
- b(
74
- "span",
75
- I,
76
- h((a = e.caption) == null ? void 0 : a.charAt(0)),
77
- 1
78
- /* TEXT */
79
- )
80
- ];
81
- }, !0) : l("v-if", !0),
82
- e.clickable ? (c(), C(
83
- "button",
84
- {
85
- key: 2,
86
- type: "button",
87
- tabindex: "-1",
88
- class: "m-avatar__button",
89
- style: y({
90
- backgroundColor: e.src ? `var(--maz-color-${e.buttonColor}-alpha)` : `var(--maz-color-${e.buttonColor})`
91
- }),
92
- onClick: i[1] || (i[1] = (a) => o.$emit("click", a))
93
- },
94
- [
95
- e.noClickableIcon ? l("v-if", !0) : d(o.$slots, "icon", { key: 0 }, () => [
96
- $(g(n), { class: "m-avatar__button__icon" })
97
- ], !0)
98
- ],
99
- 4
100
- /* STYLE */
101
- )) : l("v-if", !0)
102
- ], 10, w),
103
- d(o.$slots, "caption", {}, () => [
104
- e.showCaption && e.caption ? (c(), C(
105
- "p",
106
- L,
107
- h(e.caption),
108
- 1
109
- /* TEXT */
110
- )) : l("v-if", !0)
111
- ], !0)
112
- ]),
113
- _: 3
114
- /* FORWARDED */
115
- }, 8, ["style", "class", "href", "to", "target"]));
116
- }
117
- }), A = (e, r) => {
118
- const n = e.__vccOpts || e;
119
- for (const [t, s] of r)
120
- n[t] = s;
121
- return n;
122
- }, q = /* @__PURE__ */ A(x, [["__scopeId", "data-v-ce526c7e"]]);
123
- export {
124
- q as M,
125
- A as _
126
- };
@@ -1,152 +0,0 @@
1
- import "../assets/MazBtn.css";
2
- import { defineComponent as M, defineAsyncComponent as z, useAttrs as E, useSlots as L, onBeforeMount as R, computed as t, openBlock as o, createBlock as i, resolveDynamicComponent as w, normalizeClass as u, withCtx as A, createElementBlock as v, renderSlot as r, unref as d, createCommentVNode as a, createElementVNode as D } from "vue";
3
- import { _ as N } from "./MazDrawer-3F4gXWn3.mjs";
4
- const P = /* @__PURE__ */ M({
5
- __name: "MazBtn",
6
- props: {
7
- variant: {
8
- type: String,
9
- default: "button",
10
- validator: (e) => ["button", "link"].includes(e)
11
- },
12
- size: {
13
- type: String,
14
- default: "md",
15
- validator: (e) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(e)
16
- },
17
- color: {
18
- type: String,
19
- default: "primary"
20
- },
21
- type: {
22
- type: String,
23
- default: "button",
24
- validator: (e) => ["button", "submit", "reset"].includes(e)
25
- },
26
- rounded: { type: Boolean, default: !1 },
27
- noRounded: { type: Boolean, default: !1 },
28
- outline: { type: Boolean, default: !1 },
29
- pastel: { type: Boolean, default: !1 },
30
- block: { type: Boolean, default: !1 },
31
- noUnderline: { type: Boolean, default: !1 },
32
- noLeading: { type: Boolean, default: !1 },
33
- loading: { type: Boolean, default: !1 },
34
- disabled: { type: Boolean, default: !1 },
35
- fab: { type: Boolean, default: !1 },
36
- icon: { type: String, default: void 0 },
37
- leftIcon: { type: String, default: void 0 },
38
- rightIcon: { type: String, default: void 0 },
39
- noPadding: { type: Boolean, default: !1 },
40
- noElevation: { type: Boolean, default: !1 }
41
- },
42
- setup(e) {
43
- const p = z(() => import("./MazSpinner-_iylCUmE.mjs")), c = z(() => import("./MazIcon-RrJDzX3V.mjs")), { href: B, to: h } = E(), b = L(), n = e;
44
- R(() => {
45
- n.icon && !n.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
46
- });
47
- const f = t(() => B ? "a" : h ? "router-link" : "button"), k = t(
48
- () => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`
49
- ), m = t(
50
- () => (n.loading || n.disabled) && f.value === "button"
51
- ), I = t(() => m.value ? "--cursor-default" : "--cursor-pointer"), x = t(() => `--is-${n.variant}`), l = t(() => n.loading && n.variant === "button"), y = t(() => !!b["left-icon"] || n.leftIcon), g = t(() => !!b["right-icon"] || n.rightIcon), C = t(() => y.value || g.value), S = t(() => n.fab && n.icon), $ = t(() => f.value === "button" ? n.type : void 0);
52
- return (s, U) => (o(), i(w(f.value), {
53
- disabled: m.value,
54
- class: u(["m-btn", [
55
- `--${e.size}`,
56
- k.value,
57
- I.value,
58
- x.value,
59
- {
60
- "--block": e.block,
61
- "--no-underline": e.noUnderline,
62
- "--no-leading": e.noLeading,
63
- "--fab": e.fab,
64
- "--loading": e.loading,
65
- "--disabled": m.value,
66
- "--icon": C.value,
67
- "--rounded": e.rounded,
68
- "--no-rounded": e.noRounded,
69
- "--no-padding": e.noPadding,
70
- "--no-elevation": e.noElevation
71
- }
72
- ]]),
73
- type: $.value
74
- }, {
75
- default: A(() => [
76
- y.value ? (o(), v(
77
- "div",
78
- {
79
- key: 0,
80
- class: u(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": l.value }])
81
- },
82
- [
83
- r(s.$slots, "left-icon", {}, () => [
84
- e.leftIcon ? (o(), i(d(c), {
85
- key: 0,
86
- name: e.leftIcon
87
- }, null, 8, ["name"])) : a("v-if", !0)
88
- ], !0)
89
- ],
90
- 2
91
- /* CLASS */
92
- )) : a("v-if", !0),
93
- S.value ? (o(), v(
94
- "div",
95
- {
96
- key: 1,
97
- class: u(["m-btn__icon maz-flex maz-flex-center", { "maz-invisible": l.value }])
98
- },
99
- [
100
- r(s.$slots, "icon", {}, () => [
101
- e.icon ? (o(), i(d(c), {
102
- key: 0,
103
- name: e.icon
104
- }, null, 8, ["name"])) : a("v-if", !0)
105
- ], !0)
106
- ],
107
- 2
108
- /* CLASS */
109
- )) : a("v-if", !0),
110
- D(
111
- "span",
112
- {
113
- class: u(["maz-flex maz-flex-center", { "maz-invisible": l.value }])
114
- },
115
- [
116
- r(s.$slots, "default", {}, void 0, !0)
117
- ],
118
- 2
119
- /* CLASS */
120
- ),
121
- g.value ? (o(), v(
122
- "div",
123
- {
124
- key: 2,
125
- class: u(["m-btn__icon-right maz-flex maz-flex-center", { "maz-invisible": l.value }])
126
- },
127
- [
128
- r(s.$slots, "right-icon", {}, () => [
129
- e.rightIcon ? (o(), i(d(c), {
130
- key: 0,
131
- name: e.rightIcon
132
- }, null, 8, ["name"])) : a("v-if", !0)
133
- ], !0)
134
- ],
135
- 2
136
- /* CLASS */
137
- )) : a("v-if", !0),
138
- l.value ? (o(), i(d(p), {
139
- key: 3,
140
- size: "2em",
141
- color: e.color,
142
- class: "maz-absolute"
143
- }, null, 8, ["color"])) : a("v-if", !0)
144
- ]),
145
- _: 3
146
- /* FORWARDED */
147
- }, 8, ["disabled", "class", "type"]));
148
- }
149
- }), j = /* @__PURE__ */ N(P, [["__scopeId", "data-v-78782cb0"]]);
150
- export {
151
- j as default
152
- };
@@ -1,152 +0,0 @@
1
- import "../assets/MazBtn.css";
2
- import { defineComponent as M, defineAsyncComponent as z, useAttrs as E, useSlots as L, onBeforeMount as R, computed as t, openBlock as o, createBlock as i, resolveDynamicComponent as w, normalizeClass as u, withCtx as A, createElementBlock as v, renderSlot as r, unref as d, createCommentVNode as a, createElementVNode as D } from "vue";
3
- import { _ as N } from "./MazInputPrice-A7UEFWHD.mjs";
4
- const P = /* @__PURE__ */ M({
5
- __name: "MazBtn",
6
- props: {
7
- variant: {
8
- type: String,
9
- default: "button",
10
- validator: (e) => ["button", "link"].includes(e)
11
- },
12
- size: {
13
- type: String,
14
- default: "md",
15
- validator: (e) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(e)
16
- },
17
- color: {
18
- type: String,
19
- default: "primary"
20
- },
21
- type: {
22
- type: String,
23
- default: "button",
24
- validator: (e) => ["button", "submit", "reset"].includes(e)
25
- },
26
- rounded: { type: Boolean, default: !1 },
27
- noRounded: { type: Boolean, default: !1 },
28
- outline: { type: Boolean, default: !1 },
29
- pastel: { type: Boolean, default: !1 },
30
- block: { type: Boolean, default: !1 },
31
- noUnderline: { type: Boolean, default: !1 },
32
- noLeading: { type: Boolean, default: !1 },
33
- loading: { type: Boolean, default: !1 },
34
- disabled: { type: Boolean, default: !1 },
35
- fab: { type: Boolean, default: !1 },
36
- icon: { type: String, default: void 0 },
37
- leftIcon: { type: String, default: void 0 },
38
- rightIcon: { type: String, default: void 0 },
39
- noPadding: { type: Boolean, default: !1 },
40
- noElevation: { type: Boolean, default: !1 }
41
- },
42
- setup(e) {
43
- const p = z(() => import("./MazSpinner-hl5p2Ja0.mjs")), c = z(() => import("./MazIcon-RrJDzX3V.mjs")), { href: B, to: h } = E(), b = L(), n = e;
44
- R(() => {
45
- n.icon && !n.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
46
- });
47
- const f = t(() => B ? "a" : h ? "router-link" : "button"), k = t(
48
- () => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`
49
- ), m = t(
50
- () => (n.loading || n.disabled) && f.value === "button"
51
- ), I = t(() => m.value ? "--cursor-default" : "--cursor-pointer"), x = t(() => `--is-${n.variant}`), l = t(() => n.loading && n.variant === "button"), y = t(() => !!b["left-icon"] || n.leftIcon), g = t(() => !!b["right-icon"] || n.rightIcon), C = t(() => y.value || g.value), S = t(() => n.fab && n.icon), $ = t(() => f.value === "button" ? n.type : void 0);
52
- return (s, U) => (o(), i(w(f.value), {
53
- disabled: m.value,
54
- class: u(["m-btn", [
55
- `--${e.size}`,
56
- k.value,
57
- I.value,
58
- x.value,
59
- {
60
- "--block": e.block,
61
- "--no-underline": e.noUnderline,
62
- "--no-leading": e.noLeading,
63
- "--fab": e.fab,
64
- "--loading": e.loading,
65
- "--disabled": m.value,
66
- "--icon": C.value,
67
- "--rounded": e.rounded,
68
- "--no-rounded": e.noRounded,
69
- "--no-padding": e.noPadding,
70
- "--no-elevation": e.noElevation
71
- }
72
- ]]),
73
- type: $.value
74
- }, {
75
- default: A(() => [
76
- y.value ? (o(), v(
77
- "div",
78
- {
79
- key: 0,
80
- class: u(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": l.value }])
81
- },
82
- [
83
- r(s.$slots, "left-icon", {}, () => [
84
- e.leftIcon ? (o(), i(d(c), {
85
- key: 0,
86
- name: e.leftIcon
87
- }, null, 8, ["name"])) : a("v-if", !0)
88
- ], !0)
89
- ],
90
- 2
91
- /* CLASS */
92
- )) : a("v-if", !0),
93
- S.value ? (o(), v(
94
- "div",
95
- {
96
- key: 1,
97
- class: u(["m-btn__icon maz-flex maz-flex-center", { "maz-invisible": l.value }])
98
- },
99
- [
100
- r(s.$slots, "icon", {}, () => [
101
- e.icon ? (o(), i(d(c), {
102
- key: 0,
103
- name: e.icon
104
- }, null, 8, ["name"])) : a("v-if", !0)
105
- ], !0)
106
- ],
107
- 2
108
- /* CLASS */
109
- )) : a("v-if", !0),
110
- D(
111
- "span",
112
- {
113
- class: u(["maz-flex maz-flex-center", { "maz-invisible": l.value }])
114
- },
115
- [
116
- r(s.$slots, "default", {}, void 0, !0)
117
- ],
118
- 2
119
- /* CLASS */
120
- ),
121
- g.value ? (o(), v(
122
- "div",
123
- {
124
- key: 2,
125
- class: u(["m-btn__icon-right maz-flex maz-flex-center", { "maz-invisible": l.value }])
126
- },
127
- [
128
- r(s.$slots, "right-icon", {}, () => [
129
- e.rightIcon ? (o(), i(d(c), {
130
- key: 0,
131
- name: e.rightIcon
132
- }, null, 8, ["name"])) : a("v-if", !0)
133
- ], !0)
134
- ],
135
- 2
136
- /* CLASS */
137
- )) : a("v-if", !0),
138
- l.value ? (o(), i(d(p), {
139
- key: 3,
140
- size: "2em",
141
- color: e.color,
142
- class: "maz-absolute"
143
- }, null, 8, ["color"])) : a("v-if", !0)
144
- ]),
145
- _: 3
146
- /* FORWARDED */
147
- }, 8, ["disabled", "class", "type"]));
148
- }
149
- }), j = /* @__PURE__ */ N(P, [["__scopeId", "data-v-78782cb0"]]);
150
- export {
151
- j as default
152
- };
@@ -1,152 +0,0 @@
1
- import "../assets/MazBtn.css";
2
- import { defineComponent as M, defineAsyncComponent as z, useAttrs as E, useSlots as L, onBeforeMount as R, computed as t, openBlock as o, createBlock as i, resolveDynamicComponent as w, normalizeClass as u, withCtx as A, createElementBlock as v, renderSlot as r, unref as d, createCommentVNode as a, createElementVNode as D } from "vue";
3
- import { _ as N } from "./MazBottomSheet-xBiP2XHS.mjs";
4
- const P = /* @__PURE__ */ M({
5
- __name: "MazBtn",
6
- props: {
7
- variant: {
8
- type: String,
9
- default: "button",
10
- validator: (e) => ["button", "link"].includes(e)
11
- },
12
- size: {
13
- type: String,
14
- default: "md",
15
- validator: (e) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(e)
16
- },
17
- color: {
18
- type: String,
19
- default: "primary"
20
- },
21
- type: {
22
- type: String,
23
- default: "button",
24
- validator: (e) => ["button", "submit", "reset"].includes(e)
25
- },
26
- rounded: { type: Boolean, default: !1 },
27
- noRounded: { type: Boolean, default: !1 },
28
- outline: { type: Boolean, default: !1 },
29
- pastel: { type: Boolean, default: !1 },
30
- block: { type: Boolean, default: !1 },
31
- noUnderline: { type: Boolean, default: !1 },
32
- noLeading: { type: Boolean, default: !1 },
33
- loading: { type: Boolean, default: !1 },
34
- disabled: { type: Boolean, default: !1 },
35
- fab: { type: Boolean, default: !1 },
36
- icon: { type: String, default: void 0 },
37
- leftIcon: { type: String, default: void 0 },
38
- rightIcon: { type: String, default: void 0 },
39
- noPadding: { type: Boolean, default: !1 },
40
- noElevation: { type: Boolean, default: !1 }
41
- },
42
- setup(e) {
43
- const p = z(() => import("./MazSpinner-q4I09Hr8.mjs")), c = z(() => import("./MazIcon-RrJDzX3V.mjs")), { href: B, to: h } = E(), b = L(), n = e;
44
- R(() => {
45
- n.icon && !n.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
46
- });
47
- const f = t(() => B ? "a" : h ? "router-link" : "button"), k = t(
48
- () => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`
49
- ), m = t(
50
- () => (n.loading || n.disabled) && f.value === "button"
51
- ), I = t(() => m.value ? "--cursor-default" : "--cursor-pointer"), x = t(() => `--is-${n.variant}`), l = t(() => n.loading && n.variant === "button"), y = t(() => !!b["left-icon"] || n.leftIcon), g = t(() => !!b["right-icon"] || n.rightIcon), C = t(() => y.value || g.value), S = t(() => n.fab && n.icon), $ = t(() => f.value === "button" ? n.type : void 0);
52
- return (s, U) => (o(), i(w(f.value), {
53
- disabled: m.value,
54
- class: u(["m-btn", [
55
- `--${e.size}`,
56
- k.value,
57
- I.value,
58
- x.value,
59
- {
60
- "--block": e.block,
61
- "--no-underline": e.noUnderline,
62
- "--no-leading": e.noLeading,
63
- "--fab": e.fab,
64
- "--loading": e.loading,
65
- "--disabled": m.value,
66
- "--icon": C.value,
67
- "--rounded": e.rounded,
68
- "--no-rounded": e.noRounded,
69
- "--no-padding": e.noPadding,
70
- "--no-elevation": e.noElevation
71
- }
72
- ]]),
73
- type: $.value
74
- }, {
75
- default: A(() => [
76
- y.value ? (o(), v(
77
- "div",
78
- {
79
- key: 0,
80
- class: u(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": l.value }])
81
- },
82
- [
83
- r(s.$slots, "left-icon", {}, () => [
84
- e.leftIcon ? (o(), i(d(c), {
85
- key: 0,
86
- name: e.leftIcon
87
- }, null, 8, ["name"])) : a("v-if", !0)
88
- ], !0)
89
- ],
90
- 2
91
- /* CLASS */
92
- )) : a("v-if", !0),
93
- S.value ? (o(), v(
94
- "div",
95
- {
96
- key: 1,
97
- class: u(["m-btn__icon maz-flex maz-flex-center", { "maz-invisible": l.value }])
98
- },
99
- [
100
- r(s.$slots, "icon", {}, () => [
101
- e.icon ? (o(), i(d(c), {
102
- key: 0,
103
- name: e.icon
104
- }, null, 8, ["name"])) : a("v-if", !0)
105
- ], !0)
106
- ],
107
- 2
108
- /* CLASS */
109
- )) : a("v-if", !0),
110
- D(
111
- "span",
112
- {
113
- class: u(["maz-flex maz-flex-center", { "maz-invisible": l.value }])
114
- },
115
- [
116
- r(s.$slots, "default", {}, void 0, !0)
117
- ],
118
- 2
119
- /* CLASS */
120
- ),
121
- g.value ? (o(), v(
122
- "div",
123
- {
124
- key: 2,
125
- class: u(["m-btn__icon-right maz-flex maz-flex-center", { "maz-invisible": l.value }])
126
- },
127
- [
128
- r(s.$slots, "right-icon", {}, () => [
129
- e.rightIcon ? (o(), i(d(c), {
130
- key: 0,
131
- name: e.rightIcon
132
- }, null, 8, ["name"])) : a("v-if", !0)
133
- ], !0)
134
- ],
135
- 2
136
- /* CLASS */
137
- )) : a("v-if", !0),
138
- l.value ? (o(), i(d(p), {
139
- key: 3,
140
- size: "2em",
141
- color: e.color,
142
- class: "maz-absolute"
143
- }, null, 8, ["color"])) : a("v-if", !0)
144
- ]),
145
- _: 3
146
- /* FORWARDED */
147
- }, 8, ["disabled", "class", "type"]));
148
- }
149
- }), j = /* @__PURE__ */ N(P, [["__scopeId", "data-v-78782cb0"]]);
150
- export {
151
- j as default
152
- };