@alfalab/core-components-typography 3.0.7 → 3.1.0
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 +13 -13
- package/{colors.module-bf5cdf66.d.ts → colors.module-bc993287.d.ts} +0 -0
- package/{colors.module-bf5cdf66.js → colors.module-bc993287.js} +1 -1
- package/common.module-0a9ad0fb.js +6 -0
- package/component.js +2 -2
- package/cssm/text/component.d.ts +5 -1
- package/cssm/text/component.js +2 -1
- package/cssm/text/index.module.css +19 -0
- package/cssm/title/common.module.css +11 -14
- package/cssm/title/component.d.ts +10 -2
- package/cssm/title/component.js +3 -2
- package/cssm/title/index.module.css +18 -8
- package/cssm/title-mobile/index.module.css +0 -9
- package/esm/colors.css +13 -13
- package/esm/{colors.module-6165745a.d.ts → colors.module-42065957.d.ts} +0 -0
- package/esm/{colors.module-6165745a.js → colors.module-42065957.js} +1 -1
- package/esm/common.module-cc423fc9.js +4 -0
- package/esm/component.js +2 -2
- package/esm/index.js +2 -2
- package/esm/text/component.d.ts +5 -1
- package/esm/text/component.js +4 -3
- package/esm/text/index.css +34 -15
- package/esm/text/index.js +1 -1
- package/esm/title/common.css +13 -16
- package/esm/title/component.d.ts +10 -2
- package/esm/title/component.js +4 -3
- package/esm/title/index.css +34 -24
- package/esm/title/index.js +3 -3
- package/esm/title-mobile/component.js +3 -3
- package/esm/title-mobile/index.css +11 -20
- package/esm/title-mobile/index.js +2 -2
- package/esm/title-responsive/component.js +3 -3
- package/esm/title-responsive/index.css +41 -41
- package/esm/title-responsive/index.js +2 -2
- package/index.js +2 -2
- package/modern/colors.css +13 -13
- package/modern/colors.module-cbb33ea7.js +4 -0
- package/modern/common.module-13ae7781.js +4 -0
- package/modern/component.js +2 -2
- package/modern/index.js +2 -2
- package/modern/text/component.d.ts +5 -1
- package/modern/text/component.js +4 -3
- package/modern/text/index.css +34 -15
- package/modern/text/index.js +1 -1
- package/modern/title/common.css +13 -16
- package/modern/title/component.d.ts +10 -2
- package/modern/title/component.js +2 -2
- package/modern/title/index.css +34 -24
- package/modern/title/index.js +3 -3
- package/modern/title-mobile/component.js +3 -3
- package/modern/title-mobile/index.css +11 -20
- package/modern/title-mobile/index.js +2 -2
- package/modern/title-responsive/component.js +3 -3
- package/modern/title-responsive/index.css +41 -41
- package/modern/title-responsive/index.js +2 -2
- package/package.json +1 -1
- package/text/component.d.ts +5 -1
- package/text/component.js +4 -3
- package/text/index.css +34 -15
- package/text/index.js +1 -1
- package/title/common.css +13 -16
- package/title/component.d.ts +10 -2
- package/title/component.js +4 -3
- package/title/index.css +34 -24
- package/title/index.js +3 -3
- package/title-mobile/component.js +3 -3
- package/title-mobile/index.css +11 -20
- package/title-mobile/index.js +2 -2
- package/title-responsive/component.js +3 -3
- package/title-responsive/index.css +41 -41
- package/title-responsive/index.js +2 -2
- package/common.module-8c6b627f.js +0 -6
- package/esm/common.module-4ce0321b.js +0 -4
- package/modern/colors.module-e62b3a57.js +0 -4
- package/modern/common.module-9d782690.js +0 -4
package/colors.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: i62g2 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-accent: #ef3124;
|
|
4
4
|
--color-light-text-attention: #de6a00;
|
|
@@ -22,39 +22,39 @@
|
|
|
22
22
|
/* Hard up */
|
|
23
23
|
}
|
|
24
24
|
/* colors */
|
|
25
|
-
.
|
|
25
|
+
.typography__tertiary_5mg9e {
|
|
26
26
|
color: var(--color-light-text-tertiary);
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
.typography__disabled_5mg9e {
|
|
29
29
|
color: var(--color-light-text-disabled);
|
|
30
30
|
}
|
|
31
|
-
.
|
|
31
|
+
.typography__accent_5mg9e {
|
|
32
32
|
color: var(--color-light-text-accent);
|
|
33
33
|
}
|
|
34
|
-
.
|
|
34
|
+
.typography__primary_5mg9e {
|
|
35
35
|
color: var(--color-light-text-primary);
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
.typography__attention_5mg9e {
|
|
38
38
|
color: var(--color-light-text-attention);
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.typography__positive_5mg9e {
|
|
41
41
|
color: var(--color-light-text-positive);
|
|
42
42
|
}
|
|
43
|
-
.
|
|
43
|
+
.typography__secondary_5mg9e {
|
|
44
44
|
color: var(--color-light-text-secondary);
|
|
45
45
|
}
|
|
46
|
-
.typography__tertiary-
|
|
46
|
+
.typography__tertiary-inverted_5mg9e {
|
|
47
47
|
color: var(--color-light-text-tertiary-inverted);
|
|
48
48
|
}
|
|
49
|
-
.typography__primary-
|
|
49
|
+
.typography__primary-inverted_5mg9e {
|
|
50
50
|
color: var(--color-light-text-primary-inverted);
|
|
51
51
|
}
|
|
52
|
-
.typography__secondary-
|
|
52
|
+
.typography__secondary-inverted_5mg9e {
|
|
53
53
|
color: var(--color-light-text-secondary-inverted);
|
|
54
54
|
}
|
|
55
|
-
.
|
|
55
|
+
.typography__link_5mg9e {
|
|
56
56
|
color: var(--color-light-text-link);
|
|
57
57
|
}
|
|
58
|
-
.
|
|
58
|
+
.typography__negative_5mg9e {
|
|
59
59
|
color: var(--color-light-text-negative);
|
|
60
60
|
}
|
|
File without changes
|
|
@@ -39,7 +39,7 @@ function __rest(s, e) {
|
|
|
39
39
|
return t;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
var colors = {"tertiary":"
|
|
42
|
+
var colors = {"tertiary":"typography__tertiary_5mg9e","disabled":"typography__disabled_5mg9e","accent":"typography__accent_5mg9e","primary":"typography__primary_5mg9e","attention":"typography__attention_5mg9e","positive":"typography__positive_5mg9e","secondary":"typography__secondary_5mg9e","tertiary-inverted":"typography__tertiary-inverted_5mg9e","primary-inverted":"typography__primary-inverted_5mg9e","secondary-inverted":"typography__secondary-inverted_5mg9e","link":"typography__link_5mg9e","negative":"typography__negative_5mg9e"};
|
|
43
43
|
require('./colors.css')
|
|
44
44
|
|
|
45
45
|
exports.__rest = __rest;
|
package/component.js
CHANGED
|
@@ -4,11 +4,11 @@ var text_component = require('./text/component.js');
|
|
|
4
4
|
var title_index = require('./title/index.js');
|
|
5
5
|
var titleMobile_component = require('./title-mobile/component.js');
|
|
6
6
|
var titleResponsive_component = require('./title-responsive/component.js');
|
|
7
|
-
require('./colors.module-
|
|
7
|
+
require('./colors.module-bc993287.js');
|
|
8
8
|
require('react');
|
|
9
9
|
require('classnames');
|
|
10
10
|
require('./title/component.js');
|
|
11
|
-
require('./common.module-
|
|
11
|
+
require('./common.module-0a9ad0fb.js');
|
|
12
12
|
|
|
13
13
|
var Typography = {
|
|
14
14
|
Title: title_index.Title,
|
package/cssm/text/component.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { TextElementType } from "../types";
|
|
|
6
6
|
type NativeProps = HTMLAttributes<HTMLSpanElement>;
|
|
7
7
|
type TextBaseProps = {
|
|
8
8
|
/**
|
|
9
|
-
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs
|
|
9
|
+
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
|
|
10
10
|
*/
|
|
11
11
|
view?: 'primary-large' | 'primary-medium' | 'primary-small' | 'secondary-large' | 'secondary-medium' | 'secondary-small' | 'component' | 'caps';
|
|
12
12
|
/**
|
|
@@ -41,6 +41,10 @@ type TextBaseProps = {
|
|
|
41
41
|
* Добавляет отступы к тэгу 'p'
|
|
42
42
|
*/
|
|
43
43
|
defaultMargins?: never;
|
|
44
|
+
/**
|
|
45
|
+
* Количество строк (не поддерживает IE)
|
|
46
|
+
*/
|
|
47
|
+
rowLimit?: 1 | 2 | 3;
|
|
44
48
|
};
|
|
45
49
|
type TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {
|
|
46
50
|
tag?: 'p';
|
package/cssm/text/component.js
CHANGED
|
@@ -15,11 +15,12 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
|
15
15
|
|
|
16
16
|
var Text = React.forwardRef(function (_a, ref) {
|
|
17
17
|
var _b;
|
|
18
|
-
var _c = _a.view, view = _c === void 0 ? 'primary-medium' : _c, _d = _a.tag, Component = _d === void 0 ? 'span' : _d, weight = _a.weight, _e = _a.monospaceNumbers, monospaceNumbers = _e === void 0 ? false : _e, _f = _a.defaultMargins, defaultMargins = _f === void 0 ? true : _f, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, restProps = tslib_es6.__rest(_a, ["view", "tag", "weight", "monospaceNumbers", "defaultMargins", "color", "className", "dataTestId", "children"]);
|
|
18
|
+
var _c = _a.view, view = _c === void 0 ? 'primary-medium' : _c, _d = _a.tag, Component = _d === void 0 ? 'span' : _d, weight = _a.weight, _e = _a.monospaceNumbers, monospaceNumbers = _e === void 0 ? false : _e, _f = _a.defaultMargins, defaultMargins = _f === void 0 ? true : _f, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, rowLimit = _a.rowLimit, restProps = tslib_es6.__rest(_a, ["view", "tag", "weight", "monospaceNumbers", "defaultMargins", "color", "className", "dataTestId", "children", "rowLimit"]);
|
|
19
19
|
return (React__default.default.createElement(Component, tslib_es6.__assign({ className: cn__default.default((_b = {},
|
|
20
20
|
_b[styles__default.default.paragraph] = Component === 'p' && !defaultMargins,
|
|
21
21
|
_b[styles__default.default.paragraphWithMargins] = Component === 'p' && defaultMargins,
|
|
22
22
|
_b[styles__default.default.monospace] = monospaceNumbers,
|
|
23
|
+
_b[styles__default.default["rowLimit".concat(rowLimit)]] = rowLimit,
|
|
23
24
|
_b), className, color && colors__default.default[color], styles__default.default[view], weight && styles__default.default[weight]), "data-test-id": dataTestId, ref: ref }, restProps), children));
|
|
24
25
|
});
|
|
25
26
|
|
|
@@ -75,3 +75,22 @@
|
|
|
75
75
|
font-feature-settings: "tnum";
|
|
76
76
|
font-variant-numeric: tabular-nums;
|
|
77
77
|
}
|
|
78
|
+
.rowLimit1 {
|
|
79
|
+
-webkit-line-clamp: 1;
|
|
80
|
+
display: -webkit-box;
|
|
81
|
+
-webkit-box-orient: vertical;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
word-break: break-all;
|
|
84
|
+
}
|
|
85
|
+
.rowLimit2 {
|
|
86
|
+
-webkit-line-clamp: 2;
|
|
87
|
+
display: -webkit-box;
|
|
88
|
+
-webkit-box-orient: vertical;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
}
|
|
91
|
+
.rowLimit3 {
|
|
92
|
+
-webkit-line-clamp: 3;
|
|
93
|
+
display: -webkit-box;
|
|
94
|
+
-webkit-box-orient: vertical;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
.component {
|
|
2
2
|
margin: 0;
|
|
3
|
-
padding: 0
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.regular {
|
|
15
|
-
font-weight: normal;
|
|
16
|
-
}
|
|
3
|
+
padding: 0
|
|
4
|
+
}
|
|
5
|
+
.component.bold {
|
|
6
|
+
font-weight: bold;
|
|
7
|
+
}
|
|
8
|
+
.component.medium {
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
}
|
|
11
|
+
.component.regular {
|
|
12
|
+
font-weight: normal;
|
|
13
|
+
}
|
|
@@ -9,7 +9,7 @@ type TitleProps = Omit<NativeProps, 'color'> & {
|
|
|
9
9
|
*/
|
|
10
10
|
tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
|
|
11
11
|
/**
|
|
12
|
-
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs
|
|
12
|
+
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
|
|
13
13
|
*/
|
|
14
14
|
view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';
|
|
15
15
|
/**
|
|
@@ -40,6 +40,10 @@ type TitleProps = Omit<NativeProps, 'color'> & {
|
|
|
40
40
|
* Контент (native prop)
|
|
41
41
|
*/
|
|
42
42
|
children?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Количество строк (не поддерживает IE)
|
|
45
|
+
*/
|
|
46
|
+
rowLimit?: 1 | 2 | 3;
|
|
43
47
|
};
|
|
44
48
|
type Styles = {
|
|
45
49
|
styles: {
|
|
@@ -53,7 +57,7 @@ declare const Title: React.ForwardRefExoticComponent<Omit<NativeProps, "color">
|
|
|
53
57
|
*/
|
|
54
58
|
tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
|
|
55
59
|
/**
|
|
56
|
-
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs
|
|
60
|
+
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
|
|
57
61
|
*/
|
|
58
62
|
view?: "medium" | "xlarge" | "large" | "small" | "xsmall" | undefined;
|
|
59
63
|
/**
|
|
@@ -84,5 +88,9 @@ declare const Title: React.ForwardRefExoticComponent<Omit<NativeProps, "color">
|
|
|
84
88
|
* Контент (native prop)
|
|
85
89
|
*/
|
|
86
90
|
children?: React.ReactNode;
|
|
91
|
+
/**
|
|
92
|
+
* Количество строк (не поддерживает IE)
|
|
93
|
+
*/
|
|
94
|
+
rowLimit?: 1 | 2 | 3 | undefined;
|
|
87
95
|
} & Styles & React.RefAttributes<TitleElementType>>;
|
|
88
96
|
export { TitleProps, Title };
|
package/cssm/title/component.js
CHANGED
|
@@ -12,8 +12,9 @@ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
|
12
12
|
var colors__default = /*#__PURE__*/_interopDefaultCompat(colors);
|
|
13
13
|
|
|
14
14
|
var Title = React.forwardRef(function (_a, ref) {
|
|
15
|
-
var _b
|
|
16
|
-
|
|
15
|
+
var _b;
|
|
16
|
+
var _c = _a.tag, Component = _c === void 0 ? 'div' : _c, _d = _a.view, view = _d === void 0 ? 'medium' : _d, _e = _a.font, font = _e === void 0 ? 'styrene' : _e, _f = _a.weight, weight = _f === void 0 ? font === 'styrene' ? 'medium' : 'bold' : _f, _g = _a.defaultMargins, defaultMargins = _g === void 0 ? false : _g, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, rowLimit = _a.rowLimit, styles = _a.styles, restProps = tslib_es6.__rest(_a, ["tag", "view", "font", "weight", "defaultMargins", "color", "className", "dataTestId", "children", "rowLimit", "styles"]);
|
|
17
|
+
return (React__default.default.createElement(Component, tslib_es6.__assign({ className: cn__default.default(styles.component, className, styles["".concat(font, "-").concat(view)], defaultMargins && styles["margins-".concat(view)], styles[weight], color && colors__default.default[color], (_b = {}, _b[styles["rowLimit".concat(rowLimit)]] = rowLimit, _b)), "data-test-id": dataTestId, ref: ref }, restProps), children));
|
|
17
18
|
});
|
|
18
19
|
|
|
19
20
|
exports.Title = Title;
|
|
@@ -91,12 +91,22 @@
|
|
|
91
91
|
.margins-xsmall {
|
|
92
92
|
margin: var(--gap-3xl) 0 var(--gap-m);
|
|
93
93
|
}
|
|
94
|
-
.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
.rowLimit1 {
|
|
95
|
+
-webkit-line-clamp: 1;
|
|
96
|
+
display: -webkit-box;
|
|
97
|
+
-webkit-box-orient: vertical;
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
word-break: break-all;
|
|
100
|
+
}
|
|
101
|
+
.rowLimit2 {
|
|
102
|
+
-webkit-line-clamp: 2;
|
|
103
|
+
display: -webkit-box;
|
|
104
|
+
-webkit-box-orient: vertical;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
}
|
|
107
|
+
.rowLimit3 {
|
|
108
|
+
-webkit-line-clamp: 3;
|
|
109
|
+
display: -webkit-box;
|
|
110
|
+
-webkit-box-orient: vertical;
|
|
111
|
+
overflow: hidden;
|
|
102
112
|
}
|
package/esm/colors.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: i62g2 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-accent: #ef3124;
|
|
4
4
|
--color-light-text-attention: #de6a00;
|
|
@@ -22,39 +22,39 @@
|
|
|
22
22
|
/* Hard up */
|
|
23
23
|
}
|
|
24
24
|
/* colors */
|
|
25
|
-
.
|
|
25
|
+
.typography__tertiary_5mg9e {
|
|
26
26
|
color: var(--color-light-text-tertiary);
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
.typography__disabled_5mg9e {
|
|
29
29
|
color: var(--color-light-text-disabled);
|
|
30
30
|
}
|
|
31
|
-
.
|
|
31
|
+
.typography__accent_5mg9e {
|
|
32
32
|
color: var(--color-light-text-accent);
|
|
33
33
|
}
|
|
34
|
-
.
|
|
34
|
+
.typography__primary_5mg9e {
|
|
35
35
|
color: var(--color-light-text-primary);
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
.typography__attention_5mg9e {
|
|
38
38
|
color: var(--color-light-text-attention);
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.typography__positive_5mg9e {
|
|
41
41
|
color: var(--color-light-text-positive);
|
|
42
42
|
}
|
|
43
|
-
.
|
|
43
|
+
.typography__secondary_5mg9e {
|
|
44
44
|
color: var(--color-light-text-secondary);
|
|
45
45
|
}
|
|
46
|
-
.typography__tertiary-
|
|
46
|
+
.typography__tertiary-inverted_5mg9e {
|
|
47
47
|
color: var(--color-light-text-tertiary-inverted);
|
|
48
48
|
}
|
|
49
|
-
.typography__primary-
|
|
49
|
+
.typography__primary-inverted_5mg9e {
|
|
50
50
|
color: var(--color-light-text-primary-inverted);
|
|
51
51
|
}
|
|
52
|
-
.typography__secondary-
|
|
52
|
+
.typography__secondary-inverted_5mg9e {
|
|
53
53
|
color: var(--color-light-text-secondary-inverted);
|
|
54
54
|
}
|
|
55
|
-
.
|
|
55
|
+
.typography__link_5mg9e {
|
|
56
56
|
color: var(--color-light-text-link);
|
|
57
57
|
}
|
|
58
|
-
.
|
|
58
|
+
.typography__negative_5mg9e {
|
|
59
59
|
color: var(--color-light-text-negative);
|
|
60
60
|
}
|
|
File without changes
|
|
@@ -37,7 +37,7 @@ function __rest(s, e) {
|
|
|
37
37
|
return t;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
var colors = {"tertiary":"
|
|
40
|
+
var colors = {"tertiary":"typography__tertiary_5mg9e","disabled":"typography__disabled_5mg9e","accent":"typography__accent_5mg9e","primary":"typography__primary_5mg9e","attention":"typography__attention_5mg9e","positive":"typography__positive_5mg9e","secondary":"typography__secondary_5mg9e","tertiary-inverted":"typography__tertiary-inverted_5mg9e","primary-inverted":"typography__primary-inverted_5mg9e","secondary-inverted":"typography__secondary-inverted_5mg9e","link":"typography__link_5mg9e","negative":"typography__negative_5mg9e"};
|
|
41
41
|
require('./colors.css')
|
|
42
42
|
|
|
43
43
|
export { __rest as _, __assign as a, colors as c };
|
package/esm/component.js
CHANGED
|
@@ -2,11 +2,11 @@ import { Text } from './text/component.js';
|
|
|
2
2
|
import { Title } from './title/index.js';
|
|
3
3
|
import { TitleMobile } from './title-mobile/component.js';
|
|
4
4
|
import { TitleResponsive } from './title-responsive/component.js';
|
|
5
|
-
import './colors.module-
|
|
5
|
+
import './colors.module-42065957.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'classnames';
|
|
8
8
|
import './title/component.js';
|
|
9
|
-
import './common.module-
|
|
9
|
+
import './common.module-cc423fc9.js';
|
|
10
10
|
|
|
11
11
|
var Typography = {
|
|
12
12
|
Title: Title,
|
package/esm/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { Typography } from './component.js';
|
|
2
2
|
export { typographyPresets } from './presets.js';
|
|
3
3
|
import './text/component.js';
|
|
4
|
-
import './colors.module-
|
|
4
|
+
import './colors.module-42065957.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'classnames';
|
|
7
7
|
import './title/index.js';
|
|
8
8
|
import './title/component.js';
|
|
9
|
-
import './common.module-
|
|
9
|
+
import './common.module-cc423fc9.js';
|
|
10
10
|
import './title-mobile/component.js';
|
|
11
11
|
import './title-responsive/component.js';
|
package/esm/text/component.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { TextElementType } from "../types";
|
|
|
6
6
|
type NativeProps = HTMLAttributes<HTMLSpanElement>;
|
|
7
7
|
type TextBaseProps = {
|
|
8
8
|
/**
|
|
9
|
-
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs
|
|
9
|
+
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
|
|
10
10
|
*/
|
|
11
11
|
view?: 'primary-large' | 'primary-medium' | 'primary-small' | 'secondary-large' | 'secondary-medium' | 'secondary-small' | 'component' | 'caps';
|
|
12
12
|
/**
|
|
@@ -41,6 +41,10 @@ type TextBaseProps = {
|
|
|
41
41
|
* Добавляет отступы к тэгу 'p'
|
|
42
42
|
*/
|
|
43
43
|
defaultMargins?: never;
|
|
44
|
+
/**
|
|
45
|
+
* Количество строк (не поддерживает IE)
|
|
46
|
+
*/
|
|
47
|
+
rowLimit?: 1 | 2 | 3;
|
|
44
48
|
};
|
|
45
49
|
type TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {
|
|
46
50
|
tag?: 'p';
|
package/esm/text/component.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign, c as colors } from '../colors.module-
|
|
1
|
+
import { _ as __rest, a as __assign, c as colors } from '../colors.module-42065957.js';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
|
|
5
|
-
var styles = {"paragraph":"
|
|
5
|
+
var styles = {"paragraph":"typography__paragraph_9xfoj","paragraphWithMargins":"typography__paragraphWithMargins_9xfoj","primary-large":"typography__primary-large_9xfoj","primary-medium":"typography__primary-medium_9xfoj","primary-small":"typography__primary-small_9xfoj","secondary-large":"typography__secondary-large_9xfoj","secondary-medium":"typography__secondary-medium_9xfoj","secondary-small":"typography__secondary-small_9xfoj","component":"typography__component_9xfoj","caps":"typography__caps_9xfoj","bold":"typography__bold_9xfoj","medium":"typography__medium_9xfoj","regular":"typography__regular_9xfoj","monospace":"typography__monospace_9xfoj","rowLimit1":"typography__rowLimit1_9xfoj","rowLimit2":"typography__rowLimit2_9xfoj","rowLimit3":"typography__rowLimit3_9xfoj"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Text = forwardRef(function (_a, ref) {
|
|
9
9
|
var _b;
|
|
10
|
-
var _c = _a.view, view = _c === void 0 ? 'primary-medium' : _c, _d = _a.tag, Component = _d === void 0 ? 'span' : _d, weight = _a.weight, _e = _a.monospaceNumbers, monospaceNumbers = _e === void 0 ? false : _e, _f = _a.defaultMargins, defaultMargins = _f === void 0 ? true : _f, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, restProps = __rest(_a, ["view", "tag", "weight", "monospaceNumbers", "defaultMargins", "color", "className", "dataTestId", "children"]);
|
|
10
|
+
var _c = _a.view, view = _c === void 0 ? 'primary-medium' : _c, _d = _a.tag, Component = _d === void 0 ? 'span' : _d, weight = _a.weight, _e = _a.monospaceNumbers, monospaceNumbers = _e === void 0 ? false : _e, _f = _a.defaultMargins, defaultMargins = _f === void 0 ? true : _f, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, rowLimit = _a.rowLimit, restProps = __rest(_a, ["view", "tag", "weight", "monospaceNumbers", "defaultMargins", "color", "className", "dataTestId", "children", "rowLimit"]);
|
|
11
11
|
return (React.createElement(Component, __assign({ className: cn((_b = {},
|
|
12
12
|
_b[styles.paragraph] = Component === 'p' && !defaultMargins,
|
|
13
13
|
_b[styles.paragraphWithMargins] = Component === 'p' && defaultMargins,
|
|
14
14
|
_b[styles.monospace] = monospaceNumbers,
|
|
15
|
+
_b[styles["rowLimit".concat(rowLimit)]] = rowLimit,
|
|
15
16
|
_b), className, color && colors[color], styles[view], weight && styles[weight]), "data-test-id": dataTestId, ref: ref }, restProps), children));
|
|
16
17
|
});
|
|
17
18
|
|
package/esm/text/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: meju9 */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -13,66 +13,85 @@
|
|
|
13
13
|
:root {
|
|
14
14
|
--text-paragraph-margin-bottom: 0 0 var(--gap-s);
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
.typography__paragraph_9xfoj {
|
|
17
17
|
margin: 0;
|
|
18
18
|
padding: 0;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
20
|
+
.typography__paragraphWithMargins_9xfoj {
|
|
21
21
|
padding: 0;
|
|
22
22
|
margin: var(--text-paragraph-margin-bottom);
|
|
23
23
|
}
|
|
24
|
-
.typography__primary-
|
|
24
|
+
.typography__primary-large_9xfoj {
|
|
25
25
|
font-size: 18px;
|
|
26
26
|
line-height: 24px;
|
|
27
27
|
font-weight: 400;
|
|
28
28
|
}
|
|
29
|
-
.typography__primary-
|
|
29
|
+
.typography__primary-medium_9xfoj {
|
|
30
30
|
font-size: 16px;
|
|
31
31
|
line-height: 24px;
|
|
32
32
|
font-weight: 400;
|
|
33
33
|
}
|
|
34
|
-
.typography__primary-
|
|
34
|
+
.typography__primary-small_9xfoj {
|
|
35
35
|
font-size: 14px;
|
|
36
36
|
line-height: 20px;
|
|
37
37
|
font-weight: 400;
|
|
38
38
|
}
|
|
39
|
-
.typography__secondary-
|
|
39
|
+
.typography__secondary-large_9xfoj {
|
|
40
40
|
font-size: 13px;
|
|
41
41
|
line-height: 16px;
|
|
42
42
|
font-weight: 400;
|
|
43
43
|
}
|
|
44
|
-
.typography__secondary-
|
|
44
|
+
.typography__secondary-medium_9xfoj {
|
|
45
45
|
font-size: 12px;
|
|
46
46
|
line-height: 16px;
|
|
47
47
|
font-weight: 400;
|
|
48
48
|
}
|
|
49
|
-
.typography__secondary-
|
|
49
|
+
.typography__secondary-small_9xfoj {
|
|
50
50
|
font-size: 11px;
|
|
51
51
|
line-height: 16px;
|
|
52
52
|
font-weight: 400;
|
|
53
53
|
}
|
|
54
|
-
.
|
|
54
|
+
.typography__component_9xfoj {
|
|
55
55
|
font-size: 16px;
|
|
56
56
|
line-height: 20px;
|
|
57
57
|
font-weight: 400;
|
|
58
58
|
}
|
|
59
|
-
.
|
|
59
|
+
.typography__caps_9xfoj {
|
|
60
60
|
font-size: 12px;
|
|
61
61
|
line-height: 16px;
|
|
62
62
|
font-weight: 500;
|
|
63
63
|
letter-spacing: 1.25px;
|
|
64
64
|
text-transform: uppercase;
|
|
65
65
|
}
|
|
66
|
-
.
|
|
66
|
+
.typography__bold_9xfoj {
|
|
67
67
|
font-weight: bold;
|
|
68
68
|
}
|
|
69
|
-
.
|
|
69
|
+
.typography__medium_9xfoj {
|
|
70
70
|
font-weight: 500;
|
|
71
71
|
}
|
|
72
|
-
.
|
|
72
|
+
.typography__regular_9xfoj {
|
|
73
73
|
font-weight: normal;
|
|
74
74
|
}
|
|
75
|
-
.
|
|
75
|
+
.typography__monospace_9xfoj {
|
|
76
76
|
font-feature-settings: "tnum";
|
|
77
77
|
font-variant-numeric: tabular-nums;
|
|
78
78
|
}
|
|
79
|
+
.typography__rowLimit1_9xfoj {
|
|
80
|
+
-webkit-line-clamp: 1;
|
|
81
|
+
display: -webkit-box;
|
|
82
|
+
-webkit-box-orient: vertical;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
word-break: break-all;
|
|
85
|
+
}
|
|
86
|
+
.typography__rowLimit2_9xfoj {
|
|
87
|
+
-webkit-line-clamp: 2;
|
|
88
|
+
display: -webkit-box;
|
|
89
|
+
-webkit-box-orient: vertical;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
}
|
|
92
|
+
.typography__rowLimit3_9xfoj {
|
|
93
|
+
-webkit-line-clamp: 3;
|
|
94
|
+
display: -webkit-box;
|
|
95
|
+
-webkit-box-orient: vertical;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
}
|
package/esm/text/index.js
CHANGED
package/esm/title/common.css
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
.
|
|
1
|
+
/* hash: 190df */
|
|
2
|
+
.typography__component_1c381 {
|
|
3
3
|
margin: 0;
|
|
4
|
-
padding: 0
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
.typography__regular_dljuk {
|
|
16
|
-
font-weight: normal;
|
|
17
|
-
}
|
|
4
|
+
padding: 0
|
|
5
|
+
}
|
|
6
|
+
.typography__component_1c381.typography__bold_1c381 {
|
|
7
|
+
font-weight: bold;
|
|
8
|
+
}
|
|
9
|
+
.typography__component_1c381.typography__medium_1c381 {
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
}
|
|
12
|
+
.typography__component_1c381.typography__regular_1c381 {
|
|
13
|
+
font-weight: normal;
|
|
14
|
+
}
|
package/esm/title/component.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ type TitleProps = Omit<NativeProps, 'color'> & {
|
|
|
9
9
|
*/
|
|
10
10
|
tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
|
|
11
11
|
/**
|
|
12
|
-
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs
|
|
12
|
+
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
|
|
13
13
|
*/
|
|
14
14
|
view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';
|
|
15
15
|
/**
|
|
@@ -40,6 +40,10 @@ type TitleProps = Omit<NativeProps, 'color'> & {
|
|
|
40
40
|
* Контент (native prop)
|
|
41
41
|
*/
|
|
42
42
|
children?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Количество строк (не поддерживает IE)
|
|
45
|
+
*/
|
|
46
|
+
rowLimit?: 1 | 2 | 3;
|
|
43
47
|
};
|
|
44
48
|
type Styles = {
|
|
45
49
|
styles: {
|
|
@@ -53,7 +57,7 @@ declare const Title: React.ForwardRefExoticComponent<Omit<NativeProps, "color">
|
|
|
53
57
|
*/
|
|
54
58
|
tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
|
|
55
59
|
/**
|
|
56
|
-
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs
|
|
60
|
+
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
|
|
57
61
|
*/
|
|
58
62
|
view?: "medium" | "xlarge" | "large" | "small" | "xsmall" | undefined;
|
|
59
63
|
/**
|
|
@@ -84,5 +88,9 @@ declare const Title: React.ForwardRefExoticComponent<Omit<NativeProps, "color">
|
|
|
84
88
|
* Контент (native prop)
|
|
85
89
|
*/
|
|
86
90
|
children?: React.ReactNode;
|
|
91
|
+
/**
|
|
92
|
+
* Количество строк (не поддерживает IE)
|
|
93
|
+
*/
|
|
94
|
+
rowLimit?: 1 | 2 | 3 | undefined;
|
|
87
95
|
} & Styles & React.RefAttributes<TitleElementType>>;
|
|
88
96
|
export { TitleProps, Title };
|
package/esm/title/component.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign, c as colors } from '../colors.module-
|
|
1
|
+
import { _ as __rest, a as __assign, c as colors } from '../colors.module-42065957.js';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
|
|
5
5
|
var Title = forwardRef(function (_a, ref) {
|
|
6
|
-
var _b
|
|
7
|
-
|
|
6
|
+
var _b;
|
|
7
|
+
var _c = _a.tag, Component = _c === void 0 ? 'div' : _c, _d = _a.view, view = _d === void 0 ? 'medium' : _d, _e = _a.font, font = _e === void 0 ? 'styrene' : _e, _f = _a.weight, weight = _f === void 0 ? font === 'styrene' ? 'medium' : 'bold' : _f, _g = _a.defaultMargins, defaultMargins = _g === void 0 ? false : _g, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, rowLimit = _a.rowLimit, styles = _a.styles, restProps = __rest(_a, ["tag", "view", "font", "weight", "defaultMargins", "color", "className", "dataTestId", "children", "rowLimit", "styles"]);
|
|
8
|
+
return (React.createElement(Component, __assign({ className: cn(styles.component, className, styles["".concat(font, "-").concat(view)], defaultMargins && styles["margins-".concat(view)], styles[weight], color && colors[color], (_b = {}, _b[styles["rowLimit".concat(rowLimit)]] = rowLimit, _b)), "data-test-id": dataTestId, ref: ref }, restProps), children));
|
|
8
9
|
});
|
|
9
10
|
|
|
10
11
|
export { Title };
|