@helsenorge/designsystem-react 14.7.2 → 15.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1330) 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 +33 -10
  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 +8 -4
  120. package/lib/TableBody.js.map +1 -1
  121. package/lib/TableCell.js +8 -4
  122. package/lib/TableCell.js.map +1 -1
  123. package/lib/TableExpandedRow.js +10 -6
  124. package/lib/TableExpandedRow.js.map +1 -1
  125. package/lib/TableExpanderCell.js +12 -10
  126. package/lib/TableExpanderCell.js.map +1 -1
  127. package/lib/TableHead.js +8 -4
  128. package/lib/TableHead.js.map +1 -1
  129. package/lib/TableHeadCell.js +12 -8
  130. package/lib/TableHeadCell.js.map +1 -1
  131. package/lib/TableRow.js +14 -9
  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 +11 -7
  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 +475 -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/global.d.ts +1 -0
  1031. package/lib/hoc/withBreakpoint/index.js +4 -2
  1032. package/lib/hoc/withBreakpoint/index.js.map +1 -1
  1033. package/lib/hoc/withBreakpoint/withBreakpoint.js +17 -2
  1034. package/lib/hoc/withBreakpoint/withBreakpoint.js.map +1 -0
  1035. package/lib/hooks/useBreakpoint.js +42 -1
  1036. package/lib/hooks/useBreakpoint.js.map +1 -0
  1037. package/lib/hooks/useElementList.js +46 -1
  1038. package/lib/hooks/useElementList.js.map +1 -0
  1039. package/lib/hooks/useEventListenerState.js +3 -1
  1040. package/lib/hooks/useEventListenerState.js.map +1 -1
  1041. package/lib/hooks/useExpand.js +19 -1
  1042. package/lib/hooks/useExpand.js.map +1 -0
  1043. package/lib/hooks/useFocusToggle.js +34 -1
  1044. package/lib/hooks/useFocusToggle.js.map +1 -0
  1045. package/lib/hooks/useFocusTrap.js +40 -2
  1046. package/lib/hooks/useFocusTrap.js.map +1 -0
  1047. package/lib/hooks/useFocusableElements.js +33 -1
  1048. package/lib/hooks/useFocusableElements.js.map +1 -0
  1049. package/lib/hooks/useIcons.js +27 -1
  1050. package/lib/hooks/useIcons.js.map +1 -0
  1051. package/lib/hooks/useIdWithFallback.js +14 -1
  1052. package/lib/hooks/useIdWithFallback.js.map +1 -0
  1053. package/lib/hooks/useIntersectionObserver.js +23 -1
  1054. package/lib/hooks/useIntersectionObserver.js.map +1 -0
  1055. package/lib/hooks/useInterval.js +10 -1
  1056. package/lib/hooks/useInterval.js.map +1 -1
  1057. package/lib/hooks/useIsMobileBreakpoint.js +9 -1
  1058. package/lib/hooks/useIsMobileBreakpoint.js.map +1 -0
  1059. package/lib/hooks/useIsServerSide.js +16 -1
  1060. package/lib/hooks/useIsServerSide.js.map +1 -0
  1061. package/lib/hooks/useIsVisible.js +26 -1
  1062. package/lib/hooks/useIsVisible.js.map +1 -0
  1063. package/lib/hooks/useKeyboardEvent.js +30 -1
  1064. package/lib/hooks/useKeyboardEvent.js.map +1 -0
  1065. package/lib/hooks/useLanguage.js +16 -1
  1066. package/lib/hooks/useLanguage.js.map +1 -0
  1067. package/lib/hooks/useLayoutEvent.js +29 -1
  1068. package/lib/hooks/useLayoutEvent.js.map +1 -0
  1069. package/lib/hooks/useOutsideEvent.js +27 -1
  1070. package/lib/hooks/useOutsideEvent.js.map +1 -0
  1071. package/lib/hooks/usePrevious.js +17 -1
  1072. package/lib/hooks/usePrevious.js.map +1 -0
  1073. package/lib/hooks/usePseudoClasses.js +52 -1
  1074. package/lib/hooks/usePseudoClasses.js.map +1 -0
  1075. package/lib/hooks/useResizeObserver.js +30 -1
  1076. package/lib/hooks/useResizeObserver.js.map +1 -0
  1077. package/lib/hooks/useReturnFocusOnUnmount.js +21 -1
  1078. package/lib/hooks/useReturnFocusOnUnmount.js.map +1 -0
  1079. package/lib/hooks/useRovingFocus.js +45 -1
  1080. package/lib/hooks/useRovingFocus.js.map +1 -0
  1081. package/lib/hooks/useSize.js +31 -1
  1082. package/lib/hooks/useSize.js.map +1 -0
  1083. package/lib/hooks/useToggle.js +32 -1
  1084. package/lib/hooks/useToggle.js.map +1 -0
  1085. package/lib/hooks/usestopPropagation.js +17 -1
  1086. package/lib/hooks/usestopPropagation.js.map +1 -0
  1087. package/lib/index.js +18 -18
  1088. package/lib/resourceHelper.js +5 -2
  1089. package/lib/resourceHelper.js.map +1 -1
  1090. package/lib/theme/currys/color.js +11 -1
  1091. package/lib/theme/currys/color.js.map +1 -0
  1092. package/lib/theme/currys/index.js +2 -2
  1093. package/lib/theme/currys/spacing.js +26 -1
  1094. package/lib/theme/currys/spacing.js.map +1 -0
  1095. package/lib/theme/grid.js +25 -1
  1096. package/lib/theme/grid.js.map +1 -0
  1097. package/lib/theme/index.js +14 -1
  1098. package/lib/theme/index.js.map +1 -0
  1099. package/lib/theme/palette.js +86 -1
  1100. package/lib/theme/palette.js.map +1 -0
  1101. package/lib/theme/spacers.js +21 -1
  1102. package/lib/theme/spacers.js.map +1 -0
  1103. package/lib/utils/accessibility.js +24 -1
  1104. package/lib/utils/accessibility.js.map +1 -0
  1105. package/lib/utils/component.js +11 -1
  1106. package/lib/utils/component.js.map +1 -0
  1107. package/lib/utils/debounce.js +22 -1
  1108. package/lib/utils/debounce.js.map +1 -0
  1109. package/lib/utils/deepContains.js +22 -1
  1110. package/lib/utils/deepContains.js.map +1 -0
  1111. package/lib/utils/device.js +7 -1
  1112. package/lib/utils/device.js.map +1 -0
  1113. package/lib/utils/environment.js +6 -1
  1114. package/lib/utils/environment.js.map +1 -0
  1115. package/lib/utils/focus.js +17 -1
  1116. package/lib/utils/focus.js.map +1 -0
  1117. package/lib/utils/language.js +4 -3
  1118. package/lib/utils/language.js.map +1 -1
  1119. package/lib/utils/loremtext.js +6 -5
  1120. package/lib/utils/loremtext.js.map +1 -1
  1121. package/lib/utils/mobile.js +18 -1
  1122. package/lib/utils/mobile.js.map +1 -0
  1123. package/lib/utils/refs.js +26 -1
  1124. package/lib/utils/refs.js.map +1 -0
  1125. package/lib/utils/resource.js +10 -1
  1126. package/lib/utils/resource.js.map +1 -0
  1127. package/lib/utils/scroll.js +10 -1
  1128. package/lib/utils/scroll.js.map +1 -0
  1129. package/lib/utils/uuid.js +2 -2
  1130. package/lib/utils/viewport.js +8 -1
  1131. package/lib/utils/viewport.js.map +1 -0
  1132. package/lib/utils.js +4 -2
  1133. package/lib/utils.js.map +1 -1
  1134. package/lib/utils2.js +18 -13
  1135. package/lib/utils2.js.map +1 -1
  1136. package/lib/utils3.js +12 -9
  1137. package/lib/utils3.js.map +1 -1
  1138. package/lib/utils4.js +7 -5
  1139. package/lib/utils4.js.map +1 -1
  1140. package/lib/utils5.js +26 -22
  1141. package/lib/utils5.js.map +1 -1
  1142. package/lib/utils6.js +63 -8
  1143. package/lib/utils6.js.map +1 -1
  1144. package/lib/uuid.js +12 -9
  1145. package/lib/uuid.js.map +1 -1
  1146. package/package.json +26 -38
  1147. package/lib/AlertSignFill.js +0 -16
  1148. package/lib/AlertSignFill.js.map +0 -1
  1149. package/lib/AlertSignStroke.js +0 -16
  1150. package/lib/AlertSignStroke.js.map +0 -1
  1151. package/lib/ArrowDown.js +0 -28
  1152. package/lib/ArrowDown.js.map +0 -1
  1153. package/lib/ArrowRight.js +0 -16
  1154. package/lib/ArrowRight.js.map +0 -1
  1155. package/lib/ArrowUp.js +0 -28
  1156. package/lib/ArrowUp.js.map +0 -1
  1157. package/lib/ArrowUpRight.js +0 -16
  1158. package/lib/ArrowUpRight.js.map +0 -1
  1159. package/lib/BabyMobileMedium.js +0 -263
  1160. package/lib/BabyMobileMedium.js.map +0 -1
  1161. package/lib/Check.js +0 -16
  1162. package/lib/Check.js.map +0 -1
  1163. package/lib/CheckFill.js +0 -28
  1164. package/lib/CheckFill.js.map +0 -1
  1165. package/lib/CheckOutline.js +0 -14
  1166. package/lib/CheckOutline.js.map +0 -1
  1167. package/lib/Checkbox2.js +0 -5
  1168. package/lib/Checkbox2.js.map +0 -1
  1169. package/lib/ChevronDown.js +0 -16
  1170. package/lib/ChevronDown.js.map +0 -1
  1171. package/lib/ChevronLeft.js +0 -16
  1172. package/lib/ChevronLeft.js.map +0 -1
  1173. package/lib/ChevronRight.js +0 -16
  1174. package/lib/ChevronRight.js.map +0 -1
  1175. package/lib/ChevronUp.js +0 -16
  1176. package/lib/ChevronUp.js.map +0 -1
  1177. package/lib/ChildMedium.js +0 -126
  1178. package/lib/ChildMedium.js.map +0 -1
  1179. package/lib/DoctorMedium.js +0 -54
  1180. package/lib/DoctorMedium.js.map +0 -1
  1181. package/lib/DoctorSmall.js +0 -52
  1182. package/lib/DoctorSmall.js.map +0 -1
  1183. package/lib/DrawerNavigation2.js +0 -5
  1184. package/lib/DrawerNavigation2.js.map +0 -1
  1185. package/lib/EmptyBox.js +0 -16
  1186. package/lib/EmptyBox.js.map +0 -1
  1187. package/lib/ErrorSignFill.js +0 -16
  1188. package/lib/ErrorSignFill.js.map +0 -1
  1189. package/lib/FacialRecognitionFingerprintMedium.js +0 -199
  1190. package/lib/FacialRecognitionFingerprintMedium.js.map +0 -1
  1191. package/lib/Filter.js +0 -44
  1192. package/lib/Filter.js.map +0 -1
  1193. package/lib/FilterLinkList2.js +0 -5
  1194. package/lib/FilterLinkList2.js.map +0 -1
  1195. package/lib/FilterSearch2.js +0 -5
  1196. package/lib/FilterSearch2.js.map +0 -1
  1197. package/lib/Forward.js +0 -16
  1198. package/lib/Forward.js.map +0 -1
  1199. package/lib/GiveBabyFoodMedium.js +0 -240
  1200. package/lib/GiveBabyFoodMedium.js.map +0 -1
  1201. package/lib/HandWaving.js +0 -8
  1202. package/lib/HandWaving.js.map +0 -1
  1203. package/lib/HealthcarePersonnelMedium.js +0 -148
  1204. package/lib/HealthcarePersonnelMedium.js.map +0 -1
  1205. package/lib/HealthcarePersonnelSmall.js +0 -149
  1206. package/lib/HealthcarePersonnelSmall.js.map +0 -1
  1207. package/lib/IllustrationNames.js +0 -35
  1208. package/lib/IllustrationNames.js.map +0 -1
  1209. package/lib/InfoSignFill.js +0 -16
  1210. package/lib/InfoSignFill.js.map +0 -1
  1211. package/lib/Input2.js +0 -5
  1212. package/lib/Input2.js.map +0 -1
  1213. package/lib/Label.js +0 -5
  1214. package/lib/Label.js.map +0 -1
  1215. package/lib/PlusSmall.js +0 -16
  1216. package/lib/PlusSmall.js.map +0 -1
  1217. package/lib/Portal.js +0 -26
  1218. package/lib/Portal.js.map +0 -1
  1219. package/lib/RadioButton.js +0 -5
  1220. package/lib/ReadLettersMedium.js +0 -78
  1221. package/lib/ReadLettersMedium.js.map +0 -1
  1222. package/lib/Search.js +0 -26
  1223. package/lib/Search.js.map +0 -1
  1224. package/lib/StorkMedium.js +0 -96
  1225. package/lib/StorkMedium.js.map +0 -1
  1226. package/lib/StrollerMedium.js +0 -219
  1227. package/lib/StrollerMedium.js.map +0 -1
  1228. package/lib/Support2Medium.js +0 -158
  1229. package/lib/Support2Medium.js.map +0 -1
  1230. package/lib/ThinkingMedium.js +0 -98
  1231. package/lib/ThinkingMedium.js.map +0 -1
  1232. package/lib/Title2.js +0 -5
  1233. package/lib/Title2.js.map +0 -1
  1234. package/lib/TriangleX.js +0 -32
  1235. package/lib/TriangleX.js.map +0 -1
  1236. package/lib/VerticalDots.js +0 -16
  1237. package/lib/VerticalDots.js.map +0 -1
  1238. package/lib/X.js +0 -18
  1239. package/lib/X.js.map +0 -1
  1240. package/lib/_rolldown_dynamic_import_helper.js.map +0 -1
  1241. package/lib/accessibility.js +0 -17
  1242. package/lib/accessibility.js.map +0 -1
  1243. package/lib/color.js +0 -10
  1244. package/lib/color.js.map +0 -1
  1245. package/lib/component.js +0 -10
  1246. package/lib/component.js.map +0 -1
  1247. package/lib/constants3.js +0 -46
  1248. package/lib/constants3.js.map +0 -1
  1249. package/lib/currys.js +0 -0
  1250. package/lib/debounce.js +0 -16
  1251. package/lib/debounce.js.map +0 -1
  1252. package/lib/deepContains.js +0 -13
  1253. package/lib/deepContains.js.map +0 -1
  1254. package/lib/device.js +0 -6
  1255. package/lib/device.js.map +0 -1
  1256. package/lib/environment.js +0 -5
  1257. package/lib/environment.js.map +0 -1
  1258. package/lib/focus.js +0 -11
  1259. package/lib/focus.js.map +0 -1
  1260. package/lib/grid.js +0 -24
  1261. package/lib/grid.js.map +0 -1
  1262. package/lib/mobile.js +0 -14
  1263. package/lib/mobile.js.map +0 -1
  1264. package/lib/palette.js +0 -85
  1265. package/lib/palette.js.map +0 -1
  1266. package/lib/refs.js +0 -14
  1267. package/lib/refs.js.map +0 -1
  1268. package/lib/resource.js +0 -4
  1269. package/lib/resource.js.map +0 -1
  1270. package/lib/scroll.js +0 -9
  1271. package/lib/scroll.js.map +0 -1
  1272. package/lib/spacers.js +0 -20
  1273. package/lib/spacers.js.map +0 -1
  1274. package/lib/spacing.js +0 -25
  1275. package/lib/spacing.js.map +0 -1
  1276. package/lib/src.js +0 -0
  1277. package/lib/theme.js +0 -13
  1278. package/lib/theme.js.map +0 -1
  1279. package/lib/useBreakpoint.js +0 -38
  1280. package/lib/useBreakpoint.js.map +0 -1
  1281. package/lib/useElementList.js +0 -38
  1282. package/lib/useElementList.js.map +0 -1
  1283. package/lib/useExpand.js +0 -18
  1284. package/lib/useExpand.js.map +0 -1
  1285. package/lib/useFocusToggle.js +0 -26
  1286. package/lib/useFocusToggle.js.map +0 -1
  1287. package/lib/useFocusTrap.js +0 -34
  1288. package/lib/useFocusTrap.js.map +0 -1
  1289. package/lib/useFocusableElements.js +0 -26
  1290. package/lib/useFocusableElements.js.map +0 -1
  1291. package/lib/useIcons.js +0 -26
  1292. package/lib/useIcons.js.map +0 -1
  1293. package/lib/useIdWithFallback.js +0 -8
  1294. package/lib/useIdWithFallback.js.map +0 -1
  1295. package/lib/useIntersectionObserver.js +0 -14
  1296. package/lib/useIntersectionObserver.js.map +0 -1
  1297. package/lib/useIsMobileBreakpoint.js +0 -8
  1298. package/lib/useIsMobileBreakpoint.js.map +0 -1
  1299. package/lib/useIsServerSide.js +0 -10
  1300. package/lib/useIsServerSide.js.map +0 -1
  1301. package/lib/useIsVisible.js +0 -16
  1302. package/lib/useIsVisible.js.map +0 -1
  1303. package/lib/useKeyboardEvent.js +0 -22
  1304. package/lib/useKeyboardEvent.js.map +0 -1
  1305. package/lib/useLanguage.js +0 -10
  1306. package/lib/useLanguage.js.map +0 -1
  1307. package/lib/useLayoutEvent.js +0 -21
  1308. package/lib/useLayoutEvent.js.map +0 -1
  1309. package/lib/useOutsideEvent.js +0 -20
  1310. package/lib/useOutsideEvent.js.map +0 -1
  1311. package/lib/usePrevious.js +0 -11
  1312. package/lib/usePrevious.js.map +0 -1
  1313. package/lib/usePseudoClasses.js +0 -46
  1314. package/lib/usePseudoClasses.js.map +0 -1
  1315. package/lib/useResizeObserver.js +0 -23
  1316. package/lib/useResizeObserver.js.map +0 -1
  1317. package/lib/useReturnFocusOnUnmount.js +0 -16
  1318. package/lib/useReturnFocusOnUnmount.js.map +0 -1
  1319. package/lib/useRovingFocus.js +0 -44
  1320. package/lib/useRovingFocus.js.map +0 -1
  1321. package/lib/useSize.js +0 -23
  1322. package/lib/useSize.js.map +0 -1
  1323. package/lib/useToggle.js +0 -24
  1324. package/lib/useToggle.js.map +0 -1
  1325. package/lib/usestopPropagation.js +0 -11
  1326. package/lib/usestopPropagation.js.map +0 -1
  1327. package/lib/viewport.js +0 -7
  1328. package/lib/viewport.js.map +0 -1
  1329. package/lib/withBreakpoint.js +0 -16
  1330. package/lib/withBreakpoint.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FilterDrawer.js","names":[],"sources":["../src/components/Filter/FilterDrawer/FilterDrawer.tsx","../src/components/Filter/FilterDrawer/index.ts"],"sourcesContent":["import { Children, isValidElement } from 'react';\n\nimport type { HNDesignsystemFilter } from '../../../resources/Resources';\nimport type { UseFilterDrawerReturn } from '../useFilterDrawer';\n\nimport { LanguageLocales } from '../../../constants';\nimport { useLanguage } from '../../../hooks/useLanguage';\nimport { formatResource } from '../../../utils/resource';\nimport Button from '../../Button';\nimport DrawerNavigation, { type DrawerViewProps } from '../DrawerNavigation/DrawerNavigation';\nimport { getResources } from '../resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport interface FilterDrawerProps<ViewId extends string = string> {\n /** The drawer state from useFilterDrawer */\n drawer: UseFilterDrawerReturn<ViewId>;\n /** Additional callback when the drawer closes (drawer.close() is always called automatically) */\n onClose?: () => void;\n /** Fully custom footer — overrides the default footer built from onReset/resultText */\n footer?: React.ReactNode;\n /** If provided, shows a \"Nullstill filter\" button in the default footer */\n onReset?: () => void;\n /** If provided, shows a result count button (e.g. \"Vis 5 treff\") that closes the drawer */\n resultCount?: number;\n /** Resources for the component */\n resources?: Partial<HNDesignsystemFilter>;\n /** DrawerNavigation.View children defining the overview and filter views */\n children: React.ReactNode;\n}\n\nexport interface FilterDrawerViewProps extends DrawerViewProps {\n /** Hide reset button for view */\n noResetButton?: boolean;\n /** View specific close handler */\n onClose?: () => void;\n /** View specific reset handler */\n onReset?: () => void;\n}\n\n/**\n * Never rendered directly — FilterDrawer reads its props and creates a DrawerNavigation.View\n * with id=\"overview\" and home=true.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction FilterDrawerOverview(_props: Omit<DrawerViewProps, 'id' | 'home'>): React.ReactNode {\n return null;\n}\n\n/**\n * Never rendered directly — FilterDrawer reads its props and creates a FilterDrawerView\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction FilterDrawerView(_props: FilterDrawerViewProps): React.ReactNode {\n // DrawerView is never rendered directly — DrawerNavigation reads its props\n return null;\n}\n\nfunction FilterDrawer<ViewId extends string>({\n drawer,\n onClose,\n footer,\n onReset,\n resultCount,\n resources,\n children,\n}: FilterDrawerProps<ViewId>): React.ReactNode {\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n const mergedResources = {\n ...defaultResources,\n ...resources,\n };\n\n const handleClose = (): void => {\n if (onClose) {\n onClose();\n } else {\n drawer.close();\n }\n };\n\n const showResultButtonText =\n resultCount !== undefined ? formatResource(mergedResources.showButtonText, resultCount) : mergedResources.showButtonText;\n\n const defaultResetButton = onReset && (\n <Button onClick={onReset} variant=\"borderless\">\n {mergedResources.resetButtonText}\n </Button>\n );\n const defaultShowResultsButton = showResultButtonText && <Button onClick={handleClose}>{showResultButtonText}</Button>;\n\n const defaultFooter =\n onReset || showResultButtonText ? (\n <div className={styles['filter-drawer__footer']}>\n {defaultResetButton}\n {defaultShowResultsButton}\n </div>\n ) : undefined;\n\n const fallbackFooter = footer ?? defaultFooter;\n\n const generateViewFooter = (viewOnReset?: () => void, viewOnClose?: () => void, noResetButton?: boolean): React.ReactNode => {\n if (!viewOnReset && !viewOnClose && !noResetButton) {\n return undefined;\n }\n\n return (\n <div className={styles['filter-drawer__footer']}>\n {!noResetButton &&\n (viewOnReset ? (\n <Button onClick={viewOnReset} variant=\"borderless\">\n {mergedResources.resetButtonText}\n </Button>\n ) : (\n defaultResetButton\n ))}\n {viewOnClose ? (\n <Button onClick={viewOnClose}>{showResultButtonText ?? mergedResources.showButtonText}</Button>\n ) : (\n defaultShowResultsButton\n )}\n </div>\n );\n };\n\n const processedChildren = Children.map(children, child => {\n if (isValidElement<Omit<FilterDrawerViewProps, 'id' | 'home'>>(child) && child.type === FilterDrawerOverview) {\n const viewDefaultFooter = generateViewFooter(child.props.onReset, child.props.onClose, child.props.noResetButton);\n const viewFooter = viewDefaultFooter ?? child.props.footer ?? fallbackFooter;\n return (\n <DrawerNavigation.View\n id=\"overview\"\n home\n title={child.props.title}\n children={child.props.children}\n drawerContentClassname={styles['filter-drawer__view']}\n footer={viewFooter}\n />\n );\n }\n if (isValidElement<FilterDrawerViewProps>(child)) {\n const viewDefaultFooter = generateViewFooter(child.props.onReset, child.props.onClose, child.props.noResetButton);\n const viewFooter = viewDefaultFooter ?? child.props.footer ?? fallbackFooter;\n return (\n <DrawerNavigation.View\n id={child.props.id}\n title={child.props.title}\n children={child.props.children}\n drawerContentClassname={styles['filter-drawer__view']}\n footer={viewFooter}\n />\n );\n } else {\n return child;\n }\n });\n\n return (\n <DrawerNavigation isOpen={drawer.isOpen} initialView={drawer.initialView} onCloseButton={handleClose} footer={footer ?? defaultFooter}>\n {processedChildren}\n </DrawerNavigation>\n );\n}\n\nFilterDrawer.Overview = FilterDrawerOverview;\nFilterDrawer.View = FilterDrawerView;\n\nexport default FilterDrawer;\n","import FilterDrawer from './FilterDrawer';\nexport * from './FilterDrawer';\nexport default FilterDrawer;\n"],"mappings":";;;;;;;;;AA6CA,SAAS,qBAAqB,QAA+D;AAC3F,QAAO;;AAOT,SAAS,iBAAiB,QAAgD;AAExE,QAAO;;AAGT,SAAS,aAAoC,EAC3C,QACA,SACA,QACA,SACA,aACA,WACA,YAC6C;CAC7C,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAE5E,MAAM,kBAAkB;EACtB,GAFuB,aAAa,SAAS;EAG7C,GAAG;EACJ;CAED,MAAM,oBAA0B;AAC9B,MAAI,QACF,UAAS;MAET,QAAO,OAAO;;CAIlB,MAAM,uBACJ,gBAAgB,KAAA,IAAY,eAAe,gBAAgB,gBAAgB,YAAY,GAAG,gBAAgB;CAE5G,MAAM,qBAAqB,WACzB,oBAAC,gBAAA;EAAO,SAAS;EAAS,SAAQ;YAC/B,gBAAgB;GACV;CAEX,MAAM,2BAA2B,wBAAwB,oBAAC,gBAAA;EAAO,SAAS;YAAc;GAA8B;CAEtH,MAAM,gBACJ,WAAW,uBACT,qBAAC,OAAA;EAAI,WAAW,OAAO;aACpB,oBACA,yBAAA;GACG,GACJ,KAAA;CAEN,MAAM,iBAAiB,UAAU;CAEjC,MAAM,sBAAsB,aAA0B,aAA0B,kBAA6C;AAC3H,MAAI,CAAC,eAAe,CAAC,eAAe,CAAC,cACnC;AAGF,SACE,qBAAC,OAAA;GAAI,WAAW,OAAO;cACpB,CAAC,kBACC,cACC,oBAAC,gBAAA;IAAO,SAAS;IAAa,SAAQ;cACnC,gBAAgB;KACV,GAET,qBAEH,cACC,oBAAC,gBAAA;IAAO,SAAS;cAAc,wBAAwB,gBAAgB;KAAwB,GAE/F,yBAAA;IAEE;;CAIV,MAAM,oBAAoB,SAAS,IAAI,WAAU,UAAS;AACxD,MAAI,eAA2D,MAAM,IAAI,MAAM,SAAS,sBAAsB;GAE5G,MAAM,aADoB,mBAAmB,MAAM,MAAM,SAAS,MAAM,MAAM,SAAS,MAAM,MAAM,cAAc,IACzE,MAAM,MAAM,UAAU;AAC9D,UACE,oBAAC,yBAAiB,MAAA;IAChB,IAAG;IACH,MAAA;IACA,OAAO,MAAM,MAAM;IACnB,UAAU,MAAM,MAAM;IACtB,wBAAwB,OAAO;IAC/B,QAAQ;KACR;;AAGN,MAAI,eAAsC,MAAM,EAAE;GAEhD,MAAM,aADoB,mBAAmB,MAAM,MAAM,SAAS,MAAM,MAAM,SAAS,MAAM,MAAM,cAAc,IACzE,MAAM,MAAM,UAAU;AAC9D,UACE,oBAAC,yBAAiB,MAAA;IAChB,IAAI,MAAM,MAAM;IAChB,OAAO,MAAM,MAAM;IACnB,UAAU,MAAM,MAAM;IACtB,wBAAwB,OAAO;IAC/B,QAAQ;KACR;QAGJ,QAAO;GAET;AAEF,QACE,oBAAC,0BAAA;EAAiB,QAAQ,OAAO;EAAQ,aAAa,OAAO;EAAa,eAAe;EAAa,QAAQ,UAAU;YACrH;GACgB;;AAIvB,aAAa,WAAW;AACxB,aAAa,OAAO;ACpKpB,IAAA,yBDsKe"}
1
+ {"version":3,"file":"FilterDrawer.js","names":[],"sources":["../src/components/Filter/FilterDrawer/FilterDrawer.tsx","../src/components/Filter/FilterDrawer/index.ts"],"sourcesContent":["import { Children, isValidElement } from 'react';\n\nimport type { HNDesignsystemFilter } from '../../../resources/Resources';\nimport type { UseFilterDrawerReturn } from '../useFilterDrawer';\n\nimport { LanguageLocales } from '../../../constants';\nimport { useLanguage } from '../../../hooks/useLanguage';\nimport { formatResource } from '../../../utils/resource';\nimport Button from '../../Button';\nimport DrawerNavigation, { type DrawerViewProps } from '../DrawerNavigation/DrawerNavigation';\nimport { getResources } from '../resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport interface FilterDrawerProps<ViewId extends string = string> {\n /** The drawer state from useFilterDrawer */\n drawer: UseFilterDrawerReturn<ViewId>;\n /** Additional callback when the drawer closes (drawer.close() is always called automatically) */\n onClose?: () => void;\n /** Fully custom footer — overrides the default footer built from onReset/resultText */\n footer?: React.ReactNode;\n /** If provided, shows a \"Nullstill filter\" button in the default footer */\n onReset?: () => void;\n /** If provided, shows a result count button (e.g. \"Vis 5 treff\") that closes the drawer */\n resultCount?: number;\n /** Resources for the component */\n resources?: Partial<HNDesignsystemFilter>;\n /** DrawerNavigation.View children defining the overview and filter views */\n children: React.ReactNode;\n}\n\nexport interface FilterDrawerViewProps extends DrawerViewProps {\n /** Hide reset button for view */\n noResetButton?: boolean;\n /** View specific close handler */\n onClose?: () => void;\n /** View specific reset handler */\n onReset?: () => void;\n}\n\n/**\n * Never rendered directly — FilterDrawer reads its props and creates a DrawerNavigation.View\n * with id=\"overview\" and home=true.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction FilterDrawerOverview(_props: Omit<DrawerViewProps, 'id' | 'home'>): React.ReactNode {\n return null;\n}\n\n/**\n * Never rendered directly — FilterDrawer reads its props and creates a FilterDrawerView\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction FilterDrawerView(_props: FilterDrawerViewProps): React.ReactNode {\n // DrawerView is never rendered directly — DrawerNavigation reads its props\n return null;\n}\n\nfunction FilterDrawer<ViewId extends string>({\n drawer,\n onClose,\n footer,\n onReset,\n resultCount,\n resources,\n children,\n}: FilterDrawerProps<ViewId>): React.ReactNode {\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n const mergedResources = {\n ...defaultResources,\n ...resources,\n };\n\n const handleClose = (): void => {\n if (onClose) {\n onClose();\n } else {\n drawer.close();\n }\n };\n\n const showResultButtonText =\n resultCount !== undefined ? formatResource(mergedResources.showButtonText, resultCount) : mergedResources.showButtonText;\n\n const defaultResetButton = onReset && (\n <Button onClick={onReset} variant=\"borderless\">\n {mergedResources.resetButtonText}\n </Button>\n );\n const defaultShowResultsButton = showResultButtonText && <Button onClick={handleClose}>{showResultButtonText}</Button>;\n\n const defaultFooter =\n onReset || showResultButtonText ? (\n <div className={styles['filter-drawer__footer']}>\n {defaultResetButton}\n {defaultShowResultsButton}\n </div>\n ) : undefined;\n\n const fallbackFooter = footer ?? defaultFooter;\n\n const generateViewFooter = (viewOnReset?: () => void, viewOnClose?: () => void, noResetButton?: boolean): React.ReactNode => {\n if (!viewOnReset && !viewOnClose && !noResetButton) {\n return undefined;\n }\n\n return (\n <div className={styles['filter-drawer__footer']}>\n {!noResetButton &&\n (viewOnReset ? (\n <Button onClick={viewOnReset} variant=\"borderless\">\n {mergedResources.resetButtonText}\n </Button>\n ) : (\n defaultResetButton\n ))}\n {viewOnClose ? (\n <Button onClick={viewOnClose}>{showResultButtonText ?? mergedResources.showButtonText}</Button>\n ) : (\n defaultShowResultsButton\n )}\n </div>\n );\n };\n\n const processedChildren = Children.map(children, child => {\n if (isValidElement<Omit<FilterDrawerViewProps, 'id' | 'home'>>(child) && child.type === FilterDrawerOverview) {\n const viewDefaultFooter = generateViewFooter(child.props.onReset, child.props.onClose, child.props.noResetButton);\n const viewFooter = viewDefaultFooter ?? child.props.footer ?? fallbackFooter;\n return (\n <DrawerNavigation.View\n id=\"overview\"\n home\n title={child.props.title}\n children={child.props.children}\n drawerContentClassname={styles['filter-drawer__view']}\n footer={viewFooter}\n />\n );\n }\n if (isValidElement<FilterDrawerViewProps>(child)) {\n const viewDefaultFooter = generateViewFooter(child.props.onReset, child.props.onClose, child.props.noResetButton);\n const viewFooter = viewDefaultFooter ?? child.props.footer ?? fallbackFooter;\n return (\n <DrawerNavigation.View\n id={child.props.id}\n title={child.props.title}\n children={child.props.children}\n drawerContentClassname={styles['filter-drawer__view']}\n footer={viewFooter}\n />\n );\n } else {\n return child;\n }\n });\n\n return (\n <DrawerNavigation isOpen={drawer.isOpen} initialView={drawer.initialView} onCloseButton={handleClose} footer={footer ?? defaultFooter}>\n {processedChildren}\n </DrawerNavigation>\n );\n}\n\nFilterDrawer.Overview = FilterDrawerOverview;\nFilterDrawer.View = FilterDrawerView;\n\nexport default FilterDrawer;\n","import FilterDrawer from './FilterDrawer';\nexport * from './FilterDrawer';\nexport default FilterDrawer;\n"],"mappings":";;;;;;;;;;;;;;AA6CA,SAAS,qBAAqB,QAA+D;CAC3F,OAAO;;;;;AAOT,SAAS,iBAAiB,QAAgD;CAExE,OAAO;;AAGT,SAAS,aAAoC,EAC3C,QACA,SACA,QACA,SACA,aACA,WACA,YAC6C;CAC7C,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAE5E,MAAM,kBAAkB;EACtB,GAFuB,aAAa,SAEjC;EACH,GAAG;EACJ;CAED,MAAM,oBAA0B;EAC9B,IAAI,SACF,SAAS;OAET,OAAO,OAAO;;CAIlB,MAAM,uBACJ,gBAAgB,KAAA,IAAY,eAAe,gBAAgB,gBAAgB,YAAY,GAAG,gBAAgB;CAE5G,MAAM,qBAAqB,WACzB,oBAAC,gBAAD;EAAQ,SAAS;EAAS,SAAQ;YAC/B,gBAAgB;EACV,CAAA;CAEX,MAAM,2BAA2B,wBAAwB,oBAAC,gBAAD;EAAQ,SAAS;YAAc;EAA8B,CAAA;CAEtH,MAAM,gBACJ,WAAW,uBACT,qBAAC,OAAD;EAAK,WAAW,OAAO;YAAvB,CACG,oBACA,yBACG;MACJ,KAAA;CAEN,MAAM,iBAAiB,UAAU;CAEjC,MAAM,sBAAsB,aAA0B,aAA0B,kBAA6C;EAC3H,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,eACnC;EAGF,OACE,qBAAC,OAAD;GAAK,WAAW,OAAO;aAAvB,CACG,CAAC,kBACC,cACC,oBAAC,gBAAD;IAAQ,SAAS;IAAa,SAAQ;cACnC,gBAAgB;IACV,CAAA,GAET,qBAEH,cACC,oBAAC,gBAAD;IAAQ,SAAS;cAAc,wBAAwB,gBAAgB;IAAwB,CAAA,GAE/F,yBAEE;;;CAIV,MAAM,oBAAoB,SAAS,IAAI,WAAU,UAAS;EACxD,IAAI,eAA2D,MAAM,IAAI,MAAM,SAAS,sBAAsB;GAE5G,MAAM,aADoB,mBAAmB,MAAM,MAAM,SAAS,MAAM,MAAM,SAAS,MAAM,MAAM,cAChF,IAAqB,MAAM,MAAM,UAAU;GAC9D,OACE,oBAAC,iBAAiB,MAAlB;IACE,IAAG;IACH,MAAA;IACA,OAAO,MAAM,MAAM;IACnB,UAAU,MAAM,MAAM;IACtB,wBAAwB,OAAO;IAC/B,QAAQ;IACR,CAAA;;EAGN,IAAI,eAAsC,MAAM,EAAE;GAEhD,MAAM,aADoB,mBAAmB,MAAM,MAAM,SAAS,MAAM,MAAM,SAAS,MAAM,MAAM,cAChF,IAAqB,MAAM,MAAM,UAAU;GAC9D,OACE,oBAAC,iBAAiB,MAAlB;IACE,IAAI,MAAM,MAAM;IAChB,OAAO,MAAM,MAAM;IACnB,UAAU,MAAM,MAAM;IACtB,wBAAwB,OAAO;IAC/B,QAAQ;IACR,CAAA;SAGJ,OAAO;GAET;CAEF,OACE,oBAAC,kBAAD;EAAkB,QAAQ,OAAO;EAAQ,aAAa,OAAO;EAAa,eAAe;EAAa,QAAQ,UAAU;YACrH;EACgB,CAAA;;AAIvB,aAAa,WAAW;AACxB,aAAa,OAAO;;;ACpKpB,IAAA,uBAAe"}
@@ -1,12 +1,13 @@
1
- import { a as IconSize, n as AnalyticsId } from "./constants2.js";
2
- import { t as usePseudoClasses } from "./usePseudoClasses.js";
1
+ import { AnalyticsId, IconSize } from "./constants.js";
2
+ import { usePseudoClasses } from "./hooks/usePseudoClasses.js";
3
3
  import { t as Icon_default } from "./Icon.js";
4
- import { t as ChevronRight_default } from "./ChevronRight.js";
4
+ import ChevronRight from "./components/Icons/ChevronRight.js";
5
5
  import classNames from "classnames";
6
6
  import React from "react";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
8
  import styles from "./components/Filter/FilterLinkList/FilterLinkList.module.scss";
9
- const Link = (props) => {
9
+ //#region src/components/Filter/FilterLinkList/FilterLinkList.tsx
10
+ var Link = (props) => {
10
11
  const { children, title, chips, className = "", linkRef, testId, ref, ...restProps } = props;
11
12
  const { refObject, isHovered } = usePseudoClasses(linkRef);
12
13
  const liClasses = classNames(styles["link-list__item"]);
@@ -31,7 +32,7 @@ const Link = (props) => {
31
32
  }, chip))
32
33
  })] }) : /* @__PURE__ */ jsx(Fragment, { children })
33
34
  }), /* @__PURE__ */ jsx(Icon_default, {
34
- svgIcon: ChevronRight_default,
35
+ svgIcon: ChevronRight,
35
36
  isHovered,
36
37
  size: IconSize.XSmall,
37
38
  color: "var(--color-action-graphics-onlight)"
@@ -51,11 +52,11 @@ var LinkListComponent = (props) => {
51
52
  })
52
53
  });
53
54
  };
54
- const FilterLinkList = LinkListComponent;
55
+ var FilterLinkList = LinkListComponent;
55
56
  FilterLinkList.displayName = "FilterLinkList";
56
57
  FilterLinkList.Link = Link;
57
58
  Link.displayName = "FilterLinkList.Link";
58
- var FilterLinkList_default = FilterLinkList;
59
- export { FilterLinkList_default as n, Link as r, FilterLinkList as t };
59
+ //#endregion
60
+ export { Link as n, FilterLinkList as t };
60
61
 
61
62
  //# sourceMappingURL=FilterLinkList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterLinkList.js","names":["Link: LinkType","LinkListComponent: React.FC<LinkListProps>"],"sources":["../src/components/Filter/FilterLinkList/FilterLinkList.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../../constants';\nimport { usePseudoClasses } from '../../../hooks/usePseudoClasses';\nimport Icon from '../../Icon';\nimport ChevronRight from '../../Icons/ChevronRight';\n\nimport styles from './FilterLinkList.module.scss';\n\nexport type LinkType = React.FC<LinkProps>;\n\nexport interface CompoundComponent extends React.FC<LinkListProps> {\n Link: LinkType;\n}\n\nexport interface LinkListProps {\n /** Items in the LinkList */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the ul element */\n ref?: React.Ref<HTMLUListElement | null>;\n}\n\ntype Modify<T, R> = Omit<T, keyof R> & R;\n\nexport type LinkProps = Modify<\n React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>,\n {\n /** If needed children will be content instead of title and chips. Use only in edge cases */\n children?: React.ReactNode;\n /** Title text on link element */\n title?: string;\n /** Texts rendered inside non-interactive chips on link element */\n chips?: string[];\n /** Custom classname for link element */\n className?: string;\n /** Ref for button */\n linkRef?: React.RefObject<HTMLButtonElement | null>;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the list item element */\n ref?: React.Ref<HTMLLIElement | null>;\n }\n>;\n\nexport const Link: LinkType = (props: LinkProps) => {\n const { children, title, chips, className = '', linkRef, testId, ref, ...restProps } = props;\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | null>(linkRef);\n\n const liClasses = cn(styles['link-list__item']);\n const linkClasses = cn(styles['link-list__button'], className);\n\n return (\n <li className={liClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Link}>\n <button className={linkClasses} ref={refObject as React.RefObject<HTMLButtonElement>} type=\"button\" {...restProps}>\n <div className={styles['link-list__button__content']}>\n {title ? (\n <>\n <span>{title}</span>\n {chips && chips.length > 0 && (\n <div className={styles['link-list__chip-list']}>\n {chips.map(chip => (\n <span className={styles['link-list__chip']} key={chip}>\n {chip}\n </span>\n ))}\n </div>\n )}\n </>\n ) : (\n <>{children}</>\n )}\n </div>\n <Icon svgIcon={ChevronRight} isHovered={isHovered} size={IconSize.XSmall} color={'var(--color-action-graphics-onlight)'} />\n </button>\n </li>\n );\n};\n\nconst LinkListComponent: React.FC<LinkListProps> = (props: LinkListProps) => {\n const { children, className = '', testId, ref } = props;\n\n const listClassNames = cn(styles['link-list'], className);\n\n return (\n <ul ref={ref} className={listClassNames} data-testid={testId} data-analyticsid={AnalyticsId.LinkList}>\n {React.Children.map(children, (child: React.ReactNode) => {\n if (React.isValidElement<LinkProps>(child) && child.type === Link) {\n return React.cloneElement(child);\n }\n })}\n </ul>\n );\n};\n\nexport const FilterLinkList = LinkListComponent as CompoundComponent;\n\nFilterLinkList.displayName = 'FilterLinkList';\nFilterLinkList.Link = Link;\nLink.displayName = 'FilterLinkList.Link';\n\nexport default FilterLinkList;\n"],"mappings":";;;;;;;;AAkDA,MAAaA,QAAkB,UAAqB;CAClD,MAAM,EAAE,UAAU,OAAO,OAAO,YAAY,IAAI,SAAS,QAAQ,KAAK,GAAG,cAAc;CACvF,MAAM,EAAE,WAAW,cAAc,iBAA2C,QAAQ;CAEpF,MAAM,YAAY,WAAG,OAAO,mBAAmB;CAC/C,MAAM,cAAc,WAAG,OAAO,sBAAsB,UAAU;AAE9D,QACE,oBAAC,MAAA;EAAG,WAAW;EAAgB;EAAK,eAAa;EAAQ,oBAAkB,YAAY;YACrF,qBAAC,UAAA;GAAO,WAAW;GAAa,KAAK;GAAiD,MAAK;GAAS,GAAI;cACtG,oBAAC,OAAA;IAAI,WAAW,OAAO;cACpB,QACC,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAA,EAAA,UAAM,OAAA,CAAa,EACnB,SAAS,MAAM,SAAS,KACvB,oBAAC,OAAA;KAAI,WAAW,OAAO;eACpB,MAAM,KAAI,SACT,oBAAC,QAAA;MAAK,WAAW,OAAO;gBACrB;QAD8C,KAE1C,CACP;MACE,CAAA,EAAA,CAEP,GAEH,oBAAA,UAAA,EAAG,UAAA,CAAY;KAEb,EACN,oBAAC,cAAA;IAAK,SAAS;IAAyB;IAAW,MAAM,SAAS;IAAQ,OAAO;KAA0C,CAAA;IACpH;GACN;;AAIT,IAAMC,qBAA8C,UAAyB;CAC3E,MAAM,EAAE,UAAU,YAAY,IAAI,QAAQ,QAAQ;AAIlD,QACE,oBAAC,MAAA;EAAQ;EAAK,WAHO,WAAG,OAAO,cAAc,UAAU;EAGd,eAAa;EAAQ,oBAAkB,YAAY;YACzF,MAAM,SAAS,IAAI,WAAW,UAA2B;AACxD,OAAI,MAAM,eAA0B,MAAM,IAAI,MAAM,SAAS,KAC3D,QAAO,MAAM,aAAa,MAAM;IAElC;GACC;;AAIT,MAAa,iBAAiB;AAE9B,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB,KAAK,cAAc;AAEnB,IAAA,yBAAe"}
1
+ {"version":3,"file":"FilterLinkList.js","names":[],"sources":["../src/components/Filter/FilterLinkList/FilterLinkList.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../../constants';\nimport { usePseudoClasses } from '../../../hooks/usePseudoClasses';\nimport Icon from '../../Icon';\nimport ChevronRight from '../../Icons/ChevronRight';\n\nimport styles from './FilterLinkList.module.scss';\n\nexport type LinkType = React.FC<LinkProps>;\n\nexport interface CompoundComponent extends React.FC<LinkListProps> {\n Link: LinkType;\n}\n\nexport interface LinkListProps {\n /** Items in the LinkList */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the ul element */\n ref?: React.Ref<HTMLUListElement | null>;\n}\n\ntype Modify<T, R> = Omit<T, keyof R> & R;\n\nexport type LinkProps = Modify<\n React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>,\n {\n /** If needed children will be content instead of title and chips. Use only in edge cases */\n children?: React.ReactNode;\n /** Title text on link element */\n title?: string;\n /** Texts rendered inside non-interactive chips on link element */\n chips?: string[];\n /** Custom classname for link element */\n className?: string;\n /** Ref for button */\n linkRef?: React.RefObject<HTMLButtonElement | null>;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the list item element */\n ref?: React.Ref<HTMLLIElement | null>;\n }\n>;\n\nexport const Link: LinkType = (props: LinkProps) => {\n const { children, title, chips, className = '', linkRef, testId, ref, ...restProps } = props;\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | null>(linkRef);\n\n const liClasses = cn(styles['link-list__item']);\n const linkClasses = cn(styles['link-list__button'], className);\n\n return (\n <li className={liClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Link}>\n <button className={linkClasses} ref={refObject as React.RefObject<HTMLButtonElement>} type=\"button\" {...restProps}>\n <div className={styles['link-list__button__content']}>\n {title ? (\n <>\n <span>{title}</span>\n {chips && chips.length > 0 && (\n <div className={styles['link-list__chip-list']}>\n {chips.map(chip => (\n <span className={styles['link-list__chip']} key={chip}>\n {chip}\n </span>\n ))}\n </div>\n )}\n </>\n ) : (\n <>{children}</>\n )}\n </div>\n <Icon svgIcon={ChevronRight} isHovered={isHovered} size={IconSize.XSmall} color={'var(--color-action-graphics-onlight)'} />\n </button>\n </li>\n );\n};\n\nconst LinkListComponent: React.FC<LinkListProps> = (props: LinkListProps) => {\n const { children, className = '', testId, ref } = props;\n\n const listClassNames = cn(styles['link-list'], className);\n\n return (\n <ul ref={ref} className={listClassNames} data-testid={testId} data-analyticsid={AnalyticsId.LinkList}>\n {React.Children.map(children, (child: React.ReactNode) => {\n if (React.isValidElement<LinkProps>(child) && child.type === Link) {\n return React.cloneElement(child);\n }\n })}\n </ul>\n );\n};\n\nexport const FilterLinkList = LinkListComponent as CompoundComponent;\n\nFilterLinkList.displayName = 'FilterLinkList';\nFilterLinkList.Link = Link;\nLink.displayName = 'FilterLinkList.Link';\n\nexport default FilterLinkList;\n"],"mappings":";;;;;;;;;AAkDA,IAAa,QAAkB,UAAqB;CAClD,MAAM,EAAE,UAAU,OAAO,OAAO,YAAY,IAAI,SAAS,QAAQ,KAAK,GAAG,cAAc;CACvF,MAAM,EAAE,WAAW,cAAc,iBAA2C,QAAQ;CAEpF,MAAM,YAAY,WAAG,OAAO,mBAAmB;CAC/C,MAAM,cAAc,WAAG,OAAO,sBAAsB,UAAU;CAE9D,OACE,oBAAC,MAAD;EAAI,WAAW;EAAgB;EAAK,eAAa;EAAQ,oBAAkB,YAAY;YACrF,qBAAC,UAAD;GAAQ,WAAW;GAAa,KAAK;GAAiD,MAAK;GAAS,GAAI;aAAxG,CACE,oBAAC,OAAD;IAAK,WAAW,OAAO;cACpB,QACC,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD,EAAA,UAAO,OAAa,CAAA,EACnB,SAAS,MAAM,SAAS,KACvB,oBAAC,OAAD;KAAK,WAAW,OAAO;eACpB,MAAM,KAAI,SACT,oBAAC,QAAD;MAAM,WAAW,OAAO;gBACrB;MACI,EAF0C,KAE1C,CACP;KACE,CAAA,CAEP,EAAA,CAAA,GAEH,oBAAA,UAAA,EAAG,UAAY,CAAA;IAEb,CAAA,EACN,oBAAC,cAAD;IAAM,SAAS;IAAyB;IAAW,MAAM,SAAS;IAAQ,OAAO;IAA0C,CAAA,CACpH;;EACN,CAAA;;AAIT,IAAM,qBAA8C,UAAyB;CAC3E,MAAM,EAAE,UAAU,YAAY,IAAI,QAAQ,QAAQ;CAIlD,OACE,oBAAC,MAAD;EAAS;EAAK,WAHO,WAAG,OAAO,cAAc,UAGpB;EAAgB,eAAa;EAAQ,oBAAkB,YAAY;YACzF,MAAM,SAAS,IAAI,WAAW,UAA2B;GACxD,IAAI,MAAM,eAA0B,MAAM,IAAI,MAAM,SAAS,MAC3D,OAAO,MAAM,aAAa,MAAM;IAElC;EACC,CAAA;;AAIT,IAAa,iBAAiB;AAE9B,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB,KAAK,cAAc"}
@@ -1,22 +1,26 @@
1
1
  import { r as useDrawerNavigation } from "./DrawerNavigation.js";
2
- import { n as FilterLinkList_default } from "./FilterLinkList.js";
2
+ import { t as FilterLinkList } from "./FilterLinkList.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
+ //#region src/components/Filter/FilterOverviewLinkList/FilterOverviewLinkList.tsx
4
5
  function FilterOverviewLinkList({ filter, getLabel, links }) {
5
6
  const { goToView } = useDrawerNavigation();
6
- return /* @__PURE__ */ jsx(FilterLinkList_default, { children: links.map(({ filterKey, title, viewId }) => {
7
+ return /* @__PURE__ */ jsx(FilterLinkList, { children: links.map(({ filterKey, title, viewId }) => {
7
8
  const raw = filter.filters[filterKey];
8
9
  let chips;
9
10
  if (Array.isArray(raw)) chips = raw.map((v) => getLabel(filterKey, v));
10
11
  else if (raw !== void 0 && raw !== null) chips = [getLabel(filterKey, raw)];
11
12
  else chips = [];
12
- return /* @__PURE__ */ jsx(FilterLinkList_default.Link, {
13
+ return /* @__PURE__ */ jsx(FilterLinkList.Link, {
13
14
  title,
14
15
  chips,
15
16
  onClick: () => goToView(viewId ?? filterKey)
16
17
  }, filterKey);
17
18
  }) });
18
19
  }
19
- var FilterOverviewLinkList_default$1 = FilterOverviewLinkList;
20
- export { FilterOverviewLinkList_default$1 as t };
20
+ //#endregion
21
+ //#region src/components/Filter/FilterOverviewLinkList/index.ts
22
+ var FilterOverviewLinkList_default = FilterOverviewLinkList;
23
+ //#endregion
24
+ export { FilterOverviewLinkList_default as t };
21
25
 
22
26
  //# sourceMappingURL=FilterOverviewLinkList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterOverviewLinkList.js","names":["chips: string[]"],"sources":["../src/components/Filter/FilterOverviewLinkList/FilterOverviewLinkList.tsx","../src/components/Filter/FilterOverviewLinkList/index.ts"],"sourcesContent":["import type { FilterValues, UseFilterReturn } from '../useFilter';\n\nimport { useDrawerNavigation } from '../DrawerNavigation';\nimport FilterLinkList from '../FilterLinkList/FilterLinkList';\n\nexport interface FilterOverviewLink {\n /** The filter key to read values from */\n filterKey: string;\n /** Display title for the link */\n title: string;\n /** View ID to navigate to when clicked. Defaults to filterKey */\n viewId?: string;\n}\n\nexport interface FilterOverviewLinkListProps<T extends FilterValues> {\n /** The filter instance from useFilter */\n filter: UseFilterReturn<T>;\n /** Look up the display label for a filter key + value */\n getLabel: (key: keyof T, value: unknown) => string;\n /** Configuration for which filter keys to show as links */\n links: FilterOverviewLink[];\n}\n\nfunction FilterOverviewLinkList<T extends FilterValues>({ filter, getLabel, links }: FilterOverviewLinkListProps<T>): React.ReactNode {\n const { goToView } = useDrawerNavigation();\n\n return (\n <FilterLinkList>\n {links.map(({ filterKey, title, viewId }) => {\n const raw = filter.filters[filterKey as keyof T];\n\n let chips: string[];\n if (Array.isArray(raw)) {\n chips = raw.map(v => getLabel(filterKey as keyof T, v));\n } else if (raw !== undefined && raw !== null) {\n chips = [getLabel(filterKey as keyof T, raw)];\n } else {\n chips = [];\n }\n\n return <FilterLinkList.Link key={filterKey} title={title} chips={chips} onClick={() => goToView(viewId ?? filterKey)} />;\n })}\n </FilterLinkList>\n );\n}\n\nexport default FilterOverviewLinkList;\n","import FilterOverviewLinkList from './FilterOverviewLinkList';\nexport * from './FilterOverviewLinkList';\nexport default FilterOverviewLinkList;\n"],"mappings":";;;AAuBA,SAAS,uBAA+C,EAAE,QAAQ,UAAU,SAA0D;CACpI,MAAM,EAAE,aAAa,qBAAqB;AAE1C,QACE,oBAAC,wBAAA,EAAA,UACE,MAAM,KAAK,EAAE,WAAW,OAAO,aAAa;EAC3C,MAAM,MAAM,OAAO,QAAQ;EAE3B,IAAIA;AACJ,MAAI,MAAM,QAAQ,IAAI,CACpB,SAAQ,IAAI,KAAI,MAAK,SAAS,WAAsB,EAAE,CAAC;WAC9C,QAAQ,KAAA,KAAa,QAAQ,KACtC,SAAQ,CAAC,SAAS,WAAsB,IAAI,CAAC;MAE7C,SAAQ,EAAE;AAGZ,SAAO,oBAAC,uBAAe,MAAA;GAA4B;GAAc;GAAO,eAAe,SAAS,UAAU,UAAU;KAAnF,UAAuF;GACxH,EAAA,CACa;;ACxCrB,IAAA,mCD4Ce"}
1
+ {"version":3,"file":"FilterOverviewLinkList.js","names":[],"sources":["../src/components/Filter/FilterOverviewLinkList/FilterOverviewLinkList.tsx","../src/components/Filter/FilterOverviewLinkList/index.ts"],"sourcesContent":["import type { FilterValues, UseFilterReturn } from '../useFilter';\n\nimport { useDrawerNavigation } from '../DrawerNavigation';\nimport FilterLinkList from '../FilterLinkList/FilterLinkList';\n\nexport interface FilterOverviewLink {\n /** The filter key to read values from */\n filterKey: string;\n /** Display title for the link */\n title: string;\n /** View ID to navigate to when clicked. Defaults to filterKey */\n viewId?: string;\n}\n\nexport interface FilterOverviewLinkListProps<T extends FilterValues> {\n /** The filter instance from useFilter */\n filter: UseFilterReturn<T>;\n /** Look up the display label for a filter key + value */\n getLabel: (key: keyof T, value: unknown) => string;\n /** Configuration for which filter keys to show as links */\n links: FilterOverviewLink[];\n}\n\nfunction FilterOverviewLinkList<T extends FilterValues>({ filter, getLabel, links }: FilterOverviewLinkListProps<T>): React.ReactNode {\n const { goToView } = useDrawerNavigation();\n\n return (\n <FilterLinkList>\n {links.map(({ filterKey, title, viewId }) => {\n const raw = filter.filters[filterKey as keyof T];\n\n let chips: string[];\n if (Array.isArray(raw)) {\n chips = raw.map(v => getLabel(filterKey as keyof T, v));\n } else if (raw !== undefined && raw !== null) {\n chips = [getLabel(filterKey as keyof T, raw)];\n } else {\n chips = [];\n }\n\n return <FilterLinkList.Link key={filterKey} title={title} chips={chips} onClick={() => goToView(viewId ?? filterKey)} />;\n })}\n </FilterLinkList>\n );\n}\n\nexport default FilterOverviewLinkList;\n","import FilterOverviewLinkList from './FilterOverviewLinkList';\nexport * from './FilterOverviewLinkList';\nexport default FilterOverviewLinkList;\n"],"mappings":";;;;AAuBA,SAAS,uBAA+C,EAAE,QAAQ,UAAU,SAA0D;CACpI,MAAM,EAAE,aAAa,qBAAqB;CAE1C,OACE,oBAAC,gBAAD,EAAA,UACG,MAAM,KAAK,EAAE,WAAW,OAAO,aAAa;EAC3C,MAAM,MAAM,OAAO,QAAQ;EAE3B,IAAI;EACJ,IAAI,MAAM,QAAQ,IAAI,EACpB,QAAQ,IAAI,KAAI,MAAK,SAAS,WAAsB,EAAE,CAAC;OAClD,IAAI,QAAQ,KAAA,KAAa,QAAQ,MACtC,QAAQ,CAAC,SAAS,WAAsB,IAAI,CAAC;OAE7C,QAAQ,EAAE;EAGZ,OAAO,oBAAC,eAAe,MAAhB;GAA4C;GAAc;GAAO,eAAe,SAAS,UAAU,UAAU;GAAI,EAAvF,UAAuF;GACxH,EACa,CAAA;;;;ACxCrB,IAAA,iCAAe"}
@@ -1,16 +1,20 @@
1
- import { t as FilterSearch_default } from "./FilterSearch.js";
1
+ import { t as FilterSearch } from "./FilterSearch.js";
2
2
  import classNames from "classnames";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import styles from "./components/Filter/FilterOverviewSearch/styles.module.scss";
5
+ //#region src/components/Filter/FilterOverviewSearch/FilterOverviewSearch.tsx
5
6
  var FilterOverviewSearch = (props) => {
6
7
  const { wrapperClassName, testId, ...filterSearchProps } = props;
7
8
  return /* @__PURE__ */ jsx("div", {
8
9
  className: classNames(styles["filter-overview-search"], wrapperClassName),
9
10
  "data-testid": testId,
10
- children: /* @__PURE__ */ jsx(FilterSearch_default, { ...filterSearchProps })
11
+ children: /* @__PURE__ */ jsx(FilterSearch, { ...filterSearchProps })
11
12
  });
12
13
  };
13
- var FilterOverviewSearch_default$1 = FilterOverviewSearch;
14
- export { FilterOverviewSearch_default$1 as t };
14
+ //#endregion
15
+ //#region src/components/Filter/FilterOverviewSearch/index.ts
16
+ var FilterOverviewSearch_default = FilterOverviewSearch;
17
+ //#endregion
18
+ export { FilterOverviewSearch_default as t };
15
19
 
16
20
  //# sourceMappingURL=FilterOverviewSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterOverviewSearch.js","names":["FilterOverviewSearch: React.FC<FilterOverviewSearchProps>"],"sources":["../src/components/Filter/FilterOverviewSearch/FilterOverviewSearch.tsx","../src/components/Filter/FilterOverviewSearch/index.ts"],"sourcesContent":["import cn from 'classnames';\n\nimport type { FilterSearchProps } from '../FilterSearch/FilterSearch';\n\nimport FilterSearch from '../FilterSearch/FilterSearch';\n\nimport styles from './styles.module.scss';\n\nexport interface FilterOverviewSearchProps extends FilterSearchProps {\n /** Adds custom classes to the wrapper element. */\n wrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst FilterOverviewSearch: React.FC<FilterOverviewSearchProps> = props => {\n const { wrapperClassName, testId, ...filterSearchProps } = props;\n\n return (\n <div className={cn(styles['filter-overview-search'], wrapperClassName)} data-testid={testId}>\n <FilterSearch {...filterSearchProps} />\n </div>\n );\n};\n\nexport default FilterOverviewSearch;\n","import FilterOverviewSearch from './FilterOverviewSearch';\nexport * from './FilterOverviewSearch';\nexport default FilterOverviewSearch;\n"],"mappings":";;;;AAeA,IAAMA,wBAA4D,UAAS;CACzE,MAAM,EAAE,kBAAkB,QAAQ,GAAG,sBAAsB;AAE3D,QACE,oBAAC,OAAA;EAAI,WAAW,WAAG,OAAO,2BAA2B,iBAAiB;EAAE,eAAa;YACnF,oBAAC,sBAAA,EAAa,GAAI,mBAAA,CAAqB;GACnC;;ACnBV,IAAA,iCDuBe"}
1
+ {"version":3,"file":"FilterOverviewSearch.js","names":[],"sources":["../src/components/Filter/FilterOverviewSearch/FilterOverviewSearch.tsx","../src/components/Filter/FilterOverviewSearch/index.ts"],"sourcesContent":["import cn from 'classnames';\n\nimport type { FilterSearchProps } from '../FilterSearch/FilterSearch';\n\nimport FilterSearch from '../FilterSearch/FilterSearch';\n\nimport styles from './styles.module.scss';\n\nexport interface FilterOverviewSearchProps extends FilterSearchProps {\n /** Adds custom classes to the wrapper element. */\n wrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst FilterOverviewSearch: React.FC<FilterOverviewSearchProps> = props => {\n const { wrapperClassName, testId, ...filterSearchProps } = props;\n\n return (\n <div className={cn(styles['filter-overview-search'], wrapperClassName)} data-testid={testId}>\n <FilterSearch {...filterSearchProps} />\n </div>\n );\n};\n\nexport default FilterOverviewSearch;\n","import FilterOverviewSearch from './FilterOverviewSearch';\nexport * from './FilterOverviewSearch';\nexport default FilterOverviewSearch;\n"],"mappings":";;;;;AAeA,IAAM,wBAA4D,UAAS;CACzE,MAAM,EAAE,kBAAkB,QAAQ,GAAG,sBAAsB;CAE3D,OACE,oBAAC,OAAD;EAAK,WAAW,WAAG,OAAO,2BAA2B,iBAAiB;EAAE,eAAa;YACnF,oBAAC,cAAD,EAAc,GAAI,mBAAqB,CAAA;EACnC,CAAA;;;;ACnBV,IAAA,+BAAe"}
@@ -1,5 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import styles from "./components/Filter/FilterResultCountAndSortWrapper/styles.module.scss";
3
+ //#region src/components/Filter/FilterResultCountAndSortWrapper/FilterResultCountAndSortWrapper.tsx
3
4
  var FilterResultCountAndSortWrapper = (props) => {
4
5
  const { resultCount, sortComponent } = props;
5
6
  return /* @__PURE__ */ jsxs("div", {
@@ -13,7 +14,10 @@ var FilterResultCountAndSortWrapper = (props) => {
13
14
  })]
14
15
  });
15
16
  };
16
- var FilterResultCountAndSortWrapper_default$1 = FilterResultCountAndSortWrapper;
17
- export { FilterResultCountAndSortWrapper_default$1 as t };
17
+ //#endregion
18
+ //#region src/components/Filter/FilterResultCountAndSortWrapper/index.ts
19
+ var FilterResultCountAndSortWrapper_default = FilterResultCountAndSortWrapper;
20
+ //#endregion
21
+ export { FilterResultCountAndSortWrapper_default as t };
18
22
 
19
23
  //# sourceMappingURL=FilterResultCountAndSortWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterResultCountAndSortWrapper.js","names":["FilterResultCountAndSortWrapper: React.FC<FilterResultCountAndSortWrapper>"],"sources":["../src/components/Filter/FilterResultCountAndSortWrapper/FilterResultCountAndSortWrapper.tsx","../src/components/Filter/FilterResultCountAndSortWrapper/index.ts"],"sourcesContent":["import styles from './styles.module.scss';\n\nexport interface FilterResultCountAndSortWrapper {\n /** Result count content area */\n resultCount?: React.ReactNode;\n /** FilterSort content area */\n sortComponent?: React.ReactNode;\n}\n\nconst FilterResultCountAndSortWrapper: React.FC<FilterResultCountAndSortWrapper> = props => {\n const { resultCount, sortComponent } = props;\n\n return (\n <div className={styles['filter-result-count-and-sort-wrapper']}>\n <span className={styles['filter-result-count-and-sort-wrapper__count']}>{resultCount}</span>\n <span className={styles['filter-result-count-and-sort-wrapper__sort']}>{sortComponent}</span>\n </div>\n );\n};\n\nexport default FilterResultCountAndSortWrapper;\n","import FilterResultCountAndSortWrapper from './FilterResultCountAndSortWrapper';\nexport * from './FilterResultCountAndSortWrapper';\nexport default FilterResultCountAndSortWrapper;\n"],"mappings":";;AASA,IAAMA,mCAA6E,UAAS;CAC1F,MAAM,EAAE,aAAa,kBAAkB;AAEvC,QACE,qBAAC,OAAA;EAAI,WAAW,OAAO;aACrB,oBAAC,QAAA;GAAK,WAAW,OAAO;aAAiD;IAAmB,EAC5F,oBAAC,QAAA;GAAK,WAAW,OAAO;aAAgD;IAAqB,CAAA;GACzF;;ACdV,IAAA,4CDkBe"}
1
+ {"version":3,"file":"FilterResultCountAndSortWrapper.js","names":[],"sources":["../src/components/Filter/FilterResultCountAndSortWrapper/FilterResultCountAndSortWrapper.tsx","../src/components/Filter/FilterResultCountAndSortWrapper/index.ts"],"sourcesContent":["import styles from './styles.module.scss';\n\nexport interface FilterResultCountAndSortWrapper {\n /** Result count content area */\n resultCount?: React.ReactNode;\n /** FilterSort content area */\n sortComponent?: React.ReactNode;\n}\n\nconst FilterResultCountAndSortWrapper: React.FC<FilterResultCountAndSortWrapper> = props => {\n const { resultCount, sortComponent } = props;\n\n return (\n <div className={styles['filter-result-count-and-sort-wrapper']}>\n <span className={styles['filter-result-count-and-sort-wrapper__count']}>{resultCount}</span>\n <span className={styles['filter-result-count-and-sort-wrapper__sort']}>{sortComponent}</span>\n </div>\n );\n};\n\nexport default FilterResultCountAndSortWrapper;\n","import FilterResultCountAndSortWrapper from './FilterResultCountAndSortWrapper';\nexport * from './FilterResultCountAndSortWrapper';\nexport default FilterResultCountAndSortWrapper;\n"],"mappings":";;;AASA,IAAM,mCAA6E,UAAS;CAC1F,MAAM,EAAE,aAAa,kBAAkB;CAEvC,OACE,qBAAC,OAAD;EAAK,WAAW,OAAO;YAAvB,CACE,oBAAC,QAAD;GAAM,WAAW,OAAO;aAAiD;GAAmB,CAAA,EAC5F,oBAAC,QAAD;GAAM,WAAW,OAAO;aAAgD;GAAqB,CAAA,CACzF;;;;;ACdV,IAAA,0CAAe"}
@@ -1,16 +1,17 @@
1
- import { a as IconSize, s as LanguageLocales } from "./constants2.js";
2
- import { t as usePseudoClasses } from "./usePseudoClasses.js";
3
- import { n as mergeRefs } from "./refs.js";
1
+ import { IconSize, LanguageLocales } 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 { n as useLanguage } from "./useLanguage.js";
6
- import { t as useIsMobileBreakpoint } from "./useIsMobileBreakpoint.js";
7
- import { t as X_default } from "./X.js";
5
+ import { useLanguage } from "./hooks/useLanguage.js";
6
+ import { useIsMobileBreakpoint } from "./hooks/useIsMobileBreakpoint.js";
7
+ import X from "./components/Icons/X.js";
8
8
  import { t as getResources } from "./resourceHelper.js";
9
- import { t as Search_default } from "./Search.js";
9
+ import Search from "./components/Icons/Search.js";
10
10
  import classNames from "classnames";
11
11
  import { useRef } from "react";
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
13
  import styles from "./components/Filter/FilterSearch/styles.module.scss";
14
+ //#region src/components/Filter/FilterSearch/FilterSearch.tsx
14
15
  var FilterSearch = (props) => {
15
16
  const { className, value, onChange, resources, buttonProps, clearButtonProps, ref, ...inputProps } = props;
16
17
  const inputRef = useRef(null);
@@ -57,7 +58,7 @@ var FilterSearch = (props) => {
57
58
  ref: clearButtonRef,
58
59
  className: classNames(styles["filter-search__clear-button"], clearButtonProps?.className),
59
60
  children: /* @__PURE__ */ jsx(Icon_default, {
60
- svgIcon: X_default,
61
+ svgIcon: X,
61
62
  size: IconSize.XXSmall,
62
63
  isHovered: !isMobile && isClearButtonHovered
63
64
  })
@@ -72,7 +73,7 @@ var FilterSearch = (props) => {
72
73
  children: /* @__PURE__ */ jsx("div", {
73
74
  className: classNames(styles["filter-search__search-button--inner"]),
74
75
  children: /* @__PURE__ */ jsx(Icon_default, {
75
- svgIcon: Search_default,
76
+ svgIcon: Search,
76
77
  size: isMobile ? IconSize.XXSmall : IconSize.XSmall,
77
78
  isHovered: !inputProps.disabled && isButtonHovered
78
79
  })
@@ -81,7 +82,7 @@ var FilterSearch = (props) => {
81
82
  ]
82
83
  });
83
84
  };
84
- var FilterSearch_default = FilterSearch;
85
- export { FilterSearch_default as t };
85
+ //#endregion
86
+ export { FilterSearch as t };
86
87
 
87
88
  //# sourceMappingURL=FilterSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterSearch.js","names":["FilterSearch: React.FC<FilterSearchProps>"],"sources":["../src/components/Filter/FilterSearch/FilterSearch.tsx"],"sourcesContent":["import { useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { HNDesignsystemFilter } from '../../../resources/Resources';\n\nimport { IconSize, LanguageLocales } from '../../../constants';\nimport { useIsMobileBreakpoint } from '../../../hooks/useIsMobileBreakpoint';\nimport { useLanguage } from '../../../hooks/useLanguage';\nimport { usePseudoClasses } from '../../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../../utils/refs';\nimport Icon from '../../Icon';\nimport Search from '../../Icons/Search';\nimport X from '../../Icons/X';\nimport { getResources } from '../resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport interface FilterSearchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'className' | 'value' | 'onChange'> {\n /** Adds custom classes to the component */\n className?: string;\n /** The value given by the user in the input field */\n value: string | undefined;\n /** onChange handler for the input field */\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n /** Props for the search button */\n buttonProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n /** Props for the clear button */\n clearButtonProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n /** Texts if overriding SOT */\n resources?: Partial<HNDesignsystemFilter>;\n /** Ref passed to the input element */\n ref?: React.Ref<HTMLInputElement | null>;\n}\n\nconst FilterSearch: React.FC<FilterSearchProps> = props => {\n const { className, value, onChange, resources, buttonProps, clearButtonProps, ref, ...inputProps } = props;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const inputWrapperRef = useRef<HTMLLabelElement>(null);\n const { isHovered: isWrapperHovered } = usePseudoClasses(inputWrapperRef);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const { isHovered: isButtonHovered } = usePseudoClasses(buttonRef);\n const clearButtonRef = useRef<HTMLButtonElement>(null);\n const { isHovered: isClearButtonHovered } = usePseudoClasses(clearButtonRef);\n\n const isMobile = useIsMobileBreakpoint();\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources = {\n ...defaultResources,\n ...resources,\n };\n\n const inputHasValue = !!value;\n\n return (\n <div className={classNames(styles['filter-search__wrapper'], className)}>\n <label className={styles['filter-search__input-wrapper']} ref={inputWrapperRef}>\n <span className={styles['filter-search__input__label']}>{inputProps['aria-label'] ?? mergedResources.searchPlaceholder}</span>\n <input\n {...inputProps}\n ref={mergeRefs([inputRef, ref])}\n value={value}\n onChange={onChange}\n className={classNames(styles['filter-search__input'], {\n [styles['filter-search__input--hovered']]: isWrapperHovered,\n })}\n placeholder={mergedResources.searchPlaceholder}\n />\n </label>\n {inputHasValue && (\n <button\n type=\"button\"\n aria-label={mergedResources.searchClearButtonAriaLabel}\n disabled={inputProps.disabled}\n {...clearButtonProps}\n onClick={e => {\n clearButtonProps?.onClick?.(e);\n inputRef.current?.focus();\n }}\n ref={clearButtonRef}\n className={classNames(styles['filter-search__clear-button'], clearButtonProps?.className)}\n >\n <Icon svgIcon={X} size={IconSize.XXSmall} isHovered={!isMobile && isClearButtonHovered} />\n </button>\n )}\n <button\n type={'button'}\n aria-label={mergedResources.searchButtonAriaLabel}\n disabled={inputProps.disabled}\n {...buttonProps}\n ref={buttonRef}\n className={classNames(styles['filter-search__search-button'], buttonProps?.className)}\n >\n <div className={classNames(styles['filter-search__search-button--inner'])}>\n <Icon svgIcon={Search} size={isMobile ? IconSize.XXSmall : IconSize.XSmall} isHovered={!inputProps.disabled && isButtonHovered} />\n </div>\n </button>\n </div>\n );\n};\n\nexport default FilterSearch;\n"],"mappings":";;;;;;;;;;;;;AAmCA,IAAMA,gBAA4C,UAAS;CACzD,MAAM,EAAE,WAAW,OAAO,UAAU,WAAW,aAAa,kBAAkB,KAAK,GAAG,eAAe;CAErG,MAAM,WAAW,OAAyB,KAAK;CAC/C,MAAM,kBAAkB,OAAyB,KAAK;CACtD,MAAM,EAAE,WAAW,qBAAqB,iBAAiB,gBAAgB;CACzE,MAAM,YAAY,OAA0B,KAAK;CACjD,MAAM,EAAE,WAAW,oBAAoB,iBAAiB,UAAU;CAClE,MAAM,iBAAiB,OAA0B,KAAK;CACtD,MAAM,EAAE,WAAW,yBAAyB,iBAAiB,eAAe;CAE5E,MAAM,WAAW,uBAAuB;CAExC,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAG5E,MAAM,kBAAkB;EACtB,GAHuB,aAAa,SAAS;EAI7C,GAAG;EACJ;CAED,MAAM,gBAAgB,CAAC,CAAC;AAExB,QACE,qBAAC,OAAA;EAAI,WAAW,WAAW,OAAO,2BAA2B,UAAU;;GACrE,qBAAC,SAAA;IAAM,WAAW,OAAO;IAAiC,KAAK;eAC7D,oBAAC,QAAA;KAAK,WAAW,OAAO;eAAiC,WAAW,iBAAiB,gBAAgB;MAAyB,EAC9H,oBAAC,SAAA;KACC,GAAI;KACJ,KAAK,UAAU,CAAC,UAAU,IAAI,CAAC;KACxB;KACG;KACV,WAAW,WAAW,OAAO,yBAAyB,GACnD,OAAO,mCAAmC,kBAC5C,CAAC;KACF,aAAa,gBAAgB;MAC7B,CAAA;KACI;GACP,iBACC,oBAAC,UAAA;IACC,MAAK;IACL,cAAY,gBAAgB;IAC5B,UAAU,WAAW;IACrB,GAAI;IACJ,UAAS,MAAK;AACZ,uBAAkB,UAAU,EAAE;AAC9B,cAAS,SAAS,OAAO;;IAE3B,KAAK;IACL,WAAW,WAAW,OAAO,gCAAgC,kBAAkB,UAAU;cAEzF,oBAAC,cAAA;KAAK,SAAS;KAAG,MAAM,SAAS;KAAS,WAAW,CAAC,YAAY;MAAwB;KACnF;GAEX,oBAAC,UAAA;IACC,MAAM;IACN,cAAY,gBAAgB;IAC5B,UAAU,WAAW;IACrB,GAAI;IACJ,KAAK;IACL,WAAW,WAAW,OAAO,iCAAiC,aAAa,UAAU;cAErF,oBAAC,OAAA;KAAI,WAAW,WAAW,OAAO,uCAAuC;eACvE,oBAAC,cAAA;MAAK,SAAS;MAAQ,MAAM,WAAW,SAAS,UAAU,SAAS;MAAQ,WAAW,CAAC,WAAW,YAAY;OAAmB;MAC9H;KACC;;GACL;;AAIV,IAAA,uBAAe"}
1
+ {"version":3,"file":"FilterSearch.js","names":[],"sources":["../src/components/Filter/FilterSearch/FilterSearch.tsx"],"sourcesContent":["import { useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { HNDesignsystemFilter } from '../../../resources/Resources';\n\nimport { IconSize, LanguageLocales } from '../../../constants';\nimport { useIsMobileBreakpoint } from '../../../hooks/useIsMobileBreakpoint';\nimport { useLanguage } from '../../../hooks/useLanguage';\nimport { usePseudoClasses } from '../../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../../utils/refs';\nimport Icon from '../../Icon';\nimport Search from '../../Icons/Search';\nimport X from '../../Icons/X';\nimport { getResources } from '../resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport interface FilterSearchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'className' | 'value' | 'onChange'> {\n /** Adds custom classes to the component */\n className?: string;\n /** The value given by the user in the input field */\n value: string | undefined;\n /** onChange handler for the input field */\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n /** Props for the search button */\n buttonProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n /** Props for the clear button */\n clearButtonProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n /** Texts if overriding SOT */\n resources?: Partial<HNDesignsystemFilter>;\n /** Ref passed to the input element */\n ref?: React.Ref<HTMLInputElement | null>;\n}\n\nconst FilterSearch: React.FC<FilterSearchProps> = props => {\n const { className, value, onChange, resources, buttonProps, clearButtonProps, ref, ...inputProps } = props;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const inputWrapperRef = useRef<HTMLLabelElement>(null);\n const { isHovered: isWrapperHovered } = usePseudoClasses(inputWrapperRef);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const { isHovered: isButtonHovered } = usePseudoClasses(buttonRef);\n const clearButtonRef = useRef<HTMLButtonElement>(null);\n const { isHovered: isClearButtonHovered } = usePseudoClasses(clearButtonRef);\n\n const isMobile = useIsMobileBreakpoint();\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources = {\n ...defaultResources,\n ...resources,\n };\n\n const inputHasValue = !!value;\n\n return (\n <div className={classNames(styles['filter-search__wrapper'], className)}>\n <label className={styles['filter-search__input-wrapper']} ref={inputWrapperRef}>\n <span className={styles['filter-search__input__label']}>{inputProps['aria-label'] ?? mergedResources.searchPlaceholder}</span>\n <input\n {...inputProps}\n ref={mergeRefs([inputRef, ref])}\n value={value}\n onChange={onChange}\n className={classNames(styles['filter-search__input'], {\n [styles['filter-search__input--hovered']]: isWrapperHovered,\n })}\n placeholder={mergedResources.searchPlaceholder}\n />\n </label>\n {inputHasValue && (\n <button\n type=\"button\"\n aria-label={mergedResources.searchClearButtonAriaLabel}\n disabled={inputProps.disabled}\n {...clearButtonProps}\n onClick={e => {\n clearButtonProps?.onClick?.(e);\n inputRef.current?.focus();\n }}\n ref={clearButtonRef}\n className={classNames(styles['filter-search__clear-button'], clearButtonProps?.className)}\n >\n <Icon svgIcon={X} size={IconSize.XXSmall} isHovered={!isMobile && isClearButtonHovered} />\n </button>\n )}\n <button\n type={'button'}\n aria-label={mergedResources.searchButtonAriaLabel}\n disabled={inputProps.disabled}\n {...buttonProps}\n ref={buttonRef}\n className={classNames(styles['filter-search__search-button'], buttonProps?.className)}\n >\n <div className={classNames(styles['filter-search__search-button--inner'])}>\n <Icon svgIcon={Search} size={isMobile ? IconSize.XXSmall : IconSize.XSmall} isHovered={!inputProps.disabled && isButtonHovered} />\n </div>\n </button>\n </div>\n );\n};\n\nexport default FilterSearch;\n"],"mappings":";;;;;;;;;;;;;;AAmCA,IAAM,gBAA4C,UAAS;CACzD,MAAM,EAAE,WAAW,OAAO,UAAU,WAAW,aAAa,kBAAkB,KAAK,GAAG,eAAe;CAErG,MAAM,WAAW,OAAyB,KAAK;CAC/C,MAAM,kBAAkB,OAAyB,KAAK;CACtD,MAAM,EAAE,WAAW,qBAAqB,iBAAiB,gBAAgB;CACzE,MAAM,YAAY,OAA0B,KAAK;CACjD,MAAM,EAAE,WAAW,oBAAoB,iBAAiB,UAAU;CAClE,MAAM,iBAAiB,OAA0B,KAAK;CACtD,MAAM,EAAE,WAAW,yBAAyB,iBAAiB,eAAe;CAE5E,MAAM,WAAW,uBAAuB;CAExC,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAG5E,MAAM,kBAAkB;EACtB,GAHuB,aAAa,SAGjC;EACH,GAAG;EACJ;CAED,MAAM,gBAAgB,CAAC,CAAC;CAExB,OACE,qBAAC,OAAD;EAAK,WAAW,WAAW,OAAO,2BAA2B,UAAU;YAAvE;GACE,qBAAC,SAAD;IAAO,WAAW,OAAO;IAAiC,KAAK;cAA/D,CACE,oBAAC,QAAD;KAAM,WAAW,OAAO;eAAiC,WAAW,iBAAiB,gBAAgB;KAAyB,CAAA,EAC9H,oBAAC,SAAD;KACE,GAAI;KACJ,KAAK,UAAU,CAAC,UAAU,IAAI,CAAC;KACxB;KACG;KACV,WAAW,WAAW,OAAO,yBAAyB,GACnD,OAAO,mCAAmC,kBAC5C,CAAC;KACF,aAAa,gBAAgB;KAC7B,CAAA,CACI;;GACP,iBACC,oBAAC,UAAD;IACE,MAAK;IACL,cAAY,gBAAgB;IAC5B,UAAU,WAAW;IACrB,GAAI;IACJ,UAAS,MAAK;KACZ,kBAAkB,UAAU,EAAE;KAC9B,SAAS,SAAS,OAAO;;IAE3B,KAAK;IACL,WAAW,WAAW,OAAO,gCAAgC,kBAAkB,UAAU;cAEzF,oBAAC,cAAD;KAAM,SAAS;KAAG,MAAM,SAAS;KAAS,WAAW,CAAC,YAAY;KAAwB,CAAA;IACnF,CAAA;GAEX,oBAAC,UAAD;IACE,MAAM;IACN,cAAY,gBAAgB;IAC5B,UAAU,WAAW;IACrB,GAAI;IACJ,KAAK;IACL,WAAW,WAAW,OAAO,iCAAiC,aAAa,UAAU;cAErF,oBAAC,OAAD;KAAK,WAAW,WAAW,OAAO,uCAAuC;eACvE,oBAAC,cAAD;MAAM,SAAS;MAAQ,MAAM,WAAW,SAAS,UAAU,SAAS;MAAQ,WAAW,CAAC,WAAW,YAAY;MAAmB,CAAA;KAC9H,CAAA;IACC,CAAA;GACL"}
package/lib/FilterSort.js CHANGED
@@ -1,10 +1,11 @@
1
- import { s as LanguageLocales } from "./constants2.js";
2
- import { n as useLanguage } from "./useLanguage.js";
3
- import { t as Label_default } from "./Label.js";
1
+ import { LanguageLocales } from "./constants.js";
2
+ import { useLanguage } from "./hooks/useLanguage.js";
3
+ import Label_default from "./components/Label/index.js";
4
4
  import { t as getResources } from "./resourceHelper.js";
5
5
  import { t as Select_default } from "./Select.js";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import styles from "./components/Filter/FilterSort/styles.module.scss";
8
+ //#region src/components/Filter/FilterSort/FilterSort.tsx
8
9
  var FilterSort = (props) => {
9
10
  const { children, resources } = props;
10
11
  const { language } = useLanguage(LanguageLocales.NORWEGIAN);
@@ -24,7 +25,10 @@ var FilterSort = (props) => {
24
25
  children
25
26
  });
26
27
  };
27
- var FilterSort_default$1 = FilterSort;
28
- export { FilterSort_default$1 as t };
28
+ //#endregion
29
+ //#region src/components/Filter/FilterSort/index.ts
30
+ var FilterSort_default = FilterSort;
31
+ //#endregion
32
+ export { FilterSort_default as t };
29
33
 
30
34
  //# sourceMappingURL=FilterSort.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterSort.js","names":["FilterSort: React.FC<FilterSortProps>"],"sources":["../src/components/Filter/FilterSort/FilterSort.tsx","../src/components/Filter/FilterSort/index.ts"],"sourcesContent":["import type { HNDesignsystemFilter } from '../../../resources/Resources';\n\nimport { LanguageLocales } from '../../../constants';\nimport { useLanguage } from '../../../hooks/useLanguage';\nimport Label from '../../Label';\nimport Select, { type SelectProps } from '../../Select';\nimport { getResources } from '../resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport interface FilterSortProps extends SelectProps {\n /** Texts if overriding SOT */\n resources?: Partial<HNDesignsystemFilter>;\n}\n\nconst FilterSort: React.FC<FilterSortProps> = props => {\n const { children, resources } = props;\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources = {\n ...defaultResources,\n ...resources,\n };\n\n return (\n <Select\n {...props}\n label={<Label labelTexts={[{ text: `${mergedResources.sortLabel}:`, type: 'subdued' }]} />}\n labelClassName={styles['select__label']}\n className={styles['select']}\n wrapperClassName={styles['select__wrapper']}\n >\n {children}\n </Select>\n );\n};\n\nexport default FilterSort;\n","import FilterSort from './FilterSort';\nexport * from './FilterSort';\nexport default FilterSort;\n"],"mappings":";;;;;;;AAeA,IAAMA,cAAwC,UAAS;CACrD,MAAM,EAAE,UAAU,cAAc;CAEhC,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAG5E,MAAM,kBAAkB;EACtB,GAHuB,aAAa,SAAS;EAI7C,GAAG;EACJ;AAED,QACE,oBAAC,gBAAA;EACC,GAAI;EACJ,OAAO,oBAAC,eAAA,EAAM,YAAY,CAAC;GAAE,MAAM,GAAG,gBAAgB,UAAU;GAAI,MAAM;GAAW,CAAC,EAAA,CAAI;EAC1F,gBAAgB,OAAO;EACvB,WAAW,OAAO;EAClB,kBAAkB,OAAO;EAExB;GACM;;ACjCb,IAAA,uBDqCe"}
1
+ {"version":3,"file":"FilterSort.js","names":[],"sources":["../src/components/Filter/FilterSort/FilterSort.tsx","../src/components/Filter/FilterSort/index.ts"],"sourcesContent":["import type { HNDesignsystemFilter } from '../../../resources/Resources';\n\nimport { LanguageLocales } from '../../../constants';\nimport { useLanguage } from '../../../hooks/useLanguage';\nimport Label from '../../Label';\nimport Select, { type SelectProps } from '../../Select';\nimport { getResources } from '../resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport interface FilterSortProps extends SelectProps {\n /** Texts if overriding SOT */\n resources?: Partial<HNDesignsystemFilter>;\n}\n\nconst FilterSort: React.FC<FilterSortProps> = props => {\n const { children, resources } = props;\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources = {\n ...defaultResources,\n ...resources,\n };\n\n return (\n <Select\n {...props}\n label={<Label labelTexts={[{ text: `${mergedResources.sortLabel}:`, type: 'subdued' }]} />}\n labelClassName={styles['select__label']}\n className={styles['select']}\n wrapperClassName={styles['select__wrapper']}\n >\n {children}\n </Select>\n );\n};\n\nexport default FilterSort;\n","import FilterSort from './FilterSort';\nexport * from './FilterSort';\nexport default FilterSort;\n"],"mappings":";;;;;;;;AAeA,IAAM,cAAwC,UAAS;CACrD,MAAM,EAAE,UAAU,cAAc;CAEhC,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAG5E,MAAM,kBAAkB;EACtB,GAHuB,aAAa,SAGjC;EACH,GAAG;EACJ;CAED,OACE,oBAAC,gBAAD;EACE,GAAI;EACJ,OAAO,oBAAC,eAAD,EAAO,YAAY,CAAC;GAAE,MAAM,GAAG,gBAAgB,UAAU;GAAI,MAAM;GAAW,CAAC,EAAI,CAAA;EAC1F,gBAAgB,OAAO;EACvB,WAAW,OAAO;EAClB,kBAAkB,OAAO;EAExB;EACM,CAAA;;;;ACjCb,IAAA,qBAAe"}
@@ -1,5 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import styles from "./components/Filter/FilterStateWrapper/styles.module.scss";
3
+ //#region src/components/Filter/FilterStateWrapper/FilterStateWrapper.tsx
3
4
  var FilterStateWrapper = ({ children, testId }) => {
4
5
  return /* @__PURE__ */ jsx("div", {
5
6
  className: styles["filter-state-wrapper"],
@@ -7,7 +8,10 @@ var FilterStateWrapper = ({ children, testId }) => {
7
8
  children
8
9
  });
9
10
  };
10
- var FilterStateWrapper_default$1 = FilterStateWrapper;
11
- export { FilterStateWrapper_default$1 as t };
11
+ //#endregion
12
+ //#region src/components/Filter/FilterStateWrapper/index.ts
13
+ var FilterStateWrapper_default = FilterStateWrapper;
14
+ //#endregion
15
+ export { FilterStateWrapper_default as t };
12
16
 
13
17
  //# sourceMappingURL=FilterStateWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterStateWrapper.js","names":["FilterStateWrapper: React.FC<FilterStateWrapperProps>"],"sources":["../src/components/Filter/FilterStateWrapper/FilterStateWrapper.tsx","../src/components/Filter/FilterStateWrapper/index.ts"],"sourcesContent":["import type React from 'react';\n\nimport styles from './styles.module.scss';\n\nexport interface FilterStateWrapperProps {\n /** Content to be rendered inside the wrapper */\n children: React.ReactNode;\n /** test id that is placed on the wrapper */\n testId?: string;\n}\n\nconst FilterStateWrapper: React.FC<FilterStateWrapperProps> = ({ children, testId }) => {\n return (\n <div className={styles['filter-state-wrapper']} data-testid={testId}>\n {children}\n </div>\n );\n};\n\nexport default FilterStateWrapper;\n","import FilterStateWrapper from './FilterStateWrapper';\nexport * from './FilterStateWrapper';\nexport default FilterStateWrapper;\n"],"mappings":";;AAWA,IAAMA,sBAAyD,EAAE,UAAU,aAAa;AACtF,QACE,oBAAC,OAAA;EAAI,WAAW,OAAO;EAAyB,eAAa;EAC1D;GACG;;ACbV,IAAA,+BDiBe"}
1
+ {"version":3,"file":"FilterStateWrapper.js","names":[],"sources":["../src/components/Filter/FilterStateWrapper/FilterStateWrapper.tsx","../src/components/Filter/FilterStateWrapper/index.ts"],"sourcesContent":["import type React from 'react';\n\nimport styles from './styles.module.scss';\n\nexport interface FilterStateWrapperProps {\n /** Content to be rendered inside the wrapper */\n children: React.ReactNode;\n /** test id that is placed on the wrapper */\n testId?: string;\n}\n\nconst FilterStateWrapper: React.FC<FilterStateWrapperProps> = ({ children, testId }) => {\n return (\n <div className={styles['filter-state-wrapper']} data-testid={testId}>\n {children}\n </div>\n );\n};\n\nexport default FilterStateWrapper;\n","import FilterStateWrapper from './FilterStateWrapper';\nexport * from './FilterStateWrapper';\nexport default FilterStateWrapper;\n"],"mappings":";;;AAWA,IAAM,sBAAyD,EAAE,UAAU,aAAa;CACtF,OACE,oBAAC,OAAD;EAAK,WAAW,OAAO;EAAyB,eAAa;EAC1D;EACG,CAAA;;;;ACbV,IAAA,6BAAe"}
@@ -1,5 +1,5 @@
1
- import { n as AnalyticsId, s as LanguageLocales } from "./constants2.js";
2
- import { n as useLanguage } from "./useLanguage.js";
1
+ import { AnalyticsId, LanguageLocales } from "./constants.js";
2
+ import { useLanguage } from "./hooks/useLanguage.js";
3
3
  import classNames from "classnames";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import styles from "./components/FormFieldTag/styles.module.scss";
@@ -39,7 +39,9 @@ var HN_Designsystem_FormFieldTag_se_NO_default = {
39
39
  requiredCheckboxList: "Vállje ovtta dahje máŋga",
40
40
  requiredSingleCheckbox: "Ferte válljejuvvot"
41
41
  };
42
- const getResources = (language) => {
42
+ //#endregion
43
+ //#region src/components/FormFieldTag/resourceHelper.ts
44
+ var getResources = (language) => {
43
45
  switch (language) {
44
46
  case LanguageLocales.ENGLISH: return HN_Designsystem_FormFieldTag_en_GB_default;
45
47
  case LanguageLocales.NORWEGIAN_NYNORSK: return HN_Designsystem_FormFieldTag_nn_NO_default;
@@ -48,6 +50,8 @@ const getResources = (language) => {
48
50
  default: return HN_Designsystem_FormFieldTag_nb_NO_default;
49
51
  }
50
52
  };
53
+ //#endregion
54
+ //#region src/components/FormFieldTag/FormFieldTag.tsx
51
55
  var FormFieldTag = (props) => {
52
56
  const { id, level, resources, testId } = props;
53
57
  const isOptional = level === "optional" || level === "all-optional";
@@ -73,7 +77,10 @@ var FormFieldTag = (props) => {
73
77
  children: textMap[level]
74
78
  });
75
79
  };
76
- var FormFieldTag_default$1 = FormFieldTag;
77
- export { FormFieldTag_default$1 as t };
80
+ //#endregion
81
+ //#region src/components/FormFieldTag/index.ts
82
+ var FormFieldTag_default = FormFieldTag;
83
+ //#endregion
84
+ export { FormFieldTag_default as t };
78
85
 
79
86
  //# sourceMappingURL=FormFieldTag.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldTag.js","names":["FormFieldTag: React.FC<FormFieldTagProps>","mergedResources: HNDesignsystemFormFieldTag"],"sources":["../src/resources/HN.Designsystem.FormFieldTag.en-GB.json","../src/resources/HN.Designsystem.FormFieldTag.nb-NO.json","../src/resources/HN.Designsystem.FormFieldTag.nn-NO.json","../src/resources/HN.Designsystem.FormFieldTag.se-NO.json","../src/components/FormFieldTag/resourceHelper.ts","../src/components/FormFieldTag/FormFieldTag.tsx","../src/components/FormFieldTag/index.ts"],"sourcesContent":["{\n \"allRequired\": \"All fields must be filled out\",\n \"requiredField\": \"Required\",\n \"optional\": \"Optional\",\n \"allOptional\": \"All fields are optional\",\n \"requiredRadiobuttonList\": \"Select one\",\n \"requiredCheckboxList\": \"Select one or more\",\n \"requiredSingleCheckbox\": \"Must be selected\"\n}\n","{\n \"allRequired\": \"Alle felt må fylles ut\",\n \"requiredField\": \"Må fylles ut\",\n \"optional\": \"Valgfritt\",\n \"allOptional\": \"Alle felt er valgfrie\",\n \"requiredRadiobuttonList\": \"Velg én\",\n \"requiredCheckboxList\": \"Velg én eller flere\",\n \"requiredSingleCheckbox\": \"Må velges\"\n}\n","{\n \"allRequired\": \"Alle felt må fyllast ut\",\n \"requiredField\": \"Må fyllast ut\",\n \"optional\": \"Valfritt\",\n \"allOptional\": \"Alle felt er valfrie\",\n \"requiredRadiobuttonList\": \"Vel éin\",\n \"requiredCheckboxList\": \"Vel éin eller fleire\",\n \"requiredSingleCheckbox\": \"Må veljast\"\n}\n","{\n \"allRequired\": \"Buot sajiid ferte deavdit\",\n \"requiredField\": \"Ferte devdojuvvot\",\n \"optional\": \"Válljenláhkái\",\n \"allOptional\": \"Buot sajit eat válljenláhkái\",\n \"requiredRadiobuttonList\": \"Vállje ovtta\",\n \"requiredCheckboxList\": \"Vállje ovtta dahje máŋga\",\n \"requiredSingleCheckbox\": \"Ferte válljejuvvot\"\n}\n","import type { HNDesignsystemFormFieldTag } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.FormFieldTag.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.FormFieldTag.nb-NO.json';\nimport nnNO from '../../resources/HN.Designsystem.FormFieldTag.nn-NO.json';\nimport seNO from '../../resources/HN.Designsystem.FormFieldTag.se-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemFormFieldTag => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN_NYNORSK:\n return nnNO;\n case LanguageLocales.SAMI_NORTHERN:\n return seNO;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import classNames from 'classnames';\n\nimport type { HNDesignsystemFormFieldTag } from '../../resources/Resources';\n\nimport { getResources } from './resourceHelper';\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { useLanguage } from '../../hooks/useLanguage';\n\nimport styles from './styles.module.scss';\n\nexport type FormFieldTagLevel =\n | 'all-required'\n | 'required-field'\n | 'optional'\n | 'all-optional'\n | 'required-radiobutton-list'\n | 'required-checkbox-list'\n | 'required-single-checkbox';\n\nexport interface FormFieldTagProps {\n /** Id that is placed on the component */\n id?: string;\n /** What level is the required tag, sets the styling and the text. */\n level: FormFieldTagLevel;\n /** Texts if overriding SOT */\n resources?: Partial<HNDesignsystemFormFieldTag>;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst FormFieldTag: React.FC<FormFieldTagProps> = props => {\n const { id, level, resources, testId } = props;\n const isOptional = level === 'optional' || level === 'all-optional';\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemFormFieldTag = {\n ...defaultResources,\n ...resources,\n };\n\n const textMap = {\n 'all-required': mergedResources.allRequired,\n 'required-field': mergedResources.requiredField,\n optional: mergedResources.optional,\n 'all-optional': mergedResources.allOptional,\n 'required-radiobutton-list': mergedResources.requiredRadiobuttonList,\n 'required-checkbox-list': mergedResources.requiredCheckboxList,\n 'required-single-checkbox': mergedResources.requiredSingleCheckbox,\n };\n\n return (\n <span\n id={id}\n data-testid={testId}\n data-analyticsid={AnalyticsId.FormFieldTag}\n className={classNames(styles['form-field-tag'], { [styles['form-field-tag--optional']]: isOptional })}\n >\n {textMap[level]}\n </span>\n );\n};\n\nexport default FormFieldTag;\n","import FormFieldTag from './FormFieldTag';\nexport * from './FormFieldTag';\nexport default FormFieldTag;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AIQA,MAAa,gBAAgB,aAA0D;AACrF,SAAQ,UAAR;EACE,KAAK,gBAAgB,QACnB,QAAO;EACT,KAAK,gBAAgB,kBACnB,QAAO;EACT,KAAK,gBAAgB,cACnB,QAAO;EACT,KAAK,gBAAgB;EACrB,QACE,QAAO;;;ACYb,IAAMA,gBAA4C,UAAS;CACzD,MAAM,EAAE,IAAI,OAAO,WAAW,WAAW;CACzC,MAAM,aAAa,UAAU,cAAc,UAAU;CAErD,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAG5E,MAAMC,kBAA8C;EAClD,GAHuB,aAAa,SAAS;EAI7C,GAAG;EACJ;CAED,MAAM,UAAU;EACd,gBAAgB,gBAAgB;EAChC,kBAAkB,gBAAgB;EAClC,UAAU,gBAAgB;EAC1B,gBAAgB,gBAAgB;EAChC,6BAA6B,gBAAgB;EAC7C,0BAA0B,gBAAgB;EAC1C,4BAA4B,gBAAgB;EAC7C;AAED,QACE,oBAAC,QAAA;EACK;EACJ,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW,WAAW,OAAO,mBAAmB,GAAG,OAAO,8BAA8B,YAAY,CAAC;YAEpG,QAAQ;GACJ;;AC1DX,IAAA,yBD8De"}
1
+ {"version":3,"file":"FormFieldTag.js","names":[],"sources":["../src/resources/HN.Designsystem.FormFieldTag.en-GB.json","../src/resources/HN.Designsystem.FormFieldTag.nb-NO.json","../src/resources/HN.Designsystem.FormFieldTag.nn-NO.json","../src/resources/HN.Designsystem.FormFieldTag.se-NO.json","../src/components/FormFieldTag/resourceHelper.ts","../src/components/FormFieldTag/FormFieldTag.tsx","../src/components/FormFieldTag/index.ts"],"sourcesContent":["{\n \"allRequired\": \"All fields must be filled out\",\n \"requiredField\": \"Required\",\n \"optional\": \"Optional\",\n \"allOptional\": \"All fields are optional\",\n \"requiredRadiobuttonList\": \"Select one\",\n \"requiredCheckboxList\": \"Select one or more\",\n \"requiredSingleCheckbox\": \"Must be selected\"\n}\n","{\n \"allRequired\": \"Alle felt må fylles ut\",\n \"requiredField\": \"Må fylles ut\",\n \"optional\": \"Valgfritt\",\n \"allOptional\": \"Alle felt er valgfrie\",\n \"requiredRadiobuttonList\": \"Velg én\",\n \"requiredCheckboxList\": \"Velg én eller flere\",\n \"requiredSingleCheckbox\": \"Må velges\"\n}\n","{\n \"allRequired\": \"Alle felt må fyllast ut\",\n \"requiredField\": \"Må fyllast ut\",\n \"optional\": \"Valfritt\",\n \"allOptional\": \"Alle felt er valfrie\",\n \"requiredRadiobuttonList\": \"Vel éin\",\n \"requiredCheckboxList\": \"Vel éin eller fleire\",\n \"requiredSingleCheckbox\": \"Må veljast\"\n}\n","{\n \"allRequired\": \"Buot sajiid ferte deavdit\",\n \"requiredField\": \"Ferte devdojuvvot\",\n \"optional\": \"Válljenláhkái\",\n \"allOptional\": \"Buot sajit eat válljenláhkái\",\n \"requiredRadiobuttonList\": \"Vállje ovtta\",\n \"requiredCheckboxList\": \"Vállje ovtta dahje máŋga\",\n \"requiredSingleCheckbox\": \"Ferte válljejuvvot\"\n}\n","import type { HNDesignsystemFormFieldTag } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.FormFieldTag.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.FormFieldTag.nb-NO.json';\nimport nnNO from '../../resources/HN.Designsystem.FormFieldTag.nn-NO.json';\nimport seNO from '../../resources/HN.Designsystem.FormFieldTag.se-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemFormFieldTag => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN_NYNORSK:\n return nnNO;\n case LanguageLocales.SAMI_NORTHERN:\n return seNO;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import classNames from 'classnames';\n\nimport type { HNDesignsystemFormFieldTag } from '../../resources/Resources';\n\nimport { getResources } from './resourceHelper';\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { useLanguage } from '../../hooks/useLanguage';\n\nimport styles from './styles.module.scss';\n\nexport type FormFieldTagLevel =\n | 'all-required'\n | 'required-field'\n | 'optional'\n | 'all-optional'\n | 'required-radiobutton-list'\n | 'required-checkbox-list'\n | 'required-single-checkbox';\n\nexport interface FormFieldTagProps {\n /** Id that is placed on the component */\n id?: string;\n /** What level is the required tag, sets the styling and the text. */\n level: FormFieldTagLevel;\n /** Texts if overriding SOT */\n resources?: Partial<HNDesignsystemFormFieldTag>;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst FormFieldTag: React.FC<FormFieldTagProps> = props => {\n const { id, level, resources, testId } = props;\n const isOptional = level === 'optional' || level === 'all-optional';\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemFormFieldTag = {\n ...defaultResources,\n ...resources,\n };\n\n const textMap = {\n 'all-required': mergedResources.allRequired,\n 'required-field': mergedResources.requiredField,\n optional: mergedResources.optional,\n 'all-optional': mergedResources.allOptional,\n 'required-radiobutton-list': mergedResources.requiredRadiobuttonList,\n 'required-checkbox-list': mergedResources.requiredCheckboxList,\n 'required-single-checkbox': mergedResources.requiredSingleCheckbox,\n };\n\n return (\n <span\n id={id}\n data-testid={testId}\n data-analyticsid={AnalyticsId.FormFieldTag}\n className={classNames(styles['form-field-tag'], { [styles['form-field-tag--optional']]: isOptional })}\n >\n {textMap[level]}\n </span>\n );\n};\n\nexport default FormFieldTag;\n","import FormFieldTag from './FormFieldTag';\nexport * from './FormFieldTag';\nexport default FormFieldTag;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AIQA,IAAa,gBAAgB,aAA0D;CACrF,QAAQ,UAAR;EACE,KAAK,gBAAgB,SACnB,OAAO;EACT,KAAK,gBAAgB,mBACnB,OAAO;EACT,KAAK,gBAAgB,eACnB,OAAO;EACT,KAAK,gBAAgB;EACrB,SACE,OAAO;;;;;ACYb,IAAM,gBAA4C,UAAS;CACzD,MAAM,EAAE,IAAI,OAAO,WAAW,WAAW;CACzC,MAAM,aAAa,UAAU,cAAc,UAAU;CAErD,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAG5E,MAAM,kBAA8C;EAClD,GAHuB,aAAa,SAGjC;EACH,GAAG;EACJ;CAED,MAAM,UAAU;EACd,gBAAgB,gBAAgB;EAChC,kBAAkB,gBAAgB;EAClC,UAAU,gBAAgB;EAC1B,gBAAgB,gBAAgB;EAChC,6BAA6B,gBAAgB;EAC7C,0BAA0B,gBAAgB;EAC1C,4BAA4B,gBAAgB;EAC7C;CAED,OACE,oBAAC,QAAD;EACM;EACJ,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW,WAAW,OAAO,mBAAmB,GAAG,OAAO,8BAA8B,YAAY,CAAC;YAEpG,QAAQ;EACJ,CAAA;;;;AC1DX,IAAA,uBAAe"}
package/lib/FormGroup.js CHANGED
@@ -1,21 +1,22 @@
1
- import { i as FormSize, n as AnalyticsId, r as FormOnColor } from "./constants2.js";
2
- import { t as isComponent } from "./component.js";
3
- import { t as useIdWithFallback } from "./useIdWithFallback.js";
1
+ import { AnalyticsId, FormOnColor, FormSize } from "./constants.js";
2
+ import { isComponent } from "./utils/component.js";
3
+ import { useIdWithFallback } from "./hooks/useIdWithFallback.js";
4
4
  import { t as ErrorWrapper_default } from "./ErrorWrapper.js";
5
5
  import { t as FormFieldTag_default } from "./FormFieldTag.js";
6
- import { n as Checkbox_default } from "./Checkbox.js";
7
- import { t as Title_default } from "./Title2.js";
6
+ import { t as Checkbox } from "./Checkbox.js";
7
+ import Title_default from "./components/Title/index.js";
8
8
  import { t as Select_default } from "./Select.js";
9
9
  import { t as FormLayout_default } from "./FormLayout.js";
10
- import { t as Input_default } from "./Input.js";
11
- import { r as RadioButton_default, t as getRadioLabelClasses } from "./utils3.js";
10
+ import { t as Input } from "./Input.js";
11
+ import { n as RadioButton, t as getRadioLabelClasses } from "./utils3.js";
12
12
  import { t as Slider_default } from "./Slider.js";
13
13
  import { t as Textarea_default } from "./Textarea.js";
14
14
  import classNames from "classnames";
15
15
  import React, { useId, useState } from "react";
16
16
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
17
  import formGroupStyles from "./components/FormGroup/styles.module.scss";
18
- const FormGroup = (props) => {
18
+ //#region src/components/FormGroup/FormGroup.tsx
19
+ var FormGroup = (props) => {
19
20
  const { ariaLabelledBy, className, errorTextId: errorTextIdProp, fieldsetClassName, formFieldTag, legendClassName, onColor = FormOnColor.onwhite, size = FormSize.medium, error, name, htmlMarkup = "fieldset", renderError = true, errorWrapperClassName, errorWrapperTestId, errorMessageRef, legendHtmlMarkup = "h5", titleHtmlMarkup = "h4" } = props;
20
21
  const [checkedRadioId, setCheckedRadioId] = useState();
21
22
  const radioGroupId = useId();
@@ -39,14 +40,14 @@ const FormGroup = (props) => {
39
40
  renderError: false,
40
41
  errorTextId
41
42
  });
42
- else if (isComponent(child, Checkbox_default)) return React.cloneElement(child, {
43
+ else if (isComponent(child, Checkbox)) return React.cloneElement(child, {
43
44
  name: name ?? child.props.name,
44
45
  onColor,
45
46
  size,
46
47
  error: !!error,
47
48
  errorTextId
48
49
  });
49
- else if (isComponent(child, RadioButton_default)) {
50
+ else if (isComponent(child, RadioButton)) {
50
51
  const radioId = typeof child.props.inputId === "undefined" ? radioGroupId + index : child.props.inputId;
51
52
  return React.cloneElement(child, {
52
53
  inputId: radioId,
@@ -61,7 +62,7 @@ const FormGroup = (props) => {
61
62
  errorTextId,
62
63
  labelClassNames: getRadioLabelClasses(radioId, onColor, isLarge, checkedRadioId)
63
64
  });
64
- } else if (isComponent(child, Input_default)) return React.cloneElement(child, {
65
+ } else if (isComponent(child, Input)) return React.cloneElement(child, {
65
66
  name: name ?? child.props.name,
66
67
  onColor,
67
68
  size,
@@ -129,7 +130,7 @@ const FormGroup = (props) => {
129
130
  });
130
131
  };
131
132
  FormGroup.displayName = "FormGroup";
132
- var FormGroup_default = FormGroup;
133
- export { FormGroup_default as n, FormGroup as t };
133
+ //#endregion
134
+ export { FormGroup as t };
134
135
 
135
136
  //# sourceMappingURL=FormGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormGroup.js","names":["FormGroup: React.FC<FormGroupProps>"],"sources":["../src/components/FormGroup/FormGroup.tsx"],"sourcesContent":["import React, { useId, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { CheckboxProps } from '../Checkbox/Checkbox';\nimport type { FormFieldTagProps } from '../FormFieldTag';\nimport type { FormLayoutProps } from '../FormLayout';\nimport type { InputProps } from '../Input/Input';\nimport type { RadioButtonProps } from '../RadioButton/RadioButton';\nimport type { SelectProps } from '../Select';\nimport type { SliderProps } from '../Slider';\nimport type { TextareaProps } from '../Textarea';\n\nimport { AnalyticsId, FormOnColor, FormSize } from '../../constants';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { isComponent } from '../../utils/component';\nimport Checkbox from '../Checkbox/Checkbox';\nimport ErrorWrapper from '../ErrorWrapper';\nimport FormFieldTag from '../FormFieldTag';\nimport FormLayout from '../FormLayout';\nimport Input from '../Input/Input';\nimport RadioButton from '../RadioButton/RadioButton';\nimport { getRadioLabelClasses } from '../RadioButton/utils';\nimport Select from '../Select';\nimport Slider from '../Slider';\nimport Textarea from '../Textarea';\nimport Title, { type TitleTags } from '../Title';\n\nimport formGroupStyles from './styles.module.scss';\n\nexport type FormGroupTags = 'fieldset' | 'div';\n\nexport interface FormGroupProps {\n /** Can be used as a replacement text for legend in cases where the group title already exists externally */\n ariaLabelledBy?: string;\n /** title for the the fieldset */\n title?: string;\n /** text placed in the legend tag of the fieldset */\n legend?: string;\n /** Items in the FormGroup component */\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the errorWrapper. */\n errorWrapperClassName?: string;\n /** Adds custom classes to the fieldset element. */\n fieldsetClassName?: string;\n /** Sets a tag that describes whether the form group is required or optional */\n formFieldTag?: React.ReactNode;\n /** Adds custom classes to the legend element. */\n legendClassName?: string;\n /** Changes the visuals of the formgroup */\n onColor?: keyof typeof FormOnColor;\n /** Changes the visuals of the formgroup */\n size?: keyof typeof FormSize;\n /** Error message */\n error?: string;\n /** Error text id */\n errorTextId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the data-testid attribute for the error-wrapper. */\n errorWrapperTestId?: string;\n /** Unique name for the child input element */\n name?: string;\n /** Unique name for the fieldset */\n fieldsetName?: string;\n /** Sets div instead of fieldset tag */\n htmlMarkup?: FormGroupTags;\n /** Markup for legend if formgroup htmlMarkup is div*/\n legendHtmlMarkup?: TitleTags;\n /** Markup for title */\n titleHtmlMarkup?: TitleTags;\n /** Renders the error component (Default: true) */\n renderError?: boolean;\n /** Ref passed to the error message element */\n errorMessageRef?: React.Ref<HTMLDivElement | null>;\n}\n\nexport const FormGroup: React.FC<FormGroupProps> = (props: FormGroupProps) => {\n const {\n ariaLabelledBy,\n className,\n errorTextId: errorTextIdProp,\n fieldsetClassName,\n formFieldTag,\n legendClassName,\n onColor = FormOnColor.onwhite,\n size = FormSize.medium,\n error,\n name,\n htmlMarkup = 'fieldset',\n renderError = true,\n errorWrapperClassName,\n errorWrapperTestId,\n errorMessageRef,\n legendHtmlMarkup = 'h5',\n titleHtmlMarkup = 'h4',\n } = props;\n const [checkedRadioId, setCheckedRadioId] = useState<string>();\n const radioGroupId = useId();\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const onDark = onColor === FormOnColor.ondark;\n const isLarge = size === FormSize.large;\n const formGroupWrapperClasses = classNames(formGroupStyles['form-group-wrapper'], className);\n const titleClasses = classNames({\n [formGroupStyles['form-group-wrapper__title--on-dark']]: onDark && !error,\n });\n\n const CustomTagForLegend = legendHtmlMarkup;\n\n const legendClasses = classNames(\n formGroupStyles['field-set__legend'],\n {\n [formGroupStyles['field-set__legend--on-dark']]: onDark && !error,\n },\n legendClassName\n );\n\n const fieldsetClasses = classNames(formGroupStyles['field-set'], fieldsetClassName);\n\n const mapFormComponent = (child: React.ReactNode, index: number): React.ReactNode => {\n if (isComponent<FormLayoutProps>(child, FormLayout)) {\n return React.cloneElement(child, {\n size,\n mapHelper: mapFormComponent,\n });\n } else if (isComponent<FormGroupProps>(child, FormGroup)) {\n return React.cloneElement(child, {\n onColor,\n size,\n error,\n renderError: false,\n errorTextId: errorTextId,\n });\n } else if (isComponent<CheckboxProps>(child, Checkbox)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n onColor,\n size,\n error: !!error,\n errorTextId: errorTextId,\n });\n } else if (isComponent<RadioButtonProps>(child, RadioButton)) {\n const radioId = typeof child.props.inputId === 'undefined' ? radioGroupId + index : child.props.inputId;\n return React.cloneElement(child, {\n inputId: radioId,\n name: name ?? child.props.name,\n onColor,\n size,\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => {\n setCheckedRadioId(event.target.id);\n if (child.props.onChange) child.props.onChange(event);\n },\n error: !!error,\n errorTextId: errorTextId,\n labelClassNames: getRadioLabelClasses(radioId, onColor as FormOnColor, isLarge, checkedRadioId),\n });\n } else if (isComponent<InputProps>(child, Input)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n onColor,\n size,\n error: !!error,\n errorTextId: errorTextId,\n });\n } else if (isComponent<TextareaProps>(child, Textarea)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n onColor,\n error: !!error,\n errorTextId: errorTextId,\n });\n } else if (isComponent<SelectProps>(child, Select)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n onColor,\n error: !!error,\n errorTextId: errorTextId,\n });\n } else if (isComponent<SliderProps>(child, Slider)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n error: !!error,\n errorTextId: errorTextId,\n });\n }\n return child;\n };\n\n const formGroupContent = (): React.ReactNode => {\n return (\n <div>\n {htmlMarkup === 'div' && (\n <div className={fieldsetClasses}>\n {props.legend && (\n <>\n <CustomTagForLegend className={legendClasses}>\n {props.legend}\n {formFieldTag && isComponent<FormFieldTagProps>(formFieldTag, FormFieldTag) && React.cloneElement(formFieldTag)}\n </CustomTagForLegend>\n </>\n )}\n {React.Children.map(props.children, mapFormComponent)}\n </div>\n )}\n {htmlMarkup === 'fieldset' && (\n <fieldset aria-labelledby={ariaLabelledBy} name={props.fieldsetName} className={fieldsetClasses}>\n {props.legend && (\n <>\n <legend className={legendClasses}>\n {props.legend}\n {formFieldTag && isComponent<FormFieldTagProps>(formFieldTag, FormFieldTag) && React.cloneElement(formFieldTag)}\n </legend>\n </>\n )}\n {React.Children.map(props.children, mapFormComponent)}\n </fieldset>\n )}\n </div>\n );\n };\n\n return (\n <div data-testid={props.testId} data-analyticsid={AnalyticsId.FormGroup} className={formGroupWrapperClasses}>\n {props.title && (\n <Title\n className={titleClasses}\n htmlMarkup={titleHtmlMarkup}\n appearance={'title4'}\n margin={{ marginTop: 0, marginBottom: error ? 1 : 2 }}\n >\n {props.title}\n </Title>\n )}\n <ErrorWrapper\n className={errorWrapperClassName}\n errorText={error}\n testId={errorWrapperTestId}\n errorTextId={errorTextId}\n errorMessageRef={errorMessageRef}\n renderError={renderError}\n >\n {formGroupContent()}\n </ErrorWrapper>\n </div>\n );\n};\n\nFormGroup.displayName = 'FormGroup';\n\nexport default FormGroup;\n"],"mappings":";;;;;;;;;;;;;;;;;AA+EA,MAAaA,aAAuC,UAA0B;CAC5E,MAAM,EACJ,gBACA,WACA,aAAa,iBACb,mBACA,cACA,iBACA,UAAU,YAAY,SACtB,OAAO,SAAS,QAChB,OACA,MACA,aAAa,YACb,cAAc,MACd,uBACA,oBACA,iBACA,mBAAmB,MACnB,kBAAkB,SAChB;CACJ,MAAM,CAAC,gBAAgB,qBAAqB,UAAkB;CAC9D,MAAM,eAAe,OAAO;CAC5B,MAAM,cAAc,kBAAkB,gBAAgB;CACtD,MAAM,SAAS,YAAY,YAAY;CACvC,MAAM,UAAU,SAAS,SAAS;CAClC,MAAM,0BAA0B,WAAW,gBAAgB,uBAAuB,UAAU;CAC5F,MAAM,eAAe,WAAW,GAC7B,gBAAgB,wCAAwC,UAAU,CAAC,OACrE,CAAC;CAEF,MAAM,qBAAqB;CAE3B,MAAM,gBAAgB,WACpB,gBAAgB,sBAChB,GACG,gBAAgB,gCAAgC,UAAU,CAAC,OAC7D,EACD,gBACD;CAED,MAAM,kBAAkB,WAAW,gBAAgB,cAAc,kBAAkB;CAEnF,MAAM,oBAAoB,OAAwB,UAAmC;AACnF,MAAI,YAA6B,OAAO,mBAAW,CACjD,QAAO,MAAM,aAAa,OAAO;GAC/B;GACA,WAAW;GACZ,CAAC;WACO,YAA4B,OAAO,UAAU,CACtD,QAAO,MAAM,aAAa,OAAO;GAC/B;GACA;GACA;GACA,aAAa;GACA;GACd,CAAC;WACO,YAA2B,OAAO,iBAAS,CACpD,QAAO,MAAM,aAAa,OAAO;GAC/B,MAAM,QAAQ,MAAM,MAAM;GAC1B;GACA;GACA,OAAO,CAAC,CAAC;GACI;GACd,CAAC;WACO,YAA8B,OAAO,oBAAY,EAAE;GAC5D,MAAM,UAAU,OAAO,MAAM,MAAM,YAAY,cAAc,eAAe,QAAQ,MAAM,MAAM;AAChG,UAAO,MAAM,aAAa,OAAO;IAC/B,SAAS;IACT,MAAM,QAAQ,MAAM,MAAM;IAC1B;IACA;IACA,WAAW,UAA+C;AACxD,uBAAkB,MAAM,OAAO,GAAG;AAClC,SAAI,MAAM,MAAM,SAAU,OAAM,MAAM,SAAS,MAAM;;IAEvD,OAAO,CAAC,CAAC;IACI;IACb,iBAAiB,qBAAqB,SAAS,SAAwB,SAAS,eAAe;IAChG,CAAC;aACO,YAAwB,OAAO,cAAM,CAC9C,QAAO,MAAM,aAAa,OAAO;GAC/B,MAAM,QAAQ,MAAM,MAAM;GAC1B;GACA;GACA,OAAO,CAAC,CAAC;GACI;GACd,CAAC;WACO,YAA2B,OAAO,iBAAS,CACpD,QAAO,MAAM,aAAa,OAAO;GAC/B,MAAM,QAAQ,MAAM,MAAM;GAC1B;GACA,OAAO,CAAC,CAAC;GACI;GACd,CAAC;WACO,YAAyB,OAAO,eAAO,CAChD,QAAO,MAAM,aAAa,OAAO;GAC/B,MAAM,QAAQ,MAAM,MAAM;GAC1B;GACA,OAAO,CAAC,CAAC;GACI;GACd,CAAC;WACO,YAAyB,OAAO,eAAO,CAChD,QAAO,MAAM,aAAa,OAAO;GAC/B,MAAM,QAAQ,MAAM,MAAM;GAC1B,OAAO,CAAC,CAAC;GACI;GACd,CAAC;AAEJ,SAAO;;CAGT,MAAM,yBAA0C;AAC9C,SACE,qBAAC,OAAA,EAAA,UAAA,CACE,eAAe,SACd,qBAAC,OAAA;GAAI,WAAW;cACb,MAAM,UACL,oBAAA,UAAA,EAAA,UACE,qBAAC,oBAAA;IAAmB,WAAW;eAC5B,MAAM,QACN,gBAAgB,YAA+B,cAAc,qBAAa,IAAI,MAAM,aAAa,aAAa,CAAA;KAC5F,EAAA,CACpB,EAEJ,MAAM,SAAS,IAAI,MAAM,UAAU,iBAAiB,CAAA;IACjD,EAEP,eAAe,cACd,qBAAC,YAAA;GAAS,mBAAiB;GAAgB,MAAM,MAAM;GAAc,WAAW;cAC7E,MAAM,UACL,oBAAA,UAAA,EAAA,UACE,qBAAC,UAAA;IAAO,WAAW;eAChB,MAAM,QACN,gBAAgB,YAA+B,cAAc,qBAAa,IAAI,MAAM,aAAa,aAAa,CAAA;KACxG,EAAA,CACR,EAEJ,MAAM,SAAS,IAAI,MAAM,UAAU,iBAAiB,CAAA;IAC5C,CAAA,EAAA,CAET;;AAIV,QACE,qBAAC,OAAA;EAAI,eAAa,MAAM;EAAQ,oBAAkB,YAAY;EAAW,WAAW;aACjF,MAAM,SACL,oBAAC,eAAA;GACC,WAAW;GACX,YAAY;GACZ,YAAY;GACZ,QAAQ;IAAE,WAAW;IAAG,cAAc,QAAQ,IAAI;IAAG;aAEpD,MAAM;IACD,EAEV,oBAAC,sBAAA;GACC,WAAW;GACX,WAAW;GACX,QAAQ;GACK;GACI;GACJ;aAEZ,kBAAkB;IACN,CAAA;GACX;;AAIV,UAAU,cAAc;AAExB,IAAA,oBAAe"}
1
+ {"version":3,"file":"FormGroup.js","names":[],"sources":["../src/components/FormGroup/FormGroup.tsx"],"sourcesContent":["import React, { useId, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { CheckboxProps } from '../Checkbox/Checkbox';\nimport type { FormFieldTagProps } from '../FormFieldTag';\nimport type { FormLayoutProps } from '../FormLayout';\nimport type { InputProps } from '../Input/Input';\nimport type { RadioButtonProps } from '../RadioButton/RadioButton';\nimport type { SelectProps } from '../Select';\nimport type { SliderProps } from '../Slider';\nimport type { TextareaProps } from '../Textarea';\n\nimport { AnalyticsId, FormOnColor, FormSize } from '../../constants';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { isComponent } from '../../utils/component';\nimport Checkbox from '../Checkbox/Checkbox';\nimport ErrorWrapper from '../ErrorWrapper';\nimport FormFieldTag from '../FormFieldTag';\nimport FormLayout from '../FormLayout';\nimport Input from '../Input/Input';\nimport RadioButton from '../RadioButton/RadioButton';\nimport { getRadioLabelClasses } from '../RadioButton/utils';\nimport Select from '../Select';\nimport Slider from '../Slider';\nimport Textarea from '../Textarea';\nimport Title, { type TitleTags } from '../Title';\n\nimport formGroupStyles from './styles.module.scss';\n\nexport type FormGroupTags = 'fieldset' | 'div';\n\nexport interface FormGroupProps {\n /** Can be used as a replacement text for legend in cases where the group title already exists externally */\n ariaLabelledBy?: string;\n /** title for the the fieldset */\n title?: string;\n /** text placed in the legend tag of the fieldset */\n legend?: string;\n /** Items in the FormGroup component */\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the errorWrapper. */\n errorWrapperClassName?: string;\n /** Adds custom classes to the fieldset element. */\n fieldsetClassName?: string;\n /** Sets a tag that describes whether the form group is required or optional */\n formFieldTag?: React.ReactNode;\n /** Adds custom classes to the legend element. */\n legendClassName?: string;\n /** Changes the visuals of the formgroup */\n onColor?: keyof typeof FormOnColor;\n /** Changes the visuals of the formgroup */\n size?: keyof typeof FormSize;\n /** Error message */\n error?: string;\n /** Error text id */\n errorTextId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the data-testid attribute for the error-wrapper. */\n errorWrapperTestId?: string;\n /** Unique name for the child input element */\n name?: string;\n /** Unique name for the fieldset */\n fieldsetName?: string;\n /** Sets div instead of fieldset tag */\n htmlMarkup?: FormGroupTags;\n /** Markup for legend if formgroup htmlMarkup is div*/\n legendHtmlMarkup?: TitleTags;\n /** Markup for title */\n titleHtmlMarkup?: TitleTags;\n /** Renders the error component (Default: true) */\n renderError?: boolean;\n /** Ref passed to the error message element */\n errorMessageRef?: React.Ref<HTMLDivElement | null>;\n}\n\nexport const FormGroup: React.FC<FormGroupProps> = (props: FormGroupProps) => {\n const {\n ariaLabelledBy,\n className,\n errorTextId: errorTextIdProp,\n fieldsetClassName,\n formFieldTag,\n legendClassName,\n onColor = FormOnColor.onwhite,\n size = FormSize.medium,\n error,\n name,\n htmlMarkup = 'fieldset',\n renderError = true,\n errorWrapperClassName,\n errorWrapperTestId,\n errorMessageRef,\n legendHtmlMarkup = 'h5',\n titleHtmlMarkup = 'h4',\n } = props;\n const [checkedRadioId, setCheckedRadioId] = useState<string>();\n const radioGroupId = useId();\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const onDark = onColor === FormOnColor.ondark;\n const isLarge = size === FormSize.large;\n const formGroupWrapperClasses = classNames(formGroupStyles['form-group-wrapper'], className);\n const titleClasses = classNames({\n [formGroupStyles['form-group-wrapper__title--on-dark']]: onDark && !error,\n });\n\n const CustomTagForLegend = legendHtmlMarkup;\n\n const legendClasses = classNames(\n formGroupStyles['field-set__legend'],\n {\n [formGroupStyles['field-set__legend--on-dark']]: onDark && !error,\n },\n legendClassName\n );\n\n const fieldsetClasses = classNames(formGroupStyles['field-set'], fieldsetClassName);\n\n const mapFormComponent = (child: React.ReactNode, index: number): React.ReactNode => {\n if (isComponent<FormLayoutProps>(child, FormLayout)) {\n return React.cloneElement(child, {\n size,\n mapHelper: mapFormComponent,\n });\n } else if (isComponent<FormGroupProps>(child, FormGroup)) {\n return React.cloneElement(child, {\n onColor,\n size,\n error,\n renderError: false,\n errorTextId: errorTextId,\n });\n } else if (isComponent<CheckboxProps>(child, Checkbox)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n onColor,\n size,\n error: !!error,\n errorTextId: errorTextId,\n });\n } else if (isComponent<RadioButtonProps>(child, RadioButton)) {\n const radioId = typeof child.props.inputId === 'undefined' ? radioGroupId + index : child.props.inputId;\n return React.cloneElement(child, {\n inputId: radioId,\n name: name ?? child.props.name,\n onColor,\n size,\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => {\n setCheckedRadioId(event.target.id);\n if (child.props.onChange) child.props.onChange(event);\n },\n error: !!error,\n errorTextId: errorTextId,\n labelClassNames: getRadioLabelClasses(radioId, onColor as FormOnColor, isLarge, checkedRadioId),\n });\n } else if (isComponent<InputProps>(child, Input)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n onColor,\n size,\n error: !!error,\n errorTextId: errorTextId,\n });\n } else if (isComponent<TextareaProps>(child, Textarea)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n onColor,\n error: !!error,\n errorTextId: errorTextId,\n });\n } else if (isComponent<SelectProps>(child, Select)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n onColor,\n error: !!error,\n errorTextId: errorTextId,\n });\n } else if (isComponent<SliderProps>(child, Slider)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n error: !!error,\n errorTextId: errorTextId,\n });\n }\n return child;\n };\n\n const formGroupContent = (): React.ReactNode => {\n return (\n <div>\n {htmlMarkup === 'div' && (\n <div className={fieldsetClasses}>\n {props.legend && (\n <>\n <CustomTagForLegend className={legendClasses}>\n {props.legend}\n {formFieldTag && isComponent<FormFieldTagProps>(formFieldTag, FormFieldTag) && React.cloneElement(formFieldTag)}\n </CustomTagForLegend>\n </>\n )}\n {React.Children.map(props.children, mapFormComponent)}\n </div>\n )}\n {htmlMarkup === 'fieldset' && (\n <fieldset aria-labelledby={ariaLabelledBy} name={props.fieldsetName} className={fieldsetClasses}>\n {props.legend && (\n <>\n <legend className={legendClasses}>\n {props.legend}\n {formFieldTag && isComponent<FormFieldTagProps>(formFieldTag, FormFieldTag) && React.cloneElement(formFieldTag)}\n </legend>\n </>\n )}\n {React.Children.map(props.children, mapFormComponent)}\n </fieldset>\n )}\n </div>\n );\n };\n\n return (\n <div data-testid={props.testId} data-analyticsid={AnalyticsId.FormGroup} className={formGroupWrapperClasses}>\n {props.title && (\n <Title\n className={titleClasses}\n htmlMarkup={titleHtmlMarkup}\n appearance={'title4'}\n margin={{ marginTop: 0, marginBottom: error ? 1 : 2 }}\n >\n {props.title}\n </Title>\n )}\n <ErrorWrapper\n className={errorWrapperClassName}\n errorText={error}\n testId={errorWrapperTestId}\n errorTextId={errorTextId}\n errorMessageRef={errorMessageRef}\n renderError={renderError}\n >\n {formGroupContent()}\n </ErrorWrapper>\n </div>\n );\n};\n\nFormGroup.displayName = 'FormGroup';\n\nexport default FormGroup;\n"],"mappings":";;;;;;;;;;;;;;;;;;AA+EA,IAAa,aAAuC,UAA0B;CAC5E,MAAM,EACJ,gBACA,WACA,aAAa,iBACb,mBACA,cACA,iBACA,UAAU,YAAY,SACtB,OAAO,SAAS,QAChB,OACA,MACA,aAAa,YACb,cAAc,MACd,uBACA,oBACA,iBACA,mBAAmB,MACnB,kBAAkB,SAChB;CACJ,MAAM,CAAC,gBAAgB,qBAAqB,UAAkB;CAC9D,MAAM,eAAe,OAAO;CAC5B,MAAM,cAAc,kBAAkB,gBAAgB;CACtD,MAAM,SAAS,YAAY,YAAY;CACvC,MAAM,UAAU,SAAS,SAAS;CAClC,MAAM,0BAA0B,WAAW,gBAAgB,uBAAuB,UAAU;CAC5F,MAAM,eAAe,WAAW,GAC7B,gBAAgB,wCAAwC,UAAU,CAAC,OACrE,CAAC;CAEF,MAAM,qBAAqB;CAE3B,MAAM,gBAAgB,WACpB,gBAAgB,sBAChB,GACG,gBAAgB,gCAAgC,UAAU,CAAC,OAC7D,EACD,gBACD;CAED,MAAM,kBAAkB,WAAW,gBAAgB,cAAc,kBAAkB;CAEnF,MAAM,oBAAoB,OAAwB,UAAmC;EACnF,IAAI,YAA6B,OAAO,mBAAW,EACjD,OAAO,MAAM,aAAa,OAAO;GAC/B;GACA,WAAW;GACZ,CAAC;OACG,IAAI,YAA4B,OAAO,UAAU,EACtD,OAAO,MAAM,aAAa,OAAO;GAC/B;GACA;GACA;GACA,aAAa;GACA;GACd,CAAC;OACG,IAAI,YAA2B,OAAO,SAAS,EACpD,OAAO,MAAM,aAAa,OAAO;GAC/B,MAAM,QAAQ,MAAM,MAAM;GAC1B;GACA;GACA,OAAO,CAAC,CAAC;GACI;GACd,CAAC;OACG,IAAI,YAA8B,OAAO,YAAY,EAAE;GAC5D,MAAM,UAAU,OAAO,MAAM,MAAM,YAAY,cAAc,eAAe,QAAQ,MAAM,MAAM;GAChG,OAAO,MAAM,aAAa,OAAO;IAC/B,SAAS;IACT,MAAM,QAAQ,MAAM,MAAM;IAC1B;IACA;IACA,WAAW,UAA+C;KACxD,kBAAkB,MAAM,OAAO,GAAG;KAClC,IAAI,MAAM,MAAM,UAAU,MAAM,MAAM,SAAS,MAAM;;IAEvD,OAAO,CAAC,CAAC;IACI;IACb,iBAAiB,qBAAqB,SAAS,SAAwB,SAAS,eAAe;IAChG,CAAC;SACG,IAAI,YAAwB,OAAO,MAAM,EAC9C,OAAO,MAAM,aAAa,OAAO;GAC/B,MAAM,QAAQ,MAAM,MAAM;GAC1B;GACA;GACA,OAAO,CAAC,CAAC;GACI;GACd,CAAC;OACG,IAAI,YAA2B,OAAO,iBAAS,EACpD,OAAO,MAAM,aAAa,OAAO;GAC/B,MAAM,QAAQ,MAAM,MAAM;GAC1B;GACA,OAAO,CAAC,CAAC;GACI;GACd,CAAC;OACG,IAAI,YAAyB,OAAO,eAAO,EAChD,OAAO,MAAM,aAAa,OAAO;GAC/B,MAAM,QAAQ,MAAM,MAAM;GAC1B;GACA,OAAO,CAAC,CAAC;GACI;GACd,CAAC;OACG,IAAI,YAAyB,OAAO,eAAO,EAChD,OAAO,MAAM,aAAa,OAAO;GAC/B,MAAM,QAAQ,MAAM,MAAM;GAC1B,OAAO,CAAC,CAAC;GACI;GACd,CAAC;EAEJ,OAAO;;CAGT,MAAM,yBAA0C;EAC9C,OACE,qBAAC,OAAD,EAAA,UAAA,CACG,eAAe,SACd,qBAAC,OAAD;GAAK,WAAW;aAAhB,CACG,MAAM,UACL,oBAAA,UAAA,EAAA,UACE,qBAAC,oBAAD;IAAoB,WAAW;cAA/B,CACG,MAAM,QACN,gBAAgB,YAA+B,cAAc,qBAAa,IAAI,MAAM,aAAa,aAAa,CAC5F;OACpB,CAAA,EAEJ,MAAM,SAAS,IAAI,MAAM,UAAU,iBAAiB,CACjD;MAEP,eAAe,cACd,qBAAC,YAAD;GAAU,mBAAiB;GAAgB,MAAM,MAAM;GAAc,WAAW;aAAhF,CACG,MAAM,UACL,oBAAA,UAAA,EAAA,UACE,qBAAC,UAAD;IAAQ,WAAW;cAAnB,CACG,MAAM,QACN,gBAAgB,YAA+B,cAAc,qBAAa,IAAI,MAAM,aAAa,aAAa,CACxG;OACR,CAAA,EAEJ,MAAM,SAAS,IAAI,MAAM,UAAU,iBAAiB,CAC5C;KAET,EAAA,CAAA;;CAIV,OACE,qBAAC,OAAD;EAAK,eAAa,MAAM;EAAQ,oBAAkB,YAAY;EAAW,WAAW;YAApF,CACG,MAAM,SACL,oBAAC,eAAD;GACE,WAAW;GACX,YAAY;GACZ,YAAY;GACZ,QAAQ;IAAE,WAAW;IAAG,cAAc,QAAQ,IAAI;IAAG;aAEpD,MAAM;GACD,CAAA,EAEV,oBAAC,sBAAD;GACE,WAAW;GACX,WAAW;GACX,QAAQ;GACK;GACI;GACJ;aAEZ,kBAAkB;GACN,CAAA,CACX;;;AAIV,UAAU,cAAc"}