@1024pix/pix-ui 61.3.1 → 61.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,32 +20,38 @@ export default class PixCard extends Component {
|
|
|
20
20
|
|
|
21
21
|
return value;
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
get isWide() {
|
|
25
|
+
return this.args.wide ?? false;
|
|
26
|
+
}
|
|
23
27
|
<template>
|
|
24
28
|
<PixBlock @variant={{this.variant}} class="pix-card-wrapper">
|
|
25
|
-
<article class="pix-card">
|
|
29
|
+
<article class="pix-card {{if this.isWide 'pix-card--wide'}}">
|
|
26
30
|
{{#if @image}}
|
|
27
31
|
<div class="pix-card__image pix-card__image--{{this.variant}}">
|
|
28
32
|
<img src={{@image}} aria-hidden="true" alt="" />
|
|
29
33
|
</div>
|
|
30
34
|
{{/if}}
|
|
31
|
-
|
|
32
|
-
{{
|
|
33
|
-
|
|
34
|
-
<div class="pix-card__content">
|
|
35
|
-
<header>
|
|
36
|
-
<h3 class="pix-card__title pix-title-xs" title={{@title}}>{{@title}}</h3>
|
|
37
|
-
{{#if @subtitle}}
|
|
38
|
-
<p title={{@subtitle}} class="pix-card__subtitle pix-subtitle-xs">
|
|
39
|
-
{{@subtitle}}
|
|
40
|
-
</p>
|
|
41
|
-
{{/if}}
|
|
42
|
-
</header>
|
|
43
|
-
{{#if (has-block "description")}}
|
|
44
|
-
<div class="pix-card__description pix-body-s">{{yield to="description"}}</div>
|
|
45
|
-
{{/if}}
|
|
46
|
-
{{#if (has-block "footer")}}
|
|
47
|
-
<footer class="pix-card__footer pix-body-xs">{{yield to="footer"}}</footer>
|
|
35
|
+
<div class="pix-card__body">
|
|
36
|
+
{{#if (has-block "tag")}}
|
|
37
|
+
{{yield to="tag"}}
|
|
48
38
|
{{/if}}
|
|
39
|
+
<div class="pix-card__content">
|
|
40
|
+
<header>
|
|
41
|
+
<h3 class="pix-card__title pix-title-xxs" title={{@title}}>{{@title}}</h3>
|
|
42
|
+
{{#if @subtitle}}
|
|
43
|
+
<p title={{@subtitle}} class="pix-card__subtitle pix-subtitle-xxs">
|
|
44
|
+
{{@subtitle}}
|
|
45
|
+
</p>
|
|
46
|
+
{{/if}}
|
|
47
|
+
</header>
|
|
48
|
+
{{#if (has-block "description")}}
|
|
49
|
+
<div class="pix-card__description pix-body-s">{{yield to="description"}}</div>
|
|
50
|
+
{{/if}}
|
|
51
|
+
{{#if (has-block "footer")}}
|
|
52
|
+
<footer class="pix-card__footer pix-body-xs">{{yield to="footer"}}</footer>
|
|
53
|
+
{{/if}}
|
|
54
|
+
</div>
|
|
49
55
|
</div>
|
|
50
56
|
</article>
|
|
51
57
|
</PixBlock>
|
|
@@ -8,7 +8,20 @@
|
|
|
8
8
|
gap: var(--pix-spacing-3x);
|
|
9
9
|
align-items: flex-start;
|
|
10
10
|
|
|
11
|
+
&--wide {
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
align-items: stretch;
|
|
14
|
+
|
|
15
|
+
.pix-card__image {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
height: auto;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
11
23
|
&__image {
|
|
24
|
+
flex-shrink: 0;
|
|
12
25
|
width: 76px;
|
|
13
26
|
height: 76px;
|
|
14
27
|
border-radius: var(--radius-3x, 12px);
|
|
@@ -22,11 +35,21 @@
|
|
|
22
35
|
}
|
|
23
36
|
}
|
|
24
37
|
|
|
38
|
+
&__body {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
flex-grow: 1;
|
|
42
|
+
gap: var(--pix-spacing-3x);
|
|
43
|
+
align-items: flex-start;
|
|
44
|
+
align-self: stretch;
|
|
45
|
+
}
|
|
46
|
+
|
|
25
47
|
&__content {
|
|
26
48
|
display: flex;
|
|
27
49
|
flex-direction: column;
|
|
28
50
|
flex-grow: 1;
|
|
29
51
|
gap: var(--pix-spacing-2x);
|
|
52
|
+
align-self: stretch;
|
|
30
53
|
color: var(--pix-neutral-900);
|
|
31
54
|
}
|
|
32
55
|
|
|
@@ -50,4 +73,8 @@
|
|
|
50
73
|
margin-top: auto;
|
|
51
74
|
color: var(--pix-neutral-500);
|
|
52
75
|
}
|
|
76
|
+
|
|
77
|
+
.pix-tag {
|
|
78
|
+
font-size: 0.75rem;
|
|
79
|
+
}
|
|
53
80
|
}
|
|
@@ -170,6 +170,24 @@
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
%pix-subtitle-xxs,
|
|
174
|
+
.pix-subtitle-xxs {
|
|
175
|
+
@extend %-pix-subtitle;
|
|
176
|
+
|
|
177
|
+
--font-size-subtitle: 0.875rem;
|
|
178
|
+
|
|
179
|
+
font-size: var(--font-size-subtitle);
|
|
180
|
+
line-height: 1.5;
|
|
181
|
+
|
|
182
|
+
@include breakpoints.device-is('tablet') {
|
|
183
|
+
--font-size-subtitle: 0.875rem;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@include breakpoints.device-is('desktop') {
|
|
187
|
+
--font-size-subtitle: 1rem;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
173
191
|
%-pix-body {
|
|
174
192
|
font-weight: var(--pix-font-normal);
|
|
175
193
|
|