ar-design 0.1.52 → 0.1.53
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/assets/css/components/data-display/paper/paper.css +4 -4
- package/dist/assets/css/components/layout/layout.css +7 -7
- package/dist/components/feedback/confirm/index.js +11 -10
- package/dist/libs/core/service/Api.d.ts +1 -0
- package/dist/libs/core/service/Api.js +2 -1
- package/dist/libs/core/service/index.d.ts +1 -0
- package/dist/libs/core/service/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.ar-paper {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
background-color: var(--white);
|
|
3
|
+
padding: 2rem;
|
|
4
|
+
border-radius: var(--border-radius-lg);
|
|
5
|
+
box-shadow: 0 0 20px 0 rgba(var(--black-rgb), 0.02);
|
|
6
6
|
}
|
|
7
7
|
.ar-paper > .header {
|
|
8
8
|
display: flex;
|
|
@@ -14,26 +14,26 @@
|
|
|
14
14
|
height: 100%;
|
|
15
15
|
}
|
|
16
16
|
.ar-layout > main > aside.ar-aside.left {
|
|
17
|
-
|
|
17
|
+
flex: 2;
|
|
18
18
|
min-height: calc(100vh - 7.5rem);
|
|
19
19
|
border-right: solid 1px var(--gray-200);
|
|
20
20
|
}
|
|
21
21
|
.ar-layout > main > aside.ar-aside.right {
|
|
22
|
-
|
|
22
|
+
flex: 2;
|
|
23
23
|
}
|
|
24
24
|
.ar-layout > main > section {
|
|
25
|
+
flex: 8;
|
|
25
26
|
height: fit-content;
|
|
26
|
-
padding: 0 2rem;
|
|
27
27
|
border-radius: var(--border-radius-lg);
|
|
28
28
|
}
|
|
29
29
|
.ar-layout > main:not(:has(> .ar-aside)) > section {
|
|
30
30
|
min-width: 100%;
|
|
31
31
|
}
|
|
32
|
-
.ar-layout > main:has(> .ar-aside) > section {
|
|
33
|
-
|
|
32
|
+
.ar-layout > main:has(> .ar-aside.left) > section {
|
|
33
|
+
padding-left: 2rem;
|
|
34
34
|
}
|
|
35
|
-
.ar-layout > main:has(> .ar-aside) > section:has(~ .ar-aside) {
|
|
36
|
-
|
|
35
|
+
.ar-layout > main:has(> .ar-aside.left) > section:has(~ .ar-aside.right) {
|
|
36
|
+
padding: 0 2rem;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
@import url("./header.css");
|
|
@@ -23,19 +23,25 @@ const Confirm = ({ children, title, message, content, onConfirm }) => {
|
|
|
23
23
|
if (key === "Escape")
|
|
24
24
|
setOpen(false);
|
|
25
25
|
};
|
|
26
|
-
const
|
|
26
|
+
const handleScroll = () => {
|
|
27
|
+
if (!_arConfirmWrapper.current || !_arConfirm.current)
|
|
28
|
+
return;
|
|
29
|
+
const wrapper = _arConfirmWrapper.current.getBoundingClientRect();
|
|
30
|
+
const confirm = _arConfirm.current.getBoundingClientRect();
|
|
31
|
+
setCoordinatX(wrapper.left - confirm.width - 10);
|
|
32
|
+
setCoordinatY(wrapper.top);
|
|
33
|
+
};
|
|
27
34
|
// useEffects
|
|
28
35
|
useEffect(() => {
|
|
29
36
|
if (open) {
|
|
30
37
|
document.addEventListener("click", handleClickOutSide);
|
|
31
38
|
document.addEventListener("keydown", handleKeys);
|
|
32
|
-
|
|
33
|
-
window.addEventListener("resize", handleResizeEvent);
|
|
39
|
+
document.addEventListener("scroll", handleScroll);
|
|
34
40
|
// Dinleyicileri kaldır.
|
|
35
41
|
return () => {
|
|
36
42
|
document.removeEventListener("click", handleClickOutSide);
|
|
37
43
|
document.removeEventListener("keydown", handleKeys);
|
|
38
|
-
|
|
44
|
+
document.removeEventListener("scroll", handleScroll);
|
|
39
45
|
};
|
|
40
46
|
}
|
|
41
47
|
}, [open]);
|
|
@@ -54,12 +60,7 @@ const Confirm = ({ children, title, message, content, onConfirm }) => {
|
|
|
54
60
|
setOpen(false);
|
|
55
61
|
} }, "Hay\u0131r")))),
|
|
56
62
|
React.createElement("div", { onClick: () => {
|
|
57
|
-
|
|
58
|
-
return;
|
|
59
|
-
const wrapper = _arConfirmWrapper.current.getBoundingClientRect();
|
|
60
|
-
const confirm = _arConfirm.current.getBoundingClientRect();
|
|
61
|
-
setCoordinatX(wrapper.left - confirm.width - 10);
|
|
62
|
-
setCoordinatY(wrapper.top);
|
|
63
|
+
handleScroll();
|
|
63
64
|
setOpen((prev) => !prev);
|
|
64
65
|
} }, children)));
|
|
65
66
|
};
|
|
@@ -20,6 +20,7 @@ class Api {
|
|
|
20
20
|
headers: { ...this.HeaderProperties, ...values.headers },
|
|
21
21
|
method: "POST",
|
|
22
22
|
body: JSON.stringify(values.data),
|
|
23
|
+
...values.init,
|
|
23
24
|
});
|
|
24
25
|
return response;
|
|
25
26
|
}
|
|
@@ -62,7 +63,7 @@ class Api {
|
|
|
62
63
|
console.error("400");
|
|
63
64
|
break;
|
|
64
65
|
case 401:
|
|
65
|
-
console.error("401");
|
|
66
|
+
// console.error("401");
|
|
66
67
|
break;
|
|
67
68
|
case 404:
|
|
68
69
|
console.error("404");
|