@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,60 +1,35 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { useState } from 'react';
3
- import ReactSelect from 'react-select';
4
- import styled from 'styled-components';
5
- import { DEFAULT_TRANSITION_MS } from '../../shared/constants.js';
6
- import { fadedColor } from '../../shared/helpers.js';
7
- import theme from '../../theme.js';
8
- import { Label } from '../FieldLabel.js';
9
-
10
- const Container = styled.div `
11
- font-family: ${({ theme }) => theme.typography.fontBaseFamily};
1
+ import t,{useState as $}from"react";import z from"react-select";import d from"styled-components";import{DEFAULT_TRANSITION_MS as x}from"../../shared/constants.js";import r from"../../theme.js";import{Label as A}from"../FieldLabel.js";const M=d.div`
2
+ font-family: ${({theme:e})=>e.typography.fontBaseFamily};
12
3
  position: relative;
13
- `;
14
- const prefixStyles = (hasPrefix) => hasPrefix && {
15
- paddingLeft: '2.5rem',
16
- };
17
- const disabledStyles = (isDisabled) => isDisabled && {
18
- border: `1px solid ${theme.colors.gray.light1}`,
19
- color: theme.colors.gray.dark1,
20
- fill: theme.colors.gray.light1,
21
- };
22
- const Prefix = styled.div `
4
+ `,F=e=>e&&{paddingLeft:"2.5rem"},O=e=>e&&{border:`1px solid ${r.colors.gray.light1}`,color:r.colors.gray.dark1,fill:r.colors.gray.light1},_=d.div`
23
5
  position: absolute;
24
6
  z-index: 1;
25
7
  top: 0.5rem;
26
8
  margin: 0.35rem 0.75rem;
27
9
 
28
- fill: ${theme.colors.gray.dark5};
29
- transition: ${DEFAULT_TRANSITION_MS};
10
+ fill: ${r.colors.gray.dark5};
11
+ transition: ${x};
30
12
 
31
- ${props => props.isDisabled &&
32
- `
33
- fill: ${theme.colors.gray.light1};
13
+ ${e=>e.isDisabled&&`
14
+ fill: ${r.colors.gray.light1};
34
15
  `}
35
16
 
36
- ${props => props.isFocused &&
37
- `
38
- fill: ${props.theme.colors.text.dark};
17
+ ${e=>e.isFocused&&`
18
+ fill: ${e.theme.colors.text.dark};
39
19
  `}
40
- `;
41
- const HelperText = styled.span `
20
+ `,j=d.span`
42
21
  display: block;
43
- font-family: ${({ theme }) => theme.typography.fontBaseFamily};
22
+ font-family: ${({theme:e})=>e.typography.fontBaseFamily};
44
23
  font-size: 0.81rem;
45
-
46
24
  margin-top: 0.25rem;
47
25
  margin-left: 0.85rem;
48
-
49
- color: ${({ hasError }) => hasError ? theme.colors.error.main : theme.colors.text.dark};
50
- `;
51
- const Arrow = (props) => (jsxs("svg", Object.assign({}, props, { children: [jsx("symbol", Object.assign({ id: "icon-arrow", viewBox: "0 0 19 19" }, { children: jsx("path", { d: "M2.03039 7.95496L9.80856 15.7331C9.90619 15.8308 10.0645 15.8308 10.1621 15.7331L17.9403 7.95496L19.0009 9.01562L11.2228 16.7938C10.5394 17.4772 9.43132 17.4772 8.7479 16.7938L0.969727 9.01562L2.03039 7.95496Z" }, void 0) }), void 0), jsx("use", { xlinkHref: "#icon-arrow" }, void 0)] }), void 0));
52
- const DropdownArrow = styled(Arrow) `
26
+ color: ${({hasError:e})=>e?r.colors.error.main:r.colors.text.disabled};
27
+ `,T=e=>t.createElement("svg",{...e},t.createElement("symbol",{id:"icon-arrow",viewBox:"0 0 19 19"},t.createElement("path",{d:"M2.03039 7.95496L9.80856 15.7331C9.90619 15.8308 10.0645 15.8308 10.1621 15.7331L17.9403 7.95496L19.0009 9.01562L11.2228 16.7938C10.5394 17.4772 9.43132 17.4772 8.7479 16.7938L0.969727 9.01562L2.03039 7.95496Z"})),t.createElement("use",{xlinkHref:"#icon-arrow"})),V=d(T)`
53
28
  width: 0.8rem;
54
29
  height: 0.8rem;
55
30
  margin: 0 0.5rem;
56
- ${props => props.$isFocused && `color: ${props.$theme.colors.text.dark}`}
57
- ${props => props.$isDisabled && `color: ${props.$theme.colors.gray.dark1}`}
31
+ ${e=>e.$isFocused&&`color: ${e.$theme.colors.text.dark}`}
32
+ ${e=>e.$isDisabled&&`color: ${e.$theme.colors.gray.dark1}`}
58
33
 
59
34
 
60
35
  path {
@@ -62,102 +37,8 @@ const DropdownArrow = styled(Arrow) `
62
37
  stroke: currentColor;
63
38
  }
64
39
 
65
- transition: transform ${DEFAULT_TRANSITION_MS};
40
+ transition: transform ${x};
66
41
 
67
- transform: ${props => props.$isMenuOpen ? 'rotate(-180deg)' : 'rotate(0deg)'};
42
+ transform: ${e=>e.$isMenuOpen?"rotate(-180deg)":"rotate(0deg)"};
68
43
  transform-origin: 50% 60%;
69
- `;
70
- const getBorderColor = (isFocused, hasError) => {
71
- if (hasError) {
72
- return theme.colors.error.main;
73
- }
74
- return isFocused ? theme.colors.text.dark : theme.colors.gray.light1;
75
- };
76
- const DropdownIndicator = ({ selectProps: { menuIsOpen = false }, isFocused = false, isDisabled, }) => {
77
- return (jsx(DropdownArrow, { "$isDisabled": isDisabled, "$isFocused": isFocused, "$isMenuOpen": menuIsOpen, "$theme": theme }, void 0));
78
- };
79
- const Select = ({ color = 'primary', isDisabled = false, placeholder = '', helperText, height, className, hasError = false, onBlur = () => null, onFocus = () => null, forwardRef, onInputChange = () => null, ...props }) => {
80
- const [isFocused, setIsFocused] = useState(false);
81
- const [inputValue, setInputValue] = useState('');
82
- const handleInputChange = (newValue, actionMeta) => {
83
- onInputChange(newValue, actionMeta);
84
- setInputValue(newValue);
85
- };
86
- const getOptionColor = ({ isSelected, isFocused }) => {
87
- if (isSelected) {
88
- return fadedColor(theme.colors[color].main, 0.72);
89
- }
90
- if (isFocused) {
91
- return fadedColor(theme.colors[color].main, 0.18);
92
- }
93
- return 'white';
94
- };
95
- const handleFocus = (event) => {
96
- setIsFocused(true);
97
- onFocus(event);
98
- };
99
- const handleBlur = (event) => {
100
- setIsFocused(false);
101
- onBlur(event);
102
- };
103
- const borderColor = getBorderColor(isFocused, hasError);
104
- return (jsxs(Container, Object.assign({ className: className }, { children: [props.label && (jsx(Label, Object.assign({ height: height, isFocused: isFocused, hasValue: Boolean(props.value || inputValue), disabled: isDisabled, theme: theme, hasError: hasError }, { children: props.label }), void 0)), props.prefix && (jsx(Prefix, Object.assign({ isDisabled: isDisabled, isFocused: isFocused }, { children: props.prefix }), void 0)), jsx(ReactSelect, Object.assign({}, props, { ref: forwardRef, isDisabled: isDisabled, onInputChange: handleInputChange, placeholder: placeholder, onFocus: handleFocus, onBlur: handleBlur, styles: {
105
- control: styles => ({
106
- ...styles,
107
- fontFamily: theme.typography.fontBaseFamily,
108
- fontSize: '1rem',
109
- fontWeight: 400,
110
- cursor: 'pointer',
111
- padding: '0.7rem 0.75rem',
112
- backgroundColor: theme.colors.background.light,
113
- borderColor,
114
- boxShadow: 'none',
115
- '&:hover': {
116
- borderColor: 'none',
117
- },
118
- ...disabledStyles(isDisabled),
119
- ...prefixStyles(Boolean(props.prefix)),
120
- }),
121
- placeholder: styles => ({
122
- ...styles,
123
- display: !isFocused ? 'none' : 'static',
124
- }),
125
- singleValue: styles => ({
126
- ...styles,
127
- ...{
128
- maxWidth: 'calc(100% - 3.3rem)',
129
- width: 'calc(100% - 3.3rem)',
130
- },
131
- }),
132
- menu: styles => ({
133
- ...styles,
134
- zIndex: 2,
135
- padding: '0.25rem 0',
136
- }),
137
- option: (styles, { isSelected, isFocused }) => {
138
- return {
139
- ...styles,
140
- padding: '1rem',
141
- '&:hover': {
142
- background: getOptionColor({ isFocused: true, isSelected }),
143
- },
144
- background: getOptionColor({ isSelected, isFocused }),
145
- cursor: 'pointer',
146
- ...prefixStyles(Boolean(props.prefix)),
147
- };
148
- },
149
- valueContainer: styles => ({
150
- ...styles,
151
- ...{
152
- position: 'static',
153
- padding: height ? `${height - 1}rem 0 ` : 0,
154
- height: height ? 'auto' : '21px',
155
- },
156
- }),
157
- }, components: {
158
- IndicatorSeparator: () => null,
159
- DropdownIndicator: DropdownIndicator,
160
- } }), void 0), helperText && jsx(HelperText, Object.assign({ hasError: hasError }, { children: helperText }), void 0)] }), void 0));
161
- };
162
-
163
- export { Select, Select as default };
44
+ `,H=(e,a)=>a?r.colors.error.main:e?r.colors.text.dark:r.colors.gray.light1,N=({selectProps:{menuIsOpen:e=!1},isFocused:a=!1,isDisabled:m})=>t.createElement(V,{$isDisabled:m,$isFocused:a,$isMenuOpen:e,$theme:r}),k=({className:e,color:a="primary",forwardRef:m,hasError:u=!1,height:i,helperText:p,isDisabled:s=!1,onBlur:C=()=>null,onFocus:v=()=>null,onInputChange:w=()=>null,placeholder:L="",name:f,...n})=>{const[c,h]=$(!1),[B,I]=$(""),S=(o,l)=>{w(o,l),I(o)},y=({isSelected:o,isFocused:l,isDisabled:g})=>o?r.colors[a].main:g?r.colors.background.light:l?r.colors.background.gray:r.colors.background.light,E=o=>{h(!0),v(o)},D=o=>{h(!1),C(o)},R=H(c,u);return t.createElement(M,{className:e},n.label&&t.createElement(A,{htmlFor:f,height:i,isFocused:c,hasValue:Boolean(n.value||B),disabled:s,theme:r,hasError:u},n.label),n.prefix&&t.createElement(_,{isDisabled:s,isFocused:c},n.prefix),t.createElement(z,{...n,inputId:f,name:f,ref:m,isDisabled:s,onInputChange:S,placeholder:L,onFocus:E,onBlur:D,styles:{control:o=>({...o,borderRadius:0,color:r.colors.text.dark,fontFamily:r.typography.fontBaseFamily,fontSize:"1rem",fontWeight:400,cursor:"pointer",padding:"0.7rem 0.75rem",backgroundColor:r.colors.background.light,borderColor:R,boxShadow:"none","&:hover":{borderColor:"none"},...O(s),...F(Boolean(n.prefix))}),placeholder:o=>({...o,display:c?"static":"none"}),singleValue:o=>({...o,maxWidth:"calc(100% - 3.3rem)",width:"calc(100% - 3.3rem)"}),menuList:o=>({...o,padding:"8px 0"}),menu:o=>({...o,borderRadius:0,boxShadow:r.elevations.elevation2,zIndex:2,padding:"0"}),option:(o,{isSelected:l,isFocused:g,isDisabled:b})=>({...o,padding:"1rem",cursor:b?"not-allowed":"pointer","&:hover":{background:y({isSelected:l,isFocused:!0,isDisabled:b})},background:y({isSelected:l,isFocused:g}),...F(Boolean(n.prefix))}),valueContainer:o=>({...o,position:"static",padding:i?`${i-1}rem 0 `:0,height:i?"auto":"21px"})},components:{IndicatorSeparator:()=>null,DropdownIndicator:N}}),p&&t.createElement(j,{hasError:u},p))};export{k as Select,k as default};
@@ -1,37 +1,16 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useEffect } from 'react';
3
- import styled, { css } from 'styled-components';
4
- import theme from '../../theme.js';
5
- import CheckCircle from '../Icons/CheckCircle.js';
6
- import Close from '../Icons/Close.js';
7
- import ErrorCircle from '../Icons/ErrorCircle.js';
8
- import InfoCircle from '../Icons/InfoCircle.js';
9
- import { CSSTransition } from 'react-transition-group';
10
-
11
- const verticalStyles = {
12
- top: css `
1
+ import t,{useEffect as E}from"react";import a,{css as o}from"styled-components";import r from"../../theme.js";import $ from"../Icons/CheckCircle.js";import C from"../Icons/Close.js";import k from"../Icons/ErrorCircle.js";import b from"../Icons/InfoCircle.js";import{CSSTransition as v}from"react-transition-group";const I={top:o`
13
2
  top: 0;
14
- `,
15
- bottom: css `
3
+ `,bottom:o`
16
4
  bottom: 0;
17
- `,
18
- };
19
- const horizontalStyles = {
20
- right: css `
5
+ `},j={right:o`
21
6
  right: 0;
22
- `,
23
- center: css `
7
+ `,center:o`
24
8
  left: 50%;
25
9
  transform: translate(-50%, 0);
26
- `,
27
- left: css `
10
+ `,left:o`
28
11
  left: 0;
29
- `,
30
- };
31
- const animationDuration = 200;
32
- const transitionClassName = 'anim';
33
- const Container = styled.div `
34
- font-family: ${({ theme }) => theme.typography.fontBaseFamily};
12
+ `},g=200,n="anim",w=a.div`
13
+ font-family: ${({theme:e})=>e.typography.fontBaseFamily};
35
14
  position: fixed;
36
15
  display: flex;
37
16
  align-items: center;
@@ -44,49 +23,43 @@ const Container = styled.div `
44
23
  border-radius: 0.4rem;
45
24
  padding: 1.15rem 1.25rem;
46
25
 
47
- font-weight: ${({ theme }) => theme.typography.fontBaseBoldWeight};
26
+ font-weight: ${({theme:e})=>e.typography.fontBaseBoldWeight};
48
27
  font-size: 0.875rem;
49
28
 
50
- box-shadow: ${theme.elevations.elevation8};
51
- background-color: ${props => props.color !== 'none'
52
- ? theme.colors[props.color].main
53
- : theme.colors.background.light};
54
- color: ${props => props.color !== 'none' ? theme.colors.text.light : theme.colors.text.dark};
29
+ box-shadow: ${r.elevations.elevation8};
30
+ background-color: ${e=>e.color!=="none"?r.colors[e.color].main:r.colors.background.light};
31
+ color: ${e=>e.color!=="none"?r.colors.text.light:r.colors.text.dark};
55
32
 
56
- ${props => verticalStyles[props.origin.vertical || 'bottom']}
57
- ${props => horizontalStyles[props.origin.horizontal || 'left']}
33
+ ${e=>I[e.origin.vertical||"bottom"]}
34
+ ${e=>j[e.origin.horizontal||"left"]}
58
35
 
59
- transition: opacity ${animationDuration}ms ease-in;
36
+ transition: opacity ${g}ms ease-in;
60
37
 
61
- &.${transitionClassName}-enter {
38
+ &.${n}-enter {
62
39
  opacity: 0;
63
40
  }
64
- &.${transitionClassName}-enter-active {
41
+ &.${n}-enter-active {
65
42
  opacity: 1;
66
43
  }
67
- &.${transitionClassName}-exit {
44
+ &.${n}-exit {
68
45
  opacity: 1;
69
46
  }
70
- &.${transitionClassName}-exit-active {
47
+ &.${n}-exit-active {
71
48
  opacity: 0;
72
49
  }
73
- `;
74
- const Icon = styled.div `
50
+ `,f=a.div`
75
51
  display: inline-flex;
76
52
  margin: -0.25rem 0;
77
53
  margin-right: 0.75rem;
78
54
 
79
- ${props => props.type === 'text' && 'margin-right: 0;'}
55
+ ${e=>e.type==="text"&&"margin-right: 0;"}
80
56
 
81
57
  svg {
82
58
  width: 1.5rem;
83
59
  height: 1.5rem;
84
- fill: ${props => props.color !== 'none'
85
- ? theme.colors.background.light
86
- : theme.colors.background.dark};
60
+ fill: ${e=>e.color!=="none"?r.colors.background.light:r.colors.background.dark};
87
61
  }
88
- `;
89
- const CloseIcon = styled(Icon) `
62
+ `,S=a(f)`
90
63
  cursor: pointer;
91
64
 
92
65
  /* Bigger click area */
@@ -100,22 +73,6 @@ const CloseIcon = styled(Icon) `
100
73
  width: 1rem;
101
74
  height: 1rem;
102
75
  }
103
- `;
104
- const Message = styled.span `
76
+ `,B=a.span`
105
77
  flex: 1;
106
- `;
107
- const icons = {
108
- error: jsx(ErrorCircle, {}, void 0),
109
- success: jsx(CheckCircle, {}, void 0),
110
- info: jsx(InfoCircle, {}, void 0),
111
- text: '',
112
- };
113
- const Snackbar = ({ message, color = 'none', type = 'info', action, isOpen, origin = {}, onClose = () => { }, onExited = () => { }, autoHideDuration = 4000, ...props }) => {
114
- useEffect(() => {
115
- const timeout = setTimeout(onClose, autoHideDuration);
116
- return () => clearTimeout(timeout);
117
- }, [autoHideDuration, onClose]);
118
- return (jsx(CSSTransition, Object.assign({ in: isOpen, timeout: animationDuration, mountOnEnter: true, unmountOnExit: true, onExited: onExited, classNames: transitionClassName }, { children: jsxs(Container, Object.assign({}, props, { color: color, origin: origin }, { children: [jsx(Icon, Object.assign({ color: color, type: type }, { children: icons[type] }), void 0), jsx(Message, { children: message }, void 0), action && action, jsx(CloseIcon, Object.assign({ color: color !== null && color !== void 0 ? color : 'none', onClick: onClose }, { children: jsx(Close, {}, void 0) }), void 0)] }), void 0) }), void 0));
119
- };
120
-
121
- export { Snackbar, Snackbar as default };
78
+ `,z={error:t.createElement(k,null),success:t.createElement($,null),info:t.createElement(b,null),text:""},h=({message:e,color:i="none",type:c="info",action:m,isOpen:p,origin:d={},onClose:l=()=>{},onExited:u=()=>{},autoHideDuration:s=4e3,...y})=>(E(()=>{const x=setTimeout(l,s);return()=>clearTimeout(x)},[s,l]),t.createElement(v,{in:p,timeout:g,mountOnEnter:!0,unmountOnExit:!0,onExited:u,classNames:n},t.createElement(w,{...y,color:i,origin:d},t.createElement(f,{color:i,type:c},z[c]),t.createElement(B,null,e),m&&m,t.createElement(S,{color:i!=null?i:"none",onClick:l},t.createElement(C,null)))));export{h as Snackbar,h as default};
@@ -1,47 +1,19 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import styled, { keyframes } from 'styled-components';
3
- import theme from '../../theme.js';
4
-
5
- const getDuration = (speed) => {
6
- const durations = {
7
- slow: '2s',
8
- default: '1s',
9
- fast: '0.5s',
10
- };
11
- return durations[speed] || durations.default;
12
- };
13
- const getSize = (size) => {
14
- const sizes = {
15
- smaller: 1,
16
- small: 2,
17
- regular: 3,
18
- large: 4,
19
- };
20
- if (typeof size === 'number') {
21
- return size;
22
- }
23
- return sizes[size] || sizes.regular;
24
- };
25
- const spin = keyframes `
1
+ import s from"react";import i,{keyframes as l}from"styled-components";import n from"../../theme.js";const m=e=>{const r={slow:"2s",default:"1s",fast:"0.5s"};return r[e]||r.default},t=e=>{const r={smaller:1,small:2,regular:3,large:4};return typeof e=="number"?e:r[e]||r.regular},d=l`
26
2
  0% {
27
3
  transform: rotate(0deg);
28
4
  }
29
5
  100% {
30
6
  transform: rotate(360deg);
31
7
  }
32
- `;
33
- const StyledSpinner = styled.div `
8
+ `,u=i.div`
34
9
  display: inline-block;
35
10
  border-radius: 50%;
36
- border-top: ${({ theme, color, size }) => `${getSize(size) / 10}em solid ${theme.colors[color].main}`};
37
- border-bottom: ${({ size }) => `${getSize(size) / 10}em solid rgba(0, 0, 0, 0.1);`};
38
- border-right: ${({ size }) => `${getSize(size) / 10}em solid rgba(0, 0, 0, 0.1);`};
39
- border-left: ${({ size }) => `${getSize(size) / 10}em solid rgba(0, 0, 0, 0.1);`};
40
- width: ${({ size }) => getSize(size)}em;
41
- height: ${({ size }) => getSize(size)}em;
42
- animation: ${spin} ${({ speed }) => getDuration(speed)} infinite linear;
11
+ border-top: ${({theme:e,color:r,size:o})=>`${t(o)/10}em solid ${e.colors[r].main}`};
12
+ border-bottom: ${({size:e})=>`${t(e)/10}em solid rgba(0, 0, 0, 0.1);`};
13
+ border-right: ${({size:e})=>`${t(e)/10}em solid rgba(0, 0, 0, 0.1);`};
14
+ border-left: ${({size:e})=>`${t(e)/10}em solid rgba(0, 0, 0, 0.1);`};
15
+ width: ${({size:e})=>t(e)}em;
16
+ height: ${({size:e})=>t(e)}em;
17
+ animation: ${d} ${({speed:e})=>m(e)} infinite linear;
43
18
  will-change: transform;
44
- `;
45
- const Spinner = ({ size = 'regular', color = 'primary', speed = 'default', ...props }) => (jsx(StyledSpinner, Object.assign({}, props, { role: "status", "aria-live": "polite", "aria-busy": "true", size: size, speed: speed, color: color, theme: theme }), void 0));
46
-
47
- export { Spinner as default };
19
+ `,f=({size:e="regular",color:r="primary",speed:o="default",...a})=>s.createElement(u,{...a,role:"status","aria-live":"polite","aria-busy":"true",size:e,speed:o,color:r,theme:n});export{f as default};
@@ -1,33 +1,23 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import styled from 'styled-components';
3
- import theme from '../../theme.js';
4
- import { Title } from '../../typography/Heading/index.js';
5
- import '../../shared/media-queries.js';
6
-
7
- const Container = styled.div `
1
+ import e from"react";import t from"styled-components";import n from"../../theme.js";import{Title as l}from"../../typography/Heading/index.js";import"../../shared/media-queries.js";const c=t.div`
8
2
  min-height: 4rem;
9
- `;
10
- const Line = styled.div `
3
+ `,o=t.div`
11
4
  margin: auto;
12
5
  width: 2px;
13
6
  height: 100%;
14
- background-color: ${theme.colors.primary.main};
15
- `;
16
- const Graphic = styled.div `
7
+ background-color: ${n.colors.primary.main};
8
+ `,s=t.div`
17
9
  margin-right: 0.75rem;
18
- `;
19
- const Step = styled.div `
20
- font-family: ${({ theme }) => theme.typography.fontBaseFamily};
10
+ `,d=t.div`
11
+ font-family: ${({theme:r})=>r.typography.fontBaseFamily};
21
12
  display: flex;
22
13
  padding-bottom: 1rem;
23
14
 
24
15
  &:last-child {
25
- ${Line} {
16
+ ${o} {
26
17
  display: none;
27
18
  }
28
19
  }
29
- `;
30
- const Circle = styled.div `
20
+ `,p=t.div`
31
21
  width: 3rem;
32
22
  height: 3rem;
33
23
  border-radius: 3rem;
@@ -36,14 +26,8 @@ const Circle = styled.div `
36
26
  display: flex;
37
27
  align-items: center;
38
28
  justify-content: center;
39
- background-color: ${theme.colors.primary.main};
40
- `;
41
- const CircleText = styled(Title) `
29
+ background-color: ${n.colors.primary.main};
30
+ `,h=t(l)`
42
31
  font-size: 1.5rem;
43
32
  font-variant: lining-nums;
44
- `;
45
- const Stepper = ({ children, ...props }) => {
46
- return (jsx(Container, Object.assign({}, props, { children: children.map((step, index) => (jsxs(Step, { children: [jsxs(Graphic, { children: [jsx(Circle, { children: jsx(CircleText, { children: index + 1 }, void 0) }, void 0), jsx(Line, {}, void 0)] }, void 0), step] }, index))) }), void 0));
47
- };
48
-
49
- export { Stepper };
33
+ `,y=({children:r,...m})=>e.createElement(c,{...m},r.map((a,i)=>e.createElement(d,{key:i},e.createElement(s,null,e.createElement(p,null,e.createElement(h,null,i+1)),e.createElement(o,null)),a)));export{y as Stepper};
@@ -1,35 +1,19 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { useState, useCallback, useEffect } from 'react';
3
- import styled, { css } from 'styled-components';
4
- import theme from '../../theme.js';
5
- import { Title } from '../../typography/Heading/index.js';
6
- import CheckIcon from '../Icons/CheckIcon.js';
7
- import Arrow from '../Icons/Arrow.js';
8
- import { fadedColor } from '../../shared/helpers.js';
9
- import { Collapse } from 'react-collapse';
10
- import '../../shared/media-queries.js';
11
-
12
- const DEFAULT_TRANSITION_TIME = '200ms';
13
- const Container = styled.div `
1
+ import t,{useState as C,useCallback as u,useEffect as b}from"react";import r,{css as n}from"styled-components";import l from"../../theme.js";import{Title as E}from"../../typography/Heading/index.js";import x from"../Icons/CheckIcon.js";import y from"../Icons/Arrow.js";import{fadedColor as s}from"../../shared/helpers.js";import{Collapse as $}from"react-collapse";import"../../shared/media-queries.js";const a="200ms",D=r.div`
14
2
  .ReactCollapse--collapse {
15
- transition: height ${DEFAULT_TRANSITION_TIME} ease-in-out;
3
+ transition: height ${a} ease-in-out;
16
4
  }
17
- `;
18
- const HeaderExpandedProps = css `
5
+ `,k=n`
19
6
  margin-top: 0.25rem;
20
7
  transform: rotate(-180deg);
21
- `;
22
- const Header = styled.div `
8
+ `,I=r.div`
23
9
  display: flex;
24
10
  align-items: center;
25
11
  height: 4rem;
26
12
 
27
- color: ${props => props.isDisabled ? theme.colors.text.disabled : theme.colors.text.dark};
28
- `;
29
- const StyledTitle = styled(Title) `
13
+ color: ${e=>e.isDisabled?l.colors.text.disabled:l.colors.text.dark};
14
+ `,p=r(E)`
30
15
  margin: 0;
31
- `;
32
- const HeaderArrow = styled(Arrow) `
16
+ `,w=r(y)`
33
17
  margin-left: auto;
34
18
  height: 1.25rem;
35
19
  width: 1.25rem;
@@ -37,27 +21,23 @@ const HeaderArrow = styled(Arrow) `
37
21
 
38
22
  fill: currentColor;
39
23
 
40
- transition: ${DEFAULT_TRANSITION_TIME};
24
+ transition: ${a};
41
25
  transform: rotate(0deg);
42
26
  transform-origin: center;
43
- ${props => props.isExpanded && HeaderExpandedProps};
44
- `;
45
- const CircleIsCompleteStyles = (color) => css `
27
+ ${e=>e.isExpanded&&k};
28
+ `,j=e=>n`
46
29
  color: white;
47
- background-color: ${theme.colors[color].main};
48
- `;
49
- const CircleIsDisabledStyles = (isComplete, color) => css `
30
+ background-color: ${l.colors[e].main};
31
+ `,S=(e,i)=>n`
50
32
  fill: white;
51
- border: 2px solid ${fadedColor(theme.colors[color].main, 0.2)};
33
+ border: 2px solid ${s(l.colors[i].main,.2)};
52
34
 
53
- ${isComplete &&
54
- `
55
- border: 2px solid ${fadedColor(theme.colors[color].main, 0)};
56
- background-color: ${fadedColor(theme.colors[color].main, 0.5)};
35
+ ${e&&`
36
+ border: 2px solid ${s(l.colors[i].main,0)};
37
+ background-color: ${s(l.colors[i].main,.5)};
57
38
  `}
58
- `;
59
- const Circle = styled.div `
60
- font-family: ${({ theme }) => theme.typography.fontBaseFamily};
39
+ `,v=r.div`
40
+ font-family: ${({theme:e})=>e.typography.fontBaseFamily};
61
41
  display: flex;
62
42
  align-items: center;
63
43
  justify-content: center;
@@ -67,7 +47,7 @@ const Circle = styled.div `
67
47
  width: 2rem;
68
48
  height: 2rem;
69
49
  border-radius: 2rem;
70
- border: 2px solid ${props => theme.colors[props.color].main};
50
+ border: 2px solid ${e=>l.colors[e.color].main};
71
51
 
72
52
  svg {
73
53
  fill: currentColor;
@@ -86,28 +66,7 @@ const Circle = styled.div `
86
66
  margin-top: 0.1rem;
87
67
  }
88
68
 
89
- transition: background-color ${DEFAULT_TRANSITION_TIME};
90
- ${props => props.isComplete && CircleIsCompleteStyles(props.color)};
91
- ${props => props.isDisabled && CircleIsDisabledStyles(props.isComplete, props.color)};
92
- `;
93
- const StepperAccordion = (props) => {
94
- const [isExpanded, setIsExpanded] = useState(props.isExpanded || false);
95
- const toggleIsExpanded = useCallback(() => {
96
- if (!props.isDisabled) {
97
- setIsExpanded(previousValue => !previousValue);
98
- }
99
- }, [props.isDisabled]);
100
- useEffect(() => {
101
- setIsExpanded(props.isExpanded || false);
102
- }, [props.isDisabled, props.isExpanded]);
103
- const hasSteps = props.step || props.step === 0;
104
- const handleClick = (event) => {
105
- const onClick = props.onClick || toggleIsExpanded;
106
- if (!props.isDisabled) {
107
- onClick(event);
108
- }
109
- };
110
- return (jsxs(Container, { children: [jsxs(Header, Object.assign({}, props, { onClick: handleClick, isExpanded: isExpanded, isDisabled: props.isDisabled || false }, { children: [hasSteps && (jsx(Circle, Object.assign({ isComplete: props.isComplete || false, isDisabled: props.isDisabled || false, color: props.color || 'primary' }, { children: props.isComplete ? jsx(CheckIcon, {}, void 0) : jsx("span", { children: props.step }, void 0) }), void 0)), jsx(StyledTitle, { children: props.title }, void 0), jsx(HeaderArrow, { isExpanded: isExpanded }, void 0)] }), void 0), jsx(Collapse, Object.assign({ isOpened: isExpanded }, { children: props.children }), void 0), props.closedChildren && props.closedChildren] }, void 0));
111
- };
112
-
113
- export { StepperAccordion, StepperAccordion as default };
69
+ transition: background-color ${a};
70
+ ${e=>e.isComplete&&j(e.color)};
71
+ ${e=>e.isDisabled&&S(e.isComplete,e.color)};
72
+ `,d=e=>{const[i,c]=C(e.isExpanded||!1),m=u(()=>{e.isDisabled||c(o=>!o)},[e.isDisabled]);b(()=>{c(e.isExpanded||!1)},[e.isDisabled,e.isExpanded]);const f=e.step||e.step===0,h=o=>{const g=e.onClick||m;e.isDisabled||g(o)};return t.createElement(D,null,t.createElement(I,{...e,onClick:h,isExpanded:i,isDisabled:e.isDisabled||!1},f&&t.createElement(v,{isComplete:e.isComplete||!1,isDisabled:e.isDisabled||!1,color:e.color||"primary"},e.isComplete?t.createElement(x,null):t.createElement("span",null,e.step)),t.createElement(p,null,e.title),t.createElement(w,{isExpanded:i})),t.createElement($,{isOpened:i},e.children),e.closedChildren&&e.closedChildren)};export{d as StepperAccordion,d as default};
@@ -1,41 +1,11 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { Children } from 'react';
3
- import styled from 'styled-components';
4
-
5
- const TabsContainer = styled.div `
1
+ import a,{Children as l}from"react";import p from"styled-components";const d=p.div`
6
2
  display: inline-flex;
7
- border-bottom: 1px solid ${({ theme }) => theme.colors.gray.light4};
8
- `;
9
- const TabWrapper = styled.div `
10
- font-family: ${({ theme }) => theme.typography.fontAlternativeFamily};
11
- font-weight: ${({ theme }) => theme.typography.fontAlternativeRegularWeight};
3
+ border-bottom: 1px solid ${({theme:t})=>t.colors.gray.light4};
4
+ `,c=p.div`
5
+ font-family: ${({theme:t})=>t.typography.fontAlternativeFamily};
6
+ font-weight: ${({theme:t})=>t.typography.fontAlternativeRegularWeight};
12
7
  padding: 1em;
13
- border-bottom: ${({ theme, isActive, activeColor }) => isActive
14
- ? `3px solid ${theme.colors[activeColor].main}`
15
- : '3px solid transparent'};
8
+ border-bottom: ${({theme:t,isActive:r,activeColor:e})=>r?`3px solid ${t.colors[e].main}`:"3px solid transparent"};
16
9
  transition: color 0.3s ease, border 0.3s ease;
17
10
  cursor: pointer;
18
- `;
19
- const Tab = ({ children, isActive = false, onClick, activeColor = 'primary', }) => {
20
- return (jsx(TabWrapper, Object.assign({ isActive: isActive, onClick: onClick, activeColor: activeColor }, { children: children }), void 0));
21
- };
22
- const Tabs = ({ activeIndex, activeColor = 'primary', children, onTabClick, className, }) => {
23
- if (Children.count(children) <= 1) {
24
- console.error('<Tabs /> component has too few children!');
25
- return null;
26
- }
27
- return (jsx(TabsContainer, Object.assign({ className: className }, { children: Children.map(children, (child, index) => {
28
- if (!child) {
29
- return null;
30
- }
31
- const onClick = child.props.onClick;
32
- return (jsx(TabWrapper, Object.assign({}, child.props, { isActive: activeIndex === index, activeColor: activeColor, onClick: event => {
33
- onTabClick(index);
34
- if (typeof onClick === 'function') {
35
- onClick(event);
36
- }
37
- }, as: child.type || 'div' }, { children: child.props.children }), void 0));
38
- }) }), void 0));
39
- };
40
-
41
- export { Tab, Tabs, Tabs as default };
11
+ `,u=({children:t,isActive:r=!1,onClick:e,activeColor:n="primary"})=>a.createElement(c,{isActive:r,onClick:e,activeColor:n},t),m=({activeIndex:t,activeColor:r="primary",children:e,onTabClick:n,className:f})=>l.count(e)<=1?(console.error("<Tabs /> component has too few children!"),null):a.createElement(d,{className:f},l.map(e,(o,s)=>{if(!o)return null;const i=o.props.onClick;return a.createElement(c,{...o.props,isActive:t===s,activeColor:r,onClick:y=>{n(s),typeof i=="function"&&i(y)},as:o.type||"div"},o.props.children)}));export{u as Tab,m as Tabs,m as default};