@alfalab/core-components-typography 3.2.2 → 4.1.0

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 (127) hide show
  1. package/colors.css +20 -20
  2. package/colors.module-69def6bf.js +6 -0
  3. package/common.module-59cc11ca.js +6 -0
  4. package/component.js +6 -2
  5. package/cssm/component.js +5 -0
  6. package/cssm/hooks/index.d.ts +1 -0
  7. package/cssm/hooks/index.js +14 -0
  8. package/cssm/hooks/use-skeleton.module.css +19 -0
  9. package/cssm/hooks/useSkeleton.d.ts +12 -0
  10. package/cssm/hooks/useSkeleton.js +59 -0
  11. package/cssm/index.js +5 -0
  12. package/cssm/text/component.d.ts +9 -1
  13. package/cssm/text/component.js +23 -7
  14. package/cssm/text/index.js +5 -0
  15. package/cssm/title/component.d.ts +19 -2
  16. package/cssm/title/component.js +16 -2
  17. package/cssm/title/index.js +5 -0
  18. package/cssm/title-mobile/component.js +5 -0
  19. package/cssm/title-mobile/index.js +5 -0
  20. package/cssm/title-responsive/component.js +5 -0
  21. package/cssm/title-responsive/index.js +5 -0
  22. package/cssm/title-responsive/index.module.css +14 -64
  23. package/cssm/types.d.ts +12 -1
  24. package/esm/colors.css +20 -20
  25. package/esm/colors.module-64858915.js +4 -0
  26. package/esm/common.module-a0a4a875.js +4 -0
  27. package/esm/component.js +6 -2
  28. package/esm/hooks/index.d.ts +1 -0
  29. package/esm/hooks/index.js +5 -0
  30. package/esm/hooks/use-skeleton.css +20 -0
  31. package/esm/hooks/useSkeleton.d.ts +12 -0
  32. package/esm/hooks/useSkeleton.js +52 -0
  33. package/esm/index.js +6 -2
  34. package/esm/text/component.d.ts +9 -1
  35. package/esm/text/component.js +23 -9
  36. package/esm/text/index.css +18 -19
  37. package/esm/text/index.js +5 -1
  38. package/esm/title/common.css +5 -5
  39. package/esm/title/component.d.ts +19 -2
  40. package/esm/title/component.js +15 -3
  41. package/esm/title/index.css +19 -19
  42. package/esm/title/index.js +7 -3
  43. package/esm/title-mobile/component.js +7 -3
  44. package/esm/title-mobile/index.css +11 -11
  45. package/esm/title-mobile/index.js +6 -2
  46. package/esm/title-responsive/component.js +7 -3
  47. package/esm/title-responsive/index.css +44 -94
  48. package/esm/title-responsive/index.js +6 -2
  49. package/esm/types.d.ts +12 -1
  50. package/hooks/index.d.ts +1 -0
  51. package/hooks/index.js +13 -0
  52. package/hooks/use-skeleton.css +20 -0
  53. package/hooks/useSkeleton.d.ts +12 -0
  54. package/hooks/useSkeleton.js +60 -0
  55. package/index.js +6 -2
  56. package/modern/colors.css +20 -20
  57. package/modern/colors.module-58e8caae.js +4 -0
  58. package/modern/common.module-3d6095da.js +4 -0
  59. package/modern/component.js +6 -2
  60. package/modern/hooks/index.d.ts +1 -0
  61. package/modern/hooks/index.js +4 -0
  62. package/modern/hooks/use-skeleton.css +20 -0
  63. package/modern/hooks/useSkeleton.d.ts +12 -0
  64. package/modern/hooks/useSkeleton.js +51 -0
  65. package/modern/index.js +6 -2
  66. package/modern/text/component.d.ts +9 -1
  67. package/modern/text/component.js +24 -8
  68. package/modern/text/index.css +18 -19
  69. package/modern/text/index.js +5 -1
  70. package/modern/title/common.css +5 -5
  71. package/modern/title/component.d.ts +19 -2
  72. package/modern/title/component.js +16 -2
  73. package/modern/title/index.css +19 -19
  74. package/modern/title/index.js +7 -3
  75. package/modern/title-mobile/component.js +7 -3
  76. package/modern/title-mobile/index.css +11 -11
  77. package/modern/title-mobile/index.js +6 -2
  78. package/modern/title-responsive/component.js +7 -3
  79. package/modern/title-responsive/index.css +44 -94
  80. package/modern/title-responsive/index.js +6 -2
  81. package/modern/types.d.ts +12 -1
  82. package/package.json +4 -1
  83. package/src/colors.module.css +79 -0
  84. package/src/colors.ts +23 -0
  85. package/src/component.tsx +19 -0
  86. package/src/hooks/index.ts +1 -0
  87. package/src/hooks/use-skeleton.module.css +5 -0
  88. package/src/hooks/useSkeleton.tsx +78 -0
  89. package/src/index.ts +5 -0
  90. package/src/margins.module.css +11 -0
  91. package/src/presets.ts +17 -0
  92. package/src/text/component.tsx +145 -0
  93. package/src/text/index.module.css +76 -0
  94. package/src/text/index.ts +1 -0
  95. package/src/title/common.module.css +16 -0
  96. package/src/title/component.tsx +133 -0
  97. package/src/title/index.module.css +75 -0
  98. package/src/title/index.tsx +17 -0
  99. package/src/title-mobile/component.tsx +16 -0
  100. package/src/title-mobile/index.module.css +42 -0
  101. package/src/title-mobile/index.tsx +1 -0
  102. package/src/title-responsive/component.tsx +14 -0
  103. package/src/title-responsive/index.module.css +126 -0
  104. package/src/title-responsive/index.tsx +1 -0
  105. package/src/types.ts +15 -0
  106. package/text/component.d.ts +9 -1
  107. package/text/component.js +24 -9
  108. package/text/index.css +18 -19
  109. package/text/index.js +5 -1
  110. package/title/common.css +5 -5
  111. package/title/component.d.ts +19 -2
  112. package/title/component.js +16 -3
  113. package/title/index.css +19 -19
  114. package/title/index.js +7 -3
  115. package/title-mobile/component.js +7 -3
  116. package/title-mobile/index.css +11 -11
  117. package/title-mobile/index.js +6 -2
  118. package/title-responsive/component.js +7 -3
  119. package/title-responsive/index.css +44 -94
  120. package/title-responsive/index.js +6 -2
  121. package/types.d.ts +12 -1
  122. package/colors.module-a848b027.js +0 -6
  123. package/common.module-7493433e.js +0 -6
  124. package/esm/colors.module-996156cd.js +0 -4
  125. package/esm/common.module-bbfef03a.js +0 -4
  126. package/modern/colors.module-f2c54769.js +0 -4
  127. package/modern/common.module-888addc3.js +0 -4
@@ -1,4 +1,4 @@
1
- /* hash: 1bvgj */
1
+ /* hash: s5eu3 */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -20,118 +20,68 @@
20
20
  --font-family-styrene: 'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto,
21
21
  'Helvetica Neue', Helvetica, sans-serif;
22
22
  } :root {
23
- } /* TODO: поменять медиа-запросы на миксины */ .typography__styrene-xlarge_18lb0 {
23
+ } /* TODO: поменять медиа-запросы на миксины */ .typography__styrene-xlarge_1h9yc {
24
24
  font-size: 34px;
25
25
  line-height: 40px;
26
26
  font-weight: 500;
27
27
  font-feature-settings: 'ss01';
28
28
  font-family: var(--font-family-styrene);
29
- } .typography__styrene-large_18lb0 {
29
+ } .typography__styrene-large_1h9yc {
30
30
  font-size: 30px;
31
31
  line-height: 36px;
32
32
  font-weight: 500;
33
33
  font-feature-settings: 'ss01';
34
34
  font-family: var(--font-family-styrene);
35
- } .typography__styrene-medium_18lb0 {
35
+ } .typography__styrene-medium_1h9yc {
36
36
  font-size: 26px;
37
37
  line-height: 32px;
38
38
  font-weight: 500;
39
39
  font-feature-settings: 'ss01';
40
40
  font-family: var(--font-family-styrene);
41
- } .typography__styrene-small_18lb0 {
41
+ } .typography__styrene-small_1h9yc {
42
42
  font-size: 20px;
43
43
  line-height: 28px;
44
44
  font-weight: 500;
45
45
  font-feature-settings: 'ss01';
46
46
  font-family: var(--font-family-styrene);
47
- } .typography__styrene-xsmall_18lb0 {
47
+ } .typography__styrene-xsmall_1h9yc {
48
48
  font-size: 16px;
49
49
  line-height: 20px;
50
50
  font-weight: 500;
51
51
  font-feature-settings: 'ss01';
52
52
  font-family: var(--font-family-styrene);
53
- } .typography__system-xlarge_18lb0 {
53
+ } .typography__system-xlarge_1h9yc {
54
+ font-size: 34px;
55
+ line-height: 40px;
56
+ font-weight: 600;
57
+ } .typography__system-large_1h9yc {
54
58
  font-size: 30px;
55
59
  line-height: 36px;
56
- font-weight: 700;
57
- } .typography__system-large_18lb0 {
58
- font-size: 22px;
59
- line-height: 26px;
60
- font-weight: 700;
61
- } .typography__system-medium_18lb0 {
62
- font-size: 18px;
63
- line-height: 22px;
64
- font-weight: 700;
65
- } .typography__system-small_18lb0 {
66
- font-size: 18px;
67
- line-height: 22px;
68
- font-weight: 700;
69
- } .typography__system-xsmall_18lb0 {
70
- font-size: 18px;
71
- line-height: 22px;
72
- font-weight: 700;
73
- } .typography__margins-xlarge_18lb0 {
60
+ font-weight: 600;
61
+ } .typography__system-medium_1h9yc {
62
+ font-size: 26px;
63
+ line-height: 32px;
64
+ font-weight: 600;
65
+ } .typography__system-small_1h9yc {
66
+ font-size: 20px;
67
+ line-height: 28px;
68
+ font-weight: 600;
69
+ } .typography__system-xsmall_1h9yc {
70
+ font-size: 16px;
71
+ line-height: 20px;
72
+ font-weight: 600;
73
+ } .typography__margins-xlarge_1h9yc {
74
74
  margin: 0 0 var(--gap-xl);
75
- } .typography__margins-large_18lb0 {
75
+ } .typography__margins-large_1h9yc {
76
76
  margin: var(--gap-3xl) 0 var(--gap-m);
77
- } .typography__margins-medium_18lb0 {
77
+ } .typography__margins-medium_1h9yc {
78
78
  margin: var(--gap-3xl) 0 var(--gap-m);
79
- } .typography__margins-small_18lb0 {
79
+ } .typography__margins-small_1h9yc {
80
80
  margin: var(--gap-3xl) 0 var(--gap-m);
81
- } .typography__margins-xsmall_18lb0 {
81
+ } .typography__margins-xsmall_1h9yc {
82
82
  margin: var(--gap-3xl) 0 var(--gap-m);
83
- } @media screen and (min-width: 600px) {
84
- .typography__system-xlarge_18lb0 {
85
- font-size: 40px;
86
- line-height: 48px;
87
- font-weight: 700;
88
- }
89
-
90
- .typography__system-large_18lb0 {
91
- font-size: 30px;
92
- line-height: 36px;
93
- font-weight: 700;
94
- }
95
-
96
- .typography__system-medium_18lb0 {
97
- font-size: 22px;
98
- line-height: 26px;
99
- font-weight: 700;
100
- }
101
-
102
- .typography__system-small_18lb0 {
103
- font-size: 22px;
104
- line-height: 26px;
105
- font-weight: 700;
106
- }
107
-
108
- .typography__system-xsmall_18lb0 {
109
- font-size: 18px;
110
- line-height: 22px;
111
- font-weight: 700;
112
- }
113
-
114
- .typography__margins-xlarge_18lb0 {
115
- margin: 0 0 var(--gap-xl);
116
- }
117
-
118
- .typography__margins-large_18lb0 {
119
- margin: var(--gap-4xl) 0 var(--gap-xl);
120
- }
121
-
122
- .typography__margins-medium_18lb0 {
123
- margin: var(--gap-3xl) 0 var(--gap-m);
124
- }
125
-
126
- .typography__margins-small_18lb0 {
127
- margin: var(--gap-3xl) 0 var(--gap-m);
128
- }
129
-
130
- .typography__margins-xsmall_18lb0 {
131
- margin: var(--gap-3xl) 0 var(--gap-m);
132
- }
133
83
  } @media screen and (min-width: 1024px) {
134
- .typography__styrene-xlarge_18lb0 {
84
+ .typography__styrene-xlarge_1h9yc {
135
85
  font-size: 48px;
136
86
  line-height: 64px;
137
87
  font-weight: 500;
@@ -139,7 +89,7 @@
139
89
  font-family: var(--font-family-styrene);
140
90
  }
141
91
 
142
- .typography__styrene-large_18lb0 {
92
+ .typography__styrene-large_1h9yc {
143
93
  font-size: 40px;
144
94
  line-height: 48px;
145
95
  font-weight: 500;
@@ -147,7 +97,7 @@
147
97
  font-family: var(--font-family-styrene);
148
98
  }
149
99
 
150
- .typography__styrene-medium_18lb0 {
100
+ .typography__styrene-medium_1h9yc {
151
101
  font-size: 32px;
152
102
  line-height: 40px;
153
103
  font-weight: 500;
@@ -155,7 +105,7 @@
155
105
  font-family: var(--font-family-styrene);
156
106
  }
157
107
 
158
- .typography__styrene-small_18lb0 {
108
+ .typography__styrene-small_1h9yc {
159
109
  font-size: 24px;
160
110
  line-height: 32px;
161
111
  font-weight: 500;
@@ -163,7 +113,7 @@
163
113
  font-family: var(--font-family-styrene);
164
114
  }
165
115
 
166
- .typography__styrene-xsmall_18lb0 {
116
+ .typography__styrene-xsmall_1h9yc {
167
117
  font-size: 20px;
168
118
  line-height: 24px;
169
119
  font-weight: 500;
@@ -171,53 +121,53 @@
171
121
  font-family: var(--font-family-styrene);
172
122
  }
173
123
 
174
- .typography__system-xlarge_18lb0 {
124
+ .typography__system-xlarge_1h9yc {
175
125
  font-size: 48px;
176
126
  line-height: 52px;
177
127
  font-weight: 700;
178
128
  }
179
129
 
180
- .typography__system-large_18lb0 {
130
+ .typography__system-large_1h9yc {
181
131
  font-size: 40px;
182
132
  line-height: 48px;
183
133
  font-weight: 700;
184
134
  }
185
135
 
186
- .typography__system-medium_18lb0 {
136
+ .typography__system-medium_1h9yc {
187
137
  font-size: 30px;
188
138
  line-height: 36px;
189
139
  font-weight: 700;
190
140
  }
191
141
 
192
- .typography__system-small_18lb0 {
142
+ .typography__system-small_1h9yc {
193
143
  font-size: 22px;
194
144
  line-height: 26px;
195
145
  font-weight: 700;
196
146
  }
197
147
 
198
- .typography__system-xsmall_18lb0 {
148
+ .typography__system-xsmall_1h9yc {
199
149
  font-size: 18px;
200
150
  line-height: 22px;
201
151
  font-weight: 700;
202
152
  }
203
153
 
204
- .typography__margins-xlarge_18lb0 {
154
+ .typography__margins-xlarge_1h9yc {
205
155
  margin: 0 0 var(--gap-xl);
206
156
  }
207
157
 
208
- .typography__margins-large_18lb0 {
158
+ .typography__margins-large_1h9yc {
209
159
  margin: var(--gap-4xl) 0 var(--gap-xl);
210
160
  }
211
161
 
212
- .typography__margins-medium_18lb0 {
162
+ .typography__margins-medium_1h9yc {
213
163
  margin: var(--gap-4xl) 0 var(--gap-xl);
214
164
  }
215
165
 
216
- .typography__margins-small_18lb0 {
166
+ .typography__margins-small_1h9yc {
217
167
  margin: var(--gap-3xl) 0 var(--gap-m);
218
168
  }
219
169
 
220
- .typography__margins-xsmall_18lb0 {
170
+ .typography__margins-xsmall_1h9yc {
221
171
  margin: var(--gap-3xl) 0 var(--gap-m);
222
172
  }
223
173
  }
@@ -6,9 +6,13 @@ var titleResponsive_component = require('./component.js');
6
6
  require('tslib');
7
7
  require('react');
8
8
  require('../title/component.js');
9
+ require('react-merge-refs');
9
10
  require('classnames');
10
- require('../colors.module-a848b027.js');
11
- require('../common.module-7493433e.js');
11
+ require('../hooks/useSkeleton.js');
12
+ require('@alfalab/core-components-skeleton');
13
+ require('@alfalab/hooks');
14
+ require('../colors.module-69def6bf.js');
15
+ require('../common.module-59cc11ca.js');
12
16
 
13
17
 
14
18
 
package/types.d.ts CHANGED
@@ -1,2 +1,13 @@
1
1
  type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
2
- export { TextElementType };
2
+ type WidthUnit = number | string;
3
+ type TextSkeletonProps = {
4
+ /**
5
+ * Кол-во строк текста
6
+ */
7
+ rows?: number;
8
+ /**
9
+ * Ширина строки
10
+ */
11
+ width?: WidthUnit | WidthUnit[];
12
+ };
13
+ export { TextElementType, TextSkeletonProps };
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- var colors = {"tertiary":"typography__tertiary_1uica","disabled":"typography__disabled_1uica","accent":"typography__accent_1uica","primary":"typography__primary_1uica","attention":"typography__attention_1uica","positive":"typography__positive_1uica","secondary":"typography__secondary_1uica","tertiary-inverted":"typography__tertiary-inverted_1uica","primary-inverted":"typography__primary-inverted_1uica","secondary-inverted":"typography__secondary-inverted_1uica","link":"typography__link_1uica","negative":"typography__negative_1uica","static-primary-light":"typography__static-primary-light_1uica","static-secondary-light":"typography__static-secondary-light_1uica","static-tertiary-light":"typography__static-tertiary-light_1uica","static-primary-dark":"typography__static-primary-dark_1uica","static-secondary-dark":"typography__static-secondary-dark_1uica","static-tertiary-dark":"typography__static-tertiary-dark_1uica","static-accent":"typography__static-accent_1uica"};
4
- require('./colors.css')
5
-
6
- exports.colors = colors;
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- var commonStyles = {"component":"typography__component_1etxr","bold":"typography__bold_1etxr","medium":"typography__medium_1etxr","regular":"typography__regular_1etxr"};
4
- require('./title/common.css')
5
-
6
- exports.commonStyles = commonStyles;
@@ -1,4 +0,0 @@
1
- var colors = {"tertiary":"typography__tertiary_1uica","disabled":"typography__disabled_1uica","accent":"typography__accent_1uica","primary":"typography__primary_1uica","attention":"typography__attention_1uica","positive":"typography__positive_1uica","secondary":"typography__secondary_1uica","tertiary-inverted":"typography__tertiary-inverted_1uica","primary-inverted":"typography__primary-inverted_1uica","secondary-inverted":"typography__secondary-inverted_1uica","link":"typography__link_1uica","negative":"typography__negative_1uica","static-primary-light":"typography__static-primary-light_1uica","static-secondary-light":"typography__static-secondary-light_1uica","static-tertiary-light":"typography__static-tertiary-light_1uica","static-primary-dark":"typography__static-primary-dark_1uica","static-secondary-dark":"typography__static-secondary-dark_1uica","static-tertiary-dark":"typography__static-tertiary-dark_1uica","static-accent":"typography__static-accent_1uica"};
2
- require('./colors.css')
3
-
4
- export { colors as c };
@@ -1,4 +0,0 @@
1
- var commonStyles = {"component":"typography__component_1etxr","bold":"typography__bold_1etxr","medium":"typography__medium_1etxr","regular":"typography__regular_1etxr"};
2
- require('./title/common.css')
3
-
4
- export { commonStyles as c };
@@ -1,4 +0,0 @@
1
- const colors = {"tertiary":"typography__tertiary_1uica","disabled":"typography__disabled_1uica","accent":"typography__accent_1uica","primary":"typography__primary_1uica","attention":"typography__attention_1uica","positive":"typography__positive_1uica","secondary":"typography__secondary_1uica","tertiary-inverted":"typography__tertiary-inverted_1uica","primary-inverted":"typography__primary-inverted_1uica","secondary-inverted":"typography__secondary-inverted_1uica","link":"typography__link_1uica","negative":"typography__negative_1uica","static-primary-light":"typography__static-primary-light_1uica","static-secondary-light":"typography__static-secondary-light_1uica","static-tertiary-light":"typography__static-tertiary-light_1uica","static-primary-dark":"typography__static-primary-dark_1uica","static-secondary-dark":"typography__static-secondary-dark_1uica","static-tertiary-dark":"typography__static-tertiary-dark_1uica","static-accent":"typography__static-accent_1uica"};
2
- require('./colors.css')
3
-
4
- export { colors as c };
@@ -1,4 +0,0 @@
1
- const commonStyles = {"component":"typography__component_1etxr","bold":"typography__bold_1etxr","medium":"typography__medium_1etxr","regular":"typography__regular_1etxr"};
2
- require('./title/common.css')
3
-
4
- export { commonStyles as c };