@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.
- package/cjs/ColorCard.js +10 -31
- package/cjs/ElevationCard.js +5 -21
- package/cjs/Interfaces.js +1 -2
- package/cjs/Types.js +1 -2
- package/cjs/components/Accordion/index.js +20 -64
- package/cjs/components/Badge/index.js +9 -43
- package/cjs/components/Button/index.js +60 -125
- package/cjs/components/Card/index.js +6 -25
- package/cjs/components/CheckBox/index.js +24 -53
- package/cjs/components/Chip/index.js +10 -65
- package/cjs/components/DayPicker/DayPickerNavBar.js +9 -32
- package/cjs/components/DayPicker/index.js +10 -40
- package/cjs/components/DayPicker/localeUtils.js +1 -60
- package/cjs/components/DayPicker/style.js +226 -0
- package/cjs/components/Dialog/index.js +9 -42
- package/cjs/components/ErrorMessage/index.js +6 -21
- package/cjs/components/FieldLabel.js +22 -49
- package/cjs/components/Header/Hamburger.js +7 -22
- package/cjs/components/Header/Link.js +9 -26
- package/cjs/components/Header/index.js +16 -45
- package/cjs/components/Hero/index.js +7 -32
- package/cjs/components/Icon/index.js +11 -76
- package/cjs/components/IconButton.js +15 -54
- package/cjs/components/Icons/Arrow.js +1 -9
- package/cjs/components/Icons/CheckCircle.js +1 -9
- package/cjs/components/Icons/CheckIcon.js +1 -9
- package/cjs/components/Icons/Close.js +1 -9
- package/cjs/components/Icons/ErrorCircle.js +1 -9
- package/cjs/components/Icons/InfoCircle.js +1 -9
- package/cjs/components/InlineStepper/Step.js +16 -53
- package/cjs/components/InlineStepper/StepCircle.js +11 -46
- package/cjs/components/InlineStepper/index.js +4 -39
- package/cjs/components/ListItem/Bacon.js +1 -9
- package/cjs/components/ListItem/index.js +7 -28
- package/cjs/components/Logo/LogoEn.js +1 -9
- package/cjs/components/Logo/LogoSv.js +1 -9
- package/cjs/components/Logo/index.js +3 -30
- package/cjs/components/MenuItem/index.js +23 -68
- package/cjs/components/Modal/index.js +11 -54
- package/cjs/components/NotificationButton/index.js +4 -28
- package/cjs/components/OffCanvas/Overlay.js +2 -33
- package/cjs/components/OffCanvas/index.js +21 -62
- package/cjs/components/OffCanvas/useClickOutside.js +1 -21
- package/cjs/components/RadioButton/index.js +28 -58
- package/cjs/components/Range/index.js +10 -35
- package/cjs/components/Select/components/test-icon.js +1 -9
- package/cjs/components/Select/index.js +18 -147
- package/cjs/components/Snackbar/index.js +24 -76
- package/cjs/components/Spinner/index.js +10 -46
- package/cjs/components/Stepper/index.js +11 -35
- package/cjs/components/StepperAccordion/index.js +26 -76
- package/cjs/components/Tabs/index.js +7 -47
- package/cjs/components/TextArea/index.js +30 -61
- package/cjs/components/Textfield/index.js +29 -69
- package/cjs/components/TimePicker/index.js +2 -29
- package/cjs/components/TimePicker/testHelper.js +1 -17
- package/cjs/components/Toggle/index.js +12 -45
- package/cjs/icons/components/AccountCreateIcon.js +1 -11
- package/cjs/icons/components/AccountIcon.js +1 -11
- package/cjs/icons/components/AccountLoginIcon.js +1 -11
- package/cjs/icons/components/ArrowDownIcon.js +1 -11
- package/cjs/icons/components/ArrowLeftIcon.js +1 -11
- package/cjs/icons/components/ArrowLeftSharpIcon.js +1 -11
- package/cjs/icons/components/ArrowLeftSmallIcon.js +1 -11
- package/cjs/icons/components/ArrowLong.js +1 -11
- package/cjs/icons/components/ArrowRestartIcon.js +1 -11
- package/cjs/icons/components/ArrowRightIcon.js +1 -11
- package/cjs/icons/components/ArrowRightSharpIcon.js +1 -11
- package/cjs/icons/components/ArrowUpIcon.js +1 -11
- package/cjs/icons/components/AuctionIcon.js +1 -11
- package/cjs/icons/components/BackArrowIcon.js +1 -11
- package/cjs/icons/components/Baseline360Icon.js +1 -11
- package/cjs/icons/components/BellIcon.js +1 -11
- package/cjs/icons/components/BidIcon.js +1 -11
- package/cjs/icons/components/BidKrIcon.js +1 -11
- package/cjs/icons/components/BreaksIcon.js +1 -11
- package/cjs/icons/components/BuyCarIcon.js +1 -11
- package/cjs/icons/components/CabIcon.js +1 -11
- package/cjs/icons/components/CalendarIcon.js +1 -11
- package/cjs/icons/components/CameraIcon.js +1 -11
- package/cjs/icons/components/Car360Icon.js +1 -11
- package/cjs/icons/components/CarFrontIcon.js +1 -11
- package/cjs/icons/components/CarSearchIcon.js +1 -11
- package/cjs/icons/components/CarSideIcon.js +1 -11
- package/cjs/icons/components/CarTiresIcon.js +1 -11
- package/cjs/icons/components/CaravanIcon.js +1 -11
- package/cjs/icons/components/CardViewIcon.js +1 -11
- package/cjs/icons/components/CarloanIcon.js +1 -11
- package/cjs/icons/components/CertifiedIcon.js +1 -11
- package/cjs/icons/components/ChatIcon.js +1 -11
- package/cjs/icons/components/CheckIcon.js +1 -11
- package/cjs/icons/components/CheckThinIcon.js +1 -11
- package/cjs/icons/components/CheckmarkFilledIcon.js +1 -11
- package/cjs/icons/components/CheckmarkIcon.js +1 -11
- package/cjs/icons/components/ClipboardFilledIcon.js +1 -11
- package/cjs/icons/components/ClipboardIcon.js +1 -11
- package/cjs/icons/components/ClockFilledIcon.js +1 -11
- package/cjs/icons/components/ClockIcon.js +1 -11
- package/cjs/icons/components/CloseIcon.js +1 -11
- package/cjs/icons/components/CloseThinIcon.js +1 -11
- package/cjs/icons/components/CoffeeIcon.js +1 -11
- package/cjs/icons/components/CombiIcon.js +1 -11
- package/cjs/icons/components/CommentCircleFilledIcon.js +1 -11
- package/cjs/icons/components/CommentCircleIconIcon.js +1 -11
- package/cjs/icons/components/CommentIcon.js +1 -11
- package/cjs/icons/components/ContactIcon.js +1 -11
- package/cjs/icons/components/CoupeIcon.js +1 -11
- package/cjs/icons/components/CreditCardIcon.js +1 -11
- package/cjs/icons/components/CrossCircleIcon.js +1 -11
- package/cjs/icons/components/CrownIcon.js +1 -11
- package/cjs/icons/components/DealmakerIcon.js +1 -11
- package/cjs/icons/components/DeliveryIcon.js +1 -11
- package/cjs/icons/components/DetailedSearchIcon.js +1 -11
- package/cjs/icons/components/EcoFriendlyIcon.js +1 -11
- package/cjs/icons/components/EditIcon.js +1 -11
- package/cjs/icons/components/EngineIcon.js +1 -11
- package/cjs/icons/components/EnglandFlagIcon.js +1 -11
- package/cjs/icons/components/EvaluationIcon.js +1 -11
- package/cjs/icons/components/ExaminationMarkFilledIcon.js +1 -11
- package/cjs/icons/components/ExaminationMarkIcon.js +1 -11
- package/cjs/icons/components/ExteriorIcon.js +1 -11
- package/cjs/icons/components/EyeIcon.js +1 -11
- package/cjs/icons/components/FacebookBtnIcon.js +1 -11
- package/cjs/icons/components/FacebookIcon.js +1 -11
- package/cjs/icons/components/FatalIcon.js +1 -11
- package/cjs/icons/components/FavouriteIcon.js +1 -11
- package/cjs/icons/components/FavouriteSolidIcon.js +1 -11
- package/cjs/icons/components/FilterIcon.js +1 -11
- package/cjs/icons/components/FinanceIcon.js +1 -11
- package/cjs/icons/components/FindCarIcon.js +1 -11
- package/cjs/icons/components/FixedMonthlyCostIcon.js +1 -11
- package/cjs/icons/components/FlagIcon.js +1 -11
- package/cjs/icons/components/FlexibilityIcon.js +1 -11
- package/cjs/icons/components/ForumLargeIcon.js +1 -11
- package/cjs/icons/components/ForumSmallIcon.js +1 -11
- package/cjs/icons/components/GavelIcon.js +1 -11
- package/cjs/icons/components/GearboxIcon.js +1 -11
- package/cjs/icons/components/GiftIcon.js +1 -11
- package/cjs/icons/components/GridViewIcon.js +1 -11
- package/cjs/icons/components/GroupIcon.js +1 -11
- package/cjs/icons/components/GuaranteeIcon.js +1 -11
- package/cjs/icons/components/GuaranteeLargeIcon.js +1 -11
- package/cjs/icons/components/GuaranteeSmallIcon.js +1 -11
- package/cjs/icons/components/HalfCombiIcon.js +1 -11
- package/cjs/icons/components/HamburgerIcon.js +1 -11
- package/cjs/icons/components/HandshakeIcon.js +1 -11
- package/cjs/icons/components/HelpingHandIcon.js +1 -11
- package/cjs/icons/components/IdIcon.js +1 -11
- package/cjs/icons/components/InformationIcon.js +1 -11
- package/cjs/icons/components/InstagramIcon.js +1 -11
- package/cjs/icons/components/InsuranceIcon.js +1 -11
- package/cjs/icons/components/InteriorIcon.js +1 -11
- package/cjs/icons/components/InteriorThinIcon.js +1 -11
- package/cjs/icons/components/InternationalIcon.js +1 -11
- package/cjs/icons/components/KvdTestIcon.js +1 -11
- package/cjs/icons/components/KvdVenueIcon.js +1 -11
- package/cjs/icons/components/LifebuoyIcon.js +1 -11
- package/cjs/icons/components/LiftTruckIcon.js +1 -11
- package/cjs/icons/components/LinkedInIcon.js +1 -11
- package/cjs/icons/components/ListViewIcon.js +1 -11
- package/cjs/icons/components/MailIcon.js +1 -11
- package/cjs/icons/components/MinibusIcon.js +1 -11
- package/cjs/icons/components/MinivanIcon.js +1 -11
- package/cjs/icons/components/MobileIcon.js +1 -11
- package/cjs/icons/components/MotorcycleIcon.js +1 -11
- package/cjs/icons/components/MrfLogoIcon.js +1 -11
- package/cjs/icons/components/NotFoundIcon.js +1 -11
- package/cjs/icons/components/OverbidIcon.js +1 -11
- package/cjs/icons/components/PdfIconIcon.js +1 -11
- package/cjs/icons/components/PhoneIcon.js +1 -11
- package/cjs/icons/components/PickUpIcon.js +1 -11
- package/cjs/icons/components/PinIcon.js +1 -11
- package/cjs/icons/components/PlayIcon.js +1 -11
- package/cjs/icons/components/Pricetag.js +1 -11
- package/cjs/icons/components/PricetagFilledKronaIcon.js +1 -11
- package/cjs/icons/components/PrivateCarIcon.js +1 -11
- package/cjs/icons/components/ProfileCircleIcon.js +1 -11
- package/cjs/icons/components/ProfileIcon.js +1 -11
- package/cjs/icons/components/RadioIcon.js +1 -11
- package/cjs/icons/components/ReclamationIcon.js +1 -11
- package/cjs/icons/components/ReleasingIcon.js +1 -11
- package/cjs/icons/components/RemoveFilterIcon.js +1 -11
- package/cjs/icons/components/ReservedPriceIcon.js +1 -11
- package/cjs/icons/components/ResultIcon.js +1 -11
- package/cjs/icons/components/SafePaymentIcon.js +1 -11
- package/cjs/icons/components/SaleTagIcon.js +1 -11
- package/cjs/icons/components/SearchCheckIcon.js +1 -11
- package/cjs/icons/components/SearchIcon.js +1 -11
- package/cjs/icons/components/SedanIcon.js +1 -11
- package/cjs/icons/components/SellCarIcon.js +1 -11
- package/cjs/icons/components/SellCarsIcon.js +1 -11
- package/cjs/icons/components/ServiceIcon.js +1 -11
- package/cjs/icons/components/ShareIcon.js +1 -11
- package/cjs/icons/components/ShieldIcon.js +1 -11
- package/cjs/icons/components/SignInIcon.js +1 -11
- package/cjs/icons/components/SignOutIcon.js +1 -11
- package/cjs/icons/components/SpeedMeterIcon.js +1 -11
- package/cjs/icons/components/StarCircleIcon.js +1 -11
- package/cjs/icons/components/StartIcon.js +1 -11
- package/cjs/icons/components/StoreIcon.js +1 -11
- package/cjs/icons/components/SuvIcon.js +1 -11
- package/cjs/icons/components/SwedenFlag.js +1 -11
- package/cjs/icons/components/TankIcon.js +1 -11
- package/cjs/icons/components/TireIcon.js +1 -11
- package/cjs/icons/components/TransportIcon.js +1 -11
- package/cjs/icons/components/TrashcanIcon.js +1 -11
- package/cjs/icons/components/TrophyIcon.js +1 -11
- package/cjs/icons/components/TruckIcon.js +1 -11
- package/cjs/icons/components/UmbrellaIcon.js +1 -11
- package/cjs/icons/components/ValuationIcon.js +1 -11
- package/cjs/icons/components/ValueIcon.js +1 -11
- package/cjs/icons/components/WarningIcon.js +1 -11
- package/cjs/icons/components/YoutubeIcon.js +1 -11
- package/cjs/icons/components/index.js +1 -320
- package/cjs/index.js +1 -439
- package/cjs/shared/constants.js +1 -7
- package/cjs/shared/helpers.js +1 -28
- package/cjs/shared/helpers.spec.js +1 -42
- package/cjs/shared/media-queries.js +1 -41
- package/cjs/theme.js +1 -125
- package/cjs/typography/BodyText/index.js +20 -53
- package/cjs/typography/ButtonText/index.js +15 -43
- package/cjs/typography/Heading/index.js +22 -54
- package/cjs/utils/utils.js +2 -30
- package/esm/ColorCard.js +10 -23
- package/esm/ElevationCard.js +5 -13
- package/esm/components/Accordion/index.js +20 -55
- package/esm/components/Badge/index.js +9 -34
- package/esm/components/Button/index.js +50 -106
- package/esm/components/Card/index.js +6 -16
- package/esm/components/CheckBox/index.js +17 -37
- package/esm/components/Chip/index.js +10 -56
- package/esm/components/DayPicker/DayPickerNavBar.js +9 -24
- package/esm/components/DayPicker/index.js +10 -30
- package/esm/components/DayPicker/localeUtils.js +1 -52
- package/esm/components/DayPicker/style.js +226 -0
- package/esm/components/Dialog/index.js +9 -33
- package/esm/components/ErrorMessage/index.js +6 -12
- package/esm/components/FieldLabel.js +21 -40
- package/esm/components/Header/Hamburger.js +7 -14
- package/esm/components/Header/Link.js +9 -18
- package/esm/components/Header/index.js +16 -36
- package/esm/components/Hero/index.js +7 -23
- package/esm/components/Icon/index.js +11 -68
- package/esm/components/IconButton.js +15 -46
- package/esm/components/Icons/Arrow.js +1 -5
- package/esm/components/Icons/CheckCircle.js +1 -5
- package/esm/components/Icons/CheckIcon.js +1 -5
- package/esm/components/Icons/Close.js +1 -5
- package/esm/components/Icons/ErrorCircle.js +1 -5
- package/esm/components/Icons/InfoCircle.js +1 -5
- package/esm/components/InlineStepper/Step.js +16 -44
- package/esm/components/InlineStepper/StepCircle.js +11 -38
- package/esm/components/InlineStepper/index.js +4 -31
- package/esm/components/ListItem/Bacon.js +1 -5
- package/esm/components/ListItem/index.js +7 -20
- package/esm/components/Logo/LogoEn.js +1 -5
- package/esm/components/Logo/LogoSv.js +1 -5
- package/esm/components/Logo/index.js +3 -21
- package/esm/components/MenuItem/index.js +22 -58
- package/esm/components/Modal/index.js +11 -45
- package/esm/components/NotificationButton/index.js +4 -20
- package/esm/components/OffCanvas/Overlay.js +2 -25
- package/esm/components/OffCanvas/index.js +21 -53
- package/esm/components/OffCanvas/useClickOutside.js +1 -17
- package/esm/components/RadioButton/index.js +21 -42
- package/esm/components/Range/index.js +10 -26
- package/esm/components/Select/components/test-icon.js +1 -5
- package/esm/components/Select/index.js +18 -137
- package/esm/components/Snackbar/index.js +24 -67
- package/esm/components/Spinner/index.js +10 -38
- package/esm/components/Stepper/index.js +11 -27
- package/esm/components/StepperAccordion/index.js +23 -64
- package/esm/components/Tabs/index.js +7 -37
- package/esm/components/TextArea/index.js +30 -52
- package/esm/components/Textfield/index.js +29 -60
- package/esm/components/TimePicker/index.js +2 -20
- package/esm/components/TimePicker/testHelper.js +1 -13
- package/esm/components/Toggle/index.js +12 -37
- package/esm/icons/components/AccountCreateIcon.js +1 -7
- package/esm/icons/components/AccountIcon.js +1 -7
- package/esm/icons/components/AccountLoginIcon.js +1 -7
- package/esm/icons/components/ArrowDownIcon.js +1 -7
- package/esm/icons/components/ArrowLeftIcon.js +1 -7
- package/esm/icons/components/ArrowLeftSharpIcon.js +1 -7
- package/esm/icons/components/ArrowLeftSmallIcon.js +1 -7
- package/esm/icons/components/ArrowLong.js +1 -7
- package/esm/icons/components/ArrowRestartIcon.js +1 -7
- package/esm/icons/components/ArrowRightIcon.js +1 -7
- package/esm/icons/components/ArrowRightSharpIcon.js +1 -7
- package/esm/icons/components/ArrowUpIcon.js +1 -7
- package/esm/icons/components/AuctionIcon.js +1 -7
- package/esm/icons/components/BackArrowIcon.js +1 -7
- package/esm/icons/components/Baseline360Icon.js +1 -7
- package/esm/icons/components/BellIcon.js +1 -7
- package/esm/icons/components/BidIcon.js +1 -7
- package/esm/icons/components/BidKrIcon.js +1 -7
- package/esm/icons/components/BreaksIcon.js +1 -7
- package/esm/icons/components/BuyCarIcon.js +1 -7
- package/esm/icons/components/CabIcon.js +1 -7
- package/esm/icons/components/CalendarIcon.js +1 -7
- package/esm/icons/components/CameraIcon.js +1 -7
- package/esm/icons/components/Car360Icon.js +1 -7
- package/esm/icons/components/CarFrontIcon.js +1 -7
- package/esm/icons/components/CarSearchIcon.js +1 -7
- package/esm/icons/components/CarSideIcon.js +1 -7
- package/esm/icons/components/CarTiresIcon.js +1 -7
- package/esm/icons/components/CaravanIcon.js +1 -7
- package/esm/icons/components/CardViewIcon.js +1 -7
- package/esm/icons/components/CarloanIcon.js +1 -7
- package/esm/icons/components/CertifiedIcon.js +1 -7
- package/esm/icons/components/ChatIcon.js +1 -7
- package/esm/icons/components/CheckIcon.js +1 -7
- package/esm/icons/components/CheckThinIcon.js +1 -7
- package/esm/icons/components/CheckmarkFilledIcon.js +1 -7
- package/esm/icons/components/CheckmarkIcon.js +1 -7
- package/esm/icons/components/ClipboardFilledIcon.js +1 -7
- package/esm/icons/components/ClipboardIcon.js +1 -7
- package/esm/icons/components/ClockFilledIcon.js +1 -7
- package/esm/icons/components/ClockIcon.js +1 -7
- package/esm/icons/components/CloseIcon.js +1 -7
- package/esm/icons/components/CloseThinIcon.js +1 -7
- package/esm/icons/components/CoffeeIcon.js +1 -7
- package/esm/icons/components/CombiIcon.js +1 -7
- package/esm/icons/components/CommentCircleFilledIcon.js +1 -7
- package/esm/icons/components/CommentCircleIconIcon.js +1 -7
- package/esm/icons/components/CommentIcon.js +1 -7
- package/esm/icons/components/ContactIcon.js +1 -7
- package/esm/icons/components/CoupeIcon.js +1 -7
- package/esm/icons/components/CreditCardIcon.js +1 -7
- package/esm/icons/components/CrossCircleIcon.js +1 -7
- package/esm/icons/components/CrownIcon.js +1 -7
- package/esm/icons/components/DealmakerIcon.js +1 -7
- package/esm/icons/components/DeliveryIcon.js +1 -7
- package/esm/icons/components/DetailedSearchIcon.js +1 -7
- package/esm/icons/components/EcoFriendlyIcon.js +1 -7
- package/esm/icons/components/EditIcon.js +1 -7
- package/esm/icons/components/EngineIcon.js +1 -7
- package/esm/icons/components/EnglandFlagIcon.js +1 -7
- package/esm/icons/components/EvaluationIcon.js +1 -7
- package/esm/icons/components/ExaminationMarkFilledIcon.js +1 -7
- package/esm/icons/components/ExaminationMarkIcon.js +1 -7
- package/esm/icons/components/ExteriorIcon.js +1 -7
- package/esm/icons/components/EyeIcon.js +1 -7
- package/esm/icons/components/FacebookBtnIcon.js +1 -7
- package/esm/icons/components/FacebookIcon.js +1 -7
- package/esm/icons/components/FatalIcon.js +1 -7
- package/esm/icons/components/FavouriteIcon.js +1 -7
- package/esm/icons/components/FavouriteSolidIcon.js +1 -7
- package/esm/icons/components/FilterIcon.js +1 -7
- package/esm/icons/components/FinanceIcon.js +1 -7
- package/esm/icons/components/FindCarIcon.js +1 -7
- package/esm/icons/components/FixedMonthlyCostIcon.js +1 -7
- package/esm/icons/components/FlagIcon.js +1 -7
- package/esm/icons/components/FlexibilityIcon.js +1 -7
- package/esm/icons/components/ForumLargeIcon.js +1 -7
- package/esm/icons/components/ForumSmallIcon.js +1 -7
- package/esm/icons/components/GavelIcon.js +1 -7
- package/esm/icons/components/GearboxIcon.js +1 -7
- package/esm/icons/components/GiftIcon.js +1 -7
- package/esm/icons/components/GridViewIcon.js +1 -7
- package/esm/icons/components/GroupIcon.js +1 -7
- package/esm/icons/components/GuaranteeIcon.js +1 -7
- package/esm/icons/components/GuaranteeLargeIcon.js +1 -7
- package/esm/icons/components/GuaranteeSmallIcon.js +1 -7
- package/esm/icons/components/HalfCombiIcon.js +1 -7
- package/esm/icons/components/HamburgerIcon.js +1 -7
- package/esm/icons/components/HandshakeIcon.js +1 -7
- package/esm/icons/components/HelpingHandIcon.js +1 -7
- package/esm/icons/components/IdIcon.js +1 -7
- package/esm/icons/components/InformationIcon.js +1 -7
- package/esm/icons/components/InstagramIcon.js +1 -7
- package/esm/icons/components/InsuranceIcon.js +1 -7
- package/esm/icons/components/InteriorIcon.js +1 -7
- package/esm/icons/components/InteriorThinIcon.js +1 -7
- package/esm/icons/components/InternationalIcon.js +1 -7
- package/esm/icons/components/KvdTestIcon.js +1 -7
- package/esm/icons/components/KvdVenueIcon.js +1 -7
- package/esm/icons/components/LifebuoyIcon.js +1 -7
- package/esm/icons/components/LiftTruckIcon.js +1 -7
- package/esm/icons/components/LinkedInIcon.js +1 -7
- package/esm/icons/components/ListViewIcon.js +1 -7
- package/esm/icons/components/MailIcon.js +1 -7
- package/esm/icons/components/MinibusIcon.js +1 -7
- package/esm/icons/components/MinivanIcon.js +1 -7
- package/esm/icons/components/MobileIcon.js +1 -7
- package/esm/icons/components/MotorcycleIcon.js +1 -7
- package/esm/icons/components/MrfLogoIcon.js +1 -7
- package/esm/icons/components/NotFoundIcon.js +1 -7
- package/esm/icons/components/OverbidIcon.js +1 -7
- package/esm/icons/components/PdfIconIcon.js +1 -7
- package/esm/icons/components/PhoneIcon.js +1 -7
- package/esm/icons/components/PickUpIcon.js +1 -7
- package/esm/icons/components/PinIcon.js +1 -7
- package/esm/icons/components/PlayIcon.js +1 -7
- package/esm/icons/components/Pricetag.js +1 -7
- package/esm/icons/components/PricetagFilledKronaIcon.js +1 -7
- package/esm/icons/components/PrivateCarIcon.js +1 -7
- package/esm/icons/components/ProfileCircleIcon.js +1 -7
- package/esm/icons/components/ProfileIcon.js +1 -7
- package/esm/icons/components/RadioIcon.js +1 -7
- package/esm/icons/components/ReclamationIcon.js +1 -7
- package/esm/icons/components/ReleasingIcon.js +1 -7
- package/esm/icons/components/RemoveFilterIcon.js +1 -7
- package/esm/icons/components/ReservedPriceIcon.js +1 -7
- package/esm/icons/components/ResultIcon.js +1 -7
- package/esm/icons/components/SafePaymentIcon.js +1 -7
- package/esm/icons/components/SaleTagIcon.js +1 -7
- package/esm/icons/components/SearchCheckIcon.js +1 -7
- package/esm/icons/components/SearchIcon.js +1 -7
- package/esm/icons/components/SedanIcon.js +1 -7
- package/esm/icons/components/SellCarIcon.js +1 -7
- package/esm/icons/components/SellCarsIcon.js +1 -7
- package/esm/icons/components/ServiceIcon.js +1 -7
- package/esm/icons/components/ShareIcon.js +1 -7
- package/esm/icons/components/ShieldIcon.js +1 -7
- package/esm/icons/components/SignInIcon.js +1 -7
- package/esm/icons/components/SignOutIcon.js +1 -7
- package/esm/icons/components/SpeedMeterIcon.js +1 -7
- package/esm/icons/components/StarCircleIcon.js +1 -7
- package/esm/icons/components/StartIcon.js +1 -7
- package/esm/icons/components/StoreIcon.js +1 -7
- package/esm/icons/components/SuvIcon.js +1 -7
- package/esm/icons/components/SwedenFlag.js +1 -7
- package/esm/icons/components/TankIcon.js +1 -7
- package/esm/icons/components/TireIcon.js +1 -7
- package/esm/icons/components/TransportIcon.js +1 -7
- package/esm/icons/components/TrashcanIcon.js +1 -7
- package/esm/icons/components/TrophyIcon.js +1 -7
- package/esm/icons/components/TruckIcon.js +1 -7
- package/esm/icons/components/UmbrellaIcon.js +1 -7
- package/esm/icons/components/ValuationIcon.js +1 -7
- package/esm/icons/components/ValueIcon.js +1 -7
- package/esm/icons/components/WarningIcon.js +1 -7
- package/esm/icons/components/YoutubeIcon.js +1 -7
- package/esm/icons/components/index.js +1 -157
- package/esm/index.js +1 -221
- package/esm/shared/constants.js +1 -3
- package/esm/shared/helpers.js +1 -23
- package/esm/shared/helpers.spec.js +1 -40
- package/esm/shared/media-queries.js +1 -35
- package/esm/theme.js +1 -121
- package/esm/typography/BodyText/index.js +20 -35
- package/esm/typography/ButtonText/index.js +15 -28
- package/esm/typography/Heading/index.js +22 -38
- package/esm/utils/utils.js +2 -25
- package/package.json +11 -8
- package/types/components/DayPicker/index.d.ts +0 -1
- package/types/components/DayPicker/style.d.ts +2 -0
- package/types/components/FieldLabel.d.ts +1 -1
- package/types/components/Header/Link.d.ts +1 -1
- package/types/components/MenuItem/index.d.ts +1 -1
- package/types/components/Select/index.d.ts +9 -8
- package/cjs/react-app-env.d.js +0 -2
- package/cjs/styled.d.js +0 -4
- package/esm/react-app-env.d.js +0 -1
- package/esm/styled.d.js +0 -1
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import theme from '../../theme.js';
|
|
4
|
-
|
|
5
|
-
const BadgeContainer = styled.div `
|
|
1
|
+
import t from"react";import r from"styled-components";import a from"../../theme.js";const i=r.div`
|
|
6
2
|
border-radius: 0.75rem;
|
|
7
|
-
background: ${
|
|
3
|
+
background: ${a.colors.secondary.main};
|
|
8
4
|
display: inline-flex;
|
|
9
5
|
align-items: center;
|
|
10
6
|
justify-content: center;
|
|
@@ -13,48 +9,27 @@ const BadgeContainer = styled.div `
|
|
|
13
9
|
height: 1.5rem;
|
|
14
10
|
box-sizing: border-box;
|
|
15
11
|
cursor: default;
|
|
16
|
-
|
|
17
|
-
const SmallBadgeContainer = styled(BadgeContainer) `
|
|
12
|
+
`,s=r(i)`
|
|
18
13
|
width: 1rem;
|
|
19
14
|
height: 1rem;
|
|
20
15
|
border-radius: 50%;
|
|
21
16
|
min-width: 1rem;
|
|
22
17
|
position: relative;
|
|
23
|
-
|
|
24
|
-
const MiddleDot = styled.div `
|
|
18
|
+
`,m=r.div`
|
|
25
19
|
display: block;
|
|
26
20
|
width: 100%;
|
|
27
21
|
height: 100%;
|
|
28
22
|
border-radius: 50%;
|
|
29
23
|
opacity: 0.1;
|
|
30
24
|
transform: scale(0.5);
|
|
31
|
-
background: ${
|
|
25
|
+
background: ${a.colors.text.dark};
|
|
32
26
|
position: absolute;
|
|
33
27
|
top: 0;
|
|
34
28
|
left: 0;
|
|
35
|
-
|
|
36
|
-
const Label = styled.span `
|
|
29
|
+
`,c=r.span`
|
|
37
30
|
font-size: 0.75rem;
|
|
38
31
|
line-height: 0.75rem;
|
|
39
32
|
color: white;
|
|
40
|
-
font-weight: ${({
|
|
41
|
-
font-family: ${({
|
|
42
|
-
|
|
43
|
-
const numberToLabel = (notificationAmount) => {
|
|
44
|
-
if (notificationAmount >= 100) {
|
|
45
|
-
return '99+';
|
|
46
|
-
}
|
|
47
|
-
return `${notificationAmount}`;
|
|
48
|
-
};
|
|
49
|
-
const Badge = ({ notificationAmount = 0, withNumber = true, ...rest }) => {
|
|
50
|
-
if ((notificationAmount <= 0 || !notificationAmount) && withNumber) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
if (!withNumber) {
|
|
54
|
-
return (jsx(SmallBadgeContainer, Object.assign({}, rest, { children: jsx(MiddleDot, { "data-test": "middle-dot" }, void 0) }), void 0));
|
|
55
|
-
}
|
|
56
|
-
const label = numberToLabel(notificationAmount);
|
|
57
|
-
return (jsx(BadgeContainer, Object.assign({}, rest, { children: jsx(Label, { children: label }, void 0) }), void 0));
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export { Badge, Badge as default };
|
|
33
|
+
font-weight: ${({theme:e})=>e.typography.fontAlternativeBoldWeight};
|
|
34
|
+
font-family: ${({theme:e})=>e.typography.fontAlternativeFamily};
|
|
35
|
+
`,h=e=>e>=100?"99+":`${e}`,l=({notificationAmount:e=0,withNumber:o=!0,...n})=>{if((e<=0||!e)&&o)return null;if(!o)return t.createElement(s,{...n},t.createElement(m,{"data-test":"middle-dot"}));const d=h(e);return t.createElement(i,{...n},t.createElement(c,null,d))};export{l as Badge,l as default};
|
|
@@ -1,117 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import styled, { css } from 'styled-components';
|
|
3
|
-
import theme from '../../theme.js';
|
|
4
|
-
import Spinner from '../Spinner/index.js';
|
|
5
|
-
import { BasicButtonTextStyle, ButtonRegularTextStyle, ButtonLargeTextStyle, ButtonSmallTextStyle } from '../../typography/ButtonText/index.js';
|
|
6
|
-
|
|
7
|
-
/****************************************************************************/
|
|
8
|
-
/* Font styles */
|
|
9
|
-
/****************************************************************************/
|
|
10
|
-
const getFontStyles = (size) => {
|
|
11
|
-
switch (size) {
|
|
12
|
-
case 'smaller':
|
|
13
|
-
return ButtonSmallTextStyle;
|
|
14
|
-
case 'small':
|
|
15
|
-
return ButtonRegularTextStyle;
|
|
16
|
-
case 'regular':
|
|
17
|
-
return ButtonRegularTextStyle;
|
|
18
|
-
case 'large':
|
|
19
|
-
return ButtonLargeTextStyle;
|
|
20
|
-
default:
|
|
21
|
-
return ButtonRegularTextStyle;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
/****************************************************************************/
|
|
25
|
-
/* Size styles */
|
|
26
|
-
/****************************************************************************/
|
|
27
|
-
const smallerSizeStyles = (isLoading) => `
|
|
1
|
+
import n from"react";import e,{css as c}from"styled-components";import u from"../../theme.js";import $ from"../Spinner/index.js";import{BasicButtonTextStyle as g,ButtonRegularTextStyle as a,ButtonLargeTextStyle as b,ButtonSmallTextStyle as f}from"../../typography/ButtonText/index.js";const y=o=>{switch(o){case"smaller":return f;case"small":return a;case"regular":return a;case"large":return b;default:return a}},S=o=>`
|
|
28
2
|
min-width: 76px;
|
|
29
|
-
padding: ${
|
|
30
|
-
|
|
31
|
-
const smallSizeStyles = (isLoading) => `
|
|
3
|
+
padding: ${o?"7px 10px 5.5px":"10px 10px 8px"};
|
|
4
|
+
`,k=o=>`
|
|
32
5
|
min-width: 76px;
|
|
33
|
-
padding: ${
|
|
34
|
-
|
|
35
|
-
const regularSizeStyles = (isLoading) => `
|
|
6
|
+
padding: ${o?"8px 10px 6px":"11px 10px 9px"};
|
|
7
|
+
`,m=o=>`
|
|
36
8
|
min-width: 250px;
|
|
37
|
-
padding: ${
|
|
38
|
-
|
|
39
|
-
const largeSizeStyles = (isLoading) => `
|
|
9
|
+
padding: ${o?"7px 22px 5px":"15px 22px 13px"};
|
|
10
|
+
`,w=o=>`
|
|
40
11
|
min-width: 250px;
|
|
41
|
-
padding: ${
|
|
42
|
-
|
|
43
|
-
/****************************************************************************/
|
|
44
|
-
/* Color styles */
|
|
45
|
-
/****************************************************************************/
|
|
46
|
-
const solidColorStyles = (theme) => (color) => `
|
|
12
|
+
padding: ${o?"9px 22px 6px":"21px 22px 19px"};
|
|
13
|
+
`,h=o=>r=>`
|
|
47
14
|
color: white;
|
|
48
|
-
border-color: ${
|
|
49
|
-
background-color: ${
|
|
15
|
+
border-color: ${o.colors[r].main};
|
|
16
|
+
background-color: ${o.colors[r].main};
|
|
50
17
|
|
|
51
18
|
:hover {
|
|
52
|
-
border-color: ${
|
|
53
|
-
background-color: ${
|
|
19
|
+
border-color: ${o.colors[r].light};
|
|
20
|
+
background-color: ${o.colors[r].light};
|
|
54
21
|
}
|
|
55
22
|
|
|
56
23
|
:active {
|
|
57
|
-
border-color: ${
|
|
58
|
-
background-color: ${
|
|
24
|
+
border-color: ${o.colors[r].dark};
|
|
25
|
+
background-color: ${o.colors[r].dark}
|
|
59
26
|
}
|
|
60
27
|
|
|
61
28
|
:focus {
|
|
62
|
-
box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${
|
|
29
|
+
box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${o.colors[r].dark};
|
|
63
30
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
color: ${
|
|
67
|
-
border-color: ${theme.colors[color].main};
|
|
31
|
+
`,B=o=>r=>`
|
|
32
|
+
color: ${o.colors[r].main};
|
|
33
|
+
border-color: ${o.colors[r].main};
|
|
68
34
|
background-color: transparent;
|
|
69
35
|
|
|
70
36
|
:hover {
|
|
71
37
|
color: white;
|
|
72
|
-
border-color: ${
|
|
73
|
-
background-color: ${
|
|
38
|
+
border-color: ${o.colors[r].light};
|
|
39
|
+
background-color: ${o.colors[r].light};
|
|
74
40
|
}
|
|
75
41
|
|
|
76
42
|
:active {
|
|
77
43
|
color: white;
|
|
78
|
-
border-color: ${
|
|
79
|
-
background-color: ${
|
|
44
|
+
border-color: ${o.colors[r].dark};
|
|
45
|
+
background-color: ${o.colors[r].dark};
|
|
80
46
|
}
|
|
81
47
|
|
|
82
48
|
:focus {
|
|
83
|
-
box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${
|
|
49
|
+
box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${o.colors[r].dark};
|
|
84
50
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
color: ${theme.colors[color].main};
|
|
51
|
+
`,C=o=>r=>`
|
|
52
|
+
color: ${o.colors[r].main};
|
|
88
53
|
border-color: transparent;
|
|
89
54
|
background-color: transparent;
|
|
90
55
|
|
|
91
56
|
:hover {
|
|
92
|
-
color: ${
|
|
57
|
+
color: ${o.colors[r].dark};
|
|
93
58
|
}
|
|
94
59
|
|
|
95
60
|
:active {
|
|
96
|
-
color: ${
|
|
61
|
+
color: ${o.colors[r].light};
|
|
97
62
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
color: ${theme.colors.gray.light1};
|
|
63
|
+
`,T=o=>`
|
|
64
|
+
background-color: ${o.colors.gray.light4};
|
|
65
|
+
border-color: ${o.colors.gray.light4};
|
|
66
|
+
color: ${o.colors.gray.light1};
|
|
103
67
|
cursor: not-allowed;
|
|
104
|
-
|
|
105
|
-
const disabledFlatColorStyles = (theme) => `
|
|
68
|
+
`,j=o=>`
|
|
106
69
|
border-color: transparent;
|
|
107
70
|
background-color: transparent;
|
|
108
|
-
color: ${
|
|
71
|
+
color: ${o.colors.gray.light1};
|
|
109
72
|
cursor: not-allowed;
|
|
110
|
-
|
|
111
|
-
/****************************************************************************/
|
|
112
|
-
/* Root styles */
|
|
113
|
-
/****************************************************************************/
|
|
114
|
-
const Root = styled.button `
|
|
73
|
+
`,v=e.button`
|
|
115
74
|
outline: none;
|
|
116
75
|
cursor: pointer;
|
|
117
76
|
user-select: none;
|
|
@@ -119,38 +78,23 @@ const Root = styled.button `
|
|
|
119
78
|
white-space: nowrap;
|
|
120
79
|
border: 2px solid transparent;
|
|
121
80
|
border-radius: 3px;
|
|
122
|
-
width: ${({
|
|
81
|
+
width: ${({fullWidth:o})=>o&&"100%"};
|
|
123
82
|
|
|
124
|
-
${
|
|
125
|
-
${({
|
|
126
|
-
${({
|
|
127
|
-
${
|
|
128
|
-
${
|
|
129
|
-
${
|
|
130
|
-
${
|
|
83
|
+
${g}
|
|
84
|
+
${({size:o})=>y(o)}
|
|
85
|
+
${({size:o,isLoading:r})=>c`
|
|
86
|
+
${o==="smaller"&&S(r)}
|
|
87
|
+
${o==="small"&&k(r)}
|
|
88
|
+
${o==="regular"&&m(r)}
|
|
89
|
+
${o==="large"&&w(r)}
|
|
131
90
|
`}
|
|
132
91
|
background-color: transparent;
|
|
133
92
|
transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
|
|
134
|
-
${({
|
|
135
|
-
${!
|
|
136
|
-
${!
|
|
137
|
-
${!
|
|
138
|
-
${
|
|
139
|
-
${
|
|
93
|
+
${({variant:o,color:r,disabled:l,theme:t})=>c`
|
|
94
|
+
${!l&&o==="solid"&&h(t)(r)}
|
|
95
|
+
${!l&&o==="outline"&&B(t)(r)}
|
|
96
|
+
${!l&&o==="flat"&&C(t)(r)}
|
|
97
|
+
${l&&o!=="flat"&&T(t)}
|
|
98
|
+
${l&&o==="flat"&&j(t)}
|
|
140
99
|
`}
|
|
141
|
-
|
|
142
|
-
/****************************************************************************/
|
|
143
|
-
/* Main component */
|
|
144
|
-
/****************************************************************************/
|
|
145
|
-
const LoadingSpinner = styled(Spinner) ``;
|
|
146
|
-
const spinnerSizes = {
|
|
147
|
-
smaller: 1,
|
|
148
|
-
small: 1,
|
|
149
|
-
regular: 1.5,
|
|
150
|
-
large: 1.75,
|
|
151
|
-
};
|
|
152
|
-
const Button = ({ size = 'small', color = 'primary', variant = 'solid', fullWidth = false, isDisabled = false, isLoading = false, children, ...props }) => {
|
|
153
|
-
return (jsx(Root, Object.assign({}, props, { color: color, disabled: isDisabled || isLoading, fullWidth: fullWidth, theme: theme, variant: variant, size: size, isLoading: isLoading }, { children: isLoading ? (jsx(LoadingSpinner, { color: "neutral", size: spinnerSizes[size] }, void 0)) : (children) }), void 0));
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
export { Button, Button as default };
|
|
100
|
+
`,R=e($)``,z={smaller:1,small:1,regular:1.5,large:1.75},p=({size:o="small",color:r="primary",variant:l="solid",fullWidth:t=!1,isDisabled:x=!1,isLoading:s=!1,children:d,...i})=>n.createElement(v,{...i,color:r,disabled:x||s,fullWidth:t,theme:u,variant:l,size:o,isLoading:s},s?n.createElement(R,{color:"neutral",size:z[o]}):d);export{p as Button,p as default};
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const CardWrapper = styled.div `
|
|
6
|
-
background: ${theme.colors.background.light};
|
|
7
|
-
${({ boxShadow }) => boxShadow && `box-shadow: ${boxShadow};`}
|
|
8
|
-
${({ boxShadow }) => !boxShadow &&
|
|
9
|
-
`box-shadow: 0 2px 4px rgba(0, 0, 0, 10%), 0 2px 4px rgba(0, 0, 0, 9%),
|
|
1
|
+
import e from"react";import t from"styled-components";import a from"../../theme.js";const d=t.div`
|
|
2
|
+
background: ${a.colors.background.light};
|
|
3
|
+
${({boxShadow:r})=>r&&`box-shadow: ${r};`}
|
|
4
|
+
${({boxShadow:r})=>!r&&`box-shadow: 0 2px 4px rgba(0, 0, 0, 10%), 0 2px 4px rgba(0, 0, 0, 9%),
|
|
10
5
|
0 1px 5px rgba(0, 0, 0, 15%);`}
|
|
11
6
|
border-radius: 0 0 3px 3px;
|
|
12
|
-
${({
|
|
13
|
-
|
|
14
|
-
const Card = ({ ...props }) => {
|
|
15
|
-
return (jsx(CardWrapper, Object.assign({ topBorder: props.topBorder, boxShadow: props.boxShadow }, { children: props.children }), void 0));
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { Card, Card as default };
|
|
7
|
+
${({topBorder:r})=>r&&`border-top: 4px solid ${r};`}
|
|
8
|
+
`,o=({...r})=>e.createElement(d,{topBorder:r.topBorder,boxShadow:r.boxShadow},r.children);export{o as Card,o as default};
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import styled, { css } from 'styled-components';
|
|
3
|
-
import { generateNameHash } from '../../shared/helpers.js';
|
|
4
|
-
import theme from '../../theme.js';
|
|
5
|
-
import IconButton from '../IconButton.js';
|
|
6
|
-
import CheckIcon from '../Icons/CheckIcon.js';
|
|
7
|
-
|
|
8
|
-
const regularSize = css `
|
|
1
|
+
import r from"react";import l,{css as t}from"styled-components";import{generateNameHash as p}from"../../shared/helpers.js";import o from"../../theme.js";import g from"../IconButton.js";import m from"../Icons/CheckIcon.js";const x=t`
|
|
9
2
|
width: 24px;
|
|
10
3
|
height: 24px;
|
|
11
4
|
|
|
@@ -13,8 +6,7 @@ const regularSize = css `
|
|
|
13
6
|
width: 15px;
|
|
14
7
|
height: 15px;
|
|
15
8
|
}
|
|
16
|
-
|
|
17
|
-
const largeSize = css `
|
|
9
|
+
`,b=t`
|
|
18
10
|
width: 32px;
|
|
19
11
|
height: 32px;
|
|
20
12
|
|
|
@@ -22,16 +14,10 @@ const largeSize = css `
|
|
|
22
14
|
width: 20px;
|
|
23
15
|
height: 20px;
|
|
24
16
|
}
|
|
25
|
-
|
|
26
|
-
const sizes = {
|
|
27
|
-
regular: regularSize,
|
|
28
|
-
large: largeSize,
|
|
29
|
-
};
|
|
30
|
-
const disabledStyle = css `
|
|
17
|
+
`,f={regular:x,large:b},u=t`
|
|
31
18
|
cursor: default;
|
|
32
|
-
border: 2px solid ${
|
|
33
|
-
|
|
34
|
-
const checkedStyle = (color) => css `
|
|
19
|
+
border: 2px solid ${o.colors.gray.light1};
|
|
20
|
+
`,y=e=>t`
|
|
35
21
|
svg {
|
|
36
22
|
fill: #fefefe;
|
|
37
23
|
opacity: 1;
|
|
@@ -40,16 +26,13 @@ const checkedStyle = (color) => css `
|
|
|
40
26
|
:hover {
|
|
41
27
|
}
|
|
42
28
|
|
|
43
|
-
background: ${
|
|
44
|
-
border: 2px solid ${
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
`;
|
|
49
|
-
const HiddenCheckbox = styled.input.attrs({ type: 'checkbox' }) `
|
|
29
|
+
background: ${o.colors[e].main};
|
|
30
|
+
border: 2px solid ${o.colors[e].main};
|
|
31
|
+
`,k=t`
|
|
32
|
+
background: ${o.colors.gray.light1};
|
|
33
|
+
`,$=l.input.attrs({type:"checkbox"})`
|
|
50
34
|
display: none;
|
|
51
|
-
|
|
52
|
-
const CheckboxWrapper = styled.label `
|
|
35
|
+
`,v=l.label`
|
|
53
36
|
box-sizing: border-box;
|
|
54
37
|
cursor: pointer;
|
|
55
38
|
display: flex;
|
|
@@ -57,20 +40,17 @@ const CheckboxWrapper = styled.label `
|
|
|
57
40
|
align-items: center;
|
|
58
41
|
justify-content: center;
|
|
59
42
|
|
|
60
|
-
border: 2px solid ${
|
|
43
|
+
border: 2px solid ${o.colors.gray.light1};
|
|
61
44
|
border-radius: 3px;
|
|
62
45
|
|
|
63
|
-
${
|
|
46
|
+
${e=>f[e.size]};
|
|
64
47
|
|
|
65
48
|
svg {
|
|
66
49
|
opacity: 0;
|
|
67
50
|
}
|
|
68
51
|
|
|
69
|
-
${
|
|
70
|
-
${
|
|
71
|
-
|
|
72
|
-
${props => props.isChecked && props.isDisabled && checkedDisabledStyle};
|
|
73
|
-
`;
|
|
74
|
-
const CheckBox = ({ name = generateNameHash('check-box'), isDisabled = false, size = 'regular', checked, color = 'secondary', onClick, ...rest }) => (jsxs(IconButton, Object.assign({ onClick: onClick, isActive: checked, isDisabled: isDisabled, color: color }, { children: [jsx(HiddenCheckbox, Object.assign({}, rest, { "data-validate": "checked", name: name, id: name, disabled: isDisabled }), void 0), jsx(CheckboxWrapper, Object.assign({ htmlFor: name, size: size, color: color, isChecked: checked, isDisabled: isDisabled }, { children: jsx(CheckIcon, {}, void 0) }), void 0)] }), void 0));
|
|
52
|
+
${e=>e.isChecked&&y(e.color)};
|
|
53
|
+
${e=>e.isDisabled&&u};
|
|
75
54
|
|
|
76
|
-
|
|
55
|
+
${e=>e.isChecked&&e.isDisabled&&k};
|
|
56
|
+
`,a=({name:e=p("check-box"),isDisabled:s=!1,size:d="regular",checked:c,color:i="secondary",onClick:n,...h})=>r.createElement(g,{onClick:n,isActive:c,isDisabled:s,color:i},r.createElement($,{...h,"data-validate":"checked",name:e,id:e,disabled:s}),r.createElement(v,{htmlFor:e,size:d,color:i,isChecked:c,isDisabled:s},r.createElement(m,null)));export{a as CheckBox,a as default};
|
|
@@ -1,69 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const getBackgroundColor = ({ isDisabled, isActive, activeColor, }) => {
|
|
7
|
-
if (isActive && isDisabled) {
|
|
8
|
-
return fadedColor(theme.colors[activeColor].main, 0.5);
|
|
9
|
-
}
|
|
10
|
-
if (isDisabled) {
|
|
11
|
-
return theme.colors.gray.light4;
|
|
12
|
-
}
|
|
13
|
-
if (isActive) {
|
|
14
|
-
return theme.colors[activeColor].main;
|
|
15
|
-
}
|
|
16
|
-
return 'transparent';
|
|
17
|
-
};
|
|
18
|
-
const getColor = ({ isActive, isDisabled }) => {
|
|
19
|
-
if (isActive || (isActive && isDisabled)) {
|
|
20
|
-
return theme.colors.text.light;
|
|
21
|
-
}
|
|
22
|
-
if (isDisabled) {
|
|
23
|
-
return theme.colors.text.disabled;
|
|
24
|
-
}
|
|
25
|
-
return theme.colors.text.dark;
|
|
26
|
-
};
|
|
27
|
-
const getFontSize = (size = 'smaller') => {
|
|
28
|
-
const sizes = {
|
|
29
|
-
smaller: '0.8125rem',
|
|
30
|
-
small: '1rem',
|
|
31
|
-
regular: '1rem',
|
|
32
|
-
large: '1.25rem',
|
|
33
|
-
};
|
|
34
|
-
return sizes[size];
|
|
35
|
-
};
|
|
36
|
-
const Item = styled.div `
|
|
37
|
-
font-family: ${({ theme }) => theme.typography.fontAlternativeFamily};
|
|
38
|
-
font-size: ${({ size }) => getFontSize(size)};
|
|
39
|
-
font-weight: ${({ theme }) => theme.typography.fontAlternativeBoldWeight};
|
|
1
|
+
import a from"react";import s from"styled-components";import{fadedColor as g}from"../../shared/helpers.js";import t from"../../theme.js";const u=({isDisabled:e,isActive:r,activeColor:o})=>r&&e?g(t.colors[o].main,.5):e?t.colors.gray.light4:r?t.colors[o].main:"transparent",h=({isActive:e,isDisabled:r})=>e||e&&r?t.colors.text.light:r?t.colors.text.disabled:t.colors.text.dark,y=(e="smaller")=>({smaller:"0.8125rem",small:"1rem",regular:"1rem",large:"1.25rem"})[e],x=s.div`
|
|
2
|
+
font-family: ${({theme:e})=>e.typography.fontAlternativeFamily};
|
|
3
|
+
font-size: ${({size:e})=>y(e)};
|
|
4
|
+
font-weight: ${({theme:e})=>e.typography.fontAlternativeBoldWeight};
|
|
40
5
|
line-height: 1.25;
|
|
41
6
|
letter-spacing: 0.1px;
|
|
42
7
|
display: inline-block;
|
|
43
|
-
cursor: ${({
|
|
8
|
+
cursor: ${({isDisabled:e})=>e?"auto":"pointer"};
|
|
44
9
|
align-items: center;
|
|
45
|
-
background: ${
|
|
46
|
-
color: ${
|
|
10
|
+
background: ${u};
|
|
11
|
+
color: ${h};
|
|
47
12
|
justify-content: center;
|
|
48
13
|
border-width: 1px;
|
|
49
14
|
border-style: solid;
|
|
50
|
-
border-color: ${({
|
|
15
|
+
border-color: ${({isActive:e,isDisabled:r})=>!e&&!r?t.colors.background.dark:"transparent"};
|
|
51
16
|
border-radius: 1.293rem;
|
|
52
|
-
|
|
53
|
-
const ContentWrapper = styled.span `
|
|
17
|
+
`,k=s.span`
|
|
54
18
|
padding: 0.5rem 1rem;
|
|
55
19
|
display: flex;
|
|
56
20
|
align-items: center;
|
|
57
21
|
justify-content: center;
|
|
58
22
|
text-align: center;
|
|
59
|
-
|
|
60
|
-
const Chip = ({ activeColor = 'primary', children, component = 'div', isActive, isDisabled, onClick, size, ...props }) => {
|
|
61
|
-
const handleClick = (e) => {
|
|
62
|
-
if (!isDisabled && onClick) {
|
|
63
|
-
onClick(e);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
return (jsx(Item, Object.assign({}, props, { as: component, activeColor: activeColor, isDisabled: isDisabled, isActive: isActive, size: size }, { children: jsx(ContentWrapper, Object.assign({ onClick: handleClick }, { children: children }), void 0) }), void 0));
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export { Chip, Chip as default };
|
|
23
|
+
`,i=({activeColor:e="primary",children:r,component:o="div",isActive:c,isDisabled:n,onClick:l,size:m,...d})=>{const p=f=>{!n&&l&&l(f)};return a.createElement(x,{...d,as:o,activeColor:e,isDisabled:n,isActive:c,size:m},a.createElement(k,{onClick:p},r))};export{i as Chip,i as default};
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import Arrow$1 from '../Icons/Arrow.js';
|
|
4
|
-
import theme from '../../theme.js';
|
|
5
|
-
import { BodyText } from '../../typography/BodyText/index.js';
|
|
6
|
-
import { formatMonthTitle } from './localeUtils.js';
|
|
7
|
-
|
|
8
|
-
const NavBarWrapper = styled.div `
|
|
1
|
+
import t from"react";import e from"styled-components";import s from"../Icons/Arrow.js";import r from"../../theme.js";import{BodyText as m}from"../../typography/BodyText/index.js";import{formatMonthTitle as p}from"./localeUtils.js";const d=e.div`
|
|
9
2
|
display: flex;
|
|
10
3
|
justify-content: space-between;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`;
|
|
15
|
-
const NavButton = styled.button `
|
|
4
|
+
`,f=e(m)`
|
|
5
|
+
color: ${r.colors.text.dark};
|
|
6
|
+
`,o=e.button`
|
|
16
7
|
appearance: none;
|
|
17
8
|
background-color: transparent;
|
|
18
9
|
border: 0;
|
|
@@ -21,18 +12,12 @@ const NavButton = styled.button `
|
|
|
21
12
|
outline: none;
|
|
22
13
|
display: flex;
|
|
23
14
|
align-items: center;
|
|
24
|
-
|
|
25
|
-
const Arrow = styled(Arrow$1) `
|
|
15
|
+
`,n=e(s)`
|
|
26
16
|
width: 16px;
|
|
27
17
|
height: 16px;
|
|
28
|
-
fill: ${
|
|
29
|
-
|
|
30
|
-
const BackArrow = styled(Arrow) `
|
|
18
|
+
fill: ${r.colors.gray.dark3};
|
|
19
|
+
`,y=e(n)`
|
|
31
20
|
transform: rotate(90deg);
|
|
32
|
-
|
|
33
|
-
const ForwardArrow = styled(Arrow) `
|
|
21
|
+
`,h=e(n)`
|
|
34
22
|
transform: rotate(-90deg);
|
|
35
|
-
|
|
36
|
-
const DayPickerNavBar = ({ month, onPreviousClick, onNextClick, locale, }) => (jsxs(NavBarWrapper, { children: [jsx(NavButton, Object.assign({ onClick: () => onPreviousClick() }, { children: jsx(BackArrow, { title: "prev-month" }, void 0) }), void 0), jsx(NavTitle, Object.assign({ as: "h3" }, { children: formatMonthTitle(month, locale) }), void 0), jsx(NavButton, Object.assign({ onClick: () => onNextClick() }, { children: jsx(ForwardArrow, { title: "next-month" }, void 0) }), void 0)] }, void 0));
|
|
37
|
-
|
|
38
|
-
export { DayPickerNavBar as default };
|
|
23
|
+
`,x=({month:a,onPreviousClick:l,onNextClick:c,locale:i})=>t.createElement(d,null,t.createElement(o,{onClick:()=>l()},t.createElement(y,{title:"prev-month"})),t.createElement(f,{as:"h3"},p(a,i)),t.createElement(o,{onClick:()=>c()},t.createElement(h,{title:"next-month"})));export{x as default};
|
|
@@ -1,54 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import ReactDayPicker from 'react-day-picker';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
import theme from '../../theme.js';
|
|
6
|
-
import DayPickerNavBar from './DayPickerNavBar.js';
|
|
7
|
-
import { MONTHS, WEEKDAYS_LONG, WEEKDAYS_SHORT, FIRST_DAY_OF_THE_WEEK } from './localeUtils.js';
|
|
8
|
-
import '../Icons/Arrow.js';
|
|
9
|
-
import '../../typography/BodyText/index.js';
|
|
1
|
+
import t from"react";import c from"react-day-picker";import n from"styled-components";import r from"../../theme.js";import s from"./DayPickerNavBar.js";import{MONTHS as y,WEEKDAYS_LONG as l,WEEKDAYS_SHORT as m,FIRST_DAY_OF_THE_WEEK as d}from"./localeUtils.js";import p from"./style.js";import"../Icons/Arrow.js";import"../../typography/BodyText/index.js";const k=n.div`
|
|
2
|
+
${p}
|
|
10
3
|
|
|
11
|
-
|
|
12
|
-
font-family: ${({ theme }) => theme.typography.fontAlternativeFamily};
|
|
4
|
+
font-family: ${({theme:e})=>e.typography.fontAlternativeFamily};
|
|
13
5
|
.DayPicker-wrapper {
|
|
14
6
|
&:focus {
|
|
15
7
|
outline: none;
|
|
16
8
|
}
|
|
17
9
|
}
|
|
18
10
|
.DayPicker-Weekday {
|
|
19
|
-
color: ${({
|
|
11
|
+
color: ${({theme:e})=>e.colors.gray.light1};
|
|
20
12
|
}
|
|
21
13
|
.DayPicker-Day {
|
|
22
14
|
font-size: 12px;
|
|
23
15
|
padding: 14px;
|
|
24
|
-
font-weight: ${({
|
|
25
|
-
color: ${({
|
|
16
|
+
font-weight: ${({theme:e})=>e.typography.fontAlternativeBoldWeight};
|
|
17
|
+
color: ${({theme:e})=>e.colors.text.dark};
|
|
26
18
|
&:focus {
|
|
27
19
|
outline: none;
|
|
28
|
-
box-shadow: 0 0 4px ${
|
|
20
|
+
box-shadow: 0 0 4px ${r.colors.gray.dark3};
|
|
29
21
|
}
|
|
30
22
|
&:not(.DayPicker--interactionDisabled):not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--outside) {
|
|
31
23
|
&:focus {
|
|
32
|
-
box-shadow: 0 0 4px ${
|
|
24
|
+
box-shadow: 0 0 4px ${r.colors.gray.dark3};
|
|
33
25
|
}
|
|
34
26
|
&:hover {
|
|
35
27
|
background-color: rgba(253, 171, 74, 0.25);
|
|
36
28
|
}
|
|
37
29
|
}
|
|
38
30
|
&.DayPicker-Day--disabled {
|
|
39
|
-
color: ${
|
|
31
|
+
color: ${r.colors.gray.dark3};
|
|
40
32
|
}
|
|
41
33
|
}
|
|
42
|
-
|
|
43
|
-
const modifiersStyles = {
|
|
44
|
-
selected: {
|
|
45
|
-
color: theme.colors.text.light,
|
|
46
|
-
background: theme.colors.primary.main,
|
|
47
|
-
fontWeight: 700,
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
const DayPicker = ({ locale = 'sv', ...props }) => {
|
|
51
|
-
return (jsx(DayPickerWrapper, { children: jsx(ReactDayPicker, Object.assign({}, props, { locale: locale, months: MONTHS[locale], weekdaysLong: WEEKDAYS_LONG[locale], weekdaysShort: WEEKDAYS_SHORT[locale], firstDayOfWeek: FIRST_DAY_OF_THE_WEEK[locale], navbarElement: navProps => (jsx(DayPickerNavBar, Object.assign({}, navProps, { locale: locale }), void 0)), captionElement: jsx("div", {}, void 0), modifiersStyles: modifiersStyles }), void 0) }, void 0));
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export { DayPicker, DayPicker as default };
|
|
34
|
+
`,D={selected:{color:r.colors.text.light,background:r.colors.primary.main,fontWeight:700}},o=({locale:e="sv",...a})=>t.createElement(k,null,t.createElement(c,{...a,locale:e,months:y[e],weekdaysLong:l[e],weekdaysShort:m[e],firstDayOfWeek:d[e],navbarElement:i=>t.createElement(s,{...i,locale:e}),captionElement:t.createElement("div",null),modifiersStyles:D}));export{o as DayPicker,o as default};
|
|
@@ -1,52 +1 @@
|
|
|
1
|
-
const MONTHS
|
|
2
|
-
sv: [
|
|
3
|
-
'Januari',
|
|
4
|
-
'Februari',
|
|
5
|
-
'Mars',
|
|
6
|
-
'April',
|
|
7
|
-
'Maj',
|
|
8
|
-
'Juni',
|
|
9
|
-
'Juli',
|
|
10
|
-
'Augusti',
|
|
11
|
-
'September',
|
|
12
|
-
'Oktober',
|
|
13
|
-
'November',
|
|
14
|
-
'December',
|
|
15
|
-
],
|
|
16
|
-
en: [
|
|
17
|
-
'January',
|
|
18
|
-
'February',
|
|
19
|
-
'March',
|
|
20
|
-
'April',
|
|
21
|
-
'May',
|
|
22
|
-
'June',
|
|
23
|
-
'July',
|
|
24
|
-
'August',
|
|
25
|
-
'September',
|
|
26
|
-
'October',
|
|
27
|
-
'November',
|
|
28
|
-
'December',
|
|
29
|
-
],
|
|
30
|
-
};
|
|
31
|
-
const WEEKDAYS_LONG = {
|
|
32
|
-
sv: ['Söndag', 'Måndag', 'Tisdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lördag'],
|
|
33
|
-
en: [
|
|
34
|
-
'Sunday',
|
|
35
|
-
'Monday',
|
|
36
|
-
'Tuesday',
|
|
37
|
-
'Wednesday',
|
|
38
|
-
'Thursday',
|
|
39
|
-
'Friday',
|
|
40
|
-
'Saturday',
|
|
41
|
-
],
|
|
42
|
-
};
|
|
43
|
-
const WEEKDAYS_SHORT = {
|
|
44
|
-
sv: ['Sö', 'Må', 'Ti', 'On', 'To', 'Fr', 'Lö'],
|
|
45
|
-
en: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
46
|
-
};
|
|
47
|
-
const FIRST_DAY_OF_THE_WEEK = { sv: 1, en: 1 };
|
|
48
|
-
const formatMonthTitle = (d, locale = 'sv') => {
|
|
49
|
-
return `${MONTHS[locale][d.getMonth()]} ${d.getFullYear()}`;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export { FIRST_DAY_OF_THE_WEEK, MONTHS, WEEKDAYS_LONG, WEEKDAYS_SHORT, formatMonthTitle };
|
|
1
|
+
const r={sv:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],en:["January","February","March","April","May","June","July","August","September","October","November","December"]},n={sv:["S\xF6ndag","M\xE5ndag","Tisdag","Onsdag","Torsdag","Fredag","L\xF6rdag"],en:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},t={sv:["S\xF6","M\xE5","Ti","On","To","Fr","L\xF6"],en:["Su","Mo","Tu","We","Th","Fr","Sa"]},u={sv:1,en:1},s=(e,a="sv")=>`${r[a][e.getMonth()]} ${e.getFullYear()}`;export{u as FIRST_DAY_OF_THE_WEEK,r as MONTHS,n as WEEKDAYS_LONG,t as WEEKDAYS_SHORT,s as formatMonthTitle};
|