@helsenorge/designsystem-react 14.9.2 → 15.0.0-beta.1

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 (1329) hide show
  1. package/lib/AnchorLink.js +11 -7
  2. package/lib/AnchorLink.js.map +1 -1
  3. package/lib/AsChildSlot.js +8 -4
  4. package/lib/AsChildSlot.js.map +1 -1
  5. package/lib/Avatar.js +16 -10
  6. package/lib/Avatar.js.map +1 -1
  7. package/lib/Badge.js +9 -5
  8. package/lib/Badge.js.map +1 -1
  9. package/lib/Button.js +14 -10
  10. package/lib/Button.js.map +1 -1
  11. package/lib/CHANGELOG.md +10 -0
  12. package/lib/Checkbox.js +12 -11
  13. package/lib/Checkbox.js.map +1 -1
  14. package/lib/Chip.js +17 -10
  15. package/lib/Chip.js.map +1 -1
  16. package/lib/Close.js +12 -8
  17. package/lib/Close.js.map +1 -1
  18. package/lib/DictionaryTrigger.js +7 -3
  19. package/lib/DictionaryTrigger.js.map +1 -1
  20. package/lib/Drawer.js +26 -19
  21. package/lib/Drawer.js.map +1 -1
  22. package/lib/DrawerNavigation.js +9 -4
  23. package/lib/DrawerNavigation.js.map +1 -1
  24. package/lib/Duolist.js +10 -6
  25. package/lib/Duolist.js.map +1 -1
  26. package/lib/ElementHeader.js +15 -12
  27. package/lib/ElementHeader.js.map +1 -1
  28. package/lib/ElementHeaderText.js +7 -5
  29. package/lib/ElementHeaderText.js.map +1 -1
  30. package/lib/{_rolldown_dynamic_import_helper.js → ErrorBoundary.js} +14 -11
  31. package/lib/ErrorBoundary.js.map +1 -0
  32. package/lib/ErrorWrapper.js +7 -3
  33. package/lib/ErrorWrapper.js.map +1 -1
  34. package/lib/Expander.js +20 -14
  35. package/lib/Expander.js.map +1 -1
  36. package/lib/FilterButton.js +11 -7
  37. package/lib/FilterButton.js.map +1 -1
  38. package/lib/FilterButtonAndChipsWrapper.js +6 -2
  39. package/lib/FilterButtonAndChipsWrapper.js.map +1 -1
  40. package/lib/FilterDrawer.js +20 -9
  41. package/lib/FilterDrawer.js.map +1 -1
  42. package/lib/FilterLinkList.js +9 -8
  43. package/lib/FilterLinkList.js.map +1 -1
  44. package/lib/FilterOverviewLinkList.js +9 -5
  45. package/lib/FilterOverviewLinkList.js.map +1 -1
  46. package/lib/FilterOverviewSearch.js +8 -4
  47. package/lib/FilterOverviewSearch.js.map +1 -1
  48. package/lib/FilterResultCountAndSortWrapper.js +6 -2
  49. package/lib/FilterResultCountAndSortWrapper.js.map +1 -1
  50. package/lib/FilterSearch.js +12 -11
  51. package/lib/FilterSearch.js.map +1 -1
  52. package/lib/FilterSort.js +9 -5
  53. package/lib/FilterSort.js.map +1 -1
  54. package/lib/FilterStateWrapper.js +6 -2
  55. package/lib/FilterStateWrapper.js.map +1 -1
  56. package/lib/FormFieldTag.js +12 -5
  57. package/lib/FormFieldTag.js.map +1 -1
  58. package/lib/FormGroup.js +14 -13
  59. package/lib/FormGroup.js.map +1 -1
  60. package/lib/FormLayout.js +17 -11
  61. package/lib/FormLayout.js.map +1 -1
  62. package/lib/HN.Designsystem.Dropdown.nb-NO.js +1 -0
  63. package/lib/HelpDetails.js +3 -2
  64. package/lib/HelpDetails.js.map +1 -1
  65. package/lib/HelpTriggerIcon.js +15 -10
  66. package/lib/HelpTriggerIcon.js.map +1 -1
  67. package/lib/HelpTriggerStandalone.js +11 -7
  68. package/lib/HelpTriggerStandalone.js.map +1 -1
  69. package/lib/HighlightPanel.js +9 -5
  70. package/lib/HighlightPanel.js.map +1 -1
  71. package/lib/Highlighter.js +10 -6
  72. package/lib/Highlighter.js.map +1 -1
  73. package/lib/HorizontalScroll.js +10 -6
  74. package/lib/HorizontalScroll.js.map +1 -1
  75. package/lib/Icon.js +6 -2
  76. package/lib/Icon.js.map +1 -1
  77. package/lib/Illustration.js +8 -4
  78. package/lib/Illustration.js.map +1 -1
  79. package/lib/InfoTeaser.js +13 -6
  80. package/lib/InfoTeaser.js.map +1 -1
  81. package/lib/Input.js +30 -25
  82. package/lib/Input.js.map +1 -1
  83. package/lib/LazyIcon.js +16 -10
  84. package/lib/LazyIcon.js.map +1 -1
  85. package/lib/LazyIllustration.js +16 -12
  86. package/lib/LazyIllustration.js.map +1 -1
  87. package/lib/LinkList.js +19 -12
  88. package/lib/LinkList.js.map +1 -1
  89. package/lib/List.js +7 -3
  90. package/lib/List.js.map +1 -1
  91. package/lib/ListEditMode.js +14 -9
  92. package/lib/ListEditMode.js.map +1 -1
  93. package/lib/MaxCharacters.js +5 -5
  94. package/lib/MaxCharacters.js.map +1 -1
  95. package/lib/NotificationBadge.js +12 -11
  96. package/lib/NotificationBadge.js.map +1 -1
  97. package/lib/PanelTitle.js +7 -3
  98. package/lib/PanelTitle.js.map +1 -1
  99. package/lib/PopOver.js +15 -9
  100. package/lib/PopOver.js.map +1 -1
  101. package/lib/Select.js +13 -9
  102. package/lib/Select.js.map +1 -1
  103. package/lib/SingleSelectItem.js +8 -5
  104. package/lib/SingleSelectItem.js.map +1 -1
  105. package/lib/Slider.js +30 -26
  106. package/lib/Slider.js.map +1 -1
  107. package/lib/Spacer.js +7 -3
  108. package/lib/Spacer.js.map +1 -1
  109. package/lib/StatusDot.js +36 -30
  110. package/lib/StatusDot.js.map +1 -1
  111. package/lib/StatusDotList.js +7 -3
  112. package/lib/StatusDotList.js.map +1 -1
  113. package/lib/StepButtons.js +8 -4
  114. package/lib/StepButtons.js.map +1 -1
  115. package/lib/TabList.js +29 -22
  116. package/lib/TabList.js.map +1 -1
  117. package/lib/TabPanel.js +6 -2
  118. package/lib/TabPanel.js.map +1 -1
  119. package/lib/TableBody.js +10 -6
  120. package/lib/TableBody.js.map +1 -1
  121. package/lib/TableCell.js +10 -6
  122. package/lib/TableCell.js.map +1 -1
  123. package/lib/TableExpandedRow.js +14 -10
  124. package/lib/TableExpandedRow.js.map +1 -1
  125. package/lib/TableExpanderCell.js +13 -11
  126. package/lib/TableExpanderCell.js.map +1 -1
  127. package/lib/TableHead.js +14 -10
  128. package/lib/TableHead.js.map +1 -1
  129. package/lib/TableHeadCell.js +17 -13
  130. package/lib/TableHeadCell.js.map +1 -1
  131. package/lib/TableRow.js +19 -14
  132. package/lib/TableRow.js.map +1 -1
  133. package/lib/Textarea.js +18 -11
  134. package/lib/Textarea.js.map +1 -1
  135. package/lib/Title.js +8 -5
  136. package/lib/Title.js.map +1 -1
  137. package/lib/Toast.js +7 -6
  138. package/lib/Toast.js.map +1 -1
  139. package/lib/__mocks__/IntersectionObserver.js +3 -2
  140. package/lib/__mocks__/IntersectionObserver.js.map +1 -1
  141. package/lib/__mocks__/MutationObserver.js +3 -2
  142. package/lib/__mocks__/MutationObserver.js.map +1 -1
  143. package/lib/__mocks__/ResizeObserver.js +3 -2
  144. package/lib/__mocks__/ResizeObserver.js.map +1 -1
  145. package/lib/__mocks__/matchMedia.js +3 -1
  146. package/lib/__mocks__/matchMedia.js.map +1 -1
  147. package/lib/__mocks__/useLayoutEvent.js +2 -0
  148. package/lib/__mocks__/useLayoutEvent.js.map +1 -1
  149. package/lib/__mocks__/useOutsideEvent.js +2 -0
  150. package/lib/__mocks__/useOutsideEvent.js.map +1 -1
  151. package/lib/__mocks__/usePseudoClasses.js +2 -0
  152. package/lib/__mocks__/usePseudoClasses.js.map +1 -1
  153. package/lib/__mocks__/useSize.js +2 -0
  154. package/lib/__mocks__/useSize.js.map +1 -1
  155. package/lib/__mocks__/uuid.js +6 -1
  156. package/lib/__mocks__/uuid.js.map +1 -1
  157. package/lib/components/ArticleTeaser/index.js +10 -3
  158. package/lib/components/ArticleTeaser/index.js.map +1 -1
  159. package/lib/components/Checkbox/index.js +5 -1
  160. package/lib/components/Checkbox/index.js.map +1 -0
  161. package/lib/components/Chip/Chip.d.ts +0 -2
  162. package/lib/components/Dropdown/SingleSelect/index.js +4 -2
  163. package/lib/components/Dropdown/SingleSelect/index.js.map +1 -1
  164. package/lib/components/Dropdown/index.js +27 -19
  165. package/lib/components/Dropdown/index.js.map +1 -1
  166. package/lib/components/DropdownOld/index.js +25 -17
  167. package/lib/components/DropdownOld/index.js.map +1 -1
  168. package/lib/components/ElementHeader/index.js +4 -2
  169. package/lib/components/ElementHeader/index.js.map +1 -1
  170. package/lib/components/EmptyState/index.js +23 -17
  171. package/lib/components/EmptyState/index.js.map +1 -1
  172. package/lib/components/ExpanderHierarchy/index.js +23 -16
  173. package/lib/components/ExpanderHierarchy/index.js.map +1 -1
  174. package/lib/components/ExpanderList/index.js +13 -9
  175. package/lib/components/ExpanderList/index.js.map +1 -1
  176. package/lib/components/EyebrowHeader/index.js +6 -2
  177. package/lib/components/EyebrowHeader/index.js.map +1 -1
  178. package/lib/components/FavoriteButton/index.js +20 -11
  179. package/lib/components/FavoriteButton/index.js.map +1 -1
  180. package/lib/components/Filter/DrawerNavigation/index.js +6 -2
  181. package/lib/components/Filter/DrawerNavigation/index.js.map +1 -0
  182. package/lib/components/Filter/FilterLinkList/index.js +6 -2
  183. package/lib/components/Filter/FilterLinkList/index.js.map +1 -0
  184. package/lib/components/Filter/FilterSearch/index.js +6 -1
  185. package/lib/components/Filter/FilterSearch/index.js.map +1 -0
  186. package/lib/components/Filter/index.js +50 -12
  187. package/lib/components/Filter/index.js.map +1 -1
  188. package/lib/components/FormGroup/index.js +4 -2
  189. package/lib/components/FormGroup/index.js.map +1 -1
  190. package/lib/components/HelpBubble/index.js +11 -4
  191. package/lib/components/HelpBubble/index.js.map +1 -1
  192. package/lib/components/HelpDrawer/index.js +10 -3
  193. package/lib/components/HelpDrawer/index.js.map +1 -1
  194. package/lib/components/HelpExpanderInline/index.js +8 -4
  195. package/lib/components/HelpExpanderInline/index.js.map +1 -1
  196. package/lib/components/HelpExpanderStandalone/index.js +14 -10
  197. package/lib/components/HelpExpanderStandalone/index.js.map +1 -1
  198. package/lib/components/HelpPanel/index.js +6 -2
  199. package/lib/components/HelpPanel/index.js.map +1 -1
  200. package/lib/components/HelpTeaser/index.js +6 -2
  201. package/lib/components/HelpTeaser/index.js.map +1 -1
  202. package/lib/components/HelpTooltip/index.js +6 -2
  203. package/lib/components/HelpTooltip/index.js.map +1 -1
  204. package/lib/components/HelpTriggerInline/index.js +8 -4
  205. package/lib/components/HelpTriggerInline/index.js.map +1 -1
  206. package/lib/components/Icon/index.js +1 -1
  207. package/lib/components/Icons/ActiveMonitoring.js +3 -2
  208. package/lib/components/Icons/ActiveMonitoring.js.map +1 -1
  209. package/lib/components/Icons/AcupunctureBack.js +4 -3
  210. package/lib/components/Icons/AcupunctureBack.js.map +1 -1
  211. package/lib/components/Icons/AdditionalIconInformation.js +2 -0
  212. package/lib/components/Icons/AdditionalIconInformation.js.map +1 -1
  213. package/lib/components/Icons/AlarmClock.js +3 -2
  214. package/lib/components/Icons/AlarmClock.js.map +1 -1
  215. package/lib/components/Icons/AlertSignFill.js +17 -2
  216. package/lib/components/Icons/AlertSignFill.js.map +1 -0
  217. package/lib/components/Icons/AlertSignStroke.js +17 -2
  218. package/lib/components/Icons/AlertSignStroke.js.map +1 -0
  219. package/lib/components/Icons/Amputation.js +3 -2
  220. package/lib/components/Icons/Amputation.js.map +1 -1
  221. package/lib/components/Icons/Anxiety.js +3 -2
  222. package/lib/components/Icons/Anxiety.js.map +1 -1
  223. package/lib/components/Icons/Apple.js +3 -2
  224. package/lib/components/Icons/Apple.js.map +1 -1
  225. package/lib/components/Icons/Archive.js +3 -2
  226. package/lib/components/Icons/Archive.js.map +1 -1
  227. package/lib/components/Icons/ArmFlexing.js +3 -2
  228. package/lib/components/Icons/ArmFlexing.js.map +1 -1
  229. package/lib/components/Icons/ArrowDown.js +29 -2
  230. package/lib/components/Icons/ArrowDown.js.map +1 -0
  231. package/lib/components/Icons/ArrowLeft.js +3 -2
  232. package/lib/components/Icons/ArrowLeft.js.map +1 -1
  233. package/lib/components/Icons/ArrowRight.js +17 -2
  234. package/lib/components/Icons/ArrowRight.js.map +1 -0
  235. package/lib/components/Icons/ArrowUp.js +29 -2
  236. package/lib/components/Icons/ArrowUp.js.map +1 -0
  237. package/lib/components/Icons/ArrowUpRight.js +17 -2
  238. package/lib/components/Icons/ArrowUpRight.js.map +1 -0
  239. package/lib/components/Icons/Attachment.js +3 -2
  240. package/lib/components/Icons/Attachment.js.map +1 -1
  241. package/lib/components/Icons/Atv.js +3 -2
  242. package/lib/components/Icons/Atv.js.map +1 -1
  243. package/lib/components/Icons/Avatar.js +3 -2
  244. package/lib/components/Icons/Avatar.js.map +1 -1
  245. package/lib/components/Icons/AwakePersonOnPillow.js +3 -2
  246. package/lib/components/Icons/AwakePersonOnPillow.js.map +1 -1
  247. package/lib/components/Icons/Baby.js +3 -2
  248. package/lib/components/Icons/Baby.js.map +1 -1
  249. package/lib/components/Icons/BandAid.js +3 -2
  250. package/lib/components/Icons/BandAid.js.map +1 -1
  251. package/lib/components/Icons/BeerAndPills.js +3 -2
  252. package/lib/components/Icons/BeerAndPills.js.map +1 -1
  253. package/lib/components/Icons/Bell.js +3 -2
  254. package/lib/components/Icons/Bell.js.map +1 -1
  255. package/lib/components/Icons/Bike.js +3 -2
  256. package/lib/components/Icons/Bike.js.map +1 -1
  257. package/lib/components/Icons/BirthControl.js +3 -2
  258. package/lib/components/Icons/BirthControl.js.map +1 -1
  259. package/lib/components/Icons/BirthdayCake.js +3 -2
  260. package/lib/components/Icons/BirthdayCake.js.map +1 -1
  261. package/lib/components/Icons/Boat.js +3 -2
  262. package/lib/components/Icons/Boat.js.map +1 -1
  263. package/lib/components/Icons/Body.js +3 -2
  264. package/lib/components/Icons/Body.js.map +1 -1
  265. package/lib/components/Icons/Braille.js +3 -2
  266. package/lib/components/Icons/Braille.js.map +1 -1
  267. package/lib/components/Icons/Brain.js +3 -2
  268. package/lib/components/Icons/Brain.js.map +1 -1
  269. package/lib/components/Icons/BreastReconstruction.js +3 -2
  270. package/lib/components/Icons/BreastReconstruction.js.map +1 -1
  271. package/lib/components/Icons/BreastRemoval.js +3 -2
  272. package/lib/components/Icons/BreastRemoval.js.map +1 -1
  273. package/lib/components/Icons/Breasts.js +3 -2
  274. package/lib/components/Icons/Breasts.js.map +1 -1
  275. package/lib/components/Icons/BrokenHeart.js +3 -2
  276. package/lib/components/Icons/BrokenHeart.js.map +1 -1
  277. package/lib/components/Icons/BrokenPuzzle.js +3 -2
  278. package/lib/components/Icons/BrokenPuzzle.js.map +1 -1
  279. package/lib/components/Icons/Bus.js +3 -2
  280. package/lib/components/Icons/Bus.js.map +1 -1
  281. package/lib/components/Icons/Calendar.js +3 -2
  282. package/lib/components/Icons/Calendar.js.map +1 -1
  283. package/lib/components/Icons/CalendarChange.js +3 -2
  284. package/lib/components/Icons/CalendarChange.js.map +1 -1
  285. package/lib/components/Icons/CalendarCheck.js +3 -2
  286. package/lib/components/Icons/CalendarCheck.js.map +1 -1
  287. package/lib/components/Icons/CalendarEvent.js +3 -2
  288. package/lib/components/Icons/CalendarEvent.js.map +1 -1
  289. package/lib/components/Icons/CalendarSave.js +3 -2
  290. package/lib/components/Icons/CalendarSave.js.map +1 -1
  291. package/lib/components/Icons/Cancer.js +3 -2
  292. package/lib/components/Icons/Cancer.js.map +1 -1
  293. package/lib/components/Icons/Candle.js +3 -2
  294. package/lib/components/Icons/Candle.js.map +1 -1
  295. package/lib/components/Icons/Car.js +3 -2
  296. package/lib/components/Icons/Car.js.map +1 -1
  297. package/lib/components/Icons/Carton.js +3 -2
  298. package/lib/components/Icons/Carton.js.map +1 -1
  299. package/lib/components/Icons/Change.js +3 -2
  300. package/lib/components/Icons/Change.js.map +1 -1
  301. package/lib/components/Icons/Check.js +17 -2
  302. package/lib/components/Icons/Check.js.map +1 -0
  303. package/lib/components/Icons/CheckFill.js +29 -2
  304. package/lib/components/Icons/CheckFill.js.map +1 -0
  305. package/lib/components/Icons/CheckOutline.js +15 -2
  306. package/lib/components/Icons/CheckOutline.js.map +1 -0
  307. package/lib/components/Icons/Chest.js +3 -2
  308. package/lib/components/Icons/Chest.js.map +1 -1
  309. package/lib/components/Icons/ChevronDown.js +17 -2
  310. package/lib/components/Icons/ChevronDown.js.map +1 -0
  311. package/lib/components/Icons/ChevronLeft.js +17 -2
  312. package/lib/components/Icons/ChevronLeft.js.map +1 -0
  313. package/lib/components/Icons/ChevronRight.js +17 -2
  314. package/lib/components/Icons/ChevronRight.js.map +1 -0
  315. package/lib/components/Icons/ChevronUp.js +17 -2
  316. package/lib/components/Icons/ChevronUp.js.map +1 -0
  317. package/lib/components/Icons/ChevronsDown.js +3 -2
  318. package/lib/components/Icons/ChevronsDown.js.map +1 -1
  319. package/lib/components/Icons/ChevronsUp.js +3 -2
  320. package/lib/components/Icons/ChevronsUp.js.map +1 -1
  321. package/lib/components/Icons/ChildPlaying.js +3 -2
  322. package/lib/components/Icons/ChildPlaying.js.map +1 -1
  323. package/lib/components/Icons/Cigarette.js +3 -2
  324. package/lib/components/Icons/Cigarette.js.map +1 -1
  325. package/lib/components/Icons/Coins.js +3 -2
  326. package/lib/components/Icons/Coins.js.map +1 -1
  327. package/lib/components/Icons/Contacts.js +3 -2
  328. package/lib/components/Icons/Contacts.js.map +1 -1
  329. package/lib/components/Icons/Copy.js +3 -2
  330. package/lib/components/Icons/Copy.js.map +1 -1
  331. package/lib/components/Icons/CoronaCertificate.js +3 -2
  332. package/lib/components/Icons/CoronaCertificate.js.map +1 -1
  333. package/lib/components/Icons/Coronavirus.js +3 -2
  334. package/lib/components/Icons/Coronavirus.js.map +1 -1
  335. package/lib/components/Icons/Cough.js +3 -2
  336. package/lib/components/Icons/Cough.js.map +1 -1
  337. package/lib/components/Icons/CreditCard.js +3 -2
  338. package/lib/components/Icons/CreditCard.js.map +1 -1
  339. package/lib/components/Icons/CriticalHealthInfo.js +3 -2
  340. package/lib/components/Icons/CriticalHealthInfo.js.map +1 -1
  341. package/lib/components/Icons/Cross.js +3 -2
  342. package/lib/components/Icons/Cross.js.map +1 -1
  343. package/lib/components/Icons/DataExchange.js +3 -2
  344. package/lib/components/Icons/DataExchange.js.map +1 -1
  345. package/lib/components/Icons/DataReceived.js +3 -2
  346. package/lib/components/Icons/DataReceived.js.map +1 -1
  347. package/lib/components/Icons/DataSent.js +3 -2
  348. package/lib/components/Icons/DataSent.js.map +1 -1
  349. package/lib/components/Icons/Depression.js +3 -2
  350. package/lib/components/Icons/Depression.js.map +1 -1
  351. package/lib/components/Icons/DigestiveSystem.js +3 -2
  352. package/lib/components/Icons/DigestiveSystem.js.map +1 -1
  353. package/lib/components/Icons/Dizzy.js +3 -2
  354. package/lib/components/Icons/Dizzy.js.map +1 -1
  355. package/lib/components/Icons/Documents.js +3 -2
  356. package/lib/components/Icons/Documents.js.map +1 -1
  357. package/lib/components/Icons/Dog.js +3 -2
  358. package/lib/components/Icons/Dog.js.map +1 -1
  359. package/lib/components/Icons/DonorCard.js +3 -2
  360. package/lib/components/Icons/DonorCard.js.map +1 -1
  361. package/lib/components/Icons/DotAttachment.js +3 -2
  362. package/lib/components/Icons/DotAttachment.js.map +1 -1
  363. package/lib/components/Icons/DotCheckmark.js +3 -2
  364. package/lib/components/Icons/DotCheckmark.js.map +1 -1
  365. package/lib/components/Icons/DotCircleArrows.js +3 -2
  366. package/lib/components/Icons/DotCircleArrows.js.map +1 -1
  367. package/lib/components/Icons/DotDot.js +3 -2
  368. package/lib/components/Icons/DotDot.js.map +1 -1
  369. package/lib/components/Icons/DotExclamationMark.js +3 -2
  370. package/lib/components/Icons/DotExclamationMark.js.map +1 -1
  371. package/lib/components/Icons/DotFill.js +3 -2
  372. package/lib/components/Icons/DotFill.js.map +1 -1
  373. package/lib/components/Icons/DotGroup.js +3 -2
  374. package/lib/components/Icons/DotGroup.js.map +1 -1
  375. package/lib/components/Icons/DotHalfDisc.js +3 -2
  376. package/lib/components/Icons/DotHalfDisc.js.map +1 -1
  377. package/lib/components/Icons/DotInfo.js +3 -2
  378. package/lib/components/Icons/DotInfo.js.map +1 -1
  379. package/lib/components/Icons/DotLogin.js +3 -2
  380. package/lib/components/Icons/DotLogin.js.map +1 -1
  381. package/lib/components/Icons/DotLookingGlass.js +3 -2
  382. package/lib/components/Icons/DotLookingGlass.js.map +1 -1
  383. package/lib/components/Icons/DotNoAccess.js +3 -2
  384. package/lib/components/Icons/DotNoAccess.js.map +1 -1
  385. package/lib/components/Icons/DotNoEye.js +3 -2
  386. package/lib/components/Icons/DotNoEye.js.map +1 -1
  387. package/lib/components/Icons/DotOutline.js +3 -2
  388. package/lib/components/Icons/DotOutline.js.map +1 -1
  389. package/lib/components/Icons/DotPencil.js +3 -2
  390. package/lib/components/Icons/DotPencil.js.map +1 -1
  391. package/lib/components/Icons/DotQuestionMark.js +3 -2
  392. package/lib/components/Icons/DotQuestionMark.js.map +1 -1
  393. package/lib/components/Icons/DotTriangle.js +3 -2
  394. package/lib/components/Icons/DotTriangle.js.map +1 -1
  395. package/lib/components/Icons/DotX.js +3 -2
  396. package/lib/components/Icons/DotX.js.map +1 -1
  397. package/lib/components/Icons/Download.js +3 -2
  398. package/lib/components/Icons/Download.js.map +1 -1
  399. package/lib/components/Icons/Draft.js +3 -2
  400. package/lib/components/Icons/Draft.js.map +1 -1
  401. package/lib/components/Icons/Drag.js +3 -2
  402. package/lib/components/Icons/Drag.js.map +1 -1
  403. package/lib/components/Icons/EChat.js +3 -2
  404. package/lib/components/Icons/EChat.js.map +1 -1
  405. package/lib/components/Icons/Ear.js +3 -2
  406. package/lib/components/Icons/Ear.js.map +1 -1
  407. package/lib/components/Icons/EarDeaf.js +3 -2
  408. package/lib/components/Icons/EarDeaf.js.map +1 -1
  409. package/lib/components/Icons/EarHearingAid.js +3 -2
  410. package/lib/components/Icons/EarHearingAid.js.map +1 -1
  411. package/lib/components/Icons/EarNoseThroat.js +3 -2
  412. package/lib/components/Icons/EarNoseThroat.js.map +1 -1
  413. package/lib/components/Icons/EarVolume.js +3 -2
  414. package/lib/components/Icons/EarVolume.js.map +1 -1
  415. package/lib/components/Icons/Edit.js +3 -2
  416. package/lib/components/Icons/Edit.js.map +1 -1
  417. package/lib/components/Icons/ElderlyPerson.js +3 -2
  418. package/lib/components/Icons/ElderlyPerson.js.map +1 -1
  419. package/lib/components/Icons/Embolization.js +3 -2
  420. package/lib/components/Icons/Embolization.js.map +1 -1
  421. package/lib/components/Icons/EmergencyCall.js +3 -2
  422. package/lib/components/Icons/EmergencyCall.js.map +1 -1
  423. package/lib/components/Icons/EmoticonAnnoyed.js +3 -2
  424. package/lib/components/Icons/EmoticonAnnoyed.js.map +1 -1
  425. package/lib/components/Icons/EmoticonDelighted.js +3 -2
  426. package/lib/components/Icons/EmoticonDelighted.js.map +1 -1
  427. package/lib/components/Icons/EmoticonDisappointed.js +3 -2
  428. package/lib/components/Icons/EmoticonDisappointed.js.map +1 -1
  429. package/lib/components/Icons/EmoticonHappy.js +3 -2
  430. package/lib/components/Icons/EmoticonHappy.js.map +1 -1
  431. package/lib/components/Icons/EmoticonMeh.js +3 -2
  432. package/lib/components/Icons/EmoticonMeh.js.map +1 -1
  433. package/lib/components/Icons/EmptyBox.js +17 -2
  434. package/lib/components/Icons/EmptyBox.js.map +1 -0
  435. package/lib/components/Icons/EnterFullScreen.js +3 -2
  436. package/lib/components/Icons/EnterFullScreen.js.map +1 -1
  437. package/lib/components/Icons/Envelope.js +3 -2
  438. package/lib/components/Icons/Envelope.js.map +1 -1
  439. package/lib/components/Icons/Epilepsy.js +3 -2
  440. package/lib/components/Icons/Epilepsy.js.map +1 -1
  441. package/lib/components/Icons/Eraser.js +3 -2
  442. package/lib/components/Icons/Eraser.js.map +1 -1
  443. package/lib/components/Icons/ErrorSignFill.js +17 -2
  444. package/lib/components/Icons/ErrorSignFill.js.map +1 -0
  445. package/lib/components/Icons/ErrorSignStroke.js +3 -2
  446. package/lib/components/Icons/ErrorSignStroke.js.map +1 -1
  447. package/lib/components/Icons/EuropeanHealthCard.js +3 -2
  448. package/lib/components/Icons/EuropeanHealthCard.js.map +1 -1
  449. package/lib/components/Icons/ExitFullScreen.js +3 -2
  450. package/lib/components/Icons/ExitFullScreen.js.map +1 -1
  451. package/lib/components/Icons/Eye.js +3 -2
  452. package/lib/components/Icons/Eye.js.map +1 -1
  453. package/lib/components/Icons/Facebook.js +3 -2
  454. package/lib/components/Icons/Facebook.js.map +1 -1
  455. package/lib/components/Icons/FallingLeaf.js +3 -2
  456. package/lib/components/Icons/FallingLeaf.js.map +1 -1
  457. package/lib/components/Icons/Feedback.js +3 -2
  458. package/lib/components/Icons/Feedback.js.map +1 -1
  459. package/lib/components/Icons/Female.js +3 -2
  460. package/lib/components/Icons/Female.js.map +1 -1
  461. package/lib/components/Icons/FemaleDoctor.js +3 -2
  462. package/lib/components/Icons/FemaleDoctor.js.map +1 -1
  463. package/lib/components/Icons/Ferry.js +3 -2
  464. package/lib/components/Icons/Ferry.js.map +1 -1
  465. package/lib/components/Icons/File.js +3 -2
  466. package/lib/components/Icons/File.js.map +1 -1
  467. package/lib/components/Icons/Filter.js +45 -2
  468. package/lib/components/Icons/Filter.js.map +1 -0
  469. package/lib/components/Icons/FingerBleed.js +3 -2
  470. package/lib/components/Icons/FingerBleed.js.map +1 -1
  471. package/lib/components/Icons/FirstAidKit.js +3 -2
  472. package/lib/components/Icons/FirstAidKit.js.map +1 -1
  473. package/lib/components/Icons/Fish.js +3 -2
  474. package/lib/components/Icons/Fish.js.map +1 -1
  475. package/lib/components/Icons/FloppyDisk.js +3 -2
  476. package/lib/components/Icons/FloppyDisk.js.map +1 -1
  477. package/lib/components/Icons/Football.js +3 -2
  478. package/lib/components/Icons/Football.js.map +1 -1
  479. package/lib/components/Icons/Form.js +3 -2
  480. package/lib/components/Icons/Form.js.map +1 -1
  481. package/lib/components/Icons/Forward.js +17 -2
  482. package/lib/components/Icons/Forward.js.map +1 -0
  483. package/lib/components/Icons/Gallery.js +3 -2
  484. package/lib/components/Icons/Gallery.js.map +1 -1
  485. package/lib/components/Icons/Garden.js +3 -2
  486. package/lib/components/Icons/Garden.js.map +1 -1
  487. package/lib/components/Icons/GasCan.js +3 -2
  488. package/lib/components/Icons/GasCan.js.map +1 -1
  489. package/lib/components/Icons/GenderIdentity.js +3 -2
  490. package/lib/components/Icons/GenderIdentity.js.map +1 -1
  491. package/lib/components/Icons/GlassWater.js +3 -2
  492. package/lib/components/Icons/GlassWater.js.map +1 -1
  493. package/lib/components/Icons/Glasses.js +3 -2
  494. package/lib/components/Icons/Glasses.js.map +1 -1
  495. package/lib/components/Icons/Globe.js +3 -2
  496. package/lib/components/Icons/Globe.js.map +1 -1
  497. package/lib/components/Icons/Grain.js +3 -2
  498. package/lib/components/Icons/Grain.js.map +1 -1
  499. package/lib/components/Icons/Graph.js +3 -2
  500. package/lib/components/Icons/Graph.js.map +1 -1
  501. package/lib/components/Icons/Group.js +3 -2
  502. package/lib/components/Icons/Group.js.map +1 -1
  503. package/lib/components/Icons/GroupTwins.js +3 -2
  504. package/lib/components/Icons/GroupTwins.js.map +1 -1
  505. package/lib/components/Icons/HTMLFile.js +3 -2
  506. package/lib/components/Icons/HTMLFile.js.map +1 -1
  507. package/lib/components/Icons/HandWaving.js +9 -2
  508. package/lib/components/Icons/HandWaving.js.map +1 -0
  509. package/lib/components/Icons/HandWithDisease.js +3 -2
  510. package/lib/components/Icons/HandWithDisease.js.map +1 -1
  511. package/lib/components/Icons/HandsAndHeart.js +3 -2
  512. package/lib/components/Icons/HandsAndHeart.js.map +1 -1
  513. package/lib/components/Icons/HealthClinic.js +3 -2
  514. package/lib/components/Icons/HealthClinic.js.map +1 -1
  515. package/lib/components/Icons/HealthMeasurements.js +3 -2
  516. package/lib/components/Icons/HealthMeasurements.js.map +1 -1
  517. package/lib/components/Icons/HealthWarning.js +3 -2
  518. package/lib/components/Icons/HealthWarning.js.map +1 -1
  519. package/lib/components/Icons/HealthcarePerson.js +3 -2
  520. package/lib/components/Icons/HealthcarePerson.js.map +1 -1
  521. package/lib/components/Icons/HealthcarePersonell.js +3 -2
  522. package/lib/components/Icons/HealthcarePersonell.js.map +1 -1
  523. package/lib/components/Icons/HearingProtection.js +3 -2
  524. package/lib/components/Icons/HearingProtection.js.map +1 -1
  525. package/lib/components/Icons/Heart.js +3 -2
  526. package/lib/components/Icons/Heart.js.map +1 -1
  527. package/lib/components/Icons/HeartHands.js +3 -2
  528. package/lib/components/Icons/HeartHands.js.map +1 -1
  529. package/lib/components/Icons/HelpSign.js +3 -2
  530. package/lib/components/Icons/HelpSign.js.map +1 -1
  531. package/lib/components/Icons/HelpingHand.js +3 -2
  532. package/lib/components/Icons/HelpingHand.js.map +1 -1
  533. package/lib/components/Icons/Hemodialysis.js +3 -2
  534. package/lib/components/Icons/Hemodialysis.js.map +1 -1
  535. package/lib/components/Icons/Hiker.js +3 -2
  536. package/lib/components/Icons/Hiker.js.map +1 -1
  537. package/lib/components/Icons/Hipprosthesis.js +3 -2
  538. package/lib/components/Icons/Hipprosthesis.js.map +1 -1
  539. package/lib/components/Icons/History.js +3 -2
  540. package/lib/components/Icons/History.js.map +1 -1
  541. package/lib/components/Icons/HivAndAids.js +3 -2
  542. package/lib/components/Icons/HivAndAids.js.map +1 -1
  543. package/lib/components/Icons/Home.js +3 -2
  544. package/lib/components/Icons/Home.js.map +1 -1
  545. package/lib/components/Icons/HomeFill.js +3 -2
  546. package/lib/components/Icons/HomeFill.js.map +1 -1
  547. package/lib/components/Icons/Hormone.js +3 -2
  548. package/lib/components/Icons/Hormone.js.map +1 -1
  549. package/lib/components/Icons/Hospital.js +3 -2
  550. package/lib/components/Icons/Hospital.js.map +1 -1
  551. package/lib/components/Icons/Hourglass.js +3 -2
  552. package/lib/components/Icons/Hourglass.js.map +1 -1
  553. package/lib/components/Icons/IconNames.js +4 -1
  554. package/lib/components/Icons/IconNames.js.map +1 -1
  555. package/lib/components/Icons/ImgFile.js +3 -2
  556. package/lib/components/Icons/ImgFile.js.map +1 -1
  557. package/lib/components/Icons/Inbox.js +3 -2
  558. package/lib/components/Icons/Inbox.js.map +1 -1
  559. package/lib/components/Icons/InfoSignFill.js +17 -2
  560. package/lib/components/Icons/InfoSignFill.js.map +1 -0
  561. package/lib/components/Icons/InfoSignStroke.js +3 -2
  562. package/lib/components/Icons/InfoSignStroke.js.map +1 -1
  563. package/lib/components/Icons/Instagram.js +3 -2
  564. package/lib/components/Icons/Instagram.js.map +1 -1
  565. package/lib/components/Icons/Intravenous.js +3 -2
  566. package/lib/components/Icons/Intravenous.js.map +1 -1
  567. package/lib/components/Icons/JointPain.js +3 -2
  568. package/lib/components/Icons/JointPain.js.map +1 -1
  569. package/lib/components/Icons/Journal.js +3 -2
  570. package/lib/components/Icons/Journal.js.map +1 -1
  571. package/lib/components/Icons/JpgFile.js +3 -2
  572. package/lib/components/Icons/JpgFile.js.map +1 -1
  573. package/lib/components/Icons/Kidney.js +3 -2
  574. package/lib/components/Icons/Kidney.js.map +1 -1
  575. package/lib/components/Icons/KitchenScale.js +3 -2
  576. package/lib/components/Icons/KitchenScale.js.map +1 -1
  577. package/lib/components/Icons/Kjernejournal.js +3 -2
  578. package/lib/components/Icons/Kjernejournal.js.map +1 -1
  579. package/lib/components/Icons/Laboratory.js +3 -2
  580. package/lib/components/Icons/Laboratory.js.map +1 -1
  581. package/lib/components/Icons/LaptopBlog.js +3 -2
  582. package/lib/components/Icons/LaptopBlog.js.map +1 -1
  583. package/lib/components/Icons/LawBook.js +3 -2
  584. package/lib/components/Icons/LawBook.js.map +1 -1
  585. package/lib/components/Icons/LegalDocument.js +3 -2
  586. package/lib/components/Icons/LegalDocument.js.map +1 -1
  587. package/lib/components/Icons/LightBulb.js +3 -2
  588. package/lib/components/Icons/LightBulb.js.map +1 -1
  589. package/lib/components/Icons/List.js +3 -2
  590. package/lib/components/Icons/List.js.map +1 -1
  591. package/lib/components/Icons/Location.js +3 -2
  592. package/lib/components/Icons/Location.js.map +1 -1
  593. package/lib/components/Icons/LocationFill.js +3 -2
  594. package/lib/components/Icons/LocationFill.js.map +1 -1
  595. package/lib/components/Icons/Lock.js +3 -2
  596. package/lib/components/Icons/Lock.js.map +1 -1
  597. package/lib/components/Icons/Login.js +3 -2
  598. package/lib/components/Icons/Login.js.map +1 -1
  599. package/lib/components/Icons/Logout.js +3 -2
  600. package/lib/components/Icons/Logout.js.map +1 -1
  601. package/lib/components/Icons/Lungs.js +3 -2
  602. package/lib/components/Icons/Lungs.js.map +1 -1
  603. package/lib/components/Icons/Makeup.js +3 -2
  604. package/lib/components/Icons/Makeup.js.map +1 -1
  605. package/lib/components/Icons/MaleDoctor.js +3 -2
  606. package/lib/components/Icons/MaleDoctor.js.map +1 -1
  607. package/lib/components/Icons/MaleDoctorAndPerson.js +3 -2
  608. package/lib/components/Icons/MaleDoctorAndPerson.js.map +1 -1
  609. package/lib/components/Icons/MaleDoctorCompact.js +3 -2
  610. package/lib/components/Icons/MaleDoctorCompact.js.map +1 -1
  611. package/lib/components/Icons/MaleDoctorCompactFill.js +3 -2
  612. package/lib/components/Icons/MaleDoctorCompactFill.js.map +1 -1
  613. package/lib/components/Icons/MaleGenitalia.js +3 -2
  614. package/lib/components/Icons/MaleGenitalia.js.map +1 -1
  615. package/lib/components/Icons/MeasuringTape.js +3 -2
  616. package/lib/components/Icons/MeasuringTape.js.map +1 -1
  617. package/lib/components/Icons/Medicine.js +3 -2
  618. package/lib/components/Icons/Medicine.js.map +1 -1
  619. package/lib/components/Icons/MedicineWarning.js +3 -2
  620. package/lib/components/Icons/MedicineWarning.js.map +1 -1
  621. package/lib/components/Icons/MentalHealthAdult.js +3 -2
  622. package/lib/components/Icons/MentalHealthAdult.js.map +1 -1
  623. package/lib/components/Icons/MentalHealthChild.js +3 -2
  624. package/lib/components/Icons/MentalHealthChild.js.map +1 -1
  625. package/lib/components/Icons/Menu.js +3 -2
  626. package/lib/components/Icons/Menu.js.map +1 -1
  627. package/lib/components/Icons/Microscope.js +3 -2
  628. package/lib/components/Icons/Microscope.js.map +1 -1
  629. package/lib/components/Icons/Minus.js +3 -2
  630. package/lib/components/Icons/Minus.js.map +1 -1
  631. package/lib/components/Icons/Mirror.js +3 -2
  632. package/lib/components/Icons/Mirror.js.map +1 -1
  633. package/lib/components/Icons/MobilePhone.js +3 -2
  634. package/lib/components/Icons/MobilePhone.js.map +1 -1
  635. package/lib/components/Icons/MotherHoldingBaby.js +3 -2
  636. package/lib/components/Icons/MotherHoldingBaby.js.map +1 -1
  637. package/lib/components/Icons/MuscleBack.js +3 -2
  638. package/lib/components/Icons/MuscleBack.js.map +1 -1
  639. package/lib/components/Icons/MuscleLeg.js +3 -2
  640. package/lib/components/Icons/MuscleLeg.js.map +1 -1
  641. package/lib/components/Icons/Mushroom.js +3 -2
  642. package/lib/components/Icons/Mushroom.js.map +1 -1
  643. package/lib/components/Icons/Music.js +3 -2
  644. package/lib/components/Icons/Music.js.map +1 -1
  645. package/lib/components/Icons/MusselsAndSalt.js +3 -2
  646. package/lib/components/Icons/MusselsAndSalt.js.map +1 -1
  647. package/lib/components/Icons/NoAccess.js +3 -2
  648. package/lib/components/Icons/NoAccess.js.map +1 -1
  649. package/lib/components/Icons/NoEye.js +3 -2
  650. package/lib/components/Icons/NoEye.js.map +1 -1
  651. package/lib/components/Icons/NoFilter.js +3 -2
  652. package/lib/components/Icons/NoFilter.js.map +1 -1
  653. package/lib/components/Icons/Notepad.js +3 -2
  654. package/lib/components/Icons/Notepad.js.map +1 -1
  655. package/lib/components/Icons/Osteotomy.js +3 -2
  656. package/lib/components/Icons/Osteotomy.js.map +1 -1
  657. package/lib/components/Icons/PaintRoller.js +3 -2
  658. package/lib/components/Icons/PaintRoller.js.map +1 -1
  659. package/lib/components/Icons/PaperPlane.js +3 -2
  660. package/lib/components/Icons/PaperPlane.js.map +1 -1
  661. package/lib/components/Icons/PatientAndPerson.js +3 -2
  662. package/lib/components/Icons/PatientAndPerson.js.map +1 -1
  663. package/lib/components/Icons/Pause.js +3 -2
  664. package/lib/components/Icons/Pause.js.map +1 -1
  665. package/lib/components/Icons/PdfFile.js +3 -2
  666. package/lib/components/Icons/PdfFile.js.map +1 -1
  667. package/lib/components/Icons/Pencil.js +3 -2
  668. package/lib/components/Icons/Pencil.js.map +1 -1
  669. package/lib/components/Icons/PeopleTalking.js +3 -2
  670. package/lib/components/Icons/PeopleTalking.js.map +1 -1
  671. package/lib/components/Icons/Peritonealdialysis.js +3 -2
  672. package/lib/components/Icons/Peritonealdialysis.js.map +1 -1
  673. package/lib/components/Icons/Person.js +3 -2
  674. package/lib/components/Icons/Person.js.map +1 -1
  675. package/lib/components/Icons/PersonAndPatient.js +3 -2
  676. package/lib/components/Icons/PersonAndPatient.js.map +1 -1
  677. package/lib/components/Icons/PersonCancel.js +3 -2
  678. package/lib/components/Icons/PersonCancel.js.map +1 -1
  679. package/lib/components/Icons/PersonInXRayMachine.js +3 -2
  680. package/lib/components/Icons/PersonInXRayMachine.js.map +1 -1
  681. package/lib/components/Icons/PersonOverweight.js +3 -2
  682. package/lib/components/Icons/PersonOverweight.js.map +1 -1
  683. package/lib/components/Icons/PersonRelaxing.js +3 -2
  684. package/lib/components/Icons/PersonRelaxing.js.map +1 -1
  685. package/lib/components/Icons/PersonWithBrain.js +3 -2
  686. package/lib/components/Icons/PersonWithBrain.js.map +1 -1
  687. package/lib/components/Icons/PersonWithBrokenArm.js +3 -2
  688. package/lib/components/Icons/PersonWithBrokenArm.js.map +1 -1
  689. package/lib/components/Icons/PersonWithCrutches.js +3 -2
  690. package/lib/components/Icons/PersonWithCrutches.js.map +1 -1
  691. package/lib/components/Icons/PersonWithJaw.js +3 -2
  692. package/lib/components/Icons/PersonWithJaw.js.map +1 -1
  693. package/lib/components/Icons/PersonWithMagnifyingGlass.js +3 -2
  694. package/lib/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
  695. package/lib/components/Icons/PersonWithSenses.js +3 -2
  696. package/lib/components/Icons/PersonWithSenses.js.map +1 -1
  697. package/lib/components/Icons/PersonWorking.js +3 -2
  698. package/lib/components/Icons/PersonWorking.js.map +1 -1
  699. package/lib/components/Icons/PersonalPlan.js +3 -2
  700. package/lib/components/Icons/PersonalPlan.js.map +1 -1
  701. package/lib/components/Icons/PizzaSlice.js +3 -2
  702. package/lib/components/Icons/PizzaSlice.js.map +1 -1
  703. package/lib/components/Icons/Plane.js +3 -2
  704. package/lib/components/Icons/Plane.js.map +1 -1
  705. package/lib/components/Icons/Plant.js +3 -2
  706. package/lib/components/Icons/Plant.js.map +1 -1
  707. package/lib/components/Icons/PlateKnifeFork.js +3 -2
  708. package/lib/components/Icons/PlateKnifeFork.js.map +1 -1
  709. package/lib/components/Icons/Play.js +3 -2
  710. package/lib/components/Icons/Play.js.map +1 -1
  711. package/lib/components/Icons/PlusLarge.js +3 -2
  712. package/lib/components/Icons/PlusLarge.js.map +1 -1
  713. package/lib/components/Icons/PlusSmall.js +17 -2
  714. package/lib/components/Icons/PlusSmall.js.map +1 -0
  715. package/lib/components/Icons/PngFile.js +3 -2
  716. package/lib/components/Icons/PngFile.js.map +1 -1
  717. package/lib/components/Icons/Podcast.js +3 -2
  718. package/lib/components/Icons/Podcast.js.map +1 -1
  719. package/lib/components/Icons/PoisonInformation.js +3 -2
  720. package/lib/components/Icons/PoisonInformation.js.map +1 -1
  721. package/lib/components/Icons/Pregnant.js +3 -2
  722. package/lib/components/Icons/Pregnant.js.map +1 -1
  723. package/lib/components/Icons/Printer.js +3 -2
  724. package/lib/components/Icons/Printer.js.map +1 -1
  725. package/lib/components/Icons/Psychosis.js +3 -2
  726. package/lib/components/Icons/Psychosis.js.map +1 -1
  727. package/lib/components/Icons/Publication.js +3 -2
  728. package/lib/components/Icons/Publication.js.map +1 -1
  729. package/lib/components/Icons/Puzzle.js +3 -2
  730. package/lib/components/Icons/Puzzle.js.map +1 -1
  731. package/lib/components/Icons/QrCode.js +3 -2
  732. package/lib/components/Icons/QrCode.js.map +1 -1
  733. package/lib/components/Icons/Quarrel.js +3 -2
  734. package/lib/components/Icons/Quarrel.js.map +1 -1
  735. package/lib/components/Icons/RadioTherapy.js +3 -2
  736. package/lib/components/Icons/RadioTherapy.js.map +1 -1
  737. package/lib/components/Icons/RadioactiveTreatment.js +3 -2
  738. package/lib/components/Icons/RadioactiveTreatment.js.map +1 -1
  739. package/lib/components/Icons/Radioiodine.js +3 -2
  740. package/lib/components/Icons/Radioiodine.js.map +1 -1
  741. package/lib/components/Icons/Receipt.js +3 -2
  742. package/lib/components/Icons/Receipt.js.map +1 -1
  743. package/lib/components/Icons/Receptionist.js +3 -2
  744. package/lib/components/Icons/Receptionist.js.map +1 -1
  745. package/lib/components/Icons/Recovery.js +3 -2
  746. package/lib/components/Icons/Recovery.js.map +1 -1
  747. package/lib/components/Icons/Referral.js +3 -2
  748. package/lib/components/Icons/Referral.js.map +1 -1
  749. package/lib/components/Icons/Refresh.js +3 -2
  750. package/lib/components/Icons/Refresh.js.map +1 -1
  751. package/lib/components/Icons/Refund.js +3 -2
  752. package/lib/components/Icons/Refund.js.map +1 -1
  753. package/lib/components/Icons/Reminder.js +3 -2
  754. package/lib/components/Icons/Reminder.js.map +1 -1
  755. package/lib/components/Icons/Reply.js +3 -2
  756. package/lib/components/Icons/Reply.js.map +1 -1
  757. package/lib/components/Icons/Rocket.js +3 -2
  758. package/lib/components/Icons/Rocket.js.map +1 -1
  759. package/lib/components/Icons/RtfFile.js +3 -2
  760. package/lib/components/Icons/RtfFile.js.map +1 -1
  761. package/lib/components/Icons/STDs.js +3 -2
  762. package/lib/components/Icons/STDs.js.map +1 -1
  763. package/lib/components/Icons/Save.js +3 -2
  764. package/lib/components/Icons/Save.js.map +1 -1
  765. package/lib/components/Icons/Scale.js +3 -2
  766. package/lib/components/Icons/Scale.js.map +1 -1
  767. package/lib/components/Icons/ScreenReader.js +3 -2
  768. package/lib/components/Icons/ScreenReader.js.map +1 -1
  769. package/lib/components/Icons/Search.js +27 -2
  770. package/lib/components/Icons/Search.js.map +1 -0
  771. package/lib/components/Icons/SectionSign.js +3 -2
  772. package/lib/components/Icons/SectionSign.js.map +1 -1
  773. package/lib/components/Icons/Settings.js +3 -2
  774. package/lib/components/Icons/Settings.js.map +1 -1
  775. package/lib/components/Icons/SettingsFill.js +3 -2
  776. package/lib/components/Icons/SettingsFill.js.map +1 -1
  777. package/lib/components/Icons/Sexualorientation.js +3 -2
  778. package/lib/components/Icons/Sexualorientation.js.map +1 -1
  779. package/lib/components/Icons/ShakingHand.js +3 -2
  780. package/lib/components/Icons/ShakingHand.js.map +1 -1
  781. package/lib/components/Icons/Share.js +3 -2
  782. package/lib/components/Icons/Share.js.map +1 -1
  783. package/lib/components/Icons/SharedHealthData.js +3 -2
  784. package/lib/components/Icons/SharedHealthData.js.map +1 -1
  785. package/lib/components/Icons/SharedHealthMeasurements.js +3 -2
  786. package/lib/components/Icons/SharedHealthMeasurements.js.map +1 -1
  787. package/lib/components/Icons/Shield.js +3 -2
  788. package/lib/components/Icons/Shield.js.map +1 -1
  789. package/lib/components/Icons/ShuntOperation.js +3 -2
  790. package/lib/components/Icons/ShuntOperation.js.map +1 -1
  791. package/lib/components/Icons/Skeleton.js +3 -2
  792. package/lib/components/Icons/Skeleton.js.map +1 -1
  793. package/lib/components/Icons/Skin.js +3 -2
  794. package/lib/components/Icons/Skin.js.map +1 -1
  795. package/lib/components/Icons/Snake.js +3 -2
  796. package/lib/components/Icons/Snake.js.map +1 -1
  797. package/lib/components/Icons/Snapchat.js +3 -2
  798. package/lib/components/Icons/Snapchat.js.map +1 -1
  799. package/lib/components/Icons/Sort.js +3 -2
  800. package/lib/components/Icons/Sort.js.map +1 -1
  801. package/lib/components/Icons/SortDown.js +3 -2
  802. package/lib/components/Icons/SortDown.js.map +1 -1
  803. package/lib/components/Icons/SortUp.js +3 -2
  804. package/lib/components/Icons/SortUp.js.map +1 -1
  805. package/lib/components/Icons/SpeechBubble.js +3 -2
  806. package/lib/components/Icons/SpeechBubble.js.map +1 -1
  807. package/lib/components/Icons/Spray.js +3 -2
  808. package/lib/components/Icons/Spray.js.map +1 -1
  809. package/lib/components/Icons/StarFill.js +3 -2
  810. package/lib/components/Icons/StarFill.js.map +1 -1
  811. package/lib/components/Icons/StarStroke.js +3 -2
  812. package/lib/components/Icons/StarStroke.js.map +1 -1
  813. package/lib/components/Icons/StickyNote.js +3 -2
  814. package/lib/components/Icons/StickyNote.js.map +1 -1
  815. package/lib/components/Icons/StickyNotes.js +3 -2
  816. package/lib/components/Icons/StickyNotes.js.map +1 -1
  817. package/lib/components/Icons/Stopwatch.js +3 -2
  818. package/lib/components/Icons/Stopwatch.js.map +1 -1
  819. package/lib/components/Icons/Sun.js +3 -2
  820. package/lib/components/Icons/Sun.js.map +1 -1
  821. package/lib/components/Icons/SupportingPerson.js +3 -2
  822. package/lib/components/Icons/SupportingPerson.js.map +1 -1
  823. package/lib/components/Icons/Surgery.js +3 -2
  824. package/lib/components/Icons/Surgery.js.map +1 -1
  825. package/lib/components/Icons/Sweets.js +3 -2
  826. package/lib/components/Icons/Sweets.js.map +1 -1
  827. package/lib/components/Icons/Syringe.js +4 -3
  828. package/lib/components/Icons/Syringe.js.map +1 -1
  829. package/lib/components/Icons/Taxi.js +3 -2
  830. package/lib/components/Icons/Taxi.js.map +1 -1
  831. package/lib/components/Icons/TeddyBear.js +3 -2
  832. package/lib/components/Icons/TeddyBear.js.map +1 -1
  833. package/lib/components/Icons/Teenagers.js +3 -2
  834. package/lib/components/Icons/Teenagers.js.map +1 -1
  835. package/lib/components/Icons/ThinkingAboutBaby.js +3 -2
  836. package/lib/components/Icons/ThinkingAboutBaby.js.map +1 -1
  837. package/lib/components/Icons/Ticket.js +3 -2
  838. package/lib/components/Icons/Ticket.js.map +1 -1
  839. package/lib/components/Icons/TimePassing.js +3 -2
  840. package/lib/components/Icons/TimePassing.js.map +1 -1
  841. package/lib/components/Icons/Toddler.js +3 -2
  842. package/lib/components/Icons/Toddler.js.map +1 -1
  843. package/lib/components/Icons/Tombstone.js +3 -2
  844. package/lib/components/Icons/Tombstone.js.map +1 -1
  845. package/lib/components/Icons/Toolbox.js +3 -2
  846. package/lib/components/Icons/Toolbox.js.map +1 -1
  847. package/lib/components/Icons/Tooth.js +3 -2
  848. package/lib/components/Icons/Tooth.js.map +1 -1
  849. package/lib/components/Icons/TotalKneeProsthesis.js +3 -2
  850. package/lib/components/Icons/TotalKneeProsthesis.js.map +1 -1
  851. package/lib/components/Icons/Train.js +3 -2
  852. package/lib/components/Icons/Train.js.map +1 -1
  853. package/lib/components/Icons/Transplantation.js +3 -2
  854. package/lib/components/Icons/Transplantation.js.map +1 -1
  855. package/lib/components/Icons/TrashCan.js +3 -2
  856. package/lib/components/Icons/TrashCan.js.map +1 -1
  857. package/lib/components/Icons/TravelRoute.js +3 -2
  858. package/lib/components/Icons/TravelRoute.js.map +1 -1
  859. package/lib/components/Icons/TreatmentAids.js +3 -2
  860. package/lib/components/Icons/TreatmentAids.js.map +1 -1
  861. package/lib/components/Icons/TriangleX.js +33 -2
  862. package/lib/components/Icons/TriangleX.js.map +1 -0
  863. package/lib/components/Icons/Twitter.js +3 -2
  864. package/lib/components/Icons/Twitter.js.map +1 -1
  865. package/lib/components/Icons/Undo.js +3 -2
  866. package/lib/components/Icons/Undo.js.map +1 -1
  867. package/lib/components/Icons/UniProsthesis.js +3 -2
  868. package/lib/components/Icons/UniProsthesis.js.map +1 -1
  869. package/lib/components/Icons/Upload.js +3 -2
  870. package/lib/components/Icons/Upload.js.map +1 -1
  871. package/lib/components/Icons/UserOrganization.js +3 -2
  872. package/lib/components/Icons/UserOrganization.js.map +1 -1
  873. package/lib/components/Icons/Vaccine.js +3 -2
  874. package/lib/components/Icons/Vaccine.js.map +1 -1
  875. package/lib/components/Icons/VerticalDots.js +17 -2
  876. package/lib/components/Icons/VerticalDots.js.map +1 -0
  877. package/lib/components/Icons/VideoCamera.js +3 -2
  878. package/lib/components/Icons/VideoCamera.js.map +1 -1
  879. package/lib/components/Icons/VideoChat.js +3 -2
  880. package/lib/components/Icons/VideoChat.js.map +1 -1
  881. package/lib/components/Icons/Wallet.js +3 -2
  882. package/lib/components/Icons/Wallet.js.map +1 -1
  883. package/lib/components/Icons/Watch.js +3 -2
  884. package/lib/components/Icons/Watch.js.map +1 -1
  885. package/lib/components/Icons/Website.js +3 -2
  886. package/lib/components/Icons/Website.js.map +1 -1
  887. package/lib/components/Icons/Wheelchair.js +3 -2
  888. package/lib/components/Icons/Wheelchair.js.map +1 -1
  889. package/lib/components/Icons/WheelchairActive.js +3 -2
  890. package/lib/components/Icons/WheelchairActive.js.map +1 -1
  891. package/lib/components/Icons/Window.js +3 -2
  892. package/lib/components/Icons/Window.js.map +1 -1
  893. package/lib/components/Icons/WordDocument.js +3 -2
  894. package/lib/components/Icons/WordDocument.js.map +1 -1
  895. package/lib/components/Icons/WorkSuitcase.js +3 -2
  896. package/lib/components/Icons/WorkSuitcase.js.map +1 -1
  897. package/lib/components/Icons/X.js +19 -2
  898. package/lib/components/Icons/X.js.map +1 -0
  899. package/lib/components/Icons/XOutline.js +3 -2
  900. package/lib/components/Icons/XOutline.js.map +1 -1
  901. package/lib/components/Icons/XmlFile.js +3 -2
  902. package/lib/components/Icons/XmlFile.js.map +1 -1
  903. package/lib/components/Icons/YouTube.js +3 -2
  904. package/lib/components/Icons/YouTube.js.map +1 -1
  905. package/lib/components/Icons/Zoom.js +3 -2
  906. package/lib/components/Icons/Zoom.js.map +1 -1
  907. package/lib/components/Icons/ZoomInLeft.js +3 -2
  908. package/lib/components/Icons/ZoomInLeft.js.map +1 -1
  909. package/lib/components/Icons/ZoomOutLeft.js +3 -2
  910. package/lib/components/Icons/ZoomOutLeft.js.map +1 -1
  911. package/lib/components/Illustrations/BabyMobile.js +5 -4
  912. package/lib/components/Illustrations/BabyMobile.js.map +1 -1
  913. package/lib/components/Illustrations/BabyMobileMedium.js +264 -2
  914. package/lib/components/Illustrations/BabyMobileMedium.js.map +1 -0
  915. package/lib/components/Illustrations/Child.js +5 -4
  916. package/lib/components/Illustrations/Child.js.map +1 -1
  917. package/lib/components/Illustrations/ChildMedium.js +127 -2
  918. package/lib/components/Illustrations/ChildMedium.js.map +1 -0
  919. package/lib/components/Illustrations/Doctor.js +7 -6
  920. package/lib/components/Illustrations/Doctor.js.map +1 -1
  921. package/lib/components/Illustrations/DoctorMedium.js +55 -2
  922. package/lib/components/Illustrations/DoctorMedium.js.map +1 -0
  923. package/lib/components/Illustrations/DoctorSmall.js +53 -2
  924. package/lib/components/Illustrations/DoctorSmall.js.map +1 -0
  925. package/lib/components/Illustrations/FacialRecognitionFingerprint.js +5 -4
  926. package/lib/components/Illustrations/FacialRecognitionFingerprint.js.map +1 -1
  927. package/lib/components/Illustrations/FacialRecognitionFingerprintMedium.js +200 -2
  928. package/lib/components/Illustrations/FacialRecognitionFingerprintMedium.js.map +1 -0
  929. package/lib/components/Illustrations/GiveBabyFood.js +5 -4
  930. package/lib/components/Illustrations/GiveBabyFood.js.map +1 -1
  931. package/lib/components/Illustrations/GiveBabyFoodMedium.js +241 -2
  932. package/lib/components/Illustrations/GiveBabyFoodMedium.js.map +1 -0
  933. package/lib/components/Illustrations/HealthcarePersonnel.js +7 -6
  934. package/lib/components/Illustrations/HealthcarePersonnel.js.map +1 -1
  935. package/lib/components/Illustrations/HealthcarePersonnelMedium.js +149 -2
  936. package/lib/components/Illustrations/HealthcarePersonnelMedium.js.map +1 -0
  937. package/lib/components/Illustrations/HealthcarePersonnelSmall.js +150 -2
  938. package/lib/components/Illustrations/HealthcarePersonnelSmall.js.map +1 -0
  939. package/lib/components/Illustrations/IllustrationNames.js +37 -1
  940. package/lib/components/Illustrations/IllustrationNames.js.map +1 -0
  941. package/lib/components/Illustrations/ReadLetters.js +5 -4
  942. package/lib/components/Illustrations/ReadLetters.js.map +1 -1
  943. package/lib/components/Illustrations/ReadLettersMedium.js +79 -2
  944. package/lib/components/Illustrations/ReadLettersMedium.js.map +1 -0
  945. package/lib/components/Illustrations/Stork.js +5 -4
  946. package/lib/components/Illustrations/Stork.js.map +1 -1
  947. package/lib/components/Illustrations/StorkMedium.js +97 -2
  948. package/lib/components/Illustrations/StorkMedium.js.map +1 -0
  949. package/lib/components/Illustrations/Stroller.js +5 -4
  950. package/lib/components/Illustrations/Stroller.js.map +1 -1
  951. package/lib/components/Illustrations/StrollerMedium.js +220 -2
  952. package/lib/components/Illustrations/StrollerMedium.js.map +1 -0
  953. package/lib/components/Illustrations/Support2.js +5 -4
  954. package/lib/components/Illustrations/Support2.js.map +1 -1
  955. package/lib/components/Illustrations/Support2Medium.js +159 -2
  956. package/lib/components/Illustrations/Support2Medium.js.map +1 -0
  957. package/lib/components/Illustrations/Thinking.js +5 -4
  958. package/lib/components/Illustrations/Thinking.js.map +1 -1
  959. package/lib/components/Illustrations/ThinkingMedium.js +99 -2
  960. package/lib/components/Illustrations/ThinkingMedium.js.map +1 -0
  961. package/lib/components/Input/index.js +6 -2
  962. package/lib/components/Input/index.js.map +1 -0
  963. package/lib/components/Label/index.js +6 -2
  964. package/lib/components/Label/index.js.map +1 -0
  965. package/lib/components/Loader/index.js +11 -5
  966. package/lib/components/Loader/index.js.map +1 -1
  967. package/lib/components/Logo/index.js +6 -2
  968. package/lib/components/Logo/index.js.map +1 -1
  969. package/lib/components/Modal/index.js +34 -28
  970. package/lib/components/Modal/index.js.map +1 -1
  971. package/lib/components/NotificationPanel/index.js +10 -6
  972. package/lib/components/NotificationPanel/index.js.map +1 -1
  973. package/lib/components/Panel/index.js +22 -15
  974. package/lib/components/Panel/index.js.map +1 -1
  975. package/lib/components/PanelList/index.js +5 -1
  976. package/lib/components/PanelList/index.js.map +1 -1
  977. package/lib/components/PopMenu/index.js +26 -20
  978. package/lib/components/PopMenu/index.js.map +1 -1
  979. package/lib/components/Portal/index.js +27 -1
  980. package/lib/components/Portal/index.js.map +1 -0
  981. package/lib/components/Progressbar/index.js +21 -15
  982. package/lib/components/Progressbar/index.js.map +1 -1
  983. package/lib/components/PromoPanel/index.js +12 -8
  984. package/lib/components/PromoPanel/index.js.map +1 -1
  985. package/lib/components/RadioButton/index.js +5 -1
  986. package/lib/{RadioButton.js.map → components/RadioButton/index.js.map} +1 -1
  987. package/lib/components/ServiceMessage/index.js +19 -15
  988. package/lib/components/ServiceMessage/index.js.map +1 -1
  989. package/lib/components/SharingStatus/index.js +6 -2
  990. package/lib/components/SharingStatus/index.js.map +1 -1
  991. package/lib/components/Step/index.js +5 -1
  992. package/lib/components/Step/index.js.map +1 -1
  993. package/lib/components/Stepper/index.js +84 -18
  994. package/lib/components/Stepper/index.js.map +1 -1
  995. package/lib/components/StickyNote/index.js +17 -11
  996. package/lib/components/StickyNote/index.js.map +1 -1
  997. package/lib/components/Table/index.js +13 -9
  998. package/lib/components/Table/index.js.map +1 -1
  999. package/lib/components/Tabs/index.js +13 -6
  1000. package/lib/components/Tabs/index.js.map +1 -1
  1001. package/lib/components/Tag/Tag.d.ts +1 -11
  1002. package/lib/components/Tag/constants.d.ts +2 -6
  1003. package/lib/components/Tag/index.d.ts +1 -1
  1004. package/lib/components/Tag/index.js +19 -34
  1005. package/lib/components/Tag/index.js.map +1 -1
  1006. package/lib/components/Tag/styles.module.scss +19 -52
  1007. package/lib/components/Tag/styles.module.scss.d.ts +3 -11
  1008. package/lib/components/TagList/index.js +5 -1
  1009. package/lib/components/TagList/index.js.map +1 -1
  1010. package/lib/components/Tile/index.js +10 -6
  1011. package/lib/components/Tile/index.js.map +1 -1
  1012. package/lib/components/Title/index.js +6 -2
  1013. package/lib/components/Title/index.js.map +1 -0
  1014. package/lib/components/Toast/index.js +4 -2
  1015. package/lib/components/Toast/index.js.map +1 -1
  1016. package/lib/components/ToastList/index.js +7 -3
  1017. package/lib/components/ToastList/index.js.map +1 -1
  1018. package/lib/components/Toggle/index.js +17 -11
  1019. package/lib/components/Toggle/index.js.map +1 -1
  1020. package/lib/components/Validation/index.js +24 -17
  1021. package/lib/components/Validation/index.js.map +1 -1
  1022. package/lib/constants.js +125 -1
  1023. package/lib/constants.js.map +1 -0
  1024. package/lib/constants2.js +45 -117
  1025. package/lib/constants2.js.map +1 -1
  1026. package/lib/floating-ui.react.js +479 -185
  1027. package/lib/floating-ui.react.js.map +1 -1
  1028. package/lib/getFilterChips.js +6 -2
  1029. package/lib/getFilterChips.js.map +1 -1
  1030. package/lib/hoc/withBreakpoint/index.js +4 -2
  1031. package/lib/hoc/withBreakpoint/index.js.map +1 -1
  1032. package/lib/hoc/withBreakpoint/withBreakpoint.js +17 -2
  1033. package/lib/hoc/withBreakpoint/withBreakpoint.js.map +1 -0
  1034. package/lib/hooks/useBreakpoint.js +42 -1
  1035. package/lib/hooks/useBreakpoint.js.map +1 -0
  1036. package/lib/hooks/useElementList.js +46 -1
  1037. package/lib/hooks/useElementList.js.map +1 -0
  1038. package/lib/hooks/useEventListenerState.js +3 -1
  1039. package/lib/hooks/useEventListenerState.js.map +1 -1
  1040. package/lib/hooks/useExpand.js +19 -1
  1041. package/lib/hooks/useExpand.js.map +1 -0
  1042. package/lib/hooks/useFocusToggle.js +34 -1
  1043. package/lib/hooks/useFocusToggle.js.map +1 -0
  1044. package/lib/hooks/useFocusTrap.js +40 -2
  1045. package/lib/hooks/useFocusTrap.js.map +1 -0
  1046. package/lib/hooks/useFocusableElements.js +33 -1
  1047. package/lib/hooks/useFocusableElements.js.map +1 -0
  1048. package/lib/hooks/useIcons.js +27 -1
  1049. package/lib/hooks/useIcons.js.map +1 -0
  1050. package/lib/hooks/useIdWithFallback.js +14 -1
  1051. package/lib/hooks/useIdWithFallback.js.map +1 -0
  1052. package/lib/hooks/useIntersectionObserver.js +23 -1
  1053. package/lib/hooks/useIntersectionObserver.js.map +1 -0
  1054. package/lib/hooks/useInterval.js +10 -1
  1055. package/lib/hooks/useInterval.js.map +1 -1
  1056. package/lib/hooks/useIsMobileBreakpoint.js +9 -1
  1057. package/lib/hooks/useIsMobileBreakpoint.js.map +1 -0
  1058. package/lib/hooks/useIsServerSide.js +16 -1
  1059. package/lib/hooks/useIsServerSide.js.map +1 -0
  1060. package/lib/hooks/useIsVisible.js +26 -1
  1061. package/lib/hooks/useIsVisible.js.map +1 -0
  1062. package/lib/hooks/useKeyboardEvent.js +30 -1
  1063. package/lib/hooks/useKeyboardEvent.js.map +1 -0
  1064. package/lib/hooks/useLanguage.js +16 -1
  1065. package/lib/hooks/useLanguage.js.map +1 -0
  1066. package/lib/hooks/useLayoutEvent.js +29 -1
  1067. package/lib/hooks/useLayoutEvent.js.map +1 -0
  1068. package/lib/hooks/useOutsideEvent.js +27 -1
  1069. package/lib/hooks/useOutsideEvent.js.map +1 -0
  1070. package/lib/hooks/usePrevious.js +17 -1
  1071. package/lib/hooks/usePrevious.js.map +1 -0
  1072. package/lib/hooks/usePseudoClasses.js +52 -1
  1073. package/lib/hooks/usePseudoClasses.js.map +1 -0
  1074. package/lib/hooks/useResizeObserver.js +30 -1
  1075. package/lib/hooks/useResizeObserver.js.map +1 -0
  1076. package/lib/hooks/useReturnFocusOnUnmount.js +21 -1
  1077. package/lib/hooks/useReturnFocusOnUnmount.js.map +1 -0
  1078. package/lib/hooks/useRovingFocus.js +45 -1
  1079. package/lib/hooks/useRovingFocus.js.map +1 -0
  1080. package/lib/hooks/useSize.js +31 -1
  1081. package/lib/hooks/useSize.js.map +1 -0
  1082. package/lib/hooks/useToggle.js +32 -1
  1083. package/lib/hooks/useToggle.js.map +1 -0
  1084. package/lib/hooks/usestopPropagation.js +17 -1
  1085. package/lib/hooks/usestopPropagation.js.map +1 -0
  1086. package/lib/index.js +18 -18
  1087. package/lib/resourceHelper.js +5 -2
  1088. package/lib/resourceHelper.js.map +1 -1
  1089. package/lib/theme/currys/color.js +11 -1
  1090. package/lib/theme/currys/color.js.map +1 -0
  1091. package/lib/theme/currys/index.js +2 -2
  1092. package/lib/theme/currys/spacing.js +26 -1
  1093. package/lib/theme/currys/spacing.js.map +1 -0
  1094. package/lib/theme/grid.js +25 -1
  1095. package/lib/theme/grid.js.map +1 -0
  1096. package/lib/theme/index.js +14 -1
  1097. package/lib/theme/index.js.map +1 -0
  1098. package/lib/theme/palette.js +86 -1
  1099. package/lib/theme/palette.js.map +1 -0
  1100. package/lib/theme/spacers.js +21 -1
  1101. package/lib/theme/spacers.js.map +1 -0
  1102. package/lib/utils/accessibility.js +24 -1
  1103. package/lib/utils/accessibility.js.map +1 -0
  1104. package/lib/utils/component.js +11 -1
  1105. package/lib/utils/component.js.map +1 -0
  1106. package/lib/utils/debounce.js +22 -1
  1107. package/lib/utils/debounce.js.map +1 -0
  1108. package/lib/utils/deepContains.js +22 -1
  1109. package/lib/utils/deepContains.js.map +1 -0
  1110. package/lib/utils/device.js +7 -1
  1111. package/lib/utils/device.js.map +1 -0
  1112. package/lib/utils/environment.js +6 -1
  1113. package/lib/utils/environment.js.map +1 -0
  1114. package/lib/utils/focus.js +17 -1
  1115. package/lib/utils/focus.js.map +1 -0
  1116. package/lib/utils/language.js +4 -3
  1117. package/lib/utils/language.js.map +1 -1
  1118. package/lib/utils/loremtext.js +6 -5
  1119. package/lib/utils/loremtext.js.map +1 -1
  1120. package/lib/utils/mobile.js +18 -1
  1121. package/lib/utils/mobile.js.map +1 -0
  1122. package/lib/utils/refs.js +26 -1
  1123. package/lib/utils/refs.js.map +1 -0
  1124. package/lib/utils/resource.js +10 -1
  1125. package/lib/utils/resource.js.map +1 -0
  1126. package/lib/utils/scroll.js +10 -1
  1127. package/lib/utils/scroll.js.map +1 -0
  1128. package/lib/utils/uuid.js +2 -2
  1129. package/lib/utils/viewport.js +8 -1
  1130. package/lib/utils/viewport.js.map +1 -0
  1131. package/lib/utils.js +4 -2
  1132. package/lib/utils.js.map +1 -1
  1133. package/lib/utils2.js +18 -13
  1134. package/lib/utils2.js.map +1 -1
  1135. package/lib/utils3.js +12 -9
  1136. package/lib/utils3.js.map +1 -1
  1137. package/lib/utils4.js +7 -5
  1138. package/lib/utils4.js.map +1 -1
  1139. package/lib/utils5.js +26 -22
  1140. package/lib/utils5.js.map +1 -1
  1141. package/lib/utils6.js +65 -10
  1142. package/lib/utils6.js.map +1 -1
  1143. package/lib/uuid.js +12 -9
  1144. package/lib/uuid.js.map +1 -1
  1145. package/package.json +26 -38
  1146. package/lib/AlertSignFill.js +0 -16
  1147. package/lib/AlertSignFill.js.map +0 -1
  1148. package/lib/AlertSignStroke.js +0 -16
  1149. package/lib/AlertSignStroke.js.map +0 -1
  1150. package/lib/ArrowDown.js +0 -28
  1151. package/lib/ArrowDown.js.map +0 -1
  1152. package/lib/ArrowRight.js +0 -16
  1153. package/lib/ArrowRight.js.map +0 -1
  1154. package/lib/ArrowUp.js +0 -28
  1155. package/lib/ArrowUp.js.map +0 -1
  1156. package/lib/ArrowUpRight.js +0 -16
  1157. package/lib/ArrowUpRight.js.map +0 -1
  1158. package/lib/BabyMobileMedium.js +0 -263
  1159. package/lib/BabyMobileMedium.js.map +0 -1
  1160. package/lib/Check.js +0 -16
  1161. package/lib/Check.js.map +0 -1
  1162. package/lib/CheckFill.js +0 -28
  1163. package/lib/CheckFill.js.map +0 -1
  1164. package/lib/CheckOutline.js +0 -14
  1165. package/lib/CheckOutline.js.map +0 -1
  1166. package/lib/Checkbox2.js +0 -5
  1167. package/lib/Checkbox2.js.map +0 -1
  1168. package/lib/ChevronDown.js +0 -16
  1169. package/lib/ChevronDown.js.map +0 -1
  1170. package/lib/ChevronLeft.js +0 -16
  1171. package/lib/ChevronLeft.js.map +0 -1
  1172. package/lib/ChevronRight.js +0 -16
  1173. package/lib/ChevronRight.js.map +0 -1
  1174. package/lib/ChevronUp.js +0 -16
  1175. package/lib/ChevronUp.js.map +0 -1
  1176. package/lib/ChildMedium.js +0 -126
  1177. package/lib/ChildMedium.js.map +0 -1
  1178. package/lib/DoctorMedium.js +0 -54
  1179. package/lib/DoctorMedium.js.map +0 -1
  1180. package/lib/DoctorSmall.js +0 -52
  1181. package/lib/DoctorSmall.js.map +0 -1
  1182. package/lib/DrawerNavigation2.js +0 -5
  1183. package/lib/DrawerNavigation2.js.map +0 -1
  1184. package/lib/EmptyBox.js +0 -16
  1185. package/lib/EmptyBox.js.map +0 -1
  1186. package/lib/ErrorSignFill.js +0 -16
  1187. package/lib/ErrorSignFill.js.map +0 -1
  1188. package/lib/FacialRecognitionFingerprintMedium.js +0 -199
  1189. package/lib/FacialRecognitionFingerprintMedium.js.map +0 -1
  1190. package/lib/Filter.js +0 -44
  1191. package/lib/Filter.js.map +0 -1
  1192. package/lib/FilterLinkList2.js +0 -5
  1193. package/lib/FilterLinkList2.js.map +0 -1
  1194. package/lib/FilterSearch2.js +0 -5
  1195. package/lib/FilterSearch2.js.map +0 -1
  1196. package/lib/Forward.js +0 -16
  1197. package/lib/Forward.js.map +0 -1
  1198. package/lib/GiveBabyFoodMedium.js +0 -240
  1199. package/lib/GiveBabyFoodMedium.js.map +0 -1
  1200. package/lib/HandWaving.js +0 -8
  1201. package/lib/HandWaving.js.map +0 -1
  1202. package/lib/HealthcarePersonnelMedium.js +0 -148
  1203. package/lib/HealthcarePersonnelMedium.js.map +0 -1
  1204. package/lib/HealthcarePersonnelSmall.js +0 -149
  1205. package/lib/HealthcarePersonnelSmall.js.map +0 -1
  1206. package/lib/IllustrationNames.js +0 -35
  1207. package/lib/IllustrationNames.js.map +0 -1
  1208. package/lib/InfoSignFill.js +0 -16
  1209. package/lib/InfoSignFill.js.map +0 -1
  1210. package/lib/Input2.js +0 -5
  1211. package/lib/Input2.js.map +0 -1
  1212. package/lib/Label.js +0 -5
  1213. package/lib/Label.js.map +0 -1
  1214. package/lib/PlusSmall.js +0 -16
  1215. package/lib/PlusSmall.js.map +0 -1
  1216. package/lib/Portal.js +0 -26
  1217. package/lib/Portal.js.map +0 -1
  1218. package/lib/RadioButton.js +0 -5
  1219. package/lib/ReadLettersMedium.js +0 -78
  1220. package/lib/ReadLettersMedium.js.map +0 -1
  1221. package/lib/Search.js +0 -26
  1222. package/lib/Search.js.map +0 -1
  1223. package/lib/StorkMedium.js +0 -96
  1224. package/lib/StorkMedium.js.map +0 -1
  1225. package/lib/StrollerMedium.js +0 -219
  1226. package/lib/StrollerMedium.js.map +0 -1
  1227. package/lib/Support2Medium.js +0 -158
  1228. package/lib/Support2Medium.js.map +0 -1
  1229. package/lib/ThinkingMedium.js +0 -98
  1230. package/lib/ThinkingMedium.js.map +0 -1
  1231. package/lib/Title2.js +0 -5
  1232. package/lib/Title2.js.map +0 -1
  1233. package/lib/TriangleX.js +0 -32
  1234. package/lib/TriangleX.js.map +0 -1
  1235. package/lib/VerticalDots.js +0 -16
  1236. package/lib/VerticalDots.js.map +0 -1
  1237. package/lib/X.js +0 -18
  1238. package/lib/X.js.map +0 -1
  1239. package/lib/_rolldown_dynamic_import_helper.js.map +0 -1
  1240. package/lib/accessibility.js +0 -17
  1241. package/lib/accessibility.js.map +0 -1
  1242. package/lib/color.js +0 -10
  1243. package/lib/color.js.map +0 -1
  1244. package/lib/component.js +0 -10
  1245. package/lib/component.js.map +0 -1
  1246. package/lib/constants3.js +0 -46
  1247. package/lib/constants3.js.map +0 -1
  1248. package/lib/currys.js +0 -0
  1249. package/lib/debounce.js +0 -16
  1250. package/lib/debounce.js.map +0 -1
  1251. package/lib/deepContains.js +0 -13
  1252. package/lib/deepContains.js.map +0 -1
  1253. package/lib/device.js +0 -6
  1254. package/lib/device.js.map +0 -1
  1255. package/lib/environment.js +0 -5
  1256. package/lib/environment.js.map +0 -1
  1257. package/lib/focus.js +0 -11
  1258. package/lib/focus.js.map +0 -1
  1259. package/lib/grid.js +0 -24
  1260. package/lib/grid.js.map +0 -1
  1261. package/lib/mobile.js +0 -14
  1262. package/lib/mobile.js.map +0 -1
  1263. package/lib/palette.js +0 -85
  1264. package/lib/palette.js.map +0 -1
  1265. package/lib/refs.js +0 -14
  1266. package/lib/refs.js.map +0 -1
  1267. package/lib/resource.js +0 -4
  1268. package/lib/resource.js.map +0 -1
  1269. package/lib/scroll.js +0 -9
  1270. package/lib/scroll.js.map +0 -1
  1271. package/lib/spacers.js +0 -20
  1272. package/lib/spacers.js.map +0 -1
  1273. package/lib/spacing.js +0 -25
  1274. package/lib/spacing.js.map +0 -1
  1275. package/lib/src.js +0 -0
  1276. package/lib/theme.js +0 -13
  1277. package/lib/theme.js.map +0 -1
  1278. package/lib/useBreakpoint.js +0 -38
  1279. package/lib/useBreakpoint.js.map +0 -1
  1280. package/lib/useElementList.js +0 -38
  1281. package/lib/useElementList.js.map +0 -1
  1282. package/lib/useExpand.js +0 -18
  1283. package/lib/useExpand.js.map +0 -1
  1284. package/lib/useFocusToggle.js +0 -26
  1285. package/lib/useFocusToggle.js.map +0 -1
  1286. package/lib/useFocusTrap.js +0 -34
  1287. package/lib/useFocusTrap.js.map +0 -1
  1288. package/lib/useFocusableElements.js +0 -26
  1289. package/lib/useFocusableElements.js.map +0 -1
  1290. package/lib/useIcons.js +0 -26
  1291. package/lib/useIcons.js.map +0 -1
  1292. package/lib/useIdWithFallback.js +0 -8
  1293. package/lib/useIdWithFallback.js.map +0 -1
  1294. package/lib/useIntersectionObserver.js +0 -14
  1295. package/lib/useIntersectionObserver.js.map +0 -1
  1296. package/lib/useIsMobileBreakpoint.js +0 -8
  1297. package/lib/useIsMobileBreakpoint.js.map +0 -1
  1298. package/lib/useIsServerSide.js +0 -10
  1299. package/lib/useIsServerSide.js.map +0 -1
  1300. package/lib/useIsVisible.js +0 -16
  1301. package/lib/useIsVisible.js.map +0 -1
  1302. package/lib/useKeyboardEvent.js +0 -22
  1303. package/lib/useKeyboardEvent.js.map +0 -1
  1304. package/lib/useLanguage.js +0 -10
  1305. package/lib/useLanguage.js.map +0 -1
  1306. package/lib/useLayoutEvent.js +0 -21
  1307. package/lib/useLayoutEvent.js.map +0 -1
  1308. package/lib/useOutsideEvent.js +0 -20
  1309. package/lib/useOutsideEvent.js.map +0 -1
  1310. package/lib/usePrevious.js +0 -11
  1311. package/lib/usePrevious.js.map +0 -1
  1312. package/lib/usePseudoClasses.js +0 -46
  1313. package/lib/usePseudoClasses.js.map +0 -1
  1314. package/lib/useResizeObserver.js +0 -23
  1315. package/lib/useResizeObserver.js.map +0 -1
  1316. package/lib/useReturnFocusOnUnmount.js +0 -16
  1317. package/lib/useReturnFocusOnUnmount.js.map +0 -1
  1318. package/lib/useRovingFocus.js +0 -44
  1319. package/lib/useRovingFocus.js.map +0 -1
  1320. package/lib/useSize.js +0 -23
  1321. package/lib/useSize.js.map +0 -1
  1322. package/lib/useToggle.js +0 -24
  1323. package/lib/useToggle.js.map +0 -1
  1324. package/lib/usestopPropagation.js +0 -11
  1325. package/lib/usestopPropagation.js.map +0 -1
  1326. package/lib/viewport.js +0 -7
  1327. package/lib/viewport.js.map +0 -1
  1328. package/lib/withBreakpoint.js +0 -16
  1329. package/lib/withBreakpoint.js.map +0 -1
package/lib/Close.js CHANGED
@@ -1,12 +1,13 @@
1
- import { n as AnalyticsId } from "./constants2.js";
2
- import { t as usePseudoClasses } from "./usePseudoClasses.js";
3
- import { n as mergeRefs } from "./refs.js";
1
+ import { AnalyticsId } from "./constants.js";
2
+ import { usePseudoClasses } from "./hooks/usePseudoClasses.js";
3
+ import { mergeRefs } from "./utils/refs.js";
4
4
  import { t as Icon_default } from "./Icon.js";
5
- import { t as useIsMobileBreakpoint } from "./useIsMobileBreakpoint.js";
6
- import { t as X_default } from "./X.js";
5
+ import { useIsMobileBreakpoint } from "./hooks/useIsMobileBreakpoint.js";
6
+ import X from "./components/Icons/X.js";
7
7
  import classNames from "classnames";
8
8
  import { jsx } from "react/jsx-runtime";
9
9
  import styles from "./components/Close/styles.module.scss";
10
+ //#region src/components/Close/Close.tsx
10
11
  var Close = (props) => {
11
12
  const { small, testId, ariaLabel = "Lukk", onClick, className, color = "blueberry", ref } = props;
12
13
  const { refObject, isHovered } = usePseudoClasses();
@@ -30,7 +31,7 @@ var Close = (props) => {
30
31
  [styles["close__inner-container--plum"]]: color == "plum"
31
32
  }),
32
33
  children: /* @__PURE__ */ jsx(Icon_default, {
33
- svgIcon: X_default,
34
+ svgIcon: X,
34
35
  color: iconColor,
35
36
  size: iconSize,
36
37
  isHovered
@@ -38,7 +39,10 @@ var Close = (props) => {
38
39
  })
39
40
  });
40
41
  };
41
- var Close_default$1 = Close;
42
- export { Close_default$1 as t };
42
+ //#endregion
43
+ //#region src/components/Close/index.ts
44
+ var Close_default = Close;
45
+ //#endregion
46
+ export { Close_default as t };
43
47
 
44
48
  //# sourceMappingURL=Close.js.map
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,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
+ {"version":3,"file":"Close.js","names":[],"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,IAAM,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;CACJ,IAAI,UAAU,SACZ,YAAY;MACP,IAAI,UAAU,QACnB,YAAY;MAEZ,YAAY;CAGd,MAAM,eAAe,WAAW,OAAO,OAAO,GAAG,OAAO,kBAAkB,OAAO,EAAE,UAAU;CAE7F,OACE,oBAAC,UAAD;EACE,KAAK,UAAU,CAAC,KAAK,UAAU,CAAC;EAChC,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,cAAY;EACH;EACT,MAAK;YAEL,oBAAC,QAAD;GACE,WAAW,WAAW,OAAO,2BAA2B;KACrD,OAAO,mCAAmC;KAC1C,OAAO,kCAAkC,SAAS;IACpD,CAAC;aAEF,oBAAC,cAAD;IAAM,SAAS;IAAG,OAAO;IAAW,MAAM;IAAqB;IAAa,CAAA;GACvE,CAAA;EACA,CAAA;;;;AC7Db,IAAA,gBAAe"}
@@ -1,7 +1,8 @@
1
- import { n as AnalyticsId } from "./constants2.js";
1
+ import { AnalyticsId } from "./constants.js";
2
2
  import classNames from "classnames";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import styles from "./components/DictionaryTrigger/styles.module.scss";
5
+ //#region src/components/DictionaryTrigger/DictionaryTrigger.tsx
5
6
  var DictionaryTrigger = (props) => {
6
7
  const { children, selected = false, className, testId, ref, ...rest } = props;
7
8
  const triggerClasses = classNames(styles.dictionarytrigger, className);
@@ -17,7 +18,10 @@ var DictionaryTrigger = (props) => {
17
18
  });
18
19
  };
19
20
  DictionaryTrigger.displayName = "DictionaryTrigger";
20
- var DictionaryTrigger_default$1 = DictionaryTrigger;
21
- export { DictionaryTrigger_default$1 as t };
21
+ //#endregion
22
+ //#region src/components/DictionaryTrigger/index.ts
23
+ var DictionaryTrigger_default = DictionaryTrigger;
24
+ //#endregion
25
+ export { DictionaryTrigger_default as t };
22
26
 
23
27
  //# sourceMappingURL=DictionaryTrigger.js.map
@@ -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,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"}
1
+ {"version":3,"file":"DictionaryTrigger.js","names":[],"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,IAAM,qBAAuD,UAAkC;CAC7F,MAAM,EAAE,UAAU,WAAW,OAAO,WAAW,QAAQ,KAAK,GAAG,SAAS;CACxE,MAAM,iBAAiB,WAAW,OAAO,mBAAmB,UAAU;CAEtE,OACE,oBAAC,UAAD;EACE,MAAK;EACL,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,iBAAe;EACV;EACL,GAAI;EAEH;EACM,CAAA;;AAIb,kBAAkB,cAAc;;;AC9ChC,IAAA,4BAAe"}
package/lib/Drawer.js CHANGED
@@ -1,19 +1,19 @@
1
- import { n as uuid_default } from "./uuid.js";
2
- import { c as ZIndex, n as AnalyticsId, o as KeyboardEventKey, s as LanguageLocales } from "./constants2.js";
1
+ import { t as uuid } from "./uuid.js";
2
+ import { AnalyticsId, KeyboardEventKey, LanguageLocales, ZIndex } from "./constants.js";
3
3
  import { t as Icon_default } from "./Icon.js";
4
- import { n as useLanguage } from "./useLanguage.js";
5
- import { t as useIsMobileBreakpoint } from "./useIsMobileBreakpoint.js";
4
+ import { useLanguage } from "./hooks/useLanguage.js";
5
+ import { useIsMobileBreakpoint } from "./hooks/useIsMobileBreakpoint.js";
6
6
  import { t as Button_default } from "./Button.js";
7
- import { n as getAriaLabelAttributes } from "./accessibility.js";
8
- import { n as useFocusTrap_default } from "./useFocusTrap.js";
9
- import { t as useIsVisible } from "./useIsVisible.js";
10
- import { t as useKeyboardEvent } from "./useKeyboardEvent.js";
11
- import { t as useOutsideEvent } from "./useOutsideEvent.js";
7
+ import { getAriaLabelAttributes } from "./utils/accessibility.js";
8
+ import useFocusTrap from "./hooks/useFocusTrap.js";
9
+ import { useIsVisible } from "./hooks/useIsVisible.js";
10
+ import { useKeyboardEvent } from "./hooks/useKeyboardEvent.js";
11
+ import { useOutsideEvent } from "./hooks/useOutsideEvent.js";
12
12
  import { t as Close_default } from "./Close.js";
13
- import { t as useReturnFocusOnUnmount } from "./useReturnFocusOnUnmount.js";
14
- import { n as enableBodyScroll, t as disableBodyScroll } from "./scroll.js";
15
- import { t as ChevronLeft_default } from "./ChevronLeft.js";
16
- import { t as Title_default } from "./Title2.js";
13
+ import { useReturnFocusOnUnmount } from "./hooks/useReturnFocusOnUnmount.js";
14
+ import { disableBodyScroll, enableBodyScroll } from "./utils/scroll.js";
15
+ import ChevronLeft from "./components/Icons/ChevronLeft.js";
16
+ import Title_default from "./components/Title/index.js";
17
17
  import classNames from "classnames";
18
18
  import React, { useEffect, useRef } from "react";
19
19
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -31,7 +31,9 @@ var HN_Designsystem_Drawer_nn_NO_default = {
31
31
  ariaLabelCloseBtn: "Lukk",
32
32
  ariaLabelBackButton: "Gå tilbake"
33
33
  };
34
- const getResources = (language) => {
34
+ //#endregion
35
+ //#region src/components/Drawer/resourceHelper.ts
36
+ var getResources = (language) => {
35
37
  switch (language) {
36
38
  case LanguageLocales.ENGLISH: return HN_Designsystem_Drawer_en_GB_default;
37
39
  case LanguageLocales.NORWEGIAN_NYNORSK: return HN_Designsystem_Drawer_nn_NO_default;
@@ -39,6 +41,8 @@ const getResources = (language) => {
39
41
  default: return HN_Designsystem_Drawer_nb_NO_default;
40
42
  }
41
43
  };
44
+ //#endregion
45
+ //#region src/components/Drawer/Drawer.tsx
42
46
  var Drawer = (props) => {
43
47
  const { isOpen, ...rest } = props;
44
48
  const isMobile = useIsMobileBreakpoint();
@@ -48,7 +52,7 @@ var Drawer = (props) => {
48
52
  }) });
49
53
  };
50
54
  var InnerDrawer = (props) => {
51
- const { ariaLabel, ariaLabelledBy, children, closeColor = "blueberry", desktopDirection = "left", footerContent, headerClasses, noCloseButton = false, onPrimaryAction, onRequestClose, onSecondaryAction, primaryActionText, secondaryActionText, title, titleHtmlMarkup = "h3", titleId = uuid_default(), zIndex = ZIndex.OverlayScreen, resources, isMobile, withBackButton, onRequestBack, contentClassName } = props;
55
+ const { ariaLabel, ariaLabelledBy, children, closeColor = "blueberry", desktopDirection = "left", footerContent, headerClasses, noCloseButton = false, onPrimaryAction, onRequestClose, onSecondaryAction, primaryActionText, secondaryActionText, title, titleHtmlMarkup = "h3", titleId = uuid(), zIndex = ZIndex.OverlayScreen, resources, isMobile, withBackButton, onRequestBack, contentClassName } = props;
52
56
  const ariaLabelAttributes = getAriaLabelAttributes({
53
57
  label: ariaLabel,
54
58
  id: ariaLabelledBy,
@@ -76,7 +80,7 @@ var InnerDrawer = (props) => {
76
80
  const contentIsScrollable = contentRef.current && contentRef.current.scrollHeight > contentRef.current.clientHeight;
77
81
  const headerStyling = classNames(styles.drawer__header, headerClasses);
78
82
  const hasFooterContent = typeof footerContent !== "undefined" && footerContent || onPrimaryAction || onSecondaryAction;
79
- useFocusTrap_default(containerRef, true);
83
+ useFocusTrap(containerRef, true);
80
84
  useReturnFocusOnUnmount(containerRef);
81
85
  useOutsideEvent(containerRef, () => {
82
86
  if (onRequestClose) onRequestClose();
@@ -191,7 +195,7 @@ var InnerDrawer = (props) => {
191
195
  onClick: onRequestBack,
192
196
  variant: "borderless",
193
197
  wrapperClassName: styles["drawer__header__back-button"],
194
- children: /* @__PURE__ */ jsx(Icon_default, { svgIcon: ChevronLeft_default })
198
+ children: /* @__PURE__ */ jsx(Icon_default, { svgIcon: ChevronLeft })
195
199
  }),
196
200
  !noCloseButton && onRequestClose != void 0 && /* @__PURE__ */ jsx(Close_default, {
197
201
  ariaLabel: mergedResources.ariaLabelCloseBtn,
@@ -249,7 +253,10 @@ var InnerDrawer = (props) => {
249
253
  })]
250
254
  });
251
255
  };
252
- var Drawer_default$1 = Drawer;
253
- export { Drawer_default$1 as t };
256
+ //#endregion
257
+ //#region src/components/Drawer/index.ts
258
+ var Drawer_default = Drawer;
259
+ //#endregion
260
+ export { Drawer_default as t };
254
261
 
255
262
  //# sourceMappingURL=Drawer.js.map
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/resources/HN.Designsystem.Drawer.nn-NO.json","../src/components/Drawer/resourceHelper.ts","../src/components/Drawer/Drawer.tsx","../src/components/Drawer/index.ts"],"sourcesContent":["{\n \"ariaLabelCloseBtn\": \"Close\",\n \"ariaLabelBackButton\": \"Go back\"\n}\n","{\n \"ariaLabelBackButton\": \"Gå tilbake\",\n \"ariaLabelCloseBtn\": \"Lukk\"\n}\n","{\n \"ariaLabelCloseBtn\": \"Lukk\",\n \"ariaLabelBackButton\": \"Gå tilbake\"\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';\nimport nnNO from '../../resources/HN.Designsystem.Drawer.nn-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemDrawer => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN_NYNORSK:\n return nnNO;\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 Icon from '../Icon';\nimport ChevronLeft from '../Icons/ChevronLeft';\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 /** Shows a back button to the left of title */\n withBackButton?: boolean;\n /** Callback for the back button */\n onRequestBack?: () => void;\n /** Sets classname for content part in Drawer */\n contentClassName?: string;\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 withBackButton,\n onRequestBack,\n contentClassName,\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 titleRef = useRef<HTMLHeadingElement>(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 // eslint-disable-next-line react-hooks/refs\n const contentIsScrollable = contentRef.current && contentRef.current.scrollHeight > contentRef.current.clientHeight;\n const headerStyling = classNames(styles.drawer__header, headerClasses);\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 // 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 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 const handleCTA = (callback?: () => void): void => {\n if (callback) {\n callback();\n }\n };\n\n useEffect(() => {\n titleRef.current?.focus();\n }, [title]);\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\n id={ariaLabelAttributes?.['aria-labelledby']}\n className={styles['drawer__header__title']}\n htmlMarkup={titleHtmlMarkup}\n appearance=\"title3\"\n ref={titleRef}\n tabIndex={-1}\n >\n {title}\n </Title>\n {withBackButton && onRequestBack !== undefined && (\n <Button\n ariaLabel={mergedResources.ariaLabelBackButton}\n onClick={onRequestBack}\n variant=\"borderless\"\n wrapperClassName={styles['drawer__header__back-button']}\n >\n <Icon svgIcon={ChevronLeft} />\n </Button>\n )}\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={classNames(styles.drawer__content, contentClassName)}\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGOA,MAAa,gBAAgB,aAAoD;AAC/E,SAAQ,UAAR;EACE,KAAK,gBAAgB,QACnB,QAAO;EACT,KAAK,gBAAgB,kBACnB,QAAO;EACT,KAAK,gBAAgB;EACrB,QACE,QAAO;;;ACmEb,IAAMA,UAAgC,UAAS;CAC7C,MAAM,EAAE,QAA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gCAAgC;MAChG,OAAO;OACL,SAAS,CAAC,qBAAqB,sBAAsB,IAAI;OACzD,KAAK;OACN;OACD;KACF,qBAAC,OAAA;MACC,WAAW,WAAW,OAAO,iBAAiB,iBAAiB;MAC/D,UAAU,sBAAsB,IAAI,KAAA;MACpC,MAAM,sBAAsB,WAAW,KAAA;MACvC,GAAK,sBAAsB,sBAAsB,EAAE;MACnD,KAAK;;OAEL,oBAAC,OAAA,EAAI,KAAK,YAAA,CAAc;OACxB,oBAAC,OAAA;QAAI,WAAW,OAAO;QAA+B;SAAe;OACrE,oBAAC,OAAA;QAAI,KAAK;QAAe,OAAO,EAAE,QAAQ,OAAO;SAAI;;OACjD;KACN,oBAAC,OAAA;MACC,WAAW,WAAW,OAAO,4BAA4B,OAAO,mCAAmC;MACnG,OAAO;OACL,SAAS,CAAC,wBAAwB,sBAAsB,IAAI;OAC5D,QAAQ,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;;AC7UV,IAAA,mBDiVe"}
1
+ {"version":3,"file":"Drawer.js","names":[],"sources":["../src/resources/HN.Designsystem.Drawer.en-GB.json","../src/resources/HN.Designsystem.Drawer.nb-NO.json","../src/resources/HN.Designsystem.Drawer.nn-NO.json","../src/components/Drawer/resourceHelper.ts","../src/components/Drawer/Drawer.tsx","../src/components/Drawer/index.ts"],"sourcesContent":["{\n \"ariaLabelCloseBtn\": \"Close\",\n \"ariaLabelBackButton\": \"Go back\"\n}\n","{\n \"ariaLabelBackButton\": \"Gå tilbake\",\n \"ariaLabelCloseBtn\": \"Lukk\"\n}\n","{\n \"ariaLabelCloseBtn\": \"Lukk\",\n \"ariaLabelBackButton\": \"Gå tilbake\"\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';\nimport nnNO from '../../resources/HN.Designsystem.Drawer.nn-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemDrawer => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN_NYNORSK:\n return nnNO;\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 Icon from '../Icon';\nimport ChevronLeft from '../Icons/ChevronLeft';\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 /** Shows a back button to the left of title */\n withBackButton?: boolean;\n /** Callback for the back button */\n onRequestBack?: () => void;\n /** Sets classname for content part in Drawer */\n contentClassName?: string;\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 withBackButton,\n onRequestBack,\n contentClassName,\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 titleRef = useRef<HTMLHeadingElement>(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 // eslint-disable-next-line react-hooks/refs\n const contentIsScrollable = contentRef.current && contentRef.current.scrollHeight > contentRef.current.clientHeight;\n const headerStyling = classNames(styles.drawer__header, headerClasses);\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 // 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 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 const handleCTA = (callback?: () => void): void => {\n if (callback) {\n callback();\n }\n };\n\n useEffect(() => {\n titleRef.current?.focus();\n }, [title]);\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\n id={ariaLabelAttributes?.['aria-labelledby']}\n className={styles['drawer__header__title']}\n htmlMarkup={titleHtmlMarkup}\n appearance=\"title3\"\n ref={titleRef}\n tabIndex={-1}\n >\n {title}\n </Title>\n {withBackButton && onRequestBack !== undefined && (\n <Button\n ariaLabel={mergedResources.ariaLabelBackButton}\n onClick={onRequestBack}\n variant=\"borderless\"\n wrapperClassName={styles['drawer__header__back-button']}\n >\n <Icon svgIcon={ChevronLeft} />\n </Button>\n )}\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={classNames(styles.drawer__content, contentClassName)}\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGOA,IAAa,gBAAgB,aAAoD;CAC/E,QAAQ,UAAR;EACE,KAAK,gBAAgB,SACnB,OAAO;EACT,KAAK,gBAAgB,mBACnB,OAAO;EACT,KAAK,gBAAgB;EACrB,SACE,OAAO;;;;;ACmEb,IAAM,UAAgC,UAAS;CAC7C,MAAM,EAAE,QAAQ,GAAG,SAAS;CAC5B,MAAM,WAAW,uBAAuB;CAExC,OAAO,oBAAC,iBAAD,EAAA,UAAkB,UAAU,oBAAC,aAAD;EAAa,GAAI;EAAgB;EAAY,CAAA,EAAmB,CAAA;;AAGrG,IAAM,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,MAAM,EAChB,SAAS,OAAO,eAChB,WACA,UACA,gBACA,eACA,qBACE;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,WAAW,OAA2B,KAAK;CACjD,MAAM,CAAC,OAAO,WAAW,YAAY;CACrC,MAAM,CAAC,WAAW,gBAAgB,aAA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AAQ,eAAe,UAAU,gBAAgB;eAAG;KAA2B,CAAA,EAClG,qBACC,oBAAC,gBAAD;KAAQ,SAAQ;KAAa,eAAe,UAAU,kBAAkB;eACrE;KACM,CAAA,CAEV,EAAA,CAAA;IAED,CAAA,CAEJ;KACF;;;;;AC7UV,IAAA,iBAAe"}
@@ -1,12 +1,15 @@
1
1
  import { t as Drawer_default } from "./Drawer.js";
2
2
  import { Children, createContext, isValidElement, useCallback, useContext, useMemo, useState } from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
- const DrawerNavigationContext = createContext(null);
4
+ //#region src/components/Filter/DrawerNavigation/useDrawerNavigation.ts
5
+ var DrawerNavigationContext = createContext(null);
5
6
  function useDrawerNavigation() {
6
7
  const context = useContext(DrawerNavigationContext);
7
8
  if (!context) throw new Error("useDrawerNavigation must be used inside a <DrawerNavigation> component");
8
9
  return context;
9
10
  }
11
+ //#endregion
12
+ //#region src/components/Filter/DrawerNavigation/DrawerNavigation.tsx
10
13
  function DrawerView(_props) {
11
14
  return null;
12
15
  }
@@ -23,7 +26,9 @@ function parseChildren(children) {
23
26
  footer: child.props.footer,
24
27
  drawerContentClassname: child.props.drawerContentClassname
25
28
  });
26
- else other.push(child);
29
+ else
30
+ /** Added possibility of other children to support Modals that need navigation context */
31
+ other.push(child);
27
32
  });
28
33
  return {
29
34
  views,
@@ -75,7 +80,7 @@ function DrawerNavigation({ children, isOpen, initialView, onCloseButton, footer
75
80
  });
76
81
  }
77
82
  DrawerNavigation.View = DrawerView;
78
- var DrawerNavigation_default = DrawerNavigation;
79
- export { DrawerNavigationContext as n, useDrawerNavigation as r, DrawerNavigation_default as t };
83
+ //#endregion
84
+ export { DrawerNavigationContext as n, useDrawerNavigation as r, DrawerNavigation as t };
80
85
 
81
86
  //# sourceMappingURL=DrawerNavigation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerNavigation.js","names":["views: DrawerViewProps[]","other: React.ReactNode[]"],"sources":["../src/components/Filter/DrawerNavigation/useDrawerNavigation.ts","../src/components/Filter/DrawerNavigation/DrawerNavigation.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport interface NavigateProps<ViewId extends string = string> {\n goToView: (id: ViewId) => void;\n goBack: () => void;\n goToViewAndClearStack: (id: ViewId) => void;\n}\n\nexport const DrawerNavigationContext = createContext<NavigateProps | null>(null);\n\nexport function useDrawerNavigation<ViewId extends string = string>(): NavigateProps<ViewId> {\n const context = useContext(DrawerNavigationContext);\n if (!context) {\n throw new Error('useDrawerNavigation must be used inside a <DrawerNavigation> component');\n }\n return context as NavigateProps<ViewId>;\n}\n","import type React from 'react';\nimport { Children, isValidElement, useCallback, useMemo, useState } from 'react';\n\nimport { type NavigateProps, DrawerNavigationContext } from './useDrawerNavigation';\nimport Drawer from '../../Drawer';\n\nexport interface DrawerViewProps<ViewId extends string = string> {\n /** Id for the view. Important for navigation */\n id: ViewId;\n /** Title used for Drawer in current view */\n title: string;\n /** Mark this view as the home/default view */\n home?: boolean;\n /** Content inside the drawer for this view */\n children: React.ReactNode;\n /** Default onClose callback for drawer. Will override onCloseButton on parent */\n onCloseButton?: () => void;\n /** Content sent to footer section of Drawer. Will override footer on parent */\n footer?: React.ReactNode;\n /** Classname set on the content inside Drawer */\n drawerContentClassname?: string;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction DrawerView<ViewId extends string>(_props: DrawerViewProps<ViewId>): React.ReactNode {\n // DrawerView is never rendered directly — DrawerNavigation reads its props\n return null;\n}\n\nexport interface DrawerNavigationProps {\n /** Views and other children components inside the Drawer navigation. Views are put in stack */\n children: React.ReactNode;\n /** Is drawer open or closed */\n isOpen: boolean;\n /** Navigate to this view when the drawer opens. Defaults to home view. */\n initialView?: string;\n /** Default onClose callback for drawer. View onCloseButton callback will override this. */\n onCloseButton?: () => void;\n /** Content sent to footer section of Drawer. View footer will override this */\n footer?: React.ReactNode;\n}\n\nfunction parseChildren(children: React.ReactNode): { views: DrawerViewProps[]; other: React.ReactNode[] } {\n const views: DrawerViewProps[] = [];\n const other: React.ReactNode[] = [];\n Children.forEach(children, child => {\n if (isValidElement<DrawerViewProps>(child) && child.type === DrawerView) {\n views.push({\n id: child.props.id,\n title: child.props.title,\n home: child.props.home,\n children: child.props.children,\n onCloseButton: child.props.onCloseButton,\n footer: child.props.footer,\n drawerContentClassname: child.props.drawerContentClassname,\n });\n } else {\n /** Added possibility of other children to support Modals that need navigation context */\n other.push(child);\n }\n });\n return { views, other };\n}\n\nfunction DrawerNavigation({ children, isOpen, initialView, onCloseButton, footer }: DrawerNavigationProps): React.ReactNode {\n const { views, other } = useMemo(() => parseChildren(children), [children]);\n\n const homeView = views.find(v => v.home) ?? views[0];\n const [viewStack, setViewStack] = useState<string[]>([homeView?.id]);\n\n const goToView = useCallback(\n (id: string): void => {\n if (views.some(v => v.id === id)) {\n setViewStack(stack => [...stack, id]);\n }\n },\n [views]\n );\n\n const goBack = useCallback((): void => {\n setViewStack(stack => (stack.length > 1 ? stack.slice(0, -1) : stack));\n }, []);\n\n const goToViewAndClearStack = useCallback(\n (id: string): void => {\n if (views.some(v => v.id === id)) {\n setViewStack(id === homeView?.id ? [homeView.id] : [homeView?.id, id]);\n }\n },\n [views, homeView]\n );\n\n const currentViewId = viewStack[viewStack.length - 1];\n const currentView = views.find(v => v.id === currentViewId);\n\n const navigate = useMemo<NavigateProps>(() => ({ goBack, goToView, goToViewAndClearStack }), [goBack, goToView, goToViewAndClearStack]);\n\n const [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n if (prevIsOpen !== isOpen) {\n setPrevIsOpen(isOpen);\n if (!isOpen) {\n setViewStack([homeView?.id]);\n } else if (initialView && views.some(v => v.id === initialView)) {\n setViewStack(initialView === homeView?.id ? [homeView.id] : [homeView?.id, initialView]);\n }\n }\n\n return (\n <DrawerNavigationContext.Provider value={navigate}>\n <Drawer\n isOpen={isOpen}\n title={currentView?.title ?? 'Filter'}\n withBackButton={viewStack.length > 1}\n onRequestBack={goBack}\n onRequestClose={currentView?.onCloseButton ?? onCloseButton}\n footerContent={currentView?.footer ?? footer}\n contentClassName={currentView?.drawerContentClassname}\n >\n {currentView?.children}\n </Drawer>\n {other}\n </DrawerNavigationContext.Provider>\n );\n}\n\nDrawerNavigation.View = DrawerView;\n\nexport default DrawerNavigation;\n"],"mappings":";;;AAQA,MAAa,0BAA0B,cAAoC,KAAK;AAEhF,SAAgB,sBAA6E;CAC3F,MAAM,UAAU,WAAW,wBAAwB;AACnD,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,yEAAyE;AAE3F,QAAO;;ACST,SAAS,WAAkC,QAAkD;AAE3F,QAAO;;AAgBT,SAAS,cAAc,UAAmF;CACxG,MAAMA,QAA2B,EAAE;CACnC,MAAMC,QAA2B,EAAE;AACnC,UAAS,QAAQ,WAAU,UAAS;AAClC,MAAI,eAAgC,MAAM,IAAI,MAAM,SAAS,WAC3D,OAAM,KAAK;GACT,IAAI,MAAM,MAAM;GAChB,OAAO,MAAM,MAAM;GACnB,MAAM,MAAM,MAAM;GAClB,UAAU,MAAM,MAAM;GACtB,eAAe,MAAM,MAAM;GAC3B,QAAQ,MAAM,MAAM;GACpB,wBAAwB,MAAM,MAAM;GACrC,CAAC;MAGF,OAAM,KAAK,MAAM;GAEnB;AACF,QAAO;EAAE;EAAO;EAAO;;AAGzB,SAAS,iBAAiB,EAAE,UAAU,QAAQ,aAAa,eAAe,UAAkD;CAC1H,MAAM,EAAE,OAAO,UAAU,cAAc,cAAc,SAAS,EAAE,CAAC,SAAS,CAAC;CAE3E,MAAM,WAAW,MAAM,MAAK,MAAK,EAAE,KAAK,IAAI,MAAM;CAClD,MAAM,CAAC,WAAW,gBAAgB,SAAmB,CAAC,UAAU,GAAG,CAAC;CAEpE,MAAM,WAAW,aACd,OAAqB;AACpB,MAAI,MAAM,MAAK,MAAK,EAAE,OAAO,GAAG,CAC9B,eAAa,UAAS,CAAC,GAAG,OAAO,GAAG,CAAC;IAGzC,CAAC,MAAM,CACR;CAED,MAAM,SAAS,kBAAwB;AACrC,gBAAa,UAAU,MAAM,SAAS,IAAI,MAAM,MAAM,GAAG,GAAG,GAAG,MAAO;IACrE,EAAE,CAAC;CAEN,MAAM,wBAAwB,aAC3B,OAAqB;AACpB,MAAI,MAAM,MAAK,MAAK,EAAE,OAAO,GAAG,CAC9B,cAAa,OAAO,UAAU,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC;IAG1E,CAAC,OAAO,SAAS,CAClB;CAED,MAAM,gBAAgB,UAAU,UAAU,SAAS;CACnD,MAAM,cAAc,MAAM,MAAK,MAAK,EAAE,OAAO,cAAc;CAE3D,MAAM,WAAW,eAA8B;EAAE;EAAQ;EAAU;EAAuB,GAAG;EAAC;EAAQ;EAAU;EAAsB,CAAC;CAEvI,MAAM,CAAC,YAAY,iBAAiB,SAAS,OAAO;AACpD,KAAI,eAAe,QAAQ;AACzB,gBAAc,OAAO;AACrB,MAAI,CAAC,OACH,cAAa,CAAC,UAAU,GAAG,CAAC;WACnB,eAAe,MAAM,MAAK,MAAK,EAAE,OAAO,YAAY,CAC7D,cAAa,gBAAgB,UAAU,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,UAAU,IAAI,YAAY,CAAC;;AAI5F,QACE,qBAAC,wBAAwB,UAAA;EAAS,OAAO;aACvC,oBAAC,gBAAA;GACS;GACR,OAAO,aAAa,SAAS;GAC7B,gBAAgB,UAAU,SAAS;GACnC,eAAe;GACf,gBAAgB,aAAa,iBAAiB;GAC9C,eAAe,aAAa,UAAU;GACtC,kBAAkB,aAAa;aAE9B,aAAa;IACP,EACR,MAAA;GACgC;;AAIvC,iBAAiB,OAAO;AAExB,IAAA,2BAAe"}
1
+ {"version":3,"file":"DrawerNavigation.js","names":[],"sources":["../src/components/Filter/DrawerNavigation/useDrawerNavigation.ts","../src/components/Filter/DrawerNavigation/DrawerNavigation.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport interface NavigateProps<ViewId extends string = string> {\n goToView: (id: ViewId) => void;\n goBack: () => void;\n goToViewAndClearStack: (id: ViewId) => void;\n}\n\nexport const DrawerNavigationContext = createContext<NavigateProps | null>(null);\n\nexport function useDrawerNavigation<ViewId extends string = string>(): NavigateProps<ViewId> {\n const context = useContext(DrawerNavigationContext);\n if (!context) {\n throw new Error('useDrawerNavigation must be used inside a <DrawerNavigation> component');\n }\n return context as NavigateProps<ViewId>;\n}\n","import type React from 'react';\nimport { Children, isValidElement, useCallback, useMemo, useState } from 'react';\n\nimport { type NavigateProps, DrawerNavigationContext } from './useDrawerNavigation';\nimport Drawer from '../../Drawer';\n\nexport interface DrawerViewProps<ViewId extends string = string> {\n /** Id for the view. Important for navigation */\n id: ViewId;\n /** Title used for Drawer in current view */\n title: string;\n /** Mark this view as the home/default view */\n home?: boolean;\n /** Content inside the drawer for this view */\n children: React.ReactNode;\n /** Default onClose callback for drawer. Will override onCloseButton on parent */\n onCloseButton?: () => void;\n /** Content sent to footer section of Drawer. Will override footer on parent */\n footer?: React.ReactNode;\n /** Classname set on the content inside Drawer */\n drawerContentClassname?: string;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction DrawerView<ViewId extends string>(_props: DrawerViewProps<ViewId>): React.ReactNode {\n // DrawerView is never rendered directly — DrawerNavigation reads its props\n return null;\n}\n\nexport interface DrawerNavigationProps {\n /** Views and other children components inside the Drawer navigation. Views are put in stack */\n children: React.ReactNode;\n /** Is drawer open or closed */\n isOpen: boolean;\n /** Navigate to this view when the drawer opens. Defaults to home view. */\n initialView?: string;\n /** Default onClose callback for drawer. View onCloseButton callback will override this. */\n onCloseButton?: () => void;\n /** Content sent to footer section of Drawer. View footer will override this */\n footer?: React.ReactNode;\n}\n\nfunction parseChildren(children: React.ReactNode): { views: DrawerViewProps[]; other: React.ReactNode[] } {\n const views: DrawerViewProps[] = [];\n const other: React.ReactNode[] = [];\n Children.forEach(children, child => {\n if (isValidElement<DrawerViewProps>(child) && child.type === DrawerView) {\n views.push({\n id: child.props.id,\n title: child.props.title,\n home: child.props.home,\n children: child.props.children,\n onCloseButton: child.props.onCloseButton,\n footer: child.props.footer,\n drawerContentClassname: child.props.drawerContentClassname,\n });\n } else {\n /** Added possibility of other children to support Modals that need navigation context */\n other.push(child);\n }\n });\n return { views, other };\n}\n\nfunction DrawerNavigation({ children, isOpen, initialView, onCloseButton, footer }: DrawerNavigationProps): React.ReactNode {\n const { views, other } = useMemo(() => parseChildren(children), [children]);\n\n const homeView = views.find(v => v.home) ?? views[0];\n const [viewStack, setViewStack] = useState<string[]>([homeView?.id]);\n\n const goToView = useCallback(\n (id: string): void => {\n if (views.some(v => v.id === id)) {\n setViewStack(stack => [...stack, id]);\n }\n },\n [views]\n );\n\n const goBack = useCallback((): void => {\n setViewStack(stack => (stack.length > 1 ? stack.slice(0, -1) : stack));\n }, []);\n\n const goToViewAndClearStack = useCallback(\n (id: string): void => {\n if (views.some(v => v.id === id)) {\n setViewStack(id === homeView?.id ? [homeView.id] : [homeView?.id, id]);\n }\n },\n [views, homeView]\n );\n\n const currentViewId = viewStack[viewStack.length - 1];\n const currentView = views.find(v => v.id === currentViewId);\n\n const navigate = useMemo<NavigateProps>(() => ({ goBack, goToView, goToViewAndClearStack }), [goBack, goToView, goToViewAndClearStack]);\n\n const [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n if (prevIsOpen !== isOpen) {\n setPrevIsOpen(isOpen);\n if (!isOpen) {\n setViewStack([homeView?.id]);\n } else if (initialView && views.some(v => v.id === initialView)) {\n setViewStack(initialView === homeView?.id ? [homeView.id] : [homeView?.id, initialView]);\n }\n }\n\n return (\n <DrawerNavigationContext.Provider value={navigate}>\n <Drawer\n isOpen={isOpen}\n title={currentView?.title ?? 'Filter'}\n withBackButton={viewStack.length > 1}\n onRequestBack={goBack}\n onRequestClose={currentView?.onCloseButton ?? onCloseButton}\n footerContent={currentView?.footer ?? footer}\n contentClassName={currentView?.drawerContentClassname}\n >\n {currentView?.children}\n </Drawer>\n {other}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AEN,MAAM,wBAAwB,aAC3B,OAAqB;EACpB,IAAI,MAAM,MAAK,MAAK,EAAE,OAAO,GAAG,EAC9B,aAAa,OAAO,UAAU,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC;IAG1E,CAAC,OAAO,SAAS,CAClB;CAED,MAAM,gBAAgB,UAAU,UAAU,SAAS;CACnD,MAAM,cAAc,MAAM,MAAK,MAAK,EAAE,OAAO,cAAc;CAE3D,MAAM,WAAW,eAA8B;EAAE;EAAQ;EAAU;EAAuB,GAAG;EAAC;EAAQ;EAAU;EAAsB,CAAC;CAEvI,MAAM,CAAC,YAAY,iBAAiB,SAAS,OAAO;CACpD,IAAI,eAAe,QAAQ;EACzB,cAAc,OAAO;EACrB,IAAI,CAAC,QACH,aAAa,CAAC,UAAU,GAAG,CAAC;OACvB,IAAI,eAAe,MAAM,MAAK,MAAK,EAAE,OAAO,YAAY,EAC7D,aAAa,gBAAgB,UAAU,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,UAAU,IAAI,YAAY,CAAC;;CAI5F,OACE,qBAAC,wBAAwB,UAAzB;EAAkC,OAAO;YAAzC,CACE,oBAAC,gBAAD;GACU;GACR,OAAO,aAAa,SAAS;GAC7B,gBAAgB,UAAU,SAAS;GACnC,eAAe;GACf,gBAAgB,aAAa,iBAAiB;GAC9C,eAAe,aAAa,UAAU;GACtC,kBAAkB,aAAa;aAE9B,aAAa;GACP,CAAA,EACR,MACgC;;;AAIvC,iBAAiB,OAAO"}
package/lib/Duolist.js CHANGED
@@ -1,11 +1,12 @@
1
- import { n as AnalyticsId } from "./constants2.js";
2
- import { n as useBreakpoint, t as Breakpoint } from "./useBreakpoint.js";
1
+ import { AnalyticsId } from "./constants.js";
2
+ import { Breakpoint, useBreakpoint } from "./hooks/useBreakpoint.js";
3
3
  import { t as Spacer_default } from "./Spacer.js";
4
4
  import classNames from "classnames";
5
5
  import React from "react";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import duolistStyles from "./components/Duolist/styles.module.scss";
8
- const DuolistGroup = (props) => {
8
+ //#region src/components/Duolist/Duolist.tsx
9
+ var DuolistGroup = (props) => {
9
10
  const { format = "formatted", boldColumn = format === "non-formatted" ? "none" : "first", description, separator = ": ", term } = props;
10
11
  const firstBold = boldColumn === "first";
11
12
  const secondBold = boldColumn === "second";
@@ -32,7 +33,7 @@ const DuolistGroup = (props) => {
32
33
  };
33
34
  return nonFormatted ? /* @__PURE__ */ jsx("div", { children: renderContent() }) : /* @__PURE__ */ jsx(Fragment, { children: renderContent() });
34
35
  };
35
- const Duolist = (props) => {
36
+ var Duolist = (props) => {
36
37
  const { boldColumn, border = "no-border", descriptionWidth, label, format = "formatted", separator, variant = "normal", children, className, testId, useCollapsedFromAndBelowBreakpoint } = props;
37
38
  const hasBorder = border === "border";
38
39
  const hasLines = variant === "line";
@@ -71,7 +72,10 @@ const Duolist = (props) => {
71
72
  })]
72
73
  });
73
74
  };
74
- var Duolist_default$1 = Duolist;
75
- export { Duolist as n, DuolistGroup as r, Duolist_default$1 as t };
75
+ //#endregion
76
+ //#region src/components/Duolist/index.ts
77
+ var Duolist_default = Duolist;
78
+ //#endregion
79
+ export { Duolist as n, DuolistGroup as r, Duolist_default as t };
76
80
 
77
81
  //# sourceMappingURL=Duolist.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Duolist.js","names":["DuolistGroup: React.FC<DuolistGroupProps>","Duolist: React.FC<DuolistProps>"],"sources":["../src/components/Duolist/Duolist.tsx","../src/components/Duolist/index.ts"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport type { TitleProps } from '../Title';\n\nimport { AnalyticsId } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport Spacer from '../Spacer';\n\nimport duolistStyles from './styles.module.scss';\n\nexport type DuolistVariants = 'normal' | 'line';\nexport type BoldColumn = 'first' | 'second' | 'none';\nexport type Border = 'no-border' | 'border';\nexport type Formats = 'formatted' | 'non-formatted';\n\nexport interface DuolistProps {\n /** Determines which column is bold */\n boldColumn?: BoldColumn;\n /** Label of the Duolist */\n border?: Border;\n /** Label of the Duolist */\n label?: React.ReactElement<TitleProps>;\n /** Formatted or non-formatted visual variants */\n format?: Formats;\n /** Character separator for non-formatted format */\n separator?: string;\n /** Sets the visual variant of the Duolist. */\n variant?: DuolistVariants;\n /** Sets the content of the Duolist. */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Width of the description column in percentage */\n descriptionWidth?: number;\n /** Use collapsed mode on columns from chosen breakpoint and below. */\n useCollapsedFromAndBelowBreakpoint?: keyof typeof Breakpoint;\n}\n\nexport interface DuolistGroupProps {\n /** Determines which column is bold */\n boldColumn?: BoldColumn;\n /** Sets content of the <dd> tag. */\n description: React.ReactNode;\n /** Formatted or non-formatted visual variants */\n format?: Formats;\n /** Character separator for non-formatted format */\n separator?: string;\n /** Sets content of the <dt> tag. */\n term: React.ReactNode;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const DuolistGroup: React.FC<DuolistGroupProps> = props => {\n const { format = 'formatted', boldColumn = format === 'non-formatted' ? 'none' : 'first', description, separator = ': ', term } = props;\n\n const firstBold = boldColumn === 'first';\n const secondBold = boldColumn === 'second';\n const nonFormatted = format === 'non-formatted';\n\n const dtClassNames = classNames(duolistStyles['duolist__dt'], {\n [duolistStyles['duolist__dt--bold']]: firstBold,\n [duolistStyles['duolist__dt--non-formatted']]: nonFormatted,\n });\n const ddClassNames = classNames(duolistStyles['duolist__dd'], {\n [duolistStyles['duolist__dd--bold']]: secondBold,\n [duolistStyles['duolist__dd--non-formatted']]: nonFormatted,\n });\n\n const renderContent = () => {\n return (\n <>\n <dt\n data-separator={nonFormatted ? separator : undefined}\n className={dtClassNames}\n data-testid={props.testId && `${props.testId}-term`}\n >\n {term}\n </dt>\n <dd className={ddClassNames} data-testid={props.testId && `${props.testId}-description`}>\n {description}\n </dd>\n </>\n );\n };\n\n return nonFormatted ? <div>{renderContent()}</div> : <>{renderContent()}</>;\n};\n\nexport const Duolist: React.FC<DuolistProps> = props => {\n const {\n boldColumn,\n border = 'no-border',\n descriptionWidth,\n label,\n format = 'formatted',\n separator,\n variant = 'normal',\n children,\n className,\n testId,\n useCollapsedFromAndBelowBreakpoint,\n } = props;\n\n const hasBorder = border === 'border';\n const hasLines = variant === 'line';\n const extraPaddingTop = hasBorder && (label || hasLines);\n const nonFormatted = format === 'non-formatted';\n const breakpoint = useBreakpoint();\n const useCollapsedMode = useCollapsedFromAndBelowBreakpoint && breakpoint <= Breakpoint[useCollapsedFromAndBelowBreakpoint];\n\n const duolistWrapperClasses = classNames(\n {\n [duolistStyles['duolist-wrapper--border']]: hasBorder,\n [duolistStyles['duolist-wrapper--extra-padding-top']]: extraPaddingTop,\n },\n className\n );\n\n const duolistClasses = classNames(duolistStyles.duolist, {\n [duolistStyles['duolist--line']]: hasLines,\n [duolistStyles['duolist--non-formatted']]: nonFormatted,\n [duolistStyles['duolist--collapsed']]: useCollapsedMode,\n [duolistStyles['duolist--not-collapsed']]: !useCollapsedMode,\n });\n\n const duolistColumnStyle = descriptionWidth ? descriptionWidth + '%' : 'minmax(60%, 1fr)';\n\n return (\n <div className={duolistWrapperClasses} data-testid={testId} data-analyticsid={AnalyticsId.Duolist}>\n {label && (\n <>\n {label}\n <Spacer />\n </>\n )}\n <dl\n style={!nonFormatted ? { gridTemplateColumns: useCollapsedMode ? `1fr` : `auto ${duolistColumnStyle}` } : undefined}\n className={duolistClasses}\n >\n {React.Children.map(children, (child: React.ReactNode | React.ReactElement<DuolistGroupProps>) => {\n if (child === null || typeof child === 'undefined') return;\n const duolistGroup = child as React.ReactElement<DuolistGroupProps>;\n if (duolistGroup.type === DuolistGroup) {\n return React.cloneElement(child as React.ReactElement<DuolistGroupProps>, {\n ...duolistGroup.props,\n boldColumn: duolistGroup.props.boldColumn ?? boldColumn,\n format: duolistGroup.props.format ?? format,\n separator: duolistGroup.props.separator ?? separator,\n });\n }\n })}\n </dl>\n </div>\n );\n};\n\nexport default Duolist;\n","import Duolist from './Duolist';\nexport * from './Duolist';\nexport default Duolist;\n"],"mappings":";;;;;;;AAyDA,MAAaA,gBAA4C,UAAS;CAChE,MAAM,EAAE,SAAS,aAAa,aAAa,WAAW,kBAAkB,SAAS,SAAS,aAAa,YAAY,MAAM,SAAS;CAElI,MAAM,YAAY,eAAe;CACjC,MAAM,aAAa,eAAe;CAClC,MAAM,eAAe,WAAW;CAEhC,MAAM,eAAe,WAAW,cAAc,gBAAgB;GAC3D,cAAc,uBAAuB;GACrC,cAAc,gCAAgC;EAChD,CAAC;CACF,MAAM,eAAe,WAAW,cAAc,gBAAgB;GAC3D,cAAc,uBAAuB;GACrC,cAAc,gCAAgC;EAChD,CAAC;CAEF,MAAM,sBAAsB;AAC1B,SACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,MAAA;GACC,kBAAgB,eAAe,YAAY,KAAA;GAC3C,WAAW;GACX,eAAa,MAAM,UAAU,GAAG,MAAM,OAAO;aAE5C;IACE,EACL,oBAAC,MAAA;GAAG,WAAW;GAAc,eAAa,MAAM,UAAU,GAAG,MAAM,OAAO;aACvE;IACE,CAAA,EAAA,CACJ;;AAIP,QAAO,eAAe,oBAAC,OAAA,EAAA,UAAK,eAAe,EAAA,CAAO,GAAG,oBAAA,UAAA,EAAA,UAAG,eAAe,EAAA,CAAI;;AAG7E,MAAaC,WAAkC,UAAS;CACtD,MAAM,EACJ,YACA,SAAS,aACT,kBACA,OACA,SAAS,aACT,WACA,UAAU,UACV,UACA,WACA,QACA,uCACE;CAEJ,MAAM,YAAY,WAAW;CAC7B,MAAM,WAAW,YAAY;CAC7B,MAAM,kBAAkB,cAAc,SAAS;CAC/C,MAAM,eAAe,WAAW;CAChC,MAAM,aAAa,eAAe;CAClC,MAAM,mBAAmB,sCAAsC,cAAc,WAAW;CAExF,MAAM,wBAAwB,WAC5B;GACG,cAAc,6BAA6B;GAC3C,cAAc,wCAAwC;EACxD,EACD,UACD;CAED,MAAM,iBAAiB,WAAW,cAAc,SAAS;GACtD,cAAc,mBAAmB;GACjC,cAAc,4BAA4B;GAC1C,cAAc,wBAAwB;GACtC,cAAc,4BAA4B,CAAC;EAC7C,CAAC;CAEF,MAAM,qBAAqB,mBAAmB,mBAAmB,MAAM;AAEvE,QACE,qBAAC,OAAA;EAAI,WAAW;EAAuB,eAAa;EAAQ,oBAAkB,YAAY;aACvF,SACC,qBAAA,UAAA,EAAA,UAAA,CACG,OACD,oBAAC,gBAAA,EAAA,CAAS,CAAA,EAAA,CACT,EAEL,oBAAC,MAAA;GACC,OAAO,CAAC,eAAe,EAAE,qBAAqB,mBAAmB,QAAQ,QAAQ,sBAAsB,GAAG,KAAA;GAC1G,WAAW;aAEV,MAAM,SAAS,IAAI,WAAW,UAAmE;AAChG,QAAI,UAAU,QAAQ,OAAO,UAAU,YAAa;IACpD,MAAM,eAAe;AACrB,QAAI,aAAa,SAAS,aACxB,QAAO,MAAM,aAAa,OAAgD;KACxE,GAAG,aAAa;KAChB,YAAY,aAAa,MAAM,cAAc;KAC7C,QAAQ,aAAa,MAAM,UAAU;KACrC,WAAW,aAAa,MAAM,aAAa;KAC5C,CAAC;KAEJ;IACC,CAAA;GACD;;AC3JV,IAAA,oBD+Je"}
1
+ {"version":3,"file":"Duolist.js","names":[],"sources":["../src/components/Duolist/Duolist.tsx","../src/components/Duolist/index.ts"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport type { TitleProps } from '../Title';\n\nimport { AnalyticsId } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport Spacer from '../Spacer';\n\nimport duolistStyles from './styles.module.scss';\n\nexport type DuolistVariants = 'normal' | 'line';\nexport type BoldColumn = 'first' | 'second' | 'none';\nexport type Border = 'no-border' | 'border';\nexport type Formats = 'formatted' | 'non-formatted';\n\nexport interface DuolistProps {\n /** Determines which column is bold */\n boldColumn?: BoldColumn;\n /** Label of the Duolist */\n border?: Border;\n /** Label of the Duolist */\n label?: React.ReactElement<TitleProps>;\n /** Formatted or non-formatted visual variants */\n format?: Formats;\n /** Character separator for non-formatted format */\n separator?: string;\n /** Sets the visual variant of the Duolist. */\n variant?: DuolistVariants;\n /** Sets the content of the Duolist. */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Width of the description column in percentage */\n descriptionWidth?: number;\n /** Use collapsed mode on columns from chosen breakpoint and below. */\n useCollapsedFromAndBelowBreakpoint?: keyof typeof Breakpoint;\n}\n\nexport interface DuolistGroupProps {\n /** Determines which column is bold */\n boldColumn?: BoldColumn;\n /** Sets content of the <dd> tag. */\n description: React.ReactNode;\n /** Formatted or non-formatted visual variants */\n format?: Formats;\n /** Character separator for non-formatted format */\n separator?: string;\n /** Sets content of the <dt> tag. */\n term: React.ReactNode;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const DuolistGroup: React.FC<DuolistGroupProps> = props => {\n const { format = 'formatted', boldColumn = format === 'non-formatted' ? 'none' : 'first', description, separator = ': ', term } = props;\n\n const firstBold = boldColumn === 'first';\n const secondBold = boldColumn === 'second';\n const nonFormatted = format === 'non-formatted';\n\n const dtClassNames = classNames(duolistStyles['duolist__dt'], {\n [duolistStyles['duolist__dt--bold']]: firstBold,\n [duolistStyles['duolist__dt--non-formatted']]: nonFormatted,\n });\n const ddClassNames = classNames(duolistStyles['duolist__dd'], {\n [duolistStyles['duolist__dd--bold']]: secondBold,\n [duolistStyles['duolist__dd--non-formatted']]: nonFormatted,\n });\n\n const renderContent = () => {\n return (\n <>\n <dt\n data-separator={nonFormatted ? separator : undefined}\n className={dtClassNames}\n data-testid={props.testId && `${props.testId}-term`}\n >\n {term}\n </dt>\n <dd className={ddClassNames} data-testid={props.testId && `${props.testId}-description`}>\n {description}\n </dd>\n </>\n );\n };\n\n return nonFormatted ? <div>{renderContent()}</div> : <>{renderContent()}</>;\n};\n\nexport const Duolist: React.FC<DuolistProps> = props => {\n const {\n boldColumn,\n border = 'no-border',\n descriptionWidth,\n label,\n format = 'formatted',\n separator,\n variant = 'normal',\n children,\n className,\n testId,\n useCollapsedFromAndBelowBreakpoint,\n } = props;\n\n const hasBorder = border === 'border';\n const hasLines = variant === 'line';\n const extraPaddingTop = hasBorder && (label || hasLines);\n const nonFormatted = format === 'non-formatted';\n const breakpoint = useBreakpoint();\n const useCollapsedMode = useCollapsedFromAndBelowBreakpoint && breakpoint <= Breakpoint[useCollapsedFromAndBelowBreakpoint];\n\n const duolistWrapperClasses = classNames(\n {\n [duolistStyles['duolist-wrapper--border']]: hasBorder,\n [duolistStyles['duolist-wrapper--extra-padding-top']]: extraPaddingTop,\n },\n className\n );\n\n const duolistClasses = classNames(duolistStyles.duolist, {\n [duolistStyles['duolist--line']]: hasLines,\n [duolistStyles['duolist--non-formatted']]: nonFormatted,\n [duolistStyles['duolist--collapsed']]: useCollapsedMode,\n [duolistStyles['duolist--not-collapsed']]: !useCollapsedMode,\n });\n\n const duolistColumnStyle = descriptionWidth ? descriptionWidth + '%' : 'minmax(60%, 1fr)';\n\n return (\n <div className={duolistWrapperClasses} data-testid={testId} data-analyticsid={AnalyticsId.Duolist}>\n {label && (\n <>\n {label}\n <Spacer />\n </>\n )}\n <dl\n style={!nonFormatted ? { gridTemplateColumns: useCollapsedMode ? `1fr` : `auto ${duolistColumnStyle}` } : undefined}\n className={duolistClasses}\n >\n {React.Children.map(children, (child: React.ReactNode | React.ReactElement<DuolistGroupProps>) => {\n if (child === null || typeof child === 'undefined') return;\n const duolistGroup = child as React.ReactElement<DuolistGroupProps>;\n if (duolistGroup.type === DuolistGroup) {\n return React.cloneElement(child as React.ReactElement<DuolistGroupProps>, {\n ...duolistGroup.props,\n boldColumn: duolistGroup.props.boldColumn ?? boldColumn,\n format: duolistGroup.props.format ?? format,\n separator: duolistGroup.props.separator ?? separator,\n });\n }\n })}\n </dl>\n </div>\n );\n};\n\nexport default Duolist;\n","import Duolist from './Duolist';\nexport * from './Duolist';\nexport default Duolist;\n"],"mappings":";;;;;;;;AAyDA,IAAa,gBAA4C,UAAS;CAChE,MAAM,EAAE,SAAS,aAAa,aAAa,WAAW,kBAAkB,SAAS,SAAS,aAAa,YAAY,MAAM,SAAS;CAElI,MAAM,YAAY,eAAe;CACjC,MAAM,aAAa,eAAe;CAClC,MAAM,eAAe,WAAW;CAEhC,MAAM,eAAe,WAAW,cAAc,gBAAgB;GAC3D,cAAc,uBAAuB;GACrC,cAAc,gCAAgC;EAChD,CAAC;CACF,MAAM,eAAe,WAAW,cAAc,gBAAgB;GAC3D,cAAc,uBAAuB;GACrC,cAAc,gCAAgC;EAChD,CAAC;CAEF,MAAM,sBAAsB;EAC1B,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,MAAD;GACE,kBAAgB,eAAe,YAAY,KAAA;GAC3C,WAAW;GACX,eAAa,MAAM,UAAU,GAAG,MAAM,OAAO;aAE5C;GACE,CAAA,EACL,oBAAC,MAAD;GAAI,WAAW;GAAc,eAAa,MAAM,UAAU,GAAG,MAAM,OAAO;aACvE;GACE,CAAA,CACJ,EAAA,CAAA;;CAIP,OAAO,eAAe,oBAAC,OAAD,EAAA,UAAM,eAAe,EAAO,CAAA,GAAG,oBAAA,UAAA,EAAA,UAAG,eAAe,EAAI,CAAA;;AAG7E,IAAa,WAAkC,UAAS;CACtD,MAAM,EACJ,YACA,SAAS,aACT,kBACA,OACA,SAAS,aACT,WACA,UAAU,UACV,UACA,WACA,QACA,uCACE;CAEJ,MAAM,YAAY,WAAW;CAC7B,MAAM,WAAW,YAAY;CAC7B,MAAM,kBAAkB,cAAc,SAAS;CAC/C,MAAM,eAAe,WAAW;CAChC,MAAM,aAAa,eAAe;CAClC,MAAM,mBAAmB,sCAAsC,cAAc,WAAW;CAExF,MAAM,wBAAwB,WAC5B;GACG,cAAc,6BAA6B;GAC3C,cAAc,wCAAwC;EACxD,EACD,UACD;CAED,MAAM,iBAAiB,WAAW,cAAc,SAAS;GACtD,cAAc,mBAAmB;GACjC,cAAc,4BAA4B;GAC1C,cAAc,wBAAwB;GACtC,cAAc,4BAA4B,CAAC;EAC7C,CAAC;CAEF,MAAM,qBAAqB,mBAAmB,mBAAmB,MAAM;CAEvE,OACE,qBAAC,OAAD;EAAK,WAAW;EAAuB,eAAa;EAAQ,oBAAkB,YAAY;YAA1F,CACG,SACC,qBAAA,UAAA,EAAA,UAAA,CACG,OACD,oBAAC,gBAAD,EAAU,CAAA,CACT,EAAA,CAAA,EAEL,oBAAC,MAAD;GACE,OAAO,CAAC,eAAe,EAAE,qBAAqB,mBAAmB,QAAQ,QAAQ,sBAAsB,GAAG,KAAA;GAC1G,WAAW;aAEV,MAAM,SAAS,IAAI,WAAW,UAAmE;IAChG,IAAI,UAAU,QAAQ,OAAO,UAAU,aAAa;IACpD,MAAM,eAAe;IACrB,IAAI,aAAa,SAAS,cACxB,OAAO,MAAM,aAAa,OAAgD;KACxE,GAAG,aAAa;KAChB,YAAY,aAAa,MAAM,cAAc;KAC7C,QAAQ,aAAa,MAAM,UAAU;KACrC,WAAW,aAAa,MAAM,aAAa;KAC5C,CAAC;KAEJ;GACC,CAAA,CACD;;;;;AC3JV,IAAA,kBAAe"}
@@ -1,19 +1,20 @@
1
- import { a as IconSize } from "./constants2.js";
1
+ import { IconSize } from "./constants.js";
2
2
  import { t as Icon_default } from "./Icon.js";
3
3
  import { n as AvatarSize, t as Avatar_default } from "./Avatar.js";
4
4
  import { t as Badge_default } from "./Badge.js";
5
5
  import { t as LazyIcon_default } from "./LazyIcon.js";
6
- import { n as isComponentWithChildren, t as isComponent } from "./component.js";
7
- import { n as useBreakpoint, t as Breakpoint } from "./useBreakpoint.js";
6
+ import { isComponent, isComponentWithChildren } from "./utils/component.js";
7
+ import { Breakpoint, useBreakpoint } from "./hooks/useBreakpoint.js";
8
8
  import { t as StatusDot_default } from "./StatusDot.js";
9
9
  import { t as Highlighter_default } from "./Highlighter.js";
10
- import { n as ElementHeaderText, r as ElementHeaderText_default } from "./ElementHeaderText.js";
10
+ import { n as ElementHeaderText } from "./ElementHeaderText.js";
11
11
  import { n as StatusDotList, t as StatusDotList_default } from "./StatusDotList.js";
12
12
  import classNames from "classnames";
13
13
  import React from "react";
14
14
  import { jsx, jsxs } from "react/jsx-runtime";
15
15
  import styles from "./components/ElementHeader/styles.module.scss";
16
- const mapChildren = (children, isJsxChild = false) => {
16
+ //#region src/components/ElementHeader/utils.tsx
17
+ var mapChildren = (children, isJsxChild = false) => {
17
18
  let avatarChild;
18
19
  const badgeChildren = [];
19
20
  const statusDotChildren = [];
@@ -44,9 +45,9 @@ const mapChildren = (children, isJsxChild = false) => {
44
45
  };
45
46
  if (isComponentWithChildren(remainingChildren[0])) return mapChildren(remainingChildren[0]?.props?.children, true);
46
47
  };
47
- const renderElementHeader = (element, options) => {
48
+ var renderElementHeader = (element, options) => {
48
49
  const { titleHtmlMarkup, isHovered, size, parentType, chevronIcon, icon, highlightText, closeButton } = options;
49
- if (isComponent(element, ElementHeader_default)) return React.cloneElement(element, {
50
+ if (isComponent(element, ElementHeader)) return React.cloneElement(element, {
50
51
  chevronIcon,
51
52
  icon,
52
53
  isHovered,
@@ -55,7 +56,7 @@ const renderElementHeader = (element, options) => {
55
56
  highlightText,
56
57
  closeButton
57
58
  });
58
- if (element) return /* @__PURE__ */ jsx(ElementHeader_default, {
59
+ if (element) return /* @__PURE__ */ jsx(ElementHeader, {
59
60
  highlightText,
60
61
  titleHtmlMarkup,
61
62
  parentType,
@@ -67,7 +68,9 @@ const renderElementHeader = (element, options) => {
67
68
  children: element
68
69
  });
69
70
  };
70
- const ElementHeaderRoot = (props) => {
71
+ //#endregion
72
+ //#region src/components/ElementHeader/ElementHeader.tsx
73
+ var ElementHeaderRoot = (props) => {
71
74
  const { className = "", titleHtmlMarkup = "h2", parentType = "linklist", chevronIcon, closeButton, children, icon, isHovered, size, testId, highlightText } = props;
72
75
  const breakpoint = useBreakpoint();
73
76
  const showIcon = size !== "small" && !!icon;
@@ -161,11 +164,11 @@ const ElementHeaderRoot = (props) => {
161
164
  };
162
165
  ElementHeaderRoot.displayName = "ElementHeader";
163
166
  var ElementHeader = ElementHeaderRoot;
164
- ElementHeader.Text = ElementHeaderText_default;
167
+ ElementHeader.Text = ElementHeaderText;
165
168
  ElementHeader.Text.displayName = "ElementHeader.Text";
166
169
  ElementHeader.StatusDotList = StatusDotList_default;
167
170
  ElementHeader.StatusDotList.displayName = "ElementHeader.StatusDotList";
168
- var ElementHeader_default = ElementHeader;
169
- export { renderElementHeader as i, ElementHeader_default as n, mapChildren as r, ElementHeaderRoot as t };
171
+ //#endregion
172
+ export { renderElementHeader as i, ElementHeaderRoot as n, mapChildren as r, ElementHeader as t };
170
173
 
171
174
  //# sourceMappingURL=ElementHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ElementHeader.js","names":["mapChildren: ChildrenMapper","avatarChild: React.ReactElement<AvatarProps> | undefined","badgeChildren: React.ReactElement<BadgeProps>[]","statusDotChildren: React.ReactElement<StatusDotProps>[]","statusDotMCChild: React.ReactElement<StatusDotListProps> | undefined","elementHeaderTextChildren: React.ReactElement<ElementHeaderTextProps>[]","stringChildren: string[]","remainingChildren: React.ReactNode[]","ElementHeaderRoot: ElementHeaderType"],"sources":["../src/components/ElementHeader/utils.tsx","../src/components/ElementHeader/ElementHeader.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { AvatarProps } from '../Avatar';\nimport type { BadgeProps } from '../Badge';\nimport type { StatusDotProps } from '../StatusDot';\n\nimport ElementHeader, { type ElementHeaderChildren, type ElementHeaderProps } from './ElementHeader';\nimport { ElementHeaderText, type ElementHeaderTextProps } from './ElementHeaderText';\nimport { StatusDotList, type StatusDotListProps } from './StatusDotList';\nimport { isComponent, isComponentWithChildren } from '../../utils/component';\nimport Avatar from '../Avatar';\nimport Badge from '../Badge';\nimport StatusDot from '../StatusDot';\n\ntype ChildrenMapper = (children: React.ReactNode, isJsxChild?: boolean) => ElementHeaderChildren | undefined;\n\nexport const mapChildren: ChildrenMapper = (children, isJsxChild = false) => {\n let avatarChild: React.ReactElement<AvatarProps> | undefined;\n const badgeChildren: React.ReactElement<BadgeProps>[] = [];\n const statusDotChildren: React.ReactElement<StatusDotProps>[] = [];\n let statusDotMCChild: React.ReactElement<StatusDotListProps> | undefined;\n const elementHeaderTextChildren: React.ReactElement<ElementHeaderTextProps>[] = [];\n const stringChildren: string[] = [];\n const remainingChildren: React.ReactNode[] = [];\n\n React.Children.forEach(children, child => {\n if (child === null || typeof child === 'undefined') return;\n if (isComponent<AvatarProps>(child, Avatar)) {\n avatarChild = child;\n } else if (isComponent<ElementHeaderTextProps>(child, ElementHeaderText)) {\n elementHeaderTextChildren.push(child);\n } else if (isComponent<BadgeProps>(child, Badge)) {\n badgeChildren.push(child);\n } else if (isComponent<StatusDotListProps>(child, StatusDotList)) {\n statusDotMCChild = child;\n } else if (isComponent<StatusDotProps>(child, StatusDot)) {\n statusDotChildren.push(child);\n } else if (typeof child === 'string') {\n stringChildren.push(child);\n } else {\n remainingChildren.push(child);\n }\n });\n\n // Dette og recursive mapChildren under(gjøres en gang) er for å passe på at jsx children også sjekkes for Avatar og liknende innhold.\n // Slik opprettholder vi stylingen i tilfeller hvor vertikaler har wrappet elementer i en parent span eller div.\n const hasSpecialChildren =\n avatarChild !== undefined ||\n elementHeaderTextChildren.length > 0 ||\n statusDotChildren.length > 0 ||\n statusDotMCChild !== undefined ||\n (badgeChildren !== undefined && stringChildren.length > 0);\n const noRemainingRecursiveChildren =\n remainingChildren.length === 0 ||\n (isComponentWithChildren(remainingChildren[0]) && typeof remainingChildren[0]?.props?.children === 'undefined');\n\n if (isJsxChild || hasSpecialChildren || noRemainingRecursiveChildren) {\n return {\n avatarChild,\n elementHeaderTextChildren: elementHeaderTextChildren,\n badgeChildren,\n statusDotChildren,\n statusDotMCChild,\n stringChildren,\n remainingChildren,\n };\n }\n\n if (isComponentWithChildren(remainingChildren[0])) {\n return mapChildren(remainingChildren[0]?.props?.children, true);\n }\n};\n\nexport const renderElementHeader = (\n element: React.ReactNode,\n options: Pick<\n ElementHeaderProps,\n 'titleHtmlMarkup' | 'isHovered' | 'size' | 'parentType' | 'chevronIcon' | 'icon' | 'highlightText' | 'closeButton'\n >\n): React.ReactElement | undefined => {\n const { titleHtmlMarkup, isHovered, size, parentType, chevronIcon, icon, highlightText, closeButton } = options;\n\n if (isComponent<ElementHeaderProps>(element, ElementHeader)) {\n return React.cloneElement(element, {\n chevronIcon,\n icon,\n isHovered,\n size,\n parentType,\n highlightText,\n closeButton,\n });\n }\n if (element) {\n return (\n <ElementHeader\n highlightText={highlightText}\n titleHtmlMarkup={titleHtmlMarkup}\n parentType={parentType}\n chevronIcon={chevronIcon}\n icon={icon}\n isHovered={isHovered}\n size={size}\n closeButton={closeButton}\n >\n {element}\n </ElementHeader>\n );\n }\n};\n","import React from 'react';\n\nimport cn from 'classnames';\n\nimport type { AvatarProps, AvatarType } from '../Avatar';\nimport type { BadgeProps, BadgeType } from '../Badge';\nimport type { IconProps, SvgIcon } from '../Icon';\nimport type { LazyIconProps } from '../LazyIcon';\nimport type { StatusDotProps, StatusDotType } from '../StatusDot';\nimport type { TitleTags } from '../Title';\nimport type { ElementHeaderTextProps, ElementHeaderTextType } from './ElementHeaderText/ElementHeaderText';\nimport type { StatusDotListProps, StatusDotListType } from './StatusDotList/StatusDotList';\n\nimport ElementHeaderText from './ElementHeaderText/ElementHeaderText';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { isComponent } from '../../utils/component';\nimport { AvatarSize } from '../Avatar';\nimport Icon, { IconSize } from '../Icon';\nimport StatusDotList from './StatusDotList';\nimport Highlighter from '../Highlighter';\nimport LazyIcon from '../LazyIcon';\nimport { mapChildren } from './utils';\n\nimport styles from './styles.module.scss';\n\nexport type ElementHeaderSize = 'compact' | 'small' | 'medium' | 'large';\nexport type ParentType = 'linklist' | 'expanderlist';\n\nexport interface ElementHeaderType extends React.FC<ElementHeaderProps> {\n Avatar?: AvatarType;\n Badge?: BadgeType;\n ElementHeaderText?: ElementHeaderTextType;\n StatusDot?: StatusDotType;\n StatusDotList?: StatusDotListType;\n}\n\nexport interface ElementHeaderProps {\n /** Adds custom classes to the ElementHeader element. */\n className?: string;\n /** Chevron to render inside of the ElementHeader */\n chevronIcon?: SvgIcon;\n /** Close button to be rendered inside of ElementHeader. This renders in place of chevronIcon */\n closeButton?: React.ReactElement;\n /** Children to be rendered inside of ElementHeader */\n children: React.ReactNode;\n /** Changes the underlying element of the title. Default: h2*/\n titleHtmlMarkup?: TitleTags;\n /** icon to be rendered inside of ElementHeader */\n icon?: React.ReactElement;\n /** whether or not the parent is hovered */\n isHovered?: boolean;\n /** Adjusts styling based on parent */\n parentType?: ParentType;\n /** Changes size of the ElementHeader. */\n size?: ElementHeaderSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Highlights text in title. Used for search results */\n highlightText?: string;\n}\n\nexport interface ElementHeaderChildren {\n avatarChild?: React.ReactElement<AvatarProps>;\n elementHeaderTextChildren: React.ReactElement<ElementHeaderTextProps>[];\n badgeChildren?: React.ReactElement<BadgeProps>[];\n statusDotChildren?: React.ReactElement<StatusDotProps>[];\n statusDotMCChild?: React.ReactElement<StatusDotListProps>;\n elementChild?: React.ReactElement;\n stringChildren: string[];\n remainingChildren: React.ReactNode[];\n}\n\nexport const ElementHeaderRoot: ElementHeaderType = props => {\n const {\n className = '',\n titleHtmlMarkup = 'h2',\n parentType = 'linklist',\n chevronIcon,\n closeButton,\n children,\n icon,\n isHovered,\n size,\n testId,\n highlightText,\n } = props;\n const breakpoint = useBreakpoint();\n const showIcon = size !== 'small' && !!icon;\n const contentIsString = typeof children === 'string';\n const mappedChildren = mapChildren(children);\n const hasStatusDots = !!mappedChildren?.statusDotChildren?.length || !!mappedChildren?.statusDotMCChild;\n\n const listLabelClasses = cn(styles['element-header'], { [styles['element-header--compact']]: size === 'compact' }, className);\n const badgeContainerClasses = cn(styles['element-header__badge-container']);\n const badgeClasses = cn(styles['element-header__badge']);\n const statusdotContainerClasses = cn(styles['element-header__statusdot-container']);\n const chevronClasses = cn(styles['element-header__chevron']);\n const contentClasses = cn(styles['element-header__content'], {\n [styles['element-header__content--element']]: !contentIsString,\n [styles['element-header__content--compact']]: size === 'compact',\n });\n const iconClasses = cn(styles['element-header__icon'], { [styles['element-header__icon--with-statusdot']]: hasStatusDots });\n const avatarClasses = cn(styles['element-header__avatar'], {});\n const CustomTag = titleHtmlMarkup;\n const iconPropIsIconComponent = isComponent<IconProps>(icon, Icon);\n const iconPropIsLazyIconComponent = !iconPropIsIconComponent && isComponent<LazyIconProps>(icon, LazyIcon);\n\n let iconComponent;\n if (iconPropIsIconComponent) {\n iconComponent = React.cloneElement(icon as React.ReactElement<IconProps>, {\n size: breakpoint < Breakpoint.md ? IconSize.XSmall : IconSize.Small,\n isHovered,\n });\n } else if (iconPropIsLazyIconComponent) {\n iconComponent = React.cloneElement(icon as React.ReactElement<LazyIconProps>, {\n size: breakpoint < Breakpoint.md ? IconSize.XSmall : IconSize.Small,\n isHovered,\n });\n } else {\n iconComponent = icon;\n }\n\n return (\n <span data-testid={testId} className={listLabelClasses}>\n {showIcon && icon && <span className={iconClasses}>{iconComponent}</span>}\n {size !== 'small' && mappedChildren?.avatarChild && (\n <span className={avatarClasses}>{React.cloneElement(mappedChildren.avatarChild, { size: AvatarSize.xsmall })}</span>\n )}\n\n <span className={contentClasses} data-hasstatusdots={hasStatusDots}>\n {mappedChildren?.elementHeaderTextChildren}\n {!!mappedChildren?.stringChildren.length && (\n <CustomTag className={styles['element-header__title']}>\n <Highlighter searchText={highlightText}>{mappedChildren.stringChildren}</Highlighter>\n </CustomTag>\n )}\n <Highlighter searchText={highlightText}>{mappedChildren?.remainingChildren}</Highlighter>\n </span>\n\n {hasStatusDots && (\n <span className={statusdotContainerClasses}>\n {!!mappedChildren?.statusDotChildren && <StatusDotList>{mappedChildren.statusDotChildren}</StatusDotList>}\n {!!mappedChildren?.statusDotMCChild && mappedChildren?.statusDotMCChild}\n </span>\n )}\n\n <span className={badgeContainerClasses}>\n {mappedChildren?.badgeChildren &&\n mappedChildren.badgeChildren.map((badgeChild, index) => {\n return (\n <span key={index} className={badgeClasses} data-parenttype={parentType}>\n {badgeChild}\n </span>\n );\n })}\n </span>\n {chevronIcon && typeof closeButton === 'undefined' && (\n <span className={chevronClasses} data-parenttype={parentType}>\n <Icon svgIcon={chevronIcon} isHovered={isHovered} size={IconSize.XSmall} />\n </span>\n )}\n {closeButton && (\n <span className={chevronClasses} data-parenttype={parentType}>\n {closeButton}\n </span>\n )}\n </span>\n );\n};\n\ntype ElementHeaderComponent = typeof ElementHeaderRoot & {\n Text: React.FC<ElementHeaderTextProps>;\n StatusDotList: React.FC<StatusDotListProps>;\n};\nElementHeaderRoot.displayName = 'ElementHeader';\nconst ElementHeader = ElementHeaderRoot as ElementHeaderComponent;\nElementHeader.Text = ElementHeaderText;\nElementHeader.Text.displayName = 'ElementHeader.Text';\nElementHeader.StatusDotList = StatusDotList;\nElementHeader.StatusDotList.displayName = 'ElementHeader.StatusDotList';\n\nexport default ElementHeader;\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,MAAaA,eAA+B,UAAU,aAAa,UAAU;CAC3E,IAAIC;CACJ,MAAMC,gBAAkD,EAAE;CAC1D,MAAMC,oBAA0D,EAAE;CAClE,IAAIC;CACJ,MAAMC,4BAA0E,EAAE;CAClF,MAAMC,iBAA2B,EAAE;CACnC,MAAMC,oBAAuC,EAAE;AAE/C,OAAM,SAAS,QAAQ,WAAU,UAAS;AACxC,MAAI,UAAU,QAAQ,OAAO,UAAU,YAAa;AACpD,MAAI,YAAyB,OAAO,eAAO,CACzC,eAAc;WACL,YAAoC,OAAO,kBAAkB,CACtE,2BAA0B,KAAK,MAAM;WAC5B,YAAwB,OAAO,cAAM,CAC9C,eAAc,KAAK,MAAM;WAChB,YAAgC,OAAO,cAAc,CAC9D,oBA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AAC,qBAAA;MAAY,YAAY;gBAAgB,gBAAgB;OAAgC;;KACpF;GAEN,iBACC,qBAAC,QAAA;IAAK,WAAW;eACd,CAAC,CAAC,gBAAgB,qBAAqB,oBAAC,uBAAA,EAAA,UAAe,eAAe,mBAAA,CAAkC,EACxG,CAAC,CAAC,gBAAgB,oBAAoB,gBAAgB,iBAAA;KAClD;GAGT,oBAAC,QAAA;IAAK,WAAW;cACd,gBAAgB,iBACf,eAAe,cAAc,KAAK,YAAY,UAAU;AACtD,YACE,oBAAC,QAAA;MAAiB,WAAW;MAAc,mBAAiB;gBACzD;QADQ,MAEJ;MAET;KACC;GACN,eAAe,OAAO,gBAAgB,eACrC,oBAAC,QAAA;IAAK,WAAW;IAAgB,mBAAiB;cAChD,oBAAC,cAAA;KAAK,SAAS;KAAwB;KAAW,MAAM,SAAS;MAAU;KACtE;GAER,eACC,oBAAC,QAAA;IAAK,WAAW;IAAgB,mBAAiB;cAC/C;KACI;;GAEJ;;AAQX,kBAAkB,cAAc;AAChC,IAAM,gBAAgB;AACtB,cAAc,OAAO;AACrB,cAAc,KAAK,cAAc;AACjC,cAAc,gBAAgB;AAC9B,cAAc,cAAc,cAAc;AAE1C,IAAA,wBAAe"}
1
+ {"version":3,"file":"ElementHeader.js","names":[],"sources":["../src/components/ElementHeader/utils.tsx","../src/components/ElementHeader/ElementHeader.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { AvatarProps } from '../Avatar';\nimport type { BadgeProps } from '../Badge';\nimport type { StatusDotProps } from '../StatusDot';\n\nimport ElementHeader, { type ElementHeaderChildren, type ElementHeaderProps } from './ElementHeader';\nimport { ElementHeaderText, type ElementHeaderTextProps } from './ElementHeaderText';\nimport { StatusDotList, type StatusDotListProps } from './StatusDotList';\nimport { isComponent, isComponentWithChildren } from '../../utils/component';\nimport Avatar from '../Avatar';\nimport Badge from '../Badge';\nimport StatusDot from '../StatusDot';\n\ntype ChildrenMapper = (children: React.ReactNode, isJsxChild?: boolean) => ElementHeaderChildren | undefined;\n\nexport const mapChildren: ChildrenMapper = (children, isJsxChild = false) => {\n let avatarChild: React.ReactElement<AvatarProps> | undefined;\n const badgeChildren: React.ReactElement<BadgeProps>[] = [];\n const statusDotChildren: React.ReactElement<StatusDotProps>[] = [];\n let statusDotMCChild: React.ReactElement<StatusDotListProps> | undefined;\n const elementHeaderTextChildren: React.ReactElement<ElementHeaderTextProps>[] = [];\n const stringChildren: string[] = [];\n const remainingChildren: React.ReactNode[] = [];\n\n React.Children.forEach(children, child => {\n if (child === null || typeof child === 'undefined') return;\n if (isComponent<AvatarProps>(child, Avatar)) {\n avatarChild = child;\n } else if (isComponent<ElementHeaderTextProps>(child, ElementHeaderText)) {\n elementHeaderTextChildren.push(child);\n } else if (isComponent<BadgeProps>(child, Badge)) {\n badgeChildren.push(child);\n } else if (isComponent<StatusDotListProps>(child, StatusDotList)) {\n statusDotMCChild = child;\n } else if (isComponent<StatusDotProps>(child, StatusDot)) {\n statusDotChildren.push(child);\n } else if (typeof child === 'string') {\n stringChildren.push(child);\n } else {\n remainingChildren.push(child);\n }\n });\n\n // Dette og recursive mapChildren under(gjøres en gang) er for å passe på at jsx children også sjekkes for Avatar og liknende innhold.\n // Slik opprettholder vi stylingen i tilfeller hvor vertikaler har wrappet elementer i en parent span eller div.\n const hasSpecialChildren =\n avatarChild !== undefined ||\n elementHeaderTextChildren.length > 0 ||\n statusDotChildren.length > 0 ||\n statusDotMCChild !== undefined ||\n (badgeChildren !== undefined && stringChildren.length > 0);\n const noRemainingRecursiveChildren =\n remainingChildren.length === 0 ||\n (isComponentWithChildren(remainingChildren[0]) && typeof remainingChildren[0]?.props?.children === 'undefined');\n\n if (isJsxChild || hasSpecialChildren || noRemainingRecursiveChildren) {\n return {\n avatarChild,\n elementHeaderTextChildren: elementHeaderTextChildren,\n badgeChildren,\n statusDotChildren,\n statusDotMCChild,\n stringChildren,\n remainingChildren,\n };\n }\n\n if (isComponentWithChildren(remainingChildren[0])) {\n return mapChildren(remainingChildren[0]?.props?.children, true);\n }\n};\n\nexport const renderElementHeader = (\n element: React.ReactNode,\n options: Pick<\n ElementHeaderProps,\n 'titleHtmlMarkup' | 'isHovered' | 'size' | 'parentType' | 'chevronIcon' | 'icon' | 'highlightText' | 'closeButton'\n >\n): React.ReactElement | undefined => {\n const { titleHtmlMarkup, isHovered, size, parentType, chevronIcon, icon, highlightText, closeButton } = options;\n\n if (isComponent<ElementHeaderProps>(element, ElementHeader)) {\n return React.cloneElement(element, {\n chevronIcon,\n icon,\n isHovered,\n size,\n parentType,\n highlightText,\n closeButton,\n });\n }\n if (element) {\n return (\n <ElementHeader\n highlightText={highlightText}\n titleHtmlMarkup={titleHtmlMarkup}\n parentType={parentType}\n chevronIcon={chevronIcon}\n icon={icon}\n isHovered={isHovered}\n size={size}\n closeButton={closeButton}\n >\n {element}\n </ElementHeader>\n );\n }\n};\n","import React from 'react';\n\nimport cn from 'classnames';\n\nimport type { AvatarProps, AvatarType } from '../Avatar';\nimport type { BadgeProps, BadgeType } from '../Badge';\nimport type { IconProps, SvgIcon } from '../Icon';\nimport type { LazyIconProps } from '../LazyIcon';\nimport type { StatusDotProps, StatusDotType } from '../StatusDot';\nimport type { TitleTags } from '../Title';\nimport type { ElementHeaderTextProps, ElementHeaderTextType } from './ElementHeaderText/ElementHeaderText';\nimport type { StatusDotListProps, StatusDotListType } from './StatusDotList/StatusDotList';\n\nimport ElementHeaderText from './ElementHeaderText/ElementHeaderText';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { isComponent } from '../../utils/component';\nimport { AvatarSize } from '../Avatar';\nimport Icon, { IconSize } from '../Icon';\nimport StatusDotList from './StatusDotList';\nimport Highlighter from '../Highlighter';\nimport LazyIcon from '../LazyIcon';\nimport { mapChildren } from './utils';\n\nimport styles from './styles.module.scss';\n\nexport type ElementHeaderSize = 'compact' | 'small' | 'medium' | 'large';\nexport type ParentType = 'linklist' | 'expanderlist';\n\nexport interface ElementHeaderType extends React.FC<ElementHeaderProps> {\n Avatar?: AvatarType;\n Badge?: BadgeType;\n ElementHeaderText?: ElementHeaderTextType;\n StatusDot?: StatusDotType;\n StatusDotList?: StatusDotListType;\n}\n\nexport interface ElementHeaderProps {\n /** Adds custom classes to the ElementHeader element. */\n className?: string;\n /** Chevron to render inside of the ElementHeader */\n chevronIcon?: SvgIcon;\n /** Close button to be rendered inside of ElementHeader. This renders in place of chevronIcon */\n closeButton?: React.ReactElement;\n /** Children to be rendered inside of ElementHeader */\n children: React.ReactNode;\n /** Changes the underlying element of the title. Default: h2*/\n titleHtmlMarkup?: TitleTags;\n /** icon to be rendered inside of ElementHeader */\n icon?: React.ReactElement;\n /** whether or not the parent is hovered */\n isHovered?: boolean;\n /** Adjusts styling based on parent */\n parentType?: ParentType;\n /** Changes size of the ElementHeader. */\n size?: ElementHeaderSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Highlights text in title. Used for search results */\n highlightText?: string;\n}\n\nexport interface ElementHeaderChildren {\n avatarChild?: React.ReactElement<AvatarProps>;\n elementHeaderTextChildren: React.ReactElement<ElementHeaderTextProps>[];\n badgeChildren?: React.ReactElement<BadgeProps>[];\n statusDotChildren?: React.ReactElement<StatusDotProps>[];\n statusDotMCChild?: React.ReactElement<StatusDotListProps>;\n elementChild?: React.ReactElement;\n stringChildren: string[];\n remainingChildren: React.ReactNode[];\n}\n\nexport const ElementHeaderRoot: ElementHeaderType = props => {\n const {\n className = '',\n titleHtmlMarkup = 'h2',\n parentType = 'linklist',\n chevronIcon,\n closeButton,\n children,\n icon,\n isHovered,\n size,\n testId,\n highlightText,\n } = props;\n const breakpoint = useBreakpoint();\n const showIcon = size !== 'small' && !!icon;\n const contentIsString = typeof children === 'string';\n const mappedChildren = mapChildren(children);\n const hasStatusDots = !!mappedChildren?.statusDotChildren?.length || !!mappedChildren?.statusDotMCChild;\n\n const listLabelClasses = cn(styles['element-header'], { [styles['element-header--compact']]: size === 'compact' }, className);\n const badgeContainerClasses = cn(styles['element-header__badge-container']);\n const badgeClasses = cn(styles['element-header__badge']);\n const statusdotContainerClasses = cn(styles['element-header__statusdot-container']);\n const chevronClasses = cn(styles['element-header__chevron']);\n const contentClasses = cn(styles['element-header__content'], {\n [styles['element-header__content--element']]: !contentIsString,\n [styles['element-header__content--compact']]: size === 'compact',\n });\n const iconClasses = cn(styles['element-header__icon'], { [styles['element-header__icon--with-statusdot']]: hasStatusDots });\n const avatarClasses = cn(styles['element-header__avatar'], {});\n const CustomTag = titleHtmlMarkup;\n const iconPropIsIconComponent = isComponent<IconProps>(icon, Icon);\n const iconPropIsLazyIconComponent = !iconPropIsIconComponent && isComponent<LazyIconProps>(icon, LazyIcon);\n\n let iconComponent;\n if (iconPropIsIconComponent) {\n iconComponent = React.cloneElement(icon as React.ReactElement<IconProps>, {\n size: breakpoint < Breakpoint.md ? IconSize.XSmall : IconSize.Small,\n isHovered,\n });\n } else if (iconPropIsLazyIconComponent) {\n iconComponent = React.cloneElement(icon as React.ReactElement<LazyIconProps>, {\n size: breakpoint < Breakpoint.md ? IconSize.XSmall : IconSize.Small,\n isHovered,\n });\n } else {\n iconComponent = icon;\n }\n\n return (\n <span data-testid={testId} className={listLabelClasses}>\n {showIcon && icon && <span className={iconClasses}>{iconComponent}</span>}\n {size !== 'small' && mappedChildren?.avatarChild && (\n <span className={avatarClasses}>{React.cloneElement(mappedChildren.avatarChild, { size: AvatarSize.xsmall })}</span>\n )}\n\n <span className={contentClasses} data-hasstatusdots={hasStatusDots}>\n {mappedChildren?.elementHeaderTextChildren}\n {!!mappedChildren?.stringChildren.length && (\n <CustomTag className={styles['element-header__title']}>\n <Highlighter searchText={highlightText}>{mappedChildren.stringChildren}</Highlighter>\n </CustomTag>\n )}\n <Highlighter searchText={highlightText}>{mappedChildren?.remainingChildren}</Highlighter>\n </span>\n\n {hasStatusDots && (\n <span className={statusdotContainerClasses}>\n {!!mappedChildren?.statusDotChildren && <StatusDotList>{mappedChildren.statusDotChildren}</StatusDotList>}\n {!!mappedChildren?.statusDotMCChild && mappedChildren?.statusDotMCChild}\n </span>\n )}\n\n <span className={badgeContainerClasses}>\n {mappedChildren?.badgeChildren &&\n mappedChildren.badgeChildren.map((badgeChild, index) => {\n return (\n <span key={index} className={badgeClasses} data-parenttype={parentType}>\n {badgeChild}\n </span>\n );\n })}\n </span>\n {chevronIcon && typeof closeButton === 'undefined' && (\n <span className={chevronClasses} data-parenttype={parentType}>\n <Icon svgIcon={chevronIcon} isHovered={isHovered} size={IconSize.XSmall} />\n </span>\n )}\n {closeButton && (\n <span className={chevronClasses} data-parenttype={parentType}>\n {closeButton}\n </span>\n )}\n </span>\n );\n};\n\ntype ElementHeaderComponent = typeof ElementHeaderRoot & {\n Text: React.FC<ElementHeaderTextProps>;\n StatusDotList: React.FC<StatusDotListProps>;\n};\nElementHeaderRoot.displayName = 'ElementHeader';\nconst ElementHeader = ElementHeaderRoot as ElementHeaderComponent;\nElementHeader.Text = ElementHeaderText;\nElementHeader.Text.displayName = 'ElementHeader.Text';\nElementHeader.StatusDotList = StatusDotList;\nElementHeader.StatusDotList.displayName = 'ElementHeader.StatusDotList';\n\nexport default ElementHeader;\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,IAAa,eAA+B,UAAU,aAAa,UAAU;CAC3E,IAAI;CACJ,MAAM,gBAAkD,EAAE;CAC1D,MAAM,oBAA0D,EAAE;CAClE,IAAI;CACJ,MAAM,4BAA0E,EAAE;CAClF,MAAM,iBAA2B,EAAE;CACnC,MAAM,oBAAuC,EAAE;CAE/C,MAAM,SAAS,QAAQ,WAAU,UAAS;EACxC,IAAI,UAAU,QAAQ,OAAO,UAAU,aAAa;EACpD,IAAI,YAAyB,OAAO,eAAO,EACzC,cAAc;OACT,IAAI,YAAoC,OAAO,kBAAkB,EACtE,0BAA0B,KAAK,MAAM;OAChC,IAAI,YAAwB,OAAO,cAAM,EAC9C,cAAc,KAAK,MAAM;OACpB,IAAI,YAAgC,OAAO,cAAc,EAC9D,mBAAmB;OACd,IAAI,YAA4B,OAA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