@helsenorge/designsystem-react 10.1.0 → 10.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.
- package/AnchorLink.js +2 -2
- package/AnchorLink.js.map +1 -1
- package/Avatar.js +2 -2
- package/Avatar.js.map +1 -1
- package/Badge.js +3 -3
- package/Badge.js.map +1 -1
- package/Button.js +4 -4
- package/Button.js.map +1 -1
- package/CHANGELOG.md +1392 -801
- package/Checkbox.js +2 -2
- package/Checkbox.js.map +1 -1
- package/Close.js +2 -2
- package/Close.js.map +1 -1
- package/ErrorBoundary.js +2 -2
- package/ErrorBoundary.js.map +1 -1
- package/FormGroup.js +12 -12
- package/FormGroup.js.map +1 -1
- package/FormLayout.js +3 -3
- package/FormLayout.js.map +1 -1
- package/HelpBubble.js +2 -2
- package/HelpBubble.js.map +1 -1
- package/HighlightPanel.js +2 -2
- package/HighlightPanel.js.map +1 -1
- package/Icon.js +3 -3
- package/Icon.js.map +1 -1
- package/Illustration.js +3 -3
- package/Illustration.js.map +1 -1
- package/Input.js +2 -2
- package/Input.js.map +1 -1
- package/Label.js +8 -8
- package/Label.js.map +1 -1
- package/LazyIcon.js +1 -1
- package/LazyIllustration.js +3 -3
- package/LazyIllustration.js.map +1 -1
- package/LinkList.js +6 -6
- package/LinkList.js.map +1 -1
- package/ListHeader.js +7 -7
- package/ListHeader.js.map +1 -1
- package/Panel.js +2 -2
- package/Panel.js.map +1 -1
- package/PopOver.js +2 -2
- package/PopOver.js.map +1 -1
- package/RadioButton.js +2 -2
- package/RadioButton.js.map +1 -1
- package/Select.js +2 -2
- package/Select.js.map +1 -1
- package/Slider.js +3 -3
- package/Slider.js.map +1 -1
- package/Spacer.js +2 -2
- package/Spacer.js.map +1 -1
- package/StatusDot.js +1 -1
- package/StepButtons.js +4 -4
- package/StepButtons.js.map +1 -1
- package/TabList.js +4 -4
- package/TabList.js.map +1 -1
- package/Table.js +2 -2
- package/Table.js.map +1 -1
- package/TableBody.js +2 -2
- package/TableBody.js.map +1 -1
- package/TableExpandedRow.js +2 -2
- package/TableExpandedRow.js.map +1 -1
- package/TableHead.js +2 -2
- package/TableHead.js.map +1 -1
- package/TableRow.js +2 -2
- package/TableRow.js.map +1 -1
- package/Textarea.js +2 -2
- package/Textarea.js.map +1 -1
- package/Title.js +2 -2
- package/Title.js.map +1 -1
- package/TooltipWord.js +2 -2
- package/TooltipWord.js.map +1 -1
- package/Trigger.js +3 -3
- package/Trigger.js.map +1 -1
- package/components/AnchorLink/styles.module.scss +8 -9
- package/components/Avatar/styles.module.scss +9 -9
- package/components/Badge/styles.module.scss +9 -9
- package/components/Button/styles.module.scss +68 -57
- package/components/Checkbox/styles.module.scss +103 -103
- package/components/Chip/styles.module.scss +22 -22
- package/components/Close/styles.module.scss +4 -4
- package/components/DictionaryTrigger/index.js +2 -2
- package/components/DictionaryTrigger/index.js.map +1 -1
- package/components/DictionaryTrigger/styles.module.scss +5 -5
- package/components/Drawer/Drawer.d.ts +41 -0
- package/components/Drawer/Drawer.test.d.ts +1 -0
- package/components/Drawer/index.d.ts +3 -0
- package/components/Drawer/index.js +350 -0
- package/components/Drawer/index.js.map +1 -0
- package/components/Drawer/styles.module.scss +127 -0
- package/components/Drawer/styles.module.scss.d.ts +16 -0
- package/components/Dropdown/index.js +3 -3
- package/components/Dropdown/index.js.map +1 -1
- package/components/Dropdown/styles.module.scss +51 -51
- package/components/Duolist/index.js +6 -5
- package/components/Duolist/index.js.map +1 -1
- package/components/Duolist/styles.module.scss +57 -35
- package/components/Duolist/styles.module.scss.d.ts +1 -0
- package/components/EmptyState/styles.module.scss +12 -12
- package/components/ErrorWrapper/styles.module.scss +11 -21
- package/components/ErrorWrapper/styles.module.scss.d.ts +0 -1
- package/components/Expander/styles.module.scss +46 -46
- package/components/ExpanderHierarchy/expander.module.scss +29 -29
- package/components/ExpanderHierarchy/index.js +5 -5
- package/components/ExpanderHierarchy/index.js.map +1 -1
- package/components/ExpanderHierarchy/styles.module.scss +4 -5
- package/components/ExpanderList/index.js +8 -8
- package/components/ExpanderList/index.js.map +1 -1
- package/components/ExpanderList/styles.module.scss +30 -30
- package/components/EyebrowHeader/styles.module.scss +0 -2
- package/components/FormGroup/styles.module.scss +9 -9
- package/components/FormLayout/styles.module.scss +4 -5
- package/components/HelpBubble/styles.module.scss +13 -13
- package/components/HelpPanel/styles.module.scss +2 -2
- package/components/HelpQuestion/index.js +2 -2
- package/components/HelpQuestion/index.js.map +1 -1
- package/components/HelpQuestion/styles.module.scss +19 -19
- package/components/HighlightPanel/styles.module.scss +22 -54
- package/components/HighlightPanel/styles.module.scss.d.ts +1 -2
- package/components/HorizontalScroll/styles.module.scss +4 -3
- package/components/Icons/EuropeanHealthCard.js +1 -1
- package/components/Icons/GroupTwins.js +1 -1
- package/components/Icons/Inbox.js +1 -1
- package/components/Icons/LawBook.js +1 -1
- package/components/Icons/PersonCancel.js +1 -1
- package/components/Icons/PersonWithBrain.js +1 -1
- package/components/Icons/Puzzle.js +1 -1
- package/components/Icons/Snapchat.js +1 -1
- package/components/Illustrations/IllustrationNames.d.ts +1 -1
- package/components/Illustrations/IllustrationNames.js +4 -2
- package/components/Illustrations/IllustrationNames.js.map +1 -1
- package/components/Illustrations/ReadLetters.d.ts +9 -0
- package/components/Illustrations/ReadLetters.js +11 -0
- package/components/Illustrations/ReadLetters.js.map +1 -0
- package/components/Illustrations/ReadLettersMedium.d.ts +4 -0
- package/components/Illustrations/ReadLettersMedium.js +110 -0
- package/components/Illustrations/ReadLettersMedium.js.map +1 -0
- package/components/Illustrations/Support2.d.ts +9 -0
- package/components/Illustrations/Support2.js +11 -0
- package/components/Illustrations/Support2.js.map +1 -0
- package/components/Illustrations/Support2Medium.d.ts +4 -0
- package/components/Illustrations/Support2Medium.js +232 -0
- package/components/Illustrations/Support2Medium.js.map +1 -0
- package/components/Input/styles.module.scss +12 -12
- package/components/Label/styles.module.scss +28 -24
- package/components/Label/styles.module.scss.d.ts +3 -1
- package/components/LinkList/styles.module.scss +33 -33
- package/components/List/styles.module.scss +7 -7
- package/components/ListHeader/styles.module.scss +8 -8
- package/components/Loader/styles.module.scss +14 -14
- package/components/MaxCharacters/styles.module.scss +11 -11
- package/components/Modal/index.js +71 -82
- package/components/Modal/index.js.map +1 -1
- package/components/Modal/styles.module.scss +45 -39
- package/components/NotificationPanel/index.js +3 -3
- package/components/NotificationPanel/index.js.map +1 -1
- package/components/NotificationPanel/styles.module.scss +33 -33
- package/components/Panel/styles.module.scss +45 -45
- package/components/PanelList/index.js +5 -5
- package/components/PanelList/index.js.map +1 -1
- package/components/PanelList/styles.module.scss +5 -5
- package/components/PopMenu/index.js +5 -5
- package/components/PopMenu/index.js.map +1 -1
- package/components/PopMenu/styles.module.scss +15 -15
- package/components/PopOver/styles.module.scss +13 -14
- package/components/PopOver/styles.module.scss.d.ts +0 -3
- package/components/Portal/index.js +3 -3
- package/components/Portal/index.js.map +1 -1
- package/components/Progressbar/styles.module.scss +4 -4
- package/components/PromoPanel/index.js +2 -2
- package/components/PromoPanel/index.js.map +1 -1
- package/components/PromoPanel/styles.module.scss +22 -22
- package/components/RadioButton/styles.module.scss +99 -99
- package/components/Select/styles.module.scss +21 -21
- package/components/ServiceMessage/styles.module.scss +49 -49
- package/components/SharingStatus/styles.module.scss +13 -13
- package/components/Slider/styles.module.scss +24 -24
- package/components/Spacer/styles.module.scss +14 -14
- package/components/StatusDot/styles.module.scss +22 -22
- package/components/Step/styles.module.scss +3 -3
- package/components/StepButtons/styles.module.scss +9 -9
- package/components/Stepper/styles.module.scss +23 -15
- package/components/StickyNote/styles.module.scss +3 -3
- package/components/Table/styles.module.scss +32 -32
- package/components/Tabs/TabList/styles.module.scss +1 -1
- package/components/Tabs/TabPanel/styles.module.scss +5 -5
- package/components/Tabs/index.js +3 -3
- package/components/Tabs/index.js.map +1 -1
- package/components/Tabs/styles.module.scss +1 -1
- package/components/Tag/styles.module.scss +16 -16
- package/components/TagList/index.js +2 -2
- package/components/TagList/index.js.map +1 -1
- package/components/TagList/styles.module.scss +4 -4
- package/components/Textarea/styles.module.scss +9 -9
- package/components/Tile/index.js +6 -6
- package/components/Tile/index.js.map +1 -1
- package/components/Tile/styles.module.scss +25 -25
- package/components/Title/styles.module.scss +8 -8
- package/components/Toggle/index.js +3 -3910
- package/components/Toggle/index.js.map +1 -1
- package/components/Toggle/styles.module.scss +14 -14
- package/components/Tooltip/TooltipWord/styles.module.scss +4 -4
- package/components/Tooltip/index.js +2 -2
- package/components/Tooltip/index.js.map +1 -1
- package/components/Trigger/styles.module.scss +21 -21
- package/components/Validation/index.js +6 -6
- package/components/Validation/index.js.map +1 -1
- package/components/Validation/styles.module.scss +10 -10
- package/constants.d.ts +1 -0
- package/constants.js +1 -0
- package/constants.js.map +1 -1
- package/hoc/withBreakpoint/withBreakpoint.js +2 -2
- package/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
- package/hooks/useBreakpoint.d.ts +0 -4
- package/hooks/useBreakpoint.js +23 -18
- package/hooks/useBreakpoint.js.map +1 -1
- package/hooks/useEventListenerState.js +3 -3
- package/hooks/useEventListenerState.js.map +1 -1
- package/hooks/useReturnFocusOnUnmount.d.ts +5 -0
- package/hooks/useReturnFocusOnUnmount.js +20 -0
- package/hooks/useReturnFocusOnUnmount.js.map +1 -0
- package/package.json +1 -1
- package/scss/_body.scss +5 -6
- package/scss/_breakpoints.scss +8 -2
- package/scss/_font-mixins.scss +57 -2
- package/scss/_fonts.scss +0 -2
- package/scss/_input.scss +53 -50
- package/scss/_print.scss +2 -2
- package/scss/layout.module.scss +2 -2
- package/scss/typography.module.scss +62 -37
- package/scss/typography.module.scss.d.ts +6 -0
- package/scss/typography.stories.tsx +24 -0
- package/theme/index.js +2 -2
- package/use-animate.js +3952 -0
- package/use-animate.js.map +1 -0
- package/utils/accessibility.d.ts +1 -0
- package/utils/accessibility.js +6 -1
- package/utils/accessibility.js.map +1 -1
- package/utils/component.js +4 -4
- package/utils/component.js.map +1 -1
package/scss/_body.scss
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@import './font-mixins';
|
|
2
|
+
@use './palette' as palette;
|
|
3
|
+
@use './font-mixins' as fonts;
|
|
5
4
|
|
|
6
5
|
body {
|
|
7
6
|
font-family: 'Source Sans Pro', Arial, Verdana, sans-serif;
|
|
8
|
-
background-color:
|
|
9
|
-
color:
|
|
7
|
+
background-color: palette.$white;
|
|
8
|
+
color: palette.$black;
|
|
10
9
|
|
|
11
|
-
@include body;
|
|
10
|
+
@include fonts.body;
|
|
12
11
|
}
|
package/scss/_breakpoints.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@
|
|
2
|
+
@use 'spacers' as spacers;
|
|
3
3
|
|
|
4
|
-
$grid-gutter-width: map.get(
|
|
4
|
+
$grid-gutter-width: map.get(spacers.$spacers, 5);
|
|
5
5
|
$grid-columns: 12;
|
|
6
6
|
$grid-breakpoints: (
|
|
7
7
|
xxs: 0,
|
|
@@ -21,3 +21,9 @@ $container-max-widths: (
|
|
|
21
21
|
md: 612px,
|
|
22
22
|
lg: 1056px,
|
|
23
23
|
);
|
|
24
|
+
|
|
25
|
+
@mixin tiny-screens-media-query {
|
|
26
|
+
@media (width <= 319px), (height <= 308px) {
|
|
27
|
+
@content;
|
|
28
|
+
}
|
|
29
|
+
}
|
package/scss/_font-mixins.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@
|
|
3
|
-
@
|
|
2
|
+
@use './spacers' as spacers;
|
|
3
|
+
@use './breakpoints' as *;
|
|
4
4
|
|
|
5
5
|
@mixin title-feature {
|
|
6
6
|
font-size: 2.375rem;
|
|
@@ -135,6 +135,28 @@
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
@mixin sublabel {
|
|
139
|
+
font-size: 1rem;
|
|
140
|
+
line-height: 1.2rem;
|
|
141
|
+
font-weight: 600;
|
|
142
|
+
|
|
143
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
144
|
+
font-size: 1.125rem;
|
|
145
|
+
line-height: 1.463rem;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@mixin sublabel-subdued {
|
|
150
|
+
font-size: 1rem;
|
|
151
|
+
line-height: 1.2rem;
|
|
152
|
+
font-weight: 400;
|
|
153
|
+
|
|
154
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
155
|
+
font-size: 1.125rem;
|
|
156
|
+
line-height: 1.463rem;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
138
160
|
@mixin compact-data {
|
|
139
161
|
font-size: 1rem;
|
|
140
162
|
line-height: 1.5rem;
|
|
@@ -183,3 +205,36 @@
|
|
|
183
205
|
line-height: 1.75rem;
|
|
184
206
|
}
|
|
185
207
|
}
|
|
208
|
+
|
|
209
|
+
@mixin text-list {
|
|
210
|
+
font-size: 1.125rem;
|
|
211
|
+
line-height: 1.375rem;
|
|
212
|
+
font-weight: 400;
|
|
213
|
+
|
|
214
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
215
|
+
font-size: 1.25rem;
|
|
216
|
+
line-height: 1.625rem;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@mixin definition-list-type {
|
|
221
|
+
font-size: 1.125rem;
|
|
222
|
+
line-height: 1.375rem;
|
|
223
|
+
font-weight: 600;
|
|
224
|
+
|
|
225
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
226
|
+
font-size: 1.25rem;
|
|
227
|
+
line-height: 1.625rem;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@mixin definition-list-data {
|
|
232
|
+
font-size: 1.125rem;
|
|
233
|
+
line-height: 1.375rem;
|
|
234
|
+
font-weight: 400;
|
|
235
|
+
|
|
236
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
237
|
+
font-size: 1.25rem;
|
|
238
|
+
line-height: 1.625rem;
|
|
239
|
+
}
|
|
240
|
+
}
|
package/scss/_fonts.scss
CHANGED
package/scss/_input.scss
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@
|
|
2
|
+
@use './palette' as palette;
|
|
3
|
+
@use './spacers' as spacers;
|
|
4
|
+
@use './font-settings' as font-settings;
|
|
5
|
+
@use './breakpoints' as *;
|
|
3
6
|
|
|
4
7
|
@mixin input-wrapper {
|
|
5
8
|
width: 100%;
|
|
@@ -7,11 +10,11 @@
|
|
|
7
10
|
|
|
8
11
|
@mixin input-container {
|
|
9
12
|
display: flex;
|
|
10
|
-
font-size:
|
|
13
|
+
font-size: font-settings.$font-size-sm;
|
|
11
14
|
width: 100%;
|
|
12
|
-
border: 2px solid
|
|
15
|
+
border: 2px solid palette.$neutral700;
|
|
13
16
|
outline: none;
|
|
14
|
-
background:
|
|
17
|
+
background: palette.$white;
|
|
15
18
|
|
|
16
19
|
svg:first-of-type {
|
|
17
20
|
padding-left: 0.375rem;
|
|
@@ -22,79 +25,79 @@
|
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
&--large {
|
|
25
|
-
padding: getSpacer(2xs) 0;
|
|
28
|
+
padding: spacers.getSpacer(2xs) 0;
|
|
26
29
|
|
|
27
30
|
svg:first-of-type {
|
|
28
|
-
padding-left: getSpacer(2xs);
|
|
31
|
+
padding-left: spacers.getSpacer(2xs);
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
svg:last-of-type {
|
|
32
|
-
padding-right: getSpacer(2xs);
|
|
35
|
+
padding-right: spacers.getSpacer(2xs);
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
&:focus-within {
|
|
37
|
-
background:
|
|
38
|
-
border-color:
|
|
39
|
-
box-shadow: 0 0 0 2px
|
|
40
|
+
background: palette.$white;
|
|
41
|
+
border-color: palette.$neutral900;
|
|
42
|
+
box-shadow: 0 0 0 2px palette.$neutral900;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
&:hover {
|
|
43
|
-
background:
|
|
44
|
-
border-color:
|
|
45
|
-
box-shadow: 0 0 0 1px
|
|
46
|
+
background: palette.$neutral50;
|
|
47
|
+
border-color: palette.$neutral700;
|
|
48
|
+
box-shadow: 0 0 0 1px palette.$neutral700;
|
|
46
49
|
|
|
47
50
|
&:focus-within {
|
|
48
|
-
border-color:
|
|
49
|
-
box-shadow: 0 0 0 2px
|
|
51
|
+
border-color: palette.$black;
|
|
52
|
+
box-shadow: 0 0 0 2px palette.$black;
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
&--on-blueberry {
|
|
54
|
-
border-color:
|
|
57
|
+
border-color: palette.$blueberry500;
|
|
55
58
|
|
|
56
59
|
&:hover {
|
|
57
|
-
background:
|
|
58
|
-
box-shadow: 0 0 0 1px
|
|
59
|
-
border-color:
|
|
60
|
+
background: palette.$blueberry50;
|
|
61
|
+
box-shadow: 0 0 0 1px palette.$blueberry500;
|
|
62
|
+
border-color: palette.$blueberry500;
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
&:focus-within {
|
|
63
|
-
background:
|
|
64
|
-
border-color:
|
|
65
|
-
box-shadow: 0 0 0 2px
|
|
66
|
+
background: palette.$white;
|
|
67
|
+
border-color: palette.$neutral900;
|
|
68
|
+
box-shadow: 0 0 0 2px palette.$neutral900;
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
&--on-dark {
|
|
70
|
-
border-color:
|
|
73
|
+
border-color: palette.$blueberry900;
|
|
71
74
|
|
|
72
75
|
&:hover {
|
|
73
|
-
background:
|
|
74
|
-
border-color:
|
|
75
|
-
box-shadow: 0 0 0 1px
|
|
76
|
+
background: palette.$blueberry50;
|
|
77
|
+
border-color: palette.$blueberry900;
|
|
78
|
+
box-shadow: 0 0 0 1px palette.$blueberry900;
|
|
76
79
|
}
|
|
77
80
|
|
|
78
81
|
&:focus-within {
|
|
79
|
-
background:
|
|
80
|
-
border-color:
|
|
81
|
-
box-shadow: 0 0 0 2px
|
|
82
|
+
background: palette.$white;
|
|
83
|
+
border-color: palette.$neutral900;
|
|
84
|
+
box-shadow: 0 0 0 2px palette.$neutral900;
|
|
82
85
|
}
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
&--invalid {
|
|
86
|
-
border-color:
|
|
89
|
+
border-color: palette.$cherry600;
|
|
87
90
|
|
|
88
91
|
&:hover {
|
|
89
|
-
background:
|
|
90
|
-
border-color:
|
|
91
|
-
box-shadow: 0 0 0 2px
|
|
92
|
+
background: palette.$cherry100;
|
|
93
|
+
border-color: palette.$cherry600;
|
|
94
|
+
box-shadow: 0 0 0 2px palette.$cherry600;
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
&:focus-within {
|
|
95
|
-
background:
|
|
96
|
-
border-color:
|
|
97
|
-
box-shadow: 0 0 0 2px
|
|
98
|
+
background: palette.$white;
|
|
99
|
+
border-color: palette.$neutral900;
|
|
100
|
+
box-shadow: 0 0 0 2px palette.$neutral900;
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
|
|
@@ -102,32 +105,32 @@
|
|
|
102
105
|
background: transparent;
|
|
103
106
|
|
|
104
107
|
&:hover {
|
|
105
|
-
background:
|
|
108
|
+
background: palette.$neutral100;
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
&:focus-within {
|
|
109
|
-
background:
|
|
112
|
+
background: palette.$white;
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
115
|
&--transparent#{&}--on-blueberry {
|
|
113
116
|
&:hover {
|
|
114
|
-
background:
|
|
117
|
+
background: palette.$blueberry100;
|
|
115
118
|
}
|
|
116
119
|
|
|
117
120
|
&:focus-within {
|
|
118
|
-
background:
|
|
121
|
+
background: palette.$white;
|
|
119
122
|
}
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
&--disabled {
|
|
123
126
|
background: transparent;
|
|
124
|
-
border-color:
|
|
127
|
+
border-color: palette.$neutral600;
|
|
125
128
|
border-style: dashed;
|
|
126
|
-
color:
|
|
129
|
+
color: palette.$neutral700;
|
|
127
130
|
|
|
128
131
|
&:hover {
|
|
129
132
|
background: transparent;
|
|
130
|
-
border-color:
|
|
133
|
+
border-color: palette.$neutral600;
|
|
131
134
|
box-shadow: none;
|
|
132
135
|
}
|
|
133
136
|
}
|
|
@@ -135,31 +138,31 @@
|
|
|
135
138
|
&__input {
|
|
136
139
|
line-height: 1.625rem;
|
|
137
140
|
font-family: inherit;
|
|
138
|
-
font-size:
|
|
139
|
-
padding: 0 getSpacer(2xs);
|
|
141
|
+
font-size: font-settings.$font-size-sm;
|
|
142
|
+
padding: 0 spacers.getSpacer(2xs);
|
|
140
143
|
border: none;
|
|
141
144
|
outline: none;
|
|
142
145
|
background-color: transparent;
|
|
143
146
|
width: 100%;
|
|
144
147
|
|
|
145
148
|
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
146
|
-
font-size:
|
|
149
|
+
font-size: font-settings.$font-size-md;
|
|
147
150
|
}
|
|
148
151
|
|
|
149
152
|
&::placeholder {
|
|
150
|
-
color:
|
|
153
|
+
color: palette.$neutral500;
|
|
151
154
|
}
|
|
152
155
|
|
|
153
156
|
&--disabled {
|
|
154
|
-
color:
|
|
157
|
+
color: palette.$neutral700;
|
|
155
158
|
}
|
|
156
159
|
|
|
157
160
|
&:first-child {
|
|
158
|
-
padding-left: getSpacer(s);
|
|
161
|
+
padding-left: spacers.getSpacer(s);
|
|
159
162
|
}
|
|
160
163
|
|
|
161
164
|
&:last-child {
|
|
162
|
-
padding-right: getSpacer(s);
|
|
165
|
+
padding-right: spacers.getSpacer(s);
|
|
163
166
|
}
|
|
164
167
|
}
|
|
165
168
|
}
|
package/scss/_print.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@
|
|
2
|
+
@use 'palette' as palette;
|
|
3
3
|
@import 'breakpoints';
|
|
4
4
|
|
|
5
5
|
@media print {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
pre,
|
|
34
34
|
blockquote {
|
|
35
|
-
border: 1px solid
|
|
35
|
+
border: 1px solid palette.$neutral500;
|
|
36
36
|
page-break-inside: avoid;
|
|
37
37
|
}
|
|
38
38
|
|
package/scss/layout.module.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use './breakpoints' as *;
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Denne filen er ment til å importeres som en css module:
|
|
@@ -8,7 +8,7 @@ import designsystemlayout from './scss/layout.scss'
|
|
|
8
8
|
|
|
9
9
|
.container-breakout {
|
|
10
10
|
// This is a copy of how bootstrap's row class sets margins inside a container
|
|
11
|
-
// https://github.com/twbs/bootstrap/blob/e5643aaa89eb67327a5b4abe7db976f0ea276b70/scss/mixins/
|
|
11
|
+
// https://github.com/twbs/bootstrap/blob/e5643aaa89eb67327a5b4abe7db976f0ea276b70/scss/mixins/_scss#L16C1-L17C30
|
|
12
12
|
margin-right: -$grid-gutter-width * 0.5;
|
|
13
13
|
margin-left: -$grid-gutter-width * 0.5;
|
|
14
14
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@
|
|
3
|
-
@
|
|
2
|
+
@use './spacers' as spacers;
|
|
3
|
+
@use './palette' as palette;
|
|
4
|
+
@use './font-mixins' as fonts;
|
|
5
|
+
@use './font-settings' as font-settings;
|
|
6
|
+
@use './breakpoints' as *;
|
|
4
7
|
@import './fonts';
|
|
5
|
-
@import './palette';
|
|
6
|
-
@import './font-mixins';
|
|
7
8
|
|
|
8
9
|
/*
|
|
9
10
|
Denne filen er ment til å importeres som en css module:
|
|
@@ -12,99 +13,123 @@ import designsystemtypography from './scss/typography.scss'
|
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
.title-feature {
|
|
15
|
-
@include title-feature;
|
|
16
|
+
@include fonts.title-feature;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
.focused-content {
|
|
19
|
-
font-size:
|
|
20
|
-
line-height:
|
|
20
|
+
font-size: font-settings.$font-size-sm;
|
|
21
|
+
line-height: font-settings.$lineheight-size-sm;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
.title1 {
|
|
24
|
-
@include title1;
|
|
25
|
+
@include fonts.title1;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
.title2 {
|
|
28
|
-
@include title2;
|
|
29
|
+
@include fonts.title2;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
.title3 {
|
|
32
|
-
@include title3;
|
|
33
|
+
@include fonts.title3;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
.title4 {
|
|
36
|
-
@include title4;
|
|
37
|
+
@include fonts.title4;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
.title5 {
|
|
40
|
-
@include title5;
|
|
41
|
+
@include fonts.title5;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
.title6 {
|
|
44
|
-
@include title6;
|
|
45
|
+
@include fonts.title6;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
.body {
|
|
48
|
-
@include body;
|
|
49
|
+
@include fonts.body;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
.preamble {
|
|
52
|
-
@include preamble;
|
|
53
|
+
@include fonts.preamble;
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
.legend {
|
|
56
|
-
@include legend;
|
|
57
|
+
@include fonts.legend;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
.label {
|
|
60
|
-
@include label;
|
|
61
|
+
@include fonts.label;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.label-subdued {
|
|
65
|
+
@include fonts.label-subdued;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.sublabel {
|
|
69
|
+
@include fonts.sublabel;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.sublabel-subdued {
|
|
73
|
+
@include fonts.sublabel-subdued;
|
|
61
74
|
}
|
|
62
75
|
|
|
63
76
|
.compact-data {
|
|
64
|
-
@include compact-data;
|
|
77
|
+
@include fonts.compact-data;
|
|
65
78
|
}
|
|
66
79
|
|
|
67
80
|
.table-cell {
|
|
68
|
-
@include table-cell;
|
|
81
|
+
@include fonts.table-cell;
|
|
69
82
|
}
|
|
70
83
|
|
|
71
84
|
.strong {
|
|
72
|
-
font-size:
|
|
73
|
-
line-height:
|
|
85
|
+
font-size: font-settings.$font-size-sm;
|
|
86
|
+
line-height: font-settings.$lineheight-size-sm;
|
|
74
87
|
|
|
75
88
|
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
76
|
-
font-size:
|
|
77
|
-
line-height:
|
|
89
|
+
font-size: font-settings.$font-size-md;
|
|
90
|
+
line-height: font-settings.$lineheight-size-md;
|
|
78
91
|
}
|
|
79
92
|
}
|
|
80
93
|
|
|
81
94
|
.form {
|
|
82
|
-
font-size:
|
|
83
|
-
line-height:
|
|
95
|
+
font-size: font-settings.$font-size-sm;
|
|
96
|
+
line-height: font-settings.$lineheight-size-sm;
|
|
84
97
|
|
|
85
98
|
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
86
|
-
font-size:
|
|
99
|
+
font-size: font-settings.$font-size-md;
|
|
87
100
|
}
|
|
88
101
|
}
|
|
89
102
|
|
|
90
103
|
.status-timestamp {
|
|
91
|
-
@include status-timestamp;
|
|
104
|
+
@include fonts.status-timestamp;
|
|
92
105
|
}
|
|
93
106
|
|
|
94
107
|
.image-caption {
|
|
95
|
-
@include image-caption;
|
|
108
|
+
@include fonts.image-caption;
|
|
96
109
|
}
|
|
97
110
|
|
|
98
111
|
.image-credit {
|
|
99
|
-
@include image-credit;
|
|
112
|
+
@include fonts.image-credit;
|
|
100
113
|
}
|
|
101
114
|
|
|
102
115
|
.input-text {
|
|
103
|
-
@include input-text;
|
|
116
|
+
@include fonts.input-text;
|
|
104
117
|
}
|
|
105
118
|
|
|
106
119
|
.input-text-large {
|
|
107
|
-
@include input-text-large;
|
|
120
|
+
@include fonts.input-text-large;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.text-list {
|
|
124
|
+
@include fonts.text-list;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.definition-list-type {
|
|
128
|
+
@include fonts.definition-list-type;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.definition-list-data {
|
|
132
|
+
@include fonts.definition-list-data;
|
|
108
133
|
}
|
|
109
134
|
|
|
110
135
|
.anchorlink-wrapper {
|
|
@@ -114,24 +139,24 @@ import designsystemtypography from './scss/typography.scss'
|
|
|
114
139
|
overflow-wrap: break-word;
|
|
115
140
|
word-break: break-word;
|
|
116
141
|
text-align: left;
|
|
117
|
-
color:
|
|
142
|
+
color: palette.$blueberry600;
|
|
118
143
|
border: 0.15rem solid transparent;
|
|
119
144
|
text-decoration: underline;
|
|
120
145
|
text-underline-offset: 0.16rem;
|
|
121
|
-
text-decoration-color:
|
|
146
|
+
text-decoration-color: palette.$blueberry400;
|
|
122
147
|
text-decoration-thickness: 0.0625rem;
|
|
123
148
|
padding: 0.1rem;
|
|
124
149
|
|
|
125
150
|
&:hover {
|
|
126
151
|
cursor: pointer;
|
|
127
|
-
color:
|
|
128
|
-
background-color:
|
|
129
|
-
text-decoration-color:
|
|
152
|
+
color: palette.$blueberry700;
|
|
153
|
+
background-color: palette.$blueberry50;
|
|
154
|
+
text-decoration-color: palette.$blueberry600;
|
|
130
155
|
}
|
|
131
156
|
|
|
132
157
|
&:focus {
|
|
133
158
|
outline: none;
|
|
134
|
-
border: 0.15rem solid
|
|
159
|
+
border: 0.15rem solid palette.$black;
|
|
135
160
|
}
|
|
136
161
|
|
|
137
162
|
&[target='_blank'] {
|
|
@@ -2,6 +2,8 @@ export type Styles = {
|
|
|
2
2
|
'anchorlink-wrapper': string;
|
|
3
3
|
body: string;
|
|
4
4
|
'compact-data': string;
|
|
5
|
+
'definition-list-data': string;
|
|
6
|
+
'definition-list-type': string;
|
|
5
7
|
'focused-content': string;
|
|
6
8
|
form: string;
|
|
7
9
|
'image-caption': string;
|
|
@@ -9,11 +11,15 @@ export type Styles = {
|
|
|
9
11
|
'input-text': string;
|
|
10
12
|
'input-text-large': string;
|
|
11
13
|
label: string;
|
|
14
|
+
'label-subdued': string;
|
|
12
15
|
legend: string;
|
|
13
16
|
preamble: string;
|
|
14
17
|
'status-timestamp': string;
|
|
15
18
|
strong: string;
|
|
19
|
+
sublabel: string;
|
|
20
|
+
'sublabel-subdued': string;
|
|
16
21
|
'table-cell': string;
|
|
22
|
+
'text-list': string;
|
|
17
23
|
'title-feature': string;
|
|
18
24
|
title1: string;
|
|
19
25
|
title2: string;
|
|
@@ -65,6 +65,18 @@ export const Label: Story = {
|
|
|
65
65
|
render: args => <div className={designsystemtypography.label}>{args.tekst}</div>,
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
+
export const LabelSubdued: Story = {
|
|
69
|
+
render: args => <div className={designsystemtypography['label-subdued']}>{args.tekst}</div>,
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const Sublabel: Story = {
|
|
73
|
+
render: args => <div className={designsystemtypography.sublabel}>{args.tekst}</div>,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const SublabelSubdued: Story = {
|
|
77
|
+
render: args => <div className={designsystemtypography['sublabel-subdued']}>{args.tekst}</div>,
|
|
78
|
+
};
|
|
79
|
+
|
|
68
80
|
export const CompactData: Story = {
|
|
69
81
|
render: args => <div className={designsystemtypography['compact-data']}>{args.tekst}</div>,
|
|
70
82
|
};
|
|
@@ -97,6 +109,18 @@ export const InputTextLarge: Story = {
|
|
|
97
109
|
render: args => <div className={designsystemtypography['input-text-large']}>{args.tekst}</div>,
|
|
98
110
|
};
|
|
99
111
|
|
|
112
|
+
export const TextList: Story = {
|
|
113
|
+
render: args => <div className={designsystemtypography['text-list']}>{args.tekst}</div>,
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const DefinitionListType: Story = {
|
|
117
|
+
render: args => <div className={designsystemtypography['definition-list-type']}>{args.tekst}</div>,
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export const DefinitionListData: Story = {
|
|
121
|
+
render: args => <div className={designsystemtypography['definition-list-data']}>{args.tekst}</div>,
|
|
122
|
+
};
|
|
123
|
+
|
|
100
124
|
export const AnchorlinkWrapper: Story = {
|
|
101
125
|
render: args => (
|
|
102
126
|
<div className={designsystemtypography['anchorlink-wrapper']}>
|
package/theme/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { breakpoints, screen } from "./grid.js";
|
|
2
2
|
import { palette } from "./palette.js";
|
|
3
|
-
import {
|
|
3
|
+
import { spacers, spacer } from "./spacers.js";
|
|
4
4
|
const theme = {
|
|
5
5
|
spacer,
|
|
6
6
|
spacers,
|