@drivy/cobalt 0.22.0 → 0.23.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/components/Buttons/ButtonComponent.js +1 -2
- package/components/Buttons/ButtonComponent.js.map +1 -1
- package/components/Buttons/ButtonsGroup.js +1 -5
- package/components/Buttons/ButtonsGroup.js.map +1 -1
- package/components/EmptyState/index.js +2 -2
- package/components/EmptyState/index.js.map +1 -1
- package/components/Form/Stepper.js +3 -3
- package/components/Form/Stepper.js.map +1 -1
- package/components/Rating/RatingCompact.js +4 -2
- package/components/Rating/RatingCompact.js.map +1 -1
- package/components/Rating/index.js +1 -4
- package/components/Rating/index.js.map +1 -1
- package/index.js +3 -3
- package/package.json +15 -14
- package/styles/components.scss +1 -1
- package/types/components/Accordion/ToggleIcon.d.ts +1 -1
- package/types/components/Accordion/index.d.ts +6 -6
- package/types/components/Alerter/Alert.d.ts +2 -2
- package/types/components/Alerter/index.d.ts +4 -4
- package/types/components/Buttons/ButtonComponent.d.ts +2 -2
- package/types/components/Buttons/DefaultButton/index.d.ts +3 -3
- package/types/components/Buttons/GhostButton/index.d.ts +3 -3
- package/types/components/Buttons/InversedButton/index.d.ts +3 -3
- package/types/components/Buttons/helpers.d.ts +2 -2
- package/types/components/Buttons/index.d.ts +1 -1
- package/types/components/Calendar/CalendarRangePicker/CalendarRangePicker.d.ts +1 -1
- package/types/components/Calendar/CalendarRangePicker/CalendarRangePickerDay.d.ts +1 -1
- package/types/components/Calendar/CalendarRangePicker/CalendarRangePickerMonth.d.ts +1 -1
- package/types/components/Calendar/CalendarView/CalendarViewMonth.d.ts +1 -1
- package/types/components/Calendar/CalendarView/index.d.ts +1 -1
- package/types/components/Calendar/CalendarView/types.d.ts +7 -7
- package/types/components/Card/index.d.ts +3 -3
- package/types/components/Cell/index.d.ts +4 -4
- package/types/components/EmptyState/index.d.ts +3 -3
- package/types/components/Flash/index.d.ts +1 -1
- package/types/components/Form/Autocomplete/index.d.ts +1 -1
- package/types/components/Form/CheckablePill.d.ts +1 -1
- package/types/components/Form/Checkmark.d.ts +2 -2
- package/types/components/Form/ComposedField.d.ts +1 -1
- package/types/components/Form/Fieldset.d.ts +1 -1
- package/types/components/Form/RadioWithDetails.d.ts +1 -1
- package/types/components/Form/Select.d.ts +1 -1
- package/types/components/Form/Slider.d.ts +3 -3
- package/types/components/Form/Stepper.d.ts +2 -2
- package/types/components/Form/TextArea.d.ts +1 -1
- package/types/components/Form/TextInput.d.ts +2 -2
- package/types/components/Form/ToggleSwitch.d.ts +2 -2
- package/types/components/Form/field.d.ts +1 -1
- package/types/components/Form/form.d.ts +1 -1
- package/types/components/Helper/index.d.ts +1 -1
- package/types/components/HorizontalList/index.d.ts +2 -2
- package/types/components/Icon/__generated__/AccountDetailsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/AddPictureIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/AirConditioningIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/AirportIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/AndroidIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/AntiqueIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ArrowLeftCircleFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ArrowLeftIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ArrowRightCircleFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ArrowRightCircleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ArrowRightIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/AudioInputIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/BabySeatIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/BatteryIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/BellIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/BikeRackIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/BinIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/BluetoothIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/BriefcaseIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/BulbIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CableIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CabrioletIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CalendarCheckIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CalendarClockIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CalendarEndIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CalendarIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CalendarStartIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CameraAddIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CameraIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CampervanIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarAddIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarCheckIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarDamagesIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarDrivyOpenIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarGroupIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarLockIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarPlayIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarReturnIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarSearchIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarTypeAntiqueIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarTypeCabrioletIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarTypeCampervanIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarTypeCityIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarTypeConvertibleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarTypeCoupeIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarTypeFamilyIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarTypeFourFourIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarTypeMinibusIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarTypeSedanIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CarTypeUtilityIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CardIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CdPlayerIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CertificateIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ChainsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CheckCircleFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CheckCircleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CheckIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ChecklistIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ChevronDownIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ChevronLeftIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ChevronRightIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ChevronUpIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CircledArrowRightIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CityIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CleaningIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ClockAlertIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ClockBackwardsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ClockForwardsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ClockIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CloseCircleFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CloseIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ConnectCarIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ContactMailIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ContactPhoneIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ContextualPaperclipIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ContextualQuestionIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ContextualWarningCircleFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ContextualWarningCircleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ConvertibleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CopyIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CoupeIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CreditCardAddIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CreditCardErrorIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CreditCardIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/CruiseControlIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/DashcamIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/DirectionsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/DocumentIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/DotHorizontalIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/DotVerticalIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/DotsHorizontalIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/DotsVerticalIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/DownloadIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/EarningIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/EarthIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/EditIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ElectricIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/EvBatteryIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/EvCableIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/EvChargerIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ExternalLinkIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/EyeClosedIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/EyeIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/EyeOpenedIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/FaceRecognitionIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/FacebookIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/FamilyIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/FileFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/FilterIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/FiltersIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/FlagIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/FourByFourIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/FuelTankIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/GeolocationIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/GiftIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/GpsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/GraphUpIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/HealingIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/HeartIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/HitchIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/HomeIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/IdCardIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/IncidentIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/InfoCircleFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/InfoCircleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/InfoFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/InfoIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/InstantIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/InvoiceIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/KeyConnectIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/KeyIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LicenceCheckIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LicenceIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LicencePaperIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LifeBuoyIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LinkedinIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LoadingIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LocalityIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LocationIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LocationMapIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LocationParkingIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LocationPinIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LockCheckIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LockedIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LoginIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/LogoutIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MailCheckIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MailIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MapAltIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MapIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MeetDriverIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MeetOwnerIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MenuListIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MessagesIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MileageIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MinibusIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MinusCircleFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MinusIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/MiscGiftIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/NearbyDeviceIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/NotificationIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/Number1CircleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/Number2CircleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/Number3CircleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/Number4CircleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/Number5CircleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OkHandIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionAirConditioningIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionAndroidAutoIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionAppleCarplayIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionAudioInputIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionBabySeatIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionBikeRackIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionBluetoothAudioIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionCdPlayerIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionChainsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionCruiseControlIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionDashcamIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionGpsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionHasTrailerIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionHitchIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionRoofBoxIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionSkiRackIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionSnowTireIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/OptionWheelchairAccessibleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PaperclipIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ParkingIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PassportIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PaymentsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PencilIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PeopleUserIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PerformanceIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PhoneIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PhoneLinkIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PhotosIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PigIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PinIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PlugIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PlusCircleFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PlusIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PositionIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PricingFlatIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/PricingVariableIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ProfilePictureIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/QuestionCircleFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/QuestionCircleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/QuestionIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/RaceFlagIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/RefreshIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ReorderIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ReplacementCarIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ReplyIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ResetIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/RideIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/RoofBoxIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SealCheckIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SearchCarIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SearchIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SearchPeopleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SedanIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ServiceBatteryIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ServiceCleaningIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ServiceFuelIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ServiceHealingIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ServiceLockedIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ServiceTollsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ServiceUnlockedIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SettingsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ShareAndroidIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ShareIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ShareIosIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ShieldCheckIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ShieldIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/ShopIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SkiRackIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SliderIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SmartphoneIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SnowTireIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SocialFacebookIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SocialLinkedinIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SocialTwitterIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SocialWhatsappIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/StarHalfIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/StarIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/StarsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SubwayIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SuitcaseIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SupportIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SuvIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/SynchIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TagIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TimeAlertIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TimeBackwardsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TimeCalendarIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TimeForwardIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TollsIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TrailerIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TrainIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TriangleDownIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TriangleRightIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TriangleUpIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TwitterIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/TwoPeopleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/UnfoldIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/UnlockedIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/UserCheckIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/UserIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/UserQuestionIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/UserShieldIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/UserSwitchIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/UtilityVanLargeIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/UtilityVanMediumIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/UtilityVanSmallIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/VerifiedSealIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/WalkIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/WalletIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/WarningCircleFilledIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/WarningCircleIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/WhatsappIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/WheelIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/WheelchairIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/WrenchIcon.d.ts +1 -1
- package/types/components/Icon/__generated__/YingyangIcon.d.ts +1 -1
- package/types/components/Icon/index.d.ts +2 -2
- package/types/components/Modal/ModalFooter.d.ts +1 -1
- package/types/components/Modal/index.d.ts +1 -1
- package/types/components/PhotoDropzone/index.d.ts +1 -1
- package/types/components/Popover/index.d.ts +1 -1
- package/types/components/Rating/RatingCompact.d.ts +2 -1
- package/types/components/Rating/RatingIcons.d.ts +2 -2
- package/types/components/Rating/RatingInput.d.ts +1 -1
- package/types/components/Rating/RatingLabel.d.ts +1 -1
- package/types/components/Rating/index.d.ts +2 -3
- package/types/components/Tabs/index.d.ts +2 -2
- package/types/hooks/useBreakpoint.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/components/Button/Button.js +0 -33
- package/components/Button/Button.js.map +0 -1
- package/components/Button/Link.js +0 -33
- package/components/Button/Link.js.map +0 -1
- package/components/Button/index.js +0 -9
- package/components/Button/index.js.map +0 -1
- package/styles/components/Button/index.scss +0 -2
- package/styles/components/Button/legacy.scss +0 -348
- package/types/components/Button/Button.d.ts +0 -28
- package/types/components/Button/Link.d.ts +0 -28
- package/types/components/Button/index.d.ts +0 -75
|
@@ -2,7 +2,6 @@ import '../Icon/index.js';
|
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import LoadingIcon from '../Icon/__generated__/LoadingIcon.js';
|
|
4
4
|
|
|
5
|
-
const isLinkProps = (props) => "href" in props && !!props.href;
|
|
6
5
|
const _Button = forwardRef((props, ref) => {
|
|
7
6
|
const { disabled, loading, children, ...restProps } = props;
|
|
8
7
|
return (React.createElement("button", { ref: ref, "aria-disabled": disabled, "aria-busy": loading, disabled: disabled, ...restProps },
|
|
@@ -19,5 +18,5 @@ const Link = forwardRef((props, ref) => {
|
|
|
19
18
|
Link.displayName = "link";
|
|
20
19
|
const Button = Object.assign(_Button, { Link });
|
|
21
20
|
|
|
22
|
-
export { Button as default
|
|
21
|
+
export { Button as default };
|
|
23
22
|
//# sourceMappingURL=ButtonComponent.js.map
|
|
@@ -1 +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":";;;;
|
|
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":";;;;AAoBA,MAAM,OAAO,GAAG,UAAU,CACxB,CAAC,KAAkB,EAAE,GAAG,KAAI;AAC1B,IAAA,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;AAC3D,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACO,eAAA,EAAA,QAAQ,EACZ,WAAA,EAAA,OAAO,EAClB,QAAQ,EAAE,QAAQ,KACd,SAAS,EAAA;AAEZ,QAAA,OAAO,IAAI,KAAC,CAAA,aAAA,CAAA,WAAW,IAAC,SAAS,EAAC,0BAA0B,EAAG,CAAA;QAC/D,QAAQ,CACF,EACV;AACH,CAAC,CACF,CAAA;AACD,OAAO,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE9B,MAAM,IAAI,GAAG,UAAU,CACrB,CAAC,KAAgB,EAAE,GAAG,KAAI;AACxB,IAAA,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;AACxE,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAA,eAAA,EACiB,QAAQ,EAAA,eAAA,EACR,QAAQ,EAAA,WAAA,EACZ,OAAO,EAClB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,IAAI,CAAC,GAAG,GAAG,qBAAqB,GAAG,GAAG,EACjD,GAAG,EAAE,GAAG,KACJ,SAAS,EAAA;AAEZ,QAAA,OAAO,IAAI,KAAC,CAAA,aAAA,CAAA,WAAW,IAAC,SAAS,EAAC,0BAA0B,EAAG,CAAA;QAC/D,QAAQ,CACP,EACL;AACH,CAAC,CACF,CAAA;AACD,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA;AAEzB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE;;;;"}
|
|
@@ -3,13 +3,9 @@ import cx from 'classnames';
|
|
|
3
3
|
import GhostButton from './GhostButton/index.js';
|
|
4
4
|
import InversedButton from './InversedButton/index.js';
|
|
5
5
|
import DefaultButton from './DefaultButton/index.js';
|
|
6
|
-
import Button from '../Button/Button.js';
|
|
7
|
-
import Link from '../Button/Link.js';
|
|
8
6
|
|
|
9
7
|
const isButton = (component) => React.isValidElement(component) &&
|
|
10
|
-
(component.type ===
|
|
11
|
-
component.type === Link ||
|
|
12
|
-
component.type === GhostButton ||
|
|
8
|
+
(component.type === GhostButton ||
|
|
13
9
|
component.type === GhostButton.Link ||
|
|
14
10
|
component.type === InversedButton ||
|
|
15
11
|
component.type === InversedButton.Link ||
|
|
@@ -1 +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 GhostButton from \"./GhostButton\"\nimport InversedButton from \"./InversedButton\"\nimport DefaultButton from \"./DefaultButton\"\nimport
|
|
1
|
+
{"version":3,"file":"ButtonsGroup.js","sources":["../../../src/components/Buttons/ButtonsGroup.tsx"],"sourcesContent":["import React, { Children } from \"react\"\nimport cx from \"classnames\"\n\nimport GhostButton from \"./GhostButton\"\nimport InversedButton from \"./InversedButton\"\nimport DefaultButton from \"./DefaultButton\"\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 === 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>\n)\n\nexport default ButtonsGroup\n"],"names":[],"mappings":";;;;;;AAcA,MAAM,QAAQ,GAAG,CACf,SAA0B,KAE1B,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC;AAC/B,KAAC,SAAS,CAAC,IAAI,KAAK,WAAW;AAC7B,QAAA,SAAS,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI;QACnC,SAAS,CAAC,IAAI,KAAK,cAAc;AACjC,QAAA,SAAS,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI;QACtC,SAAS,CAAC,IAAI,KAAK,aAAa;AAChC,QAAA,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,IAAI,CAAC,CAAA;AAEpC,MAAA,YAAY,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAqB,MACrE,6BACE,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,sBAAsB,EAAE;QAC/C,6BAA6B,EAAE,KAAK,KAAK,OAAO;QAChD,8BAA8B,EAAE,KAAK,KAAK,QAAQ;KACnD,CAAC,EAAA,EAED,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAC3C,QAAQ,CAAC,KAAK,CAAC;AACb,MAAE,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE;AACxB,QAAA,GAAG,EAAE,KAAK;AACV,QAAA,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE;YAC1C,uCAAuC,EAAE,KAAK,KAAK,WAAW;SAC/D,CAAC;QACF,SAAS,EAAE,KAAK,KAAK,WAAW;KACjC,CAAC;AACJ,MAAE,KAAK,CACV,CACG;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import ButtonsGroup from '../Buttons/ButtonsGroup.js';
|
|
3
3
|
|
|
4
4
|
const EmptyState = ({ title, children, action, secondaryAction, image, }) => {
|
|
5
5
|
return (React.createElement("div", { className: "cobalt-EmptyState" },
|
|
6
6
|
React.createElement("img", { className: "cobalt-EmptyState__Image", role: "presentation", alt: "", src: image, height: 188, width: 188 }),
|
|
7
7
|
React.createElement("h2", { className: "cobalt-EmptyState__Title" }, title),
|
|
8
8
|
children && React.createElement("div", { className: "cobalt-EmptyState__Body" }, children),
|
|
9
|
-
action && (React.createElement(
|
|
9
|
+
action && (React.createElement(ButtonsGroup, { align: "center" },
|
|
10
10
|
React.createElement(React.Fragment, null,
|
|
11
11
|
action,
|
|
12
12
|
secondaryAction)))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/EmptyState/index.tsx"],"sourcesContent":["import React from \"react\"\n\nimport
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/EmptyState/index.tsx"],"sourcesContent":["import React from \"react\"\n\nimport DefaultButton from \"../Buttons/DefaultButton\"\nimport ButtonsGroup from \"../Buttons/ButtonsGroup\"\n\nexport interface EmptyStateProps {\n children?: React.ReactNode\n title: string\n action?: typeof DefaultButton\n secondaryAction?: typeof DefaultButton\n image: string\n}\n\nexport const EmptyState = ({\n title,\n children,\n action,\n secondaryAction,\n image,\n}: EmptyStateProps) => {\n return (\n <div className=\"cobalt-EmptyState\">\n <img\n className=\"cobalt-EmptyState__Image\"\n role=\"presentation\"\n alt=\"\"\n src={image}\n height={188}\n width={188}\n />\n <h2 className=\"cobalt-EmptyState__Title\">{title}</h2>\n {children && <div className=\"cobalt-EmptyState__Body\">{children}</div>}\n {action && (\n <ButtonsGroup align=\"center\">\n <>\n {action}\n {secondaryAction}\n </>\n </ButtonsGroup>\n )}\n </div>\n )\n}\n"],"names":[],"mappings":";;;AAaa,MAAA,UAAU,GAAG,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,MAAM,EACN,eAAe,EACf,KAAK,GACW,KAAI;AACpB,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,mBAAmB,EAAA;QAChC,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,0BAA0B,EACpC,IAAI,EAAC,cAAc,EACnB,GAAG,EAAC,EAAE,EACN,GAAG,EAAE,KAAK,EACV,MAAM,EAAE,GAAG,EACX,KAAK,EAAE,GAAG,EACV,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAC,0BAA0B,EAAA,EAAE,KAAK,CAAM;AACpD,QAAA,QAAQ,IAAI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,yBAAyB,EAAA,EAAE,QAAQ,CAAO;AACrE,QAAA,MAAM,KACL,KAAA,CAAA,aAAA,CAAC,YAAY,EAAC,EAAA,KAAK,EAAC,QAAQ,EAAA;AAC1B,YAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA;gBACG,MAAM;AACN,gBAAA,eAAe,CACf,CACU,CAChB,CACG,EACP;AACH;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import { withFieldLabelAndHint } from './field.js';
|
|
4
|
-
import
|
|
4
|
+
import DefaultButton from '../Buttons/DefaultButton/index.js';
|
|
5
5
|
|
|
6
6
|
const enforceInRange = (value, min, max) => {
|
|
7
7
|
let enforcedValue = value;
|
|
@@ -56,11 +56,11 @@ class Stepper extends PureComponent {
|
|
|
56
56
|
"cobalt-Stepper--error": status === "error",
|
|
57
57
|
}) },
|
|
58
58
|
React.createElement("div", { className: "cobalt-Stepper__Wrapper" },
|
|
59
|
-
React.createElement(
|
|
59
|
+
React.createElement(DefaultButton, { className: "cobalt-Stepper__ActionButton", disabled: disabled || this.state.value === min, onClick: this.onDecrement, type: "button" }, "-"),
|
|
60
60
|
React.createElement("div", { className: "cobalt-Stepper__ContentWrapper" },
|
|
61
61
|
children ? children(this.state.value) : this.state.value,
|
|
62
62
|
React.createElement("input", { type: "hidden", name: name, value: this.state.value })),
|
|
63
|
-
React.createElement(
|
|
63
|
+
React.createElement(DefaultButton, { className: "cobalt-Stepper__ActionButton", disabled: disabled || this.state.value === max, onClick: this.onIncrement, type: "button" }, "+"))));
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
const wrappedComponent = withFieldLabelAndHint(Stepper);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.js","sources":["../../../src/components/Form/Stepper.tsx"],"sourcesContent":["import React, { PureComponent } from \"react\"\nimport classNames from \"classnames\"\nimport { FormElement } from \"./form\"\nimport { withFieldLabelAndHint } from \"./field\"\nimport
|
|
1
|
+
{"version":3,"file":"Stepper.js","sources":["../../../src/components/Form/Stepper.tsx"],"sourcesContent":["import React, { PureComponent } from \"react\"\nimport classNames from \"classnames\"\nimport { FormElement } from \"./form\"\nimport { withFieldLabelAndHint } from \"./field\"\nimport DefaultButton from \"../Buttons/DefaultButton\"\n\nconst enforceInRange = (\n value: number,\n min: number | undefined,\n max: number | undefined\n) => {\n let enforcedValue = value\n if (typeof max !== \"undefined\") {\n enforcedValue = Math.min(enforcedValue, max)\n }\n if (typeof min !== \"undefined\") {\n enforcedValue = Math.max(enforcedValue, min)\n }\n return enforcedValue\n}\n\ntype Props = {\n value: number\n name?: string\n disabled?: boolean\n min?: number\n max?: number\n step: number\n onChange?: (value: number) => void\n children?: (value: number) => React.ReactNode\n} & FormElement\n\ntype State = {\n value: number\n}\n\nclass Stepper extends PureComponent<Props, State> {\n constructor(props: Props) {\n super(props)\n\n if (props.step < 0)\n throw new Error(\"Incorrect step value. Can't be below zero\")\n\n this.onDecrement = this.onDecrement.bind(this)\n this.onIncrement = this.onIncrement.bind(this)\n this.changeValue = this.changeValue.bind(this)\n\n this.state = {\n value: enforceInRange(props.value, props.min, props.max),\n }\n }\n\n componentDidUpdate(_prevProps: Props, prevState: State) {\n if (prevState.value !== this.state.value) {\n this.changeValue(this.state.value)\n } else if (this.props.value !== this.state.value) {\n this.changeValue(this.props.value)\n }\n }\n\n onDecrement = () => {\n ;(this.props.min !== null || this.state.value > this.props.min) &&\n this.changeValue(\n parseFloat((this.state.value - this.props.step).toFixed(10))\n )\n }\n\n onIncrement = () => {\n ;(this.props.max !== null || this.state.value < this.props.max) &&\n this.changeValue(\n parseFloat((this.state.value + this.props.step).toFixed(10))\n )\n }\n\n changeValue = (value: number) => {\n this.setState(\n {\n value: enforceInRange(value, this.props.min, this.props.max),\n },\n () => {\n this.props.onChange && this.props.onChange(this.state.value)\n }\n )\n }\n\n render() {\n const { name, status, disabled, min, max, children } = this.props\n\n return (\n <div\n className={classNames(\"cobalt-Stepper\", {\n \"cobalt-Stepper--disabled\": disabled,\n \"cobalt-Stepper--success\": status === \"success\",\n \"cobalt-Stepper--error\": status === \"error\",\n })}\n >\n <div className=\"cobalt-Stepper__Wrapper\">\n <DefaultButton\n className=\"cobalt-Stepper__ActionButton\"\n disabled={disabled || this.state.value === min}\n onClick={this.onDecrement}\n type={\"button\"}\n >\n -\n </DefaultButton>\n <div className=\"cobalt-Stepper__ContentWrapper\">\n {children ? children(this.state.value) : this.state.value}\n <input type=\"hidden\" name={name} value={this.state.value} />\n </div>\n <DefaultButton\n className=\"cobalt-Stepper__ActionButton\"\n disabled={disabled || this.state.value === max}\n onClick={this.onIncrement}\n type={\"button\"}\n >\n +\n </DefaultButton>\n </div>\n </div>\n )\n }\n}\n\nconst wrappedComponent = withFieldLabelAndHint(Stepper)\nwrappedComponent.displayName = \"Stepper\"\n\nexport { wrappedComponent as Stepper }\n\ntype StepperMetaProps = {\n children: React.ReactNode\n}\nconst StepperMeta = ({ children }: StepperMetaProps) => {\n return <div className=\"cobalt-Stepper__Meta\">{children}</div>\n}\n\nexport { StepperMeta }\n"],"names":["classNames"],"mappings":"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"}
|
|
@@ -2,8 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import { RatingIcon, defaultRatingIcon } from './RatingIcons.js';
|
|
4
4
|
import RatingLabel from './RatingLabel.js';
|
|
5
|
-
import { formatRatingValue } from './index.js';
|
|
6
5
|
|
|
6
|
+
function formatRatingValue(value) {
|
|
7
|
+
return `${value}`.includes(".") ? value : value.toFixed(1);
|
|
8
|
+
}
|
|
7
9
|
function RatingCompact({ className, value, count, size = 16, icon = defaultRatingIcon, }) {
|
|
8
10
|
return (React.createElement("div", { className: cx("cobalt-rating", className) },
|
|
9
11
|
React.createElement(RatingIcon, { icon: icon, size: size, status: "full" }),
|
|
@@ -13,5 +15,5 @@ function RatingCompact({ className, value, count, size = 16, icon = defaultRatin
|
|
|
13
15
|
count && `(${count})`)));
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
export { RatingCompact };
|
|
18
|
+
export { RatingCompact, formatRatingValue };
|
|
17
19
|
//# sourceMappingURL=RatingCompact.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RatingCompact.js","sources":["../../../src/components/Rating/RatingCompact.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\nimport {\n defaultRatingIcon,\n RatingIcon,\n RatingIconsPropsType,\n} from \"./RatingIcons\"\nimport RatingLabel from \"./RatingLabel\"\
|
|
1
|
+
{"version":3,"file":"RatingCompact.js","sources":["../../../src/components/Rating/RatingCompact.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\nimport {\n defaultRatingIcon,\n RatingIcon,\n RatingIconsPropsType,\n} from \"./RatingIcons\"\nimport RatingLabel from \"./RatingLabel\"\n\ntype RatingCompactPropsType = Pick<\n RatingIconsPropsType,\n \"className\" | \"value\" | \"size\"\n> & {\n icon?: JSX.Element\n count?: number\n}\n\nexport function formatRatingValue(value: number) {\n return `${value}`.includes(\".\") ? value : value.toFixed(1)\n}\n\nexport function RatingCompact({\n className,\n value,\n count,\n size = 16,\n icon = defaultRatingIcon,\n}: RatingCompactPropsType) {\n return (\n <div className={cx(\"cobalt-rating\", className)}>\n <RatingIcon icon={icon} size={size} status={\"full\"} />\n <RatingLabel>\n {formatRatingValue(value)} {count && `(${count})`}\n </RatingLabel>\n </div>\n )\n}\n"],"names":[],"mappings":";;;;;AAiBM,SAAU,iBAAiB,CAAC,KAAa,EAAA;IAC7C,OAAO,CAAA,EAAG,KAAK,CAAE,CAAA,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AAC5D,CAAC;SAEe,aAAa,CAAC,EAC5B,SAAS,EACT,KAAK,EACL,KAAK,EACL,IAAI,GAAG,EAAE,EACT,IAAI,GAAG,iBAAiB,GACD,EAAA;IACvB,QACE,6BAAK,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC,EAAA;AAC5C,QAAA,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAI,CAAA;AACtD,QAAA,KAAA,CAAA,aAAA,CAAC,WAAW,EAAA,IAAA;YACT,iBAAiB,CAAC,KAAK,CAAC;;AAAG,YAAA,KAAK,IAAI,CAAI,CAAA,EAAA,KAAK,GAAG,CACrC,CACV,EACP;AACH;;;;"}
|
|
@@ -3,14 +3,11 @@ import React from 'react';
|
|
|
3
3
|
import { RatingIcons } from './RatingIcons.js';
|
|
4
4
|
export { RatingIcons } from './RatingIcons.js';
|
|
5
5
|
|
|
6
|
-
function formatRatingValue(value) {
|
|
7
|
-
return `${value}`.includes(".") ? value : value.toFixed(1);
|
|
8
|
-
}
|
|
9
6
|
function Rating({ className, iconsClassName, children, ...iconsProps }) {
|
|
10
7
|
return (React.createElement("div", { className: cx("cobalt-rating", className) },
|
|
11
8
|
React.createElement(RatingIcons, { className: iconsClassName, ...iconsProps }),
|
|
12
9
|
children));
|
|
13
10
|
}
|
|
14
11
|
|
|
15
|
-
export { Rating
|
|
12
|
+
export { Rating };
|
|
16
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Rating/index.tsx"],"sourcesContent":["import cx from \"classnames\"\nimport React from \"react\"\nimport { RatingIcons, RatingIconsPropsType } from \"./RatingIcons\"\nimport { RatingInput } from \"./RatingInput\"\nimport { RatingCompact } from \"./RatingCompact\"\nimport RatingLabel from \"./RatingLabel\"\n\ntype RatingPropsType = RatingIconsPropsType & {\n children?: React.ReactNode\n iconsClassName?: RatingIconsPropsType[\"className\"]\n}\n\nfunction
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Rating/index.tsx"],"sourcesContent":["import cx from \"classnames\"\nimport React from \"react\"\nimport { RatingIcons, RatingIconsPropsType } from \"./RatingIcons\"\nimport { RatingInput } from \"./RatingInput\"\nimport { RatingCompact, formatRatingValue } from \"./RatingCompact\"\nimport RatingLabel from \"./RatingLabel\"\n\ntype RatingPropsType = RatingIconsPropsType & {\n children?: React.ReactNode\n iconsClassName?: RatingIconsPropsType[\"className\"]\n}\n\nfunction Rating({\n className,\n iconsClassName,\n children,\n ...iconsProps\n}: RatingPropsType) {\n return (\n <div className={cx(\"cobalt-rating\", className)}>\n <RatingIcons className={iconsClassName} {...iconsProps} />\n {children}\n </div>\n )\n}\n\nexport {\n Rating,\n RatingLabel,\n RatingInput,\n RatingCompact,\n RatingIcons,\n formatRatingValue,\n}\n"],"names":[],"mappings":";;;;;AAYA,SAAS,MAAM,CAAC,EACd,SAAS,EACT,cAAc,EACd,QAAQ,EACR,GAAG,UAAU,EACG,EAAA;IAChB,QACE,6BAAK,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC,EAAA;AAC5C,QAAA,KAAA,CAAA,aAAA,CAAC,WAAW,EAAC,EAAA,SAAS,EAAE,cAAc,EAAA,GAAM,UAAU,EAAI,CAAA;QACzD,QAAQ,CACL,EACP;AACH;;;;"}
|
package/index.js
CHANGED
|
@@ -2,10 +2,10 @@ export { default as Accordion } from './components/Accordion/index.js';
|
|
|
2
2
|
export { default as Alerter, useAlerts } from './components/Alerter/index.js';
|
|
3
3
|
export { BasicCell } from './components/BasicCell/index.js';
|
|
4
4
|
export { BulletList, BulletListItem } from './components/BulletList/index.js';
|
|
5
|
-
export { Button, ButtonGroup } from './components/Button/index.js';
|
|
6
5
|
export { default as GhostButton } from './components/Buttons/GhostButton/index.js';
|
|
7
6
|
export { default as InversedButton } from './components/Buttons/InversedButton/index.js';
|
|
8
7
|
export { default as DefaultButton } from './components/Buttons/DefaultButton/index.js';
|
|
8
|
+
export { default as ButtonsGroup } from './components/Buttons/ButtonsGroup.js';
|
|
9
9
|
export { Callout } from './components/Callout/index.js';
|
|
10
10
|
export { default as Cell, Cells } from './components/Cell/index.js';
|
|
11
11
|
export { EmptyState } from './components/EmptyState/index.js';
|
|
@@ -32,7 +32,7 @@ export { ComposedField } from './components/Form/ComposedField.js';
|
|
|
32
32
|
export { withFieldLabelAndHint } from './components/Form/field.js';
|
|
33
33
|
export { Fieldset } from './components/Form/Fieldset.js';
|
|
34
34
|
export { Hint } from './components/Form/Hint.js';
|
|
35
|
-
export { Rating
|
|
35
|
+
export { Rating } from './components/Rating/index.js';
|
|
36
36
|
export { Select } from './components/Form/Select.js';
|
|
37
37
|
export { default as Slider, SliderValueMeta } from './components/Form/Slider.js';
|
|
38
38
|
export { Stepper, StepperMeta } from './components/Form/Stepper.js';
|
|
@@ -330,6 +330,6 @@ export { useAccordionItemContext } from '@reach/accordion';
|
|
|
330
330
|
export { default as LoadingIcon } from './components/Icon/__generated__/LoadingIcon.js';
|
|
331
331
|
export { default as StarIcon } from './components/Icon/__generated__/StarIcon.js';
|
|
332
332
|
export { RatingInput } from './components/Rating/RatingInput.js';
|
|
333
|
-
export { RatingCompact } from './components/Rating/RatingCompact.js';
|
|
333
|
+
export { RatingCompact, formatRatingValue } from './components/Rating/RatingCompact.js';
|
|
334
334
|
export { RatingIcons } from './components/Rating/RatingIcons.js';
|
|
335
335
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drivy/cobalt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Opinionated design system for Drivy's projects.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"lodash.throttle": "4.1.1",
|
|
33
33
|
"media-typer": "1.1.0",
|
|
34
34
|
"nanoid": "4.0.0",
|
|
35
|
-
"postcss": "8.4.
|
|
35
|
+
"postcss": "8.4.19",
|
|
36
36
|
"tailwindcss": "2.2.19",
|
|
37
37
|
"tippy.js": "6.3.7"
|
|
38
38
|
},
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"react-dom": "^18.2.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@getaround-eu/babel-preset-app": "1.
|
|
45
|
-
"@getaround-eu/eslint-config": "2.0.
|
|
44
|
+
"@getaround-eu/babel-preset-app": "1.1.0",
|
|
45
|
+
"@getaround-eu/eslint-config": "2.0.1",
|
|
46
46
|
"@getaround-eu/prettier-config": "1.2.0",
|
|
47
|
-
"@getaround-eu/stylelint-config": "1.2.
|
|
47
|
+
"@getaround-eu/stylelint-config": "1.2.5",
|
|
48
48
|
"@getaround-eu/ts-config": "2.2.0",
|
|
49
49
|
"@percy/storybook": "3.3.1",
|
|
50
50
|
"@rollup/plugin-json": "5.0.1",
|
|
@@ -59,15 +59,15 @@
|
|
|
59
59
|
"@testing-library/react": "13.4.0",
|
|
60
60
|
"@testing-library/react-hooks": "8.0.1",
|
|
61
61
|
"@types/classnames": "2.3.0",
|
|
62
|
-
"@types/jest": "29.2.
|
|
62
|
+
"@types/jest": "29.2.3",
|
|
63
63
|
"@types/lodash.throttle": "4.1.7",
|
|
64
64
|
"@types/media-typer": "1.1.1",
|
|
65
65
|
"@types/react": "18.0.25",
|
|
66
|
-
"@whitespace/storybook-addon-html": "^5.0.
|
|
66
|
+
"@whitespace/storybook-addon-html": "^5.0.3",
|
|
67
67
|
"autoprefixer": "10.4.13",
|
|
68
|
-
"core-js": "3.26.
|
|
69
|
-
"css-loader": "6.7.
|
|
70
|
-
"eslint": "8.
|
|
68
|
+
"core-js": "3.26.1",
|
|
69
|
+
"css-loader": "6.7.2",
|
|
70
|
+
"eslint": "8.28.0",
|
|
71
71
|
"jest": "29.3.1",
|
|
72
72
|
"jest-environment-jsdom": "29.3.1",
|
|
73
73
|
"nested-object-access": "^0.2.5",
|
|
@@ -78,8 +78,9 @@
|
|
|
78
78
|
"raw-loader": "4.0.2",
|
|
79
79
|
"react": "18.2.0",
|
|
80
80
|
"react-dom": "18.2.0",
|
|
81
|
+
"react-syntax-highlighter": "15.5.0",
|
|
81
82
|
"react-test-renderer": "18.2.0",
|
|
82
|
-
"regenerator-runtime": "0.13.
|
|
83
|
+
"regenerator-runtime": "0.13.11",
|
|
83
84
|
"rollup": "2.79.1",
|
|
84
85
|
"rollup-plugin-copy": "3.4.0",
|
|
85
86
|
"rollup-plugin-postcss": "4.0.2",
|
|
@@ -90,12 +91,12 @@
|
|
|
90
91
|
"sharp": "0.31.2",
|
|
91
92
|
"sharp-cli": "3.0.0",
|
|
92
93
|
"style-loader": "3.3.1",
|
|
93
|
-
"stylelint": "14.
|
|
94
|
+
"stylelint": "14.15.0",
|
|
94
95
|
"svg2vectordrawable": "2.9.1",
|
|
95
|
-
"svgo": "3.0.
|
|
96
|
+
"svgo": "3.0.2",
|
|
96
97
|
"ts-jest": "29.0.3",
|
|
97
98
|
"ts-node": "10.9.1",
|
|
98
|
-
"typescript": "4.
|
|
99
|
+
"typescript": "4.9.3"
|
|
99
100
|
},
|
|
100
101
|
"scripts": {
|
|
101
102
|
"build": "./scripts/build.sh",
|
package/styles/components.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import "./components/Alerter/index";
|
|
2
2
|
@import "./components/BasicCell/index";
|
|
3
3
|
@import "./components/BulletList/index";
|
|
4
|
-
@import "./components/
|
|
4
|
+
@import "./components/Buttons/index";
|
|
5
5
|
@import "./components/Calendar/CalendarRangePicker/index";
|
|
6
6
|
@import "./components/Callout/index";
|
|
7
7
|
@import "./components/Card/index";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AccordionProps as ReachAccordionProps, AccordionItemProps as ReachAccordionItemProps, AccordionButtonProps as ReachAccordionButtonProps, AccordionPanelProps as ReachAccordionPanelProps } from "@reach/accordion";
|
|
3
3
|
export { useAccordionItemContext } from "@reach/accordion";
|
|
4
|
-
|
|
4
|
+
type HeadingLevelMapType = {
|
|
5
5
|
h2: 2;
|
|
6
6
|
h3: 3;
|
|
7
7
|
h4: 4;
|
|
8
8
|
h5: 5;
|
|
9
9
|
h6: 6;
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
export
|
|
11
|
+
type HeadingTag = keyof HeadingLevelMapType;
|
|
12
|
+
export type AccordionItemHeaderPropsType = {
|
|
13
13
|
/**
|
|
14
14
|
* To improve the semantics of the markup further, the ARIA guidelines dictate
|
|
15
15
|
* that each accordion item's button should be wrapped in an element with
|
|
@@ -20,13 +20,13 @@ export declare type AccordionItemHeaderPropsType = {
|
|
|
20
20
|
className?: string;
|
|
21
21
|
leftToggleIcon?: boolean;
|
|
22
22
|
} & ReachAccordionButtonProps;
|
|
23
|
-
export
|
|
23
|
+
export type AccordionItemPanelPropsType = {
|
|
24
24
|
className?: string;
|
|
25
25
|
} & ReachAccordionPanelProps;
|
|
26
|
-
export
|
|
26
|
+
export type AccordionItemPropsType = {
|
|
27
27
|
className?: string;
|
|
28
28
|
} & ReachAccordionItemProps;
|
|
29
|
-
export
|
|
29
|
+
export type AccordionPropsType = {
|
|
30
30
|
className?: string;
|
|
31
31
|
collapsible?: ReachAccordionProps["collapsible"];
|
|
32
32
|
defaultIndex?: ReachAccordionProps["defaultIndex"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type AlertStatus = "info" | "success" | "error";
|
|
3
|
+
export type AlertType = (props: {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
status?: AlertStatus;
|
|
6
6
|
dismiss: () => void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AlertType } from "./Alert";
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
type AlertPropsType = Parameters<AlertType>[0];
|
|
4
|
+
export type AlertReducerActionData = {
|
|
5
5
|
id: string;
|
|
6
6
|
status: AlertPropsType["status"];
|
|
7
7
|
message: AlertPropsType["children"];
|
|
8
8
|
dismiss?: AlertPropsType["dismiss"];
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
type SendAlertParameters = Omit<AlertReducerActionData, "dismiss" | "id">;
|
|
11
|
+
type AlertsQueue = (Omit<AlertReducerActionData, "dismiss"> & {
|
|
12
12
|
dismiss: NonNullable<AlertReducerActionData["dismiss"]>;
|
|
13
13
|
})[];
|
|
14
14
|
export declare const useAlerts: () => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
2
|
+
export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
3
3
|
loading?: boolean;
|
|
4
4
|
href?: undefined;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
href?: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonTemplatePropsType } from "../helpers";
|
|
3
3
|
import { ButtonProps, LinkProps } from "../ButtonComponent";
|
|
4
|
-
|
|
4
|
+
type DefaultCommonPropsType = ButtonTemplatePropsType<{
|
|
5
5
|
primary?: boolean;
|
|
6
6
|
destructive?: boolean;
|
|
7
7
|
selected?: boolean;
|
|
8
8
|
}>;
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type DefaultButtonPropsType = DefaultCommonPropsType & ButtonProps;
|
|
10
|
+
export type DefaultLinkPropsType = DefaultCommonPropsType & LinkProps;
|
|
11
11
|
declare const DefaultButton: React.ForwardRefExoticComponent<{
|
|
12
12
|
primary?: boolean | undefined;
|
|
13
13
|
destructive?: boolean | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonTemplatePropsType } from "../helpers";
|
|
3
3
|
import { ButtonProps, LinkProps } from "../ButtonComponent";
|
|
4
|
-
|
|
4
|
+
type GhostCommonPropsType = ButtonTemplatePropsType<{
|
|
5
5
|
standalone?: boolean;
|
|
6
6
|
destructive?: boolean;
|
|
7
7
|
}>;
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type GhostButtonPropsType = GhostCommonPropsType & ButtonProps;
|
|
9
|
+
export type GhostLinkPropsType = GhostCommonPropsType & LinkProps;
|
|
10
10
|
declare const GhostButton: React.ForwardRefExoticComponent<{
|
|
11
11
|
standalone?: boolean | undefined;
|
|
12
12
|
destructive?: boolean | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonTemplatePropsType } from "../helpers";
|
|
3
3
|
import { ButtonProps, LinkProps } from "../ButtonComponent";
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
type InversedCommonPropsType = ButtonTemplatePropsType<Record<string, unknown>>;
|
|
5
|
+
export type InversedButtonPropsType = InversedCommonPropsType & ButtonProps;
|
|
6
|
+
export type InversedLinkPropsType = InversedCommonPropsType & LinkProps;
|
|
7
7
|
declare const InversedButton: React.ForwardRefExoticComponent<Pick<InversedButtonPropsType, string> & React.RefAttributes<HTMLButtonElement>> & {
|
|
8
8
|
Link: React.ForwardRefExoticComponent<Pick<InversedLinkPropsType, string> & React.RefAttributes<HTMLAnchorElement>>;
|
|
9
9
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IconSources } from "../Icon";
|
|
3
|
-
export
|
|
3
|
+
export type ButtonCommonPropsType = {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
className?: string;
|
|
6
6
|
disabled?: boolean;
|
|
@@ -11,6 +11,6 @@ export declare type ButtonCommonPropsType = {
|
|
|
11
11
|
iconPosition?: "left" | "right";
|
|
12
12
|
icon?: IconSources;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type ButtonTemplatePropsType<SpecificButtonProps> = SpecificButtonProps & ButtonCommonPropsType;
|
|
15
15
|
export declare const getButtonContent: ({ children, icon, iconPosition, }: Pick<ButtonCommonPropsType, "children" | "icon" | "iconPosition">) => JSX.Element;
|
|
16
16
|
export declare const getButtonCommonClassNames: ({ rounded, size, fullWidth, className, disabled, }: Pick<ButtonCommonPropsType, "rounded" | "size" | "fullWidth" | "className" | "disabled">) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GhostButtonPropsType, GhostLinkPropsType } from "./GhostButton";
|
|
2
2
|
import { InversedButtonPropsType, InversedLinkPropsType } from "./InversedButton";
|
|
3
3
|
import { DefaultButtonPropsType, DefaultLinkPropsType } from "./DefaultButton";
|
|
4
|
-
export
|
|
4
|
+
export type AllButtonsPropsType = GhostButtonPropsType & GhostLinkPropsType & InversedButtonPropsType & InversedLinkPropsType & DefaultButtonPropsType & DefaultLinkPropsType;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type DateStatusType = "highlighted" | "semi-highlighted" | "enabled" | "disabled" | "past";
|
|
2
|
+
export type StatusByDateType = {
|
|
3
3
|
[key: string]: DateStatusType;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type MonthType = {
|
|
6
6
|
monthName: string;
|
|
7
7
|
monthStart: number;
|
|
8
8
|
statusByDate?: StatusByDateType;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
11
|
-
export
|
|
10
|
+
export type DateType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31;
|
|
11
|
+
export type CalendarViewDateType = {
|
|
12
12
|
date: DateType | null;
|
|
13
13
|
status?: string | null;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
16
|
-
export
|
|
15
|
+
export type CalendarViewWeekType = CalendarViewDateType[];
|
|
16
|
+
export type CalendarViewMonthType = CalendarViewWeekType[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { PureComponent } from "react";
|
|
2
|
-
export
|
|
2
|
+
export type CardProps = {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
className?: string;
|
|
5
5
|
flattened?: boolean;
|
|
@@ -8,7 +8,7 @@ export declare const Card: {
|
|
|
8
8
|
({ children, className, flattened }: CardProps): JSX.Element;
|
|
9
9
|
Section: typeof CardSection;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type CardSectionProps = {
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
className?: string;
|
|
14
14
|
tabBar?: boolean;
|
|
@@ -20,7 +20,7 @@ export declare type CardSectionProps = {
|
|
|
20
20
|
*/
|
|
21
21
|
divided?: boolean | string;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type CardSectionLinkProps = CardSectionProps & {
|
|
24
24
|
href: React.AnchorHTMLAttributes<HTMLAnchorElement>["href"];
|
|
25
25
|
target?: React.AnchorHTMLAttributes<HTMLAnchorElement>["target"];
|
|
26
26
|
rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>["rel"];
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
2
|
+
export type CellPropsType = {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
divided?: boolean;
|
|
5
5
|
className?: string;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type CellSoftPropsType = {
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
softDivided?: boolean;
|
|
10
10
|
className?: string;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type CellsPropsType = {
|
|
13
13
|
content: CellPropsType["children"][];
|
|
14
14
|
} & Omit<CellPropsType, "children">;
|
|
15
|
-
export
|
|
15
|
+
export type CellsSoftPropsType = {
|
|
16
16
|
content: CellSoftPropsType["children"][];
|
|
17
17
|
} & Omit<CellSoftPropsType, "children">;
|
|
18
18
|
declare function Cell(props: CellPropsType): JSX.Element;
|