@sb1/ffe-cards 12.0.12 → 14.0.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/less/card-base.less +1 -43
- package/less/cards.less +1 -0
- package/less/common-card-styling.less +46 -0
- package/less/components.less +5 -10
- package/less/icon-card.less +6 -8
- package/less/image-card.less +12 -6
- package/less/text-card.less +3 -1
- package/package.json +3 -3
- package/less/animation.less +0 -56
package/less/card-base.less
CHANGED
|
@@ -1,48 +1,6 @@
|
|
|
1
1
|
.ffe-card-base {
|
|
2
|
-
|
|
2
|
+
.common-card-styling();
|
|
3
3
|
|
|
4
|
-
background: @ffe-farge-hvit;
|
|
5
|
-
box-shadow: 0 1px 4px 0 rgba(38, 38, 38, 0.3);
|
|
6
4
|
display: block;
|
|
7
|
-
margin: 0 0 @ffe-spacing-xs;
|
|
8
5
|
padding: 0;
|
|
9
|
-
border: 2px solid transparent;
|
|
10
|
-
border-radius: 5px;
|
|
11
|
-
transition: border-color 0.2s;
|
|
12
|
-
outline: none;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
width: 100%;
|
|
15
|
-
text-decoration: none;
|
|
16
|
-
.native & {
|
|
17
|
-
@media (prefers-color-scheme: dark) {
|
|
18
|
-
box-shadow: 0 0 0 1px @ffe-farge-moerkgraa;
|
|
19
|
-
background: @ffe-farge-svart;
|
|
20
|
-
color: @ffe-farge-hvit;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&:focus {
|
|
25
|
-
box-shadow: 0 0 0 2px @ffe-farge-vann;
|
|
26
|
-
|
|
27
|
-
.native & {
|
|
28
|
-
@media (prefers-color-scheme: dark) {
|
|
29
|
-
box-shadow: 0 0 0 2px @ffe-farge-vann-70;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&:focus,
|
|
35
|
-
&:active,
|
|
36
|
-
&:hover {
|
|
37
|
-
border-color: @ffe-farge-vann;
|
|
38
|
-
.native & {
|
|
39
|
-
@media (prefers-color-scheme: dark) {
|
|
40
|
-
border-color: @ffe-farge-vann-70;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@media (min-width: @breakpoint-md) {
|
|
46
|
-
margin-bottom: @ffe-spacing-md;
|
|
47
|
-
}
|
|
48
6
|
}
|
package/less/cards.less
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.common-card-styling() {
|
|
2
|
+
&:extend(.ffe-body-text);
|
|
3
|
+
|
|
4
|
+
background: @ffe-farge-hvit;
|
|
5
|
+
box-shadow: 0 1px 4px 0 rgba(38, 38, 38, 0.3);
|
|
6
|
+
margin: 0 0 @ffe-spacing-xs;
|
|
7
|
+
border: 2px solid transparent;
|
|
8
|
+
border-radius: 5px;
|
|
9
|
+
transition: border-color 0.2s;
|
|
10
|
+
outline: none;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
width: 100%;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
.native & {
|
|
15
|
+
@media (prefers-color-scheme: dark) {
|
|
16
|
+
box-shadow: 0 0 0 1px @ffe-farge-moerkgraa;
|
|
17
|
+
background: @ffe-farge-svart;
|
|
18
|
+
color: @ffe-farge-hvit;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:focus {
|
|
23
|
+
box-shadow: 0 0 0 2px @ffe-farge-vann;
|
|
24
|
+
|
|
25
|
+
.native & {
|
|
26
|
+
@media (prefers-color-scheme: dark) {
|
|
27
|
+
box-shadow: 0 0 0 2px @ffe-farge-vann-70;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:focus,
|
|
33
|
+
&:active,
|
|
34
|
+
&:hover {
|
|
35
|
+
border-color: @ffe-farge-vann;
|
|
36
|
+
.native & {
|
|
37
|
+
@media (prefers-color-scheme: dark) {
|
|
38
|
+
border-color: @ffe-farge-vann-70;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (min-width: @breakpoint-md) {
|
|
44
|
+
margin-bottom: @ffe-spacing-md;
|
|
45
|
+
}
|
|
46
|
+
}
|
package/less/components.less
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.ffe-card-
|
|
2
|
-
|
|
1
|
+
.ffe-card-body {
|
|
2
|
+
&__card-name {
|
|
3
3
|
margin: 0 0 @ffe-spacing-2xs 0;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
&__text {
|
|
7
7
|
margin: @ffe-spacing-2xs 0 0 0;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
&__subtext {
|
|
11
11
|
&:extend(.ffe-small-text);
|
|
12
12
|
|
|
13
13
|
color: @ffe-farge-moerkgraa;
|
|
@@ -20,13 +20,8 @@
|
|
|
20
20
|
margin: @ffe-spacing-2xs 0 0 0;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
&__title {
|
|
24
24
|
&:extend(.ffe-h5);
|
|
25
|
-
.native & {
|
|
26
|
-
@media (prefers-color-scheme: dark) {
|
|
27
|
-
color: @ffe-farge-vann-70;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
25
|
|
|
31
26
|
margin: 0;
|
|
32
27
|
|
package/less/icon-card.less
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
.ffe-icon-card {
|
|
2
|
+
.common-card-styling();
|
|
3
|
+
|
|
4
|
+
display: flex;
|
|
5
|
+
padding: @ffe-spacing-md;
|
|
2
6
|
max-width: 440px;
|
|
3
7
|
min-height: 130px;
|
|
4
|
-
padding: @ffe-spacing-md;
|
|
5
|
-
display: flex;
|
|
6
8
|
flex-flow: row nowrap;
|
|
7
9
|
|
|
8
10
|
&__icon {
|
|
@@ -52,11 +54,7 @@
|
|
|
52
54
|
margin: 0 @ffe-spacing-sm 0 0;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
.ffe-
|
|
56
|
-
margin: 0 0 @ffe-spacing-2xs;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.ffe-icon-component--subtext {
|
|
57
|
+
.ffe-card-body__subtext {
|
|
60
58
|
margin: 0;
|
|
61
59
|
|
|
62
60
|
@media (min-width: @breakpoint-md) {
|
|
@@ -75,7 +73,7 @@
|
|
|
75
73
|
}
|
|
76
74
|
}
|
|
77
75
|
|
|
78
|
-
.ffe-card-
|
|
76
|
+
.ffe-card-body__title,
|
|
79
77
|
.ffe-icon-card__body {
|
|
80
78
|
color: @ffe-farge-moerkgraa;
|
|
81
79
|
.native & {
|
package/less/image-card.less
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
.ffe-image-card {
|
|
2
|
-
|
|
2
|
+
.common-card-styling();
|
|
3
|
+
|
|
4
|
+
display: flex;
|
|
3
5
|
padding: 0;
|
|
6
|
+
max-width: 290px;
|
|
4
7
|
border: 0;
|
|
5
|
-
display: flex;
|
|
6
8
|
flex-flow: column nowrap;
|
|
7
9
|
|
|
8
10
|
&:focus,
|
|
9
11
|
&:active,
|
|
10
12
|
&:hover {
|
|
11
|
-
.ffe-image-
|
|
13
|
+
.ffe-image-card__image-overlay,
|
|
12
14
|
.ffe-image-card__body {
|
|
13
15
|
border-color: @ffe-farge-vann;
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
&__image {
|
|
19
|
+
&__image-container {
|
|
18
20
|
max-height: 160px;
|
|
19
21
|
position: relative;
|
|
20
22
|
overflow: hidden;
|
|
@@ -22,7 +24,11 @@
|
|
|
22
24
|
border-top-right-radius: 5px;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
|
-
&
|
|
27
|
+
&__image {
|
|
28
|
+
max-width: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&__image-overlay,
|
|
26
32
|
&__body {
|
|
27
33
|
width: 100%;
|
|
28
34
|
overflow: hidden;
|
|
@@ -30,7 +36,7 @@
|
|
|
30
36
|
transition: border-color @ffe-transition-duration;
|
|
31
37
|
}
|
|
32
38
|
|
|
33
|
-
&
|
|
39
|
+
&__image-overlay {
|
|
34
40
|
z-index: 10;
|
|
35
41
|
height: 100%;
|
|
36
42
|
border-bottom: 0;
|
package/less/text-card.less
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-cards",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"description": "Kort for bruk i oversikter",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"test": "npm run lint"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@sb1/ffe-core": "^
|
|
19
|
+
"@sb1/ffe-core": "^21.0.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@sb1/ffe-core": "*"
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "d2ba13791d9109477fc584ecda998e7bacfaf2c8"
|
|
28
28
|
}
|
package/less/animation.less
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Animation for loading insurance cards
|
|
3
|
-
Note that due to some IE11 related bug/feature this only works
|
|
4
|
-
with minified CSS when we specify both from and to
|
|
5
|
-
*/
|
|
6
|
-
@keyframes showInsuranceCards {
|
|
7
|
-
from {
|
|
8
|
-
opacity: 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
30% {
|
|
12
|
-
box-shadow: 0 0 28px rgba(0, 0, 0, 0.1);
|
|
13
|
-
transform: scale(1.02);
|
|
14
|
-
opacity: 1;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
100% {
|
|
18
|
-
transform: scale(1);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
to {
|
|
22
|
-
opacity: 1;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@keyframes showCardNotification {
|
|
27
|
-
100% {
|
|
28
|
-
transform: translateY(0);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.card-sequential-animation {
|
|
33
|
-
&:nth-child(0) { animation: showInsuranceCards 0.5s 0 forwards ease-out; }
|
|
34
|
-
&:nth-child(1) { animation: showInsuranceCards 0.5s 0.1s forwards ease-out; }
|
|
35
|
-
&:nth-child(2) { animation: showInsuranceCards 0.5s 0.2s forwards ease-out; }
|
|
36
|
-
&:nth-child(3) { animation: showInsuranceCards 0.5s 0.3s forwards ease-out; }
|
|
37
|
-
&:nth-child(4) { animation: showInsuranceCards 0.5s 0.4s forwards ease-out; }
|
|
38
|
-
&:nth-child(5) { animation: showInsuranceCards 0.5s 0.5s forwards ease-out; }
|
|
39
|
-
&:nth-child(6) { animation: showInsuranceCards 0.5s 0.6s forwards ease-out; }
|
|
40
|
-
&:nth-child(7) { animation: showInsuranceCards 0.5s 0.7s forwards ease-out; }
|
|
41
|
-
&:nth-child(8) { animation: showInsuranceCards 0.5s 0.8s forwards ease-out; }
|
|
42
|
-
&:nth-child(9) { animation: showInsuranceCards 0.5s 0.9s forwards ease-out; }
|
|
43
|
-
&:nth-child(10) { animation: showInsuranceCards 0.5s 1s forwards ease-out; }
|
|
44
|
-
&:nth-child(n+11) { animation: showInsuranceCards 0.5s 1.1s forwards ease-out; }
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.no-cssanimations {
|
|
48
|
-
.link-card {
|
|
49
|
-
transform: scale(1);
|
|
50
|
-
opacity: 1;
|
|
51
|
-
|
|
52
|
-
&__status {
|
|
53
|
-
transform: translateY(0);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|