@helsenorge/designsystem-react 14.0.0-beta.2 → 14.0.0-beta.4

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 (1133) hide show
  1. package/lib/AnchorLink.js +2 -2
  2. package/lib/AnchorLink.js.map +1 -1
  3. package/lib/Avatar.js +2 -2
  4. package/lib/Avatar.js.map +1 -1
  5. package/lib/BabyMobileMedium.js +1 -1
  6. package/lib/Badge.js +2 -2
  7. package/lib/Badge.js.map +1 -1
  8. package/lib/Button.js +6 -6
  9. package/lib/Button.js.map +1 -1
  10. package/lib/CHANGELOG.md +14 -0
  11. package/lib/Checkbox.js +6 -6
  12. package/lib/Checkbox.js.map +1 -1
  13. package/lib/ChildMedium.js +1 -1
  14. package/lib/Close.js +3 -3
  15. package/lib/Close.js.map +1 -1
  16. package/lib/DictionaryTrigger.js +2 -2
  17. package/lib/DictionaryTrigger.js.map +1 -1
  18. package/lib/Drawer.js +5 -5
  19. package/lib/Drawer.js.map +1 -1
  20. package/lib/Duolist.js +5 -5
  21. package/lib/Duolist.js.map +1 -1
  22. package/lib/ElementHeader.js +10 -10
  23. package/lib/ElementHeader.js.map +1 -1
  24. package/lib/ElementHeaderText.js +4 -4
  25. package/lib/ElementHeaderText.js.map +1 -1
  26. package/lib/ErrorWrapper.js +2 -2
  27. package/lib/ErrorWrapper.js.map +1 -1
  28. package/lib/Expander.js +7 -7
  29. package/lib/Expander.js.map +1 -1
  30. package/lib/FacialRecognitionFingerprintMedium.js +1 -1
  31. package/lib/FormFieldTag.js +2 -2
  32. package/lib/FormFieldTag.js.map +1 -1
  33. package/lib/FormGroup.js +8 -19
  34. package/lib/FormGroup.js.map +1 -1
  35. package/lib/FormLayout.js +3 -3
  36. package/lib/FormLayout.js.map +1 -1
  37. package/lib/GiveBabyFoodMedium.js +1 -1
  38. package/lib/HelpDetails.js +3 -3
  39. package/lib/HelpDetails.js.map +1 -1
  40. package/lib/HelpTriggerIcon.js +2 -2
  41. package/lib/HelpTriggerIcon.js.map +1 -1
  42. package/lib/HelpTriggerStandalone.js +2 -2
  43. package/lib/HelpTriggerStandalone.js.map +1 -1
  44. package/lib/HighlightPanel.js +3 -3
  45. package/lib/HighlightPanel.js.map +1 -1
  46. package/lib/HorizontalScroll.js +4 -4
  47. package/lib/HorizontalScroll.js.map +1 -1
  48. package/lib/Icon.js +2 -2
  49. package/lib/Icon.js.map +1 -1
  50. package/lib/Illustration.js +1 -1
  51. package/lib/Illustration.js.map +1 -1
  52. package/lib/InfoTeaser.js +3 -3
  53. package/lib/InfoTeaser.js.map +1 -1
  54. package/lib/Input.js +4 -4
  55. package/lib/Input.js.map +1 -1
  56. package/lib/Label.js +3 -90
  57. package/lib/Label.js.map +1 -1
  58. package/lib/LazyIcon.js +4 -2
  59. package/lib/LazyIcon.js.map +1 -1
  60. package/lib/LazyIllustration.js +1 -1
  61. package/lib/LinkList.js +7 -8
  62. package/lib/LinkList.js.map +1 -1
  63. package/lib/List.js +2 -2
  64. package/lib/List.js.map +1 -1
  65. package/lib/ListEditMode.js +7 -5
  66. package/lib/ListEditMode.js.map +1 -1
  67. package/lib/MaxCharacters.js +2 -2
  68. package/lib/MaxCharacters.js.map +1 -1
  69. package/lib/PanelTitle.js +2 -2
  70. package/lib/PanelTitle.js.map +1 -1
  71. package/lib/PopOver.js +2 -2
  72. package/lib/PopOver.js.map +1 -1
  73. package/lib/RadioButton.js +3 -80
  74. package/lib/RadioButton.js.map +1 -1
  75. package/lib/ReadLettersMedium.js +1 -1
  76. package/lib/Select.js +4 -4
  77. package/lib/Select.js.map +1 -1
  78. package/lib/SingleSelectItem.js +4 -4
  79. package/lib/SingleSelectItem.js.map +1 -1
  80. package/lib/Slider.js +4 -4
  81. package/lib/Slider.js.map +1 -1
  82. package/lib/Spacer.js +2 -2
  83. package/lib/Spacer.js.map +1 -1
  84. package/lib/StatusDot.js +5 -5
  85. package/lib/StatusDot.js.map +1 -1
  86. package/lib/StatusDotList.js +2 -2
  87. package/lib/StatusDotList.js.map +1 -1
  88. package/lib/StepButtons.js +5 -5
  89. package/lib/StepButtons.js.map +1 -1
  90. package/lib/StrollerMedium.js +1 -1
  91. package/lib/Support2Medium.js +1 -1
  92. package/lib/TabList.js +8 -8
  93. package/lib/TabList.js.map +1 -1
  94. package/lib/TabPanel.js +2 -2
  95. package/lib/TabPanel.js.map +1 -1
  96. package/lib/TableBody.js +4 -4
  97. package/lib/TableBody.js.map +1 -1
  98. package/lib/TableCell.js +3 -3
  99. package/lib/TableCell.js.map +1 -1
  100. package/lib/TableExpandedRow.js +5 -5
  101. package/lib/TableExpandedRow.js.map +1 -1
  102. package/lib/TableExpanderCell.js +3 -3
  103. package/lib/TableExpanderCell.js.map +1 -1
  104. package/lib/TableHead.js +4 -4
  105. package/lib/TableHead.js.map +1 -1
  106. package/lib/TableHeadCell.js +4 -4
  107. package/lib/TableHeadCell.js.map +1 -1
  108. package/lib/TableRow.js +5 -5
  109. package/lib/TableRow.js.map +1 -1
  110. package/lib/Textarea.js +4 -4
  111. package/lib/Textarea.js.map +1 -1
  112. package/lib/Title.js +2 -2
  113. package/lib/Title.js.map +1 -1
  114. package/lib/Toast.js +3 -3
  115. package/lib/Toast.js.map +1 -1
  116. package/lib/components/ArticleTeaser/index.js +4 -4
  117. package/lib/components/ArticleTeaser/index.js.map +1 -1
  118. package/lib/components/Chip/index.js +2 -2
  119. package/lib/components/Chip/index.js.map +1 -1
  120. package/lib/{src/components → components}/Dropdown/SingleSelect/index.d.ts +1 -0
  121. package/lib/components/Dropdown/SingleSelect/index.js +2 -2
  122. package/lib/components/Dropdown/SingleSelect/index.js.map +1 -1
  123. package/lib/components/Dropdown/index.js +6 -6
  124. package/lib/components/Dropdown/index.js.map +1 -1
  125. package/lib/components/DropdownOld/index.js +3 -3
  126. package/lib/components/DropdownOld/index.js.map +1 -1
  127. package/lib/{src/components → components}/ElementHeader/index.d.ts +1 -0
  128. package/lib/components/ElementHeader/index.js +2 -2
  129. package/lib/components/ElementHeader/index.js.map +1 -1
  130. package/lib/components/EmptyState/index.js +2 -2
  131. package/lib/components/EmptyState/index.js.map +1 -1
  132. package/lib/{src/components → components}/ExpanderHierarchy/index.d.ts +1 -0
  133. package/lib/components/ExpanderHierarchy/index.js +8 -8
  134. package/lib/components/ExpanderHierarchy/index.js.map +1 -1
  135. package/lib/components/ExpanderList/index.js +8 -9
  136. package/lib/components/ExpanderList/index.js.map +1 -1
  137. package/lib/components/FavoriteButton/index.js +2 -2
  138. package/lib/components/FavoriteButton/index.js.map +1 -1
  139. package/lib/{src/components → components}/FormGroup/FormGroup.d.ts +1 -1
  140. package/lib/components/HelpBubble/index.js +3 -3
  141. package/lib/components/HelpBubble/index.js.map +1 -1
  142. package/lib/components/HelpPanel/index.js +2 -2
  143. package/lib/components/HelpPanel/index.js.map +1 -1
  144. package/lib/components/HelpTriggerInline/index.js +2 -2
  145. package/lib/components/HelpTriggerInline/index.js.map +1 -1
  146. package/lib/{src/components → components}/Icon/index.d.ts +1 -0
  147. package/lib/components/Icon/index.js +2 -1
  148. package/lib/{src/components → components}/Illustration/index.d.ts +1 -0
  149. package/lib/components/Illustration/index.js +2 -1
  150. package/lib/components/Illustrations/BabyMobile.js +1 -1
  151. package/lib/components/Illustrations/Child.js +1 -1
  152. package/lib/components/Illustrations/Doctor.js +1 -1
  153. package/lib/components/Illustrations/FacialRecognitionFingerprint.js +1 -1
  154. package/lib/components/Illustrations/GiveBabyFood.js +1 -1
  155. package/lib/components/Illustrations/HealthcarePersonnel.js +1 -1
  156. package/lib/components/Illustrations/ReadLetters.js +1 -1
  157. package/lib/components/Illustrations/Stroller.js +1 -1
  158. package/lib/components/Illustrations/Support2.js +1 -1
  159. package/lib/{src/components → components}/Label/index.d.ts +1 -0
  160. package/lib/components/Label/index.js +3 -3
  161. package/lib/{src/components → components}/LazyIcon/index.d.ts +1 -0
  162. package/lib/components/LazyIcon/index.js +2 -2
  163. package/lib/{src/components → components}/ListEditMode/index.d.ts +1 -0
  164. package/lib/components/ListEditMode/index.js +2 -2
  165. package/lib/components/Loader/index.js +4 -4
  166. package/lib/components/Loader/index.js.map +1 -1
  167. package/lib/components/Modal/index.js +9 -9
  168. package/lib/components/Modal/index.js.map +1 -1
  169. package/lib/components/NotificationPanel/index.js +6 -6
  170. package/lib/components/NotificationPanel/index.js.map +1 -1
  171. package/lib/components/Panel/index.js +13 -13
  172. package/lib/components/Panel/index.js.map +1 -1
  173. package/lib/{src/components → components}/PanelList/index.d.ts +1 -0
  174. package/lib/components/PanelList/index.js +5 -5
  175. package/lib/components/PanelList/index.js.map +1 -1
  176. package/lib/components/PopMenu/index.js +3 -3
  177. package/lib/components/PopMenu/index.js.map +1 -1
  178. package/lib/components/Progressbar/index.js +2 -2
  179. package/lib/components/Progressbar/index.js.map +1 -1
  180. package/lib/components/PromoPanel/index.js +2 -2
  181. package/lib/components/PromoPanel/index.js.map +1 -1
  182. package/lib/{src/components → components}/RadioButton/index.d.ts +1 -0
  183. package/lib/components/RadioButton/index.js +3 -3
  184. package/lib/components/ServiceMessage/index.js +6 -6
  185. package/lib/components/ServiceMessage/index.js.map +1 -1
  186. package/lib/components/SharingStatus/index.js +4 -4
  187. package/lib/components/SharingStatus/index.js.map +1 -1
  188. package/lib/components/Step/index.js +2 -2
  189. package/lib/components/Step/index.js.map +1 -1
  190. package/lib/{src/components → components}/Stepper/index.d.ts +1 -0
  191. package/lib/components/Stepper/index.js +4 -3
  192. package/lib/components/Stepper/index.js.map +1 -1
  193. package/lib/components/StickyNote/index.js +8 -8
  194. package/lib/components/StickyNote/index.js.map +1 -1
  195. package/lib/{src/components → components}/Table/index.d.ts +1 -0
  196. package/lib/components/Table/index.js +5 -5
  197. package/lib/components/Table/index.js.map +1 -1
  198. package/lib/components/Tabs/index.js +4 -4
  199. package/lib/components/Tabs/index.js.map +1 -1
  200. package/lib/components/Tag/index.js +2 -2
  201. package/lib/components/Tag/index.js.map +1 -1
  202. package/lib/components/Tile/index.js +4 -4
  203. package/lib/components/Tile/index.js.map +1 -1
  204. package/lib/components/Toggle/index.js +9 -9
  205. package/lib/components/Toggle/index.js.map +1 -1
  206. package/lib/components/Validation/index.js +4 -4
  207. package/lib/components/Validation/index.js.map +1 -1
  208. package/lib/constants3.js +44 -4
  209. package/lib/constants3.js.map +1 -1
  210. package/lib/index.d.ts +18 -1
  211. package/lib/utils2.js +89 -5
  212. package/lib/utils2.js.map +1 -1
  213. package/lib/utils3.js +89 -10
  214. package/lib/utils3.js.map +1 -1
  215. package/lib/utils4.js +11 -28
  216. package/lib/utils4.js.map +1 -1
  217. package/lib/utils5.js +28 -58
  218. package/lib/utils5.js.map +1 -1
  219. package/lib/utils6.js +60 -0
  220. package/lib/utils6.js.map +1 -0
  221. package/package.json +1 -1
  222. package/lib/Label2.js +0 -5
  223. package/lib/Label2.js.map +0 -1
  224. package/lib/RadioButton2.js +0 -5
  225. package/lib/RadioButton2.js.map +0 -1
  226. package/lib/constants4.js +0 -46
  227. package/lib/constants4.js.map +0 -1
  228. package/lib/src/components/AnchorLink/AnchorLink.stories.d.ts +0 -33
  229. package/lib/src/components/AnchorLink/AnchorLink.test.d.ts +0 -1
  230. package/lib/src/components/ArticleTeaser/ArticleTeaser.stories.d.ts +0 -30
  231. package/lib/src/components/ArticleTeaser/ArticleTeaser.test.d.ts +0 -1
  232. package/lib/src/components/AsChildSlot/AsChildSlot.stories.d.ts +0 -20
  233. package/lib/src/components/AsChildSlot/AsChildSlot.test.d.ts +0 -1
  234. package/lib/src/components/Avatar/Avatar.stories.d.ts +0 -45
  235. package/lib/src/components/Avatar/Avatar.test.d.ts +0 -1
  236. package/lib/src/components/Badge/Badge.stories.d.ts +0 -42
  237. package/lib/src/components/Badge/Badge.test.d.ts +0 -1
  238. package/lib/src/components/Button/Button.stories.d.ts +0 -53
  239. package/lib/src/components/Button/Button.test.d.ts +0 -1
  240. package/lib/src/components/Checkbox/Checkbox.stories.d.ts +0 -48
  241. package/lib/src/components/Checkbox/Checkbox.test.d.ts +0 -1
  242. package/lib/src/components/Chip/Chip.stories.d.ts +0 -44
  243. package/lib/src/components/Chip/Chip.test.d.ts +0 -1
  244. package/lib/src/components/Close/Close.stories.d.ts +0 -32
  245. package/lib/src/components/Close/Close.test.d.ts +0 -1
  246. package/lib/src/components/DictionaryTrigger/DictionaryTrigger.stories.d.ts +0 -29
  247. package/lib/src/components/DictionaryTrigger/DictionaryTrigger.test.d.ts +0 -1
  248. package/lib/src/components/Drawer/Drawer.stories.d.ts +0 -86
  249. package/lib/src/components/Drawer/Drawer.test.d.ts +0 -1
  250. package/lib/src/components/Dropdown/Dropdown.stories.d.ts +0 -36
  251. package/lib/src/components/Dropdown/Dropdown.test.d.ts +0 -1
  252. package/lib/src/components/Dropdown/SingleSelect/SingleSelect.stories.d.ts +0 -57
  253. package/lib/src/components/Dropdown/SingleSelect/SingleSelect.test.d.ts +0 -1
  254. package/lib/src/components/DropdownOld/DropdownOld.stories.d.ts +0 -66
  255. package/lib/src/components/DropdownOld/DropdownOld.test.d.ts +0 -0
  256. package/lib/src/components/Duolist/Duolist.stories.d.ts +0 -35
  257. package/lib/src/components/Duolist/Duolist.test.d.ts +0 -1
  258. package/lib/src/components/ElementHeader/ElementHeader.stories.d.ts +0 -26
  259. package/lib/src/components/ElementHeader/ElementHeaderText/ElementHeaderText.stories.d.ts +0 -51
  260. package/lib/src/components/ElementHeader/StatusDotList/StatusDotList.stories.d.ts +0 -15
  261. package/lib/src/components/EmptyState/EmptyState.stories.d.ts +0 -38
  262. package/lib/src/components/EmptyState/EmptyState.test.d.ts +0 -1
  263. package/lib/src/components/ErrorWrapper/ErrorWrapper.test.d.ts +0 -1
  264. package/lib/src/components/Expander/Expander.stories.d.ts +0 -54
  265. package/lib/src/components/Expander/Expander.test.d.ts +0 -1
  266. package/lib/src/components/ExpanderHierarchy/ExpanderHierarchy.stories.d.ts +0 -40
  267. package/lib/src/components/ExpanderHierarchy/ExpanderHierarchy.test.d.ts +0 -1
  268. package/lib/src/components/ExpanderList/ExpanderList.Expander.stories.d.ts +0 -70
  269. package/lib/src/components/ExpanderList/ExpanderList.stories.d.ts +0 -65
  270. package/lib/src/components/ExpanderList/ExpanderList.test.d.ts +0 -0
  271. package/lib/src/components/EyebrowHeader/EyebrowHeader.stories.d.ts +0 -19
  272. package/lib/src/components/EyebrowHeader/EyebrowHeader.test.d.ts +0 -1
  273. package/lib/src/components/FavoriteButton/FavoriteButton.stories.d.ts +0 -21
  274. package/lib/src/components/FavoriteButton/FavoriteButton.test.d.ts +0 -1
  275. package/lib/src/components/FormFieldTag/FormFieldTag.stories.d.ts +0 -28
  276. package/lib/src/components/FormFieldTag/FormFieldTag.test.d.ts +0 -1
  277. package/lib/src/components/FormGroup/FormGroup.stories.d.ts +0 -50
  278. package/lib/src/components/FormGroup/FormGroup.test.d.ts +0 -1
  279. package/lib/src/components/FormLayout/FormLayout.stories.d.ts +0 -29
  280. package/lib/src/components/FormLayout/FormLayout.test.d.ts +0 -1
  281. package/lib/src/components/HelpBubble/HelpBubble.stories.d.ts +0 -46
  282. package/lib/src/components/HelpBubble/HelpBubble.test.d.ts +0 -1
  283. package/lib/src/components/HelpDetails/HelpDetails.stories.d.ts +0 -23
  284. package/lib/src/components/HelpDetails/HelpDetails.test.d.ts +0 -1
  285. package/lib/src/components/HelpDrawer/HelpDrawer.stories.d.ts +0 -49
  286. package/lib/src/components/HelpDrawer/HelpDrawer.test.d.ts +0 -1
  287. package/lib/src/components/HelpExpanderInline/HelpExpanderInline.stories.d.ts +0 -28
  288. package/lib/src/components/HelpExpanderInline/HelpExpanderInline.test.d.ts +0 -1
  289. package/lib/src/components/HelpExpanderStandalone/HelpExpanderStandalone.stories.d.ts +0 -36
  290. package/lib/src/components/HelpExpanderStandalone/HelpExpanderStandalone.test.d.ts +0 -1
  291. package/lib/src/components/HelpPanel/HelpPanel.stories.d.ts +0 -30
  292. package/lib/src/components/HelpPanel/HelpPanel.test.d.ts +0 -1
  293. package/lib/src/components/HelpTeaser/HelpTeaser.stories.d.ts +0 -37
  294. package/lib/src/components/HelpTeaser/HelpTeaser.test.d.ts +0 -1
  295. package/lib/src/components/HelpTooltip/HelpTooltip.stories.d.ts +0 -36
  296. package/lib/src/components/HelpTooltip/HelpTooltip.test.d.ts +0 -1
  297. package/lib/src/components/HelpTriggerIcon/HelpTriggerIcon.stories.d.ts +0 -47
  298. package/lib/src/components/HelpTriggerIcon/HelpTriggerIcon.test.d.ts +0 -1
  299. package/lib/src/components/HelpTriggerInline/HelpTriggerInline.stories.d.ts +0 -35
  300. package/lib/src/components/HelpTriggerInline/HelpTriggerInline.test.d.ts +0 -1
  301. package/lib/src/components/HelpTriggerStandalone/HelpTriggerStandalone.stories.d.ts +0 -35
  302. package/lib/src/components/HelpTriggerStandalone/HelpTriggerStandalone.test.d.ts +0 -1
  303. package/lib/src/components/HighlightPanel/HighlightPanel.stories.d.ts +0 -40
  304. package/lib/src/components/HighlightPanel/HighlightPanel.test.d.ts +0 -1
  305. package/lib/src/components/Highlighter/Highlighter.stories.d.ts +0 -26
  306. package/lib/src/components/Highlighter/Highlighter.test.d.ts +0 -1
  307. package/lib/src/components/HorizontalScroll/HorizontalScroll.test.d.ts +0 -1
  308. package/lib/src/components/Icon/Icon.stories.d.ts +0 -41
  309. package/lib/src/components/Icon/Icon.test.d.ts +0 -1
  310. package/lib/src/components/Illustration/Illustration.stories.d.ts +0 -28
  311. package/lib/src/components/Illustration/Illustration.test.d.ts +0 -1
  312. package/lib/src/components/Illustration/Illustrations.stories.d.ts +0 -40
  313. package/lib/src/components/InfoTeaser/InfoTeaser.stories.d.ts +0 -38
  314. package/lib/src/components/InfoTeaser/InfoTeaser.test.d.ts +0 -1
  315. package/lib/src/components/Input/Input.stories.d.ts +0 -85
  316. package/lib/src/components/Input/Input.test.d.ts +0 -1
  317. package/lib/src/components/Label/Label.stories.d.ts +0 -35
  318. package/lib/src/components/Label/Label.test.d.ts +0 -1
  319. package/lib/src/components/LazyIcon/LazyIcon.stories.d.ts +0 -25
  320. package/lib/src/components/LazyIcon/LazyIcon.test.d.ts +0 -1
  321. package/lib/src/components/LazyIllustration/LazyIllustration.stories.d.ts +0 -35
  322. package/lib/src/components/LazyIllustration/LazyIllustration.test.d.ts +0 -1
  323. package/lib/src/components/LinkList/LinkList.Link.stories.d.ts +0 -22
  324. package/lib/src/components/LinkList/LinkList.stories.d.ts +0 -59
  325. package/lib/src/components/LinkList/LinkList.test.d.ts +0 -1
  326. package/lib/src/components/List/List.stories.d.ts +0 -53
  327. package/lib/src/components/List/List.test.d.ts +0 -1
  328. package/lib/src/components/ListEditMode/ListEditMode.stories.d.ts +0 -41
  329. package/lib/src/components/Loader/Loader.stories.d.ts +0 -31
  330. package/lib/src/components/Loader/Loader.test.d.ts +0 -1
  331. package/lib/src/components/Logo/Logo.stories.d.ts +0 -36
  332. package/lib/src/components/Logo/Logo.test.d.ts +0 -1
  333. package/lib/src/components/MaxCharacters/MaxCharacters.test.d.ts +0 -1
  334. package/lib/src/components/Mittens/Mittens.stories.d.ts +0 -34
  335. package/lib/src/components/Modal/Modal.stories.d.ts +0 -71
  336. package/lib/src/components/Modal/Modal.test.d.ts +0 -1
  337. package/lib/src/components/NotificationPanel/NotificationPanel.stories.d.ts +0 -54
  338. package/lib/src/components/NotificationPanel/NotificationPanel.test.d.ts +0 -1
  339. package/lib/src/components/Panel/Panel.stories.d.ts +0 -79
  340. package/lib/src/components/Panel/Panel.test.d.ts +0 -1
  341. package/lib/src/components/Panel/PanelTitle/PanelTitle.stories.d.ts +0 -43
  342. package/lib/src/components/PanelList/PanelList.stories.d.ts +0 -32
  343. package/lib/src/components/PanelList/PanelList.test.d.ts +0 -1
  344. package/lib/src/components/PopMenu/PopMenu.stories.d.ts +0 -42
  345. package/lib/src/components/PopMenu/PopMenu.test.d.ts +0 -0
  346. package/lib/src/components/PopOver/PopOver.stories.d.ts +0 -46
  347. package/lib/src/components/PopOver/PopOver.test.d.ts +0 -1
  348. package/lib/src/components/Progressbar/Progressbar.stories.d.ts +0 -40
  349. package/lib/src/components/Progressbar/Progressbar.test.d.ts +0 -1
  350. package/lib/src/components/PromoPanel/PromoPanel.stories.d.ts +0 -44
  351. package/lib/src/components/PromoPanel/PromoPanel.test.d.ts +0 -1
  352. package/lib/src/components/RadioButton/RadioButton.stories.d.ts +0 -58
  353. package/lib/src/components/RadioButton/RadioButton.test.d.ts +0 -1
  354. package/lib/src/components/Select/Select.stories.d.ts +0 -36
  355. package/lib/src/components/Select/Select.test.d.ts +0 -1
  356. package/lib/src/components/ServiceMessage/ServiceMessage.stories.d.ts +0 -71
  357. package/lib/src/components/ServiceMessage/ServiceMessage.test.d.ts +0 -1
  358. package/lib/src/components/SharingStatus/SharingStatus.stories.d.ts +0 -30
  359. package/lib/src/components/SharingStatus/SharingStatus.test.d.ts +0 -1
  360. package/lib/src/components/Slider/Slider.stories.d.ts +0 -55
  361. package/lib/src/components/Slider/Slider.test.d.ts +0 -1
  362. package/lib/src/components/Spacer/Spacer.stories.d.ts +0 -17
  363. package/lib/src/components/Spacer/Spacer.test.d.ts +0 -1
  364. package/lib/src/components/StatusDot/StatusDot.stories.d.ts +0 -31
  365. package/lib/src/components/StatusDot/StatusDot.test.d.ts +0 -1
  366. package/lib/src/components/Step/Step.stories.d.ts +0 -32
  367. package/lib/src/components/Step/Step.test.d.ts +0 -1
  368. package/lib/src/components/StepButtons/StepButtons.stories.d.ts +0 -19
  369. package/lib/src/components/StepButtons/StepButtons.test.d.ts +0 -1
  370. package/lib/src/components/Stepper/Stepper.stories.d.ts +0 -38
  371. package/lib/src/components/Stepper/Stepper.test.d.ts +0 -1
  372. package/lib/src/components/StickyNote/StickyNote.stories.d.ts +0 -42
  373. package/lib/src/components/StickyNote/StickyNote.test.d.ts +0 -1
  374. package/lib/src/components/Table/Table.stories.d.ts +0 -93
  375. package/lib/src/components/Table/Table.test.d.ts +0 -1
  376. package/lib/src/components/Tabs/Tabs.stories.d.ts +0 -63
  377. package/lib/src/components/Tabs/Tabs.test.d.ts +0 -1
  378. package/lib/src/components/Tag/Tag.stories.d.ts +0 -38
  379. package/lib/src/components/Tag/Tag.test.d.ts +0 -1
  380. package/lib/src/components/TagList/TagList.stories.d.ts +0 -18
  381. package/lib/src/components/TagList/TagList.test.d.ts +0 -1
  382. package/lib/src/components/Textarea/Textarea.stories.d.ts +0 -76
  383. package/lib/src/components/Textarea/Textarea.test.d.ts +0 -1
  384. package/lib/src/components/Tile/Tile.stories.d.ts +0 -71
  385. package/lib/src/components/Tile/Tile.test.d.ts +0 -1
  386. package/lib/src/components/Title/Title.stories.d.ts +0 -37
  387. package/lib/src/components/Title/Title.test.d.ts +0 -1
  388. package/lib/src/components/Toast/Toast.stories.d.ts +0 -29
  389. package/lib/src/components/Toast/Toast.test.d.ts +0 -1
  390. package/lib/src/components/ToastList/ToastList.stories.d.ts +0 -23
  391. package/lib/src/components/ToastList/ToastList.test.d.ts +0 -1
  392. package/lib/src/components/Toggle/Toggle.stories.d.ts +0 -36
  393. package/lib/src/components/Toggle/Toggle.test.d.ts +0 -1
  394. package/lib/src/components/Validation/Validation.stories.d.ts +0 -14
  395. package/lib/src/components/Validation/Validation.test.d.ts +0 -1
  396. package/lib/src/components/Validation/ValidationSummary.test.d.ts +0 -1
  397. package/lib/src/docs/ButtonWithModal/ButtonWithModal.d.ts +0 -9
  398. package/lib/src/docs/ButtonWithModal/index.d.ts +0 -3
  399. package/lib/src/docs/FormExample/FormExample.d.ts +0 -9
  400. package/lib/src/docs/FormExample/constants.d.ts +0 -10
  401. package/lib/src/docs/FormExample/index.d.ts +0 -3
  402. package/lib/src/docs/GridExample/GridExample.d.ts +0 -7
  403. package/lib/src/docs/GridExample/index.d.ts +0 -3
  404. package/lib/src/docs/HelpBubbleExample/HelpBubbleExample.d.ts +0 -3
  405. package/lib/src/docs/HelpBubbleExample/index.d.ts +0 -3
  406. package/lib/src/docs/HelpTooltipExample/HelpTooltipExample.d.ts +0 -3
  407. package/lib/src/docs/HelpTooltipExample/index.d.ts +0 -3
  408. package/lib/src/docs/Tokens/Tokens.stories.d.ts +0 -23
  409. package/lib/src/docs/Tokens/TokensExample.d.ts +0 -6
  410. package/lib/src/hoc/withBreakpoint/withBreakpoint.stories.d.ts +0 -16
  411. package/lib/src/hoc/withBreakpoint/withBreakpoint.test.d.ts +0 -1
  412. package/lib/src/hooks/useBreakpoint.stories.d.ts +0 -22
  413. package/lib/src/hooks/useElementList.stories.d.ts +0 -22
  414. package/lib/src/hooks/useFocusToggle.stories.d.ts +0 -22
  415. package/lib/src/hooks/useFocusTrap.stories.d.ts +0 -22
  416. package/lib/src/hooks/useFocusableElements.stories.d.ts +0 -22
  417. package/lib/src/hooks/useIdWithFallback.stories.d.ts +0 -22
  418. package/lib/src/hooks/useIntersectionObserver.stories.d.ts +0 -22
  419. package/lib/src/hooks/useInterval.stories.d.ts +0 -22
  420. package/lib/src/hooks/useIsMobileBreakpoint.stories.d.ts +0 -22
  421. package/lib/src/hooks/useIsVisible.stories.d.ts +0 -33
  422. package/lib/src/hooks/useKeyboardEvent.stories.d.ts +0 -22
  423. package/lib/src/hooks/useLanguage.stories.d.ts +0 -22
  424. package/lib/src/hooks/useLayoutEvent.stories.d.ts +0 -22
  425. package/lib/src/hooks/useOutsideEvent.stories.d.ts +0 -22
  426. package/lib/src/hooks/usePseudoClasses.stories.d.ts +0 -22
  427. package/lib/src/hooks/useResizeObserver.stories.d.ts +0 -22
  428. package/lib/src/hooks/useReturnFocusOnUnmount.stories.d.ts +0 -26
  429. package/lib/src/hooks/useRovingFocus.stories.d.ts +0 -24
  430. package/lib/src/hooks/useSize.stories.d.ts +0 -22
  431. package/lib/src/index.d.ts +0 -18
  432. package/lib/src/resources/HN.Designsystem.ArticleTeaser.en-GB.json.d.ts +0 -7
  433. package/lib/src/resources/HN.Designsystem.ArticleTeaser.nb-NO.json.d.ts +0 -7
  434. package/lib/src/resources/HN.Designsystem.Drawer.en-GB.json.d.ts +0 -6
  435. package/lib/src/resources/HN.Designsystem.Drawer.nb-NO.json.d.ts +0 -6
  436. package/lib/src/resources/HN.Designsystem.Dropdown.en-GB.json.d.ts +0 -6
  437. package/lib/src/resources/HN.Designsystem.Dropdown.nb-NO.json.d.ts +0 -6
  438. package/lib/src/resources/HN.Designsystem.FavoriteButton.nb-NO.json.d.ts +0 -6
  439. package/lib/src/resources/HN.Designsystem.FormFieldTag.en-GB.json.d.ts +0 -12
  440. package/lib/src/resources/HN.Designsystem.FormFieldTag.nb-NO.json.d.ts +0 -12
  441. package/lib/src/resources/HN.Designsystem.FormFieldTag.nn-NO.json.d.ts +0 -12
  442. package/lib/src/resources/HN.Designsystem.FormFieldTag.se-NO.json.d.ts +0 -12
  443. package/lib/src/resources/HN.Designsystem.HelpBubble.nb-NO.json.d.ts +0 -6
  444. package/lib/src/resources/HN.Designsystem.HelpDrawer.nb-NO.json.d.ts +0 -6
  445. package/lib/src/resources/HN.Designsystem.InfoTeaser.en-GB.json.d.ts +0 -7
  446. package/lib/src/resources/HN.Designsystem.InfoTeaser.nb-NO.json.d.ts +0 -7
  447. package/lib/src/resources/HN.Designsystem.Input.en-GB.json.d.ts +0 -6
  448. package/lib/src/resources/HN.Designsystem.Input.nb-NO.json.d.ts +0 -6
  449. package/lib/src/resources/HN.Designsystem.Input.nn-NO.json.d.ts +0 -6
  450. package/lib/src/resources/HN.Designsystem.LinkList.en-GB.json.d.ts +0 -6
  451. package/lib/src/resources/HN.Designsystem.LinkList.nb-NO.json.d.ts +0 -6
  452. package/lib/src/resources/HN.Designsystem.Panel.en-GB.json.d.ts +0 -7
  453. package/lib/src/resources/HN.Designsystem.Panel.nb-NO.json.d.ts +0 -7
  454. package/lib/src/resources/HN.Designsystem.Tabs.en-GB.json.d.ts +0 -7
  455. package/lib/src/resources/HN.Designsystem.Tabs.nb-NO.json.d.ts +0 -7
  456. package/lib/src/resources/HN.Designsystem.TextArea.en-GB.json.d.ts +0 -6
  457. package/lib/src/resources/HN.Designsystem.TextArea.nb-NO.json.d.ts +0 -6
  458. package/lib/src/resources/HN.Designsystem.TextArea.nn-NO.json.d.ts +0 -6
  459. package/lib/src/resources/index.d.ts +0 -1
  460. package/lib/src/scss/typography.stories.d.ts +0 -32
  461. package/lib/src/utils/language.stories.d.ts +0 -27
  462. package/lib/src/utils/tests/accessibility.test.d.ts +0 -1
  463. package/lib/src/utils/tests/deepContains.test.d.ts +0 -1
  464. package/lib/src/utils/tests/language.test.d.ts +0 -1
  465. package/lib/src/utils/tests/uuid.test.d.ts +0 -1
  466. package/lib/src/utils/tests/viewport.test.d.ts +0 -1
  467. /package/lib/{src/__mocks__ → __mocks__}/IntersectionObserver.d.ts +0 -0
  468. /package/lib/{src/__mocks__ → __mocks__}/MutationObserver.d.ts +0 -0
  469. /package/lib/{src/__mocks__ → __mocks__}/ResizeObserver.d.ts +0 -0
  470. /package/lib/{src/__mocks__ → __mocks__}/matchMedia.d.ts +0 -0
  471. /package/lib/{src/__mocks__ → __mocks__}/useLayoutEvent.d.ts +0 -0
  472. /package/lib/{src/__mocks__ → __mocks__}/useOutsideEvent.d.ts +0 -0
  473. /package/lib/{src/__mocks__ → __mocks__}/usePseudoClasses.d.ts +0 -0
  474. /package/lib/{src/__mocks__ → __mocks__}/useSize.d.ts +0 -0
  475. /package/lib/{src/__mocks__ → __mocks__}/uuid.d.ts +0 -0
  476. /package/lib/{src/components → components}/AnchorLink/AnchorLink.d.ts +0 -0
  477. /package/lib/{src/components → components}/AnchorLink/index.d.ts +0 -0
  478. /package/lib/{src/components → components}/ArticleTeaser/ArticleTeaser.d.ts +0 -0
  479. /package/lib/{src/components → components}/ArticleTeaser/index.d.ts +0 -0
  480. /package/lib/{src/components → components}/ArticleTeaser/resourceHelper.d.ts +0 -0
  481. /package/lib/{src/components → components}/AsChildSlot/AsChildSlot.d.ts +0 -0
  482. /package/lib/{src/components → components}/AsChildSlot/index.d.ts +0 -0
  483. /package/lib/{src/components → components}/Avatar/Avatar.d.ts +0 -0
  484. /package/lib/{src/components → components}/Avatar/constants.d.ts +0 -0
  485. /package/lib/{src/components → components}/Avatar/index.d.ts +0 -0
  486. /package/lib/{src/components → components}/Badge/Badge.d.ts +0 -0
  487. /package/lib/{src/components → components}/Badge/NotificationBadge.d.ts +0 -0
  488. /package/lib/{src/components → components}/Badge/index.d.ts +0 -0
  489. /package/lib/{src/components → components}/Button/Button.d.ts +0 -0
  490. /package/lib/{src/components → components}/Button/index.d.ts +0 -0
  491. /package/lib/{src/components → components}/Checkbox/Checkbox.d.ts +0 -0
  492. /package/lib/{src/components → components}/Checkbox/index.d.ts +0 -0
  493. /package/lib/{src/components → components}/Chip/Chip.d.ts +0 -0
  494. /package/lib/{src/components → components}/Chip/constants.d.ts +0 -0
  495. /package/lib/{src/components → components}/Chip/index.d.ts +0 -0
  496. /package/lib/{src/components → components}/Close/Close.d.ts +0 -0
  497. /package/lib/{src/components → components}/Close/index.d.ts +0 -0
  498. /package/lib/{src/components → components}/DictionaryTrigger/DictionaryTrigger.d.ts +0 -0
  499. /package/lib/{src/components → components}/DictionaryTrigger/index.d.ts +0 -0
  500. /package/lib/{src/components → components}/Drawer/Drawer.d.ts +0 -0
  501. /package/lib/{src/components → components}/Drawer/index.d.ts +0 -0
  502. /package/lib/{src/components → components}/Drawer/resourceHelper.d.ts +0 -0
  503. /package/lib/{src/components → components}/Dropdown/Dropdown.d.ts +0 -0
  504. /package/lib/{src/components → components}/Dropdown/SingleSelect/SingleSelect.d.ts +0 -0
  505. /package/lib/{src/components → components}/Dropdown/SingleSelect/SingleSelectItem.d.ts +0 -0
  506. /package/lib/{src/components → components}/Dropdown/SingleSelect/utils.d.ts +0 -0
  507. /package/lib/{src/components → components}/Dropdown/index.d.ts +0 -0
  508. /package/lib/{src/components → components}/Dropdown/resourceHelper.d.ts +0 -0
  509. /package/lib/{src/components → components}/DropdownOld/DropdownOld.d.ts +0 -0
  510. /package/lib/{src/components → components}/DropdownOld/constants.d.ts +0 -0
  511. /package/lib/{src/components → components}/DropdownOld/index.d.ts +0 -0
  512. /package/lib/{src/components → components}/DropdownOld/resourceHelper.d.ts +0 -0
  513. /package/lib/{src/components → components}/Duolist/Duolist.d.ts +0 -0
  514. /package/lib/{src/components → components}/Duolist/index.d.ts +0 -0
  515. /package/lib/{src/components → components}/ElementHeader/ElementHeader.d.ts +0 -0
  516. /package/lib/{src/components → components}/ElementHeader/ElementHeaderText/ElementHeaderText.d.ts +0 -0
  517. /package/lib/{src/components → components}/ElementHeader/ElementHeaderText/index.d.ts +0 -0
  518. /package/lib/{src/components → components}/ElementHeader/StatusDotList/StatusDotList.d.ts +0 -0
  519. /package/lib/{src/components → components}/ElementHeader/StatusDotList/index.d.ts +0 -0
  520. /package/lib/{src/components → components}/ElementHeader/utils.d.ts +0 -0
  521. /package/lib/{src/components → components}/EmptyState/EmptyBoxBeeMedium.d.ts +0 -0
  522. /package/lib/{src/components → components}/EmptyState/EmptyBoxBeeSmall.d.ts +0 -0
  523. /package/lib/{src/components → components}/EmptyState/EmptyState.d.ts +0 -0
  524. /package/lib/{src/components → components}/EmptyState/constants.d.ts +0 -0
  525. /package/lib/{src/components → components}/EmptyState/index.d.ts +0 -0
  526. /package/lib/{src/components → components}/ErrorWrapper/ErrorWrapper.d.ts +0 -0
  527. /package/lib/{src/components → components}/ErrorWrapper/index.d.ts +0 -0
  528. /package/lib/{src/components → components}/Expander/Expander.d.ts +0 -0
  529. /package/lib/{src/components → components}/Expander/constants.d.ts +0 -0
  530. /package/lib/{src/components → components}/Expander/index.d.ts +0 -0
  531. /package/lib/{src/components → components}/ExpanderHierarchy/Expander.d.ts +0 -0
  532. /package/lib/{src/components → components}/ExpanderHierarchy/ExpanderButton.d.ts +0 -0
  533. /package/lib/{src/components → components}/ExpanderHierarchy/ExpanderHierarchy.d.ts +0 -0
  534. /package/lib/{src/components → components}/ExpanderHierarchy/utils.d.ts +0 -0
  535. /package/lib/{src/components → components}/ExpanderList/ExpanderList.d.ts +0 -0
  536. /package/lib/{src/components → components}/ExpanderList/index.d.ts +0 -0
  537. /package/lib/{src/components → components}/EyebrowHeader/EyebrowHeader.d.ts +0 -0
  538. /package/lib/{src/components → components}/EyebrowHeader/index.d.ts +0 -0
  539. /package/lib/{src/components → components}/FavoriteButton/FavoriteButton.d.ts +0 -0
  540. /package/lib/{src/components → components}/FavoriteButton/StarIcon.d.ts +0 -0
  541. /package/lib/{src/components → components}/FavoriteButton/index.d.ts +0 -0
  542. /package/lib/{src/components → components}/FavoriteButton/resourceHelper.d.ts +0 -0
  543. /package/lib/{src/components → components}/FormFieldTag/FormFieldTag.d.ts +0 -0
  544. /package/lib/{src/components → components}/FormFieldTag/index.d.ts +0 -0
  545. /package/lib/{src/components → components}/FormFieldTag/resourceHelper.d.ts +0 -0
  546. /package/lib/{src/components → components}/FormGroup/index.d.ts +0 -0
  547. /package/lib/{src/components → components}/FormLayout/FormLayout.d.ts +0 -0
  548. /package/lib/{src/components → components}/FormLayout/constants.d.ts +0 -0
  549. /package/lib/{src/components → components}/FormLayout/index.d.ts +0 -0
  550. /package/lib/{src/components → components}/HelpBubble/HelpBubble.d.ts +0 -0
  551. /package/lib/{src/components → components}/HelpBubble/index.d.ts +0 -0
  552. /package/lib/{src/components → components}/HelpBubble/resourceHelper.d.ts +0 -0
  553. /package/lib/{src/components → components}/HelpDetails/HelpDetails.d.ts +0 -0
  554. /package/lib/{src/components → components}/HelpDrawer/HelpDrawer.d.ts +0 -0
  555. /package/lib/{src/components → components}/HelpDrawer/index.d.ts +0 -0
  556. /package/lib/{src/components → components}/HelpDrawer/resourceHelper.d.ts +0 -0
  557. /package/lib/{src/components → components}/HelpExpanderInline/HelpExpanderInline.d.ts +0 -0
  558. /package/lib/{src/components → components}/HelpExpanderInline/index.d.ts +0 -0
  559. /package/lib/{src/components → components}/HelpExpanderStandalone/HelpExpanderStandalone.d.ts +0 -0
  560. /package/lib/{src/components → components}/HelpExpanderStandalone/index.d.ts +0 -0
  561. /package/lib/{src/components → components}/HelpPanel/HelpPanel.d.ts +0 -0
  562. /package/lib/{src/components → components}/HelpPanel/index.d.ts +0 -0
  563. /package/lib/{src/components → components}/HelpTeaser/HelpTeaser.d.ts +0 -0
  564. /package/lib/{src/components → components}/HelpTeaser/index.d.ts +0 -0
  565. /package/lib/{src/components → components}/HelpTooltip/HelpTooltip.d.ts +0 -0
  566. /package/lib/{src/components → components}/HelpTooltip/index.d.ts +0 -0
  567. /package/lib/{src/components → components}/HelpTriggerIcon/HelpSign.d.ts +0 -0
  568. /package/lib/{src/components → components}/HelpTriggerIcon/HelpTriggerIcon.d.ts +0 -0
  569. /package/lib/{src/components → components}/HelpTriggerIcon/index.d.ts +0 -0
  570. /package/lib/{src/components → components}/HelpTriggerInline/HelpTriggerInline.d.ts +0 -0
  571. /package/lib/{src/components → components}/HelpTriggerInline/index.d.ts +0 -0
  572. /package/lib/{src/components → components}/HelpTriggerStandalone/HelpTriggerStandalone.d.ts +0 -0
  573. /package/lib/{src/components → components}/HelpTriggerStandalone/index.d.ts +0 -0
  574. /package/lib/{src/components → components}/HighlightPanel/HighlightPanel.d.ts +0 -0
  575. /package/lib/{src/components → components}/HighlightPanel/index.d.ts +0 -0
  576. /package/lib/{src/components → components}/Highlighter/Highlighter.d.ts +0 -0
  577. /package/lib/{src/components → components}/Highlighter/index.d.ts +0 -0
  578. /package/lib/{src/components → components}/HorizontalScroll/HorizontalScroll.d.ts +0 -0
  579. /package/lib/{src/components → components}/HorizontalScroll/index.d.ts +0 -0
  580. /package/lib/{src/components → components}/Icon/Icon.d.ts +0 -0
  581. /package/lib/{src/components → components}/Icon/utils.d.ts +0 -0
  582. /package/lib/{src/components → components}/Icons/ActiveMonitoring.d.ts +0 -0
  583. /package/lib/{src/components → components}/Icons/AcupunctureBack.d.ts +0 -0
  584. /package/lib/{src/components → components}/Icons/AdditionalIconInformation.d.ts +0 -0
  585. /package/lib/{src/components → components}/Icons/AlarmClock.d.ts +0 -0
  586. /package/lib/{src/components → components}/Icons/AlertSignFill.d.ts +0 -0
  587. /package/lib/{src/components → components}/Icons/AlertSignStroke.d.ts +0 -0
  588. /package/lib/{src/components → components}/Icons/Amputation.d.ts +0 -0
  589. /package/lib/{src/components → components}/Icons/Anxiety.d.ts +0 -0
  590. /package/lib/{src/components → components}/Icons/Apple.d.ts +0 -0
  591. /package/lib/{src/components → components}/Icons/Archive.d.ts +0 -0
  592. /package/lib/{src/components → components}/Icons/ArmFlexing.d.ts +0 -0
  593. /package/lib/{src/components → components}/Icons/ArrowDown.d.ts +0 -0
  594. /package/lib/{src/components → components}/Icons/ArrowLeft.d.ts +0 -0
  595. /package/lib/{src/components → components}/Icons/ArrowRight.d.ts +0 -0
  596. /package/lib/{src/components → components}/Icons/ArrowUp.d.ts +0 -0
  597. /package/lib/{src/components → components}/Icons/ArrowUpRight.d.ts +0 -0
  598. /package/lib/{src/components → components}/Icons/Attachment.d.ts +0 -0
  599. /package/lib/{src/components → components}/Icons/Atv.d.ts +0 -0
  600. /package/lib/{src/components → components}/Icons/Avatar.d.ts +0 -0
  601. /package/lib/{src/components → components}/Icons/AwakePersonOnPillow.d.ts +0 -0
  602. /package/lib/{src/components → components}/Icons/Baby.d.ts +0 -0
  603. /package/lib/{src/components → components}/Icons/BandAid.d.ts +0 -0
  604. /package/lib/{src/components → components}/Icons/BeerAndPills.d.ts +0 -0
  605. /package/lib/{src/components → components}/Icons/Bell.d.ts +0 -0
  606. /package/lib/{src/components → components}/Icons/Bike.d.ts +0 -0
  607. /package/lib/{src/components → components}/Icons/BirthControl.d.ts +0 -0
  608. /package/lib/{src/components → components}/Icons/BirthdayCake.d.ts +0 -0
  609. /package/lib/{src/components → components}/Icons/Boat.d.ts +0 -0
  610. /package/lib/{src/components → components}/Icons/Body.d.ts +0 -0
  611. /package/lib/{src/components → components}/Icons/Braille.d.ts +0 -0
  612. /package/lib/{src/components → components}/Icons/Brain.d.ts +0 -0
  613. /package/lib/{src/components → components}/Icons/BreastReconstruction.d.ts +0 -0
  614. /package/lib/{src/components → components}/Icons/BreastRemoval.d.ts +0 -0
  615. /package/lib/{src/components → components}/Icons/Breasts.d.ts +0 -0
  616. /package/lib/{src/components → components}/Icons/BrokenHeart.d.ts +0 -0
  617. /package/lib/{src/components → components}/Icons/BrokenPuzzle.d.ts +0 -0
  618. /package/lib/{src/components → components}/Icons/Bus.d.ts +0 -0
  619. /package/lib/{src/components → components}/Icons/Calendar.d.ts +0 -0
  620. /package/lib/{src/components → components}/Icons/CalendarChange.d.ts +0 -0
  621. /package/lib/{src/components → components}/Icons/CalendarCheck.d.ts +0 -0
  622. /package/lib/{src/components → components}/Icons/CalendarEvent.d.ts +0 -0
  623. /package/lib/{src/components → components}/Icons/CalendarSave.d.ts +0 -0
  624. /package/lib/{src/components → components}/Icons/Cancer.d.ts +0 -0
  625. /package/lib/{src/components → components}/Icons/Candle.d.ts +0 -0
  626. /package/lib/{src/components → components}/Icons/Car.d.ts +0 -0
  627. /package/lib/{src/components → components}/Icons/Carton.d.ts +0 -0
  628. /package/lib/{src/components → components}/Icons/Change.d.ts +0 -0
  629. /package/lib/{src/components → components}/Icons/Check.d.ts +0 -0
  630. /package/lib/{src/components → components}/Icons/CheckFill.d.ts +0 -0
  631. /package/lib/{src/components → components}/Icons/CheckOutline.d.ts +0 -0
  632. /package/lib/{src/components → components}/Icons/Chest.d.ts +0 -0
  633. /package/lib/{src/components → components}/Icons/ChevronDown.d.ts +0 -0
  634. /package/lib/{src/components → components}/Icons/ChevronLeft.d.ts +0 -0
  635. /package/lib/{src/components → components}/Icons/ChevronRight.d.ts +0 -0
  636. /package/lib/{src/components → components}/Icons/ChevronUp.d.ts +0 -0
  637. /package/lib/{src/components → components}/Icons/ChevronsDown.d.ts +0 -0
  638. /package/lib/{src/components → components}/Icons/ChevronsUp.d.ts +0 -0
  639. /package/lib/{src/components → components}/Icons/ChildPlaying.d.ts +0 -0
  640. /package/lib/{src/components → components}/Icons/Cigarette.d.ts +0 -0
  641. /package/lib/{src/components → components}/Icons/Coins.d.ts +0 -0
  642. /package/lib/{src/components → components}/Icons/Contacts.d.ts +0 -0
  643. /package/lib/{src/components → components}/Icons/Copy.d.ts +0 -0
  644. /package/lib/{src/components → components}/Icons/CoronaCertificate.d.ts +0 -0
  645. /package/lib/{src/components → components}/Icons/Coronavirus.d.ts +0 -0
  646. /package/lib/{src/components → components}/Icons/Cough.d.ts +0 -0
  647. /package/lib/{src/components → components}/Icons/CreditCard.d.ts +0 -0
  648. /package/lib/{src/components → components}/Icons/CriticalHealthInfo.d.ts +0 -0
  649. /package/lib/{src/components → components}/Icons/Cross.d.ts +0 -0
  650. /package/lib/{src/components → components}/Icons/DataExchange.d.ts +0 -0
  651. /package/lib/{src/components → components}/Icons/DataReceived.d.ts +0 -0
  652. /package/lib/{src/components → components}/Icons/DataSent.d.ts +0 -0
  653. /package/lib/{src/components → components}/Icons/Depression.d.ts +0 -0
  654. /package/lib/{src/components → components}/Icons/DigestiveSystem.d.ts +0 -0
  655. /package/lib/{src/components → components}/Icons/Dizzy.d.ts +0 -0
  656. /package/lib/{src/components → components}/Icons/Documents.d.ts +0 -0
  657. /package/lib/{src/components → components}/Icons/Dog.d.ts +0 -0
  658. /package/lib/{src/components → components}/Icons/DonorCard.d.ts +0 -0
  659. /package/lib/{src/components → components}/Icons/DotActive.d.ts +0 -0
  660. /package/lib/{src/components → components}/Icons/DotAlert.d.ts +0 -0
  661. /package/lib/{src/components → components}/Icons/DotCancelled.d.ts +0 -0
  662. /package/lib/{src/components → components}/Icons/DotHalfDisc.d.ts +0 -0
  663. /package/lib/{src/components → components}/Icons/DotInactive.d.ts +0 -0
  664. /package/lib/{src/components → components}/Icons/DotInfo.d.ts +0 -0
  665. /package/lib/{src/components → components}/Icons/DotLookingGlass.d.ts +0 -0
  666. /package/lib/{src/components → components}/Icons/DotPending.d.ts +0 -0
  667. /package/lib/{src/components → components}/Icons/DotQuestionMark.d.ts +0 -0
  668. /package/lib/{src/components → components}/Icons/DotSuccess.d.ts +0 -0
  669. /package/lib/{src/components → components}/Icons/DotTransparent.d.ts +0 -0
  670. /package/lib/{src/components → components}/Icons/DotWarningTriangle.d.ts +0 -0
  671. /package/lib/{src/components → components}/Icons/Download.d.ts +0 -0
  672. /package/lib/{src/components → components}/Icons/Draft.d.ts +0 -0
  673. /package/lib/{src/components → components}/Icons/Drag.d.ts +0 -0
  674. /package/lib/{src/components → components}/Icons/EChat.d.ts +0 -0
  675. /package/lib/{src/components → components}/Icons/Ear.d.ts +0 -0
  676. /package/lib/{src/components → components}/Icons/EarDeaf.d.ts +0 -0
  677. /package/lib/{src/components → components}/Icons/EarHearingAid.d.ts +0 -0
  678. /package/lib/{src/components → components}/Icons/EarNoseThroat.d.ts +0 -0
  679. /package/lib/{src/components → components}/Icons/EarVolume.d.ts +0 -0
  680. /package/lib/{src/components → components}/Icons/Edit.d.ts +0 -0
  681. /package/lib/{src/components → components}/Icons/ElderlyPerson.d.ts +0 -0
  682. /package/lib/{src/components → components}/Icons/Embolization.d.ts +0 -0
  683. /package/lib/{src/components → components}/Icons/EmergencyCall.d.ts +0 -0
  684. /package/lib/{src/components → components}/Icons/EmoticonAnnoyed.d.ts +0 -0
  685. /package/lib/{src/components → components}/Icons/EmoticonDelighted.d.ts +0 -0
  686. /package/lib/{src/components → components}/Icons/EmoticonDisappointed.d.ts +0 -0
  687. /package/lib/{src/components → components}/Icons/EmoticonHappy.d.ts +0 -0
  688. /package/lib/{src/components → components}/Icons/EmoticonMeh.d.ts +0 -0
  689. /package/lib/{src/components → components}/Icons/EmptyBox.d.ts +0 -0
  690. /package/lib/{src/components → components}/Icons/EnterFullScreen.d.ts +0 -0
  691. /package/lib/{src/components → components}/Icons/Envelope.d.ts +0 -0
  692. /package/lib/{src/components → components}/Icons/Epilepsy.d.ts +0 -0
  693. /package/lib/{src/components → components}/Icons/Eraser.d.ts +0 -0
  694. /package/lib/{src/components → components}/Icons/ErrorSignFill.d.ts +0 -0
  695. /package/lib/{src/components → components}/Icons/ErrorSignStroke.d.ts +0 -0
  696. /package/lib/{src/components → components}/Icons/EuropeanHealthCard.d.ts +0 -0
  697. /package/lib/{src/components → components}/Icons/ExitFullScreen.d.ts +0 -0
  698. /package/lib/{src/components → components}/Icons/Eye.d.ts +0 -0
  699. /package/lib/{src/components → components}/Icons/Facebook.d.ts +0 -0
  700. /package/lib/{src/components → components}/Icons/FallingLeaf.d.ts +0 -0
  701. /package/lib/{src/components → components}/Icons/Feedback.d.ts +0 -0
  702. /package/lib/{src/components → components}/Icons/Female.d.ts +0 -0
  703. /package/lib/{src/components → components}/Icons/FemaleDoctor.d.ts +0 -0
  704. /package/lib/{src/components → components}/Icons/Ferry.d.ts +0 -0
  705. /package/lib/{src/components → components}/Icons/File.d.ts +0 -0
  706. /package/lib/{src/components → components}/Icons/Filter.d.ts +0 -0
  707. /package/lib/{src/components → components}/Icons/FingerBleed.d.ts +0 -0
  708. /package/lib/{src/components → components}/Icons/FirstAidKit.d.ts +0 -0
  709. /package/lib/{src/components → components}/Icons/Fish.d.ts +0 -0
  710. /package/lib/{src/components → components}/Icons/FloppyDisk.d.ts +0 -0
  711. /package/lib/{src/components → components}/Icons/Football.d.ts +0 -0
  712. /package/lib/{src/components → components}/Icons/Form.d.ts +0 -0
  713. /package/lib/{src/components → components}/Icons/Forward.d.ts +0 -0
  714. /package/lib/{src/components → components}/Icons/Gallery.d.ts +0 -0
  715. /package/lib/{src/components → components}/Icons/Garden.d.ts +0 -0
  716. /package/lib/{src/components → components}/Icons/GasCan.d.ts +0 -0
  717. /package/lib/{src/components → components}/Icons/GenderIdentity.d.ts +0 -0
  718. /package/lib/{src/components → components}/Icons/GlassWater.d.ts +0 -0
  719. /package/lib/{src/components → components}/Icons/Glasses.d.ts +0 -0
  720. /package/lib/{src/components → components}/Icons/Globe.d.ts +0 -0
  721. /package/lib/{src/components → components}/Icons/Grain.d.ts +0 -0
  722. /package/lib/{src/components → components}/Icons/Graph.d.ts +0 -0
  723. /package/lib/{src/components → components}/Icons/Group.d.ts +0 -0
  724. /package/lib/{src/components → components}/Icons/GroupTwins.d.ts +0 -0
  725. /package/lib/{src/components → components}/Icons/HTMLFile.d.ts +0 -0
  726. /package/lib/{src/components → components}/Icons/HandWaving.d.ts +0 -0
  727. /package/lib/{src/components → components}/Icons/HandWithDisease.d.ts +0 -0
  728. /package/lib/{src/components → components}/Icons/HandsAndHeart.d.ts +0 -0
  729. /package/lib/{src/components → components}/Icons/HealthClinic.d.ts +0 -0
  730. /package/lib/{src/components → components}/Icons/HealthMeasurements.d.ts +0 -0
  731. /package/lib/{src/components → components}/Icons/HealthWarning.d.ts +0 -0
  732. /package/lib/{src/components → components}/Icons/HealthcarePerson.d.ts +0 -0
  733. /package/lib/{src/components → components}/Icons/HealthcarePersonell.d.ts +0 -0
  734. /package/lib/{src/components → components}/Icons/HearingProtection.d.ts +0 -0
  735. /package/lib/{src/components → components}/Icons/Heart.d.ts +0 -0
  736. /package/lib/{src/components → components}/Icons/HeartHands.d.ts +0 -0
  737. /package/lib/{src/components → components}/Icons/HelpSign.d.ts +0 -0
  738. /package/lib/{src/components → components}/Icons/HelpingHand.d.ts +0 -0
  739. /package/lib/{src/components → components}/Icons/Hemodialysis.d.ts +0 -0
  740. /package/lib/{src/components → components}/Icons/Hiker.d.ts +0 -0
  741. /package/lib/{src/components → components}/Icons/Hipprosthesis.d.ts +0 -0
  742. /package/lib/{src/components → components}/Icons/History.d.ts +0 -0
  743. /package/lib/{src/components → components}/Icons/HivAndAids.d.ts +0 -0
  744. /package/lib/{src/components → components}/Icons/Home.d.ts +0 -0
  745. /package/lib/{src/components → components}/Icons/HomeFill.d.ts +0 -0
  746. /package/lib/{src/components → components}/Icons/Hormone.d.ts +0 -0
  747. /package/lib/{src/components → components}/Icons/Hospital.d.ts +0 -0
  748. /package/lib/{src/components → components}/Icons/Hourglass.d.ts +0 -0
  749. /package/lib/{src/components → components}/Icons/IconNames.d.ts +0 -0
  750. /package/lib/{src/components → components}/Icons/ImgFile.d.ts +0 -0
  751. /package/lib/{src/components → components}/Icons/Inbox.d.ts +0 -0
  752. /package/lib/{src/components → components}/Icons/InfoSignFill.d.ts +0 -0
  753. /package/lib/{src/components → components}/Icons/InfoSignStroke.d.ts +0 -0
  754. /package/lib/{src/components → components}/Icons/Instagram.d.ts +0 -0
  755. /package/lib/{src/components → components}/Icons/Intravenous.d.ts +0 -0
  756. /package/lib/{src/components → components}/Icons/JointPain.d.ts +0 -0
  757. /package/lib/{src/components → components}/Icons/Journal.d.ts +0 -0
  758. /package/lib/{src/components → components}/Icons/JpgFile.d.ts +0 -0
  759. /package/lib/{src/components → components}/Icons/Kidney.d.ts +0 -0
  760. /package/lib/{src/components → components}/Icons/KitchenScale.d.ts +0 -0
  761. /package/lib/{src/components → components}/Icons/Kjernejournal.d.ts +0 -0
  762. /package/lib/{src/components → components}/Icons/Laboratory.d.ts +0 -0
  763. /package/lib/{src/components → components}/Icons/LaptopBlog.d.ts +0 -0
  764. /package/lib/{src/components → components}/Icons/LawBook.d.ts +0 -0
  765. /package/lib/{src/components → components}/Icons/LegalDocument.d.ts +0 -0
  766. /package/lib/{src/components → components}/Icons/LightBulb.d.ts +0 -0
  767. /package/lib/{src/components → components}/Icons/List.d.ts +0 -0
  768. /package/lib/{src/components → components}/Icons/Location.d.ts +0 -0
  769. /package/lib/{src/components → components}/Icons/LocationFill.d.ts +0 -0
  770. /package/lib/{src/components → components}/Icons/Lock.d.ts +0 -0
  771. /package/lib/{src/components → components}/Icons/Login.d.ts +0 -0
  772. /package/lib/{src/components → components}/Icons/Logout.d.ts +0 -0
  773. /package/lib/{src/components → components}/Icons/Lungs.d.ts +0 -0
  774. /package/lib/{src/components → components}/Icons/Makeup.d.ts +0 -0
  775. /package/lib/{src/components → components}/Icons/MaleDoctor.d.ts +0 -0
  776. /package/lib/{src/components → components}/Icons/MaleDoctorAndPerson.d.ts +0 -0
  777. /package/lib/{src/components → components}/Icons/MaleDoctorCompact.d.ts +0 -0
  778. /package/lib/{src/components → components}/Icons/MaleDoctorCompactFill.d.ts +0 -0
  779. /package/lib/{src/components → components}/Icons/MaleGenitalia.d.ts +0 -0
  780. /package/lib/{src/components → components}/Icons/Medicine.d.ts +0 -0
  781. /package/lib/{src/components → components}/Icons/MedicineWarning.d.ts +0 -0
  782. /package/lib/{src/components → components}/Icons/MentalHealthAdult.d.ts +0 -0
  783. /package/lib/{src/components → components}/Icons/MentalHealthChild.d.ts +0 -0
  784. /package/lib/{src/components → components}/Icons/Menu.d.ts +0 -0
  785. /package/lib/{src/components → components}/Icons/Microscope.d.ts +0 -0
  786. /package/lib/{src/components → components}/Icons/Minus.d.ts +0 -0
  787. /package/lib/{src/components → components}/Icons/Mirror.d.ts +0 -0
  788. /package/lib/{src/components → components}/Icons/MobilePhone.d.ts +0 -0
  789. /package/lib/{src/components → components}/Icons/MotherHoldingBaby.d.ts +0 -0
  790. /package/lib/{src/components → components}/Icons/MuscleBack.d.ts +0 -0
  791. /package/lib/{src/components → components}/Icons/MuscleLeg.d.ts +0 -0
  792. /package/lib/{src/components → components}/Icons/Mushroom.d.ts +0 -0
  793. /package/lib/{src/components → components}/Icons/Music.d.ts +0 -0
  794. /package/lib/{src/components → components}/Icons/MusselsAndSalt.d.ts +0 -0
  795. /package/lib/{src/components → components}/Icons/NoAccess.d.ts +0 -0
  796. /package/lib/{src/components → components}/Icons/NoEye.d.ts +0 -0
  797. /package/lib/{src/components → components}/Icons/NoFilter.d.ts +0 -0
  798. /package/lib/{src/components → components}/Icons/Notepad.d.ts +0 -0
  799. /package/lib/{src/components → components}/Icons/Osteotomy.d.ts +0 -0
  800. /package/lib/{src/components → components}/Icons/PaintRoller.d.ts +0 -0
  801. /package/lib/{src/components → components}/Icons/PaperPlane.d.ts +0 -0
  802. /package/lib/{src/components → components}/Icons/PatientAndPerson.d.ts +0 -0
  803. /package/lib/{src/components → components}/Icons/Pause.d.ts +0 -0
  804. /package/lib/{src/components → components}/Icons/PdfFile.d.ts +0 -0
  805. /package/lib/{src/components → components}/Icons/Pencil.d.ts +0 -0
  806. /package/lib/{src/components → components}/Icons/PeopleTalking.d.ts +0 -0
  807. /package/lib/{src/components → components}/Icons/Peritonealdialysis.d.ts +0 -0
  808. /package/lib/{src/components → components}/Icons/Person.d.ts +0 -0
  809. /package/lib/{src/components → components}/Icons/PersonAndPatient.d.ts +0 -0
  810. /package/lib/{src/components → components}/Icons/PersonCancel.d.ts +0 -0
  811. /package/lib/{src/components → components}/Icons/PersonInXRayMachine.d.ts +0 -0
  812. /package/lib/{src/components → components}/Icons/PersonOverweight.d.ts +0 -0
  813. /package/lib/{src/components → components}/Icons/PersonRelaxing.d.ts +0 -0
  814. /package/lib/{src/components → components}/Icons/PersonWithBrain.d.ts +0 -0
  815. /package/lib/{src/components → components}/Icons/PersonWithBrokenArm.d.ts +0 -0
  816. /package/lib/{src/components → components}/Icons/PersonWithCrutches.d.ts +0 -0
  817. /package/lib/{src/components → components}/Icons/PersonWithJaw.d.ts +0 -0
  818. /package/lib/{src/components → components}/Icons/PersonWithMagnifyingGlass.d.ts +0 -0
  819. /package/lib/{src/components → components}/Icons/PersonWithSenses.d.ts +0 -0
  820. /package/lib/{src/components → components}/Icons/PersonWorking.d.ts +0 -0
  821. /package/lib/{src/components → components}/Icons/PersonalPlan.d.ts +0 -0
  822. /package/lib/{src/components → components}/Icons/PizzaSlice.d.ts +0 -0
  823. /package/lib/{src/components → components}/Icons/Plane.d.ts +0 -0
  824. /package/lib/{src/components → components}/Icons/Plant.d.ts +0 -0
  825. /package/lib/{src/components → components}/Icons/PlateKnifeFork.d.ts +0 -0
  826. /package/lib/{src/components → components}/Icons/Play.d.ts +0 -0
  827. /package/lib/{src/components → components}/Icons/PlusLarge.d.ts +0 -0
  828. /package/lib/{src/components → components}/Icons/PlusSmall.d.ts +0 -0
  829. /package/lib/{src/components → components}/Icons/PngFile.d.ts +0 -0
  830. /package/lib/{src/components → components}/Icons/Podcast.d.ts +0 -0
  831. /package/lib/{src/components → components}/Icons/PoisonInformation.d.ts +0 -0
  832. /package/lib/{src/components → components}/Icons/Pregnant.d.ts +0 -0
  833. /package/lib/{src/components → components}/Icons/Printer.d.ts +0 -0
  834. /package/lib/{src/components → components}/Icons/Psychosis.d.ts +0 -0
  835. /package/lib/{src/components → components}/Icons/Publication.d.ts +0 -0
  836. /package/lib/{src/components → components}/Icons/Puzzle.d.ts +0 -0
  837. /package/lib/{src/components → components}/Icons/QrCode.d.ts +0 -0
  838. /package/lib/{src/components → components}/Icons/Quarrel.d.ts +0 -0
  839. /package/lib/{src/components → components}/Icons/RadioTherapy.d.ts +0 -0
  840. /package/lib/{src/components → components}/Icons/RadioactiveTreatment.d.ts +0 -0
  841. /package/lib/{src/components → components}/Icons/Radioiodine.d.ts +0 -0
  842. /package/lib/{src/components → components}/Icons/Receipt.d.ts +0 -0
  843. /package/lib/{src/components → components}/Icons/Receptionist.d.ts +0 -0
  844. /package/lib/{src/components → components}/Icons/Recovery.d.ts +0 -0
  845. /package/lib/{src/components → components}/Icons/Referral.d.ts +0 -0
  846. /package/lib/{src/components → components}/Icons/Refresh.d.ts +0 -0
  847. /package/lib/{src/components → components}/Icons/Refund.d.ts +0 -0
  848. /package/lib/{src/components → components}/Icons/Reminder.d.ts +0 -0
  849. /package/lib/{src/components → components}/Icons/Reply.d.ts +0 -0
  850. /package/lib/{src/components → components}/Icons/Rocket.d.ts +0 -0
  851. /package/lib/{src/components → components}/Icons/RtfFile.d.ts +0 -0
  852. /package/lib/{src/components → components}/Icons/STDs.d.ts +0 -0
  853. /package/lib/{src/components → components}/Icons/Save.d.ts +0 -0
  854. /package/lib/{src/components → components}/Icons/Scale.d.ts +0 -0
  855. /package/lib/{src/components → components}/Icons/ScreenReader.d.ts +0 -0
  856. /package/lib/{src/components → components}/Icons/Search.d.ts +0 -0
  857. /package/lib/{src/components → components}/Icons/SectionSign.d.ts +0 -0
  858. /package/lib/{src/components → components}/Icons/Settings.d.ts +0 -0
  859. /package/lib/{src/components → components}/Icons/SettingsFill.d.ts +0 -0
  860. /package/lib/{src/components → components}/Icons/Sexualorientation.d.ts +0 -0
  861. /package/lib/{src/components → components}/Icons/ShakingHand.d.ts +0 -0
  862. /package/lib/{src/components → components}/Icons/Share.d.ts +0 -0
  863. /package/lib/{src/components → components}/Icons/SharedHealthData.d.ts +0 -0
  864. /package/lib/{src/components → components}/Icons/SharedHealthMeasurements.d.ts +0 -0
  865. /package/lib/{src/components → components}/Icons/Shield.d.ts +0 -0
  866. /package/lib/{src/components → components}/Icons/ShuntOperation.d.ts +0 -0
  867. /package/lib/{src/components → components}/Icons/Skeleton.d.ts +0 -0
  868. /package/lib/{src/components → components}/Icons/Skin.d.ts +0 -0
  869. /package/lib/{src/components → components}/Icons/Snake.d.ts +0 -0
  870. /package/lib/{src/components → components}/Icons/Snapchat.d.ts +0 -0
  871. /package/lib/{src/components → components}/Icons/SortDown.d.ts +0 -0
  872. /package/lib/{src/components → components}/Icons/SortUp.d.ts +0 -0
  873. /package/lib/{src/components → components}/Icons/SpeechBubble.d.ts +0 -0
  874. /package/lib/{src/components → components}/Icons/Spray.d.ts +0 -0
  875. /package/lib/{src/components → components}/Icons/StickyNote.d.ts +0 -0
  876. /package/lib/{src/components → components}/Icons/StickyNotes.d.ts +0 -0
  877. /package/lib/{src/components → components}/Icons/Stopwatch.d.ts +0 -0
  878. /package/lib/{src/components → components}/Icons/Sun.d.ts +0 -0
  879. /package/lib/{src/components → components}/Icons/SupportingPerson.d.ts +0 -0
  880. /package/lib/{src/components → components}/Icons/Surgery.d.ts +0 -0
  881. /package/lib/{src/components → components}/Icons/Sweets.d.ts +0 -0
  882. /package/lib/{src/components → components}/Icons/Syringe.d.ts +0 -0
  883. /package/lib/{src/components → components}/Icons/Taxi.d.ts +0 -0
  884. /package/lib/{src/components → components}/Icons/TeddyBear.d.ts +0 -0
  885. /package/lib/{src/components → components}/Icons/Teenagers.d.ts +0 -0
  886. /package/lib/{src/components → components}/Icons/ThinkingAboutBaby.d.ts +0 -0
  887. /package/lib/{src/components → components}/Icons/Ticket.d.ts +0 -0
  888. /package/lib/{src/components → components}/Icons/TimePassing.d.ts +0 -0
  889. /package/lib/{src/components → components}/Icons/Toddler.d.ts +0 -0
  890. /package/lib/{src/components → components}/Icons/Tombstone.d.ts +0 -0
  891. /package/lib/{src/components → components}/Icons/Toolbox.d.ts +0 -0
  892. /package/lib/{src/components → components}/Icons/Tooth.d.ts +0 -0
  893. /package/lib/{src/components → components}/Icons/TotalKneeProsthesis.d.ts +0 -0
  894. /package/lib/{src/components → components}/Icons/Train.d.ts +0 -0
  895. /package/lib/{src/components → components}/Icons/Transplantation.d.ts +0 -0
  896. /package/lib/{src/components → components}/Icons/TrashCan.d.ts +0 -0
  897. /package/lib/{src/components → components}/Icons/TravelRoute.d.ts +0 -0
  898. /package/lib/{src/components → components}/Icons/TreatmentAids.d.ts +0 -0
  899. /package/lib/{src/components → components}/Icons/TriangleX.d.ts +0 -0
  900. /package/lib/{src/components → components}/Icons/Twitter.d.ts +0 -0
  901. /package/lib/{src/components → components}/Icons/Undo.d.ts +0 -0
  902. /package/lib/{src/components → components}/Icons/UniProsthesis.d.ts +0 -0
  903. /package/lib/{src/components → components}/Icons/Upload.d.ts +0 -0
  904. /package/lib/{src/components → components}/Icons/UserOrganization.d.ts +0 -0
  905. /package/lib/{src/components → components}/Icons/Vaccine.d.ts +0 -0
  906. /package/lib/{src/components → components}/Icons/VerticalDots.d.ts +0 -0
  907. /package/lib/{src/components → components}/Icons/VideoCamera.d.ts +0 -0
  908. /package/lib/{src/components → components}/Icons/VideoChat.d.ts +0 -0
  909. /package/lib/{src/components → components}/Icons/Wallet.d.ts +0 -0
  910. /package/lib/{src/components → components}/Icons/Watch.d.ts +0 -0
  911. /package/lib/{src/components → components}/Icons/Website.d.ts +0 -0
  912. /package/lib/{src/components → components}/Icons/Wheelchair.d.ts +0 -0
  913. /package/lib/{src/components → components}/Icons/WheelchairActive.d.ts +0 -0
  914. /package/lib/{src/components → components}/Icons/Window.d.ts +0 -0
  915. /package/lib/{src/components → components}/Icons/WordDocument.d.ts +0 -0
  916. /package/lib/{src/components → components}/Icons/WorkSuitcase.d.ts +0 -0
  917. /package/lib/{src/components → components}/Icons/X.d.ts +0 -0
  918. /package/lib/{src/components → components}/Icons/XOutline.d.ts +0 -0
  919. /package/lib/{src/components → components}/Icons/XmlFile.d.ts +0 -0
  920. /package/lib/{src/components → components}/Icons/YouTube.d.ts +0 -0
  921. /package/lib/{src/components → components}/Icons/Zoom.d.ts +0 -0
  922. /package/lib/{src/components → components}/Icons/ZoomInLeft.d.ts +0 -0
  923. /package/lib/{src/components → components}/Icons/ZoomOutLeft.d.ts +0 -0
  924. /package/lib/{src/components → components}/Illustration/Illustration.d.ts +0 -0
  925. /package/lib/{src/components → components}/Illustration/utils.d.ts +0 -0
  926. /package/lib/{src/components → components}/Illustrations/BabyMobile.d.ts +0 -0
  927. /package/lib/{src/components → components}/Illustrations/BabyMobileMedium.d.ts +0 -0
  928. /package/lib/{src/components → components}/Illustrations/Child.d.ts +0 -0
  929. /package/lib/{src/components → components}/Illustrations/ChildMedium.d.ts +0 -0
  930. /package/lib/{src/components → components}/Illustrations/Doctor.d.ts +0 -0
  931. /package/lib/{src/components → components}/Illustrations/DoctorMedium.d.ts +0 -0
  932. /package/lib/{src/components → components}/Illustrations/DoctorSmall.d.ts +0 -0
  933. /package/lib/{src/components → components}/Illustrations/FacialRecognitionFingerprint.d.ts +0 -0
  934. /package/lib/{src/components → components}/Illustrations/FacialRecognitionFingerprintMedium.d.ts +0 -0
  935. /package/lib/{src/components → components}/Illustrations/GiveBabyFood.d.ts +0 -0
  936. /package/lib/{src/components → components}/Illustrations/GiveBabyFoodMedium.d.ts +0 -0
  937. /package/lib/{src/components → components}/Illustrations/HealthcarePersonnel.d.ts +0 -0
  938. /package/lib/{src/components → components}/Illustrations/HealthcarePersonnelMedium.d.ts +0 -0
  939. /package/lib/{src/components → components}/Illustrations/HealthcarePersonnelSmall.d.ts +0 -0
  940. /package/lib/{src/components → components}/Illustrations/IllustrationNames.d.ts +0 -0
  941. /package/lib/{src/components → components}/Illustrations/ReadLetters.d.ts +0 -0
  942. /package/lib/{src/components → components}/Illustrations/ReadLettersMedium.d.ts +0 -0
  943. /package/lib/{src/components → components}/Illustrations/Stroller.d.ts +0 -0
  944. /package/lib/{src/components → components}/Illustrations/StrollerMedium.d.ts +0 -0
  945. /package/lib/{src/components → components}/Illustrations/Support2.d.ts +0 -0
  946. /package/lib/{src/components → components}/Illustrations/Support2Medium.d.ts +0 -0
  947. /package/lib/{src/components → components}/InfoTeaser/InfoTeaser.d.ts +0 -0
  948. /package/lib/{src/components → components}/InfoTeaser/index.d.ts +0 -0
  949. /package/lib/{src/components → components}/InfoTeaser/resourceHelper.d.ts +0 -0
  950. /package/lib/{src/components → components}/Input/Input.d.ts +0 -0
  951. /package/lib/{src/components → components}/Input/constants.d.ts +0 -0
  952. /package/lib/{src/components → components}/Input/index.d.ts +0 -0
  953. /package/lib/{src/components → components}/Input/resourceHelper.d.ts +0 -0
  954. /package/lib/{src/components → components}/Label/Label.d.ts +0 -0
  955. /package/lib/{src/components → components}/Label/SubLabel.d.ts +0 -0
  956. /package/lib/{src/components → components}/Label/utils.d.ts +0 -0
  957. /package/lib/{src/components → components}/LazyIcon/ErrorBoundary.d.ts +0 -0
  958. /package/lib/{src/components → components}/LazyIcon/LazyIcon.d.ts +0 -0
  959. /package/lib/{src/components → components}/LazyIcon/utils.d.ts +0 -0
  960. /package/lib/{src/components → components}/LazyIllustration/LazyIllustration.d.ts +0 -0
  961. /package/lib/{src/components → components}/LazyIllustration/index.d.ts +0 -0
  962. /package/lib/{src/components → components}/LinkList/LinkList.d.ts +0 -0
  963. /package/lib/{src/components → components}/LinkList/index.d.ts +0 -0
  964. /package/lib/{src/components → components}/LinkList/resourceHelper.d.ts +0 -0
  965. /package/lib/{src/components → components}/List/List.d.ts +0 -0
  966. /package/lib/{src/components → components}/List/index.d.ts +0 -0
  967. /package/lib/{src/components → components}/ListEditMode/ListEditMode.d.ts +0 -0
  968. /package/lib/{src/components → components}/ListEditMode/constants.d.ts +0 -0
  969. /package/lib/{src/components → components}/Loader/Loader.d.ts +0 -0
  970. /package/lib/{src/components → components}/Loader/constants.d.ts +0 -0
  971. /package/lib/{src/components → components}/Loader/index.d.ts +0 -0
  972. /package/lib/{src/components → components}/Logo/Logo.d.ts +0 -0
  973. /package/lib/{src/components → components}/Logo/index.d.ts +0 -0
  974. /package/lib/{src/components → components}/MaxCharacters/MaxCharacters.d.ts +0 -0
  975. /package/lib/{src/components → components}/Modal/Modal.d.ts +0 -0
  976. /package/lib/{src/components → components}/Modal/constants.d.ts +0 -0
  977. /package/lib/{src/components → components}/Modal/index.d.ts +0 -0
  978. /package/lib/{src/components → components}/NotificationPanel/NotificationPanel.d.ts +0 -0
  979. /package/lib/{src/components → components}/NotificationPanel/index.d.ts +0 -0
  980. /package/lib/{src/components → components}/Panel/Panel.d.ts +0 -0
  981. /package/lib/{src/components → components}/Panel/PanelExamples.d.ts +0 -0
  982. /package/lib/{src/components → components}/Panel/PanelTitle/PanelTitle.d.ts +0 -0
  983. /package/lib/{src/components → components}/Panel/PanelTitle/index.d.ts +0 -0
  984. /package/lib/{src/components → components}/Panel/Paneldocs.d.ts +0 -0
  985. /package/lib/{src/components → components}/Panel/constants.d.ts +0 -0
  986. /package/lib/{src/components → components}/Panel/index.d.ts +0 -0
  987. /package/lib/{src/components → components}/Panel/resourceHelper.d.ts +0 -0
  988. /package/lib/{src/components → components}/PanelList/PanelList.d.ts +0 -0
  989. /package/lib/{src/components → components}/PanelList/utils.d.ts +0 -0
  990. /package/lib/{src/components → components}/PopMenu/PopMenu.d.ts +0 -0
  991. /package/lib/{src/components → components}/PopMenu/constants.d.ts +0 -0
  992. /package/lib/{src/components → components}/PopMenu/index.d.ts +0 -0
  993. /package/lib/{src/components → components}/PopOver/PopOver.d.ts +0 -0
  994. /package/lib/{src/components → components}/PopOver/index.d.ts +0 -0
  995. /package/lib/{src/components → components}/PopOver/utils.d.ts +0 -0
  996. /package/lib/{src/components → components}/Portal/index.d.ts +0 -0
  997. /package/lib/{src/components → components}/Progressbar/Progressbar.d.ts +0 -0
  998. /package/lib/{src/components → components}/Progressbar/constants.d.ts +0 -0
  999. /package/lib/{src/components → components}/Progressbar/index.d.ts +0 -0
  1000. /package/lib/{src/components → components}/PromoPanel/PromoPanel.d.ts +0 -0
  1001. /package/lib/{src/components → components}/PromoPanel/index.d.ts +0 -0
  1002. /package/lib/{src/components → components}/RadioButton/RadioButton.d.ts +0 -0
  1003. /package/lib/{src/components → components}/RadioButton/utils.d.ts +0 -0
  1004. /package/lib/{src/components → components}/Select/Select.d.ts +0 -0
  1005. /package/lib/{src/components → components}/Select/index.d.ts +0 -0
  1006. /package/lib/{src/components → components}/ServiceMessage/ServiceMessage.d.ts +0 -0
  1007. /package/lib/{src/components → components}/ServiceMessage/index.d.ts +0 -0
  1008. /package/lib/{src/components → components}/SharingStatus/SharingStatus.d.ts +0 -0
  1009. /package/lib/{src/components → components}/SharingStatus/index.d.ts +0 -0
  1010. /package/lib/{src/components → components}/Slider/Slider.d.ts +0 -0
  1011. /package/lib/{src/components → components}/Slider/index.d.ts +0 -0
  1012. /package/lib/{src/components → components}/Spacer/Spacer.d.ts +0 -0
  1013. /package/lib/{src/components → components}/Spacer/index.d.ts +0 -0
  1014. /package/lib/{src/components → components}/StatusDot/StatusDot.d.ts +0 -0
  1015. /package/lib/{src/components → components}/StatusDot/constants.d.ts +0 -0
  1016. /package/lib/{src/components → components}/StatusDot/index.d.ts +0 -0
  1017. /package/lib/{src/components → components}/Step/Step.d.ts +0 -0
  1018. /package/lib/{src/components → components}/Step/index.d.ts +0 -0
  1019. /package/lib/{src/components → components}/StepButtons/StepButtons.d.ts +0 -0
  1020. /package/lib/{src/components → components}/StepButtons/index.d.ts +0 -0
  1021. /package/lib/{src/components → components}/Stepper/Dot.d.ts +0 -0
  1022. /package/lib/{src/components → components}/Stepper/DotList.d.ts +0 -0
  1023. /package/lib/{src/components → components}/Stepper/Stepper.d.ts +0 -0
  1024. /package/lib/{src/components → components}/Stepper/utils.d.ts +0 -0
  1025. /package/lib/{src/components → components}/StickyNote/Close.d.ts +0 -0
  1026. /package/lib/{src/components → components}/StickyNote/StickyNote.d.ts +0 -0
  1027. /package/lib/{src/components → components}/StickyNote/Triangle.d.ts +0 -0
  1028. /package/lib/{src/components → components}/StickyNote/index.d.ts +0 -0
  1029. /package/lib/{src/components → components}/Table/Table.d.ts +0 -0
  1030. /package/lib/{src/components → components}/Table/TableBody/TableBody.d.ts +0 -0
  1031. /package/lib/{src/components → components}/Table/TableBody/index.d.ts +0 -0
  1032. /package/lib/{src/components → components}/Table/TableCell/TableCell.d.ts +0 -0
  1033. /package/lib/{src/components → components}/Table/TableCell/index.d.ts +0 -0
  1034. /package/lib/{src/components → components}/Table/TableExpandedRow/TableExpandedRow.d.ts +0 -0
  1035. /package/lib/{src/components → components}/Table/TableExpandedRow/index.d.ts +0 -0
  1036. /package/lib/{src/components → components}/Table/TableExpanderCell/TableExpanderCell.d.ts +0 -0
  1037. /package/lib/{src/components → components}/Table/TableExpanderCell/TableExpanderCellMobile.d.ts +0 -0
  1038. /package/lib/{src/components → components}/Table/TableExpanderCell/index.d.ts +0 -0
  1039. /package/lib/{src/components → components}/Table/TableHead/TableHead.d.ts +0 -0
  1040. /package/lib/{src/components → components}/Table/TableHead/index.d.ts +0 -0
  1041. /package/lib/{src/components → components}/Table/TableHeadCell/TableHeadCell.d.ts +0 -0
  1042. /package/lib/{src/components → components}/Table/TableHeadCell/index.d.ts +0 -0
  1043. /package/lib/{src/components → components}/Table/TableRow/TableRow.d.ts +0 -0
  1044. /package/lib/{src/components → components}/Table/TableRow/index.d.ts +0 -0
  1045. /package/lib/{src/components → components}/Table/constants.d.ts +0 -0
  1046. /package/lib/{src/components → components}/Table/utils.d.ts +0 -0
  1047. /package/lib/{src/components → components}/Tabs/Tab.d.ts +0 -0
  1048. /package/lib/{src/components → components}/Tabs/TabList/TabChevron.d.ts +0 -0
  1049. /package/lib/{src/components → components}/Tabs/TabList/TabItem.d.ts +0 -0
  1050. /package/lib/{src/components → components}/Tabs/TabList/TabList.d.ts +0 -0
  1051. /package/lib/{src/components → components}/Tabs/TabList/index.d.ts +0 -0
  1052. /package/lib/{src/components → components}/Tabs/TabPanel/TabPanel.d.ts +0 -0
  1053. /package/lib/{src/components → components}/Tabs/TabPanel/index.d.ts +0 -0
  1054. /package/lib/{src/components → components}/Tabs/Tabs.d.ts +0 -0
  1055. /package/lib/{src/components → components}/Tabs/index.d.ts +0 -0
  1056. /package/lib/{src/components → components}/Tabs/resourceHelper.d.ts +0 -0
  1057. /package/lib/{src/components → components}/Tag/Tag.d.ts +0 -0
  1058. /package/lib/{src/components → components}/Tag/constants.d.ts +0 -0
  1059. /package/lib/{src/components → components}/Tag/index.d.ts +0 -0
  1060. /package/lib/{src/components → components}/TagList/TagList.d.ts +0 -0
  1061. /package/lib/{src/components → components}/TagList/index.d.ts +0 -0
  1062. /package/lib/{src/components → components}/Textarea/Textarea.d.ts +0 -0
  1063. /package/lib/{src/components → components}/Textarea/index.d.ts +0 -0
  1064. /package/lib/{src/components → components}/Textarea/resourceHelper.d.ts +0 -0
  1065. /package/lib/{src/components → components}/Tile/Tile.d.ts +0 -0
  1066. /package/lib/{src/components → components}/Tile/index.d.ts +0 -0
  1067. /package/lib/{src/components → components}/Title/Title.d.ts +0 -0
  1068. /package/lib/{src/components → components}/Title/index.d.ts +0 -0
  1069. /package/lib/{src/components → components}/Title/utils.d.ts +0 -0
  1070. /package/lib/{src/components → components}/Toast/Toast.d.ts +0 -0
  1071. /package/lib/{src/components → components}/Toast/index.d.ts +0 -0
  1072. /package/lib/{src/components → components}/ToastList/ToastList.d.ts +0 -0
  1073. /package/lib/{src/components → components}/ToastList/index.d.ts +0 -0
  1074. /package/lib/{src/components → components}/Toggle/Toggle.d.ts +0 -0
  1075. /package/lib/{src/components → components}/Toggle/constants.d.ts +0 -0
  1076. /package/lib/{src/components → components}/Toggle/index.d.ts +0 -0
  1077. /package/lib/{src/components → components}/Validation/ErrorList.d.ts +0 -0
  1078. /package/lib/{src/components → components}/Validation/ErrorListItem.d.ts +0 -0
  1079. /package/lib/{src/components → components}/Validation/Validation.d.ts +0 -0
  1080. /package/lib/{src/components → components}/Validation/ValidationSummary.d.ts +0 -0
  1081. /package/lib/{src/components → components}/Validation/index.d.ts +0 -0
  1082. /package/lib/{src/components → components}/Validation/types.d.ts +0 -0
  1083. /package/lib/{src/constants.d.ts → constants.d.ts} +0 -0
  1084. /package/lib/{src/hoc → hoc}/withBreakpoint/index.d.ts +0 -0
  1085. /package/lib/{src/hoc → hoc}/withBreakpoint/withBreakpoint.d.ts +0 -0
  1086. /package/lib/{src/hooks → hooks}/useBreakpoint.d.ts +0 -0
  1087. /package/lib/{src/hooks → hooks}/useElementList.d.ts +0 -0
  1088. /package/lib/{src/hooks → hooks}/useEventListenerState.d.ts +0 -0
  1089. /package/lib/{src/hooks → hooks}/useExpand.d.ts +0 -0
  1090. /package/lib/{src/hooks → hooks}/useFocusToggle.d.ts +0 -0
  1091. /package/lib/{src/hooks → hooks}/useFocusTrap.d.ts +0 -0
  1092. /package/lib/{src/hooks → hooks}/useFocusableElements.d.ts +0 -0
  1093. /package/lib/{src/hooks → hooks}/useIcons.d.ts +0 -0
  1094. /package/lib/{src/hooks → hooks}/useIdWithFallback.d.ts +0 -0
  1095. /package/lib/{src/hooks → hooks}/useIntersectionObserver.d.ts +0 -0
  1096. /package/lib/{src/hooks → hooks}/useInterval.d.ts +0 -0
  1097. /package/lib/{src/hooks → hooks}/useIsMobileBreakpoint.d.ts +0 -0
  1098. /package/lib/{src/hooks → hooks}/useIsServerSide.d.ts +0 -0
  1099. /package/lib/{src/hooks → hooks}/useIsVisible.d.ts +0 -0
  1100. /package/lib/{src/hooks → hooks}/useKeyboardEvent.d.ts +0 -0
  1101. /package/lib/{src/hooks → hooks}/useLanguage.d.ts +0 -0
  1102. /package/lib/{src/hooks → hooks}/useLayoutEvent.d.ts +0 -0
  1103. /package/lib/{src/hooks → hooks}/useOutsideEvent.d.ts +0 -0
  1104. /package/lib/{src/hooks → hooks}/usePrevious.d.ts +0 -0
  1105. /package/lib/{src/hooks → hooks}/usePseudoClasses.d.ts +0 -0
  1106. /package/lib/{src/hooks → hooks}/useResizeObserver.d.ts +0 -0
  1107. /package/lib/{src/hooks → hooks}/useReturnFocusOnUnmount.d.ts +0 -0
  1108. /package/lib/{src/hooks → hooks}/useRovingFocus.d.ts +0 -0
  1109. /package/lib/{src/hooks → hooks}/useSize.d.ts +0 -0
  1110. /package/lib/{src/hooks → hooks}/useToggle.d.ts +0 -0
  1111. /package/lib/{src/hooks → hooks}/usestopPropagation.d.ts +0 -0
  1112. /package/lib/{src/theme → theme}/currys/color.d.ts +0 -0
  1113. /package/lib/{src/theme → theme}/currys/index.d.ts +0 -0
  1114. /package/lib/{src/theme → theme}/currys/spacing.d.ts +0 -0
  1115. /package/lib/{src/theme → theme}/grid.d.ts +0 -0
  1116. /package/lib/{src/theme → theme}/index.d.ts +0 -0
  1117. /package/lib/{src/theme → theme}/palette.d.ts +0 -0
  1118. /package/lib/{src/theme → theme}/spacers.d.ts +0 -0
  1119. /package/lib/{src/utils → utils}/accessibility.d.ts +0 -0
  1120. /package/lib/{src/utils → utils}/component.d.ts +0 -0
  1121. /package/lib/{src/utils → utils}/debounce.d.ts +0 -0
  1122. /package/lib/{src/utils → utils}/deepContains.d.ts +0 -0
  1123. /package/lib/{src/utils → utils}/device.d.ts +0 -0
  1124. /package/lib/{src/utils → utils}/environment.d.ts +0 -0
  1125. /package/lib/{src/utils → utils}/focus.d.ts +0 -0
  1126. /package/lib/{src/utils → utils}/language.d.ts +0 -0
  1127. /package/lib/{src/utils → utils}/loremtext.d.ts +0 -0
  1128. /package/lib/{src/utils → utils}/mobile.d.ts +0 -0
  1129. /package/lib/{src/utils → utils}/refs.d.ts +0 -0
  1130. /package/lib/{src/utils → utils}/scroll.d.ts +0 -0
  1131. /package/lib/{src/utils → utils}/tests/setup-test.d.ts +0 -0
  1132. /package/lib/{src/utils → utils}/uuid.d.ts +0 -0
  1133. /package/lib/{src/utils → utils}/viewport.d.ts +0 -0
package/lib/AnchorLink.js CHANGED
@@ -4,14 +4,14 @@ import { t as getColor } from "./color.js";
4
4
  import { t as AsChildSlot_default } from "./AsChildSlot.js";
5
5
  import { t as Icon_default } from "./Icon.js";
6
6
  import { t as ArrowUpRight_default } from "./ArrowUpRight.js";
7
- import cn from "classnames";
7
+ import classNames from "classnames";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  import AnchorLinkStyles from "./components/AnchorLink/styles.module.scss";
10
10
  var AnchorLink = (props) => {
11
11
  const { asChild, id, href, children, className, target = "_self", htmlMarkup = "a", onClick, testId, ref } = props;
12
12
  const external = target === "_blank";
13
13
  const { refObject, isHovered } = usePseudoClasses(ref);
14
- const anchorClasses = cn(AnchorLinkStyles.anchorlink, className);
14
+ const anchorClasses = classNames(AnchorLinkStyles.anchorlink, className);
15
15
  const commonProps = {
16
16
  id,
17
17
  ["data-testid"]: testId,
@@ -1 +1 @@
1
- {"version":3,"file":"AnchorLink.js","names":["AnchorLink: React.FC<AnchorLinkProps>"],"sources":["../src/components/AnchorLink/AnchorLink.tsx","../src/components/AnchorLink/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys';\nimport AsChildSlot from '../AsChildSlot';\nimport Icon, { IconSize } from '../Icon';\nimport ArrowUpRight from '../Icons/ArrowUpRight';\n\nimport AnchorLinkStyles from './styles.module.scss';\n\nexport type AnchorLinkTargets = '_self' | '_blank' | '_parent';\n\nexport type AnchorLinkTags = 'a' | 'button';\n\nexport type AnchorLinkOnClickEvent =\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.FormEvent<unknown>\n | React.KeyboardEvent<HTMLUListElement>\n | null;\n\nexport interface AnchorLinkProps {\n /** When true, onclick and keyboard events will be passed to the child. */\n asChild?: boolean;\n /** Sets the content of the <a> tag */\n children: React.ReactNode;\n /** URL to link to */\n href?: string;\n /** Gives a unique id to the anchor-link :) */\n id?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the target type of the <a> tag. _blank adds an arrow icon at the end of the link */\n target?: AnchorLinkTargets;\n /** HTML markup for anchor link. Default: a */\n htmlMarkup?: AnchorLinkTags;\n /** Function that is called when clicked */\n onClick?: (e?: AnchorLinkOnClickEvent) => void;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref that is passed to the component */\n ref?: React.Ref<HTMLAnchorElement | HTMLButtonElement | null>;\n}\n\nconst AnchorLink: React.FC<AnchorLinkProps> = props => {\n const { asChild, id, href, children, className, target = '_self', htmlMarkup = 'a', onClick, testId, ref } = props;\n const external = target === '_blank';\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | HTMLAnchorElement>(\n ref as React.RefObject<HTMLButtonElement | HTMLAnchorElement>\n );\n const anchorClasses = classNames(AnchorLinkStyles.anchorlink, className);\n\n const commonProps = {\n id,\n ['data-testid']: testId,\n ['data-analyticsid']: AnalyticsId.AnchorLink,\n onClick,\n };\n\n const renderContent = (): React.ReactElement => (\n <>\n {children}\n {external && (\n <Icon\n className={AnchorLinkStyles.anchorlink__icon}\n svgIcon={ArrowUpRight}\n color={getColor('blueberry', 600)}\n hoverColor={getColor('blueberry', 700)}\n size={IconSize.XSmall}\n isHovered={isHovered}\n />\n )}\n </>\n );\n\n if (asChild) {\n return (\n <AsChildSlot content={<span className={anchorClasses} />} className={AnchorLinkStyles['anchorlink-wrapper']} elementRef={refObject}>\n {children}\n </AsChildSlot>\n );\n }\n\n if (htmlMarkup === 'a') {\n return (\n <a\n href={href}\n target={target}\n className={anchorClasses}\n rel={external ? 'noopener noreferrer' : undefined}\n ref={refObject as React.RefObject<HTMLAnchorElement>}\n {...commonProps}\n >\n {renderContent()}\n </a>\n );\n }\n\n return (\n <button\n type=\"button\"\n className={AnchorLinkStyles['anchorlink-wrapper']}\n ref={refObject as React.RefObject<HTMLButtonElement>}\n {...commonProps}\n >\n <span className={anchorClasses}>{renderContent()}</span>\n </button>\n );\n};\n\nexport default AnchorLink;\n","import AnchorLink from './AnchorLink';\nexport * from './AnchorLink';\nexport default AnchorLink;\n"],"mappings":";;;;;;;;;AA4CA,IAAMA,cAAwC,UAAS;CACrD,MAAM,EAAE,SAAS,IAAI,MAAM,UAAU,WAAW,SAAS,SAAS,aAAa,KAAK,SAAS,QAAQ,QAAQ;CAC7G,MAAM,WAAW,WAAW;CAC5B,MAAM,EAAE,WAAW,cAAc,iBAC/B,IACD;CACD,MAAM,gBAAgB,GAAW,iBAAiB,YAAY,UAAU;CAExE,MAAM,cAAc;EAClB;GACC,gBAAgB;GAChB,qBAAqB,YAAY;EAClC;EACD;CAED,MAAM,sBACJ,qBAAA,UAAA,EAAA,UAAA,CACG,UACA,YACC,oBAAC,cAAA;EACC,WAAW,iBAAiB;EAC5B,SAAS;EACT,OAAO,SAAS,aAAa,IAAI;EACjC,YAAY,SAAS,aAAa,IAAI;EACtC,MAAM,SAAS;EACJ;GACX,CAAA,EAAA,CAEH;AAGL,KAAI,QACF,QACE,oBAAC,qBAAA;EAAY,SAAS,oBAAC,QAAA,EAAK,WAAW,eAAA,CAAiB;EAAE,WAAW,iBAAiB;EAAuB,YAAY;EACtH;GACW;AAIlB,KAAI,eAAe,IACjB,QACE,oBAAC,KAAA;EACO;EACE;EACR,WAAW;EACX,KAAK,WAAW,wBAAwB,KAAA;EACxC,KAAK;EACL,GAAI;YAEH,eAAe;GACd;AAIR,QACE,oBAAC,UAAA;EACC,MAAK;EACL,WAAW,iBAAiB;EAC5B,KAAK;EACL,GAAI;YAEJ,oBAAC,QAAA;GAAK,WAAW;aAAgB,eAAe;IAAQ;GACjD;;ACxGb,IAAA,uBD4Ge"}
1
+ {"version":3,"file":"AnchorLink.js","names":["AnchorLink: React.FC<AnchorLinkProps>"],"sources":["../src/components/AnchorLink/AnchorLink.tsx","../src/components/AnchorLink/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys';\nimport AsChildSlot from '../AsChildSlot';\nimport Icon, { IconSize } from '../Icon';\nimport ArrowUpRight from '../Icons/ArrowUpRight';\n\nimport AnchorLinkStyles from './styles.module.scss';\n\nexport type AnchorLinkTargets = '_self' | '_blank' | '_parent';\n\nexport type AnchorLinkTags = 'a' | 'button';\n\nexport type AnchorLinkOnClickEvent =\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.FormEvent<unknown>\n | React.KeyboardEvent<HTMLUListElement>\n | null;\n\nexport interface AnchorLinkProps {\n /** When true, onclick and keyboard events will be passed to the child. */\n asChild?: boolean;\n /** Sets the content of the <a> tag */\n children: React.ReactNode;\n /** URL to link to */\n href?: string;\n /** Gives a unique id to the anchor-link :) */\n id?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the target type of the <a> tag. _blank adds an arrow icon at the end of the link */\n target?: AnchorLinkTargets;\n /** HTML markup for anchor link. Default: a */\n htmlMarkup?: AnchorLinkTags;\n /** Function that is called when clicked */\n onClick?: (e?: AnchorLinkOnClickEvent) => void;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref that is passed to the component */\n ref?: React.Ref<HTMLAnchorElement | HTMLButtonElement | null>;\n}\n\nconst AnchorLink: React.FC<AnchorLinkProps> = props => {\n const { asChild, id, href, children, className, target = '_self', htmlMarkup = 'a', onClick, testId, ref } = props;\n const external = target === '_blank';\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | HTMLAnchorElement>(\n ref as React.RefObject<HTMLButtonElement | HTMLAnchorElement>\n );\n const anchorClasses = classNames(AnchorLinkStyles.anchorlink, className);\n\n const commonProps = {\n id,\n ['data-testid']: testId,\n ['data-analyticsid']: AnalyticsId.AnchorLink,\n onClick,\n };\n\n const renderContent = (): React.ReactElement => (\n <>\n {children}\n {external && (\n <Icon\n className={AnchorLinkStyles.anchorlink__icon}\n svgIcon={ArrowUpRight}\n color={getColor('blueberry', 600)}\n hoverColor={getColor('blueberry', 700)}\n size={IconSize.XSmall}\n isHovered={isHovered}\n />\n )}\n </>\n );\n\n if (asChild) {\n return (\n <AsChildSlot content={<span className={anchorClasses} />} className={AnchorLinkStyles['anchorlink-wrapper']} elementRef={refObject}>\n {children}\n </AsChildSlot>\n );\n }\n\n if (htmlMarkup === 'a') {\n return (\n <a\n href={href}\n target={target}\n className={anchorClasses}\n rel={external ? 'noopener noreferrer' : undefined}\n ref={refObject as React.RefObject<HTMLAnchorElement>}\n {...commonProps}\n >\n {renderContent()}\n </a>\n );\n }\n\n return (\n <button\n type=\"button\"\n className={AnchorLinkStyles['anchorlink-wrapper']}\n ref={refObject as React.RefObject<HTMLButtonElement>}\n {...commonProps}\n >\n <span className={anchorClasses}>{renderContent()}</span>\n </button>\n );\n};\n\nexport default AnchorLink;\n","import AnchorLink from './AnchorLink';\nexport * from './AnchorLink';\nexport default AnchorLink;\n"],"mappings":";;;;;;;;;AA4CA,IAAMA,cAAwC,UAAS;CACrD,MAAM,EAAE,SAAS,IAAI,MAAM,UAAU,WAAW,SAAS,SAAS,aAAa,KAAK,SAAS,QAAQ,QAAQ;CAC7G,MAAM,WAAW,WAAW;CAC5B,MAAM,EAAE,WAAW,cAAc,iBAC/B,IACD;CACD,MAAM,gBAAgB,WAAW,iBAAiB,YAAY,UAAU;CAExE,MAAM,cAAc;EAClB;GACC,gBAAgB;GAChB,qBAAqB,YAAY;EAClC;EACD;CAED,MAAM,sBACJ,qBAAA,UAAA,EAAA,UAAA,CACG,UACA,YACC,oBAAC,cAAA;EACC,WAAW,iBAAiB;EAC5B,SAAS;EACT,OAAO,SAAS,aAAa,IAAI;EACjC,YAAY,SAAS,aAAa,IAAI;EACtC,MAAM,SAAS;EACJ;GACX,CAAA,EAAA,CAEH;AAGL,KAAI,QACF,QACE,oBAAC,qBAAA;EAAY,SAAS,oBAAC,QAAA,EAAK,WAAW,eAAA,CAAiB;EAAE,WAAW,iBAAiB;EAAuB,YAAY;EACtH;GACW;AAIlB,KAAI,eAAe,IACjB,QACE,oBAAC,KAAA;EACO;EACE;EACR,WAAW;EACX,KAAK,WAAW,wBAAwB,KAAA;EACxC,KAAK;EACL,GAAI;YAEH,eAAe;GACd;AAIR,QACE,oBAAC,UAAA;EACC,MAAK;EACL,WAAW,iBAAiB;EAC5B,KAAK;EACL,GAAI;YAEJ,oBAAC,QAAA;GAAK,WAAW;aAAgB,eAAe;IAAQ;GACjD;;ACxGb,IAAA,uBD4Ge"}
package/lib/Avatar.js CHANGED
@@ -2,7 +2,7 @@ import { a as IconSize, n as AnalyticsId } from "./constants2.js";
2
2
  import { t as palette } from "./palette.js";
3
3
  import { t as Icon_default } from "./Icon.js";
4
4
  import { t as Check_default } from "./Check.js";
5
- import cn from "classnames";
5
+ import classNames from "classnames";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import styles from "./components/Avatar/styles.module.scss";
8
8
  let AvatarSize = /* @__PURE__ */ function(AvatarSize$1) {
@@ -14,7 +14,7 @@ var Avatar = (props) => {
14
14
  const { children, className = "", selected = false, color = "blueberry", variant = "square", size = AvatarSize.small, testId, ref } = props;
15
15
  const truncatedName = children.charAt(0).toLocaleUpperCase() + children.substring(1, 2);
16
16
  return /* @__PURE__ */ jsx("span", {
17
- className: cn(styles.avatar, selected && styles["avatar--selected"], color === "black" && styles["avatar--black"], variant === "circle" && styles["avatar--circle"], size === AvatarSize.xsmall && styles["avatar--xsmall"], size === AvatarSize.small && styles["avatar--small"], className),
17
+ className: classNames(styles.avatar, selected && styles["avatar--selected"], color === "black" && styles["avatar--black"], variant === "circle" && styles["avatar--circle"], size === AvatarSize.xsmall && styles["avatar--xsmall"], size === AvatarSize.small && styles["avatar--small"], className),
18
18
  ref,
19
19
  "data-testid": testId,
20
20
  "data-analyticsid": AnalyticsId.Avatar,
package/lib/Avatar.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","names":["Avatar: React.FC<AvatarProps>"],"sources":["../src/components/Avatar/constants.ts","../src/components/Avatar/Avatar.tsx","../src/components/Avatar/index.ts"],"sourcesContent":["export enum AvatarSize {\n xsmall = 'xsmall',\n small = 'small',\n}\n","import cn from 'classnames';\n\nimport { AvatarSize } from './constants';\nimport { AnalyticsId } from '../../constants';\nimport { palette } from '../../theme/palette';\nimport Icon, { IconSize } from '../Icon';\nimport Check from '../Icons/Check';\n\nimport styles from './styles.module.scss';\n\nexport interface AvatarProps {\n /** Name to display in the avatar. Will be truncated to the first two characters. */\n children: string;\n /** Displays a check icon to indicated the selected state. */\n selected?: boolean;\n /** Sets blue or black color on avatar. */\n color?: 'blueberry' | 'black';\n /** Square or circle variant of avatar. The circle should only be used for representation of someone else. NB: This is temporary and will be renamed in v10 */\n variant?: 'square' | 'circle';\n /** Avatar size. Default: small */\n size?: keyof typeof AvatarSize;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the root element */\n ref?: React.Ref<HTMLElement | null>;\n}\nexport type AvatarType = typeof Avatar;\nconst Avatar: React.FC<AvatarProps> = (props: AvatarProps) => {\n const {\n children,\n className = '',\n selected = false,\n color = 'blueberry',\n variant = 'square',\n size = AvatarSize.small,\n testId,\n ref,\n } = props;\n const truncatedName = children.charAt(0).toLocaleUpperCase() + children.substring(1, 2);\n return (\n <span\n className={cn(\n styles.avatar,\n selected && styles['avatar--selected'],\n color === 'black' && styles['avatar--black'],\n variant === 'circle' && styles['avatar--circle'],\n size === AvatarSize.xsmall && styles['avatar--xsmall'],\n size === AvatarSize.small && styles['avatar--small'],\n className\n )}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Avatar}\n >\n {selected ? (\n <Icon svgIcon={Check} size={IconSize.Small} color={color === 'black' ? palette.neutral900 : palette.blueberry600} />\n ) : (\n truncatedName\n )}\n </span>\n );\n};\n\nexport default Avatar;\n","import Avatar from './Avatar';\nexport { AvatarSize } from './constants';\nexport * from './Avatar';\nexport default Avatar;\n"],"mappings":";;;;;;;AAAA,IAAY,aAAA,yBAAA,cAAL;AACL,cAAA,YAAA;AACA,cAAA,WAAA;;;AC2BF,IAAMA,UAAiC,UAAuB;CAC5D,MAAM,EACJ,UACA,YAAY,IACZ,WAAW,OACX,QAAQ,aACR,UAAU,UACV,OAAO,WAAW,OAClB,QACA,QACE;CACJ,MAAM,gBAAgB,SAAS,OAAO,EAAE,CAAC,mBAAmB,GAAG,SAAS,UAAU,GAAG,EAAE;AACvF,QACE,oBAAC,QAAA;EACC,WAAW,GACT,OAAO,QACP,YAAY,OAAO,qBACnB,UAAU,WAAW,OAAO,kBAC5B,YAAY,YAAY,OAAO,mBAC/B,SAAS,WAAW,UAAU,OAAO,mBACrC,SAAS,WAAW,SAAS,OAAO,kBACpC,UACD;EACI;EACL,eAAa;EACb,oBAAkB,YAAY;YAE7B,WACC,oBAAC,cAAA;GAAK,SAAS;GAAO,MAAM,SAAS;GAAO,OAAO,UAAU,UAAU,QAAQ,aAAa,QAAQ;IAAgB,GAEpH;GAEG;;AC1DX,IAAA,mBD8De"}
1
+ {"version":3,"file":"Avatar.js","names":["Avatar: React.FC<AvatarProps>"],"sources":["../src/components/Avatar/constants.ts","../src/components/Avatar/Avatar.tsx","../src/components/Avatar/index.ts"],"sourcesContent":["export enum AvatarSize {\n xsmall = 'xsmall',\n small = 'small',\n}\n","import cn from 'classnames';\n\nimport { AvatarSize } from './constants';\nimport { AnalyticsId } from '../../constants';\nimport { palette } from '../../theme/palette';\nimport Icon, { IconSize } from '../Icon';\nimport Check from '../Icons/Check';\n\nimport styles from './styles.module.scss';\n\nexport interface AvatarProps {\n /** Name to display in the avatar. Will be truncated to the first two characters. */\n children: string;\n /** Displays a check icon to indicated the selected state. */\n selected?: boolean;\n /** Sets blue or black color on avatar. */\n color?: 'blueberry' | 'black';\n /** Square or circle variant of avatar. The circle should only be used for representation of someone else. NB: This is temporary and will be renamed in v10 */\n variant?: 'square' | 'circle';\n /** Avatar size. Default: small */\n size?: keyof typeof AvatarSize;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the root element */\n ref?: React.Ref<HTMLElement | null>;\n}\nexport type AvatarType = typeof Avatar;\nconst Avatar: React.FC<AvatarProps> = (props: AvatarProps) => {\n const {\n children,\n className = '',\n selected = false,\n color = 'blueberry',\n variant = 'square',\n size = AvatarSize.small,\n testId,\n ref,\n } = props;\n const truncatedName = children.charAt(0).toLocaleUpperCase() + children.substring(1, 2);\n return (\n <span\n className={cn(\n styles.avatar,\n selected && styles['avatar--selected'],\n color === 'black' && styles['avatar--black'],\n variant === 'circle' && styles['avatar--circle'],\n size === AvatarSize.xsmall && styles['avatar--xsmall'],\n size === AvatarSize.small && styles['avatar--small'],\n className\n )}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Avatar}\n >\n {selected ? (\n <Icon svgIcon={Check} size={IconSize.Small} color={color === 'black' ? palette.neutral900 : palette.blueberry600} />\n ) : (\n truncatedName\n )}\n </span>\n );\n};\n\nexport default Avatar;\n","import Avatar from './Avatar';\nexport { AvatarSize } from './constants';\nexport * from './Avatar';\nexport default Avatar;\n"],"mappings":";;;;;;;AAAA,IAAY,aAAA,yBAAA,cAAL;AACL,cAAA,YAAA;AACA,cAAA,WAAA;;;AC2BF,IAAMA,UAAiC,UAAuB;CAC5D,MAAM,EACJ,UACA,YAAY,IACZ,WAAW,OACX,QAAQ,aACR,UAAU,UACV,OAAO,WAAW,OAClB,QACA,QACE;CACJ,MAAM,gBAAgB,SAAS,OAAO,EAAE,CAAC,mBAAmB,GAAG,SAAS,UAAU,GAAG,EAAE;AACvF,QACE,oBAAC,QAAA;EACC,WAAW,WACT,OAAO,QACP,YAAY,OAAO,qBACnB,UAAU,WAAW,OAAO,kBAC5B,YAAY,YAAY,OAAO,mBAC/B,SAAS,WAAW,UAAU,OAAO,mBACrC,SAAS,WAAW,SAAS,OAAO,kBACpC,UACD;EACI;EACL,eAAa;EACb,oBAAkB,YAAY;YAE7B,WACC,oBAAC,cAAA;GAAK,SAAS;GAAO,MAAM,SAAS;GAAO,OAAO,UAAU,UAAU,QAAQ,aAAa,QAAQ;IAAgB,GAEpH;GAEG;;AC1DX,IAAA,mBD8De"}
@@ -1,4 +1,4 @@
1
- import { t as ViewBoxSize } from "./utils3.js";
1
+ import { t as ViewBoxSize } from "./utils4.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  var BabyMobileMedium = ({ color, svgProperties, title }) => {
4
4
  const palette = (() => {
package/lib/Badge.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { a as IconSize, n as AnalyticsId } from "./constants2.js";
2
2
  import { t as NotificationBadge_default } from "./NotificationBadge.js";
3
- import cn from "classnames";
3
+ import classNames from "classnames";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import badgeStyles from "./components/Badge/styles.module.scss";
6
6
  var Badge = (props) => {
7
7
  const { children, className = "", color = "blueberry", testId, type = "string", notificationVariant = "info", ref } = props;
8
- const badgeClasses = cn(badgeStyles.badge, {
8
+ const badgeClasses = classNames(badgeStyles.badge, {
9
9
  [badgeStyles["badge--blueberry"]]: color === "blueberry",
10
10
  [badgeStyles["badge--cherry"]]: color === "cherry",
11
11
  [badgeStyles["badge--neutral"]]: color === "neutral"
package/lib/Badge.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","names":["Badge: React.FC<BadgeProps>"],"sources":["../src/components/Badge/Badge.tsx","../src/components/Badge/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { BadgeNotificationVariant } from './NotificationBadge';\nimport type { PaletteNames } from '../../theme/palette';\n\nimport NotificationBadge from './NotificationBadge';\nimport { AnalyticsId, IconSize } from '../../constants';\n\nimport badgeStyles from './styles.module.scss';\n\nexport type BadgeColors = Extract<PaletteNames, 'blueberry' | 'cherry' | 'neutral'>;\nexport type BadgeChildren = string | number;\nexport type BadgeVariant = 'string' | 'notification';\n\nexport interface BadgeProps {\n /** Sets the content of the badge. */\n children?: BadgeChildren;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the badge background color. */\n color?: BadgeColors;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Changes the type of the badge. Default: string */\n type?: BadgeVariant;\n /** Type of notification badge. Only works if type is 'notification'. */\n notificationVariant?: BadgeNotificationVariant;\n /** Ref passed to the root element */\n ref?: React.Ref<HTMLElement | null>;\n}\n\nexport type BadgeType = typeof Badge;\nconst Badge: React.FC<BadgeProps> = (props: BadgeProps) => {\n const { children, className = '', color = 'blueberry', testId, type = 'string', notificationVariant = 'info', ref } = props;\n const badgeClasses = classNames(\n badgeStyles.badge,\n {\n [badgeStyles['badge--blueberry']]: color === 'blueberry',\n [badgeStyles['badge--cherry']]: color === 'cherry',\n [badgeStyles['badge--neutral']]: color === 'neutral',\n },\n className\n );\n\n if (type === 'notification' && notificationVariant !== undefined) {\n return (\n <NotificationBadge\n variant={notificationVariant}\n size={IconSize.XSmall}\n className={className}\n testId={testId}\n data-analyticsid={AnalyticsId.Badge}\n />\n );\n }\n\n return (\n <span className={badgeClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Badge}>\n {children}\n </span>\n );\n};\n\nexport default Badge;\n","import Badge from './Badge';\nexport * from './Badge';\nexport default Badge;\n"],"mappings":";;;;;AAgCA,IAAMA,SAA+B,UAAsB;CACzD,MAAM,EAAE,UAAU,YAAY,IAAI,QAAQ,aAAa,QAAQ,OAAO,UAAU,sBAAsB,QAAQ,QAAQ;CACtH,MAAM,eAAe,GACnB,YAAY,OACZ;GACG,YAAY,sBAAsB,UAAU;GAC5C,YAAY,mBAAmB,UAAU;GACzC,YAAY,oBAAoB,UAAU;EAC5C,EACD,UACD;AAED,KAAI,SAAS,kBAAkB,wBAAwB,KAAA,EACrD,QACE,oBAAC,2BAAA;EACC,SAAS;EACT,MAAM,SAAS;EACJ;EACH;EACR,oBAAkB,YAAY;GAC9B;AAIN,QACE,oBAAC,QAAA;EAAK,WAAW;EAAmB;EAAK,eAAa;EAAQ,oBAAkB,YAAY;EACzF;GACI;;ACzDX,IAAA,kBD6De"}
1
+ {"version":3,"file":"Badge.js","names":["Badge: React.FC<BadgeProps>"],"sources":["../src/components/Badge/Badge.tsx","../src/components/Badge/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { BadgeNotificationVariant } from './NotificationBadge';\nimport type { PaletteNames } from '../../theme/palette';\n\nimport NotificationBadge from './NotificationBadge';\nimport { AnalyticsId, IconSize } from '../../constants';\n\nimport badgeStyles from './styles.module.scss';\n\nexport type BadgeColors = Extract<PaletteNames, 'blueberry' | 'cherry' | 'neutral'>;\nexport type BadgeChildren = string | number;\nexport type BadgeVariant = 'string' | 'notification';\n\nexport interface BadgeProps {\n /** Sets the content of the badge. */\n children?: BadgeChildren;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the badge background color. */\n color?: BadgeColors;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Changes the type of the badge. Default: string */\n type?: BadgeVariant;\n /** Type of notification badge. Only works if type is 'notification'. */\n notificationVariant?: BadgeNotificationVariant;\n /** Ref passed to the root element */\n ref?: React.Ref<HTMLElement | null>;\n}\n\nexport type BadgeType = typeof Badge;\nconst Badge: React.FC<BadgeProps> = (props: BadgeProps) => {\n const { children, className = '', color = 'blueberry', testId, type = 'string', notificationVariant = 'info', ref } = props;\n const badgeClasses = classNames(\n badgeStyles.badge,\n {\n [badgeStyles['badge--blueberry']]: color === 'blueberry',\n [badgeStyles['badge--cherry']]: color === 'cherry',\n [badgeStyles['badge--neutral']]: color === 'neutral',\n },\n className\n );\n\n if (type === 'notification' && notificationVariant !== undefined) {\n return (\n <NotificationBadge\n variant={notificationVariant}\n size={IconSize.XSmall}\n className={className}\n testId={testId}\n data-analyticsid={AnalyticsId.Badge}\n />\n );\n }\n\n return (\n <span className={badgeClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Badge}>\n {children}\n </span>\n );\n};\n\nexport default Badge;\n","import Badge from './Badge';\nexport * from './Badge';\nexport default Badge;\n"],"mappings":";;;;;AAgCA,IAAMA,SAA+B,UAAsB;CACzD,MAAM,EAAE,UAAU,YAAY,IAAI,QAAQ,aAAa,QAAQ,OAAO,UAAU,sBAAsB,QAAQ,QAAQ;CACtH,MAAM,eAAe,WACnB,YAAY,OACZ;GACG,YAAY,sBAAsB,UAAU;GAC5C,YAAY,mBAAmB,UAAU;GACzC,YAAY,oBAAoB,UAAU;EAC5C,EACD,UACD;AAED,KAAI,SAAS,kBAAkB,wBAAwB,KAAA,EACrD,QACE,oBAAC,2BAAA;EACC,SAAS;EACT,MAAM,SAAS;EACJ;EACH;EACR,oBAAkB,YAAY;GAC9B;AAIN,QACE,oBAAC,QAAA;EAAK,WAAW;EAAmB;EAAK,eAAa;EAAQ,oBAAkB,YAAY;EACzF;GACI;;ACzDX,IAAA,kBD6De"}
package/lib/Button.js CHANGED
@@ -6,7 +6,7 @@ import { t as Icon_default } from "./Icon.js";
6
6
  import { t as useIcons } from "./useIcons.js";
7
7
  import { t as useIsMobileBreakpoint } from "./useIsMobileBreakpoint.js";
8
8
  import { t as ArrowRight_default } from "./ArrowRight.js";
9
- import cn from "classnames";
9
+ import classNames from "classnames";
10
10
  import React, { useEffect, useRef } from "react";
11
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
12
  import buttonStyles from "./components/Button/styles.module.scss";
@@ -41,8 +41,8 @@ var Button = (props) => {
41
41
  const large = size === "large" && !destructive && !borderlessVariant;
42
42
  const hasUURightArrow = arrow === "accessibility-character" && !fluid && !leftIcon && !rightIcon && !hasArrow && borderlessVariant;
43
43
  const rest = { ...restProps };
44
- const buttonWrapperClasses = cn(buttonStyles["button-wrapper"], { [buttonStyles["button-wrapper--fluid"]]: fluid || ellipsis }, wrapperClassName);
45
- const buttonClasses = cn(buttonStyles.button, {
44
+ const buttonWrapperClasses = classNames(buttonStyles["button-wrapper"], { [buttonStyles["button-wrapper--fluid"]]: fluid || ellipsis }, wrapperClassName);
45
+ const buttonClasses = classNames(buttonStyles.button, {
46
46
  [buttonStyles["button--destructive"]]: destructive,
47
47
  [buttonStyles["button--normal"]]: !large,
48
48
  [buttonStyles["button--large"]]: large,
@@ -55,11 +55,11 @@ var Button = (props) => {
55
55
  [buttonStyles["button--arrow"]]: hasArrow,
56
56
  [buttonStyles["button--on-dark"]]: onDark
57
57
  }, className);
58
- const buttonTextClasses = cn(buttonStyles["button__text"], {
58
+ const buttonTextClasses = classNames(buttonStyles["button__text"], {
59
59
  [buttonStyles["button__text--ellipsis"]]: ellipsis,
60
60
  [buttonStyles["button__text--centered"]]: fluid && textPosition === "centered"
61
61
  }, textClassName);
62
- const diagonalClasses = cn(buttonStyles["diagonal"], { [buttonStyles["diagonal--on-dark"]]: onDark });
62
+ const diagonalClasses = classNames(buttonStyles["diagonal"], { [buttonStyles["diagonal--on-dark"]]: onDark });
63
63
  useEffect(() => {
64
64
  checkOnlyIconAria(onlyIcon, ariaLabel, !isTest() && !isProd());
65
65
  }, []);
@@ -86,7 +86,7 @@ var Button = (props) => {
86
86
  children: [
87
87
  renderIcon(leftIcon, getLargeIconSize(large, isMobile), !onlyIcon ? buttonStyles["button__left-icon"] : void 0),
88
88
  renderButtonContent(),
89
- hasArrow ? renderIcon(/* @__PURE__ */ jsx(Icon_default, { svgIcon: ArrowRight_default }), getLargeIconSize(large, isMobile), cn(buttonStyles["button__arrow"], { [buttonStyles["button__arrow--both-icons"]]: bothIcons })) : renderIcon(rightIcon, getLargeIconSize(large, isMobile), buttonStyles["button__right-icon"]),
89
+ hasArrow ? renderIcon(/* @__PURE__ */ jsx(Icon_default, { svgIcon: ArrowRight_default }), getLargeIconSize(large, isMobile), classNames(buttonStyles["button__arrow"], { [buttonStyles["button__arrow--both-icons"]]: bothIcons })) : renderIcon(rightIcon, getLargeIconSize(large, isMobile), buttonStyles["button__right-icon"]),
90
90
  hasUURightArrow && /* @__PURE__ */ jsx("span", {
91
91
  style: { color: iconColor },
92
92
  className: buttonStyles["button__right-unicode-arrow"],
package/lib/Button.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":["Button: React.FC<ButtonProps>"],"sources":["../src/components/Button/Button.tsx","../src/components/Button/index.ts"],"sourcesContent":["import React, { type AriaAttributes, useEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Icon, { IconSize } from './../Icon';\nimport { type HTMLButtonProps, type HTMLAnchorProps, AnalyticsId } from '../../constants';\nimport { type BaseIconElement, useIcons } from '../../hooks/useIcons';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys/color';\nimport { isTest, isProd } from '../../utils/environment';\nimport ArrowRight from '../Icons/ArrowRight';\n\nimport buttonStyles from './styles.module.scss';\n\nexport type ButtonConcept = 'normal' | 'destructive';\nexport type ButtonVariant = 'fill' | 'outline' | 'borderless';\nexport type ButtonSize = 'medium' | 'large';\nexport type ButtonOnColor = 'onlight' | 'ondark';\nexport type ButtonTags = 'button' | 'a';\nexport type ButtonArrows = 'icon' | 'accessibility-character';\nexport type ButtonTextPosition = 'left' | 'centered';\n\nexport interface ButtonProps extends Omit<HTMLButtonProps, 'onClick' | 'type'>, Omit<HTMLAnchorProps, 'onClick'>, AriaAttributes {\n /** Sets the aria-label of the button, use when the button only includes an icon */\n ariaLabel?: string;\n /** Gives a unique id to the button */\n id?: string;\n /** Sets the content of the button. */\n children: React.ReactNode;\n /** Adds custom classes to the wrapper element. */\n wrapperClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Enables an arrow icon to the right inside the button (Not available in borderless variant) */\n arrow?: ButtonArrows;\n /** Changes the intent of the button. Mostly changes the color profile. */\n concept?: ButtonConcept;\n /** Disables text wrapping and enables ellipsis. */\n ellipsis?: boolean;\n /** Makes the button scale to full width of its parent element. */\n fluid?: boolean;\n /** Changes the underlying element of the button. */\n htmlMarkup?: ButtonTags;\n /** Changes the button colors for different backgrounds. */\n onColor?: ButtonOnColor;\n /** Function that is called when the Button loses focus */\n onBlur?: () => void;\n /** Function that is called when clicked */\n onClick?: (\n e?: React.MouseEvent<HTMLElement, MouseEvent> | React.FormEvent<unknown> | React.KeyboardEvent<HTMLUListElement> | null\n ) => void;\n /** Changes the button colors for different backgrounds. (Large not available in borderless variant) */\n size?: ButtonSize;\n /** Changes the visual representation of the button. */\n variant?: ButtonVariant;\n /** Specifies the focus order relative to the other buttons or controls on the page */\n tabIndex?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Adds custom classes to the text */\n textClassName?: string;\n /** Sets the position of the text in the button - only applies when button is fluid */\n textPosition?: ButtonTextPosition;\n /** Button type. Default: button */\n type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];\n /** Ref that is passed to the component */\n ref?: React.RefObject<HTMLButtonElement | HTMLAnchorElement | null>;\n}\n\nconst getIconColor = (\n fill: boolean,\n borderless: boolean,\n disabled: boolean,\n concept: ButtonConcept,\n ondark: boolean,\n mobile: boolean\n): string => {\n if (mobile && disabled) {\n return !ondark || fill ? getColor('neutral', !borderless ? 700 : 500) : getColor('white');\n }\n if (disabled) {\n return !ondark || fill ? getColor('neutral', 500) : `${getColor('white')}b3`;\n }\n if ((fill && !ondark) || (!fill && ondark)) {\n return 'white';\n }\n\n return concept === 'normal' ? getColor('blueberry', 600) : getColor('cherry', 500);\n};\nconst getLargeIconSize = (large: boolean, mobile: boolean): IconSize => {\n if (mobile && large) return IconSize.Small;\n if (large) return IconSize.Medium;\n return IconSize.XSmall;\n};\n\nconst checkOnlyIconAria = (onlyIcon: boolean, ariaLabel: string | undefined, devEnv: boolean): void => {\n if (devEnv && onlyIcon && (ariaLabel === undefined || ariaLabel === '')) {\n throw new Error('Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav');\n }\n};\n\nconst Button: React.FC<ButtonProps> = props => {\n const {\n ariaLabel,\n id,\n children,\n wrapperClassName,\n className,\n arrow,\n concept = 'normal',\n disabled = false,\n ellipsis = false,\n fluid = false,\n htmlMarkup = 'button',\n onColor = 'onlight',\n onBlur,\n onClick,\n size = 'medium',\n variant = 'fill',\n href,\n tabIndex,\n testId,\n target,\n type = 'button',\n textClassName,\n textPosition = 'left',\n ref,\n ...restProps\n } = props;\n const [leftIcon, rightIcon, restChildren] = useIcons(React.Children.toArray(children));\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | HTMLAnchorElement | null>(ref);\n const buttonContentRef = useRef<HTMLDivElement>(null);\n const onlyIcon = !!(leftIcon || rightIcon) && !restChildren;\n const bothIcons = leftIcon && (rightIcon || arrow) && !onlyIcon;\n const onDark = onColor === 'ondark';\n const isMobile = useIsMobileBreakpoint();\n const destructive = concept === 'destructive' && !disabled;\n const outlineVariant = variant === 'outline';\n const borderlessVariant = variant === 'borderless';\n const iconColor = getIconColor(variant === 'fill', borderlessVariant, disabled, concept, onDark, isMobile);\n const hasArrow = arrow === 'icon' && !borderlessVariant;\n const large = size === 'large' && !destructive && !borderlessVariant;\n const hasUURightArrow = arrow === 'accessibility-character' && !fluid && !leftIcon && !rightIcon && !hasArrow && borderlessVariant;\n const rest = { ...restProps };\n\n const buttonWrapperClasses = classNames(\n buttonStyles['button-wrapper'],\n { [buttonStyles['button-wrapper--fluid']]: fluid || ellipsis },\n wrapperClassName\n );\n const buttonClasses = classNames(\n buttonStyles.button,\n {\n [buttonStyles['button--destructive']]: destructive,\n [buttonStyles['button--normal']]: !large,\n [buttonStyles['button--large']]: large,\n [buttonStyles['button--outline']]: outlineVariant,\n [buttonStyles['button--borderless']]: borderlessVariant,\n [buttonStyles['button--left-icon']]: leftIcon && !onlyIcon,\n [buttonStyles['button--right-icon']]: rightIcon && !onlyIcon,\n [buttonStyles['button--both-icons']]: bothIcons,\n [buttonStyles['button--only-icon']]: onlyIcon,\n [buttonStyles['button--arrow']]: hasArrow,\n [buttonStyles['button--on-dark']]: onDark,\n },\n className\n );\n const buttonTextClasses = classNames(\n buttonStyles['button__text'],\n {\n [buttonStyles['button__text--ellipsis']]: ellipsis,\n [buttonStyles['button__text--centered']]: fluid && textPosition === 'centered',\n },\n textClassName\n );\n const diagonalClasses = classNames(buttonStyles['diagonal'], {\n [buttonStyles['diagonal--on-dark']]: onDark,\n });\n\n useEffect(() => {\n checkOnlyIconAria(onlyIcon, ariaLabel, !isTest() && !isProd());\n }, []);\n\n const renderIcon = (iconElement: BaseIconElement | null, iconSize: number, iconClassName?: string): BaseIconElement | null => {\n return iconElement\n ? React.cloneElement(iconElement, {\n size: iconSize,\n color: iconElement?.props.color && !disabled ? iconElement.props.color : iconColor,\n isHovered: iconElement.props.isHovered === undefined ? !disabled && isHovered : iconElement.props.isHovered,\n className: iconClassName,\n })\n : null;\n };\n\n const renderButtonContent = (): React.ReactNode => {\n return (\n <span className={buttonTextClasses} ref={buttonContentRef}>\n {disabled && borderlessVariant && (\n <span className={diagonalClasses}>\n <span className={buttonStyles['diagonal__line']} />\n </span>\n )}\n <span>{onlyIcon ? ariaLabel : restChildren}</span>\n </span>\n );\n };\n\n const renderbuttonContentWrapper = (): React.ReactNode => (\n <span className={buttonClasses}>\n {renderIcon(leftIcon, getLargeIconSize(large, isMobile), !onlyIcon ? buttonStyles['button__left-icon'] : undefined)}\n {renderButtonContent()}\n {hasArrow\n ? renderIcon(\n <Icon svgIcon={ArrowRight} />,\n getLargeIconSize(large, isMobile),\n classNames(buttonStyles['button__arrow'], { [buttonStyles['button__arrow--both-icons']]: bothIcons })\n )\n : renderIcon(rightIcon, getLargeIconSize(large, isMobile), buttonStyles['button__right-icon'])}\n {hasUURightArrow && (\n <span style={{ color: iconColor }} className={buttonStyles['button__right-unicode-arrow']} aria-hidden>\n {' →'}\n </span>\n )}\n </span>\n );\n\n return (\n <>\n {htmlMarkup === 'button' && (\n <button\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n disabled={disabled}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n ref={refObject as React.RefObject<HTMLButtonElement>}\n tabIndex={tabIndex}\n type={type}\n {...rest}\n >\n {renderbuttonContentWrapper()}\n </button>\n )}\n {htmlMarkup === 'a' && (\n <a\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : props.rel}\n ref={refObject as React.RefObject<HTMLAnchorElement>}\n tabIndex={tabIndex}\n {...restProps}\n >\n {renderbuttonContentWrapper()}\n </a>\n )}\n </>\n );\n};\n\nexport default Button;\n","import Button from './Button';\nexport * from './Button';\nexport default Button;\n"],"mappings":";;;;;;;;;;;;AAsEA,IAAM,gBACJ,MACA,YACA,UACA,SACA,QACA,WACW;AACX,KAAI,UAAU,SACZ,QAAO,CAAC,UAAU,OAAO,SAAS,WAAW,CAAC,aAAa,MAAM,IAAI,GAAG,SAAS,QAAQ;AAE3F,KAAI,SACF,QAAO,CAAC,UAAU,OAAO,SAAS,WAAW,IAAI,GAAG,GAAG,SAAS,QAAQ,CAAC;AAE3E,KAAK,QAAQ,CAAC,UAAY,CAAC,QAAQ,OACjC,QAAO;AAGT,QAAO,YAAY,WAAW,SAAS,aAAa,IAAI,GAAG,SAAS,UAAU,IAAI;;AAEpF,IAAM,oBAAoB,OAAgB,WAA8B;AACtE,KAAI,UAAU,MAAO,QAAO,SAAS;AACrC,KAAI,MAAO,QAAO,SAAS;AAC3B,QAAO,SAAS;;AAGlB,IAAM,qBAAqB,UAAmB,WAA+B,WAA0B;AACrG,KAAI,UAAU,aAAa,cAAc,KAAA,KAAa,cAAc,IAClE,OAAM,IAAI,MAAM,0EAA0E;;AAI9F,IAAMA,UAAgC,UAAS;CAC7C,MAAM,EACJ,WACA,IACA,UACA,kBACA,WACA,OACA,UAAU,UACV,WAAW,OACX,WAAW,OACX,QAAQ,OACR,aAAa,UACb,UAAU,WACV,QACA,SACA,OAAO,UACP,UAAU,QACV,MACA,UACA,QACA,QACA,OAAO,UACP,eACA,eAAe,QACf,KACA,GAAG,cACD;CACJ,M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,OACd,oBAAC,KAAA;EACK;EACI;EACC;EACT,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACL;EACE;EACR,KAAK,WAAW,WAAW,wBAAwB,MAAM;EACzD,KAAK;EACK;EACV,GAAI;YAEH,4BAA4B;GAC3B,CAAA,EAAA,CAEL;;ACtQP,IAAA,mBD0Qe"}
1
+ {"version":3,"file":"Button.js","names":["Button: React.FC<ButtonProps>"],"sources":["../src/components/Button/Button.tsx","../src/components/Button/index.ts"],"sourcesContent":["import React, { type AriaAttributes, useEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Icon, { IconSize } from './../Icon';\nimport { type HTMLButtonProps, type HTMLAnchorProps, AnalyticsId } from '../../constants';\nimport { type BaseIconElement, useIcons } from '../../hooks/useIcons';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys/color';\nimport { isTest, isProd } from '../../utils/environment';\nimport ArrowRight from '../Icons/ArrowRight';\n\nimport buttonStyles from './styles.module.scss';\n\nexport type ButtonConcept = 'normal' | 'destructive';\nexport type ButtonVariant = 'fill' | 'outline' | 'borderless';\nexport type ButtonSize = 'medium' | 'large';\nexport type ButtonOnColor = 'onlight' | 'ondark';\nexport type ButtonTags = 'button' | 'a';\nexport type ButtonArrows = 'icon' | 'accessibility-character';\nexport type ButtonTextPosition = 'left' | 'centered';\n\nexport interface ButtonProps extends Omit<HTMLButtonProps, 'onClick' | 'type'>, Omit<HTMLAnchorProps, 'onClick'>, AriaAttributes {\n /** Sets the aria-label of the button, use when the button only includes an icon */\n ariaLabel?: string;\n /** Gives a unique id to the button */\n id?: string;\n /** Sets the content of the button. */\n children: React.ReactNode;\n /** Adds custom classes to the wrapper element. */\n wrapperClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Enables an arrow icon to the right inside the button (Not available in borderless variant) */\n arrow?: ButtonArrows;\n /** Changes the intent of the button. Mostly changes the color profile. */\n concept?: ButtonConcept;\n /** Disables text wrapping and enables ellipsis. */\n ellipsis?: boolean;\n /** Makes the button scale to full width of its parent element. */\n fluid?: boolean;\n /** Changes the underlying element of the button. */\n htmlMarkup?: ButtonTags;\n /** Changes the button colors for different backgrounds. */\n onColor?: ButtonOnColor;\n /** Function that is called when the Button loses focus */\n onBlur?: () => void;\n /** Function that is called when clicked */\n onClick?: (\n e?: React.MouseEvent<HTMLElement, MouseEvent> | React.FormEvent<unknown> | React.KeyboardEvent<HTMLUListElement> | null\n ) => void;\n /** Changes the button colors for different backgrounds. (Large not available in borderless variant) */\n size?: ButtonSize;\n /** Changes the visual representation of the button. */\n variant?: ButtonVariant;\n /** Specifies the focus order relative to the other buttons or controls on the page */\n tabIndex?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Adds custom classes to the text */\n textClassName?: string;\n /** Sets the position of the text in the button - only applies when button is fluid */\n textPosition?: ButtonTextPosition;\n /** Button type. Default: button */\n type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];\n /** Ref that is passed to the component */\n ref?: React.RefObject<HTMLButtonElement | HTMLAnchorElement | null>;\n}\n\nconst getIconColor = (\n fill: boolean,\n borderless: boolean,\n disabled: boolean,\n concept: ButtonConcept,\n ondark: boolean,\n mobile: boolean\n): string => {\n if (mobile && disabled) {\n return !ondark || fill ? getColor('neutral', !borderless ? 700 : 500) : getColor('white');\n }\n if (disabled) {\n return !ondark || fill ? getColor('neutral', 500) : `${getColor('white')}b3`;\n }\n if ((fill && !ondark) || (!fill && ondark)) {\n return 'white';\n }\n\n return concept === 'normal' ? getColor('blueberry', 600) : getColor('cherry', 500);\n};\nconst getLargeIconSize = (large: boolean, mobile: boolean): IconSize => {\n if (mobile && large) return IconSize.Small;\n if (large) return IconSize.Medium;\n return IconSize.XSmall;\n};\n\nconst checkOnlyIconAria = (onlyIcon: boolean, ariaLabel: string | undefined, devEnv: boolean): void => {\n if (devEnv && onlyIcon && (ariaLabel === undefined || ariaLabel === '')) {\n throw new Error('Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav');\n }\n};\n\nconst Button: React.FC<ButtonProps> = props => {\n const {\n ariaLabel,\n id,\n children,\n wrapperClassName,\n className,\n arrow,\n concept = 'normal',\n disabled = false,\n ellipsis = false,\n fluid = false,\n htmlMarkup = 'button',\n onColor = 'onlight',\n onBlur,\n onClick,\n size = 'medium',\n variant = 'fill',\n href,\n tabIndex,\n testId,\n target,\n type = 'button',\n textClassName,\n textPosition = 'left',\n ref,\n ...restProps\n } = props;\n const [leftIcon, rightIcon, restChildren] = useIcons(React.Children.toArray(children));\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | HTMLAnchorElement | null>(ref);\n const buttonContentRef = useRef<HTMLDivElement>(null);\n const onlyIcon = !!(leftIcon || rightIcon) && !restChildren;\n const bothIcons = leftIcon && (rightIcon || arrow) && !onlyIcon;\n const onDark = onColor === 'ondark';\n const isMobile = useIsMobileBreakpoint();\n const destructive = concept === 'destructive' && !disabled;\n const outlineVariant = variant === 'outline';\n const borderlessVariant = variant === 'borderless';\n const iconColor = getIconColor(variant === 'fill', borderlessVariant, disabled, concept, onDark, isMobile);\n const hasArrow = arrow === 'icon' && !borderlessVariant;\n const large = size === 'large' && !destructive && !borderlessVariant;\n const hasUURightArrow = arrow === 'accessibility-character' && !fluid && !leftIcon && !rightIcon && !hasArrow && borderlessVariant;\n const rest = { ...restProps };\n\n const buttonWrapperClasses = classNames(\n buttonStyles['button-wrapper'],\n { [buttonStyles['button-wrapper--fluid']]: fluid || ellipsis },\n wrapperClassName\n );\n const buttonClasses = classNames(\n buttonStyles.button,\n {\n [buttonStyles['button--destructive']]: destructive,\n [buttonStyles['button--normal']]: !large,\n [buttonStyles['button--large']]: large,\n [buttonStyles['button--outline']]: outlineVariant,\n [buttonStyles['button--borderless']]: borderlessVariant,\n [buttonStyles['button--left-icon']]: leftIcon && !onlyIcon,\n [buttonStyles['button--right-icon']]: rightIcon && !onlyIcon,\n [buttonStyles['button--both-icons']]: bothIcons,\n [buttonStyles['button--only-icon']]: onlyIcon,\n [buttonStyles['button--arrow']]: hasArrow,\n [buttonStyles['button--on-dark']]: onDark,\n },\n className\n );\n const buttonTextClasses = classNames(\n buttonStyles['button__text'],\n {\n [buttonStyles['button__text--ellipsis']]: ellipsis,\n [buttonStyles['button__text--centered']]: fluid && textPosition === 'centered',\n },\n textClassName\n );\n const diagonalClasses = classNames(buttonStyles['diagonal'], {\n [buttonStyles['diagonal--on-dark']]: onDark,\n });\n\n useEffect(() => {\n checkOnlyIconAria(onlyIcon, ariaLabel, !isTest() && !isProd());\n }, []);\n\n const renderIcon = (iconElement: BaseIconElement | null, iconSize: number, iconClassName?: string): BaseIconElement | null => {\n return iconElement\n ? React.cloneElement(iconElement, {\n size: iconSize,\n color: iconElement?.props.color && !disabled ? iconElement.props.color : iconColor,\n isHovered: iconElement.props.isHovered === undefined ? !disabled && isHovered : iconElement.props.isHovered,\n className: iconClassName,\n })\n : null;\n };\n\n const renderButtonContent = (): React.ReactNode => {\n return (\n <span className={buttonTextClasses} ref={buttonContentRef}>\n {disabled && borderlessVariant && (\n <span className={diagonalClasses}>\n <span className={buttonStyles['diagonal__line']} />\n </span>\n )}\n <span>{onlyIcon ? ariaLabel : restChildren}</span>\n </span>\n );\n };\n\n const renderbuttonContentWrapper = (): React.ReactNode => (\n <span className={buttonClasses}>\n {renderIcon(leftIcon, getLargeIconSize(large, isMobile), !onlyIcon ? buttonStyles['button__left-icon'] : undefined)}\n {renderButtonContent()}\n {hasArrow\n ? renderIcon(\n <Icon svgIcon={ArrowRight} />,\n getLargeIconSize(large, isMobile),\n classNames(buttonStyles['button__arrow'], { [buttonStyles['button__arrow--both-icons']]: bothIcons })\n )\n : renderIcon(rightIcon, getLargeIconSize(large, isMobile), buttonStyles['button__right-icon'])}\n {hasUURightArrow && (\n <span style={{ color: iconColor }} className={buttonStyles['button__right-unicode-arrow']} aria-hidden>\n {' →'}\n </span>\n )}\n </span>\n );\n\n return (\n <>\n {htmlMarkup === 'button' && (\n <button\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n disabled={disabled}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n ref={refObject as React.RefObject<HTMLButtonElement>}\n tabIndex={tabIndex}\n type={type}\n {...rest}\n >\n {renderbuttonContentWrapper()}\n </button>\n )}\n {htmlMarkup === 'a' && (\n <a\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : props.rel}\n ref={refObject as React.RefObject<HTMLAnchorElement>}\n tabIndex={tabIndex}\n {...restProps}\n >\n {renderbuttonContentWrapper()}\n </a>\n )}\n </>\n );\n};\n\nexport default Button;\n","import Button from './Button';\nexport * from './Button';\nexport default Button;\n"],"mappings":";;;;;;;;;;;;AAsEA,IAAM,gBACJ,MACA,YACA,UACA,SACA,QACA,WACW;AACX,KAAI,UAAU,SACZ,QAAO,CAAC,UAAU,OAAO,SAAS,WAAW,CAAC,aAAa,MAAM,IAAI,GAAG,SAAS,QAAQ;AAE3F,KAAI,SACF,QAAO,CAAC,UAAU,OAAO,SAAS,WAAW,IAAI,GAAG,GAAG,SAAS,QAAQ,CAAC;AAE3E,KAAK,QAAQ,CAAC,UAAY,CAAC,QAAQ,OACjC,QAAO;AAGT,QAAO,YAAY,WAAW,SAAS,aAAa,IAAI,GAAG,SAAS,UAAU,IAAI;;AAEpF,IAAM,oBAAoB,OAAgB,WAA8B;AACtE,KAAI,UAAU,MAAO,QAAO,SAAS;AACrC,KAAI,MAAO,QAAO,SAAS;AAC3B,QAAO,SAAS;;AAGlB,IAAM,qBAAqB,UAAmB,WAA+B,WAA0B;AACrG,KAAI,UAAU,aAAa,cAAc,KAAA,KAAa,cAAc,IAClE,OAAM,IAAI,MAAM,0EAA0E;;AAI9F,IAAMA,UAAgC,UAAS;CA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A;cACxF;KACI;;GAEJ;AAGT,QACE,qBAAA,UAAA,EAAA,UAAA,CACG,eAAe,YACd,oBAAC,UAAA;EACK;EACI;EACC;EACC;EACV,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,KAAK;EACK;EACJ;EACN,GAAI;YAEH,4BAA4B;GACtB,EAEV,eAAe,OACd,oBAAC,KAAA;EACK;EACI;EACC;EACT,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACL;EACE;EACR,KAAK,WAAW,WAAW,wBAAwB,MAAM;EACzD,KAAK;EACK;EACV,GAAI;YAEH,4BAA4B;GAC3B,CAAA,EAAA,CAEL;;ACtQP,IAAA,mBD0Qe"}
package/lib/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 14.0.0-beta.4 (2026-02-10)
2
+
3
+ ### Bug Fixes
4
+
5
+ * constants og utils fra komponenter skal eksporteres ([ae3e5af](https://github.com/helsenorge/designsystem/commit/ae3e5af25436b79b7b52cef5f78668742cecb356)), closes [#368469](https://github.com/helsenorge/designsystem/issues/368469) [#368806](https://github.com/helsenorge/designsystem/issues/368806)
6
+ ## 14.0.0-beta.3 (2026-02-10)
7
+
8
+ ### Features
9
+
10
+ * **formgroup:** ref prop renamet til errormessageref ([0f33ed5](https://github.com/helsenorge/designsystem/commit/0f33ed5ea14a64beb8c78f1e0aac8f8a94e2e53c)), closes [#368993](https://github.com/helsenorge/designsystem/issues/368993)
11
+
12
+ ### Bug Fixes
13
+
14
+ * komponent dts filer havnet i feil path ([31fb3ec](https://github.com/helsenorge/designsystem/commit/31fb3ec3ffd5c93e098d82d8fd1801d84aec26d6)), closes [#368469](https://github.com/helsenorge/designsystem/issues/368469)
1
15
  ## 14.0.0-beta.2 (2026-02-09)
2
16
  ## 14.0.0-beta.1 (2026-02-09)
3
17
  ## 14.0.0-beta.0 (2026-02-09)
package/lib/Checkbox.js CHANGED
@@ -9,7 +9,7 @@ import { t as useIdWithFallback } from "./useIdWithFallback.js";
9
9
  import { t as getAriaDescribedBy } from "./accessibility.js";
10
10
  import { t as ErrorWrapper_default } from "./ErrorWrapper.js";
11
11
  import { r as renderLabelAsParent, t as getLabelText } from "./utils2.js";
12
- import cn from "classnames";
12
+ import classNames from "classnames";
13
13
  import { useEffect, useState } from "react";
14
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
15
  import checkboxStyles from "./components/Checkbox/styles.module.scss";
@@ -25,8 +25,8 @@ const Checkbox = (props) => {
25
25
  const large = size === FormSize.large;
26
26
  const { refObject, isFocused } = usePseudoClasses(isMutableRefObject(ref) ? ref : null);
27
27
  const mergedRefs = mergeRefs([ref, refObject]);
28
- const checkboxWrapperClasses = cn(checkboxStyles["checkbox-wrapper"], { [checkboxStyles["checkbox-wrapper--large"]]: large });
29
- const checkboxLabelClasses = cn(checkboxStyles["checkbox-label"], {
28
+ const checkboxWrapperClasses = classNames(checkboxStyles["checkbox-wrapper"], { [checkboxStyles["checkbox-wrapper--large"]]: large });
29
+ const checkboxLabelClasses = classNames(checkboxStyles["checkbox-label"], {
30
30
  [checkboxStyles["checkbox-label--disabled"]]: disabled,
31
31
  [checkboxStyles["checkbox-label--on-dark"]]: onDark,
32
32
  [checkboxStyles["checkbox-label--large"]]: large,
@@ -38,8 +38,8 @@ const Checkbox = (props) => {
38
38
  [checkboxStyles["checkbox-label__large--on-invalid"]]: large && onInvalid,
39
39
  [checkboxStyles["checkbox-label__large--disabled"]]: large && disabled
40
40
  });
41
- const checkboxClasses = cn(checkboxStyles.checkbox, className);
42
- const checkboxIconWrapperClasses = cn(checkboxStyles["checkbox__icon-wrapper"], {
41
+ const checkboxClasses = classNames(checkboxStyles.checkbox, className);
42
+ const checkboxIconWrapperClasses = classNames(checkboxStyles["checkbox__icon-wrapper"], {
43
43
  [checkboxStyles["checkbox__icon-wrapper--on-white"]]: onWhite,
44
44
  [checkboxStyles["checkbox__icon-wrapper--on-grey"]]: onGrey,
45
45
  [checkboxStyles["checkbox__icon-wrapper--on-invalid"]]: onInvalid,
@@ -57,7 +57,7 @@ const Checkbox = (props) => {
57
57
  [checkboxStyles["checkbox__icon-wrapper__large--checked--invalid"]]: large && isChecked && onInvalid,
58
58
  [checkboxStyles["checkbox__icon-wrapper__large--checked--disabled"]]: disabled && large && isChecked
59
59
  });
60
- const labelTextClasses = cn(checkboxStyles["checkbox-label__text"], {
60
+ const labelTextClasses = classNames(checkboxStyles["checkbox-label__text"], {
61
61
  [checkboxStyles["checkbox-label__text__large--checked"]]: large && isChecked,
62
62
  [checkboxStyles["checkbox-label__text__large--invalid"]]: large && isChecked && onInvalid,
63
63
  [checkboxStyles["checkbox-label__text--on-dark"]]: onDark,
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","names":["Checkbox: React.FC<CheckboxProps>"],"sources":["../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ErrorWrapperClassNameProps } from '../ErrorWrapper';\n\nimport { AnalyticsId, FormOnColor, FormSize, IconSize } from '../../constants';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys/color';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport { uuid } from '../../utils/uuid';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon from '../Icon';\nimport Check from '../Icons/Check';\nimport { getLabelText, renderLabelAsParent } from '../Label/utils';\n\nimport checkboxStyles from './styles.module.scss';\n\nexport interface CheckboxProps\n extends\n ErrorWrapperClassNameProps,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'aria-describedby' | 'name' | 'value' | 'disabled' | 'checked' | 'required' | 'onChange'\n > {\n /** Adds custom classes to the element. */\n className?: string;\n /** The <Label/> next to the checkbox - sublabels kan ikke kombineres med large variant */\n label: React.ReactNode;\n /** input id of the checkbox */\n inputId?: string;\n /** Changes the visuals of the checkbox */\n onColor?: keyof typeof FormOnColor;\n /** Changes the visuals of the checkbox */\n size?: keyof typeof FormSize;\n /** Activates Error style for the checkbox - This is can be true while errorText is empty, when in a FormGroup */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref that is passed to the component */\n ref?: React.Ref<HTMLInputElement | null>;\n}\n\nexport const Checkbox: React.FC<CheckboxProps> = props => {\n const {\n className,\n checked = false,\n disabled,\n label,\n inputId = uuid(),\n onColor = FormOnColor.onwhite,\n name = inputId,\n size,\n errorText,\n error = !!errorText,\n errorTextId: errorTextIdProp,\n errorWrapperClassName,\n value = getLabelText(label),\n testId,\n required,\n onChange,\n ref,\n } = props;\n const [isChecked, setIsChecked] = useState(checked);\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const onWhite = onColor === FormOnColor.onwhite;\n const onGrey = onColor === FormOnColor.ongrey;\n const onBlueberry = onColor === FormOnColor.onblueberry;\n const onInvalid = error || onColor === FormOnColor.oninvalid;\n const onDark = onColor === FormOnColor.ondark;\n const large = size === FormSize.large;\n const { refObject, isFocused } = usePseudoClasses<HTMLInputElement>(isMutableRefObject(ref) ? ref : null);\n const mergedRefs = mergeRefs([ref, refObject]);\n\n const checkboxWrapperClasses = classNames(checkboxStyles['checkbox-wrapper'], {\n [checkboxStyles['checkbox-wrapper--large']]: large,\n });\n const checkboxLabelClasses = classNames(checkboxStyles['checkbox-label'], {\n [checkboxStyles['checkbox-label--disabled']]: disabled,\n [checkboxStyles['checkbox-label--on-dark']]: onDark,\n [checkboxStyles['checkbox-label--large']]: large,\n [checkboxStyles['checkbox-label__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox-label__large--focus']]: large && isFocused,\n [checkboxStyles['checkbox-label__large--on-white']]: large && onWhite,\n [checkboxStyles['checkbox-label__large--on-grey']]: large && onGrey,\n [checkboxStyles['checkbox-label__large--on-blueberry']]: large && onBlueberry,\n [checkboxStyles['checkbox-label__large--on-invalid']]: large && onInvalid,\n [checkboxStyles['checkbox-label__large--disabled']]: large && disabled,\n });\n const checkboxClasses = classNames(checkboxStyles.checkbox, className);\n const checkboxIconWrapperClasses = classNames(checkboxStyles['checkbox__icon-wrapper'], {\n [checkboxStyles['checkbox__icon-wrapper--on-white']]: onWhite,\n [checkboxStyles['checkbox__icon-wrapper--on-grey']]: onGrey,\n [checkboxStyles['checkbox__icon-wrapper--on-invalid']]: onInvalid,\n [checkboxStyles['checkbox__icon-wrapper--disabled']]: disabled,\n [checkboxStyles['checkbox__icon-wrapper__regular--checked']]: !large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__regular--invalid']]: !large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__regular--on-dark']]: !large && isChecked && onDark,\n [checkboxStyles['checkbox__icon-wrapper__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__large--invalid']]: large && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper--on-dark']]: onDark,\n [checkboxStyles['checkbox__icon-wrapper--on-blueberry']]: onBlueberry,\n [checkboxStyles['checkbox__icon-wrapper--invalid']]: onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--disabled']]: disabled && large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__large--checked--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--checked--disabled']]: disabled && large && isChecked,\n });\n const labelTextClasses = classNames(checkboxStyles['checkbox-label__text'], {\n [checkboxStyles['checkbox-label__text__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox-label__text__large--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox-label__text--on-dark']]: onDark,\n [checkboxStyles['checkbox-label__text--disabled']]: disabled,\n });\n\n let iconColor = getColor('white');\n if (onDark || (large && isChecked)) iconColor = getColor('blueberry', 900);\n if (onInvalid && large && isChecked) iconColor = getColor('white');\n if (disabled) iconColor = getColor('neutral', 700);\n\n useEffect(() => {\n setIsChecked(checked);\n }, [checked]);\n\n const onChangeHandler = (e: React.ChangeEvent<HTMLInputElement>): void => {\n if (onChange) {\n onChange(e);\n }\n\n setIsChecked(!isChecked);\n };\n\n const getLabelContent = (): React.ReactNode => {\n return (\n <>\n <input\n id={inputId}\n name={name}\n className={checkboxClasses}\n type=\"checkbox\"\n checked={isChecked}\n disabled={disabled}\n value={value}\n ref={mergedRefs}\n aria-describedby={getAriaDescribedBy(props, errorTextId)}\n aria-invalid={error}\n required={required}\n onChange={onChangeHandler}\n />\n <span className={checkboxIconWrapperClasses}>\n {isChecked && <Icon color={iconColor} className={checkboxStyles['checkbox__icon']} svgIcon={Check} size={IconSize.XSmall} />}\n </span>\n </>\n );\n };\n\n return (\n <ErrorWrapper className={errorWrapperClassName} errorText={errorText} errorTextId={errorTextId}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Checkbox} className={checkboxWrapperClasses}>\n {renderLabelAsParent(\n label,\n getLabelContent(),\n inputId,\n onColor as FormOnColor,\n checkboxLabelClasses,\n labelTextClasses,\n checkboxStyles['checkbox-sublabel-wrapper'],\n large\n )}\n </div>\n </ErrorWrapper>\n );\n};\n\nexport default Checkbox;\n"],"mappings":";;;;;;;;;;;;;;;AAiDA,MAAaA,YAAoC,UAAS;CACxD,MAAM,EACJ,WACA,UAAU,OACV,UACA,OACA,UAAU,MAAM,EAChB,UAAU,YAAY,SACtB,OAAO,SACP,MACA,WACA,QAAQ,CAAC,CAAC,WACV,aAAa,iBACb,uBACA,QAAQ,aAAa,MAAM,EAC3B,QACA,UACA,UACA,QACE;CACJ,MAAM,CAAC,WAAW,gBAAgB,SAAS,QAAQ;CACnD,MAAM,cAAc,kBAAkB,gBAAgB;CACtD,MAAM,UAAU,YAAY,YAAY;CACxC,MAAM,SAAS,YAAY,YAAY;CACvC,MAAM,cAAc,YAAY,YAAY;CAC5C,MAAM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eAAe,mCAAmC;GAClD,eAAe,oCAAoC;EACrD,CAAC;CAEF,IAAI,YAAY,SAAS,QAAQ;AACjC,KAAI,UAAW,SAAS,UAAY,aAAY,SAAS,aAAa,IAAI;AAC1E,KAAI,aAAa,SAAS,UAAW,aAAY,SAAS,QAAQ;AAClE,KAAI,SAAU,aAAY,SAAS,WAAW,IAAI;AAElD,iBAAgB;AACd,eAAa,QAAQ;IACpB,CAAC,QAAQ,CAAC;CAEb,MAAM,mBAAmB,MAAiD;AACxE,MAAI,SACF,UAAS,EAAE;AAGb,eAAa,CAAC,UAAU;;CAG1B,MAAM,wBAAyC;AAC7C,SACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,SAAA;GACC,IAAI;GACE;GACN,WAAW;GACX,MAAK;GACL,SAAS;GACC;GACH;GACP,KAAK;GACL,oBAAkB,mBAAmB,OAAO,YAAY;GACxD,gBAAc;GACJ;GACV,UAAU;IACV,EACF,oBAAC,QAAA;GAAK,WAAW;aACd,aAAa,oBAAC,cAAA;IAAK,OAAO;IAAW,WAAW,eAAe;IAAmB,SAAS;IAAO,MAAM,SAAS;KAAU;IACvH,CAAA,EAAA,CACN;;AAIP,QACE,oBAAC,sBAAA;EAAa,WAAW;EAAkC;EAAwB;YACjF,oBAAC,OAAA;GAAI,eAAa;GAAQ,oBAAkB,YAAY;GAAU,WAAW;aAC1E,oBACC,OACA,iBAAiB,EACjB,SACA,SACA,sBACA,kBACA,eAAe,8BACf,MACD;IACG;GACO;;AAInB,IAAA,mBAAe"}
1
+ {"version":3,"file":"Checkbox.js","names":["Checkbox: React.FC<CheckboxProps>"],"sources":["../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ErrorWrapperClassNameProps } from '../ErrorWrapper';\n\nimport { AnalyticsId, FormOnColor, FormSize, IconSize } from '../../constants';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys/color';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport { uuid } from '../../utils/uuid';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon from '../Icon';\nimport Check from '../Icons/Check';\nimport { getLabelText, renderLabelAsParent } from '../Label/utils';\n\nimport checkboxStyles from './styles.module.scss';\n\nexport interface CheckboxProps\n extends\n ErrorWrapperClassNameProps,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'aria-describedby' | 'name' | 'value' | 'disabled' | 'checked' | 'required' | 'onChange'\n > {\n /** Adds custom classes to the element. */\n className?: string;\n /** The <Label/> next to the checkbox - sublabels kan ikke kombineres med large variant */\n label: React.ReactNode;\n /** input id of the checkbox */\n inputId?: string;\n /** Changes the visuals of the checkbox */\n onColor?: keyof typeof FormOnColor;\n /** Changes the visuals of the checkbox */\n size?: keyof typeof FormSize;\n /** Activates Error style for the checkbox - This is can be true while errorText is empty, when in a FormGroup */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref that is passed to the component */\n ref?: React.Ref<HTMLInputElement | null>;\n}\n\nexport const Checkbox: React.FC<CheckboxProps> = props => {\n const {\n className,\n checked = false,\n disabled,\n label,\n inputId = uuid(),\n onColor = FormOnColor.onwhite,\n name = inputId,\n size,\n errorText,\n error = !!errorText,\n errorTextId: errorTextIdProp,\n errorWrapperClassName,\n value = getLabelText(label),\n testId,\n required,\n onChange,\n ref,\n } = props;\n const [isChecked, setIsChecked] = useState(checked);\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const onWhite = onColor === FormOnColor.onwhite;\n const onGrey = onColor === FormOnColor.ongrey;\n const onBlueberry = onColor === FormOnColor.onblueberry;\n const onInvalid = error || onColor === FormOnColor.oninvalid;\n const onDark = onColor === FormOnColor.ondark;\n const large = size === FormSize.large;\n const { refObject, isFocused } = usePseudoClasses<HTMLInputElement>(isMutableRefObject(ref) ? ref : null);\n const mergedRefs = mergeRefs([ref, refObject]);\n\n const checkboxWrapperClasses = classNames(checkboxStyles['checkbox-wrapper'], {\n [checkboxStyles['checkbox-wrapper--large']]: large,\n });\n const checkboxLabelClasses = classNames(checkboxStyles['checkbox-label'], {\n [checkboxStyles['checkbox-label--disabled']]: disabled,\n [checkboxStyles['checkbox-label--on-dark']]: onDark,\n [checkboxStyles['checkbox-label--large']]: large,\n [checkboxStyles['checkbox-label__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox-label__large--focus']]: large && isFocused,\n [checkboxStyles['checkbox-label__large--on-white']]: large && onWhite,\n [checkboxStyles['checkbox-label__large--on-grey']]: large && onGrey,\n [checkboxStyles['checkbox-label__large--on-blueberry']]: large && onBlueberry,\n [checkboxStyles['checkbox-label__large--on-invalid']]: large && onInvalid,\n [checkboxStyles['checkbox-label__large--disabled']]: large && disabled,\n });\n const checkboxClasses = classNames(checkboxStyles.checkbox, className);\n const checkboxIconWrapperClasses = classNames(checkboxStyles['checkbox__icon-wrapper'], {\n [checkboxStyles['checkbox__icon-wrapper--on-white']]: onWhite,\n [checkboxStyles['checkbox__icon-wrapper--on-grey']]: onGrey,\n [checkboxStyles['checkbox__icon-wrapper--on-invalid']]: onInvalid,\n [checkboxStyles['checkbox__icon-wrapper--disabled']]: disabled,\n [checkboxStyles['checkbox__icon-wrapper__regular--checked']]: !large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__regular--invalid']]: !large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__regular--on-dark']]: !large && isChecked && onDark,\n [checkboxStyles['checkbox__icon-wrapper__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__large--invalid']]: large && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper--on-dark']]: onDark,\n [checkboxStyles['checkbox__icon-wrapper--on-blueberry']]: onBlueberry,\n [checkboxStyles['checkbox__icon-wrapper--invalid']]: onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--disabled']]: disabled && large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__large--checked--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--checked--disabled']]: disabled && large && isChecked,\n });\n const labelTextClasses = classNames(checkboxStyles['checkbox-label__text'], {\n [checkboxStyles['checkbox-label__text__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox-label__text__large--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox-label__text--on-dark']]: onDark,\n [checkboxStyles['checkbox-label__text--disabled']]: disabled,\n });\n\n let iconColor = getColor('white');\n if (onDark || (large && isChecked)) iconColor = getColor('blueberry', 900);\n if (onInvalid && large && isChecked) iconColor = getColor('white');\n if (disabled) iconColor = getColor('neutral', 700);\n\n useEffect(() => {\n setIsChecked(checked);\n }, [checked]);\n\n const onChangeHandler = (e: React.ChangeEvent<HTMLInputElement>): void => {\n if (onChange) {\n onChange(e);\n }\n\n setIsChecked(!isChecked);\n };\n\n const getLabelContent = (): React.ReactNode => {\n return (\n <>\n <input\n id={inputId}\n name={name}\n className={checkboxClasses}\n type=\"checkbox\"\n checked={isChecked}\n disabled={disabled}\n value={value}\n ref={mergedRefs}\n aria-describedby={getAriaDescribedBy(props, errorTextId)}\n aria-invalid={error}\n required={required}\n onChange={onChangeHandler}\n />\n <span className={checkboxIconWrapperClasses}>\n {isChecked && <Icon color={iconColor} className={checkboxStyles['checkbox__icon']} svgIcon={Check} size={IconSize.XSmall} />}\n </span>\n </>\n );\n };\n\n return (\n <ErrorWrapper className={errorWrapperClassName} errorText={errorText} errorTextId={errorTextId}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Checkbox} className={checkboxWrapperClasses}>\n {renderLabelAsParent(\n label,\n getLabelContent(),\n inputId,\n onColor as FormOnColor,\n checkboxLabelClasses,\n label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AA,CACN;;AAIP,QACE,oBAAC,sBAAA;EAAa,WAAW;EAAkC;EAAwB;YACjF,oBAAC,OAAA;GAAI,eAAa;GAAQ,oBAAkB,YAAY;GAAU,WAAW;aAC1E,oBACC,OACA,iBAAiB,EACjB,SACA,SACA,sBACA,kBACA,eAAe,8BACf,MACD;IACG;GACO;;AAInB,IAAA,mBAAe"}
@@ -1,4 +1,4 @@
1
- import { t as ViewBoxSize } from "./utils3.js";
1
+ import { t as ViewBoxSize } from "./utils4.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  var ChildMedium = ({ color, svgProperties, title }) => {
4
4
  const palette = (() => {
package/lib/Close.js CHANGED
@@ -4,7 +4,7 @@ import { n as mergeRefs } from "./refs.js";
4
4
  import { t as Icon_default } from "./Icon.js";
5
5
  import { t as useIsMobileBreakpoint } from "./useIsMobileBreakpoint.js";
6
6
  import { t as X_default } from "./X.js";
7
- import cn from "classnames";
7
+ import classNames from "classnames";
8
8
  import { jsx } from "react/jsx-runtime";
9
9
  import styles from "./components/Close/styles.module.scss";
10
10
  var Close = (props) => {
@@ -15,7 +15,7 @@ var Close = (props) => {
15
15
  if (color === "black") iconColor = "black";
16
16
  else if (color === "plum") iconColor = "var(--core-color-plum-700)";
17
17
  else iconColor = "var(--color-action-graphics-onlight)";
18
- const closeClasses = cn(styles.close, { [styles["close--small"]]: small }, className);
18
+ const closeClasses = classNames(styles.close, { [styles["close--small"]]: small }, className);
19
19
  return /* @__PURE__ */ jsx("button", {
20
20
  ref: mergeRefs([ref, refObject]),
21
21
  "data-testid": testId,
@@ -25,7 +25,7 @@ var Close = (props) => {
25
25
  onClick,
26
26
  type: "button",
27
27
  children: /* @__PURE__ */ jsx("span", {
28
- className: cn(styles["close__inner-container"], {
28
+ className: classNames(styles["close__inner-container"], {
29
29
  [styles["close__inner-container--small"]]: small,
30
30
  [styles["close__inner-container--plum"]]: color == "plum"
31
31
  }),
package/lib/Close.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Close.js","names":["Close: React.FC<CloseProps>"],"sources":["../src/components/Close/Close.tsx","../src/components/Close/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport Icon from '../Icon';\nimport X from '../Icons/X';\n\nimport styles from './styles.module.scss';\n\nexport interface CloseProps {\n /** Keeps the icon small for all screen sizes */\n small?: boolean;\n /** Function is called when user clicks the button */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Sets the aria-label of the button */\n ariaLabel?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Gives color to the svg */\n color?: 'blueberry' | 'black' | 'plum';\n /** Ref that is passed to the component */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nconst Close: React.FC<CloseProps> = props => {\n const { small, testId, ariaLabel = 'Lukk', onClick, className, color = 'blueberry', ref } = props;\n const { refObject, isHovered } = usePseudoClasses();\n\n const iconSize = useIsMobileBreakpoint() || small ? 38 : 48;\n\n let iconColor;\n if (color === 'black') {\n iconColor = 'black';\n } else if (color === 'plum') {\n iconColor = 'var(--core-color-plum-700)';\n } else {\n iconColor = 'var(--color-action-graphics-onlight)';\n }\n\n const closeClasses = classNames(styles.close, { [styles['close--small']]: small }, className);\n\n return (\n <button\n ref={mergeRefs([ref, refObject])}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Close}\n className={closeClasses}\n aria-label={ariaLabel}\n onClick={onClick}\n type=\"button\"\n >\n <span\n className={classNames(styles['close__inner-container'], {\n [styles['close__inner-container--small']]: small,\n [styles['close__inner-container--plum']]: color == 'plum',\n })}\n >\n <Icon svgIcon={X} color={iconColor} size={iconSize} isHovered={isHovered} />\n </span>\n </button>\n );\n};\n\nexport default Close;\n","import Close from './Close';\nexport * from './Close';\nexport default Close;\n"],"mappings":";;;;;;;;;AA4BA,IAAMA,SAA8B,UAAS;CAC3C,MAAM,EAAE,OAAO,QAAQ,YAAY,QAAQ,SAAS,WAAW,QAAQ,aAAa,QAAQ;CAC5F,MAAM,EAAE,WAAW,cAAc,kBAAkB;CAEnD,MAAM,WAAW,uBAAuB,IAAI,QAAQ,KAAK;CAEzD,IAAI;AACJ,KAAI,UAAU,QACZ,aAAY;UACH,UAAU,OACnB,aAAY;KAEZ,aAAY;CAGd,MAAM,eAAe,GAAW,OAAO,OAAO,GAAG,OAAO,kBAAkB,OAAO,EAAE,UAAU;AAE7F,QACE,oBAAC,UAAA;EACC,KAAK,UAAU,CAAC,KAAK,UAAU,CAAC;EAChC,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,cAAY;EACH;EACT,MAAK;YAEL,oBAAC,QAAA;GACC,WAAW,GAAW,OAAO,2BAA2B;KACrD,OAAO,mCAAmC;KAC1C,OAAO,kCAAkC,SAAS;IACpD,CAAC;aAEF,oBAAC,cAAA;IAAK,SAAS;IAAG,OAAO;IAAW,MAAM;IAAqB;KAAa;IACvE;GACA;;AC7Db,IAAA,kBDiEe"}
1
+ {"version":3,"file":"Close.js","names":["Close: React.FC<CloseProps>"],"sources":["../src/components/Close/Close.tsx","../src/components/Close/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport Icon from '../Icon';\nimport X from '../Icons/X';\n\nimport styles from './styles.module.scss';\n\nexport interface CloseProps {\n /** Keeps the icon small for all screen sizes */\n small?: boolean;\n /** Function is called when user clicks the button */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Sets the aria-label of the button */\n ariaLabel?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Gives color to the svg */\n color?: 'blueberry' | 'black' | 'plum';\n /** Ref that is passed to the component */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nconst Close: React.FC<CloseProps> = props => {\n const { small, testId, ariaLabel = 'Lukk', onClick, className, color = 'blueberry', ref } = props;\n const { refObject, isHovered } = usePseudoClasses();\n\n const iconSize = useIsMobileBreakpoint() || small ? 38 : 48;\n\n let iconColor;\n if (color === 'black') {\n iconColor = 'black';\n } else if (color === 'plum') {\n iconColor = 'var(--core-color-plum-700)';\n } else {\n iconColor = 'var(--color-action-graphics-onlight)';\n }\n\n const closeClasses = classNames(styles.close, { [styles['close--small']]: small }, className);\n\n return (\n <button\n ref={mergeRefs([ref, refObject])}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Close}\n className={closeClasses}\n aria-label={ariaLabel}\n onClick={onClick}\n type=\"button\"\n >\n <span\n className={classNames(styles['close__inner-container'], {\n [styles['close__inner-container--small']]: small,\n [styles['close__inner-container--plum']]: color == 'plum',\n })}\n >\n <Icon svgIcon={X} color={iconColor} size={iconSize} isHovered={isHovered} />\n </span>\n </button>\n );\n};\n\nexport default Close;\n","import Close from './Close';\nexport * from './Close';\nexport default Close;\n"],"mappings":";;;;;;;;;AA4BA,IAAMA,SAA8B,UAAS;CAC3C,MAAM,EAAE,OAAO,QAAQ,YAAY,QAAQ,SAAS,WAAW,QAAQ,aAAa,QAAQ;CAC5F,MAAM,EAAE,WAAW,cAAc,kBAAkB;CAEnD,MAAM,WAAW,uBAAuB,IAAI,QAAQ,KAAK;CAEzD,IAAI;AACJ,KAAI,UAAU,QACZ,aAAY;UACH,UAAU,OACnB,aAAY;KAEZ,aAAY;CAGd,MAAM,eAAe,WAAW,OAAO,OAAO,GAAG,OAAO,kBAAkB,OAAO,EAAE,UAAU;AAE7F,QACE,oBAAC,UAAA;EACC,KAAK,UAAU,CAAC,KAAK,UAAU,CAAC;EAChC,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,cAAY;EACH;EACT,MAAK;YAEL,oBAAC,QAAA;GACC,WAAW,WAAW,OAAO,2BAA2B;KACrD,OAAO,mCAAmC;KAC1C,OAAO,kCAAkC,SAAS;IACpD,CAAC;aAEF,oBAAC,cAAA;IAAK,SAAS;IAAG,OAAO;IAAW,MAAM;IAAqB;KAAa;IACvE;GACA;;AC7Db,IAAA,kBDiEe"}
@@ -1,10 +1,10 @@
1
1
  import { n as AnalyticsId } from "./constants2.js";
2
- import cn from "classnames";
2
+ import classNames from "classnames";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import styles from "./components/DictionaryTrigger/styles.module.scss";
5
5
  var DictionaryTrigger = (props) => {
6
6
  const { children, selected = false, className, testId, ref, ...rest } = props;
7
- const triggerClasses = cn(styles.dictionarytrigger, className);
7
+ const triggerClasses = classNames(styles.dictionarytrigger, className);
8
8
  return /* @__PURE__ */ jsx("button", {
9
9
  type: "button",
10
10
  "data-testid": testId,
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryTrigger.js","names":["DictionaryTrigger: React.FC<DictionaryTriggerProps>"],"sources":["../src/components/DictionaryTrigger/DictionaryTrigger.tsx","../src/components/DictionaryTrigger/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\n\nimport styles from './styles.module.scss';\n\nexport interface DictionaryTriggerProps extends Pick<React.InputHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onFocus' | 'onBlur'> {\n /**\n * Sets the content of the trigger.\n */\n children: React.ReactNode;\n /**\n * Indicates that the trigger is in use.\n */\n selected?: boolean;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /**\n * Sets the data-testid attribute.\n */\n testId?: string;\n /**\n * ref that is passed to the component\n */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nconst DictionaryTrigger: React.FC<DictionaryTriggerProps> = (props: DictionaryTriggerProps) => {\n const { children, selected = false, className, testId, ref, ...rest } = props;\n const triggerClasses = classNames(styles.dictionarytrigger, className);\n\n return (\n <button\n type=\"button\"\n data-testid={testId}\n data-analyticsid={AnalyticsId.DictionaryTrigger}\n className={triggerClasses}\n aria-expanded={selected}\n ref={ref}\n {...rest}\n >\n {children}\n </button>\n );\n};\n\nDictionaryTrigger.displayName = 'DictionaryTrigger';\n\nexport default DictionaryTrigger;\n","import DictionaryTrigger from './DictionaryTrigger';\nexport * from './DictionaryTrigger';\nexport default DictionaryTrigger;\n"],"mappings":";;;;AA6BA,IAAMA,qBAAuD,UAAkC;CAC7F,MAAM,EAAE,UAAU,WAAW,OAAO,WAAW,QAAQ,KAAK,GAAG,SAAS;CACxE,MAAM,iBAAiB,GAAW,OAAO,mBAAmB,UAAU;AAEtE,QACE,oBAAC,UAAA;EACC,MAAK;EACL,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,iBAAe;EACV;EACL,GAAI;EAEH;GACM;;AAIb,kBAAkB,cAAc;AC9ChC,IAAA,8BDgDe"}
1
+ {"version":3,"file":"DictionaryTrigger.js","names":["DictionaryTrigger: React.FC<DictionaryTriggerProps>"],"sources":["../src/components/DictionaryTrigger/DictionaryTrigger.tsx","../src/components/DictionaryTrigger/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\n\nimport styles from './styles.module.scss';\n\nexport interface DictionaryTriggerProps extends Pick<React.InputHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onFocus' | 'onBlur'> {\n /**\n * Sets the content of the trigger.\n */\n children: React.ReactNode;\n /**\n * Indicates that the trigger is in use.\n */\n selected?: boolean;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /**\n * Sets the data-testid attribute.\n */\n testId?: string;\n /**\n * ref that is passed to the component\n */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nconst DictionaryTrigger: React.FC<DictionaryTriggerProps> = (props: DictionaryTriggerProps) => {\n const { children, selected = false, className, testId, ref, ...rest } = props;\n const triggerClasses = classNames(styles.dictionarytrigger, className);\n\n return (\n <button\n type=\"button\"\n data-testid={testId}\n data-analyticsid={AnalyticsId.DictionaryTrigger}\n className={triggerClasses}\n aria-expanded={selected}\n ref={ref}\n {...rest}\n >\n {children}\n </button>\n );\n};\n\nDictionaryTrigger.displayName = 'DictionaryTrigger';\n\nexport default DictionaryTrigger;\n","import DictionaryTrigger from './DictionaryTrigger';\nexport * from './DictionaryTrigger';\nexport default DictionaryTrigger;\n"],"mappings":";;;;AA6BA,IAAMA,qBAAuD,UAAkC;CAC7F,MAAM,EAAE,UAAU,WAAW,OAAO,WAAW,QAAQ,KAAK,GAAG,SAAS;CACxE,MAAM,iBAAiB,WAAW,OAAO,mBAAmB,UAAU;AAEtE,QACE,oBAAC,UAAA;EACC,MAAK;EACL,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,iBAAe;EACV;EACL,GAAI;EAEH;GACM;;AAIb,kBAAkB,cAAc;AC9ChC,IAAA,8BDgDe"}
package/lib/Drawer.js CHANGED
@@ -12,7 +12,7 @@ import { t as Close_default } from "./Close.js";
12
12
  import { t as useReturnFocusOnUnmount } from "./useReturnFocusOnUnmount.js";
13
13
  import { n as enableBodyScroll, t as disableBodyScroll } from "./scroll.js";
14
14
  import { t as Title_default } from "./Title2.js";
15
- import cn from "classnames";
15
+ import classNames from "classnames";
16
16
  import React, { useEffect, useRef } from "react";
17
17
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
18
  import { AnimatePresence, useAnimate, usePresence } from "motion/react";
@@ -60,7 +60,7 @@ var InnerDrawer = (props) => {
60
60
  ...resources
61
61
  };
62
62
  const contentIsScrollable = contentRef.current && contentRef.current.scrollHeight > contentRef.current.clientHeight;
63
- const headerStyling = cn(styles.drawer__header, headerClasses, { [styles["drawer__header--no-close-button"]]: noCloseButton });
63
+ const headerStyling = classNames(styles.drawer__header, headerClasses, { [styles["drawer__header--no-close-button"]]: noCloseButton });
64
64
  const hasFooterContent = typeof footerContent !== "undefined" && footerContent || onPrimaryAction || onSecondaryAction;
65
65
  useFocusTrap_default(containerRef, true);
66
66
  useReturnFocusOnUnmount(containerRef);
@@ -147,7 +147,7 @@ var InnerDrawer = (props) => {
147
147
  ref: overlayRef,
148
148
  "aria-hidden": "true"
149
149
  }), /* @__PURE__ */ jsxs("div", {
150
- className: cn(styles.drawer__container, { [styles["drawer__container--right"]]: desktopDirection === "right" }),
150
+ className: classNames(styles.drawer__container, { [styles["drawer__container--right"]]: desktopDirection === "right" }),
151
151
  ref: containerRef,
152
152
  role: "dialog",
153
153
  "aria-modal": "true",
@@ -172,7 +172,7 @@ var InnerDrawer = (props) => {
172
172
  })]
173
173
  }),
174
174
  /* @__PURE__ */ jsx("div", {
175
- className: cn(styles["drawer__content__shadow"], styles["drawer__content__shadow--top"]),
175
+ className: classNames(styles["drawer__content__shadow"], styles["drawer__content__shadow--top"]),
176
176
  style: {
177
177
  opacity: !topContentVisible && contentIsScrollable ? 1 : 0,
178
178
  top: headerHeight
@@ -197,7 +197,7 @@ var InnerDrawer = (props) => {
197
197
  ]
198
198
  }),
199
199
  /* @__PURE__ */ jsx("div", {
200
- className: cn(styles["drawer__content__shadow"], styles["drawer__content__shadow--bottom"]),
200
+ className: classNames(styles["drawer__content__shadow"], styles["drawer__content__shadow--bottom"]),
201
201
  style: {
202
202
  opacity: !bottomContentVisible && contentIsScrollable ? 1 : 0,
203
203
  bottom: hasFooterContent ? footerHeight : 0
package/lib/Drawer.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.js","names":["Drawer: React.FC<DrawerProps>","InnerDrawer: React.FC<InnerDrawerProps>","mergedResources: HNDesignsystemDrawer"],"sources":["../src/resources/HN.Designsystem.Drawer.en-GB.json","../src/resources/HN.Designsystem.Drawer.nb-NO.json","../src/components/Drawer/resourceHelper.ts","../src/components/Drawer/Drawer.tsx","../src/components/Drawer/index.ts"],"sourcesContent":["{\n \"ariaLabelCloseBtn\": \"Close\"\n}\n","{\n \"ariaLabelCloseBtn\": \"Lukk\"\n}\n","import type { HNDesignsystemDrawer } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.Drawer.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.Drawer.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemDrawer => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import React, { useEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\nimport { AnimatePresence, useAnimate, usePresence } from 'motion/react';\n\nimport type { HNDesignsystemDrawer } from '../../resources/Resources';\nimport type { TitleTags } from '../Title';\n\nimport { getResources } from './resourceHelper';\nimport { AnalyticsId, KeyboardEventKey, LanguageLocales, ZIndex } from '../../constants';\nimport useFocusTrap from '../../hooks/useFocusTrap';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { useIsVisible } from '../../hooks/useIsVisible';\nimport { useKeyboardEvent } from '../../hooks/useKeyboardEvent';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport { useOutsideEvent } from '../../hooks/useOutsideEvent';\nimport { useReturnFocusOnUnmount } from '../../hooks/useReturnFocusOnUnmount';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { disableBodyScroll, enableBodyScroll } from '../../utils/scroll';\nimport uuid from '../../utils/uuid';\nimport Button from '../Button';\nimport Close from '../Close';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\ntype DesktopDirections = 'left' | 'right';\n\nexport interface DrawerProps extends InnerDrawerProps {\n /** Opens and closes the drawer */\n isOpen: boolean;\n}\n\nexport interface InnerDrawerProps {\n /** Sets the aria-label of the drawer */\n ariaLabel?: string;\n /** Sets the aria-labelledby of the drawer */\n ariaLabelledBy?: string;\n /** Sets the style of the Drawer Close button. Meant for use by HelpDrawer */\n closeColor?: 'blueberry' | 'plum';\n /** Direction of the drawer on desktop. Default: left */\n desktopDirection?: DesktopDirections;\n /** Sets the style of the Drawer header */\n headerClasses?: string;\n /** Title to display in the header of the drawer */\n title: string;\n /** id of the drawer title */\n titleId?: string;\n /** Changes the underlying element of the title. Default: h3 */\n titleHtmlMarkup?: TitleTags;\n /** Callback that triggers when clicking on close button or outside the drawer, update isOpen state when this triggers */\n onRequestClose?: () => void;\n /** Optional footer content that can be rendered instead of default CTA(s) */\n footerContent?: React.ReactNode;\n /** Main content of the drawer */\n children?: React.ReactNode;\n /** Hides the close button */\n noCloseButton?: boolean;\n /** Primary CTA callback */\n onPrimaryAction?: () => void;\n /** Text for primary CTA button if you want a default CTA button rendered (instead of `footerContent`) */\n primaryActionText?: string;\n /** Text for secondary CTA button if you want a default CTA button rendered (instead of `footerContent`) */\n secondaryActionText?: string;\n /** Secondary CTA callback */\n onSecondaryAction?: () => void;\n /** Customize the z-index of the drawer */\n zIndex?: number;\n /** Resources for component */\n resources?: Partial<HNDesignsystemDrawer>;\n /** Sets mobile styling and animation from outer level Drawer */\n isMobile?: boolean;\n}\n\nconst Drawer: React.FC<DrawerProps> = props => {\n const { isOpen, ...rest } = props;\n const isMobile = useIsMobileBreakpoint();\n\n return <AnimatePresence>{isOpen && <InnerDrawer {...rest} isMobile={isMobile} />}</AnimatePresence>;\n};\n\nconst InnerDrawer: React.FC<InnerDrawerProps> = props => {\n const {\n ariaLabel,\n ariaLabelledBy,\n children,\n closeColor = 'blueberry',\n desktopDirection = 'left',\n footerContent,\n headerClasses,\n noCloseButton = false,\n onPrimaryAction,\n onRequestClose,\n onSecondaryAction,\n primaryActionText,\n secondaryActionText,\n title,\n titleHtmlMarkup = 'h3',\n titleId = uuid(),\n zIndex = ZIndex.OverlayScreen,\n resources,\n isMobile,\n } = props;\n\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledBy, fallbackId: titleId });\n const overlayRef = useRef<HTMLDivElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n // topContent and bottomContent are used to detect scroll position for shadow effects\n const topContent = useRef<HTMLDivElement>(null);\n const bottomContent = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const footerRef = useRef<HTMLDivElement>(null);\n const [scope, animate] = useAnimate();\n const [isPresent, safeToRemove] = usePresence();\n const [headerHeight, setHeaderHeight] = React.useState(0);\n const [footerHeight, setFooterHeight] = React.useState(0);\n const topContentVisible = useIsVisible(topContent);\n const bottomContentVisible = useIsVisible(bottomContent, 0);\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemDrawer = {\n ...defaultResources,\n ...resources,\n };\n\n const contentIsScrollable = contentRef.current && contentRef.current.scrollHeight > contentRef.current.clientHeight;\n const headerStyling = classNames(styles.drawer__header, headerClasses, {\n [styles['drawer__header--no-close-button']]: noCloseButton,\n });\n const hasFooterContent = (typeof footerContent !== 'undefined' && footerContent) || onPrimaryAction || onSecondaryAction;\n\n useFocusTrap(containerRef, true);\n useReturnFocusOnUnmount(containerRef);\n useOutsideEvent(containerRef, () => {\n if (onRequestClose) onRequestClose();\n });\n useKeyboardEvent(containerRef, () => onRequestClose && onRequestClose(), [KeyboardEventKey.Escape]);\n\n useEffect(() => {\n containerRef.current?.focus();\n disableBodyScroll();\n\n return (): void => {\n enableBodyScroll();\n };\n }, []);\n\n // Measure header and footer heights\n useEffect(() => {\n const updateHeights = (): void => {\n if (headerRef.current) {\n setHeaderHeight(headerRef.current.offsetHeight);\n }\n if (footerRef.current) {\n setFooterHeight(footerRef.current.offsetHeight);\n }\n };\n\n updateHeights();\n\n // Update heights when content changes\n const resizeObserver = new ResizeObserver(updateHeights);\n if (headerRef.current) {\n resizeObserver.observe(headerRef.current);\n }\n if (footerRef.current) {\n resizeObserver.observe(footerRef.current);\n }\n\n return (): void => {\n resizeObserver.disconnect();\n };\n }, [hasFooterContent]);\n\n // Open animation.\n useEffect(() => {\n if (!overlayRef.current || !containerRef.current) return;\n\n if (!isPresent) {\n closeDrawer();\n return;\n }\n\n if (isMobile) {\n animate(containerRef.current, { y: '0' }, { duration: 0.3, ease: 'easeInOut' });\n } else {\n animate(containerRef.current, { x: '0' }, { duration: 0.3, ease: 'easeInOut' });\n }\n\n animate(overlayRef.current, { opacity: 1, pointerEvents: 'auto' }, { duration: 0.3, ease: 'easeInOut' });\n }, [isPresent]);\n\n // Close animasjon, vi kaller `onClose()` til slutt\n const closeDrawer = (): void => {\n if (!overlayRef.current || !containerRef.current) return;\n\n animate(overlayRef.current, { opacity: 0, pointerEvents: 'none' }, { duration: 0.3, ease: 'easeInOut' });\n\n if (isMobile) {\n animate(\n containerRef.current,\n { y: '100%' },\n {\n duration: 0.3,\n ease: 'easeInOut',\n onComplete: () => {\n if (safeToRemove) safeToRemove();\n },\n }\n );\n } else {\n animate(\n containerRef.current,\n { x: desktopDirection === 'left' ? '-100%' : '100%' },\n {\n duration: 0.3,\n ease: 'easeInOut',\n onComplete: () => {\n if (safeToRemove) safeToRemove();\n },\n }\n );\n }\n };\n\n const handleCTA = (callback?: () => void): void => {\n if (callback) {\n callback();\n }\n };\n\n return (\n <div className={styles.drawer} ref={scope} style={{ zIndex }} data-analyticsid={AnalyticsId.Drawer}>\n <div className={styles.drawer__overlay} ref={overlayRef} aria-hidden=\"true\" />\n <div\n className={classNames(styles.drawer__container, {\n [styles['drawer__container--right']]: desktopDirection === 'right',\n })}\n ref={containerRef}\n role=\"dialog\"\n aria-modal=\"true\"\n tabIndex={-1}\n {...ariaLabelAttributes}\n >\n <div className={styles.drawer__container__inner}>\n <div className={headerStyling} ref={headerRef}>\n <Title id={ariaLabelAttributes?.['aria-labelledby']} htmlMarkup={titleHtmlMarkup} appearance=\"title3\">\n {title}\n </Title>\n {!noCloseButton && onRequestClose != undefined && (\n <Close\n ariaLabel={mergedResources.ariaLabelCloseBtn}\n color={closeColor}\n onClick={onRequestClose}\n className={styles['drawer__header__close-button']}\n />\n )}\n </div>\n <div\n className={classNames(styles['drawer__content__shadow'], styles['drawer__content__shadow--top'])}\n style={{\n opacity: !topContentVisible && contentIsScrollable ? 1 : 0,\n top: headerHeight,\n }}\n />\n <div\n className={styles.drawer__content}\n tabIndex={contentIsScrollable ? 0 : undefined}\n role={contentIsScrollable ? 'region' : undefined}\n {...(contentIsScrollable ? ariaLabelAttributes : {})}\n ref={contentRef}\n >\n <div ref={topContent} />\n <div className={styles['drawer__content__children']}>{children}</div>\n <div ref={bottomContent} style={{ height: '1px' }} />\n </div>\n <div\n className={classNames(styles['drawer__content__shadow'], styles['drawer__content__shadow--bottom'])}\n style={{\n opacity: !bottomContentVisible && contentIsScrollable ? 1 : 0,\n bottom: hasFooterContent ? footerHeight : 0,\n }}\n />\n </div>\n {hasFooterContent && (\n <div className={styles.drawer__footer} ref={footerRef}>\n {footerContent ? (\n footerContent\n ) : (\n <>\n {onPrimaryAction && <Button onClick={() => handleCTA(onPrimaryAction)}>{primaryActionText}</Button>}\n {onSecondaryAction && (\n <Button variant=\"borderless\" onClick={() => handleCTA(onSecondaryAction)}>\n {secondaryActionText}\n </Button>\n )}\n </>\n )}\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default Drawer;\n","import Drawer from './Drawer';\nexport * from './Drawer';\nexport default Drawer;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AEMA,MAAa,gBAAgB,aAAoD;AAC/E,SAAQ,UAAR;EACE,KAAK,gBAAgB,QACnB,QAAO;EACT,KAAK,gBAAgB;EACrB,QACE,QAAO;;;AC8Db,IAAMA,UAAgC,UAAS;CAC7C,MAAM,EAAE,QAAQ,GAAG,SAAS;CAC5B,MAAM,WAAW,uBAAuB;AAExC,QAAO,oBAAC,iBAAA,EAAA,UAAiB,UAAU,oBAAC,aAAA;EAAY,GAAI;EAAgB;GAAY,EAAA,CAAmB;;AAGrG,IAAMC,eAA0C,UAAS;CACvD,MAAM,EACJ,WACA,gBACA,UACA,aAAa,aACb,mBAAmB,QACnB,eACA,eACA,gBAAgB,OAChB,i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,mBAAmB,eAAe;OAC3C;OACD;;KACE,EACL,oBACC,oBAAC,OAAA;IAAI,WAAW,OAAO;IAAgB,KAAK;cACzC,gBACC,gBAEA,qBAAA,UAAA,EAAA,UAAA,CACG,mBAAmB,oBAAC,gBAAA;KAAO,eAAe,UAAU,gBAAgB;eAAG;MAA2B,EAClG,qBACC,oBAAC,gBAAA;KAAO,SAAQ;KAAa,eAAe,UAAU,kBAAkB;eACrE;MACM,CAAA,EAAA,CAEV;KAED,CAAA;IAEJ,CAAA;GACF;;AC7SV,IAAA,mBDiTe"}
1
+ {"version":3,"file":"Drawer.js","names":["Drawer: React.FC<DrawerProps>","InnerDrawer: React.FC<InnerDrawerProps>","mergedResources: HNDesignsystemDrawer"],"sources":["../src/resources/HN.Designsystem.Drawer.en-GB.json","../src/resources/HN.Designsystem.Drawer.nb-NO.json","../src/components/Drawer/resourceHelper.ts","../src/components/Drawer/Drawer.tsx","../src/components/Drawer/index.ts"],"sourcesContent":["{\n \"ariaLabelCloseBtn\": \"Close\"\n}\n","{\n \"ariaLabelCloseBtn\": \"Lukk\"\n}\n","import type { HNDesignsystemDrawer } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.Drawer.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.Drawer.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemDrawer => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import React, { useEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\nimport { AnimatePresence, useAnimate, usePresence } from 'motion/react';\n\nimport type { HNDesignsystemDrawer } from '../../resources/Resources';\nimport type { TitleTags } from '../Title';\n\nimport { getResources } from './resourceHelper';\nimport { AnalyticsId, KeyboardEventKey, LanguageLocales, ZIndex } from '../../constants';\nimport useFocusTrap from '../../hooks/useFocusTrap';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { useIsVisible } from '../../hooks/useIsVisible';\nimport { useKeyboardEvent } from '../../hooks/useKeyboardEvent';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport { useOutsideEvent } from '../../hooks/useOutsideEvent';\nimport { useReturnFocusOnUnmount } from '../../hooks/useReturnFocusOnUnmount';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { disableBodyScroll, enableBodyScroll } from '../../utils/scroll';\nimport uuid from '../../utils/uuid';\nimport Button from '../Button';\nimport Close from '../Close';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\ntype DesktopDirections = 'left' | 'right';\n\nexport interface DrawerProps extends InnerDrawerProps {\n /** Opens and closes the drawer */\n isOpen: boolean;\n}\n\nexport interface InnerDrawerProps {\n /** Sets the aria-label of the drawer */\n ariaLabel?: string;\n /** Sets the aria-labelledby of the drawer */\n ariaLabelledBy?: string;\n /** Sets the style of the Drawer Close button. Meant for use by HelpDrawer */\n closeColor?: 'blueberry' | 'plum';\n /** Direction of the drawer on desktop. Default: left */\n desktopDirection?: DesktopDirections;\n /** Sets the style of the Drawer header */\n headerClasses?: string;\n /** Title to display in the header of the drawer */\n title: string;\n /** id of the drawer title */\n titleId?: string;\n /** Changes the underlying element of the title. Default: h3 */\n titleHtmlMarkup?: TitleTags;\n /** Callback that triggers when clicking on close button or outside the drawer, update isOpen state when this triggers */\n onRequestClose?: () => void;\n /** Optional footer content that can be rendered instead of default CTA(s) */\n footerContent?: React.ReactNode;\n /** Main content of the drawer */\n children?: React.ReactNode;\n /** Hides the close button */\n noCloseButton?: boolean;\n /** Primary CTA callback */\n onPrimaryAction?: () => void;\n /** Text for primary CTA button if you want a default CTA button rendered (instead of `footerContent`) */\n primaryActionText?: string;\n /** Text for secondary CTA button if you want a default CTA button rendered (instead of `footerContent`) */\n secondaryActionText?: string;\n /** Secondary CTA callback */\n onSecondaryAction?: () => void;\n /** Customize the z-index of the drawer */\n zIndex?: number;\n /** Resources for component */\n resources?: Partial<HNDesignsystemDrawer>;\n /** Sets mobile styling and animation from outer level Drawer */\n isMobile?: boolean;\n}\n\nconst Drawer: React.FC<DrawerProps> = props => {\n const { isOpen, ...rest } = props;\n const isMobile = useIsMobileBreakpoint();\n\n return <AnimatePresence>{isOpen && <InnerDrawer {...rest} isMobile={isMobile} />}</AnimatePresence>;\n};\n\nconst InnerDrawer: React.FC<InnerDrawerProps> = props => {\n const {\n ariaLabel,\n ariaLabelledBy,\n children,\n closeColor = 'blueberry',\n desktopDirection = 'left',\n footerContent,\n headerClasses,\n noCloseButton = false,\n onPrimaryAction,\n onRequestClose,\n onSecondaryAction,\n primaryActionText,\n secondaryActionText,\n title,\n titleHtmlMarkup = 'h3',\n titleId = uuid(),\n zIndex = ZIndex.OverlayScreen,\n resources,\n isMobile,\n } = props;\n\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledBy, fallbackId: titleId });\n const overlayRef = useRef<HTMLDivElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n // topContent and bottomContent are used to detect scroll position for shadow effects\n const topContent = useRef<HTMLDivElement>(null);\n const bottomContent = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const footerRef = useRef<HTMLDivElement>(null);\n const [scope, animate] = useAnimate();\n const [isPresent, safeToRemove] = usePresence();\n const [headerHeight, setHeaderHeight] = React.useState(0);\n const [footerHeight, setFooterHeight] = React.useState(0);\n const topContentVisible = useIsVisible(topContent);\n const bottomContentVisible = useIsVisible(bottomContent, 0);\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemDrawer = {\n ...defaultResources,\n ...resources,\n };\n\n const contentIsScrollable = contentRef.current && contentRef.current.scrollHeight > contentRef.current.clientHeight;\n const headerStyling = classNames(styles.drawer__header, headerClasses, {\n [styles['drawer__header--no-close-button']]: noCloseButton,\n });\n const hasFooterContent = (typeof footerContent !== 'undefined' && footerContent) || onPrimaryAction || onSecondaryAction;\n\n useFocusTrap(containerRef, true);\n useReturnFocusOnUnmount(containerRef);\n useOutsideEvent(containerRef, () => {\n if (onRequestClose) onRequestClose();\n });\n useKeyboardEvent(containerRef, () => onRequestClose && onRequestClose(), [KeyboardEventKey.Escape]);\n\n useEffect(() => {\n containerRef.current?.focus();\n disableBodyScroll();\n\n return (): void => {\n enableBodyScroll();\n };\n }, []);\n\n // Measure header and footer heights\n useEffect(() => {\n const updateHeights = (): void => {\n if (headerRef.current) {\n setHeaderHeight(headerRef.current.offsetHeight);\n }\n if (footerRef.current) {\n setFooterHeight(footerRef.current.offsetHeight);\n }\n };\n\n updateHeights();\n\n // Update heights when content changes\n const resizeObserver = new ResizeObserver(updateHeights);\n if (headerRef.current) {\n resizeObserver.observe(headerRef.current);\n }\n if (footerRef.current) {\n resizeObserver.observe(footerRef.current);\n }\n\n return (): void => {\n resizeObserver.disconnect();\n };\n }, [hasFooterContent]);\n\n // Open animation.\n useEffect(() => {\n if (!overlayRef.current || !containerRef.current) return;\n\n if (!isPresent) {\n closeDrawer();\n return;\n }\n\n if (isMobile) {\n animate(containerRef.current, { y: '0' }, { duration: 0.3, ease: 'easeInOut' });\n } else {\n animate(containerRef.current, { x: '0' }, { duration: 0.3, ease: 'easeInOut' });\n }\n\n animate(overlayRef.current, { opacity: 1, pointerEvents: 'auto' }, { duration: 0.3, ease: 'easeInOut' });\n }, [isPresent]);\n\n // Close animasjon, vi kaller `onClose()` til slutt\n const closeDrawer = (): void => {\n if (!overlayRef.current || !containerRef.current) return;\n\n animate(overlayRef.current, { opacity: 0, pointerEvents: 'none' }, { duration: 0.3, ease: 'easeInOut' });\n\n if (isMobile) {\n animate(\n containerRef.current,\n { y: '100%' },\n {\n duration: 0.3,\n ease: 'easeInOut',\n onComplete: () => {\n if (safeToRemove) safeToRemove();\n },\n }\n );\n } else {\n animate(\n containerRef.current,\n { x: desktopDirection === 'left' ? '-100%' : '100%' },\n {\n duration: 0.3,\n ease: 'easeInOut',\n onComplete: () => {\n if (safeToRemove) safeToRemove();\n },\n }\n );\n }\n };\n\n const handleCTA = (callback?: () => void): void => {\n if (callback) {\n callback();\n }\n };\n\n return (\n <div className={styles.drawer} ref={scope} style={{ zIndex }} data-analyticsid={AnalyticsId.Drawer}>\n <div className={styles.drawer__overlay} ref={overlayRef} aria-hidden=\"true\" />\n <div\n className={classNames(styles.drawer__container, {\n [styles['drawer__container--right']]: desktopDirection === 'right',\n })}\n ref={containerRef}\n role=\"dialog\"\n aria-modal=\"true\"\n tabIndex={-1}\n {...ariaLabelAttributes}\n >\n <div className={styles.drawer__container__inner}>\n <div className={headerStyling} ref={headerRef}>\n <Title id={ariaLabelAttributes?.['aria-labelledby']} htmlMarkup={titleHtmlMarkup} appearance=\"title3\">\n {title}\n </Title>\n {!noCloseButton && onRequestClose != undefined && (\n <Close\n ariaLabel={mergedResources.ariaLabelCloseBtn}\n color={closeColor}\n onClick={onRequestClose}\n className={styles['drawer__header__close-button']}\n />\n )}\n </div>\n <div\n className={classNames(styles['drawer__content__shadow'], styles['drawer__content__shadow--top'])}\n style={{\n opacity: !topContentVisible && contentIsScrollable ? 1 : 0,\n top: headerHeight,\n }}\n />\n <div\n className={styles.drawer__content}\n tabIndex={contentIsScrollable ? 0 : undefined}\n role={contentIsScrollable ? 'region' : undefined}\n {...(contentIsScrollable ? ariaLabelAttributes : {})}\n ref={contentRef}\n >\n <div ref={topContent} />\n <div className={styles['drawer__content__children']}>{children}</div>\n <div ref={bottomContent} style={{ height: '1px' }} />\n </div>\n <div\n className={classNames(styles['drawer__content__shadow'], styles['drawer__content__shadow--bottom'])}\n style={{\n opacity: !bottomContentVisible && contentIsScrollable ? 1 : 0,\n bottom: hasFooterContent ? footerHeight : 0,\n }}\n />\n </div>\n {hasFooterContent && (\n <div className={styles.drawer__footer} ref={footerRef}>\n {footerContent ? (\n footerContent\n ) : (\n <>\n {onPrimaryAction && <Button onClick={() => handleCTA(onPrimaryAction)}>{primaryActionText}</Button>}\n {onSecondaryAction && (\n <Button variant=\"borderless\" onClick={() => handleCTA(onSecondaryAction)}>\n {secondaryActionText}\n </Button>\n )}\n </>\n )}\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default Drawer;\n","import Drawer from './Drawer';\nexport * from './Drawer';\nexport default Drawer;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AEMA,MAAa,gBAAgB,aAAoD;AAC/E,SAAQ,UAAR;EACE,KAAK,gBAAgB,QACnB,QAAO;EACT,KAAK,gBAAgB;EACrB,QACE,QAAO;;;AC8Db,IAAMA,UAAgC,UAAS;CAC7C,MAAM,EAAE,QAAQ,GAAG,SAAS;CAC5B,MAAM,WAAW,uBAAuB;AAExC,QAAO,oBAAC,iBAAA,EAAA,UAAiB,UAAU,oBAAC,aAAA;EAAY,GAAI;EAAgB;GAAY,EAAA,CAAmB;;AAGrG,IAAMC,eAA0C,UAAS;CACvD,MAAM,EACJ,WACA,gBACA,UACA,aAAa,aACb,mBAAmB,QACnB,eACA,eACA,gBAAgB,OAChB,iBACA,gBACA,mBACA,mBACA,qBACA,OACA,kBAAkB,MAClB,UAAU,cAAM,EAChB,SAAS,OAAO,eAChB,WACA,aACE;CAEJ,MAAM,sBAAsB,uBAAuB;EAAE,OAAO;EAAW,IAAI;EAAgB,YAAY;EAAS,CAAC;CACjH,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,eAAe,OAAuB,KAAK;CACjD,MAAM,aAAa,OAAuB,KAAK;CAE/C,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,gBAAgB,OAAuB,KAAK;CAClD,MAAM,YAAY,OAAuB,KAAK;CAC9C,MAAM,YAAY,OAAuB,KAAK;CAC9C,MAAM,CAAC,OAAO,WAAW,YAAY;CACrC,MAAM,CAAC,WAAW,gBAAgB,aAAa;CAC/C,MAAM,CAAC,cAAc,mBAAmB,MAAM,SAAS,EAAE;CACzD,MAAM,CAAC,c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