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,13 +1,29 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'vue';
|
|
2
|
-
export interface
|
|
2
|
+
export interface MazBackdropProps {
|
|
3
|
+
/** @model Modal's model value */
|
|
3
4
|
modelValue?: boolean;
|
|
5
|
+
/** Teleport selector */
|
|
4
6
|
teleportSelector?: string;
|
|
7
|
+
/** Function called before modal is close */
|
|
5
8
|
beforeClose?: () => Promise<void> | void;
|
|
9
|
+
/** Persistent dialog (not closable by clicking outside and remove close button) */
|
|
6
10
|
persistent?: boolean;
|
|
11
|
+
/** Prevent close on escape key */
|
|
7
12
|
noCloseOnEscKey?: boolean;
|
|
13
|
+
/** Transition name */
|
|
8
14
|
transitionName?: string;
|
|
15
|
+
/** Backdrop class */
|
|
9
16
|
backdropClass?: HTMLAttributes['class'];
|
|
17
|
+
/** Backdrop content class */
|
|
10
18
|
backdropContentClass?: HTMLAttributes['class'];
|
|
19
|
+
/** Add padding to the content */
|
|
20
|
+
contentPadding?: boolean;
|
|
21
|
+
/** Justify content */
|
|
22
|
+
justify?: 'center' | 'end' | 'start' | 'space-between' | 'space-around' | 'none';
|
|
23
|
+
/** Align content */
|
|
24
|
+
align?: 'center' | 'end' | 'start' | 'none';
|
|
25
|
+
/** Variant */
|
|
26
|
+
variant?: 'bottom-sheet' | 'dialog' | 'drawer';
|
|
11
27
|
}
|
|
12
28
|
declare function close(): void;
|
|
13
29
|
declare function toggleModal(value: any): Promise<void>;
|
|
@@ -20,13 +36,14 @@ declare function __VLS_template(): {
|
|
|
20
36
|
slots: {
|
|
21
37
|
default?(_: {
|
|
22
38
|
close: typeof close;
|
|
39
|
+
onBackdropClicked: typeof onBackdropClicked;
|
|
23
40
|
}): any;
|
|
24
41
|
};
|
|
25
42
|
refs: {};
|
|
26
43
|
rootEl: any;
|
|
27
44
|
};
|
|
28
45
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
46
|
+
declare const __VLS_component: import("vue").DefineComponent<MazBackdropProps, {
|
|
30
47
|
onBackdropAnimationEnter: typeof onBackdropAnimationEnter;
|
|
31
48
|
onBackdropAnimationLeave: typeof onBackdropAnimationLeave;
|
|
32
49
|
onBackdropClicked: typeof onBackdropClicked;
|
|
@@ -39,21 +56,12 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {
|
|
|
39
56
|
open: (value: void) => any;
|
|
40
57
|
"update:model-value": (value: boolean) => any;
|
|
41
58
|
"before-close": (value: void) => any;
|
|
42
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
59
|
+
}, string, import("vue").PublicProps, Readonly<MazBackdropProps> & Readonly<{
|
|
43
60
|
onClose?: ((value?: void | undefined) => any) | undefined;
|
|
44
61
|
onOpen?: ((value?: void | undefined) => any) | undefined;
|
|
45
62
|
"onUpdate:model-value"?: ((value: boolean) => any) | undefined;
|
|
46
63
|
"onBefore-close"?: ((value?: void | undefined) => any) | undefined;
|
|
47
|
-
}>, {
|
|
48
|
-
modelValue: boolean;
|
|
49
|
-
teleportSelector: string;
|
|
50
|
-
beforeClose: () => Promise<void> | void;
|
|
51
|
-
persistent: boolean;
|
|
52
|
-
noCloseOnEscKey: boolean;
|
|
53
|
-
transitionName: string;
|
|
54
|
-
backdropClass: HTMLAttributes["class"];
|
|
55
|
-
backdropContentClass: HTMLAttributes["class"];
|
|
56
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
64
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
57
65
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
58
66
|
export default _default;
|
|
59
67
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import './assets/MazBackdrop.css';const
|
|
1
|
+
import { defineComponent as L, ref as P, onMounted as V, watch as D, nextTick as B, openBlock as h, createBlock as M, Teleport as N, createVNode as T, Transition as O, withCtx as $, createElementBlock as j, mergeProps as q, createElementVNode as v, normalizeClass as z, withModifiers as F, renderSlot as K, createCommentVNode as I } from "vue";
|
|
2
|
+
import './assets/MazBackdrop.css';const G = {
|
|
3
|
+
role: "dialog",
|
|
4
|
+
class: "m-backdrop-container",
|
|
5
|
+
"aria-modal": "true"
|
|
6
|
+
}, H = { class: "m-backdrop-wrapper" }, A = "--backdrop-present", J = /* @__PURE__ */ L({
|
|
3
7
|
inheritAttrs: !1,
|
|
4
8
|
__name: "MazBackdrop",
|
|
5
9
|
props: {
|
|
@@ -9,112 +13,133 @@ import './assets/MazBackdrop.css';const b = "--backdrop-present", F = /* @__PURE
|
|
|
9
13
|
persistent: { type: Boolean, default: !1 },
|
|
10
14
|
noCloseOnEscKey: { type: Boolean, default: !1 },
|
|
11
15
|
transitionName: { default: "backdrop-anim" },
|
|
12
|
-
backdropClass: { default:
|
|
13
|
-
|
|
16
|
+
backdropClass: { default: () => {
|
|
17
|
+
} },
|
|
18
|
+
backdropContentClass: { default: () => {
|
|
19
|
+
} },
|
|
20
|
+
contentPadding: { type: Boolean, default: !1 },
|
|
21
|
+
justify: { default: "none" },
|
|
22
|
+
align: { default: "none" },
|
|
23
|
+
variant: {}
|
|
14
24
|
},
|
|
15
25
|
emits: ["open", "close", "update:model-value", "before-close"],
|
|
16
|
-
setup(
|
|
17
|
-
const o =
|
|
18
|
-
function
|
|
19
|
-
document.documentElement.classList.add(
|
|
26
|
+
setup(t, { expose: d, emit: a }) {
|
|
27
|
+
const o = a;
|
|
28
|
+
function r() {
|
|
29
|
+
document.documentElement.classList.add(A);
|
|
20
30
|
}
|
|
21
|
-
function
|
|
22
|
-
document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(
|
|
31
|
+
function w() {
|
|
32
|
+
document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(A);
|
|
23
33
|
}
|
|
24
|
-
const
|
|
25
|
-
function
|
|
26
|
-
|
|
34
|
+
const s = P(t.modelValue);
|
|
35
|
+
function l() {
|
|
36
|
+
k(!1);
|
|
37
|
+
}
|
|
38
|
+
async function k(e) {
|
|
39
|
+
var n;
|
|
40
|
+
e || (o("before-close"), await ((n = t.beforeClose) == null ? void 0 : n.call(t))), s.value = e;
|
|
27
41
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
e || (t("before-close"), await ((r = o.beforeClose) == null ? void 0 : r.call(o))), n.value = e;
|
|
42
|
+
function y() {
|
|
43
|
+
o("open");
|
|
31
44
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
45
|
+
function b() {
|
|
46
|
+
o("update:model-value", !1), o("close"), f();
|
|
34
47
|
}
|
|
35
48
|
function i() {
|
|
36
|
-
t
|
|
49
|
+
t.persistent || l();
|
|
37
50
|
}
|
|
38
|
-
function u() {
|
|
39
|
-
|
|
51
|
+
function u(e) {
|
|
52
|
+
!t.noCloseOnEscKey && e.key === "Escape" && !t.persistent && l();
|
|
40
53
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
54
|
+
function C() {
|
|
55
|
+
r(), document.addEventListener("keyup", u, !1);
|
|
43
56
|
}
|
|
44
|
-
function
|
|
45
|
-
|
|
57
|
+
function f() {
|
|
58
|
+
document.removeEventListener("keyup", u), w();
|
|
46
59
|
}
|
|
47
|
-
|
|
48
|
-
|
|
60
|
+
V(() => {
|
|
61
|
+
t.modelValue ? C() : f();
|
|
62
|
+
});
|
|
63
|
+
let c = null;
|
|
64
|
+
function S(e) {
|
|
65
|
+
const n = document.querySelector(e), m = n && Array.from(n.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select')), p = m == null ? void 0 : m.filter((E) => {
|
|
66
|
+
const g = window.getComputedStyle(E);
|
|
67
|
+
return g.display !== "none" && g.visibility !== "hidden" && !E.disabled;
|
|
68
|
+
});
|
|
69
|
+
return p && p.length > 0 ? p[0] : null;
|
|
49
70
|
}
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
71
|
+
return D(
|
|
72
|
+
() => t.modelValue,
|
|
73
|
+
async (e) => {
|
|
74
|
+
if (s.value = e, e) {
|
|
75
|
+
C(), c = document.activeElement, await B();
|
|
76
|
+
const n = S(".m-backdrop-content");
|
|
77
|
+
n == null || n.focus();
|
|
78
|
+
} else
|
|
79
|
+
f(), await B(), c == null || c.focus();
|
|
56
80
|
}
|
|
57
|
-
),
|
|
58
|
-
onBackdropAnimationEnter:
|
|
59
|
-
onBackdropAnimationLeave:
|
|
60
|
-
onBackdropClicked:
|
|
61
|
-
close:
|
|
62
|
-
present:
|
|
63
|
-
toggleModal:
|
|
64
|
-
onKeyPress:
|
|
65
|
-
}), (e,
|
|
66
|
-
|
|
81
|
+
), d({
|
|
82
|
+
onBackdropAnimationEnter: y,
|
|
83
|
+
onBackdropAnimationLeave: b,
|
|
84
|
+
onBackdropClicked: i,
|
|
85
|
+
close: l,
|
|
86
|
+
present: s,
|
|
87
|
+
toggleModal: k,
|
|
88
|
+
onKeyPress: u
|
|
89
|
+
}), (e, n) => (h(), M(N, { to: e.teleportSelector }, [
|
|
90
|
+
T(O, {
|
|
67
91
|
appear: "",
|
|
68
92
|
name: e.transitionName,
|
|
69
|
-
onAfterEnter:
|
|
70
|
-
onAfterLeave:
|
|
93
|
+
onAfterEnter: y,
|
|
94
|
+
onAfterLeave: b
|
|
71
95
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
|
|
96
|
+
default: $(() => [
|
|
97
|
+
s.value ? (h(), j(
|
|
74
98
|
"div",
|
|
75
|
-
{
|
|
99
|
+
q({
|
|
76
100
|
key: 0,
|
|
77
|
-
class:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
},
|
|
101
|
+
class: "m-backdrop --present"
|
|
102
|
+
}, e.$attrs, {
|
|
103
|
+
class: [e.backdropClass, e.variant && `--variant-${e.variant}`, { "--persistent": e.persistent }]
|
|
104
|
+
}),
|
|
81
105
|
[
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
],
|
|
104
|
-
16
|
|
105
|
-
/* FULL_PROPS */
|
|
106
|
-
)
|
|
106
|
+
v("div", G, [
|
|
107
|
+
v("div", H, [
|
|
108
|
+
v(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
class: z(["m-backdrop-content", [e.backdropContentClass, `--justify-${e.justify}`, `--align-${e.align}`, { "--padding": e.contentPadding }]]),
|
|
112
|
+
role: "button",
|
|
113
|
+
tabindex: "-1",
|
|
114
|
+
onClick: F(i, ["self"])
|
|
115
|
+
},
|
|
116
|
+
[
|
|
117
|
+
K(e.$slots, "default", {
|
|
118
|
+
close: l,
|
|
119
|
+
onBackdropClicked: i
|
|
120
|
+
}, void 0, !0)
|
|
121
|
+
],
|
|
122
|
+
2
|
|
123
|
+
/* CLASS */
|
|
124
|
+
)
|
|
125
|
+
])
|
|
126
|
+
])
|
|
107
127
|
],
|
|
108
|
-
|
|
109
|
-
/*
|
|
110
|
-
)) :
|
|
128
|
+
16
|
|
129
|
+
/* FULL_PROPS */
|
|
130
|
+
)) : I("v-if", !0)
|
|
111
131
|
]),
|
|
112
132
|
_: 3
|
|
113
133
|
/* FORWARDED */
|
|
114
134
|
}, 8, ["name"])
|
|
115
135
|
], 8, ["to"]));
|
|
116
136
|
}
|
|
117
|
-
})
|
|
137
|
+
}), Q = (t, d) => {
|
|
138
|
+
const a = t.__vccOpts || t;
|
|
139
|
+
for (const [o, r] of d)
|
|
140
|
+
a[o] = r;
|
|
141
|
+
return a;
|
|
142
|
+
}, W = /* @__PURE__ */ Q(J, [["__scopeId", "data-v-7aa1682e"]]);
|
|
118
143
|
export {
|
|
119
|
-
|
|
144
|
+
W as default
|
|
120
145
|
};
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** @model Modal's model value */
|
|
3
|
+
modelValue?: boolean;
|
|
4
|
+
/** Remove the close button */
|
|
5
|
+
noClose?: boolean;
|
|
6
|
+
/** Remove the padding on the container */
|
|
7
|
+
noPadding?: boolean;
|
|
8
|
+
};
|
|
1
9
|
declare function __VLS_template(): {
|
|
2
10
|
attrs: Partial<{}>;
|
|
3
11
|
slots: {
|
|
@@ -9,36 +17,15 @@ declare function __VLS_template(): {
|
|
|
9
17
|
rootEl: any;
|
|
10
18
|
};
|
|
11
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").
|
|
13
|
-
noClose: {
|
|
14
|
-
type: BooleanConstructor;
|
|
15
|
-
default: boolean;
|
|
16
|
-
};
|
|
17
|
-
noPadding: {
|
|
18
|
-
type: BooleanConstructor;
|
|
19
|
-
default: boolean;
|
|
20
|
-
};
|
|
21
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
21
|
close: (...args: any[]) => void;
|
|
23
22
|
open: (...args: any[]) => void;
|
|
24
23
|
"update:model-value": (...args: any[]) => void;
|
|
25
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
26
|
-
noClose: {
|
|
27
|
-
type: BooleanConstructor;
|
|
28
|
-
default: boolean;
|
|
29
|
-
};
|
|
30
|
-
noPadding: {
|
|
31
|
-
type: BooleanConstructor;
|
|
32
|
-
default: boolean;
|
|
33
|
-
};
|
|
34
|
-
}>> & Readonly<{
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
35
25
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
36
26
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
37
27
|
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
|
|
38
|
-
}>, {
|
|
39
|
-
noPadding: boolean;
|
|
40
|
-
noClose: boolean;
|
|
41
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
29
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
30
|
export default _default;
|
|
44
31
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentPublicInstance, HTMLAttributes } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { nextTick } from 'vue';
|
|
3
|
+
import { type MazBackdropProps } from './MazBackdrop.vue';
|
|
3
4
|
export interface InternalProps {
|
|
4
5
|
/** @model Modal's model value */
|
|
5
6
|
modelValue?: boolean;
|
|
@@ -7,31 +8,32 @@ export interface InternalProps {
|
|
|
7
8
|
title?: string;
|
|
8
9
|
/** Remove the close button in header */
|
|
9
10
|
noClose?: boolean;
|
|
10
|
-
/** Modal's width */
|
|
11
|
-
width?: string;
|
|
12
11
|
/** Modal's max-width */
|
|
13
12
|
maxWidth?: string;
|
|
14
|
-
/** Modal's
|
|
15
|
-
|
|
13
|
+
/** Modal's min-width */
|
|
14
|
+
minWidth?: string;
|
|
16
15
|
/** Modal's content becomes scrollable - warning: a overflow is applied */
|
|
17
16
|
scrollable?: boolean;
|
|
18
17
|
/** Persistent dialog (not closable by clicking outside and remove close button) */
|
|
19
18
|
persistent?: boolean;
|
|
20
19
|
}
|
|
21
|
-
export type
|
|
22
|
-
type __VLS_Props =
|
|
20
|
+
export type MazDialogProps = InternalProps & MazBackdropProps;
|
|
21
|
+
type __VLS_Props = InternalProps & MazBackdropProps;
|
|
23
22
|
declare function __VLS_template(): {
|
|
24
23
|
attrs: Partial<{}>;
|
|
25
24
|
slots: {
|
|
26
25
|
header?(_: {
|
|
27
26
|
close: () => void;
|
|
27
|
+
onBackdropClicked: () => void;
|
|
28
28
|
}): any;
|
|
29
29
|
title?(_: {}): any;
|
|
30
30
|
default?(_: {
|
|
31
31
|
close: () => void;
|
|
32
|
+
onBackdropClicked: () => void;
|
|
32
33
|
}): any;
|
|
33
34
|
footer?(_: {
|
|
34
35
|
close: () => void;
|
|
36
|
+
onBackdropClicked: () => void;
|
|
35
37
|
}): any;
|
|
36
38
|
};
|
|
37
39
|
refs: {
|
|
@@ -47,6 +49,10 @@ declare function __VLS_template(): {
|
|
|
47
49
|
readonly transitionName?: string | undefined;
|
|
48
50
|
readonly backdropClass?: HTMLAttributes["class"];
|
|
49
51
|
readonly backdropContentClass?: HTMLAttributes["class"];
|
|
52
|
+
readonly contentPadding?: boolean | undefined;
|
|
53
|
+
readonly justify?: ("center" | "end" | "start" | "space-between" | "space-around" | "none") | undefined;
|
|
54
|
+
readonly align?: ("center" | "end" | "start" | "none") | undefined;
|
|
55
|
+
readonly variant?: ("bottom-sheet" | "dialog" | "drawer") | undefined;
|
|
50
56
|
readonly onClose?: ((value?: void | undefined) => any) | undefined;
|
|
51
57
|
readonly onOpen?: ((value?: void | undefined) => any) | undefined;
|
|
52
58
|
readonly "onUpdate:model-value"?: ((value: boolean) => any) | undefined;
|
|
@@ -84,16 +90,7 @@ declare function __VLS_template(): {
|
|
|
84
90
|
open: (value: void) => any;
|
|
85
91
|
"update:model-value": (value: boolean) => any;
|
|
86
92
|
"before-close": (value: void) => any;
|
|
87
|
-
}, string, {
|
|
88
|
-
modelValue: boolean;
|
|
89
|
-
teleportSelector: string;
|
|
90
|
-
beforeClose: () => Promise<void> | void;
|
|
91
|
-
persistent: boolean;
|
|
92
|
-
noCloseOnEscKey: boolean;
|
|
93
|
-
transitionName: string;
|
|
94
|
-
backdropClass: HTMLAttributes["class"];
|
|
95
|
-
backdropContentClass: HTMLAttributes["class"];
|
|
96
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
93
|
+
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
97
94
|
beforeCreate?: (() => void) | (() => void)[];
|
|
98
95
|
created?: (() => void) | (() => void)[];
|
|
99
96
|
beforeMount?: (() => void) | (() => void)[];
|
|
@@ -111,23 +108,14 @@ declare function __VLS_template(): {
|
|
|
111
108
|
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
112
109
|
};
|
|
113
110
|
$forceUpdate: () => void;
|
|
114
|
-
$nextTick: typeof
|
|
111
|
+
$nextTick: typeof nextTick;
|
|
115
112
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
116
|
-
} & Readonly<{
|
|
117
|
-
modelValue: boolean;
|
|
118
|
-
teleportSelector: string;
|
|
119
|
-
beforeClose: () => Promise<void> | void;
|
|
120
|
-
persistent: boolean;
|
|
121
|
-
noCloseOnEscKey: boolean;
|
|
122
|
-
transitionName: string;
|
|
123
|
-
backdropClass: HTMLAttributes["class"];
|
|
124
|
-
backdropContentClass: HTMLAttributes["class"];
|
|
125
|
-
}> & Omit<Readonly<MazBackdropProps> & Readonly<{
|
|
113
|
+
} & Readonly<{}> & Omit<Readonly<MazBackdropProps> & Readonly<{
|
|
126
114
|
onClose?: ((value?: void | undefined) => any) | undefined;
|
|
127
115
|
onOpen?: ((value?: void | undefined) => any) | undefined;
|
|
128
116
|
"onUpdate:model-value"?: ((value: boolean) => any) | undefined;
|
|
129
117
|
"onBefore-close"?: ((value?: void | undefined) => any) | undefined;
|
|
130
|
-
}>, "close" | "onBackdropAnimationEnter" | "onBackdropAnimationLeave" | "onBackdropClicked" | "present" | "toggleModal" | "onKeyPress"
|
|
118
|
+
}>, "close" | "onBackdropAnimationEnter" | "onBackdropAnimationLeave" | "onBackdropClicked" | "present" | "toggleModal" | "onKeyPress"> & import("vue").ShallowUnwrapRef<{
|
|
131
119
|
onBackdropAnimationEnter: () => void;
|
|
132
120
|
onBackdropAnimationLeave: () => void;
|
|
133
121
|
onBackdropClicked: () => void;
|
|
@@ -139,9 +127,11 @@ declare function __VLS_template(): {
|
|
|
139
127
|
$slots: {
|
|
140
128
|
default?(_: {
|
|
141
129
|
close: () => void;
|
|
130
|
+
onBackdropClicked: () => void;
|
|
142
131
|
}): any;
|
|
143
132
|
};
|
|
144
133
|
}) | null;
|
|
134
|
+
dialogContent: HTMLDivElement;
|
|
145
135
|
};
|
|
146
136
|
rootEl: any;
|
|
147
137
|
};
|
|
@@ -158,11 +148,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
158
148
|
"onUpdate:model-value"?: ((value: boolean) => any) | undefined;
|
|
159
149
|
}>, {
|
|
160
150
|
title: string;
|
|
161
|
-
width: string;
|
|
162
151
|
persistent: boolean;
|
|
163
152
|
noClose: boolean;
|
|
164
153
|
maxWidth: string;
|
|
165
|
-
|
|
154
|
+
minWidth: string;
|
|
166
155
|
scrollable: boolean;
|
|
167
156
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
168
157
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
package/components/MazDialog.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DialogCustomButton, DialogData } from './MazDialogPromise/useMazDialogPromise';
|
|
2
|
-
import { type
|
|
2
|
+
import { type MazDialogProps } from './MazDialog.vue';
|
|
3
3
|
export interface MazDialogPromiseProps {
|
|
4
4
|
/** Dialog Data - @type DialogData */
|
|
5
5
|
data?: DialogData;
|
|
@@ -13,12 +13,12 @@ export interface MazDialogPromiseProps {
|
|
|
13
13
|
export type Props = MazDialogPromiseProps & MazDialogProps & DialogData;
|
|
14
14
|
export { useMazDialogPromise } from './MazDialogPromise/useMazDialogPromise';
|
|
15
15
|
export type { ActionButton, DialogButton, DialogCustomButton, DialogData, DialogState, PromiseButton } from './MazDialogPromise/useMazDialogPromise';
|
|
16
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<MazDialogPromiseProps & import("./MazDialog.vue").InternalProps & import("./MazBackdrop.vue").
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<MazDialogPromiseProps & import("./MazDialog.vue").InternalProps & import("./MazBackdrop.vue").MazBackdropProps & DialogData, {
|
|
17
17
|
close: () => any;
|
|
18
18
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
19
|
close: (value: void) => any;
|
|
20
20
|
open: (value: void) => any;
|
|
21
|
-
}, string, import("vue").PublicProps, Readonly<MazDialogPromiseProps & import("./MazDialog.vue").InternalProps & import("./MazBackdrop.vue").
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<MazDialogPromiseProps & import("./MazDialog.vue").InternalProps & import("./MazBackdrop.vue").MazBackdropProps & DialogData> & Readonly<{
|
|
22
22
|
onClose?: ((value?: void | undefined) => any) | undefined;
|
|
23
23
|
onOpen?: ((value?: void | undefined) => any) | undefined;
|
|
24
24
|
}>, {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface MazDrawerProps {
|
|
2
2
|
/** The title of the drawer */
|
|
3
3
|
title?: string;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* The variant of the drawer
|
|
6
|
+
* @values 'right', 'top', 'left', 'bottom'
|
|
7
|
+
*/
|
|
5
8
|
variant?: 'right' | 'top' | 'left' | 'bottom';
|
|
6
9
|
/** The size of the drawer */
|
|
7
10
|
size?: string;
|
|
@@ -24,12 +27,12 @@ declare function __VLS_template(): {
|
|
|
24
27
|
rootEl: any;
|
|
25
28
|
};
|
|
26
29
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
27
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
30
|
+
declare const __VLS_component: import("vue").DefineComponent<MazDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
28
31
|
close: () => any;
|
|
29
32
|
open: () => any;
|
|
30
33
|
"update:model-value": (value: boolean) => any;
|
|
31
34
|
"before-close": () => any;
|
|
32
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<MazDrawerProps> & Readonly<{
|
|
33
36
|
onClose?: (() => any) | undefined;
|
|
34
37
|
onOpen?: (() => any) | undefined;
|
|
35
38
|
"onUpdate:model-value"?: ((value: boolean) => any) | undefined;
|