@yakad/ui 1.3.158 → 1.3.160
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/Text/Text.d.ts +11 -23
- package/dist/Text/Text.js +27 -27
- package/package.json +1 -1
package/dist/Text/Text.d.ts
CHANGED
|
@@ -1,29 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
type TextVariant = "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "body1" | "body2" | "body3" | "body4" | "body5" | "body6" | "caption" | "span";
|
|
3
|
-
export interface
|
|
3
|
+
export interface TextProps<T> extends React.HTMLAttributes<T> {
|
|
4
4
|
variant?: TextVariant;
|
|
5
|
-
|
|
5
|
+
palette?: "onSurfaceColor" | "onSurfaceVariantColor";
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
export declare const H1: import("react").ForwardRefExoticComponent<
|
|
9
|
-
export declare const H2: import("react").ForwardRefExoticComponent<
|
|
10
|
-
export declare const H3: import("react").ForwardRefExoticComponent<
|
|
11
|
-
export declare const H4: import("react").ForwardRefExoticComponent<
|
|
12
|
-
export declare const H5: import("react").ForwardRefExoticComponent<
|
|
13
|
-
export declare const H6: import("react").ForwardRefExoticComponent<
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
export declare const P: import("react").ForwardRefExoticComponent<ParagraphProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
19
|
-
export interface SpanProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
20
|
-
variant?: TextVariant;
|
|
21
|
-
children?: React.ReactNode;
|
|
22
|
-
}
|
|
23
|
-
export declare const Span: import("react").ForwardRefExoticComponent<SpanProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
24
|
-
export interface TextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
25
|
-
variant?: TextVariant;
|
|
26
|
-
children?: React.ReactNode;
|
|
27
|
-
}
|
|
28
|
-
export declare const Text: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const H1: import("react").ForwardRefExoticComponent<TextProps<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
9
|
+
export declare const H2: import("react").ForwardRefExoticComponent<TextProps<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
10
|
+
export declare const H3: import("react").ForwardRefExoticComponent<TextProps<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
11
|
+
export declare const H4: import("react").ForwardRefExoticComponent<TextProps<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
12
|
+
export declare const H5: import("react").ForwardRefExoticComponent<TextProps<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
13
|
+
export declare const H6: import("react").ForwardRefExoticComponent<TextProps<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
14
|
+
export declare const P: import("react").ForwardRefExoticComponent<TextProps<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
15
|
+
export declare const Span: import("react").ForwardRefExoticComponent<TextProps<HTMLSpanElement> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
16
|
+
export declare const Text: import("react").ForwardRefExoticComponent<TextProps<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
29
17
|
export {};
|
package/dist/Text/Text.js
CHANGED
|
@@ -14,74 +14,74 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./Text.module.css";
|
|
16
16
|
export const H1 = forwardRef(function H1(_a, ref) {
|
|
17
|
-
var { variant = "heading1",
|
|
17
|
+
var { variant = "heading1", palette, className, children } = _a, restProps = __rest(_a, ["variant", "palette", "className", "children"]);
|
|
18
18
|
const joinedClassNames = classNames(styles.text, styles[variant], {
|
|
19
|
-
[styles.onSurfaceColor]:
|
|
20
|
-
[styles.onSurfaceVariantColor]:
|
|
19
|
+
[styles.onSurfaceColor]: palette === "onSurfaceColor",
|
|
20
|
+
[styles.onSurfaceVariantColor]: palette === "onSurfaceVariantColor",
|
|
21
21
|
}, className);
|
|
22
22
|
return (_jsx("h1", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
23
23
|
});
|
|
24
24
|
export const H2 = forwardRef(function H2(_a, ref) {
|
|
25
|
-
var { variant = "heading2",
|
|
25
|
+
var { variant = "heading2", palette, className, children } = _a, restProps = __rest(_a, ["variant", "palette", "className", "children"]);
|
|
26
26
|
const joinedClassNames = classNames(styles.text, styles[variant], {
|
|
27
|
-
[styles.onSurfaceColor]:
|
|
28
|
-
[styles.onSurfaceVariantColor]:
|
|
27
|
+
[styles.onSurfaceColor]: palette === "onSurfaceColor",
|
|
28
|
+
[styles.onSurfaceVariantColor]: palette === "onSurfaceVariantColor",
|
|
29
29
|
}, className);
|
|
30
30
|
return (_jsx("h2", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
31
31
|
});
|
|
32
32
|
export const H3 = forwardRef(function H3(_a, ref) {
|
|
33
|
-
var { variant = "heading3",
|
|
33
|
+
var { variant = "heading3", palette, className, children } = _a, restProps = __rest(_a, ["variant", "palette", "className", "children"]);
|
|
34
34
|
const joinedClassNames = classNames(styles.text, styles[variant], {
|
|
35
|
-
[styles.onSurfaceColor]:
|
|
36
|
-
[styles.onSurfaceVariantColor]:
|
|
35
|
+
[styles.onSurfaceColor]: palette === "onSurfaceColor",
|
|
36
|
+
[styles.onSurfaceVariantColor]: palette === "onSurfaceVariantColor",
|
|
37
37
|
}, className);
|
|
38
38
|
return (_jsx("h3", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
39
39
|
});
|
|
40
40
|
export const H4 = forwardRef(function H4(_a, ref) {
|
|
41
|
-
var { variant = "heading4",
|
|
41
|
+
var { variant = "heading4", palette, className, children } = _a, restProps = __rest(_a, ["variant", "palette", "className", "children"]);
|
|
42
42
|
const joinedClassNames = classNames(styles.text, styles[variant], {
|
|
43
|
-
[styles.onSurfaceColor]:
|
|
44
|
-
[styles.onSurfaceVariantColor]:
|
|
43
|
+
[styles.onSurfaceColor]: palette === "onSurfaceColor",
|
|
44
|
+
[styles.onSurfaceVariantColor]: palette === "onSurfaceVariantColor",
|
|
45
45
|
}, className);
|
|
46
46
|
return (_jsx("h4", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
47
47
|
});
|
|
48
48
|
export const H5 = forwardRef(function H5(_a, ref) {
|
|
49
|
-
var { variant = "heading5",
|
|
49
|
+
var { variant = "heading5", palette, className, children } = _a, restProps = __rest(_a, ["variant", "palette", "className", "children"]);
|
|
50
50
|
const joinedClassNames = classNames(styles.text, styles[variant], {
|
|
51
|
-
[styles.onSurfaceColor]:
|
|
52
|
-
[styles.onSurfaceVariantColor]:
|
|
51
|
+
[styles.onSurfaceColor]: palette === "onSurfaceColor",
|
|
52
|
+
[styles.onSurfaceVariantColor]: palette === "onSurfaceVariantColor",
|
|
53
53
|
}, className);
|
|
54
54
|
return (_jsx("h5", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
55
55
|
});
|
|
56
56
|
export const H6 = forwardRef(function H6(_a, ref) {
|
|
57
|
-
var { variant = "heading6",
|
|
57
|
+
var { variant = "heading6", palette, className, children } = _a, restProps = __rest(_a, ["variant", "palette", "className", "children"]);
|
|
58
58
|
const joinedClassNames = classNames(styles.text, styles[variant], {
|
|
59
|
-
[styles.onSurfaceColor]:
|
|
60
|
-
[styles.onSurfaceVariantColor]:
|
|
59
|
+
[styles.onSurfaceColor]: palette === "onSurfaceColor",
|
|
60
|
+
[styles.onSurfaceVariantColor]: palette === "onSurfaceVariantColor",
|
|
61
61
|
}, className);
|
|
62
62
|
return (_jsx("h6", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
63
63
|
});
|
|
64
64
|
export const P = forwardRef(function P(_a, ref) {
|
|
65
|
-
var { variant = "body5",
|
|
65
|
+
var { variant = "body5", palette, className, children } = _a, restProps = __rest(_a, ["variant", "palette", "className", "children"]);
|
|
66
66
|
const joinedClassNames = classNames(styles.text, styles[variant], {
|
|
67
|
-
[styles.onSurfaceColor]:
|
|
68
|
-
[styles.onSurfaceVariantColor]:
|
|
67
|
+
[styles.onSurfaceColor]: palette === "onSurfaceColor",
|
|
68
|
+
[styles.onSurfaceVariantColor]: palette === "onSurfaceVariantColor",
|
|
69
69
|
}, className);
|
|
70
70
|
return (_jsx("p", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
71
71
|
});
|
|
72
72
|
export const Span = forwardRef(function Span(_a, ref) {
|
|
73
|
-
var { variant = "span",
|
|
73
|
+
var { variant = "span", palette, className, children } = _a, restProps = __rest(_a, ["variant", "palette", "className", "children"]);
|
|
74
74
|
const joinedClassNames = classNames(styles.text, styles[variant], {
|
|
75
|
-
[styles.onSurfaceColor]:
|
|
76
|
-
[styles.onSurfaceVariantColor]:
|
|
75
|
+
[styles.onSurfaceColor]: palette === "onSurfaceColor",
|
|
76
|
+
[styles.onSurfaceVariantColor]: palette === "onSurfaceVariantColor",
|
|
77
77
|
}, className);
|
|
78
78
|
return (_jsx("span", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
79
79
|
});
|
|
80
80
|
export const Text = forwardRef(function Text(_a, ref) {
|
|
81
|
-
var { variant = "body5",
|
|
81
|
+
var { variant = "body5", palette, className, children } = _a, restProps = __rest(_a, ["variant", "palette", "className", "children"]);
|
|
82
82
|
const joinedClassNames = classNames(styles[variant], {
|
|
83
|
-
[styles.onSurfaceColor]:
|
|
84
|
-
[styles.onSurfaceVariantColor]:
|
|
83
|
+
[styles.onSurfaceColor]: palette === "onSurfaceColor",
|
|
84
|
+
[styles.onSurfaceVariantColor]: palette === "onSurfaceVariantColor",
|
|
85
85
|
}, className);
|
|
86
86
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
87
87
|
});
|