@yakad/ui 1.3.48 → 1.3.50
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/dist/appBar/appBar.d.ts +2 -1
- package/dist/appBar/appBar.js +4 -7
- package/dist/appBar/appBar.js.map +1 -1
- package/dist/appBar/appBar.module.css +31 -9
- package/dist/container/container.d.ts +1 -1
- package/dist/container/container.js +2 -2
- package/dist/container/container.js.map +1 -1
- package/dist/container/container.module.css +7 -6
- package/dist/footer/footer.d.ts +2 -1
- package/dist/footer/footer.js +23 -3
- package/dist/footer/footer.js.map +1 -1
- package/dist/footer/footer.module.css +32 -4
- package/dist/stack/stack.module.css +1 -1
- package/dist/text/text.d.ts +6 -1
- package/dist/text/text.js +6 -1
- package/dist/text/text.js.map +1 -1
- package/dist/text/text.module.css +18 -3
- package/package.json +1 -1
package/dist/appBar/appBar.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface AppBarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
position?: "initial" | "sticky" | "
|
|
3
|
+
position?: "initial" | "sticky" | "scroll";
|
|
4
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
5
|
align?: "start" | "center" | "end";
|
|
5
6
|
blur?: boolean;
|
|
6
7
|
children?: React.ReactNode;
|
package/dist/appBar/appBar.js
CHANGED
|
@@ -13,11 +13,11 @@ import React, { forwardRef, useEffect, useState } from "react";
|
|
|
13
13
|
import classNames from "classnames";
|
|
14
14
|
import styles from "./appBar.module.css";
|
|
15
15
|
export const AppBar = forwardRef((_a, ref) => {
|
|
16
|
-
var { position = "initial", align, blur, className, children } = _a, restProps = __rest(_a, ["position", "align", "blur", "className", "children"]);
|
|
16
|
+
var { position = "initial", size, align, blur, className, children } = _a, restProps = __rest(_a, ["position", "size", "align", "blur", "className", "children"]);
|
|
17
17
|
const [show, setShow] = useState(true);
|
|
18
18
|
const [lastScrollY, setLastScrollY] = useState(0);
|
|
19
19
|
useEffect(() => {
|
|
20
|
-
if (position !== "
|
|
20
|
+
if (position !== "scroll")
|
|
21
21
|
return;
|
|
22
22
|
const handleScroll = () => {
|
|
23
23
|
const currentScrollY = window.scrollY;
|
|
@@ -35,11 +35,8 @@ export const AppBar = forwardRef((_a, ref) => {
|
|
|
35
35
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
36
36
|
}, [lastScrollY, position]);
|
|
37
37
|
const joinedClassNames = classNames(styles.header, {
|
|
38
|
-
[styles.sticky]: position === "sticky"
|
|
39
|
-
|
|
40
|
-
[styles[align]]: align,
|
|
41
|
-
[styles.blur]: blur,
|
|
42
|
-
}, className);
|
|
38
|
+
[styles.sticky]: position === "sticky",
|
|
39
|
+
}, { [styles.hidden]: position === "scroll" && !show }, { [styles[size]]: size }, { [styles[align]]: align }, { [styles.blur]: blur }, className);
|
|
43
40
|
return (React.createElement("header", Object.assign({ ref: ref }, restProps, { className: joinedClassNames }), children));
|
|
44
41
|
});
|
|
45
42
|
//# sourceMappingURL=appBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appBar.js","sourceRoot":"","sources":["../../src/appBar/appBar.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,MAAM,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"appBar.js","sourceRoot":"","sources":["../../src/appBar/appBar.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAUzC,MAAM,CAAC,MAAM,MAA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CAAC,EAAE,IAAI,EAAE,EAClC,EAAE,CAAC,MAAM,CAAC,KAAe,CAAC,CAAC,EAAE,KAAK,EAAE,EACpC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EACvB,SAAS,CACZ,CAAC;IAEF,OAAO,CACH,8CAAQ,GAAG,EAAE,GAAG,IAAM,SAAS,IAAE,SAAS,EAAE,gBAAgB,KACvD,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -2,21 +2,44 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
4
|
align-items: center;
|
|
5
|
-
|
|
5
|
+
flex-wrap: wrap;
|
|
6
6
|
width: 100%;
|
|
7
|
-
height: 6rem;
|
|
8
|
-
padding:
|
|
9
|
-
|
|
7
|
+
min-height: 6rem;
|
|
8
|
+
padding-left: 2rem;
|
|
9
|
+
padding-right: 2rem;
|
|
10
|
+
box-shadow: 0 0.1rem 0 0 rgb(var(--onSurfaceColor, 28 27 31) / 0.1);
|
|
10
11
|
gap: 1rem;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
z-index: 2;
|
|
11
14
|
background: rgb(var(--surfaceContainerColor, 243 237 247));
|
|
12
15
|
color: rgb(var(--onSurfaceColor, 28 27 31));
|
|
13
16
|
fill: rgb(var(--onSurfaceColor, 28 27 31));
|
|
14
17
|
transition: transform 0.3s ease;
|
|
15
18
|
will-change: transform;
|
|
16
|
-
z-index: 2;
|
|
17
19
|
user-select: none;
|
|
18
20
|
}
|
|
19
21
|
|
|
22
|
+
.xs {
|
|
23
|
+
padding-left: max(2rem, calc(50% - 44.4rem / 2));
|
|
24
|
+
padding-right: max(2rem, calc(50% - 44.4rem / 2));
|
|
25
|
+
}
|
|
26
|
+
.sm {
|
|
27
|
+
padding-left: max(2rem, calc(50% - 60rem / 2));
|
|
28
|
+
padding-right: max(2rem, calc(50% - 60rem / 2));
|
|
29
|
+
}
|
|
30
|
+
.md {
|
|
31
|
+
padding-left: max(2rem, calc(50% - 90rem / 2));
|
|
32
|
+
padding-right: max(2rem, calc(50% - 90rem / 2));
|
|
33
|
+
}
|
|
34
|
+
.lg {
|
|
35
|
+
padding-left: max(2rem, calc(50% - 120rem / 2));
|
|
36
|
+
padding-right: max(2rem, calc(50% - 120rem / 2));
|
|
37
|
+
}
|
|
38
|
+
.xl {
|
|
39
|
+
padding-left: max(2rem, calc(50% - 150rem / 2));
|
|
40
|
+
padding-right: max(2rem, calc(50% - 150rem / 2));
|
|
41
|
+
}
|
|
42
|
+
|
|
20
43
|
.start {
|
|
21
44
|
justify-content: flex-start;
|
|
22
45
|
}
|
|
@@ -27,16 +50,15 @@
|
|
|
27
50
|
justify-content: flex-end;
|
|
28
51
|
}
|
|
29
52
|
|
|
30
|
-
.
|
|
53
|
+
.sticky {
|
|
31
54
|
position: sticky;
|
|
32
55
|
top: 0;
|
|
33
56
|
}
|
|
34
|
-
|
|
35
|
-
.header.hidden {
|
|
57
|
+
.hidden {
|
|
36
58
|
transform: translateY(-100%);
|
|
37
59
|
}
|
|
38
60
|
|
|
39
|
-
.
|
|
61
|
+
.blur {
|
|
40
62
|
background-color: color-mix(
|
|
41
63
|
in srgb,
|
|
42
64
|
rgb(var(--surfaceContainerColor, 243 237 247)) 90%,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
align?: "start" | "center" | "end";
|
|
4
3
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
|
+
align?: "start" | "center" | "end";
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -13,8 +13,8 @@ import React, { forwardRef } from "react";
|
|
|
13
13
|
import classNames from "classnames";
|
|
14
14
|
import styles from "./container.module.css";
|
|
15
15
|
export const Container = forwardRef((_a, ref) => {
|
|
16
|
-
var {
|
|
17
|
-
const joinedClassNames = classNames(styles.container, { [styles[align]]: align },
|
|
16
|
+
var { size = "xl", align, className, children } = _a, restProps = __rest(_a, ["size", "align", "className", "children"]);
|
|
17
|
+
const joinedClassNames = classNames(styles.container, styles[size], { [styles[align]]: align }, className);
|
|
18
18
|
return (React.createElement("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames }), children));
|
|
19
19
|
});
|
|
20
20
|
//# sourceMappingURL=container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../src/container/container.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAQ5C,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAC/B,CAAC,EAAyD,EAAE,GAAG,EAAE,EAAE;QAAlE,EAAE,
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../src/container/container.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAQ5C,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAC/B,CAAC,EAAyD,EAAE,GAAG,EAAE,EAAE;QAAlE,EAAE,IAAI,GAAG,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,OAAgB,EAAX,SAAS,cAAvD,0CAAyD,CAAF;IACpD,MAAM,gBAAgB,GAAG,UAAU,CAC/B,MAAM,CAAC,SAAS,EAChB,MAAM,CAAC,IAAI,CAAC,EACZ,EAAE,CAAC,MAAM,CAAC,KAAe,CAAC,CAAC,EAAE,KAAK,EAAE,EACpC,SAAS,CACZ,CAAC;IAEF,OAAO,CACH,2CAAK,GAAG,EAAE,GAAG,IAAM,SAAS,IAAE,SAAS,EAAE,gBAAgB,KACpD,QAAQ,CACP,CACT,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
.container {
|
|
2
2
|
width: 100%;
|
|
3
3
|
padding: 2rem;
|
|
4
|
+
gap: 2rem;
|
|
4
5
|
margin-right: auto;
|
|
5
6
|
margin-left: auto;
|
|
6
7
|
box-sizing: border-box;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
.container.xs {
|
|
10
11
|
max-width: 44.4rem;
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
.container.sm {
|
|
13
14
|
max-width: 60rem;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
+
.container.md {
|
|
16
17
|
max-width: 90rem;
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
.container.lg {
|
|
19
20
|
max-width: 120rem;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
.container.xl {
|
|
22
23
|
max-width: 150rem;
|
|
23
24
|
}
|
|
24
25
|
|
package/dist/footer/footer.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface FooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
position?: "initial" | "sticky" | "scroll";
|
|
4
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
3
5
|
align?: "start" | "center" | "end";
|
|
4
|
-
position?: "initial" | "sticky";
|
|
5
6
|
blur?: boolean;
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
}
|
package/dist/footer/footer.js
CHANGED
|
@@ -9,12 +9,32 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import React, { forwardRef } from "react";
|
|
12
|
+
import React, { forwardRef, useState, useEffect } from "react";
|
|
13
13
|
import classNames from "classnames";
|
|
14
14
|
import styles from "./footer.module.css";
|
|
15
15
|
export const Footer = forwardRef((_a, ref) => {
|
|
16
|
-
var { position = "initial", align, blur, className, children } = _a, restProps = __rest(_a, ["position", "align", "blur", "className", "children"]);
|
|
17
|
-
const
|
|
16
|
+
var { position = "initial", size, align, blur, className, children } = _a, restProps = __rest(_a, ["position", "size", "align", "blur", "className", "children"]);
|
|
17
|
+
const [show, setShow] = useState(true);
|
|
18
|
+
const [lastScrollY, setLastScrollY] = useState(0);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (position !== "scroll")
|
|
21
|
+
return;
|
|
22
|
+
const handleScroll = () => {
|
|
23
|
+
const currentScrollY = window.scrollY;
|
|
24
|
+
if (currentScrollY > lastScrollY && currentScrollY > 50) {
|
|
25
|
+
// Scroll down
|
|
26
|
+
setShow(false);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
// Scroll up
|
|
30
|
+
setShow(true);
|
|
31
|
+
}
|
|
32
|
+
setLastScrollY(currentScrollY);
|
|
33
|
+
};
|
|
34
|
+
window.addEventListener("scroll", handleScroll);
|
|
35
|
+
return () => window.removeEventListener("scroll", handleScroll);
|
|
36
|
+
}, [lastScrollY, position]);
|
|
37
|
+
const joinedClassNames = classNames(styles.footer, { [styles.sticky]: position === "sticky" }, { [styles.hidden]: position === "scroll" && !show }, { [styles[size]]: size }, { [styles[align]]: align }, { [styles.blur]: blur }, className);
|
|
18
38
|
return (React.createElement("footer", Object.assign({ ref: ref }, restProps, { className: joinedClassNames }), children));
|
|
19
39
|
});
|
|
20
40
|
//# sourceMappingURL=footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","sourceRoot":"","sources":["../../src/footer/footer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAA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QAAQ,CAAC,CAAC,CAAC;IAE5B,MAAM,gBAAgB,GAAG,UAAU,CAC/B,MAAM,CAAC,MAAM,EACb,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,KAAK,QAAQ,EAAE,EAC1C,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,KAAK,QAAQ,IAAI,CAAC,IAAI,EAAE,EACnD,EAAE,CAAC,MAAM,CAAC,IAAc,CAAC,CAAC,EAAE,IAAI,EAAE,EAClC,EAAE,CAAC,MAAM,CAAC,KAAe,CAAC,CAAC,EAAE,KAAK,EAAE,EACpC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EACvB,SAAS,CACZ,CAAC;IAEF,OAAO,CACH,8CAAQ,GAAG,EAAE,GAAG,IAAM,SAAS,IAAE,SAAS,EAAE,gBAAgB,KACvD,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -1,17 +1,42 @@
|
|
|
1
1
|
.footer {
|
|
2
2
|
display: flex;
|
|
3
|
-
box-sizing: border-box;
|
|
4
3
|
flex-direction: row;
|
|
5
4
|
align-items: center;
|
|
6
5
|
flex-wrap: wrap;
|
|
7
6
|
width: 100%;
|
|
8
7
|
min-height: 6rem;
|
|
9
|
-
padding:
|
|
8
|
+
padding-left: 2rem;
|
|
9
|
+
padding-right: 2rem;
|
|
10
10
|
gap: 1rem;
|
|
11
|
+
box-sizing: border-box;
|
|
11
12
|
z-index: 1;
|
|
12
13
|
background: rgb(var(--surfaceContainerColor, 243 237 247));
|
|
13
14
|
color: rgb(var(--onSurfaceColor, 28 27 31));
|
|
14
15
|
fill: rgb(var(--onSurfaceColor, 28 27 31));
|
|
16
|
+
transition: transform 0.3s ease;
|
|
17
|
+
will-change: transform;
|
|
18
|
+
user-select: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.xs {
|
|
22
|
+
padding-left: max(2rem, calc(50% - 44.4rem / 2));
|
|
23
|
+
padding-right: max(2rem, calc(50% - 44.4rem / 2));
|
|
24
|
+
}
|
|
25
|
+
.sm {
|
|
26
|
+
padding-left: max(2rem, calc(50% - 60rem / 2));
|
|
27
|
+
padding-right: max(2rem, calc(50% - 60rem / 2));
|
|
28
|
+
}
|
|
29
|
+
.md {
|
|
30
|
+
padding-left: max(2rem, calc(50% - 90rem / 2));
|
|
31
|
+
padding-right: max(2rem, calc(50% - 90rem / 2));
|
|
32
|
+
}
|
|
33
|
+
.lg {
|
|
34
|
+
padding-left: max(2rem, calc(50% - 120rem / 2));
|
|
35
|
+
padding-right: max(2rem, calc(50% - 120rem / 2));
|
|
36
|
+
}
|
|
37
|
+
.xl {
|
|
38
|
+
padding-left: max(2rem, calc(50% - 150rem / 2));
|
|
39
|
+
padding-right: max(2rem, calc(50% - 150rem / 2));
|
|
15
40
|
}
|
|
16
41
|
|
|
17
42
|
.start {
|
|
@@ -24,12 +49,15 @@
|
|
|
24
49
|
justify-content: flex-end;
|
|
25
50
|
}
|
|
26
51
|
|
|
27
|
-
.
|
|
52
|
+
.sticky {
|
|
28
53
|
position: sticky;
|
|
29
54
|
bottom: 0;
|
|
30
55
|
}
|
|
56
|
+
.hidden {
|
|
57
|
+
transform: translateY(100%);
|
|
58
|
+
}
|
|
31
59
|
|
|
32
|
-
.
|
|
60
|
+
.blur {
|
|
33
61
|
background-color: color-mix(
|
|
34
62
|
in srgb,
|
|
35
63
|
rgb(var(--surfaceContainerColor, 243 237 247)) 90%,
|
package/dist/text/text.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
type TextVariant = "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "body1" | "body2" | "body3" | "caption" | "span";
|
|
2
|
+
type TextVariant = "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "body1" | "body2" | "body3" | "body4" | "body5" | "body6" | "caption" | "span";
|
|
3
3
|
export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
4
4
|
variant?: TextVariant;
|
|
5
5
|
children?: React.ReactNode;
|
|
@@ -20,4 +20,9 @@ export interface SpanProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
20
20
|
children?: React.ReactNode;
|
|
21
21
|
}
|
|
22
22
|
export declare const Span: React.ForwardRefExoticComponent<SpanProps & React.RefAttributes<HTMLSpanElement>>;
|
|
23
|
+
export interface TextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
variant?: TextVariant;
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
28
|
export {};
|
package/dist/text/text.js
CHANGED
|
@@ -43,7 +43,7 @@ export const H6 = forwardRef((_a, ref) => {
|
|
|
43
43
|
return (React.createElement("h6", Object.assign({ ref: ref }, restProps, { className: joinedClassNames }), children));
|
|
44
44
|
});
|
|
45
45
|
export const P = forwardRef((_a, ref) => {
|
|
46
|
-
var { variant = "
|
|
46
|
+
var { variant = "body5", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
|
|
47
47
|
const joinedClassNames = classNames(styles.text, styles[variant], className);
|
|
48
48
|
return (React.createElement("p", Object.assign({ ref: ref }, restProps, { className: joinedClassNames }), children));
|
|
49
49
|
});
|
|
@@ -52,4 +52,9 @@ export const Span = forwardRef((_a, ref) => {
|
|
|
52
52
|
const joinedClassNames = classNames(styles.text, styles[variant], className);
|
|
53
53
|
return (React.createElement("span", Object.assign({ ref: ref }, restProps, { className: joinedClassNames }), children));
|
|
54
54
|
});
|
|
55
|
+
export const Text = forwardRef((_a, ref) => {
|
|
56
|
+
var { variant = "body5", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
|
|
57
|
+
const joinedClassNames = classNames(styles[variant], className);
|
|
58
|
+
return (React.createElement("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames }), children));
|
|
59
|
+
});
|
|
55
60
|
//# sourceMappingURL=text.js.map
|
package/dist/text/text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/text/text.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,MAAM,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/text/text.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAsBvC,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CACxB,CAAC,EAA2D,EAAE,GAAG,EAAE,EAAE;QAApE,EAAE,OAAO,GAAG,UAAU,EAAE,SAAS,EAAE,QAAQ,OAAgB,EAAX,SAAS,cAAzD,oCAA2D,CAAF;IACtD,MAAM,gBAAgB,GAAG,UAAU,CAC/B,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,OAAiB,CAAC,EACzB,SAAS,CACZ,CAAC;IACF,OAAO,CACH,0CAAI,GAAG,EAAE,GAAG,IAAM,SAAS,IAAE,SAAS,EAAE,gBAAgB,KACnD,QAAQ,CACR,CACR,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CACxB,CAAC,EAA2D,EAAE,GAAG,EAAE,EAAE;QAApE,EAAE,OAAO,GAAG,UAAU,EAAE,SAAS,EAAE,QAAQ,OAAgB,EAAX,SAAS,cAAzD,oCAA2D,CAAF;IACtD,MAAM,gBAAgB,GAAG,UAAU,CAC/B,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,OAAiB,CAA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;IAClD,MAAM,gBAAgB,GAAG,UAAU,CAC/B,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,OAAiB,CAAC,EACzB,SAAS,CACZ,CAAC;IACF,OAAO,CACH,4CAAM,GAAG,EAAE,GAAG,IAAM,SAAS,IAAE,SAAS,EAAE,gBAAgB,KACrD,QAAQ,CACN,CACV,CAAC;AACN,CAAC,CACJ,CAAC;AAMF,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAC1B,CAAC,EAAwD,EAAE,GAAG,EAAE,EAAE;QAAjE,EAAE,OAAO,GAAG,OAAO,EAAE,SAAS,EAAE,QAAQ,OAAgB,EAAX,SAAS,cAAtD,oCAAwD,CAAF;IACnD,MAAM,gBAAgB,GAAG,UAAU,CAC/B,MAAM,CAAC,OAAiB,CAAC,EACzB,SAAS,CACZ,CAAC;IACF,OAAO,CACH,2CAAK,GAAG,EAAE,GAAG,IAAM,SAAS,IAAE,SAAS,EAAE,gBAAgB,KACpD,QAAQ,CACP,CACT,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -33,23 +33,38 @@
|
|
|
33
33
|
line-height: 2.2rem;
|
|
34
34
|
}
|
|
35
35
|
.body1 {
|
|
36
|
+
font-size: 3rem;
|
|
37
|
+
font-weight: 400;
|
|
38
|
+
line-height: 3.8rem;
|
|
39
|
+
}
|
|
40
|
+
.body2 {
|
|
41
|
+
font-size: 2.4rem;
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
line-height: 3rem;
|
|
44
|
+
}
|
|
45
|
+
.body3 {
|
|
46
|
+
font-size: 2rem;
|
|
47
|
+
font-weight: 400;
|
|
48
|
+
line-height: 2.4rem;
|
|
49
|
+
}
|
|
50
|
+
.body4 {
|
|
36
51
|
font-size: 1.8rem;
|
|
37
52
|
font-weight: 400;
|
|
38
53
|
line-height: 2.4rem;
|
|
39
54
|
}
|
|
40
|
-
.
|
|
55
|
+
.body5 {
|
|
41
56
|
font-size: 1.6rem;
|
|
42
57
|
font-weight: 400;
|
|
43
58
|
line-height: 2.2rem;
|
|
44
59
|
}
|
|
45
|
-
.
|
|
60
|
+
.body6 {
|
|
46
61
|
font-size: 1.4rem;
|
|
47
62
|
font-weight: 400;
|
|
48
63
|
line-height: 2rem;
|
|
49
64
|
}
|
|
50
65
|
.caption {
|
|
51
66
|
font-size: 1.2rem;
|
|
52
|
-
font-weight:
|
|
67
|
+
font-weight: 400;
|
|
53
68
|
line-height: 1.6rem;
|
|
54
69
|
}
|
|
55
70
|
.span {
|