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
package/dist/index.js
CHANGED
|
@@ -1,15 +1,131 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "MyAlert", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _MyAlert["default"];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "MyContainer", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _MyContainer["default"];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "MyEditor", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _MyEditor["default"];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "MyFileUpload", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _MyFileUpload["default"];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "MyImageCropper", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _MyImageCropper["default"];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "MyInput", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _MyInput["default"];
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
exports.MyInputType = void 0;
|
|
43
|
+
Object.defineProperty(exports, "MyMaps", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function get() {
|
|
46
|
+
return _MyMaps["default"];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "MyMenu", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function get() {
|
|
52
|
+
return _MyMenu["default"];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "MyModal", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function get() {
|
|
58
|
+
return _MyModal["default"];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "MyNotFound", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function get() {
|
|
64
|
+
return _MyNotFound["default"];
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "MyScrollableCard", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function get() {
|
|
70
|
+
return _MyScrollableCard["default"];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(exports, "MyTable", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function get() {
|
|
76
|
+
return _MyTable["default"];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, "MyTabs", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: function get() {
|
|
82
|
+
return _MyTabs["default"];
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(exports, "MyWaiting", {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function get() {
|
|
88
|
+
return _MyWaiting["default"];
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(exports, "MyZoomImage", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: function get() {
|
|
94
|
+
return _MyZoomImage["default"];
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
var _MyInput = _interopRequireDefault(require("./components/MyInput"));
|
|
98
|
+
var _MyAlert = _interopRequireDefault(require("./components/MyAlert"));
|
|
99
|
+
var _MyContainer = _interopRequireDefault(require("./components/MyContainer"));
|
|
100
|
+
var _MyEditor = _interopRequireDefault(require("./components/MyEditor"));
|
|
101
|
+
var _MyFileUpload = _interopRequireDefault(require("./components/MyFileUpload"));
|
|
102
|
+
var _MyImageCropper = _interopRequireDefault(require("./components/MyImageCropper"));
|
|
103
|
+
var _MyMaps = _interopRequireDefault(require("./components/MyMaps"));
|
|
104
|
+
var _MyMenu = _interopRequireDefault(require("./components/MyMenu"));
|
|
105
|
+
var _MyModal = _interopRequireDefault(require("./components/MyModal"));
|
|
106
|
+
var _MyNotFound = _interopRequireDefault(require("./components/MyNotFound"));
|
|
107
|
+
var _MyScrollableCard = _interopRequireDefault(require("./components/MyScrollableCard"));
|
|
108
|
+
var _MyTable = _interopRequireDefault(require("./components/MyTable"));
|
|
109
|
+
var _MyTabs = _interopRequireDefault(require("./components/MyTabs"));
|
|
110
|
+
var _MyWaiting = _interopRequireDefault(require("./components/MyWaiting"));
|
|
111
|
+
var _MyZoomImage = _interopRequireDefault(require("./components/MyZoomImage"));
|
|
112
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
113
|
+
// Export types
|
|
114
|
+
var MyInputType = exports.MyInputType = {
|
|
115
|
+
TEXT: 'text',
|
|
116
|
+
PASSWORD: 'password',
|
|
117
|
+
SELECT: 'select',
|
|
118
|
+
SELECTFILTER: 'selectfilter',
|
|
119
|
+
FILE: 'file',
|
|
120
|
+
IMAGE: 'image',
|
|
121
|
+
TEXTAREA: 'textarea',
|
|
122
|
+
COLOR: 'color',
|
|
123
|
+
READONLY: 'readonly',
|
|
124
|
+
DATE: 'date',
|
|
125
|
+
DATETIME: 'datetime',
|
|
126
|
+
TIME: 'time',
|
|
127
|
+
MONEY: 'money',
|
|
128
|
+
NUMBER: 'number',
|
|
129
|
+
MAIL: 'mail',
|
|
130
|
+
PHONE: 'phone'
|
|
131
|
+
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "px-react-ui-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
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
|
-
"build": "babel src --out-dir dist --copy-files"
|
|
18
|
+
"build": "babel src --out-dir dist --copy-files --extensions \".js,.jsx\"",
|
|
19
|
+
"prepare": "npm run build"
|
|
7
20
|
},
|
|
8
21
|
"keywords": [
|
|
9
22
|
"react",
|
|
@@ -26,16 +39,17 @@
|
|
|
26
39
|
"devDependencies": {
|
|
27
40
|
"@babel/cli": "^7.27.0",
|
|
28
41
|
"@babel/core": "^7.26.10",
|
|
42
|
+
"@babel/preset-env": "^7.26.9",
|
|
29
43
|
"@babel/preset-react": "^7.26.3"
|
|
30
44
|
},
|
|
31
45
|
"peerDependencies": {
|
|
32
|
-
"react": "^18.3.1",
|
|
33
|
-
"react-dom": "^18.3.1",
|
|
34
46
|
"katex": "^0.16.21",
|
|
35
47
|
"quill": "^2.0.3",
|
|
36
48
|
"quill-image-resize-module-react": "^3.0.0",
|
|
37
49
|
"quill-table-ui": "^1.0.7",
|
|
50
|
+
"react": "^18.3.1",
|
|
38
51
|
"react-confirm-alert": "^3.0.6",
|
|
52
|
+
"react-dom": "^18.3.1",
|
|
39
53
|
"react-icons": "^5.5.0",
|
|
40
54
|
"react-image-crop": "^11.0.7",
|
|
41
55
|
"react-loader-spinner": "^6.1.6",
|
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;
|