@drivy/cobalt 0.13.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/_virtual/_tslib.js +85 -0
- package/_virtual/_tslib.js.map +1 -0
- package/cjs/tokens/breakpoints.js +21 -0
- package/cjs/tokens/breakpoints.js.map +1 -0
- package/cjs/tokens/colors.js +60 -0
- package/cjs/tokens/colors.js.map +1 -0
- package/cjs/tokens/countries.js +23 -0
- package/cjs/tokens/countries.js.map +1 -0
- package/cjs/tokens/icons.js +125 -0
- package/cjs/tokens/icons.js.map +1 -0
- package/cjs/tokens/index.js +23 -0
- package/cjs/tokens/index.js.map +1 -0
- package/cjs/tokens/zIndexes.js +43 -0
- package/cjs/tokens/zIndexes.js.map +1 -0
- package/components/Accordion/ToggleIcon.js +12 -0
- package/components/Accordion/ToggleIcon.js.map +1 -0
- package/components/Accordion/index.js +55 -0
- package/components/Accordion/index.js.map +1 -0
- package/components/Alerter/Alert.js +39 -0
- package/components/Alerter/Alert.js.map +1 -0
- package/components/Alerter/index.js +81 -0
- package/components/Alerter/index.js.map +1 -0
- package/components/BasicCell/index.js +25 -0
- package/components/BasicCell/index.js.map +1 -0
- package/components/BulletList/index.js +18 -0
- package/components/BulletList/index.js.map +1 -0
- package/components/Button/Button.js +50 -0
- package/components/Button/Button.js.map +1 -0
- package/components/Button/Link.js +50 -0
- package/components/Button/Link.js.map +1 -0
- package/components/Button/index.js +9 -0
- package/components/Button/index.js.map +1 -0
- package/components/Buttons/BrandButton/index.js +53 -0
- package/components/Buttons/BrandButton/index.js.map +1 -0
- package/components/Buttons/ButtonComponent.js +24 -0
- package/components/Buttons/ButtonComponent.js.map +1 -0
- package/components/Buttons/ButtonsGroup.js +42 -0
- package/components/Buttons/ButtonsGroup.js.map +1 -0
- package/components/Buttons/DefaultButton/index.js +56 -0
- package/components/Buttons/DefaultButton/index.js.map +1 -0
- package/components/Buttons/GhostButton/index.js +53 -0
- package/components/Buttons/GhostButton/index.js.map +1 -0
- package/components/Buttons/InversedButton/index.js +42 -0
- package/components/Buttons/InversedButton/index.js.map +1 -0
- package/components/Buttons/helpers.js +34 -0
- package/components/Buttons/helpers.js.map +1 -0
- package/components/Calendar/CalendarRangePicker/CalendarRangePicker.js +52 -0
- package/components/Calendar/CalendarRangePicker/CalendarRangePicker.js.map +1 -0
- package/components/Calendar/CalendarRangePicker/CalendarRangePickerDay.js +42 -0
- package/components/Calendar/CalendarRangePicker/CalendarRangePickerDay.js.map +1 -0
- package/components/Calendar/CalendarRangePicker/CalendarRangePickerMonth.js +96 -0
- package/components/Calendar/CalendarRangePicker/CalendarRangePickerMonth.js.map +1 -0
- package/components/Calendar/CalendarView/CalendarViewMonth.js +46 -0
- package/components/Calendar/CalendarView/CalendarViewMonth.js.map +1 -0
- package/components/Calendar/CalendarView/index.js +12 -0
- package/components/Calendar/CalendarView/index.js.map +1 -0
- package/components/Callout/index.js +18 -0
- package/components/Callout/index.js.map +1 -0
- package/components/Card/index.js +39 -0
- package/components/Card/index.js.map +1 -0
- package/components/CdwChoice/index.js +19 -0
- package/components/CdwChoice/index.js.map +1 -0
- package/components/Cell/index.js +18 -0
- package/components/Cell/index.js.map +1 -0
- package/components/Chip/index.js +27 -0
- package/components/Chip/index.js.map +1 -0
- package/components/EmptyState/index.js +16 -0
- package/components/EmptyState/index.js.map +1 -0
- package/components/Flag/index.js +29 -0
- package/components/Flag/index.js.map +1 -0
- package/components/Flash/index.js +31 -0
- package/components/Flash/index.js.map +1 -0
- package/components/Form/Autocomplete/index.js +171 -0
- package/components/Form/Autocomplete/index.js.map +1 -0
- package/components/Form/CheckablePill.js +37 -0
- package/components/Form/CheckablePill.js.map +1 -0
- package/components/Form/Checkmark.js +38 -0
- package/components/Form/Checkmark.js.map +1 -0
- package/components/Form/ComposedField.js +18 -0
- package/components/Form/ComposedField.js.map +1 -0
- package/components/Form/Fieldset.js +11 -0
- package/components/Form/Fieldset.js.map +1 -0
- package/components/Form/Hint.js +44 -0
- package/components/Form/Hint.js.map +1 -0
- package/components/Form/Select.js +18 -0
- package/components/Form/Select.js.map +1 -0
- package/components/Form/Slider.js +36 -0
- package/components/Form/Slider.js.map +1 -0
- package/components/Form/Stepper.js +78 -0
- package/components/Form/Stepper.js.map +1 -0
- package/components/Form/TextArea.js +46 -0
- package/components/Form/TextArea.js.map +1 -0
- package/components/Form/TextInput.js +28 -0
- package/components/Form/TextInput.js.map +1 -0
- package/components/Form/ToggleSwitch.js +24 -0
- package/components/Form/ToggleSwitch.js.map +1 -0
- package/components/Form/field.js +35 -0
- package/components/Form/field.js.map +1 -0
- package/components/Helper/index.js +13 -0
- package/components/Helper/index.js.map +1 -0
- package/components/HorizontalList/index.js +19 -0
- package/components/HorizontalList/index.js.map +1 -0
- package/components/Icon/__generated__/AirportIcon.js +23 -0
- package/components/Icon/__generated__/AirportIcon.js.map +1 -0
- package/components/Icon/__generated__/ArrowLeftIcon.js +23 -0
- package/components/Icon/__generated__/ArrowLeftIcon.js.map +1 -0
- package/components/Icon/__generated__/ArrowRightIcon.js +23 -0
- package/components/Icon/__generated__/ArrowRightIcon.js.map +1 -0
- package/components/Icon/__generated__/BinIcon.js +23 -0
- package/components/Icon/__generated__/BinIcon.js.map +1 -0
- package/components/Icon/__generated__/BriefcaseIcon.js +23 -0
- package/components/Icon/__generated__/BriefcaseIcon.js.map +1 -0
- package/components/Icon/__generated__/BulbIcon.js +23 -0
- package/components/Icon/__generated__/BulbIcon.js.map +1 -0
- package/components/Icon/__generated__/CameraIcon.js +23 -0
- package/components/Icon/__generated__/CameraIcon.js.map +1 -0
- package/components/Icon/__generated__/CarCheckIcon.js +23 -0
- package/components/Icon/__generated__/CarCheckIcon.js.map +1 -0
- package/components/Icon/__generated__/CarDrivyOpenIcon.js +23 -0
- package/components/Icon/__generated__/CarDrivyOpenIcon.js.map +1 -0
- package/components/Icon/__generated__/CarGroupIcon.js +24 -0
- package/components/Icon/__generated__/CarGroupIcon.js.map +1 -0
- package/components/Icon/__generated__/CarIcon.js +23 -0
- package/components/Icon/__generated__/CarIcon.js.map +1 -0
- package/components/Icon/__generated__/CarLockIcon.js +23 -0
- package/components/Icon/__generated__/CarLockIcon.js.map +1 -0
- package/components/Icon/__generated__/CarSearchIcon.js +23 -0
- package/components/Icon/__generated__/CarSearchIcon.js.map +1 -0
- package/components/Icon/__generated__/CarTypeAntiqueIcon.js +23 -0
- package/components/Icon/__generated__/CarTypeAntiqueIcon.js.map +1 -0
- package/components/Icon/__generated__/CarTypeCabrioletIcon.js +23 -0
- package/components/Icon/__generated__/CarTypeCabrioletIcon.js.map +1 -0
- package/components/Icon/__generated__/CarTypeCampervanIcon.js +23 -0
- package/components/Icon/__generated__/CarTypeCampervanIcon.js.map +1 -0
- package/components/Icon/__generated__/CarTypeCityIcon.js +23 -0
- package/components/Icon/__generated__/CarTypeCityIcon.js.map +1 -0
- package/components/Icon/__generated__/CarTypeConvertibleIcon.js +23 -0
- package/components/Icon/__generated__/CarTypeConvertibleIcon.js.map +1 -0
- package/components/Icon/__generated__/CarTypeCoupeIcon.js +23 -0
- package/components/Icon/__generated__/CarTypeCoupeIcon.js.map +1 -0
- package/components/Icon/__generated__/CarTypeFamilyIcon.js +23 -0
- package/components/Icon/__generated__/CarTypeFamilyIcon.js.map +1 -0
- package/components/Icon/__generated__/CarTypeFourFourIcon.js +23 -0
- package/components/Icon/__generated__/CarTypeFourFourIcon.js.map +1 -0
- package/components/Icon/__generated__/CarTypeMinibusIcon.js +23 -0
- package/components/Icon/__generated__/CarTypeMinibusIcon.js.map +1 -0
- package/components/Icon/__generated__/CarTypeSedanIcon.js +23 -0
- package/components/Icon/__generated__/CarTypeSedanIcon.js.map +1 -0
- package/components/Icon/__generated__/CarTypeUtilityIcon.js +23 -0
- package/components/Icon/__generated__/CarTypeUtilityIcon.js.map +1 -0
- package/components/Icon/__generated__/CheckCircleIcon.js +23 -0
- package/components/Icon/__generated__/CheckCircleIcon.js.map +1 -0
- package/components/Icon/__generated__/CheckIcon.js +23 -0
- package/components/Icon/__generated__/CheckIcon.js.map +1 -0
- package/components/Icon/__generated__/ChevronDownIcon.js +23 -0
- package/components/Icon/__generated__/ChevronDownIcon.js.map +1 -0
- package/components/Icon/__generated__/ChevronLeftIcon.js +23 -0
- package/components/Icon/__generated__/ChevronLeftIcon.js.map +1 -0
- package/components/Icon/__generated__/ChevronRightIcon.js +23 -0
- package/components/Icon/__generated__/ChevronRightIcon.js.map +1 -0
- package/components/Icon/__generated__/ChevronUpIcon.js +23 -0
- package/components/Icon/__generated__/ChevronUpIcon.js.map +1 -0
- package/components/Icon/__generated__/CloseIcon.js +23 -0
- package/components/Icon/__generated__/CloseIcon.js.map +1 -0
- package/components/Icon/__generated__/ContactMailIcon.js +23 -0
- package/components/Icon/__generated__/ContactMailIcon.js.map +1 -0
- package/components/Icon/__generated__/ContactPhoneIcon.js +23 -0
- package/components/Icon/__generated__/ContactPhoneIcon.js.map +1 -0
- package/components/Icon/__generated__/ContextualPaperclipIcon.js +23 -0
- package/components/Icon/__generated__/ContextualPaperclipIcon.js.map +1 -0
- package/components/Icon/__generated__/ContextualQuestionIcon.js +23 -0
- package/components/Icon/__generated__/ContextualQuestionIcon.js.map +1 -0
- package/components/Icon/__generated__/ContextualWarningCircleFilledIcon.js +23 -0
- package/components/Icon/__generated__/ContextualWarningCircleFilledIcon.js.map +1 -0
- package/components/Icon/__generated__/ContextualWarningCircleIcon.js +23 -0
- package/components/Icon/__generated__/ContextualWarningCircleIcon.js.map +1 -0
- package/components/Icon/__generated__/CreditCardIcon.js +23 -0
- package/components/Icon/__generated__/CreditCardIcon.js.map +1 -0
- package/components/Icon/__generated__/DirectionsIcon.js +23 -0
- package/components/Icon/__generated__/DirectionsIcon.js.map +1 -0
- package/components/Icon/__generated__/DotsHorizontalIcon.js +23 -0
- package/components/Icon/__generated__/DotsHorizontalIcon.js.map +1 -0
- package/components/Icon/__generated__/DotsVerticalIcon.js +25 -0
- package/components/Icon/__generated__/DotsVerticalIcon.js.map +1 -0
- package/components/Icon/__generated__/DownloadIcon.js +23 -0
- package/components/Icon/__generated__/DownloadIcon.js.map +1 -0
- package/components/Icon/__generated__/EarthIcon.js +23 -0
- package/components/Icon/__generated__/EarthIcon.js.map +1 -0
- package/components/Icon/__generated__/EditIcon.js +23 -0
- package/components/Icon/__generated__/EditIcon.js.map +1 -0
- package/components/Icon/__generated__/ExternalLinkIcon.js +23 -0
- package/components/Icon/__generated__/ExternalLinkIcon.js.map +1 -0
- package/components/Icon/__generated__/EyeIcon.js +23 -0
- package/components/Icon/__generated__/EyeIcon.js.map +1 -0
- package/components/Icon/__generated__/FiltersIcon.js +23 -0
- package/components/Icon/__generated__/FiltersIcon.js.map +1 -0
- package/components/Icon/__generated__/FlagIcon.js +23 -0
- package/components/Icon/__generated__/FlagIcon.js.map +1 -0
- package/components/Icon/__generated__/GeolocationIcon.js +23 -0
- package/components/Icon/__generated__/GeolocationIcon.js.map +1 -0
- package/components/Icon/__generated__/GraphUpIcon.js +23 -0
- package/components/Icon/__generated__/GraphUpIcon.js.map +1 -0
- package/components/Icon/__generated__/IncidentIcon.js +23 -0
- package/components/Icon/__generated__/IncidentIcon.js.map +1 -0
- package/components/Icon/__generated__/InfoFilledIcon.js +23 -0
- package/components/Icon/__generated__/InfoFilledIcon.js.map +1 -0
- package/components/Icon/__generated__/InfoIcon.js +23 -0
- package/components/Icon/__generated__/InfoIcon.js.map +1 -0
- package/components/Icon/__generated__/InstantIcon.js +23 -0
- package/components/Icon/__generated__/InstantIcon.js.map +1 -0
- package/components/Icon/__generated__/KeyIcon.js +23 -0
- package/components/Icon/__generated__/KeyIcon.js.map +1 -0
- package/components/Icon/__generated__/LoadingIcon.js +23 -0
- package/components/Icon/__generated__/LoadingIcon.js.map +1 -0
- package/components/Icon/__generated__/LocalityIcon.js +23 -0
- package/components/Icon/__generated__/LocalityIcon.js.map +1 -0
- package/components/Icon/__generated__/LocationMapIcon.js +23 -0
- package/components/Icon/__generated__/LocationMapIcon.js.map +1 -0
- package/components/Icon/__generated__/LocationParkingIcon.js +23 -0
- package/components/Icon/__generated__/LocationParkingIcon.js.map +1 -0
- package/components/Icon/__generated__/LocationPinIcon.js +23 -0
- package/components/Icon/__generated__/LocationPinIcon.js.map +1 -0
- package/components/Icon/__generated__/LogoutIcon.js +23 -0
- package/components/Icon/__generated__/LogoutIcon.js.map +1 -0
- package/components/Icon/__generated__/MeetDriverIcon.js +23 -0
- package/components/Icon/__generated__/MeetDriverIcon.js.map +1 -0
- package/components/Icon/__generated__/MeetOwnerIcon.js +23 -0
- package/components/Icon/__generated__/MeetOwnerIcon.js.map +1 -0
- package/components/Icon/__generated__/MenuListIcon.js +23 -0
- package/components/Icon/__generated__/MenuListIcon.js.map +1 -0
- package/components/Icon/__generated__/MileageIcon.js +23 -0
- package/components/Icon/__generated__/MileageIcon.js.map +1 -0
- package/components/Icon/__generated__/MiscGiftIcon.js +24 -0
- package/components/Icon/__generated__/MiscGiftIcon.js.map +1 -0
- package/components/Icon/__generated__/NotificationIcon.js +23 -0
- package/components/Icon/__generated__/NotificationIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionAirConditioningIcon.js +23 -0
- package/components/Icon/__generated__/OptionAirConditioningIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionAudioInputIcon.js +23 -0
- package/components/Icon/__generated__/OptionAudioInputIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionBabySeatIcon.js +23 -0
- package/components/Icon/__generated__/OptionBabySeatIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionBikeRackIcon.js +23 -0
- package/components/Icon/__generated__/OptionBikeRackIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionCdPlayerIcon.js +23 -0
- package/components/Icon/__generated__/OptionCdPlayerIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionChainsIcon.js +23 -0
- package/components/Icon/__generated__/OptionChainsIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionCruiseControlIcon.js +23 -0
- package/components/Icon/__generated__/OptionCruiseControlIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionGpsIcon.js +23 -0
- package/components/Icon/__generated__/OptionGpsIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionHasTrailerIcon.js +23 -0
- package/components/Icon/__generated__/OptionHasTrailerIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionHitchIcon.js +24 -0
- package/components/Icon/__generated__/OptionHitchIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionRoofBoxIcon.js +23 -0
- package/components/Icon/__generated__/OptionRoofBoxIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionSkiRackIcon.js +23 -0
- package/components/Icon/__generated__/OptionSkiRackIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionSnowTireIcon.js +23 -0
- package/components/Icon/__generated__/OptionSnowTireIcon.js.map +1 -0
- package/components/Icon/__generated__/OptionWheelchairAccessibleIcon.js +25 -0
- package/components/Icon/__generated__/OptionWheelchairAccessibleIcon.js.map +1 -0
- package/components/Icon/__generated__/PeopleUserIcon.js +23 -0
- package/components/Icon/__generated__/PeopleUserIcon.js.map +1 -0
- package/components/Icon/__generated__/PhotosIcon.js +23 -0
- package/components/Icon/__generated__/PhotosIcon.js.map +1 -0
- package/components/Icon/__generated__/PlugIcon.js +23 -0
- package/components/Icon/__generated__/PlugIcon.js.map +1 -0
- package/components/Icon/__generated__/RefreshIcon.js +23 -0
- package/components/Icon/__generated__/RefreshIcon.js.map +1 -0
- package/components/Icon/__generated__/ResetIcon.js +23 -0
- package/components/Icon/__generated__/ResetIcon.js.map +1 -0
- package/components/Icon/__generated__/RideIcon.js +23 -0
- package/components/Icon/__generated__/RideIcon.js.map +1 -0
- package/components/Icon/__generated__/SearchIcon.js +23 -0
- package/components/Icon/__generated__/SearchIcon.js.map +1 -0
- package/components/Icon/__generated__/ServiceBatteryIcon.js +23 -0
- package/components/Icon/__generated__/ServiceBatteryIcon.js.map +1 -0
- package/components/Icon/__generated__/ServiceCleaningIcon.js +23 -0
- package/components/Icon/__generated__/ServiceCleaningIcon.js.map +1 -0
- package/components/Icon/__generated__/ServiceFuelIcon.js +23 -0
- package/components/Icon/__generated__/ServiceFuelIcon.js.map +1 -0
- package/components/Icon/__generated__/ServiceHealingIcon.js +23 -0
- package/components/Icon/__generated__/ServiceHealingIcon.js.map +1 -0
- package/components/Icon/__generated__/ServiceLockedIcon.js +23 -0
- package/components/Icon/__generated__/ServiceLockedIcon.js.map +1 -0
- package/components/Icon/__generated__/ServiceTollsIcon.js +25 -0
- package/components/Icon/__generated__/ServiceTollsIcon.js.map +1 -0
- package/components/Icon/__generated__/ServiceUnlockedIcon.js +23 -0
- package/components/Icon/__generated__/ServiceUnlockedIcon.js.map +1 -0
- package/components/Icon/__generated__/SettingsIcon.js +23 -0
- package/components/Icon/__generated__/SettingsIcon.js.map +1 -0
- package/components/Icon/__generated__/ShareIcon.js +23 -0
- package/components/Icon/__generated__/ShareIcon.js.map +1 -0
- package/components/Icon/__generated__/ShopIcon.js +23 -0
- package/components/Icon/__generated__/ShopIcon.js.map +1 -0
- package/components/Icon/__generated__/SocialFacebookIcon.js +23 -0
- package/components/Icon/__generated__/SocialFacebookIcon.js.map +1 -0
- package/components/Icon/__generated__/SocialLinkedinIcon.js +23 -0
- package/components/Icon/__generated__/SocialLinkedinIcon.js.map +1 -0
- package/components/Icon/__generated__/SocialTwitterIcon.js +23 -0
- package/components/Icon/__generated__/SocialTwitterIcon.js.map +1 -0
- package/components/Icon/__generated__/SocialWhatsappIcon.js +23 -0
- package/components/Icon/__generated__/SocialWhatsappIcon.js.map +1 -0
- package/components/Icon/__generated__/StarIcon.js +23 -0
- package/components/Icon/__generated__/StarIcon.js.map +1 -0
- package/components/Icon/__generated__/SubwayIcon.js +23 -0
- package/components/Icon/__generated__/SubwayIcon.js.map +1 -0
- package/components/Icon/__generated__/TimeAlertIcon.js +23 -0
- package/components/Icon/__generated__/TimeAlertIcon.js.map +1 -0
- package/components/Icon/__generated__/TimeBackwardsIcon.js +23 -0
- package/components/Icon/__generated__/TimeBackwardsIcon.js.map +1 -0
- package/components/Icon/__generated__/TimeCalendarIcon.js +23 -0
- package/components/Icon/__generated__/TimeCalendarIcon.js.map +1 -0
- package/components/Icon/__generated__/TimeForwardIcon.js +23 -0
- package/components/Icon/__generated__/TimeForwardIcon.js.map +1 -0
- package/components/Icon/__generated__/TrainIcon.js +23 -0
- package/components/Icon/__generated__/TrainIcon.js.map +1 -0
- package/components/Icon/__generated__/UserShieldIcon.js +23 -0
- package/components/Icon/__generated__/UserShieldIcon.js.map +1 -0
- package/components/Icon/__generated__/VerifiedSealIcon.js +23 -0
- package/components/Icon/__generated__/VerifiedSealIcon.js.map +1 -0
- package/components/Icon/__generated__/WrenchIcon.js +23 -0
- package/components/Icon/__generated__/WrenchIcon.js.map +1 -0
- package/components/Icon/index.js +62 -0
- package/components/Icon/index.js.map +1 -0
- package/components/Modal/ModalBody.js +14 -0
- package/components/Modal/ModalBody.js.map +1 -0
- package/components/Modal/ModalFooter.js +10 -0
- package/components/Modal/ModalFooter.js.map +1 -0
- package/components/Modal/ModalHeader.js +16 -0
- package/components/Modal/ModalHeader.js.map +1 -0
- package/components/Modal/index.js +117 -0
- package/components/Modal/index.js.map +1 -0
- package/components/ModalOpenerButton/index.js +22 -0
- package/components/ModalOpenerButton/index.js.map +1 -0
- package/components/Note/index.js +12 -0
- package/components/Note/index.js.map +1 -0
- package/components/Pill/index.js +25 -0
- package/components/Pill/index.js.map +1 -0
- package/components/Popover/LazyTippy.js +11 -0
- package/components/Popover/LazyTippy.js.map +1 -0
- package/components/Popover/index.js +56 -0
- package/components/Popover/index.js.map +1 -0
- package/components/PriceTable/index.js +18 -0
- package/components/PriceTable/index.js.map +1 -0
- package/components/ProgressBar/index.js +22 -0
- package/components/ProgressBar/index.js.map +1 -0
- package/components/Tabs/index.js +142 -0
- package/components/Tabs/index.js.map +1 -0
- package/components/Tag/index.js +13 -0
- package/components/Tag/index.js.map +1 -0
- package/components/TextContainer/index.js +9 -0
- package/components/TextContainer/index.js.map +1 -0
- package/components/utils/Timer.js +26 -0
- package/components/utils/Timer.js.map +1 -0
- package/components/utils/capitalize.js +8 -0
- package/components/utils/capitalize.js.map +1 -0
- package/components/utils/dom.js +8 -0
- package/components/utils/dom.js.map +1 -0
- package/components/utils/eqSet.js +25 -0
- package/components/utils/eqSet.js.map +1 -0
- package/components/utils/px.js +5 -0
- package/components/utils/px.js.map +1 -0
- package/hooks/useBreakpoint.js +75 -0
- package/hooks/useBreakpoint.js.map +1 -0
- package/hooks/useElementHeight.js +36 -0
- package/hooks/useElementHeight.js.map +1 -0
- package/icons/airport.js +4 -0
- package/icons/airport.js.map +1 -0
- package/icons/airport.svg +3 -0
- package/icons/arrow-left.js +4 -0
- package/icons/arrow-left.js.map +1 -0
- package/icons/arrow-left.svg +3 -0
- package/icons/arrow-right.js +4 -0
- package/icons/arrow-right.js.map +1 -0
- package/icons/arrow-right.svg +1 -0
- package/icons/bin.js +4 -0
- package/icons/bin.js.map +1 -0
- package/icons/bin.svg +3 -0
- package/icons/briefcase.js +4 -0
- package/icons/briefcase.js.map +1 -0
- package/icons/briefcase.svg +1 -0
- package/icons/bulb.js +4 -0
- package/icons/bulb.js.map +1 -0
- package/icons/bulb.svg +1 -0
- package/icons/camera.js +4 -0
- package/icons/camera.js.map +1 -0
- package/icons/camera.svg +3 -0
- package/icons/car-check.js +4 -0
- package/icons/car-check.js.map +1 -0
- package/icons/car-check.svg +3 -0
- package/icons/car-drivy-open.js +4 -0
- package/icons/car-drivy-open.js.map +1 -0
- package/icons/car-drivy-open.svg +3 -0
- package/icons/car-group.js +4 -0
- package/icons/car-group.js.map +1 -0
- package/icons/car-group.svg +1 -0
- package/icons/car-lock.js +4 -0
- package/icons/car-lock.js.map +1 -0
- package/icons/car-lock.svg +3 -0
- package/icons/car-search.js +4 -0
- package/icons/car-search.js.map +1 -0
- package/icons/car-search.svg +3 -0
- package/icons/car-type-antique.js +4 -0
- package/icons/car-type-antique.js.map +1 -0
- package/icons/car-type-antique.svg +1 -0
- package/icons/car-type-cabriolet.js +4 -0
- package/icons/car-type-cabriolet.js.map +1 -0
- package/icons/car-type-cabriolet.svg +1 -0
- package/icons/car-type-campervan.js +4 -0
- package/icons/car-type-campervan.js.map +1 -0
- package/icons/car-type-campervan.svg +1 -0
- package/icons/car-type-city.js +4 -0
- package/icons/car-type-city.js.map +1 -0
- package/icons/car-type-city.svg +1 -0
- package/icons/car-type-convertible.js +4 -0
- package/icons/car-type-convertible.js.map +1 -0
- package/icons/car-type-convertible.svg +1 -0
- package/icons/car-type-coupe.js +4 -0
- package/icons/car-type-coupe.js.map +1 -0
- package/icons/car-type-coupe.svg +1 -0
- package/icons/car-type-family.js +4 -0
- package/icons/car-type-family.js.map +1 -0
- package/icons/car-type-family.svg +1 -0
- package/icons/car-type-four-four.js +4 -0
- package/icons/car-type-four-four.js.map +1 -0
- package/icons/car-type-four-four.svg +1 -0
- package/icons/car-type-minibus.js +4 -0
- package/icons/car-type-minibus.js.map +1 -0
- package/icons/car-type-minibus.svg +1 -0
- package/icons/car-type-sedan.js +4 -0
- package/icons/car-type-sedan.js.map +1 -0
- package/icons/car-type-sedan.svg +1 -0
- package/icons/car-type-utility.js +4 -0
- package/icons/car-type-utility.js.map +1 -0
- package/icons/car-type-utility.svg +1 -0
- package/icons/car.js +4 -0
- package/icons/car.js.map +1 -0
- package/icons/car.svg +3 -0
- package/icons/check-circle.js +4 -0
- package/icons/check-circle.js.map +1 -0
- package/icons/check-circle.svg +3 -0
- package/icons/check.js +4 -0
- package/icons/check.js.map +1 -0
- package/icons/check.svg +1 -0
- package/icons/chevron-down.js +4 -0
- package/icons/chevron-down.js.map +1 -0
- package/icons/chevron-down.svg +3 -0
- package/icons/chevron-left.js +4 -0
- package/icons/chevron-left.js.map +1 -0
- package/icons/chevron-left.svg +3 -0
- package/icons/chevron-right.js +4 -0
- package/icons/chevron-right.js.map +1 -0
- package/icons/chevron-right.svg +3 -0
- package/icons/chevron-up.js +4 -0
- package/icons/chevron-up.js.map +1 -0
- package/icons/chevron-up.svg +3 -0
- package/icons/close.js +4 -0
- package/icons/close.js.map +1 -0
- package/icons/close.svg +3 -0
- package/icons/contact-mail.js +4 -0
- package/icons/contact-mail.js.map +1 -0
- package/icons/contact-mail.svg +3 -0
- package/icons/contact-phone.js +4 -0
- package/icons/contact-phone.js.map +1 -0
- package/icons/contact-phone.svg +3 -0
- package/icons/contextual-paperclip.js +4 -0
- package/icons/contextual-paperclip.js.map +1 -0
- package/icons/contextual-paperclip.svg +3 -0
- package/icons/contextual-question.js +4 -0
- package/icons/contextual-question.js.map +1 -0
- package/icons/contextual-question.svg +3 -0
- package/icons/contextual-warning-circle-filled.js +4 -0
- package/icons/contextual-warning-circle-filled.js.map +1 -0
- package/icons/contextual-warning-circle-filled.svg +3 -0
- package/icons/contextual-warning-circle.js +4 -0
- package/icons/contextual-warning-circle.js.map +1 -0
- package/icons/contextual-warning-circle.svg +3 -0
- package/icons/countries/at.js +4 -0
- package/icons/countries/at.js.map +1 -0
- package/icons/countries/at.svg +1 -0
- package/icons/countries/be.js +4 -0
- package/icons/countries/be.js.map +1 -0
- package/icons/countries/be.svg +1 -0
- package/icons/countries/ca.js +4 -0
- package/icons/countries/ca.js.map +1 -0
- package/icons/countries/ca.svg +1 -0
- package/icons/countries/de.js +4 -0
- package/icons/countries/de.js.map +1 -0
- package/icons/countries/de.svg +1 -0
- package/icons/countries/es.js +4 -0
- package/icons/countries/es.js.map +1 -0
- package/icons/countries/es.svg +1 -0
- package/icons/countries/eu.js +4 -0
- package/icons/countries/eu.js.map +1 -0
- package/icons/countries/eu.svg +1 -0
- package/icons/countries/fr.js +4 -0
- package/icons/countries/fr.js.map +1 -0
- package/icons/countries/fr.svg +1 -0
- package/icons/countries/gb.js +4 -0
- package/icons/countries/gb.js.map +1 -0
- package/icons/countries/gb.svg +1 -0
- package/icons/countries/index.js +11 -0
- package/icons/countries/index.js.map +1 -0
- package/icons/countries/no.js +4 -0
- package/icons/countries/no.js.map +1 -0
- package/icons/countries/no.svg +1 -0
- package/icons/countries/us.js +4 -0
- package/icons/countries/us.js.map +1 -0
- package/icons/countries/us.svg +1 -0
- package/icons/credit-card.js +4 -0
- package/icons/credit-card.js.map +1 -0
- package/icons/credit-card.svg +1 -0
- package/icons/directions.js +4 -0
- package/icons/directions.js.map +1 -0
- package/icons/directions.svg +1 -0
- package/icons/dots-horizontal.js +4 -0
- package/icons/dots-horizontal.js.map +1 -0
- package/icons/dots-horizontal.svg +1 -0
- package/icons/dots-vertical.js +4 -0
- package/icons/dots-vertical.js.map +1 -0
- package/icons/dots-vertical.svg +1 -0
- package/icons/download.js +4 -0
- package/icons/download.js.map +1 -0
- package/icons/download.svg +1 -0
- package/icons/earth.js +4 -0
- package/icons/earth.js.map +1 -0
- package/icons/earth.svg +3 -0
- package/icons/edit.js +4 -0
- package/icons/edit.js.map +1 -0
- package/icons/edit.svg +3 -0
- package/icons/external-link.js +4 -0
- package/icons/external-link.js.map +1 -0
- package/icons/external-link.svg +1 -0
- package/icons/eye.js +4 -0
- package/icons/eye.js.map +1 -0
- package/icons/eye.svg +1 -0
- package/icons/filters.js +4 -0
- package/icons/filters.js.map +1 -0
- package/icons/filters.svg +3 -0
- package/icons/flag.js +4 -0
- package/icons/flag.js.map +1 -0
- package/icons/flag.svg +3 -0
- package/icons/geolocation.js +4 -0
- package/icons/geolocation.js.map +1 -0
- package/icons/geolocation.svg +3 -0
- package/icons/graph-up.js +4 -0
- package/icons/graph-up.js.map +1 -0
- package/icons/graph-up.svg +1 -0
- package/icons/incident.js +4 -0
- package/icons/incident.js.map +1 -0
- package/icons/incident.svg +1 -0
- package/icons/index.js +113 -0
- package/icons/index.js.map +1 -0
- package/icons/info-filled.js +4 -0
- package/icons/info-filled.js.map +1 -0
- package/icons/info-filled.svg +3 -0
- package/icons/info.js +4 -0
- package/icons/info.js.map +1 -0
- package/icons/info.svg +3 -0
- package/icons/instant.js +4 -0
- package/icons/instant.js.map +1 -0
- package/icons/instant.svg +3 -0
- package/icons/key.js +4 -0
- package/icons/key.js.map +1 -0
- package/icons/key.svg +3 -0
- package/icons/loading.js +4 -0
- package/icons/loading.js.map +1 -0
- package/icons/loading.svg +3 -0
- package/icons/locality.js +4 -0
- package/icons/locality.js.map +1 -0
- package/icons/locality.svg +3 -0
- package/icons/location-map.js +4 -0
- package/icons/location-map.js.map +1 -0
- package/icons/location-map.svg +3 -0
- package/icons/location-parking.js +4 -0
- package/icons/location-parking.js.map +1 -0
- package/icons/location-parking.svg +3 -0
- package/icons/location-pin.js +4 -0
- package/icons/location-pin.js.map +1 -0
- package/icons/location-pin.svg +3 -0
- package/icons/logout.js +4 -0
- package/icons/logout.js.map +1 -0
- package/icons/logout.svg +1 -0
- package/icons/meet-driver.js +4 -0
- package/icons/meet-driver.js.map +1 -0
- package/icons/meet-driver.svg +3 -0
- package/icons/meet-owner.js +4 -0
- package/icons/meet-owner.js.map +1 -0
- package/icons/meet-owner.svg +1 -0
- package/icons/menu-list.js +4 -0
- package/icons/menu-list.js.map +1 -0
- package/icons/menu-list.svg +1 -0
- package/icons/mileage.js +4 -0
- package/icons/mileage.js.map +1 -0
- package/icons/mileage.svg +3 -0
- package/icons/misc-gift.js +4 -0
- package/icons/misc-gift.js.map +1 -0
- package/icons/misc-gift.svg +1 -0
- package/icons/notification.js +4 -0
- package/icons/notification.js.map +1 -0
- package/icons/notification.svg +3 -0
- package/icons/option-air-conditioning.js +4 -0
- package/icons/option-air-conditioning.js.map +1 -0
- package/icons/option-air-conditioning.svg +3 -0
- package/icons/option-audio-input.js +4 -0
- package/icons/option-audio-input.js.map +1 -0
- package/icons/option-audio-input.svg +3 -0
- package/icons/option-baby-seat.js +4 -0
- package/icons/option-baby-seat.js.map +1 -0
- package/icons/option-baby-seat.svg +3 -0
- package/icons/option-bike-rack.js +4 -0
- package/icons/option-bike-rack.js.map +1 -0
- package/icons/option-bike-rack.svg +3 -0
- package/icons/option-cd-player.js +4 -0
- package/icons/option-cd-player.js.map +1 -0
- package/icons/option-cd-player.svg +3 -0
- package/icons/option-chains.js +4 -0
- package/icons/option-chains.js.map +1 -0
- package/icons/option-chains.svg +3 -0
- package/icons/option-cruise-control.js +4 -0
- package/icons/option-cruise-control.js.map +1 -0
- package/icons/option-cruise-control.svg +3 -0
- package/icons/option-gps.js +4 -0
- package/icons/option-gps.js.map +1 -0
- package/icons/option-gps.svg +3 -0
- package/icons/option-has-trailer.js +4 -0
- package/icons/option-has-trailer.js.map +1 -0
- package/icons/option-has-trailer.svg +1 -0
- package/icons/option-hitch.js +4 -0
- package/icons/option-hitch.js.map +1 -0
- package/icons/option-hitch.svg +1 -0
- package/icons/option-roof-box.js +4 -0
- package/icons/option-roof-box.js.map +1 -0
- package/icons/option-roof-box.svg +3 -0
- package/icons/option-ski-rack.js +4 -0
- package/icons/option-ski-rack.js.map +1 -0
- package/icons/option-ski-rack.svg +3 -0
- package/icons/option-snow-tire.js +4 -0
- package/icons/option-snow-tire.js.map +1 -0
- package/icons/option-snow-tire.svg +3 -0
- package/icons/option-wheelchair-accessible.js +4 -0
- package/icons/option-wheelchair-accessible.js.map +1 -0
- package/icons/option-wheelchair-accessible.svg +1 -0
- package/icons/people-user.js +4 -0
- package/icons/people-user.js.map +1 -0
- package/icons/people-user.svg +3 -0
- package/icons/photos.js +4 -0
- package/icons/photos.js.map +1 -0
- package/icons/photos.svg +3 -0
- package/icons/plug.js +4 -0
- package/icons/plug.js.map +1 -0
- package/icons/plug.svg +1 -0
- package/icons/refresh.js +4 -0
- package/icons/refresh.js.map +1 -0
- package/icons/refresh.svg +3 -0
- package/icons/reset.js +4 -0
- package/icons/reset.js.map +1 -0
- package/icons/reset.svg +3 -0
- package/icons/ride.js +4 -0
- package/icons/ride.js.map +1 -0
- package/icons/ride.svg +3 -0
- package/icons/search.js +4 -0
- package/icons/search.js.map +1 -0
- package/icons/search.svg +3 -0
- package/icons/service-battery.js +4 -0
- package/icons/service-battery.js.map +1 -0
- package/icons/service-battery.svg +1 -0
- package/icons/service-cleaning.js +4 -0
- package/icons/service-cleaning.js.map +1 -0
- package/icons/service-cleaning.svg +3 -0
- package/icons/service-fuel.js +4 -0
- package/icons/service-fuel.js.map +1 -0
- package/icons/service-fuel.svg +3 -0
- package/icons/service-healing.js +4 -0
- package/icons/service-healing.js.map +1 -0
- package/icons/service-healing.svg +3 -0
- package/icons/service-locked.js +4 -0
- package/icons/service-locked.js.map +1 -0
- package/icons/service-locked.svg +3 -0
- package/icons/service-tolls.js +4 -0
- package/icons/service-tolls.js.map +1 -0
- package/icons/service-tolls.svg +1 -0
- package/icons/service-unlocked.js +4 -0
- package/icons/service-unlocked.js.map +1 -0
- package/icons/service-unlocked.svg +3 -0
- package/icons/settings.js +4 -0
- package/icons/settings.js.map +1 -0
- package/icons/settings.svg +3 -0
- package/icons/share.js +4 -0
- package/icons/share.js.map +1 -0
- package/icons/share.svg +1 -0
- package/icons/shop.js +4 -0
- package/icons/shop.js.map +1 -0
- package/icons/shop.svg +3 -0
- package/icons/social-facebook.js +4 -0
- package/icons/social-facebook.js.map +1 -0
- package/icons/social-facebook.svg +3 -0
- package/icons/social-linkedin.js +4 -0
- package/icons/social-linkedin.js.map +1 -0
- package/icons/social-linkedin.svg +3 -0
- package/icons/social-twitter.js +4 -0
- package/icons/social-twitter.js.map +1 -0
- package/icons/social-twitter.svg +3 -0
- package/icons/social-whatsapp.js +4 -0
- package/icons/social-whatsapp.js.map +1 -0
- package/icons/social-whatsapp.svg +3 -0
- package/icons/star.js +4 -0
- package/icons/star.js.map +1 -0
- package/icons/star.svg +3 -0
- package/icons/subway.js +4 -0
- package/icons/subway.js.map +1 -0
- package/icons/subway.svg +3 -0
- package/icons/time-alert.js +4 -0
- package/icons/time-alert.js.map +1 -0
- package/icons/time-alert.svg +3 -0
- package/icons/time-backwards.js +4 -0
- package/icons/time-backwards.js.map +1 -0
- package/icons/time-backwards.svg +3 -0
- package/icons/time-calendar.js +4 -0
- package/icons/time-calendar.js.map +1 -0
- package/icons/time-calendar.svg +3 -0
- package/icons/time-forward.js +4 -0
- package/icons/time-forward.js.map +1 -0
- package/icons/time-forward.svg +3 -0
- package/icons/train.js +4 -0
- package/icons/train.js.map +1 -0
- package/icons/train.svg +3 -0
- package/icons/user-shield.js +4 -0
- package/icons/user-shield.js.map +1 -0
- package/icons/user-shield.svg +3 -0
- package/icons/verified-seal.js +4 -0
- package/icons/verified-seal.js.map +1 -0
- package/icons/verified-seal.svg +3 -0
- package/icons/wrench.js +4 -0
- package/icons/wrench.js.map +1 -0
- package/icons/wrench.svg +3 -0
- package/images/empty-states/connect-device.png +0 -0
- package/images/empty-states/connect-device@2x.png +0 -0
- package/images/empty-states/connect-device@3x.png +0 -0
- package/images/empty-states/couch-man@2x.png +0 -0
- package/images/empty-states/couch-man@3x.png +0 -0
- package/images/empty-states/customer-service.png +0 -0
- package/images/empty-states/customer-service@2x.png +0 -0
- package/images/empty-states/customer-service@3x.png +0 -0
- package/images/empty-states/fridge-man.png +0 -0
- package/images/empty-states/fridge-man@2x.png +0 -0
- package/images/empty-states/fridge-man@3x.png +0 -0
- package/images/empty-states/generic-list@1x.png +0 -0
- package/images/empty-states/generic-list@2x.png +0 -0
- package/images/empty-states/generic-list@3x.png +0 -0
- package/images/empty-states/location-us.png +0 -0
- package/images/empty-states/location-us@2x.png +0 -0
- package/images/empty-states/location-us@3x.png +0 -0
- package/images/empty-states/location.png +0 -0
- package/images/empty-states/location@2x.png +0 -0
- package/images/empty-states/location@3x.png +0 -0
- package/images/empty-states/maximize-your-earnings.png +0 -0
- package/images/empty-states/maximize-your-earnings@2x.png +0 -0
- package/images/empty-states/maximize-your-earnings@3x.png +0 -0
- package/images/empty-states/nearby-bookings.png +0 -0
- package/images/empty-states/nearby-bookings@2x.png +0 -0
- package/images/empty-states/nearby-bookings@3x.png +0 -0
- package/images/empty-states/network@1x.png +0 -0
- package/images/empty-states/network@2x.png +0 -0
- package/images/empty-states/network@3x.png +0 -0
- package/images/empty-states/owner-with-getaround.png +0 -0
- package/images/empty-states/owner-with-getaround@2x.png +0 -0
- package/images/empty-states/owner-with-getaround@3x.png +0 -0
- package/images/empty-states/payment.png +0 -0
- package/images/empty-states/payment@2x.png +0 -0
- package/images/empty-states/payment@3x.png +0 -0
- package/images/empty-states/rebranded/couch-man@2x.png +0 -0
- package/images/empty-states/rebranded/couch-man@3x.png +0 -0
- package/images/empty-states/rebranded/repair-man@2x.png +0 -0
- package/images/empty-states/rebranded/repair-man@3x.png +0 -0
- package/images/empty-states/rebranded/spotlight-car.png +0 -0
- package/images/empty-states/rebranded/spotlight-car@2x.png +0 -0
- package/images/empty-states/rebranded/spotlight-car@3x.png +0 -0
- package/images/empty-states/repair-man-open.png +0 -0
- package/images/empty-states/repair-man-open@2x.png +0 -0
- package/images/empty-states/repair-man-open@3x.png +0 -0
- package/images/empty-states/repair-man.png +0 -0
- package/images/empty-states/repair-man@2x.png +0 -0
- package/images/empty-states/repair-man@3x.png +0 -0
- package/images/empty-states/seamless-trip.png +0 -0
- package/images/empty-states/seamless-trip@2x.png +0 -0
- package/images/empty-states/seamless-trip@3x.png +0 -0
- package/images/empty-states/searching-trends.png +0 -0
- package/images/empty-states/searching-trends@2x.png +0 -0
- package/images/empty-states/searching-trends@3x.png +0 -0
- package/images/empty-states/spotlight-car.png +0 -0
- package/images/empty-states/spotlight-car@2x.png +0 -0
- package/images/empty-states/spotlight-car@3x.png +0 -0
- package/images/empty-states/telescope.png +0 -0
- package/images/empty-states/telescope@2x.png +0 -0
- package/images/empty-states/telescope@3x.png +0 -0
- package/images/empty-states/thumb-up.png +0 -0
- package/images/empty-states/thumb-up@2x.png +0 -0
- package/images/empty-states/thumb-up@3x.png +0 -0
- package/index.js +160 -0
- package/index.js.map +1 -0
- package/package.json +135 -0
- package/styles/components/Accordion/index.scss +83 -0
- package/styles/components/Alerter/index.scss +54 -0
- package/styles/components/BasicCell/index.scss +61 -0
- package/styles/components/BulletList/index.scss +32 -0
- package/styles/components/Button/index.scss +2 -0
- package/styles/components/Button/legacy.scss +351 -0
- package/styles/components/Buttons/BrandButton/index.scss +57 -0
- package/styles/components/Buttons/DefaultButton/index.scss +74 -0
- package/styles/components/Buttons/GhostButton/index.scss +41 -0
- package/styles/components/Buttons/InversedButton/index.scss +25 -0
- package/styles/components/Buttons/index.scss +193 -0
- package/styles/components/Calendar/CalendarRangePicker/index.scss +345 -0
- package/styles/components/Calendar/CalendarView/index.scss +64 -0
- package/styles/components/Callout/index.scss +64 -0
- package/styles/components/Card/index.scss +92 -0
- package/styles/components/CdwChoice/index.scss +127 -0
- package/styles/components/Cell/index.scss +32 -0
- package/styles/components/Chip/index.scss +93 -0
- package/styles/components/EmptyState/index.scss +34 -0
- package/styles/components/Flag/index.scss +36 -0
- package/styles/components/Flash/index.scss +29 -0
- package/styles/components/Form/Autocomplete/index.scss +158 -0
- package/styles/components/Form/CheckablePill.scss +150 -0
- package/styles/components/Form/Checkmark.scss +202 -0
- package/styles/components/Form/ComposedField.scss +20 -0
- package/styles/components/Form/Fieldset.scss +23 -0
- package/styles/components/Form/Hint.scss +46 -0
- package/styles/components/Form/Select.scss +37 -0
- package/styles/components/Form/Slider.scss +71 -0
- package/styles/components/Form/Stepper.scss +85 -0
- package/styles/components/Form/TextArea.scss +68 -0
- package/styles/components/Form/TextInput.scss +59 -0
- package/styles/components/Form/ToggleSwitch.scss +259 -0
- package/styles/components/Form/field.scss +70 -0
- package/styles/components/Form/form.scss +87 -0
- package/styles/components/Form/index.scss +13 -0
- package/styles/components/Helper/index.scss +16 -0
- package/styles/components/HorizontalList/index.scss +46 -0
- package/styles/components/Icon/index.scss +125 -0
- package/styles/components/Modal/index.scss +103 -0
- package/styles/components/Note/index.scss +18 -0
- package/styles/components/Pill/index.scss +56 -0
- package/styles/components/Popover/index.scss +18 -0
- package/styles/components/PriceTable/index.scss +33 -0
- package/styles/components/ProgressBar/index.scss +57 -0
- package/styles/components/TabBar/index.scss +161 -0
- package/styles/components/Tabs/index.scss +172 -0
- package/styles/components/Tag/index.scss +27 -0
- package/styles/components/TextContainer/index.scss +70 -0
- package/styles/components.scss +29 -0
- package/styles/core/animation.scss +9 -0
- package/styles/core/border-radius.scss +20 -0
- package/styles/core/border.scss +26 -0
- package/styles/core/breakpoints.scss +49 -0
- package/styles/core/card.scss +30 -0
- package/styles/core/color.scss +78 -0
- package/styles/core/cursor.scss +19 -0
- package/styles/core/elevation.scss +18 -0
- package/styles/core/global-variables.scss +2 -0
- package/styles/core/spacing.scss +38 -0
- package/styles/core/text.scss +84 -0
- package/styles/core/typography.scss +246 -0
- package/styles/core/utilities.scss +47 -0
- package/styles/core/z-index.scss +19 -0
- package/styles/core.scss +15 -0
- package/styles/global/spacing.scss +39 -0
- package/styles/global/typography.scss +78 -0
- package/styles/global.scss +2 -0
- package/styles/index.scss +159 -0
- package/tokens/breakpoints.js +13 -0
- package/tokens/breakpoints.js.map +1 -0
- package/tokens/colors.js +45 -0
- package/tokens/colors.js.map +1 -0
- package/tokens/countries.js +18 -0
- package/tokens/countries.js.map +1 -0
- package/tokens/icons.js +120 -0
- package/tokens/icons.js.map +1 -0
- package/tokens/index.js +15 -0
- package/tokens/index.js.map +1 -0
- package/tokens/zIndexes.js +31 -0
- package/tokens/zIndexes.js.map +1 -0
- package/types/__tests__/AsyncComponent.d.ts +5 -0
- package/types/__tests__/mockMatchMedia.d.ts +2 -0
- package/types/components/Accordion/ToggleIcon.d.ts +6 -0
- package/types/components/Accordion/index.d.ts +89 -0
- package/types/components/Alerter/Alert.d.ts +8 -0
- package/types/components/Alerter/index.d.ts +21 -0
- package/types/components/BasicCell/index.d.ts +11 -0
- package/types/components/BulletList/index.d.ts +13 -0
- package/types/components/Button/Button.d.ts +31 -0
- package/types/components/Button/Link.d.ts +31 -0
- package/types/components/Button/index.d.ts +180 -0
- package/types/components/Buttons/BrandButton/index.d.ts +45 -0
- package/types/components/Buttons/ButtonComponent.d.ts +22 -0
- package/types/components/Buttons/ButtonsGroup.d.ts +8 -0
- package/types/components/Buttons/DefaultButton/index.d.ts +51 -0
- package/types/components/Buttons/GhostButton/index.d.ts +48 -0
- package/types/components/Buttons/InversedButton/index.d.ts +10 -0
- package/types/components/Buttons/helpers.d.ts +15 -0
- package/types/components/Buttons/index.d.ts +5 -0
- package/types/components/Calendar/CalendarRangePicker/CalendarRangePicker.d.ts +23 -0
- package/types/components/Calendar/CalendarRangePicker/CalendarRangePickerDay.d.ts +22 -0
- package/types/components/Calendar/CalendarRangePicker/CalendarRangePickerMonth.d.ts +17 -0
- package/types/components/Calendar/CalendarRangePicker/index.d.ts +1 -0
- package/types/components/Calendar/CalendarView/CalendarViewMonth.d.ts +8 -0
- package/types/components/Calendar/CalendarView/index.d.ts +10 -0
- package/types/components/Calendar/CalendarView/types.d.ts +16 -0
- package/types/components/Calendar/index.d.ts +2 -0
- package/types/components/Callout/index.d.ts +9 -0
- package/types/components/Card/index.d.ts +30 -0
- package/types/components/CdwChoice/index.d.ts +9 -0
- package/types/components/Cell/index.d.ts +20 -0
- package/types/components/Chip/index.d.ts +16 -0
- package/types/components/EmptyState/index.d.ts +10 -0
- package/types/components/Flag/index.d.ts +15 -0
- package/types/components/Flash/index.d.ts +7 -0
- package/types/components/Form/Autocomplete/index.d.ts +47 -0
- package/types/components/Form/CheckablePill.d.ts +30 -0
- package/types/components/Form/Checkmark.d.ts +26 -0
- package/types/components/Form/ComposedField.d.ts +16 -0
- package/types/components/Form/Fieldset.d.ts +7 -0
- package/types/components/Form/Hint.d.ts +7 -0
- package/types/components/Form/Select.d.ts +16 -0
- package/types/components/Form/Slider.d.ts +128 -0
- package/types/components/Form/Stepper.d.ts +34 -0
- package/types/components/Form/TextArea.d.ts +19 -0
- package/types/components/Form/TextInput.d.ts +25 -0
- package/types/components/Form/ToggleSwitch.d.ts +11 -0
- package/types/components/Form/field.d.ts +15 -0
- package/types/components/Form/form.d.ts +4 -0
- package/types/components/Helper/index.d.ts +11 -0
- package/types/components/HorizontalList/index.d.ts +12 -0
- package/types/components/Icon/__generated__/AirportIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ArrowLeftIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ArrowRightIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/BinIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/BriefcaseIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/BulbIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CameraIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarCheckIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarDrivyOpenIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarGroupIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarLockIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarSearchIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarTypeAntiqueIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarTypeCabrioletIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarTypeCampervanIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarTypeCityIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarTypeConvertibleIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarTypeCoupeIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarTypeFamilyIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarTypeFourFourIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarTypeMinibusIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarTypeSedanIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CarTypeUtilityIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CheckCircleIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CheckIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ChevronDownIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ChevronLeftIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ChevronRightIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ChevronUpIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CloseIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ContactMailIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ContactPhoneIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ContextualPaperclipIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ContextualQuestionIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ContextualWarningCircleFilledIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ContextualWarningCircleIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/CreditCardIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/DirectionsIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/DotsHorizontalIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/DotsVerticalIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/DownloadIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/EarthIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/EditIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ExternalLinkIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/EyeIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/FiltersIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/FlagIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/GeolocationIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/GraphUpIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/IncidentIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/InfoFilledIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/InfoIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/InstantIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/KeyIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/LoadingIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/LocalityIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/LocationMapIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/LocationParkingIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/LocationPinIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/LogoutIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/MeetDriverIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/MeetOwnerIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/MenuListIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/MileageIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/MiscGiftIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/NotificationIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionAirConditioningIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionAudioInputIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionBabySeatIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionBikeRackIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionCdPlayerIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionChainsIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionCruiseControlIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionGpsIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionHasTrailerIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionHitchIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionRoofBoxIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionSkiRackIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionSnowTireIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/OptionWheelchairAccessibleIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/PeopleUserIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/PhotosIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/PlugIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/RefreshIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ResetIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/RideIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/SearchIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ServiceBatteryIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ServiceCleaningIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ServiceFuelIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ServiceHealingIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ServiceLockedIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ServiceTollsIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ServiceUnlockedIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/SettingsIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ShareIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/ShopIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/SocialFacebookIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/SocialLinkedinIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/SocialTwitterIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/SocialWhatsappIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/StarIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/SubwayIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/TimeAlertIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/TimeBackwardsIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/TimeCalendarIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/TimeForwardIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/TrainIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/UserShieldIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/VerifiedSealIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/WrenchIcon.d.ts +10 -0
- package/types/components/Icon/__generated__/index.d.ts +112 -0
- package/types/components/Icon/index.d.ts +28 -0
- package/types/components/Icon/index.spec.d.ts +1 -0
- package/types/components/Modal/ModalBody.d.ts +7 -0
- package/types/components/Modal/ModalFooter.d.ts +6 -0
- package/types/components/Modal/ModalHeader.d.ts +6 -0
- package/types/components/Modal/index.d.ts +54 -0
- package/types/components/ModalOpenerButton/index.d.ts +14 -0
- package/types/components/Note/index.d.ts +12 -0
- package/types/components/Pill/index.d.ts +16 -0
- package/types/components/Popover/LazyTippy.d.ts +4 -0
- package/types/components/Popover/index.d.ts +25 -0
- package/types/components/PriceTable/index.d.ts +11 -0
- package/types/components/ProgressBar/index.d.ts +11 -0
- package/types/components/TabBar/index.d.ts +14 -0
- package/types/components/Tabs/index.d.ts +30 -0
- package/types/components/Tag/index.d.ts +6 -0
- package/types/components/TextContainer/index.d.ts +5 -0
- package/types/components/utils/Timer.d.ts +13 -0
- package/types/components/utils/Timer.spec.d.ts +1 -0
- package/types/components/utils/camelize.d.ts +2 -0
- package/types/components/utils/capitalize.d.ts +2 -0
- package/types/components/utils/dom.d.ts +1 -0
- package/types/components/utils/eqSet.d.ts +2 -0
- package/types/components/utils/getThemeColors.d.ts +2 -0
- package/types/components/utils/getThemeColors.spec.d.ts +1 -0
- package/types/components/utils/index.d.ts +9 -0
- package/types/components/utils/isExpectedReactComponent.d.ts +3 -0
- package/types/components/utils/isExpectedReactComponent.spec.d.ts +1 -0
- package/types/components/utils/px.d.ts +1 -0
- package/types/hooks/useBreakpoint.d.ts +11 -0
- package/types/hooks/useBreakpoint.spec.d.ts +1 -0
- package/types/hooks/useElementHeight.d.ts +13 -0
- package/types/icons/countries/index.d.ts +10 -0
- package/types/icons/index.d.ts +112 -0
- package/types/index.d.ts +47 -0
- package/types/tokens/index.d.ts +187 -0
- package/types/tokens/index.spec.d.ts +1 -0
- package/utilities.css +11201 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
|
|
4
|
+
var BasicCell = function (_a) {
|
|
5
|
+
var leftAddonIcon = _a.leftAddonIcon, leftAddonThumbUrl = _a.leftAddonThumbUrl, leftAddonThumbAlt = _a.leftAddonThumbAlt, title = _a.title, children = _a.children, rightAddonIcon = _a.rightAddonIcon, _b = _a.large, large = _b === void 0 ? false : _b;
|
|
6
|
+
var leftAddon = null;
|
|
7
|
+
if (leftAddonIcon != null)
|
|
8
|
+
leftAddon = leftAddonIcon;
|
|
9
|
+
else if (leftAddonThumbUrl != null) {
|
|
10
|
+
var leftAddonThumbSize = large ? 64 : 44;
|
|
11
|
+
leftAddon = (React.createElement("div", { className: "cobalt-BasicCell__Thumb" },
|
|
12
|
+
React.createElement("img", { src: leftAddonThumbUrl, alt: leftAddonThumbAlt, width: leftAddonThumbSize, height: leftAddonThumbSize })));
|
|
13
|
+
}
|
|
14
|
+
return (React.createElement("div", { className: cx("cobalt-BasicCell", {
|
|
15
|
+
"cobalt-BasicCell--large": large === true,
|
|
16
|
+
}) },
|
|
17
|
+
leftAddon != null && (React.createElement("div", { className: "cobalt-BasicCell__LeftAddon" }, leftAddon)),
|
|
18
|
+
React.createElement("div", { className: "cobalt-BasicCell__Main" },
|
|
19
|
+
React.createElement("div", { className: "cobalt-BasicCell__Title" }, title),
|
|
20
|
+
React.createElement("div", { className: "cobalt-BasicCell__Content" }, children)),
|
|
21
|
+
rightAddonIcon != null && (React.createElement("div", { className: "cobalt-BasicCell__RightAddonIcon" }, rightAddonIcon))));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { BasicCell };
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/BasicCell/index.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\n\nexport interface BasicCellProps {\n children: React.ReactNode\n leftAddonIcon?: React.ReactNode\n leftAddonThumbUrl?: string\n leftAddonThumbAlt?: string\n title: string\n rightAddonIcon?: React.ReactNode\n large?: boolean\n}\n\nexport const BasicCell = ({\n leftAddonIcon,\n leftAddonThumbUrl,\n leftAddonThumbAlt,\n title,\n children,\n rightAddonIcon,\n large = false,\n}: BasicCellProps) => {\n let leftAddon: React.ReactNode | BasicCellProps[\"leftAddonIcon\"] | null = null\n\n if (leftAddonIcon != null) leftAddon = leftAddonIcon\n else if (leftAddonThumbUrl != null) {\n const leftAddonThumbSize = large ? 64 : 44\n leftAddon = (\n <div className=\"cobalt-BasicCell__Thumb\">\n <img\n src={leftAddonThumbUrl}\n alt={leftAddonThumbAlt}\n width={leftAddonThumbSize}\n height={leftAddonThumbSize}\n />\n </div>\n )\n }\n\n return (\n <div\n className={cx(\"cobalt-BasicCell\", {\n \"cobalt-BasicCell--large\": large === true,\n })}\n >\n {leftAddon != null && (\n <div className=\"cobalt-BasicCell__LeftAddon\">{leftAddon}</div>\n )}\n <div className=\"cobalt-BasicCell__Main\">\n <div className=\"cobalt-BasicCell__Title\">{title}</div>\n <div className=\"cobalt-BasicCell__Content\">{children}</div>\n </div>\n {rightAddonIcon != null && (\n <div className=\"cobalt-BasicCell__RightAddonIcon\">{rightAddonIcon}</div>\n )}\n </div>\n )\n}\n"],"names":[],"mappings":";;;IAaa,SAAS,GAAG,UAAC,EAQT;QAPf,aAAa,mBAAA,EACb,iBAAiB,uBAAA,EACjB,iBAAiB,uBAAA,EACjB,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,cAAc,oBAAA,EACd,aAAa,EAAb,KAAK,mBAAG,KAAK,KAAA;IAEb,IAAI,SAAS,GAA6D,IAAI,CAAA;IAE9E,IAAI,aAAa,IAAI,IAAI;QAAE,SAAS,GAAG,aAAa,CAAA;SAC/C,IAAI,iBAAiB,IAAI,IAAI,EAAE;QAClC,IAAM,kBAAkB,GAAG,KAAK,GAAG,EAAE,GAAG,EAAE,CAAA;QAC1C,SAAS,IACP,6BAAK,SAAS,EAAC,yBAAyB;YACtC,6BACE,GAAG,EAAE,iBAAiB,EACtB,GAAG,EAAE,iBAAiB,EACtB,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,kBAAkB,GAC1B,CACE,CACP,CAAA;KACF;IAED,QACE,6BACE,SAAS,EAAE,EAAE,CAAC,kBAAkB,EAAE;YAChC,yBAAyB,EAAE,KAAK,KAAK,IAAI;SAC1C,CAAC;QAED,SAAS,IAAI,IAAI,KAChB,6BAAK,SAAS,EAAC,6BAA6B,IAAE,SAAS,CAAO,CAC/D;QACD,6BAAK,SAAS,EAAC,wBAAwB;YACrC,6BAAK,SAAS,EAAC,yBAAyB,IAAE,KAAK,CAAO;YACtD,6BAAK,SAAS,EAAC,2BAA2B,IAAE,QAAQ,CAAO,CACvD;QACL,cAAc,IAAI,IAAI,KACrB,6BAAK,SAAS,EAAC,kCAAkC,IAAE,cAAc,CAAO,CACzE,CACG,EACP;AACH;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
|
|
4
|
+
var BulletList = function (_a) {
|
|
5
|
+
var children = _a.children, _b = _a.iconPosition, iconPosition = _b === void 0 ? "centered" : _b;
|
|
6
|
+
return (React.createElement("ul", { className: cx("cobalt-BulletList", {
|
|
7
|
+
"cobalt-BulletList--iconPositionTop": iconPosition === "top",
|
|
8
|
+
}) }, children));
|
|
9
|
+
};
|
|
10
|
+
var BulletListItem = function (_a) {
|
|
11
|
+
var children = _a.children, icon = _a.icon;
|
|
12
|
+
return (React.createElement("li", { className: "cobalt-BulletListItem" },
|
|
13
|
+
React.createElement("span", { className: "cobalt-BulletListItem__Icon" }, icon),
|
|
14
|
+
React.createElement("p", { className: "cobalt-BulletListItem__Content" }, children)));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { BulletList, BulletListItem };
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/BulletList/index.tsx"],"sourcesContent":["import React from \"react\"\nimport classNames from \"classnames\"\nimport { Icon } from \"../Icon\"\n\ninterface BulletListProps {\n children: React.ReactNode\n iconPosition?: \"top\" | \"centered\"\n}\n\nexport const BulletList = ({\n children,\n iconPosition = \"centered\",\n}: BulletListProps) => (\n <ul\n className={classNames(\"cobalt-BulletList\", {\n \"cobalt-BulletList--iconPositionTop\": iconPosition === \"top\",\n })}\n >\n {children}\n </ul>\n)\n\ninterface BulletListItemProps {\n children: React.ReactNode\n icon: typeof Icon\n}\n\nexport const BulletListItem = ({ children, icon }: BulletListItemProps) => (\n <li className=\"cobalt-BulletListItem\">\n <span className=\"cobalt-BulletListItem__Icon\">{icon}</span>\n <p className=\"cobalt-BulletListItem__Content\">{children}</p>\n </li>\n)\n"],"names":["classNames"],"mappings":";;;IASa,UAAU,GAAG,UAAC,EAGT;QAFhB,QAAQ,cAAA,EACR,oBAAyB,EAAzB,YAAY,mBAAG,UAAU,KAAA;IACJ,QACrB,4BACE,SAAS,EAAEA,EAAU,CAAC,mBAAmB,EAAE;YACzC,oCAAoC,EAAE,YAAY,KAAK,KAAK;SAC7D,CAAC,IAED,QAAQ,CACN;AAPgB,EAQtB;IAOY,cAAc,GAAG,UAAC,EAAuC;QAArC,QAAQ,cAAA,EAAE,IAAI,UAAA;IAA4B,QACzE,4BAAI,SAAS,EAAC,uBAAuB;QACnC,8BAAM,SAAS,EAAC,6BAA6B,IAAE,IAAI,CAAQ;QAC3D,2BAAG,SAAS,EAAC,gCAAgC,IAAE,QAAQ,CAAK,CACzD;AAJoE;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../_virtual/_tslib.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import BrandButton from '../Buttons/BrandButton/index.js';
|
|
4
|
+
import GhostButton from '../Buttons/GhostButton/index.js';
|
|
5
|
+
import InversedButton from '../Buttons/InversedButton/index.js';
|
|
6
|
+
import DefaultButton from '../Buttons/DefaultButton/index.js';
|
|
7
|
+
import { isLinkProps } from '../Buttons/ButtonComponent.js';
|
|
8
|
+
|
|
9
|
+
var isBrandButtonProps = function (props) { return "brand" in props && !isLinkProps(props); };
|
|
10
|
+
var isInversedButtonProps = function (props) {
|
|
11
|
+
return "inversed" in props && props.inversed === true && !isLinkProps(props);
|
|
12
|
+
};
|
|
13
|
+
var isGhostButtonProps = function (props) {
|
|
14
|
+
return "ghost" in props && props.ghost === true && !isLinkProps(props);
|
|
15
|
+
};
|
|
16
|
+
var isDefaultButtonProps = function (props) {
|
|
17
|
+
return !isBrandButtonProps(props) &&
|
|
18
|
+
!isGhostButtonProps(props) &&
|
|
19
|
+
!isInversedButtonProps(props);
|
|
20
|
+
};
|
|
21
|
+
var Button = function (props) {
|
|
22
|
+
var forwardedRef = props.forwardedRef, restButtonProps = __rest(props
|
|
23
|
+
// We extract here API only props to not passed them and we pass some
|
|
24
|
+
// common props directly
|
|
25
|
+
, ["forwardedRef"]);
|
|
26
|
+
// We extract here API only props to not passed them and we pass some
|
|
27
|
+
// common props directly
|
|
28
|
+
if (isBrandButtonProps(restButtonProps)) {
|
|
29
|
+
return React.createElement(BrandButton, __assign({}, restButtonProps, { ref: forwardedRef }));
|
|
30
|
+
}
|
|
31
|
+
else if (isInversedButtonProps(restButtonProps)) {
|
|
32
|
+
// inversed is a props only used for API here
|
|
33
|
+
restButtonProps.inversed; var restProps = __rest(restButtonProps, ["inversed"]);
|
|
34
|
+
return React.createElement(InversedButton, __assign({}, restProps, { ref: forwardedRef }));
|
|
35
|
+
}
|
|
36
|
+
else if (isGhostButtonProps(restButtonProps)) {
|
|
37
|
+
// ghost is a props only used for API here
|
|
38
|
+
restButtonProps.ghost; var restProps = __rest(restButtonProps, ["ghost"]);
|
|
39
|
+
return React.createElement(GhostButton, __assign({}, restProps, { ref: forwardedRef }));
|
|
40
|
+
}
|
|
41
|
+
else if (isDefaultButtonProps(restButtonProps)) {
|
|
42
|
+
return React.createElement(DefaultButton, __assign({}, restButtonProps, { ref: forwardedRef }));
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
throw new Error("[Cobalt]: Unexpected Button Component props error");
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { Button as default };
|
|
50
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import React, { Ref } from \"react\"\n\nimport Brand, { BrandButtonPropsType } from \"../Buttons/BrandButton\"\nimport Ghost, { GhostButtonPropsType } from \"../Buttons/GhostButton\"\nimport Inversed, { InversedButtonPropsType } from \"../Buttons/InversedButton\"\nimport Default, { DefaultButtonPropsType } from \"../Buttons/DefaultButton\"\nimport { isLinkProps } from \"../Buttons/ButtonComponent\"\n\ntype withButtonRef<Props> = Props & { forwardedRef?: Ref<HTMLButtonElement> }\n\n/**\n * We add API only props here since it's not related to the Buttons subcomponents\n */\ntype BrandButtonAPIPropsType = BrandButtonPropsType\ntype InversedButtonAPIPropsType = InversedButtonPropsType & { inversed?: true }\ntype GhostButtonAPIPropsType = GhostButtonPropsType & { ghost?: true }\ntype DefaultButtonAPIPropsType = DefaultButtonPropsType\n\n/**\n * Overloads\n */\ntype ButtonOverload = {\n (props: withButtonRef<BrandButtonAPIPropsType>): JSX.Element\n (props: withButtonRef<InversedButtonAPIPropsType>): JSX.Element\n (props: withButtonRef<GhostButtonAPIPropsType>): JSX.Element\n (props: withButtonRef<DefaultButtonAPIPropsType>): JSX.Element\n}\n\nexport type ButtonPropsType =\n | withButtonRef<BrandButtonAPIPropsType>\n | withButtonRef<InversedButtonAPIPropsType>\n | withButtonRef<GhostButtonAPIPropsType>\n | withButtonRef<DefaultButtonAPIPropsType>\n\nconst isBrandButtonProps = (\n props: ButtonPropsType\n): props is BrandButtonAPIPropsType => \"brand\" in props && !isLinkProps(props)\n\nconst isInversedButtonProps = (\n props: ButtonPropsType\n): props is InversedButtonAPIPropsType =>\n \"inversed\" in props && props.inversed === true && !isLinkProps(props)\n\nconst isGhostButtonProps = (\n props: ButtonPropsType\n): props is GhostButtonAPIPropsType =>\n \"ghost\" in props && props.ghost === true && !isLinkProps(props)\n\nconst isDefaultButtonProps = (\n props: ButtonPropsType\n): props is DefaultButtonAPIPropsType =>\n !isBrandButtonProps(props) &&\n !isGhostButtonProps(props) &&\n !isInversedButtonProps(props)\n\nconst Button: ButtonOverload = (props: ButtonPropsType) => {\n const { forwardedRef, ...restButtonProps } = props\n\n // We extract here API only props to not passed them and we pass some\n // common props directly\n if (isBrandButtonProps(restButtonProps)) {\n return <Brand {...restButtonProps} ref={forwardedRef} />\n } else if (isInversedButtonProps(restButtonProps)) {\n // inversed is a props only used for API here\n const { inversed: _inversed, ...restProps } = restButtonProps\n return <Inversed {...restProps} ref={forwardedRef} />\n } else if (isGhostButtonProps(restButtonProps)) {\n // ghost is a props only used for API here\n const { ghost: _ghost, ...restProps } = restButtonProps\n return <Ghost {...restProps} ref={forwardedRef} />\n } else if (isDefaultButtonProps(restButtonProps)) {\n return <Default {...restButtonProps} ref={forwardedRef} />\n } else {\n throw new Error(\"[Cobalt]: Unexpected Button Component props error\")\n }\n}\n\nexport default Button\n"],"names":["Brand","Inversed","Ghost","Default"],"mappings":";;;;;;;;AAkCA,IAAM,kBAAkB,GAAG,UACzB,KAAsB,IACe,OAAA,OAAO,IAAI,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAA,CAAA;AAE9E,IAAM,qBAAqB,GAAG,UAC5B,KAAsB;IAEtB,OAAA,UAAU,IAAI,KAAK,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAArE,CAAqE,CAAA;AAEvE,IAAM,kBAAkB,GAAG,UACzB,KAAsB;IAEtB,OAAA,OAAO,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAA/D,CAA+D,CAAA;AAEjE,IAAM,oBAAoB,GAAG,UAC3B,KAAsB;IAEtB,OAAA,CAAC,kBAAkB,CAAC,KAAK,CAAC;QAC1B,CAAC,kBAAkB,CAAC,KAAK,CAAC;QAC1B,CAAC,qBAAqB,CAAC,KAAK,CAAC;AAF7B,CAE6B,CAAA;IAEzB,MAAM,GAAmB,UAAC,KAAsB;IAC5C,IAAA,YAAY,GAAyB,KAAK,aAA9B,EAAK,eAAe,UAAK,KAAK;;;MAA5C,gBAAoC,CAAF,CAAU;;;IAIlD,IAAI,kBAAkB,CAAC,eAAe,CAAC,EAAE;QACvC,OAAO,oBAACA,WAAK,eAAK,eAAe,IAAE,GAAG,EAAE,YAAY,IAAI,CAAA;KACzD;SAAM,IAAI,qBAAqB,CAAC,eAAe,CAAC,EAAE;;QAEH,eAAe,SAAlC,MAAK,SAAS,UAAK,eAAe,EAAvD,YAAqC,EAAkB;QAC7D,OAAO,oBAACC,cAAQ,eAAK,SAAS,IAAE,GAAG,EAAE,YAAY,IAAI,CAAA;KACtD;SAAM,IAAI,kBAAkB,CAAC,eAAe,CAAC,EAAE;;QAEN,eAAe,MAAlC,MAAK,SAAS,UAAK,eAAe,EAAjD,SAA+B,EAAkB;QACvD,OAAO,oBAACC,WAAK,eAAK,SAAS,IAAE,GAAG,EAAE,YAAY,IAAI,CAAA;KACnD;SAAM,IAAI,oBAAoB,CAAC,eAAe,CAAC,EAAE;QAChD,OAAO,oBAACC,aAAO,eAAK,eAAe,IAAE,GAAG,EAAE,YAAY,IAAI,CAAA;KAC3D;SAAM;QACL,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;KACrE;AACH;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../_virtual/_tslib.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import BrandButton from '../Buttons/BrandButton/index.js';
|
|
4
|
+
import GhostButton from '../Buttons/GhostButton/index.js';
|
|
5
|
+
import InversedButton from '../Buttons/InversedButton/index.js';
|
|
6
|
+
import DefaultButton from '../Buttons/DefaultButton/index.js';
|
|
7
|
+
import { isLinkProps } from '../Buttons/ButtonComponent.js';
|
|
8
|
+
|
|
9
|
+
var isBrandLinkProps = function (props) { return "brand" in props && isLinkProps(props); };
|
|
10
|
+
var isInversedLinkProps = function (props) {
|
|
11
|
+
return "inversed" in props && props.inversed === true && isLinkProps(props);
|
|
12
|
+
};
|
|
13
|
+
var isGhostLinkProps = function (props) {
|
|
14
|
+
return "ghost" in props && props.ghost === true && isLinkProps(props);
|
|
15
|
+
};
|
|
16
|
+
var isDefaultLinkProps = function (props) {
|
|
17
|
+
return !isBrandLinkProps(props) &&
|
|
18
|
+
!isGhostLinkProps(props) &&
|
|
19
|
+
!isInversedLinkProps(props);
|
|
20
|
+
};
|
|
21
|
+
var Link = function (props) {
|
|
22
|
+
var forwardedRef = props.forwardedRef, restLinkProps = __rest(props
|
|
23
|
+
// We extract here specific button props
|
|
24
|
+
// disabled props must be passed to provided a11y related attributes
|
|
25
|
+
, ["forwardedRef"]);
|
|
26
|
+
// We extract here specific button props
|
|
27
|
+
// disabled props must be passed to provided a11y related attributes
|
|
28
|
+
if (isBrandLinkProps(restLinkProps)) {
|
|
29
|
+
return React.createElement(BrandButton.Link, __assign({}, restLinkProps, { ref: forwardedRef }));
|
|
30
|
+
}
|
|
31
|
+
else if (isInversedLinkProps(restLinkProps)) {
|
|
32
|
+
// inversed is a props only used for API here
|
|
33
|
+
restLinkProps.inversed; var restProps = __rest(restLinkProps, ["inversed"]);
|
|
34
|
+
return React.createElement(InversedButton.Link, __assign({}, restProps, { ref: forwardedRef }));
|
|
35
|
+
}
|
|
36
|
+
else if (isGhostLinkProps(restLinkProps)) {
|
|
37
|
+
// ghost is a props only used for API here
|
|
38
|
+
restLinkProps.ghost; var restProps = __rest(restLinkProps, ["ghost"]);
|
|
39
|
+
return React.createElement(GhostButton.Link, __assign({}, restProps, { ref: forwardedRef }));
|
|
40
|
+
}
|
|
41
|
+
else if (isDefaultLinkProps(restLinkProps)) {
|
|
42
|
+
return React.createElement(DefaultButton.Link, __assign({}, restLinkProps, { ref: forwardedRef }));
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
throw new Error("[Cobalt]: Unexpected Button.Link Component props error");
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { Link as default };
|
|
50
|
+
//# sourceMappingURL=Link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.js","sources":["../../../src/components/Button/Link.tsx"],"sourcesContent":["import React, { Ref } from \"react\"\n\nimport Brand, { BrandLinkPropsType } from \"../Buttons/BrandButton\"\nimport Ghost, { GhostLinkPropsType } from \"../Buttons/GhostButton\"\nimport Inversed, { InversedLinkPropsType } from \"../Buttons/InversedButton\"\nimport Default, { DefaultLinkPropsType } from \"../Buttons/DefaultButton\"\nimport { isLinkProps } from \"../Buttons/ButtonComponent\"\n\ntype withAnchorRef<Props> = Props & { forwardedRef?: Ref<HTMLAnchorElement> }\n\n/**\n * We add API only props here since it's not related to the Buttons subcomponents\n */\n\ntype BrandLinkAPIPropsType = BrandLinkPropsType\ntype InversedLinkAPIPropsType = InversedLinkPropsType & { inversed?: true }\ntype GhostLinkAPIPropsType = GhostLinkPropsType & { ghost?: true }\ntype DefaultLinkAPIPropsType = DefaultLinkPropsType\n\n/**\n * Overloads\n */\ntype LinkOverload = {\n (props: withAnchorRef<BrandLinkAPIPropsType>): JSX.Element\n (props: withAnchorRef<InversedLinkAPIPropsType>): JSX.Element\n (props: withAnchorRef<GhostLinkAPIPropsType>): JSX.Element\n (props: withAnchorRef<DefaultLinkAPIPropsType>): JSX.Element\n}\n\nexport type ButtonLinkPropsType =\n | withAnchorRef<BrandLinkAPIPropsType>\n | withAnchorRef<InversedLinkAPIPropsType>\n | withAnchorRef<GhostLinkAPIPropsType>\n | withAnchorRef<DefaultLinkAPIPropsType>\n\nconst isBrandLinkProps = (\n props: ButtonLinkPropsType\n): props is BrandLinkAPIPropsType => \"brand\" in props && isLinkProps(props)\n\nconst isInversedLinkProps = (\n props: ButtonLinkPropsType\n): props is InversedLinkAPIPropsType =>\n \"inversed\" in props && props.inversed === true && isLinkProps(props)\n\nconst isGhostLinkProps = (\n props: ButtonLinkPropsType\n): props is GhostLinkAPIPropsType =>\n \"ghost\" in props && props.ghost === true && isLinkProps(props)\n\nconst isDefaultLinkProps = (\n props: ButtonLinkPropsType\n): props is DefaultLinkAPIPropsType =>\n !isBrandLinkProps(props) &&\n !isGhostLinkProps(props) &&\n !isInversedLinkProps(props)\n\nconst Link: LinkOverload = (props: ButtonLinkPropsType) => {\n const { forwardedRef, ...restLinkProps } = props\n\n // We extract here specific button props\n // disabled props must be passed to provided a11y related attributes\n if (isBrandLinkProps(restLinkProps)) {\n return <Brand.Link {...restLinkProps} ref={forwardedRef} />\n } else if (isInversedLinkProps(restLinkProps)) {\n // inversed is a props only used for API here\n const { inversed: _inversed, ...restProps } = restLinkProps\n return <Inversed.Link {...restProps} ref={forwardedRef} />\n } else if (isGhostLinkProps(restLinkProps)) {\n // ghost is a props only used for API here\n const { ghost: _ghost, ...restProps } = restLinkProps\n return <Ghost.Link {...restProps} ref={forwardedRef} />\n } else if (isDefaultLinkProps(restLinkProps)) {\n return <Default.Link {...restLinkProps} ref={forwardedRef} />\n } else {\n throw new Error(\"[Cobalt]: Unexpected Button.Link Component props error\")\n }\n}\n\nexport default Link\n"],"names":["Brand","Inversed","Ghost","Default"],"mappings":";;;;;;;;AAmCA,IAAM,gBAAgB,GAAG,UACvB,KAA0B,IACS,OAAA,OAAO,IAAI,KAAK,IAAI,WAAW,CAAC,KAAK,CAAC,GAAA,CAAA;AAE3E,IAAM,mBAAmB,GAAG,UAC1B,KAA0B;IAE1B,OAAA,UAAU,IAAI,KAAK,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,WAAW,CAAC,KAAK,CAAC;AAApE,CAAoE,CAAA;AAEtE,IAAM,gBAAgB,GAAG,UACvB,KAA0B;IAE1B,OAAA,OAAO,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,IAAI,WAAW,CAAC,KAAK,C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|
+
|
|
5
|
+
var ButtonGroup = ButtonsGroup;
|
|
6
|
+
var Button = Object.assign(Button$1, { Link: Link });
|
|
7
|
+
|
|
8
|
+
export { Button, ButtonGroup, Button as default };
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Button/index.tsx"],"sourcesContent":["// We have to import react to avoid TS using reference directives here\nimport _React from \"react\"\nimport _Button from \"./Button\"\nimport Link from \"./Link\"\nimport { ButtonPropsType as _ButtonPropsType } from \"./Button\"\nimport { ButtonLinkPropsType as _ButtonLinkPropsType } from \"./Link\"\nimport _ButtonGroup, {\n ButtonsGroupProps as _ButtonGroupProps,\n} from \"../Buttons/ButtonsGroup\"\n\n// We have to export types differently from modules\n// https://github.com/babel/babel/issues/8361\n// https://github.com/babel/babel-loader/issues/603#issuecomment-601682451\nexport type ButtonPropsType = _ButtonPropsType\nexport type ButtonLinkPropsType = _ButtonLinkPropsType\nexport type ButtonGroupProps = _ButtonGroupProps\n\nexport const ButtonGroup = _ButtonGroup\n\nexport const Button = Object.assign(_Button, { Link })\n\nexport default Button\n"],"names":["_ButtonGroup","_Button"],"mappings":";;;;IAiBa,WAAW,GAAGA,aAAY;IAE1B,MAAM,GAAG,MAAM,CAAC,MAAM,CAACC,QAAO,EAAE,EAAE,IAAI,MAAA,EAAE;;;;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../../_virtual/_tslib.js';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
import { getButtonContent, getButtonCommonClassNames } from '../helpers.js';
|
|
5
|
+
import Button from '../ButtonComponent.js';
|
|
6
|
+
|
|
7
|
+
var getComputedClassName = function (_a) {
|
|
8
|
+
var className = _a.className, brand = _a.brand;
|
|
9
|
+
return cx(className, "cob-Button__brand", {
|
|
10
|
+
"cob-Button__brand--gmail": brand === "gmail",
|
|
11
|
+
"cob-Button__brand--facebook": brand === "facebook",
|
|
12
|
+
"cob-Button__brand--twitter": brand === "twitter",
|
|
13
|
+
"cob-Button__brand--whatsapp": brand === "whatsapp",
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
var _BrandButton = forwardRef(function (props, ref) {
|
|
17
|
+
var children = props.children, brand = props.brand, icon = props.icon, iconPosition = props.iconPosition, className = props.className, loading = props.loading, disabled = props.disabled, rounded = props.rounded, size = props.size, fullWidth = props.fullWidth, restButtonProps = __rest(props, ["children", "brand", "icon", "iconPosition", "className", "loading", "disabled", "rounded", "size", "fullWidth"]);
|
|
18
|
+
var content = getButtonContent({ children: children, icon: icon, iconPosition: iconPosition });
|
|
19
|
+
var isDisabled = disabled || loading;
|
|
20
|
+
var buttonClassNames = getButtonCommonClassNames({
|
|
21
|
+
disabled: isDisabled,
|
|
22
|
+
rounded: rounded,
|
|
23
|
+
size: size,
|
|
24
|
+
fullWidth: fullWidth,
|
|
25
|
+
className: className,
|
|
26
|
+
});
|
|
27
|
+
return (React.createElement(Button, __assign({}, restButtonProps, { className: getComputedClassName({
|
|
28
|
+
className: buttonClassNames,
|
|
29
|
+
brand: brand,
|
|
30
|
+
}), ref: ref, loading: loading, disabled: isDisabled }), content));
|
|
31
|
+
});
|
|
32
|
+
_BrandButton.displayName = "BrandButton";
|
|
33
|
+
var BrandLink = forwardRef(function (props, ref) {
|
|
34
|
+
var children = props.children, brand = props.brand, icon = props.icon, iconPosition = props.iconPosition, className = props.className, loading = props.loading, disabled = props.disabled, rounded = props.rounded, size = props.size, fullWidth = props.fullWidth, restLinkProps = __rest(props, ["children", "brand", "icon", "iconPosition", "className", "loading", "disabled", "rounded", "size", "fullWidth"]);
|
|
35
|
+
var content = getButtonContent({ children: children, icon: icon, iconPosition: iconPosition });
|
|
36
|
+
var isDisabled = disabled || loading;
|
|
37
|
+
var buttonClassNames = getButtonCommonClassNames({
|
|
38
|
+
disabled: isDisabled,
|
|
39
|
+
rounded: rounded,
|
|
40
|
+
size: size,
|
|
41
|
+
fullWidth: fullWidth,
|
|
42
|
+
className: className,
|
|
43
|
+
});
|
|
44
|
+
return (React.createElement(Button.Link, __assign({}, restLinkProps, { className: getComputedClassName({
|
|
45
|
+
className: buttonClassNames,
|
|
46
|
+
brand: brand,
|
|
47
|
+
}), ref: ref, loading: loading, disabled: isDisabled }), content));
|
|
48
|
+
});
|
|
49
|
+
BrandLink.displayName = "BrandLink";
|
|
50
|
+
var BrandButton = Object.assign(_BrandButton, { Link: BrandLink });
|
|
51
|
+
|
|
52
|
+
export { BrandButton as default };
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Buttons/BrandButton/index.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\"\nimport cx from \"classnames\"\n\nimport {\n ButtonTemplatePropsType,\n getButtonContent,\n getButtonCommonClassNames,\n} from \"../helpers\"\nimport Button, { ButtonProps, LinkProps } from \"../ButtonComponent\"\n\ntype BrandCommonPropsType = ButtonTemplatePropsType<{\n brand?: \"gmail\" | \"facebook\" | \"twitter\" | \"whatsapp\"\n}>\n\nexport type BrandButtonPropsType = BrandCommonPropsType & ButtonProps\nexport type BrandLinkPropsType = BrandCommonPropsType & LinkProps\n\nconst getComputedClassName = ({ className, brand }: BrandCommonPropsType) =>\n cx(className, \"cob-Button__brand\", {\n \"cob-Button__brand--gmail\": brand === \"gmail\",\n \"cob-Button__brand--facebook\": brand === \"facebook\",\n \"cob-Button__brand--twitter\": brand === \"twitter\",\n \"cob-Button__brand--whatsapp\": brand === \"whatsapp\",\n })\n\nconst _BrandButton = forwardRef<HTMLButtonElement, BrandButtonPropsType>(\n (props: BrandButtonPropsType, ref) => {\n const {\n children,\n brand,\n icon,\n iconPosition,\n className,\n loading,\n disabled,\n rounded,\n size,\n fullWidth,\n ...restButtonProps\n } = props\n const content = getButtonContent({ children, icon, iconPosition })\n const isDisabled = disabled || loading\n const buttonClassNames = getButtonCommonClassNames({\n disabled: isDisabled,\n rounded,\n size,\n fullWidth,\n className,\n })\n\n return (\n <Button\n {...restButtonProps}\n className={getComputedClassName({\n className: buttonClassNames,\n brand,\n })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button>\n )\n }\n)\n_BrandButton.displayName = \"BrandButton\"\n\nconst BrandLink = forwardRef<HTMLAnchorElement, BrandLinkPropsType>(\n (props: BrandLinkPropsType, ref) => {\n const {\n children,\n brand,\n icon,\n iconPosition,\n className,\n loading,\n disabled,\n rounded,\n size,\n fullWidth,\n ...restLinkProps\n } = props\n const content = getButtonContent({ children, icon, iconPosition })\n const isDisabled = disabled || loading\n const buttonClassNames = getButtonCommonClassNames({\n disabled: isDisabled,\n rounded,\n size,\n fullWidth,\n className,\n })\n\n return (\n <Button.Link\n {...restLinkProps}\n className={getComputedClassName({\n className: buttonClassNames,\n brand,\n })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button.Link>\n )\n }\n)\nBrandLink.displayName = \"BrandLink\"\n\nconst BrandButton = Object.assign(_BrandButton, { Link: BrandLink })\n\nexport default BrandButton\n"],"names":[],"mappings":";;;;;;AAiBA,IAAM,oBAAoB,GAAG,UAAC,EAA0C;QAAxC,SAAS,eAAA,EAAE,KAAK,WAAA;IAC9C,OAAA,EAAE,CAAC,SAAS,EAAE,mBAAmB,EAAE;QACjC,0BAA0B,EAAE,KAAK,KAAK,OAAO;QAC7C,6BAA6B,EAAE,KAAK,KAAK,UAAU;QACnD,4BAA4B,EAAE,KAAK,KAAK,SAAS;QACjD,6BAA6B,EAAE,KAAK,KAAK,UAAU;KACpD,CAAC;AALF,CAKE,CAAA;AAEJ,IAAM,YAAY,GAAG,UAAU,CAC7B,UAAC,KAA2B,EAAE,GAAG;IAE7B,IAAA,QAAQ,GAWN,KAAK,SAXC,EACR,KAAK,GAUH,KAAK,MAVF,EACL,IAAI,GASF,KAAK,KATH,EACJ,YAAY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CACT;IACT,IAAM,OAAO,GAAG,gBAAgB,CAAC,EAAE,QAAQ,UAAA,EAAE,IAAI,MAAA,EAAE,YAAY,cAAA,EAAE,CAAC,CAAA;IAClE,IAAM,UAAU,GAAG,QAAQ,IAAI,OAAO,CAAA;IACtC,IAAM,gBAAgB,GAAG,yBAAyB,CAAC;QACjD,QAAQ,EAAE,UAAU;QACpB,OAAO,SAAA;QACP,IAAI,MAAA;QACJ,SAAS,WAAA;QACT,SAAS,WAAA;KACV,CAAC,CAAA;IAEF,QACE,oBAAC,MAAM,CAAC,IAAI,eACN,aAAa,IACjB,SAAS,EAAE,oBAAoB,CAAC;YAC9B,SAAS,EAAE,gBAAgB;YAC3B,KAAK,OAAA;SACN,CAAC,EACF,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,UAAU,KAEnB,OAAO,CACI,EACf;AACH,CAAC,CACF,CAAA;AACD,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;IAE7B,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../_virtual/_tslib.js';
|
|
2
|
+
import '../Icon/index.js';
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import LoadingIcon from '../Icon/__generated__/LoadingIcon.js';
|
|
5
|
+
|
|
6
|
+
var isLinkProps = function (props) { return "href" in props && !!props.href; };
|
|
7
|
+
var _Button = forwardRef(function (props, ref) {
|
|
8
|
+
var disabled = props.disabled, loading = props.loading, children = props.children, restProps = __rest(props, ["disabled", "loading", "children"]);
|
|
9
|
+
return (React.createElement("button", __assign({ ref: ref, "aria-disabled": disabled, "aria-busy": loading, disabled: disabled }, restProps),
|
|
10
|
+
loading && React.createElement(LoadingIcon, { className: "cob-Button__loading-icon" }),
|
|
11
|
+
children));
|
|
12
|
+
});
|
|
13
|
+
_Button.displayName = "button";
|
|
14
|
+
var Link = forwardRef(function (props, ref) {
|
|
15
|
+
var disabled = props.disabled, target = props.target, rel = props.rel, loading = props.loading, children = props.children, restProps = __rest(props, ["disabled", "target", "rel", "loading", "children"]);
|
|
16
|
+
return (React.createElement("a", __assign({ "aria-disabled": disabled, "data-disabled": disabled, "aria-busy": loading, target: target, rel: target && !rel ? "noopener noreferrer" : rel, ref: ref }, restProps),
|
|
17
|
+
loading && React.createElement(LoadingIcon, { className: "cob-Button__loading-icon" }),
|
|
18
|
+
children));
|
|
19
|
+
});
|
|
20
|
+
Link.displayName = "link";
|
|
21
|
+
var Button = Object.assign(_Button, { Link: Link });
|
|
22
|
+
|
|
23
|
+
export { Button as default, isLinkProps };
|
|
24
|
+
//# sourceMappingURL=ButtonComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonComponent.js","sources":["../../../src/components/Buttons/ButtonComponent.tsx"],"sourcesContent":["import { LoadingIcon } from \"../Icon\"\nimport React, { forwardRef } from \"react\"\n\n// Button props\nexport type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n loading?: boolean\n href?: undefined\n}\n\n// Link props\nexport type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n loading?: boolean\n disabled?: boolean\n href?: string\n}\n\nexport const isLinkProps = (\n props: ButtonProps | LinkProps\n): props is LinkProps => \"href\" in props && !!props.href\n\nconst _Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (props: ButtonProps, ref) => {\n const { disabled, loading, children, ...restProps } = props\n return (\n <button\n ref={ref}\n aria-disabled={disabled}\n aria-busy={loading}\n disabled={disabled}\n {...restProps}\n >\n {loading && <LoadingIcon className=\"cob-Button__loading-icon\" />}\n {children}\n </button>\n )\n }\n)\n_Button.displayName = \"button\"\n\nconst Link = forwardRef<HTMLAnchorElement, LinkProps>(\n (props: LinkProps, ref) => {\n const { disabled, target, rel, loading, children, ...restProps } = props\n return (\n <a\n aria-disabled={disabled}\n data-disabled={disabled}\n aria-busy={loading}\n target={target}\n rel={target && !rel ? \"noopener noreferrer\" : rel}\n ref={ref}\n {...restProps}\n >\n {loading && <LoadingIcon className=\"cob-Button__loading-icon\" />}\n {children}\n </a>\n )\n }\n)\nLink.displayName = \"link\"\n\nconst Button = Object.assign(_Button, { Link })\n\nexport default Button\n"],"names":[],"mappings":";;;;;IAgBa,WAAW,GAAG,UACzB,KAA8B,IACP,OAAA,MAAM,IAAI,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,IAAA;AAExD,IAAM,OAAO,GAAG,UAAU,CACxB,UAAC,KAAkB,EAAE,GAAG;IACd,IAAA,QAAQ,GAAsC,KAAK,SAA3C,EAAE,OAAO,GAA6B,KAAK,QAAlC,EAAE,QAAQ,GAAmB,KAAK,SAAxB,EAAK,SAAS,UAAK,KAAK,EAArD,mCAA6C,CAAF,CAAU;IAC3D,QACE,yCACE,GAAG,EAAE,GAAG,mBACO,QAAQ,eACZ,OAAO,EAClB,QAAQ,EAAE,QAAQ,IACd,SAAS;QAEZ,OAAO,IAAI,oBAAC,WAAW,IAAC,SAAS,EAAC,0BAA0B,GAAG;QAC/D,QAAQ,CACF,EACV;AACH,CAAC,CACF,CAAA;AACD,OAAO,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE9B,IAAM,IAAI,GAAG,UAAU,CACrB,UAAC,KAAgB,EAAE,GAAG;IACZ,IAAA,QAAQ,GAAmD,KAAK,SAAxD,EAAE,MAAM,GAA2C,KAAK,OAAhD,EAAE,GAAG,GAAsC,KAAK,IAA3C,EAAE,OAAO,GAA6B,KAAK,QAAlC,EAAE,QAAQ,GAAmB,KAAK,SAAxB,EAAK,SAAS,UAAK,KAAK,EAAlE,oDAA0D,CAAF,CAAU;IACxE,QACE,qDACiB,QAAQ,mBACR,QAAQ,eACZ,OAAO,EAClB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,IAAI,CAAC,GAAG,GAAG,qBAAqB,GAAG,GAAG,EACjD,GAAG,EAAE,GAAG,IACJ,SAAS;QAEZ,OAAO,IAAI,oBAAC,WAAW,IAAC,SAAS,EAAC,0BAA0B,GAAG;QAC/D,QAAQ,CACP,EACL;AACH,CAAC,CACF,CAAA;AACD,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA;IAEnB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,MAAA,EAAE;;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { Children } from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import BrandButton from './BrandButton/index.js';
|
|
4
|
+
import GhostButton from './GhostButton/index.js';
|
|
5
|
+
import InversedButton from './InversedButton/index.js';
|
|
6
|
+
import DefaultButton from './DefaultButton/index.js';
|
|
7
|
+
import Button from '../Button/Button.js';
|
|
8
|
+
import Link from '../Button/Link.js';
|
|
9
|
+
|
|
10
|
+
var isButton = function (component) {
|
|
11
|
+
return React.isValidElement(component) &&
|
|
12
|
+
(component.type === Button ||
|
|
13
|
+
component.type === Link ||
|
|
14
|
+
component.type === BrandButton ||
|
|
15
|
+
component.type === BrandButton.Link ||
|
|
16
|
+
component.type === GhostButton ||
|
|
17
|
+
component.type === GhostButton.Link ||
|
|
18
|
+
component.type === InversedButton ||
|
|
19
|
+
component.type === InversedButton.Link ||
|
|
20
|
+
component.type === DefaultButton ||
|
|
21
|
+
component.type === DefaultButton.Link);
|
|
22
|
+
};
|
|
23
|
+
var ButtonsGroup = function (_a) {
|
|
24
|
+
var className = _a.className, children = _a.children, align = _a.align;
|
|
25
|
+
return (React.createElement("div", { className: cx(className, "cobalt-buttons-group", {
|
|
26
|
+
"cobalt-buttons-group--right": align === "right",
|
|
27
|
+
"cobalt-buttons-group--center": align === "center",
|
|
28
|
+
}) }, Children.toArray(children).map(function (child, index) {
|
|
29
|
+
return isButton(child)
|
|
30
|
+
? React.cloneElement(child, {
|
|
31
|
+
key: index,
|
|
32
|
+
className: cx("cobalt-buttons-group__item", {
|
|
33
|
+
"cobalt-buttons-group__item--fullWidth": align === "fullWidth",
|
|
34
|
+
}),
|
|
35
|
+
fullWidth: align === "fullWidth",
|
|
36
|
+
})
|
|
37
|
+
: child;
|
|
38
|
+
})));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { ButtonsGroup as default };
|
|
42
|
+
//# sourceMappingURL=ButtonsGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonsGroup.js","sources":["../../../src/components/Buttons/ButtonsGroup.tsx"],"sourcesContent":["import React, { Children } from \"react\"\nimport cx from \"classnames\"\n\nimport BrandButton from \"./BrandButton\"\nimport GhostButton from \"./GhostButton\"\nimport InversedButton from \"./InversedButton\"\nimport DefaultButton from \"./DefaultButton\"\nimport LegacyButton from \"../Button/Button\"\nimport LegacyLink from \"../Button/Link\"\nimport { AllButtonsPropsType } from \"./\"\n\nexport interface ButtonsGroupProps {\n className?: string\n children: React.ReactNode\n align?: \"fullWidth\" | \"right\" | \"center\"\n}\n\nconst isButton = (\n component: React.ReactNode\n): component is React.ReactElement<AllButtonsPropsType> =>\n React.isValidElement(component) &&\n (component.type === LegacyButton ||\n component.type === LegacyLink ||\n component.type === BrandButton ||\n component.type === BrandButton.Link ||\n component.type === GhostButton ||\n component.type === GhostButton.Link ||\n component.type === InversedButton ||\n component.type === InversedButton.Link ||\n component.type === DefaultButton ||\n component.type === DefaultButton.Link)\n\nconst ButtonsGroup = ({ className, children, align }: ButtonsGroupProps) => (\n <div\n className={cx(className, \"cobalt-buttons-group\", {\n \"cobalt-buttons-group--right\": align === \"right\",\n \"cobalt-buttons-group--center\": align === \"center\",\n })}\n >\n {Children.toArray(children).map((child, index) =>\n isButton(child)\n ? React.cloneElement(child, {\n key: index,\n className: cx(\"cobalt-buttons-group__item\", {\n \"cobalt-buttons-group__item--fullWidth\": align === \"fullWidth\",\n }),\n fullWidth: align === \"fullWidth\",\n })\n : child\n )}\n </div>\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
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../../_virtual/_tslib.js';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
import { getButtonContent, getButtonCommonClassNames } from '../helpers.js';
|
|
5
|
+
import Button from '../ButtonComponent.js';
|
|
6
|
+
|
|
7
|
+
var getComputedClassName = function (_a) {
|
|
8
|
+
var className = _a.className, active = _a.active, primary = _a.primary, destructive = _a.destructive;
|
|
9
|
+
return cx(className, "cob-Button__default", {
|
|
10
|
+
"cob-Button__default--active": active,
|
|
11
|
+
"cob-Button__default--primary": primary,
|
|
12
|
+
"cob-Button__default--destructive": destructive,
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var _DefaultButton = forwardRef(function (props, ref) {
|
|
16
|
+
var children = props.children, active = props.active, primary = props.primary, destructive = props.destructive, icon = props.icon, iconPosition = props.iconPosition, className = props.className, loading = props.loading, disabled = props.disabled, rounded = props.rounded, size = props.size, fullWidth = props.fullWidth, restButtonProps = __rest(props, ["children", "active", "primary", "destructive", "icon", "iconPosition", "className", "loading", "disabled", "rounded", "size", "fullWidth"]);
|
|
17
|
+
var content = getButtonContent({ children: children, icon: icon, iconPosition: iconPosition });
|
|
18
|
+
var isDisabled = disabled || loading;
|
|
19
|
+
var buttonClassNames = getButtonCommonClassNames({
|
|
20
|
+
disabled: isDisabled,
|
|
21
|
+
rounded: rounded,
|
|
22
|
+
size: size,
|
|
23
|
+
fullWidth: fullWidth,
|
|
24
|
+
className: className,
|
|
25
|
+
});
|
|
26
|
+
return (React.createElement(Button, __assign({}, restButtonProps, { className: getComputedClassName({
|
|
27
|
+
className: buttonClassNames,
|
|
28
|
+
active: active,
|
|
29
|
+
primary: primary,
|
|
30
|
+
destructive: destructive,
|
|
31
|
+
}), ref: ref, loading: loading, disabled: isDisabled }), content));
|
|
32
|
+
});
|
|
33
|
+
_DefaultButton.displayName = "DefaultButton";
|
|
34
|
+
var DefaultLink = forwardRef(function (props, ref) {
|
|
35
|
+
var children = props.children, active = props.active, primary = props.primary, destructive = props.destructive, icon = props.icon, iconPosition = props.iconPosition, className = props.className, loading = props.loading, disabled = props.disabled, rounded = props.rounded, size = props.size, fullWidth = props.fullWidth, restLinkProps = __rest(props, ["children", "active", "primary", "destructive", "icon", "iconPosition", "className", "loading", "disabled", "rounded", "size", "fullWidth"]);
|
|
36
|
+
var content = getButtonContent({ children: children, icon: icon, iconPosition: iconPosition });
|
|
37
|
+
var isDisabled = disabled || loading;
|
|
38
|
+
var buttonClassNames = getButtonCommonClassNames({
|
|
39
|
+
disabled: isDisabled,
|
|
40
|
+
rounded: rounded,
|
|
41
|
+
size: size,
|
|
42
|
+
fullWidth: fullWidth,
|
|
43
|
+
className: className,
|
|
44
|
+
});
|
|
45
|
+
return (React.createElement(Button.Link, __assign({}, restLinkProps, { className: getComputedClassName({
|
|
46
|
+
className: buttonClassNames,
|
|
47
|
+
active: active,
|
|
48
|
+
primary: primary,
|
|
49
|
+
destructive: destructive,
|
|
50
|
+
}), ref: ref, loading: loading, disabled: isDisabled }), content));
|
|
51
|
+
});
|
|
52
|
+
DefaultLink.displayName = "DefaultLink";
|
|
53
|
+
var DefaultButton = Object.assign(_DefaultButton, { Link: DefaultLink });
|
|
54
|
+
|
|
55
|
+
export { DefaultButton as default };
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Buttons/DefaultButton/index.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\"\nimport cx from \"classnames\"\n\nimport {\n ButtonTemplatePropsType,\n getButtonCommonClassNames,\n getButtonContent,\n} from \"../helpers\"\nimport Button, { ButtonProps, LinkProps } from \"../ButtonComponent\"\n\ntype DefaultCommonPropsType = ButtonTemplatePropsType<{\n primary?: boolean\n destructive?: boolean\n active?: boolean\n}>\n\nexport type DefaultButtonPropsType = DefaultCommonPropsType & ButtonProps\nexport type DefaultLinkPropsType = DefaultCommonPropsType & LinkProps\n\nconst getComputedClassName = ({\n className,\n active,\n primary,\n destructive,\n}: DefaultCommonPropsType) =>\n cx(className, \"cob-Button__default\", {\n \"cob-Button__default--active\": active,\n \"cob-Button__default--primary\": primary,\n \"cob-Button__default--destructive\": destructive,\n })\n\nconst _DefaultButton = forwardRef<HTMLButtonElement, DefaultButtonPropsType>(\n (props: DefaultButtonPropsType, ref) => {\n const {\n children,\n active,\n primary,\n destructive,\n icon,\n iconPosition,\n className,\n loading,\n disabled,\n rounded,\n size,\n fullWidth,\n ...restButtonProps\n } = props\n const content = getButtonContent({ children, icon, iconPosition })\n const isDisabled = disabled || loading\n const buttonClassNames = getButtonCommonClassNames({\n disabled: isDisabled,\n rounded,\n size,\n fullWidth,\n className,\n })\n return (\n <Button\n {...restButtonProps}\n className={getComputedClassName({\n className: buttonClassNames,\n active,\n primary,\n destructive,\n })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button>\n )\n }\n)\n_DefaultButton.displayName = \"DefaultButton\"\n\nconst DefaultLink = forwardRef<HTMLAnchorElement, DefaultLinkPropsType>(\n (props: DefaultLinkPropsType, ref) => {\n const {\n children,\n active,\n primary,\n destructive,\n icon,\n iconPosition,\n className,\n loading,\n disabled,\n rounded,\n size,\n fullWidth,\n ...restLinkProps\n } = props\n const content = getButtonContent({ children, icon, iconPosition })\n const isDisabled = disabled || loading\n const buttonClassNames = getButtonCommonClassNames({\n disabled: isDisabled,\n rounded,\n size,\n fullWidth,\n className,\n })\n return (\n <Button.Link\n {...restLinkProps}\n className={getComputedClassName({\n className: buttonClassNames,\n active,\n primary,\n destructive,\n })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button.Link>\n )\n }\n)\nDefaultLink.displayName = \"DefaultLink\"\n\nconst DefaultButton = Object.assign(_DefaultButton, { Link: DefaultLink })\n\nexport default DefaultButton\n"],"names":[],"mappings":";;;;;;AAmBA,IAAM,oBA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,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;;;;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../../_virtual/_tslib.js';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
import { getButtonContent, getButtonCommonClassNames } from '../helpers.js';
|
|
5
|
+
import Button from '../ButtonComponent.js';
|
|
6
|
+
|
|
7
|
+
var getComputedClassName = function (_a) {
|
|
8
|
+
var className = _a.className, standalone = _a.standalone, destructive = _a.destructive;
|
|
9
|
+
return cx(className, "cob-Button__ghost", {
|
|
10
|
+
"cob-Button__ghost--standalone": standalone,
|
|
11
|
+
"cob-Button__ghost--destructive": destructive,
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var _GhostButton = forwardRef(function (props, ref) {
|
|
15
|
+
var children = props.children, standalone = props.standalone, destructive = props.destructive, icon = props.icon, iconPosition = props.iconPosition, className = props.className, loading = props.loading, disabled = props.disabled, rounded = props.rounded, size = props.size, fullWidth = props.fullWidth, restButtonProps = __rest(props, ["children", "standalone", "destructive", "icon", "iconPosition", "className", "loading", "disabled", "rounded", "size", "fullWidth"]);
|
|
16
|
+
var content = getButtonContent({ children: children, icon: icon, iconPosition: iconPosition });
|
|
17
|
+
var isDisabled = disabled || loading;
|
|
18
|
+
var buttonClassNames = getButtonCommonClassNames({
|
|
19
|
+
disabled: isDisabled,
|
|
20
|
+
rounded: rounded,
|
|
21
|
+
size: size,
|
|
22
|
+
fullWidth: fullWidth,
|
|
23
|
+
className: className,
|
|
24
|
+
});
|
|
25
|
+
return (React.createElement(Button, __assign({}, restButtonProps, { className: getComputedClassName({
|
|
26
|
+
className: buttonClassNames,
|
|
27
|
+
standalone: standalone,
|
|
28
|
+
destructive: destructive,
|
|
29
|
+
}), ref: ref, loading: loading, disabled: isDisabled }), content));
|
|
30
|
+
});
|
|
31
|
+
_GhostButton.displayName = "GhostButton";
|
|
32
|
+
var GhostLink = forwardRef(function (props, ref) {
|
|
33
|
+
var children = props.children, standalone = props.standalone, destructive = props.destructive, icon = props.icon, iconPosition = props.iconPosition, className = props.className, loading = props.loading, disabled = props.disabled, rounded = props.rounded, size = props.size, fullWidth = props.fullWidth, restLinkProps = __rest(props, ["children", "standalone", "destructive", "icon", "iconPosition", "className", "loading", "disabled", "rounded", "size", "fullWidth"]);
|
|
34
|
+
var content = getButtonContent({ children: children, icon: icon, iconPosition: iconPosition });
|
|
35
|
+
var isDisabled = disabled || loading;
|
|
36
|
+
var buttonClassNames = getButtonCommonClassNames({
|
|
37
|
+
disabled: isDisabled,
|
|
38
|
+
rounded: rounded,
|
|
39
|
+
size: size,
|
|
40
|
+
fullWidth: fullWidth,
|
|
41
|
+
className: className,
|
|
42
|
+
});
|
|
43
|
+
return (React.createElement(Button.Link, __assign({}, restLinkProps, { className: getComputedClassName({
|
|
44
|
+
className: buttonClassNames,
|
|
45
|
+
standalone: standalone,
|
|
46
|
+
destructive: destructive,
|
|
47
|
+
}), ref: ref, loading: loading, disabled: isDisabled }), content));
|
|
48
|
+
});
|
|
49
|
+
GhostLink.displayName = "GhostLink";
|
|
50
|
+
var GhostButton = Object.assign(_GhostButton, { Link: GhostLink });
|
|
51
|
+
|
|
52
|
+
export { GhostButton as default };
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Buttons/GhostButton/index.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\"\nimport cx from \"classnames\"\n\nimport {\n ButtonTemplatePropsType,\n getButtonContent,\n getButtonCommonClassNames,\n} from \"../helpers\"\nimport Button, { ButtonProps, LinkProps } from \"../ButtonComponent\"\n\ntype GhostCommonPropsType = ButtonTemplatePropsType<{\n standalone?: boolean\n destructive?: boolean\n}>\n\nexport type GhostButtonPropsType = GhostCommonPropsType & ButtonProps\nexport type GhostLinkPropsType = GhostCommonPropsType & LinkProps\n\nconst getComputedClassName = ({\n className,\n standalone,\n destructive,\n}: GhostCommonPropsType) =>\n cx(className, \"cob-Button__ghost\", {\n \"cob-Button__ghost--standalone\": standalone,\n \"cob-Button__ghost--destructive\": destructive,\n })\n\nconst _GhostButton = forwardRef<HTMLButtonElement, GhostButtonPropsType>(\n (props: GhostButtonPropsType, ref) => {\n const {\n children,\n standalone,\n destructive,\n icon,\n iconPosition,\n className,\n loading,\n disabled,\n rounded,\n size,\n fullWidth,\n ...restButtonProps\n } = props\n const content = getButtonContent({ children, icon, iconPosition })\n const isDisabled = disabled || loading\n const buttonClassNames = getButtonCommonClassNames({\n disabled: isDisabled,\n rounded,\n size,\n fullWidth,\n className,\n })\n\n return (\n <Button\n {...restButtonProps}\n className={getComputedClassName({\n className: buttonClassNames,\n standalone,\n destructive,\n })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button>\n )\n }\n)\n_GhostButton.displayName = \"GhostButton\"\n\nconst GhostLink = forwardRef<HTMLAnchorElement, GhostLinkPropsType>(\n (props: GhostLinkPropsType, ref) => {\n const {\n children,\n standalone,\n destructive,\n icon,\n iconPosition,\n className,\n loading,\n disabled,\n rounded,\n size,\n fullWidth,\n ...restLinkProps\n } = props\n const content = getButtonContent({ children, icon, iconPosition })\n const isDisabled = disabled || loading\n const buttonClassNames = getButtonCommonClassNames({\n disabled: isDisabled,\n rounded,\n size,\n fullWidth,\n className,\n })\n\n return (\n <Button.Link\n {...restLinkProps}\n className={getComputedClassName({\n className: buttonClassNames,\n standalone,\n destructive,\n })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button.Link>\n )\n }\n)\nGhostLink.displayName = \"GhostLink\"\n\nconst GhostButton = Object.assign(_GhostButton, { Link: GhostLink })\n\nexport default GhostButton\n"],"names":[],"mappings":";;;;;;AAkBA,IAAM,oBAAoB,GAAG,UAAC,EAIP;QAHrB,SAAS,eAAA,EACT,UAAU,gBA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3
|
+
import cx from 'classnames';
|
|
4
|
+
import { getButtonContent, getButtonCommonClassNames } from '../helpers.js';
|
|
5
|
+
import Button from '../ButtonComponent.js';
|
|
6
|
+
|
|
7
|
+
var getComputedClassName = function (_a) {
|
|
8
|
+
var className = _a.className;
|
|
9
|
+
return cx(className, "cob-Button__inversed");
|
|
10
|
+
};
|
|
11
|
+
var _InversedButton = forwardRef(function (props, ref) {
|
|
12
|
+
var children = props.children, icon = props.icon, iconPosition = props.iconPosition, className = props.className, loading = props.loading, disabled = props.disabled, rounded = props.rounded, size = props.size, fullWidth = props.fullWidth, restButtonProps = __rest(props, ["children", "icon", "iconPosition", "className", "loading", "disabled", "rounded", "size", "fullWidth"]);
|
|
13
|
+
var content = getButtonContent({ children: children, icon: icon, iconPosition: iconPosition });
|
|
14
|
+
var isDisabled = disabled || loading;
|
|
15
|
+
var buttonClassNames = getButtonCommonClassNames({
|
|
16
|
+
disabled: isDisabled,
|
|
17
|
+
rounded: rounded,
|
|
18
|
+
size: size,
|
|
19
|
+
fullWidth: fullWidth,
|
|
20
|
+
className: className,
|
|
21
|
+
});
|
|
22
|
+
return (React.createElement(Button, __assign({}, restButtonProps, { className: getComputedClassName({ className: buttonClassNames }), ref: ref, loading: loading, disabled: isDisabled }), content));
|
|
23
|
+
});
|
|
24
|
+
_InversedButton.displayName = "InversedButton";
|
|
25
|
+
var InversedLink = forwardRef(function (props, ref) {
|
|
26
|
+
var children = props.children, icon = props.icon, iconPosition = props.iconPosition, className = props.className, loading = props.loading, disabled = props.disabled, rounded = props.rounded, size = props.size, fullWidth = props.fullWidth, restLinkProps = __rest(props, ["children", "icon", "iconPosition", "className", "loading", "disabled", "rounded", "size", "fullWidth"]);
|
|
27
|
+
var content = getButtonContent({ children: children, icon: icon, iconPosition: iconPosition });
|
|
28
|
+
var isDisabled = disabled || loading;
|
|
29
|
+
var buttonClassNames = getButtonCommonClassNames({
|
|
30
|
+
disabled: isDisabled,
|
|
31
|
+
rounded: rounded,
|
|
32
|
+
size: size,
|
|
33
|
+
fullWidth: fullWidth,
|
|
34
|
+
className: className,
|
|
35
|
+
});
|
|
36
|
+
return (React.createElement(Button.Link, __assign({}, restLinkProps, { className: getComputedClassName({ className: buttonClassNames }), ref: ref, loading: loading, disabled: isDisabled }), content));
|
|
37
|
+
});
|
|
38
|
+
InversedLink.displayName = "InversedLink";
|
|
39
|
+
var InversedButton = Object.assign(_InversedButton, { Link: InversedLink });
|
|
40
|
+
|
|
41
|
+
export { InversedButton as default };
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Buttons/InversedButton/index.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\"\nimport cx from \"classnames\"\n\nimport {\n ButtonTemplatePropsType,\n getButtonContent,\n getButtonCommonClassNames,\n} from \"../helpers\"\nimport Button, { ButtonProps, LinkProps } from \"../ButtonComponent\"\n\ntype InversedCommonPropsType = ButtonTemplatePropsType<Record<string, unknown>>\n\nexport type InversedButtonPropsType = InversedCommonPropsType & ButtonProps\nexport type InversedLinkPropsType = InversedCommonPropsType & LinkProps\n\nconst getComputedClassName = ({ className }: InversedCommonPropsType) =>\n cx(className, \"cob-Button__inversed\")\n\nconst _InversedButton = forwardRef<HTMLButtonElement, InversedButtonPropsType>(\n (props: InversedButtonPropsType, ref) => {\n const {\n children,\n icon,\n iconPosition,\n className,\n loading,\n disabled,\n rounded,\n size,\n fullWidth,\n ...restButtonProps\n } = props\n const content = getButtonContent({ children, icon, iconPosition })\n const isDisabled = disabled || loading\n const buttonClassNames = getButtonCommonClassNames({\n disabled: isDisabled,\n rounded,\n size,\n fullWidth,\n className,\n })\n\n return (\n <Button\n {...restButtonProps}\n className={getComputedClassName({ className: buttonClassNames })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button>\n )\n }\n)\n_InversedButton.displayName = \"InversedButton\"\n\nconst InversedLink = forwardRef<HTMLAnchorElement, InversedLinkPropsType>(\n (props: InversedLinkPropsType, ref) => {\n const {\n children,\n icon,\n iconPosition,\n className,\n loading,\n disabled,\n rounded,\n size,\n fullWidth,\n ...restLinkProps\n } = props\n const content = getButtonContent({ children, icon, iconPosition })\n const isDisabled = disabled || loading\n const buttonClassNames = getButtonCommonClassNames({\n disabled: isDisabled,\n rounded,\n size,\n fullWidth,\n className,\n })\n\n return (\n <Button.Link\n {...restLinkProps}\n className={getComputedClassName({ className: buttonClassNames })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button.Link>\n )\n }\n)\nInversedLink.displayName = \"InversedLink\"\n\nconst InversedButton = Object.assign(_InversedButton, { Link: InversedLink })\n\nexport default InversedButton\n"],"names":[],"mappings":";;;;;;AAeA,IAAM,oBAAoB,GAAG,UAAC,EAAsC;QAApC,SAAS,eAAA;IACvC,OAAA,EAAE,CAAC,SAAS,EAAE,sBAAsB,CAAC;AAArC,CAAqC,CAAA;AAEvC,IAAM,eAAe,GAAG,UAAU,CAChC,UAAC,KAA8B,EAAE,GAAG;IAEhC,IAAA,QAAQ,GAUN,KAAK,SAVC,EACR,IAAI,GASF,KAAK,KATH,EACJ,YAAY,GAQV,KAAK,aARK,EACZ,SAAS,GAOP,KAAK,UAPE,EACT,OAAO,GAML,KAAK,QANA,EACP,QAAQ,GAKN,KAAK,SALC,EACR,OAAO,GAIL,KAAK,QAJA,EACP,IAAI,GAGF,KAAK,KAHH,EACJ,SAAS,GAEP,KAAK,UAFE,EACN,eAAe,UAChB,KAAK,EAXH,wGAWL,CADmB,CACX;IACT,IAAM,OAAO,GAAG,gBAAgB,CAAC,EAAE,QAAQ,UAAA,EAAE,IAAI,MAAA,EAAE,YAAY,cAAA,EAAE,CAAC,CAAA;IAClE,IAAM,UAAU,GAAG,QAAQ,IAAI,OAAO,CAAA;IACtC,IAAM,gBAAgB,GAAG,yBAAyB,CAAC;QACjD,QAAQ,EAAE,UAAU;QACpB,OAAO,SAAA;QACP,IAAI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CAAC,CACF,CAAA;AACD,YAAY,CAAC,WAAW,GAAG,cAAc,CAAA;IAEnC,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { Icon } from '../Icon/index.js';
|
|
4
|
+
|
|
5
|
+
var getButtonContent = function (_a) {
|
|
6
|
+
var children = _a.children, icon = _a.icon, _b = _a.iconPosition, iconPosition = _b === void 0 ? icon ? "left" : undefined : _b;
|
|
7
|
+
if (!children && !icon) {
|
|
8
|
+
throw new Error("Either an icon or children are required");
|
|
9
|
+
}
|
|
10
|
+
var iconMarkup = icon ? (React.createElement("span", { key: iconPosition, className: cx("cob-Button__Icon", {
|
|
11
|
+
"cob-Button__Icon--left": !!children && iconPosition === "left",
|
|
12
|
+
"cob-Button__Icon--right": !!children && iconPosition === "right",
|
|
13
|
+
}) },
|
|
14
|
+
React.createElement(Icon, { source: icon }))) : null;
|
|
15
|
+
var leftIcon = iconPosition === "left" ? iconMarkup : null;
|
|
16
|
+
var rightIcon = iconPosition === "right" ? iconMarkup : null;
|
|
17
|
+
var childContent = children ? (React.createElement("span", { key: "children", className: "cob-Button__content" }, children)) : null;
|
|
18
|
+
return (React.createElement(React.Fragment, null,
|
|
19
|
+
leftIcon,
|
|
20
|
+
childContent,
|
|
21
|
+
rightIcon));
|
|
22
|
+
};
|
|
23
|
+
var getButtonCommonClassNames = function (_a) {
|
|
24
|
+
var rounded = _a.rounded, size = _a.size, fullWidth = _a.fullWidth, className = _a.className, disabled = _a.disabled;
|
|
25
|
+
return cx(className, "cob-Button", {
|
|
26
|
+
"cob-Button--rounded": rounded,
|
|
27
|
+
"cob-Button--fullWidth": fullWidth,
|
|
28
|
+
"cob-Button--large": size === "large",
|
|
29
|
+
"cob-Button--disabled": disabled,
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { getButtonCommonClassNames, getButtonContent };
|
|
34
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../src/components/Buttons/helpers.tsx"],"sourcesContent":["import React, { PropsWithChildren } from \"react\"\nimport cx from \"classnames\"\n\nimport { Icon, IconSources } from \"../Icon\"\n\nexport type ButtonCommonPropsType = PropsWithChildren<{\n className?: string\n disabled?: boolean\n fullWidth?: boolean\n loading?: boolean\n rounded?: boolean\n size?: \"large\"\n iconPosition?: \"left\" | \"right\"\n icon?: IconSources\n}>\n\nexport type ButtonTemplatePropsType<SpecificButtonProps> = SpecificButtonProps &\n ButtonCommonPropsType\n\nexport const getButtonContent = ({\n children,\n icon,\n iconPosition = icon ? \"left\" : undefined,\n}: Pick<ButtonCommonPropsType, \"children\" | \"icon\" | \"iconPosition\">) => {\n if (!children && !icon) {\n throw new Error(\"Either an icon or children are required\")\n }\n\n const iconMarkup = icon ? (\n <span\n key={iconPosition}\n className={cx(\"cob-Button__Icon\", {\n \"cob-Button__Icon--left\": !!children && iconPosition === \"left\",\n \"cob-Button__Icon--right\": !!children && iconPosition === \"right\",\n })}\n >\n <Icon source={icon} />\n </span>\n ) : null\n\n const leftIcon = iconPosition === \"left\" ? iconMarkup : null\n const rightIcon = iconPosition === \"right\" ? iconMarkup : null\n const childContent = children ? (\n <span key=\"children\" className=\"cob-Button__content\">\n {children}\n </span>\n ) : null\n return (\n <>\n {leftIcon}\n {childContent}\n {rightIcon}\n </>\n )\n}\n\nexport const getButtonCommonClassNames = ({\n rounded,\n size,\n fullWidth,\n className,\n disabled,\n}: Pick<\n ButtonCommonPropsType,\n \"rounded\" | \"size\" | \"fullWidth\" | \"className\" | \"disabled\"\n>) =>\n cx(className, \"cob-Button\", {\n \"cob-Button--rounded\": rounded,\n \"cob-Button--fullWidth\": fullWidth,\n \"cob-Button--large\": size === \"large\",\n \"cob-Button--disabled\": disab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