@uqds/card 0.1.0-alpha.0 → 0.1.0-alpha.1

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/dist/css/main.css CHANGED
@@ -1 +1 @@
1
- .uq-card{position:relative;display:flex;flex-direction:column;font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;height:100%;background-color:#fff;border:1px solid #dcdcdd;border-radius:.25rem;color:#3b383e;line-height:1.5rem;overflow-wrap:break-word;word-wrap:break-word}.uq-card__link{position:absolute;top:0;right:0;bottom:0;left:0;text-indent:-1000%;box-shadow:0 .25rem .25rem rgba(59,56,62,.05);transition:all ease .25s;z-index:10}.uq-card__link:hover,.uq-card__link:focus{box-shadow:0 .5rem 1rem rgba(59,56,62,.15)}.uq-card__image-wrapper{max-height:190px;overflow:hidden}@media(min-width: 37.5rem){.uq-card__image-wrapper{max-height:15rem}}.uq-card__image{position:relative;padding-bottom:70%;overflow:hidden}.uq-card__image img{position:absolute;top:50%;left:50%;width:100%;transform:translate(-50%, -50%);-o-object-fit:cover;object-fit:cover;z-index:0}.uq-card__content-wrapper{display:flex;flex-direction:column;flex-grow:1}.uq-card__content{flex-grow:1;padding:1.5rem}.uq-card__content :last-child .uq-card__title{margin-bottom:0}.uq-card__header :last-child{margin:0 0 .5rem}.uq-card__body p{margin-top:0}.uq-card__body p:last-child{margin-bottom:0}.uq-card__actions{padding:0 1.5rem 1.5rem}.uq-card__actions p:last-child{margin-bottom:0}.uq-card__title{font-size:1.25rem;color:#3b383e;margin:0 0 .5rem}@media(min-width: 37.5rem){.uq-card__title{font-size:1.5rem}}.uq-card__title-super{font-size:.875rem;font-weight:500;color:#962a8b;text-transform:uppercase;margin:0 0 .5rem}@media(min-width: 37.5rem){.uq-card__title-super{font-size:1rem}}.uq-card__title-super--grey{font-weight:400;color:#5e5b60}.uq-card--shaded{background-color:#f3f3f4}@media(max-width: 37.4375rem){.uq-grid__col:first-child:nth-last-child(3) .uq-card--story,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event{flex-direction:row;padding-bottom:1rem;border:none;border-bottom:1px solid #dcdcdd;box-shadow:0 .25rem .25rem rgba(59,56,62,0)}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story:hover,.uq-grid__col:first-child:nth-last-child(3) .uq-card--story:focus,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event:hover,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event:focus,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story:hover,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story:focus,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event:hover,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event:focus{box-shadow:0 .5rem .5rem rgba(59,56,62,.1)}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__image__wrapper{min-width:98px;min-height:100%}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__image,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__image,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__image,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__image{min-height:100%;padding-bottom:0%}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__content__wrapper{min-width:50%}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__content,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__content,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__content,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__content{padding:0 1rem}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__title,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__title,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__title,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__title{margin:0 0 .5rem}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__body,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__body,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__body,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__body{display:none}.uq-grid__col:first-child:nth-last-child(3) .uq-card--story .uq-card__actions,.uq-grid__col:first-child:nth-last-child(3) .uq-card--event .uq-card__actions,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--story .uq-card__actions,.uq-grid__col:first-child:nth-last-child(3)~.uq-grid__col .uq-card--event .uq-card__actions{padding:0 1rem 0}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event{flex-direction:row;padding-bottom:1rem;border:none;border-bottom:1px solid #dcdcdd;box-shadow:0 .25rem .25rem rgba(59,56,62,0)}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story:hover,.uq-grid__col:first-child:nth-last-child(4) .uq-card--story:focus,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event:hover,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event:focus,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story:hover,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story:focus,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event:hover,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event:focus{box-shadow:0 .5rem .5rem rgba(59,56,62,.1)}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__image__wrapper,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__image__wrapper{min-width:98px;min-height:100%}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__image,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__image,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__image,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__image{min-height:100%;padding-bottom:0%}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__content__wrapper,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__content__wrapper{min-width:50%}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__content,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__content,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__content,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__content{padding:0 1rem}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__title,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__title,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__title,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__title{margin:0 0 .5rem}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__body,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__body,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__body,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__body{display:none}.uq-grid__col:first-child:nth-last-child(4) .uq-card--story .uq-card__actions,.uq-grid__col:first-child:nth-last-child(4) .uq-card--event .uq-card__actions,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--story .uq-card__actions,.uq-grid__col:first-child:nth-last-child(4)~.uq-grid__col .uq-card--event .uq-card__actions{padding:0 1rem 0}}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card,.uq-grid__col--xl-12 .uq-card{flex-direction:row}}.uq-grid__col--md-8 .uq-card__image-wrapper,.uq-grid__col--xl-12 .uq-card__image-wrapper{min-width:100%;overflow:hidden}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card__image-wrapper,.uq-grid__col--xl-12 .uq-card__image-wrapper{min-width:50%;max-height:100%}}.uq-grid__col--md-8 .uq-card__image,.uq-grid__col--xl-12 .uq-card__image{padding-bottom:70%}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card__image,.uq-grid__col--xl-12 .uq-card__image{min-height:100%;padding-bottom:0%}}.uq-grid__col--md-8 .uq-card__content-wrapper,.uq-grid__col--xl-12 .uq-card__content-wrapper{min-width:100%}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card__content-wrapper,.uq-grid__col--xl-12 .uq-card__content-wrapper{min-width:50%}}.uq-grid__col--md-8 .uq-card__content,.uq-grid__col--xl-12 .uq-card__content{padding:1.5rem}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card__content,.uq-grid__col--xl-12 .uq-card__content{padding:3.5rem 3.5rem 1.5rem}}.uq-grid__col--md-8 .uq-card__body p,.uq-grid__col--xl-12 .uq-card__body p{white-space:normal;overflow:hidden;max-height:75px}.uq-grid__col--md-8 .uq-card__actions,.uq-grid__col--xl-12 .uq-card__actions{padding:0 1.5rem 1.5rem}@media(min-width: 37.5rem){.uq-grid__col--md-8 .uq-card__actions,.uq-grid__col--xl-12 .uq-card__actions{padding:0 3.5rem 3.5rem}}.height-non-equalised .uq-card{height:auto}.text--link{color:#0d6dcd;text-decoration:none;transition:.2s color}.text--link:hover{color:#0d6dcd;text-decoration:underline}
1
+ :root{--card-title-font-size: 24px}@media(max-width: 37.4375rem){:root{--card-title-font-size: 22px}}.uq-card,.uq-story-card{position:relative;display:flex;flex-direction:column;border-radius:4px;border:1px solid #dcdcdd;background:#fff}.uq-card:has(a:focus-visible),.uq-story-card:has(a:focus-visible){outline:4px solid #0d6dcd;outline-offset:-1px}.uq-card:hover,.uq-story-card:hover{background:#f3f3f4}.uq-card:hover .uq-card__content::after,.uq-story-card:hover .uq-card__content::after{left:8px}.uq-card__content{flex:1;display:flex;flex-direction:column;padding:1.5rem}.uq-card__content::after{content:"";height:24px;width:24px;margin-top:auto;padding-top:1.5rem;position:relative;box-sizing:content-box;background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4 12h15M14 18l6-6-6-6' stroke='%2351247a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-position:right bottom;background-size:24px;background-repeat:no-repeat;transition:left 200ms ease-in-out;left:0}.uq-story-card__title,.uq-card__title{margin:0;color:#19151c;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;font-size:var(--card-title-font-size)}.uq-story-card__title a,.uq-card__title a{color:#19151c}.uq-story-card__title a::after,.uq-card__title a::after{content:"";position:absolute;inset:0}.uq-story-card__title a:focus,.uq-card__title a:focus{outline:none}.uq-card__description,.uq-story-card__description{margin-top:.5rem}.uq-card__image,.uq-story-card__image{aspect-ratio:1.5/1;position:relative;flex-shrink:0}.uq-card__image img,.uq-story-card__image img,.uq-card__image picture,.uq-story-card__image picture{width:100%;height:100%;inset:0;position:absolute;object-fit:cover}.uq-card__icon{margin-bottom:.5rem}.uq-card__icon .uq-icon::before{height:56px;width:56px}.uq-card--text .uq-card__image,.uq-card--text .uq-story-card__image,.uq-card--text .uq-card__icon{display:none}.uq-card--image .uq-card__icon{display:none}.uq-card--icon .uq-card__image,.uq-card--icon .uq-story-card__image,.uq-card--icon-nav .uq-card__image,.uq-card--icon-nav .uq-story-card__image{display:none}@media(max-width: 37.4375rem){.uq-card--icon-nav .uq-card__content{display:flex;align-items:center;flex-direction:row}.uq-card--icon-nav .uq-card__content::after{padding-top:0;margin-top:0;margin-left:auto}.uq-card--icon-nav .uq-card__description,.uq-card--icon-nav .uq-story-card__description{display:none}.uq-card--icon-nav .uq-card__icon{margin:0 1rem 0 0}.uq-card--icon-nav .uq-card__icon .uq-icon::before{height:40px;width:40px}}@media(max-width: 37.4375rem){.uq-story-card{border-radius:0;border-inline-width:0;border-top-width:0;display:flex;flex-direction:row-reverse;align-items:center;gap:1rem;padding-bottom:1rem;background-color:rgba(0,0,0,0)}.uq-story-card:hover{background-color:rgba(0,0,0,0)}}.uq-story-card__content{flex:1;position:relative;display:flex;flex-direction:column;padding:1.5rem}@media(max-width: 37.4375rem){.uq-story-card__content{padding:0}}@media(max-width: 37.4375rem){.uq-story-card__title{-webkit-line-clamp:3}}@media(max-width: 37.4375rem){.uq-story-card__description{display:none}}.uq-story-card__top-label{margin-bottom:.25rem;color:#757377;font-weight:500}@media(max-width: 37.4375rem){.uq-story-card__top-label{margin-bottom:0}}.uq-story-card__bottom-label{padding-top:1.5rem;margin-top:auto}@media(max-width: 37.4375rem){.uq-story-card__bottom-label{margin-top:.5rem}}@media(max-width: 37.4375rem){.uq-story-card__image{width:120px;height:100px;aspect-ratio:unset;flex-shrink:0}}.uq-story-card--event .uq-story-card__top-label{color:#51247a}.uq-story-card--event .uq-story-card__description,.uq-story-card--story .uq-story-card__description{display:none}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uqds/card",
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0-alpha.1",
4
4
  "description": "Card components",
5
5
  "keywords": [
6
6
  "uqds",
@@ -40,7 +40,8 @@
40
40
  "url": "https://github.com/uq-its-ss/design-system/issues"
41
41
  },
42
42
  "dependencies": {
43
- "@uqds/core": "^1.2.0-alpha.0"
43
+ "@uqds/core": "^1.2.0-alpha.0",
44
+ "@uqds/icon": "^0.0.15-alpha.4"
44
45
  },
45
- "gitHead": "78891f49ec037688e08f67f30a52691404325da7"
46
+ "gitHead": "0a1a6e48689f330d9cb6ac9d0d47b8f8a4edf2ff"
46
47
  }
@@ -0,0 +1,152 @@
1
+ @use "@uqds/core/src/scss/global" as core;
2
+ @use "@uqds/icon/src/scss/global" as icon;
3
+
4
+ .uq-card {
5
+ position: relative;
6
+ display: flex;
7
+ flex-direction: column;
8
+ border-radius: 4px;
9
+ border: 1px solid #{core.$grey-200};
10
+ background: core.$white;
11
+
12
+ &:has(a:focus-visible) {
13
+ outline: 4px solid core.$utility-500;
14
+ outline-offset: -1px;
15
+ }
16
+
17
+ &:hover {
18
+ background: core.$grey-50;
19
+
20
+ & .uq-card__content::after {
21
+ left: 8px;
22
+ }
23
+ }
24
+ }
25
+
26
+ .uq-card__content {
27
+ flex: 1;
28
+ display: flex;
29
+ flex-direction: column;
30
+ padding: core.$space-l;
31
+
32
+ &::after {
33
+ content: "";
34
+ height: 24px;
35
+ width: 24px;
36
+ margin-top: auto;
37
+ padding-top: core.$space-l;
38
+ position: relative;
39
+ box-sizing: content-box;
40
+ background-image: url(icon.get-icon(
41
+ "standard--arrow-right",
42
+ core.$purple-500
43
+ ));
44
+ background-position: right bottom;
45
+ background-size: 24px;
46
+ background-repeat: no-repeat;
47
+ transition: left 200ms ease-in-out;
48
+ left: 0;
49
+ }
50
+ }
51
+
52
+ %uq-card__title,
53
+ .uq-card__title {
54
+ margin: 0;
55
+ color: core.$black;
56
+ display: -webkit-box;
57
+ -webkit-box-orient: vertical;
58
+ -webkit-line-clamp: 4;
59
+ overflow: hidden;
60
+ font-size: var(--card-title-font-size);
61
+
62
+ & a {
63
+ color: core.$black;
64
+
65
+ &::after {
66
+ content: "";
67
+ position: absolute;
68
+ inset: 0;
69
+ }
70
+
71
+ &:focus {
72
+ outline: none;
73
+ }
74
+ }
75
+ }
76
+
77
+ .uq-card__description {
78
+ margin-top: core.$space-s;
79
+ }
80
+
81
+ .uq-card__image {
82
+ aspect-ratio: 1.5 / 1;
83
+ position: relative;
84
+ flex-shrink: 0;
85
+
86
+ & img,
87
+ & picture {
88
+ width: 100%;
89
+ height: 100%;
90
+ inset: 0;
91
+ position: absolute;
92
+ object-fit: cover;
93
+ }
94
+ }
95
+
96
+ .uq-card__icon {
97
+ margin-bottom: core.$space-s;
98
+
99
+ & .uq-icon::before {
100
+ height: 56px;
101
+ width: 56px;
102
+ }
103
+ }
104
+
105
+ .uq-card--text {
106
+ & .uq-card__image,
107
+ & .uq-card__icon {
108
+ display: none;
109
+ }
110
+ }
111
+
112
+ .uq-card--image {
113
+ & .uq-card__icon {
114
+ display: none;
115
+ }
116
+ }
117
+
118
+ .uq-card--icon,
119
+ .uq-card--icon-nav {
120
+ & .uq-card__image {
121
+ display: none;
122
+ }
123
+ }
124
+
125
+ .uq-card--icon-nav {
126
+ @media #{core.$screen-md-down} {
127
+ & .uq-card__content {
128
+ display: flex;
129
+ align-items: center;
130
+ flex-direction: row;
131
+
132
+ &::after {
133
+ padding-top: 0;
134
+ margin-top: 0;
135
+ margin-left: auto;
136
+ }
137
+ }
138
+
139
+ & .uq-card__description {
140
+ display: none;
141
+ }
142
+
143
+ & .uq-card__icon {
144
+ margin: 0 core.$space-m 0 0;
145
+ }
146
+
147
+ .uq-card__icon .uq-icon::before {
148
+ height: 40px;
149
+ width: 40px;
150
+ }
151
+ }
152
+ }
@@ -0,0 +1,11 @@
1
+ @use "@uqds/core/src/scss/global" as core;
2
+
3
+ :root {
4
+ --card-title-font-size: 24px;
5
+ }
6
+
7
+ @media #{core.$screen-md-down} {
8
+ :root {
9
+ --card-title-font-size: 22px;
10
+ }
11
+ }
@@ -0,0 +1,93 @@
1
+ @use "@uqds/core/src/scss/global" as core;
2
+ @use "card";
3
+
4
+ .uq-story-card {
5
+ @extend .uq-card;
6
+
7
+ @media #{core.$screen-md-down} {
8
+ border-radius: 0;
9
+ border-inline-width: 0;
10
+ border-top-width: 0;
11
+ display: flex;
12
+ flex-direction: row-reverse;
13
+ align-items: center;
14
+ gap: core.$space-m;
15
+ padding-bottom: core.$space-m;
16
+ background-color: transparent;
17
+
18
+ &:hover {
19
+ background-color: transparent;
20
+ }
21
+ }
22
+ }
23
+
24
+ .uq-story-card__content {
25
+ flex: 1;
26
+ position: relative;
27
+ display: flex;
28
+ flex-direction: column;
29
+ padding: core.$space-l;
30
+
31
+ @media #{core.$screen-md-down} {
32
+ padding: 0;
33
+ }
34
+ }
35
+
36
+ .uq-story-card__title {
37
+ @extend %uq-card__title;
38
+
39
+ @media #{core.$screen-md-down} {
40
+ -webkit-line-clamp: 3;
41
+ }
42
+ }
43
+
44
+ .uq-story-card__description {
45
+ @extend .uq-card__description;
46
+
47
+ @media #{core.$screen-md-down} {
48
+ display: none;
49
+ }
50
+ }
51
+
52
+ .uq-story-card__top-label {
53
+ margin-bottom: core.$space-xs;
54
+ color: core.$grey-700;
55
+ font-weight: core.$font-weight-medium;
56
+
57
+ @media #{core.$screen-md-down} {
58
+ margin-bottom: 0;
59
+ }
60
+ }
61
+
62
+ .uq-story-card__bottom-label {
63
+ padding-top: core.$space-l;
64
+ margin-top: auto;
65
+
66
+ @media #{core.$screen-md-down} {
67
+ margin-top: core.$space-s;
68
+ }
69
+ }
70
+
71
+ .uq-story-card__image {
72
+ @extend .uq-card__image;
73
+
74
+ @media #{core.$screen-md-down} {
75
+ width: 120px;
76
+ height: 100px;
77
+ aspect-ratio: unset;
78
+ flex-shrink: 0;
79
+ }
80
+ }
81
+
82
+ .uq-story-card--event {
83
+ & .uq-story-card__top-label {
84
+ color: core.$purple-500;
85
+ }
86
+ }
87
+
88
+ .uq-story-card--event,
89
+ .uq-story-card--story {
90
+ .uq-story-card__description {
91
+ display: none;
92
+ }
93
+ }
@@ -1 +1,3 @@
1
- @use "component";
1
+ @use "custom-properties";
2
+ @use "card";
3
+ @use "story-card";
@@ -1,223 +0,0 @@
1
- @use "@uqds/core/src/scss/global" as core;
2
- @use "global" as *;
3
-
4
- // Card Default
5
- .uq-card {
6
- position: relative;
7
- display: flex;
8
- flex-direction: column;
9
- font-family: core.$font-body;
10
- font-size: core.$font-size-m;
11
- font-weight: core.$font-weight-normal;
12
- line-height: core.$line-height;
13
- height: 100%;
14
- background-color: core.$white;
15
- border: 1px solid core.$grey-200;
16
- border-radius: core.$space-xs;
17
- color: core.$text;
18
- line-height: core.$space-l;
19
- overflow-wrap: break-word;
20
- word-wrap: break-word;
21
-
22
- // Link that wraps the whole card
23
- &__link {
24
- position: absolute;
25
- top: 0;
26
- right: 0;
27
- bottom: 0;
28
- left: 0;
29
- text-indent: -1000%;
30
- box-shadow: 0 core.$space-xs core.$space-xs rgba(core.$grey-900, 0.05);
31
- transition: all ease 0.25s;
32
- z-index: 10;
33
-
34
- &:hover,
35
- &:focus {
36
- box-shadow: 0 core.$space-s core.$space-m rgba(core.$grey-900, 0.15);
37
- }
38
- }
39
-
40
- &__image-wrapper {
41
- max-height: 190px;
42
- overflow: hidden;
43
-
44
- @media #{core.$screen-md-up} {
45
- max-height: 15rem;
46
- }
47
- }
48
- &__image {
49
- position: relative;
50
- padding-bottom: 70%;
51
- overflow: hidden;
52
-
53
- img {
54
- position: absolute;
55
- top: 50%;
56
- left: 50%;
57
- width: 100%;
58
- transform: translate(-50%, -50%);
59
- -o-object-fit: cover;
60
- object-fit: cover;
61
- z-index: 0;
62
- }
63
- }
64
-
65
- &__content-wrapper {
66
- display: flex;
67
- flex-direction: column;
68
- flex-grow: 1;
69
- }
70
- &__content {
71
- flex-grow: 1;
72
- padding: core.$space-l;
73
-
74
- :last-child .uq-card__title {
75
- margin-bottom: core.$space-none;
76
- }
77
- }
78
-
79
- &__header {
80
- :last-child {
81
- margin: core.$space-none core.$space-none core.$space-s;
82
- }
83
- }
84
-
85
- &__body {
86
- p {
87
- margin-top: 0;
88
- }
89
- p:last-child {
90
- margin-bottom: core.$space-none;
91
- }
92
- }
93
-
94
- &__actions {
95
- padding: core.$space-none core.$space-l core.$space-l;
96
-
97
- p:last-child {
98
- margin-bottom: core.$space-none;
99
- }
100
- }
101
-
102
- &__title {
103
- font-size: core.$font-size-xl;
104
- color: core.$grey-900;
105
- margin: core.$space-none core.$space-none core.$space-s;
106
-
107
- @media #{core.$screen-md-up} {
108
- font-size: core.$font-size-xxl;
109
- }
110
-
111
- &-super {
112
- font-size: core.$font-size-s;
113
- font-weight: 500;
114
- color: core.$purple-light;
115
- text-transform: uppercase;
116
- margin: core.$space-none core.$space-none core.$space-s;
117
-
118
- @media #{core.$screen-md-up} {
119
- font-size: core.$font-size-m;
120
- }
121
-
122
- &--grey {
123
- font-weight: 400;
124
- color: core.$grey-800;
125
- }
126
- }
127
- }
128
-
129
- // Shaded
130
- &--shaded {
131
- background-color: core.$grey-50;
132
- }
133
- }
134
-
135
- /* Additional style rules */
136
- .uq-grid {
137
- // On smaller viewports, Story & Event cards when > 3 renders as lists
138
- @media #{core.$screen-md-down} {
139
- &__col {
140
- // When there are 3 items
141
- @include with-count(3) {
142
- @include card-list-style();
143
- }
144
-
145
- // When there are 4 items
146
- @include with-count(4) {
147
- @include card-list-style();
148
- }
149
- }
150
- }
151
-
152
- // Full width cards
153
- &__col--md-8,
154
- &__col--xl-12 {
155
- .uq-card {
156
- @media #{core.$screen-md-up} {
157
- flex-direction: row;
158
- }
159
-
160
- &__image-wrapper {
161
- min-width: 100%;
162
- overflow: hidden;
163
-
164
- @media #{core.$screen-md-up} {
165
- min-width: 50%;
166
- max-height: 100%;
167
- }
168
- }
169
- &__image {
170
- padding-bottom: 70%;
171
-
172
- @media #{core.$screen-md-up} {
173
- min-height: 100%;
174
- padding-bottom: 0%;
175
- }
176
- }
177
- &__content-wrapper {
178
- min-width: 100%;
179
-
180
- @media #{core.$screen-md-up} {
181
- min-width: 50%;
182
- }
183
- }
184
- &__content {
185
- padding: core.$space-l;
186
-
187
- @media #{core.$screen-md-up} {
188
- padding: core.$space-xxxxl core.$space-xxxxl core.$space-l;
189
- }
190
- }
191
- &__body {
192
- p {
193
- @include truncate-card-1col-body-text;
194
- }
195
- }
196
-
197
- &__actions {
198
- padding: core.$space-none core.$space-l core.$space-l;
199
-
200
- @media #{core.$screen-md-up} {
201
- padding: core.$space-none core.$space-xxxxl core.$space-xxxxl;
202
- }
203
- }
204
- }
205
- }
206
- }
207
-
208
- // Set height of card to not equalise
209
- .height-non-equalised .uq-card {
210
- height: auto;
211
- }
212
-
213
- // This should be replaced with a component specfic class or removed and documented as a body package dependancy for usage with cards.
214
- .text--link {
215
- color: core.$link;
216
- text-decoration: none;
217
- transition: 0.2s color;
218
-
219
- &:hover {
220
- color: core.$link;
221
- text-decoration: underline;
222
- }
223
- }