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.
- package/components/MazBackdrop.d.ts +21 -13
- package/components/MazBackdrop.mjs +107 -82
- package/components/MazBottomSheet.d.ts +11 -24
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazDialog.d.ts +20 -31
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.d.ts +3 -3
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.d.ts +7 -4
- package/components/MazDrawer.mjs +2 -194
- package/components/assets/MazBackdrop.css +1 -1
- package/components/assets/MazBottomSheet.css +1 -1
- package/components/assets/MazDialog.css +1 -1
- package/components/assets/MazDialogPromise.css +1 -1
- package/components/assets/MazDrawer.css +1 -1
- package/components/chunks/MazBottomSheet-DGsGO0zo.mjs +224 -0
- package/components/chunks/{MazBtn-ZigrzA2_.mjs → MazBtn-BS2kvd1Z.mjs} +2 -2
- package/components/chunks/{MazBtn-BDrYYq_W.mjs → MazBtn-C60T0UDa.mjs} +2 -2
- package/components/chunks/{MazBtn-BQwIuO_Q.mjs → MazBtn-CsLtHm4K.mjs} +2 -2
- package/components/chunks/MazBtn-ZAcYNusG.mjs +103 -0
- package/components/chunks/MazDialog-Ca3jJ12T.mjs +297 -0
- package/components/chunks/MazDialogPromise-DOnmLhui.mjs +551 -0
- package/components/chunks/MazDrawer-Bas9dy0D.mjs +226 -0
- package/components/chunks/{MazSpinner-1F6A6qVD.mjs → MazSpinner-C6h03sqc.mjs} +1 -1
- package/components/chunks/{MazSpinner-Cc-KlPEG.mjs → MazSpinner-D5Sbo759.mjs} +1 -1
- package/components/chunks/{MazSpinner-DzFcVNs_.mjs → MazSpinner-DPur0-r-.mjs} +1 -1
- package/components/chunks/{MazSpinner-wQasUhyI.mjs → MazSpinner-ZFhNCy24.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/{MazBtn-DZ5uD4Ie.cjs → MazBtn-CFge_w1W.cjs} +1 -1
- package/modules/chunks/{MazBtn-C2iBdVnK.mjs → MazBtn-yNCoLFA6.mjs} +2 -2
- package/modules/chunks/{MazIcon-trV1gyry.mjs → MazIcon-C3__MBEL.mjs} +1 -1
- package/modules/chunks/{MazIcon-BYvF8LQu.cjs → MazIcon-CqhvM2xp.cjs} +1 -1
- package/modules/chunks/{MazSpinner-Dxfnhjcc.mjs → MazSpinner-C4XtaFJk.mjs} +1 -1
- package/modules/chunks/{MazSpinner-2MEHiA8E.cjs → MazSpinner-DkJAN36F.cjs} +1 -1
- package/modules/chunks/{index-BjpJ5NSX.cjs → index-Bawg2UGE.cjs} +2 -2
- package/modules/chunks/{index-C3k5P1Gx.mjs → index-CXu9R01-.mjs} +900 -837
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazBackdrop.vue.d.ts +21 -13
- package/types/components/MazBottomSheet.vue.d.ts +11 -24
- package/types/components/MazDialog.vue.d.ts +20 -31
- package/types/components/MazDialogPromise.vue.d.ts +3 -3
- package/types/components/MazDrawer.vue.d.ts +7 -4
- package/components/chunks/MazBottomSheet-B1cqFZxd.mjs +0 -208
- package/components/chunks/MazBtn-CIAdgMGr.mjs +0 -111
- package/components/chunks/MazDialog-C3h6Ydey.mjs +0 -237
- package/components/chunks/MazDialogPromise-BZm1F0X2.mjs +0 -488
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as C, defineAsyncComponent as m, useAttrs as $, computed as o, openBlock as t, createBlock as l, resolveDynamicComponent as r, normalizeClass as a, normalizeStyle as S, withCtx as j, renderSlot as i, unref as u, createCommentVNode as d, createElementBlock as M, createVNode as E } from "vue";
|
|
2
|
-
import { _ as F } from "./
|
|
2
|
+
import { _ as F } from "./MazDrawer-Bas9dy0D.mjs";
|
|
3
3
|
import '../assets/MazBtn.css';const O = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "m-btn-loader-container"
|
|
@@ -28,7 +28,7 @@ import '../assets/MazBtn.css';const O = {
|
|
|
28
28
|
justify: { default: "center" }
|
|
29
29
|
},
|
|
30
30
|
setup(y) {
|
|
31
|
-
const n = y, v = m(() => import("./MazSpinner-
|
|
31
|
+
const n = y, v = m(() => import("./MazSpinner-C6h03sqc.mjs")), c = m(() => import("./MazIcon-_hN-Kivn.mjs")), { href: b, to: z } = $(), f = o(() => b ? "a" : z ? "router-link" : "button"), g = o(() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`), p = o(
|
|
32
32
|
() => (n.loading || n.disabled) && f.value === "button"
|
|
33
33
|
), B = o(() => p.value ? "--cursor-default" : "--cursor-pointer"), k = o(() => `--is-${n.variant}`), I = o(() => n.loading && n.variant === "button"), h = o(() => f.value === "button" ? n.type : void 0), s = o(() => 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" : "maz-text-xl");
|
|
34
34
|
return (e, D) => (t(), l(r(f.value), {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as C, defineAsyncComponent as m, useAttrs as $, computed as o, openBlock as t, createBlock as l, resolveDynamicComponent as r, normalizeClass as a, normalizeStyle as S, withCtx as j, renderSlot as i, unref as u, createCommentVNode as d, createElementBlock as M, createVNode as E } from "vue";
|
|
2
|
-
import { _ as F } from "./MazBottomSheet-
|
|
2
|
+
import { _ as F } from "./MazBottomSheet-DGsGO0zo.mjs";
|
|
3
3
|
import '../assets/MazBtn.css';const O = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "m-btn-loader-container"
|
|
@@ -28,7 +28,7 @@ import '../assets/MazBtn.css';const O = {
|
|
|
28
28
|
justify: { default: "center" }
|
|
29
29
|
},
|
|
30
30
|
setup(y) {
|
|
31
|
-
const n = y, v = m(() => import("./MazSpinner-
|
|
31
|
+
const n = y, v = m(() => import("./MazSpinner-ZFhNCy24.mjs")), c = m(() => import("./MazIcon-_hN-Kivn.mjs")), { href: b, to: z } = $(), f = o(() => b ? "a" : z ? "router-link" : "button"), g = o(() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`), p = o(
|
|
32
32
|
() => (n.loading || n.disabled) && f.value === "button"
|
|
33
33
|
), B = o(() => p.value ? "--cursor-default" : "--cursor-pointer"), k = o(() => `--is-${n.variant}`), I = o(() => n.loading && n.variant === "button"), h = o(() => f.value === "button" ? n.type : void 0), s = o(() => 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" : "maz-text-xl");
|
|
34
34
|
return (e, D) => (t(), l(r(f.value), {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as C, defineAsyncComponent as m, useAttrs as $, computed as o, openBlock as t, createBlock as l, resolveDynamicComponent as r, normalizeClass as a, normalizeStyle as S, withCtx as j, renderSlot as i, unref as u, createCommentVNode as d, createElementBlock as M, createVNode as E } from "vue";
|
|
2
|
-
import { _ as F } from "./
|
|
2
|
+
import { _ as F } from "./MazDialog-Ca3jJ12T.mjs";
|
|
3
3
|
import '../assets/MazBtn.css';const O = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "m-btn-loader-container"
|
|
@@ -28,7 +28,7 @@ import '../assets/MazBtn.css';const O = {
|
|
|
28
28
|
justify: { default: "center" }
|
|
29
29
|
},
|
|
30
30
|
setup(y) {
|
|
31
|
-
const n = y, v = m(() => import("./MazSpinner-
|
|
31
|
+
const n = y, v = m(() => import("./MazSpinner-D5Sbo759.mjs")), c = m(() => import("./MazIcon-_hN-Kivn.mjs")), { href: b, to: z } = $(), f = o(() => b ? "a" : z ? "router-link" : "button"), g = o(() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`), p = o(
|
|
32
32
|
() => (n.loading || n.disabled) && f.value === "button"
|
|
33
33
|
), B = o(() => p.value ? "--cursor-default" : "--cursor-pointer"), k = o(() => `--is-${n.variant}`), I = o(() => n.loading && n.variant === "button"), h = o(() => f.value === "button" ? n.type : void 0), s = o(() => 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" : "maz-text-xl");
|
|
34
34
|
return (e, D) => (t(), l(r(f.value), {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { defineComponent as C, defineAsyncComponent as m, useAttrs as $, computed as o, openBlock as t, createBlock as l, resolveDynamicComponent as r, normalizeClass as a, normalizeStyle as S, withCtx as j, renderSlot as i, unref as u, createCommentVNode as d, createElementBlock as M, createVNode as E } from "vue";
|
|
2
|
+
import { _ as F } from "./MazDialogPromise-DOnmLhui.mjs";
|
|
3
|
+
import '../assets/MazBtn.css';const O = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "m-btn-loader-container"
|
|
6
|
+
}, A = /* @__PURE__ */ C({
|
|
7
|
+
__name: "MazBtn",
|
|
8
|
+
props: {
|
|
9
|
+
variant: { default: "button" },
|
|
10
|
+
size: { default: "md" },
|
|
11
|
+
color: { default: "primary" },
|
|
12
|
+
type: { default: "button" },
|
|
13
|
+
rounded: { type: Boolean },
|
|
14
|
+
roundedSize: { default: "lg" },
|
|
15
|
+
noRounded: { type: Boolean },
|
|
16
|
+
outline: { type: Boolean },
|
|
17
|
+
pastel: { type: Boolean },
|
|
18
|
+
block: { type: Boolean },
|
|
19
|
+
noUnderline: { type: Boolean },
|
|
20
|
+
loading: { type: Boolean },
|
|
21
|
+
disabled: { type: Boolean },
|
|
22
|
+
fab: { type: Boolean },
|
|
23
|
+
icon: { type: [String, Function, Object], default: void 0 },
|
|
24
|
+
leftIcon: { type: [String, Function, Object], default: void 0 },
|
|
25
|
+
rightIcon: { type: [String, Function, Object], default: void 0 },
|
|
26
|
+
noPadding: { type: Boolean },
|
|
27
|
+
noElevation: { type: Boolean },
|
|
28
|
+
justify: { default: "center" }
|
|
29
|
+
},
|
|
30
|
+
setup(y) {
|
|
31
|
+
const n = y, v = m(() => import("./MazSpinner-DPur0-r-.mjs")), c = m(() => import("./MazIcon-_hN-Kivn.mjs")), { href: b, to: z } = $(), f = o(() => b ? "a" : z ? "router-link" : "button"), g = o(() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`), p = o(
|
|
32
|
+
() => (n.loading || n.disabled) && f.value === "button"
|
|
33
|
+
), B = o(() => p.value ? "--cursor-default" : "--cursor-pointer"), k = o(() => `--is-${n.variant}`), I = o(() => n.loading && n.variant === "button"), h = o(() => f.value === "button" ? n.type : void 0), s = o(() => 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" : "maz-text-xl");
|
|
34
|
+
return (e, D) => (t(), l(r(f.value), {
|
|
35
|
+
disabled: p.value || void 0,
|
|
36
|
+
class: a(["m-btn", [
|
|
37
|
+
`--${e.size}`,
|
|
38
|
+
!e.fab && !e.rounded && e.roundedSize && `--rounded-${e.roundedSize}`,
|
|
39
|
+
g.value,
|
|
40
|
+
B.value,
|
|
41
|
+
k.value,
|
|
42
|
+
{
|
|
43
|
+
"--block": e.block,
|
|
44
|
+
"--no-underline": e.noUnderline,
|
|
45
|
+
"--fab": e.fab,
|
|
46
|
+
"--loading": e.loading,
|
|
47
|
+
"--disabled": p.value,
|
|
48
|
+
"--rounded": e.rounded,
|
|
49
|
+
"--no-rounded": e.noRounded,
|
|
50
|
+
"--no-padding": e.noPadding,
|
|
51
|
+
"--no-elevation": e.noElevation
|
|
52
|
+
}
|
|
53
|
+
]]),
|
|
54
|
+
style: S([`--justify: ${e.justify}`]),
|
|
55
|
+
type: h.value
|
|
56
|
+
}, {
|
|
57
|
+
default: j(() => [
|
|
58
|
+
i(e.$slots, "left-icon", {}, () => [
|
|
59
|
+
typeof e.leftIcon == "string" ? (t(), l(u(c), {
|
|
60
|
+
key: 0,
|
|
61
|
+
name: e.leftIcon,
|
|
62
|
+
class: a([s.value])
|
|
63
|
+
}, null, 8, ["name", "class"])) : e.leftIcon ? (t(), l(r(e.leftIcon), {
|
|
64
|
+
key: 1,
|
|
65
|
+
class: a([s.value])
|
|
66
|
+
}, null, 8, ["class"])) : d("v-if", !0)
|
|
67
|
+
], !0),
|
|
68
|
+
i(e.$slots, "icon", {}, () => [
|
|
69
|
+
typeof e.icon == "string" ? (t(), l(u(c), {
|
|
70
|
+
key: 0,
|
|
71
|
+
name: e.icon,
|
|
72
|
+
class: a([s.value])
|
|
73
|
+
}, null, 8, ["name", "class"])) : e.icon ? (t(), l(r(e.icon), {
|
|
74
|
+
key: 1,
|
|
75
|
+
class: a([s.value])
|
|
76
|
+
}, null, 8, ["class"])) : d("v-if", !0)
|
|
77
|
+
], !0),
|
|
78
|
+
i(e.$slots, "default", {}, void 0, !0),
|
|
79
|
+
i(e.$slots, "right-icon", {}, () => [
|
|
80
|
+
typeof e.rightIcon == "string" ? (t(), l(u(c), {
|
|
81
|
+
key: 0,
|
|
82
|
+
name: e.rightIcon,
|
|
83
|
+
class: a([s.value])
|
|
84
|
+
}, null, 8, ["name", "class"])) : e.rightIcon ? (t(), l(r(e.rightIcon), {
|
|
85
|
+
key: 1,
|
|
86
|
+
class: a([s.value])
|
|
87
|
+
}, null, 8, ["class"])) : d("v-if", !0)
|
|
88
|
+
], !0),
|
|
89
|
+
I.value ? (t(), M("div", O, [
|
|
90
|
+
E(u(v), {
|
|
91
|
+
size: "2em",
|
|
92
|
+
color: e.color
|
|
93
|
+
}, null, 8, ["color"])
|
|
94
|
+
])) : d("v-if", !0)
|
|
95
|
+
]),
|
|
96
|
+
_: 3
|
|
97
|
+
/* FORWARDED */
|
|
98
|
+
}, 8, ["disabled", "class", "style", "type"]));
|
|
99
|
+
}
|
|
100
|
+
}), R = /* @__PURE__ */ F(A, [["__scopeId", "data-v-bee684ff"]]);
|
|
101
|
+
export {
|
|
102
|
+
R as default
|
|
103
|
+
};
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { defineComponent as L, ref as A, onMounted as F, watch as N, nextTick as w, openBlock as m, createBlock as V, Teleport as I, createVNode as U, Transition as X, withCtx as j, createElementBlock as D, mergeProps as M, createElementVNode as f, normalizeClass as W, withModifiers as G, renderSlot as b, createCommentVNode as h, defineAsyncComponent as P, useAttrs as H, computed as B, createTextVNode as J, toDisplayString as Q, unref as O } from "vue";
|
|
2
|
+
import '../assets/MazDialog.css';const R = {
|
|
3
|
+
role: "dialog",
|
|
4
|
+
class: "m-backdrop-container",
|
|
5
|
+
"aria-modal": "true"
|
|
6
|
+
}, Y = { class: "m-backdrop-wrapper" }, z = "--backdrop-present", Z = /* @__PURE__ */ L({
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "MazBackdrop",
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: { type: Boolean, default: !1 },
|
|
11
|
+
teleportSelector: { default: "body" },
|
|
12
|
+
beforeClose: { type: Function, default: void 0 },
|
|
13
|
+
persistent: { type: Boolean, default: !1 },
|
|
14
|
+
noCloseOnEscKey: { type: Boolean, default: !1 },
|
|
15
|
+
transitionName: { default: "backdrop-anim" },
|
|
16
|
+
backdropClass: { default: () => {
|
|
17
|
+
} },
|
|
18
|
+
backdropContentClass: { default: () => {
|
|
19
|
+
} },
|
|
20
|
+
contentPadding: { type: Boolean, default: !1 },
|
|
21
|
+
justify: { default: "none" },
|
|
22
|
+
align: { default: "none" },
|
|
23
|
+
variant: {}
|
|
24
|
+
},
|
|
25
|
+
emits: ["open", "close", "update:model-value", "before-close"],
|
|
26
|
+
setup(a, { expose: p, emit: s }) {
|
|
27
|
+
const i = s;
|
|
28
|
+
function v() {
|
|
29
|
+
document.documentElement.classList.add(z);
|
|
30
|
+
}
|
|
31
|
+
function y() {
|
|
32
|
+
document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(z);
|
|
33
|
+
}
|
|
34
|
+
const d = A(a.modelValue);
|
|
35
|
+
function c() {
|
|
36
|
+
k(!1);
|
|
37
|
+
}
|
|
38
|
+
async function k(t) {
|
|
39
|
+
var l;
|
|
40
|
+
t || (i("before-close"), await ((l = a.beforeClose) == null ? void 0 : l.call(a))), d.value = t;
|
|
41
|
+
}
|
|
42
|
+
function g() {
|
|
43
|
+
i("open");
|
|
44
|
+
}
|
|
45
|
+
function u() {
|
|
46
|
+
i("update:model-value", !1), i("close"), r();
|
|
47
|
+
}
|
|
48
|
+
function e() {
|
|
49
|
+
a.persistent || c();
|
|
50
|
+
}
|
|
51
|
+
function o(t) {
|
|
52
|
+
!a.noCloseOnEscKey && t.key === "Escape" && !a.persistent && c();
|
|
53
|
+
}
|
|
54
|
+
function n() {
|
|
55
|
+
v(), document.addEventListener("keyup", o, !1);
|
|
56
|
+
}
|
|
57
|
+
function r() {
|
|
58
|
+
document.removeEventListener("keyup", o), y();
|
|
59
|
+
}
|
|
60
|
+
F(() => {
|
|
61
|
+
a.modelValue ? n() : r();
|
|
62
|
+
});
|
|
63
|
+
let C = null;
|
|
64
|
+
function q(t) {
|
|
65
|
+
const l = document.querySelector(t), E = l && Array.from(l.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select')), $ = E == null ? void 0 : E.filter((S) => {
|
|
66
|
+
const T = window.getComputedStyle(S);
|
|
67
|
+
return T.display !== "none" && T.visibility !== "hidden" && !S.disabled;
|
|
68
|
+
});
|
|
69
|
+
return $ && $.length > 0 ? $[0] : null;
|
|
70
|
+
}
|
|
71
|
+
return N(
|
|
72
|
+
() => a.modelValue,
|
|
73
|
+
async (t) => {
|
|
74
|
+
if (d.value = t, t) {
|
|
75
|
+
n(), C = document.activeElement, await w();
|
|
76
|
+
const l = q(".m-backdrop-content");
|
|
77
|
+
l == null || l.focus();
|
|
78
|
+
} else
|
|
79
|
+
r(), await w(), C == null || C.focus();
|
|
80
|
+
}
|
|
81
|
+
), p({
|
|
82
|
+
onBackdropAnimationEnter: g,
|
|
83
|
+
onBackdropAnimationLeave: u,
|
|
84
|
+
onBackdropClicked: e,
|
|
85
|
+
close: c,
|
|
86
|
+
present: d,
|
|
87
|
+
toggleModal: k,
|
|
88
|
+
onKeyPress: o
|
|
89
|
+
}), (t, l) => (m(), V(I, { to: t.teleportSelector }, [
|
|
90
|
+
U(X, {
|
|
91
|
+
appear: "",
|
|
92
|
+
name: t.transitionName,
|
|
93
|
+
onAfterEnter: g,
|
|
94
|
+
onAfterLeave: u
|
|
95
|
+
}, {
|
|
96
|
+
default: j(() => [
|
|
97
|
+
d.value ? (m(), D(
|
|
98
|
+
"div",
|
|
99
|
+
M({
|
|
100
|
+
key: 0,
|
|
101
|
+
class: "m-backdrop --present"
|
|
102
|
+
}, t.$attrs, {
|
|
103
|
+
class: [t.backdropClass, t.variant && `--variant-${t.variant}`, { "--persistent": t.persistent }]
|
|
104
|
+
}),
|
|
105
|
+
[
|
|
106
|
+
f("div", R, [
|
|
107
|
+
f("div", Y, [
|
|
108
|
+
f(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
class: W(["m-backdrop-content", [t.backdropContentClass, `--justify-${t.justify}`, `--align-${t.align}`, { "--padding": t.contentPadding }]]),
|
|
112
|
+
role: "button",
|
|
113
|
+
tabindex: "-1",
|
|
114
|
+
onClick: G(e, ["self"])
|
|
115
|
+
},
|
|
116
|
+
[
|
|
117
|
+
b(t.$slots, "default", {
|
|
118
|
+
close: c,
|
|
119
|
+
onBackdropClicked: e
|
|
120
|
+
}, void 0, !0)
|
|
121
|
+
],
|
|
122
|
+
2
|
|
123
|
+
/* CLASS */
|
|
124
|
+
)
|
|
125
|
+
])
|
|
126
|
+
])
|
|
127
|
+
],
|
|
128
|
+
16
|
|
129
|
+
/* FULL_PROPS */
|
|
130
|
+
)) : h("v-if", !0)
|
|
131
|
+
]),
|
|
132
|
+
_: 3
|
|
133
|
+
/* FORWARDED */
|
|
134
|
+
}, 8, ["name"])
|
|
135
|
+
], 8, ["to"]));
|
|
136
|
+
}
|
|
137
|
+
}), K = (a, p) => {
|
|
138
|
+
const s = a.__vccOpts || a;
|
|
139
|
+
for (const [i, v] of p)
|
|
140
|
+
s[i] = v;
|
|
141
|
+
return s;
|
|
142
|
+
}, x = /* @__PURE__ */ K(Z, [["__scopeId", "data-v-7aa1682e"]]), _ = {
|
|
143
|
+
key: 0,
|
|
144
|
+
id: "dialogTitle",
|
|
145
|
+
class: "m-dialog-title"
|
|
146
|
+
}, ee = {
|
|
147
|
+
key: 0,
|
|
148
|
+
class: "m-dialog-footer"
|
|
149
|
+
}, te = /* @__PURE__ */ L({
|
|
150
|
+
name: "MazDialog",
|
|
151
|
+
inheritAttrs: !1,
|
|
152
|
+
__name: "MazDialog",
|
|
153
|
+
props: {
|
|
154
|
+
modelValue: { type: Boolean },
|
|
155
|
+
title: { default: void 0 },
|
|
156
|
+
noClose: { type: Boolean, default: !1 },
|
|
157
|
+
maxWidth: { default: "100%" },
|
|
158
|
+
minWidth: { default: "32rem" },
|
|
159
|
+
scrollable: { type: Boolean, default: !1 },
|
|
160
|
+
persistent: { type: Boolean, default: !1 },
|
|
161
|
+
teleportSelector: {},
|
|
162
|
+
beforeClose: {},
|
|
163
|
+
noCloseOnEscKey: { type: Boolean },
|
|
164
|
+
transitionName: {},
|
|
165
|
+
backdropClass: {},
|
|
166
|
+
backdropContentClass: {},
|
|
167
|
+
contentPadding: { type: Boolean },
|
|
168
|
+
justify: {},
|
|
169
|
+
align: {},
|
|
170
|
+
variant: {}
|
|
171
|
+
},
|
|
172
|
+
emits: ["open", "close", "update:model-value"],
|
|
173
|
+
setup(a, { expose: p }) {
|
|
174
|
+
const s = a, i = P(() => import("./MazBtn-CsLtHm4K.mjs")), v = P(() => import("./x-mark-CnZwVvA7.mjs")), y = H(), d = A();
|
|
175
|
+
p({
|
|
176
|
+
close: () => {
|
|
177
|
+
var e, o;
|
|
178
|
+
return (o = (e = d.value) == null ? void 0 : e.close) == null ? void 0 : o.call(e);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
const c = B(() => {
|
|
182
|
+
const e = [
|
|
183
|
+
"modelValue",
|
|
184
|
+
"title",
|
|
185
|
+
"noClose",
|
|
186
|
+
"maxWidth",
|
|
187
|
+
"minWidth",
|
|
188
|
+
"scrollable"
|
|
189
|
+
];
|
|
190
|
+
return Object.fromEntries(
|
|
191
|
+
Object.entries(s).filter(([o]) => !e.includes(o))
|
|
192
|
+
);
|
|
193
|
+
}), k = B(() => ({
|
|
194
|
+
...y,
|
|
195
|
+
class: void 0,
|
|
196
|
+
style: void 0
|
|
197
|
+
})), g = B(() => ({
|
|
198
|
+
class: y.class,
|
|
199
|
+
style: y.style
|
|
200
|
+
})), u = A();
|
|
201
|
+
return s.scrollable && N(() => s.modelValue, async (e) => {
|
|
202
|
+
await w(), e && u.value && setTimeout(() => {
|
|
203
|
+
var o;
|
|
204
|
+
(o = u.value) == null || o.scrollTo({ top: 0, behavior: "instant" });
|
|
205
|
+
}, 0);
|
|
206
|
+
}), (e, o) => (m(), V(x, M({ ...k.value, ...c.value }, {
|
|
207
|
+
ref_key: "backdrop",
|
|
208
|
+
ref: d,
|
|
209
|
+
"model-value": e.modelValue,
|
|
210
|
+
"transition-name": "modal-anim",
|
|
211
|
+
"aria-labelledby": "dialogTitle",
|
|
212
|
+
"aria-describedby": "dialogDesc",
|
|
213
|
+
"content-padding": "",
|
|
214
|
+
justify: "center",
|
|
215
|
+
variant: "dialog",
|
|
216
|
+
onClose: o[0] || (o[0] = (n) => e.$emit("close", n)),
|
|
217
|
+
onOpen: o[1] || (o[1] = (n) => e.$emit("open", n)),
|
|
218
|
+
"onUpdate:modelValue": o[2] || (o[2] = (n) => e.$emit("update:model-value", n))
|
|
219
|
+
}), {
|
|
220
|
+
default: j(({ close: n, onBackdropClicked: r }) => [
|
|
221
|
+
f(
|
|
222
|
+
"div",
|
|
223
|
+
M({
|
|
224
|
+
class: ["m-dialog", { "--scrollable": e.scrollable }],
|
|
225
|
+
role: "dialog",
|
|
226
|
+
"aria-modal": "true",
|
|
227
|
+
style: [{ "--max-width": e.maxWidth, "--min-width": e.minWidth }]
|
|
228
|
+
}, g.value),
|
|
229
|
+
[
|
|
230
|
+
b(e.$slots, "header", {
|
|
231
|
+
close: n,
|
|
232
|
+
onBackdropClicked: r
|
|
233
|
+
}, () => [
|
|
234
|
+
f(
|
|
235
|
+
"div",
|
|
236
|
+
{
|
|
237
|
+
class: W(["m-dialog-header", { "--has-title": e.$slots.title || e.title }])
|
|
238
|
+
},
|
|
239
|
+
[
|
|
240
|
+
e.$slots.title || e.title ? (m(), D("h2", _, [
|
|
241
|
+
b(e.$slots, "title", {}, () => [
|
|
242
|
+
J(
|
|
243
|
+
Q(e.title),
|
|
244
|
+
1
|
|
245
|
+
/* TEXT */
|
|
246
|
+
)
|
|
247
|
+
], !0)
|
|
248
|
+
])) : h("v-if", !0),
|
|
249
|
+
!e.noClose && !e.persistent ? (m(), V(O(i), {
|
|
250
|
+
key: 1,
|
|
251
|
+
color: "transparent",
|
|
252
|
+
size: "sm",
|
|
253
|
+
icon: O(v),
|
|
254
|
+
onClick: n
|
|
255
|
+
}, null, 8, ["icon", "onClick"])) : h("v-if", !0)
|
|
256
|
+
],
|
|
257
|
+
2
|
|
258
|
+
/* CLASS */
|
|
259
|
+
)
|
|
260
|
+
], !0),
|
|
261
|
+
f(
|
|
262
|
+
"div",
|
|
263
|
+
{
|
|
264
|
+
id: "dialogDesc",
|
|
265
|
+
ref_key: "dialogContent",
|
|
266
|
+
ref: u,
|
|
267
|
+
class: "m-dialog-content"
|
|
268
|
+
},
|
|
269
|
+
[
|
|
270
|
+
b(e.$slots, "default", {
|
|
271
|
+
close: n,
|
|
272
|
+
onBackdropClicked: r
|
|
273
|
+
}, void 0, !0)
|
|
274
|
+
],
|
|
275
|
+
512
|
|
276
|
+
/* NEED_PATCH */
|
|
277
|
+
),
|
|
278
|
+
e.$slots.footer ? (m(), D("div", ee, [
|
|
279
|
+
b(e.$slots, "footer", {
|
|
280
|
+
close: n,
|
|
281
|
+
onBackdropClicked: r
|
|
282
|
+
}, void 0, !0)
|
|
283
|
+
])) : h("v-if", !0)
|
|
284
|
+
],
|
|
285
|
+
16
|
|
286
|
+
/* FULL_PROPS */
|
|
287
|
+
)
|
|
288
|
+
]),
|
|
289
|
+
_: 3
|
|
290
|
+
/* FORWARDED */
|
|
291
|
+
}, 16, ["model-value"]));
|
|
292
|
+
}
|
|
293
|
+
}), ne = /* @__PURE__ */ K(te, [["__scopeId", "data-v-b16ef3d7"]]);
|
|
294
|
+
export {
|
|
295
|
+
ne as M,
|
|
296
|
+
K as _
|
|
297
|
+
};
|