VDataTable.sass 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. @use '../../styles/settings'
  2. @use '../../styles/tools'
  3. @use '../../components/VTable/variables' as *
  4. @use './variables' as *
  5. @use '../VTable/variables' as VTable
  6. @include tools.layer('components')
  7. .v-data-table
  8. width: 100%
  9. .v-data-table__table
  10. width: 100%
  11. border-collapse: separate
  12. border-spacing: 0
  13. .v-data-table__tr
  14. &--focus
  15. border: 1px dotted black
  16. &--clickable
  17. cursor: pointer
  18. .v-data-table
  19. .v-table__wrapper
  20. > table
  21. > thead,
  22. tbody
  23. > tr
  24. > td,
  25. th
  26. &.v-data-table-column--align-end
  27. text-align: end
  28. .v-data-table-header__content
  29. flex-direction: row-reverse
  30. &.v-data-table-column--align-center
  31. text-align: center
  32. .v-data-table-header__content
  33. justify-content: center
  34. &.v-data-table-column--no-padding
  35. padding: 0 8px
  36. &.v-data-table-column--nowrap
  37. text-overflow: ellipsis
  38. text-wrap: nowrap
  39. overflow: hidden
  40. & .v-data-table-header__content
  41. display: contents
  42. > th
  43. align-items: center
  44. > th.v-data-table__th--fixed
  45. position: sticky
  46. > th.v-data-table__th--sortable:hover
  47. cursor: pointer
  48. color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity))
  49. > th:not(.v-data-table__th--sorted)
  50. .v-data-table-header__sort-icon
  51. opacity: 0
  52. &:hover
  53. .v-data-table-header__sort-icon
  54. opacity: 0.5
  55. &.v-data-table__tr--mobile
  56. > td
  57. height: fit-content
  58. .v-data-table-column--fixed,
  59. .v-data-table__th--sticky
  60. background: $table-background
  61. position: sticky !important
  62. left: 0
  63. z-index: 1
  64. .v-data-table-column--last-fixed
  65. border-right: 1px solid rgba(var(--v-border-color), var(--v-border-opacity))
  66. .v-data-table.v-table--fixed-header > .v-table__wrapper > table > thead > tr > th.v-data-table-column--fixed
  67. z-index: 2
  68. .v-data-table-group-header-row
  69. td
  70. background: rgba(var(--v-theme-surface))
  71. color: rgba(var(--v-theme-on-surface))
  72. > span
  73. padding-left: 5px
  74. .v-data-table--loading
  75. .v-data-table__td
  76. opacity: $data-table-loading-opacity
  77. .v-data-table-group-header-row__column
  78. padding-left: calc(var(--v-data-table-group-header-row-depth) * 16px) !important
  79. .v-data-table-header__content
  80. display: flex
  81. align-items: center
  82. .v-data-table-header__sort-badge
  83. display: inline-flex
  84. justify-content: center
  85. align-items: center
  86. font-size: 0.875rem
  87. padding: 4px
  88. border-radius: 50%
  89. background: $data-table-header-sort-badge-color
  90. min-width: $data-table-header-sort-badge-size
  91. min-height: $data-table-header-sort-badge-size
  92. width: $data-table-header-sort-badge-size
  93. height: $data-table-header-sort-badge-size
  94. .v-data-table-progress
  95. > th
  96. border: none !important
  97. height: auto !important
  98. padding: 0 !important
  99. .v-data-table-progress__loader
  100. position: relative
  101. .v-data-table-rows-loading,
  102. .v-data-table-rows-no-data
  103. text-align: center
  104. .v-data-table__tr--mobile
  105. > .v-data-table__td--expanded-row
  106. grid-template-columns: 0
  107. justify-content: center
  108. > .v-data-table__td--select-row
  109. grid-template-columns: 0
  110. justify-content: end
  111. > td
  112. align-items: center
  113. column-gap: 4px
  114. display: grid
  115. grid-template-columns: repeat(2, 1fr)
  116. min-height: var(--v-table-row-height)
  117. &:not(:last-child)
  118. border-bottom: 0 !important
  119. .v-data-table__td-title
  120. font-weight: VTable.$table-header-font-weight
  121. text-align: left
  122. .v-data-table__td-value
  123. text-align: right
  124. .v-data-table__td
  125. &-sort-icon
  126. color: $data-table-header-mobile-chip-icon-color
  127. &-active
  128. color: $data-table-header-mobile-chip-icon-color-active