@helsenorge/designsystem-react 9.1.0 → 9.3.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.
@@ -1,22 +1,26 @@
1
1
  @use 'sass:map';
2
+ @import '../../scss/font-settings';
2
3
  @import '../../scss/palette';
3
4
  @import '../../scss/spacers';
4
5
  @import '../../scss/breakpoints';
6
+ @import '../../scss/screen-reader';
7
+ @import '../../scss/supernova/styles/colors';
5
8
 
6
9
  @mixin tile-title {
7
10
  overflow-wrap: break-word;
8
11
  word-wrap: break-word;
9
12
  word-break: break-word;
10
- font-size: 1.5rem;
13
+ font-size: $font-size-sm;
11
14
  text-align: left;
12
- line-height: 1.75rem;
13
- font-weight: 600;
14
- margin: 0;
15
- margin-left: 0.5rem;
16
-
17
- @media (min-width: map.get($grid-breakpoints, sm)) {
18
- font-size: 1.25rem;
19
- margin-top: 1rem;
15
+ line-height: 1.74rem;
16
+ font-weight: 400;
17
+ margin: getSpacer(3xs) 0 0 getSpacer(2xs);
18
+
19
+ @media (min-width: map.get($grid-breakpoints, md)) {
20
+ font-weight: 600;
21
+ font-size: $font-size-md;
22
+ line-height: 1.625rem;
23
+ margin-top: getSpacer(s);
20
24
  }
21
25
  }
22
26
 
@@ -26,15 +30,21 @@
26
30
 
27
31
  display: flex;
28
32
  width: inherit;
29
- padding: 1.5rem 2rem 2rem 1rem;
33
+ padding: getSpacer(2xs) getSpacer(2xs) getSpacer(xs);
30
34
  flex-direction: column;
31
- justify-content: flex-start;
32
- background-color: $white;
35
+ justify-content: center;
36
+ background-color: var(--core-color-white);
33
37
  color: $black;
34
38
  text-decoration: none;
35
39
  cursor: pointer;
40
+ border: 1px solid var(--color-base-border-blueberry);
36
41
  outline: none;
37
42
 
43
+ @media (min-width: map.get($grid-breakpoints, md)) {
44
+ padding: getSpacer(l) getSpacer(m) getSpacer(l) getSpacer(s);
45
+ justify-content: flex-start;
46
+ }
47
+
38
48
  @media print {
39
49
  border: 1px solid $black;
40
50
  }
@@ -45,7 +55,11 @@
45
55
  }
46
56
 
47
57
  &--compact {
48
- padding: 1.5rem 1rem;
58
+ padding: getSpacer(2xs) getSpacer(2xs) getSpacer(xs);
59
+
60
+ @media (min-width: map.get($grid-breakpoints, md)) {
61
+ padding: getSpacer(s) getSpacer(m) getSpacer(s) getSpacer(s);
62
+ }
49
63
  }
50
64
 
51
65
  svg {
@@ -53,39 +67,36 @@
53
67
  }
54
68
 
55
69
  &:hover,
56
- &:active,
57
- &:focus {
58
- background-color: $neutral100;
70
+ &:active {
71
+ background-color: var(--color-action-background-ondark-selected);
59
72
  }
60
73
 
61
- &:focus {
62
- box-shadow: 0 0 0 6px $neutral600;
74
+ &:focus-visible {
75
+ box-shadow: 0 0 0 3px var(--color-action-border-onlight-focus);
76
+ border-color: var(--color-action-border-onlight-focus);
63
77
  }
64
78
 
65
79
  &--highlighted {
66
80
  background-color: $blueberry500;
81
+ border-color: $blueberry500;
67
82
  color: $white;
68
83
 
69
84
  &:hover,
70
- &:active,
71
- &:focus {
85
+ &:active {
72
86
  background-color: $blueberry700;
87
+ border-color: $blueberry700;
73
88
  }
74
89
 
75
- &:focus {
76
- box-shadow: 0 0 0 6px $blueberry700;
90
+ &:focus-visible {
91
+ border-color: var(--color-action-border-onlight-focus);
77
92
  }
78
93
  }
79
94
 
80
95
  &__title {
81
96
  @include tile-title;
82
-
83
- &--compact {
84
- margin: 0 0 0 1.5rem;
85
- }
86
97
  }
87
98
 
88
- #{$tile}:focus & {
99
+ #{$tile}:focus-visible & {
89
100
  &__title {
90
101
  &--highlighted {
91
102
  text-decoration: underline;
@@ -106,12 +117,11 @@
106
117
 
107
118
  .title-wrapper {
108
119
  display: flex;
109
- flex-direction: row;
120
+ flex-direction: column;
110
121
  align-items: center;
111
122
  padding-bottom: 0.5rem;
112
123
 
113
- @media (min-width: map.get($grid-breakpoints, sm)) {
114
- flex-direction: column;
124
+ @media (min-width: map.get($grid-breakpoints, md)) {
115
125
  align-items: start;
116
126
 
117
127
  @media print {
@@ -3,7 +3,6 @@ export type Styles = {
3
3
  tile__children: string;
4
4
  tile__description: string;
5
5
  tile__title: string;
6
- 'tile__title--compact': string;
7
6
  'tile__title--highlighted': string;
8
7
  'tile--compact': string;
9
8
  'tile--fixed': string;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "git+https://github.com/helsenorge/designsystem.git"
8
8
  },
9
9
  "homepage": "https://helsenorge.design",
10
- "version": "9.1.0",
10
+ "version": "9.3.0",
11
11
  "author": "Helsenorge",
12
12
  "license": "MIT",
13
13
  "dependencies": {