maz-ui 3.47.2-beta.19 → 3.47.2-beta.20

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 (50) hide show
  1. package/components/MazBackdrop.d.ts +21 -13
  2. package/components/MazBackdrop.mjs +107 -82
  3. package/components/MazBottomSheet.d.ts +11 -24
  4. package/components/MazBottomSheet.mjs +1 -1
  5. package/components/MazDialog.d.ts +20 -31
  6. package/components/MazDialog.mjs +1 -1
  7. package/components/MazDialogPromise.d.ts +3 -3
  8. package/components/MazDialogPromise.mjs +1 -1
  9. package/components/MazDrawer.d.ts +7 -4
  10. package/components/MazDrawer.mjs +2 -194
  11. package/components/assets/MazBackdrop.css +1 -1
  12. package/components/assets/MazBottomSheet.css +1 -1
  13. package/components/assets/MazDialog.css +1 -1
  14. package/components/assets/MazDialogPromise.css +1 -1
  15. package/components/assets/MazDrawer.css +1 -1
  16. package/components/chunks/MazBottomSheet-DGsGO0zo.mjs +224 -0
  17. package/components/chunks/{MazBtn-ZigrzA2_.mjs → MazBtn-BS2kvd1Z.mjs} +2 -2
  18. package/components/chunks/{MazBtn-BDrYYq_W.mjs → MazBtn-C60T0UDa.mjs} +2 -2
  19. package/components/chunks/{MazBtn-BQwIuO_Q.mjs → MazBtn-CsLtHm4K.mjs} +2 -2
  20. package/components/chunks/MazBtn-ZAcYNusG.mjs +103 -0
  21. package/components/chunks/MazDialog-Ca3jJ12T.mjs +297 -0
  22. package/components/chunks/MazDialogPromise-DOnmLhui.mjs +551 -0
  23. package/components/chunks/MazDrawer-Bas9dy0D.mjs +226 -0
  24. package/components/chunks/{MazSpinner-1F6A6qVD.mjs → MazSpinner-C6h03sqc.mjs} +1 -1
  25. package/components/chunks/{MazSpinner-Cc-KlPEG.mjs → MazSpinner-D5Sbo759.mjs} +1 -1
  26. package/components/chunks/{MazSpinner-DzFcVNs_.mjs → MazSpinner-DPur0-r-.mjs} +1 -1
  27. package/components/chunks/{MazSpinner-wQasUhyI.mjs → MazSpinner-ZFhNCy24.mjs} +1 -1
  28. package/css/main.css +1 -1
  29. package/modules/assets/index.css +1 -1
  30. package/modules/chunks/{MazBtn-DZ5uD4Ie.cjs → MazBtn-CFge_w1W.cjs} +1 -1
  31. package/modules/chunks/{MazBtn-C2iBdVnK.mjs → MazBtn-yNCoLFA6.mjs} +2 -2
  32. package/modules/chunks/{MazIcon-trV1gyry.mjs → MazIcon-C3__MBEL.mjs} +1 -1
  33. package/modules/chunks/{MazIcon-BYvF8LQu.cjs → MazIcon-CqhvM2xp.cjs} +1 -1
  34. package/modules/chunks/{MazSpinner-Dxfnhjcc.mjs → MazSpinner-C4XtaFJk.mjs} +1 -1
  35. package/modules/chunks/{MazSpinner-2MEHiA8E.cjs → MazSpinner-DkJAN36F.cjs} +1 -1
  36. package/modules/chunks/{index-BjpJ5NSX.cjs → index-Bawg2UGE.cjs} +2 -2
  37. package/modules/chunks/{index-C3k5P1Gx.mjs → index-CXu9R01-.mjs} +900 -837
  38. package/modules/index.cjs +1 -1
  39. package/modules/index.mjs +1 -1
  40. package/nuxt/index.json +1 -1
  41. package/package.json +1 -1
  42. package/types/components/MazBackdrop.vue.d.ts +21 -13
  43. package/types/components/MazBottomSheet.vue.d.ts +11 -24
  44. package/types/components/MazDialog.vue.d.ts +20 -31
  45. package/types/components/MazDialogPromise.vue.d.ts +3 -3
  46. package/types/components/MazDrawer.vue.d.ts +7 -4
  47. package/components/chunks/MazBottomSheet-B1cqFZxd.mjs +0 -208
  48. package/components/chunks/MazBtn-CIAdgMGr.mjs +0 -111
  49. package/components/chunks/MazDialog-C3h6Ydey.mjs +0 -237
  50. package/components/chunks/MazDialogPromise-BZm1F0X2.mjs +0 -488
@@ -1,237 +0,0 @@
1
- import { defineComponent as M, ref as L, onMounted as S, watch as T, openBlock as c, createBlock as g, Teleport as O, createVNode as P, Transition as K, withCtx as N, createElementBlock as h, normalizeClass as B, createElementVNode as f, withModifiers as H, mergeProps as E, renderSlot as p, createCommentVNode as b, defineAsyncComponent as D, useAttrs as W, computed as V, createTextVNode as F, toDisplayString as I, unref as w } from "vue";
2
- import '../assets/MazDialog.css';const z = "--backdrop-present", q = /* @__PURE__ */ M({
3
- inheritAttrs: !1,
4
- __name: "MazBackdrop",
5
- props: {
6
- modelValue: { type: Boolean, default: !1 },
7
- teleportSelector: { default: "body" },
8
- beforeClose: { type: Function, default: void 0 },
9
- persistent: { type: Boolean, default: !1 },
10
- noCloseOnEscKey: { type: Boolean, default: !1 },
11
- transitionName: { default: "backdrop-anim" },
12
- backdropClass: { default: void 0 },
13
- backdropContentClass: { default: void 0 }
14
- },
15
- emits: ["open", "close", "update:model-value", "before-close"],
16
- setup(n, { expose: m, emit: r }) {
17
- const t = n, l = r;
18
- function u() {
19
- document.documentElement.classList.add(z);
20
- }
21
- function v() {
22
- document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(z);
23
- }
24
- const i = L(t.modelValue);
25
- function d() {
26
- e(!1);
27
- }
28
- async function e(o) {
29
- var C;
30
- o || (l("before-close"), await ((C = t.beforeClose) == null ? void 0 : C.call(t))), i.value = o;
31
- }
32
- function a() {
33
- l("open");
34
- }
35
- function s() {
36
- l("update:model-value", !1), l("close"), y();
37
- }
38
- function A() {
39
- t.persistent || d();
40
- }
41
- function k(o) {
42
- !t.noCloseOnEscKey && o.key === "Escape" && !t.persistent && d();
43
- }
44
- function $() {
45
- u(), document.addEventListener("keyup", k, !1);
46
- }
47
- function y() {
48
- document.removeEventListener("keyup", k), v();
49
- }
50
- return S(() => {
51
- t.modelValue ? $() : y();
52
- }), T(
53
- () => t.modelValue,
54
- (o) => {
55
- i.value = o, o ? $() : y();
56
- }
57
- ), m({
58
- onBackdropAnimationEnter: a,
59
- onBackdropAnimationLeave: s,
60
- onBackdropClicked: A,
61
- close: d,
62
- present: i,
63
- toggleModal: e,
64
- onKeyPress: k
65
- }), (o, C) => (c(), g(O, { to: o.teleportSelector }, [
66
- P(K, {
67
- appear: "",
68
- name: o.transitionName,
69
- onAfterEnter: a,
70
- onAfterLeave: s
71
- }, {
72
- default: N(() => [
73
- i.value ? (c(), h(
74
- "div",
75
- {
76
- key: 0,
77
- class: B(["m-backdrop --present", [o.backdropClass]]),
78
- tabindex: "-1",
79
- role: "dialog"
80
- },
81
- [
82
- f(
83
- "button",
84
- {
85
- class: B(["m-backdrop-overlay", { "--disabled": o.persistent }]),
86
- tabindex: "-1",
87
- onClick: H(A, ["self"])
88
- },
89
- null,
90
- 2
91
- /* CLASS */
92
- ),
93
- f(
94
- "div",
95
- E({
96
- class: ["m-backdrop-content", o.backdropContentClass]
97
- }, o.$attrs, {
98
- role: "document",
99
- tabindex: "0"
100
- }),
101
- [
102
- p(o.$slots, "default", { close: d })
103
- ],
104
- 16
105
- /* FULL_PROPS */
106
- )
107
- ],
108
- 2
109
- /* CLASS */
110
- )) : b("v-if", !0)
111
- ]),
112
- _: 3
113
- /* FORWARDED */
114
- }, 8, ["name"])
115
- ], 8, ["to"]));
116
- }
117
- }), U = {
118
- key: 0,
119
- id: "dialogTitle",
120
- class: "maz-my-0 maz-text-xl maz-font-semibold"
121
- }, X = {
122
- id: "dialogDesc",
123
- class: "m-dialog-content"
124
- }, j = {
125
- key: 0,
126
- class: "m-dialog-footer"
127
- }, G = /* @__PURE__ */ M({
128
- __name: "MazDialog",
129
- props: {
130
- modelValue: { type: Boolean },
131
- title: { default: void 0 },
132
- noClose: { type: Boolean, default: !1 },
133
- width: { default: "500px" },
134
- maxWidth: { default: "95vw" },
135
- maxHeight: { default: "95vh" },
136
- scrollable: { type: Boolean, default: !1 },
137
- persistent: { type: Boolean, default: !1 },
138
- teleportSelector: {},
139
- beforeClose: {},
140
- noCloseOnEscKey: { type: Boolean },
141
- transitionName: {},
142
- backdropClass: {},
143
- backdropContentClass: {}
144
- },
145
- emits: ["open", "close", "update:model-value"],
146
- setup(n, { expose: m }) {
147
- const r = n, t = D(() => import("./MazBtn-ZigrzA2_.mjs")), l = D(() => import("./x-mark-CnZwVvA7.mjs")), u = W(), v = L();
148
- m({
149
- close: () => {
150
- var e, a;
151
- return (a = (e = v.value) == null ? void 0 : e.close) == null ? void 0 : a.call(e);
152
- }
153
- });
154
- const i = V(() => ({
155
- ...u,
156
- class: void 0,
157
- style: void 0
158
- })), d = V(() => ({
159
- class: u.class,
160
- style: u.style
161
- }));
162
- return (e, a) => (c(), g(q, E({ ...i.value, ...r }, {
163
- ref_key: "backdrop",
164
- ref: v,
165
- persistent: e.persistent,
166
- "model-value": e.modelValue,
167
- "transition-name": "modal-anim",
168
- "aria-labelledby": "dialogTitle",
169
- "aria-describedby": "dialogDesc",
170
- onClose: a[0] || (a[0] = (s) => e.$emit("close", s)),
171
- onOpen: a[1] || (a[1] = (s) => e.$emit("open", s)),
172
- "onUpdate:modelValue": a[2] || (a[2] = (s) => e.$emit("update:model-value", s))
173
- }), {
174
- default: N(({ close: s }) => [
175
- f(
176
- "div",
177
- E({
178
- class: ["m-dialog", { "--scrollable": e.scrollable }],
179
- role: "dialog",
180
- "aria-modal": "true",
181
- style: [{ width: e.width, maxWidth: e.maxWidth, maxHeight: e.maxHeight }]
182
- }, d.value),
183
- [
184
- p(e.$slots, "header", { close: s }, () => [
185
- f(
186
- "div",
187
- {
188
- class: B(["m-dialog-header", { "--has-title": e.$slots.title || e.title }])
189
- },
190
- [
191
- e.$slots.title || e.title ? (c(), h("h2", U, [
192
- p(e.$slots, "title", {}, () => [
193
- F(
194
- I(e.title),
195
- 1
196
- /* TEXT */
197
- )
198
- ], !0)
199
- ])) : b("v-if", !0),
200
- !e.noClose && !e.persistent ? (c(), g(w(t), {
201
- key: 1,
202
- class: "m-dialog-closebtn",
203
- color: "transparent",
204
- size: "sm",
205
- icon: w(l),
206
- onClick: s
207
- }, null, 8, ["icon", "onClick"])) : b("v-if", !0)
208
- ],
209
- 2
210
- /* CLASS */
211
- )
212
- ], !0),
213
- f("div", X, [
214
- p(e.$slots, "default", { close: s }, void 0, !0)
215
- ]),
216
- e.$slots.footer ? (c(), h("div", j, [
217
- p(e.$slots, "footer", { close: s }, void 0, !0)
218
- ])) : b("v-if", !0)
219
- ],
220
- 16
221
- /* FULL_PROPS */
222
- )
223
- ]),
224
- _: 3
225
- /* FORWARDED */
226
- }, 16, ["persistent", "model-value"]));
227
- }
228
- }), J = (n, m) => {
229
- const r = n.__vccOpts || n;
230
- for (const [t, l] of m)
231
- r[t] = l;
232
- return r;
233
- }, R = /* @__PURE__ */ J(G, [["__scopeId", "data-v-50775b17"]]);
234
- export {
235
- R as M,
236
- J as _
237
- };