@drivy/cobalt 0.38.0 → 0.39.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/package.json +16 -15
- package/styles/components/Layout/Layout.scss +79 -0
- package/styles/components.scss +1 -0
- package/types/components/Layout/LayoutCard.d.ts +10 -0
- package/types/components/Layout/LayoutPageTitle.d.ts +5 -0
- package/types/components/Layout/LayoutSection.d.ts +5 -0
- package/types/components/Layout/LayoutSectionTitle.d.ts +5 -0
- package/types/components/Layout/LayoutStack.d.ts +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drivy/cobalt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "Opinionated design system for Drivy's projects.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"date-fns": "2.30.0",
|
|
36
36
|
"lodash.throttle": "4.1.1",
|
|
37
37
|
"media-typer": "1.1.0",
|
|
38
|
-
"nanoid": "5.0.
|
|
38
|
+
"nanoid": "5.0.3",
|
|
39
39
|
"postcss": "8.4.31",
|
|
40
40
|
"tailwindcss": "2.2.19",
|
|
41
41
|
"tippy.js": "6.3.7"
|
|
@@ -53,25 +53,25 @@
|
|
|
53
53
|
"@percy/storybook": "4.3.6",
|
|
54
54
|
"@rollup/plugin-json": "6.0.1",
|
|
55
55
|
"@rushstack/eslint-patch": "1.5.1",
|
|
56
|
-
"@storybook/addon-essentials": "7.5.
|
|
57
|
-
"@storybook/addons": "7.5.
|
|
58
|
-
"@storybook/blocks": "7.5.
|
|
59
|
-
"@storybook/react": "7.5.
|
|
60
|
-
"@storybook/react-webpack5": "7.5.
|
|
56
|
+
"@storybook/addon-essentials": "7.5.3",
|
|
57
|
+
"@storybook/addons": "7.5.3",
|
|
58
|
+
"@storybook/blocks": "7.5.3",
|
|
59
|
+
"@storybook/react": "7.5.3",
|
|
60
|
+
"@storybook/react-webpack5": "7.5.3",
|
|
61
61
|
"@svgr/cli": "7.0.0",
|
|
62
62
|
"@testing-library/jest-dom": "5.17.0",
|
|
63
|
-
"@testing-library/react": "14.
|
|
63
|
+
"@testing-library/react": "14.1.0",
|
|
64
64
|
"@testing-library/react-hooks": "8.0.1",
|
|
65
65
|
"@types/classnames": "2.3.1",
|
|
66
|
-
"@types/jest": "29.5.
|
|
67
|
-
"@types/lodash.throttle": "4.1.
|
|
68
|
-
"@types/media-typer": "1.1.
|
|
66
|
+
"@types/jest": "29.5.8",
|
|
67
|
+
"@types/lodash.throttle": "4.1.9",
|
|
68
|
+
"@types/media-typer": "1.1.3",
|
|
69
69
|
"@types/prettier": "3.0.0",
|
|
70
|
-
"@types/react-dom": "18.2.
|
|
70
|
+
"@types/react-dom": "18.2.15",
|
|
71
71
|
"autoprefixer": "10.4.16",
|
|
72
72
|
"core-js": "3.33.2",
|
|
73
73
|
"css-loader": "6.8.1",
|
|
74
|
-
"eslint": "8.
|
|
74
|
+
"eslint": "8.53.0",
|
|
75
75
|
"eslint-plugin-storybook": "^0.6.15",
|
|
76
76
|
"file-loader": "6.2.0",
|
|
77
77
|
"jest": "29.7.0",
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
"react-dom": "18.2.0",
|
|
87
87
|
"react-syntax-highlighter": "15.5.0",
|
|
88
88
|
"react-test-renderer": "18.2.0",
|
|
89
|
+
"react-textarea-autosize": "^8.5.3",
|
|
89
90
|
"regenerator-runtime": "0.14.0",
|
|
90
91
|
"remark-gfm": "^3.0.1",
|
|
91
92
|
"rollup": "2.79.1",
|
|
@@ -97,11 +98,11 @@
|
|
|
97
98
|
"sass-loader": "13.3.2",
|
|
98
99
|
"sharp": "0.32.6",
|
|
99
100
|
"sharp-cli": "4.1.1",
|
|
100
|
-
"storybook": "7.5.
|
|
101
|
+
"storybook": "7.5.3",
|
|
101
102
|
"style-loader": "3.3.3",
|
|
102
103
|
"stylelint": "15.11.0",
|
|
103
104
|
"svg2vectordrawable": "2.9.1",
|
|
104
|
-
"svgo": "3.0.
|
|
105
|
+
"svgo": "3.0.3",
|
|
105
106
|
"ts-jest": "29.1.1",
|
|
106
107
|
"ts-node": "10.9.1",
|
|
107
108
|
"typescript": "5.2.2"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--cobalt-layout-y-spacing: 8px;
|
|
3
|
+
--cobalt-layout-x-spacing: 24px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.cobalt-layout-section {
|
|
7
|
+
@include bg-color(primary);
|
|
8
|
+
padding: var(--cobalt-layout-y-spacing) var(--cobalt-layout-x-spacing);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.cobalt-layout-card {
|
|
12
|
+
@include bg-color(primary);
|
|
13
|
+
@include border(base);
|
|
14
|
+
margin: var(--cobalt-layout-y-spacing) var(--cobalt-layout-x-spacing);
|
|
15
|
+
|
|
16
|
+
border-radius: border-radius(lg);
|
|
17
|
+
|
|
18
|
+
.cobalt-layout-card__item {
|
|
19
|
+
margin: 16px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
div.cobalt-layout-stack {
|
|
24
|
+
@include bg-color(primary);
|
|
25
|
+
@include border(base);
|
|
26
|
+
margin: var(--cobalt-layout-y-spacing) var(--cobalt-layout-x-spacing);
|
|
27
|
+
|
|
28
|
+
border-radius: border-radius(lg);
|
|
29
|
+
|
|
30
|
+
.cobalt-layout-stack__item {
|
|
31
|
+
@include border-top(base);
|
|
32
|
+
padding: 16px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.cobalt-layout-stack__item:first-of-type {
|
|
36
|
+
border-top: 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
table.cobalt-layout-stack {
|
|
41
|
+
@include border(base);
|
|
42
|
+
border-collapse: separate;
|
|
43
|
+
margin: var(--cobalt-layout-y-spacing) var(--cobalt-layout-x-spacing);
|
|
44
|
+
|
|
45
|
+
border-radius: border-radius(lg);
|
|
46
|
+
|
|
47
|
+
.cobalt-layout-stack__item:first-of-type th,
|
|
48
|
+
tbody:not(thead ~ tbody) .cobalt-layout-stack__item:first-of-type td {
|
|
49
|
+
border-top: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.cobalt-layout-stack__item td,
|
|
53
|
+
.cobalt-layout-stack__item th {
|
|
54
|
+
@include border-top(base);
|
|
55
|
+
padding: 16px 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.cobalt-layout-stack__item th:first-of-type,
|
|
59
|
+
.cobalt-layout-stack__item td:first-of-type {
|
|
60
|
+
padding-left: 16px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.cobalt-layout-stack__item th:last-of-type,
|
|
64
|
+
.cobalt-layout-stack__item td:last-of-type {
|
|
65
|
+
padding-right: 16px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.cobalt-layout-page-title {
|
|
70
|
+
@include c-text-title-lg;
|
|
71
|
+
padding: 32px var(--cobalt-layout-x-spacing) var(--cobalt-layout-y-spacing)
|
|
72
|
+
var(--cobalt-layout-x-spacing);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.cobalt-layout-section-title {
|
|
76
|
+
@include c-text-title-md;
|
|
77
|
+
padding: 40px var(--cobalt-layout-x-spacing) var(--cobalt-layout-y-spacing)
|
|
78
|
+
var(--cobalt-layout-x-spacing);
|
|
79
|
+
}
|
package/styles/components.scss
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
@import "./components/Flag/index";
|
|
14
14
|
@import "./components/Flash/index";
|
|
15
15
|
@import "./components/Icon/index";
|
|
16
|
+
@import "./components/Layout/Layout";
|
|
16
17
|
@import "./components/Note/index";
|
|
17
18
|
@import "./components/PhotoDropzone/index";
|
|
18
19
|
@import "./components/Pill/index";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type LayoutStackItemPropsType = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
isTable: never;
|
|
5
|
+
isHeader: never;
|
|
6
|
+
} | {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
isHeader?: boolean;
|
|
9
|
+
isTable?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const LayoutStack: {
|
|
12
|
+
({ children, isTable, }: {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
isTable?: boolean | undefined;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
Item: ({ children, isTable }: LayoutStackItemPropsType) => React.JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
export default LayoutStack;
|