@helsenorge/designsystem-react 2.4.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (393) hide show
  1. package/Button.js +1 -1
  2. package/Button.js.map +1 -1
  3. package/CHANGELOG.md +27 -0
  4. package/Checkbox.js +1 -1
  5. package/Checkbox.js.map +1 -1
  6. package/FormGroup.js +1 -1
  7. package/FormGroup.js.map +1 -1
  8. package/HelpBubble.js +1 -1
  9. package/HelpBubble.js.map +1 -1
  10. package/Input.js +1 -1
  11. package/Input.js.map +1 -1
  12. package/Panel.js +1 -1
  13. package/Panel.js.map +1 -1
  14. package/RadioButton.js +1 -1
  15. package/RadioButton.js.map +1 -1
  16. package/Select.js +2 -0
  17. package/Select.js.map +1 -0
  18. package/Textarea.js +1 -1
  19. package/Textarea.js.map +1 -1
  20. package/Tooltip.js +1 -1
  21. package/Tooltip.js.map +1 -1
  22. package/TooltipWord.js +2 -0
  23. package/TooltipWord.js.map +1 -0
  24. package/__mocks__/uuid.js +1 -1
  25. package/__mocks__/uuid.js.map +1 -1
  26. package/components/AnchorLink/index.js +1 -1
  27. package/components/Avatar/index.js +1 -1
  28. package/components/Avatar/index.js.map +1 -1
  29. package/components/Button/index.js +1 -1
  30. package/components/ButtonWithModal/index.js +1 -1
  31. package/components/ButtonWithModal/index.js.map +1 -1
  32. package/components/Checkbox/Checkbox.d.ts +1 -1
  33. package/components/Checkbox/Checkbox.d.ts.map +1 -1
  34. package/components/Checkbox/componentdata.json +1 -1
  35. package/components/Checkbox/index.js +1 -1
  36. package/components/Close/index.js +1 -1
  37. package/components/Dropdown/Dropdown.d.ts.map +1 -1
  38. package/components/Dropdown/index.js +1 -1
  39. package/components/Dropdown/index.js.map +1 -1
  40. package/components/Duolist/Duolist.d.ts +6 -4
  41. package/components/Duolist/Duolist.d.ts.map +1 -1
  42. package/components/Duolist/componentdata.json +1 -1
  43. package/components/Duolist/index.js +1 -1
  44. package/components/Duolist/index.js.map +1 -1
  45. package/components/Duolist/styles.module.scss +0 -1
  46. package/components/Expander/index.js +1 -1
  47. package/components/Expander/index.js.map +1 -1
  48. package/components/ExpanderList/index.js +1 -1
  49. package/components/ExpanderList/index.js.map +1 -1
  50. package/components/FormExample/FormExample.d.ts +2 -1
  51. package/components/FormExample/FormExample.d.ts.map +1 -1
  52. package/components/FormExample/componentdata.json +1 -1
  53. package/components/FormExample/index.js +3 -3
  54. package/components/FormExample/index.js.map +1 -1
  55. package/components/FormGroup/FormGroup.d.ts.map +1 -1
  56. package/components/FormGroup/index.js +1 -1
  57. package/components/HelpBubble/HelpBubble.d.ts +7 -4
  58. package/components/HelpBubble/HelpBubble.d.ts.map +1 -1
  59. package/components/HelpBubble/componentdata.json +1 -1
  60. package/components/HelpBubble/index.js +1 -1
  61. package/components/HelpBubble/styles.module.scss +12 -6
  62. package/components/HelpBubble/styles.module.scss.d.ts +0 -1
  63. package/components/HelpBubbleExample/componentdata.json +1 -1
  64. package/components/HelpBubbleExample/index.js +1 -1
  65. package/components/HelpBubbleExample/index.js.map +1 -1
  66. package/components/HighlightBox/index.js +1 -1
  67. package/components/HighlightBox/index.js.map +1 -1
  68. package/components/HorizontalScroll/index.js +1 -1
  69. package/components/Icons/AcupunctureBack.js +1 -1
  70. package/components/Icons/AcupunctureBack.js.map +1 -1
  71. package/components/Icons/AlarmClock.js +1 -1
  72. package/components/Icons/AlarmClock.js.map +1 -1
  73. package/components/Icons/AlertSignFill.js +1 -1
  74. package/components/Icons/AlertSignFill.js.map +1 -1
  75. package/components/Icons/AlertSignStroke.js +1 -1
  76. package/components/Icons/AlertSignStroke.js.map +1 -1
  77. package/components/Icons/Archive.js +1 -1
  78. package/components/Icons/Archive.js.map +1 -1
  79. package/components/Icons/ArrowDown.js +1 -1
  80. package/components/Icons/ArrowDown.js.map +1 -1
  81. package/components/Icons/ArrowLeft.js +1 -1
  82. package/components/Icons/ArrowLeft.js.map +1 -1
  83. package/components/Icons/ArrowRight.js +1 -1
  84. package/components/Icons/ArrowRight.js.map +1 -1
  85. package/components/Icons/ArrowUp.js +1 -1
  86. package/components/Icons/ArrowUp.js.map +1 -1
  87. package/components/Icons/ArrowUpRight.js +1 -1
  88. package/components/Icons/ArrowUpRight.js.map +1 -1
  89. package/components/Icons/Attachment.js +1 -1
  90. package/components/Icons/Attachment.js.map +1 -1
  91. package/components/Icons/Avatar.js +1 -1
  92. package/components/Icons/Avatar.js.map +1 -1
  93. package/components/Icons/Bus.js +1 -1
  94. package/components/Icons/Bus.js.map +1 -1
  95. package/components/Icons/Calendar.js +1 -1
  96. package/components/Icons/Calendar.js.map +1 -1
  97. package/components/Icons/CalendarChange.js +1 -1
  98. package/components/Icons/CalendarChange.js.map +1 -1
  99. package/components/Icons/CalendarCheck.js +1 -1
  100. package/components/Icons/CalendarCheck.js.map +1 -1
  101. package/components/Icons/CalendarSave.js +1 -1
  102. package/components/Icons/CalendarSave.js.map +1 -1
  103. package/components/Icons/Change.js +1 -1
  104. package/components/Icons/Change.js.map +1 -1
  105. package/components/Icons/Check.js +1 -1
  106. package/components/Icons/Check.js.map +1 -1
  107. package/components/Icons/CheckFill.js +1 -1
  108. package/components/Icons/CheckFill.js.map +1 -1
  109. package/components/Icons/ChevronDown.js +1 -1
  110. package/components/Icons/ChevronDown.js.map +1 -1
  111. package/components/Icons/ChevronLeft.js +1 -1
  112. package/components/Icons/ChevronLeft.js.map +1 -1
  113. package/components/Icons/ChevronRight.js +1 -1
  114. package/components/Icons/ChevronRight.js.map +1 -1
  115. package/components/Icons/ChevronUp.js +1 -1
  116. package/components/Icons/ChevronUp.js.map +1 -1
  117. package/components/Icons/ChevronsDown.js +1 -1
  118. package/components/Icons/ChevronsDown.js.map +1 -1
  119. package/components/Icons/ChevronsUp.js +1 -1
  120. package/components/Icons/ChevronsUp.js.map +1 -1
  121. package/components/Icons/Contacts.js +1 -1
  122. package/components/Icons/Contacts.js.map +1 -1
  123. package/components/Icons/Copy.js +1 -1
  124. package/components/Icons/Copy.js.map +1 -1
  125. package/components/Icons/Download.js +1 -1
  126. package/components/Icons/Download.js.map +1 -1
  127. package/components/Icons/EChat.js +1 -1
  128. package/components/Icons/EChat.js.map +1 -1
  129. package/components/Icons/EnterFullScreen.js +1 -1
  130. package/components/Icons/EnterFullScreen.js.map +1 -1
  131. package/components/Icons/Envelope.js +1 -1
  132. package/components/Icons/Envelope.js.map +1 -1
  133. package/components/Icons/Eraser.js +1 -1
  134. package/components/Icons/Eraser.js.map +1 -1
  135. package/components/Icons/ErrorSignFill.js +1 -1
  136. package/components/Icons/ErrorSignFill.js.map +1 -1
  137. package/components/Icons/ErrorSignStroke.js +1 -1
  138. package/components/Icons/ErrorSignStroke.js.map +1 -1
  139. package/components/Icons/ExitFullScreen.js +1 -1
  140. package/components/Icons/ExitFullScreen.js.map +1 -1
  141. package/components/Icons/Eye.js +1 -1
  142. package/components/Icons/Eye.js.map +1 -1
  143. package/components/Icons/Form.js +1 -1
  144. package/components/Icons/Form.js.map +1 -1
  145. package/components/Icons/Forward.js +1 -1
  146. package/components/Icons/Forward.js.map +1 -1
  147. package/components/Icons/Gallery.js +1 -1
  148. package/components/Icons/Gallery.js.map +1 -1
  149. package/components/Icons/Globe.js +1 -1
  150. package/components/Icons/Globe.js.map +1 -1
  151. package/components/Icons/Group.js +1 -1
  152. package/components/Icons/Group.js.map +1 -1
  153. package/components/Icons/Heart.js +1 -1
  154. package/components/Icons/Heart.js.map +1 -1
  155. package/components/Icons/HelpSign.js +1 -1
  156. package/components/Icons/HelpSign.js.map +1 -1
  157. package/components/Icons/History.js +1 -1
  158. package/components/Icons/History.js.map +1 -1
  159. package/components/Icons/Home.js +1 -1
  160. package/components/Icons/Home.js.map +1 -1
  161. package/components/Icons/Hospital.js +1 -1
  162. package/components/Icons/Hospital.js.map +1 -1
  163. package/components/Icons/Hourglass.js +1 -1
  164. package/components/Icons/Hourglass.js.map +1 -1
  165. package/components/Icons/Icon.js +1 -1
  166. package/components/Icons/Icon.js.map +1 -1
  167. package/components/Icons/InfoSignFill.js +1 -1
  168. package/components/Icons/InfoSignFill.js.map +1 -1
  169. package/components/Icons/InfoSignStroke.js +1 -1
  170. package/components/Icons/InfoSignStroke.js.map +1 -1
  171. package/components/Icons/Journal.js +1 -1
  172. package/components/Icons/Journal.js.map +1 -1
  173. package/components/Icons/List.js +1 -1
  174. package/components/Icons/List.js.map +1 -1
  175. package/components/Icons/Location.js +1 -1
  176. package/components/Icons/Location.js.map +1 -1
  177. package/components/Icons/Lock.js +1 -1
  178. package/components/Icons/Lock.js.map +1 -1
  179. package/components/Icons/Medicine.js +1 -1
  180. package/components/Icons/Medicine.js.map +1 -1
  181. package/components/Icons/Menu.js +1 -1
  182. package/components/Icons/Menu.js.map +1 -1
  183. package/components/Icons/Minus.js +1 -1
  184. package/components/Icons/Minus.js.map +1 -1
  185. package/components/Icons/MobilePhone.js +1 -1
  186. package/components/Icons/MobilePhone.js.map +1 -1
  187. package/components/Icons/NoAccess.js +1 -1
  188. package/components/Icons/NoAccess.js.map +1 -1
  189. package/components/Icons/NoEye.js +1 -1
  190. package/components/Icons/NoEye.js.map +1 -1
  191. package/components/Icons/NoFilter.js +1 -1
  192. package/components/Icons/NoFilter.js.map +1 -1
  193. package/components/Icons/PaperPlane.js +1 -1
  194. package/components/Icons/PaperPlane.js.map +1 -1
  195. package/components/Icons/Pause.js +1 -1
  196. package/components/Icons/Pause.js.map +1 -1
  197. package/components/Icons/Pencil.js +1 -1
  198. package/components/Icons/Pencil.js.map +1 -1
  199. package/components/Icons/PersonalPlan.js +1 -1
  200. package/components/Icons/PersonalPlan.js.map +1 -1
  201. package/components/Icons/Play.js +1 -1
  202. package/components/Icons/Play.js.map +1 -1
  203. package/components/Icons/PlusLarge.js +1 -1
  204. package/components/Icons/PlusLarge.js.map +1 -1
  205. package/components/Icons/PlusSmall.js +1 -1
  206. package/components/Icons/PlusSmall.js.map +1 -1
  207. package/components/Icons/Printer.js +1 -1
  208. package/components/Icons/Printer.js.map +1 -1
  209. package/components/Icons/QrCode.js +1 -1
  210. package/components/Icons/QrCode.js.map +1 -1
  211. package/components/Icons/Receptionist.js +1 -1
  212. package/components/Icons/Receptionist.js.map +1 -1
  213. package/components/Icons/Referral.js +1 -1
  214. package/components/Icons/Referral.js.map +1 -1
  215. package/components/Icons/Refresh.js +1 -1
  216. package/components/Icons/Refresh.js.map +1 -1
  217. package/components/Icons/Reply.js +1 -1
  218. package/components/Icons/Reply.js.map +1 -1
  219. package/components/Icons/Save.js +1 -1
  220. package/components/Icons/Save.js.map +1 -1
  221. package/components/Icons/Search.js +1 -1
  222. package/components/Icons/Search.js.map +1 -1
  223. package/components/Icons/SectionSign.js +1 -1
  224. package/components/Icons/SectionSign.js.map +1 -1
  225. package/components/Icons/Settings.js +1 -1
  226. package/components/Icons/Settings.js.map +1 -1
  227. package/components/Icons/Share.js +1 -1
  228. package/components/Icons/Share.js.map +1 -1
  229. package/components/Icons/SpeechBubble.js +1 -1
  230. package/components/Icons/SpeechBubble.js.map +1 -1
  231. package/components/Icons/Stopwatch.js +1 -1
  232. package/components/Icons/Stopwatch.js.map +1 -1
  233. package/components/Icons/SupportingPerson.js +1 -1
  234. package/components/Icons/SupportingPerson.js.map +1 -1
  235. package/components/Icons/Syringe.js +1 -1
  236. package/components/Icons/Syringe.js.map +1 -1
  237. package/components/Icons/TimePassing.js +1 -1
  238. package/components/Icons/TimePassing.js.map +1 -1
  239. package/components/Icons/Toolbox.js +1 -1
  240. package/components/Icons/Toolbox.js.map +1 -1
  241. package/components/Icons/TrashCan.js +1 -1
  242. package/components/Icons/TrashCan.js.map +1 -1
  243. package/components/Icons/Undo.js +1 -1
  244. package/components/Icons/Undo.js.map +1 -1
  245. package/components/Icons/Upload.js +1 -1
  246. package/components/Icons/Upload.js.map +1 -1
  247. package/components/Icons/Vaccine.js +1 -1
  248. package/components/Icons/Vaccine.js.map +1 -1
  249. package/components/Icons/VerticalDots.js +1 -1
  250. package/components/Icons/VerticalDots.js.map +1 -1
  251. package/components/Icons/VideoCamera.js +1 -1
  252. package/components/Icons/VideoCamera.js.map +1 -1
  253. package/components/Icons/VideoChat.js +1 -1
  254. package/components/Icons/VideoChat.js.map +1 -1
  255. package/components/Icons/Wallet.js +1 -1
  256. package/components/Icons/Wallet.js.map +1 -1
  257. package/components/Icons/Watch.js +1 -1
  258. package/components/Icons/Watch.js.map +1 -1
  259. package/components/Icons/X.js +1 -1
  260. package/components/Icons/X.js.map +1 -1
  261. package/components/Icons/Zoom.js +1 -1
  262. package/components/Icons/Zoom.js.map +1 -1
  263. package/components/Icons/index.js +1 -1
  264. package/components/Input/Input.d.ts +0 -1
  265. package/components/Input/Input.d.ts.map +1 -1
  266. package/components/Input/index.js +1 -1
  267. package/components/LinkList/index.js +1 -1
  268. package/components/LinkList/index.js.map +1 -1
  269. package/components/Loader/index.js +1 -1
  270. package/components/Loader/index.js.map +1 -1
  271. package/components/Modal/index.js +1 -1
  272. package/components/NotificationPanel/index.js +1 -1
  273. package/components/NotificationPanel/index.js.map +1 -1
  274. package/components/Panel/index.js +1 -1
  275. package/components/PanelList/index.js +1 -1
  276. package/components/PanelList/index.js.map +1 -1
  277. package/components/Progressbar/index.js +1 -1
  278. package/components/Progressbar/index.js.map +1 -1
  279. package/components/RadioButton/RadioButton.d.ts.map +1 -1
  280. package/components/RadioButton/index.js +1 -1
  281. package/components/Select/Select.d.ts +30 -0
  282. package/components/Select/Select.d.ts.map +1 -0
  283. package/components/Select/componentdata.json +1 -0
  284. package/components/Select/index.d.ts +4 -0
  285. package/components/Select/index.d.ts.map +1 -0
  286. package/components/Select/index.js +2 -0
  287. package/components/Select/index.js.map +1 -0
  288. package/components/Select/styles.module.scss +125 -0
  289. package/components/Select/styles.module.scss.d.ts +21 -0
  290. package/components/Slider/index.js +1 -1
  291. package/components/Slider/index.js.map +1 -1
  292. package/components/StatusDot/index.js +1 -1
  293. package/components/StatusDot/index.js.map +1 -1
  294. package/components/Table/TableExpandedRow/index.js +1 -1
  295. package/components/Table/TableExpanderCell/index.js +1 -1
  296. package/components/Table/TableHeadCell/index.js +1 -1
  297. package/components/Table/TableRow/index.js +1 -1
  298. package/components/Table/index.js +1 -1
  299. package/components/Table/index.js.map +1 -1
  300. package/components/Tag/index.js +1 -1
  301. package/components/Tag/index.js.map +1 -1
  302. package/components/Textarea/Textarea.d.ts +1 -1
  303. package/components/Textarea/Textarea.d.ts.map +1 -1
  304. package/components/Textarea/componentdata.json +1 -1
  305. package/components/Textarea/index.js +1 -1
  306. package/components/Tile/index.js +1 -1
  307. package/components/Tile/index.js.map +1 -1
  308. package/components/Tooltip/Tooltip.d.ts +11 -12
  309. package/components/Tooltip/Tooltip.d.ts.map +1 -1
  310. package/components/Tooltip/TooltipWord/TooltipWord.d.ts +20 -0
  311. package/components/Tooltip/TooltipWord/TooltipWord.d.ts.map +1 -0
  312. package/components/Tooltip/TooltipWord/componentdata.json +1 -0
  313. package/components/Tooltip/TooltipWord/index.d.ts +4 -0
  314. package/components/Tooltip/TooltipWord/index.d.ts.map +1 -0
  315. package/components/Tooltip/TooltipWord/index.js +2 -0
  316. package/components/Tooltip/TooltipWord/index.js.map +1 -0
  317. package/components/Tooltip/{styles.module.scss → TooltipWord/styles.module.scss} +3 -6
  318. package/components/Tooltip/{styles.module.scss.d.ts → TooltipWord/styles.module.scss.d.ts} +0 -0
  319. package/components/Tooltip/componentdata.json +1 -1
  320. package/components/Tooltip/index.js +1 -1
  321. package/components/TooltipExample/TooltipExample.d.ts.map +1 -1
  322. package/components/TooltipExample/componentdata.json +1 -1
  323. package/components/TooltipExample/index.js +1 -1
  324. package/components/TooltipExample/index.js.map +1 -1
  325. package/components/Validation/index.js +1 -1
  326. package/constants.d.ts +2 -0
  327. package/constants.d.ts.map +1 -1
  328. package/constants.js +1 -1
  329. package/constants.js.map +1 -1
  330. package/hooks/useDelayedState.d.ts +9 -0
  331. package/hooks/useDelayedState.d.ts.map +1 -0
  332. package/hooks/useDelayedState.js +2 -0
  333. package/hooks/useDelayedState.js.map +1 -0
  334. package/hooks/useElementList.d.ts +9 -0
  335. package/hooks/useElementList.d.ts.map +1 -0
  336. package/hooks/useElementList.js +2 -0
  337. package/hooks/useElementList.js.map +1 -0
  338. package/hooks/useFocusToggle.d.ts.map +1 -1
  339. package/hooks/useFocusToggle.js +1 -1
  340. package/hooks/useFocusToggle.js.map +1 -1
  341. package/hooks/useFocusTrap.js +1 -1
  342. package/hooks/useFocusTrap.js.map +1 -1
  343. package/hooks/useFocusableElements.d.ts.map +1 -1
  344. package/hooks/useFocusableElements.js +1 -1
  345. package/hooks/useFocusableElements.js.map +1 -1
  346. package/hooks/useHover.d.ts +5 -6
  347. package/hooks/useHover.d.ts.map +1 -1
  348. package/hooks/useHover.js +1 -1
  349. package/hooks/useHover.js.map +1 -1
  350. package/hooks/useKeyboardEvent.d.ts +10 -1
  351. package/hooks/useKeyboardEvent.d.ts.map +1 -1
  352. package/hooks/useKeyboardEvent.js +1 -1
  353. package/hooks/useKeyboardEvent.js.map +1 -1
  354. package/hooks/useLayoutEvent.js +1 -1
  355. package/hooks/useLayoutEvent.js.map +1 -1
  356. package/hooks/useOutsideEvent.d.ts +1 -4
  357. package/hooks/useOutsideEvent.d.ts.map +1 -1
  358. package/hooks/useOutsideEvent.js +1 -1
  359. package/hooks/useOutsideEvent.js.map +1 -1
  360. package/hooks/useSize.js +1 -1
  361. package/hooks/useSize.js.map +1 -1
  362. package/hooks/useSticky.js +1 -1
  363. package/hooks/useSticky.js.map +1 -1
  364. package/hooks/useUuid.js +1 -1
  365. package/hooks/useUuid.js.map +1 -1
  366. package/index.js +1 -1
  367. package/package.json +1 -1
  368. package/utils/accessibility.js +2 -0
  369. package/utils/accessibility.js.map +1 -0
  370. package/utils/debounce.js +2 -0
  371. package/utils/debounce.js.map +1 -0
  372. package/utils/environment.js +2 -0
  373. package/utils/environment.js.map +1 -0
  374. package/{hooks/focus-utils.d.ts → utils/focus.d.ts} +1 -1
  375. package/utils/focus.d.ts.map +1 -0
  376. package/{hooks/focus-utils.js → utils/focus.js} +1 -1
  377. package/utils/focus.js.map +1 -0
  378. package/utils/loremtext.js +2 -0
  379. package/utils/loremtext.js.map +1 -0
  380. package/utils/refs.js +2 -0
  381. package/utils/refs.js.map +1 -0
  382. package/utils/uuid.js +2 -0
  383. package/utils/uuid.js.map +1 -0
  384. package/utils/viewport.js +2 -0
  385. package/utils/viewport.js.map +1 -0
  386. package/uuid.js +1 -1
  387. package/uuid.js.map +1 -1
  388. package/accessibility.js +0 -2
  389. package/accessibility.js.map +0 -1
  390. package/debounce.js +0 -2
  391. package/debounce.js.map +0 -1
  392. package/hooks/focus-utils.d.ts.map +0 -1
  393. package/hooks/focus-utils.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Wallet.js","sources":["../../../src/components/Icons/Wallet.tsx"],"sourcesContent":["import React from 'react';\nimport { getIcon, SvgPathProps } from './Icon';\n\nconst Wallet: React.FC<SvgPathProps> = ({ size, isHovered }: SvgPathProps): JSX.Element => {\n const normal = (\n <path d=\"M40.413 29.368h-5.24a1.964 1.964 0 01-1.963-1.963c0-1.082.88-1.963 1.963-1.963h5.24v3.926zm-1.334 7.951a.88.88 0 01-.88.88H24.669v-4c0-1.76-3.692-2.23-5.873-2.23s-5.873.47-5.873 2.23v4H9.836a.88.88 0 01-.88-.88V15.501c.364.202.776.328 1.22.328H38.2a.88.88 0 01.879.88v7.433h-3.906a3.266 3.266 0 00-3.263 3.263 3.266 3.266 0 003.263 3.263h3.906v6.651zM14.25 34.2c.287-.314 1.802-.93 4.544-.93 2.742 0 4.257.616 4.544.93-.286.311-1.801.927-4.544.927-2.743 0-4.257-.616-4.544-.928zm4.544 2.227c1.358 0 3.302-.183 4.576-.745l.002 1.277c-.453.363-2.03.907-4.578.907-2.541 0-4.114-.54-4.573-.902v-1.28c1.274.56 3.215.743 4.573.743zm0 3.99c-2.908 0-4.435-.692-4.573-.928V38.1c1.116.52 2.882.765 4.573.765 1.694 0 3.465-.247 4.58-.768l.003 1.338c-.148.29-1.675.981-4.583.981zM29.788 6.774l3.533 6.036H19.477l10.31-6.036zm10.59 17.368v-7.434A2.18 2.18 0 0038.2 14.53H10.176a1.22 1.22 0 010-2.439h7.956l-1.124.658.036.061h-6.008v1h6.593l.036.061.104-.06H36.81v-1h-1.983l-4.575-7.816-9.901 5.796H10.176a2.522 2.522 0 00-2.52 2.52v24.008c0 1.201.979 2.178 2.18 2.178h3.087c.014 1.751 3.695 2.22 5.872 2.22s5.858-.469 5.872-2.22H38.2a2.18 2.18 0 002.178-2.178v-6.65h1.335v-6.527h-1.335z\" />\n );\n\n const normalHover = (\n <path d=\"M40.413 29.368h-5.24a1.965 1.965 0 01-1.964-1.963c0-1.082.881-1.963 1.963-1.963h5.24v3.926zm-1.334 7.951a.88.88 0 01-.88.88H24.669v-4c0-1.76-3.692-2.23-5.873-2.23-2.182 0-5.874.47-5.874 2.23v4H9.837a.88.88 0 01-.88-.88V15.501c.364.202.776.328 1.22.328h28.023a.88.88 0 01.88.88v7.433h-3.907a3.267 3.267 0 00-3.262 3.263 3.267 3.267 0 003.262 3.263h3.907v6.651zM14.25 34.2c.287-.314 1.801-.93 4.543-.93 2.744 0 4.258.616 4.544.93-.286.311-1.8.927-4.544.927-2.742 0-4.257-.616-4.543-.928zm4.543 2.227c1.36 0 3.302-.183 4.576-.745l.002 1.277c-.453.363-2.029.907-4.578.907-2.54 0-4.114-.54-4.572-.902v-1.28c1.274.56 3.214.743 4.572.743zm0 3.99c-2.907 0-4.434-.692-4.572-.928V38.1c1.116.52 2.883.765 4.572.765 1.694 0 3.465-.247 4.58-.768l.004 1.338c-.148.29-1.675.981-4.584.981zM29.788 4.524l4.85 8.286H15.634l14.155-8.286zm10.59 19.618v-7.434A2.181 2.181 0 0038.2 14.53H10.175a1.22 1.22 0 010-2.439h4.113l-1.124.658.036.061h-2.164v1h2.75l.034.061.105-.06h21.3l.018.033.058-.034h1.51v-1h-.666L30.252 2.745 16.51 10.791h-6.334a2.522 2.522 0 00-2.519 2.52v24.008c0 1.201.978 2.178 2.18 2.178h3.088c.013 1.751 3.694 2.22 5.87 2.22 2.178 0 5.858-.469 5.872-2.22H38.2a2.181 2.181 0 002.178-2.178v-6.65h1.334v-6.527h-1.334z\" />\n );\n\n const xSmall = (\n <path d=\"M40.3 29.255h-5.26c-1.092 0-1.98-.89-1.98-1.982 0-1.091.888-1.98 1.98-1.98h5.26v3.962zm-1.335 7.932a.899.899 0 01-.898.897h-13.55v-4.018c0-1.744-3.68-2.21-5.853-2.21-2.175 0-5.855.466-5.855 2.21v4.018H9.704a.898.898 0 01-.897-.897V15.34c.367.21.785.34 1.237.34h28.023a.9.9 0 01.898.898v7.452h-3.924a3.247 3.247 0 00-3.244 3.244 3.248 3.248 0 003.244 3.245h3.924v6.67zm-24.893-3.07v-.015c.162-.296 1.68-.983 4.592-.983 2.794 0 4.308.634 4.569.947-.26.312-1.775.946-4.57.946-2.91 0-4.43-.686-4.59-.895zm4.592 2.158c1.365 0 3.323-.183 4.593-.752v1.284c-.43.362-2.024.921-4.593.921-2.564 0-4.157-.557-4.592-.916v-1.288c1.268.568 3.226.751 4.592.751zm0 4.029c-2.937 0-4.46-.7-4.592-.946v-1.394c1.116.525 2.89.775 4.592.775 1.703 0 3.481-.25 4.596-.777l.002 1.35c-.14.292-1.664.992-4.598.992zm-8.62-28.363h9.71l-4.227 2.474h-5.483a1.238 1.238 0 010-2.474zm19.62-4.337l3.986 6.811H18.027l11.636-6.81zM40.227 24.03v-7.452c0-1.192-.97-2.162-2.16-2.162h-2.954l-5-8.539-8.256 4.833v-.031H10.044a2.504 2.504 0 00-2.5 2.5v24.01c0 1.19.97 2.16 2.16 2.16h3.105v.01c0 1.743 3.68 2.209 5.855 2.209 2.174 0 5.853-.466 5.853-2.21v-.01h13.55a2.163 2.163 0 002.161-2.16v-6.669h1.334v-6.489h-1.334z\" />\n );\n\n const xSmallHover = (\n <path d=\"M40.3 29.255h-5.26c-1.092 0-1.98-.89-1.98-1.982 0-1.091.888-1.98 1.98-1.98h5.26v3.962zm-1.336 7.932a.898.898 0 01-.897.897h-13.55v-4.018c0-1.744-3.68-2.21-5.854-2.21s-5.854.466-5.854 2.21v4.018H9.704a.899.899 0 01-.898-.897V15.34c.367.21.786.34 1.238.34h28.023c.496 0 .897.402.897.898v7.452h-3.923a3.247 3.247 0 00-3.244 3.244 3.247 3.247 0 003.244 3.245h3.923v6.67zm-24.892-3.07v-.015c.162-.296 1.68-.983 4.59-.983 2.795 0 4.31.634 4.57.947-.26.312-1.775.946-4.57.946-2.91 0-4.428-.686-4.59-.895zm4.59 2.158c1.368 0 3.325-.183 4.595-.752l.001 1.284c-.43.362-2.025.921-4.595.921-2.564 0-4.156-.557-4.59-.916v-1.288c1.268.568 3.226.751 4.59.751zm0 4.029c-2.935 0-4.457-.7-4.59-.946v-1.394c1.116.525 2.89.775 4.59.775 1.704 0 3.482-.25 4.599-.777v1.35c-.14.292-1.663.992-4.598.992zM10.045 11.94h5.866L11.7 14.408l.005.007h-1.66a1.239 1.239 0 01-1.238-1.236 1.24 1.24 0 011.238-1.238zm19.618-6.586l5.306 9.06H14.184l15.478-9.06zm10.565 18.674v-7.452a2.163 2.163 0 00-2.16-2.162H36.43l-6.315-10.79-12.047 7.053h-8.024a2.505 2.505 0 00-2.5 2.5v24.01c0 1.19.968 2.16 2.16 2.16h3.105v.01c0 1.743 3.68 2.209 5.854 2.209 2.175 0 5.855-.466 5.855-2.21v-.01h13.55c1.19 0 2.16-.968 2.16-2.16v-6.669h1.335v-6.489h-1.336z\" />\n );\n\n return getIcon(size, isHovered, normal, normalHover, xSmall, xSmallHover);\n};\n\nexport default Wallet;\n"],"names":["Wallet","size","isHovered","getIcon","React"],"mappings":"4JAGA,MAAMA,EAAiC,CAAC,CAAE,KAAAC,EAAM,UAAAC,KAiBvCC,EAAQF,EAAMC,EAflBE,EAAA,cAAA,OAAA,CAAK,EAAE,upCAAA,CAAwpC,EAI/pCA,EAAA,cAAA,OAAA,CAAK,EAAE,8rCAAA,CAA+rC,EAItsCA,EAAA,cAAA,OAAA,CAAK,EAAE,0pCAAA,CAA2pC,EAIlqCA,EAAA,cAAA,OAAA,CAAK,EAAE,yrCAAA,CAA0rC,CAG5nC"}
1
+ {"version":3,"file":"Wallet.js","sources":["../../../src/components/Icons/Wallet.tsx"],"sourcesContent":["import React from 'react';\nimport { getIcon, SvgPathProps } from './Icon';\n\nconst Wallet: React.FC<SvgPathProps> = ({ size, isHovered }: SvgPathProps): JSX.Element => {\n const normal = (\n <path d=\"M40.413 29.368h-5.24a1.964 1.964 0 01-1.963-1.963c0-1.082.88-1.963 1.963-1.963h5.24v3.926zm-1.334 7.951a.88.88 0 01-.88.88H24.669v-4c0-1.76-3.692-2.23-5.873-2.23s-5.873.47-5.873 2.23v4H9.836a.88.88 0 01-.88-.88V15.501c.364.202.776.328 1.22.328H38.2a.88.88 0 01.879.88v7.433h-3.906a3.266 3.266 0 00-3.263 3.263 3.266 3.266 0 003.263 3.263h3.906v6.651zM14.25 34.2c.287-.314 1.802-.93 4.544-.93 2.742 0 4.257.616 4.544.93-.286.311-1.801.927-4.544.927-2.743 0-4.257-.616-4.544-.928zm4.544 2.227c1.358 0 3.302-.183 4.576-.745l.002 1.277c-.453.363-2.03.907-4.578.907-2.541 0-4.114-.54-4.573-.902v-1.28c1.274.56 3.215.743 4.573.743zm0 3.99c-2.908 0-4.435-.692-4.573-.928V38.1c1.116.52 2.882.765 4.573.765 1.694 0 3.465-.247 4.58-.768l.003 1.338c-.148.29-1.675.981-4.583.981zM29.788 6.774l3.533 6.036H19.477l10.31-6.036zm10.59 17.368v-7.434A2.18 2.18 0 0038.2 14.53H10.176a1.22 1.22 0 010-2.439h7.956l-1.124.658.036.061h-6.008v1h6.593l.036.061.104-.06H36.81v-1h-1.983l-4.575-7.816-9.901 5.796H10.176a2.522 2.522 0 00-2.52 2.52v24.008c0 1.201.979 2.178 2.18 2.178h3.087c.014 1.751 3.695 2.22 5.872 2.22s5.858-.469 5.872-2.22H38.2a2.18 2.18 0 002.178-2.178v-6.65h1.335v-6.527h-1.335z\" />\n );\n\n const normalHover = (\n <path d=\"M40.413 29.368h-5.24a1.965 1.965 0 01-1.964-1.963c0-1.082.881-1.963 1.963-1.963h5.24v3.926zm-1.334 7.951a.88.88 0 01-.88.88H24.669v-4c0-1.76-3.692-2.23-5.873-2.23-2.182 0-5.874.47-5.874 2.23v4H9.837a.88.88 0 01-.88-.88V15.501c.364.202.776.328 1.22.328h28.023a.88.88 0 01.88.88v7.433h-3.907a3.267 3.267 0 00-3.262 3.263 3.267 3.267 0 003.262 3.263h3.907v6.651zM14.25 34.2c.287-.314 1.801-.93 4.543-.93 2.744 0 4.258.616 4.544.93-.286.311-1.8.927-4.544.927-2.742 0-4.257-.616-4.543-.928zm4.543 2.227c1.36 0 3.302-.183 4.576-.745l.002 1.277c-.453.363-2.029.907-4.578.907-2.54 0-4.114-.54-4.572-.902v-1.28c1.274.56 3.214.743 4.572.743zm0 3.99c-2.907 0-4.434-.692-4.572-.928V38.1c1.116.52 2.883.765 4.572.765 1.694 0 3.465-.247 4.58-.768l.004 1.338c-.148.29-1.675.981-4.584.981zM29.788 4.524l4.85 8.286H15.634l14.155-8.286zm10.59 19.618v-7.434A2.181 2.181 0 0038.2 14.53H10.175a1.22 1.22 0 010-2.439h4.113l-1.124.658.036.061h-2.164v1h2.75l.034.061.105-.06h21.3l.018.033.058-.034h1.51v-1h-.666L30.252 2.745 16.51 10.791h-6.334a2.522 2.522 0 00-2.519 2.52v24.008c0 1.201.978 2.178 2.18 2.178h3.088c.013 1.751 3.694 2.22 5.87 2.22 2.178 0 5.858-.469 5.872-2.22H38.2a2.181 2.181 0 002.178-2.178v-6.65h1.334v-6.527h-1.334z\" />\n );\n\n const xSmall = (\n <path d=\"M40.3 29.255h-5.26c-1.092 0-1.98-.89-1.98-1.982 0-1.091.888-1.98 1.98-1.98h5.26v3.962zm-1.335 7.932a.899.899 0 01-.898.897h-13.55v-4.018c0-1.744-3.68-2.21-5.853-2.21-2.175 0-5.855.466-5.855 2.21v4.018H9.704a.898.898 0 01-.897-.897V15.34c.367.21.785.34 1.237.34h28.023a.9.9 0 01.898.898v7.452h-3.924a3.247 3.247 0 00-3.244 3.244 3.248 3.248 0 003.244 3.245h3.924v6.67zm-24.893-3.07v-.015c.162-.296 1.68-.983 4.592-.983 2.794 0 4.308.634 4.569.947-.26.312-1.775.946-4.57.946-2.91 0-4.43-.686-4.59-.895zm4.592 2.158c1.365 0 3.323-.183 4.593-.752v1.284c-.43.362-2.024.921-4.593.921-2.564 0-4.157-.557-4.592-.916v-1.288c1.268.568 3.226.751 4.592.751zm0 4.029c-2.937 0-4.46-.7-4.592-.946v-1.394c1.116.525 2.89.775 4.592.775 1.703 0 3.481-.25 4.596-.777l.002 1.35c-.14.292-1.664.992-4.598.992zm-8.62-28.363h9.71l-4.227 2.474h-5.483a1.238 1.238 0 010-2.474zm19.62-4.337l3.986 6.811H18.027l11.636-6.81zM40.227 24.03v-7.452c0-1.192-.97-2.162-2.16-2.162h-2.954l-5-8.539-8.256 4.833v-.031H10.044a2.504 2.504 0 00-2.5 2.5v24.01c0 1.19.97 2.16 2.16 2.16h3.105v.01c0 1.743 3.68 2.209 5.855 2.209 2.174 0 5.853-.466 5.853-2.21v-.01h13.55a2.163 2.163 0 002.161-2.16v-6.669h1.334v-6.489h-1.334z\" />\n );\n\n const xSmallHover = (\n <path d=\"M40.3 29.255h-5.26c-1.092 0-1.98-.89-1.98-1.982 0-1.091.888-1.98 1.98-1.98h5.26v3.962zm-1.336 7.932a.898.898 0 01-.897.897h-13.55v-4.018c0-1.744-3.68-2.21-5.854-2.21s-5.854.466-5.854 2.21v4.018H9.704a.899.899 0 01-.898-.897V15.34c.367.21.786.34 1.238.34h28.023c.496 0 .897.402.897.898v7.452h-3.923a3.247 3.247 0 00-3.244 3.244 3.247 3.247 0 003.244 3.245h3.923v6.67zm-24.892-3.07v-.015c.162-.296 1.68-.983 4.59-.983 2.795 0 4.31.634 4.57.947-.26.312-1.775.946-4.57.946-2.91 0-4.428-.686-4.59-.895zm4.59 2.158c1.368 0 3.325-.183 4.595-.752l.001 1.284c-.43.362-2.025.921-4.595.921-2.564 0-4.156-.557-4.59-.916v-1.288c1.268.568 3.226.751 4.59.751zm0 4.029c-2.935 0-4.457-.7-4.59-.946v-1.394c1.116.525 2.89.775 4.59.775 1.704 0 3.482-.25 4.599-.777v1.35c-.14.292-1.663.992-4.598.992zM10.045 11.94h5.866L11.7 14.408l.005.007h-1.66a1.239 1.239 0 01-1.238-1.236 1.24 1.24 0 011.238-1.238zm19.618-6.586l5.306 9.06H14.184l15.478-9.06zm10.565 18.674v-7.452a2.163 2.163 0 00-2.16-2.162H36.43l-6.315-10.79-12.047 7.053h-8.024a2.505 2.505 0 00-2.5 2.5v24.01c0 1.19.968 2.16 2.16 2.16h3.105v.01c0 1.743 3.68 2.209 5.854 2.209 2.175 0 5.855-.466 5.855-2.21v-.01h13.55c1.19 0 2.16-.968 2.16-2.16v-6.669h1.335v-6.489h-1.336z\" />\n );\n\n return getIcon(size, isHovered, normal, normalHover, xSmall, xSmallHover);\n};\n\nexport default Wallet;\n"],"names":["Wallet","size","isHovered","getIcon","React"],"mappings":"+LAGA,MAAMA,EAAiC,CAAC,CAAE,KAAAC,EAAM,UAAAC,KAiBvCC,EAAQF,EAAMC,EAflBE,EAAA,cAAA,OAAA,CAAK,EAAE,upCAAA,CAAwpC,EAI/pCA,EAAA,cAAA,OAAA,CAAK,EAAE,8rCAAA,CAA+rC,EAItsCA,EAAA,cAAA,OAAA,CAAK,EAAE,0pCAAA,CAA2pC,EAIlqCA,EAAA,cAAA,OAAA,CAAK,EAAE,yrCAAA,CAA0rC,CAG5nC"}
@@ -1,2 +1,2 @@
1
- import e from"react";import{getIcon as o}from"./Icon.js";import"classnames";import"../../constants.js";import"../../hooks/useUuid.js";import"../../uuid.js";const i=({size:l,isHovered:t})=>o(l,t,e.createElement("path",{fillRule:"evenodd",d:"M36.763 24c0-7.037-5.725-12.763-12.762-12.763-7.039 0-12.764 5.726-12.764 12.763S16.962 36.762 24 36.762 36.764 31.037 36.764 24zm1.4 0c0 7.809-6.353 14.162-14.162 14.162-7.81 0-14.164-6.353-14.164-14.162 0-7.81 6.354-14.163 14.163-14.163 7.81 0 14.163 6.353 14.163 14.163zM24.5 23.5h4.584v1H23.5v-7.126h1V23.5z"}),e.createElement("path",{fillRule:"evenodd",d:"M36.763 24c0-7.037-5.725-12.763-12.762-12.763-7.039 0-12.764 5.726-12.764 12.763S16.962 36.762 24 36.762 36.764 31.037 36.764 24zm1.4 0c0 7.809-6.353 14.162-14.162 14.162-7.81 0-14.164-6.353-14.164-14.162 0-7.81 6.354-14.163 14.163-14.163 7.81 0 14.163 6.353 14.163 14.163zM24.5 23.793l3.448 3.449-.707.707-3.742-3.742v-6.833h1v6.419z"}),e.createElement("path",{fillRule:"evenodd",d:"M24 36.577c-6.936 0-12.579-5.642-12.579-12.577 0-6.936 5.643-12.579 12.579-12.579 6.936 0 12.579 5.643 12.579 12.579 0 6.935-5.643 12.577-12.579 12.577zm0-26.924C16.089 9.653 9.653 16.09 9.653 24S16.09 38.346 24 38.346 38.347 31.91 38.347 24c0-7.911-6.436-14.347-14.347-14.347zm.632 7.722h-1.264v7.257h5.717v-1.264h-4.453v-5.993z"}),e.createElement("path",{fillRule:"evenodd",d:"M36.578 24c0-6.936-5.643-12.579-12.579-12.579-6.934 0-12.577 5.643-12.577 12.579 0 6.935 5.643 12.577 12.577 12.577 6.936 0 12.579-5.642 12.579-12.577zm1.768 0c0 7.911-6.435 14.346-14.347 14.346-7.91 0-14.345-6.435-14.345-14.346 0-7.911 6.435-14.347 14.345-14.347 7.912 0 14.347 6.436 14.347 14.347zm-13.715-.261l3.412 3.41-.893.893-3.782-3.78v-6.887h1.263v6.364z"}));export{i as default};
1
+ import e from"react";import{getIcon as o}from"./Icon.js";import"classnames";import"../../constants.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";const f=({size:l,isHovered:t})=>o(l,t,e.createElement("path",{fillRule:"evenodd",d:"M36.763 24c0-7.037-5.725-12.763-12.762-12.763-7.039 0-12.764 5.726-12.764 12.763S16.962 36.762 24 36.762 36.764 31.037 36.764 24zm1.4 0c0 7.809-6.353 14.162-14.162 14.162-7.81 0-14.164-6.353-14.164-14.162 0-7.81 6.354-14.163 14.163-14.163 7.81 0 14.163 6.353 14.163 14.163zM24.5 23.5h4.584v1H23.5v-7.126h1V23.5z"}),e.createElement("path",{fillRule:"evenodd",d:"M36.763 24c0-7.037-5.725-12.763-12.762-12.763-7.039 0-12.764 5.726-12.764 12.763S16.962 36.762 24 36.762 36.764 31.037 36.764 24zm1.4 0c0 7.809-6.353 14.162-14.162 14.162-7.81 0-14.164-6.353-14.164-14.162 0-7.81 6.354-14.163 14.163-14.163 7.81 0 14.163 6.353 14.163 14.163zM24.5 23.793l3.448 3.449-.707.707-3.742-3.742v-6.833h1v6.419z"}),e.createElement("path",{fillRule:"evenodd",d:"M24 36.577c-6.936 0-12.579-5.642-12.579-12.577 0-6.936 5.643-12.579 12.579-12.579 6.936 0 12.579 5.643 12.579 12.579 0 6.935-5.643 12.577-12.579 12.577zm0-26.924C16.089 9.653 9.653 16.09 9.653 24S16.09 38.346 24 38.346 38.347 31.91 38.347 24c0-7.911-6.436-14.347-14.347-14.347zm.632 7.722h-1.264v7.257h5.717v-1.264h-4.453v-5.993z"}),e.createElement("path",{fillRule:"evenodd",d:"M36.578 24c0-6.936-5.643-12.579-12.579-12.579-6.934 0-12.577 5.643-12.577 12.579 0 6.935 5.643 12.577 12.577 12.577 6.936 0 12.579-5.642 12.579-12.577zm1.768 0c0 7.911-6.435 14.346-14.347 14.346-7.91 0-14.345-6.435-14.345-14.346 0-7.911 6.435-14.347 14.345-14.347 7.912 0 14.347 6.436 14.347 14.347zm-13.715-.261l3.412 3.41-.893.893-3.782-3.78v-6.887h1.263v6.364z"}));export{f as default};
2
2
  //# sourceMappingURL=Watch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Watch.js","sources":["../../../src/components/Icons/Watch.tsx"],"sourcesContent":["import React from 'react';\nimport { getIcon, SvgPathProps } from './Icon';\n\nconst Watch: React.FC<SvgPathProps> = ({ size, isHovered }: SvgPathProps): JSX.Element => {\n const normal = (\n <path\n fillRule={'evenodd'}\n d=\"M36.763 24c0-7.037-5.725-12.763-12.762-12.763-7.039 0-12.764 5.726-12.764 12.763S16.962 36.762 24 36.762 36.764 31.037 36.764 24zm1.4 0c0 7.809-6.353 14.162-14.162 14.162-7.81 0-14.164-6.353-14.164-14.162 0-7.81 6.354-14.163 14.163-14.163 7.81 0 14.163 6.353 14.163 14.163zM24.5 23.5h4.584v1H23.5v-7.126h1V23.5z\"\n />\n );\n\n const normalHover = (\n <path\n fillRule={'evenodd'}\n d=\"M36.763 24c0-7.037-5.725-12.763-12.762-12.763-7.039 0-12.764 5.726-12.764 12.763S16.962 36.762 24 36.762 36.764 31.037 36.764 24zm1.4 0c0 7.809-6.353 14.162-14.162 14.162-7.81 0-14.164-6.353-14.164-14.162 0-7.81 6.354-14.163 14.163-14.163 7.81 0 14.163 6.353 14.163 14.163zM24.5 23.793l3.448 3.449-.707.707-3.742-3.742v-6.833h1v6.419z\"\n />\n );\n\n const xSmall = (\n <path\n fillRule={'evenodd'}\n d=\"M24 36.577c-6.936 0-12.579-5.642-12.579-12.577 0-6.936 5.643-12.579 12.579-12.579 6.936 0 12.579 5.643 12.579 12.579 0 6.935-5.643 12.577-12.579 12.577zm0-26.924C16.089 9.653 9.653 16.09 9.653 24S16.09 38.346 24 38.346 38.347 31.91 38.347 24c0-7.911-6.436-14.347-14.347-14.347zm.632 7.722h-1.264v7.257h5.717v-1.264h-4.453v-5.993z\"\n />\n );\n\n const xSmallHover = (\n <path\n fillRule={'evenodd'}\n d=\"M36.578 24c0-6.936-5.643-12.579-12.579-12.579-6.934 0-12.577 5.643-12.577 12.579 0 6.935 5.643 12.577 12.577 12.577 6.936 0 12.579-5.642 12.579-12.577zm1.768 0c0 7.911-6.435 14.346-14.347 14.346-7.91 0-14.345-6.435-14.345-14.346 0-7.911 6.435-14.347 14.345-14.347 7.912 0 14.347 6.436 14.347 14.347zm-13.715-.261l3.412 3.41-.893.893-3.782-3.78v-6.887h1.263v6.364z\"\n />\n );\n\n return getIcon(size, isHovered, normal, normalHover, xSmall, xSmallHover);\n};\n\nexport default Watch;\n"],"names":["Watch","size","isHovered","getIcon","React"],"mappings":"4JAGA,MAAMA,EAAgC,CAAC,CAAE,KAAAC,EAAM,UAAAC,KA6BtCC,EAAQF,EAAMC,EA3BlBE,EAAA,cAAA,OAAA,CACC,SAAU,UACV,EAAE,yTAAA,CACJ,EAICA,EAAA,cAAA,OAAA,CACC,SAAU,UACV,EAAE,gVAAA,CACJ,EAICA,EAAA,cAAA,OAAA,CACC,SAAU,UACV,EAAE,2UAAA,CACJ,EAICA,EAAA,cAAA,OAAA,CACC,SAAU,UACV,EAAE,6WAAA,CACJ,CAGsE"}
1
+ {"version":3,"file":"Watch.js","sources":["../../../src/components/Icons/Watch.tsx"],"sourcesContent":["import React from 'react';\nimport { getIcon, SvgPathProps } from './Icon';\n\nconst Watch: React.FC<SvgPathProps> = ({ size, isHovered }: SvgPathProps): JSX.Element => {\n const normal = (\n <path\n fillRule={'evenodd'}\n d=\"M36.763 24c0-7.037-5.725-12.763-12.762-12.763-7.039 0-12.764 5.726-12.764 12.763S16.962 36.762 24 36.762 36.764 31.037 36.764 24zm1.4 0c0 7.809-6.353 14.162-14.162 14.162-7.81 0-14.164-6.353-14.164-14.162 0-7.81 6.354-14.163 14.163-14.163 7.81 0 14.163 6.353 14.163 14.163zM24.5 23.5h4.584v1H23.5v-7.126h1V23.5z\"\n />\n );\n\n const normalHover = (\n <path\n fillRule={'evenodd'}\n d=\"M36.763 24c0-7.037-5.725-12.763-12.762-12.763-7.039 0-12.764 5.726-12.764 12.763S16.962 36.762 24 36.762 36.764 31.037 36.764 24zm1.4 0c0 7.809-6.353 14.162-14.162 14.162-7.81 0-14.164-6.353-14.164-14.162 0-7.81 6.354-14.163 14.163-14.163 7.81 0 14.163 6.353 14.163 14.163zM24.5 23.793l3.448 3.449-.707.707-3.742-3.742v-6.833h1v6.419z\"\n />\n );\n\n const xSmall = (\n <path\n fillRule={'evenodd'}\n d=\"M24 36.577c-6.936 0-12.579-5.642-12.579-12.577 0-6.936 5.643-12.579 12.579-12.579 6.936 0 12.579 5.643 12.579 12.579 0 6.935-5.643 12.577-12.579 12.577zm0-26.924C16.089 9.653 9.653 16.09 9.653 24S16.09 38.346 24 38.346 38.347 31.91 38.347 24c0-7.911-6.436-14.347-14.347-14.347zm.632 7.722h-1.264v7.257h5.717v-1.264h-4.453v-5.993z\"\n />\n );\n\n const xSmallHover = (\n <path\n fillRule={'evenodd'}\n d=\"M36.578 24c0-6.936-5.643-12.579-12.579-12.579-6.934 0-12.577 5.643-12.577 12.579 0 6.935 5.643 12.577 12.577 12.577 6.936 0 12.579-5.642 12.579-12.577zm1.768 0c0 7.911-6.435 14.346-14.347 14.346-7.91 0-14.345-6.435-14.345-14.346 0-7.911 6.435-14.347 14.345-14.347 7.912 0 14.347 6.436 14.347 14.347zm-13.715-.261l3.412 3.41-.893.893-3.782-3.78v-6.887h1.263v6.364z\"\n />\n );\n\n return getIcon(size, isHovered, normal, normalHover, xSmall, xSmallHover);\n};\n\nexport default Watch;\n"],"names":["Watch","size","isHovered","getIcon","React"],"mappings":"+LAGA,MAAMA,EAAgC,CAAC,CAAE,KAAAC,EAAM,UAAAC,KA6BtCC,EAAQF,EAAMC,EA3BlBE,EAAA,cAAA,OAAA,CACC,SAAU,UACV,EAAE,yTAAA,CACJ,EAICA,EAAA,cAAA,OAAA,CACC,SAAU,UACV,EAAE,gVAAA,CACJ,EAICA,EAAA,cAAA,OAAA,CACC,SAAU,UACV,EAAE,2UAAA,CACJ,EAICA,EAAA,cAAA,OAAA,CACC,SAAU,UACV,EAAE,6WAAA,CACJ,CAGsE"}
@@ -1,2 +1,2 @@
1
- import l from"react";import{getIcon as a}from"./Icon.js";import"classnames";import"../../constants.js";import"../../hooks/useUuid.js";import"../../uuid.js";const i=({size:t,isHovered:e})=>a(t,e,l.createElement("path",{d:"M25.403 24l10.259-10.259-1.403-1.403L24 22.597l-10.259-10.26-1.403 1.403L22.597 24 12.338 34.26l1.403 1.403L24 25.403l10.259 10.259 1.403-1.403z"}),l.createElement("path",{d:"M24 22.597L12.327 10.924l-1.403 1.402L22.597 24 10.923 35.674l1.403 1.402L24 25.403l11.674 11.673 1.403-1.402L25.403 24l11.673-11.674-1.403-1.402z"}),l.createElement("path",{d:"M25.773 24l10.432-10.432-1.772-1.773-10.432 10.433-10.433-10.433-1.773 1.772L22.229 24 11.795 34.433l1.773 1.772 10.433-10.433 10.432 10.433 1.772-1.773z"}),l.createElement("path",{d:"M24 22.227L11.781 10.008l-1.772 1.772 12.219 12.219-12.22 12.22 1.772 1.772L24 25.771l12.22 12.22 1.772-1.772-12.22-12.22L37.991 11.78l-1.772-1.772z"}),l.createElement("path",{d:"M36.3746 13.6056 34.3946 11.6256 24.0006 22.0196 13.6066 11.6256 11.6266 13.6056 22.0206 23.9996 11.6266 34.3936 13.6066 36.3736 24.0006 25.9796 34.3946 36.3736 36.3746 34.3936 25.9806 23.9996"}),l.createElement("path",{d:"M39.0362 10.9454 37.0562 8.9654 24.0002 22.0194 10.9442 8.9654 8.9642 10.9454 22.0202 23.9994 8.9642 37.0554 10.9442 39.0354 24.0002 25.9814 37.0562 39.0354 39.0362 37.0554 25.9802 23.9994"}));export{i as default};
1
+ import l from"react";import{getIcon as o}from"./Icon.js";import"classnames";import"../../constants.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";const v=({size:t,isHovered:e})=>o(t,e,l.createElement("path",{d:"M25.403 24l10.259-10.259-1.403-1.403L24 22.597l-10.259-10.26-1.403 1.403L22.597 24 12.338 34.26l1.403 1.403L24 25.403l10.259 10.259 1.403-1.403z"}),l.createElement("path",{d:"M24 22.597L12.327 10.924l-1.403 1.402L22.597 24 10.923 35.674l1.403 1.402L24 25.403l11.674 11.673 1.403-1.402L25.403 24l11.673-11.674-1.403-1.402z"}),l.createElement("path",{d:"M25.773 24l10.432-10.432-1.772-1.773-10.432 10.433-10.433-10.433-1.773 1.772L22.229 24 11.795 34.433l1.773 1.772 10.433-10.433 10.432 10.433 1.772-1.773z"}),l.createElement("path",{d:"M24 22.227L11.781 10.008l-1.772 1.772 12.219 12.219-12.22 12.22 1.772 1.772L24 25.771l12.22 12.22 1.772-1.772-12.22-12.22L37.991 11.78l-1.772-1.772z"}),l.createElement("path",{d:"M36.3746 13.6056 34.3946 11.6256 24.0006 22.0196 13.6066 11.6256 11.6266 13.6056 22.0206 23.9996 11.6266 34.3936 13.6066 36.3736 24.0006 25.9796 34.3946 36.3736 36.3746 34.3936 25.9806 23.9996"}),l.createElement("path",{d:"M39.0362 10.9454 37.0562 8.9654 24.0002 22.0194 10.9442 8.9654 8.9642 10.9454 22.0202 23.9994 8.9642 37.0554 10.9442 39.0354 24.0002 25.9814 37.0562 39.0354 39.0362 37.0554 25.9802 23.9994"}));export{v as default};
2
2
  //# sourceMappingURL=X.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"X.js","sources":["../../../src/components/Icons/X.tsx"],"sourcesContent":["import React from 'react';\nimport { getIcon, SvgPathProps } from './Icon';\n\nconst X: React.FC<SvgPathProps> = ({ size, isHovered }: SvgPathProps): JSX.Element => {\n const normal = (\n <path d=\"M25.403 24l10.259-10.259-1.403-1.403L24 22.597l-10.259-10.26-1.403 1.403L22.597 24 12.338 34.26l1.403 1.403L24 25.403l10.259 10.259 1.403-1.403z\" />\n );\n\n const normalHover = (\n <path d=\"M24 22.597L12.327 10.924l-1.403 1.402L22.597 24 10.923 35.674l1.403 1.402L24 25.403l11.674 11.673 1.403-1.402L25.403 24l11.673-11.674-1.403-1.402z\" />\n );\n\n const xSmall = (\n <path d=\"M25.773 24l10.432-10.432-1.772-1.773-10.432 10.433-10.433-10.433-1.773 1.772L22.229 24 11.795 34.433l1.773 1.772 10.433-10.433 10.432 10.433 1.772-1.773z\" />\n );\n\n const xSmallHover = (\n <path d=\"M24 22.227L11.781 10.008l-1.772 1.772 12.219 12.219-12.22 12.22 1.772 1.772L24 25.771l12.22 12.22 1.772-1.772-12.22-12.22L37.991 11.78l-1.772-1.772z\" />\n );\n\n const xxSmall = (\n <path d=\"M36.3746 13.6056 34.3946 11.6256 24.0006 22.0196 13.6066 11.6256 11.6266 13.6056 22.0206 23.9996 11.6266 34.3936 13.6066 36.3736 24.0006 25.9796 34.3946 36.3736 36.3746 34.3936 25.9806 23.9996\" />\n );\n\n const xxSmallHover = (\n <path d=\"M39.0362 10.9454 37.0562 8.9654 24.0002 22.0194 10.9442 8.9654 8.9642 10.9454 22.0202 23.9994 8.9642 37.0554 10.9442 39.0354 24.0002 25.9814 37.0562 39.0354 39.0362 37.0554 25.9802 23.9994\" />\n );\n\n return getIcon(size, isHovered, normal, normalHover, xSmall, xSmallHover, xxSmall, xxSmallHover);\n};\n\nexport default X;\n"],"names":["X","size","isHovered","getIcon","React"],"mappings":"4JAGA,MAAMA,EAA4B,CAAC,CAAE,KAAAC,EAAM,UAAAC,KAyBlCC,EAAQF,EAAMC,EAvBlBE,EAAA,cAAA,OAAA,CAAK,EAAE,kJAAA,CAAmJ,EAI1JA,EAAA,cAAA,OAAA,CAAK,EAAE,oJAAA,CAAqJ,EAI5JA,EAAA,cAAA,OAAA,CAAK,EAAE,2JAAA,CAA4J,EAInKA,EAAA,cAAA,OAAA,CAAK,EAAE,sJAAA,CAAuJ,EAI9JA,EAAA,cAAA,OAAA,CAAK,EAAE,kMAAA,CAAmM,EAI1MA,EAAA,cAAA,OAAA,CAAK,EAAE,8LAAA,CAA+L,CAG1G"}
1
+ {"version":3,"file":"X.js","sources":["../../../src/components/Icons/X.tsx"],"sourcesContent":["import React from 'react';\nimport { getIcon, SvgPathProps } from './Icon';\n\nconst X: React.FC<SvgPathProps> = ({ size, isHovered }: SvgPathProps): JSX.Element => {\n const normal = (\n <path d=\"M25.403 24l10.259-10.259-1.403-1.403L24 22.597l-10.259-10.26-1.403 1.403L22.597 24 12.338 34.26l1.403 1.403L24 25.403l10.259 10.259 1.403-1.403z\" />\n );\n\n const normalHover = (\n <path d=\"M24 22.597L12.327 10.924l-1.403 1.402L22.597 24 10.923 35.674l1.403 1.402L24 25.403l11.674 11.673 1.403-1.402L25.403 24l11.673-11.674-1.403-1.402z\" />\n );\n\n const xSmall = (\n <path d=\"M25.773 24l10.432-10.432-1.772-1.773-10.432 10.433-10.433-10.433-1.773 1.772L22.229 24 11.795 34.433l1.773 1.772 10.433-10.433 10.432 10.433 1.772-1.773z\" />\n );\n\n const xSmallHover = (\n <path d=\"M24 22.227L11.781 10.008l-1.772 1.772 12.219 12.219-12.22 12.22 1.772 1.772L24 25.771l12.22 12.22 1.772-1.772-12.22-12.22L37.991 11.78l-1.772-1.772z\" />\n );\n\n const xxSmall = (\n <path d=\"M36.3746 13.6056 34.3946 11.6256 24.0006 22.0196 13.6066 11.6256 11.6266 13.6056 22.0206 23.9996 11.6266 34.3936 13.6066 36.3736 24.0006 25.9796 34.3946 36.3736 36.3746 34.3936 25.9806 23.9996\" />\n );\n\n const xxSmallHover = (\n <path d=\"M39.0362 10.9454 37.0562 8.9654 24.0002 22.0194 10.9442 8.9654 8.9642 10.9454 22.0202 23.9994 8.9642 37.0554 10.9442 39.0354 24.0002 25.9814 37.0562 39.0354 39.0362 37.0554 25.9802 23.9994\" />\n );\n\n return getIcon(size, isHovered, normal, normalHover, xSmall, xSmallHover, xxSmall, xxSmallHover);\n};\n\nexport default X;\n"],"names":["X","size","isHovered","getIcon","React"],"mappings":"+LAGA,MAAMA,EAA4B,CAAC,CAAE,KAAAC,EAAM,UAAAC,KAyBlCC,EAAQF,EAAMC,EAvBlBE,EAAA,cAAA,OAAA,CAAK,EAAE,kJAAA,CAAmJ,EAI1JA,EAAA,cAAA,OAAA,CAAK,EAAE,oJAAA,CAAqJ,EAI5JA,EAAA,cAAA,OAAA,CAAK,EAAE,2JAAA,CAA4J,EAInKA,EAAA,cAAA,OAAA,CAAK,EAAE,sJAAA,CAAuJ,EAI9JA,EAAA,cAAA,OAAA,CAAK,EAAE,kMAAA,CAAmM,EAI1MA,EAAA,cAAA,OAAA,CAAK,EAAE,8LAAA,CAA+L,CAG1G"}
@@ -1,2 +1,2 @@
1
- import l from"react";import{getIcon as c}from"./Icon.js";import"classnames";import"../../constants.js";import"../../hooks/useUuid.js";import"../../uuid.js";const i=({size:a,isHovered:e})=>c(a,e,l.createElement("path",{d:"M21.866 20.005h5.573v1.6h-5.573v5.572h-1.6v-5.572h-5.572v-1.6h5.572v-5.573h1.6v5.573zM37.758 38.11a2.24 2.24 0 0 1-1.606.612 2.23 2.23 0 0 1-1.568-.703l-6.066-6.421a13.263 13.263 0 0 0 1.562-1.25 13.312 13.312 0 0 0 1.65-1.888l6.118 6.476c.85.9.81 2.324-.09 3.174zm-17.02-5.783a11.452 11.452 0 0 1-8.052-3.607 11.45 11.45 0 0 1-3.142-8.243c.178-6.243 5.312-11.2 11.518-11.2.11 0 .222.002.333.005 6.353.18 11.375 5.497 11.194 11.85a11.456 11.456 0 0 1-3.607 8.053c-2.24 2.114-5.166 3.24-8.244 3.142zm18.273 1.51-6.406-6.782a13.068 13.068 0 0 0 1.583-5.876c.1-3.505-1.171-6.84-3.58-9.388a13.036 13.036 0 0 0-9.167-4.108C14.2 7.482 8.15 13.196 7.945 20.43a13.043 13.043 0 0 0 3.578 9.388 13.042 13.042 0 0 0 9.553 4.113c2.136 0 4.198-.513 6.048-1.48l6.297 6.666a3.82 3.82 0 0 0 2.685 1.203l.113.002a3.82 3.82 0 0 0 2.637-1.05 3.85 3.85 0 0 0 .155-5.436z",fillRule:"evenodd"}),l.createElement("path",{d:"M21.866 20.005h6.278v1.6h-6.278v6.278h-1.6v-6.278h-6.278v-1.6h6.278v-6.278h1.6v6.278zm15.89 18.105c-.898.85-2.323.81-3.173-.091l-5.25-5.558a14.432 14.432 0 0 0 3.212-3.14l5.303 5.615c.85.9.809 2.323-.091 3.174zm-17.052-4.6a12.627 12.627 0 0 1-8.88-3.977 12.621 12.621 0 0 1-3.463-9.09 12.623 12.623 0 0 1 3.977-8.878 12.62 12.62 0 0 1 9.09-3.466c7.006.2 12.543 6.062 12.344 13.068-.2 7.006-6.068 12.558-13.068 12.343zm18.307.327-5.556-5.882a14.21 14.21 0 0 0 1.916-6.742c.225-7.888-6.01-14.488-13.897-14.713a14.22 14.22 0 0 0-10.235 3.9 14.218 14.218 0 0 0-4.478 9.997 14.217 14.217 0 0 0 3.9 10.234 14.219 14.219 0 0 0 10.41 4.485c2.49 0 4.836-.651 6.885-1.782l5.464 5.784a3.82 3.82 0 0 0 2.799 1.205 3.82 3.82 0 0 0 2.637-1.05 3.85 3.85 0 0 0 .155-5.436z",fillRule:"evenodd"}),l.createElement("path",{d:"M22.591 20.708h3.645v2.02H22.59v3.644h-2.02v-3.643h-3.644v-2.021h3.643v-3.645h2.021v3.645zm11.882 13.63c-.5.5-1.372.5-1.874 0l-4.47-4.472c.691-.555 1.304-1.2 1.834-1.912l4.51 4.51a1.318 1.318 0 0 1 0 1.873zm-21.334-12.62c0-4.656 3.787-8.443 8.442-8.443 4.656 0 8.443 3.787 8.443 8.443 0 4.655-3.787 8.442-8.443 8.442-4.655 0-8.442-3.787-8.442-8.442zm22.764 9.316-4.866-4.864a10.39 10.39 0 0 0 1.008-4.452c0-5.77-4.694-10.464-10.464-10.464-5.769 0-10.463 4.694-10.463 10.464 0 5.77 4.694 10.463 10.463 10.463 1.738 0 3.375-.432 4.819-1.185l4.77 4.77c.632.631 1.474.98 2.367.98s1.734-.349 2.366-.98c.631-.632.98-1.472.98-2.366 0-.893-.349-1.733-.98-2.366z",fillRule:"evenodd"}),l.createElement("path",{d:"M22.592 20.708H27v2.02h-4.408v4.408H20.57v-4.407h-4.409v-2.021h4.409v-4.409h2.02v4.409zm11.881 13.63c-.499.498-1.372.5-1.873 0l-3.724-3.725a11.63 11.63 0 0 0 1.834-1.912l3.763 3.763c.25.25.388.583.388.936 0 .355-.138.687-.388.937zm-22.382-12.62c0-5.233 4.258-9.49 9.49-9.49 5.233 0 9.49 4.257 9.49 9.49 0 5.232-4.257 9.49-9.49 9.49-5.232 0-9.49-4.258-9.49-9.49zm23.812 9.316-4.083-4.083a11.423 11.423 0 0 0 1.272-5.233c0-6.347-5.163-11.51-11.51-11.51-6.347 0-11.51 5.163-11.51 11.51 0 6.346 5.163 11.51 11.51 11.51 2.03 0 3.934-.533 5.591-1.459l3.998 3.997c.632.631 1.473.98 2.366.98s1.734-.349 2.365-.98c.632-.632.98-1.472.98-2.366 0-.893-.348-1.733-.98-2.366z",fillRule:"evenodd"}));export{i as default};
1
+ import l from"react";import{getIcon as c}from"./Icon.js";import"classnames";import"../../constants.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";const s=({size:a,isHovered:e})=>c(a,e,l.createElement("path",{d:"M21.866 20.005h5.573v1.6h-5.573v5.572h-1.6v-5.572h-5.572v-1.6h5.572v-5.573h1.6v5.573zM37.758 38.11a2.24 2.24 0 0 1-1.606.612 2.23 2.23 0 0 1-1.568-.703l-6.066-6.421a13.263 13.263 0 0 0 1.562-1.25 13.312 13.312 0 0 0 1.65-1.888l6.118 6.476c.85.9.81 2.324-.09 3.174zm-17.02-5.783a11.452 11.452 0 0 1-8.052-3.607 11.45 11.45 0 0 1-3.142-8.243c.178-6.243 5.312-11.2 11.518-11.2.11 0 .222.002.333.005 6.353.18 11.375 5.497 11.194 11.85a11.456 11.456 0 0 1-3.607 8.053c-2.24 2.114-5.166 3.24-8.244 3.142zm18.273 1.51-6.406-6.782a13.068 13.068 0 0 0 1.583-5.876c.1-3.505-1.171-6.84-3.58-9.388a13.036 13.036 0 0 0-9.167-4.108C14.2 7.482 8.15 13.196 7.945 20.43a13.043 13.043 0 0 0 3.578 9.388 13.042 13.042 0 0 0 9.553 4.113c2.136 0 4.198-.513 6.048-1.48l6.297 6.666a3.82 3.82 0 0 0 2.685 1.203l.113.002a3.82 3.82 0 0 0 2.637-1.05 3.85 3.85 0 0 0 .155-5.436z",fillRule:"evenodd"}),l.createElement("path",{d:"M21.866 20.005h6.278v1.6h-6.278v6.278h-1.6v-6.278h-6.278v-1.6h6.278v-6.278h1.6v6.278zm15.89 18.105c-.898.85-2.323.81-3.173-.091l-5.25-5.558a14.432 14.432 0 0 0 3.212-3.14l5.303 5.615c.85.9.809 2.323-.091 3.174zm-17.052-4.6a12.627 12.627 0 0 1-8.88-3.977 12.621 12.621 0 0 1-3.463-9.09 12.623 12.623 0 0 1 3.977-8.878 12.62 12.62 0 0 1 9.09-3.466c7.006.2 12.543 6.062 12.344 13.068-.2 7.006-6.068 12.558-13.068 12.343zm18.307.327-5.556-5.882a14.21 14.21 0 0 0 1.916-6.742c.225-7.888-6.01-14.488-13.897-14.713a14.22 14.22 0 0 0-10.235 3.9 14.218 14.218 0 0 0-4.478 9.997 14.217 14.217 0 0 0 3.9 10.234 14.219 14.219 0 0 0 10.41 4.485c2.49 0 4.836-.651 6.885-1.782l5.464 5.784a3.82 3.82 0 0 0 2.799 1.205 3.82 3.82 0 0 0 2.637-1.05 3.85 3.85 0 0 0 .155-5.436z",fillRule:"evenodd"}),l.createElement("path",{d:"M22.591 20.708h3.645v2.02H22.59v3.644h-2.02v-3.643h-3.644v-2.021h3.643v-3.645h2.021v3.645zm11.882 13.63c-.5.5-1.372.5-1.874 0l-4.47-4.472c.691-.555 1.304-1.2 1.834-1.912l4.51 4.51a1.318 1.318 0 0 1 0 1.873zm-21.334-12.62c0-4.656 3.787-8.443 8.442-8.443 4.656 0 8.443 3.787 8.443 8.443 0 4.655-3.787 8.442-8.443 8.442-4.655 0-8.442-3.787-8.442-8.442zm22.764 9.316-4.866-4.864a10.39 10.39 0 0 0 1.008-4.452c0-5.77-4.694-10.464-10.464-10.464-5.769 0-10.463 4.694-10.463 10.464 0 5.77 4.694 10.463 10.463 10.463 1.738 0 3.375-.432 4.819-1.185l4.77 4.77c.632.631 1.474.98 2.367.98s1.734-.349 2.366-.98c.631-.632.98-1.472.98-2.366 0-.893-.349-1.733-.98-2.366z",fillRule:"evenodd"}),l.createElement("path",{d:"M22.592 20.708H27v2.02h-4.408v4.408H20.57v-4.407h-4.409v-2.021h4.409v-4.409h2.02v4.409zm11.881 13.63c-.499.498-1.372.5-1.873 0l-3.724-3.725a11.63 11.63 0 0 0 1.834-1.912l3.763 3.763c.25.25.388.583.388.936 0 .355-.138.687-.388.937zm-22.382-12.62c0-5.233 4.258-9.49 9.49-9.49 5.233 0 9.49 4.257 9.49 9.49 0 5.232-4.257 9.49-9.49 9.49-5.232 0-9.49-4.258-9.49-9.49zm23.812 9.316-4.083-4.083a11.423 11.423 0 0 0 1.272-5.233c0-6.347-5.163-11.51-11.51-11.51-6.347 0-11.51 5.163-11.51 11.51 0 6.346 5.163 11.51 11.51 11.51 2.03 0 3.934-.533 5.591-1.459l3.998 3.997c.632.631 1.473.98 2.366.98s1.734-.349 2.365-.98c.632-.632.98-1.472.98-2.366 0-.893-.348-1.733-.98-2.366z",fillRule:"evenodd"}));export{s as default};
2
2
  //# sourceMappingURL=Zoom.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Zoom.js","sources":["../../../src/components/Icons/Zoom.tsx"],"sourcesContent":["import React from 'react';\nimport { getIcon, SvgPathProps } from './Icon';\n\nconst Zoom: React.FC<SvgPathProps> = ({ size, isHovered }: SvgPathProps): JSX.Element => {\n const normal = (\n <path\n d=\"M21.866 20.005h5.573v1.6h-5.573v5.572h-1.6v-5.572h-5.572v-1.6h5.572v-5.573h1.6v5.573zM37.758 38.11a2.24 2.24 0 0 1-1.606.612 2.23 2.23 0 0 1-1.568-.703l-6.066-6.421a13.263 13.263 0 0 0 1.562-1.25 13.312 13.312 0 0 0 1.65-1.888l6.118 6.476c.85.9.81 2.324-.09 3.174zm-17.02-5.783a11.452 11.452 0 0 1-8.052-3.607 11.45 11.45 0 0 1-3.142-8.243c.178-6.243 5.312-11.2 11.518-11.2.11 0 .222.002.333.005 6.353.18 11.375 5.497 11.194 11.85a11.456 11.456 0 0 1-3.607 8.053c-2.24 2.114-5.166 3.24-8.244 3.142zm18.273 1.51-6.406-6.782a13.068 13.068 0 0 0 1.583-5.876c.1-3.505-1.171-6.84-3.58-9.388a13.036 13.036 0 0 0-9.167-4.108C14.2 7.482 8.15 13.196 7.945 20.43a13.043 13.043 0 0 0 3.578 9.388 13.042 13.042 0 0 0 9.553 4.113c2.136 0 4.198-.513 6.048-1.48l6.297 6.666a3.82 3.82 0 0 0 2.685 1.203l.113.002a3.82 3.82 0 0 0 2.637-1.05 3.85 3.85 0 0 0 .155-5.436z\"\n fillRule=\"evenodd\"\n />\n );\n\n const normalHover = (\n <path\n d=\"M21.866 20.005h6.278v1.6h-6.278v6.278h-1.6v-6.278h-6.278v-1.6h6.278v-6.278h1.6v6.278zm15.89 18.105c-.898.85-2.323.81-3.173-.091l-5.25-5.558a14.432 14.432 0 0 0 3.212-3.14l5.303 5.615c.85.9.809 2.323-.091 3.174zm-17.052-4.6a12.627 12.627 0 0 1-8.88-3.977 12.621 12.621 0 0 1-3.463-9.09 12.623 12.623 0 0 1 3.977-8.878 12.62 12.62 0 0 1 9.09-3.466c7.006.2 12.543 6.062 12.344 13.068-.2 7.006-6.068 12.558-13.068 12.343zm18.307.327-5.556-5.882a14.21 14.21 0 0 0 1.916-6.742c.225-7.888-6.01-14.488-13.897-14.713a14.22 14.22 0 0 0-10.235 3.9 14.218 14.218 0 0 0-4.478 9.997 14.217 14.217 0 0 0 3.9 10.234 14.219 14.219 0 0 0 10.41 4.485c2.49 0 4.836-.651 6.885-1.782l5.464 5.784a3.82 3.82 0 0 0 2.799 1.205 3.82 3.82 0 0 0 2.637-1.05 3.85 3.85 0 0 0 .155-5.436z\"\n fillRule=\"evenodd\"\n />\n );\n\n const xSmall = (\n <path\n d=\"M22.591 20.708h3.645v2.02H22.59v3.644h-2.02v-3.643h-3.644v-2.021h3.643v-3.645h2.021v3.645zm11.882 13.63c-.5.5-1.372.5-1.874 0l-4.47-4.472c.691-.555 1.304-1.2 1.834-1.912l4.51 4.51a1.318 1.318 0 0 1 0 1.873zm-21.334-12.62c0-4.656 3.787-8.443 8.442-8.443 4.656 0 8.443 3.787 8.443 8.443 0 4.655-3.787 8.442-8.443 8.442-4.655 0-8.442-3.787-8.442-8.442zm22.764 9.316-4.866-4.864a10.39 10.39 0 0 0 1.008-4.452c0-5.77-4.694-10.464-10.464-10.464-5.769 0-10.463 4.694-10.463 10.464 0 5.77 4.694 10.463 10.463 10.463 1.738 0 3.375-.432 4.819-1.185l4.77 4.77c.632.631 1.474.98 2.367.98s1.734-.349 2.366-.98c.631-.632.98-1.472.98-2.366 0-.893-.349-1.733-.98-2.366z\"\n fillRule=\"evenodd\"\n />\n );\n\n const xSmallHover = (\n <path\n d=\"M22.592 20.708H27v2.02h-4.408v4.408H20.57v-4.407h-4.409v-2.021h4.409v-4.409h2.02v4.409zm11.881 13.63c-.499.498-1.372.5-1.873 0l-3.724-3.725a11.63 11.63 0 0 0 1.834-1.912l3.763 3.763c.25.25.388.583.388.936 0 .355-.138.687-.388.937zm-22.382-12.62c0-5.233 4.258-9.49 9.49-9.49 5.233 0 9.49 4.257 9.49 9.49 0 5.232-4.257 9.49-9.49 9.49-5.232 0-9.49-4.258-9.49-9.49zm23.812 9.316-4.083-4.083a11.423 11.423 0 0 0 1.272-5.233c0-6.347-5.163-11.51-11.51-11.51-6.347 0-11.51 5.163-11.51 11.51 0 6.346 5.163 11.51 11.51 11.51 2.03 0 3.934-.533 5.591-1.459l3.998 3.997c.632.631 1.473.98 2.366.98s1.734-.349 2.365-.98c.632-.632.98-1.472.98-2.366 0-.893-.348-1.733-.98-2.366z\"\n fillRule=\"evenodd\"\n />\n );\n\n return getIcon(size, isHovered, normal, normalHover, xSmall, xSmallHover);\n};\n\nexport default Zoom;\n"],"names":["Zoom","size","isHovered","getIcon","React"],"mappings":"4JAGA,MAAMA,EAA+B,CAAC,CAAE,KAAAC,EAAM,UAAAC,KA6BrCC,EAAQF,EAAMC,EA3BlBE,EAAA,cAAA,OAAA,CACC,EAAE,q1BACF,SAAS,SAAA,CACX,EAICA,EAAA,cAAA,OAAA,CACC,EAAE,uvBACF,SAAS,SAAA,CACX,EAICA,EAAA,cAAA,OAAA,CACC,EAAE,gpBACF,SAAS,SAAA,CACX,EAICA,EAAA,cAAA,OAAA,CACC,EAAE,wpBACF,SAAS,SAAA,CACX,CAGsE"}
1
+ {"version":3,"file":"Zoom.js","sources":["../../../src/components/Icons/Zoom.tsx"],"sourcesContent":["import React from 'react';\nimport { getIcon, SvgPathProps } from './Icon';\n\nconst Zoom: React.FC<SvgPathProps> = ({ size, isHovered }: SvgPathProps): JSX.Element => {\n const normal = (\n <path\n d=\"M21.866 20.005h5.573v1.6h-5.573v5.572h-1.6v-5.572h-5.572v-1.6h5.572v-5.573h1.6v5.573zM37.758 38.11a2.24 2.24 0 0 1-1.606.612 2.23 2.23 0 0 1-1.568-.703l-6.066-6.421a13.263 13.263 0 0 0 1.562-1.25 13.312 13.312 0 0 0 1.65-1.888l6.118 6.476c.85.9.81 2.324-.09 3.174zm-17.02-5.783a11.452 11.452 0 0 1-8.052-3.607 11.45 11.45 0 0 1-3.142-8.243c.178-6.243 5.312-11.2 11.518-11.2.11 0 .222.002.333.005 6.353.18 11.375 5.497 11.194 11.85a11.456 11.456 0 0 1-3.607 8.053c-2.24 2.114-5.166 3.24-8.244 3.142zm18.273 1.51-6.406-6.782a13.068 13.068 0 0 0 1.583-5.876c.1-3.505-1.171-6.84-3.58-9.388a13.036 13.036 0 0 0-9.167-4.108C14.2 7.482 8.15 13.196 7.945 20.43a13.043 13.043 0 0 0 3.578 9.388 13.042 13.042 0 0 0 9.553 4.113c2.136 0 4.198-.513 6.048-1.48l6.297 6.666a3.82 3.82 0 0 0 2.685 1.203l.113.002a3.82 3.82 0 0 0 2.637-1.05 3.85 3.85 0 0 0 .155-5.436z\"\n fillRule=\"evenodd\"\n />\n );\n\n const normalHover = (\n <path\n d=\"M21.866 20.005h6.278v1.6h-6.278v6.278h-1.6v-6.278h-6.278v-1.6h6.278v-6.278h1.6v6.278zm15.89 18.105c-.898.85-2.323.81-3.173-.091l-5.25-5.558a14.432 14.432 0 0 0 3.212-3.14l5.303 5.615c.85.9.809 2.323-.091 3.174zm-17.052-4.6a12.627 12.627 0 0 1-8.88-3.977 12.621 12.621 0 0 1-3.463-9.09 12.623 12.623 0 0 1 3.977-8.878 12.62 12.62 0 0 1 9.09-3.466c7.006.2 12.543 6.062 12.344 13.068-.2 7.006-6.068 12.558-13.068 12.343zm18.307.327-5.556-5.882a14.21 14.21 0 0 0 1.916-6.742c.225-7.888-6.01-14.488-13.897-14.713a14.22 14.22 0 0 0-10.235 3.9 14.218 14.218 0 0 0-4.478 9.997 14.217 14.217 0 0 0 3.9 10.234 14.219 14.219 0 0 0 10.41 4.485c2.49 0 4.836-.651 6.885-1.782l5.464 5.784a3.82 3.82 0 0 0 2.799 1.205 3.82 3.82 0 0 0 2.637-1.05 3.85 3.85 0 0 0 .155-5.436z\"\n fillRule=\"evenodd\"\n />\n );\n\n const xSmall = (\n <path\n d=\"M22.591 20.708h3.645v2.02H22.59v3.644h-2.02v-3.643h-3.644v-2.021h3.643v-3.645h2.021v3.645zm11.882 13.63c-.5.5-1.372.5-1.874 0l-4.47-4.472c.691-.555 1.304-1.2 1.834-1.912l4.51 4.51a1.318 1.318 0 0 1 0 1.873zm-21.334-12.62c0-4.656 3.787-8.443 8.442-8.443 4.656 0 8.443 3.787 8.443 8.443 0 4.655-3.787 8.442-8.443 8.442-4.655 0-8.442-3.787-8.442-8.442zm22.764 9.316-4.866-4.864a10.39 10.39 0 0 0 1.008-4.452c0-5.77-4.694-10.464-10.464-10.464-5.769 0-10.463 4.694-10.463 10.464 0 5.77 4.694 10.463 10.463 10.463 1.738 0 3.375-.432 4.819-1.185l4.77 4.77c.632.631 1.474.98 2.367.98s1.734-.349 2.366-.98c.631-.632.98-1.472.98-2.366 0-.893-.349-1.733-.98-2.366z\"\n fillRule=\"evenodd\"\n />\n );\n\n const xSmallHover = (\n <path\n d=\"M22.592 20.708H27v2.02h-4.408v4.408H20.57v-4.407h-4.409v-2.021h4.409v-4.409h2.02v4.409zm11.881 13.63c-.499.498-1.372.5-1.873 0l-3.724-3.725a11.63 11.63 0 0 0 1.834-1.912l3.763 3.763c.25.25.388.583.388.936 0 .355-.138.687-.388.937zm-22.382-12.62c0-5.233 4.258-9.49 9.49-9.49 5.233 0 9.49 4.257 9.49 9.49 0 5.232-4.257 9.49-9.49 9.49-5.232 0-9.49-4.258-9.49-9.49zm23.812 9.316-4.083-4.083a11.423 11.423 0 0 0 1.272-5.233c0-6.347-5.163-11.51-11.51-11.51-6.347 0-11.51 5.163-11.51 11.51 0 6.346 5.163 11.51 11.51 11.51 2.03 0 3.934-.533 5.591-1.459l3.998 3.997c.632.631 1.473.98 2.366.98s1.734-.349 2.365-.98c.632-.632.98-1.472.98-2.366 0-.893-.348-1.733-.98-2.366z\"\n fillRule=\"evenodd\"\n />\n );\n\n return getIcon(size, isHovered, normal, normalHover, xSmall, xSmallHover);\n};\n\nexport default Zoom;\n"],"names":["Zoom","size","isHovered","getIcon","React"],"mappings":"+LAGA,MAAMA,EAA+B,CAAC,CAAE,KAAAC,EAAM,UAAAC,KA6BrCC,EAAQF,EAAMC,EA3BlBE,EAAA,cAAA,OAAA,CACC,EAAE,q1BACF,SAAS,SAAA,CACX,EAICA,EAAA,cAAA,OAAA,CACC,EAAE,uvBACF,SAAS,SAAA,CACX,EAICA,EAAA,cAAA,OAAA,CACC,EAAE,gpBACF,SAAS,SAAA,CACX,EAICA,EAAA,cAAA,OAAA,CACC,EAAE,wpBACF,SAAS,SAAA,CACX,CAGsE"}
@@ -1,2 +1,2 @@
1
- import"./Icon.js";import{Icon as n,Icon as I,getIcon as f}from"./Icon.js";import{IconSize as x}from"../../constants.js";import"classnames";import"react";import"../../hooks/useUuid.js";import"../../uuid.js";export{n as Icon,x as IconSize,I as default,f as getIcon};
1
+ import"./Icon.js";import{Icon as I,Icon as f,getIcon as a}from"./Icon.js";import{IconSize as d}from"../../constants.js";import"classnames";import"react";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";export{I as Icon,d as IconSize,f as default,a as getIcon};
2
2
  //# sourceMappingURL=index.js.map
@@ -40,7 +40,6 @@ export declare enum InputTypes {
40
40
  tel = "tel",
41
41
  url = "url"
42
42
  }
43
- export declare const AVERAGE_CHARACTER_WIDTH_PX = 12;
44
43
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
45
44
  export default Input;
46
45
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAe,MAAM,iBAAiB,CAAC;AAErE,OAAa,EAAY,OAAO,EAAE,MAAM,UAAU,CAAC;AAQnD,MAAM,WAAW,UACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,MAAM,GAAG,aAAa,GAAG,cAAc,GAAG,UAAU,CAChG;IACD,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IAC/B,eAAe;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mDAAmD;IACnD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mCAAmC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,uCAAuC;IACvC,O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AE,OAAO,CAAC;IACtB,mDAAmD;IACnD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mCAAmC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACtC;AAED,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,GAAG,QAAQ;CACZ;AAUD,QAAA,MAAM,KAAK,qFAyGT,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -1,2 +1,2 @@
1
- import"../../Input.js";import{A as H,a as d,I as l}from"../../Input.js";import"react";import"classnames";import"../../constants.js";import"../../uuid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useBreakpoint.js";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"./styles.module.scss";export{H as AVERAGE_CHARACTER_WIDTH_PX,d as InputTypes,l as default};
1
+ import"../../Input.js";import{a as g,I as h}from"../../Input.js";import"react";import"classnames";import"../../constants.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useBreakpoint.js";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"./styles.module.scss";export{g as InputTypes,h as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import e from"react";import v from"classnames";import{Icon as R}from"../Icons/Icon.js";import{AnalyticsId as y,IconSize as p}from"../../constants.js";import g from"../Icons/ChevronRight.js";import{useBreakpoint as z,Breakpoint as S}from"../../hooks/useBreakpoint.js";import{useHover as B}from"../../hooks/useHover.js";import t from"./styles.module.scss";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../theme/grid.js";const f=e.forwardRef((u,i)=>{const{children:s,className:m="",color:c="neutral",icon:o,size:n="medium",chevron:l=!1,linkRef:d,testId:k,target:a,htmlMarkup:r="a",..._}=u,{hoverRef:h,isHovered:L}=B(d),I=z(),b=n!=="small"&&!!(l||o),E=()=>e.createElement(e.Fragment,null,b&&o&&e.createElement("span",{className:t["link-list__icon"]},e.cloneElement(o,{size:I===S.xs?p.XSmall:p.Small,isHovered:L})),e.createElement("span",{className:t["link-list__content"]},s),b&&l&&e.createElement("span",{className:t["link-list__chevron"]},e.createElement(R,{svgIcon:g,isHovered:L,size:p.XSmall}))),N=v(t["link-list__anchor"],t["link-list__anchor--"+c],{[t["link-list__anchor--small"]]:n==="small",[t["link-list__anchor--medium"]]:n==="medium",[t["link-list__anchor--large"]]:n==="large",[t["link-list__anchor--button"]]:r==="button"},m);return e.createElement("li",{ref:i,"data-testid":k,"data-analyticsid":y.Link},r==="a"&&e.createElement("a",{className:N,ref:h,rel:a==="_blank"?"noopener noreferrer":void 0,target:a,..._},E()),r==="button"&&e.createElement("button",{className:N,ref:h,type:"button",..._},E()))}),C=e.forwardRef(function(i,s){const{children:m,className:c="",chevron:o=!1,size:n="medium",color:l,topBorder:d=!0,bottomBorder:k=!0,testId:a}=i;return e.createElement("ul",{ref:s,className:v(t["link-list"],{[t["link-list--hastopborder"]]:d,[t["link-list--nobottomborder"]]:!k},c),"data-testid":a,"data-analyticsid":y.LinkList},e.Children.map(m,r=>{if(r.type===f)return e.cloneElement(r,{color:l,size:n,chevron:o})}))});C.Link=f;f.displayName="LinkList.Link";export{C as LinkList,C as default};
1
+ import e from"react";import v from"classnames";import{Icon as R}from"../Icons/Icon.js";import{AnalyticsId as y,IconSize as p}from"../../constants.js";import g from"../Icons/ChevronRight.js";import{useBreakpoint as z,Breakpoint as S}from"../../hooks/useBreakpoint.js";import{useHover as B}from"../../hooks/useHover.js";import t from"./styles.module.scss";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../theme/grid.js";const f=e.forwardRef((u,i)=>{const{children:s,className:m="",color:c="neutral",icon:o,size:n="medium",chevron:l=!1,linkRef:d,testId:k,target:a,htmlMarkup:r="a",..._}=u,{hoverRef:h,isHovered:L}=B(d),I=z(),b=n!=="small"&&!!(l||o),E=()=>e.createElement(e.Fragment,null,b&&o&&e.createElement("span",{className:t["link-list__icon"]},e.cloneElement(o,{size:I===S.xs?p.XSmall:p.Small,isHovered:L})),e.createElement("span",{className:t["link-list__content"]},s),b&&l&&e.createElement("span",{className:t["link-list__chevron"]},e.createElement(R,{svgIcon:g,isHovered:L,size:p.XSmall}))),N=v(t["link-list__anchor"],t["link-list__anchor--"+c],{[t["link-list__anchor--small"]]:n==="small",[t["link-list__anchor--medium"]]:n==="medium",[t["link-list__anchor--large"]]:n==="large",[t["link-list__anchor--button"]]:r==="button"},m);return e.createElement("li",{ref:i,"data-testid":k,"data-analyticsid":y.Link},r==="a"&&e.createElement("a",{className:N,ref:h,rel:a==="_blank"?"noopener noreferrer":void 0,target:a,..._},E()),r==="button"&&e.createElement("button",{className:N,ref:h,type:"button",..._},E()))}),C=e.forwardRef(function(i,s){const{children:m,className:c="",chevron:o=!1,size:n="medium",color:l,topBorder:d=!0,bottomBorder:k=!0,testId:a}=i;return e.createElement("ul",{ref:s,className:v(t["link-list"],{[t["link-list--hastopborder"]]:d,[t["link-list--nobottomborder"]]:!k},c),"data-testid":a,"data-analyticsid":y.LinkList},e.Children.map(m,r=>{if(r.type===f)return e.cloneElement(r,{color:l,size:n,chevron:o})}))});C.Link=f;f.displayName="LinkList.Link";export{C as LinkList,C as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/LinkList/LinkList.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { PaletteNames } from '../../theme/palette';\nimport Icon, { IconSize } from '../Icons';\nimport ChevronRight from '../Icons/ChevronRight';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\n\nimport LinkListStyles from './styles.module.scss';\nimport { AnalyticsId } from '../../constants';\n\nexport type LinkListSize = 'small' | 'medium' | 'large';\n\nexport type LinkAnchorTargets = '_self' | '_blank' | '_parent';\n\nexport type LinkListColors = PaletteNames;\nexport type LinkType = React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLLIElement>>;\n\nexport type LinkTags = 'button' | 'a';\nexport interface CompoundComponent extends React.ForwardRefExoticComponent<LinkListProps & React.RefAttributes<HTMLUListElement>> {\n Link: LinkType;\n}\n\ninterface LinkListProps {\n /** Items in the LinkList */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the link list background color on hover. */\n color: LinkListColors;\n /** Toggles chevron icon on or off. */\n chevron?: boolean;\n /** Toggles the bottom border of the last child element. */\n bottomBorder?: boolean;\n /** Toggles the top border of the first child element. */\n topBorder?: boolean;\n /** Changes size of the LinkList. */\n size?: LinkListSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport interface LinkProps extends React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement> {\n children: React.ReactNode;\n color?: LinkListColors;\n size?: LinkListSize;\n chevron?: boolean;\n className?: string;\n icon?: React.ReactElement;\n href?: string;\n target?: LinkAnchorTargets;\n /** HTML markup for link. Default: a */\n htmlMarkup?: LinkTags;\n /**\n * Ref for lenke/knapp\n */\n linkRef?: React.RefObject<HTMLButtonElement | HTMLAnchorElement>;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Link: LinkType = React.forwardRef((props: LinkProps, ref: React.Ref<HTMLLIElement>) => {\n const {\n children,\n className = '',\n color = 'neutral',\n icon,\n size = 'medium',\n chevron = false,\n linkRef,\n testId,\n target,\n htmlMarkup = 'a',\n ...restProps\n } = props;\n const { hoverRef, isHovered } = useHover<HTMLButtonElement | HTMLAnchorElement>(linkRef);\n const breakpoint = useBreakpoint();\n\n const hasIcon = size !== 'small' && !!(chevron || icon);\n\n const renderContent = (): JSX.Element => (\n <>\n {hasIcon && icon && (\n <span className={LinkListStyles['link-list__icon']}>\n {React.cloneElement(icon, {\n size: breakpoint === Breakpoint.xs ? IconSize.XSmall : IconSize.Small,\n isHovered,\n })}\n </span>\n )}\n <span className={LinkListStyles['link-list__content']}>{children}</span>\n {hasIcon && chevron && (\n <span className={LinkListStyles['link-list__chevron']}>\n <Icon svgIcon={ChevronRight} isHovered={isHovered} size={IconSize.XSmall} />\n </span>\n )}\n </>\n );\n\n const linkClasses = cn(\n LinkListStyles['link-list__anchor'],\n LinkListStyles['link-list__anchor--' + color],\n {\n [LinkListStyles['link-list__anchor--small']]: size === 'small',\n [LinkListStyles['link-list__anchor--medium']]: size === 'medium',\n [LinkListStyles['link-list__anchor--large']]: size === 'large',\n [LinkListStyles['link-list__anchor--button']]: htmlMarkup === 'button',\n },\n className\n );\n\n return (\n <li ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Link}>\n {htmlMarkup === 'a' && (\n <a\n className={linkClasses}\n ref={hoverRef as React.RefObject<HTMLAnchorElement>}\n rel={target === '_blank' ? 'noopener noreferrer' : undefined}\n target={target}\n {...restProps}\n >\n {renderContent()}\n </a>\n )}\n {htmlMarkup === 'button' && (\n <button className={linkClasses} ref={hoverRef as React.RefObject<HTMLButtonElement>} type=\"button\" {...restProps}>\n {renderContent()}\n </button>\n )}\n </li>\n );\n});\n\nexport const LinkList = React.forwardRef(function LinkListForwardedRef(props: LinkListProps, ref: React.Ref<HTMLUListElement>) {\n const { children, className = '', chevron = false, size = 'medium', color, topBorder = true, bottomBorder = true, testId } = props;\n return (\n <ul\n ref={ref}\n className={cn(\n LinkListStyles['link-list'],\n {\n [LinkListStyles['link-list--hastopborder']]: topBorder,\n [LinkListStyles['link-list--nobottomborder']]: !bottomBorder,\n },\n className\n )}\n data-testid={testId}\n data-analyticsid={AnalyticsId.LinkList}\n >\n {React.Children.map(children, (child: React.ReactNode | React.ReactElement<LinkProps>) => {\n if ((child as React.ReactElement<LinkProps>).type === Link) {\n return React.cloneElement(child as React.ReactElement<LinkProps>, { color, size, chevron });\n }\n })}\n </ul>\n );\n}) as CompoundComponent;\n\nLinkList.Link = Link;\nLink.displayName = 'LinkList.Link';\n\nexport default LinkList;\n"],"names":["Link","React","props","ref","children","className","color","icon","size","chevron","linkRef","testId","target","htmlMarkup","restProps","hoverRef","isHovered","useHover","breakpoint","useBreakpoint","hasIcon","renderContent","LinkListStyles","Breakpoint","IconSize","Icon","ChevronRight","linkClasses","cn","AnalyticsId","LinkList","topBorder","bottomBorder","child"],"mappings":"mbA8DA,MAAMA,EAAiBC,EAAM,WAAW,CAACC,EAAkBC,IAAkC,CACrF,KAAA,CACJ,SAAAC,EACA,UAAAC,EAAY,GACZ,MAAAC,EAAQ,UACR,KAAAC,EACA,KAAAC,EAAO,SACP,QAAAC,EAAU,GACV,QAAAC,EACA,OAAAC,EACA,OAAAC,EACA,WAAAC,EAAa,OACVC,CACD,EAAAZ,EACE,CAAE,SAAAa,EAAU,UAAAC,CAAU,EAAIC,EAAgDP,CAAO,EACjFQ,EAAaC,IAEbC,EAAUZ,IAAS,SAAW,CAAC,EAAEC,GAAWF,GAE5Cc,EAAgB,IAEjBpB,EAAA,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AW,EAAAT,EAC7H,OACGD,EAAA,cAAA,KAAA,CACC,IAAAE,EACA,UAAWyB,EACTN,EAAe,aACf,CACE,CAACA,EAAe,4BAA6BS,EAC7C,CAACT,EAAe,8BAA+B,CAACU,CAClD,EACA3B,CACF,EACA,cAAaM,EACb,mBAAkBkB,EAAY,QAAA,EAE7B5B,EAAM,SAAS,IAAIG,EAAW6B,GAA2D,CACnF,GAAAA,EAAwC,OAASjC,EACpD,OAAOC,EAAM,aAAagC,EAAwC,CAAE,MAAA3B,EAAO,KAAAE,EAAM,QAAAC,EAAS,CAE7F,CAAA,CACH,CAEJ,CAAC,EAEDqB,EAAS,KAAO9B,EAChBA,EAAK,YAAc"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/LinkList/LinkList.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { PaletteNames } from '../../theme/palette';\nimport Icon, { IconSize } from '../Icons';\nimport ChevronRight from '../Icons/ChevronRight';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\n\nimport LinkListStyles from './styles.module.scss';\nimport { AnalyticsId } from '../../constants';\n\nexport type LinkListSize = 'small' | 'medium' | 'large';\n\nexport type LinkAnchorTargets = '_self' | '_blank' | '_parent';\n\nexport type LinkListColors = PaletteNames;\nexport type LinkType = React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLLIElement>>;\n\nexport type LinkTags = 'button' | 'a';\nexport interface CompoundComponent extends React.ForwardRefExoticComponent<LinkListProps & React.RefAttributes<HTMLUListElement>> {\n Link: LinkType;\n}\n\ninterface LinkListProps {\n /** Items in the LinkList */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the link list background color on hover. */\n color: LinkListColors;\n /** Toggles chevron icon on or off. */\n chevron?: boolean;\n /** Toggles the bottom border of the last child element. */\n bottomBorder?: boolean;\n /** Toggles the top border of the first child element. */\n topBorder?: boolean;\n /** Changes size of the LinkList. */\n size?: LinkListSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport interface LinkProps extends React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement> {\n children: React.ReactNode;\n color?: LinkListColors;\n size?: LinkListSize;\n chevron?: boolean;\n className?: string;\n icon?: React.ReactElement;\n href?: string;\n target?: LinkAnchorTargets;\n /** HTML markup for link. Default: a */\n htmlMarkup?: LinkTags;\n /**\n * Ref for lenke/knapp\n */\n linkRef?: React.RefObject<HTMLButtonElement | HTMLAnchorElement>;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Link: LinkType = React.forwardRef((props: LinkProps, ref: React.Ref<HTMLLIElement>) => {\n const {\n children,\n className = '',\n color = 'neutral',\n icon,\n size = 'medium',\n chevron = false,\n linkRef,\n testId,\n target,\n htmlMarkup = 'a',\n ...restProps\n } = props;\n const { hoverRef, isHovered } = useHover<HTMLButtonElement | HTMLAnchorElement>(linkRef);\n const breakpoint = useBreakpoint();\n\n const hasIcon = size !== 'small' && !!(chevron || icon);\n\n const renderContent = (): JSX.Element => (\n <>\n {hasIcon && icon && (\n <span className={LinkListStyles['link-list__icon']}>\n {React.cloneElement(icon, {\n size: breakpoint === Breakpoint.xs ? IconSize.XSmall : IconSize.Small,\n isHovered,\n })}\n </span>\n )}\n <span className={LinkListStyles['link-list__content']}>{children}</span>\n {hasIcon && chevron && (\n <span className={LinkListStyles['link-list__chevron']}>\n <Icon svgIcon={ChevronRight} isHovered={isHovered} size={IconSize.XSmall} />\n </span>\n )}\n </>\n );\n\n const linkClasses = cn(\n LinkListStyles['link-list__anchor'],\n LinkListStyles['link-list__anchor--' + color],\n {\n [LinkListStyles['link-list__anchor--small']]: size === 'small',\n [LinkListStyles['link-list__anchor--medium']]: size === 'medium',\n [LinkListStyles['link-list__anchor--large']]: size === 'large',\n [LinkListStyles['link-list__anchor--button']]: htmlMarkup === 'button',\n },\n className\n );\n\n return (\n <li ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Link}>\n {htmlMarkup === 'a' && (\n <a\n className={linkClasses}\n ref={hoverRef as React.RefObject<HTMLAnchorElement>}\n rel={target === '_blank' ? 'noopener noreferrer' : undefined}\n target={target}\n {...restProps}\n >\n {renderContent()}\n </a>\n )}\n {htmlMarkup === 'button' && (\n <button className={linkClasses} ref={hoverRef as React.RefObject<HTMLButtonElement>} type=\"button\" {...restProps}>\n {renderContent()}\n </button>\n )}\n </li>\n );\n});\n\nexport const LinkList = React.forwardRef(function LinkListForwardedRef(props: LinkListProps, ref: React.Ref<HTMLUListElement>) {\n const { children, className = '', chevron = false, size = 'medium', color, topBorder = true, bottomBorder = true, testId } = props;\n return (\n <ul\n ref={ref}\n className={cn(\n LinkListStyles['link-list'],\n {\n [LinkListStyles['link-list--hastopborder']]: topBorder,\n [LinkListStyles['link-list--nobottomborder']]: !bottomBorder,\n },\n className\n )}\n data-testid={testId}\n data-analyticsid={AnalyticsId.LinkList}\n >\n {React.Children.map(children, (child: React.ReactNode | React.ReactElement<LinkProps>) => {\n if ((child as React.ReactElement<LinkProps>).type === Link) {\n return React.cloneElement(child as React.ReactElement<LinkProps>, { color, size, chevron });\n }\n })}\n </ul>\n );\n}) as CompoundComponent;\n\nLinkList.Link = Link;\nLink.displayName = 'LinkList.Link';\n\nexport default LinkList;\n"],"names":["Link","React","props","ref","children","className","color","icon","size","chevron","linkRef","testId","target","htmlMarkup","restProps","hoverRef","isHovered","useHover","breakpoint","useBreakpoint","hasIcon","renderContent","LinkListStyles","Breakpoint","IconSize","Icon","ChevronRight","linkClasses","cn","AnalyticsId","LinkList","topBorder","bottomBorder","child"],"mappings":"sdA8DA,MAAMA,EAAiBC,EAAM,WAAW,CAACC,EAAkBC,IAAkC,CACrF,KAAA,CACJ,SAAAC,EACA,UAAAC,EAAY,GACZ,MAAAC,EAAQ,UACR,KAAAC,EACA,KAAAC,EAAO,SACP,QAAAC,EAAU,GACV,QAAAC,EACA,OAAAC,EACA,OAAAC,EACA,WAAAC,EAAa,OACVC,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EAAsBC,EAAkC,CAC7H,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAY,GAAI,QAAAI,EAAU,GAAO,KAAAD,EAAO,SAAU,MAAAF,EAAO,UAAAyB,EAAY,GAAM,aAAAC,EAAe,GAAM,OAAArB,CAAW,EAAAT,EAC7H,OACGD,EAAA,cAAA,KAAA,CACC,IAAAE,EACA,UAAWyB,EACTN,EAAe,aACf,CACE,CAACA,EAAe,4BAA6BS,EAC7C,CAACT,EAAe,8BAA+B,CAACU,CAClD,EACA3B,CACF,EACA,cAAaM,EACb,mBAAkBkB,EAAY,QAAA,EAE7B5B,EAAM,SAAS,IAAIG,EAAW6B,GAA2D,CACnF,GAAAA,EAAwC,OAASjC,EACpD,OAAOC,EAAM,aAAagC,EAAwC,CAAE,MAAA3B,EAAO,KAAAE,EAAM,QAAAC,EAAS,CAE7F,CAAA,CACH,CAEJ,CAAC,EAEDqB,EAAS,KAAO9B,EAChBA,EAAK,YAAc"}
@@ -1,2 +1,2 @@
1
- import a,{useState as C,useRef as S,useEffect as D}from"react";import c from"classnames";import{a as z}from"../../uuid.js";import e from"./styles.module.scss";import{AnalyticsId as A}from"../../constants.js";var B=(o=>(o.screen="screen",o.parent="parent",o))(B||{});const H=a.forwardRef(function(N,F){const{overlay:l,color:r=l?"black":"neutral",size:d="small",className:L="",labelId:m=z(),testId:h,center:g,inline:n,ariaLabelledById:p,ariaLabel:k="Laster inn"}=N,R=()=>!(l==="parent"||n),[i,u]=C(R()),_=d==="small",f=d==="medium",y=d==="large",I=c(e["loader-wrapper"],{[e["loader-wrapper--center"]]:g,[e["loader-wrapper--overlay"]]:l,[e["loader-wrapper--overlay-screen"]]:l==="screen",[e["loader-wrapper--overlay-parent"]]:l==="parent"&&i,[e["loader-wrapper--inline"]]:n&&i}),x=c(e.loader,{[e["loader--small"]]:_,[e["loader--medium"]]:f,[e["loader--large"]]:y},L),s=c(e.loader__dot,{[e["loader__dot--small"]]:_,[e["loader__dot--medium"]]:f,[e["loader__dot--large"]]:y,[e["loader__dot--banana"]]:r==="banana",[e["loader__dot--cherry"]]:r==="cherry",[e["loader__dot--kiwi"]]:r==="kiwi",[e["loader__dot--neutral"]]:r==="neutral",[e["loader__dot--plum"]]:r==="plum",[e["loader__dot--black"]]:r==="black",[e["loader__dot--white"]]:r==="white"}),t=S(null);return D(()=>{var w,E,b,v;l==="parent"&&((E=(w=t.current)==null?void 0:w.parentElement)==null?void 0:E.style)&&(t.current.parentElement.style.position="relative",u(!0)),n&&((v=(b=t.current)==null?void 0:b.parentElement)==null?void 0:v.style)&&(t.current.parentElement.style.display="flex",u(!0))},[]),a.createElement("div",{className:I,ref:t},i&&a.createElement("div",{"data-testid":h,"data-analyticsid":A.Loader,role:"progressbar","aria-labelledby":p||m,className:x},a.createElement("div",{className:s}),a.createElement("div",{className:s}),a.createElement("div",{className:s}),a.createElement("div",{className:s}),!p&&a.createElement("span",{id:m,className:e["loader__hidden-text"]},k)))});export{B as Overlay,H as default};
1
+ import a,{useState as C,useRef as S,useEffect as D}from"react";import c from"classnames";import{a as z}from"../../uuid.js";import e from"./styles.module.scss";import{AnalyticsId as A}from"../../constants.js";import"../../utils/environment.js";var B=(o=>(o.screen="screen",o.parent="parent",o))(B||{});const J=a.forwardRef(function(N,F){const{overlay:l,color:r=l?"black":"neutral",size:d="small",className:L="",labelId:m=z(),testId:h,center:g,inline:n,ariaLabelledById:p,ariaLabel:k="Laster inn"}=N,R=()=>!(l==="parent"||n),[i,u]=C(R()),_=d==="small",f=d==="medium",y=d==="large",I=c(e["loader-wrapper"],{[e["loader-wrapper--center"]]:g,[e["loader-wrapper--overlay"]]:l,[e["loader-wrapper--overlay-screen"]]:l==="screen",[e["loader-wrapper--overlay-parent"]]:l==="parent"&&i,[e["loader-wrapper--inline"]]:n&&i}),x=c(e.loader,{[e["loader--small"]]:_,[e["loader--medium"]]:f,[e["loader--large"]]:y},L),s=c(e.loader__dot,{[e["loader__dot--small"]]:_,[e["loader__dot--medium"]]:f,[e["loader__dot--large"]]:y,[e["loader__dot--banana"]]:r==="banana",[e["loader__dot--cherry"]]:r==="cherry",[e["loader__dot--kiwi"]]:r==="kiwi",[e["loader__dot--neutral"]]:r==="neutral",[e["loader__dot--plum"]]:r==="plum",[e["loader__dot--black"]]:r==="black",[e["loader__dot--white"]]:r==="white"}),t=S(null);return D(()=>{var w,E,b,v;l==="parent"&&((E=(w=t.current)==null?void 0:w.parentElement)==null?void 0:E.style)&&(t.current.parentElement.style.position="relative",u(!0)),n&&((v=(b=t.current)==null?void 0:b.parentElement)==null?void 0:v.style)&&(t.current.parentElement.style.display="flex",u(!0))},[]),a.createElement("div",{className:I,ref:t},i&&a.createElement("div",{"data-testid":h,"data-analyticsid":A.Loader,role:"progressbar","aria-labelledby":p||m,className:x},a.createElement("div",{className:s}),a.createElement("div",{className:s}),a.createElement("div",{className:s}),a.createElement("div",{className:s}),!p&&a.createElement("span",{id:m,className:e["loader__hidden-text"]},k)))});export{B as Overlay,J as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Loader/Loader.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport { uuid } from '../../utils/uuid';\n\nimport { PaletteNames } from '../../theme/palette';\nimport loaderStyles from './styles.module.scss';\nimport { AnalyticsId } from '../../constants';\n\nexport type LoaderColors = PaletteNames;\nexport type LoaderSizes = 'tiny' | 'small' | 'medium' | 'large';\nexport enum Overlay {\n screen = 'screen',\n parent = 'parent',\n}\n\nexport interface LoaderProps {\n /** Sets the color of the loader */\n color?: LoaderColors;\n /**\tAdds custom classes to the element. */\n className?: string;\n /** Changes the size of the loader. */\n size?: LoaderSizes;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** id of the label */\n labelId?: string;\n /** Centers the loader in a container */\n center?: boolean;\n /** Inline the loader so it can be used in a span or paragraph */\n inline?: boolean;\n /** Loader is displayed with grey background covering the entire screen */\n overlay?: keyof typeof Overlay;\n /** Individual id for loading icon (aria-labelledby). */\n ariaLabelledById?: string;\n /** String that labels the current loading element */\n ariaLabel?: string;\n}\n\nconst Loader = React.forwardRef(function LoaderForwardedRef(props: LoaderProps, ref: React.ForwardedRef<HTMLElement>) {\n const {\n overlay,\n color = overlay ? 'black' : 'neutral',\n size = 'small',\n className = '',\n labelId = uuid(),\n testId,\n center,\n inline,\n ariaLabelledById,\n ariaLabel = 'Laster inn',\n } = props;\n\n const showLoader = (): boolean => {\n if (overlay === Overlay.parent || inline) {\n return false;\n }\n\n return true;\n };\n\n const [display, setDisplay] = useState(showLoader());\n\n const isSmall = size === 'small';\n const isMedium = size === 'medium';\n const isLarge = size === 'large';\n\n const loaderWrapperClasses = classNames(loaderStyles['loader-wrapper'], {\n [loaderStyles['loader-wrapper--center']]: center,\n [loaderStyles['loader-wrapper--overlay']]: overlay,\n [loaderStyles['loader-wrapper--overlay-screen']]: overlay === Overlay.screen,\n [loaderStyles['loader-wrapper--overlay-parent']]: overlay === Overlay.parent && display,\n [loaderStyles['loader-wrapper--inline']]: inline && display,\n });\n const loaderClasses = classNames(\n loaderStyles.loader,\n {\n [loaderStyles['loader--small']]: isSmall,\n [loaderStyles['loader--medium']]: isMedium,\n [loaderStyles['loader--large']]: isLarge,\n },\n className\n );\n const loaderDotClasses = classNames(loaderStyles.loader__dot, {\n [loaderStyles['loader__dot--small']]: isSmall,\n [loaderStyles['loader__dot--medium']]: isMedium,\n [loaderStyles['loader__dot--large']]: isLarge,\n [loaderStyles['loader__dot--banana']]: color === 'banana',\n [loaderStyles['loader__dot--cherry']]: color === 'cherry',\n [loaderStyles['loader__dot--kiwi']]: color === 'kiwi',\n [loaderStyles['loader__dot--neutral']]: color === 'neutral',\n [loaderStyles['loader__dot--plum']]: color === 'plum',\n [loaderStyles['loader__dot--black']]: color === 'black',\n [loaderStyles['loader__dot--white']]: color === 'white',\n });\n\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (overlay === Overlay.parent && wrapperRef.current?.parentElement?.style) {\n wrapperRef.current.parentElement.style.position = 'relative';\n setDisplay(true);\n }\n\n if (inline && wrapperRef.current?.parentElement?.style) {\n wrapperRef.current.parentElement.style.display = 'flex';\n setDisplay(true);\n }\n }, []);\n\n return (\n <div className={loaderWrapperClasses} ref={wrapperRef}>\n {display && (\n <div\n data-testid={testId}\n data-analyticsid={AnalyticsId.Loader}\n role=\"progressbar\"\n aria-labelledby={ariaLabelledById || labelId}\n className={loaderClasses}\n >\n <div className={loaderDotClasses} />\n <div className={loaderDotClasses} />\n <div className={loaderDotClasses} />\n <div className={loaderDotClasses} />\n {!ariaLabelledById && (\n <span id={labelId} className={loaderStyles['loader__hidden-text']}>\n {ariaLabel}\n </span>\n )}\n </div>\n )}\n </div>\n );\n});\n\nexport default Loader;\n"],"names":["Overlay","Loader","React","props","ref","overlay","color","size","className","labelId","uuid","testId","center","inline","ariaLabelledById","ariaLabel","showLoader","display","setDisplay","useState","isSmall","isMedium","isLarge","loaderWrapperClasses","classNames","loaderStyles","loaderClasses","loaderDotClasses","wrapperRef","useRef","useEffect","_b","_a","_d","_c","AnalyticsId"],"mappings":"gNAUY,IAAAA,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SAFCA,IAAAA,GAAA,CAAA,CAAA,EA4BZ,MAAMC,EAASC,EAAM,WAAW,SAA4BC,EAAoBC,EAAsC,CAC9G,KAAA,CACJ,QAAAC,EACA,MAAAC,EAAQD,EAAU,QAAU,UAC5B,KAAAE,EAAO,QACP,UAAAC,EAAY,GACZ,QAAAC,EAAUC,EAAK,EACf,OAAAC,EACA,OAAAC,EACA,OAAAC,EACA,iBAAAC,EACA,UAAAC,EAAY,YACV,EAAAZ,EAEEa,EAAa,IACb,EAAAX,IAAY,UAAkBQ,GAO9B,CAACI,EAASC,CAAU,EAAIC,EAASH,EAAY,CAAA,EAE7CI,EAAUb,IAAS,QACnBc,EAAWd,IAAS,SACpBe,EAAUf,IAAS,QAEnBgB,EA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,KAAK,cACL,kBAAiBrB,GAAoBL,EACrC,UAAWiB,CAAA,EAEVxB,EAAA,cAAA,MAAA,CAAI,UAAWyB,CAAA,CAAkB,EACjCzB,EAAA,cAAA,MAAA,CAAI,UAAWyB,CAAA,CAAkB,EACjCzB,EAAA,cAAA,MAAA,CAAI,UAAWyB,CAAA,CAAkB,EACjCzB,EAAA,cAAA,MAAA,CAAI,UAAWyB,CAAkB,CAAA,EACjC,CAACb,GACCZ,EAAA,cAAA,OAAA,CAAK,GAAIO,EAAS,UAAWgB,EAAa,sBAAA,EACxCV,CACH,CAEJ,CAEJ,CAEJ,CAAC"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Loader/Loader.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport { uuid } from '../../utils/uuid';\n\nimport { PaletteNames } from '../../theme/palette';\nimport loaderStyles from './styles.module.scss';\nimport { AnalyticsId } from '../../constants';\n\nexport type LoaderColors = PaletteNames;\nexport type LoaderSizes = 'tiny' | 'small' | 'medium' | 'large';\nexport enum Overlay {\n screen = 'screen',\n parent = 'parent',\n}\n\nexport interface LoaderProps {\n /** Sets the color of the loader */\n color?: LoaderColors;\n /**\tAdds custom classes to the element. */\n className?: string;\n /** Changes the size of the loader. */\n size?: LoaderSizes;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** id of the label */\n labelId?: string;\n /** Centers the loader in a container */\n center?: boolean;\n /** Inline the loader so it can be used in a span or paragraph */\n inline?: boolean;\n /** Loader is displayed with grey background covering the entire screen */\n overlay?: keyof typeof Overlay;\n /** Individual id for loading icon (aria-labelledby). */\n ariaLabelledById?: string;\n /** String that labels the current loading element */\n ariaLabel?: string;\n}\n\nconst Loader = React.forwardRef(function LoaderForwardedRef(props: LoaderProps, ref: React.ForwardedRef<HTMLElement>) {\n const {\n overlay,\n color = overlay ? 'black' : 'neutral',\n size = 'small',\n className = '',\n labelId = uuid(),\n testId,\n center,\n inline,\n ariaLabelledById,\n ariaLabel = 'Laster inn',\n } = props;\n\n const showLoader = (): boolean => {\n if (overlay === Overlay.parent || inline) {\n return false;\n }\n\n return true;\n };\n\n const [display, setDisplay] = useState(showLoader());\n\n const isSmall = size === 'small';\n const isMedium = size === 'medium';\n const isLarge = size === 'large';\n\n const loaderWrapperClasses = classNames(loaderStyles['loader-wrapper'], {\n [loaderStyles['loader-wrapper--center']]: center,\n [loaderStyles['loader-wrapper--overlay']]: overlay,\n [loaderStyles['loader-wrapper--overlay-screen']]: overlay === Overlay.screen,\n [loaderStyles['loader-wrapper--overlay-parent']]: overlay === Overlay.parent && display,\n [loaderStyles['loader-wrapper--inline']]: inline && display,\n });\n const loaderClasses = classNames(\n loaderStyles.loader,\n {\n [loaderStyles['loader--small']]: isSmall,\n [loaderStyles['loader--medium']]: isMedium,\n [loaderStyles['loader--large']]: isLarge,\n },\n className\n );\n const loaderDotClasses = classNames(loaderStyles.loader__dot, {\n [loaderStyles['loader__dot--small']]: isSmall,\n [loaderStyles['loader__dot--medium']]: isMedium,\n [loaderStyles['loader__dot--large']]: isLarge,\n [loaderStyles['loader__dot--banana']]: color === 'banana',\n [loaderStyles['loader__dot--cherry']]: color === 'cherry',\n [loaderStyles['loader__dot--kiwi']]: color === 'kiwi',\n [loaderStyles['loader__dot--neutral']]: color === 'neutral',\n [loaderStyles['loader__dot--plum']]: color === 'plum',\n [loaderStyles['loader__dot--black']]: color === 'black',\n [loaderStyles['loader__dot--white']]: color === 'white',\n });\n\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (overlay === Overlay.parent && wrapperRef.current?.parentElement?.style) {\n wrapperRef.current.parentElement.style.position = 'relative';\n setDisplay(true);\n }\n\n if (inline && wrapperRef.current?.parentElement?.style) {\n wrapperRef.current.parentElement.style.display = 'flex';\n setDisplay(true);\n }\n }, []);\n\n return (\n <div className={loaderWrapperClasses} ref={wrapperRef}>\n {display && (\n <div\n data-testid={testId}\n data-analyticsid={AnalyticsId.Loader}\n role=\"progressbar\"\n aria-labelledby={ariaLabelledById || labelId}\n className={loaderClasses}\n >\n <div className={loaderDotClasses} />\n <div className={loaderDotClasses} />\n <div className={loaderDotClasses} />\n <div className={loaderDotClasses} />\n {!ariaLabelledById && (\n <span id={labelId} className={loaderStyles['loader__hidden-text']}>\n {ariaLabel}\n </span>\n )}\n </div>\n )}\n </div>\n );\n});\n\nexport default Loader;\n"],"names":["Overlay","Loader","React","props","ref","overlay","color","size","className","labelId","uuid","testId","center","inline","ariaLabelledById","ariaLabel","showLoader","display","setDisplay","useState","isSmall","isMedium","isLarge","loaderWrapperClasses","classNames","loaderStyles","loaderClasses","loaderDotClasses","wrapperRef","useRef","useEffect","_b","_a","_d","_c","AnalyticsId"],"mappings":"mPAUY,IAAAA,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SAFCA,IAAAA,GAAA,CAAA,CAAA,EA4BZ,MAAMC,EAASC,EAAM,WAAW,SAA4BC,EAAoBC,EAAsC,CAC9G,KAAA,CACJ,QAAAC,EACA,MAAAC,EAAQD,EAAU,QAAU,UAC5B,KAAAE,EAAO,QACP,UAAAC,EAAY,GACZ,QAAAC,EAAUC,EAAK,EACf,OAAAC,EACA,OAAAC,EACA,OAAAC,EACA,iBAAAC,EACA,UAAAC,EAAY,YACV,EAAAZ,EAEEa,EAAa,IACb,EAAAX,IAAY,UAAkBQ,GAO9B,CAACI,EAASC,CAAU,EAAIC,EAASH,EAAY,CAAA,EAE7CI,EAAUb,IAAS,QACnBc,EAAWd,IAAS,SACpBe,EAAUf,IAAS,QAEnBgB,EAAuBC,EAAWC,EAAa,kBAAmB,CACtE,CAACA,EAAa,2BAA4Bb,EAC1C,CAACa,EAAa,4BAA6BpB,EAC3C,CAACoB,EAAa,mCAAoCpB,IAAY,SAC9D,CAACoB,EAAa,mCAAoCpB,IAAY,UAAkBY,EAChF,CAACQ,EAAa,2BAA4BZ,GAAUI,CAAA,CACrD,EACKS,EAAgBF,EACpBC,EAAa,OACb,CAC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,CAAkB,CAAA,EACjC,CAACb,GACCZ,EAAA,cAAA,OAAA,CAAK,GAAIO,EAAS,UAAWgB,EAAa,sBAAA,EACxCV,CACH,CAEJ,CAEJ,CAEJ,CAAC"}
@@ -1,2 +1,2 @@
1
- import"../../Modal.js";import{b as K,a as L,M as N}from"../../Modal.js";import"react";import"classnames";import"../../theme/palette.js";import"../../Button.js";import"../../constants.js";import"../../uuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../hooks/useHover.js";import"../../hooks/useIcons.js";import"../../hooks/useBreakpoint.js";import"../Button/styles.module.scss";import"../Icons/ArrowRight.js";import"../../hooks/useSize.js";import"../../debounce.js";import"./styles.module.scss";import"../Icons/AlertSignStroke.js";import"../Icons/AlertSignFill.js";import"../../hooks/useFocusTrap.js";import"../../hooks/focus-utils.js";import"../../hooks/useFocusableElements.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../Title.js";import"../Title/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../Icons/CheckOutline.js";import"../Portal/index.js";import"react-dom";export{K as ModalSize,L as ModalVariants,N as default};
1
+ import"../../Modal.js";import{b as N,a as O,M as P}from"../../Modal.js";import"react";import"classnames";import"../../theme/palette.js";import"../../Button.js";import"../../constants.js";import"../../utils/environment.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../hooks/useHover.js";import"../../hooks/useIcons.js";import"../../hooks/useBreakpoint.js";import"../Button/styles.module.scss";import"../Icons/ArrowRight.js";import"../../hooks/useSize.js";import"../../utils/debounce.js";import"./styles.module.scss";import"../Icons/AlertSignStroke.js";import"../Icons/AlertSignFill.js";import"../../hooks/useFocusTrap.js";import"../../utils/focus.js";import"../../hooks/useFocusableElements.js";import"../../hooks/useElementList.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../Title.js";import"../Title/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../Icons/CheckOutline.js";import"../Portal/index.js";import"react-dom";export{N as ModalSize,O as ModalVariants,P as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import t from"react";import p from"classnames";import e from"./styles.module.scss";import{C as k}from"../../Close.js";import{AnalyticsId as L}from"../../constants.js";import{useUuid as A}from"../../hooks/useUuid.js";import{palette as o}from"../../theme/palette.js";import{g as S}from"../../accessibility.js";import{Icon as r}from"../Icons/Icon.js";import $ from"../Icons/InfoSignStroke.js";import h from"../Icons/AlertSignStroke.js";import v from"../Icons/AlertSignFill.js";import"../Icons/X.js";import"../../uuid.js";import"../Close/styles.module.scss";import"../../hooks/useBreakpoint.js";import"../../theme/grid.js";const P={info:t.createElement(r,{svgIcon:$,color:o.kiwi900,hoverColor:o.kiwi900}),warn:t.createElement(r,{svgIcon:h,color:"black",hoverColor:"black"}),alert:t.createElement(r,{svgIcon:v,color:o.cherry500,hoverColor:o.cherry500}),alertLabel:t.createElement(r,{svgIcon:h,color:o.cherry500,hoverColor:o.cherry500}),crisis:t.createElement(r,{svgIcon:v,color:o.banana200,hoverColor:o.banana200})},F=({fluid:l,variant:s,shadow:n,children:a})=>{if(l){const c=p(e["fluid-wrapper"],e[`fluid-wrapper--${s}`],{[e["fluid-wrapper--shadow"]]:n});return t.createElement("div",{className:c},a)}return a},V=t.forwardRef((l,s)=>{const{children:n,variant:a="info",shadow:c=!1,dismissable:d=!1,onClick:C,label:i,fluid:b=!1,size:u,className:E,labelId:I,testId:_}=l,m=A(I),g=()=>{const N=p(e["notification-panel__content"],e[`notification-panel__content--${a}`]);return t.createElement("div",{className:N,id:i?void 0:m},i&&t.createElement("h1",{className:e["notification-panel__label"],dangerouslySetInnerHTML:{__html:i},id:m}),n)},f=!!i&&!n,w=p(e["notification-panel"],u&&e[`notification-panel--${u}`],e[`notification-panel--${a}`],{[e["notification-panel--shadow"]]:!b&&c,[e["notification-panel--has-children"]]:!!n,[e["notification-panel--label-only"]]:f,[e["notification-panel--dismissable"]]:!f&&d},E),y=S({label:i,id:m});return t.createElement(F,{fluid:b,variant:a,shadow:c},t.createElement("section",{ref:s,"data-testid":_,"data-analyticsid":L.NotificationPanel,className:w,...y},t.createElement("span",{className:e["notification-panel__icon"]},P[a==="alert"&&i&&!n?"alertLabel":a]),!f&&d&&t.createElement("span",{className:e["notification-panel__close"]},t.createElement(k,{ariaLabel:l.ariaLabelCloseBtn,onClick:C})),g()))});export{V as default};
1
+ import t from"react";import p from"classnames";import e from"./styles.module.scss";import{C as k}from"../../Close.js";import{AnalyticsId as L}from"../../constants.js";import{useUuid as A}from"../../hooks/useUuid.js";import{palette as o}from"../../theme/palette.js";import{getAriaLabelAttributes as S}from"../../utils/accessibility.js";import{Icon as r}from"../Icons/Icon.js";import $ from"../Icons/InfoSignStroke.js";import h from"../Icons/AlertSignStroke.js";import v from"../Icons/AlertSignFill.js";import"../Icons/X.js";import"../../uuid.js";import"../../utils/environment.js";import"../Close/styles.module.scss";import"../../hooks/useBreakpoint.js";import"../../theme/grid.js";const P={info:t.createElement(r,{svgIcon:$,color:o.kiwi900,hoverColor:o.kiwi900}),warn:t.createElement(r,{svgIcon:h,color:"black",hoverColor:"black"}),alert:t.createElement(r,{svgIcon:v,color:o.cherry500,hoverColor:o.cherry500}),alertLabel:t.createElement(r,{svgIcon:h,color:o.cherry500,hoverColor:o.cherry500}),crisis:t.createElement(r,{svgIcon:v,color:o.banana200,hoverColor:o.banana200})},F=({fluid:l,variant:s,shadow:n,children:a})=>{if(l){const c=p(e["fluid-wrapper"],e[`fluid-wrapper--${s}`],{[e["fluid-wrapper--shadow"]]:n});return t.createElement("div",{className:c},a)}return a},X=t.forwardRef((l,s)=>{const{children:n,variant:a="info",shadow:c=!1,dismissable:d=!1,onClick:C,label:i,fluid:b=!1,size:u,className:E,labelId:I,testId:_}=l,m=A(I),g=()=>{const N=p(e["notification-panel__content"],e[`notification-panel__content--${a}`]);return t.createElement("div",{className:N,id:i?void 0:m},i&&t.createElement("h1",{className:e["notification-panel__label"],dangerouslySetInnerHTML:{__html:i},id:m}),n)},f=!!i&&!n,w=p(e["notification-panel"],u&&e[`notification-panel--${u}`],e[`notification-panel--${a}`],{[e["notification-panel--shadow"]]:!b&&c,[e["notification-panel--has-children"]]:!!n,[e["notification-panel--label-only"]]:f,[e["notification-panel--dismissable"]]:!f&&d},E),y=S({label:i,id:m});return t.createElement(F,{fluid:b,variant:a,shadow:c},t.createElement("section",{ref:s,"data-testid":_,"data-analyticsid":L.NotificationPanel,className:w,...y},t.createElement("span",{className:e["notification-panel__icon"]},P[a==="alert"&&i&&!n?"alertLabel":a]),!f&&d&&t.createElement("span",{className:e["notification-panel__close"]},t.createElement(k,{ariaLabel:l.ariaLabelCloseBtn,onClick:C})),g()))});export{X as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/NotificationPanel/NotificationPanel.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\nimport styles from './styles.module.scss';\nimport Close from '../Close';\nimport { AnalyticsId } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { palette } from '../../theme/palette';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport Icon from '../Icons';\nimport InfoSignStroke from '../Icons/InfoSignStroke';\nimport AlertSignStroke from '../Icons/AlertSignStroke';\nimport AlertSignFill from '../Icons/AlertSignFill';\n\nexport type NotificationPanelVariants = 'info' | 'warn' | 'alert' | 'crisis';\nexport type NotificationPanelSizes = 'small' | 'medium' | 'large';\n\nconst variantToIconMap = {\n info: <Icon svgIcon={InfoSignStroke} color={palette.kiwi900} hoverColor={palette.kiwi900} />,\n warn: <Icon svgIcon={AlertSignStroke} color=\"black\" hoverColor=\"black\" />,\n alert: <Icon svgIcon={AlertSignFill} color={palette.cherry500} hoverColor={palette.cherry500} />,\n alertLabel: <Icon svgIcon={AlertSignStroke} color={palette.cherry500} hoverColor={palette.cherry500} />,\n crisis: <Icon svgIcon={AlertSignFill} color={palette.banana200} hoverColor={palette.banana200} />,\n};\n\ninterface NotificationPanelProps {\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds inner child elements. */\n children?: React.ReactNode;\n /** Changes the visual representation of the notification panel. */\n variant?: NotificationPanelVariants;\n /** Adds a shadow effect around the notification panel. */\n shadow?: boolean;\n /** Sets a fixed size for the content container. */\n size?: NotificationPanelSizes;\n /** Used in combination with dismissiable property to close the notification panel. */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Toggles the close button in the top right corner. Will only show if there are children. */\n dismissable?: boolean;\n /** Enables a fluid outer container that spans the entire width of parent. */\n fluid?: boolean;\n /** Sets a label for the notification panel. */\n label?: string;\n /** Close button aria-label */\n ariaLabelCloseBtn?: string;\n /** Custom id for the label */\n labelId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\ntype WrapFluidProps = Pick<NotificationPanelProps, 'fluid' | 'variant' | 'shadow'> & {\n children: React.ReactElement;\n};\n\nconst FluidWrapper: React.FC<WrapFluidProps> = ({ fluid, variant, shadow, children }) => {\n if (fluid) {\n const fluidClasses = classNames(styles['fluid-wrapper'], styles[`fluid-wrapper--${variant}`], {\n [styles['fluid-wrapper--shadow']]: shadow,\n });\n\n return <div className={fluidClasses}>{children}</div>;\n }\n return children;\n};\n\nconst NotificationPanel = React.forwardRef<HTMLDivElement, NotificationPanelProps>((props, ref) => {\n const {\n children,\n variant = 'info',\n shadow = false,\n dismissable = false,\n onClick,\n label,\n fluid = false,\n size,\n className,\n labelId,\n testId,\n } = props;\n const uuid = useUuid(labelId);\n\n const renderContent = (): JSX.Element => {\n const contentClasses = classNames(styles['notification-panel__content'], styles[`notification-panel__content--${variant}`]);\n\n return (\n <div className={contentClasses} id={!label ? uuid : undefined}>\n {label && <h1 className={styles['notification-panel__label']} dangerouslySetInnerHTML={{ __html: label }} id={uuid} />}\n {children}\n </div>\n );\n };\n\n const labelOnly = !!label && !children;\n\n const notificationPanelClasses = classNames(\n styles['notification-panel'],\n size && styles[`notification-panel--${size}`],\n styles[`notification-panel--${variant}`],\n {\n [styles['notification-panel--shadow']]: !fluid && shadow,\n [styles['notification-panel--has-children']]: !!children,\n [styles['notification-panel--label-only']]: labelOnly,\n [styles['notification-panel--dismissable']]: !labelOnly && dismissable,\n },\n className\n );\n\n const ariaLabelAttributes = getAriaLabelAttributes({ label, id: uuid });\n\n return (\n <FluidWrapper fluid={fluid} variant={variant} shadow={shadow}>\n <section\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.NotificationPanel}\n className={notificationPanelClasses}\n {...ariaLabelAttributes}\n >\n <span className={styles['notification-panel__icon']}>\n {variantToIconMap[variant === 'alert' && label && !children ? 'alertLabel' : variant]}\n </span>\n {!labelOnly && dismissable && (\n <span className={styles['notification-panel__close']}>\n <Close ariaLabel={props.ariaLabelCloseBtn} onClick={onClick} />\n </span>\n )}\n {renderContent()}\n </section>\n </FluidWrapper>\n );\n});\n\nexport default NotificationPanel;\n"],"names":["variantToIconMap","React","Icon","InfoSignStroke","palette","AlertSignStroke","AlertSignFill","FluidWrapper","fluid","variant","shadow","children","fluidClasses","classNames","styles","NotificationPanel","props","ref","dismissable","onClick","label","size","className","labelId","testId","uuid","useUuid","renderContent","contentClasses","labelOnly","notificationPanelClasses","ariaLabelAttributes","getAriaLabelAttributes","AnalyticsId","Close"],"mappings":"2mBAiBA,MAAMA,EAAmB,CACvB,KAAOC,EAAA,cAAAC,EAAA,CAAK,QAASC,EAAgB,MAAOC,EAAQ,QAAS,WAAYA,EAAQ,OAAA,CAAS,EAC1F,KAAOH,EAAA,cAAAC,EAAA,CAAK,QAASG,EAAiB,MAAM,QAAQ,WAAW,OAAA,CAAQ,EACvE,MAAQJ,EAAA,cAAAC,EAAA,CAAK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BAAuBL,KAC9B,CACE,CAACK,EAAO,+BAAgC,CAACN,GAASE,EAClD,CAACI,EAAO,qCAAsC,CAAC,CAACH,EAChD,CAACG,EAAO,mCAAoCe,EAC5C,CAACf,EAAO,oCAAqC,CAACe,GAAaX,CAC7D,EACAI,CAAA,EAGIS,EAAsBC,EAAuB,CAAE,MAAAZ,EAAO,GAAIK,EAAM,EAEtE,OACGxB,EAAA,cAAAM,EAAA,CAAa,MAAAC,EAAc,QAAAC,EAAkB,OAAAC,CAAA,EAC3CT,EAAA,cAAA,UAAA,CACC,IAAAgB,EACA,cAAaO,EACb,mBAAkBS,EAAY,kBAC9B,UAAWH,EACV,GAAGC,CAAA,EAEH9B,EAAA,cAAA,OAAA,CAAK,UAAWa,EAAO,2BAAA,EACrBd,EAAiBS,IAAY,SAAWW,GAAS,CAACT,EAAW,aAAeF,EAC/E,EACC,CAACoB,GAAaX,GACZjB,EAAA,cAAA,OAAA,CAAK,UAAWa,EAAO,4BAAA,EACrBb,EAAA,cAAAiC,EAAA,CAAM,UAAWlB,EAAM,kBAAmB,QAAAG,CAAA,CAAkB,CAC/D,EAEDQ,EACH,CAAA,CACF,CAEJ,CAAC"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/NotificationPanel/NotificationPanel.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\nimport styles from './styles.module.scss';\nimport Close from '../Close';\nimport { AnalyticsId } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { palette } from '../../theme/palette';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport Icon from '../Icons';\nimport InfoSignStroke from '../Icons/InfoSignStroke';\nimport AlertSignStroke from '../Icons/AlertSignStroke';\nimport AlertSignFill from '../Icons/AlertSignFill';\n\nexport type NotificationPanelVariants = 'info' | 'warn' | 'alert' | 'crisis';\nexport type NotificationPanelSizes = 'small' | 'medium' | 'large';\n\nconst variantToIconMap = {\n info: <Icon svgIcon={InfoSignStroke} color={palette.kiwi900} hoverColor={palette.kiwi900} />,\n warn: <Icon svgIcon={AlertSignStroke} color=\"black\" hoverColor=\"black\" />,\n alert: <Icon svgIcon={AlertSignFill} color={palette.cherry500} hoverColor={palette.cherry500} />,\n alertLabel: <Icon svgIcon={AlertSignStroke} color={palette.cherry500} hoverColor={palette.cherry500} />,\n crisis: <Icon svgIcon={AlertSignFill} color={palette.banana200} hoverColor={palette.banana200} />,\n};\n\ninterface NotificationPanelProps {\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds inner child elements. */\n children?: React.ReactNode;\n /** Changes the visual representation of the notification panel. */\n variant?: NotificationPanelVariants;\n /** Adds a shadow effect around the notification panel. */\n shadow?: boolean;\n /** Sets a fixed size for the content container. */\n size?: NotificationPanelSizes;\n /** Used in combination with dismissiable property to close the notification panel. */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Toggles the close button in the top right corner. Will only show if there are children. */\n dismissable?: boolean;\n /** Enables a fluid outer container that spans the entire width of parent. */\n fluid?: boolean;\n /** Sets a label for the notification panel. */\n label?: string;\n /** Close button aria-label */\n ariaLabelCloseBtn?: string;\n /** Custom id for the label */\n labelId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\ntype WrapFluidProps = Pick<NotificationPanelProps, 'fluid' | 'variant' | 'shadow'> & {\n children: React.ReactElement;\n};\n\nconst FluidWrapper: React.FC<WrapFluidProps> = ({ fluid, variant, shadow, children }) => {\n if (fluid) {\n const fluidClasses = classNames(styles['fluid-wrapper'], styles[`fluid-wrapper--${variant}`], {\n [styles['fluid-wrapper--shadow']]: shadow,\n });\n\n return <div className={fluidClasses}>{children}</div>;\n }\n return children;\n};\n\nconst NotificationPanel = React.forwardRef<HTMLDivElement, NotificationPanelProps>((props, ref) => {\n const {\n children,\n variant = 'info',\n shadow = false,\n dismissable = false,\n onClick,\n label,\n fluid = false,\n size,\n className,\n labelId,\n testId,\n } = props;\n const uuid = useUuid(labelId);\n\n const renderContent = (): JSX.Element => {\n const contentClasses = classNames(styles['notification-panel__content'], styles[`notification-panel__content--${variant}`]);\n\n return (\n <div className={contentClasses} id={!label ? uuid : undefined}>\n {label && <h1 className={styles['notification-panel__label']} dangerouslySetInnerHTML={{ __html: label }} id={uuid} />}\n {children}\n </div>\n );\n };\n\n const labelOnly = !!label && !children;\n\n const notificationPanelClasses = classNames(\n styles['notification-panel'],\n size && styles[`notification-panel--${size}`],\n styles[`notification-panel--${variant}`],\n {\n [styles['notification-panel--shadow']]: !fluid && shadow,\n [styles['notification-panel--has-children']]: !!children,\n [styles['notification-panel--label-only']]: labelOnly,\n [styles['notification-panel--dismissable']]: !labelOnly && dismissable,\n },\n className\n );\n\n const ariaLabelAttributes = getAriaLabelAttributes({ label, id: uuid });\n\n return (\n <FluidWrapper fluid={fluid} variant={variant} shadow={shadow}>\n <section\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.NotificationPanel}\n className={notificationPanelClasses}\n {...ariaLabelAttributes}\n >\n <span className={styles['notification-panel__icon']}>\n {variantToIconMap[variant === 'alert' && label && !children ? 'alertLabel' : variant]}\n </span>\n {!labelOnly && dismissable && (\n <span className={styles['notification-panel__close']}>\n <Close ariaLabel={props.ariaLabelCloseBtn} onClick={onClick} />\n </span>\n )}\n {renderContent()}\n </section>\n </FluidWrapper>\n );\n});\n\nexport default NotificationPanel;\n"],"names":["variantToIconMap","React","Icon","InfoSignStroke","palette","AlertSignStroke","AlertSignFill","FluidWrapper","fluid","variant","shadow","children","fluidClasses","classNames","styles","NotificationPanel","props","ref","dismissable","onClick","label","size","className","labelId","testId","uuid","useUuid","renderContent","contentClasses","labelOnly","notificationPanelClasses","ariaLabelAttributes","getAriaLabelAttributes","AnalyticsId","Close"],"mappings":"yqBAiBA,MAAMA,EAAmB,CACvB,KAAOC,EAAA,cAAAC,EAAA,CAAK,QAASC,EAAgB,MAAOC,EAAQ,QAAS,WAAYA,EAAQ,OAAA,CAAS,EAC1F,KAAOH,EAAA,cAAAC,EAAA,CAA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AS,CAACT,EAExBmB,EAA2BjB,EAC/BC,EAAO,sBACPO,GAAQP,EAAO,uBAAuBO,KACtCP,EAAO,uBAAuBL,KAC9B,CACE,CAACK,EAAO,+BAAgC,CAACN,GAASE,EAClD,CAACI,EAAO,qCAAsC,CAAC,CAACH,EAChD,CAACG,EAAO,mCAAoCe,EAC5C,CAACf,EAAO,oCAAqC,CAACe,GAAaX,CAC7D,EACAI,CAAA,EAGIS,EAAsBC,EAAuB,CAAE,MAAAZ,EAAO,GAAIK,EAAM,EAEtE,OACGxB,EAAA,cAAAM,EAAA,CAAa,MAAAC,EAAc,QAAAC,EAAkB,OAAAC,CAAA,EAC3CT,EAAA,cAAA,UAAA,CACC,IAAAgB,EACA,cAAaO,EACb,mBAAkBS,EAAY,kBAC9B,UAAWH,EACV,GAAGC,CAAA,EAEH9B,EAAA,cAAA,OAAA,CAAK,UAAWa,EAAO,2BAAA,EACrBd,EAAiBS,IAAY,SAAWW,GAAS,CAACT,EAAW,aAAeF,EAC/E,EACC,CAACoB,GAAaX,GACZjB,EAAA,cAAA,OAAA,CAAK,UAAWa,EAAO,4BAAA,EACrBb,EAAA,cAAAiC,EAAA,CAAM,UAAWlB,EAAM,kBAAmB,QAAAG,CAAA,CAAkB,CAC/D,EAEDQ,EACH,CAAA,CACF,CAEJ,CAAC"}
@@ -1,2 +1,2 @@
1
- import"../../Panel.js";import{c as G,a as H,b as I,P as J}from"../../Panel.js";import"react";import"classnames";import"./styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../../constants.js";import"../../Button.js";import"../../uuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../hooks/useHover.js";import"../../hooks/useIcons.js";import"../../hooks/useBreakpoint.js";import"../Button/styles.module.scss";import"../Icons/ArrowRight.js";import"../../hooks/useSize.js";import"../../debounce.js";import"../Icons/ChevronDown.js";import"../Icons/ChevronUp.js";import"../Icons/AlertSignFill.js";import"../Icons/Pencil.js";import"../Icons/Calendar.js";import"../Icons/Watch.js";import"../../hooks/usePrevious.js";import"../../accessibility.js";import"../../Badge.js";import"../Badge/styles.module.scss";export{G as PanelLayout,H as PanelStatus,I as PanelVariant,J as default};
1
+ import"../../Panel.js";import{c as H,a as I,b as J,P as K}from"../../Panel.js";import"react";import"classnames";import"./styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../../constants.js";import"../../Button.js";import"../../utils/environment.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../hooks/useHover.js";import"../../hooks/useIcons.js";import"../../hooks/useBreakpoint.js";import"../Button/styles.module.scss";import"../Icons/ArrowRight.js";import"../../hooks/useSize.js";import"../../utils/debounce.js";import"../Icons/ChevronDown.js";import"../Icons/ChevronUp.js";import"../Icons/AlertSignFill.js";import"../Icons/Pencil.js";import"../Icons/Calendar.js";import"../Icons/Watch.js";import"../../hooks/usePrevious.js";import"../../utils/accessibility.js";import"../../Badge.js";import"../Badge/styles.module.scss";export{H as PanelLayout,I as PanelStatus,J as PanelVariant,K as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import r from"react";import a from"./styles.module.scss";import{AnalyticsId as c}from"../../constants.js";import{b as p,P as f}from"../../Panel.js";import P from"classnames";import"../Panel/styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../../Button.js";import"../../uuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../hooks/useHover.js";import"../../hooks/useIcons.js";import"../../hooks/useBreakpoint.js";import"../Button/styles.module.scss";import"../Icons/ArrowRight.js";import"../../hooks/useSize.js";import"../../debounce.js";import"../Icons/ChevronDown.js";import"../Icons/ChevronUp.js";import"../Icons/AlertSignFill.js";import"../Icons/Pencil.js";import"../Icons/Calendar.js";import"../Icons/Watch.js";import"../../hooks/usePrevious.js";import"../../accessibility.js";import"../../Badge.js";import"../Badge/styles.module.scss";const y=o=>r.isValidElement(o)&&o.type===f,X=r.forwardRef(function(e,n){const{testId:s,children:l,variant:i=p.fill}=e,d=(t,m)=>r.cloneElement(t,{variant:i,noTopBorder:i===p.line&&!m,className:P(t.props.className,i!==p.line&&a["panel-list__panel"])});return r.createElement("div",{ref:n,"data-testid":s,className:a["panel-list"],"data-analyticsid":c.PanelList},r.Children.map(l,(t,m)=>y(t)?d(t,m===0):t))});export{X as default};
1
+ import r from"react";import a from"./styles.module.scss";import{AnalyticsId as c}from"../../constants.js";import{b as p,P as f}from"../../Panel.js";import P from"classnames";import"../Panel/styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../../Button.js";import"../../utils/environment.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../hooks/useHover.js";import"../../hooks/useIcons.js";import"../../hooks/useBreakpoint.js";import"../Button/styles.module.scss";import"../Icons/ArrowRight.js";import"../../hooks/useSize.js";import"../../utils/debounce.js";import"../Icons/ChevronDown.js";import"../Icons/ChevronUp.js";import"../Icons/AlertSignFill.js";import"../Icons/Pencil.js";import"../Icons/Calendar.js";import"../Icons/Watch.js";import"../../hooks/usePrevious.js";import"../../utils/accessibility.js";import"../../Badge.js";import"../Badge/styles.module.scss";const y=o=>r.isValidElement(o)&&o.type===f,Y=r.forwardRef(function(e,n){const{testId:s,children:l,variant:i=p.fill}=e,d=(t,m)=>r.cloneElement(t,{variant:i,noTopBorder:i===p.line&&!m,className:P(t.props.className,i!==p.line&&a["panel-list__panel"])});return r.createElement("div",{ref:n,"data-testid":s,className:a["panel-list"],"data-analyticsid":c.PanelList},r.Children.map(l,(t,m)=>y(t)?d(t,m===0):t))});export{Y as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/PanelList/PanelList.tsx"],"sourcesContent":["import React from 'react';\n\nimport styles from './styles.module.scss';\nimport { AnalyticsId } from '../../constants';\nimport Panel, { PanelProps, PanelVariant } from '../Panel';\nimport classNames from 'classnames';\n\ninterface PanelListProps {\n /** Panels to render inside the PanelList */\n children?: React.ReactNode;\n /** Changes the visual representation of the panel. Default: fill */\n variant?: keyof typeof PanelVariant;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst isPanelComponent = (element: {} | null | undefined): element is React.ReactElement<PanelProps> =>\n React.isValidElement<PanelProps>(element) && (element as React.ReactElement).type === Panel;\n\nconst PanelList = React.forwardRef(function BadgeForwardedRef(props: PanelListProps, ref: React.ForwardedRef<HTMLDivElement>) {\n const { testId, children, variant = PanelVariant.fill } = props;\n\n const renderPanel = (panel: React.ReactElement<PanelProps>, firstChild: boolean) =>\n React.cloneElement(panel, {\n variant: variant,\n noTopBorder: variant === PanelVariant.line && !firstChild,\n className: classNames(panel.props.className, variant !== PanelVariant.line && styles['panel-list__panel']),\n });\n\n return (\n <div ref={ref} data-testid={testId} className={styles['panel-list']} data-analyticsid={AnalyticsId.PanelList}>\n {React.Children.map(children, (child, index) => (isPanelComponent(child) ? renderPanel(child, index === 0) : child))}\n </div>\n );\n});\n\nexport default PanelList;\n"],"names":["isPanelComponent","element","React","Panel","PanelList","props","ref","testId","children","variant","PanelVariant","renderPanel","panel","firstChild","classNames","styles","AnalyticsId","child","index"],"mappings":"+hCAgBA,MAAMA,EAAoBC,GACxBC,EAAM,eAA2BD,CAAO,GAAMA,EAA+B,OAASE,EAElFC,EAAYF,EAAM,WAAW,SAA2BG,EAAuBC,EAAyC,CAC5H,KAAM,CAAE,OAAAC,EAAQ,SAAAC,EAAU,QAAAC,EAAUC,EAAa,IAAS,EAAAL,EAEpDM,EAAc,CAACC,EAAuCC,IAC1DX,EAAM,aAAaU,EAAO,CACxB,QAAAH,EACA,YAAaA,IAAYC,EAAa,MAAQ,CAACG,EAC/C,UAAWC,EAAWF,EAAM,MAAM,UAAWH,IAAYC,EAAa,MAAQK,EAAO,oBAAoB,CAAA,CAC1G,EAEH,OACGb,EAAA,cAAA,MAAA,CAAI,IAAAI,EAAU,cAAaC,EAAQ,UAAWQ,EAAO,cAAe,mBAAkBC,EAAY,SAAA,EAChGd,EAAM,SAAS,IAAIM,EAAU,CAACS,EAAOC,IAAWlB,EAAiBiB,CAAK,EAAIN,EAAYM,EAAOC,IAAU,CAAC,EAAID,CAAM,CACrH,CAEJ,CAAC"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/PanelList/PanelList.tsx"],"sourcesContent":["import React from 'react';\n\nimport styles from './styles.module.scss';\nimport { AnalyticsId } from '../../constants';\nimport Panel, { PanelProps, PanelVariant } from '../Panel';\nimport classNames from 'classnames';\n\ninterface PanelListProps {\n /** Panels to render inside the PanelList */\n children?: React.ReactNode;\n /** Changes the visual representation of the panel. Default: fill */\n variant?: keyof typeof PanelVariant;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst isPanelComponent = (element: {} | null | undefined): element is React.ReactElement<PanelProps> =>\n React.isValidElement<PanelProps>(element) && (element as React.ReactElement).type === Panel;\n\nconst PanelList = React.forwardRef(function BadgeForwardedRef(props: PanelListProps, ref: React.ForwardedRef<HTMLDivElement>) {\n const { testId, children, variant = PanelVariant.fill } = props;\n\n const renderPanel = (panel: React.ReactElement<PanelProps>, firstChild: boolean) =>\n React.cloneElement(panel, {\n variant: variant,\n noTopBorder: variant === PanelVariant.line && !firstChild,\n className: classNames(panel.props.className, variant !== PanelVariant.line && styles['panel-list__panel']),\n });\n\n return (\n <div ref={ref} data-testid={testId} className={styles['panel-list']} data-analyticsid={AnalyticsId.PanelList}>\n {React.Children.map(children, (child, index) => (isPanelComponent(child) ? renderPanel(child, index === 0) : child))}\n </div>\n );\n});\n\nexport default PanelList;\n"],"names":["isPanelComponent","element","React","Panel","PanelList","props","ref","testId","children","variant","PanelVariant","renderPanel","panel","firstChild","classNames","styles","AnalyticsId","child","index"],"mappings":"8kCAgBA,MAAMA,EAAoBC,GACxBC,EAAM,eAA2BD,CAAO,GAAMA,EAA+B,OAASE,EAElFC,EAAYF,EAAM,WAAW,SAA2BG,EAAuBC,EAAyC,CAC5H,KAAM,CAAE,OAAAC,EAAQ,SAAAC,EAAU,QAAAC,EAAUC,EAAa,IAAS,EAAAL,EAEpDM,EAAc,CAACC,EAAuCC,IAC1DX,EAAM,aAAaU,EAAO,CACxB,QAAAH,EACA,YAAaA,IAAYC,EAAa,MAAQ,CAACG,EAC/C,UAAWC,EAAWF,EAAM,MAAM,UAAWH,IAAYC,EAAa,MAAQK,EAAO,oBAAoB,CAAA,CAC1G,EAEH,OACGb,EAAA,cAAA,MAAA,CAAI,IAAAI,EAAU,cAAaC,EAAQ,UAAWQ,EAAO,cAAe,mBAAkBC,EAAY,SAAA,EAChGd,EAAM,SAAS,IAAIM,EAAU,CAACS,EAAOC,IAAWlB,EAAiBiB,CAAK,EAAIN,EAAYM,EAAOC,IAAU,CAAC,EAAID,CAAM,CACrH,CAEJ,CAAC"}
@@ -1,2 +1,2 @@
1
- import r,{useRef as y}from"react";import{useSize as A}from"../../hooks/useSize.js";import R from"classnames";import l from"./styles.module.scss";import{g as N}from"../../accessibility.js";import{AnalyticsId as v}from"../../constants.js";import"../../debounce.js";const x=4,D=24,S=8,$=(e,t)=>e<t?e:t-1,k=(e,t)=>t<e?e:t,I=(e,t,s)=>typeof e>"u"||e<t?t:e>s?s:e,W=e=>Math.floor(e/(D+x)),X=(e,t)=>(e-D)/(t-1),O=(e,t)=>e*t,T=(e,t)=>Array.from(Array(t-e+1),(s,a)=>a+e),B=(e,t,s)=>{const a=$(t,s),o=k(a,s);return{validatedValue:I(e,a,o),validatedMin:a,validatedMax:o}},g=({index:e,completed:t,distanceBetweenDots:s,position:a})=>{const o=R(l.progressbar__dot,t&&l["progressbar__dot--completed"],a&&l[`progressbar__dot--${a}`]),i=!a&&typeof e<"u"&&typeof s<"u"?{left:`${e*s+S}px`}:void 0;return r.createElement("span",{className:o,style:i,"data-testid":"dot"})},C=({allowedValues:e,currentValue:t,distanceBetweenDots:s})=>r.createElement(r.Fragment,null,e.map((a,o)=>r.createElement(g,{index:o,key:a,completed:a<t,distanceBetweenDots:s}))),q=({ariaLabelledById:e,ariaLabel:t,value:s,min:a=0,max:o=2,testId:p})=>{const i=y(null),f=y(null),{width:M=0}=A(i)||{},{width:_=0}=A(f)||{},{validatedValue:n,validatedMin:m,validatedMax:c}=B(s,a,o),d=T(m,c),h=d.indexOf(n),P=W(M),b=X(_,d.length),E=O(b,h),u=d.length<=P,V=n===c,w=N({label:t,id:e});return r.createElement("div",{className:l["progressbar-wrapper"],ref:i},r.createElement("span",{role:"progressbar",...w,"aria-valuenow":n,"aria-valuemin":m,"aria-valuemax":c,className:l.progressbar,style:{backgroundPositionX:`${V?_:E}px`},ref:f,"data-testid":p,"data-analyticsid":v.Progressbar},u&&r.createElement(C,{allowedValues:d,currentValue:n,distanceBetweenDots:b}),!u&&r.createElement(r.Fragment,null,r.createElement(g,{completed:n>m,position:"left"}),r.createElement(g,{completed:n===c,position:"right"})),r.createElement("span",{className:l.progressbar__marker,style:{left:`${E}px`}})),!u&&r.createElement("span",{className:l.progressbar__number},`${n}/${c}`))};export{q as default};
1
+ import r,{useRef as y}from"react";import{useSize as A}from"../../hooks/useSize.js";import R from"classnames";import l from"./styles.module.scss";import{getAriaLabelAttributes as N}from"../../utils/accessibility.js";import{AnalyticsId as v}from"../../constants.js";import"../../utils/debounce.js";const x=4,D=24,S=8,$=(e,t)=>e<t?e:t-1,k=(e,t)=>t<e?e:t,I=(e,t,s)=>typeof e>"u"||e<t?t:e>s?s:e,W=e=>Math.floor(e/(D+x)),X=(e,t)=>(e-D)/(t-1),O=(e,t)=>e*t,T=(e,t)=>Array.from(Array(t-e+1),(s,a)=>a+e),B=(e,t,s)=>{const a=$(t,s),o=k(a,s);return{validatedValue:I(e,a,o),validatedMin:a,validatedMax:o}},g=({index:e,completed:t,distanceBetweenDots:s,position:a})=>{const o=R(l.progressbar__dot,t&&l["progressbar__dot--completed"],a&&l[`progressbar__dot--${a}`]),i=!a&&typeof e<"u"&&typeof s<"u"?{left:`${e*s+S}px`}:void 0;return r.createElement("span",{className:o,style:i,"data-testid":"dot"})},C=({allowedValues:e,currentValue:t,distanceBetweenDots:s})=>r.createElement(r.Fragment,null,e.map((a,o)=>r.createElement(g,{index:o,key:a,completed:a<t,distanceBetweenDots:s}))),q=({ariaLabelledById:e,ariaLabel:t,value:s,min:a=0,max:o=2,testId:p})=>{const i=y(null),f=y(null),{width:M=0}=A(i)||{},{width:_=0}=A(f)||{},{validatedValue:n,validatedMin:m,validatedMax:c}=B(s,a,o),d=T(m,c),h=d.indexOf(n),P=W(M),b=X(_,d.length),E=O(b,h),u=d.length<=P,V=n===c,w=N({label:t,id:e});return r.createElement("div",{className:l["progressbar-wrapper"],ref:i},r.createElement("span",{role:"progressbar",...w,"aria-valuenow":n,"aria-valuemin":m,"aria-valuemax":c,className:l.progressbar,style:{backgroundPositionX:`${V?_:E}px`},ref:f,"data-testid":p,"data-analyticsid":v.Progressbar},u&&r.createElement(C,{allowedValues:d,currentValue:n,distanceBetweenDots:b}),!u&&r.createElement(r.Fragment,null,r.createElement(g,{completed:n>m,position:"left"}),r.createElement(g,{completed:n===c,position:"right"})),r.createElement("span",{className:l.progressbar__marker,style:{left:`${E}px`}})),!u&&r.createElement("span",{className:l.progressbar__number},`${n}/${c}`))};export{q as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Progressbar/utils.ts","../../../src/components/Progressbar/Dot.tsx","../../../src/components/Progressbar/DotList.tsx","../../../src/components/Progressbar/Progressbar.tsx"],"sourcesContent":["/**\n * Minimum avstand fra markør til prikk\n */\nconst MARKER_DOT_MIN_DISTANCE_PX = 4;\n\n/**\n * Bredde på markør\n */\nconst MARKER_WIDTH_PX = 24;\n\n/**\n * Horisontal padding på progressbar\n */\nexport const PROGRESS_BAR_PADDING_X_PX = 8;\n\n/**\n * Valider at minimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Mimimum-verdi, ikke større enn eller lik maksimum-verdi\n */\nexport const getValidatedMin = (min: number, max: number): number => (min < max ? min : max - 1);\n\n/**\n * Valider at maksimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Maksimum-verdi, ikke mindre enn minimum-verdi\n */\nexport const getValidatedMax = (min: number, max: number): number => (max < min ? min : max);\n\n/**\n * Valider at verdi er innenfor gyldig område\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Verdi, ikke mindre enn 0, ikke mer enn max\n */\nexport const getValidatedValue = (value: number | undefined, min: number, max: number): number => {\n if (typeof value === 'undefined' || value < min) {\n return min;\n }\n\n return value > max ? max : value;\n};\n\n/**\n * Finn antall prikker det er plass til\n * @param progressbarWidth Bredde på progressbar\n * @returns Antall prikker\n */\nexport const getMaximumDots = (progressbarWidth: number): number =>\n Math.floor(progressbarWidth / (MARKER_WIDTH_PX + MARKER_DOT_MIN_DISTANCE_PX));\n\n/**\n * Beregn riktig distance mellom prikker\n * @param progressbarWidth Bredde på progressbar\n * @param dots Antall prikker som skal vises\n * @returns Distanse mellom prikker\n */\nexport const getDistanceBetweenDots = (progressbarWidth: number, dots: number): number => (progressbarWidth - MARKER_WIDTH_PX) / (dots - 1);\n\n/**\n * Beregn riktig plassering av markør\n * @param distanceBetweenDots Distanse mellom prikker\n * @param index Nåværende verdi i progressbar\n * @returns Plassering til markør fra venstre\n */\nexport const getMarkerPosition = (distanceBetweenDots: number, index: number): number => distanceBetweenDots * index;\n\n/**\n * Lag liste med tillate verdier fra min til maks\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Liste med verdier\n */\nexport const getAllowedValues = (min: number, max: number): number[] => Array.from(Array(max - min + 1), (_, index) => index + min);\n\n/**\n * Valider props som skal brukes til beregning av posisjon m.m.\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Objekt med gyldige verdier\n */\nexport const getValidatedProps = (\n value: number | undefined,\n min: number,\n max: number\n): { validatedValue: number; validatedMin: number; validatedMax: number } => {\n const validatedMin = getValidatedMin(min, max);\n const validatedMax = getValidatedMax(validatedMin, max);\n const validatedValue = getValidatedValue(value, validatedMin, validatedMax);\n\n return { validatedValue, validatedMin, validatedMax };\n};\n","import classNames from 'classnames';\nimport React from 'react';\n\nimport { PROGRESS_BAR_PADDING_X_PX } from './utils';\n\nimport styles from './styles.module.scss';\n\ninterface DotProps {\n index?: number;\n completed: boolean;\n distanceBetweenDots?: number;\n position?: 'left' | 'right';\n}\n\nconst Dot: React.FC<DotProps> = ({ index, completed, distanceBetweenDots, position }) => {\n const classes = classNames(\n styles.progressbar__dot,\n completed && styles['progressbar__dot--completed'],\n position && styles[`progressbar__dot--${position}`]\n );\n const positionWithStyle = !position && typeof index !== 'undefined' && typeof distanceBetweenDots !== 'undefined';\n const style: React.HTMLAttributes<HTMLSpanElement>['style'] = positionWithStyle\n ? { left: `${index * distanceBetweenDots + PROGRESS_BAR_PADDING_X_PX}px` }\n : undefined;\n\n return <span className={classes} style={style} data-testid=\"dot\" />;\n};\n\nexport default Dot;\n","import React from 'react';\n\nimport Dot from './Dot';\n\ninterface DotListProps {\n allowedValues: number[];\n currentValue: number;\n distanceBetweenDots: number;\n}\n\nconst Dots: React.FC<DotListProps> = ({ allowedValues, currentValue, distanceBetweenDots }) => (\n <>\n {allowedValues.map((value, index) => (\n <Dot index={index} key={value} completed={value < currentValue} distanceBetweenDots={distanceBetweenDots} />\n ))}\n </>\n);\n\nexport default Dots;\n","import React, { useRef } from 'react';\n\nimport { useSize } from '../../hooks/useSize';\n\nimport DotList from './DotList';\nimport Dot from './Dot';\nimport { getMaximumDots, getDistanceBetweenDots, getMarkerPosition, getAllowedValues, getValidatedProps } from './utils';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { AnalyticsId } from '../../constants';\n\nimport styles from './styles.module.scss';\n\nexport interface ProgressbarProps {\n /**\n * Sets aria-label of the progressbar. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabel?: string;\n /**\n * Sets aria-labelledby of the progressbar. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabelledById?: string;\n /**\n * Current value. Must be between min and max\n */\n value?: number;\n /**\n * Minimum value\n */\n min?: number;\n /**\n * Maximum value\n */\n max?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Progressbar: React.FC<ProgressbarProps> = ({ ariaLabelledById, ariaLabel, value, min = 0, max = 2, testId }) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const ref = useRef<HTMLSpanElement>(null);\n const { width: wrapperWidth = 0 } = useSize(wrapperRef) || {};\n const { width: progressbarWidth = 0 } = useSize(ref) || {};\n\n const { validatedValue, validatedMin, validatedMax } = getValidatedProps(value, min, max);\n const allowedValues = getAllowedValues(validatedMin, validatedMax);\n const index = allowedValues.indexOf(validatedValue);\n const maximumDots = getMaximumDots(wrapperWidth);\n const distanceBetweenDots = getDistanceBetweenDots(progressbarWidth, allowedValues.length);\n const markerPosition = getMarkerPosition(distanceBetweenDots, index);\n\n const showAllDots = allowedValues.length <= maximumDots;\n const isCompleted = validatedValue === validatedMax;\n\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n\n return (\n <div className={styles['progressbar-wrapper']} ref={wrapperRef}>\n <span\n role=\"progressbar\"\n {...ariaLabelAttributes}\n aria-valuenow={validatedValue}\n aria-valuemin={validatedMin}\n aria-valuemax={validatedMax}\n className={styles.progressbar}\n style={{\n backgroundPositionX: `${isCompleted ? progressbarWidth : markerPosition}px`,\n }}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Progressbar}\n >\n {showAllDots && <DotList allowedValues={allowedValues} currentValue={validatedValue} distanceBetweenDots={distanceBetweenDots} />}\n {!showAllDots && (\n <>\n <Dot completed={validatedValue > validatedMin} position=\"left\" />\n <Dot completed={validatedValue === validatedMax} position=\"right\" />\n </>\n )}\n <span className={styles.progressbar__marker} style={{ left: `${markerPosition}px` }} />\n </span>\n {!showAllDots && <span className={styles.progressbar__number}>{`${validatedValue}/${validatedMax}`}</span>}\n </div>\n );\n};\n\nexport default Progressbar;\n"],"names":["MARKER_DOT_MIN_DISTANCE_PX","MARKER_WIDTH_PX","PROGRESS_BAR_PADDING_X_PX","getValidatedMin","min","max","getValidatedMax","getValidatedValue","value","getMaximumDots","progressbarWidth","getDistanceBetweenDots","dots","getMarkerPosition","distanceBetweenDots","index","getAllowedValues","_","getValidatedProps","validatedMin","validatedMax","Dot","completed","position","classes","classNames","styles","style","React","Dots","allowedValues","currentValue","Progressbar","ariaLabelledById","ariaLabel","testId","wrapperRef","useRef","ref","wrapperWidth","useSize","validatedValue","maximumDots","markerPosition","showAllDots","isCompleted","ariaLabelAttributes","getAriaLabelAttributes","AnalyticsId","DotList"],"mappings":"uQAGA,MAAMA,EAA6B,EAK7BC,EAAkB,GAKXC,EAA4B,EAQ5BC,EAAkB,CAACC,EAAaC,IAAyBD,EAAMC,EAAMD,EAAMC,EAAM,EAQjFC,EAAkB,CAACF,EAAaC,IAAyBA,EAAMD,EAAMA,EAAMC,EAS3EE,EAAoB,CAACC,EAA2BJ,EAAaC,IACpE,OAAOG,EAAU,KAAeA,EAAQJ,EACnCA,EAGFI,EAAQH,EAAMA,EAAMG,EAQhBC,EAAkBC,GAC7B,KAAK,MAAMA,GAAoBT,EAAkBD,EAA2B,EAQjEW,EAAyB,CAACD,EAA0BE,KAA0BF,EAAmBT,IAAoBW,EAAO,GAQ5HC,EAAoB,CAACC,EAA6BC,IAA0BD,EAAsBC,EAQlGC,EAAmB,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":["../../../src/components/Progressbar/utils.ts","../../../src/components/Progressbar/Dot.tsx","../../../src/components/Progressbar/DotList.tsx","../../../src/components/Progressbar/Progressbar.tsx"],"sourcesContent":["/**\n * Minimum avstand fra markør til prikk\n */\nconst MARKER_DOT_MIN_DISTANCE_PX = 4;\n\n/**\n * Bredde på markør\n */\nconst MARKER_WIDTH_PX = 24;\n\n/**\n * Horisontal padding på progressbar\n */\nexport const PROGRESS_BAR_PADDING_X_PX = 8;\n\n/**\n * Valider at minimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Mimimum-verdi, ikke større enn eller lik maksimum-verdi\n */\nexport const getValidatedMin = (min: number, max: number): number => (min < max ? min : max - 1);\n\n/**\n * Valider at maksimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Maksimum-verdi, ikke mindre enn minimum-verdi\n */\nexport const getValidatedMax = (min: number, max: number): number => (max < min ? min : max);\n\n/**\n * Valider at verdi er innenfor gyldig område\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Verdi, ikke mindre enn 0, ikke mer enn max\n */\nexport const getValidatedValue = (value: number | undefined, min: number, max: number): number => {\n if (typeof value === 'undefined' || value < min) {\n return min;\n }\n\n return value > max ? max : value;\n};\n\n/**\n * Finn antall prikker det er plass til\n * @param progressbarWidth Bredde på progressbar\n * @returns Antall prikker\n */\nexport const getMaximumDots = (progressbarWidth: number): number =>\n Math.floor(progressbarWidth / (MARKER_WIDTH_PX + MARKER_DOT_MIN_DISTANCE_PX));\n\n/**\n * Beregn riktig distance mellom prikker\n * @param progressbarWidth Bredde på progressbar\n * @param dots Antall prikker som skal vises\n * @returns Distanse mellom prikker\n */\nexport const getDistanceBetweenDots = (progressbarWidth: number, dots: number): number => (progressbarWidth - MARKER_WIDTH_PX) / (dots - 1);\n\n/**\n * Beregn riktig plassering av markør\n * @param distanceBetweenDots Distanse mellom prikker\n * @param index Nåværende verdi i progressbar\n * @returns Plassering til markør fra venstre\n */\nexport const getMarkerPosition = (distanceBetweenDots: number, index: number): number => distanceBetweenDots * index;\n\n/**\n * Lag liste med tillate verdier fra min til maks\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Liste med verdier\n */\nexport const getAllowedValues = (min: number, max: number): number[] => Array.from(Array(max - min + 1), (_, index) => index + min);\n\n/**\n * Valider props som skal brukes til beregning av posisjon m.m.\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Objekt med gyldige verdier\n */\nexport const getValidatedProps = (\n value: number | undefined,\n min: number,\n max: number\n): { validatedValue: number; validatedMin: number; validatedMax: number } => {\n const validatedMin = getValidatedMin(min, max);\n const validatedMax = getValidatedMax(validatedMin, max);\n const validatedValue = getValidatedValue(value, validatedMin, validatedMax);\n\n return { validatedValue, validatedMin, validatedMax };\n};\n","import classNames from 'classnames';\nimport React from 'react';\n\nimport { PROGRESS_BAR_PADDING_X_PX } from './utils';\n\nimport styles from './styles.module.scss';\n\ninterface DotProps {\n index?: number;\n completed: boolean;\n distanceBetweenDots?: number;\n position?: 'left' | 'right';\n}\n\nconst Dot: React.FC<DotProps> = ({ index, completed, distanceBetweenDots, position }) => {\n const classes = classNames(\n styles.progressbar__dot,\n completed && styles['progressbar__dot--completed'],\n position && styles[`progressbar__dot--${position}`]\n );\n const positionWithStyle = !position && typeof index !== 'undefined' && typeof distanceBetweenDots !== 'undefined';\n const style: React.HTMLAttributes<HTMLSpanElement>['style'] = positionWithStyle\n ? { left: `${index * distanceBetweenDots + PROGRESS_BAR_PADDING_X_PX}px` }\n : undefined;\n\n return <span className={classes} style={style} data-testid=\"dot\" />;\n};\n\nexport default Dot;\n","import React from 'react';\n\nimport Dot from './Dot';\n\ninterface DotListProps {\n allowedValues: number[];\n currentValue: number;\n distanceBetweenDots: number;\n}\n\nconst Dots: React.FC<DotListProps> = ({ allowedValues, currentValue, distanceBetweenDots }) => (\n <>\n {allowedValues.map((value, index) => (\n <Dot index={index} key={value} completed={value < currentValue} distanceBetweenDots={distanceBetweenDots} />\n ))}\n </>\n);\n\nexport default Dots;\n","import React, { useRef } from 'react';\n\nimport { useSize } from '../../hooks/useSize';\n\nimport DotList from './DotList';\nimport Dot from './Dot';\nimport { getMaximumDots, getDistanceBetweenDots, getMarkerPosition, getAllowedValues, getValidatedProps } from './utils';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { AnalyticsId } from '../../constants';\n\nimport styles from './styles.module.scss';\n\nexport interface ProgressbarProps {\n /**\n * Sets aria-label of the progressbar. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabel?: string;\n /**\n * Sets aria-labelledby of the progressbar. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabelledById?: string;\n /**\n * Current value. Must be between min and max\n */\n value?: number;\n /**\n * Minimum value\n */\n min?: number;\n /**\n * Maximum value\n */\n max?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Progressbar: React.FC<ProgressbarProps> = ({ ariaLabelledById, ariaLabel, value, min = 0, max = 2, testId }) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const ref = useRef<HTMLSpanElement>(null);\n const { width: wrapperWidth = 0 } = useSize(wrapperRef) || {};\n const { width: progressbarWidth = 0 } = useSize(ref) || {};\n\n const { validatedValue, validatedMin, validatedMax } = getValidatedProps(value, min, max);\n const allowedValues = getAllowedValues(validatedMin, validatedMax);\n const index = allowedValues.indexOf(validatedValue);\n const maximumDots = getMaximumDots(wrapperWidth);\n const distanceBetweenDots = getDistanceBetweenDots(progressbarWidth, allowedValues.length);\n const markerPosition = getMarkerPosition(distanceBetweenDots, index);\n\n const showAllDots = allowedValues.length <= maximumDots;\n const isCompleted = validatedValue === validatedMax;\n\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n\n return (\n <div className={styles['progressbar-wrapper']} ref={wrapperRef}>\n <span\n role=\"progressbar\"\n {...ariaLabelAttributes}\n aria-valuenow={validatedValue}\n aria-valuemin={validatedMin}\n aria-valuemax={validatedMax}\n className={styles.progressbar}\n style={{\n backgroundPositionX: `${isCompleted ? progressbarWidth : markerPosition}px`,\n }}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Progressbar}\n >\n {showAllDots && <DotList allowedValues={allowedValues} currentValue={validatedValue} distanceBetweenDots={distanceBetweenDots} />}\n {!showAllDots && (\n <>\n <Dot completed={validatedValue > validatedMin} position=\"left\" />\n <Dot completed={validatedValue === validatedMax} position=\"right\" />\n </>\n )}\n <span className={styles.progressbar__marker} style={{ left: `${markerPosition}px` }} />\n </span>\n {!showAllDots && <span className={styles.progressbar__number}>{`${validatedValue}/${validatedMax}`}</span>}\n </div>\n );\n};\n\nexport default Progressbar;\n"],"names":["MARKER_DOT_MIN_DISTANCE_PX","MARKER_WIDTH_PX","PROGRESS_BAR_PADDING_X_PX","getValidatedMin","min","max","getValidatedMax","getValidatedValue","value","getMaximumDots","progressbarWidth","getDistanceBetweenDots","dots","getMarkerPosition","distanceBetweenDots","index","getAllowedValues","_","getValidatedProps","validatedMin","validatedMax","Dot","completed","position","classes","classNames","styles","style","React","Dots","allowedValues","currentValue","Progressbar","ariaLabelledById","ariaLabel","testId","wrapperRef","useRef","ref","wrapperWidth","useSize","validatedValue","maximumDots","markerPosition","showAllDots","isCompleted","ariaLabelAttributes","getAriaLabelAttributes","AnalyticsId","DotList"],"mappings":"wSAGA,MAAMA,EAA6B,EAK7BC,EAAkB,GAKXC,EAA4B,EAQ5BC,EAAkB,CAACC,EAAaC,IAAyBD,EAAMC,EAAMD,EAAMC,EAAM,EAQjFC,EAAkB,CAACF,EAAaC,IAAyBA,EAAMD,EAAMA,EAAMC,EAS3EE,EAAoB,CAACC,EAA2BJ,EAAaC,IACpE,OAAOG,EAAU,KAAeA,EAAQJ,EACnCA,EAGFI,EAAQH,EAAMA,EAAMG,EAQhBC,EAAkBC,GAC7B,KAAK,MAAMA,G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,CAAA,CACvF,EACC,CAACC,GAAgBhB,EAAA,cAAA,OAAA,CAAK,UAAWF,EAAO,mBAAA,EAAsB,GAAGe,KAAkBrB,GAAe,CACrG,CAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAe,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,gBAAgB,GAAG,UAAU,CAAC;IACxH,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,oHAAoH;IACpH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,2FAkEtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAe,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,gBAAgB,GAAG,UAAU,CAAC;IACxH,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,oHAAoH;IACpH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,2FAoEtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -1,2 +1,2 @@
1
- import"../../RadioButton.js";import{R as f,R as s}from"../../RadioButton.js";import"react";import"classnames";import"../../uuid.js";import"./styles.module.scss";import"../../constants.js";export{f as RadioButton,s as default};
1
+ import"../../RadioButton.js";import{R as s,R as u}from"../../RadioButton.js";import"react";import"classnames";import"../../uuid.js";import"../../utils/environment.js";import"./styles.module.scss";import"../../constants.js";export{s as RadioButton,u as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { FormMode } from '../../constants';
3
+ declare type SelectConcept = 'normal' | 'transparent';
4
+ export interface SelectProps extends Pick<React.SelectHTMLAttributes<HTMLSelectElement>, 'name' | 'disabled' | 'required' | 'value'> {
5
+ /** Component shown after label */
6
+ afterLabelChildren?: React.ReactNode;
7
+ /** Sets the content of the select element. */
8
+ children: React.ReactNode;
9
+ /** Adds custom classes to the element. */
10
+ className?: string;
11
+ /** Changes the visuals of the component */
12
+ concept?: SelectConcept;
13
+ /** The label text above the select */
14
+ label?: string;
15
+ /** Changes the visuals of the component */
16
+ mode?: keyof typeof FormMode;
17
+ /** Activates Error style for the select component - This is can be true while errorText is empty, when in a FormGroup */
18
+ error?: boolean;
19
+ /** Error text to show above the component */
20
+ errorText?: string;
21
+ /** Sets the data-testid attribute. */
22
+ testId?: string;
23
+ /** select id of the select element */
24
+ selectId?: string;
25
+ /** Width of select in characters (approximate) */
26
+ width?: number;
27
+ }
28
+ export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
29
+ export default Select;
30
+ //# sourceMappingURL=Select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAA2C,QAAQ,EAAY,MAAM,iBAAiB,CAAC;AAO9F,aAAK,aAAa,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE9C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;IAClI,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,8CAA8C;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,yHAAyH;IACzH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAaD,eAAO,MAAM,MAAM,uFA2EjB,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -0,0 +1 @@
1
+ {"props":{"afterLabelChildren":{"defaultValue":null,"description":"Component shown after label","name":"afterLabelChildren","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"ReactNode"}},"children":{"defaultValue":null,"description":"Sets the content of the select element.","name":"children","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":true,"type":{"name":"ReactNode"}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"concept":{"defaultValue":null,"description":"Changes the visuals of the component","name":"concept","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"enum","raw":"SelectConcept","value":[{"value":"\"normal\""},{"value":"\"transparent\""}]}},"label":{"defaultValue":null,"description":"The label text above the select","name":"label","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"mode":{"defaultValue":null,"description":"Changes the visuals of the component","name":"mode","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"enum","raw":"\"onwhite\" | \"ongrey\" | \"onblueberry\" | \"ondark\" | \"oninvalid\"","value":[{"value":"\"onwhite\""},{"value":"\"ongrey\""},{"value":"\"onblueberry\""},{"value":"\"ondark\""},{"value":"\"oninvalid\""}]}},"error":{"defaultValue":null,"description":"Activates Error style for the select component - This is can be true while errorText is empty, when in a FormGroup","name":"error","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"boolean"}},"errorText":{"defaultValue":null,"description":"Error text to show above the component","name":"errorText","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"selectId":{"defaultValue":null,"description":"select id of the select element","name":"selectId","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"width":{"defaultValue":null,"description":"Width of select in characters (approximate)","name":"width","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"number"}},"name":{"defaultValue":null,"description":"","name":"name","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"}],"required":false,"type":{"name":"string"}},"disabled":{"defaultValue":null,"description":"","name":"disabled","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"required":{"defaultValue":null,"description":"","name":"required","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"value":{"defaultValue":null,"description":"","name":"value","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"}],"required":false,"type":{"name":"string | number | readonly string[]"}}}}
@@ -0,0 +1,4 @@
1
+ import Select from './Select';
2
+ export * from './Select';
3
+ export default Select;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,eAAe,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ import"../../Select.js";import{S as k,S as n}from"../../Select.js";import"react";import"classnames";import"./styles.module.scss";import"../../constants.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/ChevronDown.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";export{k as Select,n as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}