@grucloud/bau-ui 0.23.0 → 0.24.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/alertStack/alertStack.js +1 -1
- package/button/button.js +3 -3
- package/{utils → globalStyle}/globalStyle.js +17 -6
- package/globalStyle/index.js +1 -0
- package/input/input.js +3 -3
- package/package.json +4 -4
- package/tabs/tabs.js +1 -1
package/alertStack/alertStack.js
CHANGED
package/button/button.js
CHANGED
|
@@ -62,7 +62,7 @@ export default function (context, options = {}) {
|
|
|
62
62
|
color: var(--color-primary);
|
|
63
63
|
`,
|
|
64
64
|
flatAccent: css`
|
|
65
|
-
color: var(--color-secondary);
|
|
65
|
+
color: var(--color-secondary-darkest);
|
|
66
66
|
`,
|
|
67
67
|
raised: css`
|
|
68
68
|
box-shadow: var(--global-shadow-lw);
|
|
@@ -71,11 +71,11 @@ export default function (context, options = {}) {
|
|
|
71
71
|
}
|
|
72
72
|
`,
|
|
73
73
|
raisedPrimary: css`
|
|
74
|
-
background-color: var(--color-primary);
|
|
74
|
+
background-color: var(--color-primary-darkest);
|
|
75
75
|
color: var(--color-content-inverse);
|
|
76
76
|
`,
|
|
77
77
|
raisedAccent: css`
|
|
78
|
-
background-color: var(--color-secondary);
|
|
78
|
+
background-color: var(--color-secondary-darkest);
|
|
79
79
|
color: var(--color-content-inverse);
|
|
80
80
|
`,
|
|
81
81
|
disabled: css`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ColorPaletteDefault = [
|
|
2
2
|
["primary", { h: "230", s: "48%", l: "47%" }],
|
|
3
3
|
["secondary", { h: "338", s: "100%", l: "48%" }],
|
|
4
4
|
["success", { h: "120", s: "100%", l: "32%" }],
|
|
@@ -14,8 +14,8 @@ const SHADES_LIGHT = [
|
|
|
14
14
|
];
|
|
15
15
|
const SHADES_DARK = [
|
|
16
16
|
["dark", "0.9"],
|
|
17
|
-
["darker", "0.
|
|
18
|
-
["darkest", "0.
|
|
17
|
+
["darker", "0.7"],
|
|
18
|
+
["darkest", "0.5"],
|
|
19
19
|
];
|
|
20
20
|
|
|
21
21
|
const buildGrays = () =>
|
|
@@ -55,7 +55,10 @@ const buildColor = ([color, { h, s, l }]) =>
|
|
|
55
55
|
`--color-${color}-contrast-foreground: hsl(var(--color-${color}-h), var(--color-${color}-s), calc(var(--color-${color}-l) * var(--contrast-foreground-value)));`,
|
|
56
56
|
].join("\n");
|
|
57
57
|
|
|
58
|
-
export function globalStyle(
|
|
58
|
+
export default function globalStyle(
|
|
59
|
+
{ createGlobalStyles },
|
|
60
|
+
{ colorPalette = ColorPaletteDefault } = {}
|
|
61
|
+
) {
|
|
59
62
|
createGlobalStyles`
|
|
60
63
|
:root {
|
|
61
64
|
--color-scheme: light;
|
|
@@ -65,7 +68,7 @@ export function globalStyle({ createGlobalStyles }) {
|
|
|
65
68
|
--contrast-foreground-dark-value: 90%;
|
|
66
69
|
--color-white: #fff;
|
|
67
70
|
--color-black: #000;
|
|
68
|
-
${
|
|
71
|
+
${colorPalette.map(([color, hsl]) => buildColor([color, hsl])).join("\n")}
|
|
69
72
|
${buildGrays()}
|
|
70
73
|
${buildEmphasis()}
|
|
71
74
|
--color-content: hsl(0, 0%, 10%);
|
|
@@ -76,7 +79,7 @@ export function globalStyle({ createGlobalStyles }) {
|
|
|
76
79
|
--global-border-width: 1px;
|
|
77
80
|
--global-radius: 0.4rem;
|
|
78
81
|
--font-color-base: var(--color-content);
|
|
79
|
-
--font-color-disabled: var(--color-emphasis-
|
|
82
|
+
--font-color-disabled: var(--color-emphasis-700);
|
|
80
83
|
--font-color-inverse: var(--color-content-inverse);
|
|
81
84
|
--font-color-secondary: var(--color-content-secondary);
|
|
82
85
|
--font-family: system-ui, -apple-system, Helvetica, Arial, sans-serif;
|
|
@@ -96,5 +99,13 @@ export function globalStyle({ createGlobalStyles }) {
|
|
|
96
99
|
0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
|
97
100
|
}
|
|
98
101
|
@custom-media --narrow-window (max-width: 996px);
|
|
102
|
+
:root {
|
|
103
|
+
font-family: var(--font-family);
|
|
104
|
+
color-scheme: var(--color-scheme);
|
|
105
|
+
color: var(--color-content);
|
|
106
|
+
}
|
|
107
|
+
body {
|
|
108
|
+
margin: 0;
|
|
109
|
+
}
|
|
99
110
|
`;
|
|
100
111
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./globalStyle";
|
package/input/input.js
CHANGED
|
@@ -71,13 +71,13 @@ const createStyles = ({ css, createGlobalStyles }) => {
|
|
|
71
71
|
}
|
|
72
72
|
`,
|
|
73
73
|
error: css`
|
|
74
|
-
color: var(--color-danger) !important;
|
|
74
|
+
color: var(--color-danger-darkest) !important;
|
|
75
75
|
& * {
|
|
76
|
-
color: var(--color-danger) !important;
|
|
76
|
+
color: var(--color-danger-darkest) !important;
|
|
77
77
|
}
|
|
78
78
|
& input {
|
|
79
79
|
border-bottom: var(--input-border-bottom-size) dashed
|
|
80
|
-
var(--color-danger) !important;
|
|
80
|
+
var(--color-danger-darkest) !important;
|
|
81
81
|
}
|
|
82
82
|
`,
|
|
83
83
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grucloud/bau-ui",
|
|
3
3
|
"description": "Components library built with Bau",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.24.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BSD",
|
|
7
7
|
"keywords": [
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"url": "git@github.com:grucloud/bau.git"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@grucloud/bau": "^0.
|
|
21
|
-
"@grucloud/bau-css": "^0.
|
|
20
|
+
"@grucloud/bau": "^0.24.0",
|
|
21
|
+
"@grucloud/bau-css": "^0.24.0"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "fef7cd2b409a192927fba381fd8d57e354bc96ad"
|
|
24
24
|
}
|