maz-ui 3.46.1-beta.5 → 3.46.1-beta.6

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 (122) hide show
  1. package/components/MazBottomSheet.mjs +1 -1
  2. package/components/MazBtn.d.ts +5 -0
  3. package/components/MazBtn.mjs +1 -1
  4. package/components/MazCard.mjs +1 -1
  5. package/components/MazCarousel.mjs +1 -1
  6. package/components/MazDialog.mjs +1 -1
  7. package/components/MazDialogPromise.mjs +1 -1
  8. package/components/MazDrawer.mjs +1 -1
  9. package/components/MazDropdown.mjs +1 -1
  10. package/components/MazInput.mjs +1 -1
  11. package/components/MazInputNumber.mjs +1 -1
  12. package/components/MazInputPrice.mjs +1 -1
  13. package/components/MazInputTags.mjs +1 -1
  14. package/components/MazPagination.mjs +1 -1
  15. package/components/MazPhoneNumberInput.mjs +1 -1
  16. package/components/MazPicker.mjs +1 -1
  17. package/components/MazPullToRefresh.d.ts +2 -2
  18. package/components/MazSelect.mjs +1 -1
  19. package/components/MazTable.d.ts +2 -2
  20. package/components/MazTable.mjs +1 -1
  21. package/components/assets/MazBtn.css +1 -1
  22. package/components/assets/MazInputNumber.css +1 -1
  23. package/components/assets/MazInputTags.css +1 -1
  24. package/components/assets/MazPagination.css +1 -1
  25. package/components/assets/MazPicker.css +1 -1
  26. package/components/assets/MazSelect.css +1 -1
  27. package/components/assets/MazTable.css +1 -1
  28. package/components/chunks/{MazBottomSheet-s9lLaK1M.mjs → MazBottomSheet-DeAah_or.mjs} +1 -1
  29. package/components/chunks/MazBtn-BV212IYv.mjs +118 -0
  30. package/components/chunks/{MazBtn-CHABo63Y.mjs → MazBtn-BXvObcWn.mjs} +21 -19
  31. package/components/chunks/{MazBtn-BXdap6JU.mjs → MazBtn-C2dJYsnq.mjs} +21 -19
  32. package/components/chunks/MazBtn-C2htID_X.mjs +118 -0
  33. package/components/chunks/MazBtn-C4xZC-A2.mjs +118 -0
  34. package/components/chunks/{MazBtn-CVB5qDjV.mjs → MazBtn-C5IbN0rp.mjs} +34 -32
  35. package/components/chunks/MazBtn-CEFfMm7k.mjs +118 -0
  36. package/components/chunks/{MazBtn-BMmuCciQ.mjs → MazBtn-CESOVC-a.mjs} +20 -18
  37. package/components/chunks/MazBtn-CLFly8Ie.mjs +118 -0
  38. package/components/chunks/MazBtn-CRpqDW12.mjs +118 -0
  39. package/components/chunks/MazBtn-D2H26ExI.mjs +118 -0
  40. package/components/chunks/MazBtn-y4vRRWDg.mjs +118 -0
  41. package/components/chunks/{MazBtn-DarjZUV4.mjs → MazBtn-zMzxqcCs.mjs} +34 -32
  42. package/components/chunks/{MazCard-BaJ5Ee3I.mjs → MazCard-BF-2_gZV.mjs} +1 -1
  43. package/components/chunks/{MazCarousel-Bb4fpVqN.mjs → MazCarousel-DVBUt8NL.mjs} +1 -1
  44. package/components/chunks/{MazCheckbox-C4diNXJq.mjs → MazCheckbox-CEfJco3U.mjs} +1 -1
  45. package/components/chunks/MazCheckbox-CeVxgVY8.mjs +146 -0
  46. package/components/chunks/{MazCheckbox-8n6NtRBb.mjs → MazCheckbox-mgtQBs4K.mjs} +1 -1
  47. package/components/chunks/{MazDialog-Bv2PzQBz.mjs → MazDialog-fn7vXgBg.mjs} +1 -1
  48. package/components/chunks/{MazDialogPromise-BZLP9sXZ.mjs → MazDialogPromise-C8dpQb5k.mjs} +2 -2
  49. package/components/chunks/{MazGallery-C9secrXc.mjs → MazGallery-CXJsK5ve.mjs} +2 -2
  50. package/components/chunks/{MazIcon-CudB1a0D.mjs → MazIcon-BXX3RaoN.mjs} +1 -1
  51. package/components/chunks/{MazIcon-BaJm2s8_.mjs → MazIcon-DjMuw8Bz.mjs} +1 -1
  52. package/components/chunks/MazInput-AcA93-8Q.mjs +291 -0
  53. package/components/chunks/{MazInput-B3RzuuNv.mjs → MazInput-Dnwxraz4.mjs} +1 -1
  54. package/components/chunks/{MazInputNumber-mLgq5obR.mjs → MazInputNumber-OY_UqCMs.mjs} +173 -171
  55. package/components/chunks/{MazInputPrice-DhYRBqTS.mjs → MazInputPrice-DvVAZa12.mjs} +1 -1
  56. package/components/chunks/{MazInputTags-DinwbXaD.mjs → MazInputTags-DKlGT2IB.mjs} +170 -168
  57. package/components/chunks/MazLoadingBar-By1umvdC.mjs +32 -0
  58. package/components/chunks/{MazPagination-Cqnr19iI.mjs → MazPagination-BL9LU84U.mjs} +132 -130
  59. package/components/chunks/{MazPhoneNumberInput-C3GdtqN2.mjs → MazPhoneNumberInput-C7gUk5lg.mjs} +3 -3
  60. package/components/chunks/{MazPicker-DA92HhwS.mjs → MazPicker-Dhm3u2MN.mjs} +536 -534
  61. package/components/chunks/{MazPickerMonthSwitcher-CPWkw0Hq.mjs → MazPickerMonthSwitcher-ck8cl1-N.mjs} +1 -1
  62. package/components/chunks/{MazPickerShortcuts-Fwcoqg5M.mjs → MazPickerShortcuts-hEpUqVC-.mjs} +1 -1
  63. package/components/chunks/{MazPickerYearSwitcher-DfSXPGfT.mjs → MazPickerYearSwitcher-CmMxOc69.mjs} +1 -1
  64. package/components/chunks/MazSelect-CGsMRdr7.mjs +568 -0
  65. package/components/chunks/{MazSelect-DPTuyc26.mjs → MazSelect-ed445MXs.mjs} +2 -2
  66. package/components/chunks/{MazSpinner-BCQzF6j-.mjs → MazSpinner-Akyx5wgU.mjs} +1 -1
  67. package/components/chunks/{MazSpinner-B-mc1FWS.mjs → MazSpinner-B2dsE23u.mjs} +1 -1
  68. package/components/chunks/{MazSpinner-CVBz5HIx.mjs → MazSpinner-BCOeuzTB.mjs} +1 -1
  69. package/components/chunks/{MazSpinner-BpjK60ul.mjs → MazSpinner-BakExtKd.mjs} +1 -1
  70. package/components/chunks/{MazSpinner-CFJmcsGl.mjs → MazSpinner-C9meLNrb.mjs} +1 -1
  71. package/components/chunks/{MazSpinner-C2ok6AlJ.mjs → MazSpinner-CKOy0M1T.mjs} +1 -1
  72. package/components/chunks/MazSpinner-CL6orjX7.mjs +37 -0
  73. package/components/chunks/MazSpinner-CQTq0J6f.mjs +37 -0
  74. package/components/chunks/{MazSpinner-BEqvmPiV.mjs → MazSpinner-CeZk8jA9.mjs} +1 -1
  75. package/components/chunks/MazSpinner-CqS3onAE.mjs +37 -0
  76. package/components/chunks/MazSpinner-D1zj-581.mjs +37 -0
  77. package/components/chunks/MazSpinner-DJ2t85tY.mjs +37 -0
  78. package/components/chunks/{MazSpinner-DEdQlQr1.mjs → MazSpinner-DbaTlD5B.mjs} +1 -1
  79. package/components/chunks/MazSpinner-DgJ9tVv_.mjs +37 -0
  80. package/components/chunks/{MazSpinner-BCHAzmqS.mjs → MazSpinner-DoKvoICM.mjs} +1 -1
  81. package/components/chunks/MazSpinner-Oy4E193R.mjs +37 -0
  82. package/components/chunks/MazTable-QwG-Kh88.mjs +692 -0
  83. package/components/chunks/MazTableCell-BSNyqTSX.mjs +23 -0
  84. package/components/chunks/MazTableRow-CgubMdrX.mjs +30 -0
  85. package/components/chunks/MazTableTitle-h4dattYD.mjs +23 -0
  86. package/components/chunks/{MazTransitionExpand-BoTQeNNf.mjs → MazTransitionExpand-BvqRDM9d.mjs} +1 -1
  87. package/components/chunks/arrow-up-DjSlktWl.mjs +30 -0
  88. package/components/chunks/inject-strict-BmiaNiwC.mjs +10 -0
  89. package/components/chunks/useInstanceUniqId-DW9jO1Sz.mjs +11 -0
  90. package/css/main.css +1 -1
  91. package/modules/assets/MazBtn.css +1 -1
  92. package/modules/chunks/{MazBtn-BG2dUdHV.cjs → MazBtn-DeAZcD0R.cjs} +3 -3
  93. package/{components/chunks/MazBtn-CXxOU7fp.mjs → modules/chunks/MazBtn-DvffpPyV.mjs} +21 -19
  94. package/modules/chunks/{MazIcon-RkWxQ8JM.cjs → MazIcon-BiwOZEZl.cjs} +1 -1
  95. package/modules/chunks/{MazIcon-BqfELHOt.mjs → MazIcon-D2B0umvn.mjs} +1 -1
  96. package/modules/chunks/{MazSpinner-GfL807jq.cjs → MazSpinner-CZIYnX05.cjs} +1 -1
  97. package/modules/chunks/{MazSpinner-DgSRxVEo.mjs → MazSpinner-Csgl_Uho.mjs} +1 -1
  98. package/modules/chunks/index-B6Pf_QhC.cjs +149 -0
  99. package/modules/chunks/{index-aKGx1nxl.mjs → index-C34aEXzu.mjs} +319 -314
  100. package/modules/index.cjs +1 -1
  101. package/modules/index.mjs +1 -1
  102. package/nuxt/index.json +1 -1
  103. package/package.json +1 -1
  104. package/types/components/MazBtn.vue.d.ts +5 -0
  105. package/types/components/MazPullToRefresh.vue.d.ts +2 -2
  106. package/types/components/MazTable.vue.d.ts +2 -2
  107. package/components/chunks/MazBtn-CZSXnr3w.mjs +0 -116
  108. package/components/chunks/MazBtn-CwYBz6QO.mjs +0 -116
  109. package/components/chunks/MazBtn-DIE2eM-g.mjs +0 -116
  110. package/components/chunks/MazBtn-DKD-ZMaF.mjs +0 -116
  111. package/components/chunks/MazBtn-OKT5-Y4s.mjs +0 -116
  112. package/components/chunks/MazBtn-e3abHT2L.mjs +0 -116
  113. package/components/chunks/MazSpinner-BoG1T_ZX.mjs +0 -37
  114. package/components/chunks/MazSpinner-DhHVVBJE.mjs +0 -37
  115. package/components/chunks/MazSpinner-DuGaC-cw.mjs +0 -37
  116. package/components/chunks/MazSpinner-Iwon82He.mjs +0 -37
  117. package/components/chunks/MazSpinner-JbfjMNFL.mjs +0 -37
  118. package/components/chunks/MazSpinner-QgcgF5j5.mjs +0 -37
  119. package/components/chunks/MazSpinner-yQGVxaFm.mjs +0 -37
  120. package/components/chunks/MazTable-CrtVI-dp.mjs +0 -2015
  121. package/modules/chunks/MazBtn-BeqYSSYI.mjs +0 -116
  122. package/modules/chunks/index-CE2CsQsx.cjs +0 -149
@@ -0,0 +1,692 @@
1
+ import { defineComponent as Ie, useCssVars as Oe, defineAsyncComponent as b, computed as d, toRefs as Me, provide as Ne, ref as k, watch as R, useSlots as Le, onBeforeMount as Te, openBlock as n, createElementBlock as v, normalizeClass as g, renderSlot as p, createElementVNode as z, toDisplayString as h, createCommentVNode as s, createBlock as S, unref as t, createVNode as u, normalizeStyle as oe, createTextVNode as I, withCtx as c, Fragment as _, renderList as G } from "vue";
2
+ import '../assets/MazTable.css';const Ee = {
3
+ key: 0,
4
+ class: "m-table-header"
5
+ }, Re = {
6
+ key: 0,
7
+ class: "m-table-spacer"
8
+ }, je = { class: "m-table-header-title" }, De = {
9
+ key: 1,
10
+ class: "m-table-header-search"
11
+ }, Fe = { key: 0 }, Ke = { key: 1 }, He = {
12
+ key: 0,
13
+ class: "m-table-sort-icon-wrapper"
14
+ }, Ue = { class: "maz-text-center maz-text-muted" }, Qe = {
15
+ key: 1,
16
+ class: "m-table-footer"
17
+ }, qe = {
18
+ key: 0,
19
+ class: "m-table-footer-pagination"
20
+ }, Ye = { class: "m-table-footer-pagination-items-per-page" }, _e = { class: "maz-hidden maz-text-sm tab-s:maz-block" }, Ge = {
21
+ key: 0,
22
+ class: "maz-whitespace-nowrap maz-text-sm"
23
+ }, Je = { class: "m-table-footer-pagination-buttons" }, We = /* @__PURE__ */ Ie({
24
+ __name: "MazTable",
25
+ props: {
26
+ tableClass: { default: void 0 },
27
+ tableStyle: { type: [Boolean, null, String, Object, Array], default: void 0 },
28
+ modelValue: { default: void 0 },
29
+ size: { default: "md" },
30
+ inputSize: {},
31
+ title: { default: void 0 },
32
+ headers: { default: void 0 },
33
+ sortable: { type: Boolean },
34
+ headersAlign: { default: "left" },
35
+ rows: { default: void 0 },
36
+ hoverable: { type: Boolean },
37
+ search: { type: Boolean },
38
+ noSearchInRow: { type: Boolean },
39
+ searchPlaceholder: { default: "Search" },
40
+ noSearchBy: { type: Boolean },
41
+ searchByPlaceholder: { default: "Search by" },
42
+ searchByAllLabel: { default: "All" },
43
+ searchQuery: { default: void 0 },
44
+ backgroundOdd: { type: Boolean },
45
+ backgroundEven: { type: Boolean },
46
+ elevation: { type: Boolean },
47
+ divider: { type: Boolean },
48
+ caption: { default: void 0 },
49
+ captionSide: { default: "bottom" },
50
+ pagination: { type: Boolean },
51
+ page: { default: 1 },
52
+ pageSize: { default: 20 },
53
+ totalPages: { default: void 0 },
54
+ paginationAllLabel: { default: "All" },
55
+ noPaginateRows: { type: Boolean },
56
+ totalItems: { default: void 0 },
57
+ loading: { type: Boolean },
58
+ selectable: { type: Boolean },
59
+ selectedKey: { default: void 0 },
60
+ tableLayout: { default: void 0 },
61
+ color: { default: "primary" },
62
+ translations: {},
63
+ roundedSize: { default: "lg" }
64
+ },
65
+ emits: ["update:model-value", "update:search-query", "update:page", "update:page-size"],
66
+ setup(O, { emit: j }) {
67
+ Oe((e) => ({
68
+ "107c4344": a.tableLayout,
69
+ cfe789ee: a.captionSide
70
+ }));
71
+ const a = O, P = j, D = b(() => import("./arrow-up-DjSlktWl.mjs")), J = b(() => import("./chevron-double-left-D4-NpyrF.mjs")), W = b(() => import("./chevron-left-BqVOLRdC.mjs")), se = b(() => import("./magnifying-glass--nBiyXot.mjs")), M = b(() => import("./MazBtn-BXvObcWn.mjs")), X = b(() => import("./MazCheckbox-CeVxgVY8.mjs")), ne = b(() => import("./MazInput-AcA93-8Q.mjs")), re = b(() => import("./MazLoadingBar-By1umvdC.mjs")), Z = b(() => import("./MazSelect-CGsMRdr7.mjs")), N = b(() => import("./MazTableCell-BSNyqTSX.mjs")), F = b(() => import("./MazTableRow-CgubMdrX.mjs")), K = b(() => import("./MazTableTitle-h4dattYD.mjs")), ie = {
72
+ noResults: "No results",
73
+ actionHeader: "Actions",
74
+ searchByAllLabel: "All",
75
+ searchByPlaceholder: "Search by",
76
+ searchPlaceholder: "Search",
77
+ paginationAllLabel: "All",
78
+ paginationRowsPerPage: "Rows per page",
79
+ paginationOf: "of"
80
+ }, B = d(() => {
81
+ const { translations: e, searchByAllLabel: o, searchByPlaceholder: l, searchPlaceholder: r, paginationAllLabel: i } = a;
82
+ return {
83
+ ...ie,
84
+ ...e,
85
+ searchByAllLabel: o,
86
+ searchByPlaceholder: l,
87
+ searchPlaceholder: r,
88
+ paginationAllLabel: i
89
+ };
90
+ }), ue = d(
91
+ () => a.divider && !a.backgroundEven && !a.backgroundOdd
92
+ ), { size: m, hoverable: de, backgroundEven: ce, backgroundOdd: ve } = Me(a);
93
+ Ne("maz-table", {
94
+ size: m,
95
+ hoverable: de,
96
+ backgroundEven: ce,
97
+ backgroundOdd: ve
98
+ });
99
+ const H = k(le()), U = d(() => a.selectable || !!a.selectedKey), L = k(a.page);
100
+ R(
101
+ () => a.page,
102
+ (e) => {
103
+ L.value = e;
104
+ }
105
+ );
106
+ const f = d({
107
+ get: () => L.value,
108
+ set: (e) => {
109
+ L.value = e, P("update:page", e);
110
+ }
111
+ }), pe = d(() => [
112
+ { label: B.value.paginationAllLabel, value: Number.POSITIVE_INFINITY },
113
+ { label: 5, value: 5 },
114
+ { label: 10, value: 10 },
115
+ { label: 20, value: 20 },
116
+ { label: 50, value: 50 },
117
+ { label: 100, value: 100 },
118
+ { label: 200, value: 200 }
119
+ ]), Q = k(a.pageSize);
120
+ R(
121
+ () => a.pageSize,
122
+ (e) => {
123
+ Q.value = e;
124
+ }
125
+ );
126
+ const C = d({
127
+ get: () => Q.value,
128
+ set: (e) => {
129
+ Q.value = e, P("update:page-size", e);
130
+ }
131
+ }), A = d(() => {
132
+ var e;
133
+ return a.totalPages ?? (C.value === Number.POSITIVE_INFINITY || !((e = a.rows) != null && e.length)) ? 1 : Math.ceil(a.rows.length / C.value);
134
+ });
135
+ function be() {
136
+ f.value = 1;
137
+ }
138
+ function me() {
139
+ f.value = A.value;
140
+ }
141
+ function fe() {
142
+ f.value = f.value - 1;
143
+ }
144
+ function ge() {
145
+ f.value = f.value + 1;
146
+ }
147
+ const x = d(() => {
148
+ if (!a.pagination || a.noPaginateRows || C.value === Number.POSITIVE_INFINITY)
149
+ return H.value;
150
+ const e = (L.value - 1) * C.value, o = e + C.value;
151
+ return H.value.slice(e, o);
152
+ });
153
+ R(
154
+ () => [a.rows, a.modelValue],
155
+ () => {
156
+ H.value = le();
157
+ }
158
+ );
159
+ const $ = k(), y = k(), V = k(Be()), T = k(), he = d(() => [
160
+ { label: a.searchByAllLabel, value: null },
161
+ ...V.value.map((e) => ({
162
+ label: e.label,
163
+ value: e.key
164
+ }))
165
+ ]), q = k(a.searchQuery);
166
+ R(
167
+ () => a.searchQuery,
168
+ (e) => {
169
+ q.value = e;
170
+ }
171
+ );
172
+ const E = d({
173
+ get: () => q.value,
174
+ set: (e) => {
175
+ q.value = e, P("update:search-query", e);
176
+ }
177
+ });
178
+ function ye(e) {
179
+ return [...e].sort((o, l) => {
180
+ if ($.value === void 0 || y.value === void 0)
181
+ return 0;
182
+ const r = o[V.value[$.value].key], i = l[V.value[$.value].key];
183
+ return typeof r == "string" && typeof i == "string" ? y.value === "ASC" ? r.localeCompare(i) : i.localeCompare(r) : y.value === "ASC" ? r - i : i - r;
184
+ });
185
+ }
186
+ function ze(e) {
187
+ if (a.noSearchInRow || typeof E.value != "string")
188
+ return x.value;
189
+ const o = E.value.toLowerCase();
190
+ return [...e].filter((l) => T.value ? String(l[T.value]).toLowerCase().includes(o) : Object.values(l).some((r) => typeof r == "string" || typeof r == "number" || typeof r == "boolean" ? String(r).toLowerCase().includes(o) : !1));
191
+ }
192
+ const w = d(() => {
193
+ const e = ze(x.value);
194
+ return ye(e);
195
+ }), Se = Le(), ee = d(() => a.search || !!a.title || !!Se.title), ke = d(() => a.pagination);
196
+ function Be() {
197
+ var e;
198
+ return ((e = a.headers) == null ? void 0 : e.map(
199
+ (o) => typeof o == "string" ? { label: o, align: a.headersAlign } : { align: a.headersAlign, thHeaders: o.headers, ...o }
200
+ )) ?? [];
201
+ }
202
+ function le() {
203
+ var e;
204
+ return ((e = a.rows) == null ? void 0 : e.map((o) => {
205
+ var l;
206
+ return {
207
+ selected: (l = a.modelValue) == null ? void 0 : l.includes(a.selectedKey ? o[a.selectedKey] : o),
208
+ ...o
209
+ };
210
+ })) ?? [];
211
+ }
212
+ function Ce(e) {
213
+ e === $.value ? y.value = y.value === void 0 ? "DESC" : y.value === "DESC" ? "ASC" : void 0 : y.value = "DESC", $.value = y.value === void 0 ? void 0 : e;
214
+ }
215
+ const ae = d({
216
+ get: () => w.value.every((e) => e.selected) ?? !1,
217
+ set: Ve
218
+ });
219
+ function Ve(e) {
220
+ for (const o of w.value)
221
+ o.selected = e;
222
+ Y();
223
+ }
224
+ function we(e, o) {
225
+ w.value[o].selected = e, Y();
226
+ }
227
+ function Y(e) {
228
+ e = e ?? te();
229
+ const o = e != null && e.length ? e : void 0;
230
+ P("update:model-value", o);
231
+ }
232
+ function te() {
233
+ return w.value.filter((e) => e.selected).map((e) => a.selectedKey ? e[a.selectedKey] : e);
234
+ }
235
+ return Te(() => {
236
+ const e = te();
237
+ e != null && e.length && Y(e);
238
+ }), (e, o) => (n(), v(
239
+ "div",
240
+ {
241
+ class: g(["m-table", { "--has-header": ee.value }])
242
+ },
243
+ [
244
+ ee.value ? (n(), v("div", Ee, [
245
+ e.title || e.$slots.title ? (n(), v("div", Re, [
246
+ p(e.$slots, "title", {}, () => [
247
+ z(
248
+ "span",
249
+ je,
250
+ h(e.title),
251
+ 1
252
+ /* TEXT */
253
+ )
254
+ ], !0)
255
+ ])) : s("v-if", !0),
256
+ e.search ? (n(), v("div", De, [
257
+ e.noSearchBy ? s("v-if", !0) : (n(), S(t(Z), {
258
+ key: 0,
259
+ modelValue: T.value,
260
+ "onUpdate:modelValue": o[0] || (o[0] = (l) => T.value = l),
261
+ "rounded-size": e.roundedSize,
262
+ color: e.color,
263
+ style: { width: "8rem" },
264
+ placeholder: B.value.searchByPlaceholder,
265
+ size: e.inputSize ?? t(m),
266
+ options: he.value
267
+ }, null, 8, ["modelValue", "rounded-size", "color", "placeholder", "size", "options"])),
268
+ u(t(ne), {
269
+ modelValue: E.value,
270
+ "onUpdate:modelValue": o[1] || (o[1] = (l) => E.value = l),
271
+ size: e.inputSize ?? t(m),
272
+ "rounded-size": e.roundedSize,
273
+ color: e.color,
274
+ debounce: 300,
275
+ placeholder: B.value.searchPlaceholder,
276
+ "left-icon": t(se)
277
+ }, null, 8, ["modelValue", "size", "rounded-size", "color", "placeholder", "left-icon"])
278
+ ])) : s("v-if", !0)
279
+ ])) : s("v-if", !0),
280
+ z(
281
+ "div",
282
+ {
283
+ class: g(["m-table-wrapper", [`--rounded-${e.roundedSize}`]])
284
+ },
285
+ [
286
+ z(
287
+ "table",
288
+ {
289
+ class: g([{ "--elevation": e.elevation, "--has-layout": e.tableLayout }, e.tableClass]),
290
+ style: oe(e.tableStyle)
291
+ },
292
+ [
293
+ e.caption || e.$slots.caption ? (n(), v("caption", Fe, [
294
+ s(`
295
+ @slot caption - add caption on top or bottom of the table
296
+ `),
297
+ p(e.$slots, "caption", {}, () => [
298
+ I(
299
+ h(e.caption),
300
+ 1
301
+ /* TEXT */
302
+ )
303
+ ], !0)
304
+ ])) : s("v-if", !0),
305
+ V.value ? (n(), v("thead", Ke, [
306
+ s(`
307
+ @slot thead - content in thead element
308
+ `),
309
+ p(e.$slots, "thead", {}, () => [
310
+ u(t(F), { "no-hoverable": "" }, {
311
+ default: c(() => [
312
+ U.value ? (n(), S(t(K), {
313
+ key: 0,
314
+ align: "left",
315
+ class: g([`--${t(m)}`, "m-table-select-column"])
316
+ }, {
317
+ default: c(() => [
318
+ u(t(X), {
319
+ modelValue: ae.value,
320
+ "onUpdate:modelValue": o[2] || (o[2] = (l) => ae.value = l),
321
+ size: "sm"
322
+ }, null, 8, ["modelValue"])
323
+ ]),
324
+ _: 1
325
+ /* STABLE */
326
+ }, 8, ["class"])) : s("v-if", !0),
327
+ (n(!0), v(
328
+ _,
329
+ null,
330
+ G(V.value, (l, r) => (n(), S(t(K), {
331
+ key: r,
332
+ scope: l.scope,
333
+ align: l.align,
334
+ rowspan: l.rowspan,
335
+ colspan: l.colspan,
336
+ headers: l.thHeaders,
337
+ style: oe({ width: l.width, textAlign: l.align }),
338
+ class: g(["maz-group", [
339
+ { "--hidden": l.hidden, "--sortable": l.sortable ?? e.sortable },
340
+ l.classes,
341
+ `--${t(m)}`
342
+ ]]),
343
+ onClick: (i) => (l.sortable ?? e.sortable) && Ce(r)
344
+ }, {
345
+ default: c(() => [
346
+ z(
347
+ "span",
348
+ {
349
+ class: g({ "maz-sr-only": l.srOnly })
350
+ },
351
+ [
352
+ s(`
353
+ @slot header - replace column header
354
+ @binding {Object} header - header data
355
+ @binding {String} label - header label
356
+ `),
357
+ p(e.$slots, "header", {
358
+ header: l,
359
+ label: l.label
360
+ }, () => [
361
+ s(`
362
+ @slot header-label-{key} - replace column header label
363
+ @binding {Object} header - header data
364
+ @binding {String} label - header label
365
+ `),
366
+ p(e.$slots, `header-label-${l.key}`, {
367
+ header: l,
368
+ label: l.label
369
+ }, () => [
370
+ I(
371
+ h(l.label),
372
+ 1
373
+ /* TEXT */
374
+ )
375
+ ], !0),
376
+ l.sortable ?? e.sortable ? (n(), v("div", He, [
377
+ u(t(D), {
378
+ class: g(["m-table-sort-icon maz-hidden group-hover:maz-block", {
379
+ "--sorted": r === $.value,
380
+ "--up": y.value === "DESC",
381
+ "--down": y.value === "ASC"
382
+ }])
383
+ }, null, 8, ["class"])
384
+ ])) : s("v-if", !0)
385
+ ], !0)
386
+ ],
387
+ 2
388
+ /* CLASS */
389
+ )
390
+ ]),
391
+ _: 2
392
+ /* DYNAMIC */
393
+ }, 1032, ["scope", "align", "rowspan", "colspan", "headers", "style", "class", "onClick"]))),
394
+ 128
395
+ /* KEYED_FRAGMENT */
396
+ )),
397
+ e.$slots.actions ? (n(), S(t(K), {
398
+ key: 1,
399
+ align: "left",
400
+ class: g(`--${t(m)}`)
401
+ }, {
402
+ default: c(() => [
403
+ s(`
404
+ @slot actions-header - replace text of actions header
405
+ `),
406
+ p(e.$slots, "actions-header", {}, () => [
407
+ I(
408
+ h(B.value.actionHeader),
409
+ 1
410
+ /* TEXT */
411
+ )
412
+ ], !0)
413
+ ]),
414
+ _: 3
415
+ /* FORWARDED */
416
+ }, 8, ["class"])) : s("v-if", !0)
417
+ ]),
418
+ _: 3
419
+ /* FORWARDED */
420
+ })
421
+ ], !0)
422
+ ])) : s("v-if", !0),
423
+ e.loading ? (n(), S(t(re), {
424
+ key: 2,
425
+ color: e.color,
426
+ class: "!maz-absolute"
427
+ }, null, 8, ["color"])) : s("v-if", !0),
428
+ z(
429
+ "tbody",
430
+ {
431
+ class: g({ "--divider": ue.value })
432
+ },
433
+ [
434
+ p(e.$slots, "default", {}, () => [
435
+ w.value.length > 0 ? (n(!0), v(
436
+ _,
437
+ { key: 0 },
438
+ G(w.value, (l, r) => (n(), S(t(F), {
439
+ key: r,
440
+ class: g(l.classes),
441
+ onClick: (i) => l.action && l.action(l)
442
+ }, {
443
+ default: c(() => [
444
+ U.value ? (n(), S(
445
+ t(N),
446
+ {
447
+ key: 0,
448
+ class: "m-table-select-column"
449
+ },
450
+ {
451
+ default: c(() => [
452
+ s(`
453
+ @slot select - replace checkbox component
454
+ @binding {Object} row - row data
455
+ @binding {Boolean} selected - if selected or not
456
+ `),
457
+ p(e.$slots, "select", {
458
+ row: l,
459
+ selected: l.selected
460
+ }, () => [
461
+ u(t(X), {
462
+ size: "sm",
463
+ "model-value": l.selected,
464
+ "onUpdate:modelValue": (i) => we(i, r)
465
+ }, null, 8, ["model-value", "onUpdate:modelValue"])
466
+ ], !0)
467
+ ]),
468
+ _: 2
469
+ /* DYNAMIC */
470
+ },
471
+ 1024
472
+ /* DYNAMIC_SLOTS */
473
+ )) : s("v-if", !0),
474
+ (n(!0), v(
475
+ _,
476
+ null,
477
+ G(V.value, ({ key: i, align: Pe, classes: $e }, Ae) => (n(), S(t(N), {
478
+ key: Ae,
479
+ align: Pe,
480
+ class: g($e)
481
+ }, {
482
+ default: c(() => [
483
+ s(`
484
+ @slot cell - replace all row cells
485
+ @binding {Object} row - row data
486
+ @binding {Boolean} value - cell value
487
+ `),
488
+ i ? p(e.$slots, "cell", {
489
+ key: 0,
490
+ row: l,
491
+ value: l[i]
492
+ }, () => [
493
+ s(`
494
+ @slot cell-{key} - replace row cells of column
495
+ @binding {Object} row - row data
496
+ @binding {Boolean} value - cell value
497
+ `),
498
+ p(e.$slots, `cell-${i}`, {
499
+ row: l,
500
+ value: l[i]
501
+ }, () => [
502
+ I(
503
+ h(l[i]),
504
+ 1
505
+ /* TEXT */
506
+ )
507
+ ], !0)
508
+ ], !0) : s("v-if", !0)
509
+ ]),
510
+ _: 2
511
+ /* DYNAMIC */
512
+ }, 1032, ["align", "class"]))),
513
+ 128
514
+ /* KEYED_FRAGMENT */
515
+ )),
516
+ e.$slots.actions ? (n(), S(
517
+ t(N),
518
+ { key: 1 },
519
+ {
520
+ default: c(() => [
521
+ s(`
522
+ @slot actions - will add actions column
523
+ @binding {Object} row - row data
524
+ `),
525
+ p(e.$slots, "actions", { row: l }, void 0, !0)
526
+ ]),
527
+ _: 2
528
+ /* DYNAMIC */
529
+ },
530
+ 1024
531
+ /* DYNAMIC_SLOTS */
532
+ )) : s("v-if", !0)
533
+ ]),
534
+ _: 2
535
+ /* DYNAMIC */
536
+ }, 1032, ["class", "onClick"]))),
537
+ 128
538
+ /* KEYED_FRAGMENT */
539
+ )) : (n(), S(t(F), { key: 1 }, {
540
+ default: c(() => [
541
+ u(t(N), {
542
+ colspan: V.value.length + (U.value ? 1 : 0) + (e.$slots.actions ? 1 : 0)
543
+ }, {
544
+ default: c(() => [
545
+ s(`
546
+ @slot no-results - replace no results
547
+ `),
548
+ p(e.$slots, "no-results", {}, () => [
549
+ z("p", Ue, [
550
+ s(`
551
+ @slot no-results-text - replace no results test only
552
+ `),
553
+ p(e.$slots, "no-results-text", {}, () => [
554
+ I(
555
+ h(B.value.noResults),
556
+ 1
557
+ /* TEXT */
558
+ )
559
+ ], !0)
560
+ ])
561
+ ], !0)
562
+ ]),
563
+ _: 3
564
+ /* FORWARDED */
565
+ }, 8, ["colspan"])
566
+ ]),
567
+ _: 3
568
+ /* FORWARDED */
569
+ }))
570
+ ], !0)
571
+ ],
572
+ 2
573
+ /* CLASS */
574
+ )
575
+ ],
576
+ 6
577
+ /* CLASS, STYLE */
578
+ )
579
+ ],
580
+ 2
581
+ /* CLASS */
582
+ ),
583
+ ke.value ? (n(), v("div", Qe, [
584
+ o[4] || (o[4] = z(
585
+ "div",
586
+ { class: "m-table-spacer" },
587
+ null,
588
+ -1
589
+ /* HOISTED */
590
+ )),
591
+ e.pagination ? (n(), v("div", qe, [
592
+ z("div", Ye, [
593
+ z(
594
+ "span",
595
+ _e,
596
+ h(B.value.paginationRowsPerPage),
597
+ 1
598
+ /* TEXT */
599
+ ),
600
+ u(t(Z), {
601
+ modelValue: C.value,
602
+ "onUpdate:modelValue": o[3] || (o[3] = (l) => C.value = l),
603
+ options: pe.value,
604
+ "rounded-size": e.roundedSize,
605
+ size: e.inputSize ?? t(m),
606
+ color: e.color,
607
+ "list-position": "top",
608
+ style: { width: "5rem" }
609
+ }, null, 8, ["modelValue", "options", "rounded-size", "size", "color"])
610
+ ]),
611
+ A.value ? (n(), v(
612
+ "span",
613
+ Ge,
614
+ h(f.value) + " - " + h(w.value.length) + " " + h(B.value.paginationOf) + " " + h(A.value),
615
+ 1
616
+ /* TEXT */
617
+ )) : s("v-if", !0),
618
+ z("div", Je, [
619
+ u(t(M), {
620
+ disabled: f.value === 1,
621
+ size: t(m),
622
+ color: "transparent",
623
+ "rounded-size": e.roundedSize,
624
+ "no-elevation": "",
625
+ onClick: be
626
+ }, {
627
+ default: c(() => [
628
+ u(t(J), { class: "maz-text-base" })
629
+ ]),
630
+ _: 1
631
+ /* STABLE */
632
+ }, 8, ["disabled", "size", "rounded-size"]),
633
+ u(t(M), {
634
+ disabled: f.value === 1,
635
+ size: t(m),
636
+ color: "transparent",
637
+ "rounded-size": e.roundedSize,
638
+ "no-elevation": "",
639
+ onClick: fe
640
+ }, {
641
+ default: c(() => [
642
+ u(t(W), { class: "maz-text-base" })
643
+ ]),
644
+ _: 1
645
+ /* STABLE */
646
+ }, 8, ["disabled", "size", "rounded-size"]),
647
+ u(t(M), {
648
+ disabled: f.value === A.value,
649
+ size: t(m),
650
+ color: "transparent",
651
+ "rounded-size": e.roundedSize,
652
+ "no-elevation": "",
653
+ onClick: ge
654
+ }, {
655
+ default: c(() => [
656
+ u(t(W), { class: "maz-rotate-180 maz-text-base" })
657
+ ]),
658
+ _: 1
659
+ /* STABLE */
660
+ }, 8, ["disabled", "size", "rounded-size"]),
661
+ u(t(M), {
662
+ disabled: f.value === A.value,
663
+ size: t(m),
664
+ color: "transparent",
665
+ "rounded-size": e.roundedSize,
666
+ "no-elevation": "",
667
+ onClick: me
668
+ }, {
669
+ default: c(() => [
670
+ u(t(J), { class: "maz-rotate-180 maz-text-base" })
671
+ ]),
672
+ _: 1
673
+ /* STABLE */
674
+ }, 8, ["disabled", "size", "rounded-size"])
675
+ ])
676
+ ])) : s("v-if", !0)
677
+ ])) : s("v-if", !0)
678
+ ],
679
+ 2
680
+ /* CLASS */
681
+ ));
682
+ }
683
+ }), Xe = (O, j) => {
684
+ const a = O.__vccOpts || O;
685
+ for (const [P, D] of j)
686
+ a[P] = D;
687
+ return a;
688
+ }, xe = /* @__PURE__ */ Xe(We, [["__scopeId", "data-v-4237bd40"]]);
689
+ export {
690
+ xe as M,
691
+ Xe as _
692
+ };