maz-ui 3.47.1 → 3.47.2-beta.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 (163) hide show
  1. package/components/MazAccordion.mjs +36 -37
  2. package/components/MazAnimatedCounter.mjs +14 -16
  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/MazChart.d.ts +1 -1
  8. package/components/MazChart.mjs +23 -32
  9. package/components/MazChecklist.mjs +1 -1
  10. package/components/MazCircularProgressBar.mjs +66 -71
  11. package/components/MazDialog.mjs +1 -1
  12. package/components/MazDialogPromise.mjs +1 -1
  13. package/components/MazDrawer.mjs +1 -1
  14. package/components/MazDropdown.mjs +162 -185
  15. package/components/MazExpandAnimation.mjs +20 -21
  16. package/components/MazGallery.mjs +1 -1
  17. package/components/MazInput.mjs +1 -1
  18. package/components/MazInputCode.mjs +30 -31
  19. package/components/MazInputNumber.mjs +1 -1
  20. package/components/MazInputPrice.mjs +1 -1
  21. package/components/MazInputTags.mjs +1 -1
  22. package/components/MazLink.mjs +18 -30
  23. package/components/MazPagination.mjs +1 -1
  24. package/components/MazPhoneNumberInput.mjs +1 -1
  25. package/components/MazPicker.mjs +1 -1
  26. package/components/MazRadio.mjs +37 -42
  27. package/components/MazRadioButtons.mjs +61 -66
  28. package/components/MazSelect.mjs +1 -1
  29. package/components/MazSlider.mjs +107 -116
  30. package/components/MazStepper.mjs +1 -1
  31. package/components/MazSwitch.mjs +24 -28
  32. package/components/MazTable.d.ts +31 -54
  33. package/components/MazTable.mjs +1 -1
  34. package/components/MazTabsBar.mjs +1 -1
  35. package/components/MazTextarea.mjs +32 -34
  36. package/components/assets/MazDropdown.css +1 -1
  37. package/components/assets/MazGallery.css +1 -1
  38. package/components/assets/MazInput.css +1 -1
  39. package/components/assets/MazInputNumber.css +1 -1
  40. package/components/assets/MazInputPrice.css +1 -1
  41. package/components/assets/MazInputTags.css +1 -1
  42. package/components/assets/MazLink.css +1 -1
  43. package/components/assets/MazPhoneNumberInput.css +1 -1
  44. package/components/assets/MazPicker.css +1 -1
  45. package/components/assets/MazSelect.css +1 -1
  46. package/components/assets/MazTable.css +1 -1
  47. package/components/assets/MazTabsBar.css +1 -1
  48. package/components/chunks/{MazBadge-CNSfzYq-.mjs → MazBadge-CqppWg2j.mjs} +1 -1
  49. package/components/chunks/{MazBottomSheet-DqK0EOsq.mjs → MazBottomSheet-CGRvZmGd.mjs} +28 -29
  50. package/{modules/chunks/MazBtn-CTqI4qhg.mjs → components/chunks/MazBtn-2VKM1wZu.mjs} +37 -49
  51. package/components/chunks/{MazBtn-TkePGm5o.mjs → MazBtn-40lm8-AL.mjs} +37 -49
  52. package/components/chunks/{MazBtn-DzBXfedt.mjs → MazBtn-BB1FyYWv.mjs} +35 -44
  53. package/components/chunks/{MazBtn-CnqRnXh_.mjs → MazBtn-BMYXMZuX.mjs} +37 -49
  54. package/components/chunks/{MazBtn-D6Jxw9Nr.mjs → MazBtn-BijEMn4r.mjs} +37 -49
  55. package/components/chunks/MazBtn-BmrcK2af.mjs +106 -0
  56. package/components/chunks/MazBtn-C72_1uvu.mjs +106 -0
  57. package/components/chunks/MazBtn-CWloP6MI.mjs +111 -0
  58. package/components/chunks/MazBtn-CcyV4DCc.mjs +106 -0
  59. package/components/chunks/MazBtn-DENEMy-c.mjs +106 -0
  60. package/components/chunks/MazBtn-DfqRZvbB.mjs +106 -0
  61. package/components/chunks/MazBtn-UnZQuu6P.mjs +106 -0
  62. package/components/chunks/MazBtn-cDJlUVVY.mjs +106 -0
  63. package/components/chunks/MazBtn-hUslV7wO.mjs +106 -0
  64. package/components/chunks/{MazCard-CfkvpcGL.mjs → MazCard-BYB8y1_u.mjs} +18 -19
  65. package/components/chunks/{MazCarousel-BEl86YGW.mjs → MazCarousel-DccWVW8H.mjs} +20 -21
  66. package/components/chunks/{MazCheckbox-BKCo6EzO.mjs → MazCheckbox-B22OcHt8.mjs} +1 -1
  67. package/components/chunks/{MazCheckbox-CI8ml-P8.mjs → MazCheckbox-DMogZVHl.mjs} +1 -1
  68. package/components/chunks/{MazCheckbox-Byqz8JJB.mjs → MazCheckbox-Db6sPUbV.mjs} +1 -1
  69. package/components/chunks/{MazChecklist-BLxsNHMP.mjs → MazChecklist-C95Y4Hb-.mjs} +112 -118
  70. package/components/chunks/{MazDialog-CPgFpAlq.mjs → MazDialog-khofH-7I.mjs} +66 -81
  71. package/components/chunks/MazDialogPromise-ZRA2ZrO4.mjs +488 -0
  72. package/components/chunks/{MazExpandAnimation-Bkw_wFTi.mjs → MazExpandAnimation-MDimlZGj.mjs} +7 -8
  73. package/components/chunks/{MazGallery-BMFwld84.mjs → MazGallery-CXQiXWFr.mjs} +267 -225
  74. package/components/chunks/{MazGallery-BKL7gfrz.mjs → MazGallery-VTZUhBKC.mjs} +249 -207
  75. package/components/chunks/{MazIcon-D8V8ixhf.mjs → MazIcon-BF5TFzse.mjs} +1 -1
  76. package/components/chunks/{MazInput-O6Q41Fm0.mjs → MazInput-DC3S-CVu.mjs} +43 -52
  77. package/components/chunks/{MazInput-CBiCdd0F.mjs → MazInput-DzWkS-g8.mjs} +41 -50
  78. package/components/chunks/{MazInput-Dx2cCzFS.mjs → MazInput-NE6H-10w.mjs} +38 -47
  79. package/components/chunks/{MazInputNumber-DYPVUz4k.mjs → MazInputNumber-DRXQXHRv.mjs} +168 -189
  80. package/components/chunks/{MazInputPrice-DZD7ZZpm.mjs → MazInputPrice-DoTnDDIN.mjs} +49 -58
  81. package/components/chunks/{MazInputTags-CxXBsTdM.mjs → MazInputTags-Dj3sW-e5.mjs} +189 -209
  82. package/components/chunks/{MazLink-Dl9ePCGm.mjs → MazLink-C_3Wya94.mjs} +19 -31
  83. package/components/chunks/{MazLoadingBar-Di2OIrPD.mjs → MazLoadingBar-DdjHRC7g.mjs} +1 -1
  84. package/components/chunks/MazPagination-BkT4_LLW.mjs +330 -0
  85. package/components/chunks/{MazPhoneNumberInput-C4TX1tGw.mjs → MazPhoneNumberInput-BbssOUzo.mjs} +503 -547
  86. package/components/chunks/{MazPicker-BcQ_-AJH.mjs → MazPicker-DwWiIYAR.mjs} +244 -265
  87. package/components/chunks/{MazPickerMonthSwitcher-hCAkEd5r.mjs → MazPickerMonthSwitcher-CmFFQoPA.mjs} +1 -1
  88. package/components/chunks/{MazPickerShortcuts-vpLyw1de.mjs → MazPickerShortcuts-DaELz7aq.mjs} +1 -1
  89. package/components/chunks/{MazPickerYearSwitcher-DvC79vrt.mjs → MazPickerYearSwitcher-m1_KXnpA.mjs} +1 -1
  90. package/components/chunks/{MazSelect-BXzgSKmL.mjs → MazSelect-BJ07NVXQ.mjs} +160 -180
  91. package/components/chunks/{MazSelect-Baj2BQH7.mjs → MazSelect-CDV9Fx6m.mjs} +124 -136
  92. package/components/chunks/{MazSpinner-Bvb-lKER.mjs → MazSpinner-Bb3f2t6w.mjs} +1 -1
  93. package/components/chunks/{MazSpinner-Cqp-BMvL.mjs → MazSpinner-BcB0szZB.mjs} +1 -1
  94. package/components/chunks/{MazSpinner-C1SiKhfK.mjs → MazSpinner-BpkPcfCt.mjs} +1 -1
  95. package/components/chunks/{MazSpinner-CAbYLlEZ.mjs → MazSpinner-BsYJDmi9.mjs} +1 -1
  96. package/components/chunks/MazSpinner-BymqEMBk.mjs +34 -0
  97. package/components/chunks/MazSpinner-C-64WJje.mjs +34 -0
  98. package/components/chunks/MazSpinner-CEFbkZkM.mjs +34 -0
  99. package/components/chunks/{MazSpinner-B8akphXs.mjs → MazSpinner-CfiIXW8y.mjs} +1 -1
  100. package/components/chunks/MazSpinner-CykRbNHD.mjs +34 -0
  101. package/components/chunks/{MazSpinner-C-z3-68w.mjs → MazSpinner-D3-pqOh3.mjs} +1 -1
  102. package/components/chunks/{MazSpinner-B5lezvu4.mjs → MazSpinner-DS58mtzm.mjs} +1 -1
  103. package/components/chunks/{MazSpinner-DwSGm0-X.mjs → MazSpinner-DmiLBQgR.mjs} +1 -1
  104. package/components/chunks/MazSpinner-Dmkr_r9u.mjs +34 -0
  105. package/components/chunks/MazSpinner-DoRGA1RI.mjs +34 -0
  106. package/components/chunks/MazSpinner-eC03bFP5.mjs +34 -0
  107. package/components/chunks/{MazSpinner-Cb3_S0zT.mjs → MazSpinner-edxn0ncQ.mjs} +1 -1
  108. package/components/chunks/MazSpinner-f2Mc2eRO.mjs +34 -0
  109. package/components/chunks/MazSpinner-n4Dp5ZsH.mjs +34 -0
  110. package/components/chunks/MazStepper-BREfkpUb.mjs +213 -0
  111. package/components/chunks/{MazTable-CulBGLaj.mjs → MazTable-BJDPdIJB.mjs} +183 -227
  112. package/components/chunks/{MazTableCell-BXDbkEJq.mjs → MazTableCell-DILuUCTe.mjs} +1 -1
  113. package/components/chunks/{MazTableRow-Ds3CDEit.mjs → MazTableRow-D6H6-c8J.mjs} +1 -1
  114. package/components/chunks/{MazTableTitle-uirsgvk_.mjs → MazTableTitle-Ch-nyY1E.mjs} +1 -1
  115. package/components/chunks/MazTabsBar-CM-w7V97.mjs +193 -0
  116. package/components/chunks/{MazTransitionExpand-4Ll_5LDO.mjs → MazTransitionExpand-PmUDa51_.mjs} +1 -1
  117. package/css/main.css +1 -1
  118. package/modules/assets/index.css +1 -1
  119. package/modules/chunks/MazBtn-B_Xlvgbg.cjs +1 -0
  120. package/modules/chunks/MazBtn-Dsr06Zgg.mjs +106 -0
  121. package/modules/chunks/{MazIcon-BtomZnkQ.cjs → MazIcon-CkuzyufF.cjs} +1 -1
  122. package/modules/chunks/{MazIcon-BB0DMfOc.mjs → MazIcon-DEgoQbMj.mjs} +1 -1
  123. package/modules/chunks/{MazSpinner-CDJhmIRl.mjs → MazSpinner-BurN-1pb.mjs} +1 -1
  124. package/modules/chunks/{MazSpinner-BASKjaLe.cjs → MazSpinner-jP4QsCNE.cjs} +1 -1
  125. package/modules/chunks/index-CUNN0eIB.cjs +124 -0
  126. package/modules/chunks/{index-C2yAjM0P.mjs → index-CxFUggmu.mjs} +925 -931
  127. package/modules/index.cjs +1 -1
  128. package/modules/index.mjs +1 -1
  129. package/nuxt/index.json +1 -1
  130. package/package.json +1 -1
  131. package/types/components/MazChart.vue.d.ts +1 -1
  132. package/types/components/MazTable.vue.d.ts +31 -54
  133. package/types/modules/composables/useFormValidator/types.d.ts +5 -1
  134. package/types/modules/composables/useFormValidator/useFormField.d.ts +3 -3
  135. package/types/modules/composables/useFormValidator/useFormValidator.d.ts +2 -2
  136. package/types/modules/composables/useFormValidator/utils.d.ts +12 -12
  137. package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +5 -5
  138. package/types/modules/helpers/check-availability.d.ts +1 -0
  139. package/components/chunks/MazBtn-BRUaoP8j.mjs +0 -126
  140. package/components/chunks/MazBtn-BRnLMzhy.mjs +0 -118
  141. package/components/chunks/MazBtn-BhnOApJu.mjs +0 -118
  142. package/components/chunks/MazBtn-C28vKP_v.mjs +0 -118
  143. package/components/chunks/MazBtn-CweCwE_4.mjs +0 -118
  144. package/components/chunks/MazBtn-D7IKoL2c.mjs +0 -118
  145. package/components/chunks/MazBtn-DlD5m7T4.mjs +0 -118
  146. package/components/chunks/MazBtn-Dt8lr0GH.mjs +0 -118
  147. package/components/chunks/MazBtn-Mu18egu5.mjs +0 -118
  148. package/components/chunks/MazBtn-igor8wRn.mjs +0 -118
  149. package/components/chunks/MazDialogPromise-BCCdkrea.mjs +0 -522
  150. package/components/chunks/MazPagination-CHTMRRqE.mjs +0 -362
  151. package/components/chunks/MazSpinner-Cg26sBU2.mjs +0 -34
  152. package/components/chunks/MazSpinner-CvT-9sC7.mjs +0 -34
  153. package/components/chunks/MazSpinner-DH6C15pU.mjs +0 -34
  154. package/components/chunks/MazSpinner-DlMKBtyt.mjs +0 -34
  155. package/components/chunks/MazSpinner-Dyf9yb51.mjs +0 -34
  156. package/components/chunks/MazSpinner-M4r0cykl.mjs +0 -34
  157. package/components/chunks/MazSpinner-QHjOczon.mjs +0 -34
  158. package/components/chunks/MazSpinner-cqcpf_FX.mjs +0 -34
  159. package/components/chunks/MazSpinner-yPkPj7Q8.mjs +0 -34
  160. package/components/chunks/MazStepper-DRWtYHZR.mjs +0 -232
  161. package/components/chunks/MazTabsBar-MZYefBb8.mjs +0 -204
  162. package/modules/chunks/MazBtn-D_CpNgpD.cjs +0 -9
  163. package/modules/chunks/index-BIX1NMzX.cjs +0 -149
@@ -1,232 +0,0 @@
1
- import { defineComponent as J, useCssVars as K, defineAsyncComponent as f, computed as h, useSlots as Q, ref as U, openBlock as a, createElementBlock as c, Fragment as b, renderList as X, normalizeClass as M, createElementVNode as u, createBlock as w, resolveDynamicComponent as A, createCommentVNode as l, renderSlot as v, unref as P, createTextVNode as y, toDisplayString as g, createVNode as Y, withCtx as Z } from "vue";
2
- import '../assets/MazStepper.css';const ee = { class: "m-stepper" }, te = ["id", "disabled", "onClick"], ne = { class: "m-stepper__header__wrapper" }, oe = { class: "m-stepper__count --primary" }, se = { class: "m-stepper__count__circle" }, ae = { class: "m-stepper__header__content" }, le = { class: "m-stepper__title" }, ie = {
3
- key: 0,
4
- class: "m-stepper__subtitle"
5
- }, re = {
6
- key: 0,
7
- class: "m-stepper__right"
8
- }, ce = { class: "m-stepper__content__wrapper" }, ue = /* @__PURE__ */ J({
9
- __name: "MazStepper",
10
- props: {
11
- modelValue: { default: void 0 },
12
- steps: { default: void 0 },
13
- color: { default: "primary" },
14
- disabledNextSteps: { type: Boolean },
15
- disabledPreviousSteps: { type: Boolean },
16
- autoValidateSteps: { type: Boolean },
17
- allStepsOpened: { type: Boolean },
18
- allStepsValidated: { type: Boolean },
19
- canCloseSteps: { type: Boolean }
20
- },
21
- emits: ["update:model-value"],
22
- setup(m, { emit: $ }) {
23
- K((t) => ({
24
- "151573d6": R.value,
25
- "86f40424": q.value
26
- }));
27
- const n = m, C = $, k = f(() => import("./MazIcon-BbvBov5G.mjs")), W = f(() => import("./MazExpandAnimation-Bkw_wFTi.mjs")), T = f(() => import("./check-circle-Bf7AGSQ-.mjs")), j = f(
28
- () => import("./exclamation-circle-CUk0ZajS.mjs")
29
- ), L = f(() => import("./exclamation-triangle-Z6d0ygp8.mjs")), R = h(() => `var(--maz-color-${n.color})`), q = h(() => `var(--maz-color-${n.color}-contrast)`), z = Q(), S = h(
30
- () => Object.keys(z).filter((t) => t.startsWith("content-")).length
31
- ), E = U(1), s = h({
32
- get: () => n.modelValue ?? E.value,
33
- set: (t) => {
34
- E.value = t, C("update:model-value", t);
35
- }
36
- });
37
- function I(t) {
38
- return N(t) ? { icon: T, class: "--success" } : O(t) ? { icon: L, class: "--warning" } : D(t) ? { icon: j, class: "--error" } : { class: "--normal" };
39
- }
40
- function p(t) {
41
- var o, e;
42
- return (e = (o = n.steps) == null ? void 0 : o[t - 1]) == null ? void 0 : e.icon;
43
- }
44
- function V(t, o) {
45
- var e, i;
46
- return (i = (e = n.steps) == null ? void 0 : e[o - 1]) == null ? void 0 : i[t];
47
- }
48
- function x(t) {
49
- s.value === t && n.canCloseSteps ? s.value = 0 : t < 1 ? s.value = 1 : t > S.value ? s.value = S.value : s.value = t;
50
- }
51
- function B(t, o) {
52
- var r, _;
53
- const e = t === "titleInfo" ? "title-info" : t, i = Object.keys(z).filter((H) => H.startsWith(`${e}-`)).includes(`${e}-${o}`), d = !!((_ = (r = n.steps) == null ? void 0 : r[o - 1]) != null && _[t]);
54
- return i || d;
55
- }
56
- function N(t) {
57
- var d, r;
58
- const o = (r = (d = n.steps) == null ? void 0 : d[t - 1]) == null ? void 0 : r.success, e = D(t) || O(t), i = n.autoValidateSteps && t < s.value && !e;
59
- return o ?? (i || n.allStepsValidated);
60
- }
61
- function F(t) {
62
- var r, _;
63
- const o = (_ = (r = n.steps) == null ? void 0 : r[t - 1]) == null ? void 0 : _.disabled, e = s.value === t && !n.canCloseSteps, i = n.disabledNextSteps && t > s.value, d = n.disabledPreviousSteps && t < s.value;
64
- return o ?? (e || i || d || n.allStepsOpened);
65
- }
66
- function D(t) {
67
- var o, e;
68
- return (e = (o = n.steps) == null ? void 0 : o[t - 1]) == null ? void 0 : e.error;
69
- }
70
- function O(t) {
71
- var o, e;
72
- return (e = (o = n.steps) == null ? void 0 : o[t - 1]) == null ? void 0 : e.warning;
73
- }
74
- function G(t) {
75
- return t === S.value;
76
- }
77
- return (t, o) => (a(), c("div", ee, [
78
- (a(!0), c(
79
- b,
80
- null,
81
- X(S.value, (e) => (a(), c(
82
- b,
83
- { key: e },
84
- [
85
- B("title", e) ? (a(), c("button", {
86
- key: 0,
87
- id: `header-step-${e}`,
88
- type: "button",
89
- disabled: F(e),
90
- class: M(["m-stepper__header", [
91
- {
92
- "--is-current-step": e === s.value || t.allStepsOpened,
93
- "--disabled": e !== s.value && !t.allStepsOpened && F(e)
94
- },
95
- `${I(e).class}`
96
- ]]),
97
- onClick: (i) => x(e)
98
- }, [
99
- u("div", ne, [
100
- u("span", oe, [
101
- u("div", se, [
102
- I(e).icon ? (a(), w(A(I(e).icon), {
103
- key: 0,
104
- class: "icon maz-text-xl"
105
- })) : l("v-if", !0)
106
- ]),
107
- l(`
108
- @slot icon-\${step} - Replace step number in the circle by an icon for the step
109
- `),
110
- v(t.$slots, `icon-${e}`, {}, () => [
111
- p(e) ? (a(), c(
112
- b,
113
- { key: 0 },
114
- [
115
- typeof p(e) == "string" ? (a(), w(P(k), {
116
- key: 0,
117
- name: p(e)
118
- }, null, 8, ["name"])) : p(e) ? (a(), w(A(p(e)), { key: 1 })) : l("v-if", !0)
119
- ],
120
- 64
121
- /* STABLE_FRAGMENT */
122
- )) : (a(), c(
123
- b,
124
- { key: 1 },
125
- [
126
- y(
127
- g(e),
128
- 1
129
- /* TEXT */
130
- )
131
- ],
132
- 64
133
- /* STABLE_FRAGMENT */
134
- ))
135
- ], !0)
136
- ]),
137
- u("div", ae, [
138
- u("span", le, [
139
- l(`
140
- @slot title-\${step} - Title of the step
141
- `),
142
- v(t.$slots, `title-${e}`, {}, () => [
143
- y(
144
- g(V("title", e)),
145
- 1
146
- /* TEXT */
147
- )
148
- ], !0)
149
- ]),
150
- B("subtitle", e) ? (a(), c("span", ie, [
151
- l(`
152
- @slot title-\${step} - Subtitle of the step
153
- `),
154
- v(t.$slots, `subtitle-${e}`, {}, () => [
155
- y(
156
- g(V("subtitle", e)),
157
- 1
158
- /* TEXT */
159
- )
160
- ], !0)
161
- ])) : l("v-if", !0)
162
- ])
163
- ]),
164
- B("titleInfo", e) ? (a(), c("span", re, [
165
- l(`
166
- @slot title-info-\${step} - Info of the right of the step
167
- `),
168
- v(t.$slots, `title-info-${e}`, {}, () => [
169
- y(
170
- g(V("titleInfo", e)),
171
- 1
172
- /* TEXT */
173
- )
174
- ], !0)
175
- ])) : l("v-if", !0)
176
- ], 10, te)) : l("v-if", !0),
177
- u(
178
- "div",
179
- {
180
- class: M(["m-stepper__content", {
181
- "--no-border": G(e)
182
- }])
183
- },
184
- [
185
- Y(P(W), {
186
- "model-value": t.allStepsOpened || s.value === e,
187
- "aria-labelledby": `header-step-${e}`
188
- }, {
189
- default: Z(() => [
190
- u("div", ce, [
191
- l(` @slot content-\${step} - Content of the step
192
- @binding {boolean} validated - If the step is validated
193
- @binding {boolean} error - If the step has an error
194
- @binding {boolean} warning - If the step has a warning
195
- @binding {Function} previous-step - Function to go to the previous step
196
- @binding {Function} next-step - Function to go to the next step
197
- `),
198
- v(t.$slots, `content-${e}`, {
199
- validated: N(e),
200
- error: D(e),
201
- warning: O(e),
202
- nextStep: () => x(e + 1),
203
- previousStep: () => x(e - 1)
204
- }, void 0, !0)
205
- ])
206
- ]),
207
- _: 2
208
- /* DYNAMIC */
209
- }, 1032, ["model-value", "aria-labelledby"])
210
- ],
211
- 2
212
- /* CLASS */
213
- )
214
- ],
215
- 64
216
- /* STABLE_FRAGMENT */
217
- ))),
218
- 128
219
- /* KEYED_FRAGMENT */
220
- ))
221
- ]));
222
- }
223
- }), de = (m, $) => {
224
- const n = m.__vccOpts || m;
225
- for (const [C, k] of $)
226
- n[C] = k;
227
- return n;
228
- }, _e = /* @__PURE__ */ de(ue, [["__scopeId", "data-v-8407eada"]]);
229
- export {
230
- _e as M,
231
- de as _
232
- };
@@ -1,204 +0,0 @@
1
- import { inject as I, ref as l, defineComponent as N, defineAsyncComponent as x, computed as O, onBeforeMount as V, onMounted as B, watch as W, openBlock as f, createElementBlock as m, normalizeClass as p, createElementVNode as j, normalizeStyle as z, Fragment as q, renderList as H, createCommentVNode as g, renderSlot as C, createTextVNode as S, toDisplayString as T, createBlock as U, unref as D, withCtx as Q } from "vue";
2
- import '../assets/MazTabsBar.css';function X(r, a) {
3
- const i = I(r, a);
4
- if (!i)
5
- throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${r}`);
6
- return i;
7
- }
8
- l("system");
9
- l("system");
10
- const F = (r, a) => {
11
- const i = r.__vccOpts || r;
12
- for (const [o, c] of a)
13
- i[o] = c;
14
- return i;
15
- };
16
- function G(r) {
17
- return new Promise((a) => setTimeout(a, r));
18
- }
19
- const J = {
20
- cancelText: "Cancel",
21
- confirmText: "Confirm",
22
- cancelButton: {
23
- text: "Cancel",
24
- color: "danger"
25
- },
26
- confirmButton: {
27
- text: "Confirm",
28
- color: "success"
29
- }
30
- };
31
- l(J);
32
- l([]);
33
- const K = ["disabled", "onClick"], Y = /* @__PURE__ */ N({
34
- __name: "MazTabsBar",
35
- props: {
36
- items: {},
37
- persistent: { type: Boolean },
38
- queryParam: { default: "tab" },
39
- block: { type: Boolean },
40
- noElevation: { type: Boolean },
41
- autoScroll: { type: Boolean, default: !0 }
42
- },
43
- setup(r) {
44
- const a = r, i = x(() => import("./MazBadge-CNSfzYq-.mjs")), { currentTab: o, updateCurrentTab: c } = X("maz-tabs");
45
- function k(e) {
46
- c(e + 1), a.persistent && M(e + 1);
47
- }
48
- const v = l(), h = l([]);
49
- function y(e) {
50
- return o.value === e + 1;
51
- }
52
- function L({
53
- mazBtn: e,
54
- index: t
55
- }) {
56
- h.value[t] = e && "$el" in e ? e.$el : e;
57
- }
58
- const d = O(
59
- () => a.items.map((e) => ({
60
- label: typeof e == "string" ? e : e.label,
61
- disabled: typeof e == "string" ? !1 : e.disabled ?? !1,
62
- badge: typeof e == "string" ? void 0 : e.badge
63
- }))
64
- ), _ = l(), b = l(!1);
65
- async function w() {
66
- if (!a.autoScroll)
67
- return;
68
- await G(150);
69
- const e = v.value, t = h.value[o.value - 1];
70
- if (!e || !t)
71
- return;
72
- const n = 50;
73
- if (t.offsetLeft - n < e.scrollLeft || t.offsetLeft + t.offsetWidth > e.scrollLeft + e.clientWidth) {
74
- const E = window.getComputedStyle(e, "padding-left").paddingLeft, R = Number(E.slice(0, -2));
75
- e.scrollTo({
76
- left: t.offsetLeft - R - n,
77
- behavior: b.value ? "smooth" : "instant"
78
- });
79
- }
80
- if (typeof o.value != "number")
81
- return;
82
- const s = (t == null ? void 0 : t.offsetWidth) ?? 0, u = (t == null ? void 0 : t.offsetHeight) ?? 0, A = (t == null ? void 0 : t.offsetLeft) ?? 0;
83
- _.value = {
84
- transform: `translateX(${A}px)`,
85
- width: `${s}px`,
86
- height: `${u}px`
87
- }, b.value = !0;
88
- }
89
- function P(e, t) {
90
- return t ? {} : o.value === e + 1 ? "color: var(--maz-color-text)" : "color: var(--maz-color-muted)";
91
- }
92
- V(() => {
93
- (o.value < 1 || o.value > d.value.length) && console.error(
94
- `[maz-ui](MazTabsBar) The model-value should be between 1 and ${d.value.length}`
95
- );
96
- }), B(() => {
97
- (a.persistent || o.value) && w();
98
- }), W(
99
- () => [o.value, d.value],
100
- () => {
101
- w();
102
- }
103
- );
104
- function $() {
105
- const e = new URL(window.location.href);
106
- return Number(e.searchParams.get(a.queryParam));
107
- }
108
- function M(e) {
109
- const t = new URL(window.location.href);
110
- t.searchParams.set(a.queryParam, String(e)), window.history.replaceState({}, document.title, t.toString());
111
- }
112
- return B(async () => {
113
- a.persistent && c($() || o.value || 1);
114
- }), (e, t) => (f(), m(
115
- "div",
116
- {
117
- ref_key: "tabsBarRef",
118
- ref: v,
119
- class: p(["m-tabs-bar", {
120
- "--block": e.block,
121
- "--elevation": !e.noElevation
122
- }])
123
- },
124
- [
125
- j(
126
- "div",
127
- {
128
- class: p(["m-tabs-bar__indicator", { "--animated": b.value }]),
129
- style: z([_.value])
130
- },
131
- null,
132
- 6
133
- /* CLASS, STYLE */
134
- ),
135
- (f(!0), m(
136
- q,
137
- null,
138
- H(d.value, (n, s) => (f(), m("button", {
139
- key: s,
140
- ref_for: !0,
141
- ref: (u) => L({ mazBtn: u, index: s }),
142
- class: p([{ "--active": y(s), "--disabled": n.disabled }, "m-tabs-bar__item"]),
143
- disabled: n.disabled,
144
- style: z(P(s, n.disabled)),
145
- onClick: (u) => n.disabled ? void 0 : k(s)
146
- }, [
147
- g(`
148
- @slot item - Content of item to display in the tabs bar
149
- @binding {MazTabsBarItem[]} item - all data of the item
150
- @binding {boolean} active - \`true\` if the tab is active
151
- @binding {number} index - index of the item
152
- `),
153
- C(e.$slots, "item", {
154
- item: n,
155
- active: y(s),
156
- index: s
157
- }, () => [
158
- S(
159
- T(n.label) + " ",
160
- 1
161
- /* TEXT */
162
- ),
163
- n.badge ? (f(), U(D(i), {
164
- key: 0,
165
- color: n.badge.color,
166
- pastel: n.badge.pastel,
167
- outline: n.badge.outline,
168
- "rounded-size": n.badge.roundedSize,
169
- size: n.badge.size ?? "0.7rem",
170
- class: "m-tabs-bar__item__badge"
171
- }, {
172
- default: Q(() => [
173
- g(`
174
- @slot badge-content - Content in the badge
175
- @binding {string | number | boolean} content - content of the badge provided in item
176
- `),
177
- C(e.$slots, "badge-content", {
178
- content: n.badge.content
179
- }, () => [
180
- S(
181
- T(n.badge.content),
182
- 1
183
- /* TEXT */
184
- )
185
- ], !0)
186
- ]),
187
- _: 2
188
- /* DYNAMIC */
189
- }, 1032, ["color", "pastel", "outline", "rounded-size", "size"])) : g("v-if", !0)
190
- ], !0)
191
- ], 14, K))),
192
- 128
193
- /* KEYED_FRAGMENT */
194
- ))
195
- ],
196
- 2
197
- /* CLASS */
198
- ));
199
- }
200
- }), ee = /* @__PURE__ */ F(Y, [["__scopeId", "data-v-c3d56dd1"]]);
201
- export {
202
- ee as M,
203
- F as _
204
- };
@@ -1,9 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../assets/MazBtn.css');const e=require("vue"),B=require("./index-BIX1NMzX.cjs"),g={key:2,class:"m-btn-loader-container"},j=e.defineComponent({__name:"MazBtn",props:{variant:{default:"button"},size:{default:"md"},color:{default:"primary"},type:{default:"button"},rounded:{type:Boolean},roundedSize:{default:"lg"},noRounded:{type:Boolean},outline:{type:Boolean},pastel:{type:Boolean},block:{type:Boolean},noUnderline:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},fab:{type:Boolean},icon:{type:[String,Function,Object],default:void 0},leftIcon:{type:[String,Function,Object],default:void 0},rightIcon:{type:[String,Function,Object],default:void 0},noPadding:{type:Boolean},noElevation:{type:Boolean},justify:{default:"center"}},setup(u){const n=u,c=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazSpinner-BASKjaLe.cjs"))),l=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazIcon-BtomZnkQ.cjs"))),{href:d,to:m}=e.useAttrs(),a=e.useSlots(),r=e.computed(()=>d?"a":m?"router-link":"button"),f=e.computed(()=>n.pastel?`--${n.color}-pastel`:n.outline?`--${n.color}-outline`:`--${n.color}`),s=e.computed(()=>(n.loading||n.disabled)&&r.value==="button"),p=e.computed(()=>s.value?"--cursor-default":"--cursor-pointer"),y=e.computed(()=>`--is-${n.variant}`),v=e.computed(()=>n.loading&&n.variant==="button"),b=e.computed(()=>!!a["left-icon"]||n.leftIcon),i=e.computed(()=>!!a["right-icon"]||n.rightIcon),z=e.computed(()=>b.value||i.value),C=e.computed(()=>n.icon||!!a.icon),h=e.computed(()=>r.value==="button"?n.type:void 0),t=e.computed(()=>n.size==="xl"?"maz-text-3xl":n.size==="lg"?"maz-text-2xl":n.size==="md"?"maz-text-xl":n.size==="sm"?"maz-text-lg":n.size==="xs"?"maz-text-base":n.size==="mini"?"maz-text-sm":"md"),k=e.computed(()=>n.justify==="start"?"maz-justify-start":n.justify==="end"?"maz-justify-end":n.justify==="center"?"maz-justify-center":n.justify==="between"?"maz-justify-between":n.justify==="around"?"maz-justify-around":n.justify==="evenly"?"maz-justify-evenly":"maz-justify-center");return(o,S)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{disabled:s.value||void 0,class:e.normalizeClass(["m-btn",[`--${o.size}`,!o.fab&&!o.rounded&&o.roundedSize&&`--rounded-${o.roundedSize}`,f.value,p.value,y.value,k.value,{"--block":o.block,"--no-underline":o.noUnderline,"--fab":o.fab,"--loading":o.loading,"--disabled":s.value,"--icon":z.value,"--rounded":o.rounded,"--no-rounded":o.noRounded,"--no-padding":o.noPadding,"--no-elevation":o.noElevation}]]),type:h.value},{default:e.withCtx(()=>[e.createCommentVNode(`
2
- @slot left-icon - The icon to display on the left of the button
3
- `),e.renderSlot(o.$slots,"left-icon",{},()=>[typeof o.leftIcon=="string"?(e.openBlock(),e.createBlock(e.unref(l),{key:0,name:o.leftIcon,class:e.normalizeClass([t.value])},null,8,["name","class"])):o.leftIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.leftIcon),{key:1,class:e.normalizeClass([t.value])},null,8,["class"])):e.createCommentVNode("v-if",!0)],!0),e.createCommentVNode(`
4
- @slot icon - The icon to display on the fab button
5
- `),C.value?e.renderSlot(o.$slots,"icon",{key:0},()=>[typeof o.icon=="string"?(e.openBlock(),e.createBlock(e.unref(l),{key:0,name:o.icon,class:e.normalizeClass([t.value])},null,8,["name","class"])):o.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon),{key:1,class:e.normalizeClass([t.value])},null,8,["class"])):e.createCommentVNode("v-if",!0)],!0):e.createCommentVNode("v-if",!0),e.createCommentVNode(`
6
- @slot default - The content of the button
7
- `),e.renderSlot(o.$slots,"default",{},void 0,!0),e.createCommentVNode(`
8
- @slot left-icon - The icon to display on the left of the button
9
- `),i.value?e.renderSlot(o.$slots,"right-icon",{key:1},()=>[typeof o.rightIcon=="string"?(e.openBlock(),e.createBlock(e.unref(l),{key:0,name:o.rightIcon,class:e.normalizeClass([t.value])},null,8,["name","class"])):o.rightIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.rightIcon),{key:1,class:e.normalizeClass([t.value])},null,8,["class"])):e.createCommentVNode("v-if",!0)],!0):e.createCommentVNode("v-if",!0),v.value?(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(e.unref(c),{size:"2em",color:o.color},null,8,["color"])])):e.createCommentVNode("v-if",!0)]),_:3},8,["disabled","class","type"]))}}),I=B._export_sfc(j,[["__scopeId","data-v-d3a1ed01"]]);exports.default=I;