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

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 (108) hide show
  1. package/colors.css +20 -20
  2. package/colors.module.css.js +1 -1
  3. package/cssm/text/component.js +18 -16
  4. package/cssm/text/component.js.map +1 -1
  5. package/cssm/text/index.module.css +21 -41
  6. package/cssm/title/common.module.css +8 -1
  7. package/cssm/title/component.d.ts +8 -2
  8. package/cssm/title/component.js +19 -14
  9. package/cssm/title/component.js.map +1 -1
  10. package/cssm/title/index.d.ts +4 -1
  11. package/cssm/title/index.module.css +74 -23
  12. package/cssm/title/utils.d.ts +1 -0
  13. package/cssm/title/utils.js +16 -0
  14. package/cssm/title/utils.js.map +1 -0
  15. package/cssm/title-mobile/component.d.ts +4 -1
  16. package/cssm/title-mobile/index.module.css +45 -28
  17. package/cssm/title-responsive/component.d.ts +4 -1
  18. package/esm/colors.css +20 -20
  19. package/esm/colors.module.css.js +1 -1
  20. package/esm/text/component.js +19 -17
  21. package/esm/text/component.js.map +1 -1
  22. package/esm/text/index.css +61 -81
  23. package/esm/text/index.module.css.js +1 -1
  24. package/esm/text/index.module.css.js.map +1 -1
  25. package/esm/title/common.css +13 -6
  26. package/esm/title/common.module.css.js +1 -1
  27. package/esm/title/common.module.css.js.map +1 -1
  28. package/esm/title/component.d.ts +8 -2
  29. package/esm/title/component.js +19 -14
  30. package/esm/title/component.js.map +1 -1
  31. package/esm/title/index.css +89 -38
  32. package/esm/title/index.d.ts +4 -1
  33. package/esm/title/index.module.css.js +1 -1
  34. package/esm/title/index.module.css.js.map +1 -1
  35. package/esm/title/utils.d.ts +1 -0
  36. package/esm/title/utils.js +12 -0
  37. package/esm/title/utils.js.map +1 -0
  38. package/esm/title-mobile/component.d.ts +4 -1
  39. package/esm/title-mobile/index.css +70 -53
  40. package/esm/title-mobile/index.module.css.js +1 -1
  41. package/esm/title-responsive/component.d.ts +4 -1
  42. package/modern/colors.css +20 -20
  43. package/modern/colors.module.css.js +1 -1
  44. package/modern/text/component.js +19 -17
  45. package/modern/text/component.js.map +1 -1
  46. package/modern/text/index.css +61 -81
  47. package/modern/text/index.module.css.js +1 -1
  48. package/modern/text/index.module.css.js.map +1 -1
  49. package/modern/title/common.css +13 -6
  50. package/modern/title/common.module.css.js +1 -1
  51. package/modern/title/common.module.css.js.map +1 -1
  52. package/modern/title/component.d.ts +8 -2
  53. package/modern/title/component.js +18 -13
  54. package/modern/title/component.js.map +1 -1
  55. package/modern/title/index.css +89 -38
  56. package/modern/title/index.d.ts +4 -1
  57. package/modern/title/index.module.css.js +1 -1
  58. package/modern/title/index.module.css.js.map +1 -1
  59. package/modern/title/utils.d.ts +1 -0
  60. package/modern/title/utils.js +12 -0
  61. package/modern/title/utils.js.map +1 -0
  62. package/modern/title-mobile/component.d.ts +4 -1
  63. package/modern/title-mobile/index.css +70 -53
  64. package/modern/title-mobile/index.module.css.js +1 -1
  65. package/modern/title-responsive/component.d.ts +4 -1
  66. package/moderncssm/text/component.js +19 -17
  67. package/moderncssm/text/component.js.map +1 -1
  68. package/moderncssm/text/index.module.css +21 -38
  69. package/moderncssm/title/common.module.css +10 -1
  70. package/moderncssm/title/component.d.ts +8 -2
  71. package/moderncssm/title/component.js +18 -13
  72. package/moderncssm/title/component.js.map +1 -1
  73. package/moderncssm/title/index.d.ts +4 -1
  74. package/moderncssm/title/index.module.css +79 -20
  75. package/moderncssm/title/utils.d.ts +1 -0
  76. package/moderncssm/title/utils.js +12 -0
  77. package/moderncssm/title/utils.js.map +1 -0
  78. package/moderncssm/title-mobile/component.d.ts +4 -1
  79. package/moderncssm/title-mobile/index.module.css +40 -25
  80. package/moderncssm/title-responsive/component.d.ts +4 -1
  81. package/package.json +6 -6
  82. package/src/common.module.css +10 -1
  83. package/src/text/component.tsx +36 -31
  84. package/src/title/component.tsx +41 -31
  85. package/src/title/index.module.css +8 -0
  86. package/src/title/utils.ts +14 -0
  87. package/text/component.js +18 -16
  88. package/text/component.js.map +1 -1
  89. package/text/index.css +61 -81
  90. package/text/index.module.css.js +1 -1
  91. package/text/index.module.css.js.map +1 -1
  92. package/title/common.css +13 -6
  93. package/title/common.module.css.js +1 -1
  94. package/title/common.module.css.js.map +1 -1
  95. package/title/component.d.ts +8 -2
  96. package/title/component.js +18 -13
  97. package/title/component.js.map +1 -1
  98. package/title/index.css +89 -38
  99. package/title/index.d.ts +4 -1
  100. package/title/index.module.css.js +1 -1
  101. package/title/index.module.css.js.map +1 -1
  102. package/title/utils.d.ts +1 -0
  103. package/title/utils.js +16 -0
  104. package/title/utils.js.map +1 -0
  105. package/title-mobile/component.d.ts +4 -1
  106. package/title-mobile/index.css +70 -53
  107. package/title-mobile/index.module.css.js +1 -1
  108. package/title-responsive/component.d.ts +4 -1
@@ -6,80 +6,131 @@
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
15
  .xlarge {
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
  }
21
+ .xlarge.font {
22
+ line-height: 64px;
23
+ font-weight: 500;
24
+ font-feature-settings: 'ss01';
25
+ font-family: var(--font-family-styrene);
26
+ }
20
27
  .regular-xlarge {
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
  }
33
+ .regular-xlarge.font {
34
+ line-height: 64px;
35
+ font-feature-settings: 'ss01';
36
+ font-family: var(--font-family-styrene);
37
+ }
27
38
  .large {
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
  }
44
+ .large.font {
45
+ font-weight: 500;
46
+ font-feature-settings: 'ss01';
47
+ font-family: var(--font-family-styrene);
48
+ }
34
49
  .regular-large {
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
  }
55
+ .regular-large.font {
56
+ font-feature-settings: 'ss01';
57
+ font-family: var(--font-family-styrene);
58
+ }
41
59
  .medium {
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
  }
65
+ .medium.font {
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
+ }
48
72
  .regular-medium {
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
  }
78
+ .regular-medium.font {
79
+ font-size: 32px;
80
+ line-height: 40px;
81
+ font-feature-settings: 'ss01';
82
+ font-family: var(--font-family-styrene);
83
+ }
55
84
  .small {
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
  }
90
+ .small.font {
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
+ }
62
97
  .regular-small {
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
  }
103
+ .regular-small.font {
104
+ font-size: 24px;
105
+ line-height: 32px;
106
+ font-feature-settings: 'ss01';
107
+ font-family: var(--font-family-styrene);
108
+ }
69
109
  .xsmall {
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
  }
115
+ .xsmall.font {
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
+ }
76
122
  .regular-xsmall {
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
  }
128
+ .regular-xsmall.font {
129
+ font-size: 20px;
130
+ line-height: 24px;
131
+ font-feature-settings: 'ss01';
132
+ font-family: var(--font-family-styrene);
133
+ }
83
134
  .component.margins-xlarge {
84
135
  margin: var(--gap-0) var(--gap-0) var(--gap-24);
85
136
  }
@@ -0,0 +1 @@
1
+ export declare function getDefaultWeight(font: 'styrene' | 'system' | 'alfasans', platform: 'mobile' | 'desktop'): "medium" | "bold" | "semibold";
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ function getDefaultWeight(font, platform) {
6
+ if (font === 'styrene' || font === 'alfasans') {
7
+ return 'medium';
8
+ }
9
+ if (platform === 'desktop') {
10
+ return 'bold';
11
+ }
12
+ return 'semibold';
13
+ }
14
+
15
+ exports.getDefaultWeight = getDefaultWeight;
16
+ //# 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;
@@ -5,99 +5,116 @@
5
5
  --gap-40: 40px;
6
6
  }
7
7
  :root {
8
- --font-family-alfasans:
9
- 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
10
- Helvetica, sans-serif;
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;
11
13
  }
12
14
  .xlarge {
13
15
  font-size: 34px;
14
16
  line-height: 40px;
15
- font-weight: 500;
16
- letter-spacing: -0.32px;
17
- font-family: var(--font-family-alfasans);
17
+ font-weight: 600;
18
+ font-family: var(--font-family-system);
18
19
  }
19
20
  .xlarge.font {
21
+ font-weight: 500;
22
+ font-feature-settings: 'ss01';
23
+ font-family: var(--font-family-styrene);
20
24
  }
21
25
  .regular-xlarge {
22
26
  font-size: 34px;
23
27
  line-height: 40px;
24
28
  font-weight: 400;
25
- letter-spacing: -1.36px;
26
- font-family: var(--font-family-alfasans);
29
+ font-family: var(--font-family-system);
27
30
  }
28
31
  .regular-xlarge.system {
32
+ font-feature-settings: 'ss01';
33
+ font-family: var(--font-family-styrene);
29
34
  }
30
35
  .large {
31
36
  font-size: 30px;
32
37
  line-height: 36px;
33
- font-weight: 500;
34
- letter-spacing: -0.25px;
35
- font-family: var(--font-family-alfasans);
38
+ font-weight: 600;
39
+ font-family: var(--font-family-system);
36
40
  }
37
41
  .large.font {
42
+ font-weight: 500;
43
+ font-feature-settings: 'ss01';
44
+ font-family: var(--font-family-styrene);
38
45
  }
39
46
  .regular-large {
40
47
  font-size: 30px;
41
48
  line-height: 36px;
42
49
  font-weight: 400;
43
- letter-spacing: -1.25px;
44
- font-family: var(--font-family-alfasans);
50
+ font-family: var(--font-family-system);
45
51
  }
46
52
  .regular-large.system {
53
+ font-feature-settings: 'ss01';
54
+ font-family: var(--font-family-styrene);
47
55
  }
48
56
  .medium {
49
57
  font-size: 26px;
50
58
  line-height: 32px;
51
- font-weight: 500;
52
- letter-spacing: -0.25px;
53
- font-family: var(--font-family-alfasans);
59
+ font-weight: 600;
60
+ font-family: var(--font-family-system);
54
61
  }
55
62
  .medium.font {
63
+ font-weight: 500;
64
+ font-feature-settings: 'ss01';
65
+ font-family: var(--font-family-styrene);
56
66
  }
57
67
  .regular-medium {
58
68
  font-size: 26px;
59
69
  line-height: 32px;
60
70
  font-weight: 400;
61
- letter-spacing: -1px;
62
- font-family: var(--font-family-alfasans);
71
+ font-family: var(--font-family-system);
63
72
  }
64
73
  .regular-medium.system {
74
+ font-feature-settings: 'ss01';
75
+ font-family: var(--font-family-styrene);
65
76
  }
66
77
  .small {
67
78
  font-size: 20px;
68
79
  line-height: 28px;
69
- font-weight: 500;
70
- letter-spacing: -0.15px;
71
- font-family: var(--font-family-alfasans);
80
+ font-weight: 600;
81
+ font-family: var(--font-family-system);
72
82
  }
73
83
  .small.font {
84
+ font-weight: 500;
85
+ font-feature-settings: 'ss01';
86
+ font-family: var(--font-family-styrene);
74
87
  }
75
88
  .regular-small {
76
89
  font-size: 20px;
77
90
  line-height: 28px;
78
91
  font-weight: 400;
79
- letter-spacing: -0.68px;
80
- font-family: var(--font-family-alfasans);
92
+ font-family: var(--font-family-system);
81
93
  }
82
94
  .regular-small.system {
95
+ font-feature-settings: 'ss01';
96
+ font-family: var(--font-family-styrene);
83
97
  }
84
98
  .xsmall {
85
99
  font-size: 16px;
86
100
  line-height: 20px;
87
- font-weight: 500;
88
- letter-spacing: 0.17px;
89
- font-family: var(--font-family-alfasans);
101
+ font-weight: 600;
102
+ font-family: var(--font-family-system);
90
103
  }
91
104
  .xsmall.font {
105
+ font-weight: 500;
106
+ font-feature-settings: 'ss01';
107
+ font-family: var(--font-family-styrene);
92
108
  }
93
109
  .regular-xsmall {
94
110
  font-size: 16px;
95
111
  line-height: 20px;
96
112
  font-weight: 400;
97
- letter-spacing: -0.24px;
98
- font-family: var(--font-family-alfasans);
113
+ font-family: var(--font-family-system);
99
114
  }
100
115
  .regular-xsmall.system {
116
+ font-feature-settings: 'ss01';
117
+ font-family: var(--font-family-styrene);
101
118
  }
102
119
  .component.margins-xlarge {
103
120
  margin: var(--gap-0) var(--gap-0) var(--gap-24);
@@ -16,7 +16,10 @@ export declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React
16
16
  view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
17
17
  color?: import("..").Color;
18
18
  weight?: "regular" | "medium" | "bold" | "semibold";
19
- font?: "styrene" | "system";
19
+ font?: "styrene" | "system" | "alfasans" | {
20
+ font: "alfasans";
21
+ systemCompat: boolean;
22
+ };
20
23
  defaultMargins?: boolean;
21
24
  className?: string;
22
25
  dataTestId?: string;
package/esm/colors.css CHANGED
@@ -20,63 +20,63 @@
20
20
  --color-static-text-tertiary-dark: rgba(5, 8, 29, 0.38);
21
21
  --color-static-text-tertiary-light: rgba(233, 233, 250, 0.37);
22
22
  }
23
- .typography__tertiary_1cimi {
23
+ .typography__tertiary_8qhut {
24
24
  color: var(--color-light-text-tertiary);
25
25
  }
26
- .typography__disabled_1cimi {
26
+ .typography__disabled_8qhut {
27
27
  color: var(--color-light-text-quaternary);
28
28
  }
29
- .typography__accent_1cimi {
29
+ .typography__accent_8qhut {
30
30
  color: var(--color-light-accent-primary);
31
31
  }
32
- .typography__primary_1cimi {
32
+ .typography__primary_8qhut {
33
33
  color: var(--color-light-text-primary);
34
34
  }
35
- .typography__attention_1cimi {
35
+ .typography__attention_8qhut {
36
36
  color: var(--color-light-text-attention);
37
37
  }
38
- .typography__positive_1cimi {
38
+ .typography__positive_8qhut {
39
39
  color: var(--color-light-text-positive);
40
40
  }
41
- .typography__secondary_1cimi {
41
+ .typography__secondary_8qhut {
42
42
  color: var(--color-light-text-secondary);
43
43
  }
44
- .typography__tertiary-inverted_1cimi {
44
+ .typography__tertiary-inverted_8qhut {
45
45
  color: var(--color-light-text-tertiary-inverted);
46
46
  }
47
- .typography__primary-inverted_1cimi {
47
+ .typography__primary-inverted_8qhut {
48
48
  color: var(--color-light-text-primary-inverted);
49
49
  }
50
- .typography__secondary-inverted_1cimi {
50
+ .typography__secondary-inverted_8qhut {
51
51
  color: var(--color-light-text-secondary-inverted);
52
52
  }
53
- .typography__link_1cimi {
53
+ .typography__link_8qhut {
54
54
  color: var(--color-light-text-info);
55
55
  }
56
- .typography__negative_1cimi {
56
+ .typography__negative_8qhut {
57
57
  color: var(--color-light-text-negative);
58
58
  }
59
- .typography__static-primary-light_1cimi {
59
+ .typography__static-primary-light_8qhut {
60
60
  color: var(--color-static-text-primary-light);
61
61
  }
62
- .typography__static-secondary-light_1cimi {
62
+ .typography__static-secondary-light_8qhut {
63
63
  color: var(--color-static-text-secondary-light);
64
64
  }
65
- .typography__static-tertiary-light_1cimi {
65
+ .typography__static-tertiary-light_8qhut {
66
66
  color: var(--color-static-text-tertiary-light);
67
67
  }
68
- .typography__static-primary-dark_1cimi {
68
+ .typography__static-primary-dark_8qhut {
69
69
  color: var(--color-static-text-primary-dark);
70
70
  }
71
- .typography__static-secondary-dark_1cimi {
71
+ .typography__static-secondary-dark_8qhut {
72
72
  color: var(--color-static-text-secondary-dark);
73
73
  }
74
- .typography__static-tertiary-dark_1cimi {
74
+ .typography__static-tertiary-dark_8qhut {
75
75
  color: var(--color-static-text-tertiary-dark);
76
76
  }
77
- .typography__static-accent_1cimi {
77
+ .typography__static-accent_8qhut {
78
78
  color: var(--color-static-accent-primary);
79
79
  }
80
- .typography__static-positive_1cimi {
80
+ .typography__static-positive_8qhut {
81
81
  color: var(--color-static-text-positive);
82
82
  }
@@ -1,6 +1,6 @@
1
1
  import './colors.css';
2
2
 
3
- var colors = {"tertiary":"typography__tertiary_1cimi","disabled":"typography__disabled_1cimi","accent":"typography__accent_1cimi","primary":"typography__primary_1cimi","attention":"typography__attention_1cimi","positive":"typography__positive_1cimi","secondary":"typography__secondary_1cimi","tertiary-inverted":"typography__tertiary-inverted_1cimi","primary-inverted":"typography__primary-inverted_1cimi","secondary-inverted":"typography__secondary-inverted_1cimi","link":"typography__link_1cimi","negative":"typography__negative_1cimi","static-primary-light":"typography__static-primary-light_1cimi","static-secondary-light":"typography__static-secondary-light_1cimi","static-tertiary-light":"typography__static-tertiary-light_1cimi","static-primary-dark":"typography__static-primary-dark_1cimi","static-secondary-dark":"typography__static-secondary-dark_1cimi","static-tertiary-dark":"typography__static-tertiary-dark_1cimi","static-accent":"typography__static-accent_1cimi","static-positive":"typography__static-positive_1cimi"};
3
+ var colors = {"tertiary":"typography__tertiary_8qhut","disabled":"typography__disabled_8qhut","accent":"typography__accent_8qhut","primary":"typography__primary_8qhut","attention":"typography__attention_8qhut","positive":"typography__positive_8qhut","secondary":"typography__secondary_8qhut","tertiary-inverted":"typography__tertiary-inverted_8qhut","primary-inverted":"typography__primary-inverted_8qhut","secondary-inverted":"typography__secondary-inverted_8qhut","link":"typography__link_8qhut","negative":"typography__negative_8qhut","static-primary-light":"typography__static-primary-light_8qhut","static-secondary-light":"typography__static-secondary-light_8qhut","static-tertiary-light":"typography__static-tertiary-light_8qhut","static-primary-dark":"typography__static-primary-dark_8qhut","static-secondary-dark":"typography__static-secondary-dark_8qhut","static-tertiary-dark":"typography__static-tertiary-dark_8qhut","static-accent":"typography__static-accent_8qhut","static-positive":"typography__static-positive_8qhut"};
4
4
 
5
5
  export { colors as default };
6
6
  //# sourceMappingURL=colors.module.css.js.map
@@ -1,5 +1,5 @@
1
1
  import { __rest, __assign } from 'tslib';
2
- import React, { forwardRef } from 'react';
2
+ import React, { forwardRef, Fragment } from 'react';
3
3
  import mergeRefs from 'react-merge-refs';
4
4
  import cn from 'classnames';
5
5
  import { useSkeleton } from '@alfalab/core-components-skeleton/esm';
@@ -10,22 +10,24 @@ var Text = forwardRef(function (_a, ref) {
10
10
  var _b, _c;
11
11
  var _d = _a.view, view = _d === void 0 ? 'primary-medium' : _d, _e = _a.tag, Component = _e === void 0 ? 'span' : _e, weight = _a.weight, _f = _a.monospaceNumbers, monospaceNumbers = _f === void 0 ? false : _f, _g = _a.defaultMargins, defaultMargins = _g === void 0 ? true : _g, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, rowLimit = _a.rowLimit, showSkeleton = _a.showSkeleton, skeletonProps = _a.skeletonProps; _a.font; var restProps = __rest(_a, ["view", "tag", "weight", "monospaceNumbers", "defaultMargins", "color", "className", "dataTestId", "children", "rowLimit", "showSkeleton", "skeletonProps", "font"]);
12
12
  var _h = useSkeleton(showSkeleton, skeletonProps), renderSkeleton = _h.renderSkeleton, textRef = _h.textRef;
13
- var skeleton = renderSkeleton({
14
- wrapperClassName: cn((_b = {},
15
- _b[styles.paragraphWithMargins] = Component === 'p' && defaultMargins,
16
- _b)),
17
- dataTestId: dataTestId,
18
- });
19
- if (skeleton) {
20
- return skeleton;
21
- }
22
- return (React.createElement(Component, __assign({ className: cn((_c = {},
23
- _c[styles.paragraph] = Component === 'p' && !defaultMargins,
24
- _c[styles.paragraphWithMargins] = Component === 'p' && defaultMargins,
25
- _c[styles.monospace] = monospaceNumbers,
26
- _c[styles["rowLimit".concat(rowLimit)]] = rowLimit,
27
- _c[styles.transparent] = showSkeleton,
28
- _c), className, color && colors[color], styles[view], weight && styles[weight]), "data-test-id": dataTestId, ref: mergeRefs([ref, textRef]) }, restProps), children));
13
+ var Root = showSkeleton ? 'div' : Fragment;
14
+ var rootProps = showSkeleton
15
+ ? { className: cn(styles.root, className) }
16
+ : {};
17
+ return (React.createElement(Root, __assign({}, rootProps),
18
+ React.createElement(Component, __assign({ className: cn((_b = {},
19
+ _b[styles.paragraph] = Component === 'p' && !defaultMargins,
20
+ _b[styles.paragraphWithMargins] = Component === 'p' && defaultMargins,
21
+ _b[styles.monospace] = monospaceNumbers,
22
+ _b[styles["rowLimit".concat(rowLimit)]] = rowLimit,
23
+ _b[styles.transparent] = showSkeleton,
24
+ _b), !showSkeleton && className, color && colors[color], styles[view], weight && styles[weight]), "data-test-id": dataTestId, ref: mergeRefs([ref, textRef]) }, restProps), children),
25
+ showSkeleton && (React.createElement("div", { className: styles.skeleton }, renderSkeleton({
26
+ wrapperClassName: cn((_c = {},
27
+ _c[styles.paragraphWithMargins] = Component === 'p' && defaultMargins,
28
+ _c)),
29
+ dataTestId: dataTestId,
30
+ })))));
29
31
  });
30
32
 
31
33
  export { Text };
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/text/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';\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\n const skeleton = renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\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 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 );\n },\n);\n"],"names":[],"mappings":";;;;;;;;IAoGa,IAAI,GAAG,UAAU,CAC1B,UACI,EAeC,EACD,GAAG,EAAA;;IAfC,IAAA,EAAA,GAAA,EAAA,CAAA,IAAuB,CAAvB,CAAA,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,gBAAgB,GAAA,EAAA,CAAA,CACvB,EAAuB,GAAA,EAAA,CAAA,GAAA,CAAA,CAAlB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,GAAA,EAAA,CACvB,CAAA,MAAM,GAAA,EAAA,CAAA,MAAA,CAAA,CACN,EAAwB,GAAA,EAAA,CAAA,gBAAA,CAAA,CAAxB,gBAAgB,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,CACxB,CAAA,EAAA,GAAA,EAAA,CAAA,cAAqB,CAArB,CAAA,cAAc,GAAG,EAAA,KAAA,MAAA,GAAA,IAAI,KAAA,CACrB,CAAA,KAAK,GAAA,EAAA,CAAA,KAAA,CAAA,CACL,SAAS,GAAA,EAAA,CAAA,SAAA,CACT,CAAA,UAAU,GAAA,EAAA,CAAA,UAAA,CAAA,CACV,QAAQ,GAAA,EAAA,CAAA,QAAA,CACR,CAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,CAAA,CACR,YAAY,GAAA,EAAA,CAAA,YAAA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T,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,EAC1B,EAAA,SAAS,GAEZ,QAAQ,CACD;AAEpB,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":";;;;;;;;IAoGa,IAAI,GAAG,UAAU,CAC1B,UACI,EAeC,EACD,GAAG,EAAA;;IAfC,IAAA,EAAA,GAAA,EAAA,CAAA,IAAuB,CAAvB,CAAA,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,gBAAgB,GAAA,EAAA,CAAA,CACvB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