vs-datatable 1.0.0 → 1.1.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.
@@ -1,1089 +0,0 @@
1
- /* ===========================================
2
- VsDataTable - Base Styles (Library Independent)
3
- =========================================== */
4
-
5
- /* CSS Custom Properties for Easy Customization */
6
- :root {
7
- /* Colors */
8
- --vs-primary: #007bff;
9
- --vs-secondary: #6c757d;
10
- --vs-success: #28a745;
11
- --vs-danger: #dc3545;
12
- --vs-warning: #ffc107;
13
- --vs-info: #17a2b8;
14
- --vs-light: #f8f9fa;
15
- --vs-dark: #343a40;
16
- --vs-gray-800: #495057;
17
-
18
- /* Table Colors */
19
- --vs-table-bg: #ffffff;
20
- --vs-table-border: #dee2e6;
21
- --vs-table-header-bg: #f8f9fa;
22
- --vs-table-header-color: #495057;
23
- --vs-table-hover-bg: #f5f5f5;
24
- --vs-table-stripe-bg: #fafafa;
25
-
26
- /* Typography */
27
- --vs-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
28
- sans-serif;
29
- --vs-font-size: 14px;
30
- --vs-font-size-sm: 12px;
31
- --vs-font-size-lg: 16px;
32
- --vs-font-weight-normal: 400;
33
- --vs-font-weight-bold: 600;
34
-
35
- /* Spacing */
36
- --vs-spacing-xs: 4px;
37
- --vs-spacing-sm: 8px;
38
- --vs-spacing-md: 16px;
39
- --vs-spacing-lg: 24px;
40
- --vs-spacing-xl: 32px;
41
-
42
- /* Border Radius */
43
- --vs-border-radius: 4px;
44
- --vs-border-radius-sm: 2px;
45
- --vs-border-radius-lg: 8px;
46
-
47
- /* Shadows */
48
- --vs-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
49
- --vs-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
50
- --vs-shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);
51
-
52
- /* Transitions */
53
- --vs-transition: all 0.2s ease-in-out;
54
- --vs-transition-fast: all 0.15s ease-in-out;
55
-
56
- /* Z-index */
57
- --vs-z-dropdown: 1000;
58
- --vs-z-sticky: 1020;
59
- --vs-z-fixed: 1030;
60
- --vs-z-modal: 1040;
61
- --vs-z-popover: 1050;
62
- --vs-z-tooltip: 1060;
63
- }
64
-
65
- /* ===========================================
66
- VsDataTable - Utility Classes (SCSS Generated)
67
- =========================================== */
68
-
69
- // Spacing scale map
70
- $spacing-scale: (
71
- xs: var(--vs-spacing-xs),
72
- sm: var(--vs-spacing-sm),
73
- md: var(--vs-spacing-md),
74
- lg: var(--vs-spacing-lg),
75
- xl: var(--vs-spacing-xl)
76
- );
77
-
78
- // Legacy number mapping (for classes like vs-m-2)
79
- $legacy-spacing: (
80
- 2: var(--vs-spacing-sm),
81
- 5: var(--vs-spacing-lg)
82
- );
83
-
84
- // Color map
85
- $colors: (
86
- primary: var(--vs-primary),
87
- secondary: var(--vs-secondary),
88
- success: var(--vs-success),
89
- danger: var(--vs-danger),
90
- warning: var(--vs-warning),
91
- info: var(--vs-info),
92
- light: var(--vs-light),
93
- dark: var(--vs-dark)
94
- );
95
-
96
- // Mixin to generate spacing utilities
97
- @mixin generate-spacing-utilities($property, $prefix, $directions: null) {
98
- @if $directions {
99
- @each $dir-key, $dir-property in $directions {
100
- @each $size, $value in $spacing-scale {
101
- @if $dir-key == 'x' {
102
- .#{$prefix}#{$dir-key}-#{$size} {
103
- #{$property}-left: $value !important;
104
- #{$property}-right: $value !important;
105
- }
106
- } @else if $dir-key == 'y' {
107
- .#{$prefix}#{$dir-key}-#{$size} {
108
- #{$property}-top: $value !important;
109
- #{$property}-bottom: $value !important;
110
- }
111
- } @else {
112
- .#{$prefix}#{$dir-key}-#{$size} {
113
- #{$dir-property}: $value !important;
114
- }
115
- }
116
- }
117
- }
118
- } @else {
119
- @each $size, $value in $spacing-scale {
120
- .#{$prefix}-#{$size} {
121
- #{$property}: $value !important;
122
- }
123
- }
124
- }
125
- }
126
-
127
- // Mixin to generate legacy spacing utilities
128
- @mixin generate-legacy-spacing($property, $prefix, $directions: null) {
129
- @if $directions {
130
- @each $dir-key, $dir-property in $directions {
131
- @each $number, $value in $legacy-spacing {
132
- .#{$prefix}#{$dir-key}-#{$number} {
133
- #{$dir-property}: $value !important;
134
- }
135
- }
136
- }
137
- } @else {
138
- @each $number, $value in $legacy-spacing {
139
- .#{$prefix}-#{$number} {
140
- #{$property}: $value !important;
141
- }
142
- }
143
- }
144
- }
145
-
146
- // Mixin to generate color utilities
147
- @mixin generate-color-utilities($property, $prefix) {
148
- @each $color, $value in $colors {
149
- .#{$prefix}-#{$color} {
150
- #{$property}: $value !important;
151
- }
152
- }
153
- }
154
-
155
- // Generate Margin Utilities
156
- @include generate-spacing-utilities(margin, 'vs-m');
157
- @include generate-spacing-utilities(margin, 'vs-m', (
158
- 't': margin-top,
159
- 'b': margin-bottom,
160
- 'l': margin-left,
161
- 'r': margin-right
162
- ));
163
-
164
- // Generate Directional Margin Utilities
165
- @include generate-spacing-utilities(margin, 'vs-m', (
166
- 'x': (margin-left, margin-right),
167
- 'y': (margin-top, margin-bottom)
168
- ));
169
-
170
- // Generate Padding Utilities
171
- @include generate-spacing-utilities(padding, 'vs-p');
172
- @include generate-spacing-utilities(padding, 'vs-p', (
173
- 't': padding-top,
174
- 'b': padding-bottom,
175
- 'l': padding-left,
176
- 'r': padding-right
177
- ));
178
-
179
- // Generate Directional Padding Utilities
180
- @include generate-spacing-utilities(padding, 'vs-p', (
181
- 'x': (padding-left, padding-right),
182
- 'y': (padding-top, padding-bottom)
183
- ));
184
-
185
- // Generate Legacy Spacing Utilities (as requested)
186
- @include generate-legacy-spacing(margin, 'vs-m');
187
- @include generate-legacy-spacing(margin, 'vs-m', (
188
- 'l': margin-left,
189
- 'b': margin-bottom
190
- ));
191
- @include generate-legacy-spacing(margin, 'vs-m', (
192
- 'x': (margin-left, margin-right)
193
- ));
194
- @include generate-legacy-spacing(padding, 'vs-p', (
195
- '': padding
196
- ));
197
-
198
- // Auto margin utilities
199
- .vs-mx-auto {
200
- margin-left: auto !important;
201
- margin-right: auto !important;
202
- }
203
-
204
- .vs-my-auto {
205
- margin-top: auto !important;
206
- margin-bottom: auto !important;
207
- }
208
-
209
- .vs-ml-auto { margin-left: auto !important; }
210
- .vs-mr-auto { margin-right: auto !important; }
211
- .vs-mt-auto { margin-top: auto !important; }
212
- .vs-mb-auto { margin-bottom: auto !important; }
213
-
214
- // Typography Utilities
215
- $font-sizes: (
216
- xs: var(--vs-font-size-sm),
217
- sm: var(--vs-font-size-sm),
218
- base: var(--vs-font-size),
219
- lg: var(--vs-font-size-lg),
220
- xl: var(--vs-font-size-lg)
221
- );
222
-
223
- @each $size, $value in $font-sizes {
224
- .vs-text-#{$size} {
225
- font-size: $value !important;
226
- }
227
- }
228
-
229
- .vs-font-normal { font-weight: var(--vs-font-weight-normal) !important; }
230
- .vs-font-bold { font-weight: var(--vs-font-weight-bold) !important; }
231
-
232
- .vs-text-left { text-align: left !important; }
233
- .vs-text-center { text-align: center !important; }
234
- .vs-text-right { text-align: right !important; }
235
-
236
- .vs-uppercase { text-transform: uppercase !important; }
237
- .vs-lowercase { text-transform: lowercase !important; }
238
- .vs-capitalize { text-transform: capitalize !important; }
239
-
240
- // Color Utilities
241
- @include generate-color-utilities(color, 'vs-text');
242
- @include generate-color-utilities(background-color, 'vs-bg');
243
-
244
- // Display Utilities
245
- $displays: none, inline, inline-block, block, flex, inline-flex, grid, table;
246
-
247
- @each $display in $displays {
248
- .vs-d-#{$display} {
249
- display: #{$display} !important;
250
- }
251
- }
252
-
253
- // Flexbox Utilities
254
- .vs-flex-row { flex-direction: row !important; }
255
- .vs-flex-row-reverse { flex-direction: row-reverse !important; }
256
- .vs-flex-column { flex-direction: column !important; }
257
- .vs-flex-column-reverse { flex-direction: column-reverse !important; }
258
-
259
- $justify: (
260
- start: flex-start,
261
- end: flex-end,
262
- center: center,
263
- between: space-between,
264
- around: space-around
265
- );
266
-
267
- @each $key, $value in $justify {
268
- .vs-justify-#{$key} {
269
- justify-content: #{$value} !important;
270
- }
271
- }
272
-
273
- $align: (
274
- start: flex-start,
275
- end: flex-end,
276
- center: center,
277
- baseline: baseline,
278
- stretch: stretch
279
- );
280
-
281
- @each $key, $value in $align {
282
- .vs-align-#{$key} {
283
- align-items: #{$value} !important;
284
- }
285
- }
286
-
287
- .vs-flex-wrap { flex-wrap: wrap !important; }
288
- .vs-flex-nowrap { flex-wrap: nowrap !important; }
289
- .vs-flex-wrap-reverse { flex-wrap: wrap-reverse !important; }
290
-
291
- .vs-flex-1 { flex: 1 1 0% !important; }
292
- .vs-flex-auto { flex: 1 1 auto !important; }
293
- .vs-flex-none { flex: none !important; }
294
-
295
- // Border Radius Utilities
296
- $border-radius: (
297
- sm: var(--vs-border-radius-sm),
298
- rounded: var(--vs-border-radius),
299
- lg: var(--vs-border-radius-lg),
300
- full: 50%
301
- );
302
-
303
- @each $key, $value in $border-radius {
304
- .vs-rounded-#{$key} {
305
- border-radius: #{$value} !important;
306
- }
307
- }
308
-
309
- // Directional border radius
310
- .vs-rounded-top {
311
- border-top-left-radius: var(--vs-border-radius) !important;
312
- border-top-right-radius: var(--vs-border-radius) !important;
313
- }
314
- .vs-rounded-bottom {
315
- border-bottom-left-radius: var(--vs-border-radius) !important;
316
- border-bottom-right-radius: var(--vs-border-radius) !important;
317
- }
318
- .vs-rounded-left {
319
- border-top-left-radius: var(--vs-border-radius) !important;
320
- border-bottom-left-radius: var(--vs-border-radius) !important;
321
- }
322
- .vs-rounded-right {
323
- border-top-right-radius: var(--vs-border-radius) !important;
324
- border-bottom-right-radius: var(--vs-border-radius) !important;
325
- }
326
-
327
- // Shadow Utilities
328
- $shadows: (
329
- none: none,
330
- sm: var(--vs-shadow-sm),
331
- shadow: var(--vs-shadow),
332
- lg: var(--vs-shadow-lg)
333
- );
334
-
335
- @each $key, $value in $shadows {
336
- .vs-shadow-#{$key} {
337
- box-shadow: #{$value} !important;
338
- }
339
- }
340
-
341
- // Position Utilities
342
- $positions: static, relative, absolute, fixed, sticky;
343
-
344
- @each $position in $positions {
345
- .vs-position-#{$position} {
346
- position: #{$position} !important;
347
- }
348
- }
349
-
350
- // Overflow Utilities
351
- $overflows: auto, hidden, visible, scroll;
352
-
353
- @each $overflow in $overflows {
354
- .vs-overflow-#{$overflow} {
355
- overflow: #{$overflow} !important;
356
- }
357
- }
358
-
359
- // Width & Height Utilities
360
- .vs-w-auto { width: auto !important; }
361
- .vs-w-full { width: 100% !important; }
362
- .vs-w-screen { width: 100vw !important; }
363
- .vs-w-50 { width: 50% !important; }
364
- .vs-w-100 { width: 100% !important; }
365
-
366
- .vs-h-auto { height: auto !important; }
367
- .vs-h-full { height: 100% !important; }
368
- .vs-h-screen { height: 100vh !important; }
369
- .vs-h-50 { height: 50% !important; }
370
- .vs-h-100 { height: 100% !important; }
371
-
372
- // Visibility Utilities
373
- .vs-visible { visibility: visible !important; }
374
- .vs-invisible { visibility: hidden !important; }
375
-
376
- // Cursor Utilities
377
- $cursors: auto, pointer, default, not-allowed;
378
-
379
- @each $cursor in $cursors {
380
- .vs-cursor-#{$cursor} {
381
- cursor: #{$cursor} !important;
382
- }
383
- }
384
-
385
- // Border Utilities
386
- .vs-border { border: 1px solid var(--vs-table-border) !important; }
387
- .vs-border-top { border-top: 1px solid var(--vs-table-border) !important; }
388
- .vs-border-bottom { border-bottom: 1px solid var(--vs-table-border) !important; }
389
- .vs-border-left { border-left: 1px solid var(--vs-table-border) !important; }
390
- .vs-border-right { border-right: 1px solid var(--vs-table-border) !important; }
391
-
392
- // Z-index Utilities
393
- $z-indices: (
394
- dropdown: var(--vs-z-dropdown),
395
- sticky: var(--vs-z-sticky),
396
- fixed: var(--vs-z-fixed),
397
- modal: var(--vs-z-modal),
398
- popover: var(--vs-z-popover),
399
- tooltip: var(--vs-z-tooltip)
400
- );
401
-
402
- @each $key, $value in $z-indices {
403
- .vs-z-#{$key} {
404
- z-index: #{$value} !important;
405
- }
406
- }
407
-
408
- // inline-block-level
409
- .vs-d-inline {
410
- display: inline !important;
411
- }
412
-
413
- .vs-d-block {
414
- display: block !important;
415
- }
416
-
417
- .vs-d-inline-block {
418
- display: inline-block !important;
419
- }
420
-
421
- .vs-d-flex {
422
- display: flex !important;
423
- }
424
-
425
- // Transition Utilities
426
- .vs-transition { transition: var(--vs-transition) !important; }
427
- .vs-transition-fast { transition: var(--vs-transition-fast) !important; }
428
- .vs-transition-none { transition: none !important; }
429
-
430
- /* Reset and Base Styles */
431
- .vs-datatable {
432
- font-family: var(--vs-font-family);
433
- font-size: var(--vs-font-size);
434
- line-height: 1.5;
435
- color: var(--vs-dark);
436
- background-color: var(--vs-table-bg);
437
- box-sizing: border-box;
438
-
439
- *,
440
- *::before,
441
- *::after {
442
- box-sizing: border-box;
443
- }
444
- }
445
-
446
- /* Table Container */
447
- .vs-table-container {
448
- position: relative;
449
- background-color: var(--vs-table-bg);
450
- border: 1px solid var(--vs-table-border);
451
- border-radius: var(--vs-border-radius);
452
- overflow: hidden;
453
- box-shadow: var(--vs-shadow-sm);
454
- }
455
-
456
- /* Table Styles */
457
- .vs-table {
458
- width: 100%;
459
- margin: 0;
460
- border-collapse: separate;
461
- border-spacing: 0;
462
- background-color: var(--vs-table-bg);
463
-
464
- thead {
465
- background-color: var(--vs-table-header-bg);
466
-
467
- th {
468
- padding: var(--vs-spacing-md);
469
- font-weight: var(--vs-font-weight-bold);
470
- color: var(--vs-table-header-color);
471
- text-align: left;
472
- vertical-align: middle;
473
- border-bottom: 2px solid var(--vs-table-border);
474
- position: relative;
475
- user-select: none;
476
-
477
- &:first-child {
478
- border-top-left-radius: var(--vs-border-radius);
479
- }
480
-
481
- &:last-child {
482
- border-top-right-radius: var(--vs-border-radius);
483
- }
484
- }
485
- }
486
-
487
- tbody {
488
- tr {
489
- transition: var(--vs-transition-fast);
490
- border-bottom: 1px solid var(--vs-table-border);
491
-
492
- &:hover {
493
- background-color: var(--vs-table-hover-bg);
494
- }
495
-
496
- &:nth-child(even) {
497
- background-color: var(--vs-table-stripe-bg);
498
- }
499
-
500
- &:last-child {
501
- border-bottom: none;
502
- }
503
-
504
- td {
505
- padding: var(--vs-spacing-md);
506
- vertical-align: middle;
507
- border-right: 1px solid var(--vs-table-border);
508
-
509
- &:last-child {
510
- border-right: none;
511
- }
512
- }
513
- }
514
- }
515
- }
516
-
517
- /* Sortable Headers */
518
- .vs-sortable {
519
- cursor: pointer;
520
- position: relative;
521
-
522
- &:hover {
523
- background-color: rgba(var(--vs-primary), 0.1);
524
- }
525
-
526
- .vs-sort-icons {
527
- display: inline-flex;
528
- flex-direction: column;
529
- margin-left: var(--vs-spacing-sm);
530
- vertical-align: middle;
531
-
532
- .vs-sort-icon {
533
- font-size: 10px;
534
- line-height: 1;
535
- color: var(--vs-secondary);
536
- transition: var(--vs-transition-fast);
537
- margin: -8px 0;
538
-
539
- &.vs-sort-asc,
540
- &.vs-sort-desc {
541
- color: var(--vs-primary);
542
- }
543
- }
544
-
545
- .vs-sort-icon svg {
546
- fill: #e3e3e3; // default color
547
- }
548
-
549
- .vs-sort-icon.vs-active svg {
550
- fill: currentColor; // use inherited text color when active
551
- }
552
- }
553
-
554
- .vs-sort-priority {
555
- display: inline-block;
556
- background-color: var(--vs-primary);
557
- color: white;
558
- font-size: 10px;
559
- padding: 2px 6px;
560
- border-radius: var(--vs-border-radius-sm);
561
- margin-left: var(--vs-spacing-sm);
562
- font-weight: var(--vs-font-weight-bold);
563
- }
564
- }
565
-
566
- /* Loading State */
567
- .vs-loading {
568
- display: flex;
569
- align-items: center;
570
- justify-content: center;
571
- padding: var(--vs-spacing-xl);
572
- color: var(--vs-secondary);
573
-
574
- .vs-spinner {
575
- width: 20px;
576
- height: 20px;
577
- border: 2px solid var(--vs-table-border);
578
- border-top: 2px solid var(--vs-primary);
579
- border-radius: 50%;
580
- animation: vs-spin 1s linear infinite;
581
- margin-right: var(--vs-spacing-sm);
582
- }
583
- }
584
-
585
- @keyframes vs-spin {
586
- 0% {
587
- transform: rotate(0deg);
588
- }
589
- 100% {
590
- transform: rotate(360deg);
591
- }
592
- }
593
-
594
- /* No Data State */
595
- .vs-no-data {
596
- text-align: center;
597
- padding: var(--vs-spacing-xl);
598
- color: var(--vs-secondary);
599
-
600
- .vs-no-data-icon {
601
- width: 60px;
602
- height: 60px;
603
- margin: 0 auto var(--vs-spacing-md);
604
- opacity: 0.5;
605
- }
606
-
607
- .vs-no-data-message {
608
- font-size: var(--vs-font-size-lg);
609
- font-weight: var(--vs-font-weight-bold);
610
- margin-bottom: var(--vs-spacing-sm);
611
- }
612
-
613
- .vs-no-data-description {
614
- font-size: var(--vs-font-size-sm);
615
- color: var(--vs-secondary);
616
- }
617
- }
618
-
619
- /* Search Component */
620
- .vs-search {
621
- position: relative;
622
- margin-bottom: var(--vs-spacing-md);
623
-
624
- .vs-search-input {
625
- width: 100%;
626
- padding: var(--vs-spacing-sm) var(--vs-spacing-md);
627
- padding-left: 50px;
628
- border: 1px solid var(--vs-table-border);
629
- border-radius: var(--vs-border-radius);
630
- font-size: var(--vs-font-size);
631
- transition: var(--vs-transition-fast);
632
-
633
- &:focus {
634
- outline: none;
635
- border-color: var(--vs-primary);
636
- box-shadow: 0 0 0 2px rgba(var(--vs-primary), 0.25);
637
- }
638
- }
639
-
640
- .vs-search-icon {
641
- position: absolute;
642
- left: var(--vs-spacing-md);
643
- top: 50%;
644
- transform: translateY(-50%);
645
- color: var(--vs-secondary);
646
- pointer-events: none;
647
- }
648
- }
649
-
650
- /* Pagination */
651
- .vs-pagination {
652
- display: flex;
653
- align-items: center;
654
- justify-content: center;
655
- gap: var(--vs-spacing-sm);
656
- margin-top: var(--vs-spacing-md);
657
-
658
- .vs-pagination-button {
659
- display: inline-flex;
660
- align-items: center;
661
- justify-content: center;
662
- min-width: 32px;
663
- height: 32px;
664
- padding: 0 var(--vs-spacing-sm);
665
- border: 1px solid var(--vs-table-border);
666
- background-color: var(--vs-table-bg);
667
- color: var(--vs-dark);
668
- text-decoration: none;
669
- border-radius: var(--vs-border-radius);
670
- font-size: var(--vs-font-size-sm);
671
- transition: var(--vs-transition-fast);
672
- cursor: pointer;
673
-
674
- &:hover:not(:disabled) {
675
- background-color: var(--vs-table-hover-bg);
676
- border-color: var(--vs-primary);
677
- }
678
-
679
- &.vs-active {
680
- background-color: var(--vs-primary);
681
- border-color: var(--vs-primary);
682
- color: white;
683
- }
684
-
685
- &:disabled {
686
- opacity: 0.5;
687
- cursor: not-allowed;
688
- }
689
- }
690
-
691
- .vs-pagination-ellipsis {
692
- color: var(--vs-secondary);
693
- padding: 0 var(--vs-spacing-sm);
694
- }
695
- }
696
-
697
- .vs-layout-row {
698
- display: flex;
699
- justify-content: space-between;
700
- align-items: center;
701
- flex-wrap: wrap;
702
- width: 100%;
703
- gap: 1rem;
704
-
705
- .vs-layout-start,
706
- .vs-layout-end {
707
- display: flex;
708
- align-items: center;
709
- gap: 0.5rem;
710
- }
711
- }
712
-
713
- /* On small screens (e.g. < 768px) stack vertically */
714
- @media (max-width: 768px) {
715
- .vs-layout-row {
716
- flex-direction: column;
717
- align-items: stretch;
718
-
719
- .vs-layout-start,
720
- .vs-layout-end {
721
- justify-content: flex-start;
722
- width: 100%;
723
- }
724
- }
725
- }
726
-
727
- .export-dropdown {
728
- position: relative;
729
- display: inline-block;
730
- }
731
-
732
- .export-btn {
733
- background: #2d6cdf;
734
- color: white;
735
- border: none;
736
- padding: 0.5rem 1rem;
737
- border-radius: 6px;
738
- cursor: pointer;
739
- font-size: 14px;
740
- }
741
-
742
- .export-menu {
743
- display: none; /* hidden by default */
744
- position: absolute;
745
- right: 0;
746
- margin-top: 0.25rem;
747
- background: white;
748
- border: 1px solid #ddd;
749
- border-radius: 6px;
750
- list-style: none;
751
- padding: 0;
752
- min-width: 160px;
753
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
754
- z-index: 1;
755
-
756
- flex-direction: column; /* stacked layout */
757
- }
758
-
759
- .export-menu li {
760
- width: 100%;
761
- }
762
-
763
- .export-menu button {
764
- background: none;
765
- border: none;
766
- width: 100%;
767
- padding: 0.75rem 1rem;
768
- text-align: left;
769
- cursor: pointer;
770
- font-size: 14px;
771
- }
772
-
773
- .export-menu button:hover {
774
- background: #f5f5f5;
775
- }
776
-
777
- /* Show dropdown when .active is toggled */
778
- .export-menu.active {
779
- display: flex;
780
- }
781
-
782
- /* Row Selection */
783
- .vs-checkbox {
784
- display: inline-flex;
785
- align-items: center;
786
- cursor: pointer;
787
-
788
- input[type='checkbox'] {
789
- width: 16px;
790
- height: 16px;
791
- margin: 0;
792
- cursor: pointer;
793
- accent-color: var(--vs-primary);
794
- }
795
-
796
- label {
797
- margin: 0;
798
- cursor: pointer;
799
- font-size: var(--vs-font-size-sm);
800
- }
801
- }
802
-
803
- .vs-footer-left {
804
- display: flex;
805
- align-items: center;
806
- gap: 12px; /* spacing between items */
807
- }
808
-
809
- .vs-divider {
810
- width: 1px;
811
- height: 20px;
812
- background-color: #ccc; /* light gray divider */
813
- }
814
-
815
- .vs-rows-per-page {
816
- display: flex;
817
- align-items: center;
818
- gap: 8px;
819
- font-size: 14px;
820
- color: #495057;
821
- }
822
-
823
- .vs-items-dropdown {
824
- padding: 6px 8px;
825
- border: 1px solid #ddd;
826
- border-radius: 4px;
827
- background-color: white;
828
- font-size: 14px;
829
- }
830
-
831
- /* Extended Row Design */
832
- .vs-expand-column {
833
- width: 40px;
834
- text-align: center;
835
- }
836
-
837
- .vs-expand-btn {
838
- background: transparent;
839
- border: none;
840
- cursor: pointer;
841
- font-size: 1.1rem;
842
- }
843
-
844
- .vs-row-expanded {
845
- background: #f9f9f9;
846
- }
847
-
848
- /* Extended Row Loader */
849
- .vs-table tbody tr.vs-row-expanded td.vs-expanded-cell {
850
- padding: 0 !important;
851
- vertical-align: top !important;
852
- border-right: none;
853
- }
854
-
855
- .vs-expanded-content {
856
- padding: var(--vs-spacing-md);
857
- background-color: #ededed;
858
- }
859
-
860
- .vs-loader-bar {
861
- width: 100%;
862
- height: 4px;
863
- background: #e5e7eb;
864
- overflow: hidden;
865
- position: relative;
866
- border-radius: 2px;
867
- top: 0; /* lock to td top */
868
- left: 0;
869
- margin: 0;
870
- }
871
-
872
- .vs-loader-bar-inner {
873
- width: 40%;
874
- height: 100%;
875
- background: var(--vs-primary);
876
- position: absolute;
877
- left: -40%;
878
- animation: loader-slide 1.2s infinite linear;
879
- border-radius: 2px;
880
- }
881
-
882
- @keyframes loader-slide {
883
- 0% {
884
- left: -40%;
885
- }
886
- 50% {
887
- left: 60%;
888
- }
889
- 100% {
890
- left: 100%;
891
- }
892
- }
893
-
894
- /* Column Filter Design */
895
- .vs-filter-dropdown {
896
- background: #fff;
897
- border: 1px solid #ddd;
898
- padding: 0.75rem;
899
- border-radius: 6px;
900
- box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
901
- min-width: 200px;
902
- }
903
- .vs-filter-actions {
904
- display: flex;
905
- justify-content: flex-end;
906
- gap: 0.5rem;
907
- margin-top: 0.75rem;
908
- }
909
- .vs-input {
910
- padding: 0.35rem 0.5rem;
911
- border: 1px solid #ccc;
912
- border-radius: 4px;
913
- }
914
- .vs-operator-select {
915
- padding: 0.35rem 0.5rem;
916
- border: 1px solid #ccc;
917
- border-radius: 4px;
918
- gap: 0.55rem;
919
- }
920
- .vs-btn {
921
- padding: 0.35rem 0.75rem;
922
- border-radius: 4px;
923
- cursor: pointer;
924
- }
925
- .vs-btn-primary {
926
- background: #2d6cdf;
927
- color: #fff;
928
- border: none;
929
- }
930
- .vs-btn-secondary {
931
- background: #f5f5f5;
932
- border: 1px solid #ccc;
933
- }
934
- // .vs-filter-range,
935
- // .vs-filter-date {
936
- // display: flex;
937
- // gap: 0.5rem;
938
- // align-items: center;
939
- // }
940
-
941
- .vs-column-filter {
942
- display: inline-flex;
943
- align-items: center;
944
- justify-content: center;
945
- width: 28px;
946
- height: 28px;
947
- border-radius: 6px;
948
- cursor: pointer;
949
- }
950
- .vs-column-filter.is-active {
951
- background-color: rgba(41, 128, 185, 0.06);
952
- color: var(--vs-primary, #2d6cdf);
953
- }
954
- .vs-header-content {
955
- display: flex;
956
- align-items: center;
957
- gap: 8px;
958
- }
959
-
960
- /* Responsive Design */
961
- @media (max-width: 768px) {
962
- .vs-table-container {
963
- overflow-x: auto;
964
- }
965
-
966
- .vs-table {
967
- min-width: 600px;
968
- }
969
-
970
- .vs-pagination {
971
- flex-wrap: wrap;
972
- gap: var(--vs-spacing-xs);
973
-
974
- .vs-pagination-button {
975
- min-width: 28px;
976
- height: 28px;
977
- font-size: 12px;
978
- }
979
- }
980
- }
981
-
982
- /* Utility Classes */
983
- .vs-text-center {
984
- text-align: center;
985
- }
986
- .vs-text-left {
987
- text-align: left;
988
- }
989
- .vs-text-right {
990
- text-align: right;
991
- }
992
- .vs-text-muted {
993
- color: var(--vs-secondary);
994
- }
995
- .vs-text-primary {
996
- color: var(--vs-primary);
997
- }
998
- .vs-text-success {
999
- color: var(--vs-success);
1000
- }
1001
- .vs-text-danger {
1002
- color: var(--vs-danger);
1003
- }
1004
- .vs-text-warning {
1005
- color: var(--vs-warning);
1006
- }
1007
-
1008
- .vs-bg-primary {
1009
- background-color: var(--vs-primary);
1010
- }
1011
- .vs-bg-success {
1012
- background-color: var(--vs-success);
1013
- }
1014
- .vs-bg-danger {
1015
- background-color: var(--vs-danger);
1016
- }
1017
- .vs-bg-warning {
1018
- background-color: var(--vs-warning);
1019
- }
1020
- .vs-bg-light {
1021
- background-color: var(--vs-light);
1022
- }
1023
-
1024
- .vs-border {
1025
- border: 1px solid var(--vs-table-border);
1026
- }
1027
- .vs-border-top {
1028
- border-top: 1px solid var(--vs-table-border);
1029
- }
1030
- .vs-border-bottom {
1031
- border-bottom: 1px solid var(--vs-table-border);
1032
- }
1033
- .vs-border-left {
1034
- border-left: 1px solid var(--vs-table-border);
1035
- }
1036
- .vs-border-right {
1037
- border-right: 1px solid var(--vs-table-border);
1038
- }
1039
-
1040
- .vs-rounded {
1041
- border-radius: var(--vs-border-radius);
1042
- }
1043
- .vs-rounded-sm {
1044
- border-radius: var(--vs-border-radius-sm);
1045
- }
1046
- .vs-rounded-lg {
1047
- border-radius: var(--vs-border-radius-lg);
1048
- }
1049
-
1050
- .vs-shadow {
1051
- box-shadow: var(--vs-shadow);
1052
- }
1053
- .vs-shadow-sm {
1054
- box-shadow: var(--vs-shadow-sm);
1055
- }
1056
- .vs-shadow-lg {
1057
- box-shadow: var(--vs-shadow-lg);
1058
- }
1059
-
1060
- /* Animation Classes */
1061
- .vs-fade-in {
1062
- animation: vs-fade-in 0.3s ease-in-out;
1063
- }
1064
-
1065
- @keyframes vs-fade-in {
1066
- from {
1067
- opacity: 0;
1068
- transform: translateY(-10px);
1069
- }
1070
- to {
1071
- opacity: 1;
1072
- transform: translateY(0);
1073
- }
1074
- }
1075
-
1076
- .vs-slide-in {
1077
- animation: vs-slide-in 0.3s ease-in-out;
1078
- }
1079
-
1080
- @keyframes vs-slide-in {
1081
- from {
1082
- transform: translateX(-20px);
1083
- opacity: 0;
1084
- }
1085
- to {
1086
- transform: translateX(0);
1087
- opacity: 1;
1088
- }
1089
- }