@yakad/ui 1.0.0 → 1.0.2
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/declaration.d.ts +1 -0
- package/package.json +18 -11
- package/src/appBar/appBar.d.ts +3 -0
- package/src/appBar/appBar.js +9 -0
- package/src/appBar/appBar.js.map +1 -0
- package/{appBar → src/appBar}/appBar.module.css +15 -15
- package/src/appBar/appBar.tsx +15 -0
- package/src/button/button.d.ts +9 -0
- package/src/button/button.js +17 -0
- package/src/button/button.js.map +1 -0
- package/{button → src/button}/button.module.css +87 -87
- package/src/button/button.tsx +49 -0
- package/src/card/card.d.ts +3 -0
- package/src/card/card.js +9 -0
- package/src/card/card.js.map +1 -0
- package/{card → src/card}/card.module.css +12 -12
- package/src/card/card.tsx +15 -0
- package/src/clickAwayListener/clickAwayListener.d.ts +6 -0
- package/src/clickAwayListener/clickAwayListener.js +17 -0
- package/src/clickAwayListener/clickAwayListener.js.map +1 -0
- package/{clickAwayListener → src/clickAwayListener}/clickAwayListener.tsx +27 -27
- package/src/container/container.d.ts +7 -0
- package/src/container/container.js +9 -0
- package/src/container/container.js.map +1 -0
- package/{container → src/container}/container.module.css +23 -23
- package/src/container/container.tsx +25 -0
- package/src/footer/footer.d.ts +3 -0
- package/src/footer/footer.js +9 -0
- package/src/footer/footer.js.map +1 -0
- package/{footer → src/footer}/footer.module.css +6 -6
- package/src/footer/footer.tsx +15 -0
- package/src/form/form.d.ts +3 -0
- package/src/form/form.js +12 -0
- package/src/form/form.js.map +1 -0
- package/{form → src/form}/form.module.css +6 -6
- package/src/form/form.tsx +23 -0
- package/src/gridContainer/gridContainer.d.ts +12 -0
- package/src/gridContainer/gridContainer.js +11 -0
- package/src/gridContainer/gridContainer.js.map +1 -0
- package/{gridContainer → src/gridContainer}/gridContainer.module.css +4 -4
- package/src/gridContainer/gridContainer.tsx +34 -0
- package/src/gridItem/gridItem.d.ts +10 -0
- package/src/gridItem/gridItem.js +9 -0
- package/src/gridItem/gridItem.js.map +1 -0
- package/{gridItem → src/gridItem}/gridItem.module.css +0 -0
- package/src/gridItem/gridItem.tsx +27 -0
- package/src/historyBack/historyBack.d.ts +3 -0
- package/src/historyBack/historyBack.js +11 -0
- package/src/historyBack/historyBack.js.map +1 -0
- package/{historyBack → src/historyBack}/historyBack.tsx +20 -20
- package/src/hr/hr.d.ts +8 -0
- package/src/hr/hr.js +12 -0
- package/src/hr/hr.js.map +1 -0
- package/{hr → src/hr}/hr.module.css +18 -18
- package/src/hr/hr.tsx +32 -0
- package/src/index.d.ts +21 -0
- package/src/index.js +22 -0
- package/src/index.js.map +1 -0
- package/{index.tsx → src/index.tsx} +43 -43
- package/src/list/list.d.ts +7 -0
- package/src/list/list.js +9 -0
- package/src/list/list.js.map +1 -0
- package/{list → src/list}/list.module.css +22 -22
- package/src/list/list.tsx +25 -0
- package/src/listItem/listItem.d.ts +3 -0
- package/src/listItem/listItem.js +7 -0
- package/src/listItem/listItem.js.map +1 -0
- package/{listItem → src/listItem}/listItem.module.css +6 -6
- package/src/listItem/listItem.tsx +12 -0
- package/src/main/main.d.ts +6 -0
- package/src/main/main.js +10 -0
- package/src/main/main.js.map +1 -0
- package/{main → src/main}/main.module.css +19 -19
- package/src/main/main.tsx +25 -0
- package/src/navigation/navigation.d.ts +7 -0
- package/src/navigation/navigation.js +9 -0
- package/src/navigation/navigation.js.map +1 -0
- package/{navigation → src/navigation}/navigation.module.css +56 -56
- package/src/navigation/navigation.tsx +24 -0
- package/src/page/page.d.ts +3 -0
- package/src/page/page.js +9 -0
- package/src/page/page.js.map +1 -0
- package/{page → src/page}/page.module.css +9 -9
- package/src/page/page.tsx +15 -0
- package/src/row/row.d.ts +3 -0
- package/src/row/row.js +9 -0
- package/src/row/row.js.map +1 -0
- package/{row → src/row}/row.module.css +7 -7
- package/src/row/row.tsx +15 -0
- package/src/spacer/spacer.d.ts +3 -0
- package/src/spacer/spacer.js +7 -0
- package/src/spacer/spacer.js.map +1 -0
- package/{spacer → src/spacer}/spacer.module.css +5 -5
- package/{spacer → src/spacer}/spacer.tsx +8 -8
- package/src/stack/stack.d.ts +3 -0
- package/src/stack/stack.js +9 -0
- package/src/stack/stack.js.map +1 -0
- package/{stack → src/stack}/stack.module.css +6 -6
- package/src/stack/stack.tsx +15 -0
- package/src/svgIcon/svgIcon.d.ts +6 -0
- package/src/svgIcon/svgIcon.js +12 -0
- package/src/svgIcon/svgIcon.js.map +1 -0
- package/{svgIcon → src/svgIcon}/svgIcon.module.css +5 -5
- package/src/svgIcon/svgIcon.tsx +26 -0
- package/tsconfig.json +13 -0
- package/appBar/appBar.tsx +0 -15
- package/button/button.tsx +0 -53
- package/card/card.tsx +0 -15
- package/container/container.tsx +0 -25
- package/footer/footer.tsx +0 -15
- package/form/form.tsx +0 -23
- package/gridContainer/gridContainer.tsx +0 -34
- package/gridItem/gridItem.tsx +0 -27
- package/hr/hr.tsx +0 -34
- package/list/list.tsx +0 -25
- package/listItem/listItem.tsx +0 -13
- package/main/main.tsx +0 -25
- package/navigation/navigation.tsx +0 -24
- package/page/page.tsx +0 -15
- package/row/row.tsx +0 -15
- package/stack/stack.tsx +0 -15
- package/svgIcon/svgIcon.tsx +0 -26
package/src/main/main.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames } from "@yakad/lib";
|
|
3
|
+
import styles from "./main.module.css";
|
|
4
|
+
function Main(props) {
|
|
5
|
+
const navOpenClass = props.navOpen ? styles.navOpen : "";
|
|
6
|
+
const joinedClassNames = joinClassNames(styles.main, navOpenClass, props.className);
|
|
7
|
+
return (React.createElement("main", { ...props, className: joinedClassNames }, props.children));
|
|
8
|
+
}
|
|
9
|
+
export default Main;
|
|
10
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["main.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AACxD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAMvC,SAAS,IAAI,CAAC,KAAgB;IAC5B,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IAEzD,MAAM,gBAAgB,GAAG,cAAc,CACrC,MAAM,CAAC,IAAI,EACX,YAAY,EACZ,KAAK,CAAC,SAAU,CACjB,CAAC;IAEF,OAAO,CACL,iCAAU,KAAK,EAAE,SAAS,EAAE,gBAAgB,IACzC,KAAK,CAAC,QAAQ,CACV,CACR,CAAC;AACJ,CAAC;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
.main {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
align-self: flex-end;
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
width: 100%;
|
|
8
|
-
transition: width 0.3s;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.navOpen {
|
|
12
|
-
width: calc(100% - 22rem);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@media screen and (max-width: 1000px) {
|
|
16
|
-
.navOpen {
|
|
17
|
-
width: 100%;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
.main {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-self: flex-end;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
width: 100%;
|
|
8
|
+
transition: width 0.3s;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.navOpen {
|
|
12
|
+
width: calc(100% - 22rem);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@media screen and (max-width: 1000px) {
|
|
16
|
+
.navOpen {
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames, joinStyles } from "@yakad/lib";
|
|
3
|
+
import styles from "./main.module.css";
|
|
4
|
+
|
|
5
|
+
interface MainProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
navOpen?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function Main(props: MainProps) {
|
|
10
|
+
const navOpenClass = props.navOpen ? styles.navOpen : "";
|
|
11
|
+
|
|
12
|
+
const joinedClassNames = joinClassNames(
|
|
13
|
+
styles.main,
|
|
14
|
+
navOpenClass,
|
|
15
|
+
props.className!
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<main {...props} className={joinedClassNames}>
|
|
20
|
+
{props.children}
|
|
21
|
+
</main>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default Main;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface NavigationProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
anchor?: "left" | "right" | "top" | "bottom" | "auto";
|
|
4
|
+
open: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare function Navigation(props: NavigationProps): JSX.Element;
|
|
7
|
+
export default Navigation;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames } from "@yakad/lib";
|
|
3
|
+
import styles from "./navigation.module.css";
|
|
4
|
+
function Navigation(props) {
|
|
5
|
+
const joinedClassNames = joinClassNames(styles.navigation, props.anchor ? styles[props.anchor] : styles.auto, props.open ? styles.open : "");
|
|
6
|
+
return (React.createElement("nav", { ...props, className: joinedClassNames }, props.children));
|
|
7
|
+
}
|
|
8
|
+
export default Navigation;
|
|
9
|
+
//# sourceMappingURL=navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAO7C,SAAS,UAAU,CAAC,KAAsB;IACxC,MAAM,gBAAgB,GAAG,cAAc,CACrC,MAAM,CAAC,UAAU,EACjB,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EACjD,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAC9B,CAAC;IAEF,OAAO,CACL,gCAAS,KAAK,EAAE,SAAS,EAAE,gBAAgB,IACxC,KAAK,CAAC,QAAQ,CACX,CACP,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
.navigation {
|
|
2
|
-
position: fixed;
|
|
3
|
-
max-width: 100%;
|
|
4
|
-
transition: transform 0.3s;
|
|
5
|
-
background: var(--backgroundColor);
|
|
6
|
-
overflow-y: auto;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.auto,
|
|
10
|
-
.left {
|
|
11
|
-
top: 5.1rem;
|
|
12
|
-
left: 0;
|
|
13
|
-
width: 21.9rem;
|
|
14
|
-
height: calc(100% - 5.1rem);
|
|
15
|
-
max-height: 100%;
|
|
16
|
-
border-inline-end: 0.2rem solid #7d7d7d40;
|
|
17
|
-
transform: translate(-100%, 0);
|
|
18
|
-
}
|
|
19
|
-
[dir="rtl"] .auto,
|
|
20
|
-
.right {
|
|
21
|
-
right: 0;
|
|
22
|
-
top: 5.1rem;
|
|
23
|
-
width: 21.9rem;
|
|
24
|
-
height: calc(100% - 5.1rem);
|
|
25
|
-
max-height: 100%;
|
|
26
|
-
border-inline-end: 0.2rem solid #7d7d7d40;
|
|
27
|
-
transform: translate(100%, 0);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.top {
|
|
31
|
-
top: 0;
|
|
32
|
-
width: 100%;
|
|
33
|
-
height: auto;
|
|
34
|
-
border-bottom: 0.2rem solid #7d7d7d40;
|
|
35
|
-
transform: translate(0, -100%);
|
|
36
|
-
}
|
|
37
|
-
.bottom {
|
|
38
|
-
bottom: 0;
|
|
39
|
-
width: 100%;
|
|
40
|
-
height: auto;
|
|
41
|
-
border-top: 0.2rem solid #7d7d7d40;
|
|
42
|
-
transform: translate(0, 100%);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.open {
|
|
46
|
-
transform: translate(0, 0);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@media screen and (max-width: 1000px) {
|
|
50
|
-
.auto,
|
|
51
|
-
.left,
|
|
52
|
-
.right {
|
|
53
|
-
top: 0;
|
|
54
|
-
height: 100%;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
.navigation {
|
|
2
|
+
position: fixed;
|
|
3
|
+
max-width: 100%;
|
|
4
|
+
transition: transform 0.3s;
|
|
5
|
+
background: var(--backgroundColor);
|
|
6
|
+
overflow-y: auto;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.auto,
|
|
10
|
+
.left {
|
|
11
|
+
top: 5.1rem;
|
|
12
|
+
left: 0;
|
|
13
|
+
width: 21.9rem;
|
|
14
|
+
height: calc(100% - 5.1rem);
|
|
15
|
+
max-height: 100%;
|
|
16
|
+
border-inline-end: 0.2rem solid #7d7d7d40;
|
|
17
|
+
transform: translate(-100%, 0);
|
|
18
|
+
}
|
|
19
|
+
[dir="rtl"] .auto,
|
|
20
|
+
.right {
|
|
21
|
+
right: 0;
|
|
22
|
+
top: 5.1rem;
|
|
23
|
+
width: 21.9rem;
|
|
24
|
+
height: calc(100% - 5.1rem);
|
|
25
|
+
max-height: 100%;
|
|
26
|
+
border-inline-end: 0.2rem solid #7d7d7d40;
|
|
27
|
+
transform: translate(100%, 0);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.top {
|
|
31
|
+
top: 0;
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: auto;
|
|
34
|
+
border-bottom: 0.2rem solid #7d7d7d40;
|
|
35
|
+
transform: translate(0, -100%);
|
|
36
|
+
}
|
|
37
|
+
.bottom {
|
|
38
|
+
bottom: 0;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: auto;
|
|
41
|
+
border-top: 0.2rem solid #7d7d7d40;
|
|
42
|
+
transform: translate(0, 100%);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.open {
|
|
46
|
+
transform: translate(0, 0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media screen and (max-width: 1000px) {
|
|
50
|
+
.auto,
|
|
51
|
+
.left,
|
|
52
|
+
.right {
|
|
53
|
+
top: 0;
|
|
54
|
+
height: 100%;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames } from "@yakad/lib";
|
|
3
|
+
import styles from "./navigation.module.css";
|
|
4
|
+
|
|
5
|
+
interface NavigationProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
|
+
anchor?: "left" | "right" | "top" | "bottom" | "auto";
|
|
7
|
+
open: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function Navigation(props: NavigationProps) {
|
|
11
|
+
const joinedClassNames = joinClassNames(
|
|
12
|
+
styles.navigation,
|
|
13
|
+
props.anchor ? styles[props.anchor] : styles.auto,
|
|
14
|
+
props.open ? styles.open : ""
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<nav {...props} className={joinedClassNames}>
|
|
19
|
+
{props.children}
|
|
20
|
+
</nav>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default Navigation;
|
package/src/page/page.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames } from "@yakad/lib";
|
|
3
|
+
import styles from "./page.module.css";
|
|
4
|
+
function Page(props) {
|
|
5
|
+
const joinedClassNames = joinClassNames(styles.page, props.className);
|
|
6
|
+
return (React.createElement("div", { ...props, className: joinedClassNames }, props.children));
|
|
7
|
+
}
|
|
8
|
+
export default Page;
|
|
9
|
+
//# sourceMappingURL=page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AACxD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,SAAS,IAAI,CAAC,KAA2C;IACvD,MAAM,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,SAAU,CAAC,CAAC;IAEvE,OAAO,CACL,gCAAS,KAAK,EAAE,SAAS,EAAE,gBAAgB,IACxC,KAAK,CAAC,QAAQ,CACX,CACP,CAAC;AACJ,CAAC;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
.page {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
width: 100%;
|
|
6
|
-
background: var(--backgroundColor);
|
|
7
|
-
color: var(--onBackgroundColor);
|
|
8
|
-
fill: var(--onBackgroundColor);
|
|
9
|
-
}
|
|
1
|
+
.page {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
width: 100%;
|
|
6
|
+
background: var(--backgroundColor);
|
|
7
|
+
color: var(--onBackgroundColor);
|
|
8
|
+
fill: var(--onBackgroundColor);
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames, joinStyles } from "@yakad/lib";
|
|
3
|
+
import styles from "./page.module.css";
|
|
4
|
+
|
|
5
|
+
function Page(props: React.HTMLAttributes<HTMLDivElement>) {
|
|
6
|
+
const joinedClassNames = joinClassNames(styles.page, props.className!);
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<div {...props} className={joinedClassNames}>
|
|
10
|
+
{props.children}
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default Page;
|
package/src/row/row.d.ts
ADDED
package/src/row/row.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames } from "@yakad/lib";
|
|
3
|
+
import styles from "./row.module.css";
|
|
4
|
+
function Row(props) {
|
|
5
|
+
const joinedClassNames = joinClassNames(styles.row, props.className);
|
|
6
|
+
return (React.createElement("div", { ...props, className: joinedClassNames }, props.children));
|
|
7
|
+
}
|
|
8
|
+
export default Row;
|
|
9
|
+
//# sourceMappingURL=row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row.js","sourceRoot":"","sources":["row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AACxD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,SAAS,GAAG,CAAC,KAA2C;IACtD,MAAM,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,SAAU,CAAC,CAAC;IAEtE,OAAO,CACL,gCAAS,KAAK,EAAE,SAAS,EAAE,gBAAgB,IACxC,KAAK,CAAC,QAAQ,CACX,CACP,CAAC;AACJ,CAAC;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.row {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
align-items: center;
|
|
5
|
-
gap: 1.5rem;
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
}
|
|
1
|
+
.row {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 1.5rem;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
package/src/row/row.tsx
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames, joinStyles } from "@yakad/lib";
|
|
3
|
+
import styles from "./row.module.css";
|
|
4
|
+
|
|
5
|
+
function Row(props: React.HTMLAttributes<HTMLDivElement>) {
|
|
6
|
+
const joinedClassNames = joinClassNames(styles.row, props.className!);
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<div {...props} className={joinedClassNames}>
|
|
10
|
+
{props.children}
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default Row;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacer.js","sourceRoot":"","sources":["spacer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,SAAS,MAAM;IACX,OAAO,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM,GAAQ,CAAC;AACjD,CAAC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.spacer {
|
|
2
|
-
width: 0;
|
|
3
|
-
height: 100%;
|
|
4
|
-
margin: auto;
|
|
5
|
-
}
|
|
1
|
+
.spacer {
|
|
2
|
+
width: 0;
|
|
3
|
+
height: 100%;
|
|
4
|
+
margin: auto;
|
|
5
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styles from "./spacer.module.css";
|
|
3
|
-
|
|
4
|
-
function Spacer() {
|
|
5
|
-
return <div className={styles.spacer}></div>;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export default Spacer;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styles from "./spacer.module.css";
|
|
3
|
+
|
|
4
|
+
function Spacer() {
|
|
5
|
+
return <div className={styles.spacer}></div>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default Spacer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames } from "@yakad/lib";
|
|
3
|
+
import styles from "./stack.module.css";
|
|
4
|
+
function Stack(props) {
|
|
5
|
+
const joinedClassNames = joinClassNames(styles.stack, props.className);
|
|
6
|
+
return (React.createElement("div", { ...props, className: joinedClassNames }, props.children));
|
|
7
|
+
}
|
|
8
|
+
export default Stack;
|
|
9
|
+
//# sourceMappingURL=stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.js","sourceRoot":"","sources":["stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AACxD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,SAAS,KAAK,CAAC,KAA2C;IACxD,MAAM,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,SAAU,CAAC,CAAC;IAExE,OAAO,CACL,gCAAS,KAAK,EAAE,SAAS,EAAE,gBAAgB,IACxC,KAAK,CAAC,QAAQ,CACX,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.stack {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: 1.5rem;
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
}
|
|
1
|
+
.stack {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 1.5rem;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames, joinStyles } from "@yakad/lib";
|
|
3
|
+
import styles from "./stack.module.css";
|
|
4
|
+
|
|
5
|
+
function Stack(props: React.HTMLAttributes<HTMLDivElement>) {
|
|
6
|
+
const joinedClassNames = joinClassNames(styles.stack, props.className!);
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<div {...props} className={joinedClassNames}>
|
|
10
|
+
{props.children}
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default Stack;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames, joinStyles } from "@yakad/lib";
|
|
3
|
+
import styles from "./svgIcon.module.css";
|
|
4
|
+
function SvgIcon(props) {
|
|
5
|
+
const joinedClassNames = joinClassNames(styles.svg, props.className);
|
|
6
|
+
const joinedStyles = joinStyles(props.size
|
|
7
|
+
? { width: props.size + "rem", height: props.size + "rem" }
|
|
8
|
+
: { width: "2.4rem", height: "2.4rem" }, props.style);
|
|
9
|
+
return (React.createElement("div", { ...props, className: joinedClassNames, style: joinedStyles }, props.children));
|
|
10
|
+
}
|
|
11
|
+
export default SvgIcon;
|
|
12
|
+
//# sourceMappingURL=svgIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svgIcon.js","sourceRoot":"","sources":["svgIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAM1C,SAAS,OAAO,CAAC,KAAmB;IAClC,MAAM,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,SAAU,CAAC,CAAC;IAEtE,MAAM,YAAY,GAAG,UAAU,CAC7B,KAAK,CAAC,IAAI;QACR,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE;QAC3D,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,EACzC,KAAK,CAAC,KAAM,CACb,CAAC;IAEF,OAAO,CACL,gCAAS,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,IAC7D,KAAK,CAAC,QAAQ,CACX,CACP,CAAC;AACJ,CAAC;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.svg svg {
|
|
2
|
-
display: block;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100%;
|
|
5
|
-
}
|
|
1
|
+
.svg svg {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinClassNames, joinStyles } from "@yakad/lib";
|
|
3
|
+
import styles from "./svgIcon.module.css";
|
|
4
|
+
|
|
5
|
+
interface SvgIconProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
|
+
size?: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function SvgIcon(props: SvgIconProps) {
|
|
10
|
+
const joinedClassNames = joinClassNames(styles.svg, props.className!);
|
|
11
|
+
|
|
12
|
+
const joinedStyles = joinStyles(
|
|
13
|
+
props.size
|
|
14
|
+
? { width: props.size + "rem", height: props.size + "rem" }
|
|
15
|
+
: { width: "2.4rem", height: "2.4rem" },
|
|
16
|
+
props.style!
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div {...props} className={joinedClassNames} style={joinedStyles}>
|
|
21
|
+
{props.children}
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default SvgIcon;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"noImplicitAny": true,
|
|
4
|
+
"module": "es2022",
|
|
5
|
+
"target": "es2022",
|
|
6
|
+
"jsx": "react",
|
|
7
|
+
"allowJs": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"allowSyntheticDefaultImports": true
|
|
12
|
+
}
|
|
13
|
+
}
|
package/appBar/appBar.tsx
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { joinClassNames, joinStyles } from "library";
|
|
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.tsx
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { joinClassNames } from "library";
|
|
3
|
-
import styles from "./button.module.css";
|
|
4
|
-
import SvgIcon from "ui/svgIcon/svgIcon";
|
|
5
|
-
|
|
6
|
-
interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
7
|
-
variant?: "text" | "outlined" | "filled" | "tonal" | "elevated";
|
|
8
|
-
size?: "small" | "medium" | "large";
|
|
9
|
-
borderStyle?: "none" | "semi" | "rounded";
|
|
10
|
-
icon?: JSX.Element;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface svgSizeMap {
|
|
14
|
-
small: number;
|
|
15
|
-
medium: number;
|
|
16
|
-
large: number;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const svgSizeMaps: svgSizeMap = {
|
|
20
|
-
small: 2,
|
|
21
|
-
medium: 2.4,
|
|
22
|
-
large: 3,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
function Button(props: ButtonProps) {
|
|
26
|
-
const joinedClassNames = joinClassNames(
|
|
27
|
-
styles.button,
|
|
28
|
-
props.variant ? styles[props.variant] : styles.text,
|
|
29
|
-
props.size ? styles[props.size] : styles.medium,
|
|
30
|
-
props.borderStyle ? styles[props.borderStyle] : styles.rounded,
|
|
31
|
-
props.icon && !props.children ? styles.iconButton : "",
|
|
32
|
-
props.className!
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<button {...props} className={joinedClassNames}>
|
|
37
|
-
{props.icon ? (
|
|
38
|
-
<SvgIcon
|
|
39
|
-
size={
|
|
40
|
-
props.size
|
|
41
|
-
? svgSizeMaps[props.size]
|
|
42
|
-
: svgSizeMaps.medium
|
|
43
|
-
}
|
|
44
|
-
>
|
|
45
|
-
{props.icon}
|
|
46
|
-
</SvgIcon>
|
|
47
|
-
) : null}
|
|
48
|
-
{props.children}
|
|
49
|
-
</button>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export default Button;
|
package/card/card.tsx
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { joinClassNames } from "library";
|
|
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;
|
package/container/container.tsx
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { joinClassNames, joinStyles } from "library";
|
|
3
|
-
import styles from "./container.module.css";
|
|
4
|
-
|
|
5
|
-
type ScreenSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
6
|
-
|
|
7
|
-
interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
-
maxWidth?: ScreenSize;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function Container(props: ContainerProps) {
|
|
12
|
-
const joinedClassNames = joinClassNames(
|
|
13
|
-
props.maxWidth ? styles[props.maxWidth] : "",
|
|
14
|
-
styles.container,
|
|
15
|
-
props.className!
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div {...props} className={joinedClassNames}>
|
|
20
|
-
{props.children}
|
|
21
|
-
</div>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default Container;
|