@alfalab/core-components-typography 6.0.7 → 6.0.8

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 (42) hide show
  1. package/colors.css +20 -20
  2. package/colors.module.css.js +1 -1
  3. package/cssm/title/component.d.ts +0 -4
  4. package/cssm/title/component.js.map +1 -1
  5. package/esm/colors.css +20 -20
  6. package/esm/colors.module.css.js +1 -1
  7. package/esm/text/index.css +40 -40
  8. package/esm/text/index.module.css.js +1 -1
  9. package/esm/title/common.css +5 -5
  10. package/esm/title/common.module.css.js +1 -1
  11. package/esm/title/component.d.ts +0 -4
  12. package/esm/title/component.js.map +1 -1
  13. package/esm/title/index.css +25 -25
  14. package/esm/title/index.module.css.js +1 -1
  15. package/esm/title-mobile/index.css +25 -25
  16. package/esm/title-mobile/index.module.css.js +1 -1
  17. package/modern/colors.css +20 -20
  18. package/modern/colors.module.css.js +1 -1
  19. package/modern/text/index.css +40 -40
  20. package/modern/text/index.module.css.js +1 -1
  21. package/modern/title/common.css +5 -5
  22. package/modern/title/common.module.css.js +1 -1
  23. package/modern/title/component.d.ts +0 -4
  24. package/modern/title/component.js.map +1 -1
  25. package/modern/title/index.css +25 -25
  26. package/modern/title/index.module.css.js +1 -1
  27. package/modern/title-mobile/index.css +25 -25
  28. package/modern/title-mobile/index.module.css.js +1 -1
  29. package/moderncssm/title/component.d.ts +0 -4
  30. package/moderncssm/title/component.js.map +1 -1
  31. package/package.json +1 -1
  32. package/src/title/component.tsx +0 -2
  33. package/text/index.css +40 -40
  34. package/text/index.module.css.js +1 -1
  35. package/title/common.css +5 -5
  36. package/title/common.module.css.js +1 -1
  37. package/title/component.d.ts +0 -4
  38. package/title/component.js.map +1 -1
  39. package/title/index.css +25 -25
  40. package/title/index.module.css.js +1 -1
  41. package/title-mobile/index.css +25 -25
  42. package/title-mobile/index.module.css.js +1 -1
package/colors.css CHANGED
@@ -20,63 +20,63 @@
20
20
  --color-static-text-tertiary-dark: rgba(5, 8, 29, 0.38);
21
21
  --color-static-text-tertiary-light: rgba(233, 233, 250, 0.37);
22
22
  }
23
- .typography__tertiary_lgmjt {
23
+ .typography__tertiary_188we {
24
24
  color: var(--color-light-text-tertiary);
25
25
  }
26
- .typography__disabled_lgmjt {
26
+ .typography__disabled_188we {
27
27
  color: var(--color-light-text-quaternary);
28
28
  }
29
- .typography__accent_lgmjt {
29
+ .typography__accent_188we {
30
30
  color: var(--color-light-accent-primary);
31
31
  }
32
- .typography__primary_lgmjt {
32
+ .typography__primary_188we {
33
33
  color: var(--color-light-text-primary);
34
34
  }
35
- .typography__attention_lgmjt {
35
+ .typography__attention_188we {
36
36
  color: var(--color-light-text-attention);
37
37
  }
38
- .typography__positive_lgmjt {
38
+ .typography__positive_188we {
39
39
  color: var(--color-light-text-positive);
40
40
  }
41
- .typography__secondary_lgmjt {
41
+ .typography__secondary_188we {
42
42
  color: var(--color-light-text-secondary);
43
43
  }
44
- .typography__tertiary-inverted_lgmjt {
44
+ .typography__tertiary-inverted_188we {
45
45
  color: var(--color-light-text-tertiary-inverted);
46
46
  }
47
- .typography__primary-inverted_lgmjt {
47
+ .typography__primary-inverted_188we {
48
48
  color: var(--color-light-text-primary-inverted);
49
49
  }
50
- .typography__secondary-inverted_lgmjt {
50
+ .typography__secondary-inverted_188we {
51
51
  color: var(--color-light-text-secondary-inverted);
52
52
  }
53
- .typography__link_lgmjt {
53
+ .typography__link_188we {
54
54
  color: var(--color-light-text-info);
55
55
  }
56
- .typography__negative_lgmjt {
56
+ .typography__negative_188we {
57
57
  color: var(--color-light-text-negative);
58
58
  }
59
- .typography__static-primary-light_lgmjt {
59
+ .typography__static-primary-light_188we {
60
60
  color: var(--color-static-text-primary-light);
61
61
  }
62
- .typography__static-secondary-light_lgmjt {
62
+ .typography__static-secondary-light_188we {
63
63
  color: var(--color-static-text-secondary-light);
64
64
  }
65
- .typography__static-tertiary-light_lgmjt {
65
+ .typography__static-tertiary-light_188we {
66
66
  color: var(--color-static-text-tertiary-light);
67
67
  }
68
- .typography__static-primary-dark_lgmjt {
68
+ .typography__static-primary-dark_188we {
69
69
  color: var(--color-static-text-primary-dark);
70
70
  }
71
- .typography__static-secondary-dark_lgmjt {
71
+ .typography__static-secondary-dark_188we {
72
72
  color: var(--color-static-text-secondary-dark);
73
73
  }
74
- .typography__static-tertiary-dark_lgmjt {
74
+ .typography__static-tertiary-dark_188we {
75
75
  color: var(--color-static-text-tertiary-dark);
76
76
  }
77
- .typography__static-accent_lgmjt {
77
+ .typography__static-accent_188we {
78
78
  color: var(--color-static-accent-primary);
79
79
  }
80
- .typography__static-positive_lgmjt {
80
+ .typography__static-positive_188we {
81
81
  color: var(--color-static-text-positive);
82
82
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./colors.css');
4
4
 
5
- var colors = {"tertiary":"typography__tertiary_lgmjt","disabled":"typography__disabled_lgmjt","accent":"typography__accent_lgmjt","primary":"typography__primary_lgmjt","attention":"typography__attention_lgmjt","positive":"typography__positive_lgmjt","secondary":"typography__secondary_lgmjt","tertiary-inverted":"typography__tertiary-inverted_lgmjt","primary-inverted":"typography__primary-inverted_lgmjt","secondary-inverted":"typography__secondary-inverted_lgmjt","link":"typography__link_lgmjt","negative":"typography__negative_lgmjt","static-primary-light":"typography__static-primary-light_lgmjt","static-secondary-light":"typography__static-secondary-light_lgmjt","static-tertiary-light":"typography__static-tertiary-light_lgmjt","static-primary-dark":"typography__static-primary-dark_lgmjt","static-secondary-dark":"typography__static-secondary-dark_lgmjt","static-tertiary-dark":"typography__static-tertiary-dark_lgmjt","static-accent":"typography__static-accent_lgmjt","static-positive":"typography__static-positive_lgmjt"};
5
+ var colors = {"tertiary":"typography__tertiary_188we","disabled":"typography__disabled_188we","accent":"typography__accent_188we","primary":"typography__primary_188we","attention":"typography__attention_188we","positive":"typography__positive_188we","secondary":"typography__secondary_188we","tertiary-inverted":"typography__tertiary-inverted_188we","primary-inverted":"typography__primary-inverted_188we","secondary-inverted":"typography__secondary-inverted_188we","link":"typography__link_188we","negative":"typography__negative_188we","static-primary-light":"typography__static-primary-light_188we","static-secondary-light":"typography__static-secondary-light_188we","static-tertiary-light":"typography__static-tertiary-light_188we","static-primary-dark":"typography__static-primary-dark_188we","static-secondary-dark":"typography__static-secondary-dark_188we","static-tertiary-dark":"typography__static-tertiary-dark_188we","static-accent":"typography__static-accent_188we","static-positive":"typography__static-positive_188we"};
6
6
 
7
7
  module.exports = colors;
8
8
  //# sourceMappingURL=colors.module.css.js.map
@@ -21,8 +21,6 @@ export type TitleProps = Omit<NativeProps, 'color'> & {
21
21
  weight?: 'regular' | 'medium' | 'bold' | 'semibold';
22
22
  /**
23
23
  * Шрифт текста
24
- *
25
- * @deprecated
26
24
  */
27
25
  font?: 'styrene' | 'system' | 'alfasans' | {
28
26
  font: 'alfasans';
@@ -87,8 +85,6 @@ export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps
87
85
  weight?: "regular" | "medium" | "bold" | "semibold";
88
86
  /**
89
87
  * Шрифт текста
90
- *
91
- * @deprecated
92
88
  */
93
89
  font?: "styrene" | "system" | "alfasans" | {
94
90
  font: "alfasans";
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { isObject } from '@alfalab/core-components-shared';\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\n\nimport { getDefaultWeight } from './utils';\n\nimport colors from '../colors.module.css';\nimport commonStyles from './common.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLHeadingElement>;\n\nexport type TitleProps = Omit<NativeProps, 'color'> & {\n /**\n * HTML тег\n */\n tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';\n\n /**\n * [Вариант начертания](?path=/docs/guidelines-typography--page)\n */\n view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold' | 'semibold';\n\n /**\n * Шрифт текста\n *\n * @deprecated\n */\n font?: 'styrene' | 'system' | 'alfasans' | { font: 'alfasans'; systemCompat: boolean };\n\n /**\n * Добавляет отступы\n */\n defaultMargins?: boolean;\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n};\n\ntype PrivateProps = {\n styles: {\n [key: string]: string;\n };\n platform: 'mobile' | 'desktop';\n};\n\ntype TitleElementType = HTMLHeadingElement | HTMLDivElement;\n\nexport const TitleBase = forwardRef<TitleElementType, TitleProps & PrivateProps>(\n (\n {\n tag: Component = 'div',\n view = 'medium',\n font = 'styrene',\n platform,\n weight = getDefaultWeight(isObject(font) ? font.font : font, platform),\n defaultMargins = false,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n styles,\n skeletonProps,\n showSkeleton,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n className,\n styles[`${weight === 'regular' ? 'regular-' : ''}${view}`],\n defaultMargins && styles[`margins-${view}`],\n color && colors[color],\n {\n [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,\n [commonStyles.transparent]: showSkeleton,\n [styles.font]:\n (isObject(font) && !font.systemCompat) || !(font === 'system'),\n },\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":["forwardRef","getDefaultWeight","isObject","__rest","useSkeleton","cn","React","__assign","commonStyles","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IA8Fa,SAAS,GAAGA,gBAAU,CAC/B,UACI,EAgBC,EACD,GAAG,EAAA;;AAhBC,IAAA,IAAA,WAAsB,EAAjB,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,KAAA,EACtB,EAAA,GAAA,EAAA,CAAA,IAAe,EAAf,IAAI,mBAAG,QAAQ,GAAA,EAAA,EACf,EAAgB,GAAA,EAAA,CAAA,IAAA,EAAhB,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,GAAA,EAAA,EAChB,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,cAAsE,EAAtE,MAAM,mBAAGC,sBAAgB,CAACC,aAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,QAAQ,CAAC,GAAA,EAAA,EACtE,sBAAsB,EAAtB,cAAc,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,KAAA,EACtB,KAAK,WAAA,EACL,SAAS,eAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,aAAa,GAAA,EAAA,CAAA,aAAA,EACb,YAAY,GAAA,EAAA,CAAA,YAAA,EACT,SAAS,GAAAC,YAAA,CAAA,EAAA,EAfhB,sKAgBC,CADe;AAIV,IAAA,IAAA,EAA8B,GAAAC,kBAAW,CAAC,YAAY,EAAE,aAAa,CAAC,EAApE,cAAc,GAAA,EAAA,CAAA,cAAA,EAAE,OAAO,aAA6C;IAE5E,IAAM,QAAQ,GAAG,cAAc,CAAC;QAC5B,gBAAgB,EAAEC,mBAAE,CAAC,cAAc,IAAI,MAAM,CAAC,UAAW,CAAA,MAAA,CAAA,IAAI,CAAE,CAAC,CAAC;AACjE,QAAA,UAAU,EAAA,UAAA;AACb,KAAA,CAAC;IAEF,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;;IAGnB,QACIC,qCAAC,SAAS,EAAAC,cAAA,CAAA,EACN,SAAS,EAAEF,mBAAE,CACTG,6BAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,SAAS,EACT,MAAM,CAAC,EAAA,CAAA,MAAA,CAAG,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,SAAG,IAAI,CAAE,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,UAAA,CAAA,MAAA,CAAW,IAAI,CAAE,CAAC,EAC3C,KAAK,IAAIC,uBAAM,CAAC,KAAK,CAAC,GAAA,EAAA,GAAA,EAAA;AAElB,YAAA,EAAA,CAACD,6BAAY,CAAC,UAAA,CAAA,MAAA,CAAW,QAAQ,CAAE,CAAC,IAAG,QAAQ;AAC/C,YAAA,EAAA,CAACA,6BAAY,CAAC,WAAW,CAAA,GAAG,YAAY;YACxC,EAAC,CAAA,MAAM,CAAC,IAAI,CAAA,GACR,CAACN,aAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AAEzE,YAAA,EAAA,EAAA,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAEQ,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,EAAA,SAAS,GAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { isObject } from '@alfalab/core-components-shared';\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\n\nimport { getDefaultWeight } from './utils';\n\nimport colors from '../colors.module.css';\nimport commonStyles from './common.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLHeadingElement>;\n\nexport type TitleProps = Omit<NativeProps, 'color'> & {\n /**\n * HTML тег\n */\n tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';\n\n /**\n * [Вариант начертания](?path=/docs/guidelines-typography--page)\n */\n view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold' | 'semibold';\n\n /**\n * Шрифт текста\n */\n font?: 'styrene' | 'system' | 'alfasans' | { font: 'alfasans'; systemCompat: boolean };\n\n /**\n * Добавляет отступы\n */\n defaultMargins?: boolean;\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n};\n\ntype PrivateProps = {\n styles: {\n [key: string]: string;\n };\n platform: 'mobile' | 'desktop';\n};\n\ntype TitleElementType = HTMLHeadingElement | HTMLDivElement;\n\nexport const TitleBase = forwardRef<TitleElementType, TitleProps & PrivateProps>(\n (\n {\n tag: Component = 'div',\n view = 'medium',\n font = 'styrene',\n platform,\n weight = getDefaultWeight(isObject(font) ? font.font : font, platform),\n defaultMargins = false,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n styles,\n skeletonProps,\n showSkeleton,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n className,\n styles[`${weight === 'regular' ? 'regular-' : ''}${view}`],\n defaultMargins && styles[`margins-${view}`],\n color && colors[color],\n {\n [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,\n [commonStyles.transparent]: showSkeleton,\n [styles.font]:\n (isObject(font) && !font.systemCompat) || !(font === 'system'),\n },\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":["forwardRef","getDefaultWeight","isObject","__rest","useSkeleton","cn","React","__assign","commonStyles","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IA4Fa,SAAS,GAAGA,gBAAU,CAC/B,UACI,EAgBC,EACD,GAAG,EAAA;;AAhBC,IAAA,IAAA,WAAsB,EAAjB,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,KAAA,EACtB,EAAA,GAAA,EAAA,CAAA,IAAe,EAAf,IAAI,mBAAG,QAAQ,GAAA,EAAA,EACf,EAAgB,GAAA,EAAA,CAAA,IAAA,EAAhB,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,GAAA,EAAA,EAChB,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,cAAsE,EAAtE,MAAM,mBAAGC,sBAAgB,CAACC,aAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,QAAQ,CAAC,GAAA,EAAA,EACtE,sBAAsB,EAAtB,cAAc,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,KAAA,EACtB,KAAK,WAAA,E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A,GACR,CAACN,aAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AAEzE,YAAA,EAAA,EAAA,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAEQ,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,EAAA,SAAS,GAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
package/esm/colors.css CHANGED
@@ -20,63 +20,63 @@
20
20
  --color-static-text-tertiary-dark: rgba(5, 8, 29, 0.38);
21
21
  --color-static-text-tertiary-light: rgba(233, 233, 250, 0.37);
22
22
  }
23
- .typography__tertiary_lgmjt {
23
+ .typography__tertiary_188we {
24
24
  color: var(--color-light-text-tertiary);
25
25
  }
26
- .typography__disabled_lgmjt {
26
+ .typography__disabled_188we {
27
27
  color: var(--color-light-text-quaternary);
28
28
  }
29
- .typography__accent_lgmjt {
29
+ .typography__accent_188we {
30
30
  color: var(--color-light-accent-primary);
31
31
  }
32
- .typography__primary_lgmjt {
32
+ .typography__primary_188we {
33
33
  color: var(--color-light-text-primary);
34
34
  }
35
- .typography__attention_lgmjt {
35
+ .typography__attention_188we {
36
36
  color: var(--color-light-text-attention);
37
37
  }
38
- .typography__positive_lgmjt {
38
+ .typography__positive_188we {
39
39
  color: var(--color-light-text-positive);
40
40
  }
41
- .typography__secondary_lgmjt {
41
+ .typography__secondary_188we {
42
42
  color: var(--color-light-text-secondary);
43
43
  }
44
- .typography__tertiary-inverted_lgmjt {
44
+ .typography__tertiary-inverted_188we {
45
45
  color: var(--color-light-text-tertiary-inverted);
46
46
  }
47
- .typography__primary-inverted_lgmjt {
47
+ .typography__primary-inverted_188we {
48
48
  color: var(--color-light-text-primary-inverted);
49
49
  }
50
- .typography__secondary-inverted_lgmjt {
50
+ .typography__secondary-inverted_188we {
51
51
  color: var(--color-light-text-secondary-inverted);
52
52
  }
53
- .typography__link_lgmjt {
53
+ .typography__link_188we {
54
54
  color: var(--color-light-text-info);
55
55
  }
56
- .typography__negative_lgmjt {
56
+ .typography__negative_188we {
57
57
  color: var(--color-light-text-negative);
58
58
  }
59
- .typography__static-primary-light_lgmjt {
59
+ .typography__static-primary-light_188we {
60
60
  color: var(--color-static-text-primary-light);
61
61
  }
62
- .typography__static-secondary-light_lgmjt {
62
+ .typography__static-secondary-light_188we {
63
63
  color: var(--color-static-text-secondary-light);
64
64
  }
65
- .typography__static-tertiary-light_lgmjt {
65
+ .typography__static-tertiary-light_188we {
66
66
  color: var(--color-static-text-tertiary-light);
67
67
  }
68
- .typography__static-primary-dark_lgmjt {
68
+ .typography__static-primary-dark_188we {
69
69
  color: var(--color-static-text-primary-dark);
70
70
  }
71
- .typography__static-secondary-dark_lgmjt {
71
+ .typography__static-secondary-dark_188we {
72
72
  color: var(--color-static-text-secondary-dark);
73
73
  }
74
- .typography__static-tertiary-dark_lgmjt {
74
+ .typography__static-tertiary-dark_188we {
75
75
  color: var(--color-static-text-tertiary-dark);
76
76
  }
77
- .typography__static-accent_lgmjt {
77
+ .typography__static-accent_188we {
78
78
  color: var(--color-static-accent-primary);
79
79
  }
80
- .typography__static-positive_lgmjt {
80
+ .typography__static-positive_188we {
81
81
  color: var(--color-static-text-positive);
82
82
  }
@@ -1,6 +1,6 @@
1
1
  import './colors.css';
2
2
 
3
- var colors = {"tertiary":"typography__tertiary_lgmjt","disabled":"typography__disabled_lgmjt","accent":"typography__accent_lgmjt","primary":"typography__primary_lgmjt","attention":"typography__attention_lgmjt","positive":"typography__positive_lgmjt","secondary":"typography__secondary_lgmjt","tertiary-inverted":"typography__tertiary-inverted_lgmjt","primary-inverted":"typography__primary-inverted_lgmjt","secondary-inverted":"typography__secondary-inverted_lgmjt","link":"typography__link_lgmjt","negative":"typography__negative_lgmjt","static-primary-light":"typography__static-primary-light_lgmjt","static-secondary-light":"typography__static-secondary-light_lgmjt","static-tertiary-light":"typography__static-tertiary-light_lgmjt","static-primary-dark":"typography__static-primary-dark_lgmjt","static-secondary-dark":"typography__static-secondary-dark_lgmjt","static-tertiary-dark":"typography__static-tertiary-dark_lgmjt","static-accent":"typography__static-accent_lgmjt","static-positive":"typography__static-positive_lgmjt"};
3
+ var colors = {"tertiary":"typography__tertiary_188we","disabled":"typography__disabled_188we","accent":"typography__accent_188we","primary":"typography__primary_188we","attention":"typography__attention_188we","positive":"typography__positive_188we","secondary":"typography__secondary_188we","tertiary-inverted":"typography__tertiary-inverted_188we","primary-inverted":"typography__primary-inverted_188we","secondary-inverted":"typography__secondary-inverted_188we","link":"typography__link_188we","negative":"typography__negative_188we","static-primary-light":"typography__static-primary-light_188we","static-secondary-light":"typography__static-secondary-light_188we","static-tertiary-light":"typography__static-tertiary-light_188we","static-primary-dark":"typography__static-primary-dark_188we","static-secondary-dark":"typography__static-secondary-dark_188we","static-tertiary-dark":"typography__static-tertiary-dark_188we","static-accent":"typography__static-accent_188we","static-positive":"typography__static-positive_188we"};
4
4
 
5
5
  export { colors as default };
6
6
  //# sourceMappingURL=colors.module.css.js.map
@@ -7,33 +7,33 @@
7
7
  --font-family-system:
8
8
  system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
9
9
  }
10
- .typography__transparent_knen6 {
10
+ .typography__transparent_16x2a {
11
11
  opacity: 0;
12
12
  }
13
13
  :root {
14
14
  --text-paragraph-margin-bottom: var(--gap-0) var(--gap-0) var(--gap-12);
15
15
  }
16
- .typography__paragraph_knen6 {
16
+ .typography__paragraph_16x2a {
17
17
  margin: var(--gap-0);
18
18
  padding: var(--gap-0);
19
19
  }
20
- .typography__paragraphWithMargins_knen6 {
20
+ .typography__paragraphWithMargins_16x2a {
21
21
  padding: var(--gap-0);
22
22
  margin: var(--text-paragraph-margin-bottom);
23
23
  }
24
- .typography__component_knen6 {
24
+ .typography__component_16x2a {
25
25
  font-size: 16px;
26
26
  line-height: 20px;
27
27
  font-weight: 400;
28
28
  font-family: var(--font-family-system);
29
29
  }
30
- .typography__component_knen6.typography__bold_knen6 {
30
+ .typography__component_16x2a.typography__bold_16x2a {
31
31
  font-weight: 700;
32
32
  }
33
- .typography__component_knen6.typography__medium_knen6 {
33
+ .typography__component_16x2a.typography__medium_16x2a {
34
34
  font-weight: 500;
35
35
  }
36
- .typography__caps_knen6 {
36
+ .typography__caps_16x2a {
37
37
  font-size: 12px;
38
38
  line-height: 16px;
39
39
  font-weight: 400;
@@ -41,13 +41,13 @@
41
41
  text-transform: uppercase;
42
42
  font-family: var(--font-family-system);
43
43
  }
44
- .typography__caps_knen6.typography__bold_knen6 {
44
+ .typography__caps_16x2a.typography__bold_16x2a {
45
45
  font-weight: 700;
46
46
  }
47
- .typography__caps_knen6.typography__medium_knen6 {
47
+ .typography__caps_16x2a.typography__medium_16x2a {
48
48
  font-weight: 500;
49
49
  }
50
- .typography__tagline_knen6 {
50
+ .typography__tagline_16x2a {
51
51
  font-size: 12px;
52
52
  line-height: 16px;
53
53
  font-weight: 400;
@@ -55,128 +55,128 @@
55
55
  text-transform: uppercase;
56
56
  font-family: var(--font-family-system);
57
57
  }
58
- .typography__tagline_knen6.typography__bold_knen6 {
58
+ .typography__tagline_16x2a.typography__bold_16x2a {
59
59
  font-weight: 700;
60
60
  }
61
- .typography__tagline_knen6.typography__medium_knen6 {
61
+ .typography__tagline_16x2a.typography__medium_16x2a {
62
62
  font-weight: 500;
63
63
  }
64
- .typography__primary-large_knen6 {
64
+ .typography__primary-large_16x2a {
65
65
  font-size: 18px;
66
66
  line-height: 24px;
67
67
  font-weight: 400;
68
68
  font-family: var(--font-family-system);
69
69
  }
70
- .typography__primary-large_knen6.typography__bold_knen6 {
70
+ .typography__primary-large_16x2a.typography__bold_16x2a {
71
71
  font-weight: 700;
72
72
  }
73
- .typography__primary-large_knen6.typography__medium_knen6 {
73
+ .typography__primary-large_16x2a.typography__medium_16x2a {
74
74
  font-weight: 500;
75
75
  }
76
- .typography__primary-medium_knen6 {
76
+ .typography__primary-medium_16x2a {
77
77
  font-size: 16px;
78
78
  line-height: 24px;
79
79
  font-weight: 400;
80
80
  font-family: var(--font-family-system);
81
81
  }
82
- .typography__primary-medium_knen6.typography__bold_knen6 {
82
+ .typography__primary-medium_16x2a.typography__bold_16x2a {
83
83
  font-weight: 700;
84
84
  }
85
- .typography__primary-medium_knen6.typography__medium_knen6 {
85
+ .typography__primary-medium_16x2a.typography__medium_16x2a {
86
86
  font-weight: 500;
87
87
  }
88
- .typography__primary-small_knen6 {
88
+ .typography__primary-small_16x2a {
89
89
  font-size: 14px;
90
90
  line-height: 20px;
91
91
  font-weight: 400;
92
92
  font-family: var(--font-family-system);
93
93
  }
94
- .typography__primary-small_knen6.typography__bold_knen6 {
94
+ .typography__primary-small_16x2a.typography__bold_16x2a {
95
95
  font-weight: 700;
96
96
  }
97
- .typography__primary-small_knen6.typography__medium_knen6 {
97
+ .typography__primary-small_16x2a.typography__medium_16x2a {
98
98
  font-weight: 500;
99
99
  }
100
- .typography__component-primary_knen6 {
100
+ .typography__component-primary_16x2a {
101
101
  font-size: 16px;
102
102
  line-height: 20px;
103
103
  font-weight: 400;
104
104
  font-family: var(--font-family-system);
105
105
  }
106
- .typography__component-primary_knen6.typography__bold_knen6 {
106
+ .typography__component-primary_16x2a.typography__bold_16x2a {
107
107
  font-weight: 700;
108
108
  }
109
- .typography__component-primary_knen6.typography__medium_knen6 {
109
+ .typography__component-primary_16x2a.typography__medium_16x2a {
110
110
  font-weight: 500;
111
111
  }
112
- .typography__secondary-large_knen6 {
112
+ .typography__secondary-large_16x2a {
113
113
  font-size: 13px;
114
114
  line-height: 16px;
115
115
  font-weight: 400;
116
116
  font-family: var(--font-family-system);
117
117
  }
118
- .typography__secondary-large_knen6.typography__bold_knen6 {
118
+ .typography__secondary-large_16x2a.typography__bold_16x2a {
119
119
  font-weight: 700;
120
120
  }
121
- .typography__secondary-large_knen6.typography__medium_knen6 {
121
+ .typography__secondary-large_16x2a.typography__medium_16x2a {
122
122
  font-weight: 500;
123
123
  }
124
- .typography__secondary-medium_knen6 {
124
+ .typography__secondary-medium_16x2a {
125
125
  font-size: 12px;
126
126
  line-height: 16px;
127
127
  font-weight: 400;
128
128
  font-family: var(--font-family-system);
129
129
  }
130
- .typography__secondary-medium_knen6.typography__bold_knen6 {
130
+ .typography__secondary-medium_16x2a.typography__bold_16x2a {
131
131
  font-weight: 700;
132
132
  }
133
- .typography__secondary-medium_knen6.typography__medium_knen6 {
133
+ .typography__secondary-medium_16x2a.typography__medium_16x2a {
134
134
  font-weight: 500;
135
135
  }
136
- .typography__secondary-small_knen6 {
136
+ .typography__secondary-small_16x2a {
137
137
  font-size: 11px;
138
138
  line-height: 16px;
139
139
  font-weight: 400;
140
140
  font-family: var(--font-family-system);
141
141
  }
142
- .typography__secondary-small_knen6.typography__bold_knen6 {
142
+ .typography__secondary-small_16x2a.typography__bold_16x2a {
143
143
  font-weight: 700;
144
144
  }
145
- .typography__secondary-small_knen6.typography__medium_knen6 {
145
+ .typography__secondary-small_16x2a.typography__medium_16x2a {
146
146
  font-weight: 500;
147
147
  }
148
- .typography__component-secondary_knen6 {
148
+ .typography__component-secondary_16x2a {
149
149
  font-size: 14px;
150
150
  line-height: 18px;
151
151
  font-weight: 400;
152
152
  font-family: var(--font-family-system);
153
153
  }
154
- .typography__component-secondary_knen6.typography__bold_knen6 {
154
+ .typography__component-secondary_16x2a.typography__bold_16x2a {
155
155
  font-weight: 700;
156
156
  }
157
- .typography__component-secondary_knen6.typography__medium_knen6 {
157
+ .typography__component-secondary_16x2a.typography__medium_16x2a {
158
158
  font-weight: 500;
159
159
  }
160
- .typography__rowLimit1_knen6 {
160
+ .typography__rowLimit1_16x2a {
161
161
  -webkit-line-clamp: 1;
162
162
  display: -webkit-box;
163
163
  -webkit-box-orient: vertical;
164
164
  overflow: hidden;
165
165
  word-break: break-all;
166
166
  }
167
- .typography__rowLimit2_knen6 {
167
+ .typography__rowLimit2_16x2a {
168
168
  -webkit-line-clamp: 2;
169
169
  display: -webkit-box;
170
170
  -webkit-box-orient: vertical;
171
171
  overflow: hidden;
172
172
  }
173
- .typography__rowLimit3_knen6 {
173
+ .typography__rowLimit3_16x2a {
174
174
  -webkit-line-clamp: 3;
175
175
  display: -webkit-box;
176
176
  -webkit-box-orient: vertical;
177
177
  overflow: hidden;
178
178
  }
179
- .typography__monospace_knen6 {
179
+ .typography__monospace_16x2a {
180
180
  font-feature-settings: "tnum";
181
181
  font-variant-numeric: tabular-nums;
182
182
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"transparent":"typography__transparent_knen6","paragraph":"typography__paragraph_knen6","paragraphWithMargins":"typography__paragraphWithMargins_knen6","component":"typography__component_knen6","bold":"typography__bold_knen6","medium":"typography__medium_knen6","caps":"typography__caps_knen6","tagline":"typography__tagline_knen6","primary-large":"typography__primary-large_knen6","primary-medium":"typography__primary-medium_knen6","primary-small":"typography__primary-small_knen6","component-primary":"typography__component-primary_knen6","secondary-large":"typography__secondary-large_knen6","secondary-medium":"typography__secondary-medium_knen6","secondary-small":"typography__secondary-small_knen6","component-secondary":"typography__component-secondary_knen6","rowLimit1":"typography__rowLimit1_knen6","rowLimit2":"typography__rowLimit2_knen6","rowLimit3":"typography__rowLimit3_knen6","monospace":"typography__monospace_knen6"};
3
+ var styles = {"transparent":"typography__transparent_16x2a","paragraph":"typography__paragraph_16x2a","paragraphWithMargins":"typography__paragraphWithMargins_16x2a","component":"typography__component_16x2a","bold":"typography__bold_16x2a","medium":"typography__medium_16x2a","caps":"typography__caps_16x2a","tagline":"typography__tagline_16x2a","primary-large":"typography__primary-large_16x2a","primary-medium":"typography__primary-medium_16x2a","primary-small":"typography__primary-small_16x2a","component-primary":"typography__component-primary_16x2a","secondary-large":"typography__secondary-large_16x2a","secondary-medium":"typography__secondary-medium_16x2a","secondary-small":"typography__secondary-small_16x2a","component-secondary":"typography__component-secondary_16x2a","rowLimit1":"typography__rowLimit1_16x2a","rowLimit2":"typography__rowLimit2_16x2a","rowLimit3":"typography__rowLimit3_16x2a","monospace":"typography__monospace_16x2a"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1,27 +1,27 @@
1
1
  :root {
2
2
  --gap-0: 0px;
3
3
  }
4
- .typography__transparent_1cokz {
4
+ .typography__transparent_1adal {
5
5
  opacity: 0;
6
6
  }
7
- .typography__component_1cokz {
7
+ .typography__component_1adal {
8
8
  margin: var(--gap-0);
9
9
  padding: var(--gap-0);
10
10
  }
11
- .typography__rowLimit1_1cokz {
11
+ .typography__rowLimit1_1adal {
12
12
  -webkit-line-clamp: 1;
13
13
  display: -webkit-box;
14
14
  -webkit-box-orient: vertical;
15
15
  overflow: hidden;
16
16
  word-break: break-all;
17
17
  }
18
- .typography__rowLimit2_1cokz {
18
+ .typography__rowLimit2_1adal {
19
19
  -webkit-line-clamp: 2;
20
20
  display: -webkit-box;
21
21
  -webkit-box-orient: vertical;
22
22
  overflow: hidden;
23
23
  }
24
- .typography__rowLimit3_1cokz {
24
+ .typography__rowLimit3_1adal {
25
25
  -webkit-line-clamp: 3;
26
26
  display: -webkit-box;
27
27
  -webkit-box-orient: vertical;
@@ -1,6 +1,6 @@
1
1
  import './common.css';
2
2
 
3
- var commonStyles = {"transparent":"typography__transparent_1cokz","component":"typography__component_1cokz","rowLimit1":"typography__rowLimit1_1cokz","rowLimit2":"typography__rowLimit2_1cokz","rowLimit3":"typography__rowLimit3_1cokz"};
3
+ var commonStyles = {"transparent":"typography__transparent_1adal","component":"typography__component_1adal","rowLimit1":"typography__rowLimit1_1adal","rowLimit2":"typography__rowLimit2_1adal","rowLimit3":"typography__rowLimit3_1adal"};
4
4
 
5
5
  export { commonStyles as default };
6
6
  //# sourceMappingURL=common.module.css.js.map
@@ -21,8 +21,6 @@ export type TitleProps = Omit<NativeProps, 'color'> & {
21
21
  weight?: 'regular' | 'medium' | 'bold' | 'semibold';
22
22
  /**
23
23
  * Шрифт текста
24
- *
25
- * @deprecated
26
24
  */
27
25
  font?: 'styrene' | 'system' | 'alfasans' | {
28
26
  font: 'alfasans';
@@ -87,8 +85,6 @@ export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps
87
85
  weight?: "regular" | "medium" | "bold" | "semibold";
88
86
  /**
89
87
  * Шрифт текста
90
- *
91
- * @deprecated
92
88
  */
93
89
  font?: "styrene" | "system" | "alfasans" | {
94
90
  font: "alfasans";
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { isObject } from '@alfalab/core-components-shared';\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\n\nimport { getDefaultWeight } from './utils';\n\nimport colors from '../colors.module.css';\nimport commonStyles from './common.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLHeadingElement>;\n\nexport type TitleProps = Omit<NativeProps, 'color'> & {\n /**\n * HTML тег\n */\n tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';\n\n /**\n * [Вариант начертания](?path=/docs/guidelines-typography--page)\n */\n view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold' | 'semibold';\n\n /**\n * Шрифт текста\n *\n * @deprecated\n */\n font?: 'styrene' | 'system' | 'alfasans' | { font: 'alfasans'; systemCompat: boolean };\n\n /**\n * Добавляет отступы\n */\n defaultMargins?: boolean;\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n};\n\ntype PrivateProps = {\n styles: {\n [key: string]: string;\n };\n platform: 'mobile' | 'desktop';\n};\n\ntype TitleElementType = HTMLHeadingElement | HTMLDivElement;\n\nexport const TitleBase = forwardRef<TitleElementType, TitleProps & PrivateProps>(\n (\n {\n tag: Component = 'div',\n view = 'medium',\n font = 'styrene',\n platform,\n weight = getDefaultWeight(isObject(font) ? font.font : font, platform),\n defaultMargins = false,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n styles,\n skeletonProps,\n showSkeleton,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n className,\n styles[`${weight === 'regular' ? 'regular-' : ''}${view}`],\n defaultMargins && styles[`margins-${view}`],\n color && colors[color],\n {\n [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,\n [commonStyles.transparent]: showSkeleton,\n [styles.font]:\n (isObject(font) && !font.systemCompat) || !(font === 'system'),\n },\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;IA8Fa,SAAS,GAAG,UAAU,CAC/B,UACI,EAgBC,EACD,GAAG,EAAA;;AAhBC,IAAA,IAAA,WAAsB,EAAjB,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,KAAA,EACtB,EAAA,GAAA,EAAA,CAAA,IAAe,EAAf,IAAI,mBAAG,QAAQ,GAAA,EAAA,EACf,EAAgB,GAAA,EAAA,CAAA,IAAA,EAAhB,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,G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C3C,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,GAAA,EAAA,GAAA,EAAA;AAElB,YAAA,EAAA,CAAC,YAAY,CAAC,UAAA,CAAA,MAAA,CAAW,QAAQ,CAAE,CAAC,IAAG,QAAQ;AAC/C,YAAA,EAAA,CAAC,YAAY,CAAC,WAAW,CAAA,GAAG,YAAY;YACxC,EAAC,CAAA,MAAM,CAAC,IAAI,CAAA,GACR,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AAEzE,YAAA,EAAA,EAAA,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,EAAA,SAAS,GAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { isObject } from '@alfalab/core-components-shared';\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\n\nimport { getDefaultWeight } from './utils';\n\nimport colors from '../colors.module.css';\nimport commonStyles from './common.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLHeadingElement>;\n\nexport type TitleProps = Omit<NativeProps, 'color'> & {\n /**\n * HTML тег\n */\n tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';\n\n /**\n * [Вариант начертания](?path=/docs/guidelines-typography--page)\n */\n view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold' | 'semibold';\n\n /**\n * Шрифт текста\n */\n font?: 'styrene' | 'system' | 'alfasans' | { font: 'alfasans'; systemCompat: boolean };\n\n /**\n * Добавляет отступы\n */\n defaultMargins?: boolean;\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n};\n\ntype PrivateProps = {\n styles: {\n [key: string]: string;\n };\n platform: 'mobile' | 'desktop';\n};\n\ntype TitleElementType = HTMLHeadingElement | HTMLDivElement;\n\nexport const TitleBase = forwardRef<TitleElementType, TitleProps & PrivateProps>(\n (\n {\n tag: Component = 'div',\n view = 'medium',\n font = 'styrene',\n platform,\n weight = getDefaultWeight(isObject(font) ? font.font : font, platform),\n defaultMargins = false,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n styles,\n skeletonProps,\n showSkeleton,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n className,\n styles[`${weight === 'regular' ? 'regular-' : ''}${view}`],\n defaultMargins && styles[`margins-${view}`],\n color && colors[color],\n {\n [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,\n [commonStyles.transparent]: showSkeleton,\n [styles.font]:\n (isObject(font) && !font.systemCompat) || !(font === 'system'),\n },\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;IA4Fa,SAAS,GAAG,UA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