@alfalab/core-components-typography 4.1.0 → 4.2.1
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/colors.css +33 -33
- package/colors.module-4e4b7d12.js +6 -0
- package/common.module-b3f0cfca.js +6 -0
- package/component.js +2 -2
- package/cssm/colors.module.css +13 -13
- package/cssm/text/component.d.ts +2 -2
- package/cssm/text/component.js +16 -0
- package/cssm/text/index.module.css +8 -0
- package/cssm/title/component.d.ts +2 -2
- package/esm/colors.css +33 -33
- package/esm/colors.module-ca4c7711.js +4 -0
- package/esm/common.module-936e59c9.js +4 -0
- package/esm/component.js +2 -2
- package/esm/hooks/use-skeleton.css +2 -2
- package/esm/hooks/useSkeleton.js +1 -1
- package/esm/index.js +2 -2
- package/esm/text/component.d.ts +2 -2
- package/esm/text/component.js +18 -2
- package/esm/text/index.css +26 -18
- package/esm/text/index.js +1 -1
- package/esm/title/common.css +5 -5
- package/esm/title/component.d.ts +2 -2
- package/esm/title/component.js +1 -1
- package/esm/title/index.css +19 -19
- package/esm/title/index.js +3 -3
- package/esm/title-mobile/component.js +3 -3
- package/esm/title-mobile/index.css +11 -11
- package/esm/title-mobile/index.js +2 -2
- package/esm/title-responsive/component.js +3 -3
- package/esm/title-responsive/index.css +31 -31
- package/esm/title-responsive/index.js +2 -2
- package/hooks/use-skeleton.css +2 -2
- package/hooks/useSkeleton.js +1 -1
- package/index.js +2 -2
- package/modern/colors.css +33 -33
- package/modern/colors.module-62b0790b.js +4 -0
- package/modern/common.module-d91f4ff7.js +4 -0
- package/modern/component.js +2 -2
- package/modern/hooks/use-skeleton.css +2 -2
- package/modern/hooks/useSkeleton.js +1 -1
- package/modern/index.js +2 -2
- package/modern/text/component.d.ts +2 -2
- package/modern/text/component.js +18 -2
- package/modern/text/index.css +26 -18
- package/modern/text/index.js +1 -1
- package/modern/title/common.css +5 -5
- package/modern/title/component.d.ts +2 -2
- package/modern/title/component.js +1 -1
- package/modern/title/index.css +19 -19
- package/modern/title/index.js +3 -3
- package/modern/title-mobile/component.js +3 -3
- package/modern/title-mobile/index.css +11 -11
- package/modern/title-mobile/index.js +2 -2
- package/modern/title-responsive/component.js +3 -3
- package/modern/title-responsive/index.css +31 -31
- package/modern/title-responsive/index.js +2 -2
- package/package.json +2 -2
- package/src/text/component.tsx +24 -1
- package/src/text/index.module.css +8 -0
- package/src/title/component.tsx +1 -1
- package/text/component.d.ts +2 -2
- package/text/component.js +18 -2
- package/text/index.css +26 -18
- package/text/index.js +1 -1
- package/title/common.css +5 -5
- package/title/component.d.ts +2 -2
- package/title/component.js +1 -1
- package/title/index.css +19 -19
- package/title/index.js +3 -3
- package/title-mobile/component.js +3 -3
- package/title-mobile/index.css +11 -11
- package/title-mobile/index.js +2 -2
- package/title-responsive/component.js +3 -3
- package/title-responsive/index.css +31 -31
- package/title-responsive/index.js +2 -2
- package/colors.module-69def6bf.js +0 -6
- package/common.module-59cc11ca.js +0 -6
- package/esm/colors.module-64858915.js +0 -4
- package/esm/common.module-a0a4a875.js +0 -4
- package/modern/colors.module-58e8caae.js +0 -4
- package/modern/common.module-3d6095da.js +0 -4
package/colors.css
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1plsv */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-accent: #ef3124;
|
|
5
|
-
--color-light-text-attention: #
|
|
6
|
-
--color-light-text-disabled: rgba(
|
|
7
|
-
--color-light-text-link: #
|
|
8
|
-
--color-light-text-negative: #
|
|
9
|
-
--color-light-text-positive: #
|
|
5
|
+
--color-light-text-attention: #ea8313;
|
|
6
|
+
--color-light-text-disabled: rgba(5, 11, 44, 0.18);
|
|
7
|
+
--color-light-text-link: #2a77ef;
|
|
8
|
+
--color-light-text-negative: #ec2e14;
|
|
9
|
+
--color-light-text-positive: #0d9336;
|
|
10
10
|
--color-light-text-primary: #0e0e0e;
|
|
11
11
|
--color-light-text-primary-inverted: #fff;
|
|
12
|
-
--color-light-text-secondary: rgba(
|
|
13
|
-
--color-light-text-secondary-inverted: rgba(
|
|
14
|
-
--color-light-text-tertiary: rgba(
|
|
15
|
-
--color-light-text-tertiary-inverted: rgba(
|
|
12
|
+
--color-light-text-secondary: rgba(4, 4, 19, 0.55);
|
|
13
|
+
--color-light-text-secondary-inverted: rgba(238, 238, 251, 0.55);
|
|
14
|
+
--color-light-text-tertiary: rgba(5, 8, 29, 0.38);
|
|
15
|
+
--color-light-text-tertiary-inverted: rgba(233, 233, 250, 0.37);
|
|
16
16
|
--color-static-text-accent: #ef3124;
|
|
17
17
|
--color-static-text-primary-dark: #0e0e0e;
|
|
18
18
|
--color-static-text-primary-light: #fff;
|
|
19
|
-
--color-static-text-secondary-dark: rgba(
|
|
20
|
-
--color-static-text-secondary-light: rgba(
|
|
21
|
-
--color-static-text-tertiary-dark: rgba(
|
|
22
|
-
--color-static-text-tertiary-light: rgba(
|
|
19
|
+
--color-static-text-secondary-dark: rgba(4, 4, 19, 0.55);
|
|
20
|
+
--color-static-text-secondary-light: rgba(238, 238, 251, 0.55);
|
|
21
|
+
--color-static-text-tertiary-dark: rgba(5, 8, 29, 0.38);
|
|
22
|
+
--color-static-text-tertiary-light: rgba(233, 233, 250, 0.37); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
23
23
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
24
24
|
} :root {
|
|
25
25
|
} :root {
|
|
@@ -33,42 +33,42 @@
|
|
|
33
33
|
} :root {
|
|
34
34
|
} :root {
|
|
35
35
|
} :root {
|
|
36
|
-
} /* colors */ .
|
|
36
|
+
} /* colors */ .typography__tertiary_1ds77 {
|
|
37
37
|
color: var(--color-light-text-tertiary);
|
|
38
|
-
} .
|
|
38
|
+
} .typography__disabled_1ds77 {
|
|
39
39
|
color: var(--color-light-text-disabled);
|
|
40
|
-
} .
|
|
40
|
+
} .typography__accent_1ds77 {
|
|
41
41
|
color: var(--color-light-text-accent);
|
|
42
|
-
} .
|
|
42
|
+
} .typography__primary_1ds77 {
|
|
43
43
|
color: var(--color-light-text-primary);
|
|
44
|
-
} .
|
|
44
|
+
} .typography__attention_1ds77 {
|
|
45
45
|
color: var(--color-light-text-attention);
|
|
46
|
-
} .
|
|
46
|
+
} .typography__positive_1ds77 {
|
|
47
47
|
color: var(--color-light-text-positive);
|
|
48
|
-
} .
|
|
48
|
+
} .typography__secondary_1ds77 {
|
|
49
49
|
color: var(--color-light-text-secondary);
|
|
50
|
-
} .typography__tertiary-
|
|
50
|
+
} .typography__tertiary-inverted_1ds77 {
|
|
51
51
|
color: var(--color-light-text-tertiary-inverted);
|
|
52
|
-
} .typography__primary-
|
|
52
|
+
} .typography__primary-inverted_1ds77 {
|
|
53
53
|
color: var(--color-light-text-primary-inverted);
|
|
54
|
-
} .typography__secondary-
|
|
54
|
+
} .typography__secondary-inverted_1ds77 {
|
|
55
55
|
color: var(--color-light-text-secondary-inverted);
|
|
56
|
-
} .
|
|
56
|
+
} .typography__link_1ds77 {
|
|
57
57
|
color: var(--color-light-text-link);
|
|
58
|
-
} .
|
|
58
|
+
} .typography__negative_1ds77 {
|
|
59
59
|
color: var(--color-light-text-negative);
|
|
60
|
-
} .typography__static-primary-
|
|
60
|
+
} .typography__static-primary-light_1ds77 {
|
|
61
61
|
color: var(--color-static-text-primary-light);
|
|
62
|
-
} .typography__static-secondary-
|
|
62
|
+
} .typography__static-secondary-light_1ds77 {
|
|
63
63
|
color: var(--color-static-text-secondary-light);
|
|
64
|
-
} .typography__static-tertiary-
|
|
64
|
+
} .typography__static-tertiary-light_1ds77 {
|
|
65
65
|
color: var(--color-static-text-tertiary-light);
|
|
66
|
-
} .typography__static-primary-
|
|
66
|
+
} .typography__static-primary-dark_1ds77 {
|
|
67
67
|
color: var(--color-static-text-primary-dark);
|
|
68
|
-
} .typography__static-secondary-
|
|
68
|
+
} .typography__static-secondary-dark_1ds77 {
|
|
69
69
|
color: var(--color-static-text-secondary-dark);
|
|
70
|
-
} .typography__static-tertiary-
|
|
70
|
+
} .typography__static-tertiary-dark_1ds77 {
|
|
71
71
|
color: var(--color-static-text-tertiary-dark);
|
|
72
|
-
} .typography__static-
|
|
72
|
+
} .typography__static-accent_1ds77 {
|
|
73
73
|
color: var(--color-static-text-accent);
|
|
74
74
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var colors = {"tertiary":"typography__tertiary_1ds77","disabled":"typography__disabled_1ds77","accent":"typography__accent_1ds77","primary":"typography__primary_1ds77","attention":"typography__attention_1ds77","positive":"typography__positive_1ds77","secondary":"typography__secondary_1ds77","tertiary-inverted":"typography__tertiary-inverted_1ds77","primary-inverted":"typography__primary-inverted_1ds77","secondary-inverted":"typography__secondary-inverted_1ds77","link":"typography__link_1ds77","negative":"typography__negative_1ds77","static-primary-light":"typography__static-primary-light_1ds77","static-secondary-light":"typography__static-secondary-light_1ds77","static-tertiary-light":"typography__static-tertiary-light_1ds77","static-primary-dark":"typography__static-primary-dark_1ds77","static-secondary-dark":"typography__static-secondary-dark_1ds77","static-tertiary-dark":"typography__static-tertiary-dark_1ds77","static-accent":"typography__static-accent_1ds77"};
|
|
4
|
+
require('./colors.css')
|
|
5
|
+
|
|
6
|
+
exports.colors = colors;
|
package/component.js
CHANGED
|
@@ -13,9 +13,9 @@ require('classnames');
|
|
|
13
13
|
require('./hooks/useSkeleton.js');
|
|
14
14
|
require('@alfalab/core-components-skeleton');
|
|
15
15
|
require('@alfalab/hooks');
|
|
16
|
-
require('./colors.module-
|
|
16
|
+
require('./colors.module-4e4b7d12.js');
|
|
17
17
|
require('./title/component.js');
|
|
18
|
-
require('./common.module-
|
|
18
|
+
require('./common.module-b3f0cfca.js');
|
|
19
19
|
|
|
20
20
|
var Typography = {
|
|
21
21
|
Title: title_index.Title,
|
package/cssm/colors.module.css
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
} /* deprecated */ :root {
|
|
3
3
|
--color-light-text-accent: #ef3124;
|
|
4
|
-
--color-light-text-attention: #
|
|
5
|
-
--color-light-text-disabled: rgba(
|
|
6
|
-
--color-light-text-link: #
|
|
7
|
-
--color-light-text-negative: #
|
|
8
|
-
--color-light-text-positive: #
|
|
4
|
+
--color-light-text-attention: #ea8313;
|
|
5
|
+
--color-light-text-disabled: rgba(5, 11, 44, 0.18);
|
|
6
|
+
--color-light-text-link: #2a77ef;
|
|
7
|
+
--color-light-text-negative: #ec2e14;
|
|
8
|
+
--color-light-text-positive: #0d9336;
|
|
9
9
|
--color-light-text-primary: #0e0e0e;
|
|
10
10
|
--color-light-text-primary-inverted: #fff;
|
|
11
|
-
--color-light-text-secondary: rgba(
|
|
12
|
-
--color-light-text-secondary-inverted: rgba(
|
|
13
|
-
--color-light-text-tertiary: rgba(
|
|
14
|
-
--color-light-text-tertiary-inverted: rgba(
|
|
11
|
+
--color-light-text-secondary: rgba(4, 4, 19, 0.55);
|
|
12
|
+
--color-light-text-secondary-inverted: rgba(238, 238, 251, 0.55);
|
|
13
|
+
--color-light-text-tertiary: rgba(5, 8, 29, 0.38);
|
|
14
|
+
--color-light-text-tertiary-inverted: rgba(233, 233, 250, 0.37);
|
|
15
15
|
--color-static-text-accent: #ef3124;
|
|
16
16
|
--color-static-text-primary-dark: #0e0e0e;
|
|
17
17
|
--color-static-text-primary-light: #fff;
|
|
18
|
-
--color-static-text-secondary-dark: rgba(
|
|
19
|
-
--color-static-text-secondary-light: rgba(
|
|
20
|
-
--color-static-text-tertiary-dark: rgba(
|
|
21
|
-
--color-static-text-tertiary-light: rgba(
|
|
18
|
+
--color-static-text-secondary-dark: rgba(4, 4, 19, 0.55);
|
|
19
|
+
--color-static-text-secondary-light: rgba(238, 238, 251, 0.55);
|
|
20
|
+
--color-static-text-tertiary-dark: rgba(5, 8, 29, 0.38);
|
|
21
|
+
--color-static-text-tertiary-light: rgba(233, 233, 250, 0.37); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
22
22
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
23
23
|
} :root {
|
|
24
24
|
} :root {
|
package/cssm/text/component.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ type TextBaseProps = {
|
|
|
8
8
|
/**
|
|
9
9
|
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
|
|
10
10
|
*/
|
|
11
|
-
view?: 'primary-large' | 'primary-medium' | 'primary-small' | 'secondary-large' | 'secondary-medium' | 'secondary-small' | 'component' | 'caps';
|
|
11
|
+
view?: 'primary-large' | 'primary-medium' | 'primary-small' | 'secondary-large' | 'secondary-medium' | 'secondary-small' | 'component' | 'component-primary' | 'component-secondary' | 'caps';
|
|
12
12
|
/**
|
|
13
13
|
* Цвет текста
|
|
14
14
|
*/
|
|
@@ -42,7 +42,7 @@ type TextBaseProps = {
|
|
|
42
42
|
*/
|
|
43
43
|
defaultMargins?: never;
|
|
44
44
|
/**
|
|
45
|
-
* Количество строк
|
|
45
|
+
* Количество строк
|
|
46
46
|
*/
|
|
47
47
|
rowLimit?: 1 | 2 | 3;
|
|
48
48
|
/**
|
package/cssm/text/component.js
CHANGED
|
@@ -21,9 +21,25 @@ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
|
21
21
|
var colors__default = /*#__PURE__*/_interopDefaultCompat(colors);
|
|
22
22
|
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
23
23
|
|
|
24
|
+
var logWarning = function (view) {
|
|
25
|
+
if (process.env.NODE_ENV !== 'development') {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
var viewsMap = {
|
|
29
|
+
component: 'component-primary',
|
|
30
|
+
};
|
|
31
|
+
// eslint-disable-next-line no-console
|
|
32
|
+
console.warn(
|
|
33
|
+
// eslint-disable-next-line prefer-template
|
|
34
|
+
"@alfalab/core-components/typography: view='".concat(view, "' \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043B\u0435\u043D \u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0445 \u043C\u0430\u0436\u043E\u0440\u043D\u044B\u0445 \u0432\u0435\u0440\u0441\u0438\u044F\u0445. ") +
|
|
35
|
+
"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 view='".concat(viewsMap[view], "'."));
|
|
36
|
+
};
|
|
24
37
|
var Text = React.forwardRef(function (_a, ref) {
|
|
25
38
|
var _b, _c;
|
|
26
39
|
var _d = _a.view, view = _d === void 0 ? 'primary-medium' : _d, _e = _a.tag, Component = _e === void 0 ? 'span' : _e, weight = _a.weight, _f = _a.monospaceNumbers, monospaceNumbers = _f === void 0 ? false : _f, _g = _a.defaultMargins, defaultMargins = _g === void 0 ? true : _g, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, rowLimit = _a.rowLimit, showSkeleton = _a.showSkeleton, skeletonProps = _a.skeletonProps, restProps = tslib.__rest(_a, ["view", "tag", "weight", "monospaceNumbers", "defaultMargins", "color", "className", "dataTestId", "children", "rowLimit", "showSkeleton", "skeletonProps"]);
|
|
40
|
+
if (view === 'component') {
|
|
41
|
+
logWarning(view);
|
|
42
|
+
}
|
|
27
43
|
var _h = hooks_useSkeleton.useSkeleton(showSkeleton, skeletonProps), renderSkeleton = _h.renderSkeleton, textRef = _h.textRef;
|
|
28
44
|
var skeleton = renderSkeleton({
|
|
29
45
|
wrapperClassName: cn__default.default((_b = {},
|
|
@@ -50,6 +50,14 @@
|
|
|
50
50
|
font-size: 16px;
|
|
51
51
|
line-height: 20px;
|
|
52
52
|
font-weight: 400;
|
|
53
|
+
} .component-primary {
|
|
54
|
+
font-size: 16px;
|
|
55
|
+
line-height: 20px;
|
|
56
|
+
font-weight: 400;
|
|
57
|
+
} .component-secondary {
|
|
58
|
+
font-size: 14px;
|
|
59
|
+
line-height: 18px;
|
|
60
|
+
font-weight: 400;
|
|
53
61
|
} .caps {
|
|
54
62
|
font-size: 12px;
|
|
55
63
|
line-height: 16px;
|
|
@@ -42,7 +42,7 @@ type TitleProps = Omit<NativeProps, 'color'> & {
|
|
|
42
42
|
*/
|
|
43
43
|
children?: React.ReactNode;
|
|
44
44
|
/**
|
|
45
|
-
* Количество строк
|
|
45
|
+
* Количество строк
|
|
46
46
|
*/
|
|
47
47
|
rowLimit?: 1 | 2 | 3;
|
|
48
48
|
/**
|
|
@@ -98,7 +98,7 @@ declare const Title: React.ForwardRefExoticComponent<Omit<NativeProps, "color">
|
|
|
98
98
|
*/
|
|
99
99
|
children?: React.ReactNode;
|
|
100
100
|
/**
|
|
101
|
-
* Количество строк
|
|
101
|
+
* Количество строк
|
|
102
102
|
*/
|
|
103
103
|
rowLimit?: 1 | 2 | 3 | undefined;
|
|
104
104
|
/**
|
package/esm/colors.css
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1plsv */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-accent: #ef3124;
|
|
5
|
-
--color-light-text-attention: #
|
|
6
|
-
--color-light-text-disabled: rgba(
|
|
7
|
-
--color-light-text-link: #
|
|
8
|
-
--color-light-text-negative: #
|
|
9
|
-
--color-light-text-positive: #
|
|
5
|
+
--color-light-text-attention: #ea8313;
|
|
6
|
+
--color-light-text-disabled: rgba(5, 11, 44, 0.18);
|
|
7
|
+
--color-light-text-link: #2a77ef;
|
|
8
|
+
--color-light-text-negative: #ec2e14;
|
|
9
|
+
--color-light-text-positive: #0d9336;
|
|
10
10
|
--color-light-text-primary: #0e0e0e;
|
|
11
11
|
--color-light-text-primary-inverted: #fff;
|
|
12
|
-
--color-light-text-secondary: rgba(
|
|
13
|
-
--color-light-text-secondary-inverted: rgba(
|
|
14
|
-
--color-light-text-tertiary: rgba(
|
|
15
|
-
--color-light-text-tertiary-inverted: rgba(
|
|
12
|
+
--color-light-text-secondary: rgba(4, 4, 19, 0.55);
|
|
13
|
+
--color-light-text-secondary-inverted: rgba(238, 238, 251, 0.55);
|
|
14
|
+
--color-light-text-tertiary: rgba(5, 8, 29, 0.38);
|
|
15
|
+
--color-light-text-tertiary-inverted: rgba(233, 233, 250, 0.37);
|
|
16
16
|
--color-static-text-accent: #ef3124;
|
|
17
17
|
--color-static-text-primary-dark: #0e0e0e;
|
|
18
18
|
--color-static-text-primary-light: #fff;
|
|
19
|
-
--color-static-text-secondary-dark: rgba(
|
|
20
|
-
--color-static-text-secondary-light: rgba(
|
|
21
|
-
--color-static-text-tertiary-dark: rgba(
|
|
22
|
-
--color-static-text-tertiary-light: rgba(
|
|
19
|
+
--color-static-text-secondary-dark: rgba(4, 4, 19, 0.55);
|
|
20
|
+
--color-static-text-secondary-light: rgba(238, 238, 251, 0.55);
|
|
21
|
+
--color-static-text-tertiary-dark: rgba(5, 8, 29, 0.38);
|
|
22
|
+
--color-static-text-tertiary-light: rgba(233, 233, 250, 0.37); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
23
23
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
24
24
|
} :root {
|
|
25
25
|
} :root {
|
|
@@ -33,42 +33,42 @@
|
|
|
33
33
|
} :root {
|
|
34
34
|
} :root {
|
|
35
35
|
} :root {
|
|
36
|
-
} /* colors */ .
|
|
36
|
+
} /* colors */ .typography__tertiary_1ds77 {
|
|
37
37
|
color: var(--color-light-text-tertiary);
|
|
38
|
-
} .
|
|
38
|
+
} .typography__disabled_1ds77 {
|
|
39
39
|
color: var(--color-light-text-disabled);
|
|
40
|
-
} .
|
|
40
|
+
} .typography__accent_1ds77 {
|
|
41
41
|
color: var(--color-light-text-accent);
|
|
42
|
-
} .
|
|
42
|
+
} .typography__primary_1ds77 {
|
|
43
43
|
color: var(--color-light-text-primary);
|
|
44
|
-
} .
|
|
44
|
+
} .typography__attention_1ds77 {
|
|
45
45
|
color: var(--color-light-text-attention);
|
|
46
|
-
} .
|
|
46
|
+
} .typography__positive_1ds77 {
|
|
47
47
|
color: var(--color-light-text-positive);
|
|
48
|
-
} .
|
|
48
|
+
} .typography__secondary_1ds77 {
|
|
49
49
|
color: var(--color-light-text-secondary);
|
|
50
|
-
} .typography__tertiary-
|
|
50
|
+
} .typography__tertiary-inverted_1ds77 {
|
|
51
51
|
color: var(--color-light-text-tertiary-inverted);
|
|
52
|
-
} .typography__primary-
|
|
52
|
+
} .typography__primary-inverted_1ds77 {
|
|
53
53
|
color: var(--color-light-text-primary-inverted);
|
|
54
|
-
} .typography__secondary-
|
|
54
|
+
} .typography__secondary-inverted_1ds77 {
|
|
55
55
|
color: var(--color-light-text-secondary-inverted);
|
|
56
|
-
} .
|
|
56
|
+
} .typography__link_1ds77 {
|
|
57
57
|
color: var(--color-light-text-link);
|
|
58
|
-
} .
|
|
58
|
+
} .typography__negative_1ds77 {
|
|
59
59
|
color: var(--color-light-text-negative);
|
|
60
|
-
} .typography__static-primary-
|
|
60
|
+
} .typography__static-primary-light_1ds77 {
|
|
61
61
|
color: var(--color-static-text-primary-light);
|
|
62
|
-
} .typography__static-secondary-
|
|
62
|
+
} .typography__static-secondary-light_1ds77 {
|
|
63
63
|
color: var(--color-static-text-secondary-light);
|
|
64
|
-
} .typography__static-tertiary-
|
|
64
|
+
} .typography__static-tertiary-light_1ds77 {
|
|
65
65
|
color: var(--color-static-text-tertiary-light);
|
|
66
|
-
} .typography__static-primary-
|
|
66
|
+
} .typography__static-primary-dark_1ds77 {
|
|
67
67
|
color: var(--color-static-text-primary-dark);
|
|
68
|
-
} .typography__static-secondary-
|
|
68
|
+
} .typography__static-secondary-dark_1ds77 {
|
|
69
69
|
color: var(--color-static-text-secondary-dark);
|
|
70
|
-
} .typography__static-tertiary-
|
|
70
|
+
} .typography__static-tertiary-dark_1ds77 {
|
|
71
71
|
color: var(--color-static-text-tertiary-dark);
|
|
72
|
-
} .typography__static-
|
|
72
|
+
} .typography__static-accent_1ds77 {
|
|
73
73
|
color: var(--color-static-text-accent);
|
|
74
74
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var colors = {"tertiary":"typography__tertiary_1ds77","disabled":"typography__disabled_1ds77","accent":"typography__accent_1ds77","primary":"typography__primary_1ds77","attention":"typography__attention_1ds77","positive":"typography__positive_1ds77","secondary":"typography__secondary_1ds77","tertiary-inverted":"typography__tertiary-inverted_1ds77","primary-inverted":"typography__primary-inverted_1ds77","secondary-inverted":"typography__secondary-inverted_1ds77","link":"typography__link_1ds77","negative":"typography__negative_1ds77","static-primary-light":"typography__static-primary-light_1ds77","static-secondary-light":"typography__static-secondary-light_1ds77","static-tertiary-light":"typography__static-tertiary-light_1ds77","static-primary-dark":"typography__static-primary-dark_1ds77","static-secondary-dark":"typography__static-secondary-dark_1ds77","static-tertiary-dark":"typography__static-tertiary-dark_1ds77","static-accent":"typography__static-accent_1ds77"};
|
|
2
|
+
require('./colors.css')
|
|
3
|
+
|
|
4
|
+
export { colors as c };
|
package/esm/component.js
CHANGED
|
@@ -9,9 +9,9 @@ import 'classnames';
|
|
|
9
9
|
import './hooks/useSkeleton.js';
|
|
10
10
|
import '@alfalab/core-components-skeleton/esm';
|
|
11
11
|
import '@alfalab/hooks';
|
|
12
|
-
import './colors.module-
|
|
12
|
+
import './colors.module-ca4c7711.js';
|
|
13
13
|
import './title/component.js';
|
|
14
|
-
import './common.module-
|
|
14
|
+
import './common.module-936e59c9.js';
|
|
15
15
|
|
|
16
16
|
var Typography = {
|
|
17
17
|
Title: Title,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 7pfjn */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .typography__skeletonText_395pe.typography__skeletonText_395pe {
|
|
19
19
|
border-radius: var(--border-radius-pill);
|
|
20
20
|
}
|
package/esm/hooks/useSkeleton.js
CHANGED
|
@@ -3,7 +3,7 @@ import React, { useState, useRef } from 'react';
|
|
|
3
3
|
import { Skeleton } from '@alfalab/core-components-skeleton/esm';
|
|
4
4
|
import { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
|
|
5
5
|
|
|
6
|
-
var styles = {"skeletonText":"
|
|
6
|
+
var styles = {"skeletonText":"typography__skeletonText_395pe"};
|
|
7
7
|
require('./use-skeleton.css')
|
|
8
8
|
|
|
9
9
|
function useSkeleton(showSkeleton, skeletonProps) {
|
package/esm/index.js
CHANGED
|
@@ -8,9 +8,9 @@ import 'classnames';
|
|
|
8
8
|
import './hooks/useSkeleton.js';
|
|
9
9
|
import '@alfalab/core-components-skeleton/esm';
|
|
10
10
|
import '@alfalab/hooks';
|
|
11
|
-
import './colors.module-
|
|
11
|
+
import './colors.module-ca4c7711.js';
|
|
12
12
|
import './title/index.js';
|
|
13
13
|
import './title/component.js';
|
|
14
|
-
import './common.module-
|
|
14
|
+
import './common.module-936e59c9.js';
|
|
15
15
|
import './title-mobile/component.js';
|
|
16
16
|
import './title-responsive/component.js';
|
package/esm/text/component.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ type TextBaseProps = {
|
|
|
8
8
|
/**
|
|
9
9
|
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
|
|
10
10
|
*/
|
|
11
|
-
view?: 'primary-large' | 'primary-medium' | 'primary-small' | 'secondary-large' | 'secondary-medium' | 'secondary-small' | 'component' | 'caps';
|
|
11
|
+
view?: 'primary-large' | 'primary-medium' | 'primary-small' | 'secondary-large' | 'secondary-medium' | 'secondary-small' | 'component' | 'component-primary' | 'component-secondary' | 'caps';
|
|
12
12
|
/**
|
|
13
13
|
* Цвет текста
|
|
14
14
|
*/
|
|
@@ -42,7 +42,7 @@ type TextBaseProps = {
|
|
|
42
42
|
*/
|
|
43
43
|
defaultMargins?: never;
|
|
44
44
|
/**
|
|
45
|
-
* Количество строк
|
|
45
|
+
* Количество строк
|
|
46
46
|
*/
|
|
47
47
|
rowLimit?: 1 | 2 | 3;
|
|
48
48
|
/**
|
package/esm/text/component.js
CHANGED
|
@@ -3,16 +3,32 @@ import React, { forwardRef } from 'react';
|
|
|
3
3
|
import mergeRefs from 'react-merge-refs';
|
|
4
4
|
import cn from 'classnames';
|
|
5
5
|
import { useSkeleton } from '../hooks/useSkeleton.js';
|
|
6
|
-
import { c as colors } from '../colors.module-
|
|
6
|
+
import { c as colors } from '../colors.module-ca4c7711.js';
|
|
7
7
|
import '@alfalab/core-components-skeleton/esm';
|
|
8
8
|
import '@alfalab/hooks';
|
|
9
9
|
|
|
10
|
-
var styles = {"paragraph":"
|
|
10
|
+
var styles = {"paragraph":"typography__paragraph_1v3aj","paragraphWithMargins":"typography__paragraphWithMargins_1v3aj","primary-large":"typography__primary-large_1v3aj","primary-medium":"typography__primary-medium_1v3aj","primary-small":"typography__primary-small_1v3aj","secondary-large":"typography__secondary-large_1v3aj","secondary-medium":"typography__secondary-medium_1v3aj","secondary-small":"typography__secondary-small_1v3aj","component":"typography__component_1v3aj","component-primary":"typography__component-primary_1v3aj","component-secondary":"typography__component-secondary_1v3aj","caps":"typography__caps_1v3aj","bold":"typography__bold_1v3aj","medium":"typography__medium_1v3aj","regular":"typography__regular_1v3aj","monospace":"typography__monospace_1v3aj","rowLimit1":"typography__rowLimit1_1v3aj","rowLimit2":"typography__rowLimit2_1v3aj","rowLimit3":"typography__rowLimit3_1v3aj"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
|
+
var logWarning = function (view) {
|
|
14
|
+
if (process.env.NODE_ENV !== 'development') {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
var viewsMap = {
|
|
18
|
+
component: 'component-primary',
|
|
19
|
+
};
|
|
20
|
+
// eslint-disable-next-line no-console
|
|
21
|
+
console.warn(
|
|
22
|
+
// eslint-disable-next-line prefer-template
|
|
23
|
+
"@alfalab/core-components/typography: view='".concat(view, "' \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043B\u0435\u043D \u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0445 \u043C\u0430\u0436\u043E\u0440\u043D\u044B\u0445 \u0432\u0435\u0440\u0441\u0438\u044F\u0445. ") +
|
|
24
|
+
"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 view='".concat(viewsMap[view], "'."));
|
|
25
|
+
};
|
|
13
26
|
var Text = forwardRef(function (_a, ref) {
|
|
14
27
|
var _b, _c;
|
|
15
28
|
var _d = _a.view, view = _d === void 0 ? 'primary-medium' : _d, _e = _a.tag, Component = _e === void 0 ? 'span' : _e, weight = _a.weight, _f = _a.monospaceNumbers, monospaceNumbers = _f === void 0 ? false : _f, _g = _a.defaultMargins, defaultMargins = _g === void 0 ? true : _g, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, rowLimit = _a.rowLimit, showSkeleton = _a.showSkeleton, skeletonProps = _a.skeletonProps, restProps = __rest(_a, ["view", "tag", "weight", "monospaceNumbers", "defaultMargins", "color", "className", "dataTestId", "children", "rowLimit", "showSkeleton", "skeletonProps"]);
|
|
29
|
+
if (view === 'component') {
|
|
30
|
+
logWarning(view);
|
|
31
|
+
}
|
|
16
32
|
var _h = useSkeleton(showSkeleton, skeletonProps), renderSkeleton = _h.renderSkeleton, textRef = _h.textRef;
|
|
17
33
|
var skeleton = renderSkeleton({
|
|
18
34
|
wrapperClassName: cn((_b = {},
|
package/esm/text/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 7mago */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,66 +17,74 @@
|
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
19
|
--text-paragraph-margin-bottom: 0 0 var(--gap-s);
|
|
20
|
-
} .
|
|
20
|
+
} .typography__paragraph_1v3aj {
|
|
21
21
|
margin: 0;
|
|
22
22
|
padding: 0;
|
|
23
|
-
} .
|
|
23
|
+
} .typography__paragraphWithMargins_1v3aj {
|
|
24
24
|
padding: 0;
|
|
25
25
|
margin: var(--text-paragraph-margin-bottom);
|
|
26
|
-
} .typography__primary-
|
|
26
|
+
} .typography__primary-large_1v3aj {
|
|
27
27
|
font-size: 18px;
|
|
28
28
|
line-height: 24px;
|
|
29
29
|
font-weight: 400;
|
|
30
|
-
} .typography__primary-
|
|
30
|
+
} .typography__primary-medium_1v3aj {
|
|
31
31
|
font-size: 16px;
|
|
32
32
|
line-height: 24px;
|
|
33
33
|
font-weight: 400;
|
|
34
|
-
} .typography__primary-
|
|
34
|
+
} .typography__primary-small_1v3aj {
|
|
35
35
|
font-size: 14px;
|
|
36
36
|
line-height: 20px;
|
|
37
37
|
font-weight: 400;
|
|
38
|
-
} .typography__secondary-
|
|
38
|
+
} .typography__secondary-large_1v3aj {
|
|
39
39
|
font-size: 13px;
|
|
40
40
|
line-height: 16px;
|
|
41
41
|
font-weight: 400;
|
|
42
|
-
} .typography__secondary-
|
|
42
|
+
} .typography__secondary-medium_1v3aj {
|
|
43
43
|
font-size: 12px;
|
|
44
44
|
line-height: 16px;
|
|
45
45
|
font-weight: 400;
|
|
46
|
-
} .typography__secondary-
|
|
46
|
+
} .typography__secondary-small_1v3aj {
|
|
47
47
|
font-size: 11px;
|
|
48
48
|
line-height: 16px;
|
|
49
49
|
font-weight: 400;
|
|
50
|
-
} .
|
|
50
|
+
} .typography__component_1v3aj {
|
|
51
51
|
font-size: 16px;
|
|
52
52
|
line-height: 20px;
|
|
53
53
|
font-weight: 400;
|
|
54
|
-
} .
|
|
54
|
+
} .typography__component-primary_1v3aj {
|
|
55
|
+
font-size: 16px;
|
|
56
|
+
line-height: 20px;
|
|
57
|
+
font-weight: 400;
|
|
58
|
+
} .typography__component-secondary_1v3aj {
|
|
59
|
+
font-size: 14px;
|
|
60
|
+
line-height: 18px;
|
|
61
|
+
font-weight: 400;
|
|
62
|
+
} .typography__caps_1v3aj {
|
|
55
63
|
font-size: 12px;
|
|
56
64
|
line-height: 16px;
|
|
57
65
|
font-weight: 500;
|
|
58
66
|
letter-spacing: 1.25px;
|
|
59
67
|
text-transform: uppercase;
|
|
60
|
-
} .
|
|
68
|
+
} .typography__bold_1v3aj {
|
|
61
69
|
font-weight: bold;
|
|
62
|
-
} .
|
|
70
|
+
} .typography__medium_1v3aj {
|
|
63
71
|
font-weight: 500;
|
|
64
|
-
} .
|
|
72
|
+
} .typography__regular_1v3aj {
|
|
65
73
|
font-weight: normal;
|
|
66
|
-
} .
|
|
74
|
+
} .typography__monospace_1v3aj {
|
|
67
75
|
font-variant-numeric: tabular-nums;
|
|
68
|
-
} .
|
|
76
|
+
} .typography__rowLimit1_1v3aj {
|
|
69
77
|
-webkit-line-clamp: 1;
|
|
70
78
|
display: -webkit-box;
|
|
71
79
|
-webkit-box-orient: vertical;
|
|
72
80
|
overflow: hidden;
|
|
73
81
|
word-break: break-all;
|
|
74
|
-
} .
|
|
82
|
+
} .typography__rowLimit2_1v3aj {
|
|
75
83
|
-webkit-line-clamp: 2;
|
|
76
84
|
display: -webkit-box;
|
|
77
85
|
-webkit-box-orient: vertical;
|
|
78
86
|
overflow: hidden;
|
|
79
|
-
} .
|
|
87
|
+
} .typography__rowLimit3_1v3aj {
|
|
80
88
|
-webkit-line-clamp: 3;
|
|
81
89
|
display: -webkit-box;
|
|
82
90
|
-webkit-box-orient: vertical;
|
package/esm/text/index.js
CHANGED
package/esm/title/common.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
.
|
|
1
|
+
/* hash: amyct */
|
|
2
|
+
.typography__component_thq70 {
|
|
3
3
|
margin: 0;
|
|
4
4
|
padding: 0
|
|
5
5
|
}
|
|
6
|
-
.
|
|
6
|
+
.typography__component_thq70.typography__bold_thq70 {
|
|
7
7
|
font-weight: bold;
|
|
8
8
|
}
|
|
9
|
-
.
|
|
9
|
+
.typography__component_thq70.typography__medium_thq70 {
|
|
10
10
|
font-weight: 500;
|
|
11
11
|
}
|
|
12
|
-
.
|
|
12
|
+
.typography__component_thq70.typography__regular_thq70 {
|
|
13
13
|
font-weight: normal;
|
|
14
14
|
}
|