@kvdbil/components 3.3.3 → 3.3.5-2

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 (680) hide show
  1. package/cjs/ColorCard.js +48 -0
  2. package/cjs/ElevationCard.js +35 -0
  3. package/cjs/Interfaces.js +2 -0
  4. package/cjs/Types.js +2 -0
  5. package/cjs/components/Accordion/index.js +124 -0
  6. package/cjs/components/Badge/index.js +78 -0
  7. package/cjs/components/Button/index.js +170 -0
  8. package/cjs/components/Card/index.js +28 -0
  9. package/cjs/components/CheckBox/index.js +109 -0
  10. package/cjs/components/Chip/index.js +99 -0
  11. package/cjs/components/DayPicker/DayPickerNavBar.js +60 -0
  12. package/cjs/components/DayPicker/index.js +76 -0
  13. package/cjs/components/DayPicker/localeUtils.js +60 -0
  14. package/cjs/components/Dialog/index.js +88 -0
  15. package/cjs/components/ErrorMessage/index.js +31 -0
  16. package/cjs/components/FieldLabel.js +59 -0
  17. package/cjs/components/Header/Hamburger.js +55 -0
  18. package/cjs/components/Header/Link.js +53 -0
  19. package/cjs/components/Header/index.js +118 -0
  20. package/cjs/components/Hero/index.js +65 -0
  21. package/cjs/components/Icon/index.js +115 -0
  22. package/cjs/components/IconButton.js +130 -0
  23. package/cjs/components/Icons/Arrow.js +16 -0
  24. package/cjs/components/Icons/CheckCircle.js +16 -0
  25. package/cjs/components/Icons/CheckIcon.js +16 -0
  26. package/cjs/components/Icons/Close.js +16 -0
  27. package/cjs/components/Icons/ErrorCircle.js +16 -0
  28. package/cjs/components/Icons/InfoCircle.js +16 -0
  29. package/cjs/components/InlineStepper/Step.js +116 -0
  30. package/cjs/components/InlineStepper/StepCircle.js +93 -0
  31. package/cjs/components/InlineStepper/index.js +51 -0
  32. package/cjs/components/ListItem/Bacon.js +16 -0
  33. package/cjs/components/ListItem/index.js +56 -0
  34. package/cjs/components/Logo/LogoEn.js +35 -0
  35. package/cjs/components/Logo/LogoSv.js +35 -0
  36. package/cjs/components/Logo/index.js +32 -0
  37. package/cjs/components/MenuItem/index.js +99 -0
  38. package/cjs/components/Modal/index.js +137 -0
  39. package/cjs/components/NotificationButton/index.js +39 -0
  40. package/cjs/components/OffCanvas/Overlay.js +70 -0
  41. package/cjs/components/OffCanvas/index.js +133 -0
  42. package/cjs/components/OffCanvas/useClickOutside.js +21 -0
  43. package/cjs/components/RadioButton/index.js +148 -0
  44. package/cjs/components/Range/index.js +82 -0
  45. package/cjs/components/Select/components/test-icon.js +16 -0
  46. package/cjs/components/Select/index.js +225 -0
  47. package/cjs/components/Snackbar/index.js +155 -0
  48. package/cjs/components/Spinner/index.js +68 -0
  49. package/cjs/components/Stepper/index.js +60 -0
  50. package/cjs/components/StepperAccordion/index.js +133 -0
  51. package/cjs/components/Tabs/index.js +71 -0
  52. package/cjs/components/TextArea/index.js +120 -0
  53. package/cjs/components/Textfield/index.js +130 -0
  54. package/cjs/components/TimePicker/index.js +49 -0
  55. package/cjs/components/TimePicker/testHelper.js +16 -0
  56. package/cjs/components/Toggle/index.js +83 -0
  57. package/cjs/icons/components/AccountCreateIcon.js +48 -0
  58. package/cjs/icons/components/AccountIcon.js +44 -0
  59. package/cjs/icons/components/AccountLoginIcon.js +50 -0
  60. package/cjs/icons/components/ArrowDownIcon.js +44 -0
  61. package/cjs/icons/components/ArrowLeftIcon.js +42 -0
  62. package/cjs/icons/components/ArrowLeftSharpIcon.js +44 -0
  63. package/cjs/icons/components/ArrowLeftSmallIcon.js +44 -0
  64. package/cjs/icons/components/ArrowLong.js +45 -0
  65. package/cjs/icons/components/ArrowRestartIcon.js +44 -0
  66. package/cjs/icons/components/ArrowRightIcon.js +42 -0
  67. package/cjs/icons/components/ArrowRightSharpIcon.js +44 -0
  68. package/cjs/icons/components/ArrowUpIcon.js +44 -0
  69. package/cjs/icons/components/AuctionIcon.js +42 -0
  70. package/cjs/icons/components/BackArrowIcon.js +42 -0
  71. package/cjs/icons/components/Baseline360Icon.js +45 -0
  72. package/cjs/icons/components/BellIcon.js +42 -0
  73. package/cjs/icons/components/BidIcon.js +42 -0
  74. package/cjs/icons/components/BidKrIcon.js +48 -0
  75. package/cjs/icons/components/BreaksIcon.js +42 -0
  76. package/cjs/icons/components/BuyCarIcon.js +42 -0
  77. package/cjs/icons/components/CabIcon.js +44 -0
  78. package/cjs/icons/components/CalendarIcon.js +51 -0
  79. package/cjs/icons/components/CameraIcon.js +42 -0
  80. package/cjs/icons/components/Car360Icon.js +67 -0
  81. package/cjs/icons/components/CarFrontIcon.js +42 -0
  82. package/cjs/icons/components/CarSearchIcon.js +42 -0
  83. package/cjs/icons/components/CarSideIcon.js +42 -0
  84. package/cjs/icons/components/CarTiresIcon.js +42 -0
  85. package/cjs/icons/components/CaravanIcon.js +42 -0
  86. package/cjs/icons/components/CardViewIcon.js +68 -0
  87. package/cjs/icons/components/CarloanIcon.js +44 -0
  88. package/cjs/icons/components/CertifiedIcon.js +52 -0
  89. package/cjs/icons/components/ChatIcon.js +43 -0
  90. package/cjs/icons/components/CheckIcon.js +43 -0
  91. package/cjs/icons/components/CheckThinIcon.js +43 -0
  92. package/cjs/icons/components/CheckmarkFilledIcon.js +42 -0
  93. package/cjs/icons/components/CheckmarkIcon.js +42 -0
  94. package/cjs/icons/components/ClipboardFilledIcon.js +42 -0
  95. package/cjs/icons/components/ClipboardIcon.js +42 -0
  96. package/cjs/icons/components/ClockFilledIcon.js +44 -0
  97. package/cjs/icons/components/ClockIcon.js +43 -0
  98. package/cjs/icons/components/CloseIcon.js +43 -0
  99. package/cjs/icons/components/CloseThinIcon.js +44 -0
  100. package/cjs/icons/components/CoffeeIcon.js +43 -0
  101. package/cjs/icons/components/CombiIcon.js +44 -0
  102. package/cjs/icons/components/CommentCircleFilledIcon.js +48 -0
  103. package/cjs/icons/components/CommentCircleIconIcon.js +46 -0
  104. package/cjs/icons/components/CommentIcon.js +46 -0
  105. package/cjs/icons/components/ContactIcon.js +46 -0
  106. package/cjs/icons/components/CoupeIcon.js +44 -0
  107. package/cjs/icons/components/CreditCardIcon.js +43 -0
  108. package/cjs/icons/components/CrossCircleIcon.js +42 -0
  109. package/cjs/icons/components/CrownIcon.js +43 -0
  110. package/cjs/icons/components/DealmakerIcon.js +48 -0
  111. package/cjs/icons/components/DeliveryIcon.js +51 -0
  112. package/cjs/icons/components/DetailedSearchIcon.js +43 -0
  113. package/cjs/icons/components/EcoFriendlyIcon.js +46 -0
  114. package/cjs/icons/components/EditIcon.js +43 -0
  115. package/cjs/icons/components/EngineIcon.js +42 -0
  116. package/cjs/icons/components/EnglandFlagIcon.js +60 -0
  117. package/cjs/icons/components/EvaluationIcon.js +46 -0
  118. package/cjs/icons/components/ExaminationMarkFilledIcon.js +42 -0
  119. package/cjs/icons/components/ExaminationMarkIcon.js +42 -0
  120. package/cjs/icons/components/ExteriorIcon.js +42 -0
  121. package/cjs/icons/components/EyeIcon.js +48 -0
  122. package/cjs/icons/components/FacebookBtnIcon.js +42 -0
  123. package/cjs/icons/components/FacebookIcon.js +44 -0
  124. package/cjs/icons/components/FatalIcon.js +44 -0
  125. package/cjs/icons/components/FavouriteIcon.js +42 -0
  126. package/cjs/icons/components/FavouriteSolidIcon.js +42 -0
  127. package/cjs/icons/components/FilterIcon.js +44 -0
  128. package/cjs/icons/components/FinanceIcon.js +42 -0
  129. package/cjs/icons/components/FindCarIcon.js +42 -0
  130. package/cjs/icons/components/FixedMonthlyCostIcon.js +48 -0
  131. package/cjs/icons/components/FlagIcon.js +42 -0
  132. package/cjs/icons/components/FlexibilityIcon.js +48 -0
  133. package/cjs/icons/components/ForumLargeIcon.js +42 -0
  134. package/cjs/icons/components/ForumSmallIcon.js +42 -0
  135. package/cjs/icons/components/GavelIcon.js +44 -0
  136. package/cjs/icons/components/GearboxIcon.js +44 -0
  137. package/cjs/icons/components/GiftIcon.js +58 -0
  138. package/cjs/icons/components/GridViewIcon.js +42 -0
  139. package/cjs/icons/components/GroupIcon.js +79 -0
  140. package/cjs/icons/components/GuaranteeIcon.js +42 -0
  141. package/cjs/icons/components/GuaranteeLargeIcon.js +42 -0
  142. package/cjs/icons/components/GuaranteeSmallIcon.js +42 -0
  143. package/cjs/icons/components/HalfCombiIcon.js +44 -0
  144. package/cjs/icons/components/HamburgerIcon.js +42 -0
  145. package/cjs/icons/components/HandshakeIcon.js +42 -0
  146. package/cjs/icons/components/HelpingHandIcon.js +60 -0
  147. package/cjs/icons/components/IdIcon.js +45 -0
  148. package/cjs/icons/components/InformationIcon.js +42 -0
  149. package/cjs/icons/components/InstagramIcon.js +49 -0
  150. package/cjs/icons/components/InsuranceIcon.js +42 -0
  151. package/cjs/icons/components/InteriorIcon.js +44 -0
  152. package/cjs/icons/components/InteriorThinIcon.js +44 -0
  153. package/cjs/icons/components/InternationalIcon.js +50 -0
  154. package/cjs/icons/components/KvdTestIcon.js +42 -0
  155. package/cjs/icons/components/KvdVenueIcon.js +42 -0
  156. package/cjs/icons/components/LifebuoyIcon.js +42 -0
  157. package/cjs/icons/components/LiftTruckIcon.js +42 -0
  158. package/cjs/icons/components/LinkedInIcon.js +42 -0
  159. package/cjs/icons/components/ListViewIcon.js +64 -0
  160. package/cjs/icons/components/MailIcon.js +44 -0
  161. package/cjs/icons/components/MinibusIcon.js +44 -0
  162. package/cjs/icons/components/MinivanIcon.js +45 -0
  163. package/cjs/icons/components/MobileIcon.js +52 -0
  164. package/cjs/icons/components/MotorcycleIcon.js +74 -0
  165. package/cjs/icons/components/MrfLogoIcon.js +53 -0
  166. package/cjs/icons/components/NotFoundIcon.js +42 -0
  167. package/cjs/icons/components/OverbidIcon.js +44 -0
  168. package/cjs/icons/components/PdfIconIcon.js +42 -0
  169. package/cjs/icons/components/PhoneIcon.js +44 -0
  170. package/cjs/icons/components/PickUpIcon.js +42 -0
  171. package/cjs/icons/components/PinIcon.js +42 -0
  172. package/cjs/icons/components/PlayIcon.js +42 -0
  173. package/cjs/icons/components/Pricetag.js +51 -0
  174. package/cjs/icons/components/PricetagFilledKronaIcon.js +47 -0
  175. package/cjs/icons/components/PrivateCarIcon.js +42 -0
  176. package/cjs/icons/components/ProfileCircleIcon.js +42 -0
  177. package/cjs/icons/components/ProfileIcon.js +42 -0
  178. package/cjs/icons/components/RadioIcon.js +54 -0
  179. package/cjs/icons/components/ReclamationIcon.js +42 -0
  180. package/cjs/icons/components/ReleasingIcon.js +48 -0
  181. package/cjs/icons/components/RemoveFilterIcon.js +42 -0
  182. package/cjs/icons/components/ReservedPriceIcon.js +42 -0
  183. package/cjs/icons/components/ResultIcon.js +42 -0
  184. package/cjs/icons/components/SafePaymentIcon.js +42 -0
  185. package/cjs/icons/components/SaleTagIcon.js +42 -0
  186. package/cjs/icons/components/SearchCheckIcon.js +48 -0
  187. package/cjs/icons/components/SearchIcon.js +42 -0
  188. package/cjs/icons/components/SedanIcon.js +44 -0
  189. package/cjs/icons/components/SellCarIcon.js +42 -0
  190. package/cjs/icons/components/SellCarsIcon.js +42 -0
  191. package/cjs/icons/components/ServiceIcon.js +47 -0
  192. package/cjs/icons/components/ShareIcon.js +68 -0
  193. package/cjs/icons/components/ShieldIcon.js +42 -0
  194. package/cjs/icons/components/SignInIcon.js +42 -0
  195. package/cjs/icons/components/SignOutIcon.js +42 -0
  196. package/cjs/icons/components/SpeedMeterIcon.js +44 -0
  197. package/cjs/icons/components/StarCircleIcon.js +42 -0
  198. package/cjs/icons/components/StartIcon.js +50 -0
  199. package/cjs/icons/components/StoreIcon.js +42 -0
  200. package/cjs/icons/components/SuvIcon.js +44 -0
  201. package/cjs/icons/components/SwedenFlag.js +50 -0
  202. package/cjs/icons/components/TankIcon.js +52 -0
  203. package/cjs/icons/components/TireIcon.js +42 -0
  204. package/cjs/icons/components/TransportIcon.js +42 -0
  205. package/cjs/icons/components/TrashcanIcon.js +42 -0
  206. package/cjs/icons/components/TrophyIcon.js +42 -0
  207. package/cjs/icons/components/TruckIcon.js +42 -0
  208. package/cjs/icons/components/UmbrellaIcon.js +42 -0
  209. package/cjs/icons/components/ValuationIcon.js +42 -0
  210. package/cjs/icons/components/ValueIcon.js +47 -0
  211. package/cjs/icons/components/WarningIcon.js +42 -0
  212. package/cjs/icons/components/YoutubeIcon.js +42 -0
  213. package/cjs/icons/components/index.js +320 -0
  214. package/cjs/index.js +438 -0
  215. package/cjs/react-app-env.d.js +2 -0
  216. package/cjs/shared/constants.js +7 -0
  217. package/cjs/shared/helpers.js +28 -0
  218. package/cjs/shared/helpers.spec.js +36 -0
  219. package/cjs/shared/media-queries.js +41 -0
  220. package/cjs/styled.d.js +4 -0
  221. package/cjs/theme.js +125 -0
  222. package/cjs/typography/BodyText/index.js +66 -0
  223. package/cjs/typography/ButtonText/index.js +48 -0
  224. package/cjs/typography/Heading/index.js +92 -0
  225. package/cjs/utils/utils.js +33 -0
  226. package/esm/ColorCard.js +40 -0
  227. package/esm/ElevationCard.js +27 -0
  228. package/esm/Interfaces.js +1 -0
  229. package/esm/Types.js +1 -0
  230. package/esm/components/Accordion/index.js +115 -0
  231. package/esm/components/Badge/index.js +69 -0
  232. package/esm/components/Button/index.js +161 -0
  233. package/esm/components/Card/index.js +19 -0
  234. package/esm/components/CheckBox/index.js +100 -0
  235. package/esm/components/Chip/index.js +90 -0
  236. package/esm/components/DayPicker/DayPickerNavBar.js +52 -0
  237. package/esm/components/DayPicker/index.js +66 -0
  238. package/esm/components/DayPicker/localeUtils.js +52 -0
  239. package/esm/components/Dialog/index.js +79 -0
  240. package/esm/components/ErrorMessage/index.js +22 -0
  241. package/esm/components/FieldLabel.js +51 -0
  242. package/esm/components/Header/Hamburger.js +47 -0
  243. package/esm/components/Header/Link.js +45 -0
  244. package/esm/components/Header/index.js +109 -0
  245. package/esm/components/Hero/index.js +56 -0
  246. package/esm/components/Icon/index.js +107 -0
  247. package/esm/components/IconButton.js +122 -0
  248. package/esm/components/Icons/Arrow.js +12 -0
  249. package/esm/components/Icons/CheckCircle.js +12 -0
  250. package/esm/components/Icons/CheckIcon.js +12 -0
  251. package/esm/components/Icons/Close.js +12 -0
  252. package/esm/components/Icons/ErrorCircle.js +12 -0
  253. package/esm/components/Icons/InfoCircle.js +12 -0
  254. package/esm/components/InlineStepper/Step.js +107 -0
  255. package/esm/components/InlineStepper/StepCircle.js +85 -0
  256. package/esm/components/InlineStepper/index.js +43 -0
  257. package/esm/components/ListItem/Bacon.js +12 -0
  258. package/esm/components/ListItem/index.js +48 -0
  259. package/esm/components/Logo/LogoEn.js +31 -0
  260. package/esm/components/Logo/LogoSv.js +31 -0
  261. package/esm/components/Logo/index.js +23 -0
  262. package/esm/components/MenuItem/index.js +90 -0
  263. package/esm/components/Modal/index.js +128 -0
  264. package/esm/components/NotificationButton/index.js +31 -0
  265. package/esm/components/OffCanvas/Overlay.js +61 -0
  266. package/esm/components/OffCanvas/index.js +124 -0
  267. package/esm/components/OffCanvas/useClickOutside.js +17 -0
  268. package/esm/components/RadioButton/index.js +139 -0
  269. package/esm/components/Range/index.js +73 -0
  270. package/esm/components/Select/components/test-icon.js +12 -0
  271. package/esm/components/Select/index.js +215 -0
  272. package/esm/components/Snackbar/index.js +146 -0
  273. package/esm/components/Spinner/index.js +60 -0
  274. package/esm/components/Stepper/index.js +52 -0
  275. package/esm/components/StepperAccordion/index.js +124 -0
  276. package/esm/components/Tabs/index.js +61 -0
  277. package/esm/components/TextArea/index.js +111 -0
  278. package/esm/components/Textfield/index.js +121 -0
  279. package/esm/components/TimePicker/index.js +40 -0
  280. package/esm/components/TimePicker/testHelper.js +12 -0
  281. package/esm/components/Toggle/index.js +75 -0
  282. package/esm/icons/components/AccountCreateIcon.js +22 -0
  283. package/esm/icons/components/AccountIcon.js +18 -0
  284. package/esm/icons/components/AccountLoginIcon.js +24 -0
  285. package/esm/icons/components/ArrowDownIcon.js +18 -0
  286. package/esm/icons/components/ArrowLeftIcon.js +16 -0
  287. package/esm/icons/components/ArrowLeftSharpIcon.js +18 -0
  288. package/esm/icons/components/ArrowLeftSmallIcon.js +18 -0
  289. package/esm/icons/components/ArrowLong.js +19 -0
  290. package/esm/icons/components/ArrowRestartIcon.js +18 -0
  291. package/esm/icons/components/ArrowRightIcon.js +16 -0
  292. package/esm/icons/components/ArrowRightSharpIcon.js +18 -0
  293. package/esm/icons/components/ArrowUpIcon.js +18 -0
  294. package/esm/icons/components/AuctionIcon.js +16 -0
  295. package/esm/icons/components/BackArrowIcon.js +16 -0
  296. package/esm/icons/components/Baseline360Icon.js +19 -0
  297. package/esm/icons/components/BellIcon.js +16 -0
  298. package/esm/icons/components/BidIcon.js +16 -0
  299. package/esm/icons/components/BidKrIcon.js +22 -0
  300. package/esm/icons/components/BreaksIcon.js +16 -0
  301. package/esm/icons/components/BuyCarIcon.js +16 -0
  302. package/esm/icons/components/CabIcon.js +18 -0
  303. package/esm/icons/components/CalendarIcon.js +25 -0
  304. package/esm/icons/components/CameraIcon.js +16 -0
  305. package/esm/icons/components/Car360Icon.js +41 -0
  306. package/esm/icons/components/CarFrontIcon.js +16 -0
  307. package/esm/icons/components/CarSearchIcon.js +16 -0
  308. package/esm/icons/components/CarSideIcon.js +16 -0
  309. package/esm/icons/components/CarTiresIcon.js +16 -0
  310. package/esm/icons/components/CaravanIcon.js +16 -0
  311. package/esm/icons/components/CardViewIcon.js +42 -0
  312. package/esm/icons/components/CarloanIcon.js +18 -0
  313. package/esm/icons/components/CertifiedIcon.js +26 -0
  314. package/esm/icons/components/ChatIcon.js +17 -0
  315. package/esm/icons/components/CheckIcon.js +17 -0
  316. package/esm/icons/components/CheckThinIcon.js +17 -0
  317. package/esm/icons/components/CheckmarkFilledIcon.js +16 -0
  318. package/esm/icons/components/CheckmarkIcon.js +16 -0
  319. package/esm/icons/components/ClipboardFilledIcon.js +16 -0
  320. package/esm/icons/components/ClipboardIcon.js +16 -0
  321. package/esm/icons/components/ClockFilledIcon.js +18 -0
  322. package/esm/icons/components/ClockIcon.js +17 -0
  323. package/esm/icons/components/CloseIcon.js +17 -0
  324. package/esm/icons/components/CloseThinIcon.js +18 -0
  325. package/esm/icons/components/CoffeeIcon.js +17 -0
  326. package/esm/icons/components/CombiIcon.js +18 -0
  327. package/esm/icons/components/CommentCircleFilledIcon.js +22 -0
  328. package/esm/icons/components/CommentCircleIconIcon.js +20 -0
  329. package/esm/icons/components/CommentIcon.js +20 -0
  330. package/esm/icons/components/ContactIcon.js +20 -0
  331. package/esm/icons/components/CoupeIcon.js +18 -0
  332. package/esm/icons/components/CreditCardIcon.js +17 -0
  333. package/esm/icons/components/CrossCircleIcon.js +16 -0
  334. package/esm/icons/components/CrownIcon.js +17 -0
  335. package/esm/icons/components/DealmakerIcon.js +22 -0
  336. package/esm/icons/components/DeliveryIcon.js +25 -0
  337. package/esm/icons/components/DetailedSearchIcon.js +17 -0
  338. package/esm/icons/components/EcoFriendlyIcon.js +20 -0
  339. package/esm/icons/components/EditIcon.js +17 -0
  340. package/esm/icons/components/EngineIcon.js +16 -0
  341. package/esm/icons/components/EnglandFlagIcon.js +34 -0
  342. package/esm/icons/components/EvaluationIcon.js +20 -0
  343. package/esm/icons/components/ExaminationMarkFilledIcon.js +16 -0
  344. package/esm/icons/components/ExaminationMarkIcon.js +16 -0
  345. package/esm/icons/components/ExteriorIcon.js +16 -0
  346. package/esm/icons/components/EyeIcon.js +22 -0
  347. package/esm/icons/components/FacebookBtnIcon.js +16 -0
  348. package/esm/icons/components/FacebookIcon.js +18 -0
  349. package/esm/icons/components/FatalIcon.js +18 -0
  350. package/esm/icons/components/FavouriteIcon.js +16 -0
  351. package/esm/icons/components/FavouriteSolidIcon.js +16 -0
  352. package/esm/icons/components/FilterIcon.js +18 -0
  353. package/esm/icons/components/FinanceIcon.js +16 -0
  354. package/esm/icons/components/FindCarIcon.js +16 -0
  355. package/esm/icons/components/FixedMonthlyCostIcon.js +22 -0
  356. package/esm/icons/components/FlagIcon.js +16 -0
  357. package/esm/icons/components/FlexibilityIcon.js +22 -0
  358. package/esm/icons/components/ForumLargeIcon.js +16 -0
  359. package/esm/icons/components/ForumSmallIcon.js +16 -0
  360. package/esm/icons/components/GavelIcon.js +18 -0
  361. package/esm/icons/components/GearboxIcon.js +18 -0
  362. package/esm/icons/components/GiftIcon.js +32 -0
  363. package/esm/icons/components/GridViewIcon.js +16 -0
  364. package/esm/icons/components/GroupIcon.js +53 -0
  365. package/esm/icons/components/GuaranteeIcon.js +16 -0
  366. package/esm/icons/components/GuaranteeLargeIcon.js +16 -0
  367. package/esm/icons/components/GuaranteeSmallIcon.js +16 -0
  368. package/esm/icons/components/HalfCombiIcon.js +18 -0
  369. package/esm/icons/components/HamburgerIcon.js +16 -0
  370. package/esm/icons/components/HandshakeIcon.js +16 -0
  371. package/esm/icons/components/HelpingHandIcon.js +34 -0
  372. package/esm/icons/components/IdIcon.js +19 -0
  373. package/esm/icons/components/InformationIcon.js +16 -0
  374. package/esm/icons/components/InstagramIcon.js +23 -0
  375. package/esm/icons/components/InsuranceIcon.js +16 -0
  376. package/esm/icons/components/InteriorIcon.js +18 -0
  377. package/esm/icons/components/InteriorThinIcon.js +18 -0
  378. package/esm/icons/components/InternationalIcon.js +24 -0
  379. package/esm/icons/components/KvdTestIcon.js +16 -0
  380. package/esm/icons/components/KvdVenueIcon.js +16 -0
  381. package/esm/icons/components/LifebuoyIcon.js +16 -0
  382. package/esm/icons/components/LiftTruckIcon.js +16 -0
  383. package/esm/icons/components/LinkedInIcon.js +16 -0
  384. package/esm/icons/components/ListViewIcon.js +38 -0
  385. package/esm/icons/components/MailIcon.js +18 -0
  386. package/esm/icons/components/MinibusIcon.js +18 -0
  387. package/esm/icons/components/MinivanIcon.js +19 -0
  388. package/esm/icons/components/MobileIcon.js +26 -0
  389. package/esm/icons/components/MotorcycleIcon.js +48 -0
  390. package/esm/icons/components/MrfLogoIcon.js +27 -0
  391. package/esm/icons/components/NotFoundIcon.js +16 -0
  392. package/esm/icons/components/OverbidIcon.js +18 -0
  393. package/esm/icons/components/PdfIconIcon.js +16 -0
  394. package/esm/icons/components/PhoneIcon.js +18 -0
  395. package/esm/icons/components/PickUpIcon.js +16 -0
  396. package/esm/icons/components/PinIcon.js +16 -0
  397. package/esm/icons/components/PlayIcon.js +16 -0
  398. package/esm/icons/components/Pricetag.js +25 -0
  399. package/esm/icons/components/PricetagFilledKronaIcon.js +21 -0
  400. package/esm/icons/components/PrivateCarIcon.js +16 -0
  401. package/esm/icons/components/ProfileCircleIcon.js +16 -0
  402. package/esm/icons/components/ProfileIcon.js +16 -0
  403. package/esm/icons/components/RadioIcon.js +28 -0
  404. package/esm/icons/components/ReclamationIcon.js +16 -0
  405. package/esm/icons/components/ReleasingIcon.js +22 -0
  406. package/esm/icons/components/RemoveFilterIcon.js +16 -0
  407. package/esm/icons/components/ReservedPriceIcon.js +16 -0
  408. package/esm/icons/components/ResultIcon.js +16 -0
  409. package/esm/icons/components/SafePaymentIcon.js +16 -0
  410. package/esm/icons/components/SaleTagIcon.js +16 -0
  411. package/esm/icons/components/SearchCheckIcon.js +22 -0
  412. package/esm/icons/components/SearchIcon.js +16 -0
  413. package/esm/icons/components/SedanIcon.js +18 -0
  414. package/esm/icons/components/SellCarIcon.js +16 -0
  415. package/esm/icons/components/SellCarsIcon.js +16 -0
  416. package/esm/icons/components/ServiceIcon.js +21 -0
  417. package/esm/icons/components/ShareIcon.js +42 -0
  418. package/esm/icons/components/ShieldIcon.js +16 -0
  419. package/esm/icons/components/SignInIcon.js +16 -0
  420. package/esm/icons/components/SignOutIcon.js +16 -0
  421. package/esm/icons/components/SpeedMeterIcon.js +18 -0
  422. package/esm/icons/components/StarCircleIcon.js +16 -0
  423. package/esm/icons/components/StartIcon.js +24 -0
  424. package/esm/icons/components/StoreIcon.js +16 -0
  425. package/esm/icons/components/SuvIcon.js +18 -0
  426. package/esm/icons/components/SwedenFlag.js +24 -0
  427. package/esm/icons/components/TankIcon.js +26 -0
  428. package/esm/icons/components/TireIcon.js +16 -0
  429. package/esm/icons/components/TransportIcon.js +16 -0
  430. package/esm/icons/components/TrashcanIcon.js +16 -0
  431. package/esm/icons/components/TrophyIcon.js +16 -0
  432. package/esm/icons/components/TruckIcon.js +16 -0
  433. package/esm/icons/components/UmbrellaIcon.js +16 -0
  434. package/esm/icons/components/ValuationIcon.js +16 -0
  435. package/esm/icons/components/ValueIcon.js +21 -0
  436. package/esm/icons/components/WarningIcon.js +16 -0
  437. package/esm/icons/components/YoutubeIcon.js +16 -0
  438. package/esm/icons/components/index.js +157 -0
  439. package/esm/index.js +220 -0
  440. package/esm/react-app-env.d.js +1 -0
  441. package/esm/shared/constants.js +3 -0
  442. package/esm/shared/helpers.js +23 -0
  443. package/esm/shared/helpers.spec.js +34 -0
  444. package/esm/shared/media-queries.js +35 -0
  445. package/esm/styled.d.js +1 -0
  446. package/esm/theme.js +121 -0
  447. package/esm/typography/BodyText/index.js +48 -0
  448. package/esm/typography/ButtonText/index.js +33 -0
  449. package/esm/typography/Heading/index.js +76 -0
  450. package/esm/utils/utils.js +28 -0
  451. package/package.json +11 -5
  452. package/{ColorCard.d.ts → types/ColorCard.d.ts} +0 -0
  453. package/{ElevationCard.d.ts → types/ElevationCard.d.ts} +0 -0
  454. package/{Interfaces.d.ts → types/Interfaces.d.ts} +0 -0
  455. package/{Types.d.ts → types/Types.d.ts} +0 -0
  456. package/{components → types/components}/Accordion/index.d.ts +0 -0
  457. package/{components → types/components}/Badge/index.d.ts +0 -0
  458. package/{components → types/components}/Button/index.d.ts +0 -0
  459. package/{components → types/components}/Card/index.d.ts +0 -0
  460. package/{components → types/components}/CheckBox/index.d.ts +0 -0
  461. package/{components → types/components}/Chip/index.d.ts +0 -0
  462. package/{components → types/components}/DayPicker/DayPickerNavBar.d.ts +0 -0
  463. package/{components → types/components}/DayPicker/index.d.ts +0 -0
  464. package/{components → types/components}/DayPicker/localeUtils.d.ts +0 -0
  465. package/{components → types/components}/Dialog/index.d.ts +0 -0
  466. package/{components → types/components}/ErrorMessage/index.d.ts +0 -0
  467. package/{components → types/components}/FieldLabel.d.ts +0 -0
  468. package/{components → types/components}/Header/Hamburger.d.ts +0 -0
  469. package/{components → types/components}/Header/Link.d.ts +0 -0
  470. package/{components → types/components}/Header/index.d.ts +0 -0
  471. package/{components → types/components}/Hero/index.d.ts +0 -0
  472. package/{components → types/components}/Icon/index.d.ts +0 -0
  473. package/{components → types/components}/IconButton.d.ts +0 -0
  474. package/{components → types/components}/Icons/Arrow.d.ts +0 -0
  475. package/{components → types/components}/Icons/CheckCircle.d.ts +0 -0
  476. package/{components → types/components}/Icons/CheckIcon.d.ts +0 -0
  477. package/{components → types/components}/Icons/Close.d.ts +0 -0
  478. package/{components → types/components}/Icons/ErrorCircle.d.ts +0 -0
  479. package/{components → types/components}/Icons/InfoCircle.d.ts +0 -0
  480. package/{components → types/components}/InlineStepper/Step.d.ts +0 -0
  481. package/{components → types/components}/InlineStepper/StepCircle.d.ts +0 -0
  482. package/{components → types/components}/InlineStepper/index.d.ts +0 -0
  483. package/{components → types/components}/ListItem/Bacon.d.ts +0 -0
  484. package/{components → types/components}/ListItem/index.d.ts +0 -0
  485. package/{components → types/components}/Logo/LogoEn.d.ts +0 -0
  486. package/{components → types/components}/Logo/LogoSv.d.ts +0 -0
  487. package/{components → types/components}/Logo/index.d.ts +0 -0
  488. package/{components → types/components}/MenuItem/index.d.ts +0 -0
  489. package/{components → types/components}/Modal/index.d.ts +0 -0
  490. package/{components → types/components}/NotificationButton/index.d.ts +0 -0
  491. package/{components → types/components}/OffCanvas/Overlay.d.ts +0 -0
  492. package/{components → types/components}/OffCanvas/index.d.ts +0 -0
  493. package/{components → types/components}/OffCanvas/useClickOutside.d.ts +0 -0
  494. package/{components → types/components}/RadioButton/index.d.ts +0 -0
  495. package/{components → types/components}/Range/index.d.ts +0 -0
  496. package/types/components/Select/components/test-icon.d.ts +1 -0
  497. package/{components → types/components}/Select/index.d.ts +0 -0
  498. package/{components → types/components}/Snackbar/index.d.ts +0 -0
  499. package/{components → types/components}/Spinner/index.d.ts +0 -0
  500. package/{components → types/components}/Stepper/index.d.ts +0 -0
  501. package/{components → types/components}/StepperAccordion/index.d.ts +0 -0
  502. package/{components → types/components}/Tabs/index.d.ts +0 -0
  503. package/{components → types/components}/TextArea/index.d.ts +0 -0
  504. package/{components → types/components}/Textfield/index.d.ts +0 -0
  505. package/{components → types/components}/TimePicker/index.d.ts +0 -0
  506. package/{components → types/components}/TimePicker/testHelper.d.ts +0 -0
  507. package/{components → types/components}/Toggle/index.d.ts +0 -0
  508. package/{icons → types/icons}/components/AccountCreateIcon.d.ts +0 -0
  509. package/{icons → types/icons}/components/AccountIcon.d.ts +0 -0
  510. package/{icons → types/icons}/components/AccountLoginIcon.d.ts +0 -0
  511. package/{icons → types/icons}/components/ArrowDownIcon.d.ts +0 -0
  512. package/{icons → types/icons}/components/ArrowLeftIcon.d.ts +0 -0
  513. package/{icons → types/icons}/components/ArrowLeftSharpIcon.d.ts +0 -0
  514. package/{icons → types/icons}/components/ArrowLeftSmallIcon.d.ts +0 -0
  515. package/{icons → types/icons}/components/ArrowLong.d.ts +0 -0
  516. package/{icons → types/icons}/components/ArrowRestartIcon.d.ts +0 -0
  517. package/{icons → types/icons}/components/ArrowRightIcon.d.ts +0 -0
  518. package/{icons → types/icons}/components/ArrowRightSharpIcon.d.ts +0 -0
  519. package/{icons → types/icons}/components/ArrowUpIcon.d.ts +0 -0
  520. package/{icons → types/icons}/components/AuctionIcon.d.ts +0 -0
  521. package/{icons → types/icons}/components/BackArrowIcon.d.ts +0 -0
  522. package/{icons → types/icons}/components/Baseline360Icon.d.ts +0 -0
  523. package/{icons → types/icons}/components/BellIcon.d.ts +0 -0
  524. package/{icons → types/icons}/components/BidIcon.d.ts +0 -0
  525. package/{icons → types/icons}/components/BidKrIcon.d.ts +0 -0
  526. package/{icons → types/icons}/components/BreaksIcon.d.ts +0 -0
  527. package/{icons → types/icons}/components/BuyCarIcon.d.ts +0 -0
  528. package/{icons → types/icons}/components/CabIcon.d.ts +0 -0
  529. package/{icons → types/icons}/components/CalendarIcon.d.ts +0 -0
  530. package/{icons → types/icons}/components/CameraIcon.d.ts +0 -0
  531. package/{icons → types/icons}/components/Car360Icon.d.ts +0 -0
  532. package/{icons → types/icons}/components/CarFrontIcon.d.ts +0 -0
  533. package/{icons → types/icons}/components/CarSearchIcon.d.ts +0 -0
  534. package/{icons → types/icons}/components/CarSideIcon.d.ts +0 -0
  535. package/{icons → types/icons}/components/CarTiresIcon.d.ts +0 -0
  536. package/{icons → types/icons}/components/CaravanIcon.d.ts +0 -0
  537. package/{icons → types/icons}/components/CardViewIcon.d.ts +0 -0
  538. package/{icons → types/icons}/components/CarloanIcon.d.ts +0 -0
  539. package/{icons → types/icons}/components/CertifiedIcon.d.ts +0 -0
  540. package/{icons → types/icons}/components/ChatIcon.d.ts +0 -0
  541. package/{icons → types/icons}/components/CheckIcon.d.ts +0 -0
  542. package/{icons → types/icons}/components/CheckThinIcon.d.ts +0 -0
  543. package/{icons → types/icons}/components/CheckmarkFilledIcon.d.ts +0 -0
  544. package/{icons → types/icons}/components/CheckmarkIcon.d.ts +0 -0
  545. package/{icons → types/icons}/components/ClipboardFilledIcon.d.ts +0 -0
  546. package/{icons → types/icons}/components/ClipboardIcon.d.ts +0 -0
  547. package/{icons → types/icons}/components/ClockFilledIcon.d.ts +0 -0
  548. package/{icons → types/icons}/components/ClockIcon.d.ts +0 -0
  549. package/{icons → types/icons}/components/CloseIcon.d.ts +0 -0
  550. package/{icons → types/icons}/components/CloseThinIcon.d.ts +0 -0
  551. package/{icons → types/icons}/components/CoffeeIcon.d.ts +0 -0
  552. package/{icons → types/icons}/components/CombiIcon.d.ts +0 -0
  553. package/{icons → types/icons}/components/CommentCircleFilledIcon.d.ts +0 -0
  554. package/{icons → types/icons}/components/CommentCircleIconIcon.d.ts +0 -0
  555. package/{icons → types/icons}/components/CommentIcon.d.ts +0 -0
  556. package/{icons → types/icons}/components/ContactIcon.d.ts +0 -0
  557. package/{icons → types/icons}/components/CoupeIcon.d.ts +0 -0
  558. package/{icons → types/icons}/components/CreditCardIcon.d.ts +0 -0
  559. package/{icons → types/icons}/components/CrossCircleIcon.d.ts +0 -0
  560. package/{icons → types/icons}/components/CrownIcon.d.ts +0 -0
  561. package/{icons → types/icons}/components/DealmakerIcon.d.ts +0 -0
  562. package/{icons → types/icons}/components/DeliveryIcon.d.ts +0 -0
  563. package/{icons → types/icons}/components/DetailedSearchIcon.d.ts +0 -0
  564. package/{icons → types/icons}/components/EcoFriendlyIcon.d.ts +0 -0
  565. package/{icons → types/icons}/components/EditIcon.d.ts +0 -0
  566. package/{icons → types/icons}/components/EngineIcon.d.ts +0 -0
  567. package/{icons → types/icons}/components/EnglandFlagIcon.d.ts +0 -0
  568. package/{icons → types/icons}/components/EvaluationIcon.d.ts +0 -0
  569. package/{icons → types/icons}/components/ExaminationMarkFilledIcon.d.ts +0 -0
  570. package/{icons → types/icons}/components/ExaminationMarkIcon.d.ts +0 -0
  571. package/{icons → types/icons}/components/ExteriorIcon.d.ts +0 -0
  572. package/{icons → types/icons}/components/EyeIcon.d.ts +0 -0
  573. package/{icons → types/icons}/components/FacebookBtnIcon.d.ts +0 -0
  574. package/{icons → types/icons}/components/FacebookIcon.d.ts +0 -0
  575. package/{icons → types/icons}/components/FatalIcon.d.ts +0 -0
  576. package/{icons → types/icons}/components/FavouriteIcon.d.ts +0 -0
  577. package/{icons → types/icons}/components/FavouriteSolidIcon.d.ts +0 -0
  578. package/{icons → types/icons}/components/FilterIcon.d.ts +0 -0
  579. package/{icons → types/icons}/components/FinanceIcon.d.ts +0 -0
  580. package/{icons → types/icons}/components/FindCarIcon.d.ts +0 -0
  581. package/{icons → types/icons}/components/FixedMonthlyCostIcon.d.ts +0 -0
  582. package/{icons → types/icons}/components/FlagIcon.d.ts +0 -0
  583. package/{icons → types/icons}/components/FlexibilityIcon.d.ts +0 -0
  584. package/{icons → types/icons}/components/ForumLargeIcon.d.ts +0 -0
  585. package/{icons → types/icons}/components/ForumSmallIcon.d.ts +0 -0
  586. package/{icons → types/icons}/components/GavelIcon.d.ts +0 -0
  587. package/{icons → types/icons}/components/GearboxIcon.d.ts +0 -0
  588. package/{icons → types/icons}/components/GiftIcon.d.ts +0 -0
  589. package/{icons → types/icons}/components/GridViewIcon.d.ts +0 -0
  590. package/{icons → types/icons}/components/GroupIcon.d.ts +0 -0
  591. package/{icons → types/icons}/components/GuaranteeIcon.d.ts +0 -0
  592. package/{icons → types/icons}/components/GuaranteeLargeIcon.d.ts +0 -0
  593. package/{icons → types/icons}/components/GuaranteeSmallIcon.d.ts +0 -0
  594. package/{icons → types/icons}/components/HalfCombiIcon.d.ts +0 -0
  595. package/{icons → types/icons}/components/HamburgerIcon.d.ts +0 -0
  596. package/{icons → types/icons}/components/HandshakeIcon.d.ts +0 -0
  597. package/{icons → types/icons}/components/HelpingHandIcon.d.ts +0 -0
  598. package/{icons → types/icons}/components/IdIcon.d.ts +0 -0
  599. package/{icons → types/icons}/components/InformationIcon.d.ts +0 -0
  600. package/{icons → types/icons}/components/InstagramIcon.d.ts +0 -0
  601. package/{icons → types/icons}/components/InsuranceIcon.d.ts +0 -0
  602. package/{icons → types/icons}/components/InteriorIcon.d.ts +0 -0
  603. package/{icons → types/icons}/components/InteriorThinIcon.d.ts +0 -0
  604. package/{icons → types/icons}/components/InternationalIcon.d.ts +0 -0
  605. package/{icons → types/icons}/components/KvdTestIcon.d.ts +0 -0
  606. package/{icons → types/icons}/components/KvdVenueIcon.d.ts +0 -0
  607. package/{icons → types/icons}/components/LifebuoyIcon.d.ts +0 -0
  608. package/{icons → types/icons}/components/LiftTruckIcon.d.ts +0 -0
  609. package/{icons → types/icons}/components/LinkedInIcon.d.ts +0 -0
  610. package/{icons → types/icons}/components/ListViewIcon.d.ts +0 -0
  611. package/{icons → types/icons}/components/MailIcon.d.ts +0 -0
  612. package/{icons → types/icons}/components/MinibusIcon.d.ts +0 -0
  613. package/{icons → types/icons}/components/MinivanIcon.d.ts +0 -0
  614. package/{icons → types/icons}/components/MobileIcon.d.ts +0 -0
  615. package/{icons → types/icons}/components/MotorcycleIcon.d.ts +0 -0
  616. package/{icons → types/icons}/components/MrfLogoIcon.d.ts +0 -0
  617. package/{icons → types/icons}/components/NotFoundIcon.d.ts +0 -0
  618. package/{icons → types/icons}/components/OverbidIcon.d.ts +0 -0
  619. package/{icons → types/icons}/components/PdfIconIcon.d.ts +0 -0
  620. package/{icons → types/icons}/components/PhoneIcon.d.ts +0 -0
  621. package/{icons → types/icons}/components/PickUpIcon.d.ts +0 -0
  622. package/{icons → types/icons}/components/PinIcon.d.ts +0 -0
  623. package/{icons → types/icons}/components/PlayIcon.d.ts +0 -0
  624. package/{icons → types/icons}/components/Pricetag.d.ts +0 -0
  625. package/{icons → types/icons}/components/PricetagFilledKronaIcon.d.ts +0 -0
  626. package/{icons → types/icons}/components/PrivateCarIcon.d.ts +0 -0
  627. package/{icons → types/icons}/components/ProfileCircleIcon.d.ts +0 -0
  628. package/{icons → types/icons}/components/ProfileIcon.d.ts +0 -0
  629. package/{icons → types/icons}/components/RadioIcon.d.ts +0 -0
  630. package/{icons → types/icons}/components/ReclamationIcon.d.ts +0 -0
  631. package/{icons → types/icons}/components/ReleasingIcon.d.ts +0 -0
  632. package/{icons → types/icons}/components/RemoveFilterIcon.d.ts +0 -0
  633. package/{icons → types/icons}/components/ReservedPriceIcon.d.ts +0 -0
  634. package/{icons → types/icons}/components/ResultIcon.d.ts +0 -0
  635. package/{icons → types/icons}/components/SafePaymentIcon.d.ts +0 -0
  636. package/{icons → types/icons}/components/SaleTagIcon.d.ts +0 -0
  637. package/{icons → types/icons}/components/SearchCheckIcon.d.ts +0 -0
  638. package/{icons → types/icons}/components/SearchIcon.d.ts +0 -0
  639. package/{icons → types/icons}/components/SedanIcon.d.ts +0 -0
  640. package/{icons → types/icons}/components/SellCarIcon.d.ts +0 -0
  641. package/{icons → types/icons}/components/SellCarsIcon.d.ts +0 -0
  642. package/{icons → types/icons}/components/ServiceIcon.d.ts +0 -0
  643. package/{icons → types/icons}/components/ShareIcon.d.ts +0 -0
  644. package/{icons → types/icons}/components/ShieldIcon.d.ts +0 -0
  645. package/{icons → types/icons}/components/SignInIcon.d.ts +0 -0
  646. package/{icons → types/icons}/components/SignOutIcon.d.ts +0 -0
  647. package/{icons → types/icons}/components/SpeedMeterIcon.d.ts +0 -0
  648. package/{icons → types/icons}/components/StarCircleIcon.d.ts +0 -0
  649. package/{icons → types/icons}/components/StartIcon.d.ts +0 -0
  650. package/{icons → types/icons}/components/StoreIcon.d.ts +0 -0
  651. package/{icons → types/icons}/components/SuvIcon.d.ts +0 -0
  652. package/{icons → types/icons}/components/SwedenFlag.d.ts +0 -0
  653. package/{icons → types/icons}/components/TankIcon.d.ts +0 -0
  654. package/{icons → types/icons}/components/TireIcon.d.ts +0 -0
  655. package/{icons → types/icons}/components/TransportIcon.d.ts +0 -0
  656. package/{icons → types/icons}/components/TrashcanIcon.d.ts +0 -0
  657. package/{icons → types/icons}/components/TrophyIcon.d.ts +0 -0
  658. package/{icons → types/icons}/components/TruckIcon.d.ts +0 -0
  659. package/{icons → types/icons}/components/UmbrellaIcon.d.ts +0 -0
  660. package/{icons → types/icons}/components/ValuationIcon.d.ts +0 -0
  661. package/{icons → types/icons}/components/ValueIcon.d.ts +0 -0
  662. package/{icons → types/icons}/components/WarningIcon.d.ts +0 -0
  663. package/{icons → types/icons}/components/YoutubeIcon.d.ts +0 -0
  664. package/{icons → types/icons}/components/index.d.ts +0 -0
  665. package/types/icons/template.d.ts +10 -0
  666. package/{index.d.ts → types/index.d.ts} +0 -0
  667. package/types/serviceWorker.d.ts +2 -0
  668. package/{setupTests.d.ts → types/setupTests.d.ts} +0 -0
  669. package/{shared → types/shared}/constants.d.ts +0 -0
  670. package/{shared → types/shared}/helpers.d.ts +0 -0
  671. package/{shared → types/shared}/media-queries.d.ts +0 -0
  672. package/{testUtils.d.ts → types/testUtils.d.ts} +0 -0
  673. package/{theme.d.ts → types/theme.d.ts} +3 -3
  674. package/{typography → types/typography}/BodyText/index.d.ts +0 -0
  675. package/{typography → types/typography}/ButtonText/index.d.ts +0 -0
  676. package/{typography → types/typography}/Heading/index.d.ts +0 -0
  677. package/{utils → types/utils}/utils.d.ts +0 -0
  678. package/kvdbil-components.css +0 -224
  679. package/kvdbil-components.js +0 -1501
  680. package/kvdbil-components.js.map +0 -1
@@ -0,0 +1,60 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var styled = require('styled-components');
6
+ var theme = require('../../theme.js');
7
+ var typography_Heading_index = require('../../typography/Heading/index.js');
8
+ require('../../shared/media-queries.js');
9
+
10
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
+
12
+ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
13
+
14
+ const Container = styled__default['default'].div`
15
+ min-height: 4rem;
16
+ `;
17
+ const Line = styled__default['default'].div`
18
+ margin: auto;
19
+ width: 2px;
20
+ height: 100%;
21
+ background-color: ${theme['default'].colors.primary.main};
22
+ `;
23
+ const Graphic = styled__default['default'].div`
24
+ margin-right: 0.75rem;
25
+ `;
26
+ const Step = styled__default['default'].div`
27
+ font-family: ${({ theme: theme2 }) => theme2.typography.fontBaseFamily};
28
+ display: flex;
29
+ padding-bottom: 1rem;
30
+
31
+ &:last-child {
32
+ ${Line} {
33
+ display: none;
34
+ }
35
+ }
36
+ `;
37
+ const Circle = styled__default['default'].div`
38
+ width: 3rem;
39
+ height: 3rem;
40
+ border-radius: 3rem;
41
+
42
+ color: white;
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ background-color: ${theme['default'].colors.primary.main};
47
+ `;
48
+ const CircleText = styled__default['default'](typography_Heading_index.Title)`
49
+ font-size: 1.5rem;
50
+ font-variant: lining-nums;
51
+ `;
52
+ const Stepper = ({ children, ...props }) => {
53
+ return /* @__PURE__ */ React.createElement(Container, {
54
+ ...props
55
+ }, children.map((step, index) => /* @__PURE__ */ React.createElement(Step, {
56
+ key: index
57
+ }, /* @__PURE__ */ React.createElement(Graphic, null, /* @__PURE__ */ React.createElement(Circle, null, /* @__PURE__ */ React.createElement(CircleText, null, index + 1)), /* @__PURE__ */ React.createElement(Line, null)), step)));
58
+ };
59
+
60
+ exports.Stepper = Stepper;
@@ -0,0 +1,133 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React$1 = require('react');
6
+ var styled = require('styled-components');
7
+ var theme = require('../../theme.js');
8
+ var typography_Heading_index = require('../../typography/Heading/index.js');
9
+ var components_Icons_CheckIcon = require('../Icons/CheckIcon.js');
10
+ var components_Icons_Arrow = require('../Icons/Arrow.js');
11
+ var shared_helpers = require('../../shared/helpers.js');
12
+ var reactCollapse = require('react-collapse');
13
+ require('../../shared/media-queries.js');
14
+
15
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
+
17
+ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
18
+
19
+ const DEFAULT_TRANSITION_TIME = "200ms";
20
+ const Container = styled__default['default'].div`
21
+ .ReactCollapse--collapse {
22
+ transition: height ${DEFAULT_TRANSITION_TIME} ease-in-out;
23
+ }
24
+ `;
25
+ const HeaderExpandedProps = styled.css`
26
+ margin-top: 0.25rem;
27
+ transform: rotate(-180deg);
28
+ `;
29
+ const Header = styled__default['default'].div`
30
+ display: flex;
31
+ align-items: center;
32
+ height: 4rem;
33
+
34
+ color: ${(props) => props.isDisabled ? theme['default'].colors.text.disabled : theme['default'].colors.text.dark};
35
+ `;
36
+ const StyledTitle = styled__default['default'](typography_Heading_index.Title)`
37
+ margin: 0;
38
+ `;
39
+ const HeaderArrow = styled__default['default'](components_Icons_Arrow['default'])`
40
+ margin-left: auto;
41
+ height: 1.25rem;
42
+ width: 1.25rem;
43
+ margin-top: -0.75rem;
44
+
45
+ fill: currentColor;
46
+
47
+ transition: ${DEFAULT_TRANSITION_TIME};
48
+ transform: rotate(0deg);
49
+ transform-origin: center;
50
+ ${(props) => props.isExpanded && HeaderExpandedProps};
51
+ `;
52
+ const CircleIsCompleteStyles = (color) => styled.css`
53
+ color: white;
54
+ background-color: ${theme['default'].colors[color].main};
55
+ `;
56
+ const CircleIsDisabledStyles = (isComplete, color) => styled.css`
57
+ fill: white;
58
+ border: 2px solid ${shared_helpers.fadedColor(theme['default'].colors[color].main, 0.2)};
59
+
60
+ ${isComplete && `
61
+ border: 2px solid ${shared_helpers.fadedColor(theme['default'].colors[color].main, 0)};
62
+ background-color: ${shared_helpers.fadedColor(theme['default'].colors[color].main, 0.5)};
63
+ `}
64
+ `;
65
+ const Circle = styled__default['default'].div`
66
+ font-family: ${({ theme: theme2 }) => theme2.typography.fontBaseFamily};
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+
71
+ font-size: 1.25rem;
72
+ margin-right: 0.75rem;
73
+ width: 2rem;
74
+ height: 2rem;
75
+ border-radius: 2rem;
76
+ border: 2px solid ${(props) => theme['default'].colors[props.color].main};
77
+
78
+ svg {
79
+ fill: currentColor;
80
+ height: 1rem;
81
+ width: 1rem;
82
+
83
+ /* Kvd.se compatible stuff */
84
+ margin: 0;
85
+ top: inherit;
86
+ left: inherit;
87
+ font-size: inherit;
88
+ }
89
+
90
+ span {
91
+ font-variant: lining-nums;
92
+ margin-top: 0.1rem;
93
+ }
94
+
95
+ transition: background-color ${DEFAULT_TRANSITION_TIME};
96
+ ${(props) => props.isComplete && CircleIsCompleteStyles(props.color)};
97
+ ${(props) => props.isDisabled && CircleIsDisabledStyles(props.isComplete, props.color)};
98
+ `;
99
+ const StepperAccordion = (props) => {
100
+ const [isExpanded, setIsExpanded] = React$1.useState(props.isExpanded || false);
101
+ const toggleIsExpanded = React$1.useCallback(() => {
102
+ if (!props.isDisabled) {
103
+ setIsExpanded((previousValue) => !previousValue);
104
+ }
105
+ }, [props.isDisabled]);
106
+ React$1.useEffect(() => {
107
+ setIsExpanded(props.isExpanded || false);
108
+ }, [props.isDisabled, props.isExpanded]);
109
+ const hasSteps = props.step || props.step === 0;
110
+ const handleClick = (event) => {
111
+ const onClick = props.onClick || toggleIsExpanded;
112
+ if (!props.isDisabled) {
113
+ onClick(event);
114
+ }
115
+ };
116
+ return /* @__PURE__ */ React.createElement(Container, null, /* @__PURE__ */ React.createElement(Header, {
117
+ ...props,
118
+ onClick: handleClick,
119
+ isExpanded,
120
+ isDisabled: props.isDisabled || false
121
+ }, hasSteps && /* @__PURE__ */ React.createElement(Circle, {
122
+ isComplete: props.isComplete || false,
123
+ isDisabled: props.isDisabled || false,
124
+ color: props.color || "primary"
125
+ }, props.isComplete ? /* @__PURE__ */ React.createElement(components_Icons_CheckIcon['default'], null) : /* @__PURE__ */ React.createElement("span", null, props.step)), /* @__PURE__ */ React.createElement(StyledTitle, null, props.title), /* @__PURE__ */ React.createElement(HeaderArrow, {
126
+ isExpanded
127
+ })), /* @__PURE__ */ React.createElement(reactCollapse.Collapse, {
128
+ isOpened: isExpanded
129
+ }, props.children), props.closedChildren && props.closedChildren);
130
+ };
131
+
132
+ exports.StepperAccordion = StepperAccordion;
133
+ exports['default'] = StepperAccordion;
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React$1 = require('react');
6
+ var styled = require('styled-components');
7
+
8
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
+
10
+ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
11
+
12
+ const TabsContainer = styled__default['default'].div`
13
+ display: inline-flex;
14
+ border-bottom: 1px solid ${({ theme }) => theme.colors.gray.light4};
15
+ `;
16
+ const TabWrapper = styled__default['default'].div`
17
+ font-family: ${({ theme }) => theme.typography.fontAlternativeFamily};
18
+ font-weight: ${({ theme }) => theme.typography.fontAlternativeRegularWeight};
19
+ padding: 1em;
20
+ border-bottom: ${({ theme, isActive, activeColor }) => isActive ? `3px solid ${theme.colors[activeColor].main}` : "3px solid transparent"};
21
+ transition: color 0.3s ease, border 0.3s ease;
22
+ cursor: pointer;
23
+ `;
24
+ const Tab = ({
25
+ children,
26
+ isActive = false,
27
+ onClick,
28
+ activeColor = "primary"
29
+ }) => {
30
+ return /* @__PURE__ */ React.createElement(TabWrapper, {
31
+ isActive,
32
+ onClick,
33
+ activeColor
34
+ }, children);
35
+ };
36
+ const Tabs = ({
37
+ activeIndex,
38
+ activeColor = "primary",
39
+ children,
40
+ onTabClick,
41
+ className
42
+ }) => {
43
+ if (React$1.Children.count(children) <= 1) {
44
+ console.error("<Tabs /> component has too few children!");
45
+ return null;
46
+ }
47
+ return /* @__PURE__ */ React.createElement(TabsContainer, {
48
+ className
49
+ }, React$1.Children.map(children, (child, index) => {
50
+ if (!child) {
51
+ return null;
52
+ }
53
+ const onClick = child.props.onClick;
54
+ return /* @__PURE__ */ React.createElement(TabWrapper, {
55
+ ...child.props,
56
+ isActive: activeIndex === index,
57
+ activeColor,
58
+ onClick: (event) => {
59
+ onTabClick(index);
60
+ if (typeof onClick === "function") {
61
+ onClick(event);
62
+ }
63
+ },
64
+ as: child.type || "div"
65
+ }, child.props.children);
66
+ }));
67
+ };
68
+
69
+ exports.Tab = Tab;
70
+ exports.Tabs = Tabs;
71
+ exports['default'] = Tabs;
@@ -0,0 +1,120 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React$1 = require('react');
6
+ var styled = require('styled-components');
7
+ var theme = require('../../theme.js');
8
+ var components_FieldLabel = require('../FieldLabel.js');
9
+ var typography_BodyText_index = require('../../typography/BodyText/index.js');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
14
+
15
+ const disabledStyles = styled.css`
16
+ border: 1px solid ${theme['default'].colors.gray.light1};
17
+ color: ${theme['default'].colors.gray.dark1};
18
+ fill: ${theme['default'].colors.gray.light1};
19
+ `;
20
+ const errorStyles = styled.css`
21
+ border: 1px solid ${theme['default'].colors.error.main};
22
+ `;
23
+ const focusStyles = styled.css`
24
+ color: ${theme['default'].colors.text.dark};
25
+ border: 1px solid ${theme['default'].colors.text.dark};
26
+ fill: ${theme['default'].colors.text.dark};
27
+ `;
28
+ const TextAreaWrapper = styled__default['default'].div`
29
+ position: relative;
30
+ padding: 0;
31
+ display: inline-block;
32
+ `;
33
+ const InputWrapper = styled__default['default'].div`
34
+ display: inline-black;
35
+
36
+ color: ${theme['default'].colors.gray.light1};
37
+ fill: ${theme['default'].colors.gray.light1};
38
+ background-color: ${theme['default'].colors.background.light};
39
+
40
+ border: 1px solid ${theme['default'].colors.gray.light1};
41
+ border-radius: 0.25em;
42
+ transition: all 150ms;
43
+
44
+ padding: 0.7rem 0.75rem;
45
+
46
+ ${({ hasError, isFocused }) => !hasError && isFocused && focusStyles}
47
+ ${({ disabled }) => disabled && disabledStyles}
48
+ ${({ hasError }) => hasError && errorStyles}
49
+ ${({ centered }) => centered && `text-align: center;`}
50
+ `;
51
+ const TextAreaInput = styled__default['default'].textarea`
52
+ ${typography_BodyText_index.BodyTextStyle}
53
+
54
+ width: 100%;
55
+ cursor: text;
56
+ outline: none;
57
+ border: none;
58
+ background-color: transparent;
59
+
60
+ ${({ resize }) => !resize && "resize: none;"}
61
+ `;
62
+ const Suffix = styled__default['default'].div`
63
+ font-family: ${({ theme: theme2 }) => theme2.typography.fontBaseFamily};
64
+ `;
65
+ const HelperText = styled__default['default'].span`
66
+ display: block;
67
+ font-family: ${({ theme: theme2 }) => theme2.typography.fontBaseFamily};
68
+ font-size: 0.81rem;
69
+
70
+ margin-top: 0.25rem;
71
+ margin-left: 0.85rem;
72
+
73
+ color: ${({ hasError }) => hasError ? theme['default'].colors.error.main : theme['default'].colors.text.dark};
74
+
75
+ ${({ centered }) => centered && `width: 100%; text-align: center; display: block;`}
76
+ `;
77
+ const TextArea = ({
78
+ placeholder = "",
79
+ isDisabled = false,
80
+ centered = false,
81
+ hasError = false,
82
+ className,
83
+ helperText,
84
+ label = "",
85
+ resize = true,
86
+ ...props
87
+ }) => {
88
+ const [isFocused, setIsFocused] = React$1.useState(false);
89
+ const hasValue = Boolean(props.value);
90
+ return /* @__PURE__ */ React.createElement(TextAreaWrapper, {
91
+ className
92
+ }, /* @__PURE__ */ React.createElement(InputWrapper, {
93
+ isFocused,
94
+ disabled: isDisabled,
95
+ centered,
96
+ hasError,
97
+ hasPlaceholder: !!placeholder
98
+ }, /* @__PURE__ */ React.createElement(TextAreaInput, {
99
+ ...props,
100
+ resize,
101
+ onFocus: () => setIsFocused(true),
102
+ onBlur: () => setIsFocused(false),
103
+ disabled: isDisabled,
104
+ theme: theme['default'],
105
+ placeholder: label && !isFocused ? "" : placeholder
106
+ }), props.suffix && /* @__PURE__ */ React.createElement(Suffix, null, props.suffix)), label && /* @__PURE__ */ React.createElement(components_FieldLabel.Label, {
107
+ isFocused,
108
+ centered,
109
+ hasError,
110
+ hasValue,
111
+ disabled: isDisabled,
112
+ theme: theme['default']
113
+ }, label), helperText && /* @__PURE__ */ React.createElement(HelperText, {
114
+ centered,
115
+ hasError
116
+ }, helperText));
117
+ };
118
+
119
+ exports.TextArea = TextArea;
120
+ exports['default'] = TextArea;
@@ -0,0 +1,130 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React$1 = require('react');
6
+ var styled = require('styled-components');
7
+ var theme = require('../../theme.js');
8
+ var components_FieldLabel = require('../FieldLabel.js');
9
+ var typography_BodyText_index = require('../../typography/BodyText/index.js');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
14
+
15
+ const disabledStyles = styled.css`
16
+ border: 1px solid ${theme['default'].colors.gray.light1};
17
+ color: ${theme['default'].colors.gray.dark1};
18
+ fill: ${theme['default'].colors.gray.light1};
19
+ `;
20
+ const errorStyles = styled.css`
21
+ border: 1px solid ${theme['default'].colors.error.main};
22
+ `;
23
+ const focusStyles = styled.css`
24
+ color: ${theme['default'].colors.text.dark};
25
+ border: 1px solid ${theme['default'].colors.text.dark};
26
+ fill: ${theme['default'].colors.text.dark};
27
+ `;
28
+ const TextFieldWrapper = styled__default['default'].div`
29
+ position: relative;
30
+ padding: 0;
31
+ display: block;
32
+ `;
33
+ const InputWrapper = styled__default['default'].div`
34
+ display: flex;
35
+ text-align: center;
36
+ align-items: center;
37
+
38
+ color: ${theme['default'].colors.gray.light1};
39
+ fill: ${theme['default'].colors.gray.light1};
40
+ background-color: ${theme['default'].colors.background.light};
41
+
42
+ border: 1px solid ${theme['default'].colors.gray.light1};
43
+ border-radius: 0.25em;
44
+ transition: all 150ms;
45
+
46
+ padding: 0.7rem 0.75rem 0.6rem;
47
+
48
+ ${({ hasError, isFocused }) => !hasError && isFocused && focusStyles}
49
+ ${({ disabled }) => disabled && disabledStyles}
50
+ ${({ hasError }) => hasError && errorStyles}
51
+ ${({ centered }) => centered && `text-align: center;`}
52
+ `;
53
+ const Input = styled__default['default'].input`
54
+ ${typography_BodyText_index.BodyTextStyle}
55
+ width: 100%;
56
+ cursor: text;
57
+ outline: none;
58
+ border: none;
59
+ background-color: transparent;
60
+ `;
61
+ const Suffix = styled__default['default'].div`
62
+ font-family: ${({ theme: theme2 }) => theme2.typography.fontBaseFamily};
63
+ line-height: 0px;
64
+ margin-top: 2px;
65
+ `;
66
+ const HelperText = styled__default['default'].span`
67
+ ${typography_BodyText_index.CaptionStyle}
68
+ line-height: normal;
69
+ display: block;
70
+ margin-top: 0.25rem;
71
+ margin-left: 0.85rem;
72
+
73
+ color: ${({ hasError }) => hasError ? theme['default'].colors.error.main : theme['default'].colors.text.dark};
74
+
75
+ ${({ centered }) => centered && `width: 100%; text-align: center; display: block;`}
76
+ `;
77
+ const TextField = ({
78
+ placeholder = "",
79
+ isDisabled = false,
80
+ centered = false,
81
+ hasError = false,
82
+ className,
83
+ helperText,
84
+ label = "",
85
+ onBlur = () => null,
86
+ onFocus = () => null,
87
+ forwardRef,
88
+ ...props
89
+ }) => {
90
+ const [isFocused, setIsFocused] = React$1.useState(false);
91
+ const hasValue = Boolean(props.value);
92
+ const handleFocus = (event) => {
93
+ setIsFocused(true);
94
+ onFocus(event);
95
+ };
96
+ const handleBlur = (event) => {
97
+ setIsFocused(false);
98
+ onBlur(event);
99
+ };
100
+ return /* @__PURE__ */ React.createElement(TextFieldWrapper, {
101
+ className
102
+ }, /* @__PURE__ */ React.createElement(InputWrapper, {
103
+ isFocused,
104
+ disabled: isDisabled,
105
+ centered,
106
+ hasError,
107
+ hasPlaceholder: !!placeholder
108
+ }, /* @__PURE__ */ React.createElement(Input, {
109
+ ...props,
110
+ ref: forwardRef,
111
+ onFocus: handleFocus,
112
+ onBlur: handleBlur,
113
+ disabled: isDisabled,
114
+ theme: theme['default'],
115
+ placeholder: label && !isFocused ? "" : placeholder
116
+ }), props.suffix && /* @__PURE__ */ React.createElement(Suffix, null, props.suffix)), label && /* @__PURE__ */ React.createElement(components_FieldLabel.Label, {
117
+ isFocused,
118
+ centered,
119
+ hasError,
120
+ hasValue,
121
+ disabled: isDisabled,
122
+ theme: theme['default']
123
+ }, label), helperText && /* @__PURE__ */ React.createElement(HelperText, {
124
+ centered,
125
+ hasError
126
+ }, helperText));
127
+ };
128
+
129
+ exports.TextField = TextField;
130
+ exports['default'] = TextField;
@@ -0,0 +1,49 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var styled = require('styled-components');
6
+ var components_Chip_index = require('../Chip/index.js');
7
+ require('../../shared/helpers.js');
8
+ require('../../theme.js');
9
+
10
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
+
12
+ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
13
+
14
+ const TimeSlots = styled__default['default'].ul`
15
+ max-width: 20rem;
16
+ display: grid;
17
+ grid-template-columns: repeat(4, 1fr);
18
+ gap: 0.625rem 0.75rem;
19
+ flex-wrap: wrap;
20
+ margin: 0;
21
+ padding: 0;
22
+ `;
23
+ const isCurrentTime = (currentItem, selectedTimes) => {
24
+ return Array.isArray(selectedTimes) ? Boolean(selectedTimes.find((t) => t.getTime() === currentItem.getTime())) : (selectedTimes == null ? void 0 : selectedTimes.getTime()) === currentItem.getTime();
25
+ };
26
+ const TimePicker = ({
27
+ timeSlots,
28
+ onTimeSlotClick,
29
+ selectedTimes,
30
+ disabledTimes,
31
+ ...props
32
+ }) => /* @__PURE__ */ React.createElement(TimeSlots, {
33
+ ...props
34
+ }, timeSlots.map(({ text, date }) => {
35
+ const isSelected = isCurrentTime(date, selectedTimes);
36
+ const isDisabled = isCurrentTime(date, disabledTimes);
37
+ return /* @__PURE__ */ React.createElement(components_Chip_index.Chip, {
38
+ component: "li",
39
+ "data-selected": isSelected,
40
+ "data-disabled": isDisabled,
41
+ isDisabled,
42
+ isActive: isSelected,
43
+ key: date.getTime(),
44
+ onClick: () => !isSelected && !isDisabled && onTimeSlotClick(date)
45
+ }, text);
46
+ }));
47
+
48
+ exports.TimePicker = TimePicker;
49
+ exports['default'] = TimePicker;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const generateTimeSlots = (x) => {
6
+ const addHour = (h) => h * 60 * 60 * 1e3;
7
+ const startDate = new Date("2020/02/02");
8
+ const t = new Date(startDate);
9
+ return Array.from({ length: x }, (_, i) => {
10
+ const date = new Date(t.setTime(t.getDate() + addHour(i)));
11
+ const text = i < 10 ? `0${i + 1}:00` : `${i + 1}:00`;
12
+ return { date, text };
13
+ });
14
+ };
15
+
16
+ exports.generateTimeSlots = generateTimeSlots;
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React$1 = require('react');
6
+ var styled = require('styled-components');
7
+ var theme = require('../../theme.js');
8
+
9
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
12
+
13
+ const Container = styled__default['default'].div`
14
+ display: flex;
15
+ position: relative;
16
+ border-top: ${({ theme: theme2 }) => `1px solid ${theme2.colors.gray.light6}`};
17
+ border-bottom: ${({ theme: theme2 }) => `1px solid ${theme2.colors.gray.light6}`};
18
+ padding: 4px;
19
+ `;
20
+ const Box = styled__default['default'].div`
21
+ font-family: ${({ theme: theme2 }) => theme2.typography.fontBaseFamily};
22
+ font-weight: ${({ theme: theme2 }) => theme2.typography.fontBaseRegularWeight};
23
+ display: flex;
24
+ min-height: 4rem;
25
+ align-items: center;
26
+ transition: 150ms 50ms;
27
+ flex: 1;
28
+ z-index: 2;
29
+ position: relative;
30
+ cursor: pointer;
31
+
32
+ color: ${(props) => props.isActive ? theme['default'].colors.text.light : theme['default'].colors.text.dark};
33
+ `;
34
+ const Background = styled__default['default'].div`
35
+ z-index: 0;
36
+ background-color: ${(props) => theme['default'].colors[props.color].main};
37
+ position: absolute;
38
+
39
+ border-radius: 0.25rem;
40
+
41
+ top: 4px;
42
+ left: 4px;
43
+ width: calc(50% - 4px);
44
+ height: calc(100% - 8px);
45
+
46
+ transition: left 250ms ease-in-out;
47
+
48
+ ${(props) => props.active === "RIGHT" && `
49
+ left: calc(50%);
50
+ `}
51
+
52
+ ${(props) => !props.active && `display: none;`}
53
+ `;
54
+ const Toggle = ({ onChange, ...props }) => {
55
+ const [active, setActive] = React$1.useState(props.active);
56
+ React$1.useEffect(() => {
57
+ setActive(props.active);
58
+ }, [props.active]);
59
+ const handleLeftClick = () => {
60
+ setActive("LEFT");
61
+ onChange("LEFT");
62
+ };
63
+ const handleRightClick = () => {
64
+ setActive("RIGHT");
65
+ onChange("RIGHT");
66
+ };
67
+ return /* @__PURE__ */ React.createElement(Container, {
68
+ ...props
69
+ }, /* @__PURE__ */ React.createElement(Background, {
70
+ color: props.color,
71
+ active
72
+ }), /* @__PURE__ */ React.createElement(Box, {
73
+ onClick: handleLeftClick,
74
+ isActive: active === "LEFT",
75
+ color: props.color
76
+ }, props.left), /* @__PURE__ */ React.createElement(Box, {
77
+ onClick: handleRightClick,
78
+ isActive: active === "RIGHT",
79
+ color: props.color
80
+ }, props.right));
81
+ };
82
+
83
+ exports.Toggle = Toggle;