px-react-ui-components 1.0.1 → 1.0.3
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/components/MyAlert/MyAlert.js +34 -22
- package/dist/components/MyContainer/MyContainer.js +73 -46
- package/dist/components/MyContainer/MyContainerBody.js +16 -8
- package/dist/components/MyContainer/MyContainerFooter.js +16 -8
- package/dist/components/MyContainer/MyContainerRight.js +17 -9
- package/dist/components/MyEditor/MyEditor.js +160 -106
- package/dist/components/MyFileUpload/MyFileUpload.js +214 -140
- package/dist/components/MyImageCropper/MyImageCropper.js +92 -53
- package/dist/components/MyInput/MyInput.js +745 -548
- package/dist/components/MyInput/index.js +22 -0
- package/dist/components/MyMaps/YandexMaps.js +102 -61
- package/dist/components/MyMenu/MenuItem.js +96 -50
- package/dist/components/MyModal/MyModal.js +63 -39
- package/dist/components/MyModal/MyModalBody.js +16 -8
- package/dist/components/MyModal/MyModalFooter.js +16 -8
- package/dist/components/MyNotFound/MyNotFound.js +30 -17
- package/dist/components/MyScrollableCard/MyScrollableCard.js +60 -26
- package/dist/components/MyTable/MyTable.js +298 -189
- package/dist/components/MyTable/MyTableBody.js +16 -8
- package/dist/components/MyTable/MyTableHead.js +16 -8
- package/dist/components/MyTabs/MyTabPane.js +37 -16
- package/dist/components/MyTabs/MyTabs.js +88 -50
- package/dist/components/MyWaiting/MyWaiting.js +34 -22
- package/dist/components/MyZoomImage/MyZoomImage.js +143 -94
- package/dist/index.js +131 -15
- package/package.json +18 -4
- package/.babelrc +0 -3
- package/src/components/MyAlert/MyAlert.css +0 -113
- package/src/components/MyAlert/MyAlert.jsx +0 -96
- package/src/components/MyContainer/MyContainer.jsx +0 -90
- package/src/components/MyContainer/MyContainer.module.css +0 -110
- package/src/components/MyContainer/MyContainerBody.jsx +0 -8
- package/src/components/MyContainer/MyContainerFooter.jsx +0 -8
- package/src/components/MyContainer/MyContainerRight.jsx +0 -11
- package/src/components/MyEditor/MyEditor.jsx +0 -252
- package/src/components/MyEditor/MyEditor.scss +0 -277
- package/src/components/MyFileUpload/MyFileUpload.jsx +0 -371
- package/src/components/MyFileUpload/MyFileUpload.module.css +0 -86
- package/src/components/MyImageCropper/MyImageCropper.jsx +0 -108
- package/src/components/MyInput/MyInput.jsx +0 -895
- package/src/components/MyInput/MyInput.module.css +0 -420
- package/src/components/MyMaps/YandexMaps.jsx +0 -186
- package/src/components/MyMenu/MenuItem.jsx +0 -62
- package/src/components/MyMenu/MyMenu.module.css +0 -102
- package/src/components/MyModal/MyModal.css +0 -83
- package/src/components/MyModal/MyModal.jsx +0 -78
- package/src/components/MyModal/MyModalBody.jsx +0 -8
- package/src/components/MyModal/MyModalFooter.jsx +0 -8
- package/src/components/MyNotFound/MyNotFound.css +0 -22
- package/src/components/MyNotFound/MyNotFound.jsx +0 -11
- package/src/components/MyScrollableCard/MyScrollableCard.jsx +0 -86
- package/src/components/MyTable/MyTable.jsx +0 -459
- package/src/components/MyTable/MyTable.module.css +0 -350
- package/src/components/MyTable/MyTableBody.jsx +0 -8
- package/src/components/MyTable/MyTableHead.jsx +0 -10
- package/src/components/MyTabs/MyTabPane.jsx +0 -9
- package/src/components/MyTabs/MyTabs.css +0 -105
- package/src/components/MyTabs/MyTabs.jsx +0 -63
- package/src/components/MyWaiting/MyWaiting.css +0 -28
- package/src/components/MyWaiting/MyWaiting.jsx +0 -27
- package/src/components/MyZoomImage/MyZoomImage.css +0 -0
- package/src/components/MyZoomImage/MyZoomImage.jsx +0 -139
- package/src/index.js +0 -15
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
.menuItem{
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
align-items: center;
|
|
6
|
-
gap: 15px;
|
|
7
|
-
padding: 10px 16px 10px 20px;
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
border-bottom: 1px solid #0000001c;
|
|
10
|
-
font-weight: 300;
|
|
11
|
-
font-size: 14px;
|
|
12
|
-
color: #fff !important;
|
|
13
|
-
text-decoration: none !important;
|
|
14
|
-
}
|
|
15
|
-
.menuItem.selected{
|
|
16
|
-
background-color: #fff1c939 !important;
|
|
17
|
-
}
|
|
18
|
-
.menuItem:last-child{
|
|
19
|
-
border-bottom: none;
|
|
20
|
-
}
|
|
21
|
-
.menuItem:hover{
|
|
22
|
-
background-color: #00000039;
|
|
23
|
-
}
|
|
24
|
-
.menuItem .menuItemIcon{
|
|
25
|
-
font-size: 20px;
|
|
26
|
-
}
|
|
27
|
-
.menuItem .menuItemText{
|
|
28
|
-
display: block;
|
|
29
|
-
position: relative;
|
|
30
|
-
width: 100%;
|
|
31
|
-
padding-right: 35px;
|
|
32
|
-
}
|
|
33
|
-
.menuItem .menuItemText .menuItemBadge{
|
|
34
|
-
position: absolute;
|
|
35
|
-
right: 0px;
|
|
36
|
-
top: 50%;
|
|
37
|
-
padding: 0px 8px;
|
|
38
|
-
transform: translateY(-50%);
|
|
39
|
-
background-color: #0000003d;
|
|
40
|
-
color: #fff;
|
|
41
|
-
border-radius: 10px;
|
|
42
|
-
padding-top: 1px;
|
|
43
|
-
font-size: 12px;
|
|
44
|
-
min-width: 25px;
|
|
45
|
-
font-weight: normal;
|
|
46
|
-
text-align: center;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.menuItem.menuItemShortMenu{
|
|
50
|
-
position: relative;
|
|
51
|
-
padding: 10px 10px;
|
|
52
|
-
justify-content: center;
|
|
53
|
-
}
|
|
54
|
-
.menuItem.menuItemShortMenu .menuItemIcon{
|
|
55
|
-
font-size: 24px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.menuItem.menuItemShortMenu .menuItemText{
|
|
59
|
-
display: none;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.menuItem.menuItemShortMenu .menuItemIconSubMenu{
|
|
63
|
-
font-size: 13px;
|
|
64
|
-
position: absolute;
|
|
65
|
-
right: 8px;
|
|
66
|
-
top: 50%;
|
|
67
|
-
transform: translateY(-50%);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.menuItem.menuItemShortMenu:hover .menuItemText{
|
|
71
|
-
display: block;
|
|
72
|
-
position: absolute;
|
|
73
|
-
width: auto;
|
|
74
|
-
left: calc(100% + 5px);
|
|
75
|
-
top: 50%;
|
|
76
|
-
transform: translateY(-50%);
|
|
77
|
-
padding: 10px;
|
|
78
|
-
background-color: #000000;
|
|
79
|
-
color: #fff !important;
|
|
80
|
-
border-radius: 10px;
|
|
81
|
-
z-index: 1000;
|
|
82
|
-
white-space: nowrap;
|
|
83
|
-
}
|
|
84
|
-
.menuItem.menuItemShortMenu:hover .menuItemText.menuItemTextBadge{
|
|
85
|
-
padding-right: 50px;
|
|
86
|
-
}
|
|
87
|
-
.menuItem.menuItemShortMenu:hover .menuItemText.menuItemTextBadge .menuItemBadge{
|
|
88
|
-
right: 8px;
|
|
89
|
-
background-color: #ffffff46;
|
|
90
|
-
}
|
|
91
|
-
.menuItemOwner .menuItemOpen{
|
|
92
|
-
background-color: #283b5c;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.menuItemOwner .menuItemChildren{
|
|
96
|
-
display: none;
|
|
97
|
-
background-color: #30425f;
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
.menuItemOwner .menuItemChildrenOpen{
|
|
101
|
-
display: block;
|
|
102
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
.modal-overlay {
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
padding: 25px 0;
|
|
8
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
/* align-items: center; */
|
|
12
|
-
/* Overlay için overflow özelliği */
|
|
13
|
-
overflow-y: auto;
|
|
14
|
-
z-index: 99;
|
|
15
|
-
}
|
|
16
|
-
.modal-overlay.top {
|
|
17
|
-
align-items: baseline;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.modal-overlay .modal {
|
|
21
|
-
/* Modal için maksimum yükseklik ve scroll */
|
|
22
|
-
|
|
23
|
-
/* Modalın üst ve alt kısmında boşluk bırakmak için */
|
|
24
|
-
/* margin: 20px 0; */
|
|
25
|
-
height: max-content;
|
|
26
|
-
background-color: #ebeef3;
|
|
27
|
-
padding: 15px;
|
|
28
|
-
border-radius: 10px;
|
|
29
|
-
min-width: 200px;
|
|
30
|
-
max-width: 100%;
|
|
31
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.modal-overlay .modal .modal-header {
|
|
35
|
-
display: flex;
|
|
36
|
-
width: 100%;
|
|
37
|
-
justify-content: space-between;
|
|
38
|
-
align-items: center;
|
|
39
|
-
}
|
|
40
|
-
.modal-overlay .modal .modal-header h4 {
|
|
41
|
-
margin-top: 0px;
|
|
42
|
-
padding-left: 8px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.modal-overlay .modal .modal-header .close-button {
|
|
46
|
-
background: none;
|
|
47
|
-
border: none;
|
|
48
|
-
height: 25px;
|
|
49
|
-
font-size: 32px;
|
|
50
|
-
color: #cdcdcd;
|
|
51
|
-
background: none;
|
|
52
|
-
padding: 0px;
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
margin: -10px 10px 0 0;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.modal-overlay .modal .modal-header .close-button:hover {
|
|
58
|
-
background: none;
|
|
59
|
-
color: #9c9c9c;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.modal-overlay .modal .modal-content {
|
|
63
|
-
display: block;
|
|
64
|
-
width: 100%;
|
|
65
|
-
padding: 10px 0;
|
|
66
|
-
/* max-height: calc(100vh - 80px); */
|
|
67
|
-
/* overflow-y: auto; */
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.MyModalTagBody {
|
|
71
|
-
display: block;
|
|
72
|
-
width: 100%;
|
|
73
|
-
padding: 15px;
|
|
74
|
-
background: #fff;
|
|
75
|
-
border-radius: 15px;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.MyModalTagFooter {
|
|
79
|
-
display: flex;
|
|
80
|
-
justify-content: flex-end;
|
|
81
|
-
gap: 10px;
|
|
82
|
-
margin-top: 5px;
|
|
83
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
import './MyModal.css'; // Modal için CSS dosyası
|
|
3
|
-
|
|
4
|
-
const MyModal = ({
|
|
5
|
-
show,
|
|
6
|
-
title,
|
|
7
|
-
children,
|
|
8
|
-
top = null,
|
|
9
|
-
onClose = null,
|
|
10
|
-
closeOnBackdropClick = true,
|
|
11
|
-
closeOnEsc = true,
|
|
12
|
-
style = null,
|
|
13
|
-
}) => {
|
|
14
|
-
|
|
15
|
-
const arrChild = React.Children.toArray(children);
|
|
16
|
-
|
|
17
|
-
let childBody = null;
|
|
18
|
-
let childFooter = null;
|
|
19
|
-
|
|
20
|
-
for (let i = 0; i < arrChild.length; i++) {
|
|
21
|
-
const el = arrChild[i];
|
|
22
|
-
if (el.type.toString().includes("MyModalTagFooter")) {
|
|
23
|
-
childFooter = el;
|
|
24
|
-
} else if (el.type.toString().includes("MyModalTagBody")) {
|
|
25
|
-
childBody = el;
|
|
26
|
-
} else if (childBody == null) {
|
|
27
|
-
childBody = el;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// ESC tuşu ile kapatma işlevi
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (!closeOnEsc) return;
|
|
34
|
-
|
|
35
|
-
const handleEsc = (event) => {
|
|
36
|
-
if (event.key === 'Escape') {
|
|
37
|
-
onClose();
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
window.addEventListener('keydown', handleEsc);
|
|
42
|
-
|
|
43
|
-
return () => {
|
|
44
|
-
window.removeEventListener('keydown', handleEsc);
|
|
45
|
-
};
|
|
46
|
-
}, [closeOnEsc, onClose]);
|
|
47
|
-
|
|
48
|
-
if (!show) {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const handleBackdropClick = (e) => {
|
|
53
|
-
if (closeOnBackdropClick && e.target.className.includes('modal-overlay')) {
|
|
54
|
-
onClose();
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<div className={'modal-overlay ' + (top ? 'top' : '')} onClick={handleBackdropClick} style={{ paddingTop: top }}>
|
|
61
|
-
<div className='modal' onClick={(e) => e.stopPropagation()} style={style}>
|
|
62
|
-
<div className='modal-header'>
|
|
63
|
-
<h4>{title}</h4>
|
|
64
|
-
{onClose &&
|
|
65
|
-
<button type='button' className='close-button' onClick={onClose}>
|
|
66
|
-
×
|
|
67
|
-
</button>
|
|
68
|
-
}
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
<div className='modal-content'>{childBody}</div>
|
|
72
|
-
<div className='modal-footer'>{childFooter}</div>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export default MyModal;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.my-nodata{
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: 100%;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
padding: 25px;
|
|
8
|
-
font-size: 17px;
|
|
9
|
-
color: #444;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.my-nodata .icon{
|
|
13
|
-
font-size: 42px;
|
|
14
|
-
color: #adadad;
|
|
15
|
-
margin-bottom: 10px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.my-nodata span{
|
|
19
|
-
display: block;
|
|
20
|
-
width: 100%;
|
|
21
|
-
text-align: center;
|
|
22
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './MyNotFound.css'; // Modal için CSS dosyası
|
|
3
|
-
|
|
4
|
-
export default function MyNotFound({ message = "Kayıt Mevcut Değil!", className = null, style = null, icon = null }) {
|
|
5
|
-
return (
|
|
6
|
-
<div className={"my-nodata " + (className ? className : '')} style={style}>
|
|
7
|
-
{icon && <div className="icon">{icon}</div>}
|
|
8
|
-
<span dangerouslySetInnerHTML={{ __html: message }}></span>
|
|
9
|
-
</div>
|
|
10
|
-
)
|
|
11
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import React, { useState, useRef } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const MyScrollableCard = ({ children, className }) => {
|
|
5
|
-
const [isDragging, setIsDragging] = useState(false);
|
|
6
|
-
const [startX, setStartX] = useState(0);
|
|
7
|
-
const [startY, setStartY] = useState(0);
|
|
8
|
-
const [scrollLeft, setScrollLeft] = useState(0);
|
|
9
|
-
const [scrollTop, setScrollTop] = useState(0);
|
|
10
|
-
const [direction, setDirection] = useState(null); // Yatay mı dikey mi olduğuna karar verecek
|
|
11
|
-
const containerRef = useRef(null);
|
|
12
|
-
|
|
13
|
-
const handleMouseDown = (e) => {
|
|
14
|
-
setIsDragging(true);
|
|
15
|
-
setStartX(e.pageX - containerRef.current.offsetLeft);
|
|
16
|
-
setStartY(e.pageY - containerRef.current.offsetTop);
|
|
17
|
-
setScrollLeft(containerRef.current.scrollLeft);
|
|
18
|
-
setScrollTop(containerRef.current.scrollTop);
|
|
19
|
-
setDirection(null); // Fare basıldığı anda yönü sıfırla
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const handleMouseMove = (e) => {
|
|
23
|
-
if (!isDragging) return;
|
|
24
|
-
e.preventDefault();
|
|
25
|
-
|
|
26
|
-
const x = e.pageX - containerRef.current.offsetLeft;
|
|
27
|
-
const y = e.pageY - containerRef.current.offsetTop;
|
|
28
|
-
|
|
29
|
-
// İlk hareket yönünü belirle
|
|
30
|
-
if (direction === null) {
|
|
31
|
-
const diffX = Math.abs(x - startX);
|
|
32
|
-
const diffY = Math.abs(y - startY);
|
|
33
|
-
if (diffX > diffY) {
|
|
34
|
-
setDirection("horizontal");
|
|
35
|
-
} else {
|
|
36
|
-
setDirection("vertical");
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (direction === "horizontal") {
|
|
41
|
-
const walkX = x - startX; // Hız faktörünü kaldırdım
|
|
42
|
-
containerRef.current.scrollLeft = scrollLeft - walkX; // Düz kaydırma
|
|
43
|
-
} else if (direction === "vertical") {
|
|
44
|
-
const walkY = y - startY;
|
|
45
|
-
containerRef.current.scrollTop = scrollTop - walkY;
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const handleMouseUp = () => {
|
|
50
|
-
setIsDragging(false);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const handleWheel = (e) => {
|
|
54
|
-
e.preventDefault();
|
|
55
|
-
|
|
56
|
-
containerRef.current.scrollLeft += e.deltaY * 2; // Yatay tekerlek kaydırma
|
|
57
|
-
|
|
58
|
-
// Eğer dikey kaydırma isteniyorsa deltaX'i kullanabilirsiniz:
|
|
59
|
-
// containerRef.current.scrollTop += e.deltaY * 2;
|
|
60
|
-
|
|
61
|
-
// const deltaX = e.deltaX;
|
|
62
|
-
// const deltaY = e.deltaY;
|
|
63
|
-
|
|
64
|
-
// if (Math.abs(deltaX) > Math.abs(deltaY)) {
|
|
65
|
-
// containerRef.current.scrollLeft += deltaX * 2; // Yatay tekerlek kaydırma
|
|
66
|
-
// } else {
|
|
67
|
-
// containerRef.current.scrollTop += deltaY * 2; // Dikey tekerlek kaydırma
|
|
68
|
-
// }
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<div
|
|
73
|
-
className={className}
|
|
74
|
-
onMouseDown={handleMouseDown}
|
|
75
|
-
onMouseMove={handleMouseMove}
|
|
76
|
-
onMouseLeave={handleMouseUp}
|
|
77
|
-
onMouseUp={handleMouseUp}
|
|
78
|
-
onWheel={handleWheel}
|
|
79
|
-
ref={containerRef}
|
|
80
|
-
>
|
|
81
|
-
{children}
|
|
82
|
-
</div>
|
|
83
|
-
);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export default MyScrollableCard;
|