@helsenorge/designsystem-react 2.17.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1006) hide show
  1. package/AnchorLink.js +1 -1
  2. package/AnchorLink.js.map +1 -1
  3. package/Avatar.js +1 -1
  4. package/Avatar.js.map +1 -1
  5. package/Badge.js +1 -1
  6. package/Badge.js.map +1 -1
  7. package/Button.js +1 -1
  8. package/Button.js.map +1 -1
  9. package/CHANGELOG.md +60 -2
  10. package/Checkbox.js +1 -1
  11. package/Checkbox.js.map +1 -1
  12. package/Close.js +1 -1
  13. package/Close.js.map +1 -1
  14. package/ErrorWrapper.js +1 -1
  15. package/ErrorWrapper.js.map +1 -1
  16. package/FormGroup.js +1 -1
  17. package/FormGroup.js.map +1 -1
  18. package/FormLayout.js +1 -1
  19. package/FormLayout.js.map +1 -1
  20. package/HelpBubble.js +1 -1
  21. package/HelpBubble.js.map +1 -1
  22. package/HorizontalScroll.js +1 -1
  23. package/HorizontalScroll.js.map +1 -1
  24. package/Input.js +1 -1
  25. package/Input.js.map +1 -1
  26. package/ListHeader.js +1 -1
  27. package/ListHeader.js.map +1 -1
  28. package/ListHeaderText.js +1 -1
  29. package/ListHeaderText.js.map +1 -1
  30. package/MaxCharacters.js +1 -1
  31. package/MaxCharacters.js.map +1 -1
  32. package/Modal.js +1 -1
  33. package/Modal.js.map +1 -1
  34. package/Panel.js +1 -1
  35. package/Panel.js.map +1 -1
  36. package/PopOver.js +2 -0
  37. package/PopOver.js.map +1 -0
  38. package/RadioButton.js +1 -1
  39. package/RadioButton.js.map +1 -1
  40. package/Select.js +1 -1
  41. package/Select.js.map +1 -1
  42. package/Spacer.js +1 -1
  43. package/Spacer.js.map +1 -1
  44. package/StatusDot.js +1 -1
  45. package/StatusDot.js.map +1 -1
  46. package/TableBody.js +1 -1
  47. package/TableBody.js.map +1 -1
  48. package/TableCell.js +1 -1
  49. package/TableCell.js.map +1 -1
  50. package/TableExpandedRow.js +1 -1
  51. package/TableExpandedRow.js.map +1 -1
  52. package/TableExpanderCell.js +1 -1
  53. package/TableExpanderCell.js.map +1 -1
  54. package/TableHead.js +1 -1
  55. package/TableHead.js.map +1 -1
  56. package/TableHeadCell.js +1 -1
  57. package/TableHeadCell.js.map +1 -1
  58. package/TableRow.js +1 -1
  59. package/TableRow.js.map +1 -1
  60. package/Textarea.js +1 -1
  61. package/Textarea.js.map +1 -1
  62. package/Title.js +1 -1
  63. package/Title.js.map +1 -1
  64. package/Tooltip.js +1 -1
  65. package/Tooltip.js.map +1 -1
  66. package/TooltipWord.js +1 -1
  67. package/TooltipWord.js.map +1 -1
  68. package/Validation.js +1 -1
  69. package/Validation.js.map +1 -1
  70. package/__mocks__/matchMedia.d.ts +1 -1
  71. package/__mocks__/matchMedia.d.ts.map +1 -1
  72. package/components/AnchorLink/AnchorLink.d.ts +2 -2
  73. package/components/AnchorLink/AnchorLink.d.ts.map +1 -1
  74. package/components/AnchorLink/index.js +1 -1
  75. package/components/AnchorLink/styles.module.scss +19 -11
  76. package/components/Avatar/Avatar.d.ts +1 -1
  77. package/components/Avatar/Avatar.d.ts.map +1 -1
  78. package/components/Avatar/index.js +1 -1
  79. package/components/Avatar/styles.module.scss +2 -2
  80. package/components/Badge/Badge.d.ts +3 -3
  81. package/components/Badge/Badge.d.ts.map +1 -1
  82. package/components/Badge/index.js +1 -1
  83. package/components/Badge/styles.module.scss +7 -1
  84. package/components/Button/Button.d.ts +7 -7
  85. package/components/Button/Button.d.ts.map +1 -1
  86. package/components/Button/componentdata.json +1 -1
  87. package/components/Button/index.js +1 -1
  88. package/components/Button/styles.module.scss +35 -21
  89. package/components/ButtonWithModal/ButtonWithModal.d.ts.map +1 -1
  90. package/components/ButtonWithModal/index.js +1 -1
  91. package/components/ButtonWithModal/index.js.map +1 -1
  92. package/components/Checkbox/Checkbox.d.ts.map +1 -1
  93. package/components/Checkbox/componentdata.json +1 -1
  94. package/components/Checkbox/index.js +1 -1
  95. package/components/Checkbox/styles.module.scss +12 -12
  96. package/components/Close/Close.d.ts +8 -2
  97. package/components/Close/Close.d.ts.map +1 -1
  98. package/components/Close/componentdata.json +1 -1
  99. package/components/Close/index.js +1 -1
  100. package/components/Close/styles.module.scss +16 -8
  101. package/components/Dropdown/Dropdown.d.ts.map +1 -1
  102. package/components/Dropdown/componentdata.json +1 -1
  103. package/components/Dropdown/index.js +1 -1
  104. package/components/Dropdown/index.js.map +1 -1
  105. package/components/Dropdown/styles.module.scss +31 -10
  106. package/components/Duolist/Duolist.d.ts +4 -4
  107. package/components/Duolist/Duolist.d.ts.map +1 -1
  108. package/components/Duolist/index.js +1 -1
  109. package/components/Duolist/index.js.map +1 -1
  110. package/components/Duolist/styles.module.scss +5 -3
  111. package/components/ErrorWrapper/ErrorWrapper.d.ts.map +1 -1
  112. package/components/ErrorWrapper/componentdata.json +1 -1
  113. package/components/ErrorWrapper/index.js +1 -1
  114. package/components/ErrorWrapper/styles.module.scss +8 -6
  115. package/components/Expander/Expander.d.ts +2 -2
  116. package/components/Expander/Expander.d.ts.map +1 -1
  117. package/components/Expander/componentdata.json +1 -1
  118. package/components/Expander/index.js +1 -1
  119. package/components/Expander/index.js.map +1 -1
  120. package/components/Expander/styles.module.scss +46 -15
  121. package/components/ExpanderHierarchy/Expander.d.ts +18 -0
  122. package/components/ExpanderHierarchy/Expander.d.ts.map +1 -0
  123. package/components/ExpanderHierarchy/ExpanderButton.d.ts +11 -0
  124. package/components/ExpanderHierarchy/ExpanderButton.d.ts.map +1 -0
  125. package/components/ExpanderHierarchy/ExpanderHierarchy.d.ts +22 -0
  126. package/components/ExpanderHierarchy/ExpanderHierarchy.d.ts.map +1 -0
  127. package/components/ExpanderHierarchy/componentdata.json +1 -0
  128. package/components/ExpanderHierarchy/expander.module.scss +152 -0
  129. package/components/ExpanderHierarchy/expander.module.scss.d.ts +25 -0
  130. package/components/ExpanderHierarchy/index.d.ts +4 -0
  131. package/components/ExpanderHierarchy/index.d.ts.map +1 -0
  132. package/components/ExpanderHierarchy/index.js +2 -0
  133. package/components/ExpanderHierarchy/index.js.map +1 -0
  134. package/components/ExpanderHierarchy/styles.module.scss +17 -0
  135. package/components/ExpanderHierarchy/styles.module.scss.d.ts +11 -0
  136. package/components/ExpanderHierarchy/utils.d.ts +3 -0
  137. package/components/ExpanderHierarchy/utils.d.ts.map +1 -0
  138. package/components/ExpanderList/ExpanderList.d.ts +4 -4
  139. package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
  140. package/components/ExpanderList/index.js +1 -1
  141. package/components/ExpanderList/index.js.map +1 -1
  142. package/components/ExpanderList/styles.module.scss +17 -6
  143. package/components/FormExample/FormExample.d.ts.map +1 -1
  144. package/components/FormExample/index.js +3 -3
  145. package/components/FormExample/index.js.map +1 -1
  146. package/components/FormExample/styles.module.scss +6 -6
  147. package/components/FormGroup/FormGroup.d.ts +1 -1
  148. package/components/FormGroup/FormGroup.d.ts.map +1 -1
  149. package/components/FormGroup/index.js +1 -1
  150. package/components/FormGroup/styles.module.scss +5 -4
  151. package/components/FormLayout/FormLayout.d.ts.map +1 -1
  152. package/components/FormLayout/index.js +1 -1
  153. package/components/FormLayout/styles.module.scss +5 -2
  154. package/components/GridExample/index.js +1 -1
  155. package/components/GridExample/index.js.map +1 -1
  156. package/components/HelpBubble/HelpBubble.d.ts +5 -8
  157. package/components/HelpBubble/HelpBubble.d.ts.map +1 -1
  158. package/components/HelpBubble/index.js +1 -1
  159. package/components/HelpBubble/styles.module.scss +10 -51
  160. package/components/HelpBubble/styles.module.scss.d.ts +0 -4
  161. package/components/HelpBubbleExample/componentdata.json +1 -1
  162. package/components/HelpBubbleExample/index.js +1 -1
  163. package/components/HelpBubbleExample/index.js.map +1 -1
  164. package/components/HighlightBox/HighlightBox.d.ts +2 -2
  165. package/components/HighlightBox/HighlightBox.d.ts.map +1 -1
  166. package/components/HighlightBox/componentdata.json +1 -1
  167. package/components/HighlightBox/index.js +1 -1
  168. package/components/HighlightBox/index.js.map +1 -1
  169. package/components/HighlightBox/styles.module.scss +38 -29
  170. package/components/HorizontalScroll/HorizontalScroll.d.ts.map +1 -1
  171. package/components/HorizontalScroll/index.js +1 -1
  172. package/components/HorizontalScroll/styles.module.scss +10 -3
  173. package/components/Icons/ActiveMonitoring.d.ts.map +1 -1
  174. package/components/Icons/ActiveMonitoring.js.map +1 -1
  175. package/components/Icons/AcupunctureBack.d.ts.map +1 -1
  176. package/components/Icons/AcupunctureBack.js.map +1 -1
  177. package/components/Icons/AlarmClock.d.ts.map +1 -1
  178. package/components/Icons/AlarmClock.js.map +1 -1
  179. package/components/Icons/AlertSignFill.d.ts.map +1 -1
  180. package/components/Icons/AlertSignFill.js.map +1 -1
  181. package/components/Icons/AlertSignStroke.d.ts.map +1 -1
  182. package/components/Icons/AlertSignStroke.js.map +1 -1
  183. package/components/Icons/Amputation.d.ts.map +1 -1
  184. package/components/Icons/Amputation.js.map +1 -1
  185. package/components/Icons/Anxiety.d.ts.map +1 -1
  186. package/components/Icons/Anxiety.js.map +1 -1
  187. package/components/Icons/Apple.d.ts.map +1 -1
  188. package/components/Icons/Apple.js.map +1 -1
  189. package/components/Icons/Archive.d.ts.map +1 -1
  190. package/components/Icons/Archive.js.map +1 -1
  191. package/components/Icons/ArmFlexing.d.ts.map +1 -1
  192. package/components/Icons/ArmFlexing.js.map +1 -1
  193. package/components/Icons/ArrowDown.d.ts.map +1 -1
  194. package/components/Icons/ArrowDown.js.map +1 -1
  195. package/components/Icons/ArrowLeft.d.ts.map +1 -1
  196. package/components/Icons/ArrowLeft.js.map +1 -1
  197. package/components/Icons/ArrowRight.d.ts.map +1 -1
  198. package/components/Icons/ArrowRight.js.map +1 -1
  199. package/components/Icons/ArrowUp.d.ts.map +1 -1
  200. package/components/Icons/ArrowUp.js.map +1 -1
  201. package/components/Icons/ArrowUpRight.d.ts.map +1 -1
  202. package/components/Icons/ArrowUpRight.js.map +1 -1
  203. package/components/Icons/Attachment.d.ts.map +1 -1
  204. package/components/Icons/Attachment.js.map +1 -1
  205. package/components/Icons/Atv.d.ts.map +1 -1
  206. package/components/Icons/Atv.js.map +1 -1
  207. package/components/Icons/Avatar.d.ts.map +1 -1
  208. package/components/Icons/Avatar.js.map +1 -1
  209. package/components/Icons/AwakePersonOnPillow.d.ts.map +1 -1
  210. package/components/Icons/AwakePersonOnPillow.js.map +1 -1
  211. package/components/Icons/Baby.d.ts.map +1 -1
  212. package/components/Icons/Baby.js.map +1 -1
  213. package/components/Icons/BandAid.d.ts.map +1 -1
  214. package/components/Icons/BandAid.js.map +1 -1
  215. package/components/Icons/BeerAndPills.d.ts.map +1 -1
  216. package/components/Icons/BeerAndPills.js.map +1 -1
  217. package/components/Icons/Bell.d.ts.map +1 -1
  218. package/components/Icons/Bell.js.map +1 -1
  219. package/components/Icons/Bike.d.ts.map +1 -1
  220. package/components/Icons/Bike.js.map +1 -1
  221. package/components/Icons/BirthControl.d.ts.map +1 -1
  222. package/components/Icons/BirthControl.js.map +1 -1
  223. package/components/Icons/BirthdayCake.d.ts.map +1 -1
  224. package/components/Icons/BirthdayCake.js.map +1 -1
  225. package/components/Icons/Boat.d.ts.map +1 -1
  226. package/components/Icons/Boat.js.map +1 -1
  227. package/components/Icons/Body.d.ts.map +1 -1
  228. package/components/Icons/Body.js.map +1 -1
  229. package/components/Icons/Brain.d.ts.map +1 -1
  230. package/components/Icons/Brain.js.map +1 -1
  231. package/components/Icons/BreastReconstruction.d.ts.map +1 -1
  232. package/components/Icons/BreastReconstruction.js.map +1 -1
  233. package/components/Icons/BreastRemoval.d.ts.map +1 -1
  234. package/components/Icons/BreastRemoval.js.map +1 -1
  235. package/components/Icons/Breasts.d.ts.map +1 -1
  236. package/components/Icons/Breasts.js.map +1 -1
  237. package/components/Icons/BrokenHeart.d.ts.map +1 -1
  238. package/components/Icons/BrokenHeart.js.map +1 -1
  239. package/components/Icons/BrokenPuzzle.d.ts.map +1 -1
  240. package/components/Icons/BrokenPuzzle.js.map +1 -1
  241. package/components/Icons/Bus.d.ts.map +1 -1
  242. package/components/Icons/Bus.js.map +1 -1
  243. package/components/Icons/Calendar.d.ts.map +1 -1
  244. package/components/Icons/Calendar.js.map +1 -1
  245. package/components/Icons/CalendarChange.d.ts.map +1 -1
  246. package/components/Icons/CalendarChange.js.map +1 -1
  247. package/components/Icons/CalendarCheck.d.ts.map +1 -1
  248. package/components/Icons/CalendarCheck.js.map +1 -1
  249. package/components/Icons/CalendarEvent.d.ts.map +1 -1
  250. package/components/Icons/CalendarEvent.js.map +1 -1
  251. package/components/Icons/CalendarSave.d.ts.map +1 -1
  252. package/components/Icons/CalendarSave.js.map +1 -1
  253. package/components/Icons/Cancer.d.ts.map +1 -1
  254. package/components/Icons/Cancer.js.map +1 -1
  255. package/components/Icons/Car.d.ts.map +1 -1
  256. package/components/Icons/Car.js.map +1 -1
  257. package/components/Icons/Change.d.ts.map +1 -1
  258. package/components/Icons/Change.js.map +1 -1
  259. package/components/Icons/Check.d.ts.map +1 -1
  260. package/components/Icons/Check.js.map +1 -1
  261. package/components/Icons/CheckFill.d.ts.map +1 -1
  262. package/components/Icons/CheckFill.js.map +1 -1
  263. package/components/Icons/CheckOutline.d.ts.map +1 -1
  264. package/components/Icons/CheckOutline.js.map +1 -1
  265. package/components/Icons/Chest.d.ts.map +1 -1
  266. package/components/Icons/Chest.js.map +1 -1
  267. package/components/Icons/ChevronDown.d.ts.map +1 -1
  268. package/components/Icons/ChevronDown.js.map +1 -1
  269. package/components/Icons/ChevronLeft.d.ts.map +1 -1
  270. package/components/Icons/ChevronLeft.js.map +1 -1
  271. package/components/Icons/ChevronRight.d.ts.map +1 -1
  272. package/components/Icons/ChevronRight.js.map +1 -1
  273. package/components/Icons/ChevronUp.d.ts.map +1 -1
  274. package/components/Icons/ChevronUp.js.map +1 -1
  275. package/components/Icons/ChevronsDown.d.ts.map +1 -1
  276. package/components/Icons/ChevronsDown.js.map +1 -1
  277. package/components/Icons/ChevronsUp.d.ts.map +1 -1
  278. package/components/Icons/ChevronsUp.js.map +1 -1
  279. package/components/Icons/ChildPlaying.d.ts.map +1 -1
  280. package/components/Icons/ChildPlaying.js.map +1 -1
  281. package/components/Icons/Cigarette.d.ts.map +1 -1
  282. package/components/Icons/Cigarette.js.map +1 -1
  283. package/components/Icons/Coins.d.ts.map +1 -1
  284. package/components/Icons/Coins.js.map +1 -1
  285. package/components/Icons/Contacts.d.ts.map +1 -1
  286. package/components/Icons/Contacts.js.map +1 -1
  287. package/components/Icons/Copy.d.ts.map +1 -1
  288. package/components/Icons/Copy.js.map +1 -1
  289. package/components/Icons/CoronaCertificate.d.ts.map +1 -1
  290. package/components/Icons/CoronaCertificate.js.map +1 -1
  291. package/components/Icons/Coronavirus.d.ts.map +1 -1
  292. package/components/Icons/Coronavirus.js.map +1 -1
  293. package/components/Icons/Cough.d.ts.map +1 -1
  294. package/components/Icons/Cough.js.map +1 -1
  295. package/components/Icons/CriticalHealthInfo.d.ts.map +1 -1
  296. package/components/Icons/CriticalHealthInfo.js.map +1 -1
  297. package/components/Icons/Cross.d.ts.map +1 -1
  298. package/components/Icons/Cross.js.map +1 -1
  299. package/components/Icons/DataExchange.d.ts.map +1 -1
  300. package/components/Icons/DataExchange.js.map +1 -1
  301. package/components/Icons/DataReceived.d.ts.map +1 -1
  302. package/components/Icons/DataReceived.js.map +1 -1
  303. package/components/Icons/DataSent.d.ts.map +1 -1
  304. package/components/Icons/DataSent.js.map +1 -1
  305. package/components/Icons/Depression.d.ts.map +1 -1
  306. package/components/Icons/Depression.js.map +1 -1
  307. package/components/Icons/DigestiveSystem.d.ts.map +1 -1
  308. package/components/Icons/DigestiveSystem.js.map +1 -1
  309. package/components/Icons/Dizzy.d.ts.map +1 -1
  310. package/components/Icons/Dizzy.js.map +1 -1
  311. package/components/Icons/Documents.d.ts.map +1 -1
  312. package/components/Icons/Documents.js.map +1 -1
  313. package/components/Icons/Dog.d.ts.map +1 -1
  314. package/components/Icons/Dog.js.map +1 -1
  315. package/components/Icons/DonorCard.d.ts.map +1 -1
  316. package/components/Icons/DonorCard.js.map +1 -1
  317. package/components/Icons/Download.d.ts.map +1 -1
  318. package/components/Icons/Download.js.map +1 -1
  319. package/components/Icons/Draft.d.ts.map +1 -1
  320. package/components/Icons/Draft.js.map +1 -1
  321. package/components/Icons/EChat.d.ts.map +1 -1
  322. package/components/Icons/EChat.js.map +1 -1
  323. package/components/Icons/EarNoseThroat.d.ts.map +1 -1
  324. package/components/Icons/EarNoseThroat.js.map +1 -1
  325. package/components/Icons/ElderlyPerson.d.ts.map +1 -1
  326. package/components/Icons/ElderlyPerson.js.map +1 -1
  327. package/components/Icons/Embolization.d.ts.map +1 -1
  328. package/components/Icons/Embolization.js.map +1 -1
  329. package/components/Icons/EmoticonAnnoyed.d.ts.map +1 -1
  330. package/components/Icons/EmoticonAnnoyed.js.map +1 -1
  331. package/components/Icons/EmoticonDelighted.d.ts.map +1 -1
  332. package/components/Icons/EmoticonDelighted.js.map +1 -1
  333. package/components/Icons/EmoticonDisappointed.d.ts.map +1 -1
  334. package/components/Icons/EmoticonDisappointed.js.map +1 -1
  335. package/components/Icons/EmoticonHappy.d.ts.map +1 -1
  336. package/components/Icons/EmoticonHappy.js.map +1 -1
  337. package/components/Icons/EmoticonMeh.d.ts.map +1 -1
  338. package/components/Icons/EmoticonMeh.js.map +1 -1
  339. package/components/Icons/EnterFullScreen.d.ts.map +1 -1
  340. package/components/Icons/EnterFullScreen.js.map +1 -1
  341. package/components/Icons/Envelope.d.ts.map +1 -1
  342. package/components/Icons/Envelope.js.map +1 -1
  343. package/components/Icons/Epilepsy.d.ts.map +1 -1
  344. package/components/Icons/Epilepsy.js.map +1 -1
  345. package/components/Icons/Eraser.d.ts.map +1 -1
  346. package/components/Icons/Eraser.js.map +1 -1
  347. package/components/Icons/ErrorSignFill.d.ts.map +1 -1
  348. package/components/Icons/ErrorSignFill.js.map +1 -1
  349. package/components/Icons/ErrorSignStroke.d.ts.map +1 -1
  350. package/components/Icons/ErrorSignStroke.js.map +1 -1
  351. package/components/Icons/EuropeanHealthCard.d.ts.map +1 -1
  352. package/components/Icons/EuropeanHealthCard.js.map +1 -1
  353. package/components/Icons/ExitFullScreen.d.ts.map +1 -1
  354. package/components/Icons/ExitFullScreen.js.map +1 -1
  355. package/components/Icons/Eye.d.ts.map +1 -1
  356. package/components/Icons/Eye.js.map +1 -1
  357. package/components/Icons/Facebook.d.ts.map +1 -1
  358. package/components/Icons/Facebook.js.map +1 -1
  359. package/components/Icons/Female.d.ts.map +1 -1
  360. package/components/Icons/Female.js.map +1 -1
  361. package/components/Icons/FemaleDoctor.d.ts.map +1 -1
  362. package/components/Icons/FemaleDoctor.js.map +1 -1
  363. package/components/Icons/Ferry.d.ts.map +1 -1
  364. package/components/Icons/Ferry.js.map +1 -1
  365. package/components/Icons/File.d.ts.map +1 -1
  366. package/components/Icons/File.js.map +1 -1
  367. package/components/Icons/Filter.d.ts.map +1 -1
  368. package/components/Icons/Filter.js.map +1 -1
  369. package/components/Icons/FingerBleed.d.ts.map +1 -1
  370. package/components/Icons/FingerBleed.js.map +1 -1
  371. package/components/Icons/FirstAidKit.d.ts.map +1 -1
  372. package/components/Icons/FirstAidKit.js.map +1 -1
  373. package/components/Icons/FloppyDisk.d.ts.map +1 -1
  374. package/components/Icons/FloppyDisk.js.map +1 -1
  375. package/components/Icons/Football.d.ts.map +1 -1
  376. package/components/Icons/Football.js.map +1 -1
  377. package/components/Icons/Form.d.ts.map +1 -1
  378. package/components/Icons/Form.js.map +1 -1
  379. package/components/Icons/Forward.d.ts.map +1 -1
  380. package/components/Icons/Forward.js.map +1 -1
  381. package/components/Icons/Gallery.d.ts.map +1 -1
  382. package/components/Icons/Gallery.js.map +1 -1
  383. package/components/Icons/Garden.d.ts.map +1 -1
  384. package/components/Icons/Garden.js.map +1 -1
  385. package/components/Icons/GasCan.d.ts.map +1 -1
  386. package/components/Icons/GasCan.js.map +1 -1
  387. package/components/Icons/GenderIdentity.d.ts.map +1 -1
  388. package/components/Icons/GenderIdentity.js.map +1 -1
  389. package/components/Icons/Globe.d.ts.map +1 -1
  390. package/components/Icons/Globe.js.map +1 -1
  391. package/components/Icons/Group.d.ts.map +1 -1
  392. package/components/Icons/Group.js.map +1 -1
  393. package/components/Icons/HandWaving.d.ts.map +1 -1
  394. package/components/Icons/HandWaving.js.map +1 -1
  395. package/components/Icons/HandWithDisease.d.ts.map +1 -1
  396. package/components/Icons/HandWithDisease.js.map +1 -1
  397. package/components/Icons/HealthClinic.d.ts.map +1 -1
  398. package/components/Icons/HealthClinic.js.map +1 -1
  399. package/components/Icons/HealthWarning.d.ts.map +1 -1
  400. package/components/Icons/HealthWarning.js.map +1 -1
  401. package/components/Icons/Heart.d.ts.map +1 -1
  402. package/components/Icons/Heart.js.map +1 -1
  403. package/components/Icons/HeartHands.d.ts.map +1 -1
  404. package/components/Icons/HeartHands.js.map +1 -1
  405. package/components/Icons/HelpSign.d.ts.map +1 -1
  406. package/components/Icons/HelpSign.js.map +1 -1
  407. package/components/Icons/HelpingHand.d.ts.map +1 -1
  408. package/components/Icons/HelpingHand.js.map +1 -1
  409. package/components/Icons/Hemodialysis.d.ts.map +1 -1
  410. package/components/Icons/Hemodialysis.js.map +1 -1
  411. package/components/Icons/Hiker.d.ts.map +1 -1
  412. package/components/Icons/Hiker.js.map +1 -1
  413. package/components/Icons/Hipprosthesis.d.ts.map +1 -1
  414. package/components/Icons/Hipprosthesis.js.map +1 -1
  415. package/components/Icons/History.d.ts.map +1 -1
  416. package/components/Icons/History.js.map +1 -1
  417. package/components/Icons/HivAndAids.d.ts.map +1 -1
  418. package/components/Icons/HivAndAids.js.map +1 -1
  419. package/components/Icons/Home.d.ts.map +1 -1
  420. package/components/Icons/Home.js.map +1 -1
  421. package/components/Icons/Hormone.d.ts.map +1 -1
  422. package/components/Icons/Hormone.js.map +1 -1
  423. package/components/Icons/Hospital.d.ts.map +1 -1
  424. package/components/Icons/Hospital.js.map +1 -1
  425. package/components/Icons/Hourglass.d.ts.map +1 -1
  426. package/components/Icons/Hourglass.js.map +1 -1
  427. package/components/Icons/Icon.d.ts +1 -1
  428. package/components/Icons/Icon.d.ts.map +1 -1
  429. package/components/Icons/Icon.js +1 -1
  430. package/components/Icons/Icon.js.map +1 -1
  431. package/components/Icons/ImgFile.d.ts.map +1 -1
  432. package/components/Icons/ImgFile.js.map +1 -1
  433. package/components/Icons/Inbox.d.ts.map +1 -1
  434. package/components/Icons/Inbox.js.map +1 -1
  435. package/components/Icons/InfoSignFill.d.ts.map +1 -1
  436. package/components/Icons/InfoSignFill.js.map +1 -1
  437. package/components/Icons/InfoSignStroke.d.ts.map +1 -1
  438. package/components/Icons/InfoSignStroke.js.map +1 -1
  439. package/components/Icons/Instagram.d.ts.map +1 -1
  440. package/components/Icons/Instagram.js.map +1 -1
  441. package/components/Icons/Intravenous.d.ts.map +1 -1
  442. package/components/Icons/Intravenous.js.map +1 -1
  443. package/components/Icons/JointPain.d.ts.map +1 -1
  444. package/components/Icons/JointPain.js.map +1 -1
  445. package/components/Icons/Journal.d.ts.map +1 -1
  446. package/components/Icons/Journal.js.map +1 -1
  447. package/components/Icons/JpgFile.d.ts.map +1 -1
  448. package/components/Icons/JpgFile.js.map +1 -1
  449. package/components/Icons/Kidney.d.ts.map +1 -1
  450. package/components/Icons/Kidney.js.map +1 -1
  451. package/components/Icons/KitchenScale.d.ts.map +1 -1
  452. package/components/Icons/KitchenScale.js.map +1 -1
  453. package/components/Icons/Kjernejournal.d.ts.map +1 -1
  454. package/components/Icons/Kjernejournal.js.map +1 -1
  455. package/components/Icons/Laboratory.d.ts.map +1 -1
  456. package/components/Icons/Laboratory.js.map +1 -1
  457. package/components/Icons/LaptopBlog.d.ts.map +1 -1
  458. package/components/Icons/LaptopBlog.js.map +1 -1
  459. package/components/Icons/LawBook.d.ts.map +1 -1
  460. package/components/Icons/LawBook.js.map +1 -1
  461. package/components/Icons/LightBulb.d.ts.map +1 -1
  462. package/components/Icons/LightBulb.js.map +1 -1
  463. package/components/Icons/List.d.ts.map +1 -1
  464. package/components/Icons/List.js.map +1 -1
  465. package/components/Icons/Location.d.ts.map +1 -1
  466. package/components/Icons/Location.js.map +1 -1
  467. package/components/Icons/Lock.d.ts.map +1 -1
  468. package/components/Icons/Lock.js.map +1 -1
  469. package/components/Icons/Login.d.ts.map +1 -1
  470. package/components/Icons/Login.js.map +1 -1
  471. package/components/Icons/Logout.d.ts.map +1 -1
  472. package/components/Icons/Logout.js.map +1 -1
  473. package/components/Icons/Lungs.d.ts.map +1 -1
  474. package/components/Icons/Lungs.js.map +1 -1
  475. package/components/Icons/Makeup.d.ts.map +1 -1
  476. package/components/Icons/Makeup.js.map +1 -1
  477. package/components/Icons/MaleDoctor.d.ts.map +1 -1
  478. package/components/Icons/MaleDoctor.js.map +1 -1
  479. package/components/Icons/MaleDoctorAndPerson.d.ts.map +1 -1
  480. package/components/Icons/MaleDoctorAndPerson.js.map +1 -1
  481. package/components/Icons/MaleGenitalia.d.ts.map +1 -1
  482. package/components/Icons/MaleGenitalia.js.map +1 -1
  483. package/components/Icons/Medicine.d.ts.map +1 -1
  484. package/components/Icons/Medicine.js.map +1 -1
  485. package/components/Icons/MedicineWarning.d.ts.map +1 -1
  486. package/components/Icons/MedicineWarning.js.map +1 -1
  487. package/components/Icons/MentalHealthAdult.d.ts.map +1 -1
  488. package/components/Icons/MentalHealthAdult.js.map +1 -1
  489. package/components/Icons/MentalHealthChild.d.ts.map +1 -1
  490. package/components/Icons/MentalHealthChild.js.map +1 -1
  491. package/components/Icons/Menu.d.ts.map +1 -1
  492. package/components/Icons/Menu.js.map +1 -1
  493. package/components/Icons/Microscope.d.ts.map +1 -1
  494. package/components/Icons/Microscope.js.map +1 -1
  495. package/components/Icons/Minus.d.ts.map +1 -1
  496. package/components/Icons/Minus.js.map +1 -1
  497. package/components/Icons/Mirror.d.ts.map +1 -1
  498. package/components/Icons/Mirror.js.map +1 -1
  499. package/components/Icons/MobilePhone.d.ts.map +1 -1
  500. package/components/Icons/MobilePhone.js.map +1 -1
  501. package/components/Icons/MotherHoldingBaby.d.ts.map +1 -1
  502. package/components/Icons/MotherHoldingBaby.js.map +1 -1
  503. package/components/Icons/MuscleBack.d.ts.map +1 -1
  504. package/components/Icons/MuscleBack.js.map +1 -1
  505. package/components/Icons/MuscleLeg.d.ts.map +1 -1
  506. package/components/Icons/MuscleLeg.js.map +1 -1
  507. package/components/Icons/Mushroom.d.ts.map +1 -1
  508. package/components/Icons/Mushroom.js.map +1 -1
  509. package/components/Icons/Music.d.ts.map +1 -1
  510. package/components/Icons/Music.js.map +1 -1
  511. package/components/Icons/MusselsAndSalt.d.ts.map +1 -1
  512. package/components/Icons/MusselsAndSalt.js.map +1 -1
  513. package/components/Icons/NoAccess.d.ts.map +1 -1
  514. package/components/Icons/NoAccess.js.map +1 -1
  515. package/components/Icons/NoEye.d.ts.map +1 -1
  516. package/components/Icons/NoEye.js.map +1 -1
  517. package/components/Icons/NoFilter.d.ts.map +1 -1
  518. package/components/Icons/NoFilter.js.map +1 -1
  519. package/components/Icons/Notepad.d.ts.map +1 -1
  520. package/components/Icons/Notepad.js.map +1 -1
  521. package/components/Icons/Osteotomy.d.ts.map +1 -1
  522. package/components/Icons/Osteotomy.js.map +1 -1
  523. package/components/Icons/PaintRoller.d.ts.map +1 -1
  524. package/components/Icons/PaintRoller.js.map +1 -1
  525. package/components/Icons/PaperPlane.d.ts.map +1 -1
  526. package/components/Icons/PaperPlane.js.map +1 -1
  527. package/components/Icons/PatientAndPerson.d.ts.map +1 -1
  528. package/components/Icons/PatientAndPerson.js.map +1 -1
  529. package/components/Icons/Pause.d.ts.map +1 -1
  530. package/components/Icons/Pause.js.map +1 -1
  531. package/components/Icons/PdfFile.d.ts.map +1 -1
  532. package/components/Icons/PdfFile.js.map +1 -1
  533. package/components/Icons/Pencil.d.ts.map +1 -1
  534. package/components/Icons/Pencil.js.map +1 -1
  535. package/components/Icons/PeopleTalking.d.ts.map +1 -1
  536. package/components/Icons/PeopleTalking.js.map +1 -1
  537. package/components/Icons/Peritonealdialysis.d.ts.map +1 -1
  538. package/components/Icons/Peritonealdialysis.js.map +1 -1
  539. package/components/Icons/Person.d.ts.map +1 -1
  540. package/components/Icons/Person.js.map +1 -1
  541. package/components/Icons/PersonAndPatient.d.ts.map +1 -1
  542. package/components/Icons/PersonAndPatient.js.map +1 -1
  543. package/components/Icons/PersonCancel.d.ts.map +1 -1
  544. package/components/Icons/PersonCancel.js.map +1 -1
  545. package/components/Icons/PersonInXRayMachine.d.ts.map +1 -1
  546. package/components/Icons/PersonInXRayMachine.js.map +1 -1
  547. package/components/Icons/PersonOverweight.d.ts.map +1 -1
  548. package/components/Icons/PersonOverweight.js.map +1 -1
  549. package/components/Icons/PersonRelaxing.d.ts.map +1 -1
  550. package/components/Icons/PersonRelaxing.js.map +1 -1
  551. package/components/Icons/PersonWithBrain.d.ts.map +1 -1
  552. package/components/Icons/PersonWithBrain.js.map +1 -1
  553. package/components/Icons/PersonWithBrokenArm.d.ts.map +1 -1
  554. package/components/Icons/PersonWithBrokenArm.js.map +1 -1
  555. package/components/Icons/PersonWithCrutches.d.ts.map +1 -1
  556. package/components/Icons/PersonWithCrutches.js.map +1 -1
  557. package/components/Icons/PersonWithJaw.d.ts.map +1 -1
  558. package/components/Icons/PersonWithJaw.js.map +1 -1
  559. package/components/Icons/PersonWithMagnifyingGlass.d.ts.map +1 -1
  560. package/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
  561. package/components/Icons/PersonWithSenses.d.ts.map +1 -1
  562. package/components/Icons/PersonWithSenses.js.map +1 -1
  563. package/components/Icons/PersonWorking.d.ts.map +1 -1
  564. package/components/Icons/PersonWorking.js.map +1 -1
  565. package/components/Icons/PersonalPlan.d.ts.map +1 -1
  566. package/components/Icons/PersonalPlan.js.map +1 -1
  567. package/components/Icons/PizzaSlice.d.ts.map +1 -1
  568. package/components/Icons/PizzaSlice.js.map +1 -1
  569. package/components/Icons/Plane.d.ts.map +1 -1
  570. package/components/Icons/Plane.js.map +1 -1
  571. package/components/Icons/Plant.d.ts.map +1 -1
  572. package/components/Icons/Plant.js.map +1 -1
  573. package/components/Icons/Play.d.ts.map +1 -1
  574. package/components/Icons/Play.js.map +1 -1
  575. package/components/Icons/PlusLarge.d.ts.map +1 -1
  576. package/components/Icons/PlusLarge.js.map +1 -1
  577. package/components/Icons/PlusSmall.d.ts.map +1 -1
  578. package/components/Icons/PlusSmall.js.map +1 -1
  579. package/components/Icons/PngFile.d.ts.map +1 -1
  580. package/components/Icons/PngFile.js.map +1 -1
  581. package/components/Icons/Podcast.d.ts.map +1 -1
  582. package/components/Icons/Podcast.js.map +1 -1
  583. package/components/Icons/PoisonInformation.d.ts.map +1 -1
  584. package/components/Icons/PoisonInformation.js.map +1 -1
  585. package/components/Icons/Pregnant.d.ts.map +1 -1
  586. package/components/Icons/Pregnant.js.map +1 -1
  587. package/components/Icons/Printer.d.ts.map +1 -1
  588. package/components/Icons/Printer.js.map +1 -1
  589. package/components/Icons/Psychosis.d.ts.map +1 -1
  590. package/components/Icons/Psychosis.js.map +1 -1
  591. package/components/Icons/Publication.d.ts.map +1 -1
  592. package/components/Icons/Publication.js.map +1 -1
  593. package/components/Icons/Puzzle.d.ts.map +1 -1
  594. package/components/Icons/Puzzle.js.map +1 -1
  595. package/components/Icons/QrCode.d.ts.map +1 -1
  596. package/components/Icons/QrCode.js.map +1 -1
  597. package/components/Icons/Quarrel.d.ts.map +1 -1
  598. package/components/Icons/Quarrel.js.map +1 -1
  599. package/components/Icons/RadioTherapy.d.ts.map +1 -1
  600. package/components/Icons/RadioTherapy.js.map +1 -1
  601. package/components/Icons/RadioactiveTreatment.d.ts.map +1 -1
  602. package/components/Icons/RadioactiveTreatment.js.map +1 -1
  603. package/components/Icons/Radioiodine.d.ts.map +1 -1
  604. package/components/Icons/Radioiodine.js.map +1 -1
  605. package/components/Icons/Receipt.d.ts.map +1 -1
  606. package/components/Icons/Receipt.js.map +1 -1
  607. package/components/Icons/Receptionist.d.ts.map +1 -1
  608. package/components/Icons/Receptionist.js.map +1 -1
  609. package/components/Icons/Recovery.d.ts.map +1 -1
  610. package/components/Icons/Recovery.js.map +1 -1
  611. package/components/Icons/Referral.d.ts.map +1 -1
  612. package/components/Icons/Referral.js.map +1 -1
  613. package/components/Icons/Refresh.d.ts.map +1 -1
  614. package/components/Icons/Refresh.js.map +1 -1
  615. package/components/Icons/Refund.d.ts.map +1 -1
  616. package/components/Icons/Refund.js.map +1 -1
  617. package/components/Icons/Reply.d.ts.map +1 -1
  618. package/components/Icons/Reply.js.map +1 -1
  619. package/components/Icons/Rocket.d.ts.map +1 -1
  620. package/components/Icons/Rocket.js.map +1 -1
  621. package/components/Icons/RtfFile.d.ts.map +1 -1
  622. package/components/Icons/RtfFile.js.map +1 -1
  623. package/components/Icons/STDs.d.ts.map +1 -1
  624. package/components/Icons/STDs.js.map +1 -1
  625. package/components/Icons/Save.d.ts.map +1 -1
  626. package/components/Icons/Save.js.map +1 -1
  627. package/components/Icons/Scale.d.ts.map +1 -1
  628. package/components/Icons/Scale.js.map +1 -1
  629. package/components/Icons/Search.d.ts.map +1 -1
  630. package/components/Icons/Search.js.map +1 -1
  631. package/components/Icons/SectionSign.d.ts.map +1 -1
  632. package/components/Icons/SectionSign.js.map +1 -1
  633. package/components/Icons/Settings.d.ts.map +1 -1
  634. package/components/Icons/Settings.js.map +1 -1
  635. package/components/Icons/Sexualorientation.d.ts.map +1 -1
  636. package/components/Icons/Sexualorientation.js.map +1 -1
  637. package/components/Icons/ShakingHand.d.ts.map +1 -1
  638. package/components/Icons/ShakingHand.js.map +1 -1
  639. package/components/Icons/Share.d.ts.map +1 -1
  640. package/components/Icons/Share.js.map +1 -1
  641. package/components/Icons/Shield.d.ts.map +1 -1
  642. package/components/Icons/Shield.js.map +1 -1
  643. package/components/Icons/ShuntOperation.d.ts.map +1 -1
  644. package/components/Icons/ShuntOperation.js.map +1 -1
  645. package/components/Icons/Skeleton.d.ts.map +1 -1
  646. package/components/Icons/Skeleton.js.map +1 -1
  647. package/components/Icons/Skin.d.ts.map +1 -1
  648. package/components/Icons/Skin.js.map +1 -1
  649. package/components/Icons/Snake.d.ts.map +1 -1
  650. package/components/Icons/Snake.js.map +1 -1
  651. package/components/Icons/Snapchat.d.ts.map +1 -1
  652. package/components/Icons/Snapchat.js.map +1 -1
  653. package/components/Icons/SortDown.d.ts.map +1 -1
  654. package/components/Icons/SortDown.js.map +1 -1
  655. package/components/Icons/SortUp.d.ts.map +1 -1
  656. package/components/Icons/SortUp.js +1 -1
  657. package/components/Icons/SortUp.js.map +1 -1
  658. package/components/Icons/SpeechBubble.d.ts.map +1 -1
  659. package/components/Icons/SpeechBubble.js.map +1 -1
  660. package/components/Icons/Spray.d.ts.map +1 -1
  661. package/components/Icons/Spray.js.map +1 -1
  662. package/components/Icons/Stopwatch.d.ts.map +1 -1
  663. package/components/Icons/Stopwatch.js.map +1 -1
  664. package/components/Icons/SupportingPerson.js +1 -1
  665. package/components/Icons/SupportingPerson.js.map +1 -1
  666. package/components/Icons/Surgery.d.ts.map +1 -1
  667. package/components/Icons/Surgery.js.map +1 -1
  668. package/components/Icons/Syringe.d.ts.map +1 -1
  669. package/components/Icons/Syringe.js.map +1 -1
  670. package/components/Icons/Taxi.d.ts.map +1 -1
  671. package/components/Icons/Taxi.js.map +1 -1
  672. package/components/Icons/TeddyBear.d.ts.map +1 -1
  673. package/components/Icons/TeddyBear.js.map +1 -1
  674. package/components/Icons/Teenagers.d.ts.map +1 -1
  675. package/components/Icons/Teenagers.js.map +1 -1
  676. package/components/Icons/ThinkingAboutBaby.d.ts.map +1 -1
  677. package/components/Icons/ThinkingAboutBaby.js.map +1 -1
  678. package/components/Icons/Ticket.d.ts.map +1 -1
  679. package/components/Icons/Ticket.js.map +1 -1
  680. package/components/Icons/TimePassing.d.ts.map +1 -1
  681. package/components/Icons/TimePassing.js.map +1 -1
  682. package/components/Icons/Toolbox.d.ts.map +1 -1
  683. package/components/Icons/Toolbox.js.map +1 -1
  684. package/components/Icons/Tooth.d.ts.map +1 -1
  685. package/components/Icons/Tooth.js.map +1 -1
  686. package/components/Icons/TotalKneeProsthesis.d.ts.map +1 -1
  687. package/components/Icons/TotalKneeProsthesis.js.map +1 -1
  688. package/components/Icons/Train.d.ts.map +1 -1
  689. package/components/Icons/Train.js.map +1 -1
  690. package/components/Icons/Transplantation.d.ts.map +1 -1
  691. package/components/Icons/Transplantation.js.map +1 -1
  692. package/components/Icons/TrashCan.d.ts.map +1 -1
  693. package/components/Icons/TrashCan.js.map +1 -1
  694. package/components/Icons/TravelRoute.d.ts.map +1 -1
  695. package/components/Icons/TravelRoute.js.map +1 -1
  696. package/components/Icons/TriangleX.d.ts.map +1 -1
  697. package/components/Icons/TriangleX.js.map +1 -1
  698. package/components/Icons/Twitter.d.ts.map +1 -1
  699. package/components/Icons/Twitter.js.map +1 -1
  700. package/components/Icons/Undo.d.ts.map +1 -1
  701. package/components/Icons/Undo.js.map +1 -1
  702. package/components/Icons/UniProsthesis.d.ts.map +1 -1
  703. package/components/Icons/UniProsthesis.js.map +1 -1
  704. package/components/Icons/Upload.d.ts.map +1 -1
  705. package/components/Icons/Upload.js.map +1 -1
  706. package/components/Icons/UserOrganization.d.ts.map +1 -1
  707. package/components/Icons/UserOrganization.js.map +1 -1
  708. package/components/Icons/Vaccine.d.ts.map +1 -1
  709. package/components/Icons/Vaccine.js.map +1 -1
  710. package/components/Icons/VerticalDots.d.ts.map +1 -1
  711. package/components/Icons/VerticalDots.js.map +1 -1
  712. package/components/Icons/VideoCamera.d.ts.map +1 -1
  713. package/components/Icons/VideoCamera.js.map +1 -1
  714. package/components/Icons/VideoChat.d.ts.map +1 -1
  715. package/components/Icons/VideoChat.js.map +1 -1
  716. package/components/Icons/Wallet.d.ts.map +1 -1
  717. package/components/Icons/Wallet.js.map +1 -1
  718. package/components/Icons/Watch.d.ts.map +1 -1
  719. package/components/Icons/Watch.js.map +1 -1
  720. package/components/Icons/Website.d.ts.map +1 -1
  721. package/components/Icons/Website.js.map +1 -1
  722. package/components/Icons/Wheelchair.d.ts.map +1 -1
  723. package/components/Icons/Wheelchair.js.map +1 -1
  724. package/components/Icons/WheelchairActive.d.ts.map +1 -1
  725. package/components/Icons/WheelchairActive.js.map +1 -1
  726. package/components/Icons/Window.d.ts.map +1 -1
  727. package/components/Icons/Window.js.map +1 -1
  728. package/components/Icons/WordDocument.d.ts.map +1 -1
  729. package/components/Icons/WordDocument.js.map +1 -1
  730. package/components/Icons/WorkSuitcase.d.ts.map +1 -1
  731. package/components/Icons/WorkSuitcase.js.map +1 -1
  732. package/components/Icons/X.d.ts.map +1 -1
  733. package/components/Icons/X.js.map +1 -1
  734. package/components/Icons/XOutline.d.ts.map +1 -1
  735. package/components/Icons/XOutline.js.map +1 -1
  736. package/components/Icons/XmlFile.d.ts.map +1 -1
  737. package/components/Icons/XmlFile.js.map +1 -1
  738. package/components/Icons/YouTube.d.ts.map +1 -1
  739. package/components/Icons/YouTube.js.map +1 -1
  740. package/components/Icons/Zoom.d.ts.map +1 -1
  741. package/components/Icons/Zoom.js.map +1 -1
  742. package/components/Icons/index.js +1 -1
  743. package/components/Input/Input.d.ts.map +1 -1
  744. package/components/Input/componentdata.json +1 -1
  745. package/components/Input/index.js +1 -1
  746. package/components/Input/styles.module.scss +8 -7
  747. package/components/LinkList/LinkList.d.ts +8 -8
  748. package/components/LinkList/LinkList.d.ts.map +1 -1
  749. package/components/LinkList/index.js +1 -1
  750. package/components/LinkList/index.js.map +1 -1
  751. package/components/LinkList/styles.module.scss +23 -5
  752. package/components/List/List.d.ts +17 -3
  753. package/components/List/List.d.ts.map +1 -1
  754. package/components/List/componentdata.json +1 -1
  755. package/components/List/index.js +1 -1
  756. package/components/List/index.js.map +1 -1
  757. package/components/List/styles.module.scss +55 -5
  758. package/components/List/styles.module.scss.d.ts +5 -0
  759. package/components/ListHeader/ListHeader.d.ts +12 -10
  760. package/components/ListHeader/ListHeader.d.ts.map +1 -1
  761. package/components/ListHeader/ListHeaderText/ListHeaderText.d.ts +1 -1
  762. package/components/ListHeader/ListHeaderText/ListHeaderText.d.ts.map +1 -1
  763. package/components/ListHeader/ListHeaderText/index.js +1 -1
  764. package/components/ListHeader/index.js +1 -1
  765. package/components/ListHeader/styles.module.scss +36 -11
  766. package/components/Loader/Loader.d.ts +2 -2
  767. package/components/Loader/Loader.d.ts.map +1 -1
  768. package/components/Loader/index.js +1 -1
  769. package/components/Loader/index.js.map +1 -1
  770. package/components/Loader/styles.module.scss +40 -18
  771. package/components/Logo/Logo.d.ts +1 -1
  772. package/components/Logo/Logo.d.ts.map +1 -1
  773. package/components/Logo/index.js +1 -1
  774. package/components/Logo/index.js.map +1 -1
  775. package/components/MaxCharacters/MaxCharacters.d.ts.map +1 -1
  776. package/components/MaxCharacters/styles.module.scss +7 -5
  777. package/components/Modal/Modal.d.ts.map +1 -1
  778. package/components/Modal/index.js +1 -1
  779. package/components/Modal/styles.module.scss +39 -23
  780. package/components/NotificationPanel/DetailButton/DetailButton.d.ts +10 -0
  781. package/components/NotificationPanel/DetailButton/DetailButton.d.ts.map +1 -0
  782. package/components/NotificationPanel/DetailButton/componentdata.json +1 -0
  783. package/components/NotificationPanel/DetailButton/styles.module.scss +38 -0
  784. package/components/NotificationPanel/DetailButton/styles.module.scss.d.ts +13 -0
  785. package/components/NotificationPanel/NotificationPanel.d.ts +16 -7
  786. package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
  787. package/components/NotificationPanel/componentdata.json +1 -1
  788. package/components/NotificationPanel/index.js +1 -1
  789. package/components/NotificationPanel/index.js.map +1 -1
  790. package/components/NotificationPanel/styles.module.scss +131 -97
  791. package/components/NotificationPanel/styles.module.scss.d.ts +10 -10
  792. package/components/Panel/Panel.d.ts +2 -2
  793. package/components/Panel/Panel.d.ts.map +1 -1
  794. package/components/Panel/index.js +1 -1
  795. package/components/Panel/styles.module.scss +53 -29
  796. package/components/PanelList/PanelList.d.ts.map +1 -1
  797. package/components/PanelList/index.js +1 -1
  798. package/components/PanelList/index.js.map +1 -1
  799. package/components/PanelList/styles.module.scss +6 -5
  800. package/components/PopMenu/PopMenu.d.ts +30 -0
  801. package/components/PopMenu/PopMenu.d.ts.map +1 -0
  802. package/components/PopMenu/componentdata.json +1 -0
  803. package/components/PopMenu/story.module.scss +5 -0
  804. package/components/PopMenu/story.module.scss.d.ts +9 -0
  805. package/components/PopMenu/styles.module.scss +138 -0
  806. package/components/PopMenu/styles.module.scss.d.ts +14 -0
  807. package/components/PopOver/PopOver.d.ts +34 -0
  808. package/components/PopOver/PopOver.d.ts.map +1 -0
  809. package/components/PopOver/componentdata.json +1 -0
  810. package/components/PopOver/index.d.ts +4 -0
  811. package/components/PopOver/index.d.ts.map +1 -0
  812. package/components/PopOver/index.js +2 -0
  813. package/components/PopOver/index.js.map +1 -0
  814. package/components/PopOver/styles.module.scss +66 -0
  815. package/components/PopOver/styles.module.scss.d.ts +16 -0
  816. package/components/{HelpBubble → PopOver}/utils.d.ts +4 -4
  817. package/components/PopOver/utils.d.ts.map +1 -0
  818. package/components/Portal/index.d.ts.map +1 -1
  819. package/components/Portal/index.js +1 -1
  820. package/components/Portal/index.js.map +1 -1
  821. package/components/RadioButton/RadioButton.d.ts.map +1 -1
  822. package/components/RadioButton/componentdata.json +1 -1
  823. package/components/RadioButton/index.js +1 -1
  824. package/components/RadioButton/styles.module.scss +12 -14
  825. package/components/Select/Select.d.ts +1 -1
  826. package/components/Select/Select.d.ts.map +1 -1
  827. package/components/Select/componentdata.json +1 -1
  828. package/components/Select/index.js +1 -1
  829. package/components/Select/styles.module.scss +14 -8
  830. package/components/Slider/Slider.d.ts.map +1 -1
  831. package/components/Slider/index.js +1 -1
  832. package/components/Slider/index.js.map +1 -1
  833. package/components/Slider/styles.module.scss +2 -1
  834. package/components/Spacer/Spacer.d.ts.map +1 -1
  835. package/components/Spacer/index.js +1 -1
  836. package/components/Spacer/styles.module.scss +13 -1
  837. package/components/StatusDot/index.js +1 -1
  838. package/components/StatusDot/styles.module.scss +2 -2
  839. package/components/Stepper/Dot.d.ts.map +1 -0
  840. package/components/Stepper/DotList.d.ts.map +1 -0
  841. package/components/{Progressbar/Progressbar.d.ts → Stepper/Stepper.d.ts} +6 -6
  842. package/components/Stepper/Stepper.d.ts.map +1 -0
  843. package/components/Stepper/componentdata.json +1 -0
  844. package/components/Stepper/index.d.ts +4 -0
  845. package/components/Stepper/index.d.ts.map +1 -0
  846. package/components/Stepper/index.js +2 -0
  847. package/components/Stepper/index.js.map +1 -0
  848. package/components/Stepper/styles.module.scss +105 -0
  849. package/components/Stepper/styles.module.scss.d.ts +16 -0
  850. package/components/{Progressbar → Stepper}/utils.d.ts +7 -7
  851. package/components/Stepper/utils.d.ts.map +1 -0
  852. package/components/Table/Table.d.ts +7 -6
  853. package/components/Table/Table.d.ts.map +1 -1
  854. package/components/Table/TableBody/index.js +1 -1
  855. package/components/Table/TableCell/TableCell.d.ts.map +1 -1
  856. package/components/Table/TableCell/index.js +1 -1
  857. package/components/Table/TableExpandedRow/TableExpandedRow.d.ts.map +1 -1
  858. package/components/Table/TableExpandedRow/index.js +1 -1
  859. package/components/Table/TableExpanderCell/TableExpanderCell.d.ts.map +1 -1
  860. package/components/Table/TableExpanderCell/TableExpanderCellMobile.d.ts +2 -2
  861. package/components/Table/TableExpanderCell/TableExpanderCellMobile.d.ts.map +1 -1
  862. package/components/Table/TableExpanderCell/index.js +1 -1
  863. package/components/Table/TableHead/TableHead.d.ts.map +1 -1
  864. package/components/Table/TableHead/index.js +1 -1
  865. package/components/Table/TableHeadCell/TableHeadCell.d.ts.map +1 -1
  866. package/components/Table/TableHeadCell/index.js +1 -1
  867. package/components/Table/TableRow/TableRow.d.ts.map +1 -1
  868. package/components/Table/TableRow/componentdata.json +1 -1
  869. package/components/Table/TableRow/index.js +1 -1
  870. package/components/Table/index.js +1 -1
  871. package/components/Table/index.js.map +1 -1
  872. package/components/Table/styles.module.scss +32 -20
  873. package/components/Table/utils.d.ts +3 -7
  874. package/components/Table/utils.d.ts.map +1 -1
  875. package/components/Tag/Tag.d.ts +2 -2
  876. package/components/Tag/Tag.d.ts.map +1 -1
  877. package/components/Tag/componentdata.json +1 -1
  878. package/components/Tag/index.js +1 -1
  879. package/components/Tag/index.js.map +1 -1
  880. package/components/Tag/styles.module.scss +39 -27
  881. package/components/TagList/index.js +1 -1
  882. package/components/TagList/index.js.map +1 -1
  883. package/components/TagList/styles.module.scss +3 -3
  884. package/components/Textarea/Textarea.d.ts.map +1 -1
  885. package/components/Textarea/componentdata.json +1 -1
  886. package/components/Textarea/index.js +1 -1
  887. package/components/Textarea/styles.module.scss +6 -5
  888. package/components/Tile/Tile.d.ts +2 -2
  889. package/components/Tile/Tile.d.ts.map +1 -1
  890. package/components/Tile/index.js +1 -1
  891. package/components/Tile/index.js.map +1 -1
  892. package/components/Tile/styles.module.scss +11 -6
  893. package/components/Title/Title.d.ts +3 -3
  894. package/components/Title/Title.d.ts.map +1 -1
  895. package/components/Title/index.js +1 -1
  896. package/components/Title/styles.module.scss +5 -0
  897. package/components/Tooltip/Tooltip.d.ts +1 -1
  898. package/components/Tooltip/Tooltip.d.ts.map +1 -1
  899. package/components/Tooltip/TooltipWord/TooltipWord.d.ts +1 -1
  900. package/components/Tooltip/TooltipWord/TooltipWord.d.ts.map +1 -1
  901. package/components/Tooltip/TooltipWord/index.js +1 -1
  902. package/components/Tooltip/TooltipWord/styles.module.scss +3 -3
  903. package/components/Tooltip/componentdata.json +1 -1
  904. package/components/Tooltip/index.js +1 -1
  905. package/components/TooltipExample/TooltipExample.d.ts.map +1 -1
  906. package/components/TooltipExample/componentdata.json +1 -1
  907. package/components/TooltipExample/index.js +1 -1
  908. package/components/TooltipExample/index.js.map +1 -1
  909. package/components/Validation/Validation.d.ts.map +1 -1
  910. package/components/Validation/index.js +1 -1
  911. package/components/Validation/styles.module.scss +3 -3
  912. package/constants.d.ts +7 -3
  913. package/constants.d.ts.map +1 -1
  914. package/constants.js +1 -1
  915. package/constants.js.map +1 -1
  916. package/hoc/withBreakpoint/index.js +1 -1
  917. package/hoc/withBreakpoint/withBreakpoint.d.ts +1 -1
  918. package/hoc/withBreakpoint/withBreakpoint.d.ts.map +1 -1
  919. package/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
  920. package/hooks/useBreakpoint.d.ts.map +1 -1
  921. package/hooks/useBreakpoint.js +1 -1
  922. package/hooks/useBreakpoint.js.map +1 -1
  923. package/hooks/useExpand.d.ts +3 -0
  924. package/hooks/useExpand.d.ts.map +1 -0
  925. package/hooks/useExpand.js +2 -0
  926. package/hooks/useExpand.js.map +1 -0
  927. package/hooks/useFocusToggle.d.ts.map +1 -1
  928. package/hooks/useFocusToggle.js.map +1 -1
  929. package/hooks/useFocusTrap.d.ts.map +1 -1
  930. package/hooks/useFocusTrap.js +1 -1
  931. package/hooks/useFocusTrap.js.map +1 -1
  932. package/hooks/useIcons.js.map +1 -1
  933. package/hooks/useIsVisible.d.ts.map +1 -1
  934. package/hooks/useIsVisible.js.map +1 -1
  935. package/hooks/useKeyboardEvent.d.ts +1 -1
  936. package/hooks/useKeyboardEvent.d.ts.map +1 -1
  937. package/hooks/useOutsideEvent.d.ts +1 -1
  938. package/hooks/useOutsideEvent.d.ts.map +1 -1
  939. package/hooks/useResizeObserver.js.map +1 -1
  940. package/hooks/useSize.d.ts.map +1 -1
  941. package/hooks/useSize.js.map +1 -1
  942. package/hooks/useSticky.d.ts.map +1 -1
  943. package/hooks/useSticky.js +1 -1
  944. package/hooks/useSticky.js.map +1 -1
  945. package/hooks/useToggle.d.ts.map +1 -1
  946. package/hooks/useToggle.js.map +1 -1
  947. package/hooks/useUuid.d.ts.map +1 -1
  948. package/hooks/useUuid.js.map +1 -1
  949. package/index.js +1 -1
  950. package/package.json +1 -1
  951. package/scss/_body.scss +3 -1
  952. package/scss/_breakpoints.scss +5 -8
  953. package/scss/_figma-tokens.scss +2 -2
  954. package/scss/_fonts.scss +36 -21
  955. package/scss/_grid.scss +5 -4
  956. package/scss/_input.scss +20 -11
  957. package/scss/_palette.scss +7 -15
  958. package/scss/_print.scss +58 -18
  959. package/scss/_screen-reader.scss +0 -2
  960. package/scss/_spacers.scss +17 -15
  961. package/scss/_title.scss +11 -5
  962. package/scss/helsenorge.scss +1 -1
  963. package/scss/typography.module.scss +20 -13
  964. package/theme/currys/color.d.ts.map +1 -1
  965. package/theme/currys/color.js +1 -1
  966. package/theme/currys/color.js.map +1 -1
  967. package/theme/currys/index.js +1 -1
  968. package/theme/currys/spacing.js.map +1 -1
  969. package/theme/index.js +1 -1
  970. package/theme/index.js.map +1 -1
  971. package/theme/palette.d.ts +3 -3
  972. package/theme/palette.d.ts.map +1 -1
  973. package/theme/palette.js +1 -1
  974. package/theme/palette.js.map +1 -1
  975. package/theme/spacers.d.ts +1 -1
  976. package/theme/spacers.d.ts.map +1 -1
  977. package/utils/accessibility.d.ts +1 -1
  978. package/utils/accessibility.d.ts.map +1 -1
  979. package/utils/component.d.ts +2 -1
  980. package/utils/component.d.ts.map +1 -1
  981. package/utils/component.js +1 -1
  982. package/utils/component.js.map +1 -1
  983. package/utils/debounce.d.ts +1 -2
  984. package/utils/debounce.d.ts.map +1 -1
  985. package/utils/debounce.js +1 -1
  986. package/utils/debounce.js.map +1 -1
  987. package/utils/environment.js.map +1 -1
  988. package/utils/focus.js +1 -1
  989. package/utils/focus.js.map +1 -1
  990. package/utils/viewport.js +1 -1
  991. package/utils/viewport.js.map +1 -1
  992. package/uuid.js +1 -1
  993. package/components/HelpBubble/utils.d.ts.map +0 -1
  994. package/components/Progressbar/Dot.d.ts.map +0 -1
  995. package/components/Progressbar/DotList.d.ts.map +0 -1
  996. package/components/Progressbar/Progressbar.d.ts.map +0 -1
  997. package/components/Progressbar/componentdata.json +0 -1
  998. package/components/Progressbar/index.d.ts +0 -4
  999. package/components/Progressbar/index.d.ts.map +0 -1
  1000. package/components/Progressbar/index.js +0 -2
  1001. package/components/Progressbar/index.js.map +0 -1
  1002. package/components/Progressbar/styles.module.scss +0 -91
  1003. package/components/Progressbar/styles.module.scss.d.ts +0 -16
  1004. package/components/Progressbar/utils.d.ts.map +0 -1
  1005. /package/components/{Progressbar → Stepper}/Dot.d.ts +0 -0
  1006. /package/components/{Progressbar → Stepper}/DotList.d.ts +0 -0
@@ -1,2 +1,2 @@
1
- import t from"react";import{a as e,T as o}from"../../Tooltip.js";import{longLoremText as m}from"../../utils/loremtext.js";import"../../hooks/useDelayedState.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../HelpBubble.js";import"classnames";import"../../constants.js";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../utils/refs.js";import"../../AnchorLink.js";import"../Icons/Icon.js";import"../Icons/ArrowUpRight.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../AnchorLink/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../../hooks/useBreakpoint.js";import"../HelpBubble/styles.module.scss";import"../../TooltipWord.js";import"../Tooltip/TooltipWord/styles.module.scss";const H=r=>t.createElement(e,null,t.createElement(t.Fragment,null,t.createElement(o,{...r},"Et tooltip her.")," "+m,t.createElement("button",null,"Knapp"),"Dette er ",t.createElement(o,{...r},r.children)," som skal ha n\xE6rmere forklaring.",m,t.createElement(o,{...r},"Enda et tooltip her.")));export{H as default};
1
+ import t from"react";import{longLoremText as m}from"../../utils/loremtext.js";import{b as i,T as r}from"../../Tooltip.js";import"../../TooltipWord.js";import"../../constants.js";import"../Tooltip/TooltipWord/styles.module.scss";import"../../hooks/useDelayedState.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../HelpBubble.js";import"classnames";import"../../AnchorLink.js";import"../../hooks/useHover.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/grid.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../Icons/Icon.js";import"../Icons/ArrowUpRight.js";import"../AnchorLink/styles.module.scss";import"../../Close.js";import"../../hooks/useBreakpoint.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../../PopOver.js";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../utils/refs.js";import"../PopOver/styles.module.scss";import"../HelpBubble/styles.module.scss";const e=o=>t.createElement(i,null,t.createElement(t.Fragment,null,t.createElement(r,{...o},"Et tooltip her.")," "+m,t.createElement("button",null,"Knapp"),"Dette er ",t.createElement(r,{...o},o.children)," som skal ha nærmere forklaring.",m,t.createElement(r,{...o},"Enda et tooltip her."))),J=e;export{J as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/TooltipExample/TooltipExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport Tooltip, { TooltipProps, TooltipOpenProvider } from '../Tooltip';\nimport longLoremText from '../../utils/loremtext';\n\nconst TooltipExample: React.FC<TooltipProps> = props => {\n return (\n <TooltipOpenProvider>\n <>\n <Tooltip {...props}>{'Et tooltip her.'}</Tooltip>\n {' ' + longLoremText}\n <button>{'Knapp'}</button>\n {'Dette er '}\n <Tooltip {...props}>{props.children}</Tooltip>\n {' som skal ha nærmere forklaring.'}\n {longLoremText}\n <Tooltip {...props}>{'Enda et tooltip her.'}</Tooltip>\n </>\n </TooltipOpenProvider>\n );\n};\n\nexport default TooltipExample;\n"],"names":["TooltipExample","props","React","TooltipOpenProvider","Tooltip","longLoremText"],"mappings":"kmCAKA,MAAMA,EAAkDC,GAEpDC,EAAA,cAACC,EACC,KAAAD,EAAA,cAAAA,EAAA,SAAA,KACGA,EAAA,cAAAE,EAAA,CAAS,GAAGH,CAAQ,EAAA,iBAAkB,EACtC,IAAMI,kBACN,SAAQ,KAAA,OAAQ,EAChB,YACAH,EAAA,cAAAE,EAAA,CAAS,GAAGH,CAAA,EAAQA,EAAM,QAAS,EACnC,sCACAI,EACAH,EAAA,cAAAE,EAAA,CAAS,GAAGH,CAAA,EAAQ,sBAAuB,CAC9C,CACF"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/TooltipExample/TooltipExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport longLoremText from '../../utils/loremtext';\nimport Tooltip, { TooltipProps, TooltipOpenProvider } from '../Tooltip';\n\nconst TooltipExample: React.FC<TooltipProps> = props => {\n return (\n <TooltipOpenProvider>\n <>\n <Tooltip {...props}>{'Et tooltip her.'}</Tooltip>\n {' ' + longLoremText}\n <button>{'Knapp'}</button>\n {'Dette er '}\n <Tooltip {...props}>{props.children}</Tooltip>\n {' som skal ha nærmere forklaring.'}\n {longLoremText}\n <Tooltip {...props}>{'Enda et tooltip her.'}</Tooltip>\n </>\n </TooltipOpenProvider>\n );\n};\n\nexport default TooltipExample;\n"],"names":["TooltipExample","props","React","TooltipOpenProvider","Tooltip","longLoremText","TooltipExample$1"],"mappings":"iqCAKA,MAAMA,EAAkDC,GAEnDC,EAAA,cAAAC,EAAA,KAEGD,EAAA,cAAAA,EAAA,SAAA,KAAAA,EAAA,cAACE,EAAS,CAAA,GAAGH,GAAQ,iBAAkB,EACtC,IAAMI,EACPH,EAAA,cAAC,cAAQ,OAAQ,EAChB,YACDA,EAAA,cAACE,EAAS,CAAA,GAAGH,CAAQ,EAAAA,EAAM,QAAS,EACnC,mCACAI,EACDH,EAAA,cAACE,EAAS,CAAA,GAAGH,CAAQ,EAAA,sBAAuB,CAC9C,CACF,EAIJK,EAAeN"}
@@ -1 +1 @@
1
- {"version":3,"file":"Validation.d.ts","sourceRoot":"","sources":["../../../src/components/Validation/Validation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAe,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE3D,UAAU,eAAe;IACvB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,qFAmBrB,CAAC;AAEH,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"Validation.d.ts","sourceRoot":"","sources":["../../../src/components/Validation/Validation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAe,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK3D,UAAU,eAAe;IACvB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,qFAmBrB,CAAC;AAEH,eAAe,UAAU,CAAC"}
@@ -1,2 +1,2 @@
1
- import"../../Validation.js";import{V as M,V as N}from"../../Validation.js";import"react";import"classnames";import"../../FormGroup.js";import"../FormGroup/styles.module.scss";import"../../Checkbox.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/Check.js";import"../Icons/Icon.js";import"../../constants.js";import"../../hooks/useUuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Checkbox/styles.module.scss";import"../../RadioButton.js";import"../RadioButton/styles.module.scss";import"../../Input.js";import"../../hooks/useBreakpoint.js";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"../../MaxCharacters.js";import"../MaxCharacters/styles.module.scss";import"../Input/styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../../FormLayout.js";import"../FormLayout/styles.module.scss";import"../../Select.js";import"../Select/styles.module.scss";import"../Icons/ChevronDown.js";import"../../utils/component.js";import"./styles.module.scss";export{M as Validation,N as default};
1
+ import{V as t}from"../../Validation.js";import{a as M}from"../../Validation.js";import"react";import"classnames";import"../../constants.js";import"../../FormGroup.js";import"../../utils/component.js";import"../../Checkbox.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/grid.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../Icons/Check.js";import"../Checkbox/styles.module.scss";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"../../FormLayout.js";import"../FormLayout/styles.module.scss";import"../../Input.js";import"../../hooks/useBreakpoint.js";import"../../MaxCharacters.js";import"../MaxCharacters/styles.module.scss";import"../Input/styles.module.scss";import"../../RadioButton.js";import"../RadioButton/styles.module.scss";import"../../Select.js";import"../Icons/ChevronDown.js";import"../Select/styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../FormGroup/styles.module.scss";import"./styles.module.scss";export{M as Validation,t as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- @import '../../scss/_spacers.scss';
2
- @import '../../scss/_palette.scss';
3
- @import '../../scss/font-settings.scss';
1
+ @import '../../scss/spacers';
2
+ @import '../../scss/palette';
3
+ @import '../../scss/font-settings';
4
4
 
5
5
  .validation {
6
6
  &__errors {
package/constants.d.ts CHANGED
@@ -25,7 +25,7 @@ export interface HTMLButtonProps {
25
25
  value?: string | string[] | number;
26
26
  id?: string;
27
27
  }
28
- export declare type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';
28
+ export type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';
29
29
  export interface HTMLAnchorProps {
30
30
  download?: string;
31
31
  href?: string;
@@ -36,7 +36,7 @@ export interface HTMLAnchorProps {
36
36
  target?: string;
37
37
  referrerPolicy?: '' | 'same-origin' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
38
38
  }
39
- export declare type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;
39
+ export type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;
40
40
  export declare enum FormMode {
41
41
  onwhite = "onwhite",
42
42
  ongrey = "ongrey",
@@ -60,6 +60,8 @@ export declare enum AnalyticsId {
60
60
  Expander = "expander",
61
61
  ExpanderList = "expander-list",
62
62
  ExpanderListExpander = "expander-list-expander",
63
+ ExpanderHierarchy = "expander-hierarchy",
64
+ ExpanderHierarchyExpander = "expander-hierarchy-expander",
63
65
  FormGroup = "form-group",
64
66
  FormLayout = "form-layout",
65
67
  HelpBubble = "help-bubble",
@@ -75,8 +77,10 @@ export declare enum AnalyticsId {
75
77
  NotificationPanel = "notification-panel",
76
78
  Panel = "panel",
77
79
  PanelList = "panel-list",
80
+ PopMenu = "pop-menu",
81
+ PopOver = "pop-over",
78
82
  Portal = "portal",
79
- Progressbar = "progressbar",
83
+ Stepper = "stepper",
80
84
  RadioButton = "radio-button",
81
85
  Select = "select",
82
86
  Slider = "slider",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,MAAM;CACb;AAED,oBAAY,MAAM;IAChB,KAAK,UAAU;IACf,eAAe,QAAQ;CACxB;AAED,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,oBAAY,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EACX,EAAE,GACF,aAAa,GACb,aAAa,GACb,4BAA4B,GAC5B,QAAQ,GACR,0BAA0B,GAC1B,eAAe,GACf,iCAAiC,GACjC,YAAY,CAAC;CAClB;AAED,oBAAY,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAEjF,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,WAAW;IACrB,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,YAAY,kBAAkB;IAC9B,oBAAoB,2BAA2B;IAC/C,SAAS,eAAe;IACxB,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,YAAY,kBAAkB;IAC9B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,cAAc;IACtB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,iBAAiB,uBAAuB;IACxC,KAAK,UAAU;IACf,SAAS,eAAe;IACxB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,WAAW,iBAAiB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,eAAe;IACxB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,OAAO,aAAa;IACpB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAED,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,GAAG,QAAQ;CACZ"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,MAAM;CACb;AAED,oBAAY,MAAM;IAChB,KAAK,UAAU;IACf,eAAe,QAAQ;CACxB;AAED,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EACX,EAAE,GACF,aAAa,GACb,aAAa,GACb,4BAA4B,GAC5B,QAAQ,GACR,0BAA0B,GAC1B,eAAe,GACf,iCAAiC,GACjC,YAAY,CAAC;CAClB;AAED,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAEjF,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,WAAW;IACrB,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,YAAY,kBAAkB;IAC9B,oBAAoB,2BAA2B;IAC/C,iBAAiB,uBAAuB;IACxC,yBAAyB,gCAAgC;IACzD,SAAS,eAAe;IACxB,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,YAAY,kBAAkB;IAC9B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,cAAc;IACtB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,iBAAiB,uBAAuB;IACxC,KAAK,UAAU;IACf,SAAS,eAAe;IACxB,OAAO,aAAa;IACpB,OAAO,aAAa;IACpB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,eAAe;IACxB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,OAAO,aAAa;IACpB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAED,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,GAAG,QAAQ;CACZ"}
package/constants.js CHANGED
@@ -1,2 +1,2 @@
1
- var o=(r=>(r[r.XXSmall=24]="XXSmall",r[r.XSmall=38]="XSmall",r[r.Small=48]="Small",r[r.Medium=64]="Medium",r[r.Large=80]="Large",r[r.XLarge=130]="XLarge",r))(o||{}),e=(r=>(r[r.Modal=13e5]="Modal",r[r.ExpanderTrigger=1e4]="ExpanderTrigger",r))(e||{});const u=12;var a=(r=>(r.onwhite="onwhite",r.ongrey="ongrey",r.onblueberry="onblueberry",r.ondark="ondark",r.oninvalid="oninvalid",r))(a||{}),p=(r=>(r.normal="normal",r.bigform="bigform",r))(p||{}),g=(r=>(r.AnchorLink="anchor-link",r.Avatar="avatar",r.Badge="badge",r.Button="button",r.Checkbox="checkbox",r.Close="close",r.Dropdown="dropdown",r.Duolist="duolist",r.Expander="expander",r.ExpanderList="expander-list",r.ExpanderListExpander="expander-list-expander",r.FormGroup="form-group",r.FormLayout="form-layout",r.HelpBubble="help-bubble",r.HighlightBox="highlight-box",r.Icon="icon",r.Input="input",r.Link="link",r.LinkList="link-list",r.List="list",r.Loader="loader",r.Logo="logo",r.Modal="modal",r.NotificationPanel="notification-panel",r.Panel="panel",r.PanelList="panel-list",r.Portal="portal",r.Progressbar="progressbar",r.RadioButton="radio-button",r.Select="select",r.Slider="slider",r.Spacer="spacer",r.StatusDot="status-dot",r.Table="table",r.Tag="tag",r.TagList="tag-list",r.Textarea="textarea",r.Tile="tile",r.Title="title",r.Tooltip="tooltip",r.Validation="validation",r))(g||{}),l=(r=>(r.Enter="Enter",r.Escape="Escape",r.ArrowDown="ArrowDown",r.ArrowUp="ArrowUp",r.Home="Home",r.End="End",r))(l||{});export{u as AVERAGE_CHARACTER_WIDTH_PX,g as AnalyticsId,a as FormMode,p as FormVariant,o as IconSize,l as KeyboardEventKey,e as ZIndex};
1
+ var e=(r=>(r[r.XXSmall=24]="XXSmall",r[r.XSmall=38]="XSmall",r[r.Small=48]="Small",r[r.Medium=64]="Medium",r[r.Large=80]="Large",r[r.XLarge=130]="XLarge",r))(e||{}),o=(r=>(r[r.Modal=13e5]="Modal",r[r.ExpanderTrigger=1e4]="ExpanderTrigger",r))(o||{});const t=12;var p=(r=>(r.onwhite="onwhite",r.ongrey="ongrey",r.onblueberry="onblueberry",r.ondark="ondark",r.oninvalid="oninvalid",r))(p||{}),a=(r=>(r.normal="normal",r.bigform="bigform",r))(a||{}),u=(r=>(r.AnchorLink="anchor-link",r.Avatar="avatar",r.Badge="badge",r.Button="button",r.Checkbox="checkbox",r.Close="close",r.Dropdown="dropdown",r.Duolist="duolist",r.Expander="expander",r.ExpanderList="expander-list",r.ExpanderListExpander="expander-list-expander",r.ExpanderHierarchy="expander-hierarchy",r.ExpanderHierarchyExpander="expander-hierarchy-expander",r.FormGroup="form-group",r.FormLayout="form-layout",r.HelpBubble="help-bubble",r.HighlightBox="highlight-box",r.Icon="icon",r.Input="input",r.Link="link",r.LinkList="link-list",r.List="list",r.Loader="loader",r.Logo="logo",r.Modal="modal",r.NotificationPanel="notification-panel",r.Panel="panel",r.PanelList="panel-list",r.PopMenu="pop-menu",r.PopOver="pop-over",r.Portal="portal",r.Stepper="stepper",r.RadioButton="radio-button",r.Select="select",r.Slider="slider",r.Spacer="spacer",r.StatusDot="status-dot",r.Table="table",r.Tag="tag",r.TagList="tag-list",r.Textarea="textarea",r.Tile="tile",r.Title="title",r.Tooltip="tooltip",r.Validation="validation",r))(u||{}),g=(r=>(r.Enter="Enter",r.Escape="Escape",r.ArrowDown="ArrowDown",r.ArrowUp="ArrowUp",r.Home="Home",r.End="End",r))(g||{});export{t as AVERAGE_CHARACTER_WIDTH_PX,u as AnalyticsId,p as FormMode,a as FormVariant,e as IconSize,g as KeyboardEventKey,o as ZIndex};
2
2
  //# sourceMappingURL=constants.js.map
package/constants.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export enum IconSize {\n XXSmall = 24,\n XSmall = 38,\n Small = 48,\n Medium = 64,\n Large = 80,\n XLarge = 130,\n}\n\nexport enum ZIndex {\n Modal = 1300000,\n ExpanderTrigger = 10000,\n}\n\nexport const AVERAGE_CHARACTER_WIDTH_PX = 12;\n\nexport interface HTMLButtonProps {\n autoFocus?: boolean;\n disabled?: boolean;\n form?: string;\n formAction?: string;\n formEncType?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n name?: string;\n type?: 'submit' | 'reset' | 'button' | string;\n value?: string | string[] | number;\n id?: string;\n}\n\nexport type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';\n\nexport interface HTMLAnchorProps {\n download?: string;\n href?: string;\n hrefLang?: string;\n media?: string;\n ping?: string;\n rel?: AnchorTarget;\n target?: string;\n referrerPolicy?:\n | ''\n | 'same-origin'\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url';\n}\n\nexport type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;\n\nexport enum FormMode {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormVariant {\n normal = 'normal',\n bigform = 'bigform',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Close = 'close',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n Expander = 'expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HighlightBox = 'highlight-box',\n Icon = 'icon',\n Input = 'input',\n Link = 'link',\n LinkList = 'link-list',\n List = 'list',\n Loader = 'loader',\n Logo = 'logo',\n Modal = 'modal',\n NotificationPanel = 'notification-panel',\n Panel = 'panel',\n PanelList = 'panel-list',\n Portal = 'portal',\n Progressbar = 'progressbar',\n RadioButton = 'radio-button',\n Select = 'select',\n Slider = 'slider',\n Spacer = 'spacer',\n StatusDot = 'status-dot',\n Table = 'table',\n Tag = 'tag',\n TagList = 'tag-list',\n Textarea = 'textarea',\n Tile = 'tile',\n Title = 'title',\n Tooltip = 'tooltip',\n Validation = 'validation',\n}\n\nexport enum KeyboardEventKey {\n Enter = 'Enter',\n Escape = 'Escape',\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n Home = 'Home',\n End = 'End',\n}\n"],"names":["IconSize","ZIndex","AVERAGE_CHARACTER_WIDTH_PX","FormMode","FormVariant","AnalyticsId","KeyboardEventKey"],"mappings":"AAAY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,QAAU,IAAV,UACAA,EAAAA,EAAA,OAAS,IAAT,SACAA,EAAAA,EAAA,MAAQ,IAAR,QACAA,EAAAA,EAAA,OAAS,IAAT,SACAA,EAAAA,EAAA,MAAQ,IAAR,QACAA,EAAAA,EAAA,OAAS,KAAT,SANUA,IAAAA,GAAA,CAAA,CAAA,EASAC,GAAAA,IACVA,EAAAA,EAAA,MAAQ,MAAR,QACAA,EAAAA,EAAA,gBAAkB,KAAlB,kBAFUA,IAAAA,GAAA,CAAA,CAAA,EAKL,MAAMC,EAA6B,GAyC9B,IAAAC,GAAAA,IACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,YAAc,cACdA,EAAA,OAAS,SACTA,EAAA,UAAY,YALFA,IAAAA,GAAA,CAAA,CAAA,EAQAC,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UAFAA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACVA,EAAA,WAAa,cACbA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,aAAe,gBACfA,EAAA,qBAAuB,yBACvBA,EAAA,UAAY,aACZA,EAAA,WAAa,cACbA,EAAA,WAAa,cACbA,EAAA,aAAe,gBACfA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,SAAW,YACXA,EAAA,KAAO,OACPA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,kBAAoB,qBACpBA,EAAA,MAAQ,QACRA,EAAA,UAAY,aACZA,EAAA,OAAS,SACTA,EAAA,YAAc,cACdA,EAAA,YAAc,eACdA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,UAAY,aACZA,EAAA,MAAQ,QACRA,EAAA,IAAM,MACNA,EAAA,QAAU,WACVA,EAAA,SAAW,WACXA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,QAAU,UACVA,EAAA,WAAa,aAzCHA,IAAAA,GAAA,CAAA,CAAA,EA4CAC,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,QAAU,UACVA,EAAA,KAAO,OACPA,EAAA,IAAM,MANIA,IAAAA,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export enum IconSize {\n XXSmall = 24,\n XSmall = 38,\n Small = 48,\n Medium = 64,\n Large = 80,\n XLarge = 130,\n}\n\nexport enum ZIndex {\n Modal = 1300000,\n ExpanderTrigger = 10000,\n}\n\nexport const AVERAGE_CHARACTER_WIDTH_PX = 12;\n\nexport interface HTMLButtonProps {\n autoFocus?: boolean;\n disabled?: boolean;\n form?: string;\n formAction?: string;\n formEncType?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n name?: string;\n type?: 'submit' | 'reset' | 'button' | string;\n value?: string | string[] | number;\n id?: string;\n}\n\nexport type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';\n\nexport interface HTMLAnchorProps {\n download?: string;\n href?: string;\n hrefLang?: string;\n media?: string;\n ping?: string;\n rel?: AnchorTarget;\n target?: string;\n referrerPolicy?:\n | ''\n | 'same-origin'\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url';\n}\n\nexport type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;\n\nexport enum FormMode {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormVariant {\n normal = 'normal',\n bigform = 'bigform',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Close = 'close',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n Expander = 'expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n ExpanderHierarchy = 'expander-hierarchy',\n ExpanderHierarchyExpander = 'expander-hierarchy-expander',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HighlightBox = 'highlight-box',\n Icon = 'icon',\n Input = 'input',\n Link = 'link',\n LinkList = 'link-list',\n List = 'list',\n Loader = 'loader',\n Logo = 'logo',\n Modal = 'modal',\n NotificationPanel = 'notification-panel',\n Panel = 'panel',\n PanelList = 'panel-list',\n PopMenu = 'pop-menu',\n PopOver = 'pop-over',\n Portal = 'portal',\n Stepper = 'stepper',\n RadioButton = 'radio-button',\n Select = 'select',\n Slider = 'slider',\n Spacer = 'spacer',\n StatusDot = 'status-dot',\n Table = 'table',\n Tag = 'tag',\n TagList = 'tag-list',\n Textarea = 'textarea',\n Tile = 'tile',\n Title = 'title',\n Tooltip = 'tooltip',\n Validation = 'validation',\n}\n\nexport enum KeyboardEventKey {\n Enter = 'Enter',\n Escape = 'Escape',\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n Home = 'Home',\n End = 'End',\n}\n"],"names":["IconSize","ZIndex","AVERAGE_CHARACTER_WIDTH_PX","FormMode","FormVariant","AnalyticsId","KeyboardEventKey"],"mappings":"AAAY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,QAAU,EAAV,EAAA,UACAA,EAAAA,EAAA,OAAS,EAAT,EAAA,SACAA,EAAAA,EAAA,MAAQ,EAAR,EAAA,QACAA,EAAAA,EAAA,OAAS,EAAT,EAAA,SACAA,EAAAA,EAAA,MAAQ,EAAR,EAAA,QACAA,EAAAA,EAAA,OAAS,GAAT,EAAA,SANUA,IAAAA,GAAA,CAAA,CAAA,EASAC,GAAAA,IACVA,EAAAA,EAAA,MAAQ,IAAR,EAAA,QACAA,EAAAA,EAAA,gBAAkB,GAAlB,EAAA,kBAFUA,IAAAA,GAAA,CAAA,CAAA,EAKL,MAAMC,EAA6B,GAyC9B,IAAAC,GAAAA,IACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,YAAc,cACdA,EAAA,OAAS,SACTA,EAAA,UAAY,YALFA,IAAAA,GAAA,CAAA,CAAA,EAQAC,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UAFAA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACVA,EAAA,WAAa,cACbA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,aAAe,gBACfA,EAAA,qBAAuB,yBACvBA,EAAA,kBAAoB,qBACpBA,EAAA,0BAA4B,8BAC5BA,EAAA,UAAY,aACZA,EAAA,WAAa,cACbA,EAAA,WAAa,cACbA,EAAA,aAAe,gBACfA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,SAAW,YACXA,EAAA,KAAO,OACPA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,kBAAoB,qBACpBA,EAAA,MAAQ,QACRA,EAAA,UAAY,aACZA,EAAA,QAAU,WACVA,EAAA,QAAU,WACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,YAAc,eACdA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,UAAY,aACZA,EAAA,MAAQ,QACRA,EAAA,IAAM,MACNA,EAAA,QAAU,WACVA,EAAA,SAAW,WACXA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,QAAU,UACVA,EAAA,WAAa,aA7CHA,IAAAA,GAAA,CAAA,CAAA,EAgDAC,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,QAAU,UACVA,EAAA,KAAO,OACPA,EAAA,IAAM,MANIA,IAAAA,GAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- import"./withBreakpoint.js";import{withBreakpoint as e,withBreakpoint as f}from"./withBreakpoint.js";import"react";import"../../hooks/useBreakpoint.js";import"../../theme/grid.js";export{e as default,f as withBreakpoint};
1
+ import{withBreakpoint as o}from"./withBreakpoint.js";import"react";import"../../hooks/useBreakpoint.js";import"../../theme/grid.js";export{o as default,o as withBreakpoint};
2
2
  //# sourceMappingURL=index.js.map
@@ -7,7 +7,7 @@ export declare function withBreakpoint<P extends BreakpointProps, C extends Reac
7
7
  ref?: React.Ref<InstanceType<C>>;
8
8
  }, keyof BreakpointProps>>;
9
9
  export declare function withBreakpoint<P extends BreakpointProps & {
10
- ref?: React.Ref<any>;
10
+ ref?: React.Ref<unknown>;
11
11
  }>(Component: React.ForwardRefExoticComponent<P>): React.ForwardRefExoticComponent<Omit<P, keyof BreakpointProps>>;
12
12
  export declare function withBreakpoint<P extends BreakpointProps>(Component: React.FunctionComponent<P>): React.ForwardRefExoticComponent<Omit<P, keyof BreakpointProps>>;
13
13
  export default withBreakpoint;
@@ -1 +1 @@
1
- {"version":3,"file":"withBreakpoint.d.ts","sourceRoot":"","sources":["../../../src/hoc/withBreakpoint/withBreakpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAiB,MAAM,2BAA2B,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,UAAU,CAAC;CACxB;AAGD,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,EAAE,CAAC,SAAS,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EACzF,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GACpC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC;AAE1I,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAAE,EACjF,SAAS,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,GAC5C,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC;AAEnE,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,EACtD,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,GACpC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC;AASnE,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"withBreakpoint.d.ts","sourceRoot":"","sources":["../../../src/hoc/withBreakpoint/withBreakpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAiB,MAAM,2BAA2B,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,UAAU,CAAC;CACxB;AAGD,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,EAAE,CAAC,SAAS,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EACzF,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GACpC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC;AAE1I,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;CAAE,EACrF,SAAS,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,GAC5C,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC;AAEnE,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,EACtD,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,GACpC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC;AASnE,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"withBreakpoint.js","sources":["../../../src/hoc/withBreakpoint/withBreakpoint.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\n\nexport interface BreakpointProps {\n breakpoint: Breakpoint;\n}\n\n// Hentet fra https://github.com/DefinitelyTyped/DefinitelyTyped/issues/35834#issuecomment-497605842\nexport function withBreakpoint<P extends BreakpointProps, C extends React.ComponentClass<P>>(\n Component: C & React.ComponentType<P>\n): React.ForwardRefExoticComponent<Omit<React.ComponentPropsWithoutRef<C> & { ref?: React.Ref<InstanceType<C>> }, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps & { ref?: React.Ref<any> }>(\n Component: React.ForwardRefExoticComponent<P>\n): React.ForwardRefExoticComponent<Omit<P, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps>(\n Component: React.FunctionComponent<P>\n): React.ForwardRefExoticComponent<Omit<P, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps>(Component: React.ComponentType<P>) {\n return React.forwardRef((props, ref) => {\n const breakpoint = useBreakpoint();\n return <Component ref={ref} {...(props as P)} breakpoint={breakpoint} />;\n });\n}\n\nexport default withBreakpoint;\n"],"names":["withBreakpoint","Component","React","props","ref","breakpoint","useBreakpoint"],"mappings":"8GAqBO,SAASA,EAA0CC,EAAmC,CAC3F,OAAOC,EAAM,WAAW,CAACC,EAAOC,IAAQ,CACtC,MAAMC,EAAaC,IACnB,OAAQJ,EAAA,cAAAD,EAAA,CAAU,IAAAG,EAAW,GAAID,EAAa,WAAAE,CAAA,CAAwB,CAAA,CACvE,CACH"}
1
+ {"version":3,"file":"withBreakpoint.js","sources":["../../../src/hoc/withBreakpoint/withBreakpoint.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\n\nexport interface BreakpointProps {\n breakpoint: Breakpoint;\n}\n\n// Hentet fra https://github.com/DefinitelyTyped/DefinitelyTyped/issues/35834#issuecomment-497605842\nexport function withBreakpoint<P extends BreakpointProps, C extends React.ComponentClass<P>>(\n Component: C & React.ComponentType<P>\n): React.ForwardRefExoticComponent<Omit<React.ComponentPropsWithoutRef<C> & { ref?: React.Ref<InstanceType<C>> }, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps & { ref?: React.Ref<unknown> }>(\n Component: React.ForwardRefExoticComponent<P>\n): React.ForwardRefExoticComponent<Omit<P, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps>(\n Component: React.FunctionComponent<P>\n): React.ForwardRefExoticComponent<Omit<P, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps>(Component: React.ComponentType<P>) {\n return React.forwardRef((props, ref) => {\n const breakpoint = useBreakpoint();\n return <Component ref={ref} {...(props as P)} breakpoint={breakpoint} />;\n });\n}\n\nexport default withBreakpoint;\n"],"names":["withBreakpoint","Component","React","props","ref","breakpoint","useBreakpoint"],"mappings":"8GAqBO,SAASA,EAA0CC,EAAmC,CAC3F,OAAOC,EAAM,WAAW,CAACC,EAAOC,IAAQ,CACtC,MAAMC,EAAaC,IACnB,OAAQJ,EAAA,cAAAD,EAAA,CAAU,IAAAG,EAAW,GAAID,EAAa,WAAAE,CAAwB,CAAA,CAAA,CACvE,CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAGA,oBAAY,UAAU;IACpB,GAAqB;IACrB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAO,UA2DhC,CAAC"}
1
+ {"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAIA,oBAAY,UAAU;IACpB,GAAqB;IACrB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAO,UA2DhC,CAAC"}
@@ -1,2 +1,2 @@
1
- import{useState as l,useEffect as h}from"react";import{breakpoints as t,screen as a}from"../theme/grid.js";var r=(s=>(s[s.xxs=t.xxs]="xxs",s[s.xs=t.xs]="xs",s[s.sm=t.sm]="sm",s[s.md=t.md]="md",s[s.lg=t.lg]="lg",s[s.xl=t.xl]="xl",s))(r||{});const y=()=>{const[s,m]=l(r.xxs);return h(()=>{var n,u;const d=e=>{switch(e.media){case a.xl:m(e.matches?r.xl:r.lg);return;case a.lg:m(e.matches?r.lg:r.md);return;case a.md:m(e.matches?r.md:r.sm);return;case a.sm:m(e.matches?r.sm:r.xs);return;case a.xs:m(e.matches?r.xs:r.xxs);return;default:m(r.xxs);return}},i=Object.entries(a).reverse().map(([e,x])=>({breakpoint:r[e],mediaQuery:window.matchMedia(x)}));i.forEach(e=>{e.mediaQuery.addEventListener?e.mediaQuery.addEventListener("change",d):e.mediaQuery.addListener&&e.mediaQuery.addListener(d)});const c=(u=(n=i.find(e=>e.mediaQuery.matches))==null?void 0:n.breakpoint)!=null?u:s;return m(c),()=>{i.forEach(e=>{e.mediaQuery.removeEventListener?e.mediaQuery.removeEventListener("change",d):e.mediaQuery.removeListener&&e.mediaQuery.removeListener(d)})}},[]),s};export{r as Breakpoint,y as useBreakpoint};
1
+ import{useState as x,useEffect as l}from"react";import{breakpoints as t,screen as a}from"../theme/grid.js";var r=(s=>(s[s.xxs=t.xxs]="xxs",s[s.xs=t.xs]="xs",s[s.sm=t.sm]="sm",s[s.md=t.md]="md",s[s.lg=t.lg]="lg",s[s.xl=t.xl]="xl",s))(r||{});const f=()=>{const[s,m]=x(r.xxs);return l(()=>{var n;const d=e=>{switch(e.media){case a.xl:m(e.matches?r.xl:r.lg);return;case a.lg:m(e.matches?r.lg:r.md);return;case a.md:m(e.matches?r.md:r.sm);return;case a.sm:m(e.matches?r.sm:r.xs);return;case a.xs:m(e.matches?r.xs:r.xxs);return;default:m(r.xxs);return}},i=Object.entries(a).reverse().map(([e,c])=>({breakpoint:r[e],mediaQuery:window.matchMedia(c)}));i.forEach(e=>{e.mediaQuery.addEventListener?e.mediaQuery.addEventListener("change",d):e.mediaQuery.addListener&&e.mediaQuery.addListener(d)});const u=((n=i.find(e=>e.mediaQuery.matches))==null?void 0:n.breakpoint)??s;return m(u),()=>{i.forEach(e=>{e.mediaQuery.removeEventListener?e.mediaQuery.removeEventListener("change",d):e.mediaQuery.removeListener&&e.mediaQuery.removeListener(d)})}},[]),s};export{r as Breakpoint,f as useBreakpoint};
2
2
  //# sourceMappingURL=useBreakpoint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useBreakpoint.js","sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport { breakpoints, screen } from '../theme/grid';\n\nexport enum Breakpoint {\n xxs = breakpoints.xxs,\n xs = breakpoints.xs,\n sm = breakpoints.sm,\n md = breakpoints.md,\n lg = breakpoints.lg,\n xl = breakpoints.xl,\n}\n\n/**\n * Lytt på endringer i breakpoint basert på media queries. Trigger re-render bare når breakpoint er endret.\n * @returns Gjeldende breakpoint\n */\nexport const useBreakpoint = (): Breakpoint => {\n const [breakpoint, setBreakpoint] = useState<Breakpoint>(Breakpoint.xxs);\n\n useEffect(() => {\n const handleMediaQueryEvent = (event: MediaQueryListEvent): void => {\n switch (event.media) {\n case screen.xl:\n setBreakpoint(event.matches ? Breakpoint.xl : Breakpoint.lg);\n return;\n case screen.lg:\n setBreakpoint(event.matches ? Breakpoint.lg : Breakpoint.md);\n return;\n case screen.md:\n setBreakpoint(event.matches ? Breakpoint.md : Breakpoint.sm);\n return;\n case screen.sm:\n setBreakpoint(event.matches ? Breakpoint.sm : Breakpoint.xs);\n return;\n case screen.xs:\n setBreakpoint(event.matches ? Breakpoint.xs : Breakpoint.xxs);\n return;\n default:\n setBreakpoint(Breakpoint.xxs);\n return;\n }\n };\n\n // Lytt etter endringer for hvert breakpoint\n const mediaQueryList = Object.entries(screen)\n .reverse()\n .map(([size, mediaQuery]) => {\n return { breakpoint: Breakpoint[size as keyof typeof Breakpoint], mediaQuery: window.matchMedia(mediaQuery) };\n });\n mediaQueryList.forEach(x => {\n // iOS <=13 har ikke støtte for addEventListener/removeEventListener på MediaQueryList,\n // men har støtte for addListener\n if (x.mediaQuery.addEventListener) {\n x.mediaQuery.addEventListener('change', handleMediaQueryEvent);\n } else if (x.mediaQuery.addListener) {\n x.mediaQuery.addListener(handleMediaQueryEvent);\n }\n });\n\n // Finn breakpoint ved første render\n const initialBreakpoint = mediaQueryList.find(x => x.mediaQuery.matches)?.breakpoint ?? breakpoint;\n setBreakpoint(initialBreakpoint);\n\n return (): void => {\n mediaQueryList.forEach(x => {\n if (x.mediaQuery.removeEventListener) {\n x.mediaQuery.removeEventListener('change', handleMediaQueryEvent);\n } else if (x.mediaQuery.removeListener) {\n x.mediaQuery.removeListener(handleMediaQueryEvent);\n }\n });\n };\n }, []);\n\n return breakpoint;\n};\n"],"names":["Breakpoint","breakpoints","useBreakpoint","breakpoint","setBreakpoint","useState","useEffect","handleMediaQueryEvent","event","screen","mediaQueryList","size","mediaQuery","x","initialBreakpoint","_b","_a"],"mappings":"2GAGY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,IAAMC,EAAY,KAAlB,MACAD,EAAAA,EAAA,GAAKC,EAAY,IAAjB,KACAD,EAAAA,EAAA,GAAKC,EAAY,IAAjB,KACAD,EAAAA,EAAA,GAAKC,EAAY,IAAjB,KACAD,EAAAA,EAAA,GAAKC,EAAY,IAAjB,KACAD,EAAAA,EAAA,GAAKC,EAAY,IAAjB,KANUD,IAAAA,GAAA,CAAA,CAAA,EAaL,MAAME,EAAgB,IAAkB,CAC7C,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAqBL,EAAW,GAAG,EAEvE,OAAAM,EAAU,IAAM,SACR,MAAAC,EAAyBC,GAAqC,CAClE,OAAQA,EAAM,MAAO,CACnB,KAAKC,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,GAAG,EAC5D,OACF,QACEI,EAAcJ,EAAW,GAAG,EAC5B,MACJ,CAAA,EAIIU,EAAiB,OAAO,QAAQD,CAAM,EACzC,QACA,EAAA,IAAI,CAAC,CAACE,EAAMC,CAAU,KACd,CAAE,WAAYZ,EAAWW,GAAkC,WAAY,OAAO,WAAWC,CAAU,GAC3G,EACHF,EAAe,QAAaG,GAAA,CAGtBA,EAAE,WAAW,iBACbA,EAAA,WAAW,iBAAiB,SAAUN,CAAqB,EACpDM,EAAE,WAAW,aACpBA,EAAA,WAAW,YAAYN,CAAqB,CAChD,CACD,EAGK,MAAAO,GAAoBC,GAAAC,EAAAN,EAAe,KAAKG,GAAKA,EAAE,WAAW,OAAO,IAA7C,YAAAG,EAAgD,aAAhD,KAAAD,EAA8DZ,EACxF,OAAAC,EAAcU,CAAiB,EAExB,IAAY,CACjBJ,EAAe,QAAaG,GAAA,CACtBA,EAAE,WAAW,oBACbA,EAAA,WAAW,oBAAoB,SAAUN,CAAqB,EACvDM,EAAE,WAAW,gBACpBA,EAAA,WAAW,eAAeN,CAAqB,CACnD,CACD,CAAA,CAEL,EAAG,CAAE,CAAA,EAEEJ,CACT"}
1
+ {"version":3,"file":"useBreakpoint.js","sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { breakpoints, screen } from '../theme/grid';\n\nexport enum Breakpoint {\n xxs = breakpoints.xxs,\n xs = breakpoints.xs,\n sm = breakpoints.sm,\n md = breakpoints.md,\n lg = breakpoints.lg,\n xl = breakpoints.xl,\n}\n\n/**\n * Lytt på endringer i breakpoint basert på media queries. Trigger re-render bare når breakpoint er endret.\n * @returns Gjeldende breakpoint\n */\nexport const useBreakpoint = (): Breakpoint => {\n const [breakpoint, setBreakpoint] = useState<Breakpoint>(Breakpoint.xxs);\n\n useEffect(() => {\n const handleMediaQueryEvent = (event: MediaQueryListEvent): void => {\n switch (event.media) {\n case screen.xl:\n setBreakpoint(event.matches ? Breakpoint.xl : Breakpoint.lg);\n return;\n case screen.lg:\n setBreakpoint(event.matches ? Breakpoint.lg : Breakpoint.md);\n return;\n case screen.md:\n setBreakpoint(event.matches ? Breakpoint.md : Breakpoint.sm);\n return;\n case screen.sm:\n setBreakpoint(event.matches ? Breakpoint.sm : Breakpoint.xs);\n return;\n case screen.xs:\n setBreakpoint(event.matches ? Breakpoint.xs : Breakpoint.xxs);\n return;\n default:\n setBreakpoint(Breakpoint.xxs);\n return;\n }\n };\n\n // Lytt etter endringer for hvert breakpoint\n const mediaQueryList = Object.entries(screen)\n .reverse()\n .map(([size, mediaQuery]) => {\n return { breakpoint: Breakpoint[size as keyof typeof Breakpoint], mediaQuery: window.matchMedia(mediaQuery) };\n });\n mediaQueryList.forEach(x => {\n // iOS <=13 har ikke støtte for addEventListener/removeEventListener på MediaQueryList,\n // men har støtte for addListener\n if (x.mediaQuery.addEventListener) {\n x.mediaQuery.addEventListener('change', handleMediaQueryEvent);\n } else if (x.mediaQuery.addListener) {\n x.mediaQuery.addListener(handleMediaQueryEvent);\n }\n });\n\n // Finn breakpoint ved første render\n const initialBreakpoint = mediaQueryList.find(x => x.mediaQuery.matches)?.breakpoint ?? breakpoint;\n setBreakpoint(initialBreakpoint);\n\n return (): void => {\n mediaQueryList.forEach(x => {\n if (x.mediaQuery.removeEventListener) {\n x.mediaQuery.removeEventListener('change', handleMediaQueryEvent);\n } else if (x.mediaQuery.removeListener) {\n x.mediaQuery.removeListener(handleMediaQueryEvent);\n }\n });\n };\n }, []);\n\n return breakpoint;\n};\n"],"names":["Breakpoint","breakpoints","useBreakpoint","breakpoint","setBreakpoint","useState","useEffect","handleMediaQueryEvent","event","screen","mediaQueryList","size","mediaQuery","x","initialBreakpoint","_a"],"mappings":"2GAIY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,IAAMC,EAAY,GAAlB,EAAA,MACAD,EAAAA,EAAA,GAAKC,EAAY,EAAjB,EAAA,KACAD,EAAAA,EAAA,GAAKC,EAAY,EAAjB,EAAA,KACAD,EAAAA,EAAA,GAAKC,EAAY,EAAjB,EAAA,KACAD,EAAAA,EAAA,GAAKC,EAAY,EAAjB,EAAA,KACAD,EAAAA,EAAA,GAAKC,EAAY,EAAjB,EAAA,KANUD,IAAAA,GAAA,CAAA,CAAA,EAaL,MAAME,EAAgB,IAAkB,CAC7C,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAqBL,EAAW,GAAG,EAEvE,OAAAM,EAAU,IAAM,OACR,MAAAC,EAAyBC,GAAqC,CAClE,OAAQA,EAAM,MAAO,CACnB,KAAKC,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,GAAG,EAC5D,OACF,QACEI,EAAcJ,EAAW,GAAG,EAC5B,MACJ,CAAA,EAIIU,EAAiB,OAAO,QAAQD,CAAM,EACzC,QACA,EAAA,IAAI,CAAC,CAACE,EAAMC,CAAU,KACd,CAAE,WAAYZ,EAAWW,CAA+B,EAAG,WAAY,OAAO,WAAWC,CAAU,GAC3G,EACHF,EAAe,QAAaG,GAAA,CAGtBA,EAAE,WAAW,iBACbA,EAAA,WAAW,iBAAiB,SAAUN,CAAqB,EACpDM,EAAE,WAAW,aACpBA,EAAA,WAAW,YAAYN,CAAqB,CAChD,CACD,EAGK,MAAAO,IAAoBC,EAAAL,EAAe,KAAKG,GAAKA,EAAE,WAAW,OAAO,IAA7C,YAAAE,EAAgD,aAAcZ,EACxF,OAAAC,EAAcU,CAAiB,EAExB,IAAY,CACjBJ,EAAe,QAAaG,GAAA,CACtBA,EAAE,WAAW,oBACbA,EAAA,WAAW,oBAAoB,SAAUN,CAAqB,EACvDM,EAAE,WAAW,gBACpBA,EAAA,WAAW,eAAeN,CAAqB,CACnD,CACD,CAAA,CAEL,EAAG,CAAE,CAAA,EAEEJ,CACT"}
@@ -0,0 +1,3 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ export declare const useExpand: (expanded: boolean, onExpand?: ((isExpanded: boolean) => void) | undefined) => [boolean, Dispatch<SetStateAction<boolean>>];
3
+ //# sourceMappingURL=useExpand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useExpand.d.ts","sourceRoot":"","sources":["../../src/hooks/useExpand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AAItE,eAAO,MAAM,SAAS,aAAc,OAAO,2BAA0B,OAAO,KAAK,IAAI,kBAAG,CAAC,OAAO,EAAE,SAAS,eAAe,OAAO,CAAC,CAAC,CAiBlI,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{useState as u,useEffect as o}from"react";import{usePrevious as f}from"./usePrevious.js";const p=(t,r)=>{const[s,e]=u(t),i=f(s);return o(()=>{t!==s&&e(t)},[t]),o(()=>{r&&s!==!!i&&r(s)},[s,r]),[s,e]};export{p as useExpand};
2
+ //# sourceMappingURL=useExpand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useExpand.js","sources":["../../src/hooks/useExpand.ts"],"sourcesContent":["import { Dispatch, SetStateAction, useEffect, useState } from 'react';\n\nimport { usePrevious } from './usePrevious';\n\nexport const useExpand = (expanded: boolean, onExpand?: (isExpanded: boolean) => void): [boolean, Dispatch<SetStateAction<boolean>>] => {\n const [isExpanded, setIsExpanded] = useState(expanded);\n const previousIsExpanded = usePrevious(isExpanded);\n\n useEffect(() => {\n if (expanded !== isExpanded) {\n setIsExpanded(expanded);\n }\n }, [expanded]);\n\n useEffect(() => {\n if (onExpand && isExpanded !== !!previousIsExpanded) {\n onExpand(isExpanded);\n }\n }, [isExpanded, onExpand]);\n\n return [isExpanded, setIsExpanded];\n};\n"],"names":["useExpand","expanded","onExpand","isExpanded","setIsExpanded","useState","previousIsExpanded","usePrevious","useEffect"],"mappings":"+FAIa,MAAAA,EAAY,CAACC,EAAmBC,IAA2F,CACtI,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAASJ,CAAQ,EAC/CK,EAAqBC,EAAYJ,CAAU,EAEjD,OAAAK,EAAU,IAAM,CACVP,IAAaE,GACfC,EAAcH,CAAQ,CACxB,EACC,CAACA,CAAQ,CAAC,EAEbO,EAAU,IAAM,CACVN,GAAYC,IAAe,CAAC,CAACG,GAC/BJ,EAASC,CAAU,CACrB,EACC,CAACA,EAAYD,CAAQ,CAAC,EAElB,CAACC,EAAYC,CAAa,CACnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusToggle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,eAAe,OAAO,KAAG,IA6BxF,CAAC"}
1
+ {"version":3,"file":"useFocusToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusToggle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,eAAe,OAAO,KAAG,IA6BxF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusToggle.js","sources":["../../src/hooks/useFocusToggle.ts"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { useElementList } from './useElementList';\nimport { FOCUSABLE_SELECTORS } from './useFocusableElements';\n\n/**\n * Skru av og på fokus på fokuserbare elementer slik at de kan være en del av DOMen, men samtidig\n * ikke kunne fokuseres/tabbes til med tastaturet.\n * @param ref Alle barn av dette elementet vil sjekkes for om de er fokuserbare\n * @param allowFocus Om elementene skal være fokuserbare eller ikke\n * @returns void\n */\nexport const useFocusToggle = (ref: React.RefObject<HTMLElement>, allowFocus?: boolean): void => {\n // Kan ikke lytte på endringer i attributter, fordi det vil føre til en loop når vi endrer dem etterpå\n const focusableElementList = useElementList(ref, FOCUSABLE_SELECTORS, { attributes: false });\n\n useEffect(() => {\n const TABINDEX_ATTRIBUTE_NAME = 'tabindex';\n const PREVIOUS_TABINDEX_ATTRIBUTE_NAME = 'data-tabindex';\n if (allowFocus) {\n focusableElementList?.forEach(el => {\n // Sett tabIndex tilbake til verdien den hadde før, eller fjern tabIndex\n // slik at elementet kan tabbes til igjen.\n const prevTabIndex = el.getAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME);\n if (prevTabIndex) {\n el.setAttribute(TABINDEX_ATTRIBUTE_NAME, prevTabIndex);\n } else {\n el.removeAttribute(TABINDEX_ATTRIBUTE_NAME);\n }\n });\n } else {\n focusableElementList?.forEach(el => {\n // Hvis elementet allerede har tabIndex, ta vare på den før vi gjør det umulig å\n // tabbe til det.\n if (el.hasAttribute(TABINDEX_ATTRIBUTE_NAME)) {\n el.setAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME, `${el.tabIndex}`);\n }\n el.tabIndex = -1;\n });\n }\n }, [ref, allowFocus, focusableElementList]);\n};\n"],"names":["useFocusToggle","ref","allowFocus","focusableElementList","useElementList","FOCUSABLE_SELECTORS","useEffect","TABINDEX_ATTRIBUTE_NAME","PREVIOUS_TABINDEX_ATTRIBUTE_NAME","el","prevTabIndex"],"mappings":"uJAWa,MAAAA,EAAiB,CAACC,EAAmCC,IAA+B,CAE/F,MAAMC,EAAuBC,EAAeH,EAAKI,EAAqB,CAAE,WAAY,GAAO,EAE3FC,EAAU,IAAM,CACd,MAAMC,EAA0B,WAC1BC,EAAmC,gBACrCN,EACFC,GAAA,MAAAA,EAAsB,QAAcM,GAAA,CAG5B,MAAAC,EAAeD,EAAG,aAAaD,CAAgC,EACjEE,EACCD,EAAA,aAAaF,EAAyBG,CAAY,EAErDD,EAAG,gBAAgBF,CAAuB,CAC5C,GAGFJ,GAAA,MAAAA,EAAsB,QAAcM,GAAA,CAG9BA,EAAG,aAAaF,CAAuB,GACzCE,EAAG,aAAaD,EAAkC,GAAGC,EAAG,UAAU,EAEpEA,EAAG,SAAW,EAAA,EAGjB,EAAA,CAACR,EAAKC,EAAYC,CAAoB,CAAC,CAC5C"}
1
+ {"version":3,"file":"useFocusToggle.js","sources":["../../src/hooks/useFocusToggle.ts"],"sourcesContent":["import React, { useEffect } from 'react';\n\nimport { useElementList } from './useElementList';\nimport { FOCUSABLE_SELECTORS } from './useFocusableElements';\n\n/**\n * Skru av og på fokus på fokuserbare elementer slik at de kan være en del av DOMen, men samtidig\n * ikke kunne fokuseres/tabbes til med tastaturet.\n * @param ref Alle barn av dette elementet vil sjekkes for om de er fokuserbare\n * @param allowFocus Om elementene skal være fokuserbare eller ikke\n * @returns void\n */\nexport const useFocusToggle = (ref: React.RefObject<HTMLElement>, allowFocus?: boolean): void => {\n // Kan ikke lytte på endringer i attributter, fordi det vil føre til en loop når vi endrer dem etterpå\n const focusableElementList = useElementList(ref, FOCUSABLE_SELECTORS, { attributes: false });\n\n useEffect(() => {\n const TABINDEX_ATTRIBUTE_NAME = 'tabindex';\n const PREVIOUS_TABINDEX_ATTRIBUTE_NAME = 'data-tabindex';\n if (allowFocus) {\n focusableElementList?.forEach(el => {\n // Sett tabIndex tilbake til verdien den hadde før, eller fjern tabIndex\n // slik at elementet kan tabbes til igjen.\n const prevTabIndex = el.getAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME);\n if (prevTabIndex) {\n el.setAttribute(TABINDEX_ATTRIBUTE_NAME, prevTabIndex);\n } else {\n el.removeAttribute(TABINDEX_ATTRIBUTE_NAME);\n }\n });\n } else {\n focusableElementList?.forEach(el => {\n // Hvis elementet allerede har tabIndex, ta vare på den før vi gjør det umulig å\n // tabbe til det.\n if (el.hasAttribute(TABINDEX_ATTRIBUTE_NAME)) {\n el.setAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME, `${el.tabIndex}`);\n }\n el.tabIndex = -1;\n });\n }\n }, [ref, allowFocus, focusableElementList]);\n};\n"],"names":["useFocusToggle","ref","allowFocus","focusableElementList","useElementList","FOCUSABLE_SELECTORS","useEffect","TABINDEX_ATTRIBUTE_NAME","PREVIOUS_TABINDEX_ATTRIBUTE_NAME","el","prevTabIndex"],"mappings":"uJAYa,MAAAA,EAAiB,CAACC,EAAmCC,IAA+B,CAE/F,MAAMC,EAAuBC,EAAeH,EAAKI,EAAqB,CAAE,WAAY,GAAO,EAE3FC,EAAU,IAAM,CACd,MAAMC,EAA0B,WAC1BC,EAAmC,gBACrCN,EACFC,GAAA,MAAAA,EAAsB,QAAcM,GAAA,CAG5B,MAAAC,EAAeD,EAAG,aAAaD,CAAgC,EACjEE,EACCD,EAAA,aAAaF,EAAyBG,CAAY,EAErDD,EAAG,gBAAgBF,CAAuB,CAC5C,GAGFJ,GAAA,MAAAA,EAAsB,QAAcM,GAAA,CAG9BA,EAAG,aAAaF,CAAuB,GACzCE,EAAG,aAAaD,EAAkC,GAAGC,EAAG,UAAU,EAEpEA,EAAG,SAAW,EAAA,EAGjB,EAAA,CAACR,EAAKC,EAAYC,CAAoB,CAAC,CAC5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC;;;;GAIG;AACH,eAAO,MAAM,YAAY,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,cAAa,OAAO,KAAU,IA4B3F,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC;;;;GAIG;AACH,eAAO,MAAM,YAAY,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,0BAAqB,IA4BlF,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,2 +1,2 @@
1
- import{useEffect as i}from"react";import{getDocumentActiveElement as l}from"../utils/focus.js";import{useFocusableElements as m}from"./useFocusableElements.js";import"./useElementList.js";const d=(n,s=!0)=>{const e=m(n),c=t=>{if(s&&n.current&&(e==null?void 0:e.length)&&t.key==="Tab"){const o=l(n.current),r=e[0],u=e.length===1?r:e[e.length-1];t.shiftKey&&o===r?(u.focus(),t.preventDefault()):!t.shiftKey&&o===u&&(r.focus(),t.preventDefault())}};i(()=>{var t;return(t=n.current)==null||t.addEventListener("keydown",c),()=>{var o;(o=n.current)==null||o.removeEventListener("keydown",c)}},[n,s,e])};export{d as default,d as useFocusTrap};
1
+ import{useEffect as i}from"react";import{useFocusableElements as l}from"./useFocusableElements.js";import{getDocumentActiveElement as m}from"../utils/focus.js";import"./useElementList.js";const d=(n,s=!0)=>{const e=l(n),c=t=>{if(s&&n.current&&(e!=null&&e.length)&&t.key==="Tab"){const o=m(n.current),r=e[0],u=e.length===1?r:e[e.length-1];t.shiftKey&&o===r?(u.focus(),t.preventDefault()):!t.shiftKey&&o===u&&(r.focus(),t.preventDefault())}};i(()=>{var t;return(t=n.current)==null||t.addEventListener("keydown",c),()=>{var o;(o=n.current)==null||o.removeEventListener("keydown",c)}},[n,s,e])};export{d as default,d as useFocusTrap};
2
2
  //# sourceMappingURL=useFocusTrap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusTrap.js","sources":["../../src/hooks/useFocusTrap.ts"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { getDocumentActiveElement } from '../utils/focus';\nimport { useFocusableElements } from './useFocusableElements';\n\n/**\n * Lås fokus til et bestemt element. Bruker vil bare kunne tabbe mellom fokuserbare elementer innenfor elementet.\n * @param ref Alle barn av dette elementet vil være fokuserbare, elementer utenfor vil ikke det\n * @param trapFocus Om fokus skal \"trappes\" innenfor elementet eller ikke. Default=true.\n */\nexport const useFocusTrap = (ref: React.RefObject<HTMLElement>, trapFocus: boolean = true): void => {\n const focusableElementList = useFocusableElements(ref);\n\n const handleKeyboardEvent = (e: KeyboardEvent): void => {\n if (trapFocus && ref.current && focusableElementList?.length && e.key === 'Tab') {\n const activeElement = getDocumentActiveElement(ref.current);\n const firstElement = focusableElementList[0];\n const lastElement = focusableElementList.length === 1 ? firstElement : focusableElementList[focusableElementList.length - 1];\n\n if (e.shiftKey && activeElement === firstElement) {\n /* shift + tab */\n lastElement.focus();\n e.preventDefault();\n } else if (!e.shiftKey && activeElement === lastElement) {\n /* tab */\n firstElement.focus();\n e.preventDefault();\n }\n }\n };\n\n useEffect(() => {\n ref.current?.addEventListener('keydown', handleKeyboardEvent);\n\n return (): void => {\n ref.current?.removeEventListener('keydown', handleKeyboardEvent);\n };\n }, [ref, trapFocus, focusableElementList]); // focusableElementList må være med som dependency for at handleKeyboardEvent skal få oppdatert state\n};\n\nexport default useFocusTrap;\n"],"names":["useFocusTrap","ref","trapFocus","focusableElementList","useFocusableElements","handleKeyboardEvent","e","activeElement","getDocumentActiveElement","firstElement","lastElement","useEffect","_a"],"mappings":"4LASO,MAAMA,EAAe,CAACC,EAAmCC,EAAqB,KAAe,CAC5F,MAAAC,EAAuBC,EAAqBH,CAAG,EAE/CI,EAAuBC,GAA2B,CACtD,GAAIJ,GAAaD,EAAI,UAAWE,GAAA,YAAAA,EAAsB,SAAUG,EAAE,MAAQ,MAAO,CACzE,MAAAC,EAAgBC,EAAyBP,EAAI,OAAO,EACpDQ,EAAeN,EAAqB,GACpCO,EAAcP,EAAqB,SAAW,EAAIM,EAAeN,EAAqBA,EAAqB,OAAS,GAEtHG,EAAE,UAAYC,IAAkBE,GAElCC,EAAY,MAAM,EAClBJ,EAAE,eAAe,GACR,CAACA,EAAE,UAAYC,IAAkBG,IAE1CD,EAAa,MAAM,EACnBH,EAAE,eAAe,EAErB,CAAA,EAGFK,EAAU,IAAM,OACV,OAAAC,EAAAX,EAAA,UAAA,MAAAW,EAAS,iBAAiB,UAAWP,GAElC,IAAY,QACbO,EAAAX,EAAA,UAAA,MAAAW,EAAS,oBAAoB,UAAWP,EAAmB,CAEhE,EAAA,CAACJ,EAAKC,EAAWC,CAAoB,CAAC,CAC3C"}
1
+ {"version":3,"file":"useFocusTrap.js","sources":["../../src/hooks/useFocusTrap.ts"],"sourcesContent":["import React, { useEffect } from 'react';\n\nimport { useFocusableElements } from './useFocusableElements';\nimport { getDocumentActiveElement } from '../utils/focus';\n\n/**\n * Lås fokus til et bestemt element. Bruker vil bare kunne tabbe mellom fokuserbare elementer innenfor elementet.\n * @param ref Alle barn av dette elementet vil være fokuserbare, elementer utenfor vil ikke det\n * @param trapFocus Om fokus skal \"trappes\" innenfor elementet eller ikke. Default=true.\n */\nexport const useFocusTrap = (ref: React.RefObject<HTMLElement>, trapFocus = true): void => {\n const focusableElementList = useFocusableElements(ref);\n\n const handleKeyboardEvent = (e: KeyboardEvent): void => {\n if (trapFocus && ref.current && focusableElementList?.length && e.key === 'Tab') {\n const activeElement = getDocumentActiveElement(ref.current);\n const firstElement = focusableElementList[0];\n const lastElement = focusableElementList.length === 1 ? firstElement : focusableElementList[focusableElementList.length - 1];\n\n if (e.shiftKey && activeElement === firstElement) {\n /* shift + tab */\n lastElement.focus();\n e.preventDefault();\n } else if (!e.shiftKey && activeElement === lastElement) {\n /* tab */\n firstElement.focus();\n e.preventDefault();\n }\n }\n };\n\n useEffect(() => {\n ref.current?.addEventListener('keydown', handleKeyboardEvent);\n\n return (): void => {\n ref.current?.removeEventListener('keydown', handleKeyboardEvent);\n };\n }, [ref, trapFocus, focusableElementList]); // focusableElementList må være med som dependency for at handleKeyboardEvent skal få oppdatert state\n};\n\nexport default useFocusTrap;\n"],"names":["useFocusTrap","ref","trapFocus","focusableElementList","useFocusableElements","handleKeyboardEvent","e","activeElement","getDocumentActiveElement","firstElement","lastElement","useEffect","_a"],"mappings":"4LAUO,MAAMA,EAAe,CAACC,EAAmCC,EAAY,KAAe,CACnF,MAAAC,EAAuBC,EAAqBH,CAAG,EAE/CI,EAAuBC,GAA2B,CACtD,GAAIJ,GAAaD,EAAI,UAAWE,GAAA,MAAAA,EAAsB,SAAUG,EAAE,MAAQ,MAAO,CACzE,MAAAC,EAAgBC,EAAyBP,EAAI,OAAO,EACpDQ,EAAeN,EAAqB,CAAC,EACrCO,EAAcP,EAAqB,SAAW,EAAIM,EAAeN,EAAqBA,EAAqB,OAAS,CAAC,EAEvHG,EAAE,UAAYC,IAAkBE,GAElCC,EAAY,MAAM,EAClBJ,EAAE,eAAe,GACR,CAACA,EAAE,UAAYC,IAAkBG,IAE1CD,EAAa,MAAM,EACnBH,EAAE,eAAe,GAErB,EAGFK,EAAU,IAAM,OACV,OAAAC,EAAAX,EAAA,UAAA,MAAAW,EAAS,iBAAiB,UAAWP,GAElC,IAAY,QACbO,EAAAX,EAAA,UAAA,MAAAW,EAAS,oBAAoB,UAAWP,EAAmB,CAEhE,EAAA,CAACJ,EAAKC,EAAWC,CAAoB,CAAC,CAC3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIcons.js","sources":["../../src/hooks/useIcons.ts"],"sourcesContent":["import { IconProps } from '../components/Icons';\n\nexport const useIcons = (children: React.ReactNode[]): Array<React.ReactElement<IconProps> | React.ReactNode | {} | undefined | null> => {\n let leftIcon: React.ReactElement<IconProps> | undefined | null = null;\n let rightIcon: React.ReactElement<IconProps> | undefined | null = null;\n\n if ((children[0] as React.ReactElement<IconProps>)?.props?.svgIcon !== undefined) {\n leftIcon = children.shift() as React.ReactElement<IconProps>;\n }\n if ((children[children.length - 1] as React.ReactElement<IconProps>)?.props?.svgIcon !== undefined) {\n rightIcon = children.pop() as React.ReactElement<IconProps>;\n }\n const restChildren = children.filter(child => child);\n\n return [leftIcon, rightIcon, restChildren.length > 0 ? restChildren : null];\n};\n"],"names":["useIcons","children","_a","_b","_c","_d","leftIcon","rightIcon","restChildren","child"],"mappings":"AAEa,MAAAA,EAAYC,GAAgH,CAA5H,IAAAC,EAAAC,EAAAC,EAAAC,EACX,IAAIC,EAA6D,KAC7DC,EAA8D,OAE7DJ,GAAAD,EAAAD,EAAS,KAAT,YAAAC,EAA+C,QAA/C,YAAAC,EAAsD,WAAY,SACrEG,EAAWL,EAAS,WAEjBI,GAAAD,EAAAH,EAASA,EAAS,OAAS,KAA3B,YAAAG,EAAiE,QAAjE,YAAAC,EAAwE,WAAY,SACvFE,EAAYN,EAAS,OAEvB,MAAMO,EAAeP,EAAS,OAAOQ,GAASA,CAAK,EAEnD,MAAO,CAACH,EAAUC,EAAWC,EAAa,OAAS,EAAIA,EAAe,IAAI,CAC5E"}
1
+ {"version":3,"file":"useIcons.js","sources":["../../src/hooks/useIcons.ts"],"sourcesContent":["import { IconProps } from '../components/Icons';\n\nexport const useIcons = (children: React.ReactNode[]): Array<React.ReactElement<IconProps> | React.ReactNode | {} | undefined | null> => {\n let leftIcon: React.ReactElement<IconProps> | undefined | null = null;\n let rightIcon: React.ReactElement<IconProps> | undefined | null = null;\n\n if ((children[0] as React.ReactElement<IconProps>)?.props?.svgIcon !== undefined) {\n leftIcon = children.shift() as React.ReactElement<IconProps>;\n }\n if ((children[children.length - 1] as React.ReactElement<IconProps>)?.props?.svgIcon !== undefined) {\n rightIcon = children.pop() as React.ReactElement<IconProps>;\n }\n const restChildren = children.filter(child => child);\n\n return [leftIcon, rightIcon, restChildren.length > 0 ? restChildren : null];\n};\n"],"names":["useIcons","children","_a","_b","_c","_d","leftIcon","rightIcon","restChildren","child"],"mappings":"AAEa,MAAAA,EAAYC,GAAgH,CAA5H,IAAAC,EAAAC,EAAAC,EAAAC,EACX,IAAIC,EAA6D,KAC7DC,EAA8D,OAE7DJ,GAAAD,EAAAD,EAAS,CAAC,IAAV,YAAAC,EAA+C,QAA/C,YAAAC,EAAsD,WAAY,SACrEG,EAAWL,EAAS,WAEjBI,GAAAD,EAAAH,EAASA,EAAS,OAAS,CAAC,IAA5B,YAAAG,EAAiE,QAAjE,YAAAC,EAAwE,WAAY,SACvFE,EAAYN,EAAS,OAEvB,MAAMO,EAAeP,EAAS,OAAOQ,GAASA,CAAK,EAEnD,MAAO,CAACH,EAAUC,EAAWC,EAAa,OAAS,EAAIA,EAAe,IAAI,CAC5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIsVisible.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsVisible.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,QAClB,MAAM,SAAS,CAAC,OAAO,CAAC,gCAEnB,wBAAwB,wBAEjC,OAUF,CAAC"}
1
+ {"version":3,"file":"useIsVisible.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsVisible.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,QAClB,MAAM,SAAS,CAAC,OAAO,CAAC,gCAEnB,wBAAwB,wBAEjC,OAUF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIsVisible.js","sources":["../../src/hooks/useIsVisible.ts"],"sourcesContent":["import { useState } from 'react';\nimport { useIntersectionObserver } from './useIntersectionObserver';\n\n/**\n * Sjekk om et HTML-element er synlig i vinduet, eller ikke.\n *\n * @param ref Element som skal observeres\n * @param threshold Hvor synlig må elementet være? Default = 1 (helt synlig)\n * @param options Objekt med options for IntersectionObserver, f.eks. threshold for å bestemme når callbacken skal fyres\n * @param initial Om elementet default skal antas å være synlig eller ikke. Default: ikke synlig\n * @returns true hvis objektet er synlig lik threshold eller mer, false hvis ikke\n */\nexport const useIsVisible = (\n ref: React.RefObject<Element>,\n threshold = 1,\n options?: IntersectionObserverInit,\n initial = false\n): boolean => {\n const [isVisible, setIsVisible] = useState(initial);\n\n const handleIntersectChange: IntersectionObserverCallback = entries => {\n setIsVisible(threshold === 0 ? entries[0].intersectionRatio !== threshold : entries[0].intersectionRatio >= threshold);\n };\n\n useIntersectionObserver(ref, handleIntersectChange, { threshold, ...options });\n\n return isVisible;\n};\n"],"names":["useIsVisible","ref","threshold","options","initial","isVisible","setIsVisible","useState","useIntersectionObserver","entries"],"mappings":"wGAYO,MAAMA,EAAe,CAC1BC,EACAC,EAAY,EACZC,EACAC,EAAU,KACE,CACZ,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAASH,CAAO,EAMlD,OAAAI,EAAwBP,EAJ+CQ,GAAA,CACxDH,EAAAJ,IAAc,EAAIO,EAAQ,GAAG,oBAAsBP,EAAYO,EAAQ,GAAG,mBAAqBP,CAAS,CAAA,EAGnE,CAAE,UAAAA,EAAW,GAAGC,EAAS,EAEtEE,CACT"}
1
+ {"version":3,"file":"useIsVisible.js","sources":["../../src/hooks/useIsVisible.ts"],"sourcesContent":["import { useState } from 'react';\n\nimport { useIntersectionObserver } from './useIntersectionObserver';\n\n/**\n * Sjekk om et HTML-element er synlig i vinduet, eller ikke.\n *\n * @param ref Element som skal observeres\n * @param threshold Hvor synlig må elementet være? Default = 1 (helt synlig)\n * @param options Objekt med options for IntersectionObserver, f.eks. threshold for å bestemme når callbacken skal fyres\n * @param initial Om elementet default skal antas å være synlig eller ikke. Default: ikke synlig\n * @returns true hvis objektet er synlig lik threshold eller mer, false hvis ikke\n */\nexport const useIsVisible = (\n ref: React.RefObject<Element>,\n threshold = 1,\n options?: IntersectionObserverInit,\n initial = false\n): boolean => {\n const [isVisible, setIsVisible] = useState(initial);\n\n const handleIntersectChange: IntersectionObserverCallback = entries => {\n setIsVisible(threshold === 0 ? entries[0].intersectionRatio !== threshold : entries[0].intersectionRatio >= threshold);\n };\n\n useIntersectionObserver(ref, handleIntersectChange, { threshold, ...options });\n\n return isVisible;\n};\n"],"names":["useIsVisible","ref","threshold","options","initial","isVisible","setIsVisible","useState","useIntersectionObserver","entries"],"mappings":"wGAaO,MAAMA,EAAe,CAC1BC,EACAC,EAAY,EACZC,EACAC,EAAU,KACE,CACZ,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAASH,CAAO,EAMlD,OAAAI,EAAwBP,EAJ+CQ,GAAA,CACxDH,EAAAJ,IAAc,EAAIO,EAAQ,CAAC,EAAE,oBAAsBP,EAAYO,EAAQ,CAAC,EAAE,mBAAqBP,CAAS,CAAA,EAGnE,CAAE,UAAAA,EAAW,GAAGC,EAAS,EAEtEE,CACT"}
@@ -1,4 +1,4 @@
1
- declare type KeyboardEvents = keyof PickByValue<HTMLElementEventMap, KeyboardEvent>;
1
+ type KeyboardEvents = keyof PickByValue<HTMLElementEventMap, KeyboardEvent>;
2
2
  /**
3
3
  * Kjør en callback når bruker skriver på tastaturet.
4
4
  * @param ref Element som skal lyttes på.
@@ -1 +1 @@
1
- {"version":3,"file":"useKeyboardEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useKeyboardEvent.ts"],"names":[],"mappings":"AAEA,aAAK,cAAc,GAAG,MAAM,WAAW,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;AAE5E;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,QACtB,MAAM,SAAS,CAAC,WAAW,CAAC,oBACf,mBAAmB,CAAC,cAAc,CAAC,KAAK,IAAI,OACzD,MAAM,GAAG,MAAM,EAAE,WACd,cAAc,EAAE,SAezB,CAAC"}
1
+ {"version":3,"file":"useKeyboardEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useKeyboardEvent.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GAAG,MAAM,WAAW,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;AAE5E;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,QACtB,MAAM,SAAS,CAAC,WAAW,CAAC,oBACf,mBAAmB,CAAC,cAAc,CAAC,KAAK,IAAI,OACzD,MAAM,GAAG,MAAM,EAAE,WACd,cAAc,EAAE,SAezB,CAAC"}
@@ -1,4 +1,4 @@
1
- declare type OutsideEvents = keyof PickByValue<HTMLElementEventMap, MouseEvent | FocusEvent>;
1
+ type OutsideEvents = keyof PickByValue<HTMLElementEventMap, MouseEvent | FocusEvent>;
2
2
  /**
3
3
  * Custom hook for klikk eller fokus utenfor et gitt element
4
4
  * @param ref Sjekker om det klikkes utenfor dette elementet
@@ -1 +1 @@
1
- {"version":3,"file":"useOutsideEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useOutsideEvent.ts"],"names":[],"mappings":"AAEA,aAAK,aAAa,GAAG,MAAM,WAAW,CAAC,mBAAmB,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;AAErF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QACrB,MAAM,SAAS,CAAC,WAAW,CAAC,uBACZ,mBAAmB,CAAC,aAAa,CAAC,KAAK,IAAI,WACxD,aAAa,EAAE,KACtB,IAcF,CAAC"}
1
+ {"version":3,"file":"useOutsideEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useOutsideEvent.ts"],"names":[],"mappings":"AAEA,KAAK,aAAa,GAAG,MAAM,WAAW,CAAC,mBAAmB,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;AAErF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QACrB,MAAM,SAAS,CAAC,WAAW,CAAC,uBACZ,mBAAmB,CAAC,aAAa,CAAC,KAAK,IAAI,WACxD,aAAa,EAAE,KACtB,IAcF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useResizeObserver.js","sources":["../../src/hooks/useResizeObserver.ts"],"sourcesContent":["import { useEffect, useState, useRef } from 'react';\n\n/**\n * Lytt på endringer i størrelse på et element. Bruker ResizeObserver-APIet.\n *\n * @param ref Element som skal observeres.\n * @returns Object med høyde, bredde, x og y til elementet\n */\nexport const useResizeObserver = (ref?: React.RefObject<HTMLElement>): DOMRect | undefined => {\n const ticking = useRef(false);\n const [size, setSize] = useState<DOMRect>();\n useEffect(() => {\n const resizeObserver = new ResizeObserver(entries => {\n if (!ticking.current) {\n window.requestAnimationFrame(() => {\n setSize(entries[0].target.getBoundingClientRect());\n ticking.current = false;\n });\n }\n ticking.current = true;\n });\n if (ref?.current) {\n resizeObserver.observe(ref?.current);\n }\n\n return (): void => {\n if (ref?.current) {\n resizeObserver.unobserve(ref.current);\n } else {\n resizeObserver.disconnect();\n }\n };\n }, [ref]);\n\n return size;\n};\n"],"names":["useResizeObserver","ref","ticking","useRef","size","setSize","useState","useEffect","resizeObserver","entries"],"mappings":"4DAQa,MAAAA,EAAqBC,GAA4D,CACtF,MAAAC,EAAUC,EAAO,EAAK,EACtB,CAACC,EAAMC,CAAO,EAAIC,EAAkB,EAC1C,OAAAC,EAAU,IAAM,CACR,MAAAC,EAAiB,IAAI,eAA0BC,GAAA,CAC9CP,EAAQ,SACX,OAAO,sBAAsB,IAAM,CACjCG,EAAQI,EAAQ,GAAG,OAAO,sBAAuB,CAAA,EACjDP,EAAQ,QAAU,EAAA,CACnB,EAEHA,EAAQ,QAAU,EAAA,CACnB,EACD,OAAID,GAAA,MAAAA,EAAK,SACQO,EAAA,QAAQP,GAAA,YAAAA,EAAK,OAAO,EAG9B,IAAY,CACbA,GAAA,MAAAA,EAAK,QACQO,EAAA,UAAUP,EAAI,OAAO,EAEpCO,EAAe,WAAW,CAC5B,CACF,EACC,CAACP,CAAG,CAAC,EAEDG,CACT"}
1
+ {"version":3,"file":"useResizeObserver.js","sources":["../../src/hooks/useResizeObserver.ts"],"sourcesContent":["import { useEffect, useState, useRef } from 'react';\n\n/**\n * Lytt på endringer i størrelse på et element. Bruker ResizeObserver-APIet.\n *\n * @param ref Element som skal observeres.\n * @returns Object med høyde, bredde, x og y til elementet\n */\nexport const useResizeObserver = (ref?: React.RefObject<HTMLElement>): DOMRect | undefined => {\n const ticking = useRef(false);\n const [size, setSize] = useState<DOMRect>();\n useEffect(() => {\n const resizeObserver = new ResizeObserver(entries => {\n if (!ticking.current) {\n window.requestAnimationFrame(() => {\n setSize(entries[0].target.getBoundingClientRect());\n ticking.current = false;\n });\n }\n ticking.current = true;\n });\n if (ref?.current) {\n resizeObserver.observe(ref?.current);\n }\n\n return (): void => {\n if (ref?.current) {\n resizeObserver.unobserve(ref.current);\n } else {\n resizeObserver.disconnect();\n }\n };\n }, [ref]);\n\n return size;\n};\n"],"names":["useResizeObserver","ref","ticking","useRef","size","setSize","useState","useEffect","resizeObserver","entries"],"mappings":"4DAQa,MAAAA,EAAqBC,GAA4D,CACtF,MAAAC,EAAUC,EAAO,EAAK,EACtB,CAACC,EAAMC,CAAO,EAAIC,EAAkB,EAC1C,OAAAC,EAAU,IAAM,CACR,MAAAC,EAAiB,IAAI,eAA0BC,GAAA,CAC9CP,EAAQ,SACX,OAAO,sBAAsB,IAAM,CACjCG,EAAQI,EAAQ,CAAC,EAAE,OAAO,sBAAuB,CAAA,EACjDP,EAAQ,QAAU,EAAA,CACnB,EAEHA,EAAQ,QAAU,EAAA,CACnB,EACD,OAAID,GAAA,MAAAA,EAAK,SACQO,EAAA,QAAQP,GAAA,YAAAA,EAAK,OAAO,EAG9B,IAAY,CACbA,GAAA,MAAAA,EAAK,QACQO,EAAA,UAAUP,EAAI,OAAO,EAEpCO,EAAe,WAAW,CAC5B,CACF,EACC,CAACP,CAAG,CAAC,EAEDG,CACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSize.d.ts","sourceRoot":"","sources":["../../src/hooks/useSize.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,SAAU,MAAM,SAAS,CAAC,WAAW,CAAC,KAAG,OAAO,GAAG,SA+CtE,CAAC"}
1
+ {"version":3,"file":"useSize.d.ts","sourceRoot":"","sources":["../../src/hooks/useSize.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,SAAU,MAAM,SAAS,CAAC,WAAW,CAAC,KAAG,OAAO,GAAG,SA+CtE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSize.js","sources":["../../src/hooks/useSize.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { debounce } from '../utils/debounce';\n\n/**\n * Lytt på endringer i størrelse på et element\n *\n * @param ref Element som skal observeres.\n * @returns Object med høyde, bredde, x og y til elementet. Merk at objektet bare oppdates når høyde eller bredde endres, ikke når\n * posisjonen (x og y) endres.\n */\nexport const useSize = (ref?: React.RefObject<HTMLElement>): DOMRect | undefined => {\n const ticking = useRef(false);\n const [size, setSize] = useState<DOMRect>();\n useEffect(() => {\n if (typeof ResizeObserver !== 'undefined') {\n const resizeObserver = new ResizeObserver(entries => {\n if (!ticking.current) {\n window.requestAnimationFrame(() => {\n setSize(entries[0].target.getBoundingClientRect());\n ticking.current = false;\n });\n }\n ticking.current = true;\n });\n if (ref?.current) {\n resizeObserver.observe(ref?.current);\n }\n return (): void => {\n if (ref?.current) {\n resizeObserver.unobserve(ref.current);\n } else {\n resizeObserver.disconnect();\n }\n };\n } else if (typeof window === 'object') {\n // For nettlesere som ikke støtter ResizeObserver (iOS 13 og lavere)\n const handleLayoutEvent = () => {\n ref?.current && setSize(ref.current.getBoundingClientRect());\n };\n\n const events = ['layoutchange', 'resize', 'orientationchange'];\n const debounceMs = 10;\n\n const [debouncedCallback, teardown] = debounce(handleLayoutEvent, debounceMs);\n\n events.forEach(eventName => window.addEventListener(eventName, debouncedCallback));\n\n debouncedCallback();\n\n return () => {\n teardown();\n events.forEach(eventName => window.removeEventListener(eventName, debouncedCallback));\n };\n }\n }, [ref?.current]);\n\n return size;\n};\n"],"names":["useSize","ref","ticking","useRef","size","setSize","useState","useEffect","resizeObserver","entries","handleLayoutEvent","events","debouncedCallback","teardown","debounce","eventName"],"mappings":"4GAUa,MAAAA,EAAWC,GAA4D,CAC5E,MAAAC,EAAUC,EAAO,EAAK,EACtB,CAACC,EAAMC,CAAO,EAAIC,EAAkB,EAC1C,OAAAC,EAAU,IAAM,CACV,GAAA,OAAO,eAAmB,IAAa,CACnC,MAAAC,EAAiB,IAAI,eAA0BC,GAAA,CAC9CP,EAAQ,SACX,OAAO,sBAAsB,IAAM,CACjCG,EAAQI,EAAQ,GAAG,OAAO,sBAAuB,CAAA,EACjDP,EAAQ,QAAU,EAAA,CACnB,EAEHA,EAAQ,QAAU,EAAA,CACnB,EACD,OAAID,GAAA,MAAAA,EAAK,SACQO,EAAA,QAAQP,GAAA,YAAAA,EAAK,OAAO,EAE9B,IAAY,CACbA,GAAA,MAAAA,EAAK,QACQO,EAAA,UAAUP,EAAI,OAAO,EAEpCO,EAAe,WAAW,CAC5B,CACF,SACS,OAAO,QAAW,SAAU,CAErC,MAAME,EAAoB,IAAM,CAC9BT,GAAA,MAAAA,EAAK,SAAWI,EAAQJ,EAAI,QAAQ,uBAAuB,CAAA,EAGvDU,EAAS,CAAC,eAAgB,SAAU,mBAAmB,EAGvD,CAACC,EAAmBC,CAAQ,EAAIC,EAASJ,EAAmB,EAAU,EAE5E,OAAAC,EAAO,QAAqBI,GAAA,OAAO,iBAAiBA,EAAWH,CAAiB,CAAC,EAE/DA,IAEX,IAAM,CACFC,IACTF,EAAO,QAAqBI,GAAA,OAAO,oBAAoBA,EAAWH,CAAiB,CAAC,CAAA,CAExF,CAAA,EACC,CAACX,GAAA,YAAAA,EAAK,OAAO,CAAC,EAEVG,CACT"}
1
+ {"version":3,"file":"useSize.js","sources":["../../src/hooks/useSize.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nimport { debounce } from '../utils/debounce';\n\n/**\n * Lytt på endringer i størrelse på et element\n *\n * @param ref Element som skal observeres.\n * @returns Object med høyde, bredde, x og y til elementet. Merk at objektet bare oppdates når høyde eller bredde endres, ikke når\n * posisjonen (x og y) endres.\n */\nexport const useSize = (ref?: React.RefObject<HTMLElement>): DOMRect | undefined => {\n const ticking = useRef(false);\n const [size, setSize] = useState<DOMRect>();\n useEffect(() => {\n if (typeof ResizeObserver !== 'undefined') {\n const resizeObserver = new ResizeObserver(entries => {\n if (!ticking.current) {\n window.requestAnimationFrame(() => {\n setSize(entries[0].target.getBoundingClientRect());\n ticking.current = false;\n });\n }\n ticking.current = true;\n });\n if (ref?.current) {\n resizeObserver.observe(ref?.current);\n }\n return (): void => {\n if (ref?.current) {\n resizeObserver.unobserve(ref.current);\n } else {\n resizeObserver.disconnect();\n }\n };\n } else if (typeof window === 'object') {\n // For nettlesere som ikke støtter ResizeObserver (iOS 13 og lavere)\n const handleLayoutEvent = () => {\n ref?.current && setSize(ref.current.getBoundingClientRect());\n };\n\n const events = ['layoutchange', 'resize', 'orientationchange'];\n const debounceMs = 10;\n\n const [debouncedCallback, teardown] = debounce(handleLayoutEvent, debounceMs);\n\n events.forEach(eventName => window.addEventListener(eventName, debouncedCallback));\n\n debouncedCallback();\n\n return () => {\n teardown();\n events.forEach(eventName => window.removeEventListener(eventName, debouncedCallback));\n };\n }\n }, [ref?.current]);\n\n return size;\n};\n"],"names":["useSize","ref","ticking","useRef","size","setSize","useState","useEffect","resizeObserver","entries","handleLayoutEvent","events","debouncedCallback","teardown","debounce","eventName"],"mappings":"4GAWa,MAAAA,EAAWC,GAA4D,CAC5E,MAAAC,EAAUC,EAAO,EAAK,EACtB,CAACC,EAAMC,CAAO,EAAIC,EAAkB,EAC1C,OAAAC,EAAU,IAAM,CACV,GAAA,OAAO,eAAmB,IAAa,CACnC,MAAAC,EAAiB,IAAI,eAA0BC,GAAA,CAC9CP,EAAQ,SACX,OAAO,sBAAsB,IAAM,CACjCG,EAAQI,EAAQ,CAAC,EAAE,OAAO,sBAAuB,CAAA,EACjDP,EAAQ,QAAU,EAAA,CACnB,EAEHA,EAAQ,QAAU,EAAA,CACnB,EACD,OAAID,GAAA,MAAAA,EAAK,SACQO,EAAA,QAAQP,GAAA,YAAAA,EAAK,OAAO,EAE9B,IAAY,CACbA,GAAA,MAAAA,EAAK,QACQO,EAAA,UAAUP,EAAI,OAAO,EAEpCO,EAAe,WAAW,CAC5B,UAEO,OAAO,QAAW,SAAU,CAErC,MAAME,EAAoB,IAAM,CAC9BT,GAAA,MAAAA,EAAK,SAAWI,EAAQJ,EAAI,QAAQ,uBAAuB,CAAA,EAGvDU,EAAS,CAAC,eAAgB,SAAU,mBAAmB,EAGvD,CAACC,EAAmBC,CAAQ,EAAIC,EAASJ,EAAmB,EAAU,EAE5E,OAAAC,EAAO,QAAqBI,GAAA,OAAO,iBAAiBA,EAAWH,CAAiB,CAAC,EAE/DA,IAEX,IAAM,CACFC,IACTF,EAAO,QAAqBI,GAAA,OAAO,oBAAoBA,EAAWH,CAAiB,CAAC,CAAA,EAExF,EACC,CAACX,GAAA,YAAAA,EAAK,OAAO,CAAC,EAEVG,CACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSticky.d.ts","sourceRoot":"","sources":["../../src/hooks/useSticky.ts"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,oBAAoB;IAC5B,6CAA6C;IAC7C,eAAe,EAAE,OAAO,CAAC;IACzB,+CAA+C;IAC/C,eAAe,EAAE,OAAO,CAAC;IACzB,6CAA6C;IAC7C,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,qCAAqC;IACrC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AACD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,eAAgB,MAAM,SAAS,CAAC,WAAW,CAAC,aAAa,MAAM,SAAS,CAAC,WAAW,CAAC,KAAG,oBAsB7G,CAAC"}
1
+ {"version":3,"file":"useSticky.d.ts","sourceRoot":"","sources":["../../src/hooks/useSticky.ts"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,UAAU,oBAAoB;IAC5B,6CAA6C;IAC7C,eAAe,EAAE,OAAO,CAAC;IACzB,+CAA+C;IAC/C,eAAe,EAAE,OAAO,CAAC;IACzB,6CAA6C;IAC7C,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,qCAAqC;IACrC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AACD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,eAAgB,MAAM,SAAS,CAAC,WAAW,CAAC,aAAa,MAAM,SAAS,CAAC,WAAW,CAAC,KAAG,oBAsB7G,CAAC"}
@@ -1,2 +1,2 @@
1
- import{useState as t}from"react";import{useLayoutEvent as p}from"./useLayoutEvent.js";import"../utils/debounce.js";const L=(s,c)=>{const[d,h]=t(!1),[r,u]=t(!1),[a,f]=t(),[g,l]=t();return p(()=>{var n,o,i;const{top:m=0,width:C=0,bottom:O=0}=((n=s.current)==null?void 0:n.getBoundingClientRect())||{},e=(i=(o=c.current)==null?void 0:o.getBoundingClientRect().height)!=null?i:0;h(m<=0),u(O<=e),l(C),f(e)},["resize","scroll"]),{isOutsideWindow:d,isLeavingWindow:r,offsetHeight:a,contentWidth:g}};export{L as useSticky};
1
+ import{useState as t}from"react";import{useLayoutEvent as O}from"./useLayoutEvent.js";import"../utils/debounce.js";const E=(i,s)=>{const[c,d]=t(!1),[h,r]=t(!1),[u,a]=t(),[f,g]=t();return O(()=>{var n,o;const{top:l=0,width:m=0,bottom:C=0}=((n=i.current)==null?void 0:n.getBoundingClientRect())||{},e=((o=s.current)==null?void 0:o.getBoundingClientRect().height)??0;d(l<=0),r(C<=e),g(m),a(e)},["resize","scroll"]),{isOutsideWindow:c,isLeavingWindow:h,offsetHeight:u,contentWidth:f}};export{E as useSticky};
2
2
  //# sourceMappingURL=useSticky.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSticky.js","sources":["../../src/hooks/useSticky.ts"],"sourcesContent":["import React, { useState } from 'react';\nimport { useLayoutEvent } from './useLayoutEvent';\n\ninterface UseStickReturnValues {\n /** Toppen av elementet er utenfor vinduet */\n isOutsideWindow: boolean;\n /** Innholdet er på vei helt ut av vinduet */\n isLeavingWindow: boolean;\n /** Høyde på det sticky elementet i pixler */\n offsetHeight: number | undefined;\n /** Bredden til innholdet i pixler */\n contentWidth: number | undefined;\n}\n/**\n * Sett et element til sticky hvis et annet element er delvis utenfor vinduet\n *\n * @param contentRef Element som sjekkes om det er utenfor eller innenfor vinduet\n * @param stickyRef Element som skal bli sticky\n * @returns Properties som kan brukes til å sette elementet sticky eller absolute\n */\nexport const useSticky = (contentRef: React.RefObject<HTMLElement>, stickyRef: React.RefObject<HTMLElement>): UseStickReturnValues => {\n const [isOutsideWindow, setIsOutsideWindow] = useState<boolean>(false);\n const [isLeavingWindow, setIsLeavingWindow] = useState<boolean>(false);\n const [offsetHeight, setOffsetHeight] = useState<number>();\n const [contentWidth, setContentWidth] = useState<number>();\n\n const handleLayoutChange = () => {\n const {\n top: topOfContentElement = 0,\n width: widthOfContentElement = 0,\n bottom: bottomOfContentElement = 0,\n } = contentRef.current?.getBoundingClientRect() || {};\n const heightOfStickyElement = stickyRef.current?.getBoundingClientRect().height ?? 0;\n setIsOutsideWindow(topOfContentElement <= 0);\n setIsLeavingWindow(bottomOfContentElement <= heightOfStickyElement);\n setContentWidth(widthOfContentElement);\n setOffsetHeight(heightOfStickyElement);\n };\n\n useLayoutEvent(handleLayoutChange, ['resize', 'scroll']);\n\n return { isOutsideWindow, isLeavingWindow, offsetHeight, contentWidth };\n};\n"],"names":["useSticky","contentRef","stickyRef","isOutsideWindow","setIsOutsideWindow","useState","isLeavingWindow","setIsLeavingWindow","offsetHeight","setOffsetHeight","contentWidth","setContentWidth","useLayoutEvent","topOfContentElement","widthOfContentElement","bottomOfContentElement","_a","heightOfStickyElement","_c","_b"],"mappings":"mHAoBa,MAAAA,EAAY,CAACC,EAA0CC,IAAkE,CACpI,KAAM,CAACC,EAAiBC,CAAkB,EAAIC,EAAkB,EAAK,EAC/D,CAACC,EAAiBC,CAAkB,EAAIF,EAAkB,EAAK,EAC/D,CAACG,EAAcC,CAAe,EAAIJ,EAAiB,EACnD,CAACK,EAAcC,CAAe,EAAIN,EAAiB,EAezD,OAAAO,EAb2B,IAAM,WACzB,KAAA,CACJ,IAAKC,EAAsB,EAC3B,MAAOC,EAAwB,EAC/B,OAAQC,EAAyB,CAC/B,IAAAC,EAAAf,EAAW,UAAX,YAAAe,EAAoB,0BAA2B,CAAA,EAC7CC,GAAwBC,GAAAC,EAAAjB,EAAU,UAAV,YAAAiB,EAAmB,wBAAwB,SAA3C,KAAAD,EAAqD,EACnFd,EAAmBS,GAAuB,CAAC,EAC3CN,EAAmBQ,GAA0BE,CAAqB,EAClEN,EAAgBG,CAAqB,EACrCL,EAAgBQ,CAAqB,CAAA,EAGJ,CAAC,SAAU,QAAQ,CAAC,EAEhD,CAAE,gBAAAd,EAAiB,gBAAAG,EAAiB,aAAAE,EAAc,aAAAE,CAAa,CACxE"}
1
+ {"version":3,"file":"useSticky.js","sources":["../../src/hooks/useSticky.ts"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { useLayoutEvent } from './useLayoutEvent';\n\ninterface UseStickReturnValues {\n /** Toppen av elementet er utenfor vinduet */\n isOutsideWindow: boolean;\n /** Innholdet er på vei helt ut av vinduet */\n isLeavingWindow: boolean;\n /** Høyde på det sticky elementet i pixler */\n offsetHeight: number | undefined;\n /** Bredden til innholdet i pixler */\n contentWidth: number | undefined;\n}\n/**\n * Sett et element til sticky hvis et annet element er delvis utenfor vinduet\n *\n * @param contentRef Element som sjekkes om det er utenfor eller innenfor vinduet\n * @param stickyRef Element som skal bli sticky\n * @returns Properties som kan brukes til å sette elementet sticky eller absolute\n */\nexport const useSticky = (contentRef: React.RefObject<HTMLElement>, stickyRef: React.RefObject<HTMLElement>): UseStickReturnValues => {\n const [isOutsideWindow, setIsOutsideWindow] = useState<boolean>(false);\n const [isLeavingWindow, setIsLeavingWindow] = useState<boolean>(false);\n const [offsetHeight, setOffsetHeight] = useState<number>();\n const [contentWidth, setContentWidth] = useState<number>();\n\n const handleLayoutChange = () => {\n const {\n top: topOfContentElement = 0,\n width: widthOfContentElement = 0,\n bottom: bottomOfContentElement = 0,\n } = contentRef.current?.getBoundingClientRect() || {};\n const heightOfStickyElement = stickyRef.current?.getBoundingClientRect().height ?? 0;\n setIsOutsideWindow(topOfContentElement <= 0);\n setIsLeavingWindow(bottomOfContentElement <= heightOfStickyElement);\n setContentWidth(widthOfContentElement);\n setOffsetHeight(heightOfStickyElement);\n };\n\n useLayoutEvent(handleLayoutChange, ['resize', 'scroll']);\n\n return { isOutsideWindow, isLeavingWindow, offsetHeight, contentWidth };\n};\n"],"names":["useSticky","contentRef","stickyRef","isOutsideWindow","setIsOutsideWindow","useState","isLeavingWindow","setIsLeavingWindow","offsetHeight","setOffsetHeight","contentWidth","setContentWidth","useLayoutEvent","topOfContentElement","widthOfContentElement","bottomOfContentElement","_a","heightOfStickyElement","_b"],"mappings":"mHAqBa,MAAAA,EAAY,CAACC,EAA0CC,IAAkE,CACpI,KAAM,CAACC,EAAiBC,CAAkB,EAAIC,EAAkB,EAAK,EAC/D,CAACC,EAAiBC,CAAkB,EAAIF,EAAkB,EAAK,EAC/D,CAACG,EAAcC,CAAe,EAAIJ,EAAiB,EACnD,CAACK,EAAcC,CAAe,EAAIN,EAAiB,EAezD,OAAAO,EAb2B,IAAM,SACzB,KAAA,CACJ,IAAKC,EAAsB,EAC3B,MAAOC,EAAwB,EAC/B,OAAQC,EAAyB,CAC/B,IAAAC,EAAAf,EAAW,UAAX,YAAAe,EAAoB,0BAA2B,CAAA,EAC7CC,IAAwBC,EAAAhB,EAAU,UAAV,YAAAgB,EAAmB,wBAAwB,SAAU,EACnFd,EAAmBS,GAAuB,CAAC,EAC3CN,EAAmBQ,GAA0BE,CAAqB,EAClEN,EAAgBG,CAAqB,EACrCL,EAAgBQ,CAAqB,CAAA,EAGJ,CAAC,SAAU,QAAQ,CAAC,EAEhD,CAAE,gBAAAd,EAAiB,gBAAAG,EAAiB,aAAAE,EAAc,aAAAE,CAAa,CACxE"}
@@ -1 +1 @@
1
- {"version":3,"file":"useToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useToggle.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,iBAAkB,OAAO,sBAAqB,OAAO,KAAK,IAAI;WAAY,OAAO;iBAAe,MAAM,IAAI;CAqB/H,CAAC"}
1
+ {"version":3,"file":"useToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useToggle.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,iBAAkB,OAAO,sBAAqB,OAAO,KAAK,IAAI;WAAY,OAAO;iBAAe,MAAM,IAAI;CAqB/H,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useToggle.js","sources":["../../src/hooks/useToggle.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport { usePrevious } from './usePrevious';\n\n/**\n * Hook for å toggle en boolean og kjøre en callback når verdien endres\n *\n * @param initialValue Initiell verdi for boolean\n * @param callback Funksjon som kalles når value endrer verdi (optional)\n * @returns Objekt med nåværende verdi og funksjon som kan kalles for å toggle verdien\n */\nexport const useToggle = (initialValue: boolean, callback?: (value: boolean) => void): { value: boolean; toggleValue: () => void } => {\n const [value, setValue] = useState(initialValue);\n const previousValue = usePrevious(value);\n\n const toggleValue = () => {\n setValue(!value);\n };\n\n useEffect(() => {\n if (initialValue !== value) {\n setValue(initialValue);\n }\n }, [initialValue]);\n\n useEffect(() => {\n if (callback && value !== !!previousValue) {\n callback(value);\n }\n }, [value, callback]);\n\n return { value, toggleValue };\n};\n"],"names":["useToggle","initialValue","callback","value","setValue","useState","previousValue","usePrevious","toggleValue","useEffect"],"mappings":"+FAUa,MAAAA,EAAY,CAACC,EAAuBC,IAAqF,CACpI,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAASJ,CAAY,EACzCK,EAAgBC,EAAYJ,CAAK,EAEjCK,EAAc,IAAM,CACxBJ,EAAS,CAACD,CAAK,CAAA,EAGjB,OAAAM,EAAU,IAAM,CACVR,IAAiBE,GACnBC,EAASH,CAAY,CACvB,EACC,CAACA,CAAY,CAAC,EAEjBQ,EAAU,IAAM,CACVP,GAAYC,IAAU,CAAC,CAACG,GAC1BJ,EAASC,CAAK,CAChB,EACC,CAACA,EAAOD,CAAQ,CAAC,EAEb,CAAE,MAAAC,EAAO,YAAAK,EAClB"}
1
+ {"version":3,"file":"useToggle.js","sources":["../../src/hooks/useToggle.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { usePrevious } from './usePrevious';\n\n/**\n * Hook for å toggle en boolean og kjøre en callback når verdien endres\n *\n * @param initialValue Initiell verdi for boolean\n * @param callback Funksjon som kalles når value endrer verdi (optional)\n * @returns Objekt med nåværende verdi og funksjon som kan kalles for å toggle verdien\n */\nexport const useToggle = (initialValue: boolean, callback?: (value: boolean) => void): { value: boolean; toggleValue: () => void } => {\n const [value, setValue] = useState(initialValue);\n const previousValue = usePrevious(value);\n\n const toggleValue = () => {\n setValue(!value);\n };\n\n useEffect(() => {\n if (initialValue !== value) {\n setValue(initialValue);\n }\n }, [initialValue]);\n\n useEffect(() => {\n if (callback && value !== !!previousValue) {\n callback(value);\n }\n }, [value, callback]);\n\n return { value, toggleValue };\n};\n"],"names":["useToggle","initialValue","callback","value","setValue","useState","previousValue","usePrevious","toggleValue","useEffect"],"mappings":"+FAWa,MAAAA,EAAY,CAACC,EAAuBC,IAAqF,CACpI,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAASJ,CAAY,EACzCK,EAAgBC,EAAYJ,CAAK,EAEjCK,EAAc,IAAM,CACxBJ,EAAS,CAACD,CAAK,CAAA,EAGjB,OAAAM,EAAU,IAAM,CACVR,IAAiBE,GACnBC,EAASH,CAAY,CACvB,EACC,CAACA,CAAY,CAAC,EAEjBQ,EAAU,IAAM,CACVP,GAAYC,IAAU,CAAC,CAACG,GAC1BJ,EAASC,CAAK,CAChB,EACC,CAACA,EAAOD,CAAQ,CAAC,EAEb,CAAE,MAAAC,EAAO,YAAAK,EAClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"useUuid.d.ts","sourceRoot":"","sources":["../../src/hooks/useUuid.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,OAAO,aAAc,MAAM,KAAG,MAI1C,CAAC"}
1
+ {"version":3,"file":"useUuid.d.ts","sourceRoot":"","sources":["../../src/hooks/useUuid.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,OAAO,aAAc,MAAM,KAAG,MAI1C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useUuid.js","sources":["../../src/hooks/useUuid.ts"],"sourcesContent":["import { useState } from 'react';\nimport { uuid } from '../utils/uuid';\n\n/**\n * Returner unik uuid som ikke endrer seg for hver render\n * @param initial id som vil overstyre id fra uuid-utility\n * @returns uuid-string\n */\nexport const useUuid = (initial?: string): string => {\n const [id] = useState(initial || uuid());\n\n return id;\n};\n"],"names":["useUuid","initial","id","useState","uuid"],"mappings":"gGAQa,MAAAA,EAAWC,GAA6B,CACnD,KAAM,CAACC,CAAE,EAAIC,EAASF,GAAWG,EAAM,CAAA,EAEhC,OAAAF,CACT"}
1
+ {"version":3,"file":"useUuid.js","sources":["../../src/hooks/useUuid.ts"],"sourcesContent":["import { useState } from 'react';\n\nimport { uuid } from '../utils/uuid';\n\n/**\n * Returner unik uuid som ikke endrer seg for hver render\n * @param initial id som vil overstyre id fra uuid-utility\n * @returns uuid-string\n */\nexport const useUuid = (initial?: string): string => {\n const [id] = useState(initial || uuid());\n\n return id;\n};\n"],"names":["useUuid","initial","id","useState","uuid"],"mappings":"gGASa,MAAAA,EAAWC,GAA6B,CACnD,KAAM,CAACC,CAAE,EAAIC,EAASF,GAAWG,EAAM,CAAA,EAEhC,OAAAF,CACT"}
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{theme as n}from"./theme/index.js";import{Breakpoint as d,useBreakpoint as v}from"./hooks/useBreakpoint.js";import{useFocusToggle as c}from"./hooks/useFocusToggle.js";import{useFocusTrap as I}from"./hooks/useFocusTrap.js";import{useHover as A}from"./hooks/useHover.js";import{useIntersectionObserver as g}from"./hooks/useIntersectionObserver.js";import{useIsVisible as F}from"./hooks/useIsVisible.js";import{useLayoutEvent as k}from"./hooks/useLayoutEvent.js";import{usePrevious as H}from"./hooks/usePrevious.js";import{useSticky as O}from"./hooks/useSticky.js";import{useSize as V}from"./hooks/useSize.js";import{useResizeObserver as B}from"./hooks/useResizeObserver.js";import{useToggle as P}from"./hooks/useToggle.js";import{useKeyboardEvent as D}from"./hooks/useKeyboardEvent.js";import{useOutsideEvent as L}from"./hooks/useOutsideEvent.js";import{useUuid as U}from"./hooks/useUuid.js";import{a as X}from"./uuid.js";import{AVERAGE_CHARACTER_WIDTH_PX as j,AnalyticsId as q,FormMode as w,FormVariant as J,IconSize as N,KeyboardEventKey as Q,ZIndex as Y}from"./constants.js";import"./theme/palette.js";import"./theme/spacers.js";import"./theme/grid.js";import"react";import"./hooks/useElementList.js";import"./hooks/useFocusableElements.js";import"./utils/focus.js";import"./utils/debounce.js";import"./utils/environment.js";export{j as AVERAGE_CHARACTER_WIDTH_PX,q as AnalyticsId,d as Breakpoint,w as FormMode,J as FormVariant,N as IconSize,Q as KeyboardEventKey,Y as ZIndex,n as theme,v as useBreakpoint,c as useFocusToggle,I as useFocusTrap,A as useHover,g as useIntersectionObserver,F as useIsVisible,D as useKeyboardEvent,k as useLayoutEvent,L as useOutsideEvent,H as usePrevious,B as useResizeObserver,V as useSize,O as useSticky,P as useToggle,U as useUuid,X as uuid};
1
+ import{theme as n}from"./theme/index.js";import{Breakpoint as d,useBreakpoint as v}from"./hooks/useBreakpoint.js";import{useFocusToggle as c}from"./hooks/useFocusToggle.js";import{useFocusTrap as I}from"./hooks/useFocusTrap.js";import{useHover as A}from"./hooks/useHover.js";import{useIntersectionObserver as g}from"./hooks/useIntersectionObserver.js";import{useIsVisible as F}from"./hooks/useIsVisible.js";import{useLayoutEvent as k}from"./hooks/useLayoutEvent.js";import{usePrevious as H}from"./hooks/usePrevious.js";import{useSticky as O}from"./hooks/useSticky.js";import{useSize as V}from"./hooks/useSize.js";import{useResizeObserver as B}from"./hooks/useResizeObserver.js";import{useToggle as P}from"./hooks/useToggle.js";import{useKeyboardEvent as D}from"./hooks/useKeyboardEvent.js";import{useOutsideEvent as L}from"./hooks/useOutsideEvent.js";import{useUuid as U}from"./hooks/useUuid.js";import{a as X}from"./uuid.js";import{AVERAGE_CHARACTER_WIDTH_PX as j,AnalyticsId as q,FormMode as w,FormVariant as J,IconSize as N,KeyboardEventKey as Q,ZIndex as Y}from"./constants.js";import"./theme/grid.js";import"./theme/palette.js";import"./theme/spacers.js";import"react";import"./hooks/useElementList.js";import"./hooks/useFocusableElements.js";import"./utils/focus.js";import"./utils/debounce.js";import"./utils/environment.js";export{j as AVERAGE_CHARACTER_WIDTH_PX,q as AnalyticsId,d as Breakpoint,w as FormMode,J as FormVariant,N as IconSize,Q as KeyboardEventKey,Y as ZIndex,n as theme,v as useBreakpoint,c as useFocusToggle,I as useFocusTrap,A as useHover,g as useIntersectionObserver,F as useIsVisible,D as useKeyboardEvent,k as useLayoutEvent,L as useOutsideEvent,H as usePrevious,B as useResizeObserver,V as useSize,O as useSticky,P as useToggle,U as useUuid,X as uuid};
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "description": "The official design system for Helsenorge built with React.",
5
5
  "homepage": "https://helsenorge.design",
6
- "version": "2.17.0",
6
+ "version": "3.0.1",
7
7
  "author": "Helsenorge",
8
8
  "license": "MIT",
9
9
  "peerDependencies": {
package/scss/_body.scss CHANGED
@@ -1,3 +1,4 @@
1
+ @use 'sass:map';
1
2
  @import './font-settings';
2
3
  @import './palette';
3
4
  @import './breakpoints';
@@ -8,7 +9,8 @@ body {
8
9
  color: $black;
9
10
  font-size: $font-size-sm;
10
11
  line-height: $lineheight-size-sm;
11
- @media (min-width: map-get($grid-breakpoints, md)) {
12
+
13
+ @media (min-width: map.get($grid-breakpoints, md)) {
12
14
  font-size: $font-size-md;
13
15
  line-height: $lineheight-size-md;
14
16
  }
@@ -1,9 +1,8 @@
1
+ @use 'sass:map';
1
2
  @import 'spacers';
2
3
 
3
- $grid-gutter-width: map-get($spacers, 5);
4
-
4
+ $grid-gutter-width: map.get($spacers, 5);
5
5
  $grid-columns: 12;
6
-
7
6
  $grid-breakpoints: (
8
7
  xxs: 0,
9
8
  xs: 360px,
@@ -12,13 +11,11 @@ $grid-breakpoints: (
12
11
  lg: 1088px,
13
12
  xl: 1450px,
14
13
  );
15
-
16
14
  $grid-max-breakpoints: (
17
- xs: map-get($grid-breakpoints, sm) - 0.02,
18
- sm: map-get($grid-breakpoints, md) - 0.02,
19
- md: map-get($grid-breakpoints, lg) - 0.02,
15
+ xs: map.get($grid-breakpoints, sm) - 0.02,
16
+ sm: map.get($grid-breakpoints, md) - 0.02,
17
+ md: map.get($grid-breakpoints, lg) - 0.02,
20
18
  );
21
-
22
19
  $container-max-widths: (
23
20
  sm: 528px,
24
21
  md: 612px,
@@ -1,8 +1,8 @@
1
1
  // Do not edit directly
2
2
  // Generated on Wed, 05 Oct 2022 11:38:01 GMT
3
3
 
4
- $palette-white: #ffffff;
5
- $palette-black: #000000;
4
+ $palette-white: #fff;
5
+ $palette-black: #000;
6
6
  $palette-plum900: #3c1471;
7
7
  $palette-plum800: #4c1b8c;
8
8
  $palette-plum700: #5b22a6;