@drivy/cobalt 0.21.0 → 0.22.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.
Files changed (48) hide show
  1. package/components/Alerter/Alert.js.map +1 -1
  2. package/components/Alerter/index.js.map +1 -1
  3. package/components/BulletList/index.js.map +1 -1
  4. package/components/Buttons/helpers.js.map +1 -1
  5. package/components/Card/index.js.map +1 -1
  6. package/components/Cell/index.js.map +1 -1
  7. package/components/EmptyState/index.js +3 -2
  8. package/components/EmptyState/index.js.map +1 -1
  9. package/components/Form/CheckablePill.js.map +1 -1
  10. package/components/Form/Checkmark.js.map +1 -1
  11. package/components/Helper/index.js.map +1 -1
  12. package/components/HorizontalList/index.js.map +1 -1
  13. package/components/Modal/ModalBody.js +1 -1
  14. package/components/Modal/ModalBody.js.map +1 -1
  15. package/components/Modal/ModalFooter.js.map +1 -1
  16. package/components/Popover/index.js.map +1 -1
  17. package/components/Rating/RatingLabel.js.map +1 -1
  18. package/components/Rating/index.js.map +1 -1
  19. package/components/Tabs/index.js +1 -1
  20. package/components/Tabs/index.js.map +1 -1
  21. package/package.json +9 -12
  22. package/types/__tests__/AsyncComponent.d.ts +5 -4
  23. package/types/components/Alerter/Alert.d.ts +4 -3
  24. package/types/components/BulletList/index.d.ts +1 -1
  25. package/types/components/Button/index.d.ts +6 -72
  26. package/types/components/Buttons/DefaultButton/index.d.ts +2 -24
  27. package/types/components/Buttons/GhostButton/index.d.ts +2 -24
  28. package/types/components/Buttons/helpers.d.ts +4 -3
  29. package/types/components/Card/index.d.ts +4 -3
  30. package/types/components/Cell/index.d.ts +7 -5
  31. package/types/components/Form/Autocomplete/index.d.ts +20 -18
  32. package/types/components/Form/CheckablePill.d.ts +1 -1
  33. package/types/components/Form/Checkmark.d.ts +1 -1
  34. package/types/components/Form/ComposedField.d.ts +5 -4
  35. package/types/components/Form/Select.d.ts +5 -4
  36. package/types/components/Form/Slider.d.ts +1 -38
  37. package/types/components/Form/TextInput.d.ts +6 -5
  38. package/types/components/Helper/index.d.ts +4 -3
  39. package/types/components/HorizontalList/index.d.ts +4 -3
  40. package/types/components/Modal/ModalBody.d.ts +5 -4
  41. package/types/components/Modal/ModalFooter.d.ts +4 -3
  42. package/types/components/Popover/index.d.ts +4 -3
  43. package/types/components/Rating/RatingLabel.d.ts +3 -1
  44. package/types/components/Rating/index.d.ts +2 -1
  45. package/types/components/Tabs/index.d.ts +14 -4
  46. package/types/components/utils/index.d.ts +0 -1
  47. package/types/components/utils/isExpectedReactComponent.d.ts +0 -3
  48. package/types/components/utils/isExpectedReactComponent.spec.d.ts +0 -1
@@ -2,6 +2,11 @@ import React from "react";
2
2
  import { IconSources } from "../Icon";
3
3
  import { FormElement } from "./form";
4
4
  export declare type TextInputType = "text" | "email" | "number" | "password" | "search" | "tel" | "url" | "date" | "datetime-local" | "month" | "time" | "week" | "currency";
5
+ declare type Props = {
6
+ type?: TextInputType;
7
+ icon?: IconSources;
8
+ forwardedRef?: React.Ref<HTMLInputElement>;
9
+ } & FormElement & React.InputHTMLAttributes<HTMLInputElement>;
5
10
  export declare const TextInputWrapper: ({ icon, status, render, }: {
6
11
  icon?: "search" | "accountDetails" | "addPicture" | "airConditioning" | "airport" | "android" | "antique" | "arrowLeftCircleFilled" | "arrowLeft" | "arrowRightCircleFilled" | "arrowRightCircle" | "arrowRight" | "audioInput" | "babySeat" | "battery" | "bell" | "bikeRack" | "bin" | "bluetooth" | "briefcase" | "bulb" | "cable" | "cabriolet" | "calendarCheck" | "calendarClock" | "calendarEnd" | "calendarStart" | "calendar" | "cameraAdd" | "camera" | "campervan" | "carAdd" | "carCheck" | "carDamages" | "carDrivyOpen" | "carGroup" | "carLock" | "carPlay" | "carReturn" | "carSearch" | "carTypeAntique" | "carTypeCabriolet" | "carTypeCampervan" | "carTypeCity" | "carTypeConvertible" | "carTypeCoupe" | "carTypeFamily" | "carTypeFourFour" | "carTypeMinibus" | "carTypeSedan" | "carTypeUtility" | "car" | "card" | "cdPlayer" | "certificate" | "chains" | "checkCircleFilled" | "checkCircle" | "check" | "checklist" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "circledArrowRight" | "city" | "cleaning" | "clockAlert" | "clockBackwards" | "clockForwards" | "clock" | "closeCircleFilled" | "close" | "connectCar" | "contactMail" | "contactPhone" | "contextualPaperclip" | "contextualQuestion" | "contextualWarningCircleFilled" | "contextualWarningCircle" | "convertible" | "copy" | "coupe" | "creditCardAdd" | "creditCardError" | "creditCard" | "cruiseControl" | "dashcam" | "directions" | "document" | "dotHorizontal" | "dotVertical" | "dotsHorizontal" | "dotsVertical" | "download" | "earning" | "earth" | "edit" | "electric" | "evBattery" | "evCable" | "evCharger" | "externalLink" | "eyeClosed" | "eyeOpened" | "eye" | "faceRecognition" | "facebook" | "family" | "fileFilled" | "filter" | "filters" | "flag" | "fourByFour" | "fuelTank" | "geolocation" | "gift" | "gps" | "graphUp" | "healing" | "heart" | "hitch" | "home" | "idCard" | "incident" | "infoCircleFilled" | "infoCircle" | "infoFilled" | "info" | "instant" | "invoice" | "keyConnect" | "key" | "licenceCheck" | "licencePaper" | "licence" | "lifeBuoy" | "linkedin" | "loading" | "locality" | "locationMap" | "locationParking" | "locationPin" | "location" | "lockCheck" | "locked" | "login" | "logout" | "mailCheck" | "mail" | "mapAlt" | "map" | "meetDriver" | "meetOwner" | "menuList" | "messages" | "mileage" | "minibus" | "minusCircleFilled" | "minus" | "miscGift" | "nearbyDevice" | "notification" | "number1Circle" | "number2Circle" | "number3Circle" | "number4Circle" | "number5Circle" | "okHand" | "optionAirConditioning" | "optionAndroidAuto" | "optionAppleCarplay" | "optionAudioInput" | "optionBabySeat" | "optionBikeRack" | "optionBluetoothAudio" | "optionCdPlayer" | "optionChains" | "optionCruiseControl" | "optionDashcam" | "optionGps" | "optionHasTrailer" | "optionHitch" | "optionRoofBox" | "optionSkiRack" | "optionSnowTire" | "optionWheelchairAccessible" | "paperclip" | "parking" | "passport" | "payments" | "pencil" | "peopleUser" | "performance" | "phoneLink" | "phone" | "photos" | "pig" | "pin" | "plug" | "plusCircleFilled" | "plus" | "position" | "pricingFlat" | "pricingVariable" | "profilePicture" | "questionCircleFilled" | "questionCircle" | "question" | "raceFlag" | "refresh" | "reorder" | "replacementCar" | "reply" | "reset" | "ride" | "roofBox" | "sealCheck" | "searchCar" | "searchPeople" | "sedan" | "serviceBattery" | "serviceCleaning" | "serviceFuel" | "serviceHealing" | "serviceLocked" | "serviceTolls" | "serviceUnlocked" | "settings" | "shareAndroid" | "shareIos" | "share" | "shieldCheck" | "shield" | "shop" | "skiRack" | "slider" | "smartphone" | "snowTire" | "socialFacebook" | "socialLinkedin" | "socialTwitter" | "socialWhatsapp" | "starHalf" | "star" | "stars" | "subway" | "suitcase" | "support" | "suv" | "synch" | "tag" | "timeAlert" | "timeBackwards" | "timeCalendar" | "timeForward" | "tolls" | "trailer" | "train" | "triangleDown" | "triangleRight" | "triangleUp" | "twitter" | "twoPeople" | "unfold" | "unlocked" | "userCheck" | "userQuestion" | "userShield" | "userSwitch" | "user" | "utilityVanLarge" | "utilityVanMedium" | "utilityVanSmall" | "verifiedSeal" | "walk" | "wallet" | "warningCircleFilled" | "warningCircle" | "whatsapp" | "wheel" | "wheelchair" | "wrench" | "yingyang" | undefined;
7
12
  status?: FormElement["status"];
@@ -18,10 +23,6 @@ declare const wrappedComponent: React.ComponentClass<{
18
23
  fieldClassName?: string | undefined;
19
24
  fullWidth?: boolean | undefined;
20
25
  }, any> & {
21
- Raw: React.ComponentType<{
22
- type?: TextInputType | undefined;
23
- icon?: "search" | "accountDetails" | "addPicture" | "airConditioning" | "airport" | "android" | "antique" | "arrowLeftCircleFilled" | "arrowLeft" | "arrowRightCircleFilled" | "arrowRightCircle" | "arrowRight" | "audioInput" | "babySeat" | "battery" | "bell" | "bikeRack" | "bin" | "bluetooth" | "briefcase" | "bulb" | "cable" | "cabriolet" | "calendarCheck" | "calendarClock" | "calendarEnd" | "calendarStart" | "calendar" | "cameraAdd" | "camera" | "campervan" | "carAdd" | "carCheck" | "carDamages" | "carDrivyOpen" | "carGroup" | "carLock" | "carPlay" | "carReturn" | "carSearch" | "carTypeAntique" | "carTypeCabriolet" | "carTypeCampervan" | "carTypeCity" | "carTypeConvertible" | "carTypeCoupe" | "carTypeFamily" | "carTypeFourFour" | "carTypeMinibus" | "carTypeSedan" | "carTypeUtility" | "car" | "card" | "cdPlayer" | "certificate" | "chains" | "checkCircleFilled" | "checkCircle" | "check" | "checklist" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "circledArrowRight" | "city" | "cleaning" | "clockAlert" | "clockBackwards" | "clockForwards" | "clock" | "closeCircleFilled" | "close" | "connectCar" | "contactMail" | "contactPhone" | "contextualPaperclip" | "contextualQuestion" | "contextualWarningCircleFilled" | "contextualWarningCircle" | "convertible" | "copy" | "coupe" | "creditCardAdd" | "creditCardError" | "creditCard" | "cruiseControl" | "dashcam" | "directions" | "document" | "dotHorizontal" | "dotVertical" | "dotsHorizontal" | "dotsVertical" | "download" | "earning" | "earth" | "edit" | "electric" | "evBattery" | "evCable" | "evCharger" | "externalLink" | "eyeClosed" | "eyeOpened" | "eye" | "faceRecognition" | "facebook" | "family" | "fileFilled" | "filter" | "filters" | "flag" | "fourByFour" | "fuelTank" | "geolocation" | "gift" | "gps" | "graphUp" | "healing" | "heart" | "hitch" | "home" | "idCard" | "incident" | "infoCircleFilled" | "infoCircle" | "infoFilled" | "info" | "instant" | "invoice" | "keyConnect" | "key" | "licenceCheck" | "licencePaper" | "licence" | "lifeBuoy" | "linkedin" | "loading" | "locality" | "locationMap" | "locationParking" | "locationPin" | "location" | "lockCheck" | "locked" | "login" | "logout" | "mailCheck" | "mail" | "mapAlt" | "map" | "meetDriver" | "meetOwner" | "menuList" | "messages" | "mileage" | "minibus" | "minusCircleFilled" | "minus" | "miscGift" | "nearbyDevice" | "notification" | "number1Circle" | "number2Circle" | "number3Circle" | "number4Circle" | "number5Circle" | "okHand" | "optionAirConditioning" | "optionAndroidAuto" | "optionAppleCarplay" | "optionAudioInput" | "optionBabySeat" | "optionBikeRack" | "optionBluetoothAudio" | "optionCdPlayer" | "optionChains" | "optionCruiseControl" | "optionDashcam" | "optionGps" | "optionHasTrailer" | "optionHitch" | "optionRoofBox" | "optionSkiRack" | "optionSnowTire" | "optionWheelchairAccessible" | "paperclip" | "parking" | "passport" | "payments" | "pencil" | "peopleUser" | "performance" | "phoneLink" | "phone" | "photos" | "pig" | "pin" | "plug" | "plusCircleFilled" | "plus" | "position" | "pricingFlat" | "pricingVariable" | "profilePicture" | "questionCircleFilled" | "questionCircle" | "question" | "raceFlag" | "refresh" | "reorder" | "replacementCar" | "reply" | "reset" | "ride" | "roofBox" | "sealCheck" | "searchCar" | "searchPeople" | "sedan" | "serviceBattery" | "serviceCleaning" | "serviceFuel" | "serviceHealing" | "serviceLocked" | "serviceTolls" | "serviceUnlocked" | "settings" | "shareAndroid" | "shareIos" | "share" | "shieldCheck" | "shield" | "shop" | "skiRack" | "slider" | "smartphone" | "snowTire" | "socialFacebook" | "socialLinkedin" | "socialTwitter" | "socialWhatsapp" | "starHalf" | "star" | "stars" | "subway" | "suitcase" | "support" | "suv" | "synch" | "tag" | "timeAlert" | "timeBackwards" | "timeCalendar" | "timeForward" | "tolls" | "trailer" | "train" | "triangleDown" | "triangleRight" | "triangleUp" | "twitter" | "twoPeople" | "unfold" | "unlocked" | "userCheck" | "userQuestion" | "userShield" | "userSwitch" | "user" | "utilityVanLarge" | "utilityVanMedium" | "utilityVanSmall" | "verifiedSeal" | "walk" | "wallet" | "warningCircleFilled" | "warningCircle" | "whatsapp" | "wheel" | "wheelchair" | "wrench" | "yingyang" | undefined;
24
- forwardedRef?: React.Ref<HTMLInputElement> | undefined;
25
- } & FormElement & React.InputHTMLAttributes<HTMLInputElement>>;
26
+ Raw: React.ComponentType<Props>;
26
27
  };
27
28
  export { wrappedComponent as TextInput };
@@ -1,11 +1,12 @@
1
- import { PropsWithChildren } from "react";
1
+ import React from "react";
2
2
  import DefaultButton from "../Buttons/DefaultButton";
3
- declare type HelperPropsType = PropsWithChildren<{
3
+ declare type HelperPropsType = {
4
+ children?: React.ReactNode;
4
5
  className?: string;
5
6
  title: string;
6
7
  titleClassName?: string;
7
8
  contentClassName?: string;
8
9
  cta?: ReturnType<typeof DefaultButton | typeof DefaultButton.Link>;
9
- }>;
10
+ };
10
11
  declare const Helper: ({ className, titleClassName, contentClassName, title, children, cta, }: HelperPropsType) => JSX.Element;
11
12
  export default Helper;
@@ -1,9 +1,10 @@
1
- import { PropsWithChildren } from "react";
1
+ import React from "react";
2
2
  import { CobaltBreakpointType } from "../../hooks/useBreakpoint";
3
- export declare type HorizontalListPropsType = PropsWithChildren<{
3
+ export declare type HorizontalListPropsType = {
4
+ children?: React.ReactNode;
4
5
  className?: string;
5
6
  fitFrom?: Exclude<CobaltBreakpointType, "over">;
6
- }>;
7
+ };
7
8
  export default function HorizontalList({ className, fitFrom, children, }: HorizontalListPropsType): JSX.Element;
8
9
  declare type HorizontalScrollerPaddingBlockProps = {
9
10
  className?: string;
@@ -1,7 +1,8 @@
1
- import { FunctionComponent } from "react";
2
- declare const ModalBody: FunctionComponent<{
3
- bodySpacing?: boolean;
1
+ import React from "react";
2
+ declare const ModalBody: ({ children, bodySpacing, hasHeader, hasFooter, }: {
3
+ children?: React.ReactNode;
4
+ bodySpacing?: boolean | undefined;
4
5
  hasHeader: boolean;
5
6
  hasFooter: boolean;
6
- }>;
7
+ }) => JSX.Element;
7
8
  export default ModalBody;
@@ -1,6 +1,7 @@
1
- import { PropsWithChildren } from "react";
2
- export declare type ModalFooterPropsType = PropsWithChildren<{
1
+ import React from "react";
2
+ export declare type ModalFooterPropsType = {
3
+ children?: React.ReactNode;
3
4
  className?: string;
4
- }>;
5
+ };
5
6
  declare const ModalFooter: ({ children, className }: ModalFooterPropsType) => JSX.Element;
6
7
  export default ModalFooter;
@@ -1,6 +1,7 @@
1
- import { PropsWithChildren } from "react";
1
+ import React from "react";
2
2
  import { TippyProps } from "@tippyjs/react";
3
- export declare type PopoverPropsType = PropsWithChildren<{
3
+ export declare type PopoverPropsType = {
4
+ children?: React.ReactNode;
4
5
  isOpen: boolean;
5
6
  close: () => void;
6
7
  "aria-label"?: string;
@@ -20,6 +21,6 @@ export declare type PopoverPropsType = PropsWithChildren<{
20
21
  * Useful to render async content in the popover
21
22
  */
22
23
  lazy?: boolean;
23
- }>;
24
+ };
24
25
  declare const Popover: ({ isOpen, targetRef, close, "aria-label": ariaLabel, children, bodySpacing, onShow, onHidden, arrow, placement, theme, distance, zIndex, lazy, }: PopoverPropsType) => JSX.Element;
25
26
  export default Popover;
@@ -1,4 +1,6 @@
1
1
  import React from "react";
2
- declare type RatingLabelPropsType = React.PropsWithChildren<React.ReactNode>;
2
+ declare type RatingLabelPropsType = {
3
+ children?: React.ReactNode;
4
+ };
3
5
  declare function RatingLabel({ children }: RatingLabelPropsType): JSX.Element;
4
6
  export default RatingLabel;
@@ -3,7 +3,8 @@ import { RatingIcons, RatingIconsPropsType } from "./RatingIcons";
3
3
  import { RatingInput } from "./RatingInput";
4
4
  import { RatingCompact } from "./RatingCompact";
5
5
  import RatingLabel from "./RatingLabel";
6
- declare type RatingPropsType = React.PropsWithChildren<RatingIconsPropsType> & {
6
+ declare type RatingPropsType = RatingIconsPropsType & {
7
+ children?: React.ReactNode;
7
8
  iconsClassName?: RatingIconsPropsType["className"];
8
9
  };
9
10
  declare function formatRatingValue(value: number): string | number;
@@ -1,5 +1,6 @@
1
- import React, { FC } from "react";
1
+ import React from "react";
2
2
  export declare type TabsPropsType = {
3
+ children?: React.ReactNode;
3
4
  /**
4
5
  * Index of the initial actived tab (first tab by default)
5
6
  */
@@ -14,6 +15,7 @@ export declare type TabsPropsType = {
14
15
  subLevel?: boolean;
15
16
  };
16
17
  declare type TabPropsType = {
18
+ children?: React.ReactNode;
17
19
  /**
18
20
  * Label/title of the tab
19
21
  */
@@ -23,8 +25,16 @@ declare type TabPropsType = {
23
25
  */
24
26
  href?: string;
25
27
  };
26
- export declare const Tab: FC<TabPropsType>;
27
- export declare const Tabs: FC<TabsPropsType> & {
28
- Tab: FC<TabPropsType>;
28
+ export declare const Tab: {
29
+ (_props: TabPropsType): null;
30
+ displayName: string;
31
+ };
32
+ export declare const Tabs: {
33
+ ({ children, defaultTabIndex, onChange, subLevel, }: TabsPropsType): JSX.Element;
34
+ Tab: {
35
+ (_props: TabPropsType): null;
36
+ displayName: string;
37
+ };
38
+ displayName: string;
29
39
  };
30
40
  export default Tabs;
@@ -4,6 +4,5 @@ export { default as eqSet } from "./eqSet";
4
4
  export { default as getThemeColors } from "./getThemeColors";
5
5
  export { default as throttle } from "lodash.throttle";
6
6
  export { default as Timer } from "./Timer";
7
- export { default as isExpectedReactComponent } from "./isExpectedReactComponent";
8
7
  export { getScrollbarWidth } from "./dom";
9
8
  export { remToPx } from "./px";
@@ -1,3 +0,0 @@
1
- import { ReactNode, ReactElement } from "react";
2
- declare const isExpectedReactComponent: <ComponentPropsType>(component: ReactNode, expectedComponent: ReactNode) => component is ReactElement<ComponentPropsType, string | import("react").JSXElementConstructor<any>>;
3
- export default isExpectedReactComponent;