@kvdbil/components 3.3.3 → 3.3.5-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ColorCard.js +48 -0
- package/cjs/ElevationCard.js +35 -0
- package/cjs/Interfaces.js +2 -0
- package/cjs/Types.js +2 -0
- package/cjs/components/Accordion/index.js +124 -0
- package/cjs/components/Badge/index.js +78 -0
- package/cjs/components/Button/index.js +170 -0
- package/cjs/components/Card/index.js +28 -0
- package/cjs/components/CheckBox/index.js +109 -0
- package/cjs/components/Chip/index.js +99 -0
- package/cjs/components/DayPicker/DayPickerNavBar.js +60 -0
- package/cjs/components/DayPicker/index.js +76 -0
- package/cjs/components/DayPicker/localeUtils.js +60 -0
- package/cjs/components/Dialog/index.js +88 -0
- package/cjs/components/ErrorMessage/index.js +31 -0
- package/cjs/components/FieldLabel.js +59 -0
- package/cjs/components/Header/Hamburger.js +55 -0
- package/cjs/components/Header/Link.js +53 -0
- package/cjs/components/Header/index.js +118 -0
- package/cjs/components/Hero/index.js +65 -0
- package/cjs/components/Icon/index.js +115 -0
- package/cjs/components/IconButton.js +130 -0
- package/cjs/components/Icons/Arrow.js +16 -0
- package/cjs/components/Icons/CheckCircle.js +16 -0
- package/cjs/components/Icons/CheckIcon.js +16 -0
- package/cjs/components/Icons/Close.js +16 -0
- package/cjs/components/Icons/ErrorCircle.js +16 -0
- package/cjs/components/Icons/InfoCircle.js +16 -0
- package/cjs/components/InlineStepper/Step.js +116 -0
- package/cjs/components/InlineStepper/StepCircle.js +93 -0
- package/cjs/components/InlineStepper/index.js +51 -0
- package/cjs/components/ListItem/Bacon.js +16 -0
- package/cjs/components/ListItem/index.js +56 -0
- package/cjs/components/Logo/LogoEn.js +35 -0
- package/cjs/components/Logo/LogoSv.js +35 -0
- package/cjs/components/Logo/index.js +32 -0
- package/cjs/components/MenuItem/index.js +99 -0
- package/cjs/components/Modal/index.js +137 -0
- package/cjs/components/NotificationButton/index.js +39 -0
- package/cjs/components/OffCanvas/Overlay.js +70 -0
- package/cjs/components/OffCanvas/index.js +133 -0
- package/cjs/components/OffCanvas/useClickOutside.js +21 -0
- package/cjs/components/RadioButton/index.js +148 -0
- package/cjs/components/Range/index.js +82 -0
- package/cjs/components/Select/components/test-icon.js +16 -0
- package/cjs/components/Select/index.js +225 -0
- package/cjs/components/Snackbar/index.js +155 -0
- package/cjs/components/Spinner/index.js +68 -0
- package/cjs/components/Stepper/index.js +60 -0
- package/cjs/components/StepperAccordion/index.js +133 -0
- package/cjs/components/Tabs/index.js +71 -0
- package/cjs/components/TextArea/index.js +120 -0
- package/cjs/components/Textfield/index.js +130 -0
- package/cjs/components/TimePicker/index.js +49 -0
- package/cjs/components/TimePicker/testHelper.js +16 -0
- package/cjs/components/Toggle/index.js +83 -0
- package/cjs/icons/components/AccountCreateIcon.js +48 -0
- package/cjs/icons/components/AccountIcon.js +44 -0
- package/cjs/icons/components/AccountLoginIcon.js +50 -0
- package/cjs/icons/components/ArrowDownIcon.js +44 -0
- package/cjs/icons/components/ArrowLeftIcon.js +42 -0
- package/cjs/icons/components/ArrowLeftSharpIcon.js +44 -0
- package/cjs/icons/components/ArrowLeftSmallIcon.js +44 -0
- package/cjs/icons/components/ArrowLong.js +45 -0
- package/cjs/icons/components/ArrowRestartIcon.js +44 -0
- package/cjs/icons/components/ArrowRightIcon.js +42 -0
- package/cjs/icons/components/ArrowRightSharpIcon.js +44 -0
- package/cjs/icons/components/ArrowUpIcon.js +44 -0
- package/cjs/icons/components/AuctionIcon.js +42 -0
- package/cjs/icons/components/BackArrowIcon.js +42 -0
- package/cjs/icons/components/Baseline360Icon.js +45 -0
- package/cjs/icons/components/BellIcon.js +42 -0
- package/cjs/icons/components/BidIcon.js +42 -0
- package/cjs/icons/components/BidKrIcon.js +48 -0
- package/cjs/icons/components/BreaksIcon.js +42 -0
- package/cjs/icons/components/BuyCarIcon.js +42 -0
- package/cjs/icons/components/CabIcon.js +44 -0
- package/cjs/icons/components/CalendarIcon.js +51 -0
- package/cjs/icons/components/CameraIcon.js +42 -0
- package/cjs/icons/components/Car360Icon.js +67 -0
- package/cjs/icons/components/CarFrontIcon.js +42 -0
- package/cjs/icons/components/CarSearchIcon.js +42 -0
- package/cjs/icons/components/CarSideIcon.js +42 -0
- package/cjs/icons/components/CarTiresIcon.js +42 -0
- package/cjs/icons/components/CaravanIcon.js +42 -0
- package/cjs/icons/components/CardViewIcon.js +68 -0
- package/cjs/icons/components/CarloanIcon.js +44 -0
- package/cjs/icons/components/CertifiedIcon.js +52 -0
- package/cjs/icons/components/ChatIcon.js +43 -0
- package/cjs/icons/components/CheckIcon.js +43 -0
- package/cjs/icons/components/CheckThinIcon.js +43 -0
- package/cjs/icons/components/CheckmarkFilledIcon.js +42 -0
- package/cjs/icons/components/CheckmarkIcon.js +42 -0
- package/cjs/icons/components/ClipboardFilledIcon.js +42 -0
- package/cjs/icons/components/ClipboardIcon.js +42 -0
- package/cjs/icons/components/ClockFilledIcon.js +44 -0
- package/cjs/icons/components/ClockIcon.js +43 -0
- package/cjs/icons/components/CloseIcon.js +43 -0
- package/cjs/icons/components/CloseThinIcon.js +44 -0
- package/cjs/icons/components/CoffeeIcon.js +43 -0
- package/cjs/icons/components/CombiIcon.js +44 -0
- package/cjs/icons/components/CommentCircleFilledIcon.js +48 -0
- package/cjs/icons/components/CommentCircleIconIcon.js +46 -0
- package/cjs/icons/components/CommentIcon.js +46 -0
- package/cjs/icons/components/ContactIcon.js +46 -0
- package/cjs/icons/components/CoupeIcon.js +44 -0
- package/cjs/icons/components/CreditCardIcon.js +43 -0
- package/cjs/icons/components/CrossCircleIcon.js +42 -0
- package/cjs/icons/components/CrownIcon.js +43 -0
- package/cjs/icons/components/DealmakerIcon.js +48 -0
- package/cjs/icons/components/DeliveryIcon.js +51 -0
- package/cjs/icons/components/DetailedSearchIcon.js +43 -0
- package/cjs/icons/components/EcoFriendlyIcon.js +46 -0
- package/cjs/icons/components/EditIcon.js +43 -0
- package/cjs/icons/components/EngineIcon.js +42 -0
- package/cjs/icons/components/EnglandFlagIcon.js +60 -0
- package/cjs/icons/components/EvaluationIcon.js +46 -0
- package/cjs/icons/components/ExaminationMarkFilledIcon.js +42 -0
- package/cjs/icons/components/ExaminationMarkIcon.js +42 -0
- package/cjs/icons/components/ExteriorIcon.js +42 -0
- package/cjs/icons/components/EyeIcon.js +48 -0
- package/cjs/icons/components/FacebookBtnIcon.js +42 -0
- package/cjs/icons/components/FacebookIcon.js +44 -0
- package/cjs/icons/components/FatalIcon.js +44 -0
- package/cjs/icons/components/FavouriteIcon.js +42 -0
- package/cjs/icons/components/FavouriteSolidIcon.js +42 -0
- package/cjs/icons/components/FilterIcon.js +44 -0
- package/cjs/icons/components/FinanceIcon.js +42 -0
- package/cjs/icons/components/FindCarIcon.js +42 -0
- package/cjs/icons/components/FixedMonthlyCostIcon.js +48 -0
- package/cjs/icons/components/FlagIcon.js +42 -0
- package/cjs/icons/components/FlexibilityIcon.js +48 -0
- package/cjs/icons/components/ForumLargeIcon.js +42 -0
- package/cjs/icons/components/ForumSmallIcon.js +42 -0
- package/cjs/icons/components/GavelIcon.js +44 -0
- package/cjs/icons/components/GearboxIcon.js +44 -0
- package/cjs/icons/components/GiftIcon.js +58 -0
- package/cjs/icons/components/GridViewIcon.js +42 -0
- package/cjs/icons/components/GroupIcon.js +79 -0
- package/cjs/icons/components/GuaranteeIcon.js +42 -0
- package/cjs/icons/components/GuaranteeLargeIcon.js +42 -0
- package/cjs/icons/components/GuaranteeSmallIcon.js +42 -0
- package/cjs/icons/components/HalfCombiIcon.js +44 -0
- package/cjs/icons/components/HamburgerIcon.js +42 -0
- package/cjs/icons/components/HandshakeIcon.js +42 -0
- package/cjs/icons/components/HelpingHandIcon.js +60 -0
- package/cjs/icons/components/IdIcon.js +45 -0
- package/cjs/icons/components/InformationIcon.js +42 -0
- package/cjs/icons/components/InstagramIcon.js +49 -0
- package/cjs/icons/components/InsuranceIcon.js +42 -0
- package/cjs/icons/components/InteriorIcon.js +44 -0
- package/cjs/icons/components/InteriorThinIcon.js +44 -0
- package/cjs/icons/components/InternationalIcon.js +50 -0
- package/cjs/icons/components/KvdTestIcon.js +42 -0
- package/cjs/icons/components/KvdVenueIcon.js +42 -0
- package/cjs/icons/components/LifebuoyIcon.js +42 -0
- package/cjs/icons/components/LiftTruckIcon.js +42 -0
- package/cjs/icons/components/LinkedInIcon.js +42 -0
- package/cjs/icons/components/ListViewIcon.js +64 -0
- package/cjs/icons/components/MailIcon.js +44 -0
- package/cjs/icons/components/MinibusIcon.js +44 -0
- package/cjs/icons/components/MinivanIcon.js +45 -0
- package/cjs/icons/components/MobileIcon.js +52 -0
- package/cjs/icons/components/MotorcycleIcon.js +74 -0
- package/cjs/icons/components/MrfLogoIcon.js +53 -0
- package/cjs/icons/components/NotFoundIcon.js +42 -0
- package/cjs/icons/components/OverbidIcon.js +44 -0
- package/cjs/icons/components/PdfIconIcon.js +42 -0
- package/cjs/icons/components/PhoneIcon.js +44 -0
- package/cjs/icons/components/PickUpIcon.js +42 -0
- package/cjs/icons/components/PinIcon.js +42 -0
- package/cjs/icons/components/PlayIcon.js +42 -0
- package/cjs/icons/components/Pricetag.js +51 -0
- package/cjs/icons/components/PricetagFilledKronaIcon.js +47 -0
- package/cjs/icons/components/PrivateCarIcon.js +42 -0
- package/cjs/icons/components/ProfileCircleIcon.js +42 -0
- package/cjs/icons/components/ProfileIcon.js +42 -0
- package/cjs/icons/components/RadioIcon.js +54 -0
- package/cjs/icons/components/ReclamationIcon.js +42 -0
- package/cjs/icons/components/ReleasingIcon.js +48 -0
- package/cjs/icons/components/RemoveFilterIcon.js +42 -0
- package/cjs/icons/components/ReservedPriceIcon.js +42 -0
- package/cjs/icons/components/ResultIcon.js +42 -0
- package/cjs/icons/components/SafePaymentIcon.js +42 -0
- package/cjs/icons/components/SaleTagIcon.js +42 -0
- package/cjs/icons/components/SearchCheckIcon.js +48 -0
- package/cjs/icons/components/SearchIcon.js +42 -0
- package/cjs/icons/components/SedanIcon.js +44 -0
- package/cjs/icons/components/SellCarIcon.js +42 -0
- package/cjs/icons/components/SellCarsIcon.js +42 -0
- package/cjs/icons/components/ServiceIcon.js +47 -0
- package/cjs/icons/components/ShareIcon.js +68 -0
- package/cjs/icons/components/ShieldIcon.js +42 -0
- package/cjs/icons/components/SignInIcon.js +42 -0
- package/cjs/icons/components/SignOutIcon.js +42 -0
- package/cjs/icons/components/SpeedMeterIcon.js +44 -0
- package/cjs/icons/components/StarCircleIcon.js +42 -0
- package/cjs/icons/components/StartIcon.js +50 -0
- package/cjs/icons/components/StoreIcon.js +42 -0
- package/cjs/icons/components/SuvIcon.js +44 -0
- package/cjs/icons/components/SwedenFlag.js +50 -0
- package/cjs/icons/components/TankIcon.js +52 -0
- package/cjs/icons/components/TireIcon.js +42 -0
- package/cjs/icons/components/TransportIcon.js +42 -0
- package/cjs/icons/components/TrashcanIcon.js +42 -0
- package/cjs/icons/components/TrophyIcon.js +42 -0
- package/cjs/icons/components/TruckIcon.js +42 -0
- package/cjs/icons/components/UmbrellaIcon.js +42 -0
- package/cjs/icons/components/ValuationIcon.js +42 -0
- package/cjs/icons/components/ValueIcon.js +47 -0
- package/cjs/icons/components/WarningIcon.js +42 -0
- package/cjs/icons/components/YoutubeIcon.js +42 -0
- package/cjs/icons/components/index.js +320 -0
- package/cjs/index.js +438 -0
- package/cjs/react-app-env.d.js +2 -0
- package/cjs/shared/constants.js +7 -0
- package/cjs/shared/helpers.js +28 -0
- package/cjs/shared/helpers.spec.js +36 -0
- package/cjs/shared/media-queries.js +41 -0
- package/cjs/styled.d.js +4 -0
- package/cjs/theme.js +125 -0
- package/cjs/typography/BodyText/index.js +66 -0
- package/cjs/typography/ButtonText/index.js +48 -0
- package/cjs/typography/Heading/index.js +92 -0
- package/cjs/utils/utils.js +33 -0
- package/esm/ColorCard.js +40 -0
- package/esm/ElevationCard.js +27 -0
- package/esm/Interfaces.js +1 -0
- package/esm/Types.js +1 -0
- package/esm/components/Accordion/index.js +115 -0
- package/esm/components/Badge/index.js +69 -0
- package/esm/components/Button/index.js +161 -0
- package/esm/components/Card/index.js +19 -0
- package/esm/components/CheckBox/index.js +100 -0
- package/esm/components/Chip/index.js +90 -0
- package/esm/components/DayPicker/DayPickerNavBar.js +52 -0
- package/esm/components/DayPicker/index.js +66 -0
- package/esm/components/DayPicker/localeUtils.js +52 -0
- package/esm/components/Dialog/index.js +79 -0
- package/esm/components/ErrorMessage/index.js +22 -0
- package/esm/components/FieldLabel.js +51 -0
- package/esm/components/Header/Hamburger.js +47 -0
- package/esm/components/Header/Link.js +45 -0
- package/esm/components/Header/index.js +109 -0
- package/esm/components/Hero/index.js +56 -0
- package/esm/components/Icon/index.js +107 -0
- package/esm/components/IconButton.js +122 -0
- package/esm/components/Icons/Arrow.js +12 -0
- package/esm/components/Icons/CheckCircle.js +12 -0
- package/esm/components/Icons/CheckIcon.js +12 -0
- package/esm/components/Icons/Close.js +12 -0
- package/esm/components/Icons/ErrorCircle.js +12 -0
- package/esm/components/Icons/InfoCircle.js +12 -0
- package/esm/components/InlineStepper/Step.js +107 -0
- package/esm/components/InlineStepper/StepCircle.js +85 -0
- package/esm/components/InlineStepper/index.js +43 -0
- package/esm/components/ListItem/Bacon.js +12 -0
- package/esm/components/ListItem/index.js +48 -0
- package/esm/components/Logo/LogoEn.js +31 -0
- package/esm/components/Logo/LogoSv.js +31 -0
- package/esm/components/Logo/index.js +23 -0
- package/esm/components/MenuItem/index.js +90 -0
- package/esm/components/Modal/index.js +128 -0
- package/esm/components/NotificationButton/index.js +31 -0
- package/esm/components/OffCanvas/Overlay.js +61 -0
- package/esm/components/OffCanvas/index.js +124 -0
- package/esm/components/OffCanvas/useClickOutside.js +17 -0
- package/esm/components/RadioButton/index.js +139 -0
- package/esm/components/Range/index.js +73 -0
- package/esm/components/Select/components/test-icon.js +12 -0
- package/esm/components/Select/index.js +215 -0
- package/esm/components/Snackbar/index.js +146 -0
- package/esm/components/Spinner/index.js +60 -0
- package/esm/components/Stepper/index.js +52 -0
- package/esm/components/StepperAccordion/index.js +124 -0
- package/esm/components/Tabs/index.js +61 -0
- package/esm/components/TextArea/index.js +111 -0
- package/esm/components/Textfield/index.js +121 -0
- package/esm/components/TimePicker/index.js +40 -0
- package/esm/components/TimePicker/testHelper.js +12 -0
- package/esm/components/Toggle/index.js +75 -0
- package/esm/icons/components/AccountCreateIcon.js +22 -0
- package/esm/icons/components/AccountIcon.js +18 -0
- package/esm/icons/components/AccountLoginIcon.js +24 -0
- package/esm/icons/components/ArrowDownIcon.js +18 -0
- package/esm/icons/components/ArrowLeftIcon.js +16 -0
- package/esm/icons/components/ArrowLeftSharpIcon.js +18 -0
- package/esm/icons/components/ArrowLeftSmallIcon.js +18 -0
- package/esm/icons/components/ArrowLong.js +19 -0
- package/esm/icons/components/ArrowRestartIcon.js +18 -0
- package/esm/icons/components/ArrowRightIcon.js +16 -0
- package/esm/icons/components/ArrowRightSharpIcon.js +18 -0
- package/esm/icons/components/ArrowUpIcon.js +18 -0
- package/esm/icons/components/AuctionIcon.js +16 -0
- package/esm/icons/components/BackArrowIcon.js +16 -0
- package/esm/icons/components/Baseline360Icon.js +19 -0
- package/esm/icons/components/BellIcon.js +16 -0
- package/esm/icons/components/BidIcon.js +16 -0
- package/esm/icons/components/BidKrIcon.js +22 -0
- package/esm/icons/components/BreaksIcon.js +16 -0
- package/esm/icons/components/BuyCarIcon.js +16 -0
- package/esm/icons/components/CabIcon.js +18 -0
- package/esm/icons/components/CalendarIcon.js +25 -0
- package/esm/icons/components/CameraIcon.js +16 -0
- package/esm/icons/components/Car360Icon.js +41 -0
- package/esm/icons/components/CarFrontIcon.js +16 -0
- package/esm/icons/components/CarSearchIcon.js +16 -0
- package/esm/icons/components/CarSideIcon.js +16 -0
- package/esm/icons/components/CarTiresIcon.js +16 -0
- package/esm/icons/components/CaravanIcon.js +16 -0
- package/esm/icons/components/CardViewIcon.js +42 -0
- package/esm/icons/components/CarloanIcon.js +18 -0
- package/esm/icons/components/CertifiedIcon.js +26 -0
- package/esm/icons/components/ChatIcon.js +17 -0
- package/esm/icons/components/CheckIcon.js +17 -0
- package/esm/icons/components/CheckThinIcon.js +17 -0
- package/esm/icons/components/CheckmarkFilledIcon.js +16 -0
- package/esm/icons/components/CheckmarkIcon.js +16 -0
- package/esm/icons/components/ClipboardFilledIcon.js +16 -0
- package/esm/icons/components/ClipboardIcon.js +16 -0
- package/esm/icons/components/ClockFilledIcon.js +18 -0
- package/esm/icons/components/ClockIcon.js +17 -0
- package/esm/icons/components/CloseIcon.js +17 -0
- package/esm/icons/components/CloseThinIcon.js +18 -0
- package/esm/icons/components/CoffeeIcon.js +17 -0
- package/esm/icons/components/CombiIcon.js +18 -0
- package/esm/icons/components/CommentCircleFilledIcon.js +22 -0
- package/esm/icons/components/CommentCircleIconIcon.js +20 -0
- package/esm/icons/components/CommentIcon.js +20 -0
- package/esm/icons/components/ContactIcon.js +20 -0
- package/esm/icons/components/CoupeIcon.js +18 -0
- package/esm/icons/components/CreditCardIcon.js +17 -0
- package/esm/icons/components/CrossCircleIcon.js +16 -0
- package/esm/icons/components/CrownIcon.js +17 -0
- package/esm/icons/components/DealmakerIcon.js +22 -0
- package/esm/icons/components/DeliveryIcon.js +25 -0
- package/esm/icons/components/DetailedSearchIcon.js +17 -0
- package/esm/icons/components/EcoFriendlyIcon.js +20 -0
- package/esm/icons/components/EditIcon.js +17 -0
- package/esm/icons/components/EngineIcon.js +16 -0
- package/esm/icons/components/EnglandFlagIcon.js +34 -0
- package/esm/icons/components/EvaluationIcon.js +20 -0
- package/esm/icons/components/ExaminationMarkFilledIcon.js +16 -0
- package/esm/icons/components/ExaminationMarkIcon.js +16 -0
- package/esm/icons/components/ExteriorIcon.js +16 -0
- package/esm/icons/components/EyeIcon.js +22 -0
- package/esm/icons/components/FacebookBtnIcon.js +16 -0
- package/esm/icons/components/FacebookIcon.js +18 -0
- package/esm/icons/components/FatalIcon.js +18 -0
- package/esm/icons/components/FavouriteIcon.js +16 -0
- package/esm/icons/components/FavouriteSolidIcon.js +16 -0
- package/esm/icons/components/FilterIcon.js +18 -0
- package/esm/icons/components/FinanceIcon.js +16 -0
- package/esm/icons/components/FindCarIcon.js +16 -0
- package/esm/icons/components/FixedMonthlyCostIcon.js +22 -0
- package/esm/icons/components/FlagIcon.js +16 -0
- package/esm/icons/components/FlexibilityIcon.js +22 -0
- package/esm/icons/components/ForumLargeIcon.js +16 -0
- package/esm/icons/components/ForumSmallIcon.js +16 -0
- package/esm/icons/components/GavelIcon.js +18 -0
- package/esm/icons/components/GearboxIcon.js +18 -0
- package/esm/icons/components/GiftIcon.js +32 -0
- package/esm/icons/components/GridViewIcon.js +16 -0
- package/esm/icons/components/GroupIcon.js +53 -0
- package/esm/icons/components/GuaranteeIcon.js +16 -0
- package/esm/icons/components/GuaranteeLargeIcon.js +16 -0
- package/esm/icons/components/GuaranteeSmallIcon.js +16 -0
- package/esm/icons/components/HalfCombiIcon.js +18 -0
- package/esm/icons/components/HamburgerIcon.js +16 -0
- package/esm/icons/components/HandshakeIcon.js +16 -0
- package/esm/icons/components/HelpingHandIcon.js +34 -0
- package/esm/icons/components/IdIcon.js +19 -0
- package/esm/icons/components/InformationIcon.js +16 -0
- package/esm/icons/components/InstagramIcon.js +23 -0
- package/esm/icons/components/InsuranceIcon.js +16 -0
- package/esm/icons/components/InteriorIcon.js +18 -0
- package/esm/icons/components/InteriorThinIcon.js +18 -0
- package/esm/icons/components/InternationalIcon.js +24 -0
- package/esm/icons/components/KvdTestIcon.js +16 -0
- package/esm/icons/components/KvdVenueIcon.js +16 -0
- package/esm/icons/components/LifebuoyIcon.js +16 -0
- package/esm/icons/components/LiftTruckIcon.js +16 -0
- package/esm/icons/components/LinkedInIcon.js +16 -0
- package/esm/icons/components/ListViewIcon.js +38 -0
- package/esm/icons/components/MailIcon.js +18 -0
- package/esm/icons/components/MinibusIcon.js +18 -0
- package/esm/icons/components/MinivanIcon.js +19 -0
- package/esm/icons/components/MobileIcon.js +26 -0
- package/esm/icons/components/MotorcycleIcon.js +48 -0
- package/esm/icons/components/MrfLogoIcon.js +27 -0
- package/esm/icons/components/NotFoundIcon.js +16 -0
- package/esm/icons/components/OverbidIcon.js +18 -0
- package/esm/icons/components/PdfIconIcon.js +16 -0
- package/esm/icons/components/PhoneIcon.js +18 -0
- package/esm/icons/components/PickUpIcon.js +16 -0
- package/esm/icons/components/PinIcon.js +16 -0
- package/esm/icons/components/PlayIcon.js +16 -0
- package/esm/icons/components/Pricetag.js +25 -0
- package/esm/icons/components/PricetagFilledKronaIcon.js +21 -0
- package/esm/icons/components/PrivateCarIcon.js +16 -0
- package/esm/icons/components/ProfileCircleIcon.js +16 -0
- package/esm/icons/components/ProfileIcon.js +16 -0
- package/esm/icons/components/RadioIcon.js +28 -0
- package/esm/icons/components/ReclamationIcon.js +16 -0
- package/esm/icons/components/ReleasingIcon.js +22 -0
- package/esm/icons/components/RemoveFilterIcon.js +16 -0
- package/esm/icons/components/ReservedPriceIcon.js +16 -0
- package/esm/icons/components/ResultIcon.js +16 -0
- package/esm/icons/components/SafePaymentIcon.js +16 -0
- package/esm/icons/components/SaleTagIcon.js +16 -0
- package/esm/icons/components/SearchCheckIcon.js +22 -0
- package/esm/icons/components/SearchIcon.js +16 -0
- package/esm/icons/components/SedanIcon.js +18 -0
- package/esm/icons/components/SellCarIcon.js +16 -0
- package/esm/icons/components/SellCarsIcon.js +16 -0
- package/esm/icons/components/ServiceIcon.js +21 -0
- package/esm/icons/components/ShareIcon.js +42 -0
- package/esm/icons/components/ShieldIcon.js +16 -0
- package/esm/icons/components/SignInIcon.js +16 -0
- package/esm/icons/components/SignOutIcon.js +16 -0
- package/esm/icons/components/SpeedMeterIcon.js +18 -0
- package/esm/icons/components/StarCircleIcon.js +16 -0
- package/esm/icons/components/StartIcon.js +24 -0
- package/esm/icons/components/StoreIcon.js +16 -0
- package/esm/icons/components/SuvIcon.js +18 -0
- package/esm/icons/components/SwedenFlag.js +24 -0
- package/esm/icons/components/TankIcon.js +26 -0
- package/esm/icons/components/TireIcon.js +16 -0
- package/esm/icons/components/TransportIcon.js +16 -0
- package/esm/icons/components/TrashcanIcon.js +16 -0
- package/esm/icons/components/TrophyIcon.js +16 -0
- package/esm/icons/components/TruckIcon.js +16 -0
- package/esm/icons/components/UmbrellaIcon.js +16 -0
- package/esm/icons/components/ValuationIcon.js +16 -0
- package/esm/icons/components/ValueIcon.js +21 -0
- package/esm/icons/components/WarningIcon.js +16 -0
- package/esm/icons/components/YoutubeIcon.js +16 -0
- package/esm/icons/components/index.js +157 -0
- package/esm/index.js +220 -0
- package/esm/react-app-env.d.js +1 -0
- package/esm/shared/constants.js +3 -0
- package/esm/shared/helpers.js +23 -0
- package/esm/shared/helpers.spec.js +34 -0
- package/esm/shared/media-queries.js +35 -0
- package/esm/styled.d.js +1 -0
- package/esm/theme.js +121 -0
- package/esm/typography/BodyText/index.js +48 -0
- package/esm/typography/ButtonText/index.js +33 -0
- package/esm/typography/Heading/index.js +76 -0
- package/esm/utils/utils.js +28 -0
- package/package.json +11 -5
- package/{ColorCard.d.ts → types/ColorCard.d.ts} +0 -0
- package/{ElevationCard.d.ts → types/ElevationCard.d.ts} +0 -0
- package/{Interfaces.d.ts → types/Interfaces.d.ts} +0 -0
- package/{Types.d.ts → types/Types.d.ts} +0 -0
- package/{components → types/components}/Accordion/index.d.ts +0 -0
- package/{components → types/components}/Badge/index.d.ts +0 -0
- package/{components → types/components}/Button/index.d.ts +0 -0
- package/{components → types/components}/Card/index.d.ts +0 -0
- package/{components → types/components}/CheckBox/index.d.ts +0 -0
- package/{components → types/components}/Chip/index.d.ts +0 -0
- package/{components → types/components}/DayPicker/DayPickerNavBar.d.ts +0 -0
- package/{components → types/components}/DayPicker/index.d.ts +0 -0
- package/{components → types/components}/DayPicker/localeUtils.d.ts +0 -0
- package/{components → types/components}/Dialog/index.d.ts +0 -0
- package/{components → types/components}/ErrorMessage/index.d.ts +0 -0
- package/{components → types/components}/FieldLabel.d.ts +0 -0
- package/{components → types/components}/Header/Hamburger.d.ts +0 -0
- package/{components → types/components}/Header/Link.d.ts +0 -0
- package/{components → types/components}/Header/index.d.ts +0 -0
- package/{components → types/components}/Hero/index.d.ts +0 -0
- package/{components → types/components}/Icon/index.d.ts +0 -0
- package/{components → types/components}/IconButton.d.ts +0 -0
- package/{components → types/components}/Icons/Arrow.d.ts +0 -0
- package/{components → types/components}/Icons/CheckCircle.d.ts +0 -0
- package/{components → types/components}/Icons/CheckIcon.d.ts +0 -0
- package/{components → types/components}/Icons/Close.d.ts +0 -0
- package/{components → types/components}/Icons/ErrorCircle.d.ts +0 -0
- package/{components → types/components}/Icons/InfoCircle.d.ts +0 -0
- package/{components → types/components}/InlineStepper/Step.d.ts +0 -0
- package/{components → types/components}/InlineStepper/StepCircle.d.ts +0 -0
- package/{components → types/components}/InlineStepper/index.d.ts +0 -0
- package/{components → types/components}/ListItem/Bacon.d.ts +0 -0
- package/{components → types/components}/ListItem/index.d.ts +0 -0
- package/{components → types/components}/Logo/LogoEn.d.ts +0 -0
- package/{components → types/components}/Logo/LogoSv.d.ts +0 -0
- package/{components → types/components}/Logo/index.d.ts +0 -0
- package/{components → types/components}/MenuItem/index.d.ts +0 -0
- package/{components → types/components}/Modal/index.d.ts +0 -0
- package/{components → types/components}/NotificationButton/index.d.ts +0 -0
- package/{components → types/components}/OffCanvas/Overlay.d.ts +0 -0
- package/{components → types/components}/OffCanvas/index.d.ts +0 -0
- package/{components → types/components}/OffCanvas/useClickOutside.d.ts +0 -0
- package/{components → types/components}/RadioButton/index.d.ts +0 -0
- package/{components → types/components}/Range/index.d.ts +0 -0
- package/types/components/Select/components/test-icon.d.ts +1 -0
- package/{components → types/components}/Select/index.d.ts +0 -0
- package/{components → types/components}/Snackbar/index.d.ts +0 -0
- package/{components → types/components}/Spinner/index.d.ts +0 -0
- package/{components → types/components}/Stepper/index.d.ts +0 -0
- package/{components → types/components}/StepperAccordion/index.d.ts +0 -0
- package/{components → types/components}/Tabs/index.d.ts +0 -0
- package/{components → types/components}/TextArea/index.d.ts +0 -0
- package/{components → types/components}/Textfield/index.d.ts +0 -0
- package/{components → types/components}/TimePicker/index.d.ts +0 -0
- package/{components → types/components}/TimePicker/testHelper.d.ts +0 -0
- package/{components → types/components}/Toggle/index.d.ts +0 -0
- package/{icons → types/icons}/components/AccountCreateIcon.d.ts +0 -0
- package/{icons → types/icons}/components/AccountIcon.d.ts +0 -0
- package/{icons → types/icons}/components/AccountLoginIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ArrowDownIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ArrowLeftIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ArrowLeftSharpIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ArrowLeftSmallIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ArrowLong.d.ts +0 -0
- package/{icons → types/icons}/components/ArrowRestartIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ArrowRightIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ArrowRightSharpIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ArrowUpIcon.d.ts +0 -0
- package/{icons → types/icons}/components/AuctionIcon.d.ts +0 -0
- package/{icons → types/icons}/components/BackArrowIcon.d.ts +0 -0
- package/{icons → types/icons}/components/Baseline360Icon.d.ts +0 -0
- package/{icons → types/icons}/components/BellIcon.d.ts +0 -0
- package/{icons → types/icons}/components/BidIcon.d.ts +0 -0
- package/{icons → types/icons}/components/BidKrIcon.d.ts +0 -0
- package/{icons → types/icons}/components/BreaksIcon.d.ts +0 -0
- package/{icons → types/icons}/components/BuyCarIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CabIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CalendarIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CameraIcon.d.ts +0 -0
- package/{icons → types/icons}/components/Car360Icon.d.ts +0 -0
- package/{icons → types/icons}/components/CarFrontIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CarSearchIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CarSideIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CarTiresIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CaravanIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CardViewIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CarloanIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CertifiedIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ChatIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CheckIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CheckThinIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CheckmarkFilledIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CheckmarkIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ClipboardFilledIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ClipboardIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ClockFilledIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ClockIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CloseIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CloseThinIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CoffeeIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CombiIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CommentCircleFilledIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CommentCircleIconIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CommentIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ContactIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CoupeIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CreditCardIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CrossCircleIcon.d.ts +0 -0
- package/{icons → types/icons}/components/CrownIcon.d.ts +0 -0
- package/{icons → types/icons}/components/DealmakerIcon.d.ts +0 -0
- package/{icons → types/icons}/components/DeliveryIcon.d.ts +0 -0
- package/{icons → types/icons}/components/DetailedSearchIcon.d.ts +0 -0
- package/{icons → types/icons}/components/EcoFriendlyIcon.d.ts +0 -0
- package/{icons → types/icons}/components/EditIcon.d.ts +0 -0
- package/{icons → types/icons}/components/EngineIcon.d.ts +0 -0
- package/{icons → types/icons}/components/EnglandFlagIcon.d.ts +0 -0
- package/{icons → types/icons}/components/EvaluationIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ExaminationMarkFilledIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ExaminationMarkIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ExteriorIcon.d.ts +0 -0
- package/{icons → types/icons}/components/EyeIcon.d.ts +0 -0
- package/{icons → types/icons}/components/FacebookBtnIcon.d.ts +0 -0
- package/{icons → types/icons}/components/FacebookIcon.d.ts +0 -0
- package/{icons → types/icons}/components/FatalIcon.d.ts +0 -0
- package/{icons → types/icons}/components/FavouriteIcon.d.ts +0 -0
- package/{icons → types/icons}/components/FavouriteSolidIcon.d.ts +0 -0
- package/{icons → types/icons}/components/FilterIcon.d.ts +0 -0
- package/{icons → types/icons}/components/FinanceIcon.d.ts +0 -0
- package/{icons → types/icons}/components/FindCarIcon.d.ts +0 -0
- package/{icons → types/icons}/components/FixedMonthlyCostIcon.d.ts +0 -0
- package/{icons → types/icons}/components/FlagIcon.d.ts +0 -0
- package/{icons → types/icons}/components/FlexibilityIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ForumLargeIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ForumSmallIcon.d.ts +0 -0
- package/{icons → types/icons}/components/GavelIcon.d.ts +0 -0
- package/{icons → types/icons}/components/GearboxIcon.d.ts +0 -0
- package/{icons → types/icons}/components/GiftIcon.d.ts +0 -0
- package/{icons → types/icons}/components/GridViewIcon.d.ts +0 -0
- package/{icons → types/icons}/components/GroupIcon.d.ts +0 -0
- package/{icons → types/icons}/components/GuaranteeIcon.d.ts +0 -0
- package/{icons → types/icons}/components/GuaranteeLargeIcon.d.ts +0 -0
- package/{icons → types/icons}/components/GuaranteeSmallIcon.d.ts +0 -0
- package/{icons → types/icons}/components/HalfCombiIcon.d.ts +0 -0
- package/{icons → types/icons}/components/HamburgerIcon.d.ts +0 -0
- package/{icons → types/icons}/components/HandshakeIcon.d.ts +0 -0
- package/{icons → types/icons}/components/HelpingHandIcon.d.ts +0 -0
- package/{icons → types/icons}/components/IdIcon.d.ts +0 -0
- package/{icons → types/icons}/components/InformationIcon.d.ts +0 -0
- package/{icons → types/icons}/components/InstagramIcon.d.ts +0 -0
- package/{icons → types/icons}/components/InsuranceIcon.d.ts +0 -0
- package/{icons → types/icons}/components/InteriorIcon.d.ts +0 -0
- package/{icons → types/icons}/components/InteriorThinIcon.d.ts +0 -0
- package/{icons → types/icons}/components/InternationalIcon.d.ts +0 -0
- package/{icons → types/icons}/components/KvdTestIcon.d.ts +0 -0
- package/{icons → types/icons}/components/KvdVenueIcon.d.ts +0 -0
- package/{icons → types/icons}/components/LifebuoyIcon.d.ts +0 -0
- package/{icons → types/icons}/components/LiftTruckIcon.d.ts +0 -0
- package/{icons → types/icons}/components/LinkedInIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ListViewIcon.d.ts +0 -0
- package/{icons → types/icons}/components/MailIcon.d.ts +0 -0
- package/{icons → types/icons}/components/MinibusIcon.d.ts +0 -0
- package/{icons → types/icons}/components/MinivanIcon.d.ts +0 -0
- package/{icons → types/icons}/components/MobileIcon.d.ts +0 -0
- package/{icons → types/icons}/components/MotorcycleIcon.d.ts +0 -0
- package/{icons → types/icons}/components/MrfLogoIcon.d.ts +0 -0
- package/{icons → types/icons}/components/NotFoundIcon.d.ts +0 -0
- package/{icons → types/icons}/components/OverbidIcon.d.ts +0 -0
- package/{icons → types/icons}/components/PdfIconIcon.d.ts +0 -0
- package/{icons → types/icons}/components/PhoneIcon.d.ts +0 -0
- package/{icons → types/icons}/components/PickUpIcon.d.ts +0 -0
- package/{icons → types/icons}/components/PinIcon.d.ts +0 -0
- package/{icons → types/icons}/components/PlayIcon.d.ts +0 -0
- package/{icons → types/icons}/components/Pricetag.d.ts +0 -0
- package/{icons → types/icons}/components/PricetagFilledKronaIcon.d.ts +0 -0
- package/{icons → types/icons}/components/PrivateCarIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ProfileCircleIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ProfileIcon.d.ts +0 -0
- package/{icons → types/icons}/components/RadioIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ReclamationIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ReleasingIcon.d.ts +0 -0
- package/{icons → types/icons}/components/RemoveFilterIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ReservedPriceIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ResultIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SafePaymentIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SaleTagIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SearchCheckIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SearchIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SedanIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SellCarIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SellCarsIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ServiceIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ShareIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ShieldIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SignInIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SignOutIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SpeedMeterIcon.d.ts +0 -0
- package/{icons → types/icons}/components/StarCircleIcon.d.ts +0 -0
- package/{icons → types/icons}/components/StartIcon.d.ts +0 -0
- package/{icons → types/icons}/components/StoreIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SuvIcon.d.ts +0 -0
- package/{icons → types/icons}/components/SwedenFlag.d.ts +0 -0
- package/{icons → types/icons}/components/TankIcon.d.ts +0 -0
- package/{icons → types/icons}/components/TireIcon.d.ts +0 -0
- package/{icons → types/icons}/components/TransportIcon.d.ts +0 -0
- package/{icons → types/icons}/components/TrashcanIcon.d.ts +0 -0
- package/{icons → types/icons}/components/TrophyIcon.d.ts +0 -0
- package/{icons → types/icons}/components/TruckIcon.d.ts +0 -0
- package/{icons → types/icons}/components/UmbrellaIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ValuationIcon.d.ts +0 -0
- package/{icons → types/icons}/components/ValueIcon.d.ts +0 -0
- package/{icons → types/icons}/components/WarningIcon.d.ts +0 -0
- package/{icons → types/icons}/components/YoutubeIcon.d.ts +0 -0
- package/{icons → types/icons}/components/index.d.ts +0 -0
- package/types/icons/template.d.ts +10 -0
- package/{index.d.ts → types/index.d.ts} +0 -0
- package/types/serviceWorker.d.ts +2 -0
- package/{setupTests.d.ts → types/setupTests.d.ts} +0 -0
- package/{shared → types/shared}/constants.d.ts +0 -0
- package/{shared → types/shared}/helpers.d.ts +0 -0
- package/{shared → types/shared}/media-queries.d.ts +0 -0
- package/{testUtils.d.ts → types/testUtils.d.ts} +0 -0
- package/{theme.d.ts → types/theme.d.ts} +3 -3
- package/{typography → types/typography}/BodyText/index.d.ts +0 -0
- package/{typography → types/typography}/ButtonText/index.d.ts +0 -0
- package/{typography → types/typography}/Heading/index.d.ts +0 -0
- package/{utils → types/utils}/utils.d.ts +0 -0
- package/kvdbil-components.css +0 -224
- package/kvdbil-components.js +0 -1501
- package/kvdbil-components.js.map +0 -1
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import theme from '../../theme.js';
|
|
3
|
+
import Spinner from '../Spinner/index.js';
|
|
4
|
+
import { BasicButtonTextStyle, ButtonRegularTextStyle, ButtonLargeTextStyle, ButtonSmallTextStyle } from '../../typography/ButtonText/index.js';
|
|
5
|
+
|
|
6
|
+
const getFontStyles = (size) => {
|
|
7
|
+
switch (size) {
|
|
8
|
+
case "smaller":
|
|
9
|
+
return ButtonSmallTextStyle;
|
|
10
|
+
case "small":
|
|
11
|
+
return ButtonRegularTextStyle;
|
|
12
|
+
case "regular":
|
|
13
|
+
return ButtonRegularTextStyle;
|
|
14
|
+
case "large":
|
|
15
|
+
return ButtonLargeTextStyle;
|
|
16
|
+
default:
|
|
17
|
+
return ButtonRegularTextStyle;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const smallerSizeStyles = (isLoading) => `
|
|
21
|
+
min-width: 76px;
|
|
22
|
+
padding: ${isLoading ? "7px 10px 5.5px" : "10px 10px 8px"};
|
|
23
|
+
`;
|
|
24
|
+
const smallSizeStyles = (isLoading) => `
|
|
25
|
+
min-width: 76px;
|
|
26
|
+
padding: ${isLoading ? "8px 10px 6px" : "11px 10px 9px"};
|
|
27
|
+
`;
|
|
28
|
+
const regularSizeStyles = (isLoading) => `
|
|
29
|
+
min-width: 250px;
|
|
30
|
+
padding: ${isLoading ? "7px 22px 5px" : "15px 22px 13px"};
|
|
31
|
+
`;
|
|
32
|
+
const largeSizeStyles = (isLoading) => `
|
|
33
|
+
min-width: 250px;
|
|
34
|
+
padding: ${isLoading ? "9px 22px 6px" : "21px 22px 19px"};
|
|
35
|
+
`;
|
|
36
|
+
const solidColorStyles = (theme2) => (color) => `
|
|
37
|
+
color: white;
|
|
38
|
+
border-color: ${theme2.colors[color].main};
|
|
39
|
+
background-color: ${theme2.colors[color].main};
|
|
40
|
+
|
|
41
|
+
:hover {
|
|
42
|
+
border-color: ${theme2.colors[color].light};
|
|
43
|
+
background-color: ${theme2.colors[color].light};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:active {
|
|
47
|
+
border-color: ${theme2.colors[color].dark};
|
|
48
|
+
background-color: ${theme2.colors[color].dark}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:focus {
|
|
52
|
+
box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${theme2.colors[color].dark};
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
const outlineColorStyles = (theme2) => (color) => `
|
|
56
|
+
color: ${theme2.colors[color].main};
|
|
57
|
+
border-color: ${theme2.colors[color].main};
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
|
|
60
|
+
:hover {
|
|
61
|
+
color: white;
|
|
62
|
+
border-color: ${theme2.colors[color].light};
|
|
63
|
+
background-color: ${theme2.colors[color].light};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:active {
|
|
67
|
+
color: white;
|
|
68
|
+
border-color: ${theme2.colors[color].dark};
|
|
69
|
+
background-color: ${theme2.colors[color].dark};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:focus {
|
|
73
|
+
box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${theme2.colors[color].dark};
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
const flatColorStyles = (theme2) => (color) => `
|
|
77
|
+
color: ${theme2.colors[color].main};
|
|
78
|
+
border-color: transparent;
|
|
79
|
+
background-color: transparent;
|
|
80
|
+
|
|
81
|
+
:hover {
|
|
82
|
+
color: ${theme2.colors[color].dark};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:active {
|
|
86
|
+
color: ${theme2.colors[color].light};
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
const disabledCommonColorStyles = (theme2) => `
|
|
90
|
+
background-color: ${theme2.colors.gray.light4};
|
|
91
|
+
border-color: ${theme2.colors.gray.light4};
|
|
92
|
+
color: ${theme2.colors.gray.light1};
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
`;
|
|
95
|
+
const disabledFlatColorStyles = (theme2) => `
|
|
96
|
+
border-color: transparent;
|
|
97
|
+
background-color: transparent;
|
|
98
|
+
color: ${theme2.colors.gray.light1};
|
|
99
|
+
cursor: not-allowed;
|
|
100
|
+
`;
|
|
101
|
+
const Root = styled.button`
|
|
102
|
+
outline: none;
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
user-select: none;
|
|
105
|
+
position: relative;
|
|
106
|
+
white-space: nowrap;
|
|
107
|
+
border: 2px solid transparent;
|
|
108
|
+
border-radius: 3px;
|
|
109
|
+
width: ${({ fullWidth }) => fullWidth && "100%"};
|
|
110
|
+
|
|
111
|
+
${BasicButtonTextStyle}
|
|
112
|
+
${({ size }) => getFontStyles(size)}
|
|
113
|
+
${({ size, isLoading }) => css`
|
|
114
|
+
${size === "smaller" && smallerSizeStyles(isLoading)}
|
|
115
|
+
${size === "small" && smallSizeStyles(isLoading)}
|
|
116
|
+
${size === "regular" && regularSizeStyles(isLoading)}
|
|
117
|
+
${size === "large" && largeSizeStyles(isLoading)}
|
|
118
|
+
`}
|
|
119
|
+
background-color: transparent;
|
|
120
|
+
transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
|
|
121
|
+
${({ variant, color, disabled, theme: theme2 }) => css`
|
|
122
|
+
${!disabled && variant === "solid" && solidColorStyles(theme2)(color)}
|
|
123
|
+
${!disabled && variant === "outline" && outlineColorStyles(theme2)(color)}
|
|
124
|
+
${!disabled && variant === "flat" && flatColorStyles(theme2)(color)}
|
|
125
|
+
${disabled && variant !== "flat" && disabledCommonColorStyles(theme2)}
|
|
126
|
+
${disabled && variant === "flat" && disabledFlatColorStyles(theme2)}
|
|
127
|
+
`}
|
|
128
|
+
`;
|
|
129
|
+
const LoadingSpinner = styled(Spinner)``;
|
|
130
|
+
const spinnerSizes = {
|
|
131
|
+
smaller: 1,
|
|
132
|
+
small: 1,
|
|
133
|
+
regular: 1.5,
|
|
134
|
+
large: 1.75
|
|
135
|
+
};
|
|
136
|
+
const Button = ({
|
|
137
|
+
size = "small",
|
|
138
|
+
color = "primary",
|
|
139
|
+
variant = "solid",
|
|
140
|
+
fullWidth = false,
|
|
141
|
+
isDisabled = false,
|
|
142
|
+
isLoading = false,
|
|
143
|
+
children,
|
|
144
|
+
...props
|
|
145
|
+
}) => {
|
|
146
|
+
return /* @__PURE__ */ React.createElement(Root, {
|
|
147
|
+
...props,
|
|
148
|
+
color,
|
|
149
|
+
disabled: isDisabled || isLoading,
|
|
150
|
+
fullWidth,
|
|
151
|
+
theme,
|
|
152
|
+
variant,
|
|
153
|
+
size,
|
|
154
|
+
isLoading
|
|
155
|
+
}, isLoading ? /* @__PURE__ */ React.createElement(LoadingSpinner, {
|
|
156
|
+
color: "neutral",
|
|
157
|
+
size: spinnerSizes[size]
|
|
158
|
+
}) : children);
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export { Button, Button as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import theme from '../../theme.js';
|
|
3
|
+
|
|
4
|
+
const CardWrapper = styled.div`
|
|
5
|
+
background: ${theme.colors.background.light};
|
|
6
|
+
${({ boxShadow }) => boxShadow && `box-shadow: ${boxShadow};`}
|
|
7
|
+
${({ boxShadow }) => !boxShadow && `box-shadow: 0 2px 4px rgba(0, 0, 0, 10%), 0 2px 4px rgba(0, 0, 0, 9%),
|
|
8
|
+
0 1px 5px rgba(0, 0, 0, 15%);`}
|
|
9
|
+
border-radius: 0 0 3px 3px;
|
|
10
|
+
${({ topBorder }) => topBorder && `border-top: 4px solid ${topBorder};`}
|
|
11
|
+
`;
|
|
12
|
+
const Card = ({ ...props }) => {
|
|
13
|
+
return /* @__PURE__ */ React.createElement(CardWrapper, {
|
|
14
|
+
topBorder: props.topBorder,
|
|
15
|
+
boxShadow: props.boxShadow
|
|
16
|
+
}, props.children);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { Card, Card as default };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { generateNameHash } from '../../shared/helpers.js';
|
|
3
|
+
import theme from '../../theme.js';
|
|
4
|
+
import IconButton from '../IconButton.js';
|
|
5
|
+
import CheckIcon from '../Icons/CheckIcon.js';
|
|
6
|
+
|
|
7
|
+
const regularSize = css`
|
|
8
|
+
width: 24px;
|
|
9
|
+
height: 24px;
|
|
10
|
+
|
|
11
|
+
svg {
|
|
12
|
+
width: 15px;
|
|
13
|
+
height: 15px;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
const largeSize = css`
|
|
17
|
+
width: 32px;
|
|
18
|
+
height: 32px;
|
|
19
|
+
|
|
20
|
+
svg {
|
|
21
|
+
width: 20px;
|
|
22
|
+
height: 20px;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
const sizes = {
|
|
26
|
+
regular: regularSize,
|
|
27
|
+
large: largeSize
|
|
28
|
+
};
|
|
29
|
+
const disabledStyle = css`
|
|
30
|
+
cursor: default;
|
|
31
|
+
border: 2px solid ${theme.colors.gray.light1};
|
|
32
|
+
`;
|
|
33
|
+
const checkedStyle = (color) => css`
|
|
34
|
+
svg {
|
|
35
|
+
fill: #fefefe;
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:hover {
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
background: ${theme.colors[color].main};
|
|
43
|
+
border: 2px solid ${theme.colors[color].main};
|
|
44
|
+
`;
|
|
45
|
+
const checkedDisabledStyle = css`
|
|
46
|
+
background: ${theme.colors.gray.light1};
|
|
47
|
+
`;
|
|
48
|
+
const HiddenCheckbox = styled.input.attrs({ type: "checkbox" })`
|
|
49
|
+
display: none;
|
|
50
|
+
`;
|
|
51
|
+
const CheckboxWrapper = styled.label`
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
display: flex;
|
|
55
|
+
position: relative;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
|
|
59
|
+
border: 2px solid ${theme.colors.gray.light1};
|
|
60
|
+
border-radius: 3px;
|
|
61
|
+
|
|
62
|
+
${(props) => sizes[props.size]};
|
|
63
|
+
|
|
64
|
+
svg {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
${(props) => props.isChecked && checkedStyle(props.color)};
|
|
69
|
+
${(props) => props.isDisabled && disabledStyle};
|
|
70
|
+
|
|
71
|
+
${(props) => props.isChecked && props.isDisabled && checkedDisabledStyle};
|
|
72
|
+
`;
|
|
73
|
+
const CheckBox = ({
|
|
74
|
+
name = generateNameHash("check-box"),
|
|
75
|
+
isDisabled = false,
|
|
76
|
+
size = "regular",
|
|
77
|
+
checked,
|
|
78
|
+
color = "secondary",
|
|
79
|
+
onClick,
|
|
80
|
+
...rest
|
|
81
|
+
}) => /* @__PURE__ */ React.createElement(IconButton, {
|
|
82
|
+
onClick,
|
|
83
|
+
isActive: checked,
|
|
84
|
+
isDisabled,
|
|
85
|
+
color
|
|
86
|
+
}, /* @__PURE__ */ React.createElement(HiddenCheckbox, {
|
|
87
|
+
...rest,
|
|
88
|
+
"data-validate": "checked",
|
|
89
|
+
name,
|
|
90
|
+
id: name,
|
|
91
|
+
disabled: isDisabled
|
|
92
|
+
}), /* @__PURE__ */ React.createElement(CheckboxWrapper, {
|
|
93
|
+
htmlFor: name,
|
|
94
|
+
size,
|
|
95
|
+
color,
|
|
96
|
+
isChecked: checked,
|
|
97
|
+
isDisabled
|
|
98
|
+
}, /* @__PURE__ */ React.createElement(CheckIcon, null)));
|
|
99
|
+
|
|
100
|
+
export { CheckBox, CheckBox as default };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { fadedColor } from '../../shared/helpers.js';
|
|
3
|
+
import theme from '../../theme.js';
|
|
4
|
+
|
|
5
|
+
const getBackgroundColor = ({
|
|
6
|
+
isDisabled,
|
|
7
|
+
isActive,
|
|
8
|
+
activeColor
|
|
9
|
+
}) => {
|
|
10
|
+
if (isActive && isDisabled) {
|
|
11
|
+
return fadedColor(theme.colors[activeColor].main, 0.5);
|
|
12
|
+
}
|
|
13
|
+
if (isDisabled) {
|
|
14
|
+
return theme.colors.gray.light4;
|
|
15
|
+
}
|
|
16
|
+
if (isActive) {
|
|
17
|
+
return theme.colors[activeColor].main;
|
|
18
|
+
}
|
|
19
|
+
return "transparent";
|
|
20
|
+
};
|
|
21
|
+
const getColor = ({ isActive, isDisabled }) => {
|
|
22
|
+
if (isActive || isActive && isDisabled) {
|
|
23
|
+
return theme.colors.text.light;
|
|
24
|
+
}
|
|
25
|
+
if (isDisabled) {
|
|
26
|
+
return theme.colors.text.disabled;
|
|
27
|
+
}
|
|
28
|
+
return theme.colors.text.dark;
|
|
29
|
+
};
|
|
30
|
+
const getFontSize = (size = "smaller") => {
|
|
31
|
+
const sizes = {
|
|
32
|
+
smaller: "0.8125rem",
|
|
33
|
+
small: "1rem",
|
|
34
|
+
regular: "1rem",
|
|
35
|
+
large: "1.25rem"
|
|
36
|
+
};
|
|
37
|
+
return sizes[size];
|
|
38
|
+
};
|
|
39
|
+
const Item = styled.div`
|
|
40
|
+
font-family: ${({ theme: theme2 }) => theme2.typography.fontAlternativeFamily};
|
|
41
|
+
font-size: ${({ size }) => getFontSize(size)};
|
|
42
|
+
font-weight: ${({ theme: theme2 }) => theme2.typography.fontAlternativeBoldWeight};
|
|
43
|
+
line-height: 1.25;
|
|
44
|
+
letter-spacing: 0.1px;
|
|
45
|
+
display: inline-block;
|
|
46
|
+
cursor: ${({ isDisabled }) => !isDisabled ? "pointer" : "auto"};
|
|
47
|
+
align-items: center;
|
|
48
|
+
background: ${getBackgroundColor};
|
|
49
|
+
color: ${getColor};
|
|
50
|
+
justify-content: center;
|
|
51
|
+
border-width: 1px;
|
|
52
|
+
border-style: solid;
|
|
53
|
+
border-color: ${({ isActive, isDisabled }) => !isActive && !isDisabled ? theme.colors.background.dark : "transparent"};
|
|
54
|
+
border-radius: 1.293rem;
|
|
55
|
+
`;
|
|
56
|
+
const ContentWrapper = styled.span`
|
|
57
|
+
padding: 0.5rem 1rem;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
text-align: center;
|
|
62
|
+
`;
|
|
63
|
+
const Chip = ({
|
|
64
|
+
activeColor = "primary",
|
|
65
|
+
children,
|
|
66
|
+
component = "div",
|
|
67
|
+
isActive,
|
|
68
|
+
isDisabled,
|
|
69
|
+
onClick,
|
|
70
|
+
size,
|
|
71
|
+
...props
|
|
72
|
+
}) => {
|
|
73
|
+
const handleClick = (e) => {
|
|
74
|
+
if (!isDisabled && onClick) {
|
|
75
|
+
onClick(e);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
return /* @__PURE__ */ React.createElement(Item, {
|
|
79
|
+
...props,
|
|
80
|
+
as: component,
|
|
81
|
+
activeColor,
|
|
82
|
+
isDisabled,
|
|
83
|
+
isActive,
|
|
84
|
+
size
|
|
85
|
+
}, /* @__PURE__ */ React.createElement(ContentWrapper, {
|
|
86
|
+
onClick: handleClick
|
|
87
|
+
}, children));
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export { Chip, Chip as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import Arrow$1 from '../Icons/Arrow.js';
|
|
3
|
+
import theme from '../../theme.js';
|
|
4
|
+
import { BodyText } from '../../typography/BodyText/index.js';
|
|
5
|
+
import { formatMonthTitle } from './localeUtils.js';
|
|
6
|
+
|
|
7
|
+
const NavBarWrapper = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
`;
|
|
11
|
+
const NavTitle = styled(BodyText)`
|
|
12
|
+
color: ${theme.colors.text.dark};
|
|
13
|
+
`;
|
|
14
|
+
const NavButton = styled.button`
|
|
15
|
+
appearance: none;
|
|
16
|
+
background-color: transparent;
|
|
17
|
+
border: 0;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
font-family: inherit;
|
|
20
|
+
outline: none;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
`;
|
|
24
|
+
const Arrow = styled(Arrow$1)`
|
|
25
|
+
width: 16px;
|
|
26
|
+
height: 16px;
|
|
27
|
+
fill: ${theme.colors.gray.dark3};
|
|
28
|
+
`;
|
|
29
|
+
const BackArrow = styled(Arrow)`
|
|
30
|
+
transform: rotate(90deg);
|
|
31
|
+
`;
|
|
32
|
+
const ForwardArrow = styled(Arrow)`
|
|
33
|
+
transform: rotate(-90deg);
|
|
34
|
+
`;
|
|
35
|
+
const DayPickerNavBar = ({
|
|
36
|
+
month,
|
|
37
|
+
onPreviousClick,
|
|
38
|
+
onNextClick,
|
|
39
|
+
locale
|
|
40
|
+
}) => /* @__PURE__ */ React.createElement(NavBarWrapper, null, /* @__PURE__ */ React.createElement(NavButton, {
|
|
41
|
+
onClick: () => onPreviousClick()
|
|
42
|
+
}, /* @__PURE__ */ React.createElement(BackArrow, {
|
|
43
|
+
title: "prev-month"
|
|
44
|
+
})), /* @__PURE__ */ React.createElement(NavTitle, {
|
|
45
|
+
as: "h3"
|
|
46
|
+
}, formatMonthTitle(month, locale)), /* @__PURE__ */ React.createElement(NavButton, {
|
|
47
|
+
onClick: () => onNextClick()
|
|
48
|
+
}, /* @__PURE__ */ React.createElement(ForwardArrow, {
|
|
49
|
+
title: "next-month"
|
|
50
|
+
})));
|
|
51
|
+
|
|
52
|
+
export { DayPickerNavBar as default };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import 'react-day-picker/lib/style.css';
|
|
2
|
+
import ReactDayPicker from 'react-day-picker';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import theme from '../../theme.js';
|
|
5
|
+
import DayPickerNavBar from './DayPickerNavBar.js';
|
|
6
|
+
import { MONTHS, WEEKDAYS_LONG, WEEKDAYS_SHORT, FIRST_DAY_OF_THE_WEEK } from './localeUtils.js';
|
|
7
|
+
import '../Icons/Arrow.js';
|
|
8
|
+
import '../../typography/BodyText/index.js';
|
|
9
|
+
|
|
10
|
+
const DayPickerWrapper = styled.div`
|
|
11
|
+
font-family: ${({ theme: theme2 }) => theme2.typography.fontAlternativeFamily};
|
|
12
|
+
.DayPicker-wrapper {
|
|
13
|
+
&:focus {
|
|
14
|
+
outline: none;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
.DayPicker-Weekday {
|
|
18
|
+
color: ${({ theme: theme2 }) => theme2.colors.gray.light1};
|
|
19
|
+
}
|
|
20
|
+
.DayPicker-Day {
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
padding: 14px;
|
|
23
|
+
font-weight: ${({ theme: theme2 }) => theme2.typography.fontAlternativeBoldWeight};
|
|
24
|
+
color: ${({ theme: theme2 }) => theme2.colors.text.dark};
|
|
25
|
+
&:focus {
|
|
26
|
+
outline: none;
|
|
27
|
+
box-shadow: 0 0 4px ${theme.colors.gray.dark3};
|
|
28
|
+
}
|
|
29
|
+
&:not(.DayPicker--interactionDisabled):not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--outside) {
|
|
30
|
+
&:focus {
|
|
31
|
+
box-shadow: 0 0 4px ${theme.colors.gray.dark3};
|
|
32
|
+
}
|
|
33
|
+
&:hover {
|
|
34
|
+
background-color: rgba(253, 171, 74, 0.25);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&.DayPicker-Day--disabled {
|
|
38
|
+
color: ${theme.colors.gray.dark3};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
const modifiersStyles = {
|
|
43
|
+
selected: {
|
|
44
|
+
color: theme.colors.text.light,
|
|
45
|
+
background: theme.colors.primary.main,
|
|
46
|
+
fontWeight: 700
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const DayPicker = ({ locale = "sv", ...props }) => {
|
|
50
|
+
return /* @__PURE__ */ React.createElement(DayPickerWrapper, null, /* @__PURE__ */ React.createElement(ReactDayPicker, {
|
|
51
|
+
...props,
|
|
52
|
+
locale,
|
|
53
|
+
months: MONTHS[locale],
|
|
54
|
+
weekdaysLong: WEEKDAYS_LONG[locale],
|
|
55
|
+
weekdaysShort: WEEKDAYS_SHORT[locale],
|
|
56
|
+
firstDayOfWeek: FIRST_DAY_OF_THE_WEEK[locale],
|
|
57
|
+
navbarElement: (navProps) => /* @__PURE__ */ React.createElement(DayPickerNavBar, {
|
|
58
|
+
...navProps,
|
|
59
|
+
locale
|
|
60
|
+
}),
|
|
61
|
+
captionElement: /* @__PURE__ */ React.createElement("div", null),
|
|
62
|
+
modifiersStyles
|
|
63
|
+
}));
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export { DayPicker, DayPicker as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
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\xF6ndag", "M\xE5ndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "L\xF6rdag"],
|
|
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\xF6", "M\xE5", "Ti", "On", "To", "Fr", "L\xF6"],
|
|
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 };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { mq } from '../../shared/media-queries.js';
|
|
3
|
+
import { Button } from '../Button/index.js';
|
|
4
|
+
import { Modal } from '../Modal/index.js';
|
|
5
|
+
import { TinyTitle } from '../../typography/Heading/index.js';
|
|
6
|
+
import '../../theme.js';
|
|
7
|
+
import '../Spinner/index.js';
|
|
8
|
+
import '../../typography/ButtonText/index.js';
|
|
9
|
+
import 'react';
|
|
10
|
+
import 'react-dom';
|
|
11
|
+
import 'react-transition-group';
|
|
12
|
+
import '../Icons/Close.js';
|
|
13
|
+
|
|
14
|
+
const Content = styled.div`
|
|
15
|
+
padding-top: 1rem;
|
|
16
|
+
`;
|
|
17
|
+
const Header = styled.div`
|
|
18
|
+
top: 20px;
|
|
19
|
+
left: 32px;
|
|
20
|
+
position: absolute;
|
|
21
|
+
`;
|
|
22
|
+
const Title = styled(TinyTitle)`
|
|
23
|
+
font-weight: ${({ theme }) => theme.typography.fontAlternativeRegularWeight};
|
|
24
|
+
margin: 0;
|
|
25
|
+
`;
|
|
26
|
+
const ButtonWrapper = styled.div`
|
|
27
|
+
display: flex;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
${mq("tablet")} {
|
|
30
|
+
justify-content: flex-start;
|
|
31
|
+
}
|
|
32
|
+
overflow-x: hidden;
|
|
33
|
+
`;
|
|
34
|
+
const SecondaryActionButton = styled(Button)`
|
|
35
|
+
overflow-x: hidden;
|
|
36
|
+
margin-right: 2rem;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
width: 100%;
|
|
39
|
+
max-width: 110px;
|
|
40
|
+
`;
|
|
41
|
+
const PrimaryActionButton = styled(Button)`
|
|
42
|
+
justify-content: center;
|
|
43
|
+
width: 100%;
|
|
44
|
+
max-width: 245px;
|
|
45
|
+
`;
|
|
46
|
+
const Dialog = ({
|
|
47
|
+
isOpen,
|
|
48
|
+
title,
|
|
49
|
+
children,
|
|
50
|
+
modalStyles,
|
|
51
|
+
titleStyles,
|
|
52
|
+
primaryButtonText,
|
|
53
|
+
primaryButtonStyles,
|
|
54
|
+
secondaryButtonStyles,
|
|
55
|
+
secondaryButtonText,
|
|
56
|
+
primaryButtonAction,
|
|
57
|
+
secondaryButtonAction,
|
|
58
|
+
onClose
|
|
59
|
+
}) => {
|
|
60
|
+
return /* @__PURE__ */ React.createElement(Modal, {
|
|
61
|
+
contentStyles: modalStyles,
|
|
62
|
+
isOpen,
|
|
63
|
+
onClose
|
|
64
|
+
}, title && /* @__PURE__ */ React.createElement(Header, null, /* @__PURE__ */ React.createElement(Title, {
|
|
65
|
+
style: titleStyles
|
|
66
|
+
}, title)), /* @__PURE__ */ React.createElement(Content, null, children), /* @__PURE__ */ React.createElement(ButtonWrapper, null, secondaryButtonAction && /* @__PURE__ */ React.createElement(SecondaryActionButton, {
|
|
67
|
+
style: secondaryButtonStyles,
|
|
68
|
+
onClick: secondaryButtonAction,
|
|
69
|
+
variant: "outline",
|
|
70
|
+
color: "neutral"
|
|
71
|
+
}, secondaryButtonText), primaryButtonAction && /* @__PURE__ */ React.createElement(PrimaryActionButton, {
|
|
72
|
+
style: primaryButtonStyles,
|
|
73
|
+
onClick: primaryButtonAction,
|
|
74
|
+
variant: "solid",
|
|
75
|
+
color: "success"
|
|
76
|
+
}, primaryButtonText)));
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export { Dialog, Dialog as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const ErrorContainer = styled.div`
|
|
4
|
+
font-family: ${({ theme }) => theme.typography.fontAlternativeFamily};
|
|
5
|
+
font-weight: ${({ theme }) => theme.typography.fontAlternativeRegularWeight};
|
|
6
|
+
background: ${({ theme }) => theme.colors.error.main};
|
|
7
|
+
color: white;
|
|
8
|
+
border-radius: 0.25rem;
|
|
9
|
+
font-size: 13px;
|
|
10
|
+
padding: 10px;
|
|
11
|
+
${({ centered }) => centered && `text-align: center;`}
|
|
12
|
+
`;
|
|
13
|
+
const ErrorMessage = ({
|
|
14
|
+
children,
|
|
15
|
+
centered,
|
|
16
|
+
...props
|
|
17
|
+
}) => /* @__PURE__ */ React.createElement(ErrorContainer, {
|
|
18
|
+
centered,
|
|
19
|
+
...props
|
|
20
|
+
}, children);
|
|
21
|
+
|
|
22
|
+
export { ErrorMessage, ErrorMessage as default };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const activePadding = "0.5rem";
|
|
4
|
+
const activeStyles = (translateY) => css`
|
|
5
|
+
background-color: ${(props) => props.theme.colors.background.light};
|
|
6
|
+
transform: scale(0.75) translateY(${translateY});
|
|
7
|
+
transform-origin: 0 0;
|
|
8
|
+
padding: 0 ${activePadding};
|
|
9
|
+
left: ${activePadding};
|
|
10
|
+
`;
|
|
11
|
+
const focusStyles = css`
|
|
12
|
+
color: ${(props) => props.theme.colors.text.dark};
|
|
13
|
+
`;
|
|
14
|
+
const disabledStyles = css`
|
|
15
|
+
color: ${(props) => props.theme.colors.gray.light1};
|
|
16
|
+
background-color: ${(props) => props.theme.colors.background.light};
|
|
17
|
+
`;
|
|
18
|
+
const errorStyles = css`
|
|
19
|
+
color: ${(props) => props.theme.colors.error.main};
|
|
20
|
+
`;
|
|
21
|
+
const centerStyles = css`
|
|
22
|
+
text-align: center;
|
|
23
|
+
width: 100%;
|
|
24
|
+
left: 0;
|
|
25
|
+
`;
|
|
26
|
+
const Label = styled.div`
|
|
27
|
+
font-family: ${({ theme }) => theme.typography.fontBaseFamily};
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
position: absolute;
|
|
30
|
+
z-index: 1;
|
|
31
|
+
top: ${(props) => props.height ? `${props.height}rem` : "0.9rem"};
|
|
32
|
+
|
|
33
|
+
/* Left padding on input + one character size */
|
|
34
|
+
left: calc(0.75rem + 2px);
|
|
35
|
+
transition: 150ms;
|
|
36
|
+
|
|
37
|
+
/* Text styles */
|
|
38
|
+
height: 16px;
|
|
39
|
+
line-height: 16px;
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
|
|
42
|
+
color: ${(props) => props.theme.colors.gray.dark1};
|
|
43
|
+
|
|
44
|
+
${(props) => props.centered && centerStyles}
|
|
45
|
+
${(props) => (props.hasValue || props.isFocused) && activeStyles(props.height ? `-${(props.height + 0.25) * 1.35}rem` : "-1.75rem")}
|
|
46
|
+
${(props) => props.isFocused && focusStyles}
|
|
47
|
+
${(props) => props.disabled && disabledStyles}
|
|
48
|
+
${(props) => props.hasError && errorStyles}
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
export { Label };
|