@sb1/ffe-cards 15.0.3 → 16.0.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/less/cards.less CHANGED
@@ -3,3 +3,4 @@
3
3
  @import 'text-card';
4
4
  @import 'icon-card';
5
5
  @import 'image-card';
6
+ @import 'stippled-card';
@@ -5,7 +5,7 @@
5
5
  box-shadow: 0 1px 4px 0 var(--ffe-v-cards-common-card-box-shadow-color);
6
6
  margin: 0 0 @ffe-spacing-xs;
7
7
  border: 2px solid transparent;
8
- border-radius: 5px;
8
+ border-radius: var(--ffe-v-cards-common-card-border-radius);
9
9
  transition: border-color 0.2s;
10
10
  outline: none;
11
11
  cursor: pointer;
@@ -4,70 +4,34 @@
4
4
  .ffe-icon-card {
5
5
  .common-card-styling();
6
6
 
7
- display: flex;
7
+ display: grid;
8
+ grid-template-columns: auto 1fr;
9
+ align-items: center;
8
10
  padding: @ffe-spacing-md;
9
- max-width: 440px;
10
11
  min-height: 130px;
11
- flex-flow: row nowrap;
12
12
 
13
13
  &__icon {
14
- align-self: center;
15
- fill: var(--ffe-g-secondary-color);
16
- min-width: 40px;
14
+ fill: var(--ffe-v-cards-stippled-icon-color);
17
15
  width: 40px;
18
16
  height: 40px;
19
17
  margin: 0 @ffe-spacing-lg 0 @ffe-spacing-xs;
20
18
  }
21
19
 
22
- &__body {
23
- overflow: hidden;
24
- text-align: left;
25
- width: 100%;
26
- }
27
-
28
20
  @media (min-width: @breakpoint-md) {
29
21
  .ffe-icon-card__icon {
30
22
  margin: 0 @ffe-spacing-md 0;
31
23
  }
32
24
  }
33
-
34
- @media (min-width: @breakpoint-lg) {
35
- .ffe-icon-card__icon {
36
- margin: 0 @ffe-spacing-lg 0 @ffe-spacing-xs;
37
- }
38
- }
39
25
  }
40
26
 
41
27
  .ffe-icon-card--condensed {
42
- min-height: auto;
43
-
44
28
  @media (min-width: @breakpoint-md) {
45
29
  min-height: 100px;
46
30
  }
47
31
 
48
32
  .ffe-icon-card__icon {
49
- min-width: 30px;
50
33
  width: 30px;
51
34
  height: 30px;
52
- margin: 0 @ffe-spacing-sm 0 0;
53
- }
54
-
55
- .ffe-card-body__subtext {
56
- margin: 0;
57
-
58
- @media (min-width: @breakpoint-md) {
59
- margin: @ffe-spacing-2xs 0 0 0;
60
- }
61
- }
62
- }
63
-
64
- .ffe-icon-card--grey-charcoal {
65
- .ffe-icon-card__icon {
66
- fill: var(--ffe-v-cards-text-color);
67
- }
68
-
69
- .ffe-card-body__title,
70
- .ffe-icon-card__body {
71
- color: var(--ffe-v-cards-text-color);
35
+ margin: 0 var(--ffe-spacing-sm) 0 0;
72
36
  }
73
37
  }
@@ -23,8 +23,8 @@
23
23
  max-height: 160px;
24
24
  position: relative;
25
25
  overflow: hidden;
26
- border-top-left-radius: 5px;
27
- border-top-right-radius: 5px;
26
+ border-top-left-radius: var(--ffe-v-cards-common-card-border-radius);
27
+ border-top-right-radius: var(--ffe-v-cards-common-card-border-radius);
28
28
  }
29
29
 
30
30
  &__image {
@@ -43,8 +43,8 @@
43
43
  z-index: 10;
44
44
  height: 100%;
45
45
  border-bottom: 0;
46
- border-top-left-radius: 5px;
47
- border-top-right-radius: 5px;
46
+ border-top-left-radius: var(--ffe-v-cards-common-card-border-radius);
47
+ border-top-right-radius: var(--ffe-v-cards-common-card-border-radius);
48
48
  position: absolute;
49
49
  }
50
50
 
@@ -52,8 +52,10 @@
52
52
  text-align: center;
53
53
  padding: @ffe-spacing-sm @ffe-spacing-sm @ffe-spacing-xs @ffe-spacing-sm;
54
54
  border-top: 0;
55
- border-bottom-left-radius: 5px;
56
- border-bottom-right-radius: 5px;
55
+ border-bottom-left-radius: var(--ffe-v-cards-common-card-border-radius);
56
+ border-bottom-right-radius: var(
57
+ --ffe-v-cards-common-card-border-radius
58
+ );
57
59
  min-height: 200px;
58
60
  }
59
61
 
@@ -0,0 +1,41 @@
1
+ @import 'common-card-styling';
2
+ @import 'components';
3
+
4
+ .ffe-stippled-card {
5
+ .common-card-styling();
6
+
7
+ background: transparent;
8
+ border: 2px dashed var(--ffe-v-cards-stippled-border-color);
9
+ box-shadow: none;
10
+ display: grid;
11
+ grid-template-columns: auto 1fr;
12
+ align-items: center;
13
+ padding: @ffe-spacing-md;
14
+ gap: @ffe-spacing-sm;
15
+
16
+ &:hover,
17
+ &:focus,
18
+ &:active {
19
+ border-style: solid;
20
+ box-shadow: none;
21
+ }
22
+
23
+ .native & {
24
+ @media (prefers-color-scheme: dark) {
25
+ box-shadow: none;
26
+ }
27
+ }
28
+ }
29
+
30
+ .ffe-stippled-card__img--icon {
31
+ margin: 0 @ffe-spacing-md 0 @ffe-spacing-xs;
32
+ fill: var(--ffe-v-cards-stippled-icon-color);
33
+ height: 40px;
34
+ width: 40px;
35
+ }
36
+
37
+ .ffe-stippled-card--condensed .ffe-stippled-card__img--icon {
38
+ margin: 0 @ffe-spacing-xs 0 0;
39
+ height: 30px;
40
+ width: 30px;
41
+ }
package/less/theme.less CHANGED
@@ -1,8 +1,11 @@
1
1
  :root {
2
2
  --ffe-v-cards-common-card-background-color: var(--ffe-farge-hvit);
3
3
  --ffe-v-cards-common-card-box-shadow-color: var(--ffe-farge-graa);
4
+ --ffe-v-cards-common-card-border-radius: 16px;
4
5
  --ffe-v-cards-text-color: var(--ffe-farge-moerkgraa);
5
6
  --ffe-v-cards-image-card-border-hover-color: var(--ffe-farge-vann);
7
+ --ffe-v-cards-stippled-border-color: var(--ffe-farge-vann);
8
+ --ffe-v-cards-stippled-icon-color: var(--ffe-farge-fjell);
6
9
 
7
10
  @media (prefers-color-scheme: dark) {
8
11
  .native {
@@ -11,6 +14,8 @@
11
14
  --ffe-farge-moerkgraa
12
15
  );
13
16
  --ffe-v-cards-text-color: var(--ffe-farge-graa);
17
+ --ffe-v-cards-stippled-border-color: var(--ffe-farge-vann-70);
18
+ --ffe-v-cards-stippled-icon-color: var(--ffe-farge-vann-70);
14
19
  }
15
20
  }
16
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-cards",
3
- "version": "15.0.3",
3
+ "version": "16.0.0",
4
4
  "description": "Kort for bruk i oversikter",
5
5
  "license": "MIT",
6
6
  "author": "SpareBank 1",
@@ -24,5 +24,5 @@
24
24
  "publishConfig": {
25
25
  "access": "public"
26
26
  },
27
- "gitHead": "1ab898e744977e4cb4db1bee9b65369a0deeef9a"
27
+ "gitHead": "10adc7c7a295275039de6714a63c7d4fa8ec0232"
28
28
  }