File size: 2,459 Bytes
a7060a0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* Grid (View All mode) */
@import "../../assets/styles/global.prefix.css";

.grid {
  flex-grow: 1;
  display: grid;
  grid-auto-columns: calc(50% - 15px);

  @media (width <= 1200px) {
    /* compact desktop */
    grid-auto-columns: 100%;
  }

  grid-auto-flow: column;
  grid-column-gap: var(--grid-gap);
  margin: 0 var(--spacing-wider);
  padding: 0 var(--spacing-tight) var(--spacing-base) var(--spacing-tight);
  overflow: auto;
  position: relative;

  &:has([data-virtualized="true"]) {
    display: block;
  }
}

.grid > div > h4 {
  cursor: pointer;
}

.container,
.containerVirtualized {
  --grid-gap: 30px;
}

.container {
  position: relative;
  flex-grow: 1;
  min-width: 0; /* famous flex hack to prevent block from growing enormously */
  margin-top: var(--spacing-tight);

  &::before,
  &::after {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    width: var(--spacing-tighter);
    z-index: 1;
    pointer-events: none;
  }

  &::before {
    left: 30px;
    background: linear-gradient(
      to right,
      rgba(var(--color-neutral-background-raw) / 100%),
      rgba(var(--color-neutral-background-raw) / 0%)
    );
  }

  &::after {
    right: 30px;
    background: linear-gradient(
      to left,
      rgba(var(--color-neutral-background-raw) / 100%),
      rgba(var(--color-neutral-background-raw) / 0%)
    );
  }
}

.containerVirtualized {
  position: relative;
  flex-grow: 1;
  min-width: 0;
  height: calc(100vh - 200px); /* Account for header/tabs */
  min-height: 400px;
}

.container > button,
.containerVirtualized > button {
  position: absolute;
  top: 0;
  width: var(--grid-gap);
  height: 100%;
  z-index: 10;

  & span > span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  & svg {
    width: 16px;
    height: 16px;
  }

  &:hover {
    background: var(--color-primary-emphasis-subtle);
  }
}

.container > button.left,
.containerVirtualized > button.left {
  left: 0;
}

.container > button.right,
.containerVirtualized > button.right {
  right: 0;
}

.grid > div:global(.hover) {
  background: var(--color-primary-emphasis-subtle);

  & h4 {
    color: var(--primary_link);
  }
}

/* don't let the empty blocks to break the nice grid */
.grid > div:empty {
  display: none;
}

:global(.ant-btn.ant-btn-text.ant-btn-icon-only:hover) {
  background-color: var(--color-primary-emphasis-subtle);
}