@yakad/ui 1.2.69-beta → 1.2.71-beta
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/appBar/appBar.module.css +14 -14
- package/appBar/appBar.tsx +15 -15
- package/button/button.module.css +167 -167
- package/button/button.tsx +85 -85
- package/card/card.module.css +11 -11
- package/card/card.tsx +15 -15
- package/clickAwayListener/clickAwayListener.tsx +27 -27
- package/client.tsx +4 -4
- package/codeField/codeField.module.css +23 -23
- package/codeField/codeField.tsx +32 -32
- package/container/container.module.css +24 -24
- package/container/container.tsx +27 -27
- package/footer/footer.module.css +9 -9
- package/footer/footer.tsx +15 -15
- package/form/form.module.css +6 -6
- package/form/form.tsx +23 -23
- package/gridContainer/gridContainer.module.css +5 -5
- package/gridContainer/gridContainer.tsx +28 -28
- package/gridItem/gridItem.module.css +192 -192
- package/gridItem/gridItem.tsx +31 -31
- package/historyBack/historyBack.tsx +20 -20
- package/hr/hr.module.css +19 -19
- package/hr/hr.tsx +32 -32
- package/index.tsx +46 -46
- package/inputField/inputField.module.css +167 -167
- package/inputField/inputField.tsx +38 -38
- package/list/list.module.css +22 -22
- package/list/list.tsx +25 -25
- package/listItem/listItem.module.css +6 -6
- package/listItem/listItem.tsx +12 -12
- package/loading/loading.module.css +91 -91
- package/loading/loading.tsx +25 -25
- package/main/main.module.css +19 -19
- package/main/main.tsx +25 -25
- package/navigation/navigation.module.css +61 -58
- package/navigation/navigation.tsx +24 -24
- package/package.json +32 -32
- package/page/page.module.css +10 -10
- package/page/page.tsx +15 -15
- package/row/row.module.css +7 -7
- package/row/row.tsx +15 -15
- package/spacer/spacer.module.css +5 -5
- package/spacer/spacer.tsx +8 -8
- package/stack/stack.module.css +6 -6
- package/stack/stack.tsx +15 -15
- package/svgIcon/svgIcon.module.css +5 -5
- package/svgIcon/svgIcon.tsx +26 -26
- package/theme/theme.module.css +397 -397
- package/theme/theme.tsx +29 -29
- package/theme/zoom.css +3 -3
- package/tsconfig.json +13 -13
- package/appBar/appBar.d.ts +0 -3
- package/appBar/appBar.js +0 -9
- package/appBar/appBar.js.map +0 -1
- package/button/button.d.ts +0 -14
- package/button/button.js +0 -25
- package/button/button.js.map +0 -1
- package/card/card.d.ts +0 -3
- package/card/card.js +0 -9
- package/card/card.js.map +0 -1
- package/clickAwayListener/clickAwayListener.d.ts +0 -6
- package/clickAwayListener/clickAwayListener.js +0 -17
- package/clickAwayListener/clickAwayListener.js.map +0 -1
- package/client.d.ts +0 -3
- package/client.js +0 -4
- package/client.js.map +0 -1
- package/codeField/codeField.d.ts +0 -8
- package/codeField/codeField.js +0 -10
- package/codeField/codeField.js.map +0 -1
- package/container/container.d.ts +0 -8
- package/container/container.js +0 -9
- package/container/container.js.map +0 -1
- package/footer/footer.d.ts +0 -3
- package/footer/footer.js +0 -9
- package/footer/footer.js.map +0 -1
- package/form/form.d.ts +0 -3
- package/form/form.js +0 -12
- package/form/form.js.map +0 -1
- package/gridContainer/gridContainer.d.ts +0 -7
- package/gridContainer/gridContainer.js +0 -11
- package/gridContainer/gridContainer.js.map +0 -1
- package/gridItem/gridItem.d.ts +0 -10
- package/gridItem/gridItem.js +0 -10
- package/gridItem/gridItem.js.map +0 -1
- package/historyBack/historyBack.d.ts +0 -3
- package/historyBack/historyBack.js +0 -11
- package/historyBack/historyBack.js.map +0 -1
- package/hr/hr.d.ts +0 -8
- package/hr/hr.js +0 -12
- package/hr/hr.js.map +0 -1
- package/index.d.ts +0 -23
- package/index.js +0 -24
- package/index.js.map +0 -1
- package/inputField/inputField.d.ts +0 -12
- package/inputField/inputField.js +0 -11
- package/inputField/inputField.js.map +0 -1
- package/list/list.d.ts +0 -7
- package/list/list.js +0 -9
- package/list/list.js.map +0 -1
- package/listItem/listItem.d.ts +0 -3
- package/listItem/listItem.js +0 -7
- package/listItem/listItem.js.map +0 -1
- package/loading/loading.d.ts +0 -7
- package/loading/loading.js +0 -10
- package/loading/loading.js.map +0 -1
- package/main/main.d.ts +0 -6
- package/main/main.js +0 -10
- package/main/main.js.map +0 -1
- package/navigation/navigation.d.ts +0 -7
- package/navigation/navigation.js +0 -9
- package/navigation/navigation.js.map +0 -1
- package/page/page.d.ts +0 -3
- package/page/page.js +0 -9
- package/page/page.js.map +0 -1
- package/row/row.d.ts +0 -3
- package/row/row.js +0 -9
- package/row/row.js.map +0 -1
- package/spacer/spacer.d.ts +0 -3
- package/spacer/spacer.js +0 -7
- package/spacer/spacer.js.map +0 -1
- package/stack/stack.d.ts +0 -3
- package/stack/stack.js +0 -9
- package/stack/stack.js.map +0 -1
- package/svgIcon/svgIcon.d.ts +0 -6
- package/svgIcon/svgIcon.js +0 -12
- package/svgIcon/svgIcon.js.map +0 -1
- package/theme/theme.d.ts +0 -9
- package/theme/theme.js +0 -12
- package/theme/theme.js.map +0 -1
package/appBar/appBar.module.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
.header {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
align-items: center;
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 5rem;
|
|
8
|
-
padding: 0 2rem;
|
|
9
|
-
border-bottom: 0.1rem solid #7d7d7d40;
|
|
10
|
-
background: rgb(var(--surfaceContainerColor, 243 237 247));
|
|
11
|
-
color: rgb(var(--onSurfaceColor, 28 27 31));
|
|
12
|
-
fill: rgb(var(--onSurfaceColor, 28 27 31));
|
|
13
|
-
user-select: none;
|
|
14
|
-
}
|
|
1
|
+
.header {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
align-items: center;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 5rem;
|
|
8
|
+
padding: 0 2rem;
|
|
9
|
+
border-bottom: 0.1rem solid #7d7d7d40;
|
|
10
|
+
background: rgb(var(--surfaceContainerColor, 243 237 247));
|
|
11
|
+
color: rgb(var(--onSurfaceColor, 28 27 31));
|
|
12
|
+
fill: rgb(var(--onSurfaceColor, 28 27 31));
|
|
13
|
+
user-select: none;
|
|
14
|
+
}
|
package/appBar/appBar.tsx
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { joinClassNames, joinStyles } from "@yakad/lib";
|
|
3
|
-
import styles from "./appBar.module.css";
|
|
4
|
-
|
|
5
|
-
function AppBar(props: React.HTMLAttributes<HTMLElement>) {
|
|
6
|
-
const joinedClassNames = joinClassNames(styles.header, props.className!);
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<header {...props} className={joinedClassNames}>
|
|
10
|
-
{props.children}
|
|
11
|
-
</header>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default AppBar;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames, joinStyles } from "@yakad/lib";
|
|
3
|
+
import styles from "./appBar.module.css";
|
|
4
|
+
|
|
5
|
+
function AppBar(props: React.HTMLAttributes<HTMLElement>) {
|
|
6
|
+
const joinedClassNames = joinClassNames(styles.header, props.className!);
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<header {...props} className={joinedClassNames}>
|
|
10
|
+
{props.children}
|
|
11
|
+
</header>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default AppBar;
|
package/button/button.module.css
CHANGED
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
.button {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
line-height: 3rem;
|
|
6
|
-
font-weight: 700;
|
|
7
|
-
padding: 0 var(--padding);
|
|
8
|
-
border: none;
|
|
9
|
-
background: none;
|
|
10
|
-
color: inherit;
|
|
11
|
-
fill: inherit;
|
|
12
|
-
user-select: none;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
}
|
|
16
|
-
.small {
|
|
17
|
-
min-width: 3rem;
|
|
18
|
-
height: 3rem;
|
|
19
|
-
--padding: 2rem;
|
|
20
|
-
gap: 0.4rem;
|
|
21
|
-
font-size: 1.2rem;
|
|
22
|
-
--border-radius: 1.5rem;
|
|
23
|
-
}
|
|
24
|
-
.medium {
|
|
25
|
-
min-width: 4rem;
|
|
26
|
-
height: 4rem;
|
|
27
|
-
--padding: 2.4rem;
|
|
28
|
-
gap: 0.8rem;
|
|
29
|
-
font-size: 1.4rem;
|
|
30
|
-
--border-radius: 2rem;
|
|
31
|
-
}
|
|
32
|
-
.large {
|
|
33
|
-
min-width: 5rem;
|
|
34
|
-
height: 5rem;
|
|
35
|
-
--padding: 3.2rem;
|
|
36
|
-
gap: 1.1rem;
|
|
37
|
-
font-size: 1.8rem;
|
|
38
|
-
--border-radius: 2.5rem;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.iconButton {
|
|
42
|
-
padding: 0;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.none {
|
|
47
|
-
border-radius: 0;
|
|
48
|
-
}
|
|
49
|
-
.semi {
|
|
50
|
-
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
51
|
-
}
|
|
52
|
-
[dir="rtl"] .semi {
|
|
53
|
-
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
|
54
|
-
}
|
|
55
|
-
.rounded {
|
|
56
|
-
border-radius: var(--border-radius);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@media (pointer: fine) {
|
|
60
|
-
.button:hover {
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
box-shadow: inset 0 0 10rem #00000010;
|
|
63
|
-
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
.button:active {
|
|
67
|
-
box-shadow: inset 0 0 10rem #7d7d7d30;
|
|
68
|
-
}
|
|
69
|
-
.button:invalid {
|
|
70
|
-
border: 0.1rem solid rgb(var(--errorColor, 179 38 30));
|
|
71
|
-
}
|
|
72
|
-
.text {
|
|
73
|
-
color: rgb(var(--primaryColor, 11 87 208));
|
|
74
|
-
fill: rgb(var(--primaryColor, 11 87 208));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.outlined {
|
|
78
|
-
color: rgb(var(--primaryColor, 11 87 208));
|
|
79
|
-
fill: rgb(var(--primaryColor, 11 87 208));
|
|
80
|
-
border: 0.1rem solid #7d7d7d70;
|
|
81
|
-
}
|
|
82
|
-
.filled {
|
|
83
|
-
background: rgb(var(--primaryColor, 11 87 208));
|
|
84
|
-
color: rgb(var(--onPrimaryColor, 255 255 255));
|
|
85
|
-
fill: rgb(var(--onPrimaryColor, 255 255 255));
|
|
86
|
-
}
|
|
87
|
-
.filledtonal {
|
|
88
|
-
background: rgb(var(--primaryContainerColor, 211 227 253));
|
|
89
|
-
color: rgb(var(--onPrimaryContainerColor, 4 30 73));
|
|
90
|
-
fill: rgb(var(--onPrimaryContainerColor, 4 30 73));
|
|
91
|
-
}
|
|
92
|
-
.tonal {
|
|
93
|
-
background: rgb(var(--tertiaryColor, 196 238 208));
|
|
94
|
-
color: rgb(var(--onTertiaryColor, 7 39 17));
|
|
95
|
-
fill: rgb(var(--onTertiaryColor, 7 39 17));
|
|
96
|
-
}
|
|
97
|
-
.elevated {
|
|
98
|
-
background-color: rgb(var(--onSecondaryColor, 255 255 255));
|
|
99
|
-
color: rgb(var(--primaryColor, 11 87 208));
|
|
100
|
-
fill: rgb(var(--primaryColor, 11 87 208));
|
|
101
|
-
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
|
|
102
|
-
}
|
|
103
|
-
.link {
|
|
104
|
-
background: transparent;
|
|
105
|
-
display: flex;
|
|
106
|
-
position: relative;
|
|
107
|
-
transition: 0.3s;
|
|
108
|
-
}
|
|
109
|
-
.fab {
|
|
110
|
-
border-radius: 1.3rem;
|
|
111
|
-
height: 5.6rem;
|
|
112
|
-
min-width: unset;
|
|
113
|
-
padding: 1.6rem;
|
|
114
|
-
font-size: 1.6rem;
|
|
115
|
-
background: rgb(var(--primaryContainerColor, 211 227 253));
|
|
116
|
-
color: rgb(var(--onPrimaryContainerColor, 4 30 73));
|
|
117
|
-
fill: rgb(var(--onPrimaryContainerColor, 4, 30, 73));
|
|
118
|
-
}
|
|
119
|
-
.link:before {
|
|
120
|
-
content: "";
|
|
121
|
-
position: absolute;
|
|
122
|
-
bottom: 0.5rem;
|
|
123
|
-
left: 0;
|
|
124
|
-
right: 0;
|
|
125
|
-
width: 0;
|
|
126
|
-
height: 0.1rem;
|
|
127
|
-
padding: 0;
|
|
128
|
-
margin: 0 auto;
|
|
129
|
-
background-color: rgb(var(--primaryColor, 30 100 212));
|
|
130
|
-
transition: 0.3s;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.link:hover {
|
|
134
|
-
box-shadow: none;
|
|
135
|
-
}
|
|
136
|
-
.link:hover:before {
|
|
137
|
-
width: calc(100% - var(--padding));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.loadingPositionCenter:disabled {
|
|
141
|
-
color: transparent;
|
|
142
|
-
fill: transparent;
|
|
143
|
-
}
|
|
144
|
-
.positionCenter {
|
|
145
|
-
position: absolute;
|
|
146
|
-
left: 50%;
|
|
147
|
-
transform: translate(-50%);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.button:disabled {
|
|
151
|
-
cursor: default;
|
|
152
|
-
box-shadow: none;
|
|
153
|
-
box-shadow: inset 0 0 10rem #7d7d7d20;
|
|
154
|
-
}
|
|
155
|
-
.button.link:disabled:before {
|
|
156
|
-
display: none;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.loading .displayOnDisabled {
|
|
160
|
-
display: none;
|
|
161
|
-
}
|
|
162
|
-
.loading:disabled .displayOnDisabled {
|
|
163
|
-
display: block;
|
|
164
|
-
}
|
|
165
|
-
.loading:disabled .hideOnDisabled {
|
|
166
|
-
display: none;
|
|
167
|
-
}
|
|
1
|
+
.button {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
line-height: 3rem;
|
|
6
|
+
font-weight: 700;
|
|
7
|
+
padding: 0 var(--padding);
|
|
8
|
+
border: none;
|
|
9
|
+
background: none;
|
|
10
|
+
color: inherit;
|
|
11
|
+
fill: inherit;
|
|
12
|
+
user-select: none;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
.small {
|
|
17
|
+
min-width: 3rem;
|
|
18
|
+
height: 3rem;
|
|
19
|
+
--padding: 2rem;
|
|
20
|
+
gap: 0.4rem;
|
|
21
|
+
font-size: 1.2rem;
|
|
22
|
+
--border-radius: 1.5rem;
|
|
23
|
+
}
|
|
24
|
+
.medium {
|
|
25
|
+
min-width: 4rem;
|
|
26
|
+
height: 4rem;
|
|
27
|
+
--padding: 2.4rem;
|
|
28
|
+
gap: 0.8rem;
|
|
29
|
+
font-size: 1.4rem;
|
|
30
|
+
--border-radius: 2rem;
|
|
31
|
+
}
|
|
32
|
+
.large {
|
|
33
|
+
min-width: 5rem;
|
|
34
|
+
height: 5rem;
|
|
35
|
+
--padding: 3.2rem;
|
|
36
|
+
gap: 1.1rem;
|
|
37
|
+
font-size: 1.8rem;
|
|
38
|
+
--border-radius: 2.5rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.iconButton {
|
|
42
|
+
padding: 0;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.none {
|
|
47
|
+
border-radius: 0;
|
|
48
|
+
}
|
|
49
|
+
.semi {
|
|
50
|
+
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
51
|
+
}
|
|
52
|
+
[dir="rtl"] .semi {
|
|
53
|
+
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
|
54
|
+
}
|
|
55
|
+
.rounded {
|
|
56
|
+
border-radius: var(--border-radius);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (pointer: fine) {
|
|
60
|
+
.button:hover {
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
box-shadow: inset 0 0 10rem #00000010;
|
|
63
|
+
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
.button:active {
|
|
67
|
+
box-shadow: inset 0 0 10rem #7d7d7d30;
|
|
68
|
+
}
|
|
69
|
+
.button:invalid {
|
|
70
|
+
border: 0.1rem solid rgb(var(--errorColor, 179 38 30));
|
|
71
|
+
}
|
|
72
|
+
.text {
|
|
73
|
+
color: rgb(var(--primaryColor, 11 87 208));
|
|
74
|
+
fill: rgb(var(--primaryColor, 11 87 208));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.outlined {
|
|
78
|
+
color: rgb(var(--primaryColor, 11 87 208));
|
|
79
|
+
fill: rgb(var(--primaryColor, 11 87 208));
|
|
80
|
+
border: 0.1rem solid #7d7d7d70;
|
|
81
|
+
}
|
|
82
|
+
.filled {
|
|
83
|
+
background: rgb(var(--primaryColor, 11 87 208));
|
|
84
|
+
color: rgb(var(--onPrimaryColor, 255 255 255));
|
|
85
|
+
fill: rgb(var(--onPrimaryColor, 255 255 255));
|
|
86
|
+
}
|
|
87
|
+
.filledtonal {
|
|
88
|
+
background: rgb(var(--primaryContainerColor, 211 227 253));
|
|
89
|
+
color: rgb(var(--onPrimaryContainerColor, 4 30 73));
|
|
90
|
+
fill: rgb(var(--onPrimaryContainerColor, 4 30 73));
|
|
91
|
+
}
|
|
92
|
+
.tonal {
|
|
93
|
+
background: rgb(var(--tertiaryColor, 196 238 208));
|
|
94
|
+
color: rgb(var(--onTertiaryColor, 7 39 17));
|
|
95
|
+
fill: rgb(var(--onTertiaryColor, 7 39 17));
|
|
96
|
+
}
|
|
97
|
+
.elevated {
|
|
98
|
+
background-color: rgb(var(--onSecondaryColor, 255 255 255));
|
|
99
|
+
color: rgb(var(--primaryColor, 11 87 208));
|
|
100
|
+
fill: rgb(var(--primaryColor, 11 87 208));
|
|
101
|
+
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
|
|
102
|
+
}
|
|
103
|
+
.link {
|
|
104
|
+
background: transparent;
|
|
105
|
+
display: flex;
|
|
106
|
+
position: relative;
|
|
107
|
+
transition: 0.3s;
|
|
108
|
+
}
|
|
109
|
+
.fab {
|
|
110
|
+
border-radius: 1.3rem;
|
|
111
|
+
height: 5.6rem;
|
|
112
|
+
min-width: unset;
|
|
113
|
+
padding: 1.6rem;
|
|
114
|
+
font-size: 1.6rem;
|
|
115
|
+
background: rgb(var(--primaryContainerColor, 211 227 253));
|
|
116
|
+
color: rgb(var(--onPrimaryContainerColor, 4 30 73));
|
|
117
|
+
fill: rgb(var(--onPrimaryContainerColor, 4, 30, 73));
|
|
118
|
+
}
|
|
119
|
+
.link:before {
|
|
120
|
+
content: "";
|
|
121
|
+
position: absolute;
|
|
122
|
+
bottom: 0.5rem;
|
|
123
|
+
left: 0;
|
|
124
|
+
right: 0;
|
|
125
|
+
width: 0;
|
|
126
|
+
height: 0.1rem;
|
|
127
|
+
padding: 0;
|
|
128
|
+
margin: 0 auto;
|
|
129
|
+
background-color: rgb(var(--primaryColor, 30 100 212));
|
|
130
|
+
transition: 0.3s;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.link:hover {
|
|
134
|
+
box-shadow: none;
|
|
135
|
+
}
|
|
136
|
+
.link:hover:before {
|
|
137
|
+
width: calc(100% - var(--padding));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.loadingPositionCenter:disabled {
|
|
141
|
+
color: transparent;
|
|
142
|
+
fill: transparent;
|
|
143
|
+
}
|
|
144
|
+
.positionCenter {
|
|
145
|
+
position: absolute;
|
|
146
|
+
left: 50%;
|
|
147
|
+
transform: translate(-50%);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.button:disabled {
|
|
151
|
+
cursor: default;
|
|
152
|
+
box-shadow: none;
|
|
153
|
+
box-shadow: inset 0 0 10rem #7d7d7d20;
|
|
154
|
+
}
|
|
155
|
+
.button.link:disabled:before {
|
|
156
|
+
display: none;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.loading .displayOnDisabled {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
.loading:disabled .displayOnDisabled {
|
|
163
|
+
display: block;
|
|
164
|
+
}
|
|
165
|
+
.loading:disabled .hideOnDisabled {
|
|
166
|
+
display: none;
|
|
167
|
+
}
|
package/button/button.tsx
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { joinClassNames } from "@yakad/lib";
|
|
3
|
-
import styles from "./button.module.css";
|
|
4
|
-
import SvgIcon from "../svgIcon/svgIcon";
|
|
5
|
-
import Loading from "../loading/loading";
|
|
6
|
-
|
|
7
|
-
interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
size?: "small" | "medium" | "large";
|
|
10
|
-
variant?:
|
|
11
|
-
| "text"
|
|
12
|
-
| "outlined"
|
|
13
|
-
| "filled"
|
|
14
|
-
| "filledtonal"
|
|
15
|
-
| "tonal"
|
|
16
|
-
| "elevated"
|
|
17
|
-
| "link"
|
|
18
|
-
| "fab";
|
|
19
|
-
borderStyle?: "none" | "semi" | "rounded";
|
|
20
|
-
icon?: JSX.Element;
|
|
21
|
-
iconPosition?: "start" | "end";
|
|
22
|
-
loadingPosition?: "default" | "center";
|
|
23
|
-
loadingVariant?: "scaleOut" | "dots" | "spinner";
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
interface svgSizeMap {
|
|
28
|
-
small: number;
|
|
29
|
-
medium: number;
|
|
30
|
-
large: number;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const svgSizeMaps: svgSizeMap = {
|
|
34
|
-
small: 2,
|
|
35
|
-
medium: 2.4,
|
|
36
|
-
large: 3,
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
function Button(props: ButtonProps) {
|
|
40
|
-
const startChildren = props.iconPosition === "end";
|
|
41
|
-
const centerLoading =
|
|
42
|
-
!props.icon || (props.loading && props.loadingPosition === "center");
|
|
43
|
-
|
|
44
|
-
const joinedClassNames = joinClassNames(
|
|
45
|
-
styles.button,
|
|
46
|
-
props.loading ? styles.loading : "",
|
|
47
|
-
props.variant ? styles[props.variant] : styles.text,
|
|
48
|
-
props.loading && centerLoading ? styles.loadingPositionCenter : "",
|
|
49
|
-
props.size ? styles[props.size] : styles.medium,
|
|
50
|
-
props.borderStyle ? styles[props.borderStyle] : styles.rounded,
|
|
51
|
-
props.icon && !props.children ? styles.iconButton : "",
|
|
52
|
-
props.className!
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<button {...props} className={joinedClassNames}>
|
|
57
|
-
{startChildren ? props.children : null}
|
|
58
|
-
{props.loading ? (
|
|
59
|
-
<div
|
|
60
|
-
className={joinClassNames(
|
|
61
|
-
centerLoading ? styles.positionCenter : "",
|
|
62
|
-
styles.displayOnDisabled
|
|
63
|
-
)}
|
|
64
|
-
>
|
|
65
|
-
<Loading size={props.size} variant={props.loadingVariant} />
|
|
66
|
-
</div>
|
|
67
|
-
) : null}
|
|
68
|
-
{props.icon ? (
|
|
69
|
-
<SvgIcon
|
|
70
|
-
className={styles.hideOnDisabled}
|
|
71
|
-
size={
|
|
72
|
-
props.size
|
|
73
|
-
? svgSizeMaps[props.size]
|
|
74
|
-
: svgSizeMaps.medium
|
|
75
|
-
}
|
|
76
|
-
>
|
|
77
|
-
{props.icon}
|
|
78
|
-
</SvgIcon>
|
|
79
|
-
) : null}
|
|
80
|
-
{!startChildren ? props.children : null}
|
|
81
|
-
</button>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export default Button;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames } from "@yakad/lib";
|
|
3
|
+
import styles from "./button.module.css";
|
|
4
|
+
import SvgIcon from "../svgIcon/svgIcon";
|
|
5
|
+
import Loading from "../loading/loading";
|
|
6
|
+
|
|
7
|
+
interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
size?: "small" | "medium" | "large";
|
|
10
|
+
variant?:
|
|
11
|
+
| "text"
|
|
12
|
+
| "outlined"
|
|
13
|
+
| "filled"
|
|
14
|
+
| "filledtonal"
|
|
15
|
+
| "tonal"
|
|
16
|
+
| "elevated"
|
|
17
|
+
| "link"
|
|
18
|
+
| "fab";
|
|
19
|
+
borderStyle?: "none" | "semi" | "rounded";
|
|
20
|
+
icon?: JSX.Element;
|
|
21
|
+
iconPosition?: "start" | "end";
|
|
22
|
+
loadingPosition?: "default" | "center";
|
|
23
|
+
loadingVariant?: "scaleOut" | "dots" | "spinner";
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface svgSizeMap {
|
|
28
|
+
small: number;
|
|
29
|
+
medium: number;
|
|
30
|
+
large: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const svgSizeMaps: svgSizeMap = {
|
|
34
|
+
small: 2,
|
|
35
|
+
medium: 2.4,
|
|
36
|
+
large: 3,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
function Button(props: ButtonProps) {
|
|
40
|
+
const startChildren = props.iconPosition === "end";
|
|
41
|
+
const centerLoading =
|
|
42
|
+
!props.icon || (props.loading && props.loadingPosition === "center");
|
|
43
|
+
|
|
44
|
+
const joinedClassNames = joinClassNames(
|
|
45
|
+
styles.button,
|
|
46
|
+
props.loading ? styles.loading : "",
|
|
47
|
+
props.variant ? styles[props.variant] : styles.text,
|
|
48
|
+
props.loading && centerLoading ? styles.loadingPositionCenter : "",
|
|
49
|
+
props.size ? styles[props.size] : styles.medium,
|
|
50
|
+
props.borderStyle ? styles[props.borderStyle] : styles.rounded,
|
|
51
|
+
props.icon && !props.children ? styles.iconButton : "",
|
|
52
|
+
props.className!
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<button {...props} className={joinedClassNames}>
|
|
57
|
+
{startChildren ? props.children : null}
|
|
58
|
+
{props.loading ? (
|
|
59
|
+
<div
|
|
60
|
+
className={joinClassNames(
|
|
61
|
+
centerLoading ? styles.positionCenter : "",
|
|
62
|
+
styles.displayOnDisabled
|
|
63
|
+
)}
|
|
64
|
+
>
|
|
65
|
+
<Loading size={props.size} variant={props.loadingVariant} />
|
|
66
|
+
</div>
|
|
67
|
+
) : null}
|
|
68
|
+
{props.icon ? (
|
|
69
|
+
<SvgIcon
|
|
70
|
+
className={styles.hideOnDisabled}
|
|
71
|
+
size={
|
|
72
|
+
props.size
|
|
73
|
+
? svgSizeMaps[props.size]
|
|
74
|
+
: svgSizeMaps.medium
|
|
75
|
+
}
|
|
76
|
+
>
|
|
77
|
+
{props.icon}
|
|
78
|
+
</SvgIcon>
|
|
79
|
+
) : null}
|
|
80
|
+
{!startChildren ? props.children : null}
|
|
81
|
+
</button>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export default Button;
|
package/card/card.module.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.card {
|
|
2
|
-
width: 100%;
|
|
3
|
-
padding: 3rem;
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
border-radius: 2rem;
|
|
6
|
-
background: rgb(var(--surfaceContainerHighestColor, 230 224 233));
|
|
7
|
-
color: rgb(var(--onSurfaceColor, 28 27 31));
|
|
8
|
-
fill: rgb(var(--onSurfaceColor, 28 27 31));
|
|
9
|
-
box-shadow: 0px 3px 3px -2px rgb(0 0 0 / 20%),
|
|
10
|
-
0px 3px 4px 0px rgb(0 0 0 / 14%), 0px 1px 8px 0px rgb(0 0 0 / 12%);
|
|
11
|
-
}
|
|
1
|
+
.card {
|
|
2
|
+
width: 100%;
|
|
3
|
+
padding: 3rem;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
border-radius: 2rem;
|
|
6
|
+
background: rgb(var(--surfaceContainerHighestColor, 230 224 233));
|
|
7
|
+
color: rgb(var(--onSurfaceColor, 28 27 31));
|
|
8
|
+
fill: rgb(var(--onSurfaceColor, 28 27 31));
|
|
9
|
+
box-shadow: 0px 3px 3px -2px rgb(0 0 0 / 20%),
|
|
10
|
+
0px 3px 4px 0px rgb(0 0 0 / 14%), 0px 1px 8px 0px rgb(0 0 0 / 12%);
|
|
11
|
+
}
|
package/card/card.tsx
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { joinClassNames } from "@yakad/lib";
|
|
3
|
-
import styles from "./card.module.css";
|
|
4
|
-
|
|
5
|
-
function Card(props: React.HTMLAttributes<HTMLElement>) {
|
|
6
|
-
const joinedClassNames = joinClassNames(styles.card, props.className!);
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<div {...props} className={joinedClassNames}>
|
|
10
|
-
{props.children}
|
|
11
|
-
</div>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default Card;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames } from "@yakad/lib";
|
|
3
|
+
import styles from "./card.module.css";
|
|
4
|
+
|
|
5
|
+
function Card(props: React.HTMLAttributes<HTMLElement>) {
|
|
6
|
+
const joinedClassNames = joinClassNames(styles.card, props.className!);
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<div {...props} className={joinedClassNames}>
|
|
10
|
+
{props.children}
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default Card;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from "react";
|
|
2
|
-
|
|
3
|
-
interface ClickAwayListenerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
onClickAway: React.MouseEventHandler<HTMLDivElement>;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function ClickAwayListener(props: ClickAwayListenerProps) {
|
|
8
|
-
const ref = useRef(null);
|
|
9
|
-
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
const handleOutSideClick = (event: MouseEvent) => {
|
|
12
|
-
if (ref.current && !(ref.current as any).contains(event.target)) {
|
|
13
|
-
props.onClickAway && props.onClickAway(event as any);
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
document.addEventListener("click", handleOutSideClick, true);
|
|
18
|
-
|
|
19
|
-
// CleanUp When element unmount
|
|
20
|
-
return () =>
|
|
21
|
-
document.removeEventListener("click", handleOutSideClick, true);
|
|
22
|
-
}, [props.onClickAway]);
|
|
23
|
-
|
|
24
|
-
return <div ref={ref}>{props.children}</div>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default ClickAwayListener;
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
|
+
|
|
3
|
+
interface ClickAwayListenerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
onClickAway: React.MouseEventHandler<HTMLDivElement>;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function ClickAwayListener(props: ClickAwayListenerProps) {
|
|
8
|
+
const ref = useRef(null);
|
|
9
|
+
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const handleOutSideClick = (event: MouseEvent) => {
|
|
12
|
+
if (ref.current && !(ref.current as any).contains(event.target)) {
|
|
13
|
+
props.onClickAway && props.onClickAway(event as any);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
document.addEventListener("click", handleOutSideClick, true);
|
|
18
|
+
|
|
19
|
+
// CleanUp When element unmount
|
|
20
|
+
return () =>
|
|
21
|
+
document.removeEventListener("click", handleOutSideClick, true);
|
|
22
|
+
}, [props.onClickAway]);
|
|
23
|
+
|
|
24
|
+
return <div ref={ref}>{props.children}</div>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default ClickAwayListener;
|