|
1 |
| -@import '@/ui/assets/css/lib/table.css'; |
| 1 | +table.v-table { |
| 2 | + @apply w-full; |
| 3 | + margin-left: -1rem; |
| 4 | + margin-right: -1rem; |
| 5 | + width: calc(100% + 2rem); |
| 6 | +} |
| 7 | + |
| 8 | +@media (min-width: 768px) { |
| 9 | + table.v-table { |
| 10 | + margin-left: -2rem; |
| 11 | + margin-right: -2rem; |
| 12 | + width: calc(100% + 4rem); |
| 13 | + } |
| 14 | +} |
| 15 | + |
| 16 | +.v-table thead tr { |
| 17 | + @apply bg-transparent text-sm font-bold text-primary-600; |
| 18 | +} |
| 19 | + |
| 20 | +.v-table th { |
| 21 | + @apply font-bold; |
| 22 | + @apply px-4 py-4 text-left; |
| 23 | +} |
| 24 | + |
| 25 | +.v-table th[data-sortby] { |
| 26 | + white-space: nowrap; |
| 27 | + cursor: pointer; |
| 28 | + padding-right: 2em; |
| 29 | +} |
| 30 | + |
| 31 | +.v-table th[data-sortby]:after { |
| 32 | + content: '▼'; |
| 33 | + width: 1em; |
| 34 | + font-size: 0.675em; |
| 35 | + margin-left: 0.75em; |
| 36 | + margin-top: 0.15em; |
| 37 | + overflow: hidden; |
| 38 | + opacity: 0.2; |
| 39 | +} |
| 40 | + |
| 41 | +.v-table th[data-sortby]:hover:after { |
| 42 | + content: '▼'; |
| 43 | + opacity: 1; |
| 44 | +} |
| 45 | + |
| 46 | +.v-table th.sort.asc:after { |
| 47 | + content: '▼'; |
| 48 | + opacity: 1; |
| 49 | +} |
| 50 | + |
| 51 | +.v-table th.sort.desc:after { |
| 52 | + content: '▲'; |
| 53 | + opacity: 1; |
| 54 | +} |
| 55 | + |
| 56 | +.v-table td { |
| 57 | + @apply px-4 py-4 text-left; |
| 58 | +} |
2 | 59 |
|
3 |
| -.v-table { |
4 |
| - @apply mb-16; |
| 60 | +.v-table tbody td { |
5 | 61 | }
|
6 | 62 |
|
7 | 63 | .v-table.sticky-table-header th {
|
|
14 | 70 | @apply border-b border-primary-100;
|
15 | 71 | }
|
16 | 72 |
|
17 |
| -.v-table tbody tr { |
18 |
| - @apply border-b border-primary-100 bg-transparent even:bg-transparent; |
19 |
| -} |
20 |
| - |
21 | 73 | .v-table th:first-child,
|
22 | 74 | .v-table td:first-child {
|
23 |
| - @apply pl-0; |
| 75 | + @apply w-0 border-none pl-0 pr-4 md:pr-8; |
| 76 | +} |
| 77 | + |
| 78 | +.v-table td:first-child::before { |
| 79 | + @apply rounded-l-2xl; |
24 | 80 | }
|
25 | 81 |
|
26 | 82 | .v-table th:last-child,
|
27 | 83 | .v-table td:last-child {
|
| 84 | + @apply w-0 border-none pl-4 pr-0 md:pl-8; |
| 85 | +} |
| 86 | + |
| 87 | +.v-table th:nth-child(2), |
| 88 | +.v-table td:nth-child(2) { |
| 89 | + @apply pl-0; |
| 90 | +} |
| 91 | + |
| 92 | +.v-table th:nth-last-child(2), |
| 93 | +.v-table td:nth-last-child(2) { |
28 | 94 | @apply pr-0;
|
29 | 95 | }
|
30 | 96 |
|
31 |
| -.v-table thead tr, |
32 |
| -.v-table th { |
33 |
| - @apply bg-transparent pt-0 text-sm font-bold text-primary-600; |
| 97 | +.v-table.no-header thead { |
| 98 | + @apply hidden; |
34 | 99 | }
|
35 | 100 |
|
36 | 101 | .v-table.interactive-table tbody tr {
|
37 |
| - @apply cursor-pointer hover:bg-primary-100; |
| 102 | + @apply relative z-10; |
| 103 | +} |
| 104 | + |
| 105 | +.v-table.interactive-table tbody tr:not(.no-data) { |
| 106 | + @apply cursor-pointer hover:text-primary-600; |
| 107 | +} |
| 108 | + |
| 109 | +.v-table.interactive-table tbody tr td:first-child::before { |
| 110 | + content: ''; |
| 111 | + @apply absolute bottom-1 left-1 right-1 top-1 -z-10 rounded-xl bg-primary-100 bg-opacity-50; |
| 112 | +} |
| 113 | + |
| 114 | +.v-table.interactive-table tbody tr:not(.no-data):hover td:first-child::before { |
| 115 | + @apply bg-primary-200 shadow-lg; |
38 | 116 | }
|
0 commit comments