@helsenorge/designsystem-react 10.1.0 → 10.2.1-beta.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 +7 -9
- package/components/Avatar/styles.module.scss +9 -9
- package/components/Badge/styles.module.scss +9 -9
- package/components/Button/styles.module.scss +79 -68
- package/components/Checkbox/styles.module.scss +104 -104
- package/components/Chip/styles.module.scss +21 -22
- package/components/Close/styles.module.scss +5 -5
- 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 +55 -55
- 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 +16 -16
- package/components/ErrorWrapper/styles.module.scss +12 -22
- package/components/ErrorWrapper/styles.module.scss.d.ts +0 -1
- package/components/Expander/styles.module.scss +53 -53
- package/components/ExpanderHierarchy/expander.module.scss +35 -35
- 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 +32 -32
- 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 +14 -14
- 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 +20 -20
- 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 +14 -14
- package/components/Label/styles.module.scss +29 -25
- package/components/Label/styles.module.scss.d.ts +3 -1
- package/components/LinkList/styles.module.scss +35 -35
- 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 +12 -12
- package/components/Modal/index.js +71 -82
- package/components/Modal/index.js.map +1 -1
- package/components/Modal/styles.module.scss +54 -48
- package/components/NotificationPanel/index.js +3 -3
- package/components/NotificationPanel/index.js.map +1 -1
- package/components/NotificationPanel/styles.module.scss +40 -40
- package/components/Panel/styles.module.scss +60 -60
- package/components/PanelList/index.js +5 -5
- package/components/PanelList/index.js.map +1 -1
- package/components/PanelList/styles.module.scss +6 -6
- package/components/PopMenu/index.js +5 -5
- package/components/PopMenu/index.js.map +1 -1
- package/components/PopMenu/styles.module.scss +16 -16
- package/components/PopOver/styles.module.scss +14 -15
- 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 +31 -31
- package/components/RadioButton/styles.module.scss +100 -100
- package/components/Select/styles.module.scss +23 -23
- package/components/ServiceMessage/styles.module.scss +48 -48
- package/components/SharingStatus/styles.module.scss +13 -13
- package/components/Slider/styles.module.scss +25 -25
- package/components/Spacer/styles.module.scss +14 -14
- package/components/StatusDot/styles.module.scss +24 -24
- package/components/Step/styles.module.scss +3 -3
- package/components/StepButtons/styles.module.scss +11 -11
- package/components/Stepper/styles.module.scss +24 -16
- package/components/StickyNote/styles.module.scss +3 -3
- package/components/Table/styles.module.scss +31 -31
- package/components/Tabs/TabList/styles.module.scss +2 -2
- package/components/Tabs/TabPanel/styles.module.scss +7 -7
- package/components/Tabs/index.js +3 -3
- package/components/Tabs/index.js.map +1 -1
- package/components/Tabs/styles.module.scss +3 -3
- 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 +31 -31
- 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 +18 -18
- 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 +11 -11
- 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 +72 -17
- package/scss/_fonts.scss +0 -2
- package/scss/_input.scss +54 -51
- package/scss/_print.scss +5 -5
- package/scss/_reset.scss +1 -1
- package/scss/helsenorge.scss +7 -7
- package/scss/layout.module.scss +2 -2
- package/scss/typography.module.scss +65 -40
- 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
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
5
|
-
@
|
|
6
|
-
@
|
|
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 breakpoints;
|
|
7
|
+
@use './fonts' as *;
|
|
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
|
-
@media (min-width: map.get(
|
|
76
|
-
font-size:
|
|
77
|
-
line-height:
|
|
88
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
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
|
-
@media (min-width: map.get(
|
|
86
|
-
font-size:
|
|
98
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
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,
|