@drivy/cobalt 2.18.0 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MarketingNote/index.js +7 -0
- package/components/MarketingNote/index.js.map +1 -0
- package/components/Steps/index.js +15 -0
- package/components/Steps/index.js.map +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components/MarketingNote/index.scss +39 -0
- package/styles/components/Steps/index.scss +91 -0
- package/styles/components.scss +2 -0
- package/types/src/components/MarketingNote/index.d.ts +8 -0
- package/types/src/components/Steps/index.d.ts +9 -0
- package/types/src/index.d.ts +2 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cx from 'classnames';
|
|
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: "c-flex-1", children: [title && jsx("div", { className: "c-font-bold", children: title }), children] })] }));
|
|
5
|
+
|
|
6
|
+
export { MarketingNote };
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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=\"c-flex-1\">\n {title && <div className=\"c-font-bold\">{title}</div>}\n {children}\n </div>\n </div>\n)\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAUO,MAAM,aAAa,GAAG,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,SAAS,EACT,OAAO,GACY,MACnBA,IACE,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CACX,CAAA,6CAAA,EAAgD,OAAO,CAAA,CAAE,EACzD,SAAS,CACV,EAEA,QAAA,EAAA,CAAA,IAAI,KACHC,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,uCAAuC,EAAE,QAAA,EAAA,IAAI,EAAO,CAAA,CACpE,EAEDD,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,UAAU,EACtB,QAAA,EAAA,CAAA,KAAK,IAAIC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,aAAa,EAAA,QAAA,EAAE,KAAK,EAAA,CAAO,EACnD,QAAQ,CACL,EAAA,CAAA,CAAA,EAAA,CACF;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Steps as Steps$1 } from '@ark-ui/react/steps';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
|
|
5
|
+
const Steps = ({ items }) => {
|
|
6
|
+
return (jsx(Steps$1.Root, { className: "cobalt-steps", count: items.length, orientation: "vertical", children: items.map((item, index) => {
|
|
7
|
+
const itemKey = index;
|
|
8
|
+
return (jsxs(Steps$1.Item, { index: index, className: cx("cobalt-steps__item", {
|
|
9
|
+
"cobalt-steps__item--important": item.important,
|
|
10
|
+
}), children: [jsxs("div", { className: "cobalt-steps__item__wrapper", children: [jsx(Steps$1.Indicator, { className: "cobalt-steps__item__indicator" }), jsxs("div", { className: "cobalt-steps__item__content", children: [jsx("div", { className: "cobalt-steps__item__label", children: item.label }), jsx("div", { className: "cobalt-steps__item__description", children: item.description })] })] }), jsx(Steps$1.Separator, { className: "cobalt-steps__item__separator" })] }, itemKey));
|
|
11
|
+
}) }));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { Steps };
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Steps/index.tsx"],"sourcesContent":["import { Steps as ArkSteps } from \"@ark-ui/react/steps\"\nimport cx from \"classnames\"\n\nexport interface StepItem {\n label: string\n description?: string\n important?: boolean\n}\n\nexport type StepsPropsType = { items: StepItem[] }\n\nexport const Steps = ({ items }: StepsPropsType) => {\n return (\n <ArkSteps.Root\n className=\"cobalt-steps\"\n count={items.length}\n orientation=\"vertical\"\n >\n {items.map((item, index) => {\n const itemKey = index\n return (\n <ArkSteps.Item\n key={itemKey}\n index={index}\n className={cx(\"cobalt-steps__item\", {\n \"cobalt-steps__item--important\": item.important,\n })}\n >\n <div className=\"cobalt-steps__item__wrapper\">\n <ArkSteps.Indicator className=\"cobalt-steps__item__indicator\" />\n <div className=\"cobalt-steps__item__content\">\n <div className=\"cobalt-steps__item__label\">{item.label}</div>\n <div className=\"cobalt-steps__item__description\">\n {item.description}\n </div>\n </div>\n </div>\n <ArkSteps.Separator className=\"cobalt-steps__item__separator\" />\n </ArkSteps.Item>\n )\n })}\n </ArkSteps.Root>\n )\n}\n"],"names":["_jsx","ArkSteps","_jsxs"],"mappings":";;;;MAWa,KAAK,GAAG,CAAC,EAAE,KAAK,EAAkB,KAAI;AACjD,IAAA,QACEA,GAAA,CAACC,OAAQ,CAAC,IAAI,EAAA,EACZ,SAAS,EAAC,cAAc,EACxB,KAAK,EAAE,KAAK,CAAC,MAAM,EACnB,WAAW,EAAC,UAAU,EAAA,QAAA,EAErB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAI;YACzB,MAAM,OAAO,GAAG,KAAK,CAAA;AACrB,YAAA,QACEC,IAAA,CAACD,OAAQ,CAAC,IAAI,EAEZ,EAAA,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE;oBAClC,+BAA+B,EAAE,IAAI,CAAC,SAAS;iBAChD,CAAC,EAAA,QAAA,EAAA,CAEFC,IAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,6BAA6B,EAC1C,QAAA,EAAA,CAAAF,GAAA,CAACC,OAAQ,CAAC,SAAS,EAAA,EAAC,SAAS,EAAC,+BAA+B,EAAG,CAAA,EAChEC,IAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,6BAA6B,EAC1C,QAAA,EAAA,CAAAF,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,2BAA2B,EAAA,QAAA,EAAE,IAAI,CAAC,KAAK,EAAO,CAAA,EAC7DA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,iCAAiC,EAC7C,QAAA,EAAA,IAAI,CAAC,WAAW,EACb,CAAA,CAAA,EAAA,CACF,CACF,EAAA,CAAA,EACNA,IAACC,OAAQ,CAAC,SAAS,EAAA,EAAC,SAAS,EAAC,+BAA+B,EAAA,CAAG,CAf3D,EAAA,EAAA,OAAO,CAgBE,EACjB;SACF,CAAC,EACY,CAAA,EACjB;AACH;;;;"}
|
package/index.js
CHANGED
|
@@ -42,6 +42,7 @@ export { default as LayoutSection } from './components/Layout/Components/LayoutS
|
|
|
42
42
|
export { default as LayoutSectionTitle } from './components/Layout/Components/LayoutSectionTitle.js';
|
|
43
43
|
export { default as LayoutStack } from './components/Layout/Components/LayoutStack.js';
|
|
44
44
|
export { Fixed, Flexible, FlexibleWithConstraint } from './components/Layout/Surfaces/index.js';
|
|
45
|
+
export { MarketingNote } from './components/MarketingNote/index.js';
|
|
45
46
|
export { default as Modal } from './components/Modal/index.js';
|
|
46
47
|
export { Note } from './components/Note/index.js';
|
|
47
48
|
export { default as Pagination } from './components/Pagination/index.js';
|
|
@@ -55,6 +56,7 @@ export { ProgressBar } from './components/ProgressBar/index.js';
|
|
|
55
56
|
export { ProgressCircular } from './components/ProgressCircular/index.js';
|
|
56
57
|
export { Rating } from './components/Rating/index.js';
|
|
57
58
|
export { Sidepanel } from './components/Sidepanel/index.js';
|
|
59
|
+
export { Steps } from './components/Steps/index.js';
|
|
58
60
|
export { Tab, default as Tabs } from './components/Tabs/index.js';
|
|
59
61
|
export { Tag } from './components/Tag/index.js';
|
|
60
62
|
export { getA11yOnClick, getCSSVariableThemeColor, getComputedThemeColor } from './helpers/index.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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.cobalt-marketing-note {
|
|
2
|
+
@apply c-rounded-xl c-p-sm c-gap-xs c-text-body-sm;
|
|
3
|
+
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.cobalt-marketing-note.cobalt-marketing-note--success {
|
|
9
|
+
@apply c-bg-successContainer c-text-onSuccessContainer;
|
|
10
|
+
|
|
11
|
+
.cobalt-Icon {
|
|
12
|
+
@apply c-fill-onSuccessContainer;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.cobalt-marketing-note.cobalt-marketing-note--tertiary {
|
|
17
|
+
@apply c-bg-tertiaryContainer c-text-onTertiaryContainer;
|
|
18
|
+
|
|
19
|
+
.cobalt-Icon {
|
|
20
|
+
@apply c-fill-onTertiaryContainer;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.cobalt-marketing-note__icon-container {
|
|
25
|
+
--icon-container-size: 28px;
|
|
26
|
+
|
|
27
|
+
display: flex;
|
|
28
|
+
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
|
|
32
|
+
width: var(--icon-container-size);
|
|
33
|
+
height: var(--icon-container-size);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.cobalt-marketing-note__icon-container .cobalt-Icon {
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
.cobalt-steps {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: flex-start;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: 32rem;
|
|
8
|
+
|
|
9
|
+
--steps-indicator-size: 12px;
|
|
10
|
+
--steps-separator-thickness: 1px;
|
|
11
|
+
|
|
12
|
+
@apply c-px-2xs c-py-xs;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cobalt-steps__item {
|
|
16
|
+
@apply c-pb-sm c-text-body-sm;
|
|
17
|
+
position: relative;
|
|
18
|
+
|
|
19
|
+
display: flex;
|
|
20
|
+
flex: 1 0 0;
|
|
21
|
+
align-items: flex-start;
|
|
22
|
+
gap: 0.75rem;
|
|
23
|
+
|
|
24
|
+
&:last-of-type {
|
|
25
|
+
@apply c-pb-none;
|
|
26
|
+
|
|
27
|
+
flex: initial;
|
|
28
|
+
|
|
29
|
+
& [data-part="separator"] {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.cobalt-steps__item__wrapper {
|
|
36
|
+
display: flex;
|
|
37
|
+
|
|
38
|
+
align-items: flex-start;
|
|
39
|
+
|
|
40
|
+
gap: 0.75rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.cobalt-steps__item__content {
|
|
44
|
+
@apply c-gap-2xs;
|
|
45
|
+
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.cobalt-steps__item__indicator {
|
|
51
|
+
@apply c-border c-border-outline c-rounded-full c-bg-surfaceBright;
|
|
52
|
+
|
|
53
|
+
display: flex;
|
|
54
|
+
|
|
55
|
+
width: var(--steps-indicator-size);
|
|
56
|
+
height: var(--steps-indicator-size);
|
|
57
|
+
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.cobalt-steps__item__separator {
|
|
65
|
+
@apply c-bg-outline;
|
|
66
|
+
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: calc(var(--steps-indicator-size));
|
|
69
|
+
left: calc(var(--steps-indicator-size) / 2 - 0.5px);
|
|
70
|
+
|
|
71
|
+
flex: 1;
|
|
72
|
+
|
|
73
|
+
width: var(--steps-separator-thickness);
|
|
74
|
+
height: 100%;
|
|
75
|
+
|
|
76
|
+
max-height: calc(100% - var(--steps-indicator-size));
|
|
77
|
+
|
|
78
|
+
margin-inline: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.cobalt-steps__item__label {
|
|
82
|
+
@apply c--mt-2xs;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.cobalt-steps__item.cobalt-steps__item--important .cobalt-steps__item__label {
|
|
86
|
+
@apply c-font-bold;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.cobalt-steps__item__description {
|
|
90
|
+
@apply c-text-onSurfaceVariant;
|
|
91
|
+
}
|
package/styles/components.scss
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
@import "./components/Icon/index";
|
|
17
17
|
@import "./components/Layout/Components/index";
|
|
18
18
|
@import "./components/Layout/Surfaces/index";
|
|
19
|
+
@import "./components/MarketingNote/index";
|
|
19
20
|
@import "./components/Note/index";
|
|
20
21
|
@import "./components/Pagination/index";
|
|
21
22
|
@import "./components/PhotoDropzone/index";
|
|
@@ -38,3 +39,4 @@
|
|
|
38
39
|
@import "./components/PlateNumber/index";
|
|
39
40
|
@import "./components/Sidepanel/index";
|
|
40
41
|
@import "./components/Notice/index";
|
|
42
|
+
@import "./components/Steps/index";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
export type MarketingNoteProps = PropsWithChildren<{
|
|
3
|
+
variant: "success" | "tertiary";
|
|
4
|
+
title?: string;
|
|
5
|
+
icon?: React.JSX.Element;
|
|
6
|
+
className?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const MarketingNote: ({ children, title, icon, className, variant, }: MarketingNoteProps) => import("react/jsx-runtime").JSX.Element;
|
package/types/src/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export * from "./components/Icon";
|
|
|
42
42
|
/** Layouts */
|
|
43
43
|
export * from "./components/Layout/Components";
|
|
44
44
|
export * from "./components/Layout/Surfaces";
|
|
45
|
+
export { MarketingNote } from "./components/MarketingNote";
|
|
45
46
|
export { default as Modal, type ModalStepType, MultiStepModal, } from "./components/Modal";
|
|
46
47
|
export { Note } from "./components/Note";
|
|
47
48
|
export { default as Pagination } from "./components/Pagination";
|
|
@@ -55,6 +56,7 @@ export { ProgressBar } from "./components/ProgressBar";
|
|
|
55
56
|
export { ProgressCircular } from "./components/ProgressCircular";
|
|
56
57
|
export * from "./components/Rating/";
|
|
57
58
|
export { Sidepanel } from "./components/Sidepanel";
|
|
59
|
+
export { Steps } from "./components/Steps";
|
|
58
60
|
export { default as Tabs, Tab } from "./components/Tabs";
|
|
59
61
|
export { Tag } from "./components/Tag";
|
|
60
62
|
export * from "./helpers";
|