@helsenorge/designsystem-react 5.4.1 → 6.0.0-beta.10

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 (1838) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/__mocks__/IntersectionObserver.js +14 -1
  3. package/__mocks__/IntersectionObserver.js.map +1 -1
  4. package/__mocks__/MutationObserver.js +12 -1
  5. package/__mocks__/MutationObserver.js.map +1 -1
  6. package/__mocks__/ResizeObserver.js +14 -1
  7. package/__mocks__/ResizeObserver.js.map +1 -1
  8. package/__mocks__/matchMedia.js +12 -1
  9. package/__mocks__/matchMedia.js.map +1 -1
  10. package/__mocks__/useHover.js +3 -1
  11. package/__mocks__/useHover.js.map +1 -1
  12. package/__mocks__/useLayoutEvent.js +3 -1
  13. package/__mocks__/useLayoutEvent.js.map +1 -1
  14. package/__mocks__/useOutsideEvent.js +3 -1
  15. package/__mocks__/useOutsideEvent.js.map +1 -1
  16. package/__mocks__/useSize.js +3 -1
  17. package/__mocks__/useSize.js.map +1 -1
  18. package/__mocks__/uuid.js +5 -1
  19. package/__mocks__/uuid.js.map +1 -1
  20. package/_virtual/dynamic-import-helper.js +10 -0
  21. package/_virtual/dynamic-import-helper.js.map +1 -0
  22. package/components/AnchorLink/AnchorLink.js +53 -0
  23. package/components/AnchorLink/AnchorLink.js.map +1 -0
  24. package/components/AnchorLink/index.js +4 -1
  25. package/components/AnchorLink/index.js.map +1 -1
  26. package/components/Avatar/Avatar.js +33 -0
  27. package/components/Avatar/Avatar.js.map +1 -0
  28. package/components/Avatar/index.js +6 -1
  29. package/components/Avatar/index.js.map +1 -1
  30. package/components/Badge/Badge.js +25 -0
  31. package/components/Badge/Badge.js.map +1 -0
  32. package/components/Badge/index.js +4 -1
  33. package/components/Badge/index.js.map +1 -1
  34. package/components/Button/Button.d.ts.map +1 -1
  35. package/components/Button/Button.js +113 -0
  36. package/components/Button/Button.js.map +1 -0
  37. package/components/Button/index.js +4 -1
  38. package/components/Button/index.js.map +1 -1
  39. package/components/ButtonWithModal/ButtonWithModal.js +11 -0
  40. package/components/ButtonWithModal/ButtonWithModal.js.map +1 -0
  41. package/components/ButtonWithModal/index.js +4 -1
  42. package/components/ButtonWithModal/index.js.map +1 -1
  43. package/components/Checkbox/Checkbox.d.ts +3 -3
  44. package/components/Checkbox/Checkbox.d.ts.map +1 -1
  45. package/components/Checkbox/Checkbox.js +108 -0
  46. package/components/Checkbox/Checkbox.js.map +1 -0
  47. package/components/Checkbox/index.js +6 -1
  48. package/components/Checkbox/index.js.map +1 -1
  49. package/components/Checkbox/styles.module.scss +9 -9
  50. package/components/Checkbox/styles.module.scss.d.ts +18 -18
  51. package/components/Close/Close.js +30 -0
  52. package/components/Close/Close.js.map +1 -0
  53. package/components/Close/index.js +4 -1
  54. package/components/Close/index.js.map +1 -1
  55. package/components/DictionaryTrigger/DictionaryTrigger.js +28 -0
  56. package/components/DictionaryTrigger/DictionaryTrigger.js.map +1 -0
  57. package/components/DictionaryTrigger/index.js +4 -1
  58. package/components/DictionaryTrigger/index.js.map +1 -1
  59. package/components/Dropdown/Dropdown.js +119 -0
  60. package/components/Dropdown/Dropdown.js.map +1 -0
  61. package/components/Dropdown/index.js +6 -1
  62. package/components/Dropdown/index.js.map +1 -1
  63. package/components/Duolist/Duolist.js +55 -0
  64. package/components/Duolist/Duolist.js.map +1 -0
  65. package/components/Duolist/index.js +7 -1
  66. package/components/Duolist/index.js.map +1 -1
  67. package/components/ErrorWrapper/ErrorWrapper.js +12 -0
  68. package/components/ErrorWrapper/ErrorWrapper.js.map +1 -0
  69. package/components/ErrorWrapper/index.js +6 -1
  70. package/components/ErrorWrapper/index.js.map +1 -1
  71. package/components/Expander/Expander.d.ts +3 -2
  72. package/components/Expander/Expander.d.ts.map +1 -1
  73. package/components/Expander/Expander.js +100 -0
  74. package/components/Expander/Expander.js.map +1 -0
  75. package/components/Expander/index.js +6 -1
  76. package/components/Expander/index.js.map +1 -1
  77. package/components/ExpanderHierarchy/Expander.js +31 -0
  78. package/components/ExpanderHierarchy/Expander.js.map +1 -0
  79. package/components/ExpanderHierarchy/ExpanderButton.js +46 -0
  80. package/components/ExpanderHierarchy/ExpanderButton.js.map +1 -0
  81. package/components/ExpanderHierarchy/ExpanderHierarchy.js +29 -0
  82. package/components/ExpanderHierarchy/ExpanderHierarchy.js.map +1 -0
  83. package/components/ExpanderHierarchy/index.js +4 -1
  84. package/components/ExpanderHierarchy/index.js.map +1 -1
  85. package/components/ExpanderHierarchy/utils.js +20 -0
  86. package/components/ExpanderHierarchy/utils.js.map +1 -0
  87. package/components/ExpanderList/ExpanderList.js +147 -0
  88. package/components/ExpanderList/ExpanderList.js.map +1 -0
  89. package/components/ExpanderList/index.js +6 -1
  90. package/components/ExpanderList/index.js.map +1 -1
  91. package/components/FormExample/FormExample.d.ts +2 -2
  92. package/components/FormExample/FormExample.d.ts.map +1 -1
  93. package/components/FormExample/FormExample.js +249 -0
  94. package/components/FormExample/FormExample.js.map +1 -0
  95. package/components/FormExample/index.js +7 -11
  96. package/components/FormExample/index.js.map +1 -1
  97. package/components/FormGroup/FormGroup.d.ts +2 -2
  98. package/components/FormGroup/FormGroup.d.ts.map +1 -1
  99. package/components/FormGroup/FormGroup.js +97 -0
  100. package/components/FormGroup/FormGroup.js.map +1 -0
  101. package/components/FormGroup/index.js +6 -1
  102. package/components/FormGroup/index.js.map +1 -1
  103. package/components/FormLayout/FormLayout.d.ts +3 -3
  104. package/components/FormLayout/FormLayout.d.ts.map +1 -1
  105. package/components/FormLayout/FormLayout.js +39 -0
  106. package/components/FormLayout/FormLayout.js.map +1 -0
  107. package/components/FormLayout/index.js +7 -1
  108. package/components/FormLayout/index.js.map +1 -1
  109. package/components/FormLayout/styles.module.scss +1 -1
  110. package/components/FormLayout/styles.module.scss.d.ts +1 -1
  111. package/components/GridExample/GridExample.js +7 -0
  112. package/components/GridExample/GridExample.js.map +1 -0
  113. package/components/GridExample/index.js +6 -1
  114. package/components/GridExample/index.js.map +1 -1
  115. package/components/HelpBubble/HelpBubble.js +62 -0
  116. package/components/HelpBubble/HelpBubble.js.map +1 -0
  117. package/components/HelpBubble/index.js +6 -1
  118. package/components/HelpBubble/index.js.map +1 -1
  119. package/components/HelpBubbleExample/HelpBubbleExample.js +20 -0
  120. package/components/HelpBubbleExample/HelpBubbleExample.js.map +1 -0
  121. package/components/HelpBubbleExample/index.js +4 -1
  122. package/components/HelpBubbleExample/index.js.map +1 -1
  123. package/components/HelpPanel/HelpPanel.js +24 -0
  124. package/components/HelpPanel/HelpPanel.js.map +1 -0
  125. package/components/HelpPanel/index.js +4 -1
  126. package/components/HelpPanel/index.js.map +1 -1
  127. package/components/HelpQuestion/HelpQuestion.js +32 -0
  128. package/components/HelpQuestion/HelpQuestion.js.map +1 -0
  129. package/components/HelpQuestion/index.js +4 -1
  130. package/components/HelpQuestion/index.js.map +1 -1
  131. package/components/HighlightBox/HighlightBox.d.ts +3 -2
  132. package/components/HighlightBox/HighlightBox.d.ts.map +1 -1
  133. package/components/HighlightBox/HighlightBox.js +62 -0
  134. package/components/HighlightBox/HighlightBox.js.map +1 -0
  135. package/components/HighlightBox/index.js +6 -1
  136. package/components/HighlightBox/index.js.map +1 -1
  137. package/components/HorizontalScroll/HorizontalScroll.js +32 -0
  138. package/components/HorizontalScroll/HorizontalScroll.js.map +1 -0
  139. package/components/HorizontalScroll/index.js +6 -1
  140. package/components/HorizontalScroll/index.js.map +1 -1
  141. package/components/{Icons → Icon}/Icon.d.ts +4 -3
  142. package/components/Icon/Icon.d.ts.map +1 -0
  143. package/components/Icon/Icon.js +57 -0
  144. package/components/Icon/Icon.js.map +1 -0
  145. package/components/Icon/index.d.ts.map +1 -0
  146. package/components/Icon/index.js +10 -0
  147. package/components/Icon/index.js.map +1 -0
  148. package/components/Icons/ActiveMonitoring.d.ts +1 -1
  149. package/components/Icons/ActiveMonitoring.d.ts.map +1 -1
  150. package/components/Icons/ActiveMonitoring.js +17 -1
  151. package/components/Icons/ActiveMonitoring.js.map +1 -1
  152. package/components/Icons/AcupunctureBack.d.ts +1 -1
  153. package/components/Icons/AcupunctureBack.d.ts.map +1 -1
  154. package/components/Icons/AcupunctureBack.js +22 -1
  155. package/components/Icons/AcupunctureBack.js.map +1 -1
  156. package/components/Icons/AdditionalIconInformation.d.ts +1188 -0
  157. package/components/Icons/AdditionalIconInformation.d.ts.map +1 -0
  158. package/components/Icons/AdditionalIconInformation.js +301 -297
  159. package/components/Icons/AdditionalIconInformation.js.map +1 -0
  160. package/components/Icons/AlarmClock.d.ts +1 -1
  161. package/components/Icons/AlarmClock.d.ts.map +1 -1
  162. package/components/Icons/AlarmClock.js +18 -1
  163. package/components/Icons/AlarmClock.js.map +1 -1
  164. package/components/Icons/AlertSignFill.d.ts +1 -1
  165. package/components/Icons/AlertSignFill.d.ts.map +1 -1
  166. package/components/Icons/AlertSignFill.js +6 -1
  167. package/components/Icons/AlertSignFill.js.map +1 -1
  168. package/components/Icons/AlertSignStroke.d.ts +1 -1
  169. package/components/Icons/AlertSignStroke.d.ts.map +1 -1
  170. package/components/Icons/AlertSignStroke.js +6 -1
  171. package/components/Icons/AlertSignStroke.js.map +1 -1
  172. package/components/Icons/Amputation.d.ts +1 -1
  173. package/components/Icons/Amputation.d.ts.map +1 -1
  174. package/components/Icons/Amputation.js +5 -1
  175. package/components/Icons/Amputation.js.map +1 -1
  176. package/components/Icons/Anxiety.d.ts +1 -1
  177. package/components/Icons/Anxiety.d.ts.map +1 -1
  178. package/components/Icons/Anxiety.js +5 -1
  179. package/components/Icons/Anxiety.js.map +1 -1
  180. package/components/Icons/Apple.d.ts +1 -1
  181. package/components/Icons/Apple.d.ts.map +1 -1
  182. package/components/Icons/Apple.js +5 -1
  183. package/components/Icons/Apple.js.map +1 -1
  184. package/components/Icons/Archive.d.ts +1 -1
  185. package/components/Icons/Archive.d.ts.map +1 -1
  186. package/components/Icons/Archive.js +30 -1
  187. package/components/Icons/Archive.js.map +1 -1
  188. package/components/Icons/ArmFlexing.d.ts +1 -1
  189. package/components/Icons/ArmFlexing.d.ts.map +1 -1
  190. package/components/Icons/ArmFlexing.js +5 -1
  191. package/components/Icons/ArmFlexing.js.map +1 -1
  192. package/components/Icons/ArrowDown.d.ts +1 -1
  193. package/components/Icons/ArrowDown.d.ts.map +1 -1
  194. package/components/Icons/ArrowDown.js +30 -1
  195. package/components/Icons/ArrowDown.js.map +1 -1
  196. package/components/Icons/ArrowLeft.d.ts +1 -1
  197. package/components/Icons/ArrowLeft.d.ts.map +1 -1
  198. package/components/Icons/ArrowLeft.js +6 -1
  199. package/components/Icons/ArrowLeft.js.map +1 -1
  200. package/components/Icons/ArrowRight.d.ts +1 -1
  201. package/components/Icons/ArrowRight.d.ts.map +1 -1
  202. package/components/Icons/ArrowRight.js +6 -1
  203. package/components/Icons/ArrowRight.js.map +1 -1
  204. package/components/Icons/ArrowUp.d.ts +1 -1
  205. package/components/Icons/ArrowUp.d.ts.map +1 -1
  206. package/components/Icons/ArrowUp.js +30 -1
  207. package/components/Icons/ArrowUp.js.map +1 -1
  208. package/components/Icons/ArrowUpRight.d.ts +1 -1
  209. package/components/Icons/ArrowUpRight.d.ts.map +1 -1
  210. package/components/Icons/ArrowUpRight.js +6 -1
  211. package/components/Icons/ArrowUpRight.js.map +1 -1
  212. package/components/Icons/Attachment.d.ts +1 -1
  213. package/components/Icons/Attachment.d.ts.map +1 -1
  214. package/components/Icons/Attachment.js +6 -1
  215. package/components/Icons/Attachment.js.map +1 -1
  216. package/components/Icons/Atv.d.ts +1 -1
  217. package/components/Icons/Atv.d.ts.map +1 -1
  218. package/components/Icons/Atv.js +5 -1
  219. package/components/Icons/Atv.js.map +1 -1
  220. package/components/Icons/Avatar.d.ts +1 -1
  221. package/components/Icons/Avatar.d.ts.map +1 -1
  222. package/components/Icons/Avatar.js +6 -1
  223. package/components/Icons/Avatar.js.map +1 -1
  224. package/components/Icons/AwakePersonOnPillow.d.ts +1 -1
  225. package/components/Icons/AwakePersonOnPillow.d.ts.map +1 -1
  226. package/components/Icons/AwakePersonOnPillow.js +5 -1
  227. package/components/Icons/AwakePersonOnPillow.js.map +1 -1
  228. package/components/Icons/Baby.d.ts +1 -1
  229. package/components/Icons/Baby.d.ts.map +1 -1
  230. package/components/Icons/Baby.js +5 -1
  231. package/components/Icons/Baby.js.map +1 -1
  232. package/components/Icons/BandAid.d.ts +1 -1
  233. package/components/Icons/BandAid.d.ts.map +1 -1
  234. package/components/Icons/BandAid.js +5 -1
  235. package/components/Icons/BandAid.js.map +1 -1
  236. package/components/Icons/BeerAndPills.d.ts +1 -1
  237. package/components/Icons/BeerAndPills.d.ts.map +1 -1
  238. package/components/Icons/BeerAndPills.js +17 -1
  239. package/components/Icons/BeerAndPills.js.map +1 -1
  240. package/components/Icons/Bell.d.ts +1 -1
  241. package/components/Icons/Bell.d.ts.map +1 -1
  242. package/components/Icons/Bell.js +5 -1
  243. package/components/Icons/Bell.js.map +1 -1
  244. package/components/Icons/Bike.d.ts +1 -1
  245. package/components/Icons/Bike.d.ts.map +1 -1
  246. package/components/Icons/Bike.js +5 -1
  247. package/components/Icons/Bike.js.map +1 -1
  248. package/components/Icons/BirthControl.d.ts +1 -1
  249. package/components/Icons/BirthControl.d.ts.map +1 -1
  250. package/components/Icons/BirthControl.js +17 -1
  251. package/components/Icons/BirthControl.js.map +1 -1
  252. package/components/Icons/BirthdayCake.d.ts +1 -1
  253. package/components/Icons/BirthdayCake.d.ts.map +1 -1
  254. package/components/Icons/BirthdayCake.js +5 -1
  255. package/components/Icons/BirthdayCake.js.map +1 -1
  256. package/components/Icons/Boat.d.ts +1 -1
  257. package/components/Icons/Boat.d.ts.map +1 -1
  258. package/components/Icons/Boat.js +5 -1
  259. package/components/Icons/Boat.js.map +1 -1
  260. package/components/Icons/Body.d.ts +1 -1
  261. package/components/Icons/Body.d.ts.map +1 -1
  262. package/components/Icons/Body.js +17 -1
  263. package/components/Icons/Body.js.map +1 -1
  264. package/components/Icons/Braille.d.ts +1 -1
  265. package/components/Icons/Braille.d.ts.map +1 -1
  266. package/components/Icons/Braille.js +5 -1
  267. package/components/Icons/Braille.js.map +1 -1
  268. package/components/Icons/Brain.d.ts +1 -1
  269. package/components/Icons/Brain.d.ts.map +1 -1
  270. package/components/Icons/Brain.js +5 -1
  271. package/components/Icons/Brain.js.map +1 -1
  272. package/components/Icons/BreastReconstruction.d.ts +1 -1
  273. package/components/Icons/BreastReconstruction.d.ts.map +1 -1
  274. package/components/Icons/BreastReconstruction.js +17 -1
  275. package/components/Icons/BreastReconstruction.js.map +1 -1
  276. package/components/Icons/BreastRemoval.d.ts +1 -1
  277. package/components/Icons/BreastRemoval.d.ts.map +1 -1
  278. package/components/Icons/BreastRemoval.js +17 -1
  279. package/components/Icons/BreastRemoval.js.map +1 -1
  280. package/components/Icons/Breasts.d.ts +1 -1
  281. package/components/Icons/Breasts.d.ts.map +1 -1
  282. package/components/Icons/Breasts.js +5 -1
  283. package/components/Icons/Breasts.js.map +1 -1
  284. package/components/Icons/BrokenHeart.d.ts +1 -1
  285. package/components/Icons/BrokenHeart.d.ts.map +1 -1
  286. package/components/Icons/BrokenHeart.js +5 -1
  287. package/components/Icons/BrokenHeart.js.map +1 -1
  288. package/components/Icons/BrokenPuzzle.d.ts +1 -1
  289. package/components/Icons/BrokenPuzzle.d.ts.map +1 -1
  290. package/components/Icons/BrokenPuzzle.js +5 -1
  291. package/components/Icons/BrokenPuzzle.js.map +1 -1
  292. package/components/Icons/Bus.d.ts +1 -1
  293. package/components/Icons/Bus.d.ts.map +1 -1
  294. package/components/Icons/Bus.js +18 -1
  295. package/components/Icons/Bus.js.map +1 -1
  296. package/components/Icons/Calendar.d.ts +1 -1
  297. package/components/Icons/Calendar.d.ts.map +1 -1
  298. package/components/Icons/Calendar.js +30 -1
  299. package/components/Icons/Calendar.js.map +1 -1
  300. package/components/Icons/CalendarChange.d.ts +1 -1
  301. package/components/Icons/CalendarChange.d.ts.map +1 -1
  302. package/components/Icons/CalendarChange.js +30 -1
  303. package/components/Icons/CalendarChange.js.map +1 -1
  304. package/components/Icons/CalendarCheck.d.ts +1 -1
  305. package/components/Icons/CalendarCheck.d.ts.map +1 -1
  306. package/components/Icons/CalendarCheck.js +30 -1
  307. package/components/Icons/CalendarCheck.js.map +1 -1
  308. package/components/Icons/CalendarEvent.d.ts +1 -1
  309. package/components/Icons/CalendarEvent.d.ts.map +1 -1
  310. package/components/Icons/CalendarEvent.js +5 -1
  311. package/components/Icons/CalendarEvent.js.map +1 -1
  312. package/components/Icons/CalendarSave.d.ts +1 -1
  313. package/components/Icons/CalendarSave.d.ts.map +1 -1
  314. package/components/Icons/CalendarSave.js +6 -1
  315. package/components/Icons/CalendarSave.js.map +1 -1
  316. package/components/Icons/Cancer.d.ts +1 -1
  317. package/components/Icons/Cancer.d.ts.map +1 -1
  318. package/components/Icons/Cancer.js +5 -1
  319. package/components/Icons/Cancer.js.map +1 -1
  320. package/components/Icons/Candle.d.ts +1 -1
  321. package/components/Icons/Candle.d.ts.map +1 -1
  322. package/components/Icons/Candle.js +18 -1
  323. package/components/Icons/Candle.js.map +1 -1
  324. package/components/Icons/Car.d.ts +1 -1
  325. package/components/Icons/Car.d.ts.map +1 -1
  326. package/components/Icons/Car.js +5 -1
  327. package/components/Icons/Car.js.map +1 -1
  328. package/components/Icons/Change.d.ts +1 -1
  329. package/components/Icons/Change.d.ts.map +1 -1
  330. package/components/Icons/Change.js +39 -1
  331. package/components/Icons/Change.js.map +1 -1
  332. package/components/Icons/Check.d.ts +1 -1
  333. package/components/Icons/Check.d.ts.map +1 -1
  334. package/components/Icons/Check.js +6 -1
  335. package/components/Icons/Check.js.map +1 -1
  336. package/components/Icons/CheckFill.d.ts +1 -1
  337. package/components/Icons/CheckFill.d.ts.map +1 -1
  338. package/components/Icons/CheckFill.js +30 -1
  339. package/components/Icons/CheckFill.js.map +1 -1
  340. package/components/Icons/CheckOutline.d.ts +1 -1
  341. package/components/Icons/CheckOutline.d.ts.map +1 -1
  342. package/components/Icons/CheckOutline.js +17 -1
  343. package/components/Icons/CheckOutline.js.map +1 -1
  344. package/components/Icons/Chest.d.ts +1 -1
  345. package/components/Icons/Chest.d.ts.map +1 -1
  346. package/components/Icons/Chest.js +5 -1
  347. package/components/Icons/Chest.js.map +1 -1
  348. package/components/Icons/ChevronDown.d.ts +1 -1
  349. package/components/Icons/ChevronDown.d.ts.map +1 -1
  350. package/components/Icons/ChevronDown.js +6 -1
  351. package/components/Icons/ChevronDown.js.map +1 -1
  352. package/components/Icons/ChevronLeft.d.ts +1 -1
  353. package/components/Icons/ChevronLeft.d.ts.map +1 -1
  354. package/components/Icons/ChevronLeft.js +6 -1
  355. package/components/Icons/ChevronLeft.js.map +1 -1
  356. package/components/Icons/ChevronRight.d.ts +1 -1
  357. package/components/Icons/ChevronRight.d.ts.map +1 -1
  358. package/components/Icons/ChevronRight.js +6 -1
  359. package/components/Icons/ChevronRight.js.map +1 -1
  360. package/components/Icons/ChevronUp.d.ts +1 -1
  361. package/components/Icons/ChevronUp.d.ts.map +1 -1
  362. package/components/Icons/ChevronUp.js +6 -1
  363. package/components/Icons/ChevronUp.js.map +1 -1
  364. package/components/Icons/ChevronsDown.d.ts +1 -1
  365. package/components/Icons/ChevronsDown.d.ts.map +1 -1
  366. package/components/Icons/ChevronsDown.js +30 -1
  367. package/components/Icons/ChevronsDown.js.map +1 -1
  368. package/components/Icons/ChevronsUp.d.ts +1 -1
  369. package/components/Icons/ChevronsUp.d.ts.map +1 -1
  370. package/components/Icons/ChevronsUp.js +30 -1
  371. package/components/Icons/ChevronsUp.js.map +1 -1
  372. package/components/Icons/ChildPlaying.d.ts +1 -1
  373. package/components/Icons/ChildPlaying.d.ts.map +1 -1
  374. package/components/Icons/ChildPlaying.js +5 -1
  375. package/components/Icons/ChildPlaying.js.map +1 -1
  376. package/components/Icons/Cigarette.d.ts +1 -1
  377. package/components/Icons/Cigarette.d.ts.map +1 -1
  378. package/components/Icons/Cigarette.js +5 -1
  379. package/components/Icons/Cigarette.js.map +1 -1
  380. package/components/Icons/Coins.d.ts +1 -1
  381. package/components/Icons/Coins.d.ts.map +1 -1
  382. package/components/Icons/Coins.js +17 -1
  383. package/components/Icons/Coins.js.map +1 -1
  384. package/components/Icons/Contacts.d.ts +1 -1
  385. package/components/Icons/Contacts.d.ts.map +1 -1
  386. package/components/Icons/Contacts.js +6 -1
  387. package/components/Icons/Contacts.js.map +1 -1
  388. package/components/Icons/Copy.d.ts +1 -1
  389. package/components/Icons/Copy.d.ts.map +1 -1
  390. package/components/Icons/Copy.js +6 -1
  391. package/components/Icons/Copy.js.map +1 -1
  392. package/components/Icons/CoronaCertificate.d.ts +1 -1
  393. package/components/Icons/CoronaCertificate.d.ts.map +1 -1
  394. package/components/Icons/CoronaCertificate.js +17 -1
  395. package/components/Icons/CoronaCertificate.js.map +1 -1
  396. package/components/Icons/Coronavirus.d.ts +1 -1
  397. package/components/Icons/Coronavirus.d.ts.map +1 -1
  398. package/components/Icons/Coronavirus.js +5 -1
  399. package/components/Icons/Coronavirus.js.map +1 -1
  400. package/components/Icons/Cough.d.ts +1 -1
  401. package/components/Icons/Cough.d.ts.map +1 -1
  402. package/components/Icons/Cough.js +5 -1
  403. package/components/Icons/Cough.js.map +1 -1
  404. package/components/Icons/CriticalHealthInfo.d.ts +1 -1
  405. package/components/Icons/CriticalHealthInfo.d.ts.map +1 -1
  406. package/components/Icons/CriticalHealthInfo.js +5 -1
  407. package/components/Icons/CriticalHealthInfo.js.map +1 -1
  408. package/components/Icons/Cross.d.ts +1 -1
  409. package/components/Icons/Cross.d.ts.map +1 -1
  410. package/components/Icons/Cross.js +5 -1
  411. package/components/Icons/Cross.js.map +1 -1
  412. package/components/Icons/DataExchange.d.ts +1 -1
  413. package/components/Icons/DataExchange.d.ts.map +1 -1
  414. package/components/Icons/DataExchange.js +17 -1
  415. package/components/Icons/DataExchange.js.map +1 -1
  416. package/components/Icons/DataReceived.d.ts +1 -1
  417. package/components/Icons/DataReceived.d.ts.map +1 -1
  418. package/components/Icons/DataReceived.js +17 -1
  419. package/components/Icons/DataReceived.js.map +1 -1
  420. package/components/Icons/DataSent.d.ts +1 -1
  421. package/components/Icons/DataSent.d.ts.map +1 -1
  422. package/components/Icons/DataSent.js +17 -1
  423. package/components/Icons/DataSent.js.map +1 -1
  424. package/components/Icons/Depression.d.ts +1 -1
  425. package/components/Icons/Depression.d.ts.map +1 -1
  426. package/components/Icons/Depression.js +5 -1
  427. package/components/Icons/Depression.js.map +1 -1
  428. package/components/Icons/DigestiveSystem.d.ts +1 -1
  429. package/components/Icons/DigestiveSystem.d.ts.map +1 -1
  430. package/components/Icons/DigestiveSystem.js +5 -1
  431. package/components/Icons/DigestiveSystem.js.map +1 -1
  432. package/components/Icons/Dizzy.d.ts +1 -1
  433. package/components/Icons/Dizzy.d.ts.map +1 -1
  434. package/components/Icons/Dizzy.js +5 -1
  435. package/components/Icons/Dizzy.js.map +1 -1
  436. package/components/Icons/Documents.d.ts +1 -1
  437. package/components/Icons/Documents.d.ts.map +1 -1
  438. package/components/Icons/Documents.js +5 -1
  439. package/components/Icons/Documents.js.map +1 -1
  440. package/components/Icons/Dog.d.ts +1 -1
  441. package/components/Icons/Dog.d.ts.map +1 -1
  442. package/components/Icons/Dog.js +5 -1
  443. package/components/Icons/Dog.js.map +1 -1
  444. package/components/Icons/DonorCard.d.ts +1 -1
  445. package/components/Icons/DonorCard.d.ts.map +1 -1
  446. package/components/Icons/DonorCard.js +5 -1
  447. package/components/Icons/DonorCard.js.map +1 -1
  448. package/components/Icons/Download.d.ts +1 -1
  449. package/components/Icons/Download.d.ts.map +1 -1
  450. package/components/Icons/Download.js +30 -1
  451. package/components/Icons/Download.js.map +1 -1
  452. package/components/Icons/Draft.d.ts +1 -1
  453. package/components/Icons/Draft.d.ts.map +1 -1
  454. package/components/Icons/Draft.js +5 -1
  455. package/components/Icons/Draft.js.map +1 -1
  456. package/components/Icons/EChat.d.ts +1 -1
  457. package/components/Icons/EChat.d.ts.map +1 -1
  458. package/components/Icons/EChat.js +6 -1
  459. package/components/Icons/EChat.js.map +1 -1
  460. package/components/Icons/Ear.d.ts +1 -1
  461. package/components/Icons/Ear.d.ts.map +1 -1
  462. package/components/Icons/Ear.js +8 -1
  463. package/components/Icons/Ear.js.map +1 -1
  464. package/components/Icons/EarDeaf.d.ts +1 -1
  465. package/components/Icons/EarDeaf.d.ts.map +1 -1
  466. package/components/Icons/EarDeaf.js +5 -1
  467. package/components/Icons/EarDeaf.js.map +1 -1
  468. package/components/Icons/EarHearingAid.d.ts +1 -1
  469. package/components/Icons/EarHearingAid.d.ts.map +1 -1
  470. package/components/Icons/EarHearingAid.js +8 -1
  471. package/components/Icons/EarHearingAid.js.map +1 -1
  472. package/components/Icons/EarNoseThroat.d.ts +1 -1
  473. package/components/Icons/EarNoseThroat.d.ts.map +1 -1
  474. package/components/Icons/EarNoseThroat.js +5 -1
  475. package/components/Icons/EarNoseThroat.js.map +1 -1
  476. package/components/Icons/EarVolume.d.ts +1 -1
  477. package/components/Icons/EarVolume.d.ts.map +1 -1
  478. package/components/Icons/EarVolume.js +15 -1
  479. package/components/Icons/EarVolume.js.map +1 -1
  480. package/components/Icons/ElderlyPerson.d.ts +1 -1
  481. package/components/Icons/ElderlyPerson.d.ts.map +1 -1
  482. package/components/Icons/ElderlyPerson.js +5 -1
  483. package/components/Icons/ElderlyPerson.js.map +1 -1
  484. package/components/Icons/Embolization.d.ts +1 -1
  485. package/components/Icons/Embolization.d.ts.map +1 -1
  486. package/components/Icons/Embolization.js +17 -1
  487. package/components/Icons/Embolization.js.map +1 -1
  488. package/components/Icons/EmergencyCall.d.ts +1 -1
  489. package/components/Icons/EmergencyCall.d.ts.map +1 -1
  490. package/components/Icons/EmergencyCall.js +19 -1
  491. package/components/Icons/EmergencyCall.js.map +1 -1
  492. package/components/Icons/EmoticonAnnoyed.d.ts +1 -1
  493. package/components/Icons/EmoticonAnnoyed.d.ts.map +1 -1
  494. package/components/Icons/EmoticonAnnoyed.js +15 -1
  495. package/components/Icons/EmoticonAnnoyed.js.map +1 -1
  496. package/components/Icons/EmoticonDelighted.d.ts +1 -1
  497. package/components/Icons/EmoticonDelighted.d.ts.map +1 -1
  498. package/components/Icons/EmoticonDelighted.js +9 -1
  499. package/components/Icons/EmoticonDelighted.js.map +1 -1
  500. package/components/Icons/EmoticonDisappointed.d.ts +1 -1
  501. package/components/Icons/EmoticonDisappointed.d.ts.map +1 -1
  502. package/components/Icons/EmoticonDisappointed.js +9 -1
  503. package/components/Icons/EmoticonDisappointed.js.map +1 -1
  504. package/components/Icons/EmoticonHappy.d.ts +1 -1
  505. package/components/Icons/EmoticonHappy.d.ts.map +1 -1
  506. package/components/Icons/EmoticonHappy.js +9 -1
  507. package/components/Icons/EmoticonHappy.js.map +1 -1
  508. package/components/Icons/EmoticonMeh.d.ts +1 -1
  509. package/components/Icons/EmoticonMeh.d.ts.map +1 -1
  510. package/components/Icons/EmoticonMeh.js +9 -1
  511. package/components/Icons/EmoticonMeh.js.map +1 -1
  512. package/components/Icons/EnterFullScreen.d.ts +1 -1
  513. package/components/Icons/EnterFullScreen.d.ts.map +1 -1
  514. package/components/Icons/EnterFullScreen.js +6 -1
  515. package/components/Icons/EnterFullScreen.js.map +1 -1
  516. package/components/Icons/Envelope.d.ts +1 -1
  517. package/components/Icons/Envelope.d.ts.map +1 -1
  518. package/components/Icons/Envelope.js +6 -1
  519. package/components/Icons/Envelope.js.map +1 -1
  520. package/components/Icons/Epilepsy.d.ts +1 -1
  521. package/components/Icons/Epilepsy.d.ts.map +1 -1
  522. package/components/Icons/Epilepsy.js +5 -1
  523. package/components/Icons/Epilepsy.js.map +1 -1
  524. package/components/Icons/Eraser.d.ts +1 -1
  525. package/components/Icons/Eraser.d.ts.map +1 -1
  526. package/components/Icons/Eraser.js +6 -1
  527. package/components/Icons/Eraser.js.map +1 -1
  528. package/components/Icons/ErrorSignFill.d.ts +1 -1
  529. package/components/Icons/ErrorSignFill.d.ts.map +1 -1
  530. package/components/Icons/ErrorSignFill.js +6 -1
  531. package/components/Icons/ErrorSignFill.js.map +1 -1
  532. package/components/Icons/ErrorSignStroke.d.ts +1 -1
  533. package/components/Icons/ErrorSignStroke.d.ts.map +1 -1
  534. package/components/Icons/ErrorSignStroke.js +6 -1
  535. package/components/Icons/ErrorSignStroke.js.map +1 -1
  536. package/components/Icons/EuropeanHealthCard.d.ts +1 -1
  537. package/components/Icons/EuropeanHealthCard.d.ts.map +1 -1
  538. package/components/Icons/EuropeanHealthCard.js +5 -1
  539. package/components/Icons/EuropeanHealthCard.js.map +1 -1
  540. package/components/Icons/ExitFullScreen.d.ts +1 -1
  541. package/components/Icons/ExitFullScreen.d.ts.map +1 -1
  542. package/components/Icons/ExitFullScreen.js +6 -1
  543. package/components/Icons/ExitFullScreen.js.map +1 -1
  544. package/components/Icons/Eye.d.ts +1 -1
  545. package/components/Icons/Eye.d.ts.map +1 -1
  546. package/components/Icons/Eye.js +6 -1
  547. package/components/Icons/Eye.js.map +1 -1
  548. package/components/Icons/Facebook.d.ts +1 -1
  549. package/components/Icons/Facebook.d.ts.map +1 -1
  550. package/components/Icons/Facebook.js +5 -1
  551. package/components/Icons/Facebook.js.map +1 -1
  552. package/components/Icons/FallingLeaf.d.ts +1 -1
  553. package/components/Icons/FallingLeaf.d.ts.map +1 -1
  554. package/components/Icons/FallingLeaf.js +21 -1
  555. package/components/Icons/FallingLeaf.js.map +1 -1
  556. package/components/Icons/Female.d.ts +1 -1
  557. package/components/Icons/Female.d.ts.map +1 -1
  558. package/components/Icons/Female.js +5 -1
  559. package/components/Icons/Female.js.map +1 -1
  560. package/components/Icons/FemaleDoctor.d.ts +1 -1
  561. package/components/Icons/FemaleDoctor.d.ts.map +1 -1
  562. package/components/Icons/FemaleDoctor.js +5 -1
  563. package/components/Icons/FemaleDoctor.js.map +1 -1
  564. package/components/Icons/Ferry.d.ts +1 -1
  565. package/components/Icons/Ferry.d.ts.map +1 -1
  566. package/components/Icons/Ferry.js +5 -1
  567. package/components/Icons/Ferry.js.map +1 -1
  568. package/components/Icons/File.d.ts +1 -1
  569. package/components/Icons/File.d.ts.map +1 -1
  570. package/components/Icons/File.js +30 -1
  571. package/components/Icons/File.js.map +1 -1
  572. package/components/Icons/Filter.d.ts +1 -1
  573. package/components/Icons/Filter.d.ts.map +1 -1
  574. package/components/Icons/Filter.js +25 -1
  575. package/components/Icons/Filter.js.map +1 -1
  576. package/components/Icons/FingerBleed.d.ts +1 -1
  577. package/components/Icons/FingerBleed.d.ts.map +1 -1
  578. package/components/Icons/FingerBleed.js +5 -1
  579. package/components/Icons/FingerBleed.js.map +1 -1
  580. package/components/Icons/FirstAidKit.d.ts +1 -1
  581. package/components/Icons/FirstAidKit.d.ts.map +1 -1
  582. package/components/Icons/FirstAidKit.js +5 -1
  583. package/components/Icons/FirstAidKit.js.map +1 -1
  584. package/components/Icons/FloppyDisk.d.ts +1 -1
  585. package/components/Icons/FloppyDisk.d.ts.map +1 -1
  586. package/components/Icons/FloppyDisk.js +17 -1
  587. package/components/Icons/FloppyDisk.js.map +1 -1
  588. package/components/Icons/Football.d.ts +1 -1
  589. package/components/Icons/Football.d.ts.map +1 -1
  590. package/components/Icons/Football.js +5 -1
  591. package/components/Icons/Football.js.map +1 -1
  592. package/components/Icons/Form.d.ts +1 -1
  593. package/components/Icons/Form.d.ts.map +1 -1
  594. package/components/Icons/Form.js +6 -1
  595. package/components/Icons/Form.js.map +1 -1
  596. package/components/Icons/Forward.d.ts +1 -1
  597. package/components/Icons/Forward.d.ts.map +1 -1
  598. package/components/Icons/Forward.js +6 -1
  599. package/components/Icons/Forward.js.map +1 -1
  600. package/components/Icons/Gallery.d.ts +1 -1
  601. package/components/Icons/Gallery.d.ts.map +1 -1
  602. package/components/Icons/Gallery.js +30 -1
  603. package/components/Icons/Gallery.js.map +1 -1
  604. package/components/Icons/Garden.d.ts +1 -1
  605. package/components/Icons/Garden.d.ts.map +1 -1
  606. package/components/Icons/Garden.js +5 -1
  607. package/components/Icons/Garden.js.map +1 -1
  608. package/components/Icons/GasCan.d.ts +1 -1
  609. package/components/Icons/GasCan.d.ts.map +1 -1
  610. package/components/Icons/GasCan.js +5 -1
  611. package/components/Icons/GasCan.js.map +1 -1
  612. package/components/Icons/GenderIdentity.d.ts +1 -1
  613. package/components/Icons/GenderIdentity.d.ts.map +1 -1
  614. package/components/Icons/GenderIdentity.js +17 -1
  615. package/components/Icons/GenderIdentity.js.map +1 -1
  616. package/components/Icons/Glasses.d.ts +1 -1
  617. package/components/Icons/Glasses.d.ts.map +1 -1
  618. package/components/Icons/Glasses.js +19 -1
  619. package/components/Icons/Glasses.js.map +1 -1
  620. package/components/Icons/Globe.d.ts +1 -1
  621. package/components/Icons/Globe.d.ts.map +1 -1
  622. package/components/Icons/Globe.js +6 -1
  623. package/components/Icons/Globe.js.map +1 -1
  624. package/components/Icons/Graph.d.ts +1 -1
  625. package/components/Icons/Graph.d.ts.map +1 -1
  626. package/components/Icons/Graph.js +21 -1
  627. package/components/Icons/Graph.js.map +1 -1
  628. package/components/Icons/Group.d.ts +1 -1
  629. package/components/Icons/Group.d.ts.map +1 -1
  630. package/components/Icons/Group.js +28 -1
  631. package/components/Icons/Group.js.map +1 -1
  632. package/components/Icons/GroupTwins.d.ts +1 -1
  633. package/components/Icons/GroupTwins.d.ts.map +1 -1
  634. package/components/Icons/GroupTwins.js +63 -1
  635. package/components/Icons/GroupTwins.js.map +1 -1
  636. package/components/Icons/HTMLFile.d.ts +1 -1
  637. package/components/Icons/HTMLFile.d.ts.map +1 -1
  638. package/components/Icons/HTMLFile.js +8 -1
  639. package/components/Icons/HTMLFile.js.map +1 -1
  640. package/components/Icons/HandWaving.d.ts +1 -1
  641. package/components/Icons/HandWaving.d.ts.map +1 -1
  642. package/components/Icons/HandWaving.js +5 -1
  643. package/components/Icons/HandWaving.js.map +1 -1
  644. package/components/Icons/HandWithDisease.d.ts +1 -1
  645. package/components/Icons/HandWithDisease.d.ts.map +1 -1
  646. package/components/Icons/HandWithDisease.js +5 -1
  647. package/components/Icons/HandWithDisease.js.map +1 -1
  648. package/components/Icons/HandsAndHeart.d.ts +1 -1
  649. package/components/Icons/HandsAndHeart.d.ts.map +1 -1
  650. package/components/Icons/HandsAndHeart.js +18 -1
  651. package/components/Icons/HandsAndHeart.js.map +1 -1
  652. package/components/Icons/HealthClinic.d.ts +1 -1
  653. package/components/Icons/HealthClinic.d.ts.map +1 -1
  654. package/components/Icons/HealthClinic.js +17 -1
  655. package/components/Icons/HealthClinic.js.map +1 -1
  656. package/components/Icons/HealthWarning.d.ts +1 -1
  657. package/components/Icons/HealthWarning.d.ts.map +1 -1
  658. package/components/Icons/HealthWarning.js +17 -1
  659. package/components/Icons/HealthWarning.js.map +1 -1
  660. package/components/Icons/HealthcarePerson.d.ts +1 -1
  661. package/components/Icons/HealthcarePerson.d.ts.map +1 -1
  662. package/components/Icons/HealthcarePerson.js +57 -1
  663. package/components/Icons/HealthcarePerson.js.map +1 -1
  664. package/components/Icons/HealthcarePersonell.d.ts +1 -1
  665. package/components/Icons/HealthcarePersonell.d.ts.map +1 -1
  666. package/components/Icons/HealthcarePersonell.js +75 -1
  667. package/components/Icons/HealthcarePersonell.js.map +1 -1
  668. package/components/Icons/HearingProtection.d.ts +1 -1
  669. package/components/Icons/HearingProtection.d.ts.map +1 -1
  670. package/components/Icons/HearingProtection.js +22 -1
  671. package/components/Icons/HearingProtection.js.map +1 -1
  672. package/components/Icons/Heart.d.ts +1 -1
  673. package/components/Icons/Heart.d.ts.map +1 -1
  674. package/components/Icons/Heart.js +6 -1
  675. package/components/Icons/Heart.js.map +1 -1
  676. package/components/Icons/HeartHands.d.ts +1 -1
  677. package/components/Icons/HeartHands.d.ts.map +1 -1
  678. package/components/Icons/HeartHands.js +64 -1
  679. package/components/Icons/HeartHands.js.map +1 -1
  680. package/components/Icons/HelpSign.d.ts +1 -1
  681. package/components/Icons/HelpSign.d.ts.map +1 -1
  682. package/components/Icons/HelpSign.js +6 -1
  683. package/components/Icons/HelpSign.js.map +1 -1
  684. package/components/Icons/HelpingHand.d.ts +1 -1
  685. package/components/Icons/HelpingHand.d.ts.map +1 -1
  686. package/components/Icons/HelpingHand.js +17 -1
  687. package/components/Icons/HelpingHand.js.map +1 -1
  688. package/components/Icons/Hemodialysis.d.ts +1 -1
  689. package/components/Icons/Hemodialysis.d.ts.map +1 -1
  690. package/components/Icons/Hemodialysis.js +17 -1
  691. package/components/Icons/Hemodialysis.js.map +1 -1
  692. package/components/Icons/Hiker.d.ts +1 -1
  693. package/components/Icons/Hiker.d.ts.map +1 -1
  694. package/components/Icons/Hiker.js +5 -1
  695. package/components/Icons/Hiker.js.map +1 -1
  696. package/components/Icons/Hipprosthesis.d.ts +1 -1
  697. package/components/Icons/Hipprosthesis.d.ts.map +1 -1
  698. package/components/Icons/Hipprosthesis.js +17 -1
  699. package/components/Icons/Hipprosthesis.js.map +1 -1
  700. package/components/Icons/History.d.ts +1 -1
  701. package/components/Icons/History.d.ts.map +1 -1
  702. package/components/Icons/History.js +6 -1
  703. package/components/Icons/History.js.map +1 -1
  704. package/components/Icons/HivAndAids.d.ts +1 -1
  705. package/components/Icons/HivAndAids.d.ts.map +1 -1
  706. package/components/Icons/HivAndAids.js +5 -1
  707. package/components/Icons/HivAndAids.js.map +1 -1
  708. package/components/Icons/Home.d.ts +1 -1
  709. package/components/Icons/Home.d.ts.map +1 -1
  710. package/components/Icons/Home.js +30 -1
  711. package/components/Icons/Home.js.map +1 -1
  712. package/components/Icons/Hormone.d.ts +1 -1
  713. package/components/Icons/Hormone.d.ts.map +1 -1
  714. package/components/Icons/Hormone.js +5 -1
  715. package/components/Icons/Hormone.js.map +1 -1
  716. package/components/Icons/Hospital.d.ts +1 -1
  717. package/components/Icons/Hospital.d.ts.map +1 -1
  718. package/components/Icons/Hospital.js +30 -1
  719. package/components/Icons/Hospital.js.map +1 -1
  720. package/components/Icons/Hourglass.d.ts +1 -1
  721. package/components/Icons/Hourglass.d.ts.map +1 -1
  722. package/components/Icons/Hourglass.js +30 -1
  723. package/components/Icons/Hourglass.js.map +1 -1
  724. package/components/Icons/IconNames.d.ts +3 -0
  725. package/components/Icons/IconNames.d.ts.map +1 -0
  726. package/components/Icons/IconNames.js +308 -0
  727. package/components/Icons/IconNames.js.map +1 -0
  728. package/components/Icons/ImgFile.d.ts +1 -1
  729. package/components/Icons/ImgFile.d.ts.map +1 -1
  730. package/components/Icons/ImgFile.js +17 -1
  731. package/components/Icons/ImgFile.js.map +1 -1
  732. package/components/Icons/Inbox.d.ts +1 -1
  733. package/components/Icons/Inbox.d.ts.map +1 -1
  734. package/components/Icons/Inbox.js +11 -1
  735. package/components/Icons/Inbox.js.map +1 -1
  736. package/components/Icons/InfoSignFill.d.ts +1 -1
  737. package/components/Icons/InfoSignFill.d.ts.map +1 -1
  738. package/components/Icons/InfoSignFill.js +6 -1
  739. package/components/Icons/InfoSignFill.js.map +1 -1
  740. package/components/Icons/InfoSignStroke.d.ts +1 -1
  741. package/components/Icons/InfoSignStroke.d.ts.map +1 -1
  742. package/components/Icons/InfoSignStroke.js +6 -1
  743. package/components/Icons/InfoSignStroke.js.map +1 -1
  744. package/components/Icons/Instagram.d.ts +1 -1
  745. package/components/Icons/Instagram.d.ts.map +1 -1
  746. package/components/Icons/Instagram.js +5 -1
  747. package/components/Icons/Instagram.js.map +1 -1
  748. package/components/Icons/Intravenous.d.ts +1 -1
  749. package/components/Icons/Intravenous.d.ts.map +1 -1
  750. package/components/Icons/Intravenous.js +17 -1
  751. package/components/Icons/Intravenous.js.map +1 -1
  752. package/components/Icons/JointPain.d.ts +1 -1
  753. package/components/Icons/JointPain.d.ts.map +1 -1
  754. package/components/Icons/JointPain.js +5 -1
  755. package/components/Icons/JointPain.js.map +1 -1
  756. package/components/Icons/Journal.d.ts +1 -1
  757. package/components/Icons/Journal.d.ts.map +1 -1
  758. package/components/Icons/Journal.js +6 -1
  759. package/components/Icons/Journal.js.map +1 -1
  760. package/components/Icons/JpgFile.d.ts +1 -1
  761. package/components/Icons/JpgFile.d.ts.map +1 -1
  762. package/components/Icons/JpgFile.js +17 -1
  763. package/components/Icons/JpgFile.js.map +1 -1
  764. package/components/Icons/Kidney.d.ts +1 -1
  765. package/components/Icons/Kidney.d.ts.map +1 -1
  766. package/components/Icons/Kidney.js +5 -1
  767. package/components/Icons/Kidney.js.map +1 -1
  768. package/components/Icons/KitchenScale.d.ts +1 -1
  769. package/components/Icons/KitchenScale.d.ts.map +1 -1
  770. package/components/Icons/KitchenScale.js +17 -1
  771. package/components/Icons/KitchenScale.js.map +1 -1
  772. package/components/Icons/Kjernejournal.d.ts +1 -1
  773. package/components/Icons/Kjernejournal.d.ts.map +1 -1
  774. package/components/Icons/Kjernejournal.js +5 -1
  775. package/components/Icons/Kjernejournal.js.map +1 -1
  776. package/components/Icons/Laboratory.d.ts +1 -1
  777. package/components/Icons/Laboratory.d.ts.map +1 -1
  778. package/components/Icons/Laboratory.js +17 -1
  779. package/components/Icons/Laboratory.js.map +1 -1
  780. package/components/Icons/LaptopBlog.d.ts +1 -1
  781. package/components/Icons/LaptopBlog.d.ts.map +1 -1
  782. package/components/Icons/LaptopBlog.js +5 -1
  783. package/components/Icons/LaptopBlog.js.map +1 -1
  784. package/components/Icons/LawBook.d.ts +1 -1
  785. package/components/Icons/LawBook.d.ts.map +1 -1
  786. package/components/Icons/LawBook.js +5 -1
  787. package/components/Icons/LawBook.js.map +1 -1
  788. package/components/Icons/LegalDocument.d.ts +1 -1
  789. package/components/Icons/LegalDocument.d.ts.map +1 -1
  790. package/components/Icons/LegalDocument.js +27 -1
  791. package/components/Icons/LegalDocument.js.map +1 -1
  792. package/components/Icons/LightBulb.d.ts +1 -1
  793. package/components/Icons/LightBulb.d.ts.map +1 -1
  794. package/components/Icons/LightBulb.js +5 -1
  795. package/components/Icons/LightBulb.js.map +1 -1
  796. package/components/Icons/List.d.ts +1 -1
  797. package/components/Icons/List.d.ts.map +1 -1
  798. package/components/Icons/List.js +30 -1
  799. package/components/Icons/List.js.map +1 -1
  800. package/components/Icons/Location.d.ts +1 -1
  801. package/components/Icons/Location.d.ts.map +1 -1
  802. package/components/Icons/Location.js +6 -1
  803. package/components/Icons/Location.js.map +1 -1
  804. package/components/Icons/Lock.d.ts +1 -1
  805. package/components/Icons/Lock.d.ts.map +1 -1
  806. package/components/Icons/Lock.js +18 -1
  807. package/components/Icons/Lock.js.map +1 -1
  808. package/components/Icons/Login.d.ts +1 -1
  809. package/components/Icons/Login.d.ts.map +1 -1
  810. package/components/Icons/Login.js +37 -1
  811. package/components/Icons/Login.js.map +1 -1
  812. package/components/Icons/Logout.d.ts +1 -1
  813. package/components/Icons/Logout.d.ts.map +1 -1
  814. package/components/Icons/Logout.js +37 -1
  815. package/components/Icons/Logout.js.map +1 -1
  816. package/components/Icons/Lungs.d.ts +1 -1
  817. package/components/Icons/Lungs.d.ts.map +1 -1
  818. package/components/Icons/Lungs.js +5 -1
  819. package/components/Icons/Lungs.js.map +1 -1
  820. package/components/Icons/Makeup.d.ts +1 -1
  821. package/components/Icons/Makeup.d.ts.map +1 -1
  822. package/components/Icons/Makeup.js +5 -1
  823. package/components/Icons/Makeup.js.map +1 -1
  824. package/components/Icons/MaleDoctor.d.ts +1 -1
  825. package/components/Icons/MaleDoctor.d.ts.map +1 -1
  826. package/components/Icons/MaleDoctor.js +5 -1
  827. package/components/Icons/MaleDoctor.js.map +1 -1
  828. package/components/Icons/MaleDoctorAndPerson.d.ts +1 -1
  829. package/components/Icons/MaleDoctorAndPerson.d.ts.map +1 -1
  830. package/components/Icons/MaleDoctorAndPerson.js +5 -1
  831. package/components/Icons/MaleDoctorAndPerson.js.map +1 -1
  832. package/components/Icons/MaleGenitalia.d.ts +1 -1
  833. package/components/Icons/MaleGenitalia.d.ts.map +1 -1
  834. package/components/Icons/MaleGenitalia.js +5 -1
  835. package/components/Icons/MaleGenitalia.js.map +1 -1
  836. package/components/Icons/Medicine.d.ts +1 -1
  837. package/components/Icons/Medicine.d.ts.map +1 -1
  838. package/components/Icons/Medicine.js +30 -1
  839. package/components/Icons/Medicine.js.map +1 -1
  840. package/components/Icons/MedicineWarning.d.ts +1 -1
  841. package/components/Icons/MedicineWarning.d.ts.map +1 -1
  842. package/components/Icons/MedicineWarning.js +17 -1
  843. package/components/Icons/MedicineWarning.js.map +1 -1
  844. package/components/Icons/MentalHealthAdult.d.ts +1 -1
  845. package/components/Icons/MentalHealthAdult.d.ts.map +1 -1
  846. package/components/Icons/MentalHealthAdult.js +5 -1
  847. package/components/Icons/MentalHealthAdult.js.map +1 -1
  848. package/components/Icons/MentalHealthChild.d.ts +1 -1
  849. package/components/Icons/MentalHealthChild.d.ts.map +1 -1
  850. package/components/Icons/MentalHealthChild.js +5 -1
  851. package/components/Icons/MentalHealthChild.js.map +1 -1
  852. package/components/Icons/Menu.d.ts +1 -1
  853. package/components/Icons/Menu.d.ts.map +1 -1
  854. package/components/Icons/Menu.js +6 -1
  855. package/components/Icons/Menu.js.map +1 -1
  856. package/components/Icons/Microscope.d.ts +1 -1
  857. package/components/Icons/Microscope.d.ts.map +1 -1
  858. package/components/Icons/Microscope.js +17 -1
  859. package/components/Icons/Microscope.js.map +1 -1
  860. package/components/Icons/Minus.d.ts +1 -1
  861. package/components/Icons/Minus.d.ts.map +1 -1
  862. package/components/Icons/Minus.js +6 -1
  863. package/components/Icons/Minus.js.map +1 -1
  864. package/components/Icons/Mirror.d.ts +1 -1
  865. package/components/Icons/Mirror.d.ts.map +1 -1
  866. package/components/Icons/Mirror.js +5 -1
  867. package/components/Icons/Mirror.js.map +1 -1
  868. package/components/Icons/MobilePhone.d.ts +1 -1
  869. package/components/Icons/MobilePhone.d.ts.map +1 -1
  870. package/components/Icons/MobilePhone.js +6 -1
  871. package/components/Icons/MobilePhone.js.map +1 -1
  872. package/components/Icons/MotherHoldingBaby.d.ts +1 -1
  873. package/components/Icons/MotherHoldingBaby.d.ts.map +1 -1
  874. package/components/Icons/MotherHoldingBaby.js +5 -1
  875. package/components/Icons/MotherHoldingBaby.js.map +1 -1
  876. package/components/Icons/MuscleBack.d.ts +1 -1
  877. package/components/Icons/MuscleBack.d.ts.map +1 -1
  878. package/components/Icons/MuscleBack.js +5 -1
  879. package/components/Icons/MuscleBack.js.map +1 -1
  880. package/components/Icons/MuscleLeg.d.ts +1 -1
  881. package/components/Icons/MuscleLeg.d.ts.map +1 -1
  882. package/components/Icons/MuscleLeg.js +5 -1
  883. package/components/Icons/MuscleLeg.js.map +1 -1
  884. package/components/Icons/Mushroom.d.ts +1 -1
  885. package/components/Icons/Mushroom.d.ts.map +1 -1
  886. package/components/Icons/Mushroom.js +5 -1
  887. package/components/Icons/Mushroom.js.map +1 -1
  888. package/components/Icons/Music.d.ts +1 -1
  889. package/components/Icons/Music.d.ts.map +1 -1
  890. package/components/Icons/Music.js +17 -1
  891. package/components/Icons/Music.js.map +1 -1
  892. package/components/Icons/MusselsAndSalt.d.ts +1 -1
  893. package/components/Icons/MusselsAndSalt.d.ts.map +1 -1
  894. package/components/Icons/MusselsAndSalt.js +5 -1
  895. package/components/Icons/MusselsAndSalt.js.map +1 -1
  896. package/components/Icons/NoAccess.d.ts +1 -1
  897. package/components/Icons/NoAccess.d.ts.map +1 -1
  898. package/components/Icons/NoAccess.js +39 -1
  899. package/components/Icons/NoAccess.js.map +1 -1
  900. package/components/Icons/NoEye.d.ts +1 -1
  901. package/components/Icons/NoEye.d.ts.map +1 -1
  902. package/components/Icons/NoEye.js +30 -1
  903. package/components/Icons/NoEye.js.map +1 -1
  904. package/components/Icons/NoFilter.d.ts +1 -1
  905. package/components/Icons/NoFilter.d.ts.map +1 -1
  906. package/components/Icons/NoFilter.js +6 -1
  907. package/components/Icons/NoFilter.js.map +1 -1
  908. package/components/Icons/Notepad.d.ts +1 -1
  909. package/components/Icons/Notepad.d.ts.map +1 -1
  910. package/components/Icons/Notepad.js +5 -1
  911. package/components/Icons/Notepad.js.map +1 -1
  912. package/components/Icons/Osteotomy.d.ts +1 -1
  913. package/components/Icons/Osteotomy.d.ts.map +1 -1
  914. package/components/Icons/Osteotomy.js +17 -1
  915. package/components/Icons/Osteotomy.js.map +1 -1
  916. package/components/Icons/PaintRoller.d.ts +1 -1
  917. package/components/Icons/PaintRoller.d.ts.map +1 -1
  918. package/components/Icons/PaintRoller.js +5 -1
  919. package/components/Icons/PaintRoller.js.map +1 -1
  920. package/components/Icons/PaperPlane.d.ts +1 -1
  921. package/components/Icons/PaperPlane.d.ts.map +1 -1
  922. package/components/Icons/PaperPlane.js +6 -1
  923. package/components/Icons/PaperPlane.js.map +1 -1
  924. package/components/Icons/PatientAndPerson.d.ts +1 -1
  925. package/components/Icons/PatientAndPerson.d.ts.map +1 -1
  926. package/components/Icons/PatientAndPerson.js +5 -1
  927. package/components/Icons/PatientAndPerson.js.map +1 -1
  928. package/components/Icons/Pause.d.ts +1 -1
  929. package/components/Icons/Pause.d.ts.map +1 -1
  930. package/components/Icons/Pause.js +6 -1
  931. package/components/Icons/Pause.js.map +1 -1
  932. package/components/Icons/PdfFile.d.ts +1 -1
  933. package/components/Icons/PdfFile.d.ts.map +1 -1
  934. package/components/Icons/PdfFile.js +17 -1
  935. package/components/Icons/PdfFile.js.map +1 -1
  936. package/components/Icons/Pencil.d.ts +1 -1
  937. package/components/Icons/Pencil.d.ts.map +1 -1
  938. package/components/Icons/Pencil.js +6 -1
  939. package/components/Icons/Pencil.js.map +1 -1
  940. package/components/Icons/PeopleTalking.d.ts +1 -1
  941. package/components/Icons/PeopleTalking.d.ts.map +1 -1
  942. package/components/Icons/PeopleTalking.js +17 -1
  943. package/components/Icons/PeopleTalking.js.map +1 -1
  944. package/components/Icons/Peritonealdialysis.d.ts +1 -1
  945. package/components/Icons/Peritonealdialysis.d.ts.map +1 -1
  946. package/components/Icons/Peritonealdialysis.js +17 -1
  947. package/components/Icons/Peritonealdialysis.js.map +1 -1
  948. package/components/Icons/Person.d.ts +1 -1
  949. package/components/Icons/Person.d.ts.map +1 -1
  950. package/components/Icons/Person.js +5 -1
  951. package/components/Icons/Person.js.map +1 -1
  952. package/components/Icons/PersonAndPatient.d.ts +1 -1
  953. package/components/Icons/PersonAndPatient.d.ts.map +1 -1
  954. package/components/Icons/PersonAndPatient.js +5 -1
  955. package/components/Icons/PersonAndPatient.js.map +1 -1
  956. package/components/Icons/PersonCancel.d.ts +1 -1
  957. package/components/Icons/PersonCancel.d.ts.map +1 -1
  958. package/components/Icons/PersonCancel.js +57 -1
  959. package/components/Icons/PersonCancel.js.map +1 -1
  960. package/components/Icons/PersonInXRayMachine.d.ts +1 -1
  961. package/components/Icons/PersonInXRayMachine.d.ts.map +1 -1
  962. package/components/Icons/PersonInXRayMachine.js +17 -1
  963. package/components/Icons/PersonInXRayMachine.js.map +1 -1
  964. package/components/Icons/PersonOverweight.d.ts +1 -1
  965. package/components/Icons/PersonOverweight.d.ts.map +1 -1
  966. package/components/Icons/PersonOverweight.js +5 -1
  967. package/components/Icons/PersonOverweight.js.map +1 -1
  968. package/components/Icons/PersonRelaxing.d.ts +1 -1
  969. package/components/Icons/PersonRelaxing.d.ts.map +1 -1
  970. package/components/Icons/PersonRelaxing.js +5 -1
  971. package/components/Icons/PersonRelaxing.js.map +1 -1
  972. package/components/Icons/PersonWithBrain.d.ts +1 -1
  973. package/components/Icons/PersonWithBrain.d.ts.map +1 -1
  974. package/components/Icons/PersonWithBrain.js +5 -1
  975. package/components/Icons/PersonWithBrain.js.map +1 -1
  976. package/components/Icons/PersonWithBrokenArm.d.ts +1 -1
  977. package/components/Icons/PersonWithBrokenArm.d.ts.map +1 -1
  978. package/components/Icons/PersonWithBrokenArm.js +5 -1
  979. package/components/Icons/PersonWithBrokenArm.js.map +1 -1
  980. package/components/Icons/PersonWithCrutches.d.ts +1 -1
  981. package/components/Icons/PersonWithCrutches.d.ts.map +1 -1
  982. package/components/Icons/PersonWithCrutches.js +5 -1
  983. package/components/Icons/PersonWithCrutches.js.map +1 -1
  984. package/components/Icons/PersonWithJaw.d.ts +1 -1
  985. package/components/Icons/PersonWithJaw.d.ts.map +1 -1
  986. package/components/Icons/PersonWithJaw.js +5 -1
  987. package/components/Icons/PersonWithJaw.js.map +1 -1
  988. package/components/Icons/PersonWithMagnifyingGlass.d.ts +1 -1
  989. package/components/Icons/PersonWithMagnifyingGlass.d.ts.map +1 -1
  990. package/components/Icons/PersonWithMagnifyingGlass.js +5 -1
  991. package/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
  992. package/components/Icons/PersonWithSenses.d.ts +1 -1
  993. package/components/Icons/PersonWithSenses.d.ts.map +1 -1
  994. package/components/Icons/PersonWithSenses.js +5 -1
  995. package/components/Icons/PersonWithSenses.js.map +1 -1
  996. package/components/Icons/PersonWorking.d.ts +1 -1
  997. package/components/Icons/PersonWorking.d.ts.map +1 -1
  998. package/components/Icons/PersonWorking.js +5 -1
  999. package/components/Icons/PersonWorking.js.map +1 -1
  1000. package/components/Icons/PersonalPlan.d.ts +1 -1
  1001. package/components/Icons/PersonalPlan.d.ts.map +1 -1
  1002. package/components/Icons/PersonalPlan.js +33 -1
  1003. package/components/Icons/PersonalPlan.js.map +1 -1
  1004. package/components/Icons/PizzaSlice.d.ts +1 -1
  1005. package/components/Icons/PizzaSlice.d.ts.map +1 -1
  1006. package/components/Icons/PizzaSlice.js +5 -1
  1007. package/components/Icons/PizzaSlice.js.map +1 -1
  1008. package/components/Icons/Plane.d.ts +1 -1
  1009. package/components/Icons/Plane.d.ts.map +1 -1
  1010. package/components/Icons/Plane.js +5 -1
  1011. package/components/Icons/Plane.js.map +1 -1
  1012. package/components/Icons/Plant.d.ts +1 -1
  1013. package/components/Icons/Plant.d.ts.map +1 -1
  1014. package/components/Icons/Plant.js +5 -1
  1015. package/components/Icons/Plant.js.map +1 -1
  1016. package/components/Icons/Play.d.ts +1 -1
  1017. package/components/Icons/Play.d.ts.map +1 -1
  1018. package/components/Icons/Play.js +6 -1
  1019. package/components/Icons/Play.js.map +1 -1
  1020. package/components/Icons/PlusLarge.d.ts +1 -1
  1021. package/components/Icons/PlusLarge.d.ts.map +1 -1
  1022. package/components/Icons/PlusLarge.js +6 -1
  1023. package/components/Icons/PlusLarge.js.map +1 -1
  1024. package/components/Icons/PlusSmall.d.ts +1 -1
  1025. package/components/Icons/PlusSmall.d.ts.map +1 -1
  1026. package/components/Icons/PlusSmall.js +6 -1
  1027. package/components/Icons/PlusSmall.js.map +1 -1
  1028. package/components/Icons/PngFile.d.ts +1 -1
  1029. package/components/Icons/PngFile.d.ts.map +1 -1
  1030. package/components/Icons/PngFile.js +17 -1
  1031. package/components/Icons/PngFile.js.map +1 -1
  1032. package/components/Icons/Podcast.d.ts +1 -1
  1033. package/components/Icons/Podcast.d.ts.map +1 -1
  1034. package/components/Icons/Podcast.js +17 -1
  1035. package/components/Icons/Podcast.js.map +1 -1
  1036. package/components/Icons/PoisonInformation.d.ts +1 -1
  1037. package/components/Icons/PoisonInformation.d.ts.map +1 -1
  1038. package/components/Icons/PoisonInformation.js +5 -1
  1039. package/components/Icons/PoisonInformation.js.map +1 -1
  1040. package/components/Icons/Pregnant.d.ts +1 -1
  1041. package/components/Icons/Pregnant.d.ts.map +1 -1
  1042. package/components/Icons/Pregnant.js +5 -1
  1043. package/components/Icons/Pregnant.js.map +1 -1
  1044. package/components/Icons/Printer.d.ts +1 -1
  1045. package/components/Icons/Printer.d.ts.map +1 -1
  1046. package/components/Icons/Printer.js +30 -1
  1047. package/components/Icons/Printer.js.map +1 -1
  1048. package/components/Icons/Psychosis.d.ts +1 -1
  1049. package/components/Icons/Psychosis.d.ts.map +1 -1
  1050. package/components/Icons/Psychosis.js +5 -1
  1051. package/components/Icons/Psychosis.js.map +1 -1
  1052. package/components/Icons/Publication.d.ts +1 -1
  1053. package/components/Icons/Publication.d.ts.map +1 -1
  1054. package/components/Icons/Publication.js +17 -1
  1055. package/components/Icons/Publication.js.map +1 -1
  1056. package/components/Icons/Puzzle.d.ts +1 -1
  1057. package/components/Icons/Puzzle.d.ts.map +1 -1
  1058. package/components/Icons/Puzzle.js +5 -1
  1059. package/components/Icons/Puzzle.js.map +1 -1
  1060. package/components/Icons/QrCode.d.ts +1 -1
  1061. package/components/Icons/QrCode.d.ts.map +1 -1
  1062. package/components/Icons/QrCode.js +30 -1
  1063. package/components/Icons/QrCode.js.map +1 -1
  1064. package/components/Icons/Quarrel.d.ts +1 -1
  1065. package/components/Icons/Quarrel.d.ts.map +1 -1
  1066. package/components/Icons/Quarrel.js +17 -1
  1067. package/components/Icons/Quarrel.js.map +1 -1
  1068. package/components/Icons/RadioTherapy.d.ts +1 -1
  1069. package/components/Icons/RadioTherapy.d.ts.map +1 -1
  1070. package/components/Icons/RadioTherapy.js +17 -1
  1071. package/components/Icons/RadioTherapy.js.map +1 -1
  1072. package/components/Icons/RadioactiveTreatment.d.ts +1 -1
  1073. package/components/Icons/RadioactiveTreatment.d.ts.map +1 -1
  1074. package/components/Icons/RadioactiveTreatment.js +17 -1
  1075. package/components/Icons/RadioactiveTreatment.js.map +1 -1
  1076. package/components/Icons/Radioiodine.d.ts +1 -1
  1077. package/components/Icons/Radioiodine.d.ts.map +1 -1
  1078. package/components/Icons/Radioiodine.js +17 -1
  1079. package/components/Icons/Radioiodine.js.map +1 -1
  1080. package/components/Icons/Receipt.d.ts +1 -1
  1081. package/components/Icons/Receipt.d.ts.map +1 -1
  1082. package/components/Icons/Receipt.js +5 -1
  1083. package/components/Icons/Receipt.js.map +1 -1
  1084. package/components/Icons/Receptionist.d.ts +1 -1
  1085. package/components/Icons/Receptionist.d.ts.map +1 -1
  1086. package/components/Icons/Receptionist.js +6 -1
  1087. package/components/Icons/Receptionist.js.map +1 -1
  1088. package/components/Icons/Recovery.d.ts +1 -1
  1089. package/components/Icons/Recovery.d.ts.map +1 -1
  1090. package/components/Icons/Recovery.js +17 -1
  1091. package/components/Icons/Recovery.js.map +1 -1
  1092. package/components/Icons/Referral.d.ts +1 -1
  1093. package/components/Icons/Referral.d.ts.map +1 -1
  1094. package/components/Icons/Referral.js +6 -1
  1095. package/components/Icons/Referral.js.map +1 -1
  1096. package/components/Icons/Refresh.d.ts +1 -1
  1097. package/components/Icons/Refresh.d.ts.map +1 -1
  1098. package/components/Icons/Refresh.js +6 -1
  1099. package/components/Icons/Refresh.js.map +1 -1
  1100. package/components/Icons/Refund.d.ts +1 -1
  1101. package/components/Icons/Refund.d.ts.map +1 -1
  1102. package/components/Icons/Refund.js +5 -1
  1103. package/components/Icons/Refund.js.map +1 -1
  1104. package/components/Icons/Reply.d.ts +1 -1
  1105. package/components/Icons/Reply.d.ts.map +1 -1
  1106. package/components/Icons/Reply.js +6 -1
  1107. package/components/Icons/Reply.js.map +1 -1
  1108. package/components/Icons/Rocket.d.ts +1 -1
  1109. package/components/Icons/Rocket.d.ts.map +1 -1
  1110. package/components/Icons/Rocket.js +5 -1
  1111. package/components/Icons/Rocket.js.map +1 -1
  1112. package/components/Icons/RtfFile.d.ts +1 -1
  1113. package/components/Icons/RtfFile.d.ts.map +1 -1
  1114. package/components/Icons/RtfFile.js +17 -1
  1115. package/components/Icons/RtfFile.js.map +1 -1
  1116. package/components/Icons/STDs.d.ts +1 -1
  1117. package/components/Icons/STDs.d.ts.map +1 -1
  1118. package/components/Icons/STDs.js +17 -1
  1119. package/components/Icons/STDs.js.map +1 -1
  1120. package/components/Icons/Save.d.ts +1 -1
  1121. package/components/Icons/Save.d.ts.map +1 -1
  1122. package/components/Icons/Save.js +6 -1
  1123. package/components/Icons/Save.js.map +1 -1
  1124. package/components/Icons/Scale.d.ts +1 -1
  1125. package/components/Icons/Scale.d.ts.map +1 -1
  1126. package/components/Icons/Scale.js +5 -1
  1127. package/components/Icons/Scale.js.map +1 -1
  1128. package/components/Icons/ScreenReader.d.ts +1 -1
  1129. package/components/Icons/ScreenReader.d.ts.map +1 -1
  1130. package/components/Icons/ScreenReader.js +36 -1
  1131. package/components/Icons/ScreenReader.js.map +1 -1
  1132. package/components/Icons/Search.d.ts +1 -1
  1133. package/components/Icons/Search.d.ts.map +1 -1
  1134. package/components/Icons/Search.js +6 -1
  1135. package/components/Icons/Search.js.map +1 -1
  1136. package/components/Icons/SectionSign.d.ts +1 -1
  1137. package/components/Icons/SectionSign.d.ts.map +1 -1
  1138. package/components/Icons/SectionSign.js +30 -1
  1139. package/components/Icons/SectionSign.js.map +1 -1
  1140. package/components/Icons/Settings.d.ts +1 -1
  1141. package/components/Icons/Settings.d.ts.map +1 -1
  1142. package/components/Icons/Settings.js +30 -1
  1143. package/components/Icons/Settings.js.map +1 -1
  1144. package/components/Icons/Sexualorientation.d.ts +1 -1
  1145. package/components/Icons/Sexualorientation.d.ts.map +1 -1
  1146. package/components/Icons/Sexualorientation.js +17 -1
  1147. package/components/Icons/Sexualorientation.js.map +1 -1
  1148. package/components/Icons/ShakingHand.d.ts +1 -1
  1149. package/components/Icons/ShakingHand.d.ts.map +1 -1
  1150. package/components/Icons/ShakingHand.js +11 -1
  1151. package/components/Icons/ShakingHand.js.map +1 -1
  1152. package/components/Icons/Share.d.ts +1 -1
  1153. package/components/Icons/Share.d.ts.map +1 -1
  1154. package/components/Icons/Share.js +6 -1
  1155. package/components/Icons/Share.js.map +1 -1
  1156. package/components/Icons/Shield.d.ts +1 -1
  1157. package/components/Icons/Shield.d.ts.map +1 -1
  1158. package/components/Icons/Shield.js +17 -1
  1159. package/components/Icons/Shield.js.map +1 -1
  1160. package/components/Icons/ShuntOperation.d.ts +1 -1
  1161. package/components/Icons/ShuntOperation.d.ts.map +1 -1
  1162. package/components/Icons/ShuntOperation.js +17 -1
  1163. package/components/Icons/ShuntOperation.js.map +1 -1
  1164. package/components/Icons/Skeleton.d.ts +1 -1
  1165. package/components/Icons/Skeleton.d.ts.map +1 -1
  1166. package/components/Icons/Skeleton.js +5 -1
  1167. package/components/Icons/Skeleton.js.map +1 -1
  1168. package/components/Icons/Skin.d.ts +1 -1
  1169. package/components/Icons/Skin.d.ts.map +1 -1
  1170. package/components/Icons/Skin.js +5 -1
  1171. package/components/Icons/Skin.js.map +1 -1
  1172. package/components/Icons/Snake.d.ts +1 -1
  1173. package/components/Icons/Snake.d.ts.map +1 -1
  1174. package/components/Icons/Snake.js +5 -1
  1175. package/components/Icons/Snake.js.map +1 -1
  1176. package/components/Icons/Snapchat.d.ts +1 -1
  1177. package/components/Icons/Snapchat.d.ts.map +1 -1
  1178. package/components/Icons/Snapchat.js +5 -1
  1179. package/components/Icons/Snapchat.js.map +1 -1
  1180. package/components/Icons/SortDown.d.ts +1 -1
  1181. package/components/Icons/SortDown.d.ts.map +1 -1
  1182. package/components/Icons/SortDown.js +9 -1
  1183. package/components/Icons/SortDown.js.map +1 -1
  1184. package/components/Icons/SortUp.d.ts +1 -1
  1185. package/components/Icons/SortUp.d.ts.map +1 -1
  1186. package/components/Icons/SortUp.js +9 -1
  1187. package/components/Icons/SortUp.js.map +1 -1
  1188. package/components/Icons/SpeechBubble.d.ts +1 -1
  1189. package/components/Icons/SpeechBubble.d.ts.map +1 -1
  1190. package/components/Icons/SpeechBubble.js +30 -1
  1191. package/components/Icons/SpeechBubble.js.map +1 -1
  1192. package/components/Icons/Spray.d.ts +1 -1
  1193. package/components/Icons/Spray.d.ts.map +1 -1
  1194. package/components/Icons/Spray.js +5 -1
  1195. package/components/Icons/Spray.js.map +1 -1
  1196. package/components/Icons/Stopwatch.d.ts +1 -1
  1197. package/components/Icons/Stopwatch.d.ts.map +1 -1
  1198. package/components/Icons/Stopwatch.js +30 -1
  1199. package/components/Icons/Stopwatch.js.map +1 -1
  1200. package/components/Icons/Sun.d.ts +1 -1
  1201. package/components/Icons/Sun.d.ts.map +1 -1
  1202. package/components/Icons/Sun.js +22 -1
  1203. package/components/Icons/Sun.js.map +1 -1
  1204. package/components/Icons/SupportingPerson.d.ts +1 -1
  1205. package/components/Icons/SupportingPerson.d.ts.map +1 -1
  1206. package/components/Icons/SupportingPerson.js +41 -1
  1207. package/components/Icons/SupportingPerson.js.map +1 -1
  1208. package/components/Icons/Surgery.d.ts +1 -1
  1209. package/components/Icons/Surgery.d.ts.map +1 -1
  1210. package/components/Icons/Surgery.js +17 -1
  1211. package/components/Icons/Surgery.js.map +1 -1
  1212. package/components/Icons/Syringe.d.ts +1 -1
  1213. package/components/Icons/Syringe.d.ts.map +1 -1
  1214. package/components/Icons/Syringe.js +22 -1
  1215. package/components/Icons/Syringe.js.map +1 -1
  1216. package/components/Icons/Taxi.d.ts +1 -1
  1217. package/components/Icons/Taxi.d.ts.map +1 -1
  1218. package/components/Icons/Taxi.js +5 -1
  1219. package/components/Icons/Taxi.js.map +1 -1
  1220. package/components/Icons/TeddyBear.d.ts +1 -1
  1221. package/components/Icons/TeddyBear.d.ts.map +1 -1
  1222. package/components/Icons/TeddyBear.js +5 -1
  1223. package/components/Icons/TeddyBear.js.map +1 -1
  1224. package/components/Icons/Teenagers.d.ts +1 -1
  1225. package/components/Icons/Teenagers.d.ts.map +1 -1
  1226. package/components/Icons/Teenagers.js +17 -1
  1227. package/components/Icons/Teenagers.js.map +1 -1
  1228. package/components/Icons/ThinkingAboutBaby.d.ts +1 -1
  1229. package/components/Icons/ThinkingAboutBaby.d.ts.map +1 -1
  1230. package/components/Icons/ThinkingAboutBaby.js +5 -1
  1231. package/components/Icons/ThinkingAboutBaby.js.map +1 -1
  1232. package/components/Icons/Ticket.d.ts +1 -1
  1233. package/components/Icons/Ticket.d.ts.map +1 -1
  1234. package/components/Icons/Ticket.js +5 -1
  1235. package/components/Icons/Ticket.js.map +1 -1
  1236. package/components/Icons/TimePassing.d.ts +1 -1
  1237. package/components/Icons/TimePassing.d.ts.map +1 -1
  1238. package/components/Icons/TimePassing.js +30 -1
  1239. package/components/Icons/TimePassing.js.map +1 -1
  1240. package/components/Icons/Tombstone.d.ts +1 -1
  1241. package/components/Icons/Tombstone.d.ts.map +1 -1
  1242. package/components/Icons/Tombstone.js +21 -1
  1243. package/components/Icons/Tombstone.js.map +1 -1
  1244. package/components/Icons/Toolbox.d.ts +1 -1
  1245. package/components/Icons/Toolbox.d.ts.map +1 -1
  1246. package/components/Icons/Toolbox.js +42 -1
  1247. package/components/Icons/Toolbox.js.map +1 -1
  1248. package/components/Icons/Tooth.d.ts +1 -1
  1249. package/components/Icons/Tooth.d.ts.map +1 -1
  1250. package/components/Icons/Tooth.js +5 -1
  1251. package/components/Icons/Tooth.js.map +1 -1
  1252. package/components/Icons/TotalKneeProsthesis.d.ts +1 -1
  1253. package/components/Icons/TotalKneeProsthesis.d.ts.map +1 -1
  1254. package/components/Icons/TotalKneeProsthesis.js +17 -1
  1255. package/components/Icons/TotalKneeProsthesis.js.map +1 -1
  1256. package/components/Icons/Train.d.ts +1 -1
  1257. package/components/Icons/Train.d.ts.map +1 -1
  1258. package/components/Icons/Train.js +5 -1
  1259. package/components/Icons/Train.js.map +1 -1
  1260. package/components/Icons/Transplantation.d.ts +1 -1
  1261. package/components/Icons/Transplantation.d.ts.map +1 -1
  1262. package/components/Icons/Transplantation.js +17 -1
  1263. package/components/Icons/Transplantation.js.map +1 -1
  1264. package/components/Icons/TrashCan.d.ts +1 -1
  1265. package/components/Icons/TrashCan.d.ts.map +1 -1
  1266. package/components/Icons/TrashCan.js +30 -1
  1267. package/components/Icons/TrashCan.js.map +1 -1
  1268. package/components/Icons/TravelRoute.d.ts +1 -1
  1269. package/components/Icons/TravelRoute.d.ts.map +1 -1
  1270. package/components/Icons/TravelRoute.js +50 -1
  1271. package/components/Icons/TravelRoute.js.map +1 -1
  1272. package/components/Icons/TriangleX.d.ts +1 -1
  1273. package/components/Icons/TriangleX.d.ts.map +1 -1
  1274. package/components/Icons/TriangleX.js +37 -1
  1275. package/components/Icons/TriangleX.js.map +1 -1
  1276. package/components/Icons/Twitter.d.ts +1 -1
  1277. package/components/Icons/Twitter.d.ts.map +1 -1
  1278. package/components/Icons/Twitter.js +5 -1
  1279. package/components/Icons/Twitter.js.map +1 -1
  1280. package/components/Icons/Undo.d.ts +1 -1
  1281. package/components/Icons/Undo.d.ts.map +1 -1
  1282. package/components/Icons/Undo.js +42 -1
  1283. package/components/Icons/Undo.js.map +1 -1
  1284. package/components/Icons/UniProsthesis.d.ts +1 -1
  1285. package/components/Icons/UniProsthesis.d.ts.map +1 -1
  1286. package/components/Icons/UniProsthesis.js +17 -1
  1287. package/components/Icons/UniProsthesis.js.map +1 -1
  1288. package/components/Icons/Upload.d.ts +1 -1
  1289. package/components/Icons/Upload.d.ts.map +1 -1
  1290. package/components/Icons/Upload.js +6 -1
  1291. package/components/Icons/Upload.js.map +1 -1
  1292. package/components/Icons/UserOrganization.d.ts +1 -1
  1293. package/components/Icons/UserOrganization.d.ts.map +1 -1
  1294. package/components/Icons/UserOrganization.js +5 -1
  1295. package/components/Icons/UserOrganization.js.map +1 -1
  1296. package/components/Icons/Vaccine.d.ts +1 -1
  1297. package/components/Icons/Vaccine.d.ts.map +1 -1
  1298. package/components/Icons/Vaccine.js +30 -1
  1299. package/components/Icons/Vaccine.js.map +1 -1
  1300. package/components/Icons/VerticalDots.d.ts +1 -1
  1301. package/components/Icons/VerticalDots.d.ts.map +1 -1
  1302. package/components/Icons/VerticalDots.js +6 -1
  1303. package/components/Icons/VerticalDots.js.map +1 -1
  1304. package/components/Icons/VideoCamera.d.ts +1 -1
  1305. package/components/Icons/VideoCamera.d.ts.map +1 -1
  1306. package/components/Icons/VideoCamera.js +30 -1
  1307. package/components/Icons/VideoCamera.js.map +1 -1
  1308. package/components/Icons/VideoChat.d.ts +1 -1
  1309. package/components/Icons/VideoChat.d.ts.map +1 -1
  1310. package/components/Icons/VideoChat.js +6 -1
  1311. package/components/Icons/VideoChat.js.map +1 -1
  1312. package/components/Icons/Wallet.d.ts +1 -1
  1313. package/components/Icons/Wallet.d.ts.map +1 -1
  1314. package/components/Icons/Wallet.js +6 -1
  1315. package/components/Icons/Wallet.js.map +1 -1
  1316. package/components/Icons/Watch.d.ts +1 -1
  1317. package/components/Icons/Watch.d.ts.map +1 -1
  1318. package/components/Icons/Watch.js +30 -1
  1319. package/components/Icons/Watch.js.map +1 -1
  1320. package/components/Icons/Website.d.ts +1 -1
  1321. package/components/Icons/Website.d.ts.map +1 -1
  1322. package/components/Icons/Website.js +17 -1
  1323. package/components/Icons/Website.js.map +1 -1
  1324. package/components/Icons/Wheelchair.d.ts +1 -1
  1325. package/components/Icons/Wheelchair.d.ts.map +1 -1
  1326. package/components/Icons/Wheelchair.js +17 -1
  1327. package/components/Icons/Wheelchair.js.map +1 -1
  1328. package/components/Icons/WheelchairActive.d.ts +1 -1
  1329. package/components/Icons/WheelchairActive.d.ts.map +1 -1
  1330. package/components/Icons/WheelchairActive.js +17 -1
  1331. package/components/Icons/WheelchairActive.js.map +1 -1
  1332. package/components/Icons/Window.d.ts +1 -1
  1333. package/components/Icons/Window.d.ts.map +1 -1
  1334. package/components/Icons/Window.js +5 -1
  1335. package/components/Icons/Window.js.map +1 -1
  1336. package/components/Icons/WordDocument.d.ts +1 -1
  1337. package/components/Icons/WordDocument.d.ts.map +1 -1
  1338. package/components/Icons/WordDocument.js +11 -1
  1339. package/components/Icons/WordDocument.js.map +1 -1
  1340. package/components/Icons/WorkSuitcase.d.ts +1 -1
  1341. package/components/Icons/WorkSuitcase.d.ts.map +1 -1
  1342. package/components/Icons/WorkSuitcase.js +11 -1
  1343. package/components/Icons/WorkSuitcase.js.map +1 -1
  1344. package/components/Icons/X.d.ts +1 -1
  1345. package/components/Icons/X.d.ts.map +1 -1
  1346. package/components/Icons/X.js +6 -1
  1347. package/components/Icons/X.js.map +1 -1
  1348. package/components/Icons/XOutline.d.ts +1 -1
  1349. package/components/Icons/XOutline.d.ts.map +1 -1
  1350. package/components/Icons/XOutline.js +17 -1
  1351. package/components/Icons/XOutline.js.map +1 -1
  1352. package/components/Icons/XmlFile.d.ts +1 -1
  1353. package/components/Icons/XmlFile.d.ts.map +1 -1
  1354. package/components/Icons/XmlFile.js +17 -1
  1355. package/components/Icons/XmlFile.js.map +1 -1
  1356. package/components/Icons/YouTube.d.ts +1 -1
  1357. package/components/Icons/YouTube.d.ts.map +1 -1
  1358. package/components/Icons/YouTube.js +5 -1
  1359. package/components/Icons/YouTube.js.map +1 -1
  1360. package/components/Icons/Zoom.d.ts +1 -1
  1361. package/components/Icons/Zoom.d.ts.map +1 -1
  1362. package/components/Icons/Zoom.js +30 -1
  1363. package/components/Icons/Zoom.js.map +1 -1
  1364. package/components/Input/Input.d.ts +5 -4
  1365. package/components/Input/Input.d.ts.map +1 -1
  1366. package/components/Input/Input.js +112 -0
  1367. package/components/Input/Input.js.map +1 -0
  1368. package/components/Input/index.js +6 -1
  1369. package/components/Input/index.js.map +1 -1
  1370. package/components/Input/styles.module.scss +3 -3
  1371. package/components/Input/styles.module.scss.d.ts +2 -2
  1372. package/components/Label/Label.d.ts +1 -1
  1373. package/components/Label/Label.d.ts.map +1 -1
  1374. package/components/Label/Label.js +84 -0
  1375. package/components/Label/Label.js.map +1 -0
  1376. package/components/Label/SubLabel.js +19 -0
  1377. package/components/Label/SubLabel.js.map +1 -0
  1378. package/components/Label/index.js +10 -1
  1379. package/components/Label/index.js.map +1 -1
  1380. package/components/LazyIcon/ErrorBoundary.d.ts +17 -0
  1381. package/components/LazyIcon/ErrorBoundary.d.ts.map +1 -0
  1382. package/components/LazyIcon/ErrorBoundary.js +22 -0
  1383. package/components/LazyIcon/ErrorBoundary.js.map +1 -0
  1384. package/components/LazyIcon/LazyIcon.d.ts +10 -0
  1385. package/components/LazyIcon/LazyIcon.d.ts.map +1 -0
  1386. package/components/LazyIcon/LazyIcon.js +29 -0
  1387. package/components/LazyIcon/LazyIcon.js.map +1 -0
  1388. package/components/LazyIcon/index.d.ts +4 -0
  1389. package/components/LazyIcon/index.d.ts.map +1 -0
  1390. package/components/LazyIcon/index.js +8 -0
  1391. package/components/{Icons → LazyIcon}/index.js.map +1 -1
  1392. package/components/LinkList/LinkList.js +60 -0
  1393. package/components/LinkList/LinkList.js.map +1 -0
  1394. package/components/LinkList/index.js +6 -1
  1395. package/components/LinkList/index.js.map +1 -1
  1396. package/components/List/List.js +14 -0
  1397. package/components/List/List.js.map +1 -0
  1398. package/components/List/index.js +4 -1
  1399. package/components/List/index.js.map +1 -1
  1400. package/components/ListHeader/ListHeader.d.ts +1 -1
  1401. package/components/ListHeader/ListHeader.d.ts.map +1 -1
  1402. package/components/ListHeader/ListHeader.js +73 -0
  1403. package/components/ListHeader/ListHeader.js.map +1 -0
  1404. package/components/ListHeader/ListHeaderText/ListHeaderText.js +31 -0
  1405. package/components/ListHeader/ListHeaderText/ListHeaderText.js.map +1 -0
  1406. package/components/ListHeader/ListHeaderText/index.js +6 -1
  1407. package/components/ListHeader/ListHeaderText/index.js.map +1 -1
  1408. package/components/ListHeader/index.js +10 -1
  1409. package/components/ListHeader/index.js.map +1 -1
  1410. package/components/Loader/Loader.js +68 -0
  1411. package/components/Loader/Loader.js.map +1 -0
  1412. package/components/Loader/index.js +6 -1
  1413. package/components/Loader/index.js.map +1 -1
  1414. package/components/Logo/Logo.js +40 -0
  1415. package/components/Logo/Logo.js.map +1 -0
  1416. package/components/Logo/index.js +4 -1
  1417. package/components/Logo/index.js.map +1 -1
  1418. package/components/MaxCharacters/MaxCharacters.js +15 -0
  1419. package/components/MaxCharacters/MaxCharacters.js.map +1 -0
  1420. package/components/Modal/Modal.js +143 -0
  1421. package/components/Modal/Modal.js.map +1 -0
  1422. package/components/Modal/index.js +7 -1
  1423. package/components/Modal/index.js.map +1 -1
  1424. package/components/NotificationPanel/DetailButton/DetailButton.js +28 -0
  1425. package/components/NotificationPanel/DetailButton/DetailButton.js.map +1 -0
  1426. package/components/NotificationPanel/NotificationPanel.js +126 -0
  1427. package/components/NotificationPanel/NotificationPanel.js.map +1 -0
  1428. package/components/NotificationPanel/index.js +4 -1
  1429. package/components/NotificationPanel/index.js.map +1 -1
  1430. package/components/Panel/Panel.js +191 -0
  1431. package/components/Panel/Panel.js.map +1 -0
  1432. package/components/Panel/index.js +8 -1
  1433. package/components/Panel/index.js.map +1 -1
  1434. package/components/PanelList/PanelList.js +17 -0
  1435. package/components/PanelList/PanelList.js.map +1 -0
  1436. package/components/PanelList/index.js +4 -1
  1437. package/components/PanelList/index.js.map +1 -1
  1438. package/components/PopMenu/PopMenu.js +77 -0
  1439. package/components/PopMenu/PopMenu.js.map +1 -0
  1440. package/components/PopMenu/index.js +7 -1
  1441. package/components/PopMenu/index.js.map +1 -1
  1442. package/components/PopOver/PopOver.js +56 -0
  1443. package/components/PopOver/PopOver.js.map +1 -0
  1444. package/components/PopOver/index.js +6 -1
  1445. package/components/PopOver/index.js.map +1 -1
  1446. package/components/PopOver/utils.js +33 -0
  1447. package/components/PopOver/utils.js.map +1 -0
  1448. package/components/Portal/index.js +15 -1
  1449. package/components/Portal/index.js.map +1 -1
  1450. package/components/RadioButton/RadioButton.d.ts +4 -4
  1451. package/components/RadioButton/RadioButton.d.ts.map +1 -1
  1452. package/components/RadioButton/RadioButton.js +102 -0
  1453. package/components/RadioButton/RadioButton.js.map +1 -0
  1454. package/components/RadioButton/index.js +7 -1
  1455. package/components/RadioButton/index.js.map +1 -1
  1456. package/components/RadioButton/styles.module.scss +12 -12
  1457. package/components/RadioButton/styles.module.scss.d.ts +14 -14
  1458. package/components/Select/Select.js +69 -0
  1459. package/components/Select/Select.js.map +1 -0
  1460. package/components/Select/index.js +6 -1
  1461. package/components/Select/index.js.map +1 -1
  1462. package/components/ServiceMessage/ServiceMessage.js +106 -0
  1463. package/components/ServiceMessage/ServiceMessage.js.map +1 -0
  1464. package/components/ServiceMessage/index.js +4 -1
  1465. package/components/ServiceMessage/index.js.map +1 -1
  1466. package/components/Slider/Slider.js +125 -0
  1467. package/components/Slider/Slider.js.map +1 -0
  1468. package/components/Slider/index.js +6 -1
  1469. package/components/Slider/index.js.map +1 -1
  1470. package/components/Spacer/Spacer.js +30 -0
  1471. package/components/Spacer/Spacer.js.map +1 -0
  1472. package/components/Spacer/index.js +4 -1
  1473. package/components/Spacer/index.js.map +1 -1
  1474. package/components/StatusDot/StatusDot.js +27 -0
  1475. package/{StatusDot.js.map → components/StatusDot/StatusDot.js.map} +1 -1
  1476. package/components/StatusDot/index.js +7 -1
  1477. package/components/StatusDot/index.js.map +1 -1
  1478. package/components/StatusDot/styles.module.scss +1 -0
  1479. package/components/Step/Step.js +30 -0
  1480. package/components/Step/Step.js.map +1 -0
  1481. package/components/Step/index.js +4 -1
  1482. package/components/Step/index.js.map +1 -1
  1483. package/components/StepButtons/StepButtons.js +21 -0
  1484. package/components/StepButtons/StepButtons.js.map +1 -0
  1485. package/components/StepButtons/index.js +6 -1
  1486. package/components/StepButtons/index.js.map +1 -1
  1487. package/components/Stepper/Dot.js +16 -0
  1488. package/components/Stepper/Dot.js.map +1 -0
  1489. package/components/Stepper/DotList.js +7 -0
  1490. package/components/Stepper/DotList.js.map +1 -0
  1491. package/components/Stepper/Stepper.js +35 -0
  1492. package/components/Stepper/Stepper.js.map +1 -0
  1493. package/components/Stepper/index.js +4 -1
  1494. package/components/Stepper/index.js.map +1 -1
  1495. package/components/Stepper/utils.js +16 -0
  1496. package/components/Stepper/utils.js.map +1 -0
  1497. package/components/Table/Table.js +57 -0
  1498. package/components/Table/Table.js.map +1 -0
  1499. package/components/Table/TableBody/TableBody.js +13 -0
  1500. package/components/Table/TableBody/TableBody.js.map +1 -0
  1501. package/components/Table/TableBody/index.js +6 -1
  1502. package/components/Table/TableBody/index.js.map +1 -1
  1503. package/components/Table/TableCell/TableCell.js +30 -0
  1504. package/components/Table/TableCell/TableCell.js.map +1 -0
  1505. package/components/Table/TableCell/index.js +7 -1
  1506. package/components/Table/TableCell/index.js.map +1 -1
  1507. package/components/Table/TableExpandedRow/TableExpandedRow.js +33 -0
  1508. package/components/Table/TableExpandedRow/TableExpandedRow.js.map +1 -0
  1509. package/components/Table/TableExpandedRow/index.js +6 -1
  1510. package/components/Table/TableExpandedRow/index.js.map +1 -1
  1511. package/components/Table/TableExpanderCell/TableExpanderCell.js +35 -0
  1512. package/components/Table/TableExpanderCell/TableExpanderCell.js.map +1 -0
  1513. package/components/Table/TableExpanderCell/TableExpanderCellMobile.js +25 -0
  1514. package/components/Table/TableExpanderCell/TableExpanderCellMobile.js.map +1 -0
  1515. package/components/Table/TableExpanderCell/index.js +6 -1
  1516. package/components/Table/TableExpanderCell/index.js.map +1 -1
  1517. package/components/Table/TableHead/TableHead.js +24 -0
  1518. package/components/Table/TableHead/TableHead.js.map +1 -0
  1519. package/components/Table/TableHead/index.js +7 -1
  1520. package/components/Table/TableHead/index.js.map +1 -1
  1521. package/components/Table/TableHeadCell/TableHeadCell.js +36 -0
  1522. package/components/Table/TableHeadCell/TableHeadCell.js.map +1 -0
  1523. package/components/Table/TableHeadCell/index.js +7 -1
  1524. package/components/Table/TableHeadCell/index.js.map +1 -1
  1525. package/components/Table/TableRow/TableRow.js +40 -0
  1526. package/components/Table/TableRow/TableRow.js.map +1 -0
  1527. package/components/Table/TableRow/index.js +6 -1
  1528. package/components/Table/TableRow/index.js.map +1 -1
  1529. package/components/Table/index.js +27 -1
  1530. package/components/Table/index.js.map +1 -1
  1531. package/components/Table/utils.js +37 -0
  1532. package/components/Table/utils.js.map +1 -0
  1533. package/components/Tag/Tag.d.ts +3 -2
  1534. package/components/Tag/Tag.d.ts.map +1 -1
  1535. package/components/Tag/Tag.js +48 -0
  1536. package/components/Tag/Tag.js.map +1 -0
  1537. package/components/Tag/index.js +8 -1
  1538. package/components/Tag/index.js.map +1 -1
  1539. package/components/TagList/TagList.js +8 -0
  1540. package/components/TagList/TagList.js.map +1 -0
  1541. package/components/TagList/index.js +4 -1
  1542. package/components/TagList/index.js.map +1 -1
  1543. package/components/Textarea/Textarea.js +101 -0
  1544. package/components/Textarea/Textarea.js.map +1 -0
  1545. package/components/Textarea/index.js +4 -1
  1546. package/components/Textarea/index.js.map +1 -1
  1547. package/components/Textarea/styles.module.scss.d.ts +1 -1
  1548. package/components/Tile/Tile.js +54 -0
  1549. package/components/Tile/Tile.js.map +1 -0
  1550. package/components/Tile/index.js +6 -1
  1551. package/components/Tile/index.js.map +1 -1
  1552. package/components/Title/Title.js +25 -0
  1553. package/components/Title/Title.js.map +1 -0
  1554. package/components/Title/index.js +7 -1
  1555. package/components/Title/index.js.map +1 -1
  1556. package/components/Tooltip/Tooltip.js +55 -0
  1557. package/components/Tooltip/Tooltip.js.map +1 -0
  1558. package/components/Tooltip/TooltipWord/TooltipWord.js +28 -0
  1559. package/components/Tooltip/TooltipWord/TooltipWord.js.map +1 -0
  1560. package/components/Tooltip/TooltipWord/index.js +4 -1
  1561. package/components/Tooltip/TooltipWord/index.js.map +1 -1
  1562. package/components/Tooltip/index.js +7 -1
  1563. package/components/Tooltip/index.js.map +1 -1
  1564. package/components/TooltipExample/TooltipExample.js +8 -0
  1565. package/components/TooltipExample/TooltipExample.js.map +1 -0
  1566. package/components/TooltipExample/index.js +4 -1
  1567. package/components/TooltipExample/index.js.map +1 -1
  1568. package/components/Trigger/HelpSign.d.ts +1 -1
  1569. package/components/Trigger/HelpSign.d.ts.map +1 -1
  1570. package/components/Trigger/HelpSign.js +7 -0
  1571. package/components/Trigger/HelpSign.js.map +1 -0
  1572. package/components/Trigger/InfoSignStroke.d.ts +1 -1
  1573. package/components/Trigger/InfoSignStroke.d.ts.map +1 -1
  1574. package/components/Trigger/Trigger.js +74 -0
  1575. package/components/Trigger/Trigger.js.map +1 -0
  1576. package/components/Trigger/index.js +4 -1
  1577. package/components/Trigger/index.js.map +1 -1
  1578. package/components/Validation/Validation.d.ts +3 -3
  1579. package/components/Validation/Validation.d.ts.map +1 -1
  1580. package/components/Validation/Validation.js +18 -0
  1581. package/components/Validation/Validation.js.map +1 -0
  1582. package/components/Validation/index.js +6 -1
  1583. package/components/Validation/index.js.map +1 -1
  1584. package/constants.d.ts +3 -3
  1585. package/constants.d.ts.map +1 -1
  1586. package/constants.js +12 -1
  1587. package/constants.js.map +1 -1
  1588. package/hoc/withBreakpoint/index.js +5 -1
  1589. package/hoc/withBreakpoint/index.js.map +1 -1
  1590. package/hoc/withBreakpoint/withBreakpoint.js +12 -1
  1591. package/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
  1592. package/hooks/useBreakpoint.js +44 -1
  1593. package/hooks/useBreakpoint.js.map +1 -1
  1594. package/hooks/useDelayedState.js +14 -1
  1595. package/hooks/useDelayedState.js.map +1 -1
  1596. package/hooks/useElementList.js +17 -1
  1597. package/hooks/useElementList.js.map +1 -1
  1598. package/hooks/useEventListenerState.js +10 -1
  1599. package/hooks/useEventListenerState.js.map +1 -1
  1600. package/hooks/useExpand.js +13 -1
  1601. package/hooks/useExpand.js.map +1 -1
  1602. package/hooks/useFocusToggle.js +18 -1
  1603. package/hooks/useFocusToggle.js.map +1 -1
  1604. package/hooks/useFocusTrap.js +22 -1
  1605. package/hooks/useFocusTrap.js.map +1 -1
  1606. package/hooks/useFocusableElements.js +19 -1
  1607. package/hooks/useFocusableElements.js.map +1 -1
  1608. package/hooks/useHover.js +8 -1
  1609. package/hooks/useHover.js.map +1 -1
  1610. package/hooks/useIcons.d.ts +4 -2
  1611. package/hooks/useIcons.d.ts.map +1 -1
  1612. package/hooks/useIcons.js +15 -1
  1613. package/hooks/useIcons.js.map +1 -1
  1614. package/hooks/useIntersectionObserver.js +12 -1
  1615. package/hooks/useIntersectionObserver.js.map +1 -1
  1616. package/hooks/useInterval.js +12 -1
  1617. package/hooks/useInterval.js.map +1 -1
  1618. package/hooks/useIsVisible.js +11 -1
  1619. package/hooks/useIsVisible.js.map +1 -1
  1620. package/hooks/useKeyboardEvent.js +20 -1
  1621. package/hooks/useKeyboardEvent.js.map +1 -1
  1622. package/hooks/useLayoutEvent.js +15 -1
  1623. package/hooks/useLayoutEvent.js.map +1 -1
  1624. package/hooks/useOutsideEvent.js +12 -1
  1625. package/hooks/useOutsideEvent.js.map +1 -1
  1626. package/hooks/usePrevious.js +10 -1
  1627. package/hooks/usePrevious.js.map +1 -1
  1628. package/hooks/usePseudoClasses.js +15 -1
  1629. package/hooks/usePseudoClasses.js.map +1 -1
  1630. package/hooks/useResizeObserver.js +17 -1
  1631. package/hooks/useResizeObserver.js.map +1 -1
  1632. package/hooks/useSize.js +27 -1
  1633. package/hooks/useSize.js.map +1 -1
  1634. package/hooks/useSticky.js +17 -1
  1635. package/hooks/useSticky.js.map +1 -1
  1636. package/hooks/useToggle.js +15 -1
  1637. package/hooks/useToggle.js.map +1 -1
  1638. package/hooks/useUuid.js +9 -1
  1639. package/hooks/useUuid.js.map +1 -1
  1640. package/index.js +47 -1
  1641. package/index.js.map +1 -1
  1642. package/package.json +1 -1
  1643. package/scss/_input.scss +1 -1
  1644. package/theme/currys/color.js +6 -1
  1645. package/theme/currys/color.js.map +1 -1
  1646. package/theme/currys/index.js +8 -1
  1647. package/theme/currys/index.js.map +1 -1
  1648. package/theme/currys/spacing.js +37 -1
  1649. package/theme/currys/spacing.js.map +1 -1
  1650. package/theme/grid.js +24 -1
  1651. package/theme/grid.js.map +1 -1
  1652. package/theme/index.js +13 -1
  1653. package/theme/index.js.map +1 -1
  1654. package/theme/palette.js +79 -1
  1655. package/theme/palette.js.map +1 -1
  1656. package/theme/spacers.js +20 -1
  1657. package/theme/spacers.js.map +1 -1
  1658. package/utils/accessibility.js +18 -1
  1659. package/utils/accessibility.js.map +1 -1
  1660. package/utils/component.js +6 -1
  1661. package/utils/component.js.map +1 -1
  1662. package/utils/debounce.js +13 -1
  1663. package/utils/debounce.js.map +1 -1
  1664. package/utils/device.js +4 -1
  1665. package/utils/device.js.map +1 -1
  1666. package/utils/environment.js +11 -1
  1667. package/utils/environment.js.map +1 -1
  1668. package/utils/focus.js +10 -1
  1669. package/utils/focus.js.map +1 -1
  1670. package/utils/loremtext.js +7 -1
  1671. package/utils/loremtext.js.map +1 -1
  1672. package/utils/mobile.js +10 -1
  1673. package/utils/mobile.js.map +1 -1
  1674. package/utils/refs.js +9 -1
  1675. package/utils/refs.js.map +1 -1
  1676. package/utils/uuid.js +9 -1
  1677. package/utils/uuid.js.map +1 -1
  1678. package/utils/viewport.js +7 -1
  1679. package/utils/viewport.js.map +1 -1
  1680. package/AnchorLink.js +0 -2
  1681. package/AnchorLink.js.map +0 -1
  1682. package/Avatar.js +0 -2
  1683. package/Avatar.js.map +0 -1
  1684. package/Badge.js +0 -2
  1685. package/Badge.js.map +0 -1
  1686. package/Button.js +0 -2
  1687. package/Button.js.map +0 -1
  1688. package/Checkbox.js +0 -2
  1689. package/Checkbox.js.map +0 -1
  1690. package/Close.js +0 -2
  1691. package/Close.js.map +0 -1
  1692. package/ErrorWrapper.js +0 -2
  1693. package/ErrorWrapper.js.map +0 -1
  1694. package/FormGroup.js +0 -2
  1695. package/FormGroup.js.map +0 -1
  1696. package/FormLayout.js +0 -2
  1697. package/FormLayout.js.map +0 -1
  1698. package/HelpBubble.js +0 -2
  1699. package/HelpBubble.js.map +0 -1
  1700. package/HighlightBox.js +0 -2
  1701. package/HighlightBox.js.map +0 -1
  1702. package/HorizontalScroll.js +0 -2
  1703. package/HorizontalScroll.js.map +0 -1
  1704. package/Input.js +0 -2
  1705. package/Input.js.map +0 -1
  1706. package/Label.js +0 -2
  1707. package/Label.js.map +0 -1
  1708. package/LinkList.js +0 -2
  1709. package/LinkList.js.map +0 -1
  1710. package/ListHeader.js +0 -2
  1711. package/ListHeader.js.map +0 -1
  1712. package/ListHeaderText.js +0 -2
  1713. package/ListHeaderText.js.map +0 -1
  1714. package/MaxCharacters.js +0 -2
  1715. package/MaxCharacters.js.map +0 -1
  1716. package/Modal.js +0 -2
  1717. package/Modal.js.map +0 -1
  1718. package/Panel.js +0 -2
  1719. package/Panel.js.map +0 -1
  1720. package/PopOver.js +0 -2
  1721. package/PopOver.js.map +0 -1
  1722. package/RadioButton.js +0 -2
  1723. package/RadioButton.js.map +0 -1
  1724. package/Select.js +0 -2
  1725. package/Select.js.map +0 -1
  1726. package/Spacer.js +0 -2
  1727. package/Spacer.js.map +0 -1
  1728. package/StatusDot.js +0 -2
  1729. package/StepButtons.js +0 -2
  1730. package/StepButtons.js.map +0 -1
  1731. package/Table.js +0 -2
  1732. package/Table.js.map +0 -1
  1733. package/TableBody.js +0 -2
  1734. package/TableBody.js.map +0 -1
  1735. package/TableCell.js +0 -2
  1736. package/TableCell.js.map +0 -1
  1737. package/TableExpandedRow.js +0 -2
  1738. package/TableExpandedRow.js.map +0 -1
  1739. package/TableExpanderCell.js +0 -2
  1740. package/TableExpanderCell.js.map +0 -1
  1741. package/TableHead.js +0 -2
  1742. package/TableHead.js.map +0 -1
  1743. package/TableHeadCell.js +0 -2
  1744. package/TableHeadCell.js.map +0 -1
  1745. package/TableRow.js +0 -2
  1746. package/TableRow.js.map +0 -1
  1747. package/Textarea.js +0 -2
  1748. package/Textarea.js.map +0 -1
  1749. package/Title.js +0 -2
  1750. package/Title.js.map +0 -1
  1751. package/Tooltip.js +0 -2
  1752. package/Tooltip.js.map +0 -1
  1753. package/TooltipWord.js +0 -2
  1754. package/TooltipWord.js.map +0 -1
  1755. package/Trigger.js +0 -2
  1756. package/Trigger.js.map +0 -1
  1757. package/Validation.js +0 -2
  1758. package/Validation.js.map +0 -1
  1759. package/components/AnchorLink/componentdata.json +0 -1
  1760. package/components/Avatar/componentdata.json +0 -1
  1761. package/components/Badge/componentdata.json +0 -1
  1762. package/components/Button/componentdata.json +0 -1
  1763. package/components/ButtonWithModal/componentdata.json +0 -1
  1764. package/components/Checkbox/componentdata.json +0 -1
  1765. package/components/Close/componentdata.json +0 -1
  1766. package/components/DictionaryTrigger/componentdata.json +0 -1
  1767. package/components/Dropdown/componentdata.json +0 -1
  1768. package/components/Duolist/componentdata.json +0 -1
  1769. package/components/ErrorWrapper/componentdata.json +0 -1
  1770. package/components/Expander/componentdata.json +0 -1
  1771. package/components/ExpanderHierarchy/componentdata.json +0 -1
  1772. package/components/ExpanderList/componentdata.json +0 -1
  1773. package/components/FormExample/componentdata.json +0 -1
  1774. package/components/FormGroup/componentdata.json +0 -1
  1775. package/components/FormLayout/componentdata.json +0 -1
  1776. package/components/GridExample/componentdata.json +0 -1
  1777. package/components/HelpBubble/componentdata.json +0 -1
  1778. package/components/HelpBubbleExample/componentdata.json +0 -1
  1779. package/components/HelpPanel/componentdata.json +0 -1
  1780. package/components/HelpQuestion/componentdata.json +0 -1
  1781. package/components/HighlightBox/componentdata.json +0 -1
  1782. package/components/HorizontalScroll/componentdata.json +0 -1
  1783. package/components/Icons/Icon.d.ts.map +0 -1
  1784. package/components/Icons/Icon.js +0 -2
  1785. package/components/Icons/Icon.js.map +0 -1
  1786. package/components/Icons/IconWall.d.ts +0 -8
  1787. package/components/Icons/IconWall.d.ts.map +0 -1
  1788. package/components/Icons/IconWall.js +0 -2
  1789. package/components/Icons/IconWall.js.map +0 -1
  1790. package/components/Icons/componentdata.json +0 -1
  1791. package/components/Icons/index.d.ts.map +0 -1
  1792. package/components/Icons/index.js +0 -2
  1793. package/components/Input/componentdata.json +0 -1
  1794. package/components/Label/componentdata.json +0 -1
  1795. package/components/LinkList/componentdata.json +0 -1
  1796. package/components/List/componentdata.json +0 -1
  1797. package/components/ListHeader/ListHeaderText/componentdata.json +0 -1
  1798. package/components/ListHeader/componentdata.json +0 -1
  1799. package/components/Loader/componentdata.json +0 -1
  1800. package/components/Logo/componentdata.json +0 -1
  1801. package/components/MaxCharacters/componentdata.json +0 -1
  1802. package/components/Modal/componentdata.json +0 -1
  1803. package/components/NotificationPanel/DetailButton/componentdata.json +0 -1
  1804. package/components/NotificationPanel/componentdata.json +0 -1
  1805. package/components/Panel/componentdata.json +0 -1
  1806. package/components/PanelList/componentdata.json +0 -1
  1807. package/components/PopMenu/componentdata.json +0 -1
  1808. package/components/PopOver/componentdata.json +0 -1
  1809. package/components/RadioButton/componentdata.json +0 -1
  1810. package/components/Select/componentdata.json +0 -1
  1811. package/components/ServiceMessage/componentdata.json +0 -1
  1812. package/components/Slider/componentdata.json +0 -1
  1813. package/components/Spacer/componentdata.json +0 -1
  1814. package/components/StatusDot/componentdata.json +0 -1
  1815. package/components/Step/componentdata.json +0 -1
  1816. package/components/StepButtons/componentdata.json +0 -1
  1817. package/components/Stepper/componentdata.json +0 -1
  1818. package/components/Table/TableBody/componentdata.json +0 -1
  1819. package/components/Table/TableCell/componentdata.json +0 -1
  1820. package/components/Table/TableExpandedRow/componentdata.json +0 -1
  1821. package/components/Table/TableExpanderCell/componentdata.json +0 -1
  1822. package/components/Table/TableHead/componentdata.json +0 -1
  1823. package/components/Table/TableHeadCell/componentdata.json +0 -1
  1824. package/components/Table/TableRow/componentdata.json +0 -1
  1825. package/components/Table/componentdata.json +0 -1
  1826. package/components/Tag/componentdata.json +0 -1
  1827. package/components/TagList/componentdata.json +0 -1
  1828. package/components/Textarea/componentdata.json +0 -1
  1829. package/components/Tile/componentdata.json +0 -1
  1830. package/components/Title/componentdata.json +0 -1
  1831. package/components/Tooltip/TooltipWord/componentdata.json +0 -1
  1832. package/components/Tooltip/componentdata.json +0 -1
  1833. package/components/TooltipExample/componentdata.json +0 -1
  1834. package/components/Trigger/componentdata.json +0 -1
  1835. package/components/Validation/componentdata.json +0 -1
  1836. package/uuid.js +0 -2
  1837. package/uuid.js.map +0 -1
  1838. /package/components/{Icons → Icon}/index.d.ts +0 -0
package/HelpBubble.js DELETED
@@ -1,2 +0,0 @@
1
- import e from"react";import c from"classnames";import{AnalyticsId as L}from"./constants.js";import{A}from"./AnchorLink.js";import{C as w}from"./Close.js";import{P as I,a as P}from"./PopOver.js";import t from"./components/HelpBubble/styles.module.scss";const M=I,b=e.forwardRef((m,p)=>{const{children:u,className:f="",noCloseButton:n,linkText:r="Mer hjelp",linkUrl:o,linkTarget:d,onLinkClick:a,onClose:h,closeAriaLabel:k,showBubble:s,helpBubbleId:B,variant:C,controllerRef:_,role:i,testId:E}=m,l=i==="tooltip";if(!s&&!l)return null;const N=c(t.helpbubble,f),v=c(t.helpbubble__content,{[t["helpbubble__content--close"]]:!n&&!l}),H=()=>{if(!l){if(a&&r)return e.createElement("button",{className:t.helpbubble__link,onClick:a,type:"button"},r);if(o&&r)return e.createElement(A,{href:o,target:d},r)}},y=()=>{if(!(n||l))return e.createElement("div",{className:t.helpbubble__close},e.createElement(w,{small:!0,onClick:h,ariaLabel:k}))};return e.createElement(P,{id:B,variant:C,controllerRef:_,role:i,ref:p,show:l&&s,testId:E},e.createElement("div",{className:N,"data-analyticsid":L.HelpBubble},y(),e.createElement("div",{className:v},u,H())))});b.displayName="HelpBubble";const U=b;export{U as H,M as a};
2
- //# sourceMappingURL=HelpBubble.js.map
package/HelpBubble.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"HelpBubble.js","sources":["../src/components/HelpBubble/HelpBubble.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport AnchorLink, { AnchorLinkTargets } from '../AnchorLink';\nimport Close from '../Close';\nimport PopOver, { PopOverProps, PopOverVariant } from '../PopOver';\n\nimport styles from './styles.module.scss';\n\nexport const HelpBubbleVariant = PopOverVariant;\n\ntype HelpBubbleRole = 'tooltip';\n\nexport interface HelpBubbleProps extends Pick<PopOverProps, 'children' | 'variant' | 'controllerRef' | 'role'> {\n /** Id of the HelpBubble */\n helpBubbleId?: string;\n /** Content shown inside HelpBubble. Note that if role=\"tooltip\", you must not include interactive/focusable elements. */\n children: React.ReactNode;\n /** Ref for the element the HelpBubble is placed upon */\n controllerRef: React.RefObject<HTMLElement | SVGSVGElement>;\n /** Adds custom classes to the element. */\n className?: string;\n /** Determines the placement of the helpbubble. Default: automatic positioning. */\n variant?: keyof typeof HelpBubbleVariant;\n /** Show the bubble. Default: false. */\n showBubble?: boolean;\n /** Hide the close button in the bubble. Close button is never rendered if role=\"tooltip\". */\n noCloseButton?: boolean;\n /** Visible text on the link. Link is never rendered if role=\"tooltip\". */\n linkText?: string;\n /** Url the link leads to */\n linkUrl?: string;\n /** Sets the target type of the link. _blank adds an arrow icon at the end of the link */\n linkTarget?: AnchorLinkTargets;\n /** Function is called when link is clicked */\n onLinkClick?: () => void;\n /** Function is called when user clicks the button */\n onClose?: () => void;\n /** aria-label to be passed onto Close */\n closeAriaLabel?: string;\n /** Sets role of the HelpBubble element. If set to \"tooltip\", */\n role?: HelpBubbleRole;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst HelpBubble = React.forwardRef<HTMLDivElement | SVGSVGElement, HelpBubbleProps>((props, ref) => {\n const {\n children,\n className = '',\n noCloseButton,\n linkText = 'Mer hjelp',\n linkUrl,\n linkTarget,\n onLinkClick,\n onClose,\n closeAriaLabel,\n // Props passed on to PopOver\n showBubble,\n helpBubbleId,\n variant,\n controllerRef,\n role,\n testId,\n } = props;\n\n const isTooltip = role === 'tooltip';\n\n if (!showBubble && !isTooltip) {\n return null;\n }\n\n const helpBubbleClasses = classNames(styles.helpbubble, className);\n\n const contentClasses = classNames(styles.helpbubble__content, {\n [styles['helpbubble__content--close']]: !noCloseButton && !isTooltip,\n });\n\n const renderLink = (): JSX.Element | undefined => {\n // Det er ikke tillatt med interaktive/fokuserbare elementer i role=\"tooltip\"\n if (isTooltip) {\n return;\n }\n if (onLinkClick && linkText) {\n return (\n <button className={styles.helpbubble__link} onClick={onLinkClick} type=\"button\">\n {linkText}\n </button>\n );\n } else if (linkUrl && linkText) {\n return (\n <AnchorLink href={linkUrl} target={linkTarget}>\n {linkText}\n </AnchorLink>\n );\n }\n };\n\n const renderCloseButton = (): JSX.Element | undefined => {\n if (noCloseButton || isTooltip) {\n return;\n }\n return (\n <div className={styles.helpbubble__close}>\n <Close small onClick={onClose} ariaLabel={closeAriaLabel} />\n </div>\n );\n };\n\n return (\n <PopOver\n id={helpBubbleId}\n variant={variant}\n controllerRef={controllerRef}\n role={role}\n ref={ref}\n show={isTooltip && showBubble}\n testId={testId}\n >\n <div className={helpBubbleClasses} data-analyticsid={AnalyticsId.HelpBubble}>\n {renderCloseButton()}\n <div className={contentClasses}>\n {children}\n {renderLink()}\n </div>\n </div>\n </PopOver>\n );\n});\n\nHelpBubble.displayName = 'HelpBubble';\n\nexport default HelpBubble;\n"],"names":["HelpBubbleVariant","PopOverVariant","HelpBubble","React","props","ref","children","className","noCloseButton","linkText","linkUrl","linkTarget","onLinkClick","onClose","closeAriaLabel","showBubble","helpBubbleId","variant","controllerRef","role","testId","isTooltip","helpBubbleClasses","classNames","styles","contentClasses","renderLink","AnchorLink","renderCloseButton","Close","PopOver","AnalyticsId","HelpBubble$1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H,CACF,CAAA,CAGN,CAAC,EAEDxB,EAAW,YAAc,aAEzB,MAAA8B,EAAe9B"}
package/HighlightBox.js DELETED
@@ -1,2 +0,0 @@
1
- import e from"react";import l from"classnames";import"./theme/grid.js";import{useBreakpoint as C,Breakpoint as I}from"./hooks/useBreakpoint.js";import{AnalyticsId as p,IconSize as N}from"./constants.js";import{Icon as y}from"./components/Icons/Icon.js";import{T as B}from"./Title.js";import t from"./components/HighlightBox/styles.module.scss";var H=(i=>(i.medium="medium",i.large="large",i.fluid="fluid",i))(H||{});const u=({className:i,size:r,children:s})=>e.createElement("div",{className:i,"data-testid":"highlightbox-wrapper"},e.createElement("div",{className:t.highlightbox__row},e.createElement("div",{className:l(t.highlightbox__col,r==="medium"&&t["highlightbox__col--offset"])},s))),x=i=>{const{children:r,className:s}=i,a=l(t["highlightbox__content-wrapper"],s);return e.createElement("div",{className:a},e.createElement("div",{className:l(t.highlightbox__row)},r))},W=i=>{const{children:r,color:s="white",size:a="medium",testId:n,svgIcon:c,htmlMarkup:b="div",className:f,contentWrapperClassName:v,title:g,titleHtmlMarkup:k="h2"}=i,_=C(),o=l(t.highlightbox,t[`highlightbox--${s}`],t[`highlightbox--${a}`],c&&t["highlightbox--has-icon"],{container:a==="medium"||a==="large"},f),m=()=>{if(c){const w=a==="large"&&_&&_>=I.md?N.Medium:N.Small,E=e.createElement(B,{testId:"titleId",htmlMarkup:k,appearance:"title4"},g);return e.createElement(e.Fragment,null,e.createElement("div",{className:t.highlightbox__icon},e.createElement(y,{svgIcon:c,size:w}),g&&e.createElement("div",{className:t.mobile},E)),e.createElement("div",{className:t.highlightbox__content},g&&e.createElement("div",{className:t.desktop,"aria-hidden":"true"},E),r))}return r},h=b,d=l(t["highlightbox__content-wrapper"],v);return a==="medium"?e.createElement(u,{className:o,size:a},e.createElement(h,{className:d,"data-testid":n,"data-analyticsid":p.HighlightBox},m())):a==="large"&&c?e.createElement(u,{className:o,size:a},e.createElement(x,{className:d},e.createElement(h,{className:l(t.highlightbox__col,t["highlightbox__col--large-with-icon"]),"data-testid":n,"data-analyticsid":p.HighlightBox},m()))):a==="large"?e.createElement(u,{className:o,size:a},e.createElement(x,{className:d},e.createElement(h,{className:l(t.highlightbox__col,t["highlightbox__col--offset"]),"data-testid":n,"data-analyticsid":p.HighlightBox},m()))):a==="fluid"?e.createElement(h,{className:o,"data-testid":n},m()):null},j=W;export{j as H,H as a};
2
- //# sourceMappingURL=HighlightBox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HighlightBox.js","sources":["../src/components/HighlightBox/HighlightBox.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { useBreakpoint, Breakpoint } from '../..';\nimport { AnalyticsId } from '../../constants';\nimport { PaletteNames } from '../../theme/palette';\nimport Icon, { SvgIcon, IconSize } from '../Icons';\nimport Title, { TitleTags } from '../Title';\n\nimport styles from './styles.module.scss';\n\nexport type HighlightBoxColors = Extract<PaletteNames, 'white' | 'neutral' | 'blueberry' | 'cherry'>;\n\nexport enum HighlightBoxSize {\n medium = 'medium',\n large = 'large',\n fluid = 'fluid',\n}\n\nexport type HighlightBoxTags = Exclude<\n keyof HTMLElementTagNameMap,\n 'dir' | 'font' | 'frame' | 'frameset' | 'marquee' | 'applet' | 'basefont'\n>;\n\ninterface HighlightBoxProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** Changes the background color. Default: white */\n color?: HighlightBoxColors;\n /** Changes the size. Default: medium */\n size?: keyof typeof HighlightBoxSize;\n /** Adds an icon to the highlightbox. */\n svgIcon?: SvgIcon;\n /** Changes the underlying element. Default: div */\n htmlMarkup?: HighlightBoxTags;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the content-wrapper */\n contentWrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Element that is set after the icon-element in the DOM, often a title-element */\n title?: string;\n /** Markup props for title */\n titleHtmlMarkup?: TitleTags;\n}\n\ninterface WrapperProps {\n className: string;\n size?: keyof typeof HighlightBoxSize;\n}\n\nconst Wrapper: React.FC<WrapperProps> = ({ className, size, children }) => (\n <div className={className} data-testid={'highlightbox-wrapper'}>\n <div className={styles.highlightbox__row}>\n <div className={classNames(styles.highlightbox__col, size === HighlightBoxSize.medium && styles['highlightbox__col--offset'])}>\n {children}\n </div>\n </div>\n </div>\n);\n\ninterface ContentWrapperProps {\n children: React.ReactNode;\n className?: string;\n}\n\nconst ContentWrapper: React.FC<ContentWrapperProps> = props => {\n const { children, className } = props;\n const contentWrapperClasses = classNames(styles['highlightbox__content-wrapper'], className);\n\n return (\n <div className={contentWrapperClasses}>\n <div className={classNames(styles.highlightbox__row)}>{children}</div>\n </div>\n );\n};\n\nconst HighlightBox: React.FC<HighlightBoxProps> = props => {\n const {\n children,\n color = 'white',\n size = HighlightBoxSize.medium,\n testId,\n svgIcon,\n htmlMarkup = 'div',\n className,\n contentWrapperClassName,\n title,\n titleHtmlMarkup = 'h2',\n } = props;\n const breakpoint = useBreakpoint();\n\n const containerClassName = classNames(\n styles['highlightbox'],\n styles[`highlightbox--${color}`],\n styles[`highlightbox--${size}`],\n svgIcon && styles['highlightbox--has-icon'],\n { container: size === 'medium' || size === 'large' },\n className\n );\n\n const renderContent = () => {\n if (svgIcon) {\n const iconSize = size === HighlightBoxSize.large && breakpoint && breakpoint >= Breakpoint.md ? IconSize.Medium : IconSize.Small;\n\n const titleElement = (\n <Title testId=\"titleId\" htmlMarkup={titleHtmlMarkup} appearance=\"title4\">\n {title}\n </Title>\n );\n\n return (\n <>\n <div className={styles.highlightbox__icon}>\n <Icon svgIcon={svgIcon} size={iconSize} />\n {title && <div className={styles['mobile']}>{titleElement}</div>}\n </div>\n <div className={styles.highlightbox__content}>\n {title && (\n <div className={styles['desktop']} aria-hidden=\"true\">\n {titleElement}\n </div>\n )}\n {children}\n </div>\n </>\n );\n }\n\n return children;\n };\n\n const CustomTag = htmlMarkup;\n\n const contentWrapperClasses = classNames(styles['highlightbox__content-wrapper'], contentWrapperClassName);\n\n if (size === HighlightBoxSize.medium) {\n return (\n <Wrapper className={containerClassName} size={size}>\n <CustomTag className={contentWrapperClasses} data-testid={testId} data-analyticsid={AnalyticsId.HighlightBox}>\n {renderContent()}\n </CustomTag>\n </Wrapper>\n );\n }\n\n if (size === HighlightBoxSize.large && svgIcon) {\n return (\n <Wrapper className={containerClassName} size={size}>\n <ContentWrapper className={contentWrapperClasses}>\n <CustomTag\n className={classNames(styles.highlightbox__col, styles['highlightbox__col--large-with-icon'])}\n data-testid={testId}\n data-analyticsid={AnalyticsId.HighlightBox}\n >\n {renderContent()}\n </CustomTag>\n </ContentWrapper>\n </Wrapper>\n );\n }\n\n if (size === HighlightBoxSize.large) {\n return (\n <Wrapper className={containerClassName} size={size}>\n <ContentWrapper className={contentWrapperClasses}>\n <CustomTag\n className={classNames(styles.highlightbox__col, styles['highlightbox__col--offset'])}\n data-testid={testId}\n data-analyticsid={AnalyticsId.HighlightBox}\n >\n {renderContent()}\n </CustomTag>\n </ContentWrapper>\n </Wrapper>\n );\n }\n\n if (size === HighlightBoxSize.fluid) {\n return (\n <CustomTag className={containerClassName} data-testid={testId}>\n {renderContent()}\n </CustomTag>\n );\n }\n\n return null;\n};\n\nexport default HighlightBox;\n"],"names":["HighlightBoxSize","Wrapper","className","size","children","React","styles","classNames","ContentWrapper","props","contentWrapperClasses","HighlightBox","color","testId","svgIcon","htmlMarkup","contentWrapperClassName","title","titleHtmlMarkup","breakpoint","useBreakpoint","containerClassName","renderContent","iconSize","Breakpoint","IconSize","titleElement","Title","Icon","CustomTag","AnalyticsId","HighlightBox$1"],"mappings":"wVAcY,IAAAA,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,MAAQ,QAHEA,IAAAA,GAAA,CAAA,CAAA,EAuCZ,MAAMC,EAAkC,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,SAAAC,CAC1D,IAAAC,EAAA,cAAC,MAAI,CAAA,UAAAH,EAAsB,cAAa,sBA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A,MAAA,CAAI,UAAWC,EAAO,qBAAA,EACpBW,GACEZ,EAAA,cAAA,MAAA,CAAI,UAAWC,EAAO,QAAY,cAAY,QAC5CoB,CACH,EAEDtB,CACH,CACF,CAEJ,CAEO,OAAAA,CAAA,EAGHyB,EAAYd,EAEZL,EAAwBH,EAAWD,EAAO,+BAA+B,EAAGU,CAAuB,EAEzG,OAAIb,IAAS,yBAERF,EAAQ,CAAA,UAAWoB,EAAoB,KAAAlB,CAAA,kBACrC0B,EAAU,CAAA,UAAWnB,EAAuB,cAAaG,EAAQ,mBAAkBiB,EAAY,YAC7F,EAAAR,EACH,CAAA,CACF,EAIAnB,IAAS,SAA0BW,EAEnCT,EAAA,cAACJ,GAAQ,UAAWoB,EAAoB,KAAAlB,GACrCE,EAAA,cAAAG,EAAA,CAAe,UAAWE,CACzB,EAAAL,EAAA,cAACwB,EAAA,CACC,UAAWtB,EAAWD,EAAO,kBAAmBA,EAAO,oCAAoC,CAAC,EAC5F,cAAaO,EACb,mBAAkBiB,EAAY,YAAA,EAE7BR,EAAc,CAEnB,CAAA,CACF,EAIAnB,IAAS,QAETE,EAAA,cAACJ,GAAQ,UAAWoB,EAAoB,KAAAlB,GACrCE,EAAA,cAAAG,EAAA,CAAe,UAAWE,CACzB,EAAAL,EAAA,cAACwB,EAAA,CACC,UAAWtB,EAAWD,EAAO,kBAAmBA,EAAO,2BAA2B,CAAC,EACnF,cAAaO,EACb,mBAAkBiB,EAAY,YAAA,EAE7BR,EAAc,CAEnB,CAAA,CACF,EAIAnB,IAAS,wBAER0B,EAAU,CAAA,UAAWR,EAAoB,cAAaR,CAAA,EACpDS,GACH,EAIG,IACT,EAEAS,EAAepB"}
@@ -1,2 +0,0 @@
1
- import r,{useRef as l}from"react";import e from"classnames";import{useIsVisible as n}from"./hooks/useIsVisible.js";import{useSize as v}from"./hooks/useSize.js";import o from"./components/HorizontalScroll/styles.module.scss";const a="3px",p=({children:c,childWidth:m,testId:_})=>{const t=l(null),i=l(null),s=l(null),d=n(i,1,{root:t==null?void 0:t.current,rootMargin:a},!0),h=n(s,1,{root:t==null?void 0:t.current,rootMargin:a},!0),{width:f=0}=v(t)||{},z=m>f,u=e(o.horizontalscroll__viewport,z&&o["horizontalscroll__viewport--overflow"]);return r.createElement("div",{className:o.horizontalscroll,"data-testid":_},r.createElement("div",{className:u,ref:t,tabIndex:0},r.createElement("div",{className:e(o.horizontalscroll__indicator,o["horizontalscroll__indicator--left"],!d&&o["horizontalscroll__indicator--visible"])}),r.createElement("div",{className:e(o.horizontalscroll__indicator,o["horizontalscroll__indicator--right"],!h&&o["horizontalscroll__indicator--visible"])}),r.createElement("div",{ref:i}),c,r.createElement("div",{ref:s})))},w=p;export{w as H,p as a};
2
- //# sourceMappingURL=HorizontalScroll.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HorizontalScroll.js","sources":["../src/components/HorizontalScroll/HorizontalScroll.tsx"],"sourcesContent":["import React, { useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { useIsVisible } from '../../hooks/useIsVisible';\nimport { useSize } from '../../hooks/useSize';\n\nimport styles from './styles.module.scss';\n\n// Scrolle-indikator vises/skjules når det er x px igjen til venstre eller høyre side\nconst ROOT_MARGIN_OFFSET = '3px';\n\ninterface HorizontalScrollProps {\n /**\n * Bredden på elementet som potensielt vil scrolle horisontalt i px\n */\n childWidth: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const HorizontalScroll: React.FC<HorizontalScrollProps> = ({ children, childWidth, testId }) => {\n const viewportRef = useRef<HTMLDivElement>(null);\n const leftRef = useRef<HTMLDivElement>(null);\n const rightRef = useRef<HTMLDivElement>(null);\n const leftIsVisible = useIsVisible(leftRef, 1, { root: viewportRef?.current, rootMargin: ROOT_MARGIN_OFFSET }, true);\n const rightIsVisible = useIsVisible(rightRef, 1, { root: viewportRef?.current, rootMargin: ROOT_MARGIN_OFFSET }, true);\n const { width: viewPortWidth = 0 } = useSize(viewportRef) || {};\n\n const isOverflowing = childWidth > viewPortWidth;\n const viewportClasses = classNames(styles.horizontalscroll__viewport, isOverflowing && styles['horizontalscroll__viewport--overflow']);\n\n return (\n <div className={styles.horizontalscroll} data-testid={testId}>\n {/* viewport-diven må ta tabIndex for å løse et annet UU-problem, at div med overflow: scroll må kunne navigeres med keyboard. */}\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n <div className={viewportClasses} ref={viewportRef} tabIndex={0}>\n <div\n className={classNames(\n styles.horizontalscroll__indicator,\n styles['horizontalscroll__indicator--left'],\n !leftIsVisible && styles['horizontalscroll__indicator--visible']\n )}\n />\n <div\n className={classNames(\n styles.horizontalscroll__indicator,\n styles['horizontalscroll__indicator--right'],\n !rightIsVisible && styles['horizontalscroll__indicator--visible']\n )}\n />\n <div ref={leftRef} />\n {children}\n <div ref={rightRef} />\n </div>\n </div>\n );\n};\n\nexport default HorizontalScroll;\n"],"names":["ROOT_MARGIN_OFFSET","HorizontalScroll","children","childWidth","testId","viewportRef","useRef","leftRef","rightRef","leftIsVisible","useIsVisible","rightIsVisible","viewPortWidth","useSize","isOverflowing","viewportClasses","classNames","styles","React","HorizontalScroll$1"],"mappings":"gOAUA,MAAMA,EAAqB,MAWdC,EAAoD,CAAC,CAAE,SAAAC,EAAU,WAAAC,EAAY,OAAAC,KAAa,CAC/F,MAAAC,EAAcC,EAAuB,IAAI,EACzCC,EAAUD,EAAuB,IAAI,EACrCE,EAAWF,EAAuB,IAAI,EACtCG,EAAgBC,EAAaH,EAAS,EAAG,CAAE,KAAMF,GAAA,YAAAA,EAAa,QAAS,WAAYL,CAAmB,EAAG,EAAI,EAC7GW,EAAiBD,EAAaF,EAAU,EAAG,CAAE,KAAMH,GAAA,YAAAA,EAAa,QAAS,WAAYL,CAAmB,EAAG,EAAI,EAC/G,CAAE,MAAOY,EAAgB,GAAMC,EAAQR,CAAW,GAAK,GAEvDS,EAAgBX,EAAaS,EAC7BG,EAAkBC,EAAWC,EAAO,2BAA4BH,GAAiBG,EAAO,sCAAsC,CAAC,EAErI,OACGC,EAAA,cAAA,MAAA,CAAI,UAAWD,EAAO,iBAAkB,cAAab,GAGnDc,EAAA,cAAA,MAAA,CAAI,UAAWH,EAAiB,IAAKV,EAAa,SAAU,GAC3Da,EAAA,cAAC,MAAA,CACC,UAAWF,EACTC,EAAO,4BACPA,EAAO,mCAAmC,EAC1C,CAACR,GAAiBQ,EAAO,sCAAsC,CACjE,CAAA,CAEF,EAAAC,EAAA,cAAC,MAAA,CACC,UAAWF,EACTC,EAAO,4BACPA,EAAO,oCAAoC,EAC3C,CAACN,GAAkBM,EAAO,sCAAsC,CAClE,CAAA,CAAA,EAEFC,EAAA,cAAC,MAAI,CAAA,IAAKX,CAAS,CAAA,EAClBL,EACDgB,EAAA,cAAC,MAAI,CAAA,IAAKV,CAAU,CAAA,CACtB,CACF,CAEJ,EAEAW,EAAelB"}
package/Input.js DELETED
@@ -1,2 +0,0 @@
1
- import r,{useRef as $,useState as A}from"react";import x from"classnames";import{FormMode as s,FormVariant as he,IconSize as K,AnalyticsId as ge,AVERAGE_CHARACTER_WIDTH_PX as ve}from"./constants.js";import{useBreakpoint as Ce,Breakpoint as xe}from"./hooks/useBreakpoint.js";import{useUuid as ye}from"./hooks/useUuid.js";import{getColor as D}from"./theme/currys/color.js";import{E as Ee}from"./ErrorWrapper.js";import{Icon as _e}from"./components/Icons/Icon.js";import{a as ke}from"./Label.js";import{M as we}from"./MaxCharacters.js";import t from"./components/Input/styles.module.scss";var Ie=(e=>(e.text="text",e.number="number",e.email="email",e.password="password",e.search="search",e.tel="tel",e.url="url",e.date="date",e.time="time",e))(Ie||{});const Ne=(e,l,f)=>{const u=l?"1.5rem":"2rem",b=l?`${f}px`:"0px",d="4px";return`calc(${e*ve}px + ${u} + ${b} + ${d})`},F=r.forwardRef((e,l)=>{const{className:f,defaultValue:u,placeholder:b,type:d="text",name:M,transparent:z=!1,icon:i,iconRight:h,inputId:B,inputWrapperRef:P,mode:o=s.onwhite,baseIncrementValue:y,variant:U,label:H,error:O,errorText:E,testId:X,disabled:c,readOnly:q,autoComplete:G,afterInputChildren:L,rightOfInput:j,width:_,required:J,onChange:k,onKeyDown:w,autoFocus:Q,maxCharacters:m,maxText:Y,...Z}=e,T=Ce(),p=$(null),I=ye(B),[N,ee]=A(u||""),[te,ne]=A(void 0),g=$(!1),R=/^[0-9]$/,re=o===s.ondark,ae=o===s.onblueberry,oe=!!m&&N.toString().length>m,v=o===s.oninvalid||!!E||!!O||oe,C=U===he.bigform,ie=z&&o!==s.ondark&&!v,ce=x(t["input-wrapper"],f),se=x(t["input-container"],{[t["input-container--transparent"]]:ie,[t["input-container--on-blueberry"]]:ae,[t["input-container--on-dark"]]:re,[t["input-container--invalid"]]:v,[t["input-container--bigform"]]:C,[t["input-container--disabled"]]:c,[t["input-container--with-icon"]]:i}),le=x(t["input-container__input"],{[t["input-container__input--bigform"]]:C,[t["input-container__input--disabled"]]:c}),ue=c?D("neutral",500):D("black"),W=T===xe.xs||!C?K.XSmall:K.Small,S=()=>i!==void 0?r.createElement(_e,{className:t["input-container__input__icon"],color:ue,size:W,svgIcon:i}):null,de=n=>{if(p&&p.current&&i){const a=h?0:1;p.current.children[a].focus(),e.onClick&&e.onClick(n)}},me=n=>{const a=pe(n);k&&k(n),ee(a),ne(a)},pe=n=>{if(typeof y>"u"||d!=="number")return n.target.value;const a=Number(n.target.value);return!te&&!g.current&&(a===1||a===-1)&&(n.target.value=y+""),n.target.value},fe=n=>{R.test(n.key)&&(g.current=!0),w&&w(n)},be=n=>{R.test(n.key)&&(g.current=!1)},V=_?Ne(_,!!i,W):void 0;return r.createElement(Ee,{errorText:E},r.createElement("div",{"data-testid":X,"data-analyticsid":ge.Input,className:ce,ref:P},ke(H,I,o,c),r.createElement("div",{className:t["content-wrapper"]},r.createElement("div",{onClick:de,ref:p,className:se,style:{maxWidth:V}},!h&&S(),r.createElement("input",{onChange:me,onKeyDown:fe,onKeyUp:be,name:M,type:d,defaultValue:u,id:I,className:le,ref:l,"aria-labelledby":e["aria-labelledby"]??void 0,"aria-describedby":e["aria-describedby"]??void 0,"aria-invalid":!!v,disabled:c,placeholder:b,readOnly:q,autoComplete:G||"off",required:J,autoFocus:Q,...Z}),h&&S()),r.createElement("div",{className:t["content-wrapper__right-of-input"]},j)),m&&r.createElement(we,{maxCharacters:m,length:N.toString().length,maxText:Y,mode:o,maxWidth:V}),L))});F.displayName="Input";const Pe=F;export{Pe as I,Ie as a};
2
- //# sourceMappingURL=Input.js.map
package/Input.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Input.js","sources":["../src/components/Input/Input.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\n\nimport cn from 'classnames';\n\nimport { FormMode, FormVariant, AnalyticsId, AVERAGE_CHARACTER_WIDTH_PX } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon, { IconSize, SvgIcon } from '../Icons';\nimport { renderLabel } from '../Label';\nimport MaxCharacters from '../MaxCharacters/MaxCharacters';\n\nimport styles from './styles.module.scss';\n\nexport interface InputProps\n extends Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'disabled'\n | 'readOnly'\n | 'autoComplete'\n | 'name'\n | 'placeholder'\n | 'defaultValue'\n | 'required'\n | 'value'\n | 'min'\n | 'max'\n | 'aria-describedby'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onClick'\n | 'onChange'\n | 'onFocus'\n | 'onKeyDown'\n | 'autoFocus'\n > {\n /** The number at which the input field starts when you increment or decrement it */\n baseIncrementValue?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /** HMTL Input type */\n type?: keyof typeof InputTypes;\n /** input id */\n inputId?: string;\n /** Width of input field in characters (approximate) */\n width?: number;\n /** If true, the component will be transparent. */\n transparent?: boolean;\n /** Icon to be displayed next to the input field */\n icon?: SvgIcon;\n /** Places the icon to the right */\n iconRight?: boolean;\n /** Ref that is placed on the inputWrapper */\n inputWrapperRef?: React.RefObject<HTMLDivElement>;\n /** Changes the color profile of the input */\n mode?: keyof typeof FormMode;\n /** Changes the visuals of the input */\n variant?: keyof typeof FormVariant;\n /** Label of the input */\n label?: React.ReactNode;\n /** Activates Error style for the input */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Component shown after input */\n afterInputChildren?: React.ReactNode;\n /** Component shown to the right of input */\n rightOfInput?: React.ReactNode;\n /** max character limit in input */\n maxCharacters?: number;\n /** The text is displayed in the end of the text-counter */\n maxText?: string;\n}\n\nexport enum InputTypes {\n text = 'text',\n number = 'number',\n email = 'email',\n password = 'password',\n search = 'search',\n tel = 'tel',\n url = 'url',\n date = 'date',\n time = 'time',\n}\n\nconst getInputMaxWidth = (characters: number, hasIcon: boolean, iconSize: number): string => {\n const paddingWidth = hasIcon ? '1.5rem' : '2rem';\n const iconWidth = hasIcon ? `${iconSize}px` : '0px';\n const borderWidth = '4px';\n\n return `calc(${characters * AVERAGE_CHARACTER_WIDTH_PX}px + ${paddingWidth} + ${iconWidth} + ${borderWidth})`;\n};\n\nconst Input = React.forwardRef((props: InputProps, ref: React.Ref<HTMLInputElement>) => {\n const {\n className,\n defaultValue,\n placeholder,\n type = InputTypes.text,\n name,\n transparent = false,\n icon,\n iconRight,\n inputId,\n inputWrapperRef,\n mode = FormMode.onwhite,\n baseIncrementValue,\n variant,\n label,\n error,\n errorText,\n testId,\n disabled,\n readOnly,\n autoComplete,\n afterInputChildren,\n rightOfInput,\n width,\n required,\n onChange,\n onKeyDown,\n autoFocus,\n maxCharacters,\n maxText,\n ...rest\n } = props;\n const breakpoint = useBreakpoint();\n const inputContainerRef = useRef<HTMLDivElement>(null);\n const inputIdState = useUuid(inputId);\n const [input, setInput] = useState(defaultValue || '');\n const [prevValue, setPrevValue] = useState<string | number | undefined>(undefined);\n const numKeyPressed = useRef<boolean>(false);\n const numRegex = /^[0-9]$/;\n\n const onDark = mode === FormMode.ondark;\n const onBlueberry = mode === FormMode.onblueberry;\n const maxCharactersExceeded = !!maxCharacters && input.toString().length > maxCharacters;\n const onError = mode === FormMode.oninvalid || !!errorText || !!error || maxCharactersExceeded;\n const bigForm = variant === FormVariant.bigform;\n const isTransparent = transparent && mode !== FormMode.ondark && !onError;\n\n const inputWrapperClass = cn(styles['input-wrapper'], className);\n\n const inputContainer = cn(styles['input-container'], {\n [styles['input-container--transparent']]: isTransparent,\n [styles['input-container--on-blueberry']]: onBlueberry,\n [styles['input-container--on-dark']]: onDark,\n [styles['input-container--invalid']]: onError,\n [styles['input-container--bigform']]: bigForm,\n [styles['input-container--disabled']]: disabled,\n [styles['input-container--with-icon']]: icon,\n });\n\n const inputClass = cn(styles['input-container__input'], {\n [styles['input-container__input--bigform']]: bigForm,\n [styles['input-container__input--disabled']]: disabled,\n });\n\n const iconColor = disabled ? getColor('neutral', 500) : getColor('black');\n const iconSize = breakpoint === Breakpoint.xs || !bigForm ? IconSize.XSmall : IconSize.Small;\n\n const renderIcon = (): React.ReactNode => {\n return icon !== undefined ? (\n <Icon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} svgIcon={icon} />\n ) : null;\n };\n\n // eslint-disable-next-line\n const handleClick = (e: React.MouseEvent<any>): void => {\n if (inputContainerRef && inputContainerRef.current && icon) {\n const selectedChild = iconRight ? 0 : 1;\n const input = inputContainerRef.current.children[selectedChild] as HTMLInputElement;\n input.focus();\n\n props.onClick && props.onClick(e);\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n const newValue = getIncrementValue(e);\n\n if (onChange) {\n onChange(e);\n }\n\n setInput(newValue);\n setPrevValue(newValue);\n };\n\n // Hvis bruker endrer number value med 1 og det skal startes på en annen verdi enn 0\n const getIncrementValue = (e: React.ChangeEvent<HTMLInputElement>): string => {\n if (typeof baseIncrementValue === 'undefined' || type !== 'number') return e.target.value;\n\n const valueAsNumber = Number(e.target.value);\n\n if (!prevValue && !numKeyPressed.current && (valueAsNumber === 1 || valueAsNumber === -1)) {\n e.target.value = baseIncrementValue + '';\n }\n\n return e.target.value;\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = true;\n }\n onKeyDown && onKeyDown(e);\n };\n\n const handleKeyUp = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = false;\n }\n };\n\n const maxWidth = width ? getInputMaxWidth(width, !!icon, iconSize) : undefined;\n\n return (\n <ErrorWrapper errorText={errorText}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Input} className={inputWrapperClass} ref={inputWrapperRef}>\n {renderLabel(label, inputIdState, mode as FormMode, disabled)}\n {/* input-elementet tillater keyboard-interaksjon */}\n <div className={styles['content-wrapper']}>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div onClick={handleClick} ref={inputContainerRef} className={inputContainer} style={{ maxWidth }}>\n {!iconRight && renderIcon()}\n <input\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n name={name}\n type={type}\n defaultValue={defaultValue}\n id={inputIdState}\n className={inputClass}\n ref={ref}\n aria-labelledby={props['aria-labelledby'] ?? undefined}\n aria-describedby={props['aria-describedby'] ?? undefined}\n aria-invalid={!!onError}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n autoComplete={autoComplete || 'off'}\n required={required}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n {...rest}\n />\n {iconRight && renderIcon()}\n </div>\n <div className={styles['content-wrapper__right-of-input']}>{rightOfInput}</div>\n </div>\n {maxCharacters && (\n <MaxCharacters maxCharacters={maxCharacters} length={input.toString().length} maxText={maxText} mode={mode} maxWidth={maxWidth} />\n )}\n {afterInputChildren}\n </div>\n </ErrorWrapper>\n );\n});\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"names":["InputTypes","getInputMaxWidth","characters","hasIcon","iconSize","paddingWidth","iconWidth","borderWidth","AVERAGE_CHARACTER_WIDTH_PX","Input","React","props","ref","className","defaultValue","placeholder","type","name","transparent","icon","iconRight","inputId","inputWrapperRef","mode","FormMode","baseIncrementValue","variant","label","error","errorText","testId","disabled","readOnly","autoComplete","afterInputChildren","rightOfInput","width","required","onChange","onKeyDown","autoFocus","maxCharacters","maxText","rest","breakpoint","useBreakpoint","inputContainerRef","useRef","inputIdState","useUuid","input","setInput","useState","prevValue","setPrevValue","numKeyPressed","numRegex","onDark","onBlueberry","maxCharactersExceeded","onError","bigForm","FormVariant","isTransparent","inputWrapperClass","cn","styles","inputContainer","inputClass","iconColor","getColor","Breakpoint","IconSize","renderIcon","Icon","handleClick","e","selectedChild","handleChange","newValue","getIncrementValue","valueAsNumber","handleKeyDown","handleKeyUp","maxWidth","ErrorWrapper","AnalyticsId","renderLabel","MaxCharacters","Input$1"],"mappings":"0kBA6EY,IAAAA,IAAAA,IACVA,EAAA,KAAO,OACPA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,KAAO,OACPA,EAAA,KAAO,OATGA,IAAAA,IAAA,CAAA,CAAA,EAYZ,MAAMC,GAAmB,CAACC,EAAoBC,EAAkBC,IAA6B,CACrF,MAAAC,EAAeF,EAAU,SAAW,OACpCG,EAAYH,EAAU,GAAGC,CAAQ,KAAO,MACxCG,EAAc,MAEb,MAAA,QAAQL,EAAaM,EAA0B,QAAQH,CAAY,MAAMC,CAAS,MAAMC,CAAW,GAC5G,EAEME,EAAQC,EAAM,WAAW,CAACC,EAAmBC,IAAqC,CAChF,KAAA,CACJ,UAAAC,EACA,aAAAC,EACA,YAAAC,EACA,KAAAC,EAAO,OACP,KAAAC,EACA,YAAAC,EAAc,GACd,KAAAC,EACA,U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,CAAQ,EAAI,OAErE,uBACGiF,GAAa,CAAA,UAAAxD,CAAA,kBACX,MAAI,CAAA,cAAaC,EAAQ,mBAAkBwD,GAAY,MAAO,UAAWtB,GAAmB,IAAK1C,GAC/FiE,GAAY5D,EAAOqB,EAAczB,EAAkBQ,CAAQ,EAE3DrB,EAAA,cAAA,MAAA,CAAI,UAAWwD,EAAO,iBAAiB,GAErCxD,EAAA,cAAA,MAAA,CAAI,QAASiE,GAAa,IAAK7B,EAAmB,UAAWqB,GAAgB,MAAO,CAAE,SAAAiB,IACpF,CAAChE,GAAaqD,EACf,EAAA/D,EAAA,cAAC,QAAA,CACC,SAAUoE,GACV,UAAWI,GACX,QAASC,GACT,KAAAlE,EACA,KAAAD,EACA,aAAAF,EACA,GAAIkC,EACJ,UAAWoB,GACX,IAAAxD,EACA,kBAAiBD,EAAM,iBAAiB,GAAK,OAC7C,mBAAkBA,EAAM,kBAAkB,GAAK,OAC/C,eAAc,CAAC,CAACiD,EAChB,SAAA7B,EACA,YAAAhB,EACA,SAAAiB,EACA,aAAcC,GAAgB,MAC9B,SAAAI,EAEA,UAAAG,EACC,GAAGG,CAAA,CAEL,EAAAvB,GAAaqD,EAAW,CAC3B,EACA/D,EAAA,cAAC,MAAI,CAAA,UAAWwD,EAAO,iCAAiC,CAAI,EAAA/B,CAAa,CAC3E,EACCM,GACC/B,EAAA,cAAC8E,GAAc,CAAA,cAAA/C,EAA8B,OAAQS,EAAM,SAAS,EAAE,OAAQ,QAAAR,EAAkB,KAAAnB,EAAY,SAAA6D,CAAoB,CAAA,EAEjIlD,CACH,CACF,CAEJ,CAAC,EAEDzB,EAAM,YAAc,QAEpB,MAAAgF,GAAehF"}
package/Label.js DELETED
@@ -1,2 +0,0 @@
1
- import e from"react";import y from"classnames";import{AnalyticsId as S,FormMode as f}from"./constants.js";import{S as h}from"./Spacer.js";import r from"./components/Label/styles.module.scss";import{isComponent as u}from"./utils/component.js";import{S as R}from"./StatusDot.js";const z=({className:t,id:a,mode:n,sublabelTexts:l,testId:s})=>{const o=p=>l&&l.map((i,E)=>{const b=y(r.label,r["label--sublabel"],{[r["label--semibold"]]:i.type==="semibold",[r["label--on-dark"]]:n===f.ondark});return p===i.hideFromScreenReader&&e.createElement("span",{className:b,key:E},i.text)}),m=o(),c=o(!0);return e.createElement(e.Fragment,null,e.createElement(h,{size:"3xs"}),m&&e.createElement("div",{className:t,id:a,"data-testid":s,"data-analyticsid":S.Sublabel},m),c&&e.createElement("div",{className:t,"data-testid":s},c))},$=t=>{let a="";return u(t,d)&&t.props.labelTexts.forEach(n=>{a+=n.hideFromScreenReader?"":n.text}),a},j=(t,a,n,l)=>e.createElement(e.Fragment,null,t&&u(t,d)?e.cloneElement(t,{htmlFor:a,mode:n,disabled:l}):typeof t=="string"&&e.createElement(d,{labelTexts:[{text:t,type:"semibold"}],htmlFor:a,mode:n,disabled:l})),q=(t,a,n,l,s,o,m,c,p)=>e.createElement(e.Fragment,null,t&&u(t,d)?e.cloneElement(t,{htmlFor:n,mode:l,children:a,disabled:s,labelClassName:y(o,t.props.labelClassName),labelTextClassName:m,sublabelWrapperClassName:c,sublabel:p?void 0:t.props.sublabel,statusDot:p?void 0:t.props.statusDot}):typeof t=="string"&&e.createElement(d,{labelTexts:[{text:t}],htmlFor:n,mode:l,disabled:s,labelClassName:o,labelTextClassName:m,sublabelWrapperClassName:c},a)),d=({afterLabelChildren:t,children:a,className:n,disabled:l,htmlFor:s,labelClassName:o,labelTextClassName:m,labelId:c,labelTexts:p,mode:i=f.onwhite,statusDot:E,sublabel:b,sublabelWrapperClassName:g,testId:k})=>{const v=a&&typeof a<"u",L=y(r["label-wrapper"],{[r["label-wrapper--no-bottom-margin"]]:v,[r["label-wrapper--after-label-children"]]:t},n),w=()=>p.map((F,N)=>{const x=y(r.label,{[r["label--semibold"]]:F.type==="semibold",[r["label--on-dark"]]:i===f.ondark,[r["label--disabled"]]:l},m);return e.createElement("span",{"aria-hidden":F.hideFromScreenReader,className:x,key:N},F.text)});return e.createElement("div",{className:L},e.createElement("div",{className:r["label-wrapper__inner"]},e.createElement("label",{className:o,id:c,htmlFor:s,"data-testid":k,"data-analyticsid":S.Label},e.createElement("span",{className:r["label-content-wrapper"]},a,e.createElement("span",null,w()))),e.createElement("div",{className:g},b&&u(b,z)&&e.cloneElement(b,{mode:i}),E&&u(E,R)&&e.createElement(e.Fragment,null,e.createElement(h,{size:"3xs"}),e.cloneElement(E,{mode:i===f.ondark?"ondark":"onwhite"})))),t&&e.createElement("div",{className:r["after-label-children"]},t))},B=d;export{B as L,z as S,j as a,$ as g,q as r};
2
- //# sourceMappingURL=Label.js.map
package/Label.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Label.js","sources":["../src/components/Label/SubLabel.tsx","../src/components/Label/Label.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { LabelText } from './Label';\nimport { AnalyticsId, FormMode } from '../../constants';\nimport Spacer from '../Spacer';\n\nimport styles from './styles.module.scss';\n\nexport interface SublabelProps {\n /** Adds custom classes to the element. */\n className?: string;\n /** id that is placed on the wrapper */\n id: string;\n /** Array of sublabel strings. Can be of type semibold or normal */\n mode?: FormMode;\n /** Array of sublabel strings. Can be of type semibold or normal */\n sublabelTexts?: LabelText[];\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const Sublabel: React.FC<SublabelProps> = ({ className, id, mode, sublabelTexts, testId }) => {\n const mapSublabels = (hideFromScreenReader?: boolean): React.ReactNode => {\n return (\n sublabelTexts &&\n sublabelTexts.map((sublabelText, index) => {\n const labelClasses = cn(styles.label, styles['label--sublabel'], {\n [styles['label--semibold']]: sublabelText.type === 'semibold',\n [styles['label--on-dark']]: mode === FormMode.ondark,\n });\n return (\n hideFromScreenReader === sublabelText.hideFromScreenReader && (\n <span className={labelClasses} key={index}>\n {sublabelText.text}\n </span>\n )\n );\n })\n );\n };\n\n const subLabels = mapSublabels();\n const ariaHiddenSublabels = mapSublabels(true);\n\n return (\n <>\n <Spacer size={'3xs'} />\n {subLabels && (\n <div className={className} id={id} data-testid={testId} data-analyticsid={AnalyticsId.Sublabel}>\n {subLabels}\n </div>\n )}\n {ariaHiddenSublabels && (\n <div className={className} data-testid={testId}>\n {ariaHiddenSublabels}\n </div>\n )}\n </>\n );\n};\n","import React, { FunctionComponent } from 'react';\n\nimport cn from 'classnames';\n\nimport { Sublabel, SublabelProps } from './SubLabel';\nimport { AnalyticsId, FormMode } from '../../constants';\nimport { isComponent } from '../../utils/component';\nimport Spacer from '../Spacer';\nimport StatusDot, { StatusDotProps } from '../StatusDot';\n\nimport styles from './styles.module.scss';\n\nexport type LabelText = {\n hideFromScreenReader?: boolean;\n text: string;\n type?: 'semibold' | 'normal';\n};\n\nexport interface LabelProps extends Pick<React.InputHTMLAttributes<HTMLLabelElement>, 'disabled'> {\n /** Component shown after label - discourage use of this */\n afterLabelChildren?: React.ReactNode;\n /** Adds custom classes to the element. */\n children?: React.ReactNode;\n /** Adds custom classes to the label tag. */\n labelClassName?: string;\n /** Adds custom classes to the label text. */\n labelTextClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Id that is put on the \"for\" attribute of the label */\n htmlFor?: string;\n /** Id som plasseres på <label/> */\n labelId?: string;\n /** Array of main label strings. Can be of type semibold or normal */\n labelTexts: LabelText[];\n /** Array of sublabel strings. Can be of type semibold or normal */\n mode?: keyof typeof FormMode;\n /** StatusDot placed underneath the last sublabel */\n statusDot?: React.ReactNode;\n /** Sublabel component */\n sublabel?: React.ReactNode;\n /** Adds custom classes to the div wrapping the sublabels. */\n sublabelWrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const getLabelText = (label: React.ReactNode): string => {\n let allLabelText = '';\n\n if (isComponent<LabelProps>(label, Label)) {\n label.props.labelTexts.forEach(labelText => {\n allLabelText += !labelText.hideFromScreenReader ? labelText.text : '';\n });\n }\n\n return allLabelText;\n};\n\nexport const renderLabel = (label: React.ReactNode, inputId: string, mode: FormMode, disabled?: boolean): React.ReactNode => {\n return (\n <>\n {label && isComponent<LabelProps>(label, Label)\n ? React.cloneElement(label, {\n htmlFor: inputId,\n mode: mode,\n disabled,\n })\n : typeof label === 'string' && (\n <Label labelTexts={[{ text: label, type: 'semibold' }]} htmlFor={inputId} mode={mode} disabled={disabled} />\n )}\n </>\n );\n};\n\nexport const renderLabelAsParent = (\n label: React.ReactNode,\n children: React.ReactNode,\n inputId: string,\n mode: FormMode,\n disabled?: boolean,\n labelClassName?: string,\n labelTextClassName?: string,\n sublabelWrapperClassName?: string,\n bigform?: boolean\n): React.ReactNode => {\n return (\n <>\n {label && isComponent<LabelProps>(label, Label)\n ? React.cloneElement(label, {\n htmlFor: inputId,\n mode: mode,\n children: children,\n disabled,\n labelClassName: cn(labelClassName, label.props.labelClassName),\n labelTextClassName: labelTextClassName,\n sublabelWrapperClassName: sublabelWrapperClassName,\n sublabel: bigform ? undefined : label.props.sublabel,\n statusDot: bigform ? undefined : label.props.statusDot,\n })\n : typeof label === 'string' && (\n <Label\n labelTexts={[{ text: label }]}\n htmlFor={inputId}\n mode={mode}\n disabled={disabled}\n labelClassName={labelClassName}\n labelTextClassName={labelTextClassName}\n sublabelWrapperClassName={sublabelWrapperClassName}\n >\n {children}\n </Label>\n )}\n </>\n );\n};\n\nconst Label: FunctionComponent<LabelProps> = ({\n afterLabelChildren,\n children,\n className,\n disabled,\n htmlFor,\n labelClassName,\n labelTextClassName,\n labelId,\n labelTexts,\n mode = FormMode.onwhite,\n statusDot,\n sublabel,\n sublabelWrapperClassName,\n testId,\n}) => {\n const hasChildren = children && typeof children !== 'undefined';\n const labelWrapperClasses = cn(\n styles['label-wrapper'],\n { [styles['label-wrapper--no-bottom-margin']]: hasChildren, [styles['label-wrapper--after-label-children']]: afterLabelChildren },\n className\n );\n\n const mapLabels = (): React.ReactNode => {\n return labelTexts.map((labelText, index) => {\n const labelClasses = cn(\n styles.label,\n {\n [styles['label--semibold']]: labelText.type === 'semibold',\n [styles['label--on-dark']]: mode === FormMode.ondark,\n [styles['label--disabled']]: disabled,\n },\n labelTextClassName\n );\n return (\n <span aria-hidden={labelText.hideFromScreenReader} className={labelClasses} key={index}>\n {labelText.text}\n </span>\n );\n });\n };\n\n return (\n <div className={labelWrapperClasses}>\n <div className={styles['label-wrapper__inner']}>\n <label className={labelClassName} id={labelId} htmlFor={htmlFor} data-testid={testId} data-analyticsid={AnalyticsId.Label}>\n <span className={styles['label-content-wrapper']}>\n {children}\n <span>{mapLabels()}</span>\n </span>\n </label>\n <div className={sublabelWrapperClassName}>\n {sublabel &&\n isComponent<SublabelProps>(sublabel, Sublabel) &&\n React.cloneElement(sublabel, {\n mode: mode as FormMode,\n })}\n {statusDot && isComponent<StatusDotProps>(statusDot, StatusDot) && (\n <>\n <Spacer size={'3xs'} />\n {React.cloneElement(statusDot, {\n mode: mode === FormMode.ondark ? 'ondark' : 'onwhite',\n })}\n </>\n )}\n </div>\n </div>\n {afterLabelChildren && <div className={styles['after-label-children']}>{afterLabelChildren}</div>}\n </div>\n );\n};\n\nexport default Label;\n"],"names":["Sublabel","className","id","mode","sublabelTexts","testId","mapSublabels","hideFromScreenReader","sublabelText","index","labelClasses","cn","styles","FormMode","React","subLabels","ariaHiddenSublabels","Spacer","AnalyticsId","getLabelText","label","allLabelText","isComponent","Label","labelText","renderLabel","inputId","disabled","renderLabelAsParent","children","labelClassName","labelTextClassName","sublabelWrapperClassName","bigform","afterLabelChildren","htmlFor","labelId","labelTexts","statusDot","sublabel","hasChildren","labelWrapperClasses","mapLabels","StatusDot","Label$1"],"mappings":"qRAuBa,MAAAA,EAAoC,CAAC,CAAE,UAAAC,EAAW,GAAAC,EAAI,KAAAC,EAAM,cAAAC,EAAe,OAAAC,KAAa,CAC7F,MAAAC,EAAgBC,GAElBH,GACAA,EAAc,IAAI,CAACI,EAAcC,IAAU,CACzC,MAAMC,EAAeC,EAAGC,EAAO,MAAOA,EAAO,iBAAiB,EAAG,CAC/D,CAACA,EAAO,iBAAiB,CAAC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2B,CAAA,kBACb,MAAI,CAAA,UAAW7B,EAAO,sBAAsB,CAAA,kBAC1C,QAAM,CAAA,UAAWkB,EAAgB,GAAIM,EAAS,QAAAD,EAAkB,cAAa9B,EAAQ,mBAAkBa,EAAY,KAClH,EAAAJ,EAAA,cAAC,QAAK,UAAWF,EAAO,uBAAuB,CAC5C,EAAAiB,kBACA,OAAM,KAAAa,EAAA,CAAY,CACrB,CACF,kBACC,MAAI,CAAA,UAAWV,GACbO,GACCjB,EAA2BiB,EAAUvC,CAAQ,GAC7Cc,EAAM,aAAayB,EAAU,CAC3B,KAAApC,CAAA,CACD,EACFmC,GAAahB,EAA4BgB,EAAWK,CAAS,GAE1D7B,EAAA,cAAAA,EAAA,SAAA,KAAAA,EAAA,cAACG,GAAO,KAAM,KAAA,CAAO,EACpBH,EAAM,aAAawB,EAAW,CAC7B,KAAMnC,IAASU,EAAS,OAAS,SAAW,SAC7C,CAAA,CACH,CAEJ,CACF,EACCqB,GAAuBpB,EAAA,cAAA,MAAA,CAAI,UAAWF,EAAO,sBAAsB,CAAA,EAAIsB,CAAmB,CAC7F,CAEJ,EAEAU,EAAerB"}
package/LinkList.js DELETED
@@ -1,2 +0,0 @@
1
- import e from"react";import L from"classnames";import{AnalyticsId as b}from"./constants.js";import{useHover as w}from"./hooks/useHover.js";import y from"./components/Icons/ChevronRight.js";import{r as R}from"./ListHeader.js";import t from"./components/LinkList/styles.module.scss";const p=e.forwardRef((u,l)=>{const{children:s,className:o="",color:c="neutral",icon:r,size:i="medium",chevron:a=!1,linkRef:m,testId:d,target:n,variant:f,htmlMarkup:k="a",..._}=u,{hoverRef:h,isHovered:v}=w(m),C=L(t["link-list__list-item"],{[t["link-list__list-item--line"]]:f==="line",[t["link-list__list-item--outline"]]:f==="outline"}),N=L(t["link-list__anchor"],t["link-list__anchor--"+c],{[t["link-list__anchor--fill"]]:f==="fill",[t["link-list__anchor--"+i]]:i,[t["link-list__anchor--button"]]:k==="button"},o);return e.createElement("li",{className:C,ref:l,"data-testid":d,"data-analyticsid":b.Link},k==="a"&&e.createElement("a",{className:N,ref:h,rel:n==="_blank"?"noopener noreferrer":void 0,target:n,..._},R(s,"span",v,i,a?y:void 0,r)),k==="button"&&e.createElement("button",{className:N,ref:h,type:"button",..._},R(s,"span",v,i,a?y:void 0,r)))}),E=e.forwardRef(function(l,s){const{children:o,className:c="",chevron:r=!1,size:i="medium",color:a,testId:m,variant:d="line"}=l;return e.createElement("ul",{ref:s,className:L(t["link-list"],c),"data-testid":m,"data-analyticsid":b.LinkList},e.Children.map(o,n=>{if(n.type===p)return e.cloneElement(n,{color:a,size:i,chevron:r,variant:d})}))});E.Link=p;p.displayName="LinkList.Link";const M=E;export{M as L,E as a};
2
- //# sourceMappingURL=LinkList.js.map
package/LinkList.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"LinkList.js","sources":["../src/components/LinkList/LinkList.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { useHover } from '../../hooks/useHover';\nimport { PaletteNames } from '../../theme/palette';\nimport ChevronRight from '../Icons/ChevronRight';\nimport { ListHeaderType, renderListHeader } from '../ListHeader/ListHeader';\n\nimport LinkListStyles from './styles.module.scss';\n\nexport type LinkListSize = 'small' | 'medium' | 'large';\n\nexport type LinkAnchorTargets = '_self' | '_blank' | '_parent';\n\nexport type LinkListColors = PaletteNames;\nexport type LinkListVariant = 'line' | 'outline' | 'fill';\n\nexport interface LinkType extends React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLLIElement>> {\n ListHeader?: ListHeaderType;\n}\n\nexport type LinkTags = 'button' | 'a';\nexport interface CompoundComponent extends React.ForwardRefExoticComponent<LinkListProps & React.RefAttributes<HTMLUListElement>> {\n Link: LinkType;\n}\n\nexport interface LinkListProps {\n /** Items in the LinkList */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the link list background color on hover. */\n color?: LinkListColors;\n /** Toggles chevron icon on or off. */\n chevron?: boolean;\n /** @deprecated Skal fases ut - Brukes ikke lenger. */\n bottomBorder?: boolean;\n /** @deprecated Skal fases ut - Brukes ikke lenger. */\n topBorder?: boolean;\n /** Changes size of the LinkList. */\n size?: LinkListSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets visual priority */\n variant?: LinkListVariant;\n}\n\ntype Modify<T, R> = Omit<T, keyof R> & R;\n\nexport type LinkProps = Modify<\n React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>,\n {\n children: React.ReactNode;\n chevron?: boolean;\n className?: string;\n icon?: React.ReactElement;\n href?: string;\n target?: LinkAnchorTargets;\n /** HTML markup for link. Default: a */\n htmlMarkup?: LinkTags;\n /**\n * Ref for lenke/knapp\n */\n linkRef?: React.RefObject<HTMLButtonElement | HTMLAnchorElement>;\n /** Sets the data-testid attribute. */\n testId?: string;\n }\n> &\n Pick<LinkListProps, 'color' | 'size' | 'variant'>;\n\nconst Link: LinkType = React.forwardRef((props: LinkProps, ref: React.Ref<HTMLLIElement>) => {\n const {\n children,\n className = '',\n color = 'neutral',\n icon,\n size = 'medium',\n chevron = false,\n linkRef,\n testId,\n target,\n variant,\n htmlMarkup = 'a',\n ...restProps\n } = props;\n const { hoverRef, isHovered } = useHover<HTMLButtonElement | HTMLAnchorElement>(linkRef);\n\n const liClasses = cn(LinkListStyles['link-list__list-item'], {\n [LinkListStyles['link-list__list-item--line']]: variant === 'line',\n [LinkListStyles['link-list__list-item--outline']]: variant === 'outline',\n });\n const linkClasses = cn(\n LinkListStyles['link-list__anchor'],\n LinkListStyles['link-list__anchor--' + color],\n\n {\n [LinkListStyles['link-list__anchor--fill']]: variant === 'fill',\n [LinkListStyles['link-list__anchor--' + size]]: size,\n [LinkListStyles['link-list__anchor--button']]: htmlMarkup === 'button',\n },\n className\n );\n return (\n <li className={liClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Link}>\n {htmlMarkup === 'a' && (\n <a\n className={linkClasses}\n ref={hoverRef as React.RefObject<HTMLAnchorElement>}\n rel={target === '_blank' ? 'noopener noreferrer' : undefined}\n target={target}\n {...restProps}\n >\n {renderListHeader(children, 'span', isHovered, size, chevron ? ChevronRight : undefined, icon)}\n </a>\n )}\n {htmlMarkup === 'button' && (\n <button className={linkClasses} ref={hoverRef as React.RefObject<HTMLButtonElement>} type=\"button\" {...restProps}>\n {renderListHeader(children, 'span', isHovered, size, chevron ? ChevronRight : undefined, icon)}\n </button>\n )}\n </li>\n );\n});\n\nexport const LinkList = React.forwardRef(function LinkListForwardedRef(props: LinkListProps, ref: React.Ref<HTMLUListElement>) {\n const { children, className = '', chevron = false, size = 'medium', color, testId, variant = 'line' } = props;\n return (\n <ul ref={ref} className={cn(LinkListStyles['link-list'], className)} data-testid={testId} data-analyticsid={AnalyticsId.LinkList}>\n {React.Children.map(children, (child: React.ReactNode | React.ReactElement<LinkProps>) => {\n if ((child as React.ReactElement<LinkProps>).type === Link) {\n return React.cloneElement(child as React.ReactElement<LinkProps>, { color, size, chevron, variant });\n }\n })}\n </ul>\n );\n}) as CompoundComponent;\n\nLinkList.Link = Link;\nLink.displayName = 'LinkList.Link';\n\nexport default LinkList;\n"],"names":["Link","React","props","ref","children","className","color","icon","size","chevron","linkRef","testId","target","variant","htmlMarkup","restProps","hoverRef","isHovered","useHover","liClasses","cn","LinkListStyles","linkClasses","AnalyticsId","renderListHeader","ChevronRight","LinkList","child","LinkList$1"],"mappings":"yRAwEA,MAAMA,EAAiBC,EAAM,WAAW,CAACC,EAAkBC,IAAkC,CACrF,KAAA,CACJ,SAAAC,EACA,UAAAC,EAAY,GACZ,MAAAC,EAAQ,UACR,KAAAC,EACA,KAAAC,EAAO,SACP,QAAAC,EAAU,GACV,QAAAC,EACA,OAAAC,EACA,OAAAC,EACA,QAAAC,EACA,WAAAC,EAAa,IACb,GAAGC,CACD,EAAAb,EACE,CAAE,SAAAc,EAAU,UAAAC,CAAU,EAAIC,EAAgDR,CAAO,EAEjFS,EAAYC,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AA2D,CACnF,GAAAA,EAAwC,OAAS3B,EAC7C,OAAAC,EAAM,aAAa0B,EAAwC,CAAE,MAAArB,EAAO,KAAAE,EAAM,QAAAC,EAAS,QAAAI,EAAS,CAEtG,CAAA,CACH,CAEJ,CAAC,EAEDa,EAAS,KAAO1B,EAChBA,EAAK,YAAc,gBAEnB,MAAA4B,EAAeF"}
package/ListHeader.js DELETED
@@ -1,2 +0,0 @@
1
- import n from"react";import h from"classnames";import{L as A}from"./ListHeaderText.js";import{useBreakpoint as k,Breakpoint as B}from"./hooks/useBreakpoint.js";import{isComponent as u,isComponentWithChildren as b}from"./utils/component.js";import{A as R,a as p}from"./Avatar.js";import{B as w}from"./Badge.js";import{Icon as X}from"./components/Icons/Icon.js";import{IconSize as C}from"./constants.js";import t from"./components/ListHeader/styles.module.scss";const P=(l,f,c,m,o,i)=>{if(u(l,E))return n.cloneElement(l,{chevronIcon:o,icon:i,isHovered:c,size:m});if(l)return n.createElement(E,{titleHtmlMarkup:f,chevronIcon:o,icon:i,isHovered:c,size:m},l)},N=(l,f=!1)=>{var d,v,_,s;let c,m;const o=[],i=[],a=[];n.Children.forEach(l,e=>{e===null||typeof e>"u"||(u(e,R)?c=e:u(e,A)?o.push(e):u(e,w)?m=e:typeof e=="string"?i.push(e):a.push(e))});const g=c!==void 0||o.length>0||m!==void 0&&i.length>0,r=a.length===0||b(a[0])&&typeof((v=(d=a[0])==null?void 0:d.props)==null?void 0:v.children)>"u";if(f||g||r)return{avatarChild:c,listHeaderTextChildren:o,badgeChild:m,stringChildren:i,remainingChildren:a};if(b(a[0]))return N((s=(_=a[0])==null?void 0:_.props)==null?void 0:s.children,!0)},E=n.forwardRef((l,f)=>{const{className:c="",titleHtmlMarkup:m="h2",chevronIcon:o,children:i,icon:a,isHovered:g,size:r,testId:d}=l,v=k(),_=r!=="small"&&!!(o||a),s=typeof i=="string",e=N(i),H=(e==null?void 0:e.avatarChild)||(e==null?void 0:e.listHeaderTextChildren)&&e.listHeaderTextChildren.length>0||(e==null?void 0:e.remainingChildren)&&(e==null?void 0:e.remainingChildren.length)>0,x=h(t["list-header"],{[t["list-header--for-element-content"]]:!s,[t["list-header--top-align-content"]]:H},c),L=h(t["list-header__badge"],{[t["list-header__badge--for-string-content"]]:s,[t["list-header__badge--right"]]:!s,[t["list-header__badge--"+r]]:!s&&r}),S=h(t["list-header__chevron"],{[t["list-header__chevron--for-string-content"]]:s,[t["list-header__chevron--"+r]]:!s&&r}),y=h(t["list-header__content"],{[t["list-header__content--string"]]:s,[t["list-header__content--element"]]:!s,[t["list-header__content--spacing"]]:!(e!=null&&e.avatarChild)&&!a}),I=h(t["list-header__icon"],{[t["list-header__icon--for-string-content"]]:s,[t["list-header__icon--for-element-content"]]:!s,[t["list-header__icon--for-element-content--"+r]]:!s&&r}),T=h(t["list-header__avatar"],{[t["list-header__avatar--for-string-content"]]:s,[t["list-header__avatar--for-element-content"]]:!s,[t["list-header__avatar--for-element-content--"+r]]:!s&&r}),z=m;return n.createElement("span",{"data-testid":d,className:x},_&&a&&n.createElement("span",{className:I},n.cloneElement(a,{size:v===B.xs?C.XSmall:C.Small,isHovered:g})),r!=="small"&&(e==null?void 0:e.avatarChild)&&n.createElement("span",{className:T},n.cloneElement(e.avatarChild,{size:p.xsmall})),n.createElement("span",{className:y},e==null?void 0:e.listHeaderTextChildren,!!(e!=null&&e.stringChildren.length)&&n.createElement(z,{className:t["list-header__title"]},e.stringChildren),e==null?void 0:e.remainingChildren),(e==null?void 0:e.badgeChild)&&n.createElement("span",{className:L},e.badgeChild),_&&o&&n.createElement("span",{className:S},n.createElement(X,{svgIcon:o,isHovered:g,size:C.XSmall})))});E.displayName="ListHeader";export{E as L,N as m,P as r};
2
- //# sourceMappingURL=ListHeader.js.map
package/ListHeader.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListHeader.js","sources":["../src/components/ListHeader/ListHeader.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport ListHeaderText, { ListHeaderTextProps, ListHeaderTextType } from './ListHeaderText/ListHeaderText';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { isComponent, isComponentWithChildren } from '../../utils/component';\nimport Avatar, { AvatarProps, AvatarSize, AvatarType } from '../Avatar';\nimport Badge, { BadgeProps, BadgeType } from '../Badge';\nimport Icon, { IconSize, SvgIcon } from '../Icons';\nimport { TitleTags } from '../Title';\n\nimport styles from './styles.module.scss';\n\nexport type ListHeaderSize = 'small' | 'medium' | 'large';\n\nexport interface ListHeaderType extends React.ForwardRefExoticComponent<ListHeaderProps & React.RefAttributes<HTMLLIElement>> {\n Avatar?: AvatarType;\n Badge?: BadgeType;\n ListHeaderText?: ListHeaderTextType;\n}\n\nexport const renderListHeader = (\n element: React.ReactNode,\n titleHtmlMarkup: TitleTags,\n isHovered: boolean,\n size: ListHeaderSize,\n chevronIcon?: SvgIcon,\n icon?: React.ReactElement\n): JSX.Element | undefined => {\n if (isComponent<ListHeaderProps>(element, ListHeader)) {\n return React.cloneElement(element, {\n chevronIcon,\n icon,\n isHovered,\n size,\n });\n }\n if (element) {\n return (\n <ListHeader titleHtmlMarkup={titleHtmlMarkup} chevronIcon={chevronIcon} icon={icon} isHovered={isHovered} size={size}>\n {element}\n </ListHeader>\n );\n }\n};\n\nexport interface ListHeaderProps {\n /** Adds custom classes to the ListHeader element. */\n className?: string;\n /** Chevron to render inside of the ListHeader */\n chevronIcon?: SvgIcon;\n /** Children to be rendered inside of ListHeader */\n children: React.ReactNode;\n /** Changes the underlying element of the title. Default: h2*/\n titleHtmlMarkup?: TitleTags;\n /** icon to be rendered inside of ListHeader */\n icon?: React.ReactElement;\n /** whether or not the parent is hovered */\n isHovered?: boolean;\n /** Changes size of the ListHeader. */\n size?: ListHeaderSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\ninterface ListHeaderChildren {\n avatarChild?: React.ReactElement<AvatarProps>;\n listHeaderTextChildren: React.ReactElement<ListHeaderTextProps>[];\n badgeChild?: React.ReactElement<BadgeProps>;\n elementChild?: React.ReactElement;\n stringChildren: string[];\n remainingChildren: React.ReactNode[];\n}\n\ntype ChildrenMapper = (children: React.ReactNode, isJsxChild?: boolean) => ListHeaderChildren | undefined;\n\nexport const mapChildren: ChildrenMapper = (children, isJsxChild = false) => {\n let avatarChild: React.ReactElement<AvatarProps> | undefined;\n let badgeChild: React.ReactElement<BadgeProps> | undefined;\n const listHeaderTextChildren: React.ReactElement<ListHeaderTextProps>[] = [];\n const stringChildren: string[] = [];\n const remainingChildren: React.ReactNode[] = [];\n\n React.Children.forEach(children, child => {\n if (child === null || typeof child === 'undefined') return;\n if (isComponent<AvatarProps>(child, Avatar)) {\n avatarChild = child;\n } else if (isComponent<ListHeaderTextProps>(child, ListHeaderText)) {\n listHeaderTextChildren.push(child);\n } else if (isComponent<BadgeProps>(child, Badge)) {\n badgeChild = child;\n } else if (typeof child === 'string') {\n stringChildren.push(child);\n } else {\n remainingChildren.push(child);\n }\n });\n\n // Dette og recursive mapChildren under(gjøres en gang) er for å passe på at jsx children også sjekkes for Avatar og liknende innhold.\n // Slik opprettholder vi stylingen i tilfeller hvor vertikaler har wrappet elementer i en parent span eller div.\n const hasSpecialChildren =\n avatarChild !== undefined || listHeaderTextChildren.length > 0 || (badgeChild !== undefined && stringChildren.length > 0);\n const noRemainingRecursiveChildren =\n remainingChildren.length === 0 ||\n (isComponentWithChildren(remainingChildren[0]) && typeof remainingChildren[0]?.props?.children === 'undefined');\n\n if (isJsxChild || hasSpecialChildren || noRemainingRecursiveChildren) {\n return { avatarChild, listHeaderTextChildren, badgeChild, stringChildren, remainingChildren };\n }\n\n if (isComponentWithChildren(remainingChildren[0])) {\n return mapChildren(remainingChildren[0]?.props?.children, true);\n }\n};\n\nexport const ListHeader: ListHeaderType = React.forwardRef((props: ListHeaderProps, ref: React.Ref<HTMLLIElement>) => {\n const { className = '', titleHtmlMarkup = 'h2', chevronIcon, children, icon, isHovered, size, testId } = props;\n const breakpoint = useBreakpoint();\n const showChevronAndIcon = size !== 'small' && !!(chevronIcon || icon);\n const contentIsString = typeof children === 'string';\n const mappedChildren = mapChildren(children);\n const topAlignContent =\n mappedChildren?.avatarChild ||\n (mappedChildren?.listHeaderTextChildren && mappedChildren.listHeaderTextChildren.length > 0) ||\n (mappedChildren?.remainingChildren && mappedChildren?.remainingChildren.length > 0);\n\n const listLabelClasses = cn(\n styles['list-header'],\n {\n [styles['list-header--for-element-content']]: !contentIsString,\n [styles['list-header--top-align-content']]: topAlignContent,\n },\n className\n );\n const badgeClasses = cn(styles['list-header__badge'], {\n [styles['list-header__badge--for-string-content']]: contentIsString,\n [styles['list-header__badge--right']]: !contentIsString,\n [styles['list-header__badge--' + size]]: !contentIsString && size,\n });\n const chevronClasses = cn(styles['list-header__chevron'], {\n [styles['list-header__chevron--for-string-content']]: contentIsString,\n [styles['list-header__chevron--' + size]]: !contentIsString && size,\n });\n const contentClasses = cn(styles['list-header__content'], {\n [styles['list-header__content--string']]: contentIsString,\n [styles['list-header__content--element']]: !contentIsString,\n [styles['list-header__content--spacing']]: !mappedChildren?.avatarChild && !icon,\n });\n const iconClasses = cn(styles['list-header__icon'], {\n [styles['list-header__icon--for-string-content']]: contentIsString,\n [styles['list-header__icon--for-element-content']]: !contentIsString,\n [styles['list-header__icon--for-element-content--' + size]]: !contentIsString && size,\n });\n const avatarClasses = cn(styles['list-header__avatar'], {\n [styles['list-header__avatar--for-string-content']]: contentIsString,\n [styles['list-header__avatar--for-element-content']]: !contentIsString,\n [styles['list-header__avatar--for-element-content--' + size]]: !contentIsString && size,\n });\n const CustomTag = titleHtmlMarkup;\n return (\n <span data-testid={testId} className={listLabelClasses}>\n {showChevronAndIcon && icon && (\n <span className={iconClasses}>\n {React.cloneElement(icon, {\n size: breakpoint === Breakpoint.xs ? IconSize.XSmall : IconSize.Small,\n isHovered,\n })}\n </span>\n )}\n {size !== 'small' && mappedChildren?.avatarChild && (\n <span className={avatarClasses}>{React.cloneElement(mappedChildren.avatarChild, { size: AvatarSize.xsmall })}</span>\n )}\n <span className={contentClasses}>\n {mappedChildren?.listHeaderTextChildren}\n {!!mappedChildren?.stringChildren.length && (\n <CustomTag className={styles['list-header__title']}>{mappedChildren.stringChildren}</CustomTag>\n )}\n {mappedChildren?.remainingChildren}\n </span>\n\n {mappedChildren?.badgeChild && <span className={badgeClasses}>{mappedChildren.badgeChild}</span>}\n {showChevronAndIcon && chevronIcon && (\n <span className={chevronClasses}>\n <Icon svgIcon={chevronIcon} isHovered={isHovered} size={IconSize.XSmall} />\n </span>\n )}\n </span>\n );\n});\n\nListHeader.displayName = 'ListHeader';\n\nexport default ListHeader;\n"],"names":["renderListHeader","element","titleHtmlMarkup","isHovered","size","chevronIcon","icon","isComponent","ListHeader","React","mapChildren","children","isJsxChild","avatarChild","badgeChild","listHeaderTextChildren","stringChildren","remainingChildren","child","Avatar","ListHeaderText","Badge","hasSpecialChildren","noRemainingRecursiveChildren","isComponentWithChildren","_b","_a","_d","_c","props","ref","className","testId","breakpoint","useBreakpoint","showChevronAndIcon","contentIsString","mappedChildren","topAlignContent","listLabelClasses","cn","styles","badgeClasses","chevronClasses","contentClasses","iconClasses","avatarClasses","CustomTag","Breakpoint","IconSize","AvatarSize","Icon"],"mappings":"4cAsBO,MAAMA,EAAmB,CAC9BC,EACAC,EACAC,EACAC,EACAC,EACAC,IAC4B,CACxB,GAAAC,EAA6BN,EAASO,CAAU,EAC3C,OAAAC,EAAM,aAAaR,EAAS,CACjC,YAAAI,EACA,KAAAC,EACA,UAAAH,EACA,KAAAC,CAAA,CACD,EAEH,GAAIH,EACF,uBACGO,EAAW,CAAA,gBAAAN,EAAkC,YAAAG,EAA0B,KAAAC,EAAY,UAAAH,EAAsB,KAAAC,GACvGH,CACH,CAGN,EAgCaS,EAA8B,CAACC,EAAUC,EAAa,KAAU,aACvE,IAAAC,EACAC,EACJ,MAAMC,EAAoE,CAAA,EACpEC,EAA2B,CAAA,EAC3BC,EAAuC,CAAA,EAEvCR,EAAA,SAA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,OAAA,CAAK,cAAauB,EAAQ,UAAWO,CACnC,EAAAJ,GAAsB7B,GACrBG,EAAA,cAAC,OAAK,CAAA,UAAWoC,GACdpC,EAAM,aAAaH,EAAM,CACxB,KAAM2B,IAAee,EAAW,GAAKC,EAAS,OAASA,EAAS,MAChE,UAAA9C,CAAA,CACD,CACH,EAEDC,IAAS,UAAWiC,GAAA,YAAAA,EAAgB,cAClC5B,EAAA,cAAA,OAAA,CAAK,UAAWqC,CAAA,EAAgBrC,EAAM,aAAa4B,EAAe,YAAa,CAAE,KAAMa,EAAW,MAAO,CAAC,CAAE,kBAE9G,OAAK,CAAA,UAAWN,CACd,EAAAP,GAAA,YAAAA,EAAgB,uBAChB,CAAC,EAACA,GAAA,MAAAA,EAAgB,eAAe,SAChC5B,EAAA,cAACsC,EAAU,CAAA,UAAWN,EAAO,oBAAoB,CAAI,EAAAJ,EAAe,cAAe,EAEpFA,GAAA,YAAAA,EAAgB,iBACnB,GAECA,GAAA,YAAAA,EAAgB,aAAe5B,EAAA,cAAA,OAAA,CAAK,UAAWiC,GAAeL,EAAe,UAAW,EACxFF,GAAsB9B,GACpBI,EAAA,cAAA,OAAA,CAAK,UAAWkC,CACf,EAAAlC,EAAA,cAAC0C,EAAK,CAAA,QAAS9C,EAAa,UAAAF,EAAsB,KAAM8C,EAAS,MAAA,CAAQ,CAC3E,CAEJ,CAEJ,CAAC,EAEDzC,EAAW,YAAc"}
package/ListHeaderText.js DELETED
@@ -1,2 +0,0 @@
1
- import e from"react";import s from"classnames";import{S as N}from"./StatusDot.js";import t from"./components/ListHeader/styles.module.scss";const m=e.forwardRef((l,h)=>{const{firstText:n,firstTextEmphasised:p=!1,secondText:a=void 0,secondTextEmphasised:o=!1,subText:c=!1,statusDotVariant:r,className:i="",testId:d,titleHtmlMarkup:x="span"}=l,f=s(i,t["text-wrapper"],{[t["text-wrapper--sub-level"]]:c}),T=s({[t["text-wrapper__text--emphasised"]]:p}),u=s({[t["text-wrapper__text--emphasised"]]:o}),E=x;return e.createElement("span",{"data-testid":d,className:f},r!==void 0&&e.createElement("span",null,e.createElement(N,{text:"",variant:r})),e.createElement(E,{className:t["list-header__title"]},e.createElement("span",{className:T},n),a&&e.createElement("span",{className:u},a)))});m.displayName="ListHeaderText";const C=m;export{C as L,m as a};
2
- //# sourceMappingURL=ListHeaderText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListHeaderText.js","sources":["../src/components/ListHeader/ListHeaderText/ListHeaderText.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport StatusDot, { StatusDotVariant } from '../../StatusDot';\nimport { TitleTags } from '../../Title';\nimport styles from '../styles.module.scss';\n\nexport type ListHeaderTextType = React.ForwardRefExoticComponent<ListHeaderTextProps & React.RefAttributes<HTMLLIElement>>;\n\nexport interface ListHeaderTextProps {\n /** The first text in the ListHeaderText Component */\n firstText: string;\n /** Will style the first text as bold */\n firstTextEmphasised?: boolean;\n /** The second text in the ListHeaderText Component */\n secondText?: string;\n /** Will style the second text as bold */\n secondTextEmphasised?: boolean;\n /** Whether or not this ListHeaderText is a sub text */\n subText?: boolean;\n /** Decides the variant for the StatusDot */\n statusDotVariant?: StatusDotVariant;\n /** Adds custom classes to the ListHeaderText component. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Changes the underlying element of the title. Default: span*/\n titleHtmlMarkup?: TitleTags;\n}\n\nexport const ListHeaderText: ListHeaderTextType = React.forwardRef((props: ListHeaderTextProps, ref: React.Ref<HTMLLIElement>) => {\n const {\n firstText,\n firstTextEmphasised = false,\n secondText = undefined,\n secondTextEmphasised = false,\n subText = false,\n statusDotVariant,\n className = '',\n testId,\n titleHtmlMarkup = 'span',\n } = props;\n\n const headerTextWrapperClasses = cn(className, styles['text-wrapper'], {\n [styles['text-wrapper--sub-level']]: subText,\n });\n const firstHeaderTextSegmentClasses = cn({\n [styles['text-wrapper__text--emphasised']]: firstTextEmphasised,\n });\n const secondHeaderTextSegmentClasses = cn({\n [styles['text-wrapper__text--emphasised']]: secondTextEmphasised,\n });\n const CustomTag = titleHtmlMarkup;\n\n return (\n <span data-testid={testId} className={headerTextWrapperClasses}>\n {statusDotVariant !== undefined && (\n <span>\n <StatusDot text={''} variant={statusDotVariant} />\n </span>\n )}\n <CustomTag className={styles['list-header__title']}>\n <span className={firstHeaderTextSegmentClasses}>{firstText}</span>\n {secondText && <span className={secondHeaderTextSegmentClasses}>{secondText}</span>}\n </CustomTag>\n </span>\n );\n});\n\nListHeaderText.displayName = 'ListHeaderText';\n\nexport default ListHeaderText;\n"],"names":["ListHeaderText","React","props","ref","firstText","firstTextEmphasised","secondText","secondTextEmphasised","subText","statusDotVariant","className","testId","titleHtmlMarkup","headerTextWrapperClasses","cn","styles","firstHeaderTextSegmentClasses","secondHeaderTextSegmentClasses","CustomTag","StatusDot","ListHeaderText$1"],"mappings":"4IA+BO,MAAMA,EAAqCC,EAAM,WAAW,CAACC,EAA4BC,IAAkC,CAC1H,KAAA,CACJ,UAAAC,EACA,oBAAAC,EAAsB,GACtB,WAAAC,EAAa,OACb,qBAAAC,EAAuB,GACvB,QAAAC,EAAU,GACV,iBAAAC,EACA,UAAAC,EAAY,GACZ,OAAAC,EACA,gBAAAC,EAAkB,MAChB,EAAAV,EAEEW,EAA2BC,EAAGJ,EAAWK,EAAO,cAAc,EAAG,CACrE,CAACA,EAAO,yBAAyB,CAAC,EAAGP,CAAA,CACtC,EACKQ,EAAgCF,EAAG,CACvC,CAACC,EAAO,gCAAgC,CAAC,EAAGV,CAAA,CAC7C,EACKY,EAAiCH,EAAG,CACxC,CAACC,EAAO,gCAAgC,CAAC,EAAGR,CAAA,CAC7C,EACKW,EAAYN,EAElB,uBACG,OAAK,CAAA,cAAaD,EAAQ,UAAWE,GACnCJ,IAAqB,QACnBR,EAAA,cAAA,OAAA,qBACEkB,EAAU,CAAA,KAAM,GAAI,QAASV,CAAkB,CAAA,CAClD,EAEDR,EAAA,cAAAiB,EAAA,CAAU,UAAWH,EAAO,oBAAoB,CAC/C,EAAAd,EAAA,cAAC,QAAK,UAAWe,GAAgCZ,CAAU,EAC1DE,GAAeL,EAAA,cAAA,OAAA,CAAK,UAAWgB,CAAiC,EAAAX,CAAW,CAC9E,CACF,CAEJ,CAAC,EAEDN,EAAe,YAAc,iBAE7B,MAAAoB,EAAepB"}
package/MaxCharacters.js DELETED
@@ -1,2 +0,0 @@
1
- import n from"react";import l from"classnames";import{FormMode as p}from"./constants.js";import r from"./components/MaxCharacters/styles.module.scss";const f=({maxCharacters:a,maxText:t,length:e,mode:s,maxWidth:c})=>{const o=e/a,m=l(r["max-characters"],{[r["max-characters--on-dark"]]:s===p.ondark,[r["max-characters--invalid"]]:o>1}),i=o>.95?"polite":"off";return n.createElement("div",{"aria-live":i,"aria-atomic":"true",className:m,style:{maxWidth:c}},`${e}/${a} ${t||"tegn"}`)},$=f;export{$ as M};
2
- //# sourceMappingURL=MaxCharacters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MaxCharacters.js","sources":["../src/components/MaxCharacters/MaxCharacters.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { FormMode } from '../../constants';\n\nimport styles from './styles.module.scss';\n\ninterface MaxCharactersProps {\n /** Current input length */\n length: number;\n /** max character limit in textarea */\n maxCharacters: number;\n /** The text is displayed in the end of the text-counter */\n maxText?: string;\n /** Changes the visuals of the textarea */\n mode?: keyof typeof FormMode;\n /** Max width of the component */\n maxWidth?: string;\n}\n\nconst MaxCharacters: React.FC<MaxCharactersProps> = ({ maxCharacters, maxText, length, mode, maxWidth }) => {\n const progress = length / maxCharacters;\n\n const counterTextClass = classNames(styles['max-characters'], {\n [styles[`max-characters--on-dark`]]: mode === FormMode.ondark,\n [styles[`max-characters--invalid`]]: progress > 1,\n });\n\n const ariaLevel = progress > 0.95 ? 'polite' : 'off';\n\n return (\n <div aria-live={ariaLevel} aria-atomic={'true'} className={counterTextClass} style={{ maxWidth }}>\n {`${length}/${maxCharacters} ${maxText ? maxText : 'tegn'}`}\n </div>\n );\n};\n\nexport default MaxCharacters;\n"],"names":["MaxCharacters","maxCharacters","maxText","length","mode","maxWidth","progress","counterTextClass","classNames","styles","FormMode","ariaLevel","React","MaxCharacters$1"],"mappings":"sJAqBA,MAAMA,EAA8C,CAAC,CAAE,cAAAC,EAAe,QAAAC,EAAS,OAAAC,EAAQ,KAAAC,EAAM,SAAAC,KAAe,CAC1G,MAAMC,EAAWH,EAASF,EAEpBM,EAAmBC,EAAWC,EAAO,gBAAgB,EAAG,CAC5D,CAACA,EAAO,yBAAyB,CAAC,EAAGL,IAASM,EAAS,OACvD,CAACD,EAAO,yBAAyB,CAAC,EAAGH,EAAW,CAAA,CACjD,EAEKK,EAAYL,EAAW,IAAO,SAAW,MAG7C,OAAAM,EAAA,cAAC,OAAI,YAAWD,EAAW,cAAa,OAAQ,UAAWJ,EAAkB,MAAO,CAAE,SAAAF,IACnF,GAAGF,CAAM,IAAIF,CAAa,IAAIC,GAAoB,MAAM,EAC3D,CAEJ,EAEAW,EAAeb"}
package/Modal.js DELETED
@@ -1,2 +0,0 @@
1
- import t,{useEffect as N}from"react";import n from"classnames";import{ZIndex as R,AnalyticsId as P,IconSize as c}from"./constants.js";import{useFocusTrap as $}from"./hooks/useFocusTrap.js";import{useIsVisible as I}from"./hooks/useIsVisible.js";import{palette as u}from"./theme/palette.js";import{u as A}from"./uuid.js";import{B as w}from"./Button.js";import{C as F}from"./Close.js";import{Icon as _}from"./components/Icons/Icon.js";import H from"./components/Icons/AlertSignFill.js";import K from"./components/Icons/AlertSignStroke.js";import M from"./components/Icons/CheckOutline.js";import O from"./components/Portal/index.js";import{T as D}from"./Title.js";import a from"./components/Modal/styles.module.scss";var V=(e=>(e.normal="normal",e.warning="warning",e.error="error",e.success="success",e.image="image",e))(V||{}),Z=(e=>(e.large="large",e.medium="medium",e))(Z||{});const j={variant:"normal",primaryButtonText:"OK",titleId:A(),className:"",size:"large",zIndex:R.Modal},q=e=>e==="error"?t.createElement(_,{size:c.Small,svgIcon:H,color:u.cherry500}):e==="warning"?t.createElement(_,{size:c.Small,svgIcon:K,color:u.black}):e==="success"?t.createElement(_,{size:c.Small,svgIcon:M,color:u.kiwi900}):null,G=(e,r)=>{const o=q(e);return o?t.createElement("div",{className:a.modal__iconWrapper},o):r?t.createElement("div",{className:a.modal__iconWrapper},t.cloneElement(r,{size:c.Small})):null},B=e=>{var C,h;const r=t.useRef(null),o=t.useRef(null),m=t.useRef(null);$(m,!0);const k=I(r),f=t.useRef(null),x=I(f),s=o.current&&o.current.scrollHeight>o.current.clientHeight;function v(l){l.key==="Escape"&&e.onClose&&(l.stopPropagation(),e.onClose())}function E(l){l.target&&d.current===l.target&&e.onClose&&(l.stopPropagation(),e.onClose())}function L(){document.body.style.overflow="hidden"}function S(){document.body.style.removeProperty("overflow")}const i=e.variant==="image",d=t.useRef(null),g=e.secondaryButtonText&&((C=e.secondaryButtonText)==null?void 0:C.length)>0||e.onSuccess,T=e.ariaLabelledBy?void 0:e.ariaLabel,y=e.ariaLabelledBy?e.ariaLabelledBy:e.ariaLabel?void 0:e.titleId;N(()=>{const l=d.current;return L(),!e.disableCloseEvents&&l&&(l.addEventListener("keydown",v),l.addEventListener("click",E)),()=>{S(),!e.disableCloseEvents&&l&&(l.removeEventListener("keydown",v),l.removeEventListener("click",E))}},[e.disableCloseEvents]),N(()=>{var l;(l=m.current)==null||l.focus()},[]);const W=n(e.className,a.modal,a[`modal--${e.variant}`],a[`modal--${e.size}`],s&&!g&&a["modal--no-actions"]),z=n({[a["modal__title--error"]]:e.variant==="error",[a["modal__title--success"]]:e.variant==="success"}),b=t.createElement("div",{"data-testid":"dialog-container"},t.createElement("div",{ref:d,className:a["modal-overlay"],"data-testid":e.testId,"data-analyticsid":P.Modal,style:{zIndex:e.zIndex}},t.createElement("div",{className:a.align},t.createElement("div",{className:W,role:"dialog","aria-modal":"true",tabIndex:-1,"aria-label":T,"aria-labelledby":y,ref:m},t.createElement("div",{className:n(a.modal__shadow,a["modal__shadow--top"],{[a["modal__shadow--show"]]:!k&&s})}),t.createElement("div",{className:n(a.modal__contentWrapper,{[a["modal__contentWrapper--image"]]:i}),ref:o},!e.noCloseButton&&t.createElement("div",{className:a.modal__closeWrapper},t.createElement("div",{className:n(a.modal__closeWrapper__close)},t.createElement(F,{onClick:e.onClose,ariaLabel:e.ariaLabelCloseBtn}))),t.createElement("div",{className:n(a[`modal__contentWrapper__scroll--${e.size}`],{[a["modal__contentWrapper__scroll--image"]]:i})},t.createElement("div",{ref:r}),t.createElement("div",{className:a.modal__contentWrapper__title},G(e.variant,e.icon),t.createElement(D,{id:y,htmlMarkup:"h3",appearance:"title3",className:z},e.title),e.afterTitleChildren&&t.createElement("div",{className:a.modal__afterTitleChildren},e.afterTitleChildren)),i&&t.createElement("div",null,t.createElement("div",{className:a.modal__contentWrapper__imageWrapper},e.children),t.createElement("span",{className:a.modal__contentWrapper__imageDescription},e.description)),!i&&e.children&&t.createElement("div",null,e.children),!i&&!e.children&&t.createElement("p",{className:a.modal__description},e.description),t.createElement("div",{ref:f}))),t.createElement("div",{className:n(a.modal__shadow,a["modal__shadow--bottom"],{[a["modal__shadow--show"]]:!x&&s})}),g&&t.createElement("div",{className:n(a["modal__call-to-action"],a[`modal__call-to-action--${e.size}`])},e.onSuccess&&t.createElement(w,{onClick:e.onSuccess},e.primaryButtonText),e.secondaryButtonText&&((h=e.secondaryButtonText)==null?void 0:h.length)>0&&t.createElement(w,{variant:"borderless",onClick:e.onClose},e.secondaryButtonText))))));if(e.printable){const l="print-modal";return t.createElement(O,{className:l,testId:"print-modal"},t.createElement("style",{media:"print"},`body > *:not(.${l}) {display: none;}`),b)}return b};B.defaultProps=j;const se=B;export{se as M,V as a,Z as b};
2
- //# sourceMappingURL=Modal.js.map
package/Modal.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Modal.js","sources":["../src/components/Modal/Modal.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\n\nimport cn from 'classnames';\n\nimport { AnalyticsId, ZIndex } from '../../constants';\nimport useFocusTrap from '../../hooks/useFocusTrap';\nimport { useIsVisible } from '../../hooks/useIsVisible';\nimport { palette } from '../../theme/palette';\nimport { uuid } from '../../utils/uuid';\nimport Button from '../Button';\nimport Close from '../Close';\nimport Icon, { IconSize } from '../Icons';\nimport AlertSignFill from '../Icons/AlertSignFill';\nimport AlertSignStroke from '../Icons/AlertSignStroke';\nimport CheckOutline from '../Icons/CheckOutline';\nimport Portal from '../Portal';\nimport Title from '../Title/Title';\n\nimport styles from './styles.module.scss';\n\nexport enum ModalVariants {\n normal = 'normal',\n warning = 'warning',\n error = 'error',\n success = 'success',\n image = 'image',\n}\n\nexport enum ModalSize {\n large = 'large',\n medium = 'medium',\n}\n\nexport interface ModalProps {\n /** Title of the modal */\n title: string;\n /** id of the modal title */\n titleId?: string;\n /** Description of the modal. Will not render if the modal has children. */\n description?: string;\n /** Changes the visual representation of the modal */\n variant?: keyof typeof ModalVariants;\n /** Change width of the modal (default: large) */\n size?: keyof typeof ModalSize;\n /** Icon displayed in title */\n icon?: React.ReactElement;\n /** Hides the close button */\n noCloseButton?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Primary button text */\n primaryButtonText?: string;\n /** Secondary button text */\n secondaryButtonText?: string;\n /** Sets the aria-label of the modal */\n ariaLabel?: string;\n /** Sets the aria-labelledby of the modal */\n ariaLabelledBy?: string;\n /** Close button aria-label */\n ariaLabelCloseBtn?: string;\n /** Alternative component to modal */\n children?: React.ReactNode;\n /** Component shown after title */\n afterTitleChildren?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Customize the z-index of the modal */\n zIndex?: number;\n /** Function is called when user clicks primary button */\n onSuccess?: () => void;\n /** Function is called when user clicks secondary button, clicks escape or outside the modal */\n onClose?: () => void;\n /** When enabled the component will be rendered in the bottom of document.body */\n printable?: boolean;\n /** If disabled, clicking escape or outside the modal will not close it */\n disableCloseEvents?: boolean;\n}\n\nconst defaultProps = {\n variant: ModalVariants.normal,\n primaryButtonText: 'OK',\n titleId: uuid(),\n className: '',\n size: ModalSize.large,\n zIndex: ZIndex.Modal,\n};\n\nconst getVariantIcon = (variant?: ModalProps['variant']): JSX.Element | null => {\n if (variant === ModalVariants.error) {\n return <Icon size={IconSize.Small} svgIcon={AlertSignFill} color={palette.cherry500} />;\n } else if (variant === ModalVariants.warning) {\n return <Icon size={IconSize.Small} svgIcon={AlertSignStroke} color={palette.black} />;\n } else if (variant === ModalVariants.success) {\n return <Icon size={IconSize.Small} svgIcon={CheckOutline} color={palette.kiwi900} />;\n }\n return null;\n};\n\nconst getIcon = (variant?: ModalProps['variant'], icon?: ModalProps['icon']): JSX.Element | null => {\n const variantIcon = getVariantIcon(variant);\n if (variantIcon) {\n return <div className={styles.modal__iconWrapper}>{variantIcon}</div>;\n }\n if (icon) {\n return (\n <div className={styles.modal__iconWrapper}>\n {React.cloneElement(icon, {\n size: IconSize.Small,\n })}\n </div>\n );\n }\n return null;\n};\n\nconst Modal = (props: ModalProps): JSX.Element => {\n const topContent = React.useRef<HTMLDivElement>(null);\n const modalContentRef = React.useRef<HTMLDivElement>(null);\n const dialogRef = React.useRef<HTMLDivElement>(null);\n useFocusTrap(dialogRef, true);\n const topContentVisible = useIsVisible(topContent);\n const bottomContent = React.useRef<HTMLDivElement>(null);\n const bottomContentVisible = useIsVisible(bottomContent);\n const contentIsScrollable = modalContentRef.current && modalContentRef.current.scrollHeight > modalContentRef.current.clientHeight;\n\n function handleKeyboardEvent(e: KeyboardEvent): void {\n if (e.key === 'Escape' && props.onClose) {\n e.stopPropagation();\n props.onClose();\n }\n }\n\n function handleClickEvent(event: MouseEvent): void {\n if (event.target && overlayRef.current === event.target && props.onClose) {\n event.stopPropagation();\n props.onClose();\n }\n }\n\n function disableBodyScroll(): void {\n document.body.style.overflow = 'hidden';\n }\n\n function enableBodyScroll(): void {\n document.body.style.removeProperty('overflow');\n }\n\n /* Displays a full window size modal with image */\n const imageView = props.variant === ModalVariants.image;\n\n const overlayRef = React.useRef<HTMLDivElement>(null);\n\n const showActions = (props.secondaryButtonText && props.secondaryButtonText?.length > 0) || props.onSuccess;\n\n // ariaLabelledBy prioriteres over ariaLabel, men dersom ariaLabel brukes trengs ikke ariaLabelledBy\n const ariaLabel = !props.ariaLabelledBy ? props.ariaLabel : undefined;\n const ariaLabelledBy = props.ariaLabelledBy ? props.ariaLabelledBy : !props.ariaLabel ? props.titleId : undefined;\n\n useEffect(() => {\n const overlayElement = overlayRef.current;\n disableBodyScroll();\n if (!props.disableCloseEvents && overlayElement) {\n overlayElement.addEventListener('keydown', handleKeyboardEvent);\n overlayElement.addEventListener('click', handleClickEvent);\n }\n return (): void => {\n enableBodyScroll();\n if (!props.disableCloseEvents && overlayElement) {\n overlayElement.removeEventListener('keydown', handleKeyboardEvent);\n overlayElement.removeEventListener('click', handleClickEvent);\n }\n };\n }, [props.disableCloseEvents]);\n\n useEffect(() => {\n dialogRef.current?.focus();\n }, []);\n\n const dialogClasses = cn(\n props.className,\n styles.modal,\n styles[`modal--${props.variant}`],\n styles[`modal--${props.size}`],\n contentIsScrollable && !showActions && styles['modal--no-actions']\n );\n\n const titleClasses = cn({\n [styles['modal__title--error']]: props.variant === ModalVariants.error,\n [styles['modal__title--success']]: props.variant === ModalVariants.success,\n });\n\n const Component = (\n <div data-testid=\"dialog-container\">\n <div\n ref={overlayRef}\n className={styles['modal-overlay']}\n data-testid={props.testId}\n data-analyticsid={AnalyticsId.Modal}\n style={{ zIndex: props.zIndex }}\n >\n <div className={styles.align}>\n <div\n className={dialogClasses}\n role=\"dialog\"\n aria-modal=\"true\"\n tabIndex={-1}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n ref={dialogRef}\n >\n <div\n className={cn(styles['modal__shadow'], styles['modal__shadow--top'], {\n [styles['modal__shadow--show']]: !topContentVisible && contentIsScrollable,\n })}\n />\n <div\n className={cn(styles.modal__contentWrapper, {\n [styles['modal__contentWrapper--image']]: imageView,\n })}\n ref={modalContentRef}\n >\n {!props.noCloseButton && (\n <div className={styles.modal__closeWrapper}>\n <div className={cn(styles.modal__closeWrapper__close)}>\n <Close onClick={props.onClose} ariaLabel={props.ariaLabelCloseBtn} />\n </div>\n </div>\n )}\n <div\n className={cn(styles[`modal__contentWrapper__scroll--${props.size}`], {\n [styles['modal__contentWrapper__scroll--image']]: imageView,\n })}\n >\n <div ref={topContent} />\n <div className={styles.modal__contentWrapper__title}>\n {getIcon(props.variant, props.icon)}\n <Title id={ariaLabelledBy} htmlMarkup=\"h3\" appearance=\"title3\" className={titleClasses}>\n {props.title}\n </Title>\n {props.afterTitleChildren && <div className={styles['modal__afterTitleChildren']}>{props.afterTitleChildren}</div>}\n </div>\n {imageView && (\n <div>\n <div className={styles['modal__contentWrapper__imageWrapper']}>{props.children}</div>\n <span className={styles['modal__contentWrapper__imageDescription']}>{props.description}</span>\n </div>\n )}\n {!imageView && props.children && <div>{props.children}</div>}\n {!imageView && !props.children && <p className={styles.modal__description}>{props.description}</p>}\n <div ref={bottomContent} />\n </div>\n </div>\n <div\n className={cn(styles['modal__shadow'], styles['modal__shadow--bottom'], {\n [styles['modal__shadow--show']]: !bottomContentVisible && contentIsScrollable,\n })}\n />\n {showActions && (\n <div className={cn(styles['modal__call-to-action'], styles[`modal__call-to-action--${props.size}`])}>\n {props.onSuccess && <Button onClick={props.onSuccess}>{props.primaryButtonText}</Button>}\n {props.secondaryButtonText && props.secondaryButtonText?.length > 0 && (\n <Button variant=\"borderless\" onClick={props.onClose}>\n {props.secondaryButtonText}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n );\n\n if (props.printable) {\n const printModal = 'print-modal';\n return (\n <Portal className={printModal} testId=\"print-modal\">\n <style media=\"print\">{`body > *:not(.${printModal}) {display: none;}`}</style>\n {Component}\n </Portal>\n );\n }\n\n return Component;\n};\n\nModal.defaultProps = defaultProps;\n\nexport default Modal;\n"],"names":["ModalVariants","ModalSize","defaultProps","uuid","ZIndex","getVariantIcon","variant","React","Icon","IconSize","AlertSignFill","palette","AlertSignStroke","CheckOutline","getIcon","icon","variantIcon","styles","Modal","props","topContent","modalContentRef","dialogRef","useFocusTrap","topContentVisible","useIsVisible","bottomContent","bottomContentVisible","contentIsScrollable","handleKeyboardEvent","e","handleClickEvent","event","overlayRef","disableBodyScroll","enableBodyScroll","imageView","showActions","_a","ariaLabel","ariaLabelledBy","useEffect","overlayElement","dialogClasses","cn","titleClasses","Component","AnalyticsId","Close","Title","Button","_b","printModal","Portal","Modal$1"],"mappings":"0sBAoBY,IAAAA,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,MAAQ,QACRA,EAAA,QAAU,UACVA,EAAA,MAAQ,QALEA,IAAAA,GAAA,CAAA,CAAA,EAQAC,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,OAAS,SAFCA,IAAAA,GAAA,CAAA,CAAA,EAkDZ,MAAMC,EAAe,CACnB,QAAS,SACT,kBAAmB,KACnB,QAASC,EAAK,EACd,UAAW,GACX,KAAM,QACN,OAAQC,EAAO,KACjB,EAEMC,EAAkBC,GAClBA,IAAY,QACPC,EAAA,cAACC,GAAK,KAAMC,EAAS,MAAO,QAASC,EAAe,MAAOC,EAAQ,SAAW,CAAA,EAC5EL,IAAY,UACdC,EAAA,cAACC,GAAK,KAAMC,EAAS,MAAO,QAASG,EAAiB,MAAOD,EAAQ,KAAO,CAAA,EAC1EL,IAAY,UACdC,EAAA,cAACC,GAAK,KAAMC,EAAS,MAAO,QAASI,EAAc,MAAOF,EAAQ,OAAS,CAAA,EAE7E,KAGHG,EAAU,CAACR,EAAiCS,IAAkD,CAC5F,MAAAC,EAAcX,EAAeC,CAAO,EAC1C,OAAIU,EACMT,EAAA,cAAA,MAAA,CAAI,UAAWU,EAAO,oBAAqBD,CAAY,EAE7DD,kBAEC,MAAI,CAAA,UAAWE,EAAO,oBACpBV,EAAM,aAAaQ,EAAM,CACxB,KAAMN,EAAS,KAChB,CA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I,UAAWqC,EAAG3B,EAAO,uBAAuB,EAAGA,EAAO,0BAA0BE,EAAM,IAAI,EAAE,CAAC,GAC/FA,EAAM,2BAAc+B,EAAO,CAAA,QAAS/B,EAAM,SAAA,EAAYA,EAAM,iBAAkB,EAC9EA,EAAM,uBAAuBgC,EAAAhC,EAAM,sBAAN,YAAAgC,EAA2B,QAAS,GAC/D5C,EAAA,cAAA2C,EAAA,CAAO,QAAQ,aAAa,QAAS/B,EAAM,OACzC,EAAAA,EAAM,mBACT,CAEJ,CAAA,CAGN,CAAA,CAEJ,EAGF,GAAIA,EAAM,UAAW,CACnB,MAAMiC,EAAa,cACnB,OACG7C,EAAA,cAAA8C,EAAA,CAAO,UAAWD,EAAY,OAAO,aACpC,EAAA7C,EAAA,cAAC,QAAM,CAAA,MAAM,OAAS,EAAA,iBAAiB6C,CAAU,oBAAqB,EACrEN,CACH,CAEJ,CAEO,OAAAA,CACT,EAEA5B,EAAM,aAAehB,EAErB,MAAAoD,GAAepC"}
package/Panel.js DELETED
@@ -1,2 +0,0 @@
1
- import t from"react";import r from"classnames";import{AnalyticsId as oe,IconSize as B}from"./constants.js";import{useExpand as se}from"./hooks/useExpand.js";import{useUuid as H}from"./hooks/useUuid.js";import{palette as W}from"./theme/palette.js";import{getAriaLabelAttributes as ce}from"./utils/accessibility.js";import{B as ie}from"./Badge.js";import{B as X}from"./Button.js";import{Icon as C}from"./components/Icons/Icon.js";import me from"./components/Icons/AlertSignFill.js";import ue from"./components/Icons/ArrowRight.js";import pe from"./components/Icons/Calendar.js";import de from"./components/Icons/ChevronDown.js";import _e from"./components/Icons/ChevronUp.js";import Ee from"./components/Icons/Pencil.js";import fe from"./components/Icons/Watch.js";import{T as ye}from"./Title.js";import e from"./components/Panel/styles.module.scss";var ve=(a=>(a.normal="normal",a.new="new",a.error="error",a.draft="draft",a))(ve||{}),be=(a=>(a.fill="fill",a.white="white",a.stroke="stroke",a.line="line",a))(be||{}),Ce=(a=>(a.layout1="layout1",a.layout2="layout2",a.layout3a="layout3a",a.layout3b="layout3b",a.layout3c="layout3c",a))(Ce||{});const S=({status:a,statusMessage:n})=>{const m=()=>a==="error"?{color:W.cherry500,svgIcon:me}:{color:W.black,svgIcon:Ee},s=r(e["status-message"],{[e["status-message--new"]]:a==="new"});return(a==="error"||a==="draft")&&n?t.createElement("div",{className:s,"data-testid":"display-status"},t.createElement(C,{...m(),size:B.XSmall})," ",t.createElement("span",null,n)):null},L=({children:a})=>typeof a>"u"?null:t.createElement("div",{className:e["header-container"]},a),Ne=({date:a,time:n})=>a||n?t.createElement("div",{className:e["datetime-container"],"data-testid":"datetime"},a&&t.createElement("div",{className:e["datetime-container__icon"]},t.createElement(C,{svgIcon:pe,size:B.XSmall}),t.createElement("span",null,a)),n&&t.createElement("div",{className:e["datetime-container__icon"]},t.createElement(C,{svgIcon:fe,size:B.XSmall}),t.createElement("span",null,n))):null,he=({contentA:a,contentB:n,contentHeader:m,ctaContainer:s,icon:l,status:c,statusMessage:p,titleElement:d})=>{const i=r(e["panel__layout-1"],{[e["panel__layout-1--with-icon"]]:l}),o=r(e.panel__icon,e["panel__icon--layout-1"],{[e["panel__icon--no-content"]]:!a&&!n});return t.createElement("div",{className:i},t.createElement(S,{status:c,statusMessage:p}),t.createElement(L,null,m),l&&t.createElement("div",{className:o},l),t.createElement("div",{className:e["panel__layout-1__content-a"]},d,a),n&&t.createElement("div",null,n),s)},we=({contentA:a,contentB:n,contentHeader:m,ctaContainer:s,icon:l,status:c,statusMessage:p,titleElement:d})=>{const i=r(e["panel__layout-2"],{[e["panel__layout-2--with-icon"]]:l}),o=r(e.panel__icon,e["panel__icon--layout-2"],{[e["panel__icon--no-content"]]:!a&&!n}),y=e["panel__layout-2__last-column"];return t.createElement("div",{className:i},t.createElement(S,{status:c,statusMessage:p}),t.createElement(L,null,m),l&&t.createElement("div",{className:o},l),t.createElement("div",{className:e["panel__layout-2__content-a"]},d,a),n&&t.createElement("div",{className:y},n),s&&t.createElement("div",{className:y},s))},Ie=({contentA:a,contentB:n,contentHeader:m,ctaContainer:s,icon:l,layout:c,status:p,statusMessage:d,titleElement:i})=>{const o=r(e["panel__layout-3"],{[e["panel__layout-3--with-icon"]]:l,[e["panel__layout-3--a"]]:c==="layout3a",[e["panel__layout-3--b"]]:c==="layout3b",[e["panel__layout-3--c"]]:c==="layout3c"}),y=r(e.panel__icon,e["panel__icon--layout-3"],{[e["panel__icon--no-content"]]:!a&&!n});return t.createElement("div",{className:o},t.createElement(S,{status:p,statusMessage:d}),t.createElement(L,null,m),l&&t.createElement("div",{className:y},l),t.createElement("div",null,i,a),t.createElement("div",{className:e["panel__layout-3__last-column"]},n&&t.createElement("div",{className:e["panel__layout-3__last-column__content-b"]},n),s))},ge=t.forwardRef(function(n,m){const{buttonAriaLabel:s,buttonAriaLabelledById:l,buttonText:c="Se detaljer",buttonTextClose:p="Skjul detaljer",buttonHtmlMarkup:d="a",buttonOnClick:i,children:o,className:y,containerAsButton:w=!1,contentA:M,contentB:$,contentHeader:F,date:z,expanded:P=!1,focusable:U=!1,icon:I,layout:v="layout2",noTopBorder:O,onExpand:D,renderChildrenWhenClosed:q=!1,status:_="normal",statusMessage:g,target:G="_self",testId:J,time:R,title:x,titleHtmlMarkup:K="h2",url:k,variant:E="fill"}=n,[f,Q]=se(P,D),T=H(),N=H(),j=g&&_==="new",h=typeof $>"u",Y=v==="layout1"||h,Z=!h&&v==="layout2",V=!h&&(v==="layout3a"||v==="layout3b"||v==="layout3c"),ee=r(e["panel-wrapper"],y),te=r(e.panel,{[e["panel--fill"]]:E==="fill",[e["panel--stroke"]]:E==="stroke",[e["panel--white"]]:E==="white",[e["panel--line"]]:E==="line",[e["panel--no-top-border"]]:E==="line"&&O,[e["panel--selected"]]:f,[e["panel--new"]]:_==="new",[e["panel--draft"]]:_==="draft",[e["panel--error"]]:_==="error",[e["panel--status"]]:_&&_!=="normal",[e["panel--with-icon"]]:I,[e["panel--button"]]:w,[e["panel--clickable"]]:o||k||D||i||w}),ae=()=>{const u=o||k||i,b=r(e["panel__btn-container"],{[e["panel__btn-container--no-content-b"]]:h,[e["panel__btn-container--no-button"]]:!u});return(u||z||R)&&t.createElement("div",{className:b},t.createElement(Ne,{date:z,time:R}),u&&t.createElement("div",{className:e["panel__details-btn"]},ne()))},ne=()=>{const u=ce({label:s,id:l&&`${N} ${l}`||x&&T&&`${N} ${T}`,prefer:"label"}),b={onClick:i||(()=>Q(!f)),className:w?e.panel__expand:void 0,variant:"borderless",ellipsis:!0,...u};return o?t.createElement(X,{testId:"expand","aria-expanded":f,...b},t.createElement("span",{id:N},f?p:c),t.createElement(C,{svgIcon:f?_e:de})):t.createElement(X,{testId:"url",htmlMarkup:d,href:k,target:G,...b},t.createElement("span",{id:N},c),t.createElement(C,{svgIcon:ue}))},le=()=>{if(!o||!q&&!f)return null;const u=r(e["panel-details"],{[e["panel-details--open"]]:f,[e["panel-details--line"]]:E==="line",[e["panel-details--white"]]:E==="white",[e["panel-details--with-icon"]]:I});return t.createElement("div",{className:u,"data-testid":"panel-details"},t.createElement("div",null,o))},re=()=>{const u=r(e["title-container"],{[e["title-container--no-content-a"]]:!M}),b=r(e["title-container__title"],{[e["title-container__title--badge"]]:j});return x&&t.createElement("div",{className:u},t.createElement(ye,{appearance:"title3",htmlMarkup:K,id:T,className:b},x),j&&t.createElement("div",{className:e.panel__badge},t.createElement(ie,{color:"blueberry",testId:"badge-status"},g)))},A={contentA:M,contentB:$,contentHeader:F,ctaContainer:ae(),icon:I,status:_,statusMessage:g,titleElement:re()};return t.createElement("div",{tabIndex:U?-1:void 0,ref:m,"data-testid":J,className:ee,"data-analyticsid":oe.Panel},t.createElement("div",{className:te},Y&&t.createElement(he,{...A}),Z&&t.createElement(we,{...A}),V&&t.createElement(Ie,{...A,layout:v})),le())}),Oe=ge;export{Oe as P,ve as a,be as b,Ce as c};
2
- //# sourceMappingURL=Panel.js.map
package/Panel.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Panel.js","sources":["../src/components/Panel/Panel.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnchorTarget, AnalyticsId } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { useUuid } from '../../hooks/useUuid';\nimport { palette } from '../../theme/palette';\nimport { AriaLabelAttributes, getAriaLabelAttributes } from '../../utils/accessibility';\nimport Badge from '../Badge';\nimport Button, { ButtonProps, ButtonTags } from '../Button';\nimport Icon, { IconSize, SvgPathProps } from '../Icons';\nimport AlertSignFill from '../Icons/AlertSignFill';\nimport ArrowRight from '../Icons/ArrowRight';\nimport Calendar from '../Icons/Calendar';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport Pencil from '../Icons/Pencil';\nimport Watch from '../Icons/Watch';\nimport Title, { TitleTags } from '../Title';\n\nimport panelStyles from './styles.module.scss';\n\nexport enum PanelStatus {\n normal = 'normal',\n new = 'new',\n error = 'error',\n draft = 'draft',\n}\n\nexport enum PanelVariant {\n fill = 'fill',\n white = 'white',\n stroke = 'stroke',\n line = 'line',\n}\n\nexport enum PanelLayout {\n layout1 = 'layout1',\n layout2 = 'layout2',\n layout3a = 'layout3a',\n layout3b = 'layout3b',\n layout3c = 'layout3c',\n}\n\nexport interface PanelProps {\n /** Adds custom classes to the element. */\n className?: string;\n /** Panel section A content */\n contentA?: React.ReactNode | string;\n /** Panel section B content */\n contentB?: React.ReactNode | string;\n /** Content for a container that renders above A and B regardless of layout */\n contentHeader?: React.ReactNode;\n /** Container acts as a button, clicking anywhere triggers a panel button click */\n containerAsButton?: boolean;\n /** Panel children */\n children?: React.ReactNode;\n /** Displays date with icon */\n date?: string;\n /** Expands or collapses the panel */\n expanded?: boolean;\n /** Whether the panel can be focused */\n focusable?: boolean;\n /** Icon displayed in title */\n icon?: React.ReactNode;\n /** Panel button text */\n buttonText?: string;\n /** Panel button close text */\n buttonTextClose?: string;\n /** HTML markup for panel button. Default: a */\n buttonHtmlMarkup?: ButtonTags;\n /** Callback when the panel button is clicked */\n buttonOnClick?: ButtonProps['onClick'];\n /** Panel button is aria-labelledby the text in the button itself + the element set in buttonAriaLabelledById. Default: auto-generated id for title (if title is set). */\n buttonAriaLabelledById?: string;\n /** Panel button aria label */\n buttonAriaLabel?: string;\n /** Layout of the panel */\n layout?: keyof typeof PanelLayout;\n /** Removes top border when variant is \"line\" */\n noTopBorder?: boolean;\n /** Called when the panel is opened/closed */\n onExpand?: (isExpanded: boolean) => void;\n /** Whether to render children when closed (in which case they are hidden with CSS). Default: false */\n renderChildrenWhenClosed?: boolean;\n /** Displays a status on the left side: default normal */\n status?: keyof typeof PanelStatus;\n /** Displayed on top of the panel with a status icon */\n statusMessage?: string;\n /** Sets the data-testid attribute for testing purposes */\n testId?: string;\n /** Displays time with icon */\n time?: string;\n /** Title of the panel */\n title?: string;\n /** Changes the underlying element of the title. Default: h2 */\n titleHtmlMarkup?: TitleTags;\n /** Changes the visual representation of the panel */\n variant?: keyof typeof PanelVariant;\n /** URL to details, renders as a button with anchor tag */\n url?: string;\n /** target used in the button: default is _self */\n target?: AnchorTarget;\n /** @deprecated Has no effect anymore due to accessibility reasons. No close button is shown in expanded content. Will be removed in 2.0.0 */\n showCloseButtonInExpand?: boolean;\n}\n\nexport interface LayoutProps\n extends Pick<PanelProps, 'contentA' | 'contentB' | 'contentHeader' | 'icon' | 'layout' | 'status' | 'statusMessage'> {\n ctaContainer?: React.ReactNode;\n titleElement: React.ReactNode;\n}\n\nconst StatusText: React.FC<{ status?: keyof typeof PanelStatus; statusMessage?: string }> = ({ status, statusMessage }) => {\n const statusIcon = (): { color: string; svgIcon: React.FC<SvgPathProps> } => {\n if (status === PanelStatus.error) {\n return { color: palette.cherry500, svgIcon: AlertSignFill };\n }\n\n return { color: palette.black, svgIcon: Pencil };\n };\n\n const statusMessageClass = classNames(panelStyles['status-message'], {\n [panelStyles['status-message--new']]: status === PanelStatus.new,\n });\n\n if ((status === PanelStatus.error || status === PanelStatus.draft) && statusMessage) {\n return (\n <div className={statusMessageClass} data-testid=\"display-status\">\n {<Icon {...statusIcon()} size={IconSize.XSmall} />} <span>{statusMessage}</span>\n </div>\n );\n }\n\n return null;\n};\n\nconst PreContainer: React.FC<{ children?: React.ReactNode }> = ({ children }) => {\n if (typeof children === 'undefined') return null;\n return <div className={panelStyles['header-container']}>{children}</div>;\n};\n\nconst DateTime: React.FC<{ date?: string; time?: string }> = ({ date, time }) => {\n if (date || time) {\n return (\n <div className={panelStyles['datetime-container']} data-testid=\"datetime\">\n {date && (\n <div className={panelStyles['datetime-container__icon']}>\n <Icon svgIcon={Calendar} size={IconSize.XSmall} />\n <span>{date}</span>\n </div>\n )}\n {time && (\n <div className={panelStyles['datetime-container__icon']}>\n <Icon svgIcon={Watch} size={IconSize.XSmall} />\n <span>{time}</span>\n </div>\n )}\n </div>\n );\n }\n\n return null;\n};\n\nconst PanelLayout1: React.FC<LayoutProps> = ({\n contentA,\n contentB,\n contentHeader,\n ctaContainer,\n icon,\n status,\n statusMessage,\n titleElement,\n}) => {\n const panelLayoutClasses = classNames(panelStyles['panel__layout-1'], {\n [panelStyles['panel__layout-1--with-icon']]: icon,\n });\n const iconClasses = classNames(panelStyles.panel__icon, panelStyles['panel__icon--layout-1'], {\n [panelStyles['panel__icon--no-content']]: !contentA && !contentB,\n });\n\n return (\n <div className={panelLayoutClasses}>\n <StatusText status={status} statusMessage={statusMessage} />\n <PreContainer>{contentHeader}</PreContainer>\n {icon && <div className={iconClasses}>{icon}</div>}\n <div className={panelStyles['panel__layout-1__content-a']}>\n {titleElement}\n {contentA}\n </div>\n {contentB && <div>{contentB}</div>}\n {ctaContainer}\n </div>\n );\n};\n\nconst PanelLayout2: React.FC<LayoutProps> = ({\n contentA,\n contentB,\n contentHeader,\n ctaContainer,\n icon,\n status,\n statusMessage,\n titleElement,\n}) => {\n const panelLayoutClasses = classNames(panelStyles['panel__layout-2'], {\n [panelStyles['panel__layout-2--with-icon']]: icon,\n });\n const iconClasses = classNames(panelStyles.panel__icon, panelStyles['panel__icon--layout-2'], {\n [panelStyles['panel__icon--no-content']]: !contentA && !contentB,\n });\n const lastColumnClass = panelStyles['panel__layout-2__last-column'];\n\n return (\n <div className={panelLayoutClasses}>\n <StatusText status={status} statusMessage={statusMessage} />\n <PreContainer>{contentHeader}</PreContainer>\n {icon && <div className={iconClasses}>{icon}</div>}\n <div className={panelStyles['panel__layout-2__content-a']}>\n {titleElement}\n {contentA}\n </div>\n {contentB && <div className={lastColumnClass}>{contentB}</div>}\n {ctaContainer && <div className={lastColumnClass}>{ctaContainer}</div>}\n </div>\n );\n};\n\nconst PanelLayout3: React.FC<LayoutProps> = ({\n contentA,\n contentB,\n contentHeader,\n ctaContainer,\n icon,\n layout,\n status,\n statusMessage,\n titleElement,\n}) => {\n const layoutClasses = classNames(panelStyles['panel__layout-3'], {\n [panelStyles['panel__layout-3--with-icon']]: icon,\n [panelStyles['panel__layout-3--a']]: layout === PanelLayout.layout3a,\n [panelStyles['panel__layout-3--b']]: layout === PanelLayout.layout3b,\n [panelStyles['panel__layout-3--c']]: layout === PanelLayout.layout3c,\n });\n const iconClasses = classNames(panelStyles.panel__icon, panelStyles['panel__icon--layout-3'], {\n [panelStyles['panel__icon--no-content']]: !contentA && !contentB,\n });\n\n return (\n <div className={layoutClasses}>\n <StatusText status={status} statusMessage={statusMessage} />\n <PreContainer>{contentHeader}</PreContainer>\n {icon && <div className={iconClasses}>{icon}</div>}\n <div>\n {titleElement}\n {contentA}\n </div>\n <div className={panelStyles['panel__layout-3__last-column']}>\n {contentB && <div className={panelStyles['panel__layout-3__last-column__content-b']}>{contentB}</div>}\n {ctaContainer}\n </div>\n </div>\n );\n};\n\nconst Panel = React.forwardRef(function PanelForwardedRef(props: PanelProps, ref: React.ForwardedRef<HTMLHeadingElement>) {\n const {\n buttonAriaLabel,\n buttonAriaLabelledById,\n buttonText = 'Se detaljer',\n buttonTextClose = 'Skjul detaljer',\n buttonHtmlMarkup = 'a',\n buttonOnClick,\n children,\n className,\n containerAsButton = false,\n contentA,\n contentB,\n contentHeader,\n date,\n expanded = false,\n focusable = false,\n icon,\n layout = PanelLayout.layout2,\n noTopBorder,\n onExpand,\n renderChildrenWhenClosed = false,\n status = PanelStatus.normal,\n statusMessage,\n target = '_self',\n testId,\n time,\n title,\n titleHtmlMarkup = 'h2',\n url,\n variant = PanelVariant.fill,\n } = props;\n\n const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);\n const titleId = useUuid();\n const buttonTextId = useUuid();\n const hasBadge = statusMessage && status === PanelStatus.new;\n const noContentB = typeof contentB === 'undefined';\n const layout1 = layout === 'layout1' || noContentB;\n const layout2 = !noContentB && layout === 'layout2';\n const layout3 = !noContentB && (layout === 'layout3a' || layout === 'layout3b' || layout === 'layout3c');\n const panelWrapperClasses = classNames(panelStyles['panel-wrapper'], className);\n\n const panelClasses = classNames(panelStyles.panel, {\n [panelStyles['panel--fill']]: variant === PanelVariant.fill,\n [panelStyles['panel--stroke']]: variant === PanelVariant.stroke,\n [panelStyles['panel--white']]: variant === PanelVariant.white,\n [panelStyles['panel--line']]: variant === PanelVariant.line,\n [panelStyles['panel--no-top-border']]: variant === PanelVariant.line && noTopBorder,\n [panelStyles['panel--selected']]: isExpanded,\n [panelStyles['panel--new']]: status === PanelStatus.new,\n [panelStyles['panel--draft']]: status === PanelStatus.draft,\n [panelStyles['panel--error']]: status === PanelStatus.error,\n [panelStyles['panel--status']]: status && status !== PanelStatus.normal,\n [panelStyles['panel--with-icon']]: icon,\n [panelStyles['panel--button']]: containerAsButton,\n [panelStyles['panel--clickable']]: children || url || onExpand || buttonOnClick || containerAsButton,\n });\n\n const renderCTAContainer = () => {\n const hasButton = children || url || buttonOnClick;\n const btnContainerClasses = classNames(panelStyles['panel__btn-container'], {\n [panelStyles['panel__btn-container--no-content-b']]: noContentB,\n [panelStyles['panel__btn-container--no-button']]: !hasButton,\n });\n\n return (\n (hasButton || date || time) && (\n <div className={btnContainerClasses}>\n {<DateTime date={date} time={time} />}\n {hasButton && <div className={panelStyles['panel__details-btn']}>{renderDetailsButton()}</div>}\n </div>\n )\n );\n };\n\n const renderDetailsButton = (): React.ReactNode => {\n const ariaLabelAttributes = getAriaLabelAttributes({\n label: buttonAriaLabel,\n id: (buttonAriaLabelledById && `${buttonTextId} ${buttonAriaLabelledById}`) || (title && titleId && `${buttonTextId} ${titleId}`),\n prefer: 'label',\n });\n\n const commonProps: Partial<ButtonProps> & AriaLabelAttributes = {\n onClick: buttonOnClick ? buttonOnClick : (): void => setIsExpanded(!isExpanded),\n className: containerAsButton ? panelStyles['panel__expand'] : undefined,\n variant: 'borderless',\n ellipsis: true,\n ...ariaLabelAttributes,\n };\n\n if (children) {\n return (\n <Button testId=\"expand\" aria-expanded={isExpanded} {...commonProps}>\n <span id={buttonTextId}>{isExpanded ? buttonTextClose : buttonText}</span>\n <Icon svgIcon={isExpanded ? ChevronUp : ChevronDown} />\n </Button>\n );\n }\n\n return (\n <Button testId=\"url\" htmlMarkup={buttonHtmlMarkup} href={url} target={target} {...commonProps}>\n <span id={buttonTextId}>{buttonText}</span>\n <Icon svgIcon={ArrowRight} />\n </Button>\n );\n };\n\n const renderContent = (): React.ReactNode | null => {\n if (!children || (!renderChildrenWhenClosed && !isExpanded)) {\n return null;\n }\n\n const panelDetailsClasses = classNames(panelStyles['panel-details'], {\n [panelStyles['panel-details--open']]: isExpanded,\n [panelStyles['panel-details--line']]: variant === PanelVariant.line,\n [panelStyles['panel-details--white']]: variant === PanelVariant.white,\n [panelStyles['panel-details--with-icon']]: icon,\n });\n\n return (\n <div className={panelDetailsClasses} data-testid=\"panel-details\">\n <div>{children}</div>\n </div>\n );\n };\n\n const renderTitle = () => {\n const titleContainerClasses = classNames(panelStyles['title-container'], {\n [panelStyles['title-container--no-content-a']]: !contentA,\n });\n const titleClasses = classNames(panelStyles['title-container__title'], {\n [panelStyles['title-container__title--badge']]: hasBadge,\n });\n\n return (\n title && (\n <div className={titleContainerClasses}>\n <Title appearance=\"title3\" htmlMarkup={titleHtmlMarkup} id={titleId} className={titleClasses}>\n {title}\n </Title>\n {hasBadge && (\n <div className={panelStyles.panel__badge}>\n <Badge color=\"blueberry\" testId=\"badge-status\">\n {statusMessage}\n </Badge>\n </div>\n )}\n </div>\n )\n );\n };\n\n const layoutProps: LayoutProps = {\n contentA: contentA,\n contentB: contentB,\n contentHeader: contentHeader,\n ctaContainer: renderCTAContainer(),\n icon: icon,\n status: status,\n statusMessage: statusMessage,\n titleElement: renderTitle(),\n };\n\n return (\n <div\n // eslint-disable-next-line no-constant-condition\n tabIndex={focusable ? -1 : undefined}\n ref={ref}\n data-testid={testId}\n className={panelWrapperClasses}\n data-analyticsid={AnalyticsId.Panel}\n >\n <div className={panelClasses}>\n {layout1 && <PanelLayout1 {...layoutProps} />}\n {layout2 && <PanelLayout2 {...layoutProps} />}\n {layout3 && <PanelLayout3 {...layoutProps} layout={layout} />}\n </div>\n {renderContent()}\n </div>\n );\n});\n\nexport default Panel;\n"],"names":["PanelStatus","PanelVariant","PanelLayout","StatusText","status","statusMessage","statusIcon","palette","AlertSignFill","Pencil","statusMessageClass","classNames","panelStyles","Icon","IconSize","React","PreContainer","children","DateTime","date","time","Calendar","Watch","PanelLayout1","contentA","contentB","contentHeader","ctaContainer","icon","titleElement","panelLayoutClasses","iconClasses","PanelLayout2","lastColumnClass","PanelLayout3","layout","layoutClasses","Panel","props","ref","buttonAriaLabel","buttonAriaLabelledById","buttonText","buttonTextClose","buttonHtmlMarkup","buttonOnClick","className","containerAsButton","expanded","focusable","noTopBorder","onExpand","renderChildrenWhenClosed","target","testId","title","titleHtmlMarkup","url","variant","isExpanded","setIsExpanded","useExpand","titleId","useUuid","buttonTextId","hasBadge","noContentB","layout1","layout2","layout3","panelWrapperClasses","panelClasses","renderCTAContainer","hasButton","btnContainerClasses","renderDetailsButton","ariaLabelAttributes","getAriaLabelAttributes","commonProps","Button","ChevronUp","ChevronDown","ArrowRight","renderContent","panelDetailsClasses","renderTitle","titleContainerClasses","titleClasses","Title","Badge","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7EhC,CACH,EACCU,GACClD,EAAA,cAAC,MAAI,CAAA,UAAWH,EAAY,cAC1BG,EAAA,cAAC0E,GAAM,CAAA,MAAM,YAAY,OAAO,cAC7B,EAAApF,CACH,CACF,CAEJ,CAAA,EAKAqF,EAA2B,CAC/B,SAAAlE,EACA,SAAAC,EACA,cAAAC,EACA,aAAc8C,GAAmB,EACjC,KAAA5C,EACA,OAAAxB,EACA,cAAAC,EACA,aAAcgF,GAAY,CAAA,EAI1B,OAAAtE,EAAA,cAAC,MAAA,CAEC,SAAUkC,EAAY,GAAK,OAC3B,IAAAV,EACA,cAAae,EACb,UAAWgB,GACX,mBAAkBqB,GAAY,KAAA,EAE9B5E,EAAA,cAAC,OAAI,UAAWwD,EAAA,EACbJ,GAAYpD,EAAA,cAAAQ,GAAA,CAAc,GAAGmE,CAAa,CAAA,EAC1CtB,mBAAYpC,GAAc,CAAA,GAAG0D,EAAa,EAC1CrB,mBAAYnC,GAAc,CAAA,GAAGwD,EAAa,OAAAvD,CAAgB,CAAA,CAC7D,EACCgD,GAAc,CAAA,CAGrB,CAAC,EAEDS,GAAevD"}
package/PopOver.js DELETED
@@ -1,2 +0,0 @@
1
- import f,{useRef as B,useState as U,useEffect as Z}from"react";import E from"classnames";import{AnalyticsId as $}from"./constants.js";import{useInterval as j}from"./hooks/useInterval.js";import{useIsVisible as k}from"./hooks/useIsVisible.js";import{useLayoutEvent as q}from"./hooks/useLayoutEvent.js";import{useSize as J}from"./hooks/useSize.js";import{mergeRefs as K}from"./utils/refs.js";import u from"./components/PopOver/styles.module.scss";const Q=373,s=12,g=16,C=20,Y=4,L=12,I=(t,o,n)=>n!==r.positionautomatic?n:t.top>o.height+g?r.positionabove:r.positionbelow,W=t=>t.left+t.width/2,z=t=>document.documentElement.clientWidth-t.right+t.width/2,m=(t,o)=>W(t)-o.width/2,S=(t,o)=>m(t,o)+o.width,tt=(t,o)=>m(t,o)>s,ot=(t,o)=>S(t,o)<document.documentElement.clientWidth-s,et=(t,o)=>ot(t,o)?tt(t,o)?"floating":"left":"right",P=(t,o)=>t.top-g-o.height,w=t=>t.bottom+g,nt=()=>document.documentElement.clientWidth-s*2,it=()=>document.documentElement.clientWidth>Q+s*2,A=t=>t.top-g-Y,rt=t=>W(t)-C/2,st=t=>z(t)-C/2,lt=(t,o,n)=>{const i=et(t,o),e=I(t,o,n);return i==="left"?e===r.positionabove?"leftabove":"leftbelow":i==="right"?e===r.positionabove?"rightabove":"rightbelow":e===r.positionabove?"floatingabove":"floatingbelow"},ct=(t,o,n)=>{const i=lt(t,o,n),e=it()?void 0:nt();return i==="leftabove"?{left:s,top:P(t,o),width:e}:i==="leftbelow"?{left:s,top:w(t),width:e}:i==="rightabove"?{right:s,top:P(t,o),width:e}:i==="rightbelow"?{right:s,top:w(t),width:e}:i==="floatingbelow"?{left:m(t,o),top:w(t),width:e}:{left:m(t,o),top:P(t,o),width:e}},at=(t,o,n)=>{const i=rt(o),e=st(o),l=t.left+L,c=t.right+L;return t.right?n===r.positionabove?{right:e>c?e:c,top:A(o)}:{right:e>c?e:c,top:o.bottom}:n===r.positionabove?{left:i>l?i:l,top:A(o)}:{left:i>l?i:l,top:o.bottom}};var r=(t=>(t.positionautomatic="positionautomatic",t.positionbelow="positionbelow",t.positionabove="positionabove",t))(r||{});const O=f.forwardRef((t,o)=>{const{id:n,children:i,controllerRef:e,popOverRef:l,show:c=!1,className:N="",variant:v="positionautomatic",role:R,testId:y,arrowClassName:T}=t,x=l||B(null),F=B(null),p=J(x),[a,H]=U(),X=k(e,0),h=()=>{var _;H((_=e.current)==null?void 0:_.getBoundingClientRect())};j(h,500),q(h,["scroll","resize"],10),Z(()=>{h()},[]);const V=R==="tooltip",D=E(u.popover,{[u["popover--visible"]]:V?c:X},N),b=a&&p&&I(a,p,v),G=E(u.popover__arrow,T,{[u["popover__arrow--over"]]:b==="positionbelow",[u["popover__arrow--under"]]:b==="positionabove"}),d=a&&p&&ct(a,p,v),M=d&&a&&b&&at(d,a,b);return f.createElement(f.Fragment,null,f.createElement("div",{id:n,ref:K([o,x]),className:D,style:d,"data-testid":y,"data-analyticsid":$.PopOver,role:R},i),f.createElement("div",{ref:F,className:G,style:M}))});O.displayName="PopOver";const wt=O;export{r as P,wt as a};
2
- //# sourceMappingURL=PopOver.js.map
package/PopOver.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"PopOver.js","sources":["../src/components/PopOver/utils.ts","../src/components/PopOver/PopOver.tsx"],"sourcesContent":["import { CSSProperties } from 'react';\n\nimport { PopOverVariant } from './PopOver';\n\ntype HorizontalPosition = 'left' | 'right' | 'floating';\ntype BubblePosition = 'leftabove' | 'leftbelow' | 'rightabove' | 'rightbelow' | 'floatingabove' | 'floatingbelow';\n\n/** Bredde på hjelpeboble */\nconst BUBBLE_WIDTH_PX = 373;\n/** Hjelpeboblen skal holde avstand til venstre/høyre kant på vinduet */\nconst WINDOW_MARGIN_PX = 12;\n/** Vertikal avstand fra hjelpeboble til kontroller */\nconst BUBBLE_VERTICAL_OFFSET_PX = 16;\n/** Høyde/bredde på pil */\nconst ARROW_WIDTH_PX = 20;\n/** Avstand fra pil til hjelpeboble */\nconst ARROW_VERTICAL_OFFSET_PX = 4;\n/** Pilen skal holde avstand til venstre/høyre kant av hjelpeboblen */\nconst ARROW_HORIZONTAL_MARGIN_PX = 12;\n\n/**\n * Beregn om hjelpeboblen skal vises over eller under kontrolleren\n * @param controllerSize DOMRect for controlleren\n * @param bubbleSize DOMRect for hjelpeboblen\n * @param variant Ønsket plassering av hjelpeboblen (over/under/automatisk)\n * @returns Om hjelpeboblen skal vises over eller under\n */\nexport const getVerticalPosition = (\n controllerSize: DOMRect,\n bubbleSize: DOMRect,\n variant: keyof typeof PopOverVariant\n): keyof typeof PopOverVariant => {\n if (variant !== PopOverVariant.positionautomatic) {\n return variant;\n }\n if (controllerSize.top > bubbleSize.height + BUBBLE_VERTICAL_OFFSET_PX) {\n return PopOverVariant.positionabove;\n } else {\n return PopOverVariant.positionbelow;\n }\n};\n\n/**\n * Finn horisontalt midtpunkt på kontrolleren i forhold til venstre kant av vinduet\n * @param controllerSize DOMRect for controlleren\n * @returns Horisontalt senter av controlleren i px\n */\nconst getControllerLeftCenterPx = (controllerSize: DOMRect): number => controllerSize.left + controllerSize.width / 2;\n\n/**\n * Finn horisontalt midtpunkt på kontrolleren i forhold til høyre kant av vinduet\n * @param controllerSize DOMRect for controlleren\n * @returns Horisontalt senter av controlleren i px\n */\nconst getControllerRightCenterPx = (controllerSize: DOMRect): number =>\n document.documentElement.clientWidth - controllerSize.right + controllerSize.width / 2;\n\n/**\n * Finn venstre kant av hjelpeboblen i forhold til kontrolleren\n * @param controllerSize DOMRect for controlleren\n * @param bubbleSize DOMRect for hjelpeboblen\n * @returns Venstre kant av hjelpeboblen i px\n */\nconst getBubbleLeftPx = (controllerSize: DOMRect, bubbleSize: DOMRect): number => {\n const controllerHorizontalCenterPx = getControllerLeftCenterPx(controllerSize);\n\n return controllerHorizontalCenterPx - bubbleSize.width / 2;\n};\n\n/**\n * Finn høyre kant av hjelpeboblen i forhold til kontrolleren\n * @param controllerSize DOMRect for controlleren\n * @param bubbleSize DOMRect for hjelpeboblen\n * @returns Høyre kant av hjelpeboblen i px\n */\nconst getBubbleRightPx = (controllerSize: DOMRect, bubbleSize: DOMRect): number => {\n const bubbleLeftPx = getBubbleLeftPx(controllerSize, bubbleSize);\n\n return bubbleLeftPx + bubbleSize.width;\n};\n\n/**\n * Sjekk om venstre kant av hjelpeboblen er innenfor vinduet\n * @param controllerSize DOMRect for controlleren\n * @param bubbleSize DOMRect for hjelpeboblen\n * @returns true dersom venstre kant er innenfor vinduet\n */\nconst getBubbleLeftVisible = (controllerSize: DOMRect, bubbleSize: DOMRect): boolean => {\n const bubbleLeftPx = getBubbleLeftPx(controllerSize, bubbleSize);\n\n return bubbleLeftPx > WINDOW_MARGIN_PX;\n};\n\n/**\n * Sjekk om høyre kant av hjelpeboblen er innenfor vinduet\n * @param controllerSize DOMRect for controlleren\n * @param bubbleSize DOMRect for hjelpeboblen\n * @returns true dersom høyre kant er innenfor vinduet\n */\nconst getBubbleRightIsVisible = (controllerSize: DOMRect, bubbleSize: DOMRect): boolean => {\n const bubbleRightPx = getBubbleRightPx(controllerSize, bubbleSize);\n\n return bubbleRightPx < document.documentElement.clientWidth - WINDOW_MARGIN_PX;\n};\n\n/**\n * Finn riktig horisontal plassering til hjelpeboblen\n * @param controllerSize DOMRect for controlleren\n * @param bubbleSize DOMRect for hjelpeboblen\n * @returns left, right eller floating\n */\nconst getHorizontalPosition = (controllerSize: DOMRect, bubbleSize: DOMRect): HorizontalPosition => {\n if (!getBubbleRightIsVisible(controllerSize, bubbleSize)) {\n return 'right';\n }\n if (!getBubbleLeftVisible(controllerSize, bubbleSize)) {\n return 'left';\n }\n\n return 'floating';\n};\n\n/**\n * Finn vertikal plassering av hjelpeboblen når den skal vises over\n * @param controllerSize DOMRect for controlleren\n * @param bubbleSize DOMRect for hjelpeboblen\n * @returns \"Top\" for hjelpeboblen i px\n */\nconst getBubbleAbovePx = (controllerSize: DOMRect, bubbleSize: DOMRect): number =>\n controllerSize.top - BUBBLE_VERTICAL_OFFSET_PX - bubbleSize.height;\n\n/**\n * Finn vertikal plassering av hjelpeboblen når den skal vises under\n * @param controllerSize DOMRect for controlleren\n * @param bubbleSize DOMRect for hjelpeboblen\n * @returns \"Top\" for hjelpeboblen i px\n */\nconst getBubbleBelowPx = (controllerSize: DOMRect): number => controllerSize.bottom + BUBBLE_VERTICAL_OFFSET_PX;\n\n/**\n * Finn maks bredde på hjelpeboblen i forhold til vinduet\n * @returns Bredde på hjelpeboblen i px\n */\nconst getBubbleWidth = (): number => document.documentElement.clientWidth - WINDOW_MARGIN_PX * 2;\n\n/**\n * Sjekk om hjelpeboblen har plass i vinduet\n * @returns true dersom det er plass til hjelpeboblen i vinduet\n */\nconst getBubbleFitsInWindow = (): boolean => {\n return document.documentElement.clientWidth > BUBBLE_WIDTH_PX + WINDOW_MARGIN_PX * 2;\n};\n\n/**\n * Finn vertikal plassering av pilen når den skal vises over\n * @param controllerSize DOMRect for controlleren\n * @returns \"Top\" for pilen i px\n */\nconst getArrowTopxPx = (controllerSize: DOMRect): number => controllerSize.top - BUBBLE_VERTICAL_OFFSET_PX - ARROW_VERTICAL_OFFSET_PX;\n\n/**\n * Finn horisontal plassering av pilen i forhold til venstre kant av vinduet\n * @param controllerSize DOMRect for controlleren\n * @returns Venstre kant av pilen i px\n */\nconst getArrowLeftPx = (controllerSize: DOMRect): number => getControllerLeftCenterPx(controllerSize) - ARROW_WIDTH_PX / 2;\n\n/**\n * Finn horisontal plassering av pilen\n * @param controllerSize DOMRect for controlleren\n * @returns Venstre kant av pilen i px\n */\nconst getArrowRightPx = (controllerSize: DOMRect): number => getControllerRightCenterPx(controllerSize) - ARROW_WIDTH_PX / 2;\n\n/**\n * Finn riktig plassering av hjelpeboblen\n * @param controllerSize DOMRect for controlleren\n * @param bubbleSize DOMRect for hjelpeboblen\n * @param variant Ønsket plassering av hjelpeboblen (over/under)\n * @returns Beste mulige plassering av hjelpeboblen\n */\nconst getBubblePosition = (controllerSize: DOMRect, bubbleSize: DOMRect, variant: keyof typeof PopOverVariant): BubblePosition => {\n const horizontalPosition = getHorizontalPosition(controllerSize, bubbleSize);\n const verticalPosition = getVerticalPosition(controllerSize, bubbleSize, variant);\n\n if (horizontalPosition === 'left') {\n if (verticalPosition === PopOverVariant.positionabove) {\n return 'leftabove';\n }\n return 'leftbelow';\n }\n\n if (horizontalPosition === 'right') {\n if (verticalPosition === PopOverVariant.positionabove) {\n return 'rightabove';\n }\n return 'rightbelow';\n }\n\n if (verticalPosition === PopOverVariant.positionabove) {\n return 'floatingabove';\n }\n\n return 'floatingbelow';\n};\n\n/**\n * Finn riktig plassering av hjelpeboblen\n * @param controllerSize DOMRect for controlleren\n * @param bubbleSize DOMRect for hjelpeboblen\n * @param variant Ønsket plassering av hjelpeboblen (over/under)\n * @returns CSSProperties som plasserer hjelpeboblen riktig\n */\nexport const getBubbleStyle = (controllerSize: DOMRect, bubbleSize: DOMRect, variant: keyof typeof PopOverVariant): CSSProperties => {\n const bubblePosition = getBubblePosition(controllerSize, bubbleSize, variant);\n const bubbleWidth = !getBubbleFitsInWindow() ? getBubbleWidth() : undefined;\n\n if (bubblePosition === 'leftabove') {\n return {\n left: WINDOW_MARGIN_PX,\n top: getBubbleAbovePx(controllerSize, bubbleSize),\n width: bubbleWidth,\n };\n }\n if (bubblePosition === 'leftbelow') {\n return { left: WINDOW_MARGIN_PX, top: getBubbleBelowPx(controllerSize), width: bubbleWidth };\n }\n if (bubblePosition === 'rightabove') {\n return { right: WINDOW_MARGIN_PX, top: getBubbleAbovePx(controllerSize, bubbleSize), width: bubbleWidth };\n }\n if (bubblePosition === 'rightbelow') {\n return { right: WINDOW_MARGIN_PX, top: getBubbleBelowPx(controllerSize), width: bubbleWidth };\n }\n\n if (bubblePosition === 'floatingbelow') {\n return { left: getBubbleLeftPx(controllerSize, bubbleSize), top: getBubbleBelowPx(controllerSize), width: bubbleWidth };\n }\n\n return { left: getBubbleLeftPx(controllerSize, bubbleSize), top: getBubbleAbovePx(controllerSize, bubbleSize), width: bubbleWidth };\n};\n\n/**\n * Finn riktig plassering av pilen\n * @param bubbleStyle CSSProperties for hjelpeboblen\n * @param controllerSize DOMRect for kontrolleren\n * @param verticalPosition Ønsket plassering av hjelpeboblen (over/under)\n * @returns CSSProperties som plasserer pilen riktig\n */\nexport const getArrowStyle = (\n bubbleStyle: CSSProperties,\n controllerSize: DOMRect,\n verticalPosition: keyof typeof PopOverVariant\n): CSSProperties => {\n const leftPx = getArrowLeftPx(controllerSize);\n const rightPx = getArrowRightPx(controllerSize);\n const minLeftPx = (bubbleStyle.left as number) + ARROW_HORIZONTAL_MARGIN_PX;\n const minRightPx = (bubbleStyle.right as number) + ARROW_HORIZONTAL_MARGIN_PX;\n\n if (bubbleStyle.right) {\n if (verticalPosition === PopOverVariant.positionabove) {\n return {\n right: rightPx > minRightPx ? rightPx : minRightPx,\n top: getArrowTopxPx(controllerSize),\n };\n }\n\n return {\n right: rightPx > minRightPx ? rightPx : minRightPx,\n top: controllerSize.bottom,\n };\n }\n\n if (verticalPosition === PopOverVariant.positionabove) {\n return {\n left: leftPx > minLeftPx ? leftPx : minLeftPx,\n top: getArrowTopxPx(controllerSize),\n };\n }\n\n return {\n left: leftPx > minLeftPx ? leftPx : minLeftPx,\n top: controllerSize.bottom,\n };\n};\n","import React, { useEffect, useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { getArrowStyle, getBubbleStyle, getVerticalPosition } from './utils';\nimport { AnalyticsId } from '../../constants';\nimport { useInterval } from '../../hooks/useInterval';\nimport { useIsVisible } from '../../hooks/useIsVisible';\nimport { useLayoutEvent } from '../../hooks/useLayoutEvent';\nimport { useSize } from '../../hooks/useSize';\nimport { mergeRefs } from '../../utils/refs';\n\nimport styles from './styles.module.scss';\n\nexport enum PopOverVariant {\n positionautomatic = 'positionautomatic',\n positionbelow = 'positionbelow',\n positionabove = 'positionabove',\n}\n\nexport type PopOverRole = 'tooltip';\n\nexport interface PopOverProps {\n /** Id of the PopOver */\n id?: string;\n /** Content shown inside PopOver. Note that if role=\"tooltip\", you must not include interactive/focusable elements. */\n children: React.ReactNode;\n /** Ref for the element the PopOver is placed upon */\n controllerRef: React.RefObject<HTMLElement | SVGSVGElement>;\n /** Ref for the element the PopOver is placed upon */\n popOverRef?: React.RefObject<HTMLDivElement>;\n /** Show the popover. Only applies when role=tooltip. Default: false. */\n show?: boolean;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the arrow element. */\n arrowClassName?: string;\n /** Determines the placement of the popover. Default: automatic positioning. */\n variant?: keyof typeof PopOverVariant;\n /** Sets role of the PopOver element */\n role?: PopOverRole;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst PopOver = React.forwardRef<HTMLDivElement | SVGSVGElement, PopOverProps>((props, ref) => {\n const {\n id,\n children,\n controllerRef,\n popOverRef,\n show = false,\n className = '',\n variant = PopOverVariant.positionautomatic,\n role,\n testId,\n arrowClassName,\n } = props;\n\n const bubbleRef = popOverRef || useRef<HTMLDivElement>(null);\n const arrowRef = useRef<HTMLDivElement>(null);\n const bubbleSize = useSize(bubbleRef);\n const [controllerSize, setControllerSize] = useState<DOMRect>();\n const controllerisVisible = useIsVisible(controllerRef, 0);\n\n const updateControllerSize = (): void => {\n setControllerSize(controllerRef.current?.getBoundingClientRect());\n };\n\n useInterval(updateControllerSize, 500);\n useLayoutEvent(updateControllerSize, ['scroll', 'resize'], 10);\n\n useEffect(() => {\n updateControllerSize();\n }, []);\n\n const isTooltip = role === 'tooltip';\n\n const popOverClasses = classNames(styles.popover, { [styles['popover--visible']]: isTooltip ? show : controllerisVisible }, className);\n const verticalPosition = controllerSize && bubbleSize && getVerticalPosition(controllerSize, bubbleSize, variant);\n const arrowClasses = classNames(styles.popover__arrow, arrowClassName, {\n [styles['popover__arrow--over']]: verticalPosition === PopOverVariant.positionbelow,\n [styles['popover__arrow--under']]: verticalPosition === PopOverVariant.positionabove,\n });\n\n const bubbleStyle = controllerSize && bubbleSize && getBubbleStyle(controllerSize, bubbleSize, variant);\n const arrowStyle = bubbleStyle && controllerSize && verticalPosition && getArrowStyle(bubbleStyle, controllerSize, verticalPosition);\n\n return (\n <>\n <div\n id={id}\n ref={mergeRefs([ref, bubbleRef])}\n className={popOverClasses}\n style={bubbleStyle}\n data-testid={testId}\n data-analyticsid={AnalyticsId.PopOver}\n role={role}\n >\n {children}\n </div>\n <div ref={arrowRef} className={arrowClasses} style={arrowStyle} />\n </>\n );\n});\n\nPopOver.displayName = 'PopOver';\n\nexport default PopOver;\n"],"names":["BUBBLE_WIDTH_PX","WINDOW_MARGIN_PX","BUBBLE_VERTICAL_OFFSET_PX","ARROW_WIDTH_PX","ARROW_VERTICAL_OFFSET_PX","ARROW_HORIZONTAL_MARGIN_PX","getVerticalPosition","controllerSize","bubbleSize","variant","PopOverVariant","getControllerLeftCenterPx","getControllerRightCenterPx","getBubbleLeftPx","getBubbleRightPx","getBubbleLeftVisible","getBubbleRightIsVisible","getHorizontalPosition","getBubbleAbovePx","getBubbleBelowPx","getBubbleWidth","getBubbleFitsInWindow","getArrowTopxPx","getArrowLeftPx","getArrowRightPx","getBubblePosition","horizontalPosition","verticalPosition","getBubbleStyle","bubblePosition","bubbleWidth","getArrowStyle","bubbleStyle","leftPx","rightPx","minLeftPx","minRightPx","PopOver","React","props","ref","id","children","controllerRef","popOverRef","show","className","role","testId","arrowClassName","bubbleRef","useRef","arrowRef","useSize","setControllerSize","useState","controllerisVisible","useIsVisible","updateControllerSize","_a","useInterval","useLayoutEvent","useEffect","isTooltip","popOverClasses","classNames","styles","arrowClasses","arrowStyle","mergeRefs","AnalyticsId","PopOver$1"],"mappings":"6bAQA,MAAMA,EAAkB,IAElBC,EAAmB,GAEnBC,EAA4B,GAE5BC,EAAiB,GAEjBC,EAA2B,EAE3BC,EAA6B,GAStBC,EAAsB,CACjCC,EACAC,EACAC,IAEIA,IAAYC,EAAe,kBACtBD,EAELF,EAAe,IAAMC,EAAW,OAASN,EACpCQ,EAAe,cAEfA,EAAe,cASpBC,EAA6BJ,GAAoCA,EAAe,KAAOA,EAAe,MAAQ,EAO9GK,EAA8BL,GAClC,SAAS,gBAAgB,YAAcA,EAAe,MAAQA,EAAe,MAAQ,EAQjFM,EAAkB,CAACN,EAAyBC,IACXG,EAA0BJ,CAAc,EAEvCC,EAAW,MAAQ,EASrDM,EAAmB,CAACP,EAAyBC,IAC5BK,EAAgBN,EAAgBC,CAAU,EAEzCA,EAAW,MAS7BO,GAAuB,CAACR,EAAyBC,IAChCK,EAAgBN,EAAgBC,CAAU,EAEzCP,EASlBe,GAA0B,CAACT,EAAyBC,IAClCM,EAAiBP,EAAgBC,CAAU,EAE1C,SAAS,gBAAgB,YAAcP,EAS1DgB,GAAwB,CAACV,EAAyBC,IACjDQ,GAAwBT,EAAgBC,CAAU,EAGlDO,GAAqBR,EAAgBC,CAAU,EAI7C,WAHE,O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EAAAhB,EAAc,UAAd,YAAAgB,EAAuB,uBAAuB,CAAA,EAGlEC,EAAYF,EAAsB,GAAG,EACrCG,EAAeH,EAAsB,CAAC,SAAU,QAAQ,EAAG,EAAE,EAE7DI,EAAU,IAAM,CACOJ,GACvB,EAAG,CAAE,CAAA,EAEL,MAAMK,EAAYhB,IAAS,UAErBiB,EAAiBC,EAAWC,EAAO,QAAS,CAAE,CAACA,EAAO,kBAAkB,CAAC,EAAGH,EAAYlB,EAAOW,GAAuBV,CAAS,EAC/HnB,EAAmBpB,GAAkBC,GAAcF,EAAoBC,EAAgBC,EAAYC,CAAO,EAC1G0D,EAAeF,EAAWC,EAAO,eAAgBjB,EAAgB,CACrE,CAACiB,EAAO,sBAAsB,CAAC,EAAGvC,IAAqB,gBACvD,CAACuC,EAAO,uBAAuB,CAAC,EAAGvC,IAAqB,eAAA,CACzD,EAEKK,EAAczB,GAAkBC,GAAcoB,GAAerB,EAAgBC,EAAYC,CAAO,EAChG2D,EAAapC,GAAezB,GAAkBoB,GAAoBI,GAAcC,EAAazB,EAAgBoB,CAAgB,EAEnI,OAEIW,EAAA,cAAAA,EAAA,SAAA,KAAAA,EAAA,cAAC,MAAA,CACC,GAAAG,EACA,IAAK4B,EAAU,CAAC7B,EAAKU,CAAS,CAAC,EAC/B,UAAWc,EACX,MAAOhC,EACP,cAAagB,EACb,mBAAkBsB,EAAY,QAC9B,KAAAvB,CAAA,EAECL,CACH,kBACC,MAAI,CAAA,IAAKU,EAAU,UAAWe,EAAc,MAAOC,CAAA,CAAY,CAClE,CAEJ,CAAC,EAED/B,EAAQ,YAAc,UAEtB,MAAAkC,GAAelC"}
package/RadioButton.js DELETED
@@ -1,2 +0,0 @@
1
- import p,{useState as D}from"react";import s from"classnames";import{FormMode as d,FormVariant as V,AnalyticsId as W}from"./constants.js";import{usePseudoClasses as $}from"./hooks/usePseudoClasses.js";import{isMutableRefObject as z,mergeRefs as G}from"./utils/refs.js";import{u as H}from"./uuid.js";import{g as J,r as K}from"./Label.js";import o from"./components/RadioButton/styles.module.scss";const ro=(b,r,a,l)=>{const n=r==="oninvalid",e=b===l;return s({[o["radio-button-label__bigform--on-grey"]]:a&&r==="ongrey"&&!e,[o["radio-button-label__bigform--on-blueberry"]]:r==="onblueberry"&&!e&&a,[o["radio-button-label__bigform--selected"]]:a&&e&&!n,[o["radio-button-label__bigform--selected-invalid"]]:a&&e&&n})},h=p.forwardRef((b,r)=>{const{className:a,defaultChecked:l=!1,onChange:n,disabled:e,label:g,inputId:f=H(),mode:i=d.onwhite,name:C=f,variant:w,errorText:u,error:R=!!u,value:k=J(g),testId:B,required:N,labelClassNames:L,...x}=b,_=R||i===d.oninvalid,y=i===d.ondark,v=i===d.onblueberry,E=i===d.oninvalid,t=w===V.bigform,[F,I]=D(l),{refObject:S,isFocused:c}=$(z(r)?r:null),j=G([r,S]),A=s(o["radio-button-wrapper"],{[o["radio-button-wrapper--with-error"]]:u,[o["radio-button-wrapper__bigform"]]:t,[o["radio-button-wrapper__bigform--focused"]]:t&&c,[o["radio-button-wrapper__bigform--selected"]]:t&&F&&c,[o["radio-button-wrapper__bigform--invalid"]]:t&&E&&c,[o["radio-button-wrapper__bigform--on-blueberry"]]:t&&v&&c}),M=s(o["radio-button-label"],{[o["radio-button-label--disabled"]]:e,[o["radio-button-label--on-dark"]]:y,[o["radio-button-label--invalid"]]:_,[o["radio-button-label__bigform"]]:t,[o["radio-button-label__bigform--disabled"]]:t&&e},L),O=s(o["radio-button"],{[o["radio-button--on-dark"]]:y,[o["radio-button--disabled"]]:e,[o["radio-button--on-blueberry"]]:v,[o["radio-button--invalid"]]:_,[o["radio-button__bigform"]]:t,[o["radio-button__bigform--disabled"]]:t&&e,[o["radio-button__bigform--invalid"]]:t&&_},a),P=s(o["radio-button-errors"]),T=m=>{I(m.target.checked),n&&n(m)},q=()=>p.createElement("input",{id:f,name:C,className:O,type:"radio",disabled:e,value:k,ref:j,defaultChecked:l,"aria-describedby":b["aria-describedby"]??void 0,required:N,...x,onChange:m=>T(m)});return p.createElement("div",{"data-testid":B,"data-analyticsid":W.RadioButton,className:A},u&&p.createElement("p",{className:P},u),K(g,q(),f,i,e,M,void 0,o["radiobutton-sublabel-wrapper"],t))});h.displayName="RadioButton";const ao=h;export{ao as R,h as a,ro as g};
2
- //# sourceMappingURL=RadioButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioButton.js","sources":["../src/components/RadioButton/RadioButton.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, FormMode, FormVariant } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport { uuid } from '../../utils/uuid';\nimport { getLabelText, renderLabelAsParent } from '../Label';\n\nimport radioButtonStyles from './styles.module.scss';\n\nexport interface RadioButtonProps\n extends Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'aria-describedby' | 'name' | 'value' | 'disabled' | 'defaultChecked' | 'required' | 'onChange'\n > {\n /** Adds custom classes to the element. */\n className?: string;\n /** The <Label/> next to the radioButton - sublabels kan ikke kombineres med bigform variant */\n label: React.ReactNode;\n /** Adds custom classes to the label element. */\n labelClassNames?: string;\n /** input id of the radioButton */\n inputId?: string;\n /** Changes the visuals of the radioButton */\n mode?: keyof typeof FormMode;\n /** Changes the visuals of the radioButton */\n variant?: keyof typeof FormVariant;\n /** Activates Error style for the radioButton - This is can be true while errorText is empty, when in a FormGroup */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const getRadioLabelClasses = (radioId: string, mode: FormMode, bigform: boolean, checkedRadioId?: string): string | undefined => {\n const onCherry = mode === 'oninvalid';\n const checked = radioId === checkedRadioId;\n\n return classNames({\n [radioButtonStyles['radio-button-label__bigform--on-grey']]: bigform && mode === 'ongrey' && !checked,\n [radioButtonStyles['radio-button-label__bigform--on-blueberry']]: mode === 'onblueberry' && !checked && bigform,\n [radioButtonStyles['radio-button-label__bigform--selected']]: bigform && checked && !onCherry,\n [radioButtonStyles['radio-button-label__bigform--selected-invalid']]: bigform && checked && onCherry,\n });\n};\n\nexport const RadioButton = React.forwardRef((props: RadioButtonProps, ref: React.Ref<HTMLInputElement>) => {\n const {\n className,\n defaultChecked = false,\n onChange,\n disabled,\n label,\n inputId = uuid(),\n mode = FormMode.onwhite,\n name = inputId,\n variant,\n errorText,\n error = !!errorText,\n value = getLabelText(label),\n testId,\n required,\n labelClassNames,\n ...rest\n } = props;\n const invalid = error || mode === FormMode.oninvalid;\n const onDark = mode === FormMode.ondark;\n const onBlueberry = mode === FormMode.onblueberry;\n const onCherry = mode === FormMode.oninvalid;\n const bigform = variant === FormVariant.bigform;\n const [checked, changeChecked] = useState<boolean>(defaultChecked);\n const { refObject, isFocused } = usePseudoClasses<HTMLInputElement>(isMutableRefObject(ref) ? ref : null);\n const mergedRefs = mergeRefs([ref, refObject]);\n\n const radioButtonWrapperClasses = classNames(radioButtonStyles['radio-button-wrapper'], {\n [radioButtonStyles['radio-button-wrapper--with-error']]: errorText,\n [radioButtonStyles['radio-button-wrapper__bigform']]: bigform,\n [radioButtonStyles['radio-button-wrapper__bigform--focused']]: bigform && isFocused,\n [radioButtonStyles['radio-button-wrapper__bigform--selected']]: bigform && checked && isFocused,\n [radioButtonStyles['radio-button-wrapper__bigform--invalid']]: bigform && onCherry && isFocused,\n [radioButtonStyles['radio-button-wrapper__bigform--on-blueberry']]: bigform && onBlueberry && isFocused,\n });\n const radioButtonLabelClasses = classNames(\n radioButtonStyles['radio-button-label'],\n {\n [radioButtonStyles['radio-button-label--disabled']]: disabled,\n [radioButtonStyles['radio-button-label--on-dark']]: onDark,\n [radioButtonStyles['radio-button-label--invalid']]: invalid,\n [radioButtonStyles['radio-button-label__bigform']]: bigform,\n [radioButtonStyles['radio-button-label__bigform--disabled']]: bigform && disabled,\n },\n labelClassNames\n );\n const radioButtonClasses = classNames(\n radioButtonStyles['radio-button'],\n {\n [radioButtonStyles['radio-button--on-dark']]: onDark,\n [radioButtonStyles['radio-button--disabled']]: disabled,\n [radioButtonStyles['radio-button--on-blueberry']]: onBlueberry,\n [radioButtonStyles['radio-button--invalid']]: invalid,\n [radioButtonStyles['radio-button__bigform']]: bigform,\n [radioButtonStyles['radio-button__bigform--disabled']]: bigform && disabled,\n [radioButtonStyles['radio-button__bigform--invalid']]: bigform && invalid,\n },\n className\n );\n const errorStyles = classNames(radioButtonStyles['radio-button-errors']);\n\n const change = (e: React.ChangeEvent<HTMLInputElement>): void => {\n changeChecked(e.target.checked);\n onChange && onChange(e);\n };\n\n const getLabelContent = (): React.ReactNode => (\n <input\n id={inputId}\n name={name}\n className={radioButtonClasses}\n type=\"radio\"\n disabled={disabled}\n value={value}\n ref={mergedRefs}\n defaultChecked={defaultChecked}\n aria-describedby={props['aria-describedby'] ?? undefined}\n required={required}\n {...rest}\n onChange={(e): void => change(e)}\n />\n );\n\n return (\n <div data-testid={testId} data-analyticsid={AnalyticsId.RadioButton} className={radioButtonWrapperClasses}>\n {errorText && <p className={errorStyles}>{errorText}</p>}\n {renderLabelAsParent(\n label,\n getLabelContent(),\n inputId,\n mode as FormMode,\n disabled,\n radioButtonLabelClasses,\n undefined,\n radioButtonStyles['radiobutton-sublabel-wrapper'],\n bigform\n )}\n </div>\n );\n});\n\nRadioButton.displayName = 'RadioButton';\n\nexport default RadioButton;\n"],"names":["getRadioLabelClasses","radioId","mode","bigform","checkedRadioId","onCherry","checked","classNames","radioButtonStyles","RadioButton","React","props","ref","className","defaultChecked","onChange","disabled","label","inputId","uuid","FormMode","name","variant","errorText","error","value","getLabelText","testId","required","labelClassNames","rest","invalid","onDark","onBlueberry","FormVariant","changeChecked","useState","refObject","isFocused","usePseudoClasses","isMutableRefObject","mergedRefs","mergeRefs","radioButtonWrapperClasses","radioButtonLabelClasses","radioButtonClasses","errorStyles","change","e","getLabelContent","AnalyticsId","renderLabelAsParent","RadioButton$1"],"mapp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iB,EACC,GAAGE,EACJ,SAAWkB,GAAYD,EAAOC,CAAC,CAAA,CAAA,EAInC,OACGtC,EAAA,cAAA,MAAA,CAAI,cAAaiB,EAAQ,mBAAkBuB,EAAY,YAAa,UAAWP,CAAA,EAC7EpB,GAAcb,EAAA,cAAA,IAAA,CAAE,UAAWoC,CAAA,EAAcvB,CAAU,EACnD4B,EACClC,EACAgC,EAAgB,EAChB/B,EACAhB,EACAc,EACA4B,EACA,OACApC,EAAkB,8BAA8B,EAChDL,CAAA,CAEJ,CAEJ,CAAC,EAEDM,EAAY,YAAc,cAE1B,MAAA2C,GAAe3C"}
package/Select.js DELETED
@@ -1,2 +0,0 @@
1
- import t from"react";import b from"classnames";import{FormMode as T,AnalyticsId as _,IconSize as $,AVERAGE_CHARACTER_WIDTH_PX as q}from"./constants.js";import{useUuid as z}from"./hooks/useUuid.js";import{getColor as f}from"./theme/currys/color.js";import{E as D}from"./ErrorWrapper.js";import{Icon as F}from"./components/Icons/Icon.js";import H from"./components/Icons/ChevronDown.js";import{a as L}from"./Label.js";import e from"./components/Select/styles.module.scss";const M=a=>{const r="2rem";return`calc(${a*q}px + ${r})`},V=(a,r)=>r?f("neutral",500):f(a?"cherry":"blueberry",600),X=t.forwardRef(function(r,s){const{afterLabelChildren:B,className:v,children:w,concept:y="normal",disabled:o,error:C,errorText:c,label:E,selectId:i,name:h=i,mode:l=T.onwhite,testId:I,width:d,required:m,value:S,defaultValue:N,...R}=r,p=z(i),u=l==="onblueberry",n=l==="oninvalid"||!!c||!!C,W=V(n,!!o),g=d?M(d):void 0,x=b(e["select-inner-wrapper"],{[e["select-inner-wrapper--transparent"]]:y==="transparent",[e["select-inner-wrapper--on-blueberry"]]:u,[e["select-inner-wrapper--invalid"]]:n,[e["select-inner-wrapper--disabled"]]:o},v),A=b(e.select,{[e["select--on-blueberry"]]:u,[e["select--invalid"]]:n});return t.createElement(D,{errorText:c},t.createElement("div",{"data-testid":I,"data-analyticsid":_.Select,className:e["select-wrapper"],style:{maxWidth:g}},L(E,p,l,o),t.createElement("div",{className:x},t.createElement(F,{className:e["select-arrow"],svgIcon:H,color:W,size:$.XSmall}),t.createElement("select",{"aria-invalid":!!n,id:p,name:h,className:A,disabled:o,ref:s,required:m,"aria-describedby":r["aria-describedby"]??void 0,"aria-required":!!m,value:S,defaultValue:N,...R},w))))}),Z=X;export{Z as S,X as a};
2
- //# sourceMappingURL=Select.js.map
package/Select.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Select.js","sources":["../src/components/Select/Select.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, AVERAGE_CHARACTER_WIDTH_PX, FormMode, IconSize } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon from '../Icons';\nimport ChevronDown from '../Icons/ChevronDown';\nimport { renderLabel } from '../Label';\n\nimport selectStyles from './styles.module.scss';\n\ntype SelectConcept = 'normal' | 'transparent';\n\nexport interface SelectProps\n extends Pick<\n React.SelectHTMLAttributes<HTMLSelectElement>,\n 'aria-describedby' | 'name' | 'disabled' | 'required' | 'value' | 'onChange'\n > {\n /** Component shown after label */\n afterLabelChildren?: React.ReactNode;\n /** Sets the content of the select element. */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the visuals of the component */\n concept?: SelectConcept;\n /** The label text above the select */\n label?: React.ReactNode;\n /** Changes the visuals of the component */\n mode?: keyof typeof FormMode;\n /** Activates Error style for the select component - This is can be true while errorText is empty, when in a FormGroup */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** select id of the select element */\n selectId?: string;\n /** Width of select in characters (approximate) */\n width?: number;\n /** Gives defaultvalue to the comp. Preferred over selected prop on option by react */\n defaultValue?: string | number;\n}\n\nconst getSelectMaxWidth = (characters: number): string => {\n const paddingWidth = '2rem';\n\n return `calc(${characters * AVERAGE_CHARACTER_WIDTH_PX}px + ${paddingWidth})`;\n};\n\nconst getIconColor = (invalid: boolean, disabled: boolean) => {\n const iconColor = invalid ? 'cherry' : 'blueberry';\n return disabled ? getColor('neutral', 500) : getColor(iconColor, 600);\n};\n\nexport const Select = React.forwardRef(function SelectForwardedRef(props: SelectProps, ref: React.Ref<HTMLSelectElement>) {\n const {\n afterLabelChildren,\n className,\n children,\n concept = 'normal',\n disabled,\n error,\n errorText,\n label,\n selectId,\n name = selectId,\n mode = FormMode.onwhite,\n testId,\n width,\n required,\n value,\n defaultValue,\n ...rest\n } = props;\n\n const uuid = useUuid(selectId);\n const onBlueberry = mode === 'onblueberry';\n const invalid = mode === 'oninvalid' || !!errorText || !!error;\n const iconColor = getIconColor(invalid, !!disabled);\n const maxWidth = width ? getSelectMaxWidth(width) : undefined;\n\n const selectInnerWrapperClasses = classNames(\n selectStyles['select-inner-wrapper'],\n {\n [selectStyles['select-inner-wrapper--transparent']]: concept === 'transparent',\n [selectStyles['select-inner-wrapper--on-blueberry']]: onBlueberry,\n [selectStyles['select-inner-wrapper--invalid']]: invalid,\n [selectStyles['select-inner-wrapper--disabled']]: disabled,\n },\n className\n );\n\n const selectClasses = classNames(selectStyles.select, {\n [selectStyles['select--on-blueberry']]: onBlueberry,\n [selectStyles['select--invalid']]: invalid,\n });\n\n return (\n <ErrorWrapper errorText={errorText}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Select} className={selectStyles['select-wrapper']} style={{ maxWidth }}>\n {renderLabel(label, uuid, mode as FormMode, disabled)}\n <div className={selectInnerWrapperClasses}>\n <Icon className={selectStyles['select-arrow']} svgIcon={ChevronDown} color={iconColor} size={IconSize.XSmall} />\n <select\n aria-invalid={!!invalid}\n id={uuid}\n name={name}\n className={selectClasses}\n disabled={disabled}\n ref={ref}\n required={required}\n aria-describedby={props['aria-describedby'] ?? undefined}\n aria-required={!!required}\n value={value}\n defaultValue={defaultValue}\n {...rest}\n >\n {children}\n </select>\n </div>\n </div>\n </ErrorWrapper>\n );\n});\n\nexport default Select;\n"],"names":["getSelectMaxWidth","characters","paddingWidth","AVERAGE_CHARACTER_WIDTH_PX","getIconColor","invalid","disabled","getColor","Select","React","props","ref","afterLabelChildren","className","children","concept","error","errorText","label","selectId","name","mode","FormMode","testId","width","required","value","defaultValue","rest","uuid","useUuid","onBlueberry","iconColor","maxWidth","selectInnerWrapperClasses","classNames","selectStyles","selectClasses","ErrorWrapper","AnalyticsId","renderLabel","Icon","ChevronDown","IconSize","Select$1"],"mappings":"sdA+CA,MAAMA,EAAqBC,GAA+B,CACxD,MAAMC,EAAe,OAErB,MAAO,QAAQD,EAAaE,CAA0B,QAAQD,CAAY,GAC5E,EAEME,EAAe,CAACC,EAAkBC,IAE/BA,EAAWC,EAAS,UAAW,GAAG,EAAIA,EAD3BF,EAAU,SAAW,YAC0B,GAAG,EAGzDG,EAASC,EAAM,WAAW,SAA4BC,EAAoBC,EAAmC,CAClH,KAAA,CACJ,mBAAAC,EACA,UAAAC,EACA,SAAAC,EACA,QAAAC,EAAU,SACV,SAAAT,EACA,MAAAU,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EAAOD,EACP,KAAAE,EAAOC,EAAS,QAChB,OAAAC,EACA,MAAAC,EACA,SAAAC,EACA,MAAAC,EACA,aAAAC,EACA,GAAGC,CACD,EAAAlB,EAEEmB,EAAOC,EAAQX,CAAQ,EACvBY,EAAcV,IAAS,cACvBhB,EAAUgB,IAAS,aAAe,CAAC,CAACJ,GAAa,CAAC,CAACD,EACnDgB,EAAY5B,EAAaC,EAAS,CAAC,CAACC,CAAQ,EAC5C2B,EAAWT,EAAQxB,EAAkBwB,CAAK,EAAI,OAE9CU,EAA4BC,EAChCC,EAAa,sBAAsB,EACnC,CACE,CAACA,EAAa,mCAAmC,CAAC,EAAGrB,IAAY,cACjE,CAACqB,EAAa,oCAAoC,CAAC,EAAGL,EACtD,CAACK,EAAa,+BAA+B,CAAC,EAAG/B,EACjD,CAAC+B,EAAa,gCAAgC,CAAC,EAAG9B,CACpD,EACAO,CAAA,EAGIwB,EAAgBF,EAAWC,EAAa,OAAQ,CACpD,CAACA,EAAa,sBAAsB,CAAC,EAAGL,EACxC,CAACK,EAAa,iBAAiB,CAAC,EAAG/B,CAAA,CACpC,EAED,uBACGiC,EAAa,CAAA,UAAArB,CAAA,kBACX,MAAI,CAAA,cAAaM,EAAQ,mBAAkBgB,EAAY,OAAQ,UAAWH,EAAa,gBAAgB,EAAG,MAAO,CAAE,SAAAH,IACjHO,EAAYtB,EAAOW,EAAMR,EAAkBf,CAAQ,EACpDG,EAAA,cAAC,OAAI,UAAWyB,mBACbO,EAAK,CAAA,UAAWL,EAAa,cAAc,EAAG,QAASM,EAAa,MAAOV,EAAW,KAAMW,EAAS,OAAQ,EAC9GlC,EAAA,cAAC,SAAA,CACC,eAAc,CAAC,CAACJ,EAChB,GAAIwB,EACJ,KAAAT,EACA,UAAWiB,EACX,SAAA/B,EACA,IAAAK,EACA,SAAAc,EACA,mBAAkBf,EAAM,kBAAkB,GAAK,OAC/C,gBAAe,CAAC,CAACe,EACjB,MAAAC,EACA,aAAAC,EACC,GAAGC,CAAA,EAEHd,CAEL,CAAA,CACF,CACF,CAEJ,CAAC,EAED8B,EAAepC"}
package/Spacer.js DELETED
@@ -1,2 +0,0 @@
1
- import e from"react";import x from"classnames";import{AnalyticsId as o}from"./constants.js";import s from"./components/Spacer/styles.module.scss";const m=e.forwardRef(function(r,c){const{size:a="s",className:p,testId:t}=r,l=x(s.spacer,{[s["spacer--4xs"]]:a==="4xs",[s["spacer--3xs"]]:a==="3xs",[s["spacer--2xs"]]:a==="2xs",[s["spacer--xs"]]:a==="xs",[s["spacer--s"]]:a==="s",[s["spacer--m"]]:a==="m",[s["spacer--l"]]:a==="l",[s["spacer--xl"]]:a==="xl",[s["spacer--2xl"]]:a==="2xl",[s["spacer--3xl"]]:a==="3xl",[s["spacer--4xl"]]:a==="4xl",[s["spacer--5xl"]]:a==="5xl",[s["spacer--6xl"]]:a==="6xl"},p);return e.createElement("span",{className:l,ref:c,"data-testid":t,"data-analyticsid":o.Spacer})}),y=m;export{y as S};
2
- //# sourceMappingURL=Spacer.js.map