@kvdbil/components 3.3.5-4 → 3.4.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 (457) hide show
  1. package/cjs/ColorCard.js +10 -31
  2. package/cjs/ElevationCard.js +5 -21
  3. package/cjs/Interfaces.js +1 -2
  4. package/cjs/Types.js +1 -2
  5. package/cjs/components/Accordion/index.js +20 -64
  6. package/cjs/components/Badge/index.js +9 -43
  7. package/cjs/components/Button/index.js +60 -125
  8. package/cjs/components/Card/index.js +6 -25
  9. package/cjs/components/CheckBox/index.js +24 -53
  10. package/cjs/components/Chip/index.js +10 -65
  11. package/cjs/components/DayPicker/DayPickerNavBar.js +9 -32
  12. package/cjs/components/DayPicker/index.js +10 -40
  13. package/cjs/components/DayPicker/localeUtils.js +1 -60
  14. package/cjs/components/DayPicker/style.js +226 -0
  15. package/cjs/components/Dialog/index.js +9 -42
  16. package/cjs/components/ErrorMessage/index.js +6 -21
  17. package/cjs/components/FieldLabel.js +22 -49
  18. package/cjs/components/Header/Hamburger.js +7 -22
  19. package/cjs/components/Header/Link.js +9 -26
  20. package/cjs/components/Header/index.js +16 -45
  21. package/cjs/components/Hero/index.js +7 -32
  22. package/cjs/components/Icon/index.js +11 -76
  23. package/cjs/components/IconButton.js +15 -54
  24. package/cjs/components/Icons/Arrow.js +1 -9
  25. package/cjs/components/Icons/CheckCircle.js +1 -9
  26. package/cjs/components/Icons/CheckIcon.js +1 -9
  27. package/cjs/components/Icons/Close.js +1 -9
  28. package/cjs/components/Icons/ErrorCircle.js +1 -9
  29. package/cjs/components/Icons/InfoCircle.js +1 -9
  30. package/cjs/components/InlineStepper/Step.js +16 -53
  31. package/cjs/components/InlineStepper/StepCircle.js +11 -46
  32. package/cjs/components/InlineStepper/index.js +4 -39
  33. package/cjs/components/ListItem/Bacon.js +1 -9
  34. package/cjs/components/ListItem/index.js +7 -28
  35. package/cjs/components/Logo/LogoEn.js +1 -9
  36. package/cjs/components/Logo/LogoSv.js +1 -9
  37. package/cjs/components/Logo/index.js +3 -30
  38. package/cjs/components/MenuItem/index.js +23 -68
  39. package/cjs/components/Modal/index.js +11 -54
  40. package/cjs/components/NotificationButton/index.js +4 -28
  41. package/cjs/components/OffCanvas/Overlay.js +2 -33
  42. package/cjs/components/OffCanvas/index.js +21 -62
  43. package/cjs/components/OffCanvas/useClickOutside.js +1 -21
  44. package/cjs/components/RadioButton/index.js +28 -58
  45. package/cjs/components/Range/index.js +10 -35
  46. package/cjs/components/Select/components/test-icon.js +1 -9
  47. package/cjs/components/Select/index.js +18 -147
  48. package/cjs/components/Snackbar/index.js +24 -76
  49. package/cjs/components/Spinner/index.js +10 -46
  50. package/cjs/components/Stepper/index.js +11 -35
  51. package/cjs/components/StepperAccordion/index.js +26 -76
  52. package/cjs/components/Tabs/index.js +7 -47
  53. package/cjs/components/TextArea/index.js +30 -61
  54. package/cjs/components/Textfield/index.js +29 -69
  55. package/cjs/components/TimePicker/index.js +2 -29
  56. package/cjs/components/TimePicker/testHelper.js +1 -17
  57. package/cjs/components/Toggle/index.js +12 -45
  58. package/cjs/icons/components/AccountCreateIcon.js +1 -11
  59. package/cjs/icons/components/AccountIcon.js +1 -11
  60. package/cjs/icons/components/AccountLoginIcon.js +1 -11
  61. package/cjs/icons/components/ArrowDownIcon.js +1 -11
  62. package/cjs/icons/components/ArrowLeftIcon.js +1 -11
  63. package/cjs/icons/components/ArrowLeftSharpIcon.js +1 -11
  64. package/cjs/icons/components/ArrowLeftSmallIcon.js +1 -11
  65. package/cjs/icons/components/ArrowLong.js +1 -11
  66. package/cjs/icons/components/ArrowRestartIcon.js +1 -11
  67. package/cjs/icons/components/ArrowRightIcon.js +1 -11
  68. package/cjs/icons/components/ArrowRightSharpIcon.js +1 -11
  69. package/cjs/icons/components/ArrowUpIcon.js +1 -11
  70. package/cjs/icons/components/AuctionIcon.js +1 -11
  71. package/cjs/icons/components/BackArrowIcon.js +1 -11
  72. package/cjs/icons/components/Baseline360Icon.js +1 -11
  73. package/cjs/icons/components/BellIcon.js +1 -11
  74. package/cjs/icons/components/BidIcon.js +1 -11
  75. package/cjs/icons/components/BidKrIcon.js +1 -11
  76. package/cjs/icons/components/BreaksIcon.js +1 -11
  77. package/cjs/icons/components/BuyCarIcon.js +1 -11
  78. package/cjs/icons/components/CabIcon.js +1 -11
  79. package/cjs/icons/components/CalendarIcon.js +1 -11
  80. package/cjs/icons/components/CameraIcon.js +1 -11
  81. package/cjs/icons/components/Car360Icon.js +1 -11
  82. package/cjs/icons/components/CarFrontIcon.js +1 -11
  83. package/cjs/icons/components/CarSearchIcon.js +1 -11
  84. package/cjs/icons/components/CarSideIcon.js +1 -11
  85. package/cjs/icons/components/CarTiresIcon.js +1 -11
  86. package/cjs/icons/components/CaravanIcon.js +1 -11
  87. package/cjs/icons/components/CardViewIcon.js +1 -11
  88. package/cjs/icons/components/CarloanIcon.js +1 -11
  89. package/cjs/icons/components/CertifiedIcon.js +1 -11
  90. package/cjs/icons/components/ChatIcon.js +1 -11
  91. package/cjs/icons/components/CheckIcon.js +1 -11
  92. package/cjs/icons/components/CheckThinIcon.js +1 -11
  93. package/cjs/icons/components/CheckmarkFilledIcon.js +1 -11
  94. package/cjs/icons/components/CheckmarkIcon.js +1 -11
  95. package/cjs/icons/components/ClipboardFilledIcon.js +1 -11
  96. package/cjs/icons/components/ClipboardIcon.js +1 -11
  97. package/cjs/icons/components/ClockFilledIcon.js +1 -11
  98. package/cjs/icons/components/ClockIcon.js +1 -11
  99. package/cjs/icons/components/CloseIcon.js +1 -11
  100. package/cjs/icons/components/CloseThinIcon.js +1 -11
  101. package/cjs/icons/components/CoffeeIcon.js +1 -11
  102. package/cjs/icons/components/CombiIcon.js +1 -11
  103. package/cjs/icons/components/CommentCircleFilledIcon.js +1 -11
  104. package/cjs/icons/components/CommentCircleIconIcon.js +1 -11
  105. package/cjs/icons/components/CommentIcon.js +1 -11
  106. package/cjs/icons/components/ContactIcon.js +1 -11
  107. package/cjs/icons/components/CoupeIcon.js +1 -11
  108. package/cjs/icons/components/CreditCardIcon.js +1 -11
  109. package/cjs/icons/components/CrossCircleIcon.js +1 -11
  110. package/cjs/icons/components/CrownIcon.js +1 -11
  111. package/cjs/icons/components/DealmakerIcon.js +1 -11
  112. package/cjs/icons/components/DeliveryIcon.js +1 -11
  113. package/cjs/icons/components/DetailedSearchIcon.js +1 -11
  114. package/cjs/icons/components/EcoFriendlyIcon.js +1 -11
  115. package/cjs/icons/components/EditIcon.js +1 -11
  116. package/cjs/icons/components/EngineIcon.js +1 -11
  117. package/cjs/icons/components/EnglandFlagIcon.js +1 -11
  118. package/cjs/icons/components/EvaluationIcon.js +1 -11
  119. package/cjs/icons/components/ExaminationMarkFilledIcon.js +1 -11
  120. package/cjs/icons/components/ExaminationMarkIcon.js +1 -11
  121. package/cjs/icons/components/ExteriorIcon.js +1 -11
  122. package/cjs/icons/components/EyeIcon.js +1 -11
  123. package/cjs/icons/components/FacebookBtnIcon.js +1 -11
  124. package/cjs/icons/components/FacebookIcon.js +1 -11
  125. package/cjs/icons/components/FatalIcon.js +1 -11
  126. package/cjs/icons/components/FavouriteIcon.js +1 -11
  127. package/cjs/icons/components/FavouriteSolidIcon.js +1 -11
  128. package/cjs/icons/components/FilterIcon.js +1 -11
  129. package/cjs/icons/components/FinanceIcon.js +1 -11
  130. package/cjs/icons/components/FindCarIcon.js +1 -11
  131. package/cjs/icons/components/FixedMonthlyCostIcon.js +1 -11
  132. package/cjs/icons/components/FlagIcon.js +1 -11
  133. package/cjs/icons/components/FlexibilityIcon.js +1 -11
  134. package/cjs/icons/components/ForumLargeIcon.js +1 -11
  135. package/cjs/icons/components/ForumSmallIcon.js +1 -11
  136. package/cjs/icons/components/GavelIcon.js +1 -11
  137. package/cjs/icons/components/GearboxIcon.js +1 -11
  138. package/cjs/icons/components/GiftIcon.js +1 -11
  139. package/cjs/icons/components/GridViewIcon.js +1 -11
  140. package/cjs/icons/components/GroupIcon.js +1 -11
  141. package/cjs/icons/components/GuaranteeIcon.js +1 -11
  142. package/cjs/icons/components/GuaranteeLargeIcon.js +1 -11
  143. package/cjs/icons/components/GuaranteeSmallIcon.js +1 -11
  144. package/cjs/icons/components/HalfCombiIcon.js +1 -11
  145. package/cjs/icons/components/HamburgerIcon.js +1 -11
  146. package/cjs/icons/components/HandshakeIcon.js +1 -11
  147. package/cjs/icons/components/HelpingHandIcon.js +1 -11
  148. package/cjs/icons/components/IdIcon.js +1 -11
  149. package/cjs/icons/components/InformationIcon.js +1 -11
  150. package/cjs/icons/components/InstagramIcon.js +1 -11
  151. package/cjs/icons/components/InsuranceIcon.js +1 -11
  152. package/cjs/icons/components/InteriorIcon.js +1 -11
  153. package/cjs/icons/components/InteriorThinIcon.js +1 -11
  154. package/cjs/icons/components/InternationalIcon.js +1 -11
  155. package/cjs/icons/components/KvdTestIcon.js +1 -11
  156. package/cjs/icons/components/KvdVenueIcon.js +1 -11
  157. package/cjs/icons/components/LifebuoyIcon.js +1 -11
  158. package/cjs/icons/components/LiftTruckIcon.js +1 -11
  159. package/cjs/icons/components/LinkedInIcon.js +1 -11
  160. package/cjs/icons/components/ListViewIcon.js +1 -11
  161. package/cjs/icons/components/MailIcon.js +1 -11
  162. package/cjs/icons/components/MinibusIcon.js +1 -11
  163. package/cjs/icons/components/MinivanIcon.js +1 -11
  164. package/cjs/icons/components/MobileIcon.js +1 -11
  165. package/cjs/icons/components/MotorcycleIcon.js +1 -11
  166. package/cjs/icons/components/MrfLogoIcon.js +1 -11
  167. package/cjs/icons/components/NotFoundIcon.js +1 -11
  168. package/cjs/icons/components/OverbidIcon.js +1 -11
  169. package/cjs/icons/components/PdfIconIcon.js +1 -11
  170. package/cjs/icons/components/PhoneIcon.js +1 -11
  171. package/cjs/icons/components/PickUpIcon.js +1 -11
  172. package/cjs/icons/components/PinIcon.js +1 -11
  173. package/cjs/icons/components/PlayIcon.js +1 -11
  174. package/cjs/icons/components/Pricetag.js +1 -11
  175. package/cjs/icons/components/PricetagFilledKronaIcon.js +1 -11
  176. package/cjs/icons/components/PrivateCarIcon.js +1 -11
  177. package/cjs/icons/components/ProfileCircleIcon.js +1 -11
  178. package/cjs/icons/components/ProfileIcon.js +1 -11
  179. package/cjs/icons/components/RadioIcon.js +1 -11
  180. package/cjs/icons/components/ReclamationIcon.js +1 -11
  181. package/cjs/icons/components/ReleasingIcon.js +1 -11
  182. package/cjs/icons/components/RemoveFilterIcon.js +1 -11
  183. package/cjs/icons/components/ReservedPriceIcon.js +1 -11
  184. package/cjs/icons/components/ResultIcon.js +1 -11
  185. package/cjs/icons/components/SafePaymentIcon.js +1 -11
  186. package/cjs/icons/components/SaleTagIcon.js +1 -11
  187. package/cjs/icons/components/SearchCheckIcon.js +1 -11
  188. package/cjs/icons/components/SearchIcon.js +1 -11
  189. package/cjs/icons/components/SedanIcon.js +1 -11
  190. package/cjs/icons/components/SellCarIcon.js +1 -11
  191. package/cjs/icons/components/SellCarsIcon.js +1 -11
  192. package/cjs/icons/components/ServiceIcon.js +1 -11
  193. package/cjs/icons/components/ShareIcon.js +1 -11
  194. package/cjs/icons/components/ShieldIcon.js +1 -11
  195. package/cjs/icons/components/SignInIcon.js +1 -11
  196. package/cjs/icons/components/SignOutIcon.js +1 -11
  197. package/cjs/icons/components/SpeedMeterIcon.js +1 -11
  198. package/cjs/icons/components/StarCircleIcon.js +1 -11
  199. package/cjs/icons/components/StartIcon.js +1 -11
  200. package/cjs/icons/components/StoreIcon.js +1 -11
  201. package/cjs/icons/components/SuvIcon.js +1 -11
  202. package/cjs/icons/components/SwedenFlag.js +1 -11
  203. package/cjs/icons/components/TankIcon.js +1 -11
  204. package/cjs/icons/components/TireIcon.js +1 -11
  205. package/cjs/icons/components/TransportIcon.js +1 -11
  206. package/cjs/icons/components/TrashcanIcon.js +1 -11
  207. package/cjs/icons/components/TrophyIcon.js +1 -11
  208. package/cjs/icons/components/TruckIcon.js +1 -11
  209. package/cjs/icons/components/UmbrellaIcon.js +1 -11
  210. package/cjs/icons/components/ValuationIcon.js +1 -11
  211. package/cjs/icons/components/ValueIcon.js +1 -11
  212. package/cjs/icons/components/WarningIcon.js +1 -11
  213. package/cjs/icons/components/YoutubeIcon.js +1 -11
  214. package/cjs/icons/components/index.js +1 -320
  215. package/cjs/index.js +1 -439
  216. package/cjs/shared/constants.js +1 -7
  217. package/cjs/shared/helpers.js +1 -28
  218. package/cjs/shared/helpers.spec.js +1 -42
  219. package/cjs/shared/media-queries.js +1 -41
  220. package/cjs/theme.js +1 -125
  221. package/cjs/typography/BodyText/index.js +20 -53
  222. package/cjs/typography/ButtonText/index.js +15 -43
  223. package/cjs/typography/Heading/index.js +22 -54
  224. package/cjs/utils/utils.js +2 -30
  225. package/esm/ColorCard.js +10 -23
  226. package/esm/ElevationCard.js +5 -13
  227. package/esm/components/Accordion/index.js +20 -55
  228. package/esm/components/Badge/index.js +9 -34
  229. package/esm/components/Button/index.js +50 -106
  230. package/esm/components/Card/index.js +6 -16
  231. package/esm/components/CheckBox/index.js +17 -37
  232. package/esm/components/Chip/index.js +10 -56
  233. package/esm/components/DayPicker/DayPickerNavBar.js +9 -24
  234. package/esm/components/DayPicker/index.js +10 -30
  235. package/esm/components/DayPicker/localeUtils.js +1 -52
  236. package/esm/components/DayPicker/style.js +226 -0
  237. package/esm/components/Dialog/index.js +9 -33
  238. package/esm/components/ErrorMessage/index.js +6 -12
  239. package/esm/components/FieldLabel.js +21 -40
  240. package/esm/components/Header/Hamburger.js +7 -14
  241. package/esm/components/Header/Link.js +9 -18
  242. package/esm/components/Header/index.js +16 -36
  243. package/esm/components/Hero/index.js +7 -23
  244. package/esm/components/Icon/index.js +11 -68
  245. package/esm/components/IconButton.js +15 -46
  246. package/esm/components/Icons/Arrow.js +1 -5
  247. package/esm/components/Icons/CheckCircle.js +1 -5
  248. package/esm/components/Icons/CheckIcon.js +1 -5
  249. package/esm/components/Icons/Close.js +1 -5
  250. package/esm/components/Icons/ErrorCircle.js +1 -5
  251. package/esm/components/Icons/InfoCircle.js +1 -5
  252. package/esm/components/InlineStepper/Step.js +16 -44
  253. package/esm/components/InlineStepper/StepCircle.js +11 -38
  254. package/esm/components/InlineStepper/index.js +4 -31
  255. package/esm/components/ListItem/Bacon.js +1 -5
  256. package/esm/components/ListItem/index.js +7 -20
  257. package/esm/components/Logo/LogoEn.js +1 -5
  258. package/esm/components/Logo/LogoSv.js +1 -5
  259. package/esm/components/Logo/index.js +3 -21
  260. package/esm/components/MenuItem/index.js +22 -58
  261. package/esm/components/Modal/index.js +11 -45
  262. package/esm/components/NotificationButton/index.js +4 -20
  263. package/esm/components/OffCanvas/Overlay.js +2 -25
  264. package/esm/components/OffCanvas/index.js +21 -53
  265. package/esm/components/OffCanvas/useClickOutside.js +1 -17
  266. package/esm/components/RadioButton/index.js +21 -42
  267. package/esm/components/Range/index.js +10 -26
  268. package/esm/components/Select/components/test-icon.js +1 -5
  269. package/esm/components/Select/index.js +18 -137
  270. package/esm/components/Snackbar/index.js +24 -67
  271. package/esm/components/Spinner/index.js +10 -38
  272. package/esm/components/Stepper/index.js +11 -27
  273. package/esm/components/StepperAccordion/index.js +23 -64
  274. package/esm/components/Tabs/index.js +7 -37
  275. package/esm/components/TextArea/index.js +30 -52
  276. package/esm/components/Textfield/index.js +29 -60
  277. package/esm/components/TimePicker/index.js +2 -20
  278. package/esm/components/TimePicker/testHelper.js +1 -13
  279. package/esm/components/Toggle/index.js +12 -37
  280. package/esm/icons/components/AccountCreateIcon.js +1 -7
  281. package/esm/icons/components/AccountIcon.js +1 -7
  282. package/esm/icons/components/AccountLoginIcon.js +1 -7
  283. package/esm/icons/components/ArrowDownIcon.js +1 -7
  284. package/esm/icons/components/ArrowLeftIcon.js +1 -7
  285. package/esm/icons/components/ArrowLeftSharpIcon.js +1 -7
  286. package/esm/icons/components/ArrowLeftSmallIcon.js +1 -7
  287. package/esm/icons/components/ArrowLong.js +1 -7
  288. package/esm/icons/components/ArrowRestartIcon.js +1 -7
  289. package/esm/icons/components/ArrowRightIcon.js +1 -7
  290. package/esm/icons/components/ArrowRightSharpIcon.js +1 -7
  291. package/esm/icons/components/ArrowUpIcon.js +1 -7
  292. package/esm/icons/components/AuctionIcon.js +1 -7
  293. package/esm/icons/components/BackArrowIcon.js +1 -7
  294. package/esm/icons/components/Baseline360Icon.js +1 -7
  295. package/esm/icons/components/BellIcon.js +1 -7
  296. package/esm/icons/components/BidIcon.js +1 -7
  297. package/esm/icons/components/BidKrIcon.js +1 -7
  298. package/esm/icons/components/BreaksIcon.js +1 -7
  299. package/esm/icons/components/BuyCarIcon.js +1 -7
  300. package/esm/icons/components/CabIcon.js +1 -7
  301. package/esm/icons/components/CalendarIcon.js +1 -7
  302. package/esm/icons/components/CameraIcon.js +1 -7
  303. package/esm/icons/components/Car360Icon.js +1 -7
  304. package/esm/icons/components/CarFrontIcon.js +1 -7
  305. package/esm/icons/components/CarSearchIcon.js +1 -7
  306. package/esm/icons/components/CarSideIcon.js +1 -7
  307. package/esm/icons/components/CarTiresIcon.js +1 -7
  308. package/esm/icons/components/CaravanIcon.js +1 -7
  309. package/esm/icons/components/CardViewIcon.js +1 -7
  310. package/esm/icons/components/CarloanIcon.js +1 -7
  311. package/esm/icons/components/CertifiedIcon.js +1 -7
  312. package/esm/icons/components/ChatIcon.js +1 -7
  313. package/esm/icons/components/CheckIcon.js +1 -7
  314. package/esm/icons/components/CheckThinIcon.js +1 -7
  315. package/esm/icons/components/CheckmarkFilledIcon.js +1 -7
  316. package/esm/icons/components/CheckmarkIcon.js +1 -7
  317. package/esm/icons/components/ClipboardFilledIcon.js +1 -7
  318. package/esm/icons/components/ClipboardIcon.js +1 -7
  319. package/esm/icons/components/ClockFilledIcon.js +1 -7
  320. package/esm/icons/components/ClockIcon.js +1 -7
  321. package/esm/icons/components/CloseIcon.js +1 -7
  322. package/esm/icons/components/CloseThinIcon.js +1 -7
  323. package/esm/icons/components/CoffeeIcon.js +1 -7
  324. package/esm/icons/components/CombiIcon.js +1 -7
  325. package/esm/icons/components/CommentCircleFilledIcon.js +1 -7
  326. package/esm/icons/components/CommentCircleIconIcon.js +1 -7
  327. package/esm/icons/components/CommentIcon.js +1 -7
  328. package/esm/icons/components/ContactIcon.js +1 -7
  329. package/esm/icons/components/CoupeIcon.js +1 -7
  330. package/esm/icons/components/CreditCardIcon.js +1 -7
  331. package/esm/icons/components/CrossCircleIcon.js +1 -7
  332. package/esm/icons/components/CrownIcon.js +1 -7
  333. package/esm/icons/components/DealmakerIcon.js +1 -7
  334. package/esm/icons/components/DeliveryIcon.js +1 -7
  335. package/esm/icons/components/DetailedSearchIcon.js +1 -7
  336. package/esm/icons/components/EcoFriendlyIcon.js +1 -7
  337. package/esm/icons/components/EditIcon.js +1 -7
  338. package/esm/icons/components/EngineIcon.js +1 -7
  339. package/esm/icons/components/EnglandFlagIcon.js +1 -7
  340. package/esm/icons/components/EvaluationIcon.js +1 -7
  341. package/esm/icons/components/ExaminationMarkFilledIcon.js +1 -7
  342. package/esm/icons/components/ExaminationMarkIcon.js +1 -7
  343. package/esm/icons/components/ExteriorIcon.js +1 -7
  344. package/esm/icons/components/EyeIcon.js +1 -7
  345. package/esm/icons/components/FacebookBtnIcon.js +1 -7
  346. package/esm/icons/components/FacebookIcon.js +1 -7
  347. package/esm/icons/components/FatalIcon.js +1 -7
  348. package/esm/icons/components/FavouriteIcon.js +1 -7
  349. package/esm/icons/components/FavouriteSolidIcon.js +1 -7
  350. package/esm/icons/components/FilterIcon.js +1 -7
  351. package/esm/icons/components/FinanceIcon.js +1 -7
  352. package/esm/icons/components/FindCarIcon.js +1 -7
  353. package/esm/icons/components/FixedMonthlyCostIcon.js +1 -7
  354. package/esm/icons/components/FlagIcon.js +1 -7
  355. package/esm/icons/components/FlexibilityIcon.js +1 -7
  356. package/esm/icons/components/ForumLargeIcon.js +1 -7
  357. package/esm/icons/components/ForumSmallIcon.js +1 -7
  358. package/esm/icons/components/GavelIcon.js +1 -7
  359. package/esm/icons/components/GearboxIcon.js +1 -7
  360. package/esm/icons/components/GiftIcon.js +1 -7
  361. package/esm/icons/components/GridViewIcon.js +1 -7
  362. package/esm/icons/components/GroupIcon.js +1 -7
  363. package/esm/icons/components/GuaranteeIcon.js +1 -7
  364. package/esm/icons/components/GuaranteeLargeIcon.js +1 -7
  365. package/esm/icons/components/GuaranteeSmallIcon.js +1 -7
  366. package/esm/icons/components/HalfCombiIcon.js +1 -7
  367. package/esm/icons/components/HamburgerIcon.js +1 -7
  368. package/esm/icons/components/HandshakeIcon.js +1 -7
  369. package/esm/icons/components/HelpingHandIcon.js +1 -7
  370. package/esm/icons/components/IdIcon.js +1 -7
  371. package/esm/icons/components/InformationIcon.js +1 -7
  372. package/esm/icons/components/InstagramIcon.js +1 -7
  373. package/esm/icons/components/InsuranceIcon.js +1 -7
  374. package/esm/icons/components/InteriorIcon.js +1 -7
  375. package/esm/icons/components/InteriorThinIcon.js +1 -7
  376. package/esm/icons/components/InternationalIcon.js +1 -7
  377. package/esm/icons/components/KvdTestIcon.js +1 -7
  378. package/esm/icons/components/KvdVenueIcon.js +1 -7
  379. package/esm/icons/components/LifebuoyIcon.js +1 -7
  380. package/esm/icons/components/LiftTruckIcon.js +1 -7
  381. package/esm/icons/components/LinkedInIcon.js +1 -7
  382. package/esm/icons/components/ListViewIcon.js +1 -7
  383. package/esm/icons/components/MailIcon.js +1 -7
  384. package/esm/icons/components/MinibusIcon.js +1 -7
  385. package/esm/icons/components/MinivanIcon.js +1 -7
  386. package/esm/icons/components/MobileIcon.js +1 -7
  387. package/esm/icons/components/MotorcycleIcon.js +1 -7
  388. package/esm/icons/components/MrfLogoIcon.js +1 -7
  389. package/esm/icons/components/NotFoundIcon.js +1 -7
  390. package/esm/icons/components/OverbidIcon.js +1 -7
  391. package/esm/icons/components/PdfIconIcon.js +1 -7
  392. package/esm/icons/components/PhoneIcon.js +1 -7
  393. package/esm/icons/components/PickUpIcon.js +1 -7
  394. package/esm/icons/components/PinIcon.js +1 -7
  395. package/esm/icons/components/PlayIcon.js +1 -7
  396. package/esm/icons/components/Pricetag.js +1 -7
  397. package/esm/icons/components/PricetagFilledKronaIcon.js +1 -7
  398. package/esm/icons/components/PrivateCarIcon.js +1 -7
  399. package/esm/icons/components/ProfileCircleIcon.js +1 -7
  400. package/esm/icons/components/ProfileIcon.js +1 -7
  401. package/esm/icons/components/RadioIcon.js +1 -7
  402. package/esm/icons/components/ReclamationIcon.js +1 -7
  403. package/esm/icons/components/ReleasingIcon.js +1 -7
  404. package/esm/icons/components/RemoveFilterIcon.js +1 -7
  405. package/esm/icons/components/ReservedPriceIcon.js +1 -7
  406. package/esm/icons/components/ResultIcon.js +1 -7
  407. package/esm/icons/components/SafePaymentIcon.js +1 -7
  408. package/esm/icons/components/SaleTagIcon.js +1 -7
  409. package/esm/icons/components/SearchCheckIcon.js +1 -7
  410. package/esm/icons/components/SearchIcon.js +1 -7
  411. package/esm/icons/components/SedanIcon.js +1 -7
  412. package/esm/icons/components/SellCarIcon.js +1 -7
  413. package/esm/icons/components/SellCarsIcon.js +1 -7
  414. package/esm/icons/components/ServiceIcon.js +1 -7
  415. package/esm/icons/components/ShareIcon.js +1 -7
  416. package/esm/icons/components/ShieldIcon.js +1 -7
  417. package/esm/icons/components/SignInIcon.js +1 -7
  418. package/esm/icons/components/SignOutIcon.js +1 -7
  419. package/esm/icons/components/SpeedMeterIcon.js +1 -7
  420. package/esm/icons/components/StarCircleIcon.js +1 -7
  421. package/esm/icons/components/StartIcon.js +1 -7
  422. package/esm/icons/components/StoreIcon.js +1 -7
  423. package/esm/icons/components/SuvIcon.js +1 -7
  424. package/esm/icons/components/SwedenFlag.js +1 -7
  425. package/esm/icons/components/TankIcon.js +1 -7
  426. package/esm/icons/components/TireIcon.js +1 -7
  427. package/esm/icons/components/TransportIcon.js +1 -7
  428. package/esm/icons/components/TrashcanIcon.js +1 -7
  429. package/esm/icons/components/TrophyIcon.js +1 -7
  430. package/esm/icons/components/TruckIcon.js +1 -7
  431. package/esm/icons/components/UmbrellaIcon.js +1 -7
  432. package/esm/icons/components/ValuationIcon.js +1 -7
  433. package/esm/icons/components/ValueIcon.js +1 -7
  434. package/esm/icons/components/WarningIcon.js +1 -7
  435. package/esm/icons/components/YoutubeIcon.js +1 -7
  436. package/esm/icons/components/index.js +1 -157
  437. package/esm/index.js +1 -221
  438. package/esm/shared/constants.js +1 -3
  439. package/esm/shared/helpers.js +1 -23
  440. package/esm/shared/helpers.spec.js +1 -40
  441. package/esm/shared/media-queries.js +1 -35
  442. package/esm/theme.js +1 -121
  443. package/esm/typography/BodyText/index.js +20 -35
  444. package/esm/typography/ButtonText/index.js +15 -28
  445. package/esm/typography/Heading/index.js +22 -38
  446. package/esm/utils/utils.js +2 -25
  447. package/package.json +11 -8
  448. package/types/components/DayPicker/index.d.ts +0 -1
  449. package/types/components/DayPicker/style.d.ts +2 -0
  450. package/types/components/FieldLabel.d.ts +1 -1
  451. package/types/components/Header/Link.d.ts +1 -1
  452. package/types/components/MenuItem/index.d.ts +1 -1
  453. package/types/components/Select/index.d.ts +9 -8
  454. package/cjs/react-app-env.d.js +0 -2
  455. package/cjs/styled.d.js +0 -4
  456. package/esm/react-app-env.d.js +0 -1
  457. package/esm/styled.d.js +0 -1
@@ -1,10 +1,6 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import styled from 'styled-components';
3
- import theme from '../../theme.js';
4
-
5
- const BadgeContainer = styled.div `
1
+ import t from"react";import r from"styled-components";import a from"../../theme.js";const i=r.div`
6
2
  border-radius: 0.75rem;
7
- background: ${theme.colors.secondary.main};
3
+ background: ${a.colors.secondary.main};
8
4
  display: inline-flex;
9
5
  align-items: center;
10
6
  justify-content: center;
@@ -13,48 +9,27 @@ const BadgeContainer = styled.div `
13
9
  height: 1.5rem;
14
10
  box-sizing: border-box;
15
11
  cursor: default;
16
- `;
17
- const SmallBadgeContainer = styled(BadgeContainer) `
12
+ `,s=r(i)`
18
13
  width: 1rem;
19
14
  height: 1rem;
20
15
  border-radius: 50%;
21
16
  min-width: 1rem;
22
17
  position: relative;
23
- `;
24
- const MiddleDot = styled.div `
18
+ `,m=r.div`
25
19
  display: block;
26
20
  width: 100%;
27
21
  height: 100%;
28
22
  border-radius: 50%;
29
23
  opacity: 0.1;
30
24
  transform: scale(0.5);
31
- background: ${theme.colors.text.dark};
25
+ background: ${a.colors.text.dark};
32
26
  position: absolute;
33
27
  top: 0;
34
28
  left: 0;
35
- `;
36
- const Label = styled.span `
29
+ `,c=r.span`
37
30
  font-size: 0.75rem;
38
31
  line-height: 0.75rem;
39
32
  color: white;
40
- font-weight: ${({ theme }) => theme.typography.fontAlternativeBoldWeight};
41
- font-family: ${({ theme }) => theme.typography.fontAlternativeFamily};
42
- `;
43
- const numberToLabel = (notificationAmount) => {
44
- if (notificationAmount >= 100) {
45
- return '99+';
46
- }
47
- return `${notificationAmount}`;
48
- };
49
- const Badge = ({ notificationAmount = 0, withNumber = true, ...rest }) => {
50
- if ((notificationAmount <= 0 || !notificationAmount) && withNumber) {
51
- return null;
52
- }
53
- if (!withNumber) {
54
- return (jsx(SmallBadgeContainer, Object.assign({}, rest, { children: jsx(MiddleDot, { "data-test": "middle-dot" }, void 0) }), void 0));
55
- }
56
- const label = numberToLabel(notificationAmount);
57
- return (jsx(BadgeContainer, Object.assign({}, rest, { children: jsx(Label, { children: label }, void 0) }), void 0));
58
- };
59
-
60
- export { Badge, Badge as default };
33
+ font-weight: ${({theme:e})=>e.typography.fontAlternativeBoldWeight};
34
+ font-family: ${({theme:e})=>e.typography.fontAlternativeFamily};
35
+ `,h=e=>e>=100?"99+":`${e}`,l=({notificationAmount:e=0,withNumber:o=!0,...n})=>{if((e<=0||!e)&&o)return null;if(!o)return t.createElement(s,{...n},t.createElement(m,{"data-test":"middle-dot"}));const d=h(e);return t.createElement(i,{...n},t.createElement(c,null,d))};export{l as Badge,l as default};
@@ -1,117 +1,76 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import styled, { css } from 'styled-components';
3
- import theme from '../../theme.js';
4
- import Spinner from '../Spinner/index.js';
5
- import { BasicButtonTextStyle, ButtonRegularTextStyle, ButtonLargeTextStyle, ButtonSmallTextStyle } from '../../typography/ButtonText/index.js';
6
-
7
- /****************************************************************************/
8
- /* Font styles */
9
- /****************************************************************************/
10
- const getFontStyles = (size) => {
11
- switch (size) {
12
- case 'smaller':
13
- return ButtonSmallTextStyle;
14
- case 'small':
15
- return ButtonRegularTextStyle;
16
- case 'regular':
17
- return ButtonRegularTextStyle;
18
- case 'large':
19
- return ButtonLargeTextStyle;
20
- default:
21
- return ButtonRegularTextStyle;
22
- }
23
- };
24
- /****************************************************************************/
25
- /* Size styles */
26
- /****************************************************************************/
27
- const smallerSizeStyles = (isLoading) => `
1
+ import n from"react";import e,{css as c}from"styled-components";import u from"../../theme.js";import $ from"../Spinner/index.js";import{BasicButtonTextStyle as g,ButtonRegularTextStyle as a,ButtonLargeTextStyle as b,ButtonSmallTextStyle as f}from"../../typography/ButtonText/index.js";const y=o=>{switch(o){case"smaller":return f;case"small":return a;case"regular":return a;case"large":return b;default:return a}},S=o=>`
28
2
  min-width: 76px;
29
- padding: ${isLoading ? '7px 10px 5.5px' : '10px 10px 8px'};
30
- `;
31
- const smallSizeStyles = (isLoading) => `
3
+ padding: ${o?"7px 10px 5.5px":"10px 10px 8px"};
4
+ `,k=o=>`
32
5
  min-width: 76px;
33
- padding: ${isLoading ? '8px 10px 6px' : '11px 10px 9px'};
34
- `;
35
- const regularSizeStyles = (isLoading) => `
6
+ padding: ${o?"8px 10px 6px":"11px 10px 9px"};
7
+ `,m=o=>`
36
8
  min-width: 250px;
37
- padding: ${isLoading ? '7px 22px 5px' : '15px 22px 13px'};
38
- `;
39
- const largeSizeStyles = (isLoading) => `
9
+ padding: ${o?"7px 22px 5px":"15px 22px 13px"};
10
+ `,w=o=>`
40
11
  min-width: 250px;
41
- padding: ${isLoading ? '9px 22px 6px' : '21px 22px 19px'};
42
- `;
43
- /****************************************************************************/
44
- /* Color styles */
45
- /****************************************************************************/
46
- const solidColorStyles = (theme) => (color) => `
12
+ padding: ${o?"9px 22px 6px":"21px 22px 19px"};
13
+ `,h=o=>r=>`
47
14
  color: white;
48
- border-color: ${theme.colors[color].main};
49
- background-color: ${theme.colors[color].main};
15
+ border-color: ${o.colors[r].main};
16
+ background-color: ${o.colors[r].main};
50
17
 
51
18
  :hover {
52
- border-color: ${theme.colors[color].light};
53
- background-color: ${theme.colors[color].light};
19
+ border-color: ${o.colors[r].light};
20
+ background-color: ${o.colors[r].light};
54
21
  }
55
22
 
56
23
  :active {
57
- border-color: ${theme.colors[color].dark};
58
- background-color: ${theme.colors[color].dark}
24
+ border-color: ${o.colors[r].dark};
25
+ background-color: ${o.colors[r].dark}
59
26
  }
60
27
 
61
28
  :focus {
62
- box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${theme.colors[color].dark};
29
+ box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${o.colors[r].dark};
63
30
  }
64
- `;
65
- const outlineColorStyles = (theme) => (color) => `
66
- color: ${theme.colors[color].main};
67
- border-color: ${theme.colors[color].main};
31
+ `,B=o=>r=>`
32
+ color: ${o.colors[r].main};
33
+ border-color: ${o.colors[r].main};
68
34
  background-color: transparent;
69
35
 
70
36
  :hover {
71
37
  color: white;
72
- border-color: ${theme.colors[color].light};
73
- background-color: ${theme.colors[color].light};
38
+ border-color: ${o.colors[r].light};
39
+ background-color: ${o.colors[r].light};
74
40
  }
75
41
 
76
42
  :active {
77
43
  color: white;
78
- border-color: ${theme.colors[color].dark};
79
- background-color: ${theme.colors[color].dark};
44
+ border-color: ${o.colors[r].dark};
45
+ background-color: ${o.colors[r].dark};
80
46
  }
81
47
 
82
48
  :focus {
83
- box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${theme.colors[color].dark};
49
+ box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${o.colors[r].dark};
84
50
  }
85
- `;
86
- const flatColorStyles = (theme) => (color) => `
87
- color: ${theme.colors[color].main};
51
+ `,C=o=>r=>`
52
+ color: ${o.colors[r].main};
88
53
  border-color: transparent;
89
54
  background-color: transparent;
90
55
 
91
56
  :hover {
92
- color: ${theme.colors[color].dark};
57
+ color: ${o.colors[r].dark};
93
58
  }
94
59
 
95
60
  :active {
96
- color: ${theme.colors[color].light};
61
+ color: ${o.colors[r].light};
97
62
  }
98
- `;
99
- const disabledCommonColorStyles = (theme) => `
100
- background-color: ${theme.colors.gray.light4};
101
- border-color: ${theme.colors.gray.light4};
102
- color: ${theme.colors.gray.light1};
63
+ `,T=o=>`
64
+ background-color: ${o.colors.gray.light4};
65
+ border-color: ${o.colors.gray.light4};
66
+ color: ${o.colors.gray.light1};
103
67
  cursor: not-allowed;
104
- `;
105
- const disabledFlatColorStyles = (theme) => `
68
+ `,j=o=>`
106
69
  border-color: transparent;
107
70
  background-color: transparent;
108
- color: ${theme.colors.gray.light1};
71
+ color: ${o.colors.gray.light1};
109
72
  cursor: not-allowed;
110
- `;
111
- /****************************************************************************/
112
- /* Root styles */
113
- /****************************************************************************/
114
- const Root = styled.button `
73
+ `,v=e.button`
115
74
  outline: none;
116
75
  cursor: pointer;
117
76
  user-select: none;
@@ -119,38 +78,23 @@ const Root = styled.button `
119
78
  white-space: nowrap;
120
79
  border: 2px solid transparent;
121
80
  border-radius: 3px;
122
- width: ${({ fullWidth }) => fullWidth && '100%'};
81
+ width: ${({fullWidth:o})=>o&&"100%"};
123
82
 
124
- ${BasicButtonTextStyle}
125
- ${({ size }) => getFontStyles(size)}
126
- ${({ size, isLoading }) => css `
127
- ${size === 'smaller' && smallerSizeStyles(isLoading)}
128
- ${size === 'small' && smallSizeStyles(isLoading)}
129
- ${size === 'regular' && regularSizeStyles(isLoading)}
130
- ${size === 'large' && largeSizeStyles(isLoading)}
83
+ ${g}
84
+ ${({size:o})=>y(o)}
85
+ ${({size:o,isLoading:r})=>c`
86
+ ${o==="smaller"&&S(r)}
87
+ ${o==="small"&&k(r)}
88
+ ${o==="regular"&&m(r)}
89
+ ${o==="large"&&w(r)}
131
90
  `}
132
91
  background-color: transparent;
133
92
  transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
134
- ${({ variant, color, disabled, theme }) => css `
135
- ${!disabled && variant === 'solid' && solidColorStyles(theme)(color)}
136
- ${!disabled && variant === 'outline' && outlineColorStyles(theme)(color)}
137
- ${!disabled && variant === 'flat' && flatColorStyles(theme)(color)}
138
- ${disabled && variant !== 'flat' && disabledCommonColorStyles(theme)}
139
- ${disabled && variant === 'flat' && disabledFlatColorStyles(theme)}
93
+ ${({variant:o,color:r,disabled:l,theme:t})=>c`
94
+ ${!l&&o==="solid"&&h(t)(r)}
95
+ ${!l&&o==="outline"&&B(t)(r)}
96
+ ${!l&&o==="flat"&&C(t)(r)}
97
+ ${l&&o!=="flat"&&T(t)}
98
+ ${l&&o==="flat"&&j(t)}
140
99
  `}
141
- `;
142
- /****************************************************************************/
143
- /* Main component */
144
- /****************************************************************************/
145
- const LoadingSpinner = styled(Spinner) ``;
146
- const spinnerSizes = {
147
- smaller: 1,
148
- small: 1,
149
- regular: 1.5,
150
- large: 1.75,
151
- };
152
- const Button = ({ size = 'small', color = 'primary', variant = 'solid', fullWidth = false, isDisabled = false, isLoading = false, children, ...props }) => {
153
- return (jsx(Root, Object.assign({}, props, { color: color, disabled: isDisabled || isLoading, fullWidth: fullWidth, theme: theme, variant: variant, size: size, isLoading: isLoading }, { children: isLoading ? (jsx(LoadingSpinner, { color: "neutral", size: spinnerSizes[size] }, void 0)) : (children) }), void 0));
154
- };
155
-
156
- export { Button, Button as default };
100
+ `,R=e($)``,z={smaller:1,small:1,regular:1.5,large:1.75},p=({size:o="small",color:r="primary",variant:l="solid",fullWidth:t=!1,isDisabled:x=!1,isLoading:s=!1,children:d,...i})=>n.createElement(v,{...i,color:r,disabled:x||s,fullWidth:t,theme:u,variant:l,size:o,isLoading:s},s?n.createElement(R,{color:"neutral",size:z[o]}):d);export{p as Button,p as default};
@@ -1,18 +1,8 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import styled from 'styled-components';
3
- import theme from '../../theme.js';
4
-
5
- const CardWrapper = styled.div `
6
- background: ${theme.colors.background.light};
7
- ${({ boxShadow }) => boxShadow && `box-shadow: ${boxShadow};`}
8
- ${({ boxShadow }) => !boxShadow &&
9
- `box-shadow: 0 2px 4px rgba(0, 0, 0, 10%), 0 2px 4px rgba(0, 0, 0, 9%),
1
+ import e from"react";import t from"styled-components";import a from"../../theme.js";const d=t.div`
2
+ background: ${a.colors.background.light};
3
+ ${({boxShadow:r})=>r&&`box-shadow: ${r};`}
4
+ ${({boxShadow:r})=>!r&&`box-shadow: 0 2px 4px rgba(0, 0, 0, 10%), 0 2px 4px rgba(0, 0, 0, 9%),
10
5
  0 1px 5px rgba(0, 0, 0, 15%);`}
11
6
  border-radius: 0 0 3px 3px;
12
- ${({ topBorder }) => topBorder && `border-top: 4px solid ${topBorder};`}
13
- `;
14
- const Card = ({ ...props }) => {
15
- return (jsx(CardWrapper, Object.assign({ topBorder: props.topBorder, boxShadow: props.boxShadow }, { children: props.children }), void 0));
16
- };
17
-
18
- export { Card, Card as default };
7
+ ${({topBorder:r})=>r&&`border-top: 4px solid ${r};`}
8
+ `,o=({...r})=>e.createElement(d,{topBorder:r.topBorder,boxShadow:r.boxShadow},r.children);export{o as Card,o as default};
@@ -1,11 +1,4 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import styled, { css } from 'styled-components';
3
- import { generateNameHash } from '../../shared/helpers.js';
4
- import theme from '../../theme.js';
5
- import IconButton from '../IconButton.js';
6
- import CheckIcon from '../Icons/CheckIcon.js';
7
-
8
- const regularSize = css `
1
+ import r from"react";import l,{css as t}from"styled-components";import{generateNameHash as p}from"../../shared/helpers.js";import o from"../../theme.js";import g from"../IconButton.js";import m from"../Icons/CheckIcon.js";const x=t`
9
2
  width: 24px;
10
3
  height: 24px;
11
4
 
@@ -13,8 +6,7 @@ const regularSize = css `
13
6
  width: 15px;
14
7
  height: 15px;
15
8
  }
16
- `;
17
- const largeSize = css `
9
+ `,b=t`
18
10
  width: 32px;
19
11
  height: 32px;
20
12
 
@@ -22,16 +14,10 @@ const largeSize = css `
22
14
  width: 20px;
23
15
  height: 20px;
24
16
  }
25
- `;
26
- const sizes = {
27
- regular: regularSize,
28
- large: largeSize,
29
- };
30
- const disabledStyle = css `
17
+ `,f={regular:x,large:b},u=t`
31
18
  cursor: default;
32
- border: 2px solid ${theme.colors.gray.light1};
33
- `;
34
- const checkedStyle = (color) => css `
19
+ border: 2px solid ${o.colors.gray.light1};
20
+ `,y=e=>t`
35
21
  svg {
36
22
  fill: #fefefe;
37
23
  opacity: 1;
@@ -40,16 +26,13 @@ const checkedStyle = (color) => css `
40
26
  :hover {
41
27
  }
42
28
 
43
- background: ${theme.colors[color].main};
44
- border: 2px solid ${theme.colors[color].main};
45
- `;
46
- const checkedDisabledStyle = css `
47
- background: ${theme.colors.gray.light1};
48
- `;
49
- const HiddenCheckbox = styled.input.attrs({ type: 'checkbox' }) `
29
+ background: ${o.colors[e].main};
30
+ border: 2px solid ${o.colors[e].main};
31
+ `,k=t`
32
+ background: ${o.colors.gray.light1};
33
+ `,$=l.input.attrs({type:"checkbox"})`
50
34
  display: none;
51
- `;
52
- const CheckboxWrapper = styled.label `
35
+ `,v=l.label`
53
36
  box-sizing: border-box;
54
37
  cursor: pointer;
55
38
  display: flex;
@@ -57,20 +40,17 @@ const CheckboxWrapper = styled.label `
57
40
  align-items: center;
58
41
  justify-content: center;
59
42
 
60
- border: 2px solid ${theme.colors.gray.light1};
43
+ border: 2px solid ${o.colors.gray.light1};
61
44
  border-radius: 3px;
62
45
 
63
- ${props => sizes[props.size]};
46
+ ${e=>f[e.size]};
64
47
 
65
48
  svg {
66
49
  opacity: 0;
67
50
  }
68
51
 
69
- ${props => props.isChecked && checkedStyle(props.color)};
70
- ${props => props.isDisabled && disabledStyle};
71
-
72
- ${props => props.isChecked && props.isDisabled && checkedDisabledStyle};
73
- `;
74
- const CheckBox = ({ name = generateNameHash('check-box'), isDisabled = false, size = 'regular', checked, color = 'secondary', onClick, ...rest }) => (jsxs(IconButton, Object.assign({ onClick: onClick, isActive: checked, isDisabled: isDisabled, color: color }, { children: [jsx(HiddenCheckbox, Object.assign({}, rest, { "data-validate": "checked", name: name, id: name, disabled: isDisabled }), void 0), jsx(CheckboxWrapper, Object.assign({ htmlFor: name, size: size, color: color, isChecked: checked, isDisabled: isDisabled }, { children: jsx(CheckIcon, {}, void 0) }), void 0)] }), void 0));
52
+ ${e=>e.isChecked&&y(e.color)};
53
+ ${e=>e.isDisabled&&u};
75
54
 
76
- export { CheckBox, CheckBox as default };
55
+ ${e=>e.isChecked&&e.isDisabled&&k};
56
+ `,a=({name:e=p("check-box"),isDisabled:s=!1,size:d="regular",checked:c,color:i="secondary",onClick:n,...h})=>r.createElement(g,{onClick:n,isActive:c,isDisabled:s,color:i},r.createElement($,{...h,"data-validate":"checked",name:e,id:e,disabled:s}),r.createElement(v,{htmlFor:e,size:d,color:i,isChecked:c,isDisabled:s},r.createElement(m,null)));export{a as CheckBox,a as default};
@@ -1,69 +1,23 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import styled from 'styled-components';
3
- import { fadedColor } from '../../shared/helpers.js';
4
- import theme from '../../theme.js';
5
-
6
- const getBackgroundColor = ({ isDisabled, isActive, activeColor, }) => {
7
- if (isActive && isDisabled) {
8
- return fadedColor(theme.colors[activeColor].main, 0.5);
9
- }
10
- if (isDisabled) {
11
- return theme.colors.gray.light4;
12
- }
13
- if (isActive) {
14
- return theme.colors[activeColor].main;
15
- }
16
- return 'transparent';
17
- };
18
- const getColor = ({ isActive, isDisabled }) => {
19
- if (isActive || (isActive && isDisabled)) {
20
- return theme.colors.text.light;
21
- }
22
- if (isDisabled) {
23
- return theme.colors.text.disabled;
24
- }
25
- return theme.colors.text.dark;
26
- };
27
- const getFontSize = (size = 'smaller') => {
28
- const sizes = {
29
- smaller: '0.8125rem',
30
- small: '1rem',
31
- regular: '1rem',
32
- large: '1.25rem',
33
- };
34
- return sizes[size];
35
- };
36
- const Item = styled.div `
37
- font-family: ${({ theme }) => theme.typography.fontAlternativeFamily};
38
- font-size: ${({ size }) => getFontSize(size)};
39
- font-weight: ${({ theme }) => theme.typography.fontAlternativeBoldWeight};
1
+ import a from"react";import s from"styled-components";import{fadedColor as g}from"../../shared/helpers.js";import t from"../../theme.js";const u=({isDisabled:e,isActive:r,activeColor:o})=>r&&e?g(t.colors[o].main,.5):e?t.colors.gray.light4:r?t.colors[o].main:"transparent",h=({isActive:e,isDisabled:r})=>e||e&&r?t.colors.text.light:r?t.colors.text.disabled:t.colors.text.dark,y=(e="smaller")=>({smaller:"0.8125rem",small:"1rem",regular:"1rem",large:"1.25rem"})[e],x=s.div`
2
+ font-family: ${({theme:e})=>e.typography.fontAlternativeFamily};
3
+ font-size: ${({size:e})=>y(e)};
4
+ font-weight: ${({theme:e})=>e.typography.fontAlternativeBoldWeight};
40
5
  line-height: 1.25;
41
6
  letter-spacing: 0.1px;
42
7
  display: inline-block;
43
- cursor: ${({ isDisabled }) => (!isDisabled ? 'pointer' : 'auto')};
8
+ cursor: ${({isDisabled:e})=>e?"auto":"pointer"};
44
9
  align-items: center;
45
- background: ${getBackgroundColor};
46
- color: ${getColor};
10
+ background: ${u};
11
+ color: ${h};
47
12
  justify-content: center;
48
13
  border-width: 1px;
49
14
  border-style: solid;
50
- border-color: ${({ isActive, isDisabled }) => !isActive && !isDisabled ? theme.colors.background.dark : 'transparent'};
15
+ border-color: ${({isActive:e,isDisabled:r})=>!e&&!r?t.colors.background.dark:"transparent"};
51
16
  border-radius: 1.293rem;
52
- `;
53
- const ContentWrapper = styled.span `
17
+ `,k=s.span`
54
18
  padding: 0.5rem 1rem;
55
19
  display: flex;
56
20
  align-items: center;
57
21
  justify-content: center;
58
22
  text-align: center;
59
- `;
60
- const Chip = ({ activeColor = 'primary', children, component = 'div', isActive, isDisabled, onClick, size, ...props }) => {
61
- const handleClick = (e) => {
62
- if (!isDisabled && onClick) {
63
- onClick(e);
64
- }
65
- };
66
- return (jsx(Item, Object.assign({}, props, { as: component, activeColor: activeColor, isDisabled: isDisabled, isActive: isActive, size: size }, { children: jsx(ContentWrapper, Object.assign({ onClick: handleClick }, { children: children }), void 0) }), void 0));
67
- };
68
-
69
- export { Chip, Chip as default };
23
+ `,i=({activeColor:e="primary",children:r,component:o="div",isActive:c,isDisabled:n,onClick:l,size:m,...d})=>{const p=f=>{!n&&l&&l(f)};return a.createElement(x,{...d,as:o,activeColor:e,isDisabled:n,isActive:c,size:m},a.createElement(k,{onClick:p},r))};export{i as Chip,i as default};
@@ -1,18 +1,9 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import styled from 'styled-components';
3
- import Arrow$1 from '../Icons/Arrow.js';
4
- import theme from '../../theme.js';
5
- import { BodyText } from '../../typography/BodyText/index.js';
6
- import { formatMonthTitle } from './localeUtils.js';
7
-
8
- const NavBarWrapper = styled.div `
1
+ import t from"react";import e from"styled-components";import s from"../Icons/Arrow.js";import r from"../../theme.js";import{BodyText as m}from"../../typography/BodyText/index.js";import{formatMonthTitle as p}from"./localeUtils.js";const d=e.div`
9
2
  display: flex;
10
3
  justify-content: space-between;
11
- `;
12
- const NavTitle = styled(BodyText) `
13
- color: ${theme.colors.text.dark};
14
- `;
15
- const NavButton = styled.button `
4
+ `,f=e(m)`
5
+ color: ${r.colors.text.dark};
6
+ `,o=e.button`
16
7
  appearance: none;
17
8
  background-color: transparent;
18
9
  border: 0;
@@ -21,18 +12,12 @@ const NavButton = styled.button `
21
12
  outline: none;
22
13
  display: flex;
23
14
  align-items: center;
24
- `;
25
- const Arrow = styled(Arrow$1) `
15
+ `,n=e(s)`
26
16
  width: 16px;
27
17
  height: 16px;
28
- fill: ${theme.colors.gray.dark3};
29
- `;
30
- const BackArrow = styled(Arrow) `
18
+ fill: ${r.colors.gray.dark3};
19
+ `,y=e(n)`
31
20
  transform: rotate(90deg);
32
- `;
33
- const ForwardArrow = styled(Arrow) `
21
+ `,h=e(n)`
34
22
  transform: rotate(-90deg);
35
- `;
36
- const DayPickerNavBar = ({ month, onPreviousClick, onNextClick, locale, }) => (jsxs(NavBarWrapper, { children: [jsx(NavButton, Object.assign({ onClick: () => onPreviousClick() }, { children: jsx(BackArrow, { title: "prev-month" }, void 0) }), void 0), jsx(NavTitle, Object.assign({ as: "h3" }, { children: formatMonthTitle(month, locale) }), void 0), jsx(NavButton, Object.assign({ onClick: () => onNextClick() }, { children: jsx(ForwardArrow, { title: "next-month" }, void 0) }), void 0)] }, void 0));
37
-
38
- export { DayPickerNavBar as default };
23
+ `,x=({month:a,onPreviousClick:l,onNextClick:c,locale:i})=>t.createElement(d,null,t.createElement(o,{onClick:()=>l()},t.createElement(y,{title:"prev-month"})),t.createElement(f,{as:"h3"},p(a,i)),t.createElement(o,{onClick:()=>c()},t.createElement(h,{title:"next-month"})));export{x as default};
@@ -1,54 +1,34 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import 'react-day-picker/lib/style.css';
3
- import ReactDayPicker from 'react-day-picker';
4
- import styled from 'styled-components';
5
- import theme from '../../theme.js';
6
- import DayPickerNavBar from './DayPickerNavBar.js';
7
- import { MONTHS, WEEKDAYS_LONG, WEEKDAYS_SHORT, FIRST_DAY_OF_THE_WEEK } from './localeUtils.js';
8
- import '../Icons/Arrow.js';
9
- import '../../typography/BodyText/index.js';
1
+ import t from"react";import c from"react-day-picker";import n from"styled-components";import r from"../../theme.js";import s from"./DayPickerNavBar.js";import{MONTHS as y,WEEKDAYS_LONG as l,WEEKDAYS_SHORT as m,FIRST_DAY_OF_THE_WEEK as d}from"./localeUtils.js";import p from"./style.js";import"../Icons/Arrow.js";import"../../typography/BodyText/index.js";const k=n.div`
2
+ ${p}
10
3
 
11
- const DayPickerWrapper = styled.div `
12
- font-family: ${({ theme }) => theme.typography.fontAlternativeFamily};
4
+ font-family: ${({theme:e})=>e.typography.fontAlternativeFamily};
13
5
  .DayPicker-wrapper {
14
6
  &:focus {
15
7
  outline: none;
16
8
  }
17
9
  }
18
10
  .DayPicker-Weekday {
19
- color: ${({ theme }) => theme.colors.gray.light1};
11
+ color: ${({theme:e})=>e.colors.gray.light1};
20
12
  }
21
13
  .DayPicker-Day {
22
14
  font-size: 12px;
23
15
  padding: 14px;
24
- font-weight: ${({ theme }) => theme.typography.fontAlternativeBoldWeight};
25
- color: ${({ theme }) => theme.colors.text.dark};
16
+ font-weight: ${({theme:e})=>e.typography.fontAlternativeBoldWeight};
17
+ color: ${({theme:e})=>e.colors.text.dark};
26
18
  &:focus {
27
19
  outline: none;
28
- box-shadow: 0 0 4px ${theme.colors.gray.dark3};
20
+ box-shadow: 0 0 4px ${r.colors.gray.dark3};
29
21
  }
30
22
  &:not(.DayPicker--interactionDisabled):not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--outside) {
31
23
  &:focus {
32
- box-shadow: 0 0 4px ${theme.colors.gray.dark3};
24
+ box-shadow: 0 0 4px ${r.colors.gray.dark3};
33
25
  }
34
26
  &:hover {
35
27
  background-color: rgba(253, 171, 74, 0.25);
36
28
  }
37
29
  }
38
30
  &.DayPicker-Day--disabled {
39
- color: ${theme.colors.gray.dark3};
31
+ color: ${r.colors.gray.dark3};
40
32
  }
41
33
  }
42
- `;
43
- const modifiersStyles = {
44
- selected: {
45
- color: theme.colors.text.light,
46
- background: theme.colors.primary.main,
47
- fontWeight: 700,
48
- },
49
- };
50
- const DayPicker = ({ locale = 'sv', ...props }) => {
51
- return (jsx(DayPickerWrapper, { children: jsx(ReactDayPicker, Object.assign({}, props, { locale: locale, months: MONTHS[locale], weekdaysLong: WEEKDAYS_LONG[locale], weekdaysShort: WEEKDAYS_SHORT[locale], firstDayOfWeek: FIRST_DAY_OF_THE_WEEK[locale], navbarElement: navProps => (jsx(DayPickerNavBar, Object.assign({}, navProps, { locale: locale }), void 0)), captionElement: jsx("div", {}, void 0), modifiersStyles: modifiersStyles }), void 0) }, void 0));
52
- };
53
-
54
- export { DayPicker, DayPicker as default };
34
+ `,D={selected:{color:r.colors.text.light,background:r.colors.primary.main,fontWeight:700}},o=({locale:e="sv",...a})=>t.createElement(k,null,t.createElement(c,{...a,locale:e,months:y[e],weekdaysLong:l[e],weekdaysShort:m[e],firstDayOfWeek:d[e],navbarElement:i=>t.createElement(s,{...i,locale:e}),captionElement:t.createElement("div",null),modifiersStyles:D}));export{o as DayPicker,o as default};
@@ -1,52 +1 @@
1
- const MONTHS = {
2
- sv: [
3
- 'Januari',
4
- 'Februari',
5
- 'Mars',
6
- 'April',
7
- 'Maj',
8
- 'Juni',
9
- 'Juli',
10
- 'Augusti',
11
- 'September',
12
- 'Oktober',
13
- 'November',
14
- 'December',
15
- ],
16
- en: [
17
- 'January',
18
- 'February',
19
- 'March',
20
- 'April',
21
- 'May',
22
- 'June',
23
- 'July',
24
- 'August',
25
- 'September',
26
- 'October',
27
- 'November',
28
- 'December',
29
- ],
30
- };
31
- const WEEKDAYS_LONG = {
32
- sv: ['Söndag', 'Måndag', 'Tisdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lördag'],
33
- en: [
34
- 'Sunday',
35
- 'Monday',
36
- 'Tuesday',
37
- 'Wednesday',
38
- 'Thursday',
39
- 'Friday',
40
- 'Saturday',
41
- ],
42
- };
43
- const WEEKDAYS_SHORT = {
44
- sv: ['Sö', 'Må', 'Ti', 'On', 'To', 'Fr', 'Lö'],
45
- en: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
46
- };
47
- const FIRST_DAY_OF_THE_WEEK = { sv: 1, en: 1 };
48
- const formatMonthTitle = (d, locale = 'sv') => {
49
- return `${MONTHS[locale][d.getMonth()]} ${d.getFullYear()}`;
50
- };
51
-
52
- export { FIRST_DAY_OF_THE_WEEK, MONTHS, WEEKDAYS_LONG, WEEKDAYS_SHORT, formatMonthTitle };
1
+ const r={sv:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],en:["January","February","March","April","May","June","July","August","September","October","November","December"]},n={sv:["S\xF6ndag","M\xE5ndag","Tisdag","Onsdag","Torsdag","Fredag","L\xF6rdag"],en:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},t={sv:["S\xF6","M\xE5","Ti","On","To","Fr","L\xF6"],en:["Su","Mo","Tu","We","Th","Fr","Sa"]},u={sv:1,en:1},s=(e,a="sv")=>`${r[a][e.getMonth()]} ${e.getFullYear()}`;export{u as FIRST_DAY_OF_THE_WEEK,r as MONTHS,n as WEEKDAYS_LONG,t as WEEKDAYS_SHORT,s as formatMonthTitle};