Skip to content

Commit 41388ce

Browse files
authored
Merge pull request #1113 from grafana/extension-cards-update
feat: update extension cards layout
2 parents cf3dbdf + 11f122d commit 41388ce

File tree

17 files changed

+1201
-239
lines changed

17 files changed

+1201
-239
lines changed

src/components/pages/doc-extensions/extension-selection/extension-selection.module.scss

Lines changed: 254 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
flex-direction: column;
66
}
77

8+
.result {
9+
display: flex;
10+
justify-content: space-between;
11+
}
12+
813
.list {
914
width: 100%;
10-
margin-top: 20px;
15+
margin-top: 40px;
1116

1217
display: grid;
1318
grid-template-columns: 1fr 1fr 1fr;
@@ -23,6 +28,13 @@
2328
}
2429
}
2530

31+
.listTitle {
32+
grid-column: 1/-1;
33+
font-size: 25px;
34+
line-height: 35px;
35+
font-weight: normal;
36+
}
37+
2638
.selection {
2739
box-sizing: border-box;
2840
position: sticky;
@@ -31,7 +43,6 @@
3143
background-color: $color-tertiary;
3244
padding-left: 50px;
3345
padding-right: 50px;
34-
margin-top: -20px;
3546
margin-left: -50px;
3647
margin-right: -50px;
3748

@@ -41,17 +52,16 @@
4152
@include md-down {
4253
margin-left: -20px;
4354
margin-right: -20px;
44-
4555
padding-left: 20px;
4656
padding-right: 20px;
4757
}
4858

4959
@include sm-down {
50-
margin-left: 20px;
51-
margin-right: 20px;
52-
60+
margin-left: 0;
61+
margin-right: 0;
5362
padding-left: 0;
5463
padding-right: 0;
64+
overflow: hidden;
5565
}
5666
}
5767

@@ -108,28 +118,257 @@
108118
.selected {
109119
margin-right: 20px;
110120
font-family: $font-family-primary;
111-
font-size: $font-size-sm;
112-
line-height: $line-height-sm;
121+
font-size: $font-size-base;
122+
line-height: $line-height-base;
113123
color: $color-primary;
124+
}
114125

115-
& .number {
116-
font-weight: 700;
117-
}
126+
.number {
127+
font-weight: 700;
118128
}
119129

120130
.clear {
121131
font-family: $font-family-primary;
122-
font-size: $font-size-sm;
123-
line-height: $line-height-sm;
132+
font-size: $font-size-base;
133+
line-height: $line-height-base;
124134
padding: 0;
125-
color: $color-primary;
135+
color: $color-accent-primary;
126136
font-weight: 500;
127137
transition: color 0.3s;
128138
border: none;
129139
background-color: transparent;
130140
cursor: pointer;
141+
}
142+
143+
.filters {
144+
display: flex;
145+
gap: 15px;
146+
padding: 0;
147+
list-style: none;
148+
149+
@include lg-down {
150+
flex-wrap: wrap;
151+
gap: 2%;
152+
}
153+
154+
@include sm-down {
155+
max-width: 100%;
156+
}
157+
158+
@include xs-down {
159+
padding-left: 0;
160+
padding-right: 0;
161+
}
162+
}
163+
164+
%field {
165+
position: relative;
166+
padding: 10px 15px;
167+
background: transparent;
168+
font-size: 16px;
169+
line-height: $line-height-sm;
170+
color: $color-secondary;
171+
font-weight: 400;
172+
border: 1px solid #d3d3de;
173+
border-radius: 4px;
174+
transition: all 0.3s ease-in-out;
175+
appearance: none;
176+
177+
&:-moz-focusring {
178+
border: none;
179+
}
180+
181+
&:focus-visible {
182+
outline: none;
183+
}
184+
185+
&:focus {
186+
border-color: $color-accent-primary;
187+
}
188+
189+
&::-webkit-search-cancel-button {
190+
display: none;
191+
}
192+
}
193+
194+
.fieldWrapper {
195+
position: relative;
196+
flex-grow: 1;
197+
198+
@include lg-down {
199+
width: 80%;
200+
margin-top: 2%;
201+
}
202+
203+
@include xs-down {
204+
width: 60%;
205+
}
206+
}
207+
208+
.buttonWrapper {
209+
position: relative;
210+
211+
@include lg-down {
212+
margin-top: 2%;
213+
}
214+
215+
@include xs-down {
216+
width: 42px;
217+
}
218+
}
219+
220+
.fieldIcon {
221+
position: absolute;
222+
top: 0;
223+
left: 15px;
224+
bottom: 0;
225+
margin: auto;
226+
}
227+
228+
.fieldInput {
229+
@extend %field;
230+
width: 100%;
231+
padding-left: 40px;
232+
padding-right: 40px;
233+
}
234+
235+
.fieldSelect {
236+
@extend %field;
237+
width: 160px;
238+
padding-right: 40px;
239+
cursor: pointer;
240+
241+
@include md-down {
242+
width: 100%;
243+
}
244+
}
245+
246+
.fieldClear {
247+
z-index: 9;
248+
position: absolute;
249+
right: 9px;
250+
top: 0;
251+
bottom: 0;
252+
margin: auto;
253+
font-size: 0;
254+
width: 22px;
255+
height: 22px;
256+
border: 2px solid transparent;
257+
background: white;
258+
cursor: pointer;
259+
260+
&:after,
261+
&:before {
262+
content: '';
263+
display: block;
264+
box-sizing: border-box;
265+
position: absolute;
266+
width: 16px;
267+
height: 1.4px;
268+
background: #c9c9d4;
269+
transform: rotate(45deg);
270+
border-radius: 5px;
271+
top: 8px;
272+
left: 1px;
273+
}
274+
275+
&:after {
276+
transform: rotate(-45deg);
277+
}
278+
}
279+
280+
.dropdown-wrapper {
281+
box-shadow: $light-block-shadow;
282+
position: relative;
283+
284+
&:after {
285+
content: '';
286+
position: absolute;
287+
right: 15px;
288+
top: calc(50% - 2.5px);
289+
border-left: 5px solid transparent;
290+
border-right: 5px solid transparent;
291+
border-top: 5px solid #c9c9d4;
292+
width: 0;
293+
height: 0;
294+
pointer-events: none;
295+
}
296+
297+
@include lg-down {
298+
width: 32%;
299+
300+
select {
301+
width: 100%;
302+
}
303+
}
304+
305+
@include xs-down {
306+
width: 49%;
307+
308+
&:nth-child(3) {
309+
width: 100%;
310+
margin-top: 2%;
311+
}
312+
}
313+
}
314+
315+
.filterButton {
316+
width: 41px;
317+
height: 41px;
318+
padding: 8px;
319+
border: 1px solid #d3d3de;
320+
border-radius: 4px;
321+
color: #beb9d7;
322+
font-size: 0;
323+
cursor: pointer;
324+
transition: all 0.2s ease;
131325

132326
&:hover {
133-
color: $color-accent-primary;
327+
color: #7d64ff;
328+
border-color: #7d64ff;
134329
}
330+
331+
&-active {
332+
opacity: 1;
333+
color: #7d64ff;
334+
border-color: #7d64ff;
335+
cursor: default;
336+
}
337+
}
338+
339+
.clearButton {
340+
padding: 0;
341+
margin: 0;
342+
font-weight: 500;
343+
font-size: 17px;
344+
line-height: 25px;
345+
color: #7d64ff;
346+
border: none;
347+
text-transform: none;
348+
}
349+
350+
.notFoundWrapper {
351+
display: flex;
352+
flex-direction: column;
353+
align-items: center;
354+
padding: 40px 0;
355+
}
356+
357+
.notFoundIllustration {
358+
display: block;
359+
width: 200px;
360+
height: auto;
361+
}
362+
363+
.notFoundTitle {
364+
margin-top: 60px;
365+
margin-bottom: 10px;
366+
}
367+
368+
.notFoundDescription {
369+
font-size: 20px;
370+
line-height: 25px;
371+
color: #5a5c87;
372+
margin-top: 0;
373+
margin-bottom: 30px;
135374
}

0 commit comments

Comments
 (0)