@helsenorge/designsystem-react 9.4.3 → 10.0.0-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.
Files changed (66) hide show
  1. package/Avatar.js +4 -4
  2. package/Avatar.js.map +1 -1
  3. package/CHANGELOG.md +1245 -745
  4. package/HighlightPanel.js +5 -2
  5. package/HighlightPanel.js.map +1 -1
  6. package/Label.js +3 -3
  7. package/Label.js.map +1 -1
  8. package/LinkList.js +13 -4
  9. package/LinkList.js.map +1 -1
  10. package/ListHeader.js +9 -40
  11. package/ListHeader.js.map +1 -1
  12. package/PopOver.js +1 -1
  13. package/PopOver.js.map +1 -1
  14. package/TabList.js +3 -1
  15. package/TabList.js.map +1 -1
  16. package/Title.js +2 -1
  17. package/Title.js.map +1 -1
  18. package/components/Avatar/Avatar.d.ts +4 -4
  19. package/components/Badge/styles.module.scss +1 -6
  20. package/components/Chip/styles.module.scss +0 -1
  21. package/components/EmptyState/EmptyBoxBeeCompact.d.ts +4 -0
  22. package/components/EmptyState/EmptyBoxBeeMedium.d.ts +4 -0
  23. package/components/EmptyState/EmptyBoxBeeSmall.d.ts +4 -0
  24. package/components/EmptyState/EmptyState.d.ts +18 -0
  25. package/components/EmptyState/index.js +315 -155
  26. package/components/EmptyState/index.js.map +1 -1
  27. package/components/EmptyState/styles.module.scss +26 -10
  28. package/components/EmptyState/styles.module.scss.d.ts +3 -1
  29. package/components/ExpanderHierarchy/expander.module.scss +1 -1
  30. package/components/ExpanderHierarchy/styles.module.scss +1 -1
  31. package/components/FormGroup/styles.module.scss +1 -1
  32. package/components/Input/styles.module.scss +5 -5
  33. package/components/Label/Label.d.ts +2 -2
  34. package/components/Label/styles.module.scss +4 -10
  35. package/components/Label/styles.module.scss.d.ts +1 -1
  36. package/components/LinkList/LinkList.d.ts +3 -3
  37. package/components/LinkList/styles.module.scss +120 -40
  38. package/components/LinkList/styles.module.scss.d.ts +18 -5
  39. package/components/ListHeader/styles.module.scss +40 -117
  40. package/components/ListHeader/styles.module.scss.d.ts +1 -21
  41. package/components/PanelList/styles.module.scss +0 -1
  42. package/components/StepButtons/styles.module.scss +0 -1
  43. package/components/Tabs/TabList/TabItem.d.ts +1 -0
  44. package/components/Tabs/TabPanel/styles.module.scss +0 -1
  45. package/components/Tabs/Tabs.d.ts +0 -3
  46. package/components/Tabs/index.js.map +1 -1
  47. package/components/Tag/styles.module.scss +0 -1
  48. package/components/Textarea/styles.module.scss +3 -2
  49. package/components/Title/Title.d.ts +2 -2
  50. package/components/Title/styles.module.scss +5 -1
  51. package/components/Title/styles.module.scss.d.ts +1 -0
  52. package/components/Toggle/Toggle.d.ts +1 -1
  53. package/components/Toggle/index.js +17 -17
  54. package/components/Toggle/index.js.map +1 -1
  55. package/components/Toggle/styles.module.scss +5 -5
  56. package/components/Toggle/styles.module.scss.d.ts +1 -1
  57. package/package.json +2 -2
  58. package/scss/_body.scss +2 -7
  59. package/scss/_font-mixins.scss +186 -0
  60. package/scss/_font-settings.scss +0 -2
  61. package/scss/_input.scss +1 -0
  62. package/scss/typography.module.scss +27 -27
  63. package/scss/typography.module.scss.d.ts +6 -1
  64. package/scss/typography.stories.tsx +18 -2
  65. package/components/EmptyState/NobodyHome.d.ts +0 -3
  66. package/scss/_title.scss +0 -78
@@ -4,6 +4,7 @@
4
4
  @import '../../scss/palette';
5
5
  @import '../../scss/font-settings';
6
6
  @import '../../scss/supernova/styles/colors';
7
+ @import '../../scss/font-mixins';
7
8
 
8
9
  .toggle-container {
9
10
  display: flex;
@@ -21,9 +22,8 @@
21
22
  }
22
23
 
23
24
  &__label {
24
- font-size: $font-size-md;
25
- font-weight: 400;
26
- line-height: $lineheight-size-xs;
25
+ @include label;
26
+
27
27
  color: var(--core-color-neutral-900);
28
28
  margin-left: getSpacer(xs);
29
29
 
@@ -31,8 +31,8 @@
31
31
  margin-left: getSpacer(s);
32
32
  }
33
33
 
34
- &__text--semibold {
35
- font-weight: 600;
34
+ &__text--subdued {
35
+ @include label-subdued;
36
36
  }
37
37
 
38
38
  &--toggle-right {
@@ -2,7 +2,7 @@ export type Styles = {
2
2
  'toggle-container': string;
3
3
  'toggle-container__input': string;
4
4
  'toggle-container__label': string;
5
- 'toggle-container__label__text--semibold': string;
5
+ 'toggle-container__label__text--subdued': string;
6
6
  'toggle-container__label--toggle-right': string;
7
7
  'toggle-container__row': string;
8
8
  'toggle-container__row--right': string;
package/package.json CHANGED
@@ -7,11 +7,11 @@
7
7
  "url": "git+https://github.com/helsenorge/designsystem.git"
8
8
  },
9
9
  "homepage": "https://helsenorge.design",
10
- "version": "9.4.3",
10
+ "version": "10.0.0-beta.0",
11
11
  "author": "Helsenorge",
12
12
  "license": "MIT",
13
13
  "dependencies": {
14
- "framer-motion": "^11.11.8"
14
+ "motion": "^11.14.3"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "bootstrap": "^4.6.2",
package/scss/_body.scss CHANGED
@@ -1,17 +1,12 @@
1
1
  @use 'sass:map';
2
- @import './font-settings';
3
2
  @import './palette';
4
3
  @import './breakpoints';
4
+ @import './font-mixins';
5
5
 
6
6
  body {
7
7
  font-family: 'Source Sans Pro', Arial, Verdana, sans-serif;
8
8
  background-color: $white;
9
9
  color: $black;
10
- font-size: $font-size-sm;
11
- line-height: $lineheight-size-sm;
12
10
 
13
- @media (min-width: map.get($grid-breakpoints, md)) {
14
- font-size: $font-size-md;
15
- line-height: $lineheight-size-md;
16
- }
11
+ @include body;
17
12
  }
@@ -0,0 +1,186 @@
1
+ @use 'sass:map';
2
+ @import './spacers';
3
+ @import './breakpoints';
4
+
5
+ @mixin title-feature {
6
+ font-size: 2.375rem;
7
+ line-height: 2.875rem;
8
+ font-weight: 600;
9
+
10
+ @media (min-width: map.get($grid-breakpoints, md)) {
11
+ font-size: 4rem;
12
+ line-height: 5rem;
13
+ }
14
+ }
15
+
16
+ @mixin title1 {
17
+ font-size: 2rem;
18
+ line-height: 2.375rem;
19
+ font-weight: 600;
20
+
21
+ @media (min-width: map.get($grid-breakpoints, md)) {
22
+ font-size: 3rem;
23
+ line-height: 3.625rem;
24
+ }
25
+ }
26
+
27
+ @mixin title2 {
28
+ font-size: 1.625rem;
29
+ line-height: 1.938rem;
30
+ font-weight: 600;
31
+
32
+ @media (min-width: map.get($grid-breakpoints, md)) {
33
+ font-size: 2rem;
34
+ line-height: 2.375rem;
35
+ }
36
+ }
37
+
38
+ @mixin title3 {
39
+ font-size: 1.375rem;
40
+ line-height: 1.813rem;
41
+ font-weight: 600;
42
+
43
+ @media (min-width: map.get($grid-breakpoints, md)) {
44
+ font-size: 1.625rem;
45
+ line-height: 2rem;
46
+ }
47
+ }
48
+
49
+ @mixin title4 {
50
+ font-size: 1.25rem;
51
+ line-height: 1.625rem;
52
+ font-weight: 600;
53
+
54
+ @media (min-width: map.get($grid-breakpoints, md)) {
55
+ font-size: 1.375rem;
56
+ line-height: 1.813rem;
57
+ }
58
+ }
59
+
60
+ @mixin title5 {
61
+ font-size: 1rem;
62
+ line-height: 1.375rem;
63
+ letter-spacing: 0.03rem;
64
+ font-weight: 600;
65
+ text-transform: uppercase;
66
+
67
+ @media (min-width: map.get($grid-breakpoints, md)) {
68
+ font-size: 1.125rem;
69
+ line-height: 1.563rem;
70
+ letter-spacing: 0.3375rem;
71
+ }
72
+ }
73
+
74
+ @mixin title6 {
75
+ font-size: 1rem;
76
+ line-height: 1.375rem;
77
+ font-weight: 600;
78
+
79
+ @media (min-width: map.get($grid-breakpoints, md)) {
80
+ font-size: 1.125rem;
81
+ line-height: 1.563rem;
82
+ }
83
+ }
84
+
85
+ @mixin body {
86
+ font-size: 1.125rem;
87
+ line-height: 1.688rem;
88
+
89
+ @media (min-width: map.get($grid-breakpoints, md)) {
90
+ font-size: 1.25rem;
91
+ line-height: 1.875rem;
92
+ }
93
+ }
94
+
95
+ @mixin preamble {
96
+ font-size: 1.25rem;
97
+ line-height: 1.625rem;
98
+ font-weight: 400;
99
+
100
+ @media (min-width: map.get($grid-breakpoints, md)) {
101
+ font-size: 1.5rem;
102
+ line-height: 1.938rem;
103
+ }
104
+ }
105
+
106
+ @mixin legend {
107
+ font-size: 1.125rem;
108
+ line-height: 1.438rem;
109
+ font-weight: 600;
110
+
111
+ @media (min-width: map.get($grid-breakpoints, md)) {
112
+ font-size: 1.5rem;
113
+ line-height: 1.938rem;
114
+ }
115
+ }
116
+
117
+ @mixin label {
118
+ font-size: 1.125rem;
119
+ line-height: 1.375rem;
120
+ font-weight: 600;
121
+
122
+ @media (min-width: map.get($grid-breakpoints, md)) {
123
+ font-size: 1.25rem;
124
+ line-height: 1.625rem;
125
+ }
126
+ }
127
+
128
+ @mixin label-subdued {
129
+ font-size: 1.125rem;
130
+ line-height: 1.375rem;
131
+ font-weight: 400;
132
+
133
+ @media (min-width: map.get($grid-breakpoints, md)) {
134
+ font-size: 1.25rem;
135
+ line-height: 1.625rem;
136
+ }
137
+ }
138
+
139
+ @mixin compact-data {
140
+ font-size: 1rem;
141
+ line-height: 1.5rem;
142
+
143
+ @media (min-width: map.get($grid-breakpoints, md)) {
144
+ font-size: 1.125rem;
145
+ line-height: 1.4375rem;
146
+ }
147
+ }
148
+
149
+ @mixin table-cell {
150
+ font-size: 1.125rem;
151
+ line-height: 1.4375rem;
152
+ }
153
+
154
+ @mixin image-caption {
155
+ font-size: 1rem;
156
+ line-height: 1.5rem;
157
+ }
158
+
159
+ @mixin image-credit {
160
+ font-size: 0.75rem;
161
+ line-height: 1rem;
162
+ }
163
+
164
+ @mixin status-timestamp {
165
+ font-size: 1.125rem;
166
+ line-height: 1.25rem;
167
+ }
168
+
169
+ @mixin input-text {
170
+ font-size: 1.125rem;
171
+ line-height: 1.688rem;
172
+
173
+ @media (min-width: map.get($grid-breakpoints, md)) {
174
+ line-height: 1.4375rem;
175
+ }
176
+ }
177
+
178
+ @mixin input-text-large {
179
+ font-size: 1.125rem;
180
+ line-height: 1.563rem;
181
+
182
+ @media (min-width: map.get($grid-breakpoints, md)) {
183
+ font-size: 1.25rem;
184
+ line-height: 1.75rem;
185
+ }
186
+ }
@@ -1,5 +1,3 @@
1
- // @todo Slett denne filen, fontstørrelser skal hardkodes i _title.scss (som renames til _font-mixins.scss)
2
-
3
1
  $font-size-xs: 1rem; // 16px
4
2
  $font-size-sm: 1.125rem; // 18px
5
3
  $font-size-md: 1.25rem; // 20px
package/scss/_input.scss CHANGED
@@ -1,4 +1,5 @@
1
1
  @use 'sass:map';
2
+ @import './font-settings';
2
3
 
3
4
  @mixin input-wrapper {
4
5
  width: 100%;
@@ -3,7 +3,7 @@
3
3
  @import './breakpoints';
4
4
  @import './fonts';
5
5
  @import './palette';
6
- @import './title';
6
+ @import './font-mixins';
7
7
 
8
8
  /*
9
9
  Denne filen er ment til å importeres som en css module:
@@ -40,14 +40,16 @@ import designsystemtypography from './scss/typography.scss'
40
40
  @include title5;
41
41
  }
42
42
 
43
- .preamble {
44
- font-size: 1.375rem;
45
- line-height: getSpacer(l);
46
- font-weight: 600;
43
+ .title6 {
44
+ @include title6;
45
+ }
47
46
 
48
- @media (min-width: map.get($grid-breakpoints, md)) {
49
- font-size: getSpacer(m);
50
- }
47
+ .body {
48
+ @include body;
49
+ }
50
+
51
+ .preamble {
52
+ @include preamble;
51
53
  }
52
54
 
53
55
  .legend {
@@ -55,22 +57,15 @@ import designsystemtypography from './scss/typography.scss'
55
57
  }
56
58
 
57
59
  .label {
58
- font-size: $font-size-sm;
59
- line-height: getSpacer(m);
60
+ @include label;
61
+ }
60
62
 
61
- @media (min-width: map.get($grid-breakpoints, md)) {
62
- font-size: $font-size-md;
63
- line-height: $lineheight-size-sm;
64
- }
63
+ .compact-data {
64
+ @include compact-data;
65
65
  }
66
66
 
67
67
  .table-cell {
68
- font-size: $font-size-sm;
69
- line-height: $lineheight-size-sm;
70
-
71
- @media (min-width: map.get($grid-breakpoints, md)) {
72
- font-size: $font-size-md;
73
- }
68
+ @include table-cell;
74
69
  }
75
70
 
76
71
  .strong {
@@ -92,19 +87,24 @@ import designsystemtypography from './scss/typography.scss'
92
87
  }
93
88
  }
94
89
 
95
- .time {
96
- font-size: $font-size-sm;
97
- line-height: $lineheight-size-sm;
90
+ .status-timestamp {
91
+ @include status-timestamp;
98
92
  }
99
93
 
100
94
  .image-caption {
101
- font-size: $spacer;
102
- line-height: getSpacer(m);
95
+ @include image-caption;
103
96
  }
104
97
 
105
98
  .image-credit {
106
- font-size: 0.75rem;
107
- line-height: $spacer;
99
+ @include image-credit;
100
+ }
101
+
102
+ .input-text {
103
+ @include input-text;
104
+ }
105
+
106
+ .input-text-large {
107
+ @include input-text-large;
108
108
  }
109
109
 
110
110
  .anchorlink-wrapper {
@@ -1,21 +1,26 @@
1
1
  export type Styles = {
2
2
  'anchorlink-wrapper': string;
3
+ body: string;
4
+ 'compact-data': string;
3
5
  'focused-content': string;
4
6
  form: string;
5
7
  'image-caption': string;
6
8
  'image-credit': string;
9
+ 'input-text': string;
10
+ 'input-text-large': string;
7
11
  label: string;
8
12
  legend: string;
9
13
  preamble: string;
14
+ 'status-timestamp': string;
10
15
  strong: string;
11
16
  'table-cell': string;
12
- time: string;
13
17
  'title-feature': string;
14
18
  title1: string;
15
19
  title2: string;
16
20
  title3: string;
17
21
  title4: string;
18
22
  title5: string;
23
+ title6: string;
19
24
  };
20
25
 
21
26
  export type ClassNames = keyof Styles;
@@ -49,6 +49,10 @@ export const Title5: Story = {
49
49
  render: args => <div className={designsystemtypography.title5}>{args.tekst}</div>,
50
50
  };
51
51
 
52
+ export const Title6: Story = {
53
+ render: args => <div className={designsystemtypography.title6}>{args.tekst}</div>,
54
+ };
55
+
52
56
  export const Preamble: Story = {
53
57
  render: args => <div className={designsystemtypography.preamble}>{args.tekst}</div>,
54
58
  };
@@ -61,6 +65,10 @@ export const Label: Story = {
61
65
  render: args => <div className={designsystemtypography.label}>{args.tekst}</div>,
62
66
  };
63
67
 
68
+ export const CompactData: Story = {
69
+ render: args => <div className={designsystemtypography['compact-data']}>{args.tekst}</div>,
70
+ };
71
+
64
72
  export const TableCell: Story = {
65
73
  render: args => <div className={designsystemtypography['table-cell']}>{args.tekst}</div>,
66
74
  };
@@ -77,8 +85,16 @@ export const ImageCredit: Story = {
77
85
  render: args => <div className={designsystemtypography['image-credit']}>{args.tekst}</div>,
78
86
  };
79
87
 
80
- export const Time: Story = {
81
- render: args => <div className={designsystemtypography.time}>{args.tekst}</div>,
88
+ export const StatusTimestamp: Story = {
89
+ render: args => <div className={designsystemtypography['status-timestamp']}>{args.tekst}</div>,
90
+ };
91
+
92
+ export const InputText: Story = {
93
+ render: args => <div className={designsystemtypography['input-text']}>{args.tekst}</div>,
94
+ };
95
+
96
+ export const InputTextLarge: Story = {
97
+ render: args => <div className={designsystemtypography['input-text-large']}>{args.tekst}</div>,
82
98
  };
83
99
 
84
100
  export const AnchorlinkWrapper: Story = {
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- declare const NobodyHome: () => React.JSX.Element;
3
- export default NobodyHome;
package/scss/_title.scss DELETED
@@ -1,78 +0,0 @@
1
- @use 'sass:map';
2
- @import './spacers';
3
- @import './breakpoints';
4
- @import './font-settings';
5
-
6
- // @todo rename denne filen til font-mixins e.l.
7
-
8
- @mixin title-feature {
9
- font-size: 2.375rem;
10
- line-height: 2.875rem;
11
- font-weight: 600;
12
-
13
- @media (min-width: map.get($grid-breakpoints, md)) {
14
- font-size: 4rem;
15
- line-height: 5rem;
16
- }
17
- }
18
-
19
- @mixin title1 {
20
- font-size: 2.25rem;
21
- line-height: 2.75rem;
22
- font-weight: 600;
23
-
24
- @media (min-width: map.get($grid-breakpoints, md)) {
25
- font-size: 3.25rem;
26
- line-height: 3.75rem;
27
- }
28
- }
29
-
30
- @mixin title2 {
31
- font-size: 1.625rem;
32
- line-height: 2.125rem;
33
- font-weight: 600;
34
-
35
- @media (min-width: map.get($grid-breakpoints, md)) {
36
- font-size: 2rem;
37
- line-height: 2.75rem;
38
- }
39
- }
40
-
41
- @mixin title3 {
42
- font-size: 1.375rem;
43
- line-height: 1.875rem;
44
- font-weight: 600;
45
-
46
- @media (min-width: map.get($grid-breakpoints, md)) {
47
- font-size: 1.5rem;
48
- line-height: 2rem;
49
- }
50
- }
51
-
52
- @mixin title4 {
53
- font-size: $font-size-md;
54
- line-height: $lineheight-size-sm;
55
- font-weight: 700;
56
- }
57
-
58
- @mixin title5 {
59
- font-size: $spacer;
60
- line-height: 1.5rem;
61
- font-weight: 700;
62
- text-transform: uppercase;
63
-
64
- @media (min-width: map.get($grid-breakpoints, md)) {
65
- font-size: $font-size-sm;
66
- }
67
- }
68
-
69
- @mixin legend {
70
- font-size: 1.25rem;
71
- line-height: 1.75rem;
72
- font-weight: 600;
73
-
74
- @media (min-width: map.get($grid-breakpoints, md)) {
75
- font-size: 1.5rem;
76
- line-height: 2rem;
77
- }
78
- }