md-components-mdigial-azamat 0.0.89 → 0.0.92
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.
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
2
2
|
import { useState as h, useEffect as c, useCallback as b } from "react";
|
|
3
3
|
import { c as y } from "./cn-6a4bf187.js";
|
|
4
4
|
import { createPortal as g } from "react-dom";
|
|
5
|
-
const
|
|
6
|
-
const { className: r, children:
|
|
5
|
+
const v = ({ children: n, element: r = document.body }) => g(n, r), w = (n) => {
|
|
6
|
+
const { className: r, children: a, isOpen: e, onClose: o, lazy: p } = n, [m, x] = h(!1);
|
|
7
7
|
c(() => {
|
|
8
8
|
e && x(!0);
|
|
9
9
|
}, [e]), c(() => (e ? (document.body.style.overflow = "hidden", document.body.style.paddingRight = "var(--scrollbar-width, 0px)") : (document.body.style.overflow = "", document.body.style.paddingRight = ""), () => {
|
|
10
10
|
document.body.style.overflow = "", document.body.style.paddingRight = "";
|
|
11
11
|
}), [e]);
|
|
12
|
-
const
|
|
12
|
+
const l = b(
|
|
13
13
|
(i) => {
|
|
14
|
-
i.key === "Escape" && (
|
|
14
|
+
i.key === "Escape" && (o == null || o());
|
|
15
15
|
},
|
|
16
|
-
[
|
|
16
|
+
[o]
|
|
17
17
|
);
|
|
18
18
|
c(() => {
|
|
19
19
|
if (e) {
|
|
20
|
-
window.addEventListener("keydown",
|
|
20
|
+
window.addEventListener("keydown", l);
|
|
21
21
|
const i = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])', s = document.querySelector('[role="dialog"]'), d = s == null ? void 0 : s.querySelectorAll(
|
|
22
22
|
i
|
|
23
23
|
)[0];
|
|
24
24
|
d == null || d.focus();
|
|
25
25
|
}
|
|
26
26
|
return () => {
|
|
27
|
-
window.removeEventListener("keydown",
|
|
27
|
+
window.removeEventListener("keydown", l);
|
|
28
28
|
};
|
|
29
|
-
}, [e,
|
|
29
|
+
}, [e, l]);
|
|
30
30
|
const f = (i) => {
|
|
31
31
|
i.stopPropagation();
|
|
32
32
|
};
|
|
33
|
-
return
|
|
33
|
+
return p && !m ? null : /* @__PURE__ */ t(v, { children: /* @__PURE__ */ t(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
36
|
className: y(
|
|
37
|
-
"fixed inset-0 z-[
|
|
37
|
+
"fixed inset-0 z-[100000000] flex items-center justify-center bg-black/60 transition-all duration-300",
|
|
38
38
|
e ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none",
|
|
39
39
|
r
|
|
40
40
|
),
|
|
41
|
-
onClick:
|
|
41
|
+
onClick: o,
|
|
42
42
|
role: "dialog",
|
|
43
43
|
"aria-modal": "true",
|
|
44
44
|
children: /* @__PURE__ */ u(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
47
|
className: y(
|
|
48
|
-
"relative bg-
|
|
48
|
+
"relative bg-[#F4F6F7] p-8 rounded-[24px] shadow-2xl max-w-[1200px] w-[100%] max-h-[90vh] overflow-y-auto transform transition-all duration-300",
|
|
49
49
|
e ? "scale-100 opacity-100" : "scale-95 opacity-0"
|
|
50
50
|
),
|
|
51
51
|
onClick: f,
|
|
52
52
|
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ t(
|
|
54
54
|
"button",
|
|
55
55
|
{
|
|
56
|
-
onClick:
|
|
56
|
+
onClick: o,
|
|
57
57
|
className: "absolute top-4 right-4 p-2 rounded-full hover:bg-gray-100 transition-colors text-gray-500",
|
|
58
58
|
"aria-label": "Close",
|
|
59
59
|
children: /* @__PURE__ */ u(
|
|
@@ -68,7 +68,7 @@ const w = ({ children: n, element: r = document.body }) => g(n, r), v = (n) => {
|
|
|
68
68
|
strokeLinecap: "round",
|
|
69
69
|
strokeLinejoin: "round",
|
|
70
70
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ t(
|
|
72
72
|
"line",
|
|
73
73
|
{
|
|
74
74
|
x1: "18",
|
|
@@ -77,7 +77,7 @@ const w = ({ children: n, element: r = document.body }) => g(n, r), v = (n) => {
|
|
|
77
77
|
y2: "18"
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ t(
|
|
81
81
|
"line",
|
|
82
82
|
{
|
|
83
83
|
x1: "6",
|
|
@@ -91,7 +91,7 @@ const w = ({ children: n, element: r = document.body }) => g(n, r), v = (n) => {
|
|
|
91
91
|
)
|
|
92
92
|
}
|
|
93
93
|
),
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ t("div", { className: "mt-2 text-[#0e0f11]", children: a })
|
|
95
95
|
]
|
|
96
96
|
}
|
|
97
97
|
)
|
|
@@ -100,22 +100,23 @@ const w = ({ children: n, element: r = document.body }) => g(n, r), v = (n) => {
|
|
|
100
100
|
}, j = ({
|
|
101
101
|
components: n = [],
|
|
102
102
|
title: r,
|
|
103
|
-
description:
|
|
103
|
+
description: a,
|
|
104
104
|
isOpen: e,
|
|
105
|
-
onClose:
|
|
105
|
+
onClose: o
|
|
106
106
|
}) => /* @__PURE__ */ u(
|
|
107
|
-
|
|
107
|
+
w,
|
|
108
108
|
{
|
|
109
109
|
isOpen: e,
|
|
110
|
-
onClose:
|
|
110
|
+
onClose: o,
|
|
111
111
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ t("div", { className: "bg-white", children: "123" }),
|
|
113
|
+
/* @__PURE__ */ t("h2", { className: "text-[44px] leading-[52px] font-bold mb-[24px] text-center", children: r }),
|
|
114
|
+
/* @__PURE__ */ t("p", { className: "text-[18px] leading-[26px] text-graySoft text-center", children: a }),
|
|
114
115
|
n
|
|
115
116
|
]
|
|
116
117
|
}
|
|
117
118
|
);
|
|
118
119
|
export {
|
|
119
|
-
|
|
120
|
+
w as M,
|
|
120
121
|
j as a
|
|
121
122
|
};
|
package/dist/main.js
CHANGED
|
@@ -43,7 +43,7 @@ import { FieldTypes as Ko } from "./Types/FiledTypes.js";
|
|
|
43
43
|
import { B as Qo } from "./const-53dff524.js";
|
|
44
44
|
import { Space as Uo } from "./Space/Space.js";
|
|
45
45
|
import { FileBannerSecondary as Yo } from "./DownloadFile/components/FileBannerSecondary/FileBannerSecondary.js";
|
|
46
|
-
import { M as $o, a as or } from "./index-
|
|
46
|
+
import { M as $o, a as or } from "./index-497f59a8.js";
|
|
47
47
|
import { useState as f, useCallback as r } from "react";
|
|
48
48
|
import { S as er } from "./size-b1291031.js";
|
|
49
49
|
import { TitleBlock as ar } from "./TitleBlock/TitleBlock.js";
|