@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
package/cjs/ColorCard.js
CHANGED
|
@@ -1,46 +1,25 @@
|
|
|
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 utils_utils = require('./utils/utils.js');
|
|
8
|
-
var theme = require('./theme.js');
|
|
9
|
-
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
13
|
-
|
|
14
|
-
const SubList = styled__default['default'].ul `
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("styled-components"),l=require("./utils/utils.js"),a=require("./theme.js");function r(m){return m&&typeof m=="object"&&"default"in m?m:{default:m}}var d=r(e),n=r(t);const u=n.default.ul`
|
|
15
2
|
padding-left: 2rem;
|
|
16
|
-
|
|
17
|
-
const ColorItem = styled__default['default'].li `
|
|
3
|
+
`,i=n.default.li`
|
|
18
4
|
list-style: none;
|
|
19
5
|
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.03);
|
|
20
|
-
border: 1px solid ${
|
|
6
|
+
border: 1px solid ${a.default.colors.gray.light2};
|
|
21
7
|
border-radius: 4px;
|
|
22
8
|
font-family: 'Ralway', sans-serif;
|
|
23
9
|
margin-top: 0.75rem;
|
|
24
|
-
|
|
25
|
-
const Header = styled__default['default'].span `
|
|
10
|
+
`,o=n.default.span`
|
|
26
11
|
text-transform: capitalize;
|
|
27
12
|
padding: 0.5em;
|
|
28
13
|
display: block;
|
|
29
|
-
border-bottom: 1px solid ${
|
|
30
|
-
|
|
31
|
-
const Color = styled__default['default'].li `
|
|
14
|
+
border-bottom: 1px solid ${a.default.colors.gray.light2};
|
|
15
|
+
`,f=n.default.li`
|
|
32
16
|
display: block;
|
|
33
|
-
background: ${({
|
|
34
|
-
color: ${({
|
|
17
|
+
background: ${({hex:m})=>m};
|
|
18
|
+
color: ${({hex:m})=>l.getLuminosity(m)<40?"#fff":"#000"};
|
|
35
19
|
padding: 1em;
|
|
36
|
-
|
|
37
|
-
const SwatchArea = styled__default['default'].ul `
|
|
20
|
+
`,s=n.default.ul`
|
|
38
21
|
margin: 0;
|
|
39
22
|
padding: 0;
|
|
40
23
|
display: flex;
|
|
41
24
|
flex-direction: column;
|
|
42
|
-
|
|
43
|
-
const getColor = variants => Object.entries(variants).map(([name, hex]) => typeof hex === 'string' ? (jsxRuntime.jsxs(Color, Object.assign({ hex: hex }, { children: [name, " (", hex, ")"] }), hex)) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Header, { children: name }, void 0), jsxRuntime.jsx(SubList, { children: getColor(hex) }, void 0)] }, void 0)));
|
|
44
|
-
const ColorCard = ({ colorName, variants }) => (jsxRuntime.jsxs(ColorItem, { children: [jsxRuntime.jsx(Header, { children: colorName }, void 0), jsxRuntime.jsx(SwatchArea, { children: getColor(variants) }, void 0)] }, void 0));
|
|
45
|
-
|
|
46
|
-
exports['default'] = ColorCard;
|
|
25
|
+
`,c=m=>Object.entries(m).map(([g,p])=>typeof p=="string"?d.default.createElement(f,{hex:p,key:p},g," (",p,")"):d.default.createElement(d.default.Fragment,null,d.default.createElement(o,null,g),d.default.createElement(u,null,c(p))));exports.default=({colorName:m,variants:g})=>d.default.createElement(i,null,d.default.createElement(o,null,m),d.default.createElement(s,null,c(g)));
|
package/cjs/ElevationCard.js
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var styled = require('styled-components');
|
|
7
|
-
|
|
8
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
-
|
|
10
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
-
|
|
12
|
-
const Card = styled__default['default'].div `
|
|
13
|
-
font-family: ${({ theme }) => theme.typography.fontAlternativeFamily};
|
|
14
|
-
font-weight: ${({ theme }) => theme.typography.fontAlternativeRegularWeight};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("styled-components");function r(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var a=r(e);const i=r(t).default.div`
|
|
2
|
+
font-family: ${({theme:n})=>n.typography.fontAlternativeFamily};
|
|
3
|
+
font-weight: ${({theme:n})=>n.typography.fontAlternativeRegularWeight};
|
|
15
4
|
font-size: 1.25rem;
|
|
16
|
-
box-shadow: ${({
|
|
5
|
+
box-shadow: ${({elevation:n})=>n};
|
|
17
6
|
width: 14rem;
|
|
18
7
|
height: 10rem;
|
|
19
8
|
margin: 1rem;
|
|
@@ -21,9 +10,4 @@ const Card = styled__default['default'].div `
|
|
|
21
10
|
display: flex;
|
|
22
11
|
align-items: center;
|
|
23
12
|
justify-content: center;
|
|
24
|
-
`;
|
|
25
|
-
const ElevationCard = ({ children, value, as = 'div', }) => {
|
|
26
|
-
return (jsxRuntime.jsx(Card, Object.assign({ as: as, elevation: value }, { children: children }), void 0));
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
exports.ElevationCard = ElevationCard;
|
|
13
|
+
`;exports.ElevationCard=({children:n,value:o,as:l="div"})=>a.default.createElement(i,{as:l,elevation:o},n);
|
package/cjs/Interfaces.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
package/cjs/Types.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
@@ -1,95 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var react = require('react');
|
|
7
|
-
var styled = require('styled-components');
|
|
8
|
-
var reactCollapse = require('react-collapse');
|
|
9
|
-
var shared_mediaQueries = require('../../shared/media-queries.js');
|
|
10
|
-
var icons_components_ArrowDownIcon = require('../../icons/components/ArrowDownIcon.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("react-collapse"),o=require("../../shared/media-queries.js"),r=require("../../icons/components/ArrowDownIcon.js");function n(g){return g&&typeof g=="object"&&"default"in g?g:{default:g}}var l=n(e),i=n(t);const s=i.default.div`
|
|
17
2
|
display: flex;
|
|
18
3
|
flex-direction: column;
|
|
19
4
|
.ReactCollapse--collapse {
|
|
20
5
|
transition: height 300ms;
|
|
21
6
|
}
|
|
22
|
-
|
|
23
|
-
const List = styled__default['default'].ul `
|
|
7
|
+
`,d=i.default.ul`
|
|
24
8
|
margin: 0;
|
|
25
9
|
padding: 0;
|
|
26
10
|
list-style: none;
|
|
27
|
-
|
|
28
|
-
const Title = styled__default['default'].div `
|
|
11
|
+
`,c=i.default.div`
|
|
29
12
|
display: flex;
|
|
30
13
|
flex-direction: row;
|
|
31
14
|
justify-content: space-between;
|
|
32
15
|
cursor: pointer;
|
|
33
16
|
margin: 0.5rem 0;
|
|
34
|
-
|
|
35
|
-
const Arrow = styled__default['default'].div `
|
|
17
|
+
`,m=i.default.div`
|
|
36
18
|
display: flex;
|
|
37
19
|
justify-content: center;
|
|
38
20
|
align-items: center;
|
|
39
21
|
font-size: 0.75rem;
|
|
40
|
-
color: ${({
|
|
22
|
+
color: ${({theme:g})=>g.colors.text.dark};
|
|
41
23
|
transition: 200ms ease-in-out;
|
|
42
|
-
transform: ${({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
padding: ${({ isOpen }) => (isOpen ? '0.5rem 0 1rem 0' : '0.5rem 0')};
|
|
24
|
+
transform: ${({isOpen:g})=>`rotate(${g?"180deg":"0deg"})`};
|
|
25
|
+
`,u=i.default.li`
|
|
26
|
+
border-top: ${({theme:g})=>`1px solid ${g.colors.gray.light2}`};
|
|
27
|
+
padding: ${({isOpen:g})=>g?"0.5rem 0 1rem 0":"0.5rem 0"};
|
|
47
28
|
|
|
48
29
|
&:last-child {
|
|
49
|
-
border-bottom: ${({
|
|
30
|
+
border-bottom: ${({theme:g})=>`1px solid ${g.colors.gray.light2}`};
|
|
50
31
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
font-family: ${({ theme }) => theme.typography.fontBaseFamily};
|
|
32
|
+
`,f=i.default.span`
|
|
33
|
+
color: ${({theme:g})=>g.colors.text.dark};
|
|
34
|
+
font-family: ${({theme:g})=>g.typography.fontBaseFamily};
|
|
55
35
|
font-size: 0.9375rem;
|
|
56
|
-
font-weight: ${({
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
color: ${({ theme }) => theme.colors.text.dark};
|
|
36
|
+
font-weight: ${({theme:g})=>g.typography.fontBaseBoldWeight};
|
|
37
|
+
`,p=i.default.div`
|
|
38
|
+
font-family: ${({theme:g})=>g.typography.fontBaseFamily};
|
|
39
|
+
color: ${({theme:g})=>g.colors.text.dark};
|
|
61
40
|
font-size: 0.9375rem;
|
|
62
|
-
font-weight: ${({
|
|
41
|
+
font-weight: ${({theme:g})=>g.typography.fontBaseRegularWeight};
|
|
63
42
|
line-height: 1.3;
|
|
64
43
|
transition: 200ms ease-in-out;
|
|
65
|
-
${
|
|
44
|
+
${o.mq("tablet")} {
|
|
66
45
|
padding: 0;
|
|
67
46
|
}
|
|
68
47
|
& > * {
|
|
69
48
|
margin-top: 0;
|
|
70
49
|
margin-bottom: 0;
|
|
71
50
|
}
|
|
72
|
-
|
|
73
|
-
const Accordion = ({ items, ...props }) => {
|
|
74
|
-
const [isOpened, setIsOpened] = react.useState({});
|
|
75
|
-
const toggleIsOpened = (index) => {
|
|
76
|
-
setIsOpened(prevState => ({ ...prevState, [index]: !prevState[index] }));
|
|
77
|
-
};
|
|
78
|
-
const onClick = (index) => () => {
|
|
79
|
-
toggleIsOpened(index);
|
|
80
|
-
};
|
|
81
|
-
const onKeyPress = (index) => (e) => {
|
|
82
|
-
if (e.key === 'Enter') {
|
|
83
|
-
toggleIsOpened(index);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
return (jsxRuntime.jsx(Container, Object.assign({}, props, { children: jsxRuntime.jsx(List, Object.assign({ className: "accordionList" }, { children: items.map((item, index) => {
|
|
87
|
-
const isOpen = Boolean(isOpened[index]);
|
|
88
|
-
return (jsxRuntime.jsxs(Item, Object.assign({ isOpen: isOpen, className: "accordionItem" }, { children: [jsxRuntime.jsxs(Title, Object.assign({ onClick: onClick(index), onKeyPress: onKeyPress(index), className: "accordionItemTitle", role: "button", tabIndex: 0, "aria-expanded": isOpen, id: `panel${index}-header`, "aria-controls": `panel${index}-content` }, { children: [jsxRuntime.jsx(Text, Object.assign({ as: "span" }, { children: item.title }), void 0), jsxRuntime.jsx(Arrow, Object.assign({ isOpen: isOpen }, { children: jsxRuntime.jsx(icons_components_ArrowDownIcon['default'], {}, void 0) }), void 0)] }), void 0), jsxRuntime.jsx(reactCollapse.UnmountClosed, Object.assign({ isOpened: isOpen }, { children: jsxRuntime.jsx(Content, { "aria-labelledby": `panel${index}-header`, id: `panel${index}-content`, role: "region", className: "wysiwyg", dangerouslySetInnerHTML: {
|
|
89
|
-
__html: item.text,
|
|
90
|
-
} }, void 0) }), index)] }), item.title));
|
|
91
|
-
}) }), void 0) }), void 0));
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
exports.Accordion = Accordion;
|
|
95
|
-
exports['default'] = Accordion;
|
|
51
|
+
`,y=({items:g,...E})=>{const[w,k]=e.useState({}),b=$=>{k(h=>({...h,[$]:!h[$]}))},q=$=>()=>{b($)},v=$=>h=>{h.key==="Enter"&&b($)};return l.default.createElement(s,{...E},l.default.createElement(d,{className:"accordionList"},g.map(($,h)=>{const x=Boolean(w[h]);return l.default.createElement(u,{key:$.title,isOpen:x,className:"accordionItem"},l.default.createElement(c,{onClick:q(h),onKeyPress:v(h),className:"accordionItemTitle",role:"button",tabIndex:0,"aria-expanded":x,id:`panel${h}-header`,"aria-controls":`panel${h}-content`},l.default.createElement(f,{as:"span"},$.title),l.default.createElement(m,{isOpen:x},l.default.createElement(r.default,null))),l.default.createElement(a.UnmountClosed,{isOpened:x,key:h},l.default.createElement(p,{"aria-labelledby":`panel${h}-header`,id:`panel${h}-content`,role:"region",className:"wysiwyg",dangerouslySetInnerHTML:{__html:$.text}})))})))};exports.Accordion=y,exports.default=y;
|
|
@@ -1,18 +1,6 @@
|
|
|
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 BadgeContainer = styled__default['default'].div `
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("styled-components"),r=require("../../theme.js");function i(f){return f&&typeof f=="object"&&"default"in f?f:{default:f}}var a=i(e),o=i(t);const n=o.default.div`
|
|
14
2
|
border-radius: 0.75rem;
|
|
15
|
-
background: ${
|
|
3
|
+
background: ${r.default.colors.secondary.main};
|
|
16
4
|
display: inline-flex;
|
|
17
5
|
align-items: center;
|
|
18
6
|
justify-content: center;
|
|
@@ -21,49 +9,27 @@ const BadgeContainer = styled__default['default'].div `
|
|
|
21
9
|
height: 1.5rem;
|
|
22
10
|
box-sizing: border-box;
|
|
23
11
|
cursor: default;
|
|
24
|
-
|
|
25
|
-
const SmallBadgeContainer = styled__default['default'](BadgeContainer) `
|
|
12
|
+
`,l=o.default(n)`
|
|
26
13
|
width: 1rem;
|
|
27
14
|
height: 1rem;
|
|
28
15
|
border-radius: 50%;
|
|
29
16
|
min-width: 1rem;
|
|
30
17
|
position: relative;
|
|
31
|
-
|
|
32
|
-
const MiddleDot = styled__default['default'].div `
|
|
18
|
+
`,d=o.default.div`
|
|
33
19
|
display: block;
|
|
34
20
|
width: 100%;
|
|
35
21
|
height: 100%;
|
|
36
22
|
border-radius: 50%;
|
|
37
23
|
opacity: 0.1;
|
|
38
24
|
transform: scale(0.5);
|
|
39
|
-
background: ${
|
|
25
|
+
background: ${r.default.colors.text.dark};
|
|
40
26
|
position: absolute;
|
|
41
27
|
top: 0;
|
|
42
28
|
left: 0;
|
|
43
|
-
|
|
44
|
-
const Label = styled__default['default'].span `
|
|
29
|
+
`,u=o.default.span`
|
|
45
30
|
font-size: 0.75rem;
|
|
46
31
|
line-height: 0.75rem;
|
|
47
32
|
color: white;
|
|
48
|
-
font-weight: ${({
|
|
49
|
-
font-family: ${({
|
|
50
|
-
|
|
51
|
-
const numberToLabel = (notificationAmount) => {
|
|
52
|
-
if (notificationAmount >= 100) {
|
|
53
|
-
return '99+';
|
|
54
|
-
}
|
|
55
|
-
return `${notificationAmount}`;
|
|
56
|
-
};
|
|
57
|
-
const Badge = ({ notificationAmount = 0, withNumber = true, ...rest }) => {
|
|
58
|
-
if ((notificationAmount <= 0 || !notificationAmount) && withNumber) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
if (!withNumber) {
|
|
62
|
-
return (jsxRuntime.jsx(SmallBadgeContainer, Object.assign({}, rest, { children: jsxRuntime.jsx(MiddleDot, { "data-test": "middle-dot" }, void 0) }), void 0));
|
|
63
|
-
}
|
|
64
|
-
const label = numberToLabel(notificationAmount);
|
|
65
|
-
return (jsxRuntime.jsx(BadgeContainer, Object.assign({}, rest, { children: jsxRuntime.jsx(Label, { children: label }, void 0) }), void 0));
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
exports.Badge = Badge;
|
|
69
|
-
exports['default'] = Badge;
|
|
33
|
+
font-weight: ${({theme:f})=>f.typography.fontAlternativeBoldWeight};
|
|
34
|
+
font-family: ${({theme:f})=>f.typography.fontAlternativeFamily};
|
|
35
|
+
`,s=({notificationAmount:f=0,withNumber:m=!0,...c})=>{if((f<=0||!f)&&m)return null;if(!m)return a.default.createElement(l,{...c},a.default.createElement(d,{"data-test":"middle-dot"}));const p=(h=>h>=100?"99+":`${h}`)(f);return a.default.createElement(n,{...c},a.default.createElement(u,null,p))};exports.Badge=s,exports.default=s;
|
|
@@ -1,165 +1,100 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
-
|
|
13
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react"),o=require("styled-components"),n=require("../../theme.js"),e=require("../Spinner/index.js"),l=require("../../typography/ButtonText/index.js");function t(x){return x&&typeof x=="object"&&"default"in x?x:{default:x}}var a=t(r),c=t(o);const s=c.default.button`
|
|
2
|
+
outline: none;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
user-select: none;
|
|
5
|
+
position: relative;
|
|
6
|
+
white-space: nowrap;
|
|
7
|
+
border: 2px solid transparent;
|
|
8
|
+
border-radius: 3px;
|
|
9
|
+
width: ${({fullWidth:x})=>x&&"100%"};
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
switch (size) {
|
|
20
|
-
case 'smaller':
|
|
21
|
-
return typography_ButtonText_index.ButtonSmallTextStyle;
|
|
22
|
-
case 'small':
|
|
23
|
-
return typography_ButtonText_index.ButtonRegularTextStyle;
|
|
24
|
-
case 'regular':
|
|
25
|
-
return typography_ButtonText_index.ButtonRegularTextStyle;
|
|
26
|
-
case 'large':
|
|
27
|
-
return typography_ButtonText_index.ButtonLargeTextStyle;
|
|
28
|
-
default:
|
|
29
|
-
return typography_ButtonText_index.ButtonRegularTextStyle;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
/****************************************************************************/
|
|
33
|
-
/* Size styles */
|
|
34
|
-
/****************************************************************************/
|
|
35
|
-
const smallerSizeStyles = (isLoading) => `
|
|
11
|
+
${l.BasicButtonTextStyle}
|
|
12
|
+
${({size:x})=>(h=>{switch(h){case"smaller":return l.ButtonSmallTextStyle;case"small":case"regular":return l.ButtonRegularTextStyle;case"large":return l.ButtonLargeTextStyle;default:return l.ButtonRegularTextStyle}})(x)}
|
|
13
|
+
${({size:x,isLoading:h})=>o.css`
|
|
14
|
+
${x==="smaller"&&($=>`
|
|
36
15
|
min-width: 76px;
|
|
37
|
-
padding: ${
|
|
38
|
-
|
|
39
|
-
|
|
16
|
+
padding: ${$?"7px 10px 5.5px":"10px 10px 8px"};
|
|
17
|
+
`)(h)}
|
|
18
|
+
${x==="small"&&($=>`
|
|
40
19
|
min-width: 76px;
|
|
41
|
-
padding: ${
|
|
42
|
-
|
|
43
|
-
|
|
20
|
+
padding: ${$?"8px 10px 6px":"11px 10px 9px"};
|
|
21
|
+
`)(h)}
|
|
22
|
+
${x==="regular"&&($=>`
|
|
44
23
|
min-width: 250px;
|
|
45
|
-
padding: ${
|
|
46
|
-
|
|
47
|
-
|
|
24
|
+
padding: ${$?"7px 22px 5px":"15px 22px 13px"};
|
|
25
|
+
`)(h)}
|
|
26
|
+
${x==="large"&&($=>`
|
|
48
27
|
min-width: 250px;
|
|
49
|
-
padding: ${
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
28
|
+
padding: ${$?"9px 22px 6px":"21px 22px 19px"};
|
|
29
|
+
`)(h)}
|
|
30
|
+
`}
|
|
31
|
+
background-color: transparent;
|
|
32
|
+
transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
|
|
33
|
+
${({variant:x,color:h,disabled:$,theme:b})=>o.css`
|
|
34
|
+
${!$&&x==="solid"&&(u=>g=>`
|
|
55
35
|
color: white;
|
|
56
|
-
border-color: ${
|
|
57
|
-
background-color: ${
|
|
36
|
+
border-color: ${u.colors[g].main};
|
|
37
|
+
background-color: ${u.colors[g].main};
|
|
58
38
|
|
|
59
39
|
:hover {
|
|
60
|
-
border-color: ${
|
|
61
|
-
background-color: ${
|
|
40
|
+
border-color: ${u.colors[g].light};
|
|
41
|
+
background-color: ${u.colors[g].light};
|
|
62
42
|
}
|
|
63
43
|
|
|
64
44
|
:active {
|
|
65
|
-
border-color: ${
|
|
66
|
-
background-color: ${
|
|
45
|
+
border-color: ${u.colors[g].dark};
|
|
46
|
+
background-color: ${u.colors[g].dark}
|
|
67
47
|
}
|
|
68
48
|
|
|
69
49
|
:focus {
|
|
70
|
-
box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${
|
|
50
|
+
box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${u.colors[g].dark};
|
|
71
51
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
color: ${
|
|
75
|
-
border-color: ${
|
|
52
|
+
`)(b)(h)}
|
|
53
|
+
${!$&&x==="outline"&&(u=>g=>`
|
|
54
|
+
color: ${u.colors[g].main};
|
|
55
|
+
border-color: ${u.colors[g].main};
|
|
76
56
|
background-color: transparent;
|
|
77
57
|
|
|
78
58
|
:hover {
|
|
79
59
|
color: white;
|
|
80
|
-
border-color: ${
|
|
81
|
-
background-color: ${
|
|
60
|
+
border-color: ${u.colors[g].light};
|
|
61
|
+
background-color: ${u.colors[g].light};
|
|
82
62
|
}
|
|
83
63
|
|
|
84
64
|
:active {
|
|
85
65
|
color: white;
|
|
86
|
-
border-color: ${
|
|
87
|
-
background-color: ${
|
|
66
|
+
border-color: ${u.colors[g].dark};
|
|
67
|
+
background-color: ${u.colors[g].dark};
|
|
88
68
|
}
|
|
89
69
|
|
|
90
70
|
:focus {
|
|
91
|
-
box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${
|
|
71
|
+
box-shadow: 0px 0px 0px 1px #fff, 0px 0px 0px 2px ${u.colors[g].dark};
|
|
92
72
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
color: ${
|
|
73
|
+
`)(b)(h)}
|
|
74
|
+
${!$&&x==="flat"&&(u=>g=>`
|
|
75
|
+
color: ${u.colors[g].main};
|
|
96
76
|
border-color: transparent;
|
|
97
77
|
background-color: transparent;
|
|
98
78
|
|
|
99
79
|
:hover {
|
|
100
|
-
color: ${
|
|
80
|
+
color: ${u.colors[g].dark};
|
|
101
81
|
}
|
|
102
82
|
|
|
103
83
|
:active {
|
|
104
|
-
color: ${
|
|
84
|
+
color: ${u.colors[g].light};
|
|
105
85
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
background-color: ${
|
|
109
|
-
border-color: ${
|
|
110
|
-
color: ${
|
|
86
|
+
`)(b)(h)}
|
|
87
|
+
${$&&x!=="flat"&&(u=>`
|
|
88
|
+
background-color: ${u.colors.gray.light4};
|
|
89
|
+
border-color: ${u.colors.gray.light4};
|
|
90
|
+
color: ${u.colors.gray.light1};
|
|
111
91
|
cursor: not-allowed;
|
|
112
|
-
|
|
113
|
-
|
|
92
|
+
`)(b)}
|
|
93
|
+
${$&&x==="flat"&&(u=>`
|
|
114
94
|
border-color: transparent;
|
|
115
95
|
background-color: transparent;
|
|
116
|
-
color: ${
|
|
96
|
+
color: ${u.colors.gray.light1};
|
|
117
97
|
cursor: not-allowed;
|
|
118
|
-
|
|
119
|
-
/****************************************************************************/
|
|
120
|
-
/* Root styles */
|
|
121
|
-
/****************************************************************************/
|
|
122
|
-
const Root = styled__default['default'].button `
|
|
123
|
-
outline: none;
|
|
124
|
-
cursor: pointer;
|
|
125
|
-
user-select: none;
|
|
126
|
-
position: relative;
|
|
127
|
-
white-space: nowrap;
|
|
128
|
-
border: 2px solid transparent;
|
|
129
|
-
border-radius: 3px;
|
|
130
|
-
width: ${({ fullWidth }) => fullWidth && '100%'};
|
|
131
|
-
|
|
132
|
-
${typography_ButtonText_index.BasicButtonTextStyle}
|
|
133
|
-
${({ size }) => getFontStyles(size)}
|
|
134
|
-
${({ size, isLoading }) => styled.css `
|
|
135
|
-
${size === 'smaller' && smallerSizeStyles(isLoading)}
|
|
136
|
-
${size === 'small' && smallSizeStyles(isLoading)}
|
|
137
|
-
${size === 'regular' && regularSizeStyles(isLoading)}
|
|
138
|
-
${size === 'large' && largeSizeStyles(isLoading)}
|
|
139
|
-
`}
|
|
140
|
-
background-color: transparent;
|
|
141
|
-
transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
|
|
142
|
-
${({ variant, color, disabled, theme }) => styled.css `
|
|
143
|
-
${!disabled && variant === 'solid' && solidColorStyles(theme)(color)}
|
|
144
|
-
${!disabled && variant === 'outline' && outlineColorStyles(theme)(color)}
|
|
145
|
-
${!disabled && variant === 'flat' && flatColorStyles(theme)(color)}
|
|
146
|
-
${disabled && variant !== 'flat' && disabledCommonColorStyles(theme)}
|
|
147
|
-
${disabled && variant === 'flat' && disabledFlatColorStyles(theme)}
|
|
98
|
+
`)(b)}
|
|
148
99
|
`}
|
|
149
|
-
|
|
150
|
-
/****************************************************************************/
|
|
151
|
-
/* Main component */
|
|
152
|
-
/****************************************************************************/
|
|
153
|
-
const LoadingSpinner = styled__default['default'](components_Spinner_index['default']) ``;
|
|
154
|
-
const spinnerSizes = {
|
|
155
|
-
smaller: 1,
|
|
156
|
-
small: 1,
|
|
157
|
-
regular: 1.5,
|
|
158
|
-
large: 1.75,
|
|
159
|
-
};
|
|
160
|
-
const Button = ({ size = 'small', color = 'primary', variant = 'solid', fullWidth = false, isDisabled = false, isLoading = false, children, ...props }) => {
|
|
161
|
-
return (jsxRuntime.jsx(Root, Object.assign({}, props, { color: color, disabled: isDisabled || isLoading, fullWidth: fullWidth, theme: theme['default'], variant: variant, size: size, isLoading: isLoading }, { children: isLoading ? (jsxRuntime.jsx(LoadingSpinner, { color: "neutral", size: spinnerSizes[size] }, void 0)) : (children) }), void 0));
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
exports.Button = Button;
|
|
165
|
-
exports['default'] = Button;
|
|
100
|
+
`,i=c.default(e.default)``,d={smaller:1,small:1,regular:1.5,large:1.75},p=({size:x="small",color:h="primary",variant:$="solid",fullWidth:b=!1,isDisabled:u=!1,isLoading:g=!1,children:f,...m})=>a.default.createElement(s,{...m,color:h,disabled:u||g,fullWidth:b,theme:n.default,variant:$,size:x,isLoading:g},g?a.default.createElement(i,{color:"neutral",size:d[x]}):f);exports.Button=p,exports.default=p;
|
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 CardWrapper = styled__default['default'].div `
|
|
14
|
-
background: ${theme['default'].colors.background.light};
|
|
15
|
-
${({ boxShadow }) => boxShadow && `box-shadow: ${boxShadow};`}
|
|
16
|
-
${({ boxShadow }) => !boxShadow &&
|
|
17
|
-
`box-shadow: 0 2px 4px rgba(0, 0, 0, 10%), 0 2px 4px rgba(0, 0, 0, 9%),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),o=require("styled-components"),r=require("../../theme.js");function t(x){return x&&typeof x=="object"&&"default"in x?x:{default:x}}var d=t(e);const a=t(o).default.div`
|
|
2
|
+
background: ${r.default.colors.background.light};
|
|
3
|
+
${({boxShadow:x})=>x&&`box-shadow: ${x};`}
|
|
4
|
+
${({boxShadow:x})=>!x&&`box-shadow: 0 2px 4px rgba(0, 0, 0, 10%), 0 2px 4px rgba(0, 0, 0, 9%),
|
|
18
5
|
0 1px 5px rgba(0, 0, 0, 15%);`}
|
|
19
6
|
border-radius: 0 0 3px 3px;
|
|
20
|
-
${({
|
|
21
|
-
|
|
22
|
-
const Card = ({ ...props }) => {
|
|
23
|
-
return (jsxRuntime.jsx(CardWrapper, Object.assign({ topBorder: props.topBorder, boxShadow: props.boxShadow }, { children: props.children }), void 0));
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
exports.Card = Card;
|
|
27
|
-
exports['default'] = Card;
|
|
7
|
+
${({topBorder:x})=>x&&`border-top: 4px solid ${x};`}
|
|
8
|
+
`,p=({...x})=>d.default.createElement(a,{topBorder:x.topBorder,boxShadow:x.boxShadow},x.children);exports.Card=p,exports.default=p;
|