px-react-ui-components 1.0.1 → 1.0.2
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/package.json +13 -1
- 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
package/package.json
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "px-react-ui-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
+
"module": "dist/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"require": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
5
17
|
"scripts": {
|
|
6
18
|
"build": "babel src --out-dir dist --copy-files"
|
|
7
19
|
},
|
package/.babelrc
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.react-confirm-alert-blur {
|
|
3
|
-
filter: url(#gaussian-blur);
|
|
4
|
-
filter: blur(2px);
|
|
5
|
-
-webkit-filter: blur(2px);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.react-confirm-alert-overlay {
|
|
9
|
-
position: fixed;
|
|
10
|
-
top: 0;
|
|
11
|
-
left: 0;
|
|
12
|
-
right: 0;
|
|
13
|
-
bottom: 0;
|
|
14
|
-
z-index: 9999;
|
|
15
|
-
background: rgba(99, 99, 99, 0.9);
|
|
16
|
-
display: -webkit-flex;
|
|
17
|
-
display: -moz-flex;
|
|
18
|
-
display: -ms-flex;
|
|
19
|
-
display: -o-flex;
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
-ms-align-items: center;
|
|
23
|
-
align-items: center;
|
|
24
|
-
opacity: 0;
|
|
25
|
-
-webkit-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
|
|
26
|
-
-moz-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
|
|
27
|
-
-o-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
|
|
28
|
-
animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.react-confirm-alert-body {
|
|
32
|
-
font-family: "Nunito", sans-serif;
|
|
33
|
-
width: 90%; /* Daha geniş cihazlarda %90 genişlik */
|
|
34
|
-
max-width: 400px; /* Maksimum genişlik sınırı */
|
|
35
|
-
padding: 20px;
|
|
36
|
-
text-align: left;
|
|
37
|
-
background: #fff;
|
|
38
|
-
border-radius: 10px;
|
|
39
|
-
box-shadow: 0 20px 75px rgba(0, 0, 0, 0.13);
|
|
40
|
-
color: #666;
|
|
41
|
-
text-align: center;
|
|
42
|
-
margin: 0 auto; /* Orta hizalama */
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@media (max-width: 600px) {
|
|
46
|
-
.react-confirm-alert-body {
|
|
47
|
-
width: 95%; /* Küçük ekranlarda daha fazla boşluk */
|
|
48
|
-
max-width: 320px; /* Maksimum genişlik daha küçük */
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.react-confirm-alert-svg {
|
|
53
|
-
position: absolute;
|
|
54
|
-
top: 0;
|
|
55
|
-
left: 0;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.react-confirm-alert-body > h1 {
|
|
59
|
-
margin-top: 0;
|
|
60
|
-
color: #1e293b !important;
|
|
61
|
-
font-weight: bold;
|
|
62
|
-
font-size: 1.3em;
|
|
63
|
-
border-radius: 0px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.react-confirm-alert-body > h3 {
|
|
67
|
-
margin: 0;
|
|
68
|
-
font-size: 3.5em !important;
|
|
69
|
-
color: #1e293b !important;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.react-confirm-alert-button-group {
|
|
73
|
-
display: -webkit-flex;
|
|
74
|
-
display: -moz-flex;
|
|
75
|
-
display: -ms-flex;
|
|
76
|
-
display: -o-flex;
|
|
77
|
-
display: flex;
|
|
78
|
-
justify-content: space-between;
|
|
79
|
-
margin-top: 30px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.react-confirm-alert-button-group > button {
|
|
83
|
-
outline: none;
|
|
84
|
-
background: #1e293b;
|
|
85
|
-
border: none;
|
|
86
|
-
display: inline-block;
|
|
87
|
-
padding: 10px 18px;
|
|
88
|
-
color: #fff;
|
|
89
|
-
margin-right: 10px;
|
|
90
|
-
border-radius: 5px;
|
|
91
|
-
font-size: 1em;
|
|
92
|
-
cursor: pointer;
|
|
93
|
-
width: 100%;
|
|
94
|
-
|
|
95
|
-
&:hover {
|
|
96
|
-
opacity: 0.8;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
&:last-child {
|
|
100
|
-
background: #506280 !important;
|
|
101
|
-
color: #fff;
|
|
102
|
-
}
|
|
103
|
-
&:first-child {
|
|
104
|
-
background: #1e293b !important;
|
|
105
|
-
color: #fff;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.react-confirm-alert-body {
|
|
110
|
-
width: 500px;
|
|
111
|
-
max-height: 300px;
|
|
112
|
-
overflow: auto;
|
|
113
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import { confirmAlert } from "react-confirm-alert";
|
|
4
|
-
import "react-confirm-alert/src/react-confirm-alert.css";
|
|
5
|
-
import "./MyAlert.css";
|
|
6
|
-
|
|
7
|
-
// import Swal from "sweetalert2";
|
|
8
|
-
|
|
9
|
-
export const MyAlertType = {
|
|
10
|
-
WARNING: 'warning',
|
|
11
|
-
ERROR: 'error',
|
|
12
|
-
SUCCESS: 'success',
|
|
13
|
-
INFO: 'info',
|
|
14
|
-
QUESTION: 'question'
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
Object.freeze(MyAlertType); // Enum sabitlerini değiştirmeyi engeller
|
|
18
|
-
|
|
19
|
-
export const MyAlert = (message, type = MyAlertType.INFO, { title = '', buttontext = { confirm: 'Tamam', cancel: 'İptal' }, callback = null } = {}) => {
|
|
20
|
-
let _showCancelButton = false;
|
|
21
|
-
switch (type) {
|
|
22
|
-
case MyAlertType.WARNING:
|
|
23
|
-
title = title ? title : 'Uyarı';
|
|
24
|
-
break;
|
|
25
|
-
case MyAlertType.ERROR:
|
|
26
|
-
title = title ? title : 'Hata!';
|
|
27
|
-
break;
|
|
28
|
-
case MyAlertType.SUCCESS:
|
|
29
|
-
title = title ? title : 'İşlem Başarılı';
|
|
30
|
-
break;
|
|
31
|
-
case MyAlertType.INFO:
|
|
32
|
-
title = title ? title : 'Bilgi';
|
|
33
|
-
break;
|
|
34
|
-
case MyAlertType.QUESTION:
|
|
35
|
-
title = title ? title : 'Onaylıyor musunuz?';
|
|
36
|
-
_showCancelButton = true;
|
|
37
|
-
|
|
38
|
-
if (buttontext.confirm == "Tamam") {
|
|
39
|
-
buttontext.confirm = "Evet";
|
|
40
|
-
buttontext.cancel = "Hayır";
|
|
41
|
-
}
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
let _buttons = [
|
|
46
|
-
{
|
|
47
|
-
label: buttontext.confirm,
|
|
48
|
-
onClick: () => {
|
|
49
|
-
if (callback) callback({ isConfirmed: true, isDenied: false });
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
];
|
|
53
|
-
|
|
54
|
-
if (_showCancelButton) {
|
|
55
|
-
_buttons.push({
|
|
56
|
-
label: buttontext.cancel,
|
|
57
|
-
onClick: () => {
|
|
58
|
-
if (callback) callback({ isConfirmed: false, isDenied: true });
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
confirmAlert({
|
|
64
|
-
title: title,
|
|
65
|
-
message: <div dangerouslySetInnerHTML={{
|
|
66
|
-
__html: (typeof message === 'string' ? message : message.props?.children || message.toString())
|
|
67
|
-
}}></div>,
|
|
68
|
-
buttons: _buttons,
|
|
69
|
-
onClickOutside: () => {
|
|
70
|
-
if (callback) callback({ isConfirmed: false, isDenied: true });
|
|
71
|
-
},
|
|
72
|
-
onKeypressEscape: () => {
|
|
73
|
-
if (callback) callback({ isConfirmed: false, isDenied: true });
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// Swal.fire({
|
|
78
|
-
// title: title,
|
|
79
|
-
// html: message,
|
|
80
|
-
// icon: type,
|
|
81
|
-
// focusConfirm: true,
|
|
82
|
-
// confirmButtonText: buttontext.confirm,
|
|
83
|
-
// cancelButtonText: buttontext.cancel,
|
|
84
|
-
// showCancelButton: _showCancelButton
|
|
85
|
-
// }).then((result) => {
|
|
86
|
-
// if (callback){
|
|
87
|
-
// callback(result);
|
|
88
|
-
// }
|
|
89
|
-
// // /* Read more about isConfirmed, isDenied below */
|
|
90
|
-
// // if (result.isConfirmed) {
|
|
91
|
-
// // // Swal.fire("Saved!", "", "success");
|
|
92
|
-
// // } else if (result.isDenied) {
|
|
93
|
-
// // // Swal.fire("Changes are not saved", "", "info");
|
|
94
|
-
// // }
|
|
95
|
-
// });
|
|
96
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styles from "./MyContainer.module.css";
|
|
3
|
-
|
|
4
|
-
function MyContainer({
|
|
5
|
-
children,
|
|
6
|
-
title = "",
|
|
7
|
-
description = null,
|
|
8
|
-
icon = null,
|
|
9
|
-
className = null,
|
|
10
|
-
titleTextStyle = null,
|
|
11
|
-
style = null,
|
|
12
|
-
headerClassName = null,
|
|
13
|
-
headerStyle = null,
|
|
14
|
-
bodyClassName = null,
|
|
15
|
-
bodyStyle = null,
|
|
16
|
-
footerClassName = null,
|
|
17
|
-
footerStyle = null,
|
|
18
|
-
}) {
|
|
19
|
-
const arrChild = React.Children.toArray(children);
|
|
20
|
-
|
|
21
|
-
let childHeaderRight = null;
|
|
22
|
-
let childBody = null;
|
|
23
|
-
let childFooter = null;
|
|
24
|
-
|
|
25
|
-
for (let i = 0; i < arrChild.length; i++) {
|
|
26
|
-
const el = arrChild[i];
|
|
27
|
-
if (el.type && el.type.toString().includes("MyContainerTagRight")) {
|
|
28
|
-
childHeaderRight = el;
|
|
29
|
-
} else if (
|
|
30
|
-
el.type &&
|
|
31
|
-
el.type.toString().includes("MyContainerTagBody")
|
|
32
|
-
) {
|
|
33
|
-
childBody = el;
|
|
34
|
-
} else if (
|
|
35
|
-
el.type &&
|
|
36
|
-
el.type.toString().includes("MyContainerTagFooter")
|
|
37
|
-
) {
|
|
38
|
-
childFooter = el;
|
|
39
|
-
} else if (childBody == null) {
|
|
40
|
-
childBody = el;
|
|
41
|
-
} else if (
|
|
42
|
-
childBody != null &&
|
|
43
|
-
childFooter == null &&
|
|
44
|
-
i == arrChild.length - 1
|
|
45
|
-
) {
|
|
46
|
-
childFooter = el;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<section
|
|
52
|
-
className={`${styles.container} ${className || ""}`}
|
|
53
|
-
style={style}
|
|
54
|
-
>
|
|
55
|
-
{(title || childHeaderRight) && (
|
|
56
|
-
<div className={`${styles.header} ${headerClassName || ""}`} style={headerStyle}>
|
|
57
|
-
{title &&
|
|
58
|
-
<>
|
|
59
|
-
<h3 className={styles.title} style={titleTextStyle}>
|
|
60
|
-
{title}
|
|
61
|
-
</h3>
|
|
62
|
-
{description && (
|
|
63
|
-
<span className={styles.description}>
|
|
64
|
-
{description}
|
|
65
|
-
</span>
|
|
66
|
-
)}
|
|
67
|
-
</>
|
|
68
|
-
}
|
|
69
|
-
{childHeaderRight && childHeaderRight}
|
|
70
|
-
</div>
|
|
71
|
-
)}
|
|
72
|
-
<div
|
|
73
|
-
className={`${styles.body} ${bodyClassName || ""}`}
|
|
74
|
-
style={(title ? { paddingTop: "12px" } : null)}
|
|
75
|
-
>
|
|
76
|
-
{childBody}
|
|
77
|
-
</div>
|
|
78
|
-
{childFooter && (
|
|
79
|
-
<div
|
|
80
|
-
className={`${styles.footer} ${footerClassName || ""}`}
|
|
81
|
-
style={(title ? { paddingTop: "12px" } : null) }
|
|
82
|
-
>
|
|
83
|
-
{childFooter}
|
|
84
|
-
</div>
|
|
85
|
-
)}
|
|
86
|
-
</section>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export default MyContainer;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: block;
|
|
4
|
-
width: 100%;
|
|
5
|
-
background: #ffff;
|
|
6
|
-
border-radius: 15px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.header {
|
|
10
|
-
position: relative;
|
|
11
|
-
display: block;
|
|
12
|
-
width: 100%;
|
|
13
|
-
padding: 15px;
|
|
14
|
-
padding-left: 20px;
|
|
15
|
-
padding-bottom: 7.5px;
|
|
16
|
-
border-bottom: 1px solid #d0d6de;
|
|
17
|
-
color: #464255;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.title {
|
|
21
|
-
margin: 0px !important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.description {
|
|
25
|
-
font-size: 12px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.rightBlock {
|
|
29
|
-
position: absolute;
|
|
30
|
-
right: 15px;
|
|
31
|
-
z-index: 2;
|
|
32
|
-
top: 50%;
|
|
33
|
-
transform: translateY(-50%);
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: row;
|
|
36
|
-
gap: 10px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.rightBlock button {
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: row;
|
|
42
|
-
gap: 10px;
|
|
43
|
-
justify-items: center;
|
|
44
|
-
align-items: center;
|
|
45
|
-
padding: 10px 15px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.body {
|
|
49
|
-
display: block;
|
|
50
|
-
width: 100%;
|
|
51
|
-
padding: 15px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.footer {
|
|
55
|
-
display: block;
|
|
56
|
-
width: 100%;
|
|
57
|
-
padding: 15px;
|
|
58
|
-
border-top: 1px solid #d0d6de;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@media screen and (max-width: 768px) {
|
|
62
|
-
.header {
|
|
63
|
-
padding: 10px;
|
|
64
|
-
padding-left: 15px;
|
|
65
|
-
padding-bottom: 5px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.rightBlock {
|
|
69
|
-
position: relative;
|
|
70
|
-
right: auto;
|
|
71
|
-
top: auto;
|
|
72
|
-
transform: none;
|
|
73
|
-
margin-top: 10px;
|
|
74
|
-
justify-content: flex-end;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.rightBlock button {
|
|
78
|
-
padding: 8px 12px;
|
|
79
|
-
font-size: 14px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.body {
|
|
83
|
-
padding: 10px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.footer {
|
|
87
|
-
padding: 10px;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
@media screen and (max-width: 480px) {
|
|
92
|
-
.header {
|
|
93
|
-
padding: 8px;
|
|
94
|
-
padding-left: 12px;
|
|
95
|
-
padding-bottom: 4px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.rightBlock button {
|
|
99
|
-
padding: 6px 10px;
|
|
100
|
-
font-size: 12px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.body {
|
|
104
|
-
padding: 8px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.footer {
|
|
108
|
-
padding: 8px;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styles from "./MyContainer.module.css";
|
|
3
|
-
|
|
4
|
-
function MyContainerRight({ children }) {
|
|
5
|
-
return (
|
|
6
|
-
<div className={"MyContainerTagRight " + styles.rightBlock}>
|
|
7
|
-
{children}
|
|
8
|
-
</div>
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
export default MyContainerRight;
|