mhz-ui 1.3.7 → 1.3.8
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/dist/UiModal/UiModal.css +1 -1
- package/dist/UiModal/UiModal.js +43 -40
- package/package.json +1 -1
package/dist/UiModal/UiModal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._backdrop_jn54y_1{position:fixed;inset:0;z-index:998;display:flex;align-items:center;justify-content:center;background-color:var(--color-gray-transparent)}._dialog_jn54y_11{z-index:999;padding:0;outline:none;background-color:var(--color-white);border:none;border-radius:16px}._modal_jn54y_20{display:flex;flex-direction:column;gap:12px;width:var(--
|
|
1
|
+
._backdrop_jn54y_1{position:fixed;inset:0;z-index:998;display:flex;align-items:center;justify-content:center;background-color:var(--color-gray-transparent)}._dialog_jn54y_11{z-index:999;padding:0;outline:none;background-color:var(--color-white);border:none;border-radius:16px}._modal_jn54y_20{display:flex;flex-direction:column;gap:12px;width:var(--v1c45205f);max-width:100%;height:auto;padding:24px;outline:none;box-shadow:0 0 16px 0 var(--color-gray-transparent)}._modal_jn54y_20[data-scrollable=true]{max-height:64dvh;overflow-y:auto}._header_jn54y_36{display:flex;justify-content:flex-end}._buttons_jn54y_41{display:flex;gap:16px}.dark ._modal_jn54y_20{background-color:var(--color-black);box-shadow:0 0 16px 0 var(--color-black-transparent)}.dark ._slot_jn54y_50{color:var(--color-white)}
|
package/dist/UiModal/UiModal.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./UiModal.css";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { M as
|
|
2
|
+
import { defineComponent as V, useCssVars as $, computed as w, ref as B, onMounted as S, watch as j, createBlock as E, openBlock as n, Teleport as N, createElementBlock as c, createCommentVNode as u, normalizeClass as l, createElementVNode as a, mergeProps as U, withModifiers as m, createVNode as d, renderSlot as T, withCtx as f, createTextVNode as p, toDisplayString as _, unref as y, nextTick as A } from "vue";
|
|
3
|
+
import g from "../UiButton/UiButton.js";
|
|
4
|
+
import D from "../UiClose/UiClose.js";
|
|
5
|
+
import { M as h } from "../index-DajWja1y.js";
|
|
6
6
|
import { _ as R } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const z = ["data-scrollable"],
|
|
7
|
+
const z = ["data-scrollable"], G = /* @__PURE__ */ V({
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "UiModal",
|
|
10
10
|
props: {
|
|
@@ -15,24 +15,27 @@ const z = ["data-scrollable"], D = /* @__PURE__ */ v({
|
|
|
15
15
|
lang: { default: "ru" }
|
|
16
16
|
},
|
|
17
17
|
emits: ["update:modelValue", "confirm"],
|
|
18
|
-
setup(
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
setup(k, { emit: C }) {
|
|
19
|
+
$((e) => ({
|
|
20
|
+
v1c45205f: b.value
|
|
21
21
|
}));
|
|
22
|
-
const o =
|
|
22
|
+
const o = k, r = C, b = w(() => `${o.width}px`), s = B(null);
|
|
23
|
+
function v() {
|
|
24
|
+
A(() => {
|
|
25
|
+
s.value?.open ? s.value.close() : s.value?.showModal();
|
|
26
|
+
});
|
|
27
|
+
}
|
|
23
28
|
function M() {
|
|
24
29
|
r("confirm"), t();
|
|
25
30
|
}
|
|
26
31
|
function t() {
|
|
27
32
|
r("update:modelValue", !1);
|
|
28
33
|
}
|
|
29
|
-
return
|
|
30
|
-
|
|
34
|
+
return S(() => {
|
|
35
|
+
j(
|
|
31
36
|
() => o.modelValue,
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
a.value?.showModal();
|
|
35
|
-
}) : a.value?.close();
|
|
37
|
+
() => {
|
|
38
|
+
v();
|
|
36
39
|
},
|
|
37
40
|
{ immediate: !0 }
|
|
38
41
|
);
|
|
@@ -42,24 +45,24 @@ const z = ["data-scrollable"], D = /* @__PURE__ */ v({
|
|
|
42
45
|
class: l(e.$style.backdrop),
|
|
43
46
|
onMousedown: t
|
|
44
47
|
}, [
|
|
45
|
-
|
|
48
|
+
a("dialog", U({
|
|
46
49
|
ref_key: "dialogRef",
|
|
47
|
-
ref:
|
|
50
|
+
ref: s,
|
|
48
51
|
class: e.$style.dialog,
|
|
49
|
-
onCancel:
|
|
52
|
+
onCancel: m(t, ["prevent"])
|
|
50
53
|
}, e.$attrs), [
|
|
51
|
-
|
|
54
|
+
a("div", {
|
|
52
55
|
class: l(e.$style.modal),
|
|
53
|
-
onMousedown: i[0] || (i[0] =
|
|
56
|
+
onMousedown: i[0] || (i[0] = m(() => {
|
|
54
57
|
}, ["stop"])),
|
|
55
58
|
"data-scrollable": o.isScrollable
|
|
56
59
|
}, [
|
|
57
|
-
|
|
60
|
+
a("div", {
|
|
58
61
|
class: l(e.$style.header)
|
|
59
62
|
}, [
|
|
60
|
-
d(
|
|
63
|
+
d(D, { onClick: t })
|
|
61
64
|
], 2),
|
|
62
|
-
|
|
65
|
+
a("div", {
|
|
63
66
|
class: l(e.$style.slot)
|
|
64
67
|
}, [
|
|
65
68
|
T(e.$slots, "default")
|
|
@@ -68,37 +71,37 @@ const z = ["data-scrollable"], D = /* @__PURE__ */ v({
|
|
|
68
71
|
key: 0,
|
|
69
72
|
class: l(e.$style.buttons)
|
|
70
73
|
}, [
|
|
71
|
-
d(
|
|
74
|
+
d(g, { onClick: M }, {
|
|
72
75
|
default: f(() => [
|
|
73
|
-
p(_(y(
|
|
76
|
+
p(_(y(h)[o.lang].confirm), 1)
|
|
74
77
|
]),
|
|
75
78
|
_: 1
|
|
76
79
|
}),
|
|
77
|
-
d(
|
|
80
|
+
d(g, {
|
|
78
81
|
layout: "secondary",
|
|
79
82
|
onClick: t
|
|
80
83
|
}, {
|
|
81
84
|
default: f(() => [
|
|
82
|
-
p(_(y(
|
|
85
|
+
p(_(y(h)[o.lang].cancel), 1)
|
|
83
86
|
]),
|
|
84
87
|
_: 1
|
|
85
88
|
})
|
|
86
|
-
], 2)) :
|
|
89
|
+
], 2)) : u("", !0)
|
|
87
90
|
], 42, z)
|
|
88
91
|
], 16)
|
|
89
|
-
], 34)) :
|
|
92
|
+
], 34)) : u("", !0)
|
|
90
93
|
]));
|
|
91
94
|
}
|
|
92
|
-
}),
|
|
93
|
-
backdrop:
|
|
94
|
-
dialog:
|
|
95
|
-
modal:
|
|
96
|
-
header:
|
|
97
|
-
buttons:
|
|
98
|
-
slot:
|
|
99
|
-
},
|
|
100
|
-
$style:
|
|
101
|
-
},
|
|
95
|
+
}), P = "_backdrop_jn54y_1", q = "_dialog_jn54y_11", x = "_modal_jn54y_20", F = "_header_jn54y_36", H = "_buttons_jn54y_41", I = "_slot_jn54y_50", J = {
|
|
96
|
+
backdrop: P,
|
|
97
|
+
dialog: q,
|
|
98
|
+
modal: x,
|
|
99
|
+
header: F,
|
|
100
|
+
buttons: H,
|
|
101
|
+
slot: I
|
|
102
|
+
}, K = {
|
|
103
|
+
$style: J
|
|
104
|
+
}, Y = /* @__PURE__ */ R(G, [["__cssModules", K]]);
|
|
102
105
|
export {
|
|
103
|
-
|
|
106
|
+
Y as default
|
|
104
107
|
};
|