@helsenorge/designsystem-react 5.2.0-beta.0 → 6.0.0-beta.9

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 (1800) hide show
  1. package/CHANGELOG.md +7 -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 +1148 -0
  157. package/components/Icons/AdditionalIconInformation.d.ts.map +1 -0
  158. package/components/Icons/AdditionalIconInformation.js +291 -287
  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/Brain.d.ts +1 -1
  265. package/components/Icons/Brain.d.ts.map +1 -1
  266. package/components/Icons/Brain.js +5 -1
  267. package/components/Icons/Brain.js.map +1 -1
  268. package/components/Icons/BreastReconstruction.d.ts +1 -1
  269. package/components/Icons/BreastReconstruction.d.ts.map +1 -1
  270. package/components/Icons/BreastReconstruction.js +17 -1
  271. package/components/Icons/BreastReconstruction.js.map +1 -1
  272. package/components/Icons/BreastRemoval.d.ts +1 -1
  273. package/components/Icons/BreastRemoval.d.ts.map +1 -1
  274. package/components/Icons/BreastRemoval.js +17 -1
  275. package/components/Icons/BreastRemoval.js.map +1 -1
  276. package/components/Icons/Breasts.d.ts +1 -1
  277. package/components/Icons/Breasts.d.ts.map +1 -1
  278. package/components/Icons/Breasts.js +5 -1
  279. package/components/Icons/Breasts.js.map +1 -1
  280. package/components/Icons/BrokenHeart.d.ts +1 -1
  281. package/components/Icons/BrokenHeart.d.ts.map +1 -1
  282. package/components/Icons/BrokenHeart.js +5 -1
  283. package/components/Icons/BrokenHeart.js.map +1 -1
  284. package/components/Icons/BrokenPuzzle.d.ts +1 -1
  285. package/components/Icons/BrokenPuzzle.d.ts.map +1 -1
  286. package/components/Icons/BrokenPuzzle.js +5 -1
  287. package/components/Icons/BrokenPuzzle.js.map +1 -1
  288. package/components/Icons/Bus.d.ts +1 -1
  289. package/components/Icons/Bus.d.ts.map +1 -1
  290. package/components/Icons/Bus.js +18 -1
  291. package/components/Icons/Bus.js.map +1 -1
  292. package/components/Icons/Calendar.d.ts +1 -1
  293. package/components/Icons/Calendar.d.ts.map +1 -1
  294. package/components/Icons/Calendar.js +30 -1
  295. package/components/Icons/Calendar.js.map +1 -1
  296. package/components/Icons/CalendarChange.d.ts +1 -1
  297. package/components/Icons/CalendarChange.d.ts.map +1 -1
  298. package/components/Icons/CalendarChange.js +30 -1
  299. package/components/Icons/CalendarChange.js.map +1 -1
  300. package/components/Icons/CalendarCheck.d.ts +1 -1
  301. package/components/Icons/CalendarCheck.d.ts.map +1 -1
  302. package/components/Icons/CalendarCheck.js +30 -1
  303. package/components/Icons/CalendarCheck.js.map +1 -1
  304. package/components/Icons/CalendarEvent.d.ts +1 -1
  305. package/components/Icons/CalendarEvent.d.ts.map +1 -1
  306. package/components/Icons/CalendarEvent.js +5 -1
  307. package/components/Icons/CalendarEvent.js.map +1 -1
  308. package/components/Icons/CalendarSave.d.ts +1 -1
  309. package/components/Icons/CalendarSave.d.ts.map +1 -1
  310. package/components/Icons/CalendarSave.js +6 -1
  311. package/components/Icons/CalendarSave.js.map +1 -1
  312. package/components/Icons/Cancer.d.ts +1 -1
  313. package/components/Icons/Cancer.d.ts.map +1 -1
  314. package/components/Icons/Cancer.js +5 -1
  315. package/components/Icons/Cancer.js.map +1 -1
  316. package/components/Icons/Candle.d.ts +1 -1
  317. package/components/Icons/Candle.d.ts.map +1 -1
  318. package/components/Icons/Candle.js +18 -1
  319. package/components/Icons/Candle.js.map +1 -1
  320. package/components/Icons/Car.d.ts +1 -1
  321. package/components/Icons/Car.d.ts.map +1 -1
  322. package/components/Icons/Car.js +5 -1
  323. package/components/Icons/Car.js.map +1 -1
  324. package/components/Icons/Change.d.ts +1 -1
  325. package/components/Icons/Change.d.ts.map +1 -1
  326. package/components/Icons/Change.js +39 -1
  327. package/components/Icons/Change.js.map +1 -1
  328. package/components/Icons/Check.d.ts +1 -1
  329. package/components/Icons/Check.d.ts.map +1 -1
  330. package/components/Icons/Check.js +6 -1
  331. package/components/Icons/Check.js.map +1 -1
  332. package/components/Icons/CheckFill.d.ts +1 -1
  333. package/components/Icons/CheckFill.d.ts.map +1 -1
  334. package/components/Icons/CheckFill.js +30 -1
  335. package/components/Icons/CheckFill.js.map +1 -1
  336. package/components/Icons/CheckOutline.d.ts +1 -1
  337. package/components/Icons/CheckOutline.d.ts.map +1 -1
  338. package/components/Icons/CheckOutline.js +17 -1
  339. package/components/Icons/CheckOutline.js.map +1 -1
  340. package/components/Icons/Chest.d.ts +1 -1
  341. package/components/Icons/Chest.d.ts.map +1 -1
  342. package/components/Icons/Chest.js +5 -1
  343. package/components/Icons/Chest.js.map +1 -1
  344. package/components/Icons/ChevronDown.d.ts +1 -1
  345. package/components/Icons/ChevronDown.d.ts.map +1 -1
  346. package/components/Icons/ChevronDown.js +6 -1
  347. package/components/Icons/ChevronDown.js.map +1 -1
  348. package/components/Icons/ChevronLeft.d.ts +1 -1
  349. package/components/Icons/ChevronLeft.d.ts.map +1 -1
  350. package/components/Icons/ChevronLeft.js +6 -1
  351. package/components/Icons/ChevronLeft.js.map +1 -1
  352. package/components/Icons/ChevronRight.d.ts +1 -1
  353. package/components/Icons/ChevronRight.d.ts.map +1 -1
  354. package/components/Icons/ChevronRight.js +6 -1
  355. package/components/Icons/ChevronRight.js.map +1 -1
  356. package/components/Icons/ChevronUp.d.ts +1 -1
  357. package/components/Icons/ChevronUp.d.ts.map +1 -1
  358. package/components/Icons/ChevronUp.js +6 -1
  359. package/components/Icons/ChevronUp.js.map +1 -1
  360. package/components/Icons/ChevronsDown.d.ts +1 -1
  361. package/components/Icons/ChevronsDown.d.ts.map +1 -1
  362. package/components/Icons/ChevronsDown.js +30 -1
  363. package/components/Icons/ChevronsDown.js.map +1 -1
  364. package/components/Icons/ChevronsUp.d.ts +1 -1
  365. package/components/Icons/ChevronsUp.d.ts.map +1 -1
  366. package/components/Icons/ChevronsUp.js +30 -1
  367. package/components/Icons/ChevronsUp.js.map +1 -1
  368. package/components/Icons/ChildPlaying.d.ts +1 -1
  369. package/components/Icons/ChildPlaying.d.ts.map +1 -1
  370. package/components/Icons/ChildPlaying.js +5 -1
  371. package/components/Icons/ChildPlaying.js.map +1 -1
  372. package/components/Icons/Cigarette.d.ts +1 -1
  373. package/components/Icons/Cigarette.d.ts.map +1 -1
  374. package/components/Icons/Cigarette.js +5 -1
  375. package/components/Icons/Cigarette.js.map +1 -1
  376. package/components/Icons/Coins.d.ts +1 -1
  377. package/components/Icons/Coins.d.ts.map +1 -1
  378. package/components/Icons/Coins.js +17 -1
  379. package/components/Icons/Coins.js.map +1 -1
  380. package/components/Icons/Contacts.d.ts +1 -1
  381. package/components/Icons/Contacts.d.ts.map +1 -1
  382. package/components/Icons/Contacts.js +6 -1
  383. package/components/Icons/Contacts.js.map +1 -1
  384. package/components/Icons/Copy.d.ts +1 -1
  385. package/components/Icons/Copy.d.ts.map +1 -1
  386. package/components/Icons/Copy.js +6 -1
  387. package/components/Icons/Copy.js.map +1 -1
  388. package/components/Icons/CoronaCertificate.d.ts +1 -1
  389. package/components/Icons/CoronaCertificate.d.ts.map +1 -1
  390. package/components/Icons/CoronaCertificate.js +17 -1
  391. package/components/Icons/CoronaCertificate.js.map +1 -1
  392. package/components/Icons/Coronavirus.d.ts +1 -1
  393. package/components/Icons/Coronavirus.d.ts.map +1 -1
  394. package/components/Icons/Coronavirus.js +5 -1
  395. package/components/Icons/Coronavirus.js.map +1 -1
  396. package/components/Icons/Cough.d.ts +1 -1
  397. package/components/Icons/Cough.d.ts.map +1 -1
  398. package/components/Icons/Cough.js +5 -1
  399. package/components/Icons/Cough.js.map +1 -1
  400. package/components/Icons/CriticalHealthInfo.d.ts +1 -1
  401. package/components/Icons/CriticalHealthInfo.d.ts.map +1 -1
  402. package/components/Icons/CriticalHealthInfo.js +5 -1
  403. package/components/Icons/CriticalHealthInfo.js.map +1 -1
  404. package/components/Icons/Cross.d.ts +1 -1
  405. package/components/Icons/Cross.d.ts.map +1 -1
  406. package/components/Icons/Cross.js +5 -1
  407. package/components/Icons/Cross.js.map +1 -1
  408. package/components/Icons/DataExchange.d.ts +1 -1
  409. package/components/Icons/DataExchange.d.ts.map +1 -1
  410. package/components/Icons/DataExchange.js +17 -1
  411. package/components/Icons/DataExchange.js.map +1 -1
  412. package/components/Icons/DataReceived.d.ts +1 -1
  413. package/components/Icons/DataReceived.d.ts.map +1 -1
  414. package/components/Icons/DataReceived.js +17 -1
  415. package/components/Icons/DataReceived.js.map +1 -1
  416. package/components/Icons/DataSent.d.ts +1 -1
  417. package/components/Icons/DataSent.d.ts.map +1 -1
  418. package/components/Icons/DataSent.js +17 -1
  419. package/components/Icons/DataSent.js.map +1 -1
  420. package/components/Icons/Depression.d.ts +1 -1
  421. package/components/Icons/Depression.d.ts.map +1 -1
  422. package/components/Icons/Depression.js +5 -1
  423. package/components/Icons/Depression.js.map +1 -1
  424. package/components/Icons/DigestiveSystem.d.ts +1 -1
  425. package/components/Icons/DigestiveSystem.d.ts.map +1 -1
  426. package/components/Icons/DigestiveSystem.js +5 -1
  427. package/components/Icons/DigestiveSystem.js.map +1 -1
  428. package/components/Icons/Dizzy.d.ts +1 -1
  429. package/components/Icons/Dizzy.d.ts.map +1 -1
  430. package/components/Icons/Dizzy.js +5 -1
  431. package/components/Icons/Dizzy.js.map +1 -1
  432. package/components/Icons/Documents.d.ts +1 -1
  433. package/components/Icons/Documents.d.ts.map +1 -1
  434. package/components/Icons/Documents.js +5 -1
  435. package/components/Icons/Documents.js.map +1 -1
  436. package/components/Icons/Dog.d.ts +1 -1
  437. package/components/Icons/Dog.d.ts.map +1 -1
  438. package/components/Icons/Dog.js +5 -1
  439. package/components/Icons/Dog.js.map +1 -1
  440. package/components/Icons/DonorCard.d.ts +1 -1
  441. package/components/Icons/DonorCard.d.ts.map +1 -1
  442. package/components/Icons/DonorCard.js +5 -1
  443. package/components/Icons/DonorCard.js.map +1 -1
  444. package/components/Icons/Download.d.ts +1 -1
  445. package/components/Icons/Download.d.ts.map +1 -1
  446. package/components/Icons/Download.js +30 -1
  447. package/components/Icons/Download.js.map +1 -1
  448. package/components/Icons/Draft.d.ts +1 -1
  449. package/components/Icons/Draft.d.ts.map +1 -1
  450. package/components/Icons/Draft.js +5 -1
  451. package/components/Icons/Draft.js.map +1 -1
  452. package/components/Icons/EChat.d.ts +1 -1
  453. package/components/Icons/EChat.d.ts.map +1 -1
  454. package/components/Icons/EChat.js +6 -1
  455. package/components/Icons/EChat.js.map +1 -1
  456. package/components/Icons/EarNoseThroat.d.ts +1 -1
  457. package/components/Icons/EarNoseThroat.d.ts.map +1 -1
  458. package/components/Icons/EarNoseThroat.js +5 -1
  459. package/components/Icons/EarNoseThroat.js.map +1 -1
  460. package/components/Icons/ElderlyPerson.d.ts +1 -1
  461. package/components/Icons/ElderlyPerson.d.ts.map +1 -1
  462. package/components/Icons/ElderlyPerson.js +5 -1
  463. package/components/Icons/ElderlyPerson.js.map +1 -1
  464. package/components/Icons/Embolization.d.ts +1 -1
  465. package/components/Icons/Embolization.d.ts.map +1 -1
  466. package/components/Icons/Embolization.js +17 -1
  467. package/components/Icons/Embolization.js.map +1 -1
  468. package/components/Icons/EmoticonAnnoyed.d.ts +1 -1
  469. package/components/Icons/EmoticonAnnoyed.d.ts.map +1 -1
  470. package/components/Icons/EmoticonAnnoyed.js +15 -1
  471. package/components/Icons/EmoticonAnnoyed.js.map +1 -1
  472. package/components/Icons/EmoticonDelighted.d.ts +1 -1
  473. package/components/Icons/EmoticonDelighted.d.ts.map +1 -1
  474. package/components/Icons/EmoticonDelighted.js +9 -1
  475. package/components/Icons/EmoticonDelighted.js.map +1 -1
  476. package/components/Icons/EmoticonDisappointed.d.ts +1 -1
  477. package/components/Icons/EmoticonDisappointed.d.ts.map +1 -1
  478. package/components/Icons/EmoticonDisappointed.js +9 -1
  479. package/components/Icons/EmoticonDisappointed.js.map +1 -1
  480. package/components/Icons/EmoticonHappy.d.ts +1 -1
  481. package/components/Icons/EmoticonHappy.d.ts.map +1 -1
  482. package/components/Icons/EmoticonHappy.js +9 -1
  483. package/components/Icons/EmoticonHappy.js.map +1 -1
  484. package/components/Icons/EmoticonMeh.d.ts +1 -1
  485. package/components/Icons/EmoticonMeh.d.ts.map +1 -1
  486. package/components/Icons/EmoticonMeh.js +9 -1
  487. package/components/Icons/EmoticonMeh.js.map +1 -1
  488. package/components/Icons/EnterFullScreen.d.ts +1 -1
  489. package/components/Icons/EnterFullScreen.d.ts.map +1 -1
  490. package/components/Icons/EnterFullScreen.js +6 -1
  491. package/components/Icons/EnterFullScreen.js.map +1 -1
  492. package/components/Icons/Envelope.d.ts +1 -1
  493. package/components/Icons/Envelope.d.ts.map +1 -1
  494. package/components/Icons/Envelope.js +6 -1
  495. package/components/Icons/Envelope.js.map +1 -1
  496. package/components/Icons/Epilepsy.d.ts +1 -1
  497. package/components/Icons/Epilepsy.d.ts.map +1 -1
  498. package/components/Icons/Epilepsy.js +5 -1
  499. package/components/Icons/Epilepsy.js.map +1 -1
  500. package/components/Icons/Eraser.d.ts +1 -1
  501. package/components/Icons/Eraser.d.ts.map +1 -1
  502. package/components/Icons/Eraser.js +6 -1
  503. package/components/Icons/Eraser.js.map +1 -1
  504. package/components/Icons/ErrorSignFill.d.ts +1 -1
  505. package/components/Icons/ErrorSignFill.d.ts.map +1 -1
  506. package/components/Icons/ErrorSignFill.js +6 -1
  507. package/components/Icons/ErrorSignFill.js.map +1 -1
  508. package/components/Icons/ErrorSignStroke.d.ts +1 -1
  509. package/components/Icons/ErrorSignStroke.d.ts.map +1 -1
  510. package/components/Icons/ErrorSignStroke.js +6 -1
  511. package/components/Icons/ErrorSignStroke.js.map +1 -1
  512. package/components/Icons/EuropeanHealthCard.d.ts +1 -1
  513. package/components/Icons/EuropeanHealthCard.d.ts.map +1 -1
  514. package/components/Icons/EuropeanHealthCard.js +5 -1
  515. package/components/Icons/EuropeanHealthCard.js.map +1 -1
  516. package/components/Icons/ExitFullScreen.d.ts +1 -1
  517. package/components/Icons/ExitFullScreen.d.ts.map +1 -1
  518. package/components/Icons/ExitFullScreen.js +6 -1
  519. package/components/Icons/ExitFullScreen.js.map +1 -1
  520. package/components/Icons/Eye.d.ts +1 -1
  521. package/components/Icons/Eye.d.ts.map +1 -1
  522. package/components/Icons/Eye.js +6 -1
  523. package/components/Icons/Eye.js.map +1 -1
  524. package/components/Icons/Facebook.d.ts +1 -1
  525. package/components/Icons/Facebook.d.ts.map +1 -1
  526. package/components/Icons/Facebook.js +5 -1
  527. package/components/Icons/Facebook.js.map +1 -1
  528. package/components/Icons/FallingLeaf.d.ts +1 -1
  529. package/components/Icons/FallingLeaf.d.ts.map +1 -1
  530. package/components/Icons/FallingLeaf.js +21 -1
  531. package/components/Icons/FallingLeaf.js.map +1 -1
  532. package/components/Icons/Female.d.ts +1 -1
  533. package/components/Icons/Female.d.ts.map +1 -1
  534. package/components/Icons/Female.js +5 -1
  535. package/components/Icons/Female.js.map +1 -1
  536. package/components/Icons/FemaleDoctor.d.ts +1 -1
  537. package/components/Icons/FemaleDoctor.d.ts.map +1 -1
  538. package/components/Icons/FemaleDoctor.js +5 -1
  539. package/components/Icons/FemaleDoctor.js.map +1 -1
  540. package/components/Icons/Ferry.d.ts +1 -1
  541. package/components/Icons/Ferry.d.ts.map +1 -1
  542. package/components/Icons/Ferry.js +5 -1
  543. package/components/Icons/Ferry.js.map +1 -1
  544. package/components/Icons/File.d.ts +1 -1
  545. package/components/Icons/File.d.ts.map +1 -1
  546. package/components/Icons/File.js +30 -1
  547. package/components/Icons/File.js.map +1 -1
  548. package/components/Icons/Filter.d.ts +1 -1
  549. package/components/Icons/Filter.d.ts.map +1 -1
  550. package/components/Icons/Filter.js +25 -1
  551. package/components/Icons/Filter.js.map +1 -1
  552. package/components/Icons/FingerBleed.d.ts +1 -1
  553. package/components/Icons/FingerBleed.d.ts.map +1 -1
  554. package/components/Icons/FingerBleed.js +5 -1
  555. package/components/Icons/FingerBleed.js.map +1 -1
  556. package/components/Icons/FirstAidKit.d.ts +1 -1
  557. package/components/Icons/FirstAidKit.d.ts.map +1 -1
  558. package/components/Icons/FirstAidKit.js +5 -1
  559. package/components/Icons/FirstAidKit.js.map +1 -1
  560. package/components/Icons/FloppyDisk.d.ts +1 -1
  561. package/components/Icons/FloppyDisk.d.ts.map +1 -1
  562. package/components/Icons/FloppyDisk.js +17 -1
  563. package/components/Icons/FloppyDisk.js.map +1 -1
  564. package/components/Icons/Football.d.ts +1 -1
  565. package/components/Icons/Football.d.ts.map +1 -1
  566. package/components/Icons/Football.js +5 -1
  567. package/components/Icons/Football.js.map +1 -1
  568. package/components/Icons/Form.d.ts +1 -1
  569. package/components/Icons/Form.d.ts.map +1 -1
  570. package/components/Icons/Form.js +6 -1
  571. package/components/Icons/Form.js.map +1 -1
  572. package/components/Icons/Forward.d.ts +1 -1
  573. package/components/Icons/Forward.d.ts.map +1 -1
  574. package/components/Icons/Forward.js +6 -1
  575. package/components/Icons/Forward.js.map +1 -1
  576. package/components/Icons/Gallery.d.ts +1 -1
  577. package/components/Icons/Gallery.d.ts.map +1 -1
  578. package/components/Icons/Gallery.js +30 -1
  579. package/components/Icons/Gallery.js.map +1 -1
  580. package/components/Icons/Garden.d.ts +1 -1
  581. package/components/Icons/Garden.d.ts.map +1 -1
  582. package/components/Icons/Garden.js +5 -1
  583. package/components/Icons/Garden.js.map +1 -1
  584. package/components/Icons/GasCan.d.ts +1 -1
  585. package/components/Icons/GasCan.d.ts.map +1 -1
  586. package/components/Icons/GasCan.js +5 -1
  587. package/components/Icons/GasCan.js.map +1 -1
  588. package/components/Icons/GenderIdentity.d.ts +1 -1
  589. package/components/Icons/GenderIdentity.d.ts.map +1 -1
  590. package/components/Icons/GenderIdentity.js +17 -1
  591. package/components/Icons/GenderIdentity.js.map +1 -1
  592. package/components/Icons/Globe.d.ts +1 -1
  593. package/components/Icons/Globe.d.ts.map +1 -1
  594. package/components/Icons/Globe.js +6 -1
  595. package/components/Icons/Globe.js.map +1 -1
  596. package/components/Icons/Graph.d.ts +1 -1
  597. package/components/Icons/Graph.d.ts.map +1 -1
  598. package/components/Icons/Graph.js +21 -1
  599. package/components/Icons/Graph.js.map +1 -1
  600. package/components/Icons/Group.d.ts +1 -1
  601. package/components/Icons/Group.d.ts.map +1 -1
  602. package/components/Icons/Group.js +28 -1
  603. package/components/Icons/Group.js.map +1 -1
  604. package/components/Icons/GroupTwins.d.ts +1 -1
  605. package/components/Icons/GroupTwins.d.ts.map +1 -1
  606. package/components/Icons/GroupTwins.js +63 -1
  607. package/components/Icons/GroupTwins.js.map +1 -1
  608. package/components/Icons/HandWaving.d.ts +1 -1
  609. package/components/Icons/HandWaving.d.ts.map +1 -1
  610. package/components/Icons/HandWaving.js +5 -1
  611. package/components/Icons/HandWaving.js.map +1 -1
  612. package/components/Icons/HandWithDisease.d.ts +1 -1
  613. package/components/Icons/HandWithDisease.d.ts.map +1 -1
  614. package/components/Icons/HandWithDisease.js +5 -1
  615. package/components/Icons/HandWithDisease.js.map +1 -1
  616. package/components/Icons/HandsAndHeart.d.ts +1 -1
  617. package/components/Icons/HandsAndHeart.d.ts.map +1 -1
  618. package/components/Icons/HandsAndHeart.js +18 -1
  619. package/components/Icons/HandsAndHeart.js.map +1 -1
  620. package/components/Icons/HealthClinic.d.ts +1 -1
  621. package/components/Icons/HealthClinic.d.ts.map +1 -1
  622. package/components/Icons/HealthClinic.js +17 -1
  623. package/components/Icons/HealthClinic.js.map +1 -1
  624. package/components/Icons/HealthWarning.d.ts +1 -1
  625. package/components/Icons/HealthWarning.d.ts.map +1 -1
  626. package/components/Icons/HealthWarning.js +17 -1
  627. package/components/Icons/HealthWarning.js.map +1 -1
  628. package/components/Icons/HealthcarePerson.d.ts +1 -1
  629. package/components/Icons/HealthcarePerson.d.ts.map +1 -1
  630. package/components/Icons/HealthcarePerson.js +57 -1
  631. package/components/Icons/HealthcarePerson.js.map +1 -1
  632. package/components/Icons/HealthcarePersonell.d.ts +1 -1
  633. package/components/Icons/HealthcarePersonell.d.ts.map +1 -1
  634. package/components/Icons/HealthcarePersonell.js +75 -1
  635. package/components/Icons/HealthcarePersonell.js.map +1 -1
  636. package/components/Icons/Heart.d.ts +1 -1
  637. package/components/Icons/Heart.d.ts.map +1 -1
  638. package/components/Icons/Heart.js +6 -1
  639. package/components/Icons/Heart.js.map +1 -1
  640. package/components/Icons/HeartHands.d.ts +1 -1
  641. package/components/Icons/HeartHands.d.ts.map +1 -1
  642. package/components/Icons/HeartHands.js +64 -1
  643. package/components/Icons/HeartHands.js.map +1 -1
  644. package/components/Icons/HelpSign.d.ts +1 -1
  645. package/components/Icons/HelpSign.d.ts.map +1 -1
  646. package/components/Icons/HelpSign.js +6 -1
  647. package/components/Icons/HelpSign.js.map +1 -1
  648. package/components/Icons/HelpingHand.d.ts +1 -1
  649. package/components/Icons/HelpingHand.d.ts.map +1 -1
  650. package/components/Icons/HelpingHand.js +17 -1
  651. package/components/Icons/HelpingHand.js.map +1 -1
  652. package/components/Icons/Hemodialysis.d.ts +1 -1
  653. package/components/Icons/Hemodialysis.d.ts.map +1 -1
  654. package/components/Icons/Hemodialysis.js +17 -1
  655. package/components/Icons/Hemodialysis.js.map +1 -1
  656. package/components/Icons/Hiker.d.ts +1 -1
  657. package/components/Icons/Hiker.d.ts.map +1 -1
  658. package/components/Icons/Hiker.js +5 -1
  659. package/components/Icons/Hiker.js.map +1 -1
  660. package/components/Icons/Hipprosthesis.d.ts +1 -1
  661. package/components/Icons/Hipprosthesis.d.ts.map +1 -1
  662. package/components/Icons/Hipprosthesis.js +17 -1
  663. package/components/Icons/Hipprosthesis.js.map +1 -1
  664. package/components/Icons/History.d.ts +1 -1
  665. package/components/Icons/History.d.ts.map +1 -1
  666. package/components/Icons/History.js +6 -1
  667. package/components/Icons/History.js.map +1 -1
  668. package/components/Icons/HivAndAids.d.ts +1 -1
  669. package/components/Icons/HivAndAids.d.ts.map +1 -1
  670. package/components/Icons/HivAndAids.js +5 -1
  671. package/components/Icons/HivAndAids.js.map +1 -1
  672. package/components/Icons/Home.d.ts +1 -1
  673. package/components/Icons/Home.d.ts.map +1 -1
  674. package/components/Icons/Home.js +30 -1
  675. package/components/Icons/Home.js.map +1 -1
  676. package/components/Icons/Hormone.d.ts +1 -1
  677. package/components/Icons/Hormone.d.ts.map +1 -1
  678. package/components/Icons/Hormone.js +5 -1
  679. package/components/Icons/Hormone.js.map +1 -1
  680. package/components/Icons/Hospital.d.ts +1 -1
  681. package/components/Icons/Hospital.d.ts.map +1 -1
  682. package/components/Icons/Hospital.js +30 -1
  683. package/components/Icons/Hospital.js.map +1 -1
  684. package/components/Icons/Hourglass.d.ts +1 -1
  685. package/components/Icons/Hourglass.d.ts.map +1 -1
  686. package/components/Icons/Hourglass.js +30 -1
  687. package/components/Icons/Hourglass.js.map +1 -1
  688. package/components/Icons/IconNames.d.ts +3 -0
  689. package/components/Icons/IconNames.d.ts.map +1 -0
  690. package/components/Icons/IconNames.js +297 -0
  691. package/components/Icons/IconNames.js.map +1 -0
  692. package/components/Icons/ImgFile.d.ts +1 -1
  693. package/components/Icons/ImgFile.d.ts.map +1 -1
  694. package/components/Icons/ImgFile.js +17 -1
  695. package/components/Icons/ImgFile.js.map +1 -1
  696. package/components/Icons/Inbox.d.ts +1 -1
  697. package/components/Icons/Inbox.d.ts.map +1 -1
  698. package/components/Icons/Inbox.js +11 -1
  699. package/components/Icons/Inbox.js.map +1 -1
  700. package/components/Icons/InfoSignFill.d.ts +1 -1
  701. package/components/Icons/InfoSignFill.d.ts.map +1 -1
  702. package/components/Icons/InfoSignFill.js +6 -1
  703. package/components/Icons/InfoSignFill.js.map +1 -1
  704. package/components/Icons/InfoSignStroke.d.ts +1 -1
  705. package/components/Icons/InfoSignStroke.d.ts.map +1 -1
  706. package/components/Icons/InfoSignStroke.js +6 -1
  707. package/components/Icons/InfoSignStroke.js.map +1 -1
  708. package/components/Icons/Instagram.d.ts +1 -1
  709. package/components/Icons/Instagram.d.ts.map +1 -1
  710. package/components/Icons/Instagram.js +5 -1
  711. package/components/Icons/Instagram.js.map +1 -1
  712. package/components/Icons/Intravenous.d.ts +1 -1
  713. package/components/Icons/Intravenous.d.ts.map +1 -1
  714. package/components/Icons/Intravenous.js +17 -1
  715. package/components/Icons/Intravenous.js.map +1 -1
  716. package/components/Icons/JointPain.d.ts +1 -1
  717. package/components/Icons/JointPain.d.ts.map +1 -1
  718. package/components/Icons/JointPain.js +5 -1
  719. package/components/Icons/JointPain.js.map +1 -1
  720. package/components/Icons/Journal.d.ts +1 -1
  721. package/components/Icons/Journal.d.ts.map +1 -1
  722. package/components/Icons/Journal.js +6 -1
  723. package/components/Icons/Journal.js.map +1 -1
  724. package/components/Icons/JpgFile.d.ts +1 -1
  725. package/components/Icons/JpgFile.d.ts.map +1 -1
  726. package/components/Icons/JpgFile.js +17 -1
  727. package/components/Icons/JpgFile.js.map +1 -1
  728. package/components/Icons/Kidney.d.ts +1 -1
  729. package/components/Icons/Kidney.d.ts.map +1 -1
  730. package/components/Icons/Kidney.js +5 -1
  731. package/components/Icons/Kidney.js.map +1 -1
  732. package/components/Icons/KitchenScale.d.ts +1 -1
  733. package/components/Icons/KitchenScale.d.ts.map +1 -1
  734. package/components/Icons/KitchenScale.js +17 -1
  735. package/components/Icons/KitchenScale.js.map +1 -1
  736. package/components/Icons/Kjernejournal.d.ts +1 -1
  737. package/components/Icons/Kjernejournal.d.ts.map +1 -1
  738. package/components/Icons/Kjernejournal.js +5 -1
  739. package/components/Icons/Kjernejournal.js.map +1 -1
  740. package/components/Icons/Laboratory.d.ts +1 -1
  741. package/components/Icons/Laboratory.d.ts.map +1 -1
  742. package/components/Icons/Laboratory.js +17 -1
  743. package/components/Icons/Laboratory.js.map +1 -1
  744. package/components/Icons/LaptopBlog.d.ts +1 -1
  745. package/components/Icons/LaptopBlog.d.ts.map +1 -1
  746. package/components/Icons/LaptopBlog.js +5 -1
  747. package/components/Icons/LaptopBlog.js.map +1 -1
  748. package/components/Icons/LawBook.d.ts +1 -1
  749. package/components/Icons/LawBook.d.ts.map +1 -1
  750. package/components/Icons/LawBook.js +5 -1
  751. package/components/Icons/LawBook.js.map +1 -1
  752. package/components/Icons/LegalDocument.d.ts +1 -1
  753. package/components/Icons/LegalDocument.d.ts.map +1 -1
  754. package/components/Icons/LegalDocument.js +27 -1
  755. package/components/Icons/LegalDocument.js.map +1 -1
  756. package/components/Icons/LightBulb.d.ts +1 -1
  757. package/components/Icons/LightBulb.d.ts.map +1 -1
  758. package/components/Icons/LightBulb.js +5 -1
  759. package/components/Icons/LightBulb.js.map +1 -1
  760. package/components/Icons/List.d.ts +1 -1
  761. package/components/Icons/List.d.ts.map +1 -1
  762. package/components/Icons/List.js +30 -1
  763. package/components/Icons/List.js.map +1 -1
  764. package/components/Icons/Location.d.ts +1 -1
  765. package/components/Icons/Location.d.ts.map +1 -1
  766. package/components/Icons/Location.js +6 -1
  767. package/components/Icons/Location.js.map +1 -1
  768. package/components/Icons/Lock.d.ts +1 -1
  769. package/components/Icons/Lock.d.ts.map +1 -1
  770. package/components/Icons/Lock.js +18 -1
  771. package/components/Icons/Lock.js.map +1 -1
  772. package/components/Icons/Login.d.ts +1 -1
  773. package/components/Icons/Login.d.ts.map +1 -1
  774. package/components/Icons/Login.js +37 -1
  775. package/components/Icons/Login.js.map +1 -1
  776. package/components/Icons/Logout.d.ts +1 -1
  777. package/components/Icons/Logout.d.ts.map +1 -1
  778. package/components/Icons/Logout.js +37 -1
  779. package/components/Icons/Logout.js.map +1 -1
  780. package/components/Icons/Lungs.d.ts +1 -1
  781. package/components/Icons/Lungs.d.ts.map +1 -1
  782. package/components/Icons/Lungs.js +5 -1
  783. package/components/Icons/Lungs.js.map +1 -1
  784. package/components/Icons/Makeup.d.ts +1 -1
  785. package/components/Icons/Makeup.d.ts.map +1 -1
  786. package/components/Icons/Makeup.js +5 -1
  787. package/components/Icons/Makeup.js.map +1 -1
  788. package/components/Icons/MaleDoctor.d.ts +1 -1
  789. package/components/Icons/MaleDoctor.d.ts.map +1 -1
  790. package/components/Icons/MaleDoctor.js +5 -1
  791. package/components/Icons/MaleDoctor.js.map +1 -1
  792. package/components/Icons/MaleDoctorAndPerson.d.ts +1 -1
  793. package/components/Icons/MaleDoctorAndPerson.d.ts.map +1 -1
  794. package/components/Icons/MaleDoctorAndPerson.js +5 -1
  795. package/components/Icons/MaleDoctorAndPerson.js.map +1 -1
  796. package/components/Icons/MaleGenitalia.d.ts +1 -1
  797. package/components/Icons/MaleGenitalia.d.ts.map +1 -1
  798. package/components/Icons/MaleGenitalia.js +5 -1
  799. package/components/Icons/MaleGenitalia.js.map +1 -1
  800. package/components/Icons/Medicine.d.ts +1 -1
  801. package/components/Icons/Medicine.d.ts.map +1 -1
  802. package/components/Icons/Medicine.js +30 -1
  803. package/components/Icons/Medicine.js.map +1 -1
  804. package/components/Icons/MedicineWarning.d.ts +1 -1
  805. package/components/Icons/MedicineWarning.d.ts.map +1 -1
  806. package/components/Icons/MedicineWarning.js +17 -1
  807. package/components/Icons/MedicineWarning.js.map +1 -1
  808. package/components/Icons/MentalHealthAdult.d.ts +1 -1
  809. package/components/Icons/MentalHealthAdult.d.ts.map +1 -1
  810. package/components/Icons/MentalHealthAdult.js +5 -1
  811. package/components/Icons/MentalHealthAdult.js.map +1 -1
  812. package/components/Icons/MentalHealthChild.d.ts +1 -1
  813. package/components/Icons/MentalHealthChild.d.ts.map +1 -1
  814. package/components/Icons/MentalHealthChild.js +5 -1
  815. package/components/Icons/MentalHealthChild.js.map +1 -1
  816. package/components/Icons/Menu.d.ts +1 -1
  817. package/components/Icons/Menu.d.ts.map +1 -1
  818. package/components/Icons/Menu.js +6 -1
  819. package/components/Icons/Menu.js.map +1 -1
  820. package/components/Icons/Microscope.d.ts +1 -1
  821. package/components/Icons/Microscope.d.ts.map +1 -1
  822. package/components/Icons/Microscope.js +17 -1
  823. package/components/Icons/Microscope.js.map +1 -1
  824. package/components/Icons/Minus.d.ts +1 -1
  825. package/components/Icons/Minus.d.ts.map +1 -1
  826. package/components/Icons/Minus.js +6 -1
  827. package/components/Icons/Minus.js.map +1 -1
  828. package/components/Icons/Mirror.d.ts +1 -1
  829. package/components/Icons/Mirror.d.ts.map +1 -1
  830. package/components/Icons/Mirror.js +5 -1
  831. package/components/Icons/Mirror.js.map +1 -1
  832. package/components/Icons/MobilePhone.d.ts +1 -1
  833. package/components/Icons/MobilePhone.d.ts.map +1 -1
  834. package/components/Icons/MobilePhone.js +6 -1
  835. package/components/Icons/MobilePhone.js.map +1 -1
  836. package/components/Icons/MotherHoldingBaby.d.ts +1 -1
  837. package/components/Icons/MotherHoldingBaby.d.ts.map +1 -1
  838. package/components/Icons/MotherHoldingBaby.js +5 -1
  839. package/components/Icons/MotherHoldingBaby.js.map +1 -1
  840. package/components/Icons/MuscleBack.d.ts +1 -1
  841. package/components/Icons/MuscleBack.d.ts.map +1 -1
  842. package/components/Icons/MuscleBack.js +5 -1
  843. package/components/Icons/MuscleBack.js.map +1 -1
  844. package/components/Icons/MuscleLeg.d.ts +1 -1
  845. package/components/Icons/MuscleLeg.d.ts.map +1 -1
  846. package/components/Icons/MuscleLeg.js +5 -1
  847. package/components/Icons/MuscleLeg.js.map +1 -1
  848. package/components/Icons/Mushroom.d.ts +1 -1
  849. package/components/Icons/Mushroom.d.ts.map +1 -1
  850. package/components/Icons/Mushroom.js +5 -1
  851. package/components/Icons/Mushroom.js.map +1 -1
  852. package/components/Icons/Music.d.ts +1 -1
  853. package/components/Icons/Music.d.ts.map +1 -1
  854. package/components/Icons/Music.js +17 -1
  855. package/components/Icons/Music.js.map +1 -1
  856. package/components/Icons/MusselsAndSalt.d.ts +1 -1
  857. package/components/Icons/MusselsAndSalt.d.ts.map +1 -1
  858. package/components/Icons/MusselsAndSalt.js +5 -1
  859. package/components/Icons/MusselsAndSalt.js.map +1 -1
  860. package/components/Icons/NoAccess.d.ts +1 -1
  861. package/components/Icons/NoAccess.d.ts.map +1 -1
  862. package/components/Icons/NoAccess.js +39 -1
  863. package/components/Icons/NoAccess.js.map +1 -1
  864. package/components/Icons/NoEye.d.ts +1 -1
  865. package/components/Icons/NoEye.d.ts.map +1 -1
  866. package/components/Icons/NoEye.js +30 -1
  867. package/components/Icons/NoEye.js.map +1 -1
  868. package/components/Icons/NoFilter.d.ts +1 -1
  869. package/components/Icons/NoFilter.d.ts.map +1 -1
  870. package/components/Icons/NoFilter.js +6 -1
  871. package/components/Icons/NoFilter.js.map +1 -1
  872. package/components/Icons/Notepad.d.ts +1 -1
  873. package/components/Icons/Notepad.d.ts.map +1 -1
  874. package/components/Icons/Notepad.js +5 -1
  875. package/components/Icons/Notepad.js.map +1 -1
  876. package/components/Icons/Osteotomy.d.ts +1 -1
  877. package/components/Icons/Osteotomy.d.ts.map +1 -1
  878. package/components/Icons/Osteotomy.js +17 -1
  879. package/components/Icons/Osteotomy.js.map +1 -1
  880. package/components/Icons/PaintRoller.d.ts +1 -1
  881. package/components/Icons/PaintRoller.d.ts.map +1 -1
  882. package/components/Icons/PaintRoller.js +5 -1
  883. package/components/Icons/PaintRoller.js.map +1 -1
  884. package/components/Icons/PaperPlane.d.ts +1 -1
  885. package/components/Icons/PaperPlane.d.ts.map +1 -1
  886. package/components/Icons/PaperPlane.js +6 -1
  887. package/components/Icons/PaperPlane.js.map +1 -1
  888. package/components/Icons/PatientAndPerson.d.ts +1 -1
  889. package/components/Icons/PatientAndPerson.d.ts.map +1 -1
  890. package/components/Icons/PatientAndPerson.js +5 -1
  891. package/components/Icons/PatientAndPerson.js.map +1 -1
  892. package/components/Icons/Pause.d.ts +1 -1
  893. package/components/Icons/Pause.d.ts.map +1 -1
  894. package/components/Icons/Pause.js +6 -1
  895. package/components/Icons/Pause.js.map +1 -1
  896. package/components/Icons/PdfFile.d.ts +1 -1
  897. package/components/Icons/PdfFile.d.ts.map +1 -1
  898. package/components/Icons/PdfFile.js +17 -1
  899. package/components/Icons/PdfFile.js.map +1 -1
  900. package/components/Icons/Pencil.d.ts +1 -1
  901. package/components/Icons/Pencil.d.ts.map +1 -1
  902. package/components/Icons/Pencil.js +6 -1
  903. package/components/Icons/Pencil.js.map +1 -1
  904. package/components/Icons/PeopleTalking.d.ts +1 -1
  905. package/components/Icons/PeopleTalking.d.ts.map +1 -1
  906. package/components/Icons/PeopleTalking.js +17 -1
  907. package/components/Icons/PeopleTalking.js.map +1 -1
  908. package/components/Icons/Peritonealdialysis.d.ts +1 -1
  909. package/components/Icons/Peritonealdialysis.d.ts.map +1 -1
  910. package/components/Icons/Peritonealdialysis.js +17 -1
  911. package/components/Icons/Peritonealdialysis.js.map +1 -1
  912. package/components/Icons/Person.d.ts +1 -1
  913. package/components/Icons/Person.d.ts.map +1 -1
  914. package/components/Icons/Person.js +5 -1
  915. package/components/Icons/Person.js.map +1 -1
  916. package/components/Icons/PersonAndPatient.d.ts +1 -1
  917. package/components/Icons/PersonAndPatient.d.ts.map +1 -1
  918. package/components/Icons/PersonAndPatient.js +5 -1
  919. package/components/Icons/PersonAndPatient.js.map +1 -1
  920. package/components/Icons/PersonCancel.d.ts +1 -1
  921. package/components/Icons/PersonCancel.d.ts.map +1 -1
  922. package/components/Icons/PersonCancel.js +57 -1
  923. package/components/Icons/PersonCancel.js.map +1 -1
  924. package/components/Icons/PersonInXRayMachine.d.ts +1 -1
  925. package/components/Icons/PersonInXRayMachine.d.ts.map +1 -1
  926. package/components/Icons/PersonInXRayMachine.js +17 -1
  927. package/components/Icons/PersonInXRayMachine.js.map +1 -1
  928. package/components/Icons/PersonOverweight.d.ts +1 -1
  929. package/components/Icons/PersonOverweight.d.ts.map +1 -1
  930. package/components/Icons/PersonOverweight.js +5 -1
  931. package/components/Icons/PersonOverweight.js.map +1 -1
  932. package/components/Icons/PersonRelaxing.d.ts +1 -1
  933. package/components/Icons/PersonRelaxing.d.ts.map +1 -1
  934. package/components/Icons/PersonRelaxing.js +5 -1
  935. package/components/Icons/PersonRelaxing.js.map +1 -1
  936. package/components/Icons/PersonWithBrain.d.ts +1 -1
  937. package/components/Icons/PersonWithBrain.d.ts.map +1 -1
  938. package/components/Icons/PersonWithBrain.js +5 -1
  939. package/components/Icons/PersonWithBrain.js.map +1 -1
  940. package/components/Icons/PersonWithBrokenArm.d.ts +1 -1
  941. package/components/Icons/PersonWithBrokenArm.d.ts.map +1 -1
  942. package/components/Icons/PersonWithBrokenArm.js +5 -1
  943. package/components/Icons/PersonWithBrokenArm.js.map +1 -1
  944. package/components/Icons/PersonWithCrutches.d.ts +1 -1
  945. package/components/Icons/PersonWithCrutches.d.ts.map +1 -1
  946. package/components/Icons/PersonWithCrutches.js +5 -1
  947. package/components/Icons/PersonWithCrutches.js.map +1 -1
  948. package/components/Icons/PersonWithJaw.d.ts +1 -1
  949. package/components/Icons/PersonWithJaw.d.ts.map +1 -1
  950. package/components/Icons/PersonWithJaw.js +5 -1
  951. package/components/Icons/PersonWithJaw.js.map +1 -1
  952. package/components/Icons/PersonWithMagnifyingGlass.d.ts +1 -1
  953. package/components/Icons/PersonWithMagnifyingGlass.d.ts.map +1 -1
  954. package/components/Icons/PersonWithMagnifyingGlass.js +5 -1
  955. package/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
  956. package/components/Icons/PersonWithSenses.d.ts +1 -1
  957. package/components/Icons/PersonWithSenses.d.ts.map +1 -1
  958. package/components/Icons/PersonWithSenses.js +5 -1
  959. package/components/Icons/PersonWithSenses.js.map +1 -1
  960. package/components/Icons/PersonWorking.d.ts +1 -1
  961. package/components/Icons/PersonWorking.d.ts.map +1 -1
  962. package/components/Icons/PersonWorking.js +5 -1
  963. package/components/Icons/PersonWorking.js.map +1 -1
  964. package/components/Icons/PersonalPlan.d.ts +1 -1
  965. package/components/Icons/PersonalPlan.d.ts.map +1 -1
  966. package/components/Icons/PersonalPlan.js +33 -1
  967. package/components/Icons/PersonalPlan.js.map +1 -1
  968. package/components/Icons/PizzaSlice.d.ts +1 -1
  969. package/components/Icons/PizzaSlice.d.ts.map +1 -1
  970. package/components/Icons/PizzaSlice.js +5 -1
  971. package/components/Icons/PizzaSlice.js.map +1 -1
  972. package/components/Icons/Plane.d.ts +1 -1
  973. package/components/Icons/Plane.d.ts.map +1 -1
  974. package/components/Icons/Plane.js +5 -1
  975. package/components/Icons/Plane.js.map +1 -1
  976. package/components/Icons/Plant.d.ts +1 -1
  977. package/components/Icons/Plant.d.ts.map +1 -1
  978. package/components/Icons/Plant.js +5 -1
  979. package/components/Icons/Plant.js.map +1 -1
  980. package/components/Icons/Play.d.ts +1 -1
  981. package/components/Icons/Play.d.ts.map +1 -1
  982. package/components/Icons/Play.js +6 -1
  983. package/components/Icons/Play.js.map +1 -1
  984. package/components/Icons/PlusLarge.d.ts +1 -1
  985. package/components/Icons/PlusLarge.d.ts.map +1 -1
  986. package/components/Icons/PlusLarge.js +6 -1
  987. package/components/Icons/PlusLarge.js.map +1 -1
  988. package/components/Icons/PlusSmall.d.ts +1 -1
  989. package/components/Icons/PlusSmall.d.ts.map +1 -1
  990. package/components/Icons/PlusSmall.js +6 -1
  991. package/components/Icons/PlusSmall.js.map +1 -1
  992. package/components/Icons/PngFile.d.ts +1 -1
  993. package/components/Icons/PngFile.d.ts.map +1 -1
  994. package/components/Icons/PngFile.js +17 -1
  995. package/components/Icons/PngFile.js.map +1 -1
  996. package/components/Icons/Podcast.d.ts +1 -1
  997. package/components/Icons/Podcast.d.ts.map +1 -1
  998. package/components/Icons/Podcast.js +17 -1
  999. package/components/Icons/Podcast.js.map +1 -1
  1000. package/components/Icons/PoisonInformation.d.ts +1 -1
  1001. package/components/Icons/PoisonInformation.d.ts.map +1 -1
  1002. package/components/Icons/PoisonInformation.js +5 -1
  1003. package/components/Icons/PoisonInformation.js.map +1 -1
  1004. package/components/Icons/Pregnant.d.ts +1 -1
  1005. package/components/Icons/Pregnant.d.ts.map +1 -1
  1006. package/components/Icons/Pregnant.js +5 -1
  1007. package/components/Icons/Pregnant.js.map +1 -1
  1008. package/components/Icons/Printer.d.ts +1 -1
  1009. package/components/Icons/Printer.d.ts.map +1 -1
  1010. package/components/Icons/Printer.js +30 -1
  1011. package/components/Icons/Printer.js.map +1 -1
  1012. package/components/Icons/Psychosis.d.ts +1 -1
  1013. package/components/Icons/Psychosis.d.ts.map +1 -1
  1014. package/components/Icons/Psychosis.js +5 -1
  1015. package/components/Icons/Psychosis.js.map +1 -1
  1016. package/components/Icons/Publication.d.ts +1 -1
  1017. package/components/Icons/Publication.d.ts.map +1 -1
  1018. package/components/Icons/Publication.js +17 -1
  1019. package/components/Icons/Publication.js.map +1 -1
  1020. package/components/Icons/Puzzle.d.ts +1 -1
  1021. package/components/Icons/Puzzle.d.ts.map +1 -1
  1022. package/components/Icons/Puzzle.js +5 -1
  1023. package/components/Icons/Puzzle.js.map +1 -1
  1024. package/components/Icons/QrCode.d.ts +1 -1
  1025. package/components/Icons/QrCode.d.ts.map +1 -1
  1026. package/components/Icons/QrCode.js +30 -1
  1027. package/components/Icons/QrCode.js.map +1 -1
  1028. package/components/Icons/Quarrel.d.ts +1 -1
  1029. package/components/Icons/Quarrel.d.ts.map +1 -1
  1030. package/components/Icons/Quarrel.js +17 -1
  1031. package/components/Icons/Quarrel.js.map +1 -1
  1032. package/components/Icons/RadioTherapy.d.ts +1 -1
  1033. package/components/Icons/RadioTherapy.d.ts.map +1 -1
  1034. package/components/Icons/RadioTherapy.js +17 -1
  1035. package/components/Icons/RadioTherapy.js.map +1 -1
  1036. package/components/Icons/RadioactiveTreatment.d.ts +1 -1
  1037. package/components/Icons/RadioactiveTreatment.d.ts.map +1 -1
  1038. package/components/Icons/RadioactiveTreatment.js +17 -1
  1039. package/components/Icons/RadioactiveTreatment.js.map +1 -1
  1040. package/components/Icons/Radioiodine.d.ts +1 -1
  1041. package/components/Icons/Radioiodine.d.ts.map +1 -1
  1042. package/components/Icons/Radioiodine.js +17 -1
  1043. package/components/Icons/Radioiodine.js.map +1 -1
  1044. package/components/Icons/Receipt.d.ts +1 -1
  1045. package/components/Icons/Receipt.d.ts.map +1 -1
  1046. package/components/Icons/Receipt.js +5 -1
  1047. package/components/Icons/Receipt.js.map +1 -1
  1048. package/components/Icons/Receptionist.d.ts +1 -1
  1049. package/components/Icons/Receptionist.d.ts.map +1 -1
  1050. package/components/Icons/Receptionist.js +6 -1
  1051. package/components/Icons/Receptionist.js.map +1 -1
  1052. package/components/Icons/Recovery.d.ts +1 -1
  1053. package/components/Icons/Recovery.d.ts.map +1 -1
  1054. package/components/Icons/Recovery.js +17 -1
  1055. package/components/Icons/Recovery.js.map +1 -1
  1056. package/components/Icons/Referral.d.ts +1 -1
  1057. package/components/Icons/Referral.d.ts.map +1 -1
  1058. package/components/Icons/Referral.js +6 -1
  1059. package/components/Icons/Referral.js.map +1 -1
  1060. package/components/Icons/Refresh.d.ts +1 -1
  1061. package/components/Icons/Refresh.d.ts.map +1 -1
  1062. package/components/Icons/Refresh.js +6 -1
  1063. package/components/Icons/Refresh.js.map +1 -1
  1064. package/components/Icons/Refund.d.ts +1 -1
  1065. package/components/Icons/Refund.d.ts.map +1 -1
  1066. package/components/Icons/Refund.js +5 -1
  1067. package/components/Icons/Refund.js.map +1 -1
  1068. package/components/Icons/Reply.d.ts +1 -1
  1069. package/components/Icons/Reply.d.ts.map +1 -1
  1070. package/components/Icons/Reply.js +6 -1
  1071. package/components/Icons/Reply.js.map +1 -1
  1072. package/components/Icons/Rocket.d.ts +1 -1
  1073. package/components/Icons/Rocket.d.ts.map +1 -1
  1074. package/components/Icons/Rocket.js +5 -1
  1075. package/components/Icons/Rocket.js.map +1 -1
  1076. package/components/Icons/RtfFile.d.ts +1 -1
  1077. package/components/Icons/RtfFile.d.ts.map +1 -1
  1078. package/components/Icons/RtfFile.js +17 -1
  1079. package/components/Icons/RtfFile.js.map +1 -1
  1080. package/components/Icons/STDs.d.ts +1 -1
  1081. package/components/Icons/STDs.d.ts.map +1 -1
  1082. package/components/Icons/STDs.js +17 -1
  1083. package/components/Icons/STDs.js.map +1 -1
  1084. package/components/Icons/Save.d.ts +1 -1
  1085. package/components/Icons/Save.d.ts.map +1 -1
  1086. package/components/Icons/Save.js +6 -1
  1087. package/components/Icons/Save.js.map +1 -1
  1088. package/components/Icons/Scale.d.ts +1 -1
  1089. package/components/Icons/Scale.d.ts.map +1 -1
  1090. package/components/Icons/Scale.js +5 -1
  1091. package/components/Icons/Scale.js.map +1 -1
  1092. package/components/Icons/Search.d.ts +1 -1
  1093. package/components/Icons/Search.d.ts.map +1 -1
  1094. package/components/Icons/Search.js +6 -1
  1095. package/components/Icons/Search.js.map +1 -1
  1096. package/components/Icons/SectionSign.d.ts +1 -1
  1097. package/components/Icons/SectionSign.d.ts.map +1 -1
  1098. package/components/Icons/SectionSign.js +30 -1
  1099. package/components/Icons/SectionSign.js.map +1 -1
  1100. package/components/Icons/Settings.d.ts +1 -1
  1101. package/components/Icons/Settings.d.ts.map +1 -1
  1102. package/components/Icons/Settings.js +30 -1
  1103. package/components/Icons/Settings.js.map +1 -1
  1104. package/components/Icons/Sexualorientation.d.ts +1 -1
  1105. package/components/Icons/Sexualorientation.d.ts.map +1 -1
  1106. package/components/Icons/Sexualorientation.js +17 -1
  1107. package/components/Icons/Sexualorientation.js.map +1 -1
  1108. package/components/Icons/ShakingHand.d.ts +1 -1
  1109. package/components/Icons/ShakingHand.d.ts.map +1 -1
  1110. package/components/Icons/ShakingHand.js +11 -1
  1111. package/components/Icons/ShakingHand.js.map +1 -1
  1112. package/components/Icons/Share.d.ts +1 -1
  1113. package/components/Icons/Share.d.ts.map +1 -1
  1114. package/components/Icons/Share.js +6 -1
  1115. package/components/Icons/Share.js.map +1 -1
  1116. package/components/Icons/Shield.d.ts +1 -1
  1117. package/components/Icons/Shield.d.ts.map +1 -1
  1118. package/components/Icons/Shield.js +17 -1
  1119. package/components/Icons/Shield.js.map +1 -1
  1120. package/components/Icons/ShuntOperation.d.ts +1 -1
  1121. package/components/Icons/ShuntOperation.d.ts.map +1 -1
  1122. package/components/Icons/ShuntOperation.js +17 -1
  1123. package/components/Icons/ShuntOperation.js.map +1 -1
  1124. package/components/Icons/Skeleton.d.ts +1 -1
  1125. package/components/Icons/Skeleton.d.ts.map +1 -1
  1126. package/components/Icons/Skeleton.js +5 -1
  1127. package/components/Icons/Skeleton.js.map +1 -1
  1128. package/components/Icons/Skin.d.ts +1 -1
  1129. package/components/Icons/Skin.d.ts.map +1 -1
  1130. package/components/Icons/Skin.js +5 -1
  1131. package/components/Icons/Skin.js.map +1 -1
  1132. package/components/Icons/Snake.d.ts +1 -1
  1133. package/components/Icons/Snake.d.ts.map +1 -1
  1134. package/components/Icons/Snake.js +5 -1
  1135. package/components/Icons/Snake.js.map +1 -1
  1136. package/components/Icons/Snapchat.d.ts +1 -1
  1137. package/components/Icons/Snapchat.d.ts.map +1 -1
  1138. package/components/Icons/Snapchat.js +5 -1
  1139. package/components/Icons/Snapchat.js.map +1 -1
  1140. package/components/Icons/SortDown.d.ts +1 -1
  1141. package/components/Icons/SortDown.d.ts.map +1 -1
  1142. package/components/Icons/SortDown.js +9 -1
  1143. package/components/Icons/SortDown.js.map +1 -1
  1144. package/components/Icons/SortUp.d.ts +1 -1
  1145. package/components/Icons/SortUp.d.ts.map +1 -1
  1146. package/components/Icons/SortUp.js +9 -1
  1147. package/components/Icons/SortUp.js.map +1 -1
  1148. package/components/Icons/SpeechBubble.d.ts +1 -1
  1149. package/components/Icons/SpeechBubble.d.ts.map +1 -1
  1150. package/components/Icons/SpeechBubble.js +30 -1
  1151. package/components/Icons/SpeechBubble.js.map +1 -1
  1152. package/components/Icons/Spray.d.ts +1 -1
  1153. package/components/Icons/Spray.d.ts.map +1 -1
  1154. package/components/Icons/Spray.js +5 -1
  1155. package/components/Icons/Spray.js.map +1 -1
  1156. package/components/Icons/Stopwatch.d.ts +1 -1
  1157. package/components/Icons/Stopwatch.d.ts.map +1 -1
  1158. package/components/Icons/Stopwatch.js +30 -1
  1159. package/components/Icons/Stopwatch.js.map +1 -1
  1160. package/components/Icons/SupportingPerson.d.ts +1 -1
  1161. package/components/Icons/SupportingPerson.d.ts.map +1 -1
  1162. package/components/Icons/SupportingPerson.js +41 -1
  1163. package/components/Icons/SupportingPerson.js.map +1 -1
  1164. package/components/Icons/Surgery.d.ts +1 -1
  1165. package/components/Icons/Surgery.d.ts.map +1 -1
  1166. package/components/Icons/Surgery.js +17 -1
  1167. package/components/Icons/Surgery.js.map +1 -1
  1168. package/components/Icons/Syringe.d.ts +1 -1
  1169. package/components/Icons/Syringe.d.ts.map +1 -1
  1170. package/components/Icons/Syringe.js +22 -1
  1171. package/components/Icons/Syringe.js.map +1 -1
  1172. package/components/Icons/Taxi.d.ts +1 -1
  1173. package/components/Icons/Taxi.d.ts.map +1 -1
  1174. package/components/Icons/Taxi.js +5 -1
  1175. package/components/Icons/Taxi.js.map +1 -1
  1176. package/components/Icons/TeddyBear.d.ts +1 -1
  1177. package/components/Icons/TeddyBear.d.ts.map +1 -1
  1178. package/components/Icons/TeddyBear.js +5 -1
  1179. package/components/Icons/TeddyBear.js.map +1 -1
  1180. package/components/Icons/Teenagers.d.ts +1 -1
  1181. package/components/Icons/Teenagers.d.ts.map +1 -1
  1182. package/components/Icons/Teenagers.js +17 -1
  1183. package/components/Icons/Teenagers.js.map +1 -1
  1184. package/components/Icons/ThinkingAboutBaby.d.ts +1 -1
  1185. package/components/Icons/ThinkingAboutBaby.d.ts.map +1 -1
  1186. package/components/Icons/ThinkingAboutBaby.js +5 -1
  1187. package/components/Icons/ThinkingAboutBaby.js.map +1 -1
  1188. package/components/Icons/Ticket.d.ts +1 -1
  1189. package/components/Icons/Ticket.d.ts.map +1 -1
  1190. package/components/Icons/Ticket.js +5 -1
  1191. package/components/Icons/Ticket.js.map +1 -1
  1192. package/components/Icons/TimePassing.d.ts +1 -1
  1193. package/components/Icons/TimePassing.d.ts.map +1 -1
  1194. package/components/Icons/TimePassing.js +30 -1
  1195. package/components/Icons/TimePassing.js.map +1 -1
  1196. package/components/Icons/Tombstone.d.ts +1 -1
  1197. package/components/Icons/Tombstone.d.ts.map +1 -1
  1198. package/components/Icons/Tombstone.js +21 -1
  1199. package/components/Icons/Tombstone.js.map +1 -1
  1200. package/components/Icons/Toolbox.d.ts +1 -1
  1201. package/components/Icons/Toolbox.d.ts.map +1 -1
  1202. package/components/Icons/Toolbox.js +42 -1
  1203. package/components/Icons/Toolbox.js.map +1 -1
  1204. package/components/Icons/Tooth.d.ts +1 -1
  1205. package/components/Icons/Tooth.d.ts.map +1 -1
  1206. package/components/Icons/Tooth.js +5 -1
  1207. package/components/Icons/Tooth.js.map +1 -1
  1208. package/components/Icons/TotalKneeProsthesis.d.ts +1 -1
  1209. package/components/Icons/TotalKneeProsthesis.d.ts.map +1 -1
  1210. package/components/Icons/TotalKneeProsthesis.js +17 -1
  1211. package/components/Icons/TotalKneeProsthesis.js.map +1 -1
  1212. package/components/Icons/Train.d.ts +1 -1
  1213. package/components/Icons/Train.d.ts.map +1 -1
  1214. package/components/Icons/Train.js +5 -1
  1215. package/components/Icons/Train.js.map +1 -1
  1216. package/components/Icons/Transplantation.d.ts +1 -1
  1217. package/components/Icons/Transplantation.d.ts.map +1 -1
  1218. package/components/Icons/Transplantation.js +17 -1
  1219. package/components/Icons/Transplantation.js.map +1 -1
  1220. package/components/Icons/TrashCan.d.ts +1 -1
  1221. package/components/Icons/TrashCan.d.ts.map +1 -1
  1222. package/components/Icons/TrashCan.js +30 -1
  1223. package/components/Icons/TrashCan.js.map +1 -1
  1224. package/components/Icons/TravelRoute.d.ts +1 -1
  1225. package/components/Icons/TravelRoute.d.ts.map +1 -1
  1226. package/components/Icons/TravelRoute.js +50 -1
  1227. package/components/Icons/TravelRoute.js.map +1 -1
  1228. package/components/Icons/TriangleX.d.ts +1 -1
  1229. package/components/Icons/TriangleX.d.ts.map +1 -1
  1230. package/components/Icons/TriangleX.js +37 -1
  1231. package/components/Icons/TriangleX.js.map +1 -1
  1232. package/components/Icons/Twitter.d.ts +1 -1
  1233. package/components/Icons/Twitter.d.ts.map +1 -1
  1234. package/components/Icons/Twitter.js +5 -1
  1235. package/components/Icons/Twitter.js.map +1 -1
  1236. package/components/Icons/Undo.d.ts +1 -1
  1237. package/components/Icons/Undo.d.ts.map +1 -1
  1238. package/components/Icons/Undo.js +42 -1
  1239. package/components/Icons/Undo.js.map +1 -1
  1240. package/components/Icons/UniProsthesis.d.ts +1 -1
  1241. package/components/Icons/UniProsthesis.d.ts.map +1 -1
  1242. package/components/Icons/UniProsthesis.js +17 -1
  1243. package/components/Icons/UniProsthesis.js.map +1 -1
  1244. package/components/Icons/Upload.d.ts +1 -1
  1245. package/components/Icons/Upload.d.ts.map +1 -1
  1246. package/components/Icons/Upload.js +6 -1
  1247. package/components/Icons/Upload.js.map +1 -1
  1248. package/components/Icons/UserOrganization.d.ts +1 -1
  1249. package/components/Icons/UserOrganization.d.ts.map +1 -1
  1250. package/components/Icons/UserOrganization.js +5 -1
  1251. package/components/Icons/UserOrganization.js.map +1 -1
  1252. package/components/Icons/Vaccine.d.ts +1 -1
  1253. package/components/Icons/Vaccine.d.ts.map +1 -1
  1254. package/components/Icons/Vaccine.js +30 -1
  1255. package/components/Icons/Vaccine.js.map +1 -1
  1256. package/components/Icons/VerticalDots.d.ts +1 -1
  1257. package/components/Icons/VerticalDots.d.ts.map +1 -1
  1258. package/components/Icons/VerticalDots.js +6 -1
  1259. package/components/Icons/VerticalDots.js.map +1 -1
  1260. package/components/Icons/VideoCamera.d.ts +1 -1
  1261. package/components/Icons/VideoCamera.d.ts.map +1 -1
  1262. package/components/Icons/VideoCamera.js +30 -1
  1263. package/components/Icons/VideoCamera.js.map +1 -1
  1264. package/components/Icons/VideoChat.d.ts +1 -1
  1265. package/components/Icons/VideoChat.d.ts.map +1 -1
  1266. package/components/Icons/VideoChat.js +6 -1
  1267. package/components/Icons/VideoChat.js.map +1 -1
  1268. package/components/Icons/Wallet.d.ts +1 -1
  1269. package/components/Icons/Wallet.d.ts.map +1 -1
  1270. package/components/Icons/Wallet.js +6 -1
  1271. package/components/Icons/Wallet.js.map +1 -1
  1272. package/components/Icons/Watch.d.ts +1 -1
  1273. package/components/Icons/Watch.d.ts.map +1 -1
  1274. package/components/Icons/Watch.js +30 -1
  1275. package/components/Icons/Watch.js.map +1 -1
  1276. package/components/Icons/Website.d.ts +1 -1
  1277. package/components/Icons/Website.d.ts.map +1 -1
  1278. package/components/Icons/Website.js +17 -1
  1279. package/components/Icons/Website.js.map +1 -1
  1280. package/components/Icons/Wheelchair.d.ts +1 -1
  1281. package/components/Icons/Wheelchair.d.ts.map +1 -1
  1282. package/components/Icons/Wheelchair.js +17 -1
  1283. package/components/Icons/Wheelchair.js.map +1 -1
  1284. package/components/Icons/WheelchairActive.d.ts +1 -1
  1285. package/components/Icons/WheelchairActive.d.ts.map +1 -1
  1286. package/components/Icons/WheelchairActive.js +17 -1
  1287. package/components/Icons/WheelchairActive.js.map +1 -1
  1288. package/components/Icons/Window.d.ts +1 -1
  1289. package/components/Icons/Window.d.ts.map +1 -1
  1290. package/components/Icons/Window.js +5 -1
  1291. package/components/Icons/Window.js.map +1 -1
  1292. package/components/Icons/WordDocument.d.ts +1 -1
  1293. package/components/Icons/WordDocument.d.ts.map +1 -1
  1294. package/components/Icons/WordDocument.js +11 -1
  1295. package/components/Icons/WordDocument.js.map +1 -1
  1296. package/components/Icons/WorkSuitcase.d.ts +1 -1
  1297. package/components/Icons/WorkSuitcase.d.ts.map +1 -1
  1298. package/components/Icons/WorkSuitcase.js +11 -1
  1299. package/components/Icons/WorkSuitcase.js.map +1 -1
  1300. package/components/Icons/X.d.ts +1 -1
  1301. package/components/Icons/X.d.ts.map +1 -1
  1302. package/components/Icons/X.js +6 -1
  1303. package/components/Icons/X.js.map +1 -1
  1304. package/components/Icons/XOutline.d.ts +1 -1
  1305. package/components/Icons/XOutline.d.ts.map +1 -1
  1306. package/components/Icons/XOutline.js +17 -1
  1307. package/components/Icons/XOutline.js.map +1 -1
  1308. package/components/Icons/XmlFile.d.ts +1 -1
  1309. package/components/Icons/XmlFile.d.ts.map +1 -1
  1310. package/components/Icons/XmlFile.js +17 -1
  1311. package/components/Icons/XmlFile.js.map +1 -1
  1312. package/components/Icons/YouTube.d.ts +1 -1
  1313. package/components/Icons/YouTube.d.ts.map +1 -1
  1314. package/components/Icons/YouTube.js +5 -1
  1315. package/components/Icons/YouTube.js.map +1 -1
  1316. package/components/Icons/Zoom.d.ts +1 -1
  1317. package/components/Icons/Zoom.d.ts.map +1 -1
  1318. package/components/Icons/Zoom.js +30 -1
  1319. package/components/Icons/Zoom.js.map +1 -1
  1320. package/components/Input/Input.d.ts +5 -4
  1321. package/components/Input/Input.d.ts.map +1 -1
  1322. package/components/Input/Input.js +112 -0
  1323. package/components/Input/Input.js.map +1 -0
  1324. package/components/Input/index.js +6 -1
  1325. package/components/Input/index.js.map +1 -1
  1326. package/components/Input/styles.module.scss +3 -3
  1327. package/components/Input/styles.module.scss.d.ts +2 -2
  1328. package/components/Label/Label.d.ts +1 -1
  1329. package/components/Label/Label.d.ts.map +1 -1
  1330. package/components/Label/Label.js +84 -0
  1331. package/components/Label/Label.js.map +1 -0
  1332. package/components/Label/SubLabel.js +19 -0
  1333. package/components/Label/SubLabel.js.map +1 -0
  1334. package/components/Label/index.js +10 -1
  1335. package/components/Label/index.js.map +1 -1
  1336. package/components/LazyIcon/ErrorBoundary.d.ts +17 -0
  1337. package/components/LazyIcon/ErrorBoundary.d.ts.map +1 -0
  1338. package/components/LazyIcon/ErrorBoundary.js +22 -0
  1339. package/components/LazyIcon/ErrorBoundary.js.map +1 -0
  1340. package/components/LazyIcon/LazyIcon.d.ts +10 -0
  1341. package/components/LazyIcon/LazyIcon.d.ts.map +1 -0
  1342. package/components/LazyIcon/LazyIcon.js +29 -0
  1343. package/components/LazyIcon/LazyIcon.js.map +1 -0
  1344. package/components/LazyIcon/index.d.ts +4 -0
  1345. package/components/LazyIcon/index.d.ts.map +1 -0
  1346. package/components/LazyIcon/index.js +8 -0
  1347. package/components/{Icons → LazyIcon}/index.js.map +1 -1
  1348. package/components/LinkList/LinkList.js +60 -0
  1349. package/components/LinkList/LinkList.js.map +1 -0
  1350. package/components/LinkList/index.js +6 -1
  1351. package/components/LinkList/index.js.map +1 -1
  1352. package/components/List/List.js +14 -0
  1353. package/components/List/List.js.map +1 -0
  1354. package/components/List/index.js +4 -1
  1355. package/components/List/index.js.map +1 -1
  1356. package/components/ListHeader/ListHeader.d.ts +1 -1
  1357. package/components/ListHeader/ListHeader.d.ts.map +1 -1
  1358. package/components/ListHeader/ListHeader.js +73 -0
  1359. package/components/ListHeader/ListHeader.js.map +1 -0
  1360. package/components/ListHeader/ListHeaderText/ListHeaderText.js +31 -0
  1361. package/components/ListHeader/ListHeaderText/ListHeaderText.js.map +1 -0
  1362. package/components/ListHeader/ListHeaderText/index.js +6 -1
  1363. package/components/ListHeader/ListHeaderText/index.js.map +1 -1
  1364. package/components/ListHeader/index.js +10 -1
  1365. package/components/ListHeader/index.js.map +1 -1
  1366. package/components/Loader/Loader.js +68 -0
  1367. package/components/Loader/Loader.js.map +1 -0
  1368. package/components/Loader/index.js +6 -1
  1369. package/components/Loader/index.js.map +1 -1
  1370. package/components/Logo/Logo.js +40 -0
  1371. package/components/Logo/Logo.js.map +1 -0
  1372. package/components/Logo/index.js +4 -1
  1373. package/components/Logo/index.js.map +1 -1
  1374. package/components/MaxCharacters/MaxCharacters.js +15 -0
  1375. package/components/MaxCharacters/MaxCharacters.js.map +1 -0
  1376. package/components/Modal/Modal.js +143 -0
  1377. package/components/Modal/Modal.js.map +1 -0
  1378. package/components/Modal/index.js +7 -1
  1379. package/components/Modal/index.js.map +1 -1
  1380. package/components/NotificationPanel/DetailButton/DetailButton.js +28 -0
  1381. package/components/NotificationPanel/DetailButton/DetailButton.js.map +1 -0
  1382. package/components/NotificationPanel/NotificationPanel.js +126 -0
  1383. package/components/NotificationPanel/NotificationPanel.js.map +1 -0
  1384. package/components/NotificationPanel/index.js +4 -1
  1385. package/components/NotificationPanel/index.js.map +1 -1
  1386. package/components/Panel/Panel.d.ts.map +1 -1
  1387. package/components/Panel/Panel.js +146 -0
  1388. package/components/Panel/Panel.js.map +1 -0
  1389. package/components/Panel/index.js +8 -1
  1390. package/components/Panel/index.js.map +1 -1
  1391. package/components/PanelList/PanelList.js +17 -0
  1392. package/components/PanelList/PanelList.js.map +1 -0
  1393. package/components/PanelList/index.js +4 -1
  1394. package/components/PanelList/index.js.map +1 -1
  1395. package/components/PopMenu/PopMenu.js +75 -0
  1396. package/components/PopMenu/PopMenu.js.map +1 -0
  1397. package/components/PopMenu/index.js +7 -1
  1398. package/components/PopMenu/index.js.map +1 -1
  1399. package/components/PopOver/PopOver.js +56 -0
  1400. package/components/PopOver/PopOver.js.map +1 -0
  1401. package/components/PopOver/index.js +6 -1
  1402. package/components/PopOver/index.js.map +1 -1
  1403. package/components/PopOver/utils.js +33 -0
  1404. package/components/PopOver/utils.js.map +1 -0
  1405. package/components/Portal/index.js +15 -1
  1406. package/components/Portal/index.js.map +1 -1
  1407. package/components/RadioButton/RadioButton.d.ts +4 -4
  1408. package/components/RadioButton/RadioButton.d.ts.map +1 -1
  1409. package/components/RadioButton/RadioButton.js +102 -0
  1410. package/components/RadioButton/RadioButton.js.map +1 -0
  1411. package/components/RadioButton/index.js +7 -1
  1412. package/components/RadioButton/index.js.map +1 -1
  1413. package/components/RadioButton/styles.module.scss +12 -12
  1414. package/components/RadioButton/styles.module.scss.d.ts +14 -14
  1415. package/components/Select/Select.js +69 -0
  1416. package/components/Select/Select.js.map +1 -0
  1417. package/components/Select/index.js +6 -1
  1418. package/components/Select/index.js.map +1 -1
  1419. package/components/ServiceMessage/ServiceMessage.js +106 -0
  1420. package/components/ServiceMessage/ServiceMessage.js.map +1 -0
  1421. package/components/ServiceMessage/index.js +4 -1
  1422. package/components/ServiceMessage/index.js.map +1 -1
  1423. package/components/Slider/Slider.js +125 -0
  1424. package/components/Slider/Slider.js.map +1 -0
  1425. package/components/Slider/index.js +6 -1
  1426. package/components/Slider/index.js.map +1 -1
  1427. package/components/Spacer/Spacer.js +30 -0
  1428. package/components/Spacer/Spacer.js.map +1 -0
  1429. package/components/Spacer/index.js +4 -1
  1430. package/components/Spacer/index.js.map +1 -1
  1431. package/components/StatusDot/StatusDot.js +27 -0
  1432. package/{StatusDot.js.map → components/StatusDot/StatusDot.js.map} +1 -1
  1433. package/components/StatusDot/index.js +7 -1
  1434. package/components/StatusDot/index.js.map +1 -1
  1435. package/components/Step/Step.d.ts.map +1 -1
  1436. package/components/Step/Step.js +30 -0
  1437. package/components/Step/Step.js.map +1 -0
  1438. package/components/Step/index.js +4 -1
  1439. package/components/Step/index.js.map +1 -1
  1440. package/components/Step/styles.module.scss +1 -3
  1441. package/components/Step/styles.module.scss.d.ts +1 -1
  1442. package/components/StepButtons/StepButtons.d.ts +1 -1
  1443. package/components/StepButtons/StepButtons.d.ts.map +1 -1
  1444. package/components/StepButtons/StepButtons.js +21 -0
  1445. package/components/StepButtons/StepButtons.js.map +1 -0
  1446. package/components/StepButtons/index.js +6 -1
  1447. package/components/StepButtons/index.js.map +1 -1
  1448. package/components/StepButtons/styles.module.scss +2 -2
  1449. package/components/Stepper/Dot.js +16 -0
  1450. package/components/Stepper/Dot.js.map +1 -0
  1451. package/components/Stepper/DotList.js +7 -0
  1452. package/components/Stepper/DotList.js.map +1 -0
  1453. package/components/Stepper/Stepper.js +35 -0
  1454. package/components/Stepper/Stepper.js.map +1 -0
  1455. package/components/Stepper/index.js +4 -1
  1456. package/components/Stepper/index.js.map +1 -1
  1457. package/components/Stepper/utils.js +16 -0
  1458. package/components/Stepper/utils.js.map +1 -0
  1459. package/components/Table/Table.js +57 -0
  1460. package/components/Table/Table.js.map +1 -0
  1461. package/components/Table/TableBody/TableBody.js +13 -0
  1462. package/components/Table/TableBody/TableBody.js.map +1 -0
  1463. package/components/Table/TableBody/index.js +6 -1
  1464. package/components/Table/TableBody/index.js.map +1 -1
  1465. package/components/Table/TableCell/TableCell.js +30 -0
  1466. package/components/Table/TableCell/TableCell.js.map +1 -0
  1467. package/components/Table/TableCell/index.js +7 -1
  1468. package/components/Table/TableCell/index.js.map +1 -1
  1469. package/components/Table/TableExpandedRow/TableExpandedRow.js +33 -0
  1470. package/components/Table/TableExpandedRow/TableExpandedRow.js.map +1 -0
  1471. package/components/Table/TableExpandedRow/index.js +6 -1
  1472. package/components/Table/TableExpandedRow/index.js.map +1 -1
  1473. package/components/Table/TableExpanderCell/TableExpanderCell.js +35 -0
  1474. package/components/Table/TableExpanderCell/TableExpanderCell.js.map +1 -0
  1475. package/components/Table/TableExpanderCell/TableExpanderCellMobile.js +25 -0
  1476. package/components/Table/TableExpanderCell/TableExpanderCellMobile.js.map +1 -0
  1477. package/components/Table/TableExpanderCell/index.js +6 -1
  1478. package/components/Table/TableExpanderCell/index.js.map +1 -1
  1479. package/components/Table/TableHead/TableHead.js +24 -0
  1480. package/components/Table/TableHead/TableHead.js.map +1 -0
  1481. package/components/Table/TableHead/index.js +7 -1
  1482. package/components/Table/TableHead/index.js.map +1 -1
  1483. package/components/Table/TableHeadCell/TableHeadCell.js +36 -0
  1484. package/components/Table/TableHeadCell/TableHeadCell.js.map +1 -0
  1485. package/components/Table/TableHeadCell/index.js +7 -1
  1486. package/components/Table/TableHeadCell/index.js.map +1 -1
  1487. package/components/Table/TableRow/TableRow.js +40 -0
  1488. package/components/Table/TableRow/TableRow.js.map +1 -0
  1489. package/components/Table/TableRow/index.js +6 -1
  1490. package/components/Table/TableRow/index.js.map +1 -1
  1491. package/components/Table/index.js +27 -1
  1492. package/components/Table/index.js.map +1 -1
  1493. package/components/Table/utils.js +37 -0
  1494. package/components/Table/utils.js.map +1 -0
  1495. package/components/Tag/Tag.d.ts +3 -2
  1496. package/components/Tag/Tag.d.ts.map +1 -1
  1497. package/components/Tag/Tag.js +48 -0
  1498. package/components/Tag/Tag.js.map +1 -0
  1499. package/components/Tag/index.js +8 -1
  1500. package/components/Tag/index.js.map +1 -1
  1501. package/components/TagList/TagList.js +8 -0
  1502. package/components/TagList/TagList.js.map +1 -0
  1503. package/components/TagList/index.js +4 -1
  1504. package/components/TagList/index.js.map +1 -1
  1505. package/components/Textarea/Textarea.js +101 -0
  1506. package/components/Textarea/Textarea.js.map +1 -0
  1507. package/components/Textarea/index.js +4 -1
  1508. package/components/Textarea/index.js.map +1 -1
  1509. package/components/Textarea/styles.module.scss.d.ts +1 -1
  1510. package/components/Tile/Tile.js +54 -0
  1511. package/components/Tile/Tile.js.map +1 -0
  1512. package/components/Tile/index.js +6 -1
  1513. package/components/Tile/index.js.map +1 -1
  1514. package/components/Title/Title.js +25 -0
  1515. package/components/Title/Title.js.map +1 -0
  1516. package/components/Title/index.js +7 -1
  1517. package/components/Title/index.js.map +1 -1
  1518. package/components/Tooltip/Tooltip.js +55 -0
  1519. package/components/Tooltip/Tooltip.js.map +1 -0
  1520. package/components/Tooltip/TooltipWord/TooltipWord.js +28 -0
  1521. package/components/Tooltip/TooltipWord/TooltipWord.js.map +1 -0
  1522. package/components/Tooltip/TooltipWord/index.js +4 -1
  1523. package/components/Tooltip/TooltipWord/index.js.map +1 -1
  1524. package/components/Tooltip/index.js +7 -1
  1525. package/components/Tooltip/index.js.map +1 -1
  1526. package/components/TooltipExample/TooltipExample.js +8 -0
  1527. package/components/TooltipExample/TooltipExample.js.map +1 -0
  1528. package/components/TooltipExample/index.js +4 -1
  1529. package/components/TooltipExample/index.js.map +1 -1
  1530. package/components/Trigger/HelpSign.d.ts +1 -1
  1531. package/components/Trigger/HelpSign.d.ts.map +1 -1
  1532. package/components/Trigger/HelpSign.js +7 -0
  1533. package/components/Trigger/HelpSign.js.map +1 -0
  1534. package/components/Trigger/InfoSignStroke.d.ts +1 -1
  1535. package/components/Trigger/InfoSignStroke.d.ts.map +1 -1
  1536. package/components/Trigger/Trigger.js +74 -0
  1537. package/components/Trigger/Trigger.js.map +1 -0
  1538. package/components/Trigger/index.js +4 -1
  1539. package/components/Trigger/index.js.map +1 -1
  1540. package/components/Validation/Validation.d.ts +3 -3
  1541. package/components/Validation/Validation.d.ts.map +1 -1
  1542. package/components/Validation/Validation.js +18 -0
  1543. package/components/Validation/Validation.js.map +1 -0
  1544. package/components/Validation/index.js +6 -1
  1545. package/components/Validation/index.js.map +1 -1
  1546. package/constants.d.ts +3 -3
  1547. package/constants.d.ts.map +1 -1
  1548. package/constants.js +12 -1
  1549. package/constants.js.map +1 -1
  1550. package/hoc/withBreakpoint/index.js +5 -1
  1551. package/hoc/withBreakpoint/index.js.map +1 -1
  1552. package/hoc/withBreakpoint/withBreakpoint.js +12 -1
  1553. package/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
  1554. package/hooks/useBreakpoint.js +44 -1
  1555. package/hooks/useBreakpoint.js.map +1 -1
  1556. package/hooks/useDelayedState.js +14 -1
  1557. package/hooks/useDelayedState.js.map +1 -1
  1558. package/hooks/useElementList.js +17 -1
  1559. package/hooks/useElementList.js.map +1 -1
  1560. package/hooks/useEventListenerState.js +10 -1
  1561. package/hooks/useEventListenerState.js.map +1 -1
  1562. package/hooks/useExpand.js +13 -1
  1563. package/hooks/useExpand.js.map +1 -1
  1564. package/hooks/useFocusToggle.js +18 -1
  1565. package/hooks/useFocusToggle.js.map +1 -1
  1566. package/hooks/useFocusTrap.js +22 -1
  1567. package/hooks/useFocusTrap.js.map +1 -1
  1568. package/hooks/useFocusableElements.js +19 -1
  1569. package/hooks/useFocusableElements.js.map +1 -1
  1570. package/hooks/useHover.js +8 -1
  1571. package/hooks/useHover.js.map +1 -1
  1572. package/hooks/useIcons.d.ts +4 -2
  1573. package/hooks/useIcons.d.ts.map +1 -1
  1574. package/hooks/useIcons.js +15 -1
  1575. package/hooks/useIcons.js.map +1 -1
  1576. package/hooks/useIntersectionObserver.js +12 -1
  1577. package/hooks/useIntersectionObserver.js.map +1 -1
  1578. package/hooks/useInterval.js +12 -1
  1579. package/hooks/useInterval.js.map +1 -1
  1580. package/hooks/useIsVisible.js +11 -1
  1581. package/hooks/useIsVisible.js.map +1 -1
  1582. package/hooks/useKeyboardEvent.js +20 -1
  1583. package/hooks/useKeyboardEvent.js.map +1 -1
  1584. package/hooks/useLayoutEvent.js +15 -1
  1585. package/hooks/useLayoutEvent.js.map +1 -1
  1586. package/hooks/useOutsideEvent.js +12 -1
  1587. package/hooks/useOutsideEvent.js.map +1 -1
  1588. package/hooks/usePrevious.js +10 -1
  1589. package/hooks/usePrevious.js.map +1 -1
  1590. package/hooks/usePseudoClasses.js +15 -1
  1591. package/hooks/usePseudoClasses.js.map +1 -1
  1592. package/hooks/useResizeObserver.js +17 -1
  1593. package/hooks/useResizeObserver.js.map +1 -1
  1594. package/hooks/useSize.js +27 -1
  1595. package/hooks/useSize.js.map +1 -1
  1596. package/hooks/useSticky.js +17 -1
  1597. package/hooks/useSticky.js.map +1 -1
  1598. package/hooks/useToggle.js +15 -1
  1599. package/hooks/useToggle.js.map +1 -1
  1600. package/hooks/useUuid.js +9 -1
  1601. package/hooks/useUuid.js.map +1 -1
  1602. package/index.js +47 -1
  1603. package/index.js.map +1 -1
  1604. package/package.json +1 -1
  1605. package/scss/_input.scss +1 -1
  1606. package/theme/currys/color.js +6 -1
  1607. package/theme/currys/color.js.map +1 -1
  1608. package/theme/currys/index.js +8 -1
  1609. package/theme/currys/index.js.map +1 -1
  1610. package/theme/currys/spacing.js +37 -1
  1611. package/theme/currys/spacing.js.map +1 -1
  1612. package/theme/grid.js +24 -1
  1613. package/theme/grid.js.map +1 -1
  1614. package/theme/index.js +13 -1
  1615. package/theme/index.js.map +1 -1
  1616. package/theme/palette.js +79 -1
  1617. package/theme/palette.js.map +1 -1
  1618. package/theme/spacers.js +20 -1
  1619. package/theme/spacers.js.map +1 -1
  1620. package/utils/accessibility.js +18 -1
  1621. package/utils/accessibility.js.map +1 -1
  1622. package/utils/component.js +6 -1
  1623. package/utils/component.js.map +1 -1
  1624. package/utils/debounce.js +13 -1
  1625. package/utils/debounce.js.map +1 -1
  1626. package/utils/device.js +4 -1
  1627. package/utils/device.js.map +1 -1
  1628. package/utils/environment.js +11 -1
  1629. package/utils/environment.js.map +1 -1
  1630. package/utils/focus.js +10 -1
  1631. package/utils/focus.js.map +1 -1
  1632. package/utils/loremtext.js +7 -1
  1633. package/utils/loremtext.js.map +1 -1
  1634. package/utils/mobile.js +10 -1
  1635. package/utils/mobile.js.map +1 -1
  1636. package/utils/refs.js +9 -1
  1637. package/utils/refs.js.map +1 -1
  1638. package/utils/uuid.js +9 -1
  1639. package/utils/uuid.js.map +1 -1
  1640. package/utils/viewport.js +7 -1
  1641. package/utils/viewport.js.map +1 -1
  1642. package/AnchorLink.js +0 -2
  1643. package/AnchorLink.js.map +0 -1
  1644. package/Avatar.js +0 -2
  1645. package/Avatar.js.map +0 -1
  1646. package/Badge.js +0 -2
  1647. package/Badge.js.map +0 -1
  1648. package/Button.js +0 -2
  1649. package/Button.js.map +0 -1
  1650. package/Checkbox.js +0 -2
  1651. package/Checkbox.js.map +0 -1
  1652. package/Close.js +0 -2
  1653. package/Close.js.map +0 -1
  1654. package/ErrorWrapper.js +0 -2
  1655. package/ErrorWrapper.js.map +0 -1
  1656. package/FormGroup.js +0 -2
  1657. package/FormGroup.js.map +0 -1
  1658. package/FormLayout.js +0 -2
  1659. package/FormLayout.js.map +0 -1
  1660. package/HelpBubble.js +0 -2
  1661. package/HelpBubble.js.map +0 -1
  1662. package/HighlightBox.js +0 -2
  1663. package/HighlightBox.js.map +0 -1
  1664. package/HorizontalScroll.js +0 -2
  1665. package/HorizontalScroll.js.map +0 -1
  1666. package/Input.js +0 -2
  1667. package/Input.js.map +0 -1
  1668. package/Label.js +0 -2
  1669. package/Label.js.map +0 -1
  1670. package/LinkList.js +0 -2
  1671. package/LinkList.js.map +0 -1
  1672. package/ListHeader.js +0 -2
  1673. package/ListHeader.js.map +0 -1
  1674. package/ListHeaderText.js +0 -2
  1675. package/ListHeaderText.js.map +0 -1
  1676. package/MaxCharacters.js +0 -2
  1677. package/MaxCharacters.js.map +0 -1
  1678. package/Modal.js +0 -2
  1679. package/Modal.js.map +0 -1
  1680. package/Panel.js +0 -2
  1681. package/Panel.js.map +0 -1
  1682. package/PopOver.js +0 -2
  1683. package/PopOver.js.map +0 -1
  1684. package/RadioButton.js +0 -2
  1685. package/RadioButton.js.map +0 -1
  1686. package/Select.js +0 -2
  1687. package/Select.js.map +0 -1
  1688. package/Spacer.js +0 -2
  1689. package/Spacer.js.map +0 -1
  1690. package/StatusDot.js +0 -2
  1691. package/StepButtons.js +0 -2
  1692. package/StepButtons.js.map +0 -1
  1693. package/Table.js +0 -2
  1694. package/Table.js.map +0 -1
  1695. package/TableBody.js +0 -2
  1696. package/TableBody.js.map +0 -1
  1697. package/TableCell.js +0 -2
  1698. package/TableCell.js.map +0 -1
  1699. package/TableExpandedRow.js +0 -2
  1700. package/TableExpandedRow.js.map +0 -1
  1701. package/TableExpanderCell.js +0 -2
  1702. package/TableExpanderCell.js.map +0 -1
  1703. package/TableHead.js +0 -2
  1704. package/TableHead.js.map +0 -1
  1705. package/TableHeadCell.js +0 -2
  1706. package/TableHeadCell.js.map +0 -1
  1707. package/TableRow.js +0 -2
  1708. package/TableRow.js.map +0 -1
  1709. package/Textarea.js +0 -2
  1710. package/Textarea.js.map +0 -1
  1711. package/Title.js +0 -2
  1712. package/Title.js.map +0 -1
  1713. package/Tooltip.js +0 -2
  1714. package/Tooltip.js.map +0 -1
  1715. package/TooltipWord.js +0 -2
  1716. package/TooltipWord.js.map +0 -1
  1717. package/Trigger.js +0 -2
  1718. package/Trigger.js.map +0 -1
  1719. package/Validation.js +0 -2
  1720. package/Validation.js.map +0 -1
  1721. package/components/AnchorLink/componentdata.json +0 -1
  1722. package/components/Avatar/componentdata.json +0 -1
  1723. package/components/Badge/componentdata.json +0 -1
  1724. package/components/Button/componentdata.json +0 -1
  1725. package/components/ButtonWithModal/componentdata.json +0 -1
  1726. package/components/Checkbox/componentdata.json +0 -1
  1727. package/components/Close/componentdata.json +0 -1
  1728. package/components/DictionaryTrigger/componentdata.json +0 -1
  1729. package/components/Dropdown/componentdata.json +0 -1
  1730. package/components/Duolist/componentdata.json +0 -1
  1731. package/components/ErrorWrapper/componentdata.json +0 -1
  1732. package/components/Expander/componentdata.json +0 -1
  1733. package/components/ExpanderHierarchy/componentdata.json +0 -1
  1734. package/components/ExpanderList/componentdata.json +0 -1
  1735. package/components/FormExample/componentdata.json +0 -1
  1736. package/components/FormGroup/componentdata.json +0 -1
  1737. package/components/FormLayout/componentdata.json +0 -1
  1738. package/components/GridExample/componentdata.json +0 -1
  1739. package/components/HelpBubble/componentdata.json +0 -1
  1740. package/components/HelpBubbleExample/componentdata.json +0 -1
  1741. package/components/HelpPanel/componentdata.json +0 -1
  1742. package/components/HelpQuestion/componentdata.json +0 -1
  1743. package/components/HighlightBox/componentdata.json +0 -1
  1744. package/components/HorizontalScroll/componentdata.json +0 -1
  1745. package/components/Icons/Icon.d.ts.map +0 -1
  1746. package/components/Icons/Icon.js +0 -2
  1747. package/components/Icons/Icon.js.map +0 -1
  1748. package/components/Icons/IconWall.d.ts +0 -8
  1749. package/components/Icons/IconWall.d.ts.map +0 -1
  1750. package/components/Icons/IconWall.js +0 -2
  1751. package/components/Icons/IconWall.js.map +0 -1
  1752. package/components/Icons/componentdata.json +0 -1
  1753. package/components/Icons/index.d.ts.map +0 -1
  1754. package/components/Icons/index.js +0 -2
  1755. package/components/Input/componentdata.json +0 -1
  1756. package/components/Label/componentdata.json +0 -1
  1757. package/components/LinkList/componentdata.json +0 -1
  1758. package/components/List/componentdata.json +0 -1
  1759. package/components/ListHeader/ListHeaderText/componentdata.json +0 -1
  1760. package/components/ListHeader/componentdata.json +0 -1
  1761. package/components/Loader/componentdata.json +0 -1
  1762. package/components/Logo/componentdata.json +0 -1
  1763. package/components/MaxCharacters/componentdata.json +0 -1
  1764. package/components/Modal/componentdata.json +0 -1
  1765. package/components/NotificationPanel/DetailButton/componentdata.json +0 -1
  1766. package/components/NotificationPanel/componentdata.json +0 -1
  1767. package/components/Panel/componentdata.json +0 -1
  1768. package/components/PanelList/componentdata.json +0 -1
  1769. package/components/PopMenu/componentdata.json +0 -1
  1770. package/components/PopOver/componentdata.json +0 -1
  1771. package/components/RadioButton/componentdata.json +0 -1
  1772. package/components/Select/componentdata.json +0 -1
  1773. package/components/ServiceMessage/componentdata.json +0 -1
  1774. package/components/Slider/componentdata.json +0 -1
  1775. package/components/Spacer/componentdata.json +0 -1
  1776. package/components/StatusDot/componentdata.json +0 -1
  1777. package/components/Step/componentdata.json +0 -1
  1778. package/components/StepButtons/componentdata.json +0 -1
  1779. package/components/Stepper/componentdata.json +0 -1
  1780. package/components/Table/TableBody/componentdata.json +0 -1
  1781. package/components/Table/TableCell/componentdata.json +0 -1
  1782. package/components/Table/TableExpandedRow/componentdata.json +0 -1
  1783. package/components/Table/TableExpanderCell/componentdata.json +0 -1
  1784. package/components/Table/TableHead/componentdata.json +0 -1
  1785. package/components/Table/TableHeadCell/componentdata.json +0 -1
  1786. package/components/Table/TableRow/componentdata.json +0 -1
  1787. package/components/Table/componentdata.json +0 -1
  1788. package/components/Tag/componentdata.json +0 -1
  1789. package/components/TagList/componentdata.json +0 -1
  1790. package/components/Textarea/componentdata.json +0 -1
  1791. package/components/Tile/componentdata.json +0 -1
  1792. package/components/Title/componentdata.json +0 -1
  1793. package/components/Tooltip/TooltipWord/componentdata.json +0 -1
  1794. package/components/Tooltip/componentdata.json +0 -1
  1795. package/components/TooltipExample/componentdata.json +0 -1
  1796. package/components/Trigger/componentdata.json +0 -1
  1797. package/components/Validation/componentdata.json +0 -1
  1798. package/uuid.js +0 -2
  1799. package/uuid.js.map +0 -1
  1800. /package/components/{Icons → Icon}/index.d.ts +0 -0
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,u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CAClF,EACK0C,EAAgBN,EAAGC,EAAO,qBAAqB,EAAG,CACtD,CAACA,EAAO,yCAAyC,CAAC,EAAGL,EACrD,CAACK,EAAO,0CAA0C,CAAC,EAAG,CAACL,EACvD,CAACK,EAAO,6CAA+CrC,CAAI,CAAC,EAAG,CAACgC,GAAmBhC,CAAA,CACpF,EACK2C,EAAY7C,EAClB,OACGO,EAAA,cAAA,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,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AA,cAAC,MAAI,CAAA,IAAKmB,CAAe,CAAA,CAC3B,CACF,EACAnB,EAAA,cAAC,MAAA,CACC,UAAWqC,EAAG3B,EAAO,cAAkBA,EAAO,uBAAuB,EAAG,CACtE,CAACA,EAAO,qBAAqB,CAAC,EAAG,CAACU,GAAwBC,CAAA,CAC3D,CAAA,CACH,EACCS,GACE9B,EAAA,cAAA,MAAA,CAAI,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 o from"classnames";import{AnalyticsId as se,IconSize as w}from"./constants.js";import{useExpand as ie}from"./hooks/useExpand.js";import{useUuid as $}from"./hooks/useUuid.js";import{palette as z}from"./theme/palette.js";import{getAriaLabelAttributes as ce}from"./utils/accessibility.js";import{B as pe}from"./Badge.js";import{B as j}from"./Button.js";import{Icon as _}from"./components/Icons/Icon.js";import me from"./components/Icons/AlertSignFill.js";import de from"./components/Icons/ArrowRight.js";import ue from"./components/Icons/Calendar.js";import _e from"./components/Icons/ChevronDown.js";import fe from"./components/Icons/ChevronUp.js";import ye from"./components/Icons/Pencil.js";import be from"./components/Icons/Watch.js";import{T as Ee}from"./Title.js";import e from"./components/Panel/styles.module.scss";var ge=(a=>(a.normal="normal",a.new="new",a.error="error",a.draft="draft",a))(ge||{}),ve=(a=>(a.fill="fill",a.white="white",a.stroke="stroke",a.line="line",a))(ve||{}),he=(a=>(a.layout1="layout1",a.layout2="layout2",a.layout3a="layout3a",a.layout3b="layout3b",a.layout3c="layout3c",a))(he||{});const Ce=({status:a,statusMessage:r})=>{const E=()=>a==="error"?{color:z.cherry500,svgIcon:me}:{color:z.black,svgIcon:ye},s=o(e["status-message"],{[e["status-message--new"]]:a==="new"});return(a==="error"||a==="draft")&&r?t.createElement("div",{className:s,"data-testid":"display-status"},t.createElement(_,{...E(),size:w.XSmall})," ",t.createElement("span",null,r)):null},Ie=({date:a,time:r})=>a||r?t.createElement("div",{className:e["datetime-container"],"data-testid":"datetime"},a&&t.createElement("div",{className:e["datetime-container__icon"]},t.createElement(_,{svgIcon:ue,size:w.XSmall}),t.createElement("span",null,a)),r&&t.createElement("div",{className:e["datetime-container__icon"]},t.createElement(_,{svgIcon:be,size:w.XSmall}),t.createElement("span",null,r))):null,we=t.forwardRef(function(r,E){const{children:s,contentA:N,contentB:l,prioritiseMetaDataInContentB:d,className:W,testId:X,title:g,titleHtmlMarkup:F="h2",url:f,target:H="_self",icon:i,iconRight:B=!1,variant:c="fill",status:p="normal",statusMessage:v,buttonText:x="Se detaljer",buttonTextClose:U="Skjul detaljer",buttonAriaLabelledById:k,buttonAriaLabel:L,layout:n="layout2",containerAsButton:h=!1,date:A,time:M,noTopBorder:O,buttonOnClick:u,buttonHtmlMarkup:q="a",expanded:G=!1,onExpand:D,renderChildrenWhenClosed:J=!1,focusable:K=!1}=r,[m,Q]=ie(G,D),C=$(),y=$(),S=v&&p==="new",b=["layout3a".toString(),"layout3b".toString(),"layout3c".toString()].includes(n),Y=o(e["panel-wrapper"],W),Z=o(e.panel,{[e["panel--fill"]]:c==="fill",[e["panel--stroke"]]:c==="stroke",[e["panel--white"]]:c==="white",[e["panel--line"]]:c==="line",[e["panel--no-top-border"]]:c==="line"&&O,[e["panel--selected"]]:m,[e["panel--new"]]:p==="new",[e["panel--draft"]]:p==="draft",[e["panel--error"]]:p==="error",[e["panel--status"]]:p&&p!=="normal",[e["panel--with-icon"]]:i,[e["panel--button"]]:h,[e["panel--clickable"]]:s||f||D||u||h}),P=o({[e.panel__container]:n==="layout2"&&l,[e["panel__container--layout1"]]:n==="layout1"&&l,[e["panel__container--layout2"]]:n==="layout2"&&l,[e["panel__container--layout3"]]:b&&l,[e["panel__container--grow"]]:i,[e["panel__container--prioritiseMetaDataInContentB"]]:d}),V=o({[e["panel-content-a"]]:n==="layout2",[e["panel-content-a--layout3a"]]:n==="layout3a",[e["panel-content-a--layout3b"]]:n==="layout3b",[e["panel-content-a--layout3c"]]:n==="layout3c",[e["panel-content-a--non-prioritiseMetaDataInContentB"]]:!d}),ee=o({[e["panel__content-right--layout1"]]:l&&n==="layout1",[e["panel__content-right--layout2"]]:l&&n==="layout2",[e["panel__content-right--layout3"]]:l&&b,[e["panel__content-right--layout3a"]]:l&&n==="layout3a",[e["panel__content-right--layout3b"]]:l&&n==="layout3b",[e["panel__content-right--layout3c"]]:l&&n==="layout3c",[e["panel__content-right--prioritiseMetaDataInContentB"]]:d}),te=o(e["panel-content-b"],{[e["panel-content-b--layout1"]]:n==="layout1",[e["panel-content-b--layout2"]]:n==="layout2",[e["panel-content-b--layout3"]]:b,[e["panel-content-b--prioritiseMetaDataInContentB"]]:d}),ae=o(e["panel__details-btn"]),ne=o(e["panel-content-a__title"],{[e["panel-content-a__title--badge"]]:S}),le=()=>{const I=ce({label:L,id:k&&`${y} ${k}`||g&&C&&`${y} ${C}`,prefer:"label"}),R={onClick:u||(()=>Q(!m)),className:h?e.panel__expand:void 0,variant:"borderless",ellipsis:!0,...I};return s?t.createElement(j,{testId:"expand","aria-expanded":m,...R},t.createElement("span",{id:y},m?U:x),t.createElement(_,{svgIcon:m?fe:_e})):t.createElement(j,{testId:"url",htmlMarkup:q,href:f,target:H,...R},t.createElement("span",{id:y},x),t.createElement(_,{svgIcon:de}))},oe=o(e["panel__btn-container"],{[e["panel__btn-container--layout3"]]:b,[e["panel__btn-container--no-content-b"]]:!l,[e["panel__btn-container--padding-top"]]:N||l}),re=()=>{if(!s||!J&&!m)return null;const I=o(e["panel-details"],{[e["panel-details--open"]]:m,[e["panel-details--line"]]:c==="line",[e["panel-details--white"]]:c==="white",[e["panel-details--with-icon"]]:i});return t.createElement("div",{className:I,"data-testid":"panel-details"},t.createElement("div",null,s))},T=t.createElement("div",{className:ee},l&&t.createElement("div",{className:te},l),(s||f||A||M||u)&&t.createElement("div",{className:oe},t.createElement(Ie,{date:A,time:M}),(s||f||u)&&t.createElement("div",{className:ae},le())));return t.createElement("div",{tabIndex:K?-1:void 0,ref:E,"data-testid":X,className:Y,"data-analyticsid":se.Panel},t.createElement("div",{className:Z},i&&!B&&t.createElement("div",{className:e.panel__icon},i),t.createElement("div",{className:P},d&&T,t.createElement("div",{className:V},t.createElement(Ce,{status:p,statusMessage:v}),g&&t.createElement("div",{className:e["panel-content-a__title-container"]},t.createElement(Ee,{appearance:"title3",htmlMarkup:F,id:C,className:ne},g),S&&t.createElement("div",{className:e.panel__badge},t.createElement(pe,{color:"blueberry",testId:"badge-status"},v))),N),!d&&T),i&&B&&t.createElement("div",{className:e["panel__icon--right"]},i)),re())}),Oe=we;export{Oe as P,ge as a,ve as b,he 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 children?: React.ReactNode;\n /** Title of the panel */\n title?: string;\n /** Changes the underlying element of the title. Default: h2 */\n titleHtmlMarkup?: TitleTags;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Displays a status on the left side: defualt normal */\n status?: keyof typeof PanelStatus;\n /** Displayed on top of the panel with a status icon */\n statusMessage?: string;\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 /** Icon displayed in title */\n icon?: React.ReactNode;\n /** Display icon on right */\n iconRight?: boolean;\n /** Panel section A content */\n contentA?: React.ReactNode | string;\n /** Panel section B content*/\n contentB?: React.ReactNode | string;\n /** A version of panel that prioritises content-B visually and audibly */\n prioritiseMetaDataInContentB?: boolean;\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 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 /** Show close button in bottom of Panel Expand */\n /** @deprecated Has no effect anymore due to accessbility reasons. No close button is shown in expanded content. Will be removed in 2.0.0 */\n showCloseButtonInExpand?: boolean;\n /** Layout (see description) */\n layout?: keyof typeof PanelLayout;\n /** Clicking anywhere on the container will trigger a click on the panel's button */\n containerAsButton?: boolean;\n /** Displays time with icon */\n time?: string;\n /** Displays date with icon */\n date?: string;\n /** Removes top border when variant is \"line\" */\n noTopBorder?: boolean;\n /** Opens or closes the panel */\n expanded?: boolean;\n /** Called when panel is open/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 /** Whether panel is focusable or not */\n focusable?: boolean;\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 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 Panel = React.forwardRef(function PanelForwardedRef(props: PanelProps, ref: React.ForwardedRef<HTMLHeadingElement>) {\n const {\n children,\n contentA,\n contentB,\n prioritiseMetaDataInContentB,\n className,\n testId,\n title,\n titleHtmlMarkup = 'h2',\n url,\n target = '_self',\n icon,\n iconRight = false,\n variant = PanelVariant.fill,\n status = PanelStatus.normal,\n statusMessage,\n buttonText = 'Se detaljer',\n buttonTextClose = 'Skjul detaljer',\n buttonAriaLabelledById,\n buttonAriaLabel,\n layout = PanelLayout.layout2,\n containerAsButton = false,\n date,\n time,\n noTopBorder,\n buttonOnClick,\n buttonHtmlMarkup = 'a',\n expanded = false,\n onExpand,\n renderChildrenWhenClosed = false,\n focusable = false,\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 layout3 = [PanelLayout.layout3a.toString(), PanelLayout.layout3b.toString(), PanelLayout.layout3c.toString()].includes(layout);\n\n const panelWrapperClass = 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 panelContainer = classNames({\n [panelStyles['panel__container']]: layout === PanelLayout.layout2 && contentB,\n [panelStyles['panel__container--layout1']]: layout === PanelLayout.layout1 && contentB,\n [panelStyles['panel__container--layout2']]: layout === PanelLayout.layout2 && contentB,\n [panelStyles['panel__container--layout3']]: layout3 && contentB,\n [panelStyles['panel__container--grow']]: icon,\n [panelStyles['panel__container--prioritiseMetaDataInContentB']]: prioritiseMetaDataInContentB,\n });\n\n const panelContentLeftClass = classNames({\n [panelStyles['panel-content-a']]: layout === PanelLayout.layout2,\n [panelStyles['panel-content-a--layout3a']]: layout === PanelLayout.layout3a,\n [panelStyles['panel-content-a--layout3b']]: layout === PanelLayout.layout3b,\n [panelStyles['panel-content-a--layout3c']]: layout === PanelLayout.layout3c,\n [panelStyles['panel-content-a--non-prioritiseMetaDataInContentB']]: !prioritiseMetaDataInContentB,\n });\n\n const panelContentRightClass = classNames({\n [panelStyles['panel__content-right--layout1']]: contentB && layout === PanelLayout.layout1,\n [panelStyles['panel__content-right--layout2']]: contentB && layout === PanelLayout.layout2,\n [panelStyles['panel__content-right--layout3']]: contentB && layout3,\n [panelStyles['panel__content-right--layout3a']]: contentB && layout === PanelLayout.layout3a,\n [panelStyles['panel__content-right--layout3b']]: contentB && layout === PanelLayout.layout3b,\n [panelStyles['panel__content-right--layout3c']]: contentB && layout === PanelLayout.layout3c,\n [panelStyles['panel__content-right--prioritiseMetaDataInContentB']]: prioritiseMetaDataInContentB,\n });\n\n const panelContentBClass = classNames(panelStyles['panel-content-b'], {\n [panelStyles['panel-content-b--layout1']]: layout === PanelLayout.layout1,\n [panelStyles['panel-content-b--layout2']]: layout === PanelLayout.layout2,\n [panelStyles['panel-content-b--layout3']]: layout3,\n [panelStyles['panel-content-b--prioritiseMetaDataInContentB']]: prioritiseMetaDataInContentB,\n });\n\n const panelActionBtnClass = classNames(panelStyles['panel__details-btn']);\n const titleClasses = classNames(panelStyles['panel-content-a__title'], { [panelStyles['panel-content-a__title--badge']]: hasBadge });\n\n const renderDetailsButton = (): JSX.Element => {\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 btnContainerClass = classNames(panelStyles['panel__btn-container'], {\n [panelStyles['panel__btn-container--layout3']]: layout3,\n [panelStyles['panel__btn-container--no-content-b']]: !contentB,\n [panelStyles['panel__btn-container--padding-top']]: contentA || contentB,\n });\n\n const renderContent = (): JSX.Element | null => {\n if (!children) {\n return null;\n }\n if (!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 contentBElement = (\n <div className={panelContentRightClass}>\n {contentB && <div className={panelContentBClass}>{contentB}</div>}\n {(children || url || date || time || buttonOnClick) && (\n <div className={btnContainerClass}>\n {<DateTime date={date} time={time} />}\n {(children || url || buttonOnClick) && <div className={panelActionBtnClass}>{renderDetailsButton()}</div>}\n </div>\n )}\n </div>\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={panelWrapperClass}\n data-analyticsid={AnalyticsId.Panel}\n >\n <div className={panelClasses}>\n {icon && !iconRight && <div className={panelStyles.panel__icon}>{icon}</div>}\n <div className={panelContainer}>\n {prioritiseMetaDataInContentB && contentBElement}\n <div className={panelContentLeftClass}>\n <StatusText status={status} statusMessage={statusMessage} />\n {title && (\n <div className={panelStyles['panel-content-a__title-container']}>\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 {contentA}\n </div>\n {!prioritiseMetaDataInContentB && contentBElement}\n </div>\n {icon && iconRight && <div className={panelStyles['panel__icon--right']}>{icon}</div>}\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","DateTime","date","time","Calendar","Watch","Panel","props","ref","children","contentA","contentB","prioritiseMetaDataInContentB","className","testId","title","titleHtmlMarkup","url","target","icon","iconRight","variant","buttonText","buttonTextClose","buttonAriaLabelledById","buttonAriaLabel","layout","containerAsButton","noTopBorder","buttonOnClick","buttonHtmlMarkup","expanded","onExpand","renderChildrenWhenClosed","focusable","isExpanded","setIsExpanded","useExpand","titleId","useUuid","buttonTextId","hasBadge","layout3","panelWrapperClass","panelClasses","panelContainer","panelContentLeftClass","panelContentRightClass","panelContentBClass","panelActionBtnClass","titleClasses","renderDetailsButton","ariaLabelAttributes","getAriaLabelAttributes","commonProps","Button","ChevronUp","ChevronDown","ArrowRight","btnContainerClass","renderContent","panelDetailsClasses","contentBElement","AnalyticsId","Title","Badge","Panel$1"],"mappings":"g1BAuBY,IAAAA,IAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,IAAM,MACNA,EAAA,MAAQ,QACRA,EAAA,MAAQ,QAJEA,IAAAA,IAAA,CAAA,CAAA,EAOAC,IAAAA,IACVA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,KAAO,OAJGA,IAAAA,IAAA,CAAA,CAAA,EAOAC,IAAAA,IACVA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,SAAW,WACXA,EAAA,SAAW,WALDA,IAAAA,IAAA,CAAA,CAAA,EAyEZ,MAAMC,GAAsF,CAAC,CAAE,OAAAC,EAAQ,cAAAC,KAAoB,CACzH,MAAMC,EAAa,IACbF,IAAW,QACN,CAAE,MAAOG,EAAQ,UAAW,QAASC,EAAc,EAGrD,CAAE,MAAOD,EAAQ,MAAO,QAASE,EAAO,EAG3CC,EAAqBC,EAAWC,EAAY,gBAAgB,EAAG,CACnE,CAACA,EAAY,qBAAqB,CAAC,EAAGR,IAAW,KAAA,CAClD,EAED,OAAKA,IAAW,SAAqBA,IAAW,UAAsBC,kBAEjE,MAAI,CAAA,UAAWK,EAAoB,cAAY,gBAAA,kBAC5CG,EAAM,CAAA,GAAGP,IAAc,KAAMQ,EAAS,MAAQ,CAAA,EAAG,IAAEC,EAAA,cAAA,OAAA,KAAMV,CAAc,CAC3E,EAIG,IACT,EAEMW,GAAuD,CAAC,CAAE,KAAAC,EAAM,KAAAC,KAChED,GAAQC,EAERH,EAAA,cAAC,OAAI,UAAWH,EAAY,oBAAoB,EAAG,cAAY,YAC5DK,GACCF,EAAA,cAAC,OAAI,UAA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A,OAAAnD,EAAA,cAAC,MAAA,CAEC,SAAUkC,EAAY,GAAK,OAC3B,IAAA1B,EACA,cAAaM,EACb,UAAW6B,EACX,mBAAkBoB,GAAY,KAAA,kBAE7B,MAAI,CAAA,UAAWnB,CACb,EAAAzB,GAAQ,CAACC,GAAapB,EAAA,cAAC,MAAI,CAAA,UAAWH,EAAY,WAAc,EAAAsB,CAAK,EACtEnB,EAAA,cAAC,OAAI,UAAW6C,CAAA,EACbjC,GAAgCkD,kBAChC,MAAI,CAAA,UAAWhB,GACd9C,EAAA,cAACZ,IAAW,OAAAC,EAAgB,cAAAC,EAA8B,EACzDyB,mBACE,MAAI,CAAA,UAAWlB,EAAY,kCAAkC,mBAC3DmE,GAAM,CAAA,WAAW,SAAS,WAAYhD,EAAiB,GAAIsB,EAAS,UAAWY,EAAA,EAC7EnC,CACH,EACC0B,GACEzC,EAAA,cAAA,MAAA,CAAI,UAAWH,EAAY,YAAA,kBACzBoE,GAAM,CAAA,MAAM,YAAY,OAAO,gBAC7B3E,CACH,CACF,CAEJ,EAEDoB,CACH,EACC,CAACE,GAAgCkD,CACpC,EACC3C,GAAQC,mBAAc,MAAI,CAAA,UAAWvB,EAAY,oBAAoB,GAAIsB,CAAK,CACjF,EACCyC,GAAc,CAAA,CAGrB,CAAC,EAEDM,GAAe5D"}
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,SA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QH,CAAS,EAC9B,CAAC3C,EAAgB+C,CAAiB,EAAIC,EAAkB,EACxDC,EAAsBC,EAAad,EAAe,CAAC,EAEnDe,EAAuB,IAAY,OACrBJ,GAAAK,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"],"mappings":"4YAqCO,MAAMA,GAAuB,CAACC,EAAiBC,EAAgBC,EAAkBC,IAAgD,CACtI,MAAMC,EAAWH,IAAS,YACpBI,EAAUL,IAAYG,EAE5B,OAAOG,EAAW,CAChB,CAACC,EAAkB,sCAAsC,CAAC,EAAGL,GAAWD,IAAS,UAAY,CAACI,EAC9F,CAACE,EAAkB,2CAA2C,CAAC,EAAGN,IAAS,eAAiB,CAACI,GAAWH,EACxG,CAACK,EAAkB,uCAAuC,CAAC,EAAGL,GAAWG,GAAW,CAACD,EACrF,CAACG,EAAkB,+CAA+C,CAAC,EAAGL,GAAWG,GAAWD,CAAA,CAC7F,CACH,EAEaI,EAAcC,EAAM,WAAW,CAACC,EAAyBC,IAAqC,CACnG,KAAA,CACJ,UAAAC,EACA,eAAAC,EAAiB,GACjB,SAAAC,EACA,SAAAC,EACA,MAAAC,EACA,QAAAC,EAAUC,EAAK,EACf,KAAAjB,EAAOkB,EAAS,QAChB,KAAAC,EAAOH,EACP,QAAAI,EACA,UAAAC,EACA,MAAAC,EAAQ,CAAC,CAACD,EACV,MAAAE,EAAQC,EAAaT,CAAK,EAC1B,OAAAU,EACA,SAAAC,EACA,gBAAAC,EACA,GAAGC,CACD,EAAAnB,EACEoB,EAAUP,GAAStB,IAASkB,EAAS,UACrCY,EAAS9B,IAASkB,EAAS,OAC3Ba,EAAc/B,IAASkB,EAAS,YAChCf,EAAWH,IAASkB,EAAS,UAC7BjB,EAAUmB,IAAYY,EAAY,QAClC,CAAC5B,EAAS6B,CAAa,EAAIC,EAAkBtB,CAAc,EAC3D,CAAE,UAAAuB,EAAW,UAAAC,CAAU,EAAIC,EAAmCC,EAAmB5B,CAAG,EAAIA,EAAM,IAAI,EAClG6B,EAAaC,EAAU,CAAC9B,EAAKyB,CAAS,CAAC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AAG,EACA,UAAWwB,EACX,KAAK,QACL,SAAA7B,EACA,MAAAS,EACA,IAAKgB,EACL,eAAA3B,EACA,mBAAkBH,EAAM,kBAAkB,GAAK,OAC/C,SAAAiB,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
package/Spacer.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Spacer.js","sources":["../src/components/Spacer/Spacer.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { SpacerSizes } from './../../theme/spacers';\nimport { AnalyticsId } from '../../constants';\n\nimport spacerStyles from './styles.module.scss';\n\ninterface SpacerProps {\n /** Sets the size of the spacer. */\n size?: SpacerSizes;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Spacer = React.forwardRef(function SpacerForwardedRef(props: SpacerProps, ref: React.ForwardedRef<HTMLElement>) {\n const { size = 's', className, testId } = props;\n const spacerClasses = classNames(\n spacerStyles.spacer,\n {\n [spacerStyles['spacer--4xs']]: size === '4xs',\n [spacerStyles['spacer--3xs']]: size === '3xs',\n [spacerStyles['spacer--2xs']]: size === '2xs',\n [spacerStyles['spacer--xs']]: size === 'xs',\n [spacerStyles['spacer--s']]: size === 's',\n [spacerStyles['spacer--m']]: size === 'm',\n [spacerStyles['spacer--l']]: size === 'l',\n [spacerStyles['spacer--xl']]: size === 'xl',\n [spacerStyles['spacer--2xl']]: size === '2xl',\n [spacerStyles['spacer--3xl']]: size === '3xl',\n [spacerStyles['spacer--4xl']]: size === '4xl',\n [spacerStyles['spacer--5xl']]: size === '5xl',\n [spacerStyles['spacer--6xl']]: size === '6xl',\n },\n className\n );\n\n return <span className={spacerClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Spacer}></span>;\n});\n\nexport default Spacer;\n"],"names":["Spacer","React","props","ref","size","className","testId","spacerClasses","classNames","spacerStyles","AnalyticsId","Spacer$1"],"mappings":"kJAkBA,MAAMA,EAASC,EAAM,WAAW,SAA4BC,EAAoBC,EAAsC,CACpH,KAAM,CAAE,KAAAC,EAAO,IAAK,UAAAC,EAAW,OAAAC,GAAWJ,EACpCK,EAAgBC,EACpBC,EAAa,OACb,CACE,CAACA,EAAa,aAAa,CAAC,EAAGL,IAAS,MACxC,CAACK,EAAa,aAAa,CAAC,EAAGL,IAAS,MACxC,CAACK,EAAa,aAAa,CAAC,EAAGL,IAAS,MACxC,CAACK,EAAa,YAAY,CAAC,EAAGL,IAAS,KACvC,CAACK,EAAa,WAAW,CAAC,EAAGL,IAAS,IACtC,CAACK,EAAa,WAAW,CAAC,EAAGL,IAAS,IACtC,CAACK,EAAa,WAAW,CAAC,EAAGL,IAAS,IACtC,CAACK,EAAa,YAAY,CAAC,EAAGL,IAAS,KACvC,CAACK,EAAa,aAAa,CAAC,EAAGL,IAAS,MACxC,CAACK,EAAa,aAAa,CAAC,EAAGL,IAAS,MACxC,CAACK,EAAa,aAAa,CAAC,EAAGL,IAAS,MACxC,CAACK,EAAa,aAAa,CAAC,EAAGL,IAAS,MACxC,CAACK,EAAa,aAAa,CAAC,EAAGL,IAAS,KAC1C,EACAC,CAAA,EAGK,OAAAJ,EAAA,cAAC,QAAK,UAAWM,EAAe,IAAAJ,EAAU,cAAaG,EAAQ,mBAAkBI,EAAY,MAAQ,CAAA,CAC9G,CAAC,EAEDC,EAAeX"}
package/StatusDot.js DELETED
@@ -1,2 +0,0 @@
1
- import s from"react";import n from"classnames";import"./theme/grid.js";import"./hooks/useBreakpoint.js";import{AnalyticsId as h,IconSize as r}from"./constants.js";import{getColor as I}from"./theme/currys/color.js";import E from"./components/Icons/Attachment.js";import X from"./components/Icons/Group.js";import{Icon as c}from"./components/Icons/Icon.js";import v from"./components/Icons/NoAccess.js";import N from"./components/Icons/Undo.js";import t from"./components/StatusDot/styles.module.scss";var b=(e=>(e.onwhite="onwhite",e.ondark="ondark",e))(b||{}),w=(e=>(e.info="info",e.warning="warning",e.alert="alert",e.cancelled="cancelled",e.active="active",e.transparent="transparent",e.recurring="recurring",e.group="group",e.noaccess="noaccess",e.attachment="attachment",e))(w||{});const z=({variant:e})=>e==="recurring"?s.createElement(c,{size:r.XXSmall,svgIcon:N}):e==="group"?s.createElement(c,{size:r.XXSmall,svgIcon:X}):e==="noaccess"?s.createElement(c,{size:r.XXSmall,svgIcon:v,color:I("cherry",600)}):e==="attachment"?s.createElement(c,{size:r.XXSmall,svgIcon:E}):null,C=e=>{const{id:l,mode:m="onwhite",variant:o="info",text:i,className:d,testId:p}=e,a=o==="recurring"||o==="group"||o==="noaccess"||o==="attachment",u=o==="cancelled",f=n(t.statusdot,u&&t["statusdot--cancelled"],d),g=n(t.statusdot__dot,a?t["statusdot__dot--icon"]:t[`statusdot__dot--${o}`]),_=n(t.statusdot__label,a&&t["statusdot__label--icon"],m==="ondark"&&t["statusdot__label--on-dark"]);return s.createElement("span",{id:l,className:f,"data-testid":p,"data-analyticsid":h.StatusDot},s.createElement("span",{className:g},s.createElement(z,{variant:o})),s.createElement("span",{className:_},i))},H=C;export{H as S,b as a,w as b};
2
- //# sourceMappingURL=StatusDot.js.map
package/StepButtons.js DELETED
@@ -1,2 +0,0 @@
1
- import s from"react";import e from"classnames";import{AnalyticsId as m}from"./constants.js";import t from"./components/StepButtons/styles.module.scss";const p=r=>{const{backButton:n,forwardButton:a,additionalButtons:o,cancelButton:l,sticky:i=!1,testId:u}=r,c=e(t.stepbuttons,i&&t["stepbuttons--has-sticky-buttons"]);return n||a||o||l?s.createElement("div",{className:c,"data-testid":u,"data-analyticsid":m.StepButtons},(n||a)&&s.createElement("div",{className:e(t.stepbuttons__buttons,t["stepbuttons__buttons--navigation"])},n&&s.cloneElement(n,{variant:"outline",wrapperClassName:e(t["stepbuttons__button--back"])}),a&&s.cloneElement(a,{variant:"fill",wrapperClassName:e(t["stepbuttons__button--forward"])})),o&&s.createElement("div",{className:e(t.stepbuttons__buttons,t["stepbuttons__buttons--additional"])},o),l&&s.createElement("div",{className:t.stepbuttons__buttons},s.cloneElement(l,{variant:"borderless"}))):null},v=p;export{v as S,p as a};
2
- //# sourceMappingURL=StepButtons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StepButtons.js","sources":["../src/components/StepButtons/StepButtons.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { ButtonProps } from '../Button';\n\nimport styles from './styles.module.scss';\n\ninterface StepButtonsProps {\n /** Knapp for å gå tilbake. Vises med \"outline\" variant. */\n backButton?: React.ReactElement<ButtonProps>;\n /** Knapp for å gå videre. Vises med \"fill\" variant. */\n forwardButton?: React.ReactElement<ButtonProps>;\n /** Ekstra knapper. Valgfritt utseende. */\n additionalButtons?: React.ReactElement<ButtonProps>[];\n /** Knapp for å avbryte eller fortsette senere. Vises med \"borderless\" variant. */\n cancelButton?: React.ReactElement<ButtonProps>;\n /** Knappene vil vises sticky nederst på skjermen. Default: false */\n sticky?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const StepButtons: React.FC<StepButtonsProps> = props => {\n const { backButton, forwardButton, additionalButtons, cancelButton, sticky = false, testId } = props;\n\n const navigationClasses = classNames(styles.stepbuttons, sticky && styles['stepbuttons--has-sticky-buttons']);\n\n if (backButton || forwardButton || additionalButtons || cancelButton) {\n return (\n <div className={navigationClasses} data-testid={testId} data-analyticsid={AnalyticsId.StepButtons}>\n {(backButton || forwardButton) && (\n <div className={classNames(styles.stepbuttons__buttons, styles['stepbuttons__buttons--navigation'])}>\n {backButton &&\n React.cloneElement(backButton, {\n variant: 'outline',\n wrapperClassName: classNames(styles['stepbuttons__button--back']),\n })}\n {forwardButton &&\n React.cloneElement(forwardButton, {\n variant: 'fill',\n wrapperClassName: classNames(styles['stepbuttons__button--forward']),\n })}\n </div>\n )}\n {additionalButtons && (\n <div className={classNames(styles.stepbuttons__buttons, styles['stepbuttons__buttons--additional'])}>{additionalButtons}</div>\n )}\n {cancelButton && (\n <div className={styles.stepbuttons__buttons}>\n {React.cloneElement(cancelButton, {\n variant: 'borderless',\n })}\n </div>\n )}\n </div>\n );\n }\n return null;\n};\n\nexport default StepButtons;\n"],"names":["StepButtons","props","backButton","forwardButton","additionalButtons","cancelButton","sticky","testId","navigationClasses","classNames","styles","React","AnalyticsId","StepButtons$1"],"mappings":"uJAwBO,MAAMA,EAAmDC,GAAA,CACxD,KAAA,CAAE,WAAAC,EAAY,cAAAC,EAAe,kBAAAC,EAAmB,aAAAC,EAAc,OAAAC,EAAS,GAAO,OAAAC,CAAW,EAAAN,EAEzFO,EAAoBC,EAAWC,EAAO,YAAaJ,GAAUI,EAAO,iCAAiC,CAAC,EAExG,OAAAR,GAAcC,GAAiBC,GAAqBC,EAEpDM,EAAA,cAAC,MAAI,CAAA,UAAWH,EAAmB,cAAaD,EAAQ,mBAAkBK,EAAY,WAClF,GAAAV,GAAcC,IACdQ,EAAA,cAAC,OAAI,UAAWF,EAAWC,EAAO,qBAAsBA,EAAO,kCAAkC,CAAC,CAC/F,EAAAR,GACCS,EAAM,aAAaT,EAAY,CAC7B,QAAS,UACT,iBAAkBO,EAAWC,EAAO,2BAA2B,CAAC,CACjE,CAAA,EACFP,GACCQ,EAAM,aAAaR,EAAe,CAChC,QAAS,OACT,iBAAkBM,EAAWC,EAAO,8BAA8B,CAAC,CACpE,CAAA,CACL,EAEDN,GACCO,EAAA,cAAC,OAAI,UAAWF,EAAWC,EAAO,qBAAsBA,EAAO,kCAAkC,CAAC,GAAIN,CAAkB,EAEzHC,GACEM,EAAA,cAAA,MAAA,CAAI,UAAWD,EAAO,oBAAA,EACpBC,EAAM,aAAaN,EAAc,CAChC,QAAS,YACV,CAAA,CACH,CAEJ,EAGG,IACT,EAEAQ,EAAeb"}
package/Table.js DELETED
@@ -1,2 +0,0 @@
1
- import s,{useState as d,useRef as x,useEffect as u}from"react";import H from"classnames";import{AnalyticsId as R}from"./constants.js";import{Breakpoint as v,useBreakpoint as A}from"./hooks/useBreakpoint.js";import{useLayoutEvent as D}from"./hooks/useLayoutEvent.js";import{H as I}from"./HorizontalScroll.js";import C from"./components/Table/styles.module.scss";import{isTouchDevice as N}from"./utils/device.js";const O=t=>t.variant===a.centeredoverflow||t.variant===a.block,_=t=>C[`table--${t.variant}-${t.breakpoint}`],$=(t,o)=>v[t.breakpoint]-v[o.breakpoint],z=(t,o)=>v[t.breakpoint]>=o,F=(t,o)=>{if(Array.isArray(t))return t.sort($),t.find(n=>z(n,o));if(t&&z(t,o))return t},L=(t,o,n,f)=>{const r=F(t,o),l=N(),e=n<=f;if(r)return r.variant===a.centeredoverflow&&!e&&r.fallbackVariant===a.horizontalscroll?{variant:l?a.horizontalscroll:a.none,breakpoint:r.breakpoint}:r.variant===a.centeredoverflow&&!e&&r.fallbackVariant!==a.centeredoverflow?{variant:r.fallbackVariant??a.none,breakpoint:r.breakpoint}:r.variant===a.horizontalscroll&&!l&&r.fallbackVariant===a.centeredoverflow?{variant:e?a.centeredoverflow:a.none,breakpoint:r.breakpoint}:r.variant===a.horizontalscroll&&!l&&r.fallbackVariant!==a.horizontalscroll?{variant:r.fallbackVariant??a.none,breakpoint:r.breakpoint}:r},P=t=>t&&O(t)?_(t):void 0,G=(t,o)=>{if(t===o)return;const n=8;return{left:`${(t-o)/2-n}px`}};var a=(t=>(t.none="none",t.centeredoverflow="centeredoverflow",t.horizontalscroll="horizontalscroll",t.block="block",t))(a||{}),M=(t=>(t.compact="compact",t.normal="normal",t))(M||{});const X=[{breakpoint:"xl",variant:"centeredoverflow",fallbackVariant:"horizontalscroll"}],tt=[{breakpoint:"xl",variant:"centeredoverflow",fallbackVariant:"horizontalscroll"},{breakpoint:"sm",variant:"centeredoverflow",fallbackVariant:"block"}],et=({id:t,testId:o,className:n,children:f,breakpointConfig:r=X,mode:l="normal"})=>{const[e,y]=d(),[c,B]=d(0),[W,E]=d(0),[k,V]=d(window.innerWidth),b=x(null),p=A();u(()=>{y(L(r,p,c,k))},[r,p,c,k]),u(()=>{var i,w,h;((e==null?void 0:e.variant)==="centeredoverflow"||(e==null?void 0:e.variant)==="horizontalscroll")&&B(((i=b.current)==null?void 0:i.getBoundingClientRect().width)??0),(e==null?void 0:e.variant)==="centeredoverflow"&&E(((h=(w=b.current)==null?void 0:w.parentElement)==null?void 0:h.getBoundingClientRect().width)??0)},[e]),D(()=>V(window.innerWidth),["resize"],100);const S=(e==null?void 0:e.variant)==="centeredoverflow"?G(W,c):void 0,T=P(e),U=H(C.table,T,n),m=s.createElement("table",{className:U,id:t,"data-testid":o,"data-analyticsid":R.Table,ref:b,style:S},s.Children.map(f,i=>s.isValidElement(i)&&s.cloneElement(i,{mode:l})));return(e==null?void 0:e.variant)==="horizontalscroll"?s.createElement(I,{childWidth:c,testId:"horizontal-scroll"},m):m};export{M,a as R,et as T,X as d,tt as s};
2
- //# sourceMappingURL=Table.js.map
package/Table.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.js","sources":["../src/components/Table/utils.ts","../src/components/Table/Table.tsx"],"sourcesContent":["import React from 'react';\n\nimport { BreakpointConfig, ResponsiveTableVariant } from './Table';\nimport { Breakpoint } from '../../hooks/useBreakpoint';\nimport { isTouchDevice } from '../../utils/device';\n\nimport styles from './styles.module.scss';\n\n/**\n * Sjekk om det skal brukes CSS for å bestemme responsivt utseende på dette breakpoint\n * @param config Konfigurasjon for responsiv oppførsel\n * @returns true om breakpoint bruker CSS\n */\nconst configUsesCss = (config: BreakpointConfig): boolean =>\n config.variant === ResponsiveTableVariant.centeredoverflow || config.variant === ResponsiveTableVariant.block;\n\n/**\n * Lag klassenavn for CSS-config\n * @param config Konfigurasjon for responsiv oppførsel\n * @returns CSS-klassenavn\n */\nconst mapConfigToClass = (config: BreakpointConfig): string => styles[`table--${config.variant}-${config.breakpoint}`];\n\n/**\n * Sorter konfigurasjon etter breakpoints, fra største til minste\n * @param a Konfigurasjon for responsiv oppførsel\n * @param b Konfigurasjon for responsiv oppførsel\n * @returns Sortert liste\n */\nconst sortByBreakpointsDescending = (a: BreakpointConfig, b: BreakpointConfig): number =>\n Breakpoint[a.breakpoint] - Breakpoint[b.breakpoint];\n\n/**\n * Sjekk om en konfigurasjon skal brukes for nåværende breakpoint\n * @param a Konfigurasjon for responsiv oppførsel\n * @param breakpoint Nåværende breakpoint\n * @returns true dersom config skal brukes for breakpointet\n */\nconst isValidForCurrentBreakpoint = (config: BreakpointConfig, breakpoint: Breakpoint): boolean =>\n Breakpoint[config.breakpoint] >= breakpoint;\n\n/**\n * Finn konfigurasjon for nåværende breakpoint\n * @param config Konfigurasjon for responsiv oppførsel\n * @param breakpoint Nåværende breakpoint\n * @returns Konfigurasjon for responsiv oppførsel\n */\nconst getConfigForBreakpoint = (config: BreakpointConfig | BreakpointConfig[], breakpoint: Breakpoint): BreakpointConfig | undefined => {\n if (Array.isArray(config)) {\n config.sort(sortByBreakpointsDescending);\n\n return config.find(x => isValidForCurrentBreakpoint(x, breakpoint));\n } else if (config && isValidForCurrentBreakpoint(config, breakpoint)) {\n return config;\n }\n};\n\n/**\n * Finn konfigurasjon for nåværende breakpoint og tabellbredde\n * @param config Konfigurasjon for responsiv oppførsel\n * @param breakpoint Nåværende breakpoint\n * @param tableWidth Bredde på tabell i px\n * @returns Konfigurasjon for responsiv oppførsel uten fallbackVariant\n */\nexport const getCurrentConfig = (\n config: BreakpointConfig | BreakpointConfig[],\n breakpoint: Breakpoint,\n tableWidth: number,\n windowWidth: number\n): Omit<BreakpointConfig, 'fallbackVariant'> | undefined => {\n const breakpointConfig = getConfigForBreakpoint(config, breakpoint);\n const canUseHorizontalScroll = isTouchDevice();\n const canUseCenteredOverflow = tableWidth <= windowWidth;\n\n if (!breakpointConfig) {\n return;\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.centeredoverflow &&\n !canUseCenteredOverflow &&\n breakpointConfig.fallbackVariant === ResponsiveTableVariant.horizontalscroll\n ) {\n return {\n variant: canUseHorizontalScroll ? ResponsiveTableVariant.horizontalscroll : ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.centeredoverflow &&\n !canUseCenteredOverflow &&\n breakpointConfig.fallbackVariant !== ResponsiveTableVariant.centeredoverflow\n ) {\n return {\n variant: breakpointConfig.fallbackVariant ?? ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.horizontalscroll &&\n !canUseHorizontalScroll &&\n breakpointConfig.fallbackVariant === ResponsiveTableVariant.centeredoverflow\n ) {\n return {\n variant: canUseCenteredOverflow ? ResponsiveTableVariant.centeredoverflow : ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.horizontalscroll &&\n !canUseHorizontalScroll &&\n breakpointConfig.fallbackVariant !== ResponsiveTableVariant.horizontalscroll\n ) {\n return {\n variant: breakpointConfig.fallbackVariant ?? ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n return breakpointConfig;\n};\n\n/**\n * Finn klassenavn for responsiv oppførsel\n * @param config Konfigurasjon for responsiv oppførsel\n * @returns Klassenavn\n */\nexport const getBreakpointClass = (config?: BreakpointConfig): string | undefined =>\n config && configUsesCss(config) ? mapConfigToClass(config) : undefined;\n\n/**\n * Finn riktig posisjon for horisontal sentrering av tabell som skal vises \"centeredoverflow\"\n * @param parentWidth Bredde på element som tabellen ligger i\n * @param tableWidth Bredde på tabellen\n * @returns Styling som posisjonerer tabellen riktig\n */\nexport const getCenteredOverflowTableStyle = (parentWidth: number, tableWidth: number): React.CSSProperties | undefined => {\n if (parentWidth === tableWidth) {\n return;\n }\n\n const COLUMN_GUTTER_WIDTH_PX = 8;\n\n return { left: `${(parentWidth - tableWidth) / 2 - COLUMN_GUTTER_WIDTH_PX}px` };\n};\n","import React, { useEffect, useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { getCurrentConfig, getBreakpointClass, getCenteredOverflowTableStyle } from './utils';\nimport { AnalyticsId } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useLayoutEvent } from '../../hooks/useLayoutEvent';\nimport HorizontalScroll from '../HorizontalScroll';\n\nimport styles from './styles.module.scss';\n\nexport enum ResponsiveTableVariant {\n /** No handling responsive behaviour. Default. */\n none = 'none',\n /** Overflow parent container to the left and right while remaining centered horizontally. */\n centeredoverflow = 'centeredoverflow',\n /** Show horizontal scrollbar when table is too big for the screen. */\n horizontalscroll = 'horizontalscroll',\n /** Collapse to two columns. */\n block = 'block',\n}\nexport enum ModeType {\n compact = 'compact',\n normal = 'normal',\n}\nexport interface BreakpointConfig {\n /** Breakpoint at which responsive behaviour will be applied. The table component uses a \"desktop first\" approach. */\n breakpoint: keyof typeof Breakpoint;\n /** Desired behaviour on this breakpoint and all smaller screens. */\n variant: keyof typeof ResponsiveTableVariant;\n /** If variant is horizontallscroll, use a fallback instead of device is not a touch device. */\n fallbackVariant?: keyof typeof ResponsiveTableVariant;\n}\n\nexport interface Props {\n /** Unique ID */\n id?: string;\n /** Id used for testing */\n testId?: string;\n /** Customize how the table behaves on various screen widths */\n breakpointConfig?: BreakpointConfig | BreakpointConfig[];\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the content of the table. Use TableHead and TableBody */\n children: React.ReactNode;\n /** For display with less space. Discouraged to use together with interactive elements. */\n mode?: ModeType;\n}\n\nexport const defaultConfig: BreakpointConfig[] = [\n {\n breakpoint: 'xl',\n variant: ResponsiveTableVariant.centeredoverflow,\n fallbackVariant: ResponsiveTableVariant.horizontalscroll,\n },\n];\n\nexport const simpleConfig: BreakpointConfig[] = [\n {\n breakpoint: 'xl',\n variant: ResponsiveTableVariant.centeredoverflow,\n fallbackVariant: ResponsiveTableVariant.horizontalscroll,\n },\n {\n breakpoint: 'sm',\n variant: ResponsiveTableVariant.centeredoverflow,\n fallbackVariant: ResponsiveTableVariant.block,\n },\n];\n\nexport const Table: React.FC<Props> = ({ id, testId, className, children, breakpointConfig = defaultConfig, mode = ModeType.normal }) => {\n const [currentConfig, setCurrentConfig] = useState<BreakpointConfig>();\n const [tableWidth, setTableWidth] = useState<number>(0);\n const [parentWidth, setParentWidth] = useState<number>(0);\n const [windowWidth, setWindowWidth] = useState(window.innerWidth);\n const tableRef = useRef<HTMLTableElement>(null);\n const breakpoint = useBreakpoint();\n\n useEffect(() => {\n setCurrentConfig(getCurrentConfig(breakpointConfig, breakpoint, tableWidth, windowWidth));\n }, [breakpointConfig, breakpoint, tableWidth, windowWidth]);\n\n useEffect(() => {\n if (\n currentConfig?.variant === ResponsiveTableVariant.centeredoverflow ||\n currentConfig?.variant === ResponsiveTableVariant.horizontalscroll\n ) {\n setTableWidth(tableRef.current?.getBoundingClientRect().width ?? 0);\n }\n if (currentConfig?.variant === ResponsiveTableVariant.centeredoverflow) {\n setParentWidth(tableRef.current?.parentElement?.getBoundingClientRect().width ?? 0);\n }\n }, [currentConfig]);\n\n useLayoutEvent(() => setWindowWidth(window.innerWidth), ['resize'], 100);\n\n const tableStyle =\n currentConfig?.variant === ResponsiveTableVariant.centeredoverflow ? getCenteredOverflowTableStyle(parentWidth, tableWidth) : undefined;\n\n const breakpointClass = getBreakpointClass(currentConfig);\n const tableClass = classNames(styles.table, breakpointClass, className);\n\n const table = (\n <table className={tableClass} id={id} data-testid={testId} data-analyticsid={AnalyticsId.Table} ref={tableRef} style={tableStyle}>\n {React.Children.map(children, child => React.isValidElement<{ mode?: ModeType }>(child) && React.cloneElement(child, { mode }))}\n </table>\n );\n\n if (currentConfig?.variant === ResponsiveTableVariant.horizontalscroll) {\n return (\n <HorizontalScroll childWidth={tableWidth} testId=\"horizontal-scroll\">\n {table}\n </HorizontalScroll>\n );\n }\n\n return table;\n};\n\nexport default Table;\n"],"names":["configUsesCss","config","ResponsiveTableVariant","mapConfigToClass","styles","sortByBreakpointsDescending","a","b","Breakpoint","isValidForCurrentBreakpoint","breakpoint","getConfigForBreakpoint","x","getCurrentConfig","tableWidth","windowWidth","breakpointConfig","canUseHorizontalScroll","isTouchDevice","canUseCenteredOverflow","getBreakpointClass","getCenteredOverflowTableStyle","parentWidth","COLUMN_GUTTER_WIDTH_PX","ModeType","defaultConfig","simpleConfig","Table","id","testId","className","children","mode","currentConfig","setCurrentConfig","useState","setTableWidth","setParentWidth","setWindowWidth","tableRef","useRef","useBreakpoint","useEffect","_a","_c","_b","useLayoutEvent","tableStyle","breakpointClass","tableClass","classNames","table","React","AnalyticsId","child","HorizontalScroll"],"mappings":"2ZAaA,MAAMA,EAAiBC,GACrBA,EAAO,UAAYC,EAAuB,kBAAoBD,EAAO,UAAYC,EAAuB,MAOpGC,EAAoBF,GAAqCG,EAAO,UAAUH,EAAO,OAAO,IAAIA,EAAO,UAAU,EAAE,EAQ/GI,EAA8B,CAACC,EAAqBC,IACxDC,EAAWF,EAAE,UAAU,EAAIE,EAAWD,EAAE,UAAU,EAQ9CE,EAA8B,CAACR,EAA0BS,IAC7DF,EAAWP,EAAO,UAAU,GAAKS,EAQ7BC,EAAyB,CAACV,EAA+CS,IAAyD,CAClI,GAAA,MAAM,QAAQT,CAAM,EACtB,OAAAA,EAAO,KAAKI,CAA2B,EAEhCJ,EAAO,KAAKW,GAAKH,EAA4BG,EAAGF,CAAU,CAAC,EACzD,GAAAT,GAAUQ,EAA4BR,EAAQS,CAAU,EAC1D,OAAAT,CAEX,EASaY,EAAmB,CAC9BZ,EACAS,EACAI,EACAC,IAC0D,CACpD,MAAAC,EAAmBL,EAAuBV,EAAQS,CAAU,EAC5DO,EAAyBC,IACzBC,EAAyBL,GAAcC,EAE7C,GAAKC,EAKH,OAAAA,EAAiB,UAAYd,EAAuB,kBACpD,CAACiB,GACDH,EAAiB,kBAAoBd,EAAuB,iBAErD,CACL,QAASe,EAAyBf,EAAuB,iBAAmBA,EAAuB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AAAA,EAAe,WAAY,mCAE1BsB,EAAiB,CAAA,WAAYzC,EAAY,OAAO,qBAC9CqC,CACH,EAIGA,CACT"}
package/TableBody.js DELETED
@@ -1,2 +0,0 @@
1
- import e from"react";import m from"classnames";import r from"./components/Table/styles.module.scss";import{M as n}from"./Table.js";const b=({className:a,children:t,mode:s=n.normal})=>{const l=m(r["table-body"],a);return e.createElement("tbody",{className:l},e.Children.map(t,o=>e.isValidElement(o)&&e.cloneElement(o,{mode:s})))},i=b;export{b as T,i as a};
2
- //# sourceMappingURL=TableBody.js.map
package/TableBody.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableBody.js","sources":["../src/components/Table/TableBody/TableBody.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport tableStyles from '../styles.module.scss';\nimport { ModeType } from '../Table';\n\nexport interface Props {\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the content of the table body. Use TableRows */\n children?: React.ReactNode;\n /** For display with less space. Discouraged to use together with interactive elements. */\n mode?: ModeType;\n}\n\nexport const TableBody = ({ className, children, mode = ModeType.normal }: Props): React.JSX.Element => {\n const tableBodyClasses = classNames(tableStyles['table-body'], className);\n return (\n <tbody className={tableBodyClasses}>\n {React.Children.map(children, child => React.isValidElement<{ mode?: ModeType }>(child) && React.cloneElement(child, { mode }))}\n </tbody>\n );\n};\n\nexport default TableBody;\n"],"names":["TableBody","className","children","mode","ModeType","tableBodyClasses","classNames","tableStyles","React","child","TableBody$1"],"mappings":"mIAgBa,MAAAA,EAAY,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,KAAAC,EAAOC,EAAS,UAAuC,CACtG,MAAMC,EAAmBC,EAAWC,EAAY,YAAY,EAAGN,CAAS,EAEtE,OAAAO,EAAA,cAAC,SAAM,UAAWH,CAAA,EACfG,EAAM,SAAS,IAAIN,EAAmBO,GAAAD,EAAM,eAAoCC,CAAK,GAAKD,EAAM,aAAaC,EAAO,CAAE,KAAAN,EAAM,CAAC,CAChI,CAEJ,EAEAO,EAAeV"}
package/TableCell.js DELETED
@@ -1,2 +0,0 @@
1
- import _ from"react";import n from"classnames";import t from"./components/Table/styles.module.scss";import{M as a}from"./Table.js";var p=(e=>(e.left="left",e.center="center",e.right="right",e))(p||{});const f=({nowrap:e=!1,textAlign:l="left",dataLabel:r,children:c,className:o,testId:s,mode:m=a.normal})=>{const b=n(t.table__cell,{[t["table__cell--compact"]]:m===a.compact},{[t["table__cell--nowrap"]]:e},{[t["table__cell--center"]]:l==="center"},{[t["table__cell--right"]]:l==="right"},o);return _.createElement("td",{className:b,"data-label":r,"data-testid":s},c)},u=f;export{f as T,p as a,u as b};
2
- //# sourceMappingURL=TableCell.js.map
package/TableCell.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableCell.js","sources":["../src/components/Table/TableCell/TableCell.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport tableStyles from '../styles.module.scss';\nimport { ModeType } from '../Table';\n\nexport enum TextAlign {\n left = 'left',\n center = 'center',\n right = 'right',\n}\n\nexport interface Props {\n /** Label used for small viewport block */\n dataLabel: string;\n /** text align in cell */\n textAlign?: TextAlign;\n /** nowrap for white space */\n nowrap?: boolean;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the content of the table cell */\n children: React.ReactNode;\n /** For display with less space. Discouraged to use together with interactive elements. */\n mode?: ModeType;\n /** For test purposes */\n testId?: string;\n}\n\nexport const TableCell = ({\n nowrap = false,\n textAlign = TextAlign.left,\n dataLabel,\n children,\n className,\n testId,\n mode = ModeType.normal,\n}: Props): React.JSX.Element => {\n const tableCellClass = classNames(\n tableStyles['table__cell'],\n { [tableStyles['table__cell--compact']]: mode === ModeType.compact },\n { [tableStyles['table__cell--nowrap']]: nowrap },\n { [tableStyles['table__cell--center']]: textAlign === 'center' },\n { [tableStyles['table__cell--right']]: textAlign === 'right' },\n className\n );\n\n return (\n <td className={tableCellClass} data-label={dataLabel} data-testid={testId}>\n {children}\n </td>\n );\n};\n\nexport default TableCell;\n"],"names":["TextAlign","TableCell","nowrap","textAlign","dataLabel","children","className","testId","mode","ModeType","tableCellClass","classNames","tableStyles","React","TableCell$1"],"mappings":"mIAOY,IAAAA,GAAAA,IACVA,EAAA,KAAO,OACPA,EAAA,OAAS,SACTA,EAAA,MAAQ,QAHEA,IAAAA,GAAA,CAAA,CAAA,EAuBL,MAAMC,EAAY,CAAC,CACxB,OAAAC,EAAS,GACT,UAAAC,EAAY,OACZ,UAAAC,EACA,SAAAC,EACA,UAAAC,EACA,OAAAC,EACA,KAAAC,EAAOC,EAAS,MAClB,IAAgC,CAC9B,MAAMC,EAAiBC,EACrBC,EAAY,YACZ,CAAE,CAACA,EAAY,sBAAsB,CAAC,EAAGJ,IAASC,EAAS,OAAQ,EACnE,CAAE,CAACG,EAAY,qBAAqB,CAAC,EAAGV,CAAO,EAC/C,CAAE,CAACU,EAAY,qBAAqB,CAAC,EAAGT,IAAc,QAAS,EAC/D,CAAE,CAACS,EAAY,oBAAoB,CAAC,EAAGT,IAAc,OAAQ,EAC7DG,CAAA,EAIA,OAAAO,EAAA,cAAC,MAAG,UAAWH,EAAgB,aAAYN,EAAW,cAAaG,GAChEF,CACH,CAEJ,EAEAS,EAAeb"}
@@ -1,2 +0,0 @@
1
- import e from"react";import o from"classnames";import{B as x}from"./Button.js";import{Icon as f}from"./components/Icons/Icon.js";import w from"./components/Icons/ChevronUp.js";import a from"./components/Table/styles.module.scss";import{M as n}from"./Table.js";const C=({numberOfColumns:m,expanded:t,hideDetailsText:c,toggleClick:s,children:p,className:l,mode:d=n.normal,id:i})=>{const b=o(a["table__expanded-row"],{[a["table__expanded-row--expanded"]]:t},l),_=o(a.table__cell,l,{[a["table__cell--compact"]]:d===n.compact}),E=o(a["table__expanded-row-container"],{[a["table__expanded-row-container--expanded"]]:t});return e.createElement("tr",{className:b,id:i},e.createElement("td",{colSpan:m,className:_},e.createElement("div",{className:E},e.Children.map(p,r=>e.isValidElement(r)&&e.cloneElement(r)),e.createElement(x,{variant:"borderless",onClick:s,"aria-expanded":t,tabIndex:t?0:-1},c,e.createElement(f,{svgIcon:w})))))},B=C;export{C as T,B as a};
2
- //# sourceMappingURL=TableExpandedRow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableExpandedRow.js","sources":["../src/components/Table/TableExpandedRow/TableExpandedRow.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport Button from '../../Button';\nimport Icon from '../../Icons';\nimport ChevronUp from '../../Icons/ChevronUp';\nimport tableStyles from '../styles.module.scss';\nimport { ModeType } from '../Table';\n\nexport interface Props {\n /** Row is expanded. */\n expanded: boolean;\n /** Number of columns in table. */\n numberOfColumns: number;\n /** Text for hide button. */\n hideDetailsText: string;\n /** When hide button inside expanded row is clicked. */\n toggleClick: () => void;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the content of the expanded row. */\n children: React.ReactNode;\n /** For display with less space. Discouraged to use together with interactive elements. */\n mode?: ModeType;\n /** Row id. For use with aria-controls. */\n id?: string;\n}\n\nexport const TableExpandedRow = ({\n numberOfColumns,\n expanded,\n hideDetailsText,\n toggleClick,\n children,\n className,\n mode = ModeType.normal,\n id,\n}: Props): React.JSX.Element => {\n const tableRowClass = classNames(\n tableStyles['table__expanded-row'],\n { [tableStyles['table__expanded-row--expanded']]: expanded },\n className\n );\n const tableCellClass = classNames(tableStyles['table__cell'], className, {\n [tableStyles['table__cell--compact']]: mode === ModeType.compact,\n });\n\n const containerClass = classNames(tableStyles['table__expanded-row-container'], {\n [tableStyles['table__expanded-row-container--expanded']]: expanded,\n });\n\n return (\n <tr className={tableRowClass} id={id}>\n <td colSpan={numberOfColumns} className={tableCellClass}>\n <div className={containerClass}>\n {React.Children.map(children, child => React.isValidElement(child) && React.cloneElement(child))}\n <Button variant={'borderless'} onClick={toggleClick} aria-expanded={expanded} tabIndex={expanded ? 0 : -1}>\n {hideDetailsText}\n <Icon svgIcon={ChevronUp} />\n </Button>\n </div>\n </td>\n </tr>\n );\n};\n\nexport default TableExpandedRow;\n"],"names":["TableExpandedRow","numberOfColumns","expanded","hideDetailsText","toggleClick","children","className","mode","ModeType","id","tableRowClass","classNames","tableStyles","tableCellClass","containerClass","React","child","Button","Icon","ChevronUp","TableExpandedRow$1"],"mappings":"oQA6BO,MAAMA,EAAmB,CAAC,CAC/B,gBAAAC,EACA,SAAAC,EACA,gBAAAC,EACA,YAAAC,EACA,SAAAC,EACA,UAAAC,EACA,KAAAC,EAAOC,EAAS,OAChB,GAAAC,CACF,IAAgC,CAC9B,MAAMC,EAAgBC,EACpBC,EAAY,qBAAqB,EACjC,CAAE,CAACA,EAAY,+BAA+B,CAAC,EAAGV,CAAS,EAC3DI,CAAA,EAEIO,EAAiBF,EAAWC,EAAY,YAAgBN,EAAW,CACvE,CAACM,EAAY,sBAAsB,CAAC,EAAGL,IAASC,EAAS,OAAA,CAC1D,EAEKM,EAAiBH,EAAWC,EAAY,+BAA+B,EAAG,CAC9E,CAACA,EAAY,yCAAyC,CAAC,EAAGV,CAAA,CAC3D,EAGC,OAAAa,EAAA,cAAC,MAAG,UAAWL,EAAe,GAAAD,GAC3BM,EAAA,cAAA,KAAA,CAAG,QAASd,EAAiB,UAAWY,CAAA,kBACtC,MAAI,CAAA,UAAWC,GACbC,EAAM,SAAS,IAAIV,EAAUW,GAASD,EAAM,eAAeC,CAAK,GAAKD,EAAM,aAAaC,CAAK,CAAC,EAC/FD,EAAA,cAACE,GAAO,QAAS,aAAc,QAASb,EAAa,gBAAeF,EAAU,SAAUA,EAAW,EAAI,EACpG,EAAAC,EACAY,EAAA,cAAAG,EAAA,CAAK,QAASC,CAAW,CAAA,CAC5B,CACF,CACF,CACF,CAEJ,EAEAC,EAAepB"}
@@ -1,2 +0,0 @@
1
- import a from"react";import i from"classnames";import{B as b}from"./Button.js";import{Icon as f}from"./components/Icons/Icon.js";import C from"./components/Icons/ChevronDown.js";import _ from"./components/Icons/ChevronUp.js";import o from"./components/Table/styles.module.scss";import{M as r}from"./Table.js";const E=({expandableRowId:t,hideDetailsText:l,showDetailsText:m,expanded:e,className:c,mode:n=r.normal})=>{const s=i(o.table__cell,o["table__cell-expander"],c,{[o["table__cell--compact"]]:n===r.compact}),p=e?_:C;return a.createElement("td",{className:s},a.createElement(b,{variant:"borderless","aria-expanded":e,"aria-controls":t,ariaLabel:e?l:m},a.createElement(f,{svgIcon:p})))},I=E;export{E as T,I as a};
2
- //# sourceMappingURL=TableExpanderCell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableExpanderCell.js","sources":["../src/components/Table/TableExpanderCell/TableExpanderCell.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport Button from '../../Button';\nimport Icon from '../../Icons';\nimport ChevronDown from '../../Icons/ChevronDown';\nimport ChevronUp from '../../Icons/ChevronUp';\nimport tableStyles from '../styles.module.scss';\nimport { ModeType } from '../Table';\n\nexport interface Props {\n /** Adds custom classes to the element. */\n className?: string;\n /** Row is expanded. */\n expanded: boolean;\n /** Id for expanded row. */\n expandableRowId: string;\n /** Text for hide button used for aria label. */\n hideDetailsText: string;\n /** Text for show button used for aria label. */\n showDetailsText: string;\n /** For display with less space. Discouraged to use together with interactive elements. */\n mode?: ModeType;\n}\n\nexport const TableExpanderCell = ({\n expandableRowId,\n hideDetailsText,\n showDetailsText,\n expanded,\n className,\n mode = ModeType.normal,\n}: Props): React.JSX.Element => {\n const tableCellClass = classNames(tableStyles['table__cell'], tableStyles['table__cell-expander'], className, {\n [tableStyles['table__cell--compact']]: mode === ModeType.compact,\n });\n const icon = expanded ? ChevronUp : ChevronDown;\n\n return (\n <td className={tableCellClass}>\n <Button\n variant=\"borderless\"\n aria-expanded={expanded}\n aria-controls={expandableRowId}\n ariaLabel={expanded ? hideDetailsText : showDetailsText}\n >\n <Icon svgIcon={icon} />\n </Button>\n </td>\n );\n};\n\nexport default TableExpanderCell;\n"],"names":["TableExpanderCell","expandableRowId","hideDetailsText","showDetailsText","expanded","className","mode","ModeType","tableCellClass","classNames","tableStyles","icon","ChevronUp","ChevronDown","React","Button","Icon","TableExpanderCell$1"],"mappings":"qTA0BO,MAAMA,EAAoB,CAAC,CAChC,gBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,SAAAC,EACA,UAAAC,EACA,KAAAC,EAAOC,EAAS,MAClB,IAAgC,CACxB,MAAAC,EAAiBC,EAAWC,EAAY,YAAgBA,EAAY,sBAAsB,EAAGL,EAAW,CAC5G,CAACK,EAAY,sBAAsB,CAAC,EAAGJ,IAASC,EAAS,OAAA,CAC1D,EACKI,EAAOP,EAAWQ,EAAYC,EAGlC,OAAAC,EAAA,cAAC,KAAG,CAAA,UAAWN,CACb,EAAAM,EAAA,cAACC,EAAA,CACC,QAAQ,aACR,gBAAeX,EACf,gBAAeH,EACf,UAAWG,EAAWF,EAAkBC,CAAA,EAExCW,EAAA,cAACE,EAAK,CAAA,QAASL,CAAM,CAAA,CAAA,CAEzB,CAEJ,EAEAM,EAAejB"}
package/TableHead.js DELETED
@@ -1,2 +0,0 @@
1
- import t from"react";import o from"classnames";import e from"./components/Table/styles.module.scss";import{M as b}from"./Table.js";var p=(a=>(a.normal="normal",a.transparent="transparent",a.sortable="sortable",a))(p||{});const _=({category:a,className:s,children:n,mode:l})=>{const m=o(e.table__head,{[e["table__head--normal"]]:a==="normal",[e["table__head--transparent"]]:a==="transparent",[e["table__head--sortable"]]:a=="sortable",[e["table__head--compact"]]:l==b.compact},s);return t.createElement("thead",{className:m},t.Children.map(n,r=>t.isValidElement(r)&&t.cloneElement(r,{mode:l})))},f=_;export{p as H,_ as T,f as a};
2
- //# sourceMappingURL=TableHead.js.map
package/TableHead.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableHead.js","sources":["../src/components/Table/TableHead/TableHead.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport tableStyles from '../styles.module.scss';\nimport { ModeType } from '../Table';\n\nexport enum HeaderCategory {\n normal = 'normal',\n transparent = 'transparent',\n sortable = 'sortable',\n}\n\nexport interface Props {\n /** Header category for styling */\n category: HeaderCategory;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the content of the thead. Add table rows */\n children: React.ReactNode;\n /** For display with less space. Discouraged to use together with interactive elements. */\n mode?: ModeType;\n}\n\nexport const TableHead = ({ category, className, children, mode }: Props): React.JSX.Element => {\n const tableHeadClass = classNames(\n tableStyles['table__head'],\n {\n [tableStyles['table__head--normal']]: category === HeaderCategory.normal,\n [tableStyles['table__head--transparent']]: category === HeaderCategory.transparent,\n [tableStyles['table__head--sortable']]: category == HeaderCategory.sortable,\n [tableStyles['table__head--compact']]: mode == ModeType.compact,\n },\n className\n );\n\n return (\n <thead className={tableHeadClass}>\n {React.Children.map(children, child => React.isValidElement<{ mode?: ModeType }>(child) && React.cloneElement(child, { mode }))}\n </thead>\n );\n};\n\nexport default TableHead;\n"],"names":["HeaderCategory","TableHead","category","className","children","mode","tableHeadClass","classNames","tableStyles","ModeType","React","child","TableHead$1"],"mappings":"mIAOY,IAAAA,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,YAAc,cACdA,EAAA,SAAW,WAHDA,IAAAA,GAAA,CAAA,CAAA,EAiBL,MAAMC,EAAY,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,SAAAC,EAAU,KAAAC,KAAqC,CAC9F,MAAMC,EAAiBC,EACrBC,EAAY,YACZ,CACE,CAACA,EAAY,qBAAqB,CAAC,EAAGN,IAAa,SACnD,CAACM,EAAY,0BAA0B,CAAC,EAAGN,IAAa,cACxD,CAACM,EAAY,uBAAuB,CAAC,EAAGN,GAAY,WACpD,CAACM,EAAY,sBAAsB,CAAC,EAAGH,GAAQI,EAAS,OAC1D,EACAN,CAAA,EAIA,OAAAO,EAAA,cAAC,SAAM,UAAWJ,CAAA,EACfI,EAAM,SAAS,IAAIN,EAAmBO,GAAAD,EAAM,eAAoCC,CAAK,GAAKD,EAAM,aAAaC,EAAO,CAAE,KAAAN,EAAM,CAAC,CAChI,CAEJ,EAEAO,EAAeX"}
package/TableHeadCell.js DELETED
@@ -1,2 +0,0 @@
1
- import c from"react";import r from"classnames";import{Icon as _}from"./components/Icons/Icon.js";import{IconSize as f}from"./constants.js";import u from"./components/Icons/ArrowDown.js";import h from"./components/Icons/ArrowUp.js";import a from"./components/Table/styles.module.scss";import{M as n}from"./Table.js";var w=(t=>(t.asc="asc",t.desc="desc",t))(w||{});const C=({sortable:t,onClick:m,className:l,children:o,sortDir:e,mode:d=n.normal})=>{const s=r(a["table__head-cell"],l,{[a["table__head-cell--compact"]]:d===n.compact});if(!t)return c.createElement("th",{scope:"col",className:s},o);const p=r(s,a["table__head-cell--sortable"],{[a["table__head-cell--sorted"]]:e},l),b=()=>e&&c.createElement("div",{className:a["table__head-cell-sort-icon-wrapper"]},c.createElement(_,{svgIcon:e=="asc"?u:h,size:f.XXSmall})),i=()=>{switch(e){case"asc":return"ascending";case"desc":return"descending"}};return c.createElement("th",{scope:"col",className:p,"aria-sort":i()},c.createElement("button",{type:"button",onClick:m,className:a["table__sort-button"],"aria-pressed":e?!!e:void 0},b(),o))},H=C;export{w as S,C as T,H as a};
2
- //# sourceMappingURL=TableHeadCell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableHeadCell.js","sources":["../src/components/Table/TableHeadCell/TableHeadCell.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport Icon, { IconSize } from '../../Icons';\nimport ArrowDown from '../../Icons/ArrowDown';\nimport ArrowUp from '../../Icons/ArrowUp';\nimport tableStyles from '../styles.module.scss';\nimport { ModeType } from '../Table';\n\nexport enum SortDirection {\n asc = 'asc',\n desc = 'desc',\n}\n\nexport interface Props {\n /** Sets if column for head cell should be sortable*/\n sortable?: boolean;\n /** Sort direction */\n sortDir?: SortDirection;\n /** Function that is called when clicked */\n onClick?: () => void;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the content of the td element. */\n children?: React.ReactNode;\n /** For display with less space. Discouraged to use together with interactive elements. */\n mode?: ModeType;\n}\n\nexport const TableHeadCell = ({ sortable, onClick, className, children, sortDir, mode = ModeType.normal }: Props): React.JSX.Element => {\n const tableHeadCellDefaultClass = classNames(tableStyles['table__head-cell'], className, {\n [tableStyles['table__head-cell--compact']]: mode === ModeType.compact,\n });\n\n if (!sortable) {\n return (\n <th scope=\"col\" className={tableHeadCellDefaultClass}>\n {children}\n </th>\n );\n }\n\n const sortableClasses = classNames(\n tableHeadCellDefaultClass,\n tableStyles['table__head-cell--sortable'],\n { [tableStyles['table__head-cell--sorted']]: sortDir },\n className\n );\n\n const renderSortIcon = (): React.JSX.Element | undefined =>\n sortDir && (\n <div className={tableStyles['table__head-cell-sort-icon-wrapper']}>\n <Icon svgIcon={sortDir == SortDirection.asc ? ArrowDown : ArrowUp} size={IconSize.XXSmall} />\n </div>\n );\n\n const getSortDirection = (): React.AriaAttributes['aria-sort'] => {\n switch (sortDir) {\n case SortDirection.asc:\n return 'ascending';\n case SortDirection.desc:\n return 'descending';\n }\n };\n\n return (\n <th scope=\"col\" className={sortableClasses} aria-sort={getSortDirection()}>\n <button type=\"button\" onClick={onClick} className={tableStyles['table__sort-button']} aria-pressed={sortDir ? !!sortDir : undefined}>\n {renderSortIcon()}\n {children}\n </button>\n </th>\n );\n};\n\nexport default TableHeadCell;\n"],"names":["SortDirection","TableHeadCell","sortable","onClick","className","children","sortDir","mode","ModeType","tableHeadCellDefaultClass","classNames","tableStyles","sortableClasses","renderSortIcon","Icon","ArrowDown","ArrowUp","IconSize","getSortDirection","React","TableHeadCell$1"],"mappings":"2TAUY,IAAAA,GAAAA,IACVA,EAAA,IAAM,MACNA,EAAA,KAAO,OAFGA,IAAAA,GAAA,CAAA,CAAA,EAoBC,MAAAC,EAAgB,CAAC,CAAE,SAAAC,EAAU,QAAAC,EAAS,UAAAC,EAAW,SAAAC,EAAU,QAAAC,EAAS,KAAAC,EAAOC,EAAS,UAAuC,CACtI,MAAMC,EAA4BC,EAAWC,EAAY,kBAAkB,EAAGP,EAAW,CACvF,CAACO,EAAY,2BAA2B,CAAC,EAAGJ,IAASC,EAAS,OAAA,CAC/D,EAED,GAAI,CAACN,EACH,uBACG,KAAG,CAAA,MAAM,MAAM,UAAWO,GACxBJ,CACH,EAIJ,MAAMO,EAAkBF,EACtBD,EACAE,EAAY,4BAA4B,EACxC,CAAE,CAACA,EAAY,0BAA0B,CAAC,EAAGL,CAAQ,EACrDF,CAAA,EAGIS,EAAiB,IACrBP,mBACG,MAAI,CAAA,UAAWK,EAAY,oCAAoC,CAAA,kBAC7DG,EAAK,CAAA,QAASR,GAAW,MAAoBS,EAAYC,EAAS,KAAMC,EAAS,QAAS,CAC7F,EAGEC,EAAmB,IAAyC,CAChE,OAAQZ,EAAS,CACf,IAAK,MACI,MAAA,YACT,IAAK,OACI,MAAA,YACX,CAAA,EAIA,OAAAa,EAAA,cAAC,KAAG,CAAA,MAAM,MAAM,UAAWP,EAAiB,YAAWM,EAAiB,CAAA,EACrEC,EAAA,cAAA,SAAA,CAAO,KAAK,SAAS,QAAAhB,EAAkB,UAAWQ,EAAY,oBAAoB,EAAG,eAAcL,EAAU,CAAC,CAACA,EAAU,MACvH,EAAAO,EAAA,EACAR,CACH,CACF,CAEJ,EAEAe,EAAenB"}
package/TableRow.js DELETED
@@ -1,2 +0,0 @@
1
- import e from"react";import p from"classnames";import l from"./components/Table/styles.module.scss";import{M as s}from"./Table.js";import{B as f}from"./Button.js";import{Icon as w}from"./components/Icons/Icon.js";import C from"./components/Icons/ChevronDown.js";import T from"./components/Icons/ChevronUp.js";const d=({expanded:t,onClick:m,hideDetailsText:n,showDetailsText:a,mode:o=s.normal})=>{const r=p(l.table__cell,l["table__expander-cell-mobile"],{[l["table__expander-cell-mobile--expanded"]]:t,[l["table__cell--compact"]]:o===s.compact});return e.createElement("td",{className:r},e.createElement(f,{"aria-expanded":t,variant:"borderless",onClick:m},e.createElement(w,{svgIcon:t?T:C})," ",t?n:a))},v=d,x=({rowKey:t,hideDetailsText:m,showDetailsText:n,expandable:a,expanded:o,onClick:r,className:i,children:_,mode:c=s.normal})=>{const E=p(l["table-row"],{[l["table__row--expandable"]]:a,[l["table__row--expanded"]]:o},i);return e.createElement("tr",{className:E,onClick:r,key:t},e.Children.map(_,b=>e.isValidElement(b)&&e.cloneElement(b,{mode:c})),a&&e.createElement(v,{expanded:o,onClick:r,hideDetailsText:m,showDetailsText:n,mode:c}))},$=x;export{x as T,$ as a};
2
- //# sourceMappingURL=TableRow.js.map
package/TableRow.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableRow.js","sources":["../src/components/Table/TableExpanderCell/TableExpanderCellMobile.tsx","../src/components/Table/TableRow/TableRow.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport Button from '../../Button';\nimport Icon from '../../Icons';\nimport ChevronDown from '../../Icons/ChevronDown';\nimport ChevronUp from '../../Icons/ChevronUp';\nimport tableStyles from '../styles.module.scss';\nimport { ModeType } from '../Table';\nimport { Props } from '../TableRow/TableRow';\n\ntype TableExpanderCellMobileProps = Pick<Props, 'expanded' | 'onClick' | 'hideDetailsText' | 'showDetailsText' | 'mode'>;\n\nconst TableExpanderCellMobile: React.FC<TableExpanderCellMobileProps> = ({\n expanded,\n onClick,\n hideDetailsText,\n showDetailsText,\n mode = ModeType.normal,\n}) => {\n const cellClass = classNames(tableStyles.table__cell, tableStyles['table__expander-cell-mobile'], {\n [tableStyles['table__expander-cell-mobile--expanded']]: expanded,\n [tableStyles['table__cell--compact']]: mode === ModeType.compact,\n });\n\n return (\n <td className={cellClass}>\n <Button aria-expanded={expanded} variant=\"borderless\" onClick={onClick}>\n <Icon svgIcon={expanded ? ChevronUp : ChevronDown} /> {expanded ? hideDetailsText : showDetailsText}\n </Button>\n </td>\n );\n};\n\nexport default TableExpanderCellMobile;\n","import React from 'react';\n\nimport classNames from 'classnames';\n\nimport tableStyles from '../styles.module.scss';\nimport { ModeType } from '../Table';\nimport TableExpanderCellMobile from '../TableExpanderCell/TableExpanderCellMobile';\n\nexport interface Props {\n /** Sets if expanded row can be expanded */\n expandable?: boolean;\n /** Sets if expanded row is expanded */\n expanded?: boolean;\n /** When hide/show button for expanded row is clicked. */\n onClick?: () => void;\n /** Text for expanded row hide button. */\n hideDetailsText?: string;\n /** Text for expanded row show button. */\n showDetailsText?: string;\n /** Key attribute for row */\n rowKey?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the cells of the table row element. */\n children?: React.ReactNode;\n /** For display with less space. Discouraged to use together with interactive elements. */\n mode?: ModeType;\n}\n\nexport const TableRow: React.FC<Props> = ({\n rowKey,\n hideDetailsText,\n showDetailsText,\n expandable,\n expanded,\n onClick,\n className,\n children,\n mode = ModeType.normal,\n}) => {\n const tableRowClass = classNames(\n tableStyles['table-row'],\n {\n [tableStyles['table__row--expandable']]: expandable,\n [tableStyles['table__row--expanded']]: expanded,\n },\n className\n );\n\n return (\n <tr className={tableRowClass} onClick={onClick} key={rowKey}>\n {React.Children.map(children, child => React.isValidElement<{ mode?: ModeType }>(child) && React.cloneElement(child, { mode }))}\n {expandable && (\n <TableExpanderCellMobile\n expanded={expanded}\n onClick={onClick}\n hideDetailsText={hideDetailsText}\n showDetailsText={showDetailsText}\n mode={mode}\n />\n )}\n </tr>\n );\n};\n\nexport default TableRow;\n"],"names":["TableExpanderCellMobile","expanded","onClick","hideDetailsText","showDetailsText","mode","ModeType","cellClass","classNames","tableStyles","React","Button","Icon","ChevronUp","ChevronDown","TableExpanderCellMobile$1","TableRow","rowKey","expandable","className","children","tableRowClass","child","TableRow$1"],"mappings":"qTAcA,MAAMA,EAAkE,CAAC,CACvE,SAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,KAAAC,EAAOC,EAAS,MAClB,IAAM,CACJ,MAAMC,EAAYC,EAAWC,EAAY,YAAaA,EAAY,6BAA6B,EAAG,CAChG,CAACA,EAAY,uCAAuC,CAAC,EAAGR,EACxD,CAACQ,EAAY,sBAAsB,CAAC,EAAGJ,IAASC,EAAS,OAAA,CAC1D,EAGC,OAAAI,EAAA,cAAC,MAAG,UAAWH,CAAA,kBACZI,EAAO,CAAA,gBAAeV,EAAU,QAAQ,aAAa,QAAAC,CAAA,kBACnDU,EAAK,CAAA,QAASX,EAAWY,EAAYC,CAAa,CAAA,EAAE,IAAEb,EAAWE,EAAkBC,CACtF,CACF,CAEJ,EAEAW,EAAef,ECNFgB,EAA4B,CAAC,CACxC,OAAAC,EACA,gBAAAd,EACA,gBAAAC,EACA,WAAAc,EACA,SAAAjB,EACA,QAAAC,EACA,UAAAiB,EACA,SAAAC,EACA,KAAAf,EAAOC,EAAS,MAClB,IAAM,CACJ,MAAMe,EAAgBb,EACpBC,EAAY,WAAW,EACvB,CACE,CAACA,EAAY,wBAAwB,CAAC,EAAGS,EACzC,CAACT,EAAY,sBAAsB,CAAC,EAAGR,CACzC,EACAkB,CAAA,EAIA,OAAAT,EAAA,cAAC,KAAG,CAAA,UAAWW,EAAe,QAAAnB,EAAkB,IAAKe,CAClD,EAAAP,EAAM,SAAS,IAAIU,EAAUE,GAASZ,EAAM,eAAoCY,CAAK,GAAKZ,EAAM,aAAaY,EAAO,CAAE,KAAAjB,CAAM,CAAA,CAAC,EAC7Ha,GACCR,EAAA,cAACV,EAAA,CACC,SAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,KAAAC,CAAA,CAAA,CAGN,CAEJ,EAEAkB,EAAeP"}
package/Textarea.js DELETED
@@ -1,2 +0,0 @@
1
- import o,{useState as I,useRef as U,useEffect as Y}from"react";import x from"classnames";import{FormMode as d,AnalyticsId as Z,AVERAGE_CHARACTER_WIDTH_PX as ee}from"./constants.js";import{u as te}from"./uuid.js";import{E as ae}from"./ErrorWrapper.js";import{a as re}from"./Label.js";import{M as ne}from"./MaxCharacters.js";import t from"./components/Textarea/styles.module.scss";const oe=r=>{const m="2rem",n="16px",u="4px";return`calc(${r*ee}px + ${m} + ${n} + ${u})`},A=o.forwardRef((r,m)=>{const{maxCharacters:n,maxText:u,width:h,testId:M,defaultValue:f,marginBottom:N,transparent:$,mode:s=d.onwhite,label:B,textareaId:b=te(),minRows:g=3,maxRows:i=10,grow:w,errorText:C,autoFocus:k,disabled:E,name:L,autoComplete:T,placeholder:S,readOnly:D,required:F,onChange:y,...V}=r,[q,R]=I(g),[v,z]=I(f||""),c=U(null),W=e=>{const l=e.rows;e.rows=g;const a=Math.floor((e.scrollHeight-16)/28);a===l&&(e.rows=a),a>=i&&(e.rows=i,e.scrollTop=e.scrollHeight),a<i?R(a):R(i)},G=s===d.ondark,O=s===d.onblueberry,P=!!n&&v.toString().length>n,H=s===d.oninvalid||!!C||P,X=x(t.textarea,{[t["textarea--gutterBottom"]]:N}),j=x(t["input-container"],{[t["input-container--transparent"]]:$,[t["input-container--on-blueberry"]]:O,[t["input-container--on-dark"]]:G,[t["input-container--invalid"]]:H,[t["input-container--disabled"]]:r.disabled}),J=x(t["input-container__input"],{[t["input-container__input--disabled"]]:r.disabled});Y(()=>{var e,p,l;if(w&&((e=c.current)!=null&&e.children)&&((p=c.current)!=null&&p.children[0])){const a=(l=c.current)==null?void 0:l.children[0];W(a)}},[]);const K=e=>{w&&W(e.target),z(e.target.value)},Q=e=>{y&&y(e),K(e)},_=h?oe(h):void 0;return o.createElement(ae,{errorText:C},o.createElement("div",{"data-testid":M,"data-analyticsid":Z.Textarea,className:X},re(B,b,s,E),o.createElement("div",{className:j,ref:c,style:{maxWidth:_}},o.createElement("textarea",{rows:q,defaultValue:f,id:b,className:J,ref:m,"aria-describedby":r["aria-describedby"]??void 0,"aria-invalid":!!H,autoFocus:k,disabled:E,name:L,autoComplete:T||void 0,placeholder:S,readOnly:D,required:F,onChange:Q,...V})),n&&o.createElement(ne,{maxCharacters:n,length:v.toString().length,maxText:u,mode:s,maxWidth:_})))});A.displayName="Textarea";const xe=A;export{xe as T};
2
- //# sourceMappingURL=Textarea.js.map