table.scss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. @use "sass:map";
  2. @use "src/css/quasar.variables.scss";
  3. // ─── Tabela principal ─────────────────────────────────────────────────────────
  4. .softpar-table {
  5. background: $surface !important;
  6. border-radius: 8px !important;
  7. box-shadow: none !important;
  8. padding-left: 16px !important;
  9. padding-right: 16px !important;
  10. // Sem overflow hidden para não cortar bordas arredondadas das linhas
  11. .q-table__middle {
  12. overflow: visible;
  13. background: $surface;
  14. }
  15. // Espaçamento vertical entre linhas (necessário para o efeito de "linhas separadas")
  16. .q-table {
  17. border-collapse: separate !important;
  18. border-spacing: 0 5px !important;
  19. background: $surface;
  20. }
  21. // ── Cabeçalho ───────────────────────────────────────────────────────────────
  22. .q-table thead tr th {
  23. background-color: $surface !important;
  24. color: $violet-normal;
  25. text-transform: uppercase;
  26. font-family: "Roboto", sans-serif;
  27. font-weight: 600;
  28. font-size: 13px;
  29. line-height: 16px;
  30. letter-spacing: 0.1px;
  31. position: sticky;
  32. z-index: 1;
  33. top: 0;
  34. border-top: 1.5px solid $violet-normal !important;
  35. border-bottom: 1.5px solid $violet-normal !important;
  36. border-left: none !important;
  37. border-right: none !important;
  38. }
  39. .q-table thead tr th:first-child {
  40. border-left: 1.5px solid $violet-normal !important;
  41. border-radius: 8px 0 0 8px;
  42. }
  43. .q-table thead tr th:last-child {
  44. border-right: 1.5px solid $violet-normal !important;
  45. border-radius: 0 8px 8px 0;
  46. }
  47. // Ajuste de sticky quando a barra de loading aparece
  48. .q-table.q-table--loading thead tr:last-child th {
  49. top: 48px;
  50. }
  51. // ── Linhas do body ───────────────────────────────────────────────────────────
  52. .q-table tbody tr td {
  53. background-color: $surface !important;
  54. border-top: 1.5px solid $violet-normal !important;
  55. border-bottom: 1.5px solid $violet-normal !important;
  56. border-left: none !important;
  57. border-right: none !important;
  58. }
  59. .q-table tbody tr td:first-child {
  60. border-left: 1.5px solid $violet-normal !important;
  61. border-radius: 8px 0 0 8px;
  62. }
  63. .q-table tbody tr td:last-child {
  64. border-right: 1.5px solid $violet-normal !important;
  65. border-radius: 0 8px 8px 0;
  66. }
  67. .q-table tbody tr:hover td {
  68. background-color: $violet-light !important;
  69. }
  70. // ── Topo e rodapé (search + paginação) ──────────────────────────────────────
  71. .q-table__top {
  72. padding: 16px 0;
  73. background: $surface;
  74. }
  75. .q-table__bottom {
  76. border-top: none;
  77. background: $surface;
  78. }
  79. }
  80. // ─── Cards (modo grid / mobile) ───────────────────────────────────────────────
  81. .q-table__grid-item-card {
  82. background: $surface;
  83. }
  84. // ─── Status badges (outlined) ─────────────────────────────────────────────────
  85. %badge-base {
  86. display: flex;
  87. justify-content: center;
  88. padding: 3px 12px;
  89. border-radius: 24px;
  90. border: 1.5px solid;
  91. width: fit-content;
  92. margin: 0 auto;
  93. font-size: 0.75rem;
  94. font-weight: 600;
  95. background: transparent;
  96. }
  97. .ativo {
  98. @extend %badge-base;
  99. color: #{map.get($colors, "success-light")};
  100. border-color: #{map.get($colors, "success-light")};
  101. }
  102. .inativo {
  103. @extend %badge-base;
  104. color: #{map.get($colors, "error-light")};
  105. border-color: #{map.get($colors, "error-light")};
  106. }
  107. .rejeitado {
  108. @extend %badge-base;
  109. color: #{map.get($colors, "error-light")};
  110. border-color: #{map.get($colors, "error-light")};
  111. }
  112. .gerado {
  113. @extend %badge-base;
  114. color: #{map.get($colors, "info-light")};
  115. border-color: #{map.get($colors, "info-light")};
  116. }
  117. .pendente {
  118. @extend %badge-base;
  119. color: #ca8a04;
  120. border-color: #ca8a04;
  121. }