@drivy/cobalt 2.3.0 → 2.4.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Buttons/SmallButton/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 SmallCommonPropsType = ButtonTemplatePropsType<{\n variant?:\n | \"primary\"\n | \"warning\"\n | \"secondary\"\n | \"tertiary\"\n | \"business\"\n | \"success\"\n | \"neutral\"\n destructive?: boolean\n}>\n\nexport type SmallButtonPropsType = SmallCommonPropsType & ButtonProps\nexport type SmallLinkPropsType = SmallCommonPropsType & LinkProps\n\nconst getComputedClassName = ({\n className,\n variant,\n destructive,\n}: SmallCommonPropsType) =>\n cx(className, \"cob-Button__small\", {\n \"cob-Button__small--primary\": variant === \"primary\",\n \"cob-Button__small--destructive\": destructive,\n \"cob-Button__small--warning\": variant === \"warning\",\n \"cob-Button__small--secondary\": variant === \"secondary\",\n \"cob-Button__small--tertiary\": variant === \"tertiary\",\n \"cob-Button__small--business\": variant === \"business\",\n \"cob-Button__small--success\": variant === \"success\",\n \"cob-Button__small--neutral\": variant === \"neutral\",\n })\n\nconst _SmallButton = forwardRef<HTMLButtonElement, SmallButtonPropsType>(\n (props: SmallButtonPropsType, ref) => {\n const {\n children,\n variant,\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 variant,\n destructive,\n })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button>\n )\n }\n)\n_SmallButton.displayName = \"SmallButton\"\n\nconst SmallLink = forwardRef<HTMLAnchorElement, SmallLinkPropsType>(\n (props: SmallLinkPropsType, ref) => {\n const {\n children,\n variant,\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 variant,\n destructive,\n })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button.Link>\n )\n }\n)\nSmallLink.displayName = \"SmallLink\"\n\nconst SmallButton = Object.assign(_SmallButton, { Link: SmallLink })\n\nexport default SmallButton\n"],"names":[],"mappings":";;;;;AAyBA,MAAM,oBAAoB,GAAG,CAAC,EAC5B,SAAS,EACT,OAAO,EACP,WAAW,GACU,KACrB,EAAE,CAAC,SAAS,EAAE,mBAAmB,EAAE;IACjC,4BAA4B,EAAE,OAAO,KAAK,SAAS;AACnD,IAAA,gCAAgC,EAAE,WAAW;IAC7C,4BAA4B,EAAE,OAAO,KAAK,SAAS;IACnD,8BAA8B,EAAE,OAAO,KAAK,WAAW;IACvD,6BAA6B,EAAE,OAAO,KAAK,UAAU;IACrD,6BAA6B,EAAE,OAAO,KAAK,UAAU;IACrD,4BAA4B,EAAE,OAAO,KAAK,SAAS;IACnD,4BAA4B,EAAE,OAAO,KAAK,SAAS;AACpD,CAAA,CAAC,CAAA;AAEJ,MAAM,YAAY,GAAG,UAAU,CAC7B,CAAC,KAA2B,EAAE,GAAG,KAAI;AACnC,IAAA,MAAM,EACJ,QAAQ,EACR,OAAO,EACP,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,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T,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,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,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AAEnC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Buttons/SmallButton/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 SmallCommonPropsType = ButtonTemplatePropsType<{\n variant?:\n | \"primary\"\n | \"warning\"\n | \"secondary\"\n | \"tertiary\"\n | \"business\"\n | \"success\"\n | \"neutral\"\n destructive?: boolean\n}>\n\nexport type SmallButtonPropsType = SmallCommonPropsType & ButtonProps\nexport type SmallLinkPropsType = SmallCommonPropsType & LinkProps\n\nexport type SmallButtonElement = React.ReactElement<SmallButtonPropsType>\n\nconst getComputedClassName = ({\n className,\n variant,\n destructive,\n}: SmallCommonPropsType) =>\n cx(className, \"cob-Button__small\", {\n \"cob-Button__small--primary\": variant === \"primary\",\n \"cob-Button__small--destructive\": destructive,\n \"cob-Button__small--warning\": variant === \"warning\",\n \"cob-Button__small--secondary\": variant === \"secondary\",\n \"cob-Button__small--tertiary\": variant === \"tertiary\",\n \"cob-Button__small--business\": variant === \"business\",\n \"cob-Button__small--success\": variant === \"success\",\n \"cob-Button__small--neutral\": variant === \"neutral\",\n })\n\nconst _SmallButton = forwardRef<HTMLButtonElement, SmallButtonPropsType>(\n (props: SmallButtonPropsType, ref) => {\n const {\n children,\n variant,\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 variant,\n destructive,\n })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button>\n )\n }\n)\n_SmallButton.displayName = \"SmallButton\"\n\nconst SmallLink = forwardRef<HTMLAnchorElement, SmallLinkPropsType>(\n (props: SmallLinkPropsType, ref) => {\n const {\n children,\n variant,\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 variant,\n destructive,\n })}\n ref={ref}\n loading={loading}\n disabled={isDisabled}\n >\n {content}\n </Button.Link>\n )\n }\n)\nSmallLink.displayName = \"SmallLink\"\n\nconst SmallButton = Object.assign(_SmallButton, { Link: SmallLink })\n\nexport default SmallButton\n"],"names":[],"mappings":";;;;;AA2BA,MAAM,oBAAoB,GAAG,CAAC,EAC5B,SAAS,EACT,OAAO,EACP,WAAW,GACU,KACrB,EAAE,CAAC,SAAS,EAAE,mBAAmB,EAAE;IACjC,4BAA4B,EAAE,OAAO,KAAK,SAAS;AACnD,IAAA,gCAAgC,EAAE,WAAW;IAC7C,4BAA4B,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,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,OAAO,EACP,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,SAAS,EACT,GAAG,aAAa,EACjB,GAAG,KAAK,CAAA;AACT,IAAA,MAAM,OAAO,GAAG,gBAAgB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAA;AAClE,IAAA,MAAM,UAAU,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,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,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AAEnC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;;;;"}
@@ -1,17 +1,25 @@
1
1
  import React from 'react';
2
2
  import cx from 'classnames';
3
- import '../Icon/index.js';
4
- import CloseIcon from '../Icon/__generated__/CloseIcon.js';
5
3
 
6
- const Callout = ({ title, children, status = "info", close, }) => (React.createElement("div", { className: cx("cobalt-Callout", {
7
- "cobalt-Callout--info": status === "info",
8
- "cobalt-Callout--error": status === "error",
9
- "cobalt-Callout--success": status === "success",
10
- }) },
11
- title && React.createElement("div", { className: "cobalt-Callout__Title" }, title),
12
- React.createElement("div", null, children),
13
- close && (React.createElement("button", { className: "cobalt-Callout__Close", onClick: close, type: "button" },
14
- React.createElement(CloseIcon, { color: "onSurfaceVariant", size: 16, contained: true })))));
4
+ const Callout = ({ title, children, cta, variant = "neutral", illustrationUrl, className, }) => {
5
+ // force CTA to match Callout variant
6
+ const enforcedCTA = cta && React.isValidElement(cta)
7
+ ? React.cloneElement(cta, {
8
+ variant: variant === "error" ? "primary" : variant,
9
+ destructive: variant === "error",
10
+ })
11
+ : cta;
12
+ return (React.createElement("div", { className: cx("cobalt-callout", {
13
+ "cobalt-callout--warning": variant === "warning",
14
+ "cobalt-callout--neutral": variant === "neutral",
15
+ "cobalt-callout--error": variant === "error",
16
+ }, className) },
17
+ React.createElement("div", { className: "cobalt-callout__content" },
18
+ title && React.createElement("div", { className: "cobalt-callout__title" }, title),
19
+ React.createElement("div", { className: "cobalt-callout__body" }, children),
20
+ enforcedCTA),
21
+ illustrationUrl && (React.createElement("img", { className: "cobalt-callout__illustration", src: illustrationUrl }))));
22
+ };
15
23
 
16
24
  export { Callout, Callout as default };
17
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Callout/index.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\nimport { CloseIcon } from \"../Icon\"\n\nexport interface CalloutProps {\n children: React.ReactNode\n title?: string\n status: \"info\" | \"error\" | \"success\"\n close?: () => void\n}\n\nexport const Callout = ({\n title,\n children,\n status = \"info\",\n close,\n}: CalloutProps) => (\n <div\n className={cx(\"cobalt-Callout\", {\n \"cobalt-Callout--info\": status === \"info\",\n \"cobalt-Callout--error\": status === \"error\",\n \"cobalt-Callout--success\": status === \"success\",\n })}\n >\n {title && <div className=\"cobalt-Callout__Title\">{title}</div>}\n <div>{children}</div>\n {close && (\n <button className=\"cobalt-Callout__Close\" onClick={close} type=\"button\">\n <CloseIcon color=\"onSurfaceVariant\" size={16} contained />\n </button>\n )}\n </div>\n)\n\nexport default Callout\n"],"names":[],"mappings":";;;;;AAWa,MAAA,OAAO,GAAG,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,MAAM,GAAG,MAAM,EACf,KAAK,GACQ,MACb,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE;QAC9B,sBAAsB,EAAE,MAAM,KAAK,MAAM;QACzC,uBAAuB,EAAE,MAAM,KAAK,OAAO;QAC3C,yBAAyB,EAAE,MAAM,KAAK,SAAS;KAChD,CAAC,EAAA;AAED,IAAA,KAAK,IAAI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,uBAAuB,EAAA,EAAE,KAAK,CAAO;AAC9D,IAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAM,QAAQ,CAAO;AACpB,IAAA,KAAK,KACJ,KAAQ,CAAA,aAAA,CAAA,QAAA,EAAA,EAAA,SAAS,EAAC,uBAAuB,EAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAC,QAAQ,EAAA;AACrE,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAC,EAAA,KAAK,EAAC,kBAAkB,EAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAG,IAAA,EAAA,CAAA,CACnD,CACV,CACG;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Callout/index.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\nimport { SmallButtonElement } from \"../Buttons/SmallButton\"\n\nexport type CalloutPropsType = React.PropsWithChildren<{\n title?: string\n cta?: React.ReactNode\n illustrationUrl?: string\n variant: \"warning\" | \"neutral\" | \"error\"\n className?: string\n}>\n\nexport const Callout = ({\n title,\n children,\n cta,\n variant = \"neutral\",\n illustrationUrl,\n className,\n}: CalloutPropsType) => {\n // force CTA to match Callout variant\n const enforcedCTA =\n cta && React.isValidElement(cta)\n ? React.cloneElement(cta as SmallButtonElement, {\n variant: variant === \"error\" ? \"primary\" : variant,\n destructive: variant === \"error\",\n })\n : cta\n\n return (\n <div\n className={cx(\n \"cobalt-callout\",\n {\n \"cobalt-callout--warning\": variant === \"warning\",\n \"cobalt-callout--neutral\": variant === \"neutral\",\n \"cobalt-callout--error\": variant === \"error\",\n },\n className\n )}\n >\n <div className=\"cobalt-callout__content\">\n {title && <div className=\"cobalt-callout__title\">{title}</div>}\n <div className=\"cobalt-callout__body\">{children}</div>\n {enforcedCTA}\n </div>\n {illustrationUrl && (\n <img className=\"cobalt-callout__illustration\" src={illustrationUrl} />\n )}\n </div>\n )\n}\n\nexport default Callout\n"],"names":[],"mappings":";;;MAYa,OAAO,GAAG,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,GAAG,EACH,OAAO,GAAG,SAAS,EACnB,eAAe,EACf,SAAS,GACQ,KAAI;;IAErB,MAAM,WAAW,GACf,GAAG,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC;AAC9B,UAAE,KAAK,CAAC,YAAY,CAAC,GAAyB,EAAE;YAC5C,OAAO,EAAE,OAAO,KAAK,OAAO,GAAG,SAAS,GAAG,OAAO;YAClD,WAAW,EAAE,OAAO,KAAK,OAAO;SACjC,CAAC;UACF,GAAG,CAAA;AAET,IAAA,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CACX,gBAAgB,EAChB;YACE,yBAAyB,EAAE,OAAO,KAAK,SAAS;YAChD,yBAAyB,EAAE,OAAO,KAAK,SAAS;YAChD,uBAAuB,EAAE,OAAO,KAAK,OAAO;AAC7C,SAAA,EACD,SAAS,CACV,EAAA;QAED,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,yBAAyB,EAAA;AACrC,YAAA,KAAK,IAAI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,uBAAuB,EAAA,EAAE,KAAK,CAAO;AAC9D,YAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,sBAAsB,EAAA,EAAE,QAAQ,CAAO;AACrD,YAAA,WAAW,CACR;AACL,QAAA,eAAe,KACd,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,8BAA8B,EAAC,GAAG,EAAE,eAAe,EAAA,CAAI,CACvE,CACG,EACP;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drivy/cobalt",
3
- "version": "2.3.0",
3
+ "version": "2.4.1",
4
4
  "description": "Opinionated design system for Drivy's projects.",
5
5
  "main": "src/index.js",
6
6
  "types": "types/src/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "*.scss"
10
10
  ],
11
11
  "engines": {
12
- "node": ">=22.14.0"
12
+ "node": ">=22.21.0"
13
13
  },
14
14
  "module": "src/index.js",
15
15
  "license": "MIT",
@@ -19,17 +19,17 @@
19
19
  "url": "https://github.com/TimPetricola"
20
20
  },
21
21
  "dependencies": {
22
- "@ark-ui/react": "5.14.1",
22
+ "@ark-ui/react": "5.26.2",
23
23
  "@juggle/resize-observer": "3.4.0",
24
- "@lottiefiles/react-lottie-player": "3.5.4",
24
+ "@lottiefiles/react-lottie-player": "3.6.0",
25
25
  "@tippyjs/react": "4.2.6",
26
26
  "classnames": "2.5.1",
27
27
  "date-fns": "2.30.0",
28
28
  "lodash.throttle": "4.1.1",
29
29
  "media-typer": "1.1.0",
30
- "nanoid": "5.1.5",
30
+ "nanoid": "5.1.6",
31
31
  "postcss": "8.5.6",
32
- "tailwindcss": "3.4.17",
32
+ "tailwindcss": "3.4.18",
33
33
  "tippy.js": "6.3.7"
34
34
  },
35
35
  "peerDependencies": {
@@ -51,7 +51,7 @@
51
51
  "@storybook/react": "7.6.20",
52
52
  "@storybook/react-webpack5": "7.6.20",
53
53
  "@svgr/cli": "7.0.0",
54
- "@testing-library/jest-dom": "6.6.4",
54
+ "@testing-library/jest-dom": "6.9.1",
55
55
  "@testing-library/react": "16.3.0",
56
56
  "@testing-library/react-hooks": "8.0.1",
57
57
  "@types/fs-extra": "11.0.4",
@@ -59,27 +59,27 @@
59
59
  "@types/lodash.throttle": "4.1.9",
60
60
  "@types/media-typer": "1.1.3",
61
61
  "@types/node": "22.14.1",
62
- "@types/react": "18.3.23",
62
+ "@types/react": "18.3.24",
63
63
  "@types/react-dom": "18.3.7",
64
64
  "autoprefixer": "10.4.21",
65
- "core-js": "3.45.0",
65
+ "core-js": "3.46.0",
66
66
  "css-loader": "7.1.2",
67
67
  "eslint": "8.57.1",
68
68
  "eslint-plugin-storybook": "^0.12.0",
69
69
  "file-loader": "6.2.0",
70
- "fs-extra": "11.3.0",
70
+ "fs-extra": "11.3.2",
71
71
  "html-entities": "2.6.0",
72
72
  "jest": "29.7.0",
73
73
  "jest-environment-jsdom": "29.7.0",
74
74
  "nested-object-access": "^0.2.5",
75
75
  "np": "10.2.0",
76
76
  "postcss-flexbugs-fixes": "5.0.2",
77
- "postcss-loader": "8.1.1",
77
+ "postcss-loader": "8.2.0",
78
78
  "prettier": "3.6.2",
79
79
  "raw-loader": "4.0.2",
80
80
  "react": "18.3.1",
81
81
  "react-dom": "18.3.1",
82
- "react-syntax-highlighter": "15.6.1",
82
+ "react-syntax-highlighter": "15.6.6",
83
83
  "react-test-renderer": "18.3.1",
84
84
  "react-textarea-autosize": "8.5.9",
85
85
  "regenerator-runtime": "0.14.1",
@@ -88,7 +88,7 @@
88
88
  "rollup-plugin-copy": "3.5.0",
89
89
  "rollup-plugin-svgo": "2.0.0",
90
90
  "rollup-plugin-typescript2": "0.36.0",
91
- "sass": "1.89.2",
91
+ "sass": "1.93.2",
92
92
  "sass-loader": "13.3.3",
93
93
  "sharp-cli": "5.2.0",
94
94
  "storybook": "7.6.20",
@@ -96,8 +96,8 @@
96
96
  "stylelint": "15.11.0",
97
97
  "svg2vectordrawable": "2.9.1",
98
98
  "svgo": "3.3.2",
99
- "ts-jest": "29.4.0",
100
- "tsx": "4.20.3",
99
+ "ts-jest": "29.4.5",
100
+ "tsx": "4.20.6",
101
101
  "typescript": "5.4.5"
102
102
  },
103
103
  "keywords": [
@@ -0,0 +1,48 @@
1
+ .cobalt-banner {
2
+ @apply c-text-body-md c-bg-surfaceContainerVariant c-rounded-xl c-p-sm c-gap-sm;
3
+
4
+ position: relative;
5
+
6
+ display: flex;
7
+
8
+ &--secondary {
9
+ @apply c-bg-secondaryContainer c-text-onSecondaryContainer;
10
+ }
11
+
12
+ &--tertiary {
13
+ @apply c-bg-tertiaryContainer c-text-onTertiaryContainer;
14
+ }
15
+
16
+ &--business {
17
+ @apply c-bg-business c-text-onBusiness;
18
+ }
19
+
20
+ &__title {
21
+ @apply c-text-title-sm c-mb-2xs;
22
+ }
23
+
24
+ &__body {
25
+ flex: 1 1;
26
+ }
27
+
28
+ &__content {
29
+ flex: 1 1;
30
+
31
+ display: flex;
32
+ flex-direction: column;
33
+
34
+ align-items: flex-start;
35
+ }
36
+
37
+ &__illustration {
38
+ @apply c-rounded-xl;
39
+
40
+ width: 100px;
41
+
42
+ object-fit: cover;
43
+ }
44
+
45
+ .cob-Button {
46
+ @apply c-mt-xs;
47
+ }
48
+ }
@@ -1,5 +1,5 @@
1
1
  .cob-Button__small {
2
- @apply c-bg-surfaceContainer c-text-secondary c-border-outlineVariant;
2
+ @apply c-bg-surfaceContainer c-text-primary c-border-outlineVariant;
3
3
  @include cob-button-sizing(
4
4
  $height: 32px,
5
5
  $line-height: 20px,
@@ -27,17 +27,17 @@
27
27
  @apply c-bg-primary c-text-onPrimary;
28
28
 
29
29
  &.cob-Button__small--destructive {
30
- @apply c-bg-errorContainer c-text-onErrorContainer c-border-transparent;
30
+ @apply c-bg-error c-text-onError c-border-transparent;
31
31
  }
32
32
  }
33
33
 
34
- &--destructive {
34
+ &--destructive:not(.cob-Button__small--primary) {
35
35
  @apply c-text-error;
36
36
 
37
37
  &:hover,
38
38
  &:focus,
39
39
  &:active {
40
- @apply c-text-error c-border-error;
40
+ @apply c-border-error;
41
41
  }
42
42
  }
43
43
 
@@ -0,0 +1,61 @@
1
+ .cobalt- {
2
+ &Callout {
3
+ @apply c-text-body-md c-text-onSurface c-bg-surfaceBright c-rounded c-shadow c-p-sm c-mb-md;
4
+
5
+ position: relative;
6
+
7
+ &:before {
8
+ position: absolute;
9
+ left: 0;
10
+ top: 0;
11
+ bottom: 0;
12
+
13
+ display: block;
14
+ width: 3px;
15
+
16
+ border-top-left-radius: inherit;
17
+ border-bottom-left-radius: inherit;
18
+
19
+ content: "";
20
+ }
21
+ }
22
+
23
+ &Callout--info {
24
+ &:before {
25
+ @apply c-bg-warning;
26
+ }
27
+ }
28
+
29
+ &Callout--success {
30
+ &:before {
31
+ @apply c-bg-success;
32
+ }
33
+ }
34
+
35
+ &Callout--error {
36
+ &:before {
37
+ @apply c-bg-error;
38
+ }
39
+ }
40
+
41
+ &Callout__Title {
42
+ @apply c-text-title-sm c-mb-xs;
43
+ }
44
+
45
+ &Callout__Close {
46
+ position: absolute;
47
+
48
+ top: -14px;
49
+ right: -20px;
50
+
51
+ border: 0;
52
+
53
+ background-color: transparent;
54
+
55
+ cursor: pointer;
56
+
57
+ .cobalt-Icon {
58
+ @apply c-state-interactive c-transition-interactive;
59
+ }
60
+ }
61
+ }
@@ -1,61 +1,50 @@
1
- .cobalt- {
2
- &Callout {
3
- @apply c-text-body-md c-text-onSurface c-bg-surfaceBright c-rounded c-shadow c-p-sm c-mb-md;
1
+ .cobalt-callout {
2
+ @apply c-text-body-md c-bg-surfaceContainerVariant c-rounded-xl c-p-sm c-gap-sm;
4
3
 
5
- position: relative;
4
+ position: relative;
6
5
 
7
- &:before {
8
- position: absolute;
9
- left: 0;
10
- top: 0;
11
- bottom: 0;
6
+ display: flex;
12
7
 
13
- display: block;
14
- width: 3px;
15
-
16
- border-top-left-radius: inherit;
17
- border-bottom-left-radius: inherit;
18
-
19
- content: "";
20
- }
8
+ &--warning {
9
+ @apply c-bg-warningContainer c-text-onWarningContainer;
21
10
  }
22
11
 
23
- &Callout--info {
24
- &:before {
25
- @apply c-bg-warning;
26
- }
12
+ &--neutral {
13
+ @apply c-bg-surfaceContainerVariant;
27
14
  }
28
15
 
29
- &Callout--success {
30
- &:before {
31
- @apply c-bg-success;
32
- }
16
+ &--error {
17
+ @apply c-bg-errorContainer c-text-onErrorContainer;
33
18
  }
34
19
 
35
- &Callout--error {
36
- &:before {
37
- @apply c-bg-error;
38
- }
20
+ &__title {
21
+ @apply c-text-title-sm c-mb-2xs;
39
22
  }
40
23
 
41
- &Callout__Title {
42
- @apply c-text-title-sm c-mb-xs;
24
+ &__body {
25
+ flex: 1 1;
43
26
  }
44
27
 
45
- &Callout__Close {
46
- position: absolute;
28
+ &__content {
29
+ flex: 1 1;
47
30
 
48
- top: -14px;
49
- right: -20px;
31
+ display: flex;
32
+ flex-direction: column;
50
33
 
51
- border: 0;
34
+ align-items: flex-start;
35
+ }
52
36
 
53
- background-color: transparent;
37
+ &__illustration {
38
+ @apply c-rounded-xl;
54
39
 
55
- cursor: pointer;
40
+ width: 80px;
41
+ height: 80px;
42
+ align-self: flex-start;
43
+
44
+ object-fit: cover;
45
+ }
56
46
 
57
- .cobalt-Icon {
58
- @apply c-state-interactive c-transition-interactive;
59
- }
47
+ .cob-Button {
48
+ @apply c-mt-xs;
60
49
  }
61
50
  }
@@ -1,10 +1,12 @@
1
1
  @import "./components/Alerter/index";
2
+ @import "./components/Banner/index";
2
3
  @import "./components/BasicCell/index";
3
4
  @import "./components/BulletList/index";
4
5
  @import "./components/Buttons/index";
5
6
  @import "./components/Calendar/CalendarRangePicker/index";
6
7
  @import "./components/Calendar/CalendarDayPicker/index";
7
8
  @import "./components/Callout/index";
9
+ @import "./components/Callout/deprecated";
8
10
  @import "./components/Card/index";
9
11
  @import "./components/Cell/index";
10
12
  @import "./components/EmptyState/index";
@@ -69,8 +69,8 @@
69
69
  letter-spacing: -0.02rem;
70
70
 
71
71
  @include breakpoint($from: sm) {
72
- font-size: 1.25rem;
73
- letter-spacing: -0.025rem;
72
+ font-size: 1.125rem;
73
+ letter-spacing: -0.0225rem;
74
74
  }
75
75
  }
76
76
 
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export type BannerPropsType = React.PropsWithChildren<{
3
+ title?: string;
4
+ cta?: React.ReactNode;
5
+ illustrationUrl?: string;
6
+ illustrationHeight?: number;
7
+ variant: "secondary" | "tertiary" | "business";
8
+ className?: string;
9
+ }>;
10
+ export declare const Banner: ({ title, children, cta, variant, illustrationUrl, illustrationHeight, className, }: BannerPropsType) => React.JSX.Element;
11
+ export default Banner;
@@ -7,6 +7,7 @@ type SmallCommonPropsType = ButtonTemplatePropsType<{
7
7
  }>;
8
8
  export type SmallButtonPropsType = SmallCommonPropsType & ButtonProps;
9
9
  export type SmallLinkPropsType = SmallCommonPropsType & LinkProps;
10
+ export type SmallButtonElement = React.ReactElement<SmallButtonPropsType>;
10
11
  declare const SmallButton: React.ForwardRefExoticComponent<{
11
12
  variant?: "primary" | "warning" | "secondary" | "tertiary" | "business" | "success" | "neutral" | undefined;
12
13
  destructive?: boolean | undefined;
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
- export interface CalloutProps {
3
- children: React.ReactNode;
2
+ export type CalloutPropsType = React.PropsWithChildren<{
4
3
  title?: string;
5
- status: "info" | "error" | "success";
6
- close?: () => void;
7
- }
8
- export declare const Callout: ({ title, children, status, close, }: CalloutProps) => React.JSX.Element;
4
+ cta?: React.ReactNode;
5
+ illustrationUrl?: string;
6
+ variant: "warning" | "neutral" | "error";
7
+ className?: string;
8
+ }>;
9
+ export declare const Callout: ({ title, children, cta, variant, illustrationUrl, className, }: CalloutPropsType) => React.JSX.Element;
9
10
  export default Callout;
@@ -250,8 +250,8 @@ function requireGetCobaltTailwindcssConfig () {
250
250
  letterSpacing: rem((-2 / 100) * REM._16px),
251
251
  from: {
252
252
  sm: {
253
- fontSize: rem(REM._20px),
254
- letterSpacing: rem((-2 / 100) * REM._20px),
253
+ fontSize: rem(REM._18px),
254
+ letterSpacing: rem((-2 / 100) * REM._18px),
255
255
  },
256
256
  },
257
257
  },
@@ -1 +1 @@
1
- {"version":3,"file":"getCobaltTailwindcssConfig2.js","sources":["../../utils/getCobaltTailwindcssConfig.js"],"sourcesContent":["/*\n FOR NODE ENVIRONMENT ONLY\n Do never import tailwind file config (or helpers importing it) into Cobalt\n components/stories on src/ side, it will result to have tailwindcss unecessary\n dependencies into build files.\n See https://github.com/tailwindcss/tailwindcss/issues/634#issuecomment-459740859\n If you need data from the theme configuration, you can do the same as we did\n for colors:\n - create a json token file with the data needed (will be the single source of data)\n - In the tailwindcss config file: import and use this json file\n - In the src/ side: import and use this json file also\n*/\nconst defaultTheme = require(\"tailwindcss/defaultTheme\")\nconst breakpoints = require(\"../src/tokens/breakpoints.json\")\nconst zIndexes = require(\"../src/tokens/zIndexes.json\")\nconst { getColorsUsingCSSVariables } = require(\"./helpers\")\nconst generators = require(\"./tailwindcssGenerators\")\n\nconst CSS_VAR_STATE_INTERACTIVE_COLOR = \"--c-state-interactive-color\"\n\nconst rem = (value) => `${value}rem`\n\nconst REM = {\n _12px: 0.75,\n _14px: 0.875,\n _15px: 0.9375,\n _16px: 1,\n _18px: 1.125,\n _20px: 1.25,\n _24px: 1.5,\n _28px: 1.75,\n _32px: 2,\n _36px: 2.25,\n _40px: 2.5,\n _44px: 2.75,\n _56px: 3.5,\n _60px: 3.75,\n _64px: 4,\n}\n\nconst { themeColors, stateColors } = getColorsUsingCSSVariables({\n additionalColors: { transparent: \"transparent\", current: \"currentColor\" },\n})\n\nconst baseFont =\n \"BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif\"\n\nconst getCobaltTailwindcssConfig = ({ content, safelist = undefined }) => ({\n content,\n safelist: safelist,\n prefix: \"c-\",\n // utilities to disable\n corePlugins: {\n // Don't use Tailwindcss reset and default styles\n preflight: false,\n // Handle by custom classes via generators\n letterSpacing: false,\n lineHeight: false,\n borderStyle: false,\n borderWidth: false,\n fontSize: false,\n // Not needed, at least for now\n textOpacity: false,\n backgroundOpacity: false,\n caretColor: false,\n boxShadowColor: false,\n ringOffsetColor: false,\n gradientColorStops: false,\n gradientColorStopPositions: false,\n textDecorationColor: false,\n },\n theme: {\n extend: {\n transitionProperty: {\n interactive: `${CSS_VAR_STATE_INTERACTIVE_COLOR}`,\n DEFAULT: `${CSS_VAR_STATE_INTERACTIVE_COLOR}, ${defaultTheme.transitionProperty.DEFAULT}`,\n colors: `${CSS_VAR_STATE_INTERACTIVE_COLOR}, ${defaultTheme.transitionProperty.colors}`,\n },\n },\n colors: themeColors,\n semanticStateColor: {\n interactive: {\n DEFAULT: themeColors.transparent,\n hover: stateColors.hover,\n press: stateColors.press,\n },\n onDrag: stateColors.drag,\n none: {\n DEFAULT: themeColors.transparent,\n hover: themeColors.transparent,\n press: themeColors.transparent,\n },\n },\n borderStyle: {\n solid: \"solid\",\n dashed: \"dashed\",\n none: \"none\",\n },\n borderWidth: {\n 0: \"0\",\n \"0_5\": \"0.5px\",\n DEFAULT: \"1px\",\n 2: \"0.125rem\",\n 4: \".25rem\",\n },\n borderRadius: {\n none: \"0\",\n DEFAULT: \".25rem\", // c-rounded\n md: \".375rem\",\n lg: \".5rem\",\n xl: \".75rem\",\n \"2xl\": \"1rem\",\n full: \"9999px\", // full rounded\n },\n boxShadow: {\n DEFAULT: \"0 0.125rem 0.75rem rgba(0, 0, 0, 0.1)\", // c-shadow\n md: \"0 0.25rem 1.5rem rgba(0, 0, 0, 0.15)\",\n lg: \"0 0.375rem 2.25rem rgba(0, 0, 0, 0.2)\",\n },\n fontFamily: {\n base: baseFont,\n brand: `BrownPro,${baseFont}`,\n mono: \"Consolas,'Liberation Mono',Menlo,Courier,monospace\",\n },\n fontWeight: {\n regular: \"400\",\n bold: \"600\",\n },\n spacing: {\n none: \"0\",\n \"2xs\": \".25rem\",\n xs: \".5rem\",\n sm: \"1rem\",\n md: \"1.5rem\",\n lg: \"2rem\",\n xl: \"3rem\",\n \"2xl\": \"4rem\",\n },\n screens: { ...breakpoints },\n zIndex: Object.fromEntries(\n Object.entries(zIndexes).map(([key, value]) => [key, value.toString()])\n ),\n // custom properties, not processed by Tailwindcss itself\n customText: ({ theme }) => ({\n link: {\n cursor: \"pointer\",\n textDecoration: \"underline\",\n fontWeight: 500,\n textUnderlineOffset: \"2px\",\n hover: {\n textDecoration: \"none\",\n },\n focus: {\n textDecoration: \"none\",\n },\n },\n linkVariant: {\n cursor: \"pointer\",\n textDecoration: \"none\",\n fontWeight: 500,\n textUnderlineOffset: \"2px\",\n hover: {\n textDecoration: \"underline\",\n },\n focus: {\n textDecoration: \"underline\",\n },\n },\n heading: {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._36px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: \"-0.5px\",\n from: {\n sm: {\n fontSize: rem(REM._56px),\n },\n },\n },\n subheading: {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._20px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: \"-0.5px\",\n from: {\n sm: {\n fontSize: rem(REM._28px),\n },\n },\n },\n \"title-xl\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._32px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._32px),\n from: {\n sm: {\n fontSize: rem(REM._40px),\n letterSpacing: rem((-2 / 100) * REM._40px),\n },\n },\n },\n \"title-lg\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._24px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._24px),\n from: {\n sm: {\n fontSize: rem(REM._32px),\n letterSpacing: rem((-2 / 100) * REM._32px),\n },\n },\n },\n \"title-md\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._20px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._20px),\n from: {\n sm: {\n fontSize: rem(REM._24px),\n letterSpacing: rem((-2 / 100) * REM._24px),\n },\n },\n },\n \"title-sm\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._16px),\n lineHeight: \"125%\",\n fontWeight: 600,\n letterSpacing: rem((-2 / 100) * REM._16px),\n from: {\n sm: {\n fontSize: rem(REM._20px),\n letterSpacing: rem((-2 / 100) * REM._20px),\n },\n },\n },\n \"title-xs\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._16px),\n lineHeight: \"125%\",\n fontWeight: 600,\n letterSpacing: rem((-2 / 100) * REM._16px),\n },\n //\n \"body-lg\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._18px),\n lineHeight: rem(REM._24px),\n },\n \"body-md\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._16px),\n lineHeight: rem(REM._24px),\n },\n \"body-sm\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._12px),\n lineHeight: rem(REM._16px),\n },\n \"section-heading\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._14px),\n lineHeight: \"175%\",\n fontWeight: 700,\n textTransform: \"uppercase\",\n letterSpacing: \"-0.2px\",\n color: themeColors.onSurfaceVariant,\n },\n }),\n },\n plugins: [\n // custom typography classes\n generators.text,\n // custom border width classes (width default solid style)\n generators.borderWidth,\n // custom border style classes, must be after border width plugin\n generators.borderStyle,\n // Semantic colors (handling hover/press color states)\n generators.getSemanticColorGenerator({\n type: \"semanticStateColor\",\n classPrefix: \"state\",\n cssProperty: CSS_VAR_STATE_INTERACTIVE_COLOR,\n additionalRules: {\n interactive: {\n \"background-image\": `linear-gradient(var(${CSS_VAR_STATE_INTERACTIVE_COLOR}), var(${CSS_VAR_STATE_INTERACTIVE_COLOR}))`,\n },\n },\n }),\n ],\n})\n\nmodule.exports = getCobaltTailwindcssConfig\n"],"names":["require$$3","require$$4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYA,CA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AC,KAAK,CAAC;AAChC,SAAQ,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;QAC3B;AACP,OAAM,SAAS,EAAE;AACjB,SAAQ,UAAU,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,IAAI;AAC5C,SAAQ,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;AAChC,SAAQ,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;QAC3B;AACP,OAAM,iBAAiB,EAAE;AACzB,SAAQ,UAAU,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,KAAK;AAC7C,SAAQ,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;SACxB,UAAU,EAAE,MAAM;SAClB,UAAU,EAAE,GAAG;SACf,aAAa,EAAE,WAAW;SAC1B,aAAa,EAAE,QAAQ;AAC/B,SAAQ,KAAK,EAAE,WAAW,CAAC,gBAAgB;QACpC;AACP,MAAK,CAAC;IACH;AACH,GAAE,OAAO,EAAE;AACX;KACI,UAAU,CAAC,IAAI;AACnB;KACI,UAAU,CAAC,WAAW;AAC1B;KACI,UAAU,CAAC,WAAW;AAC1B;KACI,UAAU,CAAC,yBAAyB,CAAC;OACnC,IAAI,EAAE,oBAAoB;OAC1B,WAAW,EAAE,OAAO;OACpB,WAAW,EAAE,+BAA+B;AAClD,OAAM,eAAe,EAAE;AACvB,SAAQ,WAAW,EAAE;AACrB,WAAU,kBAAkB,EAAE,CAAC,oBAAoB,EAAE,+BAA+B,CAAC,OAAO,EAAE,+BAA+B,CAAC,EAAE,CAAC;UACxH;QACF;AACP,MAAK,CAAC;IACH;EACF,EAAA;;AAED,CAAA,4BAAc,GAAG,2BAAA;;;;;;"}
1
+ {"version":3,"file":"getCobaltTailwindcssConfig2.js","sources":["../../utils/getCobaltTailwindcssConfig.js"],"sourcesContent":["/*\n FOR NODE ENVIRONMENT ONLY\n Do never import tailwind file config (or helpers importing it) into Cobalt\n components/stories on src/ side, it will result to have tailwindcss unecessary\n dependencies into build files.\n See https://github.com/tailwindcss/tailwindcss/issues/634#issuecomment-459740859\n If you need data from the theme configuration, you can do the same as we did\n for colors:\n - create a json token file with the data needed (will be the single source of data)\n - In the tailwindcss config file: import and use this json file\n - In the src/ side: import and use this json file also\n*/\nconst defaultTheme = require(\"tailwindcss/defaultTheme\")\nconst breakpoints = require(\"../src/tokens/breakpoints.json\")\nconst zIndexes = require(\"../src/tokens/zIndexes.json\")\nconst { getColorsUsingCSSVariables } = require(\"./helpers\")\nconst generators = require(\"./tailwindcssGenerators\")\n\nconst CSS_VAR_STATE_INTERACTIVE_COLOR = \"--c-state-interactive-color\"\n\nconst rem = (value) => `${value}rem`\n\nconst REM = {\n _12px: 0.75,\n _14px: 0.875,\n _15px: 0.9375,\n _16px: 1,\n _18px: 1.125,\n _20px: 1.25,\n _24px: 1.5,\n _28px: 1.75,\n _32px: 2,\n _36px: 2.25,\n _40px: 2.5,\n _44px: 2.75,\n _56px: 3.5,\n _60px: 3.75,\n _64px: 4,\n}\n\nconst { themeColors, stateColors } = getColorsUsingCSSVariables({\n additionalColors: { transparent: \"transparent\", current: \"currentColor\" },\n})\n\nconst baseFont =\n \"BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif\"\n\nconst getCobaltTailwindcssConfig = ({ content, safelist = undefined }) => ({\n content,\n safelist: safelist,\n prefix: \"c-\",\n // utilities to disable\n corePlugins: {\n // Don't use Tailwindcss reset and default styles\n preflight: false,\n // Handle by custom classes via generators\n letterSpacing: false,\n lineHeight: false,\n borderStyle: false,\n borderWidth: false,\n fontSize: false,\n // Not needed, at least for now\n textOpacity: false,\n backgroundOpacity: false,\n caretColor: false,\n boxShadowColor: false,\n ringOffsetColor: false,\n gradientColorStops: false,\n gradientColorStopPositions: false,\n textDecorationColor: false,\n },\n theme: {\n extend: {\n transitionProperty: {\n interactive: `${CSS_VAR_STATE_INTERACTIVE_COLOR}`,\n DEFAULT: `${CSS_VAR_STATE_INTERACTIVE_COLOR}, ${defaultTheme.transitionProperty.DEFAULT}`,\n colors: `${CSS_VAR_STATE_INTERACTIVE_COLOR}, ${defaultTheme.transitionProperty.colors}`,\n },\n },\n colors: themeColors,\n semanticStateColor: {\n interactive: {\n DEFAULT: themeColors.transparent,\n hover: stateColors.hover,\n press: stateColors.press,\n },\n onDrag: stateColors.drag,\n none: {\n DEFAULT: themeColors.transparent,\n hover: themeColors.transparent,\n press: themeColors.transparent,\n },\n },\n borderStyle: {\n solid: \"solid\",\n dashed: \"dashed\",\n none: \"none\",\n },\n borderWidth: {\n 0: \"0\",\n \"0_5\": \"0.5px\",\n DEFAULT: \"1px\",\n 2: \"0.125rem\",\n 4: \".25rem\",\n },\n borderRadius: {\n none: \"0\",\n DEFAULT: \".25rem\", // c-rounded\n md: \".375rem\",\n lg: \".5rem\",\n xl: \".75rem\",\n \"2xl\": \"1rem\",\n full: \"9999px\", // full rounded\n },\n boxShadow: {\n DEFAULT: \"0 0.125rem 0.75rem rgba(0, 0, 0, 0.1)\", // c-shadow\n md: \"0 0.25rem 1.5rem rgba(0, 0, 0, 0.15)\",\n lg: \"0 0.375rem 2.25rem rgba(0, 0, 0, 0.2)\",\n },\n fontFamily: {\n base: baseFont,\n brand: `BrownPro,${baseFont}`,\n mono: \"Consolas,'Liberation Mono',Menlo,Courier,monospace\",\n },\n fontWeight: {\n regular: \"400\",\n bold: \"600\",\n },\n spacing: {\n none: \"0\",\n \"2xs\": \".25rem\",\n xs: \".5rem\",\n sm: \"1rem\",\n md: \"1.5rem\",\n lg: \"2rem\",\n xl: \"3rem\",\n \"2xl\": \"4rem\",\n },\n screens: { ...breakpoints },\n zIndex: Object.fromEntries(\n Object.entries(zIndexes).map(([key, value]) => [key, value.toString()])\n ),\n // custom properties, not processed by Tailwindcss itself\n customText: ({ theme }) => ({\n link: {\n cursor: \"pointer\",\n textDecoration: \"underline\",\n fontWeight: 500,\n textUnderlineOffset: \"2px\",\n hover: {\n textDecoration: \"none\",\n },\n focus: {\n textDecoration: \"none\",\n },\n },\n linkVariant: {\n cursor: \"pointer\",\n textDecoration: \"none\",\n fontWeight: 500,\n textUnderlineOffset: \"2px\",\n hover: {\n textDecoration: \"underline\",\n },\n focus: {\n textDecoration: \"underline\",\n },\n },\n heading: {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._36px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: \"-0.5px\",\n from: {\n sm: {\n fontSize: rem(REM._56px),\n },\n },\n },\n subheading: {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._20px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: \"-0.5px\",\n from: {\n sm: {\n fontSize: rem(REM._28px),\n },\n },\n },\n \"title-xl\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._32px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._32px),\n from: {\n sm: {\n fontSize: rem(REM._40px),\n letterSpacing: rem((-2 / 100) * REM._40px),\n },\n },\n },\n \"title-lg\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._24px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._24px),\n from: {\n sm: {\n fontSize: rem(REM._32px),\n letterSpacing: rem((-2 / 100) * REM._32px),\n },\n },\n },\n \"title-md\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._20px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._20px),\n from: {\n sm: {\n fontSize: rem(REM._24px),\n letterSpacing: rem((-2 / 100) * REM._24px),\n },\n },\n },\n \"title-sm\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._16px),\n lineHeight: \"125%\",\n fontWeight: 600,\n letterSpacing: rem((-2 / 100) * REM._16px),\n from: {\n sm: {\n fontSize: rem(REM._18px),\n letterSpacing: rem((-2 / 100) * REM._18px),\n },\n },\n },\n \"title-xs\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._16px),\n lineHeight: \"125%\",\n fontWeight: 600,\n letterSpacing: rem((-2 / 100) * REM._16px),\n },\n //\n \"body-lg\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._18px),\n lineHeight: rem(REM._24px),\n },\n \"body-md\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._16px),\n lineHeight: rem(REM._24px),\n },\n \"body-sm\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._12px),\n lineHeight: rem(REM._16px),\n },\n \"section-heading\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._14px),\n lineHeight: \"175%\",\n fontWeight: 700,\n textTransform: \"uppercase\",\n letterSpacing: \"-0.2px\",\n color: themeColors.onSurfaceVariant,\n },\n }),\n },\n plugins: [\n // custom typography classes\n generators.text,\n // custom border width classes (width default solid style)\n generators.borderWidth,\n // custom border style classes, must be after border width plugin\n generators.borderStyle,\n // Semantic colors (handling hover/press color states)\n generators.getSemanticColorGenerator({\n type: \"semanticStateColor\",\n classPrefix: \"state\",\n cssProperty: CSS_VAR_STATE_INTERACTIVE_COLOR,\n additionalRules: {\n interactive: {\n \"background-image\": `linear-gradient(var(${CSS_VAR_STATE_INTERACTIVE_COLOR}), var(${CSS_VAR_STATE_INTERACTIVE_COLOR}))`,\n },\n },\n }),\n ],\n})\n\nmodule.exports = getCobaltTailwindcssConfig\n"],"names":["require$$3","require$$4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYA,CAAA,MAAM,YAAY,GAAG,WAAA;AACrB,CAAA,MAAM,WAAW,GAAG,WAAA;AACpB,CAAA,MAAM,QAAQ,GAAG,WAAA;CACjB,MAAM,EAAE,0BAA0B,EAAE,GAAGA,cAAA,GAAA;AACvC,CA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