@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,74 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import theme from '../../theme.js';
|
|
4
|
-
|
|
5
|
-
const fontSizes = {
|
|
6
|
-
1: {
|
|
7
|
-
size: '2rem',
|
|
8
|
-
lineHeight: '3rem',
|
|
9
|
-
bottom: '2rem',
|
|
10
|
-
fontFamily: theme.typography.fontAlternativeFamily,
|
|
11
|
-
},
|
|
12
|
-
2: {
|
|
13
|
-
size: '1.5rem',
|
|
14
|
-
lineHeight: '2.5rem',
|
|
15
|
-
bottom: '1rem',
|
|
16
|
-
fontFamily: theme.typography.fontAlternativeFamily,
|
|
17
|
-
},
|
|
18
|
-
3: {
|
|
19
|
-
size: '1rem',
|
|
20
|
-
lineHeight: '1.5rem',
|
|
21
|
-
bottom: '1rem',
|
|
22
|
-
fontFamily: theme.typography.fontBaseFamily,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
const Wrapper = styled.li `
|
|
1
|
+
import o from"react";import t from"styled-components";import m from"../../theme.js";const r={1:{size:"2rem",lineHeight:"3rem",bottom:"2rem",fontFamily:m.typography.fontAlternativeFamily},2:{size:"1.5rem",lineHeight:"2.5rem",bottom:"1rem",fontFamily:m.typography.fontAlternativeFamily},3:{size:"1rem",lineHeight:"1.5rem",bottom:"1rem",fontFamily:m.typography.fontBaseFamily}},p=t.li`
|
|
26
2
|
list-style-type: none;
|
|
27
3
|
display: flex;
|
|
28
4
|
flex-direction: column;
|
|
29
|
-
${({
|
|
5
|
+
${({hasPreamble:e})=>e&&"grid-column-end: span 2"};
|
|
30
6
|
|
|
31
7
|
:hover {
|
|
32
8
|
cursor: pointer;
|
|
33
9
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
font-
|
|
37
|
-
|
|
38
|
-
`;
|
|
39
|
-
const TextContainer = styled.div `
|
|
10
|
+
`,a=t.span`
|
|
11
|
+
font-family: ${({theme:e})=>e.typography.fontAlternativeFamily};
|
|
12
|
+
font-weight: ${({theme:e})=>e.typography.fontAlternativeRegularWeight};
|
|
13
|
+
`,c=t.div`
|
|
40
14
|
display: flex;
|
|
41
15
|
flex-direction: column;
|
|
42
|
-
padding-bottom: ${({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
font-family: ${({ level }) => fontSizes[level].fontFamily};
|
|
16
|
+
padding-bottom: ${({level:e})=>r[e].bottom};
|
|
17
|
+
`,g=t(a)`
|
|
18
|
+
color: ${({theme:e})=>e.colors.text.dark};
|
|
19
|
+
font-size: ${({level:e})=>r[e].size};
|
|
20
|
+
line-height: ${({level:e})=>r[e].lineHeight};
|
|
21
|
+
font-family: ${({level:e})=>r[e].fontFamily};
|
|
49
22
|
|
|
50
|
-
${({
|
|
51
|
-
|
|
52
|
-
`;
|
|
53
|
-
const Title = styled(BaseText) `
|
|
23
|
+
${({level:e,theme:n})=>e===3&&`font-weight: ${n.typography.fontAlternativeRegularWeight}`};
|
|
24
|
+
`,d=t(a)`
|
|
54
25
|
font-size: 0.75rem;
|
|
55
|
-
font-weight: ${({
|
|
26
|
+
font-weight: ${({theme:e})=>e.typography.fontAlternativeBoldWeight};
|
|
56
27
|
line-height: 1.25rem;
|
|
57
|
-
color: ${({
|
|
28
|
+
color: ${({theme:e})=>e.colors.text.dark};
|
|
58
29
|
text-transform: uppercase;
|
|
59
30
|
margin-bottom: 1.5rem;
|
|
60
|
-
|
|
61
|
-
const Preamble = styled(BaseText) `
|
|
31
|
+
`,$=t(a)`
|
|
62
32
|
font-size: 0.8125rem;
|
|
63
|
-
font-weight: ${({
|
|
33
|
+
font-weight: ${({theme:e})=>e.typography.fontBaseRegularWeight};
|
|
64
34
|
line-height: 1.5rem;
|
|
65
|
-
font-family: ${({
|
|
66
|
-
color: ${({
|
|
67
|
-
margin-top: ${({
|
|
68
|
-
|
|
69
|
-
const MenuItem = ({ preamble, title, level, component: Component = 'li', children, ...props }) => {
|
|
70
|
-
const hasPreamble = Boolean(preamble);
|
|
71
|
-
return (jsxs(Wrapper, Object.assign({ as: Component }, props, { hasPreamble: hasPreamble }, { children: [title && jsx(Title, { children: title }, void 0), jsxs(TextContainer, Object.assign({ level: level }, { children: [jsx(Text, Object.assign({ level: level, hasPreamble: hasPreamble }, { children: children }), void 0), preamble && jsx(Preamble, Object.assign({ level: level }, { children: preamble }), void 0)] }), void 0)] }), void 0));
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export { MenuItem, MenuItem as default };
|
|
35
|
+
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
36
|
+
color: ${({theme:e})=>e.colors.text.dark};
|
|
37
|
+
margin-top: ${({level:e})=>e===3?"0.25rem":0};
|
|
38
|
+
`,h=({preamble:e,title:n,level:i,component:s="li",children:f,...y})=>{const l=Boolean(e);return o.createElement(p,{as:s,...y,hasPreamble:l},n&&o.createElement(d,null,n),o.createElement(c,{level:i},o.createElement(g,{level:i,hasPreamble:l},f),e&&o.createElement($,{level:i},e)))};export{h as MenuItem,h as default};
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useEffect } from 'react';
|
|
3
|
-
import { createPortal } from 'react-dom';
|
|
4
|
-
import { CSSTransition } from 'react-transition-group';
|
|
5
|
-
import styled, { css, createGlobalStyle } from 'styled-components';
|
|
6
|
-
import Close from '../Icons/Close.js';
|
|
7
|
-
|
|
8
|
-
const transitions = css `
|
|
1
|
+
import t,{useEffect as u}from"react";import{createPortal as g}from"react-dom";import{CSSTransition as x}from"react-transition-group";import n,{css as h,createGlobalStyle as a}from"styled-components";import b from"../Icons/Close.js";const d=h`
|
|
9
2
|
.backgroundTransition-enter {
|
|
10
3
|
opacity: 0;
|
|
11
4
|
}
|
|
@@ -23,24 +16,21 @@ const transitions = css `
|
|
|
23
16
|
opacity: 0;
|
|
24
17
|
transition: opacity 0.25s ease-in-out;
|
|
25
18
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
${transitions}
|
|
19
|
+
`,f=n.div`
|
|
20
|
+
${d}
|
|
29
21
|
position: fixed;
|
|
30
22
|
width: 100%;
|
|
31
23
|
height: 100%;
|
|
32
24
|
top: 0;
|
|
33
25
|
left: 0;
|
|
34
26
|
z-index: 200;
|
|
35
|
-
|
|
36
|
-
const Background = styled.div `
|
|
27
|
+
`,w=n.div`
|
|
37
28
|
z-index: -1;
|
|
38
29
|
position: absolute;
|
|
39
30
|
width: 100%;
|
|
40
31
|
height: 100%;
|
|
41
32
|
background-color: rgba(34, 34, 34, 0.3);
|
|
42
|
-
|
|
43
|
-
const Content = styled.div `
|
|
33
|
+
`,y=n.div`
|
|
44
34
|
position: relative;
|
|
45
35
|
max-width: 512px;
|
|
46
36
|
padding: 24px 32px 24px 32px;
|
|
@@ -61,8 +51,7 @@ const Content = styled.div `
|
|
|
61
51
|
margin-right: auto;
|
|
62
52
|
min-width: 355px;
|
|
63
53
|
}
|
|
64
|
-
|
|
65
|
-
const CloseContainer = styled.div `
|
|
54
|
+
`,k=n.div`
|
|
66
55
|
position: absolute;
|
|
67
56
|
top: 24px;
|
|
68
57
|
right: 32px;
|
|
@@ -75,37 +64,14 @@ const CloseContainer = styled.div `
|
|
|
75
64
|
width: 1rem;
|
|
76
65
|
height: 1rem;
|
|
77
66
|
}
|
|
78
|
-
|
|
79
|
-
const BodyStyleInjector = createGlobalStyle `
|
|
67
|
+
`,v=a`
|
|
80
68
|
body {
|
|
81
69
|
overflow: hidden;
|
|
82
70
|
|
|
83
|
-
${typeof window
|
|
84
|
-
window.innerWidth > 1024 &&
|
|
85
|
-
`
|
|
71
|
+
${typeof window!="undefined"&&window.innerWidth>1024&&`
|
|
86
72
|
padding-right: 15px !important;
|
|
87
73
|
`}
|
|
88
74
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
`;
|
|
93
|
-
const Modal = ({ children, isOpen, contentStyles, withPortal = false, onClose, }) => {
|
|
94
|
-
useEffect(() => {
|
|
95
|
-
const handleKeyDown = (event) => {
|
|
96
|
-
if (event.key === 'Escape') {
|
|
97
|
-
if (isOpen) {
|
|
98
|
-
onClose();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
window.addEventListener('keydown', handleKeyDown);
|
|
103
|
-
return () => {
|
|
104
|
-
window.removeEventListener('keydown', handleKeyDown);
|
|
105
|
-
};
|
|
106
|
-
}, [onClose, isOpen]);
|
|
107
|
-
const Component = (jsx(CSSTransition, Object.assign({ in: isOpen, mountOnEnter: true, unmountOnExit: true, timeout: 400, classNames: "backgroundTransition" }, { children: jsxs(Fragment, { children: [jsx(Transitions, {}, void 0), jsxs(Container, { children: [jsx(Background, { "data-testid": "background", onClick: onClose }, void 0), jsxs(Content, Object.assign({ style: contentStyles }, { children: [jsx(CloseContainer, Object.assign({ onClick: onClose, "data-testid": "close" }, { children: jsx(Close, {}, void 0) }), void 0), children] }), void 0), jsx(BodyStyleInjector, {}, void 0)] }, void 0)] }, void 0) }), void 0));
|
|
108
|
-
return withPortal ? createPortal(Component, document.body) : Component;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export { Modal, Modal as default };
|
|
75
|
+
`,E=a`
|
|
76
|
+
${d}
|
|
77
|
+
`,s=({children:c,isOpen:o,contentStyles:l,withPortal:m=!1,onClose:e})=>{u(()=>{const r=p=>{p.key==="Escape"&&o&&e()};return window.addEventListener("keydown",r),()=>{window.removeEventListener("keydown",r)}},[e,o]);const i=t.createElement(x,{in:o,mountOnEnter:!0,unmountOnExit:!0,timeout:400,classNames:"backgroundTransition"},t.createElement(t.Fragment,null,t.createElement(E,null),t.createElement(f,null,t.createElement(w,{"data-testid":"background",onClick:e}),t.createElement(y,{style:l},t.createElement(k,{onClick:e,"data-testid":"close"},t.createElement(b,null)),c),t.createElement(v,null))));return m?g(i,document.body):i};export{s as Modal,s as default};
|
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { Badge } from '../Badge/index.js';
|
|
4
|
-
import { Button } from '../Button/index.js';
|
|
5
|
-
import '../../theme.js';
|
|
6
|
-
import '../Spinner/index.js';
|
|
7
|
-
import '../../typography/ButtonText/index.js';
|
|
8
|
-
|
|
9
|
-
const Container = styled.div `
|
|
1
|
+
import o from"react";import e from"styled-components";import{Badge as i}from"../Badge/index.js";import{Button as r}from"../Button/index.js";import"../../theme.js";import"../Spinner/index.js";import"../../typography/ButtonText/index.js";const d=e.div`
|
|
10
2
|
position: relative;
|
|
11
3
|
display: inline-block;
|
|
12
|
-
|
|
13
|
-
const StyledBadge = styled(Badge) `
|
|
4
|
+
`,a=e(i)`
|
|
14
5
|
position: absolute;
|
|
15
6
|
top: 0;
|
|
16
7
|
right: 0;
|
|
17
8
|
margin: -10px;
|
|
18
9
|
border: 2px solid white;
|
|
19
|
-
${
|
|
20
|
-
|
|
21
|
-
const NotificationButton = (props) => {
|
|
22
|
-
const count = props.badgeProps.notificationAmount || 0;
|
|
23
|
-
const noPadding = count < 10;
|
|
24
|
-
return (jsxs(Container, { children: [jsx(Button, Object.assign({}, props.buttonProps, { children: props.children }), void 0), jsx(StyledBadge, Object.assign({}, props.badgeProps, { noPadding: noPadding }), void 0)] }, void 0));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export { NotificationButton };
|
|
10
|
+
${t=>t.noPadding&&"padding: 0;"}
|
|
11
|
+
`,m=t=>{const n=(t.badgeProps.notificationAmount||0)<10;return o.createElement(d,null,o.createElement(r,{...t.buttonProps},t.children),o.createElement(a,{...t.badgeProps,noPadding:n}))};export{m as NotificationButton};
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CSSTransition } from 'react-transition-group';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
|
|
5
|
-
const defaultTransitionProps = {
|
|
6
|
-
classNames: 'backgroundTransition',
|
|
7
|
-
timeout: {
|
|
8
|
-
enter: 400,
|
|
9
|
-
exit: 400,
|
|
10
|
-
},
|
|
11
|
-
mountOnEnter: true,
|
|
12
|
-
unmountOnExit: true,
|
|
13
|
-
};
|
|
14
|
-
const Background = styled.div `
|
|
1
|
+
import n from"react";import{CSSTransition as a}from"react-transition-group";import c from"styled-components";const s={classNames:"backgroundTransition",timeout:{enter:400,exit:400},mountOnEnter:!0,unmountOnExit:!0},u=c.div`
|
|
15
2
|
position: fixed;
|
|
16
3
|
z-index: 1000;
|
|
17
4
|
width: 100%;
|
|
@@ -37,14 +24,4 @@ const Background = styled.div `
|
|
|
37
24
|
opacity: 0;
|
|
38
25
|
transition: opacity 0.2s ease-in-out;
|
|
39
26
|
}
|
|
40
|
-
|
|
41
|
-
const Overlay = ({ className, isOpen, onClick, transitionProps = defaultTransitionProps, }) => {
|
|
42
|
-
const handleClick = () => {
|
|
43
|
-
if (onClick) {
|
|
44
|
-
onClick();
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return (jsx(CSSTransition, Object.assign({ in: isOpen }, transitionProps, { className: className }, { children: jsx(Background, { onClick: handleClick }, void 0) }), void 0));
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export { Overlay as default };
|
|
27
|
+
`,d=({className:i,isOpen:o,onClick:t,transitionProps:e=s})=>{const r=()=>{t&&t()};return n.createElement(a,{in:o,...e,className:i},n.createElement(u,{onClick:r}))};export{d as default};
|
|
@@ -1,89 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { createPortal } from 'react-dom';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
import { CSSTransition } from 'react-transition-group';
|
|
6
|
-
import Overlay from './Overlay.js';
|
|
7
|
-
import { useOutsideClick } from './useClickOutside.js';
|
|
8
|
-
|
|
9
|
-
const defaultAnimationName = 'offCanvasAnimation';
|
|
10
|
-
const defaultTransitionProps = {
|
|
11
|
-
timeout: {
|
|
12
|
-
enter: 300,
|
|
13
|
-
exit: 300,
|
|
14
|
-
},
|
|
15
|
-
mountOnEnter: true,
|
|
16
|
-
unmountOnExit: true,
|
|
17
|
-
};
|
|
18
|
-
const Container = styled.div `
|
|
19
|
-
${({ animationName, animationDuration, width, from, backgroundColor, theme, }) => {
|
|
20
|
-
return `
|
|
1
|
+
import e,{useRef as p}from"react";import{createPortal as v}from"react-dom";import d from"styled-components";import{CSSTransition as x}from"react-transition-group";import E from"./Overlay.js";import{useOutsideClick as b}from"./useClickOutside.js";const y="offCanvasAnimation",C={timeout:{enter:300,exit:300},mountOnEnter:!0,unmountOnExit:!0},O=d.div`
|
|
2
|
+
${({animationName:t,animationDuration:s,width:r,from:n,backgroundColor:l,theme:o})=>`
|
|
21
3
|
position: fixed;
|
|
22
4
|
z-index: 1001;
|
|
23
5
|
width: 100%;
|
|
24
6
|
height: 100%;
|
|
25
7
|
top: 0;
|
|
26
|
-
${
|
|
27
|
-
background-color: ${
|
|
28
|
-
width: ${
|
|
8
|
+
${n==="left"?"left: 0;":"right: 0;"}
|
|
9
|
+
background-color: ${l||o.colors.background.light};
|
|
10
|
+
width: ${r};
|
|
29
11
|
box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.2);
|
|
30
12
|
|
|
31
13
|
|
|
32
|
-
&.${
|
|
33
|
-
transform: translate3d(${
|
|
14
|
+
&.${t}--right-enter {
|
|
15
|
+
transform: translate3d(${r}, 0, 0);
|
|
34
16
|
}
|
|
35
17
|
|
|
36
|
-
&.${
|
|
18
|
+
&.${t}--right-enter.${t}--right-enter-active {
|
|
37
19
|
transform: translate3d(0, 0, 0);
|
|
38
20
|
transition: transform 0.2s ease-in-out;
|
|
39
21
|
}
|
|
40
22
|
|
|
41
|
-
&.${
|
|
23
|
+
&.${t}--right-exit {
|
|
42
24
|
transform: translate3d(0, 0, 0);
|
|
43
25
|
}
|
|
44
26
|
|
|
45
|
-
&.${
|
|
46
|
-
transform: translate3d(${
|
|
27
|
+
&.${t}--right-exit.${t}--right-exit-active {
|
|
28
|
+
transform: translate3d(${r}, 0, 0);
|
|
47
29
|
transition: transform 0.2s ease-in-out;
|
|
48
30
|
}
|
|
49
31
|
|
|
50
|
-
&.${
|
|
51
|
-
transform: translate3d(-${
|
|
32
|
+
&.${t}--left-enter {
|
|
33
|
+
transform: translate3d(-${r}, 0, 0);
|
|
52
34
|
}
|
|
53
35
|
|
|
54
|
-
&.${
|
|
36
|
+
&.${t}--left-enter.${t}--left-enter-active {
|
|
55
37
|
transform: translate3d(0, 0, 0);
|
|
56
38
|
transition: transform 0.2s ease-in-out;
|
|
57
39
|
}
|
|
58
40
|
|
|
59
|
-
&.${
|
|
41
|
+
&.${t}--left-exit {
|
|
60
42
|
transform: translate3d(0, 0, 0);
|
|
61
43
|
}
|
|
62
44
|
|
|
63
|
-
&.${
|
|
64
|
-
transform: translate3d(-${
|
|
65
|
-
transition: transform ${
|
|
45
|
+
&.${t}--left-exit.${t}--left-exit-active {
|
|
46
|
+
transform: translate3d(-${r}, 0, 0);
|
|
47
|
+
transition: transform ${s}ms ease-in-out;
|
|
66
48
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
`;
|
|
70
|
-
const Contents = styled.div `
|
|
49
|
+
`}
|
|
50
|
+
`,w=d.div`
|
|
71
51
|
position: relative;
|
|
72
52
|
width: 100%;
|
|
73
53
|
height: 100%;
|
|
74
54
|
overflow-x: hidden;
|
|
75
55
|
overflow-y: auto;
|
|
76
56
|
-webkit-overflow-scrolling: touch;
|
|
77
|
-
|
|
78
|
-
const OffCanvas = ({ animationName = defaultAnimationName, animationDuration = 300, backgroundColor, backgroundOverlay, children, from = 'right', isOpen, onClickOutside, width = '375px', withPortal, transitionProps, }) => {
|
|
79
|
-
const contentRef = useRef(null);
|
|
80
|
-
useOutsideClick(contentRef, () => onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside());
|
|
81
|
-
if (backgroundOverlay && !onClickOutside) {
|
|
82
|
-
console.error('Please provide a clickOutside handler when using backgroundOverlay option in OffCanvas component');
|
|
83
|
-
}
|
|
84
|
-
const className = `${animationName}--${from}`;
|
|
85
|
-
const component = (jsxs(Fragment, { children: [backgroundOverlay && jsx(Overlay, { isOpen: isOpen }, void 0), jsx(Fragment, { children: jsx(CSSTransition, Object.assign({ in: isOpen, className: `${animationName} ${className}`, classNames: className }, defaultTransitionProps, transitionProps, { children: jsx(Container, Object.assign({ ref: contentRef, animationName: animationName, animationDuration: animationDuration, backgroundColor: backgroundColor, from: from, width: width }, { children: jsx(Contents, Object.assign({ className: `${animationName}-content` }, { children: children }), void 0) }), void 0) }), void 0) }, void 0)] }, void 0));
|
|
86
|
-
return withPortal ? createPortal(component, document.body) : component;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export { OffCanvas, OffCanvas as default };
|
|
57
|
+
`,$=({animationName:t=y,animationDuration:s=300,backgroundColor:r,backgroundOverlay:n,children:l,from:o="right",isOpen:i,onClickOutside:a,width:m="375px",withPortal:g,transitionProps:h})=>{const f=p(null);b(f,()=>a==null?void 0:a()),n&&!a&&console.error("Please provide a clickOutside handler when using backgroundOverlay option in OffCanvas component");const c=`${t}--${o}`,u=e.createElement(e.Fragment,null,n&&e.createElement(E,{isOpen:i}),e.createElement(e.Fragment,null,e.createElement(x,{in:i,className:`${t} ${c}`,classNames:c,...C,...h},e.createElement(O,{ref:f,animationName:t,animationDuration:s,backgroundColor:r,from:o,width:m},e.createElement(w,{className:`${t}-content`},l)))));return g?v(u,document.body):u};export{$ as OffCanvas,$ as default};
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const useOutsideClick = (ref, callback) => {
|
|
4
|
-
const handleClick = useCallback((event) => {
|
|
5
|
-
if (ref.current && !ref.current.contains(event.target)) {
|
|
6
|
-
callback();
|
|
7
|
-
}
|
|
8
|
-
}, [callback, ref]);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
document.addEventListener('mousedown', handleClick);
|
|
11
|
-
return () => {
|
|
12
|
-
document.removeEventListener('mousedown', handleClick);
|
|
13
|
-
};
|
|
14
|
-
}, [handleClick]);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { useOutsideClick };
|
|
1
|
+
import{useCallback as r,useEffect as s}from"react";const u=(e,n)=>{const t=r(o=>{e.current&&!e.current.contains(o.target)&&n()},[n,e]);s(()=>(document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}),[t])};export{u as useOutsideClick};
|
|
@@ -1,10 +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
|
-
|
|
7
|
-
const regularSize = css `
|
|
1
|
+
import t from"react";import i,{css as o}from"styled-components";import{generateNameHash as g}from"../../shared/helpers.js";import r from"../../theme.js";import h from"../IconButton.js";const m=o`
|
|
8
2
|
.circle {
|
|
9
3
|
&--outer {
|
|
10
4
|
height: 24px;
|
|
@@ -17,8 +11,7 @@ const regularSize = css `
|
|
|
17
11
|
transform: scale(0.6);
|
|
18
12
|
}
|
|
19
13
|
}
|
|
20
|
-
|
|
21
|
-
const largeSize = css `
|
|
14
|
+
`,p=o`
|
|
22
15
|
.circle {
|
|
23
16
|
&--outer {
|
|
24
17
|
height: 32px;
|
|
@@ -31,79 +24,65 @@ const largeSize = css `
|
|
|
31
24
|
transform: scale(0.6);
|
|
32
25
|
}
|
|
33
26
|
}
|
|
34
|
-
|
|
35
|
-
const sizes = {
|
|
36
|
-
regular: regularSize,
|
|
37
|
-
large: largeSize,
|
|
38
|
-
};
|
|
39
|
-
const disabledStyle = css `
|
|
27
|
+
`,b={regular:m,large:p},y=o`
|
|
40
28
|
cursor: default;
|
|
41
29
|
|
|
42
30
|
.circle {
|
|
43
31
|
&--inner {
|
|
44
|
-
background-color: ${
|
|
32
|
+
background-color: ${r.colors.gray.light1};
|
|
45
33
|
}
|
|
46
34
|
|
|
47
35
|
&--outer {
|
|
48
|
-
border: 2px solid ${
|
|
36
|
+
border: 2px solid ${r.colors.gray.light1};
|
|
49
37
|
}
|
|
50
38
|
}
|
|
51
|
-
|
|
52
|
-
const checkedDisabledStyle = css `
|
|
39
|
+
`,f=o`
|
|
53
40
|
.circle {
|
|
54
41
|
&--inner {
|
|
55
42
|
opacity: 1;
|
|
56
|
-
background-color: ${
|
|
43
|
+
background-color: ${r.colors.gray.light1};
|
|
57
44
|
}
|
|
58
45
|
}
|
|
59
|
-
|
|
60
|
-
const checkedStyle = (color) => css `
|
|
46
|
+
`,x=e=>o`
|
|
61
47
|
.circle {
|
|
62
48
|
&--inner {
|
|
63
49
|
opacity: 1;
|
|
64
|
-
background-color: ${
|
|
50
|
+
background-color: ${r.colors[e].main};
|
|
65
51
|
}
|
|
66
52
|
|
|
67
53
|
&--outer {
|
|
68
|
-
border: 2px solid ${
|
|
54
|
+
border: 2px solid ${r.colors[e].main};
|
|
69
55
|
}
|
|
70
56
|
}
|
|
71
|
-
|
|
72
|
-
const RadioButtonWrapper = styled.label `
|
|
57
|
+
`,$=i.label`
|
|
73
58
|
cursor: pointer;
|
|
74
59
|
display: flex;
|
|
75
60
|
position: relative;
|
|
76
61
|
align-items: center;
|
|
77
62
|
justify-content: center;
|
|
78
63
|
|
|
79
|
-
${
|
|
64
|
+
${e=>b[e.size]};
|
|
80
65
|
|
|
81
|
-
${
|
|
82
|
-
${
|
|
66
|
+
${e=>!e.isDisabled&&e.isChecked&&x(e.color)};
|
|
67
|
+
${e=>e.isDisabled&&y};
|
|
83
68
|
|
|
84
|
-
${
|
|
85
|
-
|
|
86
|
-
const HiddenRadioButton = styled.input `
|
|
69
|
+
${e=>e.isChecked&&e.isDisabled&&f};
|
|
70
|
+
`,k=i.input`
|
|
87
71
|
display: none;
|
|
88
|
-
|
|
89
|
-
const OuterCircle = styled.span `
|
|
72
|
+
`,z=i.span`
|
|
90
73
|
display: flex;
|
|
91
74
|
box-sizing: border-box;
|
|
92
75
|
border-radius: 50%;
|
|
93
76
|
|
|
94
|
-
border: 2px solid ${
|
|
95
|
-
|
|
96
|
-
const InnerCircle = styled.span `
|
|
77
|
+
border: 2px solid ${r.colors.gray.light1};
|
|
78
|
+
`,B=i.span`
|
|
97
79
|
box-sizing: border-box;
|
|
98
80
|
opacity: 0;
|
|
99
81
|
margin: auto;
|
|
100
82
|
border-radius: 50%;
|
|
101
|
-
background-color: ${
|
|
83
|
+
background-color: ${r.colors.gray.light1};
|
|
102
84
|
|
|
103
85
|
position: absolute;
|
|
104
86
|
top: 0;
|
|
105
87
|
left: 0;
|
|
106
|
-
|
|
107
|
-
const RadioButton = ({ name = generateNameHash('radio-button'), size = 'regular', checked = false, isDisabled = false, color = 'secondary', onChange, ...props }) => (jsxs(IconButton, Object.assign({ onClick: onChange, isActive: checked, isDisabled: isDisabled, color: color }, { children: [jsx(HiddenRadioButton, Object.assign({ "data-validate": "checked", type: "radio", name: name, id: name, onChange: onChange, disabled: isDisabled }, props), void 0), jsx(RadioButtonWrapper, Object.assign({ htmlFor: name, size: size, color: color, isChecked: checked, isDisabled: isDisabled }, { children: jsx(OuterCircle, Object.assign({ className: "circle circle--outer" }, { children: jsx(InnerCircle, { className: "circle circle--inner" }, void 0) }), void 0) }), void 0)] }), void 0));
|
|
108
|
-
|
|
109
|
-
export { RadioButton, RadioButton as default };
|
|
88
|
+
`,n=({name:e=g("radio-button"),size:d="regular",checked:l=!1,isDisabled:c=!1,color:a="secondary",onChange:s,...u})=>t.createElement(h,{onClick:s,isActive:l,isDisabled:c,color:a},t.createElement(k,{"data-validate":"checked",type:"radio",name:e,id:e,onChange:s,disabled:c,...u}),t.createElement($,{htmlFor:e,size:d,color:a,isChecked:l,isDisabled:c},t.createElement(z,{className:"circle circle--outer"},t.createElement(B,{className:"circle circle--inner"}))));export{n as RadioButton,n as default};
|
|
@@ -1,36 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import theme from '../../theme.js';
|
|
4
|
-
import { CaptionLink } from '../../typography/BodyText/index.js';
|
|
5
|
-
import { Display1 } from '../../typography/Heading/index.js';
|
|
6
|
-
import '../../shared/media-queries.js';
|
|
7
|
-
|
|
8
|
-
const Container = styled.div `
|
|
1
|
+
import t from"react";import n from"styled-components";import i from"../../theme.js";import{CaptionLink as p}from"../../typography/BodyText/index.js";import{Display1 as m}from"../../typography/Heading/index.js";import"../../shared/media-queries.js";const c=n.div`
|
|
9
2
|
display: flex;
|
|
10
3
|
position: relative;
|
|
11
4
|
flex-direction: column;
|
|
12
5
|
align-items: center;
|
|
13
|
-
|
|
14
|
-
const RangeWrapper = styled.div `
|
|
6
|
+
`,d=n.div`
|
|
15
7
|
display: flex;
|
|
16
8
|
position: relative;
|
|
17
9
|
width: 100%;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
color: ${({ color }) => theme.colors[color].main};
|
|
10
|
+
`,g=n(m)`
|
|
11
|
+
color: ${({color:e})=>i.colors[e].main};
|
|
21
12
|
line-height: 1;
|
|
22
13
|
margin-top: 0;
|
|
23
14
|
margin-bottom: 0;
|
|
24
|
-
|
|
25
|
-
const Value = styled(CaptionLink) `
|
|
15
|
+
`,a=n(p)`
|
|
26
16
|
flex: 1;
|
|
27
|
-
color: ${
|
|
17
|
+
color: ${i.colors.gray.light1};
|
|
28
18
|
line-height: 1.2;
|
|
29
19
|
position: relative;
|
|
30
20
|
text-align: center;
|
|
31
21
|
&:before {
|
|
32
22
|
content: '';
|
|
33
|
-
background: ${({
|
|
23
|
+
background: ${({color:e})=>i.colors[e].main};
|
|
34
24
|
margin: 0 auto 2px;
|
|
35
25
|
display: flex;
|
|
36
26
|
justify-content: center;
|
|
@@ -40,21 +30,15 @@ const Value = styled(CaptionLink) `
|
|
|
40
30
|
position: relative;
|
|
41
31
|
width: 2px;
|
|
42
32
|
}
|
|
43
|
-
|
|
44
|
-
const MinValue = styled(Value) `
|
|
33
|
+
`,f=n(a)`
|
|
45
34
|
&:after {
|
|
46
35
|
content: '';
|
|
47
36
|
position: absolute;
|
|
48
37
|
width: 100%;
|
|
49
38
|
height: 4px;
|
|
50
|
-
background: ${({
|
|
39
|
+
background: ${({color:e})=>i.colors[e].main};
|
|
51
40
|
top: 40px;
|
|
52
41
|
left: 50%;
|
|
53
42
|
transform: translate(0, -50%);
|
|
54
43
|
}
|
|
55
|
-
|
|
56
|
-
const Range = ({ displayValue, maxValue, minValue, color = 'primary', }) => {
|
|
57
|
-
return (jsxs(Container, { children: [displayValue && (jsx(DisplayValue, Object.assign({ as: "span", color: color }, { children: displayValue }), void 0)), jsxs(RangeWrapper, { children: [jsx(MinValue, Object.assign({ as: "span", color: color }, { children: minValue }), void 0), jsx(Value, Object.assign({ as: "span", color: color }, { children: maxValue }), void 0)] }, void 0)] }, void 0));
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export { Range, Range as default };
|
|
44
|
+
`,r=({displayValue:e,maxValue:l,minValue:s,color:o="primary"})=>t.createElement(c,null,e&&t.createElement(g,{as:"span",color:o},e),t.createElement(d,null,t.createElement(f,{as:"span",color:o},s),t.createElement(a,{as:"span",color:o},l)));export{r as Range,r as default};
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const TestIcon = () => (jsx("svg", Object.assign({ viewBox: "0 0 896.003 896.004", height: "18px", width: "18px", y: "0px", x: "0px", xmlns: "http://www.w3.org/2000/svg" }, { children: jsx("path", { d: "M850.321,663.513C774.05,802.057,626.63,896.004,457.168,896.004c-247.688,0-448.478-200.578-448.478-448.002 S209.479,0,457.168,0c203.805,0,375.577,135.92,430.145,321.882L428.365,478.82L850.321,663.513z M614.342,318.945 c43.631,0,78.998-35.7,78.998-79.736c0-44.039-35.367-79.735-78.998-79.735c-43.63,0-78.999,35.696-78.999,79.735 C535.343,283.245,570.712,318.945,614.342,318.945" }, void 0) }), void 0));
|
|
4
|
-
|
|
5
|
-
export { TestIcon };
|
|
1
|
+
import t from"react";const e=()=>t.createElement("svg",{viewBox:"0 0 896.003 896.004",height:"18px",width:"18px",y:"0px",x:"0px",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M850.321,663.513C774.05,802.057,626.63,896.004,457.168,896.004c-247.688,0-448.478-200.578-448.478-448.002 S209.479,0,457.168,0c203.805,0,375.577,135.92,430.145,321.882L428.365,478.82L850.321,663.513z M614.342,318.945 c43.631,0,78.998-35.7,78.998-79.736c0-44.039-35.367-79.735-78.998-79.735c-43.63,0-78.999,35.696-78.999,79.735 C535.343,283.245,570.712,318.945,614.342,318.945"}));export{e as TestIcon};
|