@uqds/card 0.0.8-alpha.0 → 0.0.12-alpha.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.
- package/README.md +2 -0
- package/package.json +3 -3
- package/src/scss/_component.scss +17 -20
- package/src/scss/_global.scss +51 -52
- package/src/scss/main.scss +1 -1
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uqds/card",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12-alpha.0",
|
|
4
4
|
"description": "Card components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"uqds",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"url": "https://github.com/uq-its-ss/design-system/issues"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@uqds/core": "^0.0.
|
|
43
|
+
"@uqds/core": "^0.0.12-alpha.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "125e487dfd2f7e46f2b29cc0e8646b92e61d6f2c"
|
|
46
46
|
}
|
package/src/scss/_component.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
+
@use "global" as *;
|
|
3
3
|
|
|
4
4
|
// Card Default
|
|
5
5
|
.uq-card {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
border: 1px solid core.$uq-neutral-light60;
|
|
12
12
|
border-radius: core.$space-xs;
|
|
13
13
|
color: core.$uq-neutral-dark60;
|
|
14
|
-
line-height: core.$space-m;
|
|
14
|
+
line-height: core.$space-m;
|
|
15
15
|
overflow-wrap: break-word;
|
|
16
16
|
word-wrap: break-word;
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
// Link that wraps the whole card
|
|
19
19
|
&__link {
|
|
20
20
|
position: absolute;
|
|
@@ -23,13 +23,15 @@
|
|
|
23
23
|
bottom: 0;
|
|
24
24
|
left: 0;
|
|
25
25
|
text-indent: -1000%;
|
|
26
|
-
box-shadow: 0 core.$space-xs core.$space-xs
|
|
27
|
-
|
|
26
|
+
box-shadow: 0 core.$space-xs core.$space-xs
|
|
27
|
+
rgba(core.$uq-neutral-dark80, 0.05);
|
|
28
|
+
transition: all ease 0.25s;
|
|
28
29
|
z-index: 10;
|
|
29
30
|
|
|
30
31
|
&:hover,
|
|
31
32
|
&:focus {
|
|
32
|
-
box-shadow: 0 core.$space-s core.$space
|
|
33
|
+
box-shadow: 0 core.$space-s core.$space
|
|
34
|
+
rgba(core.$uq-neutral-dark80, 0.15);
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -62,7 +64,7 @@
|
|
|
62
64
|
display: flex;
|
|
63
65
|
flex-direction: column;
|
|
64
66
|
flex-grow: 1;
|
|
65
|
-
}
|
|
67
|
+
}
|
|
66
68
|
&__content {
|
|
67
69
|
flex-grow: 1;
|
|
68
70
|
padding: core.$space-m;
|
|
@@ -78,7 +80,7 @@
|
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
|
|
81
|
-
&__body {
|
|
83
|
+
&__body {
|
|
82
84
|
p:last-child {
|
|
83
85
|
margin-bottom: core.$space-none;
|
|
84
86
|
}
|
|
@@ -107,11 +109,11 @@
|
|
|
107
109
|
color: core.$uq-purple-light;
|
|
108
110
|
text-transform: uppercase;
|
|
109
111
|
margin: core.$space-none core.$space-none core.$space-s;
|
|
110
|
-
|
|
112
|
+
|
|
111
113
|
@media #{core.$screen-md-up} {
|
|
112
114
|
font-size: core.$font-size;
|
|
113
115
|
}
|
|
114
|
-
|
|
116
|
+
|
|
115
117
|
&--grey {
|
|
116
118
|
font-weight: 400;
|
|
117
119
|
color: core.$uq-neutral-dark60;
|
|
@@ -127,12 +129,9 @@
|
|
|
127
129
|
|
|
128
130
|
/* Additional style rules */
|
|
129
131
|
.uq-grid {
|
|
130
|
-
|
|
131
|
-
// On smaller viewports, Story & Event cards when > 3 renders as lists
|
|
132
|
+
// On smaller viewports, Story & Event cards when > 3 renders as lists
|
|
132
133
|
@media #{core.$screen-md-down} {
|
|
133
|
-
|
|
134
134
|
&__col {
|
|
135
|
-
|
|
136
135
|
// When there are 3 items
|
|
137
136
|
@include with-count(3) {
|
|
138
137
|
@include card-list-style();
|
|
@@ -144,17 +143,15 @@
|
|
|
144
143
|
}
|
|
145
144
|
}
|
|
146
145
|
}
|
|
147
|
-
|
|
146
|
+
|
|
148
147
|
// Full width cards
|
|
149
148
|
&__col--md-8,
|
|
150
149
|
&__col--xl-12 {
|
|
151
|
-
|
|
152
150
|
.uq-card {
|
|
153
|
-
|
|
154
151
|
@media #{core.$screen-md-up} {
|
|
155
152
|
flex-direction: row;
|
|
156
153
|
}
|
|
157
|
-
|
|
154
|
+
|
|
158
155
|
&__image-wrapper {
|
|
159
156
|
min-width: 100%;
|
|
160
157
|
overflow: hidden;
|
|
@@ -191,7 +188,7 @@
|
|
|
191
188
|
@include truncate-card-1col-body-text;
|
|
192
189
|
}
|
|
193
190
|
}
|
|
194
|
-
|
|
191
|
+
|
|
195
192
|
&__actions {
|
|
196
193
|
padding: core.$space-none core.$space-m core.$space-m;
|
|
197
194
|
|
package/src/scss/_global.scss
CHANGED
|
@@ -1,70 +1,69 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
2
|
|
|
3
3
|
$card-shaded-bg: core.$uq-neutral-light80;
|
|
4
4
|
|
|
5
5
|
// Truncate card body text
|
|
6
6
|
@mixin truncate-card-1col-body-text {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
white-space: normal;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
max-height: 75px;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
// Find number of child items in a parent container and apply style based on it
|
|
13
13
|
@mixin with-count($n) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
14
|
+
@if $n == 1 {
|
|
15
|
+
&:first-child:nth-last-child(1) {
|
|
16
|
+
@content;
|
|
18
17
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
18
|
+
} @else {
|
|
19
|
+
&:first-child:nth-last-child(#{$n}),
|
|
20
|
+
&:first-child:nth-last-child(#{$n}) ~ & {
|
|
21
|
+
@content;
|
|
24
22
|
}
|
|
23
|
+
}
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
// Card list styles for story/event cards when more than 2 in the grid on small viewports.
|
|
28
27
|
@mixin card-list-style() {
|
|
29
|
-
|
|
28
|
+
.uq-card {
|
|
29
|
+
&--story,
|
|
30
|
+
&--event {
|
|
31
|
+
flex-direction: row;
|
|
32
|
+
padding-bottom: 1rem;
|
|
33
|
+
border: none;
|
|
34
|
+
border-bottom: 1px solid core.$uq-neutral-light60;
|
|
35
|
+
box-shadow: 0 core.$space-xs core.$space-xs
|
|
36
|
+
rgba(core.$uq-neutral-dark80, 0);
|
|
30
37
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
border: none;
|
|
37
|
-
border-bottom: 1px solid core.$uq-neutral-light60;
|
|
38
|
-
box-shadow: 0 core.$space-xs core.$space-xs rgba(core.$uq-neutral-dark80, 0);
|
|
38
|
+
&:hover,
|
|
39
|
+
&:focus {
|
|
40
|
+
box-shadow: 0 core.$space-s core.$space-s
|
|
41
|
+
rgba(core.$uq-neutral-dark80, 0.1);
|
|
42
|
+
}
|
|
39
43
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
display: none;
|
|
64
|
-
}
|
|
65
|
-
.uq-card__actions {
|
|
66
|
-
padding: core.$space-none core.$space core.$space-none;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
44
|
+
.uq-card__image__wrapper {
|
|
45
|
+
min-width: 98px;
|
|
46
|
+
min-height: 100%;
|
|
47
|
+
}
|
|
48
|
+
.uq-card__image {
|
|
49
|
+
min-height: 100%;
|
|
50
|
+
padding-bottom: 0%;
|
|
51
|
+
}
|
|
52
|
+
.uq-card__content__wrapper {
|
|
53
|
+
min-width: 50%;
|
|
54
|
+
}
|
|
55
|
+
.uq-card__content {
|
|
56
|
+
padding: core.$space-none core.$space;
|
|
57
|
+
}
|
|
58
|
+
.uq-card__title {
|
|
59
|
+
margin: core.$space-none core.$space-none core.$space-s;
|
|
60
|
+
}
|
|
61
|
+
.uq-card__body {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
.uq-card__actions {
|
|
65
|
+
padding: core.$space-none core.$space core.$space-none;
|
|
66
|
+
}
|
|
69
67
|
}
|
|
70
|
-
}
|
|
68
|
+
}
|
|
69
|
+
}
|
package/src/scss/main.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "component";
|