@alfalab/core-components-typography 6.0.14 → 6.0.15-alfasans

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/colors.css +20 -20
  2. package/colors.js.map +1 -1
  3. package/colors.module.css.js +1 -1
  4. package/colors.module.css.js.map +1 -1
  5. package/component.js +8 -8
  6. package/component.js.map +1 -1
  7. package/cssm/colors.js.map +1 -1
  8. package/cssm/component.js +8 -8
  9. package/cssm/component.js.map +1 -1
  10. package/cssm/index.js +8 -8
  11. package/cssm/presets.js.map +1 -1
  12. package/cssm/text/component.js.map +1 -1
  13. package/cssm/text/index.module.css +40 -13
  14. package/cssm/title/component.d.ts +2 -8
  15. package/cssm/title/component.js +3 -6
  16. package/cssm/title/component.js.map +1 -1
  17. package/cssm/title/index.d.ts +1 -4
  18. package/cssm/title/index.js.map +1 -1
  19. package/cssm/title/index.module.css +23 -74
  20. package/cssm/title-mobile/component.d.ts +1 -4
  21. package/cssm/title-mobile/component.js.map +1 -1
  22. package/cssm/title-mobile/index.module.css +28 -45
  23. package/cssm/title-responsive/component.d.ts +1 -4
  24. package/cssm/title-responsive/component.js.map +1 -1
  25. package/esm/colors.css +20 -20
  26. package/esm/colors.js.map +1 -1
  27. package/esm/colors.module.css.js +1 -1
  28. package/esm/colors.module.css.js.map +1 -1
  29. package/esm/component.js.map +1 -1
  30. package/esm/index.js +1 -1
  31. package/esm/presets.js.map +1 -1
  32. package/esm/text/component.js.map +1 -1
  33. package/esm/text/index.css +82 -55
  34. package/esm/text/index.module.css.js +1 -1
  35. package/esm/text/index.module.css.js.map +1 -1
  36. package/esm/title/common.css +7 -7
  37. package/esm/title/common.module.css.js +1 -1
  38. package/esm/title/common.module.css.js.map +1 -1
  39. package/esm/title/component.d.ts +2 -8
  40. package/esm/title/component.js +2 -5
  41. package/esm/title/component.js.map +1 -1
  42. package/esm/title/index.css +38 -89
  43. package/esm/title/index.d.ts +1 -4
  44. package/esm/title/index.js.map +1 -1
  45. package/esm/title/index.module.css.js +1 -1
  46. package/esm/title/index.module.css.js.map +1 -1
  47. package/esm/title-mobile/component.d.ts +1 -4
  48. package/esm/title-mobile/component.js.map +1 -1
  49. package/esm/title-mobile/index.css +53 -70
  50. package/esm/title-mobile/index.module.css.js +1 -1
  51. package/esm/title-mobile/index.module.css.js.map +1 -1
  52. package/esm/title-responsive/component.d.ts +1 -4
  53. package/esm/title-responsive/component.js.map +1 -1
  54. package/index.js +8 -8
  55. package/modern/colors.css +20 -20
  56. package/modern/colors.js.map +1 -1
  57. package/modern/colors.module.css.js +1 -1
  58. package/modern/colors.module.css.js.map +1 -1
  59. package/modern/component.js.map +1 -1
  60. package/modern/index.js +1 -1
  61. package/modern/presets.js.map +1 -1
  62. package/modern/text/component.js.map +1 -1
  63. package/modern/text/index.css +82 -55
  64. package/modern/text/index.module.css.js +1 -1
  65. package/modern/text/index.module.css.js.map +1 -1
  66. package/modern/title/common.css +7 -7
  67. package/modern/title/common.module.css.js +1 -1
  68. package/modern/title/common.module.css.js.map +1 -1
  69. package/modern/title/component.d.ts +2 -8
  70. package/modern/title/component.js +1 -4
  71. package/modern/title/component.js.map +1 -1
  72. package/modern/title/index.css +38 -89
  73. package/modern/title/index.d.ts +1 -4
  74. package/modern/title/index.js.map +1 -1
  75. package/modern/title/index.module.css.js +1 -1
  76. package/modern/title/index.module.css.js.map +1 -1
  77. package/modern/title-mobile/component.d.ts +1 -4
  78. package/modern/title-mobile/component.js.map +1 -1
  79. package/modern/title-mobile/index.css +53 -70
  80. package/modern/title-mobile/index.module.css.js +1 -1
  81. package/modern/title-mobile/index.module.css.js.map +1 -1
  82. package/modern/title-responsive/component.d.ts +1 -4
  83. package/modern/title-responsive/component.js.map +1 -1
  84. package/moderncssm/colors.js.map +1 -1
  85. package/moderncssm/component.js.map +1 -1
  86. package/moderncssm/index.js +1 -1
  87. package/moderncssm/presets.js.map +1 -1
  88. package/moderncssm/text/component.js.map +1 -1
  89. package/moderncssm/text/index.module.css +37 -11
  90. package/moderncssm/title/component.d.ts +2 -8
  91. package/moderncssm/title/component.js +1 -4
  92. package/moderncssm/title/component.js.map +1 -1
  93. package/moderncssm/title/index.d.ts +1 -4
  94. package/moderncssm/title/index.js.map +1 -1
  95. package/moderncssm/title/index.module.css +20 -79
  96. package/moderncssm/title-mobile/component.d.ts +1 -4
  97. package/moderncssm/title-mobile/component.js.map +1 -1
  98. package/moderncssm/title-mobile/index.module.css +25 -40
  99. package/moderncssm/title-responsive/component.d.ts +1 -4
  100. package/moderncssm/title-responsive/component.js.map +1 -1
  101. package/package.json +6 -6
  102. package/presets.js.map +1 -1
  103. package/src/text/index.module.css +5 -4
  104. package/src/title/component.tsx +3 -8
  105. package/src/title/index.module.css +0 -8
  106. package/text/component.js.map +1 -1
  107. package/text/index.css +82 -55
  108. package/text/index.module.css.js +1 -1
  109. package/text/index.module.css.js.map +1 -1
  110. package/title/common.css +7 -7
  111. package/title/common.module.css.js +1 -1
  112. package/title/common.module.css.js.map +1 -1
  113. package/title/component.d.ts +2 -8
  114. package/title/component.js +2 -5
  115. package/title/component.js.map +1 -1
  116. package/title/index.css +38 -89
  117. package/title/index.d.ts +1 -4
  118. package/title/index.js.map +1 -1
  119. package/title/index.module.css.js +1 -1
  120. package/title/index.module.css.js.map +1 -1
  121. package/title-mobile/component.d.ts +1 -4
  122. package/title-mobile/component.js.map +1 -1
  123. package/title-mobile/index.css +53 -70
  124. package/title-mobile/index.module.css.js +1 -1
  125. package/title-mobile/index.module.css.js.map +1 -1
  126. package/title-responsive/component.d.ts +1 -4
  127. package/title-responsive/component.js.map +1 -1
  128. package/cssm/title/utils.d.ts +0 -1
  129. package/cssm/title/utils.js +0 -16
  130. package/cssm/title/utils.js.map +0 -1
  131. package/esm/title/utils.d.ts +0 -1
  132. package/esm/title/utils.js +0 -12
  133. package/esm/title/utils.js.map +0 -1
  134. package/modern/title/utils.d.ts +0 -1
  135. package/modern/title/utils.js +0 -12
  136. package/modern/title/utils.js.map +0 -1
  137. package/moderncssm/title/utils.d.ts +0 -1
  138. package/moderncssm/title/utils.js +0 -12
  139. package/moderncssm/title/utils.js.map +0 -1
  140. package/src/title/utils.ts +0 -14
  141. package/title/utils.d.ts +0 -1
  142. package/title/utils.js +0 -16
  143. package/title/utils.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"xlarge":"typography__xlarge_xd7yh","font":"typography__font_xd7yh","regular-xlarge":"typography__regular-xlarge_xd7yh","large":"typography__large_xd7yh","regular-large":"typography__regular-large_xd7yh","medium":"typography__medium_xd7yh","regular-medium":"typography__regular-medium_xd7yh","small":"typography__small_xd7yh","regular-small":"typography__regular-small_xd7yh","xsmall":"typography__xsmall_xd7yh","regular-xsmall":"typography__regular-xsmall_xd7yh","component":"typography__component_xd7yh","margins-xlarge":"typography__margins-xlarge_xd7yh","margins-large":"typography__margins-large_xd7yh","margins-medium":"typography__margins-medium_xd7yh","margins-small":"typography__margins-small_xd7yh","margins-xsmall":"typography__margins-xsmall_xd7yh"};
3
+ const styles = {"xlarge":"typography__xlarge_8713p","regular-xlarge":"typography__regular-xlarge_8713p","large":"typography__large_8713p","regular-large":"typography__regular-large_8713p","medium":"typography__medium_8713p","regular-medium":"typography__regular-medium_8713p","small":"typography__small_8713p","regular-small":"typography__regular-small_8713p","xsmall":"typography__xsmall_8713p","regular-xsmall":"typography__regular-xsmall_8713p","component":"typography__component_8713p","margins-xlarge":"typography__margins-xlarge_8713p","margins-large":"typography__margins-large_8713p","margins-medium":"typography__margins-medium_8713p","margins-small":"typography__margins-small_8713p","margins-xsmall":"typography__margins-xsmall_8713p"};
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 &.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;;;;"}
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;;"}
@@ -4,10 +4,7 @@ export declare const TitleMobile: React.ForwardRefExoticComponent<Omit<React.HTM
4
4
  view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
5
5
  color?: import("..").Color;
6
6
  weight?: "regular" | "medium" | "bold" | "semibold";
7
- font?: "styrene" | "system" | "alfasans" | {
8
- font: "alfasans";
9
- systemCompat: boolean;
10
- };
7
+ font?: "styrene" | "system";
11
8
  defaultMargins?: boolean;
12
9
  className?: string;
13
10
  dataTestId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/title-mobile/component.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, type TitleProps } from '../title/component';\n\nimport styles from './index.module.css';\n\nexport const TitleMobile = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>(\n (props, ref) => <TitleBase {...props} styles={styles} ref={ref} platform='mobile' />,\n);\n"],"names":[],"mappings":";;;;AAMO,MAAM,WAAW,GAAG,UAAU,CACjC,CAAC,KAAK,EAAE,GAAG,KAAK,KAAC,CAAA,aAAA,CAAA,SAAS,EAAK,EAAA,GAAA,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,QAAQ,EAAA,CAAG;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/title-mobile/component.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, type TitleProps } from '../title/component';\n\nimport styles from './index.module.css';\n\nexport const TitleMobile = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>(\n (props, ref) => <TitleBase {...props} styles={styles} ref={ref} platform='mobile' />,\n);\n"],"names":[],"mappings":";;;;AAMO,MAAM,WAAW,GAAG,UAAU,CACjC,CAAC,KAAK,EAAE,GAAG,KAAK,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAA,GAAK,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,QAAQ,EAAA,CAAG;;"}
@@ -5,129 +5,112 @@
5
5
  --gap-40: 40px;
6
6
  }
7
7
  :root {
8
- --font-family-system:
9
- system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
10
- --font-family-styrene:
11
- 'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
12
- sans-serif;
8
+ --font-family-alfasans:
9
+ 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
10
+ Helvetica, sans-serif;
13
11
  }
14
- .typography__xlarge_k7ygb {
12
+ .typography__xlarge_ggxzg {
15
13
  font-size: 34px;
16
14
  line-height: 40px;
17
- font-weight: 600;
18
- font-family: var(--font-family-system);
15
+ font-weight: 500;
16
+ letter-spacing: -0.32px;
17
+ font-family: var(--font-family-alfasans);
19
18
  }
20
- .typography__xlarge_k7ygb.typography__font_k7ygb {
21
- font-weight: 500;
22
- font-feature-settings: 'ss01';
23
- font-family: var(--font-family-styrene);
19
+ .typography__xlarge_ggxzg.typography__font_ggxzg {
24
20
  }
25
- .typography__regular-xlarge_k7ygb {
21
+ .typography__regular-xlarge_ggxzg {
26
22
  font-size: 34px;
27
23
  line-height: 40px;
28
24
  font-weight: 400;
29
- font-family: var(--font-family-system);
25
+ letter-spacing: -1.36px;
26
+ font-family: var(--font-family-alfasans);
30
27
  }
31
- .typography__regular-xlarge_k7ygb.typography__system_k7ygb {
32
- font-feature-settings: 'ss01';
33
- font-family: var(--font-family-styrene);
28
+ .typography__regular-xlarge_ggxzg.typography__system_ggxzg {
34
29
  }
35
- .typography__large_k7ygb {
30
+ .typography__large_ggxzg {
36
31
  font-size: 30px;
37
32
  line-height: 36px;
38
- font-weight: 600;
39
- font-family: var(--font-family-system);
33
+ font-weight: 500;
34
+ letter-spacing: -0.25px;
35
+ font-family: var(--font-family-alfasans);
40
36
  }
41
- .typography__large_k7ygb.typography__font_k7ygb {
42
- font-weight: 500;
43
- font-feature-settings: 'ss01';
44
- font-family: var(--font-family-styrene);
37
+ .typography__large_ggxzg.typography__font_ggxzg {
45
38
  }
46
- .typography__regular-large_k7ygb {
39
+ .typography__regular-large_ggxzg {
47
40
  font-size: 30px;
48
41
  line-height: 36px;
49
42
  font-weight: 400;
50
- font-family: var(--font-family-system);
43
+ letter-spacing: -1.25px;
44
+ font-family: var(--font-family-alfasans);
51
45
  }
52
- .typography__regular-large_k7ygb.typography__system_k7ygb {
53
- font-feature-settings: 'ss01';
54
- font-family: var(--font-family-styrene);
46
+ .typography__regular-large_ggxzg.typography__system_ggxzg {
55
47
  }
56
- .typography__medium_k7ygb {
48
+ .typography__medium_ggxzg {
57
49
  font-size: 26px;
58
50
  line-height: 32px;
59
- font-weight: 600;
60
- font-family: var(--font-family-system);
51
+ font-weight: 500;
52
+ letter-spacing: -0.25px;
53
+ font-family: var(--font-family-alfasans);
61
54
  }
62
- .typography__medium_k7ygb.typography__font_k7ygb {
63
- font-weight: 500;
64
- font-feature-settings: 'ss01';
65
- font-family: var(--font-family-styrene);
55
+ .typography__medium_ggxzg.typography__font_ggxzg {
66
56
  }
67
- .typography__regular-medium_k7ygb {
57
+ .typography__regular-medium_ggxzg {
68
58
  font-size: 26px;
69
59
  line-height: 32px;
70
60
  font-weight: 400;
71
- font-family: var(--font-family-system);
61
+ letter-spacing: -1px;
62
+ font-family: var(--font-family-alfasans);
72
63
  }
73
- .typography__regular-medium_k7ygb.typography__system_k7ygb {
74
- font-feature-settings: 'ss01';
75
- font-family: var(--font-family-styrene);
64
+ .typography__regular-medium_ggxzg.typography__system_ggxzg {
76
65
  }
77
- .typography__small_k7ygb {
66
+ .typography__small_ggxzg {
78
67
  font-size: 20px;
79
68
  line-height: 28px;
80
- font-weight: 600;
81
- font-family: var(--font-family-system);
69
+ font-weight: 500;
70
+ letter-spacing: -0.15px;
71
+ font-family: var(--font-family-alfasans);
82
72
  }
83
- .typography__small_k7ygb.typography__font_k7ygb {
84
- font-weight: 500;
85
- font-feature-settings: 'ss01';
86
- font-family: var(--font-family-styrene);
73
+ .typography__small_ggxzg.typography__font_ggxzg {
87
74
  }
88
- .typography__regular-small_k7ygb {
75
+ .typography__regular-small_ggxzg {
89
76
  font-size: 20px;
90
77
  line-height: 28px;
91
78
  font-weight: 400;
92
- font-family: var(--font-family-system);
79
+ letter-spacing: -0.68px;
80
+ font-family: var(--font-family-alfasans);
93
81
  }
94
- .typography__regular-small_k7ygb.typography__system_k7ygb {
95
- font-feature-settings: 'ss01';
96
- font-family: var(--font-family-styrene);
82
+ .typography__regular-small_ggxzg.typography__system_ggxzg {
97
83
  }
98
- .typography__xsmall_k7ygb {
84
+ .typography__xsmall_ggxzg {
99
85
  font-size: 16px;
100
86
  line-height: 20px;
101
- font-weight: 600;
102
- font-family: var(--font-family-system);
87
+ font-weight: 500;
88
+ letter-spacing: 0.17px;
89
+ font-family: var(--font-family-alfasans);
103
90
  }
104
- .typography__xsmall_k7ygb.typography__font_k7ygb {
105
- font-weight: 500;
106
- font-feature-settings: 'ss01';
107
- font-family: var(--font-family-styrene);
91
+ .typography__xsmall_ggxzg.typography__font_ggxzg {
108
92
  }
109
- .typography__regular-xsmall_k7ygb {
93
+ .typography__regular-xsmall_ggxzg {
110
94
  font-size: 16px;
111
95
  line-height: 20px;
112
96
  font-weight: 400;
113
- font-family: var(--font-family-system);
97
+ letter-spacing: -0.24px;
98
+ font-family: var(--font-family-alfasans);
114
99
  }
115
- .typography__regular-xsmall_k7ygb.typography__system_k7ygb {
116
- font-feature-settings: 'ss01';
117
- font-family: var(--font-family-styrene);
100
+ .typography__regular-xsmall_ggxzg.typography__system_ggxzg {
118
101
  }
119
- .typography__component_k7ygb.typography__margins-xlarge_k7ygb {
102
+ .typography__component_ggxzg.typography__margins-xlarge_ggxzg {
120
103
  margin: var(--gap-0) var(--gap-0) var(--gap-24);
121
104
  }
122
- .typography__component_k7ygb.typography__margins-large_k7ygb {
105
+ .typography__component_ggxzg.typography__margins-large_ggxzg {
123
106
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
124
107
  }
125
- .typography__component_k7ygb.typography__margins-medium_k7ygb {
108
+ .typography__component_ggxzg.typography__margins-medium_ggxzg {
126
109
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
127
110
  }
128
- .typography__component_k7ygb.typography__margins-small_k7ygb {
111
+ .typography__component_ggxzg.typography__margins-small_ggxzg {
129
112
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
130
113
  }
131
- .typography__component_k7ygb .typography__margins-xsmall_k7ygb {
114
+ .typography__component_ggxzg .typography__margins-xsmall_ggxzg {
132
115
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
133
116
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"xlarge":"typography__xlarge_k7ygb","font":"typography__font_k7ygb","regular-xlarge":"typography__regular-xlarge_k7ygb","system":"typography__system_k7ygb","large":"typography__large_k7ygb","regular-large":"typography__regular-large_k7ygb","medium":"typography__medium_k7ygb","regular-medium":"typography__regular-medium_k7ygb","small":"typography__small_k7ygb","regular-small":"typography__regular-small_k7ygb","xsmall":"typography__xsmall_k7ygb","regular-xsmall":"typography__regular-xsmall_k7ygb","component":"typography__component_k7ygb","margins-xlarge":"typography__margins-xlarge_k7ygb","margins-large":"typography__margins-large_k7ygb","margins-medium":"typography__margins-medium_k7ygb","margins-small":"typography__margins-small_k7ygb","margins-xsmall":"typography__margins-xsmall_k7ygb"};
3
+ const styles = {"xlarge":"typography__xlarge_ggxzg","font":"typography__font_ggxzg","regular-xlarge":"typography__regular-xlarge_ggxzg","system":"typography__system_ggxzg","large":"typography__large_ggxzg","regular-large":"typography__regular-large_ggxzg","medium":"typography__medium_ggxzg","regular-medium":"typography__regular-medium_ggxzg","small":"typography__small_ggxzg","regular-small":"typography__regular-small_ggxzg","xsmall":"typography__xsmall_ggxzg","regular-xsmall":"typography__regular-xsmall_ggxzg","component":"typography__component_ggxzg","margins-xlarge":"typography__margins-xlarge_ggxzg","margins-large":"typography__margins-large_ggxzg","margins-medium":"typography__margins-medium_ggxzg","margins-small":"typography__margins-small_ggxzg","margins-xsmall":"typography__margins-xsmall_ggxzg"};
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-mobile/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-mobile_$(view);\n\n &.font {\n @subtract-mixin headline-mobile_$(view), headline-system-mobile_$(view);\n }\n }\n\n .regular-$(view) {\n @mixin promo-system-mobile_$(view);\n\n &.system {\n @subtract-mixin promo-mobile_$(view), promo-system-mobile_$(view);\n }\n }\n}\n\n.component {\n &.margins-xlarge {\n @mixin margin-large;\n }\n\n &.margins-large {\n @mixin margin-small;\n }\n\n &.margins-medium {\n @mixin margin-small;\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,QAAQ,CAAC,0BAA0B,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-mobile/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-mobile_$(view);\n\n &.font {\n @subtract-mixin headline-mobile_$(view), headline-system-mobile_$(view);\n }\n }\n\n .regular-$(view) {\n @mixin promo-system-mobile_$(view);\n\n &.system {\n @subtract-mixin promo-mobile_$(view), promo-system-mobile_$(view);\n }\n }\n}\n\n.component {\n &.margins-xlarge {\n @mixin margin-large;\n }\n\n &.margins-large {\n @mixin margin-small;\n }\n\n &.margins-medium {\n @mixin margin-small;\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,QAAQ,CAAC,0BAA0B,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;;"}
@@ -16,10 +16,7 @@ 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" | "alfasans" | {
20
- font: "alfasans";
21
- systemCompat: boolean;
22
- };
19
+ font?: "styrene" | "system";
23
20
  defaultMargins?: boolean;
24
21
  className?: string;
25
22
  dataTestId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/title-responsive/component.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { Title, type TitleProps } from '../title';\nimport { TitleMobile } from '../title-mobile';\n\nexport type TitleResponsiveProps = TitleProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n};\n\nexport const TitleResponsive = forwardRef<\n HTMLHeadingElement | HTMLDivElement,\n TitleResponsiveProps\n>(({ breakpoint, client, ...restProps }, ref) => {\n const isDesktop = useIsDesktop(breakpoint, client === 'desktop');\n\n const Component = isDesktop ? Title : TitleMobile;\n\n return <Component {...restProps} ref={ref} />;\n});\n"],"names":[],"mappings":";;;;;AAoBa,MAAA,eAAe,GAAG,UAAU,CAGvC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG,KAAI;IAC5C,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;IAEhE,MAAM,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,WAAW;IAEjD,OAAO,KAAA,CAAA,aAAA,CAAC,SAAS,EAAK,EAAA,GAAA,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI;AACjD,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/title-responsive/component.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { Title, type TitleProps } from '../title';\nimport { TitleMobile } from '../title-mobile';\n\nexport type TitleResponsiveProps = TitleProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n};\n\nexport const TitleResponsive = forwardRef<\n HTMLHeadingElement | HTMLDivElement,\n TitleResponsiveProps\n>(({ breakpoint, client, ...restProps }, ref) => {\n const isDesktop = useIsDesktop(breakpoint, client === 'desktop');\n\n const Component = isDesktop ? Title : TitleMobile;\n\n return <Component {...restProps} ref={ref} />;\n});\n"],"names":[],"mappings":";;;;;AAoBO,MAAM,eAAe,GAAG,UAAU,CAGvC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG,KAAI;IAC5C,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;IAEhE,MAAM,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,WAAW;IAEjD,OAAO,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAA,GAAK,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI;AACjD,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","sources":["../src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":"AAAa,MAAA,MAAM,GAAG;IAClB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;;;;;"}
1
+ {"version":3,"file":"colors.js","sources":["../src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":"AAAO,MAAM,MAAM,GAAG;IAClB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../src/component.ts"],"sourcesContent":["import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';\n\nimport { Text, type TextProps } from './text';\nimport { Title, type TitleProps } from './title';\nimport { TitleMobile, type TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, type TitleResponsiveProps } from './title-responsive';\nimport { type TextElementType } from './types';\n\nexport const Typography: {\n Title: FC<TitleProps>;\n Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;\n TitleResponsive: FC<TitleResponsiveProps>;\n TitleMobile: FC<TitleMobileProps>;\n} = {\n Title,\n Text,\n TitleResponsive,\n TitleMobile,\n};\n\nexport {\n Text as TypographyText,\n Title as TypographyTitle,\n TitleResponsive as TypographyTitleResponsive,\n TitleMobile as TypographyTitleMobile,\n};\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":[],"mappings":";;;;;AAQa,MAAA,UAAU,GAKnB;IACA,KAAK;IACL,IAAI;IACJ,eAAe;IACf,WAAW;;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../src/component.ts"],"sourcesContent":["import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';\n\nimport { Text, type TextProps } from './text';\nimport { Title, type TitleProps } from './title';\nimport { TitleMobile, type TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, type TitleResponsiveProps } from './title-responsive';\nimport { type TextElementType } from './types';\n\nexport const Typography: {\n Title: FC<TitleProps>;\n Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;\n TitleResponsive: FC<TitleResponsiveProps>;\n TitleMobile: FC<TitleMobileProps>;\n} = {\n Title,\n Text,\n TitleResponsive,\n TitleMobile,\n};\n\nexport {\n Text as TypographyText,\n Title as TypographyTitle,\n TitleResponsive as TypographyTitleResponsive,\n TitleMobile as TypographyTitleMobile,\n};\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":[],"mappings":";;;;;AAQO,MAAM,UAAU,GAKnB;IACA,KAAK;IACL,IAAI;IACJ,eAAe;IACf,WAAW;;;"}
@@ -2,6 +2,6 @@ export { Typography } from './component.js';
2
2
  export { typographyPresets } from './presets.js';
3
3
  export { Text, Text as TypographyText } from './text/component.js';
4
4
  export { Title as TitleDesktop, Title as TypographyTitle } from './title/index.js';
5
- export { TitleResponsive, TitleResponsive as TypographyTitleResponsive } from './title-responsive/component.js';
6
5
  export { TitleMobile, TitleMobile as TypographyTitleMobile } from './title-mobile/component.js';
6
+ export { TitleResponsive, TitleResponsive as TypographyTitleResponsive } from './title-responsive/component.js';
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"presets.js","sources":["../src/presets.ts"],"sourcesContent":["export const typographyPresets = {\n mobile: {\n list: {\n text: {\n primary: {\n tag: 'div',\n view: 'primary-medium',\n },\n secondary: {\n tag: 'div',\n color: 'secondary',\n view: 'primary-small',\n },\n },\n },\n },\n};\n"],"names":[],"mappings":"AAAa,MAAA,iBAAiB,GAAG;AAC7B,IAAA,MAAM,EAAE;AACJ,QAAA,IAAI,EAAE;AACF,YAAA,IAAI,EAAE;AACF,gBAAA,OAAO,EAAE;AACL,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;AACD,gBAAA,SAAS,EAAE;AACP,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,KAAK,EAAE,WAAW;AAClB,oBAAA,IAAI,EAAE,eAAe;AACxB,iBAAA;AACJ,aAAA;AACJ,SAAA;AACJ,KAAA;;;;;"}
1
+ {"version":3,"file":"presets.js","sources":["../src/presets.ts"],"sourcesContent":["export const typographyPresets = {\n mobile: {\n list: {\n text: {\n primary: {\n tag: 'div',\n view: 'primary-medium',\n },\n secondary: {\n tag: 'div',\n color: 'secondary',\n view: 'primary-small',\n },\n },\n },\n },\n};\n"],"names":[],"mappings":"AAAO,MAAM,iBAAiB,GAAG;AAC7B,IAAA,MAAM,EAAE;AACJ,QAAA,IAAI,EAAE;AACF,YAAA,IAAI,EAAE;AACF,gBAAA,OAAO,EAAE;AACL,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;AACD,gBAAA,SAAS,EAAE;AACP,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,KAAK,EAAE,WAAW;AAClB,oBAAA,IAAI,EAAE,eAAe;AACxB,iBAAA;AACJ,aAAA;AACJ,SAAA;AACJ,KAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, 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';\nimport { type TextElementType } from '../types';\n\nimport colors from '../colors.module.css';\nimport styles from './index.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLSpanElement>;\n\ntype TextBaseProps = {\n /**\n * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)\n */\n view?:\n | 'primary-large'\n | 'primary-medium'\n | 'primary-small'\n | 'secondary-large'\n | 'secondary-medium'\n | 'secondary-small'\n | 'component-primary'\n | 'component-secondary'\n | 'caps'\n | 'tagline';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold';\n\n /**\n * Делает цифры моноширинными\n */\n monospaceNumbers?: boolean;\n\n /**\n * HTML тег\n */\n tag?: 'span' | 'div';\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 * Добавляет отступы к тэгу 'p'\n */\n defaultMargins?: never;\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 * Шрифт текста\n *\n * @deprecated\n */\n font?: 'alfasans' | undefined | null;\n};\n\ntype TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {\n tag?: 'p';\n defaultMargins?: boolean;\n};\n\nexport type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);\n\nexport const Text = forwardRef<TextElementType, TextProps>(\n (\n {\n view = 'primary-medium',\n tag: Component = 'span',\n weight,\n monospaceNumbers = false,\n defaultMargins = true,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n showSkeleton,\n skeletonProps,\n font,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(styles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n {\n [styles.paragraph]: Component === 'p' && !defaultMargins,\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n [styles.monospace]: monospaceNumbers,\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n },\n !showSkeleton && className,\n color && colors[color],\n styles[view],\n weight && styles[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n {showSkeleton && (\n <div className={styles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;MAoGa,IAAI,GAAG,UAAU,CAC1B,CACI,EACI,IAAI,GAAG,gBAAgB,EACvB,GAAG,EAAE,SAAS,GAAG,MAAM,EACvB,MAAM,EACN,gBAAgB,GAAG,KAAK,EACxB,cAAc,GAAG,IAAI,EACrB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAC5E,MAAM,IAAI,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ;IAC5C,MAAM,SAAS,GAAgC;AAC3C,UAAE,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC;UACvC,EAAE;AAER,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAA,GAAK,SAAS,EAAA;AACf,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACN,SAAS,EAAE,EAAE,CACT;gBACI,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,KAAK,GAAG,IAAI,CAAC,cAAc;gBACxD,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;AAClE,gBAAA,CAAC,MAAM,CAAC,SAAS,GAAG,gBAAgB;gBACpC,CAAC,MAAM,CAAC,CAAW,QAAA,EAAA,QAAQ,EAAE,CAAC,GAAG,QAAQ;AACzC,gBAAA,CAAC,MAAM,CAAC,WAAW,GAAG,YAAY;AACrC,aAAA,EACD,CAAC,YAAY,IAAI,SAAS,EAC1B,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB,MAAM,CAAC,IAAI,CAAC,EACZ,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAC3B,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,KAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACT,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,EAAA,cAAc,CAAC;YACZ,gBAAgB,EAAE,EAAE,CAAC;gBACjB,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;aACrE,CAAC;YACF,UAAU;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, 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';\nimport { type TextElementType } from '../types';\n\nimport colors from '../colors.module.css';\nimport styles from './index.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLSpanElement>;\n\ntype TextBaseProps = {\n /**\n * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)\n */\n view?:\n | 'primary-large'\n | 'primary-medium'\n | 'primary-small'\n | 'secondary-large'\n | 'secondary-medium'\n | 'secondary-small'\n | 'component-primary'\n | 'component-secondary'\n | 'caps'\n | 'tagline';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold';\n\n /**\n * Делает цифры моноширинными\n */\n monospaceNumbers?: boolean;\n\n /**\n * HTML тег\n */\n tag?: 'span' | 'div';\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 * Добавляет отступы к тэгу 'p'\n */\n defaultMargins?: never;\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 * Шрифт текста\n *\n * @deprecated\n */\n font?: 'alfasans' | undefined | null;\n};\n\ntype TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {\n tag?: 'p';\n defaultMargins?: boolean;\n};\n\nexport type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);\n\nexport const Text = forwardRef<TextElementType, TextProps>(\n (\n {\n view = 'primary-medium',\n tag: Component = 'span',\n weight,\n monospaceNumbers = false,\n defaultMargins = true,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n showSkeleton,\n skeletonProps,\n font,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(styles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n {\n [styles.paragraph]: Component === 'p' && !defaultMargins,\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n [styles.monospace]: monospaceNumbers,\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n },\n !showSkeleton && className,\n color && colors[color],\n styles[view],\n weight && styles[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n {showSkeleton && (\n <div className={styles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;MAoGa,IAAI,GAAG,UAAU,CAC1B,CACI,EACI,IAAI,GAAG,gBAAgB,EACvB,GAAG,EAAE,SAAS,GAAG,MAAM,EACvB,MAAM,EACN,gBAAgB,GAAG,KAAK,EACxB,cAAc,GAAG,IAAI,EACrB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAC5E,MAAM,IAAI,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ;IAC5C,MAAM,SAAS,GAAgC;AAC3C,UAAE,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC;UACvC,EAAE;AAER,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAA,GAAK,SAAS,EAAA;AACf,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACN,SAAS,EAAE,EAAE,CACT;gBACI,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,KAAK,GAAG,IAAI,CAAC,cAAc;gBACxD,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;AAClE,gBAAA,CAAC,MAAM,CAAC,SAAS,GAAG,gBAAgB;gBACpC,CAAC,MAAM,CAAC,CAAA,QAAA,EAAW,QAAQ,EAAE,CAAC,GAAG,QAAQ;AACzC,gBAAA,CAAC,MAAM,CAAC,WAAW,GAAG,YAAY;AACrC,aAAA,EACD,CAAC,YAAY,IAAI,SAAS,EAC1B,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB,MAAM,CAAC,IAAI,CAAC,EACZ,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAC3B,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,KAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACT,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAA,EAC1B,cAAc,CAAC;YACZ,gBAAgB,EAAE,EAAE,CAAC;gBACjB,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;aACrE,CAAC;YACF,UAAU;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;"}
@@ -29,15 +29,18 @@
29
29
  font-size: 16px;
30
30
  line-height: 20px;
31
31
  font-weight: 400;
32
- font-family: var(--font-family-system);
32
+ letter-spacing: -0.24px;
33
+ font-family: var(--font-family-alfasans);
33
34
  }
34
35
 
35
36
  .component.bold {
36
37
  font-weight: 700;
38
+ letter-spacing: 0.43px;
37
39
  }
38
40
 
39
41
  .component.medium {
40
42
  font-weight: 500;
43
+ letter-spacing: -0.05px;
41
44
  }
42
45
 
43
46
  .caps {
@@ -46,7 +49,7 @@
46
49
  font-weight: 400;
47
50
  letter-spacing: 1.25px;
48
51
  text-transform: uppercase;
49
- font-family: var(--font-family-system);
52
+ font-family: var(--font-family-alfasans);
50
53
  }
51
54
 
52
55
  .caps.bold {
@@ -63,7 +66,7 @@
63
66
  font-weight: 400;
64
67
  letter-spacing: 1.25px;
65
68
  text-transform: uppercase;
66
- font-family: var(--font-family-system);
69
+ font-family: var(--font-family-alfasans);
67
70
  }
68
71
 
69
72
  .tagline.bold {
@@ -78,120 +81,143 @@
78
81
  font-size: 18px;
79
82
  line-height: 24px;
80
83
  font-weight: 400;
81
- font-family: var(--font-family-system);
84
+ letter-spacing: -0.36px;
85
+ font-family: var(--font-family-alfasans);
82
86
  }
83
87
 
84
88
  .primary-large.bold {
85
89
  font-weight: 700;
90
+ letter-spacing: 0.38px;
86
91
  }
87
92
 
88
93
  .primary-large.medium {
89
94
  font-weight: 500;
95
+ letter-spacing: -0.17px;
90
96
  }
91
97
 
92
98
  .primary-medium {
93
99
  font-size: 16px;
94
100
  line-height: 24px;
95
101
  font-weight: 400;
96
- font-family: var(--font-family-system);
102
+ letter-spacing: -0.24px;
103
+ font-family: var(--font-family-alfasans);
97
104
  }
98
105
 
99
106
  .primary-medium.bold {
100
107
  font-weight: 700;
108
+ letter-spacing: 0.43px;
101
109
  }
102
110
 
103
111
  .primary-medium.medium {
104
112
  font-weight: 500;
113
+ letter-spacing: -0.05px;
105
114
  }
106
115
 
107
116
  .primary-small {
108
117
  font-size: 14px;
109
118
  line-height: 20px;
110
119
  font-weight: 400;
111
- font-family: var(--font-family-system);
120
+ letter-spacing: -0.08px;
121
+ font-family: var(--font-family-alfasans);
112
122
  }
113
123
 
114
124
  .primary-small.bold {
115
125
  font-weight: 700;
126
+ letter-spacing: 0.47px;
116
127
  }
117
128
 
118
129
  .primary-small.medium {
119
130
  font-weight: 500;
131
+ letter-spacing: 0.07px;
120
132
  }
121
133
 
122
134
  .component-primary {
123
135
  font-size: 16px;
124
136
  line-height: 20px;
125
137
  font-weight: 400;
126
- font-family: var(--font-family-system);
138
+ letter-spacing: -0.24px;
139
+ font-family: var(--font-family-alfasans);
127
140
  }
128
141
 
129
142
  .component-primary.bold {
130
143
  font-weight: 700;
144
+ letter-spacing: 0.43px;
131
145
  }
132
146
 
133
147
  .component-primary.medium {
134
148
  font-weight: 500;
149
+ letter-spacing: -0.05px;
135
150
  }
136
151
 
137
152
  .secondary-large {
138
153
  font-size: 13px;
139
154
  line-height: 16px;
140
155
  font-weight: 400;
141
- font-family: var(--font-family-system);
156
+ font-family: var(--font-family-alfasans);
142
157
  }
143
158
 
144
159
  .secondary-large.bold {
145
160
  font-weight: 700;
161
+ letter-spacing: 0.54px;
146
162
  }
147
163
 
148
164
  .secondary-large.medium {
149
165
  font-weight: 500;
166
+ letter-spacing: 0.13px;
150
167
  }
151
168
 
152
169
  .secondary-medium {
153
170
  font-size: 12px;
154
171
  line-height: 16px;
155
172
  font-weight: 400;
156
- font-family: var(--font-family-system);
173
+ letter-spacing: 0.06px;
174
+ font-family: var(--font-family-alfasans);
157
175
  }
158
176
 
159
177
  .secondary-medium.bold {
160
178
  font-weight: 700;
179
+ letter-spacing: 0.57px;
161
180
  }
162
181
 
163
182
  .secondary-medium.medium {
164
183
  font-weight: 500;
184
+ letter-spacing: 0.19px;
165
185
  }
166
186
 
167
187
  .secondary-small {
168
188
  font-size: 11px;
169
189
  line-height: 16px;
170
190
  font-weight: 400;
171
- font-family: var(--font-family-system);
191
+ letter-spacing: 0.15px;
192
+ font-family: var(--font-family-alfasans);
172
193
  }
173
194
 
174
195
  .secondary-small.bold {
175
196
  font-weight: 700;
197
+ letter-spacing: 0.54px;
176
198
  }
177
199
 
178
200
  .secondary-small.medium {
179
201
  font-weight: 500;
202
+ letter-spacing: 0.24px;
180
203
  }
181
204
 
182
205
  .component-secondary {
183
206
  font-size: 14px;
184
207
  line-height: 18px;
185
208
  font-weight: 400;
186
- font-family: var(--font-family-system);
209
+ letter-spacing: -0.08px;
210
+ font-family: var(--font-family-alfasans);
187
211
  }
188
212
 
189
213
  .component-secondary.bold {
190
214
  font-weight: 700;
215
+ letter-spacing: 0.47px;
191
216
  }
192
217
 
193
218
  .component-secondary.medium {
194
219
  font-weight: 500;
220
+ letter-spacing: 0.07px;
195
221
  }
196
222
 
197
223
  .rowLimit1 {
@@ -22,10 +22,7 @@ export type TitleProps = Omit<NativeProps, 'color'> & {
22
22
  /**
23
23
  * Шрифт текста
24
24
  */
25
- font?: 'styrene' | 'system' | 'alfasans' | {
26
- font: 'alfasans';
27
- systemCompat: boolean;
28
- };
25
+ font?: 'styrene' | 'system';
29
26
  /**
30
27
  * Добавляет отступы
31
28
  */
@@ -86,10 +83,7 @@ export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps
86
83
  /**
87
84
  * Шрифт текста
88
85
  */
89
- font?: "styrene" | "system" | "alfasans" | {
90
- font: "alfasans";
91
- systemCompat: boolean;
92
- };
86
+ font?: "styrene" | "system";
93
87
  /**
94
88
  * Добавляет отступы
95
89
  */
@@ -1,13 +1,11 @@
1
1
  import React, { forwardRef, Fragment } from 'react';
2
2
  import mergeRefs from 'react-merge-refs';
3
3
  import cn from 'classnames';
4
- import { isObject } from '@alfalab/core-components-shared/moderncssm';
5
4
  import { useSkeleton } from '@alfalab/core-components-skeleton/moderncssm';
6
- import { getDefaultWeight } from './utils.js';
7
5
  import colors from '../colors.module.css';
8
6
  import commonStyles from './common.module.css';
9
7
 
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) => {
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) => {
11
9
  const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);
12
10
  const Root = showSkeleton ? 'div' : Fragment;
13
11
  const rootProps = showSkeleton
@@ -17,7 +15,6 @@ const TitleBase = forwardRef(({ tag: Component = 'div', view = 'medium', font =
17
15
  React.createElement(Component, { className: cn(commonStyles.component, styles.component, !showSkeleton && className, styles[`${weight === 'regular' ? 'regular-' : ''}${view}`], defaultMargins && styles[`margins-${view}`], color && colors[color], {
18
16
  [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,
19
17
  [commonStyles.transparent]: showSkeleton,
20
- [styles.font]: (isObject(font) && !font.systemCompat) || !(font === 'system'),
21
18
  }), "data-test-id": dataTestId, ref: mergeRefs([ref, textRef]), ...restProps }, children),
22
19
  showSkeleton && (React.createElement("div", { className: commonStyles.skeleton }, renderSkeleton({
23
20
  wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, 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 const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(commonStyles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n !showSkeleton && 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 {showSkeleton && (\n <div className={commonStyles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n })}\n </div>\n )}\n </Root>\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;IAC5E,MAAM,IAAI,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ;IAC5C,MAAM,SAAS,GAAgC;AAC3C,UAAE,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC;UAC7C,EAAE;AAER,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAA,GAAK,SAAS,EAAA;QACf,KAAC,CAAA,aAAA,CAAA,SAAS,EACN,EAAA,SAAS,EAAE,EAAE,CACT,YAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,CAAC,YAAY,IAAI,SAAS,EAC1B,MAAM,CAAC,CAAA,EAAG,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,GAAG,IAAI,CAAA,CAAE,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,CAAA,QAAA,EAAW,IAAI,CAAA,CAAE,CAAC,EAC3C,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB;gBACI,CAAC,YAAY,CAAC,CAAW,QAAA,EAAA,QAAQ,EAAE,CAAC,GAAG,QAAQ;AAC/C,gBAAA,CAAC,YAAY,CAAC,WAAW,GAAG,YAAY;gBACxC,CAAC,MAAM,CAAC,IAAI,GACR,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AACrE,aAAA,CACJ,kBACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,KAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACT,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,YAAY,CAAC,QAAQ,EAChC,EAAA,cAAc,CAAC;YACZ,gBAAgB,EAAE,EAAE,CAAC,cAAc,IAAI,MAAM,CAAC,CAAW,QAAA,EAAA,IAAI,CAAE,CAAA,CAAC,CAAC;YACjE,UAAU;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, 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 const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(commonStyles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n !showSkeleton && 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 {showSkeleton && (\n <div className={commonStyles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;AAyFO,MAAM,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;IAC5E,MAAM,IAAI,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ;IAC5C,MAAM,SAAS,GAAgC;AAC3C,UAAE,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC;UAC7C,EAAE;AAER,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAA,GAAK,SAAS,EAAA;QACf,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACN,SAAS,EAAE,EAAE,CACT,YAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,CAAC,YAAY,IAAI,SAAS,EAC1B,MAAM,CAAC,CAAA,EAAG,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,GAAG,IAAI,CAAA,CAAE,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,CAAA,QAAA,EAAW,IAAI,CAAA,CAAE,CAAC,EAC3C,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB;gBACI,CAAC,YAAY,CAAC,CAAA,QAAA,EAAW,QAAQ,EAAE,CAAC,GAAG,QAAQ;AAC/C,gBAAA,CAAC,YAAY,CAAC,WAAW,GAAG,YAAY;AAC3C,aAAA,CACJ,kBACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,KAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACT,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,YAAY,CAAC,QAAQ,EAAA,EAChC,cAAc,CAAC;YACZ,gBAAgB,EAAE,EAAE,CAAC,cAAc,IAAI,MAAM,CAAC,CAAA,QAAA,EAAW,IAAI,CAAA,CAAE,CAAC,CAAC;YACjE,UAAU;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;"}
@@ -5,10 +5,7 @@ declare const Title: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<H
5
5
  view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
6
6
  color?: import("..").Color;
7
7
  weight?: "regular" | "medium" | "bold" | "semibold";
8
- font?: "styrene" | "system" | "alfasans" | {
9
- font: "alfasans";
10
- systemCompat: boolean;
11
- };
8
+ font?: "styrene" | "system";
12
9
  defaultMargins?: boolean;
13
10
  className?: string;
14
11
  dataTestId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/title/index.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, type TitleProps } from './component';\n\nimport styles from './index.module.css';\n\nconst Title = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>((props, ref) => (\n <TitleBase {...props} styles={styles} ref={ref} platform='desktop' />\n));\n\nexport { Title };\nexport type { TitleProps };\n"],"names":[],"mappings":";;;;AAMA,MAAM,KAAK,GAAG,UAAU,CAAkD,CAAC,KAAK,EAAE,GAAG,MACjF,oBAAC,SAAS,EAAA,EAAA,GAAK,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,SAAS,EAAG,CAAA,CACxE;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/title/index.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, type TitleProps } from './component';\n\nimport styles from './index.module.css';\n\nconst Title = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>((props, ref) => (\n <TitleBase {...props} styles={styles} ref={ref} platform='desktop' />\n));\n\nexport { Title };\nexport type { TitleProps };\n"],"names":[],"mappings":";;;;AAMA,MAAM,KAAK,GAAG,UAAU,CAAkD,CAAC,KAAK,EAAE,GAAG,MACjF,oBAAC,SAAS,EAAA,EAAA,GAAK,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,SAAS,EAAA,CAAG,CACxE;;"}