@drivy/cobalt 3.0.1 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/tokens/icons.js +1 -0
- package/cjs/tokens/icons.js.map +1 -1
- package/components/Icon/__generated__/DiamondIcon.js +19 -0
- package/components/Icon/__generated__/DiamondIcon.js.map +1 -0
- package/components/MarketingNote/index.js +1 -1
- package/components/MarketingNote/index.js.map +1 -1
- package/icons/diamond.js +4 -0
- package/icons/diamond.js.map +1 -0
- package/icons/diamond.svg +1 -0
- package/icons/index.js +1 -0
- package/icons/index.js.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components/MarketingNote/index.scss +28 -13
- package/tokens/icons.js +1 -0
- package/tokens/icons.js.map +1 -1
- package/types/src/components/Icon/__generated__/DiamondIcon.d.ts +9 -0
- package/types/src/components/Icon/__generated__/index.d.ts +1 -0
- package/types/src/components/MarketingNote/index.d.ts +2 -1
- package/types/src/icons/index.d.ts +1 -0
- package/types/src/tokens/index.d.ts +1 -0
package/cjs/tokens/icons.js
CHANGED
package/cjs/tokens/icons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import 'lodash.throttle';
|
|
4
|
+
import camelize from '../../utils/camelize.js';
|
|
5
|
+
|
|
6
|
+
const iconSource = "diamond";
|
|
7
|
+
const DiamondIcon = ({ color, size = 24, contained = false, className, }) => {
|
|
8
|
+
const computedClassName = cx(className, `cobalt-Icon cobalt-Icon--${iconSource}`, {
|
|
9
|
+
[`c-fill-${camelize(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
|
+
return (jsx("span", { className: computedClassName, children: jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [jsx("title", { children: iconSource }), jsx("path", { d: "M11.438 9.938v11.934L1.74 9.938zM12.563 21.872V9.938h9.696zM22.294 8.813h-6.03l2.756-5.82zM7.736 8.813h-6.03l3.273-5.82zM14.486 8.813H9.514L12 3.564zM8.625 8.06 6.05 2.625h5.15zM15.375 8.06 12.8 2.625h5.15z" })] }) }));
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { DiamondIcon as default };
|
|
19
|
+
//# sourceMappingURL=DiamondIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiamondIcon.js","sources":["../../../../src/components/Icon/__generated__/DiamondIcon.tsx"],"sourcesContent":["import cx from \"classnames\"\nimport { camelize } from \"../../utils\"\nimport type { IconColorsType } from \"../\"\nexport type IconProps = {\n color?: IconColorsType\n size?: 16 | 20 | 24 | 32\n contained?: boolean\n className?: string\n}\nconst iconSource = \"diamond\"\nconst DiamondIcon = ({\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 [`c-fill-${camelize(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 return (\n <span className={computedClassName}>\n {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <title>{iconSource}</title>\n <path d=\"M11.438 9.938v11.934L1.74 9.938zM12.563 21.872V9.938h9.696zM22.294 8.813h-6.03l2.756-5.82zM7.736 8.813h-6.03l3.273-5.82zM14.486 8.813H9.514L12 3.564zM8.625 8.06 6.05 2.625h5.15zM15.375 8.06 12.8 2.625h5.15z\" />\n </svg>\n }\n </span>\n )\n}\nexport default DiamondIcon\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;AASA,MAAM,UAAU,GAAG,SAAS,CAAA;AAC5B,MAAM,WAAW,GAAG,CAAC,EACnB,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,OAAA,EAAU,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA,CAAE,GAAG,KAAK;QAC1C,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;IACD,QACEA,GAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,iBAAiB,EAE9B,QAAA,EAAAC,IAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,EAAA,QAAA,EAAA,CACzDD,GAAQ,CAAA,OAAA,EAAA,EAAA,QAAA,EAAA,UAAU,EAAS,CAAA,EAC3BA,GAAM,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,gNAAgN,EAAG,CAAA,CAAA,EAAA,CACvN,EAEH,CAAA,EACR;AACH;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
|
|
4
|
-
const MarketingNote = ({ children, title, icon, className, variant, }) => (jsxs("div", { className: cx(`cobalt-marketing-note cobalt-marketing-note--${variant}`, className), children: [icon && (jsx("div", { className: "cobalt-marketing-note__icon-container", children: icon })), jsxs("div", { className: "
|
|
4
|
+
const MarketingNote = ({ children, title, icon, className, variant, compact = false, }) => (jsxs("div", { className: cx(`cobalt-marketing-note cobalt-marketing-note--${variant}`, className, { "cobalt-marketing-note--compact": compact }), children: [icon && (jsx("div", { className: "cobalt-marketing-note__icon-container", children: icon })), jsxs("div", { className: "cobalt-marketing-note__content", children: [title && jsx("div", { className: "c-font-bold", children: title }), children] })] }));
|
|
5
5
|
|
|
6
6
|
export { MarketingNote };
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/MarketingNote/index.tsx"],"sourcesContent":["import cx from \"classnames\"\nimport type { PropsWithChildren } from \"react\"\n\nexport type MarketingNoteProps = PropsWithChildren<{\n variant: \"success\" | \"tertiary\"\n title?: string\n icon?: React.JSX.Element\n className?: string\n}>\n\nexport const MarketingNote = ({\n children,\n title,\n icon,\n className,\n variant,\n}: MarketingNoteProps) => (\n <div\n className={cx(\n `cobalt-marketing-note cobalt-marketing-note--${variant}`,\n className,\n )}\n >\n {icon && (\n <div className=\"cobalt-marketing-note__icon-container\">{icon}</div>\n )}\n\n <div className=\"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/MarketingNote/index.tsx"],"sourcesContent":["import cx from \"classnames\"\nimport type { PropsWithChildren } from \"react\"\n\nexport type MarketingNoteProps = PropsWithChildren<{\n variant: \"success\" | \"tertiary\"\n title?: string\n icon?: React.JSX.Element\n compact?: boolean\n className?: string\n}>\n\nexport const MarketingNote = ({\n children,\n title,\n icon,\n className,\n variant,\n compact = false,\n}: MarketingNoteProps) => (\n <div\n className={cx(\n `cobalt-marketing-note cobalt-marketing-note--${variant}`,\n className,\n { \"cobalt-marketing-note--compact\": compact },\n )}\n >\n {icon && (\n <div className=\"cobalt-marketing-note__icon-container\">{icon}</div>\n )}\n\n <div className=\"cobalt-marketing-note__content\">\n {title && <div className=\"c-font-bold\">{title}</div>}\n {children}\n </div>\n </div>\n)\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAWO,MAAM,aAAa,GAAG,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,SAAS,EACT,OAAO,EACP,OAAO,GAAG,KAAK,GACI,MACnBA,IACE,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CACX,CAAgD,6CAAA,EAAA,OAAO,CAAE,CAAA,EACzD,SAAS,EACT,EAAE,gCAAgC,EAAE,OAAO,EAAE,CAC9C,EAAA,QAAA,EAAA,CAEA,IAAI,KACHC,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,uCAAuC,EAAA,QAAA,EAAE,IAAI,EAAA,CAAO,CACpE,EAEDD,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,gCAAgC,EAC5C,QAAA,EAAA,CAAA,KAAK,IAAIC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,aAAa,EAAE,QAAA,EAAA,KAAK,GAAO,EACnD,QAAQ,CACL,EAAA,CAAA,CAAA,EAAA,CACF;;;;"}
|
package/icons/diamond.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var diamond = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M11.438 9.938v11.934L1.74 9.938zm1.125 11.934V9.938h9.696zm9.731-13.059h-6.03l2.756-5.82zm-14.558 0h-6.03l3.273-5.82zm6.75 0H9.514L12 3.564zM8.625 8.06 6.05 2.625h5.15zm6.75 0L12.8 2.625h5.15z\"/></svg>";
|
|
2
|
+
|
|
3
|
+
export { diamond as default };
|
|
4
|
+
//# sourceMappingURL=diamond.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diamond.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.438 9.938v11.934L1.74 9.938zM12.563 21.872V9.938h9.696zM22.294 8.813h-6.03l2.756-5.82zM7.736 8.813h-6.03l3.273-5.82zM14.486 8.813H9.514L12 3.564zM8.625 8.06 6.05 2.625h5.15zM15.375 8.06 12.8 2.625h5.15z"/></svg>
|
package/icons/index.js
CHANGED
|
@@ -93,6 +93,7 @@ export { default as creditCardError } from './credit-card-error.js';
|
|
|
93
93
|
export { default as crosshover } from './crosshover.js';
|
|
94
94
|
export { default as cruiseControl } from './cruise-control.js';
|
|
95
95
|
export { default as dashcam } from './dashcam.js';
|
|
96
|
+
export { default as diamond } from './diamond.js';
|
|
96
97
|
export { default as directions } from './directions.js';
|
|
97
98
|
export { default as document } from './document.js';
|
|
98
99
|
export { default as dotHorizontal } from './dot-horizontal.js';
|
package/icons/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/index.js
CHANGED
|
@@ -160,6 +160,7 @@ export { default as CreditCardIcon } from './components/Icon/__generated__/Credi
|
|
|
160
160
|
export { default as CrosshoverIcon } from './components/Icon/__generated__/CrosshoverIcon.js';
|
|
161
161
|
export { default as CruiseControlIcon } from './components/Icon/__generated__/CruiseControlIcon.js';
|
|
162
162
|
export { default as DashcamIcon } from './components/Icon/__generated__/DashcamIcon.js';
|
|
163
|
+
export { default as DiamondIcon } from './components/Icon/__generated__/DiamondIcon.js';
|
|
163
164
|
export { default as DirectionsIcon } from './components/Icon/__generated__/DirectionsIcon.js';
|
|
164
165
|
export { default as DocumentIcon } from './components/Icon/__generated__/DocumentIcon.js';
|
|
165
166
|
export { default as DotHorizontalIcon } from './components/Icon/__generated__/DotHorizontalIcon.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
|
@@ -5,6 +5,28 @@
|
|
|
5
5
|
align-items: flex-start;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
.cobalt-marketing-note__icon-container {
|
|
9
|
+
--icon-container-size: 28px;
|
|
10
|
+
|
|
11
|
+
display: flex;
|
|
12
|
+
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
|
|
16
|
+
width: var(--icon-container-size);
|
|
17
|
+
height: var(--icon-container-size);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.cobalt-marketing-note__icon-container .cobalt-Icon {
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.cobalt-marketing-note__content {
|
|
26
|
+
flex: 1 1 0%;
|
|
27
|
+
align-self: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
8
30
|
.cobalt-marketing-note.cobalt-marketing-note--success {
|
|
9
31
|
@apply c-bg-successContainer c-text-onSuccessContainer;
|
|
10
32
|
|
|
@@ -21,19 +43,12 @@
|
|
|
21
43
|
}
|
|
22
44
|
}
|
|
23
45
|
|
|
24
|
-
.cobalt-marketing-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
display: flex;
|
|
28
|
-
|
|
29
|
-
justify-content: center;
|
|
30
|
-
align-items: center;
|
|
46
|
+
.cobalt-marketing-note.cobalt-marketing-note--compact {
|
|
47
|
+
@apply c-rounded-lg c-py-xs;
|
|
31
48
|
|
|
32
|
-
|
|
33
|
-
height: var(--icon-container-size);
|
|
34
|
-
}
|
|
49
|
+
padding-left: 0.75rem;
|
|
35
50
|
|
|
36
|
-
.cobalt-marketing-note__icon-container
|
|
37
|
-
|
|
38
|
-
|
|
51
|
+
.cobalt-marketing-note__icon-container {
|
|
52
|
+
--icon-container-size: 20px;
|
|
53
|
+
}
|
|
39
54
|
}
|
package/tokens/icons.js
CHANGED
package/tokens/icons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IconColorsType } from "../";
|
|
2
|
+
export type IconProps = {
|
|
3
|
+
color?: IconColorsType;
|
|
4
|
+
size?: 16 | 20 | 24 | 32;
|
|
5
|
+
contained?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const DiamondIcon: ({ color, size, contained, className, }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default DiamondIcon;
|
|
@@ -93,6 +93,7 @@ export { default as CreditCardIcon } from "./CreditCardIcon";
|
|
|
93
93
|
export { default as CrosshoverIcon } from "./CrosshoverIcon";
|
|
94
94
|
export { default as CruiseControlIcon } from "./CruiseControlIcon";
|
|
95
95
|
export { default as DashcamIcon } from "./DashcamIcon";
|
|
96
|
+
export { default as DiamondIcon } from "./DiamondIcon";
|
|
96
97
|
export { default as DirectionsIcon } from "./DirectionsIcon";
|
|
97
98
|
export { default as DocumentIcon } from "./DocumentIcon";
|
|
98
99
|
export { default as DotHorizontalIcon } from "./DotHorizontalIcon";
|
|
@@ -3,6 +3,7 @@ export type MarketingNoteProps = PropsWithChildren<{
|
|
|
3
3
|
variant: "success" | "tertiary";
|
|
4
4
|
title?: string;
|
|
5
5
|
icon?: React.JSX.Element;
|
|
6
|
+
compact?: boolean;
|
|
6
7
|
className?: string;
|
|
7
8
|
}>;
|
|
8
|
-
export declare const MarketingNote: ({ children, title, icon, className, variant, }: MarketingNoteProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const MarketingNote: ({ children, title, icon, className, variant, compact, }: MarketingNoteProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -93,6 +93,7 @@ export { default as creditCardError } from "./credit-card-error.svg";
|
|
|
93
93
|
export { default as crosshover } from "./crosshover.svg";
|
|
94
94
|
export { default as cruiseControl } from "./cruise-control.svg";
|
|
95
95
|
export { default as dashcam } from "./dashcam.svg";
|
|
96
|
+
export { default as diamond } from "./diamond.svg";
|
|
96
97
|
export { default as directions } from "./directions.svg";
|
|
97
98
|
export { default as document } from "./document.svg";
|
|
98
99
|
export { default as dotHorizontal } from "./dot-horizontal.svg";
|