@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.
Files changed (241) hide show
  1. package/AnchorLink.js +2 -2
  2. package/AnchorLink.js.map +1 -1
  3. package/Avatar.js +2 -2
  4. package/Avatar.js.map +1 -1
  5. package/Badge.js +3 -3
  6. package/Badge.js.map +1 -1
  7. package/Button.js +4 -4
  8. package/Button.js.map +1 -1
  9. package/CHANGELOG.md +1392 -801
  10. package/Checkbox.js +2 -2
  11. package/Checkbox.js.map +1 -1
  12. package/Close.js +2 -2
  13. package/Close.js.map +1 -1
  14. package/ErrorBoundary.js +2 -2
  15. package/ErrorBoundary.js.map +1 -1
  16. package/FormGroup.js +12 -12
  17. package/FormGroup.js.map +1 -1
  18. package/FormLayout.js +3 -3
  19. package/FormLayout.js.map +1 -1
  20. package/HelpBubble.js +2 -2
  21. package/HelpBubble.js.map +1 -1
  22. package/HighlightPanel.js +2 -2
  23. package/HighlightPanel.js.map +1 -1
  24. package/Icon.js +3 -3
  25. package/Icon.js.map +1 -1
  26. package/Illustration.js +3 -3
  27. package/Illustration.js.map +1 -1
  28. package/Input.js +2 -2
  29. package/Input.js.map +1 -1
  30. package/Label.js +8 -8
  31. package/Label.js.map +1 -1
  32. package/LazyIcon.js +1 -1
  33. package/LazyIllustration.js +3 -3
  34. package/LazyIllustration.js.map +1 -1
  35. package/LinkList.js +6 -6
  36. package/LinkList.js.map +1 -1
  37. package/ListHeader.js +7 -7
  38. package/ListHeader.js.map +1 -1
  39. package/Panel.js +2 -2
  40. package/Panel.js.map +1 -1
  41. package/PopOver.js +2 -2
  42. package/PopOver.js.map +1 -1
  43. package/RadioButton.js +2 -2
  44. package/RadioButton.js.map +1 -1
  45. package/Select.js +2 -2
  46. package/Select.js.map +1 -1
  47. package/Slider.js +3 -3
  48. package/Slider.js.map +1 -1
  49. package/Spacer.js +2 -2
  50. package/Spacer.js.map +1 -1
  51. package/StatusDot.js +1 -1
  52. package/StepButtons.js +4 -4
  53. package/StepButtons.js.map +1 -1
  54. package/TabList.js +4 -4
  55. package/TabList.js.map +1 -1
  56. package/Table.js +2 -2
  57. package/Table.js.map +1 -1
  58. package/TableBody.js +2 -2
  59. package/TableBody.js.map +1 -1
  60. package/TableExpandedRow.js +2 -2
  61. package/TableExpandedRow.js.map +1 -1
  62. package/TableHead.js +2 -2
  63. package/TableHead.js.map +1 -1
  64. package/TableRow.js +2 -2
  65. package/TableRow.js.map +1 -1
  66. package/Textarea.js +2 -2
  67. package/Textarea.js.map +1 -1
  68. package/Title.js +2 -2
  69. package/Title.js.map +1 -1
  70. package/TooltipWord.js +2 -2
  71. package/TooltipWord.js.map +1 -1
  72. package/Trigger.js +3 -3
  73. package/Trigger.js.map +1 -1
  74. package/components/AnchorLink/styles.module.scss +7 -9
  75. package/components/Avatar/styles.module.scss +9 -9
  76. package/components/Badge/styles.module.scss +9 -9
  77. package/components/Button/styles.module.scss +79 -68
  78. package/components/Checkbox/styles.module.scss +104 -104
  79. package/components/Chip/styles.module.scss +21 -22
  80. package/components/Close/styles.module.scss +5 -5
  81. package/components/DictionaryTrigger/index.js +2 -2
  82. package/components/DictionaryTrigger/index.js.map +1 -1
  83. package/components/DictionaryTrigger/styles.module.scss +5 -5
  84. package/components/Drawer/Drawer.d.ts +41 -0
  85. package/components/Drawer/Drawer.test.d.ts +1 -0
  86. package/components/Drawer/index.d.ts +3 -0
  87. package/components/Drawer/index.js +350 -0
  88. package/components/Drawer/index.js.map +1 -0
  89. package/components/Drawer/styles.module.scss +127 -0
  90. package/components/Drawer/styles.module.scss.d.ts +16 -0
  91. package/components/Dropdown/index.js +3 -3
  92. package/components/Dropdown/index.js.map +1 -1
  93. package/components/Dropdown/styles.module.scss +55 -55
  94. package/components/Duolist/index.js +6 -5
  95. package/components/Duolist/index.js.map +1 -1
  96. package/components/Duolist/styles.module.scss +57 -35
  97. package/components/Duolist/styles.module.scss.d.ts +1 -0
  98. package/components/EmptyState/styles.module.scss +16 -16
  99. package/components/ErrorWrapper/styles.module.scss +12 -22
  100. package/components/ErrorWrapper/styles.module.scss.d.ts +0 -1
  101. package/components/Expander/styles.module.scss +53 -53
  102. package/components/ExpanderHierarchy/expander.module.scss +35 -35
  103. package/components/ExpanderHierarchy/index.js +5 -5
  104. package/components/ExpanderHierarchy/index.js.map +1 -1
  105. package/components/ExpanderHierarchy/styles.module.scss +4 -5
  106. package/components/ExpanderList/index.js +8 -8
  107. package/components/ExpanderList/index.js.map +1 -1
  108. package/components/ExpanderList/styles.module.scss +32 -32
  109. package/components/EyebrowHeader/styles.module.scss +0 -2
  110. package/components/FormGroup/styles.module.scss +9 -9
  111. package/components/FormLayout/styles.module.scss +4 -5
  112. package/components/HelpBubble/styles.module.scss +14 -14
  113. package/components/HelpPanel/styles.module.scss +2 -2
  114. package/components/HelpQuestion/index.js +2 -2
  115. package/components/HelpQuestion/index.js.map +1 -1
  116. package/components/HelpQuestion/styles.module.scss +20 -20
  117. package/components/HighlightPanel/styles.module.scss +22 -54
  118. package/components/HighlightPanel/styles.module.scss.d.ts +1 -2
  119. package/components/HorizontalScroll/styles.module.scss +4 -3
  120. package/components/Icons/EuropeanHealthCard.js +1 -1
  121. package/components/Icons/GroupTwins.js +1 -1
  122. package/components/Icons/Inbox.js +1 -1
  123. package/components/Icons/LawBook.js +1 -1
  124. package/components/Icons/PersonCancel.js +1 -1
  125. package/components/Icons/PersonWithBrain.js +1 -1
  126. package/components/Icons/Puzzle.js +1 -1
  127. package/components/Icons/Snapchat.js +1 -1
  128. package/components/Illustrations/IllustrationNames.d.ts +1 -1
  129. package/components/Illustrations/IllustrationNames.js +4 -2
  130. package/components/Illustrations/IllustrationNames.js.map +1 -1
  131. package/components/Illustrations/ReadLetters.d.ts +9 -0
  132. package/components/Illustrations/ReadLetters.js +11 -0
  133. package/components/Illustrations/ReadLetters.js.map +1 -0
  134. package/components/Illustrations/ReadLettersMedium.d.ts +4 -0
  135. package/components/Illustrations/ReadLettersMedium.js +110 -0
  136. package/components/Illustrations/ReadLettersMedium.js.map +1 -0
  137. package/components/Illustrations/Support2.d.ts +9 -0
  138. package/components/Illustrations/Support2.js +11 -0
  139. package/components/Illustrations/Support2.js.map +1 -0
  140. package/components/Illustrations/Support2Medium.d.ts +4 -0
  141. package/components/Illustrations/Support2Medium.js +232 -0
  142. package/components/Illustrations/Support2Medium.js.map +1 -0
  143. package/components/Input/styles.module.scss +14 -14
  144. package/components/Label/styles.module.scss +29 -25
  145. package/components/Label/styles.module.scss.d.ts +3 -1
  146. package/components/LinkList/styles.module.scss +35 -35
  147. package/components/List/styles.module.scss +7 -7
  148. package/components/ListHeader/styles.module.scss +8 -8
  149. package/components/Loader/styles.module.scss +14 -14
  150. package/components/MaxCharacters/styles.module.scss +12 -12
  151. package/components/Modal/index.js +71 -82
  152. package/components/Modal/index.js.map +1 -1
  153. package/components/Modal/styles.module.scss +54 -48
  154. package/components/NotificationPanel/index.js +3 -3
  155. package/components/NotificationPanel/index.js.map +1 -1
  156. package/components/NotificationPanel/styles.module.scss +40 -40
  157. package/components/Panel/styles.module.scss +60 -60
  158. package/components/PanelList/index.js +5 -5
  159. package/components/PanelList/index.js.map +1 -1
  160. package/components/PanelList/styles.module.scss +6 -6
  161. package/components/PopMenu/index.js +5 -5
  162. package/components/PopMenu/index.js.map +1 -1
  163. package/components/PopMenu/styles.module.scss +16 -16
  164. package/components/PopOver/styles.module.scss +14 -15
  165. package/components/PopOver/styles.module.scss.d.ts +0 -3
  166. package/components/Portal/index.js +3 -3
  167. package/components/Portal/index.js.map +1 -1
  168. package/components/Progressbar/styles.module.scss +4 -4
  169. package/components/PromoPanel/index.js +2 -2
  170. package/components/PromoPanel/index.js.map +1 -1
  171. package/components/PromoPanel/styles.module.scss +31 -31
  172. package/components/RadioButton/styles.module.scss +100 -100
  173. package/components/Select/styles.module.scss +23 -23
  174. package/components/ServiceMessage/styles.module.scss +48 -48
  175. package/components/SharingStatus/styles.module.scss +13 -13
  176. package/components/Slider/styles.module.scss +25 -25
  177. package/components/Spacer/styles.module.scss +14 -14
  178. package/components/StatusDot/styles.module.scss +24 -24
  179. package/components/Step/styles.module.scss +3 -3
  180. package/components/StepButtons/styles.module.scss +11 -11
  181. package/components/Stepper/styles.module.scss +24 -16
  182. package/components/StickyNote/styles.module.scss +3 -3
  183. package/components/Table/styles.module.scss +31 -31
  184. package/components/Tabs/TabList/styles.module.scss +2 -2
  185. package/components/Tabs/TabPanel/styles.module.scss +7 -7
  186. package/components/Tabs/index.js +3 -3
  187. package/components/Tabs/index.js.map +1 -1
  188. package/components/Tabs/styles.module.scss +3 -3
  189. package/components/Tag/styles.module.scss +16 -16
  190. package/components/TagList/index.js +2 -2
  191. package/components/TagList/index.js.map +1 -1
  192. package/components/TagList/styles.module.scss +4 -4
  193. package/components/Textarea/styles.module.scss +9 -9
  194. package/components/Tile/index.js +6 -6
  195. package/components/Tile/index.js.map +1 -1
  196. package/components/Tile/styles.module.scss +31 -31
  197. package/components/Title/styles.module.scss +8 -8
  198. package/components/Toggle/index.js +3 -3910
  199. package/components/Toggle/index.js.map +1 -1
  200. package/components/Toggle/styles.module.scss +18 -18
  201. package/components/Tooltip/TooltipWord/styles.module.scss +4 -4
  202. package/components/Tooltip/index.js +2 -2
  203. package/components/Tooltip/index.js.map +1 -1
  204. package/components/Trigger/styles.module.scss +21 -21
  205. package/components/Validation/index.js +6 -6
  206. package/components/Validation/index.js.map +1 -1
  207. package/components/Validation/styles.module.scss +11 -11
  208. package/constants.d.ts +1 -0
  209. package/constants.js +1 -0
  210. package/constants.js.map +1 -1
  211. package/hoc/withBreakpoint/withBreakpoint.js +2 -2
  212. package/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
  213. package/hooks/useBreakpoint.d.ts +0 -4
  214. package/hooks/useBreakpoint.js +23 -18
  215. package/hooks/useBreakpoint.js.map +1 -1
  216. package/hooks/useEventListenerState.js +3 -3
  217. package/hooks/useEventListenerState.js.map +1 -1
  218. package/hooks/useReturnFocusOnUnmount.d.ts +5 -0
  219. package/hooks/useReturnFocusOnUnmount.js +20 -0
  220. package/hooks/useReturnFocusOnUnmount.js.map +1 -0
  221. package/package.json +1 -1
  222. package/scss/_body.scss +5 -6
  223. package/scss/_breakpoints.scss +8 -2
  224. package/scss/_font-mixins.scss +72 -17
  225. package/scss/_fonts.scss +0 -2
  226. package/scss/_input.scss +54 -51
  227. package/scss/_print.scss +5 -5
  228. package/scss/_reset.scss +1 -1
  229. package/scss/helsenorge.scss +7 -7
  230. package/scss/layout.module.scss +2 -2
  231. package/scss/typography.module.scss +65 -40
  232. package/scss/typography.module.scss.d.ts +6 -0
  233. package/scss/typography.stories.tsx +24 -0
  234. package/theme/index.js +2 -2
  235. package/use-animate.js +3952 -0
  236. package/use-animate.js.map +1 -0
  237. package/utils/accessibility.d.ts +1 -0
  238. package/utils/accessibility.js +6 -1
  239. package/utils/accessibility.js.map +1 -1
  240. package/utils/component.js +4 -4
  241. package/utils/component.js.map +1 -1
@@ -1,9 +1,10 @@
1
1
  @use 'sass:map';
2
- @import './spacers';
3
- @import './breakpoints';
4
- @import './fonts';
5
- @import './palette';
6
- @import './font-mixins';
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: $font-size-sm;
20
- line-height: $lineheight-size-sm;
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: $font-size-sm;
73
- line-height: $lineheight-size-sm;
85
+ font-size: font-settings.$font-size-sm;
86
+ line-height: font-settings.$lineheight-size-sm;
74
87
 
75
- @media (min-width: map.get($grid-breakpoints, md)) {
76
- font-size: $font-size-md;
77
- line-height: $lineheight-size-md;
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: $font-size-sm;
83
- line-height: $lineheight-size-sm;
95
+ font-size: font-settings.$font-size-sm;
96
+ line-height: font-settings.$lineheight-size-sm;
84
97
 
85
- @media (min-width: map.get($grid-breakpoints, md)) {
86
- font-size: $font-size-md;
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: $blueberry600;
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: $blueberry400;
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: $blueberry700;
128
- background-color: $blueberry50;
129
- text-decoration-color: $blueberry600;
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 $black;
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 { screen, breakpoints } from "./grid.js";
1
+ import { breakpoints, screen } from "./grid.js";
2
2
  import { palette } from "./palette.js";
3
- import { spacer, spacers } from "./spacers.js";
3
+ import { spacers, spacer } from "./spacers.js";
4
4
  const theme = {
5
5
  spacer,
6
6
  spacers,