@alfalab/core-components-typography 6.0.7 → 6.0.8-alfasans
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 +20 -20
- package/colors.module.css.js +1 -1
- package/cssm/text/index.module.css +40 -13
- package/cssm/title/component.d.ts +2 -12
- package/cssm/title/component.js +3 -6
- package/cssm/title/component.js.map +1 -1
- package/cssm/title/index.d.ts +1 -4
- package/cssm/title/index.module.css +23 -74
- package/cssm/title-mobile/component.d.ts +1 -4
- package/cssm/title-mobile/index.module.css +28 -45
- package/cssm/title-responsive/component.d.ts +1 -4
- package/esm/colors.css +20 -20
- package/esm/colors.module.css.js +1 -1
- package/esm/text/index.css +80 -53
- package/esm/text/index.module.css.js +1 -1
- package/esm/title/common.css +5 -5
- package/esm/title/common.module.css.js +1 -1
- package/esm/title/component.d.ts +2 -12
- package/esm/title/component.js +2 -5
- package/esm/title/component.js.map +1 -1
- package/esm/title/index.css +38 -89
- package/esm/title/index.d.ts +1 -4
- package/esm/title/index.module.css.js +1 -1
- package/esm/title/index.module.css.js.map +1 -1
- package/esm/title-mobile/component.d.ts +1 -4
- package/esm/title-mobile/index.css +53 -70
- package/esm/title-mobile/index.module.css.js +1 -1
- package/esm/title-responsive/component.d.ts +1 -4
- package/modern/colors.css +20 -20
- package/modern/colors.module.css.js +1 -1
- package/modern/text/index.css +80 -53
- package/modern/text/index.module.css.js +1 -1
- package/modern/title/common.css +5 -5
- package/modern/title/common.module.css.js +1 -1
- package/modern/title/component.d.ts +2 -12
- package/modern/title/component.js +1 -4
- package/modern/title/component.js.map +1 -1
- package/modern/title/index.css +38 -89
- package/modern/title/index.d.ts +1 -4
- package/modern/title/index.module.css.js +1 -1
- package/modern/title/index.module.css.js.map +1 -1
- package/modern/title-mobile/component.d.ts +1 -4
- package/modern/title-mobile/index.css +53 -70
- package/modern/title-mobile/index.module.css.js +1 -1
- package/modern/title-responsive/component.d.ts +1 -4
- package/moderncssm/text/index.module.css +37 -11
- package/moderncssm/title/component.d.ts +2 -12
- package/moderncssm/title/component.js +1 -4
- package/moderncssm/title/component.js.map +1 -1
- package/moderncssm/title/index.d.ts +1 -4
- package/moderncssm/title/index.module.css +20 -79
- package/moderncssm/title-mobile/component.d.ts +1 -4
- package/moderncssm/title-mobile/index.module.css +25 -40
- package/moderncssm/title-responsive/component.d.ts +1 -4
- package/package.json +6 -6
- package/src/title/component.tsx +3 -10
- package/src/title/index.module.css +0 -8
- package/text/index.css +80 -53
- package/text/index.module.css.js +1 -1
- package/title/common.css +5 -5
- package/title/common.module.css.js +1 -1
- package/title/component.d.ts +2 -12
- package/title/component.js +2 -5
- package/title/component.js.map +1 -1
- package/title/index.css +38 -89
- package/title/index.d.ts +1 -4
- package/title/index.module.css.js +1 -1
- package/title/index.module.css.js.map +1 -1
- package/title-mobile/component.d.ts +1 -4
- package/title-mobile/index.css +53 -70
- package/title-mobile/index.module.css.js +1 -1
- package/title-responsive/component.d.ts +1 -4
- package/cssm/title/utils.d.ts +0 -1
- package/cssm/title/utils.js +0 -16
- package/cssm/title/utils.js.map +0 -1
- package/esm/title/utils.d.ts +0 -1
- package/esm/title/utils.js +0 -12
- package/esm/title/utils.js.map +0 -1
- package/modern/title/utils.d.ts +0 -1
- package/modern/title/utils.js +0 -12
- package/modern/title/utils.js.map +0 -1
- package/moderncssm/title/utils.d.ts +0 -1
- package/moderncssm/title/utils.js +0 -12
- package/moderncssm/title/utils.js.map +0 -1
- package/src/title/utils.ts +0 -14
- package/title/utils.d.ts +0 -1
- package/title/utils.js +0 -16
- package/title/utils.js.map +0 -1
package/colors.css
CHANGED
|
@@ -20,63 +20,63 @@
|
|
|
20
20
|
--color-static-text-tertiary-dark: rgba(5, 8, 29, 0.38);
|
|
21
21
|
--color-static-text-tertiary-light: rgba(233, 233, 250, 0.37);
|
|
22
22
|
}
|
|
23
|
-
.
|
|
23
|
+
.typography__tertiary_1w1vx {
|
|
24
24
|
color: var(--color-light-text-tertiary);
|
|
25
25
|
}
|
|
26
|
-
.
|
|
26
|
+
.typography__disabled_1w1vx {
|
|
27
27
|
color: var(--color-light-text-quaternary);
|
|
28
28
|
}
|
|
29
|
-
.
|
|
29
|
+
.typography__accent_1w1vx {
|
|
30
30
|
color: var(--color-light-accent-primary);
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.typography__primary_1w1vx {
|
|
33
33
|
color: var(--color-light-text-primary);
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.typography__attention_1w1vx {
|
|
36
36
|
color: var(--color-light-text-attention);
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.typography__positive_1w1vx {
|
|
39
39
|
color: var(--color-light-text-positive);
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.typography__secondary_1w1vx {
|
|
42
42
|
color: var(--color-light-text-secondary);
|
|
43
43
|
}
|
|
44
|
-
.typography__tertiary-
|
|
44
|
+
.typography__tertiary-inverted_1w1vx {
|
|
45
45
|
color: var(--color-light-text-tertiary-inverted);
|
|
46
46
|
}
|
|
47
|
-
.typography__primary-
|
|
47
|
+
.typography__primary-inverted_1w1vx {
|
|
48
48
|
color: var(--color-light-text-primary-inverted);
|
|
49
49
|
}
|
|
50
|
-
.typography__secondary-
|
|
50
|
+
.typography__secondary-inverted_1w1vx {
|
|
51
51
|
color: var(--color-light-text-secondary-inverted);
|
|
52
52
|
}
|
|
53
|
-
.
|
|
53
|
+
.typography__link_1w1vx {
|
|
54
54
|
color: var(--color-light-text-info);
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
.typography__negative_1w1vx {
|
|
57
57
|
color: var(--color-light-text-negative);
|
|
58
58
|
}
|
|
59
|
-
.typography__static-primary-
|
|
59
|
+
.typography__static-primary-light_1w1vx {
|
|
60
60
|
color: var(--color-static-text-primary-light);
|
|
61
61
|
}
|
|
62
|
-
.typography__static-secondary-
|
|
62
|
+
.typography__static-secondary-light_1w1vx {
|
|
63
63
|
color: var(--color-static-text-secondary-light);
|
|
64
64
|
}
|
|
65
|
-
.typography__static-tertiary-
|
|
65
|
+
.typography__static-tertiary-light_1w1vx {
|
|
66
66
|
color: var(--color-static-text-tertiary-light);
|
|
67
67
|
}
|
|
68
|
-
.typography__static-primary-
|
|
68
|
+
.typography__static-primary-dark_1w1vx {
|
|
69
69
|
color: var(--color-static-text-primary-dark);
|
|
70
70
|
}
|
|
71
|
-
.typography__static-secondary-
|
|
71
|
+
.typography__static-secondary-dark_1w1vx {
|
|
72
72
|
color: var(--color-static-text-secondary-dark);
|
|
73
73
|
}
|
|
74
|
-
.typography__static-tertiary-
|
|
74
|
+
.typography__static-tertiary-dark_1w1vx {
|
|
75
75
|
color: var(--color-static-text-tertiary-dark);
|
|
76
76
|
}
|
|
77
|
-
.typography__static-
|
|
77
|
+
.typography__static-accent_1w1vx {
|
|
78
78
|
color: var(--color-static-accent-primary);
|
|
79
79
|
}
|
|
80
|
-
.typography__static-
|
|
80
|
+
.typography__static-positive_1w1vx {
|
|
81
81
|
color: var(--color-static-text-positive);
|
|
82
82
|
}
|
package/colors.module.css.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./colors.css');
|
|
4
4
|
|
|
5
|
-
var colors = {"tertiary":"
|
|
5
|
+
var colors = {"tertiary":"typography__tertiary_1w1vx","disabled":"typography__disabled_1w1vx","accent":"typography__accent_1w1vx","primary":"typography__primary_1w1vx","attention":"typography__attention_1w1vx","positive":"typography__positive_1w1vx","secondary":"typography__secondary_1w1vx","tertiary-inverted":"typography__tertiary-inverted_1w1vx","primary-inverted":"typography__primary-inverted_1w1vx","secondary-inverted":"typography__secondary-inverted_1w1vx","link":"typography__link_1w1vx","negative":"typography__negative_1w1vx","static-primary-light":"typography__static-primary-light_1w1vx","static-secondary-light":"typography__static-secondary-light_1w1vx","static-tertiary-light":"typography__static-tertiary-light_1w1vx","static-primary-dark":"typography__static-primary-dark_1w1vx","static-secondary-dark":"typography__static-secondary-dark_1w1vx","static-tertiary-dark":"typography__static-tertiary-dark_1w1vx","static-accent":"typography__static-accent_1w1vx","static-positive":"typography__static-positive_1w1vx"};
|
|
6
6
|
|
|
7
7
|
module.exports = colors;
|
|
8
8
|
//# sourceMappingURL=colors.module.css.js.map
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
--gap-12: var(--gap-s);
|
|
5
5
|
}
|
|
6
6
|
:root {
|
|
7
|
-
--font-family-
|
|
8
|
-
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
7
|
+
--font-family-alfasans:
|
|
8
|
+
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
9
|
+
Helvetica, sans-serif;
|
|
9
10
|
}
|
|
10
11
|
.transparent {
|
|
11
12
|
opacity: 0;
|
|
@@ -25,13 +26,16 @@
|
|
|
25
26
|
font-size: 16px;
|
|
26
27
|
line-height: 20px;
|
|
27
28
|
font-weight: 400;
|
|
28
|
-
|
|
29
|
+
letter-spacing: -0.24px;
|
|
30
|
+
font-family: var(--font-family-alfasans);
|
|
29
31
|
}
|
|
30
32
|
.component.bold {
|
|
31
33
|
font-weight: 700;
|
|
34
|
+
letter-spacing: 0.43px;
|
|
32
35
|
}
|
|
33
36
|
.component.medium {
|
|
34
37
|
font-weight: 500;
|
|
38
|
+
letter-spacing: -0.05px;
|
|
35
39
|
}
|
|
36
40
|
.caps {
|
|
37
41
|
font-size: 12px;
|
|
@@ -39,7 +43,7 @@
|
|
|
39
43
|
font-weight: 400;
|
|
40
44
|
letter-spacing: 1.25px;
|
|
41
45
|
text-transform: uppercase;
|
|
42
|
-
font-family: var(--font-family-
|
|
46
|
+
font-family: var(--font-family-alfasans);
|
|
43
47
|
}
|
|
44
48
|
.caps.bold {
|
|
45
49
|
font-weight: 700;
|
|
@@ -53,7 +57,7 @@
|
|
|
53
57
|
font-weight: 400;
|
|
54
58
|
letter-spacing: 1.25px;
|
|
55
59
|
text-transform: uppercase;
|
|
56
|
-
font-family: var(--font-family-
|
|
60
|
+
font-family: var(--font-family-alfasans);
|
|
57
61
|
}
|
|
58
62
|
.tagline.bold {
|
|
59
63
|
font-weight: 700;
|
|
@@ -65,97 +69,120 @@
|
|
|
65
69
|
font-size: 18px;
|
|
66
70
|
line-height: 24px;
|
|
67
71
|
font-weight: 400;
|
|
68
|
-
|
|
72
|
+
letter-spacing: -0.36px;
|
|
73
|
+
font-family: var(--font-family-alfasans);
|
|
69
74
|
}
|
|
70
75
|
.primary-large.bold {
|
|
71
76
|
font-weight: 700;
|
|
77
|
+
letter-spacing: 0.38px;
|
|
72
78
|
}
|
|
73
79
|
.primary-large.medium {
|
|
74
80
|
font-weight: 500;
|
|
81
|
+
letter-spacing: -0.17px;
|
|
75
82
|
}
|
|
76
83
|
.primary-medium {
|
|
77
84
|
font-size: 16px;
|
|
78
85
|
line-height: 24px;
|
|
79
86
|
font-weight: 400;
|
|
80
|
-
|
|
87
|
+
letter-spacing: -0.24px;
|
|
88
|
+
font-family: var(--font-family-alfasans);
|
|
81
89
|
}
|
|
82
90
|
.primary-medium.bold {
|
|
83
91
|
font-weight: 700;
|
|
92
|
+
letter-spacing: 0.43px;
|
|
84
93
|
}
|
|
85
94
|
.primary-medium.medium {
|
|
86
95
|
font-weight: 500;
|
|
96
|
+
letter-spacing: -0.05px;
|
|
87
97
|
}
|
|
88
98
|
.primary-small {
|
|
89
99
|
font-size: 14px;
|
|
90
100
|
line-height: 20px;
|
|
91
101
|
font-weight: 400;
|
|
92
|
-
|
|
102
|
+
letter-spacing: -0.08px;
|
|
103
|
+
font-family: var(--font-family-alfasans);
|
|
93
104
|
}
|
|
94
105
|
.primary-small.bold {
|
|
95
106
|
font-weight: 700;
|
|
107
|
+
letter-spacing: 0.47px;
|
|
96
108
|
}
|
|
97
109
|
.primary-small.medium {
|
|
98
110
|
font-weight: 500;
|
|
111
|
+
letter-spacing: 0.07px;
|
|
99
112
|
}
|
|
100
113
|
.component-primary {
|
|
101
114
|
font-size: 16px;
|
|
102
115
|
line-height: 20px;
|
|
103
116
|
font-weight: 400;
|
|
104
|
-
|
|
117
|
+
letter-spacing: -0.24px;
|
|
118
|
+
font-family: var(--font-family-alfasans);
|
|
105
119
|
}
|
|
106
120
|
.component-primary.bold {
|
|
107
121
|
font-weight: 700;
|
|
122
|
+
letter-spacing: 0.43px;
|
|
108
123
|
}
|
|
109
124
|
.component-primary.medium {
|
|
110
125
|
font-weight: 500;
|
|
126
|
+
letter-spacing: -0.05px;
|
|
111
127
|
}
|
|
112
128
|
.secondary-large {
|
|
113
129
|
font-size: 13px;
|
|
114
130
|
line-height: 16px;
|
|
115
131
|
font-weight: 400;
|
|
116
|
-
font-family: var(--font-family-
|
|
132
|
+
font-family: var(--font-family-alfasans);
|
|
117
133
|
}
|
|
118
134
|
.secondary-large.bold {
|
|
119
135
|
font-weight: 700;
|
|
136
|
+
letter-spacing: 0.54px;
|
|
120
137
|
}
|
|
121
138
|
.secondary-large.medium {
|
|
122
139
|
font-weight: 500;
|
|
140
|
+
letter-spacing: 0.13px;
|
|
123
141
|
}
|
|
124
142
|
.secondary-medium {
|
|
125
143
|
font-size: 12px;
|
|
126
144
|
line-height: 16px;
|
|
127
145
|
font-weight: 400;
|
|
128
|
-
|
|
146
|
+
letter-spacing: 0.06px;
|
|
147
|
+
font-family: var(--font-family-alfasans);
|
|
129
148
|
}
|
|
130
149
|
.secondary-medium.bold {
|
|
131
150
|
font-weight: 700;
|
|
151
|
+
letter-spacing: 0.57px;
|
|
132
152
|
}
|
|
133
153
|
.secondary-medium.medium {
|
|
134
154
|
font-weight: 500;
|
|
155
|
+
letter-spacing: 0.19px;
|
|
135
156
|
}
|
|
136
157
|
.secondary-small {
|
|
137
158
|
font-size: 11px;
|
|
138
159
|
line-height: 16px;
|
|
139
160
|
font-weight: 400;
|
|
140
|
-
|
|
161
|
+
letter-spacing: 0.15px;
|
|
162
|
+
font-family: var(--font-family-alfasans);
|
|
141
163
|
}
|
|
142
164
|
.secondary-small.bold {
|
|
143
165
|
font-weight: 700;
|
|
166
|
+
letter-spacing: 0.54px;
|
|
144
167
|
}
|
|
145
168
|
.secondary-small.medium {
|
|
146
169
|
font-weight: 500;
|
|
170
|
+
letter-spacing: 0.24px;
|
|
147
171
|
}
|
|
148
172
|
.component-secondary {
|
|
149
173
|
font-size: 14px;
|
|
150
174
|
line-height: 18px;
|
|
151
175
|
font-weight: 400;
|
|
152
|
-
|
|
176
|
+
letter-spacing: -0.08px;
|
|
177
|
+
font-family: var(--font-family-alfasans);
|
|
153
178
|
}
|
|
154
179
|
.component-secondary.bold {
|
|
155
180
|
font-weight: 700;
|
|
181
|
+
letter-spacing: 0.47px;
|
|
156
182
|
}
|
|
157
183
|
.component-secondary.medium {
|
|
158
184
|
font-weight: 500;
|
|
185
|
+
letter-spacing: 0.07px;
|
|
159
186
|
}
|
|
160
187
|
.rowLimit1 {
|
|
161
188
|
-webkit-line-clamp: 1;
|
|
@@ -21,13 +21,8 @@ export type TitleProps = Omit<NativeProps, 'color'> & {
|
|
|
21
21
|
weight?: 'regular' | 'medium' | 'bold' | 'semibold';
|
|
22
22
|
/**
|
|
23
23
|
* Шрифт текста
|
|
24
|
-
*
|
|
25
|
-
* @deprecated
|
|
26
24
|
*/
|
|
27
|
-
font?: 'styrene' | 'system'
|
|
28
|
-
font: 'alfasans';
|
|
29
|
-
systemCompat: boolean;
|
|
30
|
-
};
|
|
25
|
+
font?: 'styrene' | 'system';
|
|
31
26
|
/**
|
|
32
27
|
* Добавляет отступы
|
|
33
28
|
*/
|
|
@@ -87,13 +82,8 @@ export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps
|
|
|
87
82
|
weight?: "regular" | "medium" | "bold" | "semibold";
|
|
88
83
|
/**
|
|
89
84
|
* Шрифт текста
|
|
90
|
-
*
|
|
91
|
-
* @deprecated
|
|
92
85
|
*/
|
|
93
|
-
font?: "styrene" | "system"
|
|
94
|
-
font: "alfasans";
|
|
95
|
-
systemCompat: boolean;
|
|
96
|
-
};
|
|
86
|
+
font?: "styrene" | "system";
|
|
97
87
|
/**
|
|
98
88
|
* Добавляет отступы
|
|
99
89
|
*/
|
package/cssm/title/component.js
CHANGED
|
@@ -6,9 +6,7 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var mergeRefs = require('react-merge-refs');
|
|
8
8
|
var cn = require('classnames');
|
|
9
|
-
var cssm = require('@alfalab/core-components-
|
|
10
|
-
var cssm$1 = require('@alfalab/core-components-skeleton/cssm');
|
|
11
|
-
var utils = require('./utils.js');
|
|
9
|
+
var cssm = require('@alfalab/core-components-skeleton/cssm');
|
|
12
10
|
var colors = require('../colors.module.css');
|
|
13
11
|
var commonStyles = require('./common.module.css');
|
|
14
12
|
|
|
@@ -22,8 +20,8 @@ var commonStyles__default = /*#__PURE__*/_interopDefaultCompat(commonStyles);
|
|
|
22
20
|
|
|
23
21
|
var TitleBase = React.forwardRef(function (_a, ref) {
|
|
24
22
|
var _b;
|
|
25
|
-
var _c = _a.tag, Component = _c === void 0 ? 'div' : _c, _d = _a.view, view = _d === void 0 ? 'medium' : _d
|
|
26
|
-
var
|
|
23
|
+
var _c = _a.tag, Component = _c === void 0 ? 'div' : _c, _d = _a.view, view = _d === void 0 ? 'medium' : _d; _a.font; _a.platform; var _e = _a.weight, weight = _e === void 0 ? 'bold' : _e, _f = _a.defaultMargins, defaultMargins = _f === void 0 ? false : _f, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, rowLimit = _a.rowLimit, styles = _a.styles, skeletonProps = _a.skeletonProps, showSkeleton = _a.showSkeleton, restProps = tslib.__rest(_a, ["tag", "view", "font", "platform", "weight", "defaultMargins", "color", "className", "dataTestId", "children", "rowLimit", "styles", "skeletonProps", "showSkeleton"]);
|
|
24
|
+
var _g = cssm.useSkeleton(showSkeleton, skeletonProps), renderSkeleton = _g.renderSkeleton, textRef = _g.textRef;
|
|
27
25
|
var skeleton = renderSkeleton({
|
|
28
26
|
wrapperClassName: cn__default.default(defaultMargins && styles["margins-".concat(view)]),
|
|
29
27
|
dataTestId: dataTestId,
|
|
@@ -34,7 +32,6 @@ var TitleBase = React.forwardRef(function (_a, ref) {
|
|
|
34
32
|
return (React__default.default.createElement(Component, tslib.__assign({ className: cn__default.default(commonStyles__default.default.component, styles.component, className, styles["".concat(weight === 'regular' ? 'regular-' : '').concat(view)], defaultMargins && styles["margins-".concat(view)], color && colors__default.default[color], (_b = {},
|
|
35
33
|
_b[commonStyles__default.default["rowLimit".concat(rowLimit)]] = rowLimit,
|
|
36
34
|
_b[commonStyles__default.default.transparent] = showSkeleton,
|
|
37
|
-
_b[styles.font] = (cssm.isObject(font) && !font.systemCompat) || !(font === 'system'),
|
|
38
35
|
_b)), "data-test-id": dataTestId, ref: mergeRefs__default.default([ref, textRef]) }, restProps), children));
|
|
39
36
|
});
|
|
40
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport {
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\n\nimport colors from '../colors.module.css';\nimport commonStyles from './common.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLHeadingElement>;\n\nexport type TitleProps = Omit<NativeProps, 'color'> & {\n /**\n * HTML тег\n */\n tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';\n\n /**\n * [Вариант начертания](?path=/docs/guidelines-typography--page)\n */\n view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold' | 'semibold';\n\n /**\n * Шрифт текста\n */\n font?: 'styrene' | 'system';\n\n /**\n * Добавляет отступы\n */\n defaultMargins?: boolean;\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n};\n\ntype PrivateProps = {\n styles: {\n [key: string]: string;\n };\n platform: 'mobile' | 'desktop';\n};\n\ntype TitleElementType = HTMLHeadingElement | HTMLDivElement;\n\nexport const TitleBase = forwardRef<TitleElementType, TitleProps & PrivateProps>(\n (\n {\n tag: Component = 'div',\n view = 'medium',\n font,\n platform,\n weight = 'bold',\n defaultMargins = false,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n styles,\n skeletonProps,\n showSkeleton,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n className,\n styles[`${weight === 'regular' ? 'regular-' : ''}${view}`],\n defaultMargins && styles[`margins-${view}`],\n color && colors[color],\n {\n [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,\n [commonStyles.transparent]: showSkeleton,\n },\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":["forwardRef","__rest","useSkeleton","cn","React","__assign","commonStyles","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;IAyFa,SAAS,GAAGA,gBAAU,CAC/B,UACI,EAgBC,EACD,GAAG,EAAA;;AAhBC,IAAA,IAAA,EAAsB,GAAA,EAAA,CAAA,GAAA,CAAA,CAAjB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,CACtB,CAAA,EAAA,GAAA,EAAA,CAAA,IAAe,CAAf,CAAA,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,QAAQ,GAAA,EAAA,CAAA,CACX,EAAA,CAAA,IAAA,CACJ,CAAQ,EAAA,CAAA,QAAA,CAAA,KACR,EAAe,GAAA,EAAA,CAAA,MAAA,CAAA,CAAf,MAAM,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,GAAA,EAAA,CACf,CAAA,EAAA,GAAA,EAAA,CAAA,cAAsB,CAAtB,CAAA,cAAc,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,GAAA,EAAA,CAAA,CACtB,KAAK,GAAA,EAAA,CAAA,KAAA,CACL,CAAA,SAAS,GAAA,EAAA,CAAA,SAAA,CAAA,CACT,UAAU,GAAA,EAAA,CAAA,UAAA,CACV,CAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,CAAA,CACR,QAAQ,GAAA,EAAA,CAAA,QAAA,CACR,CAAA,MAAM,GAAA,EAAA,CAAA,MAAA,CAAA,CACN,aAAa,GAAA,EAAA,CAAA,aAAA,CACb,CAAA,YAAY,GAAA,EAAA,CAAA,YAAA,CAAA,CACT,SAAS,GAAAC,YAAA,CAAA,EAAA,EAfhB,sKAgBC;AAGK,IAAA,IAAA,EAA8B,GAAAC,gBAAW,CAAC,YAAY,EAAE,aAAa,CAAC,EAApE,cAAc,GAAA,EAAA,CAAA,cAAA,EAAE,OAAO,aAA6C;IAE5E,IAAM,QAAQ,GAAG,cAAc,CAAC;QAC5B,gBAAgB,EAAEC,mBAAE,CAAC,cAAc,IAAI,MAAM,CAAC,UAAW,CAAA,MAAA,CAAA,IAAI,CAAE,CAAC,CAAC;AACjE,QAAA,UAAU,EAAA,UAAA;AACb,KAAA,CAAC;IAEF,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;;IAGnB,QACIC,qCAAC,SAAS,EAAAC,cAAA,CAAA,EACN,SAAS,EAAEF,mBAAE,CACTG,6BAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,SAAS,EACT,MAAM,CAAC,EAAA,CAAA,MAAA,CAAG,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,SAAG,IAAI,CAAE,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,UAAA,CAAA,MAAA,CAAW,IAAI,CAAE,CAAC,EAC3C,KAAK,IAAIC,uBAAM,CAAC,KAAK,CAAC,GAAA,EAAA,GAAA,EAAA;AAElB,YAAA,EAAA,CAACD,6BAAY,CAAC,UAAA,CAAA,MAAA,CAAW,QAAQ,CAAE,CAAC,IAAG,QAAQ;AAC/C,YAAA,EAAA,CAACA,6BAAY,CAAC,WAAW,CAAA,GAAG,YAAY;AAE/C,YAAA,EAAA,EAAA,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAEE,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,EAAA,SAAS,GAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
|
package/cssm/title/index.d.ts
CHANGED
|
@@ -5,10 +5,7 @@ declare const Title: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<H
|
|
|
5
5
|
view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
|
|
6
6
|
color?: import("..").Color;
|
|
7
7
|
weight?: "regular" | "medium" | "bold" | "semibold";
|
|
8
|
-
font?: "styrene" | "system"
|
|
9
|
-
font: "alfasans";
|
|
10
|
-
systemCompat: boolean;
|
|
11
|
-
};
|
|
8
|
+
font?: "styrene" | "system";
|
|
12
9
|
defaultMargins?: boolean;
|
|
13
10
|
className?: string;
|
|
14
11
|
dataTestId?: string;
|
|
@@ -10,131 +10,80 @@
|
|
|
10
10
|
--gap-48: var(--gap-4xl);
|
|
11
11
|
}
|
|
12
12
|
:root {
|
|
13
|
-
--font-family-
|
|
14
|
-
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
15
|
-
|
|
16
|
-
'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
17
|
-
sans-serif;
|
|
13
|
+
--font-family-alfasans:
|
|
14
|
+
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
15
|
+
Helvetica, sans-serif;
|
|
18
16
|
}
|
|
19
17
|
.xlarge {
|
|
20
18
|
font-size: 48px;
|
|
21
19
|
line-height: 52px;
|
|
22
20
|
font-weight: 700;
|
|
23
|
-
|
|
21
|
+
letter-spacing: 0.1px;
|
|
22
|
+
font-family: var(--font-family-alfasans);
|
|
24
23
|
}
|
|
25
|
-
.xlarge.font {
|
|
26
|
-
line-height: 64px;
|
|
27
|
-
font-weight: 500;
|
|
28
|
-
font-feature-settings: 'ss01';
|
|
29
|
-
font-family: var(--font-family-styrene);
|
|
30
|
-
}
|
|
31
24
|
.regular-xlarge {
|
|
32
25
|
font-size: 48px;
|
|
33
26
|
line-height: 52px;
|
|
34
27
|
font-weight: 400;
|
|
35
|
-
|
|
28
|
+
letter-spacing: -2.1px;
|
|
29
|
+
font-family: var(--font-family-alfasans);
|
|
36
30
|
}
|
|
37
|
-
.regular-xlarge.font {
|
|
38
|
-
line-height: 64px;
|
|
39
|
-
font-feature-settings: 'ss01';
|
|
40
|
-
font-family: var(--font-family-styrene);
|
|
41
|
-
}
|
|
42
31
|
.large {
|
|
43
32
|
font-size: 40px;
|
|
44
33
|
line-height: 48px;
|
|
45
34
|
font-weight: 700;
|
|
46
|
-
|
|
35
|
+
letter-spacing: 0.1px;
|
|
36
|
+
font-family: var(--font-family-alfasans);
|
|
47
37
|
}
|
|
48
|
-
.large.font {
|
|
49
|
-
font-weight: 500;
|
|
50
|
-
font-feature-settings: 'ss01';
|
|
51
|
-
font-family: var(--font-family-styrene);
|
|
52
|
-
}
|
|
53
38
|
.regular-large {
|
|
54
39
|
font-size: 40px;
|
|
55
40
|
line-height: 48px;
|
|
56
41
|
font-weight: 400;
|
|
57
|
-
|
|
42
|
+
letter-spacing: -1.7px;
|
|
43
|
+
font-family: var(--font-family-alfasans);
|
|
58
44
|
}
|
|
59
|
-
.regular-large.font {
|
|
60
|
-
font-feature-settings: 'ss01';
|
|
61
|
-
font-family: var(--font-family-styrene);
|
|
62
|
-
}
|
|
63
45
|
.medium {
|
|
64
46
|
font-size: 30px;
|
|
65
47
|
line-height: 36px;
|
|
66
48
|
font-weight: 700;
|
|
67
|
-
|
|
49
|
+
letter-spacing: 0.1px;
|
|
50
|
+
font-family: var(--font-family-alfasans);
|
|
68
51
|
}
|
|
69
|
-
.medium.font {
|
|
70
|
-
font-size: 32px;
|
|
71
|
-
line-height: 40px;
|
|
72
|
-
font-weight: 500;
|
|
73
|
-
font-feature-settings: 'ss01';
|
|
74
|
-
font-family: var(--font-family-styrene);
|
|
75
|
-
}
|
|
76
52
|
.regular-medium {
|
|
77
53
|
font-size: 30px;
|
|
78
54
|
line-height: 36px;
|
|
79
55
|
font-weight: 400;
|
|
80
|
-
|
|
56
|
+
letter-spacing: -1.25px;
|
|
57
|
+
font-family: var(--font-family-alfasans);
|
|
81
58
|
}
|
|
82
|
-
.regular-medium.font {
|
|
83
|
-
font-size: 32px;
|
|
84
|
-
line-height: 40px;
|
|
85
|
-
font-feature-settings: 'ss01';
|
|
86
|
-
font-family: var(--font-family-styrene);
|
|
87
|
-
}
|
|
88
59
|
.small {
|
|
89
60
|
font-size: 22px;
|
|
90
61
|
line-height: 26px;
|
|
91
62
|
font-weight: 700;
|
|
92
|
-
|
|
63
|
+
letter-spacing: 0.2px;
|
|
64
|
+
font-family: var(--font-family-alfasans);
|
|
93
65
|
}
|
|
94
|
-
.small.font {
|
|
95
|
-
font-size: 24px;
|
|
96
|
-
line-height: 32px;
|
|
97
|
-
font-weight: 500;
|
|
98
|
-
font-feature-settings: 'ss01';
|
|
99
|
-
font-family: var(--font-family-styrene);
|
|
100
|
-
}
|
|
101
66
|
.regular-small {
|
|
102
67
|
font-size: 22px;
|
|
103
68
|
line-height: 26px;
|
|
104
69
|
font-weight: 400;
|
|
105
|
-
|
|
70
|
+
letter-spacing: -0.8px;
|
|
71
|
+
font-family: var(--font-family-alfasans);
|
|
106
72
|
}
|
|
107
|
-
.regular-small.font {
|
|
108
|
-
font-size: 24px;
|
|
109
|
-
line-height: 32px;
|
|
110
|
-
font-feature-settings: 'ss01';
|
|
111
|
-
font-family: var(--font-family-styrene);
|
|
112
|
-
}
|
|
113
73
|
.xsmall {
|
|
114
74
|
font-size: 18px;
|
|
115
75
|
line-height: 22px;
|
|
116
76
|
font-weight: 700;
|
|
117
|
-
|
|
77
|
+
letter-spacing: 0.38px;
|
|
78
|
+
font-family: var(--font-family-alfasans);
|
|
118
79
|
}
|
|
119
|
-
.xsmall.font {
|
|
120
|
-
font-size: 20px;
|
|
121
|
-
line-height: 24px;
|
|
122
|
-
font-weight: 500;
|
|
123
|
-
font-feature-settings: 'ss01';
|
|
124
|
-
font-family: var(--font-family-styrene);
|
|
125
|
-
}
|
|
126
80
|
.regular-xsmall {
|
|
127
81
|
font-size: 18px;
|
|
128
82
|
line-height: 22px;
|
|
129
83
|
font-weight: 400;
|
|
130
|
-
|
|
84
|
+
letter-spacing: -0.36px;
|
|
85
|
+
font-family: var(--font-family-alfasans);
|
|
131
86
|
}
|
|
132
|
-
.regular-xsmall.font {
|
|
133
|
-
font-size: 20px;
|
|
134
|
-
line-height: 24px;
|
|
135
|
-
font-feature-settings: 'ss01';
|
|
136
|
-
font-family: var(--font-family-styrene);
|
|
137
|
-
}
|
|
138
87
|
.component.margins-xlarge {
|
|
139
88
|
margin: var(--gap-0) var(--gap-0) var(--gap-24);
|
|
140
89
|
}
|
|
@@ -4,10 +4,7 @@ export declare const TitleMobile: React.ForwardRefExoticComponent<Omit<React.HTM
|
|
|
4
4
|
view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
|
|
5
5
|
color?: import("..").Color;
|
|
6
6
|
weight?: "regular" | "medium" | "bold" | "semibold";
|
|
7
|
-
font?: "styrene" | "system"
|
|
8
|
-
font: "alfasans";
|
|
9
|
-
systemCompat: boolean;
|
|
10
|
-
};
|
|
7
|
+
font?: "styrene" | "system";
|
|
11
8
|
defaultMargins?: boolean;
|
|
12
9
|
className?: string;
|
|
13
10
|
dataTestId?: string;
|