@helsenorge/designsystem-react 3.0.0 → 3.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/CHANGELOG.md +380 -668
- package/HelpBubble.js +1 -1
- package/HelpBubble.js.map +1 -1
- package/HorizontalScroll.js.map +1 -1
- package/Input.js +1 -1
- package/Input.js.map +1 -1
- package/ListHeader.js +1 -1
- package/ListHeader.js.map +1 -1
- package/Modal.js.map +1 -1
- package/PopOver.js +1 -1
- package/PopOver.js.map +1 -1
- package/RadioButton.js +1 -1
- package/RadioButton.js.map +1 -1
- package/Textarea.js +1 -1
- package/Textarea.js.map +1 -1
- package/Title.js.map +1 -1
- package/Tooltip.js.map +1 -1
- package/TooltipWord.js +1 -1
- package/TooltipWord.js.map +1 -1
- package/components/AnchorLink/styles.module.scss +11 -6
- package/components/Avatar/styles.module.scss +2 -2
- package/components/Badge/styles.module.scss +7 -1
- package/components/Button/styles.module.scss +35 -21
- package/components/Checkbox/styles.module.scss +12 -12
- package/components/Close/styles.module.scss +15 -7
- package/components/Dropdown/index.js +1 -1
- package/components/Dropdown/index.js.map +1 -1
- package/components/Dropdown/styles.module.scss +31 -10
- package/components/Duolist/styles.module.scss +5 -3
- package/components/ErrorWrapper/styles.module.scss +8 -6
- package/components/Expander/styles.module.scss +46 -15
- package/components/ExpanderHierarchy/expander.module.scss +13 -8
- package/components/ExpanderHierarchy/expander.module.scss.d.ts +1 -1
- package/components/ExpanderHierarchy/styles.module.scss +3 -3
- package/components/ExpanderList/index.js.map +1 -1
- package/components/ExpanderList/styles.module.scss +17 -6
- package/components/FormExample/FormExample.d.ts.map +1 -1
- package/components/FormExample/index.js.map +1 -1
- package/components/FormExample/styles.module.scss +6 -6
- package/components/FormGroup/styles.module.scss +5 -4
- package/components/FormLayout/styles.module.scss +5 -2
- package/components/HelpBubble/HelpBubble.d.ts +2 -2
- package/components/HelpBubble/HelpBubble.d.ts.map +1 -1
- package/components/HelpBubble/index.js +1 -1
- package/components/HelpBubble/styles.module.scss +10 -10
- package/components/HelpBubble/styles.module.scss.d.ts +0 -1
- package/components/HelpBubbleExample/index.js +1 -1
- package/components/HighlightBox/index.js.map +1 -1
- package/components/HighlightBox/styles.module.scss +38 -29
- package/components/HorizontalScroll/HorizontalScroll.d.ts.map +1 -1
- package/components/HorizontalScroll/styles.module.scss +10 -3
- package/components/Icons/SortUp.js +1 -1
- package/components/Icons/SortUp.js.map +1 -1
- package/components/Input/Input.d.ts.map +1 -1
- package/components/Input/styles.module.scss +8 -7
- package/components/LinkList/styles.module.scss +23 -5
- package/components/List/styles.module.scss +4 -0
- package/components/ListHeader/ListHeader.d.ts +9 -7
- package/components/ListHeader/ListHeader.d.ts.map +1 -1
- package/components/ListHeader/styles.module.scss +36 -11
- package/components/Loader/styles.module.scss +40 -18
- package/components/Logo/index.js.map +1 -1
- package/components/MaxCharacters/styles.module.scss +7 -5
- package/components/Modal/styles.module.scss +39 -23
- package/components/NotificationPanel/DetailButton/styles.module.scss +9 -5
- package/components/NotificationPanel/index.js.map +1 -1
- package/components/NotificationPanel/styles.module.scss +45 -12
- package/components/Panel/styles.module.scss +53 -29
- package/components/PanelList/styles.module.scss +6 -5
- package/components/PopMenu/PopMenu.d.ts.map +1 -1
- package/components/PopMenu/styles.module.scss +28 -7
- package/components/PopOver/PopOver.d.ts +5 -3
- package/components/PopOver/PopOver.d.ts.map +1 -1
- package/components/PopOver/componentdata.json +1 -1
- package/components/PopOver/styles.module.scss +16 -13
- package/components/RadioButton/RadioButton.d.ts.map +1 -1
- package/components/RadioButton/styles.module.scss +12 -14
- package/components/Select/styles.module.scss +14 -8
- package/components/Slider/Slider.d.ts.map +1 -1
- package/components/Slider/index.js +1 -1
- package/components/Slider/index.js.map +1 -1
- package/components/Slider/styles.module.scss +1 -1
- package/components/Spacer/styles.module.scss +13 -1
- package/components/StatusDot/styles.module.scss +2 -2
- package/components/Stepper/styles.module.scss +28 -20
- package/components/Table/Table.d.ts.map +1 -1
- package/components/Table/index.js +1 -1
- package/components/Table/index.js.map +1 -1
- package/components/Table/styles.module.scss +32 -20
- package/components/Tag/styles.module.scss +39 -27
- package/components/TagList/styles.module.scss +3 -3
- package/components/Textarea/Textarea.d.ts.map +1 -1
- package/components/Textarea/styles.module.scss +6 -5
- package/components/Tile/styles.module.scss +11 -6
- package/components/Title/Title.d.ts +1 -1
- package/components/Title/Title.d.ts.map +1 -1
- package/components/Title/styles.module.scss +5 -0
- package/components/Tooltip/TooltipWord/TooltipWord.d.ts +1 -1
- package/components/Tooltip/TooltipWord/TooltipWord.d.ts.map +1 -1
- package/components/Tooltip/TooltipWord/styles.module.scss +3 -3
- package/components/Tooltip/index.js +1 -1
- package/components/TooltipExample/index.js +1 -1
- package/components/Validation/styles.module.scss +3 -3
- package/hoc/withBreakpoint/withBreakpoint.d.ts +1 -1
- package/hoc/withBreakpoint/withBreakpoint.d.ts.map +1 -1
- package/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
- package/hooks/useFocusTrap.d.ts.map +1 -1
- package/hooks/useFocusTrap.js.map +1 -1
- package/hooks/useSize.js.map +1 -1
- package/package.json +1 -1
- package/scss/_body.scss +3 -1
- package/scss/_breakpoints.scss +5 -8
- package/scss/_figma-tokens.scss +2 -2
- package/scss/_fonts.scss +36 -21
- package/scss/_grid.scss +5 -4
- package/scss/_input.scss +20 -11
- package/scss/_palette.scss +3 -11
- package/scss/_print.scss +58 -18
- package/scss/_screen-reader.scss +0 -2
- package/scss/_spacers.scss +17 -15
- package/scss/_title.scss +11 -5
- package/scss/helsenorge.scss +1 -1
- package/scss/typography.module.scss +20 -13
- package/utils/component.d.ts +1 -0
- package/utils/component.d.ts.map +1 -1
- package/utils/component.js +1 -1
- package/utils/component.js.map +1 -1
- package/utils/debounce.d.ts +1 -2
- package/utils/debounce.d.ts.map +1 -1
- package/utils/debounce.js +1 -1
- package/utils/debounce.js.map +1 -1
package/scss/_print.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@import 'palette';
|
|
2
3
|
@import 'breakpoints';
|
|
3
4
|
|
|
@@ -14,10 +15,11 @@
|
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
body {
|
|
17
|
-
min-width: map
|
|
18
|
+
min-width: map.get($grid-breakpoints, lg) !important;
|
|
18
19
|
}
|
|
20
|
+
|
|
19
21
|
.container {
|
|
20
|
-
min-width: map
|
|
22
|
+
min-width: map.get($grid-breakpoints, lg) !important;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
abbr[title]::after {
|
|
@@ -60,120 +62,158 @@
|
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
.col-print-1 {
|
|
63
|
-
max-width: 8.
|
|
65
|
+
max-width: 8.3333%;
|
|
64
66
|
}
|
|
67
|
+
|
|
65
68
|
.col-print-2 {
|
|
66
|
-
max-width: 16.
|
|
69
|
+
max-width: 16.6667%;
|
|
67
70
|
}
|
|
71
|
+
|
|
68
72
|
.col-print-3 {
|
|
69
73
|
max-width: 25%;
|
|
70
74
|
}
|
|
75
|
+
|
|
71
76
|
.col-print-4 {
|
|
72
|
-
max-width: 33.
|
|
77
|
+
max-width: 33.3333%;
|
|
73
78
|
}
|
|
79
|
+
|
|
74
80
|
.col-print-5 {
|
|
75
|
-
max-width: 41.
|
|
81
|
+
max-width: 41.6667%;
|
|
76
82
|
}
|
|
83
|
+
|
|
77
84
|
.col-print-6 {
|
|
78
85
|
max-width: 50%;
|
|
79
86
|
}
|
|
87
|
+
|
|
80
88
|
.col-print-7 {
|
|
81
|
-
max-width: 58.
|
|
89
|
+
max-width: 58.3333%;
|
|
82
90
|
}
|
|
91
|
+
|
|
83
92
|
.col-print-8 {
|
|
84
|
-
max-width: 66.
|
|
93
|
+
max-width: 66.6667%;
|
|
85
94
|
}
|
|
95
|
+
|
|
86
96
|
.col-print-9 {
|
|
87
97
|
max-width: 75%;
|
|
88
98
|
}
|
|
99
|
+
|
|
89
100
|
.col-print-10 {
|
|
90
|
-
max-width: 83.
|
|
101
|
+
max-width: 83.3333%;
|
|
91
102
|
}
|
|
103
|
+
|
|
92
104
|
.col-print-11 {
|
|
93
|
-
max-width: 91.
|
|
105
|
+
max-width: 91.6667%;
|
|
94
106
|
}
|
|
107
|
+
|
|
95
108
|
.col-print-12 {
|
|
96
109
|
max-width: 100%;
|
|
97
110
|
}
|
|
111
|
+
|
|
98
112
|
.order-print-first {
|
|
99
113
|
order: -1;
|
|
100
114
|
}
|
|
115
|
+
|
|
101
116
|
.order-print-last {
|
|
102
117
|
order: 13;
|
|
103
118
|
}
|
|
119
|
+
|
|
104
120
|
.order-print-0 {
|
|
105
121
|
order: 0;
|
|
106
122
|
}
|
|
123
|
+
|
|
107
124
|
.order-print-1 {
|
|
108
125
|
order: 1;
|
|
109
126
|
}
|
|
127
|
+
|
|
110
128
|
.order-print-2 {
|
|
111
129
|
order: 2;
|
|
112
130
|
}
|
|
131
|
+
|
|
113
132
|
.order-print-3 {
|
|
114
133
|
order: 3;
|
|
115
134
|
}
|
|
135
|
+
|
|
116
136
|
.order-print-4 {
|
|
117
137
|
order: 4;
|
|
118
138
|
}
|
|
139
|
+
|
|
119
140
|
.order-print-5 {
|
|
120
141
|
order: 5;
|
|
121
142
|
}
|
|
143
|
+
|
|
122
144
|
.order-print-6 {
|
|
123
145
|
order: 6;
|
|
124
146
|
}
|
|
147
|
+
|
|
125
148
|
.order-print-7 {
|
|
126
149
|
order: 7;
|
|
127
150
|
}
|
|
151
|
+
|
|
128
152
|
.order-print-8 {
|
|
129
153
|
order: 8;
|
|
130
154
|
}
|
|
155
|
+
|
|
131
156
|
.order-print-9 {
|
|
132
157
|
order: 9;
|
|
133
158
|
}
|
|
159
|
+
|
|
134
160
|
.order-print-10 {
|
|
135
161
|
order: 10;
|
|
136
162
|
}
|
|
163
|
+
|
|
137
164
|
.order-print-11 {
|
|
138
165
|
order: 11;
|
|
139
166
|
}
|
|
167
|
+
|
|
140
168
|
.order-print-12 {
|
|
141
169
|
order: 12;
|
|
142
170
|
}
|
|
171
|
+
|
|
143
172
|
.offset-print-0 {
|
|
144
173
|
margin-left: 0;
|
|
145
174
|
}
|
|
175
|
+
|
|
146
176
|
.offset-print-1 {
|
|
147
|
-
margin-left: 8.
|
|
177
|
+
margin-left: 8.3333%;
|
|
148
178
|
}
|
|
179
|
+
|
|
149
180
|
.offset-print-2 {
|
|
150
|
-
margin-left: 16.
|
|
181
|
+
margin-left: 16.6667%;
|
|
151
182
|
}
|
|
183
|
+
|
|
152
184
|
.offset-print-3 {
|
|
153
185
|
margin-left: 25%;
|
|
154
186
|
}
|
|
187
|
+
|
|
155
188
|
.offset-print-4 {
|
|
156
|
-
margin-left: 33.
|
|
189
|
+
margin-left: 33.3333%;
|
|
157
190
|
}
|
|
191
|
+
|
|
158
192
|
.offset-print-5 {
|
|
159
|
-
margin-left: 41.
|
|
193
|
+
margin-left: 41.6667%;
|
|
160
194
|
}
|
|
195
|
+
|
|
161
196
|
.offset-print-6 {
|
|
162
197
|
margin-left: 50%;
|
|
163
198
|
}
|
|
199
|
+
|
|
164
200
|
.offset-print-7 {
|
|
165
|
-
margin-left: 58.
|
|
201
|
+
margin-left: 58.3333%;
|
|
166
202
|
}
|
|
203
|
+
|
|
167
204
|
.offset-print-8 {
|
|
168
|
-
margin-left: 66.
|
|
205
|
+
margin-left: 66.6667%;
|
|
169
206
|
}
|
|
207
|
+
|
|
170
208
|
.offset-print-9 {
|
|
171
209
|
margin-left: 75%;
|
|
172
210
|
}
|
|
211
|
+
|
|
173
212
|
.offset-print-10 {
|
|
174
|
-
margin-left: 83.
|
|
213
|
+
margin-left: 83.3333%;
|
|
175
214
|
}
|
|
215
|
+
|
|
176
216
|
.offset-print-11 {
|
|
177
|
-
margin-left: 91.
|
|
217
|
+
margin-left: 91.6667%;
|
|
178
218
|
}
|
|
179
219
|
}
|
package/scss/_screen-reader.scss
CHANGED
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
@mixin sr-only() {
|
|
31
31
|
border: 0 !important;
|
|
32
32
|
clip: rect(1px, 1px, 1px, 1px) !important; /* 1 */
|
|
33
|
-
-webkit-clip-path: inset(50%) !important;
|
|
34
33
|
clip-path: inset(50%) !important; /* 2 */
|
|
35
34
|
height: 1px !important;
|
|
36
35
|
margin: -1px !important;
|
|
@@ -54,7 +53,6 @@
|
|
|
54
53
|
&:active,
|
|
55
54
|
&:focus {
|
|
56
55
|
clip: auto !important;
|
|
57
|
-
-webkit-clip-path: none !important;
|
|
58
56
|
clip-path: none !important;
|
|
59
57
|
height: auto !important;
|
|
60
58
|
margin: auto !important;
|
package/scss/_spacers.scss
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
1
3
|
$spacer: 1rem;
|
|
2
4
|
$spacers: (
|
|
3
5
|
0: 0,
|
|
@@ -17,24 +19,24 @@ $spacers: (
|
|
|
17
19
|
);
|
|
18
20
|
|
|
19
21
|
@function getSpacer($spacerSize) {
|
|
20
|
-
$
|
|
22
|
+
$spacer-value: map.get(
|
|
21
23
|
(
|
|
22
|
-
4xs: map
|
|
23
|
-
3xs: map
|
|
24
|
-
2xs: map
|
|
25
|
-
xs: map
|
|
26
|
-
s: map
|
|
27
|
-
m: map
|
|
28
|
-
l: map
|
|
29
|
-
xl: map
|
|
30
|
-
2xl: map
|
|
31
|
-
3xl: map
|
|
32
|
-
4xl: map
|
|
33
|
-
5xl: map
|
|
34
|
-
6xl: map
|
|
24
|
+
4xs: map.get($spacers, 1),
|
|
25
|
+
3xs: map.get($spacers, 2),
|
|
26
|
+
2xs: map.get($spacers, 3),
|
|
27
|
+
xs: map.get($spacers, 4),
|
|
28
|
+
s: map.get($spacers, 5),
|
|
29
|
+
m: map.get($spacers, 6),
|
|
30
|
+
l: map.get($spacers, 7),
|
|
31
|
+
xl: map.get($spacers, 8),
|
|
32
|
+
2xl: map.get($spacers, 9),
|
|
33
|
+
3xl: map.get($spacers, 10),
|
|
34
|
+
4xl: map.get($spacers, 11),
|
|
35
|
+
5xl: map.get($spacers, 12),
|
|
36
|
+
6xl: map.get($spacers, 13),
|
|
35
37
|
),
|
|
36
38
|
$spacerSize
|
|
37
39
|
);
|
|
38
40
|
|
|
39
|
-
@return $
|
|
41
|
+
@return $spacer-value;
|
|
40
42
|
}
|
package/scss/_title.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@import './spacers';
|
|
2
3
|
@import './breakpoints';
|
|
3
4
|
@import './font-settings';
|
|
@@ -6,7 +7,8 @@
|
|
|
6
7
|
font-size: 2.375rem;
|
|
7
8
|
line-height: 2.875rem;
|
|
8
9
|
font-weight: 600;
|
|
9
|
-
|
|
10
|
+
|
|
11
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
10
12
|
font-size: 4rem;
|
|
11
13
|
line-height: 5rem;
|
|
12
14
|
}
|
|
@@ -16,7 +18,8 @@
|
|
|
16
18
|
font-size: 2.25rem;
|
|
17
19
|
line-height: 2.75rem;
|
|
18
20
|
font-weight: 600;
|
|
19
|
-
|
|
21
|
+
|
|
22
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
20
23
|
font-size: 3.25rem;
|
|
21
24
|
line-height: 3.75rem;
|
|
22
25
|
}
|
|
@@ -26,7 +29,8 @@
|
|
|
26
29
|
font-size: 1.625rem;
|
|
27
30
|
line-height: 2.125rem;
|
|
28
31
|
font-weight: 600;
|
|
29
|
-
|
|
32
|
+
|
|
33
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
30
34
|
font-size: 2rem;
|
|
31
35
|
line-height: 2.75rem;
|
|
32
36
|
}
|
|
@@ -36,7 +40,8 @@
|
|
|
36
40
|
font-size: 1.375rem;
|
|
37
41
|
line-height: 1.875rem;
|
|
38
42
|
font-weight: 600;
|
|
39
|
-
|
|
43
|
+
|
|
44
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
40
45
|
font-size: 1.5rem;
|
|
41
46
|
line-height: 2rem;
|
|
42
47
|
}
|
|
@@ -53,7 +58,8 @@
|
|
|
53
58
|
line-height: 1.5rem;
|
|
54
59
|
font-weight: 700;
|
|
55
60
|
text-transform: uppercase;
|
|
56
|
-
|
|
61
|
+
|
|
62
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
57
63
|
font-size: $font-size-sm;
|
|
58
64
|
}
|
|
59
65
|
}
|
package/scss/helsenorge.scss
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@import './spacers';
|
|
2
3
|
@import './breakpoints';
|
|
3
|
-
@import './fonts
|
|
4
|
+
@import './fonts';
|
|
4
5
|
@import './palette';
|
|
5
|
-
@import './title
|
|
6
|
+
@import './title';
|
|
6
7
|
|
|
7
8
|
/*
|
|
8
9
|
Denne filen er ment til å importeres som en css module:
|
|
9
|
-
import designsystemtypography from './scss/
|
|
10
|
+
import designsystemtypography from './scss/typography.scss'
|
|
10
11
|
<div className={designsystemtypography.title1}></div>
|
|
11
12
|
*/
|
|
12
13
|
|
|
@@ -43,7 +44,8 @@ import designsystemtypography from './scss/_typography.scss'
|
|
|
43
44
|
font-size: 1.375rem;
|
|
44
45
|
line-height: getSpacer(l);
|
|
45
46
|
font-weight: 600;
|
|
46
|
-
|
|
47
|
+
|
|
48
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
47
49
|
font-size: getSpacer(m);
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -52,7 +54,8 @@ import designsystemtypography from './scss/_typography.scss'
|
|
|
52
54
|
font-size: $font-size-md;
|
|
53
55
|
line-height: 1.625rem;
|
|
54
56
|
font-weight: 600;
|
|
55
|
-
|
|
57
|
+
|
|
58
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
56
59
|
font-size: getSpacer(m);
|
|
57
60
|
line-height: $lineheight-size-md;
|
|
58
61
|
}
|
|
@@ -61,7 +64,8 @@ import designsystemtypography from './scss/_typography.scss'
|
|
|
61
64
|
.label {
|
|
62
65
|
font-size: $font-size-sm;
|
|
63
66
|
line-height: getSpacer(m);
|
|
64
|
-
|
|
67
|
+
|
|
68
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
65
69
|
font-size: $font-size-md;
|
|
66
70
|
line-height: $lineheight-size-sm;
|
|
67
71
|
}
|
|
@@ -70,7 +74,8 @@ import designsystemtypography from './scss/_typography.scss'
|
|
|
70
74
|
.table {
|
|
71
75
|
font-size: $font-size-sm;
|
|
72
76
|
line-height: $lineheight-size-sm;
|
|
73
|
-
|
|
77
|
+
|
|
78
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
74
79
|
font-size: $font-size-md;
|
|
75
80
|
}
|
|
76
81
|
}
|
|
@@ -78,7 +83,8 @@ import designsystemtypography from './scss/_typography.scss'
|
|
|
78
83
|
.strong {
|
|
79
84
|
font-size: $font-size-sm;
|
|
80
85
|
line-height: $lineheight-size-sm;
|
|
81
|
-
|
|
86
|
+
|
|
87
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
82
88
|
font-size: $font-size-md;
|
|
83
89
|
line-height: $lineheight-size-md;
|
|
84
90
|
}
|
|
@@ -87,7 +93,8 @@ import designsystemtypography from './scss/_typography.scss'
|
|
|
87
93
|
.form {
|
|
88
94
|
font-size: $font-size-sm;
|
|
89
95
|
line-height: $lineheight-size-sm;
|
|
90
|
-
|
|
96
|
+
|
|
97
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
91
98
|
font-size: $font-size-md;
|
|
92
99
|
}
|
|
93
100
|
}
|
|
@@ -110,7 +117,6 @@ import designsystemtypography from './scss/_typography.scss'
|
|
|
110
117
|
.anchorlink-wrapper {
|
|
111
118
|
a {
|
|
112
119
|
display: inline;
|
|
113
|
-
-webkit-box-decoration-break: clone;
|
|
114
120
|
box-decoration-break: clone;
|
|
115
121
|
overflow-wrap: break-word;
|
|
116
122
|
word-break: break-word;
|
|
@@ -126,15 +132,16 @@ import designsystemtypography from './scss/_typography.scss'
|
|
|
126
132
|
background-color: $blueberry50;
|
|
127
133
|
border-bottom-color: $blueberry600;
|
|
128
134
|
}
|
|
135
|
+
|
|
129
136
|
&:focus {
|
|
130
|
-
padding: 0 0 0.15rem
|
|
137
|
+
padding: 0 0 0.15rem;
|
|
131
138
|
outline: none;
|
|
132
139
|
border: 0.15rem solid $black;
|
|
133
140
|
}
|
|
134
141
|
|
|
135
142
|
&[target='_blank'] {
|
|
136
|
-
/* external styling legge til icon*/
|
|
137
|
-
|
|
143
|
+
/* external styling legge til icon */
|
|
144
|
+
&::after {
|
|
138
145
|
content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='38px' height='38px' viewBox='0 0 48 48' fill='%2308667c'><polygon points='33.305,14.659,33.305,29.205,32.005,29.205,32.005,16.948,15.804,33.149,14.885,32.229,31.155,15.959,18.761,15.96,18.761,14.659' /></svg>");
|
|
139
146
|
display: inline-block;
|
|
140
147
|
vertical-align: bottom;
|
package/utils/component.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const isComponent: <T>(element: {} | null | undefined, type: React.ForwardRefExoticComponent<T> | React.FunctionComponent<T>) => element is React.ReactElement<T, string | React.JSXElementConstructor<any>>;
|
|
3
|
+
export declare const isComponentWithChildren: <T>(element: {} | null | undefined) => element is React.ReactElement<React.PropsWithChildren<T>, string | React.JSXElementConstructor<any>>;
|
|
3
4
|
//# sourceMappingURL=component.d.ts.map
|
package/utils/component.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/utils/component.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/utils/component.ts"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,eAAO,MAAM,WAAW,eACb,EAAE,GAAG,IAAI,GAAG,SAAS,uJAEwF,CAAC;AAEzH,eAAO,MAAM,uBAAuB,eAAgB,EAAE,GAAG,IAAI,GAAG,SAAS,yGAEsC,CAAC"}
|
package/utils/component.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from"react";const n=(o,i)=>t.isValidElement(o)&&o.type===i,r=o=>t.isValidElement(o)&&Object.prototype.hasOwnProperty.call(o.props,"children");export{n as isComponent,r as isComponentWithChildren};
|
|
2
2
|
//# sourceMappingURL=component.js.map
|
package/utils/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/utils/component.ts"],"sourcesContent":["import React from 'react';\n\nexport const isComponent = <T>(\n element: {} | null | undefined,\n type: React.ForwardRefExoticComponent<T> | React.FunctionComponent<T>\n): element is React.ReactElement<T> => React.isValidElement<T>(element) && (element as React.ReactElement).type === type;\n"],"names":["isComponent","element","type","React"],"mappings":"qBAEa,MAAAA,EAAc,CACzBC,EACAC,IACqCC,EAAM,eAAkBF,CAAO,GAAMA,EAA+B,OAASC"}
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/utils/component.ts"],"sourcesContent":["import React, { PropsWithChildren } from 'react';\n\nexport const isComponent = <T>(\n element: {} | null | undefined,\n type: React.ForwardRefExoticComponent<T> | React.FunctionComponent<T>\n): element is React.ReactElement<T> => React.isValidElement<T>(element) && (element as React.ReactElement).type === type;\n\nexport const isComponentWithChildren = <T>(element: {} | null | undefined): element is React.ReactElement<PropsWithChildren<T>> =>\n React.isValidElement<PropsWithChildren<T>>(element) &&\n Object.prototype.hasOwnProperty.call((element as React.ReactElement<PropsWithChildren<T>>).props, 'children');\n"],"names":["isComponent","element","type","React","isComponentWithChildren"],"mappings":"qBAEa,MAAAA,EAAc,CACzBC,EACAC,IACqCC,EAAM,eAAkBF,CAAO,GAAMA,EAA+B,OAASC,EAEvGE,EAA8BH,GACzCE,EAAM,eAAqCF,CAAO,GAClD,OAAO,UAAU,eAAe,KAAMA,EAAqD,MAAO,UAAU"}
|
package/utils/debounce.d.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* debounce limits time a function can be executed
|
|
3
3
|
* @param func function to debounce
|
|
4
4
|
* @param wait wait for x time
|
|
5
|
-
* @param immediate run now
|
|
6
5
|
*/
|
|
7
|
-
export declare function debounce(func:
|
|
6
|
+
export declare function debounce<A = unknown, R = void>(func: (args?: A) => R, wait: number): [(args?: A) => Promise<R>, () => void];
|
|
8
7
|
//# sourceMappingURL=debounce.d.ts.map
|
package/utils/debounce.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../src/utils/debounce.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../src/utils/debounce.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CAmB3H"}
|
package/utils/debounce.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
function d(o,t){let e;return[n=>new Promise(u=>{e&&clearTimeout(e),e=setTimeout(()=>{u(o(n))},t)}),()=>{e&&clearTimeout(e)}]}export{d as debounce};
|
|
2
2
|
//# sourceMappingURL=debounce.js.map
|
package/utils/debounce.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.js","sources":["../../src/utils/debounce.ts"],"sourcesContent":["/**\n * debounce limits time a function can be executed\n * @param func function to debounce\n * @param wait wait for x time\n
|
|
1
|
+
{"version":3,"file":"debounce.js","sources":["../../src/utils/debounce.ts"],"sourcesContent":["/**\n * debounce limits time a function can be executed\n * @param func function to debounce\n * @param wait wait for x time\n */\n\nexport function debounce<A = unknown, R = void>(func: (args?: A) => R, wait: number): [(args?: A) => Promise<R>, () => void] {\n let timeout: ReturnType<typeof setTimeout> | null;\n\n const debouncedFunc = (args?: A): Promise<R> =>\n new Promise(resolve => {\n if (timeout) {\n clearTimeout(timeout);\n }\n\n timeout = setTimeout((): void => {\n resolve(func(args));\n }, wait);\n });\n\n const teardown = (): void => {\n timeout && clearTimeout(timeout);\n };\n\n return [debouncedFunc, teardown];\n}\n"],"names":["debounce","func","wait","timeout","args","resolve"],"mappings":"AAMgB,SAAAA,EAAgCC,EAAuBC,EAAsD,CACvH,IAAAC,EAiBG,MAAA,CAfgBC,GACrB,IAAI,QAAmBC,GAAA,CACjBF,GACF,aAAaA,CAAO,EAGtBA,EAAU,WAAW,IAAY,CACvBE,EAAAJ,EAAKG,CAAI,CAAC,GACjBF,CAAI,CAAA,CACR,EAEc,IAAY,CAC3BC,GAAW,aAAaA,CAAO,CAAA,CAGF,CACjC"}
|