@grucloud/bau-ui 0.29.0 → 0.31.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/alert/alert.js +1 -1
- package/button/button.js +2 -2
- package/checkbox/checkbox.js +1 -1
- package/drawer/drawer.js +2 -2
- package/fileInput/fileInput.js +3 -3
- package/globalStyle/globalStyle.js +2 -4
- package/input/input.js +1 -1
- package/modal/modal.js +2 -2
- package/package.json +4 -4
- package/pages/login/index.d.ts +10 -0
- package/pages/login/index.js +1 -0
- package/pages/login/login.js +8 -0
- package/switch/switch.js +2 -2
- package/themeSwitch/themeSwitch.js +6 -6
- package/treeView/treeView.js +12 -8
package/alert/alert.js
CHANGED
package/button/button.js
CHANGED
|
@@ -64,9 +64,9 @@ export default function (context) {
|
|
|
64
64
|
color: var(--color-secondary-darkest);
|
|
65
65
|
`,
|
|
66
66
|
raised: css`
|
|
67
|
-
box-shadow: var(--
|
|
67
|
+
box-shadow: var(--shadow-s);
|
|
68
68
|
&:active {
|
|
69
|
-
box-shadow: var(--
|
|
69
|
+
box-shadow: var(--shadow-m);
|
|
70
70
|
}
|
|
71
71
|
`,
|
|
72
72
|
raisedPrimary: css`
|
package/checkbox/checkbox.js
CHANGED
|
@@ -12,7 +12,7 @@ export default function (context, options = {}) {
|
|
|
12
12
|
outline: none;
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
transition: all var(--transition-fast) ease-in-out;
|
|
15
|
-
box-shadow: var(--
|
|
15
|
+
box-shadow: var(--shadow-s);
|
|
16
16
|
border: 2px solid var(--color-gray-600);
|
|
17
17
|
position: relative;
|
|
18
18
|
&:hover {
|
package/drawer/drawer.js
CHANGED
|
@@ -29,7 +29,7 @@ export default function (context) {
|
|
|
29
29
|
transform: translate(-100%, 0px);
|
|
30
30
|
z-index: 2;
|
|
31
31
|
position: absolute;
|
|
32
|
-
box-shadow: var(--
|
|
32
|
+
box-shadow: var(--shadow-m);
|
|
33
33
|
background-color: var(--background-color);
|
|
34
34
|
top: 0;
|
|
35
35
|
left: 0;
|
|
@@ -39,7 +39,7 @@ export default function (context) {
|
|
|
39
39
|
transform: translate(0%, 0px);
|
|
40
40
|
z-index: 2;
|
|
41
41
|
position: absolute;
|
|
42
|
-
box-shadow: var(--
|
|
42
|
+
box-shadow: var(--shadow-m);
|
|
43
43
|
background-color: var(--background-color);
|
|
44
44
|
top: 0;
|
|
45
45
|
left: 0;
|
package/fileInput/fileInput.js
CHANGED
|
@@ -32,9 +32,9 @@ export default function (context, options = {}) {
|
|
|
32
32
|
align-items: center;
|
|
33
33
|
cursor: pointer;
|
|
34
34
|
border: var(--global-border-width) dotted;
|
|
35
|
-
box-shadow: var(--
|
|
35
|
+
box-shadow: var(--shadow-s);
|
|
36
36
|
&:hover {
|
|
37
|
-
box-shadow: var(--
|
|
37
|
+
box-shadow: var(--shadow-m);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
`,
|
|
@@ -44,7 +44,7 @@ export default function (context, options = {}) {
|
|
|
44
44
|
background-color: var(--color-gray-100);
|
|
45
45
|
border: var(--global-border-width) var(--color-gray-500) dotted;
|
|
46
46
|
&:hover {
|
|
47
|
-
box-shadow: var(--
|
|
47
|
+
box-shadow: var(--shadow-s);
|
|
48
48
|
}
|
|
49
49
|
cursor: not-allowed;
|
|
50
50
|
}
|
|
@@ -95,10 +95,8 @@ export default function globalStyle(
|
|
|
95
95
|
--spacing-horizontal: var(--global-spacing);
|
|
96
96
|
--transition-fast: 200ms;
|
|
97
97
|
--transition-slow: 400ms;
|
|
98
|
-
--
|
|
99
|
-
--
|
|
100
|
-
--global-shadow-tl: 0 12px 28px 0 rgba(0, 0, 0, 0.2),
|
|
101
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
|
98
|
+
--shadow-s: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
|
|
99
|
+
--shadow-m: 0 2px 4px 0 rgba(0, 0, 0, 0.4);
|
|
102
100
|
--font-size-base: 100%;
|
|
103
101
|
--line-height-base: 1.65;
|
|
104
102
|
--link-color: var(--color-primary)
|
package/input/input.js
CHANGED
|
@@ -16,7 +16,7 @@ const createStyles = ({ css, createGlobalStyles }) => {
|
|
|
16
16
|
& input {
|
|
17
17
|
font-size: 1.2rem;
|
|
18
18
|
background: var(--color-emphasis-100);
|
|
19
|
-
box-shadow: var(--
|
|
19
|
+
box-shadow: var(--shadow-s);
|
|
20
20
|
border-radius: var(--global-radius);
|
|
21
21
|
border: var(--input-border-bottom-size) solid transparent;
|
|
22
22
|
border-bottom: var(--input-border-bottom-size) solid
|
package/modal/modal.js
CHANGED
|
@@ -5,7 +5,7 @@ export default function (context) {
|
|
|
5
5
|
const { dialog } = bau.tags;
|
|
6
6
|
|
|
7
7
|
const style = css`
|
|
8
|
-
box-shadow: var(--
|
|
8
|
+
box-shadow: var(--shadow-s);
|
|
9
9
|
background-color: var(--background-color);
|
|
10
10
|
top: 0;
|
|
11
11
|
left: 0;
|
|
@@ -28,7 +28,7 @@ export default function (context) {
|
|
|
28
28
|
display: flex;
|
|
29
29
|
justify-content: flex-end;
|
|
30
30
|
margin: 0px;
|
|
31
|
-
box-shadow: var(--
|
|
31
|
+
box-shadow: var(--shadow-s);
|
|
32
32
|
> * {
|
|
33
33
|
margin: 12px;
|
|
34
34
|
}
|
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.31.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.31.0",
|
|
21
|
+
"@grucloud/bau-css": "^0.31.0"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "1cd3220771a68937b1a9ee8b1c3de7162cbf78f0"
|
|
24
24
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./login";
|
package/switch/switch.js
CHANGED
|
@@ -13,7 +13,7 @@ export default function (context) {
|
|
|
13
13
|
appearance: none;
|
|
14
14
|
outline: none;
|
|
15
15
|
transition: all var(--transition-fast);
|
|
16
|
-
box-shadow: var(--
|
|
16
|
+
box-shadow: var(--shadow-m);
|
|
17
17
|
&::after {
|
|
18
18
|
content: "";
|
|
19
19
|
background: var(--background-color);
|
|
@@ -22,7 +22,7 @@ export default function (context) {
|
|
|
22
22
|
height: 1rem;
|
|
23
23
|
border-radius: 50%;
|
|
24
24
|
position: absolute;
|
|
25
|
-
box-shadow: var(--
|
|
25
|
+
box-shadow: var(--shadow-m);
|
|
26
26
|
background-color: var(--color-gray-700);
|
|
27
27
|
transition: all var(--transition-fast);
|
|
28
28
|
}
|
|
@@ -32,8 +32,11 @@ export default function (context) {
|
|
|
32
32
|
|
|
33
33
|
const style = css`
|
|
34
34
|
position: relative;
|
|
35
|
-
width:
|
|
36
|
-
height:
|
|
35
|
+
width: 2rem;
|
|
36
|
+
height: 2rem;
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
align-items: center;
|
|
37
40
|
border: 1px var(--color-gray-200) dotted;
|
|
38
41
|
border-radius: var(--global-radius);
|
|
39
42
|
appearance: none;
|
|
@@ -48,9 +51,6 @@ export default function (context) {
|
|
|
48
51
|
&::after {
|
|
49
52
|
content: "\u2600";
|
|
50
53
|
font-size: x-large;
|
|
51
|
-
display: block;
|
|
52
|
-
width: 100%;
|
|
53
|
-
text-align: center;
|
|
54
54
|
transition: all var(--transition-fast);
|
|
55
55
|
color: var(--color-emphasis-400);
|
|
56
56
|
}
|
|
@@ -58,7 +58,7 @@ export default function (context) {
|
|
|
58
58
|
}
|
|
59
59
|
&:checked::after {
|
|
60
60
|
content: "\u263D";
|
|
61
|
-
font-size:
|
|
61
|
+
font-size: x-large;
|
|
62
62
|
}
|
|
63
63
|
`;
|
|
64
64
|
|
package/treeView/treeView.js
CHANGED
|
@@ -9,7 +9,6 @@ const createStyles = ({ css, createGlobalStyles }) => {
|
|
|
9
9
|
--menu-color-background-hover: var(--hover-overlay);
|
|
10
10
|
--menu-link-padding-horizontal: 0.75rem;
|
|
11
11
|
--menu-link-padding-vertical: 0.375rem;
|
|
12
|
-
--menu-link-sublist-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 24 24"><path fill="rgba(0,0,0,0.5)" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path></svg>');
|
|
13
12
|
}
|
|
14
13
|
`;
|
|
15
14
|
|
|
@@ -31,15 +30,16 @@ const createStyles = ({ css, createGlobalStyles }) => {
|
|
|
31
30
|
width: 100%;
|
|
32
31
|
display: flex;
|
|
33
32
|
justify-content: space-between;
|
|
33
|
+
align-items: center;
|
|
34
34
|
transition: background-color var(--transition-fast) ease-in-out;
|
|
35
35
|
&:hover {
|
|
36
36
|
background: var(--color-emphasis-100);
|
|
37
|
+
cursor: pointer;
|
|
37
38
|
}
|
|
38
39
|
&::after {
|
|
39
40
|
transition: transform var(--transition-fast) linear;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
padding: 0.5rem;
|
|
41
|
+
font-size: x-large;
|
|
42
|
+
margin-right: 1rem;
|
|
43
43
|
}
|
|
44
44
|
> a,
|
|
45
45
|
span {
|
|
@@ -53,6 +53,10 @@ const createStyles = ({ css, createGlobalStyles }) => {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
|
|
57
|
+
& > ul > li {
|
|
58
|
+
padding-left: 0rem;
|
|
59
|
+
}
|
|
56
60
|
`;
|
|
57
61
|
|
|
58
62
|
return {
|
|
@@ -60,16 +64,15 @@ const createStyles = ({ css, createGlobalStyles }) => {
|
|
|
60
64
|
expanded: css`
|
|
61
65
|
> div {
|
|
62
66
|
&::after {
|
|
63
|
-
content: "";
|
|
64
|
-
transform: rotate(
|
|
67
|
+
content: "\u203A";
|
|
68
|
+
transform: rotate(90deg);
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
71
|
`,
|
|
68
72
|
collapsed: css`
|
|
69
73
|
> div {
|
|
70
74
|
&::after {
|
|
71
|
-
content: "";
|
|
72
|
-
transform: rotate(90deg);
|
|
75
|
+
content: "\u203A";
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
`,
|
|
@@ -83,6 +86,7 @@ export default function (context, { renderMenuItem }) {
|
|
|
83
86
|
const styles = createStyles({ css, createGlobalStyles });
|
|
84
87
|
|
|
85
88
|
const collapseOrExpandSection = ({ element, closeState }) => {
|
|
89
|
+
if (element.scrollHeight == 0) return;
|
|
86
90
|
closeState.val ? collapseSection(element) : expandSection(element);
|
|
87
91
|
};
|
|
88
92
|
|