-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMultiLevelTable.css
More file actions
532 lines (463 loc) · 12 KB
/
MultiLevelTable.css
File metadata and controls
532 lines (463 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
.table-container {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
}
/* Main container styling to prevent black space */
.table-wrapper {
width: 100%;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
/* Remove overflow-x from wrapper to prevent black space */
margin: 0;
padding: 0 ;
/* Ensure proper height */
height: auto;
min-height: 0;
/* Prevent any overflow issues */
overflow: visible;
}
/* Responsive table container */
.table-responsive-container {
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
border-radius: 12px;
/* Show scrollbar */
scrollbar-width: thin;
scrollbar-color: #c1c1c1 #f1f1f1;
/* Prevent extra space */
margin: 0;
padding: 0;
/* Prevent vertical overflow */
overflow-y: hidden;
/* Ensure proper height */
height: auto;
min-height: 0;
/* Ensure horizontal scroll works properly */
white-space: nowrap;
/* Force horizontal scroll for all screen sizes below 1200px */
min-width: 0;
}
/* Custom scrollbar styling */
.table-responsive-container::-webkit-scrollbar {
height: 8px;
}
.table-responsive-container::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
}
.table-responsive-container::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 4px;
}
.table-responsive-container::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
/* Ensure table container maintains proper spacing */
.table-container {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
margin: 0;
padding: 0;
}
/* Ensure no extra space from table elements */
.main-table-container * {
box-sizing: border-box;
}
/* Ensure pagination doesn't create extra space */
.table-wrapper > div:last-child {
margin-bottom: 0;
padding-bottom: 0;
/* Ensure pagination maintains its layout on smaller screens */
width: 100%;
overflow-x: auto; /* Allow horizontal scroll if needed */
}
.main-table-container {
width: 100%;
border: 1px solid #d9d9d9;
border-radius: 10px;
border-collapse: separate;
border-spacing: 0;
border-radius: 12px;
overflow: hidden;
table-layout: fixed;
min-width: 1200px; /* Minimum width to ensure all content fits properly */
margin: 0; /* Remove any margin */
padding: 0; /* Remove any padding */
/* Ensure table doesn't shrink below minimum width */
flex-shrink: 0;
}
/* Ensure table cells don't wrap content */
.table-container td,
.table-container th {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
/* Prevent content from being truncated */
min-width: 0;
}
/* Column width distribution - spread across full width with end spacing for actions */
.main-table-container th:nth-child(1),
.main-table-container td:nth-child(1) {
width: 22%; /* Resource Type - reduced slightly */
text-align: left;
}
.main-table-container th:nth-child(2),
.main-table-container td:nth-child(2) {
width: 18%; /* Name - reduced slightly */
text-align: left;
}
.main-table-container th:nth-child(3),
.main-table-container td:nth-child(3) {
width: 18%; /* Date & Time - reduced slightly */
text-align: left;
}
.main-table-container th:nth-child(4),
.main-table-container td:nth-child(4) {
width: 12%; /* Status - reduced slightly */
text-align: left;
}
.main-table-container th:nth-child(5),
.main-table-container td:nth-child(5) {
width: 12%; /* Orchestration - reduced slightly */
text-align: left;
}
.main-table-container th:nth-child(6),
.main-table-container td:nth-child(6) {
width: 8%; /* Actions - increased for better spacing */
padding-right: 24px; /* Add end spacing to actions column */
text-align: left;
}
.selection-header,
.selection-cell {
display: flex;
align-items: center;
justify-content: center;
padding: 8px;
}
/* Custom styled checkbox for selection */
.row-checkbox,
.selection-header input[type="checkbox"],
.selection-cell input[type="checkbox"] {
width: 16px;
height: 16px;
border-radius: 4px;
border: 1px solid #BFBFBF;
background: #fff;
appearance: none;
-webkit-appearance: none;
outline: none;
cursor: pointer;
position: relative;
display: inline-block;
margin: 0 8px 0 0;
vertical-align: middle;
box-sizing: border-box;
}
.row-checkbox:checked,
.selection-header input[type="checkbox"]:checked,
.selection-cell input[type="checkbox"]:checked {
background: #5D5FEF;
border: 1.2px solid #5D5FEF;
border-radius: 4px;
}
.row-checkbox:checked::after,
.selection-header input[type="checkbox"]:checked::after,
.selection-cell input[type="checkbox"]:checked::after {
content: "";
position: absolute;
left: 50%;
top: 50%;
width: 4px;
height: 8px;
border: solid #ffffff;
border-width: 0 2px 2px 0;
border-radius: 1px;
transform: translate(-50%, -50%) rotate(45deg);
display: block;
box-sizing: border-box;
}
.table-container td {
color: #000;
font-size: var(--Typeface-Size-lg, 16px);
font-style: normal;
font-weight: 400;
line-height: var(--Typeface-line-height-line-height-500, 20px);
letter-spacing: var(--Typeface-letter-spacing--normal, -0.54px);
background: #fff;
border-bottom: 1px solid #f1f1f3;
padding: 18px 16px;
vertical-align: middle;
box-sizing: border-box;
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 120px; /* Increased minimum width to prevent content trimming */
}
.main-table-container tr:last-child td {
border-bottom: none;
}
/* Nested row styling - no extra padding */
.table-row-nested td {
background-color: #fafafa;
}
/* Remove any extra padding for nested cells */
.table-cell-nested {
padding-left: 16px !important;
}
/* Ensure actions column maintains consistent spacing across all row levels */
.main-table-container td:nth-child(6) {
text-align: left;
vertical-align: middle;
}
/* Ensure action buttons are properly aligned in nested rows */
.table-row-nested td:nth-child(6) {
padding-right: 24px;
}
/* Search bar styles */
.search-bar-container {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
gap: 1rem;
flex-wrap: nowrap; /* Prevent wrapping on larger screens */
}
.search-bar-left {
display: flex;
align-items: center;
gap: 1rem;
flex: 1;
min-width: 0; /* Allow shrinking */
}
.search-bar-right {
display: flex;
gap: 0.5rem;
flex-shrink: 0; /* Prevent shrinking */
align-items: center;
}
.table-title-container {
display: flex;
flex-direction: column;
gap: 0.25rem;
flex-shrink: 0; /* Prevent title from shrinking */
}
.table-subtitle {
margin: 0;
font-size: 0.875rem;
font-family: 'DM Sans', sans-serif;
color: #667085;
opacity: 0.7;
}
.search-input-container {
position: relative;
width: 100%;
height: 48px;
min-width: 200px; /* Minimum width for search */
max-width: 400px;
flex: 1;
min-width: 0; /* Allow shrinking below 200px when needed */
}
.search-input-icon {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
display: flex;
align-items: center;
z-index: 1;
}
.search-input {
width: 100%;
height: 48px;
border-radius: 8px;
gap: 8px;
opacity: 1;
padding: 4px 12px 4px 44px;
border: 1px solid;
font-size: 14px;
outline: none;
transition: border 0.2s;
box-sizing: border-box;
}
.search-input:focus {
border: 1.5px solid #D9D9D9;
}
.search-input::placeholder {
color: #D9D9D9;
opacity: 1;
}
/* Responsive design with comprehensive breakpoints */
@media (max-width: 768px) {
/* Tablet and smaller - Title on first line, search bar and buttons on second line */
.search-bar-container {
flex-direction: column;
align-items: stretch;
gap: 1rem;
}
.search-bar-left {
width: 100%;
}
.search-bar-right {
width: 100%;
justify-content: space-between;
gap: 1rem;
}
.search-input-container {
max-width: none;
min-width: 200px;
flex: 1;
}
/* Ensure table scrolls horizontally on mobile */
.table-responsive-container {
overflow-x: auto;
min-width: 0; /* Allow container to shrink */
width: 100%;
}
/* Ensure table headers and cells don't break */
.main-table-container th,
.main-table-container td {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 120px; /* Minimum width for mobile */
}
/* Adjust column widths for mobile - maintain exact same proportions */
.main-table-container th:nth-child(1),
.main-table-container td:nth-child(1) {
min-width: 264px; /* Resource Type - 22% of 1200px */
}
.main-table-container th:nth-child(2),
.main-table-container td:nth-child(2) {
min-width: 216px; /* Name - 18% of 1200px */
}
.main-table-container th:nth-child(3),
.main-table-container td:nth-child(3) {
min-width: 216px; /* Date & Time - 18% of 1200px */
}
.main-table-container th:nth-child(4),
.main-table-container td:nth-child(4) {
min-width: 144px; /* Status - 12% of 1200px */
}
.main-table-container th:nth-child(5),
.main-table-container td:nth-child(5) {
min-width: 144px; /* Orchestration - 12% of 1200px */
}
.main-table-container th:nth-child(6),
.main-table-container td:nth-child(6) {
min-width: 96px; /* Actions - 8% of 1200px */
}
}
/* Small mobile devices */
@media (max-width: 480px) {
.search-bar-container {
padding: 0.75rem;
gap: 0.75rem;
}
.search-bar-left {
width: 100%;
}
.search-bar-right {
width: 100%;
justify-content: space-between;
gap: 0.5rem;
}
.search-input-container {
height: 44px; /* Slightly smaller on very small screens */
min-width: 120px; /* Further reduced minimum width for very small screens */
flex: 1;
}
.search-input {
height: 44px;
font-size: 13px;
}
/* Ensure horizontal scrolling works on very small screens */
.table-responsive-container {
overflow-x: auto !important;
min-width: 0 !important;
width: 100% !important;
}
.main-table-container {
min-width: 1200px !important;
width: 1200px !important;
}
}
/* ≤ 1024 px – turn the whole header into a 2‑row grid */
@media (max-width: 1024px) {
.search-bar-container {
display: grid;
grid-template-columns: 1fr auto; /* search grows, buttons = auto */
grid-template-areas:
"title title" /* row 1: title full‑width */
"search buttons"; /* row 2: search + buttons */
gap: 1rem;
align-items: center;
}
/* let the children of .search-bar-left take part in the grid */
.search-bar-left {
display: contents; /* no box of its own */
}
/* name each piece */
.table-title-container { grid-area: title; }
.search-input-container { grid-area: search; }
/* push buttons to the right */
.search-bar-right {
grid-area: buttons;
justify-self: end; /* align right edge */
}
}
/* Large desktop breakpoint */
@media (min-width: 1025px) {
.search-bar-container {
flex-direction: row;
align-items: center;
}
}
/* Tablet and smaller breakpoint */
@media (max-width: 1024px) {
.search-bar-container > * {
margin-bottom: 0.5rem;
}
.search-bar-left,
.search-bar-right {
width: 100%;
}
}
@media (max-width: 768px) {
.search-input-container {
max-width: 350px;
}
}
/* Medium desktop breakpoint */
@media (max-width: 1200px) and (min-width: 1025px) {
.search-input-container {
max-width: 350px; /* Slightly reduced for medium screens */
}
.table-responsive-container {
overflow-x: auto;
min-width: 0; /* Allow container to shrink */
width: 100%;
}
.main-table-container th,
.main-table-container td {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
/* Ensure horizontal scrolling for all screen sizes below 1200px */
@media (max-width: 1199px) {
.table-responsive-container {
overflow-x: auto !important;
min-width: 0 !important;
width: 100% !important;
}
.main-table-container {
min-width: 1200px !important;
width: 1200px !important;
}
}