@drivy/cobalt 0.17.0 → 0.18.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 (42) hide show
  1. package/cjs/tokens/icons.js +1 -0
  2. package/cjs/tokens/icons.js.map +1 -1
  3. package/cjs/tokens/theme.js +3 -3
  4. package/components/Buttons/DefaultButton/index.js +6 -6
  5. package/components/Buttons/DefaultButton/index.js.map +1 -1
  6. package/components/Card/index.js +4 -3
  7. package/components/Card/index.js.map +1 -1
  8. package/components/Icon/__generated__/PhoneLinkIcon.js +21 -0
  9. package/components/Icon/__generated__/PhoneLinkIcon.js.map +1 -0
  10. package/components/Rating/RatingCompact.js +5 -2
  11. package/components/Rating/RatingCompact.js.map +1 -1
  12. package/icons/index.js +1 -0
  13. package/icons/index.js.map +1 -1
  14. package/icons/phone-link.js +4 -0
  15. package/icons/phone-link.js.map +1 -0
  16. package/icons/phone-link.svg +1 -0
  17. package/icons/search-car.js +1 -1
  18. package/icons/search-car.svg +1 -1
  19. package/index.js +1 -0
  20. package/index.js.map +1 -1
  21. package/package.json +29 -29
  22. package/styles/components/Buttons/DefaultButton/index.scss +9 -0
  23. package/styles/core/_colors-map.scss +3 -3
  24. package/styles/core/theme.scss +3 -3
  25. package/tokens/icons.js +1 -0
  26. package/tokens/icons.js.map +1 -1
  27. package/tokens/theme.js +3 -3
  28. package/types/components/Button/index.d.ts +8 -8
  29. package/types/components/Buttons/DefaultButton/index.d.ts +5 -5
  30. package/types/components/Buttons/GhostButton/index.d.ts +2 -2
  31. package/types/components/Card/index.d.ts +5 -1
  32. package/types/components/Form/Autocomplete/index.d.ts +2 -2
  33. package/types/components/Form/TextInput.d.ts +3 -3
  34. package/types/components/Icon/__generated__/PhoneLinkIcon.d.ts +10 -0
  35. package/types/components/Icon/__generated__/index.d.ts +1 -0
  36. package/types/components/Icon/index.d.ts +1 -1
  37. package/types/components/Rating/RatingCompact.d.ts +2 -1
  38. package/types/icons/index.d.ts +1 -0
  39. package/types/tokens/index.d.ts +4 -3
  40. package/utilities.css +3 -6
  41. package/types/__tests__/fileMock.d.ts +0 -2
  42. package/types/components/Icon/svgrTemplate.d.ts +0 -11
@@ -194,6 +194,7 @@ const icons = {
194
194
  pencil: "pencil.svg",
195
195
  peopleUser: "people-user.svg",
196
196
  performance: "performance.svg",
197
+ phoneLink: "phone-link.svg",
197
198
  phone: "phone.svg",
198
199
  photos: "photos.svg",
199
200
  pig: "pig.svg",
@@ -1 +1 @@
1
- {"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -39,7 +39,7 @@ const background = {
39
39
  successAlt: "graphite/green.100/green.1000"
40
40
  };
41
41
  const buttonBackground = {
42
- accentAlt: "indigo/purple.100/purpleDeep.900",
42
+ selected: "indigo/purple.100/purpleDeep.900",
43
43
  destructiveInteractive: {
44
44
  DEFAULT: "red/red.100/red.900",
45
45
  hover: "red/red.120/red.900",
@@ -69,7 +69,7 @@ const buttonBackground = {
69
69
  }
70
70
  };
71
71
  const buttonIcon = {
72
- accentAlt: "purple/purple.500/grey.100",
72
+ selected: "white/purple.500/grey.100",
73
73
  destructiveInteractive: {
74
74
  DEFAULT: "red/red.500/red.200",
75
75
  hover: "red/red.500/red.200",
@@ -99,7 +99,7 @@ const buttonIcon = {
99
99
  }
100
100
  };
101
101
  const buttonLabel = {
102
- accentAlt: "purple/purple.500/grey.100",
102
+ selected: "white/purple.500/grey.100",
103
103
  destructiveInteractive: {
104
104
  DEFAULT: "white/red.500/red.200",
105
105
  hover: "white/red.500/red.200",
@@ -3,13 +3,13 @@ import cx from 'classnames';
3
3
  import { getButtonContent, getButtonCommonClassNames } from '../helpers.js';
4
4
  import Button from '../ButtonComponent.js';
5
5
 
6
- const getComputedClassName = ({ className, active, primary, destructive, }) => cx(className, "cob-Button__default", {
7
- "cob-Button__default--active": active,
6
+ const getComputedClassName = ({ className, selected, primary, destructive, }) => cx(className, "cob-Button__default", {
7
+ "cob-Button__default--selected": selected,
8
8
  "cob-Button__default--primary": primary,
9
9
  "cob-Button__default--destructive": destructive,
10
10
  });
11
11
  const _DefaultButton = forwardRef((props, ref) => {
12
- const { children, active, primary, destructive, icon, iconPosition, className, loading, disabled, rounded, size, fullWidth, ...restButtonProps } = props;
12
+ const { children, selected, primary, destructive, icon, iconPosition, className, loading, disabled, rounded, size, fullWidth, ...restButtonProps } = props;
13
13
  const content = getButtonContent({ children, icon, iconPosition });
14
14
  const isDisabled = disabled || loading;
15
15
  const buttonClassNames = getButtonCommonClassNames({
@@ -21,14 +21,14 @@ const _DefaultButton = forwardRef((props, ref) => {
21
21
  });
22
22
  return (React.createElement(Button, { ...restButtonProps, className: getComputedClassName({
23
23
  className: buttonClassNames,
24
- active,
24
+ selected,
25
25
  primary,
26
26
  destructive,
27
27
  }), ref: ref, loading: loading, disabled: isDisabled }, content));
28
28
  });
29
29
  _DefaultButton.displayName = "DefaultButton";
30
30
  const DefaultLink = forwardRef((props, ref) => {
31
- const { children, active, primary, destructive, icon, iconPosition, className, loading, disabled, rounded, size, fullWidth, ...restLinkProps } = props;
31
+ const { children, selected, primary, destructive, icon, iconPosition, className, loading, disabled, rounded, size, fullWidth, ...restLinkProps } = props;
32
32
  const content = getButtonContent({ children, icon, iconPosition });
33
33
  const isDisabled = disabled || loading;
34
34
  const buttonClassNames = getButtonCommonClassNames({
@@ -40,7 +40,7 @@ const DefaultLink = forwardRef((props, ref) => {
40
40
  });
41
41
  return (React.createElement(Button.Link, { ...restLinkProps, className: getComputedClassName({
42
42
  className: buttonClassNames,
43
- active,
43
+ selected,
44
44
  primary,
45
45
  destructive,
46
46
  }), ref: ref, loading: loading, disabled: isDisabled }, content));
@@ -1 +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,MAAM,oBAAoB,GAAG,CAAC,EAC5B,SAAS,EACT,MAAM,EACN,OAAO,EACP,WAAW,GACY,KACvB,EAAE,CAAC,SAAS,EAAE,qBAAqB,EAAE;AACnC,IAAA,6BAA6B,EAAE,MAAM;AACrC,IAAA,8BAA8B,EAAE,OAAO;AACvC,IAAA,kCAAkC,EAAE,WAAW;AAChD,CAAA,CAAC,CAAA;AAEJ,MAAM,cAAc,GAAG,UAAU,CAC/B,CAAC,KAA6B,EAAE,GAAG,KAAI;A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AAA;IACtC,MAAM,gBAAgB,GAAG,yBAAyB,CAAC;AACjD,QAAA,QAAQ,EAAE,UAAU;QACpB,OAAO;QACP,IAAI;QACJ,SAAS;QACT,SAAS;AACV,KAAA,CAAC,CAAA;IACF,QACE,KAAC,CAAA,aAAA,CAAA,MAAM,CAAC,IAAI,EACN,EAAA,GAAA,aAAa,EACjB,SAAS,EAAE,oBAAoB,CAAC;AAC9B,YAAA,SAAS,EAAE,gBAAgB;YAC3B,MAAM;YACN,OAAO;YACP,WAAW;AACZ,SAAA,CAAC,EACF,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,UAAU,EAAA,EAEnB,OAAO,CACI,EACf;AACH,CAAC,CACF,CAAA;AACD,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA;AAEvC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;;;;"}
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 selected?: boolean\n}>\n\nexport type DefaultButtonPropsType = DefaultCommonPropsType & ButtonProps\nexport type DefaultLinkPropsType = DefaultCommonPropsType & LinkProps\n\nconst getComputedClassName = ({\n className,\n selected,\n primary,\n destructive,\n}: DefaultCommonPropsType) =>\n cx(className, \"cob-Button__default\", {\n \"cob-Button__default--selected\": selected,\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 selected,\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 selected,\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 selected,\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 selected,\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,MAAM,oBAAoB,GAAG,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,OAAO,EACP,WAAW,GACY,KACvB,EAAE,CAAC,SAAS,EAAE,qBAAqB,EAAE;AACnC,IAAA,+BAA+B,EAAE,QAAQ;AACzC,IAAA,8BAA8B,EAAE,OAAO;AACvC,IAAA,kCAAkC,EAAE,WAAW;AAChD,CAAA,CAAC,CAAA;AAEJ,MAAM,cAAc,GAAG,UAAU,CAC/B,CAAC,KA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,GAAG,QAAQ,IAAI,OAAO,CAAA;IACtC,MAAM,gBAAgB,GAAG,yBAAyB,CAAC;AACjD,QAAA,QAAQ,EAAE,UAAU;QACpB,OAAO;QACP,IAAI;QACJ,SAAS;QACT,SAAS;AACV,KAAA,CAAC,CAAA;IACF,QACE,KAAC,CAAA,aAAA,CAAA,MAAM,CAAC,IAAI,EACN,EAAA,GAAA,aAAa,EACjB,SAAS,EAAE,oBAAoB,CAAC;AAC9B,YAAA,SAAS,EAAE,gBAAgB;YAC3B,QAAQ;YACR,OAAO;YACP,WAAW;AACZ,SAAA,CAAC,EACF,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,UAAU,EAAA,EAEnB,OAAO,CACI,EACf;AACH,CAAC,CACF,CAAA;AACD,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA;AAEvC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;;;;"}
@@ -4,8 +4,8 @@ import cx from 'classnames';
4
4
  const Card = ({ children, className, flattened }) => (React.createElement("div", { className: cx("cobalt-Card", className, {
5
5
  "cobalt-Card--flattened": flattened,
6
6
  }) }, children));
7
- const getClasses = ({ tabBar, tight, subdued, divided }) => {
8
- return cx("cobalt-Card__Section", {
7
+ const getClasses = ({ className = "", tabBar, tight, subdued, divided, }) => {
8
+ return cx(className, "cobalt-Card__Section", {
9
9
  "cobalt-Card__Section--tabBar": tabBar === true,
10
10
  "cobalt-Card__Section--tight": tight === true,
11
11
  "cobalt-Card__Section--subdued": subdued === true,
@@ -22,7 +22,8 @@ class CardSection extends PureComponent {
22
22
  return React.createElement("div", { className: getClasses(this.props) }, this.props.children);
23
23
  }
24
24
  }
25
- CardSection.Link = CardSectionLink;
25
+ CardSection.Link = CardSectionLink;
26
+ Card.Section = CardSection;
26
27
 
27
28
  export { Card, CardSection, Card as default };
28
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Card/index.tsx"],"sourcesContent":["import React, { PureComponent, PropsWithChildren } from \"react\"\nimport cx from \"classnames\"\n\nexport type CardProps = PropsWithChildren<{\n className?: string\n flattened?: boolean\n}>\n\nexport const Card = ({ children, className, flattened }: CardProps) => (\n <div\n className={cx(\"cobalt-Card\", className, {\n \"cobalt-Card--flattened\": flattened,\n })}\n >\n {children}\n </div>\n)\n\nexport type CardSectionProps = {\n children: React.ReactNode\n tabBar?: boolean\n tight?: boolean\n subdued?: boolean\n /**\n * true or \"soft\"\n * @default false\n */\n divided?: boolean | string\n}\n\nexport type CardSectionLinkProps = CardSectionProps & {\n href: React.AnchorHTMLAttributes<HTMLAnchorElement>[\"href\"]\n target?: React.AnchorHTMLAttributes<HTMLAnchorElement>[\"target\"]\n rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>[\"rel\"]\n}\n\nconst getClasses = ({ tabBar, tight, subdued, divided }: CardSectionProps) => {\n return cx(\"cobalt-Card__Section\", {\n \"cobalt-Card__Section--tabBar\": tabBar === true,\n \"cobalt-Card__Section--tight\": tight === true,\n \"cobalt-Card__Section--subdued\": subdued === true,\n \"cobalt-Card__Section--divided\": divided === true,\n \"cobalt-Card__Section--dividedSoft\": divided === \"soft\",\n })\n}\n\nconst CardSectionLink = ({\n href,\n target,\n rel,\n ...baseProps\n}: CardSectionLinkProps) => {\n return (\n <a\n className={getClasses(baseProps)}\n href={href}\n target={target}\n rel={target && !rel ? \"noopener noreferrer\" : rel}\n >\n {baseProps.children}\n </a>\n )\n}\nCardSectionLink.displayName = \"CardSection.Link\"\n\nexport class CardSection extends PureComponent<CardSectionProps, never> {\n static Link = CardSectionLink\n render() {\n return <div className={getClasses(this.props)}>{this.props.children}</div>\n }\n}\n\nexport default Card\n"],"names":[],"mappings":";;;AAQa,MAAA,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAa,MAChE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE;AACtC,QAAA,wBAAwB,EAAE,SAAS;AACpC,KAAA,CAAC,EAED,EAAA,QAAQ,CACL,EACP;AAoBD,MAAM,UAAU,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAoB,KAAI;IAC3E,OAAO,EAAE,CAAC,sBAAsB,EAAE;QAChC,8BAA8B,EAAE,MAAM,KAAK,IAAI;QAC/C,6BAA6B,EAAE,KAAK,KAAK,IAAI;QAC7C,+BAA+B,EAAE,OAAO,KAAK,IAAI;QACjD,+BAA+B,EAAE,OAAO,KAAK,IAAI;QACjD,mCAAmC,EAAE,OAAO,KAAK,MAAM;AACxD,KAAA,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,eAAe,GAAG,CAAC,EACvB,IAAI,EACJ,MAAM,EACN,GAAG,EACH,GAAG,SAAS,EACS,KAAI;AACzB,IAAA,QACE,KACE,CAAA,aAAA,CAAA,GAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,EAChC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,IAAI,CAAC,GAAG,GAAG,qBAAqB,GAAG,GAAG,EAEhD,EAAA,SAAS,CAAC,QAAQ,CACjB,EACL;AACH,CAAC,CAAA;AACD,eAAe,CAAC,WAAW,GAAG,kBAAkB,CAAA;AAE1C,MAAO,WAAY,SAAQ,aAAsC,CAAA;IAErE,MAAM,GAAA;AACJ,QAAA,OAAO,6BAAK,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAA,EAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAO,CAAA;KAC3E;;AAHM,WAAI,CAAA,IAAA,GAAG,eAAe;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Card/index.tsx"],"sourcesContent":["import React, { PureComponent, PropsWithChildren } from \"react\"\nimport cx from \"classnames\"\n\nexport type CardProps = PropsWithChildren<{\n className?: string\n flattened?: boolean\n}>\n\nexport const Card = ({ children, className, flattened }: CardProps) => (\n <div\n className={cx(\"cobalt-Card\", className, {\n \"cobalt-Card--flattened\": flattened,\n })}\n >\n {children}\n </div>\n)\n\nexport type CardSectionProps = {\n children: React.ReactNode\n className?: string\n tabBar?: boolean\n tight?: boolean\n subdued?: boolean\n /**\n * true or \"soft\"\n * @default false\n */\n divided?: boolean | string\n}\n\nexport type CardSectionLinkProps = CardSectionProps & {\n href: React.AnchorHTMLAttributes<HTMLAnchorElement>[\"href\"]\n target?: React.AnchorHTMLAttributes<HTMLAnchorElement>[\"target\"]\n rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>[\"rel\"]\n}\n\nconst getClasses = ({\n className = \"\",\n tabBar,\n tight,\n subdued,\n divided,\n}: CardSectionProps) => {\n return cx(className, \"cobalt-Card__Section\", {\n \"cobalt-Card__Section--tabBar\": tabBar === true,\n \"cobalt-Card__Section--tight\": tight === true,\n \"cobalt-Card__Section--subdued\": subdued === true,\n \"cobalt-Card__Section--divided\": divided === true,\n \"cobalt-Card__Section--dividedSoft\": divided === \"soft\",\n })\n}\n\nconst CardSectionLink = ({\n href,\n target,\n rel,\n ...baseProps\n}: CardSectionLinkProps) => {\n return (\n <a\n className={getClasses(baseProps)}\n href={href}\n target={target}\n rel={target && !rel ? \"noopener noreferrer\" : rel}\n >\n {baseProps.children}\n </a>\n )\n}\nCardSectionLink.displayName = \"CardSection.Link\"\n\nexport class CardSection extends PureComponent<CardSectionProps, never> {\n static Link = CardSectionLink\n render() {\n return <div className={getClasses(this.props)}>{this.props.children}</div>\n }\n}\n\nCard.Section = CardSection\n\nexport default Card\n"],"names":[],"mappings":";;;AAQa,MAAA,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAa,MAChE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACE,SAAS,EA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React from 'react';
2
+ import capitalize from '../../utils/capitalize.js';
3
+ import 'lodash.throttle';
4
+ import cx from 'classnames';
5
+
6
+ const iconSource = "phoneLink";
7
+ const PhoneLinkIcon = ({ color, size = 24, contained = false, className, }) => {
8
+ const computedClassName = cx(className, `cobalt-Icon cobalt-Icon--${iconSource}`, {
9
+ [`cobalt-Icon--color${capitalize(color)}`]: color,
10
+ "cobalt-Icon--size16": size === 16,
11
+ "cobalt-Icon--size20": size === 20,
12
+ "cobalt-Icon--size32": size === 32,
13
+ "cobalt-Icon--contained": contained,
14
+ });
15
+ const wrap = (content) => (React.createElement("span", { className: computedClassName }, content));
16
+ return wrap(React.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
17
+ React.createElement("path", { d: "m20.123 7.7-1.002 1c1.803 1.8 1.803 4.6 0 6.5l1.002 1c2.503-2.3 2.503-6.1 0-8.5ZM18.02 9.8l-1.001 1c.5.7.5 1.6 0 2.3l1.001 1c1.201-1.2 1.201-3 0-4.3ZM14.015 1H4.003C2.9 1 2 1.9 2 3v18c0 1.1.901 2 2.003 2h10.012c1.101 0 2.002-.9 2.002-2V3c0-1.1-.9-2-2.002-2Zm0 19H4.003V4h10.012v16Z" })));
18
+ };
19
+
20
+ export { PhoneLinkIcon as default };
21
+ //# sourceMappingURL=PhoneLinkIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhoneLinkIcon.js","sources":["../../../../src/components/Icon/__generated__/PhoneLinkIcon.tsx"],"sourcesContent":["import React from \"react\"\nimport { IconColorsType } from \"../\"\nimport { capitalize } from \"../../utils\"\nimport cx from \"classnames\"\nexport type IconProps = {\n color?: IconColorsType\n size?: 16 | 20 | 24 | 32\n contained?: boolean\n className?: string\n}\nconst iconSource = \"phoneLink\"\n\nconst PhoneLinkIcon = ({\n color,\n size = 24,\n contained = false,\n className,\n}: IconProps) => {\n const computedClassName = cx(\n className,\n `cobalt-Icon cobalt-Icon--${iconSource}`,\n {\n [`cobalt-Icon--color${capitalize(color)}`]: color,\n \"cobalt-Icon--size16\": size === 16,\n \"cobalt-Icon--size20\": size === 20,\n \"cobalt-Icon--size32\": size === 32,\n \"cobalt-Icon--contained\": contained,\n }\n )\n\n const wrap = (content: React.ReactNode) => (\n <span className={computedClassName}>{content}</span>\n )\n\n return wrap(\n <svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m20.123 7.7-1.002 1c1.803 1.8 1.803 4.6 0 6.5l1.002 1c2.503-2.3 2.503-6.1 0-8.5ZM18.02 9.8l-1.001 1c.5.7.5 1.6 0 2.3l1.001 1c1.201-1.2 1.201-3 0-4.3ZM14.015 1H4.003C2.9 1 2 1.9 2 3v18c0 1.1.901 2 2.003 2h10.012c1.101 0 2.002-.9 2.002-2V3c0-1.1-.9-2-2.002-2Zm0 19H4.003V4h10.012v16Z\" />\n </svg>\n )\n}\n\nexport default PhoneLinkIcon\n"],"names":[],"mappings":";;;;;AAUA,MAAM,UAAU,GAAG,WAAW,CAAA;AAE9B,MAAM,aAAa,GAAG,CAAC,EACrB,KAAK,EACL,IAAI,GAAG,EAAE,EACT,SAAS,GAAG,KAAK,EACjB,SAAS,GACC,KAAI;IACd,MAAM,iBAAiB,GAAG,EAAE,CAC1B,SAAS,EACT,CAAA,yBAAA,EAA4B,UAAU,CAAA,CAAE,EACxC;QACE,CAAC,CAAA,kBAAA,EAAqB,UAAU,CAAC,KAAK,CAAC,CAAE,CAAA,GAAG,KAAK;QACjD,qBAAqB,EAAE,IAAI,KAAK,EAAE;QAClC,qBAAqB,EAAE,IAAI,KAAK,EAAE;QAClC,qBAAqB,EAAE,IAAI,KAAK,EAAE;AAClC,QAAA,wBAAwB,EAAE,SAAS;AACpC,KAAA,CACF,CAAA;AAED,IAAA,MAAM,IAAI,GAAG,CAAC,OAAwB,MACpC,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,iBAAiB,EAAA,EAAG,OAAO,CAAQ,CACrD,CAAA;IAED,OAAO,IAAI,CACT,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,EAAA;AACzD,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,CAAC,EAAC,2RAA2R,EAAG,CAAA,CAClS,CACP,CAAA;AACH;;;;"}
@@ -3,10 +3,13 @@ import cx from 'classnames';
3
3
  import { RatingIcon, defaultRatingIcon } from './RatingIcons.js';
4
4
  import RatingLabel from './RatingLabel.js';
5
5
 
6
- function RatingCompact({ className, value, icon = defaultRatingIcon, }) {
6
+ function RatingCompact({ className, value, count, icon = defaultRatingIcon, }) {
7
7
  return (React.createElement("div", { className: cx("cobalt-rating", className) },
8
8
  React.createElement(RatingIcon, { icon: icon, size: 16, status: "full" }),
9
- React.createElement(RatingLabel, null, value)));
9
+ React.createElement(RatingLabel, null,
10
+ value,
11
+ " ",
12
+ count && `(${count})`)));
10
13
  }
11
14
 
12
15
  export { RatingCompact };
@@ -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\"\n\ntype RatingCompactPropsType = Pick<\n RatingIconsPropsType,\n \"className\" | \"value\" | \"size\"\n> & {\n icon?: JSX.Element\n}\n\nexport function RatingCompact({\n className,\n value,\n icon = defaultRatingIcon,\n}: RatingCompactPropsType) {\n return (\n <div className={cx(\"cobalt-rating\", className)}>\n <RatingIcon icon={icon} size={16} status={\"full\"} />\n <RatingLabel>{value}</RatingLabel>\n </div>\n )\n}\n"],"names":[],"mappings":";;;;;AAgBM,SAAU,aAAa,CAAC,EAC5B,SAAS,EACT,KAAK,EACL,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,EAAE,EAAE,MAAM,EAAE,MAAM,EAAI,CAAA;AACpD,QAAA,KAAA,CAAA,aAAA,CAAC,WAAW,EAAE,IAAA,EAAA,KAAK,CAAe,CAC9B,EACP;AACH;;;;"}
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 RatingCompact({\n className,\n value,\n count,\n icon = defaultRatingIcon,\n}: RatingCompactPropsType) {\n return (\n <div className={cx(\"cobalt-rating\", className)}>\n <RatingIcon icon={icon} size={16} status={\"full\"} />\n <RatingLabel>\n {value} {count && `(${count})`}\n </RatingLabel>\n </div>\n )\n}\n"],"names":[],"mappings":";;;;;AAiBgB,SAAA,aAAa,CAAC,EAC5B,SAAS,EACT,KAAK,EACL,KAAK,EACL,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,EAAE,EAAE,MAAM,EAAE,MAAM,EAAI,CAAA;AACpD,QAAA,KAAA,CAAA,aAAA,CAAC,WAAW,EAAA,IAAA;YACT,KAAK;;AAAG,YAAA,KAAK,IAAI,CAAI,CAAA,EAAA,KAAK,GAAG,CAClB,CACV,EACP;AACH;;;;"}
package/icons/index.js CHANGED
@@ -189,6 +189,7 @@ export { default as payments } from './payments.js';
189
189
  export { default as pencil } from './pencil.js';
190
190
  export { default as peopleUser } from './people-user.js';
191
191
  export { default as performance } from './performance.js';
192
+ export { default as phoneLink } from './phone-link.js';
192
193
  export { default as phone } from './phone.js';
193
194
  export { default as photos } from './photos.js';
194
195
  export { default as pig } from './pig.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,4 @@
1
+ var phoneLink = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20.123 7.7l-1.002 1c1.803 1.8 1.803 4.6 0 6.5l1.002 1c2.503-2.3 2.503-6.1 0-8.5zM18.02 9.8l-1.001 1c.5.7.5 1.6 0 2.3l1.001 1c1.201-1.2 1.201-3 0-4.3zM14.015 1H4.003C2.9 1 2 1.9 2 3v18c0 1.1.901 2 2.003 2h10.012c1.101 0 2.002-.9 2.002-2V3c0-1.1-.9-2-2.002-2zm0 19H4.003V4h10.012v16z\"/></svg>";
2
+
3
+ export { phoneLink as default };
4
+ //# sourceMappingURL=phone-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-link.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m20.123 7.7-1.002 1c1.803 1.8 1.803 4.6 0 6.5l1.002 1c2.503-2.3 2.503-6.1 0-8.5ZM18.02 9.8l-1.001 1c.5.7.5 1.6 0 2.3l1.001 1c1.201-1.2 1.201-3 0-4.3ZM14.015 1H4.003C2.9 1 2 1.9 2 3v18c0 1.1.901 2 2.003 2h10.012c1.101 0 2.002-.9 2.002-2V3c0-1.1-.9-2-2.002-2Zm0 19H4.003V4h10.012v16Z"/></svg>
@@ -1,4 +1,4 @@
1
- var searchCar = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"2\"><path d=\"M15.695 18.052a9.895 9.895 0 01-5.753 1.833C4.451 19.885 0 15.434 0 9.942 0 4.451 4.451 0 9.942 0c5.492 0 9.943 4.451 9.943 9.942a9.9 9.9 0 01-1.833 5.754l5.653 5.654a1 1 0 010 1.414l-.943.943a.999.999 0 01-1.414 0l-5.653-5.655zm-.496-10.179C14.904 6.341 14.141 5 12.171 5H7.886c-1.97 0-2.733 1.341-3.028 2.873A1.072 1.072 0 104.671 10h.004c-.004.25-.004.49-.004.714v3.57c0 .403.323.716.721.716h1.416a.715.715 0 00.721-.716v-.713h5v.713c0 .403.322.716.721.716h1.415a.715.715 0 00.721-.716v-3.57c0-.224 0-.464-.004-.714h.004a1.072 1.072 0 10-.187-2.127zm-1.309.917c.017.168.03.327.04.496H6.127c.01-.169.023-.328.04-.496.175-1.699.635-2.361 1.719-2.361h4.285c1.084 0 1.544.662 1.719 2.361zm-7.076 3.531a.892.892 0 11-.001-1.785.892.892 0 01.001 1.785zm6.429 0a.892.892 0 11-.001-1.785.892.892 0 01.001 1.785z\" fill=\"#362e53\" fill-rule=\"nonzero\"/></svg>";
1
+ var searchCar = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"2\"><path d=\"M15.695 18.052a9.895 9.895 0 01-5.753 1.833C4.451 19.885 0 15.434 0 9.942 0 4.451 4.451 0 9.942 0c5.492 0 9.943 4.451 9.943 9.942a9.9 9.9 0 01-1.833 5.754l5.653 5.654a1 1 0 010 1.414l-.943.943a.999.999 0 01-1.414 0l-5.653-5.655zm-.496-10.179C14.904 6.341 14.141 5 12.171 5H7.886c-1.97 0-2.733 1.341-3.028 2.873A1.072 1.072 0 104.671 10h.004c-.004.25-.004.49-.004.714v3.57c0 .403.323.716.721.716h1.416a.715.715 0 00.721-.716v-.713h5v.713c0 .403.322.716.721.716h1.415a.715.715 0 00.721-.716v-3.57c0-.224 0-.464-.004-.714h.004a1.072 1.072 0 10-.187-2.127zm-1.309.917c.017.168.03.327.04.496H6.127c.01-.169.023-.328.04-.496.175-1.699.635-2.361 1.719-2.361h4.285c1.084 0 1.544.662 1.719 2.361zm-7.076 3.531a.892.892 0 11-.001-1.785.892.892 0 01.001 1.785zm6.429 0a.892.892 0 11-.001-1.785.892.892 0 01.001 1.785z\" fill-rule=\"nonzero\"/></svg>";
2
2
 
3
3
  export { searchCar as default };
4
4
  //# sourceMappingURL=search-car.js.map
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M15.695 18.052a9.895 9.895 0 0 1-5.753 1.833C4.451 19.885 0 15.434 0 9.942 0 4.451 4.451 0 9.942 0c5.492 0 9.943 4.451 9.943 9.942a9.9 9.9 0 0 1-1.833 5.754l5.653 5.654a1 1 0 0 1 0 1.414l-.943.943a.999.999 0 0 1-1.414 0l-5.653-5.655Zm-.496-10.179C14.904 6.341 14.141 5 12.171 5H7.886c-1.97 0-2.733 1.341-3.028 2.873A1.072 1.072 0 1 0 4.671 10h.004c-.004.25-.004.49-.004.714v3.57c0 .403.323.716.721.716h1.416a.715.715 0 0 0 .721-.716v-.713h5v.713c0 .403.322.716.721.716h1.415a.715.715 0 0 0 .721-.716v-3.57c0-.224 0-.464-.004-.714h.004a1.072 1.072 0 1 0-.187-2.127Zm-1.309.917c.017.168.03.327.04.496H6.127c.01-.169.023-.328.04-.496.175-1.699.635-2.361 1.719-2.361h4.285c1.084 0 1.544.662 1.719 2.361Zm-7.076 3.531a.892.892 0 1 1-.001-1.785.892.892 0 0 1 .001 1.785Zm6.429 0a.892.892 0 1 1-.001-1.785.892.892 0 0 1 .001 1.785Z" style="fill:#362e53;fill-rule:nonzero"/></svg>
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M15.695 18.052a9.895 9.895 0 0 1-5.753 1.833C4.451 19.885 0 15.434 0 9.942 0 4.451 4.451 0 9.942 0c5.492 0 9.943 4.451 9.943 9.942a9.9 9.9 0 0 1-1.833 5.754l5.653 5.654a1 1 0 0 1 0 1.414l-.943.943a.999.999 0 0 1-1.414 0l-5.653-5.655Zm-.496-10.179C14.904 6.341 14.141 5 12.171 5H7.886c-1.97 0-2.733 1.341-3.028 2.873A1.072 1.072 0 1 0 4.671 10h.004c-.004.25-.004.49-.004.714v3.57c0 .403.323.716.721.716h1.416a.715.715 0 0 0 .721-.716v-.713h5v.713c0 .403.322.716.721.716h1.415a.715.715 0 0 0 .721-.716v-3.57c0-.224 0-.464-.004-.714h.004a1.072 1.072 0 1 0-.187-2.127Zm-1.309.917c.017.168.03.327.04.496H6.127c.01-.169.023-.328.04-.496.175-1.699.635-2.361 1.719-2.361h4.285c1.084 0 1.544.662 1.719 2.361Zm-7.076 3.531a.892.892 0 1 1-.001-1.785.892.892 0 0 1 .001 1.785Zm6.429 0a.892.892 0 1 1-.001-1.785.892.892 0 0 1 .001 1.785Z" style="fill-rule:nonzero"/></svg>
package/index.js CHANGED
@@ -234,6 +234,7 @@ export { default as PencilIcon } from './components/Icon/__generated__/PencilIco
234
234
  export { default as PeopleUserIcon } from './components/Icon/__generated__/PeopleUserIcon.js';
235
235
  export { default as PerformanceIcon } from './components/Icon/__generated__/PerformanceIcon.js';
236
236
  export { default as PhoneIcon } from './components/Icon/__generated__/PhoneIcon.js';
237
+ export { default as PhoneLinkIcon } from './components/Icon/__generated__/PhoneLinkIcon.js';
237
238
  export { default as PhotosIcon } from './components/Icon/__generated__/PhotosIcon.js';
238
239
  export { default as PigIcon } from './components/Icon/__generated__/PigIcon.js';
239
240
  export { default as PinIcon } from './components/Icon/__generated__/PinIcon.js';
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drivy/cobalt",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Opinionated design system for Drivy's projects.",
5
5
  "main": "src/index.js",
6
6
  "types": "types/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "url": "https://github.com/TimPetricola"
17
17
  },
18
18
  "dependencies": {
19
- "@juggle/resize-observer": "3.3.1",
19
+ "@juggle/resize-observer": "3.4.0",
20
20
  "@reach/accordion": "0.16.1",
21
21
  "@reach/alert": "0.16.0",
22
22
  "@reach/combobox": "0.16.3",
@@ -28,11 +28,11 @@
28
28
  "@react-spring/web": "9.3.0",
29
29
  "@tippyjs/react": "4.2.6",
30
30
  "classnames": "2.3.1",
31
- "date-fns": "2.28.0",
31
+ "date-fns": "2.29.2",
32
32
  "lodash.throttle": "4.1.1",
33
33
  "media-typer": "1.1.0",
34
34
  "nanoid": "3.3.4",
35
- "postcss": "8.4.14",
35
+ "postcss": "8.4.16",
36
36
  "tailwindcss": "2.2.19",
37
37
  "tippy.js": "6.3.7"
38
38
  },
@@ -41,60 +41,60 @@
41
41
  "react-dom": "^17.0.2"
42
42
  },
43
43
  "devDependencies": {
44
- "@getaround-eu/babel-preset-app": "0.5.1",
45
- "@getaround-eu/eslint-config": "1.7.1",
44
+ "@getaround-eu/babel-preset-app": "0.5.2",
45
+ "@getaround-eu/eslint-config": "1.7.2",
46
46
  "@getaround-eu/prettier-config": "1.2.0",
47
- "@getaround-eu/stylelint-config": "1.2.1",
47
+ "@getaround-eu/stylelint-config": "1.2.2",
48
48
  "@getaround-eu/ts-config": "2.1.0",
49
49
  "@percy/storybook": "3.3.1",
50
50
  "@rollup/plugin-json": "4.1.0",
51
- "@rushstack/eslint-patch": "1.1.3",
52
- "@storybook/addon-essentials": "6.5.7",
53
- "@storybook/addons": "6.5.7",
54
- "@storybook/builder-webpack5": "6.5.7",
55
- "@storybook/manager-webpack5": "6.5.7",
56
- "@storybook/react": "6.5.7",
57
- "@svgr/cli": "6.2.1",
58
- "@testing-library/jest-dom": "5.16.4",
51
+ "@rushstack/eslint-patch": "1.1.4",
52
+ "@storybook/addon-essentials": "6.5.10",
53
+ "@storybook/addons": "6.5.10",
54
+ "@storybook/builder-webpack5": "6.5.10",
55
+ "@storybook/manager-webpack5": "6.5.10",
56
+ "@storybook/react": "6.5.10",
57
+ "@svgr/cli": "6.3.1",
58
+ "@testing-library/jest-dom": "5.16.5",
59
59
  "@testing-library/react": "12.1.5",
60
- "@testing-library/react-hooks": "8.0.0",
60
+ "@testing-library/react-hooks": "8.0.1",
61
61
  "@types/classnames": "2.3.0",
62
62
  "@types/jest": "27.5.2",
63
63
  "@types/lodash.throttle": "4.1.7",
64
64
  "@types/media-typer": "1.1.1",
65
- "@types/react": "17.0.45",
65
+ "@types/react": "17.0.48",
66
66
  "@whitespace/storybook-addon-html": "^5.0.0",
67
- "autoprefixer": "10.4.7",
68
- "core-js": "3.22.8",
67
+ "autoprefixer": "10.4.8",
68
+ "core-js": "3.24.1",
69
69
  "css-loader": "6.7.1",
70
- "eslint": "8.17.0",
70
+ "eslint": "8.22.0",
71
71
  "jest": "27.5.1",
72
72
  "nested-object-access": "^0.2.5",
73
- "np": "7.6.1",
73
+ "np": "7.6.2",
74
74
  "postcss-flexbugs-fixes": "5.0.2",
75
75
  "postcss-loader": "6.2.1",
76
- "prettier": "2.6.2",
76
+ "prettier": "2.7.1",
77
77
  "raw-loader": "4.0.2",
78
78
  "react": "17.0.2",
79
79
  "react-dom": "17.0.2",
80
80
  "react-test-renderer": "17.0.2",
81
81
  "regenerator-runtime": "0.13.9",
82
- "rollup": "2.75.6",
82
+ "rollup": "2.78.1",
83
83
  "rollup-plugin-copy": "3.4.0",
84
84
  "rollup-plugin-postcss": "4.0.2",
85
85
  "rollup-plugin-svgo": "1.1.0",
86
- "rollup-plugin-typescript2": "0.32.1",
87
- "sass": "1.52.2",
86
+ "rollup-plugin-typescript2": "0.33.0",
87
+ "sass": "1.54.5",
88
88
  "sass-loader": "12.6.0",
89
89
  "sharp": "0.30.7",
90
90
  "sharp-cli": "2.1.1",
91
91
  "style-loader": "3.3.1",
92
- "stylelint": "14.8.5",
92
+ "stylelint": "14.11.0",
93
93
  "svg2vectordrawable": "2.9.1",
94
94
  "svgo": "2.8.0",
95
95
  "ts-jest": "27.1.5",
96
- "ts-node": "10.7.0",
97
- "typescript": "4.7.3"
96
+ "ts-node": "10.9.1",
97
+ "typescript": "4.7.4"
98
98
  },
99
99
  "scripts": {
100
100
  "build": "./scripts/build.sh",
@@ -138,6 +138,6 @@
138
138
  "access": "public"
139
139
  },
140
140
  "resolutions": {
141
- "@types/react": "17.0.45"
141
+ "@types/react": "17.0.48"
142
142
  }
143
143
  }
@@ -45,4 +45,13 @@
45
45
  @include semantic-color(error, stroke, border-color);
46
46
  }
47
47
  }
48
+
49
+ &--selected:hover,
50
+ &--selected:focus,
51
+ &--selected:active,
52
+ &--selected {
53
+ @include semantic-color(selected, buttonBackground, background-color);
54
+ @include semantic-color(selected, buttonLabel, color);
55
+ @include semantic-color(accentAlt, stroke, border-color);
56
+ }
48
57
  }
@@ -40,7 +40,7 @@ $theme-colors-map: (
40
40
  successAlt: var(--c-l-graphite)
41
41
  ),
42
42
  buttonBackground: (
43
- accentAlt: var(--c-l-indigo),
43
+ selected: var(--c-l-indigo),
44
44
  destructiveInteractive: (
45
45
  DEFAULT: var(--c-l-red),
46
46
  hover: var(--c-l-red),
@@ -70,7 +70,7 @@ $theme-colors-map: (
70
70
  )
71
71
  ),
72
72
  buttonIcon: (
73
- accentAlt: var(--c-l-purple),
73
+ selected: var(--c-l-white),
74
74
  destructiveInteractive: (
75
75
  DEFAULT: var(--c-l-red),
76
76
  hover: var(--c-l-red),
@@ -100,7 +100,7 @@ $theme-colors-map: (
100
100
  )
101
101
  ),
102
102
  buttonLabel: (
103
- accentAlt: var(--c-l-purple),
103
+ selected: var(--c-l-white),
104
104
  destructiveInteractive: (
105
105
  DEFAULT: var(--c-l-white),
106
106
  hover: var(--c-l-white),
@@ -27,7 +27,7 @@
27
27
  --c-background-secondaryInteractive--hover: var(--c-l-grey-lighter);
28
28
  --c-background-success: var(--c-l-green);
29
29
  --c-background-successAlt: var(--c-l-graphite);
30
- --c-buttonBackground-accentAlt: var(--c-l-indigo);
30
+ --c-buttonBackground-selected: var(--c-l-indigo);
31
31
  --c-buttonBackground-destructiveInteractive: var(--c-l-red);
32
32
  --c-buttonBackground-destructiveInteractive--hover: var(--c-l-red);
33
33
  --c-buttonBackground-destructiveInteractive--press: var(--c-l-red);
@@ -45,7 +45,7 @@
45
45
  --c-buttonBackground-tertiaryInteractive: var(--c-l-white);
46
46
  --c-buttonBackground-tertiaryInteractive--hover: var(--c-l-white);
47
47
  --c-buttonBackground-tertiaryInteractive--press: var(--c-l-white);
48
- --c-buttonIcon-accentAlt: var(--c-l-purple);
48
+ --c-buttonIcon-selected: var(--c-l-white);
49
49
  --c-buttonIcon-destructiveInteractive: var(--c-l-red);
50
50
  --c-buttonIcon-destructiveInteractive--hover: var(--c-l-red);
51
51
  --c-buttonIcon-destructiveInteractive--press: var(--c-l-red);
@@ -63,7 +63,7 @@
63
63
  --c-buttonIcon-tertiaryInteractive: var(--c-l-blue);
64
64
  --c-buttonIcon-tertiaryInteractive--hover: var(--c-l-blue);
65
65
  --c-buttonIcon-tertiaryInteractive--press: var(--c-l-blue);
66
- --c-buttonLabel-accentAlt: var(--c-l-purple);
66
+ --c-buttonLabel-selected: var(--c-l-white);
67
67
  --c-buttonLabel-destructiveInteractive: var(--c-l-white);
68
68
  --c-buttonLabel-destructiveInteractive--hover: var(--c-l-white);
69
69
  --c-buttonLabel-destructiveInteractive--press: var(--c-l-white);
package/tokens/icons.js CHANGED
@@ -190,6 +190,7 @@ const icons = {
190
190
  pencil: "pencil.svg",
191
191
  peopleUser: "people-user.svg",
192
192
  performance: "performance.svg",
193
+ phoneLink: "phone-link.svg",
193
194
  phone: "phone.svg",
194
195
  photos: "photos.svg",
195
196
  pig: "pig.svg",
@@ -1 +1 @@
1
- {"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/tokens/theme.js CHANGED
@@ -35,7 +35,7 @@ const background = {
35
35
  successAlt: "graphite/green.100/green.1000"
36
36
  };
37
37
  const buttonBackground = {
38
- accentAlt: "indigo/purple.100/purpleDeep.900",
38
+ selected: "indigo/purple.100/purpleDeep.900",
39
39
  destructiveInteractive: {
40
40
  DEFAULT: "red/red.100/red.900",
41
41
  hover: "red/red.120/red.900",
@@ -65,7 +65,7 @@ const buttonBackground = {
65
65
  }
66
66
  };
67
67
  const buttonIcon = {
68
- accentAlt: "purple/purple.500/grey.100",
68
+ selected: "white/purple.500/grey.100",
69
69
  destructiveInteractive: {
70
70
  DEFAULT: "red/red.500/red.200",
71
71
  hover: "red/red.500/red.200",
@@ -95,7 +95,7 @@ const buttonIcon = {
95
95
  }
96
96
  };
97
97
  const buttonLabel = {
98
- accentAlt: "purple/purple.500/grey.100",
98
+ selected: "white/purple.500/grey.100",
99
99
  destructiveInteractive: {
100
100
  DEFAULT: "white/red.500/red.200",
101
101
  hover: "white/red.500/red.200",