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

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
@@ -3,206 +3,179 @@
3
3
  --gap-12: 12px;
4
4
  }
5
5
  :root {
6
- --font-family-alfasans:
7
- 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
8
- Helvetica, sans-serif;
6
+ --font-family-system:
7
+ system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
9
8
  }
10
- .typography__transparent_oy13v {
9
+ .typography__transparent_1cx1r {
11
10
  opacity: 0;
12
11
  }
13
12
  :root {
14
13
  --text-paragraph-margin-bottom: var(--gap-0) var(--gap-0) var(--gap-12);
15
14
  }
16
- .typography__paragraph_oy13v {
15
+ .typography__paragraph_1cx1r {
17
16
  margin: var(--gap-0);
18
17
  padding: var(--gap-0);
19
18
  }
20
- .typography__paragraphWithMargins_oy13v {
19
+ .typography__paragraphWithMargins_1cx1r {
21
20
  padding: var(--gap-0);
22
21
  margin: var(--text-paragraph-margin-bottom);
23
22
  }
24
- .typography__component_oy13v {
23
+ .typography__component_1cx1r {
25
24
  font-size: 16px;
26
25
  line-height: 20px;
27
26
  font-weight: 400;
28
- letter-spacing: -0.24px;
29
- font-family: var(--font-family-alfasans);
27
+ font-family: var(--font-family-system);
30
28
  }
31
- .typography__component_oy13v.typography__bold_oy13v {
29
+ .typography__component_1cx1r.typography__bold_1cx1r {
32
30
  font-weight: 700;
33
- letter-spacing: 0.43px;
34
31
  }
35
- .typography__component_oy13v.typography__medium_oy13v {
32
+ .typography__component_1cx1r.typography__medium_1cx1r {
36
33
  font-weight: 500;
37
- letter-spacing: -0.05px;
38
34
  }
39
- .typography__caps_oy13v {
35
+ .typography__caps_1cx1r {
40
36
  font-size: 12px;
41
37
  line-height: 16px;
42
38
  font-weight: 400;
43
39
  letter-spacing: 1.25px;
44
40
  text-transform: uppercase;
45
- font-family: var(--font-family-alfasans);
41
+ font-family: var(--font-family-system);
46
42
  }
47
- .typography__caps_oy13v.typography__bold_oy13v {
43
+ .typography__caps_1cx1r.typography__bold_1cx1r {
48
44
  font-weight: 700;
49
45
  }
50
- .typography__caps_oy13v.typography__medium_oy13v {
46
+ .typography__caps_1cx1r.typography__medium_1cx1r {
51
47
  font-weight: 500;
52
48
  }
53
- .typography__tagline_oy13v {
49
+ .typography__tagline_1cx1r {
54
50
  font-size: 12px;
55
51
  line-height: 16px;
56
52
  font-weight: 400;
57
53
  letter-spacing: 1.25px;
58
54
  text-transform: uppercase;
59
- font-family: var(--font-family-alfasans);
55
+ font-family: var(--font-family-system);
60
56
  }
61
- .typography__tagline_oy13v.typography__bold_oy13v {
57
+ .typography__tagline_1cx1r.typography__bold_1cx1r {
62
58
  font-weight: 700;
63
59
  }
64
- .typography__tagline_oy13v.typography__medium_oy13v {
60
+ .typography__tagline_1cx1r.typography__medium_1cx1r {
65
61
  font-weight: 500;
66
62
  }
67
- .typography__primary-large_oy13v {
63
+ .typography__primary-large_1cx1r {
68
64
  font-size: 18px;
69
65
  line-height: 24px;
70
66
  font-weight: 400;
71
- letter-spacing: -0.36px;
72
- font-family: var(--font-family-alfasans);
67
+ font-family: var(--font-family-system);
73
68
  }
74
- .typography__primary-large_oy13v.typography__bold_oy13v {
69
+ .typography__primary-large_1cx1r.typography__bold_1cx1r {
75
70
  font-weight: 700;
76
- letter-spacing: 0.38px;
77
71
  }
78
- .typography__primary-large_oy13v.typography__medium_oy13v {
72
+ .typography__primary-large_1cx1r.typography__medium_1cx1r {
79
73
  font-weight: 500;
80
- letter-spacing: -0.17px;
81
74
  }
82
- .typography__primary-medium_oy13v {
75
+ .typography__primary-medium_1cx1r {
83
76
  font-size: 16px;
84
77
  line-height: 24px;
85
78
  font-weight: 400;
86
- letter-spacing: -0.24px;
87
- font-family: var(--font-family-alfasans);
79
+ font-family: var(--font-family-system);
88
80
  }
89
- .typography__primary-medium_oy13v.typography__bold_oy13v {
81
+ .typography__primary-medium_1cx1r.typography__bold_1cx1r {
90
82
  font-weight: 700;
91
- letter-spacing: 0.43px;
92
83
  }
93
- .typography__primary-medium_oy13v.typography__medium_oy13v {
84
+ .typography__primary-medium_1cx1r.typography__medium_1cx1r {
94
85
  font-weight: 500;
95
- letter-spacing: -0.05px;
96
86
  }
97
- .typography__primary-small_oy13v {
87
+ .typography__primary-small_1cx1r {
98
88
  font-size: 14px;
99
89
  line-height: 20px;
100
90
  font-weight: 400;
101
- letter-spacing: -0.08px;
102
- font-family: var(--font-family-alfasans);
91
+ font-family: var(--font-family-system);
103
92
  }
104
- .typography__primary-small_oy13v.typography__bold_oy13v {
93
+ .typography__primary-small_1cx1r.typography__bold_1cx1r {
105
94
  font-weight: 700;
106
- letter-spacing: 0.47px;
107
95
  }
108
- .typography__primary-small_oy13v.typography__medium_oy13v {
96
+ .typography__primary-small_1cx1r.typography__medium_1cx1r {
109
97
  font-weight: 500;
110
- letter-spacing: 0.07px;
111
98
  }
112
- .typography__component-primary_oy13v {
99
+ .typography__component-primary_1cx1r {
113
100
  font-size: 16px;
114
101
  line-height: 20px;
115
102
  font-weight: 400;
116
- letter-spacing: -0.24px;
117
- font-family: var(--font-family-alfasans);
103
+ font-family: var(--font-family-system);
118
104
  }
119
- .typography__component-primary_oy13v.typography__bold_oy13v {
105
+ .typography__component-primary_1cx1r.typography__bold_1cx1r {
120
106
  font-weight: 700;
121
- letter-spacing: 0.43px;
122
107
  }
123
- .typography__component-primary_oy13v.typography__medium_oy13v {
108
+ .typography__component-primary_1cx1r.typography__medium_1cx1r {
124
109
  font-weight: 500;
125
- letter-spacing: -0.05px;
126
110
  }
127
- .typography__secondary-large_oy13v {
111
+ .typography__secondary-large_1cx1r {
128
112
  font-size: 13px;
129
113
  line-height: 16px;
130
114
  font-weight: 400;
131
- font-family: var(--font-family-alfasans);
115
+ font-family: var(--font-family-system);
132
116
  }
133
- .typography__secondary-large_oy13v.typography__bold_oy13v {
117
+ .typography__secondary-large_1cx1r.typography__bold_1cx1r {
134
118
  font-weight: 700;
135
- letter-spacing: 0.54px;
136
119
  }
137
- .typography__secondary-large_oy13v.typography__medium_oy13v {
120
+ .typography__secondary-large_1cx1r.typography__medium_1cx1r {
138
121
  font-weight: 500;
139
- letter-spacing: 0.13px;
140
122
  }
141
- .typography__secondary-medium_oy13v {
123
+ .typography__secondary-medium_1cx1r {
142
124
  font-size: 12px;
143
125
  line-height: 16px;
144
126
  font-weight: 400;
145
- letter-spacing: 0.06px;
146
- font-family: var(--font-family-alfasans);
127
+ font-family: var(--font-family-system);
147
128
  }
148
- .typography__secondary-medium_oy13v.typography__bold_oy13v {
129
+ .typography__secondary-medium_1cx1r.typography__bold_1cx1r {
149
130
  font-weight: 700;
150
- letter-spacing: 0.57px;
151
131
  }
152
- .typography__secondary-medium_oy13v.typography__medium_oy13v {
132
+ .typography__secondary-medium_1cx1r.typography__medium_1cx1r {
153
133
  font-weight: 500;
154
- letter-spacing: 0.19px;
155
134
  }
156
- .typography__secondary-small_oy13v {
135
+ .typography__secondary-small_1cx1r {
157
136
  font-size: 11px;
158
137
  line-height: 16px;
159
138
  font-weight: 400;
160
- letter-spacing: 0.15px;
161
- font-family: var(--font-family-alfasans);
139
+ font-family: var(--font-family-system);
162
140
  }
163
- .typography__secondary-small_oy13v.typography__bold_oy13v {
141
+ .typography__secondary-small_1cx1r.typography__bold_1cx1r {
164
142
  font-weight: 700;
165
- letter-spacing: 0.54px;
166
143
  }
167
- .typography__secondary-small_oy13v.typography__medium_oy13v {
144
+ .typography__secondary-small_1cx1r.typography__medium_1cx1r {
168
145
  font-weight: 500;
169
- letter-spacing: 0.24px;
170
146
  }
171
- .typography__component-secondary_oy13v {
147
+ .typography__component-secondary_1cx1r {
172
148
  font-size: 14px;
173
149
  line-height: 18px;
174
150
  font-weight: 400;
175
- letter-spacing: -0.08px;
176
- font-family: var(--font-family-alfasans);
151
+ font-family: var(--font-family-system);
177
152
  }
178
- .typography__component-secondary_oy13v.typography__bold_oy13v {
153
+ .typography__component-secondary_1cx1r.typography__bold_1cx1r {
179
154
  font-weight: 700;
180
- letter-spacing: 0.47px;
181
155
  }
182
- .typography__component-secondary_oy13v.typography__medium_oy13v {
156
+ .typography__component-secondary_1cx1r.typography__medium_1cx1r {
183
157
  font-weight: 500;
184
- letter-spacing: 0.07px;
185
158
  }
186
- .typography__rowLimit1_oy13v {
159
+ .typography__rowLimit1_1cx1r {
187
160
  -webkit-line-clamp: 1;
188
161
  display: -webkit-box;
189
162
  -webkit-box-orient: vertical;
190
163
  overflow: hidden;
191
164
  word-break: break-all;
192
165
  }
193
- .typography__rowLimit2_oy13v {
166
+ .typography__rowLimit2_1cx1r {
194
167
  -webkit-line-clamp: 2;
195
168
  display: -webkit-box;
196
169
  -webkit-box-orient: vertical;
197
170
  overflow: hidden;
198
171
  }
199
- .typography__rowLimit3_oy13v {
172
+ .typography__rowLimit3_1cx1r {
200
173
  -webkit-line-clamp: 3;
201
174
  display: -webkit-box;
202
175
  -webkit-box-orient: vertical;
203
176
  overflow: hidden;
204
177
  }
205
- .typography__monospace_oy13v {
178
+ .typography__monospace_1cx1r {
206
179
  font-feature-settings: "tnum";
207
180
  font-variant-numeric: tabular-nums;
208
181
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"transparent":"typography__transparent_oy13v","paragraph":"typography__paragraph_oy13v","paragraphWithMargins":"typography__paragraphWithMargins_oy13v","component":"typography__component_oy13v","bold":"typography__bold_oy13v","medium":"typography__medium_oy13v","caps":"typography__caps_oy13v","tagline":"typography__tagline_oy13v","primary-large":"typography__primary-large_oy13v","primary-medium":"typography__primary-medium_oy13v","primary-small":"typography__primary-small_oy13v","component-primary":"typography__component-primary_oy13v","secondary-large":"typography__secondary-large_oy13v","secondary-medium":"typography__secondary-medium_oy13v","secondary-small":"typography__secondary-small_oy13v","component-secondary":"typography__component-secondary_oy13v","rowLimit1":"typography__rowLimit1_oy13v","rowLimit2":"typography__rowLimit2_oy13v","rowLimit3":"typography__rowLimit3_oy13v","monospace":"typography__monospace_oy13v"};
3
+ const styles = {"transparent":"typography__transparent_1cx1r","paragraph":"typography__paragraph_1cx1r","paragraphWithMargins":"typography__paragraphWithMargins_1cx1r","component":"typography__component_1cx1r","bold":"typography__bold_1cx1r","medium":"typography__medium_1cx1r","caps":"typography__caps_1cx1r","tagline":"typography__tagline_1cx1r","primary-large":"typography__primary-large_1cx1r","primary-medium":"typography__primary-medium_1cx1r","primary-small":"typography__primary-small_1cx1r","component-primary":"typography__component-primary_1cx1r","secondary-large":"typography__secondary-large_1cx1r","secondary-medium":"typography__secondary-medium_1cx1r","secondary-small":"typography__secondary-small_1cx1r","component-secondary":"typography__component-secondary_1cx1r","rowLimit1":"typography__rowLimit1_1cx1r","rowLimit2":"typography__rowLimit2_1cx1r","rowLimit3":"typography__rowLimit3_1cx1r","monospace":"typography__monospace_1cx1r"};
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_1skzm {
4
+ .typography__transparent_1ocqv {
5
5
  opacity: 0;
6
6
  }
7
- .typography__component_1skzm {
7
+ .typography__component_1ocqv {
8
8
  margin: var(--gap-0);
9
9
  padding: var(--gap-0);
10
10
  }
11
- .typography__rowLimit1_1skzm {
11
+ .typography__rowLimit1_1ocqv {
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_1skzm {
18
+ .typography__rowLimit2_1ocqv {
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_1skzm {
24
+ .typography__rowLimit3_1ocqv {
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_1skzm","component":"typography__component_1skzm","rowLimit1":"typography__rowLimit1_1skzm","rowLimit2":"typography__rowLimit2_1skzm","rowLimit3":"typography__rowLimit3_1skzm"};
3
+ const commonStyles = {"transparent":"typography__transparent_1ocqv","component":"typography__component_1ocqv","rowLimit1":"typography__rowLimit1_1ocqv","rowLimit2":"typography__rowLimit2_1ocqv","rowLimit3":"typography__rowLimit3_1ocqv"};
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;;;;"}
@@ -6,92 +6,143 @@
6
6
  --gap-48: 48px;
7
7
  }
8
8
  :root {
9
- --font-family-alfasans:
10
- 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
11
- Helvetica, sans-serif;
9
+ --font-family-system:
10
+ system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
11
+ --font-family-styrene:
12
+ 'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
13
+ sans-serif;
12
14
  }
13
- .typography__xlarge_tjjzu {
15
+ .typography__xlarge_gmqy9 {
14
16
  font-size: 48px;
15
17
  line-height: 52px;
16
18
  font-weight: 700;
17
- letter-spacing: 0.1px;
18
- font-family: var(--font-family-alfasans);
19
+ font-family: var(--font-family-system);
19
20
  }
20
- .typography__regular-xlarge_tjjzu {
21
+ .typography__xlarge_gmqy9.typography__font_gmqy9 {
22
+ line-height: 64px;
23
+ font-weight: 500;
24
+ font-feature-settings: 'ss01';
25
+ font-family: var(--font-family-styrene);
26
+ }
27
+ .typography__regular-xlarge_gmqy9 {
21
28
  font-size: 48px;
22
29
  line-height: 52px;
23
30
  font-weight: 400;
24
- letter-spacing: -2.1px;
25
- font-family: var(--font-family-alfasans);
31
+ font-family: var(--font-family-system);
26
32
  }
27
- .typography__large_tjjzu {
33
+ .typography__regular-xlarge_gmqy9.typography__font_gmqy9 {
34
+ line-height: 64px;
35
+ font-feature-settings: 'ss01';
36
+ font-family: var(--font-family-styrene);
37
+ }
38
+ .typography__large_gmqy9 {
28
39
  font-size: 40px;
29
40
  line-height: 48px;
30
41
  font-weight: 700;
31
- letter-spacing: 0.1px;
32
- font-family: var(--font-family-alfasans);
42
+ font-family: var(--font-family-system);
33
43
  }
34
- .typography__regular-large_tjjzu {
44
+ .typography__large_gmqy9.typography__font_gmqy9 {
45
+ font-weight: 500;
46
+ font-feature-settings: 'ss01';
47
+ font-family: var(--font-family-styrene);
48
+ }
49
+ .typography__regular-large_gmqy9 {
35
50
  font-size: 40px;
36
51
  line-height: 48px;
37
52
  font-weight: 400;
38
- letter-spacing: -1.7px;
39
- font-family: var(--font-family-alfasans);
53
+ font-family: var(--font-family-system);
40
54
  }
41
- .typography__medium_tjjzu {
55
+ .typography__regular-large_gmqy9.typography__font_gmqy9 {
56
+ font-feature-settings: 'ss01';
57
+ font-family: var(--font-family-styrene);
58
+ }
59
+ .typography__medium_gmqy9 {
42
60
  font-size: 30px;
43
61
  line-height: 36px;
44
62
  font-weight: 700;
45
- letter-spacing: 0.1px;
46
- font-family: var(--font-family-alfasans);
63
+ font-family: var(--font-family-system);
47
64
  }
48
- .typography__regular-medium_tjjzu {
65
+ .typography__medium_gmqy9.typography__font_gmqy9 {
66
+ font-size: 32px;
67
+ line-height: 40px;
68
+ font-weight: 500;
69
+ font-feature-settings: 'ss01';
70
+ font-family: var(--font-family-styrene);
71
+ }
72
+ .typography__regular-medium_gmqy9 {
49
73
  font-size: 30px;
50
74
  line-height: 36px;
51
75
  font-weight: 400;
52
- letter-spacing: -1.25px;
53
- font-family: var(--font-family-alfasans);
76
+ font-family: var(--font-family-system);
54
77
  }
55
- .typography__small_tjjzu {
78
+ .typography__regular-medium_gmqy9.typography__font_gmqy9 {
79
+ font-size: 32px;
80
+ line-height: 40px;
81
+ font-feature-settings: 'ss01';
82
+ font-family: var(--font-family-styrene);
83
+ }
84
+ .typography__small_gmqy9 {
56
85
  font-size: 22px;
57
86
  line-height: 26px;
58
87
  font-weight: 700;
59
- letter-spacing: 0.2px;
60
- font-family: var(--font-family-alfasans);
88
+ font-family: var(--font-family-system);
61
89
  }
62
- .typography__regular-small_tjjzu {
90
+ .typography__small_gmqy9.typography__font_gmqy9 {
91
+ font-size: 24px;
92
+ line-height: 32px;
93
+ font-weight: 500;
94
+ font-feature-settings: 'ss01';
95
+ font-family: var(--font-family-styrene);
96
+ }
97
+ .typography__regular-small_gmqy9 {
63
98
  font-size: 22px;
64
99
  line-height: 26px;
65
100
  font-weight: 400;
66
- letter-spacing: -0.8px;
67
- font-family: var(--font-family-alfasans);
101
+ font-family: var(--font-family-system);
68
102
  }
69
- .typography__xsmall_tjjzu {
103
+ .typography__regular-small_gmqy9.typography__font_gmqy9 {
104
+ font-size: 24px;
105
+ line-height: 32px;
106
+ font-feature-settings: 'ss01';
107
+ font-family: var(--font-family-styrene);
108
+ }
109
+ .typography__xsmall_gmqy9 {
70
110
  font-size: 18px;
71
111
  line-height: 22px;
72
112
  font-weight: 700;
73
- letter-spacing: 0.38px;
74
- font-family: var(--font-family-alfasans);
113
+ font-family: var(--font-family-system);
75
114
  }
76
- .typography__regular-xsmall_tjjzu {
115
+ .typography__xsmall_gmqy9.typography__font_gmqy9 {
116
+ font-size: 20px;
117
+ line-height: 24px;
118
+ font-weight: 500;
119
+ font-feature-settings: 'ss01';
120
+ font-family: var(--font-family-styrene);
121
+ }
122
+ .typography__regular-xsmall_gmqy9 {
77
123
  font-size: 18px;
78
124
  line-height: 22px;
79
125
  font-weight: 400;
80
- letter-spacing: -0.36px;
81
- font-family: var(--font-family-alfasans);
126
+ font-family: var(--font-family-system);
82
127
  }
83
- .typography__component_tjjzu.typography__margins-xlarge_tjjzu {
128
+ .typography__regular-xsmall_gmqy9.typography__font_gmqy9 {
129
+ font-size: 20px;
130
+ line-height: 24px;
131
+ font-feature-settings: 'ss01';
132
+ font-family: var(--font-family-styrene);
133
+ }
134
+ .typography__component_gmqy9.typography__margins-xlarge_gmqy9 {
84
135
  margin: var(--gap-0) var(--gap-0) var(--gap-24);
85
136
  }
86
- .typography__component_tjjzu.typography__margins-large_tjjzu {
137
+ .typography__component_gmqy9.typography__margins-large_gmqy9 {
87
138
  margin: var(--gap-48) var(--gap-0) var(--gap-24);
88
139
  }
89
- .typography__component_tjjzu.typography__margins-medium_tjjzu {
140
+ .typography__component_gmqy9.typography__margins-medium_gmqy9 {
90
141
  margin: var(--gap-48) var(--gap-0) var(--gap-24);
91
142
  }
92
- .typography__component_tjjzu.typography__margins-small_tjjzu {
143
+ .typography__component_gmqy9.typography__margins-small_gmqy9 {
93
144
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
94
145
  }
95
- .typography__component_tjjzu.typography__margins-xsmall_tjjzu {
146
+ .typography__component_gmqy9.typography__margins-xsmall_gmqy9 {
96
147
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
97
148
  }
@@ -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_tjjzu","regular-xlarge":"typography__regular-xlarge_tjjzu","large":"typography__large_tjjzu","regular-large":"typography__regular-large_tjjzu","medium":"typography__medium_tjjzu","regular-medium":"typography__regular-medium_tjjzu","small":"typography__small_tjjzu","regular-small":"typography__regular-small_tjjzu","xsmall":"typography__xsmall_tjjzu","regular-xsmall":"typography__regular-xsmall_tjjzu","component":"typography__component_tjjzu","margins-xlarge":"typography__margins-xlarge_tjjzu","margins-large":"typography__margins-large_tjjzu","margins-medium":"typography__margins-medium_tjjzu","margins-small":"typography__margins-small_tjjzu","margins-xsmall":"typography__margins-xsmall_tjjzu"};
3
+ const styles = {"xlarge":"typography__xlarge_gmqy9","font":"typography__font_gmqy9","regular-xlarge":"typography__regular-xlarge_gmqy9","large":"typography__large_gmqy9","regular-large":"typography__regular-large_gmqy9","medium":"typography__medium_gmqy9","regular-medium":"typography__regular-medium_gmqy9","small":"typography__small_gmqy9","regular-small":"typography__regular-small_gmqy9","xsmall":"typography__xsmall_gmqy9","regular-xsmall":"typography__regular-xsmall_gmqy9","component":"typography__component_gmqy9","margins-xlarge":"typography__margins-xlarge_gmqy9","margins-large":"typography__margins-large_gmqy9","margins-medium":"typography__margins-medium_gmqy9","margins-small":"typography__margins-small_gmqy9","margins-xsmall":"typography__margins-xsmall_gmqy9"};
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;