@natec/mef-dev-ui-kit 20.1.16 → 20.1.18

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,4 +1,5 @@
1
1
  @use '../../vars.scss' as *;
2
+ @use '../../fonts.scss' as *;
2
3
  @use 'sass:color' as color;
3
4
 
4
5
  // MD Datatable Theme
@@ -324,6 +325,347 @@
324
325
  }
325
326
  }
326
327
 
328
+ // ═══════════════════════════════════════════════════════════════════════════
329
+ // MD Cards Grid Table Style
330
+ // Makes md-grid look like ngx-datatable
331
+ // ═══════════════════════════════════════════════════════════════════════════
332
+ //
333
+ // USAGE:
334
+ // <md-grid class="md-grid-table" ...>
335
+ // <md-grid class="md-grid-table zebra-white" ...>
336
+ // <md-grid class="md-grid-table zebra-grey" ...>
337
+ //
338
+ // ═══════════════════════════════════════════════════════════════════════════
339
+
340
+ .md-grid-table {
341
+ // ═════════════════════════════════════════════════════════════════════════
342
+ // HOST STYLES
343
+ // ═════════════════════════════════════════════════════════════════════════
344
+
345
+ &.md-grid,
346
+ .md-grid {
347
+ @extend .body-6;
348
+ background: tansparent;
349
+ border: none;
350
+ border-radius: 0;
351
+ box-shadow: none;
352
+ }
353
+
354
+ // ═════════════════════════════════════════════════════════════════════════
355
+ // HEADER
356
+ // ═════════════════════════════════════════════════════════════════════════
357
+
358
+ .md-grid-header {
359
+ background: $Light-Gray-2;
360
+ border: none;
361
+ box-shadow: none;
362
+ width: 100%;
363
+ min-width: fit-content;
364
+ }
365
+
366
+ .md-grid-header-inner {
367
+ padding: 0;
368
+ width: 100%;
369
+ min-width: fit-content;
370
+ }
371
+
372
+ .md-grid-header-cell {
373
+ padding: 13px 8px 10px 8px;
374
+ background: transparent;
375
+ font-family: $font-header;
376
+ font-size: 14px;
377
+ font-weight: 300;
378
+ text-transform: uppercase;
379
+ letter-spacing: 0.5px;
380
+ color: $Dark-Gray-2;
381
+ vertical-align: middle;
382
+
383
+ &:not(:first-child) {
384
+ border-left: 2px solid $White;
385
+ }
386
+
387
+ &.sortable {
388
+ cursor: pointer;
389
+ user-select: none;
390
+
391
+ &:hover {
392
+ background: transparent;
393
+ }
394
+ }
395
+
396
+ &.sort-active {
397
+ color: $Dark-Gray-2;
398
+ }
399
+ }
400
+
401
+ .md-grid-header-cell-label {
402
+ line-height: 1.2;
403
+ }
404
+
405
+ // ═════════════════════════════════════════════════════════════════════════
406
+ // SORT ICONS
407
+ // ═════════════════════════════════════════════════════════════════════════
408
+
409
+ .md-grid-sort-icon {
410
+ color: $Light-Gray-1;
411
+
412
+ &.md-grid-sort-asc,
413
+ &.md-grid-sort-desc {
414
+ color: $Dark-Gray-2;
415
+ }
416
+ }
417
+
418
+ // ═════════════════════════════════════════════════════════════════════════
419
+ // BODY
420
+ // ═════════════════════════════════════════════════════════════════════════
421
+
422
+ .md-grid-body {
423
+ padding: 0;
424
+ background: transparent;
425
+ gap: 0 !important;
426
+ width: 100%;
427
+ min-width: 100%;
428
+ }
429
+
430
+ .md-grid-group-rows {
431
+ gap: 0 !important;
432
+ width: 100%;
433
+ }
434
+
435
+ // ═════════════════════════════════════════════════════════════════════════
436
+ // CARD (ROW) - Table row style
437
+ // ═════════════════════════════════════════════════════════════════════════
438
+
439
+ .md-grid-card {
440
+ background: $White;
441
+ border: none;
442
+ border-radius: 0;
443
+ box-shadow: none;
444
+ width: 100%;
445
+ min-width: fit-content;
446
+
447
+ // Hover effect same as ngx-datatable
448
+ &:hover {
449
+ background: color.mix($Light-Gray-2, $White, 30%);
450
+ box-shadow: none;
451
+ transform: none;
452
+ }
453
+
454
+ // Active/selected row
455
+ &.md-grid-card-editing {
456
+ background: color.mix($Link, $White, 10%) !important;
457
+ border: none;
458
+ box-shadow: none;
459
+ }
460
+ }
461
+
462
+ // ═════════════════════════════════════════════════════════════════════════
463
+ // CELL
464
+ // ═════════════════════════════════════════════════════════════════════════
465
+
466
+ .md-grid-cell {
467
+ padding: 8px;
468
+ @extend .body-6;
469
+ color: $Black-Color;
470
+ background: transparent;
471
+ max-height: 30px;
472
+ border: none;
473
+ }
474
+
475
+ .md-grid-cell-value {
476
+ display: block;
477
+ width: 100%;
478
+ }
479
+
480
+ // ═════════════════════════════════════════════════════════════════════════
481
+ // ACTIONS CELL
482
+ // ═════════════════════════════════════════════════════════════════════════
483
+
484
+ .md-grid-actions-cell {
485
+ border-left: none;
486
+ background: transparent;
487
+ }
488
+
489
+ // ═════════════════════════════════════════════════════════════════════════
490
+ // FOOTER / PAGINATION
491
+ // ═════════════════════════════════════════════════════════════════════════
492
+
493
+ .md-grid-footer {
494
+ background: $Light-Gray-2;
495
+ border-top: 1px solid rgba(0, 0, 0, 0.08);
496
+ padding: 8px;
497
+ font-size: 12px;
498
+ color: $Dark-Gray-2;
499
+ }
500
+
501
+ .md-grid-pager {
502
+ gap: 2px;
503
+ }
504
+
505
+ .md-grid-pager-btn {
506
+ min-width: 24px;
507
+ height: 24px;
508
+ padding: 0 10px;
509
+ border-radius: 4px;
510
+ border: none;
511
+ background: transparent;
512
+ color: $Dark-Gray-2;
513
+ font-size: 12px;
514
+
515
+ &:hover:not(:disabled) {
516
+ background: transparent;
517
+ color: $Red;
518
+ }
519
+
520
+ &:disabled {
521
+ opacity: 0.3;
522
+ cursor: not-allowed;
523
+ }
524
+ }
525
+
526
+ .md-grid-pager-info {
527
+ padding: 0 8px;
528
+ font-weight: 400;
529
+ }
530
+
531
+ // ═════════════════════════════════════════════════════════════════════════
532
+ // GROUP HEADER
533
+ // ═════════════════════════════════════════════════════════════════════════
534
+
535
+ .md-grid-group-header {
536
+ background: color.mix($Light-Gray-2, $White, 50%);
537
+ border-bottom: 1px solid rgba(0, 0, 0, 0.08);
538
+ padding: 12px 20px;
539
+ margin-bottom: 0;
540
+ border-radius: 0;
541
+ font-weight: 600;
542
+ font-size: 13px;
543
+ color: $Dark-Gray-1;
544
+ }
545
+
546
+ // ═════════════════════════════════════════════════════════════════════════
547
+ // RESPONSIVE
548
+ // ═════════════════════════════════════════════════════════════════════════
549
+
550
+ @media (max-width: 768px) {
551
+ font-size: 12px;
552
+
553
+ .md-grid-header-cell {
554
+ padding: 10px 12px;
555
+ font-size: 10px;
556
+ }
557
+
558
+ .md-grid-cell {
559
+ padding: 12px;
560
+ font-size: 12px;
561
+ }
562
+
563
+ .md-grid-footer {
564
+ flex-direction: column;
565
+ gap: 8px;
566
+ align-items: flex-start;
567
+ padding: 8px 12px;
568
+ }
569
+ }
570
+ }
571
+
572
+ // ═════════════════════════════════════════════════════════════════════════
573
+ // Modifier: zebra-white (white header, zebra rows)
574
+ // ═════════════════════════════════════════════════════════════════════════
575
+
576
+ .md-grid-table.zebra-white {
577
+ .md-grid-header {
578
+ background: $White;
579
+ }
580
+
581
+ .md-grid-header-cell {
582
+ &:not(:first-child) {
583
+ border-left: 2px solid $Light-Gray-3;
584
+ }
585
+ }
586
+
587
+ .md-grid-card {
588
+ &:nth-child(odd) {
589
+ background: transparent;
590
+ }
591
+
592
+ &:nth-child(even) {
593
+ background: $White;
594
+ }
595
+
596
+ &:hover {
597
+ background: color.mix($Light-Gray-2, $White, 30%) !important;
598
+ }
599
+ }
600
+
601
+ .md-grid-group-rows {
602
+ .md-grid-card {
603
+ &:nth-child(odd) {
604
+ background: transparent;
605
+ }
606
+
607
+ &:nth-child(even) {
608
+ background: $White;
609
+ }
610
+
611
+ &:hover {
612
+ background: color.mix($Light-Gray-2, $White, 30%) !important;
613
+ }
614
+ }
615
+ }
616
+
617
+ .md-grid-footer {
618
+ background: $White;
619
+ }
620
+ }
621
+
622
+ // ═════════════════════════════════════════════════════════════════════════
623
+ // Modifier: zebra-grey (grey header, zebra with grey)
624
+ // Same as md-datatable-style.zebra-grey
625
+ // ═════════════════════════════════════════════════════════════════════════
626
+
627
+ .md-grid-table.zebra-grey {
628
+ .md-grid-card {
629
+ // White rows (odd)
630
+ &:nth-child(odd) {
631
+ background: $White;
632
+
633
+ &:hover {
634
+ background: color.mix($Light-Gray-2, $White, 30%) !important;
635
+ }
636
+ }
637
+
638
+ // Grey rows (even)
639
+ &:nth-child(even) {
640
+ background: $Light-Gray-2;
641
+
642
+ &:hover {
643
+ background: color.mix($Light-Gray-2, $White, 30%) !important;
644
+ }
645
+ }
646
+ }
647
+
648
+ .md-grid-group-rows {
649
+ .md-grid-card {
650
+ &:nth-child(odd) {
651
+ background: $White;
652
+
653
+ &:hover {
654
+ background: color.mix($Light-Gray-2, $White, 30%) !important;
655
+ }
656
+ }
657
+
658
+ &:nth-child(even) {
659
+ background: $Light-Gray-2;
660
+
661
+ &:hover {
662
+ background: color.mix($Light-Gray-2, $White, 30%) !important;
663
+ }
664
+ }
665
+ }
666
+ }
667
+ }
668
+
327
669
  // Dark background variant
328
670
  .bg-dark .md-datatable-style,
329
671
  .dark-mode .md-datatable-style,