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

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,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_2zvp4 {
10
+ .typography__transparent_1wgfo {
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_2zvp4 {
16
+ .typography__paragraph_1wgfo {
18
17
  margin: var(--gap-0);
19
18
  padding: var(--gap-0);
20
19
  }
21
- .typography__paragraphWithMargins_2zvp4 {
20
+ .typography__paragraphWithMargins_1wgfo {
22
21
  padding: var(--gap-0);
23
22
  margin: var(--text-paragraph-margin-bottom);
24
23
  }
25
- .typography__component_2zvp4 {
24
+ .typography__component_1wgfo {
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_2zvp4.typography__bold_2zvp4 {
30
+ .typography__component_1wgfo.typography__bold_1wgfo {
33
31
  font-weight: 700;
34
- letter-spacing: 0.43px;
35
32
  }
36
- .typography__component_2zvp4.typography__medium_2zvp4 {
33
+ .typography__component_1wgfo.typography__medium_1wgfo {
37
34
  font-weight: 500;
38
- letter-spacing: -0.05px;
39
35
  }
40
- .typography__caps_2zvp4 {
36
+ .typography__caps_1wgfo {
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_2zvp4.typography__bold_2zvp4 {
44
+ .typography__caps_1wgfo.typography__bold_1wgfo {
49
45
  font-weight: 700;
50
46
  }
51
- .typography__caps_2zvp4.typography__medium_2zvp4 {
47
+ .typography__caps_1wgfo.typography__medium_1wgfo {
52
48
  font-weight: 500;
53
49
  }
54
- .typography__tagline_2zvp4 {
50
+ .typography__tagline_1wgfo {
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_2zvp4.typography__bold_2zvp4 {
58
+ .typography__tagline_1wgfo.typography__bold_1wgfo {
63
59
  font-weight: 700;
64
60
  }
65
- .typography__tagline_2zvp4.typography__medium_2zvp4 {
61
+ .typography__tagline_1wgfo.typography__medium_1wgfo {
66
62
  font-weight: 500;
67
63
  }
68
- .typography__primary-large_2zvp4 {
64
+ .typography__primary-large_1wgfo {
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_2zvp4.typography__bold_2zvp4 {
70
+ .typography__primary-large_1wgfo.typography__bold_1wgfo {
76
71
  font-weight: 700;
77
- letter-spacing: 0.38px;
78
72
  }
79
- .typography__primary-large_2zvp4.typography__medium_2zvp4 {
73
+ .typography__primary-large_1wgfo.typography__medium_1wgfo {
80
74
  font-weight: 500;
81
- letter-spacing: -0.17px;
82
75
  }
83
- .typography__primary-medium_2zvp4 {
76
+ .typography__primary-medium_1wgfo {
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_2zvp4.typography__bold_2zvp4 {
82
+ .typography__primary-medium_1wgfo.typography__bold_1wgfo {
91
83
  font-weight: 700;
92
- letter-spacing: 0.43px;
93
84
  }
94
- .typography__primary-medium_2zvp4.typography__medium_2zvp4 {
85
+ .typography__primary-medium_1wgfo.typography__medium_1wgfo {
95
86
  font-weight: 500;
96
- letter-spacing: -0.05px;
97
87
  }
98
- .typography__primary-small_2zvp4 {
88
+ .typography__primary-small_1wgfo {
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_2zvp4.typography__bold_2zvp4 {
94
+ .typography__primary-small_1wgfo.typography__bold_1wgfo {
106
95
  font-weight: 700;
107
- letter-spacing: 0.47px;
108
96
  }
109
- .typography__primary-small_2zvp4.typography__medium_2zvp4 {
97
+ .typography__primary-small_1wgfo.typography__medium_1wgfo {
110
98
  font-weight: 500;
111
- letter-spacing: 0.07px;
112
99
  }
113
- .typography__component-primary_2zvp4 {
100
+ .typography__component-primary_1wgfo {
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_2zvp4.typography__bold_2zvp4 {
106
+ .typography__component-primary_1wgfo.typography__bold_1wgfo {
121
107
  font-weight: 700;
122
- letter-spacing: 0.43px;
123
108
  }
124
- .typography__component-primary_2zvp4.typography__medium_2zvp4 {
109
+ .typography__component-primary_1wgfo.typography__medium_1wgfo {
125
110
  font-weight: 500;
126
- letter-spacing: -0.05px;
127
111
  }
128
- .typography__secondary-large_2zvp4 {
112
+ .typography__secondary-large_1wgfo {
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_2zvp4.typography__bold_2zvp4 {
118
+ .typography__secondary-large_1wgfo.typography__bold_1wgfo {
135
119
  font-weight: 700;
136
- letter-spacing: 0.54px;
137
120
  }
138
- .typography__secondary-large_2zvp4.typography__medium_2zvp4 {
121
+ .typography__secondary-large_1wgfo.typography__medium_1wgfo {
139
122
  font-weight: 500;
140
- letter-spacing: 0.13px;
141
123
  }
142
- .typography__secondary-medium_2zvp4 {
124
+ .typography__secondary-medium_1wgfo {
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_2zvp4.typography__bold_2zvp4 {
130
+ .typography__secondary-medium_1wgfo.typography__bold_1wgfo {
150
131
  font-weight: 700;
151
- letter-spacing: 0.57px;
152
132
  }
153
- .typography__secondary-medium_2zvp4.typography__medium_2zvp4 {
133
+ .typography__secondary-medium_1wgfo.typography__medium_1wgfo {
154
134
  font-weight: 500;
155
- letter-spacing: 0.19px;
156
135
  }
157
- .typography__secondary-small_2zvp4 {
136
+ .typography__secondary-small_1wgfo {
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_2zvp4.typography__bold_2zvp4 {
142
+ .typography__secondary-small_1wgfo.typography__bold_1wgfo {
165
143
  font-weight: 700;
166
- letter-spacing: 0.54px;
167
144
  }
168
- .typography__secondary-small_2zvp4.typography__medium_2zvp4 {
145
+ .typography__secondary-small_1wgfo.typography__medium_1wgfo {
169
146
  font-weight: 500;
170
- letter-spacing: 0.24px;
171
147
  }
172
- .typography__component-secondary_2zvp4 {
148
+ .typography__component-secondary_1wgfo {
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_2zvp4.typography__bold_2zvp4 {
154
+ .typography__component-secondary_1wgfo.typography__bold_1wgfo {
180
155
  font-weight: 700;
181
- letter-spacing: 0.47px;
182
156
  }
183
- .typography__component-secondary_2zvp4.typography__medium_2zvp4 {
157
+ .typography__component-secondary_1wgfo.typography__medium_1wgfo {
184
158
  font-weight: 500;
185
- letter-spacing: 0.07px;
186
159
  }
187
- .typography__rowLimit1_2zvp4 {
160
+ .typography__rowLimit1_1wgfo {
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_2zvp4 {
167
+ .typography__rowLimit2_1wgfo {
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_2zvp4 {
173
+ .typography__rowLimit3_1wgfo {
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_2zvp4 {
179
+ .typography__monospace_1wgfo {
207
180
  font-feature-settings: "tnum";
208
181
  font-variant-numeric: tabular-nums;
209
182
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"transparent":"typography__transparent_2zvp4","paragraph":"typography__paragraph_2zvp4","paragraphWithMargins":"typography__paragraphWithMargins_2zvp4","component":"typography__component_2zvp4","bold":"typography__bold_2zvp4","medium":"typography__medium_2zvp4","caps":"typography__caps_2zvp4","tagline":"typography__tagline_2zvp4","primary-large":"typography__primary-large_2zvp4","primary-medium":"typography__primary-medium_2zvp4","primary-small":"typography__primary-small_2zvp4","component-primary":"typography__component-primary_2zvp4","secondary-large":"typography__secondary-large_2zvp4","secondary-medium":"typography__secondary-medium_2zvp4","secondary-small":"typography__secondary-small_2zvp4","component-secondary":"typography__component-secondary_2zvp4","rowLimit1":"typography__rowLimit1_2zvp4","rowLimit2":"typography__rowLimit2_2zvp4","rowLimit3":"typography__rowLimit3_2zvp4","monospace":"typography__monospace_2zvp4"};
3
+ const styles = {"transparent":"typography__transparent_1wgfo","paragraph":"typography__paragraph_1wgfo","paragraphWithMargins":"typography__paragraphWithMargins_1wgfo","component":"typography__component_1wgfo","bold":"typography__bold_1wgfo","medium":"typography__medium_1wgfo","caps":"typography__caps_1wgfo","tagline":"typography__tagline_1wgfo","primary-large":"typography__primary-large_1wgfo","primary-medium":"typography__primary-medium_1wgfo","primary-small":"typography__primary-small_1wgfo","component-primary":"typography__component-primary_1wgfo","secondary-large":"typography__secondary-large_1wgfo","secondary-medium":"typography__secondary-medium_1wgfo","secondary-small":"typography__secondary-small_1wgfo","component-secondary":"typography__component-secondary_1wgfo","rowLimit1":"typography__rowLimit1_1wgfo","rowLimit2":"typography__rowLimit2_1wgfo","rowLimit3":"typography__rowLimit3_1wgfo","monospace":"typography__monospace_1wgfo"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1,27 +1,27 @@
1
1
  :root {
2
2
  --gap-0: 0px;
3
3
  }
4
- .typography__transparent_6mtbu {
4
+ .typography__transparent_vjxpi {
5
5
  opacity: 0;
6
6
  }
7
- .typography__component_6mtbu {
7
+ .typography__component_vjxpi {
8
8
  margin: var(--gap-0);
9
9
  padding: var(--gap-0);
10
10
  }
11
- .typography__rowLimit1_6mtbu {
11
+ .typography__rowLimit1_vjxpi {
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_6mtbu {
18
+ .typography__rowLimit2_vjxpi {
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_6mtbu {
24
+ .typography__rowLimit3_vjxpi {
25
25
  -webkit-line-clamp: 3;
26
26
  display: -webkit-box;
27
27
  -webkit-box-orient: vertical;
@@ -1,6 +1,6 @@
1
1
  import './common.css';
2
2
 
3
- const commonStyles = {"transparent":"typography__transparent_6mtbu","component":"typography__component_6mtbu","rowLimit1":"typography__rowLimit1_6mtbu","rowLimit2":"typography__rowLimit2_6mtbu","rowLimit3":"typography__rowLimit3_6mtbu"};
3
+ const commonStyles = {"transparent":"typography__transparent_vjxpi","component":"typography__component_vjxpi","rowLimit1":"typography__rowLimit1_vjxpi","rowLimit2":"typography__rowLimit2_vjxpi","rowLimit3":"typography__rowLimit3_vjxpi"};
4
4
 
5
5
  export { commonStyles as default };
6
6
  //# sourceMappingURL=common.module.css.js.map
@@ -22,7 +22,10 @@ export type TitleProps = Omit<NativeProps, 'color'> & {
22
22
  /**
23
23
  * Шрифт текста
24
24
  */
25
- font?: 'styrene' | 'system';
25
+ font?: 'styrene' | 'system' | 'alfasans' | {
26
+ font: 'alfasans';
27
+ systemCompat: boolean;
28
+ };
26
29
  /**
27
30
  * Добавляет отступы
28
31
  */
@@ -83,7 +86,10 @@ export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps
83
86
  /**
84
87
  * Шрифт текста
85
88
  */
86
- font?: "styrene" | "system";
89
+ font?: "styrene" | "system" | "alfasans" | {
90
+ font: "alfasans";
91
+ systemCompat: boolean;
92
+ };
87
93
  /**
88
94
  * Добавляет отступы
89
95
  */
@@ -1,11 +1,13 @@
1
1
  import React, { forwardRef } from 'react';
2
2
  import mergeRefs from 'react-merge-refs';
3
3
  import cn from 'classnames';
4
+ import { isObject } from '@alfalab/core-components-shared/modern';
4
5
  import { useSkeleton } from '@alfalab/core-components-skeleton/modern';
6
+ import { getDefaultWeight } from './utils.js';
5
7
  import colors from '../colors.module.css.js';
6
8
  import commonStyles from './common.module.css.js';
7
9
 
8
- const TitleBase = forwardRef(({ tag: Component = 'div', view = 'medium', font, platform, weight = 'bold', defaultMargins = false, color, className, dataTestId, children, rowLimit, styles, skeletonProps, showSkeleton, ...restProps }, ref) => {
10
+ const TitleBase = forwardRef(({ tag: Component = 'div', view = 'medium', font = 'styrene', platform, weight = getDefaultWeight(isObject(font) ? font.font : font, platform), defaultMargins = false, color, className, dataTestId, children, rowLimit, styles, skeletonProps, showSkeleton, ...restProps }, ref) => {
9
11
  const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);
10
12
  const skeleton = renderSkeleton({
11
13
  wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),
@@ -17,6 +19,7 @@ const TitleBase = forwardRef(({ tag: Component = 'div', view = 'medium', font, p
17
19
  return (React.createElement(Component, { className: cn(commonStyles.component, styles.component, className, styles[`${weight === 'regular' ? 'regular-' : ''}${view}`], defaultMargins && styles[`margins-${view}`], color && colors[color], {
18
20
  [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,
19
21
  [commonStyles.transparent]: showSkeleton,
22
+ [styles.font]: (isObject(font) && !font.systemCompat) || !(font === 'system'),
20
23
  }), "data-test-id": dataTestId, ref: mergeRefs([ref, textRef]), ...restProps }, children));
21
24
  });
22
25
 
@@ -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 { 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":[],"mappings":";;;;;;;AAyFa,MAAA,SAAS,GAAG,UAAU,CAC/B,CACI,EACI,GAAG,EAAE,SAAS,GAAG,KAAK,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,EACJ,QAAQ,EACR,MAAM,GAAG,MAAM,EACf,cAAc,GAAG,KAAK,EACtB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,YAAY,EACZ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAE5E,MAAM,QAAQ,GAAG,cAAc,CAAC;QAC5B,gBAAgB,EAAE,EAAE,CAAC,cAAc,IAAI,MAAM,CAAC,CAAW,QAAA,EAAA,IAAI,CAAE,CAAA,CAAC,CAAC;QACjE,UAAU;AACb,KAAA,CAAC;IAEF,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;;IAGnB,QACI,KAAC,CAAA,aAAA,CAAA,SAAS,EACN,EAAA,SAAS,EAAE,EAAE,CACT,YAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,SAAS,EACT,MAAM,CAAC,CAAG,EAAA,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,CAAA,EAAG,IAAI,CAAE,CAAA,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,CAAW,QAAA,EAAA,IAAI,CAAE,CAAA,CAAC,EAC3C,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB;YACI,CAAC,YAAY,CAAC,CAAW,QAAA,EAAA,QAAQ,EAAE,CAAC,GAAG,QAAQ;AAC/C,YAAA,CAAC,YAAY,CAAC,WAAW,GAAG,YAAY;AAC3C,SAAA,CACJ,kBACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,GAAA,SAAS,IAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
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 { isObject } from '@alfalab/core-components-shared';\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\n\nimport { getDefaultWeight } from './utils';\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' | 'alfasans' | { font: 'alfasans'; systemCompat: boolean };\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 = 'styrene',\n platform,\n weight = getDefaultWeight(isObject(font) ? font.font : font, platform),\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 [styles.font]:\n (isObject(font) && !font.systemCompat) || !(font === 'system'),\n },\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;AA4FO,MAAM,SAAS,GAAG,UAAU,CAC/B,CACI,EACI,GAAG,EAAE,SAAS,GAAG,KAAK,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,GAAG,SAAS,EAChB,QAAQ,EACR,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,QAAQ,CAAC,EACtE,cAAc,GAAG,KAAK,EACtB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,YAAY,EACZ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAE5E,MAAM,QAAQ,GAAG,cAAc,CAAC;QAC5B,gBAAgB,EAAE,EAAE,CAAC,cAAc,IAAI,MAAM,CAAC,CAAW,QAAA,EAAA,IAAI,CAAE,CAAA,CAAC,CAAC;QACjE,UAAU;AACb,KAAA,CAAC;IAEF,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;;IAGnB,QACI,KAAC,CAAA,aAAA,CAAA,SAAS,EACN,EAAA,SAAS,EAAE,EAAE,CACT,YAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,SAAS,EACT,MAAM,CAAC,CAAG,EAAA,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,CAAA,EAAG,IAAI,CAAE,CAAA,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,CAAW,QAAA,EAAA,IAAI,CAAE,CAAA,CAAC,EAC3C,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB;YACI,CAAC,YAAY,CAAC,CAAW,QAAA,EAAA,QAAQ,EAAE,CAAC,GAAG,QAAQ;AAC/C,YAAA,CAAC,YAAY,CAAC,WAAW,GAAG,YAAY;YACxC,CAAC,MAAM,CAAC,IAAI,GACR,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AACrE,SAAA,CACJ,kBACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,GAAA,SAAS,IAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
@@ -10,92 +10,143 @@
10
10
  --gap-48: var(--gap-4xl);
11
11
  }
12
12
  :root {
13
- --font-family-alfasans:
14
- 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
15
- Helvetica, sans-serif;
13
+ --font-family-system:
14
+ system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
15
+ --font-family-styrene:
16
+ 'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
17
+ sans-serif;
16
18
  }
17
- .typography__xlarge_1tozw {
19
+ .typography__xlarge_15yxw {
18
20
  font-size: 48px;
19
21
  line-height: 52px;
20
22
  font-weight: 700;
21
- letter-spacing: 0.1px;
22
- font-family: var(--font-family-alfasans);
23
+ font-family: var(--font-family-system);
23
24
  }
24
- .typography__regular-xlarge_1tozw {
25
+ .typography__xlarge_15yxw.typography__font_15yxw {
26
+ line-height: 64px;
27
+ font-weight: 500;
28
+ font-feature-settings: 'ss01';
29
+ font-family: var(--font-family-styrene);
30
+ }
31
+ .typography__regular-xlarge_15yxw {
25
32
  font-size: 48px;
26
33
  line-height: 52px;
27
34
  font-weight: 400;
28
- letter-spacing: -2.1px;
29
- font-family: var(--font-family-alfasans);
35
+ font-family: var(--font-family-system);
30
36
  }
31
- .typography__large_1tozw {
37
+ .typography__regular-xlarge_15yxw.typography__font_15yxw {
38
+ line-height: 64px;
39
+ font-feature-settings: 'ss01';
40
+ font-family: var(--font-family-styrene);
41
+ }
42
+ .typography__large_15yxw {
32
43
  font-size: 40px;
33
44
  line-height: 48px;
34
45
  font-weight: 700;
35
- letter-spacing: 0.1px;
36
- font-family: var(--font-family-alfasans);
46
+ font-family: var(--font-family-system);
37
47
  }
38
- .typography__regular-large_1tozw {
48
+ .typography__large_15yxw.typography__font_15yxw {
49
+ font-weight: 500;
50
+ font-feature-settings: 'ss01';
51
+ font-family: var(--font-family-styrene);
52
+ }
53
+ .typography__regular-large_15yxw {
39
54
  font-size: 40px;
40
55
  line-height: 48px;
41
56
  font-weight: 400;
42
- letter-spacing: -1.7px;
43
- font-family: var(--font-family-alfasans);
57
+ font-family: var(--font-family-system);
44
58
  }
45
- .typography__medium_1tozw {
59
+ .typography__regular-large_15yxw.typography__font_15yxw {
60
+ font-feature-settings: 'ss01';
61
+ font-family: var(--font-family-styrene);
62
+ }
63
+ .typography__medium_15yxw {
46
64
  font-size: 30px;
47
65
  line-height: 36px;
48
66
  font-weight: 700;
49
- letter-spacing: 0.1px;
50
- font-family: var(--font-family-alfasans);
67
+ font-family: var(--font-family-system);
51
68
  }
52
- .typography__regular-medium_1tozw {
69
+ .typography__medium_15yxw.typography__font_15yxw {
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
+ .typography__regular-medium_15yxw {
53
77
  font-size: 30px;
54
78
  line-height: 36px;
55
79
  font-weight: 400;
56
- letter-spacing: -1.25px;
57
- font-family: var(--font-family-alfasans);
80
+ font-family: var(--font-family-system);
58
81
  }
59
- .typography__small_1tozw {
82
+ .typography__regular-medium_15yxw.typography__font_15yxw {
83
+ font-size: 32px;
84
+ line-height: 40px;
85
+ font-feature-settings: 'ss01';
86
+ font-family: var(--font-family-styrene);
87
+ }
88
+ .typography__small_15yxw {
60
89
  font-size: 22px;
61
90
  line-height: 26px;
62
91
  font-weight: 700;
63
- letter-spacing: 0.2px;
64
- font-family: var(--font-family-alfasans);
92
+ font-family: var(--font-family-system);
65
93
  }
66
- .typography__regular-small_1tozw {
94
+ .typography__small_15yxw.typography__font_15yxw {
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
+ .typography__regular-small_15yxw {
67
102
  font-size: 22px;
68
103
  line-height: 26px;
69
104
  font-weight: 400;
70
- letter-spacing: -0.8px;
71
- font-family: var(--font-family-alfasans);
105
+ font-family: var(--font-family-system);
72
106
  }
73
- .typography__xsmall_1tozw {
107
+ .typography__regular-small_15yxw.typography__font_15yxw {
108
+ font-size: 24px;
109
+ line-height: 32px;
110
+ font-feature-settings: 'ss01';
111
+ font-family: var(--font-family-styrene);
112
+ }
113
+ .typography__xsmall_15yxw {
74
114
  font-size: 18px;
75
115
  line-height: 22px;
76
116
  font-weight: 700;
77
- letter-spacing: 0.38px;
78
- font-family: var(--font-family-alfasans);
117
+ font-family: var(--font-family-system);
79
118
  }
80
- .typography__regular-xsmall_1tozw {
119
+ .typography__xsmall_15yxw.typography__font_15yxw {
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
+ .typography__regular-xsmall_15yxw {
81
127
  font-size: 18px;
82
128
  line-height: 22px;
83
129
  font-weight: 400;
84
- letter-spacing: -0.36px;
85
- font-family: var(--font-family-alfasans);
130
+ font-family: var(--font-family-system);
86
131
  }
87
- .typography__component_1tozw.typography__margins-xlarge_1tozw {
132
+ .typography__regular-xsmall_15yxw.typography__font_15yxw {
133
+ font-size: 20px;
134
+ line-height: 24px;
135
+ font-feature-settings: 'ss01';
136
+ font-family: var(--font-family-styrene);
137
+ }
138
+ .typography__component_15yxw.typography__margins-xlarge_15yxw {
88
139
  margin: var(--gap-0) var(--gap-0) var(--gap-24);
89
140
  }
90
- .typography__component_1tozw.typography__margins-large_1tozw {
141
+ .typography__component_15yxw.typography__margins-large_15yxw {
91
142
  margin: var(--gap-48) var(--gap-0) var(--gap-24);
92
143
  }
93
- .typography__component_1tozw.typography__margins-medium_1tozw {
144
+ .typography__component_15yxw.typography__margins-medium_15yxw {
94
145
  margin: var(--gap-48) var(--gap-0) var(--gap-24);
95
146
  }
96
- .typography__component_1tozw.typography__margins-small_1tozw {
147
+ .typography__component_15yxw.typography__margins-small_15yxw {
97
148
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
98
149
  }
99
- .typography__component_1tozw.typography__margins-xsmall_1tozw {
150
+ .typography__component_15yxw.typography__margins-xsmall_15yxw {
100
151
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
101
152
  }
@@ -5,7 +5,10 @@ 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";
8
+ font?: "styrene" | "system" | "alfasans" | {
9
+ font: "alfasans";
10
+ systemCompat: boolean;
11
+ };
9
12
  defaultMargins?: boolean;
10
13
  className?: string;
11
14
  dataTestId?: string;
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"xlarge":"typography__xlarge_1tozw","regular-xlarge":"typography__regular-xlarge_1tozw","large":"typography__large_1tozw","regular-large":"typography__regular-large_1tozw","medium":"typography__medium_1tozw","regular-medium":"typography__regular-medium_1tozw","small":"typography__small_1tozw","regular-small":"typography__regular-small_1tozw","xsmall":"typography__xsmall_1tozw","regular-xsmall":"typography__regular-xsmall_1tozw","component":"typography__component_1tozw","margins-xlarge":"typography__margins-xlarge_1tozw","margins-large":"typography__margins-large_1tozw","margins-medium":"typography__margins-medium_1tozw","margins-small":"typography__margins-small_1tozw","margins-xsmall":"typography__margins-xsmall_1tozw"};
3
+ const styles = {"xlarge":"typography__xlarge_15yxw","font":"typography__font_15yxw","regular-xlarge":"typography__regular-xlarge_15yxw","large":"typography__large_15yxw","regular-large":"typography__regular-large_15yxw","medium":"typography__medium_15yxw","regular-medium":"typography__regular-medium_15yxw","small":"typography__small_15yxw","regular-small":"typography__regular-small_15yxw","xsmall":"typography__xsmall_15yxw","regular-xsmall":"typography__regular-xsmall_15yxw","component":"typography__component_15yxw","margins-xlarge":"typography__margins-xlarge_15yxw","margins-large":"typography__margins-large_15yxw","margins-medium":"typography__margins-medium_15yxw","margins-small":"typography__margins-small_15yxw","margins-xsmall":"typography__margins-xsmall_15yxw"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../src/title/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../margins.module.css';\n\n@each $view in xlarge, large, medium, small, xsmall {\n .$(view) {\n @mixin headline-system_$(view);\n }\n\n .regular-$(view) {\n @mixin promo-system_$(view);\n }\n}\n\n.component {\n &.margins-xlarge {\n @mixin margin-large;\n }\n\n &.margins-large {\n @mixin margin-medium;\n }\n\n &.margins-medium {\n @mixin margin-medium;\n }\n\n &.margins-small {\n @mixin margin-small;\n }\n\n &.margins-xsmall {\n @mixin margin-small;\n }\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,QAAQ,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,OAAO,CAAC,yBAAyB,CAAC,eAAe,CAAC,iCAAiC,CAAC,QAAQ,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,OAAO,CAAC,yBAAyB,CAAC,eAAe,CAAC,iCAAiC,CAAC,QAAQ,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,WAAW,CAAC,6BAA6B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../src/title/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../margins.module.css';\n\n@each $view in xlarge, large, medium, small, xsmall {\n .$(view) {\n @mixin headline-system_$(view);\n\n &.font {\n @subtract-mixin headline_$(view), headline-system_$(view);\n }\n }\n\n .regular-$(view) {\n @mixin promo-system_$(view);\n\n &.font {\n @subtract-mixin promo_$(view), promo-system_$(view);\n }\n }\n}\n\n.component {\n &.margins-xlarge {\n @mixin margin-large;\n }\n\n &.margins-large {\n @mixin margin-medium;\n }\n\n &.margins-medium {\n @mixin margin-medium;\n }\n\n &.margins-small {\n @mixin margin-small;\n }\n\n &.margins-xsmall {\n @mixin margin-small;\n }\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,QAAQ,CAAC,0BAA0B,CAAC,MAAM,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,OAAO,CAAC,yBAAyB,CAAC,eAAe,CAAC,iCAAiC,CAAC,QAAQ,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,OAAO,CAAC,yBAAyB,CAAC,eAAe,CAAC,iCAAiC,CAAC,QAAQ,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,WAAW,CAAC,6BAA6B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC;;;;"}
@@ -0,0 +1 @@
1
+ export declare function getDefaultWeight(font: 'styrene' | 'system' | 'alfasans', platform: 'mobile' | 'desktop'): "medium" | "bold" | "semibold";
@@ -0,0 +1,12 @@
1
+ function getDefaultWeight(font, platform) {
2
+ if (font === 'styrene' || font === 'alfasans') {
3
+ return 'medium';
4
+ }
5
+ if (platform === 'desktop') {
6
+ return 'bold';
7
+ }
8
+ return 'semibold';
9
+ }
10
+
11
+ export { getDefaultWeight };
12
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../src/title/utils.ts"],"sourcesContent":["export function getDefaultWeight(\n font: 'styrene' | 'system' | 'alfasans',\n platform: 'mobile' | 'desktop',\n) {\n if (font === 'styrene' || font === 'alfasans') {\n return 'medium';\n }\n\n if (platform === 'desktop') {\n return 'bold';\n }\n\n return 'semibold';\n}\n"],"names":[],"mappings":"AAAgB,SAAA,gBAAgB,CAC5B,IAAuC,EACvC,QAA8B,EAAA;IAE9B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,UAAU,EAAE;AAC3C,QAAA,OAAO,QAAQ;;AAGnB,IAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;AACxB,QAAA,OAAO,MAAM;;AAGjB,IAAA,OAAO,UAAU;AACrB;;;;"}
@@ -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;