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