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.
Files changed (63) hide show
  1. package/dist/components/MyAlert/MyAlert.js +34 -22
  2. package/dist/components/MyContainer/MyContainer.js +73 -46
  3. package/dist/components/MyContainer/MyContainerBody.js +16 -8
  4. package/dist/components/MyContainer/MyContainerFooter.js +16 -8
  5. package/dist/components/MyContainer/MyContainerRight.js +17 -9
  6. package/dist/components/MyEditor/MyEditor.js +160 -106
  7. package/dist/components/MyFileUpload/MyFileUpload.js +214 -140
  8. package/dist/components/MyImageCropper/MyImageCropper.js +92 -53
  9. package/dist/components/MyInput/MyInput.js +745 -548
  10. package/dist/components/MyInput/index.js +22 -0
  11. package/dist/components/MyMaps/YandexMaps.js +102 -61
  12. package/dist/components/MyMenu/MenuItem.js +96 -50
  13. package/dist/components/MyModal/MyModal.js +63 -39
  14. package/dist/components/MyModal/MyModalBody.js +16 -8
  15. package/dist/components/MyModal/MyModalFooter.js +16 -8
  16. package/dist/components/MyNotFound/MyNotFound.js +30 -17
  17. package/dist/components/MyScrollableCard/MyScrollableCard.js +60 -26
  18. package/dist/components/MyTable/MyTable.js +298 -189
  19. package/dist/components/MyTable/MyTableBody.js +16 -8
  20. package/dist/components/MyTable/MyTableHead.js +16 -8
  21. package/dist/components/MyTabs/MyTabPane.js +37 -16
  22. package/dist/components/MyTabs/MyTabs.js +88 -50
  23. package/dist/components/MyWaiting/MyWaiting.js +34 -22
  24. package/dist/components/MyZoomImage/MyZoomImage.js +143 -94
  25. package/dist/index.js +131 -15
  26. package/package.json +18 -4
  27. package/.babelrc +0 -3
  28. package/src/components/MyAlert/MyAlert.css +0 -113
  29. package/src/components/MyAlert/MyAlert.jsx +0 -96
  30. package/src/components/MyContainer/MyContainer.jsx +0 -90
  31. package/src/components/MyContainer/MyContainer.module.css +0 -110
  32. package/src/components/MyContainer/MyContainerBody.jsx +0 -8
  33. package/src/components/MyContainer/MyContainerFooter.jsx +0 -8
  34. package/src/components/MyContainer/MyContainerRight.jsx +0 -11
  35. package/src/components/MyEditor/MyEditor.jsx +0 -252
  36. package/src/components/MyEditor/MyEditor.scss +0 -277
  37. package/src/components/MyFileUpload/MyFileUpload.jsx +0 -371
  38. package/src/components/MyFileUpload/MyFileUpload.module.css +0 -86
  39. package/src/components/MyImageCropper/MyImageCropper.jsx +0 -108
  40. package/src/components/MyInput/MyInput.jsx +0 -895
  41. package/src/components/MyInput/MyInput.module.css +0 -420
  42. package/src/components/MyMaps/YandexMaps.jsx +0 -186
  43. package/src/components/MyMenu/MenuItem.jsx +0 -62
  44. package/src/components/MyMenu/MyMenu.module.css +0 -102
  45. package/src/components/MyModal/MyModal.css +0 -83
  46. package/src/components/MyModal/MyModal.jsx +0 -78
  47. package/src/components/MyModal/MyModalBody.jsx +0 -8
  48. package/src/components/MyModal/MyModalFooter.jsx +0 -8
  49. package/src/components/MyNotFound/MyNotFound.css +0 -22
  50. package/src/components/MyNotFound/MyNotFound.jsx +0 -11
  51. package/src/components/MyScrollableCard/MyScrollableCard.jsx +0 -86
  52. package/src/components/MyTable/MyTable.jsx +0 -459
  53. package/src/components/MyTable/MyTable.module.css +0 -350
  54. package/src/components/MyTable/MyTableBody.jsx +0 -8
  55. package/src/components/MyTable/MyTableHead.jsx +0 -10
  56. package/src/components/MyTabs/MyTabPane.jsx +0 -9
  57. package/src/components/MyTabs/MyTabs.css +0 -105
  58. package/src/components/MyTabs/MyTabs.jsx +0 -63
  59. package/src/components/MyWaiting/MyWaiting.css +0 -28
  60. package/src/components/MyWaiting/MyWaiting.jsx +0 -27
  61. package/src/components/MyZoomImage/MyZoomImage.css +0 -0
  62. package/src/components/MyZoomImage/MyZoomImage.jsx +0 -139
  63. package/src/index.js +0 -15
@@ -1,350 +0,0 @@
1
- .myTableContainer {
2
- position: relative;
3
- background: #fbfbfd;
4
- border: 1px solid #dadada;
5
- border-radius: 8px;
6
- height: 100%;
7
- display: flex;
8
- flex-direction: column;
9
- overflow: hidden;
10
- }
11
-
12
- .myTableContainer::-webkit-scrollbar {
13
- width: 8px;
14
- height: 8px;
15
- }
16
-
17
- .myTableContainer::-webkit-scrollbar-track {
18
- background: #e0e0e0;
19
- border-radius: 10px;
20
- }
21
-
22
- .myTableContainer::-webkit-scrollbar-thumb {
23
- background-color: #888;
24
- border-radius: 10px;
25
- border: 2px solid #e0e0e0;
26
- }
27
-
28
- .myTableContainer::-webkit-scrollbar-thumb:hover {
29
- background-color: #555;
30
- }
31
-
32
- .rowsCount {
33
- display: flex;
34
- flex-direction: column;
35
- justify-items: center;
36
- align-items: end;
37
- gap: 0px;
38
- line-height: 0.8rem;
39
- font-size: 13px;
40
- font-weight: 300;
41
- }
42
- .rowsCount span{
43
- font-weight: 500;
44
- }
45
-
46
- .searchContainer {
47
- position: relative;
48
- width: 100%;
49
- flex-shrink: 0;
50
- }
51
-
52
- .searchContainer .rowsCount {
53
- position: absolute;
54
- right: 10px;
55
- top: 50%;
56
- transform: translateY(-50%);
57
- z-index: 2;
58
- font-size: 13px;
59
- }
60
-
61
- .searchInput {
62
- width: 100%;
63
- padding: 8px 10px 5px 10px;
64
- margin-bottom: 1px;
65
- border-radius: 8px 8px 0 0;
66
- outline: none;
67
- background: #f5f6f7;
68
- }
69
-
70
- .searchable .myTable {
71
- border-radius: 0 0 8px 8px;
72
- }
73
-
74
- .myTable {
75
- width: 100%;
76
- height: 100% ;
77
- overflow: auto;
78
- -webkit-overflow-scrolling: touch;
79
- scrollbar-width: thin;
80
- }
81
-
82
- .myTablePagination {
83
- height: calc(100% - 50px);
84
- height: 50px;
85
- }
86
-
87
- .table {
88
- width: 100%;
89
- min-width: 300px;
90
- table-layout: auto;
91
- border-collapse: separate;
92
- border-spacing: 0;
93
- }
94
-
95
- .thead {
96
- position: sticky;
97
- top: 0;
98
- background-color: #dce3eb;
99
- box-shadow: 0 2px 6px rgba(97, 98, 100, 0.301);
100
- /* #dce3eb */
101
- z-index: 1;
102
- }
103
-
104
- .th {
105
- background-color: #dce3eb;
106
- padding: 8px 4px;
107
- font-weight: 500;
108
- font-size: 13px;
109
- text-align: left;
110
- white-space: nowrap;
111
- overflow: hidden;
112
- text-overflow: ellipsis;
113
- border-right: 1px solid #bdc7d4 !important;
114
- }
115
-
116
- .th,
117
- .td {
118
- border-collapse: collapse;
119
- border-right: 1px solid #d0d6de;
120
- border-bottom: 1px solid #d0d6de;
121
- }
122
- .th[data-width],
123
- .td[data-width] {
124
- width: attr(data-width); /* data attribute ile genişlik belirleme */
125
- }
126
-
127
- .th:last-child,
128
- .td:last-child {
129
- border-right: none;
130
- }
131
-
132
- .leftAlign {
133
- text-align: left;
134
- }
135
-
136
- .tr {
137
- background-color: #fff;
138
- }
139
-
140
- .tr:nth-child(2n + 1) {
141
- background-color: #eff3f3;
142
- }
143
-
144
- .tr:hover {
145
- cursor: default;
146
- background-color: #d6eff0;
147
- }
148
-
149
-
150
-
151
- .td {
152
- font-size: 13px;
153
- font-weight: normal;
154
- padding: 5px;
155
- white-space: nowrap;
156
- overflow: hidden;
157
- text-overflow: ellipsis;
158
- text-wrap: balance;
159
- }
160
-
161
- .tableBtn {
162
- cursor: pointer;
163
- }
164
-
165
- .td button {
166
- background-color: unset;
167
- border: none;
168
- border-radius: 8px;
169
- color: #1d4736;
170
- padding: 7px;
171
- white-space: nowrap;
172
- }
173
-
174
- .td button:hover {
175
- background-color: #0c696a;
176
- color: #fff;
177
- }
178
-
179
- .noData {
180
- background-color: unset !important;
181
- }
182
-
183
- .noData td {
184
- text-align: center;
185
- color: #888;
186
- font-style: italic;
187
- font-size: 15px;
188
- padding: 50px 0;
189
- border-bottom: none;
190
- }
191
-
192
- .paginationContainer {
193
- height: 50px;
194
- width: 100%;
195
- background: #f0f2f3;
196
- border-radius: 0 0 8px 8px;
197
- flex-shrink: 0;
198
- }
199
-
200
- .pagination {
201
- height: auto;
202
- width: 100%;
203
- display: flex;
204
- flex-wrap: wrap;
205
- justify-content: center;
206
- align-items: center;
207
- gap: 4px;
208
- background: #f0f2f3;
209
- padding: 2px 10px;
210
- box-shadow: 0 -1px 5px rgba(97, 98, 100, 0.301);
211
- }
212
-
213
- .pageButton {
214
- min-width: 32px;
215
- padding: 4px 8px;
216
- border: 1px solid #dee2e6;
217
- background: #f8f8f8;
218
- color: #000;
219
- cursor: pointer;
220
- border-radius: 4px;
221
- font-size: 13px;
222
- font-weight: normal;
223
- display: flex;
224
- align-items: center;
225
- justify-content: center;
226
- touch-action: manipulation;
227
- }
228
-
229
- .pageButton:hover:not(:disabled) {
230
- background-color: #e9ecef;
231
- }
232
-
233
- .pageButton:disabled {
234
- opacity: 0.5;
235
- cursor: not-allowed;
236
- }
237
-
238
- .pageEllipsis {
239
- padding: 0 5px;
240
- color: #666;
241
- align-self: center;
242
- }
243
-
244
- .activePage {
245
- background-color: #0c696a;
246
- color: white;
247
- }
248
-
249
- .activePage:hover {
250
- background-color: #065052 !important;
251
- }
252
-
253
- .sortable {
254
- cursor: pointer;
255
- position: relative;
256
- padding-right: 20px !important;
257
- }
258
-
259
- .sortable:after {
260
- content: '↕';
261
- position: absolute;
262
- right: 8px;
263
- top: 50%;
264
- transform: translateY(-50%);
265
- opacity: 0.3;
266
- }
267
-
268
- .sort-asc:after {
269
- content: '↑';
270
- opacity: 1;
271
- }
272
-
273
- .sort-desc:after {
274
- content: '↓';
275
- opacity: 1;
276
- }
277
-
278
- .clickable {
279
- cursor: pointer;
280
- }
281
-
282
- .selected {
283
- background-color: #b6d4d5 !important;
284
- }
285
-
286
- @media screen and (max-width: 1024px) {
287
- .pageButton {
288
- min-width: 28px;
289
- min-height: 28px;
290
- font-size: 12px;
291
- }
292
-
293
- .th, .td {
294
- min-width: 40px !important;
295
- }
296
- }
297
-
298
- /* Tablet ve mobil için doğal genişlik */
299
- @media screen and (max-width: 1023px) {
300
- .th,
301
- .td {
302
- min-width: unset;
303
- width: auto;
304
- }
305
- }
306
-
307
- @media screen and (max-width: 768px) {
308
- .searchInput {
309
- font-size: 14px;
310
- padding: 6px 8px 4px 8px;
311
- }
312
-
313
- .rowsCount {
314
- font-size: 11px;
315
- }
316
-
317
- .pageButton {
318
- min-width: 24px;
319
- min-height: 24px;
320
- padding: 2px 4px;
321
- font-size: 11px;
322
- }
323
-
324
- .pagination {
325
- padding: 2px 5px;
326
- gap: 2px;
327
- }
328
-
329
- .pageEllipsis {
330
- padding: 0 2px;
331
- }
332
-
333
- .th, .td {
334
- min-width: 60px;
335
- }
336
- }
337
-
338
- @media screen and (max-width: 480px) {
339
- .searchInput {
340
- font-size: 13px;
341
- padding: 5px 6px 3px 6px;
342
- }
343
-
344
- .pageButton {
345
- min-width: 22px;
346
- min-height: 22px;
347
- padding: 1px 3px;
348
- font-size: 10px;
349
- }
350
- }
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
-
3
- function MyTableBody({ children }) {
4
- return (
5
- <tbody className="MyTableTagBody">{children}</tbody>
6
- )
7
- }
8
- export default MyTableBody
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
-
3
- function MyTableHead({ children }) {
4
- return (
5
- <thead className="MyTableTagHead">
6
- {children}
7
- </thead>
8
- )
9
- }
10
- export default MyTableHead
@@ -1,9 +0,0 @@
1
- import React, { useEffect, useState } from 'react';
2
-
3
- function MyTabPane({ children, label = null, title = null, description = null, badge = null, name = null, icon = null, className = null, style = null, tabClassName = null, tabStyle = null }) {
4
- return <div>
5
- {children}
6
- </div>
7
- }
8
-
9
- export default MyTabPane;
@@ -1,105 +0,0 @@
1
- .my-TabsContainer {
2
- display: flex;
3
- width: 100%;
4
- gap: 0px;
5
- flex-direction: column;
6
- }
7
-
8
- .my-TabsTabList {
9
- display: flex;
10
- flex-direction: row;
11
- width: 100%;
12
- list-style: none;
13
- padding: 0 0 0 7px;
14
- margin: 0px;
15
- }
16
-
17
- .my-TabsTabList li {
18
- display: flex;
19
- flex-direction: row;
20
- padding: 8px 17px;
21
- min-width: 100px;
22
- text-align: center;
23
- background: #f5f5f5;
24
- margin-right: 1px;
25
- font-size: 13px;
26
- border-radius: 8px 8px 0 0;
27
- gap: 0.5rem;
28
- justify-content: center;
29
- align-items: center;
30
- -webkit-user-select: none; /* Safari */
31
- -ms-user-select: none; /* IE 10 and IE 11 */
32
- user-select: none; /* Standard syntax */
33
- border: 1px solid #dfe3e6;
34
- border-bottom: none;
35
- }
36
-
37
- .my-TabsTabList li .icon {
38
- font-size: 17px;
39
- color: #8a9ba4;
40
- }
41
-
42
- .my-TabsTabList li .badge {
43
- font-size: 9px;
44
- color: #39464d;
45
- background-color: #0000001f;
46
- border-radius: 5px;
47
- padding: 1px 5px 1px 5px;
48
- margin-left: 5px;
49
- margin-right: -8px;
50
- }
51
-
52
- .my-TabsTabList li .title {
53
- font-size: 13px;
54
- color: #000;
55
-
56
- }
57
-
58
-
59
- .my-TabsTabList li .description {
60
- font-size: 11px;
61
- color: #8a9ba4;
62
- }
63
-
64
- .my-TabsTabList li.active {
65
- background: #b3d2e6;
66
- }
67
- .my-TabsTabList li.active .badge {
68
- background-color: #2e465685;
69
- color: #fff;
70
- }
71
- .my-TabsTabList li.active .title {
72
- font-weight: 600;
73
- }
74
- .my-TabsTabList li.active .icon {
75
- color: #000;
76
- }
77
- .my-TabsTabList li.active .description {
78
- color: #435d6e;
79
- }
80
-
81
- .my-TabsTabList li:hover {
82
- cursor: pointer;
83
- background: #eeeeee;
84
- }
85
- .my-TabsTabList li.active:hover {
86
- background: #c1ddf3;
87
- }
88
-
89
- .my-TabsTabBody {
90
- display: inline-block;
91
- width: 100%;
92
- padding: 12px;
93
- border: 1px solid #d9dee1;
94
- border-radius: 8px;
95
- border-top-width: 2px;
96
- border-top-color: #b3d2e6;
97
- }
98
- .my-TabsTabBody .my-TabsTabContainer {
99
- display: none;
100
- width: 100%;
101
- }
102
- .my-TabsTabBody .my-TabsTabContainer.active {
103
- display: inline-block;
104
- width: 100%;
105
- }
@@ -1,63 +0,0 @@
1
- import React, { useEffect, useState } from 'react';
2
- import "./MyTabs.css";
3
-
4
- function MyTabs({ children, className = null, style = null, onChange = null, activePaneIndex = -1, activePaneName = null }) {
5
- const [activei, setActivei] = useState(activePaneIndex > -1 ? activePaneIndex : 0);
6
-
7
- const arrChild = React.Children.toArray(children);
8
-
9
- useEffect(() => {
10
- if (onChange) {
11
- onChange({ index: activei, name: arrChild[activei].props.name, label: arrChild[activei].props.label && arrChild[activei].props.label || arrChild[activei].props.title })
12
- }
13
- }, [activei])
14
-
15
- useEffect(() => {
16
- if (activePaneName) {
17
- const index = arrChild.findIndex(item => item.props.name === activePaneName);
18
- if (index > -1) {
19
- setActivei(index);
20
- }
21
- }
22
- }, [activePaneName])
23
-
24
- return <div className={"my-TabsContainer " + (className ? className : '')} style={style}>
25
- <ul className="my-TabsTabList">
26
- {
27
- arrChild.map((item, i) => {
28
- return <li
29
- key={i}
30
- className={(i == activei && 'active') + ' ' + (item.props.tabClassName ? item.props.tabClassName : '')}
31
- style={item.props.tabStyle}
32
- onClick={() => setActivei(i)}
33
- title={item.props.title}
34
- >
35
- {item.props.icon != undefined && <div className="icon">{item.props.icon}</div>}
36
-
37
- <div className="flex flex-col gap-0 text-start">
38
- {item.props.label != undefined ? <span className="title">{item.props.label}</span> : <span className="title">{item.props.title}</span>}
39
- {item.props.description != undefined && <div className="description">{item.props.description}</div>}
40
- </div>
41
-
42
- {item.props.badge != undefined && <div className="badge">{item.props.badge}</div>}
43
- </li>
44
- })
45
- }
46
- </ul>
47
-
48
- <div className="my-TabsTabBody">
49
- {
50
- arrChild.map((item, i) => {
51
- return <div
52
- key={i}
53
- className={"my-TabsTabContainer " + (i == activei && 'active') + ' ' + (item.props.className ? item.props.className : '')}
54
- style={item.props.style}
55
- onClick={() => setActivei(i)}
56
- >{item.props.children}</div>
57
- })
58
- }
59
- </div>
60
-
61
- </div>
62
- }
63
- export default MyTabs;
@@ -1,28 +0,0 @@
1
- .my-waiting-backdrop {
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- background-color: #282c39de;
8
- display: flex;
9
- justify-content: center;
10
- align-items: center;
11
- z-index: 9999999;
12
- }
13
-
14
- .my-waiting-content{
15
- display: block;
16
- color : #fff;
17
- }
18
-
19
- .my-waiting-content > div{
20
- justify-content: center;
21
- }
22
-
23
-
24
- .my-waiting-message{
25
- display: block;
26
- padding: 15px 0;
27
- text-align: center;
28
- }
@@ -1,27 +0,0 @@
1
- import React from "react";
2
- import { Oval } from "react-loader-spinner";
3
-
4
- import './MyWaiting.css'; // Modal için CSS dosyası
5
-
6
- export default function MyWaiting({ show = false, message = null }) {
7
- if (!show) {
8
- return null;
9
- }
10
-
11
- return (
12
- <div className="my-waiting-backdrop">
13
- <div className="my-waiting-content">
14
- <Oval
15
- visible={true}
16
- height="60"
17
- width="60"
18
- color="#fff"
19
- secondaryColor="#cdcdcd"
20
- ariaLabel="oval-loading"
21
- strokeWidth={5}
22
- />
23
- {message && <span className="my-waiting-message">{message}</span>}
24
- </div>
25
- </div>
26
- );
27
- }
File without changes