@alfalab/core-components-typography 6.0.6-alfasans → 6.0.6

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.
Files changed (88) hide show
  1. package/colors.css +20 -20
  2. package/colors.module.css.js +1 -1
  3. package/cssm/text/index.module.css +13 -40
  4. package/cssm/title/component.d.ts +8 -2
  5. package/cssm/title/component.js +6 -3
  6. package/cssm/title/component.js.map +1 -1
  7. package/cssm/title/index.d.ts +4 -1
  8. package/cssm/title/index.module.css +74 -23
  9. package/cssm/title/utils.d.ts +1 -0
  10. package/cssm/title/utils.js +16 -0
  11. package/cssm/title/utils.js.map +1 -0
  12. package/cssm/title-mobile/component.d.ts +4 -1
  13. package/cssm/title-mobile/index.module.css +45 -28
  14. package/cssm/title-responsive/component.d.ts +4 -1
  15. package/esm/colors.css +20 -20
  16. package/esm/colors.module.css.js +1 -1
  17. package/esm/text/index.css +53 -80
  18. package/esm/text/index.module.css.js +1 -1
  19. package/esm/title/common.css +5 -5
  20. package/esm/title/common.module.css.js +1 -1
  21. package/esm/title/component.d.ts +8 -2
  22. package/esm/title/component.js +5 -2
  23. package/esm/title/component.js.map +1 -1
  24. package/esm/title/index.css +89 -38
  25. package/esm/title/index.d.ts +4 -1
  26. package/esm/title/index.module.css.js +1 -1
  27. package/esm/title/index.module.css.js.map +1 -1
  28. package/esm/title/utils.d.ts +1 -0
  29. package/esm/title/utils.js +12 -0
  30. package/esm/title/utils.js.map +1 -0
  31. package/esm/title-mobile/component.d.ts +4 -1
  32. package/esm/title-mobile/index.css +70 -53
  33. package/esm/title-mobile/index.module.css.js +1 -1
  34. package/esm/title-responsive/component.d.ts +4 -1
  35. package/modern/colors.css +20 -20
  36. package/modern/colors.module.css.js +1 -1
  37. package/modern/text/index.css +53 -80
  38. package/modern/text/index.module.css.js +1 -1
  39. package/modern/title/common.css +5 -5
  40. package/modern/title/common.module.css.js +1 -1
  41. package/modern/title/component.d.ts +8 -2
  42. package/modern/title/component.js +4 -1
  43. package/modern/title/component.js.map +1 -1
  44. package/modern/title/index.css +89 -38
  45. package/modern/title/index.d.ts +4 -1
  46. package/modern/title/index.module.css.js +1 -1
  47. package/modern/title/index.module.css.js.map +1 -1
  48. package/modern/title/utils.d.ts +1 -0
  49. package/modern/title/utils.js +12 -0
  50. package/modern/title/utils.js.map +1 -0
  51. package/modern/title-mobile/component.d.ts +4 -1
  52. package/modern/title-mobile/index.css +70 -53
  53. package/modern/title-mobile/index.module.css.js +1 -1
  54. package/modern/title-responsive/component.d.ts +4 -1
  55. package/moderncssm/text/index.module.css +11 -37
  56. package/moderncssm/title/component.d.ts +8 -2
  57. package/moderncssm/title/component.js +4 -1
  58. package/moderncssm/title/component.js.map +1 -1
  59. package/moderncssm/title/index.d.ts +4 -1
  60. package/moderncssm/title/index.module.css +79 -20
  61. package/moderncssm/title/utils.d.ts +1 -0
  62. package/moderncssm/title/utils.js +12 -0
  63. package/moderncssm/title/utils.js.map +1 -0
  64. package/moderncssm/title-mobile/component.d.ts +4 -1
  65. package/moderncssm/title-mobile/index.module.css +40 -25
  66. package/moderncssm/title-responsive/component.d.ts +4 -1
  67. package/package.json +6 -6
  68. package/src/title/component.tsx +8 -3
  69. package/src/title/index.module.css +8 -0
  70. package/src/title/utils.ts +14 -0
  71. package/text/index.css +53 -80
  72. package/text/index.module.css.js +1 -1
  73. package/title/common.css +5 -5
  74. package/title/common.module.css.js +1 -1
  75. package/title/component.d.ts +8 -2
  76. package/title/component.js +5 -2
  77. package/title/component.js.map +1 -1
  78. package/title/index.css +89 -38
  79. package/title/index.d.ts +4 -1
  80. package/title/index.module.css.js +1 -1
  81. package/title/index.module.css.js.map +1 -1
  82. package/title/utils.d.ts +1 -0
  83. package/title/utils.js +16 -0
  84. package/title/utils.js.map +1 -0
  85. package/title-mobile/component.d.ts +4 -1
  86. package/title-mobile/index.css +70 -53
  87. package/title-mobile/index.module.css.js +1 -1
  88. package/title-responsive/component.d.ts +4 -1
@@ -4,7 +4,10 @@ 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";
7
+ font?: "styrene" | "system" | "alfasans" | {
8
+ font: "alfasans";
9
+ systemCompat: boolean;
10
+ };
8
11
  defaultMargins?: boolean;
9
12
  className?: string;
10
13
  dataTestId?: string;
@@ -2,111 +2,126 @@
2
2
  .xlarge {
3
3
  font-size: 34px;
4
4
  line-height: 40px;
5
- font-weight: 500;
6
- letter-spacing: -0.32px;
7
- font-family: var(--font-family-alfasans);
5
+ font-weight: 600;
6
+ font-family: var(--font-family-system);
8
7
  }
9
8
 
10
9
  .xlarge.font {
10
+ font-weight: 500;
11
+ font-feature-settings: 'ss01';
12
+ font-family: var(--font-family-styrene);
11
13
  }
12
14
 
13
15
  .regular-xlarge {
14
16
  font-size: 34px;
15
17
  line-height: 40px;
16
18
  font-weight: 400;
17
- letter-spacing: -1.36px;
18
- font-family: var(--font-family-alfasans);
19
+ font-family: var(--font-family-system);
19
20
  }
20
21
 
21
22
  .regular-xlarge.system {
23
+ font-feature-settings: 'ss01';
24
+ font-family: var(--font-family-styrene);
22
25
  }
23
26
 
24
27
  .large {
25
28
  font-size: 30px;
26
29
  line-height: 36px;
27
- font-weight: 500;
28
- letter-spacing: -0.25px;
29
- font-family: var(--font-family-alfasans);
30
+ font-weight: 600;
31
+ font-family: var(--font-family-system);
30
32
  }
31
33
 
32
34
  .large.font {
35
+ font-weight: 500;
36
+ font-feature-settings: 'ss01';
37
+ font-family: var(--font-family-styrene);
33
38
  }
34
39
 
35
40
  .regular-large {
36
41
  font-size: 30px;
37
42
  line-height: 36px;
38
43
  font-weight: 400;
39
- letter-spacing: -1.25px;
40
- font-family: var(--font-family-alfasans);
44
+ font-family: var(--font-family-system);
41
45
  }
42
46
 
43
47
  .regular-large.system {
48
+ font-feature-settings: 'ss01';
49
+ font-family: var(--font-family-styrene);
44
50
  }
45
51
 
46
52
  .medium {
47
53
  font-size: 26px;
48
54
  line-height: 32px;
49
- font-weight: 500;
50
- letter-spacing: -0.25px;
51
- font-family: var(--font-family-alfasans);
55
+ font-weight: 600;
56
+ font-family: var(--font-family-system);
52
57
  }
53
58
 
54
59
  .medium.font {
60
+ font-weight: 500;
61
+ font-feature-settings: 'ss01';
62
+ font-family: var(--font-family-styrene);
55
63
  }
56
64
 
57
65
  .regular-medium {
58
66
  font-size: 26px;
59
67
  line-height: 32px;
60
68
  font-weight: 400;
61
- letter-spacing: -1px;
62
- font-family: var(--font-family-alfasans);
69
+ font-family: var(--font-family-system);
63
70
  }
64
71
 
65
72
  .regular-medium.system {
73
+ font-feature-settings: 'ss01';
74
+ font-family: var(--font-family-styrene);
66
75
  }
67
76
 
68
77
  .small {
69
78
  font-size: 20px;
70
79
  line-height: 28px;
71
- font-weight: 500;
72
- letter-spacing: -0.15px;
73
- font-family: var(--font-family-alfasans);
80
+ font-weight: 600;
81
+ font-family: var(--font-family-system);
74
82
  }
75
83
 
76
84
  .small.font {
85
+ font-weight: 500;
86
+ font-feature-settings: 'ss01';
87
+ font-family: var(--font-family-styrene);
77
88
  }
78
89
 
79
90
  .regular-small {
80
91
  font-size: 20px;
81
92
  line-height: 28px;
82
93
  font-weight: 400;
83
- letter-spacing: -0.68px;
84
- font-family: var(--font-family-alfasans);
94
+ font-family: var(--font-family-system);
85
95
  }
86
96
 
87
97
  .regular-small.system {
98
+ font-feature-settings: 'ss01';
99
+ font-family: var(--font-family-styrene);
88
100
  }
89
101
 
90
102
  .xsmall {
91
103
  font-size: 16px;
92
104
  line-height: 20px;
93
- font-weight: 500;
94
- letter-spacing: 0.17px;
95
- font-family: var(--font-family-alfasans);
105
+ font-weight: 600;
106
+ font-family: var(--font-family-system);
96
107
  }
97
108
 
98
109
  .xsmall.font {
110
+ font-weight: 500;
111
+ font-feature-settings: 'ss01';
112
+ font-family: var(--font-family-styrene);
99
113
  }
100
114
 
101
115
  .regular-xsmall {
102
116
  font-size: 16px;
103
117
  line-height: 20px;
104
118
  font-weight: 400;
105
- letter-spacing: -0.24px;
106
- font-family: var(--font-family-alfasans);
119
+ font-family: var(--font-family-system);
107
120
  }
108
121
 
109
122
  .regular-xsmall.system {
123
+ font-feature-settings: 'ss01';
124
+ font-family: var(--font-family-styrene);
110
125
  }
111
126
 
112
127
  .component.margins-xlarge {
@@ -16,7 +16,10 @@ export declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React
16
16
  view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
17
17
  color?: import("..").Color;
18
18
  weight?: "regular" | "medium" | "bold" | "semibold";
19
- font?: "styrene" | "system";
19
+ font?: "styrene" | "system" | "alfasans" | {
20
+ font: "alfasans";
21
+ systemCompat: boolean;
22
+ };
20
23
  defaultMargins?: boolean;
21
24
  className?: string;
22
25
  dataTestId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-typography",
3
- "version": "6.0.6-alfasans",
3
+ "version": "6.0.6",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -13,9 +13,9 @@
13
13
  "build": "rollup -c ../../tools/rollup/rollup.config.mjs --silent"
14
14
  },
15
15
  "dependencies": {
16
- "@alfalab/core-components-mq": "6.0.4-alfasans",
17
- "@alfalab/core-components-shared": "2.2.0-alfasans",
18
- "@alfalab/core-components-skeleton": "7.0.3-alfasans",
16
+ "@alfalab/core-components-mq": "^6.0.4",
17
+ "@alfalab/core-components-shared": "^2.2.0",
18
+ "@alfalab/core-components-skeleton": "^7.0.3",
19
19
  "classnames": "^2.5.1",
20
20
  "react-merge-refs": "^1.1.0",
21
21
  "tslib": "^2.4.0"
@@ -28,6 +28,6 @@
28
28
  "access": "public",
29
29
  "directory": "dist"
30
30
  },
31
- "themesVersion": "15.1.0-alfasans",
32
- "varsVersion": "11.1.0-alfasans"
31
+ "themesVersion": "15.1.0",
32
+ "varsVersion": "11.1.0"
33
33
  }
@@ -2,10 +2,13 @@ import React, { forwardRef, type HTMLAttributes } from 'react';
2
2
  import mergeRefs from 'react-merge-refs';
3
3
  import cn from 'classnames';
4
4
 
5
+ import { isObject } from '@alfalab/core-components-shared';
5
6
  import { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';
6
7
 
7
8
  import { type Color } from '../colors';
8
9
 
10
+ import { getDefaultWeight } from './utils';
11
+
9
12
  import colors from '../colors.module.css';
10
13
  import commonStyles from './common.module.css';
11
14
 
@@ -37,7 +40,7 @@ export type TitleProps = Omit<NativeProps, 'color'> & {
37
40
  *
38
41
  * @deprecated
39
42
  */
40
- font?: 'styrene' | 'system';
43
+ font?: 'styrene' | 'system' | 'alfasans' | { font: 'alfasans'; systemCompat: boolean };
41
44
 
42
45
  /**
43
46
  * Добавляет отступы
@@ -94,9 +97,9 @@ export const TitleBase = forwardRef<TitleElementType, TitleProps & PrivateProps>
94
97
  {
95
98
  tag: Component = 'div',
96
99
  view = 'medium',
97
- font,
100
+ font = 'styrene',
98
101
  platform,
99
- weight = 'bold',
102
+ weight = getDefaultWeight(isObject(font) ? font.font : font, platform),
100
103
  defaultMargins = false,
101
104
  color,
102
105
  className,
@@ -133,6 +136,8 @@ export const TitleBase = forwardRef<TitleElementType, TitleProps & PrivateProps>
133
136
  {
134
137
  [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,
135
138
  [commonStyles.transparent]: showSkeleton,
139
+ [styles.font]:
140
+ (isObject(font) && !font.systemCompat) || !(font === 'system'),
136
141
  },
137
142
  )}
138
143
  data-test-id={dataTestId}
@@ -4,10 +4,18 @@
4
4
  @each $view in xlarge, large, medium, small, xsmall {
5
5
  .$(view) {
6
6
  @mixin headline-system_$(view);
7
+
8
+ &.font {
9
+ @subtract-mixin headline_$(view), headline-system_$(view);
10
+ }
7
11
  }
8
12
 
9
13
  .regular-$(view) {
10
14
  @mixin promo-system_$(view);
15
+
16
+ &.font {
17
+ @subtract-mixin promo_$(view), promo-system_$(view);
18
+ }
11
19
  }
12
20
  }
13
21
 
@@ -0,0 +1,14 @@
1
+ export function getDefaultWeight(
2
+ font: 'styrene' | 'system' | 'alfasans',
3
+ platform: 'mobile' | 'desktop',
4
+ ) {
5
+ if (font === 'styrene' || font === 'alfasans') {
6
+ return 'medium';
7
+ }
8
+
9
+ if (platform === 'desktop') {
10
+ return 'bold';
11
+ }
12
+
13
+ return 'semibold';
14
+ }
package/text/index.css CHANGED
@@ -4,206 +4,179 @@
4
4
  --gap-12: var(--gap-s);
5
5
  }
6
6
  :root {
7
- --font-family-alfasans:
8
- 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
9
- Helvetica, sans-serif;
7
+ --font-family-system:
8
+ system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
10
9
  }
11
- .typography__transparent_imgoa {
10
+ .typography__transparent_1u55a {
12
11
  opacity: 0;
13
12
  }
14
13
  :root {
15
14
  --text-paragraph-margin-bottom: var(--gap-0) var(--gap-0) var(--gap-12);
16
15
  }
17
- .typography__paragraph_imgoa {
16
+ .typography__paragraph_1u55a {
18
17
  margin: var(--gap-0);
19
18
  padding: var(--gap-0);
20
19
  }
21
- .typography__paragraphWithMargins_imgoa {
20
+ .typography__paragraphWithMargins_1u55a {
22
21
  padding: var(--gap-0);
23
22
  margin: var(--text-paragraph-margin-bottom);
24
23
  }
25
- .typography__component_imgoa {
24
+ .typography__component_1u55a {
26
25
  font-size: 16px;
27
26
  line-height: 20px;
28
27
  font-weight: 400;
29
- letter-spacing: -0.24px;
30
- font-family: var(--font-family-alfasans);
28
+ font-family: var(--font-family-system);
31
29
  }
32
- .typography__component_imgoa.typography__bold_imgoa {
30
+ .typography__component_1u55a.typography__bold_1u55a {
33
31
  font-weight: 700;
34
- letter-spacing: 0.43px;
35
32
  }
36
- .typography__component_imgoa.typography__medium_imgoa {
33
+ .typography__component_1u55a.typography__medium_1u55a {
37
34
  font-weight: 500;
38
- letter-spacing: -0.05px;
39
35
  }
40
- .typography__caps_imgoa {
36
+ .typography__caps_1u55a {
41
37
  font-size: 12px;
42
38
  line-height: 16px;
43
39
  font-weight: 400;
44
40
  letter-spacing: 1.25px;
45
41
  text-transform: uppercase;
46
- font-family: var(--font-family-alfasans);
42
+ font-family: var(--font-family-system);
47
43
  }
48
- .typography__caps_imgoa.typography__bold_imgoa {
44
+ .typography__caps_1u55a.typography__bold_1u55a {
49
45
  font-weight: 700;
50
46
  }
51
- .typography__caps_imgoa.typography__medium_imgoa {
47
+ .typography__caps_1u55a.typography__medium_1u55a {
52
48
  font-weight: 500;
53
49
  }
54
- .typography__tagline_imgoa {
50
+ .typography__tagline_1u55a {
55
51
  font-size: 12px;
56
52
  line-height: 16px;
57
53
  font-weight: 400;
58
54
  letter-spacing: 1.25px;
59
55
  text-transform: uppercase;
60
- font-family: var(--font-family-alfasans);
56
+ font-family: var(--font-family-system);
61
57
  }
62
- .typography__tagline_imgoa.typography__bold_imgoa {
58
+ .typography__tagline_1u55a.typography__bold_1u55a {
63
59
  font-weight: 700;
64
60
  }
65
- .typography__tagline_imgoa.typography__medium_imgoa {
61
+ .typography__tagline_1u55a.typography__medium_1u55a {
66
62
  font-weight: 500;
67
63
  }
68
- .typography__primary-large_imgoa {
64
+ .typography__primary-large_1u55a {
69
65
  font-size: 18px;
70
66
  line-height: 24px;
71
67
  font-weight: 400;
72
- letter-spacing: -0.36px;
73
- font-family: var(--font-family-alfasans);
68
+ font-family: var(--font-family-system);
74
69
  }
75
- .typography__primary-large_imgoa.typography__bold_imgoa {
70
+ .typography__primary-large_1u55a.typography__bold_1u55a {
76
71
  font-weight: 700;
77
- letter-spacing: 0.38px;
78
72
  }
79
- .typography__primary-large_imgoa.typography__medium_imgoa {
73
+ .typography__primary-large_1u55a.typography__medium_1u55a {
80
74
  font-weight: 500;
81
- letter-spacing: -0.17px;
82
75
  }
83
- .typography__primary-medium_imgoa {
76
+ .typography__primary-medium_1u55a {
84
77
  font-size: 16px;
85
78
  line-height: 24px;
86
79
  font-weight: 400;
87
- letter-spacing: -0.24px;
88
- font-family: var(--font-family-alfasans);
80
+ font-family: var(--font-family-system);
89
81
  }
90
- .typography__primary-medium_imgoa.typography__bold_imgoa {
82
+ .typography__primary-medium_1u55a.typography__bold_1u55a {
91
83
  font-weight: 700;
92
- letter-spacing: 0.43px;
93
84
  }
94
- .typography__primary-medium_imgoa.typography__medium_imgoa {
85
+ .typography__primary-medium_1u55a.typography__medium_1u55a {
95
86
  font-weight: 500;
96
- letter-spacing: -0.05px;
97
87
  }
98
- .typography__primary-small_imgoa {
88
+ .typography__primary-small_1u55a {
99
89
  font-size: 14px;
100
90
  line-height: 20px;
101
91
  font-weight: 400;
102
- letter-spacing: -0.08px;
103
- font-family: var(--font-family-alfasans);
92
+ font-family: var(--font-family-system);
104
93
  }
105
- .typography__primary-small_imgoa.typography__bold_imgoa {
94
+ .typography__primary-small_1u55a.typography__bold_1u55a {
106
95
  font-weight: 700;
107
- letter-spacing: 0.47px;
108
96
  }
109
- .typography__primary-small_imgoa.typography__medium_imgoa {
97
+ .typography__primary-small_1u55a.typography__medium_1u55a {
110
98
  font-weight: 500;
111
- letter-spacing: 0.07px;
112
99
  }
113
- .typography__component-primary_imgoa {
100
+ .typography__component-primary_1u55a {
114
101
  font-size: 16px;
115
102
  line-height: 20px;
116
103
  font-weight: 400;
117
- letter-spacing: -0.24px;
118
- font-family: var(--font-family-alfasans);
104
+ font-family: var(--font-family-system);
119
105
  }
120
- .typography__component-primary_imgoa.typography__bold_imgoa {
106
+ .typography__component-primary_1u55a.typography__bold_1u55a {
121
107
  font-weight: 700;
122
- letter-spacing: 0.43px;
123
108
  }
124
- .typography__component-primary_imgoa.typography__medium_imgoa {
109
+ .typography__component-primary_1u55a.typography__medium_1u55a {
125
110
  font-weight: 500;
126
- letter-spacing: -0.05px;
127
111
  }
128
- .typography__secondary-large_imgoa {
112
+ .typography__secondary-large_1u55a {
129
113
  font-size: 13px;
130
114
  line-height: 16px;
131
115
  font-weight: 400;
132
- font-family: var(--font-family-alfasans);
116
+ font-family: var(--font-family-system);
133
117
  }
134
- .typography__secondary-large_imgoa.typography__bold_imgoa {
118
+ .typography__secondary-large_1u55a.typography__bold_1u55a {
135
119
  font-weight: 700;
136
- letter-spacing: 0.54px;
137
120
  }
138
- .typography__secondary-large_imgoa.typography__medium_imgoa {
121
+ .typography__secondary-large_1u55a.typography__medium_1u55a {
139
122
  font-weight: 500;
140
- letter-spacing: 0.13px;
141
123
  }
142
- .typography__secondary-medium_imgoa {
124
+ .typography__secondary-medium_1u55a {
143
125
  font-size: 12px;
144
126
  line-height: 16px;
145
127
  font-weight: 400;
146
- letter-spacing: 0.06px;
147
- font-family: var(--font-family-alfasans);
128
+ font-family: var(--font-family-system);
148
129
  }
149
- .typography__secondary-medium_imgoa.typography__bold_imgoa {
130
+ .typography__secondary-medium_1u55a.typography__bold_1u55a {
150
131
  font-weight: 700;
151
- letter-spacing: 0.57px;
152
132
  }
153
- .typography__secondary-medium_imgoa.typography__medium_imgoa {
133
+ .typography__secondary-medium_1u55a.typography__medium_1u55a {
154
134
  font-weight: 500;
155
- letter-spacing: 0.19px;
156
135
  }
157
- .typography__secondary-small_imgoa {
136
+ .typography__secondary-small_1u55a {
158
137
  font-size: 11px;
159
138
  line-height: 16px;
160
139
  font-weight: 400;
161
- letter-spacing: 0.15px;
162
- font-family: var(--font-family-alfasans);
140
+ font-family: var(--font-family-system);
163
141
  }
164
- .typography__secondary-small_imgoa.typography__bold_imgoa {
142
+ .typography__secondary-small_1u55a.typography__bold_1u55a {
165
143
  font-weight: 700;
166
- letter-spacing: 0.54px;
167
144
  }
168
- .typography__secondary-small_imgoa.typography__medium_imgoa {
145
+ .typography__secondary-small_1u55a.typography__medium_1u55a {
169
146
  font-weight: 500;
170
- letter-spacing: 0.24px;
171
147
  }
172
- .typography__component-secondary_imgoa {
148
+ .typography__component-secondary_1u55a {
173
149
  font-size: 14px;
174
150
  line-height: 18px;
175
151
  font-weight: 400;
176
- letter-spacing: -0.08px;
177
- font-family: var(--font-family-alfasans);
152
+ font-family: var(--font-family-system);
178
153
  }
179
- .typography__component-secondary_imgoa.typography__bold_imgoa {
154
+ .typography__component-secondary_1u55a.typography__bold_1u55a {
180
155
  font-weight: 700;
181
- letter-spacing: 0.47px;
182
156
  }
183
- .typography__component-secondary_imgoa.typography__medium_imgoa {
157
+ .typography__component-secondary_1u55a.typography__medium_1u55a {
184
158
  font-weight: 500;
185
- letter-spacing: 0.07px;
186
159
  }
187
- .typography__rowLimit1_imgoa {
160
+ .typography__rowLimit1_1u55a {
188
161
  -webkit-line-clamp: 1;
189
162
  display: -webkit-box;
190
163
  -webkit-box-orient: vertical;
191
164
  overflow: hidden;
192
165
  word-break: break-all;
193
166
  }
194
- .typography__rowLimit2_imgoa {
167
+ .typography__rowLimit2_1u55a {
195
168
  -webkit-line-clamp: 2;
196
169
  display: -webkit-box;
197
170
  -webkit-box-orient: vertical;
198
171
  overflow: hidden;
199
172
  }
200
- .typography__rowLimit3_imgoa {
173
+ .typography__rowLimit3_1u55a {
201
174
  -webkit-line-clamp: 3;
202
175
  display: -webkit-box;
203
176
  -webkit-box-orient: vertical;
204
177
  overflow: hidden;
205
178
  }
206
- .typography__monospace_imgoa {
179
+ .typography__monospace_1u55a {
207
180
  font-feature-settings: "tnum";
208
181
  font-variant-numeric: tabular-nums;
209
182
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"transparent":"typography__transparent_imgoa","paragraph":"typography__paragraph_imgoa","paragraphWithMargins":"typography__paragraphWithMargins_imgoa","component":"typography__component_imgoa","bold":"typography__bold_imgoa","medium":"typography__medium_imgoa","caps":"typography__caps_imgoa","tagline":"typography__tagline_imgoa","primary-large":"typography__primary-large_imgoa","primary-medium":"typography__primary-medium_imgoa","primary-small":"typography__primary-small_imgoa","component-primary":"typography__component-primary_imgoa","secondary-large":"typography__secondary-large_imgoa","secondary-medium":"typography__secondary-medium_imgoa","secondary-small":"typography__secondary-small_imgoa","component-secondary":"typography__component-secondary_imgoa","rowLimit1":"typography__rowLimit1_imgoa","rowLimit2":"typography__rowLimit2_imgoa","rowLimit3":"typography__rowLimit3_imgoa","monospace":"typography__monospace_imgoa"};
5
+ var styles = {"transparent":"typography__transparent_1u55a","paragraph":"typography__paragraph_1u55a","paragraphWithMargins":"typography__paragraphWithMargins_1u55a","component":"typography__component_1u55a","bold":"typography__bold_1u55a","medium":"typography__medium_1u55a","caps":"typography__caps_1u55a","tagline":"typography__tagline_1u55a","primary-large":"typography__primary-large_1u55a","primary-medium":"typography__primary-medium_1u55a","primary-small":"typography__primary-small_1u55a","component-primary":"typography__component-primary_1u55a","secondary-large":"typography__secondary-large_1u55a","secondary-medium":"typography__secondary-medium_1u55a","secondary-small":"typography__secondary-small_1u55a","component-secondary":"typography__component-secondary_1u55a","rowLimit1":"typography__rowLimit1_1u55a","rowLimit2":"typography__rowLimit2_1u55a","rowLimit3":"typography__rowLimit3_1u55a","monospace":"typography__monospace_1u55a"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
package/title/common.css CHANGED
@@ -1,27 +1,27 @@
1
1
  :root {
2
2
  --gap-0: 0px;
3
3
  }
4
- .typography__transparent_g55ul {
4
+ .typography__transparent_n57ko {
5
5
  opacity: 0;
6
6
  }
7
- .typography__component_g55ul {
7
+ .typography__component_n57ko {
8
8
  margin: var(--gap-0);
9
9
  padding: var(--gap-0);
10
10
  }
11
- .typography__rowLimit1_g55ul {
11
+ .typography__rowLimit1_n57ko {
12
12
  -webkit-line-clamp: 1;
13
13
  display: -webkit-box;
14
14
  -webkit-box-orient: vertical;
15
15
  overflow: hidden;
16
16
  word-break: break-all;
17
17
  }
18
- .typography__rowLimit2_g55ul {
18
+ .typography__rowLimit2_n57ko {
19
19
  -webkit-line-clamp: 2;
20
20
  display: -webkit-box;
21
21
  -webkit-box-orient: vertical;
22
22
  overflow: hidden;
23
23
  }
24
- .typography__rowLimit3_g55ul {
24
+ .typography__rowLimit3_n57ko {
25
25
  -webkit-line-clamp: 3;
26
26
  display: -webkit-box;
27
27
  -webkit-box-orient: vertical;
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./common.css');
4
4
 
5
- var commonStyles = {"transparent":"typography__transparent_g55ul","component":"typography__component_g55ul","rowLimit1":"typography__rowLimit1_g55ul","rowLimit2":"typography__rowLimit2_g55ul","rowLimit3":"typography__rowLimit3_g55ul"};
5
+ var commonStyles = {"transparent":"typography__transparent_n57ko","component":"typography__component_n57ko","rowLimit1":"typography__rowLimit1_n57ko","rowLimit2":"typography__rowLimit2_n57ko","rowLimit3":"typography__rowLimit3_n57ko"};
6
6
 
7
7
  module.exports = commonStyles;
8
8
  //# sourceMappingURL=common.module.css.js.map
@@ -24,7 +24,10 @@ export type TitleProps = Omit<NativeProps, 'color'> & {
24
24
  *
25
25
  * @deprecated
26
26
  */
27
- font?: 'styrene' | 'system';
27
+ font?: 'styrene' | 'system' | 'alfasans' | {
28
+ font: 'alfasans';
29
+ systemCompat: boolean;
30
+ };
28
31
  /**
29
32
  * Добавляет отступы
30
33
  */
@@ -87,7 +90,10 @@ export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps
87
90
  *
88
91
  * @deprecated
89
92
  */
90
- font?: "styrene" | "system";
93
+ font?: "styrene" | "system" | "alfasans" | {
94
+ font: "alfasans";
95
+ systemCompat: boolean;
96
+ };
91
97
  /**
92
98
  * Добавляет отступы
93
99
  */
@@ -6,7 +6,9 @@ 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 coreComponentsShared = require('@alfalab/core-components-shared');
9
10
  var coreComponentsSkeleton = require('@alfalab/core-components-skeleton');
11
+ var utils = require('./utils.js');
10
12
  var colors_module = require('../colors.module.css.js');
11
13
  var common_module = require('./common.module.css.js');
12
14
 
@@ -18,8 +20,8 @@ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
18
20
 
19
21
  var TitleBase = React.forwardRef(function (_a, ref) {
20
22
  var _b;
21
- 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"]);
22
- var _g = coreComponentsSkeleton.useSkeleton(showSkeleton, skeletonProps), renderSkeleton = _g.renderSkeleton, textRef = _g.textRef;
23
+ 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, platform = _a.platform, _f = _a.weight, weight = _f === void 0 ? utils.getDefaultWeight(coreComponentsShared.isObject(font) ? font.font : font, platform) : _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, 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 _h = coreComponentsSkeleton.useSkeleton(showSkeleton, skeletonProps), renderSkeleton = _h.renderSkeleton, textRef = _h.textRef;
23
25
  var skeleton = renderSkeleton({
24
26
  wrapperClassName: cn__default.default(defaultMargins && styles["margins-".concat(view)]),
25
27
  dataTestId: dataTestId,
@@ -30,6 +32,7 @@ var TitleBase = React.forwardRef(function (_a, ref) {
30
32
  return (React__default.default.createElement(Component, tslib.__assign({ className: cn__default.default(common_module.component, styles.component, className, styles["".concat(weight === 'regular' ? 'regular-' : '').concat(view)], defaultMargins && styles["margins-".concat(view)], color && colors_module[color], (_b = {},
31
33
  _b[common_module["rowLimit".concat(rowLimit)]] = rowLimit,
32
34
  _b[common_module.transparent] = showSkeleton,
35
+ _b[styles.font] = (coreComponentsShared.isObject(font) && !font.systemCompat) || !(font === 'system'),
33
36
  _b)), "data-test-id": dataTestId, ref: mergeRefs__default.default([ref, textRef]) }, restProps), children));
34
37
  });
35
38