@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,34 +1,42 @@
1
- @import '../../scss/_spacers.scss';
2
- @import '../../scss/_palette.scss';
3
- @import '../../scss/_breakpoints.scss';
1
+ @use 'sass:map';
2
+ @import '../../scss/spacers';
3
+ @import '../../scss/palette';
4
+ @import '../../scss/breakpoints';
5
+
4
6
  .close {
5
7
  display: flex;
6
8
  align-items: center;
7
9
  justify-content: center;
8
- @media (max-width: map-get($grid-breakpoints, sm)) {
10
+
11
+ @media (max-width: map.get($grid-breakpoints, sm)) {
9
12
  height: 2.375rem;
10
13
  width: 2.375rem;
11
14
  }
15
+
12
16
  height: 3rem;
13
17
  width: 3rem;
14
18
  padding: 0;
15
19
  border: 0;
16
20
  background-color: transparent;
17
21
  cursor: pointer;
22
+
18
23
  &:hover,
19
24
  &:active {
20
- background-color: rgba(88, 170, 187, 0.1);
25
+ background-color: rgb(88 170 187 / 10%);
21
26
  }
27
+
22
28
  &:focus {
23
- box-shadow: 0px 0px 0px 2px $black;
29
+ box-shadow: 0 0 0 2px $black;
24
30
  background-color: transparent;
25
31
  border-radius: 0;
26
32
  border: 0;
27
33
  outline: none;
28
34
  }
29
- &:hover#{&}:hover {
30
- background-color: rgba(88, 170, 187, 0.1);
35
+
36
+ &:hover {
37
+ background-color: rgb(88 170 187 / 10%);
31
38
  }
39
+
32
40
  &--small {
33
41
  height: auto;
34
42
  width: auto;
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAuBhD,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,KAAK,EAAE,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xB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,0BAA0B;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,OAAO,YAAY,CAAC;IACjC,uCAAuC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAsJrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"props":{"label":{"defaultValue":null,"description":"Label for dropdown. Synlig for skjermlesere.","name":"label","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":true,"type":{"name":"string"}},"placeholder":{"defaultValue":null,"description":"Tekst på knappen som åpner dropdownen","name":"placeholder","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":true,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Sets the dropdown content","name":"children","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"closeText":{"defaultValue":null,"description":"Close button text","name":"closeText","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"string"}},"noCloseButton":{"defaultValue":null,"description":"No close button","name":"noCloseButton","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"boolean"}},"onToggle":{"defaultValue":null,"description":"Called when dropdown is open/closed.","name":"onToggle","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"((isOpen: boolean) => void)"}},"open":{"defaultValue":null,"description":"Om dropdown er åpen","name":"open","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"boolean"}},"mode":{"defaultValue":null,"description":"Changes the visuals of the dropdown","name":"mode","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"enum","raw":"\"onwhite\" | \"ongrey\" | \"onblueberry\" | \"oncherry\"","value":[{"value":"\"onwhite\""},{"value":"\"ongrey\""},{"value":"\"onblueberry\""},{"value":"\"oncherry\""}]}},"transparent":{"defaultValue":null,"description":"Makes the background transparent","name":"transparent","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"boolean"}},"fluid":{"defaultValue":null,"description":"Makes the background transparent","name":"fluid","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"boolean"}},"disabled":{"defaultValue":null,"description":"Makes the dropdown disabled","name":"disabled","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"boolean"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute on the dropdown button.","name":"testId","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"string"}}}}
1
+ {"props":{"label":{"defaultValue":null,"description":"Label for dropdown. Synlig for skjermlesere.","name":"label","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":true,"type":{"name":"string"}},"placeholder":{"defaultValue":null,"description":"Tekst på knappen som åpner dropdownen","name":"placeholder","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":true,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Sets the dropdown content","name":"children","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},{"fileName":"s/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"closeText":{"defaultValue":null,"description":"Close button text","name":"closeText","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"string"}},"noCloseButton":{"defaultValue":null,"description":"No close button","name":"noCloseButton","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"boolean"}},"onToggle":{"defaultValue":null,"description":"Called when dropdown is open/closed.","name":"onToggle","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"((isOpen: boolean) => void)"}},"open":{"defaultValue":null,"description":"Om dropdown er åpen","name":"open","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"boolean"}},"mode":{"defaultValue":null,"description":"Changes the visuals of the dropdown","name":"mode","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"enum","raw":"\"onwhite\" | \"ongrey\" | \"onblueberry\" | \"oncherry\"","value":[{"value":"\"onwhite\""},{"value":"\"ongrey\""},{"value":"\"onblueberry\""},{"value":"\"oncherry\""}]}},"transparent":{"defaultValue":null,"description":"Makes the background transparent","name":"transparent","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"boolean"}},"fluid":{"defaultValue":null,"description":"Makes the background transparent","name":"fluid","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"boolean"}},"disabled":{"defaultValue":null,"description":"Makes the dropdown disabled","name":"disabled","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"boolean"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute on the dropdown button.","name":"testId","parent":{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"},"declarations":[{"fileName":"src/components/Dropdown/Dropdown.tsx","name":"DropdownProps"}],"required":false,"type":{"name":"string"}}}}
@@ -1,2 +1,2 @@
1
- import t,{useRef as f,useState as V}from"react";import v from"classnames";import{Icon as W}from"../Icons/Icon.js";import{KeyboardEventKey as r,AnalyticsId as X,IconSize as j}from"../../constants.js";import{theme as C}from"../../theme/index.js";import"../../hooks/useBreakpoint.js";import{useHover as q}from"../../hooks/useHover.js";import{useSize as F}from"../../hooks/useSize.js";import{useToggle as G}from"../../hooks/useToggle.js";import{useKeyboardEvent as J}from"../../hooks/useKeyboardEvent.js";import{useOutsideEvent as Q}from"../../hooks/useOutsideEvent.js";import{useUuid as g}from"../../hooks/useUuid.js";import e from"./styles.module.scss";import Y from"../Icons/PlusSmall.js";import{B as Z}from"../../Button.js";import"../../uuid.js";import"../../utils/environment.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../utils/debounce.js";import"../../hooks/usePrevious.js";import"../../theme/currys/color.js";import"../../hooks/useIcons.js";import"../Button/styles.module.scss";import"../Icons/ArrowRight.js";var M=(s=>(s.onwhite="onwhite",s.ongrey="ongrey",s.onblueberry="onblueberry",s.oncherry="oncherry",s))(M||{});const Ce=s=>{const{label:R,placeholder:A,closeText:K="Lukk",noCloseButton:S=!1,onToggle:$,open:H=!1,children:_,mode:d="onwhite",transparent:O=!1,fluid:y=!1,testId:z,disabled:c}=s,p=f(null),b=f(null),{hoverRef:m,isHovered:B}=q(),{value:a,toggleValue:w}=G(!c&&H,$),i=f(t.Children.map(_,()=>t.createRef())),[h,L]=V(),{width:T}=F(m)||{},E=g(),x=g(),I=g(),N=()=>{var o;w(),(o=b.current)==null||o.focus()},u=()=>{var o;w(),(o=m.current)==null||o.focus()};J(p,o=>{var k;if(o.preventDefault(),!i.current)return;if(a){if(o.key===r.Escape&&a){u();return}}else{N();return}const l=i.current.findIndex(P=>P.current===o.target);let n=l;o.key===r.Home?n=0:o.key===r.End?n=i.current.length-1:o.key===r.ArrowDown&&l<i.current.length-1?n=l+1:o.key===r.ArrowUp&&l>0?n=l-1:o.key===r.Enter&&l!==-1&&(n=l),n!==-1&&((k=i.current[n].current)==null||k.focus(),L(n))},[r.ArrowDown,r.ArrowUp,r.End,r.Enter,r.Escape,r.Home]),Q(p,()=>a&&u());const U=v(e.dropdown__toggle,!c&&{[e["dropdown__toggle--on-white"]]:d==="onwhite",[e["dropdown__toggle--on-grey"]]:d==="ongrey",[e["dropdown__toggle--on-blueberry"]]:d==="onblueberry",[e["dropdown__toggle--on-cherry"]]:d==="oncherry",[e["dropdown__toggle--transparent"]]:O,[e["dropdown__toggle--fluid"]]:y,[e["dropdown__toggle--open"]]:a}),D=v(e.dropdown__content,a&&e["dropdown__content--open"]);return t.createElement("div",{className:e.dropdown,ref:p},t.createElement("span",{id:E,className:e.dropdown__label},R),t.createElement("button",{type:"button",onClick:()=>!a&&N(),className:U,ref:m,"data-testid":z,"data-analyticsid":X.Dropdown,disabled:c,"aria-labelledby":x,"aria-haspopup":"listbox","aria-expanded":a},t.createElement("span",{id:x,className:e.dropdown__toggle__label},A),t.createElement(W,{color:c?C.palette.neutral500:C.palette.blueberry600,svgIcon:Y,className:e.dropdown__icon,isHovered:B,size:j.XSmall})),t.createElement("div",{className:D,style:{width:y?"100%":`${T}px`}},t.createElement("ul",{className:e.dropdown__options,role:"listbox","aria-labelledby":E,tabIndex:-1,"aria-activedescendant":typeof h<"u"?`${I}-${h}`:void 0,ref:b},t.Children.map(_,(o,l)=>{var n;return t.createElement("li",{className:e.dropdown__input,role:"option",id:`${I}-${l}`},t.cloneElement(o,{ref:(n=i.current)==null?void 0:n[l]}))})),!S&&t.createElement("div",{className:e.dropdown__close},t.createElement(Z,{onClick:u,fluid:!0,"aria-expanded":a},K))))};export{M as DropdownMode,Ce as default};
1
+ import t,{useRef as g,useState as V}from"react";import v from"classnames";import{theme as C}from"../../theme/index.js";import"../../hooks/useBreakpoint.js";import{useHover as W}from"../../hooks/useHover.js";import{useSize as X}from"../../hooks/useSize.js";import{useToggle as j}from"../../hooks/useToggle.js";import{useKeyboardEvent as q}from"../../hooks/useKeyboardEvent.js";import{useOutsideEvent as F}from"../../hooks/useOutsideEvent.js";import{useUuid as _}from"../../hooks/useUuid.js";import{KeyboardEventKey as r,AnalyticsId as G,IconSize as J}from"../../constants.js";import{B as Q}from"../../Button.js";import{Icon as Y}from"../Icons/Icon.js";import Z from"../Icons/PlusSmall.js";import e from"./styles.module.scss";import"../../theme/grid.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../utils/debounce.js";import"../../hooks/usePrevious.js";import"../../uuid.js";import"../../utils/environment.js";import"../../hooks/useIcons.js";import"../../theme/currys/color.js";import"../Icons/ArrowRight.js";import"../Button/styles.module.scss";var M=(s=>(s.onwhite="onwhite",s.ongrey="ongrey",s.onblueberry="onblueberry",s.oncherry="oncherry",s))(M||{});const ee=s=>{const{label:R,placeholder:$,closeText:A="Lukk",noCloseButton:K=!1,onToggle:S,open:H=!1,children:y,mode:d="onwhite",transparent:O=!1,fluid:b=!1,testId:z,disabled:c}=s,p=g(null),w=g(null),{hoverRef:m,isHovered:B}=W(),{value:a,toggleValue:h}=j(!c&&H,S),i=g(t.Children.map(y,()=>t.createRef())),[u,D]=V(),{width:L}=X(m)||{},E=_(),I=_(),x=_(),N=()=>{var o;h(),(o=w.current)==null||o.focus()},f=()=>{var o;h(),(o=m.current)==null||o.focus()};q(p,o=>{var k;if(o.preventDefault(),!i.current)return;if(a){if(o.key===r.Escape&&a){f();return}}else{N();return}const n=i.current.findIndex(P=>P.current===o.target);let l=n;o.key===r.Home?l=0:o.key===r.End?l=i.current.length-1:o.key===r.ArrowDown&&n<i.current.length-1?l=n+1:o.key===r.ArrowUp&&n>0?l=n-1:o.key===r.Enter&&n!==-1&&(l=n),l!==-1&&((k=i.current[l].current)==null||k.focus(),D(l))},[r.ArrowDown,r.ArrowUp,r.End,r.Enter,r.Escape,r.Home]),F(p,()=>a&&f());const T=v(e.dropdown__toggle,!c&&{[e["dropdown__toggle--on-white"]]:d==="onwhite",[e["dropdown__toggle--on-grey"]]:d==="ongrey",[e["dropdown__toggle--on-blueberry"]]:d==="onblueberry",[e["dropdown__toggle--on-cherry"]]:d==="oncherry",[e["dropdown__toggle--transparent"]]:O,[e["dropdown__toggle--fluid"]]:b,[e["dropdown__toggle--open"]]:a}),U=v(e.dropdown__content,a&&e["dropdown__content--open"]);return t.createElement("div",{className:e.dropdown,ref:p},t.createElement("span",{id:E,className:e.dropdown__label},R),t.createElement("button",{type:"button",onClick:()=>!a&&N(),className:T,ref:m,"data-testid":z,"data-analyticsid":G.Dropdown,disabled:c,"aria-labelledby":I,"aria-haspopup":"listbox","aria-expanded":a},t.createElement("span",{id:I,className:e.dropdown__toggle__label},$),t.createElement(Y,{color:c?C.palette.neutral500:C.palette.blueberry600,svgIcon:Z,className:e.dropdown__icon,isHovered:B,size:J.XSmall})),t.createElement("div",{className:U,style:{width:b?"100%":`${L}px`}},t.createElement("ul",{className:e.dropdown__options,role:"listbox","aria-labelledby":E,tabIndex:-1,"aria-activedescendant":typeof u<"u"?`${x}-${u}`:void 0,ref:w},t.Children.map(y,(o,n)=>{var l;return t.createElement("li",{className:e.dropdown__input,role:"option",id:`${x}-${n}`,"aria-selected":n===u},t.cloneElement(o,{ref:(l=i.current)==null?void 0:l[n]}))})),!K&&t.createElement("div",{className:e.dropdown__close},t.createElement(Q,{onClick:f,fluid:!0,"aria-expanded":a},A))))},Re=ee;export{M as DropdownMode,Re as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport Icon from '../Icons';\n\nimport {\n AnalyticsId,\n IconSize,\n KeyboardEventKey,\n theme,\n useHover,\n useKeyboardEvent,\n useOutsideEvent,\n useSize,\n useToggle,\n useUuid,\n} from '../..';\n\nimport styles from './styles.module.scss';\nimport PlusSmall from '../Icons/PlusSmall';\nimport Button from '../Button';\n\nexport enum DropdownMode {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n oncherry = 'oncherry',\n}\n\nexport interface DropdownProps {\n /** Label for dropdown. Synlig for skjermlesere. */\n label: string;\n /** Tekst på knappen som åpner dropdownen */\n placeholder: string;\n /** Sets the dropdown content */\n children: React.ReactNode;\n /** Close button text */\n closeText?: string;\n /** No close button */\n noCloseButton?: boolean;\n /** Called when dropdown is open/closed. */\n onToggle?: (isOpen: boolean) => void;\n /** Om dropdown er åpen */\n open?: boolean;\n /** Changes the visuals of the dropdown */\n mode?: keyof typeof DropdownMode;\n /** Makes the background transparent */\n transparent?: boolean;\n /** Makes the background transparent */\n fluid?: boolean;\n /** Makes the dropdown disabled */\n disabled?: boolean;\n /** Sets the data-testid attribute on the dropdown button. */\n testId?: string;\n}\n\nconst Dropdown: React.FC<DropdownProps> = props => {\n const {\n label,\n placeholder,\n closeText = 'Lukk',\n noCloseButton = false,\n onToggle,\n open = false,\n children,\n mode = DropdownMode.onwhite,\n transparent = false,\n fluid = false,\n testId,\n disabled,\n } = props;\n const dropdownRef = useRef<HTMLDivElement>(null);\n const optionsRef = useRef<HTMLUListElement>(null);\n const { hoverRef: buttonRef, isHovered } = useHover<HTMLButtonElement>();\n const { value: isOpen, toggleValue: toggleIsOpen } = useToggle(!disabled && open, onToggle);\n const inputRefList = useRef(React.Children.map(children, () => React.createRef<HTMLElement>()));\n const [currentIndex, setCurrentIndex] = useState<number>();\n const { width: buttonWidth } = useSize(buttonRef) || {};\n const labelId = useUuid();\n const toggleLabelId = useUuid();\n const optionIdPrefix = useUuid();\n\n const handleOpen = () => {\n toggleIsOpen();\n optionsRef.current?.focus();\n };\n\n const handleClose = () => {\n toggleIsOpen();\n buttonRef.current?.focus();\n };\n\n const handleKeyboardNavigation = (event: KeyboardEvent) => {\n event.preventDefault();\n\n if (!inputRefList.current) {\n return;\n }\n\n if (!isOpen) {\n handleOpen();\n return;\n } else if (event.key === KeyboardEventKey.Escape && isOpen) {\n handleClose();\n return;\n }\n\n const index = inputRefList.current.findIndex(x => x.current === event.target);\n let nextIndex = index;\n\n if (event.key === KeyboardEventKey.Home) {\n nextIndex = 0;\n } else if (event.key === KeyboardEventKey.End) {\n nextIndex = inputRefList.current.length - 1;\n } else if (event.key === KeyboardEventKey.ArrowDown && index < inputRefList.current.length - 1) {\n nextIndex = index + 1;\n } else if (event.key === KeyboardEventKey.ArrowUp && index > 0) {\n nextIndex = index - 1;\n } else if (event.key === KeyboardEventKey.Enter && index !== -1) {\n nextIndex = index;\n }\n if (nextIndex !== -1) {\n inputRefList.current[nextIndex].current?.focus();\n setCurrentIndex(nextIndex);\n }\n };\n\n useKeyboardEvent(dropdownRef, handleKeyboardNavigation, [\n KeyboardEventKey.ArrowDown,\n KeyboardEventKey.ArrowUp,\n KeyboardEventKey.End,\n KeyboardEventKey.Enter,\n KeyboardEventKey.Escape,\n KeyboardEventKey.Home,\n ]);\n\n useOutsideEvent(dropdownRef, () => isOpen && handleClose());\n\n const toggleClasses = classNames(\n styles.dropdown__toggle,\n !disabled && {\n [styles['dropdown__toggle--on-white']]: mode === DropdownMode.onwhite,\n [styles['dropdown__toggle--on-grey']]: mode === DropdownMode.ongrey,\n [styles['dropdown__toggle--on-blueberry']]: mode === DropdownMode.onblueberry,\n [styles['dropdown__toggle--on-cherry']]: mode === DropdownMode.oncherry,\n [styles['dropdown__toggle--transparent']]: transparent,\n [styles['dropdown__toggle--fluid']]: fluid,\n [styles['dropdown__toggle--open']]: isOpen,\n }\n );\n\n const contentClasses = classNames(styles.dropdown__content, isOpen && styles['dropdown__content--open']);\n\n return (\n <div className={styles.dropdown} ref={dropdownRef}>\n <span id={labelId} className={styles.dropdown__label}>\n {label}\n </span>\n <button\n type=\"button\"\n onClick={() => !isOpen && handleOpen()}\n className={toggleClasses}\n ref={buttonRef}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Dropdown}\n disabled={disabled}\n aria-labelledby={toggleLabelId}\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen}\n >\n <span id={toggleLabelId} className={styles.dropdown__toggle__label}>\n {placeholder}\n </span>\n <Icon\n color={disabled ? theme.palette.neutral500 : theme.palette.blueberry600}\n svgIcon={PlusSmall}\n className={styles.dropdown__icon}\n isHovered={isHovered}\n size={IconSize.XSmall}\n />\n </button>\n <div className={contentClasses} style={{ width: fluid ? '100%' : `${buttonWidth}px` }}>\n <ul\n className={styles.dropdown__options}\n role=\"listbox\"\n aria-labelledby={labelId}\n tabIndex={-1}\n aria-activedescendant={typeof currentIndex !== 'undefined' ? `${optionIdPrefix}-${currentIndex}` : undefined}\n ref={optionsRef}\n >\n {React.Children.map(children, (child, index) => (\n <li className={styles.dropdown__input} role=\"option\" id={`${optionIdPrefix}-${index}`}>\n {React.cloneElement(child as React.ReactElement, { ref: inputRefList.current?.[index] })}\n </li>\n ))}\n </ul>\n {!noCloseButton && (\n <div className={styles.dropdown__close}>\n <Button onClick={handleClose} fluid aria-expanded={isOpen}>\n {closeText}\n </Button>\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default Dropdown;\n"],"names":["DropdownMode","Dropdown","props","label","placeholder","closeText","noCloseButton","onToggle","open","children","mode","transparent","fluid","testId","disabled","dropdownRef","useRef","optionsRef","buttonRef","isHovered","useHover","isOpen","toggleIsOpen","useToggle","inputRefList","React","currentIndex","setCurrentIndex","useState","buttonWidth","useSize","labelId","useUuid","toggleLabelId","optionIdPrefix","handleOpen","_a","handleClose","useKeyboardEvent","event","KeyboardEventKey","index","x","nextIndex","useOutsideEvent","toggleClasses","classNames","styles","contentClasses","AnalyticsId","Icon","theme","PlusSmall","IconSize","child","Button"],"mappings":"kjCAuBY,IAAAA,GAAAA,IACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,YAAc,cACdA,EAAA,SAAW,WAJDA,IAAAA,GAAA,CAAA,CAAA,EAkCZ,M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C,MAAOpC,EAAWqC,EAAM,QAAQ,WAAaA,EAAM,QAAQ,aAC3D,QAASC,EACT,UAAWL,EAAO,eAClB,UAAA5B,EACA,KAAMkC,EAAS,MACjB,CAAA,CACF,EACC5B,EAAA,cAAA,MAAA,CAAI,UAAWuB,EAAgB,MAAO,CAAE,MAAOpC,EAAQ,OAAS,GAAGiB,KAAgB,CAAA,EACjFJ,EAAA,cAAA,KAAA,CACC,UAAWsB,EAAO,kBAClB,KAAK,UACL,kBAAiBhB,EACjB,SAAU,GACV,wBAAuB,OAAOL,EAAiB,IAAc,GAAGQ,KAAkBR,IAAiB,OACnG,IAAKT,CAAA,EAEJQ,EAAM,SAAS,IAAIhB,EAAU,CAAC6C,EAAOb,IACnC,OAAA,OAAAhB,EAAA,cAAA,KAAA,CAAG,UAAWsB,EAAO,gBAAiB,KAAK,SAAS,GAAI,GAAGb,KAAkBO,GAAA,EAC3EhB,EAAM,aAAa6B,EAA6B,CAAE,KAAKlB,EAAAZ,EAAa,UAAb,YAAAY,EAAuBK,EAAO,CAAC,CACzF,EACD,CACH,EACC,CAACnC,GACCmB,EAAA,cAAA,MAAA,CAAI,UAAWsB,EAAO,eAAA,EACpBtB,EAAA,cAAA8B,EAAA,CAAO,QAASlB,EAAa,MAAK,GAAC,gBAAehB,CAAA,EAChDhB,CACH,CACF,CAEJ,CACF,CAEJ"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport {\n AnalyticsId,\n IconSize,\n KeyboardEventKey,\n theme,\n useHover,\n useKeyboardEvent,\n useOutsideEvent,\n useSize,\n useToggle,\n useUuid,\n} from '../..';\nimport Button from '../Button';\nimport Icon from '../Icons';\nimport PlusSmall from '../Icons/PlusSmall';\n\nimport styles from './styles.module.scss';\n\nexport enum DropdownMode {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n oncherry = 'oncherry',\n}\n\nexport interface DropdownProps {\n /** Label for dropdown. Synlig for skjermlesere. */\n label: string;\n /** Tekst på knappen som åpner dropdownen */\n placeholder: string;\n /** Sets the dropdown content */\n children: React.ReactNode;\n /** Close button text */\n closeText?: string;\n /** No close button */\n noCloseButton?: boolean;\n /** Called when dropdown is open/closed. */\n onToggle?: (isOpen: boolean) => void;\n /** Om dropdown er åpen */\n open?: boolean;\n /** Changes the visuals of the dropdown */\n mode?: keyof typeof DropdownMode;\n /** Makes the background transparent */\n transparent?: boolean;\n /** Makes the background transparent */\n fluid?: boolean;\n /** Makes the dropdown disabled */\n disabled?: boolean;\n /** Sets the data-testid attribute on the dropdown button. */\n testId?: string;\n}\n\nconst Dropdown: React.FC<DropdownProps> = props => {\n const {\n label,\n placeholder,\n closeText = 'Lukk',\n noCloseButton = false,\n onToggle,\n open = false,\n children,\n mode = DropdownMode.onwhite,\n transparent = false,\n fluid = false,\n testId,\n disabled,\n } = props;\n const dropdownRef = useRef<HTMLDivElement>(null);\n const optionsRef = useRef<HTMLUListElement>(null);\n const { hoverRef: buttonRef, isHovered } = useHover<HTMLButtonElement>();\n const { value: isOpen, toggleValue: toggleIsOpen } = useToggle(!disabled && open, onToggle);\n const inputRefList = useRef(React.Children.map(children, () => React.createRef<HTMLElement>()));\n const [currentIndex, setCurrentIndex] = useState<number>();\n const { width: buttonWidth } = useSize(buttonRef) || {};\n const labelId = useUuid();\n const toggleLabelId = useUuid();\n const optionIdPrefix = useUuid();\n\n const handleOpen = () => {\n toggleIsOpen();\n optionsRef.current?.focus();\n };\n\n const handleClose = () => {\n toggleIsOpen();\n buttonRef.current?.focus();\n };\n\n const handleKeyboardNavigation = (event: KeyboardEvent) => {\n event.preventDefault();\n\n if (!inputRefList.current) {\n return;\n }\n\n if (!isOpen) {\n handleOpen();\n return;\n } else if (event.key === KeyboardEventKey.Escape && isOpen) {\n handleClose();\n return;\n }\n\n const index = inputRefList.current.findIndex(x => x.current === event.target);\n let nextIndex = index;\n\n if (event.key === KeyboardEventKey.Home) {\n nextIndex = 0;\n } else if (event.key === KeyboardEventKey.End) {\n nextIndex = inputRefList.current.length - 1;\n } else if (event.key === KeyboardEventKey.ArrowDown && index < inputRefList.current.length - 1) {\n nextIndex = index + 1;\n } else if (event.key === KeyboardEventKey.ArrowUp && index > 0) {\n nextIndex = index - 1;\n } else if (event.key === KeyboardEventKey.Enter && index !== -1) {\n nextIndex = index;\n }\n if (nextIndex !== -1) {\n inputRefList.current[nextIndex].current?.focus();\n setCurrentIndex(nextIndex);\n }\n };\n\n useKeyboardEvent(dropdownRef, handleKeyboardNavigation, [\n KeyboardEventKey.ArrowDown,\n KeyboardEventKey.ArrowUp,\n KeyboardEventKey.End,\n KeyboardEventKey.Enter,\n KeyboardEventKey.Escape,\n KeyboardEventKey.Home,\n ]);\n\n useOutsideEvent(dropdownRef, () => isOpen && handleClose());\n\n const toggleClasses = classNames(\n styles.dropdown__toggle,\n !disabled && {\n [styles['dropdown__toggle--on-white']]: mode === DropdownMode.onwhite,\n [styles['dropdown__toggle--on-grey']]: mode === DropdownMode.ongrey,\n [styles['dropdown__toggle--on-blueberry']]: mode === DropdownMode.onblueberry,\n [styles['dropdown__toggle--on-cherry']]: mode === DropdownMode.oncherry,\n [styles['dropdown__toggle--transparent']]: transparent,\n [styles['dropdown__toggle--fluid']]: fluid,\n [styles['dropdown__toggle--open']]: isOpen,\n }\n );\n\n const contentClasses = classNames(styles.dropdown__content, isOpen && styles['dropdown__content--open']);\n\n return (\n <div className={styles.dropdown} ref={dropdownRef}>\n <span id={labelId} className={styles.dropdown__label}>\n {label}\n </span>\n <button\n type=\"button\"\n onClick={() => !isOpen && handleOpen()}\n className={toggleClasses}\n ref={buttonRef}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Dropdown}\n disabled={disabled}\n aria-labelledby={toggleLabelId}\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen}\n >\n <span id={toggleLabelId} className={styles.dropdown__toggle__label}>\n {placeholder}\n </span>\n <Icon\n color={disabled ? theme.palette.neutral500 : theme.palette.blueberry600}\n svgIcon={PlusSmall}\n className={styles.dropdown__icon}\n isHovered={isHovered}\n size={IconSize.XSmall}\n />\n </button>\n <div className={contentClasses} style={{ width: fluid ? '100%' : `${buttonWidth}px` }}>\n <ul\n className={styles.dropdown__options}\n role=\"listbox\"\n aria-labelledby={labelId}\n tabIndex={-1}\n aria-activedescendant={typeof currentIndex !== 'undefined' ? `${optionIdPrefix}-${currentIndex}` : undefined}\n ref={optionsRef}\n >\n {React.Children.map(children, (child, index) => (\n <li className={styles.dropdown__input} role=\"option\" id={`${optionIdPrefix}-${index}`} aria-selected={index === currentIndex}>\n {React.cloneElement(child as React.ReactElement, { ref: inputRefList.current?.[index] })}\n </li>\n ))}\n </ul>\n {!noCloseButton && (\n <div className={styles.dropdown__close}>\n <Button onClick={handleClose} fluid aria-expanded={isOpen}>\n {closeText}\n </Button>\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default Dropdown;\n"],"names":["DropdownMode","Dropdown","props","label","placeholder","closeText","noCloseButton","onToggle","open","children","mode","transparent","fluid","testId","disabled","dropdownRef","useRef","optionsRef","buttonRef","isHovered","useHover","isOpen","toggleIsOpen","useToggle","inputRefList","React","currentIndex","setCurrentIndex","useState","buttonWidth","useSize","labelId","useUuid","toggleLabelId","optionIdPrefix","handleOpen","_a","handleClose","useKeyboardEvent","event","KeyboardEventKey","index","x","nextIndex","useOutsideEvent","toggleClasses","classNames","styles","contentClasses","AnalyticsId","Icon","theme","PlusSmall","IconSize","child","Button","Dropdown$1"],"mappings":"kjCAsBY,IAAAA,GAAAA,IACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,YAAc,cACdA,EAAA,SAAW,WAJDA,IAAAA,GAAA,CAAA,CAAA,EAkCZ,MAAMC,GAA6CC,GAAA,CAC3C,KAAA,CACJ,MAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,OACZ,cAAAC,EAAgB,GAChB,SAAAC,EACA,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aAC3D,QAASC,EACT,UAAWL,EAAO,eAClB,UAAA5B,EACA,KAAMkC,EAAS,MAAA,CACjB,CAAA,EAEF5B,EAAA,cAAC,MAAI,CAAA,UAAWuB,EAAgB,MAAO,CAAE,MAAOpC,EAAQ,OAAS,GAAGiB,KAClE,CAAA,EAAAJ,EAAA,cAAC,KAAA,CACC,UAAWsB,EAAO,kBAClB,KAAK,UACL,kBAAiBhB,EACjB,SAAU,GACV,wBAAuB,OAAOL,EAAiB,IAAc,GAAGQ,KAAkBR,IAAiB,OACnG,IAAKT,CAAA,EAEJQ,EAAM,SAAS,IAAIhB,EAAU,CAAC6C,EAAOb,WACnC,OAAAhB,EAAA,cAAA,KAAA,CAAG,UAAWsB,EAAO,gBAAiB,KAAK,SAAS,GAAI,GAAGb,KAAkBO,IAAS,gBAAeA,IAAUf,CAC7G,EAAAD,EAAM,aAAa6B,EAA6B,CAAE,KAAKlB,EAAAZ,EAAa,UAAb,YAAAY,EAAuBK,EAAQ,CAAA,CACzF,EACD,CAAA,EAEF,CAACnC,mBACC,MAAI,CAAA,UAAWyC,EAAO,eACrB,EAAAtB,EAAA,cAAC8B,GAAO,QAASlB,EAAa,MAAK,GAAC,gBAAehB,GAChDhB,CACH,CACF,CAEJ,CACF,CAEJ,EAEAmD,GAAevD"}
@@ -1,14 +1,15 @@
1
- @import '../../scss/_spacers.scss';
2
- @import '../../scss/_breakpoints.scss';
3
- @import '../../scss/_palette.scss';
4
- @import '../../scss/_font-settings.scss';
5
- @import '../../scss/_screen-reader.scss';
1
+ @use 'sass:map';
2
+ @import '../../scss/spacers';
3
+ @import '../../scss/breakpoints';
4
+ @import '../../scss/palette';
5
+ @import '../../scss/font-settings';
6
+ @import '../../scss/screen-reader';
6
7
 
7
8
  .dropdown {
8
9
  position: relative;
9
10
 
10
11
  &__label {
11
- @include sr-only();
12
+ @include sr-only;
12
13
  }
13
14
 
14
15
  &__toggle {
@@ -24,7 +25,7 @@
24
25
  font-size: $font-size-sm;
25
26
  line-height: 1.3rem; // Custom fordi teksten skal henge bedre sammen om den går over to linjer
26
27
 
27
- @media (min-width: map-get($grid-breakpoints, md)) {
28
+ @media (min-width: map.get($grid-breakpoints, md)) {
28
29
  padding: getSpacer(3xs) getSpacer(3xs) getSpacer(3xs) getSpacer(s);
29
30
  font-size: $font-size-md;
30
31
  line-height: 1.5rem;
@@ -43,10 +44,12 @@
43
44
  &--on-grey {
44
45
  border-color: $neutral700;
45
46
  background-color: $white;
47
+
46
48
  &:hover {
47
49
  background-color: $neutral50;
48
50
  box-shadow: 0 0 0 1px $neutral700;
49
51
  }
52
+
50
53
  &:focus {
51
54
  border-color: $black;
52
55
  box-shadow: 0 0 0 1px $black;
@@ -56,10 +59,12 @@
56
59
  &--on-blueberry {
57
60
  border-color: $blueberry500;
58
61
  background-color: $white;
62
+
59
63
  &:hover {
60
64
  background-color: $blueberry50;
61
65
  box-shadow: 0 0 0 1px $blueberry500;
62
66
  }
67
+
63
68
  &:focus {
64
69
  border-color: $black;
65
70
  box-shadow: 0 0 0 1px $black;
@@ -69,10 +74,12 @@
69
74
  &--on-cherry {
70
75
  border-color: $cherry500;
71
76
  background-color: $white;
77
+
72
78
  &:hover {
73
79
  background-color: $cherry50;
74
80
  box-shadow: 0 0 0 1px $cherry500;
75
81
  }
82
+
76
83
  &:focus {
77
84
  border-color: $black;
78
85
  box-shadow: 0 0 0 1px $black;
@@ -82,6 +89,7 @@
82
89
  &--open#{&}--on-white,
83
90
  &--open#{&}--on-grey {
84
91
  background-color: $neutral50;
92
+
85
93
  &:hover {
86
94
  background-color: $white;
87
95
  }
@@ -89,6 +97,7 @@
89
97
 
90
98
  &--open#{&}--on-blueberry {
91
99
  background-color: $blueberry50;
100
+
92
101
  &:hover {
93
102
  background-color: $white;
94
103
  }
@@ -96,6 +105,7 @@
96
105
 
97
106
  &--open#{&}--on-cherry {
98
107
  background-color: $cherry50;
108
+
99
109
  &:hover {
100
110
  background-color: $white;
101
111
  }
@@ -125,6 +135,7 @@
125
135
 
126
136
  &--transparent#{&}--open#{&}--on-grey {
127
137
  background-color: $neutral100;
138
+
128
139
  &:hover {
129
140
  background-color: transparent;
130
141
  }
@@ -132,6 +143,7 @@
132
143
 
133
144
  &--transparent#{&}--open#{&}--on-blueberry {
134
145
  background-color: $blueberry100;
146
+
135
147
  &:hover {
136
148
  background-color: transparent;
137
149
  }
@@ -139,6 +151,7 @@
139
151
 
140
152
  &--transparent#{&}--open#{&}--on-cherry {
141
153
  background-color: $cherry100;
154
+
142
155
  &:hover {
143
156
  background-color: transparent;
144
157
  }
@@ -150,7 +163,8 @@
150
163
 
151
164
  &__label {
152
165
  padding: getSpacer(3xs) 0;
153
- @media (min-width: map-get($grid-breakpoints, md)) {
166
+
167
+ @media (min-width: map.get($grid-breakpoints, md)) {
154
168
  padding: getSpacer(2xs) 0;
155
169
  }
156
170
  }
@@ -166,10 +180,12 @@
166
180
  background-color: $white;
167
181
  margin-top: getSpacer(2xs);
168
182
  box-shadow: 0 0 0 2px $blueberry500;
183
+
169
184
  &--open {
170
185
  display: block;
171
186
  }
172
187
  }
188
+
173
189
  &__options {
174
190
  overflow-x: hidden;
175
191
  overflow-y: auto;
@@ -177,19 +193,24 @@
177
193
  list-style: none;
178
194
  padding: 0;
179
195
  margin: 0;
180
- @media (min-width: map-get($grid-breakpoints, md)) {
196
+
197
+ @media (min-width: map.get($grid-breakpoints, md)) {
181
198
  max-height: 464px;
182
199
  }
183
200
  }
201
+
184
202
  &__close {
185
203
  padding: getSpacer(s);
186
204
  }
205
+
187
206
  &__input {
188
207
  border-bottom: 1px solid $neutral300;
189
208
  padding: getSpacer(2xs) getSpacer(s) getSpacer(2xs) getSpacer(s);
190
- @media (min-width: map-get($grid-breakpoints, md)) {
209
+
210
+ @media (min-width: map.get($grid-breakpoints, md)) {
191
211
  padding: getSpacer(s);
192
212
  }
213
+
193
214
  &:last-child {
194
215
  border-bottom: none;
195
216
  }
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { TitleProps } from '../Title';
3
- export declare type DuolistVariants = 'normal' | 'line';
4
- export declare type BoldColumn = 'first' | 'second' | 'none';
5
- export declare type Border = 'no-border' | 'border';
6
- export declare type Formats = 'formatted' | 'non-formatted';
3
+ export type DuolistVariants = 'normal' | 'line';
4
+ export type BoldColumn = 'first' | 'second' | 'none';
5
+ export type Border = 'no-border' | 'border';
6
+ export type Formats = 'formatted' | 'non-formatted';
7
7
  interface DuolistProps {
8
8
  /** Determines which column is bold */
9
9
  boldColumn?: BoldColumn;
@@ -1 +1 @@
1
- {"version":3,"file":"Duolist.d.ts","sourceRoot":"","sources":["../../../src/components/Duolist/Duolist.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,oBAAY,eAAe,GAAG,QAAQ,GAAG,MAAM,CAAC;AAChD,oBAAY,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AACrD,oBAAY,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAC5C,oBAAY,OAAO,GAAG,WAAW,GAAG,eAAe,CAAC;AAEpD,UAAU,YAAY;IACpB,sCAAsC;IACtC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,iDAAiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,uCAAuC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,gBAAgB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C1B,uCAAuC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,UAAU,iBAAiB;IACzB,sCAAsC;IACtC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oCAAoC;IACpC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,iDAAiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA4BpD,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAyD1C,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,2 +1,2 @@
1
- import t from"react";import u from"classnames";import o from"./styles.module.scss";import{AnalyticsId as w}from"../../constants.js";import{S as B}from"../../Spacer.js";import"../Spacer/styles.module.scss";const D=c=>{const{format:n="formatted",boldColumn:a=n==="non-formatted"?"none":"first",description:d,separator:r=": ",term:l}=c,p=a==="first",f=a==="second",e=n==="non-formatted",C=u(o.duolist__dt,{[o["duolist__dt--bold"]]:p,[o["duolist__dt--non-formatted"]]:e}),_=u(o.duolist__dd,{[o["duolist__dd--bold"]]:f,[o["duolist__dd--non-formatted"]]:e}),s=()=>t.createElement(t.Fragment,null,t.createElement("dt",{"data-separator":e?r:void 0,className:C},l),t.createElement("dd",{className:_},d));return e?t.createElement("div",null,s()):t.createElement(t.Fragment,null,s())},L=c=>{const{boldColumn:n,border:a="no-border",descriptionWidth:d,label:r,format:l="formatted",separator:p,variant:f="normal",children:e,className:C,testId:_}=c,s=a==="border",b=f==="line",v=s&&(r||b),E=l==="non-formatted",F=u(o["duolist-wrapper"],{[o["duolist-wrapper--border"]]:s,[o["duolist-wrapper--extra-padding-top"]]:v},C),x=u(o.duolist,{[o["duolist--line"]]:b,[o["duolist--non-formatted"]]:E}),S=d?d+"%":"minmax(60%, 1fr)";return t.createElement("div",{className:F,"data-testid":_,"data-analyticsid":w.Duolist},r&&t.createElement(t.Fragment,null,r,t.createElement(B,null)),t.createElement("dl",{style:E?void 0:{gridTemplateColumns:`auto ${S}`},className:x},t.Children.map(e,m=>{var N,y,g;if(m===null||typeof m>"u")return;const i=m;if(i.type===D)return t.cloneElement(m,{boldColumn:(N=i.props.boldColumn)!=null?N:n,format:(y=i.props.format)!=null?y:l,separator:(g=i.props.separator)!=null?g:p})})))};export{L as Duolist,D as DuolistGroup,L as default};
1
+ import t from"react";import u from"classnames";import{AnalyticsId as F}from"../../constants.js";import{S as x}from"../../Spacer.js";import o from"./styles.module.scss";import"../Spacer/styles.module.scss";const D=c=>{const{format:n="formatted",boldColumn:a=n==="non-formatted"?"none":"first",description:d,separator:r=": ",term:l}=c,p=a==="first",f=a==="second",e=n==="non-formatted",C=u(o.duolist__dt,{[o["duolist__dt--bold"]]:p,[o["duolist__dt--non-formatted"]]:e}),_=u(o.duolist__dd,{[o["duolist__dd--bold"]]:f,[o["duolist__dd--non-formatted"]]:e}),s=()=>t.createElement(t.Fragment,null,t.createElement("dt",{"data-separator":e?r:void 0,className:C},l),t.createElement("dd",{className:_},d));return e?t.createElement("div",null,s()):t.createElement(t.Fragment,null,s())},S=c=>{const{boldColumn:n,border:a="no-border",descriptionWidth:d,label:r,format:l="formatted",separator:p,variant:f="normal",children:e,className:C,testId:_}=c,s=a==="border",b=f==="line",N=s&&(r||b),E=l==="non-formatted",y=u(o["duolist-wrapper"],{[o["duolist-wrapper--border"]]:s,[o["duolist-wrapper--extra-padding-top"]]:N},C),g=u(o.duolist,{[o["duolist--line"]]:b,[o["duolist--non-formatted"]]:E}),v=d?d+"%":"minmax(60%, 1fr)";return t.createElement("div",{className:y,"data-testid":_,"data-analyticsid":F.Duolist},r&&t.createElement(t.Fragment,null,r,t.createElement(x,null)),t.createElement("dl",{style:E?void 0:{gridTemplateColumns:`auto ${v}`},className:g},t.Children.map(e,m=>{if(m===null||typeof m>"u")return;const i=m;if(i.type===D)return t.cloneElement(m,{boldColumn:i.props.boldColumn??n,format:i.props.format??l,separator:i.props.separator??p})})))},W=S;export{S as Duolist,D as DuolistGroup,W as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Duolist/Duolist.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\nimport duolistStyles from './styles.module.scss';\nimport { AnalyticsId } from '../../constants';\nimport { TitleProps } from '../Title';\nimport Spacer from '../Spacer';\n\nexport type DuolistVariants = 'normal' | 'line';\nexport type BoldColumn = 'first' | 'second' | 'none';\nexport type Border = 'no-border' | 'border';\nexport type Formats = 'formatted' | 'non-formatted';\n\ninterface DuolistProps {\n /** Determines which column is bold */\n boldColumn?: BoldColumn;\n /** Label of the Duolist */\n border?: Border;\n /** Label of the Duolist */\n label?: TitleProps;\n /** Formatted or non-formatted visual variants */\n format?: Formats;\n /** Character separator for non-formatted format */\n separator?: string;\n /** Sets the visual variant of the Duolist. */\n variant?: DuolistVariants;\n /** Sets the content of the Duolist. */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Width of the description column in percentage */\n descriptionWidth?: number;\n}\n\ninterface DuolistGroupProps {\n /** Determines which column is bold */\n boldColumn?: BoldColumn;\n /** Sets content of the <dd> tag. */\n description: React.ReactNode;\n /** Formatted or non-formatted visual variants */\n format?: Formats;\n /** Character separator for non-formatted format */\n separator?: string;\n /** Sets content of the <dt> tag. */\n term: React.ReactNode;\n}\n\nexport const DuolistGroup: React.FC<DuolistGroupProps> = props => {\n const { format = 'formatted', boldColumn = format === 'non-formatted' ? 'none' : 'first', description, separator = ': ', term } = props;\n\n const firstBold = boldColumn === 'first';\n const secondBold = boldColumn === 'second';\n const nonFormatted = format === 'non-formatted';\n\n const dtClassNames = classNames(duolistStyles['duolist__dt'], {\n [duolistStyles['duolist__dt--bold']]: firstBold,\n [duolistStyles['duolist__dt--non-formatted']]: nonFormatted,\n });\n const ddClassNames = classNames(duolistStyles['duolist__dd'], {\n [duolistStyles['duolist__dd--bold']]: secondBold,\n [duolistStyles['duolist__dd--non-formatted']]: nonFormatted,\n });\n\n const renderContent = () => {\n return (\n <>\n <dt data-separator={nonFormatted ? separator : undefined} className={dtClassNames}>\n {term}\n </dt>\n <dd className={ddClassNames}>{description}</dd>\n </>\n );\n };\n\n return nonFormatted ? <div>{renderContent()}</div> : <>{renderContent()}</>;\n};\n\nexport const Duolist: React.FC<DuolistProps> = props => {\n const {\n boldColumn,\n border = 'no-border',\n descriptionWidth,\n label,\n format = 'formatted',\n separator,\n variant = 'normal',\n children,\n className,\n testId,\n } = props;\n\n const hasBorder = border === 'border';\n const hasLines = variant === 'line';\n const extraPaddingTop = hasBorder && (label || hasLines);\n const nonFormatted = format === 'non-formatted';\n\n const duolistWrapperClasses = classNames(\n duolistStyles['duolist-wrapper'],\n {\n [duolistStyles['duolist-wrapper--border']]: hasBorder,\n [duolistStyles['duolist-wrapper--extra-padding-top']]: extraPaddingTop,\n },\n className\n );\n\n const duolistClasses = classNames(duolistStyles.duolist, {\n [duolistStyles['duolist--line']]: hasLines,\n [duolistStyles['duolist--non-formatted']]: nonFormatted,\n });\n const duolistColumnStyle = descriptionWidth ? descriptionWidth + '%' : 'minmax(60%, 1fr)';\n\n return (\n <div className={duolistWrapperClasses} data-testid={testId} data-analyticsid={AnalyticsId.Duolist}>\n {label && (\n <>\n {label}\n <Spacer />\n </>\n )}\n <dl style={!nonFormatted ? { gridTemplateColumns: `auto ${duolistColumnStyle}` } : undefined} className={duolistClasses}>\n {React.Children.map(children, (child: React.ReactNode | React.ReactElement<DuolistGroupProps>) => {\n if (child === null || typeof child === 'undefined') return;\n const duolistGroup = child as React.ReactElement<DuolistGroupProps>;\n if (duolistGroup.type === DuolistGroup) {\n return React.cloneElement(child as React.ReactElement<DuolistGroupProps>, {\n boldColumn: duolistGroup.props.boldColumn ?? boldColumn,\n format: duolistGroup.props.format ?? format,\n separator: duolistGroup.props.separator ?? separator,\n });\n }\n })}\n </dl>\n </div>\n );\n};\n\nexport default Duolist;\n"],"names":["DuolistGroup","props","format","boldColumn","description","separator","term","firstBold","secondBold","nonFormatted","dtClassNames","classNames","duolistStyles","ddClassNames","renderContent","React","Duolist","border","descriptionWidth","label","variant","children","className","testId","hasBorder","hasLines","extraPaddingTop","duolistWrapperClasses","duolistClasses","duolistColumnStyle","AnalyticsId","Spacer","child","duolistGroup","_a","_b","_c"],"mappings":"6MAiDO,MAAMA,EAAqDC,GAAA,CAChE,KAAM,CAAE,OAAAC,EAAS,YAAa,WAAAC,EAAaD,IAAW,gBAAkB,OAAS,QAAS,YAAAE,EAAa,UAAAC,EAAY,KAAM,KAAAC,CAAA,EAASL,EAE5HM,EAAYJ,IAAe,QAC3BK,EAAaL,IAAe,SAC5BM,EAAeP,IAAW,gBAE1BQ,EAAeC,EAAWC,EAAc,YAAgB,CAC5D,CAACA,EAAc,sBAAuBL,EACtC,CAACK,EAAc,+BAAgCH,CAAA,CAChD,EACKI,EAAeF,EAAWC,EAAc,YAAgB,CAC5D,CAACA,EAAc,sBAAuBJ,EACtC,CAACI,EAAc,+BAAgCH,CAAA,CAChD,EAEKK,EAAgB,oCAGfC,EAAA,cAAA,KAAA,CAAG,iBAAgBN,EAAeJ,EAAY,OAAW,UAAWK,CAClE,EAAAJ,CACH,EACCS,EAAA,cAAA,KAAA,CAAG,UAAWF,CAAA,EAAeT,CAAY,CAC5C,EAIG,OAAAK,kBAAgB,MAAK,KAAAK,EAAgB,CAAA,EAASC,EAAA,cAAAA,EAAA,SAAA,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":3,"file":"index.js","sources":["../../../src/components/Duolist/Duolist.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport Spacer from '../Spacer';\nimport { TitleProps } from '../Title';\n\nimport duolistStyles from './styles.module.scss';\n\nexport type DuolistVariants = 'normal' | 'line';\nexport type BoldColumn = 'first' | 'second' | 'none';\nexport type Border = 'no-border' | 'border';\nexport type Formats = 'formatted' | 'non-formatted';\n\ninterface DuolistProps {\n /** Determines which column is bold */\n boldColumn?: BoldColumn;\n /** Label of the Duolist */\n border?: Border;\n /** Label of the Duolist */\n label?: TitleProps;\n /** Formatted or non-formatted visual variants */\n format?: Formats;\n /** Character separator for non-formatted format */\n separator?: string;\n /** Sets the visual variant of the Duolist. */\n variant?: DuolistVariants;\n /** Sets the content of the Duolist. */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Width of the description column in percentage */\n descriptionWidth?: number;\n}\n\ninterface DuolistGroupProps {\n /** Determines which column is bold */\n boldColumn?: BoldColumn;\n /** Sets content of the <dd> tag. */\n description: React.ReactNode;\n /** Formatted or non-formatted visual variants */\n format?: Formats;\n /** Character separator for non-formatted format */\n separator?: string;\n /** Sets content of the <dt> tag. */\n term: React.ReactNode;\n}\n\nexport const DuolistGroup: React.FC<DuolistGroupProps> = props => {\n const { format = 'formatted', boldColumn = format === 'non-formatted' ? 'none' : 'first', description, separator = ': ', term } = props;\n\n const firstBold = boldColumn === 'first';\n const secondBold = boldColumn === 'second';\n const nonFormatted = format === 'non-formatted';\n\n const dtClassNames = classNames(duolistStyles['duolist__dt'], {\n [duolistStyles['duolist__dt--bold']]: firstBold,\n [duolistStyles['duolist__dt--non-formatted']]: nonFormatted,\n });\n const ddClassNames = classNames(duolistStyles['duolist__dd'], {\n [duolistStyles['duolist__dd--bold']]: secondBold,\n [duolistStyles['duolist__dd--non-formatted']]: nonFormatted,\n });\n\n const renderContent = () => {\n return (\n <>\n <dt data-separator={nonFormatted ? separator : undefined} className={dtClassNames}>\n {term}\n </dt>\n <dd className={ddClassNames}>{description}</dd>\n </>\n );\n };\n\n return nonFormatted ? <div>{renderContent()}</div> : <>{renderContent()}</>;\n};\n\nexport const Duolist: React.FC<DuolistProps> = props => {\n const {\n boldColumn,\n border = 'no-border',\n descriptionWidth,\n label,\n format = 'formatted',\n separator,\n variant = 'normal',\n children,\n className,\n testId,\n } = props;\n\n const hasBorder = border === 'border';\n const hasLines = variant === 'line';\n const extraPaddingTop = hasBorder && (label || hasLines);\n const nonFormatted = format === 'non-formatted';\n\n const duolistWrapperClasses = classNames(\n duolistStyles['duolist-wrapper'],\n {\n [duolistStyles['duolist-wrapper--border']]: hasBorder,\n [duolistStyles['duolist-wrapper--extra-padding-top']]: extraPaddingTop,\n },\n className\n );\n\n const duolistClasses = classNames(duolistStyles.duolist, {\n [duolistStyles['duolist--line']]: hasLines,\n [duolistStyles['duolist--non-formatted']]: nonFormatted,\n });\n const duolistColumnStyle = descriptionWidth ? descriptionWidth + '%' : 'minmax(60%, 1fr)';\n\n return (\n <div className={duolistWrapperClasses} data-testid={testId} data-analyticsid={AnalyticsId.Duolist}>\n {label && (\n <>\n {label}\n <Spacer />\n </>\n )}\n <dl style={!nonFormatted ? { gridTemplateColumns: `auto ${duolistColumnStyle}` } : undefined} className={duolistClasses}>\n {React.Children.map(children, (child: React.ReactNode | React.ReactElement<DuolistGroupProps>) => {\n if (child === null || typeof child === 'undefined') return;\n const duolistGroup = child as React.ReactElement<DuolistGroupProps>;\n if (duolistGroup.type === DuolistGroup) {\n return React.cloneElement(child as React.ReactElement<DuolistGroupProps>, {\n boldColumn: duolistGroup.props.boldColumn ?? boldColumn,\n format: duolistGroup.props.format ?? format,\n separator: duolistGroup.props.separator ?? separator,\n });\n }\n })}\n </dl>\n </div>\n );\n};\n\nexport default Duolist;\n"],"names":["DuolistGroup","props","format","boldColumn","description","separator","term","firstBold","secondBold","nonFormatted","dtClassNames","classNames","duolistStyles","ddClassNames","renderContent","React","Duolist","border","descriptionWidth","label","variant","children","className","testId","hasBorder","hasLines","extraPaddingTop","duolistWrapperClasses","duolistClasses","duolistColumnStyle","AnalyticsId","Spacer","child","duolistGroup","Duolist$1"],"mappings":"6MAmDO,MAAMA,EAAqDC,GAAA,CAChE,KAAM,CAAE,OAAAC,EAAS,YAAa,WAAAC,EAAaD,IAAW,gBAAkB,OAAS,QAAS,YAAAE,EAAa,UAAAC,EAAY,KAAM,KAAAC,CAAA,EAASL,EAE5HM,EAAYJ,IAAe,QAC3BK,EAAaL,IAAe,SAC5BM,EAAeP,IAAW,gBAE1BQ,EAAeC,EAAWC,EAAc,YAAgB,CAC5D,CAACA,EAAc,mBAAmB,CAAC,EAAGL,EACtC,CAACK,EAAc,4BAA4B,CAAC,EAAGH,CAAA,CAChD,EACKI,EAAeF,EAAWC,EAAc,YAAgB,CAC5D,CAACA,EAAc,mBAAmB,CAAC,EAAGJ,EACtC,CAACI,EAAc,4BAA4B,CAAC,EAAGH,CAAA,CAChD,EAEKK,EAAgB,oCAGfC,EAAA,cAAA,KAAA,CAAG,iBAAgBN,EAAeJ,EAAY,OAAW,UAAWK,CAClE,EAAAJ,CACH,EACCS,EAAA,cAAA,KAAA,CAAG,UAAWF,GAAeT,CAAY,CAC5C,EAIG,OAAAK,kBAAgB,MAAK,KAAAK,EAAgB,CAAA,EAASC,EAAA,cAAAA,EAAA,SAAA,KAAGD,EAAgB,CAAA,CAC1E,EAEaE,EAA2Cf,GAAA,CAChD,KAAA,CACJ,WAAAE,EACA,OAAAc,EAAS,YACT,iBAAAC,EACA,MAAAC,EACA,OAAAjB,EAAS,YACT,UAAAG,EACA,QAAAe,EAAU,SACV,SAAAC,EACA,UAAAC,EACA,OAAAC,CACE,EAAAtB,EAEEuB,EAAYP,IAAW,SACvBQ,EAAWL,IAAY,OACvBM,EAAkBF,IAAcL,GAASM,GACzChB,EAAeP,IAAW,gBAE1ByB,EAAwBhB,EAC5BC,EAAc,iBAAiB,EAC/B,CACE,CAACA,EAAc,yBAAyB,CAAC,EAAGY,EAC5C,CAACZ,EAAc,oCAAoC,CAAC,EAAGc,CACzD,EACAJ,CAAA,EAGIM,EAAiBjB,EAAWC,EAAc,QAAS,CACvD,CAACA,EAAc,eAAe,CAAC,EAAGa,EAClC,CAACb,EAAc,wBAAwB,CAAC,EAAGH,CAAA,CAC5C,EACKoB,EAAqBX,EAAmBA,EAAmB,IAAM,mBAEvE,OACGH,EAAA,cAAA,MAAA,CAAI,UAAWY,EAAuB,cAAaJ,EAAQ,mBAAkBO,EAAY,OAAA,EACvFX,GAEIJ,EAAA,cAAAA,EAAA,SAAA,KAAAI,EACAJ,EAAA,cAAAgB,EAAA,IAAO,CACV,EAEFhB,EAAA,cAAC,KAAG,CAAA,MAAQN,EAAuE,OAAxD,CAAE,oBAAqB,QAAQoB,GAAqB,EAAe,UAAWD,GACtGb,EAAM,SAAS,IAAIM,EAAWW,GAAmE,CAC5F,GAAAA,IAAU,MAAQ,OAAOA,EAAU,IAAa,OACpD,MAAMC,EAAeD,EACjB,GAAAC,EAAa,OAASjC,EACjB,OAAAe,EAAM,aAAaiB,EAAgD,CACxE,WAAYC,EAAa,MAAM,YAAc9B,EAC7C,OAAQ8B,EAAa,MAAM,QAAU/B,EACrC,UAAW+B,EAAa,MAAM,WAAa5B,CAAA,CAC5C,CAEJ,CAAA,CACH,CACF,CAEJ,EAEA6B,EAAelB"}
@@ -1,4 +1,5 @@
1
- @import '../../scss/_breakpoints.scss';
1
+ @use 'sass:map';
2
+ @import '../../scss/breakpoints';
2
3
  @import '../../scss/font-settings';
3
4
  @import '../../scss/palette';
4
5
  @import '../../scss/spacers';
@@ -8,6 +9,7 @@
8
9
  padding: getSpacer(s) getSpacer(s) getSpacer(l);
9
10
  border: 0.062rem solid $neutral500;
10
11
  }
12
+
11
13
  &--extra-padding-top {
12
14
  padding-top: getSpacer(xl);
13
15
  padding-bottom: getSpacer(xl);
@@ -19,7 +21,7 @@
19
21
  margin: 0;
20
22
  display: grid;
21
23
 
22
- @media (min-width: map-get($grid-breakpoints, sm)) {
24
+ @media (min-width: map.get($grid-breakpoints, sm)) {
23
25
  font-size: $font-size-md;
24
26
  }
25
27
 
@@ -45,7 +47,7 @@
45
47
  &__dt {
46
48
  padding-right: getSpacer(l);
47
49
 
48
- @media (min-width: map-get($grid-breakpoints, sm)) {
50
+ @media (min-width: map.get($grid-breakpoints, sm)) {
49
51
  padding-right: 2.6669rem;
50
52
  }
51
53
 
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorWrapper/ErrorWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiBpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ErrorWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorWrapper/ErrorWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiBpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"props":{"errorText":{"defaultValue":null,"description":"Error message","name":"errorText","parent":{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"},"declarations":[{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Form component","name":"children","parent":{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"},"declarations":[{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"},{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"},"declarations":[{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"},"declarations":[{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"}],"required":false,"type":{"name":"string"}}}}
1
+ {"props":{"errorText":{"defaultValue":null,"description":"Error message","name":"errorText","parent":{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"},"declarations":[{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Form component","name":"children","parent":{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"},"declarations":[{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"},{"fileName":"s/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"},"declarations":[{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"},"declarations":[{"fileName":"src/components/ErrorWrapper/ErrorWrapper.tsx","name":"ErrorWrapperProps"}],"required":false,"type":{"name":"string"}}}}
@@ -1,2 +1,2 @@
1
- import"../../ErrorWrapper.js";import{E as e,E as i}from"../../ErrorWrapper.js";import"react";import"classnames";import"./styles.module.scss";export{e as ErrorWrapper,i as default};
1
+ import{E as o}from"../../ErrorWrapper.js";import{a as i}from"../../ErrorWrapper.js";import"react";import"classnames";import"./styles.module.scss";export{i as ErrorWrapper,o as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,11 +1,13 @@
1
- @import '../../scss/_spacers.scss';
2
- @import '../../scss/_breakpoints.scss';
3
- @import '../../scss/_palette.scss';
4
- @import '../../scss/font-settings.scss';
1
+ @use 'sass:map';
2
+ @import '../../scss/spacers';
3
+ @import '../../scss/breakpoints';
4
+ @import '../../scss/palette';
5
+ @import '../../scss/font-settings';
5
6
 
6
7
  .error-wrapper {
7
8
  padding-bottom: getSpacer(m);
8
- @media (min-width: map-get($grid-breakpoints, md)) {
9
+
10
+ @media (min-width: map.get($grid-breakpoints, md)) {
9
11
  padding-bottom: getSpacer(l);
10
12
  }
11
13
 
@@ -18,7 +20,7 @@
18
20
  background-color: $cherry100;
19
21
  border-left: getSpacer(3xs) solid $cherry600;
20
22
 
21
- @media (min-width: map-get($grid-breakpoints, md)) {
23
+ @media (min-width: map.get($grid-breakpoints, md)) {
22
24
  margin-left: (getSpacer(m) + 0.25rem) * -1;
23
25
  margin-right: (getSpacer(m) + 0.25rem) * -1;
24
26
  padding-left: getSpacer(m);
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
- import { SvgIcon } from '../Icons';
3
2
  import { PaletteNames } from '../../theme/palette';
3
+ import { SvgIcon } from '../Icons';
4
4
  export declare enum ExpanderSize {
5
5
  small = "small",
6
6
  large = "large"
7
7
  }
8
- export declare type ExpanderColors = Extract<PaletteNames, 'banana' | 'blueberry' | 'cherry' | 'kiwi' | 'neutral' | 'plum' | 'white'>;
8
+ export type ExpanderColors = Extract<PaletteNames, 'banana' | 'blueberry' | 'cherry' | 'kiwi' | 'neutral' | 'plum' | 'white'>;
9
9
  interface ExpanderProps {
10
10
  /** Sets the trigger title */
11
11
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Expander.d.ts","sourceRoot":"","sources":["../../../src/components/Expander/Expander.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAa,EAAY,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAUnD,oBAAY,YAAY;IACtB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,oBAAY,cAAc,GAAG,OAAO,CAAC,YAAY,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAE9H,UAAU,aAAa;IACrB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,iEAAiE;IACjE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,8EAA8E;IAC9E,OAAO,CAAC,EAAE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AmF;IACnF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mEAAmE;IACnE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,sGAAsG;IACtG,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAgHrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"props":{"title":{"defaultValue":null,"description":"Sets the trigger title","name":"title","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":true,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Sets the expanded content","name":"children","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"size":{"defaultValue":null,"description":"Sets the size of the expander. Default: ExpanderSize.small","name":"size","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"enum","raw":"ExpanderSize","value":[{"value":"\"small\"","description":"","fullComment":"","tags":{}},{"value":"\"large\"","description":"","fullComment":"","tags":{}}]}},"color":{"defaultValue":null,"description":"Sets the background of the expander. Requires size=ExpanderSize.large.","name":"color","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"enum","raw":"ExpanderColors","value":[{"value":"\"banana\""},{"value":"\"blueberry\""},{"value":"\"cherry\""},{"value":"\"kiwi\""},{"value":"\"neutral\""},{"value":"\"plum\""},{"value":"\"white\""}]}},"svgIcon":{"defaultValue":null,"description":"Adds an icon to the expander trigger. Requires size=ExpanderSize.large.","name":"svgIcon","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"SvgIcon"}},"expanded":{"defaultValue":null,"description":"Opens or closes the expander","name":"expanded","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"boolean"}},"noNestedLine":{"defaultValue":null,"description":"Removes border to the left of the content. Requires size=ExpanderSize.small.","name":"noNestedLine","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"boolean"}},"sticky":{"defaultValue":null,"description":"Stick expander trigger to top of screen while scrolling down","name":"sticky","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"boolean"}},"onExpand":{"defaultValue":null,"description":"Called when expander is open/closed.","name":"onExpand","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"((isExpanded: boolean) => void)"}},"renderChildrenWhenClosed":{"defaultValue":null,"description":"Whether to render children when closed (in which case they are hidden with CSS). Default: false","name":"renderChildrenWhenClosed","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"boolean"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute on the expander button.","name":"testId","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"string"}}}}
1
+ {"props":{"title":{"defaultValue":null,"description":"Sets the trigger title","name":"title","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":true,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Sets the expanded content","name":"children","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},{"fileName":"s/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"size":{"defaultValue":null,"description":"Sets the size of the expander. Default: ExpanderSize.small","name":"size","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"enum","raw":"ExpanderSize","value":[{"value":"\"small\"","description":"","fullComment":"","tags":{}},{"value":"\"large\"","description":"","fullComment":"","tags":{}}]}},"color":{"defaultValue":null,"description":"Sets the background of the expander. Requires size=ExpanderSize.large.","name":"color","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"enum","raw":"ExpanderColors","value":[{"value":"\"banana\""},{"value":"\"blueberry\""},{"value":"\"cherry\""},{"value":"\"kiwi\""},{"value":"\"neutral\""},{"value":"\"plum\""},{"value":"\"white\""}]}},"svgIcon":{"defaultValue":null,"description":"Adds an icon to the expander trigger. Requires size=ExpanderSize.large.","name":"svgIcon","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"SvgIcon"}},"expanded":{"defaultValue":null,"description":"Opens or closes the expander","name":"expanded","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"boolean"}},"noNestedLine":{"defaultValue":null,"description":"Removes border to the left of the content. Requires size=ExpanderSize.small.","name":"noNestedLine","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"boolean"}},"sticky":{"defaultValue":null,"description":"Stick expander trigger to top of screen while scrolling down","name":"sticky","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"boolean"}},"onExpand":{"defaultValue":null,"description":"Called when expander is open/closed.","name":"onExpand","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"((isExpanded: boolean) => void)"}},"renderChildrenWhenClosed":{"defaultValue":null,"description":"Whether to render children when closed (in which case they are hidden with CSS). Default: false","name":"renderChildrenWhenClosed","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"boolean"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute on the expander button.","name":"testId","parent":{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"},"declarations":[{"fileName":"src/components/Expander/Expander.tsx","name":"ExpanderProps"}],"required":false,"type":{"name":"string"}}}}
@@ -1,2 +1,2 @@
1
- import n,{useState as O,useRef as b,useEffect as h}from"react";import{Icon as g}from"../Icons/Icon.js";import{ZIndex as P,AnalyticsId as k,IconSize as f}from"../../constants.js";import{useHover as U}from"../../hooks/useHover.js";import{usePrevious as Z}from"../../hooks/usePrevious.js";import e from"./styles.module.scss";import s from"classnames";import $ from"../Icons/ChevronDown.js";import S from"../Icons/ChevronUp.js";import{B as j}from"../../Button.js";import{useSticky as q}from"../../hooks/useSticky.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useIcons.js";import"../../hooks/useBreakpoint.js";import"../Button/styles.module.scss";import"../Icons/ArrowRight.js";import"../../hooks/useSize.js";import"../../utils/debounce.js";import"../../hooks/useLayoutEvent.js";var F=(o=>(o.small="small",o.large="large",o))(F||{});const Ee=o=>{const{title:u,children:z,size:r="small",color:v,svgIcon:i,expanded:d=!1,noNestedLine:w=!1,sticky:R=!1,testId:E,onExpand:c,renderChildrenWhenClosed:W=!1}=o,[t,m]=O(d),B=Z(t),y=b(null),l=b(null),{isHovered:_}=U(l),{isOutsideWindow:H,isLeavingWindow:p,offsetHeight:I,contentWidth:C}=q(y,l),a=R&&t&&H;h(()=>{d!==t&&m(d)},[d]),h(()=>{c&&t!==!!B&&c(t)},[t,c]);const N=x=>n.createElement("span",{className:s(e.expander__icon,e[`expander__icon--${x}`])},n.createElement(g,{svgIcon:t?S:$,size:f.XSmall,isHovered:_})),T=s(e.expander__trigger,e[`expander__trigger--${r}`],r==="large"&&e[`expander__trigger--${v||"neutral"}`],r==="large"&&i&&e["expander__trigger--icon"],t&&e["expander__trigger--expanded"],a&&!p&&e["expander__trigger--sticky"],a&&p&&e["expander__trigger--absolute"]),X=()=>n.createElement("button",{type:"button",className:T,style:{zIndex:_||a?P.ExpanderTrigger:void 0,width:a&&C?`${C}px`:void 0},"aria-expanded":t,ref:l,onClick:()=>m(!t),"data-testid":E,"data-analyticsid":k.Expander},r==="small"&&N("left"),i&&n.createElement("span",{className:s(e.expander__icon,e["expander__icon--left"])},n.createElement(g,{svgIcon:i,size:f.XSmall,isHovered:_})),u,r==="large"&&N("right")),L=s(e.expander__button,t&&e["expander__button--expanded"],a&&!p&&e["expander__button--sticky"],a&&p&&e["expander__button--absolute"]),A=()=>n.createElement(j,{variant:"borderless",className:L,"aria-expanded":t,ref:l,onClick:()=>m(!t),testId:E,"data-analyticsid":k.Expander},n.createElement(g,{svgIcon:t?S:$,size:f.XSmall}),u),D=()=>{if(!W&&!t)return null;const x=s(e.expander__content,e[`expander__content--${r}`],r==="large"&&e[`expander__content--${v||"neutral"}`],r==="large"&&i&&e["expander__content--icon"],t&&e["expander__content--expanded"],r==="small"&&!w&&e["expander__content--nested-line"]);return n.createElement("div",{className:x},z)};return n.createElement("div",{className:e.expander,ref:y,style:{paddingTop:a&&I?`${I}px`:void 0}},r==="large"?X():A(),D())};export{F as ExpanderSize,Ee as default};
1
+ import n,{useRef as I}from"react";import i from"classnames";import{ZIndex as A,AnalyticsId as N,IconSize as m}from"../../constants.js";import{useExpand as D}from"../../hooks/useExpand.js";import{useHover as O}from"../../hooks/useHover.js";import{useSticky as U}from"../../hooks/useSticky.js";import{B as Z}from"../../Button.js";import{Icon as x}from"../Icons/Icon.js";import b from"../Icons/ChevronDown.js";import h from"../Icons/ChevronUp.js";import e from"./styles.module.scss";import"../../hooks/usePrevious.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useBreakpoint.js";import"../../theme/grid.js";import"../../hooks/useIcons.js";import"../../hooks/useSize.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../utils/environment.js";import"../Icons/ArrowRight.js";import"../Button/styles.module.scss";import"../../hooks/useUuid.js";import"../../uuid.js";var j=(o=>(o.small="small",o.large="large",o))(j||{});const q=o=>{const{title:_,children:$,size:r="small",color:g,svgIcon:s,expanded:k=!1,noNestedLine:z=!1,sticky:S=!1,testId:f,onExpand:w,renderChildrenWhenClosed:R=!1}=o,[t,u]=D(k,w),v=I(null),d=I(null),{isHovered:p}=O(d),{isOutsideWindow:W,isLeavingWindow:l,offsetHeight:E,contentWidth:y}=U(v,d),a=S&&t&&W,C=c=>n.createElement("span",{className:i(e.expander__icon,e[`expander__icon--${c}`])},n.createElement(x,{svgIcon:t?h:b,size:m.XSmall,isHovered:p})),B=i(e.expander__trigger,e[`expander__trigger--${r}`],r==="large"&&e[`expander__trigger--${g||"neutral"}`],r==="large"&&s&&e["expander__trigger--icon"],t&&e["expander__trigger--expanded"],a&&!l&&e["expander__trigger--sticky"],a&&l&&e["expander__trigger--absolute"]),H=()=>n.createElement("button",{type:"button",className:B,style:{zIndex:p||a?A.ExpanderTrigger:void 0,width:a&&y?`${y}px`:void 0},"aria-expanded":t,ref:d,onClick:()=>u(!t),"data-testid":f,"data-analyticsid":N.Expander},r==="small"&&C("left"),s&&n.createElement("span",{className:i(e.expander__icon,e["expander__icon--left"])},n.createElement(x,{svgIcon:s,size:m.XSmall,isHovered:p})),_,r==="large"&&C("right")),T=i(e.expander__button,t&&e["expander__button--expanded"],a&&!l&&e["expander__button--sticky"],a&&l&&e["expander__button--absolute"]),X=()=>n.createElement(Z,{variant:"borderless",className:T,"aria-expanded":t,ref:d,onClick:()=>u(!t),testId:f,"data-analyticsid":N.Expander},n.createElement(x,{svgIcon:t?h:b,size:m.XSmall}),_),L=()=>{if(!R&&!t)return null;const c=i(e.expander__content,e[`expander__content--${r}`],r==="large"&&e[`expander__content--${g||"neutral"}`],r==="large"&&s&&e["expander__content--icon"],t&&e["expander__content--expanded"],r==="small"&&!z&&e["expander__content--nested-line"]);return n.createElement("div",{className:c},$)};return n.createElement("div",{className:e.expander,ref:v,style:{paddingTop:a&&E?`${E}px`:void 0}},r==="large"?H():X(),L())},ve=q;export{j as ExpanderSize,ve as default};
2
2
  //# sourceMappingURL=index.js.map