@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.
Files changed (239) 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 +8 -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 +68 -57
  78. package/components/Checkbox/styles.module.scss +103 -103
  79. package/components/Chip/styles.module.scss +22 -22
  80. package/components/Close/styles.module.scss +4 -4
  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 +51 -51
  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 +12 -12
  99. package/components/ErrorWrapper/styles.module.scss +11 -21
  100. package/components/ErrorWrapper/styles.module.scss.d.ts +0 -1
  101. package/components/Expander/styles.module.scss +46 -46
  102. package/components/ExpanderHierarchy/expander.module.scss +29 -29
  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 +30 -30
  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 +13 -13
  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 +19 -19
  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 +12 -12
  144. package/components/Label/styles.module.scss +28 -24
  145. package/components/Label/styles.module.scss.d.ts +3 -1
  146. package/components/LinkList/styles.module.scss +33 -33
  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 +11 -11
  151. package/components/Modal/index.js +71 -82
  152. package/components/Modal/index.js.map +1 -1
  153. package/components/Modal/styles.module.scss +45 -39
  154. package/components/NotificationPanel/index.js +3 -3
  155. package/components/NotificationPanel/index.js.map +1 -1
  156. package/components/NotificationPanel/styles.module.scss +33 -33
  157. package/components/Panel/styles.module.scss +45 -45
  158. package/components/PanelList/index.js +5 -5
  159. package/components/PanelList/index.js.map +1 -1
  160. package/components/PanelList/styles.module.scss +5 -5
  161. package/components/PopMenu/index.js +5 -5
  162. package/components/PopMenu/index.js.map +1 -1
  163. package/components/PopMenu/styles.module.scss +15 -15
  164. package/components/PopOver/styles.module.scss +13 -14
  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 +22 -22
  172. package/components/RadioButton/styles.module.scss +99 -99
  173. package/components/Select/styles.module.scss +21 -21
  174. package/components/ServiceMessage/styles.module.scss +49 -49
  175. package/components/SharingStatus/styles.module.scss +13 -13
  176. package/components/Slider/styles.module.scss +24 -24
  177. package/components/Spacer/styles.module.scss +14 -14
  178. package/components/StatusDot/styles.module.scss +22 -22
  179. package/components/Step/styles.module.scss +3 -3
  180. package/components/StepButtons/styles.module.scss +9 -9
  181. package/components/Stepper/styles.module.scss +23 -15
  182. package/components/StickyNote/styles.module.scss +3 -3
  183. package/components/Table/styles.module.scss +32 -32
  184. package/components/Tabs/TabList/styles.module.scss +1 -1
  185. package/components/Tabs/TabPanel/styles.module.scss +5 -5
  186. package/components/Tabs/index.js +3 -3
  187. package/components/Tabs/index.js.map +1 -1
  188. package/components/Tabs/styles.module.scss +1 -1
  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 +25 -25
  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 +14 -14
  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 +10 -10
  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 +57 -2
  225. package/scss/_fonts.scss +0 -2
  226. package/scss/_input.scss +53 -50
  227. package/scss/_print.scss +2 -2
  228. package/scss/layout.module.scss +2 -2
  229. package/scss/typography.module.scss +62 -37
  230. package/scss/typography.module.scss.d.ts +6 -0
  231. package/scss/typography.stories.tsx +24 -0
  232. package/theme/index.js +2 -2
  233. package/use-animate.js +3952 -0
  234. package/use-animate.js.map +1 -0
  235. package/utils/accessibility.d.ts +1 -0
  236. package/utils/accessibility.js +6 -1
  237. package/utils/accessibility.js.map +1 -1
  238. package/utils/component.js +4 -4
  239. package/utils/component.js.map +1 -1
@@ -1,9 +1,9 @@
1
1
  @use 'sass:map';
2
- @import '../../scss/spacers';
3
- @import '../../scss/breakpoints';
4
- @import '../../scss/palette';
5
- @import '../../scss/font-settings';
6
- @import '../../scss/screen-reader';
2
+ @use '../../scss/spacers' as spacers;
3
+ @use '../../scss/palette' as palette;
4
+ @use '../../scss/font-settings' as font-settings;
5
+ @use '../../scss/screen-reader' as *;
6
+ @use '../../scss/breakpoints' as *;
7
7
 
8
8
  $status-dot-size: 0.937rem;
9
9
 
@@ -11,17 +11,17 @@ $status-dot-size: 0.937rem;
11
11
  position: relative;
12
12
  display: inline-flex;
13
13
  align-items: flex-start;
14
- font-size: $font-size-xs;
14
+ font-size: font-settings.$font-size-xs;
15
15
  line-height: 1.4rem;
16
16
  font-weight: 400;
17
17
 
18
18
  @media (min-width: map.get($grid-breakpoints, sm)) {
19
- font-size: $font-size-sm;
19
+ font-size: font-settings.$font-size-sm;
20
20
  line-height: 1.6rem;
21
21
  }
22
22
 
23
23
  &--cancelled {
24
- color: $cherry600;
24
+ color: palette.$cherry600;
25
25
  }
26
26
 
27
27
  &__dot {
@@ -29,8 +29,8 @@ $status-dot-size: 0.937rem;
29
29
  align-items: center;
30
30
  justify-content: center;
31
31
  position: relative;
32
- top: getSpacer(4xs);
33
- margin-right: getSpacer(2xs);
32
+ top: spacers.getSpacer(4xs);
33
+ margin-right: spacers.getSpacer(2xs);
34
34
  border-radius: 10rem;
35
35
  width: $status-dot-size;
36
36
  height: $status-dot-size;
@@ -38,44 +38,44 @@ $status-dot-size: 0.937rem;
38
38
  min-height: $status-dot-size;
39
39
 
40
40
  @media (min-width: map.get($grid-breakpoints, sm)) {
41
- top: getSpacer(3xs);
41
+ top: spacers.getSpacer(3xs);
42
42
  }
43
43
 
44
44
  &--info {
45
- background: $kiwi900;
45
+ background: palette.$kiwi900;
46
46
  }
47
47
  &--info#{&}--on-dark {
48
- background: $kiwi400;
48
+ background: palette.$kiwi400;
49
49
  }
50
50
 
51
51
  &--warning {
52
- background: $banana400;
52
+ background: palette.$banana400;
53
53
  }
54
54
 
55
55
  &--alert,
56
56
  &--cancelled {
57
- background: $cherry500;
57
+ background: palette.$cherry500;
58
58
  }
59
59
  &--alert#{&}--on-dark {
60
- background: $cherry300;
60
+ background: palette.$cherry300;
61
61
  }
62
62
  &--cancelled#{&}--on-dark {
63
- outline: 2px solid $white;
63
+ outline: 2px solid palette.$white;
64
64
  }
65
65
 
66
66
  &--active {
67
- background: $blueberry500;
67
+ background: palette.$blueberry500;
68
68
  }
69
69
  &--active#{&}--on-dark {
70
- background: $blueberry300;
70
+ background: palette.$blueberry300;
71
71
  }
72
72
 
73
73
  &--transparent {
74
- border: 2px solid $neutral600;
74
+ border: 2px solid palette.$neutral600;
75
75
  }
76
76
  &--transparent#{&}--on-dark {
77
77
  border: none;
78
- background: $white;
78
+ background: palette.$white;
79
79
  }
80
80
 
81
81
  svg {
@@ -85,7 +85,7 @@ $status-dot-size: 0.937rem;
85
85
 
86
86
  &__label {
87
87
  &--on-dark {
88
- color: $white;
88
+ color: palette.$white;
89
89
  }
90
90
  }
91
91
  }
@@ -1,12 +1,12 @@
1
1
  @use 'sass:map';
2
- @import '../../scss/spacers';
2
+ @use '../../scss/spacers' as spacers;
3
3
 
4
4
  .step {
5
5
  &__stepper {
6
- margin-bottom: getSpacer(m);
6
+ margin-bottom: spacers.getSpacer(m);
7
7
  }
8
8
 
9
9
  &__content {
10
- margin-bottom: getSpacer(s);
10
+ margin-bottom: spacers.getSpacer(s);
11
11
  }
12
12
  }
@@ -1,25 +1,25 @@
1
1
  @use 'sass:map';
2
- @import '../../scss/spacers';
3
- @import '../../scss/breakpoints';
4
- @import '../../scss/palette';
5
- @import '../../scss/screen-reader';
2
+ @use '../../scss/spacers' as spacers;
3
+ @use '../../scss/palette' as palette;
4
+ @use '../../scss/screen-reader' as *;
5
+ @use '../../scss/breakpoints' as *;
6
6
 
7
7
  .stepbuttons {
8
- margin-top: getSpacer(m);
9
- margin-bottom: getSpacer(s);
8
+ margin-top: spacers.getSpacer(m);
9
+ margin-bottom: spacers.getSpacer(s);
10
10
  display: flex;
11
11
  flex-wrap: wrap;
12
- gap: getSpacer(m) getSpacer(l);
12
+ gap: spacers.getSpacer(m) spacers.getSpacer(l);
13
13
 
14
14
  &--has-sticky-buttons {
15
- background-color: $white;
15
+ background-color: palette.$white;
16
16
  position: sticky;
17
17
  bottom: 0;
18
18
  }
19
19
 
20
20
  &__buttons {
21
21
  display: flex;
22
- gap: getSpacer(s);
22
+ gap: spacers.getSpacer(s);
23
23
 
24
24
  @media (max-width: map.get($grid-max-breakpoints, xs)) {
25
25
  width: 100%;
@@ -1,16 +1,16 @@
1
1
  @use 'sass:map';
2
- @import '../../scss/breakpoints';
3
- @import '../../scss/spacers';
4
- @import '../../scss/palette';
5
- @import '../../scss/font-settings';
2
+ @use '../../scss/spacers' as spacers;
3
+ @use '../../scss/palette' as palette;
4
+ @use '../../scss/font-settings' as font-settings;
5
+ @use '../../scss/breakpoints' as *;
6
6
 
7
7
  .stepper-wrapper {
8
8
  display: flex;
9
9
  align-items: center;
10
- min-height: getSpacer(l);
10
+ min-height: spacers.getSpacer(l);
11
11
 
12
12
  @media (min-width: map.get($grid-breakpoints, md)) {
13
- min-height: getSpacer(xl);
13
+ min-height: spacers.getSpacer(xl);
14
14
  }
15
15
  }
16
16
 
@@ -47,7 +47,15 @@ $dot-offset: calc($stepper-padding-x + $dot-size / 2);
47
47
  display: block;
48
48
  height: $stepper-height;
49
49
  border-radius: 4px;
50
- background: linear-gradient(to right, $blueberry600, $blueberry600 $dot-offset, $blueberry50 $dot-offset, $blueberry50), $blueberry600;
50
+ background:
51
+ linear-gradient(
52
+ to right,
53
+ palette.$blueberry600,
54
+ palette.$blueberry600 $dot-offset,
55
+ palette.$blueberry50 $dot-offset,
56
+ palette.$blueberry50
57
+ ),
58
+ palette.$blueberry600;
51
59
  background-repeat: no-repeat;
52
60
 
53
61
  @media (prefers-reduced-motion: no-preference) {
@@ -59,8 +67,8 @@ $dot-offset: calc($stepper-padding-x + $dot-size / 2);
59
67
  width: $marker-size;
60
68
  height: $marker-size;
61
69
  top: calc(($stepper-height - $marker-size) / 2);
62
- background-color: $white;
63
- border: 6px solid $blueberry600;
70
+ background-color: palette.$white;
71
+ border: 6px solid palette.$blueberry600;
64
72
  border-radius: 50%;
65
73
 
66
74
  @media (prefers-reduced-motion: no-preference) {
@@ -71,11 +79,11 @@ $dot-offset: calc($stepper-padding-x + $dot-size / 2);
71
79
  &__number {
72
80
  min-width: 2.5rem;
73
81
  text-align: right;
74
- margin-left: getSpacer(xs);
75
- font-size: $font-size-xs;
76
- line-height: $lineheight-size-xs;
82
+ margin-left: spacers.getSpacer(xs);
83
+ font-size: font-settings.$font-size-xs;
84
+ line-height: font-settings.$lineheight-size-xs;
77
85
  font-weight: 700;
78
- color: $blueberry700;
86
+ color: palette.$blueberry700;
79
87
  }
80
88
 
81
89
  &__dot {
@@ -83,7 +91,7 @@ $dot-offset: calc($stepper-padding-x + $dot-size / 2);
83
91
  top: calc(($stepper-height - $dot-size) / 2);
84
92
  width: $dot-size;
85
93
  height: $dot-size;
86
- background-color: $blueberry600;
94
+ background-color: palette.$blueberry600;
87
95
  border-radius: 50%;
88
96
 
89
97
  @media (prefers-reduced-motion: no-preference) {
@@ -91,7 +99,7 @@ $dot-offset: calc($stepper-padding-x + $dot-size / 2);
91
99
  }
92
100
 
93
101
  &--completed {
94
- background-color: $blueberry50;
102
+ background-color: palette.$blueberry50;
95
103
  }
96
104
 
97
105
  &--left {
@@ -1,5 +1,5 @@
1
- @use '../../scss/supernova/styles/colors' as *;
2
- @use '../../scss/font-settings' as fonts;
1
+ @use '../../scss/font-settings' as font-settings;
2
+ @import '../../scss/supernova/styles/colors';
3
3
 
4
4
  .sticky-note {
5
5
  position: relative;
@@ -95,7 +95,7 @@
95
95
  &__error-text {
96
96
  color: var(--color-notification-status-error);
97
97
  line-height: 1.875rem;
98
- font-size: fonts.$font-size-sm;
98
+ font-size: font-settings.$font-size-sm;
99
99
  margin-top: 0.75rem;
100
100
  }
101
101
  }
@@ -1,10 +1,10 @@
1
1
  // Kan fjernes når konvensjonen for BEM er tillatt.
2
2
  /* stylelint-disable selector-class-pattern */
3
3
  @use 'sass:map';
4
- @import '../../scss/spacers';
5
- @import '../../scss/breakpoints';
6
- @import '../../scss/palette';
7
- @import '../../scss/font-settings';
4
+ @use '../../scss/spacers' as spacers;
5
+ @use '../../scss/palette' as palette;
6
+ @use '../../scss/font-settings' as font-settings;
7
+ @use '../../scss/breakpoints' as *;
8
8
  @import '../../scss/grid';
9
9
 
10
10
  /* fix outline for Safari */
@@ -72,7 +72,7 @@ table .table-body .table-row {
72
72
  top: 0;
73
73
  left: 0;
74
74
  width: 60%;
75
- padding-right: $spacer;
75
+ padding-right: spacers.$spacer;
76
76
  white-space: normal;
77
77
  display: block;
78
78
  float: left;
@@ -85,7 +85,7 @@ table .table-body .table-row {
85
85
 
86
86
  .table__expander-cell-mobile {
87
87
  padding-left: 0.75rem;
88
- border-bottom: 1px solid $neutral500;
88
+ border-bottom: 1px solid palette.$neutral500;
89
89
 
90
90
  &--expanded {
91
91
  border-bottom: 0;
@@ -99,7 +99,7 @@ table .table-body .table-row {
99
99
 
100
100
  .table__cell:first-child {
101
101
  border-collapse: collapse;
102
- border-top: 1px solid $neutral500;
102
+ border-top: 1px solid palette.$neutral500;
103
103
  }
104
104
 
105
105
  .table__expanded-row {
@@ -117,7 +117,7 @@ table .table-body .table-row {
117
117
  .table__row--expandable {
118
118
  .table__cell:nth-child(2) {
119
119
  border-collapse: collapse;
120
- border-top: 1px solid $neutral500;
120
+ border-top: 1px solid palette.$neutral500;
121
121
  }
122
122
 
123
123
  &:focus-within {
@@ -126,7 +126,7 @@ table .table-body .table-row {
126
126
  }
127
127
 
128
128
  .table-row:last-child .table__cell:last-child {
129
- border-bottom: 1px solid $neutral500;
129
+ border-bottom: 1px solid palette.$neutral500;
130
130
  }
131
131
  }
132
132
 
@@ -153,10 +153,10 @@ table .table-body .table-row {
153
153
  }
154
154
 
155
155
  .table__head {
156
- background: $blueberry50;
156
+ background: palette.$blueberry50;
157
157
 
158
158
  &--normal {
159
- background: $neutral50;
159
+ background: palette.$neutral50;
160
160
  }
161
161
 
162
162
  &--transparent {
@@ -164,7 +164,7 @@ table .table-body .table-row {
164
164
  }
165
165
 
166
166
  &--sortable {
167
- background: $blueberry50;
167
+ background: palette.$blueberry50;
168
168
  }
169
169
 
170
170
  @media (min-width: map.get($grid-breakpoints, lg)) {
@@ -184,46 +184,46 @@ table .table-body .table-row {
184
184
  // Fix for firefox hover feil
185
185
  background-clip: padding-box;
186
186
  height: 3.625rem;
187
- font-size: $font-size-sm;
188
- line-height: $lineheight-size-xs;
187
+ font-size: font-settings.$font-size-sm;
188
+ line-height: font-settings.$lineheight-size-xs;
189
189
  text-align: left;
190
190
  vertical-align: bottom;
191
191
  font-weight: 700;
192
192
  padding: 0.5rem 0.75rem;
193
- border: 1px solid $neutral500;
193
+ border: 1px solid palette.$neutral500;
194
194
 
195
195
  &--sortable {
196
196
  position: relative;
197
197
  }
198
198
 
199
199
  &--sortable:hover {
200
- background-color: $blueberry100;
200
+ background-color: palette.$blueberry100;
201
201
  cursor: pointer;
202
202
  }
203
203
 
204
204
  &--sortable:focus-within {
205
- outline: 3px solid $black;
205
+ outline: 3px solid palette.$black;
206
206
  outline-offset: -3px;
207
207
  }
208
208
 
209
209
  @media (min-width: map.get($grid-breakpoints, lg)) {
210
210
  padding: 1rem;
211
211
  height: 5.5rem;
212
- font-size: $font-size-md;
213
- line-height: $lineheight-size-sm;
212
+ font-size: font-settings.$font-size-md;
213
+ line-height: font-settings.$lineheight-size-sm;
214
214
  font-weight: 700;
215
215
  }
216
216
 
217
217
  &--compact {
218
- padding: getSpacer(2xs) getSpacer(3xs) getSpacer(4xs);
218
+ padding: spacers.getSpacer(2xs) spacers.getSpacer(3xs) spacers.getSpacer(4xs);
219
219
  line-height: 18px;
220
220
  font-size: 14px;
221
221
  height: unset;
222
222
 
223
223
  @media (min-width: map.get($grid-breakpoints, sm)) {
224
- padding: getSpacer(s) getSpacer(3xs) getSpacer(3xs);
224
+ padding: spacers.getSpacer(s) spacers.getSpacer(3xs) spacers.getSpacer(3xs);
225
225
  line-height: 20px;
226
- font-size: $font-size-xs;
226
+ font-size: font-settings.$font-size-xs;
227
227
  height: unset;
228
228
  }
229
229
  }
@@ -235,11 +235,11 @@ table .table-body .table-row {
235
235
 
236
236
  .table__cell {
237
237
  height: 2, 375;
238
- font-size: $font-size-xs;
238
+ font-size: font-settings.$font-size-xs;
239
239
  line-height: 1.5rem;
240
240
  padding: 0.5rem 0.75rem;
241
241
  text-align: left;
242
- border: 1px solid $neutral500;
242
+ border: 1px solid palette.$neutral500;
243
243
 
244
244
  &--center {
245
245
  text-align: center;
@@ -256,17 +256,17 @@ table .table-body .table-row {
256
256
  @media (min-width: map.get($grid-breakpoints, lg)) {
257
257
  padding: 1rem;
258
258
  height: 3.625rem;
259
- font-size: $font-size-sm;
259
+ font-size: font-settings.$font-size-sm;
260
260
  line-height: 1.75rem;
261
261
  }
262
262
 
263
263
  &--compact {
264
- padding: getSpacer(4xs) getSpacer(3xs);
264
+ padding: spacers.getSpacer(4xs) spacers.getSpacer(3xs);
265
265
  font-size: 14px;
266
266
 
267
267
  @media (min-width: map.get($grid-breakpoints, sm)) {
268
- padding: getSpacer(3xs);
269
- font-size: $font-size-xs;
268
+ padding: spacers.getSpacer(3xs);
269
+ font-size: font-settings.$font-size-xs;
270
270
  }
271
271
  }
272
272
  }
@@ -274,18 +274,18 @@ table .table-body .table-row {
274
274
  .table__cell-expander {
275
275
  text-align: center;
276
276
  width: min-content;
277
- padding: 0 getSpacer(3xs);
277
+ padding: 0 spacers.getSpacer(3xs);
278
278
  vertical-align: middle;
279
279
  }
280
280
 
281
281
  .table__row--expandable {
282
282
  &--selected {
283
- background: $neutral100;
283
+ background: palette.$neutral100;
284
284
  }
285
285
 
286
286
  &:hover {
287
287
  cursor: pointer;
288
- background: $blueberry50;
288
+ background: palette.$blueberry50;
289
289
  }
290
290
  }
291
291
 
@@ -301,7 +301,7 @@ table .table-body .table-row {
301
301
 
302
302
  @media (min-width: map.get($grid-breakpoints, lg)) {
303
303
  &--open {
304
- border-bottom: 1px solid $neutral100;
304
+ border-bottom: 1px solid palette.$neutral100;
305
305
  }
306
306
  }
307
307
  }
@@ -1,6 +1,6 @@
1
1
  @use 'sass:map';
2
+ @use '../../../scss/breakpoints' as *;
2
3
  @import '../../../scss/supernova/styles/colors';
3
- @import '../../../scss/breakpoints';
4
4
 
5
5
  .tab-list {
6
6
  $tab-list: &;
@@ -1,14 +1,14 @@
1
1
  @use 'sass:map';
2
- @import '../../../scss/spacers';
3
- @import '../../../scss/palette';
4
- @import '../../../scss/breakpoints';
2
+ @use '../../../scss/spacers' as spacers;
3
+ @use '../../../scss/palette' as palette;
4
+ @use '../../../scss/breakpoints' as *;
5
5
  @import '../../../scss/supernova/styles/colors';
6
6
 
7
7
  .tab-panel {
8
8
  $tab-panel: &;
9
9
  $colors: 'blueberry', 'neutral', 'white';
10
10
 
11
- padding: getSpacer(l) getSpacer(s) getSpacer(xl);
11
+ padding: spacers.getSpacer(l) spacers.getSpacer(s) spacers.getSpacer(xl);
12
12
  width: 100%;
13
13
  border-bottom: 1px solid var(--color-action-border-onlight-focus);
14
14
 
@@ -22,7 +22,7 @@
22
22
  border-radius: 0 0 0.5rem 0.5rem;
23
23
  border: 1px solid var(--color-action-border-onlight-focus);
24
24
  border-top: 0;
25
- padding: getSpacer(xl) getSpacer(m) getSpacer(2xl);
25
+ padding: spacers.getSpacer(xl) spacers.getSpacer(m) spacers.getSpacer(2xl);
26
26
 
27
27
  &#{$tab-panel}--first {
28
28
  border-radius: 0;
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import React, { useState, useRef } from "react";
2
+ import React__default, { useState, useRef } from "react";
3
3
  import classNames from "classnames";
4
- import { a as Tab, T as TabList } from "../../TabList.js";
4
+ import { T as TabList, a as Tab } from "../../TabList.js";
5
5
  import { T as TabPanel } from "../../TabPanel.js";
6
6
  import designsystemlayout from "../../scss/layout.module.scss";
7
7
  import styles from "./styles.module.scss";
@@ -61,7 +61,7 @@ const TabsRoot = ({
61
61
  ]
62
62
  }
63
63
  ),
64
- /* @__PURE__ */ jsx("div", { ref: tabsRef, style: { marginTop: "-50px" }, children: /* @__PURE__ */ jsx(TabPanel, { ref: tabPanelRef, color, isFirst: activeTabIndex == 0, children: React.Children.toArray(children)[activeTabIndex] }) })
64
+ /* @__PURE__ */ jsx("div", { ref: tabsRef, style: { marginTop: "-50px" }, children: /* @__PURE__ */ jsx(TabPanel, { ref: tabPanelRef, color, isFirst: activeTabIndex == 0, children: React__default.Children.toArray(children)[activeTabIndex] }) })
65
65
  ] });
66
66
  };
67
67
  const Tabs = TabsRoot;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import React, { useState, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Tab from './Tab';\nimport TabList from './TabList';\nimport TabPanel from './TabPanel';\nimport designsystemlayout from '../../scss/layout.module.scss';\nimport { PaletteNames } from '../../theme/palette';\n\nimport styles from './styles.module.scss';\n\nexport type { TabProps } from './Tab';\nexport type TabsColors = Extract<PaletteNames, 'blueberry' | 'neutral' | 'white'>;\nexport type TabsOnColor = 'onblueberry' | 'onneutral' | 'onwhite';\n\nexport interface TabsProps {\n children?: React.ReactNode;\n /** Controlled state for Tabs component */\n activeTab?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the color of the tabs. Default: white */\n color?: TabsColors;\n /** Sets wether the component should use the container-breakout class. Default: true */\n containerBreakout?: boolean;\n /** Sets the background color of the tabs. Can only be used when the color is set to white. Default: onwhite */\n onColor?: TabsOnColor;\n /** Whether the tab list should be sticky */\n sticky?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets aria label on the \"scroll to the right\" button in TabList */\n ariaLabelRightButton?: string;\n /** Sets aria label on the \"scroll to the left\" button in TabList */\n ariaLabelLeftButton?: string;\n /** Overrides the default z-index of the tabs header */\n zIndex?: number;\n}\n\nconst TabsRoot: React.FC<TabsProps> = ({\n activeTab,\n children,\n className,\n color = 'white',\n containerBreakout = true,\n onColor = 'onwhite',\n sticky = true,\n testId,\n ariaLabelRightButton,\n ariaLabelLeftButton,\n zIndex,\n}) => {\n const isControlled = activeTab !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(0);\n const tabsRef = useRef<HTMLDivElement>(null);\n const tabPanelRef = useRef<HTMLDivElement>(null);\n const tabListRef = useRef<HTMLDivElement>(null);\n\n let onColorUsed: TabsOnColor = 'onwhite';\n if (color === 'white') {\n onColorUsed = onColor;\n }\n\n const onValueChange = (newValue: number): void => {\n if (!isControlled) {\n setUncontrolledValue(newValue);\n }\n };\n\n const activeTabIndex = isControlled ? activeTab : uncontrolledValue;\n\n return (\n <div className={classNames(className, containerBreakout && designsystemlayout['container-breakout'])} data-testid={testId}>\n <div\n ref={tabListRef}\n className={classNames(styles['tab-list-wrapper'], {\n [styles['tab-list-wrapper--sticky']]: sticky,\n })}\n style={{\n zIndex: zIndex,\n }}\n >\n <TabList\n onTabListClick={(index: number) => onValueChange(index)}\n selectedTab={activeTabIndex}\n color={color}\n onColor={onColorUsed}\n ariaLabelLeftButton={ariaLabelLeftButton}\n ariaLabelRightButton={ariaLabelRightButton}\n >\n {children}\n </TabList>\n <div className={classNames(styles['panel-wrapper'], styles[`panel-wrapper--${color}`])}></div>\n </div>\n <div ref={tabsRef} style={{ marginTop: '-50px' }}>\n <TabPanel ref={tabPanelRef} color={color} isFirst={activeTabIndex == 0}>\n {React.Children.toArray(children)[activeTabIndex]}\n </TabPanel>\n </div>\n </div>\n );\n};\n\ntype TabsComponent = typeof TabsRoot & {\n Tab: typeof Tab;\n};\nconst Tabs = TabsRoot as TabsComponent;\nTabs.displayName = 'Tabs';\nTabs.Tab = Tab;\nTabs.Tab.displayName = 'Tabs.Tab';\n\nexport default Tabs;\n"],"names":[],"mappings":";;;;;;;AAwCA,MAAM,WAAgC,CAAC;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,oBAAoB;AAAA,EACpB,UAAU;AAAA,EACV,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAe,cAAc;AACnC,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,SAAS,CAAC;AACtD,QAAA,UAAU,OAAuB,IAAI;AACrC,QAAA,cAAc,OAAuB,IAAI;AACzC,QAAA,aAAa,OAAuB,IAAI;AAE9C,MAAI,cAA2B;AAC/B,MAAI,UAAU,SAAS;AACP,kBAAA;AAAA,EAAA;AAGV,QAAA,gBAAgB,CAAC,aAA2B;AAChD,QAAI,CAAC,cAAc;AACjB,2BAAqB,QAAQ;AAAA,IAAA;AAAA,EAEjC;AAEM,QAAA,iBAAiB,eAAe,YAAY;AAGhD,SAAA,qBAAC,OAAI,EAAA,WAAW,WAAW,WAAW,qBAAqB,mBAAmB,oBAAoB,CAAC,GAAG,eAAa,QACjH,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAK;AAAA,QACL,WAAW,WAAW,OAAO,kBAAkB,GAAG;AAAA,UAChD,CAAC,OAAO,0BAA0B,CAAC,GAAG;AAAA,QAAA,CACvC;AAAA,QACD,OAAO;AAAA,UACL;AAAA,QACF;AAAA,QAEA,UAAA;AAAA,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,gBAAgB,CAAC,UAAkB,cAAc,KAAK;AAAA,cACtD,aAAa;AAAA,cACb;AAAA,cACA,SAAS;AAAA,cACT;AAAA,cACA;AAAA,cAEC;AAAA,YAAA;AAAA,UACH;AAAA,UACC,oBAAA,OAAA,EAAI,WAAW,WAAW,OAAO,eAAe,GAAG,OAAO,kBAAkB,KAAK,EAAE,CAAC,EAAG,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1F;AAAA,IACA,oBAAC,OAAI,EAAA,KAAK,SAAS,OAAO,EAAE,WAAW,QAAA,GACrC,UAAA,oBAAC,UAAS,EAAA,KAAK,aAAa,OAAc,SAAS,kBAAkB,GAClE,UAAM,MAAA,SAAS,QAAQ,QAAQ,EAAE,cAAc,EAClD,CAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;AAKA,MAAM,OAAO;AACb,KAAK,cAAc;AACnB,KAAK,MAAM;AACX,KAAK,IAAI,cAAc;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import React, { useState, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Tab from './Tab';\nimport TabList from './TabList';\nimport TabPanel from './TabPanel';\nimport designsystemlayout from '../../scss/layout.module.scss';\nimport { PaletteNames } from '../../theme/palette';\n\nimport styles from './styles.module.scss';\n\nexport type { TabProps } from './Tab';\nexport type TabsColors = Extract<PaletteNames, 'blueberry' | 'neutral' | 'white'>;\nexport type TabsOnColor = 'onblueberry' | 'onneutral' | 'onwhite';\n\nexport interface TabsProps {\n children?: React.ReactNode;\n /** Controlled state for Tabs component */\n activeTab?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the color of the tabs. Default: white */\n color?: TabsColors;\n /** Sets wether the component should use the container-breakout class. Default: true */\n containerBreakout?: boolean;\n /** Sets the background color of the tabs. Can only be used when the color is set to white. Default: onwhite */\n onColor?: TabsOnColor;\n /** Whether the tab list should be sticky */\n sticky?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets aria label on the \"scroll to the right\" button in TabList */\n ariaLabelRightButton?: string;\n /** Sets aria label on the \"scroll to the left\" button in TabList */\n ariaLabelLeftButton?: string;\n /** Overrides the default z-index of the tabs header */\n zIndex?: number;\n}\n\nconst TabsRoot: React.FC<TabsProps> = ({\n activeTab,\n children,\n className,\n color = 'white',\n containerBreakout = true,\n onColor = 'onwhite',\n sticky = true,\n testId,\n ariaLabelRightButton,\n ariaLabelLeftButton,\n zIndex,\n}) => {\n const isControlled = activeTab !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(0);\n const tabsRef = useRef<HTMLDivElement>(null);\n const tabPanelRef = useRef<HTMLDivElement>(null);\n const tabListRef = useRef<HTMLDivElement>(null);\n\n let onColorUsed: TabsOnColor = 'onwhite';\n if (color === 'white') {\n onColorUsed = onColor;\n }\n\n const onValueChange = (newValue: number): void => {\n if (!isControlled) {\n setUncontrolledValue(newValue);\n }\n };\n\n const activeTabIndex = isControlled ? activeTab : uncontrolledValue;\n\n return (\n <div className={classNames(className, containerBreakout && designsystemlayout['container-breakout'])} data-testid={testId}>\n <div\n ref={tabListRef}\n className={classNames(styles['tab-list-wrapper'], {\n [styles['tab-list-wrapper--sticky']]: sticky,\n })}\n style={{\n zIndex: zIndex,\n }}\n >\n <TabList\n onTabListClick={(index: number) => onValueChange(index)}\n selectedTab={activeTabIndex}\n color={color}\n onColor={onColorUsed}\n ariaLabelLeftButton={ariaLabelLeftButton}\n ariaLabelRightButton={ariaLabelRightButton}\n >\n {children}\n </TabList>\n <div className={classNames(styles['panel-wrapper'], styles[`panel-wrapper--${color}`])}></div>\n </div>\n <div ref={tabsRef} style={{ marginTop: '-50px' }}>\n <TabPanel ref={tabPanelRef} color={color} isFirst={activeTabIndex == 0}>\n {React.Children.toArray(children)[activeTabIndex]}\n </TabPanel>\n </div>\n </div>\n );\n};\n\ntype TabsComponent = typeof TabsRoot & {\n Tab: typeof Tab;\n};\nconst Tabs = TabsRoot as TabsComponent;\nTabs.displayName = 'Tabs';\nTabs.Tab = Tab;\nTabs.Tab.displayName = 'Tabs.Tab';\n\nexport default Tabs;\n"],"names":["React"],"mappings":";;;;;;;AAwCA,MAAM,WAAgC,CAAC;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,oBAAoB;AAAA,EACpB,UAAU;AAAA,EACV,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAe,cAAc;AACnC,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,SAAS,CAAC;AACtD,QAAA,UAAU,OAAuB,IAAI;AACrC,QAAA,cAAc,OAAuB,IAAI;AACzC,QAAA,aAAa,OAAuB,IAAI;AAE9C,MAAI,cAA2B;AAC/B,MAAI,UAAU,SAAS;AACP,kBAAA;AAAA,EAAA;AAGV,QAAA,gBAAgB,CAAC,aAA2B;AAChD,QAAI,CAAC,cAAc;AACjB,2BAAqB,QAAQ;AAAA,IAAA;AAAA,EAEjC;AAEM,QAAA,iBAAiB,eAAe,YAAY;AAGhD,SAAA,qBAAC,OAAI,EAAA,WAAW,WAAW,WAAW,qBAAqB,mBAAmB,oBAAoB,CAAC,GAAG,eAAa,QACjH,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAK;AAAA,QACL,WAAW,WAAW,OAAO,kBAAkB,GAAG;AAAA,UAChD,CAAC,OAAO,0BAA0B,CAAC,GAAG;AAAA,QAAA,CACvC;AAAA,QACD,OAAO;AAAA,UACL;AAAA,QACF;AAAA,QAEA,UAAA;AAAA,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,gBAAgB,CAAC,UAAkB,cAAc,KAAK;AAAA,cACtD,aAAa;AAAA,cACb;AAAA,cACA,SAAS;AAAA,cACT;AAAA,cACA;AAAA,cAEC;AAAA,YAAA;AAAA,UACH;AAAA,UACC,oBAAA,OAAA,EAAI,WAAW,WAAW,OAAO,eAAe,GAAG,OAAO,kBAAkB,KAAK,EAAE,CAAC,EAAG,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1F;AAAA,IACA,oBAAC,OAAI,EAAA,KAAK,SAAS,OAAO,EAAE,WAAW,QAAA,GACrC,UAAA,oBAAC,UAAS,EAAA,KAAK,aAAa,OAAc,SAAS,kBAAkB,GAClE,UAAMA,eAAA,SAAS,QAAQ,QAAQ,EAAE,cAAc,EAClD,CAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;AAKA,MAAM,OAAO;AACb,KAAK,cAAc;AACnB,KAAK,MAAM;AACX,KAAK,IAAI,cAAc;"}
@@ -1,6 +1,6 @@
1
1
  @use 'sass:map';
2
+ @use '../../scss/breakpoints' as *;
2
3
  @import '../../scss/supernova/styles/colors';
3
- @import '../../scss/breakpoints';
4
4
 
5
5
  .tab-list-wrapper {
6
6
  position: relative;
@@ -1,7 +1,7 @@
1
1
  @use 'sass:map';
2
- @import '../../scss/spacers';
3
- @import '../../scss/breakpoints';
4
- @import '../../scss/palette';
2
+ @use '../../scss/spacers' as spacers;
3
+ @use '../../scss/palette' as palette;
4
+ @use '../../scss/breakpoints' as *;
5
5
 
6
6
  .tag {
7
7
  $tag: &;
@@ -28,45 +28,45 @@
28
28
  &--#{$color}[type='button'] {
29
29
  // banana og kiwi har unntak fra hovedregelen
30
30
  @if $color == 'banana' {
31
- color: map.get($palette-map, #{$color}900);
32
- border-color: map.get($palette-map, #{$color}300);
31
+ color: map.get(palette.$palette-map, #{$color}900);
32
+ border-color: map.get(palette.$palette-map, #{$color}300);
33
33
  } @else if $color == 'kiwi' {
34
- color: map.get($palette-map, #{$color}900);
35
- border-color: map.get($palette-map, #{$color}200);
34
+ color: map.get(palette.$palette-map, #{$color}900);
35
+ border-color: map.get(palette.$palette-map, #{$color}200);
36
36
  } @else {
37
- color: map.get($palette-map, #{$color}800);
38
- border-color: map.get($palette-map, #{$color}200);
37
+ color: map.get(palette.$palette-map, #{$color}800);
38
+ border-color: map.get(palette.$palette-map, #{$color}200);
39
39
  }
40
40
 
41
41
  &#{$tag}--emphasised {
42
- background-color: map.get($palette-map, #{$color}50);
42
+ background-color: map.get(palette.$palette-map, #{$color}50);
43
43
  }
44
44
  }
45
45
  }
46
46
 
47
47
  &--medium {
48
- padding: 0 getSpacer(xs);
48
+ padding: 0 spacers.getSpacer(xs);
49
49
  min-height: 1.625rem;
50
50
 
51
51
  &#{$tag}--has-icon {
52
- padding: 0 getSpacer(xs) 0 0.375rem;
52
+ padding: 0 spacers.getSpacer(xs) 0 0.375rem;
53
53
  }
54
54
 
55
55
  #{$tag}__icon {
56
- margin-right: getSpacer(4xs);
56
+ margin-right: spacers.getSpacer(4xs);
57
57
  }
58
58
  }
59
59
 
60
60
  &--large {
61
- padding: 0 getSpacer(xs);
61
+ padding: 0 spacers.getSpacer(xs);
62
62
  min-height: 1.875rem;
63
63
 
64
64
  &#{$tag}--has-icon {
65
- padding: getSpacer(4xs) getSpacer(xs) getSpacer(4xs) 0.375rem;
65
+ padding: spacers.getSpacer(4xs) spacers.getSpacer(xs) spacers.getSpacer(4xs) 0.375rem;
66
66
  }
67
67
 
68
68
  #{$tag}__icon {
69
- margin-right: getSpacer(4xs);
69
+ margin-right: spacers.getSpacer(4xs);
70
70
  }
71
71
  }
72
72
  }
@@ -1,9 +1,9 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import React from "react";
2
+ import React__default from "react";
3
3
  import { AnalyticsId } from "../../constants.js";
4
4
  import styles from "./styles.module.scss";
5
5
  const TagList = ({ children, testId }) => {
6
- return /* @__PURE__ */ jsx("ul", { className: styles["tag-list"], "data-testid": testId, "data-analyticsid": AnalyticsId.TagList, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx("li", { className: styles["tag-list__item"], children: child })) });
6
+ return /* @__PURE__ */ jsx("ul", { className: styles["tag-list"], "data-testid": testId, "data-analyticsid": AnalyticsId.TagList, children: React__default.Children.map(children, (child) => /* @__PURE__ */ jsx("li", { className: styles["tag-list__item"], children: child })) });
7
7
  };
8
8
  export {
9
9
  TagList as default
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/TagList/TagList.tsx"],"sourcesContent":["import React from 'react';\n\nimport { AnalyticsId } from '../../constants';\n\nimport styles from './styles.module.scss';\n\nexport interface TagListPropsProps {\n children?: React.ReactNode;\n /** Sets the data-testid attribute on the expander button. */\n testId?: string;\n}\n\nconst TagList: React.FC<TagListPropsProps> = ({ children, testId }) => {\n return (\n <ul className={styles['tag-list']} data-testid={testId} data-analyticsid={AnalyticsId.TagList}>\n {React.Children.map(children, child => (\n <li className={styles['tag-list__item']}>{child}</li>\n ))}\n </ul>\n );\n};\n\nexport default TagList;\n"],"names":[],"mappings":";;;;AAYA,MAAM,UAAuC,CAAC,EAAE,UAAU,aAAa;AAEnE,SAAA,oBAAC,MAAG,EAAA,WAAW,OAAO,UAAU,GAAG,eAAa,QAAQ,oBAAkB,YAAY,SACnF,UAAA,MAAM,SAAS,IAAI,UAAU,CAC5B,UAAA,oBAAC,MAAG,EAAA,WAAW,OAAO,gBAAgB,GAAI,UAAM,MAAA,CAAA,CACjD,EACH,CAAA;AAEJ;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/TagList/TagList.tsx"],"sourcesContent":["import React from 'react';\n\nimport { AnalyticsId } from '../../constants';\n\nimport styles from './styles.module.scss';\n\nexport interface TagListPropsProps {\n children?: React.ReactNode;\n /** Sets the data-testid attribute on the expander button. */\n testId?: string;\n}\n\nconst TagList: React.FC<TagListPropsProps> = ({ children, testId }) => {\n return (\n <ul className={styles['tag-list']} data-testid={testId} data-analyticsid={AnalyticsId.TagList}>\n {React.Children.map(children, child => (\n <li className={styles['tag-list__item']}>{child}</li>\n ))}\n </ul>\n );\n};\n\nexport default TagList;\n"],"names":["React"],"mappings":";;;;AAYA,MAAM,UAAuC,CAAC,EAAE,UAAU,aAAa;AAEnE,SAAA,oBAAC,MAAG,EAAA,WAAW,OAAO,UAAU,GAAG,eAAa,QAAQ,oBAAkB,YAAY,SACnF,UAAAA,eAAM,SAAS,IAAI,UAAU,CAC5B,UAAA,oBAAC,MAAG,EAAA,WAAW,OAAO,gBAAgB,GAAI,UAAM,MAAA,CAAA,CACjD,EACH,CAAA;AAEJ;"}