@alfalab/core-components-typography 4.14.3 → 5.0.0-snapshot-6a9d3fc

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 (309) hide show
  1. package/colors.css +22 -44
  2. package/colors.d.ts +2 -3
  3. package/colors.js +1 -0
  4. package/colors.js.map +1 -0
  5. package/colors.module.css.js +8 -0
  6. package/colors.module.css.js.map +1 -0
  7. package/component.d.ts +7 -7
  8. package/component.js +13 -12
  9. package/component.js.map +1 -0
  10. package/cssm/colors.d.ts +2 -3
  11. package/cssm/colors.js +1 -0
  12. package/cssm/colors.js.map +1 -0
  13. package/cssm/colors.module.css +3 -24
  14. package/cssm/component.d.ts +7 -7
  15. package/cssm/component.js +13 -12
  16. package/cssm/component.js.map +1 -0
  17. package/cssm/index.d.ts +5 -5
  18. package/cssm/index.js +9 -8
  19. package/cssm/index.js.map +1 -0
  20. package/cssm/presets.d.ts +1 -2
  21. package/cssm/presets.js +1 -0
  22. package/cssm/presets.js.map +1 -0
  23. package/cssm/text/alfasans-index.module.css +18 -29
  24. package/cssm/text/component.d.ts +10 -12
  25. package/cssm/text/component.js +3 -2
  26. package/cssm/text/component.js.map +1 -0
  27. package/cssm/text/index.d.ts +1 -1
  28. package/cssm/text/index.js +3 -2
  29. package/cssm/text/index.js.map +1 -0
  30. package/cssm/text/index.module.css +3 -24
  31. package/cssm/title/alfasans-index.module.css +2 -23
  32. package/cssm/title/common.module.css +2 -23
  33. package/cssm/title/component.d.ts +13 -15
  34. package/cssm/title/component.js +7 -6
  35. package/cssm/title/component.js.map +1 -0
  36. package/cssm/title/index.d.ts +5 -6
  37. package/cssm/title/index.js +3 -2
  38. package/cssm/title/index.js.map +1 -0
  39. package/cssm/title/index.module.css +6 -26
  40. package/cssm/title/utils.d.ts +1 -2
  41. package/cssm/title/utils.js +1 -0
  42. package/cssm/title/utils.js.map +1 -0
  43. package/cssm/title-mobile/alfasans-index.module.css +2 -23
  44. package/cssm/title-mobile/component.d.ts +5 -7
  45. package/cssm/title-mobile/component.js +3 -2
  46. package/cssm/title-mobile/component.js.map +1 -0
  47. package/cssm/title-mobile/index.d.ts +2 -2
  48. package/cssm/title-mobile/index.js +3 -2
  49. package/cssm/title-mobile/index.js.map +1 -0
  50. package/cssm/title-mobile/index.module.css +5 -25
  51. package/cssm/title-responsive/component.d.ts +7 -9
  52. package/cssm/title-responsive/component.js +6 -5
  53. package/cssm/title-responsive/component.js.map +1 -0
  54. package/cssm/title-responsive/index.d.ts +1 -1
  55. package/cssm/title-responsive/index.js +3 -2
  56. package/cssm/title-responsive/index.js.map +1 -0
  57. package/cssm/types.d.ts +1 -2
  58. package/cssm/types.js +1 -0
  59. package/cssm/types.js.map +1 -0
  60. package/esm/colors.css +22 -44
  61. package/esm/colors.d.ts +2 -3
  62. package/esm/colors.js +1 -0
  63. package/esm/colors.js.map +1 -0
  64. package/esm/colors.module.css.js +6 -0
  65. package/esm/colors.module.css.js.map +1 -0
  66. package/esm/component.d.ts +7 -7
  67. package/esm/component.js +1 -0
  68. package/esm/component.js.map +1 -0
  69. package/esm/index.d.ts +5 -5
  70. package/esm/index.js +1 -0
  71. package/esm/index.js.map +1 -0
  72. package/esm/presets.d.ts +1 -2
  73. package/esm/presets.js +1 -0
  74. package/esm/presets.js.map +1 -0
  75. package/esm/text/alfasans-index.css +30 -58
  76. package/esm/text/alfasans-index.module.css.js +6 -0
  77. package/esm/text/alfasans-index.module.css.js.map +1 -0
  78. package/esm/text/component.d.ts +10 -12
  79. package/esm/text/component.js +4 -7
  80. package/esm/text/component.js.map +1 -0
  81. package/esm/text/index.css +24 -45
  82. package/esm/text/index.d.ts +1 -1
  83. package/esm/text/index.js +1 -0
  84. package/esm/text/index.js.map +1 -0
  85. package/esm/text/index.module.css.js +6 -0
  86. package/esm/text/index.module.css.js.map +1 -0
  87. package/esm/title/alfasans-index.css +11 -33
  88. package/esm/title/alfasans-index.module.css.js +6 -0
  89. package/esm/title/alfasans-index.module.css.js.map +1 -0
  90. package/esm/title/common.css +9 -31
  91. package/esm/title/common.module.css.js +6 -0
  92. package/esm/title/common.module.css.js.map +1 -0
  93. package/esm/title/component.d.ts +12 -14
  94. package/esm/title/component.js +2 -1
  95. package/esm/title/component.js.map +1 -0
  96. package/esm/title/index.css +21 -42
  97. package/esm/title/index.d.ts +4 -5
  98. package/esm/title/index.js +4 -7
  99. package/esm/title/index.js.map +1 -0
  100. package/esm/title/index.module.css.js +6 -0
  101. package/esm/title/index.module.css.js.map +1 -0
  102. package/esm/title/utils.d.ts +1 -2
  103. package/esm/title/utils.js +1 -0
  104. package/esm/title/utils.js.map +1 -0
  105. package/esm/title-mobile/alfasans-index.css +11 -33
  106. package/esm/title-mobile/alfasans-index.module.css.js +6 -0
  107. package/esm/title-mobile/alfasans-index.module.css.js.map +1 -0
  108. package/esm/title-mobile/component.d.ts +4 -6
  109. package/esm/title-mobile/component.js +4 -7
  110. package/esm/title-mobile/component.js.map +1 -0
  111. package/esm/title-mobile/index.css +19 -40
  112. package/esm/title-mobile/index.d.ts +2 -2
  113. package/esm/title-mobile/index.js +1 -0
  114. package/esm/title-mobile/index.js.map +1 -0
  115. package/esm/title-mobile/index.module.css.js +6 -0
  116. package/esm/title-mobile/index.module.css.js.map +1 -0
  117. package/esm/title-responsive/component.d.ts +6 -8
  118. package/esm/title-responsive/component.js +1 -0
  119. package/esm/title-responsive/component.js.map +1 -0
  120. package/esm/title-responsive/index.d.ts +1 -1
  121. package/esm/title-responsive/index.js +1 -0
  122. package/esm/title-responsive/index.js.map +1 -0
  123. package/esm/types.d.ts +1 -2
  124. package/esm/types.js +1 -0
  125. package/esm/types.js.map +1 -0
  126. package/index.d.ts +5 -5
  127. package/index.js +9 -8
  128. package/index.js.map +1 -0
  129. package/modern/colors.css +22 -44
  130. package/modern/colors.d.ts +2 -3
  131. package/modern/colors.js +1 -0
  132. package/modern/colors.js.map +1 -0
  133. package/modern/colors.module.css.js +6 -0
  134. package/modern/colors.module.css.js.map +1 -0
  135. package/modern/component.d.ts +7 -7
  136. package/modern/component.js +1 -0
  137. package/modern/component.js.map +1 -0
  138. package/modern/index.d.ts +5 -5
  139. package/modern/index.js +1 -0
  140. package/modern/index.js.map +1 -0
  141. package/modern/presets.d.ts +1 -2
  142. package/modern/presets.js +1 -0
  143. package/modern/presets.js.map +1 -0
  144. package/modern/text/alfasans-index.css +30 -58
  145. package/modern/text/alfasans-index.module.css.js +6 -0
  146. package/modern/text/alfasans-index.module.css.js.map +1 -0
  147. package/modern/text/component.d.ts +10 -12
  148. package/modern/text/component.js +4 -7
  149. package/modern/text/component.js.map +1 -0
  150. package/modern/text/index.css +24 -45
  151. package/modern/text/index.d.ts +1 -1
  152. package/modern/text/index.js +1 -0
  153. package/modern/text/index.js.map +1 -0
  154. package/modern/text/index.module.css.js +6 -0
  155. package/modern/text/index.module.css.js.map +1 -0
  156. package/modern/title/alfasans-index.css +11 -33
  157. package/modern/title/alfasans-index.module.css.js +6 -0
  158. package/modern/title/alfasans-index.module.css.js.map +1 -0
  159. package/modern/title/common.css +9 -31
  160. package/modern/title/common.module.css.js +6 -0
  161. package/modern/title/common.module.css.js.map +1 -0
  162. package/modern/title/component.d.ts +12 -14
  163. package/modern/title/component.js +2 -1
  164. package/modern/title/component.js.map +1 -0
  165. package/modern/title/index.css +21 -42
  166. package/modern/title/index.d.ts +4 -5
  167. package/modern/title/index.js +4 -7
  168. package/modern/title/index.js.map +1 -0
  169. package/modern/title/index.module.css.js +6 -0
  170. package/modern/title/index.module.css.js.map +1 -0
  171. package/modern/title/utils.d.ts +1 -2
  172. package/modern/title/utils.js +1 -0
  173. package/modern/title/utils.js.map +1 -0
  174. package/modern/title-mobile/alfasans-index.css +11 -33
  175. package/modern/title-mobile/alfasans-index.module.css.js +6 -0
  176. package/modern/title-mobile/alfasans-index.module.css.js.map +1 -0
  177. package/modern/title-mobile/component.d.ts +4 -6
  178. package/modern/title-mobile/component.js +4 -7
  179. package/modern/title-mobile/component.js.map +1 -0
  180. package/modern/title-mobile/index.css +19 -40
  181. package/modern/title-mobile/index.d.ts +2 -2
  182. package/modern/title-mobile/index.js +1 -0
  183. package/modern/title-mobile/index.js.map +1 -0
  184. package/modern/title-mobile/index.module.css.js +6 -0
  185. package/modern/title-mobile/index.module.css.js.map +1 -0
  186. package/modern/title-responsive/component.d.ts +6 -8
  187. package/modern/title-responsive/component.js +1 -0
  188. package/modern/title-responsive/component.js.map +1 -0
  189. package/modern/title-responsive/index.d.ts +1 -1
  190. package/modern/title-responsive/index.js +1 -0
  191. package/modern/title-responsive/index.js.map +1 -0
  192. package/modern/types.d.ts +1 -2
  193. package/modern/types.js +1 -0
  194. package/modern/types.js.map +1 -0
  195. package/moderncssm/colors.d.ts +2 -3
  196. package/moderncssm/colors.js +1 -0
  197. package/moderncssm/colors.js.map +1 -0
  198. package/moderncssm/colors.module.css +0 -4
  199. package/moderncssm/component.d.ts +7 -7
  200. package/moderncssm/component.js +1 -0
  201. package/moderncssm/component.js.map +1 -0
  202. package/moderncssm/index.d.ts +5 -5
  203. package/moderncssm/index.js +1 -0
  204. package/moderncssm/index.js.map +1 -0
  205. package/moderncssm/presets.d.ts +1 -2
  206. package/moderncssm/presets.js +1 -0
  207. package/moderncssm/presets.js.map +1 -0
  208. package/moderncssm/text/alfasans-index.module.css +18 -29
  209. package/moderncssm/text/component.d.ts +10 -12
  210. package/moderncssm/text/component.js +1 -0
  211. package/moderncssm/text/component.js.map +1 -0
  212. package/moderncssm/text/index.d.ts +1 -1
  213. package/moderncssm/text/index.js +1 -0
  214. package/moderncssm/text/index.js.map +1 -0
  215. package/moderncssm/text/index.module.css +0 -1
  216. package/moderncssm/title/alfasans-index.module.css +2 -23
  217. package/moderncssm/title/common.module.css +0 -2
  218. package/moderncssm/title/component.d.ts +12 -14
  219. package/moderncssm/title/component.js +1 -0
  220. package/moderncssm/title/component.js.map +1 -0
  221. package/moderncssm/title/index.d.ts +4 -5
  222. package/moderncssm/title/index.js +1 -0
  223. package/moderncssm/title/index.js.map +1 -0
  224. package/moderncssm/title/index.module.css +0 -1
  225. package/moderncssm/title/utils.d.ts +1 -2
  226. package/moderncssm/title/utils.js +1 -0
  227. package/moderncssm/title/utils.js.map +1 -0
  228. package/moderncssm/title-mobile/alfasans-index.module.css +2 -23
  229. package/moderncssm/title-mobile/component.d.ts +4 -6
  230. package/moderncssm/title-mobile/component.js +1 -0
  231. package/moderncssm/title-mobile/component.js.map +1 -0
  232. package/moderncssm/title-mobile/index.d.ts +2 -2
  233. package/moderncssm/title-mobile/index.js +1 -0
  234. package/moderncssm/title-mobile/index.js.map +1 -0
  235. package/moderncssm/title-mobile/index.module.css +0 -1
  236. package/moderncssm/title-responsive/component.d.ts +6 -8
  237. package/moderncssm/title-responsive/component.js +1 -0
  238. package/moderncssm/title-responsive/component.js.map +1 -0
  239. package/moderncssm/title-responsive/index.d.ts +1 -1
  240. package/moderncssm/title-responsive/index.js +1 -0
  241. package/moderncssm/title-responsive/index.js.map +1 -0
  242. package/moderncssm/types.d.ts +1 -2
  243. package/moderncssm/types.js +1 -0
  244. package/moderncssm/types.js.map +1 -0
  245. package/package.json +8 -8
  246. package/presets.d.ts +1 -2
  247. package/presets.js +1 -0
  248. package/presets.js.map +1 -0
  249. package/text/alfasans-index.css +30 -58
  250. package/text/alfasans-index.module.css.js +8 -0
  251. package/text/alfasans-index.module.css.js.map +1 -0
  252. package/text/component.d.ts +10 -12
  253. package/text/component.js +12 -15
  254. package/text/component.js.map +1 -0
  255. package/text/index.css +24 -45
  256. package/text/index.d.ts +1 -1
  257. package/text/index.js +3 -2
  258. package/text/index.js.map +1 -0
  259. package/text/index.module.css.js +8 -0
  260. package/text/index.module.css.js.map +1 -0
  261. package/title/alfasans-index.css +11 -33
  262. package/title/alfasans-index.module.css.js +8 -0
  263. package/title/alfasans-index.module.css.js.map +1 -0
  264. package/title/common.css +9 -31
  265. package/title/common.module.css.js +8 -0
  266. package/title/common.module.css.js.map +1 -0
  267. package/title/component.d.ts +12 -14
  268. package/title/component.js +5 -4
  269. package/title/component.js.map +1 -0
  270. package/title/index.css +21 -42
  271. package/title/index.d.ts +4 -5
  272. package/title/index.js +7 -10
  273. package/title/index.js.map +1 -0
  274. package/title/index.module.css.js +8 -0
  275. package/title/index.module.css.js.map +1 -0
  276. package/title/utils.d.ts +1 -2
  277. package/title/utils.js +1 -0
  278. package/title/utils.js.map +1 -0
  279. package/title-mobile/alfasans-index.css +11 -33
  280. package/title-mobile/alfasans-index.module.css.js +8 -0
  281. package/title-mobile/alfasans-index.module.css.js.map +1 -0
  282. package/title-mobile/component.d.ts +4 -6
  283. package/title-mobile/component.js +7 -10
  284. package/title-mobile/component.js.map +1 -0
  285. package/title-mobile/index.css +19 -40
  286. package/title-mobile/index.d.ts +2 -2
  287. package/title-mobile/index.js +3 -2
  288. package/title-mobile/index.js.map +1 -0
  289. package/title-mobile/index.module.css.js +8 -0
  290. package/title-mobile/index.module.css.js.map +1 -0
  291. package/title-responsive/component.d.ts +6 -8
  292. package/title-responsive/component.js +4 -3
  293. package/title-responsive/component.js.map +1 -0
  294. package/title-responsive/index.d.ts +1 -1
  295. package/title-responsive/index.js +3 -2
  296. package/title-responsive/index.js.map +1 -0
  297. package/types.d.ts +1 -2
  298. package/types.js +1 -0
  299. package/types.js.map +1 -0
  300. package/colors.module-0ab37907.js +0 -6
  301. package/common.module-162cc30e.js +0 -6
  302. package/cssm/common.module.css +0 -3
  303. package/cssm/margins.module.css +0 -1
  304. package/esm/colors.module-719e5e74.js +0 -4
  305. package/esm/common.module-2fe7f697.js +0 -4
  306. package/modern/colors.module-8f6f35d9.js +0 -4
  307. package/modern/common.module-3e4facd7.js +0 -4
  308. package/moderncssm/common.module.css +0 -3
  309. package/moderncssm/margins.module.css +0 -1
@@ -0,0 +1,6 @@
1
+ import './index.css';
2
+
3
+ const styles = {"styrene-xlarge":"typography__styrene-xlarge_1tztz","styrene-large":"typography__styrene-large_1tztz","styrene-medium":"typography__styrene-medium_1tztz","styrene-small":"typography__styrene-small_1tztz","styrene-xsmall":"typography__styrene-xsmall_1tztz","system-xlarge":"typography__system-xlarge_1tztz","system-large":"typography__system-large_1tztz","system-medium":"typography__system-medium_1tztz","system-small":"typography__system-small_1tztz","system-xsmall":"typography__system-xsmall_1tztz","margins-xlarge":"typography__margins-xlarge_1tztz","margins-large":"typography__margins-large_1tztz","margins-medium":"typography__margins-medium_1tztz","margins-small":"typography__margins-small_1tztz","margins-xsmall":"typography__margins-xsmall_1tztz"};
4
+
5
+ export { styles as default };
6
+ //# sourceMappingURL=index.module.css.js.map
@@ -0,0 +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.styrene-xlarge {\n @mixin headline-mobile_xlarge;\n}\n\n.styrene-large {\n @mixin headline-mobile_large;\n}\n\n.styrene-medium {\n @mixin headline-mobile_medium;\n}\n\n.styrene-small {\n @mixin headline-mobile_small;\n}\n\n.styrene-xsmall {\n @mixin headline-mobile_xsmall;\n}\n\n.system-xlarge {\n @mixin headline-system-mobile_xlarge;\n}\n\n.system-large {\n @mixin headline-system-mobile_large;\n}\n\n.system-medium {\n @mixin headline-system-mobile_medium;\n}\n\n.system-small {\n @mixin headline-system-mobile_small;\n}\n\n.system-xsmall {\n @mixin headline-system-mobile_xsmall;\n}\n\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"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,cAAc,CAAC,gCAAgC,CAAC,eAAe,CAAC,iCAAiC,CAAC,cAAc,CAAC,gCAAgC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC;;;;"}
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  import React from 'react';
3
- import { TitleProps } from "../title/index";
4
- type TitleResponsiveProps = TitleProps & {
2
+ import { TitleProps } from '../title';
3
+ export declare type TitleResponsiveProps = TitleProps & {
5
4
  /**
6
5
  * Контрольная точка, с нее начинается desktop версия
7
6
  * @default 1024
@@ -12,11 +11,11 @@ type TitleResponsiveProps = TitleProps & {
12
11
  */
13
12
  client?: 'desktop' | 'mobile';
14
13
  };
15
- declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
14
+ export declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
16
15
  tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
17
- view?: "small" | "medium" | "xlarge" | "large" | "xsmall" | undefined;
16
+ view?: "medium" | "small" | "xlarge" | "large" | "xsmall" | undefined;
18
17
  color?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | "static-accent" | "static-positive" | undefined;
19
- weight?: "bold" | "regular" | "medium" | "semibold" | undefined;
18
+ weight?: "regular" | "medium" | "bold" | "semibold" | undefined;
20
19
  font?: "alfasans" | "styrene" | "system" | {
21
20
  font: "alfasans";
22
21
  systemCompat: boolean;
@@ -25,7 +24,7 @@ declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAt
25
24
  className?: string | undefined;
26
25
  dataTestId?: string | undefined;
27
26
  children?: React.ReactNode;
28
- rowLimit?: 2 | 1 | 3 | undefined;
27
+ rowLimit?: 1 | 2 | 3 | undefined;
29
28
  showSkeleton?: boolean | undefined;
30
29
  skeletonProps?: import("@alfalab/core-components-skeleton").TextSkeletonProps | undefined;
31
30
  defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
@@ -40,4 +39,3 @@ declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAt
40
39
  */
41
40
  client?: "mobile" | "desktop" | undefined;
42
41
  } & React.RefAttributes<HTMLDivElement | HTMLHeadingElement>>;
43
- export { TitleResponsiveProps, TitleResponsive };
@@ -10,3 +10,4 @@ const TitleResponsive = forwardRef(({ breakpoint, client, ...restProps }, ref) =
10
10
  });
11
11
 
12
12
  export { TitleResponsive };
13
+ //# sourceMappingURL=component.js.map
@@ -0,0 +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, 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 +1 @@
1
- export * from "./component";
1
+ export * from './component';
@@ -1 +1,2 @@
1
1
  export { TitleResponsive } from './component.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/modern/types.d.ts CHANGED
@@ -1,2 +1 @@
1
- type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
2
- export { TextElementType };
1
+ export declare type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
package/modern/types.js CHANGED
@@ -1 +1,2 @@
1
1
 
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,2 @@
1
- declare const colors: readonly ["tertiary", "disabled", "accent", "primary", "attention", "positive", "secondary", "tertiary-inverted", "primary-inverted", "secondary-inverted", "link", "negative", "static-primary-light", "static-secondary-light", "static-tertiary-light", "static-primary-dark", "static-secondary-dark", "static-tertiary-dark", "static-accent", "static-positive"];
2
- type Color = (typeof colors)[number];
3
- export { colors, Color };
1
+ export declare const colors: readonly ["tertiary", "disabled", "accent", "primary", "attention", "positive", "secondary", "tertiary-inverted", "primary-inverted", "secondary-inverted", "link", "negative", "static-primary-light", "static-secondary-light", "static-tertiary-light", "static-primary-dark", "static-secondary-dark", "static-tertiary-dark", "static-accent", "static-positive"];
2
+ export declare type Color = (typeof colors)[number];
@@ -22,3 +22,4 @@ const colors = [
22
22
  ];
23
23
 
24
24
  export { colors };
25
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +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,7 +1,3 @@
1
- /* */
2
-
3
- /* colors */
4
-
5
1
  .tertiary {
6
2
  color: var(--color-light-text-tertiary);
7
3
  }
@@ -1,13 +1,13 @@
1
1
  import { FC, ForwardRefExoticComponent, RefAttributes } from 'react';
2
- import { Text, TextProps } from "./text/index";
3
- import { Title, TitleProps } from "./title/index";
4
- import { TitleMobile, TitleMobileProps } from "./title-mobile/index";
5
- import { TitleResponsive, TitleResponsiveProps } from "./title-responsive/index";
6
- import { TextElementType } from "./types";
7
- declare const Typography: {
2
+ import { Text, TextProps } from './text';
3
+ import { Title, TitleProps } from './title';
4
+ import { TitleMobile, TitleMobileProps } from './title-mobile';
5
+ import { TitleResponsive, TitleResponsiveProps } from './title-responsive';
6
+ import { TextElementType } from './types';
7
+ export declare const Typography: {
8
8
  Title: FC<TitleProps>;
9
9
  Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
10
10
  TitleResponsive: FC<TitleResponsiveProps>;
11
11
  TitleMobile: FC<TitleMobileProps>;
12
12
  };
13
- export { Typography, Text, Title as TitleDesktop, TitleResponsive, TitleMobile };
13
+ export { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };
@@ -11,3 +11,4 @@ const Typography = {
11
11
  };
12
12
 
13
13
  export { Text, Title as TitleDesktop, TitleMobile, TitleResponsive, Typography };
14
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","sources":["../src/component.tsx"],"sourcesContent":["import { FC, ForwardRefExoticComponent, RefAttributes } from 'react';\n\nimport { Text, TextProps } from './text';\nimport { Title, TitleProps } from './title';\nimport { TitleMobile, TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, TitleResponsiveProps } from './title-responsive';\nimport { 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 { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":[],"mappings":";;;;;AAQa,MAAA,UAAU,GAKnB;IACA,KAAK;IACL,IAAI;IACJ,eAAe;IACf,WAAW;;;;;"}
@@ -1,5 +1,5 @@
1
- export * from "./component";
2
- export * from "./presets";
3
- export type { TitleProps } from "./title/index";
4
- export type { TextProps } from "./text/index";
5
- export type { Color } from "./colors";
1
+ export * from './component';
2
+ export * from './presets';
3
+ export type { TitleProps } from './title';
4
+ export type { TextProps } from './text';
5
+ export type { Color } from './colors';
@@ -4,3 +4,4 @@ export { Text } from './text/component.js';
4
4
  export { Title as TitleDesktop } from './title/index.js';
5
5
  export { TitleResponsive } from './title-responsive/component.js';
6
6
  export { TitleMobile } from './title-mobile/component.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,4 +1,4 @@
1
- declare const typographyPresets: {
1
+ export declare const typographyPresets: {
2
2
  mobile: {
3
3
  list: {
4
4
  text: {
@@ -15,4 +15,3 @@ declare const typographyPresets: {
15
15
  };
16
16
  };
17
17
  };
18
- export { typographyPresets };
@@ -17,3 +17,4 @@ const typographyPresets = {
17
17
  };
18
18
 
19
19
  export { typographyPresets };
20
+ //# sourceMappingURL=presets.js.map
@@ -0,0 +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,28 +1,7 @@
1
- :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 */ /* 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 */
2
- } /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */
3
- } :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 */ /* 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 */ /* 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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
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 */
5
- } :root {
6
-
7
- /* Hard */
8
-
9
- /* Up */
10
-
11
- /* Hard up */
12
- } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
13
-
14
- /* новые значения, используйте их */
15
- } :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 */
16
-
17
- /* новые значения, используйте их */
18
-
19
- /* no-unit может приводить к проблемам в calc (#1559) */
20
- /* stylelint-disable-next-line length-zero-no-unit */
21
- } :root {
1
+ :root {
22
2
  --font-family-alfasans: 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto,
23
3
  'Helvetica Neue', Helvetica, sans-serif;
24
- } /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
25
- } /* сбрасывает синюю подсветку при нажатии */ .text.component {
4
+ } .text.component {
26
5
  font-size: 16px;
27
6
  line-height: 20px;
28
7
  font-weight: 400;
@@ -43,32 +22,35 @@
43
22
  text-transform: uppercase;
44
23
  font-family: var(--font-family-alfasans);
45
24
  } .text.primary-large {
46
- /* prettier-ignore */
47
25
  font-size: 18px;
48
26
  line-height: 24px;
49
27
  font-weight: 400;
50
28
  letter-spacing: -0.36px;
51
29
  font-family: var(--font-family-alfasans)
52
30
  } .text.primary-large.bold {
31
+ letter-spacing: 0.38px;
53
32
  } .text.primary-large.medium {
33
+ letter-spacing: 0.17px;
54
34
  } .text.primary-medium {
55
- /* prettier-ignore */
56
35
  font-size: 16px;
57
36
  line-height: 24px;
58
37
  font-weight: 400;
59
38
  letter-spacing: -0.24px;
60
39
  font-family: var(--font-family-alfasans)
61
40
  } .text.primary-medium.bold {
41
+ letter-spacing: 0.43px;
62
42
  } .text.primary-medium.medium {
43
+ letter-spacing: 0.17px;
63
44
  } .text.primary-small {
64
- /* prettier-ignore */
65
45
  font-size: 14px;
66
46
  line-height: 20px;
67
47
  font-weight: 400;
68
48
  letter-spacing: -0.08px;
69
49
  font-family: var(--font-family-alfasans)
70
50
  } .text.primary-small.bold {
51
+ letter-spacing: 0.47px;
71
52
  } .text.primary-small.medium {
53
+ letter-spacing: 0.27px;
72
54
  } .text.component-primary {
73
55
  font-size: 16px;
74
56
  line-height: 20px;
@@ -76,34 +58,39 @@
76
58
  letter-spacing: -0.24px;
77
59
  font-family: var(--font-family-alfasans)
78
60
  } .text.component-primary.bold {
61
+ letter-spacing: 0.43px;
79
62
  } .text.component-primary.medium {
63
+ letter-spacing: 0.17px;
80
64
  } .text.secondary-large {
81
- /* prettier-ignore */
82
65
  font-size: 13px;
83
66
  line-height: 16px;
84
67
  font-weight: 400;
85
68
  letter-spacing: 0;
86
69
  font-family: var(--font-family-alfasans)
87
70
  } .text.secondary-large.bold {
71
+ letter-spacing: 0.54px;
88
72
  } .text.secondary-large.medium {
73
+ letter-spacing: 0.33px;
89
74
  } .text.secondary-medium {
90
- /* prettier-ignore */
91
75
  font-size: 12px;
92
76
  line-height: 16px;
93
77
  font-weight: 400;
94
78
  letter-spacing: 0.06px;
95
79
  font-family: var(--font-family-alfasans)
96
80
  } .text.secondary-medium.bold {
81
+ letter-spacing: 0.57px;
97
82
  } .text.secondary-medium.medium {
83
+ letter-spacing: 0.38px;
98
84
  } .text.secondary-small {
99
- /* prettier-ignore */
100
85
  font-size: 11px;
101
86
  line-height: 16px;
102
87
  font-weight: 400;
103
88
  letter-spacing: 0.15px;
104
89
  font-family: var(--font-family-alfasans)
105
90
  } .text.secondary-small.bold {
91
+ letter-spacing: 0.54px;
106
92
  } .text.secondary-small.medium {
93
+ letter-spacing: 0.41px;
107
94
  } .text.component-secondary {
108
95
  font-size: 14px;
109
96
  line-height: 18px;
@@ -111,7 +98,9 @@
111
98
  letter-spacing: -0.08px;
112
99
  font-family: var(--font-family-alfasans)
113
100
  } .text.component-secondary.bold {
101
+ letter-spacing: 0.47px;
114
102
  } .text.component-secondary.medium {
103
+ letter-spacing: 0.27px;
115
104
  } .text.bold {
116
105
  font-weight: 700;
117
106
  } .text.medium {
@@ -1,11 +1,9 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { HTMLAttributes } from "react";
4
- import { TextSkeletonProps } from "@alfalab/core-components-skeleton";
5
- import { Color } from "../colors";
6
- import { TextElementType } from "../types";
7
- type NativeProps = HTMLAttributes<HTMLSpanElement>;
8
- type TextBaseProps = {
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { type TextSkeletonProps } from '@alfalab/core-components-skeleton';
3
+ import { Color } from '../colors';
4
+ import { TextElementType } from '../types';
5
+ declare type NativeProps = HTMLAttributes<HTMLSpanElement>;
6
+ declare type TextBaseProps = {
9
7
  /**
10
8
  * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
11
9
  */
@@ -59,10 +57,10 @@ type TextBaseProps = {
59
57
  */
60
58
  font?: 'alfasans' | undefined | null;
61
59
  };
62
- type TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {
60
+ declare type TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {
63
61
  tag?: 'p';
64
62
  defaultMargins?: boolean;
65
63
  };
66
- type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);
67
- declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<TextElementType>>;
68
- export { TextProps, Text };
64
+ export declare type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);
65
+ export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<TextElementType>>;
66
+ export {};
@@ -44,3 +44,4 @@ const Text = forwardRef(({ view = 'primary-medium', tag: Component = 'span', wei
44
44
  });
45
45
 
46
46
  export { Text };
47
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { forwardRef, 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 { Color } from '../colors';\nimport { TextElementType } from '../types';\n\nimport colors from '../colors.module.css';\nimport alfasansStyles from './alfasans-index.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'\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 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\nconst logWarning = (view: Required<TextBaseProps>['view']) => {\n if (process.env.NODE_ENV !== 'development') {\n return;\n }\n\n const viewsMap: { [key: string]: string } = {\n component: 'component-primary',\n };\n\n // eslint-disable-next-line no-console\n console.warn(\n // eslint-disable-next-line prefer-template\n `@alfalab/core-components/typography: view='${view}' будет удален в следующих мажорных версиях. ` +\n `Используйте view='${viewsMap[view]}'.`,\n );\n};\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 if (view === 'component') {\n logWarning(view);\n }\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 [alfasansStyles.text]: font === 'alfasans',\n },\n className,\n color && colors[color],\n (font === 'alfasans' ? alfasansStyles : styles)[view],\n weight && (font === 'alfasans' ? alfasansStyles : 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":";;;;;;;;AAoGA,MAAM,UAAU,GAAG,CAAC,IAAqC,KAAI;AACzD,IAAA,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QACxC;AACH;AAED,IAAA,MAAM,QAAQ,GAA8B;AACxC,QAAA,SAAS,EAAE,mBAAmB;KACjC;;AAGD,IAAA,OAAO,CAAC,IAAI;;AAER,IAAA,CAAA,2CAAA,EAA8C,IAAI,CAA+C,6CAAA,CAAA;AAC7F,QAAA,CAAA,kBAAA,EAAqB,QAAQ,CAAC,IAAI,CAAC,CAAA,EAAA,CAAI,CAC9C;AACL,CAAC;MAEY,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;IACA,IAAI,IAAI,KAAK,WAAW,EAAE;QACtB,UAAU,CAAC,IAAI,CAAC;AACnB;AAED,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAE5E,MAAM,QAAQ,GAAG,cAAc,CAAC;QAC5B,gBAAgB,EAAE,EAAE,CAAC;YACjB,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;SACrE,CAAC;QACF,UAAU;AACb,KAAA,CAAC;AAEF,IAAA,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;AAClB;AAED,IAAA,QACI,KAAC,CAAA,aAAA,CAAA,SAAS,IACN,SAAS,EAAE,EAAE,CACT;YACI,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,KAAK,GAAG,IAAI,CAAC,cAAc;YACxD,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;AAClE,YAAA,CAAC,MAAM,CAAC,SAAS,GAAG,gBAAgB;YACpC,CAAC,MAAM,CAAC,CAAW,QAAA,EAAA,QAAQ,EAAE,CAAC,GAAG,QAAQ;AACzC,YAAA,CAAC,MAAM,CAAC,WAAW,GAAG,YAAY;AAClC,YAAA,CAAC,cAAc,CAAC,IAAI,GAAG,IAAI,KAAK,UAAU;AAC7C,SAAA,EACD,SAAS,EACT,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB,CAAC,IAAI,KAAK,UAAU,GAAG,cAAc,GAAG,MAAM,EAAE,IAAI,CAAC,EACrD,MAAM,IAAI,CAAC,IAAI,KAAK,UAAU,GAAG,cAAc,GAAG,MAAM,EAAE,MAAM,CAAC,CACpE,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAAA,GAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
@@ -1 +1 @@
1
- export * from "./component";
1
+ export * from './component';
@@ -1 +1,2 @@
1
1
  export { Text } from './component.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,4 +1,3 @@
1
- /* */
2
1
  .transparent {
3
2
  opacity: 0;
4
3
  }
@@ -1,28 +1,7 @@
1
- :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 */ /* 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 */
2
- } /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */
3
- } :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 */ /* 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 */ /* 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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
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 */
5
- } :root {
6
-
7
- /* Hard */
8
-
9
- /* Up */
10
-
11
- /* Hard up */
12
- } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
13
-
14
- /* новые значения, используйте их */
15
- } :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 */
16
-
17
- /* новые значения, используйте их */
18
-
19
- /* no-unit может приводить к проблемам в calc (#1559) */
20
- /* stylelint-disable-next-line length-zero-no-unit */
21
- } :root {
1
+ :root {
22
2
  --font-family-alfasans: 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto,
23
3
  'Helvetica Neue', Helvetica, sans-serif;
24
- } /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
25
- } /* сбрасывает синюю подсветку при нажатии */ .alfasans-xlarge {
4
+ } .alfasans-xlarge {
26
5
  font-size: 48px;
27
6
  line-height: 64px;
28
7
  font-weight: 700;
@@ -1,5 +1,3 @@
1
- /* */
2
-
3
1
  .component {
4
2
  margin: var(--gap-0);
5
3
  padding: var(--gap-0)
@@ -1,10 +1,8 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { HTMLAttributes } from "react";
4
- import { TextSkeletonProps } from "@alfalab/core-components-skeleton";
5
- import { Color } from "../colors";
6
- type NativeProps = HTMLAttributes<HTMLHeadingElement>;
7
- type TitleProps = Omit<NativeProps, 'color'> & {
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { type TextSkeletonProps } from '@alfalab/core-components-skeleton';
3
+ import { Color } from '../colors';
4
+ declare type NativeProps = HTMLAttributes<HTMLHeadingElement>;
5
+ export declare type TitleProps = Omit<NativeProps, 'color'> & {
8
6
  /**
9
7
  * HTML тег
10
8
  */
@@ -61,14 +59,14 @@ type TitleProps = Omit<NativeProps, 'color'> & {
61
59
  */
62
60
  defaultMatchMediaValue?: boolean | (() => boolean);
63
61
  };
64
- type PrivateProps = {
62
+ declare type PrivateProps = {
65
63
  styles: {
66
64
  [key: string]: string;
67
65
  };
68
66
  platform: 'mobile' | 'desktop';
69
67
  };
70
- type TitleElementType = HTMLHeadingElement | HTMLDivElement;
71
- declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "color"> & {
68
+ declare type TitleElementType = HTMLHeadingElement | HTMLDivElement;
69
+ export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "color"> & {
72
70
  /**
73
71
  * HTML тег
74
72
  */
@@ -76,7 +74,7 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
76
74
  /**
77
75
  * [Вариант начертания](?path=/docs/guidelines-typography--page)
78
76
  */
79
- view?: "small" | "medium" | "xlarge" | "large" | "xsmall" | undefined;
77
+ view?: "medium" | "small" | "xlarge" | "large" | "xsmall" | undefined;
80
78
  /**
81
79
  * Цвет текста
82
80
  */
@@ -84,7 +82,7 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
84
82
  /**
85
83
  * Толщина шрифта
86
84
  */
87
- weight?: "bold" | "regular" | "medium" | "semibold" | undefined;
85
+ weight?: "regular" | "medium" | "bold" | "semibold" | undefined;
88
86
  /**
89
87
  * Шрифт текста
90
88
  */
@@ -111,7 +109,7 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
111
109
  /**
112
110
  * Количество строк
113
111
  */
114
- rowLimit?: 2 | 1 | 3 | undefined;
112
+ rowLimit?: 1 | 2 | 3 | undefined;
115
113
  /**
116
114
  * Показать скелетон
117
115
  */
@@ -125,4 +123,4 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
125
123
  */
126
124
  defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
127
125
  } & PrivateProps & React.RefAttributes<TitleElementType>>;
128
- export { TitleProps, TitleBase };
126
+ export {};
@@ -32,3 +32,4 @@ const TitleBase = forwardRef(({ tag: Component = 'div', view = 'medium', font: f
32
32
  });
33
33
 
34
34
  export { TitleBase };
35
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, 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 { Color } from '../colors';\n\nimport { getDefaultWeight } from './utils';\n\nimport colors from '../colors.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: fontProp = 'styrene',\n platform,\n weight = getDefaultWeight(isObject(fontProp) ? fontProp.font : fontProp, platform),\n defaultMargins = false,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n styles,\n skeletonProps,\n showSkeleton,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n let font: string;\n let systemCompat: boolean | undefined;\n\n if (isObject(fontProp)) {\n font = fontProp.font;\n systemCompat = fontProp.systemCompat;\n } else {\n font = fontProp;\n }\n\n return (\n <Component\n className={cn(\n styles.component,\n className,\n styles[`${font}-${view}`],\n defaultMargins && styles[`margins-${view}`],\n styles[weight],\n color && colors[color],\n {\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n [styles.systemCompat]: systemCompat,\n },\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;AA2FO,MAAM,SAAS,GAAG,UAAU,CAC/B,CACI,EACI,GAAG,EAAE,SAAS,GAAG,KAAK,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,EAAE,QAAQ,GAAG,SAAS,EAC1B,QAAQ,EACR,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,IAAI,GAAG,QAAQ,EAAE,QAAQ,CAAC,EAClF,cAAc,GAAG,KAAK,EACtB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,YAAY,EACZ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAE5E,MAAM,QAAQ,GAAG,cAAc,CAAC;QAC5B,gBAAgB,EAAE,EAAE,CAAC,cAAc,IAAI,MAAM,CAAC,CAAW,QAAA,EAAA,IAAI,CAAE,CAAA,CAAC,CAAC;QACjE,UAAU;AACb,KAAA,CAAC;AAEF,IAAA,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;AAClB;AAED,IAAA,IAAI,IAAY;AAChB,IAAA,IAAI,YAAiC;AAErC,IAAA,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAAE;AACpB,QAAA,IAAI,GAAG,QAAQ,CAAC,IAAI;AACpB,QAAA,YAAY,GAAG,QAAQ,CAAC,YAAY;AACvC;AAAM,SAAA;QACH,IAAI,GAAG,QAAQ;AAClB;AAED,IAAA,QACI,KAAC,CAAA,aAAA,CAAA,SAAS,IACN,SAAS,EAAE,EAAE,CACT,MAAM,CAAC,SAAS,EAChB,SAAS,EACT,MAAM,CAAC,CAAG,EAAA,IAAI,IAAI,IAAI,CAAA,CAAE,CAAC,EACzB,cAAc,IAAI,MAAM,CAAC,WAAW,IAAI,CAAA,CAAE,CAAC,EAC3C,MAAM,CAAC,MAAM,CAAC,EACd,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB;YACI,CAAC,MAAM,CAAC,CAAW,QAAA,EAAA,QAAQ,EAAE,CAAC,GAAG,QAAQ;AACzC,YAAA,CAAC,MAAM,CAAC,WAAW,GAAG,YAAY;AAClC,YAAA,CAAC,MAAM,CAAC,YAAY,GAAG,YAAY;AACtC,SAAA,CACJ,kBACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,GAAA,SAAS,IAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}