@sydsoft/base 1.58.0 → 2.0.0
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/esm/_lib/baseFunctions.d.ts +16 -0
- package/dist/esm/_lib/baseFunctions.js +102 -0
- package/dist/esm/_lib/inputMask.d.ts +12 -0
- package/dist/esm/_lib/inputMask.js +234 -0
- package/dist/esm/_lib/listFunctions.d.ts +7 -0
- package/dist/esm/_lib/listFunctions.js +119 -0
- package/dist/esm/_lib/storage/cookies.d.ts +9 -0
- package/dist/esm/_lib/storage/cookies.js +39 -0
- package/dist/esm/_lib/storage/encData.d.ts +7 -0
- package/dist/esm/_lib/storage/encData.js +48 -0
- package/dist/esm/_lib/storage/localStorage.d.ts +11 -0
- package/dist/esm/_lib/storage/localStorage.js +74 -0
- package/dist/esm/_lib/storage/sessionStorage.d.ts +11 -0
- package/dist/esm/_lib/storage/sessionStorage.js +74 -0
- package/dist/esm/_lib/useInterval.d.ts +6 -0
- package/dist/esm/_lib/useInterval.js +24 -0
- package/dist/esm/alert/index.d.ts +23 -0
- package/dist/esm/alert/index.js +112 -0
- package/dist/esm/alert/index.module.css +125 -0
- package/dist/esm/box/Box.d.ts +14 -0
- package/dist/esm/box/Box.js +20 -0
- package/dist/esm/box/Box.module.css +159 -0
- package/dist/esm/box/BoxContent.d.ts +14 -0
- package/dist/esm/box/BoxContent.js +7 -0
- package/dist/esm/box/BoxFooter.d.ts +15 -0
- package/dist/esm/box/BoxFooter.js +13 -0
- package/dist/esm/box/BoxHeader.d.ts +21 -0
- package/dist/esm/box/BoxHeader.js +14 -0
- package/dist/esm/box/index.d.ts +9 -0
- package/dist/esm/box/index.js +9 -0
- package/dist/esm/countDown/index.d.ts +27 -0
- package/dist/esm/countDown/index.js +102 -0
- package/dist/esm/dateTime/index.d.ts +17 -0
- package/dist/esm/dateTime/index.js +81 -0
- package/dist/esm/form/Button.d.ts +32 -0
- package/dist/esm/form/Button.js +81 -0
- package/dist/esm/form/Checkbox.d.ts +28 -0
- package/dist/esm/form/Checkbox.js +28 -0
- package/dist/esm/form/Dialog.d.ts +25 -0
- package/dist/esm/form/Dialog.js +40 -0
- package/dist/esm/form/Form.d.ts +15 -0
- package/dist/esm/form/Form.js +17 -0
- package/dist/esm/form/FormOlustur.d.ts +44 -0
- package/dist/esm/form/FormOlustur.js +57 -0
- package/dist/esm/form/Input.d.ts +66 -0
- package/dist/esm/form/Input.js +196 -0
- package/dist/esm/form/Label.d.ts +12 -0
- package/dist/esm/form/Label.js +14 -0
- package/dist/esm/form/SearchableInput.d.ts +42 -0
- package/dist/esm/form/SearchableInput.js +277 -0
- package/dist/esm/form/UploadBase.d.ts +25 -0
- package/dist/esm/form/UploadBase.js +86 -0
- package/dist/esm/form/index.d.ts +14 -0
- package/dist/esm/form/index.js +14 -0
- package/dist/esm/form/styles/Button.module.css +151 -0
- package/dist/esm/form/styles/Input.module.css +227 -0
- package/dist/esm/form/styles/Label.module.css +37 -0
- package/dist/esm/form/styles/SearchableInput.module.css +86 -0
- package/dist/esm/grid/index.d.ts +43 -0
- package/dist/esm/grid/index.js +102 -0
- package/dist/esm/grid/index.module.css +812 -0
- package/dist/esm/icon/icons.d.ts +27 -0
- package/dist/esm/icon/icons.js +28 -0
- package/dist/esm/icon/index.d.ts +38 -0
- package/dist/esm/icon/index.js +25 -0
- package/dist/esm/icon/mui.d.ts +6 -0
- package/dist/esm/icon/mui.js +6 -0
- package/dist/esm/index.d.ts +24 -0
- package/dist/esm/index.js +24 -0
- package/dist/esm/menu/index.d.ts +75 -0
- package/dist/esm/menu/index.js +59 -0
- package/dist/esm/menu/index.module.css +106 -0
- package/dist/esm/modal/index.d.ts +23 -0
- package/dist/esm/modal/index.js +66 -0
- package/dist/esm/modal/index.module.css +83 -0
- package/dist/esm/popover/index.d.ts +26 -0
- package/dist/esm/popover/index.js +343 -0
- package/dist/esm/popover/index.module.css +95 -0
- package/dist/esm/tooltip/index.d.ts +16 -0
- package/dist/esm/tooltip/index.js +124 -0
- package/package.json +12 -8
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author : izzetseydaoglu
|
|
3
|
+
* @copyright : sydSOFT Bilişim Hizmetleri (c) 2026
|
|
4
|
+
* @version : 2026-02-10 20:25:31
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.component {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
align-items: center;
|
|
12
|
+
vertical-align: top;
|
|
13
|
+
width: 100%;
|
|
14
|
+
border-width: 1px;
|
|
15
|
+
border-style: solid;
|
|
16
|
+
border-color: rgb(206, 212, 218);
|
|
17
|
+
box-shadow: none;
|
|
18
|
+
background: #ffffff;
|
|
19
|
+
transition: 0.2s ease all;
|
|
20
|
+
border-radius: 6px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.component[data-disabled='true'] {
|
|
24
|
+
background: #ebebeb;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.component[data-disabled='true'],
|
|
28
|
+
.component[data-disabled='true'] * {
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.component.error {
|
|
34
|
+
border-color: #e70b3978;
|
|
35
|
+
box-shadow: 0px 0px 5px 2px #f40d0d3d;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.component:hover {
|
|
39
|
+
border-color: rgba(63, 77, 103, 0.87);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.component:focus-within {
|
|
43
|
+
box-shadow: inset 0 0 0 1px rgb(63 77 103 / 87%);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.hidePlaceHolder input:not(:focus)::placeholder {
|
|
47
|
+
color: transparent;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.component[data-disabled='true'] .loading:before {
|
|
51
|
+
background: #ebebeb;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.adornment {
|
|
55
|
+
z-index: 1;
|
|
56
|
+
height: 0.01em;
|
|
57
|
+
max-height: 2em;
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: row;
|
|
60
|
+
align-items: center;
|
|
61
|
+
flex: 0 0 auto;
|
|
62
|
+
flex-wrap: nowrap;
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.adornment.start {
|
|
67
|
+
margin-left: 10px;
|
|
68
|
+
margin-right: -10px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.adornment.end {
|
|
72
|
+
margin-left: -5px;
|
|
73
|
+
margin-right: 10px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.inputBase {
|
|
77
|
+
position: relative;
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
flex-direction: row;
|
|
80
|
+
align-items: center;
|
|
81
|
+
flex: 1;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
z-index: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.label {
|
|
87
|
+
transition: 0.2s ease all;
|
|
88
|
+
color: #000;
|
|
89
|
+
padding: 0;
|
|
90
|
+
display: block;
|
|
91
|
+
transform-origin: left top;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
overflow: hidden;
|
|
94
|
+
text-overflow: ellipsis;
|
|
95
|
+
max-width: calc(100% - 20px);
|
|
96
|
+
position: absolute;
|
|
97
|
+
left: 14px;
|
|
98
|
+
top: 48%;
|
|
99
|
+
transform: translateY(-50%) scale(1);
|
|
100
|
+
pointer-events: none;
|
|
101
|
+
opacity: 0.5;
|
|
102
|
+
}
|
|
103
|
+
.required {
|
|
104
|
+
margin-left: 4px;
|
|
105
|
+
color: #ff0202;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.inputBase.open {
|
|
109
|
+
position: unset;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.inputBase.open .label {
|
|
113
|
+
background: linear-gradient(0deg, var(--label-bg, #ffffff) 50%, rgba(255, 255, 255, 0) 50%);
|
|
114
|
+
transform: translateY(-50%) scale(0.75);
|
|
115
|
+
top: 1px;
|
|
116
|
+
left: 8px;
|
|
117
|
+
padding: 0 10px;
|
|
118
|
+
color: #3f4d67;
|
|
119
|
+
opacity: 1;
|
|
120
|
+
z-index: 2;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.input {
|
|
124
|
+
font-size: 1rem;
|
|
125
|
+
line-height: 1.8rem;
|
|
126
|
+
letter-spacing: inherit;
|
|
127
|
+
color: currentcolor;
|
|
128
|
+
box-sizing: content-box;
|
|
129
|
+
background: none;
|
|
130
|
+
margin: 0;
|
|
131
|
+
display: block;
|
|
132
|
+
min-width: 0;
|
|
133
|
+
width: 100%;
|
|
134
|
+
padding: 9px 14px;
|
|
135
|
+
border: none;
|
|
136
|
+
outline: none;
|
|
137
|
+
z-index: 1;
|
|
138
|
+
text-overflow: ellipsis;
|
|
139
|
+
border-radius: 6px;
|
|
140
|
+
}
|
|
141
|
+
.input[type='number']::-webkit-outer-spin-button,
|
|
142
|
+
.input[type='number']::-webkit-inner-spin-button {
|
|
143
|
+
appearance: none;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.input[readonly] {
|
|
147
|
+
cursor: default;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.input:disabled {
|
|
151
|
+
background: #ebebeb;
|
|
152
|
+
cursor: not-allowed;
|
|
153
|
+
color: #000;
|
|
154
|
+
opacity: 0.7;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.input.select {
|
|
158
|
+
padding: 13px 14px;
|
|
159
|
+
margin-right: 5px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.input.textarea {
|
|
163
|
+
resize: vertical;
|
|
164
|
+
}
|
|
165
|
+
.input.textarea::-webkit-resizer {
|
|
166
|
+
display: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.loading {
|
|
170
|
+
position: relative;
|
|
171
|
+
margin: 0 15px;
|
|
172
|
+
width: 24px;
|
|
173
|
+
height: 24px;
|
|
174
|
+
}
|
|
175
|
+
.loading:before {
|
|
176
|
+
position: absolute;
|
|
177
|
+
display: block;
|
|
178
|
+
content: '';
|
|
179
|
+
z-index: 12;
|
|
180
|
+
top: 2px;
|
|
181
|
+
left: 2px;
|
|
182
|
+
width: 20px;
|
|
183
|
+
height: 20px;
|
|
184
|
+
border-radius: 50%;
|
|
185
|
+
background-color: #fff;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.loading:after {
|
|
189
|
+
position: absolute;
|
|
190
|
+
display: block;
|
|
191
|
+
content: '';
|
|
192
|
+
z-index: 11;
|
|
193
|
+
width: 12px;
|
|
194
|
+
height: 12px;
|
|
195
|
+
border-radius: 200px 0 0;
|
|
196
|
+
background: linear-gradient(45deg, rgba(0, 0, 0, 0) 0, rgba(69, 154, 215, 1) 50%, rgba(69, 154, 215, 1) 100%);
|
|
197
|
+
animation: loading 0.5s linear infinite;
|
|
198
|
+
}
|
|
199
|
+
@keyframes loading {
|
|
200
|
+
0% {
|
|
201
|
+
transform-origin: 100% 100%;
|
|
202
|
+
transform: rotate(0deg);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
100% {
|
|
206
|
+
transform-origin: 100% 100%;
|
|
207
|
+
transform: rotate(360deg);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.checkbox {
|
|
212
|
+
position: relative;
|
|
213
|
+
display: inline-flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
justify-content: flex-start;
|
|
216
|
+
gap: 8px;
|
|
217
|
+
box-sizing: border-box;
|
|
218
|
+
font-size: 1rem;
|
|
219
|
+
line-height: 1.4375em;
|
|
220
|
+
user-select: none;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.checkbox input,
|
|
224
|
+
.checkbox label {
|
|
225
|
+
margin: 0;
|
|
226
|
+
cursor: pointer !important;
|
|
227
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author : izzetseydaoglu
|
|
3
|
+
* @copyright : sydSOFT Bilişim Hizmetleri (c) 2026
|
|
4
|
+
* @version : 2026-02-10 20:25:31
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.label {
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: flex-end;
|
|
12
|
+
text-align: right;
|
|
13
|
+
color: inherit;
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
flex: 1;
|
|
16
|
+
padding-right: 5px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media (max-width: 960px) {
|
|
20
|
+
.label {
|
|
21
|
+
justify-content: flex-start !important;
|
|
22
|
+
margin-bottom: 10px;
|
|
23
|
+
padding-left: 5px;
|
|
24
|
+
text-align: left;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.required {
|
|
29
|
+
content: " ";
|
|
30
|
+
width: 10px;
|
|
31
|
+
color: #dc160f;
|
|
32
|
+
margin-left: 3px;
|
|
33
|
+
font-size: small;
|
|
34
|
+
vertical-align: super;
|
|
35
|
+
padding: 0 3px;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author : izzetseydaoglu
|
|
3
|
+
* @copyright : sydSOFT Bilişim Hizmetleri (c) 2026
|
|
4
|
+
* @version : 2026-02-10 20:25:31
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.searchableInputComponent {
|
|
8
|
+
cursor: unset;
|
|
9
|
+
}
|
|
10
|
+
.searchableInputComponent input {
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.searchableInputComponent :global(.listDiv) {
|
|
15
|
+
position: relative;
|
|
16
|
+
margin-top: -4px;
|
|
17
|
+
z-index: 1000;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.searchableInputComponent :global(.listDiv[data-relative="true"]) {
|
|
21
|
+
z-index: 1 !important;
|
|
22
|
+
}
|
|
23
|
+
.searchableInputComponent :global(.listDiv[data-relative="true"]) > ul {
|
|
24
|
+
position: relative !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.searchableInputComponent :global(.list) {
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 3px;
|
|
30
|
+
left: 1%;
|
|
31
|
+
width: 98%;
|
|
32
|
+
height: 0;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
background: transparent;
|
|
35
|
+
margin: 0;
|
|
36
|
+
padding: 0;
|
|
37
|
+
list-style: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.searchableInputComponent :global(.list.open) {
|
|
41
|
+
height: auto;
|
|
42
|
+
max-height: 300px;
|
|
43
|
+
overflow-x: hidden;
|
|
44
|
+
overflow-y: visible;
|
|
45
|
+
padding: 5px 0;
|
|
46
|
+
border: 1px #ced4da solid;
|
|
47
|
+
background: #fff;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.searchableInputComponent :global(.list li) {
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
display: block;
|
|
53
|
+
padding: 8px 10px;
|
|
54
|
+
text-overflow: ellipsis;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.searchableInputComponent :global(.list li:hover),
|
|
60
|
+
.searchableInputComponent :global(.list li.selected) {
|
|
61
|
+
background: #d9e0e3;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.searchableInputComponent :global(.list li.active) {
|
|
65
|
+
background: #cbe2ef;
|
|
66
|
+
font-weight: 500;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.searchableInputComponent :global(.newCreate) {
|
|
70
|
+
margin-right: 5px;
|
|
71
|
+
font-style: italic;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.searchableInputComponent :global(.message) {
|
|
75
|
+
text-overflow: ellipsis;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
white-space: nowrap;
|
|
78
|
+
display: block;
|
|
79
|
+
padding: 15px 10px;
|
|
80
|
+
cursor: default;
|
|
81
|
+
}
|
|
82
|
+
.searchableInputComponent :global(.loading) {
|
|
83
|
+
padding: 5px 10px;
|
|
84
|
+
background-color: #ced4da38;
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author : izzetseydaoglu
|
|
3
|
+
* @copyright : sydSOFT Bilişim Hizmetleri (c) 2026
|
|
4
|
+
* @version : 2026-02-11 17:53:21
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
export type typeSpacingValues = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
8
|
+
export type typeJustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
9
|
+
export type typeAlignItems = 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline';
|
|
10
|
+
export type typeAlignContent = 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
11
|
+
export interface RowProps {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
16
|
+
flexWrap?: 'wrap' | 'wrap-reverse' | 'nowrap';
|
|
17
|
+
justifyContent?: typeJustifyContent;
|
|
18
|
+
alignContent?: typeAlignContent;
|
|
19
|
+
alignItems?: typeAlignItems;
|
|
20
|
+
rowSpacing?: typeSpacingValues;
|
|
21
|
+
colSpacing?: typeSpacingValues;
|
|
22
|
+
}
|
|
23
|
+
export declare const Row: React.FC<RowProps>;
|
|
24
|
+
export type GridValues = 'auto' | 'full' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
25
|
+
export interface ColProps {
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
xs?: GridValues;
|
|
30
|
+
sm?: GridValues;
|
|
31
|
+
md?: GridValues;
|
|
32
|
+
lg?: GridValues;
|
|
33
|
+
xl?: GridValues;
|
|
34
|
+
xxl?: GridValues;
|
|
35
|
+
}
|
|
36
|
+
export declare const Col: React.FC<ColProps>;
|
|
37
|
+
export interface HiddenProps {
|
|
38
|
+
children: React.ReactElement;
|
|
39
|
+
hidden?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
40
|
+
onlyHidden?: ('xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl')[];
|
|
41
|
+
}
|
|
42
|
+
export declare const Hidden: React.FC<HiddenProps>;
|
|
43
|
+
export declare const DevelopGridComponent: React.FC;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { __assign, __rest, __spreadArray } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* @author : izzetseydaoglu
|
|
5
|
+
* @copyright : sydSOFT Bilişim Hizmetleri (c) 2026
|
|
6
|
+
* @version : 2026-02-11 17:53:21
|
|
7
|
+
*/
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
|
+
import styles from './index.module.css';
|
|
10
|
+
export var Row = function (_a) {
|
|
11
|
+
var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, style = _a.style, _c = _a.flexDirection, flexDirection = _c === void 0 ? 'row' : _c, _d = _a.flexWrap, flexWrap = _d === void 0 ? 'wrap' : _d, _e = _a.justifyContent, justifyContent = _e === void 0 ? 'flex-start' : _e, _f = _a.alignContent, alignContent = _f === void 0 ? 'center' : _f, _g = _a.alignItems, alignItems = _g === void 0 ? 'center' : _g, _h = _a.rowSpacing, rowSpacing = _h === void 0 ? 2 : _h, _j = _a.colSpacing, colSpacing = _j === void 0 ? 2 : _j, other = __rest(_a, ["children", "className", "style", "flexDirection", "flexWrap", "justifyContent", "alignContent", "alignItems", "rowSpacing", "colSpacing"]);
|
|
12
|
+
var classes = [
|
|
13
|
+
styles.row,
|
|
14
|
+
rowSpacing !== undefined && styles["row-spacing-".concat(rowSpacing)],
|
|
15
|
+
colSpacing !== undefined && styles["col-spacing-".concat(colSpacing)],
|
|
16
|
+
flexDirection !== 'row' && styles["flex-".concat(flexDirection.replace('-', '-'))],
|
|
17
|
+
flexWrap !== 'wrap' && styles["flex-".concat(flexWrap)],
|
|
18
|
+
justifyContent !== 'flex-start' && styles["justify-".concat(justifyContent.replace('flex-', '').replace('space-', ''))],
|
|
19
|
+
alignItems !== 'center' && styles["align-items-".concat(alignItems.replace('flex-', ''))],
|
|
20
|
+
alignContent !== 'center' && styles["align-content-".concat(alignContent.replace('flex-', ''))],
|
|
21
|
+
className
|
|
22
|
+
]
|
|
23
|
+
.filter(Boolean)
|
|
24
|
+
.join(' ');
|
|
25
|
+
return (_jsx("div", __assign({ className: classes, style: style }, other, { children: children })));
|
|
26
|
+
};
|
|
27
|
+
export var Col = function (_a) {
|
|
28
|
+
// Cascading logic - aynı sizin component'inizdeki gibi
|
|
29
|
+
var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, style = _a.style, xs = _a.xs, sm = _a.sm, md = _a.md, lg = _a.lg, xl = _a.xl, xxl = _a.xxl, other = __rest(_a, ["children", "className", "style", "xs", "sm", "md", "lg", "xl", "xxl"]);
|
|
30
|
+
var classes = [
|
|
31
|
+
styles.col,
|
|
32
|
+
// Sadece belirtilen breakpoint'ler için class ekle
|
|
33
|
+
xs && styles["col-xs-".concat(xs)],
|
|
34
|
+
sm && styles["col-sm-".concat(sm)],
|
|
35
|
+
md && styles["col-md-".concat(md)],
|
|
36
|
+
lg && styles["col-lg-".concat(lg)],
|
|
37
|
+
xl && styles["col-xl-".concat(xl)],
|
|
38
|
+
xxl && styles["col-xxl-".concat(xxl)],
|
|
39
|
+
className
|
|
40
|
+
]
|
|
41
|
+
.filter(Boolean)
|
|
42
|
+
.join(' ');
|
|
43
|
+
return (_jsx("div", __assign({ className: classes, style: style }, other, { children: children })));
|
|
44
|
+
};
|
|
45
|
+
export var Hidden = function (_a) {
|
|
46
|
+
var children = _a.children, hidden = _a.hidden, onlyHidden = _a.onlyHidden, other = __rest(_a, ["children", "hidden", "onlyHidden"]);
|
|
47
|
+
var existingClassName = children.props.className || '';
|
|
48
|
+
var hiddenClasses = [];
|
|
49
|
+
if (onlyHidden) {
|
|
50
|
+
onlyHidden.forEach(function (breakpoint) {
|
|
51
|
+
hiddenClasses.push(styles["hidden-".concat(breakpoint)]);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
else if (hidden) {
|
|
55
|
+
// Orijinal mantık: seçilen breakpoint ve altındaki tüm breakpoint'ler gizlenir
|
|
56
|
+
var breakpoints = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
57
|
+
var targetIndex = breakpoints.indexOf(hidden);
|
|
58
|
+
if (targetIndex !== -1) {
|
|
59
|
+
for (var i = 0; i <= targetIndex; i++) {
|
|
60
|
+
hiddenClasses.push(styles["hidden-".concat(breakpoints[i])]);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
var newClassName = __spreadArray([existingClassName], hiddenClasses, true).filter(Boolean).join(' ');
|
|
65
|
+
return React.cloneElement(children, __assign({ className: newClassName }, other));
|
|
66
|
+
};
|
|
67
|
+
export var DevelopGridComponent = function () {
|
|
68
|
+
var _a = useState(''), currentBreakpoint = _a[0], setCurrentBreakpoint = _a[1];
|
|
69
|
+
// Breakpoint detector
|
|
70
|
+
React.useEffect(function () {
|
|
71
|
+
var updateBreakpoint = function () {
|
|
72
|
+
var width = window.innerWidth;
|
|
73
|
+
var breakpoint = '';
|
|
74
|
+
if (width <= 576)
|
|
75
|
+
breakpoint = 'XS (≤576px)';
|
|
76
|
+
else if (width <= 768)
|
|
77
|
+
breakpoint = 'SM (577-768px)';
|
|
78
|
+
else if (width <= 992)
|
|
79
|
+
breakpoint = 'MD (769-992px)';
|
|
80
|
+
else if (width <= 1200)
|
|
81
|
+
breakpoint = 'LG (993-1200px)';
|
|
82
|
+
else if (width <= 1400)
|
|
83
|
+
breakpoint = 'XL (1201-1400px)';
|
|
84
|
+
else
|
|
85
|
+
breakpoint = 'XXL (≥1401px)';
|
|
86
|
+
setCurrentBreakpoint(breakpoint);
|
|
87
|
+
};
|
|
88
|
+
updateBreakpoint();
|
|
89
|
+
window.addEventListener('resize', updateBreakpoint);
|
|
90
|
+
return function () { return window.removeEventListener('resize', updateBreakpoint); };
|
|
91
|
+
}, []);
|
|
92
|
+
return (_jsxs("div", { style: {
|
|
93
|
+
position: 'fixed',
|
|
94
|
+
bottom: '10px',
|
|
95
|
+
right: '10px',
|
|
96
|
+
background: '#333',
|
|
97
|
+
color: 'white',
|
|
98
|
+
padding: '10px',
|
|
99
|
+
borderRadius: '4px',
|
|
100
|
+
zIndex: 9999999
|
|
101
|
+
}, children: ["Current: ", currentBreakpoint] }));
|
|
102
|
+
};
|