@alfalab/core-components-typography 6.0.2 → 6.0.3

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 (103) hide show
  1. package/colors.css +20 -20
  2. package/colors.d.ts +1 -1
  3. package/colors.module.css.js +1 -1
  4. package/colors.module.css.js.map +1 -1
  5. package/cssm/colors.d.ts +1 -1
  6. package/cssm/text/component.d.ts +4 -4
  7. package/cssm/text/component.js.map +1 -1
  8. package/cssm/title/component.d.ts +18 -18
  9. package/cssm/title/component.js.map +1 -1
  10. package/cssm/title/index.d.ts +13 -13
  11. package/cssm/title/utils.js.map +1 -1
  12. package/cssm/title-mobile/component.d.ts +13 -13
  13. package/cssm/title-responsive/component.d.ts +16 -16
  14. package/cssm/types.d.ts +1 -1
  15. package/esm/colors.css +20 -20
  16. package/esm/colors.d.ts +1 -1
  17. package/esm/colors.module.css.js +1 -1
  18. package/esm/colors.module.css.js.map +1 -1
  19. package/esm/text/component.d.ts +4 -4
  20. package/esm/text/component.js.map +1 -1
  21. package/esm/text/index.css +40 -40
  22. package/esm/text/index.module.css.js +1 -1
  23. package/esm/text/index.module.css.js.map +1 -1
  24. package/esm/title/common.css +5 -5
  25. package/esm/title/common.module.css.js +1 -1
  26. package/esm/title/common.module.css.js.map +1 -1
  27. package/esm/title/component.d.ts +18 -18
  28. package/esm/title/component.js.map +1 -1
  29. package/esm/title/index.css +25 -25
  30. package/esm/title/index.d.ts +13 -13
  31. package/esm/title/index.module.css.js +1 -1
  32. package/esm/title/index.module.css.js.map +1 -1
  33. package/esm/title/utils.js.map +1 -1
  34. package/esm/title-mobile/component.d.ts +13 -13
  35. package/esm/title-mobile/index.css +25 -25
  36. package/esm/title-mobile/index.module.css.js +1 -1
  37. package/esm/title-mobile/index.module.css.js.map +1 -1
  38. package/esm/title-responsive/component.d.ts +16 -16
  39. package/esm/types.d.ts +1 -1
  40. package/modern/colors.css +20 -20
  41. package/modern/colors.d.ts +1 -1
  42. package/modern/colors.module.css.js +1 -1
  43. package/modern/colors.module.css.js.map +1 -1
  44. package/modern/text/component.d.ts +4 -4
  45. package/modern/text/component.js.map +1 -1
  46. package/modern/text/index.css +40 -40
  47. package/modern/text/index.module.css.js +1 -1
  48. package/modern/text/index.module.css.js.map +1 -1
  49. package/modern/title/common.css +5 -5
  50. package/modern/title/common.module.css.js +1 -1
  51. package/modern/title/common.module.css.js.map +1 -1
  52. package/modern/title/component.d.ts +18 -18
  53. package/modern/title/component.js.map +1 -1
  54. package/modern/title/index.css +25 -25
  55. package/modern/title/index.d.ts +13 -13
  56. package/modern/title/index.module.css.js +1 -1
  57. package/modern/title/index.module.css.js.map +1 -1
  58. package/modern/title/utils.js.map +1 -1
  59. package/modern/title-mobile/component.d.ts +13 -13
  60. package/modern/title-mobile/index.css +25 -25
  61. package/modern/title-mobile/index.module.css.js +1 -1
  62. package/modern/title-mobile/index.module.css.js.map +1 -1
  63. package/modern/title-responsive/component.d.ts +16 -16
  64. package/modern/types.d.ts +1 -1
  65. package/moderncssm/colors.d.ts +1 -1
  66. package/moderncssm/text/component.d.ts +4 -4
  67. package/moderncssm/text/component.js.map +1 -1
  68. package/moderncssm/title/component.d.ts +18 -18
  69. package/moderncssm/title/component.js.map +1 -1
  70. package/moderncssm/title/index.d.ts +13 -13
  71. package/moderncssm/title/index.module.css +3 -3
  72. package/moderncssm/title/utils.js.map +1 -1
  73. package/moderncssm/title-mobile/component.d.ts +13 -13
  74. package/moderncssm/title-mobile/index.module.css +3 -3
  75. package/moderncssm/title-responsive/component.d.ts +16 -16
  76. package/moderncssm/types.d.ts +1 -1
  77. package/package.json +6 -6
  78. package/src/colors.module.css +1 -1
  79. package/src/text/index.module.css +1 -1
  80. package/src/title/common.module.css +1 -1
  81. package/src/title/index.module.css +1 -1
  82. package/src/title-mobile/index.module.css +1 -1
  83. package/text/component.d.ts +4 -4
  84. package/text/component.js.map +1 -1
  85. package/text/index.css +40 -40
  86. package/text/index.module.css.js +1 -1
  87. package/text/index.module.css.js.map +1 -1
  88. package/title/common.css +5 -5
  89. package/title/common.module.css.js +1 -1
  90. package/title/common.module.css.js.map +1 -1
  91. package/title/component.d.ts +18 -18
  92. package/title/component.js.map +1 -1
  93. package/title/index.css +25 -25
  94. package/title/index.d.ts +13 -13
  95. package/title/index.module.css.js +1 -1
  96. package/title/index.module.css.js.map +1 -1
  97. package/title/utils.js.map +1 -1
  98. package/title-mobile/component.d.ts +13 -13
  99. package/title-mobile/index.css +25 -25
  100. package/title-mobile/index.module.css.js +1 -1
  101. package/title-mobile/index.module.css.js.map +1 -1
  102. package/title-responsive/component.d.ts +16 -16
  103. package/types.d.ts +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_68na9 {
23
+ .typography__tertiary_103ve {
24
24
  color: var(--color-light-text-tertiary);
25
25
  }
26
- .typography__disabled_68na9 {
26
+ .typography__disabled_103ve {
27
27
  color: var(--color-light-text-quaternary);
28
28
  }
29
- .typography__accent_68na9 {
29
+ .typography__accent_103ve {
30
30
  color: var(--color-light-accent-primary);
31
31
  }
32
- .typography__primary_68na9 {
32
+ .typography__primary_103ve {
33
33
  color: var(--color-light-text-primary);
34
34
  }
35
- .typography__attention_68na9 {
35
+ .typography__attention_103ve {
36
36
  color: var(--color-light-text-attention);
37
37
  }
38
- .typography__positive_68na9 {
38
+ .typography__positive_103ve {
39
39
  color: var(--color-light-text-positive);
40
40
  }
41
- .typography__secondary_68na9 {
41
+ .typography__secondary_103ve {
42
42
  color: var(--color-light-text-secondary);
43
43
  }
44
- .typography__tertiary-inverted_68na9 {
44
+ .typography__tertiary-inverted_103ve {
45
45
  color: var(--color-light-text-tertiary-inverted);
46
46
  }
47
- .typography__primary-inverted_68na9 {
47
+ .typography__primary-inverted_103ve {
48
48
  color: var(--color-light-text-primary-inverted);
49
49
  }
50
- .typography__secondary-inverted_68na9 {
50
+ .typography__secondary-inverted_103ve {
51
51
  color: var(--color-light-text-secondary-inverted);
52
52
  }
53
- .typography__link_68na9 {
53
+ .typography__link_103ve {
54
54
  color: var(--color-light-text-info);
55
55
  }
56
- .typography__negative_68na9 {
56
+ .typography__negative_103ve {
57
57
  color: var(--color-light-text-negative);
58
58
  }
59
- .typography__static-primary-light_68na9 {
59
+ .typography__static-primary-light_103ve {
60
60
  color: var(--color-static-text-primary-light);
61
61
  }
62
- .typography__static-secondary-light_68na9 {
62
+ .typography__static-secondary-light_103ve {
63
63
  color: var(--color-static-text-secondary-light);
64
64
  }
65
- .typography__static-tertiary-light_68na9 {
65
+ .typography__static-tertiary-light_103ve {
66
66
  color: var(--color-static-text-tertiary-light);
67
67
  }
68
- .typography__static-primary-dark_68na9 {
68
+ .typography__static-primary-dark_103ve {
69
69
  color: var(--color-static-text-primary-dark);
70
70
  }
71
- .typography__static-secondary-dark_68na9 {
71
+ .typography__static-secondary-dark_103ve {
72
72
  color: var(--color-static-text-secondary-dark);
73
73
  }
74
- .typography__static-tertiary-dark_68na9 {
74
+ .typography__static-tertiary-dark_103ve {
75
75
  color: var(--color-static-text-tertiary-dark);
76
76
  }
77
- .typography__static-accent_68na9 {
77
+ .typography__static-accent_103ve {
78
78
  color: var(--color-static-accent-primary);
79
79
  }
80
- .typography__static-positive_68na9 {
80
+ .typography__static-positive_103ve {
81
81
  color: var(--color-static-text-positive);
82
82
  }
package/colors.d.ts CHANGED
@@ -1,2 +1,2 @@
1
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];
2
+ export type Color = (typeof colors)[number];
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./colors.css');
4
4
 
5
- var colors = {"tertiary":"typography__tertiary_68na9","disabled":"typography__disabled_68na9","accent":"typography__accent_68na9","primary":"typography__primary_68na9","attention":"typography__attention_68na9","positive":"typography__positive_68na9","secondary":"typography__secondary_68na9","tertiary-inverted":"typography__tertiary-inverted_68na9","primary-inverted":"typography__primary-inverted_68na9","secondary-inverted":"typography__secondary-inverted_68na9","link":"typography__link_68na9","negative":"typography__negative_68na9","static-primary-light":"typography__static-primary-light_68na9","static-secondary-light":"typography__static-secondary-light_68na9","static-tertiary-light":"typography__static-tertiary-light_68na9","static-primary-dark":"typography__static-primary-dark_68na9","static-secondary-dark":"typography__static-secondary-dark_68na9","static-tertiary-dark":"typography__static-tertiary-dark_68na9","static-accent":"typography__static-accent_68na9","static-positive":"typography__static-positive_68na9"};
5
+ var colors = {"tertiary":"typography__tertiary_103ve","disabled":"typography__disabled_103ve","accent":"typography__accent_103ve","primary":"typography__primary_103ve","attention":"typography__attention_103ve","positive":"typography__positive_103ve","secondary":"typography__secondary_103ve","tertiary-inverted":"typography__tertiary-inverted_103ve","primary-inverted":"typography__primary-inverted_103ve","secondary-inverted":"typography__secondary-inverted_103ve","link":"typography__link_103ve","negative":"typography__negative_103ve","static-primary-light":"typography__static-primary-light_103ve","static-secondary-light":"typography__static-secondary-light_103ve","static-tertiary-light":"typography__static-tertiary-light_103ve","static-primary-dark":"typography__static-primary-dark_103ve","static-secondary-dark":"typography__static-secondary-dark_103ve","static-tertiary-dark":"typography__static-tertiary-dark_103ve","static-accent":"typography__static-accent_103ve","static-positive":"typography__static-positive_103ve"};
6
6
 
7
7
  module.exports = colors;
8
8
  //# sourceMappingURL=colors.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"colors.module.css.js","sources":["src/colors.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n/* colors */\n\n.tertiary {\n color: var(--color-light-text-tertiary);\n}\n\n.disabled {\n color: var(--color-light-text-quaternary);\n}\n\n.accent {\n color: var(--color-light-accent-primary);\n}\n\n.primary {\n color: var(--color-light-text-primary);\n}\n\n.attention {\n color: var(--color-light-text-attention);\n}\n\n.positive {\n color: var(--color-light-text-positive);\n}\n\n.secondary {\n color: var(--color-light-text-secondary);\n}\n\n.tertiary-inverted {\n color: var(--color-light-text-tertiary-inverted);\n}\n\n.primary-inverted {\n color: var(--color-light-text-primary-inverted);\n}\n\n.secondary-inverted {\n color: var(--color-light-text-secondary-inverted);\n}\n\n.link {\n color: var(--color-light-text-info);\n}\n\n.negative {\n color: var(--color-light-text-negative);\n}\n\n.static-primary-light {\n color: var(--color-static-text-primary-light);\n}\n\n.static-secondary-light {\n color: var(--color-static-text-secondary-light);\n}\n\n.static-tertiary-light {\n color: var(--color-static-text-tertiary-light);\n}\n\n.static-primary-dark {\n color: var(--color-static-text-primary-dark);\n}\n\n.static-secondary-dark {\n color: var(--color-static-text-secondary-dark);\n}\n\n.static-tertiary-dark {\n color: var(--color-static-text-tertiary-dark);\n}\n\n.static-accent {\n color: var(--color-static-accent-primary);\n}\n\n.static-positive {\n color: var(--color-static-text-positive);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,UAAU,CAAC,4BAA4B,CAAC,UAAU,CAAC,4BAA4B,CAAC,QAAQ,CAAC,0BAA0B,CAAC,SAAS,CAAC,2BAA2B,CAAC,WAAW,CAAC,6BAA6B,CAAC,UAAU,CAAC,4BAA4B,CAAC,WAAW,CAAC,6BAA6B,CAAC,mBAAmB,CAAC,qCAAqC,CAAC,kBAAkB,CAAC,oCAAoC,CAAC,oBAAoB,CAAC,sCAAsC,CAAC,MAAM,CAAC,wBAAwB,CAAC,UAAU,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,wBAAwB,CAAC,0CAA0C,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,qBAAqB,CAAC,uCAAuC,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,eAAe,CAAC,iCAAiC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC;;;;"}
1
+ {"version":3,"file":"colors.module.css.js","sources":["src/colors.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n/* colors */\n\n.tertiary {\n color: var(--color-light-text-tertiary);\n}\n\n.disabled {\n color: var(--color-light-text-quaternary);\n}\n\n.accent {\n color: var(--color-light-accent-primary);\n}\n\n.primary {\n color: var(--color-light-text-primary);\n}\n\n.attention {\n color: var(--color-light-text-attention);\n}\n\n.positive {\n color: var(--color-light-text-positive);\n}\n\n.secondary {\n color: var(--color-light-text-secondary);\n}\n\n.tertiary-inverted {\n color: var(--color-light-text-tertiary-inverted);\n}\n\n.primary-inverted {\n color: var(--color-light-text-primary-inverted);\n}\n\n.secondary-inverted {\n color: var(--color-light-text-secondary-inverted);\n}\n\n.link {\n color: var(--color-light-text-info);\n}\n\n.negative {\n color: var(--color-light-text-negative);\n}\n\n.static-primary-light {\n color: var(--color-static-text-primary-light);\n}\n\n.static-secondary-light {\n color: var(--color-static-text-secondary-light);\n}\n\n.static-tertiary-light {\n color: var(--color-static-text-tertiary-light);\n}\n\n.static-primary-dark {\n color: var(--color-static-text-primary-dark);\n}\n\n.static-secondary-dark {\n color: var(--color-static-text-secondary-dark);\n}\n\n.static-tertiary-dark {\n color: var(--color-static-text-tertiary-dark);\n}\n\n.static-accent {\n color: var(--color-static-accent-primary);\n}\n\n.static-positive {\n color: var(--color-static-text-positive);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,UAAU,CAAC,4BAA4B,CAAC,UAAU,CAAC,4BAA4B,CAAC,QAAQ,CAAC,0BAA0B,CAAC,SAAS,CAAC,2BAA2B,CAAC,WAAW,CAAC,6BAA6B,CAAC,UAAU,CAAC,4BAA4B,CAAC,WAAW,CAAC,6BAA6B,CAAC,mBAAmB,CAAC,qCAAqC,CAAC,kBAAkB,CAAC,oCAAoC,CAAC,oBAAoB,CAAC,sCAAsC,CAAC,MAAM,CAAC,wBAAwB,CAAC,UAAU,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,wBAAwB,CAAC,0CAA0C,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,qBAAqB,CAAC,uCAAuC,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,eAAe,CAAC,iCAAiC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC;;;;"}
package/cssm/colors.d.ts CHANGED
@@ -1,2 +1,2 @@
1
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];
2
+ export type Color = (typeof colors)[number];
@@ -2,8 +2,8 @@ import React, { type HTMLAttributes } from 'react';
2
2
  import { type TextSkeletonProps } from '@alfalab/core-components-skeleton/cssm';
3
3
  import { type Color } from '../colors';
4
4
  import { type TextElementType } from '../types';
5
- declare type NativeProps = HTMLAttributes<HTMLSpanElement>;
6
- declare type TextBaseProps = {
5
+ type NativeProps = HTMLAttributes<HTMLSpanElement>;
6
+ type TextBaseProps = {
7
7
  /**
8
8
  * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
9
9
  */
@@ -59,10 +59,10 @@ declare type TextBaseProps = {
59
59
  */
60
60
  font?: 'alfasans' | undefined | null;
61
61
  };
62
- declare type TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {
62
+ type TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {
63
63
  tag?: 'p';
64
64
  defaultMargins?: boolean;
65
65
  };
66
- export declare type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);
66
+ export type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);
67
67
  export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<TextElementType>>;
68
68
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\nimport { type TextElementType } from '../types';\n\nimport colors from '../colors.module.css';\nimport styles from './index.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLSpanElement>;\n\ntype TextBaseProps = {\n /**\n * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)\n */\n view?:\n | 'primary-large'\n | 'primary-medium'\n | 'primary-small'\n | 'secondary-large'\n | 'secondary-medium'\n | 'secondary-small'\n | 'component-primary'\n | 'component-secondary'\n | 'caps'\n | 'tagline';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold';\n\n /**\n * Делает цифры моноширинными\n */\n monospaceNumbers?: boolean;\n\n /**\n * HTML тег\n */\n tag?: 'span' | 'div';\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Добавляет отступы к тэгу 'p'\n */\n defaultMargins?: never;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Шрифт текста\n *\n * @deprecated\n */\n font?: 'alfasans' | undefined | null;\n};\n\ntype TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {\n tag?: 'p';\n defaultMargins?: boolean;\n};\n\nexport type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);\n\nexport const Text = forwardRef<TextElementType, TextProps>(\n (\n {\n view = 'primary-medium',\n tag: Component = 'span',\n weight,\n monospaceNumbers = false,\n defaultMargins = true,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n showSkeleton,\n skeletonProps,\n font,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n {\n [styles.paragraph]: Component === 'p' && !defaultMargins,\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n [styles.monospace]: monospaceNumbers,\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n },\n className,\n color && colors[color],\n styles[view],\n weight && styles[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":["forwardRef","__rest","useSkeleton","cn","styles","React","__assign","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;IAoGa,IAAI,GAAGA,gBAAU,CAC1B,UACI,EAeC,EACD,GAAG,EAAA;;IAfC,IAAA,EAAA,GAAA,EAAA,CAAA,IAAuB,CAAvB,CAAA,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,gBAAgB,GAAA,EAAA,CAAA,CACvB,EAAuB,GAAA,EAAA,CAAA,GAAA,CAAA,CAAlB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,GAAA,EAAA,CACvB,CAAA,MAAM,GAAA,EAAA,CAAA,MAAA,CAAA,CACN,EAAwB,GAAA,EAAA,CAAA,gBAAA,CAAA,CAAxB,gBAAgB,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,CACxB,CAAA,EAA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,KAAK,GAAG,IAAI,CAAC,cAAc;YACxD,EAAC,CAAAA,uBAAM,CAAC,oBAAoB,CAAA,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;AAClE,YAAA,EAAA,CAACA,uBAAM,CAAC,SAAS,CAAA,GAAG,gBAAgB;AACpC,YAAA,EAAA,CAACA,uBAAM,CAAC,UAAA,CAAA,MAAA,CAAW,QAAQ,CAAE,CAAC,IAAG,QAAQ;AACzC,YAAA,EAAA,CAACA,uBAAM,CAAC,WAAW,CAAA,GAAG,YAAY;AAEtC,YAAA,EAAA,GAAA,SAAS,EACT,KAAK,IAAIG,uBAAM,CAAC,KAAK,CAAC,EACtBH,uBAAM,CAAC,IAAI,CAAC,EACZ,MAAM,IAAIA,uBAAM,CAAC,MAAM,CAAC,CAC3B,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAEI,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,EAAA,SAAS,GAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\nimport { type TextElementType } from '../types';\n\nimport colors from '../colors.module.css';\nimport styles from './index.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLSpanElement>;\n\ntype TextBaseProps = {\n /**\n * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)\n */\n view?:\n | 'primary-large'\n | 'primary-medium'\n | 'primary-small'\n | 'secondary-large'\n | 'secondary-medium'\n | 'secondary-small'\n | 'component-primary'\n | 'component-secondary'\n | 'caps'\n | 'tagline';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold';\n\n /**\n * Делает цифры моноширинными\n */\n monospaceNumbers?: boolean;\n\n /**\n * HTML тег\n */\n tag?: 'span' | 'div';\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Добавляет отступы к тэгу 'p'\n */\n defaultMargins?: never;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Шрифт текста\n *\n * @deprecated\n */\n font?: 'alfasans' | undefined | null;\n};\n\ntype TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {\n tag?: 'p';\n defaultMargins?: boolean;\n};\n\nexport type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);\n\nexport const Text = forwardRef<TextElementType, TextProps>(\n (\n {\n view = 'primary-medium',\n tag: Component = 'span',\n weight,\n monospaceNumbers = false,\n defaultMargins = true,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n showSkeleton,\n skeletonProps,\n font,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n {\n [styles.paragraph]: Component === 'p' && !defaultMargins,\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n [styles.monospace]: monospaceNumbers,\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n },\n className,\n color && colors[color],\n styles[view],\n weight && styles[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children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TMLAttributes } from 'react';
2
2
  import { type TextSkeletonProps } from '@alfalab/core-components-skeleton/cssm';
3
3
  import { type Color } from '../colors';
4
- declare type NativeProps = HTMLAttributes<HTMLHeadingElement>;
5
- export declare type TitleProps = Omit<NativeProps, 'color'> & {
4
+ type NativeProps = HTMLAttributes<HTMLHeadingElement>;
5
+ export type TitleProps = Omit<NativeProps, 'color'> & {
6
6
  /**
7
7
  * HTML тег
8
8
  */
@@ -61,51 +61,51 @@ export declare type TitleProps = Omit<NativeProps, 'color'> & {
61
61
  */
62
62
  defaultMatchMediaValue?: boolean | (() => boolean);
63
63
  };
64
- declare type PrivateProps = {
64
+ type PrivateProps = {
65
65
  styles: {
66
66
  [key: string]: string;
67
67
  };
68
68
  platform: 'mobile' | 'desktop';
69
69
  };
70
- declare type TitleElementType = HTMLHeadingElement | HTMLDivElement;
70
+ type TitleElementType = HTMLHeadingElement | HTMLDivElement;
71
71
  export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "color"> & {
72
72
  /**
73
73
  * HTML тег
74
74
  */
75
- tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
75
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
76
76
  /**
77
77
  * [Вариант начертания](?path=/docs/guidelines-typography--page)
78
78
  */
79
- view?: "medium" | "small" | "xlarge" | "large" | "xsmall" | undefined;
79
+ view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
80
80
  /**
81
81
  * Цвет текста
82
82
  */
83
- 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;
83
+ color?: Color;
84
84
  /**
85
85
  * Толщина шрифта
86
86
  */
87
- weight?: "regular" | "medium" | "bold" | "semibold" | undefined;
87
+ weight?: "regular" | "medium" | "bold" | "semibold";
88
88
  /**
89
89
  * Шрифт текста
90
90
  *
91
91
  * @deprecated
92
92
  */
93
- font?: "alfasans" | "styrene" | "system" | {
94
- font: 'alfasans';
93
+ font?: "styrene" | "system" | "alfasans" | {
94
+ font: "alfasans";
95
95
  systemCompat: boolean;
96
- } | undefined;
96
+ };
97
97
  /**
98
98
  * Добавляет отступы
99
99
  */
100
- defaultMargins?: boolean | undefined;
100
+ defaultMargins?: boolean;
101
101
  /**
102
102
  * Css-класс для стилизации (native prop)
103
103
  */
104
- className?: string | undefined;
104
+ className?: string;
105
105
  /**
106
106
  * Id компонента для тестов
107
107
  */
108
- dataTestId?: string | undefined;
108
+ dataTestId?: string;
109
109
  /**
110
110
  * Контент (native prop)
111
111
  */
@@ -113,18 +113,18 @@ export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps
113
113
  /**
114
114
  * Количество строк
115
115
  */
116
- rowLimit?: 1 | 2 | 3 | undefined;
116
+ rowLimit?: 1 | 2 | 3;
117
117
  /**
118
118
  * Показать скелетон
119
119
  */
120
- showSkeleton?: boolean | undefined;
120
+ showSkeleton?: boolean;
121
121
  /**
122
122
  * Пропы для скелетона
123
123
  */
124
- skeletonProps?: TextSkeletonProps | undefined;
124
+ skeletonProps?: TextSkeletonProps;
125
125
  /**
126
126
  * Значение по-умолчанию для хука useMatchMedia
127
127
  */
128
- defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
128
+ defaultMatchMediaValue?: boolean | (() => boolean);
129
129
  } & PrivateProps & React.RefAttributes<TitleElementType>>;
130
130
  export {};
@@ -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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AAC;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 * @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,K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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,22 +1,22 @@
1
1
  import React from 'react';
2
2
  import { type TitleProps } from './component';
3
3
  declare const Title: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
4
- tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
5
- view?: "medium" | "small" | "xlarge" | "large" | "xsmall" | undefined;
6
- 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;
7
- weight?: "regular" | "medium" | "bold" | "semibold" | undefined;
8
- font?: "alfasans" | "styrene" | "system" | {
4
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
5
+ view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
6
+ color?: import("..").Color;
7
+ weight?: "regular" | "medium" | "bold" | "semibold";
8
+ font?: "styrene" | "system" | "alfasans" | {
9
9
  font: "alfasans";
10
10
  systemCompat: boolean;
11
- } | undefined;
12
- defaultMargins?: boolean | undefined;
13
- className?: string | undefined;
14
- dataTestId?: string | undefined;
11
+ };
12
+ defaultMargins?: boolean;
13
+ className?: string;
14
+ dataTestId?: string;
15
15
  children?: React.ReactNode;
16
- rowLimit?: 1 | 2 | 3 | undefined;
17
- showSkeleton?: boolean | undefined;
18
- skeletonProps?: import("@alfalab/core-components-skeleton").TextSkeletonProps | undefined;
19
- defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
16
+ rowLimit?: 1 | 2 | 3;
17
+ showSkeleton?: boolean;
18
+ skeletonProps?: import("@alfalab/core-components-skeleton").TextSkeletonProps;
19
+ defaultMatchMediaValue?: boolean | (() => boolean);
20
20
  } & React.RefAttributes<HTMLDivElement | HTMLHeadingElement>>;
21
21
  export { Title };
22
22
  export type { TitleProps };
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../src/title/utils.ts"],"sourcesContent":["export function getDefaultWeight(\n font: 'styrene' | 'system' | 'alfasans',\n platform: 'mobile' | 'desktop',\n) {\n if (font === 'styrene' || font === 'alfasans') {\n return 'medium';\n }\n\n if (platform === 'desktop') {\n return 'bold';\n }\n\n return 'semibold';\n}\n"],"names":[],"mappings":";;;;AAAgB,SAAA,gBAAgB,CAC5B,IAAuC,EACvC,QAA8B,EAAA;AAE9B,IAAA,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,UAAU,EAAE;AAC3C,QAAA,OAAO,QAAQ;AAClB;IAED,IAAI,QAAQ,KAAK,SAAS,EAAE;AACxB,QAAA,OAAO,MAAM;AAChB;AAED,IAAA,OAAO,UAAU;AACrB;;;;"}
1
+ {"version":3,"file":"utils.js","sources":["../../src/title/utils.ts"],"sourcesContent":["export function getDefaultWeight(\n font: 'styrene' | 'system' | 'alfasans',\n platform: 'mobile' | 'desktop',\n) {\n if (font === 'styrene' || font === 'alfasans') {\n return 'medium';\n }\n\n if (platform === 'desktop') {\n return 'bold';\n }\n\n return 'semibold';\n}\n"],"names":[],"mappings":";;;;AAAgB,SAAA,gBAAgB,CAC5B,IAAuC,EACvC,QAA8B,EAAA;IAE9B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,UAAU,EAAE;AAC3C,QAAA,OAAO,QAAQ;;AAGnB,IAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;AACxB,QAAA,OAAO,MAAM;;AAGjB,IAAA,OAAO,UAAU;AACrB;;;;"}
@@ -1,19 +1,19 @@
1
1
  import React from 'react';
2
2
  export declare const TitleMobile: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
3
- tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
4
- view?: "medium" | "small" | "xlarge" | "large" | "xsmall" | undefined;
5
- 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;
6
- weight?: "regular" | "medium" | "bold" | "semibold" | undefined;
7
- font?: "alfasans" | "styrene" | "system" | {
3
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
4
+ view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
5
+ color?: import("..").Color;
6
+ weight?: "regular" | "medium" | "bold" | "semibold";
7
+ font?: "styrene" | "system" | "alfasans" | {
8
8
  font: "alfasans";
9
9
  systemCompat: boolean;
10
- } | undefined;
11
- defaultMargins?: boolean | undefined;
12
- className?: string | undefined;
13
- dataTestId?: string | undefined;
10
+ };
11
+ defaultMargins?: boolean;
12
+ className?: string;
13
+ dataTestId?: string;
14
14
  children?: React.ReactNode;
15
- rowLimit?: 1 | 2 | 3 | undefined;
16
- showSkeleton?: boolean | undefined;
17
- skeletonProps?: import("@alfalab/core-components-skeleton").TextSkeletonProps | undefined;
18
- defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
15
+ rowLimit?: 1 | 2 | 3;
16
+ showSkeleton?: boolean;
17
+ skeletonProps?: import("@alfalab/core-components-skeleton").TextSkeletonProps;
18
+ defaultMatchMediaValue?: boolean | (() => boolean);
19
19
  } & React.RefAttributes<HTMLDivElement | HTMLHeadingElement>>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type TitleProps } from '../title';
3
- export declare type TitleResponsiveProps = TitleProps & {
3
+ export type TitleResponsiveProps = TitleProps & {
4
4
  /**
5
5
  * Контрольная точка, с нее начинается desktop версия
6
6
  * @default 1024
@@ -12,30 +12,30 @@ export declare type TitleResponsiveProps = TitleProps & {
12
12
  client?: 'desktop' | 'mobile';
13
13
  };
14
14
  export declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
15
- tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
16
- view?: "medium" | "small" | "xlarge" | "large" | "xsmall" | undefined;
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;
18
- weight?: "regular" | "medium" | "bold" | "semibold" | undefined;
19
- font?: "alfasans" | "styrene" | "system" | {
15
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
16
+ view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
17
+ color?: import("..").Color;
18
+ weight?: "regular" | "medium" | "bold" | "semibold";
19
+ font?: "styrene" | "system" | "alfasans" | {
20
20
  font: "alfasans";
21
21
  systemCompat: boolean;
22
- } | undefined;
23
- defaultMargins?: boolean | undefined;
24
- className?: string | undefined;
25
- dataTestId?: string | undefined;
22
+ };
23
+ defaultMargins?: boolean;
24
+ className?: string;
25
+ dataTestId?: string;
26
26
  children?: React.ReactNode;
27
- rowLimit?: 1 | 2 | 3 | undefined;
28
- showSkeleton?: boolean | undefined;
29
- skeletonProps?: import("@alfalab/core-components-skeleton").TextSkeletonProps | undefined;
30
- defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
27
+ rowLimit?: 1 | 2 | 3;
28
+ showSkeleton?: boolean;
29
+ skeletonProps?: import("@alfalab/core-components-skeleton").TextSkeletonProps;
30
+ defaultMatchMediaValue?: boolean | (() => boolean);
31
31
  } & {
32
32
  /**
33
33
  * Контрольная точка, с нее начинается desktop версия
34
34
  * @default 1024
35
35
  */
36
- breakpoint?: number | undefined;
36
+ breakpoint?: number;
37
37
  /**
38
38
  * Версия, которая будет использоваться при серверном рендеринге
39
39
  */
40
- client?: "mobile" | "desktop" | undefined;
40
+ client?: "desktop" | "mobile";
41
41
  } & React.RefAttributes<HTMLDivElement | HTMLHeadingElement>>;
package/cssm/types.d.ts CHANGED
@@ -1 +1 @@
1
- export declare type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
1
+ export type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
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_68na9 {
23
+ .typography__tertiary_103ve {
24
24
  color: var(--color-light-text-tertiary);
25
25
  }
26
- .typography__disabled_68na9 {
26
+ .typography__disabled_103ve {
27
27
  color: var(--color-light-text-quaternary);
28
28
  }
29
- .typography__accent_68na9 {
29
+ .typography__accent_103ve {
30
30
  color: var(--color-light-accent-primary);
31
31
  }
32
- .typography__primary_68na9 {
32
+ .typography__primary_103ve {
33
33
  color: var(--color-light-text-primary);
34
34
  }
35
- .typography__attention_68na9 {
35
+ .typography__attention_103ve {
36
36
  color: var(--color-light-text-attention);
37
37
  }
38
- .typography__positive_68na9 {
38
+ .typography__positive_103ve {
39
39
  color: var(--color-light-text-positive);
40
40
  }
41
- .typography__secondary_68na9 {
41
+ .typography__secondary_103ve {
42
42
  color: var(--color-light-text-secondary);
43
43
  }
44
- .typography__tertiary-inverted_68na9 {
44
+ .typography__tertiary-inverted_103ve {
45
45
  color: var(--color-light-text-tertiary-inverted);
46
46
  }
47
- .typography__primary-inverted_68na9 {
47
+ .typography__primary-inverted_103ve {
48
48
  color: var(--color-light-text-primary-inverted);
49
49
  }
50
- .typography__secondary-inverted_68na9 {
50
+ .typography__secondary-inverted_103ve {
51
51
  color: var(--color-light-text-secondary-inverted);
52
52
  }
53
- .typography__link_68na9 {
53
+ .typography__link_103ve {
54
54
  color: var(--color-light-text-info);
55
55
  }
56
- .typography__negative_68na9 {
56
+ .typography__negative_103ve {
57
57
  color: var(--color-light-text-negative);
58
58
  }
59
- .typography__static-primary-light_68na9 {
59
+ .typography__static-primary-light_103ve {
60
60
  color: var(--color-static-text-primary-light);
61
61
  }
62
- .typography__static-secondary-light_68na9 {
62
+ .typography__static-secondary-light_103ve {
63
63
  color: var(--color-static-text-secondary-light);
64
64
  }
65
- .typography__static-tertiary-light_68na9 {
65
+ .typography__static-tertiary-light_103ve {
66
66
  color: var(--color-static-text-tertiary-light);
67
67
  }
68
- .typography__static-primary-dark_68na9 {
68
+ .typography__static-primary-dark_103ve {
69
69
  color: var(--color-static-text-primary-dark);
70
70
  }
71
- .typography__static-secondary-dark_68na9 {
71
+ .typography__static-secondary-dark_103ve {
72
72
  color: var(--color-static-text-secondary-dark);
73
73
  }
74
- .typography__static-tertiary-dark_68na9 {
74
+ .typography__static-tertiary-dark_103ve {
75
75
  color: var(--color-static-text-tertiary-dark);
76
76
  }
77
- .typography__static-accent_68na9 {
77
+ .typography__static-accent_103ve {
78
78
  color: var(--color-static-accent-primary);
79
79
  }
80
- .typography__static-positive_68na9 {
80
+ .typography__static-positive_103ve {
81
81
  color: var(--color-static-text-positive);
82
82
  }
package/esm/colors.d.ts CHANGED
@@ -1,2 +1,2 @@
1
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];
2
+ export type Color = (typeof colors)[number];
@@ -1,6 +1,6 @@
1
1
  import './colors.css';
2
2
 
3
- var colors = {"tertiary":"typography__tertiary_68na9","disabled":"typography__disabled_68na9","accent":"typography__accent_68na9","primary":"typography__primary_68na9","attention":"typography__attention_68na9","positive":"typography__positive_68na9","secondary":"typography__secondary_68na9","tertiary-inverted":"typography__tertiary-inverted_68na9","primary-inverted":"typography__primary-inverted_68na9","secondary-inverted":"typography__secondary-inverted_68na9","link":"typography__link_68na9","negative":"typography__negative_68na9","static-primary-light":"typography__static-primary-light_68na9","static-secondary-light":"typography__static-secondary-light_68na9","static-tertiary-light":"typography__static-tertiary-light_68na9","static-primary-dark":"typography__static-primary-dark_68na9","static-secondary-dark":"typography__static-secondary-dark_68na9","static-tertiary-dark":"typography__static-tertiary-dark_68na9","static-accent":"typography__static-accent_68na9","static-positive":"typography__static-positive_68na9"};
3
+ var colors = {"tertiary":"typography__tertiary_103ve","disabled":"typography__disabled_103ve","accent":"typography__accent_103ve","primary":"typography__primary_103ve","attention":"typography__attention_103ve","positive":"typography__positive_103ve","secondary":"typography__secondary_103ve","tertiary-inverted":"typography__tertiary-inverted_103ve","primary-inverted":"typography__primary-inverted_103ve","secondary-inverted":"typography__secondary-inverted_103ve","link":"typography__link_103ve","negative":"typography__negative_103ve","static-primary-light":"typography__static-primary-light_103ve","static-secondary-light":"typography__static-secondary-light_103ve","static-tertiary-light":"typography__static-tertiary-light_103ve","static-primary-dark":"typography__static-primary-dark_103ve","static-secondary-dark":"typography__static-secondary-dark_103ve","static-tertiary-dark":"typography__static-tertiary-dark_103ve","static-accent":"typography__static-accent_103ve","static-positive":"typography__static-positive_103ve"};
4
4
 
5
5
  export { colors as default };
6
6
  //# sourceMappingURL=colors.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"colors.module.css.js","sources":["src/colors.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n/* colors */\n\n.tertiary {\n color: var(--color-light-text-tertiary);\n}\n\n.disabled {\n color: var(--color-light-text-quaternary);\n}\n\n.accent {\n color: var(--color-light-accent-primary);\n}\n\n.primary {\n color: var(--color-light-text-primary);\n}\n\n.attention {\n color: var(--color-light-text-attention);\n}\n\n.positive {\n color: var(--color-light-text-positive);\n}\n\n.secondary {\n color: var(--color-light-text-secondary);\n}\n\n.tertiary-inverted {\n color: var(--color-light-text-tertiary-inverted);\n}\n\n.primary-inverted {\n color: var(--color-light-text-primary-inverted);\n}\n\n.secondary-inverted {\n color: var(--color-light-text-secondary-inverted);\n}\n\n.link {\n color: var(--color-light-text-info);\n}\n\n.negative {\n color: var(--color-light-text-negative);\n}\n\n.static-primary-light {\n color: var(--color-static-text-primary-light);\n}\n\n.static-secondary-light {\n color: var(--color-static-text-secondary-light);\n}\n\n.static-tertiary-light {\n color: var(--color-static-text-tertiary-light);\n}\n\n.static-primary-dark {\n color: var(--color-static-text-primary-dark);\n}\n\n.static-secondary-dark {\n color: var(--color-static-text-secondary-dark);\n}\n\n.static-tertiary-dark {\n color: var(--color-static-text-tertiary-dark);\n}\n\n.static-accent {\n color: var(--color-static-accent-primary);\n}\n\n.static-positive {\n color: var(--color-static-text-positive);\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,UAAU,CAAC,4BAA4B,CAAC,UAAU,CAAC,4BAA4B,CAAC,QAAQ,CAAC,0BAA0B,CAAC,SAAS,CAAC,2BAA2B,CAAC,WAAW,CAAC,6BAA6B,CAAC,UAAU,CAAC,4BAA4B,CAAC,WAAW,CAAC,6BAA6B,CAAC,mBAAmB,CAAC,qCAAqC,CAAC,kBAAkB,CAAC,oCAAoC,CAAC,oBAAoB,CAAC,sCAAsC,CAAC,MAAM,CAAC,wBAAwB,CAAC,UAAU,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,wBAAwB,CAAC,0CAA0C,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,qBAAqB,CAAC,uCAAuC,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,eAAe,CAAC,iCAAiC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC;;;;"}
1
+ {"version":3,"file":"colors.module.css.js","sources":["src/colors.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n/* colors */\n\n.tertiary {\n color: var(--color-light-text-tertiary);\n}\n\n.disabled {\n color: var(--color-light-text-quaternary);\n}\n\n.accent {\n color: var(--color-light-accent-primary);\n}\n\n.primary {\n color: var(--color-light-text-primary);\n}\n\n.attention {\n color: var(--color-light-text-attention);\n}\n\n.positive {\n color: var(--color-light-text-positive);\n}\n\n.secondary {\n color: var(--color-light-text-secondary);\n}\n\n.tertiary-inverted {\n color: var(--color-light-text-tertiary-inverted);\n}\n\n.primary-inverted {\n color: var(--color-light-text-primary-inverted);\n}\n\n.secondary-inverted {\n color: var(--color-light-text-secondary-inverted);\n}\n\n.link {\n color: var(--color-light-text-info);\n}\n\n.negative {\n color: var(--color-light-text-negative);\n}\n\n.static-primary-light {\n color: var(--color-static-text-primary-light);\n}\n\n.static-secondary-light {\n color: var(--color-static-text-secondary-light);\n}\n\n.static-tertiary-light {\n color: var(--color-static-text-tertiary-light);\n}\n\n.static-primary-dark {\n color: var(--color-static-text-primary-dark);\n}\n\n.static-secondary-dark {\n color: var(--color-static-text-secondary-dark);\n}\n\n.static-tertiary-dark {\n color: var(--color-static-text-tertiary-dark);\n}\n\n.static-accent {\n color: var(--color-static-accent-primary);\n}\n\n.static-positive {\n color: var(--color-static-text-positive);\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,UAAU,CAAC,4BAA4B,CAAC,UAAU,CAAC,4BAA4B,CAAC,QAAQ,CAAC,0BAA0B,CAAC,SAAS,CAAC,2BAA2B,CAAC,WAAW,CAAC,6BAA6B,CAAC,UAAU,CAAC,4BAA4B,CAAC,WAAW,CAAC,6BAA6B,CAAC,mBAAmB,CAAC,qCAAqC,CAAC,kBAAkB,CAAC,oCAAoC,CAAC,oBAAoB,CAAC,sCAAsC,CAAC,MAAM,CAAC,wBAAwB,CAAC,UAAU,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,wBAAwB,CAAC,0CAA0C,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,qBAAqB,CAAC,uCAAuC,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,eAAe,CAAC,iCAAiC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC;;;;"}
@@ -2,8 +2,8 @@ import React, { type HTMLAttributes } from 'react';
2
2
  import { type TextSkeletonProps } from '@alfalab/core-components-skeleton/esm';
3
3
  import { type Color } from '../colors';
4
4
  import { type TextElementType } from '../types';
5
- declare type NativeProps = HTMLAttributes<HTMLSpanElement>;
6
- declare type TextBaseProps = {
5
+ type NativeProps = HTMLAttributes<HTMLSpanElement>;
6
+ type TextBaseProps = {
7
7
  /**
8
8
  * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
9
9
  */
@@ -59,10 +59,10 @@ declare type TextBaseProps = {
59
59
  */
60
60
  font?: 'alfasans' | undefined | null;
61
61
  };
62
- declare type TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {
62
+ type TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {
63
63
  tag?: 'p';
64
64
  defaultMargins?: boolean;
65
65
  };
66
- export declare type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);
66
+ export type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);
67
67
  export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<TextElementType>>;
68
68
  export {};